@visulima/vis 3.0.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (305) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/LICENSE.md +5307 -4249
  3. package/dist/bin.js +1 -1
  4. package/dist/binx.js +2 -2
  5. package/dist/config/index.js +1 -1
  6. package/dist/packem_chunks/CONFIG_FILES.js +6 -6
  7. package/dist/packem_chunks/DEFAULT_CLEAN_KEEP.js +1 -1
  8. package/dist/packem_chunks/agent-instructions.js +7 -7
  9. package/dist/packem_chunks/bloom-status.js +2 -2
  10. package/dist/packem_chunks/bloom-sync.js +2 -2
  11. package/dist/packem_chunks/cache-attestation.js +1 -1
  12. package/dist/packem_chunks/catalog-detector.js +1 -1
  13. package/dist/packem_chunks/catalog.js +87 -111
  14. package/dist/packem_chunks/cli-exec.js +1 -1
  15. package/dist/packem_chunks/cli-main.js +192 -217
  16. package/dist/packem_chunks/defineReleasePlugin.js +3 -3
  17. package/dist/packem_chunks/detect.js +8 -3
  18. package/dist/packem_chunks/devtools.js +1 -1
  19. package/dist/packem_chunks/discord.js +4 -4
  20. package/dist/packem_chunks/dispatch.js +4 -4
  21. package/dist/packem_chunks/doctor-probe.js +2 -2
  22. package/dist/packem_chunks/extra-files.js +3 -3
  23. package/dist/packem_chunks/fix.js +11 -11
  24. package/dist/packem_chunks/git.js +3 -3
  25. package/dist/packem_chunks/group-tags.js +1 -1
  26. package/dist/packem_chunks/handler.js +1 -1
  27. package/dist/packem_chunks/handler10.js +5 -5
  28. package/dist/packem_chunks/handler11.js +1 -1
  29. package/dist/packem_chunks/handler12.js +16 -16
  30. package/dist/packem_chunks/handler13.js +5 -5
  31. package/dist/packem_chunks/handler14.js +1 -1
  32. package/dist/packem_chunks/handler15.js +1 -1
  33. package/dist/packem_chunks/handler16.js +1 -1
  34. package/dist/packem_chunks/handler17.js +1 -1
  35. package/dist/packem_chunks/handler18.js +1 -1
  36. package/dist/packem_chunks/handler19.js +5 -5
  37. package/dist/packem_chunks/handler2.js +1 -1
  38. package/dist/packem_chunks/handler20.js +2 -2
  39. package/dist/packem_chunks/handler21.js +2 -2
  40. package/dist/packem_chunks/handler22.js +8 -8
  41. package/dist/packem_chunks/handler23.js +1 -1
  42. package/dist/packem_chunks/handler24.js +1 -1
  43. package/dist/packem_chunks/handler25.js +1 -1
  44. package/dist/packem_chunks/handler26.js +5 -5
  45. package/dist/packem_chunks/handler27.js +1 -1
  46. package/dist/packem_chunks/handler28.js +3 -3
  47. package/dist/packem_chunks/handler29.js +1 -1
  48. package/dist/packem_chunks/handler3.js +2 -2
  49. package/dist/packem_chunks/handler30.js +1 -1
  50. package/dist/packem_chunks/handler31.js +2 -2
  51. package/dist/packem_chunks/handler32.js +2 -2
  52. package/dist/packem_chunks/handler33.js +2 -2
  53. package/dist/packem_chunks/handler34.js +3 -3
  54. package/dist/packem_chunks/handler35.js +5 -5
  55. package/dist/packem_chunks/handler36.js +1 -1
  56. package/dist/packem_chunks/handler37.js +2 -2
  57. package/dist/packem_chunks/handler38.js +6 -6
  58. package/dist/packem_chunks/handler39.js +8 -8
  59. package/dist/packem_chunks/handler4.js +4 -4
  60. package/dist/packem_chunks/handler40.js +34 -34
  61. package/dist/packem_chunks/handler41.js +5 -5
  62. package/dist/packem_chunks/handler42.js +4 -4
  63. package/dist/packem_chunks/handler43.js +3 -3
  64. package/dist/packem_chunks/handler44.js +2 -2
  65. package/dist/packem_chunks/handler45.js +1 -1
  66. package/dist/packem_chunks/handler46.js +1 -1
  67. package/dist/packem_chunks/handler47.js +1 -1
  68. package/dist/packem_chunks/handler48.js +3 -3
  69. package/dist/packem_chunks/handler49.js +1 -1
  70. package/dist/packem_chunks/handler5.js +6 -6
  71. package/dist/packem_chunks/handler50.js +6 -6
  72. package/dist/packem_chunks/handler51.js +13 -13
  73. package/dist/packem_chunks/handler52.js +3 -3
  74. package/dist/packem_chunks/handler53.js +5 -5
  75. package/dist/packem_chunks/handler54.js +2 -2
  76. package/dist/packem_chunks/handler55.js +1 -1
  77. package/dist/packem_chunks/handler56.js +4 -4
  78. package/dist/packem_chunks/handler57.js +5 -5
  79. package/dist/packem_chunks/handler58.js +5 -5
  80. package/dist/packem_chunks/handler59.js +8 -8
  81. package/dist/packem_chunks/handler6.js +7 -7
  82. package/dist/packem_chunks/handler60.js +3 -3
  83. package/dist/packem_chunks/handler61.js +21 -21
  84. package/dist/packem_chunks/handler62.js +12 -12
  85. package/dist/packem_chunks/handler63.js +3 -3
  86. package/dist/packem_chunks/handler64.js +5 -5
  87. package/dist/packem_chunks/handler65.js +8 -8
  88. package/dist/packem_chunks/handler66.js +2 -2
  89. package/dist/packem_chunks/handler67.js +21 -21
  90. package/dist/packem_chunks/handler68.js +21 -21
  91. package/dist/packem_chunks/handler69.js +30 -30
  92. package/dist/packem_chunks/handler7.js +1 -1
  93. package/dist/packem_chunks/handler70.js +9 -9
  94. package/dist/packem_chunks/handler71.js +17 -17
  95. package/dist/packem_chunks/handler72.js +104 -104
  96. package/dist/packem_chunks/handler73.js +20 -20
  97. package/dist/packem_chunks/handler74.js +45 -45
  98. package/dist/packem_chunks/handler75.js +27 -3
  99. package/dist/packem_chunks/handler76.js +3 -27
  100. package/dist/packem_chunks/handler77.js +68 -68
  101. package/dist/packem_chunks/handler78.js +30 -30
  102. package/dist/packem_chunks/handler8.js +1 -1
  103. package/dist/packem_chunks/handler9.js +1 -1
  104. package/dist/packem_chunks/heal-accept.js +9 -9
  105. package/dist/packem_chunks/heal.js +11 -11
  106. package/dist/packem_chunks/help-command.js +7 -63
  107. package/dist/packem_chunks/index.js +1 -1
  108. package/dist/packem_chunks/index2.js +48 -804
  109. package/dist/packem_chunks/index3.js +3 -7
  110. package/dist/packem_chunks/index4.js +803 -134
  111. package/dist/packem_chunks/index5.js +7 -73
  112. package/dist/packem_chunks/index6.js +73 -0
  113. package/dist/packem_chunks/index7.js +135 -0
  114. package/dist/packem_chunks/interface.js +2 -2
  115. package/dist/packem_chunks/keys-refresh.js +4 -4
  116. package/dist/packem_chunks/lean.js +3 -3
  117. package/dist/packem_chunks/list.js +3 -3
  118. package/dist/packem_chunks/loader.js +4 -4
  119. package/dist/packem_chunks/loader2.js +1 -1
  120. package/dist/packem_chunks/orchestrator.js +27 -27
  121. package/dist/packem_chunks/pre-mode.js +2 -2
  122. package/dist/packem_chunks/print-config.js +1 -1
  123. package/dist/packem_chunks/prompts.js +7 -7
  124. package/dist/packem_chunks/prune.js +3 -3
  125. package/dist/packem_chunks/publish-guards.js +1 -1
  126. package/dist/packem_chunks/resolveFormatter.js +5 -5
  127. package/dist/packem_chunks/run.js +1 -1
  128. package/dist/packem_chunks/security.js +1 -1
  129. package/dist/packem_chunks/shell-runner.js +1 -1
  130. package/dist/packem_chunks/slack.js +2 -2
  131. package/dist/packem_chunks/snapshot.js +2 -2
  132. package/dist/packem_chunks/stage-publisher.js +1 -1
  133. package/dist/packem_chunks/staged-registry.js +2 -2
  134. package/dist/packem_chunks/state.js +3 -3
  135. package/dist/packem_chunks/status.js +2 -2
  136. package/dist/packem_chunks/success-walk.js +4 -4
  137. package/dist/packem_chunks/sync.js +2 -2
  138. package/dist/packem_chunks/sync2.js +2 -2
  139. package/dist/packem_chunks/tar.js +3 -3
  140. package/dist/packem_chunks/tripwire.js +2 -2
  141. package/dist/packem_chunks/ts-loader.js +5 -9
  142. package/dist/packem_chunks/verify-lockfile.js +2 -2
  143. package/dist/packem_chunks/version-resolver.js +2 -2
  144. package/dist/packem_chunks/webhook.js +1 -1
  145. package/dist/packem_chunks/workflow-templates.js +5 -5
  146. package/dist/packem_chunks/workspace.js +2 -2
  147. package/dist/packem_shared/ReleaseClient-DAvbxCdo.js +1 -0
  148. package/dist/packem_shared/Table-DyORjLji-CC9cYgCG.js +11 -0
  149. package/dist/packem_shared/{VisReleaseError-DMGRBTNO.js → VisReleaseError-DZtgcKf8.js} +1 -1
  150. package/dist/packem_shared/_commonjsHelpers-DTfxOvZk.js +1 -0
  151. package/dist/packem_shared/advisories-CyDqzi5j.js +1 -0
  152. package/dist/packem_shared/affected-selection-DPQR-Bd3.js +1 -0
  153. package/dist/packem_shared/affected-shas-Dd0P7fGD.js +1 -0
  154. package/dist/packem_shared/ai-analysis-DSQQDFU9.js +68 -0
  155. package/dist/packem_shared/ai-fix-6nXZbecQ.js +43 -0
  156. package/dist/packem_shared/augment-COAiXSIx.js +4 -0
  157. package/dist/packem_shared/bin-wafzkjaB.js +1 -0
  158. package/dist/packem_shared/build-scripts-pdVmqXRm.js +1 -0
  159. package/dist/packem_shared/clean-DRiLimTx.js +1 -0
  160. package/dist/packem_shared/command-runtime-CiLVo4ED.js +1 -0
  161. package/dist/packem_shared/{compile-cache-B_Vf_WxT.js → compile-cache-DoMHRsRZ.js} +1 -1
  162. package/dist/packem_shared/createAdapter-F7GidOzU.js +1 -0
  163. package/dist/packem_shared/createVersionActions-ByaJ1Nbv.js +1 -0
  164. package/dist/packem_shared/cyclonedx-C_ezHg8b.js +4 -0
  165. package/dist/packem_shared/dependency-scan-DBH2Qo4I.js +1 -0
  166. package/dist/packem_shared/docker-Br_iFmI-.js +59 -0
  167. package/dist/packem_shared/failure-log-D92tM0ie.js +2 -0
  168. package/dist/packem_shared/formatBytes-BHAzNIrn-DFIppnY0.js +4 -0
  169. package/dist/packem_shared/getRandomSpinner-4ZEcbTYv-DCyIuj19.js +1 -0
  170. package/dist/packem_shared/giget-CVyyR7x8.js +2 -0
  171. package/dist/packem_shared/glob-Cyk1H9ZL-ox19CSsT.js +1 -0
  172. package/dist/packem_shared/index-B4AjSxHU.js +1 -0
  173. package/dist/packem_shared/index-BisalDCf.js +39 -0
  174. package/dist/packem_shared/{index-BWl4DbMp.js → index-BjdW45xX.js} +1 -1
  175. package/dist/packem_shared/index-DHD8wb6Z.js +22 -0
  176. package/dist/packem_shared/index-DXPSWMbG.js +1 -0
  177. package/dist/packem_shared/index.server-CwSgbeN7.js +2 -0
  178. package/dist/packem_shared/isAccessibleSync-DYKTrrvc-CSnBISfV.js +1 -0
  179. package/dist/packem_shared/license-DvlYdo6T.js +1 -0
  180. package/dist/packem_shared/lifecycle-CfTZQHOG.js +2 -0
  181. package/dist/packem_shared/lockfile-35RFsJDs.js +1 -0
  182. package/dist/packem_shared/lockfile-DhHAaHN5.js +1 -0
  183. package/dist/packem_shared/main-BjJN8kWj.js +1 -0
  184. package/dist/packem_shared/manifests-BNSmpPF_.js +1 -0
  185. package/dist/packem_shared/min-release-age-ChzTC7_I.js +34 -0
  186. package/dist/packem_shared/missing-package-json-C0keIt78.js +1 -0
  187. package/dist/packem_shared/native-config-sync-BSzU4qUO.js +21 -0
  188. package/dist/packem_shared/osv-bloom-5wDAoZ1e.js +2 -0
  189. package/dist/packem_shared/otelPlugin-D8LL2-4L.js +1 -0
  190. package/dist/packem_shared/package-version-BJkg7-6H.js +4 -0
  191. package/dist/packem_shared/packument-C55kVxcQ.js +1 -0
  192. package/dist/packem_shared/{peer-warnings-BXAzXqY3.js → peer-warnings-CmYSxvql.js} +1 -1
  193. package/dist/packem_shared/pm-runner-de-jCq8q.js +1 -0
  194. package/dist/packem_shared/project-name-filter-BeREbPMI.js +7 -0
  195. package/dist/packem_shared/{prompt-BSAy8SMH.js → prompt-DMzaQEVa.js} +1 -1
  196. package/dist/packem_shared/provenance-CvfQEJPQ.js +1 -0
  197. package/dist/packem_shared/readJsonSync-CbryXYxN-B2aSeDpC.js +1 -0
  198. package/dist/packem_shared/registry-keys-DmBrAlhg.js +1 -0
  199. package/dist/packem_shared/resolve-explicit-COmP7eqr.js +5 -0
  200. package/dist/packem_shared/resolve-runtime-C7NBCA1C.js +1 -0
  201. package/dist/packem_shared/run-file-jMngGQhs.js +1 -0
  202. package/dist/packem_shared/runtime-check-BklgEMkC.js +1 -0
  203. package/dist/packem_shared/s1ngularity-RZOHbGrE.js +1 -0
  204. package/dist/packem_shared/scan-progress-C9nMDLis.js +2 -0
  205. package/dist/packem_shared/selectors-B7lSFz7l.js +3 -0
  206. package/dist/packem_shared/signatures-oZ_2IneN.js +2 -0
  207. package/dist/packem_shared/{slug-DoueYuLo.js → slug-OBHcH7wV.js} +1 -1
  208. package/dist/packem_shared/spinner-CbJfWYwB.js +1 -0
  209. package/dist/packem_shared/sticky-comment-DjhyCIZt.js +1 -0
  210. package/dist/packem_shared/subtree-DtmcKAJK.js +2 -0
  211. package/dist/packem_shared/symbols-BXDZ_sKt.js +1 -0
  212. package/dist/packem_shared/tabs-BilwonkM.js +1 -0
  213. package/dist/packem_shared/target-merge-D1xbylFw.js +4 -0
  214. package/dist/packem_shared/target-options-d_rIrLyq.js +1 -0
  215. package/dist/packem_shared/toolchain-DY11tPCw.js +5 -0
  216. package/dist/packem_shared/typosquats-D8ppc5kr.js +1 -0
  217. package/dist/packem_shared/use-measured-height-BPQg2q_p.js +1 -0
  218. package/dist/packem_shared/utils-DQFHJn72.js +1 -0
  219. package/dist/packem_shared/verify-D8wYvB85.js +1 -0
  220. package/dist/packem_shared/vis-update-app-ngwL2mRv.js +1 -0
  221. package/dist/packem_shared/vis-user-error-jhNwmkZp.js +30 -0
  222. package/dist/packem_shared/watch-Dswvj6Zp.js +1 -0
  223. package/dist/packem_shared/watch-loop-COWvvSbR.js +11 -0
  224. package/dist/packem_shared/writeFileSync-DJoHk3Ks-CgQ-VNNT.js +1 -0
  225. package/dist/release/core/changelog/index.d.ts +62 -2
  226. package/dist/release/core/package-managers/index.d.ts +25 -1
  227. package/dist/release/core/package-managers/index.js +1 -1
  228. package/dist/release/core/version-actions/index.d.ts +47 -2
  229. package/dist/release/core/version-actions/index.js +1 -1
  230. package/dist/release/index.d.ts +100 -1
  231. package/dist/release/index.js +1 -1
  232. package/dist/release/plugin-sdk.d.ts +16 -1
  233. package/dist/release/plugin-sdk.js +1 -1
  234. package/dist/release/presets.js +1 -1
  235. package/dist/release/types.js +1 -1
  236. package/dist/runtime/preload.js +1 -1
  237. package/index.js +26 -26
  238. package/package.json +9 -9
  239. package/dist/packem_chunks/detect2.js +0 -8
  240. package/dist/packem_chunks/registry.js +0 -48
  241. package/dist/packem_shared/ReleaseClient-BY4OZNCK.js +0 -1
  242. package/dist/packem_shared/_commonjsHelpers-B5Y90VFO.js +0 -1
  243. package/dist/packem_shared/advisories-DsXRmIA5.js +0 -1
  244. package/dist/packem_shared/affected-selection-BE6VFCDV.js +0 -1
  245. package/dist/packem_shared/affected-shas-BKEu4RZc.js +0 -1
  246. package/dist/packem_shared/ai-analysis-DikAj6rX.js +0 -68
  247. package/dist/packem_shared/ai-fix-bfWo0cZX.js +0 -43
  248. package/dist/packem_shared/augment-BkJxi_GW.js +0 -4
  249. package/dist/packem_shared/bin-B-TytgzW.js +0 -1
  250. package/dist/packem_shared/build-scripts-DWypBQ--.js +0 -1
  251. package/dist/packem_shared/clean-DWjQl14S.js +0 -1
  252. package/dist/packem_shared/command-runtime-DQ7ZpLYL.js +0 -1
  253. package/dist/packem_shared/createAdapter-bU4DIP3F.js +0 -1
  254. package/dist/packem_shared/createVersionActions-BK43SNDH.js +0 -1
  255. package/dist/packem_shared/cyclonedx-DLBi65MV.js +0 -4
  256. package/dist/packem_shared/dependency-scan-ZLOuLkGN.js +0 -1
  257. package/dist/packem_shared/docker-B4zAZCZG.js +0 -59
  258. package/dist/packem_shared/en-BDYMmM2_.js +0 -27
  259. package/dist/packem_shared/failure-log-DyhWPqno.js +0 -2
  260. package/dist/packem_shared/giget-CAxjpwew.js +0 -2
  261. package/dist/packem_shared/glob-BUjyjdE8-Dp_QcayW.js +0 -1
  262. package/dist/packem_shared/index-BAe6e0XE.js +0 -1
  263. package/dist/packem_shared/index-BLtnel38.js +0 -35
  264. package/dist/packem_shared/index-CuKDxOCI.js +0 -1
  265. package/dist/packem_shared/index-tNFGWxc0.js +0 -39
  266. package/dist/packem_shared/index.server-CusjRLCh.js +0 -2
  267. package/dist/packem_shared/license-t5KnNX6v.js +0 -1
  268. package/dist/packem_shared/lifecycle-KY9umOg6.js +0 -2
  269. package/dist/packem_shared/lockfile-YAuZf1gh.js +0 -1
  270. package/dist/packem_shared/main-D_cam4hv.js +0 -1
  271. package/dist/packem_shared/manifests-BwTn_1ad.js +0 -1
  272. package/dist/packem_shared/min-release-age-6avfn81h.js +0 -34
  273. package/dist/packem_shared/missing-package-json-Cl0vdz6K.js +0 -1
  274. package/dist/packem_shared/native-config-sync-CHMCJx7H.js +0 -21
  275. package/dist/packem_shared/osv-bloom-DdqDnLCt.js +0 -2
  276. package/dist/packem_shared/otelPlugin-DmKDBaPo.js +0 -1
  277. package/dist/packem_shared/package-version-BNRJ3o9C.js +0 -4
  278. package/dist/packem_shared/packument-B9-WqReu.js +0 -1
  279. package/dist/packem_shared/pm-runner-DRybtzOV.js +0 -1
  280. package/dist/packem_shared/project-name-filter-Dw0fC6IO.js +0 -7
  281. package/dist/packem_shared/provenance-CLxuqCfL.js +0 -1
  282. package/dist/packem_shared/readJsonSync-DweZd5ZA-CtrDlqpb.js +0 -1
  283. package/dist/packem_shared/registry-keys-cTN24144.js +0 -1
  284. package/dist/packem_shared/resolve-explicit-Uw6WQl9R.js +0 -5
  285. package/dist/packem_shared/resolve-runtime-DztanwkZ.js +0 -1
  286. package/dist/packem_shared/run-file-CaE5_xBY.js +0 -1
  287. package/dist/packem_shared/runtime-check-C32yE57I.js +0 -1
  288. package/dist/packem_shared/s1ngularity-BIYhg82u.js +0 -1
  289. package/dist/packem_shared/scan-progress-DWfY4zkp.js +0 -2
  290. package/dist/packem_shared/selectors-D2j4M9Ul.js +0 -3
  291. package/dist/packem_shared/signatures-C8iQ5fUq.js +0 -2
  292. package/dist/packem_shared/sticky-comment-D6_7-w8T.js +0 -1
  293. package/dist/packem_shared/subtree-DSm0QEoE.js +0 -2
  294. package/dist/packem_shared/symbols-DPTlrJ3B.js +0 -1
  295. package/dist/packem_shared/target-merge-DLxJTcxn.js +0 -11
  296. package/dist/packem_shared/target-options-3t4-2F-F.js +0 -1
  297. package/dist/packem_shared/toolchain-BPzbahcQ.js +0 -5
  298. package/dist/packem_shared/typosquats-BWrmhh36.js +0 -1
  299. package/dist/packem_shared/use-measured-height-BwAwGHjw.js +0 -1
  300. package/dist/packem_shared/utils-CRueU43T.js +0 -1
  301. package/dist/packem_shared/verify-CzUPT6Uk.js +0 -1
  302. package/dist/packem_shared/vis-update-app-D6Wq8ZHM.js +0 -1
  303. package/dist/packem_shared/vis-user-error-CfM4_ORo.js +0 -30
  304. package/dist/packem_shared/watch-D_oAxW_Z.js +0 -1
  305. package/dist/packem_shared/watch-loop-BrjblOz5.js +0 -11
@@ -1 +1 @@
1
- const n=["major","minor","patch","none"],e=a=>{switch(a){case"major":return 3;case"minor":return 2;case"patch":return 1;default:return 0}},t=(a,r)=>e(a)>=e(r)?a:r,c=a=>Array.isArray(a)?{changelog:{mode:"per-package"},packages:a,syncGitTag:!1}:{changelog:a.changelog??{mode:"per-package"},name:a.name,packages:a.packages,syncGitTag:a.syncGitTag??!1,tagPattern:a.tagPattern};export{n as BUMP_LEVELS,e as bumpRank,t as maxBump,c as normaliseGroup};
1
+ const t=["major","minor","patch","none"],n=a=>{switch(a){case"major":return 3;case"minor":return 2;case"patch":return 1;default:return 0}},c=(a,e)=>n(a)>=n(e)?a:e,r=a=>Array.isArray(a)?{changelog:{mode:"per-package"},packages:a,syncGitTag:!1}:{changelog:a.changelog??{mode:"per-package"},name:a.name,packages:a.packages,syncGitTag:a.syncGitTag??!1,tagPattern:a.tagPattern};export{t as BUMP_LEVELS,n as bumpRank,c as maxBump,r as normaliseGroup};
@@ -1 +1 @@
1
- import{c as r}from"../packem_shared/compile-cache-B_Vf_WxT.js";import{p as o}from"../packem_shared/augment-BkJxi_GW.js";import{r as p}from"../packem_chunks/ts-loader.js";r();p();await o(process.cwd());
1
+ import{t as r}from"../packem_shared/compile-cache-DoMHRsRZ.js";import{p as o}from"../packem_shared/augment-COAiXSIx.js";import{r as p}from"../packem_chunks/ts-loader.js";r();p();await o(process.cwd());
package/index.js CHANGED
@@ -82,7 +82,7 @@ function requireNative() {
82
82
  const binding = require('@visulima/vis-binding-android-arm64')
83
83
  const bindingPackageVersion = require('@visulima/vis-binding-android-arm64/package.json').version
84
84
  if (bindingPackageVersion !== '2.0.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
85
- throw new Error(`Native binding package version mismatch, expected 3.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
85
+ throw new Error(`Native binding package version mismatch, expected 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
86
86
  }
87
87
  return binding
88
88
  } catch (e) {
@@ -98,7 +98,7 @@ function requireNative() {
98
98
  const binding = require('@visulima/vis-binding-android-arm-eabi')
99
99
  const bindingPackageVersion = require('@visulima/vis-binding-android-arm-eabi/package.json').version
100
100
  if (bindingPackageVersion !== '2.0.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
101
- throw new Error(`Native binding package version mismatch, expected 3.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
101
+ throw new Error(`Native binding package version mismatch, expected 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
102
102
  }
103
103
  return binding
104
104
  } catch (e) {
@@ -119,7 +119,7 @@ function requireNative() {
119
119
  const binding = require('@visulima/vis-binding-win32-x64-gnu')
120
120
  const bindingPackageVersion = require('@visulima/vis-binding-win32-x64-gnu/package.json').version
121
121
  if (bindingPackageVersion !== '2.0.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
122
- throw new Error(`Native binding package version mismatch, expected 3.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
122
+ throw new Error(`Native binding package version mismatch, expected 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
123
123
  }
124
124
  return binding
125
125
  } catch (e) {
@@ -135,7 +135,7 @@ function requireNative() {
135
135
  const binding = require('@visulima/vis-binding-win32-x64-msvc')
136
136
  const bindingPackageVersion = require('@visulima/vis-binding-win32-x64-msvc/package.json').version
137
137
  if (bindingPackageVersion !== '2.0.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
138
- throw new Error(`Native binding package version mismatch, expected 3.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
138
+ throw new Error(`Native binding package version mismatch, expected 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
139
139
  }
140
140
  return binding
141
141
  } catch (e) {
@@ -152,7 +152,7 @@ function requireNative() {
152
152
  const binding = require('@visulima/vis-binding-win32-ia32-msvc')
153
153
  const bindingPackageVersion = require('@visulima/vis-binding-win32-ia32-msvc/package.json').version
154
154
  if (bindingPackageVersion !== '2.0.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
155
- throw new Error(`Native binding package version mismatch, expected 3.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
155
+ throw new Error(`Native binding package version mismatch, expected 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
156
156
  }
157
157
  return binding
158
158
  } catch (e) {
@@ -168,7 +168,7 @@ function requireNative() {
168
168
  const binding = require('@visulima/vis-binding-win32-arm64-msvc')
169
169
  const bindingPackageVersion = require('@visulima/vis-binding-win32-arm64-msvc/package.json').version
170
170
  if (bindingPackageVersion !== '2.0.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
171
- throw new Error(`Native binding package version mismatch, expected 3.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
171
+ throw new Error(`Native binding package version mismatch, expected 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
172
172
  }
173
173
  return binding
174
174
  } catch (e) {
@@ -187,7 +187,7 @@ function requireNative() {
187
187
  const binding = require('@visulima/vis-binding-darwin-universal')
188
188
  const bindingPackageVersion = require('@visulima/vis-binding-darwin-universal/package.json').version
189
189
  if (bindingPackageVersion !== '2.0.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
190
- throw new Error(`Native binding package version mismatch, expected 3.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
190
+ throw new Error(`Native binding package version mismatch, expected 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
191
191
  }
192
192
  return binding
193
193
  } catch (e) {
@@ -203,7 +203,7 @@ function requireNative() {
203
203
  const binding = require('@visulima/vis-binding-darwin-x64')
204
204
  const bindingPackageVersion = require('@visulima/vis-binding-darwin-x64/package.json').version
205
205
  if (bindingPackageVersion !== '2.0.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
206
- throw new Error(`Native binding package version mismatch, expected 3.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
206
+ throw new Error(`Native binding package version mismatch, expected 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
207
207
  }
208
208
  return binding
209
209
  } catch (e) {
@@ -219,7 +219,7 @@ function requireNative() {
219
219
  const binding = require('@visulima/vis-binding-darwin-arm64')
220
220
  const bindingPackageVersion = require('@visulima/vis-binding-darwin-arm64/package.json').version
221
221
  if (bindingPackageVersion !== '2.0.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
222
- throw new Error(`Native binding package version mismatch, expected 3.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
222
+ throw new Error(`Native binding package version mismatch, expected 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
223
223
  }
224
224
  return binding
225
225
  } catch (e) {
@@ -239,7 +239,7 @@ function requireNative() {
239
239
  const binding = require('@visulima/vis-binding-freebsd-x64')
240
240
  const bindingPackageVersion = require('@visulima/vis-binding-freebsd-x64/package.json').version
241
241
  if (bindingPackageVersion !== '2.0.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
242
- throw new Error(`Native binding package version mismatch, expected 3.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
242
+ throw new Error(`Native binding package version mismatch, expected 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
243
243
  }
244
244
  return binding
245
245
  } catch (e) {
@@ -255,7 +255,7 @@ function requireNative() {
255
255
  const binding = require('@visulima/vis-binding-freebsd-arm64')
256
256
  const bindingPackageVersion = require('@visulima/vis-binding-freebsd-arm64/package.json').version
257
257
  if (bindingPackageVersion !== '2.0.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
258
- throw new Error(`Native binding package version mismatch, expected 3.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
258
+ throw new Error(`Native binding package version mismatch, expected 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
259
259
  }
260
260
  return binding
261
261
  } catch (e) {
@@ -276,7 +276,7 @@ function requireNative() {
276
276
  const binding = require('@visulima/vis-binding-linux-x64-musl')
277
277
  const bindingPackageVersion = require('@visulima/vis-binding-linux-x64-musl/package.json').version
278
278
  if (bindingPackageVersion !== '2.0.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
279
- throw new Error(`Native binding package version mismatch, expected 3.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
279
+ throw new Error(`Native binding package version mismatch, expected 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
280
280
  }
281
281
  return binding
282
282
  } catch (e) {
@@ -292,7 +292,7 @@ function requireNative() {
292
292
  const binding = require('@visulima/vis-binding-linux-x64-gnu')
293
293
  const bindingPackageVersion = require('@visulima/vis-binding-linux-x64-gnu/package.json').version
294
294
  if (bindingPackageVersion !== '2.0.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
295
- throw new Error(`Native binding package version mismatch, expected 3.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
295
+ throw new Error(`Native binding package version mismatch, expected 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
296
296
  }
297
297
  return binding
298
298
  } catch (e) {
@@ -310,7 +310,7 @@ function requireNative() {
310
310
  const binding = require('@visulima/vis-binding-linux-arm64-musl')
311
311
  const bindingPackageVersion = require('@visulima/vis-binding-linux-arm64-musl/package.json').version
312
312
  if (bindingPackageVersion !== '2.0.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
313
- throw new Error(`Native binding package version mismatch, expected 3.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
313
+ throw new Error(`Native binding package version mismatch, expected 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
314
314
  }
315
315
  return binding
316
316
  } catch (e) {
@@ -326,7 +326,7 @@ function requireNative() {
326
326
  const binding = require('@visulima/vis-binding-linux-arm64-gnu')
327
327
  const bindingPackageVersion = require('@visulima/vis-binding-linux-arm64-gnu/package.json').version
328
328
  if (bindingPackageVersion !== '2.0.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
329
- throw new Error(`Native binding package version mismatch, expected 3.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
329
+ throw new Error(`Native binding package version mismatch, expected 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
330
330
  }
331
331
  return binding
332
332
  } catch (e) {
@@ -344,7 +344,7 @@ function requireNative() {
344
344
  const binding = require('@visulima/vis-binding-linux-arm-musleabihf')
345
345
  const bindingPackageVersion = require('@visulima/vis-binding-linux-arm-musleabihf/package.json').version
346
346
  if (bindingPackageVersion !== '2.0.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
347
- throw new Error(`Native binding package version mismatch, expected 3.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
347
+ throw new Error(`Native binding package version mismatch, expected 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
348
348
  }
349
349
  return binding
350
350
  } catch (e) {
@@ -360,7 +360,7 @@ function requireNative() {
360
360
  const binding = require('@visulima/vis-binding-linux-arm-gnueabihf')
361
361
  const bindingPackageVersion = require('@visulima/vis-binding-linux-arm-gnueabihf/package.json').version
362
362
  if (bindingPackageVersion !== '2.0.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
363
- throw new Error(`Native binding package version mismatch, expected 3.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
363
+ throw new Error(`Native binding package version mismatch, expected 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
364
364
  }
365
365
  return binding
366
366
  } catch (e) {
@@ -378,7 +378,7 @@ function requireNative() {
378
378
  const binding = require('@visulima/vis-binding-linux-loong64-musl')
379
379
  const bindingPackageVersion = require('@visulima/vis-binding-linux-loong64-musl/package.json').version
380
380
  if (bindingPackageVersion !== '2.0.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
381
- throw new Error(`Native binding package version mismatch, expected 3.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
381
+ throw new Error(`Native binding package version mismatch, expected 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
382
382
  }
383
383
  return binding
384
384
  } catch (e) {
@@ -394,7 +394,7 @@ function requireNative() {
394
394
  const binding = require('@visulima/vis-binding-linux-loong64-gnu')
395
395
  const bindingPackageVersion = require('@visulima/vis-binding-linux-loong64-gnu/package.json').version
396
396
  if (bindingPackageVersion !== '2.0.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
397
- throw new Error(`Native binding package version mismatch, expected 3.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
397
+ throw new Error(`Native binding package version mismatch, expected 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
398
398
  }
399
399
  return binding
400
400
  } catch (e) {
@@ -412,7 +412,7 @@ function requireNative() {
412
412
  const binding = require('@visulima/vis-binding-linux-riscv64-musl')
413
413
  const bindingPackageVersion = require('@visulima/vis-binding-linux-riscv64-musl/package.json').version
414
414
  if (bindingPackageVersion !== '2.0.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
415
- throw new Error(`Native binding package version mismatch, expected 3.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
415
+ throw new Error(`Native binding package version mismatch, expected 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
416
416
  }
417
417
  return binding
418
418
  } catch (e) {
@@ -428,7 +428,7 @@ function requireNative() {
428
428
  const binding = require('@visulima/vis-binding-linux-riscv64-gnu')
429
429
  const bindingPackageVersion = require('@visulima/vis-binding-linux-riscv64-gnu/package.json').version
430
430
  if (bindingPackageVersion !== '2.0.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
431
- throw new Error(`Native binding package version mismatch, expected 3.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
431
+ throw new Error(`Native binding package version mismatch, expected 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
432
432
  }
433
433
  return binding
434
434
  } catch (e) {
@@ -445,7 +445,7 @@ function requireNative() {
445
445
  const binding = require('@visulima/vis-binding-linux-ppc64-gnu')
446
446
  const bindingPackageVersion = require('@visulima/vis-binding-linux-ppc64-gnu/package.json').version
447
447
  if (bindingPackageVersion !== '2.0.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
448
- throw new Error(`Native binding package version mismatch, expected 3.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
448
+ throw new Error(`Native binding package version mismatch, expected 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
449
449
  }
450
450
  return binding
451
451
  } catch (e) {
@@ -461,7 +461,7 @@ function requireNative() {
461
461
  const binding = require('@visulima/vis-binding-linux-s390x-gnu')
462
462
  const bindingPackageVersion = require('@visulima/vis-binding-linux-s390x-gnu/package.json').version
463
463
  if (bindingPackageVersion !== '2.0.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
464
- throw new Error(`Native binding package version mismatch, expected 3.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
464
+ throw new Error(`Native binding package version mismatch, expected 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
465
465
  }
466
466
  return binding
467
467
  } catch (e) {
@@ -481,7 +481,7 @@ function requireNative() {
481
481
  const binding = require('@visulima/vis-binding-openharmony-arm64')
482
482
  const bindingPackageVersion = require('@visulima/vis-binding-openharmony-arm64/package.json').version
483
483
  if (bindingPackageVersion !== '2.0.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
484
- throw new Error(`Native binding package version mismatch, expected 3.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
484
+ throw new Error(`Native binding package version mismatch, expected 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
485
485
  }
486
486
  return binding
487
487
  } catch (e) {
@@ -497,7 +497,7 @@ function requireNative() {
497
497
  const binding = require('@visulima/vis-binding-openharmony-x64')
498
498
  const bindingPackageVersion = require('@visulima/vis-binding-openharmony-x64/package.json').version
499
499
  if (bindingPackageVersion !== '2.0.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
500
- throw new Error(`Native binding package version mismatch, expected 3.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
500
+ throw new Error(`Native binding package version mismatch, expected 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
501
501
  }
502
502
  return binding
503
503
  } catch (e) {
@@ -513,7 +513,7 @@ function requireNative() {
513
513
  const binding = require('@visulima/vis-binding-openharmony-arm')
514
514
  const bindingPackageVersion = require('@visulima/vis-binding-openharmony-arm/package.json').version
515
515
  if (bindingPackageVersion !== '2.0.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
516
- throw new Error(`Native binding package version mismatch, expected 3.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
516
+ throw new Error(`Native binding package version mismatch, expected 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
517
517
  }
518
518
  return binding
519
519
  } catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/vis",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "A monorepo dev toolkit — task runner, remote caching, security scanning, git hooks, and AI agent integrations — powered by @visulima/task-runner",
5
5
  "keywords": [
6
6
  "build",
@@ -148,14 +148,14 @@
148
148
  }
149
149
  },
150
150
  "optionalDependencies": {
151
- "@visulima/vis-binding-darwin-arm64": "3.0.0",
152
- "@visulima/vis-binding-darwin-x64": "3.0.0",
153
- "@visulima/vis-binding-linux-arm64-gnu": "3.0.0",
154
- "@visulima/vis-binding-linux-arm64-musl": "3.0.0",
155
- "@visulima/vis-binding-linux-x64-gnu": "3.0.0",
156
- "@visulima/vis-binding-linux-x64-musl": "3.0.0",
157
- "@visulima/vis-binding-win32-x64-msvc": "3.0.0",
158
- "@visulima/vis-binding-win32-arm64-msvc": "3.0.0"
151
+ "@visulima/vis-binding-darwin-arm64": "3.0.1",
152
+ "@visulima/vis-binding-darwin-x64": "3.0.1",
153
+ "@visulima/vis-binding-linux-arm64-musl": "3.0.1",
154
+ "@visulima/vis-binding-linux-x64-gnu": "3.0.1",
155
+ "@visulima/vis-binding-linux-arm64-gnu": "3.0.1",
156
+ "@visulima/vis-binding-linux-x64-musl": "3.0.1",
157
+ "@visulima/vis-binding-win32-x64-msvc": "3.0.1",
158
+ "@visulima/vis-binding-win32-arm64-msvc": "3.0.1"
159
159
  },
160
160
  "engines": {
161
161
  "node": "^22.14.0 || >=24.10.0"
@@ -1,8 +0,0 @@
1
- import{createRequire as f}from"node:module";let y;const w=o=>(y??=f(import.meta.url))(o),d=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,$=o=>{if(typeof d<"u"&&d.versions&&d.versions.node){const[e,t]=d.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return d.getBuiltinModule(o)}return w(o)},{basename:O}=$("node:path"),x=o=>{const e=[],t=[];for(const s of o??[]){if(typeof s=="string"){e.push(s);continue}if(s.path){const r=s.label??s.name;e.push(r?`${s.path}#${r}`:s.path)}else if(s.linkUrl){const r=s.label??s.name??s.linkUrl;t.push(`- [${r}](${s.linkUrl})`)}}return{linkAppendix:t.length>0?`
2
-
3
- ### Additional links
4
-
5
- ${t.join(`
6
- `)}`:"",paths:e}},C=(o,e)=>{if(o!==0)return[];try{return JSON.parse(e).filter(t=>typeof t.body=="string").map(t=>({body:t.body??"",id:t.id}))}catch{return[]}};class P{id="github";host;httpProxy;constructor(e={}){this.host=e.host,this.httpProxy=e.httpProxy}runOpts(e){if(!this.host&&!this.httpProxy)return{cwd:e,silent:!0};const t={...process.env};return this.host&&(t.GH_HOST=this.host),this.httpProxy&&(t.HTTPS_PROXY=this.httpProxy,t.HTTP_PROXY=this.httpProxy),{cwd:e,env:t,silent:!0}}async listRecentReleases(e,t){const s=Math.max(1,t.limit),r=t.tagPrefix?Math.min(100,s*4):s,n=await e.run("gh",["release","list","--repo",t.repo,"--limit",String(r),"--json","tagName,url,name"],this.runOpts(t.cwd));if(n.exitCode!==0)return[];let i;try{i=JSON.parse(n.stdout)}catch{return[]}const a=[];for(const u of i)if(!(typeof u.tagName!="string"||typeof u.url!="string")&&!(t.tagPrefix&&!u.tagName.startsWith(t.tagPrefix))&&!(t.excludeTag&&u.tagName===t.excludeTag)&&(a.push({name:u.name??u.tagName,tag:u.tagName,url:u.url}),a.length>=s))break;return a}async detectRepoSlug(e,t){const s=await t.run("gh",["repo","view","--json","nameWithOwner","-q",".nameWithOwner"],this.runOpts(e));if(s.exitCode===0)return s.stdout.trim()||void 0}detectPullRequestNumber(e){const t=e.GITHUB_REF;if(t){const r=/^refs\/pull\/(\d+)\/(?:merge|head)$/.exec(t);if(r?.[1])return Number.parseInt(r[1],10)}const s=e.PR_NUMBER??e.VIS_PR_NUMBER;if(s){const r=Number.parseInt(s,10);return Number.isNaN(r)?void 0:r}}async upsertStickyComment(e,t){const s=await e.run("gh",["api",`repos/${t.repo}/issues/${t.issueNumber}/comments`,"--paginate"],this.runOpts(t.cwd)),r=C(s.exitCode,s.stdout).find(a=>a.body.includes(t.marker)),n=t.body.includes(t.marker)?t.body:`${t.marker}
7
- ${t.body}`;if(r)return(await e.run("gh",["api","-X","PATCH",`repos/${t.repo}/issues/comments/${r.id}`,"-f",`body=${n}`],this.runOpts(t.cwd))).exitCode===0?{created:!1,id:r.id}:void 0;const i=await e.run("gh",["api","-X","POST",`repos/${t.repo}/issues/${t.issueNumber}/comments`,"-f",`body=${n}`],this.runOpts(t.cwd));if(i.exitCode===0)try{return{created:!0,id:JSON.parse(i.stdout).id}}catch{return}}async createRelease(e,t){const{linkAppendix:s,paths:r}=x(t.assets),n=s?`${t.body}${s}`:t.body,i=["release","create",t.tag,"--repo",t.repo,"--title",t.title,"--notes",n];t.draft&&i.push("--draft"),t.prerelease&&i.push("--prerelease"),t.discussionCategory&&i.push("--discussion-category",t.discussionCategory),r.length>0&&i.push(...r);const a=await e.run("gh",i,this.runOpts(t.cwd));if(a.exitCode===0)return{url:a.stdout.trim()||void 0}}async addLabels(e,t){if(t.labels.length===0)return!0;const s=["api","-X","POST",`repos/${t.repo}/issues/${t.issueNumber}/labels`];for(const r of t.labels)s.push("-f",`labels[]=${r}`);return(await e.run("gh",s,this.runOpts(t.cwd))).exitCode===0}async upsertIssue(e,t){const s=await e.run("gh",["issue","list","--repo",t.repo,"--state","open","--search",t.marker,"--json","number,title,url","--limit","20"],this.runOpts(t.cwd));if(s.exitCode===0&&s.stdout.trim()&&s.stdout.trim()!=="[]")try{const u=JSON.parse(s.stdout).find(c=>c.title.includes(t.marker));if(u){const c=["issue","edit",String(u.number),"--repo",t.repo,"--title",t.title,"--body",t.body];return t.labels&&t.labels.length>0&&c.push("--add-label",t.labels.join(",")),t.assignees&&t.assignees.length>0&&c.push("--add-assignee",t.assignees.join(",")),(await e.run("gh",c,this.runOpts(t.cwd))).exitCode===0?{created:!1,number:u.number,url:u.url}:void 0}}catch{}const r=["issue","create","--repo",t.repo,"--title",t.title,"--body",t.body];t.labels&&t.labels.length>0&&r.push("--label",t.labels.join(",")),t.assignees&&t.assignees.length>0&&r.push("--assignee",t.assignees.join(","));const n=await e.run("gh",r,this.runOpts(t.cwd));if(n.exitCode!==0)return;const i=n.stdout.trim(),a=/\/issues\/(\d+)/.exec(i);return a?{created:!0,number:Number.parseInt(a[1]??"0",10),url:i}:void 0}async closeIssue(e,t){return t.closingComment&&await e.run("gh",["issue","comment",String(t.issueNumber),"--repo",t.repo,"--body",t.closingComment],this.runOpts(t.cwd)),(await e.run("gh",["issue","close",String(t.issueNumber),"--repo",t.repo],this.runOpts(t.cwd))).exitCode===0}async upsertPullRequest(e,t){const s=await e.run("gh",["pr","list","--repo",t.repo,"--head",t.head,"--state","open","--json","number,url"],this.runOpts(t.cwd));if(s.exitCode===0&&s.stdout.trim()&&s.stdout.trim()!=="[]")try{const i=JSON.parse(s.stdout);if(i[0])return await e.run("gh",["pr","edit",String(i[0].number),"--repo",t.repo,"--title",t.title,"--body",t.body],this.runOpts(t.cwd)),{existing:!0,number:i[0].number,url:i[0].url}}catch{}const r=await e.run("gh",["pr","create","--repo",t.repo,"--head",t.head,"--base",t.base,"--title",t.title,"--body",t.body],this.runOpts(t.cwd));if(r.exitCode!==0)return;const n=/\/pull\/(\d+)/.exec(r.stdout);return n?{existing:!1,number:Number.parseInt(n[1]??"0",10),url:r.stdout.trim()}:void 0}}const p=o=>encodeURIComponent(o),N=o=>o.replace(/^v(?=\d)/,""),R=o=>{const e=[],t=[],s=[];for(const r of o??[]){if(typeof r=="string"){e.push(r);continue}r.path?r.target==="generic_package"?s.push({label:r.label,linkType:r.type,name:r.name,packageName:r.packageName,packageVersion:r.packageVersion,path:r.path}):e.push(r.path):r.linkUrl&&t.push({linkType:r.type,name:r.label??r.name??r.linkUrl,url:r.linkUrl})}return{genericPackages:s,links:t,uploads:e}};class b{id="gitlab";static recentReleasesWarned=!1;async listRecentReleases(e,t){return b.recentReleasesWarned||(b.recentReleasesWarned=!0,console.warn("[vis release] addReleases is not yet supported on GitLab — skipping the Related releases block.")),[]}host;httpProxy;constructor(e={}){this.host=e.host,this.httpProxy=e.httpProxy}runOpts(e){if(!this.host&&!this.httpProxy)return{cwd:e,silent:!0};const t={...process.env};return this.host&&(t.GITLAB_HOST=this.host),this.httpProxy&&(t.HTTPS_PROXY=this.httpProxy,t.HTTP_PROXY=this.httpProxy),{cwd:e,env:t,silent:!0}}async listMrNotes(e,t,s,r){const n=await e.run("glab",["api",`projects/${p(s)}/merge_requests/${r}/notes`,"--paginate"],this.runOpts(t));if(n.exitCode!==0)return[];try{return JSON.parse(n.stdout).filter(i=>typeof i.body=="string"&&i.system!==!0).map(i=>({body:i.body??"",id:i.id}))}catch{return[]}}async uploadGenericPackage(e,t,s,r,n){const i=p(s),a=O(n.path),u=n.packageName??s.split("/").pop()??"release",c=n.packageVersion??N(r),l=`projects/${i}/packages/generic/${encodeURIComponent(u)}/${encodeURIComponent(c)}/${encodeURIComponent(a)}`;if((await e.run("glab",["api","-X","PUT",l,"--input",n.path],this.runOpts(t))).exitCode!==0)return;const h=this.host?.replace(/^https?:\/\//i,"").replace(/\/+$/,""),g=`${h?`https://${h}`:"https://gitlab.com"}/api/v4/${l}`,m=["api","-X","POST",`projects/${i}/releases/${encodeURIComponent(r)}/assets/links`,"-f",`name=${n.label??n.name??a}`,"-f",`url=${g}`];n.linkType&&m.push("-f",`link_type=${n.linkType}`),await e.run("glab",m,this.runOpts(t))}async detectRepoSlug(e,t){const s=process.env.CI_PROJECT_PATH;if(s)return s;const r=await t.run("git",["config","--get","remote.origin.url"],{cwd:e,silent:!0});if(r.exitCode!==0)return;const n=r.stdout.trim();return/gitlab\.[\w.-]+[/:]([^/].*?)(?:\.git)?$/.exec(n)?.[1]}detectPullRequestNumber(e){const t=e.CI_MERGE_REQUEST_IID??e.VIS_MR_NUMBER;if(!t)return;const s=Number.parseInt(t,10);return Number.isNaN(s)?void 0:s}async upsertStickyComment(e,t){const s=(await this.listMrNotes(e,t.cwd,t.repo,t.issueNumber)).find(a=>a.body.includes(t.marker)),r=t.body.includes(t.marker)?t.body:`${t.marker}
8
- ${t.body}`,n=p(t.repo);if(s)return(await e.run("glab",["api","-X","PUT",`projects/${n}/merge_requests/${t.issueNumber}/notes/${s.id}`,"-f",`body=${r}`],this.runOpts(t.cwd))).exitCode===0?{created:!1,id:s.id}:void 0;const i=await e.run("glab",["api","-X","POST",`projects/${n}/merge_requests/${t.issueNumber}/notes`,"-f",`body=${r}`],this.runOpts(t.cwd));if(i.exitCode===0)try{return{created:!0,id:JSON.parse(i.stdout).id}}catch{return}}async createRelease(e,t){const{genericPackages:s,links:r,uploads:n}=R(t.assets),i=["release","create",t.tag,"--repo",t.repo,"--name",t.title,"--notes",t.body];if(t.milestones&&t.milestones.length>0)for(const c of t.milestones)i.push("--milestone",c);if((await e.run("glab",i,this.runOpts(t.cwd))).exitCode!==0)return;n.length>0&&await e.run("glab",["release","upload",t.tag,"--repo",t.repo,...n],this.runOpts(t.cwd));const a=p(t.repo);for(const c of r){const l=["api","-X","POST",`projects/${a}/releases/${encodeURIComponent(t.tag)}/assets/links`,"-f",`name=${c.name}`,"-f",`url=${c.url}`];c.linkType&&l.push("-f",`link_type=${c.linkType}`),await e.run("glab",l,this.runOpts(t.cwd))}for(const c of s)await this.uploadGenericPackage(e,t.cwd,t.repo,t.tag,c);const u=await e.run("glab",["api",`projects/${a}/releases/${encodeURIComponent(t.tag)}`],this.runOpts(t.cwd));try{return{url:JSON.parse(u.stdout)._links?.self}}catch{return{url:void 0}}}async addLabels(e,t){if(t.labels.length===0)return!0;const s=p(t.repo);return(await e.run("glab",["api","-X","PUT",`projects/${s}/issues/${t.issueNumber}`,"-f",`add_labels=${t.labels.join(",")}`],this.runOpts(t.cwd))).exitCode===0}async upsertIssue(e,t){const s=p(t.repo),r=await e.run("glab",["api",`projects/${s}/issues?state=opened&search=${encodeURIComponent(t.marker)}&in=title`],this.runOpts(t.cwd));if(r.exitCode===0)try{const c=JSON.parse(r.stdout).find(l=>l.title.includes(t.marker));if(c){const l=["api","-X","PUT",`projects/${s}/issues/${c.iid}`,"-f",`title=${t.title}`,"-f",`description=${t.body}`];if(t.labels&&t.labels.length>0&&l.push("-f",`add_labels=${t.labels.join(",")}`),t.assignees?.[0]){const h=await e.run("glab",["api",`users?username=${encodeURIComponent(t.assignees[0])}`],this.runOpts(t.cwd));try{const g=JSON.parse(h.stdout);g[0]&&l.push("-f",`assignee_id=${g[0].id}`)}catch{}}return(await e.run("glab",l,this.runOpts(t.cwd))).exitCode===0?{created:!1,number:c.iid,url:c.web_url}:void 0}}catch{}const n=["issue","create","--repo",t.repo,"--title",t.title,"--description",t.body,"--yes"];t.labels&&t.labels.length>0&&n.push("--label",t.labels.join(",")),t.assignees?.[0]&&n.push("--assignee",t.assignees[0]);const i=await e.run("glab",n,this.runOpts(t.cwd));if(i.exitCode!==0)return;const a=i.stdout.trim(),u=/\/issues\/(\d+)/.exec(a);return u?{created:!0,number:Number.parseInt(u[1]??"0",10),url:a}:void 0}async closeIssue(e,t){if(t.closingComment){const s=p(t.repo);await e.run("glab",["api","-X","POST",`projects/${s}/issues/${t.issueNumber}/notes`,"-f",`body=${t.closingComment}`],this.runOpts(t.cwd))}return(await e.run("glab",["issue","close",String(t.issueNumber),"--repo",t.repo],this.runOpts(t.cwd))).exitCode===0}async upsertPullRequest(e,t){const s=p(t.repo),r=await e.run("glab",["api",`projects/${s}/merge_requests?state=opened&source_branch=${encodeURIComponent(t.head)}&target_branch=${encodeURIComponent(t.base)}`],this.runOpts(t.cwd));if(r.exitCode===0)try{const u=JSON.parse(r.stdout);if(u[0])return(await e.run("glab",["api","-X","PUT",`projects/${s}/merge_requests/${u[0].iid}`,"-f",`title=${t.title}`,"-f",`description=${t.body}`],this.runOpts(t.cwd))).exitCode===0?{existing:!0,number:u[0].iid,url:u[0].web_url}:void 0}catch{}const n=await e.run("glab",["mr","create","--repo",t.repo,"--source-branch",t.head,"--target-branch",t.base,"--title",t.title,"--description",t.body,"--yes"],this.runOpts(t.cwd));if(n.exitCode!==0)return;const i=n.stdout.trim(),a=/\/merge_requests\/(\d+)/.exec(i);return a?{existing:!1,number:Number.parseInt(a[1]??"0",10),url:i}:void 0}}const _=o=>{if(o.GITHUB_ACTIONS==="true"||o.GITHUB_REPOSITORY)return"github";if(o.GITLAB_CI==="true"||o.CI_PROJECT_PATH)return"gitlab"},k=o=>{const e=o.trim();if(e!==""){if(!e.includes("://")){const t=e.indexOf(":"),s=e.indexOf("/");if(t>0&&(s===-1||t<s)){const r=e.slice(0,t),n=r.lastIndexOf("@");return(n===-1?r:r.slice(n+1)).toLowerCase()||void 0}return}try{return new URL(e).hostname.toLowerCase()||void 0}catch{return}}},T=async(o,e)=>{const t=await e.run("git",["config","--get","remote.origin.url"],{cwd:o,silent:!0});if(t.exitCode!==0)return;const s=k(t.stdout);if(s){if(s==="github.com"||s.endsWith(".github.com"))return"github";if(s==="gitlab.com"||s.startsWith("gitlab."))return"gitlab"}},S=async(o,e,t,s=process.env)=>_(s)??await T(o,e)??"github",j=(o,e={})=>o==="gitlab"?new b({host:e.gitlabHost,httpProxy:e.httpProxy}):new P({host:e.githubHost,httpProxy:e.httpProxy});export{j as createRemoteClient,S as detectRemoteProvider};
@@ -1,48 +0,0 @@
1
- import{createRequire as Ne}from"node:module";import{VisReleaseError as l}from"../packem_shared/VisReleaseError-DMGRBTNO.js";import{VersionActions as N}from"../packem_shared/AfterAllProjectsVersioned-CAKI2nWf.js";import{b as Me}from"../packem_shared/index-tNFGWxc0.js";import{resolveCleanStripList as De}from"./DEFAULT_CLEAN_KEEP.js";import{assertValidPackageName as F,resolveCustomCommands as W,interpolateCommand as J}from"./security.js";let _e;const je=t=>(_e??=Ne(import.meta.url))(t),x=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,V=t=>{if(typeof x<"u"&&x.versions&&x.versions.node){const[e,n]=x.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return x.getBuiltinModule(t)}return je(t)},{readFile:A,writeFile:O,rm:xe,readdir:Ve}=V("node:fs/promises"),{dirname:U,join:h}=V("node:path"),{fileURLToPath:Oe}=V("node:url"),{mkdtempSync:G,writeFileSync:Re}=V("node:fs"),{tmpdir:B}=V("node:os"),Ee=["dependencies","devDependencies","peerDependencies","optionalDependencies"],fe=(t,e)=>{if(t.startsWith("catalog:")||t==="*"||t==="workspace:*"||t==="workspace:^"||t==="workspace:~")return t;if(t.startsWith("workspace:")){const n=t.slice(10);return`workspace:${L(n)}${e}`}if(t.startsWith("npm:")){const n=t.lastIndexOf("@");if(n<=4)return t;const r=t.slice(4,n),s=t.slice(n+1),a=L(s);return`npm:${r}@${a}${e}`}return`${L(t)}${e}`},Fe=/^([\^~=]|>=?|<=?)/,L=t=>{const e=Fe.exec(t);return e?e[1]??"^":"^"},Ut=async(t,e,n={})=>{const r=n.serializeManifest??Be,s=n.changelogPath??Je,a=n.renderChangelogEntry??He,i=new Map(t.releases.map(p=>[p.name,p.newVersion])),o=await Promise.all(t.releases.map(async p=>{const m=e.getPackage(p.name);if(!m)return;const y=Le(m.manifest,p.newVersion,i),b=n.readManifest?.(m.manifestPath),w=s(m);return{changelogEntry:await a(p),changelogPath:w,manifestWrite:{content:r(y,b),path:m.manifestPath}}})),c=[],d=new Map;for(const p of o){if(!p)continue;c.push(p.manifestWrite);const m=d.get(p.changelogPath);m?m.push(p.changelogEntry):d.set(p.changelogPath,[p.changelogEntry])}for(const[p,m]of d){const y=m.join(`
2
-
3
- `),b=n.readChangelog?.(p);c.push({content:Ge(y,b),path:p})}return{deletions:t.consumedChangeFiles.map(p=>p.path),writes:c}},Le=(t,e,n)=>{const r={...t,version:e};for(const s of Ee){const a=t[s];if(!a||typeof a!="object")continue;const i={...a};let o=!1;for(const[c,d]of Object.entries(a)){const p=n.get(c);if(p===void 0)continue;const m=fe(d,p);m!==d&&(i[c]=m,o=!0)}o&&(r[s]=i)}return r},Te=/^# .+/,Ue=/^## /m,Ge=(t,e)=>{const n=t.trim();if(!e||e.trim()==="")return`# Changelog
4
-
5
- ${n}
6
- `;const r=e.split(/\r?\n/);if(r[0]&&Te.test(r[0])){let s=1;for(;s<r.length&&!(r[s]??"").startsWith("## ");)s+=1;const a=r.slice(0,s),i=r.slice(s);return a.length>0&&a[a.length-1]!==""&&a.push(""),[...a,n,"",...i].join(`
7
- `).replaceAll(/\n{3,}/g,`
8
-
9
- `)}return Ue.test(e)?`${n}
10
-
11
- ${e.trimStart()}`:`${n}
12
-
13
- ${e.trimStart()}`},Be=(t,e)=>{const n=We(e);return`${JSON.stringify(t,null,n)}
14
- `},We=t=>{if(!t)return 4;const e=/\n(\s+)"/.exec(t);if(!e)return 4;const n=(e[1]??"").length;return n===2||n===4?n:4},Je=t=>`${t.dir}/CHANGELOG.md`,He=t=>{const e=new Date().toISOString().slice(0,10),n=[`## ${t.newVersion}`,`<sub>${e}</sub>`,""];if(t.isCascadeBump||t.isGroupBump)for(const r of t.sources)n.push(`- Version bump from ${r.name}@${r.newVersion}`);else if(t.isDependencyBump&&t.changeFiles.length===0)for(const r of t.sources)r.newVersion===""?n.push(`- Removed dependency ${r.name}`):n.push(`- Updated dependency ${r.name}@${r.newVersion}`);else for(const r of t.changeFiles)for(const s of r.body.split(/\r?\n/)){if(s.trim()===""){n.push("");continue}n.push(s.startsWith("-")||s.startsWith("*")?s:`- ${s}`)}return n.join(`
15
- `)},Ke=["dependencies","devDependencies","peerDependencies","optionalDependencies"],Q={default:{},named:{}},qe=t=>{if(!t)return Q;let e;try{e=Me(t,{strict:!0})}catch(s){throw new l({cause:s,code:"CONFIG_INVALID",message:`Failed to parse pnpm-workspace.yaml: ${s.message}`})}if(typeof e!="object"||e===null||Array.isArray(e))return Q;const n=e,r={default:{},named:{}};if(typeof n.catalog=="object"&&n.catalog!==null&&!Array.isArray(n.catalog))for(const[s,a]of Object.entries(n.catalog))typeof a=="string"&&(r.default[s]=a);if(typeof n.catalogs=="object"&&n.catalogs!==null&&!Array.isArray(n.catalogs))for(const[s,a]of Object.entries(n.catalogs)){if(typeof a!="object"||a===null||Array.isArray(a))continue;const i={};for(const[o,c]of Object.entries(a))typeof c=="string"&&(i[o]=c);r.named[s]=i}return r},we=(t,e,n)=>{if(!t.startsWith("catalog:"))return t;const r=t.slice(8),s=r===""?n.default:n.named[r];if(s)return s[e]},Y=(t,e)=>{const n={...t};for(const r of Ke){const s=t[r];if(!s||typeof s!="object")continue;const a={...s};for(const[i,o]of Object.entries(s)){if(!o.startsWith("catalog:"))continue;const c=we(o,i,e);if(c===void 0)throw new l({code:"CONFIG_INVALID",message:`Cannot resolve "${o}" for dependency "${i}" in package "${t.name}". Add it to pnpm-workspace.yaml's "catalog" or "catalogs" block.`,packageName:t.name});a[i]=c}n[r]=a}return n},Gt=Object.defineProperty({__proto__:null,parseCatalogs:qe,resolveCatalogRef:we,rewriteCatalogRefs:Y},Symbol.toStringTag,{value:"Module"}),Ye="ACTIONS_ID_TOKEN_REQUEST_URL",z=t=>{const e=!!t.env[Ye],n=!!t.env[t.staticTokenVar],r=t.workspaceConfig?.publish?.preferStaticToken===!0;return e&&!(r&&n)?"oidc":n?"token":"missing"};let T;const ze="https://github.com/visulima/visulima",Qe=async()=>{try{let t=U(Oe(import.meta.url));for(let e=0;e<6;e+=1){const n=h(t,"package.json");try{const s=await A(n,"utf8"),a=JSON.parse(s);if(a.name==="@visulima/vis"&&typeof a.version=="string")return a.version}catch{}const r=U(t);if(r===t)break;t=r}}catch{}return"unknown"},Xe=async()=>(T!==void 0||(T=`vis-release/${await Qe()} (+${ze})`),T),X=new Map,Ze=async t=>{const e=X.get(t);if(e!==void 0)return e;try{const n=await import("./index4.js").then(s=>s.i),r=new n.ProxyAgent(t);return X.set(t,r),r}catch{return}},et=t=>t===301||t===302||t===303||t===307||t===308,tt=(t,e)=>{try{const n=new URL(t),r=new URL(e);return n.host===r.host&&n.protocol===r.protocol}catch{return!1}},j=async(t,e={})=>{const n=e.maxRedirects??2,r={"User-Agent":await Xe(),...e.headers};e.headers?.["User-Agent"]&&(r["User-Agent"]=e.headers["User-Agent"]);let s=t,a=0;const i=e.httpProxy?await Ze(e.httpProxy):void 0;for(;;){let o;try{const p=e.fetchImpl??globalThis.fetch,m={headers:r,method:e.method??"GET",redirect:"manual"};i&&(m.dispatcher=i),o=await p(s,m)}catch{return{json:async()=>{},ok:!1,status:0,text:async()=>""}}if(!et(o.status))return{json:async()=>{try{return await o.json()}catch{return}},ok:o.ok,status:o.status,text:async()=>{try{return await o.text()}catch{return""}}};const c=o.headers.get("location")??o.headers.get("Location");if(!c||a>=n)return{json:async()=>{},ok:!1,status:0,text:async()=>""};let d;try{d=new URL(c,s).toString()}catch{return{json:async()=>{},ok:!1,status:0,text:async()=>""}}if(!tt(t,d))return{json:async()=>{},ok:!1,status:0,text:async()=>""};s=d,a+=1}},nt="https://crates.io/api/v1/crates",rt="Cargo.toml",Z=async t=>{let e;try{e=await A(t,"utf8")}catch(o){throw new l({cause:o,code:"CONFIG_INVALID",file:t,message:`Failed to read Cargo.toml at ${t}: ${o.message}`})}const{parse:n}=await import("./index5.js");let r;try{r=n(e)}catch(o){throw new l({cause:o,code:"CONFIG_INVALID",file:t,message:`Failed to parse Cargo.toml at ${t}: ${o.message}`})}if(!r.package)throw new l({code:"CONFIG_INVALID",file:t,hint:"CargoVersionActions only supports publishable crates with a [package] table. For workspace roots, point per-package config at the member crate directory.",message:`Cargo.toml at ${t} has no [package] table.`});const{name:s}=r.package;if(typeof s!="string"||s.length===0)throw new l({code:"CONFIG_INVALID",file:t,message:`Cargo.toml at ${t} is missing [package].name.`});const a=r.package.version;let i;if(typeof a=="string"?i=a:a&&typeof a=="object"&&a.workspace===!0&&(i=r.workspace?.package?.version),typeof i!="string"||i.length===0)throw new l({code:"CONFIG_INVALID",file:t,hint:"Set [package].version explicitly, or — for workspace-inherited versions — ensure the root Cargo.toml carries [workspace.package].version and point per-package config at it.",message:`Cargo.toml at ${t} has no resolvable [package].version.`});return{name:s,version:i}},ee=async(t,e)=>{const n=`${nt}/${encodeURIComponent(t)}`;try{const r=await j(n,{headers:{Accept:"application/json"},httpProxy:e});if(r.status===404||!r.ok)return;const s=await r.json();return s?.crate?.max_stable_version??s?.crate?.max_version??void 0}catch{return}},st=(t,e)=>z({env:t,staticTokenVar:"CARGO_REGISTRY_TOKEN",workspaceConfig:e})==="oidc",at=async(t,e)=>{const n=await t.run("cargo",["package","--list","--allow-dirty"],{cwd:e,silent:!0});return n.exitCode!==0?[]:n.stdout.split(/\r?\n/).map(r=>r.trim()).filter(r=>r.length>0)};class ot extends N{id="cargo";async readPublishedVersion(e){const n=H(e.pkg);try{const{name:r}=await Z(n);return await ee(r)}catch{return}}async publish(e){if(e.dryRun)return{output:`[dry-run / cargo] would publish ${e.pkg.name}@${e.release.newVersion}`,published:!0};const n=H(e.pkg,e.perPackageConfig),r=it(e.pkg,e.perPackageConfig),{name:s,version:a}=await Z(n);if(a!==e.release.newVersion)throw new l({code:"CONFIG_INVALID",file:n,hint:`Confirm the cargo() preset's crateDir points at the directory containing this Cargo.toml. Expected ${e.release.newVersion} on disk after the extra-files bump.`,message:`Cargo.toml version (${a}) does not match planned release version (${e.release.newVersion}) for ${e.pkg.name}.`,packageName:e.pkg.name});if(await ee(s,e.workspaceConfig?.httpProxy)===e.release.newVersion)return{alreadyPublished:!0,output:`[cargo] ${s}@${e.release.newVersion} already on crates.io`,published:!1};const i=st(process.env,e.workspaceConfig);if(!i&&!process.env.CARGO_REGISTRY_TOKEN)throw new l({code:"AUTH_MISSING",hint:"Set CARGO_REGISTRY_TOKEN, or run from a GH-Actions job with `permissions: id-token: write` for OIDC trusted publishing.",message:`Cannot publish ${s}@${e.release.newVersion}: neither CARGO_REGISTRY_TOKEN nor OIDC trusted publishing is available.`,packageName:e.pkg.name});const o=e.workspaceConfig?.publish?.guards;if(o?.packSecretScan){const p=await at(e.pm.runner,r);if(p.length>0){const{runPackSecretScan:m}=await import("./publish-guards.js"),y=typeof o.packSecretScan=="object"?o.packSecretScan.ignore:void 0,b=await m({files:p,ignore:y,pkgDir:r});if(!b.passed){const{redactTokens:w}=await import("./security.js"),C=b.findings.map(_=>` • [packSecretScan] ${w(_.message)}${_.hint?`
16
- → ${w(_.hint)}`:""}`).join(`
17
- `);throw new l({code:"PUBLISH_FAILED",message:`Pre-publish secret scan failed for ${s}@${e.release.newVersion}:
18
- ${C}`,packageName:e.pkg.name})}}}const c=["publish","--allow-dirty"];e.registry&&e.registry!=="https://crates.io"&&c.push("--registry",e.registry);const d=await e.pm.runner.run("cargo",c,{cwd:r,silent:!1});if(d.exitCode!==0)throw new l({code:"PUBLISH_FAILED",hint:"Inspect the cargo output above. Common causes: missing CARGO_REGISTRY_TOKEN, OIDC permission misconfigured, version already published, crates.io rate limit. Re-runs are safe — the published-version probe short-circuits subsequent runs.",message:`cargo publish failed for ${s}@${e.release.newVersion}: exit ${d.exitCode}. stderr: ${d.stderr.trim().slice(0,500)}`,packageName:e.pkg.name});return{output:`[cargo] published ${s}@${e.release.newVersion}${i?" (trusted publishing)":""}`,published:!0}}}const H=(t,e)=>{const n=e?.cargoTomlPath??rt;return h(t.dir,n)},it=(t,e)=>U(H(t,e)),ct=["linux/amd64","linux/arm64"],pt=t=>{const e=t.indexOf("/");if(e===-1)return{registry:"docker.io",repository:`library/${t}`};const n=t.slice(0,e),r=t.slice(e+1);return n==="localhost"||n.includes(".")||n.includes(":")?{registry:n,repository:r}:r.includes("/")?{registry:"docker.io",repository:t}:{registry:"docker.io",repository:`${n}/${r}`}},te=(t,e)=>{const{registry:n,repository:r}=pt(t);return`https://${n==="docker.io"?"registry-1.docker.io":n}/v2/${r}/manifests/${encodeURIComponent(e)}`},ke=t=>{const e=t??{};return{buildContext:e.buildContext,containerBuildArgs:e.containerBuildArgs,containerImage:e.containerImage,containerPlatforms:e.containerPlatforms,containerSigning:e.containerSigning,containerSkipLatest:e.containerSkipLatest}},lt=(t,e)=>{const n=ke(t);if(typeof n.containerImage!="string"||n.containerImage.length===0)throw new l({code:"CONFIG_INVALID",hint:["Container packages must declare `containerImage` in their per-pkg release config:","",' release.packages["<pkg>"] = container({',' image: "ghcr.io/scope/foo",',' platforms: ["linux/amd64", "linux/arm64"],',' signing: "cosign", // optional'," })","",'Or set `versionActions: "container"` + `containerImage` directly.'].join(`
19
- `),message:`containerImage is required for versionActions: "container" on ${e}`,packageName:e});return{buildContext:n.buildContext,containerBuildArgs:n.containerBuildArgs,containerImage:n.containerImage,containerPlatforms:n.containerPlatforms,containerSigning:n.containerSigning,containerSkipLatest:n.containerSkipLatest}};class ut extends N{id="container";async readPublishedVersion(e){const n=ke(e.perPackageConfig);if(!n.containerImage)return;const r=e.pkg.version,s=te(n.containerImage,r);try{return(await j(s,{headers:{Accept:["application/vnd.oci.image.manifest.v1+json","application/vnd.oci.image.index.v1+json","application/vnd.docker.distribution.manifest.v2+json","application/vnd.docker.distribution.manifest.list.v2+json"].join(",")},httpProxy:e.workspaceConfig?.httpProxy,method:"HEAD"})).status===200?r:void 0}catch{return}}async publish(e){const n=lt(e.perPackageConfig,e.pkg.name);if(e.dryRun){const{command:a}=ne(e,n);return{output:`[dry-run / container] would run: ${a.join(" ")}`,published:!0}}try{const a=te(n.containerImage,e.release.newVersion);if((await j(a,{httpProxy:e.workspaceConfig?.httpProxy,method:"HEAD"})).status===200)return{alreadyPublished:!0,output:`[container] ${n.containerImage}:${e.release.newVersion} already published`,published:!1}}catch{}const{command:r}=ne(e,n),s=await e.pm.runner.run(r[0],r.slice(1),{cwd:e.pkg.dir,silent:!1});if(s.exitCode!==0)throw new l({code:"PUBLISH_FAILED",hint:["docker buildx build failed. Common causes:"," • Not authenticated to the registry — run `docker login <registry>` first."," For ECR: `aws ecr get-login-password --region <r> | docker login --username AWS --password-stdin <account>.dkr.ecr.<r>.amazonaws.com`"," For GCR/GAR: `gcloud auth configure-docker <region>-docker.pkg.dev`"," For GHCR: `echo $GITHUB_TOKEN | docker login ghcr.io -u <user> --password-stdin`"," • Buildx not installed / configured — `docker buildx create --use` (one-time setup)."," • Multi-arch build needs QEMU registered — `docker run --privileged --rm tonistiigi/binfmt --install all`."].join(`
20
- `),message:`docker buildx failed for ${e.pkg.name}@${e.release.newVersion}: exit ${s.exitCode}. stderr: ${s.stderr.trim().slice(0,500)}`,packageName:e.pkg.name});if(n.containerSigning==="cosign"){const a=`${n.containerImage}:${e.release.newVersion}`,i=await e.pm.runner.run("cosign",["sign","--yes",a],{cwd:e.pkg.dir,silent:!1});if(i.exitCode!==0)throw new l({code:"PUBLISH_FAILED",hint:"cosign signing failed. For keyless cosign, ensure COSIGN_EXPERIMENTAL=1 (cosign <2.0) and the CI runner has the OIDC token (`id-token: write` permission on GH Actions).",message:`cosign sign failed for ${a}: exit ${i.exitCode}. stderr: ${i.stderr.trim().slice(0,500)}`,packageName:e.pkg.name})}return{output:`[container] published ${n.containerImage}:${e.release.newVersion}${n.containerSkipLatest?"":" + :latest"}${n.containerSigning==="cosign"?" (signed via cosign)":""}`,published:!0}}}const ne=(t,e)=>{if(!e.containerImage)throw new Error("buildBuildxCommand requires config.containerImage");const n=(e.containerPlatforms??ct).join(","),r=`${e.containerImage}:${t.release.newVersion}`,s=`${e.containerImage}:latest`,a=e.buildContext??".",i=["docker","buildx","build","--platform",n,"-t",r];e.containerSkipLatest||i.push("-t",s);for(const[o,c]of Object.entries(e.containerBuildArgs??{}))i.push("--build-arg",`${o}=${c}`);return i.push("--label",`org.opencontainers.image.version=${t.release.newVersion}`),i.push("--label",`org.opencontainers.image.title=${t.pkg.name}`),i.push("--push",a),{command:i}},dt="https://jsr.io",mt=/^@[a-z0-9-]+\/[a-z0-9-]+$/i,re=async t=>{let e;try{e=await A(t,"utf8")}catch(r){throw new l({cause:r,code:"CONFIG_INVALID",file:t,message:`Failed to read JSR manifest at ${t}: ${r.message}`})}let n;try{n=JSON.parse(e)}catch(r){throw new l({cause:r,code:"CONFIG_INVALID",file:t,message:`Failed to parse JSR manifest at ${t}: ${r.message}`})}if(typeof n.name!="string"||n.name.length===0)throw new l({code:"CONFIG_INVALID",file:t,hint:"JSR manifests must declare a `name` field with the `@scope/name` form.",message:`JSR manifest at ${t} is missing the \`name\` field.`});if(!mt.test(n.name))throw new l({code:"CONFIG_INVALID",file:t,hint:"JSR requires every package to publish under `@scope/name`. Add the `@scope/` prefix and lowercase the name (a-z, 0-9, hyphen).",message:`JSR manifest at ${t} declares an invalid \`name\`: "${n.name}". JSR requires the @scope/name form.`});if(typeof n.version!="string"||n.version.length===0)throw new l({code:"CONFIG_INVALID",file:t,hint:"Add a `version` literal to the JSR manifest, or wire the `jsr()` preset so vis bumps it for you.",message:`JSR manifest at ${t} is missing the \`version\` field.`});return{name:n.name,version:n.version}},se=async(t,e)=>{const n=`${dt}/${t}/meta.json`;try{const r=await j(n,{headers:{Accept:"application/json"},httpProxy:e});if(r.status===404||!r.ok)return;const s=await r.json();return typeof s?.latest=="string"?s.latest:void 0}catch{return}},gt=(t,e)=>z({env:t,staticTokenVar:"JSR_API_KEY",workspaceConfig:e})==="oidc",ae=(t,e)=>{const n=e?.jsrConfigPath??"jsr.json";return h(t.dir,n)};class ht extends N{id="jsr";async readPublishedVersion(e){const n=ae(e.pkg,e.perPackageConfig);try{const{name:r}=await re(n);return await se(r,e.workspaceConfig?.httpProxy)}catch{return}}async publish(e){if(e.dryRun)return{output:`[dry-run / jsr] would publish ${e.pkg.name}@${e.release.newVersion}`,published:!0};const n=ae(e.pkg,e.perPackageConfig),{name:r,version:s}=await re(n);if(s!==e.release.newVersion)throw new l({code:"CONFIG_INVALID",file:n,hint:`Confirm the jsr() preset's manifestPath points at the JSR config file the extra-files rule rewrites. Expected ${e.release.newVersion} on disk after the bump.`,message:`JSR manifest version (${s}) does not match planned release version (${e.release.newVersion}) for ${e.pkg.name}.`,packageName:e.pkg.name});if(await se(r,e.workspaceConfig?.httpProxy)===e.release.newVersion)return{alreadyPublished:!0,output:`[jsr] ${r}@${e.release.newVersion} already on jsr.io`,published:!1};const a=gt(process.env,e.workspaceConfig);if(!a&&!process.env.JSR_API_KEY)throw new l({code:"AUTH_MISSING",hint:"Set JSR_API_KEY for static-token auth, or run from a GH-Actions job with `permissions: id-token: write` so ACTIONS_ID_TOKEN_REQUEST_URL is exposed for OIDC trusted publishing.",message:`Cannot publish ${r}@${e.release.newVersion}: neither JSR_API_KEY nor OIDC trusted publishing is available.`,packageName:e.pkg.name});const i=["jsr","publish","--allow-dirty"],o=e.perPackageConfig?.jsrConfigPath;o!==void 0&&o!=="jsr.json"&&i.push("--config",o);for(const d of e.perPackageConfig?.jsrPublishArgs??[])i.push(d);const c=await e.pm.runner.run("npx",i,{cwd:e.pkg.dir,silent:!1});if(c.exitCode!==0)throw new l({code:"PUBLISH_FAILED",hint:"Inspect the jsr CLI output above. Common causes: invalid JSR_API_KEY, OIDC permission misconfigured, version already published, slow-mode rate limit. Re-runs are safe — the published-version probe short-circuits subsequent runs.",message:`jsr publish failed for ${r}@${e.release.newVersion}: exit ${c.exitCode}. stderr: ${c.stderr.trim().slice(0,500)}`,packageName:e.pkg.name});return{output:`[jsr] published ${r}@${e.release.newVersion}${a?" (trusted publishing)":""}`,published:!0}}}const ft=/<!--[\s\S]*?-->/g,wt=/<project\b[^>]*>([\s\S]*)/i,oe=/<version>\s*([^<]+?)\s*<\/version>/i,ie=/<groupId>\s*([^<]+?)\s*<\/groupId>/i,ce=/<artifactId>\s*([^<]+?)\s*<\/artifactId>/i,kt=/<modules\b[^>]*>[\s\S]*?<module\b/i,pe=t=>{const e=t.replaceAll(ft,""),n=wt.exec(e)?.[1]??e,r=n.replaceAll(/<parent\b[\s\S]*?<\/parent>/gi,"").replaceAll(/<dependencyManagement\b[\s\S]*?<\/dependencyManagement>/gi,"").replaceAll(/<dependencies\b[\s\S]*?<\/dependencies>/gi,"").replaceAll(/<build\b[\s\S]*?<\/build>/gi,"").replaceAll(/<profiles\b[\s\S]*?<\/profiles>/gi,"").replaceAll(/<pluginRepositories\b[\s\S]*?<\/pluginRepositories>/gi,"").replaceAll(/<repositories\b[\s\S]*?<\/repositories>/gi,""),s=oe.exec(r)??oe.exec(n),a=ie.exec(r)??ie.exec(n),i=ce.exec(r)??ce.exec(n),o=kt.test(n);return{artifactId:i?.[1],groupId:a?.[1],hasModules:o,version:s?.[1]}},bt=t=>{const e=/<latest>\s*([^<]+?)\s*<\/latest>/i.exec(t);if(e?.[1])return e[1];const n=/<versions>([\s\S]*?)<\/versions>/i.exec(t);return n?[...n[1].matchAll(/<version>\s*([^<]+?)\s*<\/version>/gi)].map(r=>r[1]).at(-1):void 0},yt=(t,e)=>{const n=t.split(".").map(s=>encodeURIComponent(s)).join("/"),r=encodeURIComponent(e);return`https://repo1.maven.org/maven2/${n}/${r}/maven-metadata.xml`},$t=["Native Maven publishing isn't implemented yet. Drop to the generic shell path:","",' release.packages["<your-pkg>"] = {',' ...pomXml({ pomDir: "jvm/sdk" }),',' versionActions: "shell",',' publishCommand: "mvn -B -ntp deploy",',' checkPublished: "",'," }","","Configure either `central-publishing-maven-plugin` (recommended for","Sonatype Central Portal) or `nexus-staging-maven-plugin` (legacy OSSRH)","in your pom.xml, plus credentials in ~/.m2/settings.xml.","","Maven Central does not (yet) support OIDC trusted publishing —","static credentials are required. See docs/guides/release-maven.mdx","for the full setup walkthrough."].join(`
21
- `);class vt extends N{id="maven";warnedMultiModule=new WeakSet;warnIfMultiModule(e,n){!n.hasModules||this.warnedMultiModule.has(e)||(this.warnedMultiModule.add(e),process.stderr.write(`[vis release] ⚠ ${e.name} (${n.groupId??"?"}:${n.artifactId??"?"}) is a multi-module Maven project (<modules> present). vis treats it as a single artifact for version-read + already-published checks. For proper reactor handling, use \`versionActions: "shell"\` with \`mvn -B -ntp deploy\`.
22
- `))}async readPublishedVersion(e){const n=e.perPackageConfig??{},r=h(e.pkg.dir,n.pomPath??"pom.xml");let s;try{s=await A(r,"utf8")}catch{return}const a=pe(s);if(this.warnIfMultiModule(e.pkg,a),!a.groupId||!a.artifactId||n.mavenMetadataUrl==="")return;const i=n.mavenMetadataUrl??yt(a.groupId,a.artifactId);try{const o=await j(i,{headers:{Accept:"text/xml,application/xml;q=0.9,*/*;q=0.8"},httpProxy:e.workspaceConfig?.httpProxy});if(o.status===404||!o.ok)return;const c=await o.text();return bt(c)}catch{return}}async publish(e){const n=e.perPackageConfig??{},r=h(e.pkg.dir,n.pomPath??"pom.xml");let s;try{const o=await A(r,"utf8");s=pe(o)}catch{s=void 0}const a=s?.groupId&&s?.artifactId?`${s.groupId}:${s.artifactId}`:e.pkg.name;if(e.dryRun)return{output:`[dry-run / maven] would publish ${e.pkg.name}@${e.release.newVersion} (${a}) (native publish not yet implemented — would use shell path)`,published:!0};const i=`Failing artifact: ${a}
23
- Pom: ${r}
24
-
25
- ${$t}`;throw new l({code:"CONFIG_INVALID",hint:i,message:`Native Maven publishing is not implemented for ${e.pkg.name}@${e.release.newVersion} (${a}). Use \`versionActions: "shell"\` with \`mvn deploy\` until the Sonatype Central Portal client lands.`,packageName:e.pkg.name})}}const be=(t,e)=>{if(e===!1)return{...t};const n=new Set(De(e)),r={name:t.name,version:t.version};for(const[s,a]of Object.entries(t))n.has(s)||(r[s]=a);return r},ye="https://registry.npmjs.org/",It="npm:registry.npmjs.org",le=async t=>{const e=h(t,"npm");try{return(await Ve(e,{withFileTypes:!0})).filter(n=>n.isDirectory()).map(n=>n.name)}catch{return[]}},Ct=async t=>{const e=t.ACTIONS_ID_TOKEN_REQUEST_URL,n=t.ACTIONS_ID_TOKEN_REQUEST_TOKEN;if(!e||!n)return;const r=`${e}${e.includes("?")?"&":"?"}audience=${encodeURIComponent(It)}`,s=await fetch(r,{headers:{Authorization:`Bearer ${n}`}});if(!s.ok)return;const a=await s.json().catch(()=>({}));return typeof a.value=="string"?a.value:void 0},Pt=async(t,e)=>{const n=await fetch(`${ye}-/npm/v1/oidc/token/exchange/package/${encodeURIComponent(t)}`,{headers:{Authorization:`Bearer ${e}`},method:"POST"});if(!n.ok)return;const r=await n.json().catch(()=>({}));return typeof r.token=="string"?r.token:void 0},ue=async(t,e,n)=>{if(e){const s=await Pt(t,e);if(s)return{source:"oidc",token:s}}const r=n.NPM_TOKEN;if(r)return{source:"NPM_TOKEN",token:r};throw new l({code:"AUTH_MISSING",message:`Cannot publish ${t}: OIDC exchange did not succeed and NPM_TOKEN is not set.`,packageName:t})},de=(t,e)=>{Re(t,`//registry.npmjs.org/:_authToken=${e}
26
- registry=${ye}
27
- `)};class St extends N{id="native-addon";async readPublishedVersion(e){try{F(e.pkg.name);const{execFileSync:n}=await import("node:child_process");return n("npm",["view",e.pkg.name,"version"],{stdio:["ignore","pipe","ignore"]}).toString().trim()||void 0}catch{return}}async publish(e){if(e.dryRun){const c=await le(e.pkg.dir);return{output:`[dry-run] would publish ${e.pkg.name}@${e.release.newVersion} + ${c.length} platform package(s)`,published:!0}}const n=await le(e.pkg.dir);if(n.length===0){const{NpmVersionActions:c}=await Promise.resolve().then(()=>jt);return new c().publish(e)}const{env:r}=process,s=await Ct(r),a=e.release.newVersion,i=new Map,o=[];try{await Promise.all(n.map(async g=>{const u=h(e.pkg.dir,"npm",g,"package.json"),f=await A(u,"utf8");i.set(u,f);const $=JSON.parse(f);$.version=a,await O(u,`${JSON.stringify($,null,4)}
28
- `)}));const{execFileSync:c}=await import("node:child_process"),d=await Promise.all(n.map(async g=>{const u=h(e.pkg.dir,"npm",g),f=h(u,"package.json"),$=await A(f,"utf8"),k=JSON.parse($);F(k.name);const P=await ue(k.name,s,r),v=G(h(B(),"vis-release-napi-"));o.push(v);const S=h(v,".npmrc");return de(S,P.token),{manifest:k,npmrcPath:S,platform:g,platformDir:u}})),p=e.workspaceConfig?.publish?.guards;if(p&&Object.values(p).some(g=>g!==void 0&&g!==!1&&g!=="off")){const{runPublishGuards:g}=await import("./publish-guards.js");for(const{manifest:u,platformDir:f}of d){const $=c("npm",["pack","--dry-run","--json"],{cwd:f,stdio:["ignore","pipe","ignore"]}).toString();let k=[];try{k=JSON.parse($)[0]?.files?.map(v=>v.path)??[]}catch{}const P=await g({config:p,manifest:u,packFiles:k,pkgDir:f,runner:e.pm.runner,sourceManifest:u});if(P.blockers.length>0){const v=P.blockers.flatMap(S=>S.findings.map(E=>` • [${S.gate}] ${E.message}${E.hint?`
29
- → ${E.hint}`:""}`)).join(`
30
- `);throw new l({code:"PUBLISH_FAILED",message:`Pre-publish guards failed for ${u.name}@${a} (platform package):
31
- ${v}`,packageName:u.name})}}}const m=e.tag??"latest",y=(g,u)=>{const f=["publish",g,"--tag",m,"--access","public","--userconfig",u];return e.provenance&&f.push("--provenance"),f};for(const{manifest:g,npmrcPath:u,platformDir:f}of d)try{c("npm",y(f,u),{env:{...r,NPM_CONFIG_USERCONFIG:u},stdio:"inherit"})}catch($){const k=$.message;if(!k.includes("EPUBLISHCONFLICT")&&!k.includes("cannot publish over"))throw new l({cause:$,code:"PUBLISH_FAILED",message:`Failed to publish platform package ${g.name}@${a}: ${k}`,packageName:g.name})}const b=e.versionedManifestByName.get(e.pkg.name)??e.pkg.manifest,w={...b},C={...b.optionalDependencies};for(const{manifest:g}of d)Object.hasOwn(C,g.name)&&(C[g.name]=a);w.optionalDependencies=C;const _=Y(w,e.catalogs),I=be(_,e.cleanPackageJsonConfig),D=await A(e.pkg.manifestPath,"utf8");try{await O(e.pkg.manifestPath,`${JSON.stringify(I,null,4)}
32
- `),F(e.pkg.name);const g=await ue(e.pkg.name,s,r),u=G(h(B(),"vis-release-napi-parent-"));o.push(u);const f=h(u,".npmrc");de(f,g.token);const $=c("npm",["pack","--pack-destination",u,"--json"],{cwd:e.pkg.dir,env:r,stdio:["ignore","pipe","ignore"]}).toString();let k;try{const v=JSON.parse($);v[0]?.filename&&(k=h(u,v[0].filename))}catch{}const P=["publish",k??e.pkg.dir,"--tag",m,"--access","public","--userconfig",f];if(e.provenance&&P.push("--provenance"),c("npm",P,{env:{...r,NPM_CONFIG_USERCONFIG:f},stdio:"inherit"}),k){const{hashTarball:v}=await import("./publish-guards.js");return{published:!0,tarball:await v(k)}}return{published:!0}}finally{await O(e.pkg.manifestPath,D)}}finally{for(const[c,d]of i)try{await O(c,d)}catch{}for(const c of o)try{await xe(c,{force:!0,recursive:!0})}catch{}}}}const At=async(t,e)=>{const{extractPackFilesFromRaw:n}=await import("./publish-guards.js"),r=n(e.raw);if(r!==void 0)return r;const s=await t.pm.runner.run("npm",["pack","--dry-run","--json"],{cwd:t.pkg.dir,silent:!0});if(s.exitCode!==0)return[];try{return n(JSON.parse(s.stdout))??[]}catch{return[]}},me=1800*1e3,ge=15*1e3,he=t=>{if(t===!0)return{enabled:!0,pollIntervalMs:ge,timeoutMs:me};if(t&&typeof t=="object"){const e=t;return{enabled:!0,pollIntervalMs:e.pollIntervalMs??ge,timeoutMs:e.timeoutMs??me}}return{enabled:!1,pollIntervalMs:0,timeoutMs:0}};class $e extends N{id="npm";async readPublishedVersion(e){try{const n=await e.pm.runner.run("npm",["view",e.pkg.name,"version","--silent"],{cwd:e.pkg.dir,silent:!0});return n.exitCode!==0?void 0:n.stdout.trim()||void 0}catch{return}}async publish(e){if(e.dryRun)return{output:`[dry-run] would publish ${e.pkg.name}@${e.release.newVersion}`,published:!0};if(e.resumeStageId){const d=he(e.workspaceConfig?.publish?.stage);if(!d.enabled)throw new l({code:"CONFIG_INVALID",message:`Cannot resume stage ${e.resumeStageId} for ${e.pkg.name}@${e.release.newVersion}: publish.stage is now disabled. Resolve the stage manually via \`vis release stage approve|reject ${e.resumeStageId}\`.`,packageName:e.pkg.name});return this.resumeStagedPublish(e,d)}const n=e.perPackageConfig&&e.workspaceConfig?W(e.pkg.name,e.perPackageConfig,e.workspaceConfig):{};if(n.buildCommand){const d=J(n.buildCommand,{name:e.pkg.name,version:e.release.newVersion}),p=await e.pm.runner.run(process.platform==="win32"?"cmd":"sh",process.platform==="win32"?["/c",d]:["-c",d],{cwd:e.pkg.dir,silent:!1});if(p.exitCode!==0)throw new Error(`buildCommand failed for ${e.pkg.name}: exit ${p.exitCode}`)}const r=e.versionedManifestByName.get(e.pkg.name)??e.pkg.manifest,s=_t(r,e.versionedManifestByName),a=Y(s,e.catalogs),i=be(a,e.cleanPackageJsonConfig),o=await import("node:fs/promises"),c=await o.readFile(e.pkg.manifestPath,"utf8");try{if(await o.writeFile(e.pkg.manifestPath,`${JSON.stringify(i,null,4)}
33
- `),n.publishCommand){const p={name:e.pkg.name,version:e.release.newVersion},m=Array.isArray(n.publishCommand)?n.publishCommand:[n.publishCommand];for(const y of m){const b=J(y,p),w=await e.pm.runner.run(process.platform==="win32"?"cmd":"sh",process.platform==="win32"?["/c",b]:["-c",b],{cwd:e.pkg.dir,silent:!1});if(w.exitCode!==0)throw new Error(`publishCommand failed for ${e.pkg.name}: exit ${w.exitCode}`)}return{output:`[custom] published ${e.pkg.name}@${e.release.newVersion}`,published:!0}}const d=G(h(B(),"vis-release-pack-"));try{const p=await e.pm.pack({cwd:e.pkg.dir,destination:d}),m=e.workspaceConfig?.publish?.guards;if(m&&Object.values(m).some(u=>u!==void 0&&u!==!1&&u!=="off")){const{runPublishGuards:u}=await import("./publish-guards.js"),f=await At(e,p),$=await u({config:m,manifest:i,packFiles:f,pkgDir:e.pkg.dir,runner:e.pm.runner,sourceManifest:e.pkg.manifest});if($.blockers.length>0){const{redactTokens:k}=await import("./security.js"),P=$.blockers.flatMap(v=>v.findings.map(S=>` • [${v.gate}] ${k(S.message)}${S.hint?`
34
- → ${k(S.hint)}`:""}`)).join(`
35
- `);throw new l({code:"PUBLISH_FAILED",message:`Pre-publish guards failed for ${e.pkg.name}@${e.release.newVersion}:
36
- ${P}`,packageName:e.pkg.name})}}const{hashTarball:y}=await import("./publish-guards.js"),b=await y(p.tarball);if((e.workspaceConfig?.publish?.publishStrategy??"npm-publish-tarball")==="native"){const u=e.pm.id;return e.provenance&&u==="bun"&&process.stderr.write(`[vis release] ⚠ publishStrategy "native": bun has no --provenance/OIDC support; ${e.pkg.name}@${e.release.newVersion} publishes without provenance.
37
- `),e.otp&&u==="yarn"&&process.stderr.write(`[vis release] ⚠ publishStrategy "native": \`yarn npm publish\` ignores --otp; configure 2FA via .yarnrc.yml for ${e.pkg.name}.
38
- `),{...await e.pm.publishNative({access:"public",cwd:e.pkg.dir,otp:e.otp,provenance:e.provenance,registry:e.registry,tag:e.tag}),tarball:b}}const w=he(e.workspaceConfig?.publish?.stage);if(w.enabled){const{refuseRestrictedOidc:u}=await import("./stage-publisher.js"),f=e.pkg.manifest.publishConfig?.access;u(f)}const C=await e.pm.publish({access:"public",otp:e.otp,provenance:e.provenance,registry:e.registry,stage:w.enabled,tag:e.tag,tarball:p.tarball});if(!w.enabled||!C.stageId)return{...C,tarball:b};const{waitForStageDecision:_}=await import("./stage-publisher.js"),{stageId:I}=C,D=Date.now();process.stderr.write(`[vis release] ⏳ ${e.pkg.name}@${e.release.newVersion} staged (id ${I}). Waiting up to ${Math.round(w.timeoutMs/6e4)}m for a maintainer to approve via npmjs.com or \`npm stage approve ${I}\`...
39
- `);const g=await _({cwd:e.pkg.dir,onProgress:u=>{u>0&&u%3e5<w.pollIntervalMs&&process.stderr.write(`[vis release] still waiting for ${e.pkg.name} stage decision (${Math.round(u/6e4)}m elapsed)...
40
- `)},packageName:e.pkg.name,pollIntervalMs:w.pollIntervalMs,runner:e.pm.runner,stageId:I,timeoutMs:w.timeoutMs,version:e.release.newVersion});return g==="approved"?(process.stderr.write(`[vis release] ✓ ${e.pkg.name}@${e.release.newVersion} approved + promoted (${Math.round((Date.now()-D)/1e3)}s).
41
- `),{...C,stageId:void 0,tarball:b}):g==="rejected"?(process.stdout.write(`::warning::Stage rejected for ${e.pkg.name}@${e.release.newVersion} (id ${I}). Re-stage by re-running the release once the review feedback is addressed.
42
- `),{alreadyPublished:!1,output:`stage-rejected: ${I}`,published:!1,stageId:I}):(process.stdout.write(`::warning::Stage timeout for ${e.pkg.name}@${e.release.newVersion} (id ${I}) after ${Math.round(w.timeoutMs/6e4)}m. Re-run \`vis release publish\` once a maintainer can approve, or run \`vis release stage approve ${I}\` manually.
43
- `),{alreadyPublished:!1,output:`stage-timeout: ${I}`,published:!1,stageId:I})}finally{await o.rm(d,{force:!0,recursive:!0})}}finally{await o.writeFile(e.pkg.manifestPath,c)}}async resumeStagedPublish(e,n){const r=e.resumeStageId,s=Date.now();process.stderr.write(`[vis release] ↻ Resuming wait on staged ${e.pkg.name}@${e.release.newVersion} (id ${r}) — tarball already uploaded; not re-publishing.
44
- `);const{waitForStageDecision:a}=await import("./stage-publisher.js"),i=await a({cwd:e.pkg.dir,onProgress:o=>{o>0&&o%3e5<n.pollIntervalMs&&process.stderr.write(`[vis release] still waiting for ${e.pkg.name} stage decision (resume, ${Math.round(o/6e4)}m elapsed)...
45
- `)},packageName:e.pkg.name,pollIntervalMs:n.pollIntervalMs,runner:e.pm.runner,stageId:r,timeoutMs:n.timeoutMs,version:e.release.newVersion});return i==="approved"?(process.stderr.write(`[vis release] ✓ ${e.pkg.name}@${e.release.newVersion} approved + promoted on resume (${Math.round((Date.now()-s)/1e3)}s).
46
- `),{output:`[resumed] published ${e.pkg.name}@${e.release.newVersion}`,published:!0}):i==="rejected"?(process.stdout.write(`::warning::Stage rejected on resume for ${e.pkg.name}@${e.release.newVersion} (id ${r}).
47
- `),{alreadyPublished:!1,output:`stage-rejected: ${r}`,published:!1,stageId:r}):(process.stdout.write(`::warning::Stage timeout on resume for ${e.pkg.name}@${e.release.newVersion} (id ${r}) after ${Math.round(n.timeoutMs/6e4)}m.
48
- `),{alreadyPublished:!1,output:`stage-timeout: ${r}`,published:!1,stageId:r})}}const Nt=["dependencies","devDependencies","peerDependencies","optionalDependencies"],_t=(t,e)=>{const n={...t};for(const r of Nt){const s=t[r];if(!s||typeof s!="object")continue;const a={...s};for(const[i,o]of Object.entries(s)){if(!o.startsWith("workspace:"))continue;const c=e.get(i);c&&(a[i]=fe(o.slice(10)==="*"?"*":o,c.version),a[i].startsWith("workspace:")&&(a[i]=a[i].slice(10)))}n[r]=a}return n},jt=Object.defineProperty({__proto__:null,NpmVersionActions:$e},Symbol.toStringTag,{value:"Module"});class xt extends N{id="private";async readPublishedVersion(e){}async publish(e){return{output:`[private] skipped publish for ${e.pkg.name}@${e.release.newVersion}`,published:!1}}}const ve=t=>`https://pypi.org/pypi/${encodeURIComponent(t.toLowerCase())}/json`,Vt=(t,e)=>e?.uvLockPath?h(t.dir,e.uvLockPath):h(t.dir,"uv.lock"),Ot=async(t,e)=>{let n;try{n=await M(t)}catch{return"no-root-pyproject"}if(n===void 0)return"no-root-pyproject";const r=n.tool?.uv?.workspace?.members;if(!Array.isArray(r)||r.length===0)return"no-workspace";const s=e.replace(/^\.\//,"").replaceAll("\\","/");for(const a of r){if(typeof a!="string")continue;const i=a.replace(/^\.\//,"").replaceAll("\\","/");if(i===s)return"member";if(i.endsWith("/*")){const o=i.slice(0,-2);if(s.startsWith(`${o}/`)&&!s.slice(o.length+1).includes("/"))return"member"}if(i.endsWith("/**")){const o=i.slice(0,-3);if(s===o||s.startsWith(`${o}/`))return"member"}}return"missing"},M=async t=>{const e=h(t,"pyproject.toml");let n;try{n=await A(e,"utf8")}catch(s){const{code:a}=s;if(a==="ENOENT")return;throw new l({cause:s,code:"BUMP_FILE_INVALID",file:e,message:`Failed to read ${e}: ${s.message}`})}const{parse:r}=await import("./index5.js");try{return r(n)}catch(s){throw new l({cause:s,code:"BUMP_FILE_INVALID",file:e,message:`Failed to parse ${e}: ${s.message}`})}},Ie=async(t,e)=>{try{return(await t.run("uv",["--version"],{cwd:e,silent:!0})).exitCode===0}catch{return!1}},Ce=t=>{const e=t?.["build-system"]?.["build-backend"];return e?e.startsWith("hatchling")?"hatch":e.startsWith("poetry.core")||e.startsWith("poetry_core")?"poetry":e.startsWith("pdm.backend")||e.startsWith("pdm_backend")?"pdm":e.startsWith("setuptools")?"setuptools":e.startsWith("uv_build")||e.startsWith("uv.build")?"uv":"unknown":"unknown"},Pe=(t,e)=>t==="uv"||t==="unknown"&&e?{backend:t,buildCommand:{args:["build"],binary:"uv"},hasUv:e,publishCommand:{args:["publish"],binary:"uv"}}:{backend:t,buildCommand:{args:["-m","build"],binary:"python"},hasUv:e,publishCommand:{args:["upload","dist/*"],binary:"twine"}},Se=(t,e)=>z({env:t,staticTokenVar:"TWINE_PASSWORD",workspaceConfig:e}),K=async(t,e)=>{try{const n=await j(ve(t),{headers:{Accept:"application/json"},httpProxy:e});return n.status===404||!n.ok?void 0:(await n.json())?.info?.version}catch{return}},q=(t,e)=>e?.pythonProjectDir?h(t.dir,e.pythonProjectDir):t.dir;class Ae extends N{id="python";async readPublishedVersion(e){const n=q(e.pkg,e.perPackageConfig),r=(await M(n).catch(()=>{}))?.project?.name??e.pkg.name.replace(/^@[^/]+\//,"");return K(r)}async publish(e){if(e.dryRun)return{output:`[dry-run / python] would publish ${e.pkg.name}@${e.release.newVersion}`,published:!0};const n=e.perPackageConfig??{},r=q(e.pkg,n),s=await M(r);if(s?.project?.dynamic?.includes("version"))throw new l({code:"CONFIG_INVALID",file:h(r,"pyproject.toml"),hint:"Dynamic versioning isn't supported by PythonVersionActions yet; use versionActions: 'shell' with your build backend's version-bump tool (e.g. `hatch version` or `poetry version` for non-vcs setups).",message:`${e.pkg.name}: pyproject.toml declares dynamic = ["version", ...]; PythonVersionActions requires a static [project] version.`,packageName:e.pkg.name});if(s?.project?.version&&s.project.version!==e.release.newVersion)throw new l({code:"BUMP_FILE_INVALID",file:h(r,"pyproject.toml"),hint:`Ensure the pyproject() preset is wired up for this package so the version literal in [project] is bumped before publish. Expected ${e.release.newVersion}, found ${s.project.version}.`,message:`${e.pkg.name}: pyproject.toml version ${s.project.version} differs from planned ${e.release.newVersion}.`,packageName:e.pkg.name});const a=s?.project?.name??e.pkg.name.replace(/^@[^/]+\//,"");if(await K(a,e.workspaceConfig?.httpProxy)===e.release.newVersion)return{alreadyPublished:!0,output:`[python] ${a}@${e.release.newVersion} already on PyPI`,published:!1};const i=await Ie(e.pm.runner,e.pkg.dir),o=Ce(s),c=Pe(o,i),d=Se(process.env,e.workspaceConfig);if(d==="missing")throw new l({code:"AUTH_MISSING",hint:["Set TWINE_PASSWORD to a PyPI API token (`TWINE_USERNAME=__token__` is injected automatically), OR","configure trusted publishing on PyPI and grant the workflow `permissions: id-token: write` so ACTIONS_ID_TOKEN_REQUEST_URL is exposed.","See https://docs.pypi.org/trusted-publishers/"].join(" "),message:`${e.pkg.name}: no PyPI credentials detected (neither TWINE_PASSWORD nor OIDC trusted-publishing env).`,packageName:e.pkg.name});const p=await e.pm.runner.run(c.buildCommand.binary,c.buildCommand.args,{cwd:r,silent:!1});if(p.exitCode!==0)throw new l({code:"PUBLISH_FAILED",hint:`Inspect the ${c.buildCommand.binary} ${c.buildCommand.args.join(" ")} output above. Common causes: missing ${c.backend==="uv"?"uv":"build/setuptools/wheel"} dependency, broken pyproject.toml, source files missing from \`include\`.`,message:`${e.pkg.name}: build failed (${c.buildCommand.binary} ${c.buildCommand.args.join(" ")}): exit ${p.exitCode}. stderr: ${p.stderr.trim().slice(0,500)}`,packageName:e.pkg.name});const m={...process.env};d==="token"&&!m.TWINE_USERNAME&&(m.TWINE_USERNAME="__token__");const y=await e.pm.runner.run(c.publishCommand.binary,c.publishCommand.args,{cwd:r,env:m,silent:!1});if(y.exitCode!==0)throw new l({code:"PUBLISH_FAILED",hint:`Inspect the ${c.publishCommand.binary} output above. Common causes: invalid API token, version already published (this should have been caught by readPublishedVersion — file a vis bug), 2FA required without a token.`,message:`${e.pkg.name}: publish failed (${c.publishCommand.binary} ${c.publishCommand.args.join(" ")}): exit ${y.exitCode}. stderr: ${y.stderr.trim().slice(0,500)}`,packageName:e.pkg.name});return{output:`[python/${c.backend}${c.hasUv?"+uv":""}] published ${a}@${e.release.newVersion}`,published:!0}}}const Bt=Object.defineProperty({__proto__:null,PYPI_PROJECT_URL:ve,PythonVersionActions:Ae,checkUvWorkspaceMembership:Ot,detectAuthMode:Se,detectBackend:Ce,detectUv:Ie,fetchPyPiVersion:K,readPyProject:M,resolveBuildEnv:Pe,resolveProjectDir:q,resolveUvLockPath:Vt},Symbol.toStringTag,{value:"Module"}),R=async(t,e,n,r)=>{const s=J(n,r),a=process.platform==="win32",i=a?"cmd":"sh",o=a?["/c",s]:["-c",s];return t.run(i,o,{cwd:e,silent:!1})};class Rt extends N{id="shell";async readPublishedVersion(e){const n=e.perPackageConfig??{},{workspaceConfig:r}=e;if(!r)return;const s=W(e.pkg.name,n,r);if(!s.checkPublished)return;const a=await R(e.pm.runner,e.pkg.dir,s.checkPublished,{name:e.pkg.name,version:e.pkg.version});if(a.exitCode!==0)return;const i=a.stdout.trim();return/\b\d+\.\d+\.\d+(?:[-+][\w.+-]+)?\b/.exec(i)?.[0]}async publish(e){if(e.dryRun)return{output:`[dry-run / shell] would publish ${e.pkg.name}@${e.release.newVersion}`,published:!0};const{workspaceConfig:n}=e,r=e.perPackageConfig??{};if(!n)throw new l({code:"CONFIG_INVALID",message:`Shell publish actions for ${e.pkg.name} require a workspace config (release.allowCustomCommands gate).`,packageName:e.pkg.name});const s=W(e.pkg.name,r,n);if(!s.publishCommand)throw new l({code:"CONFIG_INVALID",hint:`Set release.allowCustomCommands (workspace-wide boolean or an allow-list including "${e.pkg.name}") and configure release.packages["${e.pkg.name}"].publishCommand.`,message:`Shell publish actions for ${e.pkg.name} require a publishCommand AND the trust gate to permit it.`,packageName:e.pkg.name});const a={name:e.pkg.name,registry:e.registry,tag:e.tag,version:e.release.newVersion};if(s.checkPublished){const o=await R(e.pm.runner,e.pkg.dir,s.checkPublished,a);if(o.exitCode===0&&/\b\d+\.\d+\.\d+(?:[-+][\w.+-]+)?\b/.exec(o.stdout.trim())?.[0]===e.release.newVersion)return{alreadyPublished:!0,output:`[shell] ${e.pkg.name}@${e.release.newVersion} already on the registry`,published:!1}}if(s.buildCommand){const o=await R(e.pm.runner,e.pkg.dir,s.buildCommand,a);if(o.exitCode!==0)throw new l({code:"PUBLISH_FAILED",message:`buildCommand failed for ${e.pkg.name}: exit ${o.exitCode}. stderr: ${o.stderr.trim().slice(0,500)}`,packageName:e.pkg.name})}const i=Array.isArray(s.publishCommand)?s.publishCommand:[s.publishCommand];for(const o of i){const c=await R(e.pm.runner,e.pkg.dir,o,a);if(c.exitCode!==0)throw new l({code:"PUBLISH_FAILED",hint:"Inspect the publishCommand output above. Common causes: missing auth token, registry unreachable, version already published (re-run safe — `checkPublished` short-circuits subsequent runs).",message:`publishCommand failed for ${e.pkg.name}@${e.release.newVersion}: exit ${c.exitCode}. stderr: ${c.stderr.trim().slice(0,500)}`,packageName:e.pkg.name})}return{output:`[shell] published ${e.pkg.name}@${e.release.newVersion}`,published:!0}}}const Wt=t=>{switch(t){case"cargo":return new ot;case"container":return new ut;case"jsr":return new ht;case"maven":return new vt;case"native-addon":return new St;case"private":return new xt;case"python":return new Ae;case"shell":return new Rt;default:return new $e}};export{be as a,fe as b,Wt as c,Ge as d,Ut as e,Gt as f,Bt as g,qe as p,Y as r};
@@ -1 +0,0 @@
1
- import{b as o,a as d,p as h}from"../packem_chunks/orchestrator.js";const y=async(a={})=>{const e=await o(a),n=await d(e,{dryRun:a.dryRun});return{changedFiles:n.changedFiles,deletedFiles:n.deletedFiles,plan:n.plan}},w=async(a={})=>{const e=await o(a),{resolveFormatter:n}=await import("../packem_chunks/resolveFormatter.js"),t=await n(e.config.changelog,e.cwd),s=new Date().toISOString().slice(0,10),i=[];for(const r of e.plan.releases){const l=e.depGraph.getPackage(r.name);if(!l)continue;const c=await t({changeFiles:r.changeFiles,date:s,release:r,target:"changelog"});i.push({content:c,file:`${l.dir}/CHANGELOG.md`,package:r.name})}return{projectChangelogs:i}},F=async(a={})=>{const e=await o(a);return await h(e,{dryRun:a.dryRun,otp:a.otp,tag:a.tag})},m=async(a={})=>{const e=await o(a);let n=!1,t;const s=async()=>{if(t)return t;n=!0;const i=await d(e,{dryRun:a.dryRun});return t={changedFiles:i.changedFiles,deletedFiles:i.deletedFiles,plan:i.plan},t};return{apply:s,discard:()=>{n=!0},plan:e.plan,[Symbol.asyncDispose]:async()=>{n||await s()}}},R=async a=>{const e=await o(a),{runSnapshot:n}=await import("../packem_chunks/snapshot.js"),t=await n({context:e,dryRun:a.dryRun,registry:a.registry,tag:a.tag});return{failed:t.failed,published:t.published,skipped:t.skipped,snapshotVersion:t.snapshotVersion,tag:t.tag}},C=async(a={})=>{const e=await o(a),n=await d(e,{dryRun:a.dryRun}),t={changedFiles:n.changedFiles,deletedFiles:n.deletedFiles,plan:n.plan},{resolveFormatter:s}=await import("../packem_chunks/resolveFormatter.js"),i=await s(e.config.changelog,e.cwd),r=new Date().toISOString().slice(0,10),l=[];for(const g of n.plan.releases){const p=e.depGraph.getPackage(g.name);if(!p)continue;const f=await i({changeFiles:g.changeFiles,date:r,release:g,target:"changelog"});l.push({content:f,file:`${p.dir}/CHANGELOG.md`,package:g.name})}const c={projectChangelogs:l};if(a.skipPublish)return{changelog:c,publish:{failed:[],published:[],skipped:[]},version:t};const u=await h(e,{dryRun:a.dryRun,otp:void 0,tag:void 0});return{changelog:c,publish:u,version:t}};class k{constructor(e={}){this.config=e}config;releaseVersion(e={}){return y({...e,config:this.config})}releaseChangelog(e={}){return w({...e,config:this.config})}releasePublish(e={}){return F({...e,config:this.config})}releaseDraft(e={}){return m({...e,config:this.config})}releaseSnapshot(e){return R({...e,config:this.config})}}export{k as ReleaseClient,C as release,w as releaseChangelog,m as releaseDraft,F as releasePublish,R as releaseSnapshot,y as releaseVersion};
@@ -1 +0,0 @@
1
- var n=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function u(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function l(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var a=t.default;if(typeof a=="function"){var e=function o(){var r=!1;try{r=this instanceof o}catch{}return r?Reflect.construct(a,arguments,this.constructor):a.apply(this,arguments)};e.prototype=a.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(t).forEach(function(o){var r=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(e,o,r.get?r:{enumerable:!0,get:function(){return t[o]}})}),e}export{l as a,n as c,u as g};
@@ -1 +0,0 @@
1
- import{createRequire as R}from"node:module";import{K as M}from"./target-merge-DLxJTcxn.js";import{advisoriesQuery as j,advisoriesIngest as q,advisoriesStatus as _,NATIVE_BINDING_VERSION as f}from"#native";let D;const I=s=>(D??=R(import.meta.url))(s),l=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,c=s=>{if(typeof l<"u"&&l.versions&&l.versions.node){const[e,t]=l.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return l.getBuiltinModule(s)}return I(s)},{randomUUID:$}=c("node:crypto"),{existsSync:T,createWriteStream:O}=c("node:fs"),{mkdir:P,unlink:U,stat:k}=c("node:fs/promises"),{join:g,dirname:x}=c("node:path"),{Readable:C}=c("node:stream"),{pipeline:L}=c("node:stream/promises"),w=6;if(f!==w)throw new Error(`vis native binding ABI mismatch in advisories: expected ${w}, got ${f}. Rebuild via \`pnpm --filter @visulima/vis run build:native\` or reinstall the platform binding package.`);const J="https://osv-vulnerabilities.storage.googleapis.com",W=new Set(["osv-vulnerabilities.storage.googleapis.com"]);class B extends Error{cause="DB_NOT_FOUND";constructor(e){super(`No local advisory DB at ${e}. Run 'vis advisories sync' first.`),this.name="AdvisoryDbNotFoundError"}}class p extends Error{cause="SOURCE_NOT_ALLOWED";constructor(e){super(`Advisory source host '${e}' is not in the built-in allowlist. Add it to \`security.audit.advisories.allowedHosts\` if intentional.`),this.name="AdvisorySourceNotAllowedError"}}class A extends Error{cause="SYNC_NETWORK";constructor(e,t){super(`Advisory sync failed for ${e}: ${t}. Check connectivity, proxy env vars, or --source.`),this.name="AdvisorySyncNetworkError"}}const y=s=>{const e=M("vis",{create:!0,cwd:s})??g(s,"node_modules",".cache","vis");return g(e,"advisories","db.sqlite")},V=(s,e)=>{let t;try{t=new URL(s)}catch{throw new p(s)}if(t.protocol!=="https:")throw new p(`${t.protocol}//${t.host}`);if(!new Set([...W,...e??[]]).has(t.host))throw new p(t.host);return t},X=async s=>{const e=s.dbPath??y(s.workspaceRoot);await P(x(e),{recursive:!0});const t=V(s.source,s.allowedHosts),d=new URL(`${s.ecosystem}/all.zip`,z(t.toString())),u=await H(e,s.ecosystem);let r=null;if(!s.force){const i=await b(d,{method:"HEAD"});if(i.ok&&(r=i.headers.get("etag"),r&&u&&r===u))return{advisoriesIngested:0,dbPath:e,durationMs:0,upToDate:!0}}const n=`${e}.${s.ecosystem}.${process.pid}.${$()}.zip.tmp`,o=await b(d,{method:"GET"});if(!o.ok||!o.body)throw new A(d.toString(),o.status);r||(r=o.headers.get("etag"));const v=o.headers.get("content-length"),a=v?Number.parseInt(v,10):null;let m=0;const E=O(n),h=C.fromWeb(o.body);s.onProgress&&a&&h.on("data",i=>{m+=i.byteLength,s.onProgress?.(m,a,"download")}),await L(h,E);try{const i=await q({dbPath:e,ecosystem:s.ecosystem,manifestEtag:r??void 0,zipPath:n},(S,N)=>s.onProgress?.(S,N,"ingest"));return{advisoriesIngested:i.advisoriesIngested,dbPath:e,durationMs:i.durationMs,upToDate:!1}}finally{await U(n).catch(()=>{})}},Z=(s,e)=>{if(s.length===0)return new Map;const t=e.dbPath??y(e.workspaceRoot),d=e.ecosystem??"npm";if(!T(t))throw new B(t);const u=s.map(o=>({ecosystem:d,name:o.name,version:o.version})),r=j(t,u),n=new Map;for(const[o,v]of s.entries()){const a=r[o];!a||a.vulnerabilities.length===0||n.set(v.name,a.vulnerabilities.map(m=>F(m)))}return n},ss=async(s,e)=>{const t=e??y(s);return _(t)},H=async(s,e)=>{try{await k(s)}catch{return null}return _(s).ecosystems.find(t=>t.name===e)?.manifestEtag??null},F=s=>({aliases:s.aliases.length>0?s.aliases:void 0,cvssScore:s.cvssScore??void 0,fixedVersions:s.fixedVersions,id:s.id,severity:K(s.severity),summary:s.summary}),K=s=>{const e=s.toUpperCase();return e==="CRITICAL"||e==="HIGH"||e==="MODERATE"||e==="LOW"?e:"UNKNOWN"},z=s=>s.endsWith("/")?s:`${s}/`,b=async(s,e)=>{try{return await fetch(s,e)}catch(t){throw new A(s.toString(),t instanceof Error?t.message:String(t))}};export{B as A,J as D,ss as g,Z as q,y as r,X as s};
@@ -1 +0,0 @@
1
- import{createRequire as k}from"node:module";import{getAffectedProjects as P}from"@visulima/task-runner";import{I as S}from"./index-BWl4DbMp.js";import{a as w}from"./vis-user-error-CfM4_ORo.js";import{r as q}from"./affected-shas-BKEu4RZc.js";let y;const R=e=>(y??=k(import.meta.url))(e),p=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,C=e=>{if(typeof p<"u"&&p.versions&&p.versions.node){const[t,o]=p.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return p.getBuiltinModule(e)}return R(e)},{spawnSync:A}=C("node:child_process"),_=new Set(["deep","direct","none"]),B=e=>{const t=[],o=e.split("\0");for(let s=0;s<o.length;s++){const r=o[s];if(!r||r.length<4)continue;const f=r.slice(0,2),u=r.slice(3);if(u&&t.push(u),f.includes("R")||f.includes("C")){s+=1;const a=o[s];a&&t.push(a)}}return t},I=e=>{const t=A("git",["status","--porcelain","-z"],{cwd:e,encoding:"utf8"});return t.error||t.status!==0||typeof t.stdout!="string"?[]:B(t.stdout)},W=async(e,t,o={})=>{const s=e.downstream??"deep",r=e.upstream??"none";if(!_.has(s))throw new w(`Invalid --downstream value: "${s}". Must be "none", "direct", or "deep".`);if(!_.has(r))throw new w(`Invalid --upstream value: "${r}". Must be "none", "direct", or "deep".`);const{projectGraph:f,projects:u,workspaceRoot:a}=t,l=[];let{base:m}=e,{head:n}=e;if(!m||!n){const i=q({defaultBase:o.defaultBase,workspaceRoot:a});m=m||i.base,n=n||i.head,l.push(`Resolved affected refs from ${i.provider} (${i.notes.join("; ")})`)}const v=o.runningInCi??S,h=n==="HEAD"||n==="",b=e.uncommitted??(!v&&h);let d=[];if(b)if(h){const i=(o.readWorkingTreeChanges??I)(a),$=Object.values(u).map(c=>c.root?.replace(/\/$/,"")).filter(c=>!!c&&c!==".");d=i.filter(c=>$.some(j=>c===j||c.startsWith(`${j}/`)));const g=i.length-d.length;d.length>0&&l.push(`including ${d.length} uncommitted working-tree file(s)`),g>0&&l.push(`ignoring ${g} uncommitted path(s) outside any project (untracked scratch would otherwise mark every project affected)`)}else l.push(`ignoring --uncommitted: --head=${n} pins the comparison to a commit, not the working tree`);return{...await P({additionalChangedFiles:d,base:m,downstream:s,head:n,projectGraph:f,projects:u,upstream:r,workspaceRoot:a}),notes:l,uncommittedFileCount:d.length}};export{W as s};
@@ -1 +0,0 @@
1
- import{createRequire as l}from"node:module";import{l as h,z as b}from"./index-BLtnel38.js";let E;const d=e=>(E??=l(import.meta.url))(e),_=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,p=e=>{if(typeof _<"u"&&_.versions&&_.versions.node){const[s,r]=_.versions.node.split(".").map(Number);if(s>22||s===22&&r>=3||s===20&&r>=16)return _.getBuiltinModule(e)}return d(e)},{spawnSync:g}=p("node:child_process"),A="0000000000000000000000000000000000000000",I=e=>{if(h(e))try{const s=b(e);return JSON.parse(s)}catch{return}},f=(e,s)=>{const r=g("git",e,{cwd:s,encoding:"utf8"});if(!(r.error||typeof r.status!="number"||r.status!==0))return typeof r.stdout=="string"?r.stdout.trim():void 0},c=e=>typeof e=="string"&&e.length>0&&e!==A,R=(e,s,r)=>{const t=[],o=e.GITHUB_BASE_REF,i=e.GITHUB_SHA??"HEAD";if(o&&o.length>0)return t.push(`pull_request: $GITHUB_BASE_REF=${o}`),{base:`origin/${o}`,head:i,notes:t,provider:"github"};const a=e.GITHUB_EVENT_PATH,n=a?r(a):void 0;if(n){const u=typeof n.before=="string"?n.before:void 0;if(c(u))return t.push(`push: event.before=${u}`),{base:u,head:i,notes:t,provider:"github"}}return t.push(`fallback: origin/${s}`),{base:`origin/${s}`,head:i,notes:t,provider:"github"}},C=(e,s)=>{const r=[],t=e.CI_COMMIT_SHA??"HEAD";if(e.CI_PIPELINE_SOURCE==="merge_request_event"){const a=e.CI_MERGE_REQUEST_DIFF_BASE_SHA;if(c(a))return r.push(`merge_request: $CI_MERGE_REQUEST_DIFF_BASE_SHA=${a}`),{base:a,head:t,notes:r,provider:"gitlab"};const n=e.CI_MERGE_REQUEST_TARGET_BRANCH_NAME;if(n&&n.length>0)return r.push(`merge_request: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME=${n}`),{base:`origin/${n}`,head:t,notes:r,provider:"gitlab"}}const o=e.CI_COMMIT_BEFORE_SHA;if(c(o))return r.push(`push: $CI_COMMIT_BEFORE_SHA=${o}`),{base:o,head:t,notes:r,provider:"gitlab"};const i=e.CI_DEFAULT_BRANCH??s;return r.push(`fallback: origin/${i}`),{base:`origin/${i}`,head:t,notes:r,provider:"gitlab"}},T=(e,s)=>{const r=[],t=e.BUILDKITE_COMMIT??"HEAD",o=e.BUILDKITE_PULL_REQUEST_BASE_BRANCH;return o&&o.length>0?(r.push(`pull_request: $BUILDKITE_PULL_REQUEST_BASE_BRANCH=${o}`),{base:`origin/${o}`,head:t,notes:r,provider:"buildkite"}):(r.push(`fallback: origin/${s} (buildkite has no canonical previous-build SHA env)`),{base:`origin/${s}`,head:t,notes:r,provider:"buildkite"})},v=(e,s)=>{const r=[],t=e.CIRCLE_SHA1??"HEAD",o=e.CIRCLE_PR_BASE_BRANCH;return o&&o.length>0?(r.push(`pull_request: $CIRCLE_PR_BASE_BRANCH=${o}`),{base:`origin/${o}`,head:t,notes:r,provider:"circleci"}):(r.push(`fallback: origin/${s} (circleci has no canonical previous-build SHA env)`),{base:`origin/${s}`,head:t,notes:r,provider:"circleci"})},B=(e,s,r)=>{const t=[],o=s(["merge-base","HEAD",`origin/${e}`],r);return o&&o.length>0?(t.push(`local: git merge-base HEAD origin/${e}=${o}`),{base:o,head:"HEAD",notes:t,provider:"local"}):(t.push(`local fallback: origin/${e} (no merge-base available)`),{base:`origin/${e}`,head:"HEAD",notes:t,provider:"local"})},S=e=>{const s=e?.env??process.env,r=e?.defaultBase??"main",t=e?.readEventPayload??I,o=e?.runGit??f,i=e?.workspaceRoot??process.cwd();return s.GITHUB_ACTIONS==="true"?R(s,r,t):s.GITLAB_CI==="true"?C(s,r):s.BUILDKITE==="true"?T(s,r):s.CIRCLECI==="true"?v(s,r):B(r,o,i)};export{S as r};