@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.
- package/dist/application/use-cases/index.d.ts +1 -0
- package/dist/application/use-cases/index.d.ts.map +1 -1
- package/dist/application/use-cases/migrate-manifest.use-case.d.ts +48 -0
- package/dist/application/use-cases/migrate-manifest.use-case.d.ts.map +1 -0
- package/dist/cli.js +1009 -538
- package/dist/cli.js.map +1 -1
- package/dist/commands/arch/validate.d.ts.map +1 -1
- package/dist/commands/manifest/index.d.ts.map +1 -1
- package/dist/commands/manifest/migrate.d.ts +10 -0
- package/dist/commands/manifest/migrate.d.ts.map +1 -0
- package/dist/config.d.ts +17 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/domain/types.d.ts +8 -1
- package/dist/domain/types.d.ts.map +1 -1
- package/dist/fs-utils.d.ts +4 -4
- package/dist/fs-utils.d.ts.map +1 -1
- package/dist/generators/apps-framework-templates.d.ts.map +1 -1
- package/dist/generators/apps.d.ts.map +1 -1
- package/dist/generators/architecture-file-templates.d.ts +1 -1
- package/dist/generators/architecture-file-templates.d.ts.map +1 -1
- package/dist/generators/architecture-files.d.ts.map +1 -1
- package/dist/generators/barrels/recursive.d.ts +2 -3
- package/dist/generators/barrels/recursive.d.ts.map +1 -1
- package/dist/generators/barrels.d.ts +2 -3
- package/dist/generators/barrels.d.ts.map +1 -1
- package/dist/generators/cross-context.d.ts.map +1 -1
- package/dist/generators/eslint.d.ts.map +1 -1
- package/dist/generators/layer-folders.d.ts +23 -6
- package/dist/generators/layer-folders.d.ts.map +1 -1
- package/dist/generators/package-json.d.ts +2 -3
- package/dist/generators/package-json.d.ts.map +1 -1
- package/dist/generators/reap.d.ts +7 -3
- package/dist/generators/reap.d.ts.map +1 -1
- package/dist/generators/root-file-templates.d.ts +1 -1
- package/dist/generators/root-file-templates.d.ts.map +1 -1
- package/dist/generators/root-files.d.ts.map +1 -1
- package/dist/generators/shared-kernel.d.ts.map +1 -1
- package/dist/generators/stubs.d.ts.map +1 -1
- package/dist/generators/tsconfig.d.ts.map +1 -1
- package/dist/index.js +724 -405
- package/dist/index.js.map +1 -1
- package/dist/journal.d.ts +64 -0
- package/dist/journal.d.ts.map +1 -0
- package/dist/linter.d.ts.map +1 -1
- package/dist/migration-report.d.ts +13 -2
- package/dist/migration-report.d.ts.map +1 -1
- package/dist/results.d.ts +74 -0
- package/dist/results.d.ts.map +1 -1
- package/dist/sync-engine-helpers.d.ts.map +1 -1
- package/dist/sync-engine-init.d.ts +24 -2
- package/dist/sync-engine-init.d.ts.map +1 -1
- package/dist/sync-engine.d.ts +14 -1
- package/dist/sync-engine.d.ts.map +1 -1
- package/dist/templates/agents-md/files/AGENTS.md +7 -5
- package/dist/templates/env-setup/files/.gitignore.hexagen +4 -3
- package/dist/templates/observability/files/.agents/logging.md +34 -0
- package/dist/templates/observability/manifest.json +1 -0
- package/dist/toolchain-version.d.ts +14 -0
- package/dist/toolchain-version.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/application/use-cases/stub-generation.use-case.d.ts +0 -23
- package/dist/application/use-cases/stub-generation.use-case.d.ts.map +0 -1
- package/dist/generators/migration-assistant.d.ts +0 -7
- package/dist/generators/migration-assistant.d.ts.map +0 -1
- package/dist/generators/migration-audit.d.ts +0 -28
- package/dist/generators/migration-audit.d.ts.map +0 -1
- package/dist/generators/migration-stubs.d.ts +0 -7
- package/dist/generators/migration-stubs.d.ts.map +0 -1
- package/dist/generators/test-generator.d.ts +0 -7
- package/dist/generators/test-generator.d.ts.map +0 -1
- package/dist/generators/test-templates/data-builder.d.ts +0 -2
- package/dist/generators/test-templates/data-builder.d.ts.map +0 -1
- package/dist/generators/test-templates/enhanced-test-double.d.ts +0 -2
- package/dist/generators/test-templates/enhanced-test-double.d.ts.map +0 -1
- package/dist/generators/test-templates/index.d.ts +0 -5
- package/dist/generators/test-templates/index.d.ts.map +0 -1
- package/dist/generators/test-templates/integration-test.d.ts +0 -2
- package/dist/generators/test-templates/integration-test.d.ts.map +0 -1
- package/dist/generators/test-templates/unit-test.d.ts +0 -2
- package/dist/generators/test-templates/unit-test.d.ts.map +0 -1
- package/dist/generators/wiring.d.ts +0 -20
- package/dist/generators/wiring.d.ts.map +0 -1
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { LoggerPort } from "@hexagen/shared";
|
|
2
|
+
/** What sync did to the file — determines the inverse op on rollback. */
|
|
3
|
+
export type JournalEntryKind = "created" | "overwritten" | "deleted";
|
|
4
|
+
export interface JournalEntry {
|
|
5
|
+
/** Absolute path of the mutated file. */
|
|
6
|
+
path: string;
|
|
7
|
+
kind: JournalEntryKind;
|
|
8
|
+
/**
|
|
9
|
+
* Full pre-mutation content; `null` iff the file did not exist (kind
|
|
10
|
+
* "created"). Held in memory for the run's lifetime — generated artifacts
|
|
11
|
+
* are small text files, and a journal that spills to disk could itself
|
|
12
|
+
* fail on the same broken substrate it exists to recover from.
|
|
13
|
+
*/
|
|
14
|
+
preContent: string | null;
|
|
15
|
+
}
|
|
16
|
+
export interface RollbackFailure {
|
|
17
|
+
path: string;
|
|
18
|
+
/** The inverse op that was attempted, for the operator-facing print. */
|
|
19
|
+
intended: string;
|
|
20
|
+
error: string;
|
|
21
|
+
}
|
|
22
|
+
export interface RollbackOutcome {
|
|
23
|
+
attempted: number;
|
|
24
|
+
restored: number;
|
|
25
|
+
failures: RollbackFailure[];
|
|
26
|
+
}
|
|
27
|
+
export declare class SyncJournal {
|
|
28
|
+
private entries;
|
|
29
|
+
/**
|
|
30
|
+
* Record a write BEFORE it is attempted. `preContent: null` means the file
|
|
31
|
+
* did not exist (a create); a string is the full pre-image of an overwrite.
|
|
32
|
+
* Over-recording is safe: rolling back a write that never happened either
|
|
33
|
+
* restores identical content or unlinks a file that is not there (ENOENT
|
|
34
|
+
* tolerated below). Under-recording loses user data — so mutation sites
|
|
35
|
+
* record first, mutate second.
|
|
36
|
+
*/
|
|
37
|
+
recordWrite(filePath: string, preContent: string | null): void;
|
|
38
|
+
/** Record a deletion BEFORE the unlink, with the full pre-image. */
|
|
39
|
+
recordDelete(filePath: string, preContent: string): void;
|
|
40
|
+
get size(): number;
|
|
41
|
+
/**
|
|
42
|
+
* Human-readable journal lines (workspace-relative), oldest first — printed
|
|
43
|
+
* verbatim when a failed run must NOT roll back (--allow-dirty).
|
|
44
|
+
*/
|
|
45
|
+
describeEntries(workspaceRoot: string): string[];
|
|
46
|
+
/**
|
|
47
|
+
* Replay the journal in REVERSE order: restore pre-images, unlink created
|
|
48
|
+
* files. Reverse order makes repeated writes to the same path converge on
|
|
49
|
+
* the OLDEST pre-image (pass-1 barrel pre-image is restored last), i.e. the
|
|
50
|
+
* true pre-sync state.
|
|
51
|
+
*
|
|
52
|
+
* Per-entry best-effort: a failing inverse op is collected and replay
|
|
53
|
+
* CONTINUES — restoring nine of ten files beats aborting at the first
|
|
54
|
+
* error. The caller prints the failures; nothing here (or anywhere) falls
|
|
55
|
+
* back to a git-wide reset/clean.
|
|
56
|
+
*
|
|
57
|
+
* Restores use a plain writeFile, not the atomic tmp+rename protocol: the
|
|
58
|
+
* rollback may be running on the same broken substrate that failed the
|
|
59
|
+
* sync, and the simplest possible write maximizes the odds of getting the
|
|
60
|
+
* user's bytes back on disk.
|
|
61
|
+
*/
|
|
62
|
+
rollback(logger: LoggerPort, workspaceRoot: string): Promise<RollbackOutcome>;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=journal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"journal.d.ts","sourceRoot":"","sources":["../src/journal.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,yEAAyE;AACzE,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,CAAC;AAErE,MAAM,WAAW,YAAY;IAC3B,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,gBAAgB,CAAC;IACvB;;;;;OAKG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,eAAe,EAAE,CAAC;CAC7B;AAED,qBAAa,WAAW;IACtB,OAAO,CAAC,OAAO,CAAsB;IAErC;;;;;;;OAOG;IACH,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAQ9D,oEAAoE;IACpE,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI;IAIxD,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED;;;OAGG;IACH,eAAe,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,EAAE;IAMhD;;;;;;;;;;;;;;;OAeG;IACG,QAAQ,CACZ,MAAM,EAAE,UAAU,EAClB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,eAAe,CAAC;CAmD5B"}
|
package/dist/linter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linter.d.ts","sourceRoot":"","sources":["../src/linter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAK9C;;;GAGG;AACH,wBAAsB,aAAa,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"linter.d.ts","sourceRoot":"","sources":["../src/linter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAK9C;;;GAGG;AACH,wBAAsB,aAAa,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA6CrE"}
|
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
import type { SyncConfig } from "./config.js";
|
|
2
|
+
/**
|
|
3
|
+
* Closed audit vocabulary (PR-B1, promised in the PR-A2 review): every tag a
|
|
4
|
+
* generator may record, enforced at the call sites through ReportRecorder
|
|
5
|
+
* (domain/types.ts) and at the sink through `record()` below. The previous
|
|
6
|
+
* shape was an honest-but-open `string` after review #315 showed a
|
|
7
|
+
* five-member union silently laundering the rest through a cast. PR-B2 (D6)
|
|
8
|
+
* deleted the dead generator family (wiring, test-generator, the migration-*
|
|
9
|
+
* trio) that owned every "info" recorder, and "warn" had no recorder at all —
|
|
10
|
+
* both dropped here as promised; "warning" is the live spelling (eslint.ts).
|
|
11
|
+
*/
|
|
12
|
+
export type ReportEntryType = "created" | "updated" | "deleted" | "skipped" | "blocked" | "warning" | "error";
|
|
2
13
|
export interface ReportEntry {
|
|
3
|
-
type:
|
|
14
|
+
type: ReportEntryType;
|
|
4
15
|
target: string;
|
|
5
16
|
message?: string;
|
|
6
17
|
}
|
|
7
18
|
export declare class MigrationReport {
|
|
8
19
|
private entries;
|
|
9
|
-
record(type:
|
|
20
|
+
record(type: ReportEntryType, target: string, message?: string): void;
|
|
10
21
|
writeReport(config: SyncConfig): Promise<void>;
|
|
11
22
|
}
|
|
12
23
|
//# sourceMappingURL=migration-report.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migration-report.d.ts","sourceRoot":"","sources":["../src/migration-report.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"migration-report.d.ts","sourceRoot":"","sources":["../src/migration-report.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C;;;;;;;;;GASG;AACH,MAAM,MAAM,eAAe,GACvB,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,OAAO,CAAC;AAEZ,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,eAAe,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,eAAe;IAC1B,OAAO,CAAC,OAAO,CAAqB;IACpC,MAAM,CAAC,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM;IAGxD,WAAW,CAAC,MAAM,EAAE,UAAU;CAuErC"}
|
package/dist/results.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Outcome vocabulary of `safeWriteFileAtomic` (fs-utils.ts). Declared here so
|
|
3
|
+
* every generator routes the same closed set through `recordWriteStatus`
|
|
4
|
+
* below instead of re-spelling the union (pre-B2, every generator hand-rolled
|
|
5
|
+
* its own copy of the routing if-chain and two of them miscounted — see the
|
|
6
|
+
* helper's doc).
|
|
7
|
+
*/
|
|
8
|
+
export type WriteStatus = "created" | "updated" | "unchanged" | "skipped" | "protected";
|
|
1
9
|
/**
|
|
2
10
|
* Result shape returned by each individual generator function.
|
|
3
11
|
*/
|
|
@@ -5,6 +13,20 @@ export interface GeneratorResult {
|
|
|
5
13
|
created: string[];
|
|
6
14
|
skipped: string[];
|
|
7
15
|
updated: string[];
|
|
16
|
+
/**
|
|
17
|
+
* Paths removed (or, under --dry-run, that WOULD be removed) by a generator.
|
|
18
|
+
* Introduced in PR-A2 for the empty-barrel unlink path — deletions were
|
|
19
|
+
* previously miscounted into `created`; surfaced in the engine summary since
|
|
20
|
+
* PR-B2 (truthful counts).
|
|
21
|
+
*/
|
|
22
|
+
deleted: string[];
|
|
23
|
+
/**
|
|
24
|
+
* Paths whose generated content already matched on disk byte-for-byte
|
|
25
|
+
* (PR-B2, RCA #5). A converged tree lands everything here — `created`/
|
|
26
|
+
* `updated`/`deleted` mean an actual (or, under --dry-run, a planned)
|
|
27
|
+
* mutation, which is what `sync --check` gates on.
|
|
28
|
+
*/
|
|
29
|
+
unchanged: string[];
|
|
8
30
|
totalOps: number;
|
|
9
31
|
summary?: string;
|
|
10
32
|
error?: Error;
|
|
@@ -13,4 +35,56 @@ export interface GeneratorResult {
|
|
|
13
35
|
* Factory for empty result.
|
|
14
36
|
*/
|
|
15
37
|
export declare function createEmptyResult(): GeneratorResult;
|
|
38
|
+
/**
|
|
39
|
+
* Run-level aggregate returned by `SyncEngine.run()` (PR-B2). Counts sum every
|
|
40
|
+
* generator's buckets; `totalOps` is the number of actual (real run) or planned
|
|
41
|
+
* (--dry-run) mutations — creates + updates + deletes. A converged tree
|
|
42
|
+
* reports `totalOps: 0`, which is exactly what `sync --check` gates on (the
|
|
43
|
+
* CLI exits non-zero iff `totalOps > 0`; the exit-code decision stays in
|
|
44
|
+
* cli.ts per the A1 doctrine — the engine only reports).
|
|
45
|
+
*
|
|
46
|
+
* `errors` counts generators that failed-soft — caught their own exception
|
|
47
|
+
* into `result.error` (the Wave-2e "skip this package, do not abort" contract:
|
|
48
|
+
* tsconfig, eslint, apps, root-files) instead of throwing. A failed generator
|
|
49
|
+
* contributes ZERO ops, so without this count a run that could not even plan a
|
|
50
|
+
* file still printed `Total ops : 0` and exited 0 — errors masqueraded as
|
|
51
|
+
* convergence (PR-B2 review, B-1). The CLI exits non-zero whenever
|
|
52
|
+
* `errors > 0`, on real runs and previews alike; `totalOps` deliberately does
|
|
53
|
+
* NOT include errors (it means "planned mutations", and a failure plans
|
|
54
|
+
* nothing — the two are separate facts and separate exit reasons).
|
|
55
|
+
*/
|
|
56
|
+
export interface SyncRunSummary {
|
|
57
|
+
created: number;
|
|
58
|
+
updated: number;
|
|
59
|
+
deleted: number;
|
|
60
|
+
unchanged: number;
|
|
61
|
+
skipped: number;
|
|
62
|
+
totalOps: number;
|
|
63
|
+
/** Generators that caught a failure into `result.error` this run. */
|
|
64
|
+
errors: number;
|
|
65
|
+
/**
|
|
66
|
+
* The root manifest.yaml was absent and the engine synthesized an empty one
|
|
67
|
+
* (the dry-run fallback). A fact, not an op: a plain `--dry-run` preview
|
|
68
|
+
* tolerates it, but a verification gate (`--check`) treats it as a failure —
|
|
69
|
+
* you cannot certify a tree drift-free against a manifest that does not
|
|
70
|
+
* exist. The engine only reports it; the CLI decides the exit code (A1).
|
|
71
|
+
*/
|
|
72
|
+
manifestMissing: boolean;
|
|
73
|
+
durationMs: number;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* The single routing truth from a write status to the result buckets
|
|
77
|
+
* (PR-B2, RCA #5). Before this helper each generator hand-rolled the same
|
|
78
|
+
* if-chain, and two of them lied: shared-kernel counted updates as `created`
|
|
79
|
+
* and `unchanged` as `skipped`; layer-folders counted directory mkdirs as
|
|
80
|
+
* `created` on every run. Routing rules:
|
|
81
|
+
*
|
|
82
|
+
* created / updated → their bucket, +1 totalOps (a real or planned change)
|
|
83
|
+
* unchanged → `unchanged`, NOT an op (nothing was or would be written)
|
|
84
|
+
* skipped / protected → `skipped`, NOT an op (deliberately left alone)
|
|
85
|
+
*
|
|
86
|
+
* Deletions don't flow through here — they are not a `safeWriteFileAtomic`
|
|
87
|
+
* outcome; the deleting generator pushes `result.deleted` itself (recursive.ts).
|
|
88
|
+
*/
|
|
89
|
+
export declare function recordWriteStatus(result: GeneratorResult, filePath: string, status: WriteStatus): void;
|
|
16
90
|
//# sourceMappingURL=results.d.ts.map
|
package/dist/results.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"results.d.ts","sourceRoot":"","sources":["../src/results.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,eAAe,
|
|
1
|
+
{"version":3,"file":"results.d.ts","sourceRoot":"","sources":["../src/results.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GACnB,SAAS,GACT,SAAS,GACT,WAAW,GACX,SAAS,GACT,WAAW,CAAC;AAEhB;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB;;;;;OAKG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,eAAe,CASnD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,eAAe,EAAE,OAAO,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,eAAe,EACvB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,WAAW,GAClB,IAAI,CAaN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-engine-helpers.d.ts","sourceRoot":"","sources":["../src/sync-engine-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAEvE,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,eAAe,CAAC;IAC3B,SAAS,EAAE,eAAe,CAAC;IAC3B,OAAO,EAAE,eAAe,CAAC;IACzB,IAAI,EAAE,eAAe,CAAC;IACtB,SAAS,EAAE,eAAe,CAAC;IAC3B,MAAM,EAAE,eAAe,CAAC;IACxB,KAAK,EAAE,eAAe,CAAC;IACvB,IAAI,EAAE,eAAe,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,eAAe,EAAE,GAAG,EAAE,eAAe,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"sync-engine-helpers.d.ts","sourceRoot":"","sources":["../src/sync-engine-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAEvE,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,eAAe,CAAC;IAC3B,SAAS,EAAE,eAAe,CAAC;IAC3B,OAAO,EAAE,eAAe,CAAC;IACzB,IAAI,EAAE,eAAe,CAAC;IACtB,SAAS,EAAE,eAAe,CAAC;IAC3B,MAAM,EAAE,eAAe,CAAC;IACxB,KAAK,EAAE,eAAe,CAAC;IACvB,IAAI,EAAE,eAAe,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,eAAe,EAAE,GAAG,EAAE,eAAe,GAAG,IAAI,CAgB7E;AAED,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,eAAe,EAC1B,UAAU,EAAE,eAAe,GAC1B,eAAe,CAuEjB"}
|
|
@@ -6,7 +6,29 @@ export interface InitOptions {
|
|
|
6
6
|
targetRoot?: string;
|
|
7
7
|
manifest?: Manifest;
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Resolve the workspace root (Wave-C consumer experience, RCA #7):
|
|
11
|
+
* `options.targetRoot` wins (programmatic callers — the wizard's external
|
|
12
|
+
* mode, tests); otherwise walk up from each probe start in order and return
|
|
13
|
+
* the first directory whose package.json declares a `workspaces` array.
|
|
14
|
+
*
|
|
15
|
+
* Probe order is cwd FIRST, install location second:
|
|
16
|
+
* - cwd-first is the CLI convention (git/npm/turbo all operate on where you
|
|
17
|
+
* are), and it is the only start that works for a global or `npx` install,
|
|
18
|
+
* where __dirname lives in a cache directory whose walk-up finds nothing —
|
|
19
|
+
* the old __dirname-only walk hard-failed there with a terse error that
|
|
20
|
+
* never named the real problem.
|
|
21
|
+
* - The __dirname fallback preserves every previously-working setup: a
|
|
22
|
+
* locally installed CLI invoked from OUTSIDE its workspace (cwd resolves
|
|
23
|
+
* nothing) still finds the workspace it is installed in.
|
|
24
|
+
*
|
|
25
|
+
* `probeStarts` is parameterized for tests only; production callers use the
|
|
26
|
+
* default.
|
|
27
|
+
*/
|
|
28
|
+
export declare function findWorkspaceRoot(options: InitOptions, probeStarts?: readonly string[]): Promise<string>;
|
|
29
|
+
export declare function loadManifest(workspaceRoot: string, flags: SyncFlags, options: InitOptions): Promise<{
|
|
30
|
+
manifest: Manifest;
|
|
31
|
+
manifestMissing: boolean;
|
|
32
|
+
}>;
|
|
11
33
|
export declare function validateManifest(manifest: Manifest, flags: SyncFlags): void;
|
|
12
34
|
//# sourceMappingURL=sync-engine-init.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-engine-init.d.ts","sourceRoot":"","sources":["../src/sync-engine-init.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAKpD,QAAA,MAAM,SAAS,QAA2B,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,CAAC;AAErB,MAAM,WAAW,WAAW;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;
|
|
1
|
+
{"version":3,"file":"sync-engine-init.d.ts","sourceRoot":"","sources":["../src/sync-engine-init.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAKpD,QAAA,MAAM,SAAS,QAA2B,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,CAAC;AAErB,MAAM,WAAW,WAAW;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AA6CD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,WAAW,EACpB,WAAW,GAAE,SAAS,MAAM,EAA+B,GAC1D,OAAO,CAAC,MAAM,CAAC,CAyBjB;AAED,wBAAsB,YAAY,CAChC,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC;IAAE,QAAQ,EAAE,QAAQ,CAAC;IAAC,eAAe,EAAE,OAAO,CAAA;CAAE,CAAC,CAgC3D;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI,CAiC3E"}
|
package/dist/sync-engine.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SyncFlags } from "./config.js";
|
|
2
|
+
import { type SyncRunSummary } from "./results.js";
|
|
2
3
|
import type { Manifest } from "./types/manifest.js";
|
|
3
4
|
export interface SyncEngineOptions {
|
|
4
5
|
targetRoot?: string;
|
|
@@ -6,16 +7,28 @@ export interface SyncEngineOptions {
|
|
|
6
7
|
}
|
|
7
8
|
export declare class SyncEngine {
|
|
8
9
|
private report;
|
|
10
|
+
private journal;
|
|
11
|
+
private failures;
|
|
9
12
|
private partialConfig;
|
|
10
13
|
private fullConfig;
|
|
11
14
|
private manifest;
|
|
15
|
+
private manifestMissing;
|
|
12
16
|
private workspaceRoot;
|
|
13
17
|
private readonly options?;
|
|
14
18
|
constructor(flags: SyncFlags, options?: SyncEngineOptions);
|
|
15
19
|
private getInitOptions;
|
|
16
20
|
private getConfig;
|
|
21
|
+
/**
|
|
22
|
+
* Record a failed-soft generator result (B-1). Called at every site that
|
|
23
|
+
* receives a GeneratorResult, including the ones that never set `error`
|
|
24
|
+
* today — the check is one truthy test, and a future generator adopting the
|
|
25
|
+
* catch-into-result contract is then surfaced without anyone remembering
|
|
26
|
+
* this seam. `row` matches the summary-table label so the FAILED line and
|
|
27
|
+
* the table read as one report.
|
|
28
|
+
*/
|
|
29
|
+
private noteFailure;
|
|
17
30
|
private ensureDirectories;
|
|
18
31
|
private generateCoreArtifacts;
|
|
19
|
-
run(): Promise<
|
|
32
|
+
run(): Promise<SyncRunSummary>;
|
|
20
33
|
}
|
|
21
34
|
//# sourceMappingURL=sync-engine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-engine.d.ts","sourceRoot":"","sources":["../src/sync-engine.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAc,MAAM,aAAa,CAAC;AAkBpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAkBpD,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAyB;
|
|
1
|
+
{"version":3,"file":"sync-engine.d.ts","sourceRoot":"","sources":["../src/sync-engine.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAc,MAAM,aAAa,CAAC;AAkBpD,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAkBpD,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAyB;IAKvC,OAAO,CAAC,OAAO,CAAqB;IAYpC,OAAO,CAAC,QAAQ,CAA+C;IAC/D,OAAO,CAAC,aAAa,CAAY;IACjC,OAAO,CAAC,UAAU,CAA2B;IAC7C,OAAO,CAAC,QAAQ,CAAgB;IAChC,OAAO,CAAC,eAAe,CAAS;IAChC,OAAO,CAAC,aAAa,CAAc;IACnC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAoB;gBAEjC,KAAK,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,iBAAiB;IAKzD,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,SAAS;IAOjB;;;;;;;OAOG;IACH,OAAO,CAAC,WAAW;YAML,iBAAiB;YAmCjB,qBAAqB;IAiG7B,GAAG,IAAI,OAAO,CAAC,cAAc,CAAC;CAmTrC"}
|
|
@@ -35,11 +35,11 @@ library, to avoid hallucinated dependencies.
|
|
|
35
35
|
|
|
36
36
|
## Conventions
|
|
37
37
|
|
|
38
|
-
- **Logging:**
|
|
39
|
-
`observability` template
|
|
40
|
-
|
|
41
|
-
template
|
|
42
|
-
|
|
38
|
+
- **Logging:** prefer structured, leveled logging over bare `console.log` in
|
|
39
|
+
application code. If the `observability` template is installed, its logger is
|
|
40
|
+
the required interface and `.agents/logging.md` is the binding spec; if the
|
|
41
|
+
`eslint-no-console` template is installed, lint/CI enforces the ban. Without
|
|
42
|
+
those templates, keep logging consistent with the surrounding code.
|
|
43
43
|
|
|
44
44
|
## Commands After Edits
|
|
45
45
|
|
|
@@ -93,5 +93,7 @@ Deeper guidance lives in `.agents/`:
|
|
|
93
93
|
- `testing.md` — runner, assertions, file naming
|
|
94
94
|
- `git.md` — commit/branch/PR rules
|
|
95
95
|
- `tech-stack.md` — exact tools, with negative examples
|
|
96
|
+
- `logging.md` — the binding logging spec (present when the `observability`
|
|
97
|
+
template is installed)
|
|
96
98
|
- `session-log.md` — running log of AI-assisted sessions (present when session
|
|
97
99
|
logging is enabled)
|
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
# cat .gitignore.hexagen >> .gitignore
|
|
6
6
|
#
|
|
7
7
|
# Keep this file — it's the committed reference for the env-ignore rules (like
|
|
8
|
-
# .env.example)
|
|
9
|
-
#
|
|
10
|
-
#
|
|
8
|
+
# .env.example). If this template is registered in the project's template
|
|
9
|
+
# config, `hexagen validate-templates` will flag this file when it goes
|
|
10
|
+
# missing. The leading blank line above keeps these rules from merging onto
|
|
11
|
+
# the last line of a .gitignore with no trailing newline. Ignores your
|
|
11
12
|
# local/secret env files but keeps the committed *.example references tracked.
|
|
12
13
|
|
|
13
14
|
.env
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Logging Spec
|
|
2
|
+
|
|
3
|
+
This spec ships with the `observability` template. The logger it mandates is
|
|
4
|
+
installed at `src/infrastructure/logging/logger.ts` — if you are reading this
|
|
5
|
+
file, that logger exists in this project.
|
|
6
|
+
|
|
7
|
+
## The Rule
|
|
8
|
+
|
|
9
|
+
Use the structured logger for all application logging. Import it from the
|
|
10
|
+
`src/infrastructure/logging` barrel (the module's public surface — not the
|
|
11
|
+
individual files), via a relative path or your project's path alias:
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { logger } from "../infrastructure/logging";
|
|
15
|
+
|
|
16
|
+
logger.info({ userId }, "user.created");
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**Never `console.log`** in application code — it has no level, no correlation
|
|
20
|
+
id, and no redaction, and it becomes technical debt the moment it lands.
|
|
21
|
+
|
|
22
|
+
## Exempt Sites
|
|
23
|
+
|
|
24
|
+
The only places `console` is acceptable:
|
|
25
|
+
|
|
26
|
+
- the logger transport itself (`src/infrastructure/logging/`)
|
|
27
|
+
- server startup/shutdown messages emitted before the logger exists
|
|
28
|
+
- one-off scripts outside the app runtime
|
|
29
|
+
- config files evaluated at build time
|
|
30
|
+
|
|
31
|
+
## Enforcement
|
|
32
|
+
|
|
33
|
+
If the `eslint-no-console` template is also installed, this rule is enforced in
|
|
34
|
+
lint/CI. Otherwise it relies on code review — the rule stands either way.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validate a candidate toolchain version: must be a FULL SemVer 2.0.0 version
|
|
3
|
+
* string and must not be the degenerate `0.0.0` that the old silent fallback
|
|
4
|
+
* produced. Returns the version on success, throws with the offending source
|
|
5
|
+
* on failure. Shared by the runtime resolver below AND the tsup build gate
|
|
6
|
+
* (tsup.config.ts imports it), so the two cannot drift apart.
|
|
7
|
+
*/
|
|
8
|
+
export declare function assertValidToolchainVersion(version: unknown, source: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Resolve the engine's own version (e.g. `0.7.0`). Throws instead of
|
|
11
|
+
* returning a fallback — callers that scaffold pins must abort loudly.
|
|
12
|
+
*/
|
|
13
|
+
export declare function resolveToolchainVersion(): string;
|
|
14
|
+
//# sourceMappingURL=toolchain-version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolchain-version.d.ts","sourceRoot":"","sources":["../src/toolchain-version.ts"],"names":[],"mappings":"AA2CA;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,GACb,MAAM,CAcR;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CA6BhD"}
|
package/package.json
CHANGED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Stub Generation Use Case
|
|
3
|
-
*
|
|
4
|
-
* Orchestrates the stub file generation process for a bounded context.
|
|
5
|
-
* Handles template resolution, naming cascade, emission planning,
|
|
6
|
-
* and file emission.
|
|
7
|
-
*/
|
|
8
|
-
import type { BoundedContext, StubsConfig } from "../../types/manifest.js";
|
|
9
|
-
import { type GeneratorResult } from "../../results.js";
|
|
10
|
-
import type { FileSystemPort } from "../ports/out/file-system.port.js";
|
|
11
|
-
import type { LoggerPort } from "@hexagen/shared";
|
|
12
|
-
export interface StubGenerationOptions {
|
|
13
|
-
moduleDir: string;
|
|
14
|
-
moduleName: string;
|
|
15
|
-
stubsConfig: StubsConfig | undefined;
|
|
16
|
-
context: BoundedContext;
|
|
17
|
-
}
|
|
18
|
-
export interface StubGenerationResult {
|
|
19
|
-
result: GeneratorResult;
|
|
20
|
-
skippedCount: number;
|
|
21
|
-
}
|
|
22
|
-
export declare function generateStubs(options: StubGenerationOptions, fsPort: FileSystemPort, logger: LoggerPort): Promise<StubGenerationResult>;
|
|
23
|
-
//# sourceMappingURL=stub-generation.use-case.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stub-generation.use-case.d.ts","sourceRoot":"","sources":["../../../src/application/use-cases/stub-generation.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EAGZ,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAalD,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,WAAW,GAAG,SAAS,CAAC;IACrC,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,eAAe,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;CACtB;AA8BD,wBAAsB,aAAa,CACjC,OAAO,EAAE,qBAAqB,EAC9B,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,UAAU,GACjB,OAAO,CAAC,oBAAoB,CAAC,CAwE/B"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type GeneratorResult } from "../results.js";
|
|
2
|
-
import { type PackageAudit, type MigrationConfig, type ReportRecorder } from "./migration-audit.js";
|
|
3
|
-
export { auditPackages, generateMigrationReport } from "./migration-audit.js";
|
|
4
|
-
export type { PackageAudit, MigrationConfig } from "./migration-audit.js";
|
|
5
|
-
declare function migratePackage(audit: PackageAudit, config: MigrationConfig, reporter: ReportRecorder): Promise<GeneratorResult>;
|
|
6
|
-
export { migratePackage };
|
|
7
|
-
//# sourceMappingURL=migration-assistant.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"migration-assistant.d.ts","sourceRoot":"","sources":["../../src/generators/migration-assistant.ts"],"names":[],"mappings":"AAEA,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,sBAAsB,CAAC;AAQ9B,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC9E,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE1E,iBAAe,cAAc,CAC3B,KAAK,EAAE,YAAY,EACnB,MAAM,EAAE,eAAe,EACvB,QAAQ,EAAE,cAAc,GACvB,OAAO,CAAC,eAAe,CAAC,CAsG1B;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { SyncConfig } from "../config.js";
|
|
2
|
-
import type { ReportRecorder } from "../domain/types.js";
|
|
3
|
-
interface PackageAudit {
|
|
4
|
-
packageName: string;
|
|
5
|
-
packagePath: string;
|
|
6
|
-
missingAdapters: string[];
|
|
7
|
-
missingWiring: string[];
|
|
8
|
-
missingTestDoubles: string[];
|
|
9
|
-
missingMcpTools: string[];
|
|
10
|
-
missingTests: string[];
|
|
11
|
-
}
|
|
12
|
-
interface MigrationConfig {
|
|
13
|
-
enabled?: boolean;
|
|
14
|
-
dryRun?: boolean;
|
|
15
|
-
packages?: string[];
|
|
16
|
-
generateAdapters?: boolean;
|
|
17
|
-
generateWiring?: boolean;
|
|
18
|
-
generateTestDoubles?: boolean;
|
|
19
|
-
generateMcpTools?: boolean;
|
|
20
|
-
generateTests?: boolean;
|
|
21
|
-
}
|
|
22
|
-
declare function auditPackages(config: SyncConfig, reporter: ReportRecorder): Promise<PackageAudit[]>;
|
|
23
|
-
declare function generateMigrationReport(audits: PackageAudit[]): string;
|
|
24
|
-
declare function hasIssues(audit: PackageAudit): boolean;
|
|
25
|
-
export { auditPackages, generateMigrationReport, hasIssues };
|
|
26
|
-
export type { PackageAudit, MigrationConfig };
|
|
27
|
-
export type { ReportRecorder } from "../domain/types.js";
|
|
28
|
-
//# sourceMappingURL=migration-audit.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"migration-audit.d.ts","sourceRoot":"","sources":["../../src/generators/migration-audit.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,UAAU,YAAY;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,UAAU,eAAe;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,iBAAe,aAAa,CAC1B,MAAM,EAAE,UAAU,EAClB,QAAQ,EAAE,cAAc,GACvB,OAAO,CAAC,YAAY,EAAE,CAAC,CAuBzB;AAiGD,iBAAS,uBAAuB,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,CA0D/D;AAED,iBAAS,SAAS,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAQ/C;AAED,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,SAAS,EAAE,CAAC;AAC7D,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,CAAC;AAC9C,YAAY,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
declare function generateAdapterStub(adapterName: string): string;
|
|
2
|
-
declare function generateWiringStub(packageName: string): string;
|
|
3
|
-
declare function generateTestDoubleStub(testDoubleName: string): string;
|
|
4
|
-
declare function generateMcpToolsStub(packageName: string): string;
|
|
5
|
-
declare function toPascalCase(str: string): string;
|
|
6
|
-
export { generateAdapterStub, generateWiringStub, generateTestDoubleStub, generateMcpToolsStub, toPascalCase, };
|
|
7
|
-
//# sourceMappingURL=migration-stubs.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"migration-stubs.d.ts","sourceRoot":"","sources":["../../src/generators/migration-stubs.ts"],"names":[],"mappings":"AAAA,iBAAS,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAexD;AAED,iBAAS,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAkBvD;AAED,iBAAS,sBAAsB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAa9D;AAED,iBAAS,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAYzD;AAED,iBAAS,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAKzC;AAED,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACpB,YAAY,GACb,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { SyncConfig } from "../config.js";
|
|
2
|
-
import { type GeneratorResult } from "../results.js";
|
|
3
|
-
import { generateEnhancedTestDouble } from "./test-templates/index.js";
|
|
4
|
-
import type { ReportRecorder } from "../domain/types.js";
|
|
5
|
-
export { generateEnhancedTestDouble };
|
|
6
|
-
export declare function generateTests(moduleDir: string, moduleName: string, config: SyncConfig, report?: ReportRecorder): Promise<GeneratorResult>;
|
|
7
|
-
//# sourceMappingURL=test-generator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-generator.d.ts","sourceRoot":"","sources":["../../src/generators/test-generator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,EAIL,0BAA0B,EAC3B,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAmBzD,OAAO,EAAE,0BAA0B,EAAE,CAAC;AAEtC,wBAAsB,aAAa,CACjC,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,CAkI1B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data-builder.d.ts","sourceRoot":"","sources":["../../../src/generators/test-templates/data-builder.ts"],"names":[],"mappings":"AAAA,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAyD1D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enhanced-test-double.d.ts","sourceRoot":"","sources":["../../../src/generators/test-templates/enhanced-test-double.ts"],"names":[],"mappings":"AAAA,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EAAE,EACjB,KAAK,EAAE,MAAM,GACZ,MAAM,CAqFR"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { generateUnitTest } from "./unit-test.js";
|
|
2
|
-
export { generateIntegrationTest } from "./integration-test.js";
|
|
3
|
-
export { generateDataBuilder } from "./data-builder.js";
|
|
4
|
-
export { generateEnhancedTestDouble } from "./enhanced-test-double.js";
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generators/test-templates/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"integration-test.d.ts","sourceRoot":"","sources":["../../../src/generators/test-templates/integration-test.ts"],"names":[],"mappings":"AAAA,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAmE/D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unit-test.d.ts","sourceRoot":"","sources":["../../../src/generators/test-templates/unit-test.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAmG5E"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { SyncConfig } from "../config.js";
|
|
2
|
-
import { type GeneratorResult } from "../results.js";
|
|
3
|
-
import type { ReportRecorder } from "../domain/types.js";
|
|
4
|
-
/**
|
|
5
|
-
* Generate wiring code for a bounded context.
|
|
6
|
-
*
|
|
7
|
-
* This is the main entry point for the wiring generator. It:
|
|
8
|
-
* 1. Reads use case declarations from the manifest
|
|
9
|
-
* 2. Generates composition root bindings
|
|
10
|
-
* 3. Generates test doubles for ports
|
|
11
|
-
* 4. Generates MCP tool registrations
|
|
12
|
-
*
|
|
13
|
-
* @param moduleDir - Package root directory
|
|
14
|
-
* @param moduleName - Bounded context name
|
|
15
|
-
* @param config - Sync configuration
|
|
16
|
-
* @param report - Optional diagnostic recorder
|
|
17
|
-
* @returns Generator result with created/updated files
|
|
18
|
-
*/
|
|
19
|
-
export declare function generateWiring(moduleDir: string, moduleName: string, config: SyncConfig, report?: ReportRecorder): Promise<GeneratorResult>;
|
|
20
|
-
//# sourceMappingURL=wiring.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../src/generators/wiring.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AA2JzD;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,cAAc,CAClC,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,CAmK1B"}
|