@visulima/vis 1.0.0-alpha.7 → 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 (275) hide show
  1. package/CHANGELOG.md +107 -47
  2. package/LICENSE.md +44 -1
  3. package/README.md +56 -0
  4. package/dist/bin.js +1 -991
  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 +29 -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 -8
  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/migrate.d.ts +0 -27
  114. package/dist/commands/hook/uninstall.d.ts +0 -3
  115. package/dist/commands/ignore-helpers.d.ts +0 -157
  116. package/dist/commands/ignore.d.ts +0 -17
  117. package/dist/commands/implode.d.ts +0 -3
  118. package/dist/commands/info.d.ts +0 -3
  119. package/dist/commands/init.d.ts +0 -14
  120. package/dist/commands/install.d.ts +0 -3
  121. package/dist/commands/link.d.ts +0 -3
  122. package/dist/commands/list.d.ts +0 -3
  123. package/dist/commands/migrate/backup.d.ts +0 -8
  124. package/dist/commands/migrate/constants.d.ts +0 -16
  125. package/dist/commands/migrate/deps.d.ts +0 -32
  126. package/dist/commands/migrate/gitleaks.d.ts +0 -29
  127. package/dist/commands/migrate/index.d.ts +0 -3
  128. package/dist/commands/migrate/json.d.ts +0 -22
  129. package/dist/commands/migrate/kingfisher.d.ts +0 -14
  130. package/dist/commands/migrate/lint-staged.d.ts +0 -62
  131. package/dist/commands/migrate/moon.d.ts +0 -5
  132. package/dist/commands/migrate/nano-staged.d.ts +0 -30
  133. package/dist/commands/migrate/nx.d.ts +0 -12
  134. package/dist/commands/migrate/prompt.d.ts +0 -2
  135. package/dist/commands/migrate/secretlint.d.ts +0 -14
  136. package/dist/commands/migrate/shared.d.ts +0 -29
  137. package/dist/commands/migrate/turborepo.d.ts +0 -11
  138. package/dist/commands/migrate/types.d.ts +0 -27
  139. package/dist/commands/migrate/verify.d.ts +0 -12
  140. package/dist/commands/optimize.d.ts +0 -38
  141. package/dist/commands/pm.d.ts +0 -3
  142. package/dist/commands/remove.d.ts +0 -3
  143. package/dist/commands/run.d.ts +0 -16
  144. package/dist/commands/sbom.d.ts +0 -10
  145. package/dist/commands/secrets.d.ts +0 -3
  146. package/dist/commands/sort-package-json.d.ts +0 -3
  147. package/dist/commands/staged.d.ts +0 -10
  148. package/dist/commands/status.d.ts +0 -3
  149. package/dist/commands/sync.d.ts +0 -16
  150. package/dist/commands/task-why.d.ts +0 -3
  151. package/dist/commands/unlink.d.ts +0 -3
  152. package/dist/commands/update.d.ts +0 -3
  153. package/dist/commands/upgrade.d.ts +0 -3
  154. package/dist/commands/why.d.ts +0 -3
  155. package/dist/docker.d.ts +0 -73
  156. package/dist/flakiness.d.ts +0 -40
  157. package/dist/generate/discover.d.ts +0 -29
  158. package/dist/generate/loader.d.ts +0 -15
  159. package/dist/generate/moon-adapter/filename-interp.d.ts +0 -42
  160. package/dist/generate/moon-adapter/filters.d.ts +0 -22
  161. package/dist/generate/moon-adapter/frontmatter.d.ts +0 -39
  162. package/dist/generate/moon-adapter/index.d.ts +0 -19
  163. package/dist/generate/moon-adapter/tera-subset.d.ts +0 -85
  164. package/dist/generate/moon-adapter/util.d.ts +0 -14
  165. package/dist/generate/prompts.d.ts +0 -25
  166. package/dist/generate/remote.d.ts +0 -43
  167. package/dist/generate/runner.d.ts +0 -37
  168. package/dist/generate/types.d.ts +0 -152
  169. package/dist/hooks.d.ts +0 -118
  170. package/dist/native-binding.d.ts +0 -158
  171. package/dist/output.d.ts +0 -40
  172. package/dist/overrides.d.ts +0 -82
  173. package/dist/package-manager.d.ts +0 -23
  174. package/dist/packem_shared/otelPlugin-CJLkguJ8.js +0 -1
  175. package/dist/plugins/config-loader.d.ts +0 -3
  176. package/dist/plugins/otel.d.ts +0 -63
  177. package/dist/plugins/post-command.d.ts +0 -3
  178. package/dist/plugins/security-enforcement.d.ts +0 -3
  179. package/dist/pm-runner.d.ts +0 -44
  180. package/dist/run-report.d.ts +0 -40
  181. package/dist/runtime-check.d.ts +0 -27
  182. package/dist/sbom/cyclonedx.d.ts +0 -39
  183. package/dist/sbom/installed-package.d.ts +0 -49
  184. package/dist/sbom/license.d.ts +0 -31
  185. package/dist/sbom/lockfile.d.ts +0 -34
  186. package/dist/sbom/purl.d.ts +0 -25
  187. package/dist/sbom/resolve-specifier.d.ts +0 -24
  188. package/dist/sbom/types.d.ts +0 -196
  189. package/dist/secrets/baseline.d.ts +0 -20
  190. package/dist/secrets/format.d.ts +0 -14
  191. package/dist/secrets/git.d.ts +0 -6
  192. package/dist/secrets/spinner.d.ts +0 -9
  193. package/dist/security.d.ts +0 -64
  194. package/dist/selectors.d.ts +0 -81
  195. package/dist/shell-history.d.ts +0 -16
  196. package/dist/socket-security.d.ts +0 -129
  197. package/dist/staged/cli-parse.d.ts +0 -18
  198. package/dist/staged/config.d.ts +0 -14
  199. package/dist/staged/errors/apply-empty-commit-error.d.ts +0 -4
  200. package/dist/staged/errors/config-error.d.ts +0 -4
  201. package/dist/staged/errors/get-backup-stash-error.d.ts +0 -4
  202. package/dist/staged/errors/git-error.d.ts +0 -6
  203. package/dist/staged/errors/index.d.ts +0 -12
  204. package/dist/staged/errors/restore-original-state-error.d.ts +0 -4
  205. package/dist/staged/errors/staged-error.d.ts +0 -8
  206. package/dist/staged/errors/task-error.d.ts +0 -6
  207. package/dist/staged/git/diff.d.ts +0 -76
  208. package/dist/staged/git/exec.d.ts +0 -43
  209. package/dist/staged/git/index.d.ts +0 -77
  210. package/dist/staged/git/stash.d.ts +0 -37
  211. package/dist/staged/index.d.ts +0 -13
  212. package/dist/staged/match.d.ts +0 -12
  213. package/dist/staged/renderer/index.d.ts +0 -9
  214. package/dist/staged/renderer/ink/index.d.ts +0 -4
  215. package/dist/staged/renderer/plain.d.ts +0 -12
  216. package/dist/staged/tasks/build.d.ts +0 -13
  217. package/dist/staged/tasks/exec.d.ts +0 -56
  218. package/dist/staged/tasks/run.d.ts +0 -26
  219. package/dist/staged/types.d.ts +0 -173
  220. package/dist/target-discovery.d.ts +0 -59
  221. package/dist/target-options.d.ts +0 -261
  222. package/dist/tips.d.ts +0 -41
  223. package/dist/tui/components/CheckProgressApp.d.ts +0 -6
  224. package/dist/tui/components/CommandSummary.d.ts +0 -17
  225. package/dist/tui/components/Header.d.ts +0 -13
  226. package/dist/tui/components/OutputPanel.d.ts +0 -17
  227. package/dist/tui/components/QuitDialog.d.ts +0 -15
  228. package/dist/tui/components/TaskListPanel.d.ts +0 -19
  229. package/dist/tui/components/TaskRow.d.ts +0 -12
  230. package/dist/tui/components/TaskStore.d.ts +0 -80
  231. package/dist/tui/components/VisTaskRunnerApp.d.ts +0 -17
  232. package/dist/tui/components/devcontainer/DevcontainerStore.d.ts +0 -66
  233. package/dist/tui/components/devcontainer/VisDevcontainerApp.d.ts +0 -9
  234. package/dist/tui/components/devcontainer/catalogs/extensions.d.ts +0 -8
  235. package/dist/tui/components/devcontainer/catalogs/features.d.ts +0 -8
  236. package/dist/tui/components/devcontainer/catalogs/filters.d.ts +0 -4
  237. package/dist/tui/components/devcontainer/catalogs/mount-suggestions.d.ts +0 -19
  238. package/dist/tui/components/devcontainer/catalogs/templates.d.ts +0 -8
  239. package/dist/tui/components/devcontainer/devcontainer-io.d.ts +0 -14
  240. package/dist/tui/components/devcontainer/sections/DockerComposeSection.d.ts +0 -11
  241. package/dist/tui/components/devcontainer/sections/EnvironmentSection.d.ts +0 -16
  242. package/dist/tui/components/devcontainer/sections/ExtensionsSection.d.ts +0 -11
  243. package/dist/tui/components/devcontainer/sections/FeaturesSection.d.ts +0 -11
  244. package/dist/tui/components/devcontainer/sections/GeneralSection.d.ts +0 -12
  245. package/dist/tui/components/devcontainer/sections/LifecycleSection.d.ts +0 -13
  246. package/dist/tui/components/devcontainer/sections/MountsSection.d.ts +0 -16
  247. package/dist/tui/components/devcontainer/sections/PortsSection.d.ts +0 -10
  248. package/dist/tui/components/devcontainer/sections/PreviewPanel.d.ts +0 -11
  249. package/dist/tui/components/devcontainer/types.d.ts +0 -53
  250. package/dist/tui/components/devcontainer/validate.d.ts +0 -16
  251. package/dist/tui/components/graph/GraphStore.d.ts +0 -42
  252. package/dist/tui/components/graph/ProjectDetailPanel.d.ts +0 -10
  253. package/dist/tui/components/graph/ProjectListPanel.d.ts +0 -20
  254. package/dist/tui/components/graph/VisGraphApp.d.ts +0 -8
  255. package/dist/tui/components/optimize/OptimizeDetailPanel.d.ts +0 -9
  256. package/dist/tui/components/optimize/OptimizeListPanel.d.ts +0 -16
  257. package/dist/tui/components/optimize/OptimizeStore.d.ts +0 -50
  258. package/dist/tui/components/optimize/VisOptimizeApp.d.ts +0 -8
  259. package/dist/tui/components/optimize/constants.d.ts +0 -7
  260. package/dist/tui/components/update/PackageDetailPanel.d.ts +0 -12
  261. package/dist/tui/components/update/PackageListPanel.d.ts +0 -21
  262. package/dist/tui/components/update/UpdateStore.d.ts +0 -62
  263. package/dist/tui/components/update/VisUpdateApp.d.ts +0 -18
  264. package/dist/tui/dynamic-life-cycle.d.ts +0 -22
  265. package/dist/tui/formatting-utils.d.ts +0 -17
  266. package/dist/tui/pretty-time.d.ts +0 -8
  267. package/dist/tui/static-life-cycle.d.ts +0 -28
  268. package/dist/tui/status-utils.d.ts +0 -20
  269. package/dist/tui/symbols.d.ts +0 -7
  270. package/dist/tui/types.d.ts +0 -11
  271. package/dist/typosquats.d.ts +0 -70
  272. package/dist/upgrade-check.d.ts +0 -30
  273. package/dist/utils.d.ts +0 -22
  274. package/dist/watch.d.ts +0 -65
  275. package/dist/workspace.d.ts +0 -675
@@ -1,10 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- /**
3
- * `vis sbom` — CycloneDX 1.6 Software Bill of Materials generator.
4
- *
5
- * Mirrors `vis docker scaffold` in shape: accepts an optional `--focus`
6
- * list, walks the workspace graph, and writes the result to disk
7
- * (or stdout).
8
- */
9
- declare const sbom: Command;
10
- export default sbom;
@@ -1,3 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- declare const secrets: Command;
3
- export default secrets;
@@ -1,3 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- declare const sortPackageJson: Command;
3
- export default sortPackageJson;
@@ -1,10 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- import type { RunOptions, StagedConfig } from "../index.d.ts";
3
- /**
4
- * Translates the cerebro-parsed CLI options (kebab-case keys, string/boolean values)
5
- * into a strongly-typed `RunOptions` object. Only the flags the user passed are
6
- * forwarded — the rest fall through to `runStaged`'s own defaults.
7
- */
8
- export declare const buildRunOptions: (raw: Record<string, unknown>, stagedConfig: StagedConfig | undefined) => RunOptions;
9
- declare const staged: Command;
10
- export default staged;
@@ -1,3 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- declare const status: Command;
3
- export default status;
@@ -1,16 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- /**
3
- * `vis sync &lt;kind>` performs workspace-wide synchronisations that
4
- * cannot be derived from a task graph alone.
5
- *
6
- * Currently supported kinds:
7
- *
8
- * - `codeowners`: aggregates `owners` entries from every project's
9
- * project.json into a single CODEOWNERS file at the repo root
10
- * (or `.github/CODEOWNERS` when the target flag is set).
11
- *
12
- * Additional kinds will land alongside their features (for example:
13
- * `tsconfig-references`, `package-json` sort, `hooks`).
14
- */
15
- declare const sync: Command;
16
- export default sync;
@@ -1,3 +0,0 @@
1
- import type { Command } from "@visulima/cerebro";
2
- declare const taskWhy: Command;
3
- export default taskWhy;
@@ -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/docker.d.ts DELETED
@@ -1,73 +0,0 @@
1
- import type { ProjectGraph, WorkspaceConfiguration } from "@visulima/task-runner";
2
- /**
3
- * Minimal Docker scaffold: copies the set of files Docker's layer
4
- * cache benefits from keeping stable (manifests + lockfiles) so an
5
- * image build can `COPY` them first and install dependencies before
6
- * source code arrives.
7
- *
8
- * Computes the set of projects a focus project depends on and copies
9
- * only their `package.json` + `project.json` + root manifests, not
10
- * the whole source tree. Compare with moon's `moon docker scaffold`.
11
- */
12
- /** Name of the manifest file written by scaffold and read by prune. */
13
- export declare const DOCKER_MANIFEST_FILENAME = "vis-docker-manifest.json";
14
- export interface ScaffoldOptions {
15
- /** Project names to focus on — transitive deps are pulled in automatically. */
16
- focus: string[];
17
- /**
18
- * Include the full source tree for the focus project(s). Used for the
19
- * `sources` stage so the build can actually compile code after deps
20
- * are installed.
21
- */
22
- includeSources?: boolean;
23
- /** Output directory, typically `.vis/docker/workspace`. */
24
- outDir: string;
25
- /** Project graph used to compute the transitive dependency closure. */
26
- projectGraph: ProjectGraph;
27
- /** Workspace configuration with resolved project roots. */
28
- workspace: WorkspaceConfiguration;
29
- /** Workspace root on disk. */
30
- workspaceRoot: string;
31
- }
32
- /**
33
- * Computes the full set of projects that must exist in the Docker context
34
- * to build a given focus set: the focus projects themselves plus every
35
- * project reachable from them in the workspace dependency graph.
36
- * @param focus Project names to focus on.
37
- * @param projectGraph The workspace project graph.
38
- * @returns A set containing every project in the transitive closure.
39
- */
40
- export declare const resolveFocusProjects: (focus: string[], projectGraph: ProjectGraph) => Set<string>;
41
- /**
42
- * Build a minimal Docker context at {@link ScaffoldOptions.outDir}.
43
- *
44
- * Creates two directories:
45
- * - `&lt;outDir>/workspace/` — root manifests + per-project manifests for the
46
- * focus closure. `COPY` this BEFORE `pnpm install` for layer caching.
47
- * - `&lt;outDir>/sources/` — full source trees for the focus projects (only
48
- * when {@link ScaffoldOptions.includeSources} is true).
49
- * @param options Scaffold configuration.
50
- * @returns The list of project names included in the scaffold.
51
- */
52
- export declare const scaffoldDockerContext: (options: ScaffoldOptions) => {
53
- projects: string[];
54
- };
55
- export interface PruneOptions {
56
- /** Root of the scaffolded context (containing `vis-docker-manifest.json`). */
57
- contextRoot: string;
58
- workspace: WorkspaceConfiguration;
59
- workspaceRoot: string;
60
- }
61
- /**
62
- * Removes every workspace project that is not in the focus closure.
63
- *
64
- * Intended to run inside a Docker build stage after installing
65
- * dependencies, so unfocused workspace symlinks are stripped from
66
- * the final image.
67
- * @param options Prune configuration.
68
- * @returns The list of project root paths that were removed.
69
- * @throws If no `vis-docker-manifest.json` exists at the context root.
70
- */
71
- export declare const pruneDockerContext: (options: PruneOptions) => {
72
- removed: string[];
73
- };
@@ -1,40 +0,0 @@
1
- import type { LoadedRunSummary } from "./run-report.d.ts";
2
- /**
3
- * Per-task flakiness statistics aggregated across multiple run summaries.
4
- */
5
- export interface TaskFlakiness {
6
- /** Number of runs where this task failed (exitCode !== 0). */
7
- failures: number;
8
- /** Flakiness rate: failures / totalRuns. */
9
- flakinessRate: number;
10
- /** Most recent failure time (ISO 8601), if any. */
11
- lastFailure?: string;
12
- project: string;
13
- /** Number of runs where this task succeeded. */
14
- successes: number;
15
- target: string;
16
- taskId: string;
17
- /** Total number of times this task appeared in runs. */
18
- totalRuns: number;
19
- }
20
- /**
21
- * Reads all run summary files from `.task-runner/runs/` and computes
22
- * per-task flakiness statistics.
23
- *
24
- * Pass `summaries` (from {@link loadRunSummaries}) when the caller
25
- * already loaded the history — avoids re-reading every JSON off disk
26
- * just to get the same data.
27
- * @param workspaceRoot Absolute path to the workspace root.
28
- * @param options Filtering options.
29
- * @returns Flakiness stats sorted by rate (most flaky first).
30
- */
31
- export declare const analyzeFlakiness: (workspaceRoot: string, options?: {
32
- minRuns?: number;
33
- since?: string;
34
- }, summaries?: LoadedRunSummary[]) => TaskFlakiness[];
35
- /**
36
- * Formats flakiness stats as an ASCII table.
37
- * @param stats Flakiness statistics to format.
38
- * @returns Lines of formatted output (including header).
39
- */
40
- export declare const formatFlakinessTable: (stats: TaskFlakiness[]) => string[];
@@ -1,29 +0,0 @@
1
- /**
2
- * Template discovery for `vis generate`.
3
- *
4
- * Discovery sources, in priority order:
5
- * 1. Native templates in `&lt;workspace>/.vis/templates/&lt;name>.{ts,js,mjs}`.
6
- * 2. Moon-format directories in `&lt;workspace>/.vis/templates/&lt;name>/`
7
- * (any directory with a `template.yml`).
8
- * 3. Moon-format directories in `&lt;workspace>/.moon/templates/&lt;name>/`
9
- * (zero-config import for users mid-migration from moon).
10
- * 4. Extra directories listed in `vis.config.ts` `generator.templates`.
11
- *
12
- * Native templates win over moon templates with the same name; a
13
- * warning is printed at discovery time so the conflict is visible.
14
- */
15
- import type { DiscoveredTemplate } from "./types.d.ts";
16
- interface DiscoverOptions {
17
- /** Extra template directories from `vis.config.ts` `generator.templates`. */
18
- extraDirectories?: string[];
19
- /** Logger callback for conflict warnings. */
20
- onWarning?: (message: string) => void;
21
- /** Workspace root — `.vis/templates/` and `.moon/templates/` are resolved against this. */
22
- workspaceRoot: string;
23
- }
24
- /**
25
- * Discover templates across the workspace. Returns a deduplicated list
26
- * with native sources winning over moon when names collide.
27
- */
28
- export declare const discoverTemplates: (options: DiscoverOptions) => DiscoveredTemplate[];
29
- export {};
@@ -1,15 +0,0 @@
1
- /**
2
- * Native template loader.
3
- *
4
- * Native templates live as `.ts`/`.js`/`.mjs` modules under
5
- * `&lt;workspace>/.vis/templates/&lt;name>.&lt;ext>` and export a `Template` as
6
- * their default export. We use jiti so TypeScript and ESM/CJS
7
- * interop both work without a separate build step.
8
- */
9
- import type { Template } from "./types.d.ts";
10
- /**
11
- * Load a native template module from disk and return its default export.
12
- * The directory containing the file is used as jiti's working dir so
13
- * relative imports inside the template resolve as the author expects.
14
- */
15
- export declare const loadNativeTemplate: (path: string) => Promise<Template>;
@@ -1,42 +0,0 @@
1
- /**
2
- * Filename interpolation for moon-format templates.
3
- *
4
- * Bracket syntax inside any path segment:
5
- * `[var]` → value of `var` from the variable map
6
- * `[var | filter]` → filter applied to the value
7
- * `[var | filter(arg)]` → filter with a string argument
8
- *
9
- * Suffixes `.tera` and `.twig` are stripped from the final segment
10
- * (they exist only for editor syntax highlighting).
11
- */
12
- /**
13
- * Interpolate a single path segment or an entire path. Variables are
14
- * looked up in `vars`; missing keys raise an error so typos surface
15
- * during render rather than producing surprising filenames.
16
- *
17
- * `.tera` / `.twig` extensions are stripped from the result.
18
- */
19
- export declare const interpolateFilename: (filename: string, vars: Record<string, unknown>) => string;
20
- /**
21
- * Strip the trailing `.tera` / `.twig` marker from **every** path
22
- * segment. moon strips them per segment (not just the final one) so a
23
- * template at `src/.tera/file.ts.tera` renders to `src/file.ts`, not
24
- * `src/.tera/file.ts`.
25
- */
26
- export declare const stripTeraSuffix: (filename: string) => string;
27
- /**
28
- * Strip the trailing `.raw` extension. moon adopters ship binary or
29
- * Tera-conflicting files with `.raw` suffix; renderers must skip them
30
- * but the suffix itself is removed on write.
31
- */
32
- export declare const stripRawSuffix: (filename: string) => string;
33
- /**
34
- * True when the file is a partial — matched by *either* a basename
35
- * starting with `_` (moon's primary convention) or a path segment
36
- * equal to `partials` (moon's "folder of partials" convention).
37
- *
38
- * The earlier substring match on `"partial"` swallowed any file whose
39
- * name contained those letters (e.g. `PartialResult.ts`,
40
- * `partially-applied.ts`), silently dropping them from the output.
41
- */
42
- export declare const isPartialPath: (path: string) => boolean;
@@ -1,22 +0,0 @@
1
- /**
2
- * Built-in filter functions used by the Tera-subset renderer and
3
- * the filename interpolator. Names match moon's filter set.
4
- *
5
- * Case helpers come from `@visulima/string/case` (better Unicode and
6
- * acronym handling than the bare `change-case` package; same package
7
- * powers the rest of the visulima toolchain). Path filters use
8
- * `@visulima/path` so behaviour matches the rest of vis.
9
- */
10
- export type FilterFn = (value: unknown, ...args: unknown[]) => unknown;
11
- /**
12
- * Map of filter name → function. Unknown filter names raise an error
13
- * at render time so typos in templates don't silently no-op.
14
- */
15
- export declare const FILTERS: Record<string, FilterFn>;
16
- export declare const isKnownFilter: (name: string) => boolean;
17
- /**
18
- * Apply a filter by name with optional arguments. Throws when the
19
- * filter name is unknown — callers should phrase the error with a
20
- * file:line reference.
21
- */
22
- export declare const applyFilter: (name: string, value: unknown, args?: unknown[]) => unknown;
@@ -1,39 +0,0 @@
1
- /**
2
- * Per-file YAML frontmatter splitter for moon-format templates.
3
- *
4
- * Frontmatter is a YAML block delimited by `---` on its own line at
5
- * the very top of a file. Recognised keys (moon parity):
6
- * - `to`: override the destination path (interpolation supported)
7
- * - `force`: overwrite without prompting (default false)
8
- * - `if`: include the file only when the condition is truthy
9
- * - `skip`: skip rendering entirely when truthy
10
- *
11
- * Frontmatter is parsed via `@visulima/fs` `readYaml`-compatible YAML
12
- * dialect. The parser is exposed as a callback to keep this module
13
- * dependency-free for unit tests.
14
- */
15
- export interface Frontmatter {
16
- /** Allow extra keys without losing them on round-trip. */
17
- [key: string]: unknown;
18
- /** Overwrite an existing file at the destination without prompting. */
19
- force?: boolean;
20
- /** Truthy expression / value gate — file is emitted only when truthy. */
21
- if?: unknown;
22
- /** Truthy expression / value gate — file is skipped when truthy. */
23
- skip?: unknown;
24
- /** Override destination path; supports `{{ var }}` interpolation. */
25
- to?: string;
26
- }
27
- export interface SplitResult {
28
- /** File body with the frontmatter block removed. */
29
- body: string;
30
- /** Parsed frontmatter, or `undefined` when the file has no `---` block. */
31
- frontmatter?: Frontmatter;
32
- }
33
- /**
34
- * Split the frontmatter block from the file body.
35
- * @param source The file contents.
36
- * @param parseYaml YAML parser callback; pass `(s) => parseYaml(s)` from
37
- * `@visulima/fs/yaml` at the call site to avoid a runtime dep here.
38
- */
39
- export declare const splitFrontmatter: (source: string, parseYaml: (yaml: string) => unknown) => SplitResult;
@@ -1,19 +0,0 @@
1
- /**
2
- * Moon-format template adapter.
3
- *
4
- * Loads a directory matching moon's template layout
5
- * (`template.yml` + a tree of files / partials / assets) and synthesises
6
- * a `Template` (the same shape native vis templates export).
7
- *
8
- * The adapter pre-reads every template file at load time and parses
9
- * the AST once. Per-run the renderer evaluates the AST against the
10
- * resolved options scope — no further disk I/O.
11
- */
12
- import type { Template } from "../types.d.ts";
13
- /**
14
- * Load a moon-format template directory into a `Template`.
15
- * @param templateDir Absolute path to the directory containing `template.yml`.
16
- * @param name Stable name used by `vis generate &lt;name>` (used as a fallback
17
- * when `template.yml` omits `title`).
18
- */
19
- export declare const loadMoonTemplate: (templateDir: string, name: string) => Template;
@@ -1,85 +0,0 @@
1
- /**
2
- * Tera-subset renderer for moon-format template content.
3
- *
4
- * Supported constructs (intersection of moon's most-used features):
5
- * - `{{ var }}` and `{{ var | filter }}` and `{{ var | filter(arg) }}`
6
- * with chained filters: `{{ var | snake_case | upper_case }}`
7
- * - `{% if expr %} ... {% else %} ... {% endif %}`
8
- * where `expr` is `var`, `not var`, `var == "lit"`, `var != "lit"`
9
- * - `{% for x in collection %} ... {% endfor %}`
10
- * where `collection` is a variable holding an array
11
- * - `{% include "name" %}` — pulls the rendered output of a partial
12
- *
13
- * Explicitly UNSUPPORTED, with a clear `file:line` error message:
14
- * - `{% set x = ... %}`
15
- * - `{% extends "..." %}`
16
- * - `{% block ... %}` / `{% endblock %}`
17
- * - `{% macro ... %}` / `{% endmacro %}`
18
- * - Custom whitespace control (`{%- -%}`)
19
- *
20
- * The parser is a single-pass tokenizer feeding a tree-walking
21
- * evaluator. Errors carry the original 1-based line number for the
22
- * source file, threaded through from the moon adapter via `filename`.
23
- */
24
- type Node = {
25
- type: "text";
26
- value: string;
27
- } | {
28
- expression: string;
29
- line: number;
30
- type: "expr";
31
- } | {
32
- alternate?: Node[];
33
- condition: string;
34
- consequent: Node[];
35
- line: number;
36
- type: "if";
37
- } | {
38
- binding: string;
39
- body: Node[];
40
- collection: string;
41
- line: number;
42
- type: "for";
43
- } | {
44
- line: number;
45
- name: string;
46
- type: "include";
47
- };
48
- /**
49
- * Recursive-descent condition evaluator with precedence:
50
- * `or` (lowest) → `and` → `not` → comparison (`==` / `!=`) → primary.
51
- * Parentheses override precedence.
52
- *
53
- * Exported so the moon adapter can reuse the same grammar on
54
- * frontmatter `if:` / `skip:` strings.
55
- */
56
- export declare const evaluateConditionExpression: (condition: string, scope: Record<string, unknown>, filename: string, line: number) => boolean;
57
- interface RenderOptions {
58
- /** Source filename — used in error messages. */
59
- filename: string;
60
- /**
61
- * Internal: set of partial names currently on the include stack.
62
- * Used to detect cycles — if an include re-enters a partial that's
63
- * already resolving, we throw instead of stack-overflowing.
64
- */
65
- includeStack?: Set<string>;
66
- /** Map of partial name → already-resolved AST. */
67
- partials?: Map<string, Node[]>;
68
- /** Variable scope (built-in vars merged with user options). */
69
- scope: Record<string, unknown>;
70
- }
71
- /**
72
- * Parse a template source into an AST. Used by the moon adapter to
73
- * pre-parse partials once and reuse them across files.
74
- */
75
- export declare const parseTemplate: (source: string, filename: string) => Node[];
76
- /**
77
- * Render a parsed AST with the given scope.
78
- */
79
- export declare const renderAst: (nodes: Node[], options: RenderOptions) => string;
80
- /**
81
- * Convenience: parse + render in one call. Prefer `parseTemplate` +
82
- * `renderAst` when a template is rendered repeatedly (e.g. in loops).
83
- */
84
- export declare const renderTemplate: (source: string, options: RenderOptions) => string;
85
- export type { Node };
@@ -1,14 +0,0 @@
1
- /**
2
- * Split on `,` at the top level — outside quotes and parentheses.
3
- *
4
- * Used by both `parseFilterCall` in `filename-interp.ts` and
5
- * `tera-subset.ts` so `path_join("a,b", "c")` and
6
- * `[var | path_join("a,b", "c")]` produce the same two args.
7
- */
8
- export declare const splitCommaOutsideQuotes: (input: string) => string[];
9
- /**
10
- * Strip matching single- or double-quote wrappers. Returns `undefined`
11
- * when the input isn't a quoted literal so callers can fall through to
12
- * variable lookup or number parsing.
13
- */
14
- export declare const stripQuotes: (input: string) => string | undefined;
@@ -1,25 +0,0 @@
1
- /**
2
- * Variable-schema → interactive prompts.
3
- *
4
- * Builds on the same `node:readline` helpers `vis create` uses (see
5
- * src/commands/create/prompts.ts). The implementation is minimal — no
6
- * fancy multi-line UI, no spinner, no terminal control codes — to
7
- * stay consistent with the rest of the vis CLI surface.
8
- */
9
- import type { Options, VariableMap } from "./types.d.ts";
10
- interface CollectOptions {
11
- /** When true, skip prompts and use defaults / overrides only. */
12
- defaults: boolean;
13
- /** When false, never prompt — error on missing required values. */
14
- interactive: boolean;
15
- /** CLI overrides — variable name → unparsed string from `--name=value`. */
16
- overrides: Record<string, string>;
17
- /** Variable schema. */
18
- variables: VariableMap;
19
- }
20
- /**
21
- * Collect option values from prompts + CLI overrides + defaults, then
22
- * validate them.
23
- */
24
- export declare const collectOptions: (collectOptionsArguments: CollectOptions) => Promise<Options>;
25
- export {};
@@ -1,43 +0,0 @@
1
- /**
2
- * Remote template fetching for `vis generate`.
3
- *
4
- * Reuses giget (already a vis dep, used by `vis create`) to fetch
5
- * `git://`, `npm://`, and `https://` archive sources into a cache
6
- * directory before discover/load runs against them.
7
- *
8
- * Sources are normalized via the same patterns vis create uses; see
9
- * `src/commands/create/templates/remote.ts` for the underlying
10
- * downloadTemplate call.
11
- */
12
- /**
13
- * True when the input looks like a remote source giget can resolve.
14
- */
15
- export declare const isRemoteSource: (input: string) => boolean;
16
- interface FetchOptions {
17
- /** Auth token forwarded to giget for private repos. */
18
- auth?: string;
19
- /** Prefer cached templates over re-download. */
20
- preferOffline?: boolean;
21
- /** Override the cache/work directory (defaults to a fresh tmp). */
22
- targetDirectory?: string;
23
- }
24
- export interface FetchResult {
25
- /**
26
- * Release the tmp directory once the caller has finished loading
27
- * the template into memory. No-op when the directory was supplied
28
- * externally via `targetDirectory`.
29
- */
30
- cleanup: () => void;
31
- /** Absolute directory containing the downloaded template. */
32
- directory: string;
33
- }
34
- /**
35
- * Download a remote template and return the directory it lives in.
36
- * @example
37
- * ```typescript
38
- * const { directory } = await fetchRemoteTemplate("git://github.com/org/template#main");
39
- * const template = await loadMoonTemplate(directory, "from-git");
40
- * ```
41
- */
42
- export declare const fetchRemoteTemplate: (source: string, options?: FetchOptions) => Promise<FetchResult>;
43
- export {};
@@ -1,37 +0,0 @@
1
- /**
2
- * Template runner — applies a `Creation` to disk.
3
- *
4
- * Walks the recursive `files` tree, prompts for overwrites unless
5
- * `--force` was passed, runs scripts in phase order, and prints
6
- * suggestions at the end. `--dry-run` prints the planned writes
7
- * without touching the filesystem.
8
- *
9
- * Every write target is checked against the destination directory to
10
- * reject `..`-escapes and absolute paths coming from rendered
11
- * frontmatter `to:` fields or filename interpolation — template
12
- * authors (or remote templates) must not be able to scribble
13
- * outside the caller's chosen destination.
14
- */
15
- import type { Template } from "./types.d.ts";
16
- interface RunnerOptions {
17
- /** Caller's CWD for `working_dir`. */
18
- cwd: string;
19
- /** Destination directory (absolute). */
20
- destination: string;
21
- /** When true, print but don't write. */
22
- dryRun?: boolean;
23
- /** When true, overwrite existing files without prompting. */
24
- force?: boolean;
25
- /** Resolved option values from `collectOptions`. */
26
- options: Record<string, unknown>;
27
- /** When true, don't run scripts. */
28
- skipScripts?: boolean;
29
- /** Workspace root for `dest_rel_dir`. */
30
- workspaceRoot: string;
31
- }
32
- /**
33
- * Run a template end-to-end: invoke `produce`, write files, run scripts,
34
- * print suggestions.
35
- */
36
- export declare const runTemplate: (template: Template, options: RunnerOptions) => Promise<void>;
37
- export {};