@ives_xxz/framework 1.4.1 → 1.4.2

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.
Files changed (2) hide show
  1. package/entry/FWEntry.ts +14 -1
  2. package/package.json +1 -1
package/entry/FWEntry.ts CHANGED
@@ -166,7 +166,20 @@ export default class FWEntry implements FW.Entry {
166
166
  }
167
167
 
168
168
  getDepend(bundleName: string) {
169
- return this.map.get(bundleName)?.depend || [];
169
+ const dependencySet = new Set<string>();
170
+ const findDependencies = (name: string) => {
171
+ const directDeps = this.map.get(name)?.depend || [];
172
+ for (const dep of directDeps) {
173
+ if (!dependencySet.has(dep)) {
174
+ dependencySet.add(dep);
175
+ findDependencies(dep);
176
+ }
177
+ }
178
+ };
179
+
180
+ findDependencies(bundleName);
181
+
182
+ return Array.from(dependencySet);
170
183
  }
171
184
 
172
185
  hasSceneName(sceneName: string) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ives_xxz/framework",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "cocoscreator 2.x mvc framework",
5
5
  "main": "index.js",
6
6
  "keywords": ["123456"],