@visulima/vis 1.0.0-alpha.3 → 1.0.0-alpha.30
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.
- package/CHANGELOG.md +1117 -24
- package/LICENSE.md +11958 -0
- package/README.md +344 -20
- package/dashboard/dist/index.html +152 -0
- package/dist/bin.js +1 -146
- package/dist/binx.js +3 -0
- package/dist/config/index.d.ts +3154 -0
- package/dist/config/index.js +1 -0
- package/dist/generate/index.d.ts +157 -0
- package/dist/generate/index.js +1 -0
- package/dist/packem_chunks/bin.js +1415 -0
- package/dist/packem_chunks/bloom-status.js +2 -0
- package/dist/packem_chunks/bloom-sync.js +2 -0
- package/dist/packem_chunks/cache-attestation.js +1 -0
- package/dist/packem_chunks/config.js +19 -0
- package/dist/packem_chunks/devtools.js +82 -0
- package/dist/packem_chunks/doctor-probe.js +2 -0
- package/dist/packem_chunks/fix.js +11 -0
- package/dist/packem_chunks/handler.js +1 -0
- package/dist/packem_chunks/handler10.js +1 -0
- package/dist/packem_chunks/handler11.js +5 -0
- package/dist/packem_chunks/handler12.js +1 -0
- package/dist/packem_chunks/handler13.js +27 -0
- package/dist/packem_chunks/handler14.js +5 -0
- package/dist/packem_chunks/handler15.js +1 -0
- package/dist/packem_chunks/handler16.js +1 -0
- package/dist/packem_chunks/handler17.js +1 -0
- package/dist/packem_chunks/handler18.js +1 -0
- package/dist/packem_chunks/handler19.js +1 -0
- package/dist/packem_chunks/handler2.js +4 -0
- package/dist/packem_chunks/handler20.js +5 -0
- package/dist/packem_chunks/handler21.js +2 -0
- package/dist/packem_chunks/handler22.js +2 -0
- package/dist/packem_chunks/handler23.js +1 -0
- package/dist/packem_chunks/handler24.js +1 -0
- package/dist/packem_chunks/handler25.js +5 -0
- package/dist/packem_chunks/handler26.js +1 -0
- package/dist/packem_chunks/handler27.js +3 -0
- package/dist/packem_chunks/handler28.js +1 -0
- package/dist/packem_chunks/handler29.js +7 -0
- package/dist/packem_chunks/handler3.js +4 -0
- package/dist/packem_chunks/handler30.js +33 -0
- package/dist/packem_chunks/handler31.js +3 -0
- package/dist/packem_chunks/handler32.js +8 -0
- package/dist/packem_chunks/handler33.js +1 -0
- package/dist/packem_chunks/handler34.js +5 -0
- package/dist/packem_chunks/handler35.js +11 -0
- package/dist/packem_chunks/handler36.js +3 -0
- package/dist/packem_chunks/handler37.js +22 -0
- package/dist/packem_chunks/handler38.js +61 -0
- package/dist/packem_chunks/handler39.js +3 -0
- package/dist/packem_chunks/handler4.js +6 -0
- package/dist/packem_chunks/handler40.js +6 -0
- package/dist/packem_chunks/handler41.js +24 -0
- package/dist/packem_chunks/handler42.js +153 -0
- package/dist/packem_chunks/handler43.js +25 -0
- package/dist/packem_chunks/handler44.js +10 -0
- package/dist/packem_chunks/handler45.js +708 -0
- package/dist/packem_chunks/handler46.js +24 -0
- package/dist/packem_chunks/handler47.js +322 -0
- package/dist/packem_chunks/handler48.js +48 -0
- package/dist/packem_chunks/handler49.js +3 -0
- package/dist/packem_chunks/handler5.js +8 -0
- package/dist/packem_chunks/handler50.js +27 -0
- package/dist/packem_chunks/handler51.js +195 -0
- package/dist/packem_chunks/handler52.js +34 -0
- package/dist/packem_chunks/handler6.js +1 -0
- package/dist/packem_chunks/handler7.js +1 -0
- package/dist/packem_chunks/handler8.js +1 -0
- package/dist/packem_chunks/handler9.js +1 -0
- package/dist/packem_chunks/heal-accept.js +10 -0
- package/dist/packem_chunks/heal.js +14 -0
- package/dist/packem_chunks/help-command.js +8 -0
- package/dist/packem_chunks/index.js +7 -0
- package/dist/packem_chunks/keys-refresh.js +4 -0
- package/dist/packem_chunks/list.js +3 -0
- package/dist/packem_chunks/loader.js +4 -0
- package/dist/packem_chunks/loader2.js +1 -0
- package/dist/packem_chunks/prune.js +3 -0
- package/dist/packem_chunks/run.js +1 -0
- package/dist/packem_chunks/status.js +2 -0
- package/dist/packem_chunks/sync.js +2 -0
- package/dist/packem_chunks/sync2.js +2 -0
- package/dist/packem_chunks/tar.js +3 -0
- package/dist/packem_chunks/tripwire.js +2 -0
- package/dist/packem_chunks/verify-lockfile.js +2 -0
- package/dist/packem_shared/Table-DoSoazT6-DwnyTUsA.js +12 -0
- package/dist/packem_shared/_commonjsHelpers-CLblCigl.js +1 -0
- package/dist/packem_shared/advisories-BxXiKFbL.js +1 -0
- package/dist/packem_shared/affected-shas-BdnlfiV1.js +1 -0
- package/dist/packem_shared/ai-analysis-KP8b5lc0.js +68 -0
- package/dist/packem_shared/ai-fix-BkPUHA0z.js +43 -0
- package/dist/packem_shared/anolilab-text-CAM_E6uK.js +13 -0
- package/dist/packem_shared/applyDefaults-BogleaFi.js +1 -0
- package/dist/packem_shared/build-scripts-DE6U8jVq.js +1 -0
- package/dist/packem_shared/cyclonedx-BpGVHqSW.js +4 -0
- package/dist/packem_shared/definePlugin-CWm4Dv_t.js +1 -0
- package/dist/packem_shared/dependency-scan-BUbOcMwX.js +1 -0
- package/dist/packem_shared/docker-CTE3s4LW.js +60 -0
- package/dist/packem_shared/failure-log-34Wl3npC.js +2 -0
- package/dist/packem_shared/giget-CcEy_Elm.js +2 -0
- package/dist/packem_shared/glob-D_7bct6p-D8itOHsr.js +1 -0
- package/dist/packem_shared/index-D1xC1Y_R.js +1 -0
- package/dist/packem_shared/index-DH-5hsrC.js +1 -0
- package/dist/packem_shared/index-hoWfZmNo.js +30 -0
- package/dist/packem_shared/license-zZU7aavK.js +1 -0
- package/dist/packem_shared/lifecycle-CXaqPGAQ.js +2 -0
- package/dist/packem_shared/lockfile-CrT86D6d.js +1 -0
- package/dist/packem_shared/lockfile-Cu2BH6bl.js +1 -0
- package/dist/packem_shared/manifests-BzWpKW8F.js +1 -0
- package/dist/packem_shared/min-release-age-BPVXwPUg.js +34 -0
- package/dist/packem_shared/native-config-sync-BRZZetn3.js +21 -0
- package/dist/packem_shared/osv-bloom-DSZcHLsM.js +2 -0
- package/dist/packem_shared/otelPlugin-CJR2T_lk.js +1 -0
- package/dist/packem_shared/peer-warnings-EvSJ18gE.js +1 -0
- package/dist/packem_shared/pm-runner-DmKT2FqF.js +1 -0
- package/dist/packem_shared/provenance-DkCA8BrN.js +1 -0
- package/dist/packem_shared/readFileSync-DseCu8sg-DEq4Fn3a.js +1 -0
- package/dist/packem_shared/registry-keys-Mixm4eAY.js +1 -0
- package/dist/packem_shared/resolve-explicit-D5E72FfN.js +5 -0
- package/dist/packem_shared/runtime-check-CilFOqUU.js +1 -0
- package/dist/packem_shared/s1ngularity-Qxc6tRRI.js +1 -0
- package/dist/packem_shared/scan-progress-DVtCtI2z.js +2 -0
- package/dist/packem_shared/selectors-DkgYFzdq.js +3 -0
- package/dist/packem_shared/signatures-byuFrtAH.js +2 -0
- package/dist/packem_shared/spinner-C8xs6QZv.js +1 -0
- package/dist/packem_shared/spinners-f91Rbo99-Bjf3NcO0.js +1 -0
- package/dist/packem_shared/symbols-CQmER5MT.js +1 -0
- package/dist/packem_shared/tabs-xZkm6Y_J.js +1 -0
- package/dist/packem_shared/toolchain-DoG6b_G_.js +5 -0
- package/dist/packem_shared/typosquats-BiDxQj7R.js +1 -0
- package/dist/packem_shared/use-measured-height-Lea6TCVD.js +1 -0
- package/dist/packem_shared/utils-DrNg0XTR.js +1 -0
- package/dist/packem_shared/verify-cLcZwKqe.js +1 -0
- package/dist/packem_shared/vis-update-app-BCKzlqj8.js +1 -0
- package/dist/packem_shared/watch-DEL0yol9.js +1 -0
- package/dist/packem_shared/watch-loop-C31Ar7BX.js +11 -0
- package/index.d.ts +436 -0
- package/index.js +613 -0
- package/package.json +71 -26
- package/schemas/project.schema.json +991 -0
- package/schemas/vis-config.schema.json +4958 -0
- package/skills/vis/SKILL.md +96 -0
- package/templates/buildkite-ci/.buildkite/pipeline.yml.tera +85 -0
- package/templates/buildkite-ci/template.yml +20 -0
- package/dist/ai-analysis.d.ts +0 -40
- package/dist/ai-cache.d.ts +0 -21
- package/dist/bin.d.ts +0 -1
- package/dist/catalog.d.ts +0 -110
- package/dist/commands/affected.d.ts +0 -3
- package/dist/commands/ai.d.ts +0 -3
- package/dist/commands/analyze.d.ts +0 -3
- package/dist/commands/check.d.ts +0 -3
- package/dist/commands/graph.d.ts +0 -3
- package/dist/commands/hook/constants.d.ts +0 -8
- package/dist/commands/hook/index.d.ts +0 -3
- package/dist/commands/hook/install.d.ts +0 -7
- package/dist/commands/hook/migrate.d.ts +0 -27
- package/dist/commands/hook/uninstall.d.ts +0 -3
- package/dist/commands/migrate/constants.d.ts +0 -12
- package/dist/commands/migrate/deps.d.ts +0 -32
- package/dist/commands/migrate/index.d.ts +0 -3
- package/dist/commands/migrate/json.d.ts +0 -20
- package/dist/commands/migrate/lint-staged.d.ts +0 -62
- package/dist/commands/migrate/types.d.ts +0 -20
- package/dist/commands/run.d.ts +0 -3
- package/dist/commands/staged.d.ts +0 -3
- package/dist/commands/update.d.ts +0 -3
- package/dist/config.d.ts +0 -40
- package/dist/config.js +0 -1
- package/dist/package-manager.d.ts +0 -23
- package/dist/workspace.d.ts +0 -58
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var m=Object.defineProperty;var a=(o,r)=>m(o,"name",{value:r,configurable:!0});import{e as l,E as f,I as u}from"../packem_shared/Table-DoSoazT6-DwnyTUsA.js";import{p as i}from"./bin.js";import{g as $}from"../packem_shared/osv-bloom-DSZcHLsM.js";var d=Object.defineProperty,n=a((o,r)=>d(o,"name",{value:r,configurable:!0}),"s");const c=n(o=>{if(!o)return"never";const r=Date.parse(o);if(Number.isNaN(r))return o;const t=Date.now()-r;if(t<0)return o;const e=Math.floor(t/6e4);if(e<1)return"just now";if(e<60)return`${e}m ago`;const s=Math.floor(e/60);return s<24?`${s}h ago`:`${Math.floor(s/24)}d ago`},"formatRelative"),p=n(o=>o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`,"formatBytes"),g=n(async({options:o,workspaceRoot:r})=>{if(!r)throw new Error("Could not determine workspace root. Run this command inside a workspace.");const t=await $(r,o.cacheDir);if(o.format==="json"){process.stdout.write(`${JSON.stringify(t,void 0,2)}
|
|
2
|
+
`);return}if(i.info(`Cache: ${t.cacheDir}`),!t.present){i.warn(`No osv-bloom filter yet. Run ${l("vis advisories bloom sync")} to populate.`);return}if(t.manifest){const{manifest:e}=t;i.info(`Built: ${e.builtAtRfc3339} (${c(e.builtAtRfc3339)})`),i.info(`Fetch: ${t.fetchedAtIso??f("—")} (${c(t.fetchedAtIso)})`),i.info(`Filter: ${u(p(e.bloomByteLen))} m=${e.bloomMBits.toLocaleString()} bits k=${String(e.bloomKHashes)}`),i.info(`Set: ${e.entryCount.toLocaleString()} entries from ${e.advisoryCount.toLocaleString()} advisories (target FPR ${e.targetFpr})`),i.info(f(`Digest: ${e.setDigestSha256}`))}else i.warn("filter.bin present but manifest.json missing — `vis advisories bloom sync` will rewrite the cache.")},"execute"),y=g;export{y as advisoriesBloomStatusExecute};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var D=Object.defineProperty;var f=(o,t)=>D(o,"name",{value:t,configurable:!0});import{E as d}from"../packem_shared/Table-DoSoazT6-DwnyTUsA.js";import{p as n}from"./bin.js";import{s as b}from"../packem_shared/scan-progress-DVtCtI2z.js";import{s as y,D as h}from"../packem_shared/osv-bloom-DSZcHLsM.js";var v=Object.defineProperty,a=f((o,t)=>v(o,"name",{value:t,configurable:!0}),"s");const w=a(o=>o?.security?.audit?.advisories?.bloom??{},"readBloomConfig"),p=a(o=>o>=1e3?`${(o/1e3).toFixed(1)}s`:`${Math.round(o)}ms`,"formatDuration"),$=a(o=>o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`,"formatBytes"),B=a(async({options:o,visConfig:t,workspaceRoot:c})=>{if(!c)throw new Error("Could not determine workspace root. Run this command inside a workspace.");const l=o.format==="json",m=w(t),u=o.source??m.source??h,s=b([{id:"bloom",label:"Sync osv-bloom prefilter"}],{live:!l});let e,r;try{s.start("bloom");const i=Date.now();e=await y({allowedHosts:m.allowedHosts,cacheDir:o.cacheDir,force:!!o.force,source:u,workspaceRoot:c}),e.upToDate?s.finish("bloom","ok",`up to date · ${p(Date.now()-i)}`):s.finish("bloom","ok",`${e.manifest.entryCount.toLocaleString()} entries · ${$(e.bytesOnDisk)} · ${p(e.durationMs)}`)}catch(i){r=i instanceof Error?i.message:String(i),s.finish("bloom","error",r)}finally{s.stop()}l?process.stdout.write(`${JSON.stringify({bytesOnDisk:e?.bytesOnDisk??0,cacheDir:e?.cacheDir??null,durationMs:e?.durationMs??0,error:r??null,manifest:e?.manifest??null,source:u,upToDate:e?.upToDate??!1},void 0,2)}
|
|
2
|
+
`):e&&(n.info(d(`Cache: ${e.cacheDir}`)),n.info(d(`Built: ${e.manifest.builtAtRfc3339}`)),r||n.success(e.upToDate?"osv-bloom prefilter up to date.":"osv-bloom prefilter synced.")),r&&(process.exitCode=1)},"execute"),x=B;export{x as advisoriesBloomSyncExecute};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var R=Object.defineProperty;var p=(e,t)=>R(e,"name",{value:t,configurable:!0});import{createRequire as I}from"node:module";import{loadOptionalSigstore as h}from"./loader.js";const b=I(import.meta.url),u=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,_=p(e=>{if(typeof u<"u"&&u.versions&&u.versions.node){const[t,n]=u.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return u.getBuiltinModule(e)}return b(e)},"__cjs_getBuiltinModule"),{createHash:v}=_("node:crypto"),{createReadStream:x}=_("node:fs");var O=Object.defineProperty,s=p((e,t)=>O(e,"name",{value:t,configurable:!0}),"r");const S="https://token.actions.githubusercontent.com",m=s(e=>e.replaceAll(/[$()*+.?[\\\]^{|}]/g,String.raw`\$&`),"escapeRegex"),$=s(e=>{if("github"in e){const{ref:t,repo:n,workflow:r}=e.github;return{issuer:S,sanPattern:`^${m(`https://github.com/${n}/${r}@${t}`)}$`}}return"sanRegex"in e?{issuer:e.oidcIssuer,sanPattern:e.sanRegex}:{issuer:e.oidcIssuer,sanPattern:`^${m(e.san)}$`}},"normalizeExpectedIdentity"),P=s(()=>process.env.CI==="true"||typeof process.env.ACTIONS_ID_TOKEN_REQUEST_URL=="string"||typeof process.env.SIGSTORE_ID_TOKEN=="string","hasAmbientOidc"),w=s(e=>new Promise((t,n)=>{const r=v("sha256"),a=x(e);a.on("error",n),a.on("data",i=>r.update(i)),a.on("end",()=>{t(Buffer.from(r.digest("hex")))})}),"digestFile"),A=1024,T=s(e=>{const{issuer:t,sanPattern:n}=$(e.expectedIdentity),r=new Map,a=s((i,o)=>{let f;try{f=JSON.parse(o)}catch{return Promise.resolve(!1)}return(async()=>{let c;try{c=await w(i)}catch{return!1}const l=`${c.toString("utf8")}:${v("sha256").update(o).digest("hex")}`,g=r.get(l);if(g)return g;const y=(async()=>{try{return await(await h({workspaceRoot:e.workspaceRoot})).verify(f,c,{certificateIdentityURI:n,certificateIssuer:t}),!0}catch(d){return e.onVerifyFailure?.(d instanceof Error?d.message:String(d)),!1}})();return r.size>=A&&r.clear(),r.set(l,y),y})()},"verifyOnce");return{expectedIdentity:e.expectedIdentity,onReject:e.onReject,requireOnDownload:e.requireOnDownload??!1,signArtifact:s(async({archivePath:i})=>{if(!P())return null;const o=await h({workspaceRoot:e.workspaceRoot}),f=await w(i),c=await o.sign(f);return JSON.stringify(c)},"signArtifact"),verifyArtifact:s(({archivePath:i,attestation:o})=>a(i,o),"verifyArtifact")}},"buildCacheAttestationHooks");export{T as buildCacheAttestationHooks,$ as normalizeExpectedIdentity};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
var Un=Object.defineProperty;var h=(e,t)=>Un(e,"name",{value:t,configurable:!0});import{createRequire as Kn}from"node:module";import{n as Ut,B as Yn,U as Kt,l as R,_ as Et,K as Oe,s as Qn,M as S,a as Ht}from"../packem_shared/readFileSync-DseCu8sg-DEq4Fn3a.js";import{createJiti as Zt}from"jiti";import"../packem_shared/otelPlugin-CJR2T_lk.js";import"../packem_shared/definePlugin-CWm4Dv_t.js";const Hn=Kn(import.meta.url),ge=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,rt=h(e=>{if(typeof ge<"u"&&ge.versions&&ge.versions.node){const[t,r]=ge.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return ge.getBuiltinModule(e)}return Hn(e)},"__cjs_getBuiltinModule"),{createHash:qt}=rt("node:crypto"),{readdirSync:Gt,readFileSync:Zn,copyFileSync:Jn,unlinkSync:Xn}=rt("node:fs"),{createRequire:ke}=rt("node:module");var eo=Object.defineProperty,D=h((e,t)=>eo(e,"name",{value:t,configurable:!0}),"O$2"),to=Object.defineProperty,O=D((e,t)=>to(e,"name",{value:t,configurable:!0}),"h");const ro=ke(import.meta.url),se=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,no=O(e=>{if(typeof se<"u"&&se.versions&&se.versions.node){const[t,r]=se.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return se.getBuiltinModule(e)}return ro(e)},"__cjs_getBuiltinModule"),{env:ie,cwd:Jt}=se,{createRequire:ue}=no("node:module"),Xt=0,ae=2,Yt=Symbol("findUpStop");var oo=Object.defineProperty,so=O((e,t)=>oo(e,"name",{value:t,configurable:!0}),"e$1");const nt=so(e=>{if(!e||!(e instanceof URL)&&typeof e!="string")throw new TypeError("Path must be a non-empty string or URL.")},"t");var io=Object.defineProperty,ao=O((e,t)=>io(e,"name",{value:t,configurable:!0}),"r");const Pt=ao(e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},"r");var co=Object.defineProperty,Qt=O((e,t)=>co(e,"name",{value:t,configurable:!0}),"s$4");const uo=ue(import.meta.url),he=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,lo=Qt(e=>{if(typeof he<"u"&&he.versions&&he.versions.node){const[t,r]=he.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return he.getBuiltinModule(e)}return uo(e)},"u"),{lstatSync:At,mkdirSync:fo}=lo("node:fs"),po=Qt(e=>{nt(e);try{const t=At(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Pt(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{fo(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const r=At(e);if(!r.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Pt(r))}'`,{cause:t})}},"g");var go=Object.defineProperty,ho=O((e,t)=>go(e,"name",{value:t,configurable:!0}),"$e"),mo=Object.defineProperty,ot=ho((e,t)=>mo(e,"name",{value:t,configurable:!0}),"W"),yo=Object.defineProperty,g=ot((e,t)=>yo(e,"name",{value:t,configurable:!0}),"u$1");let Ct=g(()=>{var e=(()=>{var t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,c=g((o,s)=>{for(var a in s)t(o,a,{get:s[a],enumerable:!0})},"ne"),f=g((o,s,a,l)=>{if(s&&typeof s=="object"||typeof s=="function")for(let u of n(s))!i.call(o,u)&&u!==a&&t(o,u,{get:g(()=>s[u],"get"),enumerable:!(l=r(s,u))||l.enumerable});return o},"ae"),d=g(o=>f(t({},"__esModule",{value:!0}),o),"oe"),v={};c(v,{zeptomatch:g(()=>Tt,"zeptomatch")});var w=g(o=>{const s=new Set,a=[o];for(let l=0;l<a.length;l++){const u=a[l];if(s.has(u))continue;s.add(u);const{children:p}=u;if(p?.length)for(let m=0,x=p.length;m<x;m++)a.push(p[m])}return Array.from(s)},"M"),$=g(o=>{let s="";const a=w(o);for(let l=0,u=a.length;l<u;l++){const p=a[l];if(!p.regex)continue;const m=p.regex.flags;if(s||(s=m),s!==m)throw new Error(`Inconsistent RegExp flags used: "${s}" and "${m}"`)}return s},"se"),y=g((o,s,a)=>{const l=a.get(o);if(l!==void 0)return l;const u=o.partial??s;let p="";if(o.regex&&(p+=u?"(?:$|":"",p+=o.regex.source),o.children?.length){const m=T(o.children.map(x=>y(x,s,a)).filter(Boolean));if(m?.length){const x=o.children.some(pe=>!pe.regex||!(pe.partial??s)),A=m.length>1||u&&(!p.length||x);p+=A?u?"(?:$|":"(?:":"",p+=m.join("|"),p+=A?")":""}}return o.regex&&(p+=u?")":""),a.set(o,p),p},"O"),P=g((o,s)=>{const a=new Map,l=w(o);for(let u=l.length-1;u>=0;u--){const p=y(l[u],s,a);if(!(u>0))return p}return""},"ie"),T=g(o=>Array.from(new Set(o)),"ue"),j=g((o,s,a)=>j.compile(o,a).test(s),"R");j.compile=(o,s)=>{const a=s?.partial??!1,l=P(o,a),u=$(o);return new RegExp(`^(?:${l})$`,u)};var N=j,F=g((o,s)=>{const a=N.compile(o,s),l=`${a.source.slice(0,-1)}[\\\\/]?$`,u=a.flags;return new RegExp(l,u)},"le"),ee=F,Fe=g(o=>{const s=o.map(l=>l.source).join("|")||"$^",a=o[0]?.flags;return new RegExp(s,a)},"ve"),We=Fe,te=g(o=>Array.isArray(o),"j"),W=g(o=>typeof o=="function","_"),Le=g(o=>o.length===0,"he"),Ve=(()=>{const{toString:o}=Function.prototype,s=/(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;return a=>(a.length===0||a.length===1)&&s.test(o.call(a))})(),Pr=g(o=>typeof o=="number","de"),Ar=g(o=>typeof o=="object"&&o!==null,"xe"),Cr=g(o=>o instanceof RegExp,"me"),Sr=(()=>{const o=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return s=>o.test(s.source)})(),Nr=(()=>{const o=/^[a-zA-Z0-9_-]+$/;return s=>o.test(s.source)&&!s.flags.includes("i")})(),lt=g(o=>typeof o=="string","A"),U=g(o=>o===void 0,"f"),Mr=g(o=>{const s=new Map;return a=>{const l=s.get(a);if(l!==void 0)return l;const u=o(a);return s.set(a,u),u}},"ye"),ft=g((o,s,a={})=>{const l={cache:{},input:o,index:0,indexBacktrackMax:0,options:a,output:[]},u=K(s)(l),p=Math.max(l.index,l.indexBacktrackMax);if(u&&l.index===o.length)return l.output;throw new Error(`Failed to parse at index ${p}`)},"I"),b=g((o,s)=>te(o)?zr(o,s):lt(o)?pt(o,s):_r(o,s),"i"),zr=g((o,s)=>{const a={};for(const l of o){if(l.length!==1)throw new Error(`Invalid character: "${l}"`);const u=l.charCodeAt(0);a[u]=!0}return l=>{const u=l.input;let p=l.index,m=p;for(;m<u.length&&u.charCodeAt(m)in a;)m+=1;if(m>p){if(!U(s)&&!l.options.silent){const x=u.slice(p,m),A=W(s)?s(x,u,`${p}`):s;U(A)||l.output.push(A)}l.index=m}return!0}},"we"),_r=g((o,s)=>{if(Nr(o))return pt(o.source,s);{const a=o.source,l=o.flags.replace(/y|$/,"y"),u=new RegExp(a,l);return Sr(o)&&W(s)&&!Ve(s)?Rr(u,s):Dr(u,s)}},"$e"),Rr=g((o,s)=>a=>{const l=a.index,u=a.input;o.lastIndex=l;const p=o.exec(u);if(p){const m=o.lastIndex;if(!a.options.silent){const x=s(...p,u,`${l}`);U(x)||a.output.push(x)}return a.index=m,!0}else return!1},"Ee"),Dr=g((o,s)=>a=>{const l=a.index,u=a.input;if(o.lastIndex=l,o.test(u)){const p=o.lastIndex;if(!U(s)&&!a.options.silent){const m=W(s)?s(u.slice(l,p),u,`${l}`):s;U(m)||a.output.push(m)}return a.index=p,!0}else return!1},"Ce"),pt=g((o,s)=>a=>{const l=a.index,u=a.input;if(u.startsWith(o,l)){if(!U(s)&&!a.options.silent){const p=W(s)?s(o,u,`${l}`):s;U(p)||a.output.push(p)}return a.index+=o.length,!0}else return!1},"F"),qe=g((o,s,a,l)=>{const u=K(o),p=s>1;return Ue(Ge(gt(m=>{let x=0;for(;x<a;){const A=m.index;if(!u(m)||(x+=1,m.index===A))break}return x>=s},p),l))},"k"),dt=g((o,s)=>qe(o,0,1,s),"L"),Me=g((o,s)=>qe(o,0,1/0,s),"$"),Br=g((o,s)=>qe(o,1,1/0,s),"Re"),re=g((o,s)=>{const a=o.map(K);return Ue(Ge(gt(l=>{for(let u=0,p=a.length;u<p;u++)if(!a[u](l))return!1;return!0}),s))},"x"),M=g((o,s)=>{const a=o.map(K);return Ue(Ge(l=>{for(let u=0,p=a.length;u<p;u++)if(a[u](l))return!0;return!1},s))},"p"),gt=g((o,s=!0,a=!1)=>{const l=K(o);return s?u=>{const p=u.index,m=u.output.length,x=l(u);return!x&&!a&&(u.indexBacktrackMax=Math.max(u.indexBacktrackMax,u.index)),(!x||a)&&(u.index=p,u.output.length!==m&&(u.output.length=m)),x}:l},"q"),Ge=g((o,s)=>{const a=K(o);return s?l=>{if(l.options.silent)return a(l);const u=l.output.length;if(a(l)){const p=l.output.splice(u,1/0),m=s(p);return U(m)||l.output.push(m),!0}else return!1}:a},"B"),Ue=(()=>{let o=0;return s=>{const a=K(s),l=o+=1;return u=>{var p;if(u.options.memoization===!1)return a(u);const m=u.index,x=(p=u.cache)[l]||(p[l]={indexMax:-1,queue:[]}),A=x.queue;if(m<=x.indexMax){const de=x.store||(x.store=new Map);if(A.length){for(let oe=0,Vn=A.length;oe<Vn;oe+=2){const qn=A[oe*2],Gn=A[oe*2+1];de.set(qn,Gn)}A.length=0}const z=de.get(m);if(z===!1)return!1;if(Pr(z))return u.index=z,!0;if(z)return u.index=z.index,z.output?.length&&u.output.push(...z.output),!0}const pe=u.output.length,Ln=a(u);if(x.indexMax=Math.max(x.indexMax,m),Ln){const de=u.index,z=u.output.length;if(z>pe){const oe=u.output.slice(pe,z);A.push(m,{index:de,output:oe})}else A.push(m,de);return!0}else return A.push(m,!1),!1}}})(),ht=g(o=>{let s;return a=>(s||(s=K(o())),s(a))},"G"),K=Mr(o=>{if(W(o))return Le(o)?ht(o):o;if(lt(o)||Cr(o))return b(o);if(te(o))return re(o);if(Ar(o))return M(Object.values(o));throw new Error("Invalid rule")}),J=g(o=>o,"d"),Ir=g(o=>typeof o=="string","ke"),Fr=g(o=>{const s=new WeakMap,a=new WeakMap;return(l,u)=>{const p=u?.partial?a:s,m=p.get(l);if(m!==void 0)return m;const x=o(l,u);return p.set(l,x),x}},"Be"),Wr=g(o=>{const s={},a={};return(l,u)=>{const p=u?.partial?a:s;return p[l]??(p[l]=o(l,u))}},"Pe"),Lr=b(/\\./,J),Vr=b(/./,J),qr=b(/\*\*\*+/,"*"),Gr=b(/([^/{[(!])\*\*/,(o,s)=>`${s}*`),Ur=b(/(^|.)\*\*(?=[^*/)\]}])/,(o,s)=>`${s}*`),Kr=Me(M([Lr,qr,Gr,Ur,Vr])),Hr=Kr,Zr=g(o=>ft(o,Hr,{memoization:!1}).join(""),"Ie"),Jr=Zr,mt="abcdefghijklmnopqrstuvwxyz",Xr=g(o=>{let s="";for(;o>0;){const a=(o-1)%26;s=mt[a]+s,o=Math.floor((o-1)/26)}return s},"Le"),yt=g(o=>{let s=0;for(let a=0,l=o.length;a<l;a++)s=s*26+mt.indexOf(o[a])+1;return s},"V"),Ke=g((o,s)=>{if(s<o)return Ke(s,o);const a=[];for(;o<=s;)a.push(o++);return a},"b"),Yr=g((o,s,a)=>Ke(o,s).map(l=>String(l).padStart(a,"0")),"qe"),bt=g((o,s)=>Ke(yt(o),yt(s)).map(Xr),"W"),E=g(o=>({partial:!1,regex:new RegExp(o,"s"),children:[]}),"c"),fe=g(o=>({children:o}),"y"),ne=(()=>{const o=g((s,a,l)=>{if(l.has(s))return;l.add(s);const{children:u}=s;if(!u.length)u.push(a);else for(let p=0,m=u.length;p<m;p++)o(u[p],a,l)},"e");return s=>{if(!s.length)return fe([]);for(let a=s.length-1;a>=1;a--){const l=new Set,u=s[a-1],p=s[a];o(u,p,l)}return s[0]}})(),H=g(()=>({regex:new RegExp("[\\\\/]","s"),children:[]}),"g"),Qr=b(/\\./,E),en=b(/[$.*+?^(){}[\]\|]/,o=>E(`\\${o}`)),tn=b(/[\\\/]/,H),rn=b(/[^$.*+?^(){}[\]\|\\\/]+/,E),nn=b(/^(?:!!)*!(.*)$/,(o,s)=>E(`(?!^${Tt.compile(s).source}$).*?`)),on=b(/^(!!)+/),sn=M([nn,on]),an=b(/\/(\*\*\/)+/,()=>fe([ne([H(),E(".+?"),H()]),H()])),cn=b(/^(\*\*\/)+/,()=>fe([E("^"),ne([E(".*?"),H()])])),un=b(/\/(\*\*)$/,()=>fe([ne([H(),E(".*?")]),E("$")])),ln=b(/\*\*/,()=>E(".*?")),vt=M([an,cn,un,ln]),fn=b(/\*\/(?!\*\*\/|\*$)/,()=>ne([E("[^\\\\/]*?"),H()])),pn=b(/\*/,()=>E("[^\\\\/]*")),$t=M([fn,pn]),wt=b("?",()=>E("[^\\\\/]")),dn=b("[",J),gn=b("]",J),hn=b(/[!^]/,"^\\\\/"),mn=b(/[a-z]-[a-z]|[0-9]-[0-9]/i,J),yn=b(/\\./,J),bn=b(/[$.*+?^(){}[\|]/,o=>`\\${o}`),vn=b(/[\\\/]/,"\\\\/"),$n=b(/[^$.*+?^(){}[\]\|\\\/]+/,J),wn=M([yn,bn,vn,mn,$n]),xt=re([dn,dt(hn),Me(wn),gn],o=>E(o.join(""))),xn=b("{","(?:"),jn=b("}",")"),kn=b(/(\d+)\.\.(\d+)/,(o,s,a)=>Yr(+s,+a,Math.min(s.length,a.length)).join("|")),On=b(/([a-z]+)\.\.([a-z]+)/,(o,s,a)=>bt(s,a).join("|")),Tn=b(/([A-Z]+)\.\.([A-Z]+)/,(o,s,a)=>bt(s.toLowerCase(),a.toLowerCase()).join("|").toUpperCase()),En=M([kn,On,Tn]),jt=re([xn,En,jn],o=>E(o.join(""))),Pn=b("{"),An=b("}"),Cn=b(","),Sn=b(/\\./,E),Nn=b(/[$.*+?^(){[\]\|]/,o=>E(`\\${o}`)),Mn=b(/[\\\/]/,H),zn=b(/[^$.*+?^(){}[\]\|\\\/,]+/,E),_n=ht(()=>Ot),Rn=b("",()=>E("(?:)")),Dn=Br(M([vt,$t,wt,xt,jt,_n,Sn,Nn,Mn,zn]),ne),kt=M([Dn,Rn]),Ot=re([Pn,dt(re([kt,Me(re([Cn,kt]))])),An],fe),Bn=Me(M([sn,vt,$t,wt,xt,jt,Ot,Qr,en,tn,rn]),ne),In=Bn,Fn=g(o=>ft(o,In,{memoization:!1})[0],"kr"),Wn=Fn,He=g((o,s,a)=>He.compile(o,a).test(s),"N");He.compile=(()=>{const o=Wr((a,l)=>ee(Wn(Jr(a)),l)),s=Fr((a,l)=>We(a.map(u=>o(u,l))));return(a,l)=>Ir(a)?o(a,l):s(a,l)})();var Tt=He;return d(v)})();return e.default||e},"_lazyMatch"),Ze;const bo=g((e,t)=>(Ze||(Ze=Ct(),Ct=null),Ze(e,t)),"default");var vo=Object.defineProperty,$o=ot((e,t)=>vo(e,"name",{value:t,configurable:!0}),"t$1");const wo=/^[A-Z]:\//i,B=$o((e="")=>e&&e.replaceAll("\\","/").replace(wo,t=>t.toUpperCase()),"normalizeWindowsPath");var xo=Object.defineProperty,C=ot((e,t)=>xo(e,"name",{value:t,configurable:!0}),"r");const jo=/^[/\\]{2}/,ko=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,er=/^[A-Z]:$/i,St=/^\/([A-Z]:)?$/i,Oo=/.(\.[^./]+)$/,To=/^[/\\]|^[a-z]:[/\\]/i,Eo=/\/$/,Po=C(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),tr=C((e,t)=>{let r="",n=0,i=-1,c=0,f;for(let d=0;d<=e.length;++d){if(d<e.length)f=e[d];else{if(f==="/")break;f="/"}if(f==="/"){if(!(i===d-1||c===1))if(c===2){if(r.length<2||n!==2||!r.endsWith(".")||r.at(-2)!=="."){if(r.length>2){const v=r.lastIndexOf("/");v===-1?(r="",n=0):(r=r.slice(0,v),n=r.length-1-r.lastIndexOf("/")),i=d,c=0;continue}else if(r.length>0){r="",n=0,i=d,c=0;continue}}t&&(r+=r.length>0?"/..":"..",n=2)}else r.length>0?r+=`/${e.slice(i+1,d)}`:r=e.slice(i+1,d),n=d-i-1;i=d,c=0}else f==="."&&c!==-1?++c:c=-1}return r},"normalizeString"),X=C(e=>ko.test(e),"isAbsolute"),rr=C(function(e){if(e.length===0)return".";e=B(e);const t=jo.exec(e),r=X(e),n=e.at(-1)==="/";return e=tr(e,!r),e.length===0?r?"/":n?"./":".":(n&&(e+="/"),er.test(e)&&(e+="/"),t?r?`//${e}`:`//./${e}`:r&&!X(e)?`/${e}`:e)},"normalize"),_=C((...e)=>{let t="";for(const r of e)if(r)if(t.length>0){const n=t.at(-1)==="/",i=r[0]==="/";n&&i?t+=r.slice(1):t+=n||i?r:`/${r}`}else t+=r;return rr(t)},"join"),q=C(function(...e){e=e.map(n=>B(n));let t="",r=!1;for(let n=e.length-1;n>=-1&&!r;n--){const i=n>=0?e[n]:Po();!i||i.length===0||(t=`${i}/${t}`,r=X(i))}return t=tr(t,!r),r&&!X(t)?`/${t}`:t.length>0?t:"."},"resolve");C(function(e){return B(e)},"toNamespacedPath");const nr=C(function(e){return Oo.exec(B(e))?.[1]??""},"extname");C(function(e,t){const r=q(e).replace(St,"$1").split("/"),n=q(t).replace(St,"$1").split("/");if(n[0][1]===":"&&r[0][1]===":"&&r[0]!==n[0])return n.join("/");const i=[...r];for(const c of i){if(n[0]!==c)break;r.shift(),n.shift()}return[...r.map(()=>".."),...n].join("/")},"relative");const Te=C(e=>{const t=B(e).replace(Eo,"").split("/").slice(0,-1);return t.length===1&&er.test(t[0])&&(t[0]=`${t[0]}/`),t.join("/")||(X(e)?"/":".")},"dirname");C(function(e){const t=[e.root,e.dir,e.base??e.name+e.ext].filter(Boolean);return B(e.root?q(...t):t.join("/"))},"format");const Ao=C((e,t)=>{const r=B(e).split("/").pop();return t&&r.endsWith(t)?r.slice(0,-t.length):r},"basename"),or=C(function(e){const t=To.exec(e)?.[0]?.replaceAll("\\","/")??"",r=Ao(e),n=nr(r);return{base:r,dir:Te(e),ext:n,name:r.slice(0,r.length-n.length),root:t}},"parse");C((e,t)=>bo(t,rr(e)),"matchesGlob");var Co=Object.defineProperty,Y=O((e,t)=>Co(e,"name",{value:t,configurable:!0}),"n$3"),So=Object.defineProperty,G=Y((e,t)=>So(e,"name",{value:t,configurable:!0}),"a");const No=ue(import.meta.url),me=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Mo=G(e=>{if(typeof me<"u"&&me.versions&&me.versions.node){const[t,r]=me.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return me.getBuiltinModule(e)}return No(e)},"__cjs_getBuiltinModule"),{fileURLToPath:zo}=Mo("node:url");var _o=Object.defineProperty,ce=G((e,t)=>_o(e,"name",{value:t,configurable:!0}),"t$1");function le(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}h(le,"le");D(le,"pe");O(le,"m$2");Y(le,"d");G(le,"getDefaultExportFromCjs");ce(le,"getDefaultExportFromCjs");function Ee(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}h(Ee,"ge");D(Ee,"Oe");O(Ee,"h$2");Y(Ee,"O");G(Ee,"getDefaultExportFromNamespaceIfPresent");ce(Ee,"getDefaultExportFromNamespaceIfPresent");function Pe(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")&&Object.keys(e).length===1?e.default:e}h(Pe,"me");D(Pe,"Ee");O(Pe,"x");Y(Pe,"P");G(Pe,"getDefaultExportFromNamespaceIfNotNamed");ce(Pe,"getDefaultExportFromNamespaceIfNotNamed");function Ae(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=ce(G(Y(O(D(h(function n(){var i=!1;try{i=this instanceof n}catch{}return i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)},"c"),"c"),"a"),"s"),"a"),"a");r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:ce(function(){return e[n]},"get")})}),r}h(Ae,"he");D(Ae,"ke");O(Ae,"y$1");Y(Ae,"_");G(Ae,"getAugmentedNamespace");ce(Ae,"getAugmentedNamespace");var Nt,Mt;function Ce(){return Mt||(Mt=1,Nt=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cr3","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),Nt}h(Ce,"ye");D(Ce,"Ae");O(Ce,"w");Y(Ce,"k");G(Ce,"requireBinaryExtensions");var Ro=Ce();const Do=le(Ro);var Bo=Object.defineProperty,I=G((e,t)=>Bo(e,"name",{value:t,configurable:!0}),"r");const Io=new Set(Do),Fo=new Set(["/","\\",void 0]),zt=Symbol.for("pathe:normalizedAlias"),Wo=/(^|[/\\])([^/\\]+?)(?=(?:\.[^.]+)?$)/,Lo=I((e,t)=>t.split("/").length-e.split("/").length,"compareAliases"),_e=I((e="/")=>{const t=e.at(-1);return t==="/"||t==="\\"},"hasTrailingSlash"),sr=I(e=>{if(e[zt])return e;const t=Object.fromEntries(Object.entries(e).toSorted(([r],[n])=>Lo(r,n)));for(const r in t)for(const n in t)n===r||r.startsWith(n)||t[r].startsWith(n)&&Fo.has(t[r][n.length])&&(t[r]=t[n]+t[r].slice(n.length));return Object.defineProperty(t,zt,{enumerable:!1,value:!0}),t},"normalizeAliases");I((e,t)=>{e=B(e),t=sr(t);for(const[r,n]of Object.entries(t)){if(!e.startsWith(r))continue;const i=_e(r)?r.slice(0,-1):r;if(_e(e[i.length]))return _(n,e.slice(r.length))}return e},"resolveAlias");I(e=>Wo.exec(e)?.[2],"filename");I((e,t)=>{e=B(e),t=sr(t);for(const[r,n]of Object.entries(t).toReversed()){if(!e.startsWith(n))continue;const i=_e(n)?n.slice(0,-1):n;if(_e(e[i.length]))return _(r,e.slice(n.length))}return e},"reverseResolveAlias");const Vo=/^(?:\.?\.[/\\]|\.\.\B)/,qo=/^(?:msys|cygwin)$/;I(e=>Vo.test(e)||e==="..","isRelative");I(e=>Io.has(nr(e).slice(1).toLowerCase()),"isBinaryPath");const Z=I(e=>B(e instanceof URL?zo(e):e),"toPath");I(()=>{if(!globalThis.process)return!1;if(globalThis.process.platform==="win32"||globalThis.process.platform==="cygwin")return!0;const e=globalThis.process.env.OSTYPE;return typeof e!="string"?!1:qo.test(e)},"isWindows");var Go=Object.defineProperty,Ye=O((e,t)=>Go(e,"name",{value:t,configurable:!0}),"n$2");const Uo=ue(import.meta.url),ye=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ko=Ye(e=>{if(typeof ye<"u"&&ye.versions&&ye.versions.node){const[t,r]=ye.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return ye.getBuiltinModule(e)}return Uo(e)},"h"),{stat:Ho,lstat:Zo}=Ko("node:fs/promises"),Jo=Ye(async(e,t={})=>{if(typeof e!="string"&&!Array.isArray(e)&&typeof e!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const r=t.cwd?Z(t.cwd):process.cwd();let n=q(r);const{root:i}=or(n),c=Z(t.stopAt??i),f=q(n,c),d=t.type??"file",v=Ye(async function($){return typeof e=="function"?[await e($)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]},"d");t.allowSymlinks??=!0;const w=t.allowSymlinks?Ho:Zo;for(;n&&n!==f&&n!==i;){const $=await v(n);for(let y of $){if(y===Yt)return;if(y===void 0)continue;Buffer.isBuffer(y)?y=y.toString():y instanceof URL&&(y=Z(y));const P=X(y)?y:q(n,y);try{const T=await w(P);if(d==="file"&&T.isFile()||d==="directory"&&T.isDirectory())return P}catch{}}n=Te(n)}},"k");var Xo=Object.defineProperty,Qe=O((e,t)=>Xo(e,"name",{value:t,configurable:!0}),"n$1");const Yo=ue(import.meta.url),be=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Qo=Qe(e=>{if(typeof be<"u"&&be.versions&&be.versions.node){const[t,r]=be.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return be.getBuiltinModule(e)}return Yo(e)},"h"),{statSync:es,lstatSync:ts}=Qo("node:fs"),rs=Qe((e,t={})=>{if(typeof e!="string"&&!Array.isArray(e)&&typeof e!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const r=t.cwd?Z(t.cwd):process.cwd();let n=q(r);const{root:i}=or(n),c=Z(t.stopAt??i),f=q(n,c),d=t.type??"file",v=Qe(function($){return typeof e=="function"?[e($)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]},"m");t.allowSymlinks??=!0;const w=t.allowSymlinks?es:ts;for(;n&&n!==f&&n!==i;){for(let $ of v(n)){if($===Yt)return;if($===void 0)continue;Buffer.isBuffer($)?$=$.toString():$ instanceof URL&&($=Z($));const y=X($)?$:q(n,$);try{const P=w(y);if(d==="file"&&P.isFile()||d==="directory"&&P.isDirectory())return y}catch{}}n=Te(n)}},"F");var ns=Object.defineProperty,ir=O((e,t)=>ns(e,"name",{value:t,configurable:!0}),"t$2");const os=ue(import.meta.url),ve=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ss=ir(e=>{if(typeof ve<"u"&&ve.versions&&ve.versions.node){const[t,r]=ve.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return ve.getBuiltinModule(e)}return os(e)},"i"),{access:is}=ss("node:fs/promises");async function L(e,t=Xt){nt(e),e=Z(e);try{return await is(e,t),!0}catch{return!1}}h(L,"R$3");D(L,"D");O(L,"l$2");ir(L,"d");var as=Object.defineProperty,ar=O((e,t)=>as(e,"name",{value:t,configurable:!0}),"s");const cs=ue(import.meta.url),$e=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,us=ar(e=>{if(typeof $e<"u"&&$e.versions&&$e.versions.node){const[t,r]=$e.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return $e.getBuiltinModule(e)}return cs(e)},"i"),{accessSync:ls}=us("node:fs");function V(e,t=Xt){nt(e),e=Z(e);try{return ls(e,t),!0}catch{return!1}}h(V,"D$2");D(V,"I");O(V,"l$1");ar(V,"d");var fs=Object.defineProperty,ps=O((e,t)=>fs(e,"name",{value:t,configurable:!0}),"o");class cr extends Error{static{h(this,"dt")}static{D(this,"pt")}static{O(this,"n")}static{ps(this,"o")}constructor(t){super(`ENOENT: ${t}`)}get code(){return"ENOENT"}set code(t){throw new Error("Cannot overwrite code ENOENT")}get name(){return"NotFoundError"}set name(t){throw new Error("Cannot overwrite name of NotFoundError")}}var ds=Object.defineProperty,st=O((e,t)=>ds(e,"name",{value:t,configurable:!0}),"a");const Re=st((e,t)=>(t?.create&&po(e),e),"useDirectory");st(async(e,t)=>{if(ie.CACHE_DIR&&!["0","1","false","true"].includes(ie.CACHE_DIR))return Re(_(ie.CACHE_DIR,e),t);const r=await Jo("package.json",{cwd:t?.cwd??Jt(),type:"file"});if(!r){if(t?.throwError)throw new cr("No such file or directory found.");return}const n=_(Te(r),"node_modules"),i=_(n,".cache"),c=_(i,e);if(!(!await L(c,ae)&&await L(c))&&!(!await L(i,ae)&&await L(i))&&!(!await L(n,ae)&&await L(n)))return Re(c,t)},"findCacheDirectory");const gs=st((e,t)=>{if(ie.CACHE_DIR&&!["0","1","false","true"].includes(ie.CACHE_DIR))return Re(_(ie.CACHE_DIR,e),t);const r=rs("package.json",{cwd:t?.cwd??Jt(),type:"file"});if(!r){if(t?.throwError)throw new cr("No such file or directory found.");return}const n=_(Te(r),"node_modules"),i=_(n,".cache"),c=_(i,e);if(!(!V(c,ae)&&V(c))&&!(!V(i,ae)&&V(i))&&!(!V(n,ae)&&V(n)))return Re(c,t)},"findCacheDirectorySync"),ur=gs;var hs=Object.defineProperty,ms=h((e,t)=>hs(e,"name",{value:t,configurable:!0}),"r$3");const _t=ms(e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},"r");var ys=Object.defineProperty,lr=h((e,t)=>ys(e,"name",{value:t,configurable:!0}),"s$5");const bs=ke(import.meta.url),we=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,vs=lr(e=>{if(typeof we<"u"&&we.versions&&we.versions.node){const[t,r]=we.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return we.getBuiltinModule(e)}return bs(e)},"u"),{lstatSync:Rt,mkdirSync:$s}=vs("node:fs"),De=lr(e=>{Ut(e);try{const t=Rt(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(_t(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{$s(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const r=Rt(e);if(!r.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(_t(r))}'`,{cause:t})}},"g");var ws=Object.defineProperty,fr=h((e,t)=>ws(e,"name",{value:t,configurable:!0}),"x$1"),xs=Object.defineProperty,it=fr((e,t)=>xs(e,"name",{value:t,configurable:!0}),"$"),js=Object.defineProperty,ks=it((e,t)=>js(e,"name",{value:t,configurable:!0}),"r$1");const Os=ks(e=>e.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
|
|
2
|
+
`),"normalizeLF"),Ts=globalThis.process??Object.create(null),Dt={versions:{}},Bt=new Proxy(Ts,{get(e,t){if(t in e)return e[t];if(t in Dt)return Dt[t]}});var Es=Object.defineProperty,Ps=it((e,t)=>Es(e,"name",{value:t,configurable:!0}),"b");const As=Ps((e,t,r,n)=>{const i={column:0,line:-1,...e.start},c={...i,...e.end},f=i.line,d=i.column,v=c.line,w=c.column;let $=Math.max(f-(r+1),0),y=Math.min(t.length,v+n);f===-1&&($=0),v===-1&&(y=t.length);const P=v-f,T={};if(P)for(let j=0;j<=P;j++){const N=j+f;if(!d)T[N]=!0;else if(j===0){const F=t[N-1]?.length;T[N]=[d,(F??0)-d+1]}else if(j===P)T[N]=[0,w];else{const F=t[N-j]?.length;T[N]=[0,F]}}else d===w?T[f]=d?[d,0]:!0:T[f]=[d,(w??0)-(d??0)];return{end:y,markerLines:T,start:$}},"getMarkerLines");var Cs=Object.defineProperty,ze=it((e,t)=>Cs(e,"name",{value:t,configurable:!0}),"t");const Ss=Bt.platform==="win32"&&!Bt.env?.WT_SESSION?">":"❯",Ns=ze((e,t,r)=>{const n={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...r,color:{gutter:ze(j=>j,"gutter"),marker:ze(j=>j,"marker"),message:ze(j=>j,"message"),...r?.color}},i=typeof t.start.column=="number";let c=Os(e).split(`
|
|
3
|
+
`);typeof n.tabWidth=="number"&&(c=c.map(j=>j.replaceAll(" "," ".repeat(n.tabWidth))));const{end:f,markerLines:d,start:v}=As(t,c,n.linesAbove,n.linesBelow),w=String(f).length,{gutter:$,marker:y,message:P}=n.color;let T=c.slice(v,f).map((j,N)=>{const F=v+1+N,ee=d[F],Fe=String(F).padStart(w),We=!d[F+1],te=` ${Fe}${n.showGutter?" |":""}`;if(ee){let W="";if(Array.isArray(ee)){const Le=j.replaceAll(/[^\t]/g," ").slice(0,Math.max(ee[0]-1,0)),Ve=ee[1]||1;W=[`
|
|
4
|
+
`,n.prefix+$(te.replaceAll(/\d/g," "))," ",Le,y("^").repeat(Ve)].join(""),We&&n.message&&(W+=` ${P(n.message)}`)}return[n.prefix+y(Ss),$(te),j.length>0?` ${j}`:"",W].join("")}return`${n.prefix} ${$(te)}${j.length>0?` ${j}`:""}`}).join(`
|
|
5
|
+
`);return n.message&&!i&&(T=`${n.prefix+" ".repeat(w+1)+n.message}
|
|
6
|
+
${T}`),T},"codeFrame");var Ms=Object.defineProperty,zs=fr((e,t)=>Ms(e,"name",{value:t,configurable:!0}),"N"),_s=Object.defineProperty,at=zs((e,t)=>_s(e,"name",{value:t,configurable:!0}),"l");const It=at((e,t)=>{let r=0,n=t.length-2;for(;r<n;){const i=r+(n-r>>1);if(e<t[i])n=i-1;else if(e>=t[i+1])r=i+1;else{r=i;break}}return r},"binarySearch"),Rs=/\n|\r(?!\n)/,Ds=at(e=>e.split(Rs).reduce((t,r)=>(t.push(t.at(-1)+r.length+1),t),[0]),"getLineStartIndexes"),Bs=at((e,t,r)=>{const n=r?.skipChecks??!1;if(!n&&(!Array.isArray(e)&&typeof e!="string"||(typeof e=="string"||Array.isArray(e))&&e.length===0))return{column:0,line:0};if(!n&&(typeof t!="number"||typeof e=="string"&&t>=e.length||Array.isArray(e)&&t+1>=e.at(-1)))return{column:0,line:0};if(typeof e=="string"){const c=Ds(e),f=It(t,c);return{column:t-c[f]+1,line:f+1}}const i=It(t,e);return{column:t-e[i]+1,line:i+1}},"indexToLineColumn");var Is=Object.defineProperty,Fs=h((e,t)=>Is(e,"name",{value:t,configurable:!0}),"r$2");let Ws=class extends Error{static{h(this,"a")}static{Fs(this,"r")}fileName;codeFrame;name="JSONError";#e;constructor(t){super(),this.#e=t}get message(){return`${this.#e}${this.fileName?` in ${this.fileName}`:""}${this.codeFrame?`
|
|
7
|
+
|
|
8
|
+
${this.codeFrame}
|
|
9
|
+
`:""}`}set message(t){this.#e=t}};var Ls=Object.defineProperty,Se=h((e,t)=>Ls(e,"name",{value:t,configurable:!0}),"a$2");const Vs=Se(e=>String.raw`\u{${e.codePointAt(0).toString(16)}}`,"p"),qs=Se((e,t,r)=>Ns(e,{start:t},{tabWidth:!1,...r}),"m"),Gs=/in JSON at position (\d+)(?: \(line (\d+) column (\d+)\))?$/,Us=Se((e,t)=>{const r=Gs.exec(t);if(!r)return;const[,n,i,c]=r;if(i&&c)return{column:Number(c),line:Number(i)};let f=Number(n);return f===e.length&&(f=e.length-1),Bs(e,f)},"d"),Ks=/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,Hs=Se(e=>e.replace(Ks,(t,r,n)=>`"${n}"(${Vs(n)})`),"h");function pr(e,t,r,n){typeof t=="string"&&(typeof r=="object"&&(n=r),r=t,t=void 0);let i;try{return JSON.parse(e,t)}catch(d){i=d.message}let c;e?(c=Us(e,i),i=Hs(i)):i+=" while parsing empty string";const f=new Ws(i);throw f.fileName=r,c&&(f.codeFrame=qs(e,c,n)),f}h(pr,"$$1");Se(pr,"$");var Zs=Object.defineProperty,Js=h((e,t)=>Zs(e,"name",{value:t,configurable:!0}),"c$1");function ct(e,t,r){typeof t=="object"&&(r=t,t=void 0);const n=Yn(e,{buffer:!0,encoding:void 0});let i=new TextDecoder().decode(n);const{beforeParse:c,color:f}=r??{};return typeof c=="function"&&(i=c(i)),pr(i,t,Kt(e),{color:f})}h(ct,"s$4");Js(ct,"a");var Xs=Object.defineProperty,Ys=h((e,t)=>Xs(e,"name",{value:t,configurable:!0}),"e$2");const Qs=Ys(e=>{if(typeof e!="string"&&!(e instanceof ArrayBuffer)&&!ArrayBuffer.isView(e))throw new TypeError("File contents must be a string, ArrayBuffer, or ArrayBuffer view.")},"e");var ei=Object.defineProperty,ti=h((e,t)=>ei(e,"name",{value:t,configurable:!0}),"n$1");const ri=new TextEncoder,ni=ti(e=>{if(e instanceof Uint8Array)return e;if(typeof e=="string")return ri.encode(e);if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e)){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(t)}throw new TypeError("Invalid contents type. Expected string or ArrayBuffer.")},"r");var oi=Object.defineProperty,dr=h((e,t)=>oi(e,"name",{value:t,configurable:!0}),"c");const si=ke(import.meta.url),xe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ii=dr(e=>{if(typeof xe<"u"&&xe.versions&&xe.versions.node){const[t,r]=xe.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return xe.getBuiltinModule(e)}return si(e)},"l"),{mkdirSync:ai,writeFileSync:ci,statSync:ui,renameSync:Ft,chownSync:li,chmodSync:fi,unlinkSync:pi}=ii("node:fs"),di=dr((e,t,r)=>{r={encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...r},Ut(e),Qs(t),e=Kt(e);const n=`${e}.tmp`;try{const i=R(e,Et);if(!i&&r.recursive){const f=Oe(e);R(f,Et)||ai(f,{recursive:!0})}let c;if(ci(n,typeof t=="string"?Buffer.from(t,r.encoding??"utf8"):ni(t),{flag:r.flag}),i&&!r.overwrite&&(c=ui(e),r.chown??={gid:c.gid,uid:c.uid},Ft(e,`${e}.bak`)),r.chown)try{li(n,r.chown.uid,r.chown.gid)}catch{}fi(n,c&&!r.mode?c.mode:r.mode??438),Ft(n,e)}catch(i){throw new Error(`Failed to write file at: ${e} - ${i.message}`,{cause:i})}finally{R(n)&&pi(`${e}.tmp`)}},"E");var gi=Object.defineProperty,Q=h((e,t)=>gi(e,"name",{value:t,configurable:!0}),"i$2");const hi=/^(?:( )+|\t+)/,Ne="space";function et(e,t,r){return e&&t===Ne&&r===1}h(et,"d$3");Q(et,"d");function tt(e,t){const r=new Map;let n=0,i,c;for(const f of e.split(/\n/g)){if(!f)continue;const d=f.match(hi);if(d===null)n=0,i="";else{const v=d[0].length,w=d[1]?Ne:"tab";if(et(t,w,v))continue;w!==i&&(n=0),i=w;let $=1,y=0;const P=v-n;if(n=v,P===0)$=0,y=1;else{const j=Math.abs(P);if(et(t,w,j))continue;c=gr(w,j)}const T=r.get(c);r.set(c,T===void 0?[1,0]:[T[0]+$,T[1]+y])}}return r}h(tt,"h$1");Q(tt,"h");function gr(e,t){return(e===Ne?"s":"t")+String(t)}h(gr,"x");Q(gr,"w");function hr(e){const t=e[0]==="s"?Ne:"tab",r=Number(e.slice(1));return{type:t,amount:r}}h(hr,"E$1");Q(hr,"E");function mr(e){let t,r=0,n=0;for(const[i,[c,f]]of e)(c>r||c===r&&f>n)&&(r=c,n=f,t=i);return t}h(mr,"M");Q(mr,"v");function yr(e,t){return(e===Ne?" ":" ").repeat(t)}h(yr,"k");Q(yr,"x");function br(e){if(typeof e!="string")throw new TypeError("Expected a string");let t=tt(e,!0);t.size===0&&(t=tt(e,!1));const r=mr(t);let n,i=0,c="";return r!==void 0&&({type:n,amount:i}=hr(r),c=yr(n,i)),{amount:i,type:n,indent:c}}h(br,"z$1");Q(br,"M");var mi=Object.defineProperty,vr=h((e,t)=>mi(e,"name",{value:t,configurable:!0}),"s$2");const yi=ke(import.meta.url),je=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,bi=vr(e=>{if(typeof je<"u"&&je.versions&&je.versions.node){const[t,r]=je.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return je.getBuiltinModule(e)}return yi(e)},"g"),{readFileSync:vi}=bi("node:fs"),$r=vr((e,t,r={})=>{const{detectIndent:n,indent:i,replacer:c,stringify:f=JSON.stringify,...d}={indent:" ",...r};let v=i,w=`
|
|
10
|
+
`;if(R(e,Qn))try{const y=vi(e,"utf8");if(n){const{indent:P}=br(y);v=P}w=y.endsWith(`
|
|
11
|
+
`)?`
|
|
12
|
+
`:""}catch(y){if(y.code!=="ENOENT")throw y}const $=f(t,c,v);di(e,`${$}${w}`,d)},"R");var $i=Object.defineProperty,wi=h((e,t)=>$i(e,"name",{value:t,configurable:!0}),"s$1");class Be extends Error{static{h(this,"VisConfigError")}static{wi(this,"VisConfigError")}chain;constructor(t,r,n){super(t,n),this.name=this.constructor.name,this.chain=r}}var xi=Object.defineProperty,ji=h((e,t)=>xi(e,"name",{value:t,configurable:!0}),"e");class ki extends Be{static{h(this,"VisConfigCycleError")}static{ji(this,"VisConfigCycleError")}constructor(t,r){const n=[...r,`${t} (re-enters)`].join(" → ");super(`Config cycle: ${n}`,r)}}var Oi=Object.defineProperty,Ti=h((e,t)=>Oi(e,"name",{value:t,configurable:!0}),"s");class wr extends Be{static{h(this,"VisConfigDeprecatedKeyError")}static{Ti(this,"VisConfigDeprecatedKeyError")}filePath;removedKeys;constructor(t,r,n){const i=[`${t} uses removed keys.`,""];for(const c of n){const f=c.location?` (at ${c.location})`:"";i.push(` • ${c.name}${f} → renamed to \`${c.renamedTo}\``);for(const d of c.children??[])i.push(` ↳ ${d.name} → renamed to \`${d.renamedTo}\``)}i.push("","Run `vis migrate self` to auto-rewrite the config (use --dry-run to preview)."),super(i.join(`
|
|
13
|
+
`),r),this.filePath=t,this.removedKeys=n}}var Ei=Object.defineProperty,Pi=h((e,t)=>Ei(e,"name",{value:t,configurable:!0}),"t$1");class Wt extends Be{static{h(this,"VisConfigLoadError")}static{Pi(this,"VisConfigLoadError")}constructor(t,r,n){const i=n instanceof Error?n.message:String(n),c=r.length>0?`
|
|
14
|
+
Chain: ${r.join(" → ")}`:"";super(`Failed to load ${t}: ${i}${c}`,r,{cause:n})}}var Ai=Object.defineProperty,xr=h((e,t)=>Ai(e,"name",{value:t,configurable:!0}),"t");const Ci=xr(e=>e.join(" → "),"formatChain");class Je extends Be{static{h(this,"VisConfigNotFoundError")}static{xr(this,"VisConfigNotFoundError")}constructor(t,r,n){const i=r.length>0?r[r.length-1]:"<unknown>",c=n.length>0?`
|
|
15
|
+
Tried:
|
|
16
|
+
${n.join(`
|
|
17
|
+
`)}`:"";super(`Cannot resolve "${t}" extended from ${i}.${c}
|
|
18
|
+
Chain: ${Ci(r)}`,r)}}var Si=Object.defineProperty,jr=h((e,t)=>Si(e,"name",{value:t,configurable:!0}),"i$1");const Lt="@inherit",Ni=["aliases","dependsOn","inputs","outputs"],Mi=jr((e,t)=>{if(t===void 0)return e===void 0?void 0:[...e];if(!t.includes(Lt))return[...t];const r=[];for(const n of t){if(n===Lt){e!==void 0&&r.push(...e);continue}r.push(n)}return r},"mergeArrayWithInherit"),zi=jr((e,t)=>{const r={...e,...t};for(const n of Ni){const i=e?.[n],c=t?.[n],f=Mi(i,c);f===void 0?delete r[n]:r[n]=f}return r},"mergeTargetWithInherit");var _i=Object.defineProperty,Ie=h((e,t)=>_i(e,"name",{value:t,configurable:!0}),"o");const Ri=Ie(e=>{const t=[];if(Object.hasOwn(e,"targetDefaults")&&t.push({name:"targetDefaults",renamedTo:"tasks"}),Object.hasOwn(e,"taskRunnerOptions")&&t.push({name:"taskRunnerOptions",renamedTo:"taskRunner"}),Object.hasOwn(e,"taskDefaults")){const{taskDefaults:r}=e,n=[];if(Array.isArray(r))for(const[i,c]of r.entries())c&&typeof c=="object"&&(Object.hasOwn(c,"scope")&&n.push({location:`taskDefaults[${i}].scope`,name:"scope",renamedTo:"match"}),Object.hasOwn(c,"targets")&&n.push({location:`taskDefaults[${i}].targets`,name:"targets",renamedTo:"tasks"}));t.push({children:n.length>0?n:void 0,name:"taskDefaults",renamedTo:"scopedTasks"})}else if(Array.isArray(e.scopedTasks))for(const[r,n]of e.scopedTasks.entries())n&&typeof n=="object"&&(Object.hasOwn(n,"scope")&&t.push({location:`scopedTasks[${r}].scope`,name:"scope",renamedTo:"match"}),Object.hasOwn(n,"targets")&&t.push({location:`scopedTasks[${r}].targets`,name:"targets",renamedTo:"tasks"}));return t},"detectDeprecatedConfigKeys"),Di=Ie(e=>Object.hasOwn(e,"targets")&&!Object.hasOwn(e,"tasks")?[{name:"targets",renamedTo:"tasks"}]:[],"detectDeprecatedTaskKeys"),Bi=Ie((e,t,r)=>{if(!r||typeof r!="object")return;const n=Ri(r);if(n.length>0)throw new wr(e,t,n)},"assertNoDeprecatedConfigKeys"),Ii=Ie((e,t,r)=>{if(!r||typeof r!="object")return;const n=Di(r);if(n.length>0)throw new wr(e,t,n)},"assertNoDeprecatedTaskKeys");var Fi=Object.defineProperty,k=h((e,t)=>Fi(e,"name",{value:t,configurable:!0}),"r");const kr=["vis.config.ts","vis.config.mts","vis.config.cts","vis.config.js","vis.config.mjs","vis.config.cjs"],Wi=new Set(kr),Or=["vis.task.ts","vis.task.mts","vis.task.cts","vis.task.js","vis.task.mjs","vis.task.cjs"],Li=new Set(Or),la=2880,Xe={blockExoticSubdeps:!0,policies:{installScripts:{strict:!0},publisherChange:{ignoreAfter:43200,mode:"no-downgrade"}}},Vi=k(e=>{if(!e)return{...Xe};const t=Xe.policies??{},r=e.policies??{},n={...t,...r};for(const i of Object.keys(t)){const c=t[i],f=r[i];c!==void 0&&f!==void 0&&(n[i]={...c,...f})}return{...Xe,...e,policies:n}},"mergeSecurityDefaults"),Vt=k(e=>({...e,security:Vi(e.security),update:{security:!0,target:"minor",...e.update}}),"applyDefaults"),qi=k(e=>{let t;try{t=Gt(e)}catch{return}const r=new Set(t.filter(n=>Wi.has(n)));for(const n of kr)if(r.has(n))return S(e,n)},"findVisConfigFile"),Gi=k(e=>{let t;try{t=Gt(e)}catch{return}const r=new Set(t.filter(n=>Li.has(n)));for(const n of Or)if(r.has(n))return S(e,n)},"findVisTaskConfigFile"),ut=k(e=>qt("sha256").update(Zn(e)).digest("hex"),"hashFileContents"),Ui=k(e=>{const t=qt("sha256"),r=[...e].sort();for(const n of r)t.update(n),t.update(":"),t.update(ut(n)),t.update(`
|
|
19
|
+
`);return t.digest("hex")},"hashConfigChain"),Ki=k(e=>{const t=S(e,"node_modules");if(R(t)){const n=S(t,".cache","vis");return De(n),S(n,"vis-config-cache.json")}const r=ur("vis",{create:!0,cwd:e});return r?S(r,"vis-config-cache.json"):void 0},"getConfigCachePath"),Hi=k((e,t)=>{if(R(e))try{const r=ct(e);if(r.hash===t)return r.config}catch{}},"readConfigCache"),Zi=k((e,t,r)=>{try{De(Oe(e)),$r(e,{config:r,hash:t})}catch{}},"writeConfigCache"),Ji=k(e=>e===void 0?[]:Array.isArray(e)?e:[e],"normalizeExtends"),Xi=k((e,t,r)=>{if(Ht(e))throw new Je(e,[...r,t],["Absolute paths in `extends` are not supported. Use a relative path or an npm package name."]);const n=[];if(e.startsWith("./")||e.startsWith("../")){const i=Oe(t),c=S(i,e);if(n.push(c),R(c))return c;throw new Je(e,[...r,t],n)}try{return ke(t).resolve(e)}catch{throw n.push(`require.resolve("${e}") from ${t}`),new Je(e,[...r,t],n)}},"resolveExtendsSpecifier"),Tr=k(async(e,t,r)=>{const n=ut(t),i=t.slice(t.lastIndexOf(".")),c=S(Oe(t),`.vis-config-tmp-${n}${i}`);Jn(t,c);let f;try{f=await e.import(c,{default:!0,try:!0})??{}}catch(d){throw new Wt(t,r,d)}finally{try{Xn(c)}catch{}}try{return(typeof f=="function"?await f()??{}:f)??{}}catch(d){throw new Wt(t,r,d)}},"loadRawConfig"),Yi=k((e,t)=>{const r={...e,...t};if(e.tasks||t.tasks){const n=new Set([...Object.keys(e.tasks??{}),...Object.keys(t.tasks??{})]),i={};for(const c of n)i[c]=zi(e.tasks?.[c],t.tasks?.[c]);r.tasks=i}if((e.scopedTasks||t.scopedTasks)&&(r.scopedTasks=[...e.scopedTasks??[],...t.scopedTasks??[]]),(e.fileGroups||t.fileGroups)&&(r.fileGroups={...e.fileGroups,...t.fileGroups}),(e.taskGroups||t.taskGroups)&&(r.taskGroups={...e.taskGroups,...t.taskGroups}),e.security||t.security){const n=e.security?.policies??{},i=t.security?.policies??{},c={...n,...i};for(const f of Object.keys(n)){const d=n[f],v=i[f];d!==void 0&&v!==void 0&&(c[f]={...d,...v})}r.security={...e.security,...t.security,acceptedRisks:{...e.security?.acceptedRisks,...t.security?.acceptedRisks},policies:c}}return(e.update||t.update)&&(r.update={...e.update,...t.update}),(e.taskRunner||t.taskRunner)&&(r.taskRunner={...e.taskRunner,...t.taskRunner}),delete r.extends,r},"mergeVisConfigs"),Er=k(async(e,t,r,n,i,c)=>{if(n.has(t))throw new ki(t,r);if(!i.has(t)){n.add(t);try{const f=await Tr(e,t,r);Bi(t,r,f);const d=Ji(f.extends);for(const v of d){const w=Xi(v,t,r);await Er(e,w,[...r,t],n,i,c)}i.set(t,f),c.push(t)}finally{n.delete(t)}}},"resolveConfigChain"),fa=k(async(e,t)=>{let r;if(t?.explicitConfigPath){const y=Ht(t.explicitConfigPath)?t.explicitConfigPath:S(e,t.explicitConfigPath);if(!R(y))throw new Error(`Cannot find config file at ${y}`);r=y}else r=qi(e);if(!r)return Vt({});const n=Zt(e,{fsCache:!1,moduleCache:!1}),i=new Set,c=new Map,f=[];await Er(n,r,[],i,c,f);const d=Ui(f),v=Ki(e);if(v){const y=Hi(v,d);if(y)return y}let w={};for(const y of f)w=Yi(w,c.get(y));const $=Vt(w);return v&&Zi(v,d,$),$},"loadVisConfig"),Qi=k(e=>e.replaceAll(/[^\w.-]+/g,"_"),"sanitizeProjectName"),ea=k((e,t)=>{const r=S(e,"node_modules"),n=Qi(t);if(R(r)){const c=S(r,".cache","vis","task-configs");return De(c),S(c,`${n}.json`)}const i=ur("vis",{create:!0,cwd:e});return i?S(i,"task-configs",`${n}.json`):void 0},"getVisTaskCachePath"),ta=k((e,t)=>{if(R(e))try{const r=ct(e);if(r.hash===t)return r.config}catch{}},"readVisTaskCache"),ra=k((e,t,r)=>{try{De(Oe(e)),$r(e,{config:r,hash:t})}catch{}},"writeVisTaskCache"),pa=k(async(e,t,r)=>{const n=Gi(t);if(!n)return;const i=ut(n),c=ea(e,r);if(c){const w=ta(c,i);if(w)return w}const f=Zt(t,{fsCache:!1,moduleCache:!1}),d=await Tr(f,n,[]);Ii(n,[],d);const v=d;return c&&ra(c,i,v),v},"loadVisTaskConfig"),da=k(e=>e,"defineTaskConfig"),ga=k(e=>e,"defineConfig");export{pr as $,di as E,Gi as G,la as H,Or as V,da as a,ur as b,ga as c,De as d,fa as e,$r as f,_t as g,kr as h,Qs as i,qi as j,ni as k,Xe as l,Vt as m,zi as n,pa as r,ct as s,br as z};
|