@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,675 +0,0 @@
1
- import type { ConstraintsConfig, NamedInputs, ProjectConfiguration, ProjectGraph, TargetConfiguration, WorkspaceConfiguration } from "@visulima/task-runner";
2
- import type { VisPlugin } from "./hooks.d.ts";
3
- import type { StagedConfig } from "./staged/index.d.ts";
4
- import type { VisTargetConfiguration } from "./target-options.d.ts";
5
- export interface CodeownersConfig {
6
- /** Workspace-level paths that apply outside any project (e.g., `.github/**`). */
7
- globalPaths?: Record<string, string[]>;
8
- /** Sort order for generated entries — mirrors moon's `orderBy`. */
9
- orderBy?: "file-source" | "project-id";
10
- /** Provider determines whether `channel` is emitted (GitHub supports it via comment). */
11
- provider?: "bitbucket" | "github" | "gitlab" | "other";
12
- }
13
- interface PackageJson {
14
- bin?: Record<string, string> | string;
15
- dependencies?: Record<string, string>;
16
- devDependencies?: Record<string, string>;
17
- name?: string;
18
- peerDependencies?: Record<string, string>;
19
- scripts?: Record<string, string>;
20
- workspaces?: string[] | {
21
- catalog?: Record<string, string>;
22
- packages?: string[];
23
- };
24
- }
25
- /**
26
- * Declared code-owner assignment for a path glob within a project.
27
- * Mirrors moon's `owners` shape so migrations can round-trip cleanly.
28
- */
29
- export interface OwnersEntry {
30
- /** Optional notification channel (e.g. Slack, Teams). */
31
- channel?: string;
32
- /** Owner handles (e.g. `@visulima/core-team`). */
33
- owners: string[];
34
- /** File/glob pattern relative to the project root. */
35
- path: string;
36
- }
37
- /**
38
- * Per-project metadata surfaced by `project.json`. Extended beyond the
39
- * minimal `projectType` / `tags` / `sourceRoot` fields we historically
40
- * parsed to include targets, owners, and layer/stack classification.
41
- */
42
- export interface ProjectJson {
43
- /** Implicit dependencies on other projects. */
44
- implicitDependencies?: string[];
45
- /** Primary language — informational and query-able. */
46
- language?: string;
47
- /** Project layer, used for constraint inheritance and query filtering. */
48
- layer?: "application" | "automation" | "configuration" | "library" | "scaffolding" | "tool";
49
- /** Code owners for paths inside this project. */
50
- owners?: OwnersEntry[];
51
- /** Project-level metadata. */
52
- project?: {
53
- channel?: string;
54
- description?: string;
55
- maintainers?: string[];
56
- owner?: string;
57
- title?: string;
58
- };
59
- /** Project type — library or application. */
60
- projectType?: "application" | "library";
61
- /** Source root, used for display and language inference. */
62
- sourceRoot?: string;
63
- /** Tech stack. */
64
- stack?: "backend" | "data" | "frontend" | "infrastructure" | "systems";
65
- /** Filterable tags. */
66
- tags?: string[];
67
- /** Vis-style target definitions (merged on top of package.json scripts). */
68
- targets?: Record<string, VisTargetConfiguration>;
69
- }
70
- /**
71
- * A scope predicate used by {@link VisConfig.taskDefaults}.
72
- * All listed constraints must match for the block to apply.
73
- */
74
- export interface TaskDefaultsScope {
75
- /** Match on primary language. */
76
- language?: string | string[];
77
- /** Match on project layer. */
78
- layer?: ProjectJson["layer"] | ProjectJson["layer"][];
79
- /** Match on project type. */
80
- projectType?: "application" | "library";
81
- /** Match on project stack. */
82
- stack?: ProjectJson["stack"] | ProjectJson["stack"][];
83
- /** Match projects tagged with any of these tags. */
84
- tags?: string[];
85
- }
86
- /**
87
- * A single task-defaults block — a set of target defaults gated by an
88
- * optional scope predicate.
89
- */
90
- export interface TaskDefaultsBlock {
91
- /** Optional scope predicate; if omitted, the block applies universally. */
92
- scope?: TaskDefaultsScope;
93
- /** Target default configurations. */
94
- targets: Record<string, Partial<VisTargetConfiguration>>;
95
- }
96
- interface VisConfig {
97
- /** AI analysis configuration */
98
- ai?: {
99
- /** Cache TTL in milliseconds. Overrides default (1h / 30min for security). */
100
- cacheTtl?: number;
101
- /** Override default provider priority. Higher number = preferred. */
102
- priority?: Record<string, number>;
103
- /** Use a specific provider instead of auto-detecting (e.g., `"claude"`, `"gemini"`). */
104
- provider?: string;
105
- };
106
- /**
107
- * Scope the task-runner cache directory by the current git branch.
108
- * When `true`, caches are stored under `&lt;cacheDir>/branches/&lt;slug>`
109
- * so `main` and feature branches stop thrashing each other —
110
- * generated artefacts (schemas, `.d.ts` snapshots) that legitimately
111
- * differ across branches no longer oscillate the cache contents.
112
- *
113
- * Falls back to the unscoped path on detached HEAD, non-git
114
- * workspaces, or when git isn't available.
115
- * @default false
116
- */
117
- branchScopedCache?: boolean;
118
- /**
119
- * Code ownership configuration. Controls how `vis sync codeowners`
120
- * renders the generated CODEOWNERS file.
121
- */
122
- codeowners?: CodeownersConfig;
123
- /**
124
- * Project dependency constraints.
125
- * Enforced after building the project graph, before running tasks.
126
- */
127
- constraints?: ConstraintsConfig;
128
- /**
129
- * Configuration for the `vis create` scaffolding command.
130
- * Controls template downloads (via giget), default options, and
131
- * post-creation behavior.
132
- */
133
- create?: {
134
- /**
135
- * Authorization token for downloading private repository templates.
136
- * Passed as Bearer token to the git host API.
137
- * Can also be set via GIGET_AUTH, GITHUB_TOKEN, or GH_TOKEN environment variables.
138
- */
139
- auth?: string;
140
- /**
141
- * Default editor to configure after scaffolding.
142
- * When set, `vis create` automatically generates editor config files.
143
- * @example "vscode"
144
- */
145
- defaultEditor?: "vscode";
146
- /**
147
- * Default package manager for new standalone projects.
148
- * When set, skips the PM selection prompt in interactive mode.
149
- */
150
- defaultPm?: "bun" | "npm" | "pnpm" | "yarn";
151
- /**
152
- * Default giget provider for `owner/repo` shorthand inputs.
153
- * @default "github"
154
- */
155
- defaultProvider?: "bitbucket" | "github" | "gitlab" | "sourcehut";
156
- /**
157
- * Initialize a git repository after scaffolding standalone projects.
158
- * @default false
159
- */
160
- gitInit?: boolean;
161
- /**
162
- * Install dependencies automatically after scaffolding.
163
- * @default true
164
- */
165
- install?: boolean;
166
- /**
167
- * Prefer locally cached templates over re-downloading.
168
- * Useful for offline development or slow connections.
169
- * @default false
170
- */
171
- preferOffline?: boolean;
172
- /**
173
- * Custom template registry URL.
174
- * When set, giget checks this registry for template metadata
175
- * before falling back to direct provider resolution.
176
- * Set to `false` to disable registry lookup entirely.
177
- * @see https://github.com/unjs/giget#custom-registry
178
- */
179
- registry?: false | string;
180
- /**
181
- * Named template aliases for quick access.
182
- * Maps short names to full giget source strings.
183
- * @example
184
- * ```
185
- * templates: {
186
- * "react": "github:vitejs/vite/packages/create-vite/template-react-ts",
187
- * "lib": "github:my-org/lib-template",
188
- * "internal": "gitlab:company/templates/node-service",
189
- * }
190
- * ```
191
- */
192
- templates?: Record<string, string>;
193
- };
194
- /**
195
- * Named file-group patterns, reusable from target `inputs` via the
196
- * `@filegroup:&lt;name>` token. File groups are resolved relative to each
197
- * project root at discovery time.
198
- * @example
199
- * ```
200
- * fileGroups: {
201
- * sources: ["src/**\/*.ts", "!src/**\/*.test.ts"],
202
- * tests: ["**\/*.test.ts"],
203
- * }
204
- * ```
205
- */
206
- fileGroups?: Record<string, string[]>;
207
- /**
208
- * Configuration for the `vis generate` in-repo scaffolding command.
209
- * Points at additional template directories beyond the defaults
210
- * (`.vis/templates/` and `.moon/templates/`).
211
- */
212
- generator?: {
213
- /**
214
- * Authorization token forwarded to giget when fetching
215
- * `git://`/`npm://` remote templates. Falls back to
216
- * `GIGET_AUTH` / `GITHUB_TOKEN` / `GH_TOKEN` env vars.
217
- */
218
- auth?: string;
219
- /**
220
- * Prefer locally cached remote templates over re-downloading.
221
- * Overridable per invocation via `--prefer-offline`.
222
- * @default false
223
- */
224
- preferOffline?: boolean;
225
- /**
226
- * Extra directories to scan for templates. Each directory is
227
- * checked for both native templates (`&lt;name>.ts`) and
228
- * moon-format directories (containing `template.yml`).
229
- * @example
230
- * ```
231
- * generator: {
232
- * templates: ["./tools/generators", "./packages/scaffolding/templates"],
233
- * }
234
- * ```
235
- */
236
- templates?: string[];
237
- };
238
- /**
239
- * Named input patterns inherited by every project target. Equivalent
240
- * to task-runner's `namedInputs` but configurable from the vis config.
241
- */
242
- namedInputs?: NamedInputs;
243
- /** Package override mappings applied during migration (e.g., `{ "lodash": "lodash-es" }`) */
244
- overrides?: Record<string, string>;
245
- /**
246
- * Plugins — each plugin registers typed hooks that fire at run /
247
- * task / cache boundaries. See {@link VisPlugin} for the contract.
248
- * Prefer plugins over per-target shell hooks when behaviour needs
249
- * access to task metadata, results, or cache state.
250
- */
251
- plugins?: VisPlugin[];
252
- /**
253
- * Default options for `vis secrets`. CLI flags always take precedence;
254
- * this block provides workspace-wide defaults so teams can commit config
255
- * once and every invocation picks it up.
256
- */
257
- secrets?: {
258
- /** Path to a baseline of previously-triaged findings (relative to workspace root). */
259
- baseline?: string;
260
- /** Where the ruleset comes from. Omit for the bundled gitleaks default. */
261
- config?: {
262
- /** Layer the user's rules on top of the bundled ruleset. Default: `true`. */
263
- extendBundled?: boolean;
264
- /** Inline rule overrides. Wins over `path` when both are set. */
265
- inline?: {
266
- allowlist?: unknown;
267
- allowlists?: unknown[];
268
- description?: string;
269
- rules?: unknown[];
270
- title?: string;
271
- };
272
- /** Path to a JSON config (gitleaks-compatible). */
273
- path?: string;
274
- /** Bundled presets layered on top of the default ruleset (e.g. `"weak-passwords"`). */
275
- presets?: string[];
276
- };
277
- /** Redact secret values in findings. */
278
- redact?: boolean;
279
- /** Rule-id filters applied after scanning. */
280
- rules?: {
281
- /** Drop findings whose ruleId matches. */
282
- exclude?: string[];
283
- /** Only report findings whose ruleId matches. */
284
- include?: string[];
285
- };
286
- /** Walker / filesystem traversal. */
287
- walk?: {
288
- /**
289
- * Paths to additional `.gitignore`-syntax files (e.g. `.secretsignore`).
290
- */
291
- excludeFromFiles?: string[];
292
- /**
293
- * Gitignore-syntax patterns (supports negation, directory markers, leading `/`).
294
- * Applied on top of `.gitignore`.
295
- */
296
- excludePatterns?: string[];
297
- /** Respect `.gitignore`. Default: `true`. */
298
- gitignore?: boolean;
299
- /** Include hidden (dotfile) entries. Default: `false`. */
300
- includeHidden?: boolean;
301
- /** Max file size in bytes. Default 10 MiB. */
302
- maxFileSize?: number;
303
- };
304
- };
305
- /**
306
- * Supply chain security settings.
307
- * These settings are inspired by pnpm's security features and are applied
308
- * universally across all package managers (pnpm, npm, yarn, bun).
309
- *
310
- * For pnpm users: these map directly to pnpm-workspace.yaml settings.
311
- * For npm/yarn/bun users: vis enforces these at the vis layer since
312
- * those package managers lack native support.
313
- */
314
- security?: {
315
- /**
316
- * Map of package names/patterns to allow (true) or deny (false) build scripts.
317
- * Packages not listed are denied by default.
318
- * Equivalent to pnpm's `allowBuilds` setting.
319
- * @example
320
- * ```
321
- * allowBuilds: {
322
- * "esbuild": true,
323
- * "core-js": false,
324
- * "@prisma/client": true,
325
- * }
326
- * ```
327
- */
328
- allowBuilds?: Record<string, boolean>;
329
- /**
330
- * When true, prevents transitive dependencies from using exotic sources
331
- * (git repositories, direct tarball URLs). Only direct dependencies may
332
- * use such sources. Equivalent to pnpm's `blockExoticSubdeps`.
333
- * @default false
334
- */
335
- blockExoticSubdeps?: boolean;
336
- /**
337
- * Minimum number of minutes that must pass after a version is published
338
- * before vis will allow installation. Reduces risk of installing
339
- * compromised packages that are typically discovered within hours.
340
- * Equivalent to pnpm's `minimumReleaseAge`.
341
- * @default 0
342
- * @example 1440 // 24 hours
343
- */
344
- minimumReleaseAge?: number;
345
- /**
346
- * Package names/patterns excluded from minimumReleaseAge check.
347
- * Equivalent to pnpm's `minimumReleaseAgeExclude`.
348
- * @example ["webpack", "react", "@myorg/*"]
349
- */
350
- minimumReleaseAgeExclude?: string[];
351
- /**
352
- * Socket.dev security intelligence configuration.
353
- * When enabled, vis fetches package security scores, alerts, and report
354
- * data from the Socket.dev API during install, update, and check commands.
355
- * @see https://socket.dev
356
- */
357
- socket?: {
358
- /**
359
- * Packages whose low Socket.dev scores or alerts have been reviewed
360
- * and explicitly accepted. These packages skip the confirmation
361
- * prompt during `vis add` and show as "acknowledged" in `vis audit`.
362
- *
363
- * Key format: package name (`"lodash"`), name@version
364
- * (`"lodash@4.17.21"`), or glob (`"@myorg/*"`).
365
- * Unversioned keys match all versions of that package.
366
- * @example
367
- * ```
368
- * acceptedRisks: {
369
- * "some-risky-pkg": {
370
- * reason: "Internal fork, low score expected",
371
- * acceptedAt: "2026-03-15T10:00:00Z",
372
- * acceptedScore: 0.25,
373
- * },
374
- * }
375
- * ```
376
- */
377
- acceptedRisks?: Record<string, {
378
- /** ISO 8601 timestamp when the risk was accepted. */
379
- acceptedAt: string;
380
- /** The overall Socket.dev score at the time of acceptance. */
381
- acceptedScore: number;
382
- /** User-provided reason for accepting the risk. */
383
- reason: string;
384
- }>;
385
- /**
386
- * Custom Socket.dev API token. Falls back to the public API token.
387
- * Set via VIS_SOCKET_TOKEN environment variable or here.
388
- */
389
- apiToken?: string;
390
- /**
391
- * Cache TTL in milliseconds for Socket.dev reports.
392
- * @default 3_600_000 (1 hour)
393
- */
394
- cacheTtlMs?: number;
395
- /**
396
- * Enable Socket.dev security scanning on install/update/check commands.
397
- * @default false
398
- */
399
- enabled?: boolean;
400
- /**
401
- * Minimum overall Socket.dev score (0–1) for a package to be
402
- * accepted without a confirmation prompt during `vis add`.
403
- * Packages scoring below this threshold trigger an interactive
404
- * prompt asking the user to confirm. Set to 0 to disable.
405
- * @default 0.4
406
- */
407
- minimumScore?: number;
408
- /**
409
- * Request timeout in milliseconds for the Socket.dev API.
410
- * @default 15_000 (15 seconds)
411
- */
412
- timeoutMs?: number;
413
- };
414
- /**
415
- * When true, installation will fail (exit non-zero) if any dependencies
416
- * have unreviewed build scripts. Equivalent to pnpm's `strictDepBuilds`.
417
- * @default false
418
- */
419
- strictDepBuilds?: boolean;
420
- /**
421
- * Trust level checking for package publishing.
422
- * - "off": No trust checking (default)
423
- * - "no-downgrade": Fail if a package's trust level has decreased
424
- * compared to previous releases (e.g., was published by trusted
425
- * publisher, now only has provenance).
426
- * Equivalent to pnpm's `trustPolicy`.
427
- * @default "off"
428
- */
429
- trustPolicy?: "no-downgrade" | "off";
430
- /**
431
- * Package selectors excluded from trust policy checks.
432
- * Equivalent to pnpm's `trustPolicyExclude`.
433
- * @example ["chokidar@4.0.3", "@babel/core@7.28.5"]
434
- */
435
- trustPolicyExclude?: string[];
436
- /**
437
- * Ignore the trust policy check for packages published more than
438
- * the specified number of minutes ago. Useful for older packages
439
- * that pre-date provenance support.
440
- * Equivalent to pnpm's `trustPolicyIgnoreAfter` (10.27+).
441
- * @example 43200 // 30 days
442
- */
443
- trustPolicyIgnoreAfter?: number;
444
- /**
445
- * Package names to skip during typosquat detection.
446
- * Use this for internal packages or known-safe names that happen to
447
- * look similar to popular packages.
448
- * @example ["my-internal-axois", "@myorg/recat"]
449
- */
450
- typosquatAllowlist?: string[];
451
- };
452
- /** sort-package-json command defaults */
453
- sortPackageJson?: {
454
- /** Alphabetize script commands (default: false) */
455
- sortScripts?: boolean;
456
- };
457
- /**
458
- * Staged file patterns and commands (replaces lint-staged).
459
- *
460
- * Accepts all lint-staged config forms:
461
- * - `string` or `string[]` commands
462
- * - Sync/async functions returning `string | string[]`
463
- * - `{ title, task }` objects for named side-effect tasks
464
- * - Mixed arrays of strings and functions
465
- * - A top-level generate-task function
466
- */
467
- staged?: StagedConfig;
468
- /** Target default configurations */
469
- targetDefaults?: Record<string, Partial<VisTargetConfiguration>>;
470
- /**
471
- * Cascading task-default blocks. Each block may scope its targets to a
472
- * subset of projects via `scope`. Blocks are evaluated in order; later
473
- * blocks override earlier ones when the same field is set.
474
- *
475
- * Scope matching is additive — if `scope` is omitted, the block applies
476
- * to every project.
477
- * @example
478
- * ```
479
- * taskDefaults: [
480
- * { scope: { tags: ["frontend"] }, targets: { build: { cache: true } } },
481
- * { scope: { projectType: "library" }, targets: { lint: { cache: true } } },
482
- * ]
483
- * ```
484
- */
485
- taskDefaults?: TaskDefaultsBlock[];
486
- /**
487
- * Named bundles of target dependencies, referenceable from any task's
488
- * `dependsOn`. `dependsOn: [{ group: "lint" }]` expands to every entry
489
- * in the named group; nested groups are resolved recursively and a
490
- * cycle raises during discovery.
491
- */
492
- taskGroups?: Record<string, (string | {
493
- dependencies?: boolean;
494
- projects?: string | string[];
495
- target: string;
496
- } | {
497
- group: string;
498
- })[]>;
499
- /** Task runner options */
500
- taskRunnerOptions?: Record<string, unknown>;
501
- /** Terminal UI configuration */
502
- tui?: {
503
- /**
504
- * Auto-exit the TUI after tasks complete.
505
- * - `false`: Stay open until the user presses `q` (default)
506
- * - `true`: Show quit dialog with 3-second countdown after completion
507
- * - `number`: Show quit dialog with custom countdown in seconds
508
- */
509
- autoExit?: boolean | number;
510
- };
511
- /** Update command defaults */
512
- update?: {
513
- /**
514
- * Dependency fields to scan for outdated packages.
515
- * Beyond the standard fields, supports:
516
- * - `"overrides"` (npm)
517
- * - `"resolutions"` (yarn)
518
- * - `"pnpm.overrides"`
519
- * @default ["dependencies", "devDependencies", "optionalDependencies", "peerDependencies"]
520
- */
521
- depFields?: string[];
522
- exclude?: string[];
523
- format?: "json" | "minimal" | "table";
524
- /**
525
- * Package names or glob patterns to permanently ignore during updates.
526
- * Ignored packages are skipped and listed in the output so you know
527
- * they were not checked.
528
- * @example ["eslint", "@types/*"]
529
- */
530
- ignore?: string[];
531
- include?: string[];
532
- /**
533
- * Include packages with pinned/exact versions (no `^` or `~` prefix).
534
- * By default, pinned versions are skipped during update checks.
535
- * @default false
536
- */
537
- includeLocked?: boolean;
538
- install?: boolean;
539
- /**
540
- * Minimum number of minutes since a version was published before
541
- * vis will consider it for updates. This mirrors pnpm's
542
- * `minimumReleaseAge` — a single setting that applies to both
543
- * install and update.
544
- *
545
- * Not set by default. If your package manager config
546
- * (`pnpm-workspace.yaml`) has `minimumReleaseAge`, vis will
547
- * read it from there as a fallback.
548
- * @example 1440 // 24 hours
549
- */
550
- minimumReleaseAge?: number;
551
- /**
552
- * Package names/patterns excluded from the minimumReleaseAge check.
553
- * @example ["webpack", "@myorg/*"]
554
- */
555
- minimumReleaseAgeExclude?: string[];
556
- /**
557
- * Per-package or per-pattern update target overrides.
558
- * Keys are exact package names, glob patterns, or regex patterns
559
- * wrapped in `/` (e.g., `/^@vue/`).
560
- * Values are `"latest"`, `"minor"`, or `"patch"`.
561
- * @example { "typescript": "minor", "/^@vue/": "patch" }
562
- */
563
- packageMode?: Record<string, "latest" | "minor" | "patch">;
564
- prerelease?: boolean;
565
- security?: boolean;
566
- target?: "latest" | "minor" | "patch";
567
- };
568
- /**
569
- * Minimum vis CLI version required by this workspace. When the
570
- * running vis binary is older than this constraint, vis exits with
571
- * an actionable error before executing any command.
572
- *
573
- * Accepts a semver range string (e.g. `">=1.0.0"`, `"^1.2.0"`).
574
- * @example ">=1.0.0"
575
- */
576
- versionConstraint?: string;
577
- }
578
- /**
579
- * Resolves glob-like workspace patterns to actual directories.
580
- * Supports simple patterns like "packages/*" and "packages/**".
581
- */
582
- declare const resolveWorkspacePatterns: (workspaceRoot: string, patterns: string[]) => string[];
583
- /**
584
- * Reads workspace patterns from pnpm-workspace.yaml (simple parser).
585
- */
586
- /**
587
- * Expands every `{ group: "name" }` entry in a target's `dependsOn`
588
- * into the group's declared members, recursively resolving nested
589
- * groups and detecting cycles.
590
- *
591
- * Runs once per workspace discovery so task-runner's graph builder
592
- * only ever sees bare dependency entries — groups are pure vis sugar.
593
- */
594
- export declare const expandTaskGroups: (dependsOn: (string | {
595
- dependencies?: boolean;
596
- projects?: string | string[];
597
- target: string;
598
- } | {
599
- group: string;
600
- })[] | undefined, groups: VisConfig["taskGroups"], seen?: Set<string>) => (string | {
601
- dependencies?: boolean;
602
- projects?: string | string[];
603
- target: string;
604
- })[];
605
- /**
606
- * Validates the root `package.json` `workspaces` field and returns the
607
- * resolved pattern array. Throws a clear diagnostic when the field is
608
- * malformed (empty array, wrong type, object without `packages`)
609
- * instead of falling through to a vague "no workspace configuration
610
- * found" error that hides the real problem.
611
- */
612
- declare const validateWorkspacesField: (raw: PackageJson["workspaces"]) => string[];
613
- declare const readPnpmWorkspacePatterns: (workspaceRoot: string) => string[] | undefined;
614
- /**
615
- * Returns true if the named {@link TaskDefaultsBlock} scope matches the
616
- * given project metadata. Missing scope fields are treated as "any".
617
- */
618
- declare const scopeMatches: (scope: TaskDefaultsScope | undefined, projectJson: ProjectJson | undefined, projectType: "application" | "library") => boolean;
619
- /**
620
- * Returns the merged target defaults that apply to a project, combining
621
- * the flat `config.targetDefaults` with all matching `config.taskDefaults`
622
- * blocks in declaration order. Later entries override earlier ones.
623
- */
624
- declare const collectTargetDefaults: (config: VisConfig, projectJson: ProjectJson | undefined, projectType: "application" | "library") => Record<string, Partial<VisTargetConfiguration>>;
625
- /**
626
- * Extended project configuration exposed on the discovered workspace.
627
- * Adds vis-specific metadata (layer, stack, language, owners) on top of
628
- * the task-runner `ProjectConfiguration`.
629
- */
630
- export interface VisProjectConfiguration extends ProjectConfiguration {
631
- /** Primary language identifier. */
632
- language?: string;
633
- /** Project layer classification (matches moon's layer hierarchy). */
634
- layer?: ProjectJson["layer"];
635
- /** Owners entries declared in project.json. */
636
- owners?: OwnersEntry[];
637
- /** Human-readable metadata block. */
638
- project?: ProjectJson["project"];
639
- /** Project stack classification. */
640
- stack?: ProjectJson["stack"];
641
- /** Raw targets with vis-specific options retained. */
642
- targets?: Record<string, TargetConfiguration>;
643
- }
644
- /**
645
- * Per-project options cache indexed by project name. Used by the run
646
- * command to read vis-specific target options without reparsing.
647
- */
648
- export type ProjectOptionsIndex = Map<string, Record<string, VisTargetConfiguration>>;
649
- /**
650
- * Parsed `package.json` files from the discovery pass, keyed by
651
- * project name. {@link buildProjectGraph} consumes this to avoid
652
- * re-parsing every `package.json` just to extract dependency info.
653
- */
654
- export type PackageJsonIndex = Map<string, PackageJson>;
655
- /**
656
- * Discovers all projects in the workspace and builds a WorkspaceConfiguration.
657
- */
658
- declare const discoverWorkspace: (workspaceRoot: string, config?: VisConfig) => {
659
- config: VisConfig;
660
- packageJsons: PackageJsonIndex;
661
- projectOptions: ProjectOptionsIndex;
662
- workspace: WorkspaceConfiguration;
663
- };
664
- /**
665
- * Builds the project dependency graph from package.json dependencies.
666
- *
667
- * If `packageJsons` is provided (e.g. from {@link discoverWorkspace}),
668
- * each project's `package.json` is reused from memory instead of
669
- * re-read + re-parsed off disk — on a 40-project monorepo that's 40
670
- * fewer reads per `vis run`.
671
- */
672
- declare const buildProjectGraph: (workspaceRoot: string, workspace: WorkspaceConfiguration, packageJsons?: PackageJsonIndex) => ProjectGraph;
673
- export type { PackageJson, VisConfig };
674
- export { buildProjectGraph, collectTargetDefaults, discoverWorkspace, readPnpmWorkspacePatterns, resolveWorkspacePatterns, scopeMatches, validateWorkspacesField, };
675
- export { type StagedConfig } from "./staged/index.d.ts";