fix: 修复事件拉取函数的安全性问题并改进错误处理

修复多个文件中事件拉取函数的安全性问题,添加更健壮的fallback机制
在imageview.lua中改进错误信息显示,确保image变量转换为字符串
在pkg.lua中调整JSON序列化参数以生成更紧凑的输出
This commit is contained in:
2025-09-03 15:56:53 +08:00
parent 0ffb590516
commit 9b94ae16e2
4 changed files with 22 additions and 11 deletions

View File

@@ -60,7 +60,7 @@ local function create_package(pkg_name)
}
local json_file = io.open(fs.combine(version_dir, "package.json"), "w")
if json_file then
json_file:write(textutils.serializeJSON(package_json, true))
json_file:write(textutils.serializeJSON(package_json, false))
json_file:close()
print("Created package.json")
else