@module-federation/enhanced 0.19.0 → 0.20.0

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 (60) hide show
  1. package/README.md +1 -1
  2. package/dist/package.json +3 -2
  3. package/dist/src/declarations/plugins/sharing/ConsumeSharedModule.d.ts +1 -1
  4. package/dist/src/declarations/plugins/sharing/ConsumeSharedPlugin.d.ts +1 -1
  5. package/dist/src/declarations/plugins/sharing/ProvideSharedPlugin.d.ts +1 -1
  6. package/dist/src/declarations/plugins/sharing/SharePlugin.d.ts +1 -1
  7. package/dist/src/lib/container/ContainerEntryModule.js +1 -1
  8. package/dist/src/lib/container/ContainerEntryModule.js.map +1 -1
  9. package/dist/src/lib/container/ModuleFederationPlugin.js +2 -1
  10. package/dist/src/lib/container/ModuleFederationPlugin.js.map +1 -1
  11. package/dist/src/lib/container/RemoteRuntimeModule.js +13 -2
  12. package/dist/src/lib/container/RemoteRuntimeModule.js.map +1 -1
  13. package/dist/src/lib/container/runtime/ChildCompilationRuntimePlugin.js +5 -5
  14. package/dist/src/lib/container/runtime/ChildCompilationRuntimePlugin.js.map +1 -1
  15. package/dist/src/lib/container/runtime/FederationModulesPlugin.js +11 -2
  16. package/dist/src/lib/container/runtime/FederationModulesPlugin.js.map +1 -1
  17. package/dist/src/lib/container/runtime/FederationRuntimePlugin.js +16 -7
  18. package/dist/src/lib/container/runtime/FederationRuntimePlugin.js.map +1 -1
  19. package/dist/src/lib/container/runtime/getFederationGlobal.js +22 -3
  20. package/dist/src/lib/container/runtime/getFederationGlobal.js.map +1 -1
  21. package/dist/src/lib/container/runtime/utils.js +35 -16
  22. package/dist/src/lib/container/runtime/utils.js.map +1 -1
  23. package/dist/src/lib/sharing/ConsumeSharedPlugin.js +48 -7
  24. package/dist/src/lib/sharing/ConsumeSharedPlugin.js.map +1 -1
  25. package/dist/src/lib/sharing/ConsumeSharedRuntimeModule.js +19 -26
  26. package/dist/src/lib/sharing/ConsumeSharedRuntimeModule.js.map +1 -1
  27. package/dist/src/lib/sharing/ProvideSharedPlugin.js +4 -4
  28. package/dist/src/lib/sharing/ProvideSharedPlugin.js.map +1 -1
  29. package/dist/src/lib/sharing/SharePlugin.js +2 -2
  30. package/dist/src/lib/sharing/SharePlugin.js.map +1 -1
  31. package/dist/src/schemas/container/ContainerPlugin.check.d.ts +1 -1
  32. package/dist/src/schemas/container/ContainerPlugin.check.js +175 -97
  33. package/dist/src/schemas/container/ContainerPlugin.check.js.map +1 -1
  34. package/dist/src/schemas/container/ContainerPlugin.d.ts +12 -1
  35. package/dist/src/schemas/container/ContainerPlugin.js +18 -1
  36. package/dist/src/schemas/container/ContainerPlugin.js.map +1 -1
  37. package/dist/src/schemas/container/ModuleFederationPlugin.check.js +1925 -1095
  38. package/dist/src/schemas/container/ModuleFederationPlugin.check.js.map +1 -1
  39. package/dist/src/schemas/container/ModuleFederationPlugin.d.ts +105 -5
  40. package/dist/src/schemas/container/ModuleFederationPlugin.js +126 -5
  41. package/dist/src/schemas/container/ModuleFederationPlugin.js.map +1 -1
  42. package/dist/src/schemas/sharing/ConsumeSharedPlugin.check.js +6 -6
  43. package/dist/src/schemas/sharing/ConsumeSharedPlugin.check.js.map +1 -1
  44. package/dist/src/schemas/sharing/ConsumeSharedPlugin.d.ts +2 -2
  45. package/dist/src/schemas/sharing/ConsumeSharedPlugin.js +2 -2
  46. package/dist/src/schemas/sharing/ConsumeSharedPlugin.js.map +1 -1
  47. package/dist/src/schemas/sharing/ProvideSharedPlugin.check.d.ts +1 -1
  48. package/dist/src/schemas/sharing/ProvideSharedPlugin.check.js +79 -79
  49. package/dist/src/schemas/sharing/ProvideSharedPlugin.check.js.map +1 -1
  50. package/dist/src/schemas/sharing/ProvideSharedPlugin.d.ts +2 -2
  51. package/dist/src/schemas/sharing/ProvideSharedPlugin.js +2 -2
  52. package/dist/src/schemas/sharing/ProvideSharedPlugin.js.map +1 -1
  53. package/dist/src/schemas/sharing/SharePlugin.check.d.ts +3 -3
  54. package/dist/src/schemas/sharing/SharePlugin.check.js +97 -98
  55. package/dist/src/schemas/sharing/SharePlugin.check.js.map +1 -1
  56. package/dist/src/schemas/sharing/SharePlugin.d.ts +2 -2
  57. package/dist/src/schemas/sharing/SharePlugin.js +2 -2
  58. package/dist/src/schemas/sharing/SharePlugin.js.map +1 -1
  59. package/dist/src/types/runtime.d.ts +4 -1
  60. package/package.json +14 -13
@@ -172,7 +172,20 @@ const e = {
172
172
  },
173
173
  },
174
174
  dataPrefetch: { type: 'boolean' },
175
- runtimePlugins: { type: 'array', items: { type: 'string' } },
175
+ runtimePlugins: {
176
+ type: 'array',
177
+ items: {
178
+ anyOf: [
179
+ { type: 'string' },
180
+ {
181
+ type: 'array',
182
+ items: [{ type: 'string' }, { type: 'object' }],
183
+ minItems: 2,
184
+ maxItems: 2,
185
+ },
186
+ ],
187
+ },
188
+ },
176
189
  },
177
190
  required: ['name', 'exposes'],
178
191
  }, r = { anyOf: [{ enum: [!1] }, { type: 'string', minLength: 1 }] }, n = Object.prototype.hasOwnProperty;
@@ -195,8 +208,8 @@ function s(t, { instancePath: e = '', parentData: r, parentDataProperty: n, root
195
208
  return (s.errors = null), !0;
196
209
  }
197
210
  function a(t, { instancePath: e = '', parentData: r, parentDataProperty: n, rootData: o = t, } = {}) {
198
- let i = null, p = 0;
199
- if (0 === p) {
211
+ let i = null, l = 0;
212
+ if (0 === l) {
200
213
  if (!t || 'object' != typeof t || Array.isArray(t))
201
214
  return (a.errors = [{ params: { type: 'object' } }]), !1;
202
215
  {
@@ -204,30 +217,30 @@ function a(t, { instancePath: e = '', parentData: r, parentDataProperty: n, root
204
217
  if (void 0 === t.import && (r = 'import'))
205
218
  return (a.errors = [{ params: { missingProperty: r } }]), !1;
206
219
  {
207
- const r = p;
220
+ const r = l;
208
221
  for (const e in t)
209
222
  if ('import' !== e && 'name' !== e)
210
223
  return (a.errors = [{ params: { additionalProperty: e } }]), !1;
211
- if (r === p) {
224
+ if (r === l) {
212
225
  if (void 0 !== t.import) {
213
226
  let r = t.import;
214
- const n = p, m = p;
227
+ const n = l, m = l;
215
228
  let u = !1;
216
- const c = p;
217
- if (p == p)
229
+ const c = l;
230
+ if (l == l)
218
231
  if ('string' == typeof r) {
219
232
  if (r.length < 1) {
220
233
  const t = { params: {} };
221
- null === i ? (i = [t]) : i.push(t), p++;
234
+ null === i ? (i = [t]) : i.push(t), l++;
222
235
  }
223
236
  }
224
237
  else {
225
238
  const t = { params: { type: 'string' } };
226
- null === i ? (i = [t]) : i.push(t), p++;
239
+ null === i ? (i = [t]) : i.push(t), l++;
227
240
  }
228
- var l = c === p;
229
- if (((u = u || l), !u)) {
230
- const n = p;
241
+ var p = c === l;
242
+ if (((u = u || p), !u)) {
243
+ const n = l;
231
244
  s(r, {
232
245
  instancePath: e + '/import',
233
246
  parentData: t,
@@ -235,25 +248,25 @@ function a(t, { instancePath: e = '', parentData: r, parentDataProperty: n, root
235
248
  rootData: o,
236
249
  }) ||
237
250
  ((i = null === i ? s.errors : i.concat(s.errors)),
238
- (p = i.length)),
239
- (l = n === p),
240
- (u = u || l);
251
+ (l = i.length)),
252
+ (p = n === l),
253
+ (u = u || p);
241
254
  }
242
255
  if (!u) {
243
256
  const t = { params: {} };
244
- return (null === i ? (i = [t]) : i.push(t), p++, (a.errors = i), !1);
257
+ return (null === i ? (i = [t]) : i.push(t), l++, (a.errors = i), !1);
245
258
  }
246
- (p = m), null !== i && (m ? (i.length = m) : (i = null));
247
- var f = n === p;
259
+ (l = m), null !== i && (m ? (i.length = m) : (i = null));
260
+ var f = n === l;
248
261
  }
249
262
  else
250
263
  f = !0;
251
264
  if (f)
252
265
  if (void 0 !== t.name) {
253
- const e = p;
266
+ const e = l;
254
267
  if ('string' != typeof t.name)
255
268
  return (a.errors = [{ params: { type: 'string' } }]), !1;
256
- f = e === p;
269
+ f = e === l;
257
270
  }
258
271
  else
259
272
  f = !0;
@@ -261,134 +274,134 @@ function a(t, { instancePath: e = '', parentData: r, parentDataProperty: n, root
261
274
  }
262
275
  }
263
276
  }
264
- return (a.errors = i), 0 === p;
277
+ return (a.errors = i), 0 === l;
265
278
  }
266
279
  function o(t, { instancePath: e = '', parentData: r, parentDataProperty: n, rootData: i = t, } = {}) {
267
- let p = null, l = 0;
268
- if (0 === l) {
280
+ let l = null, p = 0;
281
+ if (0 === p) {
269
282
  if (!t || 'object' != typeof t || Array.isArray(t))
270
283
  return (o.errors = [{ params: { type: 'object' } }]), !1;
271
284
  for (const r in t) {
272
285
  let n = t[r];
273
- const m = l, u = l;
286
+ const m = p, u = p;
274
287
  let c = !1;
275
- const y = l;
288
+ const y = p;
276
289
  a(n, {
277
290
  instancePath: e + '/' + r.replace(/~/g, '~0').replace(/\//g, '~1'),
278
291
  parentData: t,
279
292
  parentDataProperty: r,
280
293
  rootData: i,
281
- }) || ((p = null === p ? a.errors : p.concat(a.errors)), (l = p.length));
282
- var f = y === l;
294
+ }) || ((l = null === l ? a.errors : l.concat(a.errors)), (p = l.length));
295
+ var f = y === p;
283
296
  if (((c = c || f), !c)) {
284
- const a = l;
285
- if (l == l)
297
+ const a = p;
298
+ if (p == p)
286
299
  if ('string' == typeof n) {
287
300
  if (n.length < 1) {
288
301
  const t = { params: {} };
289
- null === p ? (p = [t]) : p.push(t), l++;
302
+ null === l ? (l = [t]) : l.push(t), p++;
290
303
  }
291
304
  }
292
305
  else {
293
306
  const t = { params: { type: 'string' } };
294
- null === p ? (p = [t]) : p.push(t), l++;
307
+ null === l ? (l = [t]) : l.push(t), p++;
295
308
  }
296
- if (((f = a === l), (c = c || f), !c)) {
297
- const a = l;
309
+ if (((f = a === p), (c = c || f), !c)) {
310
+ const a = p;
298
311
  s(n, {
299
312
  instancePath: e + '/' + r.replace(/~/g, '~0').replace(/\//g, '~1'),
300
313
  parentData: t,
301
314
  parentDataProperty: r,
302
315
  rootData: i,
303
316
  }) ||
304
- ((p = null === p ? s.errors : p.concat(s.errors)), (l = p.length)),
305
- (f = a === l),
317
+ ((l = null === l ? s.errors : l.concat(s.errors)), (p = l.length)),
318
+ (f = a === p),
306
319
  (c = c || f);
307
320
  }
308
321
  }
309
322
  if (!c) {
310
323
  const t = { params: {} };
311
- return null === p ? (p = [t]) : p.push(t), l++, (o.errors = p), !1;
324
+ return null === l ? (l = [t]) : l.push(t), p++, (o.errors = l), !1;
312
325
  }
313
- if (((l = u), null !== p && (u ? (p.length = u) : (p = null)), m !== l))
326
+ if (((p = u), null !== l && (u ? (l.length = u) : (l = null)), m !== p))
314
327
  break;
315
328
  }
316
329
  }
317
- return (o.errors = p), 0 === l;
330
+ return (o.errors = l), 0 === p;
318
331
  }
319
332
  function i(t, { instancePath: e = '', parentData: r, parentDataProperty: n, rootData: s = t, } = {}) {
320
- let a = null, p = 0;
321
- const l = p;
333
+ let a = null, l = 0;
334
+ const p = l;
322
335
  let f = !1;
323
- const m = p;
324
- if (p === m)
336
+ const m = l;
337
+ if (l === m)
325
338
  if (Array.isArray(t)) {
326
339
  const r = t.length;
327
340
  for (let n = 0; n < r; n++) {
328
341
  let r = t[n];
329
- const i = p, l = p;
342
+ const i = l, p = l;
330
343
  let f = !1;
331
- const m = p;
332
- if (p == p)
344
+ const m = l;
345
+ if (l == l)
333
346
  if ('string' == typeof r) {
334
347
  if (r.length < 1) {
335
348
  const t = { params: {} };
336
- null === a ? (a = [t]) : a.push(t), p++;
349
+ null === a ? (a = [t]) : a.push(t), l++;
337
350
  }
338
351
  }
339
352
  else {
340
353
  const t = { params: { type: 'string' } };
341
- null === a ? (a = [t]) : a.push(t), p++;
354
+ null === a ? (a = [t]) : a.push(t), l++;
342
355
  }
343
- var u = m === p;
356
+ var u = m === l;
344
357
  if (((f = f || u), !f)) {
345
- const i = p;
358
+ const i = l;
346
359
  o(r, {
347
360
  instancePath: e + '/' + n,
348
361
  parentData: t,
349
362
  parentDataProperty: n,
350
363
  rootData: s,
351
364
  }) ||
352
- ((a = null === a ? o.errors : a.concat(o.errors)), (p = a.length)),
353
- (u = i === p),
365
+ ((a = null === a ? o.errors : a.concat(o.errors)), (l = a.length)),
366
+ (u = i === l),
354
367
  (f = f || u);
355
368
  }
356
369
  if (f)
357
- (p = l), null !== a && (l ? (a.length = l) : (a = null));
370
+ (l = p), null !== a && (p ? (a.length = p) : (a = null));
358
371
  else {
359
372
  const t = { params: {} };
360
- null === a ? (a = [t]) : a.push(t), p++;
373
+ null === a ? (a = [t]) : a.push(t), l++;
361
374
  }
362
- if (i !== p)
375
+ if (i !== l)
363
376
  break;
364
377
  }
365
378
  }
366
379
  else {
367
380
  const t = { params: { type: 'array' } };
368
- null === a ? (a = [t]) : a.push(t), p++;
381
+ null === a ? (a = [t]) : a.push(t), l++;
369
382
  }
370
- var c = m === p;
383
+ var c = m === l;
371
384
  if (((f = f || c), !f)) {
372
- const i = p;
385
+ const i = l;
373
386
  o(t, {
374
387
  instancePath: e,
375
388
  parentData: r,
376
389
  parentDataProperty: n,
377
390
  rootData: s,
378
- }) || ((a = null === a ? o.errors : a.concat(o.errors)), (p = a.length)),
379
- (c = i === p),
391
+ }) || ((a = null === a ? o.errors : a.concat(o.errors)), (l = a.length)),
392
+ (c = i === l),
380
393
  (f = f || c);
381
394
  }
382
395
  if (!f) {
383
396
  const t = { params: {} };
384
- return null === a ? (a = [t]) : a.push(t), p++, (i.errors = a), !1;
397
+ return null === a ? (a = [t]) : a.push(t), l++, (i.errors = a), !1;
385
398
  }
386
- return ((p = l),
387
- null !== a && (l ? (a.length = l) : (a = null)),
399
+ return ((l = p),
400
+ null !== a && (p ? (a.length = p) : (a = null)),
388
401
  (i.errors = a),
389
- 0 === p);
402
+ 0 === l);
390
403
  }
391
- const p = {
404
+ const l = {
392
405
  anyOf: [
393
406
  {
394
407
  enum: [
@@ -415,17 +428,17 @@ const p = {
415
428
  { type: 'string' },
416
429
  ],
417
430
  };
418
- function l(t, { instancePath: e = '', parentData: r, parentDataProperty: n, rootData: s = t, } = {}) {
431
+ function p(t, { instancePath: e = '', parentData: r, parentDataProperty: n, rootData: s = t, } = {}) {
419
432
  let a = null, o = 0;
420
433
  const i = o;
421
- let p = !1;
434
+ let l = !1;
422
435
  const f = o;
423
436
  if ('string' != typeof t) {
424
437
  const t = { params: { type: 'string' } };
425
438
  null === a ? (a = [t]) : a.push(t), o++;
426
439
  }
427
440
  var m = f === o;
428
- if (((p = p || m), !p)) {
441
+ if (((l = l || m), !l)) {
429
442
  const e = o;
430
443
  if (o == o)
431
444
  if (t && 'object' == typeof t && !Array.isArray(t)) {
@@ -491,23 +504,23 @@ function l(t, { instancePath: e = '', parentData: r, parentDataProperty: n, root
491
504
  const t = { params: { type: 'object' } };
492
505
  null === a ? (a = [t]) : a.push(t), o++;
493
506
  }
494
- (m = e === o), (p = p || m);
507
+ (m = e === o), (l = l || m);
495
508
  }
496
- if (!p) {
509
+ if (!l) {
497
510
  const t = { params: {} };
498
- return null === a ? (a = [t]) : a.push(t), o++, (l.errors = a), !1;
511
+ return null === a ? (a = [t]) : a.push(t), o++, (p.errors = a), !1;
499
512
  }
500
513
  return ((o = i),
501
514
  null !== a && (i ? (a.length = i) : (a = null)),
502
- (l.errors = a),
515
+ (p.errors = a),
503
516
  0 === o);
504
517
  }
505
518
  function f(t, { instancePath: e = '', parentData: r, parentDataProperty: n, rootData: s = t, } = {}) {
506
519
  let a = null, o = 0;
507
520
  const i = o;
508
- let p = !1;
509
- const l = o;
510
- if (o === l)
521
+ let l = !1;
522
+ const p = o;
523
+ if (o === p)
511
524
  if (Array.isArray(t))
512
525
  if (t.length < 1) {
513
526
  const t = { params: { limit: 1 } };
@@ -537,8 +550,8 @@ function f(t, { instancePath: e = '', parentData: r, parentDataProperty: n, root
537
550
  const t = { params: { type: 'array' } };
538
551
  null === a ? (a = [t]) : a.push(t), o++;
539
552
  }
540
- var m = l === o;
541
- if (((p = p || m), !p)) {
553
+ var m = p === o;
554
+ if (((l = l || m), !l)) {
542
555
  const e = o;
543
556
  if (o === e)
544
557
  if ('string' == typeof t) {
@@ -551,7 +564,7 @@ function f(t, { instancePath: e = '', parentData: r, parentDataProperty: n, root
551
564
  const t = { params: { type: 'string' } };
552
565
  null === a ? (a = [t]) : a.push(t), o++;
553
566
  }
554
- if (((m = e === o), (p = p || m), !p)) {
567
+ if (((m = e === o), (l = l || m), !l)) {
555
568
  const e = o;
556
569
  if (o == o)
557
570
  if (t && 'object' == typeof t && !Array.isArray(t)) {
@@ -664,10 +677,10 @@ function f(t, { instancePath: e = '', parentData: r, parentDataProperty: n, root
664
677
  const t = { params: { type: 'object' } };
665
678
  null === a ? (a = [t]) : a.push(t), o++;
666
679
  }
667
- (m = e === o), (p = p || m);
680
+ (m = e === o), (l = l || m);
668
681
  }
669
682
  }
670
- if (!p) {
683
+ if (!l) {
671
684
  const t = { params: {} };
672
685
  return null === a ? (a = [t]) : a.push(t), o++, (f.errors = a), !1;
673
686
  }
@@ -712,13 +725,13 @@ function m(t, { instancePath: e = '', parentData: r, parentDataProperty: n, root
712
725
  if (i) {
713
726
  if (void 0 !== t.auxiliaryComment) {
714
727
  const r = o;
715
- l(t.auxiliaryComment, {
728
+ p(t.auxiliaryComment, {
716
729
  instancePath: e + '/auxiliaryComment',
717
730
  parentData: t,
718
731
  parentDataProperty: 'auxiliaryComment',
719
732
  rootData: s,
720
733
  }) ||
721
- ((a = null === a ? l.errors : a.concat(l.errors)),
734
+ ((a = null === a ? p.errors : a.concat(p.errors)),
722
735
  (o = a.length)),
723
736
  (i = r === o);
724
737
  }
@@ -729,8 +742,8 @@ function m(t, { instancePath: e = '', parentData: r, parentDataProperty: n, root
729
742
  let e = t.export;
730
743
  const r = o, n = o;
731
744
  let s = !1;
732
- const p = o;
733
- if (o === p)
745
+ const l = o;
746
+ if (o === l)
734
747
  if (Array.isArray(e)) {
735
748
  const t = e.length;
736
749
  for (let r = 0; r < t; r++) {
@@ -755,7 +768,7 @@ function m(t, { instancePath: e = '', parentData: r, parentDataProperty: n, root
755
768
  const t = { params: { type: 'array' } };
756
769
  null === a ? (a = [t]) : a.push(t), o++;
757
770
  }
758
- var u = p === o;
771
+ var u = l === o;
759
772
  if (((s = s || u), !s)) {
760
773
  const t = o;
761
774
  if (o === t)
@@ -801,7 +814,7 @@ function m(t, { instancePath: e = '', parentData: r, parentDataProperty: n, root
801
814
  let e = t.type;
802
815
  const r = o, n = o;
803
816
  let s = !1;
804
- const l = o;
817
+ const p = o;
805
818
  if ('var' !== e &&
806
819
  'module' !== e &&
807
820
  'assign' !== e &&
@@ -820,10 +833,10 @@ function m(t, { instancePath: e = '', parentData: r, parentDataProperty: n, root
820
833
  'umd2' !== e &&
821
834
  'jsonp' !== e &&
822
835
  'system' !== e) {
823
- const t = { params: { allowedValues: p.anyOf[0].enum } };
836
+ const t = { params: { allowedValues: l.anyOf[0].enum } };
824
837
  null === a ? (a = [t]) : a.push(t), o++;
825
838
  }
826
- var c = l === o;
839
+ var c = p === o;
827
840
  if (((s = s || c), !s)) {
828
841
  const t = o;
829
842
  if ('string' != typeof e) {
@@ -864,7 +877,7 @@ function m(t, { instancePath: e = '', parentData: r, parentDataProperty: n, root
864
877
  }
865
878
  return (m.errors = a), 0 === o;
866
879
  }
867
- function u(s, { instancePath: a = '', parentData: o, parentDataProperty: p, rootData: l = s, } = {}) {
880
+ function u(s, { instancePath: a = '', parentData: o, parentDataProperty: l, rootData: p = s, } = {}) {
868
881
  let f = null, c = 0;
869
882
  if (0 === c) {
870
883
  if (!s || 'object' != typeof s || Array.isArray(s))
@@ -886,7 +899,7 @@ function u(s, { instancePath: a = '', parentData: o, parentDataProperty: p, root
886
899
  instancePath: a + '/exposes',
887
900
  parentData: s,
888
901
  parentDataProperty: 'exposes',
889
- rootData: l,
902
+ rootData: p,
890
903
  }) ||
891
904
  ((f = null === f ? i.errors : f.concat(i.errors)),
892
905
  (c = f.length));
@@ -917,7 +930,7 @@ function u(s, { instancePath: a = '', parentData: o, parentDataProperty: p, root
917
930
  instancePath: a + '/library',
918
931
  parentData: s,
919
932
  parentDataProperty: 'library',
920
- rootData: l,
933
+ rootData: p,
921
934
  }) ||
922
935
  ((f = null === f ? m.errors : f.concat(m.errors)),
923
936
  (c = f.length)),
@@ -1120,13 +1133,78 @@ function u(s, { instancePath: a = '', parentData: o, parentDataProperty: p, root
1120
1133
  {
1121
1134
  const e = t.length;
1122
1135
  for (let r = 0; r < e; r++) {
1123
- const e = c;
1124
- if ('string' != typeof t[r])
1125
- return ((u.errors = [
1126
- { params: { type: 'string' } },
1127
- ]),
1136
+ let e = t[r];
1137
+ const n = c, s = c;
1138
+ let a = !1;
1139
+ const o = c;
1140
+ if ('string' != typeof e) {
1141
+ const t = { params: { type: 'string' } };
1142
+ null === f ? (f = [t]) : f.push(t), c++;
1143
+ }
1144
+ var b = o === c;
1145
+ if (((a = a || b), !a)) {
1146
+ const t = c;
1147
+ if (c === t)
1148
+ if (Array.isArray(e))
1149
+ if (e.length > 2) {
1150
+ const t = { params: { limit: 2 } };
1151
+ null === f ? (f = [t]) : f.push(t),
1152
+ c++;
1153
+ }
1154
+ else if (e.length < 2) {
1155
+ const t = { params: { limit: 2 } };
1156
+ null === f ? (f = [t]) : f.push(t),
1157
+ c++;
1158
+ }
1159
+ else {
1160
+ const t = e.length;
1161
+ if (t > 0) {
1162
+ const t = c;
1163
+ if ('string' != typeof e[0]) {
1164
+ const t = {
1165
+ params: { type: 'string' },
1166
+ };
1167
+ null === f
1168
+ ? (f = [t])
1169
+ : f.push(t),
1170
+ c++;
1171
+ }
1172
+ var j = t === c;
1173
+ }
1174
+ if (j && t > 1) {
1175
+ let t = e[1];
1176
+ const r = c;
1177
+ if (!t ||
1178
+ 'object' != typeof t ||
1179
+ Array.isArray(t)) {
1180
+ const t = {
1181
+ params: { type: 'object' },
1182
+ };
1183
+ null === f
1184
+ ? (f = [t])
1185
+ : f.push(t),
1186
+ c++;
1187
+ }
1188
+ j = r === c;
1189
+ }
1190
+ }
1191
+ else {
1192
+ const t = { params: { type: 'array' } };
1193
+ null === f ? (f = [t]) : f.push(t), c++;
1194
+ }
1195
+ (b = t === c), (a = a || b);
1196
+ }
1197
+ if (!a) {
1198
+ const t = { params: {} };
1199
+ return (null === f ? (f = [t]) : f.push(t),
1200
+ c++,
1201
+ (u.errors = f),
1128
1202
  !1);
1129
- if (e !== c)
1203
+ }
1204
+ if (((c = s),
1205
+ null !== f &&
1206
+ (s ? (f.length = s) : (f = null)),
1207
+ n !== c))
1130
1208
  break;
1131
1209
  }
1132
1210
  }