39 lines
3.1 KiB
JavaScript
39 lines
3.1 KiB
JavaScript
"use strict";
|
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
});
|
|
};
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
const plugins = require("./npmdocker.plugins");
|
|
const paths = require("./npmdocker.paths");
|
|
;
|
|
let getQenvKeyValueObject = () => __awaiter(this, void 0, void 0, function* () {
|
|
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 = [];
|
|
}
|
|
;
|
|
return qenvKeyValueObjectArray;
|
|
});
|
|
let buildConfig = (qenvKeyValueObjectArrayArg) => __awaiter(this, void 0, void 0, function* () {
|
|
let npmextra = new plugins.npmextra.Npmextra(paths.cwd);
|
|
let config = npmextra.dataFor('npmdocker', {
|
|
baseImage: 'hosttoday/ht-docker-node:npmts',
|
|
command: 'npm test',
|
|
dockerSock: false,
|
|
keyValueObjectArray: qenvKeyValueObjectArrayArg
|
|
});
|
|
return config;
|
|
});
|
|
exports.run = () => __awaiter(this, void 0, void 0, function* () {
|
|
let config = yield getQenvKeyValueObject().then(buildConfig);
|
|
return config;
|
|
});
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtZG9ja2VyLmNvbmZpZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIj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