@hexagen-monaco/sync 0.7.0 → 0.8.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/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 +342 -59
- 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/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/layer-folders.d.ts +7 -2
- package/dist/generators/layer-folders.d.ts.map +1 -1
- package/dist/generators/reap.d.ts.map +1 -1
- package/dist/index.js +155 -29
- package/dist/index.js.map +1 -1
- package/dist/linter.d.ts.map +1 -1
- package/dist/results.d.ts +8 -0
- package/dist/results.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 +1 -0
- package/dist/sync-engine.d.ts.map +1 -1
- package/dist/templates/agents-md/files/AGENTS.md +7 -5
- package/dist/templates/bedrock-agentcore-runtime/files/.github/workflows/deploy-agentcore.yml +1 -1
- package/dist/templates/ci-github-actions/files/.github/workflows/ci.yml +3 -3
- package/dist/templates/ci-github-actions/files/.github/workflows/deploy-fly.yml +1 -1
- package/dist/templates/ci-github-actions/files/.github/workflows/deploy-railway.yml +1 -1
- package/dist/templates/ci-github-actions/files/.github/workflows/deploy-vercel.yml +2 -2
- package/dist/templates/ci-github-actions/files/.github/workflows/preview.yml +2 -2
- package/dist/templates/docker/files/.github/workflows/docker-build.yml +1 -1
- 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/package.json +1 -1
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"}
|
package/dist/results.d.ts
CHANGED
|
@@ -62,6 +62,14 @@ export interface SyncRunSummary {
|
|
|
62
62
|
totalOps: number;
|
|
63
63
|
/** Generators that caught a failure into `result.error` this run. */
|
|
64
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;
|
|
65
73
|
durationMs: number;
|
|
66
74
|
}
|
|
67
75
|
/**
|
package/dist/results.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"results.d.ts","sourceRoot":"","sources":["../src/results.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,MAAM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O,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"}
|
|
@@ -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;AAK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@ -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)
|
|
@@ -31,9 +31,9 @@ jobs:
|
|
|
31
31
|
name: Build, Typecheck, Lint & Test
|
|
32
32
|
runs-on: ubuntu-latest
|
|
33
33
|
steps:
|
|
34
|
-
- uses: actions/checkout@
|
|
34
|
+
- uses: actions/checkout@v5
|
|
35
35
|
|
|
36
|
-
- uses: actions/setup-node@
|
|
36
|
+
- uses: actions/setup-node@v5
|
|
37
37
|
with:
|
|
38
38
|
node-version: "{node_version}"
|
|
39
39
|
# No `cache: yarn` here. setup-node's yarn cache runs the runner's
|
|
@@ -66,7 +66,7 @@ jobs:
|
|
|
66
66
|
# skipped on warm runs (cache_strategy = {cache_strategy}). Set TURBO_TOKEN
|
|
67
67
|
# and TURBO_TEAM below for the cross-run remote cache.
|
|
68
68
|
- name: Restore Turbo cache
|
|
69
|
-
uses: actions/cache@
|
|
69
|
+
uses: actions/cache@v5
|
|
70
70
|
with:
|
|
71
71
|
path: .turbo
|
|
72
72
|
key: ${{ runner.os }}-turbo-${{ github.sha }}
|
|
@@ -23,9 +23,9 @@ jobs:
|
|
|
23
23
|
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
|
|
24
24
|
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
|
|
25
25
|
steps:
|
|
26
|
-
- uses: actions/checkout@
|
|
26
|
+
- uses: actions/checkout@v5
|
|
27
27
|
|
|
28
|
-
- uses: actions/setup-node@
|
|
28
|
+
- uses: actions/setup-node@v5
|
|
29
29
|
with:
|
|
30
30
|
node-version: "{node_version}"
|
|
31
31
|
cache: "yarn"
|
|
@@ -29,9 +29,9 @@ jobs:
|
|
|
29
29
|
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
|
|
30
30
|
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
|
|
31
31
|
steps:
|
|
32
|
-
- uses: actions/checkout@
|
|
32
|
+
- uses: actions/checkout@v5
|
|
33
33
|
|
|
34
|
-
- uses: actions/setup-node@
|
|
34
|
+
- uses: actions/setup-node@v5
|
|
35
35
|
with:
|
|
36
36
|
node-version: "{node_version}"
|
|
37
37
|
# No `cache: yarn` here. setup-node's yarn cache runs the runner's
|
|
@@ -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.
|