diff --git a/common/space_lua/stdlib.ts b/common/space_lua/stdlib.ts index 904244fa..5ed15ea5 100644 --- a/common/space_lua/stdlib.ts +++ b/common/space_lua/stdlib.ts @@ -30,7 +30,10 @@ import { templateApi } from "$common/space_lua/stdlib/template.ts"; import { mathApi } from "$common/space_lua/stdlib/math.ts"; const printFunction = new LuaBuiltinFunction(async (_sf, ...args) => { - console.log("[Lua]", ...(await Promise.all(args.map(luaToString)))); + console.log( + "[Lua]", + ...(await Promise.all(args.map((v) => luaToString(v)))), + ); }); const assertFunction = new LuaBuiltinFunction( diff --git a/common/space_lua_api.ts b/common/space_lua_api.ts index 5933d708..7f2ed42c 100644 --- a/common/space_lua_api.ts +++ b/common/space_lua_api.ts @@ -120,15 +120,15 @@ function exposeDefinitions( ); } -async function buildThreadLocalEnv(system: System, globalEnv: LuaEnv) { +function buildThreadLocalEnv(_system: System, globalEnv: LuaEnv) { const tl = new LuaEnv(); - const currentPageMeta = await system.localSyscall( - "editor.getCurrentPageMeta", - [], - ); - tl.setLocal("pageMeta", currentPageMeta); + // const currentPageMeta = await system.localSyscall( + // "editor.getCurrentPageMeta", + // [], + // ); + // tl.setLocal("pageMeta", currentPageMeta); tl.setLocal("_GLOBAL", globalEnv); - return tl; + return Promise.resolve(tl); } async function handleLuaError(e: any, system: System) {