@hexagen-monaco/sync 0.9.0 → 0.12.0

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 (199) hide show
  1. package/LICENSE +9 -0
  2. package/README.md +58 -10
  3. package/dist/application/ports/out/file-system.port.d.ts.map +1 -1
  4. package/dist/application/ports/out/index.d.ts +1 -2
  5. package/dist/application/ports/out/index.d.ts.map +1 -1
  6. package/dist/application/ports/out/symbol-reference-index.port.d.ts +74 -0
  7. package/dist/application/ports/out/symbol-reference-index.port.d.ts.map +1 -0
  8. package/dist/application/use-cases/get-architecture-graph.use-case.d.ts +1 -1
  9. package/dist/application/use-cases/get-architecture-graph.use-case.d.ts.map +1 -1
  10. package/dist/application/use-cases/get-linter-report.use-case.d.ts +1 -1
  11. package/dist/application/use-cases/get-linter-report.use-case.d.ts.map +1 -1
  12. package/dist/application/use-cases/index.d.ts +0 -1
  13. package/dist/application/use-cases/index.d.ts.map +1 -1
  14. package/dist/application/use-cases/migrate-manifest.use-case.d.ts +4 -1
  15. package/dist/application/use-cases/migrate-manifest.use-case.d.ts.map +1 -1
  16. package/dist/application/use-cases/refactoring-impact.use-case.d.ts +25 -6
  17. package/dist/application/use-cases/refactoring-impact.use-case.d.ts.map +1 -1
  18. package/dist/arch-linter-bin.d.ts +19 -3
  19. package/dist/arch-linter-bin.d.ts.map +1 -1
  20. package/dist/cli.js +3449 -5375
  21. package/dist/cli.js.map +1 -1
  22. package/dist/commands/add/validate.d.ts.map +1 -1
  23. package/dist/commands/adopt/index.d.ts +24 -0
  24. package/dist/commands/adopt/index.d.ts.map +1 -0
  25. package/dist/commands/bootstrap/index.d.ts +62 -0
  26. package/dist/commands/bootstrap/index.d.ts.map +1 -0
  27. package/dist/commands/manifest/migrate.d.ts.map +1 -1
  28. package/dist/commands/report/baseline-read.d.ts +12 -0
  29. package/dist/commands/report/baseline-read.d.ts.map +1 -0
  30. package/dist/commands/report/build-report.d.ts +13 -0
  31. package/dist/commands/report/build-report.d.ts.map +1 -0
  32. package/dist/commands/report/context-map.d.ts +9 -0
  33. package/dist/commands/report/context-map.d.ts.map +1 -0
  34. package/dist/commands/report/exec-git.d.ts +3 -0
  35. package/dist/commands/report/exec-git.d.ts.map +1 -0
  36. package/dist/commands/report/handoff.d.ts +3 -0
  37. package/dist/commands/report/handoff.d.ts.map +1 -0
  38. package/dist/commands/report/index.d.ts +14 -0
  39. package/dist/commands/report/index.d.ts.map +1 -0
  40. package/dist/commands/report/lint-collect.d.ts +4 -0
  41. package/dist/commands/report/lint-collect.d.ts.map +1 -0
  42. package/dist/commands/report/ratchet-trend.d.ts +3 -0
  43. package/dist/commands/report/ratchet-trend.d.ts.map +1 -0
  44. package/dist/commands/report/render-html.d.ts +3 -0
  45. package/dist/commands/report/render-html.d.ts.map +1 -0
  46. package/dist/commands/report/render-markdown.d.ts +3 -0
  47. package/dist/commands/report/render-markdown.d.ts.map +1 -0
  48. package/dist/commands/report/types.d.ts +52 -0
  49. package/dist/commands/report/types.d.ts.map +1 -0
  50. package/dist/commands/report/zip-store.d.ts +10 -0
  51. package/dist/commands/report/zip-store.d.ts.map +1 -0
  52. package/dist/commands/scan/index.d.ts +185 -0
  53. package/dist/commands/scan/index.d.ts.map +1 -0
  54. package/dist/commands/shared/detect-workspaces.d.ts +12 -0
  55. package/dist/commands/shared/detect-workspaces.d.ts.map +1 -0
  56. package/dist/commands/shared/index.d.ts +2 -1
  57. package/dist/commands/shared/index.d.ts.map +1 -1
  58. package/dist/commands/shared/lstat-exists.d.ts +7 -0
  59. package/dist/commands/shared/lstat-exists.d.ts.map +1 -0
  60. package/dist/commands/shared/project-root.d.ts +7 -0
  61. package/dist/commands/shared/project-root.d.ts.map +1 -1
  62. package/dist/domain/services/emission-plan-builder.d.ts +14 -3
  63. package/dist/domain/services/emission-plan-builder.d.ts.map +1 -1
  64. package/dist/domain/services/impact-analysis.types.d.ts +6 -1
  65. package/dist/domain/services/impact-analysis.types.d.ts.map +1 -1
  66. package/dist/domain/services/impact-request-validator.d.ts.map +1 -1
  67. package/dist/domain/services/index.d.ts +2 -0
  68. package/dist/domain/services/index.d.ts.map +1 -1
  69. package/dist/domain/services/layer-classifier.d.ts +53 -2
  70. package/dist/domain/services/layer-classifier.d.ts.map +1 -1
  71. package/dist/domain/services/layer-dir-resolver.d.ts +82 -0
  72. package/dist/domain/services/layer-dir-resolver.d.ts.map +1 -0
  73. package/dist/domain/services/name-normalizer.d.ts +35 -0
  74. package/dist/domain/services/name-normalizer.d.ts.map +1 -0
  75. package/dist/domain/services/stub-template-resolver.d.ts +33 -2
  76. package/dist/domain/services/stub-template-resolver.d.ts.map +1 -1
  77. package/dist/generators/apps-framework-templates.d.ts.map +1 -1
  78. package/dist/generators/architecture-file-templates.d.ts +2 -2
  79. package/dist/generators/architecture-file-templates.d.ts.map +1 -1
  80. package/dist/generators/architecture-files.d.ts.map +1 -1
  81. package/dist/generators/cross-context.d.ts.map +1 -1
  82. package/dist/generators/eslint.d.ts.map +1 -1
  83. package/dist/generators/layer-folders.d.ts +9 -1
  84. package/dist/generators/layer-folders.d.ts.map +1 -1
  85. package/dist/generators/package-json.d.ts.map +1 -1
  86. package/dist/generators/package-src-index.d.ts +5 -0
  87. package/dist/generators/package-src-index.d.ts.map +1 -0
  88. package/dist/generators/root-file-templates.d.ts +1 -1
  89. package/dist/generators/root-file-templates.d.ts.map +1 -1
  90. package/dist/generators/root-files.d.ts.map +1 -1
  91. package/dist/generators/stubs.d.ts +4 -1
  92. package/dist/generators/stubs.d.ts.map +1 -1
  93. package/dist/index.d.ts +23 -3
  94. package/dist/index.d.ts.map +1 -1
  95. package/dist/index.js +633 -4727
  96. package/dist/index.js.map +1 -1
  97. package/dist/infrastructure/adapters/atomic-file-system.adapter.d.ts.map +1 -1
  98. package/dist/infrastructure/adapters/file-system-workspace.adapter.d.ts.map +1 -1
  99. package/dist/infrastructure/adapters/index.d.ts +1 -0
  100. package/dist/infrastructure/adapters/index.d.ts.map +1 -1
  101. package/dist/infrastructure/adapters/ts-morph-symbol-index.adapter.d.ts +47 -0
  102. package/dist/infrastructure/adapters/ts-morph-symbol-index.adapter.d.ts.map +1 -0
  103. package/dist/infrastructure/config/layout-schema.d.ts +29 -0
  104. package/dist/infrastructure/config/layout-schema.d.ts.map +1 -0
  105. package/dist/infrastructure/config/load-layout-config.d.ts +8 -0
  106. package/dist/infrastructure/config/load-layout-config.d.ts.map +1 -0
  107. package/dist/linter.d.ts +24 -0
  108. package/dist/linter.d.ts.map +1 -1
  109. package/dist/manifest-service.d.ts.map +1 -1
  110. package/dist/refactoring/impact-analyzer.d.ts +7 -2
  111. package/dist/refactoring/impact-analyzer.d.ts.map +1 -1
  112. package/dist/sync-engine.d.ts.map +1 -1
  113. package/dist/templates/adobe-creative-production/files/src/domain/ports/out/creative-production.port.ts +2 -4
  114. package/dist/templates/adobe-creative-production/files/src/infrastructure/adobe/creative-production/creative-production.adapter.ts +8 -7
  115. package/dist/templates/adobe-express/files/src/domain/ports/out/express.port.ts +2 -4
  116. package/dist/templates/adobe-express/files/src/infrastructure/adobe/express/express.adapter.ts +9 -8
  117. package/dist/templates/adobe-firefly-composite/files/src/domain/ports/out/composite.port.ts +2 -4
  118. package/dist/templates/adobe-firefly-composite/files/src/infrastructure/adobe/composite/composite.adapter.ts +12 -12
  119. package/dist/templates/adobe-firefly-content-tagging/files/src/domain/ports/out/content-tagging.port.ts +2 -4
  120. package/dist/templates/adobe-firefly-content-tagging/files/src/infrastructure/adobe/content-tagging/content-tagging.adapter.ts +6 -5
  121. package/dist/templates/adobe-firefly-core/README.md +1 -1
  122. package/dist/templates/adobe-firefly-core/files/src/domain/errors/creative-service-error.ts +62 -0
  123. package/dist/templates/adobe-firefly-core/files/src/infrastructure/adobe/errors/to-creative-service-error.ts +45 -0
  124. package/dist/templates/adobe-firefly-core/files/src/infrastructure/adobe/index.ts +9 -0
  125. package/dist/templates/adobe-firefly-core/manifest.json +2 -0
  126. package/dist/templates/adobe-firefly-custom-models/files/src/domain/ports/out/custom-model.port.ts +5 -7
  127. package/dist/templates/adobe-firefly-custom-models/files/src/infrastructure/adobe/custom-models/firefly-custom-model.adapter.ts +16 -15
  128. package/dist/templates/adobe-firefly-generate/files/src/domain/ports/out/image-generation.port.ts +6 -8
  129. package/dist/templates/adobe-firefly-generate/files/src/infrastructure/adobe/generate/firefly-generate.adapter.ts +14 -16
  130. package/dist/templates/adobe-firefly-media/files/src/domain/ports/out/media-generation.port.ts +6 -8
  131. package/dist/templates/adobe-firefly-media/files/src/infrastructure/adobe/media/firefly-media.adapter.ts +11 -10
  132. package/dist/templates/adobe-firefly-upscale/files/src/domain/ports/out/upscale.port.ts +2 -4
  133. package/dist/templates/adobe-firefly-upscale/files/src/infrastructure/adobe/upscale/upscale.adapter.ts +13 -11
  134. package/dist/templates/adobe-illustrator/files/src/domain/ports/out/illustrator.port.ts +4 -6
  135. package/dist/templates/adobe-illustrator/files/src/infrastructure/adobe/illustrator/illustrator.adapter.ts +17 -15
  136. package/dist/templates/adobe-indesign/files/src/domain/ports/out/indesign.port.ts +4 -6
  137. package/dist/templates/adobe-indesign/files/src/infrastructure/adobe/indesign/indesign.adapter.ts +10 -9
  138. package/dist/templates/adobe-lightroom/files/src/domain/ports/out/lightroom.port.ts +4 -6
  139. package/dist/templates/adobe-lightroom/files/src/infrastructure/adobe/lightroom/lightroom.adapter.ts +10 -9
  140. package/dist/templates/adobe-photoshop/files/src/domain/ports/out/photoshop-automation.port.ts +6 -8
  141. package/dist/templates/adobe-photoshop/files/src/infrastructure/adobe/photoshop/photoshop-automation.adapter.ts +12 -11
  142. package/dist/templates/adobe-substance-3d/files/src/domain/ports/out/substance-3d.port.ts +4 -6
  143. package/dist/templates/adobe-substance-3d/files/src/infrastructure/adobe/substance-3d/substance-3d.adapter.ts +10 -9
  144. package/dist/templates/agents-md/files/AGENTS.md +5 -5
  145. package/dist/templates/bedrock-agentcore-runtime/files/src/application/ports/agent-runtime.port.ts +25 -0
  146. package/dist/templates/bedrock-agentcore-runtime/files/src/infrastructure/agentcore/http/invocations.handler.ts +1 -1
  147. package/dist/templates/bedrock-agentcore-runtime/files/src/infrastructure/agentcore/http/server.ts +1 -1
  148. package/dist/templates/bedrock-agentcore-runtime/files/src/infrastructure/agentcore/runtime/payload.ts +5 -22
  149. package/dist/templates/bedrock-agentcore-runtime/manifest.json +1 -0
  150. package/dist/templates/ci-github-actions/README.md +13 -7
  151. package/dist/templates/ci-github-actions/files/.github/dependabot.yml +9 -2
  152. package/dist/templates/ci-github-actions/files/.github/workflows/ci.yml +18 -14
  153. package/dist/templates/ci-github-actions/files/.github/workflows/deploy-fly.yml +12 -6
  154. package/dist/templates/ci-github-actions/files/.github/workflows/deploy-railway.yml +14 -8
  155. package/dist/templates/ci-github-actions/files/.github/workflows/deploy-vercel.yml +29 -8
  156. package/dist/templates/ci-github-actions/files/.github/workflows/deploy-vps.yml +14 -8
  157. package/dist/templates/ci-github-actions/files/.github/workflows/preview.yml +34 -18
  158. package/dist/templates/ci-github-actions/manifest.json +2 -2
  159. package/dist/templates/docker/README.md +3 -0
  160. package/dist/templates/docker/files/.github/workflows/docker-build.yml +15 -6
  161. package/dist/templates/docker/manifest.json +1 -0
  162. package/dist/templates/llm-adapter/files/src/domain/errors/llm-error.ts +35 -0
  163. package/dist/templates/llm-adapter/files/src/domain/ports/out/llm-client.port.ts +1 -1
  164. package/dist/templates/llm-adapter/files/src/infrastructure/llm/adapters/anthropic-llm-client.adapter.ts +1 -1
  165. package/dist/templates/llm-adapter/files/src/infrastructure/llm/adapters/azure-openai-llm-client.adapter.ts +1 -1
  166. package/dist/templates/llm-adapter/files/src/infrastructure/llm/adapters/ollama-llm-client.adapter.ts +1 -1
  167. package/dist/templates/llm-adapter/files/src/infrastructure/llm/adapters/openai-llm-client.adapter.ts +1 -1
  168. package/dist/templates/llm-adapter/files/src/infrastructure/llm/adapters/xai-llm-client.adapter.ts +1 -1
  169. package/dist/templates/llm-adapter/files/src/infrastructure/llm/errors/llm-errors.ts +9 -23
  170. package/dist/templates/llm-adapter/files/src/infrastructure/llm/index.ts +4 -3
  171. package/dist/templates/llm-adapter/files/src/infrastructure/llm/router/llm-router.ts +1 -1
  172. package/dist/templates/llm-adapter/files/src/infrastructure/llm/utils/retry.ts +1 -1
  173. package/dist/templates/llm-adapter/files/src/infrastructure/llm/utils/structured-output.ts +1 -1
  174. package/dist/templates/llm-adapter/manifest.json +1 -0
  175. package/dist/templates/llm-adapter-bedrock/files/src/infrastructure/llm/adapters/bedrock-llm-client.adapter.ts +1 -1
  176. package/dist/templates/llm-adapter-bedrock/files/src/infrastructure/llm/errors/bedrock-errors.ts +1 -1
  177. package/dist/templates/mcp-server/README.md +1 -1
  178. package/dist/templates/mcp-server-http/README.md +1 -1
  179. package/dist/types/index.d.ts +20 -1
  180. package/dist/types/index.d.ts.map +1 -1
  181. package/package.json +6 -5
  182. package/dist/application/ports/out/project-configuration-read.port.d.ts +0 -9
  183. package/dist/application/ports/out/project-configuration-read.port.d.ts.map +0 -1
  184. package/dist/application/ports/out/symbol-reference-provider.port.d.ts +0 -10
  185. package/dist/application/ports/out/symbol-reference-provider.port.d.ts.map +0 -1
  186. package/dist/application/use-cases/get-manifest-resource.use-case.d.ts +0 -8
  187. package/dist/application/use-cases/get-manifest-resource.use-case.d.ts.map +0 -1
  188. package/dist/generators/validators/index.d.ts +0 -11
  189. package/dist/generators/validators/index.d.ts.map +0 -1
  190. package/dist/generators/validators/validate-dependencies.d.ts +0 -7
  191. package/dist/generators/validators/validate-dependencies.d.ts.map +0 -1
  192. package/dist/generators/validators/validate-manifest-sync.d.ts +0 -5
  193. package/dist/generators/validators/validate-manifest-sync.d.ts.map +0 -1
  194. package/dist/generators/validators/validate-port-adapter.d.ts +0 -5
  195. package/dist/generators/validators/validate-port-adapter.d.ts.map +0 -1
  196. package/dist/generators/validators/validation-types.d.ts +0 -20
  197. package/dist/generators/validators/validation-types.d.ts.map +0 -1
  198. package/dist/generators/validators.d.ts +0 -7
  199. package/dist/generators/validators.d.ts.map +0 -1
package/LICENSE CHANGED
@@ -1,3 +1,12 @@
1
+ This is the license for `@hexagen-monaco/sync`, the Hexagen-Monaco
2
+ generator. It is part of the proprietary platform and is licensed under the
3
+ Source-Available Evaluation License below -- the same terms as the web
4
+ application and hosted services (ADR-0066).
5
+
6
+ It is NOT part of the fair-source wedge. The wedge is `@hexagen-monaco/arch-linter`
7
+ only, which carries the Functional Source License (FSL-1.1-Apache-2.0;
8
+ SPDX identifier FSL-1.1-ALv2) in its own LICENSE file.
9
+
1
10
  KRAKOWSKI CLOUD SOLUTIONS LLC - SOURCE-AVAILABLE EVALUATION LICENSE
2
11
 
3
12
  Copyright (c) 2026 Krakowski Cloud Solutions, LLC
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @hexagen-monaco/sync
2
2
 
3
- > The HexaGen Monaco sync engine — a CLI that generates and maintains modular, Hexagonal-architecture monorepos from a single `manifest.yaml`.
3
+ > The Hexagen-Monaco sync engine — a CLI that generates and maintains modular, Hexagonal-architecture monorepos from a single `manifest.yaml`.
4
4
 
5
5
  ---
6
6
 
@@ -15,7 +15,7 @@ pnpm add @hexagen-monaco/sync
15
15
  ```
16
16
 
17
17
  `@hexagen-monaco/sync` ships as a self-contained ESM package with only two runtime
18
- dependencies (`commander`, `js-yaml`). All internal HexaGen packages
18
+ dependencies (`commander`, `js-yaml`). All internal Hexagen-Monaco packages
19
19
  (`@hexagen/governance`, `@hexagen/project-configuration`,
20
20
  `@hexagen/shared`, `@hexagen/visualization`) are bundled into the published
21
21
  artifact — consumers never see them in their `node_modules`.
@@ -56,13 +56,59 @@ Consult `npx hexagen arch --help` for the full list of manifest operations.
56
56
 
57
57
  ## Programmatic Usage
58
58
 
59
- The default export exposes the sync-engine surface used by the CLI. Types
60
- ship alongside the bundle.
59
+ > **The supported contract of this package is the `hexagen` binary.** The root
60
+ > barrel below is **provisional under 0.x** (ADR-0056): names may be withdrawn,
61
+ > and a withdrawal rides a **minor** — never a patch — and is listed by name in
62
+ > that release's `CHANGELOG.md` section. Programmatic use is permitted and
63
+ > unsupported. Prefer the CLI unless you are embedding the engine.
64
+ >
65
+ > _(Before 0.10.0 this section documented a `runSync` function. No such export
66
+ > has ever existed — the example was wrong for the life of the package.)_
61
67
 
62
- ```ts
63
- import { runSync } from "@hexagen-monaco/sync";
68
+ The barrel exposes the engine the CLI drives. Types ship alongside the bundle.
64
69
 
65
- await runSync({ mode: "external", workspaceRoot: process.cwd() });
70
+ ```ts
71
+ import { SyncEngine, type LoggerPort } from "@hexagen-monaco/sync";
72
+
73
+ const logger: LoggerPort = {
74
+ info: console.info,
75
+ warn: console.warn,
76
+ error: console.error,
77
+ debug: console.debug,
78
+ errorWithException: (err, message) => console.error(message, err),
79
+ };
80
+
81
+ const dryRun = false;
82
+
83
+ const engine = new SyncEngine(
84
+ {
85
+ mode: "external", // 'external' honours the workspace root you give it
86
+ dryRun,
87
+ force: false,
88
+ forceRoot: false,
89
+ allowDirty: false,
90
+ strict: false,
91
+ logger,
92
+ },
93
+ { targetRoot: process.cwd() },
94
+ );
95
+
96
+ const summary = await engine.run();
97
+
98
+ // `run()` RESOLVES when a generator fails soft — it does not throw. Check the
99
+ // count, or a partial tree reads as success.
100
+ if (summary.errors > 0) {
101
+ throw new Error(`sync finished with ${summary.errors} generator failure(s)`);
102
+ }
103
+
104
+ // Only needed if you set `dryRun: true`. A missing
105
+ // `.architecture/manifest.yaml` REJECTS `run()` on a real run, but a dry run
106
+ // tolerates it by synthesizing an empty manifest — which plans ops against
107
+ // nothing and still resolves with `errors: 0`. That is the same fact the CLI
108
+ // gates `--check` on.
109
+ if (dryRun && summary.manifestMissing) {
110
+ throw new Error("no .architecture/manifest.yaml in the target workspace");
111
+ }
66
112
  ```
67
113
 
68
114
  The package is ESM-only (`"type": "module"`). Consumers that still use
@@ -111,7 +157,7 @@ plus four inlined workspace packages:
111
157
  | `@hexagen/visualization` | Architecture graph schemas |
112
158
 
113
159
  Bundling is handled at build time by [`tsup`](https://tsup.egoist.dev/) and
114
- is codified in [`.architecture/decisions/ADR-0009-published-cli-bundling.md`](../../.architecture/decisions/ADR-0009-published-cli-bundling.md).
160
+ is codified in [`.architecture/decisions/ADR-0068-published-cli-bundling.md`](../../.architecture/decisions/ADR-0068-published-cli-bundling.md).
115
161
 
116
162
  ### Runtime Dependencies (not bundled)
117
163
 
@@ -170,7 +216,7 @@ The source `packages/sync/package.json` is never mutated by this process.
170
216
  ## Links
171
217
 
172
218
  - **HexaGen Monaco repository:** https://github.com/martinkrakowski/hexagen-monaco
173
- - **Architecture Decision Record:** [`ADR-0009`](../../.architecture/decisions/ADR-0009-published-cli-bundling.md) — CLI Bundling Strategy
219
+ - **Architecture Decision Record:** [`ADR-0068`](../../.architecture/decisions/ADR-0068-published-cli-bundling.md) — CLI Bundling Strategy
174
220
  - **Manifest schema:** `@hexagen/project-configuration`
175
221
  - **Issue tracker:** https://github.com/martinkrakowski/hexagen-monaco/issues
176
222
 
@@ -178,4 +224,6 @@ The source `packages/sync/package.json` is never mutated by this process.
178
224
 
179
225
  ## License
180
226
 
181
- Source-Available Evaluation License — proprietary to Krakowski Cloud Solutions, LLC. Free to read, run locally, and evaluate for internal/non-commercial use; **not** licensed for commercial production deployment. See [LICENSE](./LICENSE).
227
+ Licensed under the Source-Available Evaluation License. See [LICENSE](./LICENSE).
228
+
229
+ The Hexagen-Monaco name is a trademark of Krakowski Cloud Solutions, LLC.
@@ -1 +1 @@
1
- {"version":3,"file":"file-system.port.d.ts","sourceRoot":"","sources":["../../../../src/application/ports/out/file-system.port.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE3C;;OAEG;IACH,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEtC;;OAEG;IACH,SAAS,CACP,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC,CAAC;CAClB"}
1
+ {"version":3,"file":"file-system.port.d.ts","sourceRoot":"","sources":["../../../../src/application/ports/out/file-system.port.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE3C;;OAEG;IACH,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEtC;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7D"}
@@ -1,9 +1,8 @@
1
1
  export * from "./ownership-registry.port.js";
2
2
  export * from "./generator-config.port.js";
3
- export * from "./project-configuration-read.port.js";
4
3
  export * from "./architecture-graph-provider.port.js";
5
4
  export * from "./linter-report-provider.port.js";
6
5
  export * from "./workspace-file-provider.port.js";
7
- export * from "./symbol-reference-provider.port.js";
6
+ export * from "./symbol-reference-index.port.js";
8
7
  export * from "./file-system.port.js";
9
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/application/ports/out/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/application/ports/out/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uCAAuC,CAAC;AACtD,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,74 @@
1
+ /**
2
+ * The refactoring analyser's view of a parsed workspace (HEX-013, item 5.7).
3
+ *
4
+ * WHY A PORT AT ALL. `RefactoringImpactUseCase` previously constructed a
5
+ * ts-morph `Project` itself and passed live `SourceFile` nodes to its
6
+ * collaborator. That made a concrete third-party parser — one that bundles its
7
+ * own TypeScript compiler, so its version is a semantic fact and not a detail
8
+ * (AUD-012) — a compile-time dependency of the application layer, in a package
9
+ * that is *published* and pointed at arbitrary consumer workspaces.
10
+ *
11
+ * WHY THIS SHAPE AND NOT A PARSER FACADE. The port is deliberately NOT a
12
+ * narrowed `SourceFile`. Everything the use case does with a parsed file is:
13
+ * - decide whether the file mentions the symbol at all, and
14
+ * - obtain a human-readable sentence saying how (`getModificationReason`),
15
+ * - read the file's path, to classify layer and package.
16
+ * Nothing else about the AST ever escapes: `classifyFiles` turns each hit into
17
+ * a `FileToModify` of four strings, and every step after that
18
+ * (`detectCrossPackageDependencies`, `assessArchitecturalImpact`,
19
+ * `generateWarnings`, `estimateChanges`) operates on those strings alone. So
20
+ * the port yields exactly those two fields and no node types. A port that
21
+ * mirrored `getInterfaces()` / `getClasses()` / `getImportDeclarations()`
22
+ * would have relocated the dependency without removing it — the caller would
23
+ * still be programming against ts-morph's object model under new names.
24
+ *
25
+ * WHY IT IS STATEFUL. The analyser loads packages and apps in separate
26
+ * recursive passes and then asks one question of the whole set, so the index
27
+ * accumulates across `indexFiles` calls and `findReferences` answers over
28
+ * everything indexed so far. That is the pre-existing semantics preserved
29
+ * exactly; collapsing it into one call would quietly change what a second
30
+ * `analyze()` on the same instance sees.
31
+ *
32
+ * RI-2.1. `diagnostics` is optional and syntactic-only. Semantic errors
33
+ * (unresolved types, missing modules) are not collected — a consumer
34
+ * workspace with those would flood the warning channel. An empty or
35
+ * omitted array means "I could read this file".
36
+ */
37
+ /** One file that mentions the symbol under analysis. Plain data, no AST. */
38
+ export interface SymbolReferenceDto {
39
+ /**
40
+ * Absolute path to the file, slash-separated on every host.
41
+ *
42
+ * The dialect is part of the contract, not an accident of the
43
+ * implementation: `toWorkspaceRelativePosixPath` subtracts a *native*
44
+ * workspace root from this string, and the old literal-prefix strip was a
45
+ * no-op on Windows because the two dialects never matched (AUD-012).
46
+ */
47
+ readonly filePath: string;
48
+ /**
49
+ * Why this file appears in the impact report — e.g. `Declares interface
50
+ * OrderRepositoryPort`, `Imports OrderRepositoryPort`. Surfaced verbatim to
51
+ * the user as `FileToModify.reason`.
52
+ */
53
+ readonly reason: string;
54
+ /**
55
+ * Syntactic diagnostics from the parser for this file. Absent or empty
56
+ * when the file parsed. Never semantic diagnostics.
57
+ */
58
+ readonly diagnostics?: readonly string[];
59
+ }
60
+ /** A parsed, queryable index of workspace source files. */
61
+ export interface SymbolReferenceIndexPort {
62
+ /**
63
+ * Add source files to the index. Additive: files indexed by earlier calls
64
+ * remain queryable. Implementations may throw if a path cannot be read; the
65
+ * use case turns that into an error `Result`.
66
+ */
67
+ indexFiles(filePaths: readonly string[]): void;
68
+ /**
69
+ * Every indexed file that references `symbolName`, with the reason it does.
70
+ * Files that never mention the symbol are omitted entirely.
71
+ */
72
+ findReferences(symbolName: string): readonly SymbolReferenceDto[];
73
+ }
74
+ //# sourceMappingURL=symbol-reference-index.port.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"symbol-reference-index.port.d.ts","sourceRoot":"","sources":["../../../../src/application/ports/out/symbol-reference-index.port.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,4EAA4E;AAC5E,MAAM,WAAW,kBAAkB;IACjC;;;;;;;OAOG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1C;AAED,2DAA2D;AAC3D,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,UAAU,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAC;IAE/C;;;OAGG;IACH,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,kBAAkB,EAAE,CAAC;CACnE"}
@@ -1,4 +1,4 @@
1
- import { type ArchitectureGraph } from "@hexagen/visualization";
1
+ import type { ArchitectureGraph } from "@hexagen/visualization";
2
2
  import type { ArchitectureGraphProviderPort } from "../ports/out/architecture-graph-provider.port.js";
3
3
  export declare class GetArchitectureGraphUseCase {
4
4
  private readonly provider;
@@ -1 +1 @@
1
- {"version":3,"file":"get-architecture-graph.use-case.d.ts","sourceRoot":"","sources":["../../../src/application/use-cases/get-architecture-graph.use-case.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,kDAAkD,CAAC;AAEtG,qBAAa,2BAA2B;IAC1B,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,6BAA6B;IAE9D,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAQ7D"}
1
+ {"version":3,"file":"get-architecture-graph.use-case.d.ts","sourceRoot":"","sources":["../../../src/application/use-cases/get-architecture-graph.use-case.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,kDAAkD,CAAC;AAEtG,qBAAa,2BAA2B;IAC1B,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,6BAA6B;IAE9D,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAc7D"}
@@ -1,4 +1,4 @@
1
- import { type LinterReport } from "@hexagen/governance";
1
+ import type { LinterReport } from "@hexagen/governance";
2
2
  import type { LinterReportProviderPort } from "../ports/out/linter-report-provider.port.js";
3
3
  export declare class GetLinterReportUseCase {
4
4
  private readonly provider;
@@ -1 +1 @@
1
- {"version":3,"file":"get-linter-report.use-case.d.ts","sourceRoot":"","sources":["../../../src/application/use-cases/get-linter-report.use-case.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AAE5F,qBAAa,sBAAsB;IACrB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,wBAAwB;IAEzD,OAAO,IAAI,OAAO,CAAC,YAAY,CAAC;CAQvC"}
1
+ {"version":3,"file":"get-linter-report.use-case.d.ts","sourceRoot":"","sources":["../../../src/application/use-cases/get-linter-report.use-case.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AAE5F,qBAAa,sBAAsB;IACrB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,wBAAwB;IAEzD,OAAO,IAAI,OAAO,CAAC,YAAY,CAAC;CAavC"}
@@ -1,4 +1,3 @@
1
- export * from "./get-manifest-resource.use-case.js";
2
1
  export * from "./get-architecture-graph.use-case.js";
3
2
  export * from "./get-linter-report.use-case.js";
4
3
  export * from "./migrate-manifest.use-case.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/application/use-cases/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/application/use-cases/index.ts"],"names":[],"mappings":"AAAA,cAAc,sCAAsC,CAAC;AACrD,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC"}
@@ -1,3 +1,5 @@
1
+ /** Deep equality used by the stamp-only invariant. */
2
+ export type DeepEqual = (left: unknown, right: unknown) => boolean;
1
3
  export interface ManifestMigration {
2
4
  /** The schemaVersion this migration upgrades TO (applied when stamped version < toVersion). */
3
5
  readonly toVersion: number;
@@ -25,9 +27,10 @@ export interface MigrateManifestResult {
25
27
  changed: boolean;
26
28
  }
27
29
  export declare class MigrateManifestUseCase {
30
+ private readonly deepEqual;
28
31
  private readonly currentVersion;
29
32
  private readonly migrations;
30
- constructor(currentVersion?: number, migrations?: readonly ManifestMigration[]);
33
+ constructor(deepEqual: DeepEqual, currentVersion?: number, migrations?: readonly ManifestMigration[]);
31
34
  execute(content: string): MigrateManifestResult;
32
35
  /**
33
36
  * Textually stamp `schemaVersion: <current>` — replace an existing
@@ -1 +1 @@
1
- {"version":3,"file":"migrate-manifest.use-case.d.ts","sourceRoot":"","sources":["../../../src/application/use-cases/migrate-manifest.use-case.ts"],"names":[],"mappings":"AA+BA,MAAM,WAAW,iBAAiB;IAChC,+FAA+F;IAC/F,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,yFAAyF;IACzF,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,+EAA+E;IAC/E,QAAQ,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;CAC7C;AAED;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,iBAAiB,EAAO,CAAC;AAEpE,MAAM,WAAW,qBAAqB;IACpC,oFAAoF;IACpF,OAAO,EAAE,MAAM,CAAC;IAChB,2EAA2E;IAC3E,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,oEAAoE;IACpE,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,qBAAa,sBAAsB;IAE/B,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,UAAU;gBADV,cAAc,GAAE,MAAwC,EACxD,UAAU,GAAE,SAAS,iBAAiB,EAAwB;IAGjF,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,qBAAqB;IAmD/C;;;;;;OAMG;IACH,OAAO,CAAC,KAAK;IAsBb;;;;;OAKG;IACH,OAAO,CAAC,8BAA8B;CAwBvC"}
1
+ {"version":3,"file":"migrate-manifest.use-case.d.ts","sourceRoot":"","sources":["../../../src/application/use-cases/migrate-manifest.use-case.ts"],"names":[],"mappings":"AAgCA,sDAAsD;AACtD,MAAM,MAAM,SAAS,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;AAEnE,MAAM,WAAW,iBAAiB;IAChC,+FAA+F;IAC/F,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,yFAAyF;IACzF,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,+EAA+E;IAC/E,QAAQ,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;CAC7C;AAED;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,iBAAiB,EAAO,CAAC;AAEpE,MAAM,WAAW,qBAAqB;IACpC,oFAAoF;IACpF,OAAO,EAAE,MAAM,CAAC;IAChB,2EAA2E;IAC3E,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,oEAAoE;IACpE,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,qBAAa,sBAAsB;IAE/B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAFV,SAAS,EAAE,SAAS,EACpB,cAAc,GAAE,MAAwC,EACxD,UAAU,GAAE,SAAS,iBAAiB,EAAwB;IAGjF,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,qBAAqB;IAmD/C;;;;;;OAMG;IACH,OAAO,CAAC,KAAK;IAsBb;;;;;OAKG;IACH,OAAO,CAAC,8BAA8B;CAwBvC"}
@@ -1,7 +1,8 @@
1
1
  import { type Result } from "../../domain/result.js";
2
2
  import type { Manifest } from "../../types/manifest.js";
3
3
  import type { WorkspaceFileProviderPort } from "../ports/out/workspace-file-provider.port.js";
4
- import type { SymbolReferenceProviderPort } from "../ports/out/symbol-reference-provider.port.js";
4
+ import type { SymbolReferenceIndexPort } from "../ports/out/symbol-reference-index.port.js";
5
+ import { type LayoutConfig } from "../../domain/services/layer-classifier.js";
5
6
  import type { RefactoringType, ImpactAnalysisResult } from "../../domain/services/impact-analysis.types.js";
6
7
  export interface ImpactAnalysisRequest {
7
8
  type: RefactoringType;
@@ -9,17 +10,35 @@ export interface ImpactAnalysisRequest {
9
10
  newName?: string;
10
11
  newLocation?: string;
11
12
  }
13
+ /**
14
+ * Analyses what a proposed refactoring would touch.
15
+ *
16
+ * The TypeScript parser sits behind `SymbolReferenceIndexPort` (HEX-013, item
17
+ * 5.7): this use case no longer constructs a ts-morph `Project` and no AST node
18
+ * ever reaches it. What crosses the boundary is `SymbolReferenceDto` — a file
19
+ * path, a reason sentence, and optional syntactic diagnostics — from which
20
+ * every downstream step (classification, cross-package detection, boundary
21
+ * assessment, warnings) is derived by string work alone. Enumerating which
22
+ * files to hand the index stays here, because that is exactly such string
23
+ * work and it is where the exclusions (`node_modules`, build output, `.d.ts`)
24
+ * are decided.
25
+ */
12
26
  export declare class RefactoringImpactUseCase {
13
27
  private readonly workspaceRoot;
14
28
  private readonly manifest;
15
29
  private readonly fileProvider;
16
- private readonly symbolProvider;
17
- private project;
18
- constructor(workspaceRoot: string, manifest: Manifest, fileProvider: WorkspaceFileProviderPort, symbolProvider: SymbolReferenceProviderPort);
30
+ private readonly symbolIndex;
31
+ private readonly layoutConfig?;
32
+ constructor(workspaceRoot: string, manifest: Manifest, fileProvider: WorkspaceFileProviderPort, symbolIndex: SymbolReferenceIndexPort, layoutConfig?: LayoutConfig | undefined);
19
33
  analyze(request: ImpactAnalysisRequest): Promise<Result<ImpactAnalysisResult, Error>>;
20
34
  private loadWorkspaceFiles;
21
- private addSourceFilesRecursively;
22
- private findSymbolReferences;
35
+ /**
36
+ * Which files are worth parsing at all. Pure string work on paths the
37
+ * workspace provider reported, so it belongs on this side of the port: the
38
+ * exclusions (vendored trees, build output, ambient declarations) are an
39
+ * analyser policy, not a parser capability.
40
+ */
41
+ private collectSourceFilesRecursively;
23
42
  private classifyFiles;
24
43
  private detectCrossPackageDependencies;
25
44
  private assessImpact;
@@ -1 +1 @@
1
- {"version":3,"file":"refactoring-impact.use-case.d.ts","sourceRoot":"","sources":["../../../src/application/use-cases/refactoring-impact.use-case.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AAC9F,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAIlG,OAAO,KAAK,EAAE,eAAe,EAAoE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AAE9K,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,eAAe,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,wBAAwB;IAIjC,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,cAAc;IANjC,OAAO,CAAC,OAAO,CAAU;gBAGN,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,yBAAyB,EACvC,cAAc,EAAE,2BAA2B;IAYxD,OAAO,CACX,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,MAAM,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;YAiCjC,kBAAkB;IA6BhC,OAAO,CAAC,yBAAyB;IAqBjC,OAAO,CAAC,oBAAoB;IAK5B,OAAO,CAAC,aAAa;IAiBrB,OAAO,CAAC,8BAA8B;IAsCtC,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,gBAAgB;IAgCxB,OAAO,CAAC,eAAe;CAGxB"}
1
+ {"version":3,"file":"refactoring-impact.use-case.d.ts","sourceRoot":"","sources":["../../../src/application/use-cases/refactoring-impact.use-case.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AAC9F,OAAO,KAAK,EAEV,wBAAwB,EACzB,MAAM,6CAA6C,CAAC;AAErD,OAAO,EAIL,KAAK,YAAY,EAClB,MAAM,2CAA2C,CAAC;AAEnD,OAAO,KAAK,EACV,eAAe,EAKf,oBAAoB,EACrB,MAAM,gDAAgD,CAAC;AAExD,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,eAAe,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,wBAAwB;IAEjC,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC;gBAJb,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,yBAAyB,EACvC,WAAW,EAAE,wBAAwB,EACrC,YAAY,CAAC,EAAE,YAAY,YAAA;IAGxC,OAAO,CACX,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,MAAM,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;YA4CjC,kBAAkB;IAiChC;;;;;OAKG;IACH,OAAO,CAAC,6BAA6B;IAqBrC,OAAO,CAAC,aAAa;IAkBrB,OAAO,CAAC,8BAA8B;IAsCtC,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,gBAAgB;IA6DxB,OAAO,CAAC,eAAe;CAGxB"}
@@ -1,8 +1,9 @@
1
1
  /**
2
- * Resolve the installed `hexagen-lint` bin by walking up from `startDir` to the
3
- * nearest `node_modules/.bin/`.
2
+ * Resolve the installed `hexagen-lint` bin by walking up from `startDir`,
3
+ * preferring the `node_modules/.bin/` shim and falling back to the arch-linter
4
+ * package's own `bin` target at the same level.
4
5
  *
5
- * The bin name is scope-agnostic, so this resolves both in this monorepo
6
+ * The shim name is scope-agnostic, so it resolves both in this monorepo
6
7
  * (`@hexagen/arch-linter`) and in a generated project (the
7
8
  * `@hexagen-monaco/arch-linter` devDependency). Walking up matters because the
8
9
  * project root — where `.architecture/manifest.yaml` lives — isn't guaranteed to
@@ -15,6 +16,21 @@
15
16
  * path through a shell yields a generic "command not found" (exit 127), which is
16
17
  * indistinguishable from a real lint failure, so the missing-bin case is
17
18
  * reported separately ("arch-linter not installed", not "architecture invalid").
19
+ *
20
+ * The returned path may be a shell-executable shim OR a plain `.js` entrypoint;
21
+ * build the command with {@link archLinterCommand} rather than quoting it
22
+ * directly.
18
23
  */
19
24
  export declare function resolveArchLinterBin(startDir: string): string | null;
25
+ /**
26
+ * Build the shell command that runs a resolved arch-linter bin.
27
+ *
28
+ * A `node_modules/.bin/` shim is directly executable (posix symlink with a
29
+ * shebang, or a `.cmd` batch file on Windows), but the package-level fallback
30
+ * resolves to a raw `.js` module — which only runs by file association, if at
31
+ * all, on Windows. Launching those through the current interpreter keeps both
32
+ * resolution paths behaving identically on every platform. Quoted so an
33
+ * absolute path containing spaces survives the shell.
34
+ */
35
+ export declare function archLinterCommand(bin: string, execPath?: string): string;
20
36
  //# sourceMappingURL=arch-linter-bin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"arch-linter-bin.d.ts","sourceRoot":"","sources":["../src/arch-linter-bin.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CASpE"}
1
+ {"version":3,"file":"arch-linter-bin.d.ts","sourceRoot":"","sources":["../src/arch-linter-bin.ts"],"names":[],"mappings":"AA+DA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAWpE;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,MAAM,EACX,QAAQ,GAAE,MAAyB,GAClC,MAAM,CAER"}