fix: include ignored libraries

This commit is contained in:
Erica Marigold 2024-05-15 21:55:04 +05:30
parent 4379ff5373
commit f5f6d1be2c
No known key found for this signature in database
GPG key ID: 2768CC0C23D245D1
2 changed files with 8 additions and 2 deletions

View file

@ -6,6 +6,6 @@
],
"luau-lsp.require.mode": "relativeToFile",
"luau-lsp.require.directoryAliases": {
"@lune/": "~/.lune/.typedefs/0.8.0/"
"@lune/": "~/.lune/.typedefs/0.8.4/"
}
}

View file

@ -4,6 +4,8 @@ local process = require("@lune/process")
local serde = require("@lune/serde")
local stdio = require("@lune/stdio")
local task = require("@lune/task")
local regex = require("@lune/regex")
local datetime = require("@lune/datetime")
local processArgs = table.clone(process.args)
local filePath: string = table.remove(processArgs, 1)
@ -95,7 +97,9 @@ local SANDBOXED_LUNE_STD_LIB = {
["@lune/fs"] = setmetatable({}, {
__index = constructProtectedLibMt("fs"),
}),
["@lune/luau"] = luau,
["@lune/luau"] = setmetatable({}, {
__index = constructProtectedLibMt("luau")
}),
["@lune/process"] = setmetatable({}, {
__index = constructProtectedLibMt("process"),
}),
@ -129,6 +133,8 @@ local SANDBOXED_LUNE_STD_LIB = {
}),
["@lune/serde"] = serde,
["@lune/task"] = task,
["@lune/regex"] = regex,
["@lune/datetime"] = datetime,
}
local function sandboxedRequire(path: string)