@visulima/vis 7.0.0 → 7.1.0-next.2
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 +87 -0
- package/bin/group-listing.mjs +40 -0
- package/bin/route.mjs +25 -21
- package/dist/bin.js +1 -1
- package/dist/binx.js +1 -1
- package/dist/packem_chunks/CONFIG_FILES.js +5 -5
- package/dist/packem_chunks/bloom-sync.js +1 -1
- package/dist/packem_chunks/catalog.js +1 -1
- package/dist/packem_chunks/cli-exec.js +1 -1
- package/dist/packem_chunks/cli-main.js +134 -134
- package/dist/packem_chunks/emit.js +3 -0
- package/dist/packem_chunks/fix.js +1 -1
- package/dist/packem_chunks/handler10.js +1 -1
- package/dist/packem_chunks/handler12.js +1 -1
- 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/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/handler23.js +1 -1
- package/dist/packem_chunks/handler24.js +1 -1
- package/dist/packem_chunks/handler25.js +1 -1
- package/dist/packem_chunks/handler26.js +1 -1
- package/dist/packem_chunks/handler28.js +1 -1
- package/dist/packem_chunks/handler3.js +1 -1
- package/dist/packem_chunks/handler4.js +1 -1
- package/dist/packem_chunks/handler5.js +1 -1
- package/dist/packem_chunks/handler50.js +1 -1
- package/dist/packem_chunks/handler51.js +1 -1
- package/dist/packem_chunks/handler52.js +1 -1
- package/dist/packem_chunks/handler54.js +1 -1
- package/dist/packem_chunks/handler55.js +1 -1
- package/dist/packem_chunks/handler58.js +1 -1
- package/dist/packem_chunks/handler59.js +1 -1
- package/dist/packem_chunks/handler6.js +1 -1
- package/dist/packem_chunks/handler60.js +1 -1
- package/dist/packem_chunks/handler61.js +1 -1
- package/dist/packem_chunks/handler62.js +1 -1
- package/dist/packem_chunks/handler63.js +1 -1
- package/dist/packem_chunks/handler64.js +1 -1
- package/dist/packem_chunks/handler65.js +1 -1
- package/dist/packem_chunks/handler66.js +1 -1
- package/dist/packem_chunks/handler67.js +1 -1
- package/dist/packem_chunks/handler68.js +1 -1
- package/dist/packem_chunks/handler69.js +1 -1
- package/dist/packem_chunks/handler7.js +1 -1
- package/dist/packem_chunks/handler70.js +1 -1
- package/dist/packem_chunks/handler71.js +1 -1
- package/dist/packem_chunks/handler72.js +1 -1
- package/dist/packem_chunks/handler73.js +1 -1
- package/dist/packem_chunks/handler74.js +1 -1
- package/dist/packem_chunks/handler75.js +1 -1
- package/dist/packem_chunks/handler76.js +1 -1
- package/dist/packem_chunks/handler77.js +1 -1
- package/dist/packem_chunks/handler78.js +1 -1
- package/dist/packem_chunks/handler79.js +1 -1
- package/dist/packem_chunks/handler8.js +1 -1
- package/dist/packem_chunks/heal.js +1 -1
- package/dist/packem_chunks/help-command.js +1 -1
- package/dist/packem_chunks/index5.js +20 -20
- package/dist/packem_chunks/index7.js +1 -1
- package/dist/packem_chunks/keys-refresh.js +1 -1
- package/dist/packem_chunks/list.js +1 -1
- package/dist/packem_chunks/prune.js +1 -1
- package/dist/packem_chunks/status.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 +1 -1
- package/dist/packem_chunks/ts-loader.js +5 -5
- package/dist/packem_chunks/verify-lockfile.js +1 -1
- package/dist/packem_shared/{advisories-Vd2kwoSf.js → advisories-Wk-RI-Lt.js} +1 -1
- package/dist/packem_shared/{affected-selection-Dbbli-Ot.js → affected-selection-BAEovubH.js} +1 -1
- package/dist/packem_shared/{ai-analysis-DZEjy6lu.js → ai-analysis-DoXQg-wK.js} +1 -1
- package/dist/packem_shared/{ai-cache-Q7TuGULh.js → ai-cache-B9U5m9O9.js} +1 -1
- package/dist/packem_shared/{ai-fix-Cagw3I4D.js → ai-fix-DzPjdJFn.js} +1 -1
- package/dist/packem_shared/bin-DKJ6q_xR.js +1 -0
- package/dist/packem_shared/{build-scripts-B5sROJPn.js → build-scripts-B7BgERlS.js} +1 -1
- package/dist/packem_shared/{dependency-scan-Cpk1Z6Wj.js → dependency-scan-DKp1Y0Sx.js} +1 -1
- package/dist/packem_shared/{detect-D8zxVYrU.js → detect-DF0ZnX4w.js} +1 -1
- package/dist/packem_shared/{docker-2ZjBNNeE.js → docker-CxcZMIvs.js} +1 -1
- package/dist/packem_shared/{ecosystem-gate-BF9glH2Q.js → ecosystem-gate-ChG-zNz5.js} +1 -1
- package/dist/packem_shared/{env-5cWSxQ96.js → env-D0huQDyA.js} +1 -1
- package/dist/packem_shared/{env-consistency-DkH7lUU7.js → env-consistency-Dj56sHLM.js} +1 -1
- package/dist/packem_shared/{failure-log-Dj9b94ax.js → failure-log-D6woYuZv.js} +1 -1
- package/dist/packem_shared/glob-Cyk1H9ZL-DC9cczJJ.js +1 -0
- package/dist/packem_shared/{index-Dn_z9DYf.js → index-B3tiV1iu.js} +1 -1
- package/dist/packem_shared/{index-Bu_rMPKl.js → index-u2ABjmic.js} +1 -1
- package/dist/packem_shared/{lifecycle-BGTRxc9n.js → lifecycle-DKTLZVXm.js} +1 -1
- package/dist/packem_shared/{manifests-C1FhhaNX.js → manifests-C3TL659D.js} +1 -1
- package/dist/packem_shared/{min-release-age-BbppxofB.js → min-release-age-4Jf3-DDz.js} +1 -1
- package/dist/packem_shared/{missing-package-json-DLTSyp4H.js → missing-package-json-wH6OInGG.js} +1 -1
- package/dist/packem_shared/{multi-eco-lockfiles-CxwaJO4v.js → multi-eco-lockfiles-szCMAPHo.js} +1 -1
- package/dist/packem_shared/{native-config-sync-Di-76fQc.js → native-config-sync-Dv4nFzvF.js} +1 -1
- package/dist/packem_shared/{osv-DrEbiNXB.js → osv-BTClyx8h.js} +1 -1
- package/dist/packem_shared/{package-version-lWlrF9Wk.js → package-version-CtgyD_B1.js} +1 -1
- package/dist/packem_shared/{packument-CW9GbXrT.js → packument-BOiBtGV2.js} +1 -1
- package/dist/packem_shared/{project-name-filter-DQ323iaJ.js → project-name-filter-CVtU8rSE.js} +1 -1
- package/dist/packem_shared/{provenance-DnK4Z14A.js → provenance-DRntJArZ.js} +1 -1
- package/dist/packem_shared/{registry-DqBIZZSL.js → registry-Dmy6zBD8.js} +1 -1
- package/dist/packem_shared/{registry-keys-fVgmcPXl.js → registry-keys-C5UDzK6U.js} +1 -1
- package/dist/packem_shared/{renderToString-DR0zDUjh-C8HCAyYP.js → renderToString-DR0zDUjh-BeCb092p.js} +1 -1
- package/dist/packem_shared/{resolve-explicit-B9zDWjx_.js → resolve-explicit-ChxnXt-x.js} +1 -1
- package/dist/packem_shared/run-summary-utils-Co-yODTZ.js +1 -0
- package/dist/packem_shared/{runtime-check-B7ptIHX7.js → runtime-check-CRNoD5DL.js} +1 -1
- package/dist/packem_shared/{s1ngularity-27TGL2H3.js → s1ngularity-DCurn2c1.js} +1 -1
- package/dist/packem_shared/{scaffold-files-BFWgtMR2.js → scaffold-files-D0whWHeH.js} +1 -1
- package/dist/packem_shared/{scan-progress-BwacnpFH.js → scan-progress-B6BSwS4F.js} +1 -1
- package/dist/packem_shared/{selectors-BisxDyYw.js → selectors-DrrBSBOS.js} +1 -1
- package/dist/packem_shared/{signatures-Bl3Y1qG3.js → signatures-DHnVndR8.js} +1 -1
- package/dist/packem_shared/{spinner-OBWz4yeR.js → spinner-B9D3Fl1H.js} +1 -1
- package/dist/packem_shared/{table-BwL7to1g.js → table-BT8EWIiz.js} +1 -1
- package/dist/packem_shared/{tabs-Cr6uwTNJ.js → tabs-Cq8smM1S.js} +1 -1
- package/dist/packem_shared/{toolchain-DVLvBR49.js → toolchain-BnrrDIRc.js} +1 -1
- package/dist/packem_shared/{typosquats-DpcdyKGi.js → typosquats-hTQZou8a.js} +1 -1
- package/dist/packem_shared/{use-measured-height-CVzcGyKB.js → use-measured-height-tg-5qUrj.js} +1 -1
- package/dist/packem_shared/{vis-update-app-0dbSUY-u.js → vis-update-app-BUqiU_Zo.js} +1 -1
- package/dist/packem_shared/{vis-user-error-pMP1p7q1.js → vis-user-error-DNF243LB.js} +1 -1
- package/dist/packem_shared/{watch-loop-ZjcOW5Qx.js → watch-loop-TB9JRJUD.js} +1 -1
- package/index.js +54 -54
- package/package.json +12 -12
- package/dist/packem_shared/bin-gxaewUwv.js +0 -1
- package/dist/packem_shared/glob-Cyk1H9ZL-CYVM7sl3.js +0 -1
- package/dist/packem_shared/run-summary-utils-H2tE2PUC.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,43 @@
|
|
|
1
|
+
## @visulima/vis [7.1.0-next.2](https://github.com/visulima/vis/compare/@visulima/vis@7.1.0-next.1...@visulima/vis@7.1.0-next.2) (2026-11-22)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* **vis:** list the cache subcommands for `vis cache`, `cache --help` and `cache -h` ([#149](https://github.com/visulima/vis/issues/149)) ([6b800ee](https://github.com/visulima/vis/commit/6b800eeea1c0aa3d8b16ee2299d8ee4dea91ce20))
|
|
6
|
+
* **vis:** serve an evaluated vis.config from a revalidating cache in the native CLI ([#150](https://github.com/visulima/vis/issues/150)) ([0c4781f](https://github.com/visulima/vis/commit/0c4781fa90a2c21c06eeb375ebcfc8d5e113f513))
|
|
7
|
+
|
|
8
|
+
### Tests
|
|
9
|
+
|
|
10
|
+
* **vis:** share one routing fixture between the launcher and the native binary ([#148](https://github.com/visulima/vis/issues/148)) ([25de704](https://github.com/visulima/vis/commit/25de704151b3be74d62c26f9b54c287c3ec8d51e))
|
|
11
|
+
|
|
12
|
+
## @visulima/vis [7.1.0-next.1](https://github.com/visulima/vis/compare/@visulima/vis@7.0.0...@visulima/vis@7.1.0-next.1) (2026-11-22)
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **vis:** add a pnpm 10 row to the install smoke ([#144](https://github.com/visulima/vis/issues/144)) ([12f1ef9](https://github.com/visulima/vis/commit/12f1ef927a692bfcbc38e8820047f17282bfa0b6))
|
|
17
|
+
* **vis:** enable ANSI virtual terminal processing on the Windows console ([#142](https://github.com/visulima/vis/issues/142)) ([84fc691](https://github.com/visulima/vis/commit/84fc691b76539f96e8deaf2195badf1c4a018d10))
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* **release:** publish next as a prerelease channel ([#145](https://github.com/visulima/vis/issues/145)) ([23f5391](https://github.com/visulima/vis/commit/23f5391cf38011ee141dbeba0cc353f39a1e93ca))
|
|
22
|
+
* **task-runner:** separate the identity fields in the command hash ([#143](https://github.com/visulima/vis/issues/143)) ([e8b7404](https://github.com/visulima/vis/commit/e8b7404f1b75df67fed628f30318f27147e9a596))
|
|
23
|
+
* **vis:** apply the filter when adding a package with Yarn Berry ([#140](https://github.com/visulima/vis/issues/140)) ([a2b16bd](https://github.com/visulima/vis/commit/a2b16bd65e7ab5cda6edd3a80e1dd9d472c81f40))
|
|
24
|
+
* **vis:** run the unversioned bin when dlx pins an unscoped package on npm ([#141](https://github.com/visulima/vis/issues/141)) ([c175f84](https://github.com/visulima/vis/commit/c175f84801c96520599dffa05d614e05f48ace65))
|
|
25
|
+
|
|
26
|
+
### Miscellaneous Chores
|
|
27
|
+
|
|
28
|
+
* merge main back into next after the 6.8.0 release ([#137](https://github.com/visulima/vis/issues/137)) ([b30add6](https://github.com/visulima/vis/commit/b30add6ebc1086958aeb598e1b3ba73cac03fcf8))
|
|
29
|
+
|
|
30
|
+
### Code Refactoring
|
|
31
|
+
|
|
32
|
+
* **vis:** report native wrapper failures through one error type ([#147](https://github.com/visulima/vis/issues/147)) ([2955c43](https://github.com/visulima/vis/commit/2955c43984924b8401595fbdad351916ab9194b0))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Dependencies
|
|
36
|
+
|
|
37
|
+
* **@visulima/secret-scanner:** upgraded to 3.0.1-next.1
|
|
38
|
+
* **@visulima/task-runner:** upgraded to 3.0.5-next.1
|
|
39
|
+
* **@visulima/tui:** upgraded to 5.0.2-next.1
|
|
40
|
+
|
|
1
41
|
## @visulima/vis [7.0.0](https://github.com/visulima/vis/compare/@visulima/vis@6.7.0...@visulima/vis@7.0.0) (2026-11-21)
|
|
2
42
|
|
|
3
43
|
### ⚠ BREAKING CHANGES
|
|
@@ -66,6 +106,53 @@
|
|
|
66
106
|
* **@visulima/secret-scanner:** upgraded to 3.0.0
|
|
67
107
|
* **@visulima/task-runner:** upgraded to 3.0.4
|
|
68
108
|
|
|
109
|
+
## @visulima/vis [6.8.0](https://github.com/visulima/vis/compare/@visulima/vis@6.7.0...@visulima/vis@6.8.0) (2026-11-20)
|
|
110
|
+
|
|
111
|
+
### Features
|
|
112
|
+
|
|
113
|
+
* **vis:** answer the plain vis list natively ([#117](https://github.com/visulima/vis/issues/117)) ([cfc7f1b](https://github.com/visulima/vis/commit/cfc7f1b7f98a91c5448e05cda4c8d57f13ab43db))
|
|
114
|
+
* **vis:** answer vis clean natively for the plain and dry-run shapes ([15211e8](https://github.com/visulima/vis/commit/15211e8bc64f13c4215df3067b29031b082c9bda))
|
|
115
|
+
* **vis:** link the native binary as the vis command on install ([#103](https://github.com/visulima/vis/issues/103)) ([afcf849](https://github.com/visulima/vis/commit/afcf84957980a19cb8ba35b34706512d73fc1082))
|
|
116
|
+
* **vis:** native project names and graph for JS-only workspaces ([f8fb104](https://github.com/visulima/vis/commit/f8fb1040ab992eb1b5e60f9a38f3567b8c51be97))
|
|
117
|
+
* **vis:** port vis ignore to the native front-end ([24ccd56](https://github.com/visulima/vis/commit/24ccd564ea9097a4988d16db45cf9b8c41710b97))
|
|
118
|
+
* **vis:** read package.json script targets for JS-only projects natively ([f28a3b8](https://github.com/visulima/vis/commit/f28a3b834c47743ec58c6a503aff5ddda14bf1ea))
|
|
119
|
+
* **vis:** read vis.config as data in the native pm commands ([c470623](https://github.com/visulima/vis/commit/c470623749bc37332070750b73fdabab6881f44e))
|
|
120
|
+
* **vis:** run a plain npm, pnpm or bun install.backend pin natively ([#118](https://github.com/visulima/vis/issues/118)) ([b139087](https://github.com/visulima/vis/commit/b139087b08301bda03d95347a49aadb819dbfb3a))
|
|
121
|
+
|
|
122
|
+
### Bug Fixes
|
|
123
|
+
|
|
124
|
+
* **vis:** address Qodo findings on the native list, clean and ignore paths ([#134](https://github.com/visulima/vis/issues/134)) ([1078fa9](https://github.com/visulima/vis/commit/1078fa9569e4a9a997578415c3ede405a7c981ed))
|
|
125
|
+
* **vis:** address Qodo review findings from PR [#105](https://github.com/visulima/vis/issues/105) ([#132](https://github.com/visulima/vis/issues/132)) ([a02467e](https://github.com/visulima/vis/commit/a02467ecd20e468e52db93fa885d42807db30c17))
|
|
126
|
+
* **vis:** address the CodeRabbit review on the native launcher ([#107](https://github.com/visulima/vis/issues/107)) ([9227cbb](https://github.com/visulima/vis/commit/9227cbbd285cab295a97330d8037bf9e2950d468))
|
|
127
|
+
* **vis:** close the remaining native config gaps found in review ([a756c20](https://github.com/visulima/vis/commit/a756c20e02111369ec626852601e4eafc90a9d17))
|
|
128
|
+
* **vis:** compute the native root gate instead of trusting VIS_MONOREPO_ROOT ([#119](https://github.com/visulima/vis/issues/119)) ([5a2d4b5](https://github.com/visulima/vis/commit/5a2d4b5e4e0dd7e1692cf24aafefeffe4f4f74a0))
|
|
129
|
+
* **vis:** delegate native config handling for the cases Node resolves itself ([da75fdf](https://github.com/visulima/vis/commit/da75fdf007e4c017e949c589598c0b64fedc418c))
|
|
130
|
+
* **vis:** detect the registry's listening line in a large output chunk ([8dce751](https://github.com/visulima/vis/commit/8dce751ad722d5686ff72ade0246666f178b48ab))
|
|
131
|
+
* **vis:** finish the native launcher hardening from PR [#105](https://github.com/visulima/vis/issues/105) review ([#106](https://github.com/visulima/vis/issues/106)) ([9432ceb](https://github.com/visulima/vis/commit/9432ceb309f3eedf0717f87e6b43c6d459a9372e))
|
|
132
|
+
* **vis:** give the smoke registry long enough to start on a cold runner ([#110](https://github.com/visulima/vis/issues/110)) ([1f813e6](https://github.com/visulima/vis/commit/1f813e6561b69addf0068a9dfec3553c0d906a9a))
|
|
133
|
+
* **vis:** keep native ignore fallbacks lossless, gate its launcher route, write atomically ([c4cf57f](https://github.com/visulima/vis/commit/c4cf57fe0b71a4ecbb53d90e792291c9c2959178))
|
|
134
|
+
* **vis:** match Node for bare pnpm pins and workspace-root verbs ([#133](https://github.com/visulima/vis/issues/133)) ([d2911df](https://github.com/visulima/vis/commit/d2911df786287831e9b72b07705d6431b56dde8b))
|
|
135
|
+
* **vis:** refuse to replace a read-only ignore file on native write ([c2f9d10](https://github.com/visulima/vis/commit/c2f9d10d1585cbfc6d3c79027d06a9c1e05015e0))
|
|
136
|
+
|
|
137
|
+
### Styles
|
|
138
|
+
|
|
139
|
+
* **vis:** fix lint in the ignore route test ([d76c879](https://github.com/visulima/vis/commit/d76c8799bbd2e026168abb1cc8abd31dc7f882ee))
|
|
140
|
+
* **vis:** match the repo's TOML array spacing for serde_json features ([420f9bd](https://github.com/visulima/vis/commit/420f9bd0a4453d0f8b2f886afa85170e7708a218))
|
|
141
|
+
* **vis:** use block bodies in the project-graph parity test ([0794c27](https://github.com/visulima/vis/commit/0794c271cb00eeb5c7049047b953d30676d40ccb))
|
|
142
|
+
|
|
143
|
+
### Code Refactoring
|
|
144
|
+
|
|
145
|
+
* **native:** move task-runner, secret-scanner and package-manager logic into napi-free core crates ([#102](https://github.com/visulima/vis/issues/102)) ([8440280](https://github.com/visulima/vis/commit/84402805dc753dfd501ff92e6f6eff82bc008ae5))
|
|
146
|
+
* **vis:** drop a doc comment that restated its type ([733b677](https://github.com/visulima/vis/commit/733b6778def7cdb9786e60fe5ffe05db6b76ab7d))
|
|
147
|
+
* **vis:** drop enum variant docs that restate their names ([f2b810c](https://github.com/visulima/vis/commit/f2b810cda3f01486bdf4d79b00e0759ea107271d))
|
|
148
|
+
* **vis:** split the per-command launcher routing out of routesToNative ([#128](https://github.com/visulima/vis/issues/128)) ([4cc5313](https://github.com/visulima/vis/commit/4cc5313b9199a38a97ccf25aa0015414660fbf48))
|
|
149
|
+
|
|
150
|
+
### Tests
|
|
151
|
+
|
|
152
|
+
* **vis:** cover the graph's own name checks and pin the fixture count ([a0d5329](https://github.com/visulima/vis/commit/a0d53290dd117e7b8d98cac92981b1bfea0ac27d))
|
|
153
|
+
* **vis:** fail the install smoke when a package manager named with --pm is missing ([#104](https://github.com/visulima/vis/issues/104)) ([120c2c6](https://github.com/visulima/vis/commit/120c2c6b6a1324454e1953b37005f5a1eaccf7e5))
|
|
154
|
+
* **vis:** give the list parity test's binary the entry and version a launcher passes ([#130](https://github.com/visulima/vis/issues/130)) ([d891c38](https://github.com/visulima/vis/commit/d891c384c8145538e82daead123a66e0e161ca50))
|
|
155
|
+
|
|
69
156
|
## @visulima/vis [6.7.0](https://github.com/visulima/vis/compare/@visulima/vis@6.6.1...@visulima/vis@6.7.0) (2026-11-17)
|
|
70
157
|
|
|
71
158
|
### Features
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Command groups that have no command of their own (`cache`): the parser finds nothing to run for
|
|
2
|
+
// `vis <group>`, `vis <group> --help` and `vis <group> -h`, so the Node CLI answers them with the
|
|
3
|
+
// output of `vis help <group>`. The native binary does the same (`GROUP_LISTINGS` in
|
|
4
|
+
// `native/cli/src/surface.rs`, which has to list the same groups) and the launcher
|
|
5
|
+
// (`bin/route.mjs`) hands the bare group to it. Free of side effects, like `route.mjs`.
|
|
6
|
+
|
|
7
|
+
const GROUP_LISTINGS = ["cache"];
|
|
8
|
+
|
|
9
|
+
const VALUELESS_GLOBAL_FLAGS = new Set(["--color", "--debug", "--no-color", "--quiet", "--verbose", "-q", "-v"]);
|
|
10
|
+
const HELP_FLAGS = new Set(["--help", "-h"]);
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The invocation `vis help <group>` that stands in for a group invocation, with the exit code to
|
|
14
|
+
* finish with: 0 when help was asked for, 1 for the bare group, which is a usage error.
|
|
15
|
+
*
|
|
16
|
+
* Returns `undefined` for anything else; only valueless global flags may accompany the group.
|
|
17
|
+
* @param {ReadonlyArray<string>} argv the arguments after `vis`
|
|
18
|
+
* @returns {{ argv: string[]; exitCode: 0 | 1 } | undefined} the stand-in invocation and exit code
|
|
19
|
+
*/
|
|
20
|
+
const groupListing = (argv) => {
|
|
21
|
+
const start = argv.findIndex((argument) => !VALUELESS_GLOBAL_FLAGS.has(argument));
|
|
22
|
+
const group = argv[start];
|
|
23
|
+
|
|
24
|
+
if (group === undefined || !GROUP_LISTINGS.includes(group)) {
|
|
25
|
+
return undefined;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const flags = argv.slice(start + 1);
|
|
29
|
+
|
|
30
|
+
if (!flags.every((flag) => HELP_FLAGS.has(flag) || VALUELESS_GLOBAL_FLAGS.has(flag))) {
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// The global flags carry over to the help invocation, in their order.
|
|
35
|
+
const carried = argv.filter((argument) => argument !== group && !HELP_FLAGS.has(argument));
|
|
36
|
+
|
|
37
|
+
return { argv: ["help", group, ...carried], exitCode: flags.some((flag) => HELP_FLAGS.has(flag)) ? 0 : 1 };
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export { GROUP_LISTINGS, groupListing };
|
package/bin/route.mjs
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { existsSync } from "node:fs";
|
|
2
2
|
import { dirname, join } from "node:path";
|
|
3
3
|
|
|
4
|
+
import { GROUP_LISTINGS } from "./group-listing.mjs";
|
|
5
|
+
|
|
4
6
|
// Which `vis` invocations the Node launcher (`bin/vis.mjs`) hands to the native
|
|
5
7
|
// binary. Kept free of side effects so the routing table is unit-testable without
|
|
6
8
|
// a binary, the same way `resolve-binary.mjs` is shared.
|
|
@@ -96,6 +98,7 @@ const plainTerm = (environment) => {
|
|
|
96
98
|
|
|
97
99
|
// Whether `vis ignore` can pass the binary's native gate (`native_context` in `ignore.rs`). The
|
|
98
100
|
// binary re-checks everything; this only skips the extra process when it would delegate anyway.
|
|
101
|
+
// It never answers `ignore` on Windows (Node's colour detection and path handling differ there).
|
|
99
102
|
const ignoreMayRunNatively = (platform, environment, cwd, interactive, holdsMarker) => {
|
|
100
103
|
if (platform === "win32" || interactive) {
|
|
101
104
|
return false;
|
|
@@ -125,7 +128,8 @@ const ignoreMayRunNatively = (platform, environment, cwd, interactive, holdsMark
|
|
|
125
128
|
|
|
126
129
|
// Whether `vis clean` can pass the binary's native gate (`plan` in `clean.rs`). The binary re-checks
|
|
127
130
|
// everything; this only skips the extra process when it would delegate anyway. Flags are the
|
|
128
|
-
// default, `--dry-run` and `--lockfile`/`-l`, each at most once.
|
|
131
|
+
// default, `--dry-run` and `--lockfile`/`-l`, each at most once. `plan` delegates everywhere but
|
|
132
|
+
// unix (its header clock is unix-only), so Windows stays in Node.
|
|
129
133
|
const cleanMayRunNatively = (platform, environment, args, interactive) => {
|
|
130
134
|
if (platform === "win32" || interactive) {
|
|
131
135
|
return false;
|
|
@@ -157,11 +161,12 @@ const listMayRunNatively = (platform, environment, args, interactive) => {
|
|
|
157
161
|
return LIST_NATIVE_SHAPES.some((shape) => shape.length === flags.length && shape.every((flag, index) => flags[index] === flag));
|
|
158
162
|
};
|
|
159
163
|
|
|
160
|
-
// Commands with a native gate answer help through the binary
|
|
161
|
-
//
|
|
162
|
-
|
|
164
|
+
// Commands with a native gate answer help through the binary on every platform (it enables
|
|
165
|
+
// virtual-terminal processing on a Windows console), and otherwise follow the gate.
|
|
166
|
+
// `mayRunNatively` is only called when the help surface is not asked for.
|
|
167
|
+
const helpOrNative = (args, mayRunNatively) => {
|
|
163
168
|
if (asksForHelp(args)) {
|
|
164
|
-
return
|
|
169
|
+
return true;
|
|
165
170
|
}
|
|
166
171
|
|
|
167
172
|
return mayRunNatively();
|
|
@@ -178,35 +183,40 @@ const routesCommandToNative = (args, platform, environment, cwd, interactive, ho
|
|
|
178
183
|
|
|
179
184
|
// `hook run` is native, but the other `hook` subcommands (install, migrate, …)
|
|
180
185
|
// are not: sending those through the binary would only add a second Node boot.
|
|
181
|
-
// On Windows, `hook run --help` stays in Node, which keeps the help surface there.
|
|
182
186
|
if (command === "hook" && subcommand === "run") {
|
|
183
|
-
return
|
|
187
|
+
return true;
|
|
184
188
|
}
|
|
185
189
|
|
|
186
190
|
// `advisories bloom status` is answered natively for `--format json --cache-dir <dir>`.
|
|
187
191
|
// The binary hands every other shape of it to Node itself, as it does for `hook run`.
|
|
188
192
|
if (command === "advisories" && subcommand === "bloom" && args[2] === "status") {
|
|
189
|
-
return
|
|
193
|
+
return true;
|
|
190
194
|
}
|
|
191
195
|
|
|
192
196
|
// `ignore` is native for its plain shapes in a CI context (`native/cli/src/ignore.rs`); any
|
|
193
|
-
// other run would be delegated by the binary, which costs a second Node boot.
|
|
194
|
-
// answered by the binary everywhere but Windows, as for `advisories bloom status`.
|
|
197
|
+
// other run would be delegated by the binary, which costs a second Node boot.
|
|
195
198
|
if (command === "ignore") {
|
|
196
|
-
return helpOrNative(args,
|
|
199
|
+
return helpOrNative(args, () => ignoreMayRunNatively(platform, environment, cwd, interactive, holdsMarker));
|
|
197
200
|
}
|
|
198
201
|
|
|
199
202
|
// `list` is native for the plain listing in a CI context (`native/cli/src/list.rs`); any other
|
|
200
203
|
// run would be delegated by the binary, which costs a second Node boot.
|
|
201
204
|
if (command === "list") {
|
|
202
|
-
return helpOrNative(args,
|
|
205
|
+
return helpOrNative(args, () => listMayRunNatively(platform, environment, args, interactive));
|
|
203
206
|
}
|
|
204
207
|
|
|
205
208
|
// `clean` (no flags, `--dry-run`, `--lockfile`) is answered natively; the binary hands every
|
|
206
|
-
// other shape to Node itself.
|
|
207
|
-
// stdout stays in Node
|
|
209
|
+
// other shape to Node itself. A terminal
|
|
210
|
+
// stdout stays in Node: pail colours its output there, and the binary does not.
|
|
208
211
|
if (command === "clean") {
|
|
209
|
-
return helpOrNative(args,
|
|
212
|
+
return helpOrNative(args, () => cleanMayRunNatively(platform, environment, args, interactive));
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// A bare command group lists its subcommands, which the binary answers like `<group> --help` (any
|
|
216
|
+
// other shape is Node's, which prints the same listing). The binary enables virtual-terminal
|
|
217
|
+
// processing, so Windows answers it natively too.
|
|
218
|
+
if (GROUP_LISTINGS.includes(command) && args.length === 1) {
|
|
219
|
+
return true;
|
|
210
220
|
}
|
|
211
221
|
|
|
212
222
|
// `complete --` is the dynamic endpoint the generated completion scripts call on
|
|
@@ -239,12 +249,6 @@ const routesToNative = (
|
|
|
239
249
|
return decided;
|
|
240
250
|
}
|
|
241
251
|
|
|
242
|
-
// Windows keeps the help surface in Node: the binary paints it with raw ANSI codes
|
|
243
|
-
// and does not enable virtual-terminal processing, which classic conhost needs.
|
|
244
|
-
if (platform === "win32") {
|
|
245
|
-
return false;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
252
|
// The binary also renders the help surface from its generated manifest: bare
|
|
249
253
|
// `vis`, `help …`, and `--help` / `-h` anywhere before a `--` separator. It
|
|
250
254
|
// delegates whatever it cannot answer to `dist/bin.js` itself (never back through
|
package/dist/bin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./packem_shared/compile-cache-DoMHRsRZ.js";import"./packem_shared/bin-
|
|
1
|
+
import"./packem_shared/compile-cache-DoMHRsRZ.js";import"./packem_shared/bin-DKJ6q_xR.js";
|
package/dist/binx.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as r,x as i,i as c,d as a,r as d}from"./packem_shared/vis-user-error-
|
|
2
|
+
import{a as r,x as i,i as c,d as a,r as d}from"./packem_shared/vis-user-error-DNF243LB.js";import{t as n}from"./packem_shared/compile-cache-DoMHRsRZ.js";import{g as o}from"./packem_shared/package-version-CtgyD_B1.js";process.argv.includes("--no-color")&&(process.env.NO_COLOR="1",process.env.FORCE_COLOR="0");process.argv.slice(2).some(s=>s==="--version"||s==="-v"||s==="-V")&&(process.stdout.write(`${o()}
|
|
3
3
|
`),process.exit(0));process.argv.splice(2,0,"dlx");n();const e=r("visx",{packageName:"visx",packageVersion:o()}),p=process.argv.includes("--debug")||!!process.env.DEBUG;e.addPlugin(i({concise:c,detailed:p,exitOnError:!1}));e.addCommand(a);d(e);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{createRequire as
|
|
2
|
-
`),t),this.filePath=s,this.removedKeys=o}}class
|
|
3
|
-
Chain: ${t.join(" → ")}`:"";super(`Failed to load ${s}: ${n}${r}`,t,{cause:o})}}const
|
|
1
|
+
import{createRequire as O}from"node:module";import{v as j,e as l,m as S}from"../packem_shared/index-0dnGN3GP.js";import{i as A}from"./ts-loader.js";import{m as R}from"../packem_shared/target-merge-ya19LiWB.js";import{otelPlugin as ue}from"../packem_shared/otelPlugin-D8LL2-4L.js";import{definePlugin as le}from"../packem_shared/definePlugin-DoUcoYSy.js";import{y as b}from"../packem_shared/isAccessibleSync-DYKTrrvc-CBsMZhj-.js";let x;const _=e=>(x??=O(import.meta.url))(e),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,h=e=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[s,t]=c.versions.node.split(".").map(Number);if(s>22||s===22&&t>=3||s===20&&t>=16)return c.getBuiltinModule(e)}return _(e)},{readdirSync:g}=h("node:fs"),{createRequire:E}=h("node:module");class f extends Error{chain;constructor(s,t,o){super(s,o),this.name=this.constructor.name,this.chain=t}}class V extends f{constructor(s,t){const o=[...t,`${s} (re-enters)`].join(" → ");super(`Config cycle: ${o}`,t)}}class T extends f{filePath;removedKeys;constructor(s,t,o){const n=[`${s} uses removed keys.`,""];for(const r of o){const i=r.location?` (at ${r.location})`:"";n.push(` • ${r.name}${i} → renamed to \`${r.renamedTo}\``);for(const a of r.children??[])n.push(` ↳ ${a.name} → renamed to \`${a.renamedTo}\``)}n.push("","Run `vis migrate self` to auto-rewrite the config (use --dry-run to preview)."),super(n.join(`
|
|
2
|
+
`),t),this.filePath=s,this.removedKeys=o}}class y extends f{constructor(s,t,o){const n=o instanceof Error?o.message:String(o),r=t.length>0?`
|
|
3
|
+
Chain: ${t.join(" → ")}`:"";super(`Failed to load ${s}: ${n}${r}`,t,{cause:o})}}const D=e=>e.join(" → ");class p extends f{constructor(s,t,o){const n=t.length>0?t[t.length-1]:"<unknown>",r=o.length>0?`
|
|
4
4
|
Tried:
|
|
5
5
|
${o.join(`
|
|
6
6
|
`)}`:"";super(`Cannot resolve "${s}" extended from ${n}.${r}
|
|
7
|
-
Chain: ${
|
|
8
|
-
`),t),this.filePath=s,this.violations=o}}const
|
|
7
|
+
Chain: ${D(t)}`,t)}}class G extends f{filePath;violations;constructor(s,t,o){const n=[`${s} has an invalid value.`,""];for(const r of o)n.push(` • ${r.location} — expected ${r.expected}, found ${r.found}`);n.push("","See https://visulima.com/docs/packages/vis/configuration for the expected shape."),super(n.join(`
|
|
8
|
+
`),t),this.filePath=s,this.violations=o}}const I=e=>{const s=[];if(Object.hasOwn(e,"targetDefaults")&&s.push({name:"targetDefaults",renamedTo:"tasks"}),Object.hasOwn(e,"taskRunnerOptions")&&s.push({name:"taskRunnerOptions",renamedTo:"taskRunner"}),Object.hasOwn(e,"taskDefaults")){const{taskDefaults:t}=e,o=[];if(Array.isArray(t))for(const[n,r]of t.entries())r&&typeof r=="object"&&(Object.hasOwn(r,"scope")&&o.push({location:`taskDefaults[${n}].scope`,name:"scope",renamedTo:"match"}),Object.hasOwn(r,"targets")&&o.push({location:`taskDefaults[${n}].targets`,name:"targets",renamedTo:"tasks"}));s.push({children:o.length>0?o:void 0,name:"taskDefaults",renamedTo:"scopedTasks"})}else if(Array.isArray(e.scopedTasks))for(const[t,o]of e.scopedTasks.entries())o&&typeof o=="object"&&(Object.hasOwn(o,"scope")&&s.push({location:`scopedTasks[${t}].scope`,name:"scope",renamedTo:"match"}),Object.hasOwn(o,"targets")&&s.push({location:`scopedTasks[${t}].targets`,name:"targets",renamedTo:"tasks"}));return s},N=e=>Object.hasOwn(e,"targets")&&!Object.hasOwn(e,"tasks")?[{name:"targets",renamedTo:"tasks"}]:[],F=(e,s,t)=>{if(!t||typeof t!="object")return;const o=I(t);if(o.length>0)throw new T(e,s,o)},L=(e,s,t)=>{if(!t||typeof t!="object")return;const o=N(t);if(o.length>0)throw new T(e,s,o)},d=e=>{if(e===null)return"null";if(Array.isArray(e))return"an array";if(typeof e=="object"){const s=Object.keys(e);return s.length>0?`an object with { ${s.join(", ")} }`:"an empty object"}return typeof e},k=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),q=e=>{const s=[];if(!Object.hasOwn(e,"scopedTasks")||e.scopedTasks===void 0)return s;const{scopedTasks:t}=e;if(!Array.isArray(t))return s.push({expected:"an array of `{ match?, tasks }` blocks",found:d(t),location:"scopedTasks"}),s;for(const[o,n]of t.entries()){const r=`scopedTasks[${o}]`;if(!k(n)){s.push({expected:"a `{ match?, tasks }` block",found:d(n),location:r});continue}k(n.tasks)||s.push({expected:"`tasks` to be an object keyed by target name",found:n.tasks===void 0?`a block with { ${Object.keys(n).join(", ")} }`:d(n.tasks),location:`${r}.tasks`}),n.match!==void 0&&!k(n.match)&&s.push({expected:"`match` to be an object of project constraints",found:d(n.match),location:`${r}.match`})}return s},K=(e,s,t)=>{if(!t||typeof t!="object")return;const o=q(t);if(o.length>0)throw new G(e,s,o)},v=["vis.config.ts","vis.config.mts","vis.config.cts","vis.config.js","vis.config.mjs","vis.config.cjs"],M=new Set(v),w=["vis.task.ts","vis.task.mts","vis.task.cts","vis.task.js","vis.task.mjs","vis.task.cjs"],P=new Set(w),oe=2880,m={blockExoticSubdeps:!0,policies:{installScripts:{strict:!0},publisherChange:{ignoreAfter:43200,mode:"no-downgrade"}}},U=e=>{if(!e)return{...m};const s=m.policies??{},t=e.policies??{},o={...s,...t};for(const n of Object.keys(s)){const r=s[n],i=t[n];r!==void 0&&i!==void 0&&(o[n]={...r,...i})}return{...m,...e,policies:o}},W=e=>({...e,security:U(e.security),update:{security:!0,target:"minor",...e.update}}),B=e=>{let s;try{s=g(e)}catch{return}const t=new Set(s.filter(o=>M.has(o)));for(const o of v)if(t.has(o))return l(e,o)},z=e=>{let s;try{s=g(e)}catch{return}const t=new Set(s.filter(o=>P.has(o)));for(const o of w)if(t.has(o))return l(e,o)},Y=e=>e===void 0?[]:Array.isArray(e)?e:[e],H=(e,s,t)=>{if(j(e))throw new p(e,[...t,s],["Absolute paths in `extends` are not supported. Use a relative path or an npm package name."]);const o=[];if(e.startsWith("./")||e.startsWith("../")){const n=S(s),r=l(n,e);if(o.push(r),b(r))return r;throw new p(e,[...t,s],o)}try{return E(s).resolve(e)}catch{throw o.push(`require.resolve("${e}") from ${s}`),new p(e,[...t,s],o)}},C=async(e,s)=>{let t;try{t=(await A(e)).default??{}}catch(o){throw new y(e,s,o)}try{return(typeof t=="function"?await t()??{}:t)??{}}catch(o){throw new y(e,s,o)}},J=(e,s)=>{const t={...e,...s};if(e.tasks||s.tasks){const o=new Set([...Object.keys(e.tasks??{}),...Object.keys(s.tasks??{})]),n={};for(const r of o)n[r]=R(e.tasks?.[r],s.tasks?.[r]);t.tasks=n}if((e.scopedTasks||s.scopedTasks)&&(t.scopedTasks=[...e.scopedTasks??[],...s.scopedTasks??[]]),(e.fileGroups||s.fileGroups)&&(t.fileGroups={...e.fileGroups,...s.fileGroups}),(e.taskGroups||s.taskGroups)&&(t.taskGroups={...e.taskGroups,...s.taskGroups}),e.security||s.security){const o=e.security?.policies??{},n=s.security?.policies??{},r={...o,...n};for(const i of Object.keys(o)){const a=o[i],u=n[i];a!==void 0&&u!==void 0&&(r[i]={...a,...u})}t.security={...e.security,...s.security,acceptedRisks:{...e.security?.acceptedRisks,...s.security?.acceptedRisks},policies:r}}return(e.update||s.update)&&(t.update={...e.update,...s.update}),(e.taskRunner||s.taskRunner)&&(t.taskRunner={...e.taskRunner,...s.taskRunner}),delete t.extends,t},$=async(e,s,t,o,n)=>{if(t.has(e))throw new V(e,s);if(!o.has(e)){t.add(e);try{const r=await C(e,s);F(e,s,r),K(e,s,r);const i=Y(r.extends);for(const a of i){const u=H(a,e,s);await $(u,[...s,e],t,o,n)}o.set(e,r),n.push(e)}finally{t.delete(e)}}},Q=async(e,s)=>{let t;if(s?.explicitConfigPath){const a=j(s.explicitConfigPath)?s.explicitConfigPath:l(e,s.explicitConfigPath);if(!b(a))throw new Error(`Cannot find config file at ${a}`);t=a}else t=B(e);if(!t)return{};const o=new Set,n=new Map,r=[];await $(t,[],o,n,r);let i={};for(const a of r)i=J(i,n.get(a));return i},ne=async(e,s)=>W(await Q(e,s)),re=async(e,s,t)=>{const o=z(s);if(!o)return;const n=await C(o,[]);return L(o,[],n),n},ie=e=>e,ae=e=>e;export{v as CONFIG_FILES,oe as DEFAULT_MIN_RELEASE_AGE_MINUTES,m as SECURITY_DEFAULTS,w as TASK_CONFIG_FILES,W as applyDefaults,ae as defineConfig,le as definePlugin,ie as defineTaskConfig,B as findVisConfigFile,z as findVisTaskConfigFile,Q as loadMergedVisConfig,ne as loadVisConfig,re as loadVisTaskConfig,ue as otelPlugin};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{F as f}from"../packem_shared/index.server-Ca_EEVfw.js";import{p as i}from"./cli-main.js";import{s as d}from"../packem_shared/scan-progress-
|
|
1
|
+
import{F as f}from"../packem_shared/index.server-Ca_EEVfw.js";import{p as i}from"./cli-main.js";import{s as d}from"../packem_shared/scan-progress-B6BSwS4F.js";import{D as p,s as D}from"../packem_shared/osv-bloom-DU6avR2k.js";const h=o=>o?.security?.audit?.advisories?.bloom??{},u=o=>o>=1e3?`${(o/1e3).toFixed(1)}s`:`${Math.round(o)}ms`,$=o=>o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`,b=async({options:o,visConfig:m,workspaceRoot:n})=>{if(!n)throw new Error("Could not determine workspace root. Run this command inside a workspace.");const a=o.format==="json",c=h(m),l=o.source??c.source??p,r=d([{id:"bloom",label:"Sync osv-bloom prefilter"}],{live:!a});let e,t;try{r.start("bloom");const s=Date.now();e=await D({allowedHosts:c.allowedHosts,cacheDir:o.cacheDir,force:!!o.force,source:l,workspaceRoot:n}),e.upToDate?r.finish("bloom","ok",`up to date · ${u(Date.now()-s)}`):r.finish("bloom","ok",`${e.manifest.entryCount.toLocaleString()} entries · ${$(e.bytesOnDisk)} · ${u(e.durationMs)}`)}catch(s){t=s instanceof Error?s.message:String(s),r.finish("bloom","error",t)}finally{r.stop()}a?process.stdout.write(`${JSON.stringify({bytesOnDisk:e?.bytesOnDisk??0,cacheDir:e?.cacheDir??null,durationMs:e?.durationMs??0,error:t??null,manifest:e?.manifest??null,source:l,upToDate:e?.upToDate??!1},void 0,2)}
|
|
2
2
|
`):e&&(i.info(f(`Cache: ${e.cacheDir}`)),i.info(f(`Built: ${e.manifest.builtAtRfc3339}`)),t||i.success(e.upToDate?"osv-bloom prefilter up to date.":"osv-bloom prefilter synced.")),t&&(process.exitCode=1)},g=b;export{g as advisoriesBloomSyncExecute};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as je}from"node:module";import{z as N,e as g,$ as _e,m as V}from"../packem_shared/index-0dnGN3GP.js";import{L as Re,q as X,u as oe,R as C,O as W,X as De,e as J,p as P,g as ce,F as I,f as Oe,G as ie,J as H,h as le,i as D}from"../packem_shared/registry-
|
|
1
|
+
import{createRequire as je}from"node:module";import{z as N,e as g,$ as _e,m as V}from"../packem_shared/index-0dnGN3GP.js";import{L as Re,q as X,u as oe,R as C,O as W,X as De,e as J,p as P,g as ce,F as I,f as Oe,G as ie,J as H,h as le,i as D}from"../packem_shared/registry-Dmy6zBD8.js";import{L as ue}from"../packem_shared/index-CIdjkZgt.js";import{y as h}from"../packem_shared/isAccessibleSync-DYKTrrvc-CBsMZhj-.js";import{U as A,h as O,e as Le,i as Me}from"../packem_shared/env-D0huQDyA.js";import{f as Ue}from"../packem_shared/removeSync-g1D5kONg-jOsRSIIv.js";import{p as b}from"../packem_shared/package-version-CtgyD_B1.js";import{g as pe,T as fe,l as Wt}from"../packem_shared/npmrc-CIvOb61L.js";import{p as cn}from"../packem_shared/npmrc-CIvOb61L.js";import{O as ge}from"../packem_shared/renderToString-DR0zDUjh-BeCb092p.js";import{q as We}from"../packem_shared/table-BT8EWIiz.js";import{f as Ie}from"../packem_shared/osv-BTClyx8h.js";import{a as Be}from"../packem_shared/index--eV4qIz5.js";import{a as Z}from"../packem_shared/advisories-Wk-RI-Lt.js";let Ce;const Ae=t=>(Ce??=je(import.meta.url))(t),j=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,xe=t=>{if(typeof j<"u"&&j.versions&&j.versions.node){const[e,n]=j.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return j.getBuiltinModule(t)}return Ae(t)},{createInterface:Fe}=xe("node:readline"),G=["dependencies","devDependencies","optionalDependencies"],Ge=new Set([...G,"overrides","peerDependencies","pnpm.overrides","resolutions"]),x=t=>{const e=t.lastIndexOf(":");if(e===-1)return;const n=t.slice(e+1);if(Ge.has(n))return{depType:n,relativePath:t.slice(0,e)}},L=t=>{const e=ue("vis",{create:!0,cwd:t});if(!e)throw new Error("Cannot resolve cache directory. Ensure node_modules exists in your workspace. Run your package manager's install command first.");return g(e,"backup")},Y=(t,e)=>e==="bun"?g(t,"package.json"):g(t,"pnpm-workspace.yaml"),K=(t,e)=>{const n=L(t),s=new Set;for(const a of e){const r=x(a.catalogName);r&&s.add(r.relativePath==="."?"package.json":g(r.relativePath,"package.json"))}if(s.size!==0){O(n);for(const a of s){const r=g(t,a);if(h(r)){const o=g(n,a),c=V(o);O(c),A(o,N(r))}}return n}},q=(t,e)=>{const n=Y(t,e),s=L(t);return g(s,`${_e(n)}.bak`)},Ve=(t,e,n)=>{if((e==="npm"||e==="yarn")&&n)return K(t,n);let s;const a=Y(t,e);if(h(a)&&(s=q(t,e),O(V(s)),A(s,N(a))),n){const r=n.filter(o=>x(o.catalogName));r.length>0&&K(t,r)}return s},Xe=t=>{const e=L(t);if(!h(e))return!1;for(const n of Re(e,{includeDirs:!1})){const s=n.path.slice(e.length+1),a=g(t,s);A(a,N(n.path))}return Ue(e),!0},Xt=(t,e)=>{if(e==="npm"||e==="yarn")return Xe(t);const n=Y(t,e),s=q(t,e);if(!h(s))return!1;const a=N(s);return A(n,a),!0},Jt=(t,e)=>{if(e==="npm"||e==="yarn")try{const n=L(t);return h(n)}catch{return!1}try{return h(q(t,e))}catch{return!1}},de=t=>{if(h(t))try{return b(t)}catch{return}},Je=t=>{const e=de(g(t,"package.json"));return!!(e?.workspaces?.catalog||e?.workspaces?.catalogs)},He=t=>{const e=new Map;if(t.workspaces?.catalog&&typeof t.workspaces.catalog=="object"&&e.set("default",new Map(Object.entries(t.workspaces.catalog))),t.workspaces?.catalogs&&typeof t.workspaces.catalogs=="object")for(const[n,s]of Object.entries(t.workspaces.catalogs))s&&typeof s=="object"&&e.set(n,new Map(Object.entries(s)));return e},Ye=t=>{const e=de(g(t,"package.json"));return e?He(e):new Map},qe=(t,e,n)=>{const s=g(t,"package.json"),a=b(s);for(const r of e)if(r.catalogName==="default")a.workspaces?.catalog&&(a.workspaces.catalog[r.packageName]=r.newRange);else{const o=a.workspaces?.catalogs?.[r.catalogName];o&&(o[r.packageName]=r.newRange)}X(s,a,{indent:oe(s,{useEditorconfig:n}),overwrite:!0})},ze=/\*+/g,Qe=/[.+^${}()|[\]\\]/g,ee=new Map,E=(t,e)=>{let n=ee.get(e);if(!n){const a=e.replaceAll(ze,"*").replaceAll(Qe,String.raw`\$&`);n=new RegExp(`^${a.replaceAll("*",".*").replaceAll("?",".")}$`),ee.set(e,n)}return n.test(t)},me=(t,e,n)=>n.some(s=>E(t,s))?!1:e.length>0?e.some(s=>E(t,s)):!0,te=new Map,he=(t,e,n)=>{if(!n)return e;const s=n[t];if(s!==void 0)return s;for(const[a,r]of Object.entries(n))if(a!==t){if(a.startsWith("/")&&a.endsWith("/")){let o=te.get(a);if(o||(o=new RegExp(a.slice(1,-1)),te.set(a,o)),o.test(t))return r}else if(E(t,a))return r}return e},Ze=/^(?:'([^']+)'|"([^"]+)"|([^:\s]+)):\s*(?:'([^']+)'|"([^"]+)"|(\S+))/,Ke=/^catalog:/m,et=/^catalogs:/m,ke=/^['"]|['"]$/g,we=t=>{const e=Ze.exec(t);if(!e)return;const n=e[1]??e[2]??e[3],s=e[4]??e[5]??e[6];if(!(!n||!s))return[n,s]},ye=(t,e,n,s)=>{t.has(e)||t.set(e,new Map);const a=t.get(e);a&&a.set(n,s)},tt=(t,e,n)=>{if(n<2)return;const s=we(e);s&&ye(t,"default",s[0],s[1])},nt=(t,e,n,s)=>{if(n===2&&e.endsWith(":"))return e.slice(0,-1).trim().replaceAll(ke,"");if(n>=4&&s){const a=we(e);a&&ye(t,s,a[0],a[1])}return s},$e=t=>t==="catalog:"||t.startsWith("catalog:")?"catalog":t==="catalogs:"||t.startsWith("catalogs:")?"catalogs":"none",st=t=>{const e=new Map;let n="none",s="";for(const a of t.split(`
|
|
2
2
|
`)){const r=a.trimStart(),o=a.length-r.length;if(o===0&&r.length>0&&!r.startsWith("#")){n=$e(r),n==="catalogs"&&(s="");continue}r.length===0||r.startsWith("#")||(n==="catalog"&&tt(e,r,o),n==="catalogs"&&(s=nt(e,r,o,s)))}return e},at=t=>{const e=g(t,"pnpm-workspace.yaml");if(!h(e))return!1;const n=N(e);return Ke.test(n)||et.test(n)},rt=t=>{const e=g(t,"pnpm-workspace.yaml");if(!h(e))return new Map;const n=N(e);return st(n)},ne=/[.*+?^${}()|[\]\\]/g,ot=(t,e)=>{const n=t.replaceAll(ne,String.raw`\$&`),s=e.replaceAll(ne,String.raw`\$&`);return new RegExp(String.raw`^(?:'${n}'|"${n}"|${n}):\s*['"]?${s}['"]?`)},ct=(t,e,n)=>ot(e,n).test(t),it=t=>{const e=new Map;for(const n of t){e.has(n.catalogName)||e.set(n.catalogName,new Map);const s=e.get(n.catalogName);s&&s.set(n.packageName,{newRange:n.newRange,oldRange:n.currentRange})}return e},se=(t,e,n)=>{if(!n)return t;for(const[s,{newRange:a,oldRange:r}]of n)if(ct(e,s,r))return t.replace(r,a);return t},lt=(t,e,n,s)=>{const a=t.trimStart(),r=t.length-a.length;return a.length===0||a.startsWith("#")?t:e==="catalog"&&r>=2?se(t,a,s.get("default")):e==="catalogs"&&r>=4&&n?se(t,a,s.get(n)):t},ut=(t,e)=>{const n=g(t,"pnpm-workspace.yaml"),a=N(n).split(`
|
|
3
3
|
`),r=it(e);let o="none",c="";const i=[];for(const l of a){const u=l.trimStart(),p=l.length-u.length;p===0&&u.length>0&&!u.startsWith("#")&&(o=$e(u),o==="catalogs"&&(c="")),o==="catalogs"&&p===2&&u.endsWith(":")&&(c=u.slice(0,-1).trim().replaceAll(ke,"")),i.push(lt(l,o,c,r))}A(n,i.join(`
|
|
4
4
|
`))},pt=/github\.com[/:]([\w.-]+)\/([\w.-]+?)(?:\.git|\/|$)/,Ht=async(t,e=1e4,n)=>{const s=[],a=new AbortController,r=setTimeout(()=>{a.abort()},e),o=async u=>{const p=`https://www.npmjs.com/package/${u.packageName}`;try{const f=n?pe(u.packageName,n):{url:"https://registry.npmjs.org"},w=f.url.replace(fe,""),y={Accept:"application/json"};f.token&&(y.Authorization=`Bearer ${f.token}`);const m=await fetch(`${w}/${u.packageName}/latest`,{headers:y,signal:a.signal});if(!m.ok)return{npmUrl:p,packageName:u.packageName};const $=(await m.json()).repository?.url;if(!$)return{npmUrl:p,packageName:u.packageName};const d=pt.exec($);if(!d)return{npmUrl:p,packageName:u.packageName,repoUrl:$};const v=d[1],T=d[2],k=`https://github.com/${v}/${T}/releases/tag/v${u.targetVersion}`;return{npmUrl:p,packageName:u.packageName,releaseUrl:k,repoUrl:`https://github.com/${v}/${T}`}}catch{return{npmUrl:p,packageName:u.packageName}}},c=Math.min(8,t.length);let i=0;const l=async()=>{for(;i<t.length;){const u=i;i+=1,s[u]=await o(t[u])}};try{await Promise.all(Array.from({length:c},()=>l()))}finally{clearTimeout(r)}return s},Yt=t=>JSON.stringify(t,void 0,2),qt=t=>t.map(e=>`${e.packageName} ${e.currentRange} → ${e.newRange}`).join(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r,x as o,d as i,r as n,i as s}from"../packem_shared/vis-user-error-
|
|
1
|
+
import{a as r,x as o,d as i,r as n,i as s}from"../packem_shared/vis-user-error-DNF243LB.js";import{e as t}from"../packem_shared/index-B3tiV1iu.js";import{g as d}from"../packem_shared/package-version-CtgyD_B1.js";const g=async()=>{const e=r("vis",{packageName:"vis",packageVersion:d()}),a=process.argv.includes("--debug")||!!process.env.DEBUG;e.addPlugin(o({concise:s,detailed:a,exitOnError:!1})),e.addGlobalOption({description:"Target JS runtime: node (default) or bun. Overrides VIS_RUNTIME; falls back to lockfile detection.",name:"runtime",type:String}),e.addCommand(t),e.addCommand(i),await n(e)};export{g as runExecCli};
|