diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 96fe32dda..25778e969 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -51,7 +51,7 @@ fabric-loom = "1.0-SNAPSHOT" forgeGradle = "5.1.+" githubRelease = "2.2.12" ideaExt = "1.1.6" -illuaminate = "0.1.0-7-g2a5a89c" +illuaminate = "0.1.0-12-ga03e9cd" librarian = "1.+" minotaur = "2.+" mixinGradle = "0.7.+" diff --git a/projects/core/src/main/resources/data/computercraft/lua/rom/modules/internal/cc/import.lua b/projects/core/src/main/resources/data/computercraft/lua/rom/modules/main/cc/internal/import.lua similarity index 87% rename from projects/core/src/main/resources/data/computercraft/lua/rom/modules/internal/cc/import.lua rename to projects/core/src/main/resources/data/computercraft/lua/rom/modules/main/cc/internal/import.lua index 2b8f26db0..1aa80900e 100644 --- a/projects/core/src/main/resources/data/computercraft/lua/rom/modules/internal/cc/import.lua +++ b/projects/core/src/main/resources/data/computercraft/lua/rom/modules/main/cc/internal/import.lua @@ -1,8 +1,16 @@ --- Internal module for handling file uploads. This has NO stability guarantees, --- and so SHOULD NOT be relyed on in user code. +--[[- Upload a list of files, as received by the @{event!file_transfer} event. + +:::warning +This is an internal module and SHOULD NOT be used in your own code. It may +be removed or changed at any time. +::: + +@local +]] local completion = require "cc.completion" +--- @tparam { file_transfer.TransferredFile ...} files The files to upload. return function(files) local overwrite = {} for _, file in pairs(files) do diff --git a/projects/core/src/main/resources/data/computercraft/lua/rom/programs/import.lua b/projects/core/src/main/resources/data/computercraft/lua/rom/programs/import.lua index 027357ea8..2e0304d46 100644 --- a/projects/core/src/main/resources/data/computercraft/lua/rom/programs/import.lua +++ b/projects/core/src/main/resources/data/computercraft/lua/rom/programs/import.lua @@ -18,7 +18,5 @@ if #files == 0 then return end -package.path = package.path .. ";/rom/modules/internal/?.lua" - -local ok, err = require("cc.import")(files) +local ok, err = require("cc.internal.import")(files) if not ok and err then printError(err) end diff --git a/projects/core/src/main/resources/data/computercraft/lua/rom/programs/shell.lua b/projects/core/src/main/resources/data/computercraft/lua/rom/programs/shell.lua index 6add0424f..c4a4104d5 100644 --- a/projects/core/src/main/resources/data/computercraft/lua/rom/programs/shell.lua +++ b/projects/core/src/main/resources/data/computercraft/lua/rom/programs/shell.lua @@ -37,7 +37,7 @@ end -- Set up a dummy require based on the current shell, for loading some of our internal dependencies. local require do - local env = setmetatable(createShellEnv("/rom/modules/internal"), { __index = _ENV }) + local env = setmetatable(createShellEnv("/rom/programs"), { __index = _ENV }) require = env.require end local expect = require("cc.expect").expect @@ -655,7 +655,7 @@ else term.setCursorBlink(false) -- Run the import script with the provided files - local ok, err = require("cc.import")(event[2].getFiles()) + local ok, err = require("cc.internal.import")(event[2].getFiles()) if not ok and err then printError(err) end -- And attempt to restore the prompt.