36 lines
2.5 KiB
JavaScript
36 lines
2.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("./mod.plugins");
|
|
let npmciCflare = new plugins.cflare.CflareAccount();
|
|
/**
|
|
* handle cli input
|
|
* @param argvArg
|
|
*/
|
|
exports.handleCli = (argvArg) => __awaiter(this, void 0, void 0, function* () {
|
|
if (argvArg._.length >= 2) {
|
|
let action = argvArg._[1];
|
|
switch (action) {
|
|
default:
|
|
plugins.beautylog.error(`>>npmci node ...<< action >>${action}<< not supported`);
|
|
}
|
|
}
|
|
else {
|
|
plugins.beautylog.log(`>>npmci node ...<< cli arguments invalid... Please read the documentation.`);
|
|
}
|
|
});
|
|
exports.purge = (argvArg) => __awaiter(this, void 0, void 0, function* () {
|
|
npmciCflare.auth({
|
|
email: '',
|
|
key: ''
|
|
});
|
|
npmciCflare.purgeZone(argvArg._[1]);
|
|
});
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9tb2RfY2xvdWRmbGFyZS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUEseUNBQXdDO0FBRXhDLElBQUksV0FBVyxHQUFHLElBQUksT0FBTyxDQUFDLE1BQU0sQ0FBQyxhQUFhLEVBQUUsQ0FBQTtBQUVwRDs7O0d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