@module-federation/dts-plugin 0.6.4 → 0.6.6

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,22 @@
1
1
  # @module-federation/dts-plugin
2
2
 
3
+ ## 0.6.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 35aead4: fix(dts-plugin): zipName should add prefix if remoteEntry has it
8
+ - @module-federation/sdk@0.6.6
9
+ - @module-federation/managers@0.6.6
10
+ - @module-federation/third-party-dts-extractor@0.6.6
11
+
12
+ ## 0.6.5
13
+
14
+ ### Patch Changes
15
+
16
+ - @module-federation/sdk@0.6.5
17
+ - @module-federation/managers@0.6.5
18
+ - @module-federation/third-party-dts-extractor@0.6.5
19
+
3
20
  ## 0.6.4
4
21
 
5
22
  ### Patch Changes
package/dist/core.d.mts CHANGED
@@ -13,6 +13,7 @@ declare const retrieveHostConfig: (options: HostOptions) => {
13
13
  declare function getDTSManagerConstructor(implementation?: string): typeof DTSManager;
14
14
  declare const validateOptions: (options: HostOptions) => void;
15
15
  declare function retrieveTypesAssetsInfo(options: RemoteOptions): {
16
+ zipPrefix: string;
16
17
  apiTypesPath: string;
17
18
  zipTypesPath: string;
18
19
  zipName: string;
package/dist/core.d.ts CHANGED
@@ -13,6 +13,7 @@ declare const retrieveHostConfig: (options: HostOptions) => {
13
13
  declare function getDTSManagerConstructor(implementation?: string): typeof DTSManager;
14
14
  declare const validateOptions: (options: HostOptions) => void;
15
15
  declare function retrieveTypesAssetsInfo(options: RemoteOptions): {
16
+ zipPrefix: string;
16
17
  apiTypesPath: string;
17
18
  zipTypesPath: string;
18
19
  zipName: string;
package/dist/core.js CHANGED
@@ -1629,12 +1629,15 @@ var validateOptions = /* @__PURE__ */ __name((options) => {
1629
1629
  }
1630
1630
  }, "validateOptions");
1631
1631
  function retrieveTypesAssetsInfo(options) {
1632
+ const { moduleFederationConfig } = options;
1632
1633
  let apiTypesPath = "";
1633
1634
  let zipTypesPath = "";
1635
+ let zipPrefix = "";
1634
1636
  try {
1635
1637
  const { tsConfig, remoteOptions, mapComponentsToExpose } = retrieveRemoteConfig(options);
1636
1638
  if (!Object.keys(mapComponentsToExpose).length) {
1637
1639
  return {
1640
+ zipPrefix,
1638
1641
  apiTypesPath,
1639
1642
  zipTypesPath,
1640
1643
  zipName: "",
@@ -1646,7 +1649,15 @@ function retrieveTypesAssetsInfo(options) {
1646
1649
  if (remoteOptions.generateAPITypes) {
1647
1650
  apiTypesPath = retrieveMfAPITypesPath(tsConfig, remoteOptions);
1648
1651
  }
1652
+ if (typeof moduleFederationConfig.manifest === "object" && moduleFederationConfig.manifest.filePath) {
1653
+ zipPrefix = moduleFederationConfig.manifest.filePath;
1654
+ } else if (typeof moduleFederationConfig.manifest === "object" && moduleFederationConfig.manifest.fileName) {
1655
+ zipPrefix = import_path4.default.dirname(moduleFederationConfig.manifest.fileName);
1656
+ } else if (moduleFederationConfig.filename) {
1657
+ zipPrefix = import_path4.default.dirname(moduleFederationConfig.filename);
1658
+ }
1649
1659
  return {
1660
+ zipPrefix,
1650
1661
  apiTypesPath,
1651
1662
  zipTypesPath,
1652
1663
  zipName: import_path4.default.basename(zipTypesPath),
@@ -1655,6 +1666,7 @@ function retrieveTypesAssetsInfo(options) {
1655
1666
  } catch (err) {
1656
1667
  console.error(import_ansi_colors2.default.red(`Unable to compile federated types, ${err}`));
1657
1668
  return {
1669
+ zipPrefix,
1658
1670
  apiTypesPath: "",
1659
1671
  zipTypesPath: "",
1660
1672
  zipName: "",
@@ -4,7 +4,7 @@ import {
4
4
  exposeRpc,
5
5
  getDTSManagerConstructor,
6
6
  isDebugMode
7
- } from "./chunk-I4MF3J7G.js";
7
+ } from "./chunk-VGFDDQ7M.js";
8
8
  import {
9
9
  __async,
10
10
  __export,
@@ -1134,12 +1134,15 @@ var validateOptions = /* @__PURE__ */ __name((options) => {
1134
1134
  }
1135
1135
  }, "validateOptions");
1136
1136
  function retrieveTypesAssetsInfo(options) {
1137
+ const { moduleFederationConfig } = options;
1137
1138
  let apiTypesPath = "";
1138
1139
  let zipTypesPath = "";
1140
+ let zipPrefix = "";
1139
1141
  try {
1140
1142
  const { tsConfig, remoteOptions, mapComponentsToExpose } = retrieveRemoteConfig(options);
1141
1143
  if (!Object.keys(mapComponentsToExpose).length) {
1142
1144
  return {
1145
+ zipPrefix,
1143
1146
  apiTypesPath,
1144
1147
  zipTypesPath,
1145
1148
  zipName: "",
@@ -1151,7 +1154,15 @@ function retrieveTypesAssetsInfo(options) {
1151
1154
  if (remoteOptions.generateAPITypes) {
1152
1155
  apiTypesPath = retrieveMfAPITypesPath(tsConfig, remoteOptions);
1153
1156
  }
1157
+ if (typeof moduleFederationConfig.manifest === "object" && moduleFederationConfig.manifest.filePath) {
1158
+ zipPrefix = moduleFederationConfig.manifest.filePath;
1159
+ } else if (typeof moduleFederationConfig.manifest === "object" && moduleFederationConfig.manifest.fileName) {
1160
+ zipPrefix = path3.dirname(moduleFederationConfig.manifest.fileName);
1161
+ } else if (moduleFederationConfig.filename) {
1162
+ zipPrefix = path3.dirname(moduleFederationConfig.filename);
1163
+ }
1154
1164
  return {
1165
+ zipPrefix,
1155
1166
  apiTypesPath,
1156
1167
  zipTypesPath,
1157
1168
  zipName: path3.basename(zipTypesPath),
@@ -1160,6 +1171,7 @@ function retrieveTypesAssetsInfo(options) {
1160
1171
  } catch (err) {
1161
1172
  console.error(ansiColors2.red(`Unable to compile federated types, ${err}`));
1162
1173
  return {
1174
+ zipPrefix,
1163
1175
  apiTypesPath: "",
1164
1176
  zipTypesPath: "",
1165
1177
  zipName: "",
package/dist/esm/core.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  consumeTypes,
4
4
  generateTypesInChildProcess,
5
5
  rpc_exports
6
- } from "./chunk-IW3CXUPB.js";
6
+ } from "./chunk-GDK2KZ5S.js";
7
7
  import {
8
8
  DTSManager,
9
9
  HOST_API_TYPES_FILE_NAME,
@@ -19,7 +19,7 @@ import {
19
19
  retrieveTypesAssetsInfo,
20
20
  retrieveTypesZipPath,
21
21
  validateOptions
22
- } from "./chunk-I4MF3J7G.js";
22
+ } from "./chunk-VGFDDQ7M.js";
23
23
  import "./chunk-MY3H5SQO.js";
24
24
  import "./chunk-4CSLH7II.js";
25
25
  export {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  rpc_exports
3
- } from "./chunk-IW3CXUPB.js";
3
+ } from "./chunk-GDK2KZ5S.js";
4
4
  import {
5
5
  ModuleFederationDevServer,
6
6
  createKoaServer,
@@ -9,7 +9,7 @@ import {
9
9
  retrieveMfTypesPath,
10
10
  retrieveRemoteConfig,
11
11
  retrieveTypesZipPath
12
- } from "./chunk-I4MF3J7G.js";
12
+ } from "./chunk-VGFDDQ7M.js";
13
13
  import {
14
14
  fileLog,
15
15
  getIPV4
@@ -2,7 +2,7 @@ import {
2
2
  RpcGMCallTypes,
3
3
  exposeRpc,
4
4
  generateTypes
5
- } from "./chunk-I4MF3J7G.js";
5
+ } from "./chunk-VGFDDQ7M.js";
6
6
  import "./chunk-MY3H5SQO.js";
7
7
  import {
8
8
  __async,
package/dist/esm/index.js CHANGED
@@ -2,14 +2,14 @@ import {
2
2
  consumeTypes,
3
3
  generateTypesInChildProcess,
4
4
  rpc_exports
5
- } from "./chunk-IW3CXUPB.js";
5
+ } from "./chunk-GDK2KZ5S.js";
6
6
  import {
7
7
  cloneDeepOptions,
8
8
  generateTypes,
9
9
  isTSProject,
10
10
  retrieveTypesAssetsInfo,
11
11
  validateOptions
12
- } from "./chunk-I4MF3J7G.js";
12
+ } from "./chunk-VGFDDQ7M.js";
13
13
  import {
14
14
  getIPV4
15
15
  } from "./chunk-MY3H5SQO.js";
package/dist/index.js CHANGED
@@ -1652,12 +1652,15 @@ var validateOptions = /* @__PURE__ */ __name((options) => {
1652
1652
  }
1653
1653
  }, "validateOptions");
1654
1654
  function retrieveTypesAssetsInfo(options) {
1655
+ const { moduleFederationConfig } = options;
1655
1656
  let apiTypesPath = "";
1656
1657
  let zipTypesPath = "";
1658
+ let zipPrefix = "";
1657
1659
  try {
1658
1660
  const { tsConfig, remoteOptions, mapComponentsToExpose } = retrieveRemoteConfig(options);
1659
1661
  if (!Object.keys(mapComponentsToExpose).length) {
1660
1662
  return {
1663
+ zipPrefix,
1661
1664
  apiTypesPath,
1662
1665
  zipTypesPath,
1663
1666
  zipName: "",
@@ -1669,7 +1672,15 @@ function retrieveTypesAssetsInfo(options) {
1669
1672
  if (remoteOptions.generateAPITypes) {
1670
1673
  apiTypesPath = retrieveMfAPITypesPath(tsConfig, remoteOptions);
1671
1674
  }
1675
+ if (typeof moduleFederationConfig.manifest === "object" && moduleFederationConfig.manifest.filePath) {
1676
+ zipPrefix = moduleFederationConfig.manifest.filePath;
1677
+ } else if (typeof moduleFederationConfig.manifest === "object" && moduleFederationConfig.manifest.fileName) {
1678
+ zipPrefix = import_path4.default.dirname(moduleFederationConfig.manifest.fileName);
1679
+ } else if (moduleFederationConfig.filename) {
1680
+ zipPrefix = import_path4.default.dirname(moduleFederationConfig.filename);
1681
+ }
1672
1682
  return {
1683
+ zipPrefix,
1673
1684
  apiTypesPath,
1674
1685
  zipTypesPath,
1675
1686
  zipName: import_path4.default.basename(zipTypesPath),
@@ -1678,6 +1689,7 @@ function retrieveTypesAssetsInfo(options) {
1678
1689
  } catch (err) {
1679
1690
  console.error(import_ansi_colors2.default.red(`Unable to compile federated types, ${err}`));
1680
1691
  return {
1692
+ zipPrefix,
1681
1693
  apiTypesPath: "",
1682
1694
  zipTypesPath: "",
1683
1695
  zipName: "",
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/dts-plugin",
3
- "version": "0.6.4",
3
+ "version": "0.6.6",
4
4
  "author": "hanric <hanric.zhang@gmail.com>",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/dts-plugin",
3
- "version": "0.6.4",
3
+ "version": "0.6.6",
4
4
  "author": "hanric <hanric.zhang@gmail.com>",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -55,9 +55,9 @@
55
55
  "log4js": "6.9.1",
56
56
  "node-schedule": "2.1.1",
57
57
  "ws": "8.17.1",
58
- "@module-federation/sdk": "0.6.4",
59
- "@module-federation/managers": "0.6.4",
60
- "@module-federation/third-party-dts-extractor": "0.6.4"
58
+ "@module-federation/sdk": "0.6.6",
59
+ "@module-federation/managers": "0.6.6",
60
+ "@module-federation/third-party-dts-extractor": "0.6.6"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@types/ws": "8.5.10",
@@ -66,7 +66,7 @@
66
66
  "vue": "^3.4.29",
67
67
  "@vue/tsconfig": "^0.5.1",
68
68
  "vue-tsc": "^2.0.26",
69
- "@module-federation/runtime": "0.6.4"
69
+ "@module-federation/runtime": "0.6.6"
70
70
  },
71
71
  "peerDependencies": {
72
72
  "typescript": "^4.9.0 || ^5.0.0",