@visulima/vis 1.0.0-alpha.5 → 1.0.0-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/CHANGELOG.md +157 -81
  2. package/README.md +144 -14
  3. package/dist/ai-analysis.d.ts +3 -17
  4. package/dist/ai-cache.d.ts +1 -1
  5. package/dist/ai-types.d.ts +16 -0
  6. package/dist/bin.js +352 -221
  7. package/dist/cache-directory.d.ts +73 -0
  8. package/dist/codeowners.d.ts +30 -0
  9. package/dist/commands/action-graph.d.ts +8 -0
  10. package/dist/commands/audit.d.ts +3 -3
  11. package/dist/commands/cache.d.ts +86 -0
  12. package/dist/commands/ci.d.ts +19 -0
  13. package/dist/commands/docker.d.ts +22 -0
  14. package/dist/commands/generate.d.ts +10 -0
  15. package/dist/commands/ignore-helpers.d.ts +157 -0
  16. package/dist/commands/ignore.d.ts +17 -0
  17. package/dist/commands/info.d.ts +3 -0
  18. package/dist/commands/list.d.ts +3 -0
  19. package/dist/commands/migrate/backup.d.ts +8 -0
  20. package/dist/commands/migrate/constants.d.ts +6 -2
  21. package/dist/commands/migrate/gitleaks.d.ts +29 -0
  22. package/dist/commands/migrate/json.d.ts +4 -2
  23. package/dist/commands/migrate/kingfisher.d.ts +14 -0
  24. package/dist/commands/migrate/moon.d.ts +5 -0
  25. package/dist/commands/migrate/nano-staged.d.ts +30 -0
  26. package/dist/commands/migrate/nx.d.ts +12 -0
  27. package/dist/commands/migrate/prompt.d.ts +2 -0
  28. package/dist/commands/migrate/secretlint.d.ts +14 -0
  29. package/dist/commands/migrate/shared.d.ts +29 -0
  30. package/dist/commands/migrate/turborepo.d.ts +11 -0
  31. package/dist/commands/migrate/types.d.ts +8 -1
  32. package/dist/commands/migrate/verify.d.ts +12 -0
  33. package/dist/commands/run.d.ts +13 -0
  34. package/dist/commands/sbom.d.ts +10 -0
  35. package/dist/commands/secrets.d.ts +3 -0
  36. package/dist/commands/staged.d.ts +7 -0
  37. package/dist/commands/status.d.ts +3 -0
  38. package/dist/commands/sync.d.ts +16 -0
  39. package/dist/commands/task-why.d.ts +3 -0
  40. package/dist/config.d.ts +17 -2
  41. package/dist/config.js +1 -1
  42. package/dist/docker.d.ts +73 -0
  43. package/dist/flakiness.d.ts +40 -0
  44. package/dist/generate/discover.d.ts +29 -0
  45. package/dist/generate/index.d.ts +32 -0
  46. package/dist/generate/index.js +1 -0
  47. package/dist/generate/loader.d.ts +15 -0
  48. package/dist/generate/moon-adapter/filename-interp.d.ts +42 -0
  49. package/dist/generate/moon-adapter/filters.d.ts +22 -0
  50. package/dist/generate/moon-adapter/frontmatter.d.ts +39 -0
  51. package/dist/generate/moon-adapter/index.d.ts +19 -0
  52. package/dist/generate/moon-adapter/tera-subset.d.ts +85 -0
  53. package/dist/generate/moon-adapter/util.d.ts +14 -0
  54. package/dist/generate/prompts.d.ts +25 -0
  55. package/dist/generate/remote.d.ts +43 -0
  56. package/dist/generate/runner.d.ts +37 -0
  57. package/dist/generate/types.d.ts +152 -0
  58. package/dist/hooks.d.ts +118 -0
  59. package/dist/native-binding.d.ts +8 -1
  60. package/dist/packem_chunks/index.js +7 -0
  61. package/dist/packem_chunks/loader.js +1 -0
  62. package/dist/packem_shared/otelPlugin-CJLkguJ8.js +1 -0
  63. package/dist/plugins/otel.d.ts +63 -0
  64. package/dist/pm-runner.d.ts +24 -3
  65. package/dist/run-report.d.ts +40 -0
  66. package/dist/runtime-check.d.ts +27 -0
  67. package/dist/sbom/cyclonedx.d.ts +39 -0
  68. package/dist/sbom/installed-package.d.ts +49 -0
  69. package/dist/sbom/license.d.ts +31 -0
  70. package/dist/sbom/lockfile.d.ts +34 -0
  71. package/dist/sbom/purl.d.ts +25 -0
  72. package/dist/sbom/resolve-specifier.d.ts +24 -0
  73. package/dist/sbom/types.d.ts +196 -0
  74. package/dist/secrets/baseline.d.ts +20 -0
  75. package/dist/secrets/format.d.ts +14 -0
  76. package/dist/secrets/git.d.ts +6 -0
  77. package/dist/secrets/spinner.d.ts +9 -0
  78. package/dist/selectors.d.ts +81 -0
  79. package/dist/shell-history.d.ts +16 -0
  80. package/dist/staged/cli-parse.d.ts +18 -0
  81. package/dist/staged/config.d.ts +14 -0
  82. package/dist/staged/errors/apply-empty-commit-error.d.ts +4 -0
  83. package/dist/staged/errors/config-error.d.ts +4 -0
  84. package/dist/staged/errors/get-backup-stash-error.d.ts +4 -0
  85. package/dist/staged/errors/git-error.d.ts +6 -0
  86. package/dist/staged/errors/index.d.ts +12 -0
  87. package/dist/staged/errors/restore-original-state-error.d.ts +4 -0
  88. package/dist/staged/errors/staged-error.d.ts +8 -0
  89. package/dist/staged/errors/task-error.d.ts +6 -0
  90. package/dist/staged/git/diff.d.ts +76 -0
  91. package/dist/staged/git/exec.d.ts +43 -0
  92. package/dist/staged/git/index.d.ts +77 -0
  93. package/dist/staged/git/stash.d.ts +37 -0
  94. package/dist/staged/index.d.ts +13 -0
  95. package/dist/staged/match.d.ts +12 -0
  96. package/dist/staged/renderer/index.d.ts +9 -0
  97. package/dist/staged/renderer/ink/index.d.ts +4 -0
  98. package/dist/staged/renderer/plain.d.ts +12 -0
  99. package/dist/staged/tasks/build.d.ts +13 -0
  100. package/dist/staged/tasks/exec.d.ts +56 -0
  101. package/dist/staged/tasks/run.d.ts +26 -0
  102. package/dist/staged/types.d.ts +173 -0
  103. package/dist/target-discovery.d.ts +59 -0
  104. package/dist/target-options.d.ts +261 -0
  105. package/dist/tui/components/OutputPanel.d.ts +2 -1
  106. package/dist/tui/components/TaskListPanel.d.ts +1 -1
  107. package/dist/tui/components/TaskStore.d.ts +1 -1
  108. package/dist/tui/components/devcontainer/DevcontainerStore.d.ts +1 -1
  109. package/dist/tui/components/devcontainer/catalogs/mount-suggestions.d.ts +1 -1
  110. package/dist/tui/components/devcontainer/sections/GeneralSection.d.ts +1 -1
  111. package/dist/tui/components/devcontainer/sections/PreviewPanel.d.ts +1 -1
  112. package/dist/tui/components/devcontainer/types.d.ts +4 -4
  113. package/dist/tui/components/graph/GraphStore.d.ts +1 -1
  114. package/dist/tui/components/graph/ProjectDetailPanel.d.ts +1 -1
  115. package/dist/tui/components/optimize/OptimizeDetailPanel.d.ts +1 -1
  116. package/dist/tui/components/optimize/OptimizeStore.d.ts +1 -1
  117. package/dist/tui/components/update/PackageDetailPanel.d.ts +1 -1
  118. package/dist/tui/components/update/PackageListPanel.d.ts +2 -2
  119. package/dist/tui/components/update/UpdateStore.d.ts +1 -1
  120. package/dist/tui/components/update/VisUpdateApp.d.ts +3 -3
  121. package/dist/tui/dynamic-life-cycle.d.ts +2 -1
  122. package/dist/tui/static-life-cycle.d.ts +7 -1
  123. package/dist/watch.d.ts +65 -0
  124. package/dist/workspace.d.ts +326 -6
  125. package/index.js +727 -554
  126. package/package.json +38 -32
  127. package/schemas/project.schema.json +344 -0
  128. package/schemas/vis-config.schema.json +331 -0
@@ -1,5 +1,15 @@
1
- import type { ConstraintsConfig, ProjectGraph, TargetConfiguration, WorkspaceConfiguration } from "@visulima/task-runner";
2
- import type { Configuration as StagedConfig } from "lint-staged";
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
+ }
3
13
  interface PackageJson {
4
14
  bin?: Record<string, string> | string;
5
15
  dependencies?: Record<string, string>;
@@ -12,6 +22,77 @@ interface PackageJson {
12
22
  packages?: string[];
13
23
  };
14
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
+ }
15
96
  interface VisConfig {
16
97
  /** AI analysis configuration */
17
98
  ai?: {
@@ -22,6 +103,23 @@ interface VisConfig {
22
103
  /** Use a specific provider instead of auto-detecting (e.g., `"claude"`, `"gemini"`). */
23
104
  provider?: string;
24
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;
25
123
  /**
26
124
  * Project dependency constraints.
27
125
  * Enforced after building the project graph, before running tasks.
@@ -93,8 +191,117 @@ interface VisConfig {
93
191
  */
94
192
  templates?: Record<string, string>;
95
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;
96
243
  /** Package override mappings applied during migration (e.g., `{ "lodash": "lodash-es" }`) */
97
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
+ };
98
305
  /**
99
306
  * Supply chain security settings.
100
307
  * These settings are inspired by pnpm's security features and are applied
@@ -259,7 +466,36 @@ interface VisConfig {
259
466
  */
260
467
  staged?: StagedConfig;
261
468
  /** Target default configurations */
262
- targetDefaults?: Record<string, Partial<TargetConfiguration>>;
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
+ })[]>;
263
499
  /** Task runner options */
264
500
  taskRunnerOptions?: Record<string, unknown>;
265
501
  /** Terminal UI configuration */
@@ -329,6 +565,15 @@ interface VisConfig {
329
565
  security?: boolean;
330
566
  target?: "latest" | "minor" | "patch";
331
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;
332
577
  }
333
578
  /**
334
579
  * Resolves glob-like workspace patterns to actual directories.
@@ -338,18 +583,93 @@ declare const resolveWorkspacePatterns: (workspaceRoot: string, patterns: string
338
583
  /**
339
584
  * Reads workspace patterns from pnpm-workspace.yaml (simple parser).
340
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[];
341
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>;
342
655
  /**
343
656
  * Discovers all projects in the workspace and builds a WorkspaceConfiguration.
344
657
  */
345
658
  declare const discoverWorkspace: (workspaceRoot: string, config?: VisConfig) => {
346
659
  config: VisConfig;
660
+ packageJsons: PackageJsonIndex;
661
+ projectOptions: ProjectOptionsIndex;
347
662
  workspace: WorkspaceConfiguration;
348
663
  };
349
664
  /**
350
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`.
351
671
  */
352
- declare const buildProjectGraph: (workspaceRoot: string, workspace: WorkspaceConfiguration) => ProjectGraph;
672
+ declare const buildProjectGraph: (workspaceRoot: string, workspace: WorkspaceConfiguration, packageJsons?: PackageJsonIndex) => ProjectGraph;
353
673
  export type { PackageJson, VisConfig };
354
- export { buildProjectGraph, discoverWorkspace, readPnpmWorkspacePatterns, resolveWorkspacePatterns };
355
- export { type Configuration as StagedConfig } from "lint-staged";
674
+ export { buildProjectGraph, collectTargetDefaults, discoverWorkspace, readPnpmWorkspacePatterns, resolveWorkspacePatterns, scopeMatches, validateWorkspacesField, };
675
+ export { type StagedConfig } from "./staged/index.d.ts";