@visulima/vis 1.0.0-alpha.8 → 1.0.0

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 (471) hide show
  1. package/CHANGELOG.md +1915 -41
  2. package/LICENSE.md +13554 -6
  3. package/README.md +264 -32
  4. package/bin/resolve-binary.mjs +85 -0
  5. package/bin/vis.mjs +76 -0
  6. package/dashboard/dist/index.html +152 -0
  7. package/dist/bin.d.ts +1 -1
  8. package/dist/bin.js +1 -1004
  9. package/dist/binx.js +3 -0
  10. package/dist/config/index.d.ts +3276 -0
  11. package/dist/config/index.js +1 -0
  12. package/dist/generate/index.d.ts +155 -30
  13. package/dist/generate/index.js +1 -1
  14. package/dist/packem_chunks/CONFIG_FILES.js +8 -0
  15. package/dist/packem_chunks/DEFAULT_CLEAN_KEEP.js +1 -0
  16. package/dist/packem_chunks/agent-instructions.js +11 -0
  17. package/dist/packem_chunks/bloom-status.js +2 -0
  18. package/dist/packem_chunks/bloom-sync.js +2 -0
  19. package/dist/packem_chunks/cache-attestation.js +1 -0
  20. package/dist/packem_chunks/catalog-detector.js +1 -0
  21. package/dist/packem_chunks/catalog.js +114 -0
  22. package/dist/packem_chunks/cli-exec.js +1 -0
  23. package/dist/packem_chunks/cli-main.js +268 -0
  24. package/dist/packem_chunks/defineReleasePlugin.js +3 -0
  25. package/dist/packem_chunks/detect.js +3 -0
  26. package/dist/packem_chunks/detect2.js +8 -0
  27. package/dist/packem_chunks/devtools.js +4 -0
  28. package/dist/packem_chunks/discord.js +4 -0
  29. package/dist/packem_chunks/dispatch.js +4 -0
  30. package/dist/packem_chunks/doctor-probe.js +2 -0
  31. package/dist/packem_chunks/dynamic-import.js +1 -0
  32. package/dist/packem_chunks/extra-files.js +3 -0
  33. package/dist/packem_chunks/fix.js +11 -0
  34. package/dist/packem_chunks/git.js +3 -0
  35. package/dist/packem_chunks/group-tags.js +1 -0
  36. package/dist/packem_chunks/handler.js +1 -0
  37. package/dist/packem_chunks/handler10.js +5 -0
  38. package/dist/packem_chunks/handler11.js +1 -0
  39. package/dist/packem_chunks/handler12.js +27 -0
  40. package/dist/packem_chunks/handler13.js +5 -0
  41. package/dist/packem_chunks/handler14.js +1 -0
  42. package/dist/packem_chunks/handler15.js +1 -0
  43. package/dist/packem_chunks/handler16.js +1 -0
  44. package/dist/packem_chunks/handler17.js +1 -0
  45. package/dist/packem_chunks/handler18.js +1 -0
  46. package/dist/packem_chunks/handler19.js +5 -0
  47. package/dist/packem_chunks/handler2.js +1 -0
  48. package/dist/packem_chunks/handler20.js +2 -0
  49. package/dist/packem_chunks/handler21.js +2 -0
  50. package/dist/packem_chunks/handler22.js +14 -0
  51. package/dist/packem_chunks/handler23.js +1 -0
  52. package/dist/packem_chunks/handler24.js +1 -0
  53. package/dist/packem_chunks/handler25.js +1 -0
  54. package/dist/packem_chunks/handler26.js +5 -0
  55. package/dist/packem_chunks/handler27.js +1 -0
  56. package/dist/packem_chunks/handler28.js +3 -0
  57. package/dist/packem_chunks/handler29.js +1 -0
  58. package/dist/packem_chunks/handler3.js +4 -0
  59. package/dist/packem_chunks/handler30.js +1 -0
  60. package/dist/packem_chunks/handler31.js +2 -0
  61. package/dist/packem_chunks/handler32.js +2 -0
  62. package/dist/packem_chunks/handler33.js +2 -0
  63. package/dist/packem_chunks/handler34.js +3 -0
  64. package/dist/packem_chunks/handler35.js +6 -0
  65. package/dist/packem_chunks/handler36.js +1 -0
  66. package/dist/packem_chunks/handler37.js +42 -0
  67. package/dist/packem_chunks/handler38.js +8 -0
  68. package/dist/packem_chunks/handler39.js +9 -0
  69. package/dist/packem_chunks/handler4.js +4 -0
  70. package/dist/packem_chunks/handler40.js +75 -0
  71. package/dist/packem_chunks/handler41.js +5 -0
  72. package/dist/packem_chunks/handler42.js +4 -0
  73. package/dist/packem_chunks/handler43.js +3 -0
  74. package/dist/packem_chunks/handler44.js +2 -0
  75. package/dist/packem_chunks/handler45.js +1 -0
  76. package/dist/packem_chunks/handler46.js +1 -0
  77. package/dist/packem_chunks/handler47.js +1 -0
  78. package/dist/packem_chunks/handler48.js +3 -0
  79. package/dist/packem_chunks/handler49.js +1 -0
  80. package/dist/packem_chunks/handler5.js +6 -0
  81. package/dist/packem_chunks/handler50.js +7 -0
  82. package/dist/packem_chunks/handler51.js +33 -0
  83. package/dist/packem_chunks/handler52.js +3 -0
  84. package/dist/packem_chunks/handler53.js +8 -0
  85. package/dist/packem_chunks/handler54.js +4 -0
  86. package/dist/packem_chunks/handler55.js +1 -0
  87. package/dist/packem_chunks/handler56.js +12 -0
  88. package/dist/packem_chunks/handler57.js +11 -0
  89. package/dist/packem_chunks/handler58.js +5 -0
  90. package/dist/packem_chunks/handler59.js +11 -0
  91. package/dist/packem_chunks/handler6.js +8 -0
  92. package/dist/packem_chunks/handler60.js +3 -0
  93. package/dist/packem_chunks/handler61.js +22 -0
  94. package/dist/packem_chunks/handler62.js +61 -0
  95. package/dist/packem_chunks/handler63.js +3 -0
  96. package/dist/packem_chunks/handler64.js +6 -0
  97. package/dist/packem_chunks/handler65.js +9 -0
  98. package/dist/packem_chunks/handler66.js +2 -0
  99. package/dist/packem_chunks/handler67.js +24 -0
  100. package/dist/packem_chunks/handler68.js +25 -0
  101. package/dist/packem_chunks/handler69.js +153 -0
  102. package/dist/packem_chunks/handler7.js +1 -0
  103. package/dist/packem_chunks/handler70.js +10 -0
  104. package/dist/packem_chunks/handler71.js +23 -0
  105. package/dist/packem_chunks/handler72.js +322 -0
  106. package/dist/packem_chunks/handler73.js +708 -0
  107. package/dist/packem_chunks/handler74.js +48 -0
  108. package/dist/packem_chunks/handler75.js +27 -0
  109. package/dist/packem_chunks/handler76.js +3 -0
  110. package/dist/packem_chunks/handler77.js +190 -0
  111. package/dist/packem_chunks/handler78.js +38 -0
  112. package/dist/packem_chunks/handler8.js +1 -0
  113. package/dist/packem_chunks/handler9.js +1 -0
  114. package/dist/packem_chunks/heal-accept.js +10 -0
  115. package/dist/packem_chunks/heal.js +14 -0
  116. package/dist/packem_chunks/help-command.js +31 -0
  117. package/dist/packem_chunks/index.js +1 -7
  118. package/dist/packem_chunks/index2.js +802 -0
  119. package/dist/packem_chunks/index3.js +7 -0
  120. package/dist/packem_chunks/index4.js +135 -0
  121. package/dist/packem_chunks/index5.js +74 -0
  122. package/dist/packem_chunks/interface.js +2 -0
  123. package/dist/packem_chunks/keys-refresh.js +4 -0
  124. package/dist/packem_chunks/lean.js +4 -0
  125. package/dist/packem_chunks/list.js +3 -0
  126. package/dist/packem_chunks/loader.js +4 -1
  127. package/dist/packem_chunks/loader2.js +1 -0
  128. package/dist/packem_chunks/orchestrator.js +42 -0
  129. package/dist/packem_chunks/pre-mode.js +2 -0
  130. package/dist/packem_chunks/print-config.js +2 -0
  131. package/dist/packem_chunks/prompts.js +7 -0
  132. package/dist/packem_chunks/prune.js +3 -0
  133. package/dist/packem_chunks/publish-guards.js +1 -0
  134. package/dist/packem_chunks/registry.js +48 -0
  135. package/dist/packem_chunks/resolveFormatter.js +9 -0
  136. package/dist/packem_chunks/run.js +1 -0
  137. package/dist/packem_chunks/security.js +1 -0
  138. package/dist/packem_chunks/shell-runner.js +1 -0
  139. package/dist/packem_chunks/slack.js +2 -0
  140. package/dist/packem_chunks/snapshot.js +2 -0
  141. package/dist/packem_chunks/stage-publisher.js +1 -0
  142. package/dist/packem_chunks/staged-registry.js +2 -0
  143. package/dist/packem_chunks/state.js +3 -0
  144. package/dist/packem_chunks/status.js +2 -0
  145. package/dist/packem_chunks/success-walk.js +8 -0
  146. package/dist/packem_chunks/sync.js +2 -0
  147. package/dist/packem_chunks/sync2.js +2 -0
  148. package/dist/packem_chunks/tar.js +3 -0
  149. package/dist/packem_chunks/tripwire.js +2 -0
  150. package/dist/packem_chunks/ts-loader.js +22 -0
  151. package/dist/packem_chunks/verify-lockfile.js +2 -0
  152. package/dist/packem_chunks/version-resolver.js +2 -0
  153. package/dist/packem_chunks/webhook.js +1 -0
  154. package/dist/packem_chunks/workflow-templates.js +167 -0
  155. package/dist/packem_chunks/workspace.js +2 -0
  156. package/dist/packem_shared/AfterAllProjectsVersioned-CAKI2nWf.js +1 -0
  157. package/dist/packem_shared/MultiSpinner-B9U0-aE3-B-gIXhFk.js +3 -0
  158. package/dist/packem_shared/ReleaseClient-BY4OZNCK.js +1 -0
  159. package/dist/packem_shared/Table-CcVkyULl-DLWu6XHL.js +34 -0
  160. package/dist/packem_shared/VisReleaseError-DMGRBTNO.js +1 -0
  161. package/dist/packem_shared/_commonjsHelpers-B5Y90VFO.js +1 -0
  162. package/dist/packem_shared/advisories-B76fBVL-.js +1 -0
  163. package/dist/packem_shared/affected-shas-CCxG4tvm.js +1 -0
  164. package/dist/packem_shared/ai-analysis-BpVdn20h.js +68 -0
  165. package/dist/packem_shared/ai-fix-CeGzAT9m.js +43 -0
  166. package/dist/packem_shared/anolilab-text-CAM_E6uK.js +13 -0
  167. package/dist/packem_shared/api.d-BPftyU9r.d.ts +27 -0
  168. package/dist/packem_shared/augment-DaSS2Lgs.js +4 -0
  169. package/dist/packem_shared/bin-BlGVEhl8.js +1 -0
  170. package/dist/packem_shared/build-scripts-q__dKE2y.js +1 -0
  171. package/dist/packem_shared/command-runtime-3FTGuUsK.js +1 -0
  172. package/dist/packem_shared/compile-cache-B_Vf_WxT.js +3 -0
  173. package/dist/packem_shared/createAdapter-bU4DIP3F.js +1 -0
  174. package/dist/packem_shared/createVersionActions-BK43SNDH.js +1 -0
  175. package/dist/packem_shared/cyclonedx-CmrYQ0vx.js +4 -0
  176. package/dist/packem_shared/defineFormatter-D5dCp6Kv.js +1 -0
  177. package/dist/packem_shared/definePlugin-DoUcoYSy.js +1 -0
  178. package/dist/packem_shared/dependency-scan-DpOFiZuI.js +1 -0
  179. package/dist/packem_shared/docker-BYqiD711.js +59 -0
  180. package/dist/packem_shared/env-DdQRnEIy.js +27 -0
  181. package/dist/packem_shared/failure-log-CKMhqLWr.js +2 -0
  182. package/dist/packem_shared/giget-DVTFJlbR.js +2 -0
  183. package/dist/packem_shared/glob-fqg4KepW-1S3z30c8.js +1 -0
  184. package/dist/packem_shared/index-B0EsgdzO.js +1 -0
  185. package/dist/packem_shared/index-CE6MsgcV.js +22 -0
  186. package/dist/packem_shared/index-Cg0IHaFI.js +1 -0
  187. package/dist/packem_shared/index-Cg71MisW.js +1 -0
  188. package/dist/packem_shared/index-DjTWo3sH.js +1 -0
  189. package/dist/packem_shared/index-jJNulo5i.js +28 -0
  190. package/dist/packem_shared/index.server-J83sowC4.js +2 -0
  191. package/dist/packem_shared/interface.d-B7VK2rcH.d.ts +148 -0
  192. package/dist/packem_shared/interface.d-Cezzifoh.d.ts +106 -0
  193. package/dist/packem_shared/license-t5KnNX6v.js +1 -0
  194. package/dist/packem_shared/lifecycle-aDTZ8dW1.js +2 -0
  195. package/dist/packem_shared/lockfile-C1qCKGH6.js +1 -0
  196. package/dist/packem_shared/main-B3juSU5z.js +1 -0
  197. package/dist/packem_shared/manifests-DSBr3-dw.js +1 -0
  198. package/dist/packem_shared/min-release-age-C71MO72F.js +34 -0
  199. package/dist/packem_shared/missing-package-json-CTF71tE5.js +1 -0
  200. package/dist/packem_shared/native-config-sync-D-z2Uwqu.js +21 -0
  201. package/dist/packem_shared/osv-bloom-DMhXP184.js +2 -0
  202. package/dist/packem_shared/otelPlugin-DmKDBaPo.js +1 -0
  203. package/dist/packem_shared/packument-aGzYwXKn.js +1 -0
  204. package/dist/packem_shared/peer-warnings-BXAzXqY3.js +1 -0
  205. package/dist/packem_shared/plugins.d-ND23R9I3.d.ts +4 -0
  206. package/dist/packem_shared/pm-runner-CQcraCcu.js +1 -0
  207. package/dist/packem_shared/prompt-DjXHVgYU.js +1 -0
  208. package/dist/packem_shared/provenance-S7y0BRAt.js +1 -0
  209. package/dist/packem_shared/public-api-WqUCiyIe.js +131 -0
  210. package/dist/packem_shared/readJsonSync-DuMMeB3s-ihoybKvs.js +1 -0
  211. package/dist/packem_shared/registry-keys-CRnXATt2.js +1 -0
  212. package/dist/packem_shared/resolve-explicit-CJGazevw.js +5 -0
  213. package/dist/packem_shared/resolve-runtime-QRaQucfL.js +1 -0
  214. package/dist/packem_shared/run-file-DD7Ne23Z.js +1 -0
  215. package/dist/packem_shared/runtime-check-qnrPTlma.js +1 -0
  216. package/dist/packem_shared/runtime-process-Dmz0vCJy-DUwTvH1J.js +1 -0
  217. package/dist/packem_shared/s1ngularity-BLj4Jy8z.js +1 -0
  218. package/dist/packem_shared/scan-progress-BDcl7Kty.js +2 -0
  219. package/dist/packem_shared/selectors-D4iCvITE.js +3 -0
  220. package/dist/packem_shared/signatures-DoNG2hEr.js +2 -0
  221. package/dist/packem_shared/slug-DoueYuLo.js +1 -0
  222. package/dist/packem_shared/spinner-DuJJvFTl.js +1 -0
  223. package/dist/packem_shared/sticky-comment-D6_7-w8T.js +1 -0
  224. package/dist/packem_shared/subtree-C7bZuiSQ.js +2 -0
  225. package/dist/packem_shared/symbols-DPTlrJ3B.js +1 -0
  226. package/dist/packem_shared/tabs-CgxCvjCY.js +1 -0
  227. package/dist/packem_shared/target-merge-Dg25Izl5.js +11 -0
  228. package/dist/packem_shared/target-options-CR0OuYJr.js +1 -0
  229. package/dist/packem_shared/toolchain-Zb3VzZb4.js +5 -0
  230. package/dist/packem_shared/typosquats-C12CP_2G.js +1 -0
  231. package/dist/packem_shared/use-measured-height-CjS7Tks7.js +1 -0
  232. package/dist/packem_shared/utils-CRueU43T.js +1 -0
  233. package/dist/packem_shared/verify-DStfg3nb.js +1 -0
  234. package/dist/packem_shared/vis-update-app-BlocL713.js +1 -0
  235. package/dist/packem_shared/watch-BXNI7dC6.js +1 -0
  236. package/dist/packem_shared/watch-loop-BZudYfcl.js +11 -0
  237. package/dist/release/core/changelog/index.d.ts +5 -0
  238. package/dist/release/core/changelog/index.js +1 -0
  239. package/dist/release/core/package-managers/index.d.ts +6 -0
  240. package/dist/release/core/package-managers/index.js +1 -0
  241. package/dist/release/core/version-actions/index.d.ts +14 -0
  242. package/dist/release/core/version-actions/index.js +1 -0
  243. package/dist/release/index.d.ts +233 -0
  244. package/dist/release/index.js +1 -0
  245. package/dist/release/plugin-sdk.d.ts +128 -0
  246. package/dist/release/plugin-sdk.js +1 -0
  247. package/dist/release/presets.d.ts +225 -0
  248. package/dist/release/presets.js +1 -0
  249. package/dist/release/types.d.ts +1493 -0
  250. package/dist/release/types.js +1 -0
  251. package/dist/runtime/preload.d.ts +1 -0
  252. package/dist/runtime/preload.js +1 -0
  253. package/index.d.ts +450 -0
  254. package/index.js +579 -728
  255. package/package.json +103 -52
  256. package/schemas/project.schema.json +873 -226
  257. package/schemas/vis-config.schema.json +6332 -241
  258. package/schemas/vis-release-config.schema.json +1423 -0
  259. package/skills/vis/SKILL.md +96 -0
  260. package/templates/buildkite-ci/.buildkite/pipeline.yml.tera +85 -0
  261. package/templates/buildkite-ci/template.yml +20 -0
  262. package/dist/ai-analysis.d.ts +0 -26
  263. package/dist/ai-cache.d.ts +0 -21
  264. package/dist/ai-types.d.ts +0 -16
  265. package/dist/audit-config.d.ts +0 -24
  266. package/dist/cache-directory.d.ts +0 -73
  267. package/dist/catalog.d.ts +0 -136
  268. package/dist/codeowners.d.ts +0 -30
  269. package/dist/commands/action-graph.d.ts +0 -8
  270. package/dist/commands/add.d.ts +0 -3
  271. package/dist/commands/affected.d.ts +0 -3
  272. package/dist/commands/ai.d.ts +0 -3
  273. package/dist/commands/analyze.d.ts +0 -3
  274. package/dist/commands/approve-builds.d.ts +0 -3
  275. package/dist/commands/audit.d.ts +0 -23
  276. package/dist/commands/cache.d.ts +0 -86
  277. package/dist/commands/check.d.ts +0 -3
  278. package/dist/commands/ci.d.ts +0 -19
  279. package/dist/commands/clean.d.ts +0 -3
  280. package/dist/commands/create/discovery.d.ts +0 -42
  281. package/dist/commands/create/index.d.ts +0 -13
  282. package/dist/commands/create/prompts.d.ts +0 -31
  283. package/dist/commands/create/random-name.d.ts +0 -15
  284. package/dist/commands/create/templates/builtin.d.ts +0 -15
  285. package/dist/commands/create/templates/generator.d.ts +0 -14
  286. package/dist/commands/create/templates/index.d.ts +0 -13
  287. package/dist/commands/create/templates/monorepo.d.ts +0 -16
  288. package/dist/commands/create/templates/remote.d.ts +0 -41
  289. package/dist/commands/create/templates/types.d.ts +0 -46
  290. package/dist/commands/create/utils.d.ts +0 -42
  291. package/dist/commands/dedupe.d.ts +0 -3
  292. package/dist/commands/devcontainer.d.ts +0 -3
  293. package/dist/commands/dlx.d.ts +0 -3
  294. package/dist/commands/docker.d.ts +0 -22
  295. package/dist/commands/doctor.d.ts +0 -15
  296. package/dist/commands/exec.d.ts +0 -3
  297. package/dist/commands/generate.d.ts +0 -10
  298. package/dist/commands/graph.d.ts +0 -3
  299. package/dist/commands/hook/constants.d.ts +0 -13
  300. package/dist/commands/hook/index.d.ts +0 -3
  301. package/dist/commands/hook/install.d.ts +0 -7
  302. package/dist/commands/hook/list.d.ts +0 -28
  303. package/dist/commands/hook/migrate.d.ts +0 -30
  304. package/dist/commands/hook/prek-builtins.d.ts +0 -8
  305. package/dist/commands/hook/prek.d.ts +0 -129
  306. package/dist/commands/hook/run.d.ts +0 -21
  307. package/dist/commands/hook/uninstall.d.ts +0 -3
  308. package/dist/commands/hook/validate.d.ts +0 -17
  309. package/dist/commands/ignore-helpers.d.ts +0 -157
  310. package/dist/commands/ignore.d.ts +0 -17
  311. package/dist/commands/implode.d.ts +0 -3
  312. package/dist/commands/info.d.ts +0 -3
  313. package/dist/commands/init.d.ts +0 -14
  314. package/dist/commands/install.d.ts +0 -3
  315. package/dist/commands/link.d.ts +0 -3
  316. package/dist/commands/list.d.ts +0 -3
  317. package/dist/commands/migrate/backup.d.ts +0 -8
  318. package/dist/commands/migrate/constants.d.ts +0 -16
  319. package/dist/commands/migrate/deps.d.ts +0 -32
  320. package/dist/commands/migrate/gitleaks.d.ts +0 -29
  321. package/dist/commands/migrate/index.d.ts +0 -3
  322. package/dist/commands/migrate/json.d.ts +0 -22
  323. package/dist/commands/migrate/kingfisher.d.ts +0 -14
  324. package/dist/commands/migrate/lint-staged.d.ts +0 -62
  325. package/dist/commands/migrate/moon.d.ts +0 -5
  326. package/dist/commands/migrate/nano-staged.d.ts +0 -30
  327. package/dist/commands/migrate/nx.d.ts +0 -12
  328. package/dist/commands/migrate/prompt.d.ts +0 -2
  329. package/dist/commands/migrate/secretlint.d.ts +0 -14
  330. package/dist/commands/migrate/shared.d.ts +0 -29
  331. package/dist/commands/migrate/turborepo.d.ts +0 -11
  332. package/dist/commands/migrate/types.d.ts +0 -27
  333. package/dist/commands/migrate/verify.d.ts +0 -12
  334. package/dist/commands/optimize.d.ts +0 -38
  335. package/dist/commands/pm.d.ts +0 -3
  336. package/dist/commands/remove.d.ts +0 -3
  337. package/dist/commands/run.d.ts +0 -16
  338. package/dist/commands/sbom.d.ts +0 -10
  339. package/dist/commands/secrets.d.ts +0 -3
  340. package/dist/commands/sort-package-json.d.ts +0 -3
  341. package/dist/commands/staged.d.ts +0 -10
  342. package/dist/commands/status.d.ts +0 -3
  343. package/dist/commands/sync.d.ts +0 -16
  344. package/dist/commands/task-why.d.ts +0 -3
  345. package/dist/commands/unlink.d.ts +0 -3
  346. package/dist/commands/update.d.ts +0 -3
  347. package/dist/commands/upgrade.d.ts +0 -3
  348. package/dist/commands/why.d.ts +0 -3
  349. package/dist/config.d.ts +0 -82
  350. package/dist/config.js +0 -1
  351. package/dist/docker.d.ts +0 -73
  352. package/dist/flakiness.d.ts +0 -40
  353. package/dist/generate/discover.d.ts +0 -29
  354. package/dist/generate/loader.d.ts +0 -15
  355. package/dist/generate/moon-adapter/filename-interp.d.ts +0 -42
  356. package/dist/generate/moon-adapter/filters.d.ts +0 -22
  357. package/dist/generate/moon-adapter/frontmatter.d.ts +0 -39
  358. package/dist/generate/moon-adapter/index.d.ts +0 -19
  359. package/dist/generate/moon-adapter/tera-subset.d.ts +0 -85
  360. package/dist/generate/moon-adapter/util.d.ts +0 -14
  361. package/dist/generate/prompts.d.ts +0 -25
  362. package/dist/generate/remote.d.ts +0 -43
  363. package/dist/generate/runner.d.ts +0 -37
  364. package/dist/generate/types.d.ts +0 -152
  365. package/dist/hooks.d.ts +0 -118
  366. package/dist/native-binding.d.ts +0 -158
  367. package/dist/output.d.ts +0 -40
  368. package/dist/overrides.d.ts +0 -82
  369. package/dist/package-manager.d.ts +0 -23
  370. package/dist/packem_shared/otelPlugin-CJLkguJ8.js +0 -1
  371. package/dist/plugins/config-loader.d.ts +0 -3
  372. package/dist/plugins/otel.d.ts +0 -63
  373. package/dist/plugins/post-command.d.ts +0 -3
  374. package/dist/plugins/security-enforcement.d.ts +0 -3
  375. package/dist/pm-runner.d.ts +0 -44
  376. package/dist/run-report.d.ts +0 -40
  377. package/dist/runtime-check.d.ts +0 -27
  378. package/dist/sbom/cyclonedx.d.ts +0 -39
  379. package/dist/sbom/installed-package.d.ts +0 -49
  380. package/dist/sbom/license.d.ts +0 -31
  381. package/dist/sbom/lockfile.d.ts +0 -34
  382. package/dist/sbom/purl.d.ts +0 -25
  383. package/dist/sbom/resolve-specifier.d.ts +0 -24
  384. package/dist/sbom/types.d.ts +0 -196
  385. package/dist/secrets/baseline.d.ts +0 -20
  386. package/dist/secrets/format.d.ts +0 -14
  387. package/dist/secrets/git.d.ts +0 -6
  388. package/dist/secrets/spinner.d.ts +0 -9
  389. package/dist/security.d.ts +0 -64
  390. package/dist/selectors.d.ts +0 -81
  391. package/dist/shell-history.d.ts +0 -16
  392. package/dist/socket-security.d.ts +0 -129
  393. package/dist/staged/cli-parse.d.ts +0 -18
  394. package/dist/staged/config.d.ts +0 -14
  395. package/dist/staged/errors/apply-empty-commit-error.d.ts +0 -4
  396. package/dist/staged/errors/config-error.d.ts +0 -4
  397. package/dist/staged/errors/get-backup-stash-error.d.ts +0 -4
  398. package/dist/staged/errors/git-error.d.ts +0 -6
  399. package/dist/staged/errors/index.d.ts +0 -12
  400. package/dist/staged/errors/restore-original-state-error.d.ts +0 -4
  401. package/dist/staged/errors/staged-error.d.ts +0 -8
  402. package/dist/staged/errors/task-error.d.ts +0 -6
  403. package/dist/staged/git/diff.d.ts +0 -76
  404. package/dist/staged/git/exec.d.ts +0 -43
  405. package/dist/staged/git/index.d.ts +0 -77
  406. package/dist/staged/git/stash.d.ts +0 -37
  407. package/dist/staged/index.d.ts +0 -13
  408. package/dist/staged/match.d.ts +0 -12
  409. package/dist/staged/renderer/index.d.ts +0 -9
  410. package/dist/staged/renderer/ink/index.d.ts +0 -4
  411. package/dist/staged/renderer/plain.d.ts +0 -12
  412. package/dist/staged/tasks/build.d.ts +0 -13
  413. package/dist/staged/tasks/exec.d.ts +0 -56
  414. package/dist/staged/tasks/run.d.ts +0 -26
  415. package/dist/staged/types.d.ts +0 -173
  416. package/dist/target-discovery.d.ts +0 -59
  417. package/dist/target-options.d.ts +0 -261
  418. package/dist/tips.d.ts +0 -41
  419. package/dist/tui/components/CheckProgressApp.d.ts +0 -6
  420. package/dist/tui/components/CommandSummary.d.ts +0 -17
  421. package/dist/tui/components/Header.d.ts +0 -13
  422. package/dist/tui/components/OutputPanel.d.ts +0 -17
  423. package/dist/tui/components/QuitDialog.d.ts +0 -15
  424. package/dist/tui/components/TaskListPanel.d.ts +0 -19
  425. package/dist/tui/components/TaskRow.d.ts +0 -12
  426. package/dist/tui/components/TaskStore.d.ts +0 -80
  427. package/dist/tui/components/VisTaskRunnerApp.d.ts +0 -17
  428. package/dist/tui/components/devcontainer/DevcontainerStore.d.ts +0 -66
  429. package/dist/tui/components/devcontainer/VisDevcontainerApp.d.ts +0 -9
  430. package/dist/tui/components/devcontainer/catalogs/extensions.d.ts +0 -8
  431. package/dist/tui/components/devcontainer/catalogs/features.d.ts +0 -8
  432. package/dist/tui/components/devcontainer/catalogs/filters.d.ts +0 -4
  433. package/dist/tui/components/devcontainer/catalogs/mount-suggestions.d.ts +0 -19
  434. package/dist/tui/components/devcontainer/catalogs/templates.d.ts +0 -8
  435. package/dist/tui/components/devcontainer/devcontainer-io.d.ts +0 -14
  436. package/dist/tui/components/devcontainer/sections/DockerComposeSection.d.ts +0 -11
  437. package/dist/tui/components/devcontainer/sections/EnvironmentSection.d.ts +0 -16
  438. package/dist/tui/components/devcontainer/sections/ExtensionsSection.d.ts +0 -11
  439. package/dist/tui/components/devcontainer/sections/FeaturesSection.d.ts +0 -11
  440. package/dist/tui/components/devcontainer/sections/GeneralSection.d.ts +0 -12
  441. package/dist/tui/components/devcontainer/sections/LifecycleSection.d.ts +0 -13
  442. package/dist/tui/components/devcontainer/sections/MountsSection.d.ts +0 -16
  443. package/dist/tui/components/devcontainer/sections/PortsSection.d.ts +0 -10
  444. package/dist/tui/components/devcontainer/sections/PreviewPanel.d.ts +0 -11
  445. package/dist/tui/components/devcontainer/types.d.ts +0 -53
  446. package/dist/tui/components/devcontainer/validate.d.ts +0 -16
  447. package/dist/tui/components/graph/GraphStore.d.ts +0 -42
  448. package/dist/tui/components/graph/ProjectDetailPanel.d.ts +0 -10
  449. package/dist/tui/components/graph/ProjectListPanel.d.ts +0 -20
  450. package/dist/tui/components/graph/VisGraphApp.d.ts +0 -8
  451. package/dist/tui/components/optimize/OptimizeDetailPanel.d.ts +0 -9
  452. package/dist/tui/components/optimize/OptimizeListPanel.d.ts +0 -16
  453. package/dist/tui/components/optimize/OptimizeStore.d.ts +0 -50
  454. package/dist/tui/components/optimize/VisOptimizeApp.d.ts +0 -8
  455. package/dist/tui/components/optimize/constants.d.ts +0 -7
  456. package/dist/tui/components/update/PackageDetailPanel.d.ts +0 -12
  457. package/dist/tui/components/update/PackageListPanel.d.ts +0 -21
  458. package/dist/tui/components/update/UpdateStore.d.ts +0 -62
  459. package/dist/tui/components/update/VisUpdateApp.d.ts +0 -18
  460. package/dist/tui/dynamic-life-cycle.d.ts +0 -22
  461. package/dist/tui/formatting-utils.d.ts +0 -17
  462. package/dist/tui/pretty-time.d.ts +0 -8
  463. package/dist/tui/static-life-cycle.d.ts +0 -28
  464. package/dist/tui/status-utils.d.ts +0 -20
  465. package/dist/tui/symbols.d.ts +0 -7
  466. package/dist/tui/types.d.ts +0 -11
  467. package/dist/typosquats.d.ts +0 -70
  468. package/dist/upgrade-check.d.ts +0 -30
  469. package/dist/utils.d.ts +0 -22
  470. package/dist/watch.d.ts +0 -65
  471. package/dist/workspace.d.ts +0 -675
@@ -1,82 +0,0 @@
1
- /**
2
- * Package manager override and resolution management.
3
- *
4
- * Handles the correct override location for each package manager:
5
- * - **pnpm v10+**: top-level `overrides` in `pnpm-workspace.yaml`
6
- * - **pnpm v9-**: `pnpm.overrides` in `package.json`
7
- * - **npm**: `overrides` in `package.json` (uses `$<name>` references
8
- * for direct dependencies to avoid EOVERRIDE errors)
9
- * - **yarn / bun**: `resolutions` in `package.json`
10
- *
11
- * All overrides are root-level — no PM supports per-workspace overrides.
12
- * @see https://pnpm.io/settings — pnpm v10+ workspace settings
13
- * @see https://docs.npmjs.com/cli/v10/configuring-npm/package-json#overrides
14
- * @see https://yarnpkg.com/configuration/manifest#resolutions
15
- * @see https://bun.sh/docs/pm/overrides
16
- */
17
- /** Supported package manager names. */
18
- type PackageManagerName = "bun" | "npm" | "pnpm" | "yarn";
19
- /** Package manager identity with version for PM-specific behavior. */
20
- interface PmInfo {
21
- name: PackageManagerName;
22
- version: string;
23
- }
24
- /** A single override entry mapping an original package to its replacement spec. */
25
- interface OverrideEntry {
26
- /** The original package name being overridden (e.g., `"is-regex"`). */
27
- original: string;
28
- /** The npm alias spec (e.g., `"npm:@socketregistry/is-regex@^1"`). */
29
- spec: string;
30
- }
31
- /** Result of reading existing overrides from the project. */
32
- interface OverridesResult {
33
- /** Current overrides — values may be strings or nested objects (npm supports nested overrides). */
34
- overrides: Record<string, string | Record<string, string>>;
35
- /** The file where overrides are stored. */
36
- source: "package.json" | "pnpm-workspace.yaml";
37
- }
38
- /** Result of applying override entries. */
39
- interface ApplyOverridesResult {
40
- /** Package names that were newly added. */
41
- added: string[];
42
- /** Package names whose specs were changed. */
43
- updated: string[];
44
- }
45
- /**
46
- * Reads existing overrides for the detected package manager, choosing
47
- * `pnpm-workspace.yaml` for pnpm v10+ and `package.json` for everything else.
48
- */
49
- declare const readOverrides: (workspaceRoot: string, pkgJson: Record<string, unknown>, pm: PmInfo) => OverridesResult;
50
- /**
51
- * Applies override entries to the correct config file for the package manager.
52
- *
53
- * For npm, direct dependencies use `$&lt;name>` reference syntax to avoid
54
- * npm's EOVERRIDE error when an override conflicts with a direct dep range.
55
- * @param workspaceRoot Absolute path to the workspace root directory.
56
- * @param pkgJsonPath Absolute path to the root `package.json`.
57
- * @param entries Override entries to apply.
58
- * @param pm Package manager name and version.
59
- * @returns Lists of added and updated package names.
60
- */
61
- declare const applyOverrides: (workspaceRoot: string, pkgJsonPath: string, entries: OverrideEntry[], pm: PmInfo) => ApplyOverridesResult;
62
- /**
63
- * Reads the lockfile text for a workspace root.
64
- *
65
- * Returns the raw text content for regex-based package name scanning.
66
- * Falls back to an empty string if the lockfile is missing or unreadable.
67
- * @param workspaceRoot Absolute path to the workspace root.
68
- * @param pm Package manager name (determines lockfile name).
69
- */
70
- declare const readLockfileText: (workspaceRoot: string, pm: PackageManagerName) => string;
71
- /**
72
- * Checks if a package name appears in the lockfile text using PM-specific string patterns.
73
- *
74
- * This avoids parsing the entire lockfile — a single `string.includes()` is
75
- * sufficient for presence checks.
76
- * @param lockText Raw lockfile content.
77
- * @param packageName Package name to search for.
78
- * @param pm Package manager name (determines the search pattern).
79
- */
80
- declare const lockfileContainsPackage: (lockText: string, packageName: string, pm: PackageManagerName) => boolean;
81
- export type { ApplyOverridesResult, OverrideEntry, OverridesResult, PackageManagerName, PmInfo };
82
- export { applyOverrides, lockfileContainsPackage, readLockfileText, readOverrides };
@@ -1,23 +0,0 @@
1
- interface UpdateCommandOptions {
2
- dev: boolean;
3
- filters: string[];
4
- global: boolean;
5
- interactive: boolean;
6
- latest: boolean;
7
- noOptional: boolean;
8
- noSave: boolean;
9
- packages: string[];
10
- prod: boolean;
11
- recursive: boolean;
12
- workspaceRoot: boolean;
13
- }
14
- interface ResolvedCommand {
15
- args: string[];
16
- bin: string;
17
- }
18
- declare const resolveUpdateCommand: (packageManager: "bun" | "npm" | "pnpm" | "yarn", version: string, options: UpdateCommandOptions) => {
19
- command: ResolvedCommand;
20
- warnings: string[];
21
- };
22
- export type { ResolvedCommand, UpdateCommandOptions };
23
- export { resolveUpdateCommand };
@@ -1 +0,0 @@
1
- import{otelPlugin as l}from"../config.js";export{l as otelPlugin};
@@ -1,3 +0,0 @@
1
- import type { Plugin } from "@visulima/cerebro";
2
- declare const configLoaderPlugin: Plugin;
3
- export default configLoaderPlugin;
@@ -1,63 +0,0 @@
1
- import type { Task } from "@visulima/task-runner";
2
- import type { VisPlugin } from "../hooks.d.ts";
3
- /**
4
- * Minimal OTel-shaped span. Deliberately structural so users can pass
5
- * an `@opentelemetry/api` Tracer, an `@opentelemetry/sdk-node` one, or
6
- * a custom implementation without the plugin depending on any
7
- * particular OTel package.
8
- */
9
- export interface OtelSpan {
10
- end: () => void;
11
- recordException?: (error: unknown) => void;
12
- setAttribute?: (key: string, value: boolean | number | string) => void;
13
- setStatus?: (status: {
14
- code: number;
15
- message?: string;
16
- }) => void;
17
- }
18
- /**
19
- * Minimal Tracer contract. Accepts the real
20
- * `@opentelemetry/api`'s `Tracer.startSpan(name, options?)` shape —
21
- * the plugin only calls the two methods it strictly needs.
22
- */
23
- export interface OtelTracer {
24
- startSpan: (name: string, options?: {
25
- attributes?: Record<string, string | number | boolean>;
26
- }) => OtelSpan;
27
- }
28
- export interface OtelPluginOptions {
29
- /**
30
- * Rename incoming `project:target` IDs before they become OTel
31
- * span names. Defaults to passing the id through unchanged.
32
- */
33
- renameSpan?: (task: Task) => string;
34
- /** Tracer used to emit spans. Required — pass the one from `@opentelemetry/api`'s `trace.getTracer("vis")`. */
35
- tracer: OtelTracer;
36
- }
37
- /**
38
- * Reference plugin that maps vis hook lifecycle events to OTel spans.
39
- *
40
- * Emits:
41
- * - one **root span** named `vis.run` spanning `run:before` → `run:after`
42
- * - one **child span** per task spanning `task:before` → `task:after`
43
- * with attributes `vis.task.id`, `vis.task.project`, `vis.task.target`,
44
- * `vis.task.cache_status`, `vis.task.exit_code`
45
- * - `task:failure` sets span status to ERROR and records the exit code
46
- *
47
- * Streaming stdout/stderr events are intentionally **not** emitted as
48
- * span events — high-frequency chunks would blow up OTel backends. Use
49
- * a log exporter if you need stream-level visibility.
50
- * @example
51
- * ```ts
52
- * import { trace } from "@opentelemetry/api";
53
- * import { defineConfig } from "@visulima/vis/config";
54
- * import { otelPlugin } from "@visulima/vis/plugins/otel";
55
- *
56
- * const tracer = trace.getTracer("vis", "1.0.0");
57
- *
58
- * export default defineConfig({
59
- * plugins: [otelPlugin({ tracer })],
60
- * });
61
- * ```
62
- */
63
- export declare const otelPlugin: (options: OtelPluginOptions) => VisPlugin;
@@ -1,3 +0,0 @@
1
- import type { Plugin } from "@visulima/cerebro";
2
- declare const postCommandPlugin: (upgradeCheckCallback?: () => void) => Plugin;
3
- export default postCommandPlugin;
@@ -1,3 +0,0 @@
1
- import type { Plugin } from "@visulima/cerebro";
2
- declare const securityEnforcementPlugin: Plugin;
3
- export default securityEnforcementPlugin;
@@ -1,44 +0,0 @@
1
- /**
2
- * Shared helper for executing package manager commands via native Rust bindings.
3
- * Falls back to JS-based detection when native bindings are unavailable.
4
- */
5
- import type { AddOptions, DlxOptions, ExecOptions, InstallOptions, OutdatedOptions, RemoveOptions, ResolvedCommand, WhyOptions } from "./native-binding.d.ts";
6
- interface PmInfo {
7
- name: "bun" | "npm" | "pnpm" | "yarn";
8
- version: string;
9
- }
10
- declare const detectPm: (cwd: string) => PmInfo;
11
- declare const runInstall: (pm: PmInfo, options: InstallOptions, cwd: string, logger: Console) => number;
12
- declare const runAdd: (pm: PmInfo, options: AddOptions, cwd: string, logger: Console) => number;
13
- declare const runRemove: (pm: PmInfo, options: RemoveOptions, cwd: string, logger: Console) => number;
14
- declare const runDedupe: (pm: PmInfo, check: boolean, cwd: string, logger: Console) => number;
15
- declare const runWhy: (pm: PmInfo, options: WhyOptions, cwd: string, logger: Console) => number;
16
- declare const runOutdated: (pm: PmInfo, options: OutdatedOptions, cwd: string, logger: Console) => number;
17
- interface InfoOptions {
18
- fields: string[];
19
- json: boolean;
20
- package: string;
21
- }
22
- /**
23
- * Resolves a registry metadata lookup to a runnable command. Built in TS
24
- * rather than the Rust resolver because bun needs `pm view` (two-word
25
- * subcommand) and yarn berry needs `yarn npm info` — both shapes the existing
26
- * `resolve_pm_command` view branch gets wrong.
27
- *
28
- * Pure function — exported for unit testing.
29
- */
30
- declare const resolveInfo: (pm: PmInfo, options: InfoOptions) => ResolvedCommand;
31
- declare const runInfo: (pm: PmInfo, options: InfoOptions, cwd: string, logger: Console) => number;
32
- /**
33
- * Resolves and runs a PM `link` operation. Passes `pm.version` to the native
34
- * resolver so it can warn about pnpm v11 restrictions (arg-less link and
35
- * global-store name resolution were removed). `target` is `null` for arg-less
36
- * link, or a package name / path string.
37
- */
38
- declare const runLink: (pm: PmInfo, target: string | null, cwd: string, logger: Console) => number;
39
- declare const runUnlink: (pm: PmInfo, packages: string[], recursive: boolean, cwd: string, logger: Console) => number;
40
- declare const runDlx: (pm: PmInfo, options: DlxOptions, cwd: string, logger: Console) => number;
41
- declare const runExec: (pm: PmInfo, options: ExecOptions, cwd: string, logger: Console) => number;
42
- declare const runPmSubcommand: (pm: PmInfo, subcommand: string, args: string[], cwd: string, logger: Console) => number;
43
- export type { InfoOptions, PmInfo };
44
- export { detectPm, resolveInfo, runAdd, runDedupe, runDlx, runExec, runInfo, runInstall, runLink, runOutdated, runPmSubcommand, runRemove, runUnlink, runWhy };
@@ -1,40 +0,0 @@
1
- import type { TaskResults } from "@visulima/task-runner";
2
- /**
3
- * Formats a compact one-line timing summary for display after a run.
4
- * @param results Task execution results.
5
- * @param durationMs Total wall-clock duration in milliseconds.
6
- * @returns A formatted summary string, e.g. "3 succeeded · 1 cached · 0 failed · 2.4s"
7
- */
8
- export declare const formatTimingSummary: (results: TaskResults, durationMs: number) => string;
9
- /**
10
- * Shape of a persisted run summary — only the fields this module + the
11
- * flakiness analyzer consume. Kept narrow so both consumers can share
12
- * one loader without pulling in the full `RunSummary` type from
13
- * task-runner.
14
- */
15
- export interface LoadedRunSummary {
16
- [key: string]: unknown;
17
- duration?: number;
18
- startTime?: string;
19
- tasks?: unknown[];
20
- }
21
- /**
22
- * Reads every `.task-runner/runs/*.json` once and returns the parsed
23
- * array. Callers that need to iterate historical runs (timing average,
24
- * flakiness analysis) should call this once per command and feed the
25
- * result into the downstream helpers rather than re-reading the
26
- * directory multiple times.
27
- *
28
- * Corrupt or unreadable files are skipped silently — a single bad
29
- * summary shouldn't take down the whole analysis.
30
- */
31
- export declare const loadRunSummaries: (workspaceRoot: string) => LoadedRunSummary[];
32
- /**
33
- * Loads durations from historical run summaries and computes the
34
- * average. Returns the comparison string or `undefined` if no history.
35
- *
36
- * Pass `summaries` (from {@link loadRunSummaries}) when the caller
37
- * has already loaded the history for another purpose (e.g. flakiness
38
- * analysis on a failing run) to avoid re-reading the same files.
39
- */
40
- export declare const compareDuration: (workspaceRoot: string, currentDurationMs: number, summaries?: LoadedRunSummary[]) => string | undefined;
@@ -1,27 +0,0 @@
1
- /**
2
- * Runtime-version mismatch finding. vis doesn't manage runtimes directly,
3
- * but it can warn when the currently running Node/Bun/Deno doesn't match
4
- * whatever the repo has declared — usually a sign the user forgot to
5
- * switch runtimes for this workspace.
6
- */
7
- export interface RuntimeFinding {
8
- actual: string;
9
- expected: string;
10
- kind: "node" | "packageManager";
11
- message: string;
12
- severity: "error" | "warning";
13
- }
14
- /**
15
- * Evaluates a minimal subset of semver ranges: `>=X`, `X.Y`, `X.Y.Z`,
16
- * and compound `>=X &lt;Y`. Returns true if `actual` satisfies the range.
17
- * Falls back to "true" for unrecognised syntax rather than false so we
18
- * don't spam warnings on exotic ranges.
19
- */
20
- export declare const satisfiesRange: (actual: string, range: string) => boolean;
21
- /**
22
- * Checks `engines.node`, `.nvmrc`, `.node-version`, and `packageManager`
23
- * against the running process.
24
- * @param workspaceRoot Absolute path to the workspace root.
25
- * @returns Findings; an empty array means everything matches.
26
- */
27
- export declare const checkRuntimeVersions: (workspaceRoot: string) => RuntimeFinding[];
@@ -1,39 +0,0 @@
1
- import type { ProjectGraph, WorkspaceConfiguration } from "@visulima/task-runner";
2
- import type { CycloneDxBom } from "./types.d.ts";
3
- export interface BuildSbomOptions {
4
- /** If set, limit the emitted BOM to these projects + their transitive closure. */
5
- focus?: string[];
6
- /** Optional package.json version of vis itself — stamped into `metadata.tools`. */
7
- generatorVersion?: string;
8
- /** Include devDependencies in the emitted BOM (default: false — production only). */
9
- includeDev?: boolean;
10
- /**
11
- * Override the `serialNumber`. Useful for deterministic tests; in
12
- * production the builder generates one per call.
13
- */
14
- now?: Date;
15
- /** Project graph used for resolving focus closure and dependency edges. */
16
- projectGraph: ProjectGraph;
17
- /** Override the `serialNumber` (defaults to a fresh UUID). */
18
- serialNumber?: string;
19
- /** Workspace configuration with resolved project roots. */
20
- workspace: WorkspaceConfiguration;
21
- /** Workspace root on disk. */
22
- workspaceRoot: string;
23
- }
24
- /**
25
- * Builds the BOM from workspace + lockfile data. Pure function — all
26
- * I/O is relative to `workspaceRoot` so tests point it at a temp dir.
27
- */
28
- export declare const buildCycloneDxBom: (options: BuildSbomOptions) => CycloneDxBom;
29
- /**
30
- * Serialises a {@link CycloneDxBom} document to CycloneDX 1.6 XML.
31
- *
32
- * Delegates all escaping, indentation, and attribute serialisation to
33
- * the project-standard `jstoxml` library (already used elsewhere in
34
- * the monorepo — see `packages/api/api-platform` and
35
- * `packages/error-debugging/error-handler`). We only translate our
36
- * typed JSON-shaped BOM into jstoxml's `{ _name, _attrs, _content }`
37
- * tree.
38
- */
39
- export declare const serializeBomToXml: (bom: CycloneDxBom) => string;
@@ -1,49 +0,0 @@
1
- /**
2
- * Per-version metadata lookup for installed packages.
3
- *
4
- * An SBOM needs each `name@version` component to declare its own
5
- * licence, description, and author — not the top-level project's.
6
- * Different versions of the same package can ship different licence
7
- * texts (common during a licence migration, e.g. `foo@4` is MIT but
8
- * `foo@5` is Apache-2.0), so we resolve the metadata against the
9
- * specific on-disk install tree rather than the lockfile or a single
10
- * hoisted copy.
11
- *
12
- * The helper is best-effort: we try common install-tree layouts in
13
- * order and return `undefined` the moment we fail to find a match. A
14
- * missing metadata doesn't block SBOM generation — the component is
15
- * just emitted without licence/author/description decoration.
16
- */
17
- import type { RawLicenseInput } from "./license.d.ts";
18
- /** Subset of `package.json` surfaced onto installed-package components. */
19
- export interface InstalledPackageMetadata extends RawLicenseInput {
20
- author?: string | {
21
- email?: string;
22
- name?: string;
23
- url?: string;
24
- };
25
- bugs?: string | {
26
- url?: string;
27
- };
28
- description?: string;
29
- homepage?: string;
30
- name?: string;
31
- repository?: string | {
32
- type?: string;
33
- url?: string;
34
- };
35
- version?: string;
36
- }
37
- /**
38
- * Looks up the installed `package.json` for a specific `name@version`.
39
- * Tries pnpm's virtual store first (exact match by construction), then
40
- * falls back to the hoisted `node_modules/&lt;name>/package.json` if its
41
- * version matches.
42
- *
43
- * Returns `undefined` if nothing on disk matches the requested version,
44
- * **or if `name`/`version` contains characters that could be used for
45
- * path traversal**. A malicious lockfile carrying e.g.
46
- * `version: "../../../etc"` would otherwise escape `workspaceRoot`
47
- * because `join` collapses `..` segments.
48
- */
49
- export declare const readInstalledPackageMetadata: (workspaceRoot: string, name: string, version: string) => InstalledPackageMetadata | undefined;
@@ -1,31 +0,0 @@
1
- import type { LicenseChoice } from "./types.d.ts";
2
- /**
3
- * Case-insensitively resolves a raw licence string to its canonical
4
- * SPDX ID, or `undefined` if the input doesn't match anything we know
5
- * about.
6
- */
7
- export declare const normalizeSpdxId: (raw: string) => string | undefined;
8
- /** Shape we accept from raw `package.json` metadata. */
9
- export interface RawLicenseInput {
10
- /** Legacy `license: { type: "MIT" }` form. */
11
- license?: {
12
- type?: string;
13
- } | string;
14
- /** Legacy `licenses: [{ type: "MIT" }]` array form. */
15
- licenses?: {
16
- type?: string;
17
- }[];
18
- }
19
- /**
20
- * Extracts a single licence declaration from a `package.json` (or
21
- * similar), converting it to the CycloneDX {@link LicenseChoice}
22
- * shape. Supports the three encodings npm has historically blessed:
23
- *
24
- * - `license: "MIT"` (string)
25
- * - `license: "(MIT OR Apache-2.0)"` (SPDX expression)
26
- * - `license: { type: "MIT" }` (object, deprecated but common)
27
- * - `licenses: [{ type: "MIT" }, …]` (array, deprecated)
28
- *
29
- * Returns `undefined` if no licence was declared.
30
- */
31
- export declare const extractLicenseChoice: (input: RawLicenseInput) => LicenseChoice | undefined;
@@ -1,34 +0,0 @@
1
- /**
2
- * Thin CycloneDX-shaped adapter over the shared lockfile parser in
3
- * `@visulima/package`. The cross-package parser returns a
4
- * package-manager-agnostic `{ name, version, integrity: { algorithm, hex } }`
5
- * shape; CycloneDX 1.6 expects hashes as `{ alg: "SHA-256" | …, content }`,
6
- * so we translate the algorithm casing here.
7
- */
8
- import type { LockFileType } from "@visulima/package";
9
- import type { Hash } from "./types.d.ts";
10
- /** Exposed so downstream callers (and tests) can stay decoupled from `@visulima/package`. */
11
- /** Resolved package in the shape the SBOM builder consumes. */
12
- export interface ResolvedPackage {
13
- /**
14
- * Declared runtime deps — `name → specifier[]` from the lockfile.
15
- * Arrays preserve pnpm v9+ peer-context variants that resolve the
16
- * same dep name to different versions.
17
- */
18
- dependencies?: Record<string, string[]>;
19
- hash?: Hash;
20
- name: string;
21
- optionalDependencies?: Record<string, string[]>;
22
- peerDependencies?: Record<string, string[]>;
23
- version: string;
24
- }
25
- /**
26
- * Reads the lockfile at `workspaceRoot` (not ancestors — workspaces
27
- * own their lockfile) and returns entries keyed by `name@version`.
28
- * Returns `undefined` if no supported lockfile is present.
29
- */
30
- export declare const readLockfilePackages: (workspaceRoot: string) => {
31
- packages: Map<string, ResolvedPackage>;
32
- type: LockFileType;
33
- } | undefined;
34
- export { type LockFileType } from "@visulima/package";
@@ -1,25 +0,0 @@
1
- /**
2
- * Zero-dependency implementation of the Package URL (PURL) spec, scoped
3
- * to the `pkg:npm/…` type — the only scheme CycloneDX 1.6 needs for
4
- * npm-ecosystem SBOMs.
5
- *
6
- * Reference: https://github.com/package-url/purl-spec/blob/master/PURL-TYPES.rst#npm
7
- *
8
- * Rules we implement:
9
- *
10
- * 1. The `name` segment is **lowercased** for `pkg:npm` (npm package
11
- * names are already case-insensitive in the registry).
12
- * 2. Scope is carried as a PURL **namespace** (`pkg:npm/@scope/name`)
13
- * with the `@` percent-encoded per RFC 3986 (→ `%40`).
14
- * 3. `name`, `namespace`, and `version` segments are percent-encoded
15
- * using the "unreserved characters + colon/slash inside version"
16
- * ruleset — we keep this small and conservative (encode anything
17
- * outside `[A-Za-z0-9._~-]`).
18
- */
19
- /**
20
- * Builds a `pkg:npm/…` Package URL from an npm package name + version.
21
- * @param packageName The npm package name, scoped or unscoped.
22
- * @param version The resolved exact version.
23
- * @returns A well-formed PURL string.
24
- */
25
- export declare const toNpmPurl: (packageName: string, version: string) => string;
@@ -1,24 +0,0 @@
1
- /**
2
- * Resolves `name + specifier` to a concrete `name@version` install from
3
- * a lockfile-derived index.
4
- *
5
- * Lockfiles don't encode every edge uniformly:
6
- *
7
- * - pnpm stores **resolved** versions in each entry's `dependencies`
8
- * sub-map, so the specifier is already the install's exact version.
9
- * - npm / yarn / bun store **semver ranges** (or dist-tags); we have
10
- * to match the range against the set of versions we know exist for
11
- * the given `name`.
12
- *
13
- * We try exact match first (cheap, handles pnpm), then fall back to
14
- * `semver.maxSatisfying` over every known version of `name`, and
15
- * finally to "pick one version" so a partial-lockfile input still
16
- * produces a best-effort edge.
17
- */
18
- /** `name → Set&lt;version>` index built from every lockfile entry. */
19
- export type VersionIndex = Map<string, Set<string>>;
20
- /**
21
- * Resolves a single `name + specifier` pair to a concrete version, or
22
- * `undefined` if the name isn't in the lockfile at all.
23
- */
24
- export declare const resolveSpecifier: (name: string, specifier: string, index: VersionIndex) => string | undefined;