98 lines
7.5 KiB
JavaScript
98 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");
|
|
// Get Info about npmci itself
|
|
let npmciInfo = new plugins.projectinfo.ProjectinfoNpm(paths.NpmciPackageRoot);
|
|
plugins.beautylog.log('npmci version: ' + npmciInfo.version);
|
|
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();
|
|
})).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);
|
|
})).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();
|
|
})).catch(err => {
|
|
console.log(err);
|
|
process.exit(1);
|
|
});
|
|
// command
|
|
smartcli.addCommand('git')
|
|
.then((argvArg) => __awaiter(this, void 0, void 0, function* () {
|
|
let modGit = yield npmciMods.modGit.load();
|
|
yield modGit.handleCli(argvArg);
|
|
})).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);
|
|
})).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);
|
|
})).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);
|
|
})).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);
|
|
})).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();
|
|
})).catch(err => {
|
|
console.log(err);
|
|
process.exit(1);
|
|
});
|
|
smartcli.startParse();
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kuY2xpLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvbnBtY2kuY2xpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSwyQ0FBMEM7QUFDMUMsdUNBQXNDO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