@module-federation/enhanced 0.8.9 → 0.8.10

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.
Files changed (43) hide show
  1. package/dist/package.json +15 -13
  2. package/dist/src/schemas/container/ContainerPlugin.check.d.ts +3 -2
  3. package/dist/src/schemas/container/ContainerPlugin.check.js +812 -1064
  4. package/dist/src/schemas/container/ContainerPlugin.check.js.map +1 -1
  5. package/dist/src/schemas/container/ContainerPlugin.d.ts +218 -257
  6. package/dist/src/schemas/container/ContainerPlugin.js +32 -31
  7. package/dist/src/schemas/container/ContainerPlugin.js.map +1 -1
  8. package/dist/src/schemas/container/ContainerReferencePlugin.check.d.ts +4 -3
  9. package/dist/src/schemas/container/ContainerReferencePlugin.check.js +258 -853
  10. package/dist/src/schemas/container/ContainerReferencePlugin.check.js.map +1 -1
  11. package/dist/src/schemas/container/ContainerReferencePlugin.d.ts +72 -67
  12. package/dist/src/schemas/container/ContainerReferencePlugin.js +6 -1
  13. package/dist/src/schemas/container/ContainerReferencePlugin.js.map +1 -1
  14. package/dist/src/schemas/container/ExternalsType.check.d.ts +8 -0
  15. package/dist/src/schemas/container/ExternalsType.check.js +64 -0
  16. package/dist/src/schemas/container/ExternalsType.check.js.map +1 -0
  17. package/dist/src/schemas/container/ExternalsType.d.ts +4 -0
  18. package/dist/src/schemas/container/ExternalsType.js +12 -0
  19. package/dist/src/schemas/container/ExternalsType.js.map +1 -0
  20. package/dist/src/schemas/container/ModuleFederationPlugin.check.js +3100 -0
  21. package/dist/src/schemas/container/ModuleFederationPlugin.check.js.map +1 -0
  22. package/dist/src/schemas/container/ModuleFederationPlugin.d.ts +622 -0
  23. package/dist/src/schemas/container/ModuleFederationPlugin.js +753 -0
  24. package/dist/src/schemas/container/ModuleFederationPlugin.js.map +1 -1
  25. package/dist/src/schemas/sharing/ConsumeSharedPlugin.check.d.ts +8 -0
  26. package/dist/src/schemas/sharing/ConsumeSharedPlugin.check.js +357 -0
  27. package/dist/src/schemas/sharing/ConsumeSharedPlugin.check.js.map +1 -0
  28. package/dist/src/schemas/sharing/ConsumeSharedPlugin.d.ts +106 -0
  29. package/dist/src/schemas/sharing/ConsumeSharedPlugin.js +129 -0
  30. package/dist/src/schemas/sharing/ConsumeSharedPlugin.js.map +1 -0
  31. package/dist/src/schemas/sharing/ProvideSharedPlugin.check.d.ts +8 -0
  32. package/dist/src/schemas/sharing/ProvideSharedPlugin.check.js +281 -0
  33. package/dist/src/schemas/sharing/ProvideSharedPlugin.check.js.map +1 -0
  34. package/dist/src/schemas/sharing/ProvideSharedPlugin.d.ts +83 -0
  35. package/dist/src/schemas/sharing/ProvideSharedPlugin.js +103 -0
  36. package/dist/src/schemas/sharing/ProvideSharedPlugin.js.map +1 -0
  37. package/dist/src/schemas/sharing/SharePlugin.check.d.ts +8 -0
  38. package/dist/src/schemas/sharing/SharePlugin.check.js +388 -0
  39. package/dist/src/schemas/sharing/SharePlugin.check.js.map +1 -0
  40. package/dist/src/schemas/sharing/SharePlugin.d.ts +116 -0
  41. package/dist/src/schemas/sharing/SharePlugin.js +142 -0
  42. package/dist/src/schemas/sharing/SharePlugin.js.map +1 -0
  43. package/package.json +17 -15
@@ -1,128 +1,15 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validate = void 0;
4
+ // @ts-nocheck
2
5
  /* eslint-disable */
3
- //@ts-nocheck
4
6
  /*
5
7
  * This file was automatically generated.
6
8
  * DO NOT MODIFY BY HAND.
7
- * Run `yarn special-lint-fix` to update
8
9
  */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- const schema40 = {
11
- definitions: {
12
- ExternalsType: {
13
- enum: [
14
- 'var',
15
- 'module',
16
- 'assign',
17
- 'this',
18
- 'window',
19
- 'self',
20
- 'global',
21
- 'commonjs',
22
- 'commonjs2',
23
- 'commonjs-module',
24
- 'commonjs-static',
25
- 'amd',
26
- 'amd-require',
27
- 'umd',
28
- 'umd2',
29
- 'jsonp',
30
- 'system',
31
- 'promise',
32
- 'import',
33
- 'script',
34
- 'node-commonjs',
35
- ],
36
- },
37
- Remotes: {
38
- anyOf: [
39
- {
40
- type: 'array',
41
- items: {
42
- anyOf: [
43
- {
44
- $ref: '#/definitions/RemotesItem',
45
- },
46
- {
47
- $ref: '#/definitions/RemotesObject',
48
- },
49
- ],
50
- },
51
- },
52
- {
53
- $ref: '#/definitions/RemotesObject',
54
- },
55
- ],
56
- },
57
- RemotesConfig: {
58
- type: 'object',
59
- additionalProperties: false,
60
- properties: {
61
- external: {
62
- anyOf: [
63
- {
64
- $ref: '#/definitions/RemotesItem',
65
- },
66
- {
67
- $ref: '#/definitions/RemotesItems',
68
- },
69
- ],
70
- },
71
- shareScope: {
72
- type: 'string',
73
- minLength: 1,
74
- },
75
- },
76
- required: ['external'],
77
- },
78
- RemotesItem: {
79
- type: 'string',
80
- minLength: 1,
81
- },
82
- RemotesItems: {
83
- type: 'array',
84
- items: {
85
- $ref: '#/definitions/RemotesItem',
86
- },
87
- },
88
- RemotesObject: {
89
- type: 'object',
90
- additionalProperties: {
91
- anyOf: [
92
- {
93
- $ref: '#/definitions/RemotesConfig',
94
- },
95
- {
96
- $ref: '#/definitions/RemotesItem',
97
- },
98
- {
99
- $ref: '#/definitions/RemotesItems',
100
- },
101
- ],
102
- },
103
- },
104
- },
105
- type: 'object',
106
- additionalProperties: false,
107
- properties: {
108
- remoteType: {
109
- oneOf: [
110
- {
111
- $ref: '#/definitions/ExternalsType',
112
- },
113
- ],
114
- },
115
- remotes: {
116
- $ref: '#/definitions/Remotes',
117
- },
118
- shareScope: {
119
- type: 'string',
120
- minLength: 1,
121
- },
122
- },
123
- required: ['remoteType', 'remotes'],
124
- };
125
- const schema41 = {
10
+ exports.validate = o;
11
+ exports.default = o;
12
+ const r = {
126
13
  enum: [
127
14
  'var',
128
15
  'module',
@@ -147,793 +34,311 @@ const schema41 = {
147
34
  'node-commonjs',
148
35
  ],
149
36
  };
150
- const schema42 = {
151
- anyOf: [
152
- {
153
- type: 'array',
154
- items: {
155
- anyOf: [
156
- {
157
- $ref: '#/definitions/RemotesItem',
158
- },
159
- {
160
- $ref: '#/definitions/RemotesObject',
161
- },
162
- ],
163
- },
164
- },
165
- {
166
- $ref: '#/definitions/RemotesObject',
167
- },
168
- ],
169
- };
170
- const schema43 = {
171
- type: 'string',
172
- minLength: 1,
173
- };
174
- const schema44 = {
175
- type: 'object',
176
- additionalProperties: {
177
- anyOf: [
178
- {
179
- $ref: '#/definitions/RemotesConfig',
180
- },
181
- {
182
- $ref: '#/definitions/RemotesItem',
183
- },
184
- {
185
- $ref: '#/definitions/RemotesItems',
186
- },
187
- ],
188
- },
189
- };
190
- const schema45 = {
191
- type: 'object',
192
- additionalProperties: false,
193
- properties: {
194
- external: {
195
- anyOf: [
196
- {
197
- $ref: '#/definitions/RemotesItem',
198
- },
199
- {
200
- $ref: '#/definitions/RemotesItems',
201
- },
202
- ],
203
- },
204
- name: {
205
- type: 'string',
206
- minLength: 1,
207
- },
208
- shareScope: {
209
- type: 'string',
210
- minLength: 1,
211
- },
212
- },
213
- required: ['external'],
214
- };
215
- const schema47 = {
216
- type: 'array',
217
- items: {
218
- $ref: '#/definitions/RemotesItem',
219
- },
220
- };
221
- function validate40(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {
222
- let vErrors = null;
223
- let errors = 0;
224
- if (errors === 0) {
225
- if (Array.isArray(data)) {
226
- var valid0 = true;
227
- const len0 = data.length;
228
- for (let i0 = 0; i0 < len0; i0++) {
229
- let data0 = data[i0];
230
- const _errs1 = errors;
231
- const _errs2 = errors;
232
- if (errors === _errs2) {
233
- if (typeof data0 === 'string') {
234
- if (data0.length < 1) {
235
- validate40.errors = [
236
- {
237
- params: {},
238
- },
239
- ];
240
- return false;
241
- }
242
- }
243
- else {
244
- validate40.errors = [
245
- {
246
- params: {
247
- type: 'string',
248
- },
249
- },
250
- ];
251
- return false;
252
- }
253
- }
254
- var valid0 = _errs1 === errors;
255
- if (!valid0) {
256
- break;
257
- }
258
- }
259
- }
260
- else {
261
- validate40.errors = [
262
- {
263
- params: {
264
- type: 'array',
265
- },
266
- },
267
- ];
268
- return false;
37
+ function t(r, { instancePath: e = '', parentData: a, parentDataProperty: n, rootData: o = r, } = {}) {
38
+ if (!Array.isArray(r))
39
+ return (t.errors = [{ params: { type: 'array' } }]), !1;
40
+ {
41
+ const e = r.length;
42
+ for (let a = 0; a < e; a++) {
43
+ let e = r[a];
44
+ const n = 0;
45
+ if ('string' != typeof e)
46
+ return (t.errors = [{ params: { type: 'string' } }]), !1;
47
+ if (e.length < 1)
48
+ return (t.errors = [{ params: {} }]), !1;
49
+ if (0 !== n)
50
+ break;
269
51
  }
270
52
  }
271
- validate40.errors = vErrors;
272
- return errors === 0;
53
+ return (t.errors = null), !0;
273
54
  }
274
- function validate39(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {
275
- let vErrors = null;
276
- let errors = 0;
277
- if (errors === 0) {
278
- if (data && typeof data == 'object' && !Array.isArray(data)) {
279
- let missing0;
280
- if (data.external === undefined && (missing0 = 'external')) {
281
- validate39.errors = [
282
- {
283
- params: {
284
- missingProperty: missing0,
285
- },
286
- },
287
- ];
288
- return false;
289
- }
290
- else {
291
- const _errs1 = errors;
292
- for (const key0 in data) {
293
- if (!(key0 === 'external' || key0 === 'shareScope')) {
294
- validate39.errors = [
295
- {
296
- params: {
297
- additionalProperty: key0,
298
- },
299
- },
300
- ];
301
- return false;
302
- break;
303
- }
304
- }
305
- if (_errs1 === errors) {
306
- if (data.external !== undefined) {
307
- let data0 = data.external;
308
- const _errs2 = errors;
309
- const _errs3 = errors;
310
- let valid1 = false;
311
- const _errs4 = errors;
312
- const _errs5 = errors;
313
- if (errors === _errs5) {
314
- if (typeof data0 === 'string') {
315
- if (data0.length < 1) {
316
- const err0 = {
317
- params: {},
318
- };
319
- if (vErrors === null) {
320
- vErrors = [err0];
321
- }
322
- else {
323
- vErrors.push(err0);
324
- }
325
- errors++;
55
+ function e(r, { instancePath: a = '', parentData: n, parentDataProperty: o, rootData: s = r, } = {}) {
56
+ let l = null, i = 0;
57
+ if (0 === i) {
58
+ if (!r || 'object' != typeof r || Array.isArray(r))
59
+ return (e.errors = [{ params: { type: 'object' } }]), !1;
60
+ {
61
+ let n;
62
+ if (void 0 === r.external && (n = 'external'))
63
+ return (e.errors = [{ params: { missingProperty: n } }]), !1;
64
+ {
65
+ const n = i;
66
+ for (const t in r)
67
+ if ('external' !== t && 'shareScope' !== t)
68
+ return (e.errors = [{ params: { additionalProperty: t } }]), !1;
69
+ if (n === i) {
70
+ if (void 0 !== r.external) {
71
+ let n = r.external;
72
+ const o = i, u = i;
73
+ let m = !1;
74
+ const f = i;
75
+ if (i == i)
76
+ if ('string' == typeof n) {
77
+ if (n.length < 1) {
78
+ const r = { params: {} };
79
+ null === l ? (l = [r]) : l.push(r), i++;
326
80
  }
327
81
  }
328
82
  else {
329
- const err1 = {
330
- params: {
331
- type: 'string',
332
- },
333
- };
334
- if (vErrors === null) {
335
- vErrors = [err1];
336
- }
337
- else {
338
- vErrors.push(err1);
339
- }
340
- errors++;
83
+ const r = { params: { type: 'string' } };
84
+ null === l ? (l = [r]) : l.push(r), i++;
341
85
  }
342
- }
343
- var _valid0 = _errs4 === errors;
344
- valid1 = valid1 || _valid0;
345
- if (!valid1) {
346
- const _errs7 = errors;
347
- if (!validate40(data0, {
348
- instancePath: instancePath + '/external',
349
- parentData: data,
86
+ var p = f === i;
87
+ if (((m = m || p), !m)) {
88
+ const e = i;
89
+ t(n, {
90
+ instancePath: a + '/external',
91
+ parentData: r,
350
92
  parentDataProperty: 'external',
351
- rootData,
352
- })) {
353
- vErrors =
354
- vErrors === null
355
- ? validate40.errors
356
- : vErrors.concat(validate40.errors);
357
- errors = vErrors.length;
358
- }
359
- var _valid0 = _errs7 === errors;
360
- valid1 = valid1 || _valid0;
361
- }
362
- if (!valid1) {
363
- const err2 = {
364
- params: {},
365
- };
366
- if (vErrors === null) {
367
- vErrors = [err2];
368
- }
369
- else {
370
- vErrors.push(err2);
371
- }
372
- errors++;
373
- validate39.errors = vErrors;
374
- return false;
93
+ rootData: s,
94
+ }) ||
95
+ ((l = null === l ? t.errors : l.concat(t.errors)),
96
+ (i = l.length)),
97
+ (p = e === i),
98
+ (m = m || p);
375
99
  }
376
- else {
377
- errors = _errs3;
378
- if (vErrors !== null) {
379
- if (_errs3) {
380
- vErrors.length = _errs3;
381
- }
382
- else {
383
- vErrors = null;
384
- }
385
- }
100
+ if (!m) {
101
+ const r = { params: {} };
102
+ return (null === l ? (l = [r]) : l.push(r), i++, (e.errors = l), !1);
386
103
  }
387
- var valid0 = _errs2 === errors;
104
+ (i = u), null !== l && (u ? (l.length = u) : (l = null));
105
+ var c = o === i;
388
106
  }
389
- else {
390
- var valid0 = true;
391
- }
392
- if (valid0) {
393
- if (data.name !== undefined) {
394
- let data1 = data.name;
395
- const _errs8 = errors;
396
- if (errors === _errs8) {
397
- if (typeof data1 === 'string') {
398
- if (data1.length < 1) {
399
- validate39.errors = [
400
- {
401
- params: {},
402
- },
403
- ];
404
- return false;
405
- }
406
- }
407
- else {
408
- validate39.errors = [
409
- {
410
- params: {
411
- type: 'string',
412
- },
413
- },
414
- ];
415
- return false;
416
- }
107
+ else
108
+ c = !0;
109
+ if (c)
110
+ if (void 0 !== r.shareScope) {
111
+ let t = r.shareScope;
112
+ const a = i;
113
+ if (i === a) {
114
+ if ('string' != typeof t)
115
+ return (e.errors = [{ params: { type: 'string' } }]), !1;
116
+ if (t.length < 1)
117
+ return (e.errors = [{ params: {} }]), !1;
417
118
  }
418
- var valid0 = _errs8 === errors;
119
+ c = a === i;
419
120
  }
420
- else {
421
- var valid0 = true;
422
- }
423
- if (valid0) {
424
- if (data.shareScope !== undefined) {
425
- let data2 = data.shareScope;
426
- const _errs10 = errors;
427
- if (errors === _errs10) {
428
- if (typeof data2 === 'string') {
429
- if (data2.length < 1) {
430
- validate39.errors = [
431
- {
432
- params: {},
433
- },
434
- ];
435
- return false;
436
- }
437
- }
438
- else {
439
- validate39.errors = [
440
- {
441
- params: {
442
- type: 'string',
443
- },
444
- },
445
- ];
446
- return false;
447
- }
448
- }
449
- var valid0 = _errs10 === errors;
450
- }
451
- else {
452
- var valid0 = true;
453
- }
454
- }
455
- }
121
+ else
122
+ c = !0;
456
123
  }
457
124
  }
458
125
  }
459
- else {
460
- validate39.errors = [
461
- {
462
- params: {
463
- type: 'object',
464
- },
465
- },
466
- ];
467
- return false;
468
- }
469
126
  }
470
- validate39.errors = vErrors;
471
- return errors === 0;
127
+ return (e.errors = l), 0 === i;
472
128
  }
473
- function validate38(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {
474
- let vErrors = null;
475
- let errors = 0;
476
- if (errors === 0) {
477
- if (data && typeof data == 'object' && !Array.isArray(data)) {
478
- for (const key0 in data) {
479
- let data0 = data[key0];
480
- const _errs2 = errors;
481
- const _errs3 = errors;
482
- let valid1 = false;
483
- const _errs4 = errors;
484
- if (!validate39(data0, {
485
- instancePath: instancePath +
486
- '/' +
487
- key0.replace(/~/g, '~0').replace(/\//g, '~1'),
488
- parentData: data,
489
- parentDataProperty: key0,
490
- rootData,
491
- })) {
492
- vErrors =
493
- vErrors === null
494
- ? validate39.errors
495
- : vErrors.concat(validate39.errors);
496
- errors = vErrors.length;
497
- }
498
- var _valid0 = _errs4 === errors;
499
- valid1 = valid1 || _valid0;
500
- if (!valid1) {
501
- const _errs5 = errors;
502
- const _errs6 = errors;
503
- if (errors === _errs6) {
504
- if (typeof data0 === 'string') {
505
- if (data0.length < 1) {
506
- const err0 = {
507
- params: {},
508
- };
509
- if (vErrors === null) {
510
- vErrors = [err0];
511
- }
512
- else {
513
- vErrors.push(err0);
514
- }
515
- errors++;
516
- }
517
- }
518
- else {
519
- const err1 = {
520
- params: {
521
- type: 'string',
522
- },
523
- };
524
- if (vErrors === null) {
525
- vErrors = [err1];
526
- }
527
- else {
528
- vErrors.push(err1);
529
- }
530
- errors++;
531
- }
532
- }
533
- var _valid0 = _errs5 === errors;
534
- valid1 = valid1 || _valid0;
535
- if (!valid1) {
536
- const _errs8 = errors;
537
- if (!validate40(data0, {
538
- instancePath: instancePath +
539
- '/' +
540
- key0.replace(/~/g, '~0').replace(/\//g, '~1'),
541
- parentData: data,
542
- parentDataProperty: key0,
543
- rootData,
544
- })) {
545
- vErrors =
546
- vErrors === null
547
- ? validate40.errors
548
- : vErrors.concat(validate40.errors);
549
- errors = vErrors.length;
129
+ function a(r, { instancePath: n = '', parentData: o, parentDataProperty: s, rootData: l = r, } = {}) {
130
+ let i = null, p = 0;
131
+ if (0 === p) {
132
+ if (!r || 'object' != typeof r || Array.isArray(r))
133
+ return (a.errors = [{ params: { type: 'object' } }]), !1;
134
+ for (const o in r) {
135
+ let s = r[o];
136
+ const u = p, m = p;
137
+ let f = !1;
138
+ const y = p;
139
+ e(s, {
140
+ instancePath: n + '/' + o.replace(/~/g, '~0').replace(/\//g, '~1'),
141
+ parentData: r,
142
+ parentDataProperty: o,
143
+ rootData: l,
144
+ }) || ((i = null === i ? e.errors : i.concat(e.errors)), (p = i.length));
145
+ var c = y === p;
146
+ if (((f = f || c), !f)) {
147
+ const e = p;
148
+ if (p == p)
149
+ if ('string' == typeof s) {
150
+ if (s.length < 1) {
151
+ const r = { params: {} };
152
+ null === i ? (i = [r]) : i.push(r), p++;
550
153
  }
551
- var _valid0 = _errs8 === errors;
552
- valid1 = valid1 || _valid0;
553
- }
554
- }
555
- if (!valid1) {
556
- const err2 = {
557
- params: {},
558
- };
559
- if (vErrors === null) {
560
- vErrors = [err2];
561
154
  }
562
155
  else {
563
- vErrors.push(err2);
564
- }
565
- errors++;
566
- validate38.errors = vErrors;
567
- return false;
568
- }
569
- else {
570
- errors = _errs3;
571
- if (vErrors !== null) {
572
- if (_errs3) {
573
- vErrors.length = _errs3;
574
- }
575
- else {
576
- vErrors = null;
577
- }
156
+ const r = { params: { type: 'string' } };
157
+ null === i ? (i = [r]) : i.push(r), p++;
578
158
  }
579
- }
580
- var valid0 = _errs2 === errors;
581
- if (!valid0) {
582
- break;
159
+ if (((c = e === p), (f = f || c), !f)) {
160
+ const e = p;
161
+ t(s, {
162
+ instancePath: n + '/' + o.replace(/~/g, '~0').replace(/\//g, '~1'),
163
+ parentData: r,
164
+ parentDataProperty: o,
165
+ rootData: l,
166
+ }) ||
167
+ ((i = null === i ? t.errors : i.concat(t.errors)), (p = i.length)),
168
+ (c = e === p),
169
+ (f = f || c);
583
170
  }
584
171
  }
585
- }
586
- else {
587
- validate38.errors = [
588
- {
589
- params: {
590
- type: 'object',
591
- },
592
- },
593
- ];
594
- return false;
172
+ if (!f) {
173
+ const r = { params: {} };
174
+ return null === i ? (i = [r]) : i.push(r), p++, (a.errors = i), !1;
175
+ }
176
+ if (((p = m), null !== i && (m ? (i.length = m) : (i = null)), u !== p))
177
+ break;
595
178
  }
596
179
  }
597
- validate38.errors = vErrors;
598
- return errors === 0;
180
+ return (a.errors = i), 0 === p;
599
181
  }
600
- function validate37(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {
601
- let vErrors = null;
602
- let errors = 0;
603
- const _errs0 = errors;
604
- let valid0 = false;
605
- const _errs1 = errors;
606
- if (errors === _errs1) {
607
- if (Array.isArray(data)) {
608
- var valid1 = true;
609
- const len0 = data.length;
610
- for (let i0 = 0; i0 < len0; i0++) {
611
- let data0 = data[i0];
612
- const _errs3 = errors;
613
- const _errs4 = errors;
614
- let valid2 = false;
615
- const _errs5 = errors;
616
- const _errs6 = errors;
617
- if (errors === _errs6) {
618
- if (typeof data0 === 'string') {
619
- if (data0.length < 1) {
620
- const err0 = {
621
- params: {},
622
- };
623
- if (vErrors === null) {
624
- vErrors = [err0];
625
- }
626
- else {
627
- vErrors.push(err0);
628
- }
629
- errors++;
630
- }
631
- }
632
- else {
633
- const err1 = {
634
- params: {
635
- type: 'string',
636
- },
637
- };
638
- if (vErrors === null) {
639
- vErrors = [err1];
182
+ function n(r, { instancePath: t = '', parentData: e, parentDataProperty: o, rootData: s = r, } = {}) {
183
+ let l = null, i = 0;
184
+ const p = i;
185
+ let c = !1;
186
+ const u = i;
187
+ if (i === u)
188
+ if (Array.isArray(r)) {
189
+ const e = r.length;
190
+ for (let n = 0; n < e; n++) {
191
+ let e = r[n];
192
+ const o = i, p = i;
193
+ let c = !1;
194
+ const u = i;
195
+ if (i == i)
196
+ if ('string' == typeof e) {
197
+ if (e.length < 1) {
198
+ const r = { params: {} };
199
+ null === l ? (l = [r]) : l.push(r), i++;
640
200
  }
641
- else {
642
- vErrors.push(err1);
643
- }
644
- errors++;
645
- }
646
- }
647
- var _valid1 = _errs5 === errors;
648
- valid2 = valid2 || _valid1;
649
- if (!valid2) {
650
- const _errs8 = errors;
651
- if (!validate38(data0, {
652
- instancePath: instancePath + '/' + i0,
653
- parentData: data,
654
- parentDataProperty: i0,
655
- rootData,
656
- })) {
657
- vErrors =
658
- vErrors === null
659
- ? validate38.errors
660
- : vErrors.concat(validate38.errors);
661
- errors = vErrors.length;
662
- }
663
- var _valid1 = _errs8 === errors;
664
- valid2 = valid2 || _valid1;
665
- }
666
- if (!valid2) {
667
- const err2 = {
668
- params: {},
669
- };
670
- if (vErrors === null) {
671
- vErrors = [err2];
672
201
  }
673
202
  else {
674
- vErrors.push(err2);
203
+ const r = { params: { type: 'string' } };
204
+ null === l ? (l = [r]) : l.push(r), i++;
675
205
  }
676
- errors++;
206
+ var m = u === i;
207
+ if (((c = c || m), !c)) {
208
+ const o = i;
209
+ a(e, {
210
+ instancePath: t + '/' + n,
211
+ parentData: r,
212
+ parentDataProperty: n,
213
+ rootData: s,
214
+ }) ||
215
+ ((l = null === l ? a.errors : l.concat(a.errors)), (i = l.length)),
216
+ (m = o === i),
217
+ (c = c || m);
677
218
  }
219
+ if (c)
220
+ (i = p), null !== l && (p ? (l.length = p) : (l = null));
678
221
  else {
679
- errors = _errs4;
680
- if (vErrors !== null) {
681
- if (_errs4) {
682
- vErrors.length = _errs4;
683
- }
684
- else {
685
- vErrors = null;
686
- }
687
- }
222
+ const r = { params: {} };
223
+ null === l ? (l = [r]) : l.push(r), i++;
688
224
  }
689
- var valid1 = _errs3 === errors;
690
- if (!valid1) {
225
+ if (o !== i)
691
226
  break;
692
- }
693
227
  }
694
228
  }
695
229
  else {
696
- const err3 = {
697
- params: {
698
- type: 'array',
699
- },
700
- };
701
- if (vErrors === null) {
702
- vErrors = [err3];
703
- }
704
- else {
705
- vErrors.push(err3);
706
- }
707
- errors++;
230
+ const r = { params: { type: 'array' } };
231
+ null === l ? (l = [r]) : l.push(r), i++;
708
232
  }
233
+ var f = u === i;
234
+ if (((c = c || f), !c)) {
235
+ const n = i;
236
+ a(r, {
237
+ instancePath: t,
238
+ parentData: e,
239
+ parentDataProperty: o,
240
+ rootData: s,
241
+ }) || ((l = null === l ? a.errors : l.concat(a.errors)), (i = l.length)),
242
+ (f = n === i),
243
+ (c = c || f);
709
244
  }
710
- var _valid0 = _errs1 === errors;
711
- valid0 = valid0 || _valid0;
712
- if (!valid0) {
713
- const _errs9 = errors;
714
- if (!validate38(data, {
715
- instancePath,
716
- parentData,
717
- parentDataProperty,
718
- rootData,
719
- })) {
720
- vErrors =
721
- vErrors === null
722
- ? validate38.errors
723
- : vErrors.concat(validate38.errors);
724
- errors = vErrors.length;
725
- }
726
- var _valid0 = _errs9 === errors;
727
- valid0 = valid0 || _valid0;
245
+ if (!c) {
246
+ const r = { params: {} };
247
+ return null === l ? (l = [r]) : l.push(r), i++, (n.errors = l), !1;
728
248
  }
729
- if (!valid0) {
730
- const err4 = {
731
- params: {},
732
- };
733
- if (vErrors === null) {
734
- vErrors = [err4];
735
- }
736
- else {
737
- vErrors.push(err4);
738
- }
739
- errors++;
740
- validate37.errors = vErrors;
741
- return false;
742
- }
743
- else {
744
- errors = _errs0;
745
- if (vErrors !== null) {
746
- if (_errs0) {
747
- vErrors.length = _errs0;
748
- }
749
- else {
750
- vErrors = null;
751
- }
752
- }
753
- }
754
- validate37.errors = vErrors;
755
- return errors === 0;
249
+ return ((i = p),
250
+ null !== l && (p ? (l.length = p) : (l = null)),
251
+ (n.errors = l),
252
+ 0 === i);
756
253
  }
757
- function validate36(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {
758
- /*# sourceURL="" */ let vErrors = null;
759
- let errors = 0;
760
- if (errors === 0) {
761
- if (data && typeof data == 'object' && !Array.isArray(data)) {
762
- let missing0;
763
- if ((data.remoteType === undefined && (missing0 = 'remoteType')) ||
764
- (data.remotes === undefined && (missing0 = 'remotes'))) {
765
- validate36.errors = [
766
- {
767
- params: {
768
- missingProperty: missing0,
769
- },
770
- },
771
- ];
772
- return false;
773
- }
774
- else {
775
- const _errs1 = errors;
776
- for (const key0 in data) {
777
- if (!(key0 === 'remoteType' ||
778
- key0 === 'remotes' ||
779
- key0 === 'shareScope')) {
780
- validate36.errors = [
781
- {
782
- params: {
783
- additionalProperty: key0,
784
- },
785
- },
786
- ];
787
- return false;
788
- break;
789
- }
790
- }
791
- if (_errs1 === errors) {
792
- if (data.remoteType !== undefined) {
793
- let data0 = data.remoteType;
794
- const _errs2 = errors;
795
- const _errs3 = errors;
796
- let valid1 = false;
797
- let passing0 = null;
798
- const _errs4 = errors;
799
- if (data0 !== 'var' &&
800
- data0 !== 'module' &&
801
- data0 !== 'assign' &&
802
- data0 !== 'this' &&
803
- data0 !== 'window' &&
804
- data0 !== 'self' &&
805
- data0 !== 'global' &&
806
- data0 !== 'commonjs' &&
807
- data0 !== 'commonjs2' &&
808
- data0 !== 'commonjs-module' &&
809
- data0 !== 'commonjs-static' &&
810
- data0 !== 'amd' &&
811
- data0 !== 'amd-require' &&
812
- data0 !== 'umd' &&
813
- data0 !== 'umd2' &&
814
- data0 !== 'jsonp' &&
815
- data0 !== 'system' &&
816
- data0 !== 'promise' &&
817
- data0 !== 'import' &&
818
- data0 !== 'script' &&
819
- data0 !== 'node-commonjs') {
820
- const err0 = {
821
- params: {},
822
- };
823
- if (vErrors === null) {
824
- vErrors = [err0];
825
- }
826
- else {
827
- vErrors.push(err0);
828
- }
829
- errors++;
830
- }
831
- var _valid0 = _errs4 === errors;
832
- if (_valid0) {
833
- valid1 = true;
834
- passing0 = 0;
835
- }
836
- if (!valid1) {
837
- const err1 = {
838
- params: {
839
- passingSchemas: passing0,
840
- },
841
- };
842
- if (vErrors === null) {
843
- vErrors = [err1];
844
- }
845
- else {
846
- vErrors.push(err1);
847
- }
848
- errors++;
849
- validate36.errors = vErrors;
850
- return false;
254
+ function o(t, { instancePath: e = '', parentData: a, parentDataProperty: s, rootData: l = t, } = {}) {
255
+ let i = null, p = 0;
256
+ if (0 === p) {
257
+ if (!t || 'object' != typeof t || Array.isArray(t))
258
+ return (o.errors = [{ params: { type: 'object' } }]), !1;
259
+ {
260
+ let a;
261
+ if ((void 0 === t.remoteType && (a = 'remoteType')) ||
262
+ (void 0 === t.remotes && (a = 'remotes')))
263
+ return (o.errors = [{ params: { missingProperty: a } }]), !1;
264
+ {
265
+ const a = p;
266
+ for (const r in t)
267
+ if ('remoteType' !== r && 'remotes' !== r && 'shareScope' !== r)
268
+ return (o.errors = [{ params: { additionalProperty: r } }]), !1;
269
+ if (a === p) {
270
+ if (void 0 !== t.remoteType) {
271
+ let e = t.remoteType;
272
+ const a = p, n = p;
273
+ let s = !1, l = null;
274
+ const u = p;
275
+ if ('var' !== e &&
276
+ 'module' !== e &&
277
+ 'assign' !== e &&
278
+ 'this' !== e &&
279
+ 'window' !== e &&
280
+ 'self' !== e &&
281
+ 'global' !== e &&
282
+ 'commonjs' !== e &&
283
+ 'commonjs2' !== e &&
284
+ 'commonjs-module' !== e &&
285
+ 'commonjs-static' !== e &&
286
+ 'amd' !== e &&
287
+ 'amd-require' !== e &&
288
+ 'umd' !== e &&
289
+ 'umd2' !== e &&
290
+ 'jsonp' !== e &&
291
+ 'system' !== e &&
292
+ 'promise' !== e &&
293
+ 'import' !== e &&
294
+ 'script' !== e &&
295
+ 'node-commonjs' !== e) {
296
+ const t = { params: { allowedValues: r.enum } };
297
+ null === i ? (i = [t]) : i.push(t), p++;
851
298
  }
852
- else {
853
- errors = _errs3;
854
- if (vErrors !== null) {
855
- if (_errs3) {
856
- vErrors.length = _errs3;
857
- }
858
- else {
859
- vErrors = null;
860
- }
861
- }
299
+ if ((u === p && ((s = !0), (l = 0)), !s)) {
300
+ const r = { params: { passingSchemas: l } };
301
+ return (null === i ? (i = [r]) : i.push(r), p++, (o.errors = i), !1);
862
302
  }
863
- var valid0 = _errs2 === errors;
864
- }
865
- else {
866
- var valid0 = true;
303
+ (p = n), null !== i && (n ? (i.length = n) : (i = null));
304
+ var c = a === p;
867
305
  }
868
- if (valid0) {
869
- if (data.remotes !== undefined) {
870
- const _errs6 = errors;
871
- if (!validate37(data.remotes, {
872
- instancePath: instancePath + '/remotes',
873
- parentData: data,
306
+ else
307
+ c = !0;
308
+ if (c) {
309
+ if (void 0 !== t.remotes) {
310
+ const r = p;
311
+ n(t.remotes, {
312
+ instancePath: e + '/remotes',
313
+ parentData: t,
874
314
  parentDataProperty: 'remotes',
875
- rootData,
876
- })) {
877
- vErrors =
878
- vErrors === null
879
- ? validate37.errors
880
- : vErrors.concat(validate37.errors);
881
- errors = vErrors.length;
882
- }
883
- var valid0 = _errs6 === errors;
884
- }
885
- else {
886
- var valid0 = true;
315
+ rootData: l,
316
+ }) ||
317
+ ((i = null === i ? n.errors : i.concat(n.errors)),
318
+ (p = i.length)),
319
+ (c = r === p);
887
320
  }
888
- if (valid0) {
889
- if (data.shareScope !== undefined) {
890
- let data2 = data.shareScope;
891
- const _errs7 = errors;
892
- if (errors === _errs7) {
893
- if (typeof data2 === 'string') {
894
- if (data2.length < 1) {
895
- validate36.errors = [
896
- {
897
- params: {},
898
- },
899
- ];
900
- return false;
901
- }
902
- }
903
- else {
904
- validate36.errors = [
905
- {
906
- params: {
907
- type: 'string',
908
- },
909
- },
910
- ];
911
- return false;
912
- }
321
+ else
322
+ c = !0;
323
+ if (c)
324
+ if (void 0 !== t.shareScope) {
325
+ let r = t.shareScope;
326
+ const e = p;
327
+ if (p === e) {
328
+ if ('string' != typeof r)
329
+ return (o.errors = [{ params: { type: 'string' } }]), !1;
330
+ if (r.length < 1)
331
+ return (o.errors = [{ params: {} }]), !1;
913
332
  }
914
- var valid0 = _errs7 === errors;
915
- }
916
- else {
917
- var valid0 = true;
333
+ c = e === p;
918
334
  }
919
- }
335
+ else
336
+ c = !0;
920
337
  }
921
338
  }
922
339
  }
923
340
  }
924
- else {
925
- validate36.errors = [
926
- {
927
- params: {
928
- type: 'object',
929
- },
930
- },
931
- ];
932
- return false;
933
- }
934
341
  }
935
- validate36.errors = vErrors;
936
- return errors === 0;
342
+ return (o.errors = i), 0 === p;
937
343
  }
938
- exports.default = validate36;
939
344
  //# sourceMappingURL=ContainerReferencePlugin.check.js.map