@module-federation/dts-plugin 0.24.1 → 2.0.1

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.
package/dist/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @module-federation/dts-plugin
2
2
 
3
+ ## 2.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 28a2db4: Fix Windows TypeScript type generation by invoking the compiler with
8
+ `execFile` and properly quoted project paths.
9
+ - @module-federation/sdk@2.0.1
10
+ - @module-federation/managers@2.0.1
11
+ - @module-federation/third-party-dts-extractor@2.0.1
12
+ - @module-federation/error-codes@2.0.1
13
+
14
+ ## 2.0.0
15
+
16
+ ### Patch Changes
17
+
18
+ - @module-federation/sdk@2.0.0
19
+ - @module-federation/managers@2.0.0
20
+ - @module-federation/third-party-dts-extractor@2.0.0
21
+ - @module-federation/error-codes@2.0.0
22
+
3
23
  ## 0.24.1
4
24
 
5
25
  ### Patch Changes
package/dist/core.js CHANGED
@@ -1101,6 +1101,59 @@ var resolvePackageManagerExecutable = /* @__PURE__ */ __name(() => {
1101
1101
  return "npx";
1102
1102
  }
1103
1103
  }, "resolvePackageManagerExecutable");
1104
+ var splitCommandArgs = /* @__PURE__ */ __name((value) => {
1105
+ const args = [];
1106
+ let current = "";
1107
+ let quote = null;
1108
+ let escaped = false;
1109
+ for (const char of value) {
1110
+ if (escaped) {
1111
+ current += char;
1112
+ escaped = false;
1113
+ continue;
1114
+ }
1115
+ if (char === "\\") {
1116
+ escaped = true;
1117
+ continue;
1118
+ }
1119
+ if (quote) {
1120
+ if (char === quote) {
1121
+ quote = null;
1122
+ } else {
1123
+ current += char;
1124
+ }
1125
+ continue;
1126
+ }
1127
+ if (char === '"' || char === "'") {
1128
+ quote = char;
1129
+ continue;
1130
+ }
1131
+ if (char.trim() === "") {
1132
+ if (current) {
1133
+ args.push(current);
1134
+ current = "";
1135
+ }
1136
+ continue;
1137
+ }
1138
+ current += char;
1139
+ }
1140
+ if (current) {
1141
+ args.push(current);
1142
+ }
1143
+ return args;
1144
+ }, "splitCommandArgs");
1145
+ var formatCommandForDisplay = /* @__PURE__ */ __name((executable, args) => {
1146
+ const formatArg = /* @__PURE__ */ __name((arg) => {
1147
+ if (/[\s'"]/.test(arg)) {
1148
+ return JSON.stringify(arg);
1149
+ }
1150
+ return arg;
1151
+ }, "formatArg");
1152
+ return [
1153
+ executable,
1154
+ ...args
1155
+ ].map(formatArg).join(" ");
1156
+ }, "formatCommandForDisplay");
1104
1157
  var compileTs = /* @__PURE__ */ __name((mapComponentsToExpose, tsConfig, remoteOptions) => __async(void 0, null, function* () {
1105
1158
  var _a3, _b, _c, _d;
1106
1159
  if (!Object.keys(mapComponentsToExpose).length) {
@@ -1116,12 +1169,22 @@ var compileTs = /* @__PURE__ */ __name((mapComponentsToExpose, tsConfig, remoteO
1116
1169
  context: remoteOptions.context,
1117
1170
  exclude: typeof remoteOptions.extractThirdParty === "object" ? remoteOptions.extractThirdParty.exclude : void 0
1118
1171
  });
1119
- const execPromise = import_util.default.promisify(import_child_process.exec);
1172
+ const execPromise = import_util.default.promisify(import_child_process.execFile);
1120
1173
  const pmExecutable = resolvePackageManagerExecutable();
1121
- const cmd = `${pmExecutable} ${remoteOptions.compilerInstance} --project '${tempTsConfigJsonPath}'`;
1174
+ const compilerArgs = splitCommandArgs(remoteOptions.compilerInstance);
1175
+ const resolvedCompilerArgs = compilerArgs.length > 0 ? compilerArgs : [
1176
+ remoteOptions.compilerInstance
1177
+ ];
1178
+ const cmdArgs = [
1179
+ ...resolvedCompilerArgs,
1180
+ "--project",
1181
+ tempTsConfigJsonPath
1182
+ ];
1183
+ const cmd = formatCommandForDisplay(pmExecutable, cmdArgs);
1122
1184
  try {
1123
- yield execPromise(cmd, {
1124
- cwd: typeof remoteOptions.moduleFederationConfig.dts !== "boolean" ? (_d = (_c = remoteOptions.moduleFederationConfig.dts) == null ? void 0 : _c.cwd) != null ? _d : void 0 : void 0
1185
+ yield execPromise(pmExecutable, cmdArgs, {
1186
+ cwd: typeof remoteOptions.moduleFederationConfig.dts !== "boolean" ? (_d = (_c = remoteOptions.moduleFederationConfig.dts) == null ? void 0 : _c.cwd) != null ? _d : void 0 : void 0,
1187
+ shell: process.platform === "win32"
1125
1188
  });
1126
1189
  } catch (err) {
1127
1190
  if (compilerOptions.tsBuildInfoFile) {
@@ -1,4 +1,4 @@
1
- import { ModuleFederationRuntimePlugin } from '@module-federation/runtime/types';
1
+ import { ModuleFederationRuntimePlugin } from '@module-federation/runtime';
2
2
 
3
3
  declare function dynamicRemoteTypeHintsPlugin(): ModuleFederationRuntimePlugin;
4
4
 
@@ -1,4 +1,4 @@
1
- import { ModuleFederationRuntimePlugin } from '@module-federation/runtime/types';
1
+ import { ModuleFederationRuntimePlugin } from '@module-federation/runtime';
2
2
 
3
3
  declare function dynamicRemoteTypeHintsPlugin(): ModuleFederationRuntimePlugin;
4
4
 
@@ -4,7 +4,7 @@ import {
4
4
  exposeRpc,
5
5
  getDTSManagerConstructor,
6
6
  isDebugMode
7
- } from "./chunk-RWXNVNFM.js";
7
+ } from "./chunk-MV6M4VFH.js";
8
8
  import {
9
9
  __async,
10
10
  __export,
@@ -448,7 +448,7 @@ import { stat, readdir, writeFile, rm, readFile } from "fs/promises";
448
448
  import { dirname, join, normalize, relative, resolve, sep, extname, isAbsolute } from "path";
449
449
  import { getShortErrorMsg, TYPE_001, typeDescMap } from "@module-federation/error-codes";
450
450
  import { ThirdPartyExtractor } from "@module-federation/third-party-dts-extractor";
451
- import { exec } from "child_process";
451
+ import { execFile } from "child_process";
452
452
  import util from "util";
453
453
  import { TEMP_DIR } from "@module-federation/sdk";
454
454
  var STARTS_WITH_SLASH = /^\//;
@@ -532,6 +532,59 @@ var resolvePackageManagerExecutable = /* @__PURE__ */ __name(() => {
532
532
  return "npx";
533
533
  }
534
534
  }, "resolvePackageManagerExecutable");
535
+ var splitCommandArgs = /* @__PURE__ */ __name((value) => {
536
+ const args = [];
537
+ let current = "";
538
+ let quote = null;
539
+ let escaped = false;
540
+ for (const char of value) {
541
+ if (escaped) {
542
+ current += char;
543
+ escaped = false;
544
+ continue;
545
+ }
546
+ if (char === "\\") {
547
+ escaped = true;
548
+ continue;
549
+ }
550
+ if (quote) {
551
+ if (char === quote) {
552
+ quote = null;
553
+ } else {
554
+ current += char;
555
+ }
556
+ continue;
557
+ }
558
+ if (char === '"' || char === "'") {
559
+ quote = char;
560
+ continue;
561
+ }
562
+ if (char.trim() === "") {
563
+ if (current) {
564
+ args.push(current);
565
+ current = "";
566
+ }
567
+ continue;
568
+ }
569
+ current += char;
570
+ }
571
+ if (current) {
572
+ args.push(current);
573
+ }
574
+ return args;
575
+ }, "splitCommandArgs");
576
+ var formatCommandForDisplay = /* @__PURE__ */ __name((executable, args) => {
577
+ const formatArg = /* @__PURE__ */ __name((arg) => {
578
+ if (/[\s'"]/.test(arg)) {
579
+ return JSON.stringify(arg);
580
+ }
581
+ return arg;
582
+ }, "formatArg");
583
+ return [
584
+ executable,
585
+ ...args
586
+ ].map(formatArg).join(" ");
587
+ }, "formatCommandForDisplay");
535
588
  var compileTs = /* @__PURE__ */ __name((mapComponentsToExpose, tsConfig, remoteOptions) => __async(void 0, null, function* () {
536
589
  var _a2, _b, _c, _d;
537
590
  if (!Object.keys(mapComponentsToExpose).length) {
@@ -547,12 +600,22 @@ var compileTs = /* @__PURE__ */ __name((mapComponentsToExpose, tsConfig, remoteO
547
600
  context: remoteOptions.context,
548
601
  exclude: typeof remoteOptions.extractThirdParty === "object" ? remoteOptions.extractThirdParty.exclude : void 0
549
602
  });
550
- const execPromise = util.promisify(exec);
603
+ const execPromise = util.promisify(execFile);
551
604
  const pmExecutable = resolvePackageManagerExecutable();
552
- const cmd = `${pmExecutable} ${remoteOptions.compilerInstance} --project '${tempTsConfigJsonPath}'`;
605
+ const compilerArgs = splitCommandArgs(remoteOptions.compilerInstance);
606
+ const resolvedCompilerArgs = compilerArgs.length > 0 ? compilerArgs : [
607
+ remoteOptions.compilerInstance
608
+ ];
609
+ const cmdArgs = [
610
+ ...resolvedCompilerArgs,
611
+ "--project",
612
+ tempTsConfigJsonPath
613
+ ];
614
+ const cmd = formatCommandForDisplay(pmExecutable, cmdArgs);
553
615
  try {
554
- yield execPromise(cmd, {
555
- cwd: typeof remoteOptions.moduleFederationConfig.dts !== "boolean" ? (_d = (_c = remoteOptions.moduleFederationConfig.dts) == null ? void 0 : _c.cwd) != null ? _d : void 0 : void 0
616
+ yield execPromise(pmExecutable, cmdArgs, {
617
+ cwd: typeof remoteOptions.moduleFederationConfig.dts !== "boolean" ? (_d = (_c = remoteOptions.moduleFederationConfig.dts) == null ? void 0 : _c.cwd) != null ? _d : void 0 : void 0,
618
+ shell: process.platform === "win32"
556
619
  });
557
620
  } catch (err) {
558
621
  if (compilerOptions.tsBuildInfoFile) {
package/dist/esm/core.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  consumeTypes,
4
4
  generateTypesInChildProcess,
5
5
  rpc_exports
6
- } from "./chunk-N7GTIQUA.js";
6
+ } from "./chunk-LJTUMI5K.js";
7
7
  import {
8
8
  DTSManager,
9
9
  HOST_API_TYPES_FILE_NAME,
@@ -19,7 +19,7 @@ import {
19
19
  retrieveTypesAssetsInfo,
20
20
  retrieveTypesZipPath,
21
21
  validateOptions
22
- } from "./chunk-RWXNVNFM.js";
22
+ } from "./chunk-MV6M4VFH.js";
23
23
  import "./chunk-WWV5RWOP.js";
24
24
  import "./chunk-647HGGGS.js";
25
25
  export {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  rpc_exports
3
- } from "./chunk-N7GTIQUA.js";
3
+ } from "./chunk-LJTUMI5K.js";
4
4
  import {
5
5
  ModuleFederationDevServer,
6
6
  createKoaServer,
@@ -9,7 +9,7 @@ import {
9
9
  retrieveMfTypesPath,
10
10
  retrieveRemoteConfig,
11
11
  retrieveTypesZipPath
12
- } from "./chunk-RWXNVNFM.js";
12
+ } from "./chunk-MV6M4VFH.js";
13
13
  import {
14
14
  fileLog,
15
15
  getIPV4
@@ -2,7 +2,7 @@ import {
2
2
  RpcGMCallTypes,
3
3
  exposeRpc,
4
4
  generateTypes
5
- } from "./chunk-RWXNVNFM.js";
5
+ } from "./chunk-MV6M4VFH.js";
6
6
  import "./chunk-WWV5RWOP.js";
7
7
  import {
8
8
  __async,
package/dist/esm/index.js CHANGED
@@ -2,14 +2,14 @@ import {
2
2
  consumeTypes,
3
3
  generateTypesInChildProcess,
4
4
  rpc_exports
5
- } from "./chunk-N7GTIQUA.js";
5
+ } from "./chunk-LJTUMI5K.js";
6
6
  import {
7
7
  cloneDeepOptions,
8
8
  generateTypes,
9
9
  isTSProject,
10
10
  retrieveTypesAssetsInfo,
11
11
  validateOptions
12
- } from "./chunk-RWXNVNFM.js";
12
+ } from "./chunk-MV6M4VFH.js";
13
13
  import {
14
14
  getIPV4,
15
15
  logger
@@ -1621,6 +1621,59 @@ var resolvePackageManagerExecutable = /* @__PURE__ */ __name(() => {
1621
1621
  return "npx";
1622
1622
  }
1623
1623
  }, "resolvePackageManagerExecutable");
1624
+ var splitCommandArgs = /* @__PURE__ */ __name((value) => {
1625
+ const args = [];
1626
+ let current = "";
1627
+ let quote = null;
1628
+ let escaped = false;
1629
+ for (const char of value) {
1630
+ if (escaped) {
1631
+ current += char;
1632
+ escaped = false;
1633
+ continue;
1634
+ }
1635
+ if (char === "\\") {
1636
+ escaped = true;
1637
+ continue;
1638
+ }
1639
+ if (quote) {
1640
+ if (char === quote) {
1641
+ quote = null;
1642
+ } else {
1643
+ current += char;
1644
+ }
1645
+ continue;
1646
+ }
1647
+ if (char === '"' || char === "'") {
1648
+ quote = char;
1649
+ continue;
1650
+ }
1651
+ if (char.trim() === "") {
1652
+ if (current) {
1653
+ args.push(current);
1654
+ current = "";
1655
+ }
1656
+ continue;
1657
+ }
1658
+ current += char;
1659
+ }
1660
+ if (current) {
1661
+ args.push(current);
1662
+ }
1663
+ return args;
1664
+ }, "splitCommandArgs");
1665
+ var formatCommandForDisplay = /* @__PURE__ */ __name((executable, args) => {
1666
+ const formatArg = /* @__PURE__ */ __name((arg) => {
1667
+ if (/[\s'"]/.test(arg)) {
1668
+ return JSON.stringify(arg);
1669
+ }
1670
+ return arg;
1671
+ }, "formatArg");
1672
+ return [
1673
+ executable,
1674
+ ...args
1675
+ ].map(formatArg).join(" ");
1676
+ }, "formatCommandForDisplay");
1624
1677
  var compileTs = /* @__PURE__ */ __name((mapComponentsToExpose, tsConfig, remoteOptions) => __async(void 0, null, function* () {
1625
1678
  var _a3, _b, _c, _d;
1626
1679
  if (!Object.keys(mapComponentsToExpose).length) {
@@ -1636,12 +1689,22 @@ var compileTs = /* @__PURE__ */ __name((mapComponentsToExpose, tsConfig, remoteO
1636
1689
  context: remoteOptions.context,
1637
1690
  exclude: typeof remoteOptions.extractThirdParty === "object" ? remoteOptions.extractThirdParty.exclude : void 0
1638
1691
  });
1639
- const execPromise = import_util.default.promisify(import_child_process2.exec);
1692
+ const execPromise = import_util.default.promisify(import_child_process2.execFile);
1640
1693
  const pmExecutable = resolvePackageManagerExecutable();
1641
- const cmd = `${pmExecutable} ${remoteOptions.compilerInstance} --project '${tempTsConfigJsonPath}'`;
1694
+ const compilerArgs = splitCommandArgs(remoteOptions.compilerInstance);
1695
+ const resolvedCompilerArgs = compilerArgs.length > 0 ? compilerArgs : [
1696
+ remoteOptions.compilerInstance
1697
+ ];
1698
+ const cmdArgs = [
1699
+ ...resolvedCompilerArgs,
1700
+ "--project",
1701
+ tempTsConfigJsonPath
1702
+ ];
1703
+ const cmd = formatCommandForDisplay(pmExecutable, cmdArgs);
1642
1704
  try {
1643
- yield execPromise(cmd, {
1644
- cwd: typeof remoteOptions.moduleFederationConfig.dts !== "boolean" ? (_d = (_c = remoteOptions.moduleFederationConfig.dts) == null ? void 0 : _c.cwd) != null ? _d : void 0 : void 0
1705
+ yield execPromise(pmExecutable, cmdArgs, {
1706
+ cwd: typeof remoteOptions.moduleFederationConfig.dts !== "boolean" ? (_d = (_c = remoteOptions.moduleFederationConfig.dts) == null ? void 0 : _c.cwd) != null ? _d : void 0 : void 0,
1707
+ shell: process.platform === "win32"
1645
1708
  });
1646
1709
  } catch (err) {
1647
1710
  if (compilerOptions.tsBuildInfoFile) {
@@ -1287,6 +1287,59 @@ var resolvePackageManagerExecutable = /* @__PURE__ */ __name(() => {
1287
1287
  return "npx";
1288
1288
  }
1289
1289
  }, "resolvePackageManagerExecutable");
1290
+ var splitCommandArgs = /* @__PURE__ */ __name((value) => {
1291
+ const args = [];
1292
+ let current = "";
1293
+ let quote = null;
1294
+ let escaped = false;
1295
+ for (const char of value) {
1296
+ if (escaped) {
1297
+ current += char;
1298
+ escaped = false;
1299
+ continue;
1300
+ }
1301
+ if (char === "\\") {
1302
+ escaped = true;
1303
+ continue;
1304
+ }
1305
+ if (quote) {
1306
+ if (char === quote) {
1307
+ quote = null;
1308
+ } else {
1309
+ current += char;
1310
+ }
1311
+ continue;
1312
+ }
1313
+ if (char === '"' || char === "'") {
1314
+ quote = char;
1315
+ continue;
1316
+ }
1317
+ if (char.trim() === "") {
1318
+ if (current) {
1319
+ args.push(current);
1320
+ current = "";
1321
+ }
1322
+ continue;
1323
+ }
1324
+ current += char;
1325
+ }
1326
+ if (current) {
1327
+ args.push(current);
1328
+ }
1329
+ return args;
1330
+ }, "splitCommandArgs");
1331
+ var formatCommandForDisplay = /* @__PURE__ */ __name((executable, args) => {
1332
+ const formatArg = /* @__PURE__ */ __name((arg) => {
1333
+ if (/[\s'"]/.test(arg)) {
1334
+ return JSON.stringify(arg);
1335
+ }
1336
+ return arg;
1337
+ }, "formatArg");
1338
+ return [
1339
+ executable,
1340
+ ...args
1341
+ ].map(formatArg).join(" ");
1342
+ }, "formatCommandForDisplay");
1290
1343
  var compileTs = /* @__PURE__ */ __name((mapComponentsToExpose, tsConfig, remoteOptions) => __async(void 0, null, function* () {
1291
1344
  var _a2, _b, _c, _d;
1292
1345
  if (!Object.keys(mapComponentsToExpose).length) {
@@ -1302,12 +1355,22 @@ var compileTs = /* @__PURE__ */ __name((mapComponentsToExpose, tsConfig, remoteO
1302
1355
  context: remoteOptions.context,
1303
1356
  exclude: typeof remoteOptions.extractThirdParty === "object" ? remoteOptions.extractThirdParty.exclude : void 0
1304
1357
  });
1305
- const execPromise = import_util.default.promisify(import_child_process.exec);
1358
+ const execPromise = import_util.default.promisify(import_child_process.execFile);
1306
1359
  const pmExecutable = resolvePackageManagerExecutable();
1307
- const cmd = `${pmExecutable} ${remoteOptions.compilerInstance} --project '${tempTsConfigJsonPath}'`;
1360
+ const compilerArgs = splitCommandArgs(remoteOptions.compilerInstance);
1361
+ const resolvedCompilerArgs = compilerArgs.length > 0 ? compilerArgs : [
1362
+ remoteOptions.compilerInstance
1363
+ ];
1364
+ const cmdArgs = [
1365
+ ...resolvedCompilerArgs,
1366
+ "--project",
1367
+ tempTsConfigJsonPath
1368
+ ];
1369
+ const cmd = formatCommandForDisplay(pmExecutable, cmdArgs);
1308
1370
  try {
1309
- yield execPromise(cmd, {
1310
- cwd: typeof remoteOptions.moduleFederationConfig.dts !== "boolean" ? (_d = (_c = remoteOptions.moduleFederationConfig.dts) == null ? void 0 : _c.cwd) != null ? _d : void 0 : void 0
1371
+ yield execPromise(pmExecutable, cmdArgs, {
1372
+ cwd: typeof remoteOptions.moduleFederationConfig.dts !== "boolean" ? (_d = (_c = remoteOptions.moduleFederationConfig.dts) == null ? void 0 : _c.cwd) != null ? _d : void 0 : void 0,
1373
+ shell: process.platform === "win32"
1311
1374
  });
1312
1375
  } catch (err) {
1313
1376
  if (compilerOptions.tsBuildInfoFile) {
package/dist/index.js CHANGED
@@ -1130,6 +1130,59 @@ var resolvePackageManagerExecutable = /* @__PURE__ */ __name(() => {
1130
1130
  return "npx";
1131
1131
  }
1132
1132
  }, "resolvePackageManagerExecutable");
1133
+ var splitCommandArgs = /* @__PURE__ */ __name((value) => {
1134
+ const args = [];
1135
+ let current = "";
1136
+ let quote = null;
1137
+ let escaped = false;
1138
+ for (const char of value) {
1139
+ if (escaped) {
1140
+ current += char;
1141
+ escaped = false;
1142
+ continue;
1143
+ }
1144
+ if (char === "\\") {
1145
+ escaped = true;
1146
+ continue;
1147
+ }
1148
+ if (quote) {
1149
+ if (char === quote) {
1150
+ quote = null;
1151
+ } else {
1152
+ current += char;
1153
+ }
1154
+ continue;
1155
+ }
1156
+ if (char === '"' || char === "'") {
1157
+ quote = char;
1158
+ continue;
1159
+ }
1160
+ if (char.trim() === "") {
1161
+ if (current) {
1162
+ args.push(current);
1163
+ current = "";
1164
+ }
1165
+ continue;
1166
+ }
1167
+ current += char;
1168
+ }
1169
+ if (current) {
1170
+ args.push(current);
1171
+ }
1172
+ return args;
1173
+ }, "splitCommandArgs");
1174
+ var formatCommandForDisplay = /* @__PURE__ */ __name((executable, args) => {
1175
+ const formatArg = /* @__PURE__ */ __name((arg) => {
1176
+ if (/[\s'"]/.test(arg)) {
1177
+ return JSON.stringify(arg);
1178
+ }
1179
+ return arg;
1180
+ }, "formatArg");
1181
+ return [
1182
+ executable,
1183
+ ...args
1184
+ ].map(formatArg).join(" ");
1185
+ }, "formatCommandForDisplay");
1133
1186
  var compileTs = /* @__PURE__ */ __name((mapComponentsToExpose, tsConfig, remoteOptions) => __async(void 0, null, function* () {
1134
1187
  var _a3, _b, _c, _d;
1135
1188
  if (!Object.keys(mapComponentsToExpose).length) {
@@ -1145,12 +1198,22 @@ var compileTs = /* @__PURE__ */ __name((mapComponentsToExpose, tsConfig, remoteO
1145
1198
  context: remoteOptions.context,
1146
1199
  exclude: typeof remoteOptions.extractThirdParty === "object" ? remoteOptions.extractThirdParty.exclude : void 0
1147
1200
  });
1148
- const execPromise = import_util.default.promisify(import_child_process.exec);
1201
+ const execPromise = import_util.default.promisify(import_child_process.execFile);
1149
1202
  const pmExecutable = resolvePackageManagerExecutable();
1150
- const cmd = `${pmExecutable} ${remoteOptions.compilerInstance} --project '${tempTsConfigJsonPath}'`;
1203
+ const compilerArgs = splitCommandArgs(remoteOptions.compilerInstance);
1204
+ const resolvedCompilerArgs = compilerArgs.length > 0 ? compilerArgs : [
1205
+ remoteOptions.compilerInstance
1206
+ ];
1207
+ const cmdArgs = [
1208
+ ...resolvedCompilerArgs,
1209
+ "--project",
1210
+ tempTsConfigJsonPath
1211
+ ];
1212
+ const cmd = formatCommandForDisplay(pmExecutable, cmdArgs);
1151
1213
  try {
1152
- yield execPromise(cmd, {
1153
- cwd: typeof remoteOptions.moduleFederationConfig.dts !== "boolean" ? (_d = (_c = remoteOptions.moduleFederationConfig.dts) == null ? void 0 : _c.cwd) != null ? _d : void 0 : void 0
1214
+ yield execPromise(pmExecutable, cmdArgs, {
1215
+ cwd: typeof remoteOptions.moduleFederationConfig.dts !== "boolean" ? (_d = (_c = remoteOptions.moduleFederationConfig.dts) == null ? void 0 : _c.cwd) != null ? _d : void 0 : void 0,
1216
+ shell: process.platform === "win32"
1154
1217
  });
1155
1218
  } catch (err) {
1156
1219
  if (compilerOptions.tsBuildInfoFile) {
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/dts-plugin",
3
- "version": "0.24.1",
3
+ "version": "2.0.1",
4
4
  "author": "hanric <hanric.zhang@gmail.com>",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -74,7 +74,7 @@
74
74
  "rimraf": "~6.0.1",
75
75
  "vue": "^3.5.13",
76
76
  "vue-tsc": "^2.2.10",
77
- "webpack": "^5.98.0"
77
+ "webpack": "^5.104.1"
78
78
  },
79
79
  "peerDependencies": {
80
80
  "typescript": "^4.9.0 || ^5.0.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/dts-plugin",
3
- "version": "0.24.1",
3
+ "version": "2.0.1",
4
4
  "author": "hanric <hanric.zhang@gmail.com>",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -60,10 +60,10 @@
60
60
  "node-schedule": "2.1.1",
61
61
  "rambda": "^9.1.0",
62
62
  "ws": "8.18.0",
63
- "@module-federation/error-codes": "0.24.1",
64
- "@module-federation/managers": "0.24.1",
65
- "@module-federation/third-party-dts-extractor": "0.24.1",
66
- "@module-federation/sdk": "0.24.1"
63
+ "@module-federation/error-codes": "2.0.1",
64
+ "@module-federation/managers": "2.0.1",
65
+ "@module-federation/sdk": "2.0.1",
66
+ "@module-federation/third-party-dts-extractor": "2.0.1"
67
67
  },
68
68
  "devDependencies": {
69
69
  "@types/koa": "2.15.0",
@@ -73,8 +73,8 @@
73
73
  "rimraf": "~6.0.1",
74
74
  "vue": "^3.5.13",
75
75
  "vue-tsc": "^2.2.10",
76
- "webpack": "^5.98.0",
77
- "@module-federation/runtime": "0.24.1"
76
+ "webpack": "^5.104.1",
77
+ "@module-federation/runtime": "2.0.1"
78
78
  },
79
79
  "peerDependencies": {
80
80
  "typescript": "^4.9.0 || ^5.0.0",