@conterra/vuln-scan 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,21 +1,21 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var Mt=Object.create;var Xe=Object.defineProperty;var Wt=Object.getOwnPropertyDescriptor;var Kt=Object.getOwnPropertyNames;var Ht=Object.getPrototypeOf,Gt=Object.prototype.hasOwnProperty;var Ye=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var qt=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Kt(t))!Gt.call(e,i)&&i!==r&&Xe(e,i,{get:()=>t[i],enumerable:!(n=Wt(t,i))||n.enumerable});return e};var q=(e,t,r)=>(r=e!=null?Mt(Ht(e)):{},qt(t||!e||!e.__esModule?Xe(r,"default",{value:e,enumerable:!0}):r,e));var ct=Ye((xn,at)=>{"use strict";at.exports=ar;function lr(e){let t={defaultWidth:0,output:process.stdout,tty:require("tty")};return e?(Object.keys(t).forEach(function(r){e[r]||(e[r]=t[r])}),e):t}function ar(e){let t=lr(e);if(t.output.getWindowSize)return t.output.getWindowSize()[0]||t.defaultWidth;if(t.tty.getWindowSize)return t.tty.getWindowSize()[1]||t.defaultWidth;if(t.output.columns)return t.output.columns;if(process.env.CLI_WIDTH){let r=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(r)&&r!==0)return r}return t.defaultWidth}});var Tt=Ye((Un,vt)=>{var yr=require("stream"),Ce=class extends yr{#r=null;constructor(t={}){super(t),this.writable=this.readable=!0,this.muted=!1,this.on("pipe",this._onpipe),this.replace=t.replace,this._prompt=t.prompt||null,this._hadControl=!1}#t(t,r){return this._dest?this._dest[t]:this._src?this._src[t]:r}#e(t,...r){typeof this._dest?.[t]=="function"&&this._dest[t](...r),typeof this._src?.[t]=="function"&&this._src[t](...r)}get isTTY(){return this.#r!==null?this.#r:this.#t("isTTY",!1)}set isTTY(t){this.#r=t}get rows(){return this.#t("rows")}get columns(){return this.#t("columns")}mute(){this.muted=!0}unmute(){this.muted=!1}_onpipe(t){this._src=t}pipe(t,r){return this._dest=t,super.pipe(t,r)}pause(){if(this._src)return this._src.pause()}resume(){if(this._src)return this._src.resume()}write(t){if(this.muted){if(!this.replace)return!0;if(t.match(/^\u001b/))return t.indexOf(this._prompt)===0&&(t=t.slice(this._prompt.length),t=t.replace(/./g,this.replace),t=this._prompt+t),this._hadControl=!0,this.emit("data",t);this._prompt&&this._hadControl&&t.indexOf(this._prompt)===0&&(this._hadControl=!1,this.emit("data",this._prompt),t=t.slice(this._prompt.length)),t=t.toString().replace(/./g,this.replace)}this.emit("data",t)}end(t){this.muted&&(t&&this.replace?t=t.toString().replace(/./g,this.replace):t=null),t&&this.emit("data",t),this.emit("end")}destroy(...t){return this.#e("destroy",...t)}destroySoon(...t){return this.#e("destroySoon",...t)}close(...t){return this.#e("close",...t)}};vt.exports=Ce});var ae=q(require("path"));var B=require("fs/promises");async function J(e){try{return await Jt(e)?JSON.parse(await(0,B.readFile)(e,{encoding:"utf-8"})):void 0}catch(t){throw new Error(`Error reading JSON file ${e}: ${t}`,{cause:t})}}async function le(e,t){let r=JSON.stringify(t,null,4)+`
3
- `,n=await Xt(e,r);await(0,B.writeFile)(e,n,{encoding:"utf-8"})}async function Jt(e){try{return await(0,B.access)(e,B.constants.F_OK),!0}catch{return!1}}async function Xt(e,t){let r=await zt();if(!r)return t;let n=await r.resolveConfig(e);return n?await r.format(t,{...n,filepath:e}):t}var Yt;function zt(){return Yt??=import("prettier").catch(()=>{})}var ye;async function ce(e){if(ye)return ye;let t="https://repository.conterra.de/repository/maven-mirror-ct",r=j(e.workingDir,"input/vex"),n=j(e.workingDir,"output"),i=j(e.workingDir,"cache"),l=["grype","trivy","ossindex"],s=j(e.workingDir,"vuln-scan-conf.json"),o=await J(s);if(!o)throw new Error(`Missing project configuration file '${s}'`);let u=o.findNoLongerDetectedVulnerabilitiesOnlyForSnapshots??!1;return ye={projectConfigFileLocation:s,onNewVulnerabilities:o.onNewVulnerabilities??(o.failOnNewVulnerabilities?"fail":"warn"),onNoLongerDetectedVulnerabilities:o.onNoLongerDetectedVulnerabilities??"ignore",reportNoLongerDetectedVulnerabilities:o.reportNoLongerDetectedVulnerabilities??!0,consoleReport:o.consoleReport||"BY_PROJECT_DETAILED",createSubDirsForProject:o.createSubDirsForProject??!0,mavenRepo:o.mavenRepo??t,vexUrls:o.vexUrls??[],vexDir:j(e.workingDir,o.vexDir)??r,outDir:j(e.workingDir,o.outDir)??n,cacheDir:j(e.workingDir,o.cacheDir)??i,scanners:(o.scanners??l).map(f=>{if(typeof f!="string")throw new Error(`Invalid scanner name '${f}' in configuration file '${s}'`);let a=f.split("@");if(a.length>2)throw new Error(`Invalid scanner name '${f}' in configuration file '${s}'`);let c=a[0],d=a[1]??"";return{name:c,version:d}}),projects:(o.projects??[]).map(f=>{let a=f;if(!a.name)throw new Error("Project name is missing on entry:"+JSON.stringify(a));if(!a.version)throw new Error("Project version is missing on entry:"+JSON.stringify(a));if(!a.purl)throw new Error("Project purl is missing on entry:"+JSON.stringify(a));return a.purlAliases||(a.purlAliases=[]),a.enabled==null&&(a.enabled=!0),a.silent==null&&(a.silent=!1),a.minimumSeverity||(a.minimumSeverity="UNKNOWN"),a.sbomFile?{...a,sbomFile:j(e.workingDir,a.sbomFile)}:(a.detectNoLongerUsedVulnerabilities=u?a.purl.endsWith("-SNAPSHOT"):!0,f)})}}function j(e,t){if(t)return ae.default.isAbsolute(t)?t:(0,ae.resolve)(e,t)}var ue=require("fs/promises"),Le=require("path");var Pe=class{constructor(t){this.location=t}async read(){let t=await J(this.location);if(!t)throw new Error("Invalid VEX file");return t}async write(t){await le(this.location,t)}async delete(){await(0,ue.unlink)(this.location)}};async function ve(e,t){for(let r of await(0,ue.readdir)(e,{withFileTypes:!0}))r.name.endsWith(".json")?await t(new Pe((0,Le.resolve)(r.parentPath,r.name))):r.isDirectory()&&await ve((0,Le.resolve)(r.parentPath,r.name),t)}function ze(e){let t=e.vulnerability.name;return new Set([t,...e.vulnerability.aliases??[]])}async function Qe({workingDir:e,projectName:t,projectVersion:r,vulnId:n}){let i=await ce({workingDir:e});if(!i.projectConfigFileLocation)throw new Error("Missing project configuration file.");let l=i.projects.find(s=>s.name===t&&s.version===r);if(!l){console.info(`Project ${t} with version ${r} not found.`);return}n||await Qt(i.projectConfigFileLocation,l),await Zt(i.vexDir,l.purl,n)}async function Qt(e,t){let r=await J(e),n=r.projects.findIndex(i=>i.name===t.name&&i.version===t.version);r.projects.splice(n,1),console.info(`Remove project ${t.name} with version ${t.version} from ${e}`),await le(e,r)}async function Zt(e,t,r){await ve(e,async n=>{let i=await n.read(),l=!1,s=i.statements,o=[];for(let u of s){if(r&&!ze(u).has(r)||!u.products)continue;let f=u.products.findIndex(a=>a["@id"]===t);f!==-1&&(u.products.splice(f,1),l=!0,u.products.length===0&&o.push(u))}if(l){for(let u of o){let f=s.indexOf(u);s.splice(f,1)}if(s.length===0){console.info(`Remove ${t} from ${n.location} and delete file.`),await n.delete();return}console.info(`Remove ${t} from ${n.location}`),await n.write(i)}})}var ee=(e,t=[])=>e.name==="up"||t.includes("vim")&&e.name==="k"||t.includes("emacs")&&e.ctrl&&e.name==="p",fe=(e,t=[])=>e.name==="down"||t.includes("vim")&&e.name==="j"||t.includes("emacs")&&e.ctrl&&e.name==="n";var te=e=>e.name==="backspace",re=e=>e.name==="tab",Te=e=>"1234567890".includes(e.name),A=e=>e.name==="enter"||e.name==="return";var de=class extends Error{name="AbortPromptError";message="Prompt was aborted";constructor(t){super(),this.cause=t?.cause}},pe=class extends Error{name="CancelPromptError";message="Prompt was canceled"},ne=class extends Error{name="ExitPromptError"},he=class extends Error{name="HookError"},X=class extends Error{name="ValidationError"};var rt=require("node:async_hooks");var me=require("node:async_hooks");var Ze=new me.AsyncLocalStorage;function er(e){return{rl:e,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}function et(e,t){let r=er(e);return Ze.run(r,()=>{function n(i){r.handleChange=()=>{r.index=0,i()},r.handleChange()}return t(n)})}function V(){let e=Ze.getStore();if(!e)throw new he("[Inquirer] Hook functions can only be called from within a prompt");return e}function Re(){return V().rl}function Fe(e){let t=(...r)=>{let n=V(),i=!1,l=n.handleChange;n.handleChange=()=>{i=!0};let s=e(...r);return i&&l(),n.handleChange=l,s};return me.AsyncResource.bind(t)}function Y(e){let t=V(),{index:r}=t,n={get(){return t.hooks[r]},set(l){t.hooks[r]=l},initialized:r in t.hooks},i=e(n);return t.index++,i}function tt(){V().handleChange()}var $={queue(e){let t=V(),{index:r}=t;t.hooksEffect.push(()=>{t.hooksCleanup[r]?.();let n=e(Re());if(n!=null&&typeof n!="function")throw new X("useEffect return value must be a cleanup function or nothing.");t.hooksCleanup[r]=n})},run(){let e=V();Fe(()=>{e.hooksEffect.forEach(t=>{t()}),e.hooksEffect.length=0})()},clearAll(){let e=V();e.hooksCleanup.forEach(t=>{t?.()}),e.hooksEffect.length=0,e.hooksCleanup.length=0}};function L(e){return Y(t=>{let r=rt.AsyncResource.bind(function(l){t.get()!==l&&(t.set(l),tt())});if(t.initialized)return[t.get(),r];let n=typeof e=="function"?e():e;return t.set(n),[n,r]})}function C(e,t){Y(r=>{let n=r.get();(!Array.isArray(n)||t.some((l,s)=>!Object.is(l,n[s])))&&$.queue(e),r.set(t)})}var R=require("node:util");var I=q(require("node:process"),1);function tr(){return I.default.platform!=="win32"?I.default.env.TERM!=="linux":!!I.default.env.WT_SESSION||!!I.default.env.TERMINUS_SUBLIME||I.default.env.ConEmuTask==="{cmd::Cmder}"||I.default.env.TERM_PROGRAM==="Terminus-Sublime"||I.default.env.TERM_PROGRAM==="vscode"||I.default.env.TERM==="xterm-256color"||I.default.env.TERM==="alacritty"||I.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var nt={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},it={tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},rr={tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25C4",triangleRight:"\u25BA",lozenge:"\u2666",lozengeOutline:"\u25CA",hamburger:"\u2261",smiley:"\u263A",mustache:"\u250C\u2500\u2510",star:"\u2736",play:"\u25BA",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},nr={...nt,...it},ir={...nt,...rr},or=tr(),sr=or?nr:ir,z=sr,Zr=Object.entries(it);var ot={prefix:{idle:(0,R.styleText)("blue","?"),done:(0,R.styleText)("green",z.tick)},spinner:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"].map(e=>(0,R.styleText)("yellow",e))},style:{answer:e=>(0,R.styleText)("cyan",e),message:e=>(0,R.styleText)("bold",e),error:e=>(0,R.styleText)("red",`> ${e}`),defaultAnswer:e=>(0,R.styleText)("dim",`(${e})`),help:e=>(0,R.styleText)("dim",e),highlight:e=>(0,R.styleText)("cyan",e),key:e=>(0,R.styleText)("cyan",(0,R.styleText)("bold",`<${e}>`))}};function st(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function lt(...e){let t={};for(let r of e)for(let[n,i]of Object.entries(r)){let l=t[n];t[n]=st(l)&&st(i)?lt(l,i):i}return t}function N(...e){let t=[ot,...e.filter(r=>r!=null)];return lt(...t)}function M({status:e="idle",theme:t}){let[r,n]=L(!1),[i,l]=L(0),{prefix:s,spinner:o}=N(t);return C(()=>{if(e==="loading"){let f,a=-1,c=setTimeout(()=>{n(!0),f=setInterval(()=>{a=a+1,l(a%o.frames.length)},o.interval)},300);return()=>{clearTimeout(c),clearInterval(f)}}else n(!1)},[e]),r?o.frames[i]:typeof s=="string"?s:s[e==="loading"?"idle":e]??s.idle}function ie(e,t){return Y(r=>{let n=r.get();if(!n||n.dependencies.length!==t.length||n.dependencies.some((i,l)=>i!==t[l])){let i=e();return r.set({value:i,dependencies:t}),i}return n.value})}function W(e){return L({current:e})[0]}function K(e){let t=W(e);t.current=e,C(r=>{let n=!1,i=Fe((l,s)=>{n||t.current(s,r)});return r.input.on("keypress",i),()=>{n=!0,r.input.removeListener("keypress",i)}},[])}var Pt=q(ct(),1);var ut=(()=>{let e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return t=>{let r=0;for(e.lastIndex=0;e.test(t);)r+=1;return t.length-r}})(),ft=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,dt=e=>e===8987||e===9001||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e>=131072&&e<=196605||e>=196608&&e<=262141;var cr=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,ur=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,pt=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu,fr=/\t{1,1000}/y,ht=new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*","yu"),dr=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,pr=new RegExp("\\p{M}+","gu"),hr={limit:1/0,ellipsis:""},mt=(e,t={},r={})=>{let n=t.limit??1/0,i=t.ellipsis??"",l=t?.ellipsisWidth??(i?mt(i,hr,r).width:0),s=0,o=r.controlWidth??0,u=r.tabWidth??8,f=r.emojiWidth??2,a=2,c=r.regularWidth??1,d=r.wideWidth??a,w=[[dr,c],[cr,s],[ur,o],[fr,u],[ht,f],[pt,d]],h=0,p=0,g=e.length,x=0,m=!1,D=g,S=Math.max(0,n-l),P=0,O=0,v=0,F=0;e:for(;;){if(O>P||p>=g&&p>h){let b=e.slice(P,O)||e.slice(h,p);x=0;for(let E of b.replaceAll(pr,"")){let y=E.codePointAt(0)||0;if(ft(y)?F=a:dt(y)?F=d:F=c,v+F>S&&(D=Math.min(D,Math.max(P,h)+x)),v+F>n){m=!0;break e}x+=E.length,v+=F}P=O=0}if(p>=g)break e;for(let b=0,E=w.length;b<E;b++){let[y,T]=w[b];if(y.lastIndex=p,y.test(e)){if(x=y===pt?ut(e.slice(p,y.lastIndex)):y===ht?1:y.lastIndex-p,F=x*T,v+F>S&&(D=Math.min(D,p+Math.floor((S-v)/T))),v+F>n){m=!0;break e}v+=F,P=h,O=p,p=h=y.lastIndex;continue e}}p+=1}return{width:m?S:v,index:m?D:g,truncated:m,ellipsed:m&&n>=l}},gt=mt;var mr={limit:1/0,ellipsis:"",ellipsisWidth:0},gr=(e,t={})=>gt(e,mr,t).width,k=gr;var ge="\x1B",St="\x9B",wr=39,Ie="\x07",Et="[",xr="]",yt="m",Ue=`${xr}8;;`,wt=new RegExp(`(?:\\${Et}(?<code>\\d+)m|\\${Ue}(?<uri>.*)${Ie})`,"y"),xt=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},bt=e=>`${ge}${Et}${e}${yt}`,Dt=e=>`${ge}${Ue}${e}${Ie}`,Be=(e,t,r)=>{let n=t[Symbol.iterator](),i=!1,l=!1,s=e.at(-1),o=s===void 0?0:k(s),u=n.next(),f=n.next(),a=0;for(;!u.done;){let c=u.value,d=k(c);o+d<=r?e[e.length-1]+=c:(e.push(c),o=0),(c===ge||c===St)&&(i=!0,l=t.startsWith(Ue,a+1)),i?l?c===Ie&&(i=!1,l=!1):c===yt&&(i=!1):(o+=d,o===r&&!f.done&&(e.push(""),o=0)),u=f,f=n.next(),a+=c.length}s=e.at(-1),!o&&s!==void 0&&s.length&&e.length>1&&(e[e.length-2]+=e.pop())},br=e=>{let t=e.split(" "),r=t.length;for(;r&&!k(t[r-1]);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},Dr=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let n="",i,l,s=e.split(" "),o=[""],u=0;for(let c=0;c<s.length;c++){let d=s[c];if(r.trim!==!1){let h=o.at(-1)??"",p=h.trimStart();h.length!==p.length&&(o[o.length-1]=p,u=k(p))}c!==0&&(u>=t&&(r.wordWrap===!1||r.trim===!1)&&(o.push(""),u=0),(u||r.trim===!1)&&(o[o.length-1]+=" ",u++));let w=k(d);if(r.hard&&w>t){let h=t-u,p=1+Math.floor((w-h-1)/t);Math.floor((w-1)/t)<p&&o.push(""),Be(o,d,t),u=k(o.at(-1)??"");continue}if(u+w>t&&u&&w){if(r.wordWrap===!1&&u<t){Be(o,d,t),u=k(o.at(-1)??"");continue}o.push(""),u=0}if(u+w>t&&r.wordWrap===!1){Be(o,d,t),u=k(o.at(-1)??"");continue}o[o.length-1]+=d,u+=w}r.trim!==!1&&(o=o.map(c=>br(c)));let f=o.join(`
4
- `),a=!1;for(let c=0;c<f.length;c++){let d=f[c];if(n+=d,a)a=!1;else if(a=d>="\uD800"&&d<="\uDBFF",a)continue;if(d===ge||d===St){wt.lastIndex=c+1;let h=wt.exec(f)?.groups;if(h?.code!==void 0){let p=Number.parseFloat(h.code);i=p===wr?void 0:p}else h?.uri!==void 0&&(l=h.uri.length===0?void 0:h.uri)}if(f[c+1]===`
5
- `){l&&(n+=Dt(""));let w=i?xt(i):void 0;i&&w&&(n+=bt(w))}else d===`
6
- `&&(i&&xt(i)&&(n+=bt(i)),l&&(n+=Dt(l)))}return n},Sr=/\r?\n/;function Lt(e,t,r){return String(e).normalize().split(Sr).map(n=>Dr(n,t,r)).join(`
2
+ "use strict";var Wt=Object.create;var Xe=Object.defineProperty;var Kt=Object.getOwnPropertyDescriptor;var Ht=Object.getOwnPropertyNames;var Gt=Object.getPrototypeOf,qt=Object.prototype.hasOwnProperty;var Ye=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Jt=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ht(t))!qt.call(e,i)&&i!==r&&Xe(e,i,{get:()=>t[i],enumerable:!(n=Kt(t,i))||n.enumerable});return e};var A=(e,t,r)=>(r=e!=null?Wt(Gt(e)):{},Jt(t||!e||!e.__esModule?Xe(r,"default",{value:e,enumerable:!0}):r,e));var ct=Ye((Dn,at)=>{"use strict";at.exports=ur;function cr(e){let t={defaultWidth:0,output:process.stdout,tty:require("tty")};return e?(Object.keys(t).forEach(function(r){e[r]||(e[r]=t[r])}),e):t}function ur(e){let t=cr(e);if(t.output.getWindowSize)return t.output.getWindowSize()[0]||t.defaultWidth;if(t.tty.getWindowSize)return t.tty.getWindowSize()[1]||t.defaultWidth;if(t.output.columns)return t.output.columns;if(process.env.CLI_WIDTH){let r=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(r)&&r!==0)return r}return t.defaultWidth}});var Tt=Ye((Cn,Pt)=>{var vr=require("stream"),Ce=class extends vr{#r=null;constructor(t={}){super(t),this.writable=this.readable=!0,this.muted=!1,this.on("pipe",this._onpipe),this.replace=t.replace,this._prompt=t.prompt||null,this._hadControl=!1}#t(t,r){return this._dest?this._dest[t]:this._src?this._src[t]:r}#e(t,...r){typeof this._dest?.[t]=="function"&&this._dest[t](...r),typeof this._src?.[t]=="function"&&this._src[t](...r)}get isTTY(){return this.#r!==null?this.#r:this.#t("isTTY",!1)}set isTTY(t){this.#r=t}get rows(){return this.#t("rows")}get columns(){return this.#t("columns")}mute(){this.muted=!0}unmute(){this.muted=!1}_onpipe(t){this._src=t}pipe(t,r){return this._dest=t,super.pipe(t,r)}pause(){if(this._src)return this._src.pause()}resume(){if(this._src)return this._src.resume()}write(t){if(this.muted){if(!this.replace)return!0;if(t.match(/^\u001b/))return t.indexOf(this._prompt)===0&&(t=t.slice(this._prompt.length),t=t.replace(/./g,this.replace),t=this._prompt+t),this._hadControl=!0,this.emit("data",t);this._prompt&&this._hadControl&&t.indexOf(this._prompt)===0&&(this._hadControl=!1,this.emit("data",this._prompt),t=t.slice(this._prompt.length)),t=t.toString().replace(/./g,this.replace)}this.emit("data",t)}end(t){this.muted&&(t&&this.replace?t=t.toString().replace(/./g,this.replace):t=null),t&&this.emit("data",t),this.emit("end")}destroy(...t){return this.#e("destroy",...t)}destroySoon(...t){return this.#e("destroySoon",...t)}close(...t){return this.#e("close",...t)}};Pt.exports=Ce});var ae=A(require("path"));var U=require("fs/promises");async function J(e){try{return await Xt(e)?JSON.parse(await(0,U.readFile)(e,{encoding:"utf-8"})):void 0}catch(t){throw new Error(`Error reading JSON file ${e}: ${t}`,{cause:t})}}async function le(e,t){let r=JSON.stringify(t,null,4)+`
3
+ `,n=await Yt(e,r);await(0,U.writeFile)(e,n,{encoding:"utf-8"})}async function Xt(e){try{return await(0,U.access)(e,U.constants.F_OK),!0}catch{return!1}}async function Yt(e,t){let r=await Qt();if(!r)return t;let n=await r.resolveConfig(e);return n?await r.format(t,{...n,filepath:e}):t}var zt;function Qt(){return zt??=import("prettier").catch(()=>{})}var ye;async function ce(e){if(ye)return ye;let t="https://repository.conterra.de/repository/maven-mirror-ct",r=j(e.workingDir,"input/vex"),n=j(e.workingDir,"output"),i=j(e.workingDir,"cache"),l=["grype","trivy","ossindex"],s=j(e.workingDir,"vuln-scan-conf.json"),o=await J(s);if(!o)throw new Error(`Missing project configuration file '${s}'`);let u=o.findNoLongerDetectedVulnerabilitiesOnlyForSnapshots??!1;return ye={projectConfigFileLocation:s,onNewVulnerabilities:o.onNewVulnerabilities??(o.failOnNewVulnerabilities?"fail":"warn"),onNoLongerDetectedVulnerabilities:o.onNoLongerDetectedVulnerabilities??"ignore",reportNoLongerDetectedVulnerabilities:o.reportNoLongerDetectedVulnerabilities??!0,consoleReport:o.consoleReport||"BY_PROJECT_DETAILED",createSubDirsForProject:o.createSubDirsForProject??!0,mavenRepo:o.mavenRepo??t,vexUrls:o.vexUrls??[],vexDir:j(e.workingDir,o.vexDir)??r,outDir:j(e.workingDir,o.outDir)??n,cacheDir:j(e.workingDir,o.cacheDir)??i,scanners:(o.scanners??l).map(f=>{if(typeof f!="string")throw new Error(`Invalid scanner name '${f}' in configuration file '${s}'`);let a=f.split("@");if(a.length>2)throw new Error(`Invalid scanner name '${f}' in configuration file '${s}'`);let c=a[0],d=a[1]??"";return{name:c,version:d}}),projects:(o.projects??[]).map(f=>{let a=f;if(!a.name)throw new Error("Project name is missing on entry:"+JSON.stringify(a));if(!a.version)throw new Error("Project version is missing on entry:"+JSON.stringify(a));if(!a.purl)throw new Error("Project purl is missing on entry:"+JSON.stringify(a));return a.purlAliases||(a.purlAliases=[]),a.enabled==null&&(a.enabled=!0),a.silent==null&&(a.silent=!1),a.minimumSeverity||(a.minimumSeverity="UNKNOWN"),a.sbomFile?{...a,sbomFile:j(e.workingDir,a.sbomFile)}:(a.detectNoLongerUsedVulnerabilities=u?a.purl.endsWith("-SNAPSHOT"):!0,f)})}}function j(e,t){if(t)return ae.default.isAbsolute(t)?t:(0,ae.resolve)(e,t)}var ue=require("fs/promises"),Le=require("path");var ve=class{constructor(t){this.location=t}location;async read(){let t=await J(this.location);if(!t)throw new Error("Invalid VEX file");return t}async write(t){await le(this.location,t)}async delete(){await(0,ue.unlink)(this.location)}};async function Pe(e,t){for(let r of await(0,ue.readdir)(e,{withFileTypes:!0}))r.name.endsWith(".json")?await t(new ve((0,Le.resolve)(r.parentPath,r.name))):r.isDirectory()&&await Pe((0,Le.resolve)(r.parentPath,r.name),t)}function ze(e){let t=e.vulnerability.name;return new Set([t,...e.vulnerability.aliases??[]])}async function Qe({workingDir:e,projectName:t,projectVersion:r,vulnId:n}){let i=await ce({workingDir:e});if(!i.projectConfigFileLocation)throw new Error("Missing project configuration file.");let l=i.projects.find(s=>s.name===t&&s.version===r);if(!l){console.info(`Project ${t} with version ${r} not found.`);return}n||await Zt(i.projectConfigFileLocation,l),await er(i.vexDir,l.purl,n)}async function Zt(e,t){let r=await J(e),n=r.projects.findIndex(i=>i.name===t.name&&i.version===t.version);r.projects.splice(n,1),console.info(`Remove project ${t.name} with version ${t.version} from ${e}`),await le(e,r)}async function er(e,t,r){await Pe(e,async n=>{let i=await n.read(),l=!1,s=i.statements,o=[];for(let u of s){if(r&&!ze(u).has(r)||!u.products)continue;let f=u.products.findIndex(a=>a["@id"]===t);f!==-1&&(u.products.splice(f,1),l=!0,u.products.length===0&&o.push(u))}if(l){for(let u of o){let f=s.indexOf(u);s.splice(f,1)}if(s.length===0){console.info(`Remove ${t} from ${n.location} and delete file.`),await n.delete();return}console.info(`Remove ${t} from ${n.location}`),await n.write(i)}})}var ee=(e,t=[])=>e.name==="up"||t.includes("vim")&&e.name==="k"||t.includes("emacs")&&e.ctrl&&e.name==="p",fe=(e,t=[])=>e.name==="down"||t.includes("vim")&&e.name==="j"||t.includes("emacs")&&e.ctrl&&e.name==="n";var te=e=>e.name==="backspace",re=e=>e.name==="tab",Te=e=>"1234567890".includes(e.name),V=e=>e.name==="enter"||e.name==="return";var de=class extends Error{name="AbortPromptError";message="Prompt was aborted";constructor(t){super(),this.cause=t?.cause}},pe=class extends Error{name="CancelPromptError";message="Prompt was canceled"},ne=class extends Error{name="ExitPromptError"},he=class extends Error{name="HookError"},X=class extends Error{name="ValidationError"};var rt=require("node:async_hooks");var me=require("node:async_hooks");var Ze=new me.AsyncLocalStorage;function tr(e){return{rl:e,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}function et(e,t){let r=tr(e);return Ze.run(r,()=>{function n(i){r.handleChange=()=>{r.index=0,i()},r.handleChange()}return t(n)})}function $(){let e=Ze.getStore();if(!e)throw new he("[Inquirer] Hook functions can only be called from within a prompt");return e}function Re(){return $().rl}function Fe(e){let t=(...r)=>{let n=$(),i=!1,l=n.handleChange;n.handleChange=()=>{i=!0};let s=e(...r);return i&&l(),n.handleChange=l,s};return me.AsyncResource.bind(t)}function Y(e){let t=$(),{index:r}=t,n={get(){return t.hooks[r]},set(l){t.hooks[r]=l},initialized:r in t.hooks},i=e(n);return t.index++,i}function tt(){$().handleChange()}var M={queue(e){let t=$(),{index:r}=t;t.hooksEffect.push(()=>{t.hooksCleanup[r]?.();let n=e(Re());if(n!=null&&typeof n!="function")throw new X("useEffect return value must be a cleanup function or nothing.");t.hooksCleanup[r]=n})},run(){let e=$();Fe(()=>{e.hooksEffect.forEach(t=>{t()}),e.hooksEffect.length=0})()},clearAll(){let e=$();e.hooksCleanup.forEach(t=>{t?.()}),e.hooksEffect.length=0,e.hooksCleanup.length=0}};function rr(e){return typeof e=="function"}function L(e){return Y(t=>{let r=rt.AsyncResource.bind(function(l){t.get()!==l&&(t.set(l),tt())});if(t.initialized)return[t.get(),r];let n=rr(e)?e():e;return t.set(n),[n,r]})}function N(e,t){Y(r=>{let n=r.get();(!Array.isArray(n)||t.some((l,s)=>!Object.is(l,n[s])))&&M.queue(e),r.set(t)})}var I=require("node:util");var B=A(require("node:process"),1);function nr(){return B.default.platform.startsWith("win")?!!B.default.env.CI||!!B.default.env.WT_SESSION||!!B.default.env.TERMINUS_SUBLIME||B.default.env.ConEmuTask==="{cmd::Cmder}"||B.default.env.TERM_PROGRAM==="Terminus-Sublime"||B.default.env.TERM_PROGRAM==="vscode"||B.default.env.TERM==="xterm-256color"||B.default.env.TERM==="alacritty"||B.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm":B.default.env.TERM!=="linux"}var nt={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},it={tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},ir={tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25C4",triangleRight:"\u25BA",lozenge:"\u2666",lozengeOutline:"\u25CA",hamburger:"\u2261",smiley:"\u263A",mustache:"\u250C\u2500\u2510",star:"\u2736",play:"\u25BA",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},or={...nt,...it},sr={...nt,...ir},lr=nr(),ar=lr?or:sr,z=ar,tn=Object.entries(it);var ot={prefix:{idle:(0,I.styleText)("blue","?"),done:(0,I.styleText)("green",z.tick)},spinner:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"].map(e=>(0,I.styleText)("yellow",e))},style:{answer:e=>(0,I.styleText)("cyan",e),message:e=>(0,I.styleText)("bold",e),error:e=>(0,I.styleText)("red",`> ${e}`),defaultAnswer:e=>(0,I.styleText)("dim",`(${e})`),help:e=>(0,I.styleText)("dim",e),highlight:e=>(0,I.styleText)("cyan",e),key:e=>(0,I.styleText)("cyan",(0,I.styleText)("bold",`<${e}>`))}};function st(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function lt(...e){let t={};for(let r of e)for(let[n,i]of Object.entries(r)){let l=t[n];t[n]=st(l)&&st(i)?lt(l,i):i}return t}function k(...e){let t=[ot,...e.filter(r=>r!=null)];return lt(...t)}function W({status:e="idle",theme:t}){let[r,n]=L(!1),[i,l]=L(0),{prefix:s,spinner:o}=k(t);return N(()=>{if(e==="loading"){let f,a=-1,c=setTimeout(()=>{n(!0),f=setInterval(()=>{a=a+1,l(a%o.frames.length)},o.interval)},300);return()=>{clearTimeout(c),clearInterval(f)}}else n(!1)},[e]),r?o.frames[i]:typeof s=="string"?s:s[e==="loading"?"idle":e]??s.idle}function ie(e,t){return Y(r=>{let n=r.get();if(!n||n.dependencies.length!==t.length||n.dependencies.some((i,l)=>i!==t[l])){let i=e();return r.set({value:i,dependencies:t}),i}return n.value})}function K(e){return L({current:e})[0]}function H(e){let t=K(e);t.current=e,N(r=>{let n=!1,i=Fe((l,s)=>{n||t.current(s,r)});return r.input.on("keypress",i),()=>{n=!0,r.input.removeListener("keypress",i)}},[])}var vt=A(ct(),1);var ut=(()=>{let e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return t=>{let r=0;for(e.lastIndex=0;e.test(t);)r+=1;return t.length-r}})(),ft=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,dt=e=>e===8987||e===9001||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e>=131072&&e<=196605||e>=196608&&e<=262141;var fr=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,dr=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,pt=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu,pr=/\t{1,1000}/y,ht=new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*","yu"),hr=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,mr=new RegExp("\\p{M}+","gu"),gr={limit:1/0,ellipsis:""},mt=(e,t={},r={})=>{let n=t.limit??1/0,i=t.ellipsis??"",l=t?.ellipsisWidth??(i?mt(i,gr,r).width:0),s=0,o=r.controlWidth??0,u=r.tabWidth??8,f=r.emojiWidth??2,a=2,c=r.regularWidth??1,d=r.wideWidth??a,x=[[hr,c],[fr,s],[dr,o],[pr,u],[ht,f],[pt,d]],m=0,p=0,h=e.length,b=0,g=!1,D=h,S=Math.max(0,n-l),v=0,P=0,R=0,F=0;e:for(;;){if(P>v||p>=h&&p>m){let w=e.slice(v,P)||e.slice(m,p);b=0;for(let E of w.replaceAll(mr,"")){let y=E.codePointAt(0)||0;if(ft(y)?F=a:dt(y)?F=d:F=c,R+F>S&&(D=Math.min(D,Math.max(v,m)+b)),R+F>n){g=!0;break e}b+=E.length,R+=F}v=P=0}if(p>=h)break e;for(let w=0,E=x.length;w<E;w++){let[y,T]=x[w];if(y.lastIndex=p,y.test(e)){if(b=y===pt?ut(e.slice(p,y.lastIndex)):y===ht?1:y.lastIndex-p,F=b*T,R+F>S&&(D=Math.min(D,p+Math.floor((S-R)/T))),R+F>n){g=!0;break e}R+=F,v=m,P=p,p=m=y.lastIndex;continue e}}p+=1}return{width:g?S:R,index:g?D:h,truncated:g,ellipsed:g&&n>=l}},gt=mt;var wr={limit:1/0,ellipsis:"",ellipsisWidth:0},xr=(e,t={})=>gt(e,wr,t).width,O=xr;var ge="\x1B",St="\x9B",br=39,Ie="\x07",Et="[",Dr="]",yt="m",Ue=`${Dr}8;;`,wt=new RegExp(`(?:\\${Et}(?<code>\\d+)m|\\${Ue}(?<uri>.*)${Ie})`,"y"),xt=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},bt=e=>`${ge}${Et}${e}${yt}`,Dt=e=>`${ge}${Ue}${e}${Ie}`,Be=(e,t,r)=>{let n=t[Symbol.iterator](),i=!1,l=!1,s=e.at(-1),o=s===void 0?0:O(s),u=n.next(),f=n.next(),a=0;for(;!u.done;){let c=u.value,d=O(c);o+d<=r?e[e.length-1]+=c:(e.push(c),o=0),(c===ge||c===St)&&(i=!0,l=t.startsWith(Ue,a+1)),i?l?c===Ie&&(i=!1,l=!1):c===yt&&(i=!1):(o+=d,o===r&&!f.done&&(e.push(""),o=0)),u=f,f=n.next(),a+=c.length}s=e.at(-1),!o&&s!==void 0&&s.length&&e.length>1&&(e[e.length-2]+=e.pop())},Sr=e=>{let t=e.split(" "),r=t.length;for(;r&&!O(t[r-1]);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},Er=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let n="",i,l,s=e.split(" "),o=[""],u=0;for(let c=0;c<s.length;c++){let d=s[c];if(r.trim!==!1){let m=o.at(-1)??"",p=m.trimStart();m.length!==p.length&&(o[o.length-1]=p,u=O(p))}c!==0&&(u>=t&&(r.wordWrap===!1||r.trim===!1)&&(o.push(""),u=0),(u||r.trim===!1)&&(o[o.length-1]+=" ",u++));let x=O(d);if(r.hard&&x>t){let m=t-u,p=1+Math.floor((x-m-1)/t);Math.floor((x-1)/t)<p&&o.push(""),Be(o,d,t),u=O(o.at(-1)??"");continue}if(u+x>t&&u&&x){if(r.wordWrap===!1&&u<t){Be(o,d,t),u=O(o.at(-1)??"");continue}o.push(""),u=0}if(u+x>t&&r.wordWrap===!1){Be(o,d,t),u=O(o.at(-1)??"");continue}o[o.length-1]+=d,u+=x}r.trim!==!1&&(o=o.map(c=>Sr(c)));let f=o.join(`
4
+ `),a=!1;for(let c=0;c<f.length;c++){let d=f[c];if(n+=d,a)a=!1;else if(a=d>="\uD800"&&d<="\uDBFF",a)continue;if(d===ge||d===St){wt.lastIndex=c+1;let m=wt.exec(f)?.groups;if(m?.code!==void 0){let p=Number.parseFloat(m.code);i=p===br?void 0:p}else m?.uri!==void 0&&(l=m.uri.length===0?void 0:m.uri)}if(f[c+1]===`
5
+ `){l&&(n+=Dt(""));let x=i?xt(i):void 0;i&&x&&(n+=bt(x))}else d===`
6
+ `&&(i&&xt(i)&&(n+=bt(i)),l&&(n+=Dt(l)))}return n},yr=/\r?\n/;function Lt(e,t,r){return String(e).normalize().split(yr).map(n=>Er(n,t,r)).join(`
7
7
  `)}function oe(e,t){return e.split(`
8
8
  `).flatMap(r=>Lt(r,t,{trim:!1,hard:!0}).split(`
9
9
  `).map(n=>n.trimEnd())).join(`
10
- `)}function we(){return(0,Pt.default)({defaultWidth:80,output:Re().output})}function Er({active:e,renderedItems:t,pageSize:r,loop:n}){let i=W({lastPointer:e,lastActive:void 0}),{lastPointer:l,lastActive:s}=i.current,o=Math.floor(r/2),u=t.reduce((c,d)=>c+d.length,0),f=t.slice(0,e).reduce((c,d)=>c+d.length,0),a=f;if(u>r)if(n)a=l,s!=null&&s<e&&e-s<r&&(a=Math.min(o,Math.abs(e-s)===1?Math.min(l+(t[s]?.length??0),Math.max(f,l)):l+e-s));else{let c=t.slice(e).reduce((d,w)=>d+w.length,0);a=c<r-o?r-c:Math.min(f,o)}return i.current.lastPointer=a,i.current.lastActive=e,a}function _e({items:e,active:t,renderItem:r,pageSize:n,loop:i=!0}){let l=we(),s=x=>(x%e.length+e.length)%e.length,o=e.map((x,m)=>x==null?[]:oe(r({item:x,index:m,isActive:m===t}),l).split(`
11
- `)),u=o.reduce((x,m)=>x+m.length,0),f=x=>o[x]??[],a=Er({active:t,renderedItems:o,pageSize:n,loop:i}),c=f(t).slice(0,n),d=a+c.length<=n?a:n-c.length,w=Array.from({length:n});w.splice(d,c.length,...c);let h=new Set([t]),p=d+c.length,g=s(t+1);for(;p<n&&!h.has(g)&&(i&&u>n?g!==t:g>t);){let m=f(g).slice(0,n-p);w.splice(p,m.length,...m),h.add(g),p+=m.length,g=s(g+1)}for(p=d-1,g=s(t-1);p>=0&&!h.has(g)&&(i&&u>n?g!==t:g<t);){let x=f(g),m=x.slice(Math.max(0,x.length-p-1));w.splice(p-m.length+1,m.length,...m),h.add(g),p-=m.length,g=s(g-1)}return w.filter(x=>typeof x=="string").join(`
12
- `)}var Ct=q(require("node:readline"),1),Nt=require("node:async_hooks"),kt=q(Tt(),1);var H=[];H.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&H.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&H.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var xe=e=>!!e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function",Ne=Symbol.for("signal-exit emitter"),ke=globalThis,Lr=Object.defineProperty.bind(Object),Oe=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(ke[Ne])return ke[Ne];Lr(ke,Ne,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,r){this.listeners[t].push(r)}removeListener(t,r){let n=this.listeners[t],i=n.indexOf(r);i!==-1&&(i===0&&n.length===1?n.length=0:n.splice(i,1))}emit(t,r,n){if(this.emitted[t])return!1;this.emitted[t]=!0;let i=!1;for(let l of this.listeners[t])i=l(r,n)===!0||i;return t==="exit"&&(i=this.emit("afterExit",r,n)||i),i}},be=class{},Pr=e=>({onExit(t,r){return e.onExit(t,r)},load(){return e.load()},unload(){return e.unload()}}),je=class extends be{onExit(){return()=>{}}load(){}unload(){}},Ae=class extends be{#r=Ve.platform==="win32"?"SIGINT":"SIGHUP";#t=new Oe;#e;#o;#s;#i={};#n=!1;constructor(t){super(),this.#e=t,this.#i={};for(let r of H)this.#i[r]=()=>{let n=this.#e.listeners(r),{count:i}=this.#t,l=t;if(typeof l.__signal_exit_emitter__=="object"&&typeof l.__signal_exit_emitter__.count=="number"&&(i+=l.__signal_exit_emitter__.count),n.length===i){this.unload();let s=this.#t.emit("exit",null,r),o=r==="SIGHUP"?this.#r:r;s||t.kill(t.pid,o)}};this.#s=t.reallyExit,this.#o=t.emit}onExit(t,r){if(!xe(this.#e))return()=>{};this.#n===!1&&this.load();let n=r?.alwaysLast?"afterExit":"exit";return this.#t.on(n,t),()=>{this.#t.removeListener(n,t),this.#t.listeners.exit.length===0&&this.#t.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#n){this.#n=!0,this.#t.count+=1;for(let t of H)try{let r=this.#i[t];r&&this.#e.on(t,r)}catch{}this.#e.emit=(t,...r)=>this.#a(t,...r),this.#e.reallyExit=t=>this.#l(t)}}unload(){this.#n&&(this.#n=!1,H.forEach(t=>{let r=this.#i[t];if(!r)throw new Error("Listener not defined for signal: "+t);try{this.#e.removeListener(t,r)}catch{}}),this.#e.emit=this.#o,this.#e.reallyExit=this.#s,this.#t.count-=1)}#l(t){return xe(this.#e)?(this.#e.exitCode=t||0,this.#t.emit("exit",this.#e.exitCode,null),this.#s.call(this.#e,this.#e.exitCode)):0}#a(t,...r){let n=this.#o;if(t==="exit"&&xe(this.#e)){typeof r[0]=="number"&&(this.#e.exitCode=r[0]);let i=n.call(this.#e,t,...r);return this.#t.emit("exit",this.#e.exitCode,null),i}else return n.call(this.#e,t,...r)}},Ve=globalThis.process,{onExit:Rt,load:Nn,unload:kn}=Pr(xe(Ve)?new Ae(Ve):new je);var _t=require("node:util");var Bt="\x1B[?25l",It="\x1B[?25h",$e=(e=1)=>e>0?`\x1B[${e}A`:"",Me=(e=1)=>e>0?`\x1B[${e}B`:"",We=(e,t)=>typeof t=="number"&&!Number.isNaN(t)?`\x1B[${t+1};${e+1}H`:`\x1B[${e+1}G`,Ft="\x1B[2K",Ke=e=>e>0?(Ft+$e(1)).repeat(e-1)+Ft+"\x1B[G":"";var Ut=e=>e.split(`
13
- `).length,vr=e=>e.split(`
14
- `).pop()??"",se=class{height=0;extraLinesUnderPrompt=0;cursorPos;rl;constructor(t){this.rl=t,this.cursorPos=t.getCursorPos()}write(t){this.rl.output.unmute(),this.rl.output.write(t),this.rl.output.mute()}render(t,r=""){let n=vr(t),i=(0,_t.stripVTControlCharacters)(n),l=i;this.rl.line.length>0&&(l=l.slice(0,-this.rl.line.length)),this.rl.setPrompt(l),this.cursorPos=this.rl.getCursorPos();let s=we();t=oe(t,s),r=oe(r,s),i.length%s===0&&(t+=`
10
+ `)}function we(){return(0,vt.default)({defaultWidth:80,output:Re().output})}function Lr({active:e,renderedItems:t,pageSize:r,loop:n}){let i=K({lastPointer:e,lastActive:void 0}),{lastPointer:l,lastActive:s}=i.current,o=Math.floor(r/2),u=t.reduce((c,d)=>c+d.length,0),f=t.slice(0,e).reduce((c,d)=>c+d.length,0),a=f;if(u>r)if(n)a=l,s!=null&&s<e&&e-s<r&&(a=Math.min(o,Math.abs(e-s)===1?Math.min(l+(t[s]?.length??0),Math.max(f,l)):l+e-s));else{let c=t.slice(e).reduce((d,x)=>d+x.length,0);a=c<r-o?r-c:Math.min(f,o)}return i.current.lastPointer=a,i.current.lastActive=e,a}function _e({items:e,active:t,renderItem:r,pageSize:n,loop:i=!0}){let l=we(),s=b=>(b%e.length+e.length)%e.length,o=e.map((b,g)=>b==null?[]:oe(r({item:b,index:g,isActive:g===t}),l).split(`
11
+ `)),u=o.reduce((b,g)=>b+g.length,0),f=b=>o[b]??[],a=Lr({active:t,renderedItems:o,pageSize:n,loop:i}),c=f(t).slice(0,n),d=a+c.length<=n?a:n-c.length,x=Array.from({length:n});x.splice(d,c.length,...c);let m=new Set([t]),p=d+c.length,h=s(t+1);for(;p<n&&!m.has(h)&&(i&&u>n?h!==t:h>t);){let g=f(h).slice(0,n-p);x.splice(p,g.length,...g),m.add(h),p+=g.length,h=s(h+1)}for(p=d-1,h=s(t-1);p>=0&&!m.has(h)&&(i&&u>n?h!==t:h<t);){let b=f(h),g=b.slice(Math.max(0,b.length-p-1));x.splice(p-g.length+1,g.length,...g),m.add(h),p-=g.length,h=s(h-1)}return x.filter(b=>typeof b=="string").join(`
12
+ `)}var Ct=A(require("node:readline"),1),Nt=require("node:async_hooks"),kt=A(Tt(),1);var G=[];G.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&G.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&G.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var xe=e=>!!e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function",Ne=Symbol.for("signal-exit emitter"),ke=globalThis,Pr=Object.defineProperty.bind(Object),Oe=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(ke[Ne])return ke[Ne];Pr(ke,Ne,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,r){this.listeners[t].push(r)}removeListener(t,r){let n=this.listeners[t],i=n.indexOf(r);i!==-1&&(i===0&&n.length===1?n.length=0:n.splice(i,1))}emit(t,r,n){if(this.emitted[t])return!1;this.emitted[t]=!0;let i=!1;for(let l of this.listeners[t])i=l(r,n)===!0||i;return t==="exit"&&(i=this.emit("afterExit",r,n)||i),i}},be=class{},Tr=e=>({onExit(t,r){return e.onExit(t,r)},load(){return e.load()},unload(){return e.unload()}}),je=class extends be{onExit(){return()=>{}}load(){}unload(){}},Ae=class extends be{#r=Ve.platform==="win32"?"SIGINT":"SIGHUP";#t=new Oe;#e;#o;#s;#i={};#n=!1;constructor(t){super(),this.#e=t,this.#i={};for(let r of G)this.#i[r]=()=>{let n=this.#e.listeners(r),{count:i}=this.#t,l=t;if(typeof l.__signal_exit_emitter__=="object"&&typeof l.__signal_exit_emitter__.count=="number"&&(i+=l.__signal_exit_emitter__.count),n.length===i){this.unload();let s=this.#t.emit("exit",null,r),o=r==="SIGHUP"?this.#r:r;s||t.kill(t.pid,o)}};this.#s=t.reallyExit,this.#o=t.emit}onExit(t,r){if(!xe(this.#e))return()=>{};this.#n===!1&&this.load();let n=r?.alwaysLast?"afterExit":"exit";return this.#t.on(n,t),()=>{this.#t.removeListener(n,t),this.#t.listeners.exit.length===0&&this.#t.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#n){this.#n=!0,this.#t.count+=1;for(let t of G)try{let r=this.#i[t];r&&this.#e.on(t,r)}catch{}this.#e.emit=(t,...r)=>this.#a(t,...r),this.#e.reallyExit=t=>this.#l(t)}}unload(){this.#n&&(this.#n=!1,G.forEach(t=>{let r=this.#i[t];if(!r)throw new Error("Listener not defined for signal: "+t);try{this.#e.removeListener(t,r)}catch{}}),this.#e.emit=this.#o,this.#e.reallyExit=this.#s,this.#t.count-=1)}#l(t){return xe(this.#e)?(this.#e.exitCode=t||0,this.#t.emit("exit",this.#e.exitCode,null),this.#s.call(this.#e,this.#e.exitCode)):0}#a(t,...r){let n=this.#o;if(t==="exit"&&xe(this.#e)){typeof r[0]=="number"&&(this.#e.exitCode=r[0]);let i=n.call(this.#e,t,...r);return this.#t.emit("exit",this.#e.exitCode,null),i}else return n.call(this.#e,t,...r)}},Ve=globalThis.process,{onExit:Rt,load:On,unload:jn}=Tr(xe(Ve)?new Ae(Ve):new je);var _t=require("node:util");var Bt="\x1B[?25l",It="\x1B[?25h",$e=(e=1)=>e>0?`\x1B[${e}A`:"",Me=(e=1)=>e>0?`\x1B[${e}B`:"",We=(e,t)=>typeof t=="number"&&!Number.isNaN(t)?`\x1B[${t+1};${e+1}H`:`\x1B[${e+1}G`,Ft="\x1B[2K",Ke=e=>e>0?(Ft+$e(1)).repeat(e-1)+Ft+"\x1B[G":"";var Ut=e=>e.split(`
13
+ `).length,Rr=e=>e.split(`
14
+ `).pop()??"",se=class{height=0;extraLinesUnderPrompt=0;cursorPos;rl;constructor(t){this.rl=t,this.cursorPos=t.getCursorPos()}write(t){this.rl.output.unmute(),this.rl.output.write(t),this.rl.output.mute()}render(t,r=""){let n=Rr(t),i=(0,_t.stripVTControlCharacters)(n),l=i;this.rl.line.length>0&&(l=l.slice(0,-this.rl.line.length)),this.rl.setPrompt(l),this.cursorPos=this.rl.getCursorPos();let s=we();t=oe(t,s),r=oe(r,s),i.length%s===0&&(t+=`
15
15
  `);let o=t+(r?`
16
16
  `+r:""),f=Math.floor(i.length/s)-this.cursorPos.rows+(r?Ut(r):0);f>0&&(o+=$e(f)),o+=We(this.cursorPos.cols),this.write(Me(this.extraLinesUnderPrompt)+Ke(this.height)+o),this.extraLinesUnderPrompt=f,this.height=Ut(o)}checkCursorPos(){let t=this.rl.getCursorPos();t.cols!==this.cursorPos.cols&&(this.write(We(t.cols)),this.cursorPos=t)}done({clearContent:t}){this.rl.setPrompt("");let r=Me(this.extraLinesUnderPrompt);r+=t?Ke(this.height):`
17
- `,r+=It,this.write(r),this.rl.close()}};var De=class extends Promise{static withResolver(){let t,r;return{promise:new Promise((i,l)=>{t=i,r=l}),resolve:t,reject:r}}};var Tr=globalThis.setImmediate;function Rr(){let e=Error.prepareStackTrace,t=[];try{Error.prepareStackTrace=(r,n)=>{let i=n.slice(1);return t=i,i},new Error().stack}catch{return t}return Error.prepareStackTrace=e,t}function G(e){let t=Rr();return(n,i={})=>{let{input:l=process.stdin,signal:s}=i,o=new Set,u=new kt.default;u.pipe(i.output??process.stdout),u.mute();let f=Ct.createInterface({terminal:!0,input:l,output:u}),a=new se(f),{promise:c,resolve:d,reject:w}=De.withResolver(),h=()=>w(new pe);if(s){let g=()=>w(new de({cause:s.reason}));if(s.aborted)return g(),Object.assign(c,{cancel:h});s.addEventListener("abort",g),o.add(()=>s.removeEventListener("abort",g))}o.add(Rt((g,x)=>{w(new ne(`User force closed the prompt with ${g} ${x}`))}));let p=()=>w(new ne("User force closed the prompt with SIGINT"));return f.on("SIGINT",p),o.add(()=>f.removeListener("SIGINT",p)),et(f,g=>{let x=Nt.AsyncResource.bind(()=>$.clearAll());f.on("close",x),o.add(()=>f.removeListener("close",x));let m=()=>{let D=()=>a.checkCursorPos();f.input.on("keypress",D),o.add(()=>f.input.removeListener("keypress",D)),g(()=>{try{let S=e(n,v=>{setImmediate(()=>d(v))});if(S===void 0){let v=t[1]?.getFileName();throw new Error(`Prompt functions must return a string.
18
- at ${v}`)}let[P,O]=typeof S=="string"?[S]:S;a.render(P,O),$.run()}catch(S){w(S)}})};return"readableFlowing"in l?Tr(m):m(),Object.assign(c.then(D=>($.clearAll(),D),D=>{throw $.clearAll(),D}).finally(()=>{o.forEach(D=>D()),a.done({clearContent:!!i.clearPromptOnDone}),u.end()}).then(()=>c),{cancel:h})})}}var Ot=require("node:util");var U=class{separator=(0,Ot.styleText)("dim",Array.from({length:15}).join(z.line));type="separator";constructor(t){t&&(this.separator=t)}static isSeparator(t){return!!(t&&typeof t=="object"&&"type"in t&&t.type==="separator")}};function jt(e,t){let r=t!==!1;return/^(y|yes)/i.test(e)?r=!0:/^(n|no)/i.test(e)&&(r=!1),r}function At(e){return e?"Yes":"No"}var He=G((e,t)=>{let{transformer:r=At}=e,[n,i]=L("idle"),[l,s]=L(""),o=N(e.theme),u=M({status:n,theme:o});K((d,w)=>{if(n==="idle")if(A(d)){let h=jt(l,e.default);s(r(h)),i("done"),t(h)}else if(re(d)){let h=At(!jt(l,e.default));w.clearLine(0),w.write(h),s(h)}else s(w.line)});let f=l,a="";n==="done"?f=o.style.answer(l):a=` ${o.style.defaultAnswer(e.default===!1?"y/N":"Y/n")}`;let c=o.style.message(e.message,n);return`${u} ${c}${a} ${f}`});var Fr={validationFailureMode:"keep"},Ge=G((e,t)=>{let{prefill:r="tab"}=e,n=N(Fr,e.theme),[i,l]=L("idle"),[s,o]=L(String(e.default??"")),[u,f]=L(),[a,c]=L(""),d=M({status:i,theme:n});async function w(m){let{required:D,pattern:S,patternError:P="Invalid input"}=e;return D&&!m?"You must provide a value":S&&!S.test(m)?P:typeof e.validate=="function"?await e.validate(m)||"You must provide a valid value":!0}K(async(m,D)=>{if(i==="idle")if(A(m)){let S=a||s;l("loading");let P=await w(S);P===!0?(c(S),l("done"),t(S)):(n.validationFailureMode==="clear"?c(""):D.write(a),f(P),l("idle"))}else te(m)&&!a?o(""):re(m)&&!a?(o(""),D.clearLine(0),D.write(s),c(s)):(c(D.line),f(void 0))}),C(m=>{r==="editable"&&s&&(m.write(s),c(s))},[]);let h=n.style.message(e.message,i),p=a;typeof e.transformer=="function"?p=e.transformer(a,{isFinal:i==="done"}):i==="done"&&(p=n.style.answer(a));let g;s&&i!=="done"&&!a&&(g=n.style.defaultAnswer(s));let x="";return u&&(x=n.style.error(u)),[[d,h,g,p].filter(m=>m!==void 0).join(" "),x]});var Q=require("node:util");var Br={icon:{cursor:z.pointer},style:{disabled:e=>(0,Q.styleText)("dim",e),description:e=>(0,Q.styleText)("cyan",e),keysHelpTip:e=>e.map(([t,r])=>`${(0,Q.styleText)("bold",t)} ${(0,Q.styleText)("dim",r)}`).join((0,Q.styleText)("dim"," \u2022 "))},i18n:{disabledError:"This option is disabled and cannot be selected."},indexMode:"hidden",keybindings:[]};function qe(e){return!U.isSeparator(e)&&!e.disabled}function Je(e){return!U.isSeparator(e)}function Ir(e){return e.map(t=>{if(U.isSeparator(t))return t;if(typeof t!="object"||t===null||!("value"in t)){let i=String(t);return{value:t,name:i,short:i,disabled:!1}}let r=t.name??String(t.value),n={value:t.value,name:r,short:t.short??r,disabled:t.disabled??!1};return t.description&&(n.description=t.description),n})}var Se=G((e,t)=>{let{loop:r=!0,pageSize:n=7}=e,i=N(Br,e.theme),{keybindings:l}=i,[s,o]=L("idle"),u=M({status:s,theme:i}),f=W(),a=!l.includes("vim"),c=ie(()=>Ir(e.choices),[e.choices]),d=ie(()=>{let b=c.findIndex(Je),E=c.findLastIndex(Je);if(b===-1)throw new X("[select prompt] No selectable choices. All choices are disabled.");return{first:b,last:E}},[c]),w=ie(()=>"default"in e?c.findIndex(b=>qe(b)&&b.value===e.default):-1,[e.default,c]),[h,p]=L(w===-1?d.first:w),g=c[h],[x,m]=L();K((b,E)=>{if(clearTimeout(f.current),x&&m(void 0),A(b))g.disabled?m(i.i18n.disabledError):(o("done"),t(g.value));else if(ee(b,l)||fe(b,l)){if(E.clearLine(0),r||ee(b,l)&&h!==d.first||fe(b,l)&&h!==d.last){let y=ee(b,l)?-1:1,T=h;do T=(T+y+c.length)%c.length;while(!Je(c[T]));p(T)}}else if(Te(b)&&!Number.isNaN(Number(E.line))){let y=Number(E.line)-1,T=-1,_=c.findIndex(Z=>U.isSeparator(Z)?!1:(T++,T===y)),Ee=c[_];Ee!=null&&qe(Ee)&&p(_),f.current=setTimeout(()=>{E.clearLine(0)},700)}else if(te(b))E.clearLine(0);else if(a){let y=E.line.toLowerCase(),T=c.findIndex(_=>U.isSeparator(_)||!qe(_)?!1:_.name.toLowerCase().startsWith(y));T!==-1&&p(T),f.current=setTimeout(()=>{E.clearLine(0)},700)}}),C(()=>()=>{clearTimeout(f.current)},[]);let D=i.style.message(e.message,s),S=i.style.keysHelpTip([["\u2191\u2193","navigate"],["\u23CE","select"]]),P=0,O=_e({items:c,active:h,renderItem({item:b,isActive:E,index:y}){if(U.isSeparator(b))return P++,` ${b.separator}`;let T=E?i.icon.cursor:" ",_=i.indexMode==="number"?`${y+1-P}. `:"";if(b.disabled){let Z=typeof b.disabled=="string"?b.disabled:"(disabled)",$t=E?i.icon.cursor:"-";return i.style.disabled(`${$t} ${_}${b.name} ${Z}`)}return(E?i.style.highlight:Z=>Z)(`${T} ${_}${b.name}`)},pageSize:n,loop:r});if(s==="done")return[u,D,i.style.answer(g.short)].filter(Boolean).join(" ");let{description:v}=g;return`${[[u,D].filter(Boolean).join(" "),O," ",v?i.style.description(v):"",x?i.style.error(x):"",S].filter(Boolean).join(`
19
- `).trimEnd()}${Bt}`});var Vt=process.cwd();(async()=>{let{projectName:e,projectVersion:t,vulnId:r}=await Ur();await Qe({workingDir:Vt,projectName:e,projectVersion:t,vulnId:r})})();async function Ur(){let e=process.argv[2];if(!e)return _r();let t=process.argv[3];if(!t)throw new Error("Missing project version.");let r=process.argv[4];return{projectName:e,projectVersion:t,vulnId:r}}async function _r(){try{let e=await ce({workingDir:Vt}),t=new Map;e.projects.forEach(u=>{let f=t.get(u.name);if(!f){t.set(u.name,[u.version]);return}f.push(u.version)});let r=Array.from(t.keys());r.sort();let n=await Se({message:"Choose project name:",choices:r.map(u=>({name:u,value:u})),pageSize:15}),i=t.get(n);i.sort();let l=await Se({message:"Choose project version:",choices:i.map(u=>({name:u,value:u})),pageSize:15}),s=await Ge({message:`Enter a CVE name from where the project should be removed (e.g. CVE-2023-52070)
17
+ `,r+=It,this.write(r),this.rl.close()}};var De=class extends Promise{static withResolver(){let t,r;return{promise:new Promise((i,l)=>{t=i,r=l}),resolve:t,reject:r}}};var Ot=A(require("node:path"),1),Fr=globalThis.setImmediate;function Br(){let e=Error.prepareStackTrace,t=[];try{Error.prepareStackTrace=(r,n)=>{let i=n.slice(1);return t=i,i},new Error().stack}catch{return t}return Error.prepareStackTrace=e,t}function q(e){let t=Br();return(n,i={})=>{let{input:l=process.stdin,signal:s}=i,o=new Set,u=new kt.default;u.pipe(i.output??process.stdout);let f=Ct.createInterface({terminal:!0,input:l,output:u});u.mute();let a=new se(f),{promise:c,resolve:d,reject:x}=De.withResolver(),m=()=>x(new pe);if(s){let h=()=>x(new de({cause:s.reason}));if(s.aborted)return h(),Object.assign(c,{cancel:m});s.addEventListener("abort",h),o.add(()=>s.removeEventListener("abort",h))}o.add(Rt((h,b)=>{x(new ne(`User force closed the prompt with ${h} ${b}`))}));let p=()=>x(new ne("User force closed the prompt with SIGINT"));return f.on("SIGINT",p),o.add(()=>f.removeListener("SIGINT",p)),et(f,h=>{let b=Nt.AsyncResource.bind(()=>M.clearAll());f.on("close",b),o.add(()=>f.removeListener("close",b));let g=()=>{let D=()=>a.checkCursorPos();f.input.on("keypress",D),o.add(()=>f.input.removeListener("keypress",D));let S=null;h(()=>{let v=!1;try{let P=e(n,w=>{v?d(w):S={value:w}});if(P===void 0){let w=t[1]?.getFileName();throw w&&!w.startsWith("file://")&&(w=Ot.default.resolve(w)),new Error(`Prompt functions must return a string.
18
+ at ${w}`)}let[R,F]=typeof P=="string"?[P]:P;a.render(R,F),M.run()}catch(P){x(P)}if(v=!0,S!==null){let{value:P}=S;S=null,d(P)}})};return"readableFlowing"in l?Fr(g):g(),Object.assign(c.then(D=>(M.clearAll(),D),D=>{throw M.clearAll(),D}).finally(()=>{o.forEach(D=>D()),a.done({clearContent:!!i.clearPromptOnDone}),u.end()}).then(()=>c),{cancel:m})})}}var jt=require("node:util");var _=class{separator=(0,jt.styleText)("dim",Array.from({length:15}).join(z.line));type="separator";constructor(t){t&&(this.separator=t)}static isSeparator(t){return!!(t&&typeof t=="object"&&"type"in t&&t.type==="separator")}};function At(e,t){let r=t!==!1;return/^(y|yes)/i.test(e)?r=!0:/^(n|no)/i.test(e)&&(r=!1),r}function Vt(e){return e?"Yes":"No"}var He=q((e,t)=>{let{transformer:r=Vt}=e,[n,i]=L("idle"),[l,s]=L(""),o=k(e.theme),u=W({status:n,theme:o});H((d,x)=>{if(n==="idle")if(V(d)){let m=At(l,e.default);s(r(m)),i("done"),t(m)}else if(re(d)){let m=Vt(!At(l,e.default));x.clearLine(0),x.write(m),s(m)}else s(x.line)});let f=l,a="";n==="done"?f=o.style.answer(l):a=` ${o.style.defaultAnswer(e.default===!1?"y/N":"Y/n")}`;let c=o.style.message(e.message,n);return`${u} ${c}${a} ${f}`});var Ir={validationFailureMode:"keep"},Ge=q((e,t)=>{let{prefill:r="tab"}=e,n=k(Ir,e.theme),[i,l]=L("idle"),[s,o]=L(String(e.default??"")),[u,f]=L(),[a,c]=L(""),d=W({status:i,theme:n});async function x(g){let{required:D,pattern:S,patternError:v="Invalid input"}=e;return D&&!g?"You must provide a value":S&&!S.test(g)?v:typeof e.validate=="function"?await e.validate(g)||"You must provide a valid value":!0}H(async(g,D)=>{if(i==="idle")if(V(g)){let S=a||s;l("loading");let v=await x(S);v===!0?(c(S),l("done"),t(S)):(n.validationFailureMode==="clear"?c(""):D.write(a),f(v),l("idle"))}else te(g)&&!a?o(""):re(g)&&!a?(o(""),D.clearLine(0),D.write(s),c(s)):(c(D.line),f(void 0))}),N(g=>{r==="editable"&&s&&(g.write(s),c(s))},[]);let m=n.style.message(e.message,i),p=a;typeof e.transformer=="function"?p=e.transformer(a,{isFinal:i==="done"}):i==="done"&&(p=n.style.answer(a));let h;s&&i!=="done"&&!a&&(h=n.style.defaultAnswer(s));let b="";return u&&(b=n.style.error(u)),[[d,m,h,p].filter(g=>g!==void 0).join(" "),b]});var Q=require("node:util");var Ur={icon:{cursor:z.pointer},style:{disabled:e=>(0,Q.styleText)("dim",e),description:e=>(0,Q.styleText)("cyan",e),keysHelpTip:e=>e.map(([t,r])=>`${(0,Q.styleText)("bold",t)} ${(0,Q.styleText)("dim",r)}`).join((0,Q.styleText)("dim"," \u2022 "))},i18n:{disabledError:"This option is disabled and cannot be selected."},indexMode:"hidden",keybindings:[]};function qe(e){return!_.isSeparator(e)&&!e.disabled}function Je(e){return!_.isSeparator(e)}function _r(e){return e.map(t=>{if(_.isSeparator(t))return t;if(typeof t!="object"||t===null||!("value"in t)){let i=String(t);return{value:t,name:i,short:i,disabled:!1}}let r=t.name??String(t.value),n={value:t.value,name:r,short:t.short??r,disabled:t.disabled??!1};return t.description&&(n.description=t.description),n})}var Se=q((e,t)=>{let{loop:r=!0,pageSize:n=7}=e,i=k(Ur,e.theme),{keybindings:l}=i,[s,o]=L("idle"),u=W({status:s,theme:i}),f=K(),a=!l.includes("vim"),c=ie(()=>_r(e.choices),[e.choices]),d=ie(()=>{let w=c.findIndex(Je),E=c.findLastIndex(Je);if(w===-1)throw new X("[select prompt] No selectable choices. All choices are disabled.");return{first:w,last:E}},[c]),x=ie(()=>"default"in e?c.findIndex(w=>qe(w)&&w.value===e.default):-1,[e.default,c]),[m,p]=L(x===-1?d.first:x),h=c[m];if(h==null||_.isSeparator(h))throw new Error("Active index does not point to a choice");let[b,g]=L();H((w,E)=>{if(clearTimeout(f.current),b&&g(void 0),V(w))h.disabled?g(i.i18n.disabledError):(o("done"),t(h.value));else if(ee(w,l)||fe(w,l)){if(E.clearLine(0),r||ee(w,l)&&m!==d.first||fe(w,l)&&m!==d.last){let y=ee(w,l)?-1:1,T=m;do T=(T+y+c.length)%c.length;while(!Je(c[T]));p(T)}}else if(Te(w)&&!Number.isNaN(Number(E.line))){let y=Number(E.line)-1,T=-1,C=c.findIndex(Z=>_.isSeparator(Z)?!1:(T++,T===y)),Ee=c[C];Ee!=null&&qe(Ee)&&p(C),f.current=setTimeout(()=>{E.clearLine(0)},700)}else if(te(w))E.clearLine(0);else if(a){let y=E.line.toLowerCase(),T=c.findIndex(C=>_.isSeparator(C)||!qe(C)?!1:C.name.toLowerCase().startsWith(y));T!==-1&&p(T),f.current=setTimeout(()=>{E.clearLine(0)},700)}}),N(()=>()=>{clearTimeout(f.current)},[]);let D=i.style.message(e.message,s),S=i.style.keysHelpTip([["\u2191\u2193","navigate"],["\u23CE","select"]]),v=0,P=_e({items:c,active:m,renderItem({item:w,isActive:E,index:y}){if(_.isSeparator(w))return v++,` ${w.separator}`;let T=E?i.icon.cursor:" ",C=i.indexMode==="number"?`${y+1-v}. `:"";if(w.disabled){let Z=typeof w.disabled=="string"?w.disabled:"(disabled)",Mt=E?i.icon.cursor:"-";return i.style.disabled(`${Mt} ${C}${w.name} ${Z}`)}return(E?i.style.highlight:Z=>Z)(`${T} ${C}${w.name}`)},pageSize:n,loop:r});if(s==="done")return[u,D,i.style.answer(h.short)].filter(Boolean).join(" ");let{description:R}=h;return`${[[u,D].filter(Boolean).join(" "),P," ",R?i.style.description(R):"",b?i.style.error(b):"",S].filter(Boolean).join(`
19
+ `).trimEnd()}${Bt}`});var $t=process.cwd();(async()=>{let{projectName:e,projectVersion:t,vulnId:r}=await Cr();await Qe({workingDir:$t,projectName:e,projectVersion:t,vulnId:r})})();async function Cr(){let e=process.argv[2];if(!e)return Nr();let t=process.argv[3];if(!t)throw new Error("Missing project version.");let r=process.argv[4];return{projectName:e,projectVersion:t,vulnId:r}}async function Nr(){try{let e=await ce({workingDir:$t}),t=new Map;e.projects.forEach(u=>{let f=t.get(u.name);if(!f){t.set(u.name,[u.version]);return}f.push(u.version)});let r=Array.from(t.keys());r.sort();let n=await Se({message:"Choose project name:",choices:r.map(u=>({name:u,value:u})),pageSize:15}),i=t.get(n);i.sort();let l=await Se({message:"Choose project version:",choices:i.map(u=>({name:u,value:u})),pageSize:15}),s=await Ge({message:`Enter a CVE name from where the project should be removed (e.g. CVE-2023-52070)
20
20
  if empty the project is complete removed.:`,required:!1});return await He({message:`The project ${n}@${l} will be removed${s?`from ${s}`:" completely"}.
21
21
  Do you want to proceed?`})||(console.log("Aborted."),process.exit(0)),{projectName:n,projectVersion:l,vulnId:s}}catch(e){console.log(`Aborted: ${e}`),process.exit(0)}}