@fabricorg/gen-sdui 0.3.0 → 0.5.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 +35 -0
- package/dist/index.cjs +28 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +28 -3
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b932767: Add portable parameter schemas and validation for projection views. Projection snapshot keys now
|
|
8
|
+
include a canonical parameter identity, generated capability and experience contracts preserve view
|
|
9
|
+
parameter schemas, and compatible snapshots continue through the explicit `upgradeSnapshot` seam.
|
|
10
|
+
- Updated dependencies [b932767]
|
|
11
|
+
- @fabricorg/compiler@2.1.1
|
|
12
|
+
|
|
13
|
+
### Additional release notes
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Preserve projection view `parameterSchema` in generated capability bindings.
|
|
18
|
+
|
|
19
|
+
## 0.5.0
|
|
20
|
+
|
|
21
|
+
### Minor Changes
|
|
22
|
+
|
|
23
|
+
- Make the capability runtime vertical-neutral and instance-scoped. Move experience and display
|
|
24
|
+
semantics into a namespaced companion package, require explicit host registries, replace privacy
|
|
25
|
+
field defaults with caller-owned policy, add PostgreSQL projection adapters, and generate executable
|
|
26
|
+
ProjectionHost read and PlatformHost mutation seams.
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- Updated dependencies
|
|
31
|
+
- @fabricorg/experience-contracts@1.0.0
|
|
32
|
+
- @fabricorg/compiler@2.0.0
|
|
33
|
+
|
|
34
|
+
## 0.4.0
|
|
35
|
+
|
|
36
|
+
- Read roles, slots, and action intents only from the versioned `fabric.experience/v1` extension.
|
|
37
|
+
|
|
3
38
|
## 0.3.0
|
|
4
39
|
|
|
5
40
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -24,9 +24,34 @@ __export(index_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(index_exports);
|
|
26
26
|
var import_compiler = require("@fabricorg/compiler");
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
var import_experience_contracts = require("@fabricorg/experience-contracts");
|
|
28
|
+
var sduiGenerator = {
|
|
29
|
+
name: "@fabricorg/gen-sdui",
|
|
30
|
+
version: "0.5.1",
|
|
31
|
+
generate(ir) {
|
|
32
|
+
return ir.modules.map((module2) => {
|
|
33
|
+
const experience = (0, import_experience_contracts.readExperienceMetadata)(module2.capability);
|
|
34
|
+
return {
|
|
35
|
+
path: `${module2.namespace}/data-shapes.json`,
|
|
36
|
+
content: (0, import_compiler.stableStringify)({
|
|
37
|
+
generator: { name: sduiGenerator.name, version: sduiGenerator.version },
|
|
38
|
+
manifestDigest: ir.manifestDigest,
|
|
39
|
+
roles: experience?.roles ?? [],
|
|
40
|
+
actionIntents: experience?.actionIntents ?? [],
|
|
41
|
+
slots: experience?.slots ?? [],
|
|
42
|
+
bindings: module2.views.map((view) => ({
|
|
43
|
+
uri: `capability://${view.name}`,
|
|
44
|
+
version: view.version,
|
|
45
|
+
shape: view.shape,
|
|
46
|
+
...view.parameterSchema ? { parameterSchema: view.parameterSchema } : {},
|
|
47
|
+
scope: view.scope,
|
|
48
|
+
usage: view.usage
|
|
49
|
+
}))
|
|
50
|
+
})
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
};
|
|
30
55
|
// Annotate the CommonJS export names for ESM import in node:
|
|
31
56
|
0 && (module.exports = {
|
|
32
57
|
sduiGenerator
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../index.ts"],"sourcesContent":["import { stableStringify,type GeneratorTarget } from \"@fabricorg/compiler\";\nexport const sduiGenerator:GeneratorTarget={
|
|
1
|
+
{"version":3,"sources":["../index.ts"],"sourcesContent":["import { stableStringify, type GeneratorTarget } from \"@fabricorg/compiler\";\nimport { readExperienceMetadata } from \"@fabricorg/experience-contracts\";\n\nexport const sduiGenerator: GeneratorTarget = {\n\tname: \"@fabricorg/gen-sdui\",\n\tversion: \"0.5.1\",\n\tgenerate(ir) {\n\t\treturn ir.modules.map((module) => {\n\t\t\tconst experience = readExperienceMetadata(module.capability);\n\t\t\treturn {\n\t\t\t\tpath: `${module.namespace}/data-shapes.json`,\n\t\t\t\tcontent: stableStringify({\n\t\t\t\t\tgenerator: { name: sduiGenerator.name, version: sduiGenerator.version },\n\t\t\t\t\tmanifestDigest: ir.manifestDigest,\n\t\t\t\t\troles: experience?.roles ?? [],\n\t\t\t\t\tactionIntents: experience?.actionIntents ?? [],\n\t\t\t\t\tslots: experience?.slots ?? [],\n\t\t\t\t\tbindings: module.views.map((view) => ({\n\t\t\t\t\t\turi: `capability://${view.name}`,\n\t\t\t\t\t\tversion: view.version,\n\t\t\t\t\t\tshape: view.shape,\n\t\t\t\t\t\t...(view.parameterSchema ? { parameterSchema: view.parameterSchema } : {}),\n\t\t\t\t\t\tscope: view.scope,\n\t\t\t\t\t\tusage: view.usage,\n\t\t\t\t\t})),\n\t\t\t\t}),\n\t\t\t};\n\t\t});\n\t},\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAsD;AACtD,kCAAuC;AAEhC,IAAM,gBAAiC;AAAA,EAC7C,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS,IAAI;AACZ,WAAO,GAAG,QAAQ,IAAI,CAACA,YAAW;AACjC,YAAM,iBAAa,oDAAuBA,QAAO,UAAU;AAC3D,aAAO;AAAA,QACN,MAAM,GAAGA,QAAO,SAAS;AAAA,QACzB,aAAS,iCAAgB;AAAA,UACxB,WAAW,EAAE,MAAM,cAAc,MAAM,SAAS,cAAc,QAAQ;AAAA,UACtE,gBAAgB,GAAG;AAAA,UACnB,OAAO,YAAY,SAAS,CAAC;AAAA,UAC7B,eAAe,YAAY,iBAAiB,CAAC;AAAA,UAC7C,OAAO,YAAY,SAAS,CAAC;AAAA,UAC7B,UAAUA,QAAO,MAAM,IAAI,CAAC,UAAU;AAAA,YACrC,KAAK,gBAAgB,KAAK,IAAI;AAAA,YAC9B,SAAS,KAAK;AAAA,YACd,OAAO,KAAK;AAAA,YACZ,GAAI,KAAK,kBAAkB,EAAE,iBAAiB,KAAK,gBAAgB,IAAI,CAAC;AAAA,YACxE,OAAO,KAAK;AAAA,YACZ,OAAO,KAAK;AAAA,UACb,EAAE;AAAA,QACH,CAAC;AAAA,MACF;AAAA,IACD,CAAC;AAAA,EACF;AACD;","names":["module"]}
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,33 @@
|
|
|
1
1
|
// index.ts
|
|
2
2
|
import { stableStringify } from "@fabricorg/compiler";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import { readExperienceMetadata } from "@fabricorg/experience-contracts";
|
|
4
|
+
var sduiGenerator = {
|
|
5
|
+
name: "@fabricorg/gen-sdui",
|
|
6
|
+
version: "0.5.1",
|
|
7
|
+
generate(ir) {
|
|
8
|
+
return ir.modules.map((module) => {
|
|
9
|
+
const experience = readExperienceMetadata(module.capability);
|
|
10
|
+
return {
|
|
11
|
+
path: `${module.namespace}/data-shapes.json`,
|
|
12
|
+
content: stableStringify({
|
|
13
|
+
generator: { name: sduiGenerator.name, version: sduiGenerator.version },
|
|
14
|
+
manifestDigest: ir.manifestDigest,
|
|
15
|
+
roles: experience?.roles ?? [],
|
|
16
|
+
actionIntents: experience?.actionIntents ?? [],
|
|
17
|
+
slots: experience?.slots ?? [],
|
|
18
|
+
bindings: module.views.map((view) => ({
|
|
19
|
+
uri: `capability://${view.name}`,
|
|
20
|
+
version: view.version,
|
|
21
|
+
shape: view.shape,
|
|
22
|
+
...view.parameterSchema ? { parameterSchema: view.parameterSchema } : {},
|
|
23
|
+
scope: view.scope,
|
|
24
|
+
usage: view.usage
|
|
25
|
+
}))
|
|
26
|
+
})
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
};
|
|
6
31
|
export {
|
|
7
32
|
sduiGenerator
|
|
8
33
|
};
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../index.ts"],"sourcesContent":["import { stableStringify,type GeneratorTarget } from \"@fabricorg/compiler\";\nexport const sduiGenerator:GeneratorTarget={
|
|
1
|
+
{"version":3,"sources":["../index.ts"],"sourcesContent":["import { stableStringify, type GeneratorTarget } from \"@fabricorg/compiler\";\nimport { readExperienceMetadata } from \"@fabricorg/experience-contracts\";\n\nexport const sduiGenerator: GeneratorTarget = {\n\tname: \"@fabricorg/gen-sdui\",\n\tversion: \"0.5.1\",\n\tgenerate(ir) {\n\t\treturn ir.modules.map((module) => {\n\t\t\tconst experience = readExperienceMetadata(module.capability);\n\t\t\treturn {\n\t\t\t\tpath: `${module.namespace}/data-shapes.json`,\n\t\t\t\tcontent: stableStringify({\n\t\t\t\t\tgenerator: { name: sduiGenerator.name, version: sduiGenerator.version },\n\t\t\t\t\tmanifestDigest: ir.manifestDigest,\n\t\t\t\t\troles: experience?.roles ?? [],\n\t\t\t\t\tactionIntents: experience?.actionIntents ?? [],\n\t\t\t\t\tslots: experience?.slots ?? [],\n\t\t\t\t\tbindings: module.views.map((view) => ({\n\t\t\t\t\t\turi: `capability://${view.name}`,\n\t\t\t\t\t\tversion: view.version,\n\t\t\t\t\t\tshape: view.shape,\n\t\t\t\t\t\t...(view.parameterSchema ? { parameterSchema: view.parameterSchema } : {}),\n\t\t\t\t\t\tscope: view.scope,\n\t\t\t\t\t\tusage: view.usage,\n\t\t\t\t\t})),\n\t\t\t\t}),\n\t\t\t};\n\t\t});\n\t},\n};\n"],"mappings":";AAAA,SAAS,uBAA6C;AACtD,SAAS,8BAA8B;AAEhC,IAAM,gBAAiC;AAAA,EAC7C,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS,IAAI;AACZ,WAAO,GAAG,QAAQ,IAAI,CAAC,WAAW;AACjC,YAAM,aAAa,uBAAuB,OAAO,UAAU;AAC3D,aAAO;AAAA,QACN,MAAM,GAAG,OAAO,SAAS;AAAA,QACzB,SAAS,gBAAgB;AAAA,UACxB,WAAW,EAAE,MAAM,cAAc,MAAM,SAAS,cAAc,QAAQ;AAAA,UACtE,gBAAgB,GAAG;AAAA,UACnB,OAAO,YAAY,SAAS,CAAC;AAAA,UAC7B,eAAe,YAAY,iBAAiB,CAAC;AAAA,UAC7C,OAAO,YAAY,SAAS,CAAC;AAAA,UAC7B,UAAU,OAAO,MAAM,IAAI,CAAC,UAAU;AAAA,YACrC,KAAK,gBAAgB,KAAK,IAAI;AAAA,YAC9B,SAAS,KAAK;AAAA,YACd,OAAO,KAAK;AAAA,YACZ,GAAI,KAAK,kBAAkB,EAAE,iBAAiB,KAAK,gBAAgB,IAAI,CAAC;AAAA,YACxE,OAAO,KAAK;AAAA,YACZ,OAAO,KAAK;AAAA,UACb,EAAE;AAAA,QACH,CAAC;AAAA,MACF;AAAA,IACD,CAAC;AAAA,EACF;AACD;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fabricorg/gen-sdui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "SDUI data-shape binding generator for Fabric compiler IR.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -25,14 +25,15 @@
|
|
|
25
25
|
"CHANGELOG.md"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@fabricorg/compiler": "^
|
|
28
|
+
"@fabricorg/compiler": "^2.2.0",
|
|
29
|
+
"@fabricorg/experience-contracts": "^1.0.1"
|
|
29
30
|
},
|
|
30
31
|
"devDependencies": {
|
|
31
32
|
"@types/node": "^22.10.0",
|
|
32
33
|
"tsup": "^8.5.0",
|
|
33
34
|
"typescript": "^5.7.3",
|
|
34
35
|
"vitest": "^4.1.5",
|
|
35
|
-
"@fabricorg/platform": "^
|
|
36
|
+
"@fabricorg/platform": "^1.2.0"
|
|
36
37
|
},
|
|
37
38
|
"engines": {
|
|
38
39
|
"node": ">=20"
|