@ycmd/creds
Version:
LSK.js CLI Creds is the easiest way to manage GitHub / Gitlab secrets and credentials
15 lines (13 loc) • 1.23 kB
JavaScript
import { a as a$1 } from './chunk-6FJTHGBR.js';
import { a as a$2 } from './chunk-RWTZ4YZL.js';
import { a } from './chunk-CSGQ5YH5.js';
import { getComment, jsonToFile } from '@lsk4/stringify';
import { mapSeries } from 'fishbird';
import { unlink, mkdir } from 'fs/promises';
async function D(a,r={}){let d=r.log||a$1,o=r.buildDir||`${a}/build`,e=await a$2(a,r);await unlink(`${o}`).catch(()=>{}),await mkdir(o,{recursive:!0});let{config:n}=e,{files:l=[]}=n;await mapSeries(l,async t=>{let{type:s,filename:c,handler:u}=t,P=await u(t,n),j=getComment({filename:c,values:[["File type",t.type],["Cred type",t.credType],["Cred name",t.name],["Server",e.getServiceHostname()],["Project",e.getProjectPath()],["Project ID",e.getProjectId()],["Project Url",e.getProjectUrl()],["CI/CD Setting",e.getProjectCICDSettingURL()]],footer:e.getProjectCredsUrl()&&`
Auto generated by ${e.getProjectCredsUrl()}
If you want to change something, please contact admin repo: ${e.getProjectCredsOwner()}.
`.trim()});await jsonToFile(`${o}/${c}`,P,{type:s,compare:!r.force,comment:j}),d.info(`[build] ${e.getProjectPath()} (${c})`);});}a(D,"build");
export { D as a };
//# sourceMappingURL=out.js.map
//# sourceMappingURL=chunk-JNDQ7IZO.js.map