@module-federation/dts-plugin 2.2.1 → 2.2.3
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 +19 -0
- package/dist/{consumeTypes-C78VTe8r.js → consumeTypes-DHKw9PGQ.js} +6 -2
- package/dist/core.js +2 -2
- package/dist/esm/{consumeTypes-IRrP9NIN.mjs → consumeTypes-CirXBJjN.mjs} +6 -2
- package/dist/esm/core.mjs +2 -2
- package/dist/esm/{expose-rpc-DsABkfLc.mjs → expose-rpc-CyOKS7gM.mjs} +8 -0
- package/dist/esm/fork-dev-worker.mjs +2 -2
- package/dist/esm/fork-generate-dts.mjs +1 -1
- package/dist/esm/index.mjs +2 -2
- package/dist/{expose-rpc-DkHFNYya.js → expose-rpc-BAS_80E1.js} +8 -0
- package/dist/fork-dev-worker.js +2 -2
- package/dist/fork-generate-dts.js +1 -1
- package/dist/index.js +2 -2
- package/dist/package.json +1 -1
- package/package.json +6 -6
package/dist/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @module-federation/dts-plugin
|
|
2
2
|
|
|
3
|
+
## 2.2.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- @module-federation/sdk@2.2.3
|
|
8
|
+
- @module-federation/managers@2.2.3
|
|
9
|
+
- @module-federation/third-party-dts-extractor@2.2.3
|
|
10
|
+
- @module-federation/error-codes@2.2.3
|
|
11
|
+
|
|
12
|
+
## 2.2.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- 95282ac: Infer root dir from "references" property for solution-style tsconfig
|
|
17
|
+
- @module-federation/sdk@2.2.2
|
|
18
|
+
- @module-federation/managers@2.2.2
|
|
19
|
+
- @module-federation/third-party-dts-extractor@2.2.2
|
|
20
|
+
- @module-federation/error-codes@2.2.2
|
|
21
|
+
|
|
3
22
|
## 2.2.1
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
const require_Action = require('./Action-CzhPMw2i.js');
|
|
2
|
-
const require_expose_rpc = require('./expose-rpc-
|
|
2
|
+
const require_expose_rpc = require('./expose-rpc-BAS_80E1.js');
|
|
3
3
|
let path = require("path");
|
|
4
4
|
path = require_Action.__toESM(path);
|
|
5
5
|
let crypto = require("crypto");
|
|
6
6
|
let child_process = require("child_process");
|
|
7
7
|
child_process = require_Action.__toESM(child_process);
|
|
8
|
+
let url = require("url");
|
|
8
9
|
let process$1 = require("process");
|
|
9
10
|
process$1 = require_Action.__toESM(process$1);
|
|
10
11
|
|
|
@@ -154,11 +155,14 @@ var rpc_exports = /* @__PURE__ */ require_Action.__exportAll({
|
|
|
154
155
|
|
|
155
156
|
//#endregion
|
|
156
157
|
//#region src/core/lib/DtsWorker.ts
|
|
158
|
+
const __filename$1 = (0, url.fileURLToPath)(require("url").pathToFileURL(__filename).href);
|
|
159
|
+
const __dirname$1 = path.default.dirname(__filename$1);
|
|
160
|
+
const __extname = path.default.extname(__filename$1);
|
|
157
161
|
var DtsWorker = class {
|
|
158
162
|
constructor(options) {
|
|
159
163
|
this._options = require_expose_rpc.cloneDeepOptions(options);
|
|
160
164
|
this.removeUnSerializationOptions();
|
|
161
|
-
this.rpcWorker = createRpcWorker(path.default.resolve(__dirname,
|
|
165
|
+
this.rpcWorker = createRpcWorker(path.default.resolve(__dirname$1, `./fork-generate-dts${__extname}`), {}, void 0, true);
|
|
162
166
|
this._res = this.rpcWorker.connect(this._options);
|
|
163
167
|
}
|
|
164
168
|
removeUnSerializationOptions() {
|
package/dist/core.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
require('./Broker-DRlzScTT.js');
|
|
3
|
-
const require_expose_rpc = require('./expose-rpc-
|
|
4
|
-
const require_consumeTypes = require('./consumeTypes-
|
|
3
|
+
const require_expose_rpc = require('./expose-rpc-BAS_80E1.js');
|
|
4
|
+
const require_consumeTypes = require('./consumeTypes-DHKw9PGQ.js');
|
|
5
5
|
|
|
6
6
|
exports.DTSManager = require_expose_rpc.DTSManager;
|
|
7
7
|
exports.DtsWorker = require_consumeTypes.DtsWorker;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { a as cloneDeepOptions, n as RpcGMCallTypes, o as getDTSManagerConstructor, s as isDebugMode, t as exposeRpc, x as __exportAll } from "./expose-rpc-
|
|
1
|
+
import { a as cloneDeepOptions, n as RpcGMCallTypes, o as getDTSManagerConstructor, s as isDebugMode, t as exposeRpc, x as __exportAll } from "./expose-rpc-CyOKS7gM.mjs";
|
|
2
2
|
import path from "path";
|
|
3
3
|
import { randomUUID } from "crypto";
|
|
4
4
|
import * as child_process from "child_process";
|
|
5
|
+
import { fileURLToPath } from "url";
|
|
5
6
|
import * as process$2 from "process";
|
|
6
7
|
|
|
7
8
|
//#region src/core/rpc/rpc-error.ts
|
|
@@ -150,11 +151,14 @@ var rpc_exports = /* @__PURE__ */ __exportAll({
|
|
|
150
151
|
|
|
151
152
|
//#endregion
|
|
152
153
|
//#region src/core/lib/DtsWorker.ts
|
|
154
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
155
|
+
const __dirname = path.dirname(__filename);
|
|
156
|
+
const __extname = path.extname(__filename);
|
|
153
157
|
var DtsWorker = class {
|
|
154
158
|
constructor(options) {
|
|
155
159
|
this._options = cloneDeepOptions(options);
|
|
156
160
|
this.removeUnSerializationOptions();
|
|
157
|
-
this.rpcWorker = createRpcWorker(path.resolve(__dirname,
|
|
161
|
+
this.rpcWorker = createRpcWorker(path.resolve(__dirname, `./fork-generate-dts${__extname}`), {}, void 0, true);
|
|
158
162
|
this._res = this.rpcWorker.connect(this._options);
|
|
159
163
|
}
|
|
160
164
|
removeUnSerializationOptions() {
|
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-
|
|
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-CyOKS7gM.mjs";
|
|
2
2
|
import "./Broker-BU4gToNr.mjs";
|
|
3
|
-
import { i as rpc_exports, n as generateTypesInChildProcess, r as DtsWorker, t as consumeTypes } from "./consumeTypes-
|
|
3
|
+
import { i as rpc_exports, n as generateTypesInChildProcess, r as DtsWorker, t as consumeTypes } from "./consumeTypes-CirXBJjN.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 };
|
|
@@ -1161,6 +1161,14 @@ function getEffectiveRootDir(parsedCommandLine) {
|
|
|
1161
1161
|
while (!fileDir.startsWith(commonPath)) commonPath = dirname(commonPath);
|
|
1162
1162
|
return commonPath;
|
|
1163
1163
|
}, files[0]);
|
|
1164
|
+
if (parsedCommandLine.projectReferences.length) {
|
|
1165
|
+
const relativeReferences = parsedCommandLine.projectReferences.filter((reference) => !isAbsolute(reference.originalPath ?? reference.path));
|
|
1166
|
+
const referencesForRoot = relativeReferences.length ? relativeReferences : parsedCommandLine.projectReferences;
|
|
1167
|
+
return referencesForRoot.map((reference) => dirname(reference.path)).reduce((commonPath, filePath) => {
|
|
1168
|
+
while (!filePath.startsWith(commonPath)) commonPath = dirname(commonPath);
|
|
1169
|
+
return commonPath;
|
|
1170
|
+
}, dirname(referencesForRoot[0].path));
|
|
1171
|
+
}
|
|
1164
1172
|
throw new Error("Can not get effective rootDir, please set compilerOptions.rootDir !");
|
|
1165
1173
|
}
|
|
1166
1174
|
const getDependentFiles = (rootFiles, configContent, rootDir) => {
|
|
@@ -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-
|
|
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-CyOKS7gM.mjs";
|
|
2
2
|
import { o as UpdateMode, r as DEFAULT_TAR_NAME } from "./Action-DNNg2YDh.mjs";
|
|
3
3
|
import { n as UpdateKind, o as getIPV4, s as fileLog } from "./Broker-BU4gToNr.mjs";
|
|
4
|
-
import "./consumeTypes-
|
|
4
|
+
import "./consumeTypes-CirXBJjN.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,4 +1,4 @@
|
|
|
1
|
-
import { n as RpcGMCallTypes, r as generateTypes, t as exposeRpc } from "./expose-rpc-
|
|
1
|
+
import { n as RpcGMCallTypes, r as generateTypes, t as exposeRpc } from "./expose-rpc-CyOKS7gM.mjs";
|
|
2
2
|
import "./Broker-BU4gToNr.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/core/lib/forkGenerateDts.ts
|
package/dist/esm/index.mjs
CHANGED
|
@@ -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-
|
|
1
|
+
import { a as cloneDeepOptions, c as isTSProject, l as retrieveTypesAssetsInfo, n as RpcGMCallTypes, r as generateTypes, u as validateOptions } from "./expose-rpc-CyOKS7gM.mjs";
|
|
2
2
|
import { s as WEB_CLIENT_OPTIONS_IDENTIFIER } from "./Action-DNNg2YDh.mjs";
|
|
3
3
|
import { c as logger$1, o as getIPV4 } from "./Broker-BU4gToNr.mjs";
|
|
4
|
-
import { a as createRpcWorker, n as generateTypesInChildProcess, t as consumeTypes } from "./consumeTypes-
|
|
4
|
+
import { a as createRpcWorker, n as generateTypesInChildProcess, t as consumeTypes } from "./consumeTypes-CirXBJjN.mjs";
|
|
5
5
|
import "./core.mjs";
|
|
6
6
|
import * as fse$1 from "fs-extra";
|
|
7
7
|
import fse from "fs-extra";
|
|
@@ -1156,6 +1156,14 @@ function getEffectiveRootDir(parsedCommandLine) {
|
|
|
1156
1156
|
while (!fileDir.startsWith(commonPath)) commonPath = (0, path.dirname)(commonPath);
|
|
1157
1157
|
return commonPath;
|
|
1158
1158
|
}, files[0]);
|
|
1159
|
+
if (parsedCommandLine.projectReferences.length) {
|
|
1160
|
+
const relativeReferences = parsedCommandLine.projectReferences.filter((reference) => !(0, path.isAbsolute)(reference.originalPath ?? reference.path));
|
|
1161
|
+
const referencesForRoot = relativeReferences.length ? relativeReferences : parsedCommandLine.projectReferences;
|
|
1162
|
+
return referencesForRoot.map((reference) => (0, path.dirname)(reference.path)).reduce((commonPath, filePath) => {
|
|
1163
|
+
while (!filePath.startsWith(commonPath)) commonPath = (0, path.dirname)(commonPath);
|
|
1164
|
+
return commonPath;
|
|
1165
|
+
}, (0, path.dirname)(referencesForRoot[0].path));
|
|
1166
|
+
}
|
|
1159
1167
|
throw new Error("Can not get effective rootDir, please set compilerOptions.rootDir !");
|
|
1160
1168
|
}
|
|
1161
1169
|
const getDependentFiles = (rootFiles, configContent, rootDir) => {
|
package/dist/fork-dev-worker.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
3
|
const require_Broker = require('./Broker-DRlzScTT.js');
|
|
4
|
-
const require_expose_rpc = require('./expose-rpc-
|
|
5
|
-
require('./consumeTypes-
|
|
4
|
+
const require_expose_rpc = require('./expose-rpc-BAS_80E1.js');
|
|
5
|
+
require('./consumeTypes-DHKw9PGQ.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
2
|
require('./Broker-DRlzScTT.js');
|
|
3
|
-
const require_expose_rpc = require('./expose-rpc-
|
|
3
|
+
const require_expose_rpc = require('./expose-rpc-BAS_80E1.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
3
|
const require_Broker = require('./Broker-DRlzScTT.js');
|
|
4
|
-
const require_expose_rpc = require('./expose-rpc-
|
|
5
|
-
const require_consumeTypes = require('./consumeTypes-
|
|
4
|
+
const require_expose_rpc = require('./expose-rpc-BAS_80E1.js');
|
|
5
|
+
const require_consumeTypes = require('./consumeTypes-DHKw9PGQ.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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/dts-plugin",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.3",
|
|
4
4
|
"author": "hanric <hanric.zhang@gmail.com>",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/esm/index.mjs",
|
|
@@ -76,10 +76,10 @@
|
|
|
76
76
|
"node-schedule": "2.1.1",
|
|
77
77
|
"rambda": "^9.1.0",
|
|
78
78
|
"ws": "8.18.0",
|
|
79
|
-
"@module-federation/error-codes": "2.2.
|
|
80
|
-
"@module-federation/
|
|
81
|
-
"@module-federation/
|
|
82
|
-
"@module-federation/
|
|
79
|
+
"@module-federation/error-codes": "2.2.3",
|
|
80
|
+
"@module-federation/third-party-dts-extractor": "2.2.3",
|
|
81
|
+
"@module-federation/managers": "2.2.3",
|
|
82
|
+
"@module-federation/sdk": "2.2.3"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@types/node-schedule": "2.1.7",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"directory-tree": "3.5.2",
|
|
92
92
|
"vitest": "1.6.0",
|
|
93
93
|
"webpack": "^5.104.1",
|
|
94
|
-
"@module-federation/runtime": "2.2.
|
|
94
|
+
"@module-federation/runtime": "2.2.3"
|
|
95
95
|
},
|
|
96
96
|
"peerDependencies": {
|
|
97
97
|
"typescript": "^4.9.0 || ^5.0.0",
|