artifact-chain-assistant 0.8.2 → 0.8.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/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/CHANGELOG.md +13 -0
- package/INSTALL.md +10 -10
- package/README.md +4 -4
- package/README.zh-CN.md +4 -4
- package/adapters/claude/.claude-plugin/plugin.json +1 -1
- package/adapters/claude/INSTALL.md +10 -10
- package/adapters/claude/agent-methods/catalog.yaml +1 -1
- package/adapters/claude/compatibility.json +4 -4
- package/adapters/claude/families-src/prd-feature/implementation.yaml +39 -0
- package/adapters/claude/families-src/scenario-script/implementation.yaml +39 -0
- package/adapters/claude/family-apis/catalog.json +16 -0
- package/adapters/claude/family-apis/e2e-test/api.json +205 -0
- package/adapters/claude/family-apis/schema/family-api.schema.json +235 -0
- package/adapters/claude/schemas/project-facts.schema.json +80 -0
- package/adapters/claude/scripts/check-family-api.mjs +84 -0
- package/adapters/claude/scripts/export-family-api.mjs +184 -0
- package/adapters/claude/scripts/family-compile.mjs +309 -0
- package/adapters/claude/scripts/family-help-render.mjs +214 -0
- package/adapters/claude/scripts/lib/family-api-validator.mjs +413 -0
- package/adapters/claude/scripts/lib/generated/canonical-json-v1-manifest.json +7 -0
- package/adapters/claude/scripts/lib/generated/canonical-json-v1-vectors.generated.json +50 -0
- package/adapters/claude/scripts/lib/generated/canonical-json-v1.generated.mjs +130 -0
- package/adapters/claude/scripts/lib/generated/family-api-validator.generated.mjs +1756 -0
- package/adapters/claude/scripts/lib/generated/project-facts-validator.generated.mjs +638 -0
- package/adapters/claude/scripts/lib/generated/schema-validator-manifest.json +20 -0
- package/adapters/claude/scripts/lib/method-query.mjs +177 -0
- package/adapters/claude/scripts/method-query.mjs +67 -0
- package/adapters/claude/skills/setup/SKILL.md +2 -1
- package/adapters/codex/.codex-plugin/plugin.json +1 -1
- package/adapters/codex/INSTALL.md +10 -10
- package/adapters/codex/agent-methods/catalog.yaml +1 -1
- package/adapters/codex/compatibility.json +4 -4
- package/adapters/codex/families-src/prd-feature/implementation.yaml +39 -0
- package/adapters/codex/families-src/scenario-script/implementation.yaml +39 -0
- package/adapters/codex/family-apis/catalog.json +16 -0
- package/adapters/codex/family-apis/e2e-test/api.json +205 -0
- package/adapters/codex/family-apis/schema/family-api.schema.json +235 -0
- package/adapters/codex/schemas/project-facts.schema.json +80 -0
- package/adapters/codex/scripts/check-family-api.mjs +84 -0
- package/adapters/codex/scripts/export-family-api.mjs +184 -0
- package/adapters/codex/scripts/family-compile.mjs +309 -0
- package/adapters/codex/scripts/family-help-render.mjs +214 -0
- package/adapters/codex/scripts/lib/family-api-validator.mjs +413 -0
- package/adapters/codex/scripts/lib/generated/canonical-json-v1-manifest.json +7 -0
- package/adapters/codex/scripts/lib/generated/canonical-json-v1-vectors.generated.json +50 -0
- package/adapters/codex/scripts/lib/generated/canonical-json-v1.generated.mjs +130 -0
- package/adapters/codex/scripts/lib/generated/family-api-validator.generated.mjs +1756 -0
- package/adapters/codex/scripts/lib/generated/project-facts-validator.generated.mjs +638 -0
- package/adapters/codex/scripts/lib/generated/schema-validator-manifest.json +20 -0
- package/adapters/codex/scripts/lib/method-query.mjs +177 -0
- package/adapters/codex/scripts/method-query.mjs +67 -0
- package/adapters/codex/skills/setup/SKILL.md +2 -1
- package/agent-methods/catalog.yaml +1 -1
- package/compatibility.json +4 -4
- package/families-src/prd-feature/implementation.yaml +39 -0
- package/families-src/scenario-script/implementation.yaml +39 -0
- package/family-apis/catalog.json +16 -0
- package/family-apis/e2e-test/api.json +205 -0
- package/family-apis/schema/family-api.schema.json +235 -0
- package/package.json +2 -2
- package/schemas/project-facts.schema.json +80 -0
- package/scripts/check-family-api.mjs +84 -0
- package/scripts/export-family-api.mjs +184 -0
- package/scripts/family-compile.mjs +309 -0
- package/scripts/family-help-render.mjs +214 -0
- package/scripts/generate-canonical-json-protocol.mjs +75 -0
- package/scripts/generate-schema-validators.mjs +141 -0
- package/scripts/lib/family-api-validator.mjs +413 -0
- package/scripts/lib/generated/canonical-json-v1-manifest.json +7 -0
- package/scripts/lib/generated/canonical-json-v1-vectors.generated.json +50 -0
- package/scripts/lib/generated/canonical-json-v1.generated.mjs +130 -0
- package/scripts/lib/generated/family-api-validator.generated.mjs +1756 -0
- package/scripts/lib/generated/project-facts-validator.generated.mjs +638 -0
- package/scripts/lib/generated/schema-validator-manifest.json +20 -0
- package/scripts/lib/method-query.mjs +177 -0
- package/scripts/method-query.mjs +67 -0
- package/skills/setup/SKILL.md +2 -1
- package/skills-src/setup/SKILL.md +2 -1
|
@@ -0,0 +1,638 @@
|
|
|
1
|
+
// This file is generated by scripts/generate-schema-validators.mjs.
|
|
2
|
+
// Source: project-facts; schema digest: sha256:67255ae925097eebfe84032bb232cee03e7991c26b39060bb50e5ca34d9930ad; generator digest: sha256:c82a4e548f72cdfa77a72c69cca684e0fcbe6d65d4bd63485270edac8a3971f9
|
|
3
|
+
"use strict";
|
|
4
|
+
export const validate = validate10;
|
|
5
|
+
export default validate10;
|
|
6
|
+
const schema11 = {"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://artifact-chain.dev/schemas/project-facts.schema.json","title":"Project Facts Evidence Envelope","description":"Structured envelope capturing project identity, configuration, graph state, and evidence for registry/planner consumption","type":"object","required":["schemaVersion","projectRoot","configDigest","artifactGraphSummary","targetArtifact","contractRevisionDigest","proofStatus","versionLockStatus","sourcesFreshness","bindingFreshness","evidenceDigest"],"additionalProperties":false,"properties":{"schemaVersion":{"type":"integer","const":1},"projectRoot":{"type":"string","minLength":1,"description":"Project root identity (path or canonical identifier)"},"configDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$","description":"SHA-256 digest of artifact-graph.config.yaml content"},"policyDigest":{"type":["string","null"],"pattern":"^sha256:[a-f0-9]{64}$","description":"SHA-256 digest of project policy overlay, or null if none"},"artifactGraphSummary":{"type":"object","required":["artifactCount","edgeCount","contextTargets"],"additionalProperties":false,"properties":{"artifactCount":{"type":"integer","minimum":0},"edgeCount":{"type":"integer","minimum":0},"contextTargets":{"type":"array","items":{"type":"string"}}}},"targetArtifact":{"type":"object","required":["type","id"],"additionalProperties":false,"properties":{"type":{"type":"string","minLength":1},"id":{"type":"string","minLength":1}}},"contractRevisionDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$","description":"SHA-256 digest of the contract revision content"},"proofStatus":{"type":"string","enum":["present","missing","stale"]},"versionLockStatus":{"type":"string","enum":["fresh","stale","missing"]},"sourcesFreshness":{"type":"string","enum":["fresh","stale","missing"],"description":"Freshness of the adopted catalog source set"},"bindingFreshness":{"type":"string","enum":["fresh","stale","missing"],"description":"Freshness of the project provider binding"},"evidenceDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$","description":"SHA-256 digest of the envelope content excluding this field, using stable key serialization"}}};
|
|
7
|
+
const func2 = Object.prototype.hasOwnProperty;
|
|
8
|
+
const func3 = function ucs2length(str) {
|
|
9
|
+
const len = str.length;
|
|
10
|
+
let length = 0;
|
|
11
|
+
let pos = 0;
|
|
12
|
+
while (pos < len) {
|
|
13
|
+
length++;
|
|
14
|
+
let value = str.charCodeAt(pos++);
|
|
15
|
+
if (value >= 0xd800 && value <= 0xdbff && pos < len) {
|
|
16
|
+
value = str.charCodeAt(pos);
|
|
17
|
+
if ((value & 0xfc00) === 0xdc00) pos++;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return length;
|
|
21
|
+
};
|
|
22
|
+
const pattern0 = new RegExp("^sha256:[a-f0-9]{64}$", "u");
|
|
23
|
+
|
|
24
|
+
function validate10(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){
|
|
25
|
+
/*# sourceURL="https://artifact-chain.dev/schemas/project-facts.schema.json" */;
|
|
26
|
+
let vErrors = null;
|
|
27
|
+
let errors = 0;
|
|
28
|
+
if(data && typeof data == "object" && !Array.isArray(data)){
|
|
29
|
+
if(data.schemaVersion === undefined){
|
|
30
|
+
const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "schemaVersion"},message:"must have required property '"+"schemaVersion"+"'"};
|
|
31
|
+
if(vErrors === null){
|
|
32
|
+
vErrors = [err0];
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
vErrors.push(err0);
|
|
36
|
+
}
|
|
37
|
+
errors++;
|
|
38
|
+
}
|
|
39
|
+
if(data.projectRoot === undefined){
|
|
40
|
+
const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "projectRoot"},message:"must have required property '"+"projectRoot"+"'"};
|
|
41
|
+
if(vErrors === null){
|
|
42
|
+
vErrors = [err1];
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
vErrors.push(err1);
|
|
46
|
+
}
|
|
47
|
+
errors++;
|
|
48
|
+
}
|
|
49
|
+
if(data.configDigest === undefined){
|
|
50
|
+
const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "configDigest"},message:"must have required property '"+"configDigest"+"'"};
|
|
51
|
+
if(vErrors === null){
|
|
52
|
+
vErrors = [err2];
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
vErrors.push(err2);
|
|
56
|
+
}
|
|
57
|
+
errors++;
|
|
58
|
+
}
|
|
59
|
+
if(data.artifactGraphSummary === undefined){
|
|
60
|
+
const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "artifactGraphSummary"},message:"must have required property '"+"artifactGraphSummary"+"'"};
|
|
61
|
+
if(vErrors === null){
|
|
62
|
+
vErrors = [err3];
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
vErrors.push(err3);
|
|
66
|
+
}
|
|
67
|
+
errors++;
|
|
68
|
+
}
|
|
69
|
+
if(data.targetArtifact === undefined){
|
|
70
|
+
const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "targetArtifact"},message:"must have required property '"+"targetArtifact"+"'"};
|
|
71
|
+
if(vErrors === null){
|
|
72
|
+
vErrors = [err4];
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
vErrors.push(err4);
|
|
76
|
+
}
|
|
77
|
+
errors++;
|
|
78
|
+
}
|
|
79
|
+
if(data.contractRevisionDigest === undefined){
|
|
80
|
+
const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "contractRevisionDigest"},message:"must have required property '"+"contractRevisionDigest"+"'"};
|
|
81
|
+
if(vErrors === null){
|
|
82
|
+
vErrors = [err5];
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
vErrors.push(err5);
|
|
86
|
+
}
|
|
87
|
+
errors++;
|
|
88
|
+
}
|
|
89
|
+
if(data.proofStatus === undefined){
|
|
90
|
+
const err6 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "proofStatus"},message:"must have required property '"+"proofStatus"+"'"};
|
|
91
|
+
if(vErrors === null){
|
|
92
|
+
vErrors = [err6];
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
vErrors.push(err6);
|
|
96
|
+
}
|
|
97
|
+
errors++;
|
|
98
|
+
}
|
|
99
|
+
if(data.versionLockStatus === undefined){
|
|
100
|
+
const err7 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "versionLockStatus"},message:"must have required property '"+"versionLockStatus"+"'"};
|
|
101
|
+
if(vErrors === null){
|
|
102
|
+
vErrors = [err7];
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
vErrors.push(err7);
|
|
106
|
+
}
|
|
107
|
+
errors++;
|
|
108
|
+
}
|
|
109
|
+
if(data.sourcesFreshness === undefined){
|
|
110
|
+
const err8 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "sourcesFreshness"},message:"must have required property '"+"sourcesFreshness"+"'"};
|
|
111
|
+
if(vErrors === null){
|
|
112
|
+
vErrors = [err8];
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
vErrors.push(err8);
|
|
116
|
+
}
|
|
117
|
+
errors++;
|
|
118
|
+
}
|
|
119
|
+
if(data.bindingFreshness === undefined){
|
|
120
|
+
const err9 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "bindingFreshness"},message:"must have required property '"+"bindingFreshness"+"'"};
|
|
121
|
+
if(vErrors === null){
|
|
122
|
+
vErrors = [err9];
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
vErrors.push(err9);
|
|
126
|
+
}
|
|
127
|
+
errors++;
|
|
128
|
+
}
|
|
129
|
+
if(data.evidenceDigest === undefined){
|
|
130
|
+
const err10 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "evidenceDigest"},message:"must have required property '"+"evidenceDigest"+"'"};
|
|
131
|
+
if(vErrors === null){
|
|
132
|
+
vErrors = [err10];
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
vErrors.push(err10);
|
|
136
|
+
}
|
|
137
|
+
errors++;
|
|
138
|
+
}
|
|
139
|
+
for(const key0 in data){
|
|
140
|
+
if(!(func2.call(schema11.properties, key0))){
|
|
141
|
+
const err11 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};
|
|
142
|
+
if(vErrors === null){
|
|
143
|
+
vErrors = [err11];
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
vErrors.push(err11);
|
|
147
|
+
}
|
|
148
|
+
errors++;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
if(data.schemaVersion !== undefined){
|
|
152
|
+
let data0 = data.schemaVersion;
|
|
153
|
+
if(!((typeof data0 == "number") && (!(data0 % 1) && !isNaN(data0)))){
|
|
154
|
+
const err12 = {instancePath:instancePath+"/schemaVersion",schemaPath:"#/properties/schemaVersion/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
|
|
155
|
+
if(vErrors === null){
|
|
156
|
+
vErrors = [err12];
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
vErrors.push(err12);
|
|
160
|
+
}
|
|
161
|
+
errors++;
|
|
162
|
+
}
|
|
163
|
+
if(1 !== data0){
|
|
164
|
+
const err13 = {instancePath:instancePath+"/schemaVersion",schemaPath:"#/properties/schemaVersion/const",keyword:"const",params:{allowedValue: 1},message:"must be equal to constant"};
|
|
165
|
+
if(vErrors === null){
|
|
166
|
+
vErrors = [err13];
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
vErrors.push(err13);
|
|
170
|
+
}
|
|
171
|
+
errors++;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
if(data.projectRoot !== undefined){
|
|
175
|
+
let data1 = data.projectRoot;
|
|
176
|
+
if(typeof data1 === "string"){
|
|
177
|
+
if(func3(data1) < 1){
|
|
178
|
+
const err14 = {instancePath:instancePath+"/projectRoot",schemaPath:"#/properties/projectRoot/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
|
|
179
|
+
if(vErrors === null){
|
|
180
|
+
vErrors = [err14];
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
vErrors.push(err14);
|
|
184
|
+
}
|
|
185
|
+
errors++;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
const err15 = {instancePath:instancePath+"/projectRoot",schemaPath:"#/properties/projectRoot/type",keyword:"type",params:{type: "string"},message:"must be string"};
|
|
190
|
+
if(vErrors === null){
|
|
191
|
+
vErrors = [err15];
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
vErrors.push(err15);
|
|
195
|
+
}
|
|
196
|
+
errors++;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
if(data.configDigest !== undefined){
|
|
200
|
+
let data2 = data.configDigest;
|
|
201
|
+
if(typeof data2 === "string"){
|
|
202
|
+
if(!pattern0.test(data2)){
|
|
203
|
+
const err16 = {instancePath:instancePath+"/configDigest",schemaPath:"#/properties/configDigest/pattern",keyword:"pattern",params:{pattern: "^sha256:[a-f0-9]{64}$"},message:"must match pattern \""+"^sha256:[a-f0-9]{64}$"+"\""};
|
|
204
|
+
if(vErrors === null){
|
|
205
|
+
vErrors = [err16];
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
vErrors.push(err16);
|
|
209
|
+
}
|
|
210
|
+
errors++;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
const err17 = {instancePath:instancePath+"/configDigest",schemaPath:"#/properties/configDigest/type",keyword:"type",params:{type: "string"},message:"must be string"};
|
|
215
|
+
if(vErrors === null){
|
|
216
|
+
vErrors = [err17];
|
|
217
|
+
}
|
|
218
|
+
else {
|
|
219
|
+
vErrors.push(err17);
|
|
220
|
+
}
|
|
221
|
+
errors++;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
if(data.policyDigest !== undefined){
|
|
225
|
+
let data3 = data.policyDigest;
|
|
226
|
+
if((typeof data3 !== "string") && (data3 !== null)){
|
|
227
|
+
const err18 = {instancePath:instancePath+"/policyDigest",schemaPath:"#/properties/policyDigest/type",keyword:"type",params:{type: schema11.properties.policyDigest.type},message:"must be string,null"};
|
|
228
|
+
if(vErrors === null){
|
|
229
|
+
vErrors = [err18];
|
|
230
|
+
}
|
|
231
|
+
else {
|
|
232
|
+
vErrors.push(err18);
|
|
233
|
+
}
|
|
234
|
+
errors++;
|
|
235
|
+
}
|
|
236
|
+
if(typeof data3 === "string"){
|
|
237
|
+
if(!pattern0.test(data3)){
|
|
238
|
+
const err19 = {instancePath:instancePath+"/policyDigest",schemaPath:"#/properties/policyDigest/pattern",keyword:"pattern",params:{pattern: "^sha256:[a-f0-9]{64}$"},message:"must match pattern \""+"^sha256:[a-f0-9]{64}$"+"\""};
|
|
239
|
+
if(vErrors === null){
|
|
240
|
+
vErrors = [err19];
|
|
241
|
+
}
|
|
242
|
+
else {
|
|
243
|
+
vErrors.push(err19);
|
|
244
|
+
}
|
|
245
|
+
errors++;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
if(data.artifactGraphSummary !== undefined){
|
|
250
|
+
let data4 = data.artifactGraphSummary;
|
|
251
|
+
if(data4 && typeof data4 == "object" && !Array.isArray(data4)){
|
|
252
|
+
if(data4.artifactCount === undefined){
|
|
253
|
+
const err20 = {instancePath:instancePath+"/artifactGraphSummary",schemaPath:"#/properties/artifactGraphSummary/required",keyword:"required",params:{missingProperty: "artifactCount"},message:"must have required property '"+"artifactCount"+"'"};
|
|
254
|
+
if(vErrors === null){
|
|
255
|
+
vErrors = [err20];
|
|
256
|
+
}
|
|
257
|
+
else {
|
|
258
|
+
vErrors.push(err20);
|
|
259
|
+
}
|
|
260
|
+
errors++;
|
|
261
|
+
}
|
|
262
|
+
if(data4.edgeCount === undefined){
|
|
263
|
+
const err21 = {instancePath:instancePath+"/artifactGraphSummary",schemaPath:"#/properties/artifactGraphSummary/required",keyword:"required",params:{missingProperty: "edgeCount"},message:"must have required property '"+"edgeCount"+"'"};
|
|
264
|
+
if(vErrors === null){
|
|
265
|
+
vErrors = [err21];
|
|
266
|
+
}
|
|
267
|
+
else {
|
|
268
|
+
vErrors.push(err21);
|
|
269
|
+
}
|
|
270
|
+
errors++;
|
|
271
|
+
}
|
|
272
|
+
if(data4.contextTargets === undefined){
|
|
273
|
+
const err22 = {instancePath:instancePath+"/artifactGraphSummary",schemaPath:"#/properties/artifactGraphSummary/required",keyword:"required",params:{missingProperty: "contextTargets"},message:"must have required property '"+"contextTargets"+"'"};
|
|
274
|
+
if(vErrors === null){
|
|
275
|
+
vErrors = [err22];
|
|
276
|
+
}
|
|
277
|
+
else {
|
|
278
|
+
vErrors.push(err22);
|
|
279
|
+
}
|
|
280
|
+
errors++;
|
|
281
|
+
}
|
|
282
|
+
for(const key1 in data4){
|
|
283
|
+
if(!(((key1 === "artifactCount") || (key1 === "edgeCount")) || (key1 === "contextTargets"))){
|
|
284
|
+
const err23 = {instancePath:instancePath+"/artifactGraphSummary",schemaPath:"#/properties/artifactGraphSummary/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};
|
|
285
|
+
if(vErrors === null){
|
|
286
|
+
vErrors = [err23];
|
|
287
|
+
}
|
|
288
|
+
else {
|
|
289
|
+
vErrors.push(err23);
|
|
290
|
+
}
|
|
291
|
+
errors++;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
if(data4.artifactCount !== undefined){
|
|
295
|
+
let data5 = data4.artifactCount;
|
|
296
|
+
if(!((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5)))){
|
|
297
|
+
const err24 = {instancePath:instancePath+"/artifactGraphSummary/artifactCount",schemaPath:"#/properties/artifactGraphSummary/properties/artifactCount/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
|
|
298
|
+
if(vErrors === null){
|
|
299
|
+
vErrors = [err24];
|
|
300
|
+
}
|
|
301
|
+
else {
|
|
302
|
+
vErrors.push(err24);
|
|
303
|
+
}
|
|
304
|
+
errors++;
|
|
305
|
+
}
|
|
306
|
+
if(typeof data5 == "number"){
|
|
307
|
+
if(data5 < 0 || isNaN(data5)){
|
|
308
|
+
const err25 = {instancePath:instancePath+"/artifactGraphSummary/artifactCount",schemaPath:"#/properties/artifactGraphSummary/properties/artifactCount/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};
|
|
309
|
+
if(vErrors === null){
|
|
310
|
+
vErrors = [err25];
|
|
311
|
+
}
|
|
312
|
+
else {
|
|
313
|
+
vErrors.push(err25);
|
|
314
|
+
}
|
|
315
|
+
errors++;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
if(data4.edgeCount !== undefined){
|
|
320
|
+
let data6 = data4.edgeCount;
|
|
321
|
+
if(!((typeof data6 == "number") && (!(data6 % 1) && !isNaN(data6)))){
|
|
322
|
+
const err26 = {instancePath:instancePath+"/artifactGraphSummary/edgeCount",schemaPath:"#/properties/artifactGraphSummary/properties/edgeCount/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
|
|
323
|
+
if(vErrors === null){
|
|
324
|
+
vErrors = [err26];
|
|
325
|
+
}
|
|
326
|
+
else {
|
|
327
|
+
vErrors.push(err26);
|
|
328
|
+
}
|
|
329
|
+
errors++;
|
|
330
|
+
}
|
|
331
|
+
if(typeof data6 == "number"){
|
|
332
|
+
if(data6 < 0 || isNaN(data6)){
|
|
333
|
+
const err27 = {instancePath:instancePath+"/artifactGraphSummary/edgeCount",schemaPath:"#/properties/artifactGraphSummary/properties/edgeCount/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};
|
|
334
|
+
if(vErrors === null){
|
|
335
|
+
vErrors = [err27];
|
|
336
|
+
}
|
|
337
|
+
else {
|
|
338
|
+
vErrors.push(err27);
|
|
339
|
+
}
|
|
340
|
+
errors++;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
if(data4.contextTargets !== undefined){
|
|
345
|
+
let data7 = data4.contextTargets;
|
|
346
|
+
if(Array.isArray(data7)){
|
|
347
|
+
const len0 = data7.length;
|
|
348
|
+
for(let i0=0; i0<len0; i0++){
|
|
349
|
+
if(typeof data7[i0] !== "string"){
|
|
350
|
+
const err28 = {instancePath:instancePath+"/artifactGraphSummary/contextTargets/" + i0,schemaPath:"#/properties/artifactGraphSummary/properties/contextTargets/items/type",keyword:"type",params:{type: "string"},message:"must be string"};
|
|
351
|
+
if(vErrors === null){
|
|
352
|
+
vErrors = [err28];
|
|
353
|
+
}
|
|
354
|
+
else {
|
|
355
|
+
vErrors.push(err28);
|
|
356
|
+
}
|
|
357
|
+
errors++;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
else {
|
|
362
|
+
const err29 = {instancePath:instancePath+"/artifactGraphSummary/contextTargets",schemaPath:"#/properties/artifactGraphSummary/properties/contextTargets/type",keyword:"type",params:{type: "array"},message:"must be array"};
|
|
363
|
+
if(vErrors === null){
|
|
364
|
+
vErrors = [err29];
|
|
365
|
+
}
|
|
366
|
+
else {
|
|
367
|
+
vErrors.push(err29);
|
|
368
|
+
}
|
|
369
|
+
errors++;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
else {
|
|
374
|
+
const err30 = {instancePath:instancePath+"/artifactGraphSummary",schemaPath:"#/properties/artifactGraphSummary/type",keyword:"type",params:{type: "object"},message:"must be object"};
|
|
375
|
+
if(vErrors === null){
|
|
376
|
+
vErrors = [err30];
|
|
377
|
+
}
|
|
378
|
+
else {
|
|
379
|
+
vErrors.push(err30);
|
|
380
|
+
}
|
|
381
|
+
errors++;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
if(data.targetArtifact !== undefined){
|
|
385
|
+
let data9 = data.targetArtifact;
|
|
386
|
+
if(data9 && typeof data9 == "object" && !Array.isArray(data9)){
|
|
387
|
+
if(data9.type === undefined){
|
|
388
|
+
const err31 = {instancePath:instancePath+"/targetArtifact",schemaPath:"#/properties/targetArtifact/required",keyword:"required",params:{missingProperty: "type"},message:"must have required property '"+"type"+"'"};
|
|
389
|
+
if(vErrors === null){
|
|
390
|
+
vErrors = [err31];
|
|
391
|
+
}
|
|
392
|
+
else {
|
|
393
|
+
vErrors.push(err31);
|
|
394
|
+
}
|
|
395
|
+
errors++;
|
|
396
|
+
}
|
|
397
|
+
if(data9.id === undefined){
|
|
398
|
+
const err32 = {instancePath:instancePath+"/targetArtifact",schemaPath:"#/properties/targetArtifact/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};
|
|
399
|
+
if(vErrors === null){
|
|
400
|
+
vErrors = [err32];
|
|
401
|
+
}
|
|
402
|
+
else {
|
|
403
|
+
vErrors.push(err32);
|
|
404
|
+
}
|
|
405
|
+
errors++;
|
|
406
|
+
}
|
|
407
|
+
for(const key2 in data9){
|
|
408
|
+
if(!((key2 === "type") || (key2 === "id"))){
|
|
409
|
+
const err33 = {instancePath:instancePath+"/targetArtifact",schemaPath:"#/properties/targetArtifact/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};
|
|
410
|
+
if(vErrors === null){
|
|
411
|
+
vErrors = [err33];
|
|
412
|
+
}
|
|
413
|
+
else {
|
|
414
|
+
vErrors.push(err33);
|
|
415
|
+
}
|
|
416
|
+
errors++;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
if(data9.type !== undefined){
|
|
420
|
+
let data10 = data9.type;
|
|
421
|
+
if(typeof data10 === "string"){
|
|
422
|
+
if(func3(data10) < 1){
|
|
423
|
+
const err34 = {instancePath:instancePath+"/targetArtifact/type",schemaPath:"#/properties/targetArtifact/properties/type/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
|
|
424
|
+
if(vErrors === null){
|
|
425
|
+
vErrors = [err34];
|
|
426
|
+
}
|
|
427
|
+
else {
|
|
428
|
+
vErrors.push(err34);
|
|
429
|
+
}
|
|
430
|
+
errors++;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
else {
|
|
434
|
+
const err35 = {instancePath:instancePath+"/targetArtifact/type",schemaPath:"#/properties/targetArtifact/properties/type/type",keyword:"type",params:{type: "string"},message:"must be string"};
|
|
435
|
+
if(vErrors === null){
|
|
436
|
+
vErrors = [err35];
|
|
437
|
+
}
|
|
438
|
+
else {
|
|
439
|
+
vErrors.push(err35);
|
|
440
|
+
}
|
|
441
|
+
errors++;
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
if(data9.id !== undefined){
|
|
445
|
+
let data11 = data9.id;
|
|
446
|
+
if(typeof data11 === "string"){
|
|
447
|
+
if(func3(data11) < 1){
|
|
448
|
+
const err36 = {instancePath:instancePath+"/targetArtifact/id",schemaPath:"#/properties/targetArtifact/properties/id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
|
|
449
|
+
if(vErrors === null){
|
|
450
|
+
vErrors = [err36];
|
|
451
|
+
}
|
|
452
|
+
else {
|
|
453
|
+
vErrors.push(err36);
|
|
454
|
+
}
|
|
455
|
+
errors++;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
else {
|
|
459
|
+
const err37 = {instancePath:instancePath+"/targetArtifact/id",schemaPath:"#/properties/targetArtifact/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};
|
|
460
|
+
if(vErrors === null){
|
|
461
|
+
vErrors = [err37];
|
|
462
|
+
}
|
|
463
|
+
else {
|
|
464
|
+
vErrors.push(err37);
|
|
465
|
+
}
|
|
466
|
+
errors++;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
else {
|
|
471
|
+
const err38 = {instancePath:instancePath+"/targetArtifact",schemaPath:"#/properties/targetArtifact/type",keyword:"type",params:{type: "object"},message:"must be object"};
|
|
472
|
+
if(vErrors === null){
|
|
473
|
+
vErrors = [err38];
|
|
474
|
+
}
|
|
475
|
+
else {
|
|
476
|
+
vErrors.push(err38);
|
|
477
|
+
}
|
|
478
|
+
errors++;
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
if(data.contractRevisionDigest !== undefined){
|
|
482
|
+
let data12 = data.contractRevisionDigest;
|
|
483
|
+
if(typeof data12 === "string"){
|
|
484
|
+
if(!pattern0.test(data12)){
|
|
485
|
+
const err39 = {instancePath:instancePath+"/contractRevisionDigest",schemaPath:"#/properties/contractRevisionDigest/pattern",keyword:"pattern",params:{pattern: "^sha256:[a-f0-9]{64}$"},message:"must match pattern \""+"^sha256:[a-f0-9]{64}$"+"\""};
|
|
486
|
+
if(vErrors === null){
|
|
487
|
+
vErrors = [err39];
|
|
488
|
+
}
|
|
489
|
+
else {
|
|
490
|
+
vErrors.push(err39);
|
|
491
|
+
}
|
|
492
|
+
errors++;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
else {
|
|
496
|
+
const err40 = {instancePath:instancePath+"/contractRevisionDigest",schemaPath:"#/properties/contractRevisionDigest/type",keyword:"type",params:{type: "string"},message:"must be string"};
|
|
497
|
+
if(vErrors === null){
|
|
498
|
+
vErrors = [err40];
|
|
499
|
+
}
|
|
500
|
+
else {
|
|
501
|
+
vErrors.push(err40);
|
|
502
|
+
}
|
|
503
|
+
errors++;
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
if(data.proofStatus !== undefined){
|
|
507
|
+
let data13 = data.proofStatus;
|
|
508
|
+
if(typeof data13 !== "string"){
|
|
509
|
+
const err41 = {instancePath:instancePath+"/proofStatus",schemaPath:"#/properties/proofStatus/type",keyword:"type",params:{type: "string"},message:"must be string"};
|
|
510
|
+
if(vErrors === null){
|
|
511
|
+
vErrors = [err41];
|
|
512
|
+
}
|
|
513
|
+
else {
|
|
514
|
+
vErrors.push(err41);
|
|
515
|
+
}
|
|
516
|
+
errors++;
|
|
517
|
+
}
|
|
518
|
+
if(!(((data13 === "present") || (data13 === "missing")) || (data13 === "stale"))){
|
|
519
|
+
const err42 = {instancePath:instancePath+"/proofStatus",schemaPath:"#/properties/proofStatus/enum",keyword:"enum",params:{allowedValues: schema11.properties.proofStatus.enum},message:"must be equal to one of the allowed values"};
|
|
520
|
+
if(vErrors === null){
|
|
521
|
+
vErrors = [err42];
|
|
522
|
+
}
|
|
523
|
+
else {
|
|
524
|
+
vErrors.push(err42);
|
|
525
|
+
}
|
|
526
|
+
errors++;
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
if(data.versionLockStatus !== undefined){
|
|
530
|
+
let data14 = data.versionLockStatus;
|
|
531
|
+
if(typeof data14 !== "string"){
|
|
532
|
+
const err43 = {instancePath:instancePath+"/versionLockStatus",schemaPath:"#/properties/versionLockStatus/type",keyword:"type",params:{type: "string"},message:"must be string"};
|
|
533
|
+
if(vErrors === null){
|
|
534
|
+
vErrors = [err43];
|
|
535
|
+
}
|
|
536
|
+
else {
|
|
537
|
+
vErrors.push(err43);
|
|
538
|
+
}
|
|
539
|
+
errors++;
|
|
540
|
+
}
|
|
541
|
+
if(!(((data14 === "fresh") || (data14 === "stale")) || (data14 === "missing"))){
|
|
542
|
+
const err44 = {instancePath:instancePath+"/versionLockStatus",schemaPath:"#/properties/versionLockStatus/enum",keyword:"enum",params:{allowedValues: schema11.properties.versionLockStatus.enum},message:"must be equal to one of the allowed values"};
|
|
543
|
+
if(vErrors === null){
|
|
544
|
+
vErrors = [err44];
|
|
545
|
+
}
|
|
546
|
+
else {
|
|
547
|
+
vErrors.push(err44);
|
|
548
|
+
}
|
|
549
|
+
errors++;
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
if(data.sourcesFreshness !== undefined){
|
|
553
|
+
let data15 = data.sourcesFreshness;
|
|
554
|
+
if(typeof data15 !== "string"){
|
|
555
|
+
const err45 = {instancePath:instancePath+"/sourcesFreshness",schemaPath:"#/properties/sourcesFreshness/type",keyword:"type",params:{type: "string"},message:"must be string"};
|
|
556
|
+
if(vErrors === null){
|
|
557
|
+
vErrors = [err45];
|
|
558
|
+
}
|
|
559
|
+
else {
|
|
560
|
+
vErrors.push(err45);
|
|
561
|
+
}
|
|
562
|
+
errors++;
|
|
563
|
+
}
|
|
564
|
+
if(!(((data15 === "fresh") || (data15 === "stale")) || (data15 === "missing"))){
|
|
565
|
+
const err46 = {instancePath:instancePath+"/sourcesFreshness",schemaPath:"#/properties/sourcesFreshness/enum",keyword:"enum",params:{allowedValues: schema11.properties.sourcesFreshness.enum},message:"must be equal to one of the allowed values"};
|
|
566
|
+
if(vErrors === null){
|
|
567
|
+
vErrors = [err46];
|
|
568
|
+
}
|
|
569
|
+
else {
|
|
570
|
+
vErrors.push(err46);
|
|
571
|
+
}
|
|
572
|
+
errors++;
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
if(data.bindingFreshness !== undefined){
|
|
576
|
+
let data16 = data.bindingFreshness;
|
|
577
|
+
if(typeof data16 !== "string"){
|
|
578
|
+
const err47 = {instancePath:instancePath+"/bindingFreshness",schemaPath:"#/properties/bindingFreshness/type",keyword:"type",params:{type: "string"},message:"must be string"};
|
|
579
|
+
if(vErrors === null){
|
|
580
|
+
vErrors = [err47];
|
|
581
|
+
}
|
|
582
|
+
else {
|
|
583
|
+
vErrors.push(err47);
|
|
584
|
+
}
|
|
585
|
+
errors++;
|
|
586
|
+
}
|
|
587
|
+
if(!(((data16 === "fresh") || (data16 === "stale")) || (data16 === "missing"))){
|
|
588
|
+
const err48 = {instancePath:instancePath+"/bindingFreshness",schemaPath:"#/properties/bindingFreshness/enum",keyword:"enum",params:{allowedValues: schema11.properties.bindingFreshness.enum},message:"must be equal to one of the allowed values"};
|
|
589
|
+
if(vErrors === null){
|
|
590
|
+
vErrors = [err48];
|
|
591
|
+
}
|
|
592
|
+
else {
|
|
593
|
+
vErrors.push(err48);
|
|
594
|
+
}
|
|
595
|
+
errors++;
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
if(data.evidenceDigest !== undefined){
|
|
599
|
+
let data17 = data.evidenceDigest;
|
|
600
|
+
if(typeof data17 === "string"){
|
|
601
|
+
if(!pattern0.test(data17)){
|
|
602
|
+
const err49 = {instancePath:instancePath+"/evidenceDigest",schemaPath:"#/properties/evidenceDigest/pattern",keyword:"pattern",params:{pattern: "^sha256:[a-f0-9]{64}$"},message:"must match pattern \""+"^sha256:[a-f0-9]{64}$"+"\""};
|
|
603
|
+
if(vErrors === null){
|
|
604
|
+
vErrors = [err49];
|
|
605
|
+
}
|
|
606
|
+
else {
|
|
607
|
+
vErrors.push(err49);
|
|
608
|
+
}
|
|
609
|
+
errors++;
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
else {
|
|
613
|
+
const err50 = {instancePath:instancePath+"/evidenceDigest",schemaPath:"#/properties/evidenceDigest/type",keyword:"type",params:{type: "string"},message:"must be string"};
|
|
614
|
+
if(vErrors === null){
|
|
615
|
+
vErrors = [err50];
|
|
616
|
+
}
|
|
617
|
+
else {
|
|
618
|
+
vErrors.push(err50);
|
|
619
|
+
}
|
|
620
|
+
errors++;
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
else {
|
|
625
|
+
const err51 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};
|
|
626
|
+
if(vErrors === null){
|
|
627
|
+
vErrors = [err51];
|
|
628
|
+
}
|
|
629
|
+
else {
|
|
630
|
+
vErrors.push(err51);
|
|
631
|
+
}
|
|
632
|
+
errors++;
|
|
633
|
+
}
|
|
634
|
+
validate10.errors = vErrors;
|
|
635
|
+
return errors === 0;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
export const schemaDigest = "sha256:67255ae925097eebfe84032bb232cee03e7991c26b39060bb50e5ca34d9930ad";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"generatorDigest": "sha256:c82a4e548f72cdfa77a72c69cca684e0fcbe6d65d4bd63485270edac8a3971f9",
|
|
4
|
+
"entries": [
|
|
5
|
+
{
|
|
6
|
+
"name": "family-api",
|
|
7
|
+
"schemaPath": "family-apis/schema/family-api.schema.json",
|
|
8
|
+
"schemaDigest": "sha256:f6ec0f4ffc4a761214a3b22c909a9e7b89a63064bc2c6dad91a691ff48f6db0d",
|
|
9
|
+
"outputPath": "scripts/lib/generated/family-api-validator.generated.mjs",
|
|
10
|
+
"outputDigest": "sha256:9f23b1452f19695cef61121e76693bdd470e12b9f06527b87b86c32eb351c464"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "project-facts",
|
|
14
|
+
"schemaPath": "schemas/project-facts.schema.json",
|
|
15
|
+
"schemaDigest": "sha256:67255ae925097eebfe84032bb232cee03e7991c26b39060bb50e5ca34d9930ad",
|
|
16
|
+
"outputPath": "scripts/lib/generated/project-facts-validator.generated.mjs",
|
|
17
|
+
"outputDigest": "sha256:e291029c1661cfc3aeeaf07bf820e2d806adc873bef867a8be1aaadb2fc537f7"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|