@module-federation/dts-plugin 2.3.2 → 2.4.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 +21 -0
- package/dist/{consumeTypes-DMGONsAA.js → consumeTypes-DxGMNavh.js} +1 -1
- package/dist/core.js +2 -2
- package/dist/dynamic-remote-type-hints-plugin.d.ts +13 -2
- package/dist/esm/{consumeTypes-BCpXQKno.mjs → consumeTypes-DYgYpZMQ.mjs} +1 -1
- package/dist/esm/core.mjs +2 -2
- package/dist/esm/{expose-rpc--EENEdVk.mjs → expose-rpc-B-zm7DmJ.mjs} +3 -2
- 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-BPeKtqLv.js → expose-rpc-CQq6zYK-.js} +3 -2
- package/dist/fork-dev-worker.js +2 -2
- package/dist/fork-generate-dts.js +1 -1
- package/dist/index.js +2 -2
- package/package.json +6 -6
package/dist/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @module-federation/dts-plugin
|
|
2
2
|
|
|
3
|
+
## 2.4.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [5eba770]
|
|
8
|
+
- Updated dependencies [13b1e84]
|
|
9
|
+
- @module-federation/sdk@2.4.0
|
|
10
|
+
- @module-federation/managers@2.4.0
|
|
11
|
+
- @module-federation/third-party-dts-extractor@2.4.0
|
|
12
|
+
- @module-federation/error-codes@2.4.0
|
|
13
|
+
|
|
14
|
+
## 2.3.3
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- 6d33275: fix: override inherited declarationDir in tsconfig and add test for declarationDir handling
|
|
19
|
+
- @module-federation/sdk@2.3.3
|
|
20
|
+
- @module-federation/managers@2.3.3
|
|
21
|
+
- @module-federation/third-party-dts-extractor@2.3.3
|
|
22
|
+
- @module-federation/error-codes@2.3.3
|
|
23
|
+
|
|
3
24
|
## 2.3.2
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -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-CQq6zYK-.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
2
|
require('./Broker-DRFgFvXI.js');
|
|
3
|
-
const require_expose_rpc = require('./expose-rpc-
|
|
4
|
-
const require_consumeTypes = require('./consumeTypes-
|
|
3
|
+
const require_expose_rpc = require('./expose-rpc-CQq6zYK-.js');
|
|
4
|
+
const require_consumeTypes = require('./consumeTypes-DxGMNavh.js');
|
|
5
5
|
|
|
6
6
|
exports.DTSManager = require_expose_rpc.DTSManager;
|
|
7
7
|
exports.DtsWorker = require_consumeTypes.DtsWorker;
|
|
@@ -177,7 +177,6 @@ interface PreloadRemoteArgs {
|
|
|
177
177
|
share?: boolean;
|
|
178
178
|
depsRemote?: boolean | Array<depsPreloadArg>;
|
|
179
179
|
filter?: (assetUrl: string) => boolean;
|
|
180
|
-
prefetchInterface?: boolean;
|
|
181
180
|
}
|
|
182
181
|
type PreloadConfig = PreloadRemoteArgs;
|
|
183
182
|
type PreloadOptions = Array<{
|
|
@@ -533,12 +532,24 @@ declare class ModuleFederation {
|
|
|
533
532
|
createScript: SyncHook<[{
|
|
534
533
|
url: string;
|
|
535
534
|
attrs?: Record<string, any>;
|
|
535
|
+
/**
|
|
536
|
+
* The producer(remote) info bound to this resource.
|
|
537
|
+
* Only present when the loader is invoked in a remote-related context
|
|
538
|
+
* (e.g. preloadRemote / loading remoteEntry).
|
|
539
|
+
*/
|
|
540
|
+
remoteInfo?: RemoteInfo;
|
|
536
541
|
}], CreateScriptHookReturn>;
|
|
537
542
|
createLink: SyncHook<[{
|
|
538
543
|
url: string;
|
|
539
544
|
attrs?: Record<string, any>;
|
|
545
|
+
/**
|
|
546
|
+
* The producer(remote) info bound to this resource.
|
|
547
|
+
* Only present when the loader is invoked in a remote-related context
|
|
548
|
+
* (e.g. preloadRemote / loading remoteEntry).
|
|
549
|
+
*/
|
|
550
|
+
remoteInfo?: RemoteInfo;
|
|
540
551
|
}], void | HTMLLinkElement>;
|
|
541
|
-
fetch: AsyncHook<[string, RequestInit], false | void | Promise<Response>>;
|
|
552
|
+
fetch: AsyncHook<[string, RequestInit, (RemoteInfo | undefined)?], false | void | Promise<Response>>;
|
|
542
553
|
loadEntryError: AsyncHook<[{
|
|
543
554
|
getRemoteEntry: typeof getRemoteEntry;
|
|
544
555
|
origin: ModuleFederation;
|
|
@@ -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-B-zm7DmJ.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
|
|
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-B-zm7DmJ.mjs";
|
|
2
2
|
import "./Broker-z82OgzMe.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-DYgYpZMQ.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 };
|
|
@@ -1239,12 +1239,13 @@ const readTsConfig = ({ tsConfigPath, typesFolder, compiledTypesFolder, context,
|
|
|
1239
1239
|
const rawTsConfigJson = readResult.config;
|
|
1240
1240
|
const configContent = typescript.parseJsonConfigFileContent(rawTsConfigJson, typescript.sys, dirname(resolvedTsConfigPath));
|
|
1241
1241
|
const rootDir = getEffectiveRootDir(configContent);
|
|
1242
|
+
const outDir = resolve(context, outputDir || configContent.options.outDir || "dist", typesFolder, compiledTypesFolder);
|
|
1242
1243
|
const defaultCompilerOptions = {
|
|
1243
1244
|
rootDir,
|
|
1244
1245
|
emitDeclarationOnly: true,
|
|
1245
1246
|
noEmit: false,
|
|
1246
1247
|
declaration: true,
|
|
1247
|
-
outDir
|
|
1248
|
+
outDir
|
|
1248
1249
|
};
|
|
1249
1250
|
rawTsConfigJson.compilerOptions = rawTsConfigJson.compilerOptions || {};
|
|
1250
1251
|
rawTsConfigJson.compilerOptions = {
|
|
@@ -1263,7 +1264,7 @@ const readTsConfig = ({ tsConfigPath, typesFolder, compiledTypesFolder, context,
|
|
|
1263
1264
|
rawTsConfigJson.exclude = [];
|
|
1264
1265
|
"references" in rawTsConfigJson && delete rawTsConfigJson.references;
|
|
1265
1266
|
rawTsConfigJson.extends = resolvedTsConfigPath;
|
|
1266
|
-
|
|
1267
|
+
rawTsConfigJson.compilerOptions.declarationDir = outDir;
|
|
1267
1268
|
return rawTsConfigJson;
|
|
1268
1269
|
};
|
|
1269
1270
|
const TS_EXTENSIONS = [
|
|
@@ -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-B-zm7DmJ.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-z82OgzMe.mjs";
|
|
4
|
-
import "./consumeTypes-
|
|
4
|
+
import "./consumeTypes-DYgYpZMQ.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-B-zm7DmJ.mjs";
|
|
2
2
|
import "./Broker-z82OgzMe.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-B-zm7DmJ.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-z82OgzMe.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-DYgYpZMQ.mjs";
|
|
5
5
|
import "./core.mjs";
|
|
6
6
|
import fs from "fs";
|
|
7
7
|
import * as path$1 from "path";
|
|
@@ -1230,12 +1230,13 @@ const readTsConfig = ({ tsConfigPath, typesFolder, compiledTypesFolder, context,
|
|
|
1230
1230
|
const rawTsConfigJson = readResult.config;
|
|
1231
1231
|
const configContent = typescript.default.parseJsonConfigFileContent(rawTsConfigJson, typescript.default.sys, (0, path.dirname)(resolvedTsConfigPath));
|
|
1232
1232
|
const rootDir = getEffectiveRootDir(configContent);
|
|
1233
|
+
const outDir = (0, path.resolve)(context, outputDir || configContent.options.outDir || "dist", typesFolder, compiledTypesFolder);
|
|
1233
1234
|
const defaultCompilerOptions = {
|
|
1234
1235
|
rootDir,
|
|
1235
1236
|
emitDeclarationOnly: true,
|
|
1236
1237
|
noEmit: false,
|
|
1237
1238
|
declaration: true,
|
|
1238
|
-
outDir
|
|
1239
|
+
outDir
|
|
1239
1240
|
};
|
|
1240
1241
|
rawTsConfigJson.compilerOptions = rawTsConfigJson.compilerOptions || {};
|
|
1241
1242
|
rawTsConfigJson.compilerOptions = {
|
|
@@ -1254,7 +1255,7 @@ const readTsConfig = ({ tsConfigPath, typesFolder, compiledTypesFolder, context,
|
|
|
1254
1255
|
rawTsConfigJson.exclude = [];
|
|
1255
1256
|
"references" in rawTsConfigJson && delete rawTsConfigJson.references;
|
|
1256
1257
|
rawTsConfigJson.extends = resolvedTsConfigPath;
|
|
1257
|
-
|
|
1258
|
+
rawTsConfigJson.compilerOptions.declarationDir = outDir;
|
|
1258
1259
|
return rawTsConfigJson;
|
|
1259
1260
|
};
|
|
1260
1261
|
const TS_EXTENSIONS = [
|
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-DRFgFvXI.js');
|
|
4
|
-
const require_expose_rpc = require('./expose-rpc-
|
|
5
|
-
require('./consumeTypes-
|
|
4
|
+
const require_expose_rpc = require('./expose-rpc-CQq6zYK-.js');
|
|
5
|
+
require('./consumeTypes-DxGMNavh.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-DRFgFvXI.js');
|
|
3
|
-
const require_expose_rpc = require('./expose-rpc-
|
|
3
|
+
const require_expose_rpc = require('./expose-rpc-CQq6zYK-.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-DRFgFvXI.js');
|
|
4
|
-
const require_expose_rpc = require('./expose-rpc-
|
|
5
|
-
const require_consumeTypes = require('./consumeTypes-
|
|
4
|
+
const require_expose_rpc = require('./expose-rpc-CQq6zYK-.js');
|
|
5
|
+
const require_consumeTypes = require('./consumeTypes-DxGMNavh.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.4.0",
|
|
4
4
|
"author": "hanric <hanric.zhang@gmail.com>",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/esm/index.mjs",
|
|
@@ -71,10 +71,10 @@
|
|
|
71
71
|
"undici": "7.24.7",
|
|
72
72
|
"node-schedule": "2.1.1",
|
|
73
73
|
"ws": "8.18.0",
|
|
74
|
-
"@module-federation/
|
|
75
|
-
"@module-federation/
|
|
76
|
-
"@module-federation/
|
|
77
|
-
"@module-federation/third-party-dts-extractor": "2.
|
|
74
|
+
"@module-federation/error-codes": "2.4.0",
|
|
75
|
+
"@module-federation/sdk": "2.4.0",
|
|
76
|
+
"@module-federation/managers": "2.4.0",
|
|
77
|
+
"@module-federation/third-party-dts-extractor": "2.4.0"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@types/node-schedule": "2.1.7",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"directory-tree": "3.5.2",
|
|
87
87
|
"vitest": "1.6.0",
|
|
88
88
|
"webpack": "^5.104.1",
|
|
89
|
-
"@module-federation/runtime": "2.
|
|
89
|
+
"@module-federation/runtime": "2.4.0"
|
|
90
90
|
},
|
|
91
91
|
"peerDependencies": {
|
|
92
92
|
"typescript": "^4.9.0 || ^5.0.0",
|