@module-federation/dts-plugin 2.3.0 → 2.3.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.
@@ -7,7 +7,6 @@ let http = require("http");
7
7
  let _module_federation_sdk = require("@module-federation/sdk");
8
8
  let net = require("net");
9
9
  net = require_Action.__toESM(net);
10
- require("chalk");
11
10
  let os = require("os");
12
11
  os = require_Action.__toESM(os);
13
12
  let isomorphic_ws = require("isomorphic-ws");
package/dist/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @module-federation/dts-plugin
2
2
 
3
+ ## 2.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - @module-federation/sdk@2.3.1
8
+ - @module-federation/managers@2.3.1
9
+ - @module-federation/third-party-dts-extractor@2.3.1
10
+ - @module-federation/error-codes@2.3.1
11
+
3
12
  ## 2.3.0
4
13
 
5
14
  ### Minor Changes
@@ -1,5 +1,5 @@
1
1
  const require_Action = require('./Action-CzhPMw2i.js');
2
- const require_expose_rpc = require('./expose-rpc-xfJEPIyY.js');
2
+ const require_expose_rpc = require('./expose-rpc-C93yOgOB.js');
3
3
  let path = require("path");
4
4
  path = require_Action.__toESM(path);
5
5
  let crypto = require("crypto");
package/dist/core.js CHANGED
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- require('./Broker-BGm-heAJ.js');
3
- const require_expose_rpc = require('./expose-rpc-xfJEPIyY.js');
4
- const require_consumeTypes = require('./consumeTypes-ClKC4akt.js');
2
+ require('./Broker-eLXU1Wnf.js');
3
+ const require_expose_rpc = require('./expose-rpc-C93yOgOB.js');
4
+ const require_consumeTypes = require('./consumeTypes-K9bTh9DW.js');
5
5
 
6
6
  exports.DTSManager = require_expose_rpc.DTSManager;
7
7
  exports.DtsWorker = require_consumeTypes.DtsWorker;
@@ -4,7 +4,6 @@ import * as fs$1 from "fs";
4
4
  import { createServer } from "http";
5
5
  import { SEPARATOR, createLogger } from "@module-federation/sdk";
6
6
  import net from "net";
7
- import "chalk";
8
7
  import os from "os";
9
8
  import WebSocket from "isomorphic-ws";
10
9
  import schedule from "node-schedule";
@@ -1,4 +1,4 @@
1
- import { a as cloneDeepOptions, n as RpcGMCallTypes, o as getDTSManagerConstructor, s as isDebugMode, t as exposeRpc, x as __exportAll } from "./expose-rpc-Pg59hZO8.mjs";
1
+ import { a as cloneDeepOptions, n as RpcGMCallTypes, o as getDTSManagerConstructor, s as isDebugMode, t as exposeRpc, x as __exportAll } from "./expose-rpc-DJAoDLdo.mjs";
2
2
  import path from "path";
3
3
  import { randomUUID } from "crypto";
4
4
  import * as child_process from "child_process";
package/dist/esm/core.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as retrieveMfTypesPath, c as isTSProject, d as DTSManager, f as HOST_API_TYPES_FILE_NAME, g as retrieveTypesZipPath, h as retrieveHostConfig, i as retrieveRemoteConfig, l as retrieveTypesAssetsInfo, m as REMOTE_API_TYPES_FILE_NAME, o as getDTSManagerConstructor, p as REMOTE_ALIAS_IDENTIFIER, r as generateTypes, u as validateOptions, v as retrieveOriginalOutDir } from "./expose-rpc-Pg59hZO8.mjs";
2
- import "./Broker-CtU3X_nw.mjs";
3
- import { i as rpc_exports, n as generateTypesInChildProcess, r as DtsWorker, t as consumeTypes } from "./consumeTypes-DnucwjbD.mjs";
1
+ import { _ as retrieveMfTypesPath, c as isTSProject, d as DTSManager, f as HOST_API_TYPES_FILE_NAME, g as retrieveTypesZipPath, h as retrieveHostConfig, i as retrieveRemoteConfig, l as retrieveTypesAssetsInfo, m as REMOTE_API_TYPES_FILE_NAME, o as getDTSManagerConstructor, p as REMOTE_ALIAS_IDENTIFIER, r as generateTypes, u as validateOptions, v as retrieveOriginalOutDir } from "./expose-rpc-DJAoDLdo.mjs";
2
+ import "./Broker-CAfV_Mk2.mjs";
3
+ import { i as rpc_exports, n as generateTypesInChildProcess, r as DtsWorker, t as consumeTypes } from "./consumeTypes-mqBQo-ww.mjs";
4
4
 
5
5
  export { DTSManager, DtsWorker, HOST_API_TYPES_FILE_NAME, REMOTE_ALIAS_IDENTIFIER, REMOTE_API_TYPES_FILE_NAME, consumeTypes, generateTypes, generateTypesInChildProcess, getDTSManagerConstructor, isTSProject, retrieveHostConfig, retrieveMfTypesPath, retrieveOriginalOutDir, retrieveRemoteConfig, retrieveTypesAssetsInfo, retrieveTypesZipPath, rpc_exports as rpc, validateOptions };
@@ -1,5 +1,5 @@
1
1
  import { a as MF_SERVER_IDENTIFIER, n as ActionKind, o as UpdateMode, r as DEFAULT_TAR_NAME, t as Action } from "./Action-DNNg2YDh.mjs";
2
- import { a as getIdentifier, c as logger$1, i as getFreePort, l as LogKind, n as UpdateKind, o as getIPV4, r as fib, s as fileLog, t as Broker, u as APIKind } from "./Broker-CtU3X_nw.mjs";
2
+ import { a as getIdentifier, c as logger$1, i as getFreePort, l as LogKind, n as UpdateKind, o as getIPV4, r as fib, s as fileLog, t as Broker, u as APIKind } from "./Broker-CAfV_Mk2.mjs";
3
3
  import { createRequire } from "node:module";
4
4
  import fse from "fs-extra";
5
5
  import path, { dirname, extname, isAbsolute, join, normalize, relative, resolve, sep } from "path";
@@ -20,7 +20,6 @@ import { logAndReport } from "@module-federation/error-codes/node";
20
20
  import { execFile, fork } from "child_process";
21
21
  import util from "util";
22
22
  import WebSocket from "isomorphic-ws";
23
- import cloneDeepWith from "lodash.clonedeepwith";
24
23
  import process$1 from "process";
25
24
 
26
25
  //#region \0rolldown/runtime.js
@@ -1108,14 +1107,29 @@ const isTSProject = (dtsOptions, context = process.cwd()) => {
1108
1107
  }
1109
1108
  };
1110
1109
  function cloneDeepOptions(options) {
1111
- const excludeKeys = ["manifest", "async"];
1112
- return cloneDeepWith(options, (value, key) => {
1113
- if (typeof key === "string" && excludeKeys.includes(key)) return false;
1114
- if (typeof value === "function") return false;
1115
- if (key === "extractThirdParty" && Array.isArray(value)) return value.map((item) => {
1116
- return item.toString();
1117
- });
1118
- });
1110
+ const excludeKeys = new Set(["manifest", "async"]);
1111
+ const cache = /* @__PURE__ */ new WeakMap();
1112
+ function sanitize(val, key) {
1113
+ if (key !== void 0 && excludeKeys.has(key) || typeof val === "function") return false;
1114
+ if (key === "extractThirdParty" && Array.isArray(val)) return val.map(String);
1115
+ if (Array.isArray(val)) {
1116
+ if (cache.has(val)) return cache.get(val);
1117
+ const out = [];
1118
+ cache.set(val, out);
1119
+ val.forEach((v, i) => out.push(sanitize(v, String(i))));
1120
+ return out;
1121
+ }
1122
+ if (val !== null && typeof val === "object" && Object.getPrototypeOf(val) === Object.prototype) {
1123
+ const obj = val;
1124
+ if (cache.has(obj)) return cache.get(obj);
1125
+ const out = {};
1126
+ cache.set(obj, out);
1127
+ for (const [k, v] of Object.entries(obj)) out[k] = sanitize(v, k);
1128
+ return out;
1129
+ }
1130
+ return val;
1131
+ }
1132
+ return structuredClone(sanitize(options));
1119
1133
  }
1120
1134
  const getEnvHeaders = () => {
1121
1135
  const headersStr = getProcessEnv()["MF_ENV_HEADERS"] || "{}";
@@ -1,7 +1,7 @@
1
- import { _ as retrieveMfTypesPath, b as ModuleFederationDevServer, g as retrieveTypesZipPath, h as retrieveHostConfig, i as retrieveRemoteConfig, n as RpcGMCallTypes, o as getDTSManagerConstructor, t as exposeRpc, y as createHttpServer } from "./expose-rpc-Pg59hZO8.mjs";
1
+ import { _ as retrieveMfTypesPath, b as ModuleFederationDevServer, g as retrieveTypesZipPath, h as retrieveHostConfig, i as retrieveRemoteConfig, n as RpcGMCallTypes, o as getDTSManagerConstructor, t as exposeRpc, y as createHttpServer } from "./expose-rpc-DJAoDLdo.mjs";
2
2
  import { o as UpdateMode, r as DEFAULT_TAR_NAME } from "./Action-DNNg2YDh.mjs";
3
- import { n as UpdateKind, o as getIPV4, s as fileLog } from "./Broker-CtU3X_nw.mjs";
4
- import "./consumeTypes-DnucwjbD.mjs";
3
+ import { n as UpdateKind, o as getIPV4, s as fileLog } from "./Broker-CAfV_Mk2.mjs";
4
+ import "./consumeTypes-mqBQo-ww.mjs";
5
5
  import "./core.mjs";
6
6
  import { t as getIpFromEntry } from "./utils-CkPvDGOy.mjs";
7
7
  import { decodeName } from "@module-federation/sdk";
@@ -1,5 +1,5 @@
1
- import { n as RpcGMCallTypes, r as generateTypes, t as exposeRpc } from "./expose-rpc-Pg59hZO8.mjs";
2
- import "./Broker-CtU3X_nw.mjs";
1
+ import { n as RpcGMCallTypes, r as generateTypes, t as exposeRpc } from "./expose-rpc-DJAoDLdo.mjs";
2
+ import "./Broker-CAfV_Mk2.mjs";
3
3
 
4
4
  //#region src/core/lib/forkGenerateDts.ts
5
5
  async function forkGenerateDts(options) {
@@ -1,7 +1,7 @@
1
- import { a as cloneDeepOptions, c as isTSProject, l as retrieveTypesAssetsInfo, n as RpcGMCallTypes, r as generateTypes, u as validateOptions } from "./expose-rpc-Pg59hZO8.mjs";
1
+ import { a as cloneDeepOptions, c as isTSProject, l as retrieveTypesAssetsInfo, n as RpcGMCallTypes, r as generateTypes, u as validateOptions } from "./expose-rpc-DJAoDLdo.mjs";
2
2
  import { s as WEB_CLIENT_OPTIONS_IDENTIFIER } from "./Action-DNNg2YDh.mjs";
3
- import { c as logger$1, o as getIPV4 } from "./Broker-CtU3X_nw.mjs";
4
- import { a as createRpcWorker, n as generateTypesInChildProcess, t as consumeTypes } from "./consumeTypes-DnucwjbD.mjs";
3
+ import { c as logger$1, o as getIPV4 } from "./Broker-CAfV_Mk2.mjs";
4
+ import { a as createRpcWorker, n as generateTypesInChildProcess, t as consumeTypes } from "./consumeTypes-mqBQo-ww.mjs";
5
5
  import "./core.mjs";
6
6
  import * as fse$1 from "fs-extra";
7
7
  import fse from "fs-extra";
@@ -1,4 +1,4 @@
1
- import { s as fileLog, t as Broker } from "./Broker-CtU3X_nw.mjs";
1
+ import { s as fileLog, t as Broker } from "./Broker-CAfV_Mk2.mjs";
2
2
 
3
3
  //#region src/server/broker/startBroker.ts
4
4
  let broker;
@@ -1,5 +1,5 @@
1
1
  const require_Action = require('./Action-CzhPMw2i.js');
2
- const require_Broker = require('./Broker-BGm-heAJ.js');
2
+ const require_Broker = require('./Broker-eLXU1Wnf.js');
3
3
  let fs_extra = require("fs-extra");
4
4
  fs_extra = require_Action.__toESM(fs_extra);
5
5
  let path = require("path");
@@ -31,8 +31,6 @@ let util = require("util");
31
31
  util = require_Action.__toESM(util);
32
32
  let isomorphic_ws = require("isomorphic-ws");
33
33
  isomorphic_ws = require_Action.__toESM(isomorphic_ws);
34
- let lodash_clonedeepwith = require("lodash.clonedeepwith");
35
- lodash_clonedeepwith = require_Action.__toESM(lodash_clonedeepwith);
36
34
  let process$1 = require("process");
37
35
  process$1 = require_Action.__toESM(process$1);
38
36
 
@@ -1103,14 +1101,29 @@ const isTSProject = (dtsOptions, context = process.cwd()) => {
1103
1101
  }
1104
1102
  };
1105
1103
  function cloneDeepOptions(options) {
1106
- const excludeKeys = ["manifest", "async"];
1107
- return (0, lodash_clonedeepwith.default)(options, (value, key) => {
1108
- if (typeof key === "string" && excludeKeys.includes(key)) return false;
1109
- if (typeof value === "function") return false;
1110
- if (key === "extractThirdParty" && Array.isArray(value)) return value.map((item) => {
1111
- return item.toString();
1112
- });
1113
- });
1104
+ const excludeKeys = new Set(["manifest", "async"]);
1105
+ const cache = /* @__PURE__ */ new WeakMap();
1106
+ function sanitize(val, key) {
1107
+ if (key !== void 0 && excludeKeys.has(key) || typeof val === "function") return false;
1108
+ if (key === "extractThirdParty" && Array.isArray(val)) return val.map(String);
1109
+ if (Array.isArray(val)) {
1110
+ if (cache.has(val)) return cache.get(val);
1111
+ const out = [];
1112
+ cache.set(val, out);
1113
+ val.forEach((v, i) => out.push(sanitize(v, String(i))));
1114
+ return out;
1115
+ }
1116
+ if (val !== null && typeof val === "object" && Object.getPrototypeOf(val) === Object.prototype) {
1117
+ const obj = val;
1118
+ if (cache.has(obj)) return cache.get(obj);
1119
+ const out = {};
1120
+ cache.set(obj, out);
1121
+ for (const [k, v] of Object.entries(obj)) out[k] = sanitize(v, k);
1122
+ return out;
1123
+ }
1124
+ return val;
1125
+ }
1126
+ return structuredClone(sanitize(options));
1114
1127
  }
1115
1128
  const getEnvHeaders = () => {
1116
1129
  const headersStr = (0, _module_federation_sdk.getProcessEnv)()["MF_ENV_HEADERS"] || "{}";
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_Action = require('./Action-CzhPMw2i.js');
3
- const require_Broker = require('./Broker-BGm-heAJ.js');
4
- const require_expose_rpc = require('./expose-rpc-xfJEPIyY.js');
5
- require('./consumeTypes-ClKC4akt.js');
3
+ const require_Broker = require('./Broker-eLXU1Wnf.js');
4
+ const require_expose_rpc = require('./expose-rpc-C93yOgOB.js');
5
+ require('./consumeTypes-K9bTh9DW.js');
6
6
  require('./core.js');
7
7
  const require_utils = require('./utils-7KqCZHbb.js');
8
8
  let _module_federation_sdk = require("@module-federation/sdk");
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- require('./Broker-BGm-heAJ.js');
3
- const require_expose_rpc = require('./expose-rpc-xfJEPIyY.js');
2
+ require('./Broker-eLXU1Wnf.js');
3
+ const require_expose_rpc = require('./expose-rpc-C93yOgOB.js');
4
4
 
5
5
  //#region src/core/lib/forkGenerateDts.ts
6
6
  async function forkGenerateDts(options) {
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_Action = require('./Action-CzhPMw2i.js');
3
- const require_Broker = require('./Broker-BGm-heAJ.js');
4
- const require_expose_rpc = require('./expose-rpc-xfJEPIyY.js');
5
- const require_consumeTypes = require('./consumeTypes-ClKC4akt.js');
3
+ const require_Broker = require('./Broker-eLXU1Wnf.js');
4
+ const require_expose_rpc = require('./expose-rpc-C93yOgOB.js');
5
+ const require_consumeTypes = require('./consumeTypes-K9bTh9DW.js');
6
6
  require('./core.js');
7
7
  let fs_extra = require("fs-extra");
8
8
  fs_extra = require_Action.__toESM(fs_extra);
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/dts-plugin",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "author": "hanric <hanric.zhang@gmail.com>",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/esm/index.mjs",
@@ -71,13 +71,10 @@
71
71
  "@module-federation/third-party-dts-extractor": "workspace:*",
72
72
  "adm-zip": "^0.5.10",
73
73
  "ansi-colors": "^4.1.3",
74
- "axios": "^1.13.5",
75
- "chalk": "3.0.0",
74
+ "axios": "1.13.5",
76
75
  "fs-extra": "9.1.0",
77
76
  "isomorphic-ws": "5.0.0",
78
- "lodash.clonedeepwith": "4.5.0",
79
77
  "node-schedule": "2.1.1",
80
- "rambda": "^9.1.0",
81
78
  "ws": "8.18.0"
82
79
  },
83
80
  "devDependencies": {
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_Broker = require('./Broker-BGm-heAJ.js');
2
+ const require_Broker = require('./Broker-eLXU1Wnf.js');
3
3
 
4
4
  //#region src/server/broker/startBroker.ts
5
5
  let broker;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/dts-plugin",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "author": "hanric <hanric.zhang@gmail.com>",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/esm/index.mjs",
@@ -67,18 +67,15 @@
67
67
  "dependencies": {
68
68
  "adm-zip": "^0.5.10",
69
69
  "ansi-colors": "^4.1.3",
70
- "axios": "^1.13.5",
71
- "chalk": "3.0.0",
70
+ "axios": "1.13.5",
72
71
  "fs-extra": "9.1.0",
73
72
  "isomorphic-ws": "5.0.0",
74
- "lodash.clonedeepwith": "4.5.0",
75
73
  "node-schedule": "2.1.1",
76
- "rambda": "^9.1.0",
77
74
  "ws": "8.18.0",
78
- "@module-federation/error-codes": "2.3.0",
79
- "@module-federation/managers": "2.3.0",
80
- "@module-federation/sdk": "2.3.0",
81
- "@module-federation/third-party-dts-extractor": "2.3.0"
75
+ "@module-federation/managers": "2.3.1",
76
+ "@module-federation/error-codes": "2.3.1",
77
+ "@module-federation/sdk": "2.3.1",
78
+ "@module-federation/third-party-dts-extractor": "2.3.1"
82
79
  },
83
80
  "devDependencies": {
84
81
  "@types/node-schedule": "2.1.7",
@@ -90,7 +87,7 @@
90
87
  "directory-tree": "3.5.2",
91
88
  "vitest": "1.6.0",
92
89
  "webpack": "^5.104.1",
93
- "@module-federation/runtime": "2.3.0"
90
+ "@module-federation/runtime": "2.3.1"
94
91
  },
95
92
  "peerDependencies": {
96
93
  "typescript": "^4.9.0 || ^5.0.0",