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