@php-wasm/universal 3.1.29 → 3.1.30

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.
@@ -14,7 +14,26 @@ const schema11 = {
14
14
  artifacts: {
15
15
  type: 'array',
16
16
  items: {
17
- $ref: '#/definitions/PHPExtensionManifestArtifact',
17
+ type: 'object',
18
+ properties: {
19
+ phpVersion: {
20
+ type: 'string',
21
+ description:
22
+ 'PHP major/minor version, e.g. `8.4`.',
23
+ },
24
+ sourcePath: {
25
+ type: 'string',
26
+ description:
27
+ 'Relative to the manifest URL/base URL, or an absolute URL.',
28
+ },
29
+ extraFiles: {
30
+ $ref: '#/definitions/PHPExtensionManifestExtraFiles',
31
+ description:
32
+ 'URL-backed files needed only by this artifact.',
33
+ },
34
+ },
35
+ required: ['phpVersion', 'sourcePath'],
36
+ additionalProperties: false,
18
37
  },
19
38
  },
20
39
  extraFiles: {
@@ -28,27 +47,6 @@ const schema11 = {
28
47
  description:
29
48
  'Extension artifact manifest. Lets callers publish a matrix of `.so` files and lets `resolvePHPExtension()` select the artifact matching the current PHP version. External extension artifacts are JSPI-only.',
30
49
  },
31
- PHPExtensionManifestArtifact: {
32
- type: 'object',
33
- properties: {
34
- phpVersion: {
35
- type: 'string',
36
- description: 'PHP major/minor version, e.g. `8.4`.',
37
- },
38
- sourcePath: {
39
- type: 'string',
40
- description:
41
- 'Relative to the manifest URL/base URL, or an absolute URL.',
42
- },
43
- extraFiles: {
44
- $ref: '#/definitions/PHPExtensionManifestExtraFiles',
45
- description:
46
- 'URL-backed files needed only by this artifact.',
47
- },
48
- },
49
- required: ['phpVersion', 'sourcePath'],
50
- additionalProperties: false,
51
- },
52
50
  PHPExtensionManifestExtraFiles: {
53
51
  type: 'object',
54
52
  properties: {
@@ -60,35 +58,32 @@ const schema11 = {
60
58
  nodes: {
61
59
  type: 'array',
62
60
  items: {
63
- $ref: '#/definitions/PHPExtensionManifestExtraFile',
61
+ type: 'object',
62
+ properties: {
63
+ vfsPath: {
64
+ type: 'string',
65
+ description:
66
+ "Joined with the group's `vfsRoot` to form the final VFS path.",
67
+ },
68
+ type: {
69
+ type: 'string',
70
+ enum: ['file', 'directory'],
71
+ description:
72
+ 'Defaults to "file". Only file nodes need a `sourcePath`.',
73
+ },
74
+ sourcePath: {
75
+ type: 'string',
76
+ description:
77
+ 'Relative to the manifest URL/base URL, or an absolute URL.',
78
+ },
79
+ },
80
+ required: ['vfsPath'],
81
+ additionalProperties: false,
64
82
  },
65
83
  },
66
84
  },
67
85
  additionalProperties: false,
68
86
  },
69
- PHPExtensionManifestExtraFile: {
70
- type: 'object',
71
- properties: {
72
- vfsPath: {
73
- type: 'string',
74
- description:
75
- "Joined with the group's `vfsRoot` to form the final VFS path.",
76
- },
77
- type: {
78
- type: 'string',
79
- enum: ['file', 'directory'],
80
- description:
81
- 'Defaults to "file". Only file nodes need a `sourcePath`.',
82
- },
83
- sourcePath: {
84
- type: 'string',
85
- description:
86
- 'Relative to the manifest URL/base URL, or an absolute URL.',
87
- },
88
- },
89
- required: ['vfsPath'],
90
- additionalProperties: false,
91
- },
92
87
  },
93
88
  };
94
89
  const schema12 = {
@@ -99,7 +94,27 @@ const schema12 = {
99
94
  mode: { type: 'string', const: 'php-extension' },
100
95
  artifacts: {
101
96
  type: 'array',
102
- items: { $ref: '#/definitions/PHPExtensionManifestArtifact' },
97
+ items: {
98
+ type: 'object',
99
+ properties: {
100
+ phpVersion: {
101
+ type: 'string',
102
+ description: 'PHP major/minor version, e.g. `8.4`.',
103
+ },
104
+ sourcePath: {
105
+ type: 'string',
106
+ description:
107
+ 'Relative to the manifest URL/base URL, or an absolute URL.',
108
+ },
109
+ extraFiles: {
110
+ $ref: '#/definitions/PHPExtensionManifestExtraFiles',
111
+ description:
112
+ 'URL-backed files needed only by this artifact.',
113
+ },
114
+ },
115
+ required: ['phpVersion', 'sourcePath'],
116
+ additionalProperties: false,
117
+ },
103
118
  },
104
119
  extraFiles: {
105
120
  $ref: '#/definitions/PHPExtensionManifestExtraFiles',
@@ -113,26 +128,6 @@ const schema12 = {
113
128
  'Extension artifact manifest. Lets callers publish a matrix of `.so` files and lets `resolvePHPExtension()` select the artifact matching the current PHP version. External extension artifacts are JSPI-only.',
114
129
  };
115
130
  const schema13 = {
116
- type: 'object',
117
- properties: {
118
- phpVersion: {
119
- type: 'string',
120
- description: 'PHP major/minor version, e.g. `8.4`.',
121
- },
122
- sourcePath: {
123
- type: 'string',
124
- description:
125
- 'Relative to the manifest URL/base URL, or an absolute URL.',
126
- },
127
- extraFiles: {
128
- $ref: '#/definitions/PHPExtensionManifestExtraFiles',
129
- description: 'URL-backed files needed only by this artifact.',
130
- },
131
- },
132
- required: ['phpVersion', 'sourcePath'],
133
- additionalProperties: false,
134
- };
135
- const schema14 = {
136
131
  type: 'object',
137
132
  properties: {
138
133
  vfsRoot: {
@@ -142,491 +137,33 @@ const schema14 = {
142
137
  },
143
138
  nodes: {
144
139
  type: 'array',
145
- items: { $ref: '#/definitions/PHPExtensionManifestExtraFile' },
146
- },
147
- },
148
- additionalProperties: false,
149
- };
150
- const schema15 = {
151
- type: 'object',
152
- properties: {
153
- vfsPath: {
154
- type: 'string',
155
- description:
156
- "Joined with the group's `vfsRoot` to form the final VFS path.",
157
- },
158
- type: {
159
- type: 'string',
160
- enum: ['file', 'directory'],
161
- description:
162
- 'Defaults to "file". Only file nodes need a `sourcePath`.',
163
- },
164
- sourcePath: {
165
- type: 'string',
166
- description:
167
- 'Relative to the manifest URL/base URL, or an absolute URL.',
140
+ items: {
141
+ type: 'object',
142
+ properties: {
143
+ vfsPath: {
144
+ type: 'string',
145
+ description:
146
+ "Joined with the group's `vfsRoot` to form the final VFS path.",
147
+ },
148
+ type: {
149
+ type: 'string',
150
+ enum: ['file', 'directory'],
151
+ description:
152
+ 'Defaults to "file". Only file nodes need a `sourcePath`.',
153
+ },
154
+ sourcePath: {
155
+ type: 'string',
156
+ description:
157
+ 'Relative to the manifest URL/base URL, or an absolute URL.',
158
+ },
159
+ },
160
+ required: ['vfsPath'],
161
+ additionalProperties: false,
162
+ },
168
163
  },
169
164
  },
170
- required: ['vfsPath'],
171
165
  additionalProperties: false,
172
166
  };
173
- function validate13(
174
- data,
175
- { instancePath = '', parentData, parentDataProperty, rootData = data } = {}
176
- ) {
177
- let vErrors = null;
178
- let errors = 0;
179
- if (errors === 0) {
180
- if (data && typeof data == 'object' && !Array.isArray(data)) {
181
- const _errs1 = errors;
182
- for (const key0 in data) {
183
- if (!(key0 === 'vfsRoot' || key0 === 'nodes')) {
184
- validate13.errors = [
185
- {
186
- instancePath,
187
- schemaPath: '#/additionalProperties',
188
- keyword: 'additionalProperties',
189
- params: { additionalProperty: key0 },
190
- message: 'must NOT have additional properties',
191
- },
192
- ];
193
- return false;
194
- break;
195
- }
196
- }
197
- if (_errs1 === errors) {
198
- if (data.vfsRoot !== undefined) {
199
- const _errs2 = errors;
200
- if (typeof data.vfsRoot !== 'string') {
201
- validate13.errors = [
202
- {
203
- instancePath: instancePath + '/vfsRoot',
204
- schemaPath: '#/properties/vfsRoot/type',
205
- keyword: 'type',
206
- params: { type: 'string' },
207
- message: 'must be string',
208
- },
209
- ];
210
- return false;
211
- }
212
- var valid0 = _errs2 === errors;
213
- } else {
214
- var valid0 = true;
215
- }
216
- if (valid0) {
217
- if (data.nodes !== undefined) {
218
- let data1 = data.nodes;
219
- const _errs4 = errors;
220
- if (errors === _errs4) {
221
- if (Array.isArray(data1)) {
222
- var valid1 = true;
223
- const len0 = data1.length;
224
- for (let i0 = 0; i0 < len0; i0++) {
225
- let data2 = data1[i0];
226
- const _errs6 = errors;
227
- const _errs7 = errors;
228
- if (errors === _errs7) {
229
- if (
230
- data2 &&
231
- typeof data2 == 'object' &&
232
- !Array.isArray(data2)
233
- ) {
234
- let missing0;
235
- if (
236
- data2.vfsPath === undefined &&
237
- (missing0 = 'vfsPath')
238
- ) {
239
- validate13.errors = [
240
- {
241
- instancePath:
242
- instancePath +
243
- '/nodes/' +
244
- i0,
245
- schemaPath:
246
- '#/definitions/PHPExtensionManifestExtraFile/required',
247
- keyword: 'required',
248
- params: {
249
- missingProperty:
250
- missing0,
251
- },
252
- message:
253
- "must have required property '" +
254
- missing0 +
255
- "'",
256
- },
257
- ];
258
- return false;
259
- } else {
260
- const _errs9 = errors;
261
- for (const key1 in data2) {
262
- if (
263
- !(
264
- key1 ===
265
- 'vfsPath' ||
266
- key1 === 'type' ||
267
- key1 ===
268
- 'sourcePath'
269
- )
270
- ) {
271
- validate13.errors = [
272
- {
273
- instancePath:
274
- instancePath +
275
- '/nodes/' +
276
- i0,
277
- schemaPath:
278
- '#/definitions/PHPExtensionManifestExtraFile/additionalProperties',
279
- keyword:
280
- 'additionalProperties',
281
- params: {
282
- additionalProperty:
283
- key1,
284
- },
285
- message:
286
- 'must NOT have additional properties',
287
- },
288
- ];
289
- return false;
290
- break;
291
- }
292
- }
293
- if (_errs9 === errors) {
294
- if (
295
- data2.vfsPath !==
296
- undefined
297
- ) {
298
- const _errs10 = errors;
299
- if (
300
- typeof data2.vfsPath !==
301
- 'string'
302
- ) {
303
- validate13.errors =
304
- [
305
- {
306
- instancePath:
307
- instancePath +
308
- '/nodes/' +
309
- i0 +
310
- '/vfsPath',
311
- schemaPath:
312
- '#/definitions/PHPExtensionManifestExtraFile/properties/vfsPath/type',
313
- keyword:
314
- 'type',
315
- params: {
316
- type: 'string',
317
- },
318
- message:
319
- 'must be string',
320
- },
321
- ];
322
- return false;
323
- }
324
- var valid3 =
325
- _errs10 === errors;
326
- } else {
327
- var valid3 = true;
328
- }
329
- if (valid3) {
330
- if (
331
- data2.type !==
332
- undefined
333
- ) {
334
- let data4 =
335
- data2.type;
336
- const _errs12 =
337
- errors;
338
- if (
339
- typeof data4 !==
340
- 'string'
341
- ) {
342
- validate13.errors =
343
- [
344
- {
345
- instancePath:
346
- instancePath +
347
- '/nodes/' +
348
- i0 +
349
- '/type',
350
- schemaPath:
351
- '#/definitions/PHPExtensionManifestExtraFile/properties/type/type',
352
- keyword:
353
- 'type',
354
- params: {
355
- type: 'string',
356
- },
357
- message:
358
- 'must be string',
359
- },
360
- ];
361
- return false;
362
- }
363
- if (
364
- !(
365
- data4 ===
366
- 'file' ||
367
- data4 ===
368
- 'directory'
369
- )
370
- ) {
371
- validate13.errors =
372
- [
373
- {
374
- instancePath:
375
- instancePath +
376
- '/nodes/' +
377
- i0 +
378
- '/type',
379
- schemaPath:
380
- '#/definitions/PHPExtensionManifestExtraFile/properties/type/enum',
381
- keyword:
382
- 'enum',
383
- params: {
384
- allowedValues:
385
- schema15
386
- .properties
387
- .type
388
- .enum,
389
- },
390
- message:
391
- 'must be equal to one of the allowed values',
392
- },
393
- ];
394
- return false;
395
- }
396
- var valid3 =
397
- _errs12 ===
398
- errors;
399
- } else {
400
- var valid3 = true;
401
- }
402
- if (valid3) {
403
- if (
404
- data2.sourcePath !==
405
- undefined
406
- ) {
407
- const _errs14 =
408
- errors;
409
- if (
410
- typeof data2.sourcePath !==
411
- 'string'
412
- ) {
413
- validate13.errors =
414
- [
415
- {
416
- instancePath:
417
- instancePath +
418
- '/nodes/' +
419
- i0 +
420
- '/sourcePath',
421
- schemaPath:
422
- '#/definitions/PHPExtensionManifestExtraFile/properties/sourcePath/type',
423
- keyword:
424
- 'type',
425
- params: {
426
- type: 'string',
427
- },
428
- message:
429
- 'must be string',
430
- },
431
- ];
432
- return false;
433
- }
434
- var valid3 =
435
- _errs14 ===
436
- errors;
437
- } else {
438
- var valid3 = true;
439
- }
440
- }
441
- }
442
- }
443
- }
444
- } else {
445
- validate13.errors = [
446
- {
447
- instancePath:
448
- instancePath +
449
- '/nodes/' +
450
- i0,
451
- schemaPath:
452
- '#/definitions/PHPExtensionManifestExtraFile/type',
453
- keyword: 'type',
454
- params: { type: 'object' },
455
- message: 'must be object',
456
- },
457
- ];
458
- return false;
459
- }
460
- }
461
- var valid1 = _errs6 === errors;
462
- if (!valid1) {
463
- break;
464
- }
465
- }
466
- } else {
467
- validate13.errors = [
468
- {
469
- instancePath: instancePath + '/nodes',
470
- schemaPath: '#/properties/nodes/type',
471
- keyword: 'type',
472
- params: { type: 'array' },
473
- message: 'must be array',
474
- },
475
- ];
476
- return false;
477
- }
478
- }
479
- var valid0 = _errs4 === errors;
480
- } else {
481
- var valid0 = true;
482
- }
483
- }
484
- }
485
- } else {
486
- validate13.errors = [
487
- {
488
- instancePath,
489
- schemaPath: '#/type',
490
- keyword: 'type',
491
- params: { type: 'object' },
492
- message: 'must be object',
493
- },
494
- ];
495
- return false;
496
- }
497
- }
498
- validate13.errors = vErrors;
499
- return errors === 0;
500
- }
501
- function validate12(
502
- data,
503
- { instancePath = '', parentData, parentDataProperty, rootData = data } = {}
504
- ) {
505
- let vErrors = null;
506
- let errors = 0;
507
- if (errors === 0) {
508
- if (data && typeof data == 'object' && !Array.isArray(data)) {
509
- let missing0;
510
- if (
511
- (data.phpVersion === undefined && (missing0 = 'phpVersion')) ||
512
- (data.sourcePath === undefined && (missing0 = 'sourcePath'))
513
- ) {
514
- validate12.errors = [
515
- {
516
- instancePath,
517
- schemaPath: '#/required',
518
- keyword: 'required',
519
- params: { missingProperty: missing0 },
520
- message:
521
- "must have required property '" + missing0 + "'",
522
- },
523
- ];
524
- return false;
525
- } else {
526
- const _errs1 = errors;
527
- for (const key0 in data) {
528
- if (
529
- !(
530
- key0 === 'phpVersion' ||
531
- key0 === 'sourcePath' ||
532
- key0 === 'extraFiles'
533
- )
534
- ) {
535
- validate12.errors = [
536
- {
537
- instancePath,
538
- schemaPath: '#/additionalProperties',
539
- keyword: 'additionalProperties',
540
- params: { additionalProperty: key0 },
541
- message: 'must NOT have additional properties',
542
- },
543
- ];
544
- return false;
545
- break;
546
- }
547
- }
548
- if (_errs1 === errors) {
549
- if (data.phpVersion !== undefined) {
550
- const _errs2 = errors;
551
- if (typeof data.phpVersion !== 'string') {
552
- validate12.errors = [
553
- {
554
- instancePath: instancePath + '/phpVersion',
555
- schemaPath: '#/properties/phpVersion/type',
556
- keyword: 'type',
557
- params: { type: 'string' },
558
- message: 'must be string',
559
- },
560
- ];
561
- return false;
562
- }
563
- var valid0 = _errs2 === errors;
564
- } else {
565
- var valid0 = true;
566
- }
567
- if (valid0) {
568
- if (data.sourcePath !== undefined) {
569
- const _errs4 = errors;
570
- if (typeof data.sourcePath !== 'string') {
571
- validate12.errors = [
572
- {
573
- instancePath:
574
- instancePath + '/sourcePath',
575
- schemaPath:
576
- '#/properties/sourcePath/type',
577
- keyword: 'type',
578
- params: { type: 'string' },
579
- message: 'must be string',
580
- },
581
- ];
582
- return false;
583
- }
584
- var valid0 = _errs4 === errors;
585
- } else {
586
- var valid0 = true;
587
- }
588
- if (valid0) {
589
- if (data.extraFiles !== undefined) {
590
- const _errs6 = errors;
591
- if (
592
- !validate13(data.extraFiles, {
593
- instancePath:
594
- instancePath + '/extraFiles',
595
- parentData: data,
596
- parentDataProperty: 'extraFiles',
597
- rootData,
598
- })
599
- ) {
600
- vErrors =
601
- vErrors === null
602
- ? validate13.errors
603
- : vErrors.concat(validate13.errors);
604
- errors = vErrors.length;
605
- }
606
- var valid0 = _errs6 === errors;
607
- } else {
608
- var valid0 = true;
609
- }
610
- }
611
- }
612
- }
613
- }
614
- } else {
615
- validate12.errors = [
616
- {
617
- instancePath,
618
- schemaPath: '#/type',
619
- keyword: 'type',
620
- params: { type: 'object' },
621
- message: 'must be object',
622
- },
623
- ];
624
- return false;
625
- }
626
- }
627
- validate12.errors = vErrors;
628
- return errors === 0;
629
- }
630
167
  function validate11(
631
168
  data,
632
169
  { instancePath = '', parentData, parentDataProperty, rootData = data } = {}
@@ -762,25 +299,669 @@ function validate11(
762
299
  var valid1 = true;
763
300
  const len0 = data3.length;
764
301
  for (let i0 = 0; i0 < len0; i0++) {
302
+ let data4 = data3[i0];
765
303
  const _errs10 = errors;
766
- if (
767
- !validate12(data3[i0], {
768
- instancePath:
769
- instancePath +
770
- '/artifacts/' +
771
- i0,
772
- parentData: data3,
773
- parentDataProperty: i0,
774
- rootData,
775
- })
776
- ) {
777
- vErrors =
778
- vErrors === null
779
- ? validate12.errors
780
- : vErrors.concat(
781
- validate12.errors
782
- );
783
- errors = vErrors.length;
304
+ if (errors === _errs10) {
305
+ if (
306
+ data4 &&
307
+ typeof data4 ==
308
+ 'object' &&
309
+ !Array.isArray(data4)
310
+ ) {
311
+ let missing1;
312
+ if (
313
+ (data4.phpVersion ===
314
+ undefined &&
315
+ (missing1 =
316
+ 'phpVersion')) ||
317
+ (data4.sourcePath ===
318
+ undefined &&
319
+ (missing1 =
320
+ 'sourcePath'))
321
+ ) {
322
+ validate11.errors =
323
+ [
324
+ {
325
+ instancePath:
326
+ instancePath +
327
+ '/artifacts/' +
328
+ i0,
329
+ schemaPath:
330
+ '#/properties/artifacts/items/required',
331
+ keyword:
332
+ 'required',
333
+ params: {
334
+ missingProperty:
335
+ missing1,
336
+ },
337
+ message:
338
+ "must have required property '" +
339
+ missing1 +
340
+ "'",
341
+ },
342
+ ];
343
+ return false;
344
+ } else {
345
+ const _errs12 =
346
+ errors;
347
+ for (const key1 in data4) {
348
+ if (
349
+ !(
350
+ key1 ===
351
+ 'phpVersion' ||
352
+ key1 ===
353
+ 'sourcePath' ||
354
+ key1 ===
355
+ 'extraFiles'
356
+ )
357
+ ) {
358
+ validate11.errors =
359
+ [
360
+ {
361
+ instancePath:
362
+ instancePath +
363
+ '/artifacts/' +
364
+ i0,
365
+ schemaPath:
366
+ '#/properties/artifacts/items/additionalProperties',
367
+ keyword:
368
+ 'additionalProperties',
369
+ params: {
370
+ additionalProperty:
371
+ key1,
372
+ },
373
+ message:
374
+ 'must NOT have additional properties',
375
+ },
376
+ ];
377
+ return false;
378
+ break;
379
+ }
380
+ }
381
+ if (
382
+ _errs12 ===
383
+ errors
384
+ ) {
385
+ if (
386
+ data4.phpVersion !==
387
+ undefined
388
+ ) {
389
+ const _errs13 =
390
+ errors;
391
+ if (
392
+ typeof data4.phpVersion !==
393
+ 'string'
394
+ ) {
395
+ validate11.errors =
396
+ [
397
+ {
398
+ instancePath:
399
+ instancePath +
400
+ '/artifacts/' +
401
+ i0 +
402
+ '/phpVersion',
403
+ schemaPath:
404
+ '#/properties/artifacts/items/properties/phpVersion/type',
405
+ keyword:
406
+ 'type',
407
+ params: {
408
+ type: 'string',
409
+ },
410
+ message:
411
+ 'must be string',
412
+ },
413
+ ];
414
+ return false;
415
+ }
416
+ var valid2 =
417
+ _errs13 ===
418
+ errors;
419
+ } else {
420
+ var valid2 = true;
421
+ }
422
+ if (valid2) {
423
+ if (
424
+ data4.sourcePath !==
425
+ undefined
426
+ ) {
427
+ const _errs15 =
428
+ errors;
429
+ if (
430
+ typeof data4.sourcePath !==
431
+ 'string'
432
+ ) {
433
+ validate11.errors =
434
+ [
435
+ {
436
+ instancePath:
437
+ instancePath +
438
+ '/artifacts/' +
439
+ i0 +
440
+ '/sourcePath',
441
+ schemaPath:
442
+ '#/properties/artifacts/items/properties/sourcePath/type',
443
+ keyword:
444
+ 'type',
445
+ params: {
446
+ type: 'string',
447
+ },
448
+ message:
449
+ 'must be string',
450
+ },
451
+ ];
452
+ return false;
453
+ }
454
+ var valid2 =
455
+ _errs15 ===
456
+ errors;
457
+ } else {
458
+ var valid2 = true;
459
+ }
460
+ if (
461
+ valid2
462
+ ) {
463
+ if (
464
+ data4.extraFiles !==
465
+ undefined
466
+ ) {
467
+ let data7 =
468
+ data4.extraFiles;
469
+ const _errs17 =
470
+ errors;
471
+ const _errs18 =
472
+ errors;
473
+ if (
474
+ errors ===
475
+ _errs18
476
+ ) {
477
+ if (
478
+ data7 &&
479
+ typeof data7 ==
480
+ 'object' &&
481
+ !Array.isArray(
482
+ data7
483
+ )
484
+ ) {
485
+ const _errs20 =
486
+ errors;
487
+ for (const key2 in data7) {
488
+ if (
489
+ !(
490
+ key2 ===
491
+ 'vfsRoot' ||
492
+ key2 ===
493
+ 'nodes'
494
+ )
495
+ ) {
496
+ validate11.errors =
497
+ [
498
+ {
499
+ instancePath:
500
+ instancePath +
501
+ '/artifacts/' +
502
+ i0 +
503
+ '/extraFiles',
504
+ schemaPath:
505
+ '#/definitions/PHPExtensionManifestExtraFiles/additionalProperties',
506
+ keyword:
507
+ 'additionalProperties',
508
+ params: {
509
+ additionalProperty:
510
+ key2,
511
+ },
512
+ message:
513
+ 'must NOT have additional properties',
514
+ },
515
+ ];
516
+ return false;
517
+ break;
518
+ }
519
+ }
520
+ if (
521
+ _errs20 ===
522
+ errors
523
+ ) {
524
+ if (
525
+ data7.vfsRoot !==
526
+ undefined
527
+ ) {
528
+ const _errs21 =
529
+ errors;
530
+ if (
531
+ typeof data7.vfsRoot !==
532
+ 'string'
533
+ ) {
534
+ validate11.errors =
535
+ [
536
+ {
537
+ instancePath:
538
+ instancePath +
539
+ '/artifacts/' +
540
+ i0 +
541
+ '/extraFiles/vfsRoot',
542
+ schemaPath:
543
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/vfsRoot/type',
544
+ keyword:
545
+ 'type',
546
+ params: {
547
+ type: 'string',
548
+ },
549
+ message:
550
+ 'must be string',
551
+ },
552
+ ];
553
+ return false;
554
+ }
555
+ var valid4 =
556
+ _errs21 ===
557
+ errors;
558
+ } else {
559
+ var valid4 = true;
560
+ }
561
+ if (
562
+ valid4
563
+ ) {
564
+ if (
565
+ data7.nodes !==
566
+ undefined
567
+ ) {
568
+ let data9 =
569
+ data7.nodes;
570
+ const _errs23 =
571
+ errors;
572
+ if (
573
+ errors ===
574
+ _errs23
575
+ ) {
576
+ if (
577
+ Array.isArray(
578
+ data9
579
+ )
580
+ ) {
581
+ var valid5 = true;
582
+ const len1 =
583
+ data9.length;
584
+ for (
585
+ let i1 = 0;
586
+ i1 <
587
+ len1;
588
+ i1++
589
+ ) {
590
+ let data10 =
591
+ data9[
592
+ i1
593
+ ];
594
+ const _errs25 =
595
+ errors;
596
+ if (
597
+ errors ===
598
+ _errs25
599
+ ) {
600
+ if (
601
+ data10 &&
602
+ typeof data10 ==
603
+ 'object' &&
604
+ !Array.isArray(
605
+ data10
606
+ )
607
+ ) {
608
+ let missing2;
609
+ if (
610
+ data10.vfsPath ===
611
+ undefined &&
612
+ (missing2 =
613
+ 'vfsPath')
614
+ ) {
615
+ validate11.errors =
616
+ [
617
+ {
618
+ instancePath:
619
+ instancePath +
620
+ '/artifacts/' +
621
+ i0 +
622
+ '/extraFiles/nodes/' +
623
+ i1,
624
+ schemaPath:
625
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/items/required',
626
+ keyword:
627
+ 'required',
628
+ params: {
629
+ missingProperty:
630
+ missing2,
631
+ },
632
+ message:
633
+ "must have required property '" +
634
+ missing2 +
635
+ "'",
636
+ },
637
+ ];
638
+ return false;
639
+ } else {
640
+ const _errs27 =
641
+ errors;
642
+ for (const key3 in data10) {
643
+ if (
644
+ !(
645
+ key3 ===
646
+ 'vfsPath' ||
647
+ key3 ===
648
+ 'type' ||
649
+ key3 ===
650
+ 'sourcePath'
651
+ )
652
+ ) {
653
+ validate11.errors =
654
+ [
655
+ {
656
+ instancePath:
657
+ instancePath +
658
+ '/artifacts/' +
659
+ i0 +
660
+ '/extraFiles/nodes/' +
661
+ i1,
662
+ schemaPath:
663
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/items/additionalProperties',
664
+ keyword:
665
+ 'additionalProperties',
666
+ params: {
667
+ additionalProperty:
668
+ key3,
669
+ },
670
+ message:
671
+ 'must NOT have additional properties',
672
+ },
673
+ ];
674
+ return false;
675
+ break;
676
+ }
677
+ }
678
+ if (
679
+ _errs27 ===
680
+ errors
681
+ ) {
682
+ if (
683
+ data10.vfsPath !==
684
+ undefined
685
+ ) {
686
+ const _errs28 =
687
+ errors;
688
+ if (
689
+ typeof data10.vfsPath !==
690
+ 'string'
691
+ ) {
692
+ validate11.errors =
693
+ [
694
+ {
695
+ instancePath:
696
+ instancePath +
697
+ '/artifacts/' +
698
+ i0 +
699
+ '/extraFiles/nodes/' +
700
+ i1 +
701
+ '/vfsPath',
702
+ schemaPath:
703
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/items/properties/vfsPath/type',
704
+ keyword:
705
+ 'type',
706
+ params: {
707
+ type: 'string',
708
+ },
709
+ message:
710
+ 'must be string',
711
+ },
712
+ ];
713
+ return false;
714
+ }
715
+ var valid6 =
716
+ _errs28 ===
717
+ errors;
718
+ } else {
719
+ var valid6 = true;
720
+ }
721
+ if (
722
+ valid6
723
+ ) {
724
+ if (
725
+ data10.type !==
726
+ undefined
727
+ ) {
728
+ let data12 =
729
+ data10.type;
730
+ const _errs30 =
731
+ errors;
732
+ if (
733
+ typeof data12 !==
734
+ 'string'
735
+ ) {
736
+ validate11.errors =
737
+ [
738
+ {
739
+ instancePath:
740
+ instancePath +
741
+ '/artifacts/' +
742
+ i0 +
743
+ '/extraFiles/nodes/' +
744
+ i1 +
745
+ '/type',
746
+ schemaPath:
747
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/items/properties/type/type',
748
+ keyword:
749
+ 'type',
750
+ params: {
751
+ type: 'string',
752
+ },
753
+ message:
754
+ 'must be string',
755
+ },
756
+ ];
757
+ return false;
758
+ }
759
+ if (
760
+ !(
761
+ data12 ===
762
+ 'file' ||
763
+ data12 ===
764
+ 'directory'
765
+ )
766
+ ) {
767
+ validate11.errors =
768
+ [
769
+ {
770
+ instancePath:
771
+ instancePath +
772
+ '/artifacts/' +
773
+ i0 +
774
+ '/extraFiles/nodes/' +
775
+ i1 +
776
+ '/type',
777
+ schemaPath:
778
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/items/properties/type/enum',
779
+ keyword:
780
+ 'enum',
781
+ params: {
782
+ allowedValues:
783
+ schema13
784
+ .properties
785
+ .nodes
786
+ .items
787
+ .properties
788
+ .type
789
+ .enum,
790
+ },
791
+ message:
792
+ 'must be equal to one of the allowed values',
793
+ },
794
+ ];
795
+ return false;
796
+ }
797
+ var valid6 =
798
+ _errs30 ===
799
+ errors;
800
+ } else {
801
+ var valid6 = true;
802
+ }
803
+ if (
804
+ valid6
805
+ ) {
806
+ if (
807
+ data10.sourcePath !==
808
+ undefined
809
+ ) {
810
+ const _errs32 =
811
+ errors;
812
+ if (
813
+ typeof data10.sourcePath !==
814
+ 'string'
815
+ ) {
816
+ validate11.errors =
817
+ [
818
+ {
819
+ instancePath:
820
+ instancePath +
821
+ '/artifacts/' +
822
+ i0 +
823
+ '/extraFiles/nodes/' +
824
+ i1 +
825
+ '/sourcePath',
826
+ schemaPath:
827
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/items/properties/sourcePath/type',
828
+ keyword:
829
+ 'type',
830
+ params: {
831
+ type: 'string',
832
+ },
833
+ message:
834
+ 'must be string',
835
+ },
836
+ ];
837
+ return false;
838
+ }
839
+ var valid6 =
840
+ _errs32 ===
841
+ errors;
842
+ } else {
843
+ var valid6 = true;
844
+ }
845
+ }
846
+ }
847
+ }
848
+ }
849
+ } else {
850
+ validate11.errors =
851
+ [
852
+ {
853
+ instancePath:
854
+ instancePath +
855
+ '/artifacts/' +
856
+ i0 +
857
+ '/extraFiles/nodes/' +
858
+ i1,
859
+ schemaPath:
860
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/items/type',
861
+ keyword:
862
+ 'type',
863
+ params: {
864
+ type: 'object',
865
+ },
866
+ message:
867
+ 'must be object',
868
+ },
869
+ ];
870
+ return false;
871
+ }
872
+ }
873
+ var valid5 =
874
+ _errs25 ===
875
+ errors;
876
+ if (
877
+ !valid5
878
+ ) {
879
+ break;
880
+ }
881
+ }
882
+ } else {
883
+ validate11.errors =
884
+ [
885
+ {
886
+ instancePath:
887
+ instancePath +
888
+ '/artifacts/' +
889
+ i0 +
890
+ '/extraFiles/nodes',
891
+ schemaPath:
892
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/type',
893
+ keyword:
894
+ 'type',
895
+ params: {
896
+ type: 'array',
897
+ },
898
+ message:
899
+ 'must be array',
900
+ },
901
+ ];
902
+ return false;
903
+ }
904
+ }
905
+ var valid4 =
906
+ _errs23 ===
907
+ errors;
908
+ } else {
909
+ var valid4 = true;
910
+ }
911
+ }
912
+ }
913
+ } else {
914
+ validate11.errors =
915
+ [
916
+ {
917
+ instancePath:
918
+ instancePath +
919
+ '/artifacts/' +
920
+ i0 +
921
+ '/extraFiles',
922
+ schemaPath:
923
+ '#/definitions/PHPExtensionManifestExtraFiles/type',
924
+ keyword:
925
+ 'type',
926
+ params: {
927
+ type: 'object',
928
+ },
929
+ message:
930
+ 'must be object',
931
+ },
932
+ ];
933
+ return false;
934
+ }
935
+ }
936
+ var valid2 =
937
+ _errs17 ===
938
+ errors;
939
+ } else {
940
+ var valid2 = true;
941
+ }
942
+ }
943
+ }
944
+ }
945
+ }
946
+ } else {
947
+ validate11.errors = [
948
+ {
949
+ instancePath:
950
+ instancePath +
951
+ '/artifacts/' +
952
+ i0,
953
+ schemaPath:
954
+ '#/properties/artifacts/items/type',
955
+ keyword: 'type',
956
+ params: {
957
+ type: 'object',
958
+ },
959
+ message:
960
+ 'must be object',
961
+ },
962
+ ];
963
+ return false;
964
+ }
784
965
  }
785
966
  var valid1 = _errs10 === errors;
786
967
  if (!valid1) {
@@ -809,27 +990,433 @@ function validate11(
809
990
  }
810
991
  if (valid0) {
811
992
  if (data.extraFiles !== undefined) {
812
- const _errs11 = errors;
813
- if (
814
- !validate13(data.extraFiles, {
815
- instancePath:
816
- instancePath +
817
- '/extraFiles',
818
- parentData: data,
819
- parentDataProperty:
820
- 'extraFiles',
821
- rootData,
822
- })
823
- ) {
824
- vErrors =
825
- vErrors === null
826
- ? validate13.errors
827
- : vErrors.concat(
828
- validate13.errors
829
- );
830
- errors = vErrors.length;
993
+ let data14 = data.extraFiles;
994
+ const _errs34 = errors;
995
+ const _errs35 = errors;
996
+ if (errors === _errs35) {
997
+ if (
998
+ data14 &&
999
+ typeof data14 == 'object' &&
1000
+ !Array.isArray(data14)
1001
+ ) {
1002
+ const _errs37 = errors;
1003
+ for (const key4 in data14) {
1004
+ if (
1005
+ !(
1006
+ key4 ===
1007
+ 'vfsRoot' ||
1008
+ key4 === 'nodes'
1009
+ )
1010
+ ) {
1011
+ validate11.errors = [
1012
+ {
1013
+ instancePath:
1014
+ instancePath +
1015
+ '/extraFiles',
1016
+ schemaPath:
1017
+ '#/definitions/PHPExtensionManifestExtraFiles/additionalProperties',
1018
+ keyword:
1019
+ 'additionalProperties',
1020
+ params: {
1021
+ additionalProperty:
1022
+ key4,
1023
+ },
1024
+ message:
1025
+ 'must NOT have additional properties',
1026
+ },
1027
+ ];
1028
+ return false;
1029
+ break;
1030
+ }
1031
+ }
1032
+ if (_errs37 === errors) {
1033
+ if (
1034
+ data14.vfsRoot !==
1035
+ undefined
1036
+ ) {
1037
+ const _errs38 = errors;
1038
+ if (
1039
+ typeof data14.vfsRoot !==
1040
+ 'string'
1041
+ ) {
1042
+ validate11.errors =
1043
+ [
1044
+ {
1045
+ instancePath:
1046
+ instancePath +
1047
+ '/extraFiles/vfsRoot',
1048
+ schemaPath:
1049
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/vfsRoot/type',
1050
+ keyword:
1051
+ 'type',
1052
+ params: {
1053
+ type: 'string',
1054
+ },
1055
+ message:
1056
+ 'must be string',
1057
+ },
1058
+ ];
1059
+ return false;
1060
+ }
1061
+ var valid8 =
1062
+ _errs38 === errors;
1063
+ } else {
1064
+ var valid8 = true;
1065
+ }
1066
+ if (valid8) {
1067
+ if (
1068
+ data14.nodes !==
1069
+ undefined
1070
+ ) {
1071
+ let data16 =
1072
+ data14.nodes;
1073
+ const _errs40 =
1074
+ errors;
1075
+ if (
1076
+ errors ===
1077
+ _errs40
1078
+ ) {
1079
+ if (
1080
+ Array.isArray(
1081
+ data16
1082
+ )
1083
+ ) {
1084
+ var valid9 = true;
1085
+ const len2 =
1086
+ data16.length;
1087
+ for (
1088
+ let i2 = 0;
1089
+ i2 <
1090
+ len2;
1091
+ i2++
1092
+ ) {
1093
+ let data17 =
1094
+ data16[
1095
+ i2
1096
+ ];
1097
+ const _errs42 =
1098
+ errors;
1099
+ if (
1100
+ errors ===
1101
+ _errs42
1102
+ ) {
1103
+ if (
1104
+ data17 &&
1105
+ typeof data17 ==
1106
+ 'object' &&
1107
+ !Array.isArray(
1108
+ data17
1109
+ )
1110
+ ) {
1111
+ let missing3;
1112
+ if (
1113
+ data17.vfsPath ===
1114
+ undefined &&
1115
+ (missing3 =
1116
+ 'vfsPath')
1117
+ ) {
1118
+ validate11.errors =
1119
+ [
1120
+ {
1121
+ instancePath:
1122
+ instancePath +
1123
+ '/extraFiles/nodes/' +
1124
+ i2,
1125
+ schemaPath:
1126
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/items/required',
1127
+ keyword:
1128
+ 'required',
1129
+ params: {
1130
+ missingProperty:
1131
+ missing3,
1132
+ },
1133
+ message:
1134
+ "must have required property '" +
1135
+ missing3 +
1136
+ "'",
1137
+ },
1138
+ ];
1139
+ return false;
1140
+ } else {
1141
+ const _errs44 =
1142
+ errors;
1143
+ for (const key5 in data17) {
1144
+ if (
1145
+ !(
1146
+ key5 ===
1147
+ 'vfsPath' ||
1148
+ key5 ===
1149
+ 'type' ||
1150
+ key5 ===
1151
+ 'sourcePath'
1152
+ )
1153
+ ) {
1154
+ validate11.errors =
1155
+ [
1156
+ {
1157
+ instancePath:
1158
+ instancePath +
1159
+ '/extraFiles/nodes/' +
1160
+ i2,
1161
+ schemaPath:
1162
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/items/additionalProperties',
1163
+ keyword:
1164
+ 'additionalProperties',
1165
+ params: {
1166
+ additionalProperty:
1167
+ key5,
1168
+ },
1169
+ message:
1170
+ 'must NOT have additional properties',
1171
+ },
1172
+ ];
1173
+ return false;
1174
+ break;
1175
+ }
1176
+ }
1177
+ if (
1178
+ _errs44 ===
1179
+ errors
1180
+ ) {
1181
+ if (
1182
+ data17.vfsPath !==
1183
+ undefined
1184
+ ) {
1185
+ const _errs45 =
1186
+ errors;
1187
+ if (
1188
+ typeof data17.vfsPath !==
1189
+ 'string'
1190
+ ) {
1191
+ validate11.errors =
1192
+ [
1193
+ {
1194
+ instancePath:
1195
+ instancePath +
1196
+ '/extraFiles/nodes/' +
1197
+ i2 +
1198
+ '/vfsPath',
1199
+ schemaPath:
1200
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/items/properties/vfsPath/type',
1201
+ keyword:
1202
+ 'type',
1203
+ params: {
1204
+ type: 'string',
1205
+ },
1206
+ message:
1207
+ 'must be string',
1208
+ },
1209
+ ];
1210
+ return false;
1211
+ }
1212
+ var valid10 =
1213
+ _errs45 ===
1214
+ errors;
1215
+ } else {
1216
+ var valid10 = true;
1217
+ }
1218
+ if (
1219
+ valid10
1220
+ ) {
1221
+ if (
1222
+ data17.type !==
1223
+ undefined
1224
+ ) {
1225
+ let data19 =
1226
+ data17.type;
1227
+ const _errs47 =
1228
+ errors;
1229
+ if (
1230
+ typeof data19 !==
1231
+ 'string'
1232
+ ) {
1233
+ validate11.errors =
1234
+ [
1235
+ {
1236
+ instancePath:
1237
+ instancePath +
1238
+ '/extraFiles/nodes/' +
1239
+ i2 +
1240
+ '/type',
1241
+ schemaPath:
1242
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/items/properties/type/type',
1243
+ keyword:
1244
+ 'type',
1245
+ params: {
1246
+ type: 'string',
1247
+ },
1248
+ message:
1249
+ 'must be string',
1250
+ },
1251
+ ];
1252
+ return false;
1253
+ }
1254
+ if (
1255
+ !(
1256
+ data19 ===
1257
+ 'file' ||
1258
+ data19 ===
1259
+ 'directory'
1260
+ )
1261
+ ) {
1262
+ validate11.errors =
1263
+ [
1264
+ {
1265
+ instancePath:
1266
+ instancePath +
1267
+ '/extraFiles/nodes/' +
1268
+ i2 +
1269
+ '/type',
1270
+ schemaPath:
1271
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/items/properties/type/enum',
1272
+ keyword:
1273
+ 'enum',
1274
+ params: {
1275
+ allowedValues:
1276
+ schema13
1277
+ .properties
1278
+ .nodes
1279
+ .items
1280
+ .properties
1281
+ .type
1282
+ .enum,
1283
+ },
1284
+ message:
1285
+ 'must be equal to one of the allowed values',
1286
+ },
1287
+ ];
1288
+ return false;
1289
+ }
1290
+ var valid10 =
1291
+ _errs47 ===
1292
+ errors;
1293
+ } else {
1294
+ var valid10 = true;
1295
+ }
1296
+ if (
1297
+ valid10
1298
+ ) {
1299
+ if (
1300
+ data17.sourcePath !==
1301
+ undefined
1302
+ ) {
1303
+ const _errs49 =
1304
+ errors;
1305
+ if (
1306
+ typeof data17.sourcePath !==
1307
+ 'string'
1308
+ ) {
1309
+ validate11.errors =
1310
+ [
1311
+ {
1312
+ instancePath:
1313
+ instancePath +
1314
+ '/extraFiles/nodes/' +
1315
+ i2 +
1316
+ '/sourcePath',
1317
+ schemaPath:
1318
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/items/properties/sourcePath/type',
1319
+ keyword:
1320
+ 'type',
1321
+ params: {
1322
+ type: 'string',
1323
+ },
1324
+ message:
1325
+ 'must be string',
1326
+ },
1327
+ ];
1328
+ return false;
1329
+ }
1330
+ var valid10 =
1331
+ _errs49 ===
1332
+ errors;
1333
+ } else {
1334
+ var valid10 = true;
1335
+ }
1336
+ }
1337
+ }
1338
+ }
1339
+ }
1340
+ } else {
1341
+ validate11.errors =
1342
+ [
1343
+ {
1344
+ instancePath:
1345
+ instancePath +
1346
+ '/extraFiles/nodes/' +
1347
+ i2,
1348
+ schemaPath:
1349
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/items/type',
1350
+ keyword:
1351
+ 'type',
1352
+ params: {
1353
+ type: 'object',
1354
+ },
1355
+ message:
1356
+ 'must be object',
1357
+ },
1358
+ ];
1359
+ return false;
1360
+ }
1361
+ }
1362
+ var valid9 =
1363
+ _errs42 ===
1364
+ errors;
1365
+ if (
1366
+ !valid9
1367
+ ) {
1368
+ break;
1369
+ }
1370
+ }
1371
+ } else {
1372
+ validate11.errors =
1373
+ [
1374
+ {
1375
+ instancePath:
1376
+ instancePath +
1377
+ '/extraFiles/nodes',
1378
+ schemaPath:
1379
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/type',
1380
+ keyword:
1381
+ 'type',
1382
+ params: {
1383
+ type: 'array',
1384
+ },
1385
+ message:
1386
+ 'must be array',
1387
+ },
1388
+ ];
1389
+ return false;
1390
+ }
1391
+ }
1392
+ var valid8 =
1393
+ _errs40 ===
1394
+ errors;
1395
+ } else {
1396
+ var valid8 = true;
1397
+ }
1398
+ }
1399
+ }
1400
+ } else {
1401
+ validate11.errors = [
1402
+ {
1403
+ instancePath:
1404
+ instancePath +
1405
+ '/extraFiles',
1406
+ schemaPath:
1407
+ '#/definitions/PHPExtensionManifestExtraFiles/type',
1408
+ keyword: 'type',
1409
+ params: {
1410
+ type: 'object',
1411
+ },
1412
+ message:
1413
+ 'must be object',
1414
+ },
1415
+ ];
1416
+ return false;
1417
+ }
831
1418
  }
832
- var valid0 = _errs11 === errors;
1419
+ var valid0 = _errs34 === errors;
833
1420
  } else {
834
1421
  var valid0 = true;
835
1422
  }