@module-federation/dts-plugin 0.2.7 → 0.2.8

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,14 @@
1
1
  # @module-federation/dts-plugin
2
2
 
3
+ ## 0.2.8
4
+
5
+ ### Patch Changes
6
+
7
+ - f3d13c2: fix(dts-plugin): ensure dts file path if it has deep path
8
+ - @module-federation/sdk@0.2.8
9
+ - @module-federation/managers@0.2.8
10
+ - @module-federation/third-party-dts-extractor@0.2.8
11
+
3
12
  ## 0.2.7
4
13
 
5
14
  ### Patch Changes
package/dist/core.js CHANGED
@@ -176,6 +176,7 @@ var processTypesFile = /* @__PURE__ */ __name((options) => __async(void 0, null,
176
176
  const mfeTypeEntry = (0, import_path.join)(mfTypePath, `${sourceEntry}${DEFINITION_FILE_EXTENSION}`);
177
177
  const mfeTypeEntryDirectory = (0, import_path.dirname)(mfeTypeEntry);
178
178
  const relativePathToOutput = (0, import_path.relative)(mfeTypeEntryDirectory, filePath).replace(DEFINITION_FILE_EXTENSION, "").replace(STARTS_WITH_SLASH, "").split(import_path.sep).join("/");
179
+ (0, import_fs_extra.ensureDirSync)(mfeTypeEntryDirectory);
179
180
  yield (0, import_promises.writeFile)(mfeTypeEntry, `export * from './${relativePathToOutput}';
180
181
  export { default } from './${relativePathToOutput}';`);
181
182
  }
@@ -226,6 +227,9 @@ var compileTs = /* @__PURE__ */ __name((mapComponentsToExpose, tsConfig, remoteO
226
227
  }
227
228
  yield (0, import_promises.rm)(tempTsConfigJsonPath);
228
229
  } catch (err) {
230
+ if (isDebugMode()) {
231
+ console.log("tsconfig: ", JSON.stringify(tsConfig, null, 2));
232
+ }
229
233
  throw err;
230
234
  }
231
235
  }), "compileTs");
@@ -1318,7 +1322,7 @@ var DTSManager = (_a = class {
1318
1322
  if (!Object.keys(mapComponentsToExpose).length) {
1319
1323
  return;
1320
1324
  }
1321
- this.extractRemoteTypes({
1325
+ yield this.extractRemoteTypes({
1322
1326
  remoteOptions,
1323
1327
  tsConfig,
1324
1328
  mapComponentsToExpose
@@ -108,6 +108,7 @@ var processTypesFile = /* @__PURE__ */ __name((options) => __async(void 0, null,
108
108
  const mfeTypeEntry = join(mfTypePath, `${sourceEntry}${DEFINITION_FILE_EXTENSION}`);
109
109
  const mfeTypeEntryDirectory = dirname(mfeTypeEntry);
110
110
  const relativePathToOutput = relative(mfeTypeEntryDirectory, filePath).replace(DEFINITION_FILE_EXTENSION, "").replace(STARTS_WITH_SLASH, "").split(sep).join("/");
111
+ ensureDirSync(mfeTypeEntryDirectory);
111
112
  yield writeFile(mfeTypeEntry, `export * from './${relativePathToOutput}';
112
113
  export { default } from './${relativePathToOutput}';`);
113
114
  }
@@ -158,6 +159,9 @@ var compileTs = /* @__PURE__ */ __name((mapComponentsToExpose, tsConfig, remoteO
158
159
  }
159
160
  yield rm(tempTsConfigJsonPath);
160
161
  } catch (err) {
162
+ if (isDebugMode()) {
163
+ console.log("tsconfig: ", JSON.stringify(tsConfig, null, 2));
164
+ }
161
165
  throw err;
162
166
  }
163
167
  }), "compileTs");
@@ -1647,7 +1651,7 @@ var DTSManager = (_a = class {
1647
1651
  if (!Object.keys(mapComponentsToExpose).length) {
1648
1652
  return;
1649
1653
  }
1650
- this.extractRemoteTypes({
1654
+ yield this.extractRemoteTypes({
1651
1655
  remoteOptions,
1652
1656
  tsConfig,
1653
1657
  mapComponentsToExpose
package/dist/esm/core.js CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  retrieveTypesZipPath,
15
15
  rpc_exports,
16
16
  validateOptions
17
- } from "./chunk-ZLQBXHXA.js";
17
+ } from "./chunk-2RCHPGBO.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-ZLQBXHXA.js";
12
+ } from "./chunk-2RCHPGBO.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-ZLQBXHXA.js";
5
+ } from "./chunk-2RCHPGBO.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-ZLQBXHXA.js";
10
+ } from "./chunk-2RCHPGBO.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-ZLQBXHXA.js";
4
+ } from "./chunk-2RCHPGBO.js";
5
5
  import {
6
6
  __async,
7
7
  __name
@@ -156,6 +156,7 @@ var processTypesFile = /* @__PURE__ */ __name((options) => __async(void 0, null,
156
156
  const mfeTypeEntry = (0, import_path.join)(mfTypePath, `${sourceEntry}${DEFINITION_FILE_EXTENSION}`);
157
157
  const mfeTypeEntryDirectory = (0, import_path.dirname)(mfeTypeEntry);
158
158
  const relativePathToOutput = (0, import_path.relative)(mfeTypeEntryDirectory, filePath).replace(DEFINITION_FILE_EXTENSION, "").replace(STARTS_WITH_SLASH, "").split(import_path.sep).join("/");
159
+ (0, import_fs_extra.ensureDirSync)(mfeTypeEntryDirectory);
159
160
  yield (0, import_promises.writeFile)(mfeTypeEntry, `export * from './${relativePathToOutput}';
160
161
  export { default } from './${relativePathToOutput}';`);
161
162
  }
@@ -206,6 +207,9 @@ var compileTs = /* @__PURE__ */ __name((mapComponentsToExpose, tsConfig, remoteO
206
207
  }
207
208
  yield (0, import_promises.rm)(tempTsConfigJsonPath);
208
209
  } catch (err) {
210
+ if (isDebugMode()) {
211
+ console.log("tsconfig: ", JSON.stringify(tsConfig, null, 2));
212
+ }
209
213
  throw err;
210
214
  }
211
215
  }), "compileTs");
@@ -1827,7 +1831,7 @@ var DTSManager = (_a = class {
1827
1831
  if (!Object.keys(mapComponentsToExpose).length) {
1828
1832
  return;
1829
1833
  }
1830
- this.extractRemoteTypes({
1834
+ yield this.extractRemoteTypes({
1831
1835
  remoteOptions,
1832
1836
  tsConfig,
1833
1837
  mapComponentsToExpose
@@ -334,6 +334,7 @@ var processTypesFile = /* @__PURE__ */ __name((options) => __async(void 0, null,
334
334
  const mfeTypeEntry = (0, import_path2.join)(mfTypePath, `${sourceEntry}${DEFINITION_FILE_EXTENSION}`);
335
335
  const mfeTypeEntryDirectory = (0, import_path2.dirname)(mfeTypeEntry);
336
336
  const relativePathToOutput = (0, import_path2.relative)(mfeTypeEntryDirectory, filePath).replace(DEFINITION_FILE_EXTENSION, "").replace(STARTS_WITH_SLASH, "").split(import_path2.sep).join("/");
337
+ (0, import_fs_extra.ensureDirSync)(mfeTypeEntryDirectory);
337
338
  yield (0, import_promises.writeFile)(mfeTypeEntry, `export * from './${relativePathToOutput}';
338
339
  export { default } from './${relativePathToOutput}';`);
339
340
  }
@@ -384,6 +385,9 @@ var compileTs = /* @__PURE__ */ __name((mapComponentsToExpose, tsConfig, remoteO
384
385
  }
385
386
  yield (0, import_promises.rm)(tempTsConfigJsonPath);
386
387
  } catch (err) {
388
+ if (isDebugMode()) {
389
+ console.log("tsconfig: ", JSON.stringify(tsConfig, null, 2));
390
+ }
387
391
  throw err;
388
392
  }
389
393
  }), "compileTs");
@@ -1645,7 +1649,7 @@ var DTSManager = (_a2 = class {
1645
1649
  if (!Object.keys(mapComponentsToExpose).length) {
1646
1650
  return;
1647
1651
  }
1648
- this.extractRemoteTypes({
1652
+ yield this.extractRemoteTypes({
1649
1653
  remoteOptions,
1650
1654
  tsConfig,
1651
1655
  mapComponentsToExpose
package/dist/index.js CHANGED
@@ -170,6 +170,7 @@ var processTypesFile = /* @__PURE__ */ __name((options) => __async(void 0, null,
170
170
  const mfeTypeEntry = (0, import_path.join)(mfTypePath, `${sourceEntry}${DEFINITION_FILE_EXTENSION}`);
171
171
  const mfeTypeEntryDirectory = (0, import_path.dirname)(mfeTypeEntry);
172
172
  const relativePathToOutput = (0, import_path.relative)(mfeTypeEntryDirectory, filePath).replace(DEFINITION_FILE_EXTENSION, "").replace(STARTS_WITH_SLASH, "").split(import_path.sep).join("/");
173
+ (0, import_fs_extra.ensureDirSync)(mfeTypeEntryDirectory);
173
174
  yield (0, import_promises.writeFile)(mfeTypeEntry, `export * from './${relativePathToOutput}';
174
175
  export { default } from './${relativePathToOutput}';`);
175
176
  }
@@ -220,6 +221,9 @@ var compileTs = /* @__PURE__ */ __name((mapComponentsToExpose, tsConfig, remoteO
220
221
  }
221
222
  yield (0, import_promises.rm)(tempTsConfigJsonPath);
222
223
  } catch (err) {
224
+ if (isDebugMode()) {
225
+ console.log("tsconfig: ", JSON.stringify(tsConfig, null, 2));
226
+ }
223
227
  throw err;
224
228
  }
225
229
  }), "compileTs");
@@ -1341,7 +1345,7 @@ var DTSManager = (_a = class {
1341
1345
  if (!Object.keys(mapComponentsToExpose).length) {
1342
1346
  return;
1343
1347
  }
1344
- this.extractRemoteTypes({
1348
+ yield this.extractRemoteTypes({
1345
1349
  remoteOptions,
1346
1350
  tsConfig,
1347
1351
  mapComponentsToExpose
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/dts-plugin",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
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.7",
3
+ "version": "0.2.8",
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.2.7",
59
- "@module-federation/managers": "0.2.7",
60
- "@module-federation/third-party-dts-extractor": "0.2.7"
58
+ "@module-federation/sdk": "0.2.8",
59
+ "@module-federation/managers": "0.2.8",
60
+ "@module-federation/third-party-dts-extractor": "0.2.8"
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.2.7"
69
+ "@module-federation/runtime": "0.2.8"
70
70
  },
71
71
  "peerDependencies": {
72
72
  "typescript": "^4.9.0 || ^5.0.0",