@pattern-stack/codegen 0.12.0 → 0.12.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/CHANGELOG.md +30 -3
- package/dist/src/cli/index.js +26 -1
- package/dist/src/cli/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,30 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.12.1] — 2026-05-31
|
|
8
|
+
|
|
9
|
+
Track D (provider/adapter integration codegen) discoverability fix. The 0.12.0
|
|
10
|
+
generator wiring is correct and shipped — provider + adapter emission runs as a
|
|
11
|
+
post-step of `codegen entity new` whenever `definitions/providers/*.yaml` exist
|
|
12
|
+
— but nothing in the CLI surfaced that, so consumers searched `--help` for a
|
|
13
|
+
`provider` / `integration` / `gen` command, found none, and mistook a working
|
|
14
|
+
feature for a publish gap. Docs-and-help only; no generator behavior changed.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- **`codegen entity new --help`** now documents every post-generation step it
|
|
19
|
+
runs (event / bridge / orchestration / **provider + adapter (Track D)**
|
|
20
|
+
codegen), including Track D's trigger (`definitions/providers/*.yaml`), output
|
|
21
|
+
paths (`<backendSrc>/integrations/{providers,}`), emit-once semantics, and an
|
|
22
|
+
explicit note that there is no standalone `provider` / `integration` / `gen`
|
|
23
|
+
command — Track D is driven entirely by re-running `entity new`.
|
|
24
|
+
- **`codegen entity` summary hints** now surface a Track D regen hint when the
|
|
25
|
+
project has a providers directory — a discoverability path that does not
|
|
26
|
+
require reading `entity new --help`.
|
|
27
|
+
- **Integration domain skill** (`protocols-and-ports.md`, `SKILL.md`) documents
|
|
28
|
+
the Track D invocation, the skip-when-no-providers-dir behavior, and that the
|
|
29
|
+
generated scaffold (not the `.d.ts`) is ground truth for adapter port shape.
|
|
30
|
+
|
|
7
31
|
## [0.12.0] — 2026-05-31
|
|
8
32
|
|
|
9
33
|
Integration codegen retarget (RFC-0001): a **provider/adapter/surface** model
|
|
@@ -12,8 +36,11 @@ for integration codegen, plus a **surface-package framework**. Additive over
|
|
|
12
36
|
is unchanged. The one breaking item (the ADR-033.2 per-entity provider tuples)
|
|
13
37
|
has no consumers. Consumers adopt by adding `definitions/providers/*.yaml` and
|
|
14
38
|
regenerating. Ships alongside four independently-versioned **surface packages**
|
|
15
|
-
(`@pattern-stack/codegen-{crm,calendar,mail,transcript}`)
|
|
16
|
-
`0.1.0
|
|
39
|
+
(`@pattern-stack/codegen-{crm,calendar,mail,transcript}`) at `0.1.1`. (Their
|
|
40
|
+
initial `0.1.0` release peer-depended on `@pattern-stack/codegen` `^0.11.0`,
|
|
41
|
+
which predates the `./subsystems` export they require; `0.1.1` corrects the peer
|
|
42
|
+
to `^0.12.0`. The peer source fix merged with 0.12.0 but the version bump was
|
|
43
|
+
missed — this completes it.)
|
|
17
44
|
|
|
18
45
|
### ⚠ BREAKING CHANGES
|
|
19
46
|
|
|
@@ -41,7 +68,7 @@ regenerating. Ships alongside four independently-versioned **surface packages**
|
|
|
41
68
|
conformance helper (on the `/testing` subpath).
|
|
42
69
|
- **`@pattern-stack/codegen-{calendar,mail,transcript}`** — incremental-read
|
|
43
70
|
interaction surfaces (`CalendarPort` / `MailPort` / `TranscriptPort`,
|
|
44
|
-
canonical types, capability descriptors). Independently versioned (`0.1.
|
|
71
|
+
canonical types, capability descriptors). Independently versioned (`0.1.1`).
|
|
45
72
|
- **Track D — provider/adapter integration codegen (RFC-0001).**
|
|
46
73
|
- `definitions/providers/<provider>.yaml` — providers as first-class
|
|
47
74
|
declarative artifacts (slug, auth strategy, client, surfaces); Zod schema +
|
package/dist/src/cli/index.js
CHANGED
|
@@ -8740,20 +8740,45 @@ async function hints(ctx) {
|
|
|
8740
8740
|
}
|
|
8741
8741
|
];
|
|
8742
8742
|
}
|
|
8743
|
-
|
|
8743
|
+
const baseHints = [
|
|
8744
8744
|
{ command: "codegen entity new <file>", description: "Generate one entity" },
|
|
8745
8745
|
{ command: "codegen entity new --all", description: "Regenerate all entities" },
|
|
8746
8746
|
{ command: "codegen entity validate", description: "Validate YAML definitions" },
|
|
8747
8747
|
{ command: "codegen entity list", description: "List entities as a table" }
|
|
8748
8748
|
];
|
|
8749
|
+
const providersDir = ctx.config?.paths?.providers != null ? path13.resolve(
|
|
8750
|
+
ctx.cwd,
|
|
8751
|
+
ctx.config.paths.providers
|
|
8752
|
+
) : path13.resolve(ctx.cwd, "definitions/providers");
|
|
8753
|
+
if (fs9.existsSync(providersDir)) {
|
|
8754
|
+
baseHints.push({
|
|
8755
|
+
command: "codegen entity new --all",
|
|
8756
|
+
description: "Regenerate provider modules + adapter scaffolds (Track D)"
|
|
8757
|
+
});
|
|
8758
|
+
}
|
|
8759
|
+
return baseHints;
|
|
8749
8760
|
}
|
|
8750
8761
|
var EntityNewCommand = class extends Command2 {
|
|
8751
8762
|
static paths = [["entity", "new"]];
|
|
8752
8763
|
static usage = Command2.Usage({
|
|
8753
8764
|
description: "Generate code for one or more entities from YAML",
|
|
8765
|
+
details: `
|
|
8766
|
+
Generates Clean Architecture code for the named entity (or all entities with \`--all\`), then runs the post-generation codegen steps that share this entrypoint:
|
|
8767
|
+
|
|
8768
|
+
- **Event codegen** \u2014 \`AppDomainEvent\` union + typed bus from \`events/*.yaml\`.
|
|
8769
|
+
- **Bridge registry** \u2014 when the bridge subsystem is installed.
|
|
8770
|
+
- **Orchestration modules** \u2014 from orchestration patterns.
|
|
8771
|
+
- **Provider + adapter codegen (Track D, RFC-0001)** \u2014 when \`definitions/providers/*.yaml\` exist, emits one provider module per file into \`<backendSrc>/integrations/providers/\` and the matching adapter scaffolds + \`@generated\` files into \`<backendSrc>/integrations/\`. Author-owned scaffolds are emit-once (never overwritten); \`@generated\` files re-emit each run. With no providers dir the step is silently skipped.
|
|
8772
|
+
|
|
8773
|
+
There is no separate \`provider\`, \`integration\`, or \`gen\` command \u2014 Track D codegen is driven entirely by re-running \`entity new\`. The \`just gen\` / \`just gen-all\` recipes are thin wrappers over it.
|
|
8774
|
+
`,
|
|
8754
8775
|
examples: [
|
|
8755
8776
|
["Generate a single entity", "codegen entity new entities/contact.yaml"],
|
|
8756
8777
|
["Regenerate all entities", "codegen entity new --all"],
|
|
8778
|
+
[
|
|
8779
|
+
"Regenerate everything incl. provider/adapter codegen",
|
|
8780
|
+
"codegen entity new --all"
|
|
8781
|
+
],
|
|
8757
8782
|
["Preview without writing", "codegen entity new entities/contact.yaml --dry-run"]
|
|
8758
8783
|
]
|
|
8759
8784
|
});
|