@module-federation/dts-plugin 0.2.0 → 0.2.1

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
+ ## 0.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 88445e7: Support getPublicPath in compiler plugins
8
+ - Updated dependencies [88445e7]
9
+ - @module-federation/sdk@0.2.1
10
+ - @module-federation/managers@0.2.1
11
+ - @module-federation/third-party-dts-extractor@0.2.1
12
+
3
13
  ## 0.2.0
4
14
 
5
15
  ### Patch Changes
package/dist/core.js CHANGED
@@ -1339,7 +1339,17 @@ var DTSManager = (_a = class {
1339
1339
  }
1340
1340
  return u;
1341
1341
  }, "addProtocol");
1342
- let publicPath = "publicPath" in manifestJson.metaData ? manifestJson.metaData.publicPath : new Function(manifestJson.metaData.getPublicPath)();
1342
+ let publicPath;
1343
+ if ("publicPath" in manifestJson.metaData) {
1344
+ publicPath = manifestJson.metaData.publicPath;
1345
+ } else {
1346
+ const getPublicPath = new Function(manifestJson.metaData.getPublicPath);
1347
+ if (manifestJson.metaData.getPublicPath.startsWith("function")) {
1348
+ publicPath = getPublicPath()();
1349
+ } else {
1350
+ publicPath = getPublicPath();
1351
+ }
1352
+ }
1343
1353
  if (publicPath === "auto") {
1344
1354
  publicPath = (0, import_sdk4.inferAutoPublicPath)(remoteInfo.url);
1345
1355
  }
@@ -1668,7 +1668,17 @@ var DTSManager = (_a = class {
1668
1668
  }
1669
1669
  return u;
1670
1670
  }, "addProtocol");
1671
- let publicPath = "publicPath" in manifestJson.metaData ? manifestJson.metaData.publicPath : new Function(manifestJson.metaData.getPublicPath)();
1671
+ let publicPath;
1672
+ if ("publicPath" in manifestJson.metaData) {
1673
+ publicPath = manifestJson.metaData.publicPath;
1674
+ } else {
1675
+ const getPublicPath = new Function(manifestJson.metaData.getPublicPath);
1676
+ if (manifestJson.metaData.getPublicPath.startsWith("function")) {
1677
+ publicPath = getPublicPath()();
1678
+ } else {
1679
+ publicPath = getPublicPath();
1680
+ }
1681
+ }
1672
1682
  if (publicPath === "auto") {
1673
1683
  publicPath = inferAutoPublicPath(remoteInfo.url);
1674
1684
  }
package/dist/esm/core.js CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  retrieveTypesZipPath,
15
15
  rpc_exports,
16
16
  validateOptions
17
- } from "./chunk-DQ2CDTSN.js";
17
+ } from "./chunk-CRKFI32N.js";
18
18
  import {
19
19
  HOST_API_TYPES_FILE_NAME,
20
20
  REMOTE_ALIAS_IDENTIFIER,
@@ -9,7 +9,7 @@ import {
9
9
  retrieveRemoteConfig,
10
10
  retrieveTypesZipPath,
11
11
  rpc_exports
12
- } from "./chunk-DQ2CDTSN.js";
12
+ } from "./chunk-CRKFI32N.js";
13
13
  import {
14
14
  getIpFromEntry
15
15
  } from "./chunk-G7ONFBMA.js";
@@ -2,7 +2,7 @@ import {
2
2
  RpcGMCallTypes,
3
3
  exposeRpc,
4
4
  generateTypes
5
- } from "./chunk-DQ2CDTSN.js";
5
+ } from "./chunk-CRKFI32N.js";
6
6
  import {
7
7
  __async,
8
8
  __name
package/dist/esm/index.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  retrieveTypesAssetsInfo,
8
8
  rpc_exports,
9
9
  validateOptions
10
- } from "./chunk-DQ2CDTSN.js";
10
+ } from "./chunk-CRKFI32N.js";
11
11
  import {
12
12
  WEB_CLIENT_OPTIONS_IDENTIFIER,
13
13
  __async,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Broker,
3
3
  fileLog
4
- } from "./chunk-DQ2CDTSN.js";
4
+ } from "./chunk-CRKFI32N.js";
5
5
  import {
6
6
  __async,
7
7
  __name
@@ -1848,7 +1848,17 @@ var DTSManager = (_a = class {
1848
1848
  }
1849
1849
  return u;
1850
1850
  }, "addProtocol");
1851
- let publicPath = "publicPath" in manifestJson.metaData ? manifestJson.metaData.publicPath : new Function(manifestJson.metaData.getPublicPath)();
1851
+ let publicPath;
1852
+ if ("publicPath" in manifestJson.metaData) {
1853
+ publicPath = manifestJson.metaData.publicPath;
1854
+ } else {
1855
+ const getPublicPath = new Function(manifestJson.metaData.getPublicPath);
1856
+ if (manifestJson.metaData.getPublicPath.startsWith("function")) {
1857
+ publicPath = getPublicPath()();
1858
+ } else {
1859
+ publicPath = getPublicPath();
1860
+ }
1861
+ }
1852
1862
  if (publicPath === "auto") {
1853
1863
  publicPath = (0, import_sdk4.inferAutoPublicPath)(remoteInfo.url);
1854
1864
  }
@@ -1630,7 +1630,17 @@ var DTSManager = (_a2 = class {
1630
1630
  }
1631
1631
  return u;
1632
1632
  }, "addProtocol");
1633
- let publicPath = "publicPath" in manifestJson.metaData ? manifestJson.metaData.publicPath : new Function(manifestJson.metaData.getPublicPath)();
1633
+ let publicPath;
1634
+ if ("publicPath" in manifestJson.metaData) {
1635
+ publicPath = manifestJson.metaData.publicPath;
1636
+ } else {
1637
+ const getPublicPath = new Function(manifestJson.metaData.getPublicPath);
1638
+ if (manifestJson.metaData.getPublicPath.startsWith("function")) {
1639
+ publicPath = getPublicPath()();
1640
+ } else {
1641
+ publicPath = getPublicPath();
1642
+ }
1643
+ }
1634
1644
  if (publicPath === "auto") {
1635
1645
  publicPath = (0, import_sdk4.inferAutoPublicPath)(remoteInfo.url);
1636
1646
  }
package/dist/index.js CHANGED
@@ -1362,7 +1362,17 @@ var DTSManager = (_a = class {
1362
1362
  }
1363
1363
  return u;
1364
1364
  }, "addProtocol");
1365
- let publicPath = "publicPath" in manifestJson.metaData ? manifestJson.metaData.publicPath : new Function(manifestJson.metaData.getPublicPath)();
1365
+ let publicPath;
1366
+ if ("publicPath" in manifestJson.metaData) {
1367
+ publicPath = manifestJson.metaData.publicPath;
1368
+ } else {
1369
+ const getPublicPath = new Function(manifestJson.metaData.getPublicPath);
1370
+ if (manifestJson.metaData.getPublicPath.startsWith("function")) {
1371
+ publicPath = getPublicPath()();
1372
+ } else {
1373
+ publicPath = getPublicPath();
1374
+ }
1375
+ }
1366
1376
  if (publicPath === "auto") {
1367
1377
  publicPath = (0, import_sdk4.inferAutoPublicPath)(remoteInfo.url);
1368
1378
  }
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/dts-plugin",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
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.2.0",
3
+ "version": "0.2.1",
4
4
  "author": "hanric <hanric.zhang@gmail.com>",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -55,15 +55,15 @@
55
55
  "log4js": "6.9.1",
56
56
  "node-schedule": "2.1.1",
57
57
  "ws": "8.17.1",
58
- "@module-federation/sdk": "0.2.0",
59
- "@module-federation/managers": "0.2.0",
60
- "@module-federation/third-party-dts-extractor": "0.2.0"
58
+ "@module-federation/sdk": "0.2.1",
59
+ "@module-federation/managers": "0.2.1",
60
+ "@module-federation/third-party-dts-extractor": "0.2.1"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@types/ws": "8.5.10",
64
64
  "@types/koa": "2.11.2",
65
65
  "@types/node-schedule": "2.1.7",
66
- "@module-federation/runtime": "0.2.0"
66
+ "@module-federation/runtime": "0.2.1"
67
67
  },
68
68
  "peerDependencies": {
69
69
  "typescript": "^4.9.0 || ^5.0.0",