@module-federation/dts-plugin 2.5.1 → 2.7.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.
- package/dist/CHANGELOG.md +25 -0
- package/dist/{DtsWorker-Dtem3-FM.d.ts → DtsWorker-Bt7-_SGH.d.ts} +6 -6
- package/dist/{constant-BwEkyidO.d.ts → constant-YOdZl7sj.d.ts} +1 -1
- package/dist/{consumeTypes-FbF0o6AJ.js → consumeTypes-Dle9g2SZ.js} +1 -1
- package/dist/core.d.ts +2 -2
- package/dist/core.js +2 -2
- package/dist/esm/{consumeTypes-COIltElB.mjs → consumeTypes-3S4eCiRK.mjs} +1 -1
- package/dist/esm/core.mjs +2 -2
- package/dist/esm/{expose-rpc-ZWQxpg0y.mjs → expose-rpc-CDdqA9PX.mjs} +12 -9
- 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-XLxmAXIW.js → expose-rpc-BpRiu3VK.js} +12 -10
- package/dist/fork-dev-worker.d.ts +1 -1
- package/dist/fork-dev-worker.js +2 -2
- package/dist/fork-generate-dts.d.ts +1 -1
- package/dist/fork-generate-dts.js +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.js +2 -2
- package/package.json +12 -12
package/dist/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @module-federation/dts-plugin
|
|
2
2
|
|
|
3
|
+
## 2.7.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a7351f3: chore(dts-plugin): drop `ansi-colors` dependency in favor of inline ANSI escape for the single red error message.
|
|
8
|
+
- Updated dependencies [dcc640b]
|
|
9
|
+
- Updated dependencies [2add9ef]
|
|
10
|
+
- Updated dependencies [9958086]
|
|
11
|
+
- Updated dependencies [a5f123a]
|
|
12
|
+
- Updated dependencies [8ec950c]
|
|
13
|
+
- @module-federation/sdk@2.7.0
|
|
14
|
+
- @module-federation/third-party-dts-extractor@2.7.0
|
|
15
|
+
- @module-federation/managers@2.7.0
|
|
16
|
+
- @module-federation/error-codes@2.7.0
|
|
17
|
+
|
|
18
|
+
## 2.6.0
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- 2a7f724: Fix dts-plugin expose resolution for extensionless multi-dot paths like `foo.generated` so they correctly infer supported source files such as `.ts`, `.tsx`, `.vue`, `.js`, and `.jsx`, while preserving explicit extensions and directory `index` fallback behavior.
|
|
23
|
+
- @module-federation/sdk@2.6.0
|
|
24
|
+
- @module-federation/managers@2.6.0
|
|
25
|
+
- @module-federation/third-party-dts-extractor@2.6.0
|
|
26
|
+
- @module-federation/error-codes@2.6.0
|
|
27
|
+
|
|
3
28
|
## 2.5.1
|
|
4
29
|
|
|
5
30
|
### Patch Changes
|
|
@@ -78,12 +78,12 @@ declare class DTSManager {
|
|
|
78
78
|
extractRemoteTypes(options: ReturnType<typeof retrieveRemoteConfig>): Promise<void>;
|
|
79
79
|
generateTypes(): Promise<void>;
|
|
80
80
|
requestRemoteManifest(remoteInfo: RemoteInfo, hostOptions: Required<HostOptions>): Promise<Required<RemoteInfo>>;
|
|
81
|
-
consumeTargetRemotes(hostOptions: Required<HostOptions>, remoteInfo: Required<RemoteInfo>): Promise<[string, string]>;
|
|
82
|
-
downloadAPITypes(remoteInfo: Required<RemoteInfo>, destinationPath: string, hostOptions: Required<HostOptions>): Promise<boolean>;
|
|
81
|
+
consumeTargetRemotes(hostOptions: Required<HostOptions>, remoteInfo: Required<RemoteInfo>): Promise<[string, string] | undefined>;
|
|
82
|
+
downloadAPITypes(remoteInfo: Required<RemoteInfo>, destinationPath: string, hostOptions: Required<HostOptions>): Promise<boolean | undefined>;
|
|
83
83
|
consumeAPITypes(hostOptions: Required<HostOptions>): void;
|
|
84
84
|
consumeArchiveTypes(options: HostOptions): Promise<{
|
|
85
85
|
hostOptions: Required<HostOptions>;
|
|
86
|
-
downloadPromisesResult: PromiseSettledResult<[string, string]>[];
|
|
86
|
+
downloadPromisesResult: PromiseSettledResult<[string, string] | undefined>[];
|
|
87
87
|
}>;
|
|
88
88
|
consumeTypes(): Promise<void>;
|
|
89
89
|
updateTypes(options: UpdateTypesOptions): Promise<void>;
|
|
@@ -143,9 +143,9 @@ declare function getRpcWorkerData(): unknown;
|
|
|
143
143
|
//#endregion
|
|
144
144
|
//#region src/core/rpc/rpc-error.d.ts
|
|
145
145
|
declare class RpcExitError extends Error {
|
|
146
|
-
readonly code?: string | number | null;
|
|
147
|
-
readonly signal?: string | null;
|
|
148
|
-
constructor(message: string, code?: string | number | null, signal?: string | null);
|
|
146
|
+
readonly code?: string | number | null | undefined;
|
|
147
|
+
readonly signal?: string | null | undefined;
|
|
148
|
+
constructor(message: string, code?: string | number | null | undefined, signal?: string | null | undefined);
|
|
149
149
|
}
|
|
150
150
|
declare namespace index_d_exports {
|
|
151
151
|
export { RpcCallMessage, RpcExitError, RpcGMCallTypes, RpcMessage, RpcMethod, RpcRejectMessage, RpcRemoteMethod, RpcResolveMessage, RpcWorker, createRpcWorker, exposeRpc, getRpcWorkerData, wrapRpc };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as DTSManagerOptions, i as DTSManager, l as TsConfigJson, o as HostOptions, s as RemoteInfo, u as RemoteOptions } from "./DtsWorker-
|
|
1
|
+
import { a as DTSManagerOptions, i as DTSManager, l as TsConfigJson, o as HostOptions, s as RemoteInfo, u as RemoteOptions } from "./DtsWorker-Bt7-_SGH.js";
|
|
2
2
|
import { moduleFederationPlugin } from "@module-federation/sdk";
|
|
3
3
|
|
|
4
4
|
//#region src/core/configurations/hostPlugin.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
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-BpRiu3VK.js');
|
|
3
3
|
let url = require("url");
|
|
4
4
|
let path = require("path");
|
|
5
5
|
path = require_Action.__toESM(path);
|
package/dist/core.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as DTSManagerOptions, c as retrieveRemoteConfig, i as DTSManager, o as HostOptions, r as index_d_exports, t as DtsWorker, u as RemoteOptions } from "./DtsWorker-
|
|
2
|
-
import { a as generateTypesInChildProcess, c as retrieveMfTypesPath, d as isTSProject, f as retrieveTypesAssetsInfo, i as consumeTypes, l as retrieveOriginalOutDir, m as retrieveHostConfig, n as REMOTE_ALIAS_IDENTIFIER, o as generateTypes, p as validateOptions, r as REMOTE_API_TYPES_FILE_NAME, s as retrieveTypesZipPath, t as HOST_API_TYPES_FILE_NAME, u as getDTSManagerConstructor } from "./constant-
|
|
1
|
+
import { a as DTSManagerOptions, c as retrieveRemoteConfig, i as DTSManager, o as HostOptions, r as index_d_exports, t as DtsWorker, u as RemoteOptions } from "./DtsWorker-Bt7-_SGH.js";
|
|
2
|
+
import { a as generateTypesInChildProcess, c as retrieveMfTypesPath, d as isTSProject, f as retrieveTypesAssetsInfo, i as consumeTypes, l as retrieveOriginalOutDir, m as retrieveHostConfig, n as REMOTE_ALIAS_IDENTIFIER, o as generateTypes, p as validateOptions, r as REMOTE_API_TYPES_FILE_NAME, s as retrieveTypesZipPath, t as HOST_API_TYPES_FILE_NAME, u as getDTSManagerConstructor } from "./constant-YOdZl7sj.js";
|
|
3
3
|
export { DTSManager, type DTSManagerOptions, DtsWorker, HOST_API_TYPES_FILE_NAME, type HostOptions, REMOTE_ALIAS_IDENTIFIER, REMOTE_API_TYPES_FILE_NAME, type RemoteOptions, consumeTypes, generateTypes, generateTypesInChildProcess, getDTSManagerConstructor, isTSProject, retrieveHostConfig, retrieveMfTypesPath, retrieveOriginalOutDir, retrieveRemoteConfig, retrieveTypesAssetsInfo, retrieveTypesZipPath, index_d_exports as rpc, validateOptions };
|
package/dist/core.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
require('./Broker-CaenCqdn.js');
|
|
3
|
-
const require_expose_rpc = require('./expose-rpc-
|
|
4
|
-
const require_consumeTypes = require('./consumeTypes-
|
|
3
|
+
const require_expose_rpc = require('./expose-rpc-BpRiu3VK.js');
|
|
4
|
+
const require_consumeTypes = require('./consumeTypes-Dle9g2SZ.js');
|
|
5
5
|
|
|
6
6
|
exports.DTSManager = require_expose_rpc.DTSManager;
|
|
7
7
|
exports.DtsWorker = require_consumeTypes.DtsWorker;
|
|
@@ -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-
|
|
1
|
+
import { a as cloneDeepOptions, n as RpcGMCallTypes, o as getDTSManagerConstructor, s as isDebugMode, t as exposeRpc, x as __exportAll } from "./expose-rpc-CDdqA9PX.mjs";
|
|
2
2
|
import { fileURLToPath } from "url";
|
|
3
3
|
import path from "path";
|
|
4
4
|
import { randomUUID } from "crypto";
|
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-CDdqA9PX.mjs";
|
|
2
2
|
import "./Broker-Cmbh_XVO.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-3S4eCiRK.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 };
|
|
@@ -7,8 +7,8 @@ import path, { dirname, extname, isAbsolute, join, normalize, relative, resolve,
|
|
|
7
7
|
import { cp, mkdir, readFile, readdir, rm, stat, writeFile } from "fs/promises";
|
|
8
8
|
import { utils } from "@module-federation/managers";
|
|
9
9
|
import typescript from "typescript";
|
|
10
|
+
import { styleText } from "node:util";
|
|
10
11
|
import { ENCODE_NAME_PREFIX, MANIFEST_EXT, TEMP_DIR, decodeName, getProcessEnv, inferAutoPublicPath, parseEntry } from "@module-federation/sdk";
|
|
11
|
-
import ansiColors from "ansi-colors";
|
|
12
12
|
import { Agent } from "undici";
|
|
13
13
|
import { ThirdPartyExtractor } from "@module-federation/third-party-dts-extractor";
|
|
14
14
|
import AdmZip from "adm-zip";
|
|
@@ -1089,7 +1089,7 @@ function retrieveTypesAssetsInfo(options) {
|
|
|
1089
1089
|
apiFileName: path.basename(apiTypesPath)
|
|
1090
1090
|
};
|
|
1091
1091
|
} catch (err) {
|
|
1092
|
-
console.error(
|
|
1092
|
+
console.error(styleText("red", `Unable to compile federated types, ${err}`));
|
|
1093
1093
|
return {
|
|
1094
1094
|
apiTypesPath: "",
|
|
1095
1095
|
zipTypesPath: "",
|
|
@@ -1235,7 +1235,7 @@ function getEffectiveRootDir(parsedCommandLine) {
|
|
|
1235
1235
|
throw new Error("Can not get effective rootDir, please set compilerOptions.rootDir !");
|
|
1236
1236
|
}
|
|
1237
1237
|
const getDependentFiles = (rootFiles, configContent, rootDir) => {
|
|
1238
|
-
const dependentFiles = typescript.createProgram(rootFiles, configContent.options).getSourceFiles().map((file) => file.fileName).filter((file) => !file.endsWith(".d.ts") && file.startsWith(rootDir));
|
|
1238
|
+
const dependentFiles = typescript.createProgram(rootFiles, configContent.options).getSourceFiles().map((file) => file.fileName).filter((file) => !file.endsWith(".d.ts") && file.startsWith(rootDir + "/"));
|
|
1239
1239
|
return dependentFiles.length ? dependentFiles : rootFiles;
|
|
1240
1240
|
};
|
|
1241
1241
|
const readTsConfig = ({ tsConfigPath, typesFolder, compiledTypesFolder, context, additionalFilesToCompile, outputDir }, mapComponentsToExpose) => {
|
|
@@ -1274,15 +1274,18 @@ const readTsConfig = ({ tsConfigPath, typesFolder, compiledTypesFolder, context,
|
|
|
1274
1274
|
return rawTsConfigJson;
|
|
1275
1275
|
};
|
|
1276
1276
|
const TS_EXTENSIONS = [
|
|
1277
|
-
"ts",
|
|
1278
|
-
"tsx",
|
|
1279
|
-
"vue",
|
|
1280
|
-
"svelte"
|
|
1277
|
+
".ts",
|
|
1278
|
+
".tsx",
|
|
1279
|
+
".vue",
|
|
1280
|
+
".svelte",
|
|
1281
|
+
".js",
|
|
1282
|
+
".jsx"
|
|
1281
1283
|
];
|
|
1282
1284
|
const resolveWithExtension = (exposedPath, context) => {
|
|
1283
|
-
|
|
1285
|
+
const explicitExtension = extname(exposedPath);
|
|
1286
|
+
if (TS_EXTENSIONS.includes(explicitExtension)) return resolve(context, exposedPath);
|
|
1284
1287
|
for (const extension of TS_EXTENSIONS) {
|
|
1285
|
-
const exposedPathWithExtension = resolve(context, `${exposedPath}
|
|
1288
|
+
const exposedPathWithExtension = resolve(context, `${exposedPath}${extension}`);
|
|
1286
1289
|
if (existsSync(exposedPathWithExtension)) return exposedPathWithExtension;
|
|
1287
1290
|
}
|
|
1288
1291
|
};
|
|
@@ -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-CDdqA9PX.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-Cmbh_XVO.mjs";
|
|
4
|
-
import "./consumeTypes-
|
|
4
|
+
import "./consumeTypes-3S4eCiRK.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-CDdqA9PX.mjs";
|
|
2
2
|
import "./Broker-Cmbh_XVO.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-CDdqA9PX.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-Cmbh_XVO.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-3S4eCiRK.mjs";
|
|
5
5
|
import "./core.mjs";
|
|
6
6
|
import fs from "fs";
|
|
7
7
|
import { fileURLToPath } from "url";
|
|
@@ -9,9 +9,8 @@ let fs_promises = require("fs/promises");
|
|
|
9
9
|
let _module_federation_managers = require("@module-federation/managers");
|
|
10
10
|
let typescript = require("typescript");
|
|
11
11
|
typescript = require_Action.__toESM(typescript);
|
|
12
|
+
let node_util = require("node:util");
|
|
12
13
|
let _module_federation_sdk = require("@module-federation/sdk");
|
|
13
|
-
let ansi_colors = require("ansi-colors");
|
|
14
|
-
ansi_colors = require_Action.__toESM(ansi_colors);
|
|
15
14
|
let undici = require("undici");
|
|
16
15
|
let _module_federation_third_party_dts_extractor = require("@module-federation/third-party-dts-extractor");
|
|
17
16
|
let adm_zip = require("adm-zip");
|
|
@@ -1080,7 +1079,7 @@ function retrieveTypesAssetsInfo(options) {
|
|
|
1080
1079
|
apiFileName: path.default.basename(apiTypesPath)
|
|
1081
1080
|
};
|
|
1082
1081
|
} catch (err) {
|
|
1083
|
-
console.error(
|
|
1082
|
+
console.error((0, node_util.styleText)("red", `Unable to compile federated types, ${err}`));
|
|
1084
1083
|
return {
|
|
1085
1084
|
apiTypesPath: "",
|
|
1086
1085
|
zipTypesPath: "",
|
|
@@ -1226,7 +1225,7 @@ function getEffectiveRootDir(parsedCommandLine) {
|
|
|
1226
1225
|
throw new Error("Can not get effective rootDir, please set compilerOptions.rootDir !");
|
|
1227
1226
|
}
|
|
1228
1227
|
const getDependentFiles = (rootFiles, configContent, rootDir) => {
|
|
1229
|
-
const dependentFiles = typescript.default.createProgram(rootFiles, configContent.options).getSourceFiles().map((file) => file.fileName).filter((file) => !file.endsWith(".d.ts") && file.startsWith(rootDir));
|
|
1228
|
+
const dependentFiles = typescript.default.createProgram(rootFiles, configContent.options).getSourceFiles().map((file) => file.fileName).filter((file) => !file.endsWith(".d.ts") && file.startsWith(rootDir + "/"));
|
|
1230
1229
|
return dependentFiles.length ? dependentFiles : rootFiles;
|
|
1231
1230
|
};
|
|
1232
1231
|
const readTsConfig = ({ tsConfigPath, typesFolder, compiledTypesFolder, context, additionalFilesToCompile, outputDir }, mapComponentsToExpose) => {
|
|
@@ -1265,15 +1264,18 @@ const readTsConfig = ({ tsConfigPath, typesFolder, compiledTypesFolder, context,
|
|
|
1265
1264
|
return rawTsConfigJson;
|
|
1266
1265
|
};
|
|
1267
1266
|
const TS_EXTENSIONS = [
|
|
1268
|
-
"ts",
|
|
1269
|
-
"tsx",
|
|
1270
|
-
"vue",
|
|
1271
|
-
"svelte"
|
|
1267
|
+
".ts",
|
|
1268
|
+
".tsx",
|
|
1269
|
+
".vue",
|
|
1270
|
+
".svelte",
|
|
1271
|
+
".js",
|
|
1272
|
+
".jsx"
|
|
1272
1273
|
];
|
|
1273
1274
|
const resolveWithExtension = (exposedPath, context) => {
|
|
1274
|
-
|
|
1275
|
+
const explicitExtension = (0, path.extname)(exposedPath);
|
|
1276
|
+
if (TS_EXTENSIONS.includes(explicitExtension)) return (0, path.resolve)(context, exposedPath);
|
|
1275
1277
|
for (const extension of TS_EXTENSIONS) {
|
|
1276
|
-
const exposedPathWithExtension = (0, path.resolve)(context, `${exposedPath}
|
|
1278
|
+
const exposedPathWithExtension = (0, path.resolve)(context, `${exposedPath}${extension}`);
|
|
1277
1279
|
if ((0, fs.existsSync)(exposedPathWithExtension)) return exposedPathWithExtension;
|
|
1278
1280
|
}
|
|
1279
1281
|
};
|
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-CaenCqdn.js');
|
|
4
|
-
const require_expose_rpc = require('./expose-rpc-
|
|
5
|
-
require('./consumeTypes-
|
|
4
|
+
const require_expose_rpc = require('./expose-rpc-BpRiu3VK.js');
|
|
5
|
+
require('./consumeTypes-Dle9g2SZ.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-CaenCqdn.js');
|
|
3
|
-
const require_expose_rpc = require('./expose-rpc-
|
|
3
|
+
const require_expose_rpc = require('./expose-rpc-BpRiu3VK.js');
|
|
4
4
|
|
|
5
5
|
//#region src/core/lib/forkGenerateDts.ts
|
|
6
6
|
async function forkGenerateDts(options) {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as DTSManagerOptions } from "./DtsWorker-
|
|
2
|
-
import { d as isTSProject } from "./constant-
|
|
1
|
+
import { a as DTSManagerOptions } from "./DtsWorker-Bt7-_SGH.js";
|
|
2
|
+
import { d as isTSProject } from "./constant-YOdZl7sj.js";
|
|
3
3
|
import { moduleFederationPlugin } from "@module-federation/sdk";
|
|
4
4
|
|
|
5
5
|
//#region src/plugins/DtsPlugin.d.ts
|
|
@@ -37,13 +37,13 @@ declare const normalizeConsumeTypesOptions: ({
|
|
|
37
37
|
timeout?: number;
|
|
38
38
|
family?: 0 | 4 | 6;
|
|
39
39
|
typesOnBuild?: boolean;
|
|
40
|
-
implementation: string;
|
|
41
|
-
context: string;
|
|
40
|
+
implementation: string | undefined;
|
|
41
|
+
context: string | undefined;
|
|
42
42
|
moduleFederationConfig: moduleFederationPlugin.ModuleFederationPluginOptions;
|
|
43
43
|
};
|
|
44
44
|
extraOptions: Record<string, any>;
|
|
45
|
-
displayErrorInTerminal: boolean;
|
|
46
|
-
};
|
|
45
|
+
displayErrorInTerminal: boolean | undefined;
|
|
46
|
+
} | undefined;
|
|
47
47
|
declare const consumeTypesAPI: (dtsManagerOptions: DTSManagerOptions, cb?: (options: moduleFederationPlugin.RemoteTypeUrls) => void) => Promise<void>;
|
|
48
48
|
//#endregion
|
|
49
49
|
//#region src/plugins/GenerateTypesPlugin.d.ts
|
|
@@ -57,7 +57,7 @@ declare const normalizeGenerateTypesOptions: ({
|
|
|
57
57
|
outputDir?: string;
|
|
58
58
|
dtsOptions: moduleFederationPlugin.PluginDtsOptions;
|
|
59
59
|
pluginOptions: moduleFederationPlugin.ModuleFederationPluginOptions;
|
|
60
|
-
}) => DTSManagerOptions;
|
|
60
|
+
}) => DTSManagerOptions | undefined;
|
|
61
61
|
declare const generateTypesAPI: ({
|
|
62
62
|
dtsManagerOptions
|
|
63
63
|
}: {
|
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-CaenCqdn.js');
|
|
4
|
-
const require_expose_rpc = require('./expose-rpc-
|
|
5
|
-
const require_consumeTypes = require('./consumeTypes-
|
|
4
|
+
const require_expose_rpc = require('./expose-rpc-BpRiu3VK.js');
|
|
5
|
+
const require_consumeTypes = require('./consumeTypes-Dle9g2SZ.js');
|
|
6
6
|
require('./core.js');
|
|
7
7
|
let fs = require("fs");
|
|
8
8
|
fs = require_Action.__toESM(fs);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/dts-plugin",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"author": "hanric <hanric.zhang@gmail.com>",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/esm/index.mjs",
|
|
@@ -66,30 +66,30 @@
|
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"adm-zip": "0.5.10",
|
|
69
|
-
"ansi-colors": "4.1.3",
|
|
70
69
|
"isomorphic-ws": "5.0.0",
|
|
71
|
-
"undici": "7.
|
|
70
|
+
"undici": "7.28.0",
|
|
72
71
|
"node-schedule": "2.1.1",
|
|
73
72
|
"ws": "8.21.0",
|
|
74
|
-
"@module-federation/error-codes": "2.
|
|
75
|
-
"@module-federation/
|
|
76
|
-
"@module-federation/
|
|
77
|
-
"@module-federation/
|
|
73
|
+
"@module-federation/error-codes": "2.7.0",
|
|
74
|
+
"@module-federation/sdk": "2.7.0",
|
|
75
|
+
"@module-federation/third-party-dts-extractor": "2.7.0",
|
|
76
|
+
"@module-federation/managers": "2.7.0"
|
|
78
77
|
},
|
|
79
78
|
"devDependencies": {
|
|
79
|
+
"@rstest/core": "^0.10.6",
|
|
80
80
|
"@types/node-schedule": "2.1.7",
|
|
81
81
|
"@types/ws": "8.5.12",
|
|
82
82
|
"@vue/tsconfig": "^0.7.0",
|
|
83
|
+
"directory-tree": "3.5.2",
|
|
83
84
|
"rimraf": "~6.0.1",
|
|
85
|
+
"typescript": "6.0.3",
|
|
84
86
|
"vue": "^3.5.13",
|
|
85
87
|
"vue-tsc": "^2.2.10",
|
|
86
|
-
"directory-tree": "3.5.2",
|
|
87
|
-
"vitest": "1.6.0",
|
|
88
88
|
"webpack": "^5.104.1",
|
|
89
|
-
"@module-federation/runtime": "2.
|
|
89
|
+
"@module-federation/runtime": "2.7.0"
|
|
90
90
|
},
|
|
91
91
|
"peerDependencies": {
|
|
92
|
-
"typescript": "^4.9.0 || ^5.0.0",
|
|
92
|
+
"typescript": "^4.9.0 || ^5.0.0 || ^6.0.0",
|
|
93
93
|
"vue-tsc": ">=1.0.24"
|
|
94
94
|
},
|
|
95
95
|
"peerDependenciesMeta": {
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"scripts": {
|
|
101
101
|
"build": "tsdown --config ./tsdown.config.ts && sleep 1 && cp *.md ./dist",
|
|
102
102
|
"test": "node -e \"require('fs').rmSync('dist-test',{recursive:true,force:true,maxRetries:20,retryDelay:50})\" && pnpm run test-impl",
|
|
103
|
-
"test-impl": "pnpm exec
|
|
103
|
+
"test-impl": "pnpm exec rstest --passWithNoTests",
|
|
104
104
|
"lint": "ESLINT_USE_FLAT_CONFIG=false pnpm exec eslint --ignore-pattern node_modules \"**/*.ts\" \"package.json\"",
|
|
105
105
|
"build-debug": "FEDERATION_DEBUG=true pnpm run build",
|
|
106
106
|
"pre-release": "pnpm run test && pnpm run build"
|