add option for npm access level

This commit is contained in:
2018-04-04 22:25:13 +02:00
parent c8c17e6cba
commit 0ab1e1ab7c
70 changed files with 1977 additions and 1846 deletions

View File

@ -1,29 +1,31 @@
import * as plugins from './mod.plugins'
import * as plugins from './mod.plugins';
let npmciCflare = new plugins.cflare.CflareAccount()
let npmciCflare = new plugins.cflare.CflareAccount();
/**
* handle cli input
* @param argvArg
*/
export let handleCli = async (argvArg) => {
export let handleCli = async argvArg => {
if (argvArg._.length >= 2) {
let action: string = argvArg._[1]
let action: string = argvArg._[1];
switch (action) {
default:
plugins.beautylog.error(`>>npmci cloudflare ...<< action >>${action}<< not supported`)
process.exit(1)
plugins.beautylog.error(`>>npmci cloudflare ...<< action >>${action}<< not supported`);
process.exit(1);
}
} else {
plugins.beautylog.log(`>>npmci cloudflare ...<< cli arguments invalid... Please read the documentation.`)
process.exit(1)
plugins.beautylog.log(
`>>npmci cloudflare ...<< cli arguments invalid... Please read the documentation.`
);
process.exit(1);
}
}
};
export let purge = async (argvArg) => {
export let purge = async argvArg => {
npmciCflare.auth({
email: '',
key: ''
})
npmciCflare.purgeZone(argvArg._[1])
}
});
npmciCflare.purgeZone(argvArg._[1]);
};

View File

@ -1,7 +1,5 @@
export * from '../npmci.plugins'
export * from '../npmci.plugins';
import * as cflare from 'cflare'
import * as cflare from 'cflare';
export {
cflare
}
export { cflare };