@php-wasm/universal 3.1.30 → 3.1.31

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.
@@ -11,6 +11,28 @@ const schema11 = {
11
11
  name: { type: 'string' },
12
12
  version: { type: 'string' },
13
13
  mode: { type: 'string', const: 'php-extension' },
14
+ loadWithIniDirective: {
15
+ $ref: '#/definitions/PHPExtensionLoadDirective',
16
+ description:
17
+ 'The first directive of the generated startup `.ini` file. Defaults to `extension`; use `zend_extension` for Zend extensions like Xdebug. Use `false` to stage the `.so` without registering it in php.ini.',
18
+ },
19
+ iniEntries: {
20
+ type: 'object',
21
+ additionalProperties: { type: 'string' },
22
+ description:
23
+ 'Additional `key=value` lines for the generated startup `.ini` file.',
24
+ },
25
+ env: {
26
+ type: 'object',
27
+ additionalProperties: { type: 'string' },
28
+ description:
29
+ 'Environment variables added before the extension is loaded.',
30
+ },
31
+ extensionDir: {
32
+ type: 'string',
33
+ description:
34
+ 'VFS directory where PHP.wasm writes the extension `.so` file and its per-extension ini file. Defaults to `PHP_EXTENSIONS_DIR`.',
35
+ },
14
36
  artifacts: {
15
37
  type: 'array',
16
38
  items: {
@@ -47,6 +69,18 @@ const schema11 = {
47
69
  description:
48
70
  '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.',
49
71
  },
72
+ PHPExtensionLoadDirective: {
73
+ anyOf: [
74
+ { $ref: '#/definitions/PHPExtensionIniDirective' },
75
+ { type: 'boolean', const: false },
76
+ ],
77
+ },
78
+ PHPExtensionIniDirective: {
79
+ type: 'string',
80
+ enum: ['extension', 'zend_extension'],
81
+ description:
82
+ 'The php.ini directive used to load the extension. Use `extension` for regular PHP extensions and `zend_extension` for Zend extensions like Xdebug.',
83
+ },
50
84
  PHPExtensionManifestExtraFiles: {
51
85
  type: 'object',
52
86
  properties: {
@@ -92,6 +126,28 @@ const schema12 = {
92
126
  name: { type: 'string' },
93
127
  version: { type: 'string' },
94
128
  mode: { type: 'string', const: 'php-extension' },
129
+ loadWithIniDirective: {
130
+ $ref: '#/definitions/PHPExtensionLoadDirective',
131
+ description:
132
+ 'The first directive of the generated startup `.ini` file. Defaults to `extension`; use `zend_extension` for Zend extensions like Xdebug. Use `false` to stage the `.so` without registering it in php.ini.',
133
+ },
134
+ iniEntries: {
135
+ type: 'object',
136
+ additionalProperties: { type: 'string' },
137
+ description:
138
+ 'Additional `key=value` lines for the generated startup `.ini` file.',
139
+ },
140
+ env: {
141
+ type: 'object',
142
+ additionalProperties: { type: 'string' },
143
+ description:
144
+ 'Environment variables added before the extension is loaded.',
145
+ },
146
+ extensionDir: {
147
+ type: 'string',
148
+ description:
149
+ 'VFS directory where PHP.wasm writes the extension `.so` file and its per-extension ini file. Defaults to `PHP_EXTENSIONS_DIR`.',
150
+ },
95
151
  artifacts: {
96
152
  type: 'array',
97
153
  items: {
@@ -127,7 +183,7 @@ const schema12 = {
127
183
  description:
128
184
  '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.',
129
185
  };
130
- const schema13 = {
186
+ const schema15 = {
131
187
  type: 'object',
132
188
  properties: {
133
189
  vfsRoot: {
@@ -164,6 +220,124 @@ const schema13 = {
164
220
  },
165
221
  additionalProperties: false,
166
222
  };
223
+ const func2 = Object.prototype.hasOwnProperty;
224
+ const schema13 = {
225
+ anyOf: [
226
+ { $ref: '#/definitions/PHPExtensionIniDirective' },
227
+ { type: 'boolean', const: false },
228
+ ],
229
+ };
230
+ const schema14 = {
231
+ type: 'string',
232
+ enum: ['extension', 'zend_extension'],
233
+ description:
234
+ 'The php.ini directive used to load the extension. Use `extension` for regular PHP extensions and `zend_extension` for Zend extensions like Xdebug.',
235
+ };
236
+ function validate12(
237
+ data,
238
+ { instancePath = '', parentData, parentDataProperty, rootData = data } = {}
239
+ ) {
240
+ let vErrors = null;
241
+ let errors = 0;
242
+ const _errs0 = errors;
243
+ let valid0 = false;
244
+ const _errs1 = errors;
245
+ if (typeof data !== 'string') {
246
+ const err0 = {
247
+ instancePath,
248
+ schemaPath: '#/definitions/PHPExtensionIniDirective/type',
249
+ keyword: 'type',
250
+ params: { type: 'string' },
251
+ message: 'must be string',
252
+ };
253
+ if (vErrors === null) {
254
+ vErrors = [err0];
255
+ } else {
256
+ vErrors.push(err0);
257
+ }
258
+ errors++;
259
+ }
260
+ if (!(data === 'extension' || data === 'zend_extension')) {
261
+ const err1 = {
262
+ instancePath,
263
+ schemaPath: '#/definitions/PHPExtensionIniDirective/enum',
264
+ keyword: 'enum',
265
+ params: { allowedValues: schema14.enum },
266
+ message: 'must be equal to one of the allowed values',
267
+ };
268
+ if (vErrors === null) {
269
+ vErrors = [err1];
270
+ } else {
271
+ vErrors.push(err1);
272
+ }
273
+ errors++;
274
+ }
275
+ var _valid0 = _errs1 === errors;
276
+ valid0 = valid0 || _valid0;
277
+ if (!valid0) {
278
+ const _errs4 = errors;
279
+ if (typeof data !== 'boolean') {
280
+ const err2 = {
281
+ instancePath,
282
+ schemaPath: '#/anyOf/1/type',
283
+ keyword: 'type',
284
+ params: { type: 'boolean' },
285
+ message: 'must be boolean',
286
+ };
287
+ if (vErrors === null) {
288
+ vErrors = [err2];
289
+ } else {
290
+ vErrors.push(err2);
291
+ }
292
+ errors++;
293
+ }
294
+ if (false !== data) {
295
+ const err3 = {
296
+ instancePath,
297
+ schemaPath: '#/anyOf/1/const',
298
+ keyword: 'const',
299
+ params: { allowedValue: false },
300
+ message: 'must be equal to constant',
301
+ };
302
+ if (vErrors === null) {
303
+ vErrors = [err3];
304
+ } else {
305
+ vErrors.push(err3);
306
+ }
307
+ errors++;
308
+ }
309
+ var _valid0 = _errs4 === errors;
310
+ valid0 = valid0 || _valid0;
311
+ }
312
+ if (!valid0) {
313
+ const err4 = {
314
+ instancePath,
315
+ schemaPath: '#/anyOf',
316
+ keyword: 'anyOf',
317
+ params: {},
318
+ message: 'must match a schema in anyOf',
319
+ };
320
+ if (vErrors === null) {
321
+ vErrors = [err4];
322
+ } else {
323
+ vErrors.push(err4);
324
+ }
325
+ errors++;
326
+ validate12.errors = vErrors;
327
+ return false;
328
+ } else {
329
+ errors = _errs0;
330
+ if (vErrors !== null) {
331
+ if (_errs0) {
332
+ vErrors.length = _errs0;
333
+ } else {
334
+ vErrors = null;
335
+ }
336
+ }
337
+ }
338
+ validate12.errors = vErrors;
339
+ return errors === 0;
340
+ }
167
341
  function validate11(
168
342
  data,
169
343
  { instancePath = '', parentData, parentDataProperty, rootData = data } = {}
@@ -191,15 +365,7 @@ function validate11(
191
365
  } else {
192
366
  const _errs1 = errors;
193
367
  for (const key0 in data) {
194
- if (
195
- !(
196
- key0 === 'name' ||
197
- key0 === 'version' ||
198
- key0 === 'mode' ||
199
- key0 === 'artifacts' ||
200
- key0 === 'extraFiles'
201
- )
202
- ) {
368
+ if (!func2.call(schema12.properties, key0)) {
203
369
  validate11.errors = [
204
370
  {
205
371
  instancePath,
@@ -291,144 +457,250 @@ function validate11(
291
457
  var valid0 = true;
292
458
  }
293
459
  if (valid0) {
294
- if (data.artifacts !== undefined) {
295
- let data3 = data.artifacts;
460
+ if (data.loadWithIniDirective !== undefined) {
296
461
  const _errs8 = errors;
297
- if (errors === _errs8) {
298
- if (Array.isArray(data3)) {
299
- var valid1 = true;
300
- const len0 = data3.length;
301
- for (let i0 = 0; i0 < len0; i0++) {
302
- let data4 = data3[i0];
303
- const _errs10 = errors;
304
- if (errors === _errs10) {
462
+ if (
463
+ !validate12(data.loadWithIniDirective, {
464
+ instancePath:
465
+ instancePath +
466
+ '/loadWithIniDirective',
467
+ parentData: data,
468
+ parentDataProperty:
469
+ 'loadWithIniDirective',
470
+ rootData,
471
+ })
472
+ ) {
473
+ vErrors =
474
+ vErrors === null
475
+ ? validate12.errors
476
+ : vErrors.concat(
477
+ validate12.errors
478
+ );
479
+ errors = vErrors.length;
480
+ }
481
+ var valid0 = _errs8 === errors;
482
+ } else {
483
+ var valid0 = true;
484
+ }
485
+ if (valid0) {
486
+ if (data.iniEntries !== undefined) {
487
+ let data4 = data.iniEntries;
488
+ const _errs9 = errors;
489
+ if (errors === _errs9) {
490
+ if (
491
+ data4 &&
492
+ typeof data4 == 'object' &&
493
+ !Array.isArray(data4)
494
+ ) {
495
+ for (const key1 in data4) {
496
+ const _errs12 = errors;
305
497
  if (
306
- data4 &&
307
- typeof data4 ==
308
- 'object' &&
309
- !Array.isArray(data4)
498
+ typeof data4[key1] !==
499
+ 'string'
310
500
  ) {
311
- let missing1;
501
+ validate11.errors = [
502
+ {
503
+ instancePath:
504
+ instancePath +
505
+ '/iniEntries/' +
506
+ key1
507
+ .replace(
508
+ /~/g,
509
+ '~0'
510
+ )
511
+ .replace(
512
+ /\//g,
513
+ '~1'
514
+ ),
515
+ schemaPath:
516
+ '#/properties/iniEntries/additionalProperties/type',
517
+ keyword: 'type',
518
+ params: {
519
+ type: 'string',
520
+ },
521
+ message:
522
+ 'must be string',
523
+ },
524
+ ];
525
+ return false;
526
+ }
527
+ var valid1 =
528
+ _errs12 === errors;
529
+ if (!valid1) {
530
+ break;
531
+ }
532
+ }
533
+ } else {
534
+ validate11.errors = [
535
+ {
536
+ instancePath:
537
+ instancePath +
538
+ '/iniEntries',
539
+ schemaPath:
540
+ '#/properties/iniEntries/type',
541
+ keyword: 'type',
542
+ params: {
543
+ type: 'object',
544
+ },
545
+ message:
546
+ 'must be object',
547
+ },
548
+ ];
549
+ return false;
550
+ }
551
+ }
552
+ var valid0 = _errs9 === errors;
553
+ } else {
554
+ var valid0 = true;
555
+ }
556
+ if (valid0) {
557
+ if (data.env !== undefined) {
558
+ let data6 = data.env;
559
+ const _errs14 = errors;
560
+ if (errors === _errs14) {
561
+ if (
562
+ data6 &&
563
+ typeof data6 == 'object' &&
564
+ !Array.isArray(data6)
565
+ ) {
566
+ for (const key2 in data6) {
567
+ const _errs17 = errors;
312
568
  if (
313
- (data4.phpVersion ===
314
- undefined &&
315
- (missing1 =
316
- 'phpVersion')) ||
317
- (data4.sourcePath ===
318
- undefined &&
319
- (missing1 =
320
- 'sourcePath'))
569
+ typeof data6[
570
+ key2
571
+ ] !== 'string'
321
572
  ) {
322
573
  validate11.errors =
323
574
  [
324
575
  {
325
576
  instancePath:
326
577
  instancePath +
327
- '/artifacts/' +
328
- i0,
578
+ '/env/' +
579
+ key2
580
+ .replace(
581
+ /~/g,
582
+ '~0'
583
+ )
584
+ .replace(
585
+ /\//g,
586
+ '~1'
587
+ ),
329
588
  schemaPath:
330
- '#/properties/artifacts/items/required',
589
+ '#/properties/env/additionalProperties/type',
331
590
  keyword:
332
- 'required',
591
+ 'type',
333
592
  params: {
334
- missingProperty:
335
- missing1,
593
+ type: 'string',
336
594
  },
337
595
  message:
338
- "must have required property '" +
339
- missing1 +
340
- "'",
596
+ 'must be string',
341
597
  },
342
598
  ];
343
599
  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
600
+ }
601
+ var valid2 =
602
+ _errs17 === errors;
603
+ if (!valid2) {
604
+ break;
605
+ }
606
+ }
607
+ } else {
608
+ validate11.errors = [
609
+ {
610
+ instancePath:
611
+ instancePath +
612
+ '/env',
613
+ schemaPath:
614
+ '#/properties/env/type',
615
+ keyword: 'type',
616
+ params: {
617
+ type: 'object',
618
+ },
619
+ message:
620
+ 'must be object',
621
+ },
622
+ ];
623
+ return false;
624
+ }
625
+ }
626
+ var valid0 = _errs14 === errors;
627
+ } else {
628
+ var valid0 = true;
629
+ }
630
+ if (valid0) {
631
+ if (
632
+ data.extensionDir !== undefined
633
+ ) {
634
+ const _errs19 = errors;
635
+ if (
636
+ typeof data.extensionDir !==
637
+ 'string'
638
+ ) {
639
+ validate11.errors = [
640
+ {
641
+ instancePath:
642
+ instancePath +
643
+ '/extensionDir',
644
+ schemaPath:
645
+ '#/properties/extensionDir/type',
646
+ keyword: 'type',
647
+ params: {
648
+ type: 'string',
649
+ },
650
+ message:
651
+ 'must be string',
652
+ },
653
+ ];
654
+ return false;
655
+ }
656
+ var valid0 = _errs19 === errors;
657
+ } else {
658
+ var valid0 = true;
659
+ }
660
+ if (valid0) {
661
+ if (
662
+ data.artifacts !== undefined
663
+ ) {
664
+ let data9 = data.artifacts;
665
+ const _errs21 = errors;
666
+ if (errors === _errs21) {
667
+ if (
668
+ Array.isArray(data9)
669
+ ) {
670
+ var valid3 = true;
671
+ const len0 =
672
+ data9.length;
673
+ for (
674
+ let i0 = 0;
675
+ i0 < len0;
676
+ i0++
384
677
  ) {
678
+ let data10 =
679
+ data9[i0];
680
+ const _errs23 =
681
+ errors;
385
682
  if (
386
- data4.phpVersion !==
387
- undefined
683
+ errors ===
684
+ _errs23
388
685
  ) {
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
686
  if (
424
- data4.sourcePath !==
425
- undefined
687
+ data10 &&
688
+ typeof data10 ==
689
+ 'object' &&
690
+ !Array.isArray(
691
+ data10
692
+ )
426
693
  ) {
427
- const _errs15 =
428
- errors;
694
+ let missing1;
429
695
  if (
430
- typeof data4.sourcePath !==
431
- 'string'
696
+ (data10.phpVersion ===
697
+ undefined &&
698
+ (missing1 =
699
+ 'phpVersion')) ||
700
+ (data10.sourcePath ===
701
+ undefined &&
702
+ (missing1 =
703
+ 'sourcePath'))
432
704
  ) {
433
705
  validate11.errors =
434
706
  [
@@ -436,62 +708,112 @@ function validate11(
436
708
  instancePath:
437
709
  instancePath +
438
710
  '/artifacts/' +
439
- i0 +
440
- '/sourcePath',
711
+ i0,
441
712
  schemaPath:
442
- '#/properties/artifacts/items/properties/sourcePath/type',
713
+ '#/properties/artifacts/items/required',
443
714
  keyword:
444
- 'type',
715
+ 'required',
445
716
  params: {
446
- type: 'string',
717
+ missingProperty:
718
+ missing1,
447
719
  },
448
720
  message:
449
- 'must be string',
721
+ "must have required property '" +
722
+ missing1 +
723
+ "'",
450
724
  },
451
725
  ];
452
726
  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 =
727
+ } else {
728
+ const _errs25 =
472
729
  errors;
730
+ for (const key3 in data10) {
731
+ if (
732
+ !(
733
+ key3 ===
734
+ 'phpVersion' ||
735
+ key3 ===
736
+ 'sourcePath' ||
737
+ key3 ===
738
+ 'extraFiles'
739
+ )
740
+ ) {
741
+ validate11.errors =
742
+ [
743
+ {
744
+ instancePath:
745
+ instancePath +
746
+ '/artifacts/' +
747
+ i0,
748
+ schemaPath:
749
+ '#/properties/artifacts/items/additionalProperties',
750
+ keyword:
751
+ 'additionalProperties',
752
+ params: {
753
+ additionalProperty:
754
+ key3,
755
+ },
756
+ message:
757
+ 'must NOT have additional properties',
758
+ },
759
+ ];
760
+ return false;
761
+ break;
762
+ }
763
+ }
473
764
  if (
474
- errors ===
475
- _errs18
765
+ _errs25 ===
766
+ errors
476
767
  ) {
477
768
  if (
478
- data7 &&
479
- typeof data7 ==
480
- 'object' &&
481
- !Array.isArray(
482
- data7
483
- )
769
+ data10.phpVersion !==
770
+ undefined
484
771
  ) {
485
- const _errs20 =
772
+ const _errs26 =
773
+ errors;
774
+ if (
775
+ typeof data10.phpVersion !==
776
+ 'string'
777
+ ) {
778
+ validate11.errors =
779
+ [
780
+ {
781
+ instancePath:
782
+ instancePath +
783
+ '/artifacts/' +
784
+ i0 +
785
+ '/phpVersion',
786
+ schemaPath:
787
+ '#/properties/artifacts/items/properties/phpVersion/type',
788
+ keyword:
789
+ 'type',
790
+ params: {
791
+ type: 'string',
792
+ },
793
+ message:
794
+ 'must be string',
795
+ },
796
+ ];
797
+ return false;
798
+ }
799
+ var valid4 =
800
+ _errs26 ===
486
801
  errors;
487
- for (const key2 in data7) {
802
+ } else {
803
+ var valid4 = true;
804
+ }
805
+ if (
806
+ valid4
807
+ ) {
808
+ if (
809
+ data10.sourcePath !==
810
+ undefined
811
+ ) {
812
+ const _errs28 =
813
+ errors;
488
814
  if (
489
- !(
490
- key2 ===
491
- 'vfsRoot' ||
492
- key2 ===
493
- 'nodes'
494
- )
815
+ typeof data10.sourcePath !==
816
+ 'string'
495
817
  ) {
496
818
  validate11.errors =
497
819
  [
@@ -500,269 +822,180 @@ function validate11(
500
822
  instancePath +
501
823
  '/artifacts/' +
502
824
  i0 +
503
- '/extraFiles',
825
+ '/sourcePath',
504
826
  schemaPath:
505
- '#/definitions/PHPExtensionManifestExtraFiles/additionalProperties',
827
+ '#/properties/artifacts/items/properties/sourcePath/type',
506
828
  keyword:
507
- 'additionalProperties',
829
+ 'type',
508
830
  params: {
509
- additionalProperty:
510
- key2,
831
+ type: 'string',
511
832
  },
512
833
  message:
513
- 'must NOT have additional properties',
834
+ 'must be string',
514
835
  },
515
836
  ];
516
837
  return false;
517
- break;
518
838
  }
839
+ var valid4 =
840
+ _errs28 ===
841
+ errors;
842
+ } else {
843
+ var valid4 = true;
519
844
  }
520
845
  if (
521
- _errs20 ===
522
- errors
846
+ valid4
523
847
  ) {
524
848
  if (
525
- data7.vfsRoot !==
849
+ data10.extraFiles !==
526
850
  undefined
527
851
  ) {
528
- const _errs21 =
852
+ let data13 =
853
+ data10.extraFiles;
854
+ const _errs30 =
529
855
  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 ===
856
+ const _errs31 =
557
857
  errors;
558
- } else {
559
- var valid4 = true;
560
- }
561
- if (
562
- valid4
563
- ) {
564
858
  if (
565
- data7.nodes !==
566
- undefined
859
+ errors ===
860
+ _errs31
567
861
  ) {
568
- let data9 =
569
- data7.nodes;
570
- const _errs23 =
571
- errors;
572
862
  if (
573
- errors ===
574
- _errs23
863
+ data13 &&
864
+ typeof data13 ==
865
+ 'object' &&
866
+ !Array.isArray(
867
+ data13
868
+ )
575
869
  ) {
870
+ const _errs33 =
871
+ errors;
872
+ for (const key4 in data13) {
873
+ if (
874
+ !(
875
+ key4 ===
876
+ 'vfsRoot' ||
877
+ key4 ===
878
+ 'nodes'
879
+ )
880
+ ) {
881
+ validate11.errors =
882
+ [
883
+ {
884
+ instancePath:
885
+ instancePath +
886
+ '/artifacts/' +
887
+ i0 +
888
+ '/extraFiles',
889
+ schemaPath:
890
+ '#/definitions/PHPExtensionManifestExtraFiles/additionalProperties',
891
+ keyword:
892
+ 'additionalProperties',
893
+ params: {
894
+ additionalProperty:
895
+ key4,
896
+ },
897
+ message:
898
+ 'must NOT have additional properties',
899
+ },
900
+ ];
901
+ return false;
902
+ break;
903
+ }
904
+ }
576
905
  if (
577
- Array.isArray(
578
- data9
579
- )
906
+ _errs33 ===
907
+ errors
580
908
  ) {
581
- var valid5 = true;
582
- const len1 =
583
- data9.length;
584
- for (
585
- let i1 = 0;
586
- i1 <
587
- len1;
588
- i1++
909
+ if (
910
+ data13.vfsRoot !==
911
+ undefined
589
912
  ) {
590
- let data10 =
591
- data9[
592
- i1
593
- ];
594
- const _errs25 =
913
+ const _errs34 =
914
+ errors;
915
+ if (
916
+ typeof data13.vfsRoot !==
917
+ 'string'
918
+ ) {
919
+ validate11.errors =
920
+ [
921
+ {
922
+ instancePath:
923
+ instancePath +
924
+ '/artifacts/' +
925
+ i0 +
926
+ '/extraFiles/vfsRoot',
927
+ schemaPath:
928
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/vfsRoot/type',
929
+ keyword:
930
+ 'type',
931
+ params: {
932
+ type: 'string',
933
+ },
934
+ message:
935
+ 'must be string',
936
+ },
937
+ ];
938
+ return false;
939
+ }
940
+ var valid6 =
941
+ _errs34 ===
595
942
  errors;
943
+ } else {
944
+ var valid6 = true;
945
+ }
946
+ if (
947
+ valid6
948
+ ) {
596
949
  if (
597
- errors ===
598
- _errs25
950
+ data13.nodes !==
951
+ undefined
599
952
  ) {
953
+ let data15 =
954
+ data13.nodes;
955
+ const _errs36 =
956
+ errors;
600
957
  if (
601
- data10 &&
602
- typeof data10 ==
603
- 'object' &&
604
- !Array.isArray(
605
- data10
606
- )
958
+ errors ===
959
+ _errs36
607
960
  ) {
608
- let missing2;
609
961
  if (
610
- data10.vfsPath ===
611
- undefined &&
612
- (missing2 =
613
- 'vfsPath')
962
+ Array.isArray(
963
+ data15
964
+ )
614
965
  ) {
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
966
+ var valid7 = true;
967
+ const len1 =
968
+ data15.length;
969
+ for (
970
+ let i1 = 0;
971
+ i1 <
972
+ len1;
973
+ i1++
681
974
  ) {
975
+ let data16 =
976
+ data15[
977
+ i1
978
+ ];
979
+ const _errs38 =
980
+ errors;
682
981
  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
982
+ errors ===
983
+ _errs38
723
984
  ) {
724
985
  if (
725
- data10.type !==
726
- undefined
986
+ data16 &&
987
+ typeof data16 ==
988
+ 'object' &&
989
+ !Array.isArray(
990
+ data16
991
+ )
727
992
  ) {
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
- }
993
+ let missing2;
759
994
  if (
760
- !(
761
- data12 ===
762
- 'file' ||
763
- data12 ===
764
- 'directory'
765
- )
995
+ data16.vfsPath ===
996
+ undefined &&
997
+ (missing2 =
998
+ 'vfsPath')
766
999
  ) {
767
1000
  validate11.errors =
768
1001
  [
@@ -772,463 +1005,529 @@ function validate11(
772
1005
  '/artifacts/' +
773
1006
  i0 +
774
1007
  '/extraFiles/nodes/' +
775
- i1 +
776
- '/type',
1008
+ i1,
777
1009
  schemaPath:
778
- '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/items/properties/type/enum',
1010
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/items/required',
779
1011
  keyword:
780
- 'enum',
1012
+ 'required',
781
1013
  params: {
782
- allowedValues:
783
- schema13
784
- .properties
785
- .nodes
786
- .items
787
- .properties
788
- .type
789
- .enum,
1014
+ missingProperty:
1015
+ missing2,
790
1016
  },
791
1017
  message:
792
- 'must be equal to one of the allowed values',
1018
+ "must have required property '" +
1019
+ missing2 +
1020
+ "'",
793
1021
  },
794
1022
  ];
795
1023
  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 =
1024
+ } else {
1025
+ const _errs40 =
811
1026
  errors;
1027
+ for (const key5 in data16) {
1028
+ if (
1029
+ !(
1030
+ key5 ===
1031
+ 'vfsPath' ||
1032
+ key5 ===
1033
+ 'type' ||
1034
+ key5 ===
1035
+ 'sourcePath'
1036
+ )
1037
+ ) {
1038
+ validate11.errors =
1039
+ [
1040
+ {
1041
+ instancePath:
1042
+ instancePath +
1043
+ '/artifacts/' +
1044
+ i0 +
1045
+ '/extraFiles/nodes/' +
1046
+ i1,
1047
+ schemaPath:
1048
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/items/additionalProperties',
1049
+ keyword:
1050
+ 'additionalProperties',
1051
+ params: {
1052
+ additionalProperty:
1053
+ key5,
1054
+ },
1055
+ message:
1056
+ 'must NOT have additional properties',
1057
+ },
1058
+ ];
1059
+ return false;
1060
+ break;
1061
+ }
1062
+ }
812
1063
  if (
813
- typeof data10.sourcePath !==
814
- 'string'
1064
+ _errs40 ===
1065
+ errors
815
1066
  ) {
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;
1067
+ if (
1068
+ data16.vfsPath !==
1069
+ undefined
1070
+ ) {
1071
+ const _errs41 =
1072
+ errors;
1073
+ if (
1074
+ typeof data16.vfsPath !==
1075
+ 'string'
1076
+ ) {
1077
+ validate11.errors =
1078
+ [
1079
+ {
1080
+ instancePath:
1081
+ instancePath +
1082
+ '/artifacts/' +
1083
+ i0 +
1084
+ '/extraFiles/nodes/' +
1085
+ i1 +
1086
+ '/vfsPath',
1087
+ schemaPath:
1088
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/items/properties/vfsPath/type',
1089
+ keyword:
1090
+ 'type',
1091
+ params: {
1092
+ type: 'string',
1093
+ },
1094
+ message:
1095
+ 'must be string',
1096
+ },
1097
+ ];
1098
+ return false;
1099
+ }
1100
+ var valid8 =
1101
+ _errs41 ===
1102
+ errors;
1103
+ } else {
1104
+ var valid8 = true;
1105
+ }
1106
+ if (
1107
+ valid8
1108
+ ) {
1109
+ if (
1110
+ data16.type !==
1111
+ undefined
1112
+ ) {
1113
+ let data18 =
1114
+ data16.type;
1115
+ const _errs43 =
1116
+ errors;
1117
+ if (
1118
+ typeof data18 !==
1119
+ 'string'
1120
+ ) {
1121
+ validate11.errors =
1122
+ [
1123
+ {
1124
+ instancePath:
1125
+ instancePath +
1126
+ '/artifacts/' +
1127
+ i0 +
1128
+ '/extraFiles/nodes/' +
1129
+ i1 +
1130
+ '/type',
1131
+ schemaPath:
1132
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/items/properties/type/type',
1133
+ keyword:
1134
+ 'type',
1135
+ params: {
1136
+ type: 'string',
1137
+ },
1138
+ message:
1139
+ 'must be string',
1140
+ },
1141
+ ];
1142
+ return false;
1143
+ }
1144
+ if (
1145
+ !(
1146
+ data18 ===
1147
+ 'file' ||
1148
+ data18 ===
1149
+ 'directory'
1150
+ )
1151
+ ) {
1152
+ validate11.errors =
1153
+ [
1154
+ {
1155
+ instancePath:
1156
+ instancePath +
1157
+ '/artifacts/' +
1158
+ i0 +
1159
+ '/extraFiles/nodes/' +
1160
+ i1 +
1161
+ '/type',
1162
+ schemaPath:
1163
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/items/properties/type/enum',
1164
+ keyword:
1165
+ 'enum',
1166
+ params: {
1167
+ allowedValues:
1168
+ schema15
1169
+ .properties
1170
+ .nodes
1171
+ .items
1172
+ .properties
1173
+ .type
1174
+ .enum,
1175
+ },
1176
+ message:
1177
+ 'must be equal to one of the allowed values',
1178
+ },
1179
+ ];
1180
+ return false;
1181
+ }
1182
+ var valid8 =
1183
+ _errs43 ===
1184
+ errors;
1185
+ } else {
1186
+ var valid8 = true;
1187
+ }
1188
+ if (
1189
+ valid8
1190
+ ) {
1191
+ if (
1192
+ data16.sourcePath !==
1193
+ undefined
1194
+ ) {
1195
+ const _errs45 =
1196
+ errors;
1197
+ if (
1198
+ typeof data16.sourcePath !==
1199
+ 'string'
1200
+ ) {
1201
+ validate11.errors =
1202
+ [
1203
+ {
1204
+ instancePath:
1205
+ instancePath +
1206
+ '/artifacts/' +
1207
+ i0 +
1208
+ '/extraFiles/nodes/' +
1209
+ i1 +
1210
+ '/sourcePath',
1211
+ schemaPath:
1212
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/items/properties/sourcePath/type',
1213
+ keyword:
1214
+ 'type',
1215
+ params: {
1216
+ type: 'string',
1217
+ },
1218
+ message:
1219
+ 'must be string',
1220
+ },
1221
+ ];
1222
+ return false;
1223
+ }
1224
+ var valid8 =
1225
+ _errs45 ===
1226
+ errors;
1227
+ } else {
1228
+ var valid8 = true;
1229
+ }
1230
+ }
1231
+ }
838
1232
  }
839
- var valid6 =
840
- _errs32 ===
841
- errors;
842
- } else {
843
- var valid6 = true;
844
1233
  }
1234
+ } else {
1235
+ validate11.errors =
1236
+ [
1237
+ {
1238
+ instancePath:
1239
+ instancePath +
1240
+ '/artifacts/' +
1241
+ i0 +
1242
+ '/extraFiles/nodes/' +
1243
+ i1,
1244
+ schemaPath:
1245
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/items/type',
1246
+ keyword:
1247
+ 'type',
1248
+ params: {
1249
+ type: 'object',
1250
+ },
1251
+ message:
1252
+ 'must be object',
1253
+ },
1254
+ ];
1255
+ return false;
845
1256
  }
846
1257
  }
1258
+ var valid7 =
1259
+ _errs38 ===
1260
+ errors;
1261
+ if (
1262
+ !valid7
1263
+ ) {
1264
+ break;
1265
+ }
847
1266
  }
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',
1267
+ } else {
1268
+ validate11.errors =
1269
+ [
1270
+ {
1271
+ instancePath:
1272
+ instancePath +
1273
+ '/artifacts/' +
1274
+ i0 +
1275
+ '/extraFiles/nodes',
1276
+ schemaPath:
1277
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/type',
1278
+ keyword:
1279
+ 'type',
1280
+ params: {
1281
+ type: 'array',
1282
+ },
1283
+ message:
1284
+ 'must be array',
865
1285
  },
866
- message:
867
- 'must be object',
868
- },
869
- ];
870
- return false;
1286
+ ];
1287
+ return false;
1288
+ }
871
1289
  }
872
- }
873
- var valid5 =
874
- _errs25 ===
875
- errors;
876
- if (
877
- !valid5
878
- ) {
879
- break;
1290
+ var valid6 =
1291
+ _errs36 ===
1292
+ errors;
1293
+ } else {
1294
+ var valid6 = true;
880
1295
  }
881
1296
  }
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
1297
  }
1298
+ } else {
1299
+ validate11.errors =
1300
+ [
1301
+ {
1302
+ instancePath:
1303
+ instancePath +
1304
+ '/artifacts/' +
1305
+ i0 +
1306
+ '/extraFiles',
1307
+ schemaPath:
1308
+ '#/definitions/PHPExtensionManifestExtraFiles/type',
1309
+ keyword:
1310
+ 'type',
1311
+ params: {
1312
+ type: 'object',
1313
+ },
1314
+ message:
1315
+ 'must be object',
1316
+ },
1317
+ ];
1318
+ return false;
904
1319
  }
905
- var valid4 =
906
- _errs23 ===
907
- errors;
908
- } else {
909
- var valid4 = true;
910
1320
  }
1321
+ var valid4 =
1322
+ _errs30 ===
1323
+ errors;
1324
+ } else {
1325
+ var valid4 = true;
911
1326
  }
912
1327
  }
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
1328
  }
935
1329
  }
936
- var valid2 =
937
- _errs17 ===
938
- errors;
939
- } else {
940
- var valid2 = true;
941
1330
  }
1331
+ } else {
1332
+ validate11.errors =
1333
+ [
1334
+ {
1335
+ instancePath:
1336
+ instancePath +
1337
+ '/artifacts/' +
1338
+ i0,
1339
+ schemaPath:
1340
+ '#/properties/artifacts/items/type',
1341
+ keyword:
1342
+ 'type',
1343
+ params: {
1344
+ type: 'object',
1345
+ },
1346
+ message:
1347
+ 'must be object',
1348
+ },
1349
+ ];
1350
+ return false;
942
1351
  }
943
1352
  }
1353
+ var valid3 =
1354
+ _errs23 ===
1355
+ errors;
1356
+ if (!valid3) {
1357
+ break;
1358
+ }
944
1359
  }
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
- }
965
- }
966
- var valid1 = _errs10 === errors;
967
- if (!valid1) {
968
- break;
969
- }
970
- }
971
- } else {
972
- validate11.errors = [
973
- {
974
- instancePath:
975
- instancePath +
976
- '/artifacts',
977
- schemaPath:
978
- '#/properties/artifacts/type',
979
- keyword: 'type',
980
- params: { type: 'array' },
981
- message: 'must be array',
982
- },
983
- ];
984
- return false;
985
- }
986
- }
987
- var valid0 = _errs8 === errors;
988
- } else {
989
- var valid0 = true;
990
- }
991
- if (valid0) {
992
- if (data.extraFiles !== undefined) {
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
- ) {
1360
+ } else {
1042
1361
  validate11.errors =
1043
1362
  [
1044
1363
  {
1045
1364
  instancePath:
1046
1365
  instancePath +
1047
- '/extraFiles/vfsRoot',
1366
+ '/artifacts',
1048
1367
  schemaPath:
1049
- '#/definitions/PHPExtensionManifestExtraFiles/properties/vfsRoot/type',
1368
+ '#/properties/artifacts/type',
1050
1369
  keyword:
1051
1370
  'type',
1052
1371
  params: {
1053
- type: 'string',
1372
+ type: 'array',
1054
1373
  },
1055
1374
  message:
1056
- 'must be string',
1375
+ 'must be array',
1057
1376
  },
1058
1377
  ];
1059
1378
  return false;
1060
1379
  }
1061
- var valid8 =
1062
- _errs38 === errors;
1063
- } else {
1064
- var valid8 = true;
1065
1380
  }
1066
- if (valid8) {
1381
+ var valid0 =
1382
+ _errs21 === errors;
1383
+ } else {
1384
+ var valid0 = true;
1385
+ }
1386
+ if (valid0) {
1387
+ if (
1388
+ data.extraFiles !==
1389
+ undefined
1390
+ ) {
1391
+ let data20 =
1392
+ data.extraFiles;
1393
+ const _errs47 = errors;
1394
+ const _errs48 = errors;
1067
1395
  if (
1068
- data14.nodes !==
1069
- undefined
1396
+ errors === _errs48
1070
1397
  ) {
1071
- let data16 =
1072
- data14.nodes;
1073
- const _errs40 =
1074
- errors;
1075
1398
  if (
1076
- errors ===
1077
- _errs40
1399
+ data20 &&
1400
+ typeof data20 ==
1401
+ 'object' &&
1402
+ !Array.isArray(
1403
+ data20
1404
+ )
1078
1405
  ) {
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++
1406
+ const _errs50 =
1407
+ errors;
1408
+ for (const key6 in data20) {
1409
+ if (
1410
+ !(
1411
+ key6 ===
1412
+ 'vfsRoot' ||
1413
+ key6 ===
1414
+ 'nodes'
1415
+ )
1092
1416
  ) {
1093
- let data17 =
1094
- data16[
1095
- i2
1417
+ validate11.errors =
1418
+ [
1419
+ {
1420
+ instancePath:
1421
+ instancePath +
1422
+ '/extraFiles',
1423
+ schemaPath:
1424
+ '#/definitions/PHPExtensionManifestExtraFiles/additionalProperties',
1425
+ keyword:
1426
+ 'additionalProperties',
1427
+ params: {
1428
+ additionalProperty:
1429
+ key6,
1430
+ },
1431
+ message:
1432
+ 'must NOT have additional properties',
1433
+ },
1096
1434
  ];
1097
- const _errs42 =
1098
- errors;
1099
- if (
1100
- errors ===
1101
- _errs42
1102
- ) {
1435
+ return false;
1436
+ break;
1437
+ }
1438
+ }
1439
+ if (
1440
+ _errs50 ===
1441
+ errors
1442
+ ) {
1443
+ if (
1444
+ data20.vfsRoot !==
1445
+ undefined
1446
+ ) {
1447
+ const _errs51 =
1448
+ errors;
1449
+ if (
1450
+ typeof data20.vfsRoot !==
1451
+ 'string'
1452
+ ) {
1453
+ validate11.errors =
1454
+ [
1455
+ {
1456
+ instancePath:
1457
+ instancePath +
1458
+ '/extraFiles/vfsRoot',
1459
+ schemaPath:
1460
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/vfsRoot/type',
1461
+ keyword:
1462
+ 'type',
1463
+ params: {
1464
+ type: 'string',
1465
+ },
1466
+ message:
1467
+ 'must be string',
1468
+ },
1469
+ ];
1470
+ return false;
1471
+ }
1472
+ var valid10 =
1473
+ _errs51 ===
1474
+ errors;
1475
+ } else {
1476
+ var valid10 = true;
1477
+ }
1478
+ if (
1479
+ valid10
1480
+ ) {
1481
+ if (
1482
+ data20.nodes !==
1483
+ undefined
1484
+ ) {
1485
+ let data22 =
1486
+ data20.nodes;
1487
+ const _errs53 =
1488
+ errors;
1103
1489
  if (
1104
- data17 &&
1105
- typeof data17 ==
1106
- 'object' &&
1107
- !Array.isArray(
1108
- data17
1109
- )
1490
+ errors ===
1491
+ _errs53
1110
1492
  ) {
1111
- let missing3;
1112
1493
  if (
1113
- data17.vfsPath ===
1114
- undefined &&
1115
- (missing3 =
1116
- 'vfsPath')
1494
+ Array.isArray(
1495
+ data22
1496
+ )
1117
1497
  ) {
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
1498
+ var valid11 = true;
1499
+ const len2 =
1500
+ data22.length;
1501
+ for (
1502
+ let i2 = 0;
1503
+ i2 <
1504
+ len2;
1505
+ i2++
1180
1506
  ) {
1507
+ let data23 =
1508
+ data22[
1509
+ i2
1510
+ ];
1511
+ const _errs55 =
1512
+ errors;
1181
1513
  if (
1182
- data17.vfsPath !==
1183
- undefined
1514
+ errors ===
1515
+ _errs55
1184
1516
  ) {
1185
- const _errs45 =
1186
- errors;
1187
1517
  if (
1188
- typeof data17.vfsPath !==
1189
- 'string'
1518
+ data23 &&
1519
+ typeof data23 ==
1520
+ 'object' &&
1521
+ !Array.isArray(
1522
+ data23
1523
+ )
1190
1524
  ) {
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;
1525
+ let missing3;
1229
1526
  if (
1230
- typeof data19 !==
1231
- 'string'
1527
+ data23.vfsPath ===
1528
+ undefined &&
1529
+ (missing3 =
1530
+ 'vfsPath')
1232
1531
  ) {
1233
1532
  validate11.errors =
1234
1533
  [
@@ -1236,189 +1535,311 @@ function validate11(
1236
1535
  instancePath:
1237
1536
  instancePath +
1238
1537
  '/extraFiles/nodes/' +
1239
- i2 +
1240
- '/type',
1538
+ i2,
1241
1539
  schemaPath:
1242
- '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/items/properties/type/type',
1540
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/items/required',
1243
1541
  keyword:
1244
- 'type',
1542
+ 'required',
1245
1543
  params: {
1246
- type: 'string',
1544
+ missingProperty:
1545
+ missing3,
1247
1546
  },
1248
1547
  message:
1249
- 'must be string',
1548
+ "must have required property '" +
1549
+ missing3 +
1550
+ "'",
1250
1551
  },
1251
1552
  ];
1252
1553
  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 =
1554
+ } else {
1555
+ const _errs57 =
1304
1556
  errors;
1557
+ for (const key7 in data23) {
1558
+ if (
1559
+ !(
1560
+ key7 ===
1561
+ 'vfsPath' ||
1562
+ key7 ===
1563
+ 'type' ||
1564
+ key7 ===
1565
+ 'sourcePath'
1566
+ )
1567
+ ) {
1568
+ validate11.errors =
1569
+ [
1570
+ {
1571
+ instancePath:
1572
+ instancePath +
1573
+ '/extraFiles/nodes/' +
1574
+ i2,
1575
+ schemaPath:
1576
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/items/additionalProperties',
1577
+ keyword:
1578
+ 'additionalProperties',
1579
+ params: {
1580
+ additionalProperty:
1581
+ key7,
1582
+ },
1583
+ message:
1584
+ 'must NOT have additional properties',
1585
+ },
1586
+ ];
1587
+ return false;
1588
+ break;
1589
+ }
1590
+ }
1305
1591
  if (
1306
- typeof data17.sourcePath !==
1307
- 'string'
1592
+ _errs57 ===
1593
+ errors
1308
1594
  ) {
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;
1595
+ if (
1596
+ data23.vfsPath !==
1597
+ undefined
1598
+ ) {
1599
+ const _errs58 =
1600
+ errors;
1601
+ if (
1602
+ typeof data23.vfsPath !==
1603
+ 'string'
1604
+ ) {
1605
+ validate11.errors =
1606
+ [
1607
+ {
1608
+ instancePath:
1609
+ instancePath +
1610
+ '/extraFiles/nodes/' +
1611
+ i2 +
1612
+ '/vfsPath',
1613
+ schemaPath:
1614
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/items/properties/vfsPath/type',
1615
+ keyword:
1616
+ 'type',
1617
+ params: {
1618
+ type: 'string',
1619
+ },
1620
+ message:
1621
+ 'must be string',
1622
+ },
1623
+ ];
1624
+ return false;
1625
+ }
1626
+ var valid12 =
1627
+ _errs58 ===
1628
+ errors;
1629
+ } else {
1630
+ var valid12 = true;
1631
+ }
1632
+ if (
1633
+ valid12
1634
+ ) {
1635
+ if (
1636
+ data23.type !==
1637
+ undefined
1638
+ ) {
1639
+ let data25 =
1640
+ data23.type;
1641
+ const _errs60 =
1642
+ errors;
1643
+ if (
1644
+ typeof data25 !==
1645
+ 'string'
1646
+ ) {
1647
+ validate11.errors =
1648
+ [
1649
+ {
1650
+ instancePath:
1651
+ instancePath +
1652
+ '/extraFiles/nodes/' +
1653
+ i2 +
1654
+ '/type',
1655
+ schemaPath:
1656
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/items/properties/type/type',
1657
+ keyword:
1658
+ 'type',
1659
+ params: {
1660
+ type: 'string',
1661
+ },
1662
+ message:
1663
+ 'must be string',
1664
+ },
1665
+ ];
1666
+ return false;
1667
+ }
1668
+ if (
1669
+ !(
1670
+ data25 ===
1671
+ 'file' ||
1672
+ data25 ===
1673
+ 'directory'
1674
+ )
1675
+ ) {
1676
+ validate11.errors =
1677
+ [
1678
+ {
1679
+ instancePath:
1680
+ instancePath +
1681
+ '/extraFiles/nodes/' +
1682
+ i2 +
1683
+ '/type',
1684
+ schemaPath:
1685
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/items/properties/type/enum',
1686
+ keyword:
1687
+ 'enum',
1688
+ params: {
1689
+ allowedValues:
1690
+ schema15
1691
+ .properties
1692
+ .nodes
1693
+ .items
1694
+ .properties
1695
+ .type
1696
+ .enum,
1697
+ },
1698
+ message:
1699
+ 'must be equal to one of the allowed values',
1700
+ },
1701
+ ];
1702
+ return false;
1703
+ }
1704
+ var valid12 =
1705
+ _errs60 ===
1706
+ errors;
1707
+ } else {
1708
+ var valid12 = true;
1709
+ }
1710
+ if (
1711
+ valid12
1712
+ ) {
1713
+ if (
1714
+ data23.sourcePath !==
1715
+ undefined
1716
+ ) {
1717
+ const _errs62 =
1718
+ errors;
1719
+ if (
1720
+ typeof data23.sourcePath !==
1721
+ 'string'
1722
+ ) {
1723
+ validate11.errors =
1724
+ [
1725
+ {
1726
+ instancePath:
1727
+ instancePath +
1728
+ '/extraFiles/nodes/' +
1729
+ i2 +
1730
+ '/sourcePath',
1731
+ schemaPath:
1732
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/items/properties/sourcePath/type',
1733
+ keyword:
1734
+ 'type',
1735
+ params: {
1736
+ type: 'string',
1737
+ },
1738
+ message:
1739
+ 'must be string',
1740
+ },
1741
+ ];
1742
+ return false;
1743
+ }
1744
+ var valid12 =
1745
+ _errs62 ===
1746
+ errors;
1747
+ } else {
1748
+ var valid12 = true;
1749
+ }
1750
+ }
1751
+ }
1329
1752
  }
1330
- var valid10 =
1331
- _errs49 ===
1332
- errors;
1333
- } else {
1334
- var valid10 = true;
1335
1753
  }
1754
+ } else {
1755
+ validate11.errors =
1756
+ [
1757
+ {
1758
+ instancePath:
1759
+ instancePath +
1760
+ '/extraFiles/nodes/' +
1761
+ i2,
1762
+ schemaPath:
1763
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/items/type',
1764
+ keyword:
1765
+ 'type',
1766
+ params: {
1767
+ type: 'object',
1768
+ },
1769
+ message:
1770
+ 'must be object',
1771
+ },
1772
+ ];
1773
+ return false;
1336
1774
  }
1337
1775
  }
1776
+ var valid11 =
1777
+ _errs55 ===
1778
+ errors;
1779
+ if (
1780
+ !valid11
1781
+ ) {
1782
+ break;
1783
+ }
1338
1784
  }
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',
1785
+ } else {
1786
+ validate11.errors =
1787
+ [
1788
+ {
1789
+ instancePath:
1790
+ instancePath +
1791
+ '/extraFiles/nodes',
1792
+ schemaPath:
1793
+ '#/definitions/PHPExtensionManifestExtraFiles/properties/nodes/type',
1794
+ keyword:
1795
+ 'type',
1796
+ params: {
1797
+ type: 'array',
1798
+ },
1799
+ message:
1800
+ 'must be array',
1354
1801
  },
1355
- message:
1356
- 'must be object',
1357
- },
1358
- ];
1359
- return false;
1802
+ ];
1803
+ return false;
1804
+ }
1360
1805
  }
1361
- }
1362
- var valid9 =
1363
- _errs42 ===
1364
- errors;
1365
- if (
1366
- !valid9
1367
- ) {
1368
- break;
1806
+ var valid10 =
1807
+ _errs53 ===
1808
+ errors;
1809
+ } else {
1810
+ var valid10 = true;
1369
1811
  }
1370
1812
  }
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
1813
  }
1814
+ } else {
1815
+ validate11.errors =
1816
+ [
1817
+ {
1818
+ instancePath:
1819
+ instancePath +
1820
+ '/extraFiles',
1821
+ schemaPath:
1822
+ '#/definitions/PHPExtensionManifestExtraFiles/type',
1823
+ keyword:
1824
+ 'type',
1825
+ params: {
1826
+ type: 'object',
1827
+ },
1828
+ message:
1829
+ 'must be object',
1830
+ },
1831
+ ];
1832
+ return false;
1391
1833
  }
1392
- var valid8 =
1393
- _errs40 ===
1394
- errors;
1395
- } else {
1396
- var valid8 = true;
1397
1834
  }
1835
+ var valid0 =
1836
+ _errs47 === errors;
1837
+ } else {
1838
+ var valid0 = true;
1398
1839
  }
1399
1840
  }
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
1841
  }
1418
1842
  }
1419
- var valid0 = _errs34 === errors;
1420
- } else {
1421
- var valid0 = true;
1422
1843
  }
1423
1844
  }
1424
1845
  }