@visulima/vis 1.0.0-alpha.43 → 1.0.0-alpha.45
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 +78 -0
- package/LICENSE.md +256 -0
- package/bin/resolve-binary.mjs +85 -0
- package/bin/vis.mjs +76 -0
- package/dist/bin.d.ts +1 -0
- package/dist/bin.js +1 -2
- package/dist/binx.js +1 -1
- package/dist/packem_chunks/CONFIG_FILES.js +1 -1
- package/dist/packem_chunks/bloom-status.js +1 -1
- package/dist/packem_chunks/bloom-sync.js +1 -1
- package/dist/packem_chunks/catalog.js +63 -62
- package/dist/packem_chunks/cli-exec.js +1 -1
- package/dist/packem_chunks/cli-main.js +173 -973
- package/dist/packem_chunks/detect.js +1 -1
- package/dist/packem_chunks/dispatch.js +1 -1
- package/dist/packem_chunks/fix.js +1 -1
- package/dist/packem_chunks/handler.js +1 -1
- package/dist/packem_chunks/handler10.js +1 -1
- package/dist/packem_chunks/handler11.js +1 -1
- package/dist/packem_chunks/handler12.js +2 -2
- package/dist/packem_chunks/handler13.js +1 -1
- package/dist/packem_chunks/handler14.js +1 -1
- package/dist/packem_chunks/handler15.js +1 -1
- package/dist/packem_chunks/handler16.js +1 -1
- package/dist/packem_chunks/handler17.js +1 -1
- package/dist/packem_chunks/handler18.js +1 -1
- package/dist/packem_chunks/handler19.js +1 -1
- package/dist/packem_chunks/handler2.js +1 -1
- package/dist/packem_chunks/handler20.js +1 -1
- package/dist/packem_chunks/handler21.js +1 -1
- package/dist/packem_chunks/handler22.js +13 -4
- package/dist/packem_chunks/handler23.js +1 -1
- package/dist/packem_chunks/handler24.js +1 -1
- package/dist/packem_chunks/handler26.js +1 -1
- package/dist/packem_chunks/handler27.js +1 -1
- package/dist/packem_chunks/handler28.js +1 -1
- package/dist/packem_chunks/handler29.js +1 -1
- package/dist/packem_chunks/handler3.js +1 -1
- package/dist/packem_chunks/handler30.js +1 -1
- package/dist/packem_chunks/handler4.js +1 -1
- package/dist/packem_chunks/handler5.js +3 -3
- package/dist/packem_chunks/handler50.js +4 -4
- package/dist/packem_chunks/handler51.js +3 -3
- package/dist/packem_chunks/handler53.js +1 -1
- package/dist/packem_chunks/handler54.js +2 -2
- package/dist/packem_chunks/handler55.js +1 -1
- package/dist/packem_chunks/handler57.js +4 -4
- package/dist/packem_chunks/handler58.js +1 -1
- package/dist/packem_chunks/handler59.js +2 -2
- package/dist/packem_chunks/handler6.js +6 -6
- package/dist/packem_chunks/handler60.js +18 -18
- package/dist/packem_chunks/handler61.js +1 -1
- package/dist/packem_chunks/handler62.js +3 -3
- package/dist/packem_chunks/handler63.js +4 -4
- package/dist/packem_chunks/handler65.js +2 -2
- package/dist/packem_chunks/handler66.js +15 -15
- package/dist/packem_chunks/handler67.js +5 -5
- package/dist/packem_chunks/handler68.js +16 -16
- package/dist/packem_chunks/handler69.js +5 -5
- package/dist/packem_chunks/handler7.js +1 -1
- package/dist/packem_chunks/handler70.js +16 -17
- package/dist/packem_chunks/handler71.js +2 -2
- package/dist/packem_chunks/handler72.js +2 -2
- package/dist/packem_chunks/handler73.js +13 -13
- package/dist/packem_chunks/handler74.js +3 -3
- package/dist/packem_chunks/handler75.js +3 -3
- package/dist/packem_chunks/handler76.js +63 -63
- package/dist/packem_chunks/handler77.js +1 -1
- package/dist/packem_chunks/handler8.js +1 -1
- package/dist/packem_chunks/handler9.js +1 -1
- package/dist/packem_chunks/heal-accept.js +1 -1
- package/dist/packem_chunks/heal.js +1 -1
- package/dist/packem_chunks/help-command.js +1 -1
- package/dist/packem_chunks/index2.js +802 -7
- package/dist/packem_chunks/index3.js +7 -135
- package/dist/packem_chunks/index4.js +134 -73
- package/dist/packem_chunks/index5.js +74 -0
- package/dist/packem_chunks/keys-refresh.js +1 -1
- package/dist/packem_chunks/lean.js +3 -3
- package/dist/packem_chunks/list.js +1 -1
- package/dist/packem_chunks/loader.js +1 -1
- package/dist/packem_chunks/loader2.js +1 -1
- package/dist/packem_chunks/print-config.js +1 -1
- package/dist/packem_chunks/registry.js +2 -2
- package/dist/packem_chunks/shell-runner.js +1 -1
- package/dist/packem_chunks/sync.js +1 -1
- package/dist/packem_chunks/sync2.js +1 -1
- package/dist/packem_chunks/tripwire.js +2 -2
- package/dist/packem_chunks/ts-loader.js +22 -2
- package/dist/packem_chunks/verify-lockfile.js +1 -1
- package/dist/packem_chunks/version-resolver.js +2 -2
- package/dist/packem_shared/{Table-CcVkyULl-DLWu6XHL.js → Table-BGIHvenQ-D2oJtNQj.js} +1 -1
- package/dist/packem_shared/affected-shas-CCxG4tvm.js +1 -0
- package/dist/packem_shared/{ai-analysis-Co-b15d_.js → ai-analysis-rC48NLfB.js} +5 -5
- package/dist/packem_shared/{ai-fix-DnJDgPN-.js → ai-fix-D_ijV3Rn.js} +3 -3
- package/dist/packem_shared/augment-DaSS2Lgs.js +4 -0
- package/dist/packem_shared/bin-CPMo34SM.js +1 -0
- package/dist/packem_shared/{build-scripts-Doxce2VM.js → build-scripts-MTSK6TNr.js} +1 -1
- package/dist/packem_shared/{command-runtime-RiCMa2C8.js → command-runtime-3FTGuUsK.js} +1 -1
- package/dist/packem_shared/{cyclonedx-BTBzGCBW.js → cyclonedx-BeUmPgfO.js} +1 -1
- package/dist/packem_shared/{dependency-scan-DEv-scN6.js → dependency-scan-DpOFiZuI.js} +1 -1
- package/dist/packem_shared/{docker-DKlF-gk3.js → docker-CViFYtmM.js} +1 -1
- package/dist/packem_shared/{env-XJzocuUP.js → env-Ct3hMEYB.js} +2 -2
- package/dist/packem_shared/{failure-log-Sp1j-5qo.js → failure-log-Dy2G-rKi.js} +1 -1
- package/dist/packem_shared/glob-fqg4KepW-1S3z30c8.js +1 -0
- package/dist/packem_shared/index-CE6MsgcV.js +22 -0
- package/dist/packem_shared/{index-CkZnT2Fe.js → index-Cntyu-w8.js} +1 -1
- package/dist/packem_shared/{index-DJAnbLEh.js → index-XAb0QGqA.js} +1 -1
- package/dist/packem_shared/{lifecycle-C4nRsXxc.js → lifecycle-CHcFuWf_.js} +1 -1
- package/dist/packem_shared/{lockfile-DIGyLfmF.js → lockfile-C1qCKGH6.js} +1 -1
- package/dist/packem_shared/{manifests-pLwnVmCN.js → manifests-WBnsV_Eb.js} +1 -1
- package/dist/packem_shared/{min-release-age-B23Mr7NO.js → min-release-age-C71MO72F.js} +1 -1
- package/dist/packem_shared/{missing-package-json-DdMNbe_j.js → missing-package-json-CTF71tE5.js} +1 -1
- package/dist/packem_shared/{native-config-sync-4K9wWTj5.js → native-config-sync-BFDVK9LH.js} +4 -4
- package/dist/packem_shared/{osv-bloom-BsQ-aFiM.js → osv-bloom-DVMlkcAO.js} +2 -2
- package/dist/packem_shared/{packument-QjOLAMSk.js → packument-C-A3Uhhx.js} +1 -1
- package/dist/packem_shared/pm-runner-CQcraCcu.js +1 -0
- package/dist/packem_shared/{provenance-CilBg0Ee.js → provenance-R2csDSNg.js} +1 -1
- package/dist/packem_shared/readJsonSync-CvkZyKmL-ihoybKvs.js +1 -0
- package/dist/packem_shared/{registry-keys-BEavOCPz.js → registry-keys-CMnS_Qt_.js} +1 -1
- package/dist/packem_shared/{resolve-explicit-C4o8_-SE.js → resolve-explicit-C4oQMyoB.js} +1 -1
- package/dist/packem_shared/resolve-runtime-QRaQucfL.js +1 -0
- package/dist/packem_shared/run-file-DD7Ne23Z.js +1 -0
- package/dist/packem_shared/{runtime-check-0lUJvgKt.js → runtime-check-BXehSP06.js} +1 -1
- package/dist/packem_shared/{s1ngularity-DuG-LLaX.js → s1ngularity-BCDt28u0.js} +1 -1
- package/dist/packem_shared/scan-progress-YRpDs90j.js +2 -0
- package/dist/packem_shared/{selectors-UmnAuc26.js → selectors-D4iCvITE.js} +1 -1
- package/dist/packem_shared/{signatures-CYheSqd3.js → signatures-B3srzCEv.js} +1 -1
- package/dist/packem_shared/target-options-CR0OuYJr.js +1 -0
- package/dist/packem_shared/toolchain-C44mPKPu.js +5 -0
- package/dist/packem_shared/{typosquats-hCtH-23t.js → typosquats-CQz-1Y6K.js} +1 -1
- package/dist/packem_shared/use-measured-height-DHi0xOPO.js +1 -0
- package/dist/packem_shared/utils-CRueU43T.js +1 -0
- package/dist/packem_shared/verify-DStfg3nb.js +1 -0
- package/dist/packem_shared/{vis-update-app-K-qATSeh.js → vis-update-app-B3I14Vfy.js} +1 -1
- package/dist/packem_shared/{watch-Bkp_AAbc.js → watch-BXNI7dC6.js} +1 -1
- package/dist/packem_shared/{watch-loop-WE7nWIEt.js → watch-loop-JfGKIgKB.js} +1 -1
- package/dist/runtime/preload.js +1 -1
- package/index.js +52 -52
- package/package.json +18 -14
- package/dist/packem_shared/affected-shas-C1XuRlvo.js +0 -1
- package/dist/packem_shared/augment-8fIWWGSc.js +0 -3
- package/dist/packem_shared/bin-DDq2oszw.js +0 -1
- package/dist/packem_shared/glob-fqg4KepW-7Bs2kZuM.js +0 -1
- package/dist/packem_shared/index-OQZQyN5R.js +0 -19
- package/dist/packem_shared/pm-runner-CIH0wPh-.js +0 -1
- package/dist/packem_shared/readJsonSync-CvkZyKmL-CY7PZob_.js +0 -4
- package/dist/packem_shared/resolve-runtime-CJSWV-K8.js +0 -1
- package/dist/packem_shared/run-file-B4TqKa0X.js +0 -1
- package/dist/packem_shared/scan-progress-RTMsE3Z4.js +0 -2
- package/dist/packem_shared/target-options-ChWcK60i.js +0 -1
- package/dist/packem_shared/toolchain-DyCKnGch.js +0 -5
- package/dist/packem_shared/use-measured-height-BKUjhm_3.js +0 -1
- package/dist/packem_shared/utils-Cxree603.js +0 -1
- package/dist/packem_shared/verify-CVPYlUrF.js +0 -1
- package/dist/packem_shared/window-ops-DDePlWLV.js +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/vis",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.45",
|
|
4
4
|
"description": "A monorepo dev toolkit — task runner, remote caching, security scanning, git hooks, and AI agent integrations — powered by @visulima/task-runner",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"build",
|
|
@@ -43,6 +43,9 @@
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
"exports": {
|
|
46
|
+
"./bin": {
|
|
47
|
+
"default": "./dist/bin.js"
|
|
48
|
+
},
|
|
46
49
|
"./config": {
|
|
47
50
|
"types": "./dist/config/index.d.ts",
|
|
48
51
|
"default": "./dist/config/index.js"
|
|
@@ -93,13 +96,14 @@
|
|
|
93
96
|
"./package.json": "./package.json"
|
|
94
97
|
},
|
|
95
98
|
"bin": {
|
|
96
|
-
"v": "./
|
|
97
|
-
"vis": "./
|
|
99
|
+
"v": "./bin/vis.mjs",
|
|
100
|
+
"vis": "./bin/vis.mjs",
|
|
98
101
|
"visx": "./dist/binx.js",
|
|
99
102
|
"vx": "./dist/binx.js"
|
|
100
103
|
},
|
|
101
104
|
"files": [
|
|
102
105
|
"dist/**",
|
|
106
|
+
"bin/**",
|
|
103
107
|
"dashboard/dist/**",
|
|
104
108
|
"schemas/**",
|
|
105
109
|
"skills/**",
|
|
@@ -111,12 +115,12 @@
|
|
|
111
115
|
"LICENSE.md"
|
|
112
116
|
],
|
|
113
117
|
"dependencies": {
|
|
114
|
-
"@visulima/error": "6.0.0-alpha.
|
|
118
|
+
"@visulima/error": "6.0.0-alpha.35",
|
|
115
119
|
"@visulima/secret-scanner": "1.0.0-alpha.7",
|
|
116
120
|
"@visulima/source-map": "3.0.0-alpha.12",
|
|
117
121
|
"@visulima/tabular": "4.0.0-alpha.14",
|
|
118
|
-
"@visulima/task-runner": "1.0.0-alpha.
|
|
119
|
-
"@visulima/tui": "1.0.0-alpha.
|
|
122
|
+
"@visulima/task-runner": "1.0.0-alpha.25",
|
|
123
|
+
"@visulima/tui": "1.0.0-alpha.27",
|
|
120
124
|
"module-replacements": "^2.11.0",
|
|
121
125
|
"module-replacements-codemods": "^2.0.1",
|
|
122
126
|
"react": "19.2.7",
|
|
@@ -143,14 +147,14 @@
|
|
|
143
147
|
}
|
|
144
148
|
},
|
|
145
149
|
"optionalDependencies": {
|
|
146
|
-
"@visulima/vis-binding-darwin-arm64": "1.0.0-alpha.
|
|
147
|
-
"@visulima/vis-binding-
|
|
148
|
-
"@visulima/vis-binding-
|
|
149
|
-
"@visulima/vis-binding-linux-
|
|
150
|
-
"@visulima/vis-binding-linux-
|
|
151
|
-
"@visulima/vis-binding-linux-x64-musl": "1.0.0-alpha.
|
|
152
|
-
"@visulima/vis-binding-win32-
|
|
153
|
-
"@visulima/vis-binding-win32-
|
|
150
|
+
"@visulima/vis-binding-darwin-arm64": "1.0.0-alpha.45",
|
|
151
|
+
"@visulima/vis-binding-darwin-x64": "1.0.0-alpha.45",
|
|
152
|
+
"@visulima/vis-binding-linux-arm64-musl": "1.0.0-alpha.45",
|
|
153
|
+
"@visulima/vis-binding-linux-x64-gnu": "1.0.0-alpha.45",
|
|
154
|
+
"@visulima/vis-binding-linux-arm64-gnu": "1.0.0-alpha.45",
|
|
155
|
+
"@visulima/vis-binding-linux-x64-musl": "1.0.0-alpha.45",
|
|
156
|
+
"@visulima/vis-binding-win32-arm64-msvc": "1.0.0-alpha.45",
|
|
157
|
+
"@visulima/vis-binding-win32-x64-msvc": "1.0.0-alpha.45"
|
|
154
158
|
},
|
|
155
159
|
"engines": {
|
|
156
160
|
"node": "^22.14.0 || >=24.10.0"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as l}from"node:module";import{f as g,v as h}from"./index-OQZQyN5R.js";const E=l(import.meta.url),_=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,d=e=>{if(typeof _<"u"&&_.versions&&_.versions.node){const[s,t]=_.versions.node.split(".").map(Number);if(s>22||s===22&&t>=3||s===20&&t>=16)return _.getBuiltinModule(e)}return E(e)},{spawnSync:p}=d("node:child_process"),b="0000000000000000000000000000000000000000",A=e=>{if(g(e))try{const s=h(e);return JSON.parse(s)}catch{return}},I=(e,s)=>{const t=p("git",e,{cwd:s,encoding:"utf8"});if(!(t.error||typeof t.status!="number"||t.status!==0))return typeof t.stdout=="string"?t.stdout.trim():void 0},c=e=>typeof e=="string"&&e.length>0&&e!==b,f=(e,s,t)=>{const r=[],o=e.GITHUB_BASE_REF,i=e.GITHUB_SHA??"HEAD";if(o&&o.length>0)return r.push(`pull_request: $GITHUB_BASE_REF=${o}`),{base:`origin/${o}`,head:i,notes:r,provider:"github"};const a=e.GITHUB_EVENT_PATH,n=a?t(a):void 0;if(n){const u=typeof n.before=="string"?n.before:void 0;if(c(u))return r.push(`push: event.before=${u}`),{base:u,head:i,notes:r,provider:"github"}}return r.push(`fallback: origin/${s}`),{base:`origin/${s}`,head:i,notes:r,provider:"github"}},R=(e,s)=>{const t=[],r=e.CI_COMMIT_SHA??"HEAD";if(e.CI_PIPELINE_SOURCE==="merge_request_event"){const a=e.CI_MERGE_REQUEST_DIFF_BASE_SHA;if(c(a))return t.push(`merge_request: $CI_MERGE_REQUEST_DIFF_BASE_SHA=${a}`),{base:a,head:r,notes:t,provider:"gitlab"};const n=e.CI_MERGE_REQUEST_TARGET_BRANCH_NAME;if(n&&n.length>0)return t.push(`merge_request: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME=${n}`),{base:`origin/${n}`,head:r,notes:t,provider:"gitlab"}}const o=e.CI_COMMIT_BEFORE_SHA;if(c(o))return t.push(`push: $CI_COMMIT_BEFORE_SHA=${o}`),{base:o,head:r,notes:t,provider:"gitlab"};const i=e.CI_DEFAULT_BRANCH??s;return t.push(`fallback: origin/${i}`),{base:`origin/${i}`,head:r,notes:t,provider:"gitlab"}},C=(e,s)=>{const t=[],r=e.BUILDKITE_COMMIT??"HEAD",o=e.BUILDKITE_PULL_REQUEST_BASE_BRANCH;return o&&o.length>0?(t.push(`pull_request: $BUILDKITE_PULL_REQUEST_BASE_BRANCH=${o}`),{base:`origin/${o}`,head:r,notes:t,provider:"buildkite"}):(t.push(`fallback: origin/${s} (buildkite has no canonical previous-build SHA env)`),{base:`origin/${s}`,head:r,notes:t,provider:"buildkite"})},v=(e,s)=>{const t=[],r=e.CIRCLE_SHA1??"HEAD",o=e.CIRCLE_PR_BASE_BRANCH;return o&&o.length>0?(t.push(`pull_request: $CIRCLE_PR_BASE_BRANCH=${o}`),{base:`origin/${o}`,head:r,notes:t,provider:"circleci"}):(t.push(`fallback: origin/${s} (circleci has no canonical previous-build SHA env)`),{base:`origin/${s}`,head:r,notes:t,provider:"circleci"})},T=(e,s,t)=>{const r=[],o=s(["merge-base","HEAD",`origin/${e}`],t);return o&&o.length>0?(r.push(`local: git merge-base HEAD origin/${e}=${o}`),{base:o,head:"HEAD",notes:r,provider:"local"}):(r.push(`local fallback: origin/${e} (no merge-base available)`),{base:`origin/${e}`,head:"HEAD",notes:r,provider:"local"})},$=e=>{const s=e?.env??process.env,t=e?.defaultBase??"main",r=e?.readEventPayload??A,o=e?.runGit??I,i=e?.workspaceRoot??process.cwd();return s.GITHUB_ACTIONS==="true"?f(s,t,r):s.GITLAB_CI==="true"?R(s,t):s.BUILDKITE==="true"?C(s,t):s.CIRCLECI==="true"?v(s,t):T(t,o,i)};export{$ as r};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{createRequire as a}from"node:module";import{l as c}from"./target-options-ChWcK60i.js";import{m as d}from"./index-OQZQyN5R.js";const p=a(import.meta.url),o=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,i=r=>{if(typeof o<"u"&&o.versions&&o.versions.node){const[e,t]=o.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return o.getBuiltinModule(r)}return p(r)},{createRequire:u}=i("node:module"),{pathToFileURL:m}=i("node:url"),s=["temporal","urlpattern"],f=r=>{const e=r.trim().toLowerCase();return e===""||e==="all"||e==="1"||e==="true"?s:e.split(",").map(t=>t.trim()).filter(t=>s.includes(t))},l=async(r,e)=>{try{const t=u(d(e,"__vis_polyfill_resolver__.js")).resolve(r);return await import(m(t).href)}catch{return}},_=async r=>{if(globalThis.Temporal!==void 0)return;const e=await l("@js-temporal/polyfill",r);e?.Temporal===void 0?process.stderr.write(`vis: --polyfill temporal requested but @js-temporal/polyfill is not installed in this project.
|
|
2
|
-
`):globalThis.Temporal=e.Temporal},v=async r=>{if(globalThis.URLPattern!==void 0)return;const e=await l("urlpattern-polyfill",r);e?.URLPattern===void 0?process.stderr.write(`vis: --polyfill urlpattern requested but urlpattern-polyfill is not installed in this project.
|
|
3
|
-
`):globalThis.URLPattern=e.URLPattern},y=async(r,e=process.cwd())=>{const t=f(r);await Promise.all(t.map(async n=>{await(n==="temporal"?_(e):v(e))}))},b=async r=>{for(const[e,t]of Object.entries(c(r,!0)))process.env[e]===void 0&&(process.env[e]=t);process.env.VIS_POLYFILL!==void 0&&await y(process.env.VIS_POLYFILL,r)};export{b as p};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as g}from"node:module";import{c as b}from"./compile-cache-B_Vf_WxT.js";import{i as T,h as y,t as R,p as m,c as w}from"./runtime-process-Dmz0vCJy-DUwTvH1J.js";import"./window-ops-DDePlWLV.js";import"./index.server-J83sowC4.js";import"./index-OQZQyN5R.js";import{I as O}from"./index-B0EsgdzO.js";import{a as I}from"./readJsonSync-CvkZyKmL-CY7PZob_.js";const _=g(import.meta.url),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,x=e=>{if(typeof r<"u"&&r.versions&&r.versions.node){const[s,o]=r.versions.node.split(".").map(Number);if(s>22||s===22&&o>=3||s===20&&o>=16)return r.getBuiltinModule(e)}return _(e)},{createRequire:S}=x("node:module"),M=S(import.meta.url),t=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,f=e=>{if(typeof t<"u"&&t.versions&&t.versions.node){const[s,o]=t.versions.node.split(".").map(Number);if(s>22||s===22&&o>=3||s===20&&o>=16)return t.getBuiltinModule(e)}return M(e)},{execFileSync:N}=f("node:child_process"),{totalmem:$}=f("node:os"),j=/--max-old-space-size=(\d+)/,V=/--max-semi-space-size=(\d+)/,E=e=>Math.floor($()/1024/1024*e),q=e=>e<=512?4:e<=1024?8:e<=2048?16:e<=4096?32:e<=8192?64:Math.floor(Math.log2(e))*8,d=(e,s)=>{for(const o of s){const n=e.exec(o);if(n)return Number.parseInt(n[1],10)}},z=e=>{const o=[...w()],n=[...T()],a=d(j,o),p=d(V,o);if(a!==void 0&&p!==void 0)return;const l=a??E(.75),v=p??q(l),c=[];if(a===void 0&&c.push(`--max-old-space-size=${String(l)}`),p===void 0&&c.push(`--max-semi-space-size=${String(v)}`),c.length!==0)try{N(y(),[...c,...o,...n.slice(1)],{env:R(),stdio:"inherit"}),m(0)}catch(h){const u=h.status;m(typeof u=="number"?u:1)}},C=()=>{if(process.env.VIS_VERSION)return process.env.VIS_VERSION;try{const e=new URL("../../package.json",import.meta.url);return I(e).version}catch{return"0.0.0"}},B=()=>{process.env.VIS_VERSION=C()},G=e=>{!process.stdout.isTTY||O||process.env.TERM==="dumb"||process.stdout.write(`\x1B]0;${e}\x07`)},L=new Set(["","--help","--version","-h","-v","completion","dlx","exec","x"]),i=process.argv[2]??"";!L.has(i)&&!process.argv.includes("--help")&&!process.argv.includes("-h")&&z();process.argv.includes("--no-color")&&(process.env.NO_COLOR="1",process.env.FORCE_COLOR="0");B();b();(async()=>{if(i==="__pm-shim"){const{dispatchShim:s}=await import("../packem_chunks/dispatch.js");s(process.argv[3]??"",process.argv.slice(4));return}if(i==="x"){const{runLeanX:s}=await import("../packem_chunks/lean.js");await s(process.argv.slice(3));return}if(i==="exec"||i==="dlx"){const{runExecCli:s}=await import("../packem_chunks/cli-exec.js");await s();return}const{runCli:e}=await import("../packem_chunks/cli-main.js").then(s=>s.ar);await e()})();export{G as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{W as o}from"./index-OQZQyN5R.js";const r=async(s,a)=>await o(s,a);export{r as s};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import{createRequire as Dr}from"node:module";const Ir=Dr(import.meta.url),Et=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Pr=t=>{if(typeof Et<"u"&&Et.versions&&Et.versions.node){const[e,r]=Et.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Et.getBuiltinModule(t)}return Ir(t)},{createRequire:B}=Pr("node:module"),_e=0,Fr=4,Gr=Symbol("findUpStop"),Ji=/"(?:[^"\\]|\\.)*"|\/\/[^\r\n]*|\/\*[\s\S]*?\*\//g,Ur=/^[A-Z]:\//i,vt=(t="")=>t&&t.replaceAll("\\","/").replace(Ur,e=>e.toUpperCase()),jr=/^[/\\]{2}/,zr=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,cr=/^[A-Z]:$/i,Le=/^\/([A-Z]:)?$/i,Wr=/.(\.[^./]+)$/,qr=/^[/\\]|^[a-z]:[/\\]/i,Kr=/\/$/,Xr=()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/",tu="/",pr=(t,e)=>{let r="",o=0,n=-1,s=0,i;for(let u=0;u<=t.length;++u){if(u<t.length)i=t[u];else{if(i==="/")break;i="/"}if(i==="/"){if(!(n===u-1||s===1))if(s===2){if(r.length<2||o!==2||!r.endsWith(".")||r.at(-2)!=="."){if(r.length>2){const a=r.lastIndexOf("/");a===-1?(r="",o=0):(r=r.slice(0,a),o=r.length-1-r.lastIndexOf("/")),n=u,s=0;continue}else if(r.length>0){r="",o=0,n=u,s=0;continue}}e&&(r+=r.length>0?"/..":"..",o=2)}else r.length>0?r+=`/${t.slice(n+1,u)}`:r=t.slice(n+1,u),o=u-n-1;n=u,s=0}else i==="."&&s!==-1?++s:s=-1}return r},bt=t=>zr.test(t),ae=function(t){if(t.length===0)return".";t=vt(t);const e=jr.exec(t),r=bt(t),o=t.at(-1)==="/";return t=pr(t,!r),t.length===0?r?"/":o?"./":".":(o&&(t+="/"),cr.test(t)&&(t+="/"),e?r?`//${t}`:`//./${t}`:r&&!bt(t)?`/${t}`:t)},Qr=(...t)=>{let e="";for(const r of t)if(r)if(e.length>0){const o=e.at(-1)==="/",n=r[0]==="/";o&&n?e+=r.slice(1):e+=o||n?r:`/${r}`}else e+=r;return ae(e)},$t=function(...t){t=t.map(o=>vt(o));let e="",r=!1;for(let o=t.length-1;o>=-1&&!r;o--){const n=o>=0?t[o]:Xr();!n||n.length===0||(e=`${n}/${e}`,r=bt(n))}return e=pr(e,!r),r&&!bt(e)?`/${e}`:e.length>0?e:"."},Zr=function(t){return Wr.exec(vt(t))?.[1]??""},eu=function(t,e){const r=$t(t).replace(Le,"$1").split("/"),o=$t(e).replace(Le,"$1").split("/");if(o[0][1]===":"&&r[0][1]===":"&&r[0]!==o[0])return o.join("/");const n=Math.min(r.length,o.length);let s=0;for(;s<n&&r[s]===o[s];)s+=1;const i=r.length-s;return[...Array.from({length:i}).fill(".."),...o.slice(s)].join("/")},ke=t=>{const e=vt(t).replace(Kr,""),r=e.lastIndexOf("/");if(r===-1)return bt(t)?"/":".";const o=e.slice(0,r);return cr.test(o)?`${o}/`:o||(bt(t)?"/":".")},fr=(t,e)=>{const r=vt(t),o=r.slice(r.lastIndexOf("/")+1);if(e&&o.endsWith(e)){if(e===r)return"";const n=o.slice(0,-e.length);if(n.length>0)return n}return o},Yr=function(t){const e=qr.exec(t)?.[0]?.replaceAll("\\","/")??"",r=fr(t),o=Zr(r);return{base:r,dir:ke(t),ext:o,name:r.slice(0,r.length-o.length),root:e}},Vr=B(import.meta.url),xt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Jr=t=>{if(typeof xt<"u"&&xt.versions&&xt.versions.node){const[e,r]=xt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return xt.getBuiltinModule(t)}return Vr(t)},{fileURLToPath:ts}=Jr("node:url");function es(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var He,Be;function rs(){return Be||(Be=1,He=["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"]),He}var ss=rs();const os=es(ss);new Set(os);const ct=t=>vt(t instanceof URL?ts(t):t);let ns=class extends Error{constructor(e){super(`EEXIST: ${e}`)}get code(){return"EEXIST"}set code(e){throw new Error("Cannot overwrite code EEXIST")}get name(){return"AlreadyExistsError"}set name(e){throw new Error("Cannot overwrite name of AlreadyExistsError")}};const pt=t=>{if(!t||!(t instanceof URL)&&typeof t!="string")throw new TypeError("Path must be a non-empty string or URL.")},is=B(import.meta.url),At=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,us=t=>{if(typeof At<"u"&&At.versions&&At.versions.node){const[e,r]=At.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return At.getBuiltinModule(t)}return is(t)};us("node:fs/promises");const ls=B(import.meta.url),St=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,as=t=>{if(typeof St<"u"&&St.versions&&St.versions.node){const[e,r]=St.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return St.getBuiltinModule(t)}return ls(t)};as("node:fs");const ce=t=>{if(t.isFile())return"file";if(t.isDirectory())return"dir";if(t.isSymbolicLink())return"symlink"},cs=B(import.meta.url),wt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ps=t=>{if(typeof wt<"u"&&wt.versions&&wt.versions.node){const[e,r]=wt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return wt.getBuiltinModule(t)}return cs(t)},{lstat:Me,mkdir:fs}=ps("node:fs/promises"),su=async t=>{pt(t);try{const e=await Me(t);if(!e.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(ce(e))}'`);return}catch(e){if(e.code!=="ENOENT")throw e}try{await fs(t,{recursive:!0})}catch(e){if(e.code!=="EEXIST")throw e;const r=await Me(t);if(!r.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(ce(r))}'`,{cause:e})}},hs=B(import.meta.url),Rt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,gs=t=>{if(typeof Rt<"u"&&Rt.versions&&Rt.versions.node){const[e,r]=Rt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Rt.getBuiltinModule(t)}return hs(t)},{lstatSync:De,mkdirSync:ds}=gs("node:fs"),ou=t=>{pt(t);try{const e=De(t);if(!e.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(ce(e))}'`);return}catch(e){if(e.code!=="ENOENT")throw e}try{ds(t,{recursive:!0})}catch(e){if(e.code!=="EEXIST")throw e;const r=De(t);if(!r.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(ce(r))}'`,{cause:e})}},ys=B(import.meta.url),Tt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ms=t=>{if(typeof Tt<"u"&&Tt.versions&&Tt.versions.node){const[e,r]=Tt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Tt.getBuiltinModule(t)}return ys(t)};ms("node:fs/promises");const bs=B(import.meta.url),_t=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,$s=t=>{if(typeof _t<"u"&&_t.versions&&_t.versions.node){const[e,r]=_t.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return _t.getBuiltinModule(t)}return bs(t)};$s("node:fs");const vs=B(import.meta.url),kt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Es=t=>{if(typeof kt<"u"&&kt.versions&&kt.versions.node){const[e,r]=kt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return kt.getBuiltinModule(t)}return vs(t)};Es("node:fs/promises");const xs=B(import.meta.url),Ct=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,As=t=>{if(typeof Ct<"u"&&Ct.versions&&Ct.versions.node){const[e,r]=Ct.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Ct.getBuiltinModule(t)}return xs(t)};As("node:fs");const Ss=B(import.meta.url),Ot=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ws=t=>{if(typeof Ot<"u"&&Ot.versions&&Ot.versions.node){const[e,r]=Ot.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Ot.getBuiltinModule(t)}return Ss(t)};ws("node:fs/promises");const Rs=B(import.meta.url),Nt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ts=t=>{if(typeof Nt<"u"&&Nt.versions&&Nt.versions.node){const[e,r]=Nt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Nt.getBuiltinModule(t)}return Rs(t)};Ts("node:fs");B(import.meta.url);let Ie=class extends Error{root;constructor(e,r){super(`${e instanceof Error?e.message:String(e)} for path "${r}"`),this.cause=e,this.root=r}get name(){return"WalkError"}set name(e){throw new Error("Cannot overwrite name of WalkError")}};const Pe=t=>{const e=t.replace(/[$()+\\^]/g,String.raw`\$&`).replace(/\.\*/g,".([^/]*)").replace(/\*\*/g,"(.*)").replace(/(?<!\.)\*(?!\*)/g,"([^/]*)").replace(/\?/g,"[^/]").replace(/\.(?!\*)/g,String.raw`\.`).replace(/\{/g,"(").replace(/\}/g,")").replace(/,/g,"|").replace(/\[!(.*?)\]/g,"[^$1]");try{return new RegExp(`^${e}$`)}catch(r){throw new Error(`Invalid glob pattern: ${t}`,{cause:r})}};let _s=class{name;path;#t;constructor(e,r,o){this.#t=e,this.name=r,this.path=o}isDirectory(){return this.#t.isDirectory()}isFile(){return this.#t.isFile()}isSymbolicLink(){return this.#t.isSymbolicLink()}};const we=(t,e,r)=>new _s(t,e,r),le=(t,e,r,o)=>{if(Array.isArray(e)&&e.length>0&&!e.some(s=>t.endsWith(s)))return!1;const n=t.includes("\\")?t.replaceAll("\\","/"):t;return r&&!r.some(s=>s.test(n))?!1:!o?.some(s=>s.test(n))},ks=B(import.meta.url),Lt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Cs=t=>{if(typeof Lt<"u"&&Lt.versions&&Lt.versions.node){const[e,r]=Lt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Lt.getBuiltinModule(t)}return ks(t)};Cs("node:fs/promises");const Os=B(import.meta.url),Ht=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ns=t=>{if(typeof Ht<"u"&&Ht.versions&&Ht.versions.node){const[e,r]=Ht.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Ht.getBuiltinModule(t)}return Os(t)},{readdirSync:Ls,realpathSync:Hs,statSync:hr}=Ns("node:fs"),Bs=t=>{const e=ae(t),r=hr(e);return we(r,fr(e),e)};function*Ms(t,e={}){const{extensions:r,followSymlinks:o=!1,includeDirs:n=!0,includeFiles:s=!0,includeSymlinks:i=!0,match:u,maxDepth:a=Number.POSITIVE_INFINITY,skip:b}=e;if(pt(t),a<0)return;const h=e.visited??new Set,y=u?u.map(g=>typeof g=="string"?Pe(g):g):void 0,x=b?b.map(g=>typeof g=="string"?Pe(g):g):void 0;if(t=$t(ct(t)),n&&le(t,r,y,x)&&(yield Bs(t)),!(a<1||!le(t,void 0,void 0,x)))try{const g=Ls(t,{withFileTypes:!0});for(const $ of g){let _=Qr(t,$.name),R=$.isDirectory(),O=$.isFile();if($.isSymbolicLink())if(o){const d=Hs(_);if(h.has(d))continue;_=d;const E=hr(d);R=E.isDirectory(),O=E.isFile()}else if(i&&le(_,r,y,x)){yield we($,$.name,ae(_));continue}else continue;R?(o&&h.add(_),yield*Ms(_,{extensions:r,followSymlinks:o,includeDirs:n,includeFiles:s,includeSymlinks:i,match:y,maxDepth:a-1,skip:x,visited:h})):O&&s&&le(_,r,y,x)&&(yield we($,$.name,ae(_)))}}catch(g){throw g instanceof Ie?g:new Ie(g,t)}}const Ds=B(import.meta.url),Bt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Is=t=>{if(typeof Bt<"u"&&Bt.versions&&Bt.versions.node){const[e,r]=Bt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Bt.getBuiltinModule(t)}return Ds(t)};Is("node:fs/promises");const Ps=B(import.meta.url),Mt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Fs=t=>{if(typeof Mt<"u"&&Mt.versions&&Mt.versions.node){const[e,r]=Mt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Mt.getBuiltinModule(t)}return Ps(t)},{statSync:Gs,lstatSync:Us}=Fs("node:fs"),uu=(t,e={})=>{if(typeof t!="string"&&!Array.isArray(t)&&typeof t!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const r=e.cwd?ct(e.cwd):process.cwd();let o=$t(r);const{root:n}=Yr(o),s=ct(e.stopAt??n),i=$t(o,s),u=e.type??"file",a=function(h){return typeof t=="function"?[t(h)]:typeof t=="string"?[t]:Array.isArray(t)?t:[t]};e.allowSymlinks??=!0;const b=e.allowSymlinks?Gs:Us;for(;o&&o!==i&&o!==n;){for(let h of a(o)){if(h===Gr)return;if(h===void 0)continue;Buffer.isBuffer(h)?h=h.toString():h instanceof URL&&(h=ct(h));const y=bt(h)?h:$t(o,h);try{const x=b(y);if(u==="file"&&x.isFile()||u==="directory"&&x.isDirectory())return y}catch{}}o=ke(o)}};function Ce(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Fe={},ge,Ge;function pe(){if(Ge)return ge;Ge=1;const t="[^\\\\/]",e=Symbol("unignore"),r="\\.",o="\\+",n="\\?",s="\\/",i="(?=.)",u="[^/]",a=`(?:${s}|$)`,b=`(?:^|${s})`,h=`${r}{1,2}${a}`,y=`(?!${r})`,x=`(?!${b}${h})`,g=`(?!${r}{0,1}${a})`,$=`(?!${h})`,_=`[^.${s}]`,R=`${u}*?`,O="/",d={DOT_LITERAL:r,PLUS_LITERAL:o,QMARK_LITERAL:n,SLASH_LITERAL:s,ONE_CHAR:i,QMARK:u,END_ANCHOR:a,DOTS_SLASH:h,NO_DOT:y,NO_DOTS:x,NO_DOT_SLASH:g,NO_DOTS_SLASH:$,QMARK_NO_DOT:_,STAR:R,START_ANCHOR:b,SEP:O},E={...d,SLASH_LITERAL:"[\\\\/]",QMARK:t,STAR:`${t}*?`,DOTS_SLASH:`${r}{1,2}(?:[\\\\/]|$)`,NO_DOT:`(?!${r})`,NO_DOTS:`(?!(?:^|[\\\\/])${r}{1,2}(?:[\\\\/]|$))`,NO_DOT_SLASH:`(?!${r}{0,1}(?:[\\\\/]|$))`,NO_DOTS_SLASH:`(?!${r}{1,2}(?:[\\\\/]|$))`,QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},l={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return ge={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:l,UNIGNORE:e,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(A){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${A.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(A){return A===!0?E:d}},ge}var Ue;function fe(){return Ue||(Ue=1,(function(t){const{REGEX_BACKSLASH:e,REGEX_REMOVE_BACKSLASH:r,REGEX_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_GLOBAL:n}=pe();t.isObject=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),t.hasRegexChars=s=>o.test(s),t.isRegexChar=s=>s.length===1&&t.hasRegexChars(s),t.escapeRegex=s=>s.replace(n,"\\$1"),t.toPosixSlashes=s=>s.replace(e,"/"),t.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){const s=navigator.platform.toLowerCase();return s==="win32"||s==="windows"}return process.platform?process.platform==="win32":!1},t.removeBackslashes=s=>s.replace(r,i=>i==="\\"?"":i),t.escapeLast=(s,i,u)=>{const a=s.lastIndexOf(i,u);return a===-1?s:s[a-1]==="\\"?t.escapeLast(s,i,a-1):`${s.slice(0,a)}\\${s.slice(a)}`},t.removePrefix=(s,i={})=>{let u=s;return u.startsWith("./")&&(u=u.slice(2),i.prefix="./"),u},t.wrapOutput=(s,i={},u={})=>{const a=u.contains?"":"^",b=u.contains?"":"$";let h=`${a}(?:${s})${b}`;return i.negated===!0&&(h=`(?:^(?!${h}).*$)`),h},t.basename=(s,{windows:i}={})=>{const u=s.split(i?/[\\/]/:"/"),a=u[u.length-1];return a===""?u[u.length-2]:a}})(Fe)),Fe}var de,je;function js(){if(je)return de;je=1;const t=fe(),{CHAR_ASTERISK:e,CHAR_AT:r,CHAR_BACKWARD_SLASH:o,CHAR_COMMA:n,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:i,CHAR_FORWARD_SLASH:u,CHAR_LEFT_CURLY_BRACE:a,CHAR_LEFT_PARENTHESES:b,CHAR_LEFT_SQUARE_BRACKET:h,CHAR_PLUS:y,CHAR_QUESTION_MARK:x,CHAR_RIGHT_CURLY_BRACE:g,CHAR_RIGHT_PARENTHESES:$,CHAR_RIGHT_SQUARE_BRACKET:_}=pe(),R=d=>d===u||d===o,O=d=>{d.isPrefix!==!0&&(d.depth=d.isGlobstar?1/0:1)};return de=(d,E)=>{const l=E||{},A=d.length-1,w=l.parts===!0||l.scanToEnd===!0,T=[],S=[],k=[];let F=d,D=-1,U=0,rt=0,Z=!1,st=!1,j=!1,lt=!1,gt=!1,ot=!1,P=!1,nt=!1,dt=!1,Y=!1,Q=0,J,C,H={value:"",depth:0,isGlob:!1};const f=()=>D>=A,V=()=>F.charCodeAt(D+1),K=()=>(J=C,F.charCodeAt(++D));for(;D<A;){C=K();let M;if(C===o){P=H.backslashes=!0,C=K(),C===a&&(ot=!0);continue}if(ot===!0||C===a){for(Q++;f()!==!0&&(C=K());){if(C===o){P=H.backslashes=!0,K();continue}if(C===a){Q++;continue}if(ot!==!0&&C===s&&(C=K())===s){if(Z=H.isBrace=!0,j=H.isGlob=!0,Y=!0,w===!0)continue;break}if(ot!==!0&&C===n){if(Z=H.isBrace=!0,j=H.isGlob=!0,Y=!0,w===!0)continue;break}if(C===g&&(Q--,Q===0)){ot=!1,Z=H.isBrace=!0,Y=!0;break}}if(w===!0)continue;break}if(C===u){if(T.push(D),S.push(H),H={value:"",depth:0,isGlob:!1},Y===!0)continue;if(J===s&&D===U+1){U+=2;continue}rt=D+1;continue}if(l.noext!==!0&&(C===y||C===r||C===e||C===x||C===i)&&V()===b){if(j=H.isGlob=!0,lt=H.isExtglob=!0,Y=!0,C===i&&D===U&&(dt=!0),w===!0){for(;f()!==!0&&(C=K());){if(C===o){P=H.backslashes=!0,C=K();continue}if(C===$){j=H.isGlob=!0,Y=!0;break}}continue}break}if(C===e){if(J===e&&(gt=H.isGlobstar=!0),j=H.isGlob=!0,Y=!0,w===!0)continue;break}if(C===x){if(j=H.isGlob=!0,Y=!0,w===!0)continue;break}if(C===h){for(;f()!==!0&&(M=K());){if(M===o){P=H.backslashes=!0,K();continue}if(M===_){st=H.isBracket=!0,j=H.isGlob=!0,Y=!0;break}}if(w===!0)continue;break}if(l.nonegate!==!0&&C===i&&D===U){nt=H.negated=!0,U++;continue}if(l.noparen!==!0&&C===b){if(j=H.isGlob=!0,w===!0){for(;f()!==!0&&(C=K());){if(C===b){P=H.backslashes=!0,C=K();continue}if(C===$){Y=!0;break}}continue}break}if(j===!0){if(Y=!0,w===!0)continue;break}}l.noext===!0&&(lt=!1,j=!1);let q=F,c="",p="";U>0&&(c=F.slice(0,U),F=F.slice(U),rt-=U),q&&j===!0&&rt>0?(q=F.slice(0,rt),p=F.slice(rt)):j===!0?(q="",p=F):q=F,q&&q!==""&&q!=="/"&&q!==F&&R(q.charCodeAt(q.length-1))&&(q=q.slice(0,-1)),l.unescape===!0&&(p&&(p=t.removeBackslashes(p)),q&&P===!0&&(q=t.removeBackslashes(q)));const et={prefix:c,input:d,start:U,base:q,glob:p,isBrace:Z,isBracket:st,isGlob:j,isExtglob:lt,isGlobstar:gt,negated:nt,negatedExtglob:dt};if(l.tokens===!0&&(et.maxDepth=0,R(C)||S.push(H),et.tokens=S),l.parts===!0||l.tokens===!0){let M;for(let z=0;z<T.length;z++){const at=M?M+1:U,tt=T[z],ft=d.slice(at,tt);l.tokens&&(z===0&&U!==0?(S[z].isPrefix=!0,S[z].value=c):S[z].value=ft,O(S[z]),et.maxDepth+=S[z].depth),(z!==0||ft!=="")&&k.push(ft),M=tt}if(M&&M+1<d.length){const z=d.slice(M+1);k.push(z),l.tokens&&(S[S.length-1].value=z,O(S[S.length-1]),et.maxDepth+=S[S.length-1].depth)}et.slashes=T,et.parts=k}return et},de}var ye,ze;function zs(){if(ze)return ye;ze=1;const t=pe(),e=fe(),{MAX_LENGTH:r,POSIX_REGEX_SOURCE:o,REGEX_NON_SPECIAL_CHARS:n,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:i}=t,u=(d,E)=>typeof E.expandRange=="function"?E.expandRange(...d,E):(d.sort(),`[${d.join("-")}]`),a=(d,E)=>`Missing ${d}: "${E}" - use "\\\\${E}" to match literal characters`,b=d=>{const E=[];let l=0,A=0,w=0,T="",S=!1;for(const k of d){if(S===!0){T+=k,S=!1;continue}if(k==="\\"){T+=k,S=!0;continue}if(k==='"'){w=w===1?0:1,T+=k;continue}if(w===0){if(k==="[")l++;else if(k==="]"&&l>0)l--;else if(l===0){if(k==="(")A++;else if(k===")"&&A>0)A--;else if(k==="|"&&A===0){E.push(T),T="";continue}}}T+=k}return E.push(T),E},h=d=>{let E=!1;for(const l of d){if(E===!0){E=!1;continue}if(l==="\\"){E=!0;continue}if(/[?*+@!()[\]{}]/.test(l))return!1}return!0},y=d=>{let E=d.trim(),l=!0;for(;l===!0;)l=!1,/^@\([^\\()[\]{}|]+\)$/.test(E)&&(E=E.slice(2,-1),l=!0);if(h(E))return E.replace(/\\(.)/g,"$1")},x=d=>{const E=d.map(y).filter(Boolean);for(let l=0;l<E.length;l++)for(let A=l+1;A<E.length;A++){const w=E[l],T=E[A],S=w[0];if(!(!S||w!==S.repeat(w.length)||T!==S.repeat(T.length))&&(w===T||w.startsWith(T)||T.startsWith(w)))return!0}return!1},g=(d,E=!0)=>{if(d[0]!=="+"&&d[0]!=="*"||d[1]!=="(")return;let l=0,A=0,w=0,T=!1;for(let S=1;S<d.length;S++){const k=d[S];if(T===!0){T=!1;continue}if(k==="\\"){T=!0;continue}if(k==='"'){w=w===1?0:1;continue}if(w!==1){if(k==="["){l++;continue}if(k==="]"&&l>0){l--;continue}if(!(l>0)){if(k==="("){A++;continue}if(k===")"&&(A--,A===0))return E===!0&&S!==d.length-1?void 0:{type:d[0],body:d.slice(2,S),end:S}}}}},$=d=>{let E=0;const l=[];for(;E<d.length;){const A=g(d.slice(E),!1);if(!A||A.type!=="*")return;const w=b(A.body).map(S=>S.trim());if(w.length!==1)return;const T=y(w[0]);if(!T||T.length!==1)return;l.push(T),E+=A.end+1}return l.length<1?void 0:`${l.length===1?e.escapeRegex(l[0]):`[${l.map(A=>e.escapeRegex(A)).join("")}]`}*`},_=d=>{let E=0,l=d.trim(),A=g(l);for(;A;)E++,l=A.body.trim(),A=g(l);return E},R=(d,E)=>{if(E.maxExtglobRecursion===!1)return{risky:!1};const l=typeof E.maxExtglobRecursion=="number"?E.maxExtglobRecursion:t.DEFAULT_MAX_EXTGLOB_RECURSION,A=b(d).map(w=>w.trim());if(A.length>1&&(A.some(w=>w==="")||A.some(w=>/^[*?]+$/.test(w))||x(A)))return{risky:!0};for(const w of A){const T=$(w);if(T)return{risky:!0,safeOutput:T};if(_(w)>l)return{risky:!0}}return{risky:!1}},O=(d,E)=>{if(typeof d!="string")throw new TypeError("Expected a string");d=i[d]||d;const l={...E},A=typeof l.maxLength=="number"?Math.min(r,l.maxLength):r;let w=d.length;if(w>A)throw new SyntaxError(`Input length: ${w}, exceeds maximum allowed length: ${A}`);const T={type:"bos",value:"",output:l.prepend||""},S=[T],k=l.capture?"":"?:",F=t.globChars(l.windows),D=t.extglobChars(F),{DOT_LITERAL:U,PLUS_LITERAL:rt,SLASH_LITERAL:Z,ONE_CHAR:st,DOTS_SLASH:j,NO_DOT:lt,NO_DOT_SLASH:gt,NO_DOTS_SLASH:ot,QMARK:P,QMARK_NO_DOT:nt,STAR:dt,START_ANCHOR:Y}=F,Q=v=>`(${k}(?:(?!${Y}${v.dot?j:U}).)*?)`,J=l.dot?"":lt,C=l.dot?P:nt;let H=l.bash===!0?Q(l):dt;l.capture&&(H=`(${H})`),typeof l.noext=="boolean"&&(l.noextglob=l.noext);const f={input:d,index:-1,start:0,dot:l.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:S};d=e.removePrefix(d,f),w=d.length;const V=[],K=[],q=[];let c=T,p;const et=()=>f.index===w-1,M=f.peek=(v=1)=>d[f.index+v],z=f.advance=()=>d[++f.index]||"",at=()=>d.slice(f.index+1),tt=(v="",G=0)=>{f.consumed+=v,f.index+=G},ft=v=>{f.output+=v.output!=null?v.output:v.value,tt(v.value)},Br=()=>{let v=1;for(;M()==="!"&&(M(2)!=="("||M(3)==="?");)z(),f.start++,v++;return v%2===0?!1:(f.negated=!0,f.start++,!0)},ie=v=>{f[v]++,q.push(v)},ht=v=>{f[v]--,q.pop()},N=v=>{if(c.type==="globstar"){const G=f.braces>0&&(v.type==="comma"||v.type==="brace"),m=v.extglob===!0||V.length&&(v.type==="pipe"||v.type==="paren");v.type!=="slash"&&v.type!=="paren"&&!G&&!m&&(f.output=f.output.slice(0,-c.output.length),c.type="star",c.value="*",c.output=H,f.output+=c.output)}if(V.length&&v.type!=="paren"&&(V[V.length-1].inner+=v.value),(v.value||v.output)&&ft(v),c&&c.type==="text"&&v.type==="text"){c.output=(c.output||c.value)+v.value,c.value+=v.value;return}v.prev=c,S.push(v),c=v},ue=(v,G)=>{const m={...D[G],conditions:1,inner:""};m.prev=c,m.parens=f.parens,m.output=f.output,m.startIndex=f.index,m.tokensIndex=S.length;const L=(l.capture?"(":"")+m.open;ie("parens"),N({type:v,value:G,output:f.output?"":st}),N({type:"paren",extglob:!0,value:z(),output:L}),V.push(m)},Mr=v=>{const G=d.slice(v.startIndex,f.index+1),m=d.slice(v.startIndex+2,f.index),L=R(m,l);if((v.type==="plus"||v.type==="star")&&L.risky){const I=L.safeOutput?(v.output?"":st)+(l.capture?`(${L.safeOutput})`:L.safeOutput):void 0,it=S[v.tokensIndex];it.type="text",it.value=G,it.output=I||e.escapeRegex(G);for(let ut=v.tokensIndex+1;ut<S.length;ut++)S[ut].value="",S[ut].output="",delete S[ut].suffix;f.output=v.output+it.output,f.backtrack=!0,N({type:"paren",extglob:!0,value:p,output:""}),ht("parens");return}let W=v.close+(l.capture?")":""),X;if(v.type==="negate"){let I=H;if(v.inner&&v.inner.length>1&&v.inner.includes("/")&&(I=Q(l)),(I!==H||et()||/^\)+$/.test(at()))&&(W=v.close=`)$))${I}`),v.inner.includes("*")&&(X=at())&&/^\.[^\\/.]+$/.test(X)){const it=O(X,{...E,fastpaths:!1}).output;W=v.close=`)${it})${I})`}v.prev.type==="bos"&&(f.negatedExtglob=!0)}N({type:"paren",extglob:!0,value:p,output:W}),ht("parens")};if(l.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(d)){let v=!1,G=d.replace(s,(m,L,W,X,I,it)=>X==="\\"?(v=!0,m):X==="?"?L?L+X+(I?P.repeat(I.length):""):it===0?C+(I?P.repeat(I.length):""):P.repeat(W.length):X==="."?U.repeat(W.length):X==="*"?L?L+X+(I?H:""):H:L?m:`\\${m}`);return v===!0&&(l.unescape===!0?G=G.replace(/\\/g,""):G=G.replace(/\\+/g,m=>m.length%2===0?"\\\\":m?"\\":"")),G===d&&l.contains===!0?(f.output=d,f):(f.output=e.wrapOutput(G,f,E),f)}for(;!et();){if(p=z(),p==="\0")continue;if(p==="\\"){const m=M();if(m==="/"&&l.bash!==!0||m==="."||m===";")continue;if(!m){p+="\\",N({type:"text",value:p});continue}const L=/^\\+/.exec(at());let W=0;if(L&&L[0].length>2&&(W=L[0].length,f.index+=W,W%2!==0&&(p+="\\")),l.unescape===!0?p=z():p+=z(),f.brackets===0){N({type:"text",value:p});continue}}if(f.brackets>0&&(p!=="]"||c.value==="["||c.value==="[^")){if(l.posix!==!1&&p===":"){const m=c.value.slice(1);if(m.includes("[")&&(c.posix=!0,m.includes(":"))){const L=c.value.lastIndexOf("["),W=c.value.slice(0,L),X=c.value.slice(L+2),I=o[X];if(I){c.value=W+I,f.backtrack=!0,z(),!T.output&&S.indexOf(c)===1&&(T.output=st);continue}}}(p==="["&&M()!==":"||p==="-"&&M()==="]")&&(p=`\\${p}`),p==="]"&&(c.value==="["||c.value==="[^")&&(p=`\\${p}`),l.posix===!0&&p==="!"&&c.value==="["&&(p="^"),c.value+=p,ft({value:p});continue}if(f.quotes===1&&p!=='"'){p=e.escapeRegex(p),c.value+=p,ft({value:p});continue}if(p==='"'){f.quotes=f.quotes===1?0:1,l.keepQuotes===!0&&N({type:"text",value:p});continue}if(p==="("){ie("parens"),N({type:"paren",value:p});continue}if(p===")"){if(f.parens===0&&l.strictBrackets===!0)throw new SyntaxError(a("opening","("));const m=V[V.length-1];if(m&&f.parens===m.parens+1){Mr(V.pop());continue}N({type:"paren",value:p,output:f.parens?")":"\\)"}),ht("parens");continue}if(p==="["){if(l.nobracket===!0||!at().includes("]")){if(l.nobracket!==!0&&l.strictBrackets===!0)throw new SyntaxError(a("closing","]"));p=`\\${p}`}else ie("brackets");N({type:"bracket",value:p});continue}if(p==="]"){if(l.nobracket===!0||c&&c.type==="bracket"&&c.value.length===1){N({type:"text",value:p,output:`\\${p}`});continue}if(f.brackets===0){if(l.strictBrackets===!0)throw new SyntaxError(a("opening","["));N({type:"text",value:p,output:`\\${p}`});continue}ht("brackets");const m=c.value.slice(1);if(c.posix!==!0&&m[0]==="^"&&!m.includes("/")&&(p=`/${p}`),c.value+=p,ft({value:p}),l.literalBrackets===!1||e.hasRegexChars(m))continue;const L=e.escapeRegex(c.value);if(f.output=f.output.slice(0,-c.value.length),l.literalBrackets===!0){f.output+=L,c.value=L;continue}c.value=`(${k}${L}|${c.value})`,f.output+=c.value;continue}if(p==="{"&&l.nobrace!==!0){ie("braces");const m={type:"brace",value:p,output:"(",outputIndex:f.output.length,tokensIndex:f.tokens.length};K.push(m),N(m);continue}if(p==="}"){const m=K[K.length-1];if(l.nobrace===!0||!m){N({type:"text",value:p,output:p});continue}let L=")";if(m.dots===!0){const W=S.slice(),X=[];for(let I=W.length-1;I>=0&&(S.pop(),W[I].type!=="brace");I--)W[I].type!=="dots"&&X.unshift(W[I].value);L=u(X,l),f.backtrack=!0}if(m.comma!==!0&&m.dots!==!0){const W=f.output.slice(0,m.outputIndex),X=f.tokens.slice(m.tokensIndex);m.value=m.output="\\{",p=L="\\}",f.output=W;for(const I of X)f.output+=I.output||I.value}N({type:"brace",value:p,output:L}),ht("braces"),K.pop();continue}if(p==="|"){V.length>0&&V[V.length-1].conditions++,N({type:"text",value:p});continue}if(p===","){let m=p;const L=K[K.length-1];L&&q[q.length-1]==="braces"&&(L.comma=!0,m="|"),N({type:"comma",value:p,output:m});continue}if(p==="/"){if(c.type==="dot"&&f.index===f.start+1){f.start=f.index+1,f.consumed="",f.output="",S.pop(),c=T;continue}N({type:"slash",value:p,output:Z});continue}if(p==="."){if(f.braces>0&&c.type==="dot"){c.value==="."&&(c.output=U);const m=K[K.length-1];c.type="dots",c.output+=p,c.value+=p,m.dots=!0;continue}if(f.braces+f.parens===0&&c.type!=="bos"&&c.type!=="slash"){N({type:"text",value:p,output:U});continue}N({type:"dot",value:p,output:U});continue}if(p==="?"){if(!(c&&c.value==="(")&&l.noextglob!==!0&&M()==="("&&M(2)!=="?"){ue("qmark",p);continue}if(c&&c.type==="paren"){const m=M();let L=p;(c.value==="("&&!/[!=<:]/.test(m)||m==="<"&&!/<([!=]|\w+>)/.test(at()))&&(L=`\\${p}`),N({type:"text",value:p,output:L});continue}if(l.dot!==!0&&(c.type==="slash"||c.type==="bos")){N({type:"qmark",value:p,output:nt});continue}N({type:"qmark",value:p,output:P});continue}if(p==="!"){if(l.noextglob!==!0&&M()==="("&&(M(2)!=="?"||!/[!=<:]/.test(M(3)))){ue("negate",p);continue}if(l.nonegate!==!0&&f.index===0){Br();continue}}if(p==="+"){if(l.noextglob!==!0&&M()==="("&&M(2)!=="?"){ue("plus",p);continue}if(c&&c.value==="("||l.regex===!1){N({type:"plus",value:p,output:rt});continue}if(c&&(c.type==="bracket"||c.type==="paren"||c.type==="brace")||f.parens>0){N({type:"plus",value:p});continue}N({type:"plus",value:rt});continue}if(p==="@"){if(l.noextglob!==!0&&M()==="("&&M(2)!=="?"){N({type:"at",extglob:!0,value:p,output:""});continue}N({type:"text",value:p});continue}if(p!=="*"){(p==="$"||p==="^")&&(p=`\\${p}`);const m=n.exec(at());m&&(p+=m[0],f.index+=m[0].length),N({type:"text",value:p});continue}if(c&&(c.type==="globstar"||c.star===!0)){c.type="star",c.star=!0,c.value+=p,c.output=H,f.backtrack=!0,f.globstar=!0,tt(p);continue}let v=at();if(l.noextglob!==!0&&/^\([^?]/.test(v)){ue("star",p);continue}if(c.type==="star"){if(l.noglobstar===!0){tt(p);continue}const m=c.prev,L=m.prev,W=m.type==="slash"||m.type==="bos",X=L&&(L.type==="star"||L.type==="globstar");if(l.bash===!0&&(!W||v[0]&&v[0]!=="/")){N({type:"star",value:p,output:""});continue}const I=f.braces>0&&(m.type==="comma"||m.type==="brace"),it=V.length&&(m.type==="pipe"||m.type==="paren");if(!W&&m.type!=="paren"&&!I&&!it){N({type:"star",value:p,output:""});continue}for(;v.slice(0,3)==="/**";){const ut=d[f.index+4];if(ut&&ut!=="/")break;v=v.slice(3),tt("/**",3)}if(m.type==="bos"&&et()){c.type="globstar",c.value+=p,c.output=Q(l),f.output=c.output,f.globstar=!0,tt(p);continue}if(m.type==="slash"&&m.prev.type!=="bos"&&!X&&et()){f.output=f.output.slice(0,-(m.output+c.output).length),m.output=`(?:${m.output}`,c.type="globstar",c.output=Q(l)+(l.strictSlashes?")":"|$)"),c.value+=p,f.globstar=!0,f.output+=m.output+c.output,tt(p);continue}if(m.type==="slash"&&m.prev.type!=="bos"&&v[0]==="/"){const ut=v[1]!==void 0?"|$":"";f.output=f.output.slice(0,-(m.output+c.output).length),m.output=`(?:${m.output}`,c.type="globstar",c.output=`${Q(l)}${Z}|${Z}${ut})`,c.value+=p,f.output+=m.output+c.output,f.globstar=!0,tt(p+z()),N({type:"slash",value:"/",output:""});continue}if(m.type==="bos"&&v[0]==="/"){c.type="globstar",c.value+=p,c.output=`(?:^|${Z}|${Q(l)}${Z})`,f.output=c.output,f.globstar=!0,tt(p+z()),N({type:"slash",value:"/",output:""});continue}if(I&&v[0]==="/"){c.type="globstar",c.value+=p,c.output=`(?:^|${Z}|${Q(l)}${Z})`,f.output+=c.output,f.globstar=!0,tt(p+z()),N({type:"slash",value:"/",output:""});continue}f.output=f.output.slice(0,-c.output.length),c.type="globstar",c.output=Q(l),c.value+=p,f.output+=c.output,f.globstar=!0,tt(p);continue}const G={type:"star",value:p,output:H};if(l.bash===!0){G.output=".*?",(c.type==="bos"||c.type==="slash")&&(G.output=J+G.output),N(G);continue}if(c&&(c.type==="bracket"||c.type==="paren")&&l.regex===!0){G.output=p,N(G);continue}(f.index===f.start||c.type==="slash"||c.type==="dot")&&(c.type==="dot"?(f.output+=gt,c.output+=gt):l.dot===!0?(f.output+=ot,c.output+=ot):(f.output+=J,c.output+=J),M()!=="*"&&(f.output+=st,c.output+=st)),N(G)}for(;f.brackets>0;){if(l.strictBrackets===!0)throw new SyntaxError(a("closing","]"));f.output=e.escapeLast(f.output,"["),ht("brackets")}for(;f.parens>0;){if(l.strictBrackets===!0)throw new SyntaxError(a("closing",")"));f.output=e.escapeLast(f.output,"("),ht("parens")}for(;f.braces>0;){if(l.strictBrackets===!0)throw new SyntaxError(a("closing","}"));f.output=e.escapeLast(f.output,"{"),ht("braces")}if(l.strictSlashes!==!0&&(c.type==="star"||c.type==="bracket")&&N({type:"maybe_slash",value:"",output:`${Z}?`}),f.backtrack===!0){f.output="";for(const v of f.tokens)f.output+=v.output!=null?v.output:v.value,v.suffix&&(f.output+=v.suffix)}return f};return O.fastpaths=(d,E)=>{const l={...E},A=typeof l.maxLength=="number"?Math.min(r,l.maxLength):r,w=d.length;if(w>A)throw new SyntaxError(`Input length: ${w}, exceeds maximum allowed length: ${A}`);d=i[d]||d;const{DOT_LITERAL:T,SLASH_LITERAL:S,ONE_CHAR:k,DOTS_SLASH:F,NO_DOT:D,NO_DOTS:U,NO_DOTS_SLASH:rt,STAR:Z,START_ANCHOR:st}=t.globChars(l.windows),j=l.dot?U:D,lt=l.dot?rt:D,gt=l.capture?"":"?:",ot={negated:!1,prefix:""};let P=l.bash===!0?".*?":Z;l.capture&&(P=`(${P})`);const nt=J=>J.noglobstar===!0?P:`(${gt}(?:(?!${st}${J.dot?F:T}).)*?)`,dt=J=>{switch(J){case"*":return`${j}${k}${P}`;case".*":return`${T}${k}${P}`;case"*.*":return`${j}${P}${T}${k}${P}`;case"*/*":return`${j}${P}${S}${k}${lt}${P}`;case"**":return j+nt(l);case"**/*":return`(?:${j}${nt(l)}${S})?${lt}${k}${P}`;case"**/*.*":return`(?:${j}${nt(l)}${S})?${lt}${P}${T}${k}${P}`;case"**/.*":return`(?:${j}${nt(l)}${S})?${T}${k}${P}`;default:{const C=/^(.*?)\.(\w+)$/.exec(J);if(!C)return;const H=dt(C[1]);return H?H+T+C[2]:void 0}}},Y=e.removePrefix(d,ot);let Q=dt(Y);return Q&&l.strictSlashes!==!0&&(Q+=`${S}?`),Q},ye=O,ye}var me,We;function Ws(){if(We)return me;We=1;const t=js(),e=zs(),r=fe(),o=pe(),n=i=>i&&typeof i=="object"&&!Array.isArray(i),s=(i,u,a=!1)=>{if(Array.isArray(i)){const R=i.map(O=>s(O,u,a));return O=>{for(const d of R){const E=d(O);if(E)return E}return!1}}const b=n(i)&&i.tokens&&i.input;if(i===""||typeof i!="string"&&!b)throw new TypeError("Expected pattern to be a non-empty string");const h=u||{},y=h.windows,x=b?s.compileRe(i,u):s.makeRe(i,u,!1,!0),g=x.state;delete x.state;let $=()=>!1;if(h.ignore){const R={...u,ignore:null,onMatch:null,onResult:null};$=s(h.ignore,R,a)}const _=(R,O=!1)=>{const{isMatch:d,match:E,output:l}=s.test(R,x,u,{glob:i,posix:y}),A={glob:i,state:g,regex:x,posix:y,input:R,output:l,match:E,isMatch:d};if(typeof h.onResult=="function"&&h.onResult(A),d===!1)return A.isMatch=!1,O?A:!1;t:if($(R)){if(typeof h.onIgnore=="function"&&h.onIgnore(A)===o.UNIGNORE){A.isMatch=!0;break t}return A.isMatch=!1,O?A:!1}return typeof h.onMatch=="function"&&h.onMatch(A),O?A:!0};return a&&(_.state=g),_};return s.test=(i,u,a,{glob:b,posix:h}={})=>{if(typeof i!="string")throw new TypeError("Expected input to be a string");if(i==="")return{isMatch:!1,output:""};const y=a||{},x=y.format||(h?r.toPosixSlashes:null);let g=i===b,$=g&&x?x(i):i;return g===!1&&($=x?x(i):i,g=$===b),(g===!1||y.capture===!0)&&(y.matchBase===!0||y.basename===!0?g=s.matchBase(i,u,a,h):g=u.exec($)),{isMatch:!!g,match:g,output:$}},s.matchBase=(i,u,a)=>(u instanceof RegExp?u:s.makeRe(u,a)).test(r.basename(i)),s.isMatch=(i,u,a)=>s(u,a)(i),s.parse=(i,u)=>Array.isArray(i)?i.map(a=>s.parse(a,u)):e(i,{...u,fastpaths:!1}),s.scan=(i,u)=>t(i,u),s.compileRe=(i,u,a=!1,b=!1)=>{if(a===!0)return i.output;const h=u||{},y=h.contains?"":"^",x=h.contains?"":"$";let g=`${y}(?:${i.output})${x}`;i&&i.negated===!0&&(g=`^(?!${g}).*$`);const $=s.toRegex(g,u);return b===!0&&($.state=i),$},s.makeRe=(i,u={},a=!1,b=!1)=>{if(!i||typeof i!="string")throw new TypeError("Expected a non-empty string");let h={negated:!1,fastpaths:!0};return u.fastpaths!==!1&&(i[0]==="."||i[0]==="*")&&(h.output=e.fastpaths(i,u)),h.output||(h=e(i,u)),s.compileRe(h,u,a,b)},s.toRegex=(i,u)=>{try{const a=u||{};return new RegExp(i,a.flags||(a.nocase?"i":""))}catch(a){if(u&&u.debug===!0)throw a;return/$^/}},s.constants=o,me=s,me}var be,qe;function qs(){if(qe)return be;qe=1;const t=Ws(),e=fe();function r(o,n,s=!1){return n&&(n.windows===null||n.windows===void 0)&&(n={...n,windows:e.isWindows()}),t(o,n,s)}return Object.assign(r,t),be=r,be}var Ks=qs();const yt=Ce(Ks),Xs=B(import.meta.url),Dt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,oe=t=>{if(typeof Dt<"u"&&Dt.versions&&Dt.versions.node){const[e,r]=Dt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Dt.getBuiltinModule(t)}return Xs(t)},Ke=oe("fs"),Qs={...Ke,default:Ke},{statSync:Zs,stat:Ys,realpathSync:Vs,realpath:Js,readdirSync:to,readdir:eo}=oe("fs"),{sep:gr,basename:ro,dirname:Re,resolve:dr,normalize:so,relative:oo,posix:mt,isAbsolute:no}=oe("path"),{fileURLToPath:io}=oe("url"),{createRequire:uo}=oe("module");var Xe=uo(import.meta.url);function lo(t){let e=so(t);return e.length>1&&e[e.length-1]===gr&&(e=e.substring(0,e.length-1)),e}const ao=/[\\/]/g;function yr(t,e){return t.replace(ao,e)}const co=/^[a-z]:[\\/]$/i;function po(t){return t==="/"||co.test(t)}function $e(t,e){const{resolvePaths:r,normalizePath:o,pathSeparator:n}=e,s=process.platform==="win32"&&t.includes("/")||t.startsWith(".");if(r&&(t=dr(t)),(o||s)&&(t=lo(t)),t===".")return"";const i=t[t.length-1]!==n;return yr(i?t+n:t,n)}function mr(t,e){return e+t}function fo(t,e){return function(r,o){return o.startsWith(t)?o.slice(t.length)+r:yr(oo(t,o),e.pathSeparator)+e.pathSeparator+r}}function ho(t){return t}function go(t,e,r){return e+t+r}function yo(t,e){const{relativePaths:r,includeBasePath:o}=e;return r&&t?fo(t,e):o?mr:ho}function mo(t){return function(e,r){r.push(e.substring(t.length)||".")}}function bo(t){return function(e,r,o){const n=e.substring(t.length)||".";o.every(s=>s(n,!0))&&r.push(n)}}const $o=(t,e)=>{e.push(t||".")},vo=(t,e,r)=>{const o=t||".";r.every(n=>n(o,!0))&&e.push(o)},Eo=()=>{};function xo(t,e){const{includeDirs:r,filters:o,relativePaths:n}=e;return r?n?o&&o.length?bo(t):mo(t):o&&o.length?vo:$o:Eo}const Ao=(t,e,r,o)=>{o.every(n=>n(t,!1))&&r.files++},So=(t,e,r,o)=>{o.every(n=>n(t,!1))&&e.push(t)},wo=(t,e,r,o)=>{r.files++},Ro=(t,e)=>{e.push(t)},To=()=>{};function _o(t){const{excludeFiles:e,filters:r,onlyCounts:o}=t;return e?To:r&&r.length?o?Ao:So:o?wo:Ro}const ko=t=>t,Co=()=>[""].slice(0,0);function Oo(t){return t.group?Co:ko}const No=(t,e,r)=>{t.push({directory:e,files:r,dir:e})},Lo=()=>{};function Ho(t){return t.group?No:Lo}const Bo=function(t,e,r){const{queue:o,fs:n,options:{suppressErrors:s}}=e;o.enqueue(),n.realpath(t,(i,u)=>{if(i)return o.dequeue(s?null:i,e);n.stat(u,(a,b)=>{if(a)return o.dequeue(s?null:a,e);if(b.isDirectory()&&br(t,u,e))return o.dequeue(null,e);r(b,u),o.dequeue(null,e)})})},Mo=function(t,e,r){const{queue:o,fs:n,options:{suppressErrors:s}}=e;o.enqueue();try{const i=n.realpathSync(t),u=n.statSync(i);if(u.isDirectory()&&br(t,i,e))return;r(u,i)}catch(i){if(!s)throw i}};function Do(t,e){return!t.resolveSymlinks||t.excludeSymlinks?null:e?Mo:Bo}function br(t,e,r){if(r.options.useRealPaths)return Io(e,r);let o=Re(t),n=1;for(;o!==r.root&&n<2;){const s=r.symlinks.get(o);s&&(s===e||s.startsWith(e)||e.startsWith(s))?n++:o=Re(o)}return r.symlinks.set(t,e),n>1}function Io(t,e){return e.visited.includes(t+e.options.pathSeparator)}const Po=t=>t.counts,Fo=t=>t.groups,Go=t=>t.paths,Uo=t=>t.paths.slice(0,t.options.maxFiles),jo=(t,e,r)=>(he(e,r,t.counts,t.options.suppressErrors),null),zo=(t,e,r)=>(he(e,r,t.paths,t.options.suppressErrors),null),Wo=(t,e,r)=>(he(e,r,t.paths.slice(0,t.options.maxFiles),t.options.suppressErrors),null),qo=(t,e,r)=>(he(e,r,t.groups,t.options.suppressErrors),null);function he(t,e,r,o){e(t&&!o?t:null,r)}function Ko(t,e){const{onlyCounts:r,group:o,maxFiles:n}=t;return r?e?Po:jo:o?e?Fo:qo:n?e?Uo:Wo:e?Go:zo}const $r={withFileTypes:!0},Xo=(t,e,r,o,n)=>{if(t.queue.enqueue(),o<0)return t.queue.dequeue(null,t);const{fs:s}=t;t.visited.push(e),t.counts.directories++,s.readdir(e||".",$r,(i,u=[])=>{n(u,r,o),t.queue.dequeue(t.options.suppressErrors?null:i,t)})},Qo=(t,e,r,o,n)=>{const{fs:s}=t;if(o<0)return;t.visited.push(e),t.counts.directories++;let i=[];try{i=s.readdirSync(e||".",$r)}catch(u){if(!t.options.suppressErrors)throw u}n(i,r,o)};function Zo(t){return t?Qo:Xo}var Yo=class{count=0;constructor(t){this.onQueueEmpty=t}enqueue(){return this.count++,this.count}dequeue(t,e){this.onQueueEmpty&&(--this.count<=0||t)&&(this.onQueueEmpty(t,e),t&&(e.controller.abort(),this.onQueueEmpty=void 0))}},Vo=class{_files=0;_directories=0;set files(t){this._files=t}get files(){return this._files}set directories(t){this._directories=t}get directories(){return this._directories}get dirs(){return this._directories}},Jo=class{aborted=!1;abort(){this.aborted=!0}},vr=class{root;isSynchronous;state;joinPath;pushDirectory;pushFile;getArray;groupFiles;resolveSymlink;walkDirectory;callbackInvoker;constructor(e,r,o){this.isSynchronous=!o,this.callbackInvoker=Ko(r,this.isSynchronous),this.root=$e(e,r),this.state={root:po(this.root)?this.root:this.root.slice(0,-1),paths:[""].slice(0,0),groups:[],counts:new Vo,options:r,queue:new Yo((n,s)=>this.callbackInvoker(s,n,o)),symlinks:new Map,visited:[""].slice(0,0),controller:new Jo,fs:r.fs||Qs},this.joinPath=yo(this.root,r),this.pushDirectory=xo(this.root,r),this.pushFile=_o(r),this.getArray=Oo(r),this.groupFiles=Ho(r),this.resolveSymlink=Do(r,this.isSynchronous),this.walkDirectory=Zo(this.isSynchronous)}start(){return this.pushDirectory(this.root,this.state.paths,this.state.options.filters),this.walkDirectory(this.state,this.root,this.root,this.state.options.maxDepth,this.walk),this.isSynchronous?this.callbackInvoker(this.state,null):null}walk=(e,r,o)=>{const{paths:n,options:{filters:s,resolveSymlinks:i,excludeSymlinks:u,exclude:a,maxFiles:b,signal:h,useRealPaths:y,pathSeparator:x},controller:g}=this.state;if(g.aborted||h&&h.aborted||b&&n.length>b)return;const $=this.getArray(this.state.paths);for(let _=0;_<e.length;++_){const R=e[_];if(R.isFile()||R.isSymbolicLink()&&!i&&!u){const O=this.joinPath(R.name,r);this.pushFile(O,$,this.state.counts,s)}else if(R.isDirectory()){let O=go(R.name,r,this.state.options.pathSeparator);if(a&&a(R.name,O))continue;this.pushDirectory(O,n,s),this.walkDirectory(this.state,O,O,o-1,this.walk)}else if(this.resolveSymlink&&R.isSymbolicLink()){let O=mr(R.name,r);this.resolveSymlink(O,this.state,(d,E)=>{if(d.isDirectory()){if(E=$e(E,this.state.options),a&&a(R.name,y?E:O+x))return;this.walkDirectory(this.state,E,y?E:O+x,o-1,this.walk)}else{E=y?E:O;const l=ro(E),A=$e(Re(E),this.state.options);E=this.joinPath(l,A),this.pushFile(E,$,this.state.counts,s)}})}}this.groupFiles(this.state.groups,r,$)}};function tn(t,e){return new Promise((r,o)=>{Er(t,e,(n,s)=>{if(n)return o(n);r(s)})})}function Er(t,e,r){new vr(t,e,r).start()}function en(t,e){return new vr(t,e).start()}var Qe=class{constructor(e,r){this.root=e,this.options=r}withPromise(){return tn(this.root,this.options)}withCallback(e){Er(this.root,this.options,e)}sync(){return en(this.root,this.options)}};let xr=null;try{Xe.resolve("picomatch"),xr=Xe("picomatch")}catch{}var rn=class{globCache={};options={maxDepth:1/0,suppressErrors:!0,pathSeparator:gr,filters:[]};globFunction;constructor(t){this.options={...this.options,...t},this.globFunction=this.options.globFunction}group(){return this.options.group=!0,this}withPathSeparator(t){return this.options.pathSeparator=t,this}withBasePath(){return this.options.includeBasePath=!0,this}withRelativePaths(){return this.options.relativePaths=!0,this}withDirs(){return this.options.includeDirs=!0,this}withMaxDepth(t){return this.options.maxDepth=t,this}withMaxFiles(t){return this.options.maxFiles=t,this}withFullPaths(){return this.options.resolvePaths=!0,this.options.includeBasePath=!0,this}withErrors(){return this.options.suppressErrors=!1,this}withSymlinks({resolvePaths:t=!0}={}){return this.options.resolveSymlinks=!0,this.options.useRealPaths=t,this.withFullPaths()}withAbortSignal(t){return this.options.signal=t,this}normalize(){return this.options.normalizePath=!0,this}filter(t){return this.options.filters.push(t),this}onlyDirs(){return this.options.excludeFiles=!0,this.options.includeDirs=!0,this}exclude(t){return this.options.exclude=t,this}onlyCounts(){return this.options.onlyCounts=!0,this}crawl(t){return new Qe(t||".",this.options)}withGlobFunction(t){return this.globFunction=t,this}crawlWithOptions(t,e){return this.options={...this.options,...e},new Qe(t||".",this.options)}glob(...t){return this.globFunction?this.globWithOptions(t):this.globWithOptions(t,{dot:!0})}globWithOptions(t,...e){const r=this.globFunction||xr;if(!r)throw new Error("Please specify a glob function to use glob matching.");var o=this.globCache[t.join("\0")];return o||(o=r(t,...e),this.globCache[t.join("\0")]=o),this.options.filters.push(n=>o(n)),this}};const sn=Array.isArray,Ar=/\\/g,on=/^[A-Za-z]:$/,Sr=process.platform==="win32",nn=/^(\/?\.\.)+$/;function Ze(t,e={}){const r=t.length,o=Array(r),n=Array(r);let s,i;for(s=0;s<r;s++){const u=wr(t[s]);o[s]=u;const a=u.length,b=Array(a);for(i=0;i<a;i++)b[i]=yt(u[i],e);n[s]=b}return u=>{const a=u.split("/");if(a[0]===".."&&nn.test(u))return!0;for(s=0;s<r;s++){const b=o[s],h=n[s],y=a.length,x=Math.min(y,b.length);for(i=0;i<x;){const g=b[i];if(g.includes("/"))return!0;if(!h[i](a[i]))break;if(!e.noglobstar&&g==="**")return!0;i++}if(i===y)return!0}return!1}}const un=/^[A-Z]:\/$/i,ln=Sr?t=>un.test(t):t=>t==="/";function Ye(t,e,r){if(t===e||e.startsWith(`${t}/`)){if(r){const n=t.length+ +!ln(t);return(s,i)=>s.slice(n,i?-1:void 0)||"."}const o=e.slice(t.length+1);return o?(n,s)=>{if(n===".")return o;const i=`${o}/${n}`;return s?i.slice(0,-1):i}:(n,s)=>s&&n!=="."?n.slice(0,-1):n}return r?o=>mt.relative(t,o)||".":o=>mt.relative(t,`${e}/${o}`)||"."}function an(t,e){if(e.startsWith(`${t}/`)){const r=e.slice(t.length+1);return o=>`${r}/${o}`}return r=>{const o=mt.relative(t,`${e}/${r}`);return r[r.length-1]==="/"&&o!==""?`${o}/`:o||"."}}function Ve(t){return t.replace(on,e=>`${e}/`)}const cn={parts:!0};function wr(t){var e;const r=yt.scan(t,cn);return!((e=r.parts)===null||e===void 0)&&e.length?r.parts:[t]}const pn=/(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g,fn=/(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g,hn=t=>t.replace(pn,"\\$&"),gn=t=>t.replace(fn,"\\$&"),dn=Sr?gn:hn;function yn(t,e){const r=yt.scan(t);return r.isGlob||r.negated}function se(...t){console.log(`[tinyglobby ${new Date().toLocaleTimeString("es")}]`,...t)}function Rr(t){return typeof t=="string"?[t]:t??[]}const mn=/^(\/?\.\.)+/,bn=/\\(?=[()[\]{}!*+?@|])/g;function ve(t,e,r,o){var n;const s=e.cwd;let i=t;t[t.length-1]==="/"&&(i=t.slice(0,-1));const u=i.lastIndexOf("/"),a=(u===-1?i:i.slice(u+1)).startsWith("!(");i[i.length-1]!=="*"&&!a&&e.expandDirectories&&(i+="/**");const b=dn(s);i=no(i.replace(bn,""))?mt.relative(b,i):mt.normalize(i);const h=(n=mn.exec(i))===null||n===void 0?void 0:n[0],y=wr(i);if(h){const g=(h.length+1)/3;let $=0;const _=b.split("/");for(;$<g&&y[$+g]===_[_.length+$-g];)i=i.slice(0,(g-$-1)*3)+i.slice((g-$)*3+y[$+g].length+1)||".",$++;const R=mt.join(s,h.slice($*3));R[0]!=="."&&r.root.length>R.length&&(r.root=Ve(R),r.depthOffset=-g+$)}if(!o&&r.depthOffset>=0){var x;(x=r.commonPath)!==null&&x!==void 0||(r.commonPath=y);const g=[],$=Math.min(r.commonPath.length,y.length);for(let _=0;_<$;_++){const R=y[_];if(R==="**"&&!y[_+1]){g.pop();break}if(_===y.length-1||R!==r.commonPath[_]||yn(R))break;g.push(R)}r.depthOffset=g.length,r.commonPath=g,r.root=Ve(g.length>0?mt.join(s,...g):s)}return i}function $n(t,e,r){const o=[],n=[],s=[];for(const i of t.ignore)i&&(i[0]!=="!"||i[1]==="("?n.push(ve(i,t,r,!0)):s.push(i.slice(1)));for(const i of e)i&&(i[0]!=="!"||i[1]==="("?o.push(ve(i,t,r,!1)):(i[1]!=="!"||i[2]==="(")&&n.push(ve(i.slice(1),t,r,!0)));return{match:o,ignore:n,unignore:s}}function vn(t,e){const r=t.cwd,o={root:r,depthOffset:0},n=$n(t,e,o);t.debug&&se("internal processing patterns:",n);const{absolute:s,caseSensitiveMatch:i,debug:u,dot:a,followSymbolicLinks:b,onlyDirectories:h}=t,y=o.root.replace(Ar,""),x={dot:a,nobrace:t.braceExpansion===!1,nocase:!i,noextglob:t.extglob===!1,noglobstar:t.globstar===!1,posix:!0},g=n.unignore.length>0,$=g?yt(n.unignore,x):void 0,_=g?Ze(n.unignore,x):void 0,R=yt(n.match,{...x,ignore:n.ignore,onIgnore:$?k=>$(k.output)&&yt.constants.UNIGNORE:void 0}),O=yt(n.ignore,x),d=Ze(n.match,x),E=Ye(r,y,s),l=s?E:Ye(r,y,!0),A=n.match.length>0&&n.match.every(k=>k==="**"||k==="**/*"),w=n.ignore.length>0||g||!A?(k,F)=>{const D=l(F,!0);return D==="."||_&&_(D)?!1:!d(D)||O(D)}:void 0;let T;t.deep!==void 0&&(T=Math.round(t.deep-o.depthOffset));const S=new rn({filters:[u?(k,F)=>{const D=E(k,F),U=R(D);return U&&se(`matched ${D}`),U}:(k,F)=>{const D=E(k,F);return R(D)}],exclude:u&&w?(k,F)=>{const D=w(k,F);return se(`${D?"skipped":"crawling"} ${F}`),D}:w,fs:t.fs,pathSeparator:"/",relativePaths:!s,resolvePaths:s,includeBasePath:s,resolveSymlinks:b,excludeSymlinks:!b,excludeFiles:h,includeDirs:h||!t.onlyFiles,maxDepth:T,signal:t.signal}).crawl(y);return t.debug&&se("internal properties:",{...o,root:y}),[S,r!==y&&!s&&an(r,y)]}function En(t,e){if(e)for(let r=t.length-1;r>=0;r--)t[r]=e(t[r]);return t}const Je={caseSensitiveMatch:!0,debug:!!process.env.TINYGLOBBY_DEBUG,expandDirectories:!0,followSymbolicLinks:!0,onlyFiles:!0};function xn(t){const e=Object.assign({},t);for(const r in Je)e[r]===void 0&&Object.assign(e,{[r]:Je[r]});return e.cwd=(e.cwd instanceof URL?io(e.cwd):dr(e.cwd||process.cwd())).replace(Ar,"/"),e.ignore=Rr(e.ignore),e.fs&&(e.fs={readdir:e.fs.readdir||eo,readdirSync:e.fs.readdirSync||to,realpath:e.fs.realpath||Js,realpathSync:e.fs.realpathSync||Vs,stat:e.fs.stat||Ys,statSync:e.fs.statSync||Zs}),e.debug&&se("globbing with options:",e),e}function An(t,e={}){var r;if(t&&e?.patterns)throw new Error("Cannot pass patterns as both an argument and an option");const o=sn(t)||typeof t=="string",n=Rr((r=o?t:t.patterns)!==null&&r!==void 0?r:"**/*"),s=xn(o?e:t);return n.length>0?vn(s,n):[]}async function cu(t,e){const[r,o]=An(t,e);return r?En(await r.withPromise(),o):[]}var Ee,tr;function Sn(){if(tr)return Ee;tr=1;/*!
|
|
2
|
-
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
5
|
-
* Licensed under the MIT License.
|
|
6
|
-
*/return Ee=function(t){if(typeof t!="string"||t==="")return!1;for(var e;e=/(\\).|([@?!+*]\(.*\))/g.exec(t);){if(e[2])return!0;t=t.slice(e.index+e[0].length)}return!1},Ee}var xe,er;function Tr(){if(er)return xe;er=1;/*!
|
|
7
|
-
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
8
|
-
*
|
|
9
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
10
|
-
* Released under the MIT License.
|
|
11
|
-
*/var t=Sn(),e={"{":"}","(":")","[":"]"},r=function(n){if(n[0]==="!")return!0;for(var s=0,i=-2,u=-2,a=-2,b=-2,h=-2;s<n.length;){if(n[s]==="*"||n[s+1]==="?"&&/[\].+)]/.test(n[s])||u!==-1&&n[s]==="["&&n[s+1]!=="]"&&(u<s&&(u=n.indexOf("]",s)),u>s&&(h===-1||h>u||(h=n.indexOf("\\",s),h===-1||h>u)))||a!==-1&&n[s]==="{"&&n[s+1]!=="}"&&(a=n.indexOf("}",s),a>s&&(h=n.indexOf("\\",s),h===-1||h>a))||b!==-1&&n[s]==="("&&n[s+1]==="?"&&/[:!=]/.test(n[s+2])&&n[s+3]!==")"&&(b=n.indexOf(")",s),b>s&&(h=n.indexOf("\\",s),h===-1||h>b))||i!==-1&&n[s]==="("&&n[s+1]!=="|"&&(i<s&&(i=n.indexOf("|",s)),i!==-1&&n[i+1]!==")"&&(b=n.indexOf(")",i),b>i&&(h=n.indexOf("\\",i),h===-1||h>b))))return!0;if(n[s]==="\\"){var y=n[s+1];s+=2;var x=e[y];if(x){var g=n.indexOf(x,s);g!==-1&&(s=g+1)}if(n[s]==="!")return!0}else s++}return!1},o=function(n){if(n[0]==="!")return!0;for(var s=0;s<n.length;){if(/[*?{}()[\]]/.test(n[s]))return!0;if(n[s]==="\\"){var i=n[s+1];s+=2;var u=e[i];if(u){var a=n.indexOf(u,s);a!==-1&&(s=a+1)}if(n[s]==="!")return!0}else s++}return!1};return xe=function(n,s){if(typeof n!="string"||n==="")return!1;if(t(n))return!0;var i=r;return s&&s.strict===!1&&(i=o),i(n)},xe}const wn=B(import.meta.url),It=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,_r=t=>{if(typeof It<"u"&&It.versions&&It.versions.node){const[e,r]=It.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return It.getBuiltinModule(t)}return wn(t)},Rn=_r("path"),Tn=_r("os");var Ae,rr;function _n(){if(rr)return Ae;rr=1;var t=Tr(),e=Rn.posix.dirname,r=Tn.platform()==="win32",o="/",n=/\\/g,s=/\\([!*?|[\](){}])/g;Ae=function(a,b){var h=Object.assign({flipBackslashes:!0},b);h.flipBackslashes&&r&&a.indexOf(o)<0&&(a=a.replace(n,o)),i(a)&&(a+=o),a+="a";do a=e(a);while(u(a));return a.replace(s,"$1")};function i(a){var b=a.slice(-1),h;switch(b){case"}":h="{";break;case"]":h="[";break;default:return!1}var y=a.indexOf(h);return y<0?!1:a.slice(y+1,-1).includes(o)}function u(a){return/\([^()]+$/.test(a)||a[0]==="{"||a[0]==="["||/[^\\][{[]/.test(a)?!0:t(a)}return Ae}var kn=_n();Ce(kn);const Cn=B(import.meta.url),Pt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,On=t=>{if(typeof Pt<"u"&&Pt.versions&&Pt.versions.node){const[e,r]=Pt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Pt.getBuiltinModule(t)}return Cn(t)},{access:Nn}=On("node:fs/promises");async function pu(t,e=_e){pt(t),t=ct(t);try{return await Nn(t,e),!0}catch{return!1}}const Ln=B(import.meta.url),Ft=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Hn=t=>{if(typeof Ft<"u"&&Ft.versions&&Ft.versions.node){const[e,r]=Ft.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Ft.getBuiltinModule(t)}return Ln(t)},{accessSync:Bn}=Hn("node:fs");function Te(t,e=_e){pt(t),t=ct(t);try{return Bn(t,e),!0}catch{return!1}}var Mn=Tr();Ce(Mn);const Dn=B(import.meta.url),Gt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,kr=t=>{if(typeof Gt<"u"&&Gt.versions&&Gt.versions.node){const[e,r]=Gt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Gt.getBuiltinModule(t)}return Dn(t)};kr("node:fs/promises");kr("node:fs");let In=class extends Error{constructor(e){super(`ENOENT: ${e}`)}get code(){return"ENOENT"}set code(e){throw new Error("Cannot overwrite code ENOENT")}get name(){return"NotFoundError"}set name(e){throw new Error("Cannot overwrite name of NotFoundError")}},Pn=class extends Error{constructor(e){super(`EPERM: Operation not permitted, ${e}`)}get code(){return"EPERM"}set code(e){throw new Error("Cannot overwrite code EPERM")}get name(){return"PermissionError"}set name(e){throw new Error("Cannot overwrite name of PermissionError")}};const Cr=(t,e)=>{const r=t?.code;return r==="ENOENT"?new In(`no such file or directory, open '${e}'`):r==="EACCES"||r==="EPERM"?new Pn(`unable to read the non-readable file: ${e}`):t},Fn=B(import.meta.url),Ut=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Or=t=>{if(typeof Ut<"u"&&Ut.versions&&Ut.versions.node){const[e,r]=Ut.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Ut.getBuiltinModule(t)}return Fn(t)},{readFile:Gn}=Or("node:fs/promises"),{unzip:Un,brotliDecompress:jn}=Or("node:zlib"),zn={brotli:jn,gzip:Un,none:(t,e)=>{e(null,t)}},gu=async(t,e)=>{pt(t),t=ct(t);const{buffer:r,compression:o,encoding:n,flag:s}=e??{};let i;try{i=await Gn(t,s?{flag:s}:{})}catch(u){throw Cr(u,t)}return await new Promise((u,a)=>{zn[o??"none"](i,(b,h)=>{b?a(b):u(r?h:h.toString(n??"utf8"))})})},Wn=B(import.meta.url),jt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Nr=t=>{if(typeof jt<"u"&&jt.versions&&jt.versions.node){const[e,r]=jt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return jt.getBuiltinModule(t)}return Wn(t)},{readFileSync:qn}=Nr("node:fs"),{unzipSync:Kn,brotliDecompressSync:Xn}=Nr("node:zlib"),Qn={brotli:Xn,gzip:Kn,none:t=>t},du=(t,e)=>{pt(t),t=ct(t);const{buffer:r,compression:o,encoding:n,flag:s}=e??{};let i;try{i=qn(t,s?{flag:s}:{})}catch(b){throw Cr(b,t)}const u=Qn[o??"none"],a=u(i);return r?a:a.toString(n??"utf8")},Zn=B(import.meta.url),zt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Yn=t=>{if(typeof zt<"u"&&zt.versions&&zt.versions.node){const[e,r]=zt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return zt.getBuiltinModule(t)}return Zn(t)},{createRequire:Lr}=Yn("node:module"),Vn=globalThis.process??Object.create(null),sr={versions:{}},or=new Proxy(Vn,{get(t,e){if(e in t)return t[e];if(e in sr)return sr[e]}}),Jn=t=>t.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
|
|
12
|
-
`),ti=(t,e,r,o)=>{const n={column:0,line:-1,...t.start},s={...n,...t.end},i=n.line,u=n.column,a=s.line,b=s.column;let h=Math.max(i-(r+1),0),y=Math.min(e.length,a+o);i===-1&&(h=0),a===-1&&(y=e.length);const x=a-i,g={};if(x)for(let $=0;$<=x;$++){const _=$+i;if(!u)g[_]=!0;else if($===0){const R=e[_-1]?.length;g[_]=[u,(R??0)-u+1]}else if($===x)g[_]=[0,b];else{const R=e[_-$]?.length;g[_]=[0,R]}}else u===b?g[i]=u?[u,0]:!0:g[i]=[u,(b??0)-(u??0)];return{end:y,markerLines:g,start:h}},ei=or.platform==="win32"&&!or.env?.WT_SESSION?">":"❯",yu=(t,e,r)=>{const o={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...r,color:{gutter:$=>$,marker:$=>$,message:$=>$,...r?.color}},n=typeof e.start.column=="number";let s=(t.includes("\r")?Jn(t):t).split(`
|
|
13
|
-
`);typeof o.tabWidth=="number"&&t.includes(" ")&&(s=s.map($=>$.replaceAll(" "," ".repeat(o.tabWidth))));const{end:i,markerLines:u,start:a}=ti(e,s,o.linesAbove,o.linesBelow),b=String(i).length,{gutter:h,marker:y,message:x}=o.color;let g=s.slice(a,i).map(($,_)=>{const R=a+1+_,O=u[R],d=String(R).padStart(b),E=!u[R+1],l=` ${d}${o.showGutter?" |":""}`;if(O){let A="";if(Array.isArray(O)){const w=$.replaceAll(/[^\t]/g," ").slice(0,Math.max(O[0]-1,0)),T=O[1]||1;A=[`
|
|
14
|
-
`,o.prefix+h(l.replaceAll(/\d/g," "))," ",w,y("^").repeat(T)].join(""),E&&o.message&&(A+=` ${x(o.message)}`)}return[o.prefix+y(ei),h(l),$.length>0?` ${$}`:"",A].join("")}return`${o.prefix} ${h(l)}${$.length>0?` ${$}`:""}`}).join(`
|
|
15
|
-
`);return o.message&&!n&&(g=`${o.prefix+" ".repeat(b+1)+o.message}
|
|
16
|
-
${g}`),g},nr=(t,e)=>{let r=0,o=e.length-2;for(;r<o;){const n=r+(o-r>>1);if(t<e[n])o=n-1;else if(t>=e[n+1])r=n+1;else{r=n;break}}return r},ri=/\n|\r(?!\n)/,si=t=>t.split(ri).reduce((e,r)=>(e.push(e.at(-1)+r.length+1),e),[0]),mu=(t,e,r)=>{if(!Array.isArray(t)&&typeof t!="string"||(typeof t=="string"||Array.isArray(t))&&t.length===0)return{column:0,line:0};if(typeof e!="number"||typeof t=="string"&&e>=t.length||Array.isArray(t)&&e+1>=t.at(-1))return{column:0,line:0};if(typeof t=="string"){const n=si(t),s=nr(e,n);return{column:e-n[s]+1,line:s+1}}const o=nr(e,t);return{column:e-t[o]+1,line:o+1}},oi=new Map([["Error",Error],["EvalError",EvalError],["RangeError",RangeError],["ReferenceError",ReferenceError],["SyntaxError",SyntaxError],["TypeError",TypeError],["URIError",URIError]]);typeof AggregateError<"u"&&oi.set("AggregateError",AggregateError);const ni=Lr(import.meta.url),Wt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ii=t=>{if(typeof Wt<"u"&&Wt.versions&&Wt.versions.node){const[e,r]=Wt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Wt.getBuiltinModule(t)}return ni(t)};ii("node:util");const ui=Lr(import.meta.url),qt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Oe=t=>{if(typeof qt<"u"&&qt.versions&&qt.versions.node){const[e,r]=qt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return qt.getBuiltinModule(t)}return ui(t)};Oe("node:fs");Oe("node:path");Oe("node:url");const li=t=>{const e={force:!0,recursive:!0};return t?.maxRetries!==void 0&&(e.maxRetries=t.maxRetries),t?.retryDelay!==void 0&&(e.retryDelay=t.retryDelay),e},ai=B(import.meta.url),Kt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Hr=t=>{if(typeof Kt<"u"&&Kt.versions&&Kt.versions.node){const[e,r]=Kt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Kt.getBuiltinModule(t)}return ai(t)};Hr("node:fs");Hr("node:fs/promises");const ci=B(import.meta.url),Xt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,pi=t=>{if(typeof Xt<"u"&&Xt.versions&&Xt.versions.node){const[e,r]=Xt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Xt.getBuiltinModule(t)}return ci(t)};pi("node:fs");const fi=B(import.meta.url),Qt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,hi=t=>{if(typeof Qt<"u"&&Qt.versions&&Qt.versions.node){const[e,r]=Qt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Qt.getBuiltinModule(t)}return fi(t)};hi("node:fs/promises");const gi=B(import.meta.url),Zt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,di=t=>{if(typeof Zt<"u"&&Zt.versions&&Zt.versions.node){const[e,r]=Zt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Zt.getBuiltinModule(t)}return gi(t)},{rmSync:yi}=di("node:fs"),bu=(t,e={})=>{pt(t),yi(t,li(e))};B(import.meta.url);const mi=t=>{if(typeof t!="string"&&!(t instanceof ArrayBuffer)&&!ArrayBuffer.isView(t))throw new TypeError("File contents must be a string, ArrayBuffer, or ArrayBuffer view.")},bi=B(import.meta.url),Yt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,$i=t=>{if(typeof Yt<"u"&&Yt.versions&&Yt.versions.node){const[e,r]=Yt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Yt.getBuiltinModule(t)}return bi(t)},{randomBytes:vi}=$i("node:crypto"),Ei=t=>`${t}.${process.pid.toString(36)}.${vi(6).toString("hex")}.tmp`,xi=new TextEncoder,Ai=t=>{if(t instanceof Uint8Array)return t;if(typeof t=="string")return xi.encode(t);if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t)){const e=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);return new Uint8Array(e)}throw new TypeError("Invalid contents type. Expected string or ArrayBuffer.")},Si=B(import.meta.url),Vt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,wi=t=>{if(typeof Vt<"u"&&Vt.versions&&Vt.versions.node){const[e,r]=Vt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Vt.getBuiltinModule(t)}return Si(t)};wi("node:fs/promises");const Ri=B(import.meta.url),Jt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ti=t=>{if(typeof Jt<"u"&&Jt.versions&&Jt.versions.node){const[e,r]=Jt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Jt.getBuiltinModule(t)}return Ri(t)},{mkdirSync:_i,writeFileSync:ki,statSync:Ci,renameSync:ir,chownSync:Oi,chmodSync:Ni,unlinkSync:Li}=Ti("node:fs"),Hi=(t,e,r)=>{r={backup:!1,encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...r},pt(t),mi(e),t=ct(t);const o=Te(t,_e);if(o&&!r.overwrite)throw new ns(`file already exists, open '${t}'`);const n=Ei(t);try{!o&&r.recursive&&_i(ke(t),{recursive:!0});let s;if(ki(n,typeof e=="string"?Buffer.from(e,r.encoding??"utf8"):Ai(e),{flag:"wx"}),o&&r.backup&&(s=Ci(t),r.chown??={gid:s.gid,uid:s.uid},ir(t,`${t}.bak`)),r.chown)try{Oi(n,r.chown.uid,r.chown.gid)}catch{}Ni(n,s&&!r.mode?s.mode:r.mode??438),ir(n,t)}catch(s){throw new Error(`Failed to write file at: ${t} - ${s.message}`,{cause:s})}finally{Te(n)&&Li(n)}},Bi=/^(?:( )+|\t+)/,ne="space";function ur(t,e,r){return t&&e===ne&&r===1}function lr(t,e){const r=new Map;let o=0,n,s;for(const i of t.split(/\n/g)){if(!i)continue;const u=i.match(Bi);if(u===null)o=0,n="";else{const a=u[0].length,b=u[1]?ne:"tab";if(ur(e,b,a))continue;b!==n&&(o=0),n=b;let h=1,y=0;const x=a-o;if(o=a,x===0)h=0,y=1;else{const $=Math.abs(x);if(ur(e,b,$))continue;s=Mi(b,$)}const g=r.get(s);r.set(s,g===void 0?[1,0]:[g[0]+h,g[1]+y])}}return r}function Mi(t,e){return(t===ne?"s":"t")+String(e)}function Di(t){const e=t[0]==="s"?ne:"tab",r=Number(t.slice(1));return{type:e,amount:r}}function Ii(t){let e,r=0,o=0;for(const[n,[s,i]]of t)(s>r||s===r&&i>o)&&(r=s,o=i,e=n);return e}function Pi(t,e){return(t===ne?" ":" ").repeat(e)}function Fi(t){if(typeof t!="string")throw new TypeError("Expected a string");let e=lr(t,!0);e.size===0&&(e=lr(t,!1));const r=Ii(e);let o,n=0,s="";return r!==void 0&&({type:o,amount:n}=Di(r),s=Pi(o,n)),{amount:n,type:o,indent:s}}const Gi=B(import.meta.url),te=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ui=t=>{if(typeof te<"u"&&te.versions&&te.versions.node){const[e,r]=te.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return te.getBuiltinModule(t)}return Gi(t)};Ui("node:fs/promises");const ji=B(import.meta.url),ee=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,zi=t=>{if(typeof ee<"u"&&ee.versions&&ee.versions.node){const[e,r]=ee.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return ee.getBuiltinModule(t)}return ji(t)},{readFileSync:Wi}=zi("node:fs"),$u=(t,e,r={})=>{const{detectIndent:o,indent:n,replacer:s,stringify:i=JSON.stringify,...u}={indent:" ",...r};let a=n,b=`
|
|
17
|
-
`;if(Te(t,Fr))try{const y=Wi(t,"utf8");if(o){const{indent:x}=Fi(y);a=x}b=y.endsWith(`
|
|
18
|
-
`)?`
|
|
19
|
-
`:""}catch(y){if(y.code!=="ENOENT")throw y}const h=i(e,s,a);Hi(t,`${h}${b}`,u)},qi=B(import.meta.url),re=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ne=t=>{if(typeof re<"u"&&re.versions&&re.versions.node){const[e,r]=re.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return re.getBuiltinModule(t)}return qi(t)},Ki=Ne("fs"),Xi=Ne("os"),Qi=Ne("path");var Se={},ar;function Zi(){if(ar)return Se;ar=1;var t=Object.defineProperty,e=(h,y)=>t(h,"name",{value:y,configurable:!0}),r=Ki,o=Xi,n=Qi;const s=e(h=>{let y="";for(let x=0;x<h.length;x+=1){const g=h[x],$=g.toUpperCase();y+=g===$?g.toLowerCase():$}return y},"invertCase"),i=new Map,u=e((h,y)=>{const x=n.join(h,`.is-fs-case-sensitive-test-${process.pid}`);try{return y.writeFileSync(x,""),!y.existsSync(s(x))}finally{try{y.unlinkSync(x)}catch{}}},"checkDirectoryCaseWithWrite"),a=e((h,y,x)=>{try{return u(h,x)}catch(g){if(y===void 0)return u(o.tmpdir(),x);throw g}},"checkDirectoryCaseWithFallback"),b=e((h,y=r,x=!0)=>{const g=h??process.cwd();if(x&&i.has(g))return i.get(g);let $;const _=s(g);return _!==g&&y.existsSync(g)?$=!y.existsSync(_):$=a(g,h,y),x&&i.set(g,$),$},"isFsCaseSensitive");return Se.isFsCaseSensitive=b,Se}var Yi=Zi();const vu=Yi.isFsCaseSensitive;export{bt as A,$t as B,uu as F,ke as H,Ms as I,fr as J,ct as L,$u as O,Hi as T,yu as U,cu as W,ou as a,pu as b,gu as c,su as d,Ji as e,Te as f,In as g,Yr as j,vu as k,bu as l,Qr as m,tu as o,du as v,eu as y,mu as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as L}from"node:module";import{f as R,m as $,H as S,j as x,v as N}from"./index-OQZQyN5R.js";import{s as y}from"./index-Cg0IHaFI.js";import{resolveDlx as J,whichBin as z,detectPackageManager as H,execPmCommandInteractive as F,resolveAdd as V,resolveRemove as Y,resolveInstall as G,resolveDedupe as K,resolveWhy as Q,resolveLink as X,resolveUnlink as Z,resolveExec as ee,resolvePmCommand as ne}from"#native";const T=L(import.meta.url),b=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,U=e=>{if(typeof b<"u"&&b.versions&&b.versions.node){const[n,s]=b.versions.node.split(".").map(Number);if(n>22||n===22&&s>=3||n===20&&s>=16)return b.getBuiltinModule(e)}return T(e)},{spawn:q,spawnSync:B}=U("node:child_process"),h=(e,n,s,r)=>{for(const a of n)e.push("--filter",a);s&&e.push("--recursive"),r&&e.push("--workspace-root")},se=e=>{const n=[],s=[];return h(n,e.filter,e.recursive,e.workspaceRoot),e.silent&&n.push("--silent"),e.frozenLockfile&&n.push("--frozen-lockfile"),n.push("install"),e.dev&&n.push("--dev"),e.prod&&n.push("--prod"),e.force&&n.push("--force"),e.ignoreScripts&&n.push("--ignore-scripts"),e.lockfileOnly&&n.push("--lockfile-only"),e.noOptional&&n.push("--no-optional"),e.offline&&n.push("--offline"),{args:n,bin:"aube",warnings:s}},re=e=>{const n=[],s=[];return h(n,e.filter,!1,!1),n.push("add"),e.saveDev&&n.push("--save-dev"),e.exact&&n.push("--save-exact"),e.global&&n.push("--global"),e.optional&&n.push("--save-optional"),e.peer&&n.push("--save-peer"),e.workspace&&s.push("aube has no flag for the `workspace:` protocol; it auto-detects local workspace members during add. Ignoring --workspace."),e.workspaceRoot&&n.push("--workspace"),n.push(...e.packages),{args:n,bin:"aube",warnings:s}},ae=e=>{const n=[];return h(n,e.filter,e.recursive,!1),n.push("remove"),e.saveDev&&n.push("--save-dev"),e.global&&n.push("--global"),e.workspaceRoot&&n.push("--workspace"),n.push(...e.packages),{args:n,bin:"aube",warnings:[]}},oe=e=>{const n=["dedupe"];return e&&n.push("--check"),{args:n,bin:"aube",warnings:[]}},ie=e=>{const n=[],s=[];h(n,e.filter,e.recursive,!1),n.push("why"),e.dev&&n.push("--dev"),e.prod&&n.push("--prod"),e.json&&n.push("--json"),e.long&&n.push("--long"),e.parseable&&n.push("--parseable"),e.depth!==void 0&&s.push("aube why does not accept --depth; ignoring."),e.noOptional&&s.push("aube why does not accept --no-optional; ignoring."),e.global&&s.push("aube why does not accept --global; ignoring.");const[r,...a]=e.packages;return r===void 0?s.push("aube why requires a package name; none provided."):(a.length>0&&s.push("aube why takes a single package; using the first."),n.push(r)),{args:n,bin:"aube",warnings:s}},te=e=>{const n=[];e.silent&&n.push("--silent"),n.push("dlx");for(const s of e.additionalPackages)n.push("--package",s);return e.shellMode&&n.push("--shell-mode"),n.push(e.package),n.push(...e.args),{args:n,bin:"aube",warnings:[]}},pe=e=>{const n=[];return h(n,e.filter,e.recursive,e.workspaceRoot),n.push("exec"),e.parallel&&n.push("--parallel"),e.reverse&&n.push("--reverse"),e.shellMode&&n.push("--shell-mode"),n.push(e.command),n.push(...e.args),{args:n,bin:"aube",warnings:[]}},ue=e=>{const n=["link"];return e!==null&&n.push(e),{args:n,bin:"aube",warnings:[]}},ce=(e,n)=>{const s=[],r=[];return n&&s.push("--recursive"),s.push("unlink"),e.length>1&&r.push("aube unlink takes a single package; using the first."),e.length>0&&s.push(e[0]),{args:s,bin:"aube",warnings:r}},le=e=>{const n=["view","--",e.package],s=[],[r,...a]=e.fields;return r!==void 0?(a.length>0&&s.push("aube view only supports a single field; using the first."),e.json&&s.push("aube view does not support --json with a field selector; printing the field without --json."),n.push(r)):e.json&&n.push("--json"),{args:n,bin:"aube",warnings:s}},Le=e=>{const n=[],s=[];return h(n,e.filters,e.recursive,e.workspaceRoot),n.push("update"),e.dev&&n.push("--dev"),e.prod&&n.push("--prod"),e.global&&n.push("--global"),e.interactive&&n.push("--interactive"),e.latest&&n.push("--latest"),e.noOptional&&n.push("--no-optional"),e.noSave&&n.push("--no-save"),n.push(...e.packages),{args:n,bin:"aube",warnings:s}},ge=new Set(["fund","ping","search","token"]),de=(e,n)=>ge.has(e)?{args:[e,...n],bin:"npm",warnings:[`'${e}' is not natively supported by aube. Delegating to npm.`]}:{args:[e,...n],bin:"aube",warnings:[]},k=256*1024,he=e=>{const n=e?{...process.env,...e}:{...process.env};return process.stderr.isTTY&&n.FORCE_COLOR===void 0&&n.NO_COLOR===void 0&&(n.FORCE_COLOR="1"),n},_=e=>e!==""&&!/[\s"&()<>^|%!]/u.test(e)?e:`"${e.replaceAll(/(\\*)"/gu,String.raw`$1$1\"`).replace(/(\\+)$/u,"$1$1").replaceAll(/[&()<>^|%!]/gu,String.raw`^$&`)}"`,fe=async(e,n,s)=>new Promise((r,a)=>{const o=process.platform==="win32",i=q(o?_(e):e,o?n.map(t=>_(t)):[...n],{cwd:s.cwd,env:he(s.env),shell:o,stdio:["inherit","pipe","pipe"],windowsHide:!0});let u=[],l=0;const g=t=>{if(u.push(t),l+=t.length,!(l<=k)){for(;u.length>1&&l-u[0].length>k;)l-=u.shift().length;if(u.length===1&&l>k){const d=u[0];u[0]=d.subarray(d.length-k),l=k}}},m=()=>Buffer.concat(u).toString("utf8");i.stdout?.on("data",t=>{process.stdout.write(t),g(t)}),i.stderr?.on("data",t=>{process.stderr.write(t),g(t)}),i.on("error",a),i.on("close",t=>{const d=m();u=[],r({code:t??1,output:d})})}),w=e=>{const n=y.coerce(e);return n?y.gte(n,"11.0.0"):!1},c=e=>e.name==="yarn"&&!e.version.startsWith("1."),j=e=>e.name==="yarn"&&e.version.startsWith("1."),me=e=>e[0]==="rm"?["remove",...e.slice(1)]:e,be=(e,n,s)=>{switch(n){case"audit":return c(e)?{args:["npm","audit",...s],bin:"yarn",kind:"rewrite"}:{kind:"passthrough"};case"config":{if(c(e)){const[r,...a]=s;return r==="delete"?{args:["config","unset",...a],bin:"yarn",kind:"rewrite",warning:"yarn berry uses `config unset`, not `config delete`."}:{kind:"passthrough"}}return e.name==="bun"?{kind:"skip",warning:"bun has no `config` CLI. Edit bunfig.toml or .npmrc directly."}:e.name==="deno"?{kind:"skip",warning:"deno has no registry-config CLI. Edit deno.json directly."}:{kind:"passthrough"}}case"dist-tag":return j(e)?{args:["tag",...s],bin:"yarn",kind:"rewrite",warning:"yarn 1 has no `dist-tag`; using `yarn tag`."}:c(e)?{args:["npm","tag",...me(s)],bin:"yarn",kind:"rewrite"}:e.name==="bun"||e.name==="deno"?{kind:"skip",warning:`${e.name} has no \`dist-tag\`. Use \`npm dist-tag\` instead.`}:{kind:"passthrough"};case"login":case"logout":return c(e)?{args:["npm",n,...s],bin:"yarn",kind:"rewrite"}:e.name==="bun"?{args:[n,...s],bin:"npm",kind:"rewrite",warning:`bun has no \`${n}\`; falling back to \`npm ${n}\` (writes ~/.npmrc, which bun reads).`}:e.name==="deno"?{kind:"skip",warning:`deno has no \`${n}\`. JSR uses browser OAuth via \`deno publish\`.`}:{kind:"passthrough"};case"owner":return e.name==="pnpm"&&w(e.version)?{args:["owner",...s],bin:"npm",kind:"rewrite",warning:"pnpm 11 removed `owner`; falling back to `npm owner`."}:c(e)?{args:["owner",...s],bin:"npm",kind:"rewrite",warning:"yarn berry has no `owner` (not in `yarn npm`); falling back to `npm owner`."}:e.name==="bun"?{args:["owner",...s],bin:"npm",kind:"rewrite",warning:"bun has no `owner`; falling back to `npm owner`."}:e.name==="deno"?{kind:"skip",warning:"deno has no `owner`. JSR uses scope-member roles via the web UI."}:{kind:"passthrough"};case"ping":return e.name==="pnpm"&&w(e.version)?{args:["ping",...s],bin:"npm",kind:"rewrite",warning:"pnpm 11 removed `ping`; falling back to `npm ping`."}:{kind:"passthrough"};case"plugin":return c(e)?{kind:"passthrough"}:{kind:"skip",warning:`${e.name} does not support yarn-style plugins. Skipping (no-op).`};case"prune":return j(e)?{kind:"skip",warning:"yarn 1 has no `prune`. Use `yarn install --production` for a prod-only tree."}:c(e)?{kind:"skip",warning:"yarn berry has no `prune`. Use `yarn workspaces focus --production` instead."}:e.name==="bun"||e.name==="deno"?{kind:"skip",warning:`${e.name} has no \`prune\`. Pruning happens automatically on install.`}:{kind:"passthrough"};case"publish":return c(e)?{args:["npm","publish",...s],bin:"yarn",kind:"rewrite"}:{kind:"passthrough"};case"rebuild":return j(e)?{kind:"skip",warning:"yarn 1 has no `rebuild`. Re-install instead."}:e.name==="bun"?{kind:"skip",warning:"bun has no `rebuild`. Use `bun install --force` instead."}:e.name==="deno"?{kind:"skip",warning:"deno has no `rebuild`."}:{kind:"passthrough"};case"search":return e.name==="pnpm"&&w(e.version)?{args:["search",...s],bin:"npm",kind:"rewrite",warning:"pnpm 11 removed `search`; falling back to `npm search`."}:{kind:"passthrough"};case"token":return e.name==="pnpm"&&w(e.version)?{args:["token",...s],bin:"npm",kind:"rewrite",warning:"pnpm 11 removed `token`; falling back to `npm token`."}:{kind:"passthrough"};case"whoami":return e.name==="pnpm"&&w(e.version)?{args:["whoami",...s],bin:"npm",kind:"rewrite",warning:"pnpm 11 removed `whoami`; falling back to `npm whoami`."}:c(e)?{args:["npm","whoami",...s],bin:"yarn",kind:"rewrite"}:e.name==="bun"?{args:["pm","whoami",...s],bin:"bun",kind:"rewrite"}:e.name==="deno"?{kind:"skip",warning:"deno has no `whoami`. JSR uses browser auth."}:{kind:"passthrough"};default:return{kind:"passthrough"}}},O=e=>z(e)!==null,ke=e=>{const n=[["pnpm-lock.yaml","pnpm"],["yarn.lock","yarn"],["package-lock.json","npm"],["npm-shrinkwrap.json","npm"],["bun.lock","bun"],["bun.lockb","bun"],["deno.lock","deno"]];let s=e;for(;;){for(const[a,o]of n)if(R($(s,a)))return o;const r=S(s);if(r===s||x(s).root===s)return;s=r}},Te=(e,n)=>{if(n.name!=="aube")return;const s=ke(e);if(s!==void 0)return`Resolved installer is aube but the workspace has a ${s} lockfile. Aube reads and writes ${s}'s lockfile format in place, but its byte output may differ subtly — expect a one-time churn diff on the first install, and ongoing drift if your team mixes tools on the same lockfile. To pin the choice across the team, set \`install.backend\` in vis.config; to bypass aube for this run, pass --no-aube.`},C=e=>{if(R(e))try{return JSON.parse(N(e,{buffer:!1}))}catch{return}},we=e=>{let n=e;for(;;){const s=$(n,"package.json"),r=C(s);if(r&&typeof r.packageManager=="string"&&r.packageManager.length>0)return r.packageManager;const a=S(n);if(a===n||x(n).root===n)return;n=a}},E=new Set(["npm","pnpm","yarn"]),W=(e,n,s)=>s===!1||!E.has(n)||!O("corepack")?!1:s===!0?!0:we(e)!==void 0,Ue=(e,n)=>{const s=n.backend,r=process.env.VIS_INSTALLER,a=s??r??n.configBackend,o=n.configCorepack??"auto";if(a&&a!=="auto"){if(a==="aube"&&!O("aube"))throw new Error('install.backend is set to "aube" but the `aube` binary is not on PATH. Install it via `npm i -g @endevco/aube`, `mise use -g aube`, or `brew install endevco/tap/aube`.');return{name:a,useCorepack:W(e,a,o),version:"latest"}}if(O("aube"))return{name:"aube",useCorepack:!1,version:"latest"};const i=ve(e);return{...i,useCorepack:W(e,i.name,o)}},ve=e=>{if(!R(e))throw new Error(`Could not detect package manager in ${e}. Directory does not exist.`);const n=H(e);return{name:n.name,version:n.version||"latest"}},M=(e,n)=>n.useCorepack!==!0||!E.has(n.name)||e.bin==="corepack"||e.bin!==n.name?e:{...e,args:[n.name,...e.args],bin:"corepack"},ye=(e,n,s)=>{if(s===void 0)return F(e.bin,e.args,n);const r=B(e.bin,e.args,{cwd:n,env:{...process.env,...s},stdio:"inherit"});if(r.error)throw r.error;return r.status??1},p=(e,n,s,r,a={})=>{const o=M(n,e);for(const i of o.warnings)r.warn(`warning: ${i}`);return a.dry?(r.log(`[dry-run] ${o.bin} ${o.args.join(" ")}`),0):ye(o,s,a.env)},f=(e,n,s,r,a={})=>p(e,n(),s,r,a),$e=(e,n)=>n==="aube"||n==="deno"?e:{...e,args:[...e.args,"--prefer-offline"]},je=(e,n,s)=>n!=="yarn"||s.startsWith("1.")||!e.args.includes("--immutable")||e.args.includes("--immutable-cache")?e:{...e,args:[...e.args,"--immutable-cache"]},P=(e,n,s)=>{let r=e.name==="aube"?se(n):G(e.name,e.version,{...n,silent:n.silent||s.silent===!0});return s.preferOffline&&(r=$e(r,e.name)),s.ciMode&&(r=je(r,e.name,e.version)),r},qe=(e,n,s,r,a={})=>{const o=P(e,n,a);return D(e,o,s,r,{dry:a.dry,env:a.env})},Be=async(e,n,s,r,a={})=>{const o=M(P(e,n,a),e);for(const i of o.warnings)r.warn(`warning: ${i}`);return a.dry?(r.log(`[dry-run] ${o.bin} ${o.args.join(" ")}`),{code:0,output:""}):fe(o.bin,o.args,{cwd:s,env:a.env?{...process.env,...a.env}:process.env})},I=(e,n)=>{const s=n==="deno"?"--quiet":"--silent";return{...e,args:[...e.args,s]}},Oe=(e,n)=>n==="yarn"||n==="aube"?null:{...e,args:[...e.args,"--dry-run"]},D=(e,n,s,r,a)=>{if(a.dry!==!0)return p(e,n,s,r,a);const o=Oe(n,e.name);return o===null?p(e,n,s,r,a):p(e,o,s,r,{env:a.env})},Re=(e,n)=>n==="aube"?{...e,args:[...e.args,"--ignore-scripts"]}:n==="deno"?e:{...e,args:[...e.args,"--ignore-scripts"]},Se=(e,n,s,r,a={})=>{let o=e.name==="aube"?re(n):V(e.name,e.version,n);a.ignoreScripts&&(o=Re(o,e.name)),a.silent&&(o=I(o,e.name));const i=D(e,o,s,r,{dry:a.dry,env:a.env});return i===0&&a.autoInstallPeers&&_e(e,n,s,r,a),i},xe=e=>{if(e.startsWith("@")){const s=e.indexOf("/");if(s===-1)return e;const r=e.indexOf("@",s);return r===-1?e:e.slice(0,r)}const n=e.indexOf("@");return n===-1?e:e.slice(0,n)},Ce=(e,n)=>{let s=e;for(;;){const r=$(s,"node_modules",n,"package.json"),a=C(r);if(a)return a;const o=S(s);if(o===s||x(s).root===s)return;s=o}},De=e=>{const n=C($(e,"package.json")),s=new Set;if(!n)return s;for(const r of["dependencies","devDependencies","peerDependencies","optionalDependencies"]){const a=n[r];if(a)for(const o of Object.keys(a))s.add(o)}return s},_e=(e,n,s,r,a)=>{if(e.name==="deno")return;const o=De(s),i=new Map;for(const g of n.packages){const m=xe(g),t=Ce(s,m);if(!t?.peerDependencies)continue;const d=t.peerDependenciesMeta??{};for(const[v,A]of Object.entries(t.peerDependencies))d[v]?.optional||o.has(v)||i.has(v)||i.set(v,A)}if(i.size===0)return;const u=[...i.entries()].map(([g,m])=>`${g}@${m}`);r.log(`auto-installing peer dependencies: ${u.join(", ")}`);const l={exact:!1,filter:n.filter,global:!1,optional:!1,packages:u,peer:!1,saveDev:n.saveDev,workspace:!1,workspaceRoot:n.workspaceRoot};Se(e,l,s,r,{ignoreScripts:a.ignoreScripts})},Ne=(e,n,s,r,a={})=>{let o=e.name==="aube"?ae(n):Y(e.name,e.version,n);return a.silent&&(o=I(o,e.name)),D(e,o,s,r,{dry:a.dry,env:a.env})},Je=(e,n,s,r,a={})=>e.name==="aube"?p(e,oe(n),s,r,a):f(e,()=>K(e.name,e.version,n),s,r,a),ze=(e,n,s,r,a={})=>e.name==="aube"?p(e,ie(n),s,r,a):f(e,()=>Q(e.name,e.version,n),s,r,a),We=(e,n)=>{if(e.name==="aube")return le(n);const s=[],r=[],a=e.name;switch(e.name){case"bun":{const o=y.coerce(e.version);o&&y.lt(o,"1.3.0")&&r.push(`bun ${e.version} does not support \`bun pm view\` (added in bun 1.3). Upgrade bun, or run \`npm view ${n.package}\` instead.`),s.push("pm","view","--",n.package,...n.fields),n.json&&s.push("--json");break}case"deno":{const o=n.package.startsWith("npm:")||n.package.startsWith("jsr:")||n.package.startsWith("https://")||n.package.startsWith("http://")||n.package.startsWith("file:")?n.package:`npm:${n.package}`;s.push("info","--",o),n.json&&s.push("--json"),n.fields.length>0&&r.push("deno info does not accept field selectors; ignoring.");break}case"npm":case"pnpm":{s.push("view","--",n.package,...n.fields),n.json&&s.push("--json");break}case"yarn":{if(e.version.startsWith("1.")){s.push("info","--",n.package);const[o,...i]=n.fields;o!==void 0&&(i.length>0&&r.push("yarn v1 only supports querying one field at a time; using the first."),s.push(o)),n.json&&s.push("--json")}else s.push("npm","info","--",n.package),n.fields.length>0&&r.push("yarn berry does not support field arguments to 'npm info'; ignoring."),n.json&&s.push("--json");break}default:{const o=e.name;throw new Error(`Unsupported package manager: ${o}`)}}return{args:s,bin:a,warnings:r}},He=(e,n,s,r,a={})=>p(e,We(e,n),s,r,a),Fe=(e,n,s,r,a={})=>e.name==="aube"?p(e,ue(n),s,r,a):f(e,()=>X(e.name,e.version,n),s,r,a),Ve=(e,n,s,r,a,o={})=>e.name==="aube"?p(e,ce(n,s),r,a,o):f(e,()=>Z(e.name,e.version,n,s),r,a,o),Ee=(e,n,s)=>{if(e.args.includes("--offline")||e.args.includes("--cached-only"))return e;const r=(a,o)=>{const i=[...e.args];return i.splice(o,0,a),{...e,args:i}};switch(n){case"aube":case"pnpm":return r("--offline",1);case"bun":return{...e,warnings:[...e.warnings,"bun x does not support --offline. Pre-install the package via `vis install` so bun x resolves from the local cache."]};case"deno":return r("--cached-only",1);case"npm":return r("--offline",1);case"yarn":return s.startsWith("1.")?r("--offline",0):{...e,warnings:[...e.warnings,"yarn berry has no --offline flag for dlx. Configure `enableNetwork: false` in .yarnrc.yml or set `enableMirror: true` for offline-first behavior."]};default:{const a=n;return{...e,warnings:[...e.warnings,`applyDlxOffline: unsupported pm ${String(a)}`]}}}},Ye=(e,n,s,r,a={})=>{let o=e.name==="aube"?te(n):J(e.name,e.version,n);return a.offline&&(o=Ee(o,e.name,e.version)),p(e,o,s,r,{dry:a.dry,env:a.env})},Ge=(e,n,s,r,a={})=>e.name==="aube"?p(e,pe(n),s,r,a):f(e,()=>ee(e.name,e.version,n),s,r,a),Ke=(e,n,s,r,a,o={})=>{if(e.name==="aube")return p(e,de(n,s),r,a,o);const i=be(e,n,s);return i.kind==="skip"?(a.warn(`warning: ${i.warning}`),0):i.kind==="rewrite"?p(e,{args:i.args,bin:i.bin,warnings:i.warning?[i.warning]:[]},r,a,o):f(e,()=>ne(e.name,e.version,n,s),r,a,o)};export{Ye as $,Ke as B,Ne as D,ze as E,Ue as I,Se as M,He as P,qe as R,Ve as S,Ge as W,Be as h,Fe as j,Te as p,fe as s,Le as v,ve as w,Je as x};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{z as a,U as m,v as u,L as l}from"./index-OQZQyN5R.js";class d extends Error{fileName;codeFrame;name="JSONError";#e;constructor(r){super(),this.#e=r}get message(){return`${this.#e}${this.fileName?` in ${this.fileName}`:""}${this.codeFrame?`
|
|
2
|
-
|
|
3
|
-
${this.codeFrame}
|
|
4
|
-
`:""}`}set message(r){this.#e=r}}const f=e=>String.raw`\u{${e.codePointAt(0).toString(16)}}`,h=(e,r,i)=>m(e,{start:r},{tabWidth:!1,...i}),g=/in JSON at position (\d+)(?: \(line (\d+) column (\d+)\))?$/,p=(e,r)=>{const i=g.exec(r);if(!i)return;const[,s,t,n]=i;if(t&&n)return{column:Number(n),line:Number(t)};let o=Number(s);return o===e.length&&(o=e.length-1),a(e,o)},N=/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,$=e=>e.replace(N,(r,i,s)=>`"${s}"(${f(s)})`);function b(e,r,i,s){let t;try{return JSON.parse(e,r)}catch(c){t=c.message}let n;e?(n=p(e,t),t=$(t)):t+=" while parsing empty string";const o=new d(t);throw o.fileName=i,n&&(o.codeFrame=h(e,n,s)),o}function x(e,r,i){const s=u(e,{buffer:!0,encoding:void 0});let t=new TextDecoder().decode(s);const{beforeParse:n,color:o}={};return typeof n=="function"&&(t=n(t)),b(t,r,l(e),{color:o})}export{b as N,x as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f,m as s,H as b,j as g}from"./index-OQZQyN5R.js";const j={id:"bun",label:"Bun",lockfiles:["bun.lock","bun.lockb"],scriptSource:"package.json"},v={id:"node",label:"Node.js",lockfiles:["pnpm-lock.yaml","yarn.lock","package-lock.json","npm-shrinkwrap.json"],scriptSource:"package.json"},a={bun:j,node:v},l=["node","bun"],c={"deno.lock":"deno"},$=l.flatMap(o=>a[o].lockfiles.map(e=>[e,o])),p="Deno is not supported yet (deferred — see rfc/design-runtime-multitool.md).",d=(o,e)=>{if(o==="node"||o==="bun")return o;throw o in c||o==="deno"?new Error(`${e} requested runtime "${o}", but ${p}`):new Error(`${e} requested unknown runtime "${o}". Supported: ${l.join(", ")}.`)},S=o=>{let e=o;for(;;){for(const[r,n]of $)if(f(s(e,r)))return{runtime:n};for(const r of Object.keys(c))if(f(s(e,r)))return{deferred:c[r]};const t=b(e);if(t===e||g(e).root===e)return{};e=t}},y=(o,e={})=>{const t=e.env??process.env,r=(u,m,k)=>({adapter:a[u],deferredNotice:k,runtime:u,source:m});if(e.flag!==void 0&&e.flag!=="")return r(d(e.flag,"--runtime"),"flag");const n=t.VIS_RUNTIME;if(n!==void 0&&n!=="")return r(d(n,"VIS_RUNTIME"),"env");if(e.config!==void 0)return r(d(e.config,"config runtime:"),"config");const i=S(o);return i.runtime!==void 0?r(i.runtime,"lockfile"):i.deferred!==void 0?r("node","default",`Detected a ${i.deferred} project but ${p} Falling back to node.`):r("node","default")};export{y as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as h}from"node:module";import{m as i,H as p}from"./index-OQZQyN5R.js";import{p as N}from"./augment-8fIWWGSc.js";const w=h(import.meta.url),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,f=s=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[e,r]=c.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return c.getBuiltinModule(s)}return w(s)},{spawnSync:d}=f("node:child_process"),{existsSync:a}=f("node:fs"),S=s=>{let e=s;for(;;){const r=i(e,".pnp.cjs");if(a(r)){const t=i(e,".pnp.loader.mjs");return{esmLoader:a(t)?t:void 0,pnpCjs:r}}const o=p(e);if(o===e)return;e=o}},j=s=>{const e=S(s);if(e===void 0)return[];const r=["--require",e.pnpCjs];return e.esmLoader!==void 0&&r.push("--import",e.esmLoader),r},x=[{flag:"--enable-source-maps",key:"sourcemaps",min:[22,0]},{flag:"--experimental-sqlite",key:"sqlite",min:[22,5]},{flag:"--experimental-webstorage",key:"webstorage",min:[22,4]},{flag:"--experimental-eventsource",key:"eventsource",min:[22,3]}],E=[22,4],O=s=>{const[e,r]=s.split(".").map(o=>Number.parseInt(o,10));return[e??0,r??0]},u=(s,e)=>s[0]>e[0]||s[0]===e[0]&&s[1]>=e[1],T=s=>{const e=s.trim().toLowerCase();return e===""||e==="all"||e==="1"||e==="true"},m=(s,e)=>T(s)||s.split(",").some(r=>r.trim().toLowerCase()===e),g=(s,e,r)=>{const o=O(e),t=[];for(const n of x)m(s,n.key)&&u(o,n.min)&&t.push(n.flag);return m(s,"localstorage")&&u(o,E)&&(t.includes("--experimental-webstorage")||t.push("--experimental-webstorage"),t.push(`--localstorage-file=${r}`)),t},v="VIS_X_REEXEC",_=s=>{let e=s;for(;;){if(a(i(e,"package.json"))||a(i(e,".pnp.cjs")))return i(e,".vis","localstorage");const r=p(e);if(r===e)return i(s,".vis","localstorage");e=r}},C=s=>{const e=process.env.VIS_UNFLAG;return[...e===void 0?[]:g(e,process.versions.node,_(s)),...j(s)]},I=(s,e,r)=>{const o=d("bun",["run",s,...e],{cwd:r,stdio:"inherit"});if(o.error)throw o.error.code==="ENOENT"?new Error("Runtime is set to bun but the `bun` binary is not on PATH. Install it from https://bun.sh."):o.error;return o.status??(o.signal===null?0:1)},P=(s,e,r,o)=>{const t=d(process.execPath,[...s,process.argv[1],"x",e,...r],{cwd:o,env:{...process.env,[v]:"1"},stdio:"inherit"});return t.status??(t.signal===null?0:1)},L=async(s,e,r)=>{if(process.env[v]===void 0){const n=C(r);if(n.length>0)return P(n,s,e,r)}if(process.env.VIS_AUGMENT_SUBPROCESS!==void 0){const n=i(p(process.argv[1]),"runtime","preload.js"),l=process.env.VIS_UNFLAG,b=l===void 0?[]:g(l,process.versions.node,_(r)),y=[process.env.NODE_OPTIONS??"",...b,`--import ${JSON.stringify(n)}`].filter(Boolean);process.env.NODE_OPTIONS=y.join(" ").trim()}const{importTs:o}=await import("../packem_chunks/ts-loader.js");await N(r);const t=process.argv;process.argv=[process.execPath,s,...e];try{await o(s)}finally{process.argv=t}return typeof process.exitCode=="number"?process.exitCode:0},R=async(s,e,r,o)=>r==="bun"?I(s,e,o):L(s,e,o);export{R as r};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createRequire as _}from"node:module";import{E as h,s as y,I as $,V as T}from"./index.server-J83sowC4.js";import{m as r,n as l,i as a,$ as k,c as j}from"../packem_chunks/catalog.js";import"./env-XJzocuUP.js";import"./window-ops-DDePlWLV.js";import{I as S}from"./index-B0EsgdzO.js";import{S as m}from"../packem_chunks/cli-main.js";import{o as v}from"./spinner-DuJJvFTl.js";import{D as x,W as C,T as R,C as I}from"./symbols-DPTlrJ3B.js";const B=_(import.meta.url),D=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process;const b=({rows:i})=>r.jsx(l,{flexDirection:"column",children:i.map(t=>{let s;switch(t.status){case"error":{s=r.jsx(a,{color:"red",children:I});break}case"ok":{s=r.jsx(a,{color:"green",children:R});break}case"running":{s=r.jsx(a,{color:"white",children:r.jsx(v,{type:"dots"})});break}case"warn":{s=r.jsx(a,{color:"yellow",children:C});break}default:{s=r.jsx(a,{dimColor:!0,children:x});break}}return r.jsxs(l,{children:[r.jsx(l,{width:3,children:s}),r.jsx(l,{flexGrow:1,children:r.jsx(a,{children:t.label})}),t.summary?r.jsx(l,{children:r.jsxs(a,{dimColor:!0,children:[x," ",t.summary]})}):null]},t.id)})}),E={error:T(m.failure),ok:$(m.success),pending:h(m.dash),skip:h(m.dash),warn:y(m.warning)},M=(i,t,s)=>{const p=s?`${i} ${h(`— ${s}`)}`:i;return` ${E[t]} ${p}
|
|
2
|
-
`},K=(i,t={})=>{const s=t.stream??process.stderr,p=typeof s.isTTY=="boolean"&&s.isTTY&&!S,w=t.live??p,o=new Map;for(const e of i)o.set(e.id,{id:e.id,label:e.label,status:"pending"});if(!w||i.length===0)return{finish:(e,n,d)=>{const c=o.get(e);c&&(o.set(e,{...c,status:n,summary:d}),s.write(M(c.label,n,d)))},start:e=>{const n=o.get(e);n&&o.set(e,{...n,status:"running"})},stop:()=>{}};const g=()=>i.map(e=>o.get(e.id));let u=k(j.createElement(b,{rows:g()}),{interactive:!0,patchConsole:!1});const f=()=>{u?.rerender(j.createElement(b,{rows:g()}))};return{finish:(e,n,d)=>{const c=o.get(e);c&&(o.set(e,{...c,status:n,summary:d}),f())},start:e=>{const n=o.get(e);n&&(o.set(e,{...n,status:"running"}),f())},stop:()=>{u&&(f(),u.unmount(),u=void 0)}}};export{K as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as d}from"node:module";import{A as l,m as f,f as w,v as _}from"./index-OQZQyN5R.js";const p=d(import.meta.url),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,m=e=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[s,r]=c.versions.node.split(".").map(Number);if(s>22||s===22&&r>=3||s===20&&r>=16)return c.getBuiltinModule(e)}return p(e)},{platform:v}=m("node:os"),g={server:{cache:!1,interactive:!1,persistent:!0,runInCI:!1},utility:{cache:!1,runInCI:!1}},j=e=>{const s=e.preset??e.options?.preset;if(!s)return e;const r=g[s];if(!r)return e;const{cache:n,...o}=r;return{...e,cache:e.cache??n,options:{...o,...e.options}}},y=()=>{const e=v();return e==="darwin"?"macos":e==="win32"?"windows":"linux"},x=(e,s)=>{if(!s||s.size===0)return!0;const r=e?.runnerTags;return!r||r.length===0?!0:r.some(n=>s.has(n))},S=(e,s,r=!0)=>{const n=e?.runInCI??!0;return n===!0||n==="always"?!0:n===!1?!s:n==="affected"?!s||r:!0},W=(e,s,r)=>r||!s?e:l(s)?s:f(e,s),R=(e,s)=>{if(s===!1)return{};const r=s===!0?T("production"):Array.isArray(s)?s:[s],n={};for(const o of r)Object.assign(n,I(e,o));return n},T=e=>{const s=[".env"];return e&&s.push(`.env.${e}`),e!=="test"&&s.push(".env.local"),e&&e!=="test"&&s.push(`.env.${e}.local`),s},I=(e,s)=>{const r=l(s)?s:f(e,s);if(!w(r))return{};let n;try{n=_(r)}catch{return{}}const o={};for(const h of n.split(/\r?\n/)){const i=h.trim();if(i===""||i.startsWith("#"))continue;const u=i.indexOf("=");if(u===-1)continue;const a=i.slice(0,u).trim();if(a==="")continue;let t=i.slice(u+1).trim();(t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'"))&&(t=t.slice(1,-1)),o[a]=t}return o},q=(e,s=y())=>{if(e)return s==="windows"&&e.windowsShell?e.windowsShell:(s==="linux"||s==="macos")&&e.unixShell?e.unixShell:e.shell},A=e=>{if(e==="run")return!1;if(e==="build"||e==="test")return!0};export{q as a,A as b,j as c,y as d,R as l,x as m,W as r,S as s};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{createRequire as N}from"node:module";import{m,f as u,o as I,v as y}from"./index-OQZQyN5R.js";import{a as W}from"./readJsonSync-CvkZyKmL-CY7PZob_.js";const C=N(import.meta.url),k=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,w=o=>{if(typeof k<"u"&&k.versions&&k.versions.node){const[e,n]=k.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return k.getBuiltinModule(o)}return C(o)},{execFileSync:M}=w("node:child_process"),{randomBytes:F}=w("node:crypto"),{writeFileSync:D,renameSync:B,unlinkSync:U}=w("node:fs"),{delimiter:q}=w("node:path"),J=["proto","mise","fnm","volta","asdf","nvm","corepack"],R={asdf:["bun","deno","go","node","npm","pnpm","python","ruby","rust","yarn"],corepack:["npm","pnpm","yarn"],fnm:["node"],mise:["aube","bun","deno","go","node","npm","pnpm","python","ruby","rust","yarn"],nvm:["node"],proto:["bun","deno","go","node","npm","pnpm","python","ruby","rust","yarn"],volta:["node","npm","pnpm","yarn"]},H=["proto","mise","fnm","volta","asdf","nvm","corepack"],_={asdf:[".tool-versions"],corepack:[],fnm:[".nvmrc",".node-version"],mise:[".mise.toml",".config/mise.toml","mise.toml"],nvm:[".nvmrc"],proto:[".prototools"],volta:[]},$=new Map,h=o=>{const e=$.get(o);if(e!==void 0||$.has(o))return e;const n=process.env.PATH;if(!n){$.set(o,void 0);return}const t=process.platform==="win32"?["",...(process.env.PATHEXT??".COM;.EXE;.BAT;.CMD").split(";")]:[""];for(const r of n.split(q)){const i=r.replaceAll(/^["']|["']$/g,"").trim();if(i!=="")for(const l of t){const s=`${i}${I}${o}${l}`;if(u(s))return $.set(o,s),s}}$.set(o,void 0)},S=(o,e=["--version"])=>{try{const n=M(o,e,{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:2e3}),t=/\d+\.\d+(?:\.\d+)?/.exec(n);return t?t[0]:n.trim()||void 0}catch{return}},P=(o,e)=>{const n=m(o,"package.json");if(!u(n))return[];try{const t=W(n)[e];if(e==="volta"&&typeof t=="object"&&t!==null&&Object.keys(t).length>0)return["package.json"];if(e==="packageManager"&&typeof t=="string"&&t.length>0)return["package.json"]}catch{}return[]},z=(o,e)=>o==="volta"?P(e,"volta"):o==="corepack"?P(e,"packageManager"):_[o].filter(n=>u(m(e,n))),j=new Map,Z=()=>{j.clear(),$.clear()},A=(o,e)=>{{const i=j.get(o);if(i)return i}const n=[],t=!!h("pnpm")||!!h("yarn");for(const i of H){const l=i==="nvm"?void 0:h(i),s=i==="nvm"&&!!process.env.NVM_DIR,c=z(i,o),a=!!l||s;i==="corepack"&&!a&&(!(c.length>0)||t)||!a&&c.length===0||n.push({binPath:l,configFiles:c,installed:a,name:i,version:l?S(l):void 0})}const r=Object.freeze(n);return j.set(o,r),r},ve=(o,e,n)=>{const t=A(o);return e?.preferredManager&&e.preferredManager!=="none"?t.find(r=>r.name===e.preferredManager)??{configFiles:[],installed:!1,name:e.preferredManager}:t.find(r=>r.installed&&r.configFiles.length>0)??t.find(r=>r.installed)??t.find(r=>r.configFiles.length>0)??{configFiles:[],installed:!1,name:"none"}},X=(o,e)=>{for(const n of e){const t=m(o,n);if(u(t))try{const r=y(t).trim();if(r!=="")return{name:n,value:r.replace(/^v/,"")}}catch{}}},G=/^([a-z][\w-]*)\s*=\s*"?([^"\n#]+?)"?\s*(?:#.*)?$/i,L=o=>{const e=m(o,".prototools");if(!u(e))return[];const n=y(e),t=[];let r=!1;for(const i of n.split(/\r?\n/)){const l=i.trim();if(l===""||l.startsWith("#"))continue;if(l.startsWith("[")){r=!0;continue}if(r)continue;const s=G.exec(l);if(!s)continue;const[,c,a]=s,p=g(c);p&&t.push({source:".prototools",tool:p,version:a.trim()})}return t},V=/^\[tools\]\s*$/i,K=/^([a-z][\w-]*)\s*=\s*"?([^"\n#]+?)"?\s*(?:#.*)?$/i,Y=o=>{for(const e of _.mise){const n=m(o,e);if(!u(n))continue;const t=[],r=y(n);let i=!1;for(const l of r.split(/\r?\n/)){const s=l.trim();if(s===""||s.startsWith("#"))continue;if(s.startsWith("[")){i=V.test(s);continue}if(!i)continue;const c=K.exec(s);if(!c)continue;const[,a,p]=c,v=g(a);v&&t.push({source:".mise.toml",tool:v,version:p.trim()})}if(t.length>0)return t}return[]},Q=o=>{const e=m(o,".tool-versions");if(!u(e))return[];const n=y(e),t=[];for(const r of n.split(/\r?\n/)){const i=r.trim();if(i===""||i.startsWith("#"))continue;const l=i.split(/\s+/);if(l.length<2)continue;const[s,...c]=l,a=g(s);a&&c[0]&&t.push({source:".tool-versions",tool:a,version:c[0]})}return t},g=o=>{switch(o.toLowerCase()){case"aube":return"aube";case"bun":return"bun";case"deno":return"deno";case"go":case"golang":return"go";case"node":case"nodejs":return"node";case"npm":return"npm";case"pnpm":return"pnpm";case"python":case"python3":return"python";case"ruby":return"ruby";case"rust":case"rustc":return"rust";case"yarn":return"yarn";default:return}},ee=o=>{const[e]=o.split("+",1),n=/^(pnpm|yarn|npm|bun)@(.+)$/.exec(e??"");if(!n)return;const t=g(n[1]);if(t)return{source:"packageManager",tool:t,version:n[2]}},oe=(o,e)=>{const n=new Map,t=s=>{n.set(s.tool,s)},r=m(o,"package.json");let i={};try{u(r)&&(i=W(r))}catch{}if(i.engines)for(const[s,c]of Object.entries(i.engines)){const a=g(s);a&&typeof c=="string"&&t({source:"engines",tool:a,version:c})}if(i.packageManager){const s=ee(i.packageManager);s&&t(s)}if(i.volta)for(const[s,c]of Object.entries(i.volta)){const a=g(s);a&&typeof c=="string"&&t({source:"volta",tool:a,version:c})}const l=X(o,[".nvmrc",".node-version"]);l&&t({source:l.name===".nvmrc"?".nvmrc":".node-version",tool:"node",version:l.value});for(const s of Q(o))t(s);for(const s of Y(o))t(s);for(const s of L(o))t(s);if(e?.tools)for(const[s,c]of Object.entries(e.tools)){const a=g(s);a&&typeof c=="string"&&t({source:"vis.config.ts",tool:a,version:c})}return[...n.values()]},T={aube:{args:["--version"],binaries:["aube"]},bun:{args:["--version"],binaries:["bun"]},deno:{args:["--version"],binaries:["deno"]},go:{args:["version"],binaries:["go"]},node:{args:["--version"],binaries:["node"]},npm:{args:["--version"],binaries:["npm"]},pnpm:{args:["--version"],binaries:["pnpm"]},python:{args:["--version"],binaries:["python","python3"]},ruby:{args:["--version"],binaries:["ruby"]},rust:{args:["--version"],binaries:["rustc"]},yarn:{args:["--version"],binaries:["yarn"]}},ne=o=>{const e=T[o];for(const n of e.binaries){const t=h(n);if(t)return S(t,e.args)}if(o==="node")return process.versions.node},te=(o,e)=>{const n=e.trim();if(n===""||n==="*"||n==="latest")return!0;if(/^\d[\d.]*$/.test(n))return o===n||o.startsWith(`${n}.`);const t=s=>s.split(/[.\-+]/).map(c=>Number.parseInt(c,10)||0),r=(s,c)=>{const a=t(s),p=t(c),v=Math.max(a.length,p.length);for(let f=0;f<v;f++){const b=a[f]??0,d=p[f]??0;if(b!==d)return b-d}return 0},i=s=>{for(const c of s)if(c.startsWith(">=")){if(r(o,c.slice(2).trim())<0)return!1}else if(c.startsWith("<=")){if(r(o,c.slice(2).trim())>0)return!1}else if(c.startsWith(">")){if(r(o,c.slice(1).trim())<=0)return!1}else if(c.startsWith("<")){if(r(o,c.slice(1).trim())>=0)return!1}else if(c.startsWith("^")||c.startsWith("~")){const a=c.slice(1).trim(),[p,v]=t(a),[f,b]=t(o);if(f!==p||c.startsWith("~")&&b!==v||r(o,a)<0)return!1}return!0},l=n.split("||").map(s=>s.trim().split(/\s+/).filter(Boolean)).filter(s=>s.length>0);return l.length===0?!0:l.some(s=>i(s))},re=(o,e)=>{switch(o){case".mise.toml":return["mise"];case".node-version":case".nvmrc":return["fnm","nvm","volta","proto","mise","asdf"];case".prototools":return["proto"];case".tool-versions":return["asdf","mise"];case"packageManager":return e==="pnpm"||e==="yarn"?["self-activate","volta","proto","mise","corepack"]:e==="npm"?["volta","proto","mise","asdf","corepack"]:e==="aube"?["mise"]:e==="bun"?["proto","mise","asdf"]:["volta","proto","mise"];case"volta":return["volta"];default:return["proto","mise","fnm","volta","asdf","nvm","corepack"]}},se=(o,e,n)=>{if(n?.preferredManager&&n.preferredManager!=="none"&&x(n.preferredManager,o.tool)){const r=e.find(i=>i.name===n.preferredManager);return r?{installed:r.installed,name:r.name}:{installed:!1,name:n.preferredManager,note:`${n.preferredManager} is the preferred manager but isn't on PATH`}}const t=re(o.source,o.tool);for(const r of t){if(r==="self-activate"){if((o.tool==="pnpm"||o.tool==="yarn")&&h(o.tool))return{installed:!0,name:"self-activate",note:`${o.tool} will activate ${o.version} from the packageManager field on next invocation`};continue}if(x(r,o.tool)&&e.find(i=>i.name===r)?.installed)return{installed:!0,name:r}}for(const r of t)if(!(r==="self-activate"||!x(r,o.tool)))return{installed:!1,name:r,note:`${r} can install ${o.tool} — run \`vis toolchain install\` after adding it to PATH`};return{installed:!1,name:"none",note:"No manager knows how to install this tool"}},x=(o,e)=>o==="none"?!1:o==="self-activate"?e==="pnpm"||e==="yarn":R[o].includes(e),ie=(o,e)=>{const n=A(o),t=oe(o,e).map(r=>{const i=ne(r.tool),l=i!==void 0&&te(i,r.version),s=se(r,n,e);return{actual:i,expected:r,manager:s,matches:l}});return{detected:n,tools:t}},ae=(o,e)=>{switch(o){case"asdf":return e?{args:["install",e.tool,e.version],bin:"asdf"}:void 0;case"corepack":return e?{args:["prepare",`${e.tool}@${e.version}`,"--activate"],bin:"corepack"}:{args:["prepare","--activate"],bin:"corepack",hint:"reads the packageManager field in package.json"};case"fnm":return e?.tool!=="node"?void 0:{args:["install",e.version],bin:"fnm"};case"mise":return e?{args:["install",`${e.tool}@${e.version}`],bin:"mise"}:void 0;case"none":return;case"nvm":return{args:[],bin:"nvm",hint:"nvm is a shell function — run `nvm install` / `nvm use` from your shell"};case"proto":return e?{args:["install",e.tool,e.version],bin:"proto"}:void 0;case"self-activate":return{args:[],bin:e?.tool??"pnpm",hint:`${e?.tool??"pnpm"} will self-activate on next invocation — no install needed`};case"volta":return e?{args:["install",`${e.tool}@${e.version}`],bin:"volta"}:{args:["install","node@lts"],bin:"volta",hint:"volta pins per-tool; specify <tool>@<version>"};default:{const n=o;throw new Error(`Unknown manager: ${n}`)}}},de=(o,e)=>{switch(o){case"asdf":return{args:["local",e.tool,e.version],bin:"asdf",configChange:{file:".tool-versions",hint:`Pins ${e.tool} ${e.version}`}};case"corepack":return e.tool!=="npm"&&e.tool!=="pnpm"&&e.tool!=="yarn"?void 0:{args:["use",`${e.tool}@${e.version}`],bin:"corepack",configChange:{file:"package.json",hint:`Writes packageManager: "${e.tool}@${e.version}"`}};case"fnm":return e.tool==="node"?{args:["use",e.version],bin:"fnm"}:void 0;case"mise":return{args:["use","--",`${e.tool}@${e.version}`],bin:"mise",configChange:{file:".mise.toml",hint:`Pins ${e.tool} ${e.version}`}};case"none":return;case"nvm":return e.tool==="node"?{args:[],bin:"nvm",configChange:{file:".nvmrc",hint:"Write version to .nvmrc manually (nvm doesn't persist)."}}:void 0;case"proto":return{args:["pin",e.tool,e.version],bin:"proto",configChange:{file:".prototools",hint:`Pins ${e.tool} ${e.version}`}};case"self-activate":return{args:[],bin:e.tool,configChange:{file:"package.json",hint:`Set packageManager: "${e.tool}@${e.version}" — ${e.tool} will self-activate on next invocation`}};case"volta":return{args:["pin",`${e.tool}@${e.version}`],bin:"volta",configChange:{file:"package.json",hint:`Writes volta.${e.tool}`}};default:{const n=o;throw new Error(`Unknown manager: ${n}`)}}},ge=o=>{for(const e of T[o].binaries){const n=h(e);if(n)return n}},he=(o,e)=>{const n=T[e].binaries;if(o.installed&&o.binPath&&(o.name==="proto"||o.name==="mise"||o.name==="asdf"||o.name==="volta"||o.name==="fnm"))for(const t of n)try{const r=M(o.binPath,["which",t],{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:2e3}).trim();if(r)return r}catch{}for(const t of n){const r=h(t);if(r)return r}},O=(o,e)=>{const n=`${o}.${process.pid}.${F(6).toString("hex")}.tmp`;D(n,e);try{B(n,o)}catch(t){try{U(n)}catch{}throw t}},ce=(o,e)=>{if("packageManager"in o)return o.packageManager=e,o;const n={};let t=!1;for(const[r,i]of Object.entries(o))!t&&(r==="dependencies"||r==="devDependencies"||r==="peerDependencies"||r==="optionalDependencies")&&(n.packageManager=e,t=!0),n[r]=i;return t||(n.packageManager=e),n},be=(o,e)=>{if(e.tool!=="pnpm"&&e.tool!=="yarn"&&e.tool!=="npm"&&e.tool!=="bun")return;const n=m(o,"package.json");if(!u(n))throw new Error(`Cannot pin ${e.tool}: ${n} does not exist.`);const t=y(n),r=/\n([ \t]+)/.exec(t)?.[1]??" ";let i;try{i=JSON.parse(t)}catch(a){throw new Error(`${n} is not valid JSON — fix it before running \`vis toolchain use\`. Underlying error: ${a.message}`,{cause:a})}const l=`${e.tool}@${e.version}`,s=ce(i,l),c=t.endsWith(`
|
|
2
|
-
`)?`
|
|
3
|
-
`:"";return O(n,`${JSON.stringify(s,void 0,r)}${c}`),l},$e=(o,e)=>{const n=m(o,"package.json");if(!u(n))return;const t=y(n);let r;try{r=JSON.parse(t)}catch(s){throw new Error(`${n} is not valid JSON — fix it before running \`vis toolchain use\`. Underlying error: ${s.message}`,{cause:s})}if(r.engines?.[e.tool]===void 0||r.engines[e.tool]===e.version)return;r.engines[e.tool]=e.version;const i=/\n([ \t]+)/.exec(t)?.[1]??" ",l=t.endsWith(`
|
|
4
|
-
`)?`
|
|
5
|
-
`:"";return O(n,`${JSON.stringify(r,void 0,i)}${l}`),e.version},ye=o=>{const e=/^([a-z][\w-]*)@(.+)$/i.exec(o.trim());if(!e)return;const n=g(e[1]);if(n)return{source:"vis.config.ts",tool:n,version:e[2]}},le=async(o,e,n)=>{const t=ie(o,e),r=t.tools.filter(a=>!a.matches);if(r.length===0)return{attempted:[],failed:[],upToDate:!0};const i=t.detected.some(a=>a.installed);if(!(e?.autoInstall??i))return{attempted:[],failed:[],upToDate:!1};const l=[],s=[],c=new Map;for(const a of r){const p=c.get(a.manager.name);p?p.push(a):c.set(a.manager.name,[a])}for(const[a,p]of c){if(a==="self-activate"){for(const{expected:f}of p)n.info(`toolchain: ${f.tool} ${f.version} will self-activate on next ${f.tool} invocation`),l.push(f);continue}if(a==="none"){for(const{expected:f}of p)s.push({error:`no manager can install ${f.tool} — install one of ${J.join(", ")}`,spec:f});continue}if(!t.detected.find(f=>f.name===a)?.installed){for(const{expected:f}of p)s.push({error:`${a} is not on PATH`,spec:f});continue}const v=p.map(f=>({invocation:ae(a,f.expected),tool:f})).filter(f=>f.invocation!==void 0);for(const{invocation:f,tool:b}of v){const{expected:d}=b;if(f.bin==="nvm"&&f.args.length===0){n.warn(`toolchain: nvm requires a shell-side activation for ${d.tool} ${d.version}. Run \`nvm install\` / \`nvm use\` manually.`),s.push({error:"nvm requires shell-side activation",spec:d});continue}n.info(`toolchain: $ ${f.bin} ${f.args.join(" ")}`);try{M(f.bin,f.args,{cwd:o,stdio:"inherit"}),l.push(d),a==="fnm"&&fe(f.bin,n)}catch(E){s.push({error:E.message,spec:d});break}}}return Z(),{attempted:l,failed:s,upToDate:!1}},ke=async(o,e,n,t=!1)=>{if(t)return;const r=await le(o,e,n);for(const i of r.failed)n.warn(`toolchain: ${i.spec.tool} ${i.spec.version} — ${i.error}`)},fe=(o,e)=>{const n=process.platform==="win32"?"powershell":"bash";try{const t=M(o,["env","--shell",n],{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:2e3});for(const r of t.split(/\r?\n/)){const i=r.trim();if(i==="")continue;const l=/^\$env:([A-Z_]\w*)\s*=\s*(.+)$/i.exec(i);if(l){const[,a,p]=l;process.env[a]=p.replaceAll(/^["']|["']$/g,"");continue}const s=/^set\s+"?([A-Z_]\w*)=(.*?)"?$/i.exec(i);if(s){const[,a,p]=s;process.env[a]=p;continue}const c=/^(?:export\s+)?([A-Z_]\w*)=(.+)$/i.exec(i);if(c){const[,a,p]=c;process.env[a]=p.replaceAll(/^["']|["']$/g,"")}}}catch(t){e.warn(`toolchain: could not activate fnm env (${t.message}). Subsequent tasks may use the previous Node version.`)}};export{J as S,ye as a,ae as b,se as c,de as d,he as e,A as f,ie as g,ge as h,ve as p,ke as r,$e as u,be as w};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as u}from"node:module";import{r as t,U as c}from"../packem_chunks/catalog.js";import"./env-XJzocuUP.js";import"./window-ops-DDePlWLV.js";const f=u(import.meta.url),p=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process;const d=(o,i)=>{const r=t.useRef(null),[s,n]=t.useState(o);return t.useLayoutEffect(()=>{if(!r.current)return;const{height:e}=c(r.current);e>0&&e!==s&&(n(e),i?.(e))}),{measuredHeight:s,ref:r}};export{d as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a=e=>e?Array.isArray(e)?e:[e]:[],o=e=>e instanceof Error?e.message:typeof e=="string"?e:String(e),p=e=>e.replace(/^\.\//,"").replace(/\/+$/,""),l=/[\u0000-\u001F\u007F ~^:?*[\\]/g,n=e=>{const r=e.replaceAll("@{","-").replaceAll("..","-").replaceAll(l,"-").replace(/\.lock$/i,"").replace(/^[./-]+/,"").replace(/[./-]+$/,"");return r.length>0?r:"split"},t=/^(.+?)(?:@(.+))?$/,v=e=>{if(e.startsWith("@")){const c=e.indexOf("/");if(c===-1)return{name:e,versionSpec:void 0};const s=e.slice(c+1),i=s.indexOf("@");return i===-1?{name:e,versionSpec:void 0}:{name:e.slice(0,c+1+i),versionSpec:s.slice(i+1)}}const r=t.exec(e);return r?{name:r[1]??e,versionSpec:r[2]}:{name:e,versionSpec:void 0}};export{o as c,v as f,a as i,n as l,p as o};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as g}from"node:module";import{m as i,f as a,v as d}from"./index-OQZQyN5R.js";import"./public-api-WqUCiyIe.js";import{u as j}from"../packem_chunks/cli-main.js";const h=g(import.meta.url),p=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,u=c=>{if(typeof p<"u"&&p.versions&&p.versions.node){const[s,o]=p.versions.node.split(".").map(Number);if(s>22||s===22&&o>=3||s===20&&o>=16)return p.getBuiltinModule(c)}return h(c)},{readdirSync:m}=u("node:fs"),b=[".husky/pre-commit",".vis/hooks/pre-commit",".git/hooks/pre-commit"],v=[".secretlintrc",".secretlintrc.json",".secretlintrc.js",".secretlintrc.mjs",".secretlintrc.cjs",".secretlintrc.yml",".secretlintrc.yaml"],$=[".syncpackrc",".syncpackrc.json",".syncpackrc.yaml",".syncpackrc.yml",".syncpackrc.cjs",".syncpackrc.js",".syncpackrc.mjs",".syncpackrc.ts","syncpack.config.cjs","syncpack.config.js","syncpack.config.mjs","syncpack.config.ts"],w=c=>{const s=i(c,"package.json");if(!a(s))return[];let o;try{o=JSON.parse(d(s))}catch{return[]}const e=[];if(o.scripts)for(const[t,n]of Object.entries(o.scripts))typeof n=="string"&&(/\bgitleaks\b/.test(n)&&e.push({detail:`Script "${t}" still invokes gitleaks: ${n}`,kind:"script",location:"package.json",tool:"gitleaks"}),/\bsecretlint\b/.test(n)&&e.push({detail:`Script "${t}" still invokes secretlint: ${n}`,kind:"script",location:"package.json",tool:"secretlint"}),/\bsyncpack\b/.test(n)&&e.push({detail:`Script "${t}" still invokes syncpack: ${n}`,kind:"script",location:"package.json",tool:"syncpack"}),/\bsherif\b/.test(n)&&e.push({detail:`Script "${t}" still invokes sherif: ${n}`,kind:"script",location:"package.json",tool:"sherif"}));if(o.devDependencies)for(const t of Object.keys(o.devDependencies))(t==="gitleaks"||t==="@gitleaks/cli")&&e.push({detail:`devDependency \`${t}\` is still installed`,kind:"devDep",location:"package.json",tool:"gitleaks"}),(t==="secretlint"||t.startsWith("@secretlint/"))&&e.push({detail:`devDependency \`${t}\` is still installed`,kind:"devDep",location:"package.json",tool:"secretlint"}),t==="syncpack"&&e.push({detail:`devDependency \`${t}\` is still installed`,kind:"devDep",location:"package.json",tool:"syncpack"}),t==="sherif"&&e.push({detail:`devDependency \`${t}\` is still installed`,kind:"devDep",location:"package.json",tool:"sherif"});return o.sherif&&e.push({detail:"`sherif` config block still present in package.json",kind:"config",location:"package.json",tool:"sherif"}),e},_=c=>{const s=[];for(const o of b){const e=i(c,o);if(!a(e))continue;const t=d(e);/\bgitleaks\b/.test(t)&&s.push({detail:"gitleaks invocation still present in hook",kind:"hook",location:o,tool:"gitleaks"}),/\bsecretlint\b/.test(t)&&s.push({detail:"secretlint invocation still present in hook",kind:"hook",location:o,tool:"secretlint"}),/\bsyncpack\b/.test(t)&&s.push({detail:"syncpack invocation still present in hook",kind:"hook",location:o,tool:"syncpack"}),/\bsherif\b/.test(t)&&s.push({detail:"sherif invocation still present in hook",kind:"hook",location:o,tool:"sherif"})}return s},D=c=>{const s=[];for(const o of v)a(i(c,o))&&s.push({detail:"secretlint config should be removed after migration",kind:"config",location:o,tool:"secretlint"});for(const o of $)a(i(c,o))&&s.push({detail:"syncpack config should be removed after migration",kind:"config",location:o,tool:"syncpack"});return s},S=[".github/workflows",".gitlab-ci.yml",".circleci/config.yml",".woodpecker.yml",".drone.yml"],O=c=>{const s=[],o=e=>{const t=i(c,e);if(!a(t))return;const n=d(t);/\bsyncpack\b/.test(n)&&s.push({detail:"syncpack invocation still present in CI",kind:"ci",location:e,tool:"syncpack"}),/\bsherif\b/.test(n)&&s.push({detail:"sherif invocation still present in CI",kind:"ci",location:e,tool:"sherif"})};for(const e of S){const t=i(c,e);if(a(t)){if(e===".github/workflows"){try{for(const n of m(t))(n.endsWith(".yml")||n.endsWith(".yaml"))&&o(`.github/workflows/${n}`)}catch{}continue}o(e)}}return s},M=c=>{const s=[],o=i(c,"pnpm-workspace.yaml");if(a(o)){let t;try{t=j(o)}catch{t=void 0}if(t&&typeof t=="object"){const n=t.catalog;n&&typeof n.syncpack=="string"&&s.push({detail:"`syncpack` still listed in pnpm-workspace.yaml#catalog",kind:"catalog",location:"pnpm-workspace.yaml",tool:"syncpack"});const l=t.catalogs;if(l&&typeof l=="object")for(const[k,r]of Object.entries(l))r&&typeof r.syncpack=="string"&&s.push({detail:`\`syncpack\` still listed in pnpm-workspace.yaml#catalogs.${k}`,kind:"catalog",location:"pnpm-workspace.yaml",tool:"syncpack"})}}const e=i(c,"package.json");if(a(e)){let t;try{t=JSON.parse(d(e))}catch{return s}const n=t.workspaces;if(n&&typeof n=="object"&&!Array.isArray(n)){const k=n.catalog;k&&typeof k.syncpack=="string"&&s.push({detail:"`syncpack` still listed in package.json#workspaces.catalog",kind:"catalog",location:"package.json",tool:"syncpack"});const r=n.catalogs;if(r&&typeof r=="object")for(const[y,f]of Object.entries(r))f&&typeof f.syncpack=="string"&&s.push({detail:`\`syncpack\` still listed in package.json#workspaces.catalogs.${y}`,kind:"catalog",location:"package.json",tool:"syncpack"})}const l=t.catalog;l&&typeof l.syncpack=="string"&&s.push({detail:"`syncpack` still listed in package.json#catalog",kind:"catalog",location:"package.json",tool:"syncpack"})}return s},N=c=>[...w(c),..._(c),...D(c),...O(c),...M(c)],A=(c,s)=>{const o=N(c);if(o.length===0)return s.info("✓ No unmigrated gitleaks/secretlint/sherif/syncpack references found."),[];s.warn(`Found ${String(o.length)} unmigrated reference(s):`);for(const e of o)s.warn(` [${e.kind}] ${e.location} — ${e.detail}`);return o};export{N as s,A as v};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createRequire as P}from"node:module";const b=P(import.meta.url),_=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,A=e=>{if(typeof _<"u"&&_.versions&&_.versions.node){const[t,n]=_.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return _.getBuiltinModule(e)}return b(e)},{createRequire:R}=A("node:module"),l="\x1B[",g=";";R(import.meta.url);const D=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,I=D,L=(e,t,n,r)=>{if(n==="length"||n==="prototype"||n==="arguments"||n==="caller")return;const o=Object.getOwnPropertyDescriptor(e,n),i=Object.getOwnPropertyDescriptor(t,n);!$(o,i)&&r||Object.defineProperty(e,n,i)},$=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},x=(e,t)=>{const n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},w=(e,t)=>`/* Wrapped ${e}*/
|
|
2
|
-
${t}`,C=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),M=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),B=(e,t,n)=>{const r=n===""?"":`with ${n.trim()}() `,o=w.bind(null,r,t.toString());Object.defineProperty(o,"name",M);const{writable:i,enumerable:s,configurable:c}=C;Object.defineProperty(e,"toString",{value:o,writable:i,enumerable:s,configurable:c})};function v(e,t,{ignoreNonConfigurable:n=!1}={}){const{name:r}=e;for(const o of Reflect.ownKeys(t))L(e,t,o,n);return x(e,t),B(e,t,r),e}const h=new WeakMap,W=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let n,r=0;const o=e.displayName||e.name||"<anonymous>",i=function(...s){if(h.set(i,++r),r===1)n=e.apply(this,s),e=void 0;else if(t.throw===!0)throw new Error(`Function \`${o}\` can only be called once`);return n};return v(i,e),h.set(i,r),i};W.callCount=e=>{if(!h.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return h.get(e)};const a=[];a.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&a.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&a.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const f=e=>!!e&&!0&&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",O=Symbol.for("signal-exit emitter"),T=globalThis,X=Object.defineProperty.bind(Object);let Z=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(T[O])return T[O];X(T,O,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,n){this.listeners[t].push(n)}removeListener(t,n){const r=this.listeners[t],o=r.indexOf(n);o!==-1&&(o===0&&r.length===1?r.length=0:r.splice(o,1))}emit(t,n,r){if(this.emitted[t])return!1;this.emitted[t]=!0;let o=!1;for(const i of this.listeners[t])o=i(n,r)===!0||o;return t==="exit"&&(o=this.emit("afterExit",n,r)||o),o}};class m{}const j=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}});let G=class extends m{onExit(){return()=>{}}load(){}unload(){}},U=class extends m{#s=d.platform==="win32"?"SIGINT":"SIGHUP";#t=new Z;#e;#o;#i;#r={};#n=!1;constructor(t){super(),this.#e=t,this.#r={};for(const n of a)this.#r[n]=()=>{const r=this.#e.listeners(n);let{count:o}=this.#t;const i=t;if(typeof i.__signal_exit_emitter__=="object"&&typeof i.__signal_exit_emitter__.count=="number"&&(o+=i.__signal_exit_emitter__.count),r.length===o){this.unload();const s=this.#t.emit("exit",null,n),c=n==="SIGHUP"?this.#s:n;s||t.kill(t.pid,c)}};this.#i=t.reallyExit,this.#o=t.emit}onExit(t,n){if(!f(this.#e))return()=>{};this.#n===!1&&this.load();const r=n?.alwaysLast?"afterExit":"exit";return this.#t.on(r,t),()=>{this.#t.removeListener(r,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(const t of a)try{const n=this.#r[t];n&&this.#e.on(t,n)}catch{}this.#e.emit=(t,...n)=>this.#c(t,...n),this.#e.reallyExit=t=>this.#l(t)}}unload(){this.#n&&(this.#n=!1,a.forEach(t=>{const n=this.#r[t];if(!n)throw new Error("Listener not defined for signal: "+t);try{this.#e.removeListener(t,n)}catch{}}),this.#e.emit=this.#o,this.#e.reallyExit=this.#i,this.#t.count-=1)}#l(t){return f(this.#e)?(this.#e.exitCode=t||0,this.#t.emit("exit",this.#e.exitCode,null),this.#i.call(this.#e,this.#e.exitCode)):0}#c(t,...n){const r=this.#o;if(t==="exit"&&f(this.#e)){typeof n[0]=="number"&&(this.#e.exitCode=n[0]);const o=r.call(this.#e,t,...n);return this.#t.emit("exit",this.#e.exitCode,null),o}else return r.call(this.#e,t,...n)}};const d=globalThis.process,{onExit:k}=j(f(d)?new U(d):new G),p=I.stderr.isTTY?I.stderr:I.stdout.isTTY?I.stdout:void 0;p&&W(()=>{k(()=>{p.write("\x1B[?25h")},{alwaysLast:!0})});const Se=(e=1)=>`${l}${String(e)}B`,Oe=`${l}?25l`,H=`${l}G`,F=(e=1)=>`${l}${String(e)}G`,Te=(e=1)=>`${l}${String(e)}E`,de=`${l}?25h`,Ee=(e,t)=>t===void 0?F(e+1):`${l}${String(t+1)}${g}${String(e+1)}H`,Y=(e=1)=>`${l}${String(e)}A`;var q=(e=>(e[e.Default=0]="Default",e[e.BlinkingBlock=1]="BlinkingBlock",e[e.SteadyBlock=2]="SteadyBlock",e[e.BlinkingUnderline=3]="BlinkingUnderline",e[e.SteadyUnderline=4]="SteadyUnderline",e[e.BlinkingBar=5]="BlinkingBar",e[e.SteadyBar=6]="SteadyBar",e))(q||{});const pe=e=>`${l}${String(e)} q`;var Q=(e=>(e[e.ToEnd=0]="ToEnd",e[e.ToBeginning=1]="ToBeginning",e[e.EntireScreen=2]="EntireScreen",e[e.EntireScreenAndScrollback=3]="EntireScreenAndScrollback",e))(Q||{});const Re=e=>{const t=e>=0&&e<=3?e:0;return`${l}${t===0?"":String(t)}J`};var V=(e=>(e[e.ToEnd=0]="ToEnd",e[e.ToBeginning=1]="ToBeginning",e[e.EntireLine=2]="EntireLine",e))(V||{});const y=e=>{const t=e>=0&&e<=2?e:0;return`${l}${t===0?"":String(t)}K`},K=y(2),ge=y(0),We=e=>{if(e<=0)return"";let t="";for(let n=0;n<e;n+=1)t+=K,n<e-1&&(t+=Y());return t+=H,t},z=R(import.meta.url),u=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,J=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 z(e)};J("node:buffer");class ee{code;isDecMode=!0;constructor(t){this.code=t}}const N=(e,...t)=>{if(t.length===0)return"";const n=e?"l":"h";if(t.length===1){const s=t[0];let c=l;return s.isDecMode&&(c+="?"),c+String(s.code)+n}const r=t.filter(s=>!s.isDecMode).map(s=>s.code),o=t.filter(s=>s.isDecMode).map(s=>s.code);let i="";return r.length>0&&(i+=`${l}${r.join(";")}${n}`),o.length>0&&(i+=`${l}?${o.join(";")}${n}`),i};var te=(e=>(e[e.NotRecognized=0]="NotRecognized",e[e.Set=1]="Set",e[e.Reset=2]="Reset",e[e.PermanentlySet=3]="PermanentlySet",e[e.PermanentlyReset=4]="PermanentlyReset",e))(te||{});const ne=e=>new ee(e),me=(...e)=>N(!1,...e),ye=(...e)=>N(!0,...e),Ne=ne(2004);class re{constructor(t){this.reportCode=t}reportCode;isDecReport=!1}class oe{constructor(t){this.reportCode=t}reportCode;isDecReport=!0}const ie=e=>new re(e),E=e=>new oe(e),S=(...e)=>{if(e.length===0)return"";const t=e.some(o=>o.isDecReport),n=e.map(o=>o.reportCode.toString());let r=l;return t&&(r+="?"),`${r}${n.join(g)}n`},se=ie(5);S(se);const le=E(15);S(le);const ce=E(25);S(ce);const ae=E(26);S(ae);var _e=(e=>(e[e.DEICONIFY_WINDOW=1]="DEICONIFY_WINDOW",e[e.ICONIFY_WINDOW=2]="ICONIFY_WINDOW",e[e.MOVE_WINDOW=3]="MOVE_WINDOW",e[e.RESIZE_TEXT_AREA_CHARS=4]="RESIZE_TEXT_AREA_CHARS",e[e.RAISE_WINDOW=5]="RAISE_WINDOW",e[e.LOWER_WINDOW=6]="LOWER_WINDOW",e[e.REFRESH_WINDOW=7]="REFRESH_WINDOW",e[e.RESIZE_TEXT_AREA_PIXELS=8]="RESIZE_TEXT_AREA_PIXELS",e[e.RESTORE_MAXIMIZED_WINDOW=9]="RESTORE_MAXIMIZED_WINDOW",e[e.MAXIMIZE_WINDOW=10]="MAXIMIZE_WINDOW",e[e.MAXIMIZE_WINDOW_VERTICALLY=10.1]="MAXIMIZE_WINDOW_VERTICALLY",e[e.MAXIMIZE_WINDOW_HORIZONTALLY=10.2]="MAXIMIZE_WINDOW_HORIZONTALLY",e[e.UNDO_FULL_SCREEN_MODE=10.3]="UNDO_FULL_SCREEN_MODE",e[e.REPORT_WINDOW_STATE=11]="REPORT_WINDOW_STATE",e[e.REPORT_WINDOW_POSITION=13]="REPORT_WINDOW_POSITION",e[e.REPORT_TEXT_AREA_SIZE_CHARS=14]="REPORT_TEXT_AREA_SIZE_CHARS",e[e.REQUEST_WINDOW_SIZE_WIN_OP_COMPAT=14]="REQUEST_WINDOW_SIZE_WIN_OP_COMPAT",e[e.REPORT_CELL_SIZE_PIXELS=16]="REPORT_CELL_SIZE_PIXELS",e[e.REPORT_TEXT_AREA_SIZE_PIXELS=18]="REPORT_TEXT_AREA_SIZE_PIXELS",e[e.REPORT_ICON_LABEL=19]="REPORT_ICON_LABEL",e[e.REPORT_WINDOW_TITLE=21]="REPORT_WINDOW_TITLE",e[e.PUSH_WINDOW_TITLE=22]="PUSH_WINDOW_TITLE",e[e.POP_WINDOW_TITLE=23]="POP_WINDOW_TITLE",e[e.RESIZE_SCREEN_AND_TEXT_AREA=24]="RESIZE_SCREEN_AND_TEXT_AREA",e))(_e||{});export{Oe as A,de as H,We as L,Ee as P,Ne as Q,ye as S,Y as _,ne as a,me as c,ge as d,Re as e,Te as h,pe as j,Q as o,Se as v,l as x};
|