@php-wasm/universal 3.1.25 → 3.1.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +16 -15
- package/index.cjs.map +1 -1
- package/index.js +981 -399
- package/index.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/load-extension.d.ts +117 -133
- package/package.json +7 -6
- package/php-extension-manifest-schema-validator.d.ts +10 -0
- package/php-extension-manifest-schema-validator.js +1467 -0
- package/php-extension-manifest-schema.json +83 -0
|
@@ -0,0 +1,1467 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
export const validate = validate10;
|
|
3
|
+
export default validate10;
|
|
4
|
+
const schema11 = {
|
|
5
|
+
$schema: 'http://json-schema.org/schema',
|
|
6
|
+
$ref: '#/definitions/PHPExtensionManifest',
|
|
7
|
+
definitions: {
|
|
8
|
+
PHPExtensionManifest: {
|
|
9
|
+
type: 'object',
|
|
10
|
+
properties: {
|
|
11
|
+
name: { type: 'string' },
|
|
12
|
+
version: { type: 'string' },
|
|
13
|
+
mode: { type: 'string', const: 'php-extension' },
|
|
14
|
+
artifacts: {
|
|
15
|
+
type: 'array',
|
|
16
|
+
items: {
|
|
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,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
extraFiles: {
|
|
40
|
+
$ref: '#/definitions/PHPExtensionManifestExtraFiles',
|
|
41
|
+
description:
|
|
42
|
+
'URL-backed files shared by every artifact in this manifest.',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
required: ['name', 'artifacts'],
|
|
46
|
+
additionalProperties: false,
|
|
47
|
+
description:
|
|
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.',
|
|
49
|
+
},
|
|
50
|
+
PHPExtensionManifestExtraFiles: {
|
|
51
|
+
type: 'object',
|
|
52
|
+
properties: {
|
|
53
|
+
vfsRoot: {
|
|
54
|
+
type: 'string',
|
|
55
|
+
description:
|
|
56
|
+
'Absolute VFS path where files and directories are written. When a manifest declares both top-level and per-artifact `extraFiles`, the first declared `targetPath` wins. Defaults to `<extensionDir>/<name>-assets`.',
|
|
57
|
+
},
|
|
58
|
+
nodes: {
|
|
59
|
+
type: 'array',
|
|
60
|
+
items: {
|
|
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,
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
additionalProperties: false,
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
const schema12 = {
|
|
90
|
+
type: 'object',
|
|
91
|
+
properties: {
|
|
92
|
+
name: { type: 'string' },
|
|
93
|
+
version: { type: 'string' },
|
|
94
|
+
mode: { type: 'string', const: 'php-extension' },
|
|
95
|
+
artifacts: {
|
|
96
|
+
type: 'array',
|
|
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
|
+
},
|
|
118
|
+
},
|
|
119
|
+
extraFiles: {
|
|
120
|
+
$ref: '#/definitions/PHPExtensionManifestExtraFiles',
|
|
121
|
+
description:
|
|
122
|
+
'URL-backed files shared by every artifact in this manifest.',
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
required: ['name', 'artifacts'],
|
|
126
|
+
additionalProperties: false,
|
|
127
|
+
description:
|
|
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.',
|
|
129
|
+
};
|
|
130
|
+
const schema13 = {
|
|
131
|
+
type: 'object',
|
|
132
|
+
properties: {
|
|
133
|
+
vfsRoot: {
|
|
134
|
+
type: 'string',
|
|
135
|
+
description:
|
|
136
|
+
'Absolute VFS path where files and directories are written. When a manifest declares both top-level and per-artifact `extraFiles`, the first declared `targetPath` wins. Defaults to `<extensionDir>/<name>-assets`.',
|
|
137
|
+
},
|
|
138
|
+
nodes: {
|
|
139
|
+
type: 'array',
|
|
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
|
+
},
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
additionalProperties: false,
|
|
166
|
+
};
|
|
167
|
+
function validate11(
|
|
168
|
+
data,
|
|
169
|
+
{ instancePath = '', parentData, parentDataProperty, rootData = data } = {}
|
|
170
|
+
) {
|
|
171
|
+
let vErrors = null;
|
|
172
|
+
let errors = 0;
|
|
173
|
+
if (errors === 0) {
|
|
174
|
+
if (data && typeof data == 'object' && !Array.isArray(data)) {
|
|
175
|
+
let missing0;
|
|
176
|
+
if (
|
|
177
|
+
(data.name === undefined && (missing0 = 'name')) ||
|
|
178
|
+
(data.artifacts === undefined && (missing0 = 'artifacts'))
|
|
179
|
+
) {
|
|
180
|
+
validate11.errors = [
|
|
181
|
+
{
|
|
182
|
+
instancePath,
|
|
183
|
+
schemaPath: '#/required',
|
|
184
|
+
keyword: 'required',
|
|
185
|
+
params: { missingProperty: missing0 },
|
|
186
|
+
message:
|
|
187
|
+
"must have required property '" + missing0 + "'",
|
|
188
|
+
},
|
|
189
|
+
];
|
|
190
|
+
return false;
|
|
191
|
+
} else {
|
|
192
|
+
const _errs1 = errors;
|
|
193
|
+
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
|
+
) {
|
|
203
|
+
validate11.errors = [
|
|
204
|
+
{
|
|
205
|
+
instancePath,
|
|
206
|
+
schemaPath: '#/additionalProperties',
|
|
207
|
+
keyword: 'additionalProperties',
|
|
208
|
+
params: { additionalProperty: key0 },
|
|
209
|
+
message: 'must NOT have additional properties',
|
|
210
|
+
},
|
|
211
|
+
];
|
|
212
|
+
return false;
|
|
213
|
+
break;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
if (_errs1 === errors) {
|
|
217
|
+
if (data.name !== undefined) {
|
|
218
|
+
const _errs2 = errors;
|
|
219
|
+
if (typeof data.name !== 'string') {
|
|
220
|
+
validate11.errors = [
|
|
221
|
+
{
|
|
222
|
+
instancePath: instancePath + '/name',
|
|
223
|
+
schemaPath: '#/properties/name/type',
|
|
224
|
+
keyword: 'type',
|
|
225
|
+
params: { type: 'string' },
|
|
226
|
+
message: 'must be string',
|
|
227
|
+
},
|
|
228
|
+
];
|
|
229
|
+
return false;
|
|
230
|
+
}
|
|
231
|
+
var valid0 = _errs2 === errors;
|
|
232
|
+
} else {
|
|
233
|
+
var valid0 = true;
|
|
234
|
+
}
|
|
235
|
+
if (valid0) {
|
|
236
|
+
if (data.version !== undefined) {
|
|
237
|
+
const _errs4 = errors;
|
|
238
|
+
if (typeof data.version !== 'string') {
|
|
239
|
+
validate11.errors = [
|
|
240
|
+
{
|
|
241
|
+
instancePath: instancePath + '/version',
|
|
242
|
+
schemaPath: '#/properties/version/type',
|
|
243
|
+
keyword: 'type',
|
|
244
|
+
params: { type: 'string' },
|
|
245
|
+
message: 'must be string',
|
|
246
|
+
},
|
|
247
|
+
];
|
|
248
|
+
return false;
|
|
249
|
+
}
|
|
250
|
+
var valid0 = _errs4 === errors;
|
|
251
|
+
} else {
|
|
252
|
+
var valid0 = true;
|
|
253
|
+
}
|
|
254
|
+
if (valid0) {
|
|
255
|
+
if (data.mode !== undefined) {
|
|
256
|
+
let data2 = data.mode;
|
|
257
|
+
const _errs6 = errors;
|
|
258
|
+
if (typeof data2 !== 'string') {
|
|
259
|
+
validate11.errors = [
|
|
260
|
+
{
|
|
261
|
+
instancePath:
|
|
262
|
+
instancePath + '/mode',
|
|
263
|
+
schemaPath:
|
|
264
|
+
'#/properties/mode/type',
|
|
265
|
+
keyword: 'type',
|
|
266
|
+
params: { type: 'string' },
|
|
267
|
+
message: 'must be string',
|
|
268
|
+
},
|
|
269
|
+
];
|
|
270
|
+
return false;
|
|
271
|
+
}
|
|
272
|
+
if ('php-extension' !== data2) {
|
|
273
|
+
validate11.errors = [
|
|
274
|
+
{
|
|
275
|
+
instancePath:
|
|
276
|
+
instancePath + '/mode',
|
|
277
|
+
schemaPath:
|
|
278
|
+
'#/properties/mode/const',
|
|
279
|
+
keyword: 'const',
|
|
280
|
+
params: {
|
|
281
|
+
allowedValue: 'php-extension',
|
|
282
|
+
},
|
|
283
|
+
message:
|
|
284
|
+
'must be equal to constant',
|
|
285
|
+
},
|
|
286
|
+
];
|
|
287
|
+
return false;
|
|
288
|
+
}
|
|
289
|
+
var valid0 = _errs6 === errors;
|
|
290
|
+
} else {
|
|
291
|
+
var valid0 = true;
|
|
292
|
+
}
|
|
293
|
+
if (valid0) {
|
|
294
|
+
if (data.artifacts !== undefined) {
|
|
295
|
+
let data3 = data.artifacts;
|
|
296
|
+
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) {
|
|
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
|
+
}
|
|
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
|
+
) {
|
|
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
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
var valid0 = _errs34 === errors;
|
|
1420
|
+
} else {
|
|
1421
|
+
var valid0 = true;
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
}
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
} else {
|
|
1430
|
+
validate11.errors = [
|
|
1431
|
+
{
|
|
1432
|
+
instancePath,
|
|
1433
|
+
schemaPath: '#/type',
|
|
1434
|
+
keyword: 'type',
|
|
1435
|
+
params: { type: 'object' },
|
|
1436
|
+
message: 'must be object',
|
|
1437
|
+
},
|
|
1438
|
+
];
|
|
1439
|
+
return false;
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1442
|
+
validate11.errors = vErrors;
|
|
1443
|
+
return errors === 0;
|
|
1444
|
+
}
|
|
1445
|
+
function validate10(
|
|
1446
|
+
data,
|
|
1447
|
+
{ instancePath = '', parentData, parentDataProperty, rootData = data } = {}
|
|
1448
|
+
) {
|
|
1449
|
+
let vErrors = null;
|
|
1450
|
+
let errors = 0;
|
|
1451
|
+
if (
|
|
1452
|
+
!validate11(data, {
|
|
1453
|
+
instancePath,
|
|
1454
|
+
parentData,
|
|
1455
|
+
parentDataProperty,
|
|
1456
|
+
rootData,
|
|
1457
|
+
})
|
|
1458
|
+
) {
|
|
1459
|
+
vErrors =
|
|
1460
|
+
vErrors === null
|
|
1461
|
+
? validate11.errors
|
|
1462
|
+
: vErrors.concat(validate11.errors);
|
|
1463
|
+
errors = vErrors.length;
|
|
1464
|
+
}
|
|
1465
|
+
validate10.errors = vErrors;
|
|
1466
|
+
return errors === 0;
|
|
1467
|
+
}
|