add option for npm access level
This commit is contained in:
@ -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]);
|
||||
};
|
||||
|
@ -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 };
|
||||
|
Reference in New Issue
Block a user