@module-federation/dts-plugin 0.1.9 → 0.1.11
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 +17 -0
- package/dist/core.js +7 -4
- package/dist/forkDevWorker.js +7 -4
- package/dist/forkGenerateDts.js +7 -4
- package/dist/index.js +7 -4
- package/dist/package.json +1 -1
- package/package.json +4 -4
package/dist/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @module-federation/dts-plugin
|
|
2
2
|
|
|
3
|
+
## 0.1.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- @module-federation/sdk@0.1.11
|
|
8
|
+
- @module-federation/managers@0.1.11
|
|
9
|
+
- @module-federation/third-party-dts-extractor@0.1.11
|
|
10
|
+
|
|
11
|
+
## 0.1.10
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 3d4fb69: import path on Windows
|
|
16
|
+
- @module-federation/sdk@0.1.10
|
|
17
|
+
- @module-federation/managers@0.1.10
|
|
18
|
+
- @module-federation/third-party-dts-extractor@0.1.10
|
|
19
|
+
|
|
3
20
|
## 0.1.9
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/core.js
CHANGED
|
@@ -110,7 +110,10 @@ var createHost = (mapComponentsToExpose, tsConfig, remoteOptions, cb) => {
|
|
|
110
110
|
const host = import_typescript.default.createCompilerHost(tsConfig);
|
|
111
111
|
const originalWriteFile = host.writeFile;
|
|
112
112
|
const mapExposeToEntry = Object.fromEntries(
|
|
113
|
-
Object.entries(mapComponentsToExpose).map((
|
|
113
|
+
Object.entries(mapComponentsToExpose).map(([exposed, filename]) => [
|
|
114
|
+
(0, import_path.normalize)(filename),
|
|
115
|
+
exposed
|
|
116
|
+
])
|
|
114
117
|
);
|
|
115
118
|
const mfTypePath = retrieveMfTypesPath(tsConfig, remoteOptions);
|
|
116
119
|
host.writeFile = (filepath, text, writeOrderByteMark, onError, sourceFiles, data) => {
|
|
@@ -123,14 +126,14 @@ var createHost = (mapComponentsToExpose, tsConfig, remoteOptions, cb) => {
|
|
|
123
126
|
data
|
|
124
127
|
);
|
|
125
128
|
for (const sourceFile of sourceFiles || []) {
|
|
126
|
-
const sourceEntry = mapExposeToEntry[sourceFile.fileName];
|
|
129
|
+
const sourceEntry = mapExposeToEntry[(0, import_path.normalize)(sourceFile.fileName)];
|
|
127
130
|
if (sourceEntry) {
|
|
128
131
|
const mfeTypeEntry = (0, import_path.join)(
|
|
129
132
|
mfTypePath,
|
|
130
133
|
`${sourceEntry}${DEFINITION_FILE_EXTENSION}`
|
|
131
134
|
);
|
|
132
135
|
const mfeTypeEntryDirectory = (0, import_path.dirname)(mfeTypeEntry);
|
|
133
|
-
const relativePathToOutput = (0, import_path.relative)(mfeTypeEntryDirectory, filepath).replace(DEFINITION_FILE_EXTENSION, "").replace(STARTS_WITH_SLASH, "");
|
|
136
|
+
const relativePathToOutput = (0, import_path.relative)(mfeTypeEntryDirectory, filepath).replace(DEFINITION_FILE_EXTENSION, "").replace(STARTS_WITH_SLASH, "").split(import_path.sep).join("/");
|
|
134
137
|
originalWriteFile(
|
|
135
138
|
mfeTypeEntry,
|
|
136
139
|
`export * from './${relativePathToOutput}';
|
|
@@ -1125,7 +1128,7 @@ var DTSManager = class {
|
|
|
1125
1128
|
const exposePaths = /* @__PURE__ */ new Set();
|
|
1126
1129
|
const packageType = Object.keys(mapComponentsToExpose).reduce(
|
|
1127
1130
|
(sum, exposeKey) => {
|
|
1128
|
-
const exposePath = import_path3.default.join(REMOTE_ALIAS_IDENTIFIER, exposeKey);
|
|
1131
|
+
const exposePath = import_path3.default.join(REMOTE_ALIAS_IDENTIFIER, exposeKey).split(import_path3.default.sep).join("/");
|
|
1129
1132
|
exposePaths.add(`'${exposePath}'`);
|
|
1130
1133
|
const curType = `T extends '${exposePath}' ? typeof import('${exposePath}') :`;
|
|
1131
1134
|
sum = curType + sum;
|
package/dist/forkDevWorker.js
CHANGED
|
@@ -90,7 +90,10 @@ var createHost = (mapComponentsToExpose, tsConfig, remoteOptions, cb) => {
|
|
|
90
90
|
const host = import_typescript.default.createCompilerHost(tsConfig);
|
|
91
91
|
const originalWriteFile = host.writeFile;
|
|
92
92
|
const mapExposeToEntry = Object.fromEntries(
|
|
93
|
-
Object.entries(mapComponentsToExpose).map((
|
|
93
|
+
Object.entries(mapComponentsToExpose).map(([exposed, filename]) => [
|
|
94
|
+
(0, import_path.normalize)(filename),
|
|
95
|
+
exposed
|
|
96
|
+
])
|
|
94
97
|
);
|
|
95
98
|
const mfTypePath = retrieveMfTypesPath(tsConfig, remoteOptions);
|
|
96
99
|
host.writeFile = (filepath, text, writeOrderByteMark, onError, sourceFiles, data) => {
|
|
@@ -103,14 +106,14 @@ var createHost = (mapComponentsToExpose, tsConfig, remoteOptions, cb) => {
|
|
|
103
106
|
data
|
|
104
107
|
);
|
|
105
108
|
for (const sourceFile of sourceFiles || []) {
|
|
106
|
-
const sourceEntry = mapExposeToEntry[sourceFile.fileName];
|
|
109
|
+
const sourceEntry = mapExposeToEntry[(0, import_path.normalize)(sourceFile.fileName)];
|
|
107
110
|
if (sourceEntry) {
|
|
108
111
|
const mfeTypeEntry = (0, import_path.join)(
|
|
109
112
|
mfTypePath,
|
|
110
113
|
`${sourceEntry}${DEFINITION_FILE_EXTENSION}`
|
|
111
114
|
);
|
|
112
115
|
const mfeTypeEntryDirectory = (0, import_path.dirname)(mfeTypeEntry);
|
|
113
|
-
const relativePathToOutput = (0, import_path.relative)(mfeTypeEntryDirectory, filepath).replace(DEFINITION_FILE_EXTENSION, "").replace(STARTS_WITH_SLASH, "");
|
|
116
|
+
const relativePathToOutput = (0, import_path.relative)(mfeTypeEntryDirectory, filepath).replace(DEFINITION_FILE_EXTENSION, "").replace(STARTS_WITH_SLASH, "").split(import_path.sep).join("/");
|
|
114
117
|
originalWriteFile(
|
|
115
118
|
mfeTypeEntry,
|
|
116
119
|
`export * from './${relativePathToOutput}';
|
|
@@ -1686,7 +1689,7 @@ var DTSManager = class {
|
|
|
1686
1689
|
const exposePaths = /* @__PURE__ */ new Set();
|
|
1687
1690
|
const packageType = Object.keys(mapComponentsToExpose).reduce(
|
|
1688
1691
|
(sum, exposeKey) => {
|
|
1689
|
-
const exposePath = import_path4.default.join(REMOTE_ALIAS_IDENTIFIER, exposeKey);
|
|
1692
|
+
const exposePath = import_path4.default.join(REMOTE_ALIAS_IDENTIFIER, exposeKey).split(import_path4.default.sep).join("/");
|
|
1690
1693
|
exposePaths.add(`'${exposePath}'`);
|
|
1691
1694
|
const curType = `T extends '${exposePath}' ? typeof import('${exposePath}') :`;
|
|
1692
1695
|
sum = curType + sum;
|
package/dist/forkGenerateDts.js
CHANGED
|
@@ -251,7 +251,10 @@ var createHost = (mapComponentsToExpose, tsConfig, remoteOptions, cb) => {
|
|
|
251
251
|
const host = import_typescript2.default.createCompilerHost(tsConfig);
|
|
252
252
|
const originalWriteFile = host.writeFile;
|
|
253
253
|
const mapExposeToEntry = Object.fromEntries(
|
|
254
|
-
Object.entries(mapComponentsToExpose).map((
|
|
254
|
+
Object.entries(mapComponentsToExpose).map(([exposed, filename]) => [
|
|
255
|
+
(0, import_path2.normalize)(filename),
|
|
256
|
+
exposed
|
|
257
|
+
])
|
|
255
258
|
);
|
|
256
259
|
const mfTypePath = retrieveMfTypesPath(tsConfig, remoteOptions);
|
|
257
260
|
host.writeFile = (filepath, text, writeOrderByteMark, onError, sourceFiles, data) => {
|
|
@@ -264,14 +267,14 @@ var createHost = (mapComponentsToExpose, tsConfig, remoteOptions, cb) => {
|
|
|
264
267
|
data
|
|
265
268
|
);
|
|
266
269
|
for (const sourceFile of sourceFiles || []) {
|
|
267
|
-
const sourceEntry = mapExposeToEntry[sourceFile.fileName];
|
|
270
|
+
const sourceEntry = mapExposeToEntry[(0, import_path2.normalize)(sourceFile.fileName)];
|
|
268
271
|
if (sourceEntry) {
|
|
269
272
|
const mfeTypeEntry = (0, import_path2.join)(
|
|
270
273
|
mfTypePath,
|
|
271
274
|
`${sourceEntry}${DEFINITION_FILE_EXTENSION}`
|
|
272
275
|
);
|
|
273
276
|
const mfeTypeEntryDirectory = (0, import_path2.dirname)(mfeTypeEntry);
|
|
274
|
-
const relativePathToOutput = (0, import_path2.relative)(mfeTypeEntryDirectory, filepath).replace(DEFINITION_FILE_EXTENSION, "").replace(STARTS_WITH_SLASH, "");
|
|
277
|
+
const relativePathToOutput = (0, import_path2.relative)(mfeTypeEntryDirectory, filepath).replace(DEFINITION_FILE_EXTENSION, "").replace(STARTS_WITH_SLASH, "").split(import_path2.sep).join("/");
|
|
275
278
|
originalWriteFile(
|
|
276
279
|
mfeTypeEntry,
|
|
277
280
|
`export * from './${relativePathToOutput}';
|
|
@@ -1264,7 +1267,7 @@ var DTSManager = class {
|
|
|
1264
1267
|
const exposePaths = /* @__PURE__ */ new Set();
|
|
1265
1268
|
const packageType = Object.keys(mapComponentsToExpose).reduce(
|
|
1266
1269
|
(sum, exposeKey) => {
|
|
1267
|
-
const exposePath = import_path4.default.join(REMOTE_ALIAS_IDENTIFIER, exposeKey);
|
|
1270
|
+
const exposePath = import_path4.default.join(REMOTE_ALIAS_IDENTIFIER, exposeKey).split(import_path4.default.sep).join("/");
|
|
1268
1271
|
exposePaths.add(`'${exposePath}'`);
|
|
1269
1272
|
const curType = `T extends '${exposePath}' ? typeof import('${exposePath}') :`;
|
|
1270
1273
|
sum = curType + sum;
|
package/dist/index.js
CHANGED
|
@@ -105,7 +105,10 @@ var createHost = (mapComponentsToExpose, tsConfig, remoteOptions, cb) => {
|
|
|
105
105
|
const host = import_typescript.default.createCompilerHost(tsConfig);
|
|
106
106
|
const originalWriteFile = host.writeFile;
|
|
107
107
|
const mapExposeToEntry = Object.fromEntries(
|
|
108
|
-
Object.entries(mapComponentsToExpose).map((
|
|
108
|
+
Object.entries(mapComponentsToExpose).map(([exposed, filename]) => [
|
|
109
|
+
(0, import_path.normalize)(filename),
|
|
110
|
+
exposed
|
|
111
|
+
])
|
|
109
112
|
);
|
|
110
113
|
const mfTypePath = retrieveMfTypesPath(tsConfig, remoteOptions);
|
|
111
114
|
host.writeFile = (filepath, text, writeOrderByteMark, onError, sourceFiles, data) => {
|
|
@@ -118,14 +121,14 @@ var createHost = (mapComponentsToExpose, tsConfig, remoteOptions, cb) => {
|
|
|
118
121
|
data
|
|
119
122
|
);
|
|
120
123
|
for (const sourceFile of sourceFiles || []) {
|
|
121
|
-
const sourceEntry = mapExposeToEntry[sourceFile.fileName];
|
|
124
|
+
const sourceEntry = mapExposeToEntry[(0, import_path.normalize)(sourceFile.fileName)];
|
|
122
125
|
if (sourceEntry) {
|
|
123
126
|
const mfeTypeEntry = (0, import_path.join)(
|
|
124
127
|
mfTypePath,
|
|
125
128
|
`${sourceEntry}${DEFINITION_FILE_EXTENSION}`
|
|
126
129
|
);
|
|
127
130
|
const mfeTypeEntryDirectory = (0, import_path.dirname)(mfeTypeEntry);
|
|
128
|
-
const relativePathToOutput = (0, import_path.relative)(mfeTypeEntryDirectory, filepath).replace(DEFINITION_FILE_EXTENSION, "").replace(STARTS_WITH_SLASH, "");
|
|
131
|
+
const relativePathToOutput = (0, import_path.relative)(mfeTypeEntryDirectory, filepath).replace(DEFINITION_FILE_EXTENSION, "").replace(STARTS_WITH_SLASH, "").split(import_path.sep).join("/");
|
|
129
132
|
originalWriteFile(
|
|
130
133
|
mfeTypeEntry,
|
|
131
134
|
`export * from './${relativePathToOutput}';
|
|
@@ -1116,7 +1119,7 @@ var DTSManager = class {
|
|
|
1116
1119
|
const exposePaths = /* @__PURE__ */ new Set();
|
|
1117
1120
|
const packageType = Object.keys(mapComponentsToExpose).reduce(
|
|
1118
1121
|
(sum, exposeKey) => {
|
|
1119
|
-
const exposePath = import_path3.default.join(REMOTE_ALIAS_IDENTIFIER, exposeKey);
|
|
1122
|
+
const exposePath = import_path3.default.join(REMOTE_ALIAS_IDENTIFIER, exposeKey).split(import_path3.default.sep).join("/");
|
|
1120
1123
|
exposePaths.add(`'${exposePath}'`);
|
|
1121
1124
|
const curType = `T extends '${exposePath}' ? typeof import('${exposePath}') :`;
|
|
1122
1125
|
sum = curType + sum;
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/dts-plugin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"author": "hanric <hanric.zhang@gmail.com>",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"log4js": "6.9.1",
|
|
48
48
|
"node-schedule": "2.1.1",
|
|
49
49
|
"ws": "8.5.0",
|
|
50
|
-
"@module-federation/sdk": "0.1.
|
|
51
|
-
"@module-federation/managers": "0.1.
|
|
52
|
-
"@module-federation/third-party-dts-extractor": "0.1.
|
|
50
|
+
"@module-federation/sdk": "0.1.11",
|
|
51
|
+
"@module-federation/managers": "0.1.11",
|
|
52
|
+
"@module-federation/third-party-dts-extractor": "0.1.11"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@types/ws": "8.5.3",
|