@toolproof-npm/schema 0.1.35 → 0.1.37
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/_lib/types/Resource_ResourceType.d.ts +1 -0
- package/dist/_lib/types/types.d.ts +10 -22
- package/dist/genesis/generated/resources/Genesis.json +16 -72
- package/dist/genesis/generated/schemas/Genesis.json +16 -40
- package/dist/genesis/generated/schemas/ResourceType.json +16 -9
- package/dist/genesis/resourceTypes/Genesis.json +16 -52
- package/dist/index.d.ts +1 -1
- package/dist/scripts/generateTypes.js +9 -0
- package/package.json +55 -50
|
@@ -77,11 +77,12 @@ export type ExtractionSchemaValue =
|
|
|
77
77
|
} & {
|
|
78
78
|
$schema: "https://json-schema.org/draft/2020-12/schema";
|
|
79
79
|
$defs?: {
|
|
80
|
-
};
|
|
80
|
+
};
|
|
81
81
|
type: "object";
|
|
82
|
-
allOf?: [
|
|
82
|
+
allOf?: Array<{[k: string]: unknown}>;
|
|
83
83
|
properties?: {
|
|
84
|
-
};
|
|
84
|
+
};
|
|
85
|
+
required?: string[];
|
|
85
86
|
additionalProperties?: false;
|
|
86
87
|
unevaluatedProperties?: false;
|
|
87
88
|
$anchor: string;
|
|
@@ -227,12 +228,6 @@ export type ResourcePotentialOutput =
|
|
|
227
228
|
ResourceKind & {
|
|
228
229
|
kind: "potential-output";
|
|
229
230
|
};
|
|
230
|
-
/**
|
|
231
|
-
* This interface was referenced by `GenesisJson`'s JSON-Schema
|
|
232
|
-
* via the `definition` "ResourceRawMeta".
|
|
233
|
-
*/
|
|
234
|
-
export type ResourceRawMeta =
|
|
235
|
-
ResourceBase & CanonicalRef & Timestamp;
|
|
236
231
|
/**
|
|
237
232
|
* This interface was referenced by `GenesisJson`'s JSON-Schema
|
|
238
233
|
* via the `definition` "ResourceType".
|
|
@@ -330,13 +325,6 @@ export interface RoleBindingsInner {
|
|
|
330
325
|
* via the `definition` "RoleBindingMap".
|
|
331
326
|
*/
|
|
332
327
|
export type RoleBindingMap = Record<ResourceRoleId, ResourceId>;
|
|
333
|
-
/**
|
|
334
|
-
* This interface was referenced by `GenesisJson`'s JSON-Schema
|
|
335
|
-
* via the `definition` "CanonicalRef".
|
|
336
|
-
*/
|
|
337
|
-
export interface CanonicalRef {
|
|
338
|
-
canonicalRef: string;
|
|
339
|
-
}
|
|
340
328
|
/**
|
|
341
329
|
* This interface was referenced by `GenesisJson`'s JSON-Schema
|
|
342
330
|
* via the `definition` "CreationContext".
|
|
@@ -381,8 +369,7 @@ export interface ExtractionSchema {
|
|
|
381
369
|
* via the `patternProperty` "^[A-Za-z][A-Za-z0-9._-]*Id$".
|
|
382
370
|
*/
|
|
383
371
|
export interface IdSchemaValue {
|
|
384
|
-
type: "string";
|
|
385
|
-
pattern: string;
|
|
372
|
+
type: "string" | "number" | "integer" | "boolean";
|
|
386
373
|
}
|
|
387
374
|
/**
|
|
388
375
|
* This interface was referenced by `GenesisJson`'s JSON-Schema
|
|
@@ -394,7 +381,7 @@ export interface IdentityProp {
|
|
|
394
381
|
properties: {
|
|
395
382
|
identity: IdentityValue;
|
|
396
383
|
};
|
|
397
|
-
required
|
|
384
|
+
required?: string[];
|
|
398
385
|
additionalProperties?: unknown;
|
|
399
386
|
}
|
|
400
387
|
/**
|
|
@@ -557,11 +544,12 @@ export type ExtractionSchemaValue =
|
|
|
557
544
|
} & {
|
|
558
545
|
$schema: "https://json-schema.org/draft/2020-12/schema";
|
|
559
546
|
$defs?: {
|
|
560
|
-
};
|
|
547
|
+
};
|
|
561
548
|
type: "object";
|
|
562
|
-
allOf?: [
|
|
549
|
+
allOf?: Array<{[k: string]: unknown}>;
|
|
563
550
|
properties?: {
|
|
564
|
-
};
|
|
551
|
+
};
|
|
552
|
+
required?: string[];
|
|
565
553
|
additionalProperties?: false;
|
|
566
554
|
unevaluatedProperties?: false;
|
|
567
555
|
$anchor: string;
|
|
@@ -128,8 +128,8 @@
|
|
|
128
128
|
"properties": {
|
|
129
129
|
"$ref": {
|
|
130
130
|
"type": "string",
|
|
131
|
-
"$comment": "Anchors
|
|
132
|
-
"pattern": "^#[A-Za-z][A-Za-z0-9._-]*Id$"
|
|
131
|
+
"$comment": "Supports both anchor syntax (#<Name>Id) and JSON Pointer syntax (#/path/to/definition). Anchors use #<Name>Id for identity refs. Top-level and nested $defs should expose an $anchor matching <Name>Id.",
|
|
132
|
+
"pattern": "^#([A-Za-z][A-Za-z0-9._-]*Id|/.*)$"
|
|
133
133
|
}
|
|
134
134
|
},
|
|
135
135
|
"additionalProperties": false
|
|
@@ -155,16 +155,16 @@
|
|
|
155
155
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
156
156
|
"type": "object",
|
|
157
157
|
"required": [
|
|
158
|
-
"type"
|
|
159
|
-
"pattern"
|
|
158
|
+
"type"
|
|
160
159
|
],
|
|
161
160
|
"properties": {
|
|
162
161
|
"type": {
|
|
163
|
-
"
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
162
|
+
"enum": [
|
|
163
|
+
"string",
|
|
164
|
+
"number",
|
|
165
|
+
"integer",
|
|
166
|
+
"boolean"
|
|
167
|
+
]
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
}
|
|
@@ -350,6 +350,13 @@
|
|
|
350
350
|
"type": {
|
|
351
351
|
"const": "object"
|
|
352
352
|
},
|
|
353
|
+
"required": {
|
|
354
|
+
"type": "array",
|
|
355
|
+
"items": {
|
|
356
|
+
"type": "string"
|
|
357
|
+
},
|
|
358
|
+
"uniqueItems": true
|
|
359
|
+
},
|
|
353
360
|
"properties": {
|
|
354
361
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
355
362
|
"type": "object"
|
|
@@ -1192,36 +1199,6 @@
|
|
|
1192
1199
|
}
|
|
1193
1200
|
}
|
|
1194
1201
|
},
|
|
1195
|
-
"CanonicalRef": {
|
|
1196
|
-
"identity": "RESOURCE-CanonicalRef",
|
|
1197
|
-
"resourceTypeId": "TYPE-ResourceType",
|
|
1198
|
-
"creationContext": {
|
|
1199
|
-
"resourceRoleId": "ROLE-Genesis",
|
|
1200
|
-
"executionId": "EXECUTION-CanonicalRef"
|
|
1201
|
-
},
|
|
1202
|
-
"kind": "materialized",
|
|
1203
|
-
"timestamp": "2025-11-30T00:00:00.000Z",
|
|
1204
|
-
"extractedData": {
|
|
1205
|
-
"identity": "TYPE-CanonicalRef",
|
|
1206
|
-
"name": "CanonicalRef",
|
|
1207
|
-
"description": "dummy-description",
|
|
1208
|
-
"resourceFormatId": "FORMAT-ApplicationJson",
|
|
1209
|
-
"extractionSchema": {
|
|
1210
|
-
"$anchor": "CanonicalRef",
|
|
1211
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1212
|
-
"type": "object",
|
|
1213
|
-
"required": [
|
|
1214
|
-
"canonicalRef"
|
|
1215
|
-
],
|
|
1216
|
-
"properties": {
|
|
1217
|
-
"canonicalRef": {
|
|
1218
|
-
"$comment": "This points to the canonical resource with an identical contentHash as this one. If no such resource exists, this resource will itself be the canonical resource and point to itself (i.e. canonicalRef = identity).",
|
|
1219
|
-
"$ref": "#/$defs/ResourceId"
|
|
1220
|
-
}
|
|
1221
|
-
}
|
|
1222
|
-
}
|
|
1223
|
-
}
|
|
1224
|
-
},
|
|
1225
1202
|
"Timestamp": {
|
|
1226
1203
|
"identity": "RESOURCE-Timestamp",
|
|
1227
1204
|
"resourceTypeId": "TYPE-ResourceType",
|
|
@@ -1252,39 +1229,6 @@
|
|
|
1252
1229
|
}
|
|
1253
1230
|
}
|
|
1254
1231
|
},
|
|
1255
|
-
"ResourceRawMeta": {
|
|
1256
|
-
"identity": "RESOURCE-ResourceRawMeta",
|
|
1257
|
-
"resourceTypeId": "TYPE-ResourceType",
|
|
1258
|
-
"creationContext": {
|
|
1259
|
-
"resourceRoleId": "ROLE-Genesis",
|
|
1260
|
-
"executionId": "EXECUTION-ResourceRawMeta"
|
|
1261
|
-
},
|
|
1262
|
-
"kind": "materialized",
|
|
1263
|
-
"timestamp": "2025-11-30T00:00:00.000Z",
|
|
1264
|
-
"extractedData": {
|
|
1265
|
-
"identity": "TYPE-ResourceRawMeta",
|
|
1266
|
-
"name": "ResourceRawMeta",
|
|
1267
|
-
"description": "dummy-description",
|
|
1268
|
-
"resourceFormatId": "FORMAT-ApplicationJson",
|
|
1269
|
-
"extractionSchema": {
|
|
1270
|
-
"$anchor": "ResourceRawMeta",
|
|
1271
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1272
|
-
"type": "object",
|
|
1273
|
-
"allOf": [
|
|
1274
|
-
{
|
|
1275
|
-
"$ref": "#/$defs/ResourceBase"
|
|
1276
|
-
},
|
|
1277
|
-
{
|
|
1278
|
-
"$ref": "#/$defs/CanonicalRef"
|
|
1279
|
-
},
|
|
1280
|
-
{
|
|
1281
|
-
"$ref": "#/$defs/Timestamp"
|
|
1282
|
-
}
|
|
1283
|
-
],
|
|
1284
|
-
"unevaluatedProperties": false
|
|
1285
|
-
}
|
|
1286
|
-
}
|
|
1287
|
-
},
|
|
1288
1232
|
"Path": {
|
|
1289
1233
|
"identity": "RESOURCE-Path",
|
|
1290
1234
|
"resourceTypeId": "TYPE-ResourceType",
|
|
@@ -42,20 +42,6 @@
|
|
|
42
42
|
"$anchor": "BranchStepId",
|
|
43
43
|
"pattern": "^BRANCHSTEP-.+$"
|
|
44
44
|
},
|
|
45
|
-
"CanonicalRef": {
|
|
46
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
47
|
-
"type": "object",
|
|
48
|
-
"properties": {
|
|
49
|
-
"canonicalRef": {
|
|
50
|
-
"$comment": "This points to the canonical resource with an identical contentHash as this one. If no such resource exists, this resource will itself be the canonical resource and point to itself (i.e. canonicalRef = identity).",
|
|
51
|
-
"$ref": "#/$defs/ResourceId"
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
"required": [
|
|
55
|
-
"canonicalRef"
|
|
56
|
-
],
|
|
57
|
-
"$anchor": "CanonicalRef"
|
|
58
|
-
},
|
|
59
45
|
"ConditionalWrapper": {
|
|
60
46
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
61
47
|
"type": "object",
|
|
@@ -244,6 +230,13 @@
|
|
|
244
230
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
245
231
|
"type": "object"
|
|
246
232
|
},
|
|
233
|
+
"required": {
|
|
234
|
+
"type": "array",
|
|
235
|
+
"items": {
|
|
236
|
+
"type": "string"
|
|
237
|
+
},
|
|
238
|
+
"uniqueItems": true
|
|
239
|
+
},
|
|
247
240
|
"additionalProperties": {
|
|
248
241
|
"const": false
|
|
249
242
|
},
|
|
@@ -303,16 +296,16 @@
|
|
|
303
296
|
"type": "object",
|
|
304
297
|
"properties": {
|
|
305
298
|
"type": {
|
|
306
|
-
"
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
299
|
+
"enum": [
|
|
300
|
+
"string",
|
|
301
|
+
"number",
|
|
302
|
+
"integer",
|
|
303
|
+
"boolean"
|
|
304
|
+
]
|
|
311
305
|
}
|
|
312
306
|
},
|
|
313
307
|
"required": [
|
|
314
|
-
"type"
|
|
315
|
-
"pattern"
|
|
308
|
+
"type"
|
|
316
309
|
],
|
|
317
310
|
"$anchor": "IdSchemaValue"
|
|
318
311
|
},
|
|
@@ -369,8 +362,8 @@
|
|
|
369
362
|
"properties": {
|
|
370
363
|
"$ref": {
|
|
371
364
|
"type": "string",
|
|
372
|
-
"$comment": "Anchors
|
|
373
|
-
"pattern": "^#[A-Za-z][A-Za-z0-9._-]*Id$"
|
|
365
|
+
"$comment": "Supports both anchor syntax (#<Name>Id) and JSON Pointer syntax (#/path/to/definition). Anchors use #<Name>Id for identity refs. Top-level and nested $defs should expose an $anchor matching <Name>Id.",
|
|
366
|
+
"pattern": "^#([A-Za-z][A-Za-z0-9._-]*Id|/.*)$"
|
|
374
367
|
}
|
|
375
368
|
},
|
|
376
369
|
"required": [
|
|
@@ -724,23 +717,6 @@
|
|
|
724
717
|
"unevaluatedProperties": false,
|
|
725
718
|
"$anchor": "ResourcePotentialOutput"
|
|
726
719
|
},
|
|
727
|
-
"ResourceRawMeta": {
|
|
728
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
729
|
-
"type": "object",
|
|
730
|
-
"allOf": [
|
|
731
|
-
{
|
|
732
|
-
"$ref": "#/$defs/ResourceBase"
|
|
733
|
-
},
|
|
734
|
-
{
|
|
735
|
-
"$ref": "#/$defs/CanonicalRef"
|
|
736
|
-
},
|
|
737
|
-
{
|
|
738
|
-
"$ref": "#/$defs/Timestamp"
|
|
739
|
-
}
|
|
740
|
-
],
|
|
741
|
-
"unevaluatedProperties": false,
|
|
742
|
-
"$anchor": "ResourceRawMeta"
|
|
743
|
-
},
|
|
744
720
|
"ResourceRoleId": {
|
|
745
721
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
746
722
|
"type": "string",
|
|
@@ -208,6 +208,13 @@
|
|
|
208
208
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
209
209
|
"type": "object"
|
|
210
210
|
},
|
|
211
|
+
"required": {
|
|
212
|
+
"type": "array",
|
|
213
|
+
"items": {
|
|
214
|
+
"type": "string"
|
|
215
|
+
},
|
|
216
|
+
"uniqueItems": true
|
|
217
|
+
},
|
|
211
218
|
"additionalProperties": {
|
|
212
219
|
"const": false
|
|
213
220
|
},
|
|
@@ -294,16 +301,16 @@
|
|
|
294
301
|
"type": "object",
|
|
295
302
|
"properties": {
|
|
296
303
|
"type": {
|
|
297
|
-
"
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
304
|
+
"enum": [
|
|
305
|
+
"string",
|
|
306
|
+
"number",
|
|
307
|
+
"integer",
|
|
308
|
+
"boolean"
|
|
309
|
+
]
|
|
302
310
|
}
|
|
303
311
|
},
|
|
304
312
|
"required": [
|
|
305
|
-
"type"
|
|
306
|
-
"pattern"
|
|
313
|
+
"type"
|
|
307
314
|
],
|
|
308
315
|
"$anchor": "IdSchemaValue"
|
|
309
316
|
},
|
|
@@ -313,8 +320,8 @@
|
|
|
313
320
|
"properties": {
|
|
314
321
|
"$ref": {
|
|
315
322
|
"type": "string",
|
|
316
|
-
"$comment": "Anchors
|
|
317
|
-
"pattern": "^#[A-Za-z][A-Za-z0-9._-]*Id$"
|
|
323
|
+
"$comment": "Supports both anchor syntax (#<Name>Id) and JSON Pointer syntax (#/path/to/definition). Anchors use #<Name>Id for identity refs. Top-level and nested $defs should expose an $anchor matching <Name>Id.",
|
|
324
|
+
"pattern": "^#([A-Za-z][A-Za-z0-9._-]*Id|/.*)$"
|
|
318
325
|
}
|
|
319
326
|
},
|
|
320
327
|
"required": [
|
|
@@ -87,8 +87,8 @@
|
|
|
87
87
|
"properties": {
|
|
88
88
|
"$ref": {
|
|
89
89
|
"type": "string",
|
|
90
|
-
"$comment": "Anchors
|
|
91
|
-
"pattern": "^#[A-Za-z][A-Za-z0-9._-]*Id$"
|
|
90
|
+
"$comment": "Supports both anchor syntax (#<Name>Id) and JSON Pointer syntax (#/path/to/definition). Anchors use #<Name>Id for identity refs. Top-level and nested $defs should expose an $anchor matching <Name>Id.",
|
|
91
|
+
"pattern": "^#([A-Za-z][A-Za-z0-9._-]*Id|/.*)$"
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
94
|
"additionalProperties": false
|
|
@@ -104,16 +104,16 @@
|
|
|
104
104
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
105
105
|
"type": "object",
|
|
106
106
|
"required": [
|
|
107
|
-
"type"
|
|
108
|
-
"pattern"
|
|
107
|
+
"type"
|
|
109
108
|
],
|
|
110
109
|
"properties": {
|
|
111
110
|
"type": {
|
|
112
|
-
"
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
111
|
+
"enum": [
|
|
112
|
+
"string",
|
|
113
|
+
"number",
|
|
114
|
+
"integer",
|
|
115
|
+
"boolean"
|
|
116
|
+
]
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
}
|
|
@@ -259,6 +259,13 @@
|
|
|
259
259
|
"type": {
|
|
260
260
|
"const": "object"
|
|
261
261
|
},
|
|
262
|
+
"required": {
|
|
263
|
+
"type": "array",
|
|
264
|
+
"items": {
|
|
265
|
+
"type": "string"
|
|
266
|
+
},
|
|
267
|
+
"uniqueItems": true
|
|
268
|
+
},
|
|
262
269
|
"properties": {
|
|
263
270
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
264
271
|
"type": "object"
|
|
@@ -870,26 +877,6 @@
|
|
|
870
877
|
"unevaluatedProperties": false
|
|
871
878
|
}
|
|
872
879
|
},
|
|
873
|
-
"CanonicalRef": {
|
|
874
|
-
"identity": "TYPE-CanonicalRef",
|
|
875
|
-
"name": "CanonicalRef",
|
|
876
|
-
"description": "dummy-description",
|
|
877
|
-
"resourceFormatId": "FORMAT-ApplicationJson",
|
|
878
|
-
"extractionSchema": {
|
|
879
|
-
"$anchor": "CanonicalRef",
|
|
880
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
881
|
-
"type": "object",
|
|
882
|
-
"required": [
|
|
883
|
-
"canonicalRef"
|
|
884
|
-
],
|
|
885
|
-
"properties": {
|
|
886
|
-
"canonicalRef": {
|
|
887
|
-
"$comment": "This points to the canonical resource with an identical contentHash as this one. If no such resource exists, this resource will itself be the canonical resource and point to itself (i.e. canonicalRef = identity).",
|
|
888
|
-
"$ref": "#ResourceId"
|
|
889
|
-
}
|
|
890
|
-
}
|
|
891
|
-
}
|
|
892
|
-
},
|
|
893
880
|
"Timestamp": {
|
|
894
881
|
"identity": "TYPE-Timestamp",
|
|
895
882
|
"name": "Timestamp",
|
|
@@ -910,29 +897,6 @@
|
|
|
910
897
|
}
|
|
911
898
|
}
|
|
912
899
|
},
|
|
913
|
-
"ResourceRawMeta": {
|
|
914
|
-
"identity": "TYPE-ResourceRawMeta",
|
|
915
|
-
"name": "ResourceRawMeta",
|
|
916
|
-
"description": "dummy-description",
|
|
917
|
-
"resourceFormatId": "FORMAT-ApplicationJson",
|
|
918
|
-
"extractionSchema": {
|
|
919
|
-
"$anchor": "ResourceRawMeta",
|
|
920
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
921
|
-
"type": "object",
|
|
922
|
-
"allOf": [
|
|
923
|
-
{
|
|
924
|
-
"$ref": "#ResourceBase"
|
|
925
|
-
},
|
|
926
|
-
{
|
|
927
|
-
"$ref": "#CanonicalRef"
|
|
928
|
-
},
|
|
929
|
-
{
|
|
930
|
-
"$ref": "#Timestamp"
|
|
931
|
-
}
|
|
932
|
-
],
|
|
933
|
-
"unevaluatedProperties": false
|
|
934
|
-
}
|
|
935
|
-
},
|
|
936
900
|
"Path": {
|
|
937
901
|
"identity": "TYPE-Path",
|
|
938
902
|
"name": "Path",
|
package/dist/index.d.ts
CHANGED
|
@@ -4,5 +4,5 @@ export { default as JobSchema } from './genesis/generated/schemas/Job.js';
|
|
|
4
4
|
export type { Resource_ResourceFormat as Resource_ResourceFormatJson } from './_lib/types/Resource_ResourceFormat.js';
|
|
5
5
|
export type { Resource_ResourceType as Resource_ResourceTypeJson } from './_lib/types/Resource_ResourceType.js';
|
|
6
6
|
export type { Resource_Job as Resource_JobJson } from './_lib/types/Resource_Job.js';
|
|
7
|
-
export type { Documented as DocumentedJson, ResourceFormatId as ResourceFormatIdJson, ResourceFormat as ResourceFormatJson, ExtractionSchema as ExtractionSchemaJson, ExtractionSchemaValue as ExtractionSchemaValueJson, IdentityProp as IdentityPropJson, MeritProp as MeritPropJson, ResourceTypeId as ResourceTypeIdJson, ResourceType as ResourceTypeJson, ResourceRoleId as ResourceRoleIdJson, ResourceRoleValue as ResourceRoleValueJson, ExecutionId as ExecutionIdJson, Execution as ExecutionJson, ConditionalWrapper as ConditionalWrapperJson, RoleMap as RoleMapJson, RolesOuter as RolesOuterJson, RoleBindingMap as RoleBindingMapJson, RoleBindingsOuter as RoleBindingsOuterJson, ResourceId as ResourceIdJson, WorkStepId as WorkStepIdJson, BranchStepId as BranchStepIdJson, WhileStepId as WhileStepIdJson, ForStepId as ForStepIdJson, WorkStep as WorkStepJson, BranchStep as BranchStepJson, WhileStep as WhileStepJson, ForStep as ForStepJson, Step as StepJson, ResourceSocket as ResourceSocketJson, ResourcePotentialInput as ResourcePotentialInputJson, ResourcePotentialOutput as ResourcePotentialOutputJson,
|
|
7
|
+
export type { Documented as DocumentedJson, ResourceFormatId as ResourceFormatIdJson, ResourceFormat as ResourceFormatJson, ExtractionSchema as ExtractionSchemaJson, ExtractionSchemaValue as ExtractionSchemaValueJson, IdentityProp as IdentityPropJson, MeritProp as MeritPropJson, ResourceTypeId as ResourceTypeIdJson, ResourceType as ResourceTypeJson, ResourceRoleId as ResourceRoleIdJson, ResourceRoleValue as ResourceRoleValueJson, ExecutionId as ExecutionIdJson, Execution as ExecutionJson, ConditionalWrapper as ConditionalWrapperJson, RoleMap as RoleMapJson, RolesOuter as RolesOuterJson, RoleBindingMap as RoleBindingMapJson, RoleBindingsOuter as RoleBindingsOuterJson, ResourceId as ResourceIdJson, WorkStepId as WorkStepIdJson, BranchStepId as BranchStepIdJson, WhileStepId as WhileStepIdJson, ForStepId as ForStepIdJson, WorkStep as WorkStepJson, BranchStep as BranchStepJson, WhileStep as WhileStepJson, ForStep as ForStepJson, Step as StepJson, ResourceSocket as ResourceSocketJson, ResourcePotentialInput as ResourcePotentialInputJson, ResourcePotentialOutput as ResourcePotentialOutputJson, Resource as ResourceJson, StrategyState as StrategyStateJson, StrategyStateValue as StrategyStateValueJson, StatelessStrategy as StatelessStrategyIdJson, StatelessStrategy as StatelessStrategyJson, StatefulStrategyId as StatefulStrategyIdJson, StatefulStrategy as StatefulStrategyJson, Job as JobJson, JsonValue as JsonValueJson, } from './_lib/types/types.js';
|
|
8
8
|
export { unsafeBrand, asResourceTypeId, asResourceRoleId, asExecutionId, asResourceId, asWorkStepId, asBranchStepId, asForStepId, asResourceFormatId, asWhileStepId, asStatelessStrategyId, asStatefulStrategyId, asResourceTypeIds, asResourceRoleIds, asExecutionIds, asResourceIds, asWorkStepIds, asBranchStepIds, asForStepIds, asResourceFormatIds, asWhileStepIds, asStatelessStrategyIds, asStatefulStrategyIds, } from './scripts/brandFactories.js';
|
|
@@ -235,6 +235,15 @@ async function main() {
|
|
|
235
235
|
// Robust single-pass: delete the entire line (with optional trailing newline) where the signature appears.
|
|
236
236
|
// This avoids introducing extra blank lines while handling CRLF/LF and varying indentation.
|
|
237
237
|
ts = ts.replace(/^\s*\[k:\s*string\]:\s*unknown;\s*(?:\r?\n)?/gm, '');
|
|
238
|
+
// Fix meta-schema types where json-schema-to-typescript incorrectly interprets
|
|
239
|
+
// schema definitions as literal values. ExtractionSchemaValue describes what
|
|
240
|
+
// an extraction schema looks like, not what the schema meta-properties should be.
|
|
241
|
+
ts = ts.replace(/^(export type ExtractionSchemaValue =[\s\S]*?)(\$defs\?:\s*\{[\s\S]*?};)/gm, '$1$defs?: {\n [k: string]: unknown;\n };');
|
|
242
|
+
ts = ts.replace(/^(export type ExtractionSchemaValue =[\s\S]*?)(properties\?:\s*\{[\s\S]*?};)/gm, '$1properties?: {\n [k: string]: unknown;\n };');
|
|
243
|
+
ts = ts.replace(/^(export type ExtractionSchemaValue =[\s\S]*?)(allOf\?:\s*\[\{type:\s*"array";\s*items:\s*\{type:\s*"object"\}\}\];)/gm, '$1allOf?: Array<{[k: string]: unknown}>;');
|
|
244
|
+
ts = ts.replace(/^(export type ExtractionSchemaValue =[\s\S]*?)(required\?:\s*\[\{type:\s*"array";\s*items:\s*\{type:\s*"string"\};\s*uniqueItems:\s*true\}\];)/gm, '$1required?: string[];');
|
|
245
|
+
// Similarly fix IdentityProp which has the same issue
|
|
246
|
+
ts = ts.replace(/^(export interface IdentityProp[\s\S]*?)(required:\s*\[\{type:\s*"array";\s*contains:\s*\{const:\s*"identity"\};\s*items:\s*\{type:\s*"string"\};\s*uniqueItems:\s*true\}\];)/gm, '$1required?: string[];');
|
|
238
247
|
// Prune verbose type/interface names produced from absolute $id URLs.
|
|
239
248
|
// Deterministic pruning based on original $id -> baseName map
|
|
240
249
|
// This avoids heuristic truncation that dropped prefixes like Resource / Workflow.
|
package/package.json
CHANGED
|
@@ -1,51 +1,56 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@toolproof-npm/schema",
|
|
3
|
+
"version": "0.1.37",
|
|
4
|
+
"description": "JSON schemas and TypeScript types for ToolProof",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"toolproof",
|
|
7
|
+
"schemas",
|
|
8
|
+
"json-schema",
|
|
9
|
+
"typescript"
|
|
10
|
+
],
|
|
11
|
+
"author": "ToolProof Team",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/ToolProof/core.git",
|
|
16
|
+
"directory": "packages/_schemas"
|
|
17
|
+
},
|
|
18
|
+
"homepage": "https://github.com/ToolProof/core#readme",
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/ToolProof/core/issues"
|
|
21
|
+
},
|
|
22
|
+
"type": "module",
|
|
23
|
+
"main": "dist/index.js",
|
|
24
|
+
"types": "dist/index.d.ts",
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"import": "./dist/index.js",
|
|
28
|
+
"types": "./dist/index.d.ts"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"dist",
|
|
33
|
+
"README.md"
|
|
34
|
+
],
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@apidevtools/json-schema-ref-parser": "^14.2.1",
|
|
37
|
+
"@types/node": "^20.8.1",
|
|
38
|
+
"ajv-cli": "^5.0.0",
|
|
39
|
+
"ajv-formats": "^3.0.1",
|
|
40
|
+
"json-schema-to-typescript": "^15.0.4",
|
|
41
|
+
"rimraf": "^5.0.0",
|
|
42
|
+
"typescript": "^5.0.0"
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "tsc -b",
|
|
46
|
+
"build:scripts": "tsc -p tsconfig.scripts.json",
|
|
47
|
+
"rewriteAnchors": "node ./dist/scripts/rewriteAnchors.js",
|
|
48
|
+
"extractSchemas": "node ./dist/scripts/extractSchemas.js",
|
|
49
|
+
"extractSubschema": "node ./dist/scripts/extractSubschemaWithDefs.js",
|
|
50
|
+
"generateTypes": "node ./dist/scripts/generateTypes.js",
|
|
51
|
+
"generateResourceTypeType": "node ./dist/scripts/generateResourceTypeType.js",
|
|
52
|
+
"generateResourceEnvelopes": "node ./dist/scripts/generateResourceEnvelopes.js",
|
|
53
|
+
"generateSchemaShims": "node ./dist/scripts/generateSchemaShims.js",
|
|
54
|
+
"update": "rimraf /s /q dist && pnpm run build:scripts && pnpm run rewriteAnchors && pnpm run generateResourceEnvelopes && pnpm run extractSchemas && pnpm run extractSubschema -- --name Job && pnpm run extractSubschema -- --name ResourceFormat && pnpm run extractSubschema -- --name ResourceType && pnpm run extractSubschema -- --name StatelessStrategy && pnpm run extractSubschema -- --name StatefulStrategy && pnpm run generateSchemaShims && pnpm run generateTypes && pnpm run generateResourceTypeType -- --name Job && pnpm run generateResourceTypeType -- --name ResourceFormat && pnpm run generateResourceTypeType -- --name ResourceType && pnpm run generateResourceTypeType -- --name StatelessStrategy && pnpm run build"
|
|
55
|
+
}
|
|
51
56
|
}
|