From 7c5cafeb1bb3efe373058e8743ef23926480d2b7 Mon Sep 17 00:00:00 2001 From: philkunz Date: Fri, 19 May 2017 12:09:33 +0200 Subject: [PATCH] complete modular transition --- dist/mod_command/index.js | 4 +- dist/mod_command/mod.plugins.d.ts | 1 + dist/mod_command/mod.plugins.js | 7 ++ dist/mod_install/index.js | 8 +-- dist/mod_install/mod.plugins.d.ts | 1 + dist/mod_install/mod.plugins.js | 7 ++ dist/mod_prepare/index.js | 10 +-- dist/mod_prepare/mod.plugins.d.ts | 1 + dist/mod_prepare/mod.plugins.js | 7 ++ dist/mod_publish/index.d.ts | 3 +- dist/mod_publish/index.js | 27 ++++--- dist/mod_publish/mod.plugins.d.ts | 1 + dist/mod_publish/mod.plugins.js | 7 ++ dist/{npmci.test.d.ts => mod_test/index.d.ts} | 4 ++ dist/mod_test/index.js | 48 +++++++++++++ dist/mod_test/mod.plugins.d.ts | 1 + dist/mod_test/mod.plugins.js | 7 ++ dist/mod_trigger/index.js | 7 +- dist/mod_trigger/mod.plugins.d.ts | 1 + dist/mod_trigger/mod.plugins.js | 7 ++ dist/npmci.cli.js | 72 ++++++++++--------- dist/npmci.env.d.ts | 8 +-- dist/npmci.env.js | 14 +++- dist/npmci.mods.d.ts | 2 + dist/npmci.mods.js | 3 +- dist/npmci.ssh.js | 14 ++-- dist/npmci.test.js | 43 ----------- test/test.ts | 9 ++- ts/mod_command/index.ts | 4 +- ts/mod_command/mod.plugins.ts | 1 + ts/mod_install/index.ts | 6 +- ts/mod_install/mod.plugins.ts | 1 + ts/mod_prepare/index.ts | 8 +-- ts/mod_prepare/mod.plugins.ts | 1 + ts/mod_publish/index.ts | 30 ++++---- ts/mod_publish/mod.plugins.ts | 1 + ts/mod_trigger/index.ts | 10 +-- ts/mod_trigger/mod.plugins.ts | 1 + 38 files changed, 234 insertions(+), 153 deletions(-) create mode 100644 dist/mod_command/mod.plugins.d.ts create mode 100644 dist/mod_command/mod.plugins.js create mode 100644 dist/mod_install/mod.plugins.d.ts create mode 100644 dist/mod_install/mod.plugins.js create mode 100644 dist/mod_prepare/mod.plugins.d.ts create mode 100644 dist/mod_prepare/mod.plugins.js create mode 100644 dist/mod_publish/mod.plugins.d.ts create mode 100644 dist/mod_publish/mod.plugins.js rename dist/{npmci.test.d.ts => mod_test/index.d.ts} (52%) create mode 100644 dist/mod_test/index.js create mode 100644 dist/mod_test/mod.plugins.d.ts create mode 100644 dist/mod_test/mod.plugins.js create mode 100644 dist/mod_trigger/mod.plugins.d.ts create mode 100644 dist/mod_trigger/mod.plugins.js delete mode 100644 dist/npmci.test.js create mode 100644 ts/mod_command/mod.plugins.ts create mode 100644 ts/mod_install/mod.plugins.ts create mode 100644 ts/mod_prepare/mod.plugins.ts create mode 100644 ts/mod_publish/mod.plugins.ts diff --git a/dist/mod_command/index.js b/dist/mod_command/index.js index 27fa59f..65ccfa6 100644 --- a/dist/mod_command/index.js +++ b/dist/mod_command/index.js @@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); -const npmci_bash_1 = require("./npmci.bash"); +const npmci_bash_1 = require("../npmci.bash"); exports.command = () => __awaiter(this, void 0, void 0, function* () { let wrappedCommand = ''; let argvArray = process.argv; @@ -21,4 +21,4 @@ exports.command = () => __awaiter(this, void 0, void 0, function* () { yield npmci_bash_1.bash(wrappedCommand); return; }); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9tb2RfY29tbWFuZC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQ0EsNkNBQW1DO0FBRXhCLFFBQUEsT0FBTyxHQUFHO0lBQ25CLElBQUksY0FBYyxHQUFXLEVBQUUsQ0FBQTtJQUMvQixJQUFJLFNBQVMsR0FBRyxPQUFPLENBQUMsS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0FBRyxDQUFDLEtBQUssU0FBUyxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7WUFBQyxjQUFjLEdBQUcsY0FBYyxHQUFHLEdBQUcsQ0FBQTtRQUFDLENBQUM7SUFDM0UsQ0FBQztJQUNELE1BQU0saUJBQUksQ0FBQyxjQUFjLENBQUMsQ0FBQTtJQUMxQixNQUFNLENBQUE7QUFDUixDQUFDLENBQUEsQ0FBQSJ9 \ No newline at end of file diff --git a/dist/mod_command/mod.plugins.d.ts b/dist/mod_command/mod.plugins.d.ts new file mode 100644 index 0000000..27d1e74 --- /dev/null +++ b/dist/mod_command/mod.plugins.d.ts @@ -0,0 +1 @@ +export * from '../npmci.plugins'; diff --git a/dist/mod_command/mod.plugins.js b/dist/mod_command/mod.plugins.js new file mode 100644 index 0000000..8996468 --- /dev/null +++ b/dist/mod_command/mod.plugins.js @@ -0,0 +1,7 @@ +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("../npmci.plugins")); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9tb2RfY29tbWFuZC9tb2QucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLHNDQUFnQyJ9 \ No newline at end of file diff --git a/dist/mod_install/index.js b/dist/mod_install/index.js index 2882d95..8fa36c7 100644 --- a/dist/mod_install/index.js +++ b/dist/mod_install/index.js @@ -8,9 +8,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); -const plugins = require("./npmci.plugins"); -const configModule = require("./npmci.config"); -const npmci_bash_1 = require("./npmci.bash"); +const plugins = require("./mod.plugins"); +const configModule = require("../npmci.config"); +const npmci_bash_1 = require("../npmci.bash"); /** * Install a specific version of node * @param versionArg @@ -65,4 +65,4 @@ exports.install = (versionArg) => __awaiter(this, void 0, void 0, function* () { plugins.beautylog.success('all global npm tools specified in npmextra.json are now available!'); })); }); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9tb2RfaW5zdGFsbC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUEsMkNBQTBDO0FBQzFDLCtDQUE4QztBQUM5Qyw2Q0FJcUM7QUFFckM7OztHQUdHO0FBQ1EsUUFBQSxPQUFPLEdBQUcsQ0FBTyxVQUFVO0lBQ3BDLE9BQU8sQ0FBQyxTQUFTLENBQUMsR0FBRyxDQUFDLCtCQUErQixVQUFVLEVBQUUsQ0FBQyxDQUFBO0lBQ2xFLElBQUksT0FBZSxDQUFBO0lBQ25CLEVBQUUsQ0FBQyxDQUFDLFVBQVUsS0FBSyxRQUFRLENBQUMsQ0FBQyxDQUFDO1FBQzVCLE9BQU8sR0FBRyxRQUFRLENBQUE7SUFDcEIsQ0FBQztJQUFDLElBQUksQ0FBQyxFQUFFLENBQUMsQ0FBQyxVQUFVLEtBQUssS0FBSyxDQUFDLENBQUMsQ0FBQztRQUNoQyxPQUFPLEdBQUcsR0FBRyxDQUFBO0lBQ2YsQ0FBQztJQUFDLElBQUksQ0FBQyxFQUFFLENBQUMsQ0FBQyxVQUFVLEtBQUssUUFBUSxDQUFDLENBQUMsQ0FBQztRQUNuQyxPQUFPLEdBQUcsR0FBRyxDQUFBO0lBQ2YsQ0FBQztJQUFDLElBQUksQ0FBQyxDQUFDO1FBQ04sT0FBTyxHQUFHLFVBQVUsQ0FBQTtJQUN0QixDQUFDO0lBQUEsQ0FBQztJQUNGLEVBQUUsQ0FBQyxDQUFDLE1BQU0seUJBQVksQ0FBQyxPQ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LE9BQU8sQ0FBQyxvRUFBb0UsQ0FBQyxDQUFBO0lBQ2pHLENBQUMsQ0FBQSxDQUFDLENBQUE7QUFDTixDQUFDLENBQUEsQ0FBQSJ9 \ No newline at end of file diff --git a/dist/mod_install/mod.plugins.d.ts b/dist/mod_install/mod.plugins.d.ts new file mode 100644 index 0000000..27d1e74 --- /dev/null +++ b/dist/mod_install/mod.plugins.d.ts @@ -0,0 +1 @@ +export * from '../npmci.plugins'; diff --git a/dist/mod_install/mod.plugins.js b/dist/mod_install/mod.plugins.js new file mode 100644 index 0000000..ea8f0f4 --- /dev/null +++ b/dist/mod_install/mod.plugins.js @@ -0,0 +1,7 @@ +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("../npmci.plugins")); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9tb2RfaW5zdGFsbC9tb2QucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLHNDQUFnQyJ9 \ No newline at end of file diff --git a/dist/mod_prepare/index.js b/dist/mod_prepare/index.js index 0499929..d375c98 100644 --- a/dist/mod_prepare/index.js +++ b/dist/mod_prepare/index.js @@ -8,10 +8,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); -const plugins = require("./npmci.plugins"); -const npmci_bash_1 = require("./npmci.bash"); -const env = require("./npmci.env"); -const sshModule = require("./npmci.ssh"); +const plugins = require("./mod.plugins"); +const npmci_bash_1 = require("../npmci.bash"); +const env = require("../npmci.env"); +const sshModule = require("../npmci.ssh"); /** * authenticates npm with token from env var */ @@ -78,4 +78,4 @@ exports.prepare = (serviceArg) => __awaiter(this, void 0, void 0,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ixNQUFNLENBQUMsTUFBTSxZQUFZLEVBQUUsQ0FBQTtRQUM3QixLQUFLLEtBQUs7WUFDUixNQUFNLENBQUMsTUFBTSxHQUFHLEVBQUUsQ0FBQTtRQUNwQjtZQUNFLEtBQUssQ0FBQTtJQUNULENBQUM7QUFDSCxDQUFDLENBQUEsQ0FBQSJ9 \ No newline at end of file diff --git a/dist/mod_prepare/mod.plugins.d.ts b/dist/mod_prepare/mod.plugins.d.ts new file mode 100644 index 0000000..27d1e74 --- /dev/null +++ b/dist/mod_prepare/mod.plugins.d.ts @@ -0,0 +1 @@ +export * from '../npmci.plugins'; diff --git a/dist/mod_prepare/mod.plugins.js b/dist/mod_prepare/mod.plugins.js new file mode 100644 index 0000000..dd93cd9 --- /dev/null +++ b/dist/mod_prepare/mod.plugins.js @@ -0,0 +1,7 @@ +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("../npmci.plugins")); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9tb2RfcHJlcGFyZS9tb2QucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLHNDQUFnQyJ9 \ No newline at end of file diff --git a/dist/mod_publish/index.d.ts b/dist/mod_publish/index.d.ts index 2460c9d..a832aa8 100644 --- a/dist/mod_publish/index.d.ts +++ b/dist/mod_publish/index.d.ts @@ -1,3 +1,4 @@ +import { Dockerfile } from '../mod_docker/index'; /** * type of supported services */ @@ -6,4 +7,4 @@ export declare type TPubService = 'npm' | 'docker'; * the main exported publish function. * @param pubServiceArg references targeted service to publish to */ -export declare let publish: (pubServiceArg?: TPubService) => Promise; +export declare let publish: (pubServiceArg?: TPubService) => Promise; diff --git a/dist/mod_publish/index.js b/dist/mod_publish/index.js index 74dd644..f4aa5df 100644 --- a/dist/mod_publish/index.js +++ b/dist/mod_publish/index.js @@ -8,10 +8,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); -const plugins = require("./npmci.plugins"); -const npmci_prepare_1 = require("./npmci.prepare"); -const npmci_bash_1 = require("./npmci.bash"); -const NpmciBuildDocker = require("./npmci.build.docker"); +const plugins = require("./mod.plugins"); +const npmci_bash_1 = require("../npmci.bash"); +const npmciMods = require("../npmci.mods"); /** * the main exported publish function. * @param pubServiceArg references targeted service to publish to @@ -28,23 +27,21 @@ exports.publish = (pubServiceArg = 'npm') => __awaiter(this, void 0, void 0, fun * tries to publish current cwd to NPM registry */ let publishNpm = () => __awaiter(this, void 0, void 0, function* () { - yield npmci_prepare_1.prepare('npm') - .then(function () { - return __awaiter(this, void 0, void 0, function* () { - yield npmci_bash_1.bash('npm publish'); - plugins.beautylog.ok('Done!'); - }); - }); + let modPrepare = yield npmciMods.modPrepare.load(); + yield modPrepare.prepare('npm'); + yield npmci_bash_1.bash('npm publish'); + plugins.beautylog.ok('Done!'); }); /** * tries to publish current cwd to Docker registry */ let publishDocker = () => __awaiter(this, void 0, void 0, function* () { - return yield NpmciBuildDocker.readDockerfiles() - .then(NpmciBuildDocker.pullDockerfileImages) - .then(NpmciBuildDocker.pushDockerfiles) + let modDocker = yield npmciMods.modDocker.load(); + return yield modDocker.readDockerfiles() + .then(modDocker.pullDockerfileImages) + .then(modDocker.pushDockerfiles) .then(dockerfileArray => { return dockerfileArray; }); }); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9tb2RfcHVibGlzaC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUEsMkNBQTBDO0FBQzFDLG1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FDLGVBQWUsQ0FBQztTQUMvQixJQUFJLENBQUMsZUFBZTtRQUNuQixNQUFNLENBQUMsZUFBZSxDQUFBO0lBQ3hCLENBQUMsQ0FBQyxDQUFBO0FBQ04sQ0FBQyxDQUFBLENBQUEifQ== \ No newline at end of file diff --git a/dist/mod_publish/mod.plugins.d.ts b/dist/mod_publish/mod.plugins.d.ts new file mode 100644 index 0000000..27d1e74 --- /dev/null +++ b/dist/mod_publish/mod.plugins.d.ts @@ -0,0 +1 @@ +export * from '../npmci.plugins'; diff --git a/dist/mod_publish/mod.plugins.js b/dist/mod_publish/mod.plugins.js new file mode 100644 index 0000000..0e9c462 --- /dev/null +++ b/dist/mod_publish/mod.plugins.js @@ -0,0 +1,7 @@ +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("../npmci.plugins")); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9tb2RfcHVibGlzaC9tb2QucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLHNDQUFnQyJ9 \ No newline at end of file diff --git a/dist/npmci.test.d.ts b/dist/mod_test/index.d.ts similarity index 52% rename from dist/npmci.test.d.ts rename to dist/mod_test/index.d.ts index d48a647..abd7196 100644 --- a/dist/npmci.test.d.ts +++ b/dist/mod_test/index.d.ts @@ -1 +1,5 @@ +/** + * the main test function + * @param versionArg + */ export declare let test: (versionArg: any) => Promise; diff --git a/dist/mod_test/index.js b/dist/mod_test/index.js new file mode 100644 index 0000000..30d1dd8 --- /dev/null +++ b/dist/mod_test/index.js @@ -0,0 +1,48 @@ +"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("./mod.plugins"); +const npmci_bash_1 = require("../npmci.bash"); +const npmciMods = require("../npmci.mods"); +let npmDependencies = () => __awaiter(this, void 0, void 0, function* () { + plugins.beautylog.info('now installing dependencies:'); + if (yield npmci_bash_1.yarnAvailable.promise) { + yield npmci_bash_1.bash('yarn upgrade'); + } + else { + yield npmci_bash_1.bash('npm install'); + } +}); +let npmTest = () => __awaiter(this, void 0, void 0, function* () { + plugins.beautylog.info('now starting tests:'); + yield npmci_bash_1.bash('npm test'); +}); +let testDocker = () => __awaiter(this, void 0, void 0, function* () { + let modDocker = yield npmciMods.modDocker.load(); + return yield modDocker.readDockerfiles() + .then(modDocker.pullDockerfileImages) + .then(modDocker.testDockerfiles); +}); +/** + * the main test function + * @param versionArg + */ +exports.test = (versionArg) => __awaiter(this, void 0, void 0, function* () { + if (versionArg === 'docker') { + yield testDocker(); + } + else { + let modInstall = yield npmciMods.modInstall.load(); + yield modInstall.install(versionArg) + .then(npmDependencies) + .then(npmTest); + } +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9tb2RfdGVzdC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUEseUNBQXdDO0FBQ3hDLDhDQUFtRDtBQUVuRCwyQ0FBMEM7QUFLMUMsSUFBSSxlQUFlLEdBQUc7SUFDcEIsT0FBTyxDQUFDLFNBQVMsQ0FBQyxJQUFJLENBQUMsOEJBQThCLENBQUMsQ0FBQ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MsVUFBVSxDQUFDO2FBQ2pDLElBQUksQ0FBQyxlQUFlLENBQUM7YUFDckIsSUFBSSxDQUFDLE9BQU8sQ0FBQyxDQUFBO0lBQ2xCLENBQUM7QUFDSCxDQUFDLENBQUEsQ0FBQSJ9 \ No newline at end of file diff --git a/dist/mod_test/mod.plugins.d.ts b/dist/mod_test/mod.plugins.d.ts new file mode 100644 index 0000000..27d1e74 --- /dev/null +++ b/dist/mod_test/mod.plugins.d.ts @@ -0,0 +1 @@ +export * from '../npmci.plugins'; diff --git a/dist/mod_test/mod.plugins.js b/dist/mod_test/mod.plugins.js new file mode 100644 index 0000000..3002522 --- /dev/null +++ b/dist/mod_test/mod.plugins.js @@ -0,0 +1,7 @@ +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("../npmci.plugins")); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9tb2RfdGVzdC9tb2QucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLHNDQUFnQyJ9 \ No newline at end of file diff --git a/dist/mod_trigger/index.js b/dist/mod_trigger/index.js index 49e0ddb..bd2c197 100644 --- a/dist/mod_trigger/index.js +++ b/dist/mod_trigger/index.js @@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); -const plugins = require("./npmci.plugins"); +const plugins = require("./mod.plugins"); let triggerValueRegex = /^([a-zA-Z0-9\.]*)\|([a-zA-Z0-9\.]*)\|([a-zA-Z0-9\.]*)\|([a-zA-Z0-9\.]*)\|?([a-zA-Z0-9\.\-\/]*)/; exports.trigger = () => __awaiter(this, void 0, void 0, function* () { plugins.beautylog.info('now running triggers'); @@ -29,6 +29,7 @@ let evaluateTrigger = (triggerEnvVarArg) => __awaiter(this, void 0, void 0, func } plugins.beautylog.info('Found Trigger!'); plugins.beautylog.log('triggering build for ref ' + regexRefName + ' of ' + regexTriggerName); - plugins.request.post('https://gitlab.com/api/v3/projects/' + regexProjectId + '/trigger/builds', { form: { token: regexProjectTriggerToken, ref: regexRefName } }); + plugins.request.post('https://gitlab.com/api/v3/projects/' + regexProjectId + '/trigger/builds', { form: { token: regexProjectTriggerToken, ref: regexRefName } + }); }); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9tb2RfdHJpZ2dlci9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUEsMkNBQTBDO0FBSTFDLElBQUksaUJBQWlCLEdBQUcsZ0dBQWdHLENBQUE7QUFFN0csUUFBQSxPQUFPLEdBQUc7SUFDbkIsT0FBTyxDQUFDLFNBQVMsQ0FBQyxJQUFJLENBQUMsc0JBQXNCLENBQUMsQ0FBQTtJQUM5QyxPQUFPLENBQUMsVUFBVSxDQUFDLGdCQUFnQixDQUFDLE9BQU8sQ0FBQyxHQUFHLEVBQUUsaUJBQWlCLEVBQUUsZUFBZSxDQUFDLENBQUE7QUFDdEYsQ0FBQyxDQUFBLENBQUE7QUFFRCxJQUFJLGVBQWUsR0FBRyxDQUFPLGdCQUFnQjtJQUMzQyxJQUFJLHVCQUF1QixHQUFHLGlCQUFpQixDQUFDLElBQUksQ0FBQyxnQkFBZ0IsQ0FBQyxDQUFBO0lBQ3RFLElBQUksV0FBVyxHQUFHLHVCQUF1QixDQUFDLENBQUMsQ0FBQyxDQUFBO0lBQzVDLElBQUksY0FBYyxHQUFHLHVCQUF1QixDQUFDLENBQUMsQ0FBQyxDQUFBO0lBQy9DLElBQUksd0JBQXdCLEdBQU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QUcsTUFBTSxHQUFHLGdCQUFnQixDQUFDLENBQUE7SUFDN0YsT0FBTyxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQ2xCLHFDQUFxQyxHQUFHLGNBQWMsR0FBRyxpQkFBaUIsRUFDMUUsRUFBRSxJQUFJLEVBQUUsRUFBRSxLQUFLLEVBQUUsd0JBQXdCLEVBQUUsR0FBRyxFQUFFLFlBQVksRUFBRTtLQUMvRCxDQUFDLENBQUE7QUFDSixDQUFDLENBQUEsQ0FBQSJ9 \ No newline at end of file diff --git a/dist/mod_trigger/mod.plugins.d.ts b/dist/mod_trigger/mod.plugins.d.ts new file mode 100644 index 0000000..27d1e74 --- /dev/null +++ b/dist/mod_trigger/mod.plugins.d.ts @@ -0,0 +1 @@ +export * from '../npmci.plugins'; diff --git a/dist/mod_trigger/mod.plugins.js b/dist/mod_trigger/mod.plugins.js new file mode 100644 index 0000000..f9110f4 --- /dev/null +++ b/dist/mod_trigger/mod.plugins.js @@ -0,0 +1,7 @@ +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("../npmci.plugins")); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9tb2RfdHJpZ2dlci9tb2QucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLHNDQUFnQyJ9 \ No newline at end of file diff --git a/dist/npmci.cli.js b/dist/npmci.cli.js index 6575017..17f5f80 100644 --- a/dist/npmci.cli.js +++ b/dist/npmci.cli.js @@ -12,7 +12,6 @@ const plugins = require("./npmci.plugins"); const paths = require("./npmci.paths"); let npmciInfo = new plugins.projectinfo.ProjectinfoNpm(paths.NpmciPackageRoot); plugins.beautylog.log('npmci version: ' + npmciInfo.version); -const npmci_test_1 = require("./npmci.test"); const NpmciEnv = require("./npmci.env"); const npmciMods = require("./npmci.mods"); let smartcli = new plugins.smartcli.Smartcli(); @@ -32,7 +31,7 @@ smartcli.addCommand('clean') .then((argv) => __awaiter(this, void 0, void 0, function* () { let modClean = yield npmciMods.modClean.load(); yield modClean.clean(); - NpmciEnv.configStore(); + yield NpmciEnv.configStore(); })).catch(err => { console.log(err); process.exit(1); @@ -41,7 +40,7 @@ smartcli.addCommand('clean') smartcli.addCommand('command') .then((argv) => __awaiter(this, void 0, void 0, function* () { let modCommand = yield npmciMods.modCommand.load(); - modCommand.command(); + yield modCommand.command(); yield NpmciEnv.configStore(); })).catch(err => { console.log(err); @@ -49,48 +48,53 @@ smartcli.addCommand('command') }); // install smartcli.addCommand('install') - .then((argv) => { - install(argv._[1]) - .then(NpmciEnv.configStore) - .catch(err => { - console.log(err); - process.exit(1); - }); + .then((argv) => __awaiter(this, void 0, void 0, function* () { + let modInstall = yield npmciMods.modInstall.load(); + yield modInstall.install(argv._[1]); + yield NpmciEnv.configStore(); +})).catch(err => { + console.log(err); + process.exit(1); }); // prepare smartcli.addCommand('prepare') - .then((argv) => { - prepare(argv._[1]) - .then(NpmciEnv.configStore) - .catch(err => { - console.log(err); - process.exit(1); - }); + .then((argv) => __awaiter(this, void 0, void 0, function* () { + let modPrepare = yield npmciMods.modPrepare.load(); + yield modPrepare.prepare(argv._[1]); + yield NpmciEnv.configStore(); +})).catch(err => { + console.log(err); + process.exit(1); }); // publish smartcli.addCommand('publish') - .then((argv) => { - publish(argv._[1]) - .then(NpmciEnv.configStore) - .catch(err => { - console.log(err); - process.exit(1); - }); + .then((argv) => __awaiter(this, void 0, void 0, function* () { + let modPublish = yield npmciMods.modPublish.load(); + yield modPublish.publish(argv._[1]); + yield NpmciEnv.configStore(); +})).catch(err => { + console.log(err); + process.exit(1); }); // test smartcli.addCommand('test') - .then((argv) => { - npmci_test_1.test(argv._[1]) - .then(NpmciEnv.configStore) - .catch(err => { - console.log(err); - process.exit(1); - }); + .then((argv) => __awaiter(this, void 0, void 0, function* () { + let modTest = yield npmciMods.modTest.load(); + yield modTest.test(argv._[1]); + yield NpmciEnv.configStore(); +})).catch(err => { + console.log(err); + process.exit(1); }); // trigger smartcli.addCommand('trigger') - .then((argv) => { - trigger(); + .then((argv) => __awaiter(this, void 0, void 0, function* () { + let modTrigger = yield npmciMods.modTrigger.load(); + yield modTrigger.trigger(); + yield NpmciEnv.configStore(); +})).catch(err => { + console.log(err); + process.exit(1); }); smartcli.startParse(); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kuY2xpLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvbnBtY2kuY2xpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSwyQ0FBMEM7QUFDMUMsdUNBQXNDO0FBQ3RDLElBQUksU0FBUyxHQUFHLElBQUksT0FBTyxDQUFDLFdBQVcsQ0FBQyxjQUFjLENBQUMsS0FBSyxDQUFDLGdCQUFnQixDQUFDLENBQUE7QUFDOUUsT0FBTyxDQUFDLFNBQVMsQ0FBQyxHQUFHLENBQUMsaUJBQWlCLEdBQUcsU0FBUyxDQUFDLE9BQU8sQ0FBQyxDQUFBO0FBRzVELDZDQUFtQztBQUNuQyx3Q0FBdUM7QUFFdkMsMENBQXlDO0FBRXpDLElBQUksUUFBUSxHQUFHLElBQUksT0FBTyxDQUFDLFFBQVEsQ0FBQyxRQUFRLEVBQUUsQ0FBQTtBQUM5QyxRQUFRLENBQUMsVUFBVSxDQUFDLFNBQVMsQ0FBQyxPQUFPLENBQUMsQ0FBQTtBQUV0QyxRQUFRO0FBQ1IsUUFBUSxDQUFDLFVBQVUsQ0FBQyxPQUFPLENBQUM7S0FDekIsSUFBSSxDQUFDLENBQU8sSUFBSTtJQUNmLElBQUksUUFBUSxHQUFHLE1BQU0sU0FBUyxDQUFDLFF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UksRUFBRSxDQUFBO0lBQ2xELE1BQU0sVUFBVSxDQUFDLE9BQU8sRUFBRSxDQUFBO0lBQzFCLE1BQU0sUUFBUSxDQUFDLFdBQVcsRUFBRSxDQUFBO0FBQzlCLENBQUMsQ0FBQSxDQUFDLENBQUMsS0FBSyxDQUFDLEdBQUc7SUFDVixPQUFPLENBQUMsR0FBRyxDQUFDLEdBQUcsQ0FBQyxDQUFBO0lBQ2hCLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUE7QUFDakIsQ0FBQyxDQUFDLENBQUE7QUFFSixRQUFRLENBQUMsVUFBVSxFQUFFLENBQUEifQ== \ No newline at end of file diff --git a/dist/npmci.env.d.ts b/dist/npmci.env.d.ts index 7511b4c..7b6ee31 100644 --- a/dist/npmci.env.d.ts +++ b/dist/npmci.env.d.ts @@ -1,5 +1,5 @@ import { GitRepo } from 'smartstring'; -import { Dockerfile } from './npmci.build.docker'; +import { Dockerfile } from './mod_docker/index'; export declare let repo: GitRepo; export declare let buildStage: string; export declare let dockerRegistry: string; @@ -8,8 +8,8 @@ export declare let dockerFilesBuilt: Dockerfile[]; export declare let dockerFiles: Dockerfile[]; export declare let config: { dockerRegistry: any; - dockerFilesBuilt: any[]; - dockerFiles: any[]; + dockerFilesBuilt: Dockerfile[]; + dockerFiles: Dockerfile[]; project: any; }; -export declare let configStore: () => void; +export declare let configStore: () => Promise; diff --git a/dist/npmci.env.js b/dist/npmci.env.js index 29085ae..fa8dcd6 100644 --- a/dist/npmci.env.js +++ b/dist/npmci.env.js @@ -1,4 +1,12 @@ "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("./npmci.plugins"); const paths = require("./npmci.paths"); @@ -18,10 +26,10 @@ exports.config = { dockerFiles: exports.dockerFiles, project: undefined }; -exports.configStore = () => { +exports.configStore = () => __awaiter(this, void 0, void 0, function* () { exports.config.dockerRegistry = exports.dockerRegistry; plugins.smartfile.memory.toFsSync(JSON.stringify(exports.config), paths.NpmciPackageConfig); -}; +}); let configLoad = () => { // internal config to transfer information in between npmci shell calls try { @@ -46,4 +54,4 @@ let configLoad = () => { exports.config.dockerFilesBuilt ? exports.dockerFilesBuilt = exports.config.dockerFilesBuilt : void (0); }; configLoad(); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kuZW52LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvbnBtY2kuZW52LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsMkNBQTBDO0FBQzFDLHVDQUFzQztBQUN0Qyw2Q0FBcUM7QUFJckMsRUFBRSxDQUFDLENBQUMsT0FBTyxDQUFDLEdBQUcsQ0FBQyxpQkFBaUIsQ0FBQyxDQUFDLENBQUM7SUFDbEMsWUFBSSxHQUFHLElBQUkscUJBQU8sQ0FBQyxPQUFPLENBQUMsR0FBRyxDQUFDLGlCQUFpQixDQUFDLENBQUE7QUFDbkQsQ0FBQztBQUVVLFFBQUEsVUFBVSxHQUFXLE9BQU8sQ0FBQyxHQUFHLENBQUMsY0FBYyxDQUFBO0FBSS9DLFFBQUEsaUJBQWlCLEdBQUcsQ0FBQyxpQkFBeUI7SUFDdkQsc0JBQWMsR0FBRyxpQkFBaUIsQ0FBQTtBQUNwQyxDQUFDLENBQUE7QUFDVSxRQUFBLGdCQUFnQixHQUFpQixFQUFFLENBQUE7QUFDbkMsUUFBQSxXQUFXLEdBQWlCLEVBQUUsQ0FBQTtBQUM5QixRQUFBL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UFDLENBQUE7SUFDOUMsQ0FBQztJQUVELGlCQUFpQjtJQUNqQixJQUFJLENBQUM7UUFDSCxFQUFFLENBQUMsQ0FBQyxDQUFDLGNBQU0sQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDO1lBQ3BCLGNBQU0sQ0FBQyxPQUFPLEdBQUcsT0FBTyxDQUFDLFNBQVMsQ0FBQyxFQUFFLENBQUMsWUFBWSxDQUFDLEtBQUssQ0FBQyxlQUFlLEVBQUUsWUFBWSxDQUFDLENBQUE7WUFDdkYsT0FBTyxDQUFDLFNBQVMsQ0FBQyxFQUFFLENBQUMsdUJBQXVCLENBQUMsQ0FBQTtRQUMvQyxDQUFDO0lBQ0gsQ0FBQztJQUFDLEtBQUssQ0FBQyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUM7UUFDYixjQUFNLENBQUMsT0FBTyxHQUFHLEVBQUUsQ0FBQTtRQUNuQixPQUFPLENBQUMsU0FBUyxDQUFDLEdBQUcsQ0FBQyxnRUFBZ0UsQ0FBQyxDQUFBO0lBQ3pGLENBQUM7SUFFRCxjQUFNLENBQUMsY0FBYyxHQUFHLHNCQUFjLEdBQUcsY0FBTSxDQUFDLGNBQWMsR0FBRyxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUE7SUFDekUsY0FBTSxDQUFDLGdCQUFnQixHQUFHLHdCQUFnQixHQUFHLGNBQU0sQ0FBQyxnQkFBZ0IsR0FBRyxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUE7QUFDakYsQ0FBQyxDQUFBO0FBQ0QsVUFBVSxFQUFFLENBQUEifQ== \ No newline at end of file diff --git a/dist/npmci.mods.d.ts b/dist/npmci.mods.d.ts index 2162f9f..23e56da 100644 --- a/dist/npmci.mods.d.ts +++ b/dist/npmci.mods.d.ts @@ -6,6 +6,7 @@ import * as _modInstall from './mod_install/index'; import * as _modPublish from './mod_publish/index'; import * as _modPrepare from './mod_prepare/index'; import * as _modTrigger from './mod_trigger/index'; +import * as _modTest from './mod_test/index'; import { LazyModule } from 'smartsystem'; export declare let modBuild: LazyModule; export declare let modClean: LazyModule; @@ -15,3 +16,4 @@ export declare let modInstall: LazyModule; export declare let modPublish: LazyModule; export declare let modPrepare: LazyModule; export declare let modTrigger: LazyModule; +export declare let modTest: LazyModule; diff --git a/dist/npmci.mods.js b/dist/npmci.mods.js index 0651238..d3f1d13 100644 --- a/dist/npmci.mods.js +++ b/dist/npmci.mods.js @@ -9,4 +9,5 @@ exports.modInstall = new smartsystem_1.LazyModule('./mod_install/index', __dirna exports.modPublish = new smartsystem_1.LazyModule('./mod_publish/index', __dirname); exports.modPrepare = new smartsystem_1.LazyModule('./mod_prepare/index', __dirname); exports.modTrigger = new smartsystem_1.LazyModule('./mod_trigger/index', __dirname); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kubW9kcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL25wbWNpLm1vZHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFTQSw2Q0FBd0M7QUFFN0IsUUFBQSxRQUFRLEdBQUcsSUFBSSx3QkFBVSxDQUFtQixtQkFBbUIsRUFBRSxTQUFTLENBQUMsQ0FBQTtBQUMzRSxRQUFBLFFBQVEsR0FBRyxJQUFJLHdCQUFVLENBQW1CLG1CQUFtQixFQUFFLFNBQVMsQ0FBQyxDQUFBO0FBQzNFLFFBQUEsVUFBVSxHQUFHLElBQUksd0JBQVUsQ0FBcUIscUJBQXFCLEVBQUUsU0FBUyxDQUFDLENBQUE7QUFDakYsUUFBQSxTQUFTLEdBQUcsSUFBSSx3QkFBVSxDQUFvQixvQkFBb0IsRUFBRSxTQUFTLENBQUMsQ0FBQTtBQUM5RSxRQUFBLFVBQVUsR0FBRyxJQUFJLHdCQUFVLENBQXFCLHFCQUFxQixFQUFFLFNBQVMsQ0FBQyxDQUFBO0FBQ2pGLFFBQUEsVUFBVSxHQUFHLElBQUksd0JBQVUsQ0FBcUIscUJBQXFCLEVBQUUsU0FBUyxDQUFDLENBQUE7QUFDakYsUUFBQSxVQUFVLEdBQUcsSUFBSSx3QkFBVSxDQUFxQixxQkFBcUIsRUFBRSxTQUFTLENBQUMsQ0FBQTtBQUNqRixRQUFBLFVBQVUsR0FBRyxJQUFJLHdCQUFVLENBQXFCLHFCQUFxQixFQUFFLFNBQVMsQ0FBQyxDQUFBIn0= \ No newline at end of file +exports.modTest = new smartsystem_1.LazyModule('./mod_test/index', __dirname); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kubW9kcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL25wbWNpLm1vZHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFVQSw2Q0FBd0M7QUFFN0IsUUFBQSxRQUFRLEdBQUcsSUFBSSx3QkFBVSxDQUFtQixtQkFBbUIsRUFBRSxTQUFTLENBQUMsQ0FBQTtBQUMzRSxRQUFBLFFBQVEsR0FBRyxJQUFJLHdCQUFVLENBQW1CLG1CQUFtQixFQUFFLFNBQVMsQ0FBQyxDQUFBO0FBQzNFLFFBQUEsVUFBVSxHQUFHLElBQUksd0JBQVUsQ0FBcUIscUJBQXFCLEVBQUUsU0FBUyxDQUFDLENBQUE7QUFDakYsUUFBQSxTQUFTLEdBQUcsSUFBSSx3QkFBVSxDQUFvQixvQkFBb0IsRUFBRSxTQUFTLENBQUMsQ0FBQTtBQUM5RSxRQUFBLFVBQVUsR0FBRyxJQUFJLHdCQUFVLENBQXFCLHFCQUFxQixFQUFFLFNBQVMsQ0FBQyxDQUFBO0FBQ2pGLFFBQUEsVUFBVSxHQUFHLElBQUksd0JBQVUsQ0FBcUIscUJBQXFCLEVBQUUsU0FBUyxDQUFDLENBQUE7QUFDakYsUUFBQSxVQUFVLEdBQUcsSUFBSSx3QkFBVSxDQUFxQixxQkFBcUIsRUFBRSxTQUFTLENBQUMsQ0FBQTtBQUNqRixRQUFBLFVBQVUsR0FBRyxJQUFJLHdCQUFVLENBQXFCLHFCQUFxQixFQUFFLFNBQVMsQ0FBQyxDQUFBO0FBQ2pGLFFBQUEsT0FBTyxHQUFHLElBQUksd0JBQVUsQ0FBa0Isa0JBQWtCLEVBQUMsU0FBUyxDQUFDLENBQUEifQ== \ No newline at end of file diff --git a/dist/npmci.ssh.js b/dist/npmci.ssh.js index 0c804d9..4c16706 100644 --- a/dist/npmci.ssh.js +++ b/dist/npmci.ssh.js @@ -11,6 +11,12 @@ Object.defineProperty(exports, "__esModule", { value: true }); const plugins = require("./npmci.plugins"); let sshRegex = /^(.*)\|(.*)\|(.*)/; let sshInstance; +/** + * checks if not undefined + */ +let notUndefined = (stringArg) => { + return (stringArg && stringArg !== 'undefined' && stringArg !== '##'); +}; /** * checks for ENV vars in form of NPMCI_SSHKEY_* and deploys any found ones */ @@ -49,10 +55,4 @@ let evaluateSshEnv = (sshkeyEnvVarArg) => __awaiter(this, void 0, void 0, functi sshInstance.addKey(sshKey); return; }); -/** - * checks if not undefined - */ -let notUndefined = (stringArg) => { - return (stringArg && stringArg !== 'undefined' && stringArg !== '##'); -}; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kuc3NoLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvbnBtY2kuc3NoLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSwyQ0FBMEM7QUFFMUMsSUFBSSxRQUFRLEdBQUcsbUJBQW1CLENBQUE7QUFDbEMsSUFBSSxXQUF5QyxDQUFBO0FBRTdDOztHQUVHO0FBQ1EsUUFBQSxHQUFHLEdBQUc7SUFDZixXQUFXLEdBQUcsSUFBSSxPQUFPLENBQUMsUUFBUSxDQUFDLFdBQVcsRUFBRSxDQUFBLENBQUMsb0JBQW9C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0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQ2pDLE9BQU8sQ0FBQyxTQUFTLENBQUMsR0FBRyxDQUFDLG9CQUFvQixDQUFDLENBQUE7UUFDM0MsTUFBTSxDQUFDLElBQUksR0FBRyxXQUFXLENBQUMsQ0FBQyxDQUFDLENBQUE7SUFDOUIsQ0FBQztJQUNELEVBQUUsQ0FBQyxDQUFDLFlBQVksQ0FBQyxXQUFXLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUM7UUFDakMsT0FBTyxDQUFDLFNBQVMsQ0FBQyxHQUFHLENBQUMsdUJBQXVCLENBQUMsQ0FBQTtRQUM5QyxNQUFNLENBQUMsYUFBYSxHQUFHLFdBQVcsQ0FBQyxDQUFDLENBQUMsQ0FBQTtJQUN2QyxDQUFDO0lBQUEsQ0FBQztJQUNGLEVBQUUsQ0FBQyxDQUFDLFlBQVksQ0FBQyxXQUFXLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUM7UUFDakMsc0JBQXNCLENBQUE7UUFDdEIsTUFBTSxDQUFDLFlBQVksR0FBRyxXQUFXLENBQUMsQ0FBQyxDQUFDLENBQUE7SUFDdEMsQ0FBQztJQUFBLENBQUM7SUFFRixXQUFXLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxDQUFBO0lBQzFCLE1BQU0sQ0FBQTtBQUNSLENBQUMsQ0FBQSxDQUFBIn0= \ No newline at end of file diff --git a/dist/npmci.test.js b/dist/npmci.test.js deleted file mode 100644 index 3204e2d..0000000 --- a/dist/npmci.test.js +++ /dev/null @@ -1,43 +0,0 @@ -"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("./npmci.plugins"); -const npmci_bash_1 = require("./npmci.bash"); -const npmci_install_1 = require("./npmci.install"); -const NpmciBuildDocker = require("./npmci.build.docker"); -exports.test = (versionArg) => __awaiter(this, void 0, void 0, function* () { - if (versionArg === 'docker') { - yield testDocker(); - } - else { - yield npmci_install_1.install(versionArg) - .then(npmDependencies) - .then(npmTest); - } -}); -let npmDependencies = () => __awaiter(this, void 0, void 0, function* () { - plugins.beautylog.info('now installing dependencies:'); - if (yield npmci_bash_1.yarnAvailable.promise) { - yield npmci_bash_1.bash('yarn upgrade'); - } - else { - yield npmci_bash_1.bash('npm install'); - } -}); -let npmTest = () => __awaiter(this, void 0, void 0, function* () { - plugins.beautylog.info('now starting tests:'); - yield npmci_bash_1.bash('npm test'); -}); -let testDocker = () => __awaiter(this, void 0, void 0, function* () { - return yield NpmciBuildDocker.readDockerfiles() - .then(NpmciBuildDocker.pullDockerfileImages) - .then(NpmciBuildDocker.testDockerfiles); -}); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kudGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL25wbWNpLnRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBLDJDQUEwQztBQUMxQyw2Q0FBa0Q7QUFDbEQsbURBQXlDO0FBRXpDLHlEQUF3RDtBQUU3QyxRQUFBLElBQUksR0FBRyxDQUFPLFVBQVU7SUFDakMsRUFBRSxDQUFDLENBQUMsVUFBVSxLQUFLLFFBQVEsQ0FBQyxDQUFDLENBQUM7UUFDNUIsTUFBTSxVQUFVLEVBQUUsQ0FBQTtJQUNwQixDQUFDO0lBQUMsSUFBSSxDQUFDLENBQUM7UUFDTixNQUFNLHVCQUFPLENBQUMsVUFBVSxDQUFDO2FBQ3RCLElBQUksQ0FBQyxlQUFlLENBQUM7YUFDckIsSUFBSSxDQUFDLE9BQU8sQ0FBQyxDQUFBO0lBQ2xCLENBQUM7QUFDSCxDQUFDLENBQUEsQ0FBQTtBQUVELElBQUksZUFBZSxHQUFHO0lBQ3BCLE9BQU8sQ0FBQyxTQUFTLENBQUMsSUFBSSxDQUFDLDhCQUE4QixDQUFDLENBQUE7SUFDdEQsRUFBRSxDQUFDLENBQUMsTUFBTSwwQkFBYSxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUM7UUFDaEMsTUFBTSxpQkFBSSxDQUFDLGNBQWMsQ0FBQyxDQUFBO0lBQzVCLENBQUM7SUFBQyxJQUFJLENBQUMsQ0FBQztRQUNOLE1BQU0saUJBQUksQ0FBQyxhQUFhLENBQUMsQ0FBQTtJQUMzQixDQUFDO0FBQ0gsQ0FBQyxDQUFBLENBQUE7QUFFRCxJQUFJLE9BQU8sR0FBRztJQUNaLE9BQU8sQ0FBQyxTQUFTLENBQUMsSUFBSSxDQUFDLHFCQUFxQixDQUFDLENBQUE7SUFDN0MsTUFBTSxpQkFBSSxDQUFDLFVBQVUsQ0FBQyxDQUFBO0FBQ3hCLENBQUMsQ0FBQSxDQUFBO0FBRUQsSUFBSSxVQUFVLEdBQUc7SUFDZixNQUFNLENBQUMsTUFBTSxnQkFBZ0IsQ0FBQyxlQUFlLEVBQUU7U0FDNUMsSUFBSSxDQUFDLGdCQUFnQixDQUFDLG9CQUFvQixDQUFDO1NBQzNDLElBQUksQ0FBQyxnQkFBZ0IsQ0FBQyxlQUFlLENBQUMsQ0FBQTtBQUMzQyxDQUFDLENBQUEsQ0FBQSJ9 \ No newline at end of file diff --git a/test/test.ts b/test/test.ts index 63cea79..43a8a6c 100644 --- a/test/test.ts +++ b/test/test.ts @@ -10,13 +10,12 @@ process.cwd = () => { } // require NPMCI files -import npmci = require('../dist/index') -import NpmciBuildDocker = require('../dist/npmci.build.docker') -import NpmciPublish = require('../dist/npmci.publish') -import NpmciTest = require('../dist/npmci.test') +import '../dist/index' +import NpmciBuildDocker = require('../dist/mod_docker/index') +import NpmciPublish = require('../dist/mod_publish/index') +import NpmciTest = require('../dist/mod_test/index') import NpmciSsh = require('../dist/npmci.ssh') - let dockerfile1: NpmciBuildDocker.Dockerfile let dockerfile2: NpmciBuildDocker.Dockerfile let sortableArray: NpmciBuildDocker.Dockerfile[] diff --git a/ts/mod_command/index.ts b/ts/mod_command/index.ts index 8376f2a..4d147c3 100644 --- a/ts/mod_command/index.ts +++ b/ts/mod_command/index.ts @@ -1,5 +1,5 @@ -import * as plugins from './npmci.plugins' -import { bash } from './npmci.bash' +import * as plugins from './mod.plugins' +import { bash } from '../npmci.bash' export let command = async () => { let wrappedCommand: string = '' diff --git a/ts/mod_command/mod.plugins.ts b/ts/mod_command/mod.plugins.ts new file mode 100644 index 0000000..f9883a8 --- /dev/null +++ b/ts/mod_command/mod.plugins.ts @@ -0,0 +1 @@ +export * from '../npmci.plugins' diff --git a/ts/mod_install/index.ts b/ts/mod_install/index.ts index 56769ae..98fd6a2 100644 --- a/ts/mod_install/index.ts +++ b/ts/mod_install/index.ts @@ -1,10 +1,10 @@ -import * as plugins from './npmci.plugins' -import * as configModule from './npmci.config' +import * as plugins from './mod.plugins' +import * as configModule from '../npmci.config' import { bash, bashNoError, nvmAvailable, - yarnAvailable } from './npmci.bash' + yarnAvailable } from '../npmci.bash' /** * Install a specific version of node diff --git a/ts/mod_install/mod.plugins.ts b/ts/mod_install/mod.plugins.ts new file mode 100644 index 0000000..f9883a8 --- /dev/null +++ b/ts/mod_install/mod.plugins.ts @@ -0,0 +1 @@ +export * from '../npmci.plugins' diff --git a/ts/mod_prepare/index.ts b/ts/mod_prepare/index.ts index 4c50413..80427d6 100644 --- a/ts/mod_prepare/index.ts +++ b/ts/mod_prepare/index.ts @@ -1,7 +1,7 @@ -import * as plugins from './npmci.plugins' -import { bash } from './npmci.bash' -import * as env from './npmci.env' -import * as sshModule from './npmci.ssh' +import * as plugins from './mod.plugins' +import { bash } from '../npmci.bash' +import * as env from '../npmci.env' +import * as sshModule from '../npmci.ssh' // types diff --git a/ts/mod_prepare/mod.plugins.ts b/ts/mod_prepare/mod.plugins.ts new file mode 100644 index 0000000..f9883a8 --- /dev/null +++ b/ts/mod_prepare/mod.plugins.ts @@ -0,0 +1 @@ +export * from '../npmci.plugins' diff --git a/ts/mod_publish/index.ts b/ts/mod_publish/index.ts index e08531a..c2f6f59 100644 --- a/ts/mod_publish/index.ts +++ b/ts/mod_publish/index.ts @@ -1,8 +1,12 @@ -import * as plugins from './npmci.plugins' -import { prepare } from './npmci.prepare' -import { bash } from './npmci.bash' -import * as NpmciEnv from './npmci.env' -import * as NpmciBuildDocker from './npmci.build.docker' +import * as plugins from './mod.plugins' +import { bash } from '../npmci.bash' +import * as NpmciEnv from '../npmci.env' + +import * as npmciMods from '../npmci.mods' + +// import interfaces +import { Dockerfile } from '../mod_docker/index' + /** * type of supported services @@ -26,20 +30,20 @@ export let publish = async (pubServiceArg: TPubService = 'npm') => { * tries to publish current cwd to NPM registry */ let publishNpm = async () => { - await prepare('npm') - .then(async function () { - await bash('npm publish') - plugins.beautylog.ok('Done!') - }) + let modPrepare = await npmciMods.modPrepare.load() + await modPrepare.prepare('npm') + await bash('npm publish') + plugins.beautylog.ok('Done!') } /** * tries to publish current cwd to Docker registry */ let publishDocker = async () => { - return await NpmciBuildDocker.readDockerfiles() - .then(NpmciBuildDocker.pullDockerfileImages) - .then(NpmciBuildDocker.pushDockerfiles) + let modDocker = await npmciMods.modDocker.load() + return await modDocker.readDockerfiles() + .then(modDocker.pullDockerfileImages) + .then(modDocker.pushDockerfiles) .then(dockerfileArray => { return dockerfileArray }) diff --git a/ts/mod_publish/mod.plugins.ts b/ts/mod_publish/mod.plugins.ts new file mode 100644 index 0000000..f9883a8 --- /dev/null +++ b/ts/mod_publish/mod.plugins.ts @@ -0,0 +1 @@ +export * from '../npmci.plugins' diff --git a/ts/mod_trigger/index.ts b/ts/mod_trigger/index.ts index 78df6ec..39217de 100644 --- a/ts/mod_trigger/index.ts +++ b/ts/mod_trigger/index.ts @@ -1,6 +1,5 @@ -import * as plugins from './npmci.plugins' -import { prepare } from './npmci.prepare' -import { bash } from './npmci.bash' +import * as plugins from './mod.plugins' +import { bash } from '../npmci.bash' let triggerValueRegex = /^([a-zA-Z0-9\.]*)\|([a-zA-Z0-9\.]*)\|([a-zA-Z0-9\.]*)\|([a-zA-Z0-9\.]*)\|?([a-zA-Z0-9\.\-\/]*)/ @@ -23,5 +22,8 @@ let evaluateTrigger = async (triggerEnvVarArg) => { } plugins.beautylog.info('Found Trigger!') plugins.beautylog.log('triggering build for ref ' + regexRefName + ' of ' + regexTriggerName) - plugins.request.post('https://gitlab.com/api/v3/projects/' + regexProjectId + '/trigger/builds', { form: { token: regexProjectTriggerToken, ref: regexRefName } }) + plugins.request.post( + 'https://gitlab.com/api/v3/projects/' + regexProjectId + '/trigger/builds', + { form: { token: regexProjectTriggerToken, ref: regexRefName } + }) } diff --git a/ts/mod_trigger/mod.plugins.ts b/ts/mod_trigger/mod.plugins.ts index e69de29..f9883a8 100644 --- a/ts/mod_trigger/mod.plugins.ts +++ b/ts/mod_trigger/mod.plugins.ts @@ -0,0 +1 @@ +export * from '../npmci.plugins'