39 lines
2.9 KiB
JavaScript
39 lines
2.9 KiB
JavaScript
"use strict";
|
|
const plugins = require("./npmdocker.plugins");
|
|
const paths = require("./npmdocker.paths");
|
|
;
|
|
let getQenvKeyValueObject = () => {
|
|
let done = plugins.q.defer();
|
|
let qenvKeyValueObjectArray;
|
|
if (plugins.smartfile.fs.fileExistsSync(plugins.path.join(paths.cwd, "qenv.yml"))) {
|
|
qenvKeyValueObjectArray = new plugins.qenv.Qenv(paths.cwd, ".nogit/").keyValueObjectArray;
|
|
}
|
|
else {
|
|
qenvKeyValueObjectArray = [];
|
|
}
|
|
;
|
|
done.resolve(qenvKeyValueObjectArray);
|
|
return done.promise;
|
|
};
|
|
let buildConfig = (qenvKeyValueObjectArrayArg) => {
|
|
let done = plugins.q.defer();
|
|
let config = plugins.npmextra.dataFor({
|
|
toolName: "npmdocker",
|
|
defaultSettings: {
|
|
baseImage: "hosttoday/ht-docker-node:npmts",
|
|
command: "npm run npmdocker",
|
|
dockerSock: false,
|
|
keyValueObjectArray: qenvKeyValueObjectArrayArg
|
|
}
|
|
});
|
|
done.resolve(config);
|
|
return done.promise;
|
|
};
|
|
exports.run = () => {
|
|
let done = plugins.q.defer();
|
|
getQenvKeyValueObject()
|
|
.then(buildConfig)
|
|
.then(done.resolve);
|
|
return done.promise;
|
|
};
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtZG9ja2VyLmNvbmZpZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL25wbWRvY2tlci5jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE1BQVksT0FBTyxXQUFNLHFCQUFxQixDQUFDLENBQUE7QUFDL0MsTUFBWSxLQUFLLFdBQU0sbUJBQW1CLENBQUMsQ0FBQTtBQVcxQyxDQUFDO0FBRUYsSUFBSSxxQkFBcUIsR0FBRztJQUN4QixJQUFJLElBQUksR0FBRyxPQUFPL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