@ycmd/creds
Version:
LSK.js CLI Creds is the easiest way to manage GitHub / Gitlab secrets and credentials
12 lines (10 loc) • 893 B
JavaScript
import { a as a$1 } from './chunk-GTIYM2EM.js';
import { a as a$2 } from './chunk-XP4Q5S6R.js';
import { a, b } from './chunk-CSGQ5YH5.js';
import { readFile } from 'node:fs/promises';
import { Err } from '@lsk4/err';
import { map } from 'fishbird';
async function q(c,r){let f=r.buildDir||`${c}/build`,e=b(`${c}/config.js`),i=e.service?.serviceName;if(!i)throw new Err("!serviceName");let t;if(i==="github")t=new a$1({...e.service,...r});else if(i==="gitlab")t=new a$2({...e.service,...r});else throw new Err("incorrect serviceName",{serviceName:i});let{files:u=[],variables:v,secrets:w,hooks:b$1}=e,d=await map(u,async o=>{let{filename:h}=o,p=await readFile(`${f}/${h}`).then(g=>g.toString());return {...o,content:p}});await t.uploadAll({files:d,variables:v,secrets:w,hooks:b$1});}a(q,"upload");
export { q as a };
//# sourceMappingURL=out.js.map
//# sourceMappingURL=chunk-UZUAPLUL.js.map