@hexagen-monaco/sync 0.6.0 → 0.7.1

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 (82) hide show
  1. package/dist/application/use-cases/index.d.ts +1 -0
  2. package/dist/application/use-cases/index.d.ts.map +1 -1
  3. package/dist/application/use-cases/migrate-manifest.use-case.d.ts +48 -0
  4. package/dist/application/use-cases/migrate-manifest.use-case.d.ts.map +1 -0
  5. package/dist/cli.js +1009 -538
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/arch/validate.d.ts.map +1 -1
  8. package/dist/commands/manifest/index.d.ts.map +1 -1
  9. package/dist/commands/manifest/migrate.d.ts +10 -0
  10. package/dist/commands/manifest/migrate.d.ts.map +1 -0
  11. package/dist/config.d.ts +17 -0
  12. package/dist/config.d.ts.map +1 -1
  13. package/dist/domain/types.d.ts +8 -1
  14. package/dist/domain/types.d.ts.map +1 -1
  15. package/dist/fs-utils.d.ts +4 -4
  16. package/dist/fs-utils.d.ts.map +1 -1
  17. package/dist/generators/apps-framework-templates.d.ts.map +1 -1
  18. package/dist/generators/apps.d.ts.map +1 -1
  19. package/dist/generators/architecture-file-templates.d.ts +1 -1
  20. package/dist/generators/architecture-file-templates.d.ts.map +1 -1
  21. package/dist/generators/architecture-files.d.ts.map +1 -1
  22. package/dist/generators/barrels/recursive.d.ts +2 -3
  23. package/dist/generators/barrels/recursive.d.ts.map +1 -1
  24. package/dist/generators/barrels.d.ts +2 -3
  25. package/dist/generators/barrels.d.ts.map +1 -1
  26. package/dist/generators/cross-context.d.ts.map +1 -1
  27. package/dist/generators/eslint.d.ts.map +1 -1
  28. package/dist/generators/layer-folders.d.ts +23 -6
  29. package/dist/generators/layer-folders.d.ts.map +1 -1
  30. package/dist/generators/package-json.d.ts +2 -3
  31. package/dist/generators/package-json.d.ts.map +1 -1
  32. package/dist/generators/reap.d.ts +7 -3
  33. package/dist/generators/reap.d.ts.map +1 -1
  34. package/dist/generators/root-file-templates.d.ts +1 -1
  35. package/dist/generators/root-file-templates.d.ts.map +1 -1
  36. package/dist/generators/root-files.d.ts.map +1 -1
  37. package/dist/generators/shared-kernel.d.ts.map +1 -1
  38. package/dist/generators/stubs.d.ts.map +1 -1
  39. package/dist/generators/tsconfig.d.ts.map +1 -1
  40. package/dist/index.js +724 -405
  41. package/dist/index.js.map +1 -1
  42. package/dist/journal.d.ts +64 -0
  43. package/dist/journal.d.ts.map +1 -0
  44. package/dist/linter.d.ts.map +1 -1
  45. package/dist/migration-report.d.ts +13 -2
  46. package/dist/migration-report.d.ts.map +1 -1
  47. package/dist/results.d.ts +74 -0
  48. package/dist/results.d.ts.map +1 -1
  49. package/dist/sync-engine-helpers.d.ts.map +1 -1
  50. package/dist/sync-engine-init.d.ts +24 -2
  51. package/dist/sync-engine-init.d.ts.map +1 -1
  52. package/dist/sync-engine.d.ts +14 -1
  53. package/dist/sync-engine.d.ts.map +1 -1
  54. package/dist/templates/agents-md/files/AGENTS.md +7 -5
  55. package/dist/templates/env-setup/files/.gitignore.hexagen +4 -3
  56. package/dist/templates/observability/files/.agents/logging.md +34 -0
  57. package/dist/templates/observability/manifest.json +1 -0
  58. package/dist/toolchain-version.d.ts +14 -0
  59. package/dist/toolchain-version.d.ts.map +1 -0
  60. package/package.json +1 -1
  61. package/dist/application/use-cases/stub-generation.use-case.d.ts +0 -23
  62. package/dist/application/use-cases/stub-generation.use-case.d.ts.map +0 -1
  63. package/dist/generators/migration-assistant.d.ts +0 -7
  64. package/dist/generators/migration-assistant.d.ts.map +0 -1
  65. package/dist/generators/migration-audit.d.ts +0 -28
  66. package/dist/generators/migration-audit.d.ts.map +0 -1
  67. package/dist/generators/migration-stubs.d.ts +0 -7
  68. package/dist/generators/migration-stubs.d.ts.map +0 -1
  69. package/dist/generators/test-generator.d.ts +0 -7
  70. package/dist/generators/test-generator.d.ts.map +0 -1
  71. package/dist/generators/test-templates/data-builder.d.ts +0 -2
  72. package/dist/generators/test-templates/data-builder.d.ts.map +0 -1
  73. package/dist/generators/test-templates/enhanced-test-double.d.ts +0 -2
  74. package/dist/generators/test-templates/enhanced-test-double.d.ts.map +0 -1
  75. package/dist/generators/test-templates/index.d.ts +0 -5
  76. package/dist/generators/test-templates/index.d.ts.map +0 -1
  77. package/dist/generators/test-templates/integration-test.d.ts +0 -2
  78. package/dist/generators/test-templates/integration-test.d.ts.map +0 -1
  79. package/dist/generators/test-templates/unit-test.d.ts +0 -2
  80. package/dist/generators/test-templates/unit-test.d.ts.map +0 -1
  81. package/dist/generators/wiring.d.ts +0 -20
  82. package/dist/generators/wiring.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/commands/arch/validate.ts"],"names":[],"mappings":"AAGA,wBAAsB,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,CAwBrD"}
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/commands/arch/validate.ts"],"names":[],"mappings":"AAGA,wBAAsB,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,CA6BrD"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/manifest/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,eAAO,MAAM,iBAAiB,SAE7B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/manifest/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,eAAO,MAAM,iBAAiB,SAE7B,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * `hexagen manifest migrate` (Wave-C PR-C1, RCA #6) — thin CLI plumbing
3
+ * around MigrateManifestUseCase: read `.architecture/manifest.yaml`, run the
4
+ * registry walk + stamp, report, write back (with a backup, mirroring
5
+ * `manifest split`'s `.pre-split-backup`). All migration semantics — and
6
+ * their tests — live in the use-case.
7
+ */
8
+ import { Command } from "commander";
9
+ export declare const manifestMigrateCommander: Command;
10
+ //# sourceMappingURL=migrate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../../src/commands/manifest/migrate.ts"],"names":[],"mappings":"AACA;;;;;;GAMG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,eAAO,MAAM,wBAAwB,SAuEjC,CAAC"}
package/dist/config.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import type { Manifest } from "./types/manifest.js";
2
+ import type { SyncJournal } from "./journal.js";
2
3
  import { type LoggerPort, type LoggerConfig } from "@hexagen/shared";
3
4
  export type { LoggerPort, LoggerConfig };
4
5
  export interface SyncFlags {
@@ -16,11 +17,27 @@ export interface SyncFlags {
16
17
  * semantics — no dependency fan-out. Undefined/empty means "no filter".
17
18
  */
18
19
  only?: string[];
20
+ /**
21
+ * Optional migration-report destination, resolved against the workspace
22
+ * root (absolute paths allowed; parent dirs are created on write). Real
23
+ * runs default to SYNC-MIGRATION-REPORT.md when unset; under --dry-run the
24
+ * report file is skipped entirely UNLESS this is set — `--report <path>` is
25
+ * the explicit opt-in to write a preview report.
26
+ */
27
+ report?: string;
19
28
  logger: LoggerPort;
20
29
  }
21
30
  export interface SyncConfig extends SyncFlags {
22
31
  manifest: Manifest;
23
32
  workspaceRoot: string;
33
+ /**
34
+ * Per-run mutation journal (PR-B1, RCA #4). Set by the engine; every site
35
+ * that actually mutates a file records its pre-image here BEFORE writing or
36
+ * deleting, so a failed run can restore exactly what sync touched — never a
37
+ * git-wide reset. Optional so hand-built test configs (and the journal-less
38
+ * call paths in tests) keep working; sites use `config.journal?.record…`.
39
+ */
40
+ journal?: SyncJournal;
24
41
  }
25
42
  export declare function parseArgs(rawArgs: string[]): SyncFlags;
26
43
  //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","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AAG,UAAU,CAAC;IAChC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,UAAU,CAAC;CACpB;AAGD,MAAM,WAAW,UAAW,SAAQ,SAAS;IAC3C,QAAQ,EAAE,QAAQ,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,SAAS,CAyEtD"}
@@ -1,4 +1,11 @@
1
+ import type { ReportEntryType } from "../migration-report.js";
2
+ /**
3
+ * Structural recorder interface the generators write audit entries through.
4
+ * The `type` parameter is the closed vocabulary from migration-report.ts
5
+ * (PR-B1): a generator inventing a new tag is now a compile error at the call
6
+ * site instead of a string silently laundered into the report.
7
+ */
1
8
  export type ReportRecorder = {
2
- record: (type: string, target: string, message: string) => void;
9
+ record: (type: ReportEntryType, target: string, message?: string) => void;
3
10
  };
4
11
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/domain/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACjE,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/domain/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3E,CAAC"}
@@ -1,4 +1,6 @@
1
1
  import type { SyncConfig } from "./config.js";
2
+ import type { ReportRecorder } from "./domain/types.js";
3
+ import type { WriteStatus } from "./results.js";
2
4
  export declare const protectedFiles: Set<string>;
3
5
  /**
4
6
  * Determine whether a file was generated by the sync tool.
@@ -31,11 +33,9 @@ export declare function isInScope(filePath: string, config: SyncConfig): boolean
31
33
  * are preserved even under --force; --force only regenerates files
32
34
  * carrying the @generated marker)
33
35
  */
34
- export declare function safeWriteFileAtomic(filePath: string, content: string, config: SyncConfig, report?: {
35
- record: (type: string, target: string, message: string) => void;
36
- }, skipGeneratedCheck?: boolean): Promise<"created" | "updated" | "unchanged" | "skipped" | "protected">;
36
+ export declare function safeWriteFileAtomic(filePath: string, content: string, config: SyncConfig, report?: ReportRecorder, skipGeneratedCheck?: boolean): Promise<WriteStatus>;
37
37
  /**
38
38
  * Simple wrapper that forwards to safeWriteFileAtomic without a report.
39
39
  */
40
- export declare function safeWriteFile(filePath: string, content: string, config: SyncConfig, skipGeneratedCheck?: boolean): Promise<"created" | "updated" | "unchanged" | "skipped" | "protected">;
40
+ export declare function safeWriteFile(filePath: string, content: string, config: SyncConfig, skipGeneratedCheck?: boolean): Promise<WriteStatus>;
41
41
  //# sourceMappingURL=fs-utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fs-utils.d.ts","sourceRoot":"","sources":["../src/fs-utils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAY9C,eAAO,MAAM,cAAc,aAiBzB,CAAC;AASH;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAExD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,OAAO,CAY7E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,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CACvC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE,cAAc,EACvB,kBAAkB,GAAE,OAAe,GAClC,OAAO,CAAC,WAAW,CAAC,CAsHtB;AAED;;GAEG;AACH,wBAAsB,aAAa,CACjC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,UAAU,EAClB,kBAAkB,GAAE,OAAe,GAClC,OAAO,CAAC,WAAW,CAAC,CAQtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"apps-framework-templates.d.ts","sourceRoot":"","sources":["../../src/generators/apps-framework-templates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,kBAAkB,EAEnB,MAAM,sBAAsB,CAAC;AA8M9B,KAAK,wBAAwB,GAAG,QAAQ,CACtC,IAAI,CAAC,kBAAkB,EAAE,aAAa,GAAG,UAAU,GAAG,YAAY,CAAC,CACpE,GACC,IAAI,CAAC,kBAAkB,EAAE,YAAY,CAAC,CAAC;AAEzC,QAAA,MAAM,2BAA2B,EAAE,OAAO,CACxC,MAAM,CAAC,YAAY,EAAE,wBAAwB,CAAC,CAmC/C,CAAC;AAEF,OAAO,EAAE,2BAA2B,EAAE,CAAC"}
1
+ {"version":3,"file":"apps-framework-templates.d.ts","sourceRoot":"","sources":["../../src/generators/apps-framework-templates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,kBAAkB,EAEnB,MAAM,sBAAsB,CAAC;AAmN9B,KAAK,wBAAwB,GAAG,QAAQ,CACtC,IAAI,CAAC,kBAAkB,EAAE,aAAa,GAAG,UAAU,GAAG,YAAY,CAAC,CACpE,GACC,IAAI,CAAC,kBAAkB,EAAE,YAAY,CAAC,CAAC;AAEzC,QAAA,MAAM,2BAA2B,EAAE,OAAO,CACxC,MAAM,CAAC,YAAY,EAAE,wBAAwB,CAAC,CAmC/C,CAAC;AAEF,OAAO,EAAE,2BAA2B,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../src/generators/apps.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAUxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAyIzD,wBAAsB,YAAY,CAChC,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,CAuO1B"}
1
+ {"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../src/generators/apps.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,eAAe,CAAC;AAUvB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AA0HzD,wBAAsB,YAAY,CAChC,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,CA4O1B"}
@@ -4,6 +4,6 @@ declare const LAYER_RULES_MICRO_FRONTEND = "# HexaGen \u2014 Architectural Invar
4
4
  declare const LAYER_RULES_DEFAULT = "# HexaGen \u2014 Architectural Invariants\n# Template: {template} (flexible mode)\n\nshared_kernel:\n package: \"@{scope}/shared\"\n allowed_in_all_layers: true\n\nlayers:\n domain:\n access_rule: \"internal-only\"\n allowed_imports: [\"@{scope}/shared\"]\n\n application:\n access_rule: \"ports-only\"\n allowed_imports: [\"domain\", \"@{scope}/shared\"]\n\n infrastructure:\n access_rule: \"adapters\"\n allowed_imports: [\"domain\", \"application\", \"@{scope}/shared\"]\n";
5
5
  declare const LINTER_CONFIG_STRICT = "# Rules for @hexagen-monaco/arch-linter\n# Template: {template} (strict mode)\n\nglobal_whitelist:\n - \"@{scope}/shared\"\n - \"@{scope}/shared/**\"\n\ncross_context_rules:\n deny_sibling_imports: true\n require_port_interface: true\n\ntest_double_rules:\n allowed_cross_package_imports: true\n";
6
6
  declare const LINTER_CONFIG_DEFAULT = "# Rules for @hexagen-monaco/arch-linter\n# Template: {template} (flexible mode)\n\nglobal_whitelist:\n - \"@{scope}/shared\"\n - \"@{scope}/shared/**\"\n\ntest_double_rules:\n allowed_cross_package_imports: true\n";
7
- declare const GENERATOR_CONFIG_TEMPLATE = "generator:\n version: \"1.0\"\n description: \"Global invariants and safety rules\"\n workspace_template: \"{workspaceTemplate}\"\n\n invariants:\n - name: composite-safety\n description: \"Every tsconfig.json must contain paths: {{}} to override inherited source mappings.\"\n priority: critical\n failure: abort-and-cleanup\n\n - name: barrel-ownership-boundary\n description: \"Barrels may only re-export types owned by the current bounded context.\"\n priority: critical\n failure: abort-and-cleanup\n\n - name: port-single-ownership\n description: \"Each port interface belongs to exactly one bounded context.\"\n priority: critical\n failure: abort-and-cleanup\n\n - name: dependency-consistency\n description: \"Every @{scope}/* import must have a matching entry in package.json.\"\n priority: high\n failure: abort\n\n - name: self-import-prevention\n description: \"No package imports itself by name.\"\n priority: high\n failure: abort\n\n - name: signature-synchronization\n description: \"Generated consumers must derive exact signatures from the canonical port.\"\n priority: high\n failure: abort\n\n - name: no-empty-stubs\n description: \"No empty barrels (export {{}}) in src/.\"\n priority: medium\n failure: warn-and-continue\n\n - name: exports-field-mandatory\n description: \"Every package.json must include a complete exports map.\"\n priority: medium\n failure: warn-and-continue\n\n - name: test-double-parity\n description: \"Test doubles must implement the same interface as the canonical port.\"\n priority: medium\n failure: warn-and-continue\n\n bootstrap-sequence:\n - load-ownership-map\n - validate-port-ownership-map\n - generate-package-skeleton\n - enforce-tsconfig-paths-override\n - generate-exports-field\n - synchronize-signatures\n - validate-barrel-chain\n - enforce-dependency-consistency\n - final-composite-reference-check\n\n failure-behavior:\n critical: abort-and-cleanup\n high: abort\n medium: warn-and-continue\n\n ownership-registry:\n ports:\n{ownershipBlock}\n";
7
+ declare const GENERATOR_CONFIG_TEMPLATE = "generator:\n version: \"1.0\"\n description: \"Global invariants and safety rules\"\n workspaceTemplate: \"{workspaceTemplate}\"\n\n invariants:\n - name: composite-safety\n description: \"Every tsconfig.json must contain paths: {{}} to override inherited source mappings.\"\n priority: critical\n failure: abort-and-cleanup\n\n - name: barrel-ownership-boundary\n description: \"Barrels may only re-export types owned by the current bounded context.\"\n priority: critical\n failure: abort-and-cleanup\n\n - name: port-single-ownership\n description: \"Each port interface belongs to exactly one bounded context.\"\n priority: critical\n failure: abort-and-cleanup\n\n - name: dependency-consistency\n description: \"Every @{scope}/* import must have a matching entry in package.json.\"\n priority: high\n failure: abort\n\n - name: self-import-prevention\n description: \"No package imports itself by name.\"\n priority: high\n failure: abort\n\n - name: signature-synchronization\n description: \"Generated consumers must derive exact signatures from the canonical port.\"\n priority: high\n failure: abort\n\n - name: no-empty-stubs\n description: \"No empty barrels (export {{}}) in src/.\"\n priority: medium\n failure: warn-and-continue\n\n - name: exports-field-mandatory\n description: \"Every package.json must include a complete exports map.\"\n priority: medium\n failure: warn-and-continue\n\n - name: test-double-parity\n description: \"Test doubles must implement the same interface as the canonical port.\"\n priority: medium\n failure: warn-and-continue\n\n bootstrap-sequence:\n - load-ownership-map\n - validate-port-ownership-map\n - generate-package-skeleton\n - enforce-tsconfig-paths-override\n - generate-exports-field\n - synchronize-signatures\n - validate-barrel-chain\n - enforce-dependency-consistency\n - final-composite-reference-check\n\n failure-behavior:\n critical: abort-and-cleanup\n high: abort\n medium: warn-and-continue\n\n ownership-registry:\n ports:\n{ownershipBlock}\n";
8
8
  export { LAYER_RULES_COMMON, LAYER_RULES_STRICT_ENTERPRISE, LAYER_RULES_MICRO_FRONTEND, LAYER_RULES_DEFAULT, LINTER_CONFIG_STRICT, LINTER_CONFIG_DEFAULT, GENERATOR_CONFIG_TEMPLATE, };
9
9
  //# sourceMappingURL=architecture-file-templates.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"architecture-file-templates.d.ts","sourceRoot":"","sources":["../../src/generators/architecture-file-templates.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,kBAAkB,kaAgBvB,CAAC;AAEF,QAAA,MAAM,6BAA6B,4qBAUlC,CAAC;AAEF,QAAA,MAAM,0BAA0B,oqBAU/B,CAAC;AAEF,QAAA,MAAM,mBAAmB,ufAGH,CAAC;AAEvB,QAAA,MAAM,oBAAoB,iTAazB,CAAC;AAEF,QAAA,MAAM,qBAAqB,6NAS1B,CAAC;AAEF,QAAA,MAAM,yBAAyB,mrEAsE9B,CAAC;AAEF,OAAO,EACL,kBAAkB,EAClB,6BAA6B,EAC7B,0BAA0B,EAC1B,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,yBAAyB,GAC1B,CAAC"}
1
+ {"version":3,"file":"architecture-file-templates.d.ts","sourceRoot":"","sources":["../../src/generators/architecture-file-templates.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,kBAAkB,kaAgBvB,CAAC;AAEF,QAAA,MAAM,6BAA6B,4qBAUlC,CAAC;AAEF,QAAA,MAAM,0BAA0B,oqBAU/B,CAAC;AAEF,QAAA,MAAM,mBAAmB,ufAGH,CAAC;AAEvB,QAAA,MAAM,oBAAoB,iTAazB,CAAC;AAEF,QAAA,MAAM,qBAAqB,6NAS1B,CAAC;AAEF,QAAA,MAAM,yBAAyB,krEAsE9B,CAAC;AAEF,OAAO,EACL,kBAAkB,EAClB,6BAA6B,EAC7B,0BAA0B,EAC1B,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,yBAAyB,GAC1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"architecture-files.d.ts","sourceRoot":"","sources":["../../src/generators/architecture-files.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAgBxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AA+KzD,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,CA8E1B"}
1
+ {"version":3,"file":"architecture-files.d.ts","sourceRoot":"","sources":["../../src/generators/architecture-files.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,eAAe,CAAC;AAgBvB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAiPzD,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,CAsF1B"}
@@ -1,4 +1,5 @@
1
1
  import type { SyncConfig } from "../../config.js";
2
+ import type { ReportRecorder } from "../../domain/types.js";
2
3
  import { type GeneratorResult } from "../../results.js";
3
4
  /**
4
5
  * Error thrown when circular exports are detected.
@@ -38,7 +39,5 @@ export interface BarrelGenerationReport {
38
39
  * @returns Generator result with created/updated/skipped counts
39
40
  * @throws CircularExportError if circular exports detected
40
41
  */
41
- export declare function generateRecursiveBarrels(moduleDir: string, config: SyncConfig, report?: {
42
- record: (type: string, target: string, message?: string) => void;
43
- }): Promise<GeneratorResult>;
42
+ export declare function generateRecursiveBarrels(moduleDir: string, config: SyncConfig, report?: ReportRecorder): Promise<GeneratorResult>;
44
43
  //# sourceMappingURL=recursive.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"recursive.d.ts","sourceRoot":"","sources":["../../../src/generators/barrels/recursive.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAa3E;;;GAGG;AACH,qBAAa,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AAsB,wBAAwB,CAC5C,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,CAsI1B"}
@@ -6,6 +6,7 @@
6
6
  * while using the new recursive implementation under the hood.
7
7
  */
8
8
  import type { SyncConfig } from "../config.js";
9
+ import type { ReportRecorder } from "../domain/types.js";
9
10
  import type { GeneratorResult } from "../results.js";
10
11
  export { CircularExportError } from "./barrels/index.js";
11
12
  /**
@@ -25,7 +26,5 @@ export { CircularExportError } from "./barrels/index.js";
25
26
  * @returns Generator result with created/updated/skipped counts
26
27
  * @throws CircularExportError if circular exports are detected
27
28
  */
28
- export declare function generateBarrels(moduleDir: string, config: SyncConfig, report?: {
29
- record: (type: string, target: string, message?: string) => void;
30
- }): Promise<GeneratorResult>;
29
+ export declare function generateBarrels(moduleDir: string, config: SyncConfig, report?: ReportRecorder): Promise<GeneratorResult>;
31
30
  //# sourceMappingURL=barrels.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"barrels.d.ts","sourceRoot":"","sources":["../../src/generators/barrels.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,eAAe,CACnC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE;IAAE,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,GAC5E,OAAO,CAAC,eAAe,CAAC,CAE1B"}
1
+ {"version":3,"file":"barrels.d.ts","sourceRoot":"","sources":["../../src/generators/barrels.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,eAAe,CACnC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,CAE1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"cross-context.d.ts","sourceRoot":"","sources":["../../src/generators/cross-context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAQxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AA0UzD,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,CAoK1B"}
1
+ {"version":3,"file":"cross-context.d.ts","sourceRoot":"","sources":["../../src/generators/cross-context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,eAAe,CAAC;AAQvB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAuUzD,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,CAoK1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"eslint.d.ts","sourceRoot":"","sources":["../../src/generators/eslint.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAQxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AA4GzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAsB,oBAAoB,CACxC,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE,cAAc,EACvB,OAAO,GAAE;IAAE,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAAO,GAChD,OAAO,CAAC,eAAe,CAAC,CAmE1B"}
1
+ {"version":3,"file":"eslint.d.ts","sourceRoot":"","sources":["../../src/generators/eslint.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,eAAe,CAAC;AAQvB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AA4GzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAsB,oBAAoB,CACxC,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE,cAAc,EACvB,OAAO,GAAE;IAAE,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAAO,GAChD,OAAO,CAAC,eAAe,CAAC,CA+D1B"}
@@ -5,12 +5,29 @@ interface LayerConfig {
5
5
  subfolders?: string[];
6
6
  }
7
7
  /**
8
- * Ensures layer folders exist for a module (domain, application, infrastructure).
9
- * Creates subfolders and barrels if missing.
10
- * Uses safeWriteFile for dry-run safety, protection, and idempotency.
8
+ * Ensures layer DIRECTORIES exist for a module (domain, application,
9
+ * infrastructure, plus configured subfolders), and a `.gitkeep` in each LEAF
10
+ * directory so the scaffold survives a git checkout (see
11
+ * ensureGitkeepCounted). Leaf-only and config-derived: a configured dir with
12
+ * NO configured subfolders gets the keep; a parent layer dir is materialized
13
+ * transitively by its subfolders' keeps. Deriving leaves from the CONFIG
14
+ * (not from what's on disk) is what guarantees dry-run parity — an absent
15
+ * tree plans exactly the keeps a real run writes.
16
+ *
17
+ * Barrel single-ownership (PR-B2, the second half of RCA #5): this generator
18
+ * used to also write barrels — a naive re-export-everything index.ts per
19
+ * layer and an empty one per subfolder. The recursive-barrels generator then
20
+ * rewrote every layer barrel to its own canonical content and deleted every
21
+ * empty subfolder barrel on the SAME run, every run. At rest the tree was
22
+ * byte-converged, but a dry-run/--check re-planned that churn each time
23
+ * (8 creates + 6 updates on the contract fixture): permanent phantom drift
24
+ * that no amount of count-fixing could zero out. Barrels now have exactly one
25
+ * owner — generators/barrels/recursive.ts — which already covers the
26
+ * empty-layer case this generator's barrels existed for (its walkDirectory
27
+ * creates an `export {};` barrel in an empty layer directory and migrates the
28
+ * legacy "No exports yet" content). Same single-writer doctrine as
29
+ * cross-context.
11
30
  */
12
- export declare function ensureLayerFolders(moduleDir: string, layers: Record<string, LayerConfig>, config: SyncConfig, report?: {
13
- record: (type: string, target: string, message?: string) => void;
14
- }): Promise<GeneratorResult>;
31
+ export declare function ensureLayerFolders(moduleDir: string, layers: Record<string, LayerConfig>, config: SyncConfig): Promise<GeneratorResult>;
15
32
  export {};
16
33
  //# sourceMappingURL=layer-folders.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"layer-folders.d.ts","sourceRoot":"","sources":["../../src/generators/layer-folders.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAMxE,UAAU,WAAW;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AA6DD;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,EACnC,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE;IAAE,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,GAC5E,OAAO,CAAC,eAAe,CAAC,CAqG1B"}
1
+ {"version":3,"file":"layer-folders.d.ts","sourceRoot":"","sources":["../../src/generators/layer-folders.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,eAAe,CAAC;AAIvB,UAAU,WAAW;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAgJD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,kBAAkB,CACtC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,EACnC,MAAM,EAAE,UAAU,GACjB,OAAO,CAAC,eAAe,CAAC,CA4E1B"}
@@ -1,11 +1,10 @@
1
1
  import { SyncConfig } from "../config.js";
2
+ import type { ReportRecorder } from "../domain/types.js";
2
3
  import { type GeneratorResult } from "../results.js";
3
4
  /**
4
5
  * Generates or updates package.json with merge strategy.
5
6
  * Preserves protected keys from existing file.
6
7
  * Uses safeWriteFile with skipGeneratedCheck=true (package.json can't carry marker).
7
8
  */
8
- export declare function generatePackageJson(modulePath: string, moduleName: string, config: SyncConfig, report?: {
9
- record: (type: string, target: string, message?: string) => void;
10
- }): Promise<GeneratorResult>;
9
+ export declare function generatePackageJson(modulePath: string, moduleName: string, config: SyncConfig, report?: ReportRecorder): Promise<GeneratorResult>;
11
10
  //# sourceMappingURL=package-json.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"package-json.d.ts","sourceRoot":"","sources":["../../src/generators/package-json.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAQxE;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE;IAAE,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,GAC5E,OAAO,CAAC,eAAe,CAAC,CA6G1B"}
1
+ {"version":3,"file":"package-json.d.ts","sourceRoot":"","sources":["../../src/generators/package-json.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,eAAe,CAAC;AAQvB;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,CAqH1B"}
@@ -1,11 +1,15 @@
1
1
  import type { SyncConfig } from "../config.js";
2
+ import type { ReportRecorder } from "../domain/types.js";
2
3
  /**
3
4
  * Removes legacy layer directories (domain, application, infrastructure) if they are empty.
4
5
  * Accepts an optional report to log deletions.
5
6
  *
6
7
  * IMPORTANT: Respects dry-run mode — will only log, not delete.
8
+ *
9
+ * NOT journaled (PR-B1): the rmdir below only ever removes directories
10
+ * verified EMPTY (and fails closed with ENOTEMPTY otherwise) — no file
11
+ * content is involved, so there is nothing for the rollback journal to
12
+ * restore (the journal tracks file content, not directory shape).
7
13
  */
8
- export declare function reapLegacyFolders(moduleDir: string, config: SyncConfig, report?: {
9
- record: (type: string, target: string, message?: string) => void;
10
- }): Promise<void>;
14
+ export declare function reapLegacyFolders(moduleDir: string, config: SyncConfig, report?: ReportRecorder): Promise<void>;
11
15
  //# sourceMappingURL=reap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reap.d.ts","sourceRoot":"","sources":["../../src/generators/reap.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE;IAAE,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,GAC5E,OAAO,CAAC,IAAI,CAAC,CAoCf"}
1
+ {"version":3,"file":"reap.d.ts","sourceRoot":"","sources":["../../src/generators/reap.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD;;;;;;;;;;GAUG;AACH,wBAAsB,iBAAiB,CACrC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,IAAI,CAAC,CAoDf"}
@@ -1,4 +1,4 @@
1
- declare const BUILTIN_PACKAGE_JSON_TEMPLATE = "{\n \"name\": \"{system}\",\n \"private\": true,\n \"type\": \"module\",\n \"packageManager\": \"{packageManager}\",\n \"workspaces\": {workspaces},\n \"scripts\": {\n \"build\": \"turbo build\",\n \"dev\": \"turbo dev\",\n \"lint\": \"turbo lint\",\n \"typecheck\": \"turbo typecheck\",\n \"test\": \"turbo test\",\n \"clean\": \"turbo clean\",\n \"sync\": \"hexagen sync\",\n \"sync:dry\": \"hexagen sync --dry-run\",\n \"sync:force\": \"hexagen sync --force\",\n \"lint:arch\": \"hexagen arch validate\",\n \"templates:add\": \"hexagen add\",\n \"templates:validate\": \"hexagen validate-templates\",\n \"format\": \"prettier --write \\\"**/*.{ts,tsx,md}\\\"\"\n },\n \"devDependencies\": {\n \"turbo\": \"^2.0.0\",\n \"typescript\": \"^5.5.4\",\n \"eslint\": \"^9.0.0\",\n \"prettier\": \"^3.0.0\",\n \"@hexagen-monaco/sync\": \"^0.4.0\",\n \"@hexagen-monaco/arch-linter\": \"^0.4.0\"\n }\n}";
1
+ declare const BUILTIN_PACKAGE_JSON_TEMPLATE = "{\n \"name\": \"{system}\",\n \"private\": true,\n \"type\": \"module\",\n \"packageManager\": \"{packageManager}\",\n \"workspaces\": {workspaces},\n \"scripts\": {\n \"build\": \"turbo build\",\n \"dev\": \"turbo dev\",\n \"lint\": \"turbo lint\",\n \"typecheck\": \"turbo typecheck\",\n \"test\": \"turbo test\",\n \"clean\": \"turbo clean\",\n \"sync\": \"hexagen sync\",\n \"sync:dry\": \"hexagen sync --dry-run\",\n \"sync:force\": \"hexagen sync --force\",\n \"sync:check\": \"hexagen sync --check\",\n \"lint:arch\": \"hexagen arch validate\",\n \"templates:add\": \"hexagen add\",\n \"templates:validate\": \"hexagen validate-templates\",\n \"format\": \"prettier --write \\\"**/*.{ts,tsx,md}\\\"\"\n },\n \"devDependencies\": {\n \"turbo\": \"^2.0.0\",\n \"typescript\": \"^5.5.4\",\n \"eslint\": \"^9.0.0\",\n \"prettier\": \"^3.0.0\",\n \"@hexagen-monaco/sync\": \"^{toolchainVersion}\",\n \"@hexagen-monaco/arch-linter\": \"^{toolchainVersion}\"\n }\n}";
2
2
  declare const BUILTIN_TSCONFIG_BASE_TEMPLATE = "{\n \"compilerOptions\": {\n \"target\": \"ES2022\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"bundler\",\n \"strict\": true,\n \"skipLibCheck\": true,\n \"composite\": true,\n \"declaration\": true,\n \"emitDeclarationOnly\": true,\n \"paths\": {\n \"@{scope}/*\": [\n \"./packages/*/src/index.ts\"\n ]\n }\n }\n}";
3
3
  declare const BUILTIN_TURBO_TEMPLATE = "{\n \"$schema\": \"https://turbo.build/schema.json\",\n \"tasks\": {\n \"build\": {\n \"dependsOn\": [\n \"^build\"\n ],\n \"outputs\": [\n \"dist/**\"\n ]\n },\n \"dev\": {\n \"cache\": false,\n \"persistent\": true\n },\n \"lint\": {\n \"dependsOn\": [\n \"^build\"\n ]\n },\n \"typecheck\": {\n \"dependsOn\": [\n \"^build\"\n ],\n \"outputs\": [],\n \"cache\": true\n },\n \"test\": {\n \"dependsOn\": [\n \"^build\"\n ]\n }\n }\n}";
4
4
  declare const BUILTIN_GITIGNORE_TEMPLATE = "# Dependencies\nnode_modules/\n.yarn/cache\n.yarn/install-state.gz\n.pnp.*\n\n# Build output\ndist/\n.turbo/\n.next/\n.nitro/\n.output/\n\n# Next.js static export \u2014 anchored to apps so a bare `out/` can't shadow a\n# bounded context's hexagonal `src/application/ports/out/` source (which a\n# pattern without a leading path matches at any depth).\napps/*/out/\n\n# Test / coverage\ncoverage/\n\n# Environment\n.env\n.env.*\n!.env.example\n\n# Logs & OS\n*.log\n.DS_Store\n";
@@ -1 +1 @@
1
- {"version":3,"file":"root-file-templates.d.ts","sourceRoot":"","sources":["../../src/generators/root-file-templates.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,6BAA6B,s8BA6BjC,CAAC;AAEH,QAAA,MAAM,8BAA8B,0XAgBlC,CAAC;AAEH,QAAA,MAAM,sBAAsB,kkBAiC1B,CAAC;AAEH,QAAA,MAAM,0BAA0B,keA6B/B,CAAC;AAEF,QAAA,MAAM,uBAAuB,4LAG5B,CAAC;AAIF,QAAA,MAAM,yBAAyB,+7BAuB9B,CAAC;AAEF,OAAO,EACL,6BAA6B,EAC7B,8BAA8B,EAC9B,sBAAsB,EACtB,0BAA0B,EAC1B,uBAAuB,EACvB,yBAAyB,GAC1B,CAAC"}
1
+ {"version":3,"file":"root-file-templates.d.ts","sourceRoot":"","sources":["../../src/generators/root-file-templates.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,6BAA6B,+gCA8BjC,CAAC;AAEH,QAAA,MAAM,8BAA8B,0XAgBlC,CAAC;AAEH,QAAA,MAAM,sBAAsB,kkBAiC1B,CAAC;AAEH,QAAA,MAAM,0BAA0B,keA6B/B,CAAC;AAEF,QAAA,MAAM,uBAAuB,4LAG5B,CAAC;AAIF,QAAA,MAAM,yBAAyB,+7BAuB9B,CAAC;AAEF,OAAO,EACL,6BAA6B,EAC7B,8BAA8B,EAC9B,sBAAsB,EACtB,0BAA0B,EAC1B,uBAAuB,EACvB,yBAAyB,GAC1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"root-files.d.ts","sourceRoot":"","sources":["../../src/generators/root-files.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAYxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAgFzD,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,CA8G1B"}
1
+ {"version":3,"file":"root-files.d.ts","sourceRoot":"","sources":["../../src/generators/root-files.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,eAAe,CAAC;AAYvB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAoFzD,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,CA0H1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"shared-kernel.d.ts","sourceRoot":"","sources":["../../src/generators/shared-kernel.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAExE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAuBzD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,CAsD1B"}
1
+ {"version":3,"file":"shared-kernel.d.ts","sourceRoot":"","sources":["../../src/generators/shared-kernel.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAuBzD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,CAqD1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"stubs.d.ts","sourceRoot":"","sources":["../../src/generators/stubs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAkBxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAgHzD;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,GACrB,MAAM,CAmBR;AAED,wBAAsB,aAAa,CACjC,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,CAuJ1B"}
1
+ {"version":3,"file":"stubs.d.ts","sourceRoot":"","sources":["../../src/generators/stubs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAGL,KAAK,eAAe,EAErB,MAAM,eAAe,CAAC;AAkBvB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAqHzD;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,GACrB,MAAM,CAmBR;AAED,wBAAsB,aAAa,CACjC,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,CAmJ1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"tsconfig.d.ts","sourceRoot":"","sources":["../../src/generators/tsconfig.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAwJzD;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE,eAAe,GACvB,OAAO,CAAC,eAAe,CAAC,CAqC1B;AAED,wBAAsB,oBAAoB,CACxC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE,eAAe,GACvB,OAAO,CAAC,eAAe,CAAC,CA6B1B"}
1
+ {"version":3,"file":"tsconfig.d.ts","sourceRoot":"","sources":["../../src/generators/tsconfig.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAwJzD;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE,eAAe,GACvB,OAAO,CAAC,eAAe,CAAC,CAuC1B;AAED,wBAAsB,oBAAoB,CACxC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE,eAAe,GACvB,OAAO,CAAC,eAAe,CAAC,CAyB1B"}