2017-08-27 13:24:17 +00:00
|
|
|
"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:
|
2017-08-28 00:24:06 +00:00
|
|
|
plugins.beautylog.error(`>>npmci cloudflare ...<< action >>${action}<< not supported`);
|
2017-08-27 13:24:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
2017-08-28 00:24:06 +00:00
|
|
|
plugins.beautylog.log(`>>npmci cloudflare ...<< cli arguments invalid... Please read the documentation.`);
|
2017-08-27 13:24:17 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
exports.purge = (argvArg) => __awaiter(this, void 0, void 0, function* () {
|
|
|
|
npmciCflare.auth({
|
|
|
|
email: '',
|
|
|
|
key: ''
|
|
|
|
});
|
|
|
|
npmciCflare.purgeZone(argvArg._[1]);
|
|
|
|
});
|
2017-08-28 00:24:06 +00:00
|
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb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