Skip to content

Commit 10e7e2d

Browse files
committed
Add editor config and missing docs
1 parent 433a46e commit 10e7e2d

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

.editorconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
root = true
2+
3+
[*]
4+
indent_style = tab
5+
indent_size = 4
6+
max_line_length = 128

packages/autorun-env/api.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,42 @@
346346
}
347347
]
348348
},
349+
{
350+
"name": "isFunctionAuthorized",
351+
"description": "Checks if a given function or stack level is authorized by the Autorun environment.",
352+
"realm": "shared",
353+
"parameters": [
354+
{
355+
"name": "funcOrLevel",
356+
"type": "function | integer",
357+
"description": "The function to check or the stack level"
358+
}
359+
],
360+
"returns": [
361+
{
362+
"type": "boolean",
363+
"description": "True if the function/level is authorized, false otherwise"
364+
}
365+
]
366+
},
367+
{
368+
"name": "isProtoAuthorized",
369+
"description": "Checks if a given prototype is authorized by the Autorun environment. This can be used to verify if protos from VM events are from Autorun or not.",
370+
"realm": "shared",
371+
"parameters": [
372+
{
373+
"name": "proto",
374+
"type": "proto",
375+
"description": "The prototype to check"
376+
}
377+
],
378+
"returns": [
379+
{
380+
"type": "boolean",
381+
"description": "True if the prototype is authorized, false otherwise"
382+
}
383+
]
384+
},
349385
{
350386
"name": "load",
351387
"description": "Compiles a Lua string into a callable function without executing it. Similar to Lua's loadstring/load function. Use this to dynamically compile code at runtime. NOTE: The environment inside defaults to the global environment, NOT Autorun's environment.",

0 commit comments

Comments
 (0)