@kezh/my-custom-js-converter 1.1.3 → 1.1.5
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/core/context/map_context.js +18 -9
- package/package.json +1 -1
|
@@ -153,16 +153,25 @@ class MapContext {
|
|
|
153
153
|
const inlineMethods = (0, ast_1.getInlineMethodsByMethodName)(astMap.get(method[0]), method[0], method[1], useMethodNameMap);
|
|
154
154
|
readyStack.push(...inlineMethods.map((m) => m.split("#")));
|
|
155
155
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
156
|
+
const filterMapConfig = new map_config_1.MapConfig();
|
|
157
|
+
this.getModNames()
|
|
158
|
+
.map((modName) => [modName, this.getMod(modName)])
|
|
159
|
+
.filter((modInfo) => modInfo[1])
|
|
160
|
+
.forEach((modInfo) => {
|
|
161
|
+
const filterDeps = new map_config_1.Dependencies();
|
|
162
|
+
const mod = modInfo[1];
|
|
163
|
+
const deps = mod.dependencies;
|
|
164
|
+
Object.keys(deps)
|
|
165
|
+
.filter((depName) => [...filterMethodMap.keys()].includes(depName))
|
|
166
|
+
.map((depName) => {
|
|
167
|
+
const filterMethods = deps[depName].methods.filter((method) => filterMethodMap.get(depName).has(method));
|
|
168
|
+
return [depName, new map_config_1.Dependency(filterMethods)];
|
|
169
|
+
})
|
|
170
|
+
.forEach((depInfo) => (filterDeps[depInfo[0]] = depInfo[1]));
|
|
171
|
+
const filterMod = new map_config_1.Mod(mod === null || mod === void 0 ? void 0 : mod.src, filterDeps);
|
|
172
|
+
filterMapConfig[modInfo[0]] = filterMod;
|
|
165
173
|
});
|
|
174
|
+
this.map = filterMapConfig;
|
|
166
175
|
}
|
|
167
176
|
}
|
|
168
177
|
exports.MapContext = MapContext;
|