@cloudhal/core-contracts 0.9.0 → 0.10.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.
@@ -47919,3 +47919,1335 @@ return errors === 0;
47919
47919
  }
47920
47920
  validate252.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};
47921
47921
 
47922
+ export const validateReleaseKeys = validate256;
47923
+ const schema604 = {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://cloudhal.dev/schemas/v1/release-keys.schema.json","title":"ReleaseKeys","description":"cloudhal.release-keys@1 (RFC-0046 §9): the root-signed list of Cloudhal's release and yank keys, published as keys.json at https://cloudhal.dev/.well-known/cloudhal/keys.json next to keys.json.sig (a raw 64-byte Ed25519 signature by the offline root over the exact bytes). A consumer uses it only to reduce trust in the keys it pins: revoke, mark retiring, narrow a validity window; it never adds a key. Canonical bytes as for the release statement.","type":"object","additionalProperties":false,"required":["schemaVersion","format","issuedAt","expires","signing","keys"],"properties":{"schemaVersion":{"$ref":"#/$defs/SchemaVersion"},"format":{"type":"string","enum":["cloudhal.release-keys@1"]},"issuedAt":{"$ref":"#/$defs/Timestamp"},"expires":{"description":"At most 13 months after issuedAt; a consumer refuses an expired list.","$ref":"#/$defs/Timestamp"},"signing":{"type":"object","additionalProperties":false,"required":["keyId","algorithm","signature"],"properties":{"keyId":{"description":"The root key that signed this list.","$ref":"#/$defs/KeyId"},"algorithm":{"type":"string","enum":["Ed25519"]},"signature":{"type":"string","enum":["keys.json.sig"]}}},"keys":{"type":"array","maxItems":64,"items":{"$ref":"#/$defs/ListedKey"}}},"$defs":{"KeyId":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{2,63}$"},"ListedKey":{"type":"object","additionalProperties":false,"required":["keyId","publicKey","role","notBefore","notAfter","status"],"properties":{"keyId":{"$ref":"#/$defs/KeyId"},"publicKey":{"description":"The raw 32-byte Ed25519 public key, base64.","type":"string","pattern":"^[A-Za-z0-9+/]{43}=$"},"role":{"type":"string","enum":["release","yank"]},"notBefore":{"$ref":"#/$defs/Timestamp"},"notAfter":{"$ref":"#/$defs/Timestamp"},"status":{"type":"string","enum":["active","retiring","revoked"]}}},"SchemaVersion":{"type":"integer","description":"Version of this contract. Readers reject unknown versions; migrations move documents forward one version at a time.","enum":[1]},"Timestamp":{"type":"string","description":"RFC 3339 / ISO 8601 instant in UTC.","format":"date-time"}}};
47924
+ const schema605 = {"type":"integer","description":"Version of this contract. Readers reject unknown versions; migrations move documents forward one version at a time.","enum":[1]};
47925
+ const schema606 = {"type":"string","description":"RFC 3339 / ISO 8601 instant in UTC.","format":"date-time"};
47926
+ const schema608 = {"type":"string","pattern":"^[a-z0-9][a-z0-9-]{2,63}$"};
47927
+ const schema609 = {"type":"object","additionalProperties":false,"required":["keyId","publicKey","role","notBefore","notAfter","status"],"properties":{"keyId":{"$ref":"#/$defs/KeyId"},"publicKey":{"description":"The raw 32-byte Ed25519 public key, base64.","type":"string","pattern":"^[A-Za-z0-9+/]{43}=$"},"role":{"type":"string","enum":["release","yank"]},"notBefore":{"$ref":"#/$defs/Timestamp"},"notAfter":{"$ref":"#/$defs/Timestamp"},"status":{"type":"string","enum":["active","retiring","revoked"]}}};
47928
+ const pattern344 = new RegExp("^[A-Za-z0-9+/]{43}=$", "u");
47929
+
47930
+ function validate257(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){
47931
+ let vErrors = null;
47932
+ let errors = 0;
47933
+ const evaluated0 = validate257.evaluated;
47934
+ if(evaluated0.dynamicProps){
47935
+ evaluated0.props = undefined;
47936
+ }
47937
+ if(evaluated0.dynamicItems){
47938
+ evaluated0.items = undefined;
47939
+ }
47940
+ if(data && typeof data == "object" && !Array.isArray(data)){
47941
+ if(data.keyId === undefined){
47942
+ const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "keyId"},message:"must have required property '"+"keyId"+"'"};
47943
+ if(vErrors === null){
47944
+ vErrors = [err0];
47945
+ }
47946
+ else {
47947
+ vErrors.push(err0);
47948
+ }
47949
+ errors++;
47950
+ }
47951
+ if(data.publicKey === undefined){
47952
+ const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "publicKey"},message:"must have required property '"+"publicKey"+"'"};
47953
+ if(vErrors === null){
47954
+ vErrors = [err1];
47955
+ }
47956
+ else {
47957
+ vErrors.push(err1);
47958
+ }
47959
+ errors++;
47960
+ }
47961
+ if(data.role === undefined){
47962
+ const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "role"},message:"must have required property '"+"role"+"'"};
47963
+ if(vErrors === null){
47964
+ vErrors = [err2];
47965
+ }
47966
+ else {
47967
+ vErrors.push(err2);
47968
+ }
47969
+ errors++;
47970
+ }
47971
+ if(data.notBefore === undefined){
47972
+ const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "notBefore"},message:"must have required property '"+"notBefore"+"'"};
47973
+ if(vErrors === null){
47974
+ vErrors = [err3];
47975
+ }
47976
+ else {
47977
+ vErrors.push(err3);
47978
+ }
47979
+ errors++;
47980
+ }
47981
+ if(data.notAfter === undefined){
47982
+ const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "notAfter"},message:"must have required property '"+"notAfter"+"'"};
47983
+ if(vErrors === null){
47984
+ vErrors = [err4];
47985
+ }
47986
+ else {
47987
+ vErrors.push(err4);
47988
+ }
47989
+ errors++;
47990
+ }
47991
+ if(data.status === undefined){
47992
+ const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "status"},message:"must have required property '"+"status"+"'"};
47993
+ if(vErrors === null){
47994
+ vErrors = [err5];
47995
+ }
47996
+ else {
47997
+ vErrors.push(err5);
47998
+ }
47999
+ errors++;
48000
+ }
48001
+ for(const key0 in data){
48002
+ if(!((((((key0 === "keyId") || (key0 === "publicKey")) || (key0 === "role")) || (key0 === "notBefore")) || (key0 === "notAfter")) || (key0 === "status"))){
48003
+ const err6 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};
48004
+ if(vErrors === null){
48005
+ vErrors = [err6];
48006
+ }
48007
+ else {
48008
+ vErrors.push(err6);
48009
+ }
48010
+ errors++;
48011
+ }
48012
+ }
48013
+ if(data.keyId !== undefined){
48014
+ let data0 = data.keyId;
48015
+ if(typeof data0 === "string"){
48016
+ if(!pattern336.test(data0)){
48017
+ const err7 = {instancePath:instancePath+"/keyId",schemaPath:"#/$defs/KeyId/pattern",keyword:"pattern",params:{pattern: "^[a-z0-9][a-z0-9-]{2,63}$"},message:"must match pattern \""+"^[a-z0-9][a-z0-9-]{2,63}$"+"\""};
48018
+ if(vErrors === null){
48019
+ vErrors = [err7];
48020
+ }
48021
+ else {
48022
+ vErrors.push(err7);
48023
+ }
48024
+ errors++;
48025
+ }
48026
+ }
48027
+ else {
48028
+ const err8 = {instancePath:instancePath+"/keyId",schemaPath:"#/$defs/KeyId/type",keyword:"type",params:{type: "string"},message:"must be string"};
48029
+ if(vErrors === null){
48030
+ vErrors = [err8];
48031
+ }
48032
+ else {
48033
+ vErrors.push(err8);
48034
+ }
48035
+ errors++;
48036
+ }
48037
+ }
48038
+ if(data.publicKey !== undefined){
48039
+ let data1 = data.publicKey;
48040
+ if(typeof data1 === "string"){
48041
+ if(!pattern344.test(data1)){
48042
+ const err9 = {instancePath:instancePath+"/publicKey",schemaPath:"#/properties/publicKey/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z0-9+/]{43}=$"},message:"must match pattern \""+"^[A-Za-z0-9+/]{43}=$"+"\""};
48043
+ if(vErrors === null){
48044
+ vErrors = [err9];
48045
+ }
48046
+ else {
48047
+ vErrors.push(err9);
48048
+ }
48049
+ errors++;
48050
+ }
48051
+ }
48052
+ else {
48053
+ const err10 = {instancePath:instancePath+"/publicKey",schemaPath:"#/properties/publicKey/type",keyword:"type",params:{type: "string"},message:"must be string"};
48054
+ if(vErrors === null){
48055
+ vErrors = [err10];
48056
+ }
48057
+ else {
48058
+ vErrors.push(err10);
48059
+ }
48060
+ errors++;
48061
+ }
48062
+ }
48063
+ if(data.role !== undefined){
48064
+ let data2 = data.role;
48065
+ if(typeof data2 !== "string"){
48066
+ const err11 = {instancePath:instancePath+"/role",schemaPath:"#/properties/role/type",keyword:"type",params:{type: "string"},message:"must be string"};
48067
+ if(vErrors === null){
48068
+ vErrors = [err11];
48069
+ }
48070
+ else {
48071
+ vErrors.push(err11);
48072
+ }
48073
+ errors++;
48074
+ }
48075
+ if(!((data2 === "release") || (data2 === "yank"))){
48076
+ const err12 = {instancePath:instancePath+"/role",schemaPath:"#/properties/role/enum",keyword:"enum",params:{allowedValues: schema609.properties.role.enum},message:"must be equal to one of the allowed values"};
48077
+ if(vErrors === null){
48078
+ vErrors = [err12];
48079
+ }
48080
+ else {
48081
+ vErrors.push(err12);
48082
+ }
48083
+ errors++;
48084
+ }
48085
+ }
48086
+ if(data.notBefore !== undefined){
48087
+ let data3 = data.notBefore;
48088
+ if(typeof data3 === "string"){
48089
+ if(!(formats0.validate(data3))){
48090
+ const err13 = {instancePath:instancePath+"/notBefore",schemaPath:"#/$defs/Timestamp/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""};
48091
+ if(vErrors === null){
48092
+ vErrors = [err13];
48093
+ }
48094
+ else {
48095
+ vErrors.push(err13);
48096
+ }
48097
+ errors++;
48098
+ }
48099
+ }
48100
+ else {
48101
+ const err14 = {instancePath:instancePath+"/notBefore",schemaPath:"#/$defs/Timestamp/type",keyword:"type",params:{type: "string"},message:"must be string"};
48102
+ if(vErrors === null){
48103
+ vErrors = [err14];
48104
+ }
48105
+ else {
48106
+ vErrors.push(err14);
48107
+ }
48108
+ errors++;
48109
+ }
48110
+ }
48111
+ if(data.notAfter !== undefined){
48112
+ let data4 = data.notAfter;
48113
+ if(typeof data4 === "string"){
48114
+ if(!(formats0.validate(data4))){
48115
+ const err15 = {instancePath:instancePath+"/notAfter",schemaPath:"#/$defs/Timestamp/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""};
48116
+ if(vErrors === null){
48117
+ vErrors = [err15];
48118
+ }
48119
+ else {
48120
+ vErrors.push(err15);
48121
+ }
48122
+ errors++;
48123
+ }
48124
+ }
48125
+ else {
48126
+ const err16 = {instancePath:instancePath+"/notAfter",schemaPath:"#/$defs/Timestamp/type",keyword:"type",params:{type: "string"},message:"must be string"};
48127
+ if(vErrors === null){
48128
+ vErrors = [err16];
48129
+ }
48130
+ else {
48131
+ vErrors.push(err16);
48132
+ }
48133
+ errors++;
48134
+ }
48135
+ }
48136
+ if(data.status !== undefined){
48137
+ let data5 = data.status;
48138
+ if(typeof data5 !== "string"){
48139
+ const err17 = {instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type: "string"},message:"must be string"};
48140
+ if(vErrors === null){
48141
+ vErrors = [err17];
48142
+ }
48143
+ else {
48144
+ vErrors.push(err17);
48145
+ }
48146
+ errors++;
48147
+ }
48148
+ if(!(((data5 === "active") || (data5 === "retiring")) || (data5 === "revoked"))){
48149
+ const err18 = {instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues: schema609.properties.status.enum},message:"must be equal to one of the allowed values"};
48150
+ if(vErrors === null){
48151
+ vErrors = [err18];
48152
+ }
48153
+ else {
48154
+ vErrors.push(err18);
48155
+ }
48156
+ errors++;
48157
+ }
48158
+ }
48159
+ }
48160
+ else {
48161
+ const err19 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};
48162
+ if(vErrors === null){
48163
+ vErrors = [err19];
48164
+ }
48165
+ else {
48166
+ vErrors.push(err19);
48167
+ }
48168
+ errors++;
48169
+ }
48170
+ validate257.errors = vErrors;
48171
+ return errors === 0;
48172
+ }
48173
+ validate257.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};
48174
+
48175
+
48176
+ function validate256(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){
48177
+ /*# sourceURL="https://cloudhal.dev/schemas/v1/release-keys.schema.json" */;
48178
+ let vErrors = null;
48179
+ let errors = 0;
48180
+ const evaluated0 = validate256.evaluated;
48181
+ if(evaluated0.dynamicProps){
48182
+ evaluated0.props = undefined;
48183
+ }
48184
+ if(evaluated0.dynamicItems){
48185
+ evaluated0.items = undefined;
48186
+ }
48187
+ if(data && typeof data == "object" && !Array.isArray(data)){
48188
+ if(data.schemaVersion === undefined){
48189
+ const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "schemaVersion"},message:"must have required property '"+"schemaVersion"+"'"};
48190
+ if(vErrors === null){
48191
+ vErrors = [err0];
48192
+ }
48193
+ else {
48194
+ vErrors.push(err0);
48195
+ }
48196
+ errors++;
48197
+ }
48198
+ if(data.format === undefined){
48199
+ const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "format"},message:"must have required property '"+"format"+"'"};
48200
+ if(vErrors === null){
48201
+ vErrors = [err1];
48202
+ }
48203
+ else {
48204
+ vErrors.push(err1);
48205
+ }
48206
+ errors++;
48207
+ }
48208
+ if(data.issuedAt === undefined){
48209
+ const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "issuedAt"},message:"must have required property '"+"issuedAt"+"'"};
48210
+ if(vErrors === null){
48211
+ vErrors = [err2];
48212
+ }
48213
+ else {
48214
+ vErrors.push(err2);
48215
+ }
48216
+ errors++;
48217
+ }
48218
+ if(data.expires === undefined){
48219
+ const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "expires"},message:"must have required property '"+"expires"+"'"};
48220
+ if(vErrors === null){
48221
+ vErrors = [err3];
48222
+ }
48223
+ else {
48224
+ vErrors.push(err3);
48225
+ }
48226
+ errors++;
48227
+ }
48228
+ if(data.signing === undefined){
48229
+ const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "signing"},message:"must have required property '"+"signing"+"'"};
48230
+ if(vErrors === null){
48231
+ vErrors = [err4];
48232
+ }
48233
+ else {
48234
+ vErrors.push(err4);
48235
+ }
48236
+ errors++;
48237
+ }
48238
+ if(data.keys === undefined){
48239
+ const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "keys"},message:"must have required property '"+"keys"+"'"};
48240
+ if(vErrors === null){
48241
+ vErrors = [err5];
48242
+ }
48243
+ else {
48244
+ vErrors.push(err5);
48245
+ }
48246
+ errors++;
48247
+ }
48248
+ for(const key0 in data){
48249
+ if(!((((((key0 === "schemaVersion") || (key0 === "format")) || (key0 === "issuedAt")) || (key0 === "expires")) || (key0 === "signing")) || (key0 === "keys"))){
48250
+ const err6 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};
48251
+ if(vErrors === null){
48252
+ vErrors = [err6];
48253
+ }
48254
+ else {
48255
+ vErrors.push(err6);
48256
+ }
48257
+ errors++;
48258
+ }
48259
+ }
48260
+ if(data.schemaVersion !== undefined){
48261
+ let data0 = data.schemaVersion;
48262
+ if(!(((typeof data0 == "number") && (!(data0 % 1) && !isNaN(data0))) && (isFinite(data0)))){
48263
+ const err7 = {instancePath:instancePath+"/schemaVersion",schemaPath:"#/$defs/SchemaVersion/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
48264
+ if(vErrors === null){
48265
+ vErrors = [err7];
48266
+ }
48267
+ else {
48268
+ vErrors.push(err7);
48269
+ }
48270
+ errors++;
48271
+ }
48272
+ if(!(data0 === 1)){
48273
+ const err8 = {instancePath:instancePath+"/schemaVersion",schemaPath:"#/$defs/SchemaVersion/enum",keyword:"enum",params:{allowedValues: schema605.enum},message:"must be equal to one of the allowed values"};
48274
+ if(vErrors === null){
48275
+ vErrors = [err8];
48276
+ }
48277
+ else {
48278
+ vErrors.push(err8);
48279
+ }
48280
+ errors++;
48281
+ }
48282
+ }
48283
+ if(data.format !== undefined){
48284
+ let data1 = data.format;
48285
+ if(typeof data1 !== "string"){
48286
+ const err9 = {instancePath:instancePath+"/format",schemaPath:"#/properties/format/type",keyword:"type",params:{type: "string"},message:"must be string"};
48287
+ if(vErrors === null){
48288
+ vErrors = [err9];
48289
+ }
48290
+ else {
48291
+ vErrors.push(err9);
48292
+ }
48293
+ errors++;
48294
+ }
48295
+ if(!(data1 === "cloudhal.release-keys@1")){
48296
+ const err10 = {instancePath:instancePath+"/format",schemaPath:"#/properties/format/enum",keyword:"enum",params:{allowedValues: schema604.properties.format.enum},message:"must be equal to one of the allowed values"};
48297
+ if(vErrors === null){
48298
+ vErrors = [err10];
48299
+ }
48300
+ else {
48301
+ vErrors.push(err10);
48302
+ }
48303
+ errors++;
48304
+ }
48305
+ }
48306
+ if(data.issuedAt !== undefined){
48307
+ let data2 = data.issuedAt;
48308
+ if(typeof data2 === "string"){
48309
+ if(!(formats0.validate(data2))){
48310
+ const err11 = {instancePath:instancePath+"/issuedAt",schemaPath:"#/$defs/Timestamp/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""};
48311
+ if(vErrors === null){
48312
+ vErrors = [err11];
48313
+ }
48314
+ else {
48315
+ vErrors.push(err11);
48316
+ }
48317
+ errors++;
48318
+ }
48319
+ }
48320
+ else {
48321
+ const err12 = {instancePath:instancePath+"/issuedAt",schemaPath:"#/$defs/Timestamp/type",keyword:"type",params:{type: "string"},message:"must be string"};
48322
+ if(vErrors === null){
48323
+ vErrors = [err12];
48324
+ }
48325
+ else {
48326
+ vErrors.push(err12);
48327
+ }
48328
+ errors++;
48329
+ }
48330
+ }
48331
+ if(data.expires !== undefined){
48332
+ let data3 = data.expires;
48333
+ if(typeof data3 === "string"){
48334
+ if(!(formats0.validate(data3))){
48335
+ const err13 = {instancePath:instancePath+"/expires",schemaPath:"#/$defs/Timestamp/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""};
48336
+ if(vErrors === null){
48337
+ vErrors = [err13];
48338
+ }
48339
+ else {
48340
+ vErrors.push(err13);
48341
+ }
48342
+ errors++;
48343
+ }
48344
+ }
48345
+ else {
48346
+ const err14 = {instancePath:instancePath+"/expires",schemaPath:"#/$defs/Timestamp/type",keyword:"type",params:{type: "string"},message:"must be string"};
48347
+ if(vErrors === null){
48348
+ vErrors = [err14];
48349
+ }
48350
+ else {
48351
+ vErrors.push(err14);
48352
+ }
48353
+ errors++;
48354
+ }
48355
+ }
48356
+ if(data.signing !== undefined){
48357
+ let data4 = data.signing;
48358
+ if(data4 && typeof data4 == "object" && !Array.isArray(data4)){
48359
+ if(data4.keyId === undefined){
48360
+ const err15 = {instancePath:instancePath+"/signing",schemaPath:"#/properties/signing/required",keyword:"required",params:{missingProperty: "keyId"},message:"must have required property '"+"keyId"+"'"};
48361
+ if(vErrors === null){
48362
+ vErrors = [err15];
48363
+ }
48364
+ else {
48365
+ vErrors.push(err15);
48366
+ }
48367
+ errors++;
48368
+ }
48369
+ if(data4.algorithm === undefined){
48370
+ const err16 = {instancePath:instancePath+"/signing",schemaPath:"#/properties/signing/required",keyword:"required",params:{missingProperty: "algorithm"},message:"must have required property '"+"algorithm"+"'"};
48371
+ if(vErrors === null){
48372
+ vErrors = [err16];
48373
+ }
48374
+ else {
48375
+ vErrors.push(err16);
48376
+ }
48377
+ errors++;
48378
+ }
48379
+ if(data4.signature === undefined){
48380
+ const err17 = {instancePath:instancePath+"/signing",schemaPath:"#/properties/signing/required",keyword:"required",params:{missingProperty: "signature"},message:"must have required property '"+"signature"+"'"};
48381
+ if(vErrors === null){
48382
+ vErrors = [err17];
48383
+ }
48384
+ else {
48385
+ vErrors.push(err17);
48386
+ }
48387
+ errors++;
48388
+ }
48389
+ for(const key1 in data4){
48390
+ if(!(((key1 === "keyId") || (key1 === "algorithm")) || (key1 === "signature"))){
48391
+ const err18 = {instancePath:instancePath+"/signing",schemaPath:"#/properties/signing/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};
48392
+ if(vErrors === null){
48393
+ vErrors = [err18];
48394
+ }
48395
+ else {
48396
+ vErrors.push(err18);
48397
+ }
48398
+ errors++;
48399
+ }
48400
+ }
48401
+ if(data4.keyId !== undefined){
48402
+ let data5 = data4.keyId;
48403
+ if(typeof data5 === "string"){
48404
+ if(!pattern336.test(data5)){
48405
+ const err19 = {instancePath:instancePath+"/signing/keyId",schemaPath:"#/$defs/KeyId/pattern",keyword:"pattern",params:{pattern: "^[a-z0-9][a-z0-9-]{2,63}$"},message:"must match pattern \""+"^[a-z0-9][a-z0-9-]{2,63}$"+"\""};
48406
+ if(vErrors === null){
48407
+ vErrors = [err19];
48408
+ }
48409
+ else {
48410
+ vErrors.push(err19);
48411
+ }
48412
+ errors++;
48413
+ }
48414
+ }
48415
+ else {
48416
+ const err20 = {instancePath:instancePath+"/signing/keyId",schemaPath:"#/$defs/KeyId/type",keyword:"type",params:{type: "string"},message:"must be string"};
48417
+ if(vErrors === null){
48418
+ vErrors = [err20];
48419
+ }
48420
+ else {
48421
+ vErrors.push(err20);
48422
+ }
48423
+ errors++;
48424
+ }
48425
+ }
48426
+ if(data4.algorithm !== undefined){
48427
+ let data6 = data4.algorithm;
48428
+ if(typeof data6 !== "string"){
48429
+ const err21 = {instancePath:instancePath+"/signing/algorithm",schemaPath:"#/properties/signing/properties/algorithm/type",keyword:"type",params:{type: "string"},message:"must be string"};
48430
+ if(vErrors === null){
48431
+ vErrors = [err21];
48432
+ }
48433
+ else {
48434
+ vErrors.push(err21);
48435
+ }
48436
+ errors++;
48437
+ }
48438
+ if(!(data6 === "Ed25519")){
48439
+ const err22 = {instancePath:instancePath+"/signing/algorithm",schemaPath:"#/properties/signing/properties/algorithm/enum",keyword:"enum",params:{allowedValues: schema604.properties.signing.properties.algorithm.enum},message:"must be equal to one of the allowed values"};
48440
+ if(vErrors === null){
48441
+ vErrors = [err22];
48442
+ }
48443
+ else {
48444
+ vErrors.push(err22);
48445
+ }
48446
+ errors++;
48447
+ }
48448
+ }
48449
+ if(data4.signature !== undefined){
48450
+ let data7 = data4.signature;
48451
+ if(typeof data7 !== "string"){
48452
+ const err23 = {instancePath:instancePath+"/signing/signature",schemaPath:"#/properties/signing/properties/signature/type",keyword:"type",params:{type: "string"},message:"must be string"};
48453
+ if(vErrors === null){
48454
+ vErrors = [err23];
48455
+ }
48456
+ else {
48457
+ vErrors.push(err23);
48458
+ }
48459
+ errors++;
48460
+ }
48461
+ if(!(data7 === "keys.json.sig")){
48462
+ const err24 = {instancePath:instancePath+"/signing/signature",schemaPath:"#/properties/signing/properties/signature/enum",keyword:"enum",params:{allowedValues: schema604.properties.signing.properties.signature.enum},message:"must be equal to one of the allowed values"};
48463
+ if(vErrors === null){
48464
+ vErrors = [err24];
48465
+ }
48466
+ else {
48467
+ vErrors.push(err24);
48468
+ }
48469
+ errors++;
48470
+ }
48471
+ }
48472
+ }
48473
+ else {
48474
+ const err25 = {instancePath:instancePath+"/signing",schemaPath:"#/properties/signing/type",keyword:"type",params:{type: "object"},message:"must be object"};
48475
+ if(vErrors === null){
48476
+ vErrors = [err25];
48477
+ }
48478
+ else {
48479
+ vErrors.push(err25);
48480
+ }
48481
+ errors++;
48482
+ }
48483
+ }
48484
+ if(data.keys !== undefined){
48485
+ let data8 = data.keys;
48486
+ if(Array.isArray(data8)){
48487
+ if(data8.length > 64){
48488
+ const err26 = {instancePath:instancePath+"/keys",schemaPath:"#/properties/keys/maxItems",keyword:"maxItems",params:{limit: 64},message:"must NOT have more than 64 items"};
48489
+ if(vErrors === null){
48490
+ vErrors = [err26];
48491
+ }
48492
+ else {
48493
+ vErrors.push(err26);
48494
+ }
48495
+ errors++;
48496
+ }
48497
+ const len0 = data8.length;
48498
+ for(let i0=0; i0<len0; i0++){
48499
+ if(!(validate257(data8[i0], {instancePath:instancePath+"/keys/" + i0,parentData:data8,parentDataProperty:i0,rootData,dynamicAnchors}))){
48500
+ vErrors = vErrors === null ? validate257.errors : vErrors.concat(validate257.errors);
48501
+ errors = vErrors.length;
48502
+ }
48503
+ }
48504
+ }
48505
+ else {
48506
+ const err27 = {instancePath:instancePath+"/keys",schemaPath:"#/properties/keys/type",keyword:"type",params:{type: "array"},message:"must be array"};
48507
+ if(vErrors === null){
48508
+ vErrors = [err27];
48509
+ }
48510
+ else {
48511
+ vErrors.push(err27);
48512
+ }
48513
+ errors++;
48514
+ }
48515
+ }
48516
+ }
48517
+ else {
48518
+ const err28 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};
48519
+ if(vErrors === null){
48520
+ vErrors = [err28];
48521
+ }
48522
+ else {
48523
+ vErrors.push(err28);
48524
+ }
48525
+ errors++;
48526
+ }
48527
+ validate256.errors = vErrors;
48528
+ return errors === 0;
48529
+ }
48530
+ validate256.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};
48531
+
48532
+ export const validateReleaseYankList = validate259;
48533
+ const schema613 = {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://cloudhal.dev/schemas/v1/release-yank-list.schema.json","title":"ReleaseYankList","description":"cloudhal.release-yank-list@1 (RFC-0046 §9): the yank list, published as yanked.json at https://cloudhal.dev/.well-known/cloudhal/yanked.json next to yanked.json.sig (a raw 64-byte Ed25519 signature by a yank-role key from keys.json over the exact bytes). It only reduces trust: versions no consumer may install, and release key ids every consumer must refuse. Re-signed weekly; it expires 30 days after issuedAt, and a stale list blocks new installs only.","type":"object","additionalProperties":false,"required":["schemaVersion","format","serial","issuedAt","expires","signing","versions","revokedKeys"],"properties":{"schemaVersion":{"$ref":"#/$defs/SchemaVersion"},"format":{"type":"string","enum":["cloudhal.release-yank-list@1"]},"serial":{"description":"Increases by one at every signing. A consumer that keeps state refuses a serial lower than the last one it saw (a rollback to an older, validly signed list).","type":"integer","minimum":1,"maximum":9007199254740991},"issuedAt":{"$ref":"#/$defs/Timestamp"},"expires":{"description":"Exactly 30 days after issuedAt.","$ref":"#/$defs/Timestamp"},"signing":{"type":"object","additionalProperties":false,"required":["keyId","algorithm","signature"],"properties":{"keyId":{"description":"The yank-role key that signed this list.","$ref":"#/$defs/KeyId"},"algorithm":{"type":"string","enum":["Ed25519"]},"signature":{"type":"string","enum":["yanked.json.sig"]}}},"versions":{"type":"array","maxItems":1000,"items":{"type":"object","additionalProperties":false,"required":["version","yankedAt","reason"],"properties":{"version":{"$ref":"#/$defs/CloudhalVersion"},"yankedAt":{"$ref":"#/$defs/Timestamp"},"reason":{"type":"string","minLength":1,"maxLength":500}}}},"revokedKeys":{"type":"array","maxItems":64,"items":{"type":"object","additionalProperties":false,"required":["keyId","revokedAt","reason"],"properties":{"keyId":{"$ref":"#/$defs/KeyId"},"revokedAt":{"$ref":"#/$defs/Timestamp"},"reason":{"type":"string","minLength":1,"maxLength":500}}}}},"$defs":{"CloudhalVersion":{"type":"string","pattern":"^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-[0-9A-Za-z.-]+)?$"},"KeyId":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{2,63}$"},"SchemaVersion":{"type":"integer","description":"Version of this contract. Readers reject unknown versions; migrations move documents forward one version at a time.","enum":[1]},"Timestamp":{"type":"string","description":"RFC 3339 / ISO 8601 instant in UTC.","format":"date-time"}}};
48534
+ const schema614 = {"type":"integer","description":"Version of this contract. Readers reject unknown versions; migrations move documents forward one version at a time.","enum":[1]};
48535
+ const schema615 = {"type":"string","description":"RFC 3339 / ISO 8601 instant in UTC.","format":"date-time"};
48536
+ const schema617 = {"type":"string","pattern":"^[a-z0-9][a-z0-9-]{2,63}$"};
48537
+ const schema618 = {"type":"string","pattern":"^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-[0-9A-Za-z.-]+)?$"};
48538
+
48539
+ function validate259(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){
48540
+ /*# sourceURL="https://cloudhal.dev/schemas/v1/release-yank-list.schema.json" */;
48541
+ let vErrors = null;
48542
+ let errors = 0;
48543
+ const evaluated0 = validate259.evaluated;
48544
+ if(evaluated0.dynamicProps){
48545
+ evaluated0.props = undefined;
48546
+ }
48547
+ if(evaluated0.dynamicItems){
48548
+ evaluated0.items = undefined;
48549
+ }
48550
+ if(data && typeof data == "object" && !Array.isArray(data)){
48551
+ if(data.schemaVersion === undefined){
48552
+ const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "schemaVersion"},message:"must have required property '"+"schemaVersion"+"'"};
48553
+ if(vErrors === null){
48554
+ vErrors = [err0];
48555
+ }
48556
+ else {
48557
+ vErrors.push(err0);
48558
+ }
48559
+ errors++;
48560
+ }
48561
+ if(data.format === undefined){
48562
+ const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "format"},message:"must have required property '"+"format"+"'"};
48563
+ if(vErrors === null){
48564
+ vErrors = [err1];
48565
+ }
48566
+ else {
48567
+ vErrors.push(err1);
48568
+ }
48569
+ errors++;
48570
+ }
48571
+ if(data.serial === undefined){
48572
+ const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "serial"},message:"must have required property '"+"serial"+"'"};
48573
+ if(vErrors === null){
48574
+ vErrors = [err2];
48575
+ }
48576
+ else {
48577
+ vErrors.push(err2);
48578
+ }
48579
+ errors++;
48580
+ }
48581
+ if(data.issuedAt === undefined){
48582
+ const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "issuedAt"},message:"must have required property '"+"issuedAt"+"'"};
48583
+ if(vErrors === null){
48584
+ vErrors = [err3];
48585
+ }
48586
+ else {
48587
+ vErrors.push(err3);
48588
+ }
48589
+ errors++;
48590
+ }
48591
+ if(data.expires === undefined){
48592
+ const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "expires"},message:"must have required property '"+"expires"+"'"};
48593
+ if(vErrors === null){
48594
+ vErrors = [err4];
48595
+ }
48596
+ else {
48597
+ vErrors.push(err4);
48598
+ }
48599
+ errors++;
48600
+ }
48601
+ if(data.signing === undefined){
48602
+ const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "signing"},message:"must have required property '"+"signing"+"'"};
48603
+ if(vErrors === null){
48604
+ vErrors = [err5];
48605
+ }
48606
+ else {
48607
+ vErrors.push(err5);
48608
+ }
48609
+ errors++;
48610
+ }
48611
+ if(data.versions === undefined){
48612
+ const err6 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "versions"},message:"must have required property '"+"versions"+"'"};
48613
+ if(vErrors === null){
48614
+ vErrors = [err6];
48615
+ }
48616
+ else {
48617
+ vErrors.push(err6);
48618
+ }
48619
+ errors++;
48620
+ }
48621
+ if(data.revokedKeys === undefined){
48622
+ const err7 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "revokedKeys"},message:"must have required property '"+"revokedKeys"+"'"};
48623
+ if(vErrors === null){
48624
+ vErrors = [err7];
48625
+ }
48626
+ else {
48627
+ vErrors.push(err7);
48628
+ }
48629
+ errors++;
48630
+ }
48631
+ for(const key0 in data){
48632
+ if(!((((((((key0 === "schemaVersion") || (key0 === "format")) || (key0 === "serial")) || (key0 === "issuedAt")) || (key0 === "expires")) || (key0 === "signing")) || (key0 === "versions")) || (key0 === "revokedKeys"))){
48633
+ const err8 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};
48634
+ if(vErrors === null){
48635
+ vErrors = [err8];
48636
+ }
48637
+ else {
48638
+ vErrors.push(err8);
48639
+ }
48640
+ errors++;
48641
+ }
48642
+ }
48643
+ if(data.schemaVersion !== undefined){
48644
+ let data0 = data.schemaVersion;
48645
+ if(!(((typeof data0 == "number") && (!(data0 % 1) && !isNaN(data0))) && (isFinite(data0)))){
48646
+ const err9 = {instancePath:instancePath+"/schemaVersion",schemaPath:"#/$defs/SchemaVersion/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
48647
+ if(vErrors === null){
48648
+ vErrors = [err9];
48649
+ }
48650
+ else {
48651
+ vErrors.push(err9);
48652
+ }
48653
+ errors++;
48654
+ }
48655
+ if(!(data0 === 1)){
48656
+ const err10 = {instancePath:instancePath+"/schemaVersion",schemaPath:"#/$defs/SchemaVersion/enum",keyword:"enum",params:{allowedValues: schema614.enum},message:"must be equal to one of the allowed values"};
48657
+ if(vErrors === null){
48658
+ vErrors = [err10];
48659
+ }
48660
+ else {
48661
+ vErrors.push(err10);
48662
+ }
48663
+ errors++;
48664
+ }
48665
+ }
48666
+ if(data.format !== undefined){
48667
+ let data1 = data.format;
48668
+ if(typeof data1 !== "string"){
48669
+ const err11 = {instancePath:instancePath+"/format",schemaPath:"#/properties/format/type",keyword:"type",params:{type: "string"},message:"must be string"};
48670
+ if(vErrors === null){
48671
+ vErrors = [err11];
48672
+ }
48673
+ else {
48674
+ vErrors.push(err11);
48675
+ }
48676
+ errors++;
48677
+ }
48678
+ if(!(data1 === "cloudhal.release-yank-list@1")){
48679
+ const err12 = {instancePath:instancePath+"/format",schemaPath:"#/properties/format/enum",keyword:"enum",params:{allowedValues: schema613.properties.format.enum},message:"must be equal to one of the allowed values"};
48680
+ if(vErrors === null){
48681
+ vErrors = [err12];
48682
+ }
48683
+ else {
48684
+ vErrors.push(err12);
48685
+ }
48686
+ errors++;
48687
+ }
48688
+ }
48689
+ if(data.serial !== undefined){
48690
+ let data2 = data.serial;
48691
+ if(!(((typeof data2 == "number") && (!(data2 % 1) && !isNaN(data2))) && (isFinite(data2)))){
48692
+ const err13 = {instancePath:instancePath+"/serial",schemaPath:"#/properties/serial/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
48693
+ if(vErrors === null){
48694
+ vErrors = [err13];
48695
+ }
48696
+ else {
48697
+ vErrors.push(err13);
48698
+ }
48699
+ errors++;
48700
+ }
48701
+ if((typeof data2 == "number") && (isFinite(data2))){
48702
+ if(data2 > 9007199254740991 || isNaN(data2)){
48703
+ const err14 = {instancePath:instancePath+"/serial",schemaPath:"#/properties/serial/maximum",keyword:"maximum",params:{comparison: "<=", limit: 9007199254740991},message:"must be <= 9007199254740991"};
48704
+ if(vErrors === null){
48705
+ vErrors = [err14];
48706
+ }
48707
+ else {
48708
+ vErrors.push(err14);
48709
+ }
48710
+ errors++;
48711
+ }
48712
+ if(data2 < 1 || isNaN(data2)){
48713
+ const err15 = {instancePath:instancePath+"/serial",schemaPath:"#/properties/serial/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"};
48714
+ if(vErrors === null){
48715
+ vErrors = [err15];
48716
+ }
48717
+ else {
48718
+ vErrors.push(err15);
48719
+ }
48720
+ errors++;
48721
+ }
48722
+ }
48723
+ }
48724
+ if(data.issuedAt !== undefined){
48725
+ let data3 = data.issuedAt;
48726
+ if(typeof data3 === "string"){
48727
+ if(!(formats0.validate(data3))){
48728
+ const err16 = {instancePath:instancePath+"/issuedAt",schemaPath:"#/$defs/Timestamp/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""};
48729
+ if(vErrors === null){
48730
+ vErrors = [err16];
48731
+ }
48732
+ else {
48733
+ vErrors.push(err16);
48734
+ }
48735
+ errors++;
48736
+ }
48737
+ }
48738
+ else {
48739
+ const err17 = {instancePath:instancePath+"/issuedAt",schemaPath:"#/$defs/Timestamp/type",keyword:"type",params:{type: "string"},message:"must be string"};
48740
+ if(vErrors === null){
48741
+ vErrors = [err17];
48742
+ }
48743
+ else {
48744
+ vErrors.push(err17);
48745
+ }
48746
+ errors++;
48747
+ }
48748
+ }
48749
+ if(data.expires !== undefined){
48750
+ let data4 = data.expires;
48751
+ if(typeof data4 === "string"){
48752
+ if(!(formats0.validate(data4))){
48753
+ const err18 = {instancePath:instancePath+"/expires",schemaPath:"#/$defs/Timestamp/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""};
48754
+ if(vErrors === null){
48755
+ vErrors = [err18];
48756
+ }
48757
+ else {
48758
+ vErrors.push(err18);
48759
+ }
48760
+ errors++;
48761
+ }
48762
+ }
48763
+ else {
48764
+ const err19 = {instancePath:instancePath+"/expires",schemaPath:"#/$defs/Timestamp/type",keyword:"type",params:{type: "string"},message:"must be string"};
48765
+ if(vErrors === null){
48766
+ vErrors = [err19];
48767
+ }
48768
+ else {
48769
+ vErrors.push(err19);
48770
+ }
48771
+ errors++;
48772
+ }
48773
+ }
48774
+ if(data.signing !== undefined){
48775
+ let data5 = data.signing;
48776
+ if(data5 && typeof data5 == "object" && !Array.isArray(data5)){
48777
+ if(data5.keyId === undefined){
48778
+ const err20 = {instancePath:instancePath+"/signing",schemaPath:"#/properties/signing/required",keyword:"required",params:{missingProperty: "keyId"},message:"must have required property '"+"keyId"+"'"};
48779
+ if(vErrors === null){
48780
+ vErrors = [err20];
48781
+ }
48782
+ else {
48783
+ vErrors.push(err20);
48784
+ }
48785
+ errors++;
48786
+ }
48787
+ if(data5.algorithm === undefined){
48788
+ const err21 = {instancePath:instancePath+"/signing",schemaPath:"#/properties/signing/required",keyword:"required",params:{missingProperty: "algorithm"},message:"must have required property '"+"algorithm"+"'"};
48789
+ if(vErrors === null){
48790
+ vErrors = [err21];
48791
+ }
48792
+ else {
48793
+ vErrors.push(err21);
48794
+ }
48795
+ errors++;
48796
+ }
48797
+ if(data5.signature === undefined){
48798
+ const err22 = {instancePath:instancePath+"/signing",schemaPath:"#/properties/signing/required",keyword:"required",params:{missingProperty: "signature"},message:"must have required property '"+"signature"+"'"};
48799
+ if(vErrors === null){
48800
+ vErrors = [err22];
48801
+ }
48802
+ else {
48803
+ vErrors.push(err22);
48804
+ }
48805
+ errors++;
48806
+ }
48807
+ for(const key1 in data5){
48808
+ if(!(((key1 === "keyId") || (key1 === "algorithm")) || (key1 === "signature"))){
48809
+ const err23 = {instancePath:instancePath+"/signing",schemaPath:"#/properties/signing/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};
48810
+ if(vErrors === null){
48811
+ vErrors = [err23];
48812
+ }
48813
+ else {
48814
+ vErrors.push(err23);
48815
+ }
48816
+ errors++;
48817
+ }
48818
+ }
48819
+ if(data5.keyId !== undefined){
48820
+ let data6 = data5.keyId;
48821
+ if(typeof data6 === "string"){
48822
+ if(!pattern336.test(data6)){
48823
+ const err24 = {instancePath:instancePath+"/signing/keyId",schemaPath:"#/$defs/KeyId/pattern",keyword:"pattern",params:{pattern: "^[a-z0-9][a-z0-9-]{2,63}$"},message:"must match pattern \""+"^[a-z0-9][a-z0-9-]{2,63}$"+"\""};
48824
+ if(vErrors === null){
48825
+ vErrors = [err24];
48826
+ }
48827
+ else {
48828
+ vErrors.push(err24);
48829
+ }
48830
+ errors++;
48831
+ }
48832
+ }
48833
+ else {
48834
+ const err25 = {instancePath:instancePath+"/signing/keyId",schemaPath:"#/$defs/KeyId/type",keyword:"type",params:{type: "string"},message:"must be string"};
48835
+ if(vErrors === null){
48836
+ vErrors = [err25];
48837
+ }
48838
+ else {
48839
+ vErrors.push(err25);
48840
+ }
48841
+ errors++;
48842
+ }
48843
+ }
48844
+ if(data5.algorithm !== undefined){
48845
+ let data7 = data5.algorithm;
48846
+ if(typeof data7 !== "string"){
48847
+ const err26 = {instancePath:instancePath+"/signing/algorithm",schemaPath:"#/properties/signing/properties/algorithm/type",keyword:"type",params:{type: "string"},message:"must be string"};
48848
+ if(vErrors === null){
48849
+ vErrors = [err26];
48850
+ }
48851
+ else {
48852
+ vErrors.push(err26);
48853
+ }
48854
+ errors++;
48855
+ }
48856
+ if(!(data7 === "Ed25519")){
48857
+ const err27 = {instancePath:instancePath+"/signing/algorithm",schemaPath:"#/properties/signing/properties/algorithm/enum",keyword:"enum",params:{allowedValues: schema613.properties.signing.properties.algorithm.enum},message:"must be equal to one of the allowed values"};
48858
+ if(vErrors === null){
48859
+ vErrors = [err27];
48860
+ }
48861
+ else {
48862
+ vErrors.push(err27);
48863
+ }
48864
+ errors++;
48865
+ }
48866
+ }
48867
+ if(data5.signature !== undefined){
48868
+ let data8 = data5.signature;
48869
+ if(typeof data8 !== "string"){
48870
+ const err28 = {instancePath:instancePath+"/signing/signature",schemaPath:"#/properties/signing/properties/signature/type",keyword:"type",params:{type: "string"},message:"must be string"};
48871
+ if(vErrors === null){
48872
+ vErrors = [err28];
48873
+ }
48874
+ else {
48875
+ vErrors.push(err28);
48876
+ }
48877
+ errors++;
48878
+ }
48879
+ if(!(data8 === "yanked.json.sig")){
48880
+ const err29 = {instancePath:instancePath+"/signing/signature",schemaPath:"#/properties/signing/properties/signature/enum",keyword:"enum",params:{allowedValues: schema613.properties.signing.properties.signature.enum},message:"must be equal to one of the allowed values"};
48881
+ if(vErrors === null){
48882
+ vErrors = [err29];
48883
+ }
48884
+ else {
48885
+ vErrors.push(err29);
48886
+ }
48887
+ errors++;
48888
+ }
48889
+ }
48890
+ }
48891
+ else {
48892
+ const err30 = {instancePath:instancePath+"/signing",schemaPath:"#/properties/signing/type",keyword:"type",params:{type: "object"},message:"must be object"};
48893
+ if(vErrors === null){
48894
+ vErrors = [err30];
48895
+ }
48896
+ else {
48897
+ vErrors.push(err30);
48898
+ }
48899
+ errors++;
48900
+ }
48901
+ }
48902
+ if(data.versions !== undefined){
48903
+ let data9 = data.versions;
48904
+ if(Array.isArray(data9)){
48905
+ if(data9.length > 1000){
48906
+ const err31 = {instancePath:instancePath+"/versions",schemaPath:"#/properties/versions/maxItems",keyword:"maxItems",params:{limit: 1000},message:"must NOT have more than 1000 items"};
48907
+ if(vErrors === null){
48908
+ vErrors = [err31];
48909
+ }
48910
+ else {
48911
+ vErrors.push(err31);
48912
+ }
48913
+ errors++;
48914
+ }
48915
+ const len0 = data9.length;
48916
+ for(let i0=0; i0<len0; i0++){
48917
+ let data10 = data9[i0];
48918
+ if(data10 && typeof data10 == "object" && !Array.isArray(data10)){
48919
+ if(data10.version === undefined){
48920
+ const err32 = {instancePath:instancePath+"/versions/" + i0,schemaPath:"#/properties/versions/items/required",keyword:"required",params:{missingProperty: "version"},message:"must have required property '"+"version"+"'"};
48921
+ if(vErrors === null){
48922
+ vErrors = [err32];
48923
+ }
48924
+ else {
48925
+ vErrors.push(err32);
48926
+ }
48927
+ errors++;
48928
+ }
48929
+ if(data10.yankedAt === undefined){
48930
+ const err33 = {instancePath:instancePath+"/versions/" + i0,schemaPath:"#/properties/versions/items/required",keyword:"required",params:{missingProperty: "yankedAt"},message:"must have required property '"+"yankedAt"+"'"};
48931
+ if(vErrors === null){
48932
+ vErrors = [err33];
48933
+ }
48934
+ else {
48935
+ vErrors.push(err33);
48936
+ }
48937
+ errors++;
48938
+ }
48939
+ if(data10.reason === undefined){
48940
+ const err34 = {instancePath:instancePath+"/versions/" + i0,schemaPath:"#/properties/versions/items/required",keyword:"required",params:{missingProperty: "reason"},message:"must have required property '"+"reason"+"'"};
48941
+ if(vErrors === null){
48942
+ vErrors = [err34];
48943
+ }
48944
+ else {
48945
+ vErrors.push(err34);
48946
+ }
48947
+ errors++;
48948
+ }
48949
+ for(const key2 in data10){
48950
+ if(!(((key2 === "version") || (key2 === "yankedAt")) || (key2 === "reason"))){
48951
+ const err35 = {instancePath:instancePath+"/versions/" + i0,schemaPath:"#/properties/versions/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};
48952
+ if(vErrors === null){
48953
+ vErrors = [err35];
48954
+ }
48955
+ else {
48956
+ vErrors.push(err35);
48957
+ }
48958
+ errors++;
48959
+ }
48960
+ }
48961
+ if(data10.version !== undefined){
48962
+ let data11 = data10.version;
48963
+ if(typeof data11 === "string"){
48964
+ if(!pattern305.test(data11)){
48965
+ const err36 = {instancePath:instancePath+"/versions/" + i0+"/version",schemaPath:"#/$defs/CloudhalVersion/pattern",keyword:"pattern",params:{pattern: "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-[0-9A-Za-z.-]+)?$"},message:"must match pattern \""+"^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-[0-9A-Za-z.-]+)?$"+"\""};
48966
+ if(vErrors === null){
48967
+ vErrors = [err36];
48968
+ }
48969
+ else {
48970
+ vErrors.push(err36);
48971
+ }
48972
+ errors++;
48973
+ }
48974
+ }
48975
+ else {
48976
+ const err37 = {instancePath:instancePath+"/versions/" + i0+"/version",schemaPath:"#/$defs/CloudhalVersion/type",keyword:"type",params:{type: "string"},message:"must be string"};
48977
+ if(vErrors === null){
48978
+ vErrors = [err37];
48979
+ }
48980
+ else {
48981
+ vErrors.push(err37);
48982
+ }
48983
+ errors++;
48984
+ }
48985
+ }
48986
+ if(data10.yankedAt !== undefined){
48987
+ let data12 = data10.yankedAt;
48988
+ if(typeof data12 === "string"){
48989
+ if(!(formats0.validate(data12))){
48990
+ const err38 = {instancePath:instancePath+"/versions/" + i0+"/yankedAt",schemaPath:"#/$defs/Timestamp/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""};
48991
+ if(vErrors === null){
48992
+ vErrors = [err38];
48993
+ }
48994
+ else {
48995
+ vErrors.push(err38);
48996
+ }
48997
+ errors++;
48998
+ }
48999
+ }
49000
+ else {
49001
+ const err39 = {instancePath:instancePath+"/versions/" + i0+"/yankedAt",schemaPath:"#/$defs/Timestamp/type",keyword:"type",params:{type: "string"},message:"must be string"};
49002
+ if(vErrors === null){
49003
+ vErrors = [err39];
49004
+ }
49005
+ else {
49006
+ vErrors.push(err39);
49007
+ }
49008
+ errors++;
49009
+ }
49010
+ }
49011
+ if(data10.reason !== undefined){
49012
+ let data13 = data10.reason;
49013
+ if(typeof data13 === "string"){
49014
+ if(func2(data13) > 500){
49015
+ const err40 = {instancePath:instancePath+"/versions/" + i0+"/reason",schemaPath:"#/properties/versions/items/properties/reason/maxLength",keyword:"maxLength",params:{limit: 500},message:"must NOT have more than 500 characters"};
49016
+ if(vErrors === null){
49017
+ vErrors = [err40];
49018
+ }
49019
+ else {
49020
+ vErrors.push(err40);
49021
+ }
49022
+ errors++;
49023
+ }
49024
+ if(func2(data13) < 1){
49025
+ const err41 = {instancePath:instancePath+"/versions/" + i0+"/reason",schemaPath:"#/properties/versions/items/properties/reason/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
49026
+ if(vErrors === null){
49027
+ vErrors = [err41];
49028
+ }
49029
+ else {
49030
+ vErrors.push(err41);
49031
+ }
49032
+ errors++;
49033
+ }
49034
+ }
49035
+ else {
49036
+ const err42 = {instancePath:instancePath+"/versions/" + i0+"/reason",schemaPath:"#/properties/versions/items/properties/reason/type",keyword:"type",params:{type: "string"},message:"must be string"};
49037
+ if(vErrors === null){
49038
+ vErrors = [err42];
49039
+ }
49040
+ else {
49041
+ vErrors.push(err42);
49042
+ }
49043
+ errors++;
49044
+ }
49045
+ }
49046
+ }
49047
+ else {
49048
+ const err43 = {instancePath:instancePath+"/versions/" + i0,schemaPath:"#/properties/versions/items/type",keyword:"type",params:{type: "object"},message:"must be object"};
49049
+ if(vErrors === null){
49050
+ vErrors = [err43];
49051
+ }
49052
+ else {
49053
+ vErrors.push(err43);
49054
+ }
49055
+ errors++;
49056
+ }
49057
+ }
49058
+ }
49059
+ else {
49060
+ const err44 = {instancePath:instancePath+"/versions",schemaPath:"#/properties/versions/type",keyword:"type",params:{type: "array"},message:"must be array"};
49061
+ if(vErrors === null){
49062
+ vErrors = [err44];
49063
+ }
49064
+ else {
49065
+ vErrors.push(err44);
49066
+ }
49067
+ errors++;
49068
+ }
49069
+ }
49070
+ if(data.revokedKeys !== undefined){
49071
+ let data14 = data.revokedKeys;
49072
+ if(Array.isArray(data14)){
49073
+ if(data14.length > 64){
49074
+ const err45 = {instancePath:instancePath+"/revokedKeys",schemaPath:"#/properties/revokedKeys/maxItems",keyword:"maxItems",params:{limit: 64},message:"must NOT have more than 64 items"};
49075
+ if(vErrors === null){
49076
+ vErrors = [err45];
49077
+ }
49078
+ else {
49079
+ vErrors.push(err45);
49080
+ }
49081
+ errors++;
49082
+ }
49083
+ const len1 = data14.length;
49084
+ for(let i1=0; i1<len1; i1++){
49085
+ let data15 = data14[i1];
49086
+ if(data15 && typeof data15 == "object" && !Array.isArray(data15)){
49087
+ if(data15.keyId === undefined){
49088
+ const err46 = {instancePath:instancePath+"/revokedKeys/" + i1,schemaPath:"#/properties/revokedKeys/items/required",keyword:"required",params:{missingProperty: "keyId"},message:"must have required property '"+"keyId"+"'"};
49089
+ if(vErrors === null){
49090
+ vErrors = [err46];
49091
+ }
49092
+ else {
49093
+ vErrors.push(err46);
49094
+ }
49095
+ errors++;
49096
+ }
49097
+ if(data15.revokedAt === undefined){
49098
+ const err47 = {instancePath:instancePath+"/revokedKeys/" + i1,schemaPath:"#/properties/revokedKeys/items/required",keyword:"required",params:{missingProperty: "revokedAt"},message:"must have required property '"+"revokedAt"+"'"};
49099
+ if(vErrors === null){
49100
+ vErrors = [err47];
49101
+ }
49102
+ else {
49103
+ vErrors.push(err47);
49104
+ }
49105
+ errors++;
49106
+ }
49107
+ if(data15.reason === undefined){
49108
+ const err48 = {instancePath:instancePath+"/revokedKeys/" + i1,schemaPath:"#/properties/revokedKeys/items/required",keyword:"required",params:{missingProperty: "reason"},message:"must have required property '"+"reason"+"'"};
49109
+ if(vErrors === null){
49110
+ vErrors = [err48];
49111
+ }
49112
+ else {
49113
+ vErrors.push(err48);
49114
+ }
49115
+ errors++;
49116
+ }
49117
+ for(const key3 in data15){
49118
+ if(!(((key3 === "keyId") || (key3 === "revokedAt")) || (key3 === "reason"))){
49119
+ const err49 = {instancePath:instancePath+"/revokedKeys/" + i1,schemaPath:"#/properties/revokedKeys/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};
49120
+ if(vErrors === null){
49121
+ vErrors = [err49];
49122
+ }
49123
+ else {
49124
+ vErrors.push(err49);
49125
+ }
49126
+ errors++;
49127
+ }
49128
+ }
49129
+ if(data15.keyId !== undefined){
49130
+ let data16 = data15.keyId;
49131
+ if(typeof data16 === "string"){
49132
+ if(!pattern336.test(data16)){
49133
+ const err50 = {instancePath:instancePath+"/revokedKeys/" + i1+"/keyId",schemaPath:"#/$defs/KeyId/pattern",keyword:"pattern",params:{pattern: "^[a-z0-9][a-z0-9-]{2,63}$"},message:"must match pattern \""+"^[a-z0-9][a-z0-9-]{2,63}$"+"\""};
49134
+ if(vErrors === null){
49135
+ vErrors = [err50];
49136
+ }
49137
+ else {
49138
+ vErrors.push(err50);
49139
+ }
49140
+ errors++;
49141
+ }
49142
+ }
49143
+ else {
49144
+ const err51 = {instancePath:instancePath+"/revokedKeys/" + i1+"/keyId",schemaPath:"#/$defs/KeyId/type",keyword:"type",params:{type: "string"},message:"must be string"};
49145
+ if(vErrors === null){
49146
+ vErrors = [err51];
49147
+ }
49148
+ else {
49149
+ vErrors.push(err51);
49150
+ }
49151
+ errors++;
49152
+ }
49153
+ }
49154
+ if(data15.revokedAt !== undefined){
49155
+ let data17 = data15.revokedAt;
49156
+ if(typeof data17 === "string"){
49157
+ if(!(formats0.validate(data17))){
49158
+ const err52 = {instancePath:instancePath+"/revokedKeys/" + i1+"/revokedAt",schemaPath:"#/$defs/Timestamp/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""};
49159
+ if(vErrors === null){
49160
+ vErrors = [err52];
49161
+ }
49162
+ else {
49163
+ vErrors.push(err52);
49164
+ }
49165
+ errors++;
49166
+ }
49167
+ }
49168
+ else {
49169
+ const err53 = {instancePath:instancePath+"/revokedKeys/" + i1+"/revokedAt",schemaPath:"#/$defs/Timestamp/type",keyword:"type",params:{type: "string"},message:"must be string"};
49170
+ if(vErrors === null){
49171
+ vErrors = [err53];
49172
+ }
49173
+ else {
49174
+ vErrors.push(err53);
49175
+ }
49176
+ errors++;
49177
+ }
49178
+ }
49179
+ if(data15.reason !== undefined){
49180
+ let data18 = data15.reason;
49181
+ if(typeof data18 === "string"){
49182
+ if(func2(data18) > 500){
49183
+ const err54 = {instancePath:instancePath+"/revokedKeys/" + i1+"/reason",schemaPath:"#/properties/revokedKeys/items/properties/reason/maxLength",keyword:"maxLength",params:{limit: 500},message:"must NOT have more than 500 characters"};
49184
+ if(vErrors === null){
49185
+ vErrors = [err54];
49186
+ }
49187
+ else {
49188
+ vErrors.push(err54);
49189
+ }
49190
+ errors++;
49191
+ }
49192
+ if(func2(data18) < 1){
49193
+ const err55 = {instancePath:instancePath+"/revokedKeys/" + i1+"/reason",schemaPath:"#/properties/revokedKeys/items/properties/reason/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
49194
+ if(vErrors === null){
49195
+ vErrors = [err55];
49196
+ }
49197
+ else {
49198
+ vErrors.push(err55);
49199
+ }
49200
+ errors++;
49201
+ }
49202
+ }
49203
+ else {
49204
+ const err56 = {instancePath:instancePath+"/revokedKeys/" + i1+"/reason",schemaPath:"#/properties/revokedKeys/items/properties/reason/type",keyword:"type",params:{type: "string"},message:"must be string"};
49205
+ if(vErrors === null){
49206
+ vErrors = [err56];
49207
+ }
49208
+ else {
49209
+ vErrors.push(err56);
49210
+ }
49211
+ errors++;
49212
+ }
49213
+ }
49214
+ }
49215
+ else {
49216
+ const err57 = {instancePath:instancePath+"/revokedKeys/" + i1,schemaPath:"#/properties/revokedKeys/items/type",keyword:"type",params:{type: "object"},message:"must be object"};
49217
+ if(vErrors === null){
49218
+ vErrors = [err57];
49219
+ }
49220
+ else {
49221
+ vErrors.push(err57);
49222
+ }
49223
+ errors++;
49224
+ }
49225
+ }
49226
+ }
49227
+ else {
49228
+ const err58 = {instancePath:instancePath+"/revokedKeys",schemaPath:"#/properties/revokedKeys/type",keyword:"type",params:{type: "array"},message:"must be array"};
49229
+ if(vErrors === null){
49230
+ vErrors = [err58];
49231
+ }
49232
+ else {
49233
+ vErrors.push(err58);
49234
+ }
49235
+ errors++;
49236
+ }
49237
+ }
49238
+ }
49239
+ else {
49240
+ const err59 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};
49241
+ if(vErrors === null){
49242
+ vErrors = [err59];
49243
+ }
49244
+ else {
49245
+ vErrors.push(err59);
49246
+ }
49247
+ errors++;
49248
+ }
49249
+ validate259.errors = vErrors;
49250
+ return errors === 0;
49251
+ }
49252
+ validate259.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};
49253
+