@metaobjectsdev/codegen-ts 1.0.1 → 1.0.3
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/enum-shared.d.ts +9 -2
- package/dist/enum-shared.d.ts.map +1 -1
- package/dist/enum-shared.js +12 -3
- package/dist/enum-shared.js.map +1 -1
- package/dist/generator-registry.d.ts.map +1 -1
- package/dist/generator-registry.js +11 -1
- package/dist/generator-registry.js.map +1 -1
- package/dist/generator.d.ts +31 -1
- package/dist/generator.d.ts.map +1 -1
- package/dist/generator.js.map +1 -1
- package/dist/generators/entity-file.d.ts.map +1 -1
- package/dist/generators/entity-file.js +4 -1
- package/dist/generators/entity-file.js.map +1 -1
- package/dist/generators/index.d.ts +1 -0
- package/dist/generators/index.d.ts.map +1 -1
- package/dist/generators/index.js +5 -0
- package/dist/generators/index.js.map +1 -1
- package/dist/generators/shared-model-file.d.ts +23 -0
- package/dist/generators/shared-model-file.d.ts.map +1 -0
- package/dist/generators/shared-model-file.js +235 -0
- package/dist/generators/shared-model-file.js.map +1 -0
- package/dist/runner.d.ts +9 -0
- package/dist/runner.d.ts.map +1 -1
- package/dist/runner.js +15 -1
- package/dist/runner.js.map +1 -1
- package/dist/templates/enums-file.d.ts +11 -1
- package/dist/templates/enums-file.d.ts.map +1 -1
- package/dist/templates/enums-file.js +10 -2
- package/dist/templates/enums-file.js.map +1 -1
- package/package.json +6 -6
- package/src/enum-shared.ts +17 -3
- package/src/generator-registry.ts +11 -0
- package/src/generator.ts +31 -1
- package/src/generators/entity-file.ts +7 -1
- package/src/generators/index.ts +11 -0
- package/src/generators/shared-model-file.ts +292 -0
- package/src/reference/entity.ts +10 -1
- package/src/runner.ts +28 -1
- package/src/templates/enums-file.ts +13 -2
package/dist/enum-shared.d.ts
CHANGED
|
@@ -23,10 +23,17 @@ export declare function sharedEnumForField(field: MetaField): SharedEnum | undef
|
|
|
23
23
|
* actually CONSUMED by at least one concrete entity field — keyed by the
|
|
24
24
|
* materialized type name. A declaration nobody extends is not materialized (no
|
|
25
25
|
* dangling type). Deterministic order: first-consumption order across entities.
|
|
26
|
+
*
|
|
27
|
+
* `select` (FR-023 §11.1 item 2), when given, narrows which CONSUMING entities
|
|
28
|
+
* count toward "is this enum used" — an entity for which `select(entity.
|
|
29
|
+
* resolutionKey())` is false contributes nothing, even if it extends the shared
|
|
30
|
+
* declaration. It does not touch which declarations EXIST, only which usages are
|
|
31
|
+
* counted. Absent `select` ⇒ every entity counts, byte-identical to before this
|
|
32
|
+
* parameter existed.
|
|
26
33
|
*/
|
|
27
|
-
export declare function collectSharedEnums(root: MetaRoot): Map<string, SharedEnum>;
|
|
34
|
+
export declare function collectSharedEnums(root: MetaRoot, select?: (fqn: string) => boolean): Map<string, SharedEnum>;
|
|
28
35
|
/** The shared enums that metaobjects MATERIALIZES (non-@provided, consumed). */
|
|
29
|
-
export declare function materializedSharedEnums(root: MetaRoot): SharedEnum[];
|
|
36
|
+
export declare function materializedSharedEnums(root: MetaRoot, select?: (fqn: string) => boolean): SharedEnum[];
|
|
30
37
|
/** Whether any shared enum (materialized or provided) is consumed in the model. */
|
|
31
38
|
export declare function hasSharedEnums(root: MetaRoot): boolean;
|
|
32
39
|
//# sourceMappingURL=enum-shared.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enum-shared.d.ts","sourceRoot":"","sources":["../src/enum-shared.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AASpE,qFAAqF;AACrF,MAAM,WAAW,UAAU;IACzB,qGAAqG;IACrG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,yCAAyC;IACzC,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IAC1B,0FAA0F;IAC1F,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,CAU7E;AAED,qFAAqF;AACrF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAgB3E;AAED
|
|
1
|
+
{"version":3,"file":"enum-shared.d.ts","sourceRoot":"","sources":["../src/enum-shared.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AASpE,qFAAqF;AACrF,MAAM,WAAW,UAAU;IACzB,qGAAqG;IACrG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,yCAAyC;IACzC,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IAC1B,0FAA0F;IAC1F,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,CAU7E;AAED,qFAAqF;AACrF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAgB3E;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,QAAQ,EACd,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,GAChC,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAWzB;AAED,gFAAgF;AAChF,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,QAAQ,EACd,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,GAChC,UAAU,EAAE,CAEd;AAED,mFAAmF;AACnF,wBAAgB,cAAc,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAEtD"}
|
package/dist/enum-shared.js
CHANGED
|
@@ -64,10 +64,19 @@ export function sharedEnumForField(field) {
|
|
|
64
64
|
* actually CONSUMED by at least one concrete entity field — keyed by the
|
|
65
65
|
* materialized type name. A declaration nobody extends is not materialized (no
|
|
66
66
|
* dangling type). Deterministic order: first-consumption order across entities.
|
|
67
|
+
*
|
|
68
|
+
* `select` (FR-023 §11.1 item 2), when given, narrows which CONSUMING entities
|
|
69
|
+
* count toward "is this enum used" — an entity for which `select(entity.
|
|
70
|
+
* resolutionKey())` is false contributes nothing, even if it extends the shared
|
|
71
|
+
* declaration. It does not touch which declarations EXIST, only which usages are
|
|
72
|
+
* counted. Absent `select` ⇒ every entity counts, byte-identical to before this
|
|
73
|
+
* parameter existed.
|
|
67
74
|
*/
|
|
68
|
-
export function collectSharedEnums(root) {
|
|
75
|
+
export function collectSharedEnums(root, select) {
|
|
69
76
|
const out = new Map();
|
|
70
77
|
for (const entity of root.objects()) {
|
|
78
|
+
if (select !== undefined && !select(entity.resolutionKey()))
|
|
79
|
+
continue;
|
|
71
80
|
for (const field of entity.fields()) {
|
|
72
81
|
const shared = sharedEnumForField(field);
|
|
73
82
|
if (shared === undefined)
|
|
@@ -79,8 +88,8 @@ export function collectSharedEnums(root) {
|
|
|
79
88
|
return out;
|
|
80
89
|
}
|
|
81
90
|
/** The shared enums that metaobjects MATERIALIZES (non-@provided, consumed). */
|
|
82
|
-
export function materializedSharedEnums(root) {
|
|
83
|
-
return [...collectSharedEnums(root).values()].filter((e) => !e.provided);
|
|
91
|
+
export function materializedSharedEnums(root, select) {
|
|
92
|
+
return [...collectSharedEnums(root, select).values()].filter((e) => !e.provided);
|
|
84
93
|
}
|
|
85
94
|
/** Whether any shared enum (materialized or provided) is consumed in the model. */
|
|
86
95
|
export function hasSharedEnums(root) {
|
package/dist/enum-shared.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enum-shared.js","sourceRoot":"","sources":["../src/enum-shared.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,EAAE;AACF,8EAA8E;AAC9E,4EAA4E;AAC5E,6EAA6E;AAC7E,oDAAoD;AACpD,EAAE;A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CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;AACnF,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,cAAc,CAAC,IAAc;IAC3C,OAAO,kBAAkB,CAAC,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC;AAC3C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator-registry.d.ts","sourceRoot":"","sources":["../src/generator-registry.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"generator-registry.d.ts","sourceRoot":"","sources":["../src/generator-registry.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAyBhD,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEjD,MAAM,WAAW,sBAAsB;IACrC,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,4DAA4D;IAC5D,WAAW,EAAE,MAAM,CAAC;IACpB,8EAA8E;IAC9E,IAAI,EAAE,aAAa,CAAC;IACpB,kFAAkF;IAClF,OAAO,EAAE,MAAM,SAAS,CAAC;IACzB,sDAAsD;IACtD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6EAA6E;IAC7E,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAeD,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAuIpE,CAAC;AAEF,iFAAiF;AACjF,wBAAgB,cAAc,IAAI,sBAAsB,EAAE,CAQzD;AAED,2EAA2E;AAC3E,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,sBAAsB,GAAG,SAAS,CAE3E"}
|
|
@@ -23,7 +23,7 @@ import { entityFile } from "./generators/entity-file.js";
|
|
|
23
23
|
import { queriesFile } from "./generators/queries-file.js";
|
|
24
24
|
import { routesFile } from "./generators/routes-file.js";
|
|
25
25
|
import { barrel } from "./generators/barrel.js";
|
|
26
|
-
import { callableFile, routesFileHono, namesFile, mermaidErDiagram, promptRender, outputParser, extractor, outputPrompt, renderHelper, apiDocsFile, docsFile, templateGenerator, traceHelperFile, } from "./generators/index.js";
|
|
26
|
+
import { callableFile, routesFileHono, namesFile, mermaidErDiagram, promptRender, outputParser, extractor, outputPrompt, renderHelper, apiDocsFile, docsFile, templateGenerator, traceHelperFile, sharedModelFile, } from "./generators/index.js";
|
|
27
27
|
// The `template` generator is a PRIMITIVE: callers supply { name, walk,
|
|
28
28
|
// template }. For registry identity + `--list` we expose a no-op default so the
|
|
29
29
|
// factory constructs a valid Generator without throwing; real use passes opts
|
|
@@ -143,6 +143,16 @@ export const generatorRegistry = {
|
|
|
143
143
|
factory: () => traceHelperFile(),
|
|
144
144
|
options: "outDir?, target?",
|
|
145
145
|
},
|
|
146
|
+
"shared-model": {
|
|
147
|
+
name: "shared-model",
|
|
148
|
+
description: "FR-023: a publisher's flattened shared-model artifact + manifest for a consumer's `meta deps sync`.",
|
|
149
|
+
tier: "native",
|
|
150
|
+
// `name`/`include` are required at run time (an empty include matches
|
|
151
|
+
// everything, so a placeholder here constructs without throwing — real use
|
|
152
|
+
// always supplies both, same as `template`'s templatePrimitive() above).
|
|
153
|
+
factory: () => sharedModelFile({ name: "shared-model", include: [] }),
|
|
154
|
+
options: "name, include, exclude?, files?, version?, target?",
|
|
155
|
+
},
|
|
146
156
|
// ----- Tier-2 neutral (owned by the `meta docs` engine — D1 / ADR-0020) ---
|
|
147
157
|
docs: {
|
|
148
158
|
name: "docs",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator-registry.js","sourceRoot":"","sources":["../src/generator-registry.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,EAAE;AACF,4EAA4E;AAC5E,gFAAgF;AAChF,8EAA8E;AAC9E,4EAA4E;AAC5E,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E,GAAG,EAAE,CAAC,QAAQ,EAAE;QACzB,IAAI,EAAE,8HAA8H;KACrI;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,sDAAsD;QACnE,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,GAAG,EAAE,CAAC,gBAAgB,EAAE;QACjC,IAAI,EAAE,8HAA8H;KACrI;CACF,CAAC;AAEF,iFAAiF;AACjF,MAAM,UAAU,cAAc;IAC5B,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;IACjD,MAAM,MAAM,GAAG,CAAC,CAAyB,EAAE,CAAyB,EAAE,EAAE,CACtE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAC/B,OAAO;QACL,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;QAC1D,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;KAC5D,CAAC;AACJ,CAAC;AAED,2EAA2E;AAC3E,MAAM,UAAU,YAAY,CAAC,EAAU;IACrC,OAAO,iBAAiB,CAAC,EAAE,CAAC,CAAC;AAC/B,CAAC"}
|
package/dist/generator.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MetaObject, MetaRoot } from "@metaobjectsdev/metadata";
|
|
1
|
+
import type { MetaObject, MetaRoot, TypeRegistry } from "@metaobjectsdev/metadata";
|
|
2
2
|
import type { RenderContext } from "./render-context.js";
|
|
3
3
|
import type { ResolvedGenConfig } from "./metaobjects-config.js";
|
|
4
4
|
import type { OrphanPolicy } from "./reconcile-orphans.js";
|
|
@@ -17,6 +17,16 @@ export interface GenContext {
|
|
|
17
17
|
* filter is set). Always call this from helpers; do not call generator.filter
|
|
18
18
|
* directly. */
|
|
19
19
|
matches: (entity: MetaObject) => boolean;
|
|
20
|
+
/** FR-023 §11.1 item 2 — the model-wide output-scope predicate over a node's
|
|
21
|
+
* `resolutionKey()` (the runner's own `RunGenOpts.scope`, verbatim). A
|
|
22
|
+
* DIFFERENT knob from `matches`: `matches` is the per-generator `filter`
|
|
23
|
+
* (ANDed into what THIS generator emits), while `select` is the whole-model
|
|
24
|
+
* scope every generator shares — for a template that renders once over
|
|
25
|
+
* `ctx.loadedRoot` rather than per-entity (the shared-enums module is the
|
|
26
|
+
* first such template), `matches` never runs at all, so that template must
|
|
27
|
+
* read `select` directly to honour the same exclusion. Undefined ⇒ every
|
|
28
|
+
* node is in scope, byte-identical to a project with no `scope` declared. */
|
|
29
|
+
select?: (fqn: string) => boolean;
|
|
20
30
|
config: ResolvedGenConfig;
|
|
21
31
|
/** Pre-built by the runner for built-in generators that wrap existing
|
|
22
32
|
* templates. Third-party generators typically don't need this. Always
|
|
@@ -32,6 +42,26 @@ export interface GenContext {
|
|
|
32
42
|
* in a sub-directory. Undefined only when the runner was driven
|
|
33
43
|
* programmatically without an explicit projectRoot. */
|
|
34
44
|
projectRoot?: string;
|
|
45
|
+
/**
|
|
46
|
+
* FR-023 §4.3 — the run's composed registry (core providers plus whatever this
|
|
47
|
+
* project's `metaobjects.config.ts` `providers` adds), filled by the runner. The
|
|
48
|
+
* SAME vocabulary `opts.metadata` was loaded with. `sharedModelFile()`'s
|
|
49
|
+
* standalone re-loads of a `files` subset use this so a publisher project's own
|
|
50
|
+
* consumer-supplied vocabulary is honoured identically to the main load. Optional
|
|
51
|
+
* on the type so tests and custom callers don't need a placeholder; always
|
|
52
|
+
* present at run time when invoked via `runGen()`.
|
|
53
|
+
*/
|
|
54
|
+
registry?: TypeRegistry;
|
|
55
|
+
/**
|
|
56
|
+
* FR-023 §4.3 — the collection's own source files (never a dependency's
|
|
57
|
+
* artifact), filled by the runner from `RunGenOpts.sourceFiles`. Distinct from
|
|
58
|
+
* `loadedRoot`, which is already fully loaded and merged: `sharedModelFile()`
|
|
59
|
+
* needs the raw file LIST so it can re-load a `files:`-narrowed subset of it
|
|
60
|
+
* standalone. Undefined when the caller never supplied `RunGenOpts.sourceFiles`
|
|
61
|
+
* (a generator relying on it should default sensibly, as `sharedModelFile()`'s
|
|
62
|
+
* own `files` option does).
|
|
63
|
+
*/
|
|
64
|
+
sourceFiles?: readonly string[];
|
|
35
65
|
warn: (msg: string) => void;
|
|
36
66
|
}
|
|
37
67
|
export interface Generator {
|
package/dist/generator.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../src/generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../src/generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACnF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAG3D,MAAM,WAAW,WAAW;IAC1B,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,OAAO,EAAE,MAAM,CAAC;IAChB,8EAA8E;IAC9E,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB,UAAU,EAAE,QAAQ,CAAC;IACrB;;oBAEgB;IAChB,OAAO,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC;IACz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M,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,KACpC,WAAW,GACX,WAAW,EAAE,GACb,OAAO,CAAC,WAAW,GAAG,WAAW,EAAE,CAAC,GACvC,CAAC,GAAG,EAAE,UAAU,KAAK,OAAO,CAAC,WAAW,EAAE,CAAC,CAM7C;AAED;;qFAEqF;AACrF,wBAAgB,UAAU,CACxB,EAAE,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,EAAE,GAAG,EAAE,UAAU,KACxC,WAAW,GACX,WAAW,EAAE,GACb,OAAO,CAAC,WAAW,GAAG,WAAW,EAAE,CAAC,GACvC,CAAC,GAAG,EAAE,UAAU,KAAK,OAAO,CAAC,WAAW,EAAE,CAAC,CAM7C;AAED;oFACoF;AACpF,eAAO,MAAM,QAAQ,mBAAa,CAAC;AAEnC;;;uCAGuC;AACvC,wBAAgB,UAAU,CACxB,EAAE,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,GAAG,EAAE,UAAU,KACrD,WAAW,GACX,WAAW,EAAE,GACb,OAAO,CAAC,WAAW,GAAG,WAAW,EAAE,CAAC,GACvC,CAAC,GAAG,EAAE,UAAU,KAAK,OAAO,CAAC,WAAW,EAAE,CAAC,CAiB7C"}
|
package/dist/generator.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../src/generator.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../src/generator.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAqHnD,mDAAmD;AACnD,MAAM,UAAU,SAAS,CACvB,EAGwC;IAExC,OAAO,KAAK,EAAE,GAAG,EAAE,EAAE;QACnB,MAAM,OAAO,GAAG,GAAG,CAAC,QAAQ,CAAC,MAAM,CAA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ts","sourceRoot":"","sources":["../../src/generators/entity-file.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAgE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAQtH,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;;;;;;;;OAaG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,UAAU,EAuDlB,gBAAgB,CAAC,cAAc,CAAC,CAAC"}
|
|
@@ -36,7 +36,10 @@ export const entityFile = function entityFile(opts) {
|
|
|
36
36
|
// FR-019: emit the shared-enums module ONCE per run, into the entity-module
|
|
37
37
|
// target root. Returns null (no file) when the model uses no materialized
|
|
38
38
|
// shared enums — keeping the inline-enum default byte-identical (no new file).
|
|
39
|
-
|
|
39
|
+
// FR-023 §11.1 item 2: `select` (never `ctx.matches` — this renders from the
|
|
40
|
+
// WHOLE root, not this generator's filtered subset) excludes an enum used
|
|
41
|
+
// only by an imported, out-of-scope entity.
|
|
42
|
+
const sharedEnums = renderSharedEnumsFile(ctx.loadedRoot, ctx.select !== undefined ? { select: ctx.select } : undefined);
|
|
40
43
|
if (sharedEnums !== null) {
|
|
41
44
|
files.push({
|
|
42
45
|
path: `${SHARED_ENUMS_BASENAME}.ts`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-file.js","sourceRoot":"","sources":["../../src/generators/entity-file.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAA4E,MAAM,iBAAiB,CAAC;AACtH,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAC1F,OAAO,EAAE,QAAQ,EAAE,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CAAC;IACjC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAqC,CAAC"}
|
|
@@ -14,6 +14,7 @@ export { apiDocsFile, type ApiDocsFileOpts } from "./api-docs-file.js";
|
|
|
14
14
|
export { docsFile, type DocsFileOpts } from "./docs-file.js";
|
|
15
15
|
export { templateGenerator, type TemplateGeneratorOpts, type TemplateWalkResult, type TemplateFormat, } from "./template-generator.js";
|
|
16
16
|
export { traceHelperFile, type TraceHelperOpts } from "./trace-helper-file.js";
|
|
17
|
+
export { sharedModelFile, type SharedModelFileOpts, MANIFEST_FILE as SHARED_MODEL_MANIFEST_FILE, ARTIFACT_SUFFIX as SHARED_MODEL_ARTIFACT_SUFFIX, INTEGRITY_PREFIX as SHARED_MODEL_INTEGRITY_PREFIX, } from "./shared-model-file.js";
|
|
17
18
|
export type { EntityDocData, StorageFieldDoc, IdentityDoc, RelationshipDoc, UsedByDoc, ConstraintRow, } from "./docs-data.js";
|
|
18
19
|
export { buildEntityDocData } from "./docs-data-builder.js";
|
|
19
20
|
export type { TemplateDocData, TemplateOutputPart } from "./template-doc-data.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generators/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,YAAY,EAAE,KAAK,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,KAAK,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,gIAAgI;AAChI,OAAO,EAAE,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAE,SAA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,6 +29,11 @@ export { apiDocsFile } from "./api-docs-file.js";
|
|
|
29
29
|
export { docsFile } from "./docs-file.js";
|
|
30
30
|
export { templateGenerator, } from "./template-generator.js";
|
|
31
31
|
export { traceHelperFile } from "./trace-helper-file.js";
|
|
32
|
+
// FR-023 §4.3 — the publisher's flattened shared-model artifact + manifest generator.
|
|
33
|
+
// The three tool-file constants are re-exported alongside it purely so a `cli`
|
|
34
|
+
// test can assert they stay byte-equal to sdk's canonical copies (see that
|
|
35
|
+
// module's own comment for why codegen-ts can't just import sdk directly).
|
|
36
|
+
export { sharedModelFile, MANIFEST_FILE as SHARED_MODEL_MANIFEST_FILE, ARTIFACT_SUFFIX as SHARED_MODEL_ARTIFACT_SUFFIX, INTEGRITY_PREFIX as SHARED_MODEL_INTEGRITY_PREFIX, } from "./shared-model-file.js";
|
|
32
37
|
export { buildEntityDocData } from "./docs-data-builder.js";
|
|
33
38
|
export { buildTemplateDocData } from "./template-doc-builder.js";
|
|
34
39
|
// FR-038 — requirement-derived test stubs. The factory is a convenience; the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generators/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,EAAE;AACF,0FAA0F;AAC1F,2FAA2F;AAC3F,2FAA2F;AAC3F,2FAA2F;AAC3F,oFAAoF;AACpF,uFAAuF;AACvF,EAAE;AACF,0FAA0F;AAC1F,uFAAuF;AACvF,2FAA2F;AAC3F,wFAAwF;AACxF,iEAAiE;AACjE,2DAA2D;AAE3D,OAAO,EAAE,YAAY,EAAyB,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,cAAc,EAA2B,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,gIAAgI;AAChI,OAAO,EAAE,gBAAgB,EAAyB,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAyB,MAAM,yBAAyB,CA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AAC;AAC9E,oKAAoK;AACpK,OAAO,EAAE,WAAW,EAAwB,MAAM,oBAAoB,CAAC;AACvE,iJAAiJ;AACjJ,OAAO,EAAE,QAAQ,EAAqB,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EACL,iBAAiB,GAIlB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,eAAe,EAAwB,MAAM,wBAAwB,CAAC;AAC/E,sFAAsF;AACtF,+EAA+E;AAC/E,2EAA2E;AAC3E,2EAA2E;AAC3E,OAAO,EACL,eAAe,EAEf,aAAa,IAAI,0BAA0B,EAC3C,eAAe,IAAI,4BAA4B,EAC/C,gBAAgB,IAAI,6BAA6B,GAClD,MAAM,wBAAwB,CAAC;AAShC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,6EAA6E;AAC7E,8EAA8E;AAC9E,wEAAwE;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,qFAAqF;AACrF,wDAAwD;AACxD,OAAO,EAAE,aAAa,EAA0B,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type Generator } from "../generator.js";
|
|
2
|
+
export declare const MANIFEST_FILE = "metaobjects.pkg.json";
|
|
3
|
+
export declare const ARTIFACT_SUFFIX = ".metaobjects.json";
|
|
4
|
+
export declare const INTEGRITY_PREFIX = "sha256-";
|
|
5
|
+
export interface SharedModelFileOpts {
|
|
6
|
+
/** The dependency key a consumer will `meta deps sync` under. Also the artifact's
|
|
7
|
+
* basename: emits `<name>.metaobjects.json`. */
|
|
8
|
+
name: string;
|
|
9
|
+
/** Scope-pattern include list (the same `acme::platform::**` grammar as `scope`). */
|
|
10
|
+
include: readonly string[];
|
|
11
|
+
/** Applied after `include`. */
|
|
12
|
+
exclude?: readonly string[];
|
|
13
|
+
/** Which of the publisher's own source files may contribute. Default: the run's
|
|
14
|
+
* own source files (`ctx.sourceFiles` — everything `files?` narrows). */
|
|
15
|
+
files?: readonly string[];
|
|
16
|
+
/** The published version. Default: the nearest `package.json` `version` walking
|
|
17
|
+
* up from `ctx.projectRoot`. */
|
|
18
|
+
version?: string;
|
|
19
|
+
/** Named output target, as on every other generator. */
|
|
20
|
+
target?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare function sharedModelFile(opts: SharedModelFileOpts): Generator;
|
|
23
|
+
//# sourceMappingURL=shared-model-file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared-model-file.d.ts","sourceRoot":"","sources":["../../src/generators/shared-model-file.ts"],"names":[],"mappings":"AA6CA,OAAO,EAAc,KAAK,SAAS,EAAqC,MAAM,iBAAiB,CAAC;AAWhG,eAAO,MAAM,aAAa,yBAAyB,CAAC;AACpD,eAAO,MAAM,eAAe,sBAAsB,CAAC;AACnD,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAmB1C,MAAM,WAAW,mBAAmB;IAClC;qDACiD;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,qFAAqF;IACrF,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,+BAA+B;IAC/B,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B;8EAC0E;IAC1E,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B;qCACiC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wDAAwD;IACxD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAiGD,wBAAgB,eAAe,CAAC,IAAI,EAAE,mBAAmB,GAAG,SAAS,CAqGpE"}
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
// FR-023 §4.3 — sharedModelFile(): the publisher's flattened shared-model artifact.
|
|
2
|
+
//
|
|
3
|
+
// A publisher project wires this generator to select a subset of its own metadata
|
|
4
|
+
// (by the same include/exclude scope-pattern grammar `scope` already uses) and emit
|
|
5
|
+
// it as ONE canonical-JSON `metadata.root` document plus a manifest — the artifact a
|
|
6
|
+
// consumer's `meta deps sync` copies into its own repo (design §2.2, §3.2, §3.5).
|
|
7
|
+
//
|
|
8
|
+
// The algorithm (design §4.3), in order:
|
|
9
|
+
// 1. Standalone load of `files` (default: the run's own source files, `ctx.sourceFiles`)
|
|
10
|
+
// with `ctx.registry` (the run's composed registry — the SAME vocabulary the
|
|
11
|
+
// project's own metadata loaded with), strict.
|
|
12
|
+
// 2. Select top-level nodes: never `requirement.*` / `template.*` (a publisher's
|
|
13
|
+
// ledger and prompts are not a consumer's shapes), and matching the compiled
|
|
14
|
+
// include/exclude scope.
|
|
15
|
+
// 3. Closure check: every `extends` target and every REF_BEARING_ATTR_NAMES value
|
|
16
|
+
// of a selected node (and of its own descendants) must resolve to a SELECTED
|
|
17
|
+
// node, else the selection is not self-contained and the build fails naming the
|
|
18
|
+
// (referrer, target) pairs.
|
|
19
|
+
// 4. Serialize the selection with `serializeSharedDocument` — raw own-layer form,
|
|
20
|
+
// `extends` preserved, sorted by resolution key.
|
|
21
|
+
// 5. Re-load the emitted document standalone with CORE providers only, strict — a
|
|
22
|
+
// consumer loads it with ITS providers, and a Phase 1 export must not need the
|
|
23
|
+
// publisher's non-core vocabulary.
|
|
24
|
+
// 6. Emit `<name>.metaobjects.json` + `metaobjects.pkg.json` (design §3.2).
|
|
25
|
+
import { createHash } from "node:crypto";
|
|
26
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
27
|
+
import { dirname, join } from "node:path";
|
|
28
|
+
import { MetaDataLoader, InMemoryStringSource, compileScope, matchesScope, REF_BEARING_ATTR_NAMES, resolveObjectRef, serializeSharedDocument, packageOfResolutionKey, PACKAGE_SEPARATOR, CHILD_REF_SEPARATOR, TYPE_REQUIREMENT, TYPE_TEMPLATE, METAMODEL_VERSION, } from "@metaobjectsdev/metadata";
|
|
29
|
+
import { FileSource } from "@metaobjectsdev/metadata/core";
|
|
30
|
+
import { oncePerRun } from "../generator.js";
|
|
31
|
+
import { effectivePackage } from "../docs-paths.js";
|
|
32
|
+
// The FR-023 manifest/artifact tool-file conventions (design §3.2, §4.3, "Hash
|
|
33
|
+
// format"). Their single canonical source is `sdk/src/dependencies.ts`
|
|
34
|
+
// (`MANIFEST_FILE`, `ARTIFACT_SUFFIX`, `INTEGRITY_PREFIX`) — codegen-ts cannot
|
|
35
|
+
// import sdk (the dependency runs the other way: `cli` depends on both, design
|
|
36
|
+
// §4.3's closing note), so these mirror those values locally. Keep in sync —
|
|
37
|
+
// exported (not merely local) so `cli`, which depends on both packages, can
|
|
38
|
+
// assert equality against `sdk`'s exports in a test; see
|
|
39
|
+
// `cli/test/shared-model-constants-parity.test.ts`.
|
|
40
|
+
export const MANIFEST_FILE = "metaobjects.pkg.json";
|
|
41
|
+
export const ARTIFACT_SUFFIX = ".metaobjects.json";
|
|
42
|
+
export const INTEGRITY_PREFIX = "sha256-";
|
|
43
|
+
/** design §3.2 — the manifest schema's own version, distinct from `metamodelVersion`. */
|
|
44
|
+
const MANIFEST_SCHEMA_VERSION = 1;
|
|
45
|
+
/**
|
|
46
|
+
* Separator for `checkClosure`'s dedupe key. A resolution key never contains a NUL,
|
|
47
|
+
* so this cannot collide with either half it joins — unlike a printable separator
|
|
48
|
+
* (`->`, `→`), which would need a separate argument for why no legal FQN could ever
|
|
49
|
+
* contain it. Written as the `\0` ESCAPE, never a raw control byte: a raw 0x00 in
|
|
50
|
+
* this source file previously made `git` treat it as binary, which (a) makes
|
|
51
|
+
* `git diff`/GitHub show no content for the file at all, and (b) more seriously,
|
|
52
|
+
* makes `.githooks/pre-commit`'s public-repo-hygiene grep skip its added lines
|
|
53
|
+
* entirely (a binary file's diff is never text-enumerated) — silently defeating that
|
|
54
|
+
* guard for any future edit to this file. The escape produces the byte-identical
|
|
55
|
+
* runtime string; only the SOURCE FILE's byte content changes (readable text instead
|
|
56
|
+
* of an embedded control byte).
|
|
57
|
+
*/
|
|
58
|
+
const DEDUPE_KEY_SEPARATOR = "\0";
|
|
59
|
+
/** Everything before the first `CHILD_REF_SEPARATOR` that follows the LAST
|
|
60
|
+
* `PACKAGE_SEPARATOR` — the object part of a possibly dotted ref (ADR-0029's
|
|
61
|
+
* addressing model: package segments never fold onto a non-root child, so a
|
|
62
|
+
* `.` before the final `::`-segment can't occur). Mirrors the private
|
|
63
|
+
* `splitChildTail` in `naming-refs.ts` (not exported); `extends` and the
|
|
64
|
+
* origin `@from`/`@of`/`@via` attrs are the only REF_BEARING_ATTR_NAMES that
|
|
65
|
+
* can carry a dotted child tail — every other ref-bearing attr is already a
|
|
66
|
+
* bare object ref, and stripping a tail that isn't there is a no-op. */
|
|
67
|
+
function refOwner(ref) {
|
|
68
|
+
const lastSep = ref.lastIndexOf(PACKAGE_SEPARATOR);
|
|
69
|
+
const segStart = lastSep === -1 ? 0 : lastSep + PACKAGE_SEPARATOR.length;
|
|
70
|
+
const dotInSeg = ref.indexOf(CHILD_REF_SEPARATOR, segStart);
|
|
71
|
+
return dotInSeg === -1 ? ref : ref.slice(0, dotInSeg);
|
|
72
|
+
}
|
|
73
|
+
/** Depth-first walk of a node and its OWN descendants, node itself first. ADR-0039
|
|
74
|
+
* sanctioned own-only case: `serializeSharedDocument` emits each selected node's
|
|
75
|
+
* OWN layer only (`extends` preserved, not flattened — design §3.5), so the
|
|
76
|
+
* closure check must walk exactly what will be emitted, never what `extends`
|
|
77
|
+
* would additionally contribute (that is the base's own layer, checked
|
|
78
|
+
* separately if the base is itself selected). */
|
|
79
|
+
function walkOwn(node) {
|
|
80
|
+
const out = [node];
|
|
81
|
+
for (const child of node.ownChildren())
|
|
82
|
+
out.push(...walkOwn(child));
|
|
83
|
+
return out;
|
|
84
|
+
}
|
|
85
|
+
/** design §4.3 step 3. `standaloneRoot` already loaded successfully (step 1), so
|
|
86
|
+
* every ref found here is guaranteed to RESOLVE to some node in it — the loader's
|
|
87
|
+
* own validation passes reject a dangling `extends`/object-ref before this ever
|
|
88
|
+
* runs. What is NOT guaranteed is that the resolved node is in `selectedKeys`. */
|
|
89
|
+
function checkClosure(standaloneRoot, selected, selectedKeys) {
|
|
90
|
+
const pairs = [];
|
|
91
|
+
const seen = new Set();
|
|
92
|
+
for (const top of selected) {
|
|
93
|
+
const referrerKey = top.resolutionKey();
|
|
94
|
+
for (const node of walkOwn(top)) {
|
|
95
|
+
const referrerPkg = effectivePackage(node) ?? "";
|
|
96
|
+
const candidates = [];
|
|
97
|
+
if (node.superRef !== undefined)
|
|
98
|
+
candidates.push(node.superRef);
|
|
99
|
+
// ADR-0039 sanctioned own-only case (same rationale as walkOwn() above): an
|
|
100
|
+
// INHERITED ref-bearing attr belongs to the base node's own layer, not this
|
|
101
|
+
// one's, and is checked when the base itself is walked — reading it via the
|
|
102
|
+
// resolving `attr()` here would attribute the base's reference to this node.
|
|
103
|
+
for (const attrName of REF_BEARING_ATTR_NAMES) {
|
|
104
|
+
const value = node.ownAttr(attrName);
|
|
105
|
+
if (typeof value === "string")
|
|
106
|
+
candidates.push(value);
|
|
107
|
+
}
|
|
108
|
+
for (const raw of candidates) {
|
|
109
|
+
const resolved = resolveObjectRef(standaloneRoot, refOwner(raw), referrerPkg).node;
|
|
110
|
+
if (resolved === undefined)
|
|
111
|
+
continue; // already validated at load — defensive only
|
|
112
|
+
const targetKey = resolved.resolutionKey();
|
|
113
|
+
if (selectedKeys.has(targetKey))
|
|
114
|
+
continue;
|
|
115
|
+
const dedupeKey = `${referrerKey}${DEDUPE_KEY_SEPARATOR}${targetKey}`;
|
|
116
|
+
if (seen.has(dedupeKey))
|
|
117
|
+
continue;
|
|
118
|
+
seen.add(dedupeKey);
|
|
119
|
+
pairs.push({ referrer: referrerKey, target: targetKey });
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return pairs.sort((a, b) => a.referrer === b.referrer ? a.target.localeCompare(b.target) : a.referrer.localeCompare(b.referrer));
|
|
124
|
+
}
|
|
125
|
+
/** design §2.2 — "version defaults to the host package's version". Walks up from
|
|
126
|
+
* `startDir` for the nearest `package.json` carrying a string `version`. */
|
|
127
|
+
function nearestPackageVersion(startDir) {
|
|
128
|
+
let dir = startDir;
|
|
129
|
+
for (let i = 0; i < 64; i++) {
|
|
130
|
+
const pkgPath = join(dir, "package.json");
|
|
131
|
+
if (existsSync(pkgPath)) {
|
|
132
|
+
try {
|
|
133
|
+
const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
|
|
134
|
+
if (typeof pkg.version === "string")
|
|
135
|
+
return pkg.version;
|
|
136
|
+
}
|
|
137
|
+
catch {
|
|
138
|
+
// An unparsable package.json is not a version source — keep walking up.
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
const parent = dirname(dir);
|
|
142
|
+
if (parent === dir)
|
|
143
|
+
return undefined;
|
|
144
|
+
dir = parent;
|
|
145
|
+
}
|
|
146
|
+
return undefined;
|
|
147
|
+
}
|
|
148
|
+
export function sharedModelFile(opts) {
|
|
149
|
+
const generator = {
|
|
150
|
+
name: "shared-model",
|
|
151
|
+
generate: oncePerRun(async (_entities, ctx) => {
|
|
152
|
+
const files = opts.files ?? ctx.sourceFiles ?? [];
|
|
153
|
+
if (files.length === 0) {
|
|
154
|
+
throw new Error(`sharedModelFile("${opts.name}"): no source files to load — pass \`files\`, or run ` +
|
|
155
|
+
`through \`meta gen\`, which supplies the project's own files as \`ctx.sourceFiles\`.`);
|
|
156
|
+
}
|
|
157
|
+
// Step 1 — standalone load, the run's own composed registry (so the publisher's
|
|
158
|
+
// own consumer-supplied providers are honoured here exactly as they were for
|
|
159
|
+
// the project's main load), strict.
|
|
160
|
+
const loader = new MetaDataLoader({
|
|
161
|
+
...(ctx.registry !== undefined ? { registry: ctx.registry } : {}),
|
|
162
|
+
strict: true,
|
|
163
|
+
});
|
|
164
|
+
const loaded = await loader.load(files.map((p) => new FileSource(p)));
|
|
165
|
+
if (loaded.errors.length > 0) {
|
|
166
|
+
throw loaded.errors[0];
|
|
167
|
+
}
|
|
168
|
+
const standaloneRoot = loaded.root;
|
|
169
|
+
// Step 2 — select top-level nodes. ADR-0039 sanctioned own-only case: `MetaRoot`
|
|
170
|
+
// has no super chain (it never `extends`), so its own children ARE its effective
|
|
171
|
+
// children — the same case `MetaRoot.objects()`/`findObject()` document.
|
|
172
|
+
const compiled = compileScope({ include: opts.include, exclude: opts.exclude ?? [] });
|
|
173
|
+
const selected = standaloneRoot
|
|
174
|
+
.ownChildren()
|
|
175
|
+
.filter((node) => node.type !== TYPE_REQUIREMENT && node.type !== TYPE_TEMPLATE)
|
|
176
|
+
.filter((node) => matchesScope(node.resolutionKey(), compiled));
|
|
177
|
+
if (selected.length === 0) {
|
|
178
|
+
throw new Error(`sharedModelFile("${opts.name}"): selected no nodes (include/exclude, always ` +
|
|
179
|
+
`excluding requirement.* and template.*) — nothing to publish. Check \`include\`.`);
|
|
180
|
+
}
|
|
181
|
+
// Step 3 — closure.
|
|
182
|
+
const selectedKeys = new Set(selected.map((n) => n.resolutionKey()));
|
|
183
|
+
const closureFailures = checkClosure(standaloneRoot, selected, selectedKeys);
|
|
184
|
+
if (closureFailures.length > 0) {
|
|
185
|
+
const lines = closureFailures.map((p) => ` ${p.referrer} → ${p.target}`).join("\n");
|
|
186
|
+
throw new Error(`sharedModelFile("${opts.name}"): the selection is not closed — these references ` +
|
|
187
|
+
`point outside it; include it or exclude the referrer:\n${lines}`);
|
|
188
|
+
}
|
|
189
|
+
// Step 4 — serialize (already sorted by resolution key; the callee also
|
|
190
|
+
// throws if a selected node has no package, per its own contract).
|
|
191
|
+
const artifactContent = serializeSharedDocument(selected);
|
|
192
|
+
// Step 5 — re-load standalone with CORE providers only (registry omitted ⇒
|
|
193
|
+
// MetaDataLoader's own default registry), strict. A consumer loads this
|
|
194
|
+
// artifact with ITS OWN providers, never the publisher's — so an export
|
|
195
|
+
// needing publisher-only vocabulary must fail HERE, not at the consumer.
|
|
196
|
+
const artifactPath = `${opts.name}${ARTIFACT_SUFFIX}`;
|
|
197
|
+
const coreLoader = new MetaDataLoader({ strict: true });
|
|
198
|
+
const coreLoaded = await coreLoader.load([
|
|
199
|
+
new InMemoryStringSource(artifactContent, { id: artifactPath }),
|
|
200
|
+
]);
|
|
201
|
+
if (coreLoaded.errors.length > 0) {
|
|
202
|
+
const first = coreLoaded.errors[0];
|
|
203
|
+
throw new Error(`sharedModelFile("${opts.name}"): the export needs a provider this toolchain does ` +
|
|
204
|
+
`not ship; Phase 1 exports must load with core vocabulary: ${first.message}`);
|
|
205
|
+
}
|
|
206
|
+
// Step 6 — emit the artifact + manifest.
|
|
207
|
+
const integrity = `${INTEGRITY_PREFIX}${createHash("sha256").update(artifactContent, "utf-8").digest("hex")}`;
|
|
208
|
+
const packages = [...new Set(selected.map((n) => packageOfResolutionKey(n.resolutionKey())))].sort();
|
|
209
|
+
const nodes = selected.map((n) => n.resolutionKey()).sort();
|
|
210
|
+
const version = opts.version ?? nearestPackageVersion(ctx.projectRoot ?? process.cwd());
|
|
211
|
+
if (version === undefined) {
|
|
212
|
+
throw new Error(`sharedModelFile("${opts.name}"): no version available — pass \`version\` explicitly, ` +
|
|
213
|
+
`or run inside a project with a package.json version at or above the project root.`);
|
|
214
|
+
}
|
|
215
|
+
const manifest = {
|
|
216
|
+
schema_version: MANIFEST_SCHEMA_VERSION,
|
|
217
|
+
name: opts.name,
|
|
218
|
+
version,
|
|
219
|
+
metamodelVersion: METAMODEL_VERSION,
|
|
220
|
+
artifact: artifactPath,
|
|
221
|
+
integrity,
|
|
222
|
+
packages,
|
|
223
|
+
nodes,
|
|
224
|
+
};
|
|
225
|
+
return [
|
|
226
|
+
{ path: artifactPath, content: artifactContent },
|
|
227
|
+
{ path: MANIFEST_FILE, content: JSON.stringify(manifest, null, 2) + "\n" },
|
|
228
|
+
];
|
|
229
|
+
}),
|
|
230
|
+
};
|
|
231
|
+
if (opts.target !== undefined)
|
|
232
|
+
generator.target = opts.target;
|
|
233
|
+
return generator;
|
|
234
|
+
}
|
|
235
|
+
//# sourceMappingURL=shared-model-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared-model-file.js","sourceRoot":"","sources":["../../src/generators/shared-model-file.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,EAAE;AACF,kFAAkF;AAClF,oFAAoF;AACpF,qFAAqF;AACrF,kFAAkF;AAClF,EAAE;AACF,yCAAyC;AACzC,2FAA2F;AAC3F,kFAAkF;AAClF,oDAAoD;AACpD,mFAAmF;AACnF,kFAAkF;AAClF,8BAA8B;AAC9B,oFAAoF;AACpF,kFAAkF;AAClF,qFAAqF;AACrF,iCAAiC;AACjC,oFAAoF;AACpF,sDAAsD;AACtD,oFAAoF;AACpF,oFAAoF;AACpF,wCAAwC;AACxC,8EAA8E;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAGL,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,YAAY,EACZ,sBAAsB,EACtB,gBAAgB,EAChB,uBAAuB,EACvB,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,EACb,iBAAiB,GAClB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAqD,MAAM,iBAAiB,CAAC;AAChG,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,+EAA+E;AAC/E,uEAAuE;AACvE,+EAA+E;AAC/E,+EAA+E;AAC/E,6EAA6E;AAC7E,4EAA4E;AAC5E,yDAAyD;AACzD,oDAAoD;AACpD,MAAM,CAAC,MAAM,aAAa,GAAG,sBAAsB,CAAC;AAC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S;gBACT,QAAQ;gBACR,KAAK;aACN,CAAC;YACF,OAAO;gBACL,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,eAAe,EAAE;gBAChD,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE;aAC3E,CAAC;QACJ,CAAC,CAAC;KACH,CAAC;IACF,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS;QAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;IAC9D,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
package/dist/runner.d.ts
CHANGED
|
@@ -65,6 +65,15 @@ export interface RunGenOpts {
|
|
|
65
65
|
* they pass straight through.
|
|
66
66
|
*/
|
|
67
67
|
scope?: (fqn: string) => boolean;
|
|
68
|
+
/**
|
|
69
|
+
* FR-023 §4.3 — the collection's own source files (`Collection.ownFiles`; never
|
|
70
|
+
* a dependency's snapshot artifact), threaded onto `GenContext.sourceFiles` for
|
|
71
|
+
* `sharedModelFile()`'s default `files` selection. The CLI's `gen` command
|
|
72
|
+
* always passes `genCollection.ownFiles`; a programmatic caller that never
|
|
73
|
+
* wires `sharedModelFile()` (or always passes that generator's own `files`
|
|
74
|
+
* option explicitly) can omit this with no behavior change elsewhere.
|
|
75
|
+
*/
|
|
76
|
+
sourceFiles?: readonly string[];
|
|
68
77
|
}
|
|
69
78
|
export interface RunGenResult {
|
|
70
79
|
files: WriteResult[];
|
package/dist/runner.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../src/runner.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,QAAQ,EAAc,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../src/runner.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK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