Skip to content

Commit 8727aa3

Browse files
authored
fix(enhanced): compilerInstance type should be string not enum (#3829)
1 parent 65aa038 commit 8727aa3

File tree

4 files changed

+66
-72
lines changed

4 files changed

+66
-72
lines changed

.changeset/smart-stingrays-rhyme.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@module-federation/enhanced': patch
3+
---
4+
5+
fix(enhanced): compilerInstance type should be string not enum

packages/enhanced/src/schemas/container/ModuleFederationPlugin.check.ts

Lines changed: 59 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ const t = {
311311
items: { type: 'string' },
312312
},
313313
compileInChildProcess: { type: 'boolean' },
314-
compilerInstance: { enum: ['tsc', 'vue-tsc'] },
314+
compilerInstance: { type: 'string' },
315315
generateAPITypes: { type: 'boolean' },
316316
extractThirdParty: { type: 'boolean' },
317317
extractRemoteTypes: { type: 'boolean' },
@@ -2158,50 +2158,50 @@ function D(
21582158
if (m) {
21592159
if (void 0 !== o.dts) {
21602160
let e = o.dts;
2161-
const r = u,
2162-
n = u;
2163-
let s = !1;
2164-
const a = u;
2161+
const t = u,
2162+
r = u;
2163+
let n = !1;
2164+
const s = u;
21652165
if ('boolean' != typeof e) {
21662166
const e = { params: { type: 'boolean' } };
21672167
null === y ? (y = [e]) : y.push(e), u++;
21682168
}
2169-
var b = a === u;
2170-
if (((s = s || b), !s)) {
2171-
const r = u;
2172-
if (u === r)
2169+
var b = s === u;
2170+
if (((n = n || b), !n)) {
2171+
const t = u;
2172+
if (u === t)
21732173
if (
21742174
e &&
21752175
'object' == typeof e &&
21762176
!Array.isArray(e)
21772177
) {
21782178
if (void 0 !== e.generateTypes) {
2179-
let r = e.generateTypes;
2180-
const n = u,
2181-
s = u;
2182-
let o = !1;
2183-
const a = u;
2184-
if ('boolean' != typeof r) {
2179+
let t = e.generateTypes;
2180+
const r = u,
2181+
n = u;
2182+
let s = !1;
2183+
const o = u;
2184+
if ('boolean' != typeof t) {
21852185
const e = {
21862186
params: { type: 'boolean' },
21872187
};
21882188
null === y ? (y = [e]) : y.push(e),
21892189
u++;
21902190
}
2191-
var v = a === u;
2192-
if (((o = o || v), !o)) {
2191+
var v = o === u;
2192+
if (((s = s || v), !s)) {
21932193
const e = u;
21942194
if (u === e)
21952195
if (
2196-
r &&
2197-
'object' == typeof r &&
2198-
!Array.isArray(r)
2196+
t &&
2197+
'object' == typeof t &&
2198+
!Array.isArray(t)
21992199
) {
2200-
if (void 0 !== r.tsConfigPath) {
2200+
if (void 0 !== t.tsConfigPath) {
22012201
const e = u;
22022202
if (
22032203
'string' !=
2204-
typeof r.tsConfigPath
2204+
typeof t.tsConfigPath
22052205
) {
22062206
const e = {
22072207
params: { type: 'string' },
@@ -2214,11 +2214,11 @@ function D(
22142214
var j = e === u;
22152215
} else j = !0;
22162216
if (j) {
2217-
if (void 0 !== r.typesFolder) {
2217+
if (void 0 !== t.typesFolder) {
22182218
const e = u;
22192219
if (
22202220
'string' !=
2221-
typeof r.typesFolder
2221+
typeof t.typesFolder
22222222
) {
22232223
const e = {
22242224
params: {
@@ -2235,12 +2235,12 @@ function D(
22352235
if (j) {
22362236
if (
22372237
void 0 !==
2238-
r.compiledTypesFolder
2238+
t.compiledTypesFolder
22392239
) {
22402240
const e = u;
22412241
if (
22422242
'string' !=
2243-
typeof r.compiledTypesFolder
2243+
typeof t.compiledTypesFolder
22442244
) {
22452245
const e = {
22462246
params: {
@@ -2257,12 +2257,12 @@ function D(
22572257
if (j) {
22582258
if (
22592259
void 0 !==
2260-
r.deleteTypesFolder
2260+
t.deleteTypesFolder
22612261
) {
22622262
const e = u;
22632263
if (
22642264
'boolean' !=
2265-
typeof r.deleteTypesFolder
2265+
typeof t.deleteTypesFolder
22662266
) {
22672267
const e = {
22682268
params: {
@@ -2279,12 +2279,12 @@ function D(
22792279
if (j) {
22802280
if (
22812281
void 0 !==
2282-
r.additionalFilesToCompile
2282+
t.additionalFilesToCompile
22832283
) {
22842284
let e =
2285-
r.additionalFilesToCompile;
2286-
const t = u;
2287-
if (u === t)
2285+
t.additionalFilesToCompile;
2286+
const r = u;
2287+
if (u === r)
22882288
if (
22892289
Array.isArray(e)
22902290
) {
@@ -2323,17 +2323,17 @@ function D(
23232323
: y.push(e),
23242324
u++;
23252325
}
2326-
j = t === u;
2326+
j = r === u;
23272327
} else j = !0;
23282328
if (j) {
23292329
if (
23302330
void 0 !==
2331-
r.compileInChildProcess
2331+
t.compileInChildProcess
23322332
) {
23332333
const e = u;
23342334
if (
23352335
'boolean' !=
2336-
typeof r.compileInChildProcess
2336+
typeof t.compileInChildProcess
23372337
) {
23382338
const e = {
23392339
params: {
@@ -2350,45 +2350,34 @@ function D(
23502350
if (j) {
23512351
if (
23522352
void 0 !==
2353-
r.compilerInstance
2353+
t.compilerInstance
23542354
) {
2355-
let e =
2356-
r.compilerInstance;
2357-
const n = u;
2355+
const e = u;
23582356
if (
2359-
'tsc' !== e &&
2360-
'vue-tsc' !== e
2357+
'string' !=
2358+
typeof t.compilerInstance
23612359
) {
23622360
const e = {
23632361
params: {
2364-
allowedValues:
2365-
t.properties
2366-
.dts
2367-
.anyOf[1]
2368-
.properties
2369-
.generateTypes
2370-
.anyOf[1]
2371-
.properties
2372-
.compilerInstance
2373-
.enum,
2362+
type: 'string',
23742363
},
23752364
};
23762365
null === y
23772366
? (y = [e])
23782367
: y.push(e),
23792368
u++;
23802369
}
2381-
j = n === u;
2370+
j = e === u;
23822371
} else j = !0;
23832372
if (j) {
23842373
if (
23852374
void 0 !==
2386-
r.generateAPITypes
2375+
t.generateAPITypes
23872376
) {
23882377
const e = u;
23892378
if (
23902379
'boolean' !=
2391-
typeof r.generateAPITypes
2380+
typeof t.generateAPITypes
23922381
) {
23932382
const e = {
23942383
params: {
@@ -2405,12 +2394,12 @@ function D(
24052394
if (j) {
24062395
if (
24072396
void 0 !==
2408-
r.extractThirdParty
2397+
t.extractThirdParty
24092398
) {
24102399
const e = u;
24112400
if (
24122401
'boolean' !=
2413-
typeof r.extractThirdParty
2402+
typeof t.extractThirdParty
24142403
) {
24152404
const e = {
24162405
params: {
@@ -2427,12 +2416,12 @@ function D(
24272416
if (j) {
24282417
if (
24292418
void 0 !==
2430-
r.extractRemoteTypes
2419+
t.extractRemoteTypes
24312420
) {
24322421
const e = u;
24332422
if (
24342423
'boolean' !=
2435-
typeof r.extractRemoteTypes
2424+
typeof t.extractRemoteTypes
24362425
) {
24372426
const e = {
24382427
params: {
@@ -2453,12 +2442,12 @@ function D(
24532442
if (j)
24542443
if (
24552444
void 0 !==
2456-
r.abortOnError
2445+
t.abortOnError
24572446
) {
24582447
const e = u;
24592448
if (
24602449
'boolean' !=
2461-
typeof r.abortOnError
2450+
typeof t.abortOnError
24622451
) {
24632452
const e =
24642453
{
@@ -2496,18 +2485,18 @@ function D(
24962485
: y.push(e),
24972486
u++;
24982487
}
2499-
(v = e === u), (o = o || v);
2488+
(v = e === u), (s = s || v);
25002489
}
2501-
if (o)
2502-
(u = s),
2490+
if (s)
2491+
(u = n),
25032492
null !== y &&
2504-
(s ? (y.length = s) : (y = null));
2493+
(n ? (y.length = n) : (y = null));
25052494
else {
25062495
const e = { params: {} };
25072496
null === y ? (y = [e]) : y.push(e),
25082497
u++;
25092498
}
2510-
var A = n === u;
2499+
var A = r === u;
25112500
} else A = !0;
25122501
if (A) {
25132502
if (void 0 !== e.consumeTypes) {
@@ -2849,9 +2838,9 @@ function D(
28492838
const e = { params: { type: 'object' } };
28502839
null === y ? (y = [e]) : y.push(e), u++;
28512840
}
2852-
(b = r === u), (s = s || b);
2841+
(b = t === u), (n = n || b);
28532842
}
2854-
if (!s) {
2843+
if (!n) {
28552844
const e = { params: {} };
28562845
return (
28572846
null === y ? (y = [e]) : y.push(e),
@@ -2860,10 +2849,10 @@ function D(
28602849
!1
28612850
);
28622851
}
2863-
(u = n),
2852+
(u = r),
28642853
null !== y &&
2865-
(n ? (y.length = n) : (y = null)),
2866-
(m = r === u);
2854+
(r ? (y.length = r) : (y = null)),
2855+
(m = t === u);
28672856
} else m = !0;
28682857
if (m) {
28692858
if (void 0 !== o.experiments) {

0 commit comments

Comments
 (0)