code: nextjs,frontends,with (2 files)

This commit is contained in:
2025-12-25 22:55:54 +00:00
parent f241fd56de
commit a729da323f
2 changed files with 4 additions and 4 deletions

View File

@@ -1,11 +1,11 @@
import type { LuaExecutionContext, LuaExecutionResult } from '../types'
import type { SandboxedLuaEngine } from '../../sandboxed-lua-engine'
import type { SandboxedLuaEngineState } from './types'
/**
* Execute Lua code with a timeout guard
*/
export function executeWithTimeout(
this: SandboxedLuaEngine,
this: SandboxedLuaEngineState,
code: string,
context: LuaExecutionContext
): Promise<LuaExecutionResult> {

View File

@@ -1,12 +1,12 @@
import * as fengari from 'fengari-web'
import type { SandboxedLuaEngine } from '../../sandboxed-lua-engine'
import type { SandboxedLuaEngineState } from './types'
const lua = fengari.lua
/**
* Replace globals with a safe sandbox environment
*/
export function setupSandboxedEnvironment(this: SandboxedLuaEngine): void {
export function setupSandboxedEnvironment(this: SandboxedLuaEngineState): void {
if (!this.engine) return
const { L } = this.engine