@aestheticfunction/dspack-emit 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/README.md +18 -12
- package/dist/cli.js +4 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/transform/emit-v1_0.d.ts +45 -0
- package/dist/transform/emit-v1_0.js +190 -0
- package/dist/transform/emit.d.ts +6 -9
- package/dist/transform/emit.js +5 -44
- package/dist/transform/index.js +3 -1
- package/dist/types.d.ts +4 -0
- package/dist/validate/ajv.d.ts +7 -0
- package/dist/validate/ajv.js +73 -11
- package/dist/validate/meta/a2ui-v1_0.d.ts +9 -0
- package/dist/validate/meta/a2ui-v1_0.js +811 -0
- package/dist/validate/meta/catalog-meta.js +34 -21
- package/package.json +1 -1
- package/src/byte-neutral.test.ts +6 -3
- package/src/cli.ts +5 -2
- package/src/functions.test.ts +48 -1
- package/src/index.ts +1 -1
- package/src/profile-v2.test.ts +1 -1
- package/src/transform/emit-v1_0.ts +215 -0
- package/src/transform/emit.ts +10 -54
- package/src/transform/index.ts +3 -1
- package/src/transform.test.ts +33 -1
- package/src/types.ts +4 -0
- package/src/v1_0-catalog.test.ts +267 -0
- package/src/validate/ajv.ts +74 -11
- package/src/validate/meta/a2ui-catalog.meta.1_0.json +67 -13
- package/src/validate/meta/a2ui-v1_0.ts +820 -0
- package/src/validate/meta/catalog-meta.ts +34 -21
|
@@ -93,11 +93,12 @@ export const catalogMetaSchemas: Record<A2uiVersion, Json> = {
|
|
|
93
93
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
94
94
|
"$id": "https://rdombrowski.dev/meta/a2ui-catalog.v1_0.json",
|
|
95
95
|
"title": "A2UI catalog shape (v1.0)",
|
|
96
|
-
"description": "
|
|
96
|
+
"description": "dspack's own invariants for an A2UI v1.0 catalog, checked alongside the official catalog definition (fixtures/a2ui/catalog_definition.v1_0.json, pinned in fixtures/a2ui/PIN.md): it declares protocolVersion 1.0, carries neither the 0.9 theme nor the pre-release surfaceProperties, and never wraps a component in ComponentCommon, which the envelope composes.",
|
|
97
97
|
"type": "object",
|
|
98
98
|
"required": [
|
|
99
99
|
"$schema",
|
|
100
100
|
"$id",
|
|
101
|
+
"protocolVersion",
|
|
101
102
|
"catalogId",
|
|
102
103
|
"title",
|
|
103
104
|
"description",
|
|
@@ -105,6 +106,9 @@ export const catalogMetaSchemas: Record<A2uiVersion, Json> = {
|
|
|
105
106
|
"$defs"
|
|
106
107
|
],
|
|
107
108
|
"properties": {
|
|
109
|
+
"protocolVersion": {
|
|
110
|
+
"const": "1.0"
|
|
111
|
+
},
|
|
108
112
|
"catalogId": {
|
|
109
113
|
"type": "string",
|
|
110
114
|
"format": "uri"
|
|
@@ -121,17 +125,23 @@ export const catalogMetaSchemas: Record<A2uiVersion, Json> = {
|
|
|
121
125
|
"minProperties": 1,
|
|
122
126
|
"additionalProperties": {
|
|
123
127
|
"type": "object",
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
128
|
+
"not": {
|
|
129
|
+
"required": [
|
|
130
|
+
"allOf"
|
|
131
|
+
],
|
|
132
|
+
"properties": {
|
|
133
|
+
"allOf": {
|
|
134
|
+
"contains": {
|
|
135
|
+
"required": [
|
|
136
|
+
"$ref"
|
|
137
|
+
],
|
|
138
|
+
"properties": {
|
|
139
|
+
"$ref": {
|
|
140
|
+
"pattern": "ComponentCommon$"
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
135
145
|
}
|
|
136
146
|
}
|
|
137
147
|
}
|
|
@@ -140,11 +150,20 @@ export const catalogMetaSchemas: Record<A2uiVersion, Json> = {
|
|
|
140
150
|
"type": "object",
|
|
141
151
|
"required": [
|
|
142
152
|
"anyComponent",
|
|
143
|
-
"
|
|
153
|
+
"anyFunction"
|
|
144
154
|
],
|
|
145
155
|
"not": {
|
|
146
|
-
"
|
|
147
|
-
|
|
156
|
+
"anyOf": [
|
|
157
|
+
{
|
|
158
|
+
"required": [
|
|
159
|
+
"theme"
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"required": [
|
|
164
|
+
"surfaceProperties"
|
|
165
|
+
]
|
|
166
|
+
}
|
|
148
167
|
]
|
|
149
168
|
},
|
|
150
169
|
"properties": {
|
|
@@ -153,12 +172,6 @@ export const catalogMetaSchemas: Record<A2uiVersion, Json> = {
|
|
|
153
172
|
"required": [
|
|
154
173
|
"oneOf"
|
|
155
174
|
]
|
|
156
|
-
},
|
|
157
|
-
"surfaceProperties": {
|
|
158
|
-
"type": "object",
|
|
159
|
-
"required": [
|
|
160
|
-
"properties"
|
|
161
|
-
]
|
|
162
175
|
}
|
|
163
176
|
}
|
|
164
177
|
}
|