@visulima/vis 6.5.4 → 6.6.1
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 +12 -0
- package/bin/vis.mjs +5 -1
- package/dist/bin.js +1 -1
- package/dist/binx.js +1 -1
- package/dist/config/index.d.ts +17 -2
- 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 +182 -151
- 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/handler22.js +2 -2
- 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 +2 -2
- 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 +3 -3
- 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 +2 -2
- package/dist/packem_chunks/handler62.js +1 -1
- package/dist/packem_chunks/handler63.js +1 -1
- package/dist/packem_chunks/handler64.js +5 -5
- package/dist/packem_chunks/handler65.js +3 -3
- package/dist/packem_chunks/handler66.js +3 -3
- 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 +15 -15
- package/dist/packem_chunks/handler76.js +1 -1
- package/dist/packem_chunks/handler77.js +10 -10
- package/dist/packem_chunks/handler78.js +2 -2
- 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/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/verify-lockfile.js +1 -1
- package/dist/packem_shared/{advisories-CIk-GN4f.js → advisories-C803XIyf.js} +1 -1
- package/dist/packem_shared/{affected-selection-KJi4PXE2.js → affected-selection-N_hH7E2F.js} +1 -1
- package/dist/packem_shared/{ai-analysis-DsN-OIWD.js → ai-analysis-Cl0z4yyY.js} +1 -1
- package/dist/packem_shared/{ai-cache-oP-8Vvho.js → ai-cache-62Q75Ohc.js} +1 -1
- package/dist/packem_shared/{ai-fix-BpRmbHRB.js → ai-fix-B5o7o8D0.js} +1 -1
- package/dist/packem_shared/{bin-C6pXyVPL.js → bin-Dg4DTW2J.js} +1 -1
- package/dist/packem_shared/{build-scripts-AqY7IQy0.js → build-scripts-DXEaKPbM.js} +1 -1
- package/dist/packem_shared/{dependency-scan-Blpo9KJB.js → dependency-scan-DRigy-Ce.js} +1 -1
- package/dist/packem_shared/{detect-DLTcax9j.js → detect-Cy4J0ZzQ.js} +1 -1
- package/dist/packem_shared/{docker-IMan-ReQ.js → docker-eH4IgLNI.js} +1 -1
- package/dist/packem_shared/{ecosystem-gate-DYE1xbEA.js → ecosystem-gate-Bn-P4Yqx.js} +1 -1
- package/dist/packem_shared/{env-B-rXCpnL.js → env-B_MqQz0I.js} +1 -1
- package/dist/packem_shared/{env-consistency-LGwaZrb4.js → env-consistency-C-gPg1z7.js} +1 -1
- package/dist/packem_shared/{failure-log-CqOSmCst.js → failure-log-TINPmB_Y.js} +1 -1
- package/dist/packem_shared/glob-Cyk1H9ZL-BcU6BdWa.js +1 -0
- package/dist/packem_shared/{index-Zn2hE0HC.js → index-DUGTZGN1.js} +1 -1
- package/dist/packem_shared/{index-xHwdLedQ.js → index-DV9plm6F.js} +1 -1
- package/dist/packem_shared/{lifecycle-7cCIImyz.js → lifecycle-C2j-_yjz.js} +1 -1
- package/dist/packem_shared/{manifests-Cv-l6E7h.js → manifests-Dxq09rdz.js} +1 -1
- package/dist/packem_shared/{min-release-age-CZ3XkoSx.js → min-release-age-lSu9fMQU.js} +1 -1
- package/dist/packem_shared/{missing-package-json-KsrtjpfC.js → missing-package-json-DX1OyAgd.js} +1 -1
- package/dist/packem_shared/{multi-eco-lockfiles-BUNeBCB3.js → multi-eco-lockfiles-BBdBBERS.js} +1 -1
- package/dist/packem_shared/{native-config-sync-BpOioKS7.js → native-config-sync-CDV3izkE.js} +1 -1
- package/dist/packem_shared/{osv-BrN069IK.js → osv-zlqqFEue.js} +1 -1
- package/dist/packem_shared/{package-version-Ba3NbtCc.js → package-version-ilIDuvbM.js} +1 -1
- package/dist/packem_shared/{packument-D7knSKP-.js → packument-DgfV5ebL.js} +1 -1
- package/dist/packem_shared/{project-name-filter-B5MeWa0B.js → project-name-filter-Bav_usE5.js} +1 -1
- package/dist/packem_shared/{provenance-BhdcS8on.js → provenance-iyO7oSbr.js} +1 -1
- package/dist/packem_shared/{registry-Bd3v810N.js → registry-DiFjkq9L.js} +41 -41
- package/dist/packem_shared/{registry-keys-ChCCi6gS.js → registry-keys-PoCGGEQU.js} +1 -1
- package/dist/packem_shared/{renderToString-DR0zDUjh-bM18Jav2.js → renderToString-DR0zDUjh-DIy97Cvo.js} +1 -1
- package/dist/packem_shared/{resolve-explicit-CR284YhP.js → resolve-explicit-BxXTTACy.js} +1 -1
- package/dist/packem_shared/{run-summary-utils-CnHppdTd.js → run-summary-utils-CWtpwjB-.js} +1 -1
- package/dist/packem_shared/{runtime-check-ra6RgZPE.js → runtime-check-B2_65Qxg.js} +1 -1
- package/dist/packem_shared/{s1ngularity-D16SlxEN.js → s1ngularity-2ULYV9dv.js} +1 -1
- package/dist/packem_shared/{scaffold-files-U8MRP9xv.js → scaffold-files-ljwdtNix.js} +1 -1
- package/dist/packem_shared/{scan-progress-DXLRdiC0.js → scan-progress-Bg2J2LtK.js} +1 -1
- package/dist/packem_shared/{selectors-D66zhaRy.js → selectors-CZt_FK38.js} +1 -1
- package/dist/packem_shared/{signatures-Cpzgkrts.js → signatures-wQxWdScn.js} +1 -1
- package/dist/packem_shared/{spinner-rjP357lg.js → spinner-DqhHeEEh.js} +1 -1
- package/dist/packem_shared/{table-WHMzV10O.js → table-DWrn2wa0.js} +1 -1
- package/dist/packem_shared/{tabs-Zg0TBeDz.js → tabs-CPZha41U.js} +1 -1
- package/dist/packem_shared/{toolchain-BT5Wf134.js → toolchain-B7MSc6S4.js} +1 -1
- package/dist/packem_shared/{typosquats-D23HsChp.js → typosquats-CCM8oyg7.js} +1 -1
- package/dist/packem_shared/{use-measured-height-C074njW2.js → use-measured-height-Zz5Edg6J.js} +1 -1
- package/dist/packem_shared/{vis-update-app-aXnF7iVf.js → vis-update-app-CouPhMGg.js} +1 -1
- package/dist/packem_shared/{vis-user-error-CyyTUwX4.js → vis-user-error-Ceb7hJQW.js} +1 -1
- package/dist/packem_shared/{watch-loop--dOgMJ2f.js → watch-loop-CY-QsO2E.js} +1 -1
- package/index.d.ts +213 -204
- package/index.js +231 -104
- package/package.json +9 -9
- package/schemas/project.schema.json +9 -2
- package/schemas/vis-config.schema.json +11 -4
- package/schemas/vis-release-config.schema.json +2 -2
- package/dist/packem_shared/glob-Cyk1H9ZL-D05BMypC.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## @visulima/vis [6.6.1](https://github.com/visulima/vis/compare/@visulima/vis@6.6.0...@visulima/vis@6.6.1) (2026-11-17)
|
|
2
|
+
|
|
3
|
+
### Performance Improvements
|
|
4
|
+
|
|
5
|
+
* **vis:** run git hooks through the native binary ([#100](https://github.com/visulima/vis/issues/100)) ([9036a34](https://github.com/visulima/vis/commit/9036a343c8d5470217bc2fd76939cedb1da46807))
|
|
6
|
+
|
|
7
|
+
## @visulima/vis [6.6.0](https://github.com/visulima/vis/compare/@visulima/vis@6.5.4...@visulima/vis@6.6.0) (2026-11-04)
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **vis:** staged dependsOn and root script forwarding ([#92](https://github.com/visulima/vis/issues/92)) ([8627e61](https://github.com/visulima/vis/commit/8627e6193bb7feb9dc659d788e690805d0715a95))
|
|
12
|
+
|
|
1
13
|
## @visulima/vis [6.5.4](https://github.com/visulima/vis/compare/@visulima/vis@6.5.3...@visulima/vis@6.5.4) (2026-11-04)
|
|
2
14
|
|
|
3
15
|
### Bug Fixes
|
package/bin/vis.mjs
CHANGED
|
@@ -39,7 +39,11 @@ const NATIVE_COMMANDS = new Set(["--version", "-V", "__native-info", "__pm-shim"
|
|
|
39
39
|
|
|
40
40
|
const command = process.argv[2] ?? "";
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
// `hook run` is native too, but the other `hook` subcommands (install, migrate, …)
|
|
43
|
+
// are not: sending those through the binary would only add a second Node boot.
|
|
44
|
+
const isNativeCommand = NATIVE_COMMANDS.has(command) || (command === "hook" && process.argv[3] === "run");
|
|
45
|
+
|
|
46
|
+
if (isNativeCommand) {
|
|
43
47
|
const binary = resolveNativeBinary(packageRoot);
|
|
44
48
|
|
|
45
49
|
if (binary !== undefined) {
|
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-Dg4DTW2J.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-Ceb7hJQW.js";import{t as n}from"./packem_shared/compile-cache-DoMHRsRZ.js";import{g as o}from"./packem_shared/package-version-ilIDuvbM.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);
|
package/dist/config/index.d.ts
CHANGED
|
@@ -56,6 +56,13 @@ interface CustomTask {
|
|
|
56
56
|
* root, or absolute) and passes the matched files as absolute paths so
|
|
57
57
|
* they resolve regardless of where the command runs. Ignored when
|
|
58
58
|
* `perPackage` is set — that derives the cwd per package instead.
|
|
59
|
+
* - `dependsOn: ["^build"]` runs `build` for the dependencies of every
|
|
60
|
+
* workspace package that owns a matched file, before any staged command
|
|
61
|
+
* starts. Type-aware linters read workspace imports from each
|
|
62
|
+
* dependency's built declarations, so an unbuilt dependency turns its
|
|
63
|
+
* types into `any`. Entries share one `vis run … --if-present` call per
|
|
64
|
+
* target, run before anything else: a build running beside another
|
|
65
|
+
* build, or beside a lint, would race a tool that cleans `dist/` on start.
|
|
59
66
|
*
|
|
60
67
|
* A command task is distinguished from {@link CustomTask} by carrying a
|
|
61
68
|
* `command` string and no `task` function.
|
|
@@ -63,6 +70,8 @@ interface CustomTask {
|
|
|
63
70
|
interface CommandTask {
|
|
64
71
|
readonly command: string;
|
|
65
72
|
readonly cwd?: string;
|
|
73
|
+
/** Dependency targets such as `"^build"`; only the `^` form is supported. */
|
|
74
|
+
readonly dependsOn?: ReadonlyArray<string>;
|
|
66
75
|
readonly perPackage?: boolean;
|
|
67
76
|
}
|
|
68
77
|
/**
|
|
@@ -866,8 +875,13 @@ interface ProjectJson {
|
|
|
866
875
|
stack?: "backend" | "data" | "frontend" | "infrastructure" | "systems";
|
|
867
876
|
/** Filterable tags. */
|
|
868
877
|
tags?: string[];
|
|
869
|
-
/**
|
|
870
|
-
|
|
878
|
+
/**
|
|
879
|
+
* Vis-style target definitions (merged on top of package.json scripts).
|
|
880
|
+
* `null` removes a target the project would otherwise get from a
|
|
881
|
+
* `package.json` script, a workspace task default, or target inference —
|
|
882
|
+
* e.g. a root convenience script that only forwards to another project.
|
|
883
|
+
*/
|
|
884
|
+
targets?: Record<string, VisTargetConfiguration | null>;
|
|
871
885
|
}
|
|
872
886
|
/**
|
|
873
887
|
* A single scoped-tasks block — a set of task defaults gated by an
|
|
@@ -2706,6 +2720,7 @@ interface VisConfig {
|
|
|
2706
2720
|
* - Sync/async functions returning `string | string[]`
|
|
2707
2721
|
* - `{ title, task }` objects for named side-effect tasks
|
|
2708
2722
|
* - `{ command, perPackage }` to run a command once per owning workspace package (cwd = that package dir), and `{ command, cwd }` to pin a command to a fixed directory
|
|
2723
|
+
* - `{ command, dependsOn: ["^build"] }` to build the owning packages' dependencies before any staged command starts
|
|
2709
2724
|
* - Mixed arrays of strings and functions
|
|
2710
2725
|
* - A top-level generate-task function
|
|
2711
2726
|
*/
|
|
@@ -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-Bg2J2LtK.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-DiFjkq9L.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-B_MqQz0I.js";import{f as Ue}from"../packem_shared/removeSync-g1D5kONg-jOsRSIIv.js";import{p as b}from"../packem_shared/package-version-ilIDuvbM.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-DIy97Cvo.js";import{q as We}from"../packem_shared/table-DWrn2wa0.js";import{f as Ie}from"../packem_shared/osv-zlqqFEue.js";import{a as Be}from"../packem_shared/index--eV4qIz5.js";import{a as Z}from"../packem_shared/advisories-C803XIyf.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-Ceb7hJQW.js";import{e as t}from"../packem_shared/index-DUGTZGN1.js";import{g as d}from"../packem_shared/package-version-ilIDuvbM.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};
|