@hexagen-monaco/sync 0.14.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/README.md +63 -0
- package/dist/__tests__/drift-files.test.d.ts +2 -0
- package/dist/__tests__/drift-files.test.d.ts.map +1 -0
- package/dist/application/use-cases/stamp-generator-identity.use-case.d.ts +12 -0
- package/dist/application/use-cases/stamp-generator-identity.use-case.d.ts.map +1 -0
- package/dist/cli.js +2683 -1136
- package/dist/cli.js.map +1 -1
- package/dist/commands/arch/validate-outcome.d.ts +30 -0
- package/dist/commands/arch/validate-outcome.d.ts.map +1 -0
- package/dist/commands/arch/validate.d.ts +3 -1
- package/dist/commands/arch/validate.d.ts.map +1 -1
- package/dist/commands/bootstrap/index.d.ts.map +1 -1
- package/dist/commands/manifest/migrate.d.ts +8 -0
- package/dist/commands/manifest/migrate.d.ts.map +1 -1
- package/dist/commands/remove/index.d.ts +41 -0
- package/dist/commands/remove/index.d.ts.map +1 -0
- package/dist/commands/shared/confirm.d.ts.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 +67 -0
- package/dist/commands/sync/check-json.d.ts.map +1 -0
- package/dist/generators/architecture-files.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 +683 -554
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/config/index.d.ts +3 -0
- package/dist/infrastructure/config/index.d.ts.map +1 -0
- package/dist/infrastructure/index.d.ts +1 -0
- package/dist/infrastructure/index.d.ts.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/dist/types/manifest/generator.d.ts +2 -0
- package/dist/types/manifest/generator.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -52,6 +52,69 @@ npx hexagen sync
|
|
|
52
52
|
|
|
53
53
|
Consult `npx hexagen arch --help` for the full list of manifest operations.
|
|
54
54
|
|
|
55
|
+
### Machine-readable output
|
|
56
|
+
|
|
57
|
+
`hexagen arch validate --json` prints exactly one JSON line on stdout, with the
|
|
58
|
+
linter's own logs relayed to stderr:
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"schemaVersion": 1,
|
|
63
|
+
"command": "arch validate",
|
|
64
|
+
"status": "compliant",
|
|
65
|
+
"exitCode": 0,
|
|
66
|
+
"fresh": 0,
|
|
67
|
+
"expired": 0,
|
|
68
|
+
"baselineGrowth": 0,
|
|
69
|
+
"filesScanned": 12,
|
|
70
|
+
"reason": null
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Exit codes: `0` compliant, `1` violations, `2` could not run (a broken manifest,
|
|
75
|
+
a missing linter, a timeout, or an unreadable `--json` line). `status` is one of
|
|
76
|
+
`"compliant" | "violations" | "could-not-run"`, and `reason` is `null` unless the
|
|
77
|
+
status is `"could-not-run"`.
|
|
78
|
+
|
|
79
|
+
`hexagen sync --check --json` prints exactly one JSON line on stdout, with every
|
|
80
|
+
sync engine log relayed to stderr:
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"schemaVersion": 1,
|
|
85
|
+
"command": "sync --check",
|
|
86
|
+
"status": "drift",
|
|
87
|
+
"exitCode": 1,
|
|
88
|
+
"pending": { "created": 1, "updated": 0, "deleted": 0, "total": 1 },
|
|
89
|
+
"errors": 0,
|
|
90
|
+
"manifestMissing": false,
|
|
91
|
+
"reason": null
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
`status` is one of `"converged" | "drift" | "could-not-run"`, decided in this
|
|
96
|
+
order: a thrown fatal error is `could-not-run` (with `pending`, `errors` and
|
|
97
|
+
`manifestMissing` all `null` and `reason` set to the error message); a missing
|
|
98
|
+
manifest is `could-not-run` with `reason` `"manifest not found"`; any generator
|
|
99
|
+
failure is `could-not-run` with `reason` `"<n> generator failure(s)"`; any
|
|
100
|
+
pending change is `"drift"`; otherwise `"converged"`. `exitCode` is `0` only
|
|
101
|
+
for `converged`, and `1` otherwise — the exit codes are unchanged. `--json`
|
|
102
|
+
without `--check` is a usage error: exit 2, nothing on stdout.
|
|
103
|
+
|
|
104
|
+
### Generator identity
|
|
105
|
+
|
|
106
|
+
Hexagen-written manifests carry an identity marker: `generator.name: "@hexagen-monaco/sync"`
|
|
107
|
+
(the **published** package name). `hexagen sync` stamps it when it creates a new
|
|
108
|
+
manifest (external mode, fresh target) and so does `hexagen bootstrap`; `hexagen
|
|
109
|
+
manifest migrate` adds it to an existing project — in the side-car named by
|
|
110
|
+
`workspace_config` for a split manifest, otherwise at the root. Absence stays
|
|
111
|
+
valid (legacy). A consumer reads `.architecture/manifest.yaml`, then the file
|
|
112
|
+
`workspace_config` names, whose `generator` wins:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
npx hexagen manifest migrate --dry-run
|
|
116
|
+
```
|
|
117
|
+
|
|
55
118
|
### `hexagen grant issue`
|
|
56
119
|
|
|
57
120
|
Mints a signed Grant — the file `hexagen_accept_transaction` trusts as its
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drift-files.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/drift-files.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { DeepEqual } from "./migrate-manifest.use-case.js";
|
|
2
|
+
export interface StampGeneratorIdentityResult {
|
|
3
|
+
content: string;
|
|
4
|
+
changed: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare class StampGeneratorIdentityUseCase {
|
|
7
|
+
private readonly deepEqual;
|
|
8
|
+
constructor(deepEqual: DeepEqual);
|
|
9
|
+
execute(content: string): StampGeneratorIdentityResult;
|
|
10
|
+
private assertStampedOnlyAdded;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=stamp-generator-identity.use-case.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stamp-generator-identity.use-case.d.ts","sourceRoot":"","sources":["../../../src/application/use-cases/stamp-generator-identity.use-case.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAEhE,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,qBAAa,6BAA6B;IAC5B,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,EAAE,SAAS;IAEjD,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,4BAA4B;IAwEtD,OAAO,CAAC,sBAAsB;CAyB/B"}
|