@visulima/vis 7.1.0-next.5 → 7.1.0-next.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. package/CHANGELOG.md +80 -0
  2. package/README.md +1 -1
  3. package/bin/route.mjs +154 -27
  4. package/dist/bin.js +1 -1
  5. package/dist/binx.js +1 -1
  6. package/dist/config/index.d.ts +227 -12
  7. package/dist/packem_chunks/CONFIG_FILES.js +1 -1
  8. package/dist/packem_chunks/bloom-sync.js +1 -1
  9. package/dist/packem_chunks/catalog.js +1 -1
  10. package/dist/packem_chunks/cli-exec.js +1 -1
  11. package/dist/packem_chunks/cli-main.js +57 -57
  12. package/dist/packem_chunks/detect.js +4 -4
  13. package/dist/packem_chunks/dispatch.js +1 -1
  14. package/dist/packem_chunks/fix.js +1 -1
  15. package/dist/packem_chunks/handler.js +1 -1
  16. package/dist/packem_chunks/handler10.js +1 -1
  17. package/dist/packem_chunks/handler11.js +1 -1
  18. package/dist/packem_chunks/handler12.js +1 -1
  19. package/dist/packem_chunks/handler13.js +1 -1
  20. package/dist/packem_chunks/handler14.js +1 -1
  21. package/dist/packem_chunks/handler15.js +1 -1
  22. package/dist/packem_chunks/handler16.js +1 -1
  23. package/dist/packem_chunks/handler17.js +1 -1
  24. package/dist/packem_chunks/handler18.js +1 -1
  25. package/dist/packem_chunks/handler19.js +1 -1
  26. package/dist/packem_chunks/handler2.js +1 -1
  27. package/dist/packem_chunks/handler20.js +1 -1
  28. package/dist/packem_chunks/handler21.js +1 -1
  29. package/dist/packem_chunks/handler22.js +1 -1
  30. package/dist/packem_chunks/handler23.js +1 -1
  31. package/dist/packem_chunks/handler24.js +1 -1
  32. package/dist/packem_chunks/handler25.js +1 -1
  33. package/dist/packem_chunks/handler26.js +1 -1
  34. package/dist/packem_chunks/handler27.js +1 -1
  35. package/dist/packem_chunks/handler28.js +1 -1
  36. package/dist/packem_chunks/handler29.js +1 -1
  37. package/dist/packem_chunks/handler3.js +2 -2
  38. package/dist/packem_chunks/handler30.js +1 -1
  39. package/dist/packem_chunks/handler32.js +1 -1
  40. package/dist/packem_chunks/handler4.js +1 -1
  41. package/dist/packem_chunks/handler46.js +1 -1
  42. package/dist/packem_chunks/handler5.js +1 -1
  43. package/dist/packem_chunks/handler50.js +1 -1
  44. package/dist/packem_chunks/handler51.js +1 -1
  45. package/dist/packem_chunks/handler52.js +1 -1
  46. package/dist/packem_chunks/handler53.js +1 -1
  47. package/dist/packem_chunks/handler54.js +1 -1
  48. package/dist/packem_chunks/handler55.js +1 -1
  49. package/dist/packem_chunks/handler56.js +1 -1
  50. package/dist/packem_chunks/handler58.js +1 -1
  51. package/dist/packem_chunks/handler59.js +1 -1
  52. package/dist/packem_chunks/handler6.js +1 -1
  53. package/dist/packem_chunks/handler60.js +1 -1
  54. package/dist/packem_chunks/handler61.js +22 -3
  55. package/dist/packem_chunks/handler62.js +2 -22
  56. package/dist/packem_chunks/handler63.js +6 -2
  57. package/dist/packem_chunks/handler64.js +8 -61
  58. package/dist/packem_chunks/handler65.js +2 -6
  59. package/dist/packem_chunks/handler66.js +12 -8
  60. package/dist/packem_chunks/handler67.js +5 -2
  61. package/dist/packem_chunks/handler68.js +25 -12
  62. package/dist/packem_chunks/handler69.js +50 -25
  63. package/dist/packem_chunks/handler7.js +1 -1
  64. package/dist/packem_chunks/handler70.js +153 -50
  65. package/dist/packem_chunks/handler71.js +1 -1
  66. package/dist/packem_chunks/handler72.js +1 -1
  67. package/dist/packem_chunks/handler73.js +1 -1
  68. package/dist/packem_chunks/handler74.js +1 -1
  69. package/dist/packem_chunks/handler75.js +1 -1
  70. package/dist/packem_chunks/handler76.js +1 -1
  71. package/dist/packem_chunks/handler77.js +1 -1
  72. package/dist/packem_chunks/handler78.js +1 -1
  73. package/dist/packem_chunks/handler79.js +64 -64
  74. package/dist/packem_chunks/handler8.js +1 -1
  75. package/dist/packem_chunks/handler9.js +1 -1
  76. package/dist/packem_chunks/heal-accept.js +1 -1
  77. package/dist/packem_chunks/heal.js +1 -1
  78. package/dist/packem_chunks/help-command.js +1 -1
  79. package/dist/packem_chunks/index7.js +1 -1
  80. package/dist/packem_chunks/keys-refresh.js +1 -1
  81. package/dist/packem_chunks/lean.js +1 -1
  82. package/dist/packem_chunks/list.js +1 -1
  83. package/dist/packem_chunks/loader.js +1 -1
  84. package/dist/packem_chunks/prune.js +1 -1
  85. package/dist/packem_chunks/status.js +1 -1
  86. package/dist/packem_chunks/sync.js +1 -1
  87. package/dist/packem_chunks/sync2.js +1 -1
  88. package/dist/packem_chunks/tripwire.js +1 -1
  89. package/dist/packem_chunks/ts-loader.js +2 -2
  90. package/dist/packem_chunks/verify-lockfile.js +1 -1
  91. package/dist/packem_chunks/workflow-templates.js +29 -32
  92. package/dist/packem_shared/{ReleaseClient-C2xIJ6LK.js → ReleaseClient-CqGLb7S4.js} +1 -1
  93. package/dist/packem_shared/{advisories-DoJg1aO9.js → advisories-CyXUdibZ.js} +1 -1
  94. package/dist/packem_shared/{affected-selection-vthRDY8k.js → affected-selection-CJnDzyIK.js} +1 -1
  95. package/dist/packem_shared/affected-shas-CJLirD2O.js +1 -0
  96. package/dist/packem_shared/{ai-analysis-BQXQSrpM.js → ai-analysis-DHlzow2O.js} +1 -1
  97. package/dist/packem_shared/{ai-cache-_pgEsibl.js → ai-cache-D-BSLcuJ.js} +1 -1
  98. package/dist/packem_shared/{ai-fix-Bc5SFN7s.js → ai-fix-CyExJC_c.js} +1 -1
  99. package/dist/packem_shared/{augment-BSeqaai8.js → augment-Ub6PCwbh.js} +1 -1
  100. package/dist/packem_shared/{bin-N12LFeEP.js → bin-BaReRSyo.js} +1 -1
  101. package/dist/packem_shared/{build-scripts-Dff0s5AH.js → build-scripts-BeJkep8z.js} +1 -1
  102. package/dist/packem_shared/ci-commands-4W9d2six.js +1 -0
  103. package/dist/packem_shared/{command-runtime-DG49t2MT.js → command-runtime-DdnpiUmN.js} +1 -1
  104. package/dist/packem_shared/{dependency-scan-DheQqeil.js → dependency-scan-CyByCwef.js} +1 -1
  105. package/dist/packem_shared/{detect-CknQIlyA.js → detect-xqoTANJb.js} +1 -1
  106. package/dist/packem_shared/{docker-w_1gOq50.js → docker-CJXAt5Au.js} +1 -1
  107. package/dist/packem_shared/{ecosystem-gate-BKRW_EF3.js → ecosystem-gate-DEnubRcS.js} +1 -1
  108. package/dist/packem_shared/{env-CGTN0BFz.js → env-NauRSSEC.js} +1 -1
  109. package/dist/packem_shared/{env-consistency-2UlhhMn5.js → env-consistency-Cl1Rg65z.js} +1 -1
  110. package/dist/packem_shared/{failure-log-DwZ4pNmp.js → failure-log-DwroazKs.js} +1 -1
  111. package/dist/packem_shared/glob-Cyk1H9ZL-BtN6Zzwg.js +1 -0
  112. package/dist/packem_shared/{index-CypvJE1G.js → index-BCEhCrLl.js} +1 -1
  113. package/dist/packem_shared/{index-DGll9r9W.js → index-OmE1O0Ys.js} +1 -1
  114. package/dist/packem_shared/{index-0dnGN3GP.js → index-zq6Ehql6.js} +1 -1
  115. package/dist/packem_shared/{isAccessibleSync-DYKTrrvc-CBsMZhj-.js → isAccessibleSync-DYKTrrvc-CKahNmLy.js} +1 -1
  116. package/dist/packem_shared/{lifecycle-B2m1OncV.js → lifecycle-Cn1mSP5f.js} +1 -1
  117. package/dist/packem_shared/{lockfile-DEWjBrlY.js → lockfile-Cx2Ny3um.js} +1 -1
  118. package/dist/packem_shared/{manifests-hpWznbs9.js → manifests-BEGTH1ZG.js} +1 -1
  119. package/dist/packem_shared/{min-release-age-Dy7mkYsY.js → min-release-age-DLAERxRt.js} +1 -1
  120. package/dist/packem_shared/{missing-package-json-SDyf6fjC.js → missing-package-json-w74qGfyh.js} +1 -1
  121. package/dist/packem_shared/{multi-eco-lockfiles-DDjCxn43.js → multi-eco-lockfiles-SATPXx6-.js} +1 -1
  122. package/dist/packem_shared/{native-config-sync-DlljvZ64.js → native-config-sync-DDFn6Zsf.js} +1 -1
  123. package/dist/packem_shared/{npmrc-CIvOb61L.js → npmrc-DONprxrc.js} +1 -1
  124. package/dist/packem_shared/{osv-C4Vn7VCy.js → osv-dvIA_vX3.js} +1 -1
  125. package/dist/packem_shared/{package-version-DteJxz6k.js → package-version-BOK3IncQ.js} +2 -2
  126. package/dist/packem_shared/{packument-BHB4BqzR.js → packument-B678kHJO.js} +1 -1
  127. package/dist/packem_shared/{pm-runner-BXRi4ZM9.js → pm-runner-CYsiSHYa.js} +1 -1
  128. package/dist/packem_shared/{project-name-filter-yTiFERfc.js → project-name-filter-CBEoY08a.js} +1 -1
  129. package/dist/packem_shared/{provenance-BLycrdW2.js → provenance-D4ioWGBq.js} +1 -1
  130. package/dist/packem_shared/publish-missing-DgPXeH9w.js +38 -0
  131. package/dist/packem_shared/reachable-DX8FPErP.js +1 -0
  132. package/dist/packem_shared/{registry-48vkYPJB.js → registry-ClmannRw.js} +2 -2
  133. package/dist/packem_shared/{registry-keys-DdqAOng1.js → registry-keys-CF45rOur.js} +1 -1
  134. package/dist/packem_shared/{removeSync-g1D5kONg-jOsRSIIv.js → removeSync-g1D5kONg-DcG75b0G.js} +1 -1
  135. package/dist/packem_shared/{renderToString-DR0zDUjh-AcCpRdMt.js → renderToString-DR0zDUjh-CBDmAXxb.js} +1 -1
  136. package/dist/packem_shared/{resolve-explicit-BbIYCI43.js → resolve-explicit-C5-y-xEU.js} +1 -1
  137. package/dist/packem_shared/{resolve-runtime-D8rxuo3J.js → resolve-runtime-DBDozrmt.js} +1 -1
  138. package/dist/packem_shared/{run-file-D1mlOnd8.js → run-file-BKXvoVj2.js} +1 -1
  139. package/dist/packem_shared/{run-summary-utils-BIFZ0_Qf.js → run-summary-utils-75paIrLB.js} +1 -1
  140. package/dist/packem_shared/{runtime-check-B2u8WTUY.js → runtime-check-Yl8-Awkf.js} +1 -1
  141. package/dist/packem_shared/{s1ngularity-CTb560h1.js → s1ngularity-B2bqwE0C.js} +1 -1
  142. package/dist/packem_shared/{scaffold-files-CnWTGzav.js → scaffold-files-UiCBBCT5.js} +1 -1
  143. package/dist/packem_shared/{scan-progress-BEB4T6jo.js → scan-progress-Dws7Gif1.js} +1 -1
  144. package/dist/packem_shared/{selectors-DFzKNlk8.js → selectors-DZ4HDnlD.js} +1 -1
  145. package/dist/packem_shared/{signatures-CoRC1HW7.js → signatures-DNqgsRp7.js} +1 -1
  146. package/dist/packem_shared/{spinner-uH0pr4ln.js → spinner-BQ9mLz8X.js} +1 -1
  147. package/dist/packem_shared/{table-DL8yVcm3.js → table-D1CpySxU.js} +1 -1
  148. package/dist/packem_shared/{tabs-C1RRtWUi.js → tabs-BYtpIN5b.js} +1 -1
  149. package/dist/packem_shared/{target-options-rIthWS4M.js → target-options-CsevVc7U.js} +1 -1
  150. package/dist/packem_shared/{task-env-Cl4jNMCR.js → task-env-BftNOR00.js} +1 -1
  151. package/dist/packem_shared/{toolchain-BdYvWNPz.js → toolchain-BvluBdrw.js} +1 -1
  152. package/dist/packem_shared/{typosquats-D0yqKvP6.js → typosquats-XrArH9TO.js} +1 -1
  153. package/dist/packem_shared/{use-measured-height-Cq0aFDqE.js → use-measured-height-hHis1NaB.js} +1 -1
  154. package/dist/packem_shared/{verify-3WE9U_Bv.js → verify-Dic2G0nQ.js} +1 -1
  155. package/dist/packem_shared/{vis-update-app-B0FW7Sl_.js → vis-update-app-BNnbDZ--.js} +1 -1
  156. package/dist/packem_shared/{vis-user-error-Bdcaov20.js → vis-user-error-DhgW3DzD.js} +2 -2
  157. package/dist/packem_shared/{watch-C-9-PD2m.js → watch-BLHtUgfb.js} +1 -1
  158. package/dist/packem_shared/{watch-loop-B2vH6Ae0.js → watch-loop-Dh4GHUVS.js} +7 -7
  159. package/dist/release/index.js +1 -1
  160. package/dist/runtime/preload.js +1 -1
  161. package/index.d.ts +204 -213
  162. package/index.js +54 -54
  163. package/package.json +11 -10
  164. package/schemas/vis-config.schema.json +1419 -80
  165. package/dist/packem_shared/affected-shas-CycHU3nr.js +0 -1
  166. package/dist/packem_shared/glob-Cyk1H9ZL-DV-XWFct.js +0 -1
  167. package/dist/packem_shared/publish-missing-CZK1BpWt.js +0 -38
package/CHANGELOG.md CHANGED
@@ -1,3 +1,83 @@
1
+ ## @visulima/vis [7.1.0-next.7](https://github.com/visulima/vis/compare/@visulima/vis@7.1.0-next.6...@visulima/vis@7.1.0-next.7) (2026-11-22)
2
+
3
+ ### Features
4
+
5
+ * **vis:** detect the CI provider for `vis sync ci-workflow` ([10a08e1](https://github.com/visulima/vis/commit/10a08e1f23c5344a3e41e1031d0a29e4699e7587))
6
+ * **vis:** format with a bundled oxfmt and a config fallback chain ([#162](https://github.com/visulima/vis/issues/162)) ([17e607c](https://github.com/visulima/vis/commit/17e607cf49fe13abad53c092ba95d836341d70d8))
7
+ * **vis:** generate CI workflows that run targets as parallel steps ([88cdbea](https://github.com/visulima/vis/commit/88cdbea0303c11246e5cf948a0880fd7fee44245))
8
+ * **vis:** harden generated CI workflows and support non-JS toolchains ([4a486f6](https://github.com/visulima/vis/commit/4a486f664ed9dbe1eb74e310f25796dc049f2a5f))
9
+ * **vis:** keep the fmt config in the vis cache when it has no globs ([#165](https://github.com/visulima/vis/issues/165)) ([3a4d727](https://github.com/visulima/vis/commit/3a4d727afcfaa3e33e476cfe60bc0f6e18b0c8bd))
10
+ * **vis:** let a workflow target carry a project query ([1e55891](https://github.com/visulima/vis/commit/1e558915a6133787239a9f020cf376cb7afb89ca))
11
+ * **vis:** run the generated GitHub workflow in a merge queue ([fa53fe3](https://github.com/visulima/vis/commit/fa53fe37e5e0f30fec375bfccbca69d1b765cfda))
12
+ * **vis:** typed extension points for the generated CI workflow ([2661053](https://github.com/visulima/vis/commit/26610534019a171a112f60ac40f6dc6fbd0d9f47))
13
+
14
+ ### Bug Fixes
15
+
16
+ * **vis:** address review feedback on the ci-workflow generator ([3d17402](https://github.com/visulima/vis/commit/3d174020f7ea4261970442e8b7d0e4d8790d4a9d))
17
+ * **vis:** check the workflow drift against the providers it was generated for ([dec7e60](https://github.com/visulima/vis/commit/dec7e60bb0ffd2508b5008b6bdee43a8547f1365))
18
+ * **vis:** drop `--skip-toolchain` from the `vis ci` parallel-step example ([f2786f8](https://github.com/visulima/vis/commit/f2786f8184ad27fa9fd871907b18853841a95301))
19
+ * **vis:** give each non-PR CI run its own concurrency group ([f2a1995](https://github.com/visulima/vis/commit/f2a19958e73aad2d3fbbb6f1c02aed0f3e84f945))
20
+ * **vis:** install the aube executable in generated CI workflows ([ed58e59](https://github.com/visulima/vis/commit/ed58e592f9c137ae8d7afc13484bd50e83653f77))
21
+ * **vis:** keep a dependency's services and drop finalizers from `vis run --deps-only` ([4fbec78](https://github.com/visulima/vis/commit/4fbec78eb47de0f57342fe2bc98825b159e0e91c))
22
+ * **vis:** let the generated GitLab jobs use the including pipeline's stage, and refuse values GitLab rejects ([5cad57e](https://github.com/visulima/vis/commit/5cad57e6d283efbd16df05a1b2385b68e14280d8))
23
+ * **vis:** pin .NET from a project's global.json in the generated GitHub workflow ([8644b87](https://github.com/visulima/vis/commit/8644b87f2f89dc24990227f506bfb1c5bd3add7e))
24
+ * **vis:** refuse a workflow partition whose target reaches itself through another target ([d7b41ad](https://github.com/visulima/vis/commit/d7b41ad59cad27f7ed71ed74d4fbafbf8d849cd7))
25
+ * **vis:** reject a GitLab cache directory that climbs out of the project through an inner `..` ([a856f4e](https://github.com/visulima/vis/commit/a856f4e9f1b256fd1bb6e23ac230e7cdb10f3e1b))
26
+ * **vis:** run a dependency's finally-task once, after the dependencies ([6e7ac42](https://github.com/visulima/vis/commit/6e7ac42a1b9ee528df9123e113b144dec873a1fa))
27
+
28
+ ### Performance Improvements
29
+
30
+ * **vis:** do not re-exec Node with a larger heap for vis fmt ([e69f91b](https://github.com/visulima/vis/commit/e69f91b61023e4c1e605d0fb8651f1fb066abc33))
31
+
32
+ ### Reverts
33
+
34
+ * drop the per-target project query from the CI workflow generator ([4c8a2be](https://github.com/visulima/vis/commit/4c8a2be7d69898aae22f760ccf9e8d59c2c73d30))
35
+
36
+ ### Documentation
37
+
38
+ * **vis:** describe the drift check's `--provider` flag ([08baa36](https://github.com/visulima/vis/commit/08baa3685dc941f76b4104af58ae6aea6794e40f))
39
+
40
+ ### Miscellaneous Chores
41
+
42
+ * **vis:** regenerate the command manifest for the dependency-scope flags ([8f84bbd](https://github.com/visulima/vis/commit/8f84bbd89bfde24984fc72a028df6b76af48f7fb))
43
+
44
+ ### Code Refactoring
45
+
46
+ * **vis:** drop redundant parentheses in the YAML list renderer ([c126d40](https://github.com/visulima/vis/commit/c126d40f59015bfbbd7c81c53b480e332b114a33))
47
+ * **vis:** drop unused ci-workflow exports ([99ec322](https://github.com/visulima/vis/commit/99ec322cbeec7b8bf0ec48bc9aec7f80fd3f5740))
48
+ * **vis:** replace an identity map with a type guard ([ea66017](https://github.com/visulima/vis/commit/ea66017674594a4c0a8c66f56684361191e140e1))
49
+
50
+ ### Tests
51
+
52
+ * **vis:** add a formatter benchmark of vis fmt, the bundled oxfmt and bun fmt ([#166](https://github.com/visulima/vis/issues/166)) ([002c9aa](https://github.com/visulima/vis/commit/002c9aabb684990fb67b34c61c2398b257488923))
53
+ * **vis:** write the GitLab limit test's layer helper with a block body ([7eb69f1](https://github.com/visulima/vis/commit/7eb69f1e4b09df25b2eb360debed031d4266df4b))
54
+
55
+
56
+ ### Dependencies
57
+
58
+ * **@visulima/task-runner:** upgraded to 3.1.0-next.1
59
+
60
+ ## @visulima/vis [7.1.0-next.6](https://github.com/visulima/vis/compare/@visulima/vis@7.1.0-next.5...@visulima/vis@7.1.0-next.6) (2026-11-22)
61
+
62
+ ### Features
63
+
64
+ * **vis:** answer `affected --sparse-checkout` natively ([#155](https://github.com/visulima/vis/issues/155)) ([54d0fc7](https://github.com/visulima/vis/commit/54d0fc7d097f118d3299f29091087144f304823b))
65
+ * **vis:** answer the working-tree vis secrets scan natively ([#159](https://github.com/visulima/vis/issues/159)) ([c1ed22c](https://github.com/visulima/vis/commit/c1ed22cce1c80c65836c66abc4efed9ba4af10b4))
66
+ * **vis:** answer vis cache hash natively from the recorded run summary ([#156](https://github.com/visulima/vis/issues/156)) ([22b9a4c](https://github.com/visulima/vis/commit/22b9a4c958b6d687c8ca8d27bc5cf2f2157df0fb))
67
+
68
+ ### Bug Fixes
69
+
70
+ * **vis:** publish the manifest the version step wrote ([#160](https://github.com/visulima/vis/issues/160)) ([0cca730](https://github.com/visulima/vis/commit/0cca730e29fd66ad63af358d1d4939b343305348))
71
+
72
+ ### Code Refactoring
73
+
74
+ * **vis:** pull the always-native launcher cases into a helper ([#161](https://github.com/visulima/vis/issues/161)) ([f5916eb](https://github.com/visulima/vis/commit/f5916eb1b88dcbab5e09ad6335866464f4119fb9))
75
+
76
+ ### Tests
77
+
78
+ * **vis:** keep the runner's colour variables out of the secrets parity environment ([#163](https://github.com/visulima/vis/issues/163)) ([1bb0bb3](https://github.com/visulima/vis/commit/1bb0bb3b27c58a4fd4270287e81f2d63d80a8be7))
79
+ * **vis:** set the minute-aged cache entry's age again before each parity pair ([#164](https://github.com/visulima/vis/issues/164)) ([88ef067](https://github.com/visulima/vis/commit/88ef067f7ded3929f651b921aa952e60e298a868))
80
+
1
81
  ## @visulima/vis [7.1.0-next.5](https://github.com/visulima/vis/compare/@visulima/vis@7.1.0-next.4...@visulima/vis@7.1.0-next.5) (2026-11-22)
2
82
 
3
83
  ### Features
package/README.md CHANGED
@@ -263,7 +263,7 @@ When aube is the installer, `vis doctor` surfaces aube's effective hardening pos
263
263
  | `vis secrets [paths]` | | Scan for hardcoded secrets / credentials (Rust-native) |
264
264
  | `vis toolchain <cmd>` | | Inspect / delegate to the version manager (proto, mise, fnm, volta…) |
265
265
  | `vis lint [files]` | | Orchestrate detected source-code linters (oxlint, biome, eslint, stylelint) |
266
- | `vis fmt [files]` | | Orchestrate detected formatters (oxfmt, biome, dprint, prettier) |
266
+ | `vis fmt [files]` | | Format with the bundled oxfmt, or run the detected formatters (biome, dprint, ruff) |
267
267
  | `vis staged` | | Run tasks on staged files (built-in `lint-staged` replacement) |
268
268
  | `vis migrate <type>` | | Migrate from other tools — now including `gitleaks` and `secretlint` |
269
269
 
package/bin/route.mjs CHANGED
@@ -96,6 +96,19 @@ const plainTerm = (environment) => {
96
96
  return term === undefined || term.includes("dumb") || term.includes("mono");
97
97
  };
98
98
 
99
+ // Whether the launcher's root search ends at `cwd`, so a binary that computes the root from the working
100
+ // directory finds the same one as Node. The inherited `VIS_MONOREPO_ROOT` is only a reason to delegate,
101
+ // never the root itself.
102
+ const cwdIsRoot = (environment, cwd, holdsMarker) => {
103
+ const inheritedRoot = environment.VIS_MONOREPO_ROOT;
104
+
105
+ if (inheritedRoot && inheritedRoot !== cwd) {
106
+ return false;
107
+ }
108
+
109
+ return rootIsCwd(cwd, holdsMarker);
110
+ };
111
+
99
112
  // Whether `vis ignore` can pass the binary's native gate (`native_context` in `ignore.rs`). The
100
113
  // binary re-checks everything; this only skips the extra process when it would delegate anyway.
101
114
  // It never answers `ignore` on Windows (Node's colour detection and path handling differ there).
@@ -108,14 +121,7 @@ const ignoreMayRunNatively = (platform, environment, cwd, interactive, holdsMark
108
121
  return false;
109
122
  }
110
123
 
111
- // The inherited variable is only a reason to delegate, never the root itself.
112
- const inheritedRoot = environment.VIS_MONOREPO_ROOT;
113
-
114
- if (inheritedRoot && inheritedRoot !== cwd) {
115
- return false;
116
- }
117
-
118
- if (!rootIsCwd(cwd, holdsMarker)) {
124
+ if (!cwdIsRoot(environment, cwd, holdsMarker)) {
119
125
  return false;
120
126
  }
121
127
 
@@ -161,10 +167,123 @@ const listMayRunNatively = (platform, environment, args, interactive) => {
161
167
  return LIST_NATIVE_SHAPES.some((shape) => shape.length === flags.length && shape.every((flag, index) => flags[index] === flag));
162
168
  };
163
169
 
170
+ // Whether `vis cache hash` can pass the binary's native gate (`native` in `cache_hash.rs`). The
171
+ // binary re-checks the context and every shape (one task id, `--format json|table`, `--run <id>`),
172
+ // so this only skips the extra process for a call that would be delegated anyway: no task id, a
173
+ // flag the binary does not know, or a table in a context where Node may colour it (the binary does
174
+ // not; the JSON is written raw, so colour does not matter there). It stays in Node on Windows
175
+ // (pail's clock is unix-only there).
176
+ const CACHE_HASH_FLAG = /^--(?:format|run)(?:=.*)?$/;
177
+
178
+ const cacheHashAsksForJson = (flags) => flags.includes("--format=json") || flags.some((flag, index) => flag === "--format" && flags[index + 1] === "json");
179
+
180
+ const cacheHashMayRunNatively = (platform, environment, args, interactive) => {
181
+ const flags = args.slice(2);
182
+
183
+ if (platform === "win32" || interactive || !inCi(environment) || flags.length === 0 || !flags.every((token) => !token.startsWith("-") || CACHE_HASH_FLAG.test(token))) {
184
+ return false;
185
+ }
186
+
187
+ return cacheHashAsksForJson(flags) || (!IGNORE_COLOUR_ENVIRONMENT.some((key) => environment[key] !== undefined) && plainTerm(environment));
188
+ };
189
+
190
+ const CACHE_NATIVE_SUBCOMMANDS = new Set(["hash", "list", "size"]);
191
+
164
192
  // Whether `vis cache list|size` can pass the binary's native gate (`answer` in `cache.rs`). The binary
165
193
  // re-checks everything, including the flags, the root and the config; this only skips the extra process
166
- // when it would delegate anyway: not on Windows, not in a terminal, and only in a CI context.
167
- const cacheMayRunNatively = (platform, environment, interactive) => platform !== "win32" && !interactive && inCi(environment);
194
+ // when it would delegate anyway: not on Windows, not in a terminal, and only in a CI context. `hash` has
195
+ // its own, stricter gate above.
196
+ const cacheMayRunNatively = (subcommand, platform, environment, args, interactive) => {
197
+ if (subcommand === "hash") {
198
+ return cacheHashMayRunNatively(platform, environment, args, interactive);
199
+ }
200
+
201
+ return platform !== "win32" && !interactive && inCi(environment);
202
+ };
203
+
204
+ // Whether `vis affected` can pass the binary's native gate (`answer` in `affected.rs`). Only the
205
+ // `--sparse-checkout` shape is native, in a CI context; every other shape forwards to `vis run
206
+ // --affected`, which the binary hands to Node itself. The binary re-checks everything, so this only
207
+ // skips the extra process when it would delegate anyway.
208
+ const affectedMayRunNatively = (platform, environment, args, interactive) =>
209
+ platform !== "win32" && !interactive && inCi(environment) && args.includes("--sparse-checkout");
210
+
211
+ // The value of a `--name value` or `--name=value` option at `args[index]`, as `[value, next index]`:
212
+ // `undefined` when the argument is not that option, `false` when its value is missing or looks like a flag.
213
+ const optionValue = (args, index, name) => {
214
+ if (args[index] === name) {
215
+ const value = args[index + 1];
216
+
217
+ return value === undefined || value === "" || value.startsWith("-") ? false : [value, index + 2];
218
+ }
219
+
220
+ if (args[index].startsWith(`${name}=`)) {
221
+ const value = args[index].slice(name.length + 1);
222
+
223
+ return value === "" || value.startsWith("-") ? false : [value, index + 1];
224
+ }
225
+
226
+ return undefined;
227
+ };
228
+
229
+ // Whether `vis secrets` can pass the binary's native gate (`parse` and `context` in `secrets.rs`): the
230
+ // working-tree scan with `--format json|sarif|text`, `--quiet` and `--baseline <file>`, each at most once,
231
+ // and the text view only with `--quiet`. The binary re-checks everything, including the workspace root
232
+ // and the ignore and config files; this only skips the extra process when it would delegate anyway. Like
233
+ // `ignore`, it stays in Node when the working directory is not the workspace root. Like `clean`, it never
234
+ // answers on Windows or on a terminal, and not where Node's colour, `NODE_ENV`, `DEBUG`, `PAIL_LOG_LEVEL`
235
+ // or `CEREBRO_*` output settings could change what the status lines look like.
236
+ const secretsMayRunNatively = (platform, environment, args, cwd, interactive, holdsMarker) => {
237
+ if (platform === "win32" || interactive || !inCi(environment) || !cwdIsRoot(environment, cwd, holdsMarker) || IGNORE_COLOUR_ENVIRONMENT.some((key) => environment[key] !== undefined) || !plainTerm(environment)) {
238
+ return false;
239
+ }
240
+
241
+ if (
242
+ ["debug", "test"].includes(environment.NODE_ENV)
243
+ || environment.DEBUG !== undefined
244
+ || environment.PAIL_LOG_LEVEL !== undefined
245
+ || Object.keys(environment).some((key) => key.startsWith("CEREBRO_"))
246
+ ) {
247
+ return false;
248
+ }
249
+
250
+ let format;
251
+ let quiet = false;
252
+ let baseline = false;
253
+ let index = 1;
254
+
255
+ while (index < args.length) {
256
+ if (args[index] === "--quiet" && !quiet) {
257
+ quiet = true;
258
+ index += 1;
259
+
260
+ continue;
261
+ }
262
+
263
+ const given = optionValue(args, index, "--format");
264
+
265
+ if (given === false || (given !== undefined && (format !== undefined || !["json", "sarif", "text"].includes(given[0])))) {
266
+ return false;
267
+ }
268
+
269
+ if (given !== undefined) {
270
+ [format, index] = given;
271
+
272
+ continue;
273
+ }
274
+
275
+ const base = optionValue(args, index, "--baseline");
276
+
277
+ if (!Array.isArray(base) || baseline) {
278
+ return false;
279
+ }
280
+
281
+ baseline = true;
282
+ [, index] = base;
283
+ }
284
+
285
+ return (format ?? "text") !== "text" || quiet;
286
+ };
168
287
 
169
288
  // Commands with a native gate answer help through the binary on every platform (it enables
170
289
  // virtual-terminal processing on a Windows console), and otherwise follow the gate.
@@ -177,24 +296,20 @@ const helpOrNative = (args, mayRunNatively) => {
177
296
  return mayRunNatively();
178
297
  };
179
298
 
299
+ // Commands whose routing needs no flag check here, because the binary decides every shape itself: the
300
+ // native command set, `hook run` (the other `hook` subcommands - install, migrate, ... - are not native,
301
+ // so routing them through the binary would only add a second Node boot) and `advisories bloom status`.
302
+ // The binary answers that one natively only for `--format json --cache-dir <dir>` and hands every other
303
+ // shape to Node, as it does for `hook run`; the launcher does not check those flags.
304
+ const alwaysNative = (command, subcommand, args) =>
305
+ NATIVE_COMMANDS.has(command) || (command === "hook" && subcommand === "run") || (command === "advisories" && subcommand === "bloom" && args[2] === "status");
306
+
180
307
  // The routing of the commands that have their own native shapes: `true` or `false` when the
181
308
  // command decides, `undefined` when it is left to the help-surface rule in `routesToNative`.
182
309
  const routesCommandToNative = (args, platform, environment, cwd, interactive, holdsMarker = holdsRootMarker) => {
183
310
  const [command = "", subcommand] = args;
184
311
 
185
- if (NATIVE_COMMANDS.has(command)) {
186
- return true;
187
- }
188
-
189
- // `hook run` is native, but the other `hook` subcommands (install, migrate, …)
190
- // are not: sending those through the binary would only add a second Node boot.
191
- if (command === "hook" && subcommand === "run") {
192
- return true;
193
- }
194
-
195
- // `advisories bloom status` is answered natively for `--format json --cache-dir <dir>`.
196
- // The binary hands every other shape of it to Node itself, as it does for `hook run`.
197
- if (command === "advisories" && subcommand === "bloom" && args[2] === "status") {
312
+ if (alwaysNative(command, subcommand, args)) {
198
313
  return true;
199
314
  }
200
315
 
@@ -210,10 +325,16 @@ const routesCommandToNative = (args, platform, environment, cwd, interactive, ho
210
325
  return helpOrNative(args, () => listMayRunNatively(platform, environment, args, interactive));
211
326
  }
212
327
 
213
- // `cache list` and `cache size` are native for their plain shapes in a CI context
214
- // (`native/cli/src/cache.rs`); the binary hands every other shape to Node itself.
215
- if (command === "cache" && (subcommand === "list" || subcommand === "size")) {
216
- return helpOrNative(args, () => cacheMayRunNatively(platform, environment, interactive));
328
+ // `cache list`, `cache size` (`native/cli/src/cache.rs`) and `cache hash` (`native/cli/src/cache_hash.rs`)
329
+ // are native for their plain shapes in a CI context; the binary hands every other shape to Node itself.
330
+ if (command === "cache" && CACHE_NATIVE_SUBCOMMANDS.has(subcommand)) {
331
+ return helpOrNative(args, () => cacheMayRunNatively(subcommand, platform, environment, args, interactive));
332
+ }
333
+
334
+ // `affected <target> --sparse-checkout` is native in a CI context (`native/cli/src/affected.rs`); any
335
+ // other run would be delegated by the binary, which costs a second Node boot.
336
+ if (command === "affected") {
337
+ return helpOrNative(args, () => affectedMayRunNatively(platform, environment, args, interactive));
217
338
  }
218
339
 
219
340
  // `clean` (no flags, `--dry-run`, `--lockfile`) is answered natively; the binary hands every
@@ -223,6 +344,12 @@ const routesCommandToNative = (args, platform, environment, cwd, interactive, ho
223
344
  return helpOrNative(args, () => cleanMayRunNatively(platform, environment, args, interactive));
224
345
  }
225
346
 
347
+ // `secrets` is native for the plain working-tree scan (`native/cli/src/secrets.rs`); any other
348
+ // run would be delegated by the binary, which costs a second Node boot.
349
+ if (command === "secrets") {
350
+ return helpOrNative(args, () => secretsMayRunNatively(platform, environment, args, cwd, interactive, holdsMarker));
351
+ }
352
+
226
353
  // A bare command group lists its subcommands, which the binary answers like `<group> --help` (any
227
354
  // other shape is Node's, which prints the same listing). The binary enables virtual-terminal
228
355
  // processing, so Windows answers it natively too.
package/dist/bin.js CHANGED
@@ -1 +1 @@
1
- import"./packem_shared/compile-cache-DoMHRsRZ.js";import"./packem_shared/bin-N12LFeEP.js";
1
+ import"./packem_shared/compile-cache-DoMHRsRZ.js";import"./packem_shared/bin-BaReRSyo.js";
package/dist/binx.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{a as r,x as i,i as c,d as a,r as d}from"./packem_shared/vis-user-error-Bdcaov20.js";import{t as n}from"./packem_shared/compile-cache-DoMHRsRZ.js";import{g as o}from"./packem_shared/package-version-DteJxz6k.js";process.argv.includes("--no-color")&&(process.env.NO_COLOR="1",process.env.FORCE_COLOR="0");process.argv.slice(2).some(s=>s==="--version"||s==="-v"||s==="-V")&&(process.stdout.write(`${o()}
2
+ import{a as r,x as i,i as c,d as a,r as d}from"./packem_shared/vis-user-error-DhgW3DzD.js";import{t as n}from"./packem_shared/compile-cache-DoMHRsRZ.js";import{g as o}from"./packem_shared/package-version-BOK3IncQ.js";process.argv.includes("--no-color")&&(process.env.NO_COLOR="1",process.env.FORCE_COLOR="0");process.argv.slice(2).some(s=>s==="--version"||s==="-v"||s==="-V")&&(process.stdout.write(`${o()}
3
3
  `),process.exit(0));process.argv.splice(2,0,"dlx");n();const e=r("visx",{packageName:"visx",packageVersion:o()}),p=process.argv.includes("--debug")||!!process.env.DEBUG;e.addPlugin(i({concise:c,detailed:p,exitOnError:!1}));e.addCommand(a);d(e);
@@ -1,6 +1,18 @@
1
1
  import { TargetConfiguration, ChildEnvOptions, TaskResult, Task, FingerprintContributor, ConstraintsConfig, NamedInputs, TaskRunnerOptions } from '@visulima/task-runner';
2
2
  export type { FingerprintContributor } from '@visulima/task-runner';
3
+ import { FormatConfig, OxfmtOverrideConfig } from 'oxfmt';
3
4
  import { VisReleaseConfig } from "../release/types.js";
5
+ /** Formatting options accepted by oxfmt, as declared by the `oxfmt` package. */
6
+ type OxfmtOptions = FormatConfig;
7
+ /** A per-glob options override, in oxfmt's own shape. */
8
+ type FmtOverride = OxfmtOverrideConfig;
9
+ /**
10
+ * Which engine `vis fmt` uses.
11
+ * - `auto`: the bundled oxfmt, unless the workspace uses biome, dprint or ruff format.
12
+ * - `oxfmt`: always the bundled oxfmt.
13
+ * - `prettier`: the detected-adapter orchestration, with Prettier staying in charge.
14
+ */
15
+ type FmtEngine = "auto" | "oxfmt" | "prettier";
4
16
  /** Adapter IDs that can format (adapter `kind` is `"fmt"` or `"both"`). */
5
17
  type FmtAdapterId = "biome" | "dprint" | "oxfmt" | "prettier" | "ruff-fmt";
6
18
  /** Adapter IDs that can lint (adapter `kind` is `"lint"` or `"both"`). */
@@ -683,6 +695,165 @@ interface VisPlugin {
683
695
  */
684
696
  setup?: (hooks: Hookable<VisHooks>) => Promise<void> | void;
685
697
  }
698
+ /** CI providers `vis sync ci-workflow` can render a workflow for. */
699
+ type CiWorkflowProvider = "github" | "gitlab";
700
+ /** A step added to the generated GitHub workflow. Exactly one of `run` and `uses` is required. */
701
+ interface CiGithubStep {
702
+ "continue-on-error"?: boolean;
703
+ env?: Record<string, string>;
704
+ /** A GitHub expression, e.g. `always()` or `github.event_name == 'push'`. */
705
+ if?: string;
706
+ name: string;
707
+ run?: string;
708
+ shell?: string;
709
+ "timeout-minutes"?: number;
710
+ /** An action reference. Pin it to a commit SHA (`owner/action@&lt;sha>`), as the generated steps are. */
711
+ uses?: string;
712
+ with?: Record<string, boolean | number | string>;
713
+ "working-directory"?: string;
714
+ }
715
+ /** A service container for the GitHub job (`jobs.&lt;id>.services`). */
716
+ interface CiGithubService {
717
+ credentials?: {
718
+ password: string;
719
+ username: string;
720
+ };
721
+ env?: Record<string, string>;
722
+ image: string;
723
+ /** Docker `create` options, e.g. `--health-cmd pg_isready`. */
724
+ options?: string;
725
+ ports?: (number | string)[];
726
+ volumes?: string[];
727
+ }
728
+ /** Additions to the generated GitHub Actions workflow. */
729
+ interface CiGithubWorkflowConfig {
730
+ /** Job-level environment variables, available to every step. Use `${{ secrets.NAME }}` for secrets. */
731
+ env?: Record<string, string>;
732
+ /**
733
+ * Permissions added to the workflow's default `contents: read`, e.g.
734
+ * `{ "id-token": "write" }` for OIDC.
735
+ */
736
+ permissions?: Record<string, "none" | "read" | "write">;
737
+ /** Service containers the job needs, keyed by service name (also its hostname). */
738
+ services?: Record<string, CiGithubService>;
739
+ steps?: {
740
+ /** Steps after all targets ran, e.g. a coverage upload (add `if: always()` to run them after a failure). */
741
+ after?: CiGithubStep[];
742
+ /** Steps after the toolchains are installed and before anything runs, e.g. starting `docker compose`. */
743
+ afterSetup?: CiGithubStep[];
744
+ };
745
+ }
746
+ /** A service container for every GitLab job (`services:`). */
747
+ type CiGitlabService = string | {
748
+ alias?: string;
749
+ command?: string[];
750
+ name: string;
751
+ variables?: Record<string, string>;
752
+ };
753
+ /** Additions to the generated GitLab CI file. They apply to every job. */
754
+ interface CiGitlabWorkflowConfig {
755
+ /** Commands after each job's script, e.g. collecting reports. */
756
+ afterScript?: string[];
757
+ /** Commands after the install and before each job's script. */
758
+ beforeScript?: string[];
759
+ /** Image for every job instead of `node:&lt;nodeVersion>`. It must have Node.js, which vis runs on. */
760
+ image?: string;
761
+ services?: CiGitlabService[];
762
+ /**
763
+ * Stage for every generated job. It has to be one of the `stages:` of the pipeline that includes the file.
764
+ * @default "test"
765
+ */
766
+ stage?: string;
767
+ /** Runner tags that pick which runners take the jobs. */
768
+ tags?: string[];
769
+ /** Variables for every job. Use masked CI/CD variables for secrets. */
770
+ variables?: Record<string, string>;
771
+ }
772
+ /** A target with settings of its own. */
773
+ interface CiWorkflowTargetConfig {
774
+ /** Environment variables for this target's step (GitHub) or job (GitLab). */
775
+ env?: Record<string, string>;
776
+ name: string;
777
+ }
778
+ /**
779
+ * Settings for the CI workflow that `vis sync ci-workflow` generates.
780
+ *
781
+ * On GitHub the workflow is a single job: it builds the dependencies of every
782
+ * listed target once (`vis ci … --deps-only`), then runs the targets as
783
+ * GitHub Actions `parallel:` step groups (`--skip-deps`). On GitLab each
784
+ * target becomes its own job, and a partitioned target uses `parallel: N`.
785
+ */
786
+ interface CiWorkflowConfig {
787
+ /**
788
+ * Run only the projects affected by the change (`vis ci`). Set to `false`
789
+ * to run every project (`vis run`).
790
+ * @default true
791
+ */
792
+ affected?: boolean;
793
+ /**
794
+ * Branches whose pushes run the workflow, besides pull/merge requests.
795
+ * Defaults to `[defaultBase ?? "main"]`.
796
+ */
797
+ branches?: string[];
798
+ /**
799
+ * Run `build` before every other listed target that `dependsOn` does not
800
+ * already order relative to it. Most workspaces never declare that
801
+ * `test` or `typecheck` needs the dependencies' `dist`, because a
802
+ * sequential CI job built first anyway; running them in parallel with
803
+ * `build` would race. Set to `false` when your `dependsOn` is complete.
804
+ * @default true
805
+ */
806
+ buildFirst?: boolean;
807
+ /**
808
+ * Run `vis sync ci-workflow --check` in the workflow, so CI fails when the
809
+ * committed workflow no longer matches this config.
810
+ * @default true
811
+ */
812
+ checkDrift?: boolean;
813
+ /** Additions to the GitHub Actions workflow: env, permissions, services and extra steps. */
814
+ github?: CiGithubWorkflowConfig;
815
+ /** Additions to the GitLab CI file: image, variables, scripts, services and runner tags. */
816
+ gitlab?: CiGitlabWorkflowConfig;
817
+ /**
818
+ * Node.js version installed by the workflow. Defaults to
819
+ * `toolchain.tools.node`, then `"22"`.
820
+ */
821
+ nodeVersion?: string;
822
+ /**
823
+ * Split a target's tasks into N shards that run at the same time
824
+ * (`--partition=k/N`), e.g. `{ test: 3 }`. On GitHub each shard is a step
825
+ * in the same `parallel:` group, so a group holds at most 10 steps.
826
+ */
827
+ partitions?: Record<string, number>;
828
+ /**
829
+ * Which providers to generate a workflow for. Detected when unset: from
830
+ * the CI files in the repository, then the CI environment or git remote.
831
+ */
832
+ providers?: CiWorkflowProvider[];
833
+ /**
834
+ * GitHub runner label.
835
+ * @default "ubuntu-latest"
836
+ */
837
+ runsOn?: string;
838
+ /**
839
+ * Targets to run. A target that depends on another listed target (through
840
+ * `dependsOn`, directly or via unlisted targets) runs in a later group;
841
+ * the rest run at the same time. Defaults to whichever of lint,
842
+ * typecheck, lint:types, build and test exist in the workspace. Use the
843
+ * object form to give a target environment variables.
844
+ */
845
+ targets?: (CiWorkflowTargetConfig | string)[];
846
+ /**
847
+ * Minutes before the CI job is cancelled (`timeout-minutes` on GitHub,
848
+ * `timeout` on GitLab).
849
+ * @default 60
850
+ */
851
+ timeoutMinutes?: number;
852
+ }
853
+ interface CiConfig {
854
+ /** The workflow generated by `vis sync ci-workflow`. */
855
+ workflow?: CiWorkflowConfig;
856
+ }
686
857
  /**
687
858
  * Recognised input sources for the codeowners aggregator.
688
859
  *
@@ -756,6 +927,16 @@ interface LintFmtAdapterOverride {
756
927
  */
757
928
  extraArgs?: string[];
758
929
  }
930
+ /**
931
+ * `fmt.adapters.oxfmt`: the shared overrides plus the switch for the oxfmt that ships with vis.
932
+ */
933
+ interface OxfmtAdapterOverride extends LintFmtAdapterOverride {
934
+ /**
935
+ * Set to `false` to keep running the project's own `oxfmt` through the adapter orchestration
936
+ * instead of the bundled one. Defaults to `true`.
937
+ */
938
+ builtin?: boolean;
939
+ }
759
940
  /**
760
941
  * One family of upstream-coupled packages.
761
942
  *
@@ -1999,6 +2180,11 @@ interface VisConfig {
1999
2180
  * @default false
2000
2181
  */
2001
2182
  branchScopedCache?: boolean;
2183
+ /**
2184
+ * CI settings. `ci.workflow` drives the GitHub Actions / GitLab CI
2185
+ * workflow that `vis sync ci-workflow` generates.
2186
+ */
2187
+ ci?: CiConfig;
2002
2188
  /**
2003
2189
  * Code ownership configuration. Controls how `vis sync codeowners`
2004
2190
  * renders the generated CODEOWNERS file.
@@ -2150,20 +2336,24 @@ interface VisConfig {
2150
2336
  */
2151
2337
  fileGroups?: Record<string, string[]>;
2152
2338
  /**
2153
- * Configuration for `vis fmt` — the formatter orchestrator.
2339
+ * Configuration for `vis fmt`.
2340
+ *
2341
+ * By default `vis fmt` formats with the oxfmt that ships with vis, so a workspace needs no setup.
2342
+ * The formatting options come from the first of these sources that exists, used whole (never merged):
2343
+ * `fmt.options` here, then an `.oxfmtrc.json(c)` / `oxfmt.config.ts` file, then a Prettier config
2344
+ * (mapped to oxfmt options), then oxfmt's defaults. Note that oxfmt's default `printWidth` is 100;
2345
+ * a Prettier config without one maps to Prettier's 80.
2154
2346
  *
2155
- * Tunes adapter detection precedence, per-extension routing, and
2156
- * per-adapter overrides. Flags on the CLI always win over config.
2347
+ * A workspace that uses biome, dprint or ruff format keeps the adapter orchestration: vis runs every
2348
+ * detected formatter, routed by extension. `fmt.engine` overrides that choice.
2157
2349
  *
2158
- * The default fmt precedence is `oxfmt → biome → dprint → prettier`.
2159
- * When multiple adapters claim the same extension,
2160
- * the first in this order owns it unless overridden here.
2350
+ * Flags on the CLI always win over config.
2161
2351
  * @example
2162
2352
  * ```
2163
2353
  * fmt: {
2164
- * order: ["biome", "prettier"],
2165
- * extensionOverrides: { md: "dprint" },
2166
- * adapters: { dprint: { enabled: false } },
2354
+ * options: { printWidth: 100, singleQuote: true },
2355
+ * overrides: [{ files: ["*.md"], options: { proseWrap: "always" } }],
2356
+ * ignorePatterns: ["generated/**"],
2167
2357
  * }
2168
2358
  * ```
2169
2359
  */
@@ -2171,22 +2361,47 @@ interface VisConfig {
2171
2361
  /**
2172
2362
  * Per-adapter overrides. Keyed by `AdapterId`. Set
2173
2363
  * `enabled: false` to skip an adapter even when detected, or
2174
- * `extraArgs` to append flags verbatim.
2364
+ * `extraArgs` to append flags verbatim. `enabled: false` on `oxfmt`
2365
+ * also turns the bundled oxfmt off.
2175
2366
  */
2176
- adapters?: Partial<Record<FmtAdapterId, LintFmtAdapterOverride>>;
2367
+ adapters?: { [Id in Exclude<FmtAdapterId, "oxfmt">]?: LintFmtAdapterOverride; } & {
2368
+ oxfmt?: OxfmtAdapterOverride;
2369
+ };
2370
+ /**
2371
+ * Which formatter runs.
2372
+ * - `auto` (default): the bundled oxfmt, unless biome, dprint or ruff format is detected.
2373
+ * - `oxfmt`: always the bundled oxfmt, and no other formatter.
2374
+ * - `prettier`: the adapter orchestration, with Prettier staying in charge.
2375
+ * @default "auto"
2376
+ */
2377
+ engine?: FmtEngine;
2177
2378
  /**
2178
2379
  * Pin a file extension (without the leading dot) to a specific
2179
2380
  * adapter, overriding the registry's "first detected adapter
2180
2381
  * wins" routing. Use to e.g. send `.md` to `dprint` even when
2181
- * both prettier and dprint are present.
2382
+ * both prettier and dprint are present. Applies to the adapter
2383
+ * orchestration only.
2182
2384
  */
2183
2385
  extensionOverrides?: Record<string, FmtAdapterId>;
2386
+ /**
2387
+ * Files the bundled oxfmt skips, relative to the workspace root. Same shape as
2388
+ * oxfmt's `ignorePatterns`. A pattern containing `..` is rejected.
2389
+ */
2390
+ ignorePatterns?: string[];
2391
+ /**
2392
+ * Formatting options for the bundled oxfmt, in oxfmt's own names (`printWidth`, `semi`,
2393
+ * `singleQuote`, `sortImports`, ...). Used instead of any `.oxfmtrc` or Prettier config.
2394
+ */
2395
+ options?: OxfmtOptions;
2184
2396
  /**
2185
2397
  * Override the adapter precedence order. Adapters omitted from
2186
2398
  * this list still run (appended at the end in registry order),
2187
2399
  * but those listed earlier get priority for extension routing.
2400
+ * Applies to the adapter orchestration only.
2188
2401
  */
2189
2402
  order?: FmtAdapterId[];
2403
+ /** File-specific option overrides for the bundled oxfmt. Later entries win. A `files` or `excludeFiles` glob containing `..` is rejected. */
2404
+ overrides?: FmtOverride[];
2190
2405
  };
2191
2406
  /**
2192
2407
  * Gems as task projects. Off by default: each `*.gemspec` directory (except `vendor`,
@@ -1,4 +1,4 @@
1
- import{createRequire as O}from"node:module";import{v as j,e as l,m as S}from"../packem_shared/index-0dnGN3GP.js";import{i as A}from"./ts-loader.js";import{m as R}from"../packem_shared/target-merge-ya19LiWB.js";import{otelPlugin as ue}from"../packem_shared/otelPlugin-D8LL2-4L.js";import{definePlugin as le}from"../packem_shared/definePlugin-DoUcoYSy.js";import{y as b}from"../packem_shared/isAccessibleSync-DYKTrrvc-CBsMZhj-.js";let x;const _=e=>(x??=O(import.meta.url))(e),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,h=e=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[s,t]=c.versions.node.split(".").map(Number);if(s>22||s===22&&t>=3||s===20&&t>=16)return c.getBuiltinModule(e)}return _(e)},{readdirSync:g}=h("node:fs"),{createRequire:E}=h("node:module");class f extends Error{chain;constructor(s,t,o){super(s,o),this.name=this.constructor.name,this.chain=t}}class V extends f{constructor(s,t){const o=[...t,`${s} (re-enters)`].join(" → ");super(`Config cycle: ${o}`,t)}}class T extends f{filePath;removedKeys;constructor(s,t,o){const n=[`${s} uses removed keys.`,""];for(const r of o){const i=r.location?` (at ${r.location})`:"";n.push(` • ${r.name}${i} → renamed to \`${r.renamedTo}\``);for(const a of r.children??[])n.push(` ↳ ${a.name} → renamed to \`${a.renamedTo}\``)}n.push("","Run `vis migrate self` to auto-rewrite the config (use --dry-run to preview)."),super(n.join(`
1
+ import{createRequire as O}from"node:module";import{v as j,e as l,m as S}from"../packem_shared/index-zq6Ehql6.js";import{i as A}from"./ts-loader.js";import{m as R}from"../packem_shared/target-merge-ya19LiWB.js";import{otelPlugin as ue}from"../packem_shared/otelPlugin-D8LL2-4L.js";import{definePlugin as le}from"../packem_shared/definePlugin-DoUcoYSy.js";import{y as b}from"../packem_shared/isAccessibleSync-DYKTrrvc-CKahNmLy.js";let x;const _=e=>(x??=O(import.meta.url))(e),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,h=e=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[s,t]=c.versions.node.split(".").map(Number);if(s>22||s===22&&t>=3||s===20&&t>=16)return c.getBuiltinModule(e)}return _(e)},{readdirSync:g}=h("node:fs"),{createRequire:E}=h("node:module");class f extends Error{chain;constructor(s,t,o){super(s,o),this.name=this.constructor.name,this.chain=t}}class V extends f{constructor(s,t){const o=[...t,`${s} (re-enters)`].join(" → ");super(`Config cycle: ${o}`,t)}}class T extends f{filePath;removedKeys;constructor(s,t,o){const n=[`${s} uses removed keys.`,""];for(const r of o){const i=r.location?` (at ${r.location})`:"";n.push(` • ${r.name}${i} → renamed to \`${r.renamedTo}\``);for(const a of r.children??[])n.push(` ↳ ${a.name} → renamed to \`${a.renamedTo}\``)}n.push("","Run `vis migrate self` to auto-rewrite the config (use --dry-run to preview)."),super(n.join(`
2
2
  `),t),this.filePath=s,this.removedKeys=o}}class y extends f{constructor(s,t,o){const n=o instanceof Error?o.message:String(o),r=t.length>0?`
3
3
  Chain: ${t.join(" → ")}`:"";super(`Failed to load ${s}: ${n}${r}`,t,{cause:o})}}const D=e=>e.join(" → ");class p extends f{constructor(s,t,o){const n=t.length>0?t[t.length-1]:"<unknown>",r=o.length>0?`
4
4
  Tried: