@visulima/vis 1.0.0-alpha.4 → 1.0.0-alpha.40

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 (345) hide show
  1. package/CHANGELOG.md +1216 -78
  2. package/LICENSE.md +13068 -6
  3. package/README.md +388 -26
  4. package/dashboard/dist/index.html +152 -0
  5. package/dist/bin.js +1 -853
  6. package/dist/binx.js +3 -0
  7. package/dist/config/index.d.ts +3258 -0
  8. package/dist/config/index.js +1 -0
  9. package/dist/generate/index.d.ts +157 -0
  10. package/dist/generate/index.js +1 -0
  11. package/dist/packem_chunks/DEFAULT_CLEAN_KEEP.js +1 -0
  12. package/dist/packem_chunks/bin.js +1198 -0
  13. package/dist/packem_chunks/bloom-status.js +2 -0
  14. package/dist/packem_chunks/bloom-sync.js +2 -0
  15. package/dist/packem_chunks/cache-attestation.js +1 -0
  16. package/dist/packem_chunks/catalog-detector.js +1 -0
  17. package/dist/packem_chunks/config.js +21 -0
  18. package/dist/packem_chunks/detect.js +3 -0
  19. package/dist/packem_chunks/detect2.js +8 -0
  20. package/dist/packem_chunks/devtools.js +81 -0
  21. package/dist/packem_chunks/discord.js +4 -0
  22. package/dist/packem_chunks/doctor-probe.js +2 -0
  23. package/dist/packem_chunks/dynamic-import.js +1 -0
  24. package/dist/packem_chunks/extra-files.js +3 -0
  25. package/dist/packem_chunks/fix.js +11 -0
  26. package/dist/packem_chunks/git.js +3 -0
  27. package/dist/packem_chunks/handler.js +1 -0
  28. package/dist/packem_chunks/handler10.js +1 -0
  29. package/dist/packem_chunks/handler11.js +5 -0
  30. package/dist/packem_chunks/handler12.js +1 -0
  31. package/dist/packem_chunks/handler13.js +27 -0
  32. package/dist/packem_chunks/handler14.js +5 -0
  33. package/dist/packem_chunks/handler15.js +1 -0
  34. package/dist/packem_chunks/handler16.js +1 -0
  35. package/dist/packem_chunks/handler17.js +1 -0
  36. package/dist/packem_chunks/handler18.js +1 -0
  37. package/dist/packem_chunks/handler19.js +1 -0
  38. package/dist/packem_chunks/handler2.js +4 -0
  39. package/dist/packem_chunks/handler20.js +5 -0
  40. package/dist/packem_chunks/handler21.js +2 -0
  41. package/dist/packem_chunks/handler22.js +2 -0
  42. package/dist/packem_chunks/handler23.js +1 -0
  43. package/dist/packem_chunks/handler24.js +1 -0
  44. package/dist/packem_chunks/handler25.js +1 -0
  45. package/dist/packem_chunks/handler26.js +5 -0
  46. package/dist/packem_chunks/handler27.js +1 -0
  47. package/dist/packem_chunks/handler28.js +3 -0
  48. package/dist/packem_chunks/handler29.js +1 -0
  49. package/dist/packem_chunks/handler3.js +4 -0
  50. package/dist/packem_chunks/handler30.js +2 -0
  51. package/dist/packem_chunks/handler31.js +2 -0
  52. package/dist/packem_chunks/handler32.js +2 -0
  53. package/dist/packem_chunks/handler33.js +3 -0
  54. package/dist/packem_chunks/handler34.js +6 -0
  55. package/dist/packem_chunks/handler35.js +1 -0
  56. package/dist/packem_chunks/handler36.js +42 -0
  57. package/dist/packem_chunks/handler37.js +8 -0
  58. package/dist/packem_chunks/handler38.js +9 -0
  59. package/dist/packem_chunks/handler39.js +75 -0
  60. package/dist/packem_chunks/handler4.js +6 -0
  61. package/dist/packem_chunks/handler40.js +5 -0
  62. package/dist/packem_chunks/handler41.js +4 -0
  63. package/dist/packem_chunks/handler42.js +3 -0
  64. package/dist/packem_chunks/handler43.js +2 -0
  65. package/dist/packem_chunks/handler44.js +1 -0
  66. package/dist/packem_chunks/handler45.js +1 -0
  67. package/dist/packem_chunks/handler46.js +1 -0
  68. package/dist/packem_chunks/handler47.js +3 -0
  69. package/dist/packem_chunks/handler48.js +1 -0
  70. package/dist/packem_chunks/handler49.js +7 -0
  71. package/dist/packem_chunks/handler5.js +8 -0
  72. package/dist/packem_chunks/handler50.js +33 -0
  73. package/dist/packem_chunks/handler51.js +3 -0
  74. package/dist/packem_chunks/handler52.js +8 -0
  75. package/dist/packem_chunks/handler53.js +4 -0
  76. package/dist/packem_chunks/handler54.js +1 -0
  77. package/dist/packem_chunks/handler55.js +12 -0
  78. package/dist/packem_chunks/handler56.js +7 -0
  79. package/dist/packem_chunks/handler57.js +5 -0
  80. package/dist/packem_chunks/handler58.js +11 -0
  81. package/dist/packem_chunks/handler59.js +3 -0
  82. package/dist/packem_chunks/handler6.js +1 -0
  83. package/dist/packem_chunks/handler60.js +22 -0
  84. package/dist/packem_chunks/handler61.js +61 -0
  85. package/dist/packem_chunks/handler62.js +3 -0
  86. package/dist/packem_chunks/handler63.js +6 -0
  87. package/dist/packem_chunks/handler64.js +708 -0
  88. package/dist/packem_chunks/handler65.js +24 -0
  89. package/dist/packem_chunks/handler66.js +25 -0
  90. package/dist/packem_chunks/handler67.js +153 -0
  91. package/dist/packem_chunks/handler68.js +10 -0
  92. package/dist/packem_chunks/handler69.js +24 -0
  93. package/dist/packem_chunks/handler7.js +1 -0
  94. package/dist/packem_chunks/handler70.js +322 -0
  95. package/dist/packem_chunks/handler71.js +48 -0
  96. package/dist/packem_chunks/handler72.js +27 -0
  97. package/dist/packem_chunks/handler73.js +3 -0
  98. package/dist/packem_chunks/handler74.js +190 -0
  99. package/dist/packem_chunks/handler75.js +38 -0
  100. package/dist/packem_chunks/handler8.js +1 -0
  101. package/dist/packem_chunks/handler9.js +1 -0
  102. package/dist/packem_chunks/heal-accept.js +10 -0
  103. package/dist/packem_chunks/heal.js +14 -0
  104. package/dist/packem_chunks/help-command.js +31 -0
  105. package/dist/packem_chunks/index.js +1 -0
  106. package/dist/packem_chunks/index2.js +7 -0
  107. package/dist/packem_chunks/interface.js +2 -0
  108. package/dist/packem_chunks/keys-refresh.js +4 -0
  109. package/dist/packem_chunks/list.js +3 -0
  110. package/dist/packem_chunks/loader.js +4 -0
  111. package/dist/packem_chunks/loader2.js +1 -0
  112. package/dist/packem_chunks/orchestrator.js +39 -0
  113. package/dist/packem_chunks/pre-mode.js +2 -0
  114. package/dist/packem_chunks/print-config.js +2 -0
  115. package/dist/packem_chunks/prompts.js +7 -0
  116. package/dist/packem_chunks/prune.js +3 -0
  117. package/dist/packem_chunks/publish-guards.js +1 -0
  118. package/dist/packem_chunks/registry.js +48 -0
  119. package/dist/packem_chunks/resolveFormatter.js +9 -0
  120. package/dist/packem_chunks/run.js +1 -0
  121. package/dist/packem_chunks/security.js +1 -0
  122. package/dist/packem_chunks/shell-runner.js +1 -0
  123. package/dist/packem_chunks/slack.js +2 -0
  124. package/dist/packem_chunks/snapshot.js +2 -0
  125. package/dist/packem_chunks/stage-publisher.js +1 -0
  126. package/dist/packem_chunks/staged-registry.js +2 -0
  127. package/dist/packem_chunks/state.js +3 -0
  128. package/dist/packem_chunks/status.js +2 -0
  129. package/dist/packem_chunks/success-walk.js +8 -0
  130. package/dist/packem_chunks/sync.js +2 -0
  131. package/dist/packem_chunks/sync2.js +2 -0
  132. package/dist/packem_chunks/tar.js +3 -0
  133. package/dist/packem_chunks/tripwire.js +2 -0
  134. package/dist/packem_chunks/verify-lockfile.js +2 -0
  135. package/dist/packem_chunks/version-resolver.js +2 -0
  136. package/dist/packem_chunks/webhook.js +1 -0
  137. package/dist/packem_chunks/workflow-templates.js +167 -0
  138. package/dist/packem_chunks/workspace.js +2 -0
  139. package/dist/packem_shared/AfterAllProjectsVersioned-CAKI2nWf.js +1 -0
  140. package/dist/packem_shared/CONFIG_FILES-BfaR0jKT.js +1 -0
  141. package/dist/packem_shared/MultiSpinner-B9U0-aE3-B-gIXhFk.js +3 -0
  142. package/dist/packem_shared/ReleaseClient-YHzBIxYS.js +1 -0
  143. package/dist/packem_shared/Table-CcVkyULl-B_ef6zfS.js +35 -0
  144. package/dist/packem_shared/VisReleaseError-DMGRBTNO.js +1 -0
  145. package/dist/packem_shared/_commonjsHelpers-B5Y90VFO.js +1 -0
  146. package/dist/packem_shared/advisories-DLeO5KMN.js +1 -0
  147. package/dist/packem_shared/affected-shas-cVnX8-zs.js +1 -0
  148. package/dist/packem_shared/ai-analysis-BUeX2J2H.js +68 -0
  149. package/dist/packem_shared/ai-fix-9Vzlp6XU.js +43 -0
  150. package/dist/packem_shared/anolilab-text-CAM_E6uK.js +13 -0
  151. package/dist/packem_shared/api.d-BPftyU9r.d.ts +27 -0
  152. package/dist/packem_shared/build-scripts-CCCi8U66.js +1 -0
  153. package/dist/packem_shared/createAdapter-bU4DIP3F.js +1 -0
  154. package/dist/packem_shared/createVersionActions-BK43SNDH.js +1 -0
  155. package/dist/packem_shared/cyclonedx-kYozDyxp.js +4 -0
  156. package/dist/packem_shared/defineFormatter-D5dCp6Kv.js +1 -0
  157. package/dist/packem_shared/definePlugin-DoUcoYSy.js +1 -0
  158. package/dist/packem_shared/dependency-scan-DnTgYleU.js +1 -0
  159. package/dist/packem_shared/docker-BMLrNtWm.js +59 -0
  160. package/dist/packem_shared/failure-log-CEWP3bP0.js +2 -0
  161. package/dist/packem_shared/giget-DHY1sQZC.js +2 -0
  162. package/dist/packem_shared/glob-fqg4KepW-B7EjLRvw.js +1 -0
  163. package/dist/packem_shared/index-BDmTbWX1.js +19 -0
  164. package/dist/packem_shared/index-CgcF6_wo.js +1 -0
  165. package/dist/packem_shared/index-Du8RWawQ.js +1 -0
  166. package/dist/packem_shared/index-yBikBkHT.js +30 -0
  167. package/dist/packem_shared/interface.d-B7VK2rcH.d.ts +148 -0
  168. package/dist/packem_shared/interface.d-Cezzifoh.d.ts +106 -0
  169. package/dist/packem_shared/license-t5KnNX6v.js +1 -0
  170. package/dist/packem_shared/lifecycle-4z9hHE5b.js +2 -0
  171. package/dist/packem_shared/lockfile-C8Q1_4KK.js +1 -0
  172. package/dist/packem_shared/manifests-Dj3pRKBT.js +1 -0
  173. package/dist/packem_shared/min-release-age-D1alDE3K.js +34 -0
  174. package/dist/packem_shared/missing-package-json-8vNHwbqw.js +1 -0
  175. package/dist/packem_shared/native-config-sync-BEkJW7g3.js +21 -0
  176. package/dist/packem_shared/osv-bloom-B03tUWf3.js +2 -0
  177. package/dist/packem_shared/otelPlugin-DmKDBaPo.js +1 -0
  178. package/dist/packem_shared/peer-warnings-BXAzXqY3.js +1 -0
  179. package/dist/packem_shared/pm-runner-OGResYrA.js +1 -0
  180. package/dist/packem_shared/provenance-_CJjMKwu.js +1 -0
  181. package/dist/packem_shared/public-api-WqUCiyIe.js +131 -0
  182. package/dist/packem_shared/registry-keys-BfFto6vI.js +1 -0
  183. package/dist/packem_shared/resolve-explicit-CMDl55Nz.js +5 -0
  184. package/dist/packem_shared/runtime-check-Stc9AI78.js +1 -0
  185. package/dist/packem_shared/s1ngularity-Dhr3bPk0.js +1 -0
  186. package/dist/packem_shared/scan-progress-CFhc0CMj.js +2 -0
  187. package/dist/packem_shared/selectors-GCJIe342.js +3 -0
  188. package/dist/packem_shared/signatures-C730vkyK.js +2 -0
  189. package/dist/packem_shared/slug-DoueYuLo.js +1 -0
  190. package/dist/packem_shared/spinner-CV3WVJLv.js +1 -0
  191. package/dist/packem_shared/sticky-comment-D6_7-w8T.js +1 -0
  192. package/dist/packem_shared/subtree-C7bZuiSQ.js +2 -0
  193. package/dist/packem_shared/symbols-DPTlrJ3B.js +1 -0
  194. package/dist/packem_shared/tabs-BuTy5gPV.js +1 -0
  195. package/dist/packem_shared/toolchain-pR7AJ-tB.js +5 -0
  196. package/dist/packem_shared/typosquats-DN78xx1x.js +1 -0
  197. package/dist/packem_shared/use-measured-height-_eVGWtWt.js +1 -0
  198. package/dist/packem_shared/utils-Cxree603.js +1 -0
  199. package/dist/packem_shared/verify-6WCmFmy8.js +1 -0
  200. package/dist/packem_shared/vis-update-app-k3fDxech.js +1 -0
  201. package/dist/packem_shared/watch-BvIwLG4N.js +1 -0
  202. package/dist/packem_shared/watch-loop-DWkvv2tK.js +11 -0
  203. package/dist/release/core/changelog/index.d.ts +5 -0
  204. package/dist/release/core/changelog/index.js +1 -0
  205. package/dist/release/core/package-managers/index.d.ts +6 -0
  206. package/dist/release/core/package-managers/index.js +1 -0
  207. package/dist/release/core/version-actions/index.d.ts +14 -0
  208. package/dist/release/core/version-actions/index.js +1 -0
  209. package/dist/release/index.d.ts +196 -0
  210. package/dist/release/index.js +1 -0
  211. package/dist/release/plugin-sdk.d.ts +127 -0
  212. package/dist/release/plugin-sdk.js +1 -0
  213. package/dist/release/presets.d.ts +225 -0
  214. package/dist/release/presets.js +1 -0
  215. package/dist/release/types.d.ts +1377 -0
  216. package/dist/release/types.js +1 -0
  217. package/index.d.ts +436 -0
  218. package/index.js +80 -57
  219. package/package.json +109 -45
  220. package/schemas/project.schema.json +991 -0
  221. package/schemas/vis-config.schema.json +6377 -0
  222. package/schemas/vis-release-config.schema.json +1390 -0
  223. package/skills/vis/SKILL.md +96 -0
  224. package/templates/buildkite-ci/.buildkite/pipeline.yml.tera +85 -0
  225. package/templates/buildkite-ci/template.yml +20 -0
  226. package/dist/ai-analysis.d.ts +0 -40
  227. package/dist/ai-cache.d.ts +0 -21
  228. package/dist/audit-config.d.ts +0 -24
  229. package/dist/bin.d.ts +0 -1
  230. package/dist/catalog.d.ts +0 -118
  231. package/dist/commands/add.d.ts +0 -3
  232. package/dist/commands/affected.d.ts +0 -3
  233. package/dist/commands/ai.d.ts +0 -3
  234. package/dist/commands/analyze.d.ts +0 -3
  235. package/dist/commands/approve-builds.d.ts +0 -3
  236. package/dist/commands/audit.d.ts +0 -23
  237. package/dist/commands/check.d.ts +0 -3
  238. package/dist/commands/clean.d.ts +0 -3
  239. package/dist/commands/create/discovery.d.ts +0 -42
  240. package/dist/commands/create/index.d.ts +0 -13
  241. package/dist/commands/create/prompts.d.ts +0 -31
  242. package/dist/commands/create/random-name.d.ts +0 -15
  243. package/dist/commands/create/templates/builtin.d.ts +0 -15
  244. package/dist/commands/create/templates/generator.d.ts +0 -14
  245. package/dist/commands/create/templates/index.d.ts +0 -13
  246. package/dist/commands/create/templates/monorepo.d.ts +0 -16
  247. package/dist/commands/create/templates/remote.d.ts +0 -41
  248. package/dist/commands/create/templates/types.d.ts +0 -46
  249. package/dist/commands/create/utils.d.ts +0 -42
  250. package/dist/commands/dedupe.d.ts +0 -3
  251. package/dist/commands/devcontainer.d.ts +0 -3
  252. package/dist/commands/dlx.d.ts +0 -3
  253. package/dist/commands/doctor.d.ts +0 -15
  254. package/dist/commands/exec.d.ts +0 -3
  255. package/dist/commands/graph.d.ts +0 -3
  256. package/dist/commands/hook/constants.d.ts +0 -8
  257. package/dist/commands/hook/index.d.ts +0 -3
  258. package/dist/commands/hook/install.d.ts +0 -7
  259. package/dist/commands/hook/migrate.d.ts +0 -27
  260. package/dist/commands/hook/uninstall.d.ts +0 -3
  261. package/dist/commands/implode.d.ts +0 -3
  262. package/dist/commands/init.d.ts +0 -14
  263. package/dist/commands/install.d.ts +0 -3
  264. package/dist/commands/link.d.ts +0 -3
  265. package/dist/commands/migrate/constants.d.ts +0 -12
  266. package/dist/commands/migrate/deps.d.ts +0 -32
  267. package/dist/commands/migrate/index.d.ts +0 -3
  268. package/dist/commands/migrate/json.d.ts +0 -20
  269. package/dist/commands/migrate/lint-staged.d.ts +0 -62
  270. package/dist/commands/migrate/types.d.ts +0 -20
  271. package/dist/commands/optimize.d.ts +0 -38
  272. package/dist/commands/pm.d.ts +0 -3
  273. package/dist/commands/remove.d.ts +0 -3
  274. package/dist/commands/run.d.ts +0 -3
  275. package/dist/commands/sort-package-json.d.ts +0 -3
  276. package/dist/commands/staged.d.ts +0 -3
  277. package/dist/commands/unlink.d.ts +0 -3
  278. package/dist/commands/update.d.ts +0 -3
  279. package/dist/commands/upgrade.d.ts +0 -3
  280. package/dist/commands/why.d.ts +0 -3
  281. package/dist/config.d.ts +0 -67
  282. package/dist/config.js +0 -1
  283. package/dist/native-binding.d.ts +0 -151
  284. package/dist/output.d.ts +0 -40
  285. package/dist/overrides.d.ts +0 -82
  286. package/dist/package-manager.d.ts +0 -23
  287. package/dist/plugins/config-loader.d.ts +0 -3
  288. package/dist/plugins/post-command.d.ts +0 -3
  289. package/dist/plugins/security-enforcement.d.ts +0 -3
  290. package/dist/pm-runner.d.ts +0 -23
  291. package/dist/security.d.ts +0 -64
  292. package/dist/socket-security.d.ts +0 -129
  293. package/dist/tips.d.ts +0 -41
  294. package/dist/tui/components/CheckProgressApp.d.ts +0 -6
  295. package/dist/tui/components/CommandSummary.d.ts +0 -17
  296. package/dist/tui/components/Header.d.ts +0 -13
  297. package/dist/tui/components/OutputPanel.d.ts +0 -16
  298. package/dist/tui/components/QuitDialog.d.ts +0 -15
  299. package/dist/tui/components/TaskListPanel.d.ts +0 -19
  300. package/dist/tui/components/TaskRow.d.ts +0 -12
  301. package/dist/tui/components/TaskStore.d.ts +0 -80
  302. package/dist/tui/components/VisTaskRunnerApp.d.ts +0 -17
  303. package/dist/tui/components/devcontainer/DevcontainerStore.d.ts +0 -66
  304. package/dist/tui/components/devcontainer/VisDevcontainerApp.d.ts +0 -9
  305. package/dist/tui/components/devcontainer/catalogs/extensions.d.ts +0 -8
  306. package/dist/tui/components/devcontainer/catalogs/features.d.ts +0 -8
  307. package/dist/tui/components/devcontainer/catalogs/filters.d.ts +0 -4
  308. package/dist/tui/components/devcontainer/catalogs/mount-suggestions.d.ts +0 -19
  309. package/dist/tui/components/devcontainer/catalogs/templates.d.ts +0 -8
  310. package/dist/tui/components/devcontainer/devcontainer-io.d.ts +0 -14
  311. package/dist/tui/components/devcontainer/sections/DockerComposeSection.d.ts +0 -11
  312. package/dist/tui/components/devcontainer/sections/EnvironmentSection.d.ts +0 -16
  313. package/dist/tui/components/devcontainer/sections/ExtensionsSection.d.ts +0 -11
  314. package/dist/tui/components/devcontainer/sections/FeaturesSection.d.ts +0 -11
  315. package/dist/tui/components/devcontainer/sections/GeneralSection.d.ts +0 -12
  316. package/dist/tui/components/devcontainer/sections/LifecycleSection.d.ts +0 -13
  317. package/dist/tui/components/devcontainer/sections/MountsSection.d.ts +0 -16
  318. package/dist/tui/components/devcontainer/sections/PortsSection.d.ts +0 -10
  319. package/dist/tui/components/devcontainer/sections/PreviewPanel.d.ts +0 -11
  320. package/dist/tui/components/devcontainer/types.d.ts +0 -53
  321. package/dist/tui/components/devcontainer/validate.d.ts +0 -16
  322. package/dist/tui/components/graph/GraphStore.d.ts +0 -42
  323. package/dist/tui/components/graph/ProjectDetailPanel.d.ts +0 -10
  324. package/dist/tui/components/graph/ProjectListPanel.d.ts +0 -20
  325. package/dist/tui/components/graph/VisGraphApp.d.ts +0 -8
  326. package/dist/tui/components/optimize/OptimizeDetailPanel.d.ts +0 -9
  327. package/dist/tui/components/optimize/OptimizeListPanel.d.ts +0 -16
  328. package/dist/tui/components/optimize/OptimizeStore.d.ts +0 -50
  329. package/dist/tui/components/optimize/VisOptimizeApp.d.ts +0 -8
  330. package/dist/tui/components/optimize/constants.d.ts +0 -7
  331. package/dist/tui/components/update/PackageDetailPanel.d.ts +0 -12
  332. package/dist/tui/components/update/PackageListPanel.d.ts +0 -18
  333. package/dist/tui/components/update/UpdateStore.d.ts +0 -62
  334. package/dist/tui/components/update/VisUpdateApp.d.ts +0 -11
  335. package/dist/tui/dynamic-life-cycle.d.ts +0 -21
  336. package/dist/tui/formatting-utils.d.ts +0 -17
  337. package/dist/tui/pretty-time.d.ts +0 -8
  338. package/dist/tui/static-life-cycle.d.ts +0 -22
  339. package/dist/tui/status-utils.d.ts +0 -20
  340. package/dist/tui/symbols.d.ts +0 -7
  341. package/dist/tui/types.d.ts +0 -11
  342. package/dist/typosquats.d.ts +0 -70
  343. package/dist/upgrade-check.d.ts +0 -30
  344. package/dist/utils.d.ts +0 -22
  345. package/dist/workspace.d.ts +0 -315
@@ -0,0 +1 @@
1
+ import{createRequire as q}from"node:module";import{V as j,s as b}from"./Table-CcVkyULl-B_ef6zfS.js";import{m as M,f as T}from"./index-BDmTbWX1.js";import{g as A}from"./_commonjsHelpers-B5Y90VFO.js";import{l as g,p as c}from"../packem_chunks/bin.js";import{a as C}from"../packem_chunks/config.js";const $=q(import.meta.url),d=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,z=e=>{if(typeof d<"u"&&d.versions&&d.versions.node){const[s,r]=d.versions.node.split(".").map(Number);if(s>22||s===22&&r>=3||s===20&&r>=16)return d.getBuiltinModule(e)}return $(e)},{createInterface:_}=z("node:readline");var D=["aj","aju","av","avj","ejv","jav","jv"],O=["angula","angular-node","angularjs"],N=["auto-prefixer"],R=["aaxios","aios","axio","axioos","axios-node","axioss","axis","axiso","axois","axos","axxios"],S=["abel","babbel","babe","babel-js","babel-node","babl","bable","bbael","bebel"],B=["bcrpyt","bcrypt-node","brcypt","crypt","dcrypt"],F=["bcryptjs-node","dcryptjs"],P=["bunan","bunya","bunyan-node","buynan"],W=["cai","cha","chaijs","chal","chi","chia","hai"],E=["cahlk","calk","cchalk","ch4lk","cha1k","chaalk","chaik","chak","chakl","chalk-node","chalkk","challk","chhalk","chlak","chlk","halk","hcalk"],L=["cheero","cherio"],U=["c0lor","ccolor","clor","colo","coloor","color-js","colorjs","colorr","colr","coolor","coolr"],V=["ccolors","colors-node","colorss","colorz","colrs","coolors"],I=["c0mmander","ccommander","cmmander","cmomander","co-mmander","comamnder","comander","comm4nder","commaander","commader","commadner","commamder","command3r","commandder","commande","commandeer","commander-js","commanderr","commandr","commandre","commanedr","commaner","commannder","commender","commmander","commnader","commnder","coommander","ocmmander","ommander"],Y=["cor","corss","cos","cosr","cros","crs","ors"],G=["days"],H=["d3bug","dbeug","dbug","ddebug","debbug","debg","debgu","debu","debu9","debug-js","debug-node","debugg","debugjs","debuug","deebug","deubg","deug","ebug","edbug"],J=["dot-env","dotenv-node","dotenvjs","dotevn"],K=["3lectron","eectron","eelctron","eelectron","el3ctron","elcetron","elctron","elecctron","elecron","elecrton","electon","electorn","electr0n","electrn","electrno","electro","electrom","electron-node","electronn","electroon","electrron","electtron","eleectron","eletcron","eletron","ellectron","lectron","leectron"],Q=["asbuild","ebuild","esbuild-node","esbuildjs","ezbuild","sbuild"],X=["aslint","elint","eslint-js","eslint-node","eslit","ezlint","slint"],Z=["eexpress","epress","epxress","experss","expess","exppress","expreess","expres","express-node","expressjs","expresss","exprress","exprses","exprss","exress","exrpess","exxpress","xepress","xpress"],ee=["astify"],oe=["firebasejs"],se=["form1dable"],re=["glb","glo","glob-js","globjs","gob","golb","lob"],ae=["go","goot","gotjs","gott","gt","gto","ogt","ot","qot"],te=["helmetjs","helnet"],ne=["homo","hon","hoo","hoon","ohno","ono"],ce=["inquire","inquirer-js","nquirer"],ie=["iredis"],de=["ejst","est","jast","jes","jestjs","jestt","jet","jets","jst"],me=["imp","jim","jip","jmp"],le=["ji","jio","jo","joii","jol","oi","oji"],pe=["jdom","jsdm","jsdo","jsdom-js","jsdon","jsom","sdom"],ue=["jsonwebtoken-js","jsonwebtoken-node"],ve=["ka","kao","ko","koaa","koajs","koe","oa","oka"],he=["1odash","iodash","l0dash","ldash","ldoash","llodash","lo-dash","loadsh","loash","lobash","lod4sh","lodaash","lodah","lodahs","lodas","lodash-node","lodashh","lodassh","loddash","lodesh","lodsah","lodsh","loodash","odash","oldash"],je=["luca","luci","lucie"],be=["luon","luxo","luxon-js"],ke=["imcromatch","mciromatch","micormatch","micrmoatch","micro-match","microamtch","micromacth","micromathc","micromtach","mircomatch"],ge=["minimath"],fe=["mcha","mmocha","moca","moch","mocha-js","moha","nocha","ocha"],ye=["m0ment","mment","mmoent","mmoment","moemnt","moent","mom3nt","momeent","momemt","momen","momen7","momennt","moment-js","momentjs","momentt","momet","mometn","momment","momnet","momnt","monent","mooment","oment","omment"],xe=["mognoose","mogoose","mongoos","mongose","monqoose","moongoose"],we=["moran","organ"],qe=["muler","multer-js","muter"],$e=["mysql"],ze=["ext","mext","n3xt","naxt","net","netx","nex","next-js","next-node","nextjs","nxt"],_e=["node-mailer","nodemailer-js"],Me=["nodemo","nodemonjs","nodmeon"],Te=["oar","or","ora-node","ore","ra","roa"],Ae=["arcel","parce","parceljs"],Ce=["passport-js"],De=["phase","phaser-node"],Oe=["ino","pimo","pin","pino-node","pinojs","pio","pion"],Ne=["playright","playwright-js"],Re=["postcss-js","postcss-node","potscss"],Se=["pettier","pprettier","pretier","prettierjs","prettierr","prtetier"],Be=["prima","prism","prisma-js","prismajs","prizma"],Fe=["pupeteer"],Pe=["rada","rama","ramd","randa"],We=["eact","eract","r3act","raact","ract","raect","re4ct","reaact","reac","reac7","reacct","react-node","reactjs","reactt","reat","reatc","recat","rect","reeact","reect","rreact"],Ee=["erdis","radis","rdis","redi","redis-js","redis-node","rediss","rediz","reds","reis","rredis"],Le=["resen","rsend"],Ue=["ollup","rollup-js","rollup-node"],Ve=["ass","asss","sas","sass-node","sess","ssas","sss"],Ie=["emver","seemver","semver-node","semvre","senver","sever"],Ye=["sequelize-js","sequelize-node"],Ge=["harp","shap","shar","sharp-js","sharpjs"],He=["stipe","strip","stripe-node","tripe"],Je=["supabase-js"],Ke=["suelte","svelt3","svelte-js","sveltejs","velte"],Qe=["tailwindcss-js"],Xe=["auri","taui"],Ze=["hree","htree","thee","there","three-js","three-node","tree"],eo=["stx","sx","ts","tsxx","ttsx","tx","txs","tzx"],oo=["ttypescript","typecript","typescipt","typescript-node","typescriptjs","typescrit","typescritp"],so=["udnerscore","undercore","underscoer","underscore-node","underscroe","undersocre","undesrcore"],ro=["uid","uud","uudi","uui","uuid-js","uuid-node","uuidjs","vuid"],ao=["ite","vie","vit","vita","vite-node","vitee","vlte","vte"],to=["itest","uitest","vitestjs","vitezt","vittest","vtest"],no=["ue","uue","uve","ve","veu","vu","vu3","vua","vue-node","vuee","vuejs","vuue","vve","vvue"],co=["web-pack","weback","webpac","webpack-node","webpackjs","webpak","weebpack","wepack","wepback"],io=["winson","winston-js","winstoon"],mo=["up","uyp","yp","yu","yupjs","yupp"],lo=["od","zd","zdo","zo","zob","zod-js","zodjs"];const po={ajv:D,angular:O,autoprefixer:N,"aws-sdk":["awssdk","ews-sdk"],axios:R,babel:S,bcrypt:B,bcryptjs:F,"body-parser":["body-paresr","body-parse","body-parser-js","body_parser"],bunyan:P,chai:W,chalk:E,cheerio:L,color:U,colors:V,commander:I,"cookie-parser":["cookie-parse","cookieparser"],cors:Y,"cross-env":["crossenv"],"date-fns":["data-fns","date-fn"],dayjs:G,debug:H,dotenv:J,electron:K,esbuild:Q,eslint:X,express:Z,fastify:ee,firebase:oe,formidable:se,glob:re,got:ae,helmet:te,hono:ne,inquirer:ce,ioredis:ie,jest:de,jimp:me,joi:le,jsdom:pe,jsonwebtoken:ue,koa:ve,lodash:he,lucia:je,luxon:be,micromatch:ke,minimatch:ge,mocha:fe,moment:ye,mongoose:xe,morgan:we,multer:qe,mysql2:$e,next:ze,"node-fetch":["node-fecth","node-fethc","node.fetch"],nodemailer:_e,nodemon:Me,ora:Te,parcel:Ae,passport:Ce,phaser:De,pino:Oe,playwright:Ne,postcss:Re,prettier:Se,prisma:Be,puppeteer:Fe,ramda:Pe,react:We,"react-dom":["eact-dom","eract-dom","r3act-dom","ract-dom","raect-dom","re4ct-dom","reaact-dom","reac-dom","reac7-dom","reacct-dom","react-bom","react-d0m","react-ddom","react-dm","react-dmo","react-do","react-domm","react-don","react-doom","react-odm","react-om","react.dom","reactdom","reactt-dom","reat-dom","reatc-dom","recat-dom","rect-dom","reeact-dom","rreact-dom"],redis:Ee,resend:Le,rollup:Ue,sass:Ve,semver:Ie,sequelize:Ye,sharp:Ge,"socket.io":["ocket.io","oscket.io","scket.io","scoket.io","soccket.io","socekt.io","socet.io","sock3t.io","socke.io","socke7.io","sockeet.io","socket.1o","socket.i","socket.iio","socket.ioo","socket.lo","socket.o","socket.oi","sockett.io","sockket.io","sockt.io","sockte.io","sokcet.io","soket.io","soocket.io","ssocket.io"],stripe:He,supabase:Je,svelte:Ke,tailwindcss:Qe,tauri:Xe,three:Ze,"ts-node":["tts-node"],tsx:eo,typescript:oo,underscore:so,uuid:ro,vite:ao,vitest:to,vue:no,webpack:co,winston:io,yup:mo,zod:lo};var u,k;function uo(){return k||(k=1,u={"@tanstack/start":["start-tanstack-app","tanstack","tanstack-app","tanstack-start"]}),u}var vo=uo();const ho=A(vo),jo={a:["4","e"],b:["d"],d:["b"],e:["3","a"],g:["9","q"],i:["1","l"],l:["1","i"],m:["n"],n:["m"],o:["0"],s:["5","z"],t:["7"],u:["v"],v:["u"]},bo=["app","cli","core","kit","lib","pkg","sdk"],ko=e=>{const s=new Set;if(e.length<3)return s;for(let o=0;o<e.length;o++){const a=e[o],t=a==="-"||a==="."||a==="_";if(t||s.add(e.slice(0,o)+e.slice(o+1)),t||s.add(e.slice(0,o)+a+e.slice(o)),o<e.length-1&&e[o]!==e[o+1]){const p=e[o+1]==="-"||e[o+1]==="."||e[o+1]==="_";if(!t&&!p){const i=[...e];[i[o],i[o+1]]=[i[o+1],i[o]],s.add(i.join(""))}}const n=e[o].toLowerCase(),h=jo[n];if(h)for(const p of h)s.add(e.slice(0,o)+p+e.slice(o+1))}const r=/[-._]/g;if(r.test(e))s.add(e.replaceAll(r,"")),s.add(e.replaceAll(r,"-")),s.add(e.replaceAll(r,".")),s.add(e.replaceAll(r,"_"));else if(e.length>5)for(let o=2;o<e.length-2;o++)s.add(`${e.slice(0,o)}-${e.slice(o)}`),s.add(`${e.slice(0,o)}.${e.slice(o)}`),s.add(`${e.slice(0,o)}_${e.slice(o)}`);if(e.startsWith("@")||(s.add(`${e}-js`),s.add(`${e}js`),s.add(`${e}-node`)),e.startsWith("@")){const o=e.indexOf("/");if(o>1&&o<e.length-1){const a=e.slice(1,o),t=e.slice(o+1);a.length>=3&&s.add(a);for(const n of["","-",".","_"])s.add(`${a}${n}${t}`),s.add(`${t}${n}${a}`);for(const n of bo)s.add(`${a}-${n}`),s.add(`${t}-${a}-${n}`),s.add(`${n}-${a}-${t}`)}}return s.delete(e),s};let v,l,m;const f=()=>{if(!v){const e={};for(const s of[po,ho])for(const[r,o]of Object.entries(s)){const a=e[r]??(e[r]=[]);for(const t of o)a.includes(t)||a.push(t)}v=e}return v},go=()=>{if(!l){l=new Map;for(const[e,s]of Object.entries(f()))for(const r of s)l.set(r,e)}return l},fo=()=>{if(!m){m=new Map;for(const e of Object.keys(f()))for(const s of ko(e))m.has(s)||m.set(s,e)}return m},yo=e=>e.startsWith("@")?e.split("/")[1]??e:e,xo=e=>{const s=yo(e),r=go().get(s);if(r)return{input:e,legitimate:r,method:"blocklist"};const o=fo().get(s);if(o)return{input:e,legitimate:o,method:"heuristic"}},y=(e,s)=>{const r=s?new Set(s):void 0,o=[];for(const a of e){if(r?.has(a))continue;const t=xo(a);t&&o.push(t)}return o},x=(e,s)=>{c.warn(""),c.warn(j(`Possible typosquat${e.length===1?"":"s"} ${s}:`));for(const r of e){const o=r.method==="blocklist"?"known typosquat":"similar name";c.warn(` ${b("⚠")} ${j(r.input)} — did you mean ${b(r.legitimate)}? (${o})`)}c.warn("")},w=async e=>{if(!process.stdin.isTTY){c.warn("Aborting: potential typosquat detected in non-interactive mode. Use --no-typosquat-check to skip.");return}const s=_({input:process.stdin,output:process.stdout}),r=await new Promise(o=>{s.question(e,a=>{o(a.trim().toLowerCase())})});return s.close(),r},Do=async(e,s)=>{if(g("typosquats"))return{ok:!0,packages:e};const r=y(e,s);if(r.length===0)return{ok:!0,packages:e};x(r,"detected");const o=await w(`Use suggested package${r.length===1?"":"s"} instead? [S]uggested / [y]es, keep original / [N]o, abort (default: N) `);if(o===void 0)return{ok:!1,packages:e};if(o==="s"||o==="suggested"){const a=new Map(r.map(t=>[t.input,t.legitimate]));return{ok:!0,packages:e.map(t=>a.get(t)??t)}}return o==="y"||o==="yes"?{ok:!0,packages:e}:{ok:!1,packages:e}},wo=/^(?:npm|pnpm|yarn):(.+?)(?:@.*)?$/,qo=e=>wo.exec(e)?.[1],$o=e=>{if(!T(e))return[];const s=C(e),r={...s.dependencies,...s.devDependencies,...s.optionalDependencies,...s.peerDependencies},o=new Set;for(const[a,t]of Object.entries(r)){o.add(a);const n=qo(t);n&&o.add(n)}return[...o]},Oo=async(e,s)=>{if(g("typosquats"))return!0;const r=M(e,"package.json"),o=$o(r);if(o.length===0)return!0;const a=y(o,s);if(a.length===0)return!0;x(a,"in package.json dependencies"),c.warn("Fix the package name in package.json before proceeding.");const t=await w("Continue anyway? [y/N] ");return t==="y"||t==="yes"};export{Do as r,Oo as s};
@@ -0,0 +1 @@
1
+ import{createRequire as u}from"node:module";import{s,U as c}from"../packem_chunks/bin.js";const f=u(import.meta.url),l=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process;const _=(o,i)=>{const r=s.useRef(null),[t,n]=s.useState(o);return s.useLayoutEffect(()=>{if(!r.current)return;const{height:e}=c(r.current);e>0&&e!==t&&(n(e),i?.(e))}),{measuredHeight:t,ref:r}};export{_ as u};
@@ -0,0 +1 @@
1
+ const a=e=>e?Array.isArray(e)?e:[e]:[],o=e=>e instanceof Error?e.message:typeof e=="string"?e:String(e),p=e=>e.replace(/^\.\//,"").replace(/\/+$/,""),l=/[\u0000-\u001F\u007F ~^:?*[\\]/g,n=e=>{const r=e.replaceAll("@{","-").replaceAll("..","-").replaceAll(l,"-").replace(/\.lock$/i,"").replace(/^[./-]+/,"").replace(/[./-]+$/,"");return r.length>0?r:"split"},t=/^(.+?)(?:@(.+))?$/,v=e=>{if(e.startsWith("@")){const c=e.indexOf("/");if(c===-1)return{name:e,versionSpec:void 0};const s=e.slice(c+1),i=s.indexOf("@");return i===-1?{name:e,versionSpec:void 0}:{name:e.slice(0,c+1+i),versionSpec:s.slice(i+1)}}const r=t.exec(e);return r?{name:r[1]??e,versionSpec:r[2]}:{name:e,versionSpec:void 0}};export{o as c,v as f,a as i,n as l,p as o};
@@ -0,0 +1 @@
1
+ import{createRequire as g}from"node:module";import{m as i,f as a,v as d}from"./index-BDmTbWX1.js";import"./public-api-WqUCiyIe.js";import{u as j}from"../packem_chunks/bin.js";const h=g(import.meta.url),p=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,u=c=>{if(typeof p<"u"&&p.versions&&p.versions.node){const[s,o]=p.versions.node.split(".").map(Number);if(s>22||s===22&&o>=3||s===20&&o>=16)return p.getBuiltinModule(c)}return h(c)},{readdirSync:m}=u("node:fs"),b=[".husky/pre-commit",".vis/hooks/pre-commit",".git/hooks/pre-commit"],v=[".secretlintrc",".secretlintrc.json",".secretlintrc.js",".secretlintrc.mjs",".secretlintrc.cjs",".secretlintrc.yml",".secretlintrc.yaml"],$=[".syncpackrc",".syncpackrc.json",".syncpackrc.yaml",".syncpackrc.yml",".syncpackrc.cjs",".syncpackrc.js",".syncpackrc.mjs",".syncpackrc.ts","syncpack.config.cjs","syncpack.config.js","syncpack.config.mjs","syncpack.config.ts"],w=c=>{const s=i(c,"package.json");if(!a(s))return[];let o;try{o=JSON.parse(d(s))}catch{return[]}const e=[];if(o.scripts)for(const[t,n]of Object.entries(o.scripts))typeof n=="string"&&(/\bgitleaks\b/.test(n)&&e.push({detail:`Script "${t}" still invokes gitleaks: ${n}`,kind:"script",location:"package.json",tool:"gitleaks"}),/\bsecretlint\b/.test(n)&&e.push({detail:`Script "${t}" still invokes secretlint: ${n}`,kind:"script",location:"package.json",tool:"secretlint"}),/\bsyncpack\b/.test(n)&&e.push({detail:`Script "${t}" still invokes syncpack: ${n}`,kind:"script",location:"package.json",tool:"syncpack"}),/\bsherif\b/.test(n)&&e.push({detail:`Script "${t}" still invokes sherif: ${n}`,kind:"script",location:"package.json",tool:"sherif"}));if(o.devDependencies)for(const t of Object.keys(o.devDependencies))(t==="gitleaks"||t==="@gitleaks/cli")&&e.push({detail:`devDependency \`${t}\` is still installed`,kind:"devDep",location:"package.json",tool:"gitleaks"}),(t==="secretlint"||t.startsWith("@secretlint/"))&&e.push({detail:`devDependency \`${t}\` is still installed`,kind:"devDep",location:"package.json",tool:"secretlint"}),t==="syncpack"&&e.push({detail:`devDependency \`${t}\` is still installed`,kind:"devDep",location:"package.json",tool:"syncpack"}),t==="sherif"&&e.push({detail:`devDependency \`${t}\` is still installed`,kind:"devDep",location:"package.json",tool:"sherif"});return o.sherif&&e.push({detail:"`sherif` config block still present in package.json",kind:"config",location:"package.json",tool:"sherif"}),e},_=c=>{const s=[];for(const o of b){const e=i(c,o);if(!a(e))continue;const t=d(e);/\bgitleaks\b/.test(t)&&s.push({detail:"gitleaks invocation still present in hook",kind:"hook",location:o,tool:"gitleaks"}),/\bsecretlint\b/.test(t)&&s.push({detail:"secretlint invocation still present in hook",kind:"hook",location:o,tool:"secretlint"}),/\bsyncpack\b/.test(t)&&s.push({detail:"syncpack invocation still present in hook",kind:"hook",location:o,tool:"syncpack"}),/\bsherif\b/.test(t)&&s.push({detail:"sherif invocation still present in hook",kind:"hook",location:o,tool:"sherif"})}return s},D=c=>{const s=[];for(const o of v)a(i(c,o))&&s.push({detail:"secretlint config should be removed after migration",kind:"config",location:o,tool:"secretlint"});for(const o of $)a(i(c,o))&&s.push({detail:"syncpack config should be removed after migration",kind:"config",location:o,tool:"syncpack"});return s},S=[".github/workflows",".gitlab-ci.yml",".circleci/config.yml",".woodpecker.yml",".drone.yml"],O=c=>{const s=[],o=e=>{const t=i(c,e);if(!a(t))return;const n=d(t);/\bsyncpack\b/.test(n)&&s.push({detail:"syncpack invocation still present in CI",kind:"ci",location:e,tool:"syncpack"}),/\bsherif\b/.test(n)&&s.push({detail:"sherif invocation still present in CI",kind:"ci",location:e,tool:"sherif"})};for(const e of S){const t=i(c,e);if(a(t)){if(e===".github/workflows"){try{for(const n of m(t))(n.endsWith(".yml")||n.endsWith(".yaml"))&&o(`.github/workflows/${n}`)}catch{}continue}o(e)}}return s},M=c=>{const s=[],o=i(c,"pnpm-workspace.yaml");if(a(o)){let t;try{t=j(o)}catch{t=void 0}if(t&&typeof t=="object"){const n=t.catalog;n&&typeof n.syncpack=="string"&&s.push({detail:"`syncpack` still listed in pnpm-workspace.yaml#catalog",kind:"catalog",location:"pnpm-workspace.yaml",tool:"syncpack"});const l=t.catalogs;if(l&&typeof l=="object")for(const[k,r]of Object.entries(l))r&&typeof r.syncpack=="string"&&s.push({detail:`\`syncpack\` still listed in pnpm-workspace.yaml#catalogs.${k}`,kind:"catalog",location:"pnpm-workspace.yaml",tool:"syncpack"})}}const e=i(c,"package.json");if(a(e)){let t;try{t=JSON.parse(d(e))}catch{return s}const n=t.workspaces;if(n&&typeof n=="object"&&!Array.isArray(n)){const k=n.catalog;k&&typeof k.syncpack=="string"&&s.push({detail:"`syncpack` still listed in package.json#workspaces.catalog",kind:"catalog",location:"package.json",tool:"syncpack"});const r=n.catalogs;if(r&&typeof r=="object")for(const[y,f]of Object.entries(r))f&&typeof f.syncpack=="string"&&s.push({detail:`\`syncpack\` still listed in package.json#workspaces.catalogs.${y}`,kind:"catalog",location:"package.json",tool:"syncpack"})}const l=t.catalog;l&&typeof l.syncpack=="string"&&s.push({detail:"`syncpack` still listed in package.json#catalog",kind:"catalog",location:"package.json",tool:"syncpack"})}return s},N=c=>[...w(c),..._(c),...D(c),...O(c),...M(c)],A=(c,s)=>{const o=N(c);if(o.length===0)return s.info("✓ No unmigrated gitleaks/secretlint/sherif/syncpack references found."),[];s.warn(`Found ${String(o.length)} unmigrated reference(s):`);for(const e of o)s.warn(` [${e.kind}] ${e.location} — ${e.detail}`);return o};export{N as s,A as v};
@@ -0,0 +1 @@
1
+ import{aD as de,a4 as e,a5 as l,m as r,aE as pe,B as he,aF as je,aG as ge,s as g,ae as me,aH as z,aI as ie}from"../packem_chunks/bin.js";import{o as fe}from"./spinner-CV3WVJLv.js";import{F as ye,a as we}from"./tabs-BuTy5gPV.js";import{u as Ce}from"./use-measured-height-_eVGWtWt.js";const Ue=({current:a,total:t})=>{const{columns:s}=de(),i=s||80,d=t>0?Math.min(1,a/t):0,h=`${String(Math.round(d*100)).padStart(3)}%`,f=`${String(a)}/${String(t)}`,y=Math.max(10,i-2-h.length-1),p=Math.round(y*d),j=y-p;return e.jsxs(l,{flexDirection:"column",paddingX:1,children:[e.jsxs(l,{children:[e.jsx(fe,{type:"dots"}),e.jsx(r,{children:" Checking catalog dependencies "}),e.jsx(r,{dimColor:!0,children:f})]}),e.jsxs(l,{children:[e.jsx(r,{color:"cyan",children:"━".repeat(p)}),e.jsx(r,{dimColor:!0,children:"─".repeat(j)}),e.jsxs(r,{dimColor:!0,children:[" ",h]})]})]})},Q=["default","name","updateType","severity"],oe=a=>{const t=a.vulnerabilities?.map(s=>s.severity)??[];return t.includes("CRITICAL")?4:t.includes("HIGH")?3:t.includes("MODERATE")?2:t.includes("LOW")?1:0},ne={digest:0,major:3,minor:2,patch:1,pin:0,unknown:0},ce=(a,t)=>{if(t==="default")return a;const s=[...a];return t==="name"?s.sort((i,d)=>i.packageName.localeCompare(d.packageName)):t==="updateType"?s.sort((i,d)=>(ne[d.updateType]??0)-(ne[i.updateType]??0)||i.packageName.localeCompare(d.packageName)):s.sort((i,d)=>oe(d)-oe(i)||i.packageName.localeCompare(d.packageName)),s},_=a=>`${a.ecosystem}|${a.file}:${String(a.line)}|${a.name}`,X=a=>{const t=new Map;for(const s of a){const i=t.get(s.catalogName);i?i.push(s):t.set(s.catalogName,[s])}return t},O=(a,t,s)=>{let i=a;if(t!=="all"&&(i=t==="security"?i.filter(d=>d.vulnerabilities&&d.vulnerabilities.length>0||d.socketReport&&d.socketReport.alerts.length>0):i.filter(d=>d.updateType===t)),s){const d=s.toLowerCase();i=i.filter(h=>h.packageName.toLowerCase().includes(d))}return i};class He{#e;#l=new Set;#t;#s;#i=null;constructor(t,s=null,i=[]){this.#t=t,this.#s=i,s&&(this.#i=new Map(s.recommendations.map(d=>[d.package,d]))),this.#e={aiResult:s,allChecked:!0,applyProgress:null,checkedEcosystemKeys:new Set(i.map(d=>_(d))),checkedEntries:new Set(t.map(d=>d.packageName)),ecosystemEntries:i,entries:t,error:null,filterActive:!1,filterText:"",filterType:"all",focusedPanel:"list",groupedByCatalog:X(t),phase:"browsing",selectedIndex:0,sortMode:"default"}}getSnapshot=()=>this.#e;subscribe=t=>(this.#l.add(t),()=>{this.#l.delete(t)});getFilteredEntries(){return ce(O(this.#t,this.#e.filterType,this.#e.filterText),this.#e.sortMode)}setSortMode(t){if(t===this.#e.sortMode)return;const s=this.getFilteredEntries()[this.#e.selectedIndex]?.packageName,i=ce(O(this.#t,this.#e.filterType,this.#e.filterText),t),d=s?Math.max(0,i.findIndex(h=>h.packageName===s)):0;this.#r({...this.#e,selectedIndex:d,sortMode:t})}cycleSortMode(){const t=Q.indexOf(this.#e.sortMode),s=Q[(t+1)%Q.length]??"default";this.setSortMode(s)}getRecommendation(t){return this.#i?.get(t)}getCheckedEntries(){return this.#t.filter(t=>this.#e.checkedEntries.has(t.packageName))}getCheckedEcosystemEntries(){return this.#s.filter(t=>this.#e.checkedEcosystemKeys.has(_(t)))}toggleEcosystemCheck(t){const s=new Set(this.#e.checkedEcosystemKeys);s.has(t)?s.delete(t):s.add(t),this.#r({...this.#e,checkedEcosystemKeys:s})}checkAllEcosystem(){this.#r({...this.#e,checkedEcosystemKeys:new Set(this.#s.map(t=>_(t)))})}uncheckAllEcosystem(){this.#r({...this.#e,checkedEcosystemKeys:new Set})}setSelectedIndex(t){const s=this.getFilteredEntries(),i=Math.max(0,Math.min(t,s.length-1));i!==this.#e.selectedIndex&&this.#r({...this.#e,selectedIndex:i})}setFocusedPanel(t){t!==this.#e.focusedPanel&&this.#r({...this.#e,focusedPanel:t})}setFilterType(t){if(t!==this.#e.filterType){const s=O(this.#t,t,this.#e.filterText);this.#r({...this.#e,entries:s,filterType:t,groupedByCatalog:X(s),selectedIndex:0})}}setFilter(t){const s=O(this.#t,this.#e.filterType,t);this.#r({...this.#e,entries:s,filterText:t,groupedByCatalog:X(s),selectedIndex:0})}setFilterActive(t){if(t!==this.#e.filterActive)if(t)this.#r({...this.#e,filterActive:!0});else{const s=O(this.#t,this.#e.filterType,"");this.#r({...this.#e,entries:s,filterActive:!1,filterText:"",groupedByCatalog:X(s),selectedIndex:0})}}toggleCheck(t){const s=new Set(this.#e.checkedEntries);s.has(t)?s.delete(t):s.add(t),this.#r({...this.#e,allChecked:s.size===this.#t.length,checkedEntries:s})}checkAll(){this.#r({...this.#e,allChecked:!0,checkedEntries:new Set(this.#t.map(t=>t.packageName))})}uncheckAll(){this.#r({...this.#e,allChecked:!1,checkedEntries:new Set})}toggleAll(){this.#e.allChecked?this.uncheckAll():this.checkAll()}startApply(){const t=this.getCheckedEntries();this.#r({...this.#e,applyProgress:{current:0,total:t.length},phase:"applying"})}updateApplyProgress(t){this.#e.applyProgress&&this.#r({...this.#e,applyProgress:{...this.#e.applyProgress,current:t}})}markDone(){this.#r({...this.#e,phase:"done"})}setError(t){this.#r({...this.#e,error:t,phase:"error"})}#r(t){this.#e=t;for(const s of this.#l)try{s()}catch{}}}const ke={major:"red",minor:"yellow",patch:"green"},be={CRITICAL:"red",HIGH:"red",LOW:"gray",MODERATE:"yellow",UNKNOWN:"gray"},Te={critical:"red",high:"red",low:"gray",medium:"yellow"},Se={critical:"red",high:"red",low:"green",medium:"yellow"},Ee={defer:"gray",review:"yellow",skip:"red",update:"green"},Re=({changelogUrl:a,entry:t,focused:s,recommendation:i,scrollRef:d})=>{const h=s?"white":"gray";if(!t)return e.jsx(l,{alignItems:"center",borderColor:"gray",borderStyle:"single",flexDirection:"column",flexGrow:1,justifyContent:"center",children:e.jsx(r,{dimColor:!0,children:"No package selected"})});const f=ke[t.updateType]??"white",y=t.vulnerabilities&&t.vulnerabilities.length>0,p=t.socketReport?.score.overall??0,j=t.socketReport?he(p):"gray";return e.jsxs(l,{borderColor:h,borderStyle:"single",flexDirection:"column",flexGrow:1,children:[e.jsx(l,{flexShrink:0,paddingTop:1,paddingX:2,children:e.jsx(r,{bold:!0,color:"white",children:t.packageName})}),e.jsxs(pe,{flexGrow:1,flexShrink:1,paddingX:2,ref:d,scrollbar:!0,scrollbarColor:"gray",scrollbarStyle:"block",children:[e.jsx(r,{}),e.jsxs(l,{children:[e.jsx(l,{width:12,children:e.jsx(r,{dimColor:!0,children:"Current:"})}),e.jsx(r,{children:t.currentRange})]}),e.jsxs(l,{children:[e.jsx(l,{width:12,children:e.jsx(r,{dimColor:!0,children:"Target:"})}),e.jsx(r,{children:t.newRange}),e.jsxs(r,{bold:!0,color:f,children:[" ","(",t.updateType,")"]})]}),e.jsxs(l,{children:[e.jsx(l,{width:12,children:e.jsx(r,{dimColor:!0,children:"Version:"})}),e.jsx(r,{children:t.targetVersion})]}),e.jsxs(l,{children:[e.jsx(l,{width:12,children:e.jsx(r,{dimColor:!0,children:"Catalog:"})}),e.jsx(r,{children:t.catalogName})]}),t.acceptedRisk&&e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsx(r,{color:"gray",children:"── "}),e.jsx(r,{bold:!0,color:"gray",children:"ACKNOWLEDGED RISK"}),e.jsxs(l,{flexDirection:"column",paddingLeft:2,children:[e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Reason: "}),e.jsx(r,{children:t.acceptedRisk.reason})]}),e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Accepted: "}),e.jsx(r,{children:t.acceptedRisk.acceptedAt.slice(0,10)})]})]})]}),y&&e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"red",children:"SECURITY"}),e.jsx(r,{}),t.vulnerabilities.map(o=>e.jsxs(l,{flexDirection:"column",marginBottom:1,children:[e.jsxs(l,{gap:1,children:[e.jsxs(r,{bold:!0,color:be[o.severity]??"gray",children:["⚠"," ",o.severity]}),e.jsx(r,{bold:!0,children:o.id})]}),e.jsx(l,{paddingLeft:2,children:e.jsx(r,{children:o.summary})}),e.jsxs(l,{gap:2,paddingLeft:2,children:[o.cvssScore!==void 0&&e.jsxs(r,{dimColor:!0,children:["CVSS:",String(o.cvssScore)]}),o.fixedVersions.length>0&&e.jsxs(r,{dimColor:!0,children:["Fixed in:",o.fixedVersions.join(", ")]})]})]},o.id))]}),t.socketReport&&e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"cyan",children:"SOCKET.DEV"}),e.jsx(r,{}),e.jsxs(l,{gap:2,children:[e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Overall: "}),e.jsxs(r,{bold:!0,color:j,children:[String(Math.round(p*100)),"%"]})]}),e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Supply Chain: "}),e.jsxs(r,{children:[String(Math.round(t.socketReport.score.supplyChain*100)),"%"]})]}),e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Quality: "}),e.jsxs(r,{children:[String(Math.round(t.socketReport.score.quality*100)),"%"]})]})]}),e.jsxs(l,{gap:2,children:[e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Maintenance: "}),e.jsxs(r,{children:[String(Math.round(t.socketReport.score.maintenance*100)),"%"]})]}),e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Vulnerability: "}),e.jsxs(r,{children:[String(Math.round(t.socketReport.score.vulnerability*100)),"%"]})]}),e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"License: "}),e.jsxs(r,{children:[t.socketReport.license||"unknown"," ","(",String(Math.round(t.socketReport.score.license*100)),"%)"]})]})]}),t.socketReport.alerts.length>0&&e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsxs(r,{bold:!0,color:"yellow",children:["⚠"," ",String(t.socketReport.alerts.length)," ","alert",t.socketReport.alerts.length===1?"":"s",":"]}),t.socketReport.alerts.map(o=>e.jsxs(l,{gap:1,paddingLeft:2,children:[e.jsxs(r,{bold:!0,color:Te[o.severity]??"gray",children:["[",o.severity.toUpperCase(),"]"]}),e.jsx(r,{children:o.type}),e.jsxs(r,{dimColor:!0,children:["(",o.category,")"]})]},o.key))]})]}),i&&e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"AI ANALYSIS"}),e.jsx(r,{}),e.jsxs(l,{gap:2,children:[e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Action: "}),e.jsx(r,{bold:!0,color:Ee[i.action]??"white",children:i.action})]}),e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Risk: "}),e.jsx(r,{bold:!0,color:Se[i.riskLevel]??"white",children:i.riskLevel})]}),e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Effort: "}),e.jsx(r,{bold:!0,children:i.effort})]})]}),i.reason&&e.jsx(l,{marginTop:1,paddingLeft:2,children:e.jsx(r,{children:i.reason})}),i.breakingChanges.length>0&&e.jsxs(l,{flexDirection:"column",marginTop:1,paddingLeft:2,children:[e.jsx(r,{bold:!0,color:"yellow",children:"Breaking changes:"}),i.breakingChanges.map((o,v)=>e.jsxs(r,{children:[" ","•"," ",o]},String(v)))]})]}),a&&e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"CHANGELOG"}),e.jsx(l,{marginTop:1,paddingLeft:2,children:e.jsx(r,{color:"cyan",underline:!0,children:a})})]}),e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"LINKS"}),e.jsx(l,{flexDirection:"column",marginTop:1,paddingLeft:2,children:e.jsxs(r,{color:"cyan",underline:!0,children:["https://npmx.dev/",t.packageName]})})]}),!i&&e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"GUIDANCE"}),e.jsxs(l,{flexDirection:"column",marginTop:1,paddingLeft:2,children:[t.updateType==="major"&&e.jsxs(e.Fragment,{children:[e.jsxs(r,{color:"red",children:["⚠"," ","Major update — likely contains breaking changes."]}),e.jsx(r,{dimColor:!0,children:" Review the changelog before updating."}),e.jsx(r,{dimColor:!0,children:" Use --changelog to fetch release URLs."})]}),t.updateType==="minor"&&e.jsxs(e.Fragment,{children:[e.jsxs(r,{color:"yellow",children:["ℹ"," ","Minor update — new features, backward compatible."]}),e.jsx(r,{dimColor:!0,children:" Generally safe to update."})]}),t.updateType==="patch"&&e.jsxs(e.Fragment,{children:[e.jsxs(r,{color:"green",children:["✓"," ","Patch update — bug fixes only."]}),e.jsx(r,{dimColor:!0,children:" Safe to update."})]}),!i&&e.jsx(r,{dimColor:!0,children:" Use --ai to get AI-powered analysis."})]})]})]})]})},ve={major:"red",minor:"yellow",patch:"green"},Ae=[{id:"all",label:"All"},{id:"major",label:"Major"},{id:"minor",label:"Minor"},{id:"patch",label:"Patch"},{id:"security",label:"Security"}],Ie=({checked:a,entry:t,isSelected:s})=>{const i=ve[t.updateType]??"white",d=t.vulnerabilities&&t.vulnerabilities.length>0,h=t.socketReport&&t.socketReport.alerts.length>0,f=!!t.acceptedRisk,y=a?"☑":"☐",p=t.socketReport?`${String(Math.round(t.socketReport.score.overall*100))}%`:"",j=t.socketReport?he(t.socketReport.score.overall):"gray";return e.jsxs(l,{flexShrink:0,height:1,children:[e.jsx(r,{children:s?">":" "}),e.jsxs(r,{color:a?"white":"gray",children:[" ",y," "]}),d||h?e.jsx(r,{color:f?"gray":"red",children:f?"✓ ":"⚠ "}):e.jsx(r,{children:" "}),e.jsx(l,{flexGrow:1,children:e.jsxs(r,{bold:s,inverse:s,wrap:"truncate",children:[t.packageName,f?" [ack]":""]})}),p&&e.jsxs(r,{color:j,children:[" ",p]}),e.jsxs(r,{dimColor:!0,children:[" ",t.currentRange]}),e.jsxs(r,{dimColor:!0,children:[" ","→"," "]}),e.jsxs(r,{children:[t.newRange," "]}),e.jsx(r,{bold:!0,color:i,children:t.updateType})]})},De=({count:a,name:t})=>e.jsxs(l,{flexShrink:0,height:1,marginTop:1,children:[e.jsxs(r,{dimColor:!0,children:["▼"," "]}),e.jsx(r,{bold:!0,color:"white",children:t.toUpperCase()}),e.jsxs(r,{dimColor:!0,children:[" ","(",a,")"]})]}),Me=({checkedEntries:a,entries:t,filterActive:s,filteredOutCount:i,filterText:d,filterType:h,focused:f,groupedByCatalog:y,isDryRun:p,onViewportHeightChange:j,scrollOffset:o,selectedIndex:v,totalCatalogEntries:A,totalChecked:T,totalEntries:U,viewportHeight:B})=>{const L=f?"white":"gray",{measuredHeight:m,ref:S}=Ce(B,j);let F=0,b=0,I=0,E=0;for(const x of t)x.updateType==="major"?F++:x.updateType==="minor"?b++:I++,(x.vulnerabilities&&x.vulnerabilities.length>0||x.socketReport&&x.socketReport.alerts.length>0)&&E++;const C=[];F>0&&C.push(`${F} major`),b>0&&C.push(`${b} minor`),I>0&&C.push(`${I} patch`),E>0&&C.push(`${E} vulnerable`);const D=C.length>0?` (${C.join(", ")})`:"";let k=0;for(const x of t)a.has(x.packageName)&&k++;const w=[];let H=0;for(const[x,R]of y){w.push(e.jsx(De,{count:R.length,name:x},`hdr-${x}`));for(const $ of R){const M=H;w.push(e.jsx(Ie,{checked:a.has($.packageName),entry:$,isSelected:M===v},$.packageName)),H++}}let P=0;for(const[,x]of y)P+=2+x.length;const K=P>m&&m>0;return e.jsxs(l,{borderColor:L,borderStyle:"single",flexDirection:"column",flexGrow:1,children:[e.jsxs(l,{flexShrink:0,gap:1,paddingX:1,children:[e.jsx(r,{bold:!0,inverse:!0,children:" VIS "}),e.jsxs(r,{wrap:"truncate",children:[U,T>0?`/${T}`:""," ","outdated",D,A>T?` · ${A-T} dupes`:""]}),!p&&k>0&&e.jsxs(r,{dimColor:!0,children:[" ","—",k," ","selected"]})]}),e.jsx(l,{flexShrink:0,paddingX:1,paddingY:1,children:e.jsx(ye,{isFocused:f,keyMap:{next:[],previous:[],useNumbers:!1,useTab:!1},onChange:()=>{},showIndex:!1,value:h,children:Ae.map(({id:x,label:R})=>e.jsx(we,{name:x,children:R},x))})}),s&&e.jsxs(l,{flexShrink:0,paddingX:1,children:[e.jsx(r,{bold:!0,color:"white",children:"/ "}),e.jsx(r,{children:d}),e.jsx(r,{inverse:!0,children:" "})]}),i>0&&e.jsx(l,{flexShrink:0,paddingX:1,children:e.jsxs(r,{color:"yellow",children:["⚠"," ",i," ","package",i===1?"":"s"," ","filtered out by target constraint — press"," ",e.jsx(r,{bold:!0,color:"white",children:"f"})," ","to view"]})}),e.jsxs(l,{flexDirection:"row",flexGrow:1,overflow:"hidden",ref:S,children:[e.jsx(l,{flexDirection:"column",flexGrow:1,overflow:"hidden",paddingLeft:1,children:e.jsx(l,{flexDirection:"column",marginTop:-o,children:w})}),K&&e.jsx(l,{flexShrink:0,marginLeft:1,marginRight:1,children:e.jsx(je,{contentHeight:P,placement:"inset",scrollOffset:o,style:"block",viewportHeight:m})})]},`list-${h}-${d}`)]})},Ne=100,Be=40,Le=10,Fe=[],G=["all","major","minor","patch","security"],Ke=({autoExitSeconds:a=0,changelogUrls:t,checkedCount:s=0,filteredOutEntries:i=Fe,isDryRun:d,store:h,totalCatalogEntries:f=0})=>{const{exit:y}=ge(),{columns:p,rows:j}=de(),o=g.useSyncExternalStore(h.subscribe,h.getSnapshot),[v,A]=g.useState(!1),[T,U]=g.useState(!1),B=g.useRef(null),L=g.useRef(null),m=g.useRef(null),S=g.useRef(null),[F,b]=g.useState(0),[I,E]=g.useState(!1),[C,D]=g.useState(!1),k=g.useMemo(()=>h.getFilteredEntries(),[o.entries,o.filterType,o.filterText,o.sortMode]),w=k[o.selectedIndex]??null,H=w?h.getRecommendation(w.packageName):void 0,P=w&&t?t.get(w.packageName):void 0,K=g.useCallback(n=>{let c=0,u=0;for(const[,W]of o.groupedByCatalog){c+=2;for(let se=0;se<W.length;se++){if(u===n)return c;c+=1,u++}}return c},[o.groupedByCatalog]),x=Math.max(1,j-8-(o.filterActive?1:0)),[R,$]=g.useState(x),M=R>0?R:x,N=g.useCallback(n=>{const c=K(n);b(u=>c>u+M-2?Math.max(0,c-M+2):c<u+1?Math.max(0,c-1):u)},[K,M]);if(g.useEffect(()=>{m.current?.scrollToTop()},[w?.packageName]),me((n,c)=>{if(n==="c"&&c.ctrl){y();return}if(!C){if(T){c.escape||n==="f"||n==="q"?U(!1):c.downArrow||n==="j"?L.current?.scrollBy(1):(c.upArrow||n==="k")&&L.current?.scrollBy(-1);return}if(I){n==="u"||c.return?(E(!1),h.startApply(),y(h.getCheckedEntries())):c.escape||n==="q"?E(!1):c.downArrow||n==="j"?S.current?.scrollBy(1):c.upArrow||n==="k"?S.current?.scrollBy(-1):c.pageDown?S.current?.scrollBy(5):c.pageUp&&S.current?.scrollBy(-5);return}if(v){c.escape||n==="?"?A(!1):n==="q"?(A(!1),D(!0)):c.downArrow||n==="j"?B.current?.scrollBy(1):(c.upArrow||n==="k")&&B.current?.scrollBy(-1);return}if(n==="?"){A(!0);return}if(n==="q"){D(!0);return}if(c.tab){h.setFocusedPanel(o.focusedPanel==="list"?"detail":"list");return}if(o.focusedPanel==="list"&&(c.leftArrow||c.rightArrow)){const u=G.indexOf(o.filterType),W=c.rightArrow?(u+1)%G.length:(u-1+G.length)%G.length;b(0),m.current?.scrollToTop(),h.setFilterType(G[W]);return}if(n==="f"&&i.length>0){U(u=>!u);return}if(o.filterActive){if(c.escape){h.setFilterActive(!1);return}if(c.return){h.setFilterActive(!1);return}if(c.backspace){b(0),h.setFilter(o.filterText.slice(0,-1));return}if(n&&!c.ctrl&&!c.meta){b(0),h.setFilter(o.filterText+n);return}return}if(o.focusedPanel==="list"){if(c.downArrow||n==="j"){const u=Math.min(o.selectedIndex+1,k.length-1);h.setSelectedIndex(u),N(u);return}if(c.upArrow||n==="k"){const u=Math.max(o.selectedIndex-1,0);h.setSelectedIndex(u),N(u);return}if(c.pageDown){const u=Math.min(o.selectedIndex+10,k.length-1);h.setSelectedIndex(u),N(u);return}if(c.pageUp){const u=Math.max(o.selectedIndex-10,0);h.setSelectedIndex(u),N(u);return}if(c.home){h.setSelectedIndex(0),b(0);return}if(c.end){const u=k.length-1;h.setSelectedIndex(u),N(u);return}if(n===" "||c.return){w&&h.toggleCheck(w.packageName);return}if(n==="a"){h.toggleAll();return}if(n==="s"){h.cycleSortMode(),N(h.getSnapshot().selectedIndex);return}if(n==="/"){h.setFilterActive(!0);return}if(n==="u"&&!d&&o.checkedEntries.size>0){E(!0);return}if(c.rightArrow){h.setFocusedPanel("detail");return}return}if(o.focusedPanel==="detail"){if(c.escape||c.leftArrow){h.setFocusedPanel("list");return}if(c.downArrow||n==="j"){m.current?.scrollBy(1);return}if(c.upArrow||n==="k"){m.current?.scrollBy(-1);return}if(c.pageDown){m.current?.scrollBy(10);return}if(c.pageUp){m.current?.scrollBy(-10);return}if(c.home){m.current?.scrollToTop();return}c.end&&m.current?.scrollToBottom()}}},{isActive:!0}),p<Be||j<Le)return e.jsx(l,{alignItems:"center",height:j,justifyContent:"center",width:p,children:e.jsxs(r,{color:"yellow",children:["Terminal too small (",p,"x",j,")"]})});const ae=p>=Ne,V=[e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"q"}),e.jsx(r,{dimColor:!0,children:"QUIT"})]},"q"),e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"?"}),e.jsx(r,{dimColor:!0,children:"HELP"})]},"?"),e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"↑↓"}),e.jsx(r,{dimColor:!0,children:"NAV"})]},"nav"),e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"Space"}),e.jsx(r,{dimColor:!0,children:"CHECK"})]},"sp"),e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"a"}),e.jsx(r,{dimColor:!0,children:"ALL"})]},"a")];!d&&o.checkedEntries.size>0&&V.push(e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"green",children:"u"}),e.jsx(r,{dimColor:!0,children:"APPLY"})]},"u")),i.length>0&&V.push(e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"yellow",children:"f"}),e.jsxs(r,{dimColor:!0,children:["FILTERED (",i.length,")"]})]},"fo")),V.push(e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"←→"}),e.jsx(r,{dimColor:!0,children:"FILTER"})]},"lr"),e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"/"}),e.jsx(r,{dimColor:!0,children:"SEARCH"})]},"f"),e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"Tab"}),e.jsx(r,{dimColor:!0,children:"PANEL"})]},"t"));const J=e.jsx(l,{borderBottom:!1,borderColor:"gray",borderLeft:!1,borderRight:!1,borderStyle:"single",flexShrink:0,children:e.jsx(l,{flexWrap:"wrap",gap:2,paddingX:1,children:V})}),Z=e.jsxs(z,{footer:e.jsxs(r,{dimColor:!0,children:[e.jsx(r,{bold:!0,color:"white",children:"↑↓"})," ","scroll"," ",e.jsx(r,{bold:!0,color:"white",children:"?"}),"/",e.jsx(r,{bold:!0,color:"white",children:"Esc"})," ","close"]}),scrollRef:B,title:"KEYBOARD SHORTCUTS",visible:v,width:52,children:[e.jsxs(l,{flexDirection:"column",marginBottom:1,children:[e.jsxs(l,{marginBottom:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"NAVIGATION"})]}),e.jsxs(l,{children:[e.jsx(l,{width:24,children:e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","↑","/k"]}),e.jsx(r,{dimColor:!0,children:" Move up"})]})}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","↓","/j"]}),e.jsx(r,{dimColor:!0,children:" Move down"})]})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","Tab"]}),e.jsx(r,{dimColor:!0,children:" Switch panel"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","→","/","←"]}),e.jsx(r,{dimColor:!0,children:" Focus detail/list"})]})]}),e.jsxs(l,{flexDirection:"column",marginBottom:1,children:[e.jsxs(l,{marginBottom:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"SELECTION"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","Space"]}),e.jsx(r,{dimColor:!0,children:" Toggle check on package"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","a"]}),e.jsx(r,{dimColor:!0,children:" Toggle check all"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","s"]}),e.jsx(r,{dimColor:!0,children:" Cycle sort (default / name / type / severity)"})]})]}),e.jsxs(l,{flexDirection:"column",marginBottom:1,children:[e.jsxs(l,{marginBottom:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"FILTERS"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","←→"]}),e.jsx(r,{dimColor:!0,children:" Switch filter tab"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","/"]}),e.jsx(r,{dimColor:!0,children:" Text filter"})]}),i.length>0&&e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","f"]}),e.jsx(r,{dimColor:!0,children:" View filtered-out packages"})]})]}),e.jsxs(l,{flexDirection:"column",children:[e.jsxs(l,{marginBottom:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"ACTIONS"})]}),!d&&e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","u"]}),e.jsx(r,{dimColor:!0,children:" Apply selected updates"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","q"]}),e.jsx(r,{dimColor:!0,children:" Quit"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","?"]}),e.jsx(r,{dimColor:!0,children:" Toggle help"})]})]})]}),q=h.getCheckedEntries(),Y=q.filter(n=>n.updateType==="major").length,ue=e.jsxs(l,{alignItems:"center",flexDirection:"column",children:[Y>0&&e.jsx(l,{marginBottom:1,marginTop:1,children:e.jsxs(r,{color:"yellow",children:["⚠"," ",Y," ","major update",Y===1?"":"s"," ","— review breaking changes"]})}),e.jsxs(r,{dimColor:!0,children:["Press"," ",e.jsx(r,{bold:!0,color:"white",children:"u"})," ","or"," ",e.jsx(r,{bold:!0,color:"white",children:"Enter"})," ","to confirm,"," ",e.jsx(r,{bold:!0,color:"white",children:"Esc"})," ","to cancel"]})]}),ee=e.jsx(z,{footer:ue,scrollRef:S,title:`Apply ${q.length} update${q.length===1?"":"s"}?`,visible:I,width:70,children:q.map(n=>e.jsxs(l,{gap:1,children:[e.jsxs(r,{children:[" ",n.packageName]}),e.jsxs(r,{dimColor:!0,children:[n.currentRange," ","→"," ",n.newRange]}),e.jsx(r,{bold:!0,color:n.updateType==="major"?"red":n.updateType==="minor"?"yellow":"green",children:n.updateType})]},n.packageName))}),re=i.length>0?e.jsx(z,{footer:e.jsxs(r,{dimColor:!0,children:[e.jsx(r,{bold:!0,color:"white",children:"↑↓"})," ","scroll"," ",e.jsx(r,{bold:!0,color:"white",children:"f"}),"/",e.jsx(r,{bold:!0,color:"white",children:"Esc"})," ","close"]}),scrollRef:L,title:`${i.length} PACKAGE${i.length===1?"":"S"} FILTERED BY TARGET`,visible:T,width:70,children:e.jsxs(l,{flexDirection:"column",children:[e.jsx(l,{marginBottom:1,children:e.jsxs(r,{dimColor:!0,children:["These packages have newer versions available but are excluded by the current target constraint. Use"," ",e.jsx(r,{bold:!0,color:"white",children:"--target latest"})," ","to include them."]})}),i.map(n=>e.jsxs(l,{gap:1,children:[e.jsxs(r,{children:[" ",n.packageName]}),e.jsxs(r,{dimColor:!0,children:[n.currentRange," ","→"," ",n.newRange]}),e.jsx(r,{bold:!0,color:n.updateType==="major"?"red":n.updateType==="minor"?"yellow":"green",children:n.updateType})]},n.packageName))]})}):null,te=e.jsx(Me,{checkedEntries:o.checkedEntries,entries:k,filterActive:o.filterActive,filteredOutCount:i.length,filterText:o.filterText,filterType:o.filterType,focused:o.focusedPanel==="list",groupedByCatalog:o.groupedByCatalog,isDryRun:d,onViewportHeightChange:$,scrollOffset:F,selectedIndex:o.selectedIndex,totalCatalogEntries:f,totalChecked:s,totalEntries:k.length,viewportHeight:M}),le=e.jsx(Re,{changelogUrl:P,entry:w,focused:o.focusedPanel==="detail",recommendation:H,scrollRef:m});if(ae){const n=Math.floor(p*.35);return e.jsxs(l,{flexDirection:"column",height:j,width:p,children:[e.jsxs(l,{flexDirection:"row",flexGrow:1,children:[e.jsx(l,{flexGrow:1,children:te}),e.jsx(l,{width:n,children:le})]}),J,ee,re,e.jsx(ie,{autoExitSeconds:a||3,onCancel:()=>{D(!1)},visible:C}),Z]})}const xe=Math.floor(j*.55);return e.jsxs(l,{flexDirection:"column",height:j,width:p,children:[e.jsx(l,{height:xe,children:te}),e.jsx(l,{flexGrow:1,children:le}),J,ee,re,e.jsx(ie,{autoExitSeconds:a||3,onCancel:()=>{D(!1)},visible:C}),Z]})};export{He as U,Ke as b,Ue as u};
@@ -0,0 +1 @@
1
+ import{createRequire as b}from"node:module";import{B as v,H as T,y as W}from"./index-BDmTbWX1.js";import{p as h}from"../packem_chunks/bin.js";const $=b(import.meta.url),m=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,p=a=>{if(typeof m<"u"&&m.versions&&m.versions.node){const[n,o]=m.versions.node.split(".").map(Number);if(n>22||n===22&&o>=3||n===20&&o>=16)return m.getBuiltinModule(a)}return $(a)},{watch:y}=p("node:fs"),{execFileSync:j}=p("node:child_process"),{createRequire:S}=p("node:module"),_=S(import.meta.url);let w;const k=()=>{if(w!==void 0)return w;try{_.resolve("fb-watchman")}catch{return w=!1,!1}try{j("watchman",["--version"],{stdio:"ignore",timeout:2e3})}catch{return w=!1,!1}return w=!0,!0},q=(a,n)=>{if(!k())return;let o;try{o=_("fb-watchman")}catch(s){h.warn(`[vis watch] fb-watchman failed to load, using native watcher: ${s.message}`);return}const c=new o.Client;c.on("error",s=>{h.warn(`[vis watch] watchman error: ${s.message}`)}),c.on("subscription",s=>{const t=s;if(!t.is_fresh_instance)for(const e of t.files??[])n(e)});for(const[s,t]of a.entries()){const e=v(t),i=`vis-watch-${s}-${process.pid}`;c.command(["watch-project",e],(l,f)=>{if(l){h.warn(`[vis watch] watchman could not watch ${t}: ${l.message}`);return}const u={expression:["allof",["type","f"]],fields:["name"]};f.relative_path&&(u.relative_root=f.relative_path),c.command(["subscribe",f.watch,i,u],r=>{r&&h.warn(`[vis watch] watchman subscribe failed for ${t}: ${r.message}`)})})}return{close:()=>{try{c.end()}catch{}}}},x=[/node_modules(?:\/|$)/,/\.git(?:\/|$)/,/\.vis(?:\/|$)/],R=(a,n)=>{const o=new Set,c=new Set;for(const[,e]of a){const i=e.task.hashDetails?.nodes;if(i)for(const l of Object.keys(i))o.add(l),c.add(T(v(n,l)))}const s=[...c].sort(),t=[];for(const e of s)t.some(i=>e===i||e.startsWith(`${i}/`))||t.push(e);return{directories:t,files:o}},P=(a,n,o)=>{const c=new Set;for(const s of a){const t=v(n,s);for(const e of o)if(t===e||t.startsWith(`${e}/`)){const i=W(e,t);i.length>0&&c.add(i)}}return s=>{const t=s.replaceAll("\\","/");return c.has(t)}},A=a=>{const n=a.replaceAll("\\","/");return x.some(o=>o.test(n))},D=a=>{const{debounceMs:n=150,filter:o,onChange:c,paths:s}=a;let t=new Set,e;const i=()=>{e=void 0;const r=[...t];t=new Set,r.length!==0&&Promise.resolve(c(r)).catch(d=>{h.error("[vis watch] onChange handler failed:",d)})},l=r=>{A(r)||o&&!o(r)||(t.add(r),e&&clearTimeout(e),e=setTimeout(i,n))},f=q(s,l);if(f)return{close:()=>{e&&clearTimeout(e),f.close()}};const u=[];for(const r of s)try{const d=y(r,{recursive:!0},(B,g)=>{g&&l(g)});u.push(d)}catch(d){h.warn(`[vis watch] unable to watch ${r}: ${d.message}`)}return{close:()=>{e&&clearTimeout(e);for(const r of u)try{r.close()}catch{}}}};export{P as a,R as c,D as s};
@@ -0,0 +1,11 @@
1
+ import{createRequire as K}from"node:module";import{m as g,f as C,v as G,A as S,B as U,a as Q,H as X}from"./index-BDmTbWX1.js";import{aJ as w}from"../packem_chunks/bin.js";import{a as ee}from"../packem_chunks/config.js";import{s as le}from"./watch-BvIwLG4N.js";const H=K(import.meta.url),x=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,v=e=>{if(typeof x<"u"&&x.versions&&x.versions.node){const[t,s]=x.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return x.getBuiltinModule(e)}return H(e)},{createHash:m}=v("node:crypto"),{fileURLToPath:Y,pathToFileURL:Z}=v("node:url"),{spawnSync:te,spawn:se}=v("node:child_process"),{openSync:ne,writeSync:re,closeSync:oe,statSync:ie,readFileSync:N,mkdirSync:ae,writeFileSync:ce}=v("node:fs"),{availableParallelism:b}=v("node:os"),W=(e,t)=>{for(const s of["dependencies","devDependencies","optionalDependencies","peerDependencies"]){const n=e[s];if(n&&typeof n[t]=="string")return n[t]}},k=(e,t)=>{for(const s of t){const n=g(e,s);if(C(n))return n}},ue=e=>{const t=g(e,"package.json");if(!C(t))return{};try{return ee(t)}catch{return{}}},tt=(e,t)=>{const s=ue(e),n=new Map;for(const o of t){const r=o.detect(e,s);r&&n.set(o.id,r)}return n},de={error:"error",info:"info",information:"info",warning:"warning"},st={argsCheck:(e,t)=>j(e,t,!1),argsFix:(e,t)=>j(e,t,!0),bin:()=>["pnpm","exec","biome"],cacheKey:(e,t)=>{const s=["biome",e.declaredVersion??"unknown",e.configFile??"no-config",t.maxWarnings===void 0?"":`mw=${t.maxWarnings}`,t.quiet?"q":"",...t.extraArgs??[]];return m("sha256").update(s.join("|")).digest("hex").slice(0,16)},detect:(e,t)=>{const s=W(t,w.biome.packageNames[0]),n=k(e,w.biome.configFiles);if(!(!s&&!n))return{adapter:"biome",configFile:n,declared:!!s,declaredVersion:s,root:e}},extensions:["astro","cjs","css","cts","js","json","jsonc","jsx","mjs","mts","svelte","ts","tsx","vue"],id:"biome",kind:"both",parse:(e,t)=>{if(!e.stdout.trim())return[];let s;try{s=JSON.parse(e.stdout)}catch{return[{adapter:"biome",file:t.root,fixable:!1,message:`biome output was not valid JSON (exit ${e.exitCode})`,severity:"error"}]}const n=[];for(const o of s.diagnostics??[]){const r=o.location?.start,i=o.location?.end,a=fe(t.root,o.location?.path),c=o.category??"",l=c==="format"||c.startsWith("format/");n.push({adapter:"biome",column:r?.column&&r.column>0?r.column:void 0,endColumn:i?.column&&i.column>0?i.column:void 0,endLine:i?.line&&i.line>0?i.line:void 0,file:a,fixable:!0,line:r?.line&&r.line>0?r.line:void 0,message:l?"Code style issues would be auto-fixed":o.message??"",ruleId:c||void 0,severity:de[o.severity??""]??"warning"})}return n}},j=(e,t,s)=>{const n=["check","--reporter=json"];return s&&n.push("--write"),typeof t.maxWarnings=="number"&&n.push(`--max-diagnostics=${String(t.maxWarnings)}`),t.extraArgs?.length&&n.push(...t.extraArgs),n.push(...e),n},fe=(e,t)=>{const s=typeof t=="string"?t:t?.file;return s?s.startsWith("/")||/^[a-z]:[\\/]/i.test(s)?s:g(e,s):e},B=e=>t=>{const s=k(t,w.deno.configFiles);if(s)return{adapter:e,configFile:s,declared:!1,root:t}},D=e=>e.startsWith("/")||/^[a-z]:[\\/]/i.test(e),nt={argsCheck:(e,t)=>F(e,t,!1),argsFix:(e,t)=>F(e,t,!0),bin:()=>["deno","lint"],cacheKey:(e,t)=>{const s=["deno-lint",e.configFile??"no-config",t.quiet?"q":"",...t.extraArgs??[]];return m("sha256").update(s.join("|")).digest("hex").slice(0,16)},detect:B("deno-lint"),extensions:["js","jsx","mjs","mts","ts","tsx"],id:"deno-lint",kind:"lint",parse:(e,t)=>{if(!e.stdout.trim())return[];let s;try{s=JSON.parse(e.stdout)}catch{return[{adapter:"deno-lint",file:t.root,fixable:!1,message:`deno lint output was not valid JSON (exit ${e.exitCode})`,severity:"error"}]}const n=[];for(const o of s.diagnostics??[]){const r=o.range?.start,i=o.range?.end;n.push({adapter:"deno-lint",column:r?.col===void 0?void 0:r.col+1,endColumn:i?.col===void 0?void 0:i.col+1,endLine:i?.line===void 0?void 0:i.line+1,file:pe(o.filename??t.root,t.root),fixable:!1,line:r?.line===void 0?void 0:r.line+1,message:o.message??"",ruleId:o.code,severity:"warning"})}return n}},rt={argsCheck:(e,t)=>I(e,t,!1),argsFix:(e,t)=>I(e,t,!0),bin:()=>["deno","fmt"],cacheKey:(e,t)=>{const s=["deno-fmt",e.configFile??"no-config",t.quiet?"q":"",...t.extraArgs??[]];return m("sha256").update(s.join("|")).digest("hex").slice(0,16)},detect:B("deno-fmt"),extensions:["astro","cjs","css","cts","html","ipynb","js","json","jsonc","jsx","less","md","mjs","mts","sass","scss","sql","svelte","ts","tsx","vue","yaml","yml"],id:"deno-fmt",kind:"fmt",parse:(e,t)=>{if(e.exitCode===0)return[];const s=[],n=new Set;for(const o of e.stdout.split(/\r?\n/)){const r=/^from (.+):$/.exec(o);if(!r)continue;const i=r[1];n.has(i)||(n.add(i),s.push({adapter:"deno-fmt",file:D(i)?i:`${t.root}/${i}`,fixable:!0,message:"Code style issues would be auto-fixed",severity:"info"}))}return s}},F=(e,t,s)=>{const n=["--json"];return s&&n.push("--fix"),t.extraArgs?.length&&n.push(...t.extraArgs),n.push(...e),n},I=(e,t,s)=>{const n=[];return s||n.push("--check"),t.quiet&&n.push("--quiet"),t.extraArgs?.length&&n.push(...t.extraArgs),n.push(...e),n},pe=(e,t)=>e.startsWith("file://")?Y(e):D(e)?e:`${t}/${e}`,J="pyproject.toml",ge=/^\[tool\.ruff(?:\.[\w-]+)*\]\s*$/m,he=/^Would reformat:?\s+(.+)$/,me=e=>{const t=g(e,J);if(!C(t))return!1;try{const s=G(t);return ge.test(s)}catch{return!1}},E=e=>(t,s)=>{const n=w.ruff.packageNames.map(a=>W(s,a)).find(a=>a!==void 0),o=k(t,w.ruff.configFiles),r=o?void 0:me(t)?g(t,J):void 0,i=o??r;if(!(!n&&!i))return{adapter:e,configFile:i,declared:!!n,declaredVersion:n,root:t}},ye=e=>e.startsWith("/")||/^[a-z]:[\\/]/i.test(e),P=(e,t)=>e?ye(e)?e:g(t,e):t,xe=e=>he.exec(e)?.[1]?.trim(),ot={argsCheck:(e,t)=>L(e,t,!1),argsFix:(e,t)=>L(e,t,!0),bin:()=>["ruff","check"],cacheKey:(e,t)=>{const s=["ruff-check",e.declaredVersion??"unknown",e.configFile??"no-config",t.maxWarnings===void 0?"":`mw=${t.maxWarnings}`,t.quiet?"q":"",...t.extraArgs??[]];return m("sha256").update(s.join("|")).digest("hex").slice(0,16)},detect:E("ruff-check"),extensions:["py","pyi"],id:"ruff-check",kind:"lint",parse:(e,t)=>{if(!e.stdout.trim())return[];let s;try{s=JSON.parse(e.stdout)}catch{return[{adapter:"ruff-check",file:t.root,fixable:!1,message:`ruff check output was not valid JSON (exit ${e.exitCode})`,severity:"error"}]}const n=[];for(const o of s){const r=o.location,i=o.end_location;n.push({adapter:"ruff-check",column:r?.column,endColumn:i?.column,endLine:i?.row,file:P(o.filename,t.root),fixable:!!o.fix,line:r?.row,message:o.message??"",ruleId:o.code,severity:"warning"})}return n}},it={argsCheck:(e,t)=>R(e,t,!1),argsFix:(e,t)=>R(e,t,!0),bin:()=>["ruff","format"],cacheKey:(e,t)=>{const s=["ruff-fmt",e.declaredVersion??"unknown",e.configFile??"no-config",t.quiet?"q":"",...t.extraArgs??[]];return m("sha256").update(s.join("|")).digest("hex").slice(0,16)},detect:E("ruff-fmt"),extensions:["py","pyi"],id:"ruff-fmt",kind:"fmt",parse:(e,t)=>{if(e.exitCode===0)return[];const s=[],n=new Set;for(const o of e.stdout.split(/\r?\n/)){const r=xe(o);!r||n.has(r)||(n.add(r),s.push({adapter:"ruff-fmt",file:P(r,t.root),fixable:!0,message:"Code style issues would be auto-fixed",severity:"info"}))}return s}},L=(e,t,s)=>{const n=["--output-format=json"];return s&&n.push("--fix"),t.quiet&&n.push("--quiet"),t.extraArgs?.length&&n.push(...t.extraArgs),n.push(...e),n},R=(e,t,s)=>{const n=[];return s||n.push("--check"),t.quiet&&n.push("--quiet"),t.extraArgs?.length&&n.push(...t.extraArgs),n.push(...e),n},at=(e,t)=>{const s=$(e,["diff","--name-only","--diff-filter=ACMR","-z",`${t}...HEAD`]);if(s===void 0)return;const n=$(e,["diff","--name-only","--diff-filter=ACMR","-z"]),o=$(e,["diff","--name-only","--diff-filter=ACMR","--cached","-z"]),r=$(e,["ls-files","--others","--exclude-standard","-z"]),i=new Set;for(const a of[s,n??"",o??"",r??""])for(const c of a.split("\0"))c.length!==0&&i.add(S(c)?c:g(e,c));return[...i].sort()},ct=e=>{const t=$(e,["diff","--name-only","--diff-filter=ACMR","--cached","-z"]);if(t===void 0)return;const s=new Set;for(const n of t.split("\0"))n.length!==0&&s.add(S(n)?n:g(e,n));return[...s].sort()},$=(e,t)=>{const s=te("git",[...t],{cwd:e,encoding:"utf8",timeout:1e4});if(s.status===0)return s.stdout},lt=(e,t)=>{const s=new Set(t.map(r=>r.toLowerCase())),n=[],o=new Set;for(const r of e){const i=r.lastIndexOf(".");if(i===-1||i===r.length-1)continue;const a=r.slice(i+1).toLowerCase();s.has(a)&&(o.has(r)||(o.add(r),n.push(r)))}return n},$e=new Set(["-","stdout"]),M=e=>({close:()=>{},write:t=>{e.write(t)}}),we=e=>{Q(X(e));const t=ne(e,"w");let s=[];return{close:()=>{s.length>0&&(re(t,s.join("")),s=[]),oe(t)},write:n=>{s.push(n)}}},ut=e=>{const{cwd:t,target:s}=e;if(s===void 0||$e.has(s))return M(process.stdout);if(s==="stderr")return M(process.stderr);const n=S(s)?s:U(t,s);return we(n)},q=["oxlint","oxfmt","biome","eslint","dprint","prettier","stylelint","ruff-check","ruff-fmt","markdownlint","shellcheck","deno-lint","deno-fmt"],dt=(e,t)=>{const s=new Map(e.map(i=>[i.id,i])),n=[],o=new Set,r=t&&t.length>0?t:q;for(const i of r){const a=s.get(i);a&&!o.has(i)&&(n.push(a),o.add(i))}if(t&&t.length>0)for(const i of q){const a=s.get(i);a&&!o.has(i)&&(n.push(a),o.add(i))}for(const i of e)o.has(i.id)||(n.push(i),o.add(i.id));return n},ft=(e,t,s)=>{const n=[];for(const o of t){const r=e.get(o.id);r&&ve(o.kind,s)&&n.push({adapter:o,presence:r})}return n},ve=(e,t)=>e===t||e==="both",pt=(e,t,s={})=>{const n=new Map;for(const o of e){const r=Se(o),i=Ae(r,t,s);if(!i)continue;const a=n.get(i);a?a.push(o):n.set(i,[o])}return n},Se=e=>{const t=e.lastIndexOf(".");return t===-1||t===e.length-1?"":e.slice(t+1).toLowerCase()},Ae=(e,t,s)=>{const n=s[e];if(n&&t.some(o=>o.adapter.id===n))return n;for(const{adapter:o}of t)if(o.extensions.includes(e))return o.id},Ce=e=>e==="error"?"error":e==="warning"?"warning":"notice",V=e=>e.replaceAll("%","%25").replaceAll("\r","%0D").replaceAll(`
2
+ `,"%0A"),T=e=>V(e).replaceAll(",","%2C").replaceAll(":","%3A").replaceAll("=","%3D"),ke=(e,t)=>t&&e.startsWith(`${t}/`)?e.slice(t.length+1):e,be=(e,t)=>e.file!==t.file?e.file<t.file?-1:1:(e.line??0)-(t.line??0)||(e.column??0)-(t.column??0),je=(e,t)=>{const s=Ce(e.severity),n=ke(e.file,t),o=e.ruleId?`${e.adapter}(${e.ruleId})`:e.adapter,r=[`file=${T(n)}`];return e.line!==void 0&&r.push(`line=${String(e.line)}`),e.endLine!==void 0&&r.push(`endLine=${String(e.endLine)}`),e.column!==void 0&&r.push(`col=${String(e.column)}`),e.endColumn!==void 0&&r.push(`endColumn=${String(e.endColumn)}`),r.push(`title=${T(o)}`),`::${s} ${r.join(",")}::${V(e.message)}
3
+ `},gt=e=>e.runs.flatMap(t=>[...t.findings]).sort(be).map(t=>je(t,e.workspaceRoot)).join(""),y=e=>e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&apos;"),Fe=e=>`<![CDATA[${e.replaceAll("]]>","]]]]><![CDATA[>")}]]>`,Ie=(e,t)=>e.file!==t.file?e.file<t.file?-1:1:(e.line??0)-(t.line??0)||(e.column??0)-(t.column??0),Le=e=>e==="error"?"error":e==="warning"?"warning":"info",Re=(e,t)=>{let{file:s}=e;return t&&e.file.startsWith(`${t}/`)&&(s=e.file.slice(t.length+1)),e.line===void 0?s:e.column===void 0?`${s}:${String(e.line)}`:`${s}:${String(e.line)}:${String(e.column)}`},Me=(e,t,s)=>{const n=Re(e,s),o=Le(e.severity),r=e.ruleId?`[${e.ruleId}] ${e.message}`:e.message;return[` <testcase classname="${y(t)}" name="${y(n)}">`,` <failure type="${y(o)}" message="${y(r)}">${Fe(e.message)}</failure>`," </testcase>",""].join(`
4
+ `)},qe=(e,t,s)=>{const n=[...e.findings].sort(Ie),o=n.filter(l=>l.severity==="error").length,r=n.filter(l=>l.severity==="warning").length,i=n.length,a=(e.durationMs/1e3).toFixed(3),c=n.map(l=>Me(l,e.adapter,s)).join("");return` <testsuite ${[`name="${y(e.adapter)}"`,`tests="${String(i)}"`,`failures="${String(o)}"`,'errors="0"',`skipped="${String(r)}"`,`time="${a}"`,`timestamp="${t}"`].join(" ")}>
5
+ ${c} </testsuite>
6
+ `},ht=e=>{const t=(e.now??new Date).toISOString(),s=e.suiteName??"vis-lint-fmt",n=e.runs.map(c=>qe(c,t,e.workspaceRoot)).join(""),o=e.runs.reduce((c,l)=>c+l.findings.length,0),r=e.runs.reduce((c,l)=>c+l.findings.filter(p=>p.severity==="error").length,0),i=e.runs.reduce((c,l)=>c+l.findings.filter(p=>p.severity==="warning").length,0),a=(e.runs.reduce((c,l)=>c+l.durationMs,0)/1e3).toFixed(3);return`<?xml version="1.0" encoding="UTF-8"?>
7
+ <testsuites ${[`name="${y(s)}"`,`tests="${String(o)}"`,`failures="${String(r)}"`,'errors="0"',`skipped="${String(i)}"`,`time="${a}"`].join(" ")}>
8
+ ${n}</testsuites>
9
+ `},Te="2.1.0",Oe="https://json.schemastore.org/sarif-2.1.0.json",_e=e=>e==="error"?"error":e==="warning"?"warning":"note",Ne=(e,t)=>t&&e.startsWith(`${t}/`)?{uri:e.slice(t.length+1),uriBaseId:"SRCROOT"}:{uri:e},We=e=>{const{href:t}=Z(e);return t.endsWith("/")?t:`${t}/`},Be=(e,t)=>e.file!==t.file?e.file<t.file?-1:1:(e.line??0)-(t.line??0)||(e.column??0)-(t.column??0),De=e=>{const t=new Map;for(const s of e)s.ruleId&&(t.has(s.ruleId)||t.set(s.ruleId,{id:s.ruleId,name:s.ruleId}));return[...t.values()]},Je=(e,t)=>{const{uri:s,uriBaseId:n}=Ne(e.file,t),o={artifactLocation:n?{uri:s,uriBaseId:n}:{uri:s}};if(e.line!==void 0){const i={startLine:e.line};e.column!==void 0&&(i.startColumn=e.column),e.endLine!==void 0&&(i.endLine=e.endLine),e.endColumn!==void 0&&(i.endColumn=e.endColumn),o.region=i}const r={level:_e(e.severity),locations:[{physicalLocation:o}],message:{text:e.message}};return e.ruleId&&(r.ruleId=e.ruleId),r},Ee=(e,t)=>{const s=[...e.findings].sort(Be),n=De(s),o={name:e.adapter,rules:n};e.presence?.declaredVersion&&(o.version=e.presence.declaredVersion);const r={results:s.map(i=>Je(i,t)),tool:{driver:o}};return t&&(r.originalUriBaseIds={SRCROOT:{uri:We(t)}}),r},mt=e=>{const t={$schema:Oe,runs:e.runs.map(s=>Ee(s,e.workspaceRoot)),version:Te};return`${JSON.stringify(t,void 0,2)}
10
+ `},O={error:3,info:1,warning:2},yt=e=>{const t=[],s=[];let n,o=!1;for(const r of e){s.push({adapter:r.adapter,durationMs:r.durationMs,exitCode:r.exitCode,findingCount:r.findings.length}),r.exitCode!==0&&r.exitCode!==null&&r.findings.length===0&&(o=!0);for(const i of r.findings)t.push(i),(!n||O[i.severity]>O[n])&&(n=i.severity)}return{findings:t,hadProcessFailure:o,maxSeverity:n,runs:s}},xt=e=>{const t=new Map;for(const s of e){const n=t.get(s.file);n?n.push(s):t.set(s.file,[s])}return t},$t=e=>e.hadProcessFailure||e.maxSeverity==="error"?1:0,Pe=(e,t)=>{if(t==="fix"||process.env.VIS_NO_CACHE==="1"||e.length===0)return!1;for(const s of e)if(s==="."||s==="./"||s==="..")return!1;return!0},Ve=e=>{try{const t=N(e);return m("sha256").update(t).digest("hex")}catch{return}},ze=(e,t,s,n,o)=>{const r=e.cacheKey(t,n),i=[];for(const c of[...s].sort()){const l=S(c)?c:g(t.root,c);try{ie(l)}catch{return}const p=Ve(l);if(!p)return;i.push({hash:p,path:l})}const a=m("sha256");a.update(e.id),a.update("\0"),a.update(r),a.update("\0"),a.update(o);for(const c of i)a.update("\0"),a.update(c.path),a.update("\0"),a.update(c.hash);return{fileHashes:i,key:a.digest("hex")}},z=(e,t)=>g(e,"lint-fmt",t),Ke=(e,t,s)=>{const n=g(z(e,t.id),`${s}.json`);try{const o=N(n,"utf8"),r=JSON.parse(o);return r.schema!==1?void 0:r}catch{return}},He=(e,t,s,n,o)=>{const r=z(e,t.id),i={fileHashes:o,result:n,savedAt:Date.now(),schema:1};try{ae(r,{recursive:!0}),ce(g(r,`${s}.json`),JSON.stringify(i))}catch{}},_=async(e,t,s,n,o)=>{const r=e.bin(t),i=[...r.slice(1),...o==="fix"?e.argsFix(s,n):e.argsCheck(s,n)];return new Promise(a=>{const c=Date.now(),l=se(r[0],i,{cwd:t.root}),p=[],u=[];let h=!1;const f=setTimeout(()=>{h=!0,l.kill("SIGKILL")},6e4);l.stdout.on("data",d=>p.push(d)),l.stderr.on("data",d=>u.push(d)),l.on("error",d=>{clearTimeout(f),a({durationMs:Date.now()-c,exitCode:null,stderr:d.message,stdout:""})}),l.on("close",d=>{clearTimeout(f),a({durationMs:Date.now()-c,exitCode:h?null:d,stderr:Buffer.concat(u).toString("utf8"),stdout:Buffer.concat(p).toString("utf8")})})})},wt=async(e,t,s,n=b())=>{if(e.length===0)return[];const{cacheRoot:o,concurrency:r}=typeof n=="number"?{concurrency:n}:{cacheRoot:n.cacheRoot,concurrency:n.concurrency??b()},i=async u=>{const h=u.options??t;if(o&&Pe(u.files,s)){const f=ze(u.adapter,u.presence,u.files,h,s);if(f){const d=Ke(o,u.adapter,f.key);if(d)return d.result;const A=await _(u.adapter,u.presence,u.files,h,s);return A.exitCode!==null&&He(o,u.adapter,f.key,A,f.fileHashes),A}}return _(u.adapter,u.presence,u.files,h,s)};if(process.env.VIS_LINT_FMT_SERIAL==="1"){const u=[];for(const h of e)u.push(await i(h));return u}const a=Math.max(1,Math.min(r,e.length)),c=Array.from({length:e.length});let l=0;const p=async()=>{for(;;){const u=l;if(l+=1,u>=e.length)return;c[u]=await i(e[u])}};return await Promise.all(Array.from({length:a},()=>p())),c},Ge=e=>{const t=new Set;for(const s of e)t.add(s.toLowerCase());return t},Ue=(e,t)=>{const s=e.lastIndexOf(".");return s===-1||s===e.length-1?!1:t.has(e.slice(s+1).toLowerCase())},vt=async e=>{const{extensions:t,initialFiles:s,label:n,log:o,runCycle:r,workspaceRoot:i}=e,a=o??(f=>{process.stdout.write(`${f}
11
+ `)}),c=Ge(t);await r(s),a(`▸ ${n}: watching workspace — press Ctrl-C to exit`);let l=new Set,p=!1;const u=async()=>{for(;l.size>0;){const f=[...l];l=new Set;try{await r(f)}catch(d){a(`✗ ${n}: watch cycle failed — ${d.message}`)}}},h=le({debounceMs:200,filter:f=>Ue(f,c),onChange:async f=>{for(const d of f)l.add(S(d)?d:g(i,d));if(!p){p=!0;try{await u()}finally{p=!1}}},paths:[i]});await new Promise(f=>{const d=()=>{h.close(),process.off("SIGINT",d),process.off("SIGTERM",d),f()};process.once("SIGINT",d),process.once("SIGTERM",d)})};export{tt as a,ft as b,at as c,W as d,vt as e,k as f,pt as g,wt as h,yt as i,ut as j,mt as k,ht as l,gt as m,st as n,it as o,rt as p,xt as q,dt as r,ct as s,$t as t,lt as u,ot as v,nt as w};
@@ -0,0 +1,5 @@
1
+ import { C as ChangelogFormatter } from "../../../packem_shared/api.d-BPftyU9r.js";
2
+ export { type a as ChangeFileMeta, type b as ChangelogContext, type c as ChangelogFormatterModule, type d as ChangelogTarget, e as defineFormatter } from "../../../packem_shared/api.d-BPftyU9r.js";
3
+ import { VisReleaseConfig } from "../../types.js";
4
+ declare const resolveFormatter: (setting: VisReleaseConfig["changelog"], cwd: string) => Promise<ChangelogFormatter>;
5
+ export { type ChangelogFormatter, resolveFormatter };
@@ -0,0 +1 @@
1
+ import{defineFormatter as o}from"../../../packem_shared/defineFormatter-D5dCp6Kv.js";import{resolveFormatter as m}from"../../../packem_chunks/resolveFormatter.js";export{o as defineFormatter,m as resolveFormatter};
@@ -0,0 +1,6 @@
1
+ import { C as CommandRunner, P as PackageManagerAdapter } from "../../../packem_shared/interface.d-B7VK2rcH.js";
2
+ export type { I as InstallLockfileOnlyOptions, a as PackOptions, b as PackResult, c as PublishNativeOptions, d as PublishOptions, e as PublishResult, W as WorkspaceListEntry } from "../../../packem_shared/interface.d-B7VK2rcH.js";
3
+ type PackageManagerId = "npm" | "pnpm" | "yarn" | "bun";
4
+ declare const detectPackageManager: (cwd: string, _runner: CommandRunner) => Promise<PackageManagerId>;
5
+ declare const createAdapter: (id: PackageManagerId, runner: CommandRunner) => PackageManagerAdapter;
6
+ export { type CommandRunner, type PackageManagerAdapter, type PackageManagerId, createAdapter, detectPackageManager };
@@ -0,0 +1 @@
1
+ import{c as r,d as t}from"../../../packem_chunks/detect.js";export{r as createAdapter,t as detectPackageManager};
@@ -0,0 +1,14 @@
1
+ import { V as VersionActions } from "../../../packem_shared/interface.d-Cezzifoh.js";
2
+ export { A as AfterAllProjectsVersioned, type a as AfterAllVersionedContext, type b as AfterAllVersionedResult, type P as PublishContext } from "../../../packem_shared/interface.d-Cezzifoh.js";
3
+ import "../../types.js";
4
+ import "../../../packem_shared/interface.d-B7VK2rcH.js";
5
+ /**
6
+ * Construct the {@link VersionActions} implementation for a resolved id.
7
+ *
8
+ * Unknown ids fall back to npm — the historical default and the only safe
9
+ * choice for a JS workspace package without explicit configuration.
10
+ * @param id versionActions id (e.g. `npm`, `cargo`, `jsr`, `container`).
11
+ * @returns a fresh {@link VersionActions} instance.
12
+ */
13
+ declare const createVersionActions: (id: string) => VersionActions;
14
+ export { VersionActions, createVersionActions };
@@ -0,0 +1 @@
1
+ import{AfterAllProjectsVersioned as r,VersionActions as s}from"../../../packem_shared/AfterAllProjectsVersioned-CAKI2nWf.js";import{c}from"../../../packem_chunks/registry.js";export{r as AfterAllProjectsVersioned,s as VersionActions,c as createVersionActions};
@@ -0,0 +1,196 @@
1
+ import { PlannedRelease, VisReleaseConfig, ReleasePlan, DependencyBumpRules, CleanPackageJsonConfig } from "./types.js";
2
+ export { BUMP_LEVELS, type BumpAs, type BumpLevel, type BumpReason, type BumpSource, type CatalogResolutionMode, type ChangeFile, type ChangeFileNested, type ChangeFileSimple, type ChannelConfig, type ChannelMode, type DependencyBumpRule, type DependencyKind, type DependentInfo, type GitUserConfig, type LockInfo, type PackManager, type PackageManifest, type PerPackageReleaseConfig, type ProtocolResolutionMode, type PublishConfig, type PublishGuardsConfig, type PublishStrategy, type ReleaseAssetsConfig, type SnapshotBackend, type SnapshotConfig, type SnapshotTagKind, type StateFile, type SuccessWalkConfig, type UpdateInternalDependenciesMode, type VersionPrConfig, type WorkspacePackage, bumpRank, maxBump } from "./types.js";
3
+ interface ReleaseOptionsBase {
4
+ /** Force a specific channel name (overrides branch detection). */
5
+ channel?: string;
6
+ /** Inline config — merged on top of `vis.config.ts`'s `release` block. */
7
+ config?: VisReleaseConfig;
8
+ /** Override workspace root (default: `process.cwd()`'s monorepo root). */
9
+ cwd?: string;
10
+ /** Skip writes / network calls. */
11
+ dryRun?: boolean;
12
+ /**
13
+ * Greenfield bootstrap. Forces `currentVersionResolver: "disk"` and
14
+ * skips remote tag-collision checks so the very first release on a
15
+ * fresh repo (no prior git tag, no published version) can proceed
16
+ * without errors. Maps to `nx release --first-release` and
17
+ * release-please's `bootstrap-sha`.
18
+ */
19
+ firstRelease?: boolean;
20
+ /** Limit to packages matching these globs. */
21
+ projects?: string[];
22
+ /** Resume from a previous run's `.state.json`. */
23
+ resume?: boolean;
24
+ }
25
+ interface VersionOptions extends ReleaseOptionsBase {
26
+ /** Auto-commit after writing versions. (Wired in M5.) */
27
+ commit?: boolean;
28
+ }
29
+ interface ChangelogOptions extends ReleaseOptionsBase {
30
+ interactive?: boolean;
31
+ versionData?: PlannedRelease[];
32
+ }
33
+ interface PublishOptions extends ReleaseOptionsBase {
34
+ /** Skip `git push --tags` after publish. */
35
+ noPush?: boolean;
36
+ /** 2FA token. */
37
+ otp?: string;
38
+ /** Override npm dist-tag. */
39
+ tag?: string;
40
+ versionData?: PlannedRelease[];
41
+ }
42
+ interface SnapshotOptions extends ReleaseOptionsBase {
43
+ registry?: string;
44
+ tag: string;
45
+ }
46
+ interface ReleaseOptions extends VersionOptions {
47
+ skipPublish?: boolean;
48
+ yes?: boolean;
49
+ }
50
+ interface VersionResult {
51
+ /** Files written / deleted by `apply-release-plan`. */
52
+ changedFiles: string[];
53
+ deletedFiles: string[];
54
+ plan: ReleasePlan;
55
+ }
56
+ interface ChangelogResult {
57
+ projectChangelogs: {
58
+ content: string;
59
+ file: string;
60
+ package: string;
61
+ }[];
62
+ workspaceChangelog?: {
63
+ content: string;
64
+ file: string;
65
+ };
66
+ }
67
+ interface PublishResult {
68
+ failed: {
69
+ name: string;
70
+ reason: string;
71
+ }[];
72
+ published: {
73
+ name: string;
74
+ version: string;
75
+ }[];
76
+ skipped: {
77
+ name: string;
78
+ reason: string;
79
+ }[];
80
+ }
81
+ interface SnapshotResult {
82
+ failed: {
83
+ name: string;
84
+ reason: string;
85
+ }[];
86
+ published: {
87
+ name: string;
88
+ url?: string;
89
+ version: string;
90
+ }[];
91
+ skipped: {
92
+ name: string;
93
+ reason: string;
94
+ }[];
95
+ /** Snapshot version applied to every published item. */
96
+ snapshotVersion: string;
97
+ /** dist-tag used. */
98
+ tag: string;
99
+ }
100
+ declare const releaseVersion: (options?: VersionOptions) => Promise<VersionResult>;
101
+ /**
102
+ * Standalone changelog rendering — produces the per-package CHANGELOG.md
103
+ * entries WITHOUT writing them to disk. Useful for previewing the
104
+ * changelog output, or for downstream tooling (e.g. release-notes for
105
+ * GH Releases) that needs the rendered content separately from the
106
+ * version-apply pass.
107
+ *
108
+ * The default `releaseVersion` path also writes changelog entries
109
+ * automatically (formatter is invoked inside `applyReleasePlan`); this
110
+ * function is for read-only access to the same rendered output.
111
+ */
112
+ declare const releaseChangelog: (options?: ChangelogOptions) => Promise<ChangelogResult>;
113
+ declare const releasePublish: (options?: PublishOptions) => Promise<PublishResult>;
114
+ declare const releaseSnapshot: (options: SnapshotOptions) => Promise<SnapshotResult>;
115
+ declare const release: (options?: ReleaseOptions) => Promise<{
116
+ changelog: ChangelogResult;
117
+ publish: PublishResult;
118
+ version: VersionResult;
119
+ }>;
120
+ declare class ReleaseClient {
121
+ readonly config: VisReleaseConfig;
122
+ constructor(config?: VisReleaseConfig);
123
+ releaseVersion(options?: Omit<VersionOptions, "config">): Promise<VersionResult>;
124
+ releaseChangelog(options?: Omit<ChangelogOptions, "config">): Promise<ChangelogResult>;
125
+ releasePublish(options?: Omit<PublishOptions, "config">): Promise<PublishResult>;
126
+ releaseSnapshot(options: Omit<SnapshotOptions, "config">): Promise<SnapshotResult>;
127
+ }
128
+ /**
129
+ * Identity function for type-narrowing a `VisReleaseConfig` defined in
130
+ * a separate file (e.g. `release.config.ts`). Use vis's top-level
131
+ * `defineConfig` from `@visulima/vis/config` when defining the whole
132
+ * `vis.config.ts` instead.
133
+ */
134
+ declare const defineReleaseConfig: (config: VisReleaseConfig) => VisReleaseConfig;
135
+ /**
136
+ * Built-in defaults. Used by the loader when a key is not set by the user
137
+ * and must be in the resolved config.
138
+ */
139
+ declare const DEFAULT_CONFIG: Required<Pick<VisReleaseConfig, "baseBranch" | "changesDir" | "access" | "changelog" | "changedFilePatterns" | "updateInternalDependencies" | "fixed" | "linked" | "ignore" | "include" | "privatePackages" | "aggregateRelease" | "defaultManaged" | "allowCustomCommands" | "preVersionCommand" | "postVersionCommand" | "prePublishCommand" | "postPublishCommand">>;
140
+ declare const DEFAULT_DEPENDENCY_BUMP_RULES: Required<DependencyBumpRules>;
141
+ /**
142
+ * Default fields stripped from `package.json` on publish (RFC §20.4).
143
+ * Match `@anolilab/semantic-release-clean-package-json` behaviour.
144
+ */
145
+ declare const DEFAULT_CLEAN_STRIP: ReadonlyArray<string>;
146
+ /**
147
+ * Default fields preserved on publish — informational, used only by `--dry-run` rendering.
148
+ * The actual publish step strips by deny-list (`DEFAULT_CLEAN_STRIP`), not by allow-list.
149
+ */
150
+ declare const DEFAULT_CLEAN_KEEP: ReadonlyArray<string>;
151
+ /**
152
+ * Resolve user-supplied `cleanPackageJson` to a concrete strip list.
153
+ * `false` → empty (don't strip anything).
154
+ * `true` / undefined → defaults.
155
+ * Object form → defaults + extra strip, minus anything in `keep`.
156
+ */
157
+ declare const resolveCleanStripList: (cfg: boolean | CleanPackageJsonConfig | undefined) => string[];
158
+ /**
159
+ * Typed errors for the release subsystem (RFC §19.4).
160
+ *
161
+ * Modeled on nx's `CreateNxReleaseConfigError`. Every failure path throws
162
+ * a `VisReleaseError` with a stable `code` from `VisReleaseErrorCode`.
163
+ * Codes are part of the public API surface — additions are minor, removals
164
+ * are major (RFC §21.1).
165
+ */
166
+ type VisReleaseErrorCode = "AUTH_MISSING" | "DUPLICATE_PACKAGE_NAME" | "CYCLIC_DEPENDENCY" | "TAG_COLLISION" | "BUMP_FILE_INVALID" | "CONFIG_INVALID" | "GIT_OPERATION_FAILED" | "PM_VERSION_TOO_LOW" | "NATIVE_ADDON_VERSION_MISMATCH" | "PUBLISH_FAILED" | "STAGE_PENDING" | "TAG_PUSH_FAILED" | "STATE_FILE_CORRUPT";
167
+ interface VisReleaseErrorOptions {
168
+ /** Original error for stack-trace continuity. */
169
+ cause?: unknown;
170
+ /** Stable machine-readable code. */
171
+ code: VisReleaseErrorCode;
172
+ /** Link to docs explaining the failure. */
173
+ docsUrl?: string;
174
+ /** File path (e.g. for `BUMP_FILE_INVALID`). */
175
+ file?: string;
176
+ /** Suggested next step. Optional but encouraged. */
177
+ hint?: string;
178
+ /** Line number (when relevant). */
179
+ line?: number;
180
+ /** Human-readable message. */
181
+ message: string;
182
+ /** Package name (when error is package-scoped). */
183
+ packageName?: string;
184
+ }
185
+ declare class VisReleaseError extends Error {
186
+ readonly code: VisReleaseErrorCode;
187
+ readonly hint?: string;
188
+ readonly docsUrl?: string;
189
+ readonly packageName?: string;
190
+ readonly file?: string;
191
+ readonly line?: number;
192
+ constructor(options: VisReleaseErrorOptions);
193
+ }
194
+ /** Convenience factory — same as `new VisReleaseError(opts)` but more ergonomic at the call site. */
195
+ declare const visReleaseError: (options: VisReleaseErrorOptions) => VisReleaseError;
196
+ export { type ChangelogOptions, type ChangelogResult, type CleanPackageJsonConfig, DEFAULT_CLEAN_KEEP, DEFAULT_CLEAN_STRIP, DEFAULT_CONFIG, DEFAULT_DEPENDENCY_BUMP_RULES, type DependencyBumpRules, type PlannedRelease, type PublishOptions, type PublishResult, ReleaseClient, type ReleaseOptions, type ReleaseOptionsBase, type ReleasePlan, type SnapshotOptions, type SnapshotResult, type VersionOptions, type VersionResult, type VisReleaseConfig, VisReleaseError, type VisReleaseErrorCode, type VisReleaseErrorOptions, defineReleaseConfig, release, releaseChangelog, releasePublish, releaseSnapshot, releaseVersion, resolveCleanStripList, visReleaseError };
@@ -0,0 +1 @@
1
+ import{ReleaseClient as s,release as E,releaseChangelog as o,releasePublish as a,releaseSnapshot as l,releaseVersion as L}from"../packem_shared/ReleaseClient-YHzBIxYS.js";import{DEFAULT_CLEAN_KEEP as _,DEFAULT_CLEAN_STRIP as n,DEFAULT_CONFIG as p,DEFAULT_DEPENDENCY_BUMP_RULES as t,defineReleaseConfig as C,resolveCleanStripList as m}from"../packem_chunks/DEFAULT_CLEAN_KEEP.js";import{VisReleaseError as U,visReleaseError as f}from"../packem_shared/VisReleaseError-DMGRBTNO.js";import{BUMP_LEVELS as D,bumpRank as P,maxBump as x}from"./types.js";export{D as BUMP_LEVELS,_ as DEFAULT_CLEAN_KEEP,n as DEFAULT_CLEAN_STRIP,p as DEFAULT_CONFIG,t as DEFAULT_DEPENDENCY_BUMP_RULES,s as ReleaseClient,U as VisReleaseError,P as bumpRank,C as defineReleaseConfig,x as maxBump,E as release,o as releaseChangelog,a as releasePublish,l as releaseSnapshot,L as releaseVersion,m as resolveCleanStripList,f as visReleaseError};
@@ -0,0 +1,127 @@
1
+ import { C as ChangelogFormatter } from "../packem_shared/api.d-BPftyU9r.js";
2
+ export type { b as ChangelogContext, c as ChangelogFormatterModule, d as ChangelogTarget } from "../packem_shared/api.d-BPftyU9r.js";
3
+ import { V as VersionActions } from "../packem_shared/interface.d-Cezzifoh.js";
4
+ export { A as AfterAllProjectsVersioned, type a as AfterAllVersionedContext, type b as AfterAllVersionedResult, type P as PublishContext } from "../packem_shared/interface.d-Cezzifoh.js";
5
+ export type { e as PublishResult } from "../packem_shared/interface.d-B7VK2rcH.js";
6
+ import "./types.js";
7
+ interface NotificationPackage {
8
+ /** Package name. */
9
+ name: string;
10
+ /** dist-tag / channel name (`latest`, `alpha`, …). */
11
+ tag?: string;
12
+ /**
13
+ * URL of the published artifact (npm package page, GH release URL,
14
+ * etc.). Populated by `publishContext` after `createRemoteReleases`.
15
+ * May be absent when the registry has no canonical URL (e.g. a
16
+ * shell-publish target with no `checkPublished` lookup).
17
+ */
18
+ url?: string;
19
+ /** Resolved version. */
20
+ version: string;
21
+ }
22
+ interface NotificationContext {
23
+ /** Active channel name (`main`, `alpha`, …). Absent when no channel matched. */
24
+ channel?: string;
25
+ /** ISO-8601 wave-completion timestamp. */
26
+ completedAt: string;
27
+ /** Workspace name pulled from root `package.json#name`, when present. */
28
+ monorepoName?: string;
29
+ /** Packages that successfully published in this wave. */
30
+ published: ReadonlyArray<NotificationPackage>;
31
+ /** Repo slug (`owner/name`) for URL composition. */
32
+ repo?: string;
33
+ /**
34
+ * Packages skipped at the publish gate (stage-rejected / stage-timeout /
35
+ * already-published / etc.). Channel implementations decide whether to
36
+ * surface them.
37
+ */
38
+ skipped: ReadonlyArray<{
39
+ name: string;
40
+ reason: string;
41
+ }>;
42
+ }
43
+ /**
44
+ * The contract a notification channel implements. Built-in channels
45
+ * (slack, discord, webhook) implement this; custom plugins do too.
46
+ *
47
+ * Implementations MUST be idempotent — `dispatchNotifications` may be
48
+ * retried after a partial failure, and posting the same release twice
49
+ * is annoying.
50
+ */
51
+ interface NotificationChannel {
52
+ /** Stable id used in log messages: `"slack"`, `"discord"`, `"webhook"`, …. */
53
+ readonly id: string;
54
+ /**
55
+ * Send the notification. Throw on hard failure (HTTP non-2xx,
56
+ * network error). The dispatcher catches and logs as a warn-level
57
+ * message; it does NOT propagate.
58
+ */
59
+ send: (context: NotificationContext) => Promise<void>;
60
+ }
61
+ /**
62
+ * Re-export of {@link NotificationChannel} so plugin authors get the
63
+ * full type from a single import path.
64
+ */
65
+ /**
66
+ * Identity wrapper that constrains its argument to a
67
+ * {@link NotificationChannel}. Use as the default export of a custom
68
+ * channel module so the type-system catches missing fields (e.g. no
69
+ * `id` / no `send`) at the import site.
70
+ *
71
+ * ```ts
72
+ * export default defineNotificationChannel({
73
+ * id: "teams",
74
+ * async send(context) {
75
+ * await fetch(WEBHOOK, { body: JSON.stringify(context) });
76
+ * },
77
+ * });
78
+ * ```
79
+ */
80
+ declare const defineNotificationChannel: (channel: NotificationChannel) => NotificationChannel;
81
+ /**
82
+ * Re-export the shapes a `VersionActions` implementation interacts
83
+ * with. `PublishContext` carries everything you need at publish time
84
+ * (the package, the resolved version, workspace + per-package config);
85
+ * `PublishResult` is the typed return shape.
86
+ */
87
+ /**
88
+ * Identity wrapper that constrains its argument to a concrete
89
+ * {@link VersionActions} subclass instance.
90
+ *
91
+ * Most authors will subclass `VersionActions` directly because it's an
92
+ * abstract class with two abstract methods. `defineVersionActions` is
93
+ * still useful as a type-narrowed default-export wrapper that surfaces
94
+ * a clearer compile error when the subclass forgets `id` /
95
+ * `readPublishedVersion` / `publish`:
96
+ *
97
+ * ```ts
98
+ * class TeamsActions extends VersionActions {
99
+ * readonly id = "teams";
100
+ * async readPublishedVersion() { return undefined; }
101
+ * async publish(context: PublishContext): Promise&lt;PublishResult> { ... }
102
+ * }
103
+ *
104
+ * export default defineVersionActions(new TeamsActions());
105
+ * ```
106
+ */
107
+ declare const defineVersionActions: (actions: VersionActions) => VersionActions;
108
+ /**
109
+ * Re-export of the changelog formatter contract — same shape as
110
+ * `@visulima/vis/release/types` exposes, surfaced here so plugin authors
111
+ * never need a second import path.
112
+ */
113
+ /**
114
+ * Identity wrapper around a {@link ChangelogFormatter}.
115
+ *
116
+ * ```ts
117
+ * export default defineChangelogFormatter(async (context) => {
118
+ * return `### ${context.release.name} ${context.release.newVersion}\n…`;
119
+ * });
120
+ * ```
121
+ *
122
+ * Aliased to the historical `defineFormatter` export from
123
+ * `core/changelog/api` so existing user code continues to type-check;
124
+ * future plugin authors should prefer the SDK name for clarity.
125
+ */
126
+ declare const defineChangelogFormatter: (formatter: ChangelogFormatter) => ChangelogFormatter;
127
+ export { type ChangelogFormatter, type NotificationChannel, type NotificationContext, type NotificationPackage, VersionActions, defineChangelogFormatter, defineNotificationChannel, defineVersionActions };
@@ -0,0 +1 @@
1
+ import{AfterAllProjectsVersioned as s,VersionActions as f}from"../packem_shared/AfterAllProjectsVersioned-CAKI2nWf.js";const o=e=>e,n=e=>e,i=e=>e;export{s as AfterAllProjectsVersioned,f as VersionActions,i as defineChangelogFormatter,o as defineNotificationChannel,n as defineVersionActions};