UNPKG

@ycmd/creds

Version:

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

28 lines (26 loc) 938 B
import { getDirs } from './chunk-KQUY3CBJ.js'; import { log } from './chunk-CHOKACPI.js'; import { upload } from './chunk-MEJAVZPO.js'; import { __name } from './chunk-U2DZE3DI.js'; import { existsSync } from 'node:fs'; import { Err } from '@lsk4/err'; import { map, mapSeries } from 'fishbird'; async function uploadDeep(dirname, options = {}) { const rawFiles = await getDirs(dirname); const files = (await map(rawFiles, async (rawFile) => { const { filename } = rawFile; if (!await existsSync(`${filename}/index.js`)) return null; return rawFile; })).filter(Boolean); return mapSeries(files, async ({ filename }) => { await upload(filename, options).catch((err) => { log.error(`Build error ${filename}: `, Err.getMessage(err)); log.error(err); }); }); } __name(uploadDeep, "uploadDeep"); export { uploadDeep }; //# sourceMappingURL=out.js.map //# sourceMappingURL=chunk-AH5PSXSE.js.map