@visulima/vis 1.0.0-alpha.8 → 1.0.0-alpha.9

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 (280) hide show
  1. package/CHANGELOG.md +90 -57
  2. package/LICENSE.md +44 -1
  3. package/README.md +56 -0
  4. package/dist/bin.js +1 -1003
  5. package/dist/config.d.ts +1073 -68
  6. package/dist/config.js +1 -1
  7. package/dist/generate/index.d.ts +155 -30
  8. package/dist/packem_chunks/handler.js +1 -0
  9. package/dist/packem_chunks/handler10.js +1 -0
  10. package/dist/packem_chunks/handler11.js +1 -0
  11. package/dist/packem_chunks/handler12.js +153 -0
  12. package/dist/packem_chunks/handler13.js +1 -0
  13. package/dist/packem_chunks/handler14.js +3 -0
  14. package/dist/packem_chunks/handler15.js +1 -0
  15. package/dist/packem_chunks/handler16.js +2 -0
  16. package/dist/packem_chunks/handler17.js +7 -0
  17. package/dist/packem_chunks/handler18.js +1 -0
  18. package/dist/packem_chunks/handler19.js +19 -0
  19. package/dist/packem_chunks/handler2.js +1 -0
  20. package/dist/packem_chunks/handler20.js +428 -0
  21. package/dist/packem_chunks/handler21.js +22 -0
  22. package/dist/packem_chunks/handler22.js +3 -0
  23. package/dist/packem_chunks/handler23.js +5 -0
  24. package/dist/packem_chunks/handler24.js +1 -0
  25. package/dist/packem_chunks/handler25.js +20 -0
  26. package/dist/packem_chunks/handler26.js +1 -0
  27. package/dist/packem_chunks/handler27.js +1 -0
  28. package/dist/packem_chunks/handler28.js +1 -0
  29. package/dist/packem_chunks/handler29.js +2 -0
  30. package/dist/packem_chunks/handler3.js +2 -0
  31. package/dist/packem_chunks/handler30.js +22 -0
  32. package/dist/packem_chunks/handler31.js +1 -0
  33. package/dist/packem_chunks/handler32.js +1 -0
  34. package/dist/packem_chunks/handler33.js +37 -0
  35. package/dist/packem_chunks/handler34.js +3 -0
  36. package/dist/packem_chunks/handler35.js +23 -0
  37. package/dist/packem_chunks/handler36.js +5 -0
  38. package/dist/packem_chunks/handler37.js +27 -0
  39. package/dist/packem_chunks/handler38.js +1 -0
  40. package/dist/packem_chunks/handler39.js +2 -0
  41. package/dist/packem_chunks/handler4.js +5 -0
  42. package/dist/packem_chunks/handler40.js +1 -0
  43. package/dist/packem_chunks/handler41.js +5 -0
  44. package/dist/packem_chunks/handler42.js +1 -0
  45. package/dist/packem_chunks/handler43.js +24 -0
  46. package/dist/packem_chunks/handler44.js +3 -0
  47. package/dist/packem_chunks/handler45.js +1 -0
  48. package/dist/packem_chunks/handler5.js +4 -0
  49. package/dist/packem_chunks/handler6.js +2 -0
  50. package/dist/packem_chunks/handler7.js +24 -0
  51. package/dist/packem_chunks/handler8.js +6 -0
  52. package/dist/packem_chunks/handler9.js +8 -0
  53. package/dist/packem_shared/VisUpdateApp-BBx3idMI.js +1 -0
  54. package/dist/packem_shared/ai-analysis-DDqXRFxY.js +67 -0
  55. package/dist/packem_shared/bin-BaZZ32BK.js +93 -0
  56. package/dist/packem_shared/cache-directory-DL8hfXeG.js +1 -0
  57. package/dist/packem_shared/catalog-CuSpuB_R.js +12 -0
  58. package/dist/packem_shared/dependency-scan-BoLG2Fez.js +1 -0
  59. package/dist/packem_shared/docker-BcfqH4Av.js +2 -0
  60. package/dist/packem_shared/flakiness-DSIHZGBT.js +1 -0
  61. package/dist/packem_shared/otelPlugin-DxyvBcXO.js +1 -0
  62. package/dist/packem_shared/runtime-check-CGHal8SO.js +1 -0
  63. package/dist/packem_shared/selectors-CfH9ZY08.js +3 -0
  64. package/dist/packem_shared/symbols-CIMw60-G.js +1 -0
  65. package/dist/packem_shared/toolchain-C3ZG0o_X.js +5 -0
  66. package/dist/packem_shared/typosquats-Bpq4zcWL.js +1 -0
  67. package/dist/packem_shared/utils-DrNg0XTR.js +1 -0
  68. package/index.js +555 -727
  69. package/package.json +27 -19
  70. package/schemas/project.schema.json +1 -1
  71. package/schemas/vis-config.schema.json +47 -1
  72. package/dist/ai-analysis.d.ts +0 -26
  73. package/dist/ai-cache.d.ts +0 -21
  74. package/dist/ai-types.d.ts +0 -16
  75. package/dist/audit-config.d.ts +0 -24
  76. package/dist/bin.d.ts +0 -1
  77. package/dist/cache-directory.d.ts +0 -73
  78. package/dist/catalog.d.ts +0 -136
  79. package/dist/codeowners.d.ts +0 -30
  80. package/dist/commands/action-graph.d.ts +0 -8
  81. package/dist/commands/add.d.ts +0 -3
  82. package/dist/commands/affected.d.ts +0 -3
  83. package/dist/commands/ai.d.ts +0 -3
  84. package/dist/commands/analyze.d.ts +0 -3
  85. package/dist/commands/approve-builds.d.ts +0 -3
  86. package/dist/commands/audit.d.ts +0 -23
  87. package/dist/commands/cache.d.ts +0 -86
  88. package/dist/commands/check.d.ts +0 -3
  89. package/dist/commands/ci.d.ts +0 -19
  90. package/dist/commands/clean.d.ts +0 -3
  91. package/dist/commands/create/discovery.d.ts +0 -42
  92. package/dist/commands/create/index.d.ts +0 -13
  93. package/dist/commands/create/prompts.d.ts +0 -31
  94. package/dist/commands/create/random-name.d.ts +0 -15
  95. package/dist/commands/create/templates/builtin.d.ts +0 -15
  96. package/dist/commands/create/templates/generator.d.ts +0 -14
  97. package/dist/commands/create/templates/index.d.ts +0 -13
  98. package/dist/commands/create/templates/monorepo.d.ts +0 -16
  99. package/dist/commands/create/templates/remote.d.ts +0 -41
  100. package/dist/commands/create/templates/types.d.ts +0 -46
  101. package/dist/commands/create/utils.d.ts +0 -42
  102. package/dist/commands/dedupe.d.ts +0 -3
  103. package/dist/commands/devcontainer.d.ts +0 -3
  104. package/dist/commands/dlx.d.ts +0 -3
  105. package/dist/commands/docker.d.ts +0 -22
  106. package/dist/commands/doctor.d.ts +0 -15
  107. package/dist/commands/exec.d.ts +0 -3
  108. package/dist/commands/generate.d.ts +0 -10
  109. package/dist/commands/graph.d.ts +0 -3
  110. package/dist/commands/hook/constants.d.ts +0 -13
  111. package/dist/commands/hook/index.d.ts +0 -3
  112. package/dist/commands/hook/install.d.ts +0 -7
  113. package/dist/commands/hook/list.d.ts +0 -28
  114. package/dist/commands/hook/migrate.d.ts +0 -30
  115. package/dist/commands/hook/prek-builtins.d.ts +0 -8
  116. package/dist/commands/hook/prek.d.ts +0 -129
  117. package/dist/commands/hook/run.d.ts +0 -21
  118. package/dist/commands/hook/uninstall.d.ts +0 -3
  119. package/dist/commands/hook/validate.d.ts +0 -17
  120. package/dist/commands/ignore-helpers.d.ts +0 -157
  121. package/dist/commands/ignore.d.ts +0 -17
  122. package/dist/commands/implode.d.ts +0 -3
  123. package/dist/commands/info.d.ts +0 -3
  124. package/dist/commands/init.d.ts +0 -14
  125. package/dist/commands/install.d.ts +0 -3
  126. package/dist/commands/link.d.ts +0 -3
  127. package/dist/commands/list.d.ts +0 -3
  128. package/dist/commands/migrate/backup.d.ts +0 -8
  129. package/dist/commands/migrate/constants.d.ts +0 -16
  130. package/dist/commands/migrate/deps.d.ts +0 -32
  131. package/dist/commands/migrate/gitleaks.d.ts +0 -29
  132. package/dist/commands/migrate/index.d.ts +0 -3
  133. package/dist/commands/migrate/json.d.ts +0 -22
  134. package/dist/commands/migrate/kingfisher.d.ts +0 -14
  135. package/dist/commands/migrate/lint-staged.d.ts +0 -62
  136. package/dist/commands/migrate/moon.d.ts +0 -5
  137. package/dist/commands/migrate/nano-staged.d.ts +0 -30
  138. package/dist/commands/migrate/nx.d.ts +0 -12
  139. package/dist/commands/migrate/prompt.d.ts +0 -2
  140. package/dist/commands/migrate/secretlint.d.ts +0 -14
  141. package/dist/commands/migrate/shared.d.ts +0 -29
  142. package/dist/commands/migrate/turborepo.d.ts +0 -11
  143. package/dist/commands/migrate/types.d.ts +0 -27
  144. package/dist/commands/migrate/verify.d.ts +0 -12
  145. package/dist/commands/optimize.d.ts +0 -38
  146. package/dist/commands/pm.d.ts +0 -3
  147. package/dist/commands/remove.d.ts +0 -3
  148. package/dist/commands/run.d.ts +0 -16
  149. package/dist/commands/sbom.d.ts +0 -10
  150. package/dist/commands/secrets.d.ts +0 -3
  151. package/dist/commands/sort-package-json.d.ts +0 -3
  152. package/dist/commands/staged.d.ts +0 -10
  153. package/dist/commands/status.d.ts +0 -3
  154. package/dist/commands/sync.d.ts +0 -16
  155. package/dist/commands/task-why.d.ts +0 -3
  156. package/dist/commands/unlink.d.ts +0 -3
  157. package/dist/commands/update.d.ts +0 -3
  158. package/dist/commands/upgrade.d.ts +0 -3
  159. package/dist/commands/why.d.ts +0 -3
  160. package/dist/docker.d.ts +0 -73
  161. package/dist/flakiness.d.ts +0 -40
  162. package/dist/generate/discover.d.ts +0 -29
  163. package/dist/generate/loader.d.ts +0 -15
  164. package/dist/generate/moon-adapter/filename-interp.d.ts +0 -42
  165. package/dist/generate/moon-adapter/filters.d.ts +0 -22
  166. package/dist/generate/moon-adapter/frontmatter.d.ts +0 -39
  167. package/dist/generate/moon-adapter/index.d.ts +0 -19
  168. package/dist/generate/moon-adapter/tera-subset.d.ts +0 -85
  169. package/dist/generate/moon-adapter/util.d.ts +0 -14
  170. package/dist/generate/prompts.d.ts +0 -25
  171. package/dist/generate/remote.d.ts +0 -43
  172. package/dist/generate/runner.d.ts +0 -37
  173. package/dist/generate/types.d.ts +0 -152
  174. package/dist/hooks.d.ts +0 -118
  175. package/dist/native-binding.d.ts +0 -158
  176. package/dist/output.d.ts +0 -40
  177. package/dist/overrides.d.ts +0 -82
  178. package/dist/package-manager.d.ts +0 -23
  179. package/dist/packem_shared/otelPlugin-CJLkguJ8.js +0 -1
  180. package/dist/plugins/config-loader.d.ts +0 -3
  181. package/dist/plugins/otel.d.ts +0 -63
  182. package/dist/plugins/post-command.d.ts +0 -3
  183. package/dist/plugins/security-enforcement.d.ts +0 -3
  184. package/dist/pm-runner.d.ts +0 -44
  185. package/dist/run-report.d.ts +0 -40
  186. package/dist/runtime-check.d.ts +0 -27
  187. package/dist/sbom/cyclonedx.d.ts +0 -39
  188. package/dist/sbom/installed-package.d.ts +0 -49
  189. package/dist/sbom/license.d.ts +0 -31
  190. package/dist/sbom/lockfile.d.ts +0 -34
  191. package/dist/sbom/purl.d.ts +0 -25
  192. package/dist/sbom/resolve-specifier.d.ts +0 -24
  193. package/dist/sbom/types.d.ts +0 -196
  194. package/dist/secrets/baseline.d.ts +0 -20
  195. package/dist/secrets/format.d.ts +0 -14
  196. package/dist/secrets/git.d.ts +0 -6
  197. package/dist/secrets/spinner.d.ts +0 -9
  198. package/dist/security.d.ts +0 -64
  199. package/dist/selectors.d.ts +0 -81
  200. package/dist/shell-history.d.ts +0 -16
  201. package/dist/socket-security.d.ts +0 -129
  202. package/dist/staged/cli-parse.d.ts +0 -18
  203. package/dist/staged/config.d.ts +0 -14
  204. package/dist/staged/errors/apply-empty-commit-error.d.ts +0 -4
  205. package/dist/staged/errors/config-error.d.ts +0 -4
  206. package/dist/staged/errors/get-backup-stash-error.d.ts +0 -4
  207. package/dist/staged/errors/git-error.d.ts +0 -6
  208. package/dist/staged/errors/index.d.ts +0 -12
  209. package/dist/staged/errors/restore-original-state-error.d.ts +0 -4
  210. package/dist/staged/errors/staged-error.d.ts +0 -8
  211. package/dist/staged/errors/task-error.d.ts +0 -6
  212. package/dist/staged/git/diff.d.ts +0 -76
  213. package/dist/staged/git/exec.d.ts +0 -43
  214. package/dist/staged/git/index.d.ts +0 -77
  215. package/dist/staged/git/stash.d.ts +0 -37
  216. package/dist/staged/index.d.ts +0 -13
  217. package/dist/staged/match.d.ts +0 -12
  218. package/dist/staged/renderer/index.d.ts +0 -9
  219. package/dist/staged/renderer/ink/index.d.ts +0 -4
  220. package/dist/staged/renderer/plain.d.ts +0 -12
  221. package/dist/staged/tasks/build.d.ts +0 -13
  222. package/dist/staged/tasks/exec.d.ts +0 -56
  223. package/dist/staged/tasks/run.d.ts +0 -26
  224. package/dist/staged/types.d.ts +0 -173
  225. package/dist/target-discovery.d.ts +0 -59
  226. package/dist/target-options.d.ts +0 -261
  227. package/dist/tips.d.ts +0 -41
  228. package/dist/tui/components/CheckProgressApp.d.ts +0 -6
  229. package/dist/tui/components/CommandSummary.d.ts +0 -17
  230. package/dist/tui/components/Header.d.ts +0 -13
  231. package/dist/tui/components/OutputPanel.d.ts +0 -17
  232. package/dist/tui/components/QuitDialog.d.ts +0 -15
  233. package/dist/tui/components/TaskListPanel.d.ts +0 -19
  234. package/dist/tui/components/TaskRow.d.ts +0 -12
  235. package/dist/tui/components/TaskStore.d.ts +0 -80
  236. package/dist/tui/components/VisTaskRunnerApp.d.ts +0 -17
  237. package/dist/tui/components/devcontainer/DevcontainerStore.d.ts +0 -66
  238. package/dist/tui/components/devcontainer/VisDevcontainerApp.d.ts +0 -9
  239. package/dist/tui/components/devcontainer/catalogs/extensions.d.ts +0 -8
  240. package/dist/tui/components/devcontainer/catalogs/features.d.ts +0 -8
  241. package/dist/tui/components/devcontainer/catalogs/filters.d.ts +0 -4
  242. package/dist/tui/components/devcontainer/catalogs/mount-suggestions.d.ts +0 -19
  243. package/dist/tui/components/devcontainer/catalogs/templates.d.ts +0 -8
  244. package/dist/tui/components/devcontainer/devcontainer-io.d.ts +0 -14
  245. package/dist/tui/components/devcontainer/sections/DockerComposeSection.d.ts +0 -11
  246. package/dist/tui/components/devcontainer/sections/EnvironmentSection.d.ts +0 -16
  247. package/dist/tui/components/devcontainer/sections/ExtensionsSection.d.ts +0 -11
  248. package/dist/tui/components/devcontainer/sections/FeaturesSection.d.ts +0 -11
  249. package/dist/tui/components/devcontainer/sections/GeneralSection.d.ts +0 -12
  250. package/dist/tui/components/devcontainer/sections/LifecycleSection.d.ts +0 -13
  251. package/dist/tui/components/devcontainer/sections/MountsSection.d.ts +0 -16
  252. package/dist/tui/components/devcontainer/sections/PortsSection.d.ts +0 -10
  253. package/dist/tui/components/devcontainer/sections/PreviewPanel.d.ts +0 -11
  254. package/dist/tui/components/devcontainer/types.d.ts +0 -53
  255. package/dist/tui/components/devcontainer/validate.d.ts +0 -16
  256. package/dist/tui/components/graph/GraphStore.d.ts +0 -42
  257. package/dist/tui/components/graph/ProjectDetailPanel.d.ts +0 -10
  258. package/dist/tui/components/graph/ProjectListPanel.d.ts +0 -20
  259. package/dist/tui/components/graph/VisGraphApp.d.ts +0 -8
  260. package/dist/tui/components/optimize/OptimizeDetailPanel.d.ts +0 -9
  261. package/dist/tui/components/optimize/OptimizeListPanel.d.ts +0 -16
  262. package/dist/tui/components/optimize/OptimizeStore.d.ts +0 -50
  263. package/dist/tui/components/optimize/VisOptimizeApp.d.ts +0 -8
  264. package/dist/tui/components/optimize/constants.d.ts +0 -7
  265. package/dist/tui/components/update/PackageDetailPanel.d.ts +0 -12
  266. package/dist/tui/components/update/PackageListPanel.d.ts +0 -21
  267. package/dist/tui/components/update/UpdateStore.d.ts +0 -62
  268. package/dist/tui/components/update/VisUpdateApp.d.ts +0 -18
  269. package/dist/tui/dynamic-life-cycle.d.ts +0 -22
  270. package/dist/tui/formatting-utils.d.ts +0 -17
  271. package/dist/tui/pretty-time.d.ts +0 -8
  272. package/dist/tui/static-life-cycle.d.ts +0 -28
  273. package/dist/tui/status-utils.d.ts +0 -20
  274. package/dist/tui/symbols.d.ts +0 -7
  275. package/dist/tui/types.d.ts +0 -11
  276. package/dist/typosquats.d.ts +0 -70
  277. package/dist/upgrade-check.d.ts +0 -30
  278. package/dist/utils.d.ts +0 -22
  279. package/dist/watch.d.ts +0 -65
  280. package/dist/workspace.d.ts +0 -675
@@ -1,129 +0,0 @@
1
- import type { InstallResult } from "./constants.d.ts";
2
- interface PrekHookEntry {
3
- additional_dependencies?: string[];
4
- alias?: string;
5
- always_run?: boolean;
6
- args?: string[];
7
- description?: string;
8
- entry?: string;
9
- exclude?: string;
10
- exclude_types?: string[];
11
- files?: string;
12
- id?: string;
13
- language?: string;
14
- language_version?: string;
15
- name?: string;
16
- pass_filenames?: boolean;
17
- stages?: string[];
18
- types?: string[];
19
- types_or?: string[];
20
- verbose?: boolean;
21
- }
22
- interface PrekRepoEntry {
23
- hooks?: PrekHookEntry[];
24
- repo?: string;
25
- rev?: string;
26
- }
27
- interface PrekConfig {
28
- default_language_version?: Record<string, string>;
29
- default_stages?: string[];
30
- exclude?: string;
31
- fail_fast?: boolean;
32
- files?: string;
33
- repos?: PrekRepoEntry[];
34
- }
35
- interface SkippedHook {
36
- hookId: string;
37
- reason: string;
38
- repo: string;
39
- }
40
- interface AdditionalDep {
41
- hookId: string;
42
- name: string;
43
- raw: string;
44
- version: string;
45
- }
46
- interface ConversionResult {
47
- additionalDeps: AdditionalDep[];
48
- droppedFilters: string[];
49
- manualSteps: string[];
50
- scripts: Map<string, string>;
51
- skippedHooks: SkippedHook[];
52
- usesRunner: boolean;
53
- }
54
- interface MigrateLogger {
55
- info: (message: string) => void;
56
- warn: (message: string) => void;
57
- }
58
- declare const REMOTE_HOOK_BUILTIN_MAP: ReadonlyMap<string, string>;
59
- /**
60
- * Locate a prek config file under `root`. Returns the first match.
61
- */
62
- declare const detectPrekConfig: (root: string) => string | undefined;
63
- /**
64
- * Normalize a stage name, translating legacy pre-commit.com aliases.
65
- */
66
- declare const mapPrekStage: (stage: string) => string;
67
- /**
68
- * Reduce a repo URL (https/git/ssh) to an `owner/repo` slug for builtin lookup.
69
- */
70
- declare const normalizeRepoKey: (url: string) => string;
71
- /**
72
- * Parse a prek additional_dependencies entry into a (name, version) pair. Pip
73
- * specifiers (e.g. `black==24.1.0`) return undefined so the caller can warn.
74
- */
75
- declare const parseAdditionalDep: (spec: string) => {
76
- name: string;
77
- version: string;
78
- } | undefined;
79
- /**
80
- * Determine the target stages for a hook, falling back to config defaults then `[pre-commit]`.
81
- */
82
- declare const resolveStages: (entry: PrekHookEntry, defaultStages: string[] | undefined) => string[];
83
- /**
84
- * Build a shell command that routes through the prek-runner. All user strings
85
- * pass via argv, so shell meta-characters in patterns/args can't escape the
86
- * outer shell.
87
- */
88
- declare const buildRunnerInvocation: (entry: PrekHookEntry, builtin?: string) => string;
89
- /**
90
- * Build the shell command line for a single hook entry. Stages where git
91
- * passes an argument (commit-msg, prepare-commit-msg, post-*) bypass the
92
- * runner because pre-commit's filter semantics don't apply to them.
93
- */
94
- declare const buildHookCommand: (entry: PrekHookEntry, stage: string, builtin?: string) => string;
95
- /**
96
- * Convert a parsed prek config into a per-stage map of shell script bodies.
97
- * Hooks we cannot translate (remote repos, language-specific toolchains) are
98
- * reported back in `skippedHooks` for the caller to surface.
99
- */
100
- declare const convertPrekConfig: (config: PrekConfig) => ConversionResult;
101
- /**
102
- * Parse a prek YAML config. Returns undefined if the content is empty or malformed.
103
- */
104
- declare const parsePrekConfig: (content: string) => PrekConfig | undefined;
105
- /**
106
- * Load a prek config file from disk, dispatching to the YAML or TOML parser
107
- * based on the extension. TOML parsing is delegated to `@visulima/fs/toml`
108
- * (which wraps smol-toml), so we hit the same implementation the rest of the
109
- * codebase uses for TOML.
110
- */
111
- declare const loadPrekConfig: (configPath: string) => PrekConfig | undefined;
112
- /**
113
- * Merge collected additional_dependencies into the project's package.json
114
- * devDependencies. Doesn't run install — just updates the manifest and asks
115
- * the caller to run their package manager.
116
- */
117
- declare const mergeAdditionalDependencies: (root: string, deps: ReadonlyArray<AdditionalDep>) => {
118
- added: string[];
119
- skipped: string[];
120
- };
121
- interface MigrateOptions {
122
- dryRun?: boolean;
123
- }
124
- /**
125
- * Migrates a prek / pre-commit framework configuration to vis hooks.
126
- */
127
- declare const migrateFromPrek: (root: string, hooksDirectory: string, logger: MigrateLogger, options?: MigrateOptions) => InstallResult;
128
- export type { AdditionalDep, ConversionResult, MigrateOptions, PrekConfig, PrekHookEntry, PrekRepoEntry, SkippedHook };
129
- export { buildHookCommand, buildRunnerInvocation, convertPrekConfig, detectPrekConfig, loadPrekConfig, mapPrekStage, mergeAdditionalDependencies, migrateFromPrek, normalizeRepoKey, parseAdditionalDep, parsePrekConfig, REMOTE_HOOK_BUILTIN_MAP, resolveStages, };
@@ -1,21 +0,0 @@
1
- interface RunOptions {
2
- allFiles?: boolean;
3
- fromRef?: string;
4
- lastCommit?: boolean;
5
- stage?: string;
6
- toRef?: string;
7
- }
8
- interface RunLogger {
9
- info: (message: string) => void;
10
- }
11
- declare const DEFAULT_STAGE = "pre-commit";
12
- /**
13
- * Invoke a previously-installed `.vis-hooks/{stage}` script directly,
14
- * forwarding --all-files / --from-ref / --to-ref through environment variables
15
- * that the bundled prek-runner honours. This makes CI usage trivial: run the
16
- * same hook logic that fires at commit time, but over an explicit file set.
17
- */
18
- declare const runHookStage: (root: string, hooksDirectory: string, options: RunOptions, logger: RunLogger) => number;
19
- declare const runRun: (hooksDirectory: string, options: RunOptions, logger: RunLogger) => void;
20
- export type { RunLogger, RunOptions };
21
- export { DEFAULT_STAGE, runHookStage, runRun };
@@ -1,3 +0,0 @@
1
- import type { InstallResult } from "./constants.d.ts";
2
- declare const uninstallHooks: (directory?: string) => InstallResult;
3
- export { uninstallHooks };
@@ -1,17 +0,0 @@
1
- interface ValidationIssue {
2
- kind: "error" | "warning";
3
- message: string;
4
- path?: string;
5
- }
6
- interface ValidationResult {
7
- issues: ValidationIssue[];
8
- ok: boolean;
9
- }
10
- declare const validateHooks: (root: string, hooksDirectory: string) => ValidationResult;
11
- declare const formatValidationResult: (result: ValidationResult, hooksDirectory: string) => string[];
12
- declare const runValidate: (hooksDirectory: string, logger: {
13
- info: (message: string) => void;
14
- warn: (message: string) => void;
15
- }) => void;
16
- export type { ValidationIssue, ValidationResult };
17
- export { formatValidationResult, runValidate, validateHooks };
@@ -1,157 +0,0 @@
1
- /**
2
- * Pure helpers for `vis ignore`. Split from `ignore.ts` so tests can
3
- * exercise them without pulling in `@visulima/task-runner`, which
4
- * otherwise drags the whole run-graph module through ESM evaluation.
5
- */
6
- /** Commit-message tokens that unconditionally skip the build. */
7
- declare const SKIP_TOKENS: readonly ["[skip ci]", "[ci skip]", "[no ci]", "[vis skip]", "[nx skip]"];
8
- /** Commit-message tokens that unconditionally force the build. */
9
- declare const FORCE_TOKENS: readonly ["[vis deploy]", "[nx deploy]"];
10
- /**
11
- * Token prefixes accepted for per-project commit-message gating. `vis` is
12
- * the canonical form; `nx` is kept so teams migrating from `nx-ignore`
13
- * don't have to rewrite their commit automation.
14
- */
15
- declare const PER_PROJECT_TOKEN_PREFIXES: readonly ["vis", "nx"];
16
- /**
17
- * CI-provider environment variables carrying the previously deployed SHA,
18
- * probed in priority order. Only providers that *actually* invoke a custom
19
- * ignore script (Vercel, Netlify) or that we commonly wrap manually in a
20
- * preflight CI step (GitHub Actions, GitLab CI) are listed here.
21
- *
22
- * Cloudflare Pages / Render / Amplify are intentionally absent: they have
23
- * no custom-command hook, so shipping env detection for them would only
24
- * create the illusion of support.
25
- */
26
- declare const CI_BASE_SHA_ENV_VARS: readonly ["CACHED_COMMIT_REF", "VERCEL_GIT_PREVIOUS_SHA", "GITHUB_BASE_REF", "CI_COMMIT_BEFORE_SHA"];
27
- /** Machine-readable reason codes for the ignore decision. */
28
- type IgnoreReason = "commit-force-deploy" | "commit-skip" | "missing-project-argument" | "no-changes" | "project-affected" | "project-not-affected" | "project-unknown" | "workspace-error";
29
- /**
30
- * Structured decision record emitted on stdout in `--json` mode and
31
- * rendered as human text otherwise.
32
- */
33
- interface IgnoreDecision {
34
- /** "build" continues the deployment, "skip" cancels it. */
35
- action: "build" | "skip";
36
- /** The affected-project list, when the comparison actually ran. */
37
- affectedProjects?: string[];
38
- /** Base ref used for the affected comparison, if any. */
39
- base?: string;
40
- /** Head ref used for the affected comparison, if any. */
41
- head?: string;
42
- /** Human-readable reason message. */
43
- message: string;
44
- /** The project the decision applies to. */
45
- project: string;
46
- /** Stable reason code for scripting / analytics. */
47
- reason: IgnoreReason;
48
- }
49
- /** Extra fields that decisions from the affected-detection path carry. */
50
- type DecisionExtras = Partial<Pick<IgnoreDecision, "affectedProjects" | "base" | "head">>;
51
- /**
52
- * Returns the first non-empty value from the CI env var priority list,
53
- * or `undefined` if nothing is set. Reads from `env` (defaults to
54
- * `process.env`) so tests can inject fixtures without clobbering globals.
55
- * @param env Environment dictionary to probe. Defaults to `process.env`.
56
- * @returns The resolved base SHA (trimmed) or `undefined` if no known CI env var is set.
57
- */
58
- declare const resolveCiBaseSha: (env?: NodeJS.ProcessEnv) => string | undefined;
59
- /**
60
- * Throws if the given string contains characters outside the safe git-ref
61
- * alphabet or begins with a dash. Mirrors the validation used by
62
- * task-runner's affected logic and additionally rejects leading dashes to
63
- * prevent `git` option injection when the ref is passed as a positional
64
- * argument to `execFile("git", [...])`.
65
- * @param ref The git ref to validate (e.g. `"HEAD"`, `"main"`, `"abc123"`).
66
- * @throws {Error} If `ref` does not match `GIT_REF_RE`. Returns `void` on success.
67
- */
68
- declare const validateGitRef: (ref: string) => void;
69
- /**
70
- * Returns `true` if `ref` resolves to a commit object in the given repo.
71
- * Used to detect unreachable base refs (e.g. Vercel's shallow clone) so
72
- * we can silently fall back to `HEAD~1`.
73
- * @param cwd Absolute path to the git repository's working directory.
74
- * @param ref The git ref to probe. Should already be validated by `validateGitRef` to avoid `git` option injection.
75
- * @returns `true` if the ref resolves to a commit, `false` otherwise (including when `git` itself fails or is unavailable).
76
- */
77
- declare const isRefReachable: (cwd: string, ref: string) => Promise<boolean>;
78
- /**
79
- * Reads the subject+body of the most recent commit. Returns an empty
80
- * string on any failure — the caller treats missing messages as "no
81
- * keywords present" rather than erroring out.
82
- * @param cwd Absolute path to the git repository's working directory.
83
- * @returns The raw commit message (subject + body), or `""` on failure.
84
- */
85
- declare const readLastCommitMessage: (cwd: string) => Promise<string>;
86
- /**
87
- * Returns `true` if the commit message contains a per-project token of
88
- * the form `[&lt;prefix> &lt;verb> &lt;project>]` for any of the supported
89
- * prefixes (`vis` or the legacy `nx`).
90
- * @param message Raw commit message to scan.
91
- * @param verb The action verb embedded in the token (`"skip"` or `"deploy"`).
92
- * @param project The project name the token is scoped to.
93
- * @returns `true` on the first matching token, `false` otherwise.
94
- */
95
- declare const matchesPerProjectToken: (message: string, verb: "deploy" | "skip", project: string) => boolean;
96
- /**
97
- * Returns `true` if the commit message contains any skip token,
98
- * including the per-project form `[vis skip &lt;project>]`. Accepts both
99
- * `vis` and legacy `nx` tokens so users migrating from nx-ignore don't
100
- * need to rewrite their commit automation.
101
- * @param message Raw commit message to scan.
102
- * @param project The project whose per-project tokens should also match.
103
- * @returns `true` if any skip token is present, `false` otherwise.
104
- */
105
- declare const commitHasSkipMessage: (message: string, project: string) => boolean;
106
- /**
107
- * Returns `true` if the commit message contains any force-deploy token,
108
- * including the per-project form `[vis deploy &lt;project>]`.
109
- * @param message Raw commit message to scan.
110
- * @param project The project whose per-project tokens should also match.
111
- * @returns `true` if any force-deploy token is present, `false` otherwise.
112
- */
113
- declare const commitHasForceDeployMessage: (message: string, project: string) => boolean;
114
- /**
115
- * Builds a `"build"` decision record. Factory helper that collapses the
116
- * otherwise-repetitive object literals in `ignore.ts`.
117
- * @param project The project the decision applies to.
118
- * @param reason Stable reason code.
119
- * @param message Human-readable message.
120
- * @param extra Optional base/head/affectedProjects when available.
121
- * @returns A fully-populated `IgnoreDecision` with `action: "build"`.
122
- */
123
- declare const decideBuild: (project: string, reason: IgnoreReason, message: string, extra?: DecisionExtras) => IgnoreDecision;
124
- /**
125
- * Builds a `"skip"` decision record. Companion to `decideBuild`.
126
- * @param project The project the decision applies to.
127
- * @param reason Stable reason code.
128
- * @param message Human-readable message.
129
- * @param extra Optional base/head/affectedProjects when available.
130
- * @returns A fully-populated `IgnoreDecision` with `action: "skip"`.
131
- */
132
- declare const decideSkip: (project: string, reason: IgnoreReason, message: string, extra?: DecisionExtras) => IgnoreDecision;
133
- /**
134
- * Renders a decision as a single human-readable line. Pure formatter;
135
- * doesn't print anything itself.
136
- * @param decision The decision to format.
137
- * @returns A one-line string with an emoji prefix and the message.
138
- */
139
- declare const formatDecisionLine: (decision: IgnoreDecision) => string;
140
- /**
141
- * Maps a decision to its process exit code, honoring
142
- * `--exit-zero-on-build` for users who want normal exit semantics.
143
- *
144
- * Default:
145
- * skip → 0 (platform cancels)
146
- * build → 1 (platform continues)
147
- *
148
- * With --exit-zero-on-build:
149
- * skip → 0
150
- * build → 0
151
- * @param decision The decision to map.
152
- * @param exitZeroOnBuild If `true`, builds exit with `0` instead of `1`.
153
- * @returns The literal exit code (`0` or `1`).
154
- */
155
- declare const exitCodeFor: (decision: IgnoreDecision, exitZeroOnBuild: boolean) => 0 | 1;
156
- export type { IgnoreDecision, IgnoreReason };
157
- export { CI_BASE_SHA_ENV_VARS, commitHasForceDeployMessage, commitHasSkipMessage, decideBuild, decideSkip, exitCodeFor, FORCE_TOKENS, formatDecisionLine, isRefReachable, matchesPerProjectToken, PER_PROJECT_TOKEN_PREFIXES, readLastCommitMessage, resolveCiBaseSha, SKIP_TOKENS, validateGitRef, };
@@ -1,17 +0,0 @@
1
- /**
2
- * `vis ignore &lt;project>` — CI build gating for deployment platforms.
3
- *
4
- * Exits with inverted codes so it can be wired directly into Vercel's
5
- * "Ignored Build Step" field or Netlify's `ignore` command:
6
- *
7
- * exit 0 → platform cancels the build (project is NOT affected)
8
- * exit 1 → platform continues the build (project IS affected)
9
- *
10
- * Inspired by `nx-ignore` from nrwl/nx-labs, but reuses vis's own
11
- * `getAffectedProjects` so it doesn't need to bootstrap a parallel
12
- * Nx installation on the deploy runner. Pure helpers live in
13
- * `./ignore-helpers` for test isolation.
14
- */
15
- import type { Command } from "@visulima/cerebro";
16
- declare const ignore: Command;
17
- export default ignore;
@@ -1,3 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- declare const implode: Command;
3
- export default implode;
@@ -1,3 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- declare const info: Command;
3
- export default info;
@@ -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,3 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- declare const list: Command;
3
- export default list;
@@ -1,8 +0,0 @@
1
- import type { MigrationReport } from "./types.d.ts";
2
- /**
3
- * Create a `.bak` sibling alongside `path` before we mutate/delete it. We only
4
- * back up on first touch — subsequent writes to the same file in a single
5
- * migration run don't clobber the original snapshot. When `report` is provided
6
- * the backup path is recorded for the migration summary.
7
- */
8
- export declare const backupFile: (path: string, report?: MigrationReport) => void;
@@ -1,16 +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 NANO_STAGED_JSON_CONFIG_FILES: readonly [".nano-staged.json", ".nanostagedrc"];
6
- declare const NANO_STAGED_OTHER_CONFIG_FILES: readonly [".nano-staged.mjs", ".nano-staged.cjs", ".nano-staged.js", "nano-staged.config.mjs", "nano-staged.config.cjs", "nano-staged.config.js", "nano-staged.config.mts", "nano-staged.config.cts", "nano-staged.config.ts"];
7
- declare const NANO_STAGED_ALL_CONFIG_FILES: ReadonlyArray<string>;
8
- declare const STALE_NANO_STAGED_PATTERNS: ReadonlyArray<RegExp>;
9
- declare const REPLACED_PACKAGES: readonly ["husky", "lint-staged", "nano-staged"];
10
- declare const HUSKY_SCRIPT_PATTERNS: ReadonlyArray<RegExp>;
11
- /**
12
- * Remove husky references from a single script value.
13
- * Returns the cleaned script, or undefined if the entire script should be removed.
14
- */
15
- declare const cleanHuskyFromScript: (scriptValue: string) => string | undefined;
16
- export { cleanHuskyFromScript, HUSKY_SCRIPT_PATTERNS, LINT_STAGED_ALL_CONFIG_FILES, LINT_STAGED_JSON_CONFIG_FILES, LINT_STAGED_OTHER_CONFIG_FILES, NANO_STAGED_ALL_CONFIG_FILES, NANO_STAGED_JSON_CONFIG_FILES, NANO_STAGED_OTHER_CONFIG_FILES, REPLACED_PACKAGES, STALE_LINT_STAGED_PATTERNS, STALE_NANO_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,29 +0,0 @@
1
- import type { MigrateLogger, MigrationReport } from "./types.d.ts";
2
- interface GitleaksUpstreamFinding {
3
- Author?: string;
4
- Commit?: string;
5
- Date?: string;
6
- Description?: string;
7
- Email?: string;
8
- EndColumn?: number;
9
- EndLine?: number;
10
- Entropy?: number;
11
- File?: string;
12
- Fingerprint?: string;
13
- Match?: string;
14
- Message?: string;
15
- RuleID?: string;
16
- Secret?: string;
17
- StartColumn?: number;
18
- StartLine?: number;
19
- Tags?: string[];
20
- }
21
- declare const detectGitleaksConfig: (root: string) => string | undefined;
22
- declare const detectGitleaksIgnore: (root: string) => string | undefined;
23
- declare const detectGitleaksBaseline: (root: string) => string | undefined;
24
- declare const convertBaseline: (upstream: GitleaksUpstreamFinding[]) => unknown[];
25
- declare const migrateGitleaks: (root: string, options: {
26
- dryRun: boolean;
27
- silent?: boolean;
28
- }, logger: MigrateLogger, report: MigrationReport) => boolean;
29
- export { convertBaseline, detectGitleaksBaseline, detectGitleaksConfig, detectGitleaksIgnore, migrateGitleaks };
@@ -1,3 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- declare const migrateCommands: Command[];
3
- export default migrateCommands;
@@ -1,22 +0,0 @@
1
- import type { MigrationReport } from "./types.d.ts";
2
- /**
3
- * Reads and parses a JSON file. Returns undefined if the file doesn't exist or isn't valid JSON.
4
- */
5
- declare const readJsonFile: <T>(filePath: string) => T | undefined;
6
- /**
7
- * Checks if a file exists and contains valid JSON.
8
- */
9
- declare const isJsonFile: (filePath: string) => boolean;
10
- /**
11
- * Detect the indentation used in a JSON file by looking at the first indented line.
12
- */
13
- declare const detectJsonIndent: (content: string) => number;
14
- /**
15
- * Edits a JSON file in place using a mutator function.
16
- * The mutator receives the parsed data and should return the modified data,
17
- * or undefined to skip writing. Returns true if the file was modified.
18
- * Preserves the original indentation style. When `report` is provided, a
19
- * `.bak` snapshot is taken before the write.
20
- */
21
- declare const editJsonFile: <T>(filePath: string, mutator: (data: T) => T | undefined, report?: MigrationReport) => boolean;
22
- export { detectJsonIndent, editJsonFile, isJsonFile, readJsonFile };
@@ -1,14 +0,0 @@
1
- import type { MigrateLogger, MigrationReport } from "./types.d.ts";
2
- interface KingfisherBaselineRecord {
3
- filepath: string;
4
- fingerprint: string;
5
- linenum: number;
6
- }
7
- declare const detectKingfisherBaseline: (root: string) => string | undefined;
8
- declare const detectKingfisherRules: (root: string) => string | undefined;
9
- declare const parseKingfisherBaseline: (text: string) => KingfisherBaselineRecord[];
10
- declare const migrateKingfisher: (root: string, options: {
11
- dryRun: boolean;
12
- silent?: boolean;
13
- }, logger: MigrateLogger, report: MigrationReport) => boolean;
14
- export { detectKingfisherBaseline, detectKingfisherRules, migrateKingfisher, parseKingfisherBaseline };
@@ -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,5 +0,0 @@
1
- import type { MigrateLogger, MigrationReport } from "./types.d.ts";
2
- export declare const migrateMoon: (workspaceRoot: string, options: {
3
- copyTemplates?: boolean;
4
- dryRun?: boolean;
5
- }, logger: MigrateLogger, report: MigrationReport) => void;
@@ -1,30 +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
- declare const hasStandaloneNanoStagedConfig: (root: string) => boolean;
7
- declare const hasUnsupportedNanoStagedConfig: (root: string) => boolean;
8
- declare const hasStagedConfigInVisConfig: (root: string) => boolean;
9
- declare const detectNanoStagedConfig: (root: string) => string | undefined;
10
- declare const extractNanoStagedFromPackageJson: (root: string) => Record<string, string | string[]> | undefined;
11
- declare const parseNanoStagedJsonFile: (filePath: string) => Record<string, string | string[]> | undefined;
12
- declare const generateStagedConfigSnippet: (config: Record<string, string | string[]>) => string;
13
- declare const insertStagedIntoVisConfig: (root: string, config: Record<string, string | string[]>, logger: MigrateLogger) => boolean;
14
- declare const removeNanoStagedFromPackageJson: (root: string) => {
15
- configRemoved: boolean;
16
- dependencyRemoved: boolean;
17
- };
18
- declare const removeNanoStagedConfigFiles: (root: string, report: MigrationReport) => void;
19
- declare const rewritePreCommitHook: (root: string, hooksDirectory: string) => boolean;
20
- /**
21
- * Migrates nano-staged configuration to the `staged` block in `vis.config.ts`.
22
- * Mirrors the lint-staged migrator: detects configs from package.json or
23
- * standalone `.nano-staged.*` files, inlines the mapping, then cleans up
24
- * the source, dev-dependency entry, and pre-commit hook invocations.
25
- */
26
- declare const migrateNanoStaged: (root: string, options: {
27
- dryRun: boolean;
28
- silent?: boolean;
29
- }, logger: MigrateLogger, report: MigrationReport) => boolean;
30
- export { detectNanoStagedConfig, extractNanoStagedFromPackageJson, generateStagedConfigSnippet, hasStagedConfigInVisConfig, hasStandaloneNanoStagedConfig, hasUnsupportedNanoStagedConfig, insertStagedIntoVisConfig, migrateNanoStaged, parseNanoStagedJsonFile, removeNanoStagedConfigFiles, removeNanoStagedFromPackageJson, rewritePreCommitHook, };
@@ -1,12 +0,0 @@
1
- import type { MigrateLogger, MigrationReport } from "./types.d.ts";
2
- /**
3
- * Translates an `nx.json` into a `vis.config.ts`. Per-project
4
- * `project.json` files are left untouched — vis reads them natively.
5
- * @param workspaceRoot Absolute workspace root path.
6
- * @param options Migration options.
7
- * @param logger Logger for user feedback.
8
- * @param report Migration report to append manual steps and warnings.
9
- */
10
- export declare const migrateNx: (workspaceRoot: string, options: {
11
- dryRun?: boolean;
12
- }, logger: MigrateLogger, report: MigrationReport) => void;
@@ -1,2 +0,0 @@
1
- /** Prompt the user on stdin; returns true on y/yes (empty defaults to yes). */
2
- export declare const confirm: (question: string) => Promise<boolean>;