UNPKG

@ycmd/creds

Version:

LSK.js CLI Creds is the easiest way to manage GitHub / Gitlab secrets and credentials

77 lines (75 loc) 1.7 kB
import { buildDeep } from './chunk-DQEMRGUC.js'; import { build } from './chunk-VEVVNYGB.js'; import { upload } from './chunk-PGUCGLUX.js'; import { Err } from '@lsk4/err'; import { createCommand } from '@ycmd/run'; import { addCwd } from '@ycmd/utils'; var creds_default = createCommand({ command: "creds <dir> [--force] [--deep] [--build] [--upload]", builder: (yargs) => yargs.options({ build: { alias: [ "b" ], describe: "build creds", type: "boolean", default: true }, upload: { alias: [ "u" ], describe: "upload creds", type: "boolean", default: false }, deep: { alias: [ "d" ], describe: "find in subdirs", type: "boolean", default: false }, force: { alias: [ "f" ], describe: "force to run", type: "boolean", default: false } }), describe: "build and/or upload creds", // meta: import.meta, async main({ cwd, argv, log }) { const rawDir = argv.dir || "."; const dirname = addCwd(rawDir, { cwd }); const { build: isBuild, upload: isUpload, deep: isDeep, force } = argv; if (isDeep) { if (isBuild) await buildDeep(dirname, { force, log }); if (isUpload) throw new Err("Not implemented mass upload"); } else { if (isBuild) await build(dirname, { force, log }); if (isUpload) await upload(dirname, { force, log }); } } }); export { creds_default }; //# sourceMappingURL=out.js.map //# sourceMappingURL=chunk-EWABUNLZ.js.map