@0disoft/mensor-contract 0.2.1 → 0.10.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 +6 -0
- package/dist/spec/check-output-v2.schema.json +1 -1
- package/dist/spec/diagnostic-report-v1.schema.json +2 -2
- package/dist/spec/feature-contract-v1.schema.json +143 -6
- package/dist/spec/form-index-v1.schema.json +284 -0
- package/dist/spec/project-contract-v1.schema.json +11 -0
- package/dist/spec/runtime-manifest-v1.schema.json +57 -0
- package/dist/src/compare.d.ts +2 -0
- package/dist/src/compare.d.ts.map +1 -0
- package/dist/src/compare.js +4 -0
- package/dist/src/compare.js.map +1 -0
- package/dist/src/form-index.d.ts +4 -0
- package/dist/src/form-index.d.ts.map +1 -0
- package/dist/src/form-index.js +218 -0
- package/dist/src/form-index.js.map +1 -0
- package/dist/src/index.d.ts +3 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/jsonc.d.ts.map +1 -1
- package/dist/src/jsonc.js +171 -28
- package/dist/src/jsonc.js.map +1 -1
- package/dist/src/route-index.d.ts.map +1 -1
- package/dist/src/route-index.js +1 -3
- package/dist/src/route-index.js.map +1 -1
- package/dist/src/runtime-manifest.d.ts +4 -0
- package/dist/src/runtime-manifest.d.ts.map +1 -0
- package/dist/src/runtime-manifest.js +143 -0
- package/dist/src/runtime-manifest.js.map +1 -0
- package/dist/src/schemas.d.ts +3 -1
- package/dist/src/schemas.d.ts.map +1 -1
- package/dist/src/schemas.js +9 -4
- package/dist/src/schemas.js.map +1 -1
- package/dist/src/types.d.ts +137 -6
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/validate.d.ts.map +1 -1
- package/dist/src/validate.js +78 -2
- package/dist/src/validate.js.map +1 -1
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -17,7 +17,9 @@ import {
|
|
|
17
17
|
parseCheckOutputV2,
|
|
18
18
|
parseProjectContract,
|
|
19
19
|
parseRouteIndex,
|
|
20
|
+
parseRuntimeManifest,
|
|
20
21
|
serializeRouteIndex,
|
|
22
|
+
serializeRuntimeManifest,
|
|
21
23
|
} from "@0disoft/mensor-contract";
|
|
22
24
|
```
|
|
23
25
|
|
|
@@ -33,6 +35,9 @@ const projectSchema = import.meta.resolve(
|
|
|
33
35
|
const checkOutputSchema = import.meta.resolve(
|
|
34
36
|
"@0disoft/mensor-contract/schemas/check-output-v2.schema.json",
|
|
35
37
|
);
|
|
38
|
+
const runtimeManifestSchema = import.meta.resolve(
|
|
39
|
+
"@0disoft/mensor-contract/schemas/runtime-manifest-v1.schema.json",
|
|
40
|
+
);
|
|
36
41
|
```
|
|
37
42
|
|
|
38
43
|
## Documentation
|
|
@@ -40,5 +45,6 @@ const checkOutputSchema = import.meta.resolve(
|
|
|
40
45
|
- [Contract authoring](https://github.com/0disoft/mensor/blob/main/packages/contract/spec/README.md)
|
|
41
46
|
- [Public API and compatibility](https://github.com/0disoft/mensor/blob/main/docs/library/public-api.md)
|
|
42
47
|
- [RouteIndex v1](https://github.com/0disoft/mensor/blob/main/docs/architecture/route-index-v1.md)
|
|
48
|
+
- [RuntimeManifest v1](https://github.com/0disoft/mensor/blob/main/docs/architecture/runtime-manifest-v1.md)
|
|
43
49
|
|
|
44
50
|
Mensor is licensed under Apache-2.0.
|
|
@@ -446,14 +446,14 @@
|
|
|
446
446
|
"minLength": 1
|
|
447
447
|
},
|
|
448
448
|
"controlKind": {
|
|
449
|
-
"enum": ["input", "select"]
|
|
449
|
+
"enum": ["input", "select", "textarea"]
|
|
450
450
|
},
|
|
451
451
|
"controlCount": { "type": "integer", "minimum": 2 },
|
|
452
452
|
"controlType": {
|
|
453
453
|
"type": "string"
|
|
454
454
|
},
|
|
455
455
|
"decoderKind": {
|
|
456
|
-
"
|
|
456
|
+
"enum": ["text", "integer-base10", "decimal", "checkbox", "enum", "repeat"]
|
|
457
457
|
},
|
|
458
458
|
"fieldName": {
|
|
459
459
|
"type": "string",
|
|
@@ -64,10 +64,7 @@
|
|
|
64
64
|
"required": ["template", "id"],
|
|
65
65
|
"properties": {
|
|
66
66
|
"template": {
|
|
67
|
-
"
|
|
68
|
-
{ "$ref": "#/$defs/relativePath" },
|
|
69
|
-
{ "type": "string", "pattern": "\\.html$" }
|
|
70
|
-
]
|
|
67
|
+
"$ref": "#/$defs/relativePath"
|
|
71
68
|
},
|
|
72
69
|
"id": {
|
|
73
70
|
"type": "string",
|
|
@@ -113,6 +110,74 @@
|
|
|
113
110
|
}
|
|
114
111
|
}
|
|
115
112
|
},
|
|
113
|
+
"integerSchema": {
|
|
114
|
+
"type": "object",
|
|
115
|
+
"additionalProperties": false,
|
|
116
|
+
"required": ["kind"],
|
|
117
|
+
"properties": {
|
|
118
|
+
"kind": { "const": "integer" },
|
|
119
|
+
"minimum": { "type": "integer" },
|
|
120
|
+
"maximum": { "type": "integer" }
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"numberSchema": {
|
|
124
|
+
"type": "object",
|
|
125
|
+
"additionalProperties": false,
|
|
126
|
+
"required": ["kind"],
|
|
127
|
+
"properties": {
|
|
128
|
+
"kind": { "const": "number" },
|
|
129
|
+
"minimum": { "type": "number" },
|
|
130
|
+
"maximum": { "type": "number" }
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"booleanSchema": {
|
|
134
|
+
"type": "object",
|
|
135
|
+
"additionalProperties": false,
|
|
136
|
+
"required": ["kind"],
|
|
137
|
+
"properties": {
|
|
138
|
+
"kind": { "const": "boolean" }
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"enumSchema": {
|
|
142
|
+
"type": "object",
|
|
143
|
+
"additionalProperties": false,
|
|
144
|
+
"required": ["kind", "values"],
|
|
145
|
+
"properties": {
|
|
146
|
+
"kind": { "const": "enum" },
|
|
147
|
+
"values": {
|
|
148
|
+
"type": "array",
|
|
149
|
+
"minItems": 1,
|
|
150
|
+
"uniqueItems": true,
|
|
151
|
+
"items": { "type": "string", "minLength": 1 }
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"scalarSchema": {
|
|
156
|
+
"oneOf": [
|
|
157
|
+
{ "$ref": "#/$defs/stringSchema" },
|
|
158
|
+
{ "$ref": "#/$defs/integerSchema" },
|
|
159
|
+
{ "$ref": "#/$defs/numberSchema" },
|
|
160
|
+
{ "$ref": "#/$defs/booleanSchema" },
|
|
161
|
+
{ "$ref": "#/$defs/enumSchema" }
|
|
162
|
+
]
|
|
163
|
+
},
|
|
164
|
+
"arraySchema": {
|
|
165
|
+
"type": "object",
|
|
166
|
+
"additionalProperties": false,
|
|
167
|
+
"required": ["kind", "items"],
|
|
168
|
+
"properties": {
|
|
169
|
+
"kind": { "const": "array" },
|
|
170
|
+
"items": { "$ref": "#/$defs/scalarSchema" },
|
|
171
|
+
"minItems": { "type": "integer", "minimum": 0 },
|
|
172
|
+
"maxItems": { "type": "integer", "minimum": 0 }
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"propertySchema": {
|
|
176
|
+
"oneOf": [
|
|
177
|
+
{ "$ref": "#/$defs/scalarSchema" },
|
|
178
|
+
{ "$ref": "#/$defs/arraySchema" }
|
|
179
|
+
]
|
|
180
|
+
},
|
|
116
181
|
"objectSchema": {
|
|
117
182
|
"type": "object",
|
|
118
183
|
"additionalProperties": false,
|
|
@@ -125,7 +190,7 @@
|
|
|
125
190
|
"type": "object",
|
|
126
191
|
"minProperties": 1,
|
|
127
192
|
"additionalProperties": {
|
|
128
|
-
"$ref": "#/$defs/
|
|
193
|
+
"$ref": "#/$defs/propertySchema"
|
|
129
194
|
}
|
|
130
195
|
},
|
|
131
196
|
"required": {
|
|
@@ -154,6 +219,78 @@
|
|
|
154
219
|
}
|
|
155
220
|
}
|
|
156
221
|
},
|
|
222
|
+
"integerDecoder": {
|
|
223
|
+
"type": "object",
|
|
224
|
+
"additionalProperties": false,
|
|
225
|
+
"required": ["kind"],
|
|
226
|
+
"properties": {
|
|
227
|
+
"kind": { "const": "integer-base10" }
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
"decimalDecoder": {
|
|
231
|
+
"type": "object",
|
|
232
|
+
"additionalProperties": false,
|
|
233
|
+
"required": ["kind"],
|
|
234
|
+
"properties": {
|
|
235
|
+
"kind": { "const": "decimal" }
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
"checkboxDecoder": {
|
|
239
|
+
"type": "object",
|
|
240
|
+
"additionalProperties": false,
|
|
241
|
+
"required": ["kind", "trueValues", "missing"],
|
|
242
|
+
"properties": {
|
|
243
|
+
"kind": { "const": "checkbox" },
|
|
244
|
+
"trueValues": {
|
|
245
|
+
"type": "array",
|
|
246
|
+
"minItems": 1,
|
|
247
|
+
"uniqueItems": true,
|
|
248
|
+
"items": { "type": "string", "minLength": 1 }
|
|
249
|
+
},
|
|
250
|
+
"missing": { "type": "boolean" }
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
"enumDecoder": {
|
|
254
|
+
"type": "object",
|
|
255
|
+
"additionalProperties": false,
|
|
256
|
+
"required": ["kind", "values"],
|
|
257
|
+
"properties": {
|
|
258
|
+
"kind": { "const": "enum" },
|
|
259
|
+
"values": {
|
|
260
|
+
"type": "array",
|
|
261
|
+
"minItems": 1,
|
|
262
|
+
"uniqueItems": true,
|
|
263
|
+
"items": { "type": "string", "minLength": 1 }
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"repeatItemDecoder": {
|
|
268
|
+
"oneOf": [
|
|
269
|
+
{ "$ref": "#/$defs/textDecoder" },
|
|
270
|
+
{ "$ref": "#/$defs/integerDecoder" },
|
|
271
|
+
{ "$ref": "#/$defs/decimalDecoder" },
|
|
272
|
+
{ "$ref": "#/$defs/enumDecoder" }
|
|
273
|
+
]
|
|
274
|
+
},
|
|
275
|
+
"repeatDecoder": {
|
|
276
|
+
"type": "object",
|
|
277
|
+
"additionalProperties": false,
|
|
278
|
+
"required": ["kind", "items"],
|
|
279
|
+
"properties": {
|
|
280
|
+
"kind": { "const": "repeat" },
|
|
281
|
+
"items": { "$ref": "#/$defs/repeatItemDecoder" }
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
"formDecoder": {
|
|
285
|
+
"oneOf": [
|
|
286
|
+
{ "$ref": "#/$defs/textDecoder" },
|
|
287
|
+
{ "$ref": "#/$defs/integerDecoder" },
|
|
288
|
+
{ "$ref": "#/$defs/decimalDecoder" },
|
|
289
|
+
{ "$ref": "#/$defs/checkboxDecoder" },
|
|
290
|
+
{ "$ref": "#/$defs/enumDecoder" },
|
|
291
|
+
{ "$ref": "#/$defs/repeatDecoder" }
|
|
292
|
+
]
|
|
293
|
+
},
|
|
157
294
|
"binding": {
|
|
158
295
|
"type": "object",
|
|
159
296
|
"additionalProperties": false,
|
|
@@ -172,7 +309,7 @@
|
|
|
172
309
|
}
|
|
173
310
|
},
|
|
174
311
|
"decode": {
|
|
175
|
-
"$ref": "#/$defs/
|
|
312
|
+
"$ref": "#/$defs/formDecoder"
|
|
176
313
|
}
|
|
177
314
|
}
|
|
178
315
|
},
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "form-index-v1.schema.json",
|
|
4
|
+
"title": "Mensor FormIndex v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "producer", "documents"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": 1 },
|
|
10
|
+
"producer": { "$ref": "#/$defs/producer" },
|
|
11
|
+
"documents": {
|
|
12
|
+
"type": "array",
|
|
13
|
+
"items": { "$ref": "#/$defs/document" }
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"$defs": {
|
|
17
|
+
"identifier": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"pattern": "^[a-z0-9](?:[a-z0-9._/-]{0,127})$"
|
|
20
|
+
},
|
|
21
|
+
"version": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"pattern": "^[A-Za-z0-9](?:[A-Za-z0-9._+-]{0,127})$"
|
|
24
|
+
},
|
|
25
|
+
"relativePath": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"minLength": 1,
|
|
28
|
+
"pattern": "^(?!/)(?![A-Za-z]:)(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*\\\\)(?!.*//)(?!.*[\\u0000-\\u001f\\u007f]).+$"
|
|
29
|
+
},
|
|
30
|
+
"digest": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"pattern": "^sha256:[0-9a-f]{64}$"
|
|
33
|
+
},
|
|
34
|
+
"position": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"required": ["line", "character"],
|
|
38
|
+
"properties": {
|
|
39
|
+
"line": { "type": "integer", "minimum": 0 },
|
|
40
|
+
"character": { "type": "integer", "minimum": 0 }
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"range": {
|
|
44
|
+
"type": "object",
|
|
45
|
+
"additionalProperties": false,
|
|
46
|
+
"required": ["start", "end"],
|
|
47
|
+
"properties": {
|
|
48
|
+
"start": { "$ref": "#/$defs/position" },
|
|
49
|
+
"end": { "$ref": "#/$defs/position" }
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"dynamicReason": {
|
|
53
|
+
"enum": [
|
|
54
|
+
"computed-attribute",
|
|
55
|
+
"conditional-presence",
|
|
56
|
+
"custom-helper-semantics",
|
|
57
|
+
"dynamic-interpolation",
|
|
58
|
+
"repeated-generation"
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
"unsupportedReason": {
|
|
62
|
+
"enum": [
|
|
63
|
+
"file-input",
|
|
64
|
+
"named-submitter",
|
|
65
|
+
"provider-resource-limit",
|
|
66
|
+
"submitter-route-override",
|
|
67
|
+
"unsupported-control-kind"
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
"unresolvedReason": {
|
|
71
|
+
"oneOf": [
|
|
72
|
+
{ "$ref": "#/$defs/dynamicReason" },
|
|
73
|
+
{ "$ref": "#/$defs/unsupportedReason" }
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
"knownString": {
|
|
77
|
+
"type": "object",
|
|
78
|
+
"additionalProperties": false,
|
|
79
|
+
"required": ["state", "value", "range"],
|
|
80
|
+
"properties": {
|
|
81
|
+
"state": { "const": "known" },
|
|
82
|
+
"value": { "type": "string" },
|
|
83
|
+
"range": { "$ref": "#/$defs/range" }
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"knownNonEmptyString": {
|
|
87
|
+
"allOf": [
|
|
88
|
+
{ "$ref": "#/$defs/knownString" },
|
|
89
|
+
{
|
|
90
|
+
"type": "object",
|
|
91
|
+
"properties": {
|
|
92
|
+
"value": { "type": "string", "minLength": 1 }
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
"knownBoolean": {
|
|
98
|
+
"type": "object",
|
|
99
|
+
"additionalProperties": false,
|
|
100
|
+
"required": ["state", "value", "range"],
|
|
101
|
+
"properties": {
|
|
102
|
+
"state": { "const": "known" },
|
|
103
|
+
"value": { "type": "boolean" },
|
|
104
|
+
"range": { "$ref": "#/$defs/range" }
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"knownControlKind": {
|
|
108
|
+
"type": "object",
|
|
109
|
+
"additionalProperties": false,
|
|
110
|
+
"required": ["state", "value", "range"],
|
|
111
|
+
"properties": {
|
|
112
|
+
"state": { "const": "known" },
|
|
113
|
+
"value": { "enum": ["button", "input", "select", "textarea"] },
|
|
114
|
+
"range": { "$ref": "#/$defs/range" }
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"knownMultiplicity": {
|
|
118
|
+
"type": "object",
|
|
119
|
+
"additionalProperties": false,
|
|
120
|
+
"required": ["state", "value", "range"],
|
|
121
|
+
"properties": {
|
|
122
|
+
"state": { "const": "known" },
|
|
123
|
+
"value": { "enum": ["mutually-exclusive", "repeated", "scalar"] },
|
|
124
|
+
"range": { "$ref": "#/$defs/range" }
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"absent": {
|
|
128
|
+
"type": "object",
|
|
129
|
+
"additionalProperties": false,
|
|
130
|
+
"required": ["state"],
|
|
131
|
+
"properties": {
|
|
132
|
+
"state": { "const": "absent" },
|
|
133
|
+
"range": { "$ref": "#/$defs/range" }
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"dynamic": {
|
|
137
|
+
"type": "object",
|
|
138
|
+
"additionalProperties": false,
|
|
139
|
+
"required": ["state", "reason", "range"],
|
|
140
|
+
"properties": {
|
|
141
|
+
"state": { "const": "dynamic" },
|
|
142
|
+
"reason": { "$ref": "#/$defs/dynamicReason" },
|
|
143
|
+
"range": { "$ref": "#/$defs/range" }
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"unsupported": {
|
|
147
|
+
"type": "object",
|
|
148
|
+
"additionalProperties": false,
|
|
149
|
+
"required": ["state", "reason", "range"],
|
|
150
|
+
"properties": {
|
|
151
|
+
"state": { "const": "unsupported" },
|
|
152
|
+
"reason": { "$ref": "#/$defs/unsupportedReason" },
|
|
153
|
+
"range": { "$ref": "#/$defs/range" }
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"stringEvidence": {
|
|
157
|
+
"oneOf": [
|
|
158
|
+
{ "$ref": "#/$defs/knownString" },
|
|
159
|
+
{ "$ref": "#/$defs/absent" },
|
|
160
|
+
{ "$ref": "#/$defs/dynamic" },
|
|
161
|
+
{ "$ref": "#/$defs/unsupported" }
|
|
162
|
+
]
|
|
163
|
+
},
|
|
164
|
+
"nonEmptyStringEvidence": {
|
|
165
|
+
"oneOf": [
|
|
166
|
+
{ "$ref": "#/$defs/knownNonEmptyString" },
|
|
167
|
+
{ "$ref": "#/$defs/absent" },
|
|
168
|
+
{ "$ref": "#/$defs/dynamic" },
|
|
169
|
+
{ "$ref": "#/$defs/unsupported" }
|
|
170
|
+
]
|
|
171
|
+
},
|
|
172
|
+
"booleanEvidence": {
|
|
173
|
+
"oneOf": [
|
|
174
|
+
{ "$ref": "#/$defs/knownBoolean" },
|
|
175
|
+
{ "$ref": "#/$defs/absent" },
|
|
176
|
+
{ "$ref": "#/$defs/dynamic" },
|
|
177
|
+
{ "$ref": "#/$defs/unsupported" }
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
"controlKindEvidence": {
|
|
181
|
+
"oneOf": [
|
|
182
|
+
{ "$ref": "#/$defs/knownControlKind" },
|
|
183
|
+
{ "$ref": "#/$defs/absent" },
|
|
184
|
+
{ "$ref": "#/$defs/dynamic" },
|
|
185
|
+
{ "$ref": "#/$defs/unsupported" }
|
|
186
|
+
]
|
|
187
|
+
},
|
|
188
|
+
"multiplicityEvidence": {
|
|
189
|
+
"oneOf": [
|
|
190
|
+
{ "$ref": "#/$defs/knownMultiplicity" },
|
|
191
|
+
{ "$ref": "#/$defs/absent" },
|
|
192
|
+
{ "$ref": "#/$defs/dynamic" },
|
|
193
|
+
{ "$ref": "#/$defs/unsupported" }
|
|
194
|
+
]
|
|
195
|
+
},
|
|
196
|
+
"actionEvidence": {
|
|
197
|
+
"oneOf": [
|
|
198
|
+
{ "$ref": "#/$defs/stringEvidence" },
|
|
199
|
+
{
|
|
200
|
+
"type": "object",
|
|
201
|
+
"additionalProperties": false,
|
|
202
|
+
"required": ["state", "range"],
|
|
203
|
+
"properties": {
|
|
204
|
+
"state": { "const": "current-document" },
|
|
205
|
+
"range": { "$ref": "#/$defs/range" }
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
]
|
|
209
|
+
},
|
|
210
|
+
"producer": {
|
|
211
|
+
"type": "object",
|
|
212
|
+
"additionalProperties": false,
|
|
213
|
+
"required": ["name", "version"],
|
|
214
|
+
"properties": {
|
|
215
|
+
"name": { "$ref": "#/$defs/identifier" },
|
|
216
|
+
"version": { "$ref": "#/$defs/version" }
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"inspection": {
|
|
220
|
+
"oneOf": [
|
|
221
|
+
{
|
|
222
|
+
"type": "object",
|
|
223
|
+
"additionalProperties": false,
|
|
224
|
+
"required": ["state"],
|
|
225
|
+
"properties": { "state": { "const": "complete" } }
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"type": "object",
|
|
229
|
+
"additionalProperties": false,
|
|
230
|
+
"required": ["state", "reason"],
|
|
231
|
+
"properties": {
|
|
232
|
+
"state": { "const": "incomplete" },
|
|
233
|
+
"reason": { "$ref": "#/$defs/unresolvedReason" },
|
|
234
|
+
"range": { "$ref": "#/$defs/range" }
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
]
|
|
238
|
+
},
|
|
239
|
+
"control": {
|
|
240
|
+
"type": "object",
|
|
241
|
+
"additionalProperties": false,
|
|
242
|
+
"required": ["name", "controlKind", "inputType", "multiple", "multiplicity", "successful", "range"],
|
|
243
|
+
"properties": {
|
|
244
|
+
"name": { "$ref": "#/$defs/nonEmptyStringEvidence" },
|
|
245
|
+
"controlKind": { "$ref": "#/$defs/controlKindEvidence" },
|
|
246
|
+
"inputType": { "$ref": "#/$defs/stringEvidence" },
|
|
247
|
+
"multiple": { "$ref": "#/$defs/booleanEvidence" },
|
|
248
|
+
"multiplicity": { "$ref": "#/$defs/multiplicityEvidence" },
|
|
249
|
+
"successful": { "$ref": "#/$defs/booleanEvidence" },
|
|
250
|
+
"range": { "$ref": "#/$defs/range" }
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
"form": {
|
|
254
|
+
"type": "object",
|
|
255
|
+
"additionalProperties": false,
|
|
256
|
+
"required": ["identity", "method", "action", "range", "controls"],
|
|
257
|
+
"properties": {
|
|
258
|
+
"identity": { "$ref": "#/$defs/nonEmptyStringEvidence" },
|
|
259
|
+
"method": { "$ref": "#/$defs/stringEvidence" },
|
|
260
|
+
"action": { "$ref": "#/$defs/actionEvidence" },
|
|
261
|
+
"range": { "$ref": "#/$defs/range" },
|
|
262
|
+
"controls": {
|
|
263
|
+
"type": "array",
|
|
264
|
+
"items": { "$ref": "#/$defs/control" }
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"document": {
|
|
269
|
+
"type": "object",
|
|
270
|
+
"additionalProperties": false,
|
|
271
|
+
"required": ["path", "contentDigest", "sourceKind", "inspection", "forms"],
|
|
272
|
+
"properties": {
|
|
273
|
+
"path": { "$ref": "#/$defs/relativePath" },
|
|
274
|
+
"contentDigest": { "$ref": "#/$defs/digest" },
|
|
275
|
+
"sourceKind": { "$ref": "#/$defs/identifier" },
|
|
276
|
+
"inspection": { "$ref": "#/$defs/inspection" },
|
|
277
|
+
"forms": {
|
|
278
|
+
"type": "array",
|
|
279
|
+
"items": { "$ref": "#/$defs/form" }
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
"type": "object",
|
|
6
6
|
"additionalProperties": false,
|
|
7
7
|
"required": ["version", "sourceRoot", "featureContracts", "fileRoles"],
|
|
8
|
+
"dependentRequired": { "formIndexEvidence": ["formIndex"] },
|
|
8
9
|
"properties": {
|
|
9
10
|
"$schema": {
|
|
10
11
|
"type": "string"
|
|
@@ -42,6 +43,16 @@
|
|
|
42
43
|
"$ref": "#/$defs/ownershipRule"
|
|
43
44
|
}
|
|
44
45
|
},
|
|
46
|
+
"formIndex": {
|
|
47
|
+
"$ref": "#/$defs/relativePath"
|
|
48
|
+
},
|
|
49
|
+
"formIndexEvidence": {
|
|
50
|
+
"type": "array",
|
|
51
|
+
"minItems": 1,
|
|
52
|
+
"maxItems": 16,
|
|
53
|
+
"uniqueItems": true,
|
|
54
|
+
"items": { "$ref": "#/$defs/relativePath" }
|
|
55
|
+
},
|
|
45
56
|
"routeIndex": {
|
|
46
57
|
"$ref": "#/$defs/relativePath"
|
|
47
58
|
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "runtime-manifest-v1.schema.json",
|
|
4
|
+
"title": "Mensor Runtime Manifest v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["manifestVersion", "producer", "pages", "actions"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"manifestVersion": { "const": 1 },
|
|
10
|
+
"producer": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"additionalProperties": false,
|
|
13
|
+
"required": ["name", "version"],
|
|
14
|
+
"properties": {
|
|
15
|
+
"name": { "type": "string", "minLength": 1 },
|
|
16
|
+
"version": { "type": "string", "minLength": 1 }
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"pages": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"items": { "$ref": "#/$defs/page" }
|
|
22
|
+
},
|
|
23
|
+
"actions": {
|
|
24
|
+
"type": "array",
|
|
25
|
+
"items": { "$ref": "#/$defs/action" }
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"$defs": {
|
|
29
|
+
"routePath": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"pattern": "^/[^?#]*$"
|
|
32
|
+
},
|
|
33
|
+
"page": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"additionalProperties": false,
|
|
36
|
+
"required": ["id", "method", "path", "html"],
|
|
37
|
+
"properties": {
|
|
38
|
+
"id": { "type": "string", "minLength": 1 },
|
|
39
|
+
"method": { "const": "GET" },
|
|
40
|
+
"path": { "$ref": "#/$defs/routePath" },
|
|
41
|
+
"html": { "type": "string" }
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"action": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"additionalProperties": false,
|
|
47
|
+
"required": ["id", "method", "path", "handlerId", "input"],
|
|
48
|
+
"properties": {
|
|
49
|
+
"id": { "type": "string", "minLength": 1 },
|
|
50
|
+
"method": { "const": "POST" },
|
|
51
|
+
"path": { "$ref": "#/$defs/routePath" },
|
|
52
|
+
"handlerId": { "type": "string", "minLength": 1 },
|
|
53
|
+
"input": { "$ref": "feature-contract-v1.schema.json#/$defs/input" }
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compare.d.ts","sourceRoot":"","sources":["../../src/compare.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAE/D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compare.js","sourceRoot":"","sources":["../../src/compare.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,WAAW,CAAC,IAAY,EAAE,KAAa;IACrD,OAAO,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-index.d.ts","sourceRoot":"","sources":["../../src/form-index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,cAAc,EACd,SAAS,EASV,MAAM,YAAY,CAAC;AAIpB,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAAC,SAAS,CAAC,CAoBtE;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAYzD"}
|