UNPKG

@ycmd/creds

Version:

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

80 lines (78 loc) 1.75 kB
import { uploadDeep } from './chunk-PZ6JWXKU.js'; import { buildDeep } from './chunk-RWN64SOU.js'; import { build } from './chunk-KIJG2NK7.js'; import { upload } from './chunk-B43JFOYB.js'; 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 }, recursive: { alias: [ "r" ], 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, recursive: isDeep, force } = argv; if (isDeep) { if (isBuild) await buildDeep(dirname, { force, log }); if (isUpload) await uploadDeep(dirname, { force, log }); } else { if (isBuild) await build(dirname, { force, log }); if (isUpload) await upload(dirname, { force, log }); } } }); export { creds_default }; //# sourceMappingURL=out.js.map //# sourceMappingURL=chunk-POLWJJYP.js.map