@module-federation/dts-plugin 2.3.2 → 2.3.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 CHANGED
@@ -1,5 +1,15 @@
1
1
  # @module-federation/dts-plugin
2
2
 
3
+ ## 2.3.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 6d33275: fix: override inherited declarationDir in tsconfig and add test for declarationDir handling
8
+ - @module-federation/sdk@2.3.3
9
+ - @module-federation/managers@2.3.3
10
+ - @module-federation/third-party-dts-extractor@2.3.3
11
+ - @module-federation/error-codes@2.3.3
12
+
3
13
  ## 2.3.2
4
14
 
5
15
  ### Patch Changes
@@ -1,5 +1,5 @@
1
1
  const require_Action = require('./Action-CzhPMw2i.js');
2
- const require_expose_rpc = require('./expose-rpc-BPeKtqLv.js');
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-BPeKtqLv.js');
4
- const require_consumeTypes = require('./consumeTypes-DMGONsAA.js');
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;
@@ -533,12 +533,24 @@ declare class ModuleFederation {
533
533
  createScript: SyncHook<[{
534
534
  url: string;
535
535
  attrs?: Record<string, any>;
536
+ /**
537
+ * The producer(remote) info bound to this resource.
538
+ * Only present when the loader is invoked in a remote-related context
539
+ * (e.g. preloadRemote / loading remoteEntry).
540
+ */
541
+ remoteInfo?: RemoteInfo;
536
542
  }], CreateScriptHookReturn>;
537
543
  createLink: SyncHook<[{
538
544
  url: string;
539
545
  attrs?: Record<string, any>;
546
+ /**
547
+ * The producer(remote) info bound to this resource.
548
+ * Only present when the loader is invoked in a remote-related context
549
+ * (e.g. preloadRemote / loading remoteEntry).
550
+ */
551
+ remoteInfo?: RemoteInfo;
540
552
  }], void | HTMLLinkElement>;
541
- fetch: AsyncHook<[string, RequestInit], false | void | Promise<Response>>;
553
+ fetch: AsyncHook<[string, RequestInit, (RemoteInfo | undefined)?], false | void | Promise<Response>>;
542
554
  loadEntryError: AsyncHook<[{
543
555
  getRemoteEntry: typeof getRemoteEntry;
544
556
  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--EENEdVk.mjs";
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--EENEdVk.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-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-BCpXQKno.mjs";
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: resolve(context, outputDir || configContent.options.outDir || "dist", typesFolder, compiledTypesFolder)
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
- if (rawTsConfigJson.compilerOptions.declarationDir) delete rawTsConfigJson.compilerOptions.declarationDir;
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--EENEdVk.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-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-BCpXQKno.mjs";
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--EENEdVk.mjs";
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
@@ -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--EENEdVk.mjs";
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-BCpXQKno.mjs";
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: (0, path.resolve)(context, outputDir || configContent.options.outDir || "dist", typesFolder, compiledTypesFolder)
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
- if (rawTsConfigJson.compilerOptions.declarationDir) delete rawTsConfigJson.compilerOptions.declarationDir;
1258
+ rawTsConfigJson.compilerOptions.declarationDir = outDir;
1258
1259
  return rawTsConfigJson;
1259
1260
  };
1260
1261
  const TS_EXTENSIONS = [
@@ -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-BPeKtqLv.js');
5
- require('./consumeTypes-DMGONsAA.js');
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-BPeKtqLv.js');
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-BPeKtqLv.js');
5
- const require_consumeTypes = require('./consumeTypes-DMGONsAA.js');
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.2",
3
+ "version": "2.3.3",
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/managers": "2.3.2",
75
- "@module-federation/error-codes": "2.3.2",
76
- "@module-federation/sdk": "2.3.2",
77
- "@module-federation/third-party-dts-extractor": "2.3.2"
74
+ "@module-federation/error-codes": "2.3.3",
75
+ "@module-federation/sdk": "2.3.3",
76
+ "@module-federation/third-party-dts-extractor": "2.3.3",
77
+ "@module-federation/managers": "2.3.3"
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.3.2"
89
+ "@module-federation/runtime": "2.3.3"
90
90
  },
91
91
  "peerDependencies": {
92
92
  "typescript": "^4.9.0 || ^5.0.0",