@ycmd/creds
Version:
LSK.js CLI Creds is the easiest way to manage GitHub / Gitlab secrets and credentials
17 lines (14 loc) • 1.34 kB
JavaScript
;
var chunkA3UTOOLP_js = require('./chunk-A3UTOOLP.js');
var chunkROFM3MHH_js = require('./chunk-ROFM3MHH.js');
var chunkCSGQ5YH5_js = require('./chunk-CSGQ5YH5.js');
var stringify = require('@lsk4/stringify');
var fishbird = require('fishbird');
var promises = require('fs/promises');
async function U(a,r={}){let d=r.log||chunkA3UTOOLP_js.a,o=r.buildDir||`${a}/build`,e=await chunkROFM3MHH_js.a(a,r);await promises.unlink(`${o}`).catch(()=>{}),await promises.mkdir(o,{recursive:!0});let{config:n}=e,{files:l=[]}=n;await fishbird.mapSeries(l,async t=>{let{type:s,filename:c,handler:u}=t,P=await u(t,n),j=stringify.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 stringify.jsonToFile(`${o}/${c}`,P,{type:s,compare:!r.force,comment:j}),d.info(`[build] ${e.getProjectPath()} (${c})`);});}chunkCSGQ5YH5_js.a(U,"build");
exports.a = U;
//# sourceMappingURL=out.js.map
//# sourceMappingURL=chunk-CMGNWT5D.js.map