@visulima/vis 1.0.5 → 1.0.7

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.
Files changed (149) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/bin.js +1 -1
  3. package/dist/binx.js +2 -2
  4. package/dist/packem_chunks/CONFIG_FILES.js +1 -1
  5. package/dist/packem_chunks/bloom-status.js +1 -1
  6. package/dist/packem_chunks/bloom-sync.js +1 -1
  7. package/dist/packem_chunks/catalog.js +52 -52
  8. package/dist/packem_chunks/cli-exec.js +1 -1
  9. package/dist/packem_chunks/cli-main.js +216 -217
  10. package/dist/packem_chunks/dispatch.js +1 -1
  11. package/dist/packem_chunks/doctor-probe.js +1 -1
  12. package/dist/packem_chunks/fix.js +1 -1
  13. package/dist/packem_chunks/group-tags.js +1 -1
  14. package/dist/packem_chunks/handler.js +1 -1
  15. package/dist/packem_chunks/handler10.js +1 -1
  16. package/dist/packem_chunks/handler11.js +1 -1
  17. package/dist/packem_chunks/handler12.js +1 -1
  18. package/dist/packem_chunks/handler13.js +1 -1
  19. package/dist/packem_chunks/handler14.js +1 -1
  20. package/dist/packem_chunks/handler15.js +1 -1
  21. package/dist/packem_chunks/handler16.js +1 -1
  22. package/dist/packem_chunks/handler17.js +1 -1
  23. package/dist/packem_chunks/handler18.js +1 -1
  24. package/dist/packem_chunks/handler19.js +1 -1
  25. package/dist/packem_chunks/handler2.js +1 -1
  26. package/dist/packem_chunks/handler20.js +1 -1
  27. package/dist/packem_chunks/handler21.js +1 -1
  28. package/dist/packem_chunks/handler22.js +1 -1
  29. package/dist/packem_chunks/handler23.js +1 -1
  30. package/dist/packem_chunks/handler24.js +1 -1
  31. package/dist/packem_chunks/handler26.js +1 -1
  32. package/dist/packem_chunks/handler27.js +1 -1
  33. package/dist/packem_chunks/handler28.js +3 -3
  34. package/dist/packem_chunks/handler29.js +1 -1
  35. package/dist/packem_chunks/handler3.js +1 -1
  36. package/dist/packem_chunks/handler30.js +1 -1
  37. package/dist/packem_chunks/handler4.js +1 -1
  38. package/dist/packem_chunks/handler5.js +1 -1
  39. package/dist/packem_chunks/handler50.js +2 -2
  40. package/dist/packem_chunks/handler51.js +1 -1
  41. package/dist/packem_chunks/handler53.js +1 -1
  42. package/dist/packem_chunks/handler54.js +1 -1
  43. package/dist/packem_chunks/handler55.js +1 -1
  44. package/dist/packem_chunks/handler58.js +4 -4
  45. package/dist/packem_chunks/handler59.js +1 -1
  46. package/dist/packem_chunks/handler6.js +7 -7
  47. package/dist/packem_chunks/handler60.js +2 -2
  48. package/dist/packem_chunks/handler61.js +1 -1
  49. package/dist/packem_chunks/handler62.js +2 -2
  50. package/dist/packem_chunks/handler63.js +3 -3
  51. package/dist/packem_chunks/handler64.js +3 -3
  52. package/dist/packem_chunks/handler66.js +1 -1
  53. package/dist/packem_chunks/handler67.js +13 -13
  54. package/dist/packem_chunks/handler68.js +4 -4
  55. package/dist/packem_chunks/handler69.js +1 -1
  56. package/dist/packem_chunks/handler7.js +1 -1
  57. package/dist/packem_chunks/handler70.js +4 -4
  58. package/dist/packem_chunks/handler71.js +1 -1
  59. package/dist/packem_chunks/handler72.js +14 -14
  60. package/dist/packem_chunks/handler73.js +1 -1
  61. package/dist/packem_chunks/handler74.js +12 -12
  62. package/dist/packem_chunks/handler75.js +1 -1
  63. package/dist/packem_chunks/handler76.js +1 -1
  64. package/dist/packem_chunks/handler77.js +21 -21
  65. package/dist/packem_chunks/handler78.js +1 -1
  66. package/dist/packem_chunks/handler8.js +1 -1
  67. package/dist/packem_chunks/handler9.js +1 -1
  68. package/dist/packem_chunks/heal-accept.js +1 -1
  69. package/dist/packem_chunks/heal.js +1 -1
  70. package/dist/packem_chunks/help-command.js +17 -17
  71. package/dist/packem_chunks/index3.js +2 -2
  72. package/dist/packem_chunks/keys-refresh.js +1 -1
  73. package/dist/packem_chunks/lean.js +1 -1
  74. package/dist/packem_chunks/list.js +1 -1
  75. package/dist/packem_chunks/loader.js +1 -1
  76. package/dist/packem_chunks/orchestrator.js +1 -1
  77. package/dist/packem_chunks/prompts.js +1 -1
  78. package/dist/packem_chunks/status.js +1 -1
  79. package/dist/packem_chunks/sync.js +1 -1
  80. package/dist/packem_chunks/sync2.js +1 -1
  81. package/dist/packem_chunks/tripwire.js +1 -1
  82. package/dist/packem_chunks/ts-loader.js +9 -22
  83. package/dist/packem_chunks/verify-lockfile.js +2 -2
  84. package/dist/packem_chunks/version-resolver.js +1 -1
  85. package/dist/packem_shared/{affected-shas-BfO3PDJq.js → affected-shas-DkrQVQla.js} +1 -1
  86. package/dist/packem_shared/{ai-analysis-CO7No4rt.js → ai-analysis-DWBi9tSU.js} +3 -3
  87. package/dist/packem_shared/{ai-fix-B4u2zlVG.js → ai-fix-BocGeQu4.js} +1 -1
  88. package/dist/packem_shared/{augment-8z86AwtF.js → augment-BIUGEy1Q.js} +1 -1
  89. package/dist/packem_shared/bin-BZ_m_tag.js +1 -0
  90. package/dist/packem_shared/{build-scripts-D477Ou-x.js → build-scripts-CpTeQE1L.js} +1 -1
  91. package/dist/packem_shared/clean-DWjQl14S.js +1 -0
  92. package/dist/packem_shared/{command-runtime-EWjmSxPj.js → command-runtime-Buz4F5LM.js} +1 -1
  93. package/dist/packem_shared/{cyclonedx-CDWHbD9s.js → cyclonedx-DFlz2HRz.js} +1 -1
  94. package/dist/packem_shared/dependency-scan-173U3WXB.js +1 -0
  95. package/dist/packem_shared/{docker-CD7o1D1o.js → docker-B2h5KRZH.js} +41 -41
  96. package/dist/packem_shared/{env-Cpxa_7UE.js → en-BRcjb70R.js} +11 -11
  97. package/dist/packem_shared/failure-log-C3c5AVfc.js +2 -0
  98. package/dist/packem_shared/glob-DMbPwGSj-DFkUYBco.js +1 -0
  99. package/dist/packem_shared/index-BAe6e0XE.js +1 -0
  100. package/dist/packem_shared/{index-CdTXvj-V.js → index-BtbefKtY.js} +1 -1
  101. package/dist/packem_shared/index-D75r1yKp.js +35 -0
  102. package/dist/packem_shared/{index-DrIMyJSY.js → index-ZfYDID5E.js} +3 -3
  103. package/dist/packem_shared/{index.server-J83sowC4.js → index.server-qvZ-cy29.js} +2 -2
  104. package/dist/packem_shared/{lifecycle-hzwghh5a.js → lifecycle-CG0Ccu4h.js} +1 -1
  105. package/dist/packem_shared/{lockfile-CWcVTdRc.js → lockfile-D_JiWcwS.js} +1 -1
  106. package/dist/packem_shared/{manifests-CaPqgQxW.js → manifests-mFrrpzXW.js} +1 -1
  107. package/dist/packem_shared/{min-release-age-skpcnlpk.js → min-release-age-Cdh1dLz1.js} +1 -1
  108. package/dist/packem_shared/{missing-package-json-_hOp4AW5.js → missing-package-json-sYPP3cm-.js} +1 -1
  109. package/dist/packem_shared/{native-config-sync-CFi1iQNG.js → native-config-sync-DW8549FX.js} +2 -2
  110. package/dist/packem_shared/package-version-DBJLduJL.js +4 -0
  111. package/dist/packem_shared/packument-BFekEvwn.js +1 -0
  112. package/dist/packem_shared/{pm-runner-mVFjedM6.js → pm-runner-D5NWL8yv.js} +1 -1
  113. package/dist/packem_shared/{provenance-CI_WQx7G.js → provenance-ByHgofYo.js} +1 -1
  114. package/dist/packem_shared/{readJsonSync-DuMMeB3s-Cx08VBQg.js → readJsonSync-DuMMeB3s-wlhgSHes.js} +1 -1
  115. package/dist/packem_shared/registry-keys-BCD7Ir8g.js +1 -0
  116. package/dist/packem_shared/{resolve-explicit-DVE9cfkm.js → resolve-explicit-CnEsy-zC.js} +1 -1
  117. package/dist/packem_shared/{resolve-runtime-CGHf-wHz.js → resolve-runtime-Z2n59SEd.js} +1 -1
  118. package/dist/packem_shared/{run-file-Bs_E9O6O.js → run-file-u9hMNu8K.js} +1 -1
  119. package/dist/packem_shared/{runtime-check-pS2XH4BO.js → runtime-check-B1OF152E.js} +1 -1
  120. package/dist/packem_shared/s1ngularity-DkNDQiKU.js +1 -0
  121. package/dist/packem_shared/scan-progress-CHdHWhVw.js +2 -0
  122. package/dist/packem_shared/{selectors-CRgS4bU9.js → selectors-DiZWa7R4.js} +1 -1
  123. package/dist/packem_shared/{signatures-Dp3th1DB.js → signatures-kvrwi3Un.js} +1 -1
  124. package/dist/packem_shared/{target-options-TM6ETDAS.js → target-options-BJIDkfDf.js} +1 -1
  125. package/dist/packem_shared/{toolchain-B5KwUZfq.js → toolchain-CAbopPwK.js} +1 -1
  126. package/dist/packem_shared/{typosquats-C0layQsP.js → typosquats-DWB80Gyv.js} +1 -1
  127. package/dist/packem_shared/use-measured-height-C4jA0yNy.js +1 -0
  128. package/dist/packem_shared/verify-BajubByH.js +1 -0
  129. package/dist/packem_shared/vis-update-app-M3dw6XRC.js +1 -0
  130. package/dist/packem_shared/{watch-BnE1TzYn.js → watch-B8WT65yN.js} +1 -1
  131. package/dist/packem_shared/{watch-loop-Irf3Pm-1.js → watch-loop-CZazUnGB.js} +1 -1
  132. package/dist/runtime/preload.js +1 -1
  133. package/index.d.ts +204 -204
  134. package/index.js +52 -52
  135. package/package.json +37 -37
  136. package/dist/packem_shared/bin-Cv8vsMEo.js +0 -1
  137. package/dist/packem_shared/dependency-scan-P52jY0pU.js +0 -1
  138. package/dist/packem_shared/failure-log-MOhz-TBv.js +0 -2
  139. package/dist/packem_shared/glob-DMbPwGSj-uzODoE-1.js +0 -1
  140. package/dist/packem_shared/index-BAUIIRZJ.js +0 -1
  141. package/dist/packem_shared/index-BVuCxe14.js +0 -22
  142. package/dist/packem_shared/packument-CYxvm590.js +0 -1
  143. package/dist/packem_shared/registry-keys-AGlSEY6R.js +0 -1
  144. package/dist/packem_shared/runtime-process-Dmz0vCJy-DUwTvH1J.js +0 -1
  145. package/dist/packem_shared/s1ngularity-xmrq5T5r.js +0 -1
  146. package/dist/packem_shared/scan-progress-DQ4TMXcb.js +0 -2
  147. package/dist/packem_shared/use-measured-height-Drobr4fe.js +0 -1
  148. package/dist/packem_shared/verify-Cjo4EBFZ.js +0 -1
  149. package/dist/packem_shared/vis-update-app-qIkyvrd1.js +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,27 @@
1
+ ## @visulima/vis [1.0.7](https://github.com/visulima/visulima/compare/%40visulima%2Fvis%401.0.6...%40visulima%2Fvis%401.0.7) (2026-07-26)
2
+
3
+
4
+ ### Dependencies
5
+
6
+ * **@visulima/tui:** upgraded to 1.0.7
7
+ * **@visulima/cerebro:** upgraded to 3.0.2
8
+ * **@visulima/colorize:** upgraded to 2.0.1
9
+ * **@visulima/fs:** upgraded to 5.0.7
10
+ * **@visulima/package:** upgraded to 5.0.7
11
+ * **@visulima/pail:** upgraded to 4.0.1
12
+ * **@visulima/tsconfig:** upgraded to 3.2.2
13
+
14
+ ## @visulima/vis [1.0.6](https://github.com/visulima/visulima/compare/%40visulima%2Fvis%401.0.5...%40visulima%2Fvis%401.0.6) (2026-07-26)
15
+
16
+
17
+ ### Dependencies
18
+
19
+ * **@visulima/tui:** upgraded to 1.0.6
20
+ * **@visulima/cerebro:** upgraded to 3.0.1
21
+ * **@visulima/fs:** upgraded to 5.0.6
22
+ * **@visulima/package:** upgraded to 5.0.6
23
+ * **@visulima/tsconfig:** upgraded to 3.2.1
24
+
1
25
  ## @visulima/vis [1.0.5](https://github.com/visulima/visulima/compare/%40visulima%2Fvis%401.0.4...%40visulima%2Fvis%401.0.5) (2026-07-19)
2
26
 
3
27
 
package/dist/bin.js CHANGED
@@ -1 +1 @@
1
- import"./packem_shared/compile-cache-B_Vf_WxT.js";import"./packem_shared/bin-Cv8vsMEo.js";
1
+ import"./packem_shared/compile-cache-B_Vf_WxT.js";import"./packem_shared/bin-BZ_m_tag.js";
package/dist/binx.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{c as r,V as o,h as c,e as i,r as a}from"./packem_shared/index-DrIMyJSY.js";import{c as n}from"./packem_shared/compile-cache-B_Vf_WxT.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(`${r.version}
3
- `),process.exit(0));process.argv.splice(2,0,"dlx");n();const e=o("visx",{packageName:"visx",packageVersion:r.version}),p=process.argv.includes("--debug")||!!process.env.DEBUG;e.addPlugin(c({detailed:p,exitOnError:!1}));e.addCommand(i);a(e);
2
+ import{V as o,h as c,e as i,r as p}from"./packem_shared/index-ZfYDID5E.js";import{c as a}from"./packem_shared/compile-cache-B_Vf_WxT.js";import{m as r}from"./packem_shared/package-version-DBJLduJL.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(`${r()}
3
+ `),process.exit(0));process.argv.splice(2,0,"dlx");a();const e=o("visx",{packageName:"visx",packageVersion:r()}),n=process.argv.includes("--debug")||!!process.env.DEBUG;e.addPlugin(c({detailed:n,exitOnError:!1}));e.addCommand(i);p(e);
@@ -1,4 +1,4 @@
1
- import{createRequire as G}from"node:module";import{w as O,m as P}from"../packem_shared/target-merge-Dg25Izl5.js";import{m as c,A as b,f as p,a as h,H as y,O as C}from"../packem_shared/index-BVuCxe14.js";import{i as I}from"./ts-loader.js";import{otelPlugin as jt}from"../packem_shared/otelPlugin-DmKDBaPo.js";import{definePlugin as Tt}from"../packem_shared/definePlugin-DoUcoYSy.js";import{a as _}from"../packem_shared/readJsonSync-DuMMeB3s-Cx08VBQg.js";const F=G(import.meta.url),d=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,k=t=>{if(typeof d<"u"&&d.versions&&d.versions.node){const[e,s]=d.versions.node.split(".").map(Number);if(e>22||e===22&&s>=3||e===20&&s>=16)return d.getBuiltinModule(t)}return F(t)},{createHash:T}=k("node:crypto"),{readdirSync:$,readFileSync:V}=k("node:fs"),{createRequire:N}=k("node:module");class l extends Error{chain;constructor(e,s,o){super(e,o),this.name=this.constructor.name,this.chain=s}}class K extends l{constructor(e,s){const o=[...s,`${e} (re-enters)`].join(" → ");super(`Config cycle: ${o}`,s)}}class x extends l{filePath;removedKeys;constructor(e,s,o){const r=[`${e} uses removed keys.`,""];for(const n of o){const a=n.location?` (at ${n.location})`:"";r.push(` • ${n.name}${a} → renamed to \`${n.renamedTo}\``);for(const i of n.children??[])r.push(` ↳ ${i.name} → renamed to \`${i.renamedTo}\``)}r.push("","Run `vis migrate self` to auto-rewrite the config (use --dry-run to preview)."),super(r.join(`
1
+ import{createRequire as G}from"node:module";import{w as O,m as P}from"../packem_shared/target-merge-Dg25Izl5.js";import{m as c,A as b,f as p,a as h,H as y,O as C}from"../packem_shared/index-D75r1yKp.js";import{i as I}from"./ts-loader.js";import{otelPlugin as jt}from"../packem_shared/otelPlugin-DmKDBaPo.js";import{definePlugin as Tt}from"../packem_shared/definePlugin-DoUcoYSy.js";import{a as _}from"../packem_shared/readJsonSync-DuMMeB3s-wlhgSHes.js";const F=G(import.meta.url),d=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,k=t=>{if(typeof d<"u"&&d.versions&&d.versions.node){const[e,s]=d.versions.node.split(".").map(Number);if(e>22||e===22&&s>=3||e===20&&s>=16)return d.getBuiltinModule(t)}return F(t)},{createHash:T}=k("node:crypto"),{readdirSync:$,readFileSync:V}=k("node:fs"),{createRequire:N}=k("node:module");class l extends Error{chain;constructor(e,s,o){super(e,o),this.name=this.constructor.name,this.chain=s}}class K extends l{constructor(e,s){const o=[...s,`${e} (re-enters)`].join(" → ");super(`Config cycle: ${o}`,s)}}class x extends l{filePath;removedKeys;constructor(e,s,o){const r=[`${e} uses removed keys.`,""];for(const n of o){const a=n.location?` (at ${n.location})`:"";r.push(` • ${n.name}${a} → renamed to \`${n.renamedTo}\``);for(const i of n.children??[])r.push(` ↳ ${i.name} → renamed to \`${i.renamedTo}\``)}r.push("","Run `vis migrate self` to auto-rewrite the config (use --dry-run to preview)."),super(r.join(`
2
2
  `),s),this.filePath=e,this.removedKeys=o}}class j extends l{constructor(e,s,o){const r=o instanceof Error?o.message:String(o),n=s.length>0?`
3
3
  Chain: ${s.join(" → ")}`:"";super(`Failed to load ${e}: ${r}${n}`,s,{cause:o})}}const L=t=>t.join(" → ");class g extends l{constructor(e,s,o){const r=s.length>0?s[s.length-1]:"<unknown>",n=o.length>0?`
4
4
  Tried:
@@ -1,2 +1,2 @@
1
- import{s as c,E as n,I as f}from"../packem_shared/index.server-J83sowC4.js";import{p as i}from"./cli-main.js";import{g as l}from"../packem_shared/osv-bloom-DMhXP184.js";const a=t=>{if(!t)return"never";const r=Date.parse(t);if(Number.isNaN(r))return t;const e=Date.now()-r;if(e<0)return t;const o=Math.floor(e/6e4);if(o<1)return"just now";if(o<60)return`${o}m ago`;const s=Math.floor(o/60);return s<24?`${s}h ago`:`${Math.floor(s/24)}d ago`},m=t=>t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`,u=async({options:t,workspaceRoot:r})=>{if(!r)throw new Error("Could not determine workspace root. Run this command inside a workspace.");const e=await l(r,t.cacheDir);if(t.format==="json"){process.stdout.write(`${JSON.stringify(e,void 0,2)}
1
+ import{s as c,E as n,I as f}from"../packem_shared/index.server-qvZ-cy29.js";import{p as i}from"./cli-main.js";import{g as l}from"../packem_shared/osv-bloom-DMhXP184.js";const a=t=>{if(!t)return"never";const r=Date.parse(t);if(Number.isNaN(r))return t;const e=Date.now()-r;if(e<0)return t;const o=Math.floor(e/6e4);if(o<1)return"just now";if(o<60)return`${o}m ago`;const s=Math.floor(o/60);return s<24?`${s}h ago`:`${Math.floor(s/24)}d ago`},m=t=>t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`,u=async({options:t,workspaceRoot:r})=>{if(!r)throw new Error("Could not determine workspace root. Run this command inside a workspace.");const e=await l(r,t.cacheDir);if(t.format==="json"){process.stdout.write(`${JSON.stringify(e,void 0,2)}
2
2
  `);return}if(i.info(`Cache: ${e.cacheDir}`),!e.present){i.warn(`No osv-bloom filter yet. Run ${c("vis advisories bloom sync")} to populate.`);return}if(e.manifest){const{manifest:o}=e;i.info(`Built: ${o.builtAtRfc3339} (${a(o.builtAtRfc3339)})`),i.info(`Fetch: ${e.fetchedAtIso??n("—")} (${a(e.fetchedAtIso)})`),i.info(`Filter: ${f(m(o.bloomByteLen))} m=${o.bloomMBits.toLocaleString()} bits k=${String(o.bloomKHashes)}`),i.info(`Set: ${o.entryCount.toLocaleString()} entries from ${o.advisoryCount.toLocaleString()} advisories (target FPR ${o.targetFpr})`),i.info(n(`Digest: ${o.setDigestSha256}`))}else i.warn("filter.bin present but manifest.json missing — `vis advisories bloom sync` will rewrite the cache.")},h=u;export{h as advisoriesBloomStatusExecute};
@@ -1,2 +1,2 @@
1
- import{E as m}from"../packem_shared/index.server-J83sowC4.js";import{p as i}from"./cli-main.js";import{s as p}from"../packem_shared/scan-progress-DQ4TMXcb.js";import{s as d,D}from"../packem_shared/osv-bloom-DMhXP184.js";const b=o=>o?.security?.audit?.advisories?.bloom??{},u=o=>o>=1e3?`${(o/1e3).toFixed(1)}s`:`${Math.round(o)}ms`,y=o=>o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`,h=async({options:o,visConfig:f,workspaceRoot:a})=>{if(!a)throw new Error("Could not determine workspace root. Run this command inside a workspace.");const n=o.format==="json",c=b(f),l=o.source??c.source??D,s=p([{id:"bloom",label:"Sync osv-bloom prefilter"}],{live:!n});let e,t;try{s.start("bloom");const r=Date.now();e=await d({allowedHosts:c.allowedHosts,cacheDir:o.cacheDir,force:!!o.force,source:l,workspaceRoot:a}),e.upToDate?s.finish("bloom","ok",`up to date · ${u(Date.now()-r)}`):s.finish("bloom","ok",`${e.manifest.entryCount.toLocaleString()} entries · ${y(e.bytesOnDisk)} · ${u(e.durationMs)}`)}catch(r){t=r instanceof Error?r.message:String(r),s.finish("bloom","error",t)}finally{s.stop()}n?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)}
1
+ import{E as m}from"../packem_shared/index.server-qvZ-cy29.js";import{p as i}from"./cli-main.js";import{s as p}from"../packem_shared/scan-progress-CHdHWhVw.js";import{s as d,D}from"../packem_shared/osv-bloom-DMhXP184.js";const b=o=>o?.security?.audit?.advisories?.bloom??{},u=o=>o>=1e3?`${(o/1e3).toFixed(1)}s`:`${Math.round(o)}ms`,y=o=>o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`,h=async({options:o,visConfig:f,workspaceRoot:a})=>{if(!a)throw new Error("Could not determine workspace root. Run this command inside a workspace.");const n=o.format==="json",c=b(f),l=o.source??c.source??D,s=p([{id:"bloom",label:"Sync osv-bloom prefilter"}],{live:!n});let e,t;try{s.start("bloom");const r=Date.now();e=await d({allowedHosts:c.allowedHosts,cacheDir:o.cacheDir,force:!!o.force,source:l,workspaceRoot:a}),e.upToDate?s.finish("bloom","ok",`up to date · ${u(Date.now()-r)}`):s.finish("bloom","ok",`${e.manifest.entryCount.toLocaleString()} entries · ${y(e.bytesOnDisk)} · ${u(e.durationMs)}`)}catch(r){t=r instanceof Error?r.message:String(r),s.finish("bloom","error",t)}finally{s.stop()}n?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(m(`Cache: ${e.cacheDir}`)),i.info(m(`Built: ${e.manifest.builtAtRfc3339}`)),t||i.success(e.upToDate?"osv-bloom prefilter up to date.":"osv-bloom prefilter synced.")),t&&(process.exitCode=1)},O=h;export{O as advisoriesBloomSyncExecute};