@module-federation/dts-plugin 0.2.8 → 0.3.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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __name
3
- } from "./chunk-MQRIERJP.js";
3
+ } from "./chunk-6DND574L.js";
4
4
 
5
5
  // packages/dts-plugin/src/dev-worker/utils.ts
6
6
  var DEFAULT_LOCAL_IPS = [
package/dist/esm/core.js CHANGED
@@ -1,9 +1,15 @@
1
1
  import {
2
- DTSManager,
3
2
  DtsWorker,
4
3
  consumeTypes,
5
- generateTypes,
6
4
  generateTypesInChildProcess,
5
+ rpc_exports
6
+ } from "./chunk-DEW2PNCR.js";
7
+ import {
8
+ DTSManager,
9
+ HOST_API_TYPES_FILE_NAME,
10
+ REMOTE_ALIAS_IDENTIFIER,
11
+ REMOTE_API_TYPES_FILE_NAME,
12
+ generateTypes,
7
13
  getDTSManagerConstructor,
8
14
  isTSProject,
9
15
  retrieveHostConfig,
@@ -12,22 +18,16 @@ import {
12
18
  retrieveRemoteConfig,
13
19
  retrieveTypesAssetsInfo,
14
20
  retrieveTypesZipPath,
15
- rpc_exports,
16
21
  validateOptions
17
- } from "./chunk-2RCHPGBO.js";
18
- import {
19
- HOST_API_TYPES_FILE_NAME,
20
- REMOTE_ALIAS_IDENTIFIER,
21
- REMOTE_API_TYPES_FILE_NAME,
22
- UpdateMode
23
- } from "./chunk-MQRIERJP.js";
22
+ } from "./chunk-SFEGBRA3.js";
23
+ import "./chunk-HKRTV6ZH.js";
24
+ import "./chunk-6DND574L.js";
24
25
  export {
25
26
  DTSManager,
26
27
  DtsWorker,
27
28
  HOST_API_TYPES_FILE_NAME,
28
29
  REMOTE_ALIAS_IDENTIFIER,
29
30
  REMOTE_API_TYPES_FILE_NAME,
30
- UpdateMode,
31
31
  consumeTypes,
32
32
  generateTypes,
33
33
  generateTypesInChildProcess,
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  getIpFromEntry
3
- } from "./chunk-G7ONFBMA.js";
3
+ } from "./chunk-XKCIYRDL.js";
4
4
  import {
5
5
  AddDynamicRemoteAction,
6
6
  DEFAULT_WEB_SOCKET_PORT,
7
7
  FetchTypesAction,
8
8
  WEB_SOCKET_CONNECT_MAGIC_ID,
9
9
  __name
10
- } from "./chunk-MQRIERJP.js";
10
+ } from "./chunk-6DND574L.js";
11
11
 
12
12
  // packages/dts-plugin/src/server/createWebsocket.ts
13
13
  import WebSocket from "isomorphic-ws";
@@ -1,25 +1,29 @@
1
+ import {
2
+ rpc_exports
3
+ } from "./chunk-DEW2PNCR.js";
1
4
  import {
2
5
  ModuleFederationDevServer,
3
6
  createKoaServer,
4
- fileLog,
5
7
  getDTSManagerConstructor,
6
- getIPV4,
7
8
  retrieveHostConfig,
8
9
  retrieveMfTypesPath,
9
10
  retrieveRemoteConfig,
10
- retrieveTypesZipPath,
11
- rpc_exports
12
- } from "./chunk-2RCHPGBO.js";
11
+ retrieveTypesZipPath
12
+ } from "./chunk-SFEGBRA3.js";
13
+ import {
14
+ fileLog,
15
+ getIPV4
16
+ } from "./chunk-HKRTV6ZH.js";
13
17
  import {
14
18
  getIpFromEntry
15
- } from "./chunk-G7ONFBMA.js";
19
+ } from "./chunk-XKCIYRDL.js";
16
20
  import {
17
21
  DEFAULT_TAR_NAME,
18
22
  UpdateKind,
19
23
  UpdateMode,
20
24
  __async,
21
25
  __name
22
- } from "./chunk-MQRIERJP.js";
26
+ } from "./chunk-6DND574L.js";
23
27
 
24
28
  // packages/dts-plugin/src/dev-worker/forkDevWorker.ts
25
29
  import { decodeName } from "@module-federation/sdk";
@@ -2,11 +2,12 @@ import {
2
2
  RpcGMCallTypes,
3
3
  exposeRpc,
4
4
  generateTypes
5
- } from "./chunk-2RCHPGBO.js";
5
+ } from "./chunk-SFEGBRA3.js";
6
+ import "./chunk-HKRTV6ZH.js";
6
7
  import {
7
8
  __async,
8
9
  __name
9
- } from "./chunk-MQRIERJP.js";
10
+ } from "./chunk-6DND574L.js";
10
11
 
11
12
  // packages/dts-plugin/src/core/lib/forkGenerateDts.ts
12
13
  function forkGenerateDts(options) {
package/dist/esm/index.js CHANGED
@@ -1,13 +1,18 @@
1
1
  import {
2
2
  consumeTypes,
3
- generateTypes,
4
3
  generateTypesInChildProcess,
5
- getIPV4,
4
+ rpc_exports
5
+ } from "./chunk-DEW2PNCR.js";
6
+ import {
7
+ cloneDeepOptions,
8
+ generateTypes,
6
9
  isTSProject,
7
10
  retrieveTypesAssetsInfo,
8
- rpc_exports,
9
11
  validateOptions
10
- } from "./chunk-2RCHPGBO.js";
12
+ } from "./chunk-SFEGBRA3.js";
13
+ import {
14
+ getIPV4
15
+ } from "./chunk-HKRTV6ZH.js";
11
16
  import {
12
17
  WEB_CLIENT_OPTIONS_IDENTIFIER,
13
18
  __async,
@@ -15,7 +20,7 @@ import {
15
20
  __publicField,
16
21
  __spreadProps,
17
22
  __spreadValues
18
- } from "./chunk-MQRIERJP.js";
23
+ } from "./chunk-6DND574L.js";
19
24
 
20
25
  // packages/dts-plugin/src/plugins/DevPlugin.ts
21
26
  import fs from "fs-extra";
@@ -27,17 +32,12 @@ import * as fse from "fs-extra";
27
32
 
28
33
  // packages/dts-plugin/src/dev-worker/DevWorker.ts
29
34
  import path from "path";
30
- import cloneDeepWith from "lodash.clonedeepwith";
31
35
  var _DevWorker = class _DevWorker {
32
36
  constructor(options) {
33
37
  __publicField(this, "_rpcWorker");
34
38
  __publicField(this, "_options");
35
39
  __publicField(this, "_res");
36
- this._options = cloneDeepWith(options, (_value, key) => {
37
- if (key === "manifest") {
38
- return false;
39
- }
40
- });
40
+ this._options = cloneDeepOptions(options);
41
41
  this.removeUnSerializationOptions();
42
42
  this._rpcWorker = rpc_exports.createRpcWorker(path.resolve(__dirname, "./fork-dev-worker.js"), {}, void 0, false);
43
43
  this._res = this._rpcWorker.connect(this._options);
@@ -184,14 +184,17 @@ var _DevPlugin = class _DevPlugin {
184
184
  if (!normalizedDev.disableLiveReload) {
185
185
  const TEMP_DIR = path3.join(`${process.cwd()}/node_modules`, BasicTempDir);
186
186
  const filepath = path3.join(TEMP_DIR, `live-reload.js`);
187
- _DevPlugin.ensureLiveReloadEntry({
188
- name
189
- }, filepath);
190
- compiler.hooks.afterPlugins.tap("MFDevPlugin", () => {
191
- new compiler.webpack.EntryPlugin(compiler.context, filepath, {
187
+ if (typeof compiler.options.entry === "object") {
188
+ _DevPlugin.ensureLiveReloadEntry({
192
189
  name
193
- }).apply(compiler);
194
- });
190
+ }, filepath);
191
+ Object.keys(compiler.options.entry).forEach((entry) => {
192
+ const normalizedEntry = compiler.options.entry[entry];
193
+ if (typeof normalizedEntry === "object" && Array.isArray(normalizedEntry.import)) {
194
+ normalizedEntry.import.unshift(filepath);
195
+ }
196
+ });
197
+ }
195
198
  }
196
199
  const defaultGenerateTypes = {
197
200
  compileInChildProcess: true
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  Broker,
3
3
  fileLog
4
- } from "./chunk-2RCHPGBO.js";
4
+ } from "./chunk-HKRTV6ZH.js";
5
5
  import {
6
6
  __async,
7
7
  __name
8
- } from "./chunk-MQRIERJP.js";
8
+ } from "./chunk-6DND574L.js";
9
9
 
10
10
  // packages/dts-plugin/src/server/broker/startBroker.ts
11
11
  var broker;
@@ -1,4 +1,4 @@
1
- import { D as DTSManagerOptions } from './DTSManagerOptions-c0728719.js';
1
+ import { D as DTSManagerOptions } from './DTSManagerOptions-7109e8ac.js';
2
2
  import '@module-federation/sdk';
3
3
 
4
4
  interface DevWorkerOptions extends DTSManagerOptions {
@@ -1,4 +1,4 @@
1
- import { D as DTSManagerOptions } from './DTSManagerOptions-c0728719.js';
1
+ import { D as DTSManagerOptions } from './DTSManagerOptions-7109e8ac.js';
2
2
  import '@module-federation/sdk';
3
3
 
4
4
  interface DevWorkerOptions extends DTSManagerOptions {
@@ -93,7 +93,6 @@ var import_path4 = __toESM(require("path"));
93
93
  var import_promises3 = require("fs/promises");
94
94
  var import_fs = __toESM(require("fs"));
95
95
  var import_sdk5 = require("@module-federation/sdk");
96
- var import_lodash = __toESM(require("lodash.clonedeepwith"));
97
96
  var import_third_party_dts_extractor2 = require("@module-federation/third-party-dts-extractor");
98
97
 
99
98
  // packages/dts-plugin/src/core/lib/archiveHandler.ts
@@ -103,8 +102,8 @@ var import_promises2 = require("fs/promises");
103
102
 
104
103
  // packages/dts-plugin/src/core/lib/typeScriptCompiler.ts
105
104
  var import_fs_extra = require("fs-extra");
105
+ var import_crypto = __toESM(require("crypto"));
106
106
  var import_promises = require("fs/promises");
107
- var import_crypto = require("crypto");
108
107
  var import_path = require("path");
109
108
  var import_third_party_dts_extractor = require("@module-federation/third-party-dts-extractor");
110
109
  var import_child_process = require("child_process");
@@ -115,8 +114,12 @@ var DEFINITION_FILE_EXTENSION = ".d.ts";
115
114
  var retrieveMfTypesPath = /* @__PURE__ */ __name((tsConfig, remoteOptions) => (0, import_path.normalize)(tsConfig.compilerOptions.outDir.replace(remoteOptions.compiledTypesFolder, "")), "retrieveMfTypesPath");
116
115
  var retrieveOriginalOutDir = /* @__PURE__ */ __name((tsConfig, remoteOptions) => (0, import_path.normalize)(tsConfig.compilerOptions.outDir.replace(remoteOptions.compiledTypesFolder, "").replace(remoteOptions.typesFolder, "")), "retrieveOriginalOutDir");
117
116
  var retrieveMfAPITypesPath = /* @__PURE__ */ __name((tsConfig, remoteOptions) => (0, import_path.join)(retrieveOriginalOutDir(tsConfig, remoteOptions), `${remoteOptions.typesFolder}.d.ts`), "retrieveMfAPITypesPath");
118
- function writeTempTsConfig(tsConfig, context) {
119
- const tempTsConfigJsonPath = (0, import_path.resolve)(context, "node_modules", import_sdk.TEMP_DIR, `tsconfig.${(0, import_crypto.randomUUID)()}.json`);
117
+ function writeTempTsConfig(tsConfig, context, name) {
118
+ const createHash = /* @__PURE__ */ __name((contents) => {
119
+ return import_crypto.default.createHash("md5").update(contents).digest("hex");
120
+ }, "createHash");
121
+ const hash = createHash(`${JSON.stringify(tsConfig)}${name}`);
122
+ const tempTsConfigJsonPath = (0, import_path.resolve)(context, "node_modules", import_sdk.TEMP_DIR, `tsconfig.${hash}.json`);
120
123
  (0, import_fs_extra.ensureDirSync)((0, import_path.dirname)(tempTsConfigJsonPath));
121
124
  (0, import_fs_extra.writeFileSync)(tempTsConfigJsonPath, JSON.stringify(tsConfig, null, 2));
122
125
  return tempTsConfigJsonPath;
@@ -169,7 +172,7 @@ var compileTs = /* @__PURE__ */ __name((mapComponentsToExpose, tsConfig, remoteO
169
172
  return;
170
173
  }
171
174
  const { compilerOptions } = tsConfig;
172
- const tempTsConfigJsonPath = writeTempTsConfig(tsConfig, remoteOptions.context);
175
+ const tempTsConfigJsonPath = writeTempTsConfig(tsConfig, remoteOptions.context, remoteOptions.moduleFederationConfig.name || "mf");
173
176
  try {
174
177
  const mfTypePath = retrieveMfTypesPath(tsConfig, remoteOptions);
175
178
  const thirdPartyExtractor = new import_third_party_dts_extractor.ThirdPartyExtractor((0, import_path.resolve)(mfTypePath, "node_modules"), remoteOptions.context);
@@ -334,6 +337,11 @@ var DEFAULT_WEB_SOCKET_PORT = 16322;
334
337
  var WEB_SOCKET_CONNECT_MAGIC_ID = "1hpzW-zo2z-o8io-gfmV1-2cb1d82";
335
338
  var MF_SERVER_IDENTIFIER = "Module Federation Dev Server";
336
339
  var DEFAULT_TAR_NAME = "@mf-types.zip";
340
+ var UpdateMode;
341
+ (function(UpdateMode2) {
342
+ UpdateMode2["POSITIVE"] = "POSITIVE";
343
+ UpdateMode2["PASSIVE"] = "PASSIVE";
344
+ })(UpdateMode || (UpdateMode = {}));
337
345
 
338
346
  // packages/dts-plugin/src/server/utils/log.ts
339
347
  function fileLog(msg, module2, level) {
@@ -639,16 +647,6 @@ var _UpdatePublisherAction = class _UpdatePublisherAction extends Action {
639
647
  __name(_UpdatePublisherAction, "UpdatePublisherAction");
640
648
  var UpdatePublisherAction = _UpdatePublisherAction;
641
649
 
642
- // packages/dts-plugin/src/core/constant.ts
643
- var REMOTE_ALIAS_IDENTIFIER = "REMOTE_ALIAS_IDENTIFIER";
644
- var REMOTE_API_TYPES_FILE_NAME = "apis.d.ts";
645
- var HOST_API_TYPES_FILE_NAME = "index.d.ts";
646
- var UpdateMode;
647
- (function(UpdateMode2) {
648
- UpdateMode2["POSITIVE"] = "POSITIVE";
649
- UpdateMode2["PASSIVE"] = "PASSIVE";
650
- })(UpdateMode || (UpdateMode = {}));
651
-
652
650
  // packages/dts-plugin/src/server/broker/Broker.ts
653
651
  var _Broker = class _Broker {
654
652
  constructor() {
@@ -1275,12 +1273,12 @@ var _ModuleFederationDevServer = class _ModuleFederationDevServer {
1275
1273
  var _a3;
1276
1274
  fileLog(`Current pid: ${process.pid}, publisher:${this._name} connected to ws://${this._ip}:${Broker.DEFAULT_WEB_SOCKET_PORT}, starting service...`, MF_SERVER_IDENTIFIER, "info");
1277
1275
  this._isConnected = true;
1278
- const startGarfishModule = new AddPublisherAction({
1276
+ const addPublisherAction = new AddPublisherAction({
1279
1277
  name: this._name,
1280
1278
  ip: this._ip,
1281
1279
  remoteTypeTarPath: this._remoteTypeTarPath
1282
1280
  });
1283
- (_a3 = this._publishWebSocket) == null ? void 0 : _a3.send(JSON.stringify(startGarfishModule));
1281
+ (_a3 = this._publishWebSocket) == null ? void 0 : _a3.send(JSON.stringify(addPublisherAction));
1284
1282
  this._connectSubscribers();
1285
1283
  });
1286
1284
  this._publishWebSocket.on("message", (message) => __async(this, null, function* () {
@@ -1543,11 +1541,11 @@ var _ModuleFederationDevServer = class _ModuleFederationDevServer {
1543
1541
  if (!this._publishWebSocket || !this._isConnected) {
1544
1542
  return;
1545
1543
  }
1546
- const { updateKind, updateMode, updateSourcePaths } = options;
1544
+ const { updateKind, updateMode, updateSourcePaths, clientName } = options;
1547
1545
  fileLog(`update run, ${this._name} module update, updateKind: ${updateKind}, updateMode: ${updateMode}, updateSourcePaths: ${updateSourcePaths}`, MF_SERVER_IDENTIFIER, "info");
1548
1546
  if (updateKind === UpdateKind.RELOAD_PAGE) {
1549
1547
  const notifyWebClient = new NotifyWebClientAction({
1550
- name: this._name,
1548
+ name: clientName || this._name,
1551
1549
  updateMode
1552
1550
  });
1553
1551
  this._publishWebSocket.send(JSON.stringify(notifyWebClient));
@@ -1689,7 +1687,8 @@ var defaultOptions = {
1689
1687
  implementation: "",
1690
1688
  context: process.cwd(),
1691
1689
  abortOnError: true,
1692
- consumeAPITypes: false
1690
+ consumeAPITypes: false,
1691
+ runtimePkgs: []
1693
1692
  };
1694
1693
  var buildZipUrl = /* @__PURE__ */ __name((hostOptions, url) => {
1695
1694
  const remoteUrl = new URL(url, "file:");
@@ -1748,6 +1747,11 @@ var retrieveHostConfig = /* @__PURE__ */ __name((options) => {
1748
1747
  };
1749
1748
  }, "retrieveHostConfig");
1750
1749
 
1750
+ // packages/dts-plugin/src/core/constant.ts
1751
+ var REMOTE_ALIAS_IDENTIFIER = "REMOTE_ALIAS_IDENTIFIER";
1752
+ var REMOTE_API_TYPES_FILE_NAME = "apis.d.ts";
1753
+ var HOST_API_TYPES_FILE_NAME = "index.d.ts";
1754
+
1751
1755
  // packages/dts-plugin/src/core/lib/DTSManager.ts
1752
1756
  var _a;
1753
1757
  var DTSManager = (_a = class {
@@ -1758,11 +1762,7 @@ var DTSManager = (_a = class {
1758
1762
  __publicField(this, "loadedRemoteAPIAlias");
1759
1763
  __publicField(this, "extraOptions");
1760
1764
  __publicField(this, "updatedRemoteInfos");
1761
- this.options = (0, import_lodash.default)(options, (_value, key) => {
1762
- if (key === "manifest") {
1763
- return false;
1764
- }
1765
- });
1765
+ this.options = cloneDeepOptions(options);
1766
1766
  this.runtimePkgs = [
1767
1767
  "@module-federation/runtime",
1768
1768
  "@module-federation/enhanced/runtime",
@@ -1973,7 +1973,16 @@ var DTSManager = (_a = class {
1973
1973
  ...packageTypes,
1974
1974
  "Y"
1975
1975
  ].join(" :\n")} ;`;
1976
- const pkgsDeclareStr = this.runtimePkgs.map((pkg) => {
1976
+ const runtimePkgs = /* @__PURE__ */ new Set();
1977
+ [
1978
+ ...this.runtimePkgs,
1979
+ ...hostOptions.runtimePkgs
1980
+ ].forEach((pkg) => {
1981
+ runtimePkgs.add(pkg);
1982
+ });
1983
+ const pkgsDeclareStr = [
1984
+ ...runtimePkgs
1985
+ ].map((pkg) => {
1977
1986
  return `declare module "${pkg}" {
1978
1987
  ${remoteKeysStr}
1979
1988
  ${packageTypesStr}
@@ -2106,6 +2115,7 @@ var DTSManager = (_a = class {
2106
2115
  }, __name(_a, "DTSManager"), _a);
2107
2116
 
2108
2117
  // packages/dts-plugin/src/core/lib/utils.ts
2118
+ var import_lodash = __toESM(require("lodash.clonedeepwith"));
2109
2119
  function getDTSManagerConstructor(implementation) {
2110
2120
  if (implementation) {
2111
2121
  const NewConstructor = require(implementation);
@@ -2123,6 +2133,18 @@ function isDebugMode() {
2123
2133
  return Boolean(process.env["FEDERATION_DEBUG"]) || process.env["NODE_ENV"] === "test";
2124
2134
  }
2125
2135
  __name(isDebugMode, "isDebugMode");
2136
+ function cloneDeepOptions(options) {
2137
+ const excludeKeys = [
2138
+ "manifest",
2139
+ "async"
2140
+ ];
2141
+ return (0, import_lodash.default)(options, (_value, key) => {
2142
+ if (typeof key === "string" && excludeKeys.includes(key)) {
2143
+ return false;
2144
+ }
2145
+ });
2146
+ }
2147
+ __name(cloneDeepOptions, "cloneDeepOptions");
2126
2148
  function axiosGet(url, config) {
2127
2149
  return __async(this, null, function* () {
2128
2150
  const httpAgent = new import_http2.default.Agent({
@@ -2175,6 +2197,7 @@ function getEffectiveRootDir(parsedCommandLine) {
2175
2197
  }
2176
2198
  __name(getEffectiveRootDir, "getEffectiveRootDir");
2177
2199
  var readTsConfig = /* @__PURE__ */ __name(({ tsConfigPath, typesFolder, compiledTypesFolder, context, additionalFilesToCompile }, mapComponentsToExpose) => {
2200
+ var _a3;
2178
2201
  const resolvedTsConfigPath = (0, import_path5.resolve)(context, tsConfigPath);
2179
2202
  const readResult = import_typescript.default.readConfigFile(resolvedTsConfigPath, import_typescript.default.sys.readFile);
2180
2203
  if (readResult.error) {
@@ -2193,6 +2216,7 @@ var readTsConfig = /* @__PURE__ */ __name(({ tsConfigPath, typesFolder, compiled
2193
2216
  };
2194
2217
  rawTsConfigJson.compilerOptions = rawTsConfigJson.compilerOptions || {};
2195
2218
  rawTsConfigJson.compilerOptions = __spreadValues(__spreadValues({}, rawTsConfigJson.compilerOptions), defaultCompilerOptions);
2219
+ (_a3 = rawTsConfigJson.compilerOptions) == null ? true : delete _a3.paths;
2196
2220
  const filesToCompile = [
2197
2221
  ...Object.values(mapComponentsToExpose),
2198
2222
  ...additionalFilesToCompile
@@ -2201,10 +2225,7 @@ var readTsConfig = /* @__PURE__ */ __name(({ tsConfigPath, typesFolder, compiled
2201
2225
  rawTsConfigJson.files = filesToCompile;
2202
2226
  rawTsConfigJson.exclude = [];
2203
2227
  "references" in rawTsConfigJson && delete rawTsConfigJson.references;
2204
- const extendsPath = rawTsConfigJson.extends;
2205
- if (extendsPath && extendsPath.startsWith(".")) {
2206
- rawTsConfigJson.extends = (0, import_path5.resolve)(context, extendsPath);
2207
- }
2228
+ rawTsConfigJson.extends = resolvedTsConfigPath;
2208
2229
  return rawTsConfigJson;
2209
2230
  }, "readTsConfig");
2210
2231
  var TS_EXTENSIONS = [
@@ -2251,9 +2272,6 @@ var retrieveRemoteConfig = /* @__PURE__ */ __name((options) => {
2251
2272
  };
2252
2273
  }, "retrieveRemoteConfig");
2253
2274
 
2254
- // packages/dts-plugin/src/core/lib/DtsWorker.ts
2255
- var import_lodash2 = __toESM(require("lodash.clonedeepwith"));
2256
-
2257
2275
  // packages/dts-plugin/src/core/rpc/index.ts
2258
2276
  var rpc_exports = {};
2259
2277
  __export(rpc_exports, {
@@ -2462,11 +2480,24 @@ function createRpcWorker(modulePath, data, memoryLimit, once) {
2462
2480
  return remoteMethod(...args);
2463
2481
  },
2464
2482
  terminate() {
2465
- var _a3;
2466
- (_a3 = childProcess == null ? void 0 : childProcess.send) == null ? void 0 : _a3.call(childProcess, {
2467
- type: RpcGMCallTypes.EXIT,
2468
- id
2469
- });
2483
+ try {
2484
+ if (childProcess.connected) {
2485
+ childProcess.send({
2486
+ type: RpcGMCallTypes.EXIT,
2487
+ id
2488
+ }, (err) => {
2489
+ if (err) {
2490
+ console.error("Error sending message:", err);
2491
+ }
2492
+ });
2493
+ }
2494
+ } catch (error2) {
2495
+ if (error2.code === "EPIPE") {
2496
+ console.error("Pipe closed before message could be sent:", error2);
2497
+ } else {
2498
+ console.error("Unexpected error:", error2);
2499
+ }
2500
+ }
2470
2501
  childProcess = void 0;
2471
2502
  remoteMethod = void 0;
2472
2503
  },
@@ -1,6 +1,6 @@
1
- import { m as DtsWorkerOptions } from './DtsWorker-90454949.js';
1
+ import { k as DtsWorkerOptions } from './DtsWorker-17de6ba4.js';
2
2
  import 'child_process';
3
- import './DTSManagerOptions-c0728719.js';
3
+ import './DTSManagerOptions-7109e8ac.js';
4
4
  import '@module-federation/sdk';
5
5
  import 'typescript';
6
6
 
@@ -1,6 +1,6 @@
1
- import { m as DtsWorkerOptions } from './DtsWorker-90454949.js';
1
+ import { k as DtsWorkerOptions } from './DtsWorker-17de6ba4.js';
2
2
  import 'child_process';
3
- import './DTSManagerOptions-c0728719.js';
3
+ import './DTSManagerOptions-7109e8ac.js';
4
4
  import '@module-federation/sdk';
5
5
  import 'typescript';
6
6