@module-federation/enhanced 0.11.4 → 0.13.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 (95) hide show
  1. package/dist/package.json +4 -3
  2. package/dist/src/declarations/plugins/sharing/ConsumeSharedModule.d.ts +53 -0
  3. package/dist/src/declarations/plugins/sharing/ConsumeSharedPlugin.d.ts +14 -2
  4. package/dist/src/declarations/plugins/sharing/ProvideSharedPlugin.d.ts +10 -2
  5. package/dist/src/declarations/plugins/sharing/SharePlugin.d.ts +14 -2
  6. package/dist/src/lib/container/ContainerEntryDependency.d.ts +3 -3
  7. package/dist/src/lib/container/ContainerEntryDependency.js +1 -1
  8. package/dist/src/lib/container/ContainerEntryDependency.js.map +1 -1
  9. package/dist/src/lib/container/ContainerEntryModule.d.ts +2 -2
  10. package/dist/src/lib/container/ContainerEntryModule.js +5 -2
  11. package/dist/src/lib/container/ContainerEntryModule.js.map +1 -1
  12. package/dist/src/lib/container/ContainerReferencePlugin.js +1 -1
  13. package/dist/src/lib/container/ContainerReferencePlugin.js.map +1 -1
  14. package/dist/src/lib/container/ModuleFederationPlugin.js +11 -5
  15. package/dist/src/lib/container/ModuleFederationPlugin.js.map +1 -1
  16. package/dist/src/lib/container/RemoteModule.d.ts +3 -3
  17. package/dist/src/lib/container/RemoteModule.js +5 -2
  18. package/dist/src/lib/container/RemoteModule.js.map +1 -1
  19. package/dist/src/lib/container/runtime/FederationRuntimePlugin.js +5 -5
  20. package/dist/src/lib/container/runtime/FederationRuntimePlugin.js.map +1 -1
  21. package/dist/src/lib/sharing/ConsumeSharedModule.d.ts +1 -38
  22. package/dist/src/lib/sharing/ConsumeSharedModule.js +25 -15
  23. package/dist/src/lib/sharing/ConsumeSharedModule.js.map +1 -1
  24. package/dist/src/lib/sharing/ConsumeSharedPlugin.js +64 -41
  25. package/dist/src/lib/sharing/ConsumeSharedPlugin.js.map +1 -1
  26. package/dist/src/lib/sharing/ConsumeSharedRuntimeModule.js +3 -1
  27. package/dist/src/lib/sharing/ConsumeSharedRuntimeModule.js.map +1 -1
  28. package/dist/src/lib/sharing/ProvideSharedDependency.d.ts +5 -3
  29. package/dist/src/lib/sharing/ProvideSharedDependency.js +12 -6
  30. package/dist/src/lib/sharing/ProvideSharedDependency.js.map +1 -1
  31. package/dist/src/lib/sharing/ProvideSharedModule.d.ts +3 -2
  32. package/dist/src/lib/sharing/ProvideSharedModule.js +10 -12
  33. package/dist/src/lib/sharing/ProvideSharedModule.js.map +1 -1
  34. package/dist/src/lib/sharing/ProvideSharedModuleFactory.js +1 -3
  35. package/dist/src/lib/sharing/ProvideSharedModuleFactory.js.map +1 -1
  36. package/dist/src/lib/sharing/ProvideSharedPlugin.d.ts +2 -10
  37. package/dist/src/lib/sharing/ProvideSharedPlugin.js +65 -43
  38. package/dist/src/lib/sharing/ProvideSharedPlugin.js.map +1 -1
  39. package/dist/src/lib/sharing/SharePlugin.d.ts +2 -3
  40. package/dist/src/lib/sharing/SharePlugin.js +8 -5
  41. package/dist/src/lib/sharing/SharePlugin.js.map +1 -1
  42. package/dist/src/lib/sharing/ShareRuntimeModule.js +9 -7
  43. package/dist/src/lib/sharing/ShareRuntimeModule.js.map +1 -1
  44. package/dist/src/lib/sharing/resolveMatchedConfigs.d.ts +2 -1
  45. package/dist/src/lib/sharing/resolveMatchedConfigs.js +33 -16
  46. package/dist/src/lib/sharing/resolveMatchedConfigs.js.map +1 -1
  47. package/dist/src/lib/sharing/utils.d.ts +3 -2
  48. package/dist/src/lib/sharing/utils.js +2 -1
  49. package/dist/src/lib/sharing/utils.js.map +1 -1
  50. package/dist/src/schemas/container/ContainerPlugin.check.d.ts +3 -3
  51. package/dist/src/schemas/container/ContainerPlugin.check.js +333 -290
  52. package/dist/src/schemas/container/ContainerPlugin.check.js.map +1 -1
  53. package/dist/src/schemas/container/ContainerPlugin.d.ts +31 -18
  54. package/dist/src/schemas/container/ContainerPlugin.js +34 -21
  55. package/dist/src/schemas/container/ContainerPlugin.js.map +1 -1
  56. package/dist/src/schemas/container/ContainerReferencePlugin.check.d.ts +3 -3
  57. package/dist/src/schemas/container/ContainerReferencePlugin.check.js +293 -188
  58. package/dist/src/schemas/container/ContainerReferencePlugin.check.js.map +1 -1
  59. package/dist/src/schemas/container/ContainerReferencePlugin.d.ts +25 -5
  60. package/dist/src/schemas/container/ContainerReferencePlugin.js +31 -4
  61. package/dist/src/schemas/container/ContainerReferencePlugin.js.map +1 -1
  62. package/dist/src/schemas/container/ExternalsType.check.js +2 -2
  63. package/dist/src/schemas/container/ExternalsType.check.js.map +1 -1
  64. package/dist/src/schemas/container/ModuleFederationPlugin.check.js +1464 -1282
  65. package/dist/src/schemas/container/ModuleFederationPlugin.check.js.map +1 -1
  66. package/dist/src/schemas/container/ModuleFederationPlugin.d.ts +130 -78
  67. package/dist/src/schemas/container/ModuleFederationPlugin.js +144 -83
  68. package/dist/src/schemas/container/ModuleFederationPlugin.js.map +1 -1
  69. package/dist/src/schemas/sharing/ConsumeSharedPlugin.check.d.ts +3 -3
  70. package/dist/src/schemas/sharing/ConsumeSharedPlugin.check.js +302 -160
  71. package/dist/src/schemas/sharing/ConsumeSharedPlugin.check.js.map +1 -1
  72. package/dist/src/schemas/sharing/ConsumeSharedPlugin.d.ts +33 -2
  73. package/dist/src/schemas/sharing/ConsumeSharedPlugin.js +39 -2
  74. package/dist/src/schemas/sharing/ConsumeSharedPlugin.js.map +1 -1
  75. package/dist/src/schemas/sharing/ProvideSharedPlugin.check.d.ts +1 -1
  76. package/dist/src/schemas/sharing/ProvideSharedPlugin.check.js +374 -164
  77. package/dist/src/schemas/sharing/ProvideSharedPlugin.check.js.map +1 -1
  78. package/dist/src/schemas/sharing/ProvideSharedPlugin.d.ts +51 -2
  79. package/dist/src/schemas/sharing/ProvideSharedPlugin.js +60 -2
  80. package/dist/src/schemas/sharing/ProvideSharedPlugin.js.map +1 -1
  81. package/dist/src/schemas/sharing/ProviderSharedPlugin.check.js +148 -94
  82. package/dist/src/schemas/sharing/ProviderSharedPlugin.check.js.map +1 -1
  83. package/dist/src/schemas/sharing/ProviderSharedPlugin.d.ts +10 -0
  84. package/dist/src/schemas/sharing/ProviderSharedPlugin.js +10 -1
  85. package/dist/src/schemas/sharing/ProviderSharedPlugin.js.map +1 -1
  86. package/dist/src/schemas/sharing/SharePlugin.check.d.ts +3 -3
  87. package/dist/src/schemas/sharing/SharePlugin.check.js +239 -135
  88. package/dist/src/schemas/sharing/SharePlugin.check.js.map +1 -1
  89. package/dist/src/schemas/sharing/SharePlugin.d.ts +24 -4
  90. package/dist/src/schemas/sharing/SharePlugin.js +30 -4
  91. package/dist/src/schemas/sharing/SharePlugin.js.map +1 -1
  92. package/dist/src/utils.d.ts +9 -0
  93. package/dist/src/utils.js +31 -0
  94. package/dist/src/utils.js.map +1 -0
  95. package/package.json +15 -14
@@ -9,266 +9,476 @@ exports.validate = void 0;
9
9
  */
10
10
  exports.validate = n;
11
11
  exports.default = n;
12
- const r = {
12
+ const e = {
13
13
  type: 'object',
14
14
  additionalProperties: !1,
15
15
  properties: {
16
16
  eager: { type: 'boolean' },
17
17
  shareKey: { type: 'string', minLength: 1 },
18
- shareScope: { type: 'string', minLength: 1 },
18
+ request: { type: 'string', minLength: 1 },
19
+ shareScope: {
20
+ anyOf: [
21
+ { type: 'string', minLength: 1 },
22
+ { type: 'array', items: { type: 'string', minLength: 1 } },
23
+ ],
24
+ },
25
+ requiredVersion: { anyOf: [{ enum: [!1] }, { type: 'string' }] },
26
+ strictVersion: { type: 'boolean' },
27
+ singleton: { type: 'boolean' },
28
+ layer: { type: 'string', minLength: 1 },
29
+ issuerLayer: { type: 'string', minLength: 1 },
19
30
  version: { anyOf: [{ enum: [!1] }, { type: 'string' }] },
20
31
  },
21
- };
22
- function e(t, { instancePath: n = '', parentData: s, parentDataProperty: a, rootData: o = t, } = {}) {
23
- let l = null, i = 0;
24
- if (0 === i) {
25
- if (!t || 'object' != typeof t || Array.isArray(t))
26
- return (e.errors = [{ params: { type: 'object' } }]), !1;
27
- for (const n in t) {
28
- let s = t[n];
29
- const a = i, o = i;
30
- let u = !1;
31
- const h = i;
32
- if (i == i)
33
- if (s && 'object' == typeof s && !Array.isArray(s)) {
34
- const e = i;
35
- for (const r in s)
36
- if ('eager' !== r &&
37
- 'shareKey' !== r &&
38
- 'shareScope' !== r &&
39
- 'version' !== r) {
40
- const e = { params: { additionalProperty: r } };
41
- null === l ? (l = [e]) : l.push(e), i++;
32
+ }, t = Object.prototype.hasOwnProperty;
33
+ function s(r, { instancePath: n = '', parentData: a, parentDataProperty: o, rootData: l = r, } = {}) {
34
+ let i = null, p = 0;
35
+ if (0 === p) {
36
+ if (!r || 'object' != typeof r || Array.isArray(r))
37
+ return (s.errors = [{ params: { type: 'object' } }]), !1;
38
+ for (const n in r) {
39
+ let a = r[n];
40
+ const o = p, l = p;
41
+ let g = !1;
42
+ const m = p;
43
+ if (p == p)
44
+ if (a && 'object' == typeof a && !Array.isArray(a)) {
45
+ const s = p;
46
+ for (const s in a)
47
+ if (!t.call(e.properties, s)) {
48
+ const e = { params: { additionalProperty: s } };
49
+ null === i ? (i = [e]) : i.push(e), p++;
42
50
  break;
43
51
  }
44
- if (e === i) {
45
- if (void 0 !== s.eager) {
46
- const r = i;
47
- if ('boolean' != typeof s.eager) {
48
- const r = { params: { type: 'boolean' } };
49
- null === l ? (l = [r]) : l.push(r), i++;
52
+ if (s === p) {
53
+ if (void 0 !== a.eager) {
54
+ const e = p;
55
+ if ('boolean' != typeof a.eager) {
56
+ const e = { params: { type: 'boolean' } };
57
+ null === i ? (i = [e]) : i.push(e), p++;
50
58
  }
51
- var p = r === i;
59
+ var u = e === p;
52
60
  }
53
61
  else
54
- p = !0;
55
- if (p) {
56
- if (void 0 !== s.shareKey) {
57
- let r = s.shareKey;
58
- const e = i;
59
- if (i === e)
60
- if ('string' == typeof r) {
61
- if (r.length < 1) {
62
- const r = { params: {} };
63
- null === l ? (l = [r]) : l.push(r), i++;
62
+ u = !0;
63
+ if (u) {
64
+ if (void 0 !== a.shareKey) {
65
+ let e = a.shareKey;
66
+ const t = p;
67
+ if (p === t)
68
+ if ('string' == typeof e) {
69
+ if (e.length < 1) {
70
+ const e = { params: {} };
71
+ null === i ? (i = [e]) : i.push(e), p++;
64
72
  }
65
73
  }
66
74
  else {
67
- const r = { params: { type: 'string' } };
68
- null === l ? (l = [r]) : l.push(r), i++;
75
+ const e = { params: { type: 'string' } };
76
+ null === i ? (i = [e]) : i.push(e), p++;
69
77
  }
70
- p = e === i;
78
+ u = t === p;
71
79
  }
72
80
  else
73
- p = !0;
74
- if (p) {
75
- if (void 0 !== s.shareScope) {
76
- let r = s.shareScope;
77
- const e = i;
78
- if (i === e)
79
- if ('string' == typeof r) {
80
- if (r.length < 1) {
81
- const r = { params: {} };
82
- null === l ? (l = [r]) : l.push(r), i++;
81
+ u = !0;
82
+ if (u) {
83
+ if (void 0 !== a.request) {
84
+ let e = a.request;
85
+ const t = p;
86
+ if (p === t)
87
+ if ('string' == typeof e) {
88
+ if (e.length < 1) {
89
+ const e = { params: {} };
90
+ null === i ? (i = [e]) : i.push(e), p++;
83
91
  }
84
92
  }
85
93
  else {
86
- const r = { params: { type: 'string' } };
87
- null === l ? (l = [r]) : l.push(r), i++;
94
+ const e = { params: { type: 'string' } };
95
+ null === i ? (i = [e]) : i.push(e), p++;
88
96
  }
89
- p = e === i;
97
+ u = t === p;
90
98
  }
91
99
  else
92
- p = !0;
93
- if (p)
94
- if (void 0 !== s.version) {
95
- let e = s.version;
96
- const t = i, n = i;
97
- let a = !1;
98
- const o = i;
99
- if (!1 !== e) {
100
- const e = {
101
- params: {
102
- allowedValues: r.properties.version.anyOf[0].enum,
103
- },
104
- };
105
- null === l ? (l = [e]) : l.push(e), i++;
106
- }
107
- var c = o === i;
108
- if (((a = a || c), !a)) {
109
- const r = i;
110
- if ('string' != typeof e) {
111
- const r = { params: { type: 'string' } };
112
- null === l ? (l = [r]) : l.push(r), i++;
100
+ u = !0;
101
+ if (u) {
102
+ if (void 0 !== a.shareScope) {
103
+ let e = a.shareScope;
104
+ const t = p, s = p;
105
+ let r = !1;
106
+ const n = p;
107
+ if (p === n)
108
+ if ('string' == typeof e) {
109
+ if (e.length < 1) {
110
+ const e = { params: {} };
111
+ null === i ? (i = [e]) : i.push(e), p++;
112
+ }
113
113
  }
114
- (c = r === i), (a = a || c);
114
+ else {
115
+ const e = { params: { type: 'string' } };
116
+ null === i ? (i = [e]) : i.push(e), p++;
117
+ }
118
+ var f = n === p;
119
+ if (((r = r || f), !r)) {
120
+ const t = p;
121
+ if (p === t)
122
+ if (Array.isArray(e)) {
123
+ const t = e.length;
124
+ for (let s = 0; s < t; s++) {
125
+ let t = e[s];
126
+ const r = p;
127
+ if (p === r)
128
+ if ('string' == typeof t) {
129
+ if (t.length < 1) {
130
+ const e = { params: {} };
131
+ null === i ? (i = [e]) : i.push(e), p++;
132
+ }
133
+ }
134
+ else {
135
+ const e = { params: { type: 'string' } };
136
+ null === i ? (i = [e]) : i.push(e), p++;
137
+ }
138
+ if (r !== p)
139
+ break;
140
+ }
141
+ }
142
+ else {
143
+ const e = { params: { type: 'array' } };
144
+ null === i ? (i = [e]) : i.push(e), p++;
145
+ }
146
+ (f = t === p), (r = r || f);
115
147
  }
116
- if (a)
117
- (i = n), null !== l && (n ? (l.length = n) : (l = null));
148
+ if (r)
149
+ (p = s), null !== i && (s ? (i.length = s) : (i = null));
118
150
  else {
119
- const r = { params: {} };
120
- null === l ? (l = [r]) : l.push(r), i++;
151
+ const e = { params: {} };
152
+ null === i ? (i = [e]) : i.push(e), p++;
121
153
  }
122
- p = t === i;
154
+ u = t === p;
123
155
  }
124
156
  else
125
- p = !0;
157
+ u = !0;
158
+ if (u) {
159
+ if (void 0 !== a.requiredVersion) {
160
+ let t = a.requiredVersion;
161
+ const s = p, r = p;
162
+ let n = !1;
163
+ const o = p;
164
+ if (!1 !== t) {
165
+ const t = {
166
+ params: {
167
+ allowedValues: e.properties.requiredVersion.anyOf[0].enum,
168
+ },
169
+ };
170
+ null === i ? (i = [t]) : i.push(t), p++;
171
+ }
172
+ var c = o === p;
173
+ if (((n = n || c), !n)) {
174
+ const e = p;
175
+ if ('string' != typeof t) {
176
+ const e = { params: { type: 'string' } };
177
+ null === i ? (i = [e]) : i.push(e), p++;
178
+ }
179
+ (c = e === p), (n = n || c);
180
+ }
181
+ if (n)
182
+ (p = r),
183
+ null !== i && (r ? (i.length = r) : (i = null));
184
+ else {
185
+ const e = { params: {} };
186
+ null === i ? (i = [e]) : i.push(e), p++;
187
+ }
188
+ u = s === p;
189
+ }
190
+ else
191
+ u = !0;
192
+ if (u) {
193
+ if (void 0 !== a.strictVersion) {
194
+ const e = p;
195
+ if ('boolean' != typeof a.strictVersion) {
196
+ const e = { params: { type: 'boolean' } };
197
+ null === i ? (i = [e]) : i.push(e), p++;
198
+ }
199
+ u = e === p;
200
+ }
201
+ else
202
+ u = !0;
203
+ if (u) {
204
+ if (void 0 !== a.singleton) {
205
+ const e = p;
206
+ if ('boolean' != typeof a.singleton) {
207
+ const e = { params: { type: 'boolean' } };
208
+ null === i ? (i = [e]) : i.push(e), p++;
209
+ }
210
+ u = e === p;
211
+ }
212
+ else
213
+ u = !0;
214
+ if (u) {
215
+ if (void 0 !== a.layer) {
216
+ let e = a.layer;
217
+ const t = p;
218
+ if (p === t)
219
+ if ('string' == typeof e) {
220
+ if (e.length < 1) {
221
+ const e = { params: {} };
222
+ null === i ? (i = [e]) : i.push(e), p++;
223
+ }
224
+ }
225
+ else {
226
+ const e = { params: { type: 'string' } };
227
+ null === i ? (i = [e]) : i.push(e), p++;
228
+ }
229
+ u = t === p;
230
+ }
231
+ else
232
+ u = !0;
233
+ if (u) {
234
+ if (void 0 !== a.issuerLayer) {
235
+ let e = a.issuerLayer;
236
+ const t = p;
237
+ if (p === t)
238
+ if ('string' == typeof e) {
239
+ if (e.length < 1) {
240
+ const e = { params: {} };
241
+ null === i ? (i = [e]) : i.push(e), p++;
242
+ }
243
+ }
244
+ else {
245
+ const e = { params: { type: 'string' } };
246
+ null === i ? (i = [e]) : i.push(e), p++;
247
+ }
248
+ u = t === p;
249
+ }
250
+ else
251
+ u = !0;
252
+ if (u)
253
+ if (void 0 !== a.version) {
254
+ let t = a.version;
255
+ const s = p, r = p;
256
+ let n = !1;
257
+ const o = p;
258
+ if (!1 !== t) {
259
+ const t = {
260
+ params: {
261
+ allowedValues: e.properties.version.anyOf[0].enum,
262
+ },
263
+ };
264
+ null === i ? (i = [t]) : i.push(t), p++;
265
+ }
266
+ var y = o === p;
267
+ if (((n = n || y), !n)) {
268
+ const e = p;
269
+ if ('string' != typeof t) {
270
+ const e = { params: { type: 'string' } };
271
+ null === i ? (i = [e]) : i.push(e), p++;
272
+ }
273
+ (y = e === p), (n = n || y);
274
+ }
275
+ if (n)
276
+ (p = r),
277
+ null !== i &&
278
+ (r ? (i.length = r) : (i = null));
279
+ else {
280
+ const e = { params: {} };
281
+ null === i ? (i = [e]) : i.push(e), p++;
282
+ }
283
+ u = s === p;
284
+ }
285
+ else
286
+ u = !0;
287
+ }
288
+ }
289
+ }
290
+ }
291
+ }
292
+ }
126
293
  }
127
294
  }
128
295
  }
129
296
  }
130
297
  else {
131
- const r = { params: { type: 'object' } };
132
- null === l ? (l = [r]) : l.push(r), i++;
298
+ const e = { params: { type: 'object' } };
299
+ null === i ? (i = [e]) : i.push(e), p++;
133
300
  }
134
- var f = h === i;
135
- if (((u = u || f), !u)) {
136
- const r = i;
137
- if (i == i)
138
- if ('string' == typeof s) {
139
- if (s.length < 1) {
140
- const r = { params: {} };
141
- null === l ? (l = [r]) : l.push(r), i++;
301
+ var h = m === p;
302
+ if (((g = g || h), !g)) {
303
+ const e = p;
304
+ if (p == p)
305
+ if ('string' == typeof a) {
306
+ if (a.length < 1) {
307
+ const e = { params: {} };
308
+ null === i ? (i = [e]) : i.push(e), p++;
142
309
  }
143
310
  }
144
311
  else {
145
- const r = { params: { type: 'string' } };
146
- null === l ? (l = [r]) : l.push(r), i++;
312
+ const e = { params: { type: 'string' } };
313
+ null === i ? (i = [e]) : i.push(e), p++;
147
314
  }
148
- (f = r === i), (u = u || f);
315
+ (h = e === p), (g = g || h);
149
316
  }
150
- if (!u) {
151
- const r = { params: {} };
152
- return null === l ? (l = [r]) : l.push(r), i++, (e.errors = l), !1;
317
+ if (!g) {
318
+ const e = { params: {} };
319
+ return null === i ? (i = [e]) : i.push(e), p++, (s.errors = i), !1;
153
320
  }
154
- if (((i = o), null !== l && (o ? (l.length = o) : (l = null)), a !== i))
321
+ if (((p = l), null !== i && (l ? (i.length = l) : (i = null)), o !== p))
155
322
  break;
156
323
  }
157
324
  }
158
- return (e.errors = l), 0 === i;
325
+ return (s.errors = i), 0 === p;
159
326
  }
160
- function t(r, { instancePath: n = '', parentData: s, parentDataProperty: a, rootData: o = r, } = {}) {
327
+ function r(e, { instancePath: t = '', parentData: n, parentDataProperty: a, rootData: o = e, } = {}) {
161
328
  let l = null, i = 0;
162
329
  const p = i;
163
- let c = !1;
330
+ let u = !1;
164
331
  const f = i;
165
332
  if (i === f)
166
- if (Array.isArray(r)) {
167
- const t = r.length;
168
- for (let s = 0; s < t; s++) {
169
- let t = r[s];
333
+ if (Array.isArray(e)) {
334
+ const r = e.length;
335
+ for (let n = 0; n < r; n++) {
336
+ let r = e[n];
170
337
  const a = i, p = i;
171
- let c = !1;
338
+ let u = !1;
172
339
  const f = i;
173
340
  if (i == i)
174
- if ('string' == typeof t) {
175
- if (t.length < 1) {
176
- const r = { params: {} };
177
- null === l ? (l = [r]) : l.push(r), i++;
341
+ if ('string' == typeof r) {
342
+ if (r.length < 1) {
343
+ const e = { params: {} };
344
+ null === l ? (l = [e]) : l.push(e), i++;
178
345
  }
179
346
  }
180
347
  else {
181
- const r = { params: { type: 'string' } };
182
- null === l ? (l = [r]) : l.push(r), i++;
348
+ const e = { params: { type: 'string' } };
349
+ null === l ? (l = [e]) : l.push(e), i++;
183
350
  }
184
- var u = f === i;
185
- if (((c = c || u), !c)) {
351
+ var c = f === i;
352
+ if (((u = u || c), !u)) {
186
353
  const a = i;
187
- e(t, {
188
- instancePath: n + '/' + s,
189
- parentData: r,
190
- parentDataProperty: s,
354
+ s(r, {
355
+ instancePath: t + '/' + n,
356
+ parentData: e,
357
+ parentDataProperty: n,
191
358
  rootData: o,
192
359
  }) ||
193
- ((l = null === l ? e.errors : l.concat(e.errors)), (i = l.length)),
194
- (u = a === i),
195
- (c = c || u);
360
+ ((l = null === l ? s.errors : l.concat(s.errors)), (i = l.length)),
361
+ (c = a === i),
362
+ (u = u || c);
196
363
  }
197
- if (c)
364
+ if (u)
198
365
  (i = p), null !== l && (p ? (l.length = p) : (l = null));
199
366
  else {
200
- const r = { params: {} };
201
- null === l ? (l = [r]) : l.push(r), i++;
367
+ const e = { params: {} };
368
+ null === l ? (l = [e]) : l.push(e), i++;
202
369
  }
203
370
  if (a !== i)
204
371
  break;
205
372
  }
206
373
  }
207
374
  else {
208
- const r = { params: { type: 'array' } };
209
- null === l ? (l = [r]) : l.push(r), i++;
375
+ const e = { params: { type: 'array' } };
376
+ null === l ? (l = [e]) : l.push(e), i++;
210
377
  }
211
- var h = f === i;
212
- if (((c = c || h), !c)) {
213
- const t = i;
214
- e(r, {
215
- instancePath: n,
216
- parentData: s,
378
+ var y = f === i;
379
+ if (((u = u || y), !u)) {
380
+ const r = i;
381
+ s(e, {
382
+ instancePath: t,
383
+ parentData: n,
217
384
  parentDataProperty: a,
218
385
  rootData: o,
219
- }) || ((l = null === l ? e.errors : l.concat(e.errors)), (i = l.length)),
220
- (h = t === i),
221
- (c = c || h);
386
+ }) || ((l = null === l ? s.errors : l.concat(s.errors)), (i = l.length)),
387
+ (y = r === i),
388
+ (u = u || y);
222
389
  }
223
- if (!c) {
224
- const r = { params: {} };
225
- return null === l ? (l = [r]) : l.push(r), i++, (t.errors = l), !1;
390
+ if (!u) {
391
+ const e = { params: {} };
392
+ return null === l ? (l = [e]) : l.push(e), i++, (r.errors = l), !1;
226
393
  }
227
394
  return ((i = p),
228
395
  null !== l && (p ? (l.length = p) : (l = null)),
229
- (t.errors = l),
396
+ (r.errors = l),
230
397
  0 === i);
231
398
  }
232
- function n(r, { instancePath: e = '', parentData: s, parentDataProperty: a, rootData: o = r, } = {}) {
399
+ function n(e, { instancePath: t = '', parentData: s, parentDataProperty: a, rootData: o = e, } = {}) {
233
400
  let l = null, i = 0;
234
401
  if (0 === i) {
235
- if (!r || 'object' != typeof r || Array.isArray(r))
402
+ if (!e || 'object' != typeof e || Array.isArray(e))
236
403
  return (n.errors = [{ params: { type: 'object' } }]), !1;
237
404
  {
238
405
  let s;
239
- if (void 0 === r.provides && (s = 'provides'))
406
+ if (void 0 === e.provides && (s = 'provides'))
240
407
  return (n.errors = [{ params: { missingProperty: s } }]), !1;
241
408
  {
242
409
  const s = i;
243
- for (const e in r)
244
- if ('provides' !== e && 'shareScope' !== e)
245
- return (n.errors = [{ params: { additionalProperty: e } }]), !1;
410
+ for (const t in e)
411
+ if ('provides' !== t && 'shareScope' !== t)
412
+ return (n.errors = [{ params: { additionalProperty: t } }]), !1;
246
413
  if (s === i) {
247
- if (void 0 !== r.provides) {
248
- const n = i;
249
- t(r.provides, {
250
- instancePath: e + '/provides',
251
- parentData: r,
414
+ if (void 0 !== e.provides) {
415
+ const s = i;
416
+ r(e.provides, {
417
+ instancePath: t + '/provides',
418
+ parentData: e,
252
419
  parentDataProperty: 'provides',
253
420
  rootData: o,
254
421
  }) ||
255
- ((l = null === l ? t.errors : l.concat(t.errors)),
422
+ ((l = null === l ? r.errors : l.concat(r.errors)),
256
423
  (i = l.length));
257
- var p = n === i;
424
+ var p = s === i;
258
425
  }
259
426
  else
260
427
  p = !0;
261
428
  if (p)
262
- if (void 0 !== r.shareScope) {
263
- let e = r.shareScope;
264
- const t = i;
265
- if (i === t) {
266
- if ('string' != typeof e)
267
- return (n.errors = [{ params: { type: 'string' } }]), !1;
268
- if (e.length < 1)
269
- return (n.errors = [{ params: {} }]), !1;
429
+ if (void 0 !== e.shareScope) {
430
+ let t = e.shareScope;
431
+ const s = i, r = i;
432
+ let a = !1;
433
+ const o = i;
434
+ if (i === o)
435
+ if ('string' == typeof t) {
436
+ if (t.length < 1) {
437
+ const e = { params: {} };
438
+ null === l ? (l = [e]) : l.push(e), i++;
439
+ }
440
+ }
441
+ else {
442
+ const e = { params: { type: 'string' } };
443
+ null === l ? (l = [e]) : l.push(e), i++;
444
+ }
445
+ var u = o === i;
446
+ if (((a = a || u), !a)) {
447
+ const e = i;
448
+ if (i === e)
449
+ if (Array.isArray(t)) {
450
+ const e = t.length;
451
+ for (let s = 0; s < e; s++) {
452
+ let e = t[s];
453
+ const r = i;
454
+ if (i === r)
455
+ if ('string' == typeof e) {
456
+ if (e.length < 1) {
457
+ const e = { params: {} };
458
+ null === l ? (l = [e]) : l.push(e), i++;
459
+ }
460
+ }
461
+ else {
462
+ const e = { params: { type: 'string' } };
463
+ null === l ? (l = [e]) : l.push(e), i++;
464
+ }
465
+ if (r !== i)
466
+ break;
467
+ }
468
+ }
469
+ else {
470
+ const e = { params: { type: 'array' } };
471
+ null === l ? (l = [e]) : l.push(e), i++;
472
+ }
473
+ (u = e === i), (a = a || u);
474
+ }
475
+ if (!a) {
476
+ const e = { params: {} };
477
+ return (null === l ? (l = [e]) : l.push(e), i++, (n.errors = l), !1);
270
478
  }
271
- p = t === i;
479
+ (i = r),
480
+ null !== l && (r ? (l.length = r) : (l = null)),
481
+ (p = s === i);
272
482
  }
273
483
  else
274
484
  p = !0;