@module-federation/third-party-dts-extractor 0.1.19 → 0.1.20
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 +6 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6 -2
- package/dist/index.mjs +6 -2
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
@@ -6,6 +6,7 @@ declare class ThirdPartyExtractor {
|
|
6
6
|
constructor(destDir: string, context?: string);
|
7
7
|
addPkgs(pkgName: string, dirName: string): void;
|
8
8
|
inferPkgDir(importPath: string): string | void;
|
9
|
+
collectTypeImports(str: string): string[];
|
9
10
|
collectPkgs(str: string): void;
|
10
11
|
copyDts(): void;
|
11
12
|
}
|
package/dist/index.d.ts
CHANGED
@@ -6,6 +6,7 @@ declare class ThirdPartyExtractor {
|
|
6
6
|
constructor(destDir: string, context?: string);
|
7
7
|
addPkgs(pkgName: string, dirName: string): void;
|
8
8
|
inferPkgDir(importPath: string): string | void;
|
9
|
+
collectTypeImports(str: string): string[];
|
9
10
|
collectPkgs(str: string): void;
|
10
11
|
copyDts(): void;
|
11
12
|
}
|
package/dist/index.js
CHANGED
@@ -74,14 +74,18 @@ var ThirdPartyExtractor = class {
|
|
74
74
|
return;
|
75
75
|
}
|
76
76
|
}
|
77
|
-
|
77
|
+
collectTypeImports(str) {
|
78
78
|
const { pattern } = this;
|
79
79
|
let match;
|
80
80
|
const imports = /* @__PURE__ */ new Set();
|
81
81
|
while ((match = pattern.exec(str)) !== null) {
|
82
82
|
imports.add(match[2]);
|
83
83
|
}
|
84
|
-
[...imports]
|
84
|
+
return [...imports];
|
85
|
+
}
|
86
|
+
collectPkgs(str) {
|
87
|
+
const imports = this.collectTypeImports(str);
|
88
|
+
imports.forEach((importPath) => {
|
85
89
|
this.inferPkgDir(importPath);
|
86
90
|
});
|
87
91
|
}
|
package/dist/index.mjs
CHANGED
@@ -74,14 +74,18 @@ var ThirdPartyExtractor = class {
|
|
74
74
|
return;
|
75
75
|
}
|
76
76
|
}
|
77
|
-
|
77
|
+
collectTypeImports(str) {
|
78
78
|
const { pattern } = this;
|
79
79
|
let match;
|
80
80
|
const imports = /* @__PURE__ */ new Set();
|
81
81
|
while ((match = pattern.exec(str)) !== null) {
|
82
82
|
imports.add(match[2]);
|
83
83
|
}
|
84
|
-
[...imports]
|
84
|
+
return [...imports];
|
85
|
+
}
|
86
|
+
collectPkgs(str) {
|
87
|
+
const imports = this.collectTypeImports(str);
|
88
|
+
imports.forEach((importPath) => {
|
85
89
|
this.inferPkgDir(importPath);
|
86
90
|
});
|
87
91
|
}
|
package/dist/package.json
CHANGED