chore: sync changes from production VM#14
Merged
Conversation
在加载扩展前收集非官方扩展信息并通过回调等待用户确认,增强安全性
当扩展URL未在extensionURLs中记录时,检查wildExtensions中是否有记录,确保扩展确认时信息准确
Updated the VirtualMachine class to utilize the new addAsset method in the Gandi class for adding assets. This change ensures duplicate asset IDs are checked before adding, improving asset management and preventing duplicates. Additionally, modified the getExtensionAssets method to handle potential undefined asset types more robustly.
Updated the addAsset method to improve the duplicate asset check by comparing asset properties (name, dataFormat, and md5) instead of just the assetId. This change enhances asset management and prevents potential duplicates more effectively.
添加检查全局积木的逻辑,当存在全局积木时同时清空所有角色的缓存,避免缓存不一致
使用 withScratchAPI 替换 setupScratchAPI 和 clearScratchAPI,通过 AsyncLimiter 确保同一时间只有一个扩展在执行加载操作,避免全局状态竞争问题。移除不必要的 pending 集合和 needSetup 标志,简化代码结构。
先克隆全局Scratch对象再清理vm,避免扩展持有的旧引用被破坏
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Sync changes from production VM