feat(包管理): 添加创建新包的功能并更新文档

添加pkg init命令用于创建新包,包括生成package.json和主代码文件模板
新增storage命令及相关帮助文档
更新安装器版本号并改进GUI事件处理
This commit is contained in:
2025-09-03 15:11:27 +08:00
parent c91c989b57
commit 0ffb590516
6 changed files with 262 additions and 3 deletions

View File

@@ -592,10 +592,14 @@ end
function GUIManager:handleEvents()
while self.running do
-- Safely get the pullEvent function
-- Safely get the pullEvent function with fallback to rc.pullEvent
local pullEventFunc = os.pullEvent
if type(pullEventFunc) ~= "function" then
error("os.pullEvent is not a function")
-- Try using rc.pullEvent as fallback
pullEventFunc = rc and rc.pullEvent
if type(pullEventFunc) ~= "function" then
error("Neither os.pullEvent nor rc.pullEvent is available")
end
end
-- Get the next event