97 lines
7.5 KiB
JavaScript
97 lines
7.5 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("./npmci.plugins");
|
|
const paths = require("./npmci.paths");
|
|
let npmciInfo = new plugins.projectinfo.ProjectinfoNpm(paths.NpmciPackageRoot);
|
|
plugins.beautylog.log('npmci version: ' + npmciInfo.version);
|
|
const NpmciEnv = require("./npmci.env");
|
|
const npmciMods = require("./npmci.mods");
|
|
let smartcli = new plugins.smartcli.Smartcli();
|
|
smartcli.addVersion(npmciInfo.version);
|
|
// clean
|
|
smartcli.addCommand('clean')
|
|
.then((argv) => __awaiter(this, void 0, void 0, function* () {
|
|
let modClean = yield npmciMods.modClean.load();
|
|
yield modClean.clean();
|
|
yield NpmciEnv.configStore();
|
|
})).catch(err => {
|
|
console.log(err);
|
|
process.exit(1);
|
|
});
|
|
// cloudflare
|
|
smartcli.addCommand('cloudflare')
|
|
.then((argvArg) => __awaiter(this, void 0, void 0, function* () {
|
|
let modPurge = yield npmciMods.modCloudflare.load();
|
|
yield modPurge.handleCli(argvArg);
|
|
yield NpmciEnv.configStore();
|
|
})).catch(err => {
|
|
console.log(err);
|
|
});
|
|
// command
|
|
smartcli.addCommand('command')
|
|
.then((argv) => __awaiter(this, void 0, void 0, function* () {
|
|
let modCommand = yield npmciMods.modCommand.load();
|
|
yield modCommand.command();
|
|
yield NpmciEnv.configStore();
|
|
})).catch(err => {
|
|
console.log(err);
|
|
process.exit(1);
|
|
});
|
|
// build
|
|
smartcli.addCommand('docker')
|
|
.then((argvArg) => __awaiter(this, void 0, void 0, function* () {
|
|
let modDocker = yield npmciMods.modDocker.load();
|
|
yield modDocker.handleCli(argvArg);
|
|
NpmciEnv.configStore();
|
|
})).catch(err => {
|
|
console.log(err);
|
|
process.exit(1);
|
|
});
|
|
// node
|
|
smartcli.addCommand('node')
|
|
.then((argvArg) => __awaiter(this, void 0, void 0, function* () {
|
|
let modNode = yield npmciMods.modNode.load();
|
|
yield modNode.handleCli(argvArg);
|
|
yield NpmciEnv.configStore();
|
|
})).catch(err => {
|
|
console.log(err);
|
|
});
|
|
// npm
|
|
smartcli.addCommand('npm')
|
|
.then((argvArg) => __awaiter(this, void 0, void 0, function* () {
|
|
let modNpm = yield npmciMods.modNpm.load();
|
|
yield modNpm.handleCli(argvArg);
|
|
yield NpmciEnv.configStore();
|
|
})).catch(err => {
|
|
console.log(err);
|
|
});
|
|
// trigger
|
|
smartcli.addCommand('ssh')
|
|
.then((argvArg) => __awaiter(this, void 0, void 0, function* () {
|
|
let modSsh = yield npmciMods.modSsh.load();
|
|
yield modSsh.handleCli(argvArg);
|
|
yield NpmciEnv.configStore();
|
|
})).catch(err => {
|
|
console.log(err);
|
|
process.exit(1);
|
|
});
|
|
// trigger
|
|
smartcli.addCommand('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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kuY2xpLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvbnBtY2kuY2xpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSwyQ0FBMEM7QUFDM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