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

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 (347) hide show
  1. package/CHANGELOG.md +1243 -78
  2. package/LICENSE.md +13068 -6
  3. package/README.md +388 -26
  4. package/dashboard/dist/index.html +152 -0
  5. package/dist/bin.js +1 -853
  6. package/dist/binx.js +3 -0
  7. package/dist/config/index.d.ts +3276 -0
  8. package/dist/config/index.js +1 -0
  9. package/dist/generate/index.d.ts +157 -0
  10. package/dist/generate/index.js +1 -0
  11. package/dist/packem_chunks/DEFAULT_CLEAN_KEEP.js +1 -0
  12. package/dist/packem_chunks/bin.js +1198 -0
  13. package/dist/packem_chunks/bloom-status.js +2 -0
  14. package/dist/packem_chunks/bloom-sync.js +2 -0
  15. package/dist/packem_chunks/cache-attestation.js +1 -0
  16. package/dist/packem_chunks/catalog-detector.js +1 -0
  17. package/dist/packem_chunks/config.js +21 -0
  18. package/dist/packem_chunks/detect.js +3 -0
  19. package/dist/packem_chunks/detect2.js +8 -0
  20. package/dist/packem_chunks/devtools.js +81 -0
  21. package/dist/packem_chunks/discord.js +4 -0
  22. package/dist/packem_chunks/doctor-probe.js +2 -0
  23. package/dist/packem_chunks/dynamic-import.js +1 -0
  24. package/dist/packem_chunks/extra-files.js +3 -0
  25. package/dist/packem_chunks/fix.js +11 -0
  26. package/dist/packem_chunks/git.js +3 -0
  27. package/dist/packem_chunks/handler.js +1 -0
  28. package/dist/packem_chunks/handler10.js +1 -0
  29. package/dist/packem_chunks/handler11.js +5 -0
  30. package/dist/packem_chunks/handler12.js +1 -0
  31. package/dist/packem_chunks/handler13.js +27 -0
  32. package/dist/packem_chunks/handler14.js +5 -0
  33. package/dist/packem_chunks/handler15.js +1 -0
  34. package/dist/packem_chunks/handler16.js +1 -0
  35. package/dist/packem_chunks/handler17.js +1 -0
  36. package/dist/packem_chunks/handler18.js +1 -0
  37. package/dist/packem_chunks/handler19.js +1 -0
  38. package/dist/packem_chunks/handler2.js +4 -0
  39. package/dist/packem_chunks/handler20.js +5 -0
  40. package/dist/packem_chunks/handler21.js +2 -0
  41. package/dist/packem_chunks/handler22.js +2 -0
  42. package/dist/packem_chunks/handler23.js +1 -0
  43. package/dist/packem_chunks/handler24.js +1 -0
  44. package/dist/packem_chunks/handler25.js +1 -0
  45. package/dist/packem_chunks/handler26.js +5 -0
  46. package/dist/packem_chunks/handler27.js +1 -0
  47. package/dist/packem_chunks/handler28.js +3 -0
  48. package/dist/packem_chunks/handler29.js +1 -0
  49. package/dist/packem_chunks/handler3.js +4 -0
  50. package/dist/packem_chunks/handler30.js +1 -0
  51. package/dist/packem_chunks/handler31.js +2 -0
  52. package/dist/packem_chunks/handler32.js +2 -0
  53. package/dist/packem_chunks/handler33.js +2 -0
  54. package/dist/packem_chunks/handler34.js +3 -0
  55. package/dist/packem_chunks/handler35.js +6 -0
  56. package/dist/packem_chunks/handler36.js +1 -0
  57. package/dist/packem_chunks/handler37.js +42 -0
  58. package/dist/packem_chunks/handler38.js +8 -0
  59. package/dist/packem_chunks/handler39.js +9 -0
  60. package/dist/packem_chunks/handler4.js +6 -0
  61. package/dist/packem_chunks/handler40.js +75 -0
  62. package/dist/packem_chunks/handler41.js +5 -0
  63. package/dist/packem_chunks/handler42.js +4 -0
  64. package/dist/packem_chunks/handler43.js +3 -0
  65. package/dist/packem_chunks/handler44.js +2 -0
  66. package/dist/packem_chunks/handler45.js +1 -0
  67. package/dist/packem_chunks/handler46.js +1 -0
  68. package/dist/packem_chunks/handler47.js +1 -0
  69. package/dist/packem_chunks/handler48.js +3 -0
  70. package/dist/packem_chunks/handler49.js +1 -0
  71. package/dist/packem_chunks/handler5.js +8 -0
  72. package/dist/packem_chunks/handler50.js +7 -0
  73. package/dist/packem_chunks/handler51.js +33 -0
  74. package/dist/packem_chunks/handler52.js +3 -0
  75. package/dist/packem_chunks/handler53.js +8 -0
  76. package/dist/packem_chunks/handler54.js +4 -0
  77. package/dist/packem_chunks/handler55.js +1 -0
  78. package/dist/packem_chunks/handler56.js +12 -0
  79. package/dist/packem_chunks/handler57.js +7 -0
  80. package/dist/packem_chunks/handler58.js +5 -0
  81. package/dist/packem_chunks/handler59.js +11 -0
  82. package/dist/packem_chunks/handler6.js +1 -0
  83. package/dist/packem_chunks/handler60.js +3 -0
  84. package/dist/packem_chunks/handler61.js +22 -0
  85. package/dist/packem_chunks/handler62.js +61 -0
  86. package/dist/packem_chunks/handler63.js +3 -0
  87. package/dist/packem_chunks/handler64.js +6 -0
  88. package/dist/packem_chunks/handler65.js +708 -0
  89. package/dist/packem_chunks/handler66.js +24 -0
  90. package/dist/packem_chunks/handler67.js +25 -0
  91. package/dist/packem_chunks/handler68.js +153 -0
  92. package/dist/packem_chunks/handler69.js +10 -0
  93. package/dist/packem_chunks/handler7.js +1 -0
  94. package/dist/packem_chunks/handler70.js +24 -0
  95. package/dist/packem_chunks/handler71.js +322 -0
  96. package/dist/packem_chunks/handler72.js +48 -0
  97. package/dist/packem_chunks/handler73.js +27 -0
  98. package/dist/packem_chunks/handler74.js +3 -0
  99. package/dist/packem_chunks/handler75.js +190 -0
  100. package/dist/packem_chunks/handler76.js +38 -0
  101. package/dist/packem_chunks/handler8.js +1 -0
  102. package/dist/packem_chunks/handler9.js +1 -0
  103. package/dist/packem_chunks/heal-accept.js +10 -0
  104. package/dist/packem_chunks/heal.js +14 -0
  105. package/dist/packem_chunks/help-command.js +31 -0
  106. package/dist/packem_chunks/index.js +1 -0
  107. package/dist/packem_chunks/index2.js +7 -0
  108. package/dist/packem_chunks/interface.js +2 -0
  109. package/dist/packem_chunks/keys-refresh.js +4 -0
  110. package/dist/packem_chunks/list.js +3 -0
  111. package/dist/packem_chunks/loader.js +4 -0
  112. package/dist/packem_chunks/loader2.js +1 -0
  113. package/dist/packem_chunks/orchestrator.js +39 -0
  114. package/dist/packem_chunks/pre-mode.js +2 -0
  115. package/dist/packem_chunks/print-config.js +2 -0
  116. package/dist/packem_chunks/prompts.js +7 -0
  117. package/dist/packem_chunks/prune.js +3 -0
  118. package/dist/packem_chunks/publish-guards.js +1 -0
  119. package/dist/packem_chunks/registry.js +48 -0
  120. package/dist/packem_chunks/resolveFormatter.js +9 -0
  121. package/dist/packem_chunks/run.js +1 -0
  122. package/dist/packem_chunks/security.js +1 -0
  123. package/dist/packem_chunks/shell-runner.js +1 -0
  124. package/dist/packem_chunks/slack.js +2 -0
  125. package/dist/packem_chunks/snapshot.js +2 -0
  126. package/dist/packem_chunks/stage-publisher.js +1 -0
  127. package/dist/packem_chunks/staged-registry.js +2 -0
  128. package/dist/packem_chunks/state.js +3 -0
  129. package/dist/packem_chunks/status.js +2 -0
  130. package/dist/packem_chunks/success-walk.js +8 -0
  131. package/dist/packem_chunks/sync.js +2 -0
  132. package/dist/packem_chunks/sync2.js +2 -0
  133. package/dist/packem_chunks/tar.js +3 -0
  134. package/dist/packem_chunks/tripwire.js +2 -0
  135. package/dist/packem_chunks/verify-lockfile.js +2 -0
  136. package/dist/packem_chunks/version-resolver.js +2 -0
  137. package/dist/packem_chunks/webhook.js +1 -0
  138. package/dist/packem_chunks/workflow-templates.js +167 -0
  139. package/dist/packem_chunks/workspace.js +2 -0
  140. package/dist/packem_shared/AfterAllProjectsVersioned-CAKI2nWf.js +1 -0
  141. package/dist/packem_shared/CONFIG_FILES-BfaR0jKT.js +1 -0
  142. package/dist/packem_shared/MultiSpinner-B9U0-aE3-B-gIXhFk.js +3 -0
  143. package/dist/packem_shared/ReleaseClient-YHzBIxYS.js +1 -0
  144. package/dist/packem_shared/Table-CcVkyULl-B_ef6zfS.js +35 -0
  145. package/dist/packem_shared/VisReleaseError-DMGRBTNO.js +1 -0
  146. package/dist/packem_shared/_commonjsHelpers-B5Y90VFO.js +1 -0
  147. package/dist/packem_shared/advisories-DLeO5KMN.js +1 -0
  148. package/dist/packem_shared/affected-shas-cVnX8-zs.js +1 -0
  149. package/dist/packem_shared/ai-analysis-BUeX2J2H.js +68 -0
  150. package/dist/packem_shared/ai-fix-9Vzlp6XU.js +43 -0
  151. package/dist/packem_shared/anolilab-text-CAM_E6uK.js +13 -0
  152. package/dist/packem_shared/api.d-BPftyU9r.d.ts +27 -0
  153. package/dist/packem_shared/build-scripts-CCCi8U66.js +1 -0
  154. package/dist/packem_shared/command-runtime-CR70qSUM.js +1 -0
  155. package/dist/packem_shared/createAdapter-bU4DIP3F.js +1 -0
  156. package/dist/packem_shared/createVersionActions-BK43SNDH.js +1 -0
  157. package/dist/packem_shared/cyclonedx-Cadls41z.js +4 -0
  158. package/dist/packem_shared/defineFormatter-D5dCp6Kv.js +1 -0
  159. package/dist/packem_shared/definePlugin-DoUcoYSy.js +1 -0
  160. package/dist/packem_shared/dependency-scan-DnTgYleU.js +1 -0
  161. package/dist/packem_shared/docker-BMLrNtWm.js +59 -0
  162. package/dist/packem_shared/failure-log-CEWP3bP0.js +2 -0
  163. package/dist/packem_shared/giget-DHY1sQZC.js +2 -0
  164. package/dist/packem_shared/glob-fqg4KepW-B7EjLRvw.js +1 -0
  165. package/dist/packem_shared/index-3jMNqQom.js +1 -0
  166. package/dist/packem_shared/index-BDmTbWX1.js +19 -0
  167. package/dist/packem_shared/index-Bt521H5J.js +30 -0
  168. package/dist/packem_shared/index-DGSsjmpV.js +1 -0
  169. package/dist/packem_shared/interface.d-B7VK2rcH.d.ts +148 -0
  170. package/dist/packem_shared/interface.d-Cezzifoh.d.ts +106 -0
  171. package/dist/packem_shared/license-t5KnNX6v.js +1 -0
  172. package/dist/packem_shared/lifecycle-4z9hHE5b.js +2 -0
  173. package/dist/packem_shared/lockfile-C8Q1_4KK.js +1 -0
  174. package/dist/packem_shared/manifests-Dj3pRKBT.js +1 -0
  175. package/dist/packem_shared/min-release-age-D1alDE3K.js +34 -0
  176. package/dist/packem_shared/missing-package-json-8vNHwbqw.js +1 -0
  177. package/dist/packem_shared/native-config-sync-BEkJW7g3.js +21 -0
  178. package/dist/packem_shared/osv-bloom-B03tUWf3.js +2 -0
  179. package/dist/packem_shared/otelPlugin-DmKDBaPo.js +1 -0
  180. package/dist/packem_shared/peer-warnings-BXAzXqY3.js +1 -0
  181. package/dist/packem_shared/pm-runner-BKZQo7Ts.js +1 -0
  182. package/dist/packem_shared/provenance-BFEwKgI3.js +1 -0
  183. package/dist/packem_shared/public-api-WqUCiyIe.js +131 -0
  184. package/dist/packem_shared/registry-keys-BfFto6vI.js +1 -0
  185. package/dist/packem_shared/resolve-explicit-C6WM-I2u.js +5 -0
  186. package/dist/packem_shared/runtime-check-Stc9AI78.js +1 -0
  187. package/dist/packem_shared/s1ngularity-DCPmPE5M.js +1 -0
  188. package/dist/packem_shared/scan-progress-CFhc0CMj.js +2 -0
  189. package/dist/packem_shared/selectors-GCJIe342.js +3 -0
  190. package/dist/packem_shared/signatures-Xpd6HjG_.js +2 -0
  191. package/dist/packem_shared/slug-DoueYuLo.js +1 -0
  192. package/dist/packem_shared/spinner-CV3WVJLv.js +1 -0
  193. package/dist/packem_shared/sticky-comment-D6_7-w8T.js +1 -0
  194. package/dist/packem_shared/subtree-C7bZuiSQ.js +2 -0
  195. package/dist/packem_shared/symbols-DPTlrJ3B.js +1 -0
  196. package/dist/packem_shared/tabs-BuTy5gPV.js +1 -0
  197. package/dist/packem_shared/toolchain-pR7AJ-tB.js +5 -0
  198. package/dist/packem_shared/typosquats-DN78xx1x.js +1 -0
  199. package/dist/packem_shared/use-measured-height-_eVGWtWt.js +1 -0
  200. package/dist/packem_shared/utils-Cxree603.js +1 -0
  201. package/dist/packem_shared/verify-6WCmFmy8.js +1 -0
  202. package/dist/packem_shared/vis-update-app-k3fDxech.js +1 -0
  203. package/dist/packem_shared/watch-BvIwLG4N.js +1 -0
  204. package/dist/packem_shared/watch-loop-DWkvv2tK.js +11 -0
  205. package/dist/release/core/changelog/index.d.ts +5 -0
  206. package/dist/release/core/changelog/index.js +1 -0
  207. package/dist/release/core/package-managers/index.d.ts +6 -0
  208. package/dist/release/core/package-managers/index.js +1 -0
  209. package/dist/release/core/version-actions/index.d.ts +14 -0
  210. package/dist/release/core/version-actions/index.js +1 -0
  211. package/dist/release/index.d.ts +196 -0
  212. package/dist/release/index.js +1 -0
  213. package/dist/release/plugin-sdk.d.ts +127 -0
  214. package/dist/release/plugin-sdk.js +1 -0
  215. package/dist/release/presets.d.ts +225 -0
  216. package/dist/release/presets.js +1 -0
  217. package/dist/release/types.d.ts +1377 -0
  218. package/dist/release/types.js +1 -0
  219. package/index.d.ts +436 -0
  220. package/index.js +80 -57
  221. package/package.json +109 -45
  222. package/schemas/project.schema.json +991 -0
  223. package/schemas/vis-config.schema.json +6389 -0
  224. package/schemas/vis-release-config.schema.json +1390 -0
  225. package/skills/vis/SKILL.md +96 -0
  226. package/templates/buildkite-ci/.buildkite/pipeline.yml.tera +85 -0
  227. package/templates/buildkite-ci/template.yml +20 -0
  228. package/dist/ai-analysis.d.ts +0 -40
  229. package/dist/ai-cache.d.ts +0 -21
  230. package/dist/audit-config.d.ts +0 -24
  231. package/dist/bin.d.ts +0 -1
  232. package/dist/catalog.d.ts +0 -118
  233. package/dist/commands/add.d.ts +0 -3
  234. package/dist/commands/affected.d.ts +0 -3
  235. package/dist/commands/ai.d.ts +0 -3
  236. package/dist/commands/analyze.d.ts +0 -3
  237. package/dist/commands/approve-builds.d.ts +0 -3
  238. package/dist/commands/audit.d.ts +0 -23
  239. package/dist/commands/check.d.ts +0 -3
  240. package/dist/commands/clean.d.ts +0 -3
  241. package/dist/commands/create/discovery.d.ts +0 -42
  242. package/dist/commands/create/index.d.ts +0 -13
  243. package/dist/commands/create/prompts.d.ts +0 -31
  244. package/dist/commands/create/random-name.d.ts +0 -15
  245. package/dist/commands/create/templates/builtin.d.ts +0 -15
  246. package/dist/commands/create/templates/generator.d.ts +0 -14
  247. package/dist/commands/create/templates/index.d.ts +0 -13
  248. package/dist/commands/create/templates/monorepo.d.ts +0 -16
  249. package/dist/commands/create/templates/remote.d.ts +0 -41
  250. package/dist/commands/create/templates/types.d.ts +0 -46
  251. package/dist/commands/create/utils.d.ts +0 -42
  252. package/dist/commands/dedupe.d.ts +0 -3
  253. package/dist/commands/devcontainer.d.ts +0 -3
  254. package/dist/commands/dlx.d.ts +0 -3
  255. package/dist/commands/doctor.d.ts +0 -15
  256. package/dist/commands/exec.d.ts +0 -3
  257. package/dist/commands/graph.d.ts +0 -3
  258. package/dist/commands/hook/constants.d.ts +0 -8
  259. package/dist/commands/hook/index.d.ts +0 -3
  260. package/dist/commands/hook/install.d.ts +0 -7
  261. package/dist/commands/hook/migrate.d.ts +0 -27
  262. package/dist/commands/hook/uninstall.d.ts +0 -3
  263. package/dist/commands/implode.d.ts +0 -3
  264. package/dist/commands/init.d.ts +0 -14
  265. package/dist/commands/install.d.ts +0 -3
  266. package/dist/commands/link.d.ts +0 -3
  267. package/dist/commands/migrate/constants.d.ts +0 -12
  268. package/dist/commands/migrate/deps.d.ts +0 -32
  269. package/dist/commands/migrate/index.d.ts +0 -3
  270. package/dist/commands/migrate/json.d.ts +0 -20
  271. package/dist/commands/migrate/lint-staged.d.ts +0 -62
  272. package/dist/commands/migrate/types.d.ts +0 -20
  273. package/dist/commands/optimize.d.ts +0 -38
  274. package/dist/commands/pm.d.ts +0 -3
  275. package/dist/commands/remove.d.ts +0 -3
  276. package/dist/commands/run.d.ts +0 -3
  277. package/dist/commands/sort-package-json.d.ts +0 -3
  278. package/dist/commands/staged.d.ts +0 -3
  279. package/dist/commands/unlink.d.ts +0 -3
  280. package/dist/commands/update.d.ts +0 -3
  281. package/dist/commands/upgrade.d.ts +0 -3
  282. package/dist/commands/why.d.ts +0 -3
  283. package/dist/config.d.ts +0 -67
  284. package/dist/config.js +0 -1
  285. package/dist/native-binding.d.ts +0 -151
  286. package/dist/output.d.ts +0 -40
  287. package/dist/overrides.d.ts +0 -82
  288. package/dist/package-manager.d.ts +0 -23
  289. package/dist/plugins/config-loader.d.ts +0 -3
  290. package/dist/plugins/post-command.d.ts +0 -3
  291. package/dist/plugins/security-enforcement.d.ts +0 -3
  292. package/dist/pm-runner.d.ts +0 -23
  293. package/dist/security.d.ts +0 -64
  294. package/dist/socket-security.d.ts +0 -129
  295. package/dist/tips.d.ts +0 -41
  296. package/dist/tui/components/CheckProgressApp.d.ts +0 -6
  297. package/dist/tui/components/CommandSummary.d.ts +0 -17
  298. package/dist/tui/components/Header.d.ts +0 -13
  299. package/dist/tui/components/OutputPanel.d.ts +0 -16
  300. package/dist/tui/components/QuitDialog.d.ts +0 -15
  301. package/dist/tui/components/TaskListPanel.d.ts +0 -19
  302. package/dist/tui/components/TaskRow.d.ts +0 -12
  303. package/dist/tui/components/TaskStore.d.ts +0 -80
  304. package/dist/tui/components/VisTaskRunnerApp.d.ts +0 -17
  305. package/dist/tui/components/devcontainer/DevcontainerStore.d.ts +0 -66
  306. package/dist/tui/components/devcontainer/VisDevcontainerApp.d.ts +0 -9
  307. package/dist/tui/components/devcontainer/catalogs/extensions.d.ts +0 -8
  308. package/dist/tui/components/devcontainer/catalogs/features.d.ts +0 -8
  309. package/dist/tui/components/devcontainer/catalogs/filters.d.ts +0 -4
  310. package/dist/tui/components/devcontainer/catalogs/mount-suggestions.d.ts +0 -19
  311. package/dist/tui/components/devcontainer/catalogs/templates.d.ts +0 -8
  312. package/dist/tui/components/devcontainer/devcontainer-io.d.ts +0 -14
  313. package/dist/tui/components/devcontainer/sections/DockerComposeSection.d.ts +0 -11
  314. package/dist/tui/components/devcontainer/sections/EnvironmentSection.d.ts +0 -16
  315. package/dist/tui/components/devcontainer/sections/ExtensionsSection.d.ts +0 -11
  316. package/dist/tui/components/devcontainer/sections/FeaturesSection.d.ts +0 -11
  317. package/dist/tui/components/devcontainer/sections/GeneralSection.d.ts +0 -12
  318. package/dist/tui/components/devcontainer/sections/LifecycleSection.d.ts +0 -13
  319. package/dist/tui/components/devcontainer/sections/MountsSection.d.ts +0 -16
  320. package/dist/tui/components/devcontainer/sections/PortsSection.d.ts +0 -10
  321. package/dist/tui/components/devcontainer/sections/PreviewPanel.d.ts +0 -11
  322. package/dist/tui/components/devcontainer/types.d.ts +0 -53
  323. package/dist/tui/components/devcontainer/validate.d.ts +0 -16
  324. package/dist/tui/components/graph/GraphStore.d.ts +0 -42
  325. package/dist/tui/components/graph/ProjectDetailPanel.d.ts +0 -10
  326. package/dist/tui/components/graph/ProjectListPanel.d.ts +0 -20
  327. package/dist/tui/components/graph/VisGraphApp.d.ts +0 -8
  328. package/dist/tui/components/optimize/OptimizeDetailPanel.d.ts +0 -9
  329. package/dist/tui/components/optimize/OptimizeListPanel.d.ts +0 -16
  330. package/dist/tui/components/optimize/OptimizeStore.d.ts +0 -50
  331. package/dist/tui/components/optimize/VisOptimizeApp.d.ts +0 -8
  332. package/dist/tui/components/optimize/constants.d.ts +0 -7
  333. package/dist/tui/components/update/PackageDetailPanel.d.ts +0 -12
  334. package/dist/tui/components/update/PackageListPanel.d.ts +0 -18
  335. package/dist/tui/components/update/UpdateStore.d.ts +0 -62
  336. package/dist/tui/components/update/VisUpdateApp.d.ts +0 -11
  337. package/dist/tui/dynamic-life-cycle.d.ts +0 -21
  338. package/dist/tui/formatting-utils.d.ts +0 -17
  339. package/dist/tui/pretty-time.d.ts +0 -8
  340. package/dist/tui/static-life-cycle.d.ts +0 -22
  341. package/dist/tui/status-utils.d.ts +0 -20
  342. package/dist/tui/symbols.d.ts +0 -7
  343. package/dist/tui/types.d.ts +0 -11
  344. package/dist/typosquats.d.ts +0 -70
  345. package/dist/upgrade-check.d.ts +0 -30
  346. package/dist/utils.d.ts +0 -22
  347. package/dist/workspace.d.ts +0 -315
@@ -1,41 +0,0 @@
1
- /**
2
- * Remote template executors:
3
- *
4
- * - `executeRemoteNpm` — runs npm `create-*` packages via `dlx`
5
- * - `executeRemoteGit` — downloads git repositories using giget
6
- * (GitHub, GitLab, Bitbucket, Sourcehut — tarballs with caching)
7
- *
8
- * Includes auto-fix rules for popular tools that need extra flags
9
- * to play nicely with monorepo setups.
10
- */
11
- import type { ExecutionContext, TemplateConfig } from "./types.d.ts";
12
- /**
13
- * Execute an npm `create-*` package via the package manager's `dlx` command.
14
- *
15
- * Injects the target directory as the first positional argument if not
16
- * already present, since most `create-*` packages expect the output
17
- * directory as the first arg (e.g., `create-vite my-app`).
18
- *
19
- * Auto-fix rules are applied for known tools that need extra flags.
20
- * @param config Resolved template config with source package name and extra args.
21
- * @param context Runtime context with PM, cwd, target dir, and monorepo flag.
22
- * @returns Exit code — 0 on success, non-zero on failure.
23
- */
24
- export declare const executeRemoteNpm: (config: TemplateConfig, context: ExecutionContext) => number;
25
- /**
26
- * Download a git repository template using giget.
27
- *
28
- * Supports GitHub, GitLab, Bitbucket, and Sourcehut — with tarball
29
- * downloads, disk caching, offline support, subdirectory extraction,
30
- * and private repo auth via tokens.
31
- *
32
- * Source format follows giget conventions:
33
- * - `provider:owner/repo[/subpath][#ref]`
34
- * - `owner/repo` (defaults to GitHub)
35
- * - Full HTTPS URLs
36
- * - `git:` prefix for raw git clone
37
- * @param config Resolved template config with giget source string and extra args.
38
- * @param context Runtime context with target dir and createConfig (auth, registry, etc.).
39
- * @returns Exit code — 0 on success, 1 on failure.
40
- */
41
- export declare const executeRemoteGit: (config: TemplateConfig, context: ExecutionContext) => Promise<number>;
@@ -1,46 +0,0 @@
1
- /**
2
- * Core type definitions for the `vis create` scaffolding system.
3
- */
4
- /** The kind of template being scaffolded. */
5
- export type TemplateType = "builtin:app" | "builtin:generator" | "builtin:library" | "builtin:monorepo" | "remote:git" | "remote:npm";
6
- /** Resolved information about a template after discovery. */
7
- export interface TemplateConfig {
8
- /** Extra CLI arguments forwarded to the template runner. */
9
- args: string[];
10
- /** The npm package name (for remote:npm) or git URL (for remote:git). */
11
- source: string;
12
- /** What kind of template this is. */
13
- type: TemplateType;
14
- }
15
- /** Create config from vis.config.ts — full shape matching VisConfig.create. */
16
- export interface CreateConfig {
17
- auth?: string;
18
- defaultEditor?: "vscode";
19
- defaultPm?: "bun" | "npm" | "pnpm" | "yarn";
20
- defaultProvider?: "bitbucket" | "github" | "gitlab" | "sourcehut";
21
- gitInit?: boolean;
22
- install?: boolean;
23
- preferOffline?: boolean;
24
- registry?: false | string;
25
- templates?: Record<string, string>;
26
- }
27
- /** Runtime context passed to every template executor. */
28
- export interface ExecutionContext {
29
- /** Create config from vis.config.ts. */
30
- createConfig?: CreateConfig;
31
- /** Working directory (workspace root or cwd). */
32
- cwd: string;
33
- /** Whether we are inside an existing monorepo workspace. */
34
- inMonorepo: boolean;
35
- /** Console-compatible logger from Cerebro toolbox. */
36
- logger: Console;
37
- /** Detected package manager. */
38
- pm: {
39
- name: "bun" | "npm" | "pnpm" | "yarn";
40
- version: string;
41
- };
42
- /** The validated npm-safe project name. */
43
- projectName: string;
44
- /** Absolute path to the target directory. */
45
- targetDir: string;
46
- }
@@ -1,42 +0,0 @@
1
- /**
2
- * Utility helpers for the `vis create` command.
3
- *
4
- * - Package name validation & sanitisation
5
- * - Directory emptiness / conflict checks
6
- * - Target directory resolution
7
- */
8
- /**
9
- * Validate an npm package name using the official `validate-npm-package-name` library.
10
- * Handles blacklisted names, core module conflicts, length limits, etc.
11
- * @param name Package name to validate.
12
- * @returns `true` when `name` is valid for new npm packages.
13
- */
14
- export declare const isValidPackageName: (name: string) => boolean;
15
- /**
16
- * Sanitise an arbitrary string into a valid npm package name.
17
- * @param raw Arbitrary string to sanitise.
18
- * @returns Lowercased, hyphen-separated name with special chars stripped.
19
- */
20
- export declare const toValidPackageName: (raw: string) => string;
21
- /**
22
- * Check if a directory is empty or contains only ignored files (.DS_Store, .git, etc.).
23
- * @param dir Absolute path to check.
24
- * @returns `true` when `dir` does not exist or contains only ignored files.
25
- */
26
- export declare const isEmptyDir: (dir: string) => boolean;
27
- /**
28
- * Resolve `projectName` relative to `cwd` into an absolute target directory path.
29
- * @param projectName Project name or relative path.
30
- * @param cwd Base directory to resolve from.
31
- * @returns Object with absolute `targetDir` and sanitised `packageName`.
32
- */
33
- export declare const resolveTargetDir: (projectName: string, cwd: string) => {
34
- packageName: string;
35
- targetDir: string;
36
- };
37
- /**
38
- * Check whether scaffolding can proceed without overwriting user files.
39
- * @param dir Absolute path to the target directory.
40
- * @returns `true` when the directory is safe to write into (empty or non-existent).
41
- */
42
- export declare const canSafelyOverwrite: (dir: string) => boolean;
@@ -1,3 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- declare const dedupe: Command;
3
- export default dedupe;
@@ -1,3 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- declare const devcontainer: Command;
3
- export default devcontainer;
@@ -1,3 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- declare const dlx: Command;
3
- export default dlx;
@@ -1,15 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- /**
3
- * `vis doctor` — unified project health check.
4
- *
5
- * Runs all diagnostic scans in parallel (outdated, vulnerabilities,
6
- * Socket.dev scores, duplicates, optimization opportunities) and
7
- * displays a single dashboard with actionable next steps.
8
- * @example
9
- * ```sh
10
- * vis doctor # full health check
11
- * vis doctor --json # machine-readable output
12
- * ```
13
- */
14
- declare const doctor: Command;
15
- export default doctor;
@@ -1,3 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- declare const exec: Command;
3
- export default exec;
@@ -1,3 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- declare const graph: Command;
3
- export default graph;
@@ -1,8 +0,0 @@
1
- declare const HOOKS: readonly ["pre-commit", "pre-merge-commit", "prepare-commit-msg", "commit-msg", "post-commit", "applypatch-msg", "pre-applypatch", "post-applypatch", "pre-rebase", "post-rewrite", "post-checkout", "post-merge", "pre-push", "pre-auto-gc"];
2
- declare const DEFAULT_HOOKS_DIRECTORY = ".vis-hooks";
3
- interface InstallResult {
4
- isError: boolean;
5
- message: string;
6
- }
7
- export type { InstallResult };
8
- export { DEFAULT_HOOKS_DIRECTORY, HOOKS };
@@ -1,3 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- declare const hook: Command;
3
- export default hook;
@@ -1,7 +0,0 @@
1
- import type { InstallResult } from "./constants.d.ts";
2
- /**
3
- * Generates the shell script that dispatches to user-defined hooks.
4
- */
5
- declare const hookScript: (directory: string) => string;
6
- declare const installHooks: (directory?: string) => InstallResult;
7
- export { hookScript, installHooks };
@@ -1,27 +0,0 @@
1
- import type { PackageManagerType } from "../migrate/types.d.ts";
2
- import type { InstallResult } from "./constants.d.ts";
3
- /**
4
- * Detects which husky directory is in use, if any.
5
- */
6
- declare const detectHuskyDirectory: (root: string) => string | undefined;
7
- /**
8
- * Transforms a husky hook script for vis.
9
- * Removes the common.sh sourcing line since vis handles PATH setup in its dispatcher.
10
- */
11
- declare const transformHookScript: (content: string) => string;
12
- /**
13
- * Detects the package manager used in the project.
14
- */
15
- declare const detectPackageManager: (root: string) => PackageManagerType;
16
- /**
17
- * Cleans husky references from package.json scripts.
18
- */
19
- declare const cleanPackageJsonScripts: (root: string) => {
20
- modified: boolean;
21
- removedScriptReferences: string[];
22
- };
23
- /**
24
- * Migrates from husky to vis hooks.
25
- */
26
- declare const migrateFromHusky: (root: string, hooksDirectory: string, logger: Console) => InstallResult;
27
- export { cleanPackageJsonScripts, detectHuskyDirectory, detectPackageManager, migrateFromHusky, transformHookScript };
@@ -1,3 +0,0 @@
1
- import type { InstallResult } from "./constants.d.ts";
2
- declare const uninstallHooks: (directory?: string) => InstallResult;
3
- export { uninstallHooks };
@@ -1,3 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- declare const implode: Command;
3
- export default implode;
@@ -1,14 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- /**
3
- * `vis init` — initialize vis configuration with secure defaults.
4
- *
5
- * In interactive mode (`--interactive` or TTY default), guides the user through:
6
- * 1. Socket.dev security scanning (opt-in)
7
- * 2. Build script approval (scans node_modules)
8
- * 3. Git hooks / lint-staged setup
9
- * 4. Native PM config sync
10
- *
11
- * In non-interactive mode (CI, piped), creates a minimal config with secure defaults.
12
- */
13
- declare const init: Command;
14
- export default init;
@@ -1,3 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- declare const install: Command;
3
- export default install;
@@ -1,3 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- declare const link: Command;
3
- export default link;
@@ -1,12 +0,0 @@
1
- declare const LINT_STAGED_JSON_CONFIG_FILES: readonly [".lintstagedrc.json", ".lintstagedrc"];
2
- declare const LINT_STAGED_OTHER_CONFIG_FILES: readonly [".lintstagedrc.yaml", ".lintstagedrc.yml", ".lintstagedrc.mjs", "lint-staged.config.mjs", ".lintstagedrc.cjs", "lint-staged.config.cjs", ".lintstagedrc.js", "lint-staged.config.js", ".lintstagedrc.ts", "lint-staged.config.ts", ".lintstagedrc.mts", "lint-staged.config.mts", ".lintstagedrc.cts", "lint-staged.config.cts"];
3
- declare const LINT_STAGED_ALL_CONFIG_FILES: ReadonlyArray<string>;
4
- declare const STALE_LINT_STAGED_PATTERNS: ReadonlyArray<RegExp>;
5
- declare const REPLACED_PACKAGES: readonly ["husky", "lint-staged"];
6
- declare const HUSKY_SCRIPT_PATTERNS: ReadonlyArray<RegExp>;
7
- /**
8
- * Remove husky references from a single script value.
9
- * Returns the cleaned script, or undefined if the entire script should be removed.
10
- */
11
- declare const cleanHuskyFromScript: (scriptValue: string) => string | undefined;
12
- export { cleanHuskyFromScript, HUSKY_SCRIPT_PATTERNS, LINT_STAGED_ALL_CONFIG_FILES, LINT_STAGED_JSON_CONFIG_FILES, LINT_STAGED_OTHER_CONFIG_FILES, REPLACED_PACKAGES, STALE_LINT_STAGED_PATTERNS, };
@@ -1,32 +0,0 @@
1
- import type { VisConfig } from "../../workspace.d.ts";
2
- import type { MigrationReport, PackageManagerType } from "./types.d.ts";
3
- interface MigrateLogger {
4
- info: (message: string) => void;
5
- warn: (message: string) => void;
6
- }
7
- /**
8
- * Rewrite scripts in package.json to replace husky/lint-staged references.
9
- */
10
- declare const rewriteScripts: (scripts: Record<string, string>, report: MigrationReport) => {
11
- modified: boolean;
12
- scripts: Record<string, string>;
13
- };
14
- /**
15
- * Rewrite a single package.json: remove replaced packages, add overrides, rewrite scripts.
16
- */
17
- declare const rewritePackageJson: (root: string, packageManager: PackageManagerType, overrides: Record<string, string>, report: MigrationReport) => void;
18
- /**
19
- * Iterate over all workspace packages and rewrite their package.json files.
20
- */
21
- declare const migrateMonorepoPackages: (root: string, packageManager: PackageManagerType, overrides: Record<string, string>, report: MigrationReport) => void;
22
- /**
23
- * Update pnpm-workspace.yaml catalog with override entries.
24
- */
25
- declare const updatePnpmWorkspaceCatalog: (root: string, overrides: Record<string, string>) => void;
26
- /**
27
- * Top-level orchestrator for dependency migration.
28
- */
29
- declare const migrateDeps: (root: string, packageManager: PackageManagerType, visConfig: VisConfig, options: {
30
- dryRun: boolean;
31
- }, logger: MigrateLogger, report: MigrationReport) => void;
32
- export { migrateDeps, migrateMonorepoPackages, rewritePackageJson, rewriteScripts, updatePnpmWorkspaceCatalog };
@@ -1,3 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- declare const migrate: Command;
3
- export default migrate;
@@ -1,20 +0,0 @@
1
- /**
2
- * Reads and parses a JSON file. Returns undefined if the file doesn't exist or isn't valid JSON.
3
- */
4
- declare const readJsonFile: <T>(filePath: string) => T | undefined;
5
- /**
6
- * Checks if a file exists and contains valid JSON.
7
- */
8
- declare const isJsonFile: (filePath: string) => boolean;
9
- /**
10
- * Detect the indentation used in a JSON file by looking at the first indented line.
11
- */
12
- declare const detectJsonIndent: (content: string) => number;
13
- /**
14
- * Edits a JSON file in place using a mutator function.
15
- * The mutator receives the parsed data and should return the modified data,
16
- * or undefined to skip writing. Returns true if the file was modified.
17
- * Preserves the original indentation style.
18
- */
19
- declare const editJsonFile: <T>(filePath: string, mutator: (data: T) => T | undefined) => boolean;
20
- export { detectJsonIndent, editJsonFile, isJsonFile, readJsonFile };
@@ -1,62 +0,0 @@
1
- import type { MigrationReport } from "./types.d.ts";
2
- interface MigrateLogger {
3
- info: (message: string) => void;
4
- warn: (message: string) => void;
5
- }
6
- /**
7
- * Check if a standalone lint-staged config file exists.
8
- */
9
- declare const hasStandaloneLintStagedConfig: (root: string) => boolean;
10
- /**
11
- * Check if a standalone lint-staged config exists in a format that can't be
12
- * auto-migrated (non-JSON files like .yaml, .mjs, .cjs, .js, or a non-JSON .lintstagedrc).
13
- */
14
- declare const hasUnsupportedLintStagedConfig: (root: string) => boolean;
15
- /**
16
- * Check if vis.config.ts already has a `staged` config key.
17
- */
18
- declare const hasStagedConfigInVisConfig: (root: string) => boolean;
19
- /**
20
- * Detect lint-staged config: returns the source ("package.json", a filename, or undefined).
21
- */
22
- declare const detectLintStagedConfig: (root: string) => string | undefined;
23
- /**
24
- * Extract lint-staged config from package.json.
25
- */
26
- declare const extractLintStagedFromPackageJson: (root: string) => Record<string, string | string[]> | undefined;
27
- /**
28
- * Parse a JSON lint-staged config file.
29
- */
30
- declare const parseLintStagedJsonFile: (filePath: string) => Record<string, string | string[]> | undefined;
31
- /**
32
- * Generate a TypeScript snippet for the staged block.
33
- */
34
- declare const generateStagedConfigSnippet: (config: Record<string, string | string[]>) => string;
35
- /**
36
- * Insert staged config into vis.config.ts. Creates the file if it doesn't exist.
37
- */
38
- declare const insertStagedIntoVisConfig: (root: string, config: Record<string, string | string[]>, logger: MigrateLogger) => boolean;
39
- /**
40
- * Remove `lint-staged` key, config, and dependency from package.json in a single read/write.
41
- * Returns which removals were performed.
42
- */
43
- declare const removeLintStagedFromPackageJson: (root: string) => {
44
- configRemoved: boolean;
45
- dependencyRemoved: boolean;
46
- };
47
- /**
48
- * Remove standalone lint-staged config files.
49
- */
50
- declare const removeLintStagedConfigFiles: (root: string, report: MigrationReport) => void;
51
- /**
52
- * Rewrite pre-commit hook to replace lint-staged invocations with `vis staged`.
53
- */
54
- declare const rewritePreCommitHook: (root: string, hooksDirectory: string) => boolean;
55
- /**
56
- * Migrates lint-staged configuration to vis.config.ts staged block.
57
- */
58
- declare const migrateLintStaged: (root: string, options: {
59
- dryRun: boolean;
60
- silent?: boolean;
61
- }, logger: MigrateLogger, report: MigrationReport) => boolean;
62
- export { detectLintStagedConfig, extractLintStagedFromPackageJson, generateStagedConfigSnippet, hasStagedConfigInVisConfig, hasStandaloneLintStagedConfig, hasUnsupportedLintStagedConfig, insertStagedIntoVisConfig, migrateLintStaged, parseLintStagedJsonFile, removeLintStagedConfigFiles, removeLintStagedFromPackageJson, rewritePreCommitHook, };
@@ -1,20 +0,0 @@
1
- interface MigrateLogger {
2
- info: (message: string) => void;
3
- warn: (message: string) => void;
4
- }
5
- interface MigrationReport {
6
- gitHooksConfigured: boolean;
7
- inlinedLintStagedConfigCount: number;
8
- manualSteps: string[];
9
- mergedStagedConfigCount: number;
10
- removedConfigCount: number;
11
- removedPackageCount: number;
12
- rewrittenScriptCount: number;
13
- warnings: string[];
14
- }
15
- declare const createMigrationReport: () => MigrationReport;
16
- declare const addMigrationWarning: (report: MigrationReport | undefined, warning: string) => void;
17
- declare const addManualStep: (report: MigrationReport | undefined, step: string) => void;
18
- type PackageManagerType = "bun" | "npm" | "pnpm" | "yarn";
19
- export type { MigrateLogger, MigrationReport, PackageManagerType };
20
- export { addManualStep, addMigrationWarning, createMigrationReport };
@@ -1,38 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- import type { PmInfo } from "../overrides.d.ts";
3
- import type { OptimizeEntry } from "../tui/components/optimize/OptimizeStore.d.ts";
4
- /** Collects dependency names from a `package.json`. */
5
- declare const collectDepsFromPkgJson: (pkgJsonPath: string, productionOnly: boolean) => Set<string>;
6
- /** Discovers workspace package directories. */
7
- declare const discoverWorkspacePackages: (workspaceRoot: string) => string[];
8
- /** Scans deps against e18e module-replacements manifests. */
9
- declare const buildE18eEntries: (allDeps: Set<string>) => OptimizeEntry[];
10
- /** Scans deps against @socketregistry manifest. */
11
- declare const buildSocketEntries: (allDeps: Set<string>, lockText: string, pm: PmInfo, pin: boolean) => OptimizeEntry[];
12
- /** Marks e18e entries that have codemods available. */
13
- declare const markCodemodAvailability: (entries: OptimizeEntry[]) => Promise<void>;
14
- interface CodemodResult {
15
- filesChanged: number;
16
- packageName: string;
17
- }
18
- /**
19
- * Runs a codemod for a single package across all source files in the project.
20
- * Returns the number of files modified.
21
- */
22
- declare const runCodemod: (workspaceRoot: string, packageName: string) => Promise<CodemodResult>;
23
- /**
24
- * `vis optimize` — two-phase dependency optimization with interactive TUI.
25
- *
26
- * **Phase 1 (e18e):** Identifies packages replaceable with native builtins or lighter
27
- * alternatives using `module-replacements` manifests. Runs source code codemods via
28
- * `module-replacements-codemods` for selected entries.
29
- *
30
- * **Phase 2 (Socket.dev):** Writes override/resolution entries for packages that have
31
- * security-hardened `@socketregistry` alternatives.
32
- *
33
- * In TTY mode, presents an interactive TUI (like `vis update`) where users select
34
- * which optimizations to apply. In non-TTY/CI mode, outputs a static report.
35
- */
36
- declare const optimize: Command;
37
- export default optimize;
38
- export { buildE18eEntries, buildSocketEntries, collectDepsFromPkgJson, discoverWorkspacePackages, markCodemodAvailability, runCodemod };
@@ -1,3 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- declare const pm: Command;
3
- export default pm;
@@ -1,3 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- declare const remove: Command;
3
- export default remove;
@@ -1,3 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- declare const run: Command;
3
- export default run;
@@ -1,3 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- declare const sortPackageJson: Command;
3
- export default sortPackageJson;
@@ -1,3 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- declare const staged: Command;
3
- export default staged;
@@ -1,3 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- declare const unlink: Command;
3
- export default unlink;
@@ -1,3 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- declare const update: Command;
3
- export default update;
@@ -1,3 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- declare const upgrade: Command;
3
- export default upgrade;
@@ -1,3 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- declare const why: Command;
3
- export default why;
package/dist/config.d.ts DELETED
@@ -1,67 +0,0 @@
1
- import type { VisConfig } from "./workspace.d.ts";
2
- /** Supported config file names, checked in order. */
3
- declare const CONFIG_FILES: string[];
4
- /**
5
- * Secure-by-default security settings based on npm supply chain best practices.
6
- *
7
- * These defaults are applied automatically when using `defineConfig()` or `loadVisConfig()`.
8
- * Users can override any value — their settings always take precedence.
9
- * @see https://github.com/lirantal/awesome-npm-security-best-practices
10
- */
11
- declare const SECURITY_DEFAULTS: Required<Pick<NonNullable<VisConfig["security"]>, "blockExoticSubdeps" | "minimumReleaseAge" | "strictDepBuilds" | "trustPolicy" | "trustPolicyIgnoreAfter">>;
12
- /**
13
- * Apply secure defaults to a raw config object.
14
- * Merges `SECURITY_DEFAULTS` into `config.security`, preserving all user overrides.
15
- */
16
- declare const applyDefaults: (config: VisConfig) => VisConfig;
17
- /**
18
- * Find the vis config file in a directory.
19
- * @param directory The directory to search in.
20
- * @returns The absolute path to the config file, or `undefined` if not found.
21
- */
22
- declare const findVisConfigFile: (directory: string) => string | undefined;
23
- /**
24
- * Load the vis configuration from a `vis.config.ts` (or `.js`, `.mjs`, `.cjs`, `.mts`, `.cts`) file.
25
- *
26
- * Uses a file-hash based cache to avoid repeated jiti compilations.
27
- * Falls back to secure defaults if no config file is found.
28
- * @param workspaceRoot The workspace root directory to search for the config file.
29
- * @returns The loaded and resolved configuration with secure defaults applied.
30
- */
31
- declare const loadVisConfig: (workspaceRoot: string) => Promise<VisConfig>;
32
- /**
33
- * Type-safe helper for defining vis configuration.
34
- * Provides full TypeScript autocomplete when used in `vis.config.ts`.
35
- *
36
- * Secure defaults are applied automatically — you only need to specify overrides.
37
- * To see the active defaults, run `vis check --security-config`.
38
- * @example
39
- * ```typescript
40
- * // vis.config.ts — minimal config, fully secured by defaults
41
- * import { defineConfig } from "@visulima/vis/config";
42
- *
43
- * export default defineConfig({
44
- * security: {
45
- * allowBuilds: {
46
- * esbuild: true,
47
- * "@prisma/client": true,
48
- * },
49
- * },
50
- * });
51
- * ```
52
- * @example
53
- * ```typescript
54
- * // vis.config.ts — override a default
55
- * import { defineConfig } from "@visulima/vis/config";
56
- *
57
- * export default defineConfig({
58
- * security: {
59
- * // Relax cooldown to 24 hours instead of the default 14 days
60
- * minimumReleaseAge: 1440,
61
- * allowBuilds: { esbuild: true },
62
- * },
63
- * });
64
- * ```
65
- */
66
- declare const defineConfig: (config: VisConfig) => VisConfig;
67
- export { applyDefaults, CONFIG_FILES, defineConfig, findVisConfigFile, loadVisConfig, SECURITY_DEFAULTS };
package/dist/config.js DELETED
@@ -1 +0,0 @@
1
- var h=Object.defineProperty;var u=(e,t)=>h(e,"name",{value:t,configurable:!0});import{createRequire as C}from"node:module";import{findCacheDirSync as w}from"@visulima/find-cache-dir";import{ensureDirSync as p,isAccessibleSync as D,readJsonSync as I,writeJsonSync as x}from"@visulima/fs";import{join as o,dirname as E}from"@visulima/path";import{createJiti as P}from"jiti";const v=C(import.meta.url),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,d=u(e=>{if(typeof r<"u"&&r.versions&&r.versions.node){const[t,s]=r.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return r.getBuiltinModule(e)}return v(e)},"__cjs_getBuiltinModule"),{createHash:_}=d("node:crypto"),{existsSync:y,readFileSync:S,copyFileSync:j,unlinkSync:b}=d("node:fs"),{tmpdir:F}=d("node:os");var T=Object.defineProperty,i=u((e,t)=>T(e,"name",{value:t,configurable:!0}),"e");const A=["vis.config.ts","vis.config.mts","vis.config.cts","vis.config.js","vis.config.mjs","vis.config.cjs"],J={blockExoticSubdeps:!0,minimumReleaseAge:20160,strictDepBuilds:!0,trustPolicy:"no-downgrade",trustPolicyIgnoreAfter:43200},R=i(e=>({...J,...e}),"mergeSecurityDefaults"),l=i(e=>({...e,security:R(e.security),update:{security:!0,target:"minor",...e.update}}),"applyDefaults"),V=i(e=>{for(const t of A){const s=o(e,t);if(y(s))return s}},"findVisConfigFile"),k=i(e=>_("sha256").update(S(e)).digest("hex"),"hashFileContents"),q=i(e=>{const t=o(e,"node_modules");if(y(t)){const n=o(t,".cache","vis");return p(n),o(n,"vis-config-cache.json")}const s=w("vis",{create:!0,cwd:e});return s?o(s,"vis-config-cache.json"):void 0},"getConfigCachePath"),B=i((e,t)=>{if(D(e))try{const s=I(e);if(s.hash===t)return s.config}catch{}},"readConfigCache"),N=i((e,t,s)=>{try{p(E(e)),x(e,{config:s,hash:t})}catch{}},"writeConfigCache"),H=i(async e=>{const t=V(e);if(!t)return l({});const s=k(t),n=q(e);if(n){const g=B(n,s);if(g)return g}const m=t.slice(t.lastIndexOf(".")),a=o(F(),`vis-config-${s}${m}`);j(t,a);let c;try{c=await P(e,{fsCache:!1,moduleCache:!1}).import(a,{default:!0,try:!0})??{}}finally{try{b(a)}catch{}}let f;return f=l(typeof c=="function"?await c()??{}:c),n&&N(n,s,f),f},"loadVisConfig"),Y=i(e=>l(e),"defineConfig");export{A as CONFIG_FILES,J as SECURITY_DEFAULTS,l as applyDefaults,Y as defineConfig,V as findVisConfigFile,H as loadVisConfig};