@hexagen-monaco/sync 0.15.0 → 0.16.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.
- package/dist/__tests__/drift-files.test.d.ts +2 -0
- package/dist/__tests__/drift-files.test.d.ts.map +1 -0
- package/dist/cli.js +656 -525
- package/dist/cli.js.map +1 -1
- package/dist/commands/sync/check-json-files.test.d.ts +2 -0
- package/dist/commands/sync/check-json-files.test.d.ts.map +1 -0
- package/dist/commands/sync/check-json.d.ts +25 -5
- package/dist/commands/sync/check-json.d.ts.map +1 -1
- package/dist/generators/port-analyzer.d.ts +2 -0
- package/dist/generators/port-analyzer.d.ts.map +1 -1
- package/dist/index.js +235 -120
- package/dist/index.js.map +1 -1
- package/dist/preflight.d.ts +4 -1
- package/dist/preflight.d.ts.map +1 -1
- package/dist/results.d.ts +40 -0
- package/dist/results.d.ts.map +1 -1
- package/dist/sync-engine.d.ts +1 -0
- package/dist/sync-engine.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/preflight.d.ts
CHANGED
|
@@ -2,6 +2,9 @@ import type { SyncConfig } from "./config.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* Runs a full build for all packages that have stale source files.
|
|
4
4
|
* For simplicity we invoke the monorepo turbo build which will rebuild any out‑of‑date packages.
|
|
5
|
+
* `options.skip` skips the build and leaves it to the gate.
|
|
5
6
|
*/
|
|
6
|
-
export declare function ensureDependenciesBuilt(config: SyncConfig
|
|
7
|
+
export declare function ensureDependenciesBuilt(config: SyncConfig, options?: {
|
|
8
|
+
skip?: boolean;
|
|
9
|
+
}): Promise<void>;
|
|
7
10
|
//# sourceMappingURL=preflight.d.ts.map
|
package/dist/preflight.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preflight.d.ts","sourceRoot":"","sources":["../src/preflight.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAO9C
|
|
1
|
+
{"version":3,"file":"preflight.d.ts","sourceRoot":"","sources":["../src/preflight.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAO9C;;;;GAIG;AACH,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,UAAU,EAClB,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAO,GAC/B,OAAO,CAAC,IAAI,CAAC,CAkCf"}
|
package/dist/results.d.ts
CHANGED
|
@@ -35,6 +35,19 @@ export interface GeneratorResult {
|
|
|
35
35
|
* Factory for empty result.
|
|
36
36
|
*/
|
|
37
37
|
export declare function createEmptyResult(): GeneratorResult;
|
|
38
|
+
/**
|
|
39
|
+
* The kind of drift a generated file is in: missing on disk (`create`),
|
|
40
|
+
* different bytes from the generated output (`update`), or no longer
|
|
41
|
+
* generated (`delete`).
|
|
42
|
+
*/
|
|
43
|
+
export type DriftAction = "create" | "update" | "delete";
|
|
44
|
+
/** One workspace-relative file in `sync --check --json`'s `files` list. */
|
|
45
|
+
export interface DriftFile {
|
|
46
|
+
path: string;
|
|
47
|
+
action: DriftAction;
|
|
48
|
+
generator: string;
|
|
49
|
+
reason: string;
|
|
50
|
+
}
|
|
38
51
|
/**
|
|
39
52
|
* Run-level aggregate returned by `SyncEngine.run()` (PR-B2). Counts sum every
|
|
40
53
|
* generator's buckets; `totalOps` is the number of actual (real run) or planned
|
|
@@ -71,6 +84,24 @@ export interface SyncRunSummary {
|
|
|
71
84
|
*/
|
|
72
85
|
manifestMissing: boolean;
|
|
73
86
|
durationMs: number;
|
|
87
|
+
/**
|
|
88
|
+
* Per-phase wall-clock timings for this run, in ms. `null` means the phase
|
|
89
|
+
* did not run: git status is skipped under `--allow-dirty` or in external
|
|
90
|
+
* mode; preflight and linter are skipped in external mode. A phase that ran
|
|
91
|
+
* and returned early — such as preflight in dry-run — reports a small
|
|
92
|
+
* number, not `null`.
|
|
93
|
+
*/
|
|
94
|
+
phaseTimingsMs?: {
|
|
95
|
+
gitStatus: number | null;
|
|
96
|
+
preflight: number | null;
|
|
97
|
+
generators: number;
|
|
98
|
+
linter: number | null;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Per-file drift details, sorted by path then action then generator and
|
|
102
|
+
* workspace-relative. Absent when built without the engine's rows.
|
|
103
|
+
*/
|
|
104
|
+
files?: DriftFile[];
|
|
74
105
|
}
|
|
75
106
|
/**
|
|
76
107
|
* The single routing truth from a write status to the result buckets
|
|
@@ -87,4 +118,13 @@ export interface SyncRunSummary {
|
|
|
87
118
|
* outcome; the deleting generator pushes `result.deleted` itself (recursive.ts).
|
|
88
119
|
*/
|
|
89
120
|
export declare function recordWriteStatus(result: GeneratorResult, filePath: string, status: WriteStatus): void;
|
|
121
|
+
/**
|
|
122
|
+
* Build the per-file drift list from the engine's ordered generator rows.
|
|
123
|
+
* Paths are made workspace-relative (absolute paths resolve against
|
|
124
|
+
* `workspaceRoot`, relative ones pass through) with backslashes normalized to
|
|
125
|
+
* `/`. Entries with the same path+action+generator collapse; the result is
|
|
126
|
+
* sorted by path, then action, then generator using code-point comparison
|
|
127
|
+
* (locale-free).
|
|
128
|
+
*/
|
|
129
|
+
export declare function buildDriftFiles(rows: ReadonlyArray<readonly [string, GeneratorResult]>, workspaceRoot: string): DriftFile[];
|
|
90
130
|
//# 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":"
|
|
1
|
+
{"version":3,"file":"results.d.ts","sourceRoot":"","sources":["../src/results.ts"],"names":[],"mappings":"AAEA;;;;;;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;I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G;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,eAAe,EACvB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,WAAW,GAClB,IAAI,CAaN;AAgED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,aAAa,CAAC,SAAS,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,EACvD,aAAa,EAAE,MAAM,GACpB,SAAS,EAAE,CAQb"}
|
package/dist/sync-engine.d.ts
CHANGED
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"sync-engine.d.ts","sourceRoot":"","sources":["../src/sync-engine.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAc,MAAM,aAAa,CAAC;AAoBpD,OAAO,EAIL,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;IAEpB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;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;YAwCjB,qBAAqB;IAwG7B,GAAG,IAAI,OAAO,CAAC,cAAc,CAAC;CAwVrC"}
|