diff --git a/.cargo/config.toml b/.cargo/config.toml deleted file mode 100644 index f0b8114..0000000 --- a/.cargo/config.toml +++ /dev/null @@ -1,16 +0,0 @@ -# Statically link the vcruntime -# https://users.rust-lang.org/t/static-vcruntime-distribute-windows-msvc-binaries-without-needing-to-deploy-vcruntime-dll/57599 -[target.'cfg(all(windows, target_env = "msvc"))'] -rustflags = [ - "-C", - "link-args=/DEFAULTLIB:ucrt.lib /DEFAULTLIB:libvcruntime.lib libcmt.lib", - "-C", - "link-args=/NODEFAULTLIB:libvcruntimed.lib /NODEFAULTLIB:vcruntime.lib /NODEFAULTLIB:vcruntimed.lib", - "-C", - "link-args=/NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcrtd.lib", - "-C", - "link-args=/NODEFAULTLIB:libucrt.lib /NODEFAULTLIB:libucrtd.lib /NODEFAULTLIB:ucrtd.lib", -] - -[target.aarch64-unknown-linux-gnu] -linker = "aarch64-linux-gnu-gcc" diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index f141ce5..0000000 --- a/.editorconfig +++ /dev/null @@ -1,15 +0,0 @@ -root = true - -[*] -charset = utf-8 -end_of_line = lf -trim_trailing_whitespace = true -insert_final_newline = true - -[*.{json,jsonc,json5}] -indent_style = space -indent_size = 4 - -[*.{yml,yaml}] -indent_style = space -indent_size = 2 diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 0b1872d..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "tests/roblox/rbx-test-files"] - path = tests/roblox/rbx-test-files - url = https://github.com/rojo-rbx/rbx-test-files diff --git a/.luaurc b/.luaurc deleted file mode 100644 index 9cc5867..0000000 --- a/.luaurc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "languageMode": "strict", - "lint": { - "*": true - }, - "lintErrors": false, - "typeErrors": true, - "globals": [ - "warn" - ] -} diff --git a/.lune/csv_printer.luau b/.lune/csv_printer.luau deleted file mode 100644 index 2949598..0000000 --- a/.lune/csv_printer.luau +++ /dev/null @@ -1,63 +0,0 @@ ---> A utility script that prints out a CSV ---> file in a prettified format to stdout - -local LINE_SEPARATOR = "\n" -local COMMA_SEPARATOR = "," - -local fs = require("@lune/fs") -local process = require("@lune/process") - -local path = process.args[1] or ".lune/data/test.csv" - -assert(path ~= nil and #path > 0, "No input file path was given") -assert(not fs.isDir(path), "Input file path was a dir, not a file") -assert(fs.isFile(path), "Input file path does not exist") - --- Read all the lines of the wanted file, and then split --- out the raw lines containing comma-separated values - -local csvTable = {} -for index, rawLine in string.split(fs.readFile(path), LINE_SEPARATOR) do - if #rawLine > 0 then - csvTable[index] = string.split(rawLine, COMMA_SEPARATOR) - end -end - --- Gather the maximum widths of strings --- for alignment & spacing in advance - -local maxWidths = {} -for _, row in csvTable do - for index, value in row do - maxWidths[index] = math.max(maxWidths[index] or 0, #value) - end -end - -local totalWidth = 0 -local totalColumns = 0 -for _, width in maxWidths do - totalWidth += width - totalColumns += 1 -end - --- We have everything we need, print it out with --- the help of some unicode box drawing characters - -local thiccLine = string.rep("━", totalWidth + totalColumns * 3 - 1) - -print(string.format("┏%s┓", thiccLine)) - -for rowIndex, row in csvTable do - local paddedValues = {} - for valueIndex, value in row do - local spacing = string.rep(" ", maxWidths[valueIndex] - #value) - table.insert(paddedValues, value .. spacing) - end - print(string.format("┃ %s ┃", table.concat(paddedValues, " ┃ "))) - -- The first line is the header, we should - -- print out an extra separator below it - if rowIndex == 1 then - print(string.format("┣%s┫", thiccLine)) - end -end -print(string.format("┗%s┛", thiccLine)) diff --git a/.lune/data/test.csv b/.lune/data/test.csv deleted file mode 100644 index 4580894..0000000 --- a/.lune/data/test.csv +++ /dev/null @@ -1,4 +0,0 @@ -Header1,Header2,Header3 -Hello,World,! -1,2,3 -Foo,Bar,Baz diff --git a/.lune/hello_lune.luau b/.lune/hello_lune.luau deleted file mode 100644 index 4c9afec..0000000 --- a/.lune/hello_lune.luau +++ /dev/null @@ -1,231 +0,0 @@ -local fs = require("@lune/fs") -local net = require("@lune/net") -local process = require("@lune/process") -local stdio = require("@lune/stdio") -local task = require("@lune/task") - ---[[ - EXAMPLE #1 - - Using arguments given to the program -]] - -if #process.args > 0 then - print("Got arguments:") - print(process.args) - if #process.args > 3 then - error("Too many arguments!") - end -else - print("Got no arguments ☹️") -end - ---[[ - EXAMPLE #2 - - Using the stdio library to prompt for terminal input -]] - -local text = stdio.prompt("text", "Please write some text") - -print("You wrote '" .. text .. "'!") - -local confirmed = stdio.prompt("confirm", "Please confirm that you wrote some text") -if confirmed == false then - error("You didn't confirm!") -else - print("Confirmed!") -end - ---[[ - EXAMPLE #3 - - Get & set environment variables - - Checks if environment variables are empty or not, - prints out ❌ if empty and ✅ if they have a value -]] - -print("Reading current environment 🔎") - --- Environment variables can be read directly -assert(process.env.PATH ~= nil, "Missing PATH") -assert(process.env.PWD ~= nil, "Missing PWD") - --- And they can also be accessed using Luau's generalized iteration (but not pairs()) -for key, value in process.env do - local box = if value and value ~= "" then "✅" else "❌" - print(string.format("[%s] %s", box, key)) -end - ---[[ - EXAMPLE #4 - - Spawning concurrent tasks - - These tasks will run at the same time as other Lua code which lets you do primitive multitasking -]] - -task.spawn(function() - print("Spawned a task that will run instantly but not block") - task.wait(5) -end) - -print("Spawning a delayed task that will run in 5 seconds") -task.delay(5, function() - print("...") - task.wait(1) - print("Hello again!") - task.wait(1) - print("Goodbye again! 🌙") -end) - ---[[ - EXAMPLE #5 - - Read files in the current directory - - This prints out directory & file names with some fancy icons -]] - -print("Reading current dir 🗂️") -local entries = fs.readDir(".") - --- NOTE: We have to do this outside of the sort function --- to avoid yielding across the metamethod boundary, all --- of the filesystem APIs are asynchronous and yielding -local entryIsDir = {} -for _, entry in entries do - entryIsDir[entry] = fs.isDir(entry) -end - --- Sort prioritizing directories first, then alphabetically -table.sort(entries, function(entry0, entry1) - if entryIsDir[entry0] ~= entryIsDir[entry1] then - return entryIsDir[entry0] - end - return entry0 < entry1 -end) - --- Make sure we got some known files that should always exist -assert(table.find(entries, "Cargo.toml") ~= nil, "Missing Cargo.toml") -assert(table.find(entries, "Cargo.lock") ~= nil, "Missing Cargo.lock") - --- Print the pretty stuff -for _, entry in entries do - if fs.isDir(entry) then - print("📁 " .. entry) - else - print("📄 " .. entry) - end -end - ---[[ - EXAMPLE #6 - - Call out to another program / executable - - You can also get creative and combine this with example #6 to spawn several programs at the same time! -]] - -print("Sending 4 pings to google 🌏") -local result = process.spawn("ping", { - "google.com", - "-c 4", -}) - ---[[ - EXAMPLE #7 - - Using the result of a spawned process, exiting the process - - This looks scary with lots of weird symbols, but, it's just some Lua-style pattern matching - to parse the lines of "min/avg/max/stddev = W/X/Y/Z ms" that the ping program outputs to us -]] - -if result.ok then - assert(#result.stdout > 0, "Result output was empty") - local min, avg, max, stddev = string.match( - result.stdout, - "min/avg/max/stddev = ([%d%.]+)/([%d%.]+)/([%d%.]+)/([%d%.]+) ms" - ) - print(string.format("Minimum ping time: %.3fms", assert(tonumber(min)))) - print(string.format("Maximum ping time: %.3fms", assert(tonumber(max)))) - print(string.format("Average ping time: %.3fms", assert(tonumber(avg)))) - print(string.format("Standard deviation: %.3fms", assert(tonumber(stddev)))) -else - print("Failed to send ping to google!") - print(result.stderr) - process.exit(result.code) -end - ---[[ - EXAMPLE #8 - - Using the built-in networking library, encoding & decoding json -]] - -print("Sending PATCH request to web API 📤") -local apiResult = net.request({ - url = "https://jsonplaceholder.typicode.com/posts/1", - method = "PATCH", - headers = { - ["Content-Type"] = "application/json", - }, - body = net.jsonEncode({ - title = "foo", - body = "bar", - }), -}) - -if not apiResult.ok then - print("Failed to send network request!") - print(string.format("%d (%s)", apiResult.statusCode, apiResult.statusMessage)) - print(apiResult.body) - process.exit(1) -end - -type ApiResponse = { - id: number, - title: string, - body: string, - userId: number, -} - -local apiResponse: ApiResponse = net.jsonDecode(apiResult.body) -assert(apiResponse.title == "foo", "Invalid json response") -assert(apiResponse.body == "bar", "Invalid json response") -print("Got valid JSON response with changes applied") - ---[[ - EXAMPLE #9 - - Using the stdio library to print pretty -]] - -print("Printing with pretty colors and auto-formatting 🎨") - -print(stdio.color("blue") .. string.rep("—", 22) .. stdio.color("reset")) - -print("API response:", apiResponse) -warn({ - Oh = { - No = { - TooMuch = { - Nesting = { - "Will not print", - }, - }, - }, - }, -}) - -print(stdio.color("blue") .. string.rep("—", 22) .. stdio.color("reset")) - ---[[ - EXAMPLE #10 - - Saying goodbye 😔 -]] - -print("Goodbye, lune! 🌙") diff --git a/.lune/http_server.luau b/.lune/http_server.luau deleted file mode 100644 index 0d0b2d3..0000000 --- a/.lune/http_server.luau +++ /dev/null @@ -1,53 +0,0 @@ ---> A basic http server that echoes the given request ---> body at /ping and otherwise responds 404 "Not Found" - -local net = require("@lune/net") -local process = require("@lune/process") -local task = require("@lune/task") - -local PORT = if process.env.PORT ~= nil and #process.env.PORT > 0 - then assert(tonumber(process.env.PORT), "Failed to parse port from env") - else 8080 - --- Create our responder functions - -local function pong(request: net.ServeRequest): string - return `Pong!\n{request.path}\n{request.body}` -end - -local function teapot(_request: net.ServeRequest): net.ServeResponse - return { - status = 418, - body = "🫖", - } -end - -local function notFound(_request: net.ServeRequest): net.ServeResponse - return { - status = 404, - body = "Not Found", - } -end - --- Run the server on port 8080 - -local handle = net.serve(PORT, function(request) - if string.sub(request.path, 1, 5) == "/ping" then - return pong(request) - elseif string.sub(request.path, 1, 7) == "/teapot" then - return teapot(request) - else - return notFound(request) - end -end) - -print(`Listening on port {PORT} 🚀`) - --- Exit our example after a small delay, if you copy this --- example just remove this part to keep the server running - -task.delay(2, function() - print("Shutting down...") - task.wait(1) - handle.stop() -end) diff --git a/.lune/websocket_client.luau b/.lune/websocket_client.luau deleted file mode 100644 index 8b394a7..0000000 --- a/.lune/websocket_client.luau +++ /dev/null @@ -1,44 +0,0 @@ ---> A basic web socket client that communicates with an echo server - -local net = require("@lune/net") -local process = require("@lune/process") -local task = require("@lune/task") - -local PORT = if process.env.PORT ~= nil and #process.env.PORT > 0 - then assert(tonumber(process.env.PORT), "Failed to parse port from env") - else 8080 - -local URL = `ws://127.0.0.1:{PORT}` - --- Connect to our web socket server - -local socket = net.socket(URL) - -print("Connected to echo web socket server at '" .. URL .. "'") -print("Sending a message every second for 5 seconds...") - --- Force exit after 10 seconds in case the server is not responding well - -local forceExit = task.delay(10, function() - warn("Example did not complete in time, exiting...") - process.exit(1) -end) - --- Send one message per second and time it - -for _ = 1, 5 do - local start = os.clock() - socket.send(tostring(1)) - local response = socket.next() - local elapsed = os.clock() - start - print(`Got response '{response}' in {elapsed * 1_000} milliseconds`) - task.wait(1 - elapsed) -end - --- Everything went well, and we are done with the socket, so we can close it - -print("Closing web socket...") -socket.close() - -task.cancel(forceExit) -print("Done! 🌙") diff --git a/.lune/websocket_server.luau b/.lune/websocket_server.luau deleted file mode 100644 index 773d0be..0000000 --- a/.lune/websocket_server.luau +++ /dev/null @@ -1,37 +0,0 @@ ---> A basic web socket server that echoes given messages - -local net = require("@lune/net") -local process = require("@lune/process") -local task = require("@lune/task") - -local PORT = if process.env.PORT ~= nil and #process.env.PORT > 0 - then assert(tonumber(process.env.PORT), "Failed to parse port from env") - else 8080 - --- Run the server on port 8080, if we get a normal http request on --- the port this will respond with 426 Upgrade Required by default - -local handle = net.serve(PORT, { - handleWebSocket = function(socket) - print("Got new web socket connection!") - repeat - local message = socket.next() - if message ~= nil then - socket.send("Echo - " .. message) - end - until message == nil - print("Web socket disconnected.") - end, -}) - -print(`Listening on port {PORT} 🚀`) - --- Exit our example after a small delay, if you copy this --- example just remove this part to keep the server running - -task.delay(10, function() - print("Shutting down...") - task.wait(1) - handle.stop() - task.wait(1) -end) diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index e4ee693..0000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "recommendations": [ - "rust-lang.rust-analyzer", - "esbenp.prettier-vscode", - "JohnnyMorganz.stylua", - "DavidAnson.vscode-markdownlint" - ] -} diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index e19a802..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - // Luau - disable Roblox features, enable Lune typedefs & requires - "luau-lsp.sourcemap.enabled": false, - "luau-lsp.types.roblox": false, - "luau-lsp.require.mode": "relativeToFile", - "luau-lsp.require.directoryAliases": { - "@lune/": "~/.lune/.typedefs/0.7.4/" - }, - // Luau - ignore type defs file in docs dir and dev scripts we use - "luau-lsp.ignoreGlobs": [ - "docs/*.d.luau", - "packages/lib-roblox/scripts/*.luau", - "tests/roblox/rbx-test-files/**/*.lua", - "tests/roblox/rbx-test-files/**/*.luau" - ], - // Rust - "rust-analyzer.check.command": "clippy", - // Formatting - "editor.formatOnSave": true, - "stylua.searchParentDirectories": true, - "prettier.tabWidth": 2, - "[luau][lua]": { - "editor.defaultFormatter": "JohnnyMorganz.stylua" - }, - "[json][jsonc][markdown][yaml]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[rust]": { - "editor.defaultFormatter": "rust-lang.rust-analyzer" - } -} diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 51430e2..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,840 +0,0 @@ - - - -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## `0.7.5` - July 22nd, 2023 - -### Added - -- Lune now has a new documentation site!
- This addresses new APIs from version `0.7.0` not being available on the docs site, brings much improved searching functionality, and will help us keep documentation more up-to-date going forward with a more automated process. You can check out the new site at [lune-org.github.io](https://lune-org.github.io/docs). - -- Added `fs.copy` to recursively copy files and directories. - - Example usage: - - ```lua - local fs = require("@lune/fs") - - fs.writeDir("myCoolDir") - fs.writeFile("myCoolDir/myAwesomeFile.json", "{}") - - fs.copy("myCoolDir", "myCoolDir2") - - assert(fs.isDir("myCoolDir2")) - assert(fs.isFile("myCoolDir2/myAwesomeFile.json")) - assert(fs.readFile("myCoolDir2/myAwesomeFile.json") == "{}") - ``` - -- Added `fs.metadata` to get metadata about files and directories. - - Example usage: - - ```lua - local fs = require("@lune/fs") - - fs.writeFile("myAwesomeFile.json", "{}") - - local meta = fs.metadata("myAwesomeFile.json") - - print(meta.exists) --> true - print(meta.kind) --> "file" - print(meta.createdAt) --> 1689848548.0577152 (unix timestamp) - print(meta.permissions) --> { readOnly: false } - ``` - -- Added `roblox.getReflectionDatabase` to access the builtin database containing information about classes and enums. - - Example usage: - - ```lua - local roblox = require("@lune/roblox") - - local db = roblox.getReflectionDatabase() - - print("There are", #db:GetClassNames(), "classes in the reflection database") - - print("All base instance properties:") - - local class = db:GetClass("Instance") - for name, prop in class.Properties do - print(string.format( - "- %s with datatype %s and default value %s", - prop.Name, - prop.Datatype, - tostring(class.DefaultProperties[prop.Name]) - )) - end - ``` - -- Added support for running directories with an `init.luau` or `init.lua` file in them in the CLI. - -### Changed - -- Update to Luau version `0.583` - -### Fixed - -- Fixed publishing of Lune to crates.io by migrating away from a monorepo. -- Fixed crashes when writing a very deeply nested `Instance` to a file. ([#62]) -- Fixed not being able to read & write to WebSocket objects at the same time. ([#68]) -- Fixed tab character at the start of a script causing it not to parse correctly. ([#72]) - -[#62]: https://github.com/filiptibell/lune/pull/62 -[#68]: https://github.com/filiptibell/lune/pull/66 -[#72]: https://github.com/filiptibell/lune/pull/72 - -## `0.7.4` - July 7th, 2023 - -### Added - -- Added support for `CFrame` and `Font` types in attributes when using the `roblox` builtin. - -### Fixed - -- Fixed `roblox.serializeModel` still keeping some unique ids. - -## `0.7.3` - July 5th, 2023 - -### Changed - -- When using `roblox.serializeModel`, Lune will no longer keep internal unique ids.
- This is consistent with what Roblox does and prevents Lune from always generating a new and unique file.
- This previously caused unnecessary diffs when using git or other kinds of source control. ([Relevant issue](https://github.com/filiptibell/lune/issues/61)) - -## `0.7.2` - June 28th, 2023 - -### Added - -- Added support for `init` files in directories, similar to Rojo, or `index.js` / `mod.rs` in JavaScript / Rust.
- This means that placing a file named `init.luau` or `init.lua` in a directory will now let you `require` that directory. - -### Changed - -- The `lune --setup` command is now much more user-friendly. -- Update to Luau version `0.581` - -## `0.7.1` - June 17th, 2023 - -### Added - -- Added support for TLS in websockets, enabling usage of `wss://`-prefixed URLs. ([#57]) - -### Fixed - -- Fixed `closeCode` erroring when being accessed on websockets. ([#57]) -- Fixed issues with `UniqueId` when using the `roblox` builtin by downgrading `rbx-dom`. - -[#57]: https://github.com/filiptibell/lune/pull/57 - -## `0.7.0` - June 12th, 2023 - -### Breaking Changes - -- Globals for the `fs`, `net`, `process`, `stdio`, and `task` builtins have been removed, and the `require("@lune/...")` syntax is now the only way to access builtin libraries. If you have previously been using a global such as `fs` directly, you will now need to put `local fs = require("@lune/fs")` at the top of the file instead. - -- Migrated several functions in the `roblox` builtin to new, more flexible APIs: - - - `readPlaceFile -> deserializePlace` - - `readModelFile -> deserializeModel` - - `writePlaceFile -> serializePlace` - - `writeModelFile -> serializeModel` - - These new APIs **_no longer use file paths_**, meaning to use them with files you must first read them using the `fs` builtin. - -- Removed `CollectionService` and its methods from the `roblox` builtin library - new instance methods have been added as replacements. -- Removed [`Instance:FindFirstDescendant`](https://create.roblox.com/docs/reference/engine/classes/Instance#FindFirstDescendant) which was a method that was never enabled in the official Roblox API and will soon be removed.
- Use the second argument of the already existing find methods instead to find descendants. -- Removed the global `printinfo` function - it was generally not used, and did not work as intended. Use the `stdio` builtin for formatting and logging instead. -- Removed support for Windows on ARM - it's more trouble than its worth right now, we may revisit it later. - -### Added - -- Added `serde.compress` and `serde.decompress` for compressing and decompressing strings using one of several compression formats: `brotli`, `gzip`, `lz4`, or `zlib`. - - Example usage: - - ```lua - local INPUT = string.rep("Input string to compress", 16) -- Repeated string 16 times for the purposes of this example - - local serde = require("@lune/serde") - - local compressed = serde.compress("gzip", INPUT) - local decompressed = serde.decompress("gzip", compressed) - - assert(decompressed == INPUT) - ``` - -- Added automatic decompression for compressed responses when using `net.request`. - This behavior can be disabled by passing `options = { decompress = false }` in request params. - -- Added support for finding scripts in the current home directory. - This means that if you have a script called `script-name.luau`, you can place it in the following location: - - - `C:\Users\YourName\.lune\script-name.luau` (Windows) - - `/Users/YourName/.lune/script-name.luau` (macOS) - - `/home/YourName/.lune/script-name.luau` (Linux) - - And then run it using `lune script-name` from any directory you are currently in. - -- Added several new instance methods in the `roblox` builtin library: - - [`Instance:AddTag`](https://create.roblox.com/docs/reference/engine/classes/Instance#AddTag) - - [`Instance:GetTags`](https://create.roblox.com/docs/reference/engine/classes/Instance#GetTags) - - [`Instance:HasTag`](https://create.roblox.com/docs/reference/engine/classes/Instance#HasTag) - - [`Instance:RemoveTag`](https://create.roblox.com/docs/reference/engine/classes/Instance#RemoveTag) -- Implemented the second argument of the `FindFirstChild` / `FindFirstChildOfClass` / `FindFirstChildWhichIsA` instance methods. - -### Changed - -- Update to Luau version `0.579` -- Both `stdio.write` and `stdio.ewrite` now support writing arbitrary bytes, instead of only valid UTF-8. - -### Fixed - -- Fixed `stdio.write` and `stdio.ewrite` not being flushed and causing output to be interleaved. ([#47]) -- Fixed `typeof` returning `userdata` for roblox types such as `Instance`, `Vector3`, ... - -[#47]: https://github.com/filiptibell/lune/pull/47 - -## `0.6.7` - May 14th, 2023 - -### Added - -- Replaced all of the separate typedef & documentation generation commands with a unified `lune --setup` command. - - This command will generate type definition files for all of the builtins and will work with the new `require("@lune/...")` syntax. Note that this also means that there is no longer any way to generate type definitions for globals - this is because they will be removed in the next major release in favor of the beforementioned syntax. - -- New releases now include prebuilt binaries for arm64 / aarch64!
- These new binaries will have names with the following format: - - `lune-windows-0.6.7-aarch64.exe` - - `lune-linux-0.6.7-aarch64` - - `lune-macos-0.6.7-aarch64` -- Added global types to documentation site - -## `0.6.6` - April 30th, 2023 - -### Added - -- Added tracing / logging for rare and hard to diagnose error cases, which can be configured using the env var `RUST_LOG`. - -### Changed - -- The `_VERSION` global now follows a consistent format `Lune x.y.z+luau` to allow libraries to check against it for version requirements. - - Examples: - - - `Lune 0.0.0+0` - - `Lune 1.0.0+500` - - `Lune 0.11.22+9999` - -- Updated to Luau version `0.573` -- Updated `rbx-dom` to support reading and writing `Font` datatypes - -### Fixed - -- Fixed `_G` not being a readable & writable table -- Fixed `_G` containing normal globals such as `print`, `math`, ... -- Fixed using instances as keys in tables - -## `0.6.5` - March 27th, 2023 - -### Changed - -- Functions such as `print`, `warn`, ... now respect `__tostring` metamethods. - -### Fixed - -- Fixed access of roblox instance properties such as `Workspace.Terrain`, `game.Workspace` that are actually links to child instances.
- These properties are always guaranteed to exist, and they are not always properly set, meaning they must be found through an internal lookup. -- Fixed issues with the `CFrame.lookAt` and `CFrame.new(Vector3, Vector3)` constructors. -- Fixed issues with CFrame math operations returning rotation angles in the wrong order. - -## `0.6.4` - March 26th, 2023 - -### Fixed - -- Fixed instances with attributes not saving if they contain integer attributes. -- Fixed attributes not being set properly if the instance has an empty attributes property. -- Fixed error messages for reading & writing roblox files not containing the full error message. -- Fixed crash when trying to access an instance reference property that points to a destroyed instance. -- Fixed crash when trying to save instances that contain unsupported attribute types. - -## `0.6.3` - March 26th, 2023 - -### Added - -- Added support for instance tags & `CollectionService` in the `roblox` built-in.
- Currently implemented methods are listed on the [docs site](https://lune-org.github.io/docs/roblox/4-api-status). - -### Fixed - -- Fixed accessing a destroyed instance printing an error message even if placed inside a pcall. -- Fixed cloned instances not having correct instance reference properties set (`ObjectValue.Value`, `Motor6D.Part0`, ...) -- Fixed `Instance::GetDescendants` returning the same thing as `Instance::GetChildren`. - -## `0.6.2` - March 25th, 2023 - -This release adds some new features and fixes for the `roblox` built-in. - -### Added - -- Added `GetAttribute`, `GetAttributes` and `SetAttribute` methods for instances. -- Added support for getting & setting properties that are instance references. - -### Changed - -- Improved handling of optional property types such as optional cframes & default physical properties. - -### Fixed - -- Fixed handling of instance properties that are serialized as binary strings. - -## `0.6.1` - March 22nd, 2023 - -### Fixed - -- Fixed `writePlaceFile` and `writeModelFile` in the new `roblox` built-in making mysterious "ROOT" instances. - -## `0.6.0` - March 22nd, 2023 - -### Added - -- Added a `roblox` built-in - - If you're familiar with [Remodel](https://github.com/rojo-rbx/remodel), this new built-in contains more or less the same APIs, integrated into Lune.
- There are just too many new APIs to list in this changelog, so head over to the [docs sit](https://lune-org.github.io/docs/roblox/1-introduction) to learn more! - -- Added a `serde` built-in - - This built-in contains previously available functions `encode` and `decode` from the `net` global.
- The plan is for this built-in to contain more serialization and encoding functionality in the future. - -- `require` has been reimplemented and overhauled in several ways: - - - New built-ins such as `roblox` and `serde` can **_only_** be imported using `require("@lune/roblox")`, `require("@lune/serde")`, ... - - Previous globals such as `fs`, `net` and others can now _also_ be imported using `require("@lune/fs")`, `require("@lune/net")`, ... - - Requiring a script is now completely asynchronous and will not block lua threads other than the caller. - - Requiring a script will no longer error when using async APIs in the main body of the required script. - - All new built-ins will be added using this syntax and new built-ins will no longer be available in the global scope, and current globals will stay available as globals until proper editor and LSP support is available to ensure Lune users have a good development experience. This is the first step towards moving away from adding each library as a global, and allowing Lune to have more built-in libraries in general. - - Behavior otherwise stays the same, and requires are still relative to file unless the special `@` prefix is used. - -- Added `net.urlEncode` and `net.urlDecode` for URL-encoding and decoding strings - -### Changed - -- Renamed the global `info` function to `printinfo` to make it less ambiguous - -### Removed - -- Removed experimental `net.encode` and `net.decode` functions, since they are now available using `require("@lune/serde")` -- Removed option to preserve default Luau require behavior - -## `0.5.6` - March 11th, 2023 - -### Added - -- Added support for shebangs at the top of a script, meaning scripts such as this one will now run without throwing a syntax error: - - ```lua - #!/usr/bin/env lune - - print("Hello, world!") - ``` - -### Fixed - -- Fixed `fs.writeFile` and `fs.readFile` not working with strings / files that are invalid utf-8 - -## `0.5.5` - March 8th, 2023 - -### Added - -- Added support for running scripts by passing absolute file paths in the CLI - - This does not have the restriction of scripts having to use the `.luau` or `.lua` extension, since it is presumed that if you pass an absolute path you know exactly what you are doing - -### Changed - -- Improved error messages for passing invalid file names / file paths substantially - they now include helpful formatting to make file names distinct from file extensions, and give suggestions on how to solve the problem -- Improved general formatting of error messages, both in the CLI and for Luau scripts being run - -### Fixed - -- Fixed the CLI being a bit too picky about file names when trying to run files in `lune` or `.lune` directories -- Fixed documentation misses from large changes made in version `0.5.0` - -## `0.5.4` - March 7th, 2023 - -### Added - -- Added support for reading scripts from stdin by passing `"-"` as the script name -- Added support for close codes in the `net` WebSocket APIs: - - A close code can be sent by passing it to `socket.close` - - A received close code can be checked with the `socket.closeCode` value, which is populated after a socket has been closed - note that using `socket.close` will not set the close code value, it is only set when received and is guaranteed to exist after closure - -### Changed - -- Update to Luau version 0.566 - -### Fixed - -- Fixed scripts having to be valid utf8, they may now use any kind of encoding that base Luau supports -- The `net` WebSocket APIs will no longer return `nil` for partial messages being received in `socket.next`, and will instead wait for the full message to arrive - -## `0.5.3` - February 26th, 2023 - -### Fixed - -- Fixed `lune --generate-selene-types` generating an invalid Selene definitions file -- Fixed type definition parsing issues on Windows - -## `0.5.2` - February 26th, 2023 - -### Fixed - -- Fixed crash when using `stdio.color()` or `stdio.style()` in a CI environment or non-interactive terminal - -## `0.5.1` - February 25th, 2023 - -### Added - -- Added `net.encode` and `net.decode` which are equivalent to `net.jsonEncode` and `net.jsonDecode`, but with support for more formats. - - **_WARNING: Unstable API_** - - _This API is unstable and may change or be removed in the next major version of Lune. The purpose of making a new release with these functions is to gather feedback from the community, and potentially replace the JSON-specific encoding and decoding utilities._ - - Example usage: - - ```lua - local toml = net.decode("toml", [[ - [package] - name = "my-cool-toml-package" - version = "0.1.0" - - [values] - epic = true - ]]) - - assert(toml.package.name == "my-cool-toml-package") - assert(toml.package.version == "0.1.0") - assert(toml.values.epic == true) - ``` - -### Fixed - -- Fixed indentation of closing curly bracket when printing tables - -## `0.5.0` - February 23rd, 2023 - -### Added - -- Added auto-generated API reference pages and documentation using GitHub wiki pages -- Added support for `query` in `net.request` parameters, which enables usage of query parameters in URLs without having to manually URL encode values. -- Added a new function `fs.move` to move / rename a file or directory from one path to another. -- Implemented a new task scheduler which resolves several long-standing issues: - - - Issues with yielding across the C-call/metamethod boundary no longer occur when calling certain async APIs that Lune provides. - - Ordering of interleaved calls to `task.spawn/task.defer` is now completely deterministic, deferring is now guaranteed to run last even in these cases. - - The minimum wait time possible when using `task.wait` and minimum delay time using `task.delay` are now much smaller, and only limited by the underlying OS implementation. For most systems this means `task.wait` and `task.delay` are now accurate down to about 5 milliseconds or less. - -### Changed - -- Type definitions are now bundled as part of the Lune executable, meaning they no longer need to be downloaded. - - `lune --generate-selene-types` will generate the Selene type definitions file, replacing `lune --download-selene-types` - - `lune --generate-luau-types` will generate the Luau type definitions file, replacing `lune --download-luau-types` -- Improved accuracy of Selene type definitions, strongly typed arrays are now used where possible -- Improved error handling and messages for `net.serve` -- Improved error handling and messages for `stdio.prompt` -- File path representations on Windows now use legacy paths instead of UNC paths wherever possible, preventing some confusing cases where file paths don't work as expected - -### Fixed - -- Fixed `process.cwd` not having the correct ending path separator on Windows -- Fixed remaining edge cases where the `task` and `coroutine` libraries weren't interoperable -- Fixed `task.delay` keeping the script running even if it was cancelled using `task.cancel` -- Fixed `stdio.prompt` blocking all other lua threads while prompting for input - -## `0.4.0` - February 11th, 2023 - -### Added - -- ### Web Sockets - - `net` now supports web sockets for both clients and servers!
- Note that the web socket object is identical on both client and - server, but how you retrieve a web socket object is different. - - #### Server API - - The server web socket API is an extension of the existing `net.serve` function.
- This allows for serving both normal HTTP requests and web socket requests on the same port. - - Example usage: - - ```lua - net.serve(8080, { - handleRequest = function(request) - return "Hello, world!" - end, - handleWebSocket = function(socket) - task.delay(10, function() - socket.send("Timed out!") - socket.close() - end) - -- The message will be nil when the socket has closed - repeat - local messageFromClient = socket.next() - if messageFromClient == "Ping" then - socket.send("Pong") - end - until messageFromClient == nil - end, - }) - ``` - - #### Client API - - Example usage: - - ```lua - local socket = net.socket("ws://localhost:8080") - - socket.send("Ping") - - task.delay(5, function() - socket.close() - end) - - -- The message will be nil when the socket has closed - repeat - local messageFromServer = socket.next() - if messageFromServer == "Ping" then - socket.send("Pong") - end - until messageFromServer == nil - ``` - -### Changed - -- `net.serve` now returns a `NetServeHandle` which can be used to stop serving requests safely. - - Example usage: - - ```lua - local handle = net.serve(8080, function() - return "Hello, world!" - end) - - print("Shutting down after 1 second...") - task.wait(1) - handle.stop() - print("Shut down succesfully") - ``` - -- The third and optional argument of `process.spawn` is now a global type `ProcessSpawnOptions`. -- Setting `cwd` in the options for `process.spawn` to a path starting with a tilde (`~`) will now use a path relative to the platform-specific home / user directory. -- `NetRequest` query parameters value has been changed to be a table of key-value pairs similar to `process.env`. - If any query parameter is specified more than once in the request url, the value chosen will be the last one that was specified. -- The internal http client for `net.request` now reuses headers and connections for more efficient requests. -- Refactored the Lune rust crate to be much more user-friendly and documented all of the public functions. - -### Fixed - -- Fixed `process.spawn` blocking all lua threads if the spawned child process yields. - -## `0.3.0` - February 6th, 2023 - -### Added - -- Added a new global `stdio` which replaces `console` -- Added `stdio.write` which writes a string directly to stdout, without any newlines -- Added `stdio.ewrite` which writes a string directly to stderr, without any newlines -- Added `stdio.prompt` which will prompt the user for different kinds of input - - Example usage: - - ```lua - local text = stdio.prompt() - - local text2 = stdio.prompt("text", "Please write some text") - - local didConfirm = stdio.prompt("confirm", "Please confirm this action") - - local optionIndex = stdio.prompt("select", "Please select an option", { "one", "two", "three" }) - - local optionIndices = stdio.prompt( - "multiselect", - "Please select one or more options", - { "one", "two", "three", "four", "five" } - ) - ``` - -### Changed - -- Migrated `console.setColor/resetColor` and `console.setStyle/resetStyle` to `stdio.color` and `stdio.style` to allow for more flexibility in custom printing using ANSI color codes. Check the documentation for new usage and behavior. -- Migrated the pretty-printing and formatting behavior of `console.log/info/warn/error` to the standard Luau printing functions. - -### Removed - -- Removed printing functions `console.log/info/warn/error` in favor of regular global functions for printing. - -### Fixed - -- Fixed scripts hanging indefinitely on error - -## `0.2.2` - February 5th, 2023 - -### Added - -- Added global types for networking & child process APIs - - `net.request` gets `NetFetchParams` and `NetFetchResponse` for its argument and return value - - `net.serve` gets `NetRequest` and `NetResponse` for the handler function argument and return value - - `process.spawn` gets `ProcessSpawnOptions` for its third and optional parameter - -### Changed - -- Reorganize repository structure to take advantage of cargo workspaces, improves compile times - -## `0.2.1` - February 3rd, 2023 - -### Added - -- Added support for string interpolation syntax (update to Luau 0.561) -- Added network server functionality using `net.serve` - - Example usage: - - ```lua - net.serve(8080, function(request) - print(`Got a {request.method} request at {request.path}!`) - - local data = net.jsonDecode(request.body) - - -- For simple text responses with a 200 status - return "OK" - - -- For anything else - return { - status = 203, - headers = { ["Content-Type"] = "application/json" }, - body = net.jsonEncode({ - message = "echo", - data = data, - }) - } - end) - ``` - -### Changed - -- Improved type definitions file for Selene, now including constants like `process.env` + tags such as `readonly` and `mustuse` wherever applicable - -### Fixed - -- Fixed type definitions file for Selene not including all API members and parameters -- Fixed `process.exit` exiting at the first yield instead of exiting instantly as it should - -## `0.2.0` - January 28th, 2023 - -### Added - -- Added full documentation for all global APIs provided by Lune! This includes over 200 lines of pure documentation about behavior & error cases for all of the current 35 constants & functions. Check the [README](/README.md) to find out how to enable documentation in your editor. - -- Added a third argument `options` for `process.spawn`: - - - `cwd` - The current working directory for the process - - `env` - Extra environment variables to give to the process - - `shell` - Whether to run in a shell or not - set to `true` to run using the default shell, or a string to run using a specific shell - - `stdio` - How to treat output and error streams from the child process - set to `"inherit"` to pass output and error streams to the current process - -- Added `process.cwd`, the path to the current working directory in which the Lune script is running - -## `0.1.3` - January 25th, 2023 - -### Added - -- Added a `--list` subcommand to list scripts found in the `lune` or `.lune` directory. - -## `0.1.2` - January 24th, 2023 - -### Added - -- Added automatic publishing of the Lune library to [crates.io](https://crates.io/crates/lune) - -### Fixed - -- Fixed scripts that terminate instantly sometimes hanging - -## `0.1.1` - January 24th, 2023 - -### Fixed - -- Fixed errors containing `./` and / or `../` in the middle of file paths -- Potential fix for spawned processes that yield erroring with "attempt to yield across metamethod/c-call boundary" - -## `0.1.0` - January 24th, 2023 - -### Added - -- `task` now supports passing arguments in `task.spawn` / `task.delay` / `task.defer` -- `require` now uses paths relative to the file instead of being relative to the current directory, which is consistent with almost all other languages but not original Lua / Luau - this is a breaking change but will allow for proper packaging of third-party modules and more in the future. - - **_NOTE:_** _If you still want to use the default Lua behavior instead of relative paths, set the environment variable `LUAU_PWD_REQUIRE` to `true`_ - -### Changed - -- Improved error message when an invalid file path is passed to `require` -- Much improved error formatting and stack traces - -### Fixed - -- Fixed downloading of type definitions making json files instead of the proper format -- Process termination will now always make sure all lua state is cleaned up before exiting, in all cases - -## `0.0.6` - January 23rd, 2023 - -### Added - -- Initial implementation of [Roblox's task library](https://create.roblox.com/docs/reference/engine/libraries/task), with some caveats: - - - Minimum wait / delay time is currently set to 10ms, subject to change - - It is not yet possible to pass arguments to tasks created using `task.spawn` / `task.delay` / `task.defer` - - Timings for `task.defer` are flaky and deferred tasks are not (yet) guaranteed to run after spawned tasks - - With all that said, everything else should be stable! - - - Mixing and matching the `coroutine` library with `task` works in all cases - - `process.exit()` will stop all spawned / delayed / deferred threads and exit the process - - Lune is guaranteed to keep running until there are no longer any waiting threads - - If any of the abovementioned things do not work as expected, it is a bug, please file an issue! - -### Fixed - -- Potential fix for spawned processes that yield erroring with "attempt to yield across metamethod/c-call boundary" - -## `0.0.5` - January 22nd, 2023 - -### Added - -- Added full test suites for all Lune globals to ensure correct behavior -- Added library version of Lune that can be used from other Rust projects - -### Changed - -- Large internal changes to allow for implementing the `task` library. -- Improved general formatting of errors to make them more readable & glanceable -- Improved output formatting of non-primitive types -- Improved output formatting of empty tables - -### Fixed - -- Fixed double stack trace for certain kinds of errors - -## `0.0.4` - January 21st, 2023 - -### Added - -- Added `process.args` for inspecting values given to Lune when running (read only) -- Added `process.env` which is a plain table where you can get & set environment variables - -### Changed - -- Improved error formatting & added proper file name to stack traces - -### Removed - -- Removed `...` for process arguments, use `process.args` instead -- Removed individual functions for getting & setting environment variables, use `process.env` instead - -## `0.0.3` - January 20th, 2023 - -### Added - -- Added networking functions under `net` - - Example usage: - - ```lua - local apiResult = net.request({ - url = "https://jsonplaceholder.typicode.com/posts/1", - method = "PATCH", - headers = { - ["Content-Type"] = "application/json", - }, - body = net.jsonEncode({ - title = "foo", - body = "bar", - }), - }) - - local apiResponse = net.jsonDecode(apiResult.body) - assert(apiResponse.title == "foo", "Invalid json response") - assert(apiResponse.body == "bar", "Invalid json response") - ``` - -- Added console logging & coloring functions under `console` - - This piece of code: - - ```lua - local tab = { Integer = 1234, Hello = { "World" } } - console.log(tab) - ``` - - Will print the following formatted text to the console, **_with syntax highlighting_**: - - ```lua - { - Integer = 1234, - Hello = { - "World", - } - } - ``` - - Additional utility functions exist with the same behavior but that also print out a colored - tag together with any data given to them: `console.info`, `console.warn`, `console.error` - - These print out prefix tags `[INFO]`, `[WARN]`, `[ERROR]` in blue, orange, and red, respectively. - -### Changed - -- The `json` api is now part of `net` - - `json.encode` becomes `net.jsonEncode` - - `json.decode` become `net.jsonDecode` - -### Fixed - -- Fixed JSON decode not working properly - -## `0.0.2` - January 19th, 2023 - -### Added - -- Added support for command-line parameters to scripts - - These can be accessed as a vararg in the root of a script: - - ```lua - local firstArg: string, secondArg: string = ... - print(firstArg, secondArg) - ``` - -- Added CLI parameters for downloading type definitions: - - - `lune --download-selene-types` to download Selene types to the current directory - - `lune --download-luau-types` to download Luau types to the current directory - - These files will be downloaded as `lune.yml` and `luneTypes.d.luau` - respectively and are also available in each release on GitHub. - -## `0.0.1` - January 18th, 2023 - -Initial Release diff --git a/Cargo.lock b/Cargo.lock deleted file mode 100644 index 2f707e2..0000000 --- a/Cargo.lock +++ /dev/null @@ -1,2717 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "addr2line" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "aho-corasick" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" -dependencies = [ - "memchr", -] - -[[package]] -name = "alloc-no-stdlib" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" - -[[package]] -name = "alloc-stdlib" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" -dependencies = [ - "alloc-no-stdlib", -] - -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] - -[[package]] -name = "anstream" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is-terminal", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" - -[[package]] -name = "anstyle-parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" -dependencies = [ - "windows-sys 0.48.0", -] - -[[package]] -name = "anstyle-wincon" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" -dependencies = [ - "anstyle", - "windows-sys 0.48.0", -] - -[[package]] -name = "anyhow" -version = "1.0.72" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" - -[[package]] -name = "arrayref" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" - -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - -[[package]] -name = "arrayvec" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" - -[[package]] -name = "async-compression" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b74f44609f0f91493e3082d3734d98497e094777144380ea4db9f9905dd5b6" -dependencies = [ - "brotli", - "flate2", - "futures-core", - "memchr", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "async-trait" -version = "0.1.72" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.27", -] - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "backtrace" -version = "0.3.68" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "base-x" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" - -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64" -version = "0.21.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" - -[[package]] -name = "blake2b_simd" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587" -dependencies = [ - "arrayref", - "arrayvec 0.5.2", - "constant_time_eq 0.1.5", -] - -[[package]] -name = "blake3" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "199c42ab6972d92c9f8995f086273d25c42fc0f7b2a1fcefba465c1352d25ba5" -dependencies = [ - "arrayref", - "arrayvec 0.7.4", - "cc", - "cfg-if", - "constant_time_eq 0.3.0", - "digest", -] - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "brotli" -version = "3.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", - "brotli-decompressor", -] - -[[package]] -name = "brotli-decompressor" -version = "2.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b6561fd3f895a11e8f72af2cb7d22e08366bebc2b6b57f7744c4bda27034744" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", -] - -[[package]] -name = "bstr" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" -dependencies = [ - "memchr", - "serde", -] - -[[package]] -name = "bumpalo" -version = "3.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" - -[[package]] -name = "byteorder" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855" - -[[package]] -name = "byteorder" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" - -[[package]] -name = "bytes" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" - -[[package]] -name = "cc" -version = "1.0.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "clap" -version = "2.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" -dependencies = [ - "ansi_term", - "atty", - "bitflags 1.3.2", - "strsim 0.8.0", - "textwrap", - "unicode-width", - "vec_map", -] - -[[package]] -name = "clap" -version = "4.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd304a20bff958a57f04c4e96a2e7594cc4490a0e809cbd48bb6437edaa452d" -dependencies = [ - "clap_builder", - "clap_derive", - "once_cell", -] - -[[package]] -name = "clap_builder" -version = "4.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01c6a3f08f1fe5662a35cfe393aec09c4df95f60ee93b7556505260f75eee9e1" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim 0.10.0", -] - -[[package]] -name = "clap_derive" -version = "4.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.27", -] - -[[package]] -name = "clap_lex" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" - -[[package]] -name = "colorchoice" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" - -[[package]] -name = "console" -version = "0.15.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" -dependencies = [ - "encode_unicode", - "lazy_static", - "libc", - "unicode-width", - "windows-sys 0.45.0", -] - -[[package]] -name = "const_fn" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbdcdcb6d86f71c5e97409ad45898af11cbc995b4ee8112d59095a28d376c935" - -[[package]] -name = "constant_time_eq" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" - -[[package]] -name = "constant_time_eq" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" - -[[package]] -name = "cookie" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc6e25dfc584d06a3dbf775d207ff00d7de98d824c952dd2233dfbb261889a42" -dependencies = [ - "time 0.2.27", - "version_check", -] - -[[package]] -name = "cpufeatures" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" -dependencies = [ - "libc", -] - -[[package]] -name = "crc32fast" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "data-encoding" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" - -[[package]] -name = "dialoguer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59c6f2989294b9a498d3ad5491a79c6deb604617378e1cdc4bfc1c1361fe2f87" -dependencies = [ - "console", - "shell-words", - "tempfile", - "zeroize", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", - "subtle", -] - -[[package]] -name = "directories" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a49173b84e034382284f27f1af4dcbbd231ffa358c0fe316541a7337f376a35" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fd78930633bd1c6e35c4b42b1df7b0cbc6bc191146e512bb3bedf243fcc3901" -dependencies = [ - "libc", - "redox_users 0.3.5", - "winapi", -] - -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users 0.4.3", - "windows-sys 0.48.0", -] - -[[package]] -name = "discard" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" - -[[package]] -name = "dunce" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" - -[[package]] -name = "either" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" - -[[package]] -name = "encode_unicode" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" - -[[package]] -name = "encoding_rs" -version = "0.8.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "env_logger" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", -] - -[[package]] -name = "env_logger" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" -dependencies = [ - "humantime", - "is-terminal", - "log", - "regex", - "termcolor", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "erased-serde" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da96524cc884f6558f1769b6c46686af2fe8e8b4cd253bd5a3cdba8181b8e070" -dependencies = [ - "serde", -] - -[[package]] -name = "errno" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" -dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys 0.48.0", -] - -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "fastrand" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" - -[[package]] -name = "flate2" -version = "1.0.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "form_urlencoded" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "futures-channel" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" -dependencies = [ - "futures-core", -] - -[[package]] -name = "futures-core" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" - -[[package]] -name = "futures-macro" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.27", -] - -[[package]] -name = "futures-sink" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" - -[[package]] -name = "futures-task" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" - -[[package]] -name = "futures-util" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" -dependencies = [ - "futures-core", - "futures-macro", - "futures-sink", - "futures-task", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - -[[package]] -name = "getrandom" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", -] - -[[package]] -name = "gimli" -version = "0.27.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" - -[[package]] -name = "glam" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42218cb640844e3872cc3c153dc975229e080a6c4733b34709ef445610550226" - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "h2" -version = "0.3.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap 1.9.3", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "hashbrown" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" - -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" - -[[package]] -name = "http" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" -dependencies = [ - "bytes", - "http", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" - -[[package]] -name = "httpdate" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" - -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - -[[package]] -name = "hyper" -version = "0.14.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" -dependencies = [ - "futures-util", - "http", - "hyper", - "rustls", - "tokio", - "tokio-rustls", -] - -[[package]] -name = "hyper-tungstenite" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "226df6fd0aece319a325419d770aa9d947defa60463f142cd82b329121f906a3" -dependencies = [ - "hyper", - "pin-project", - "tokio", - "tokio-tungstenite", - "tungstenite", -] - -[[package]] -name = "idna" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "include_dir" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e" -dependencies = [ - "glob", - "include_dir_macros", -] - -[[package]] -name = "include_dir_macros" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" -dependencies = [ - "proc-macro2", - "quote", -] - -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - -[[package]] -name = "indexmap" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" -dependencies = [ - "equivalent", - "hashbrown 0.14.0", -] - -[[package]] -name = "ipnet" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" - -[[package]] -name = "is-terminal" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" -dependencies = [ - "hermit-abi 0.3.2", - "rustix", - "windows-sys 0.48.0", -] - -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" - -[[package]] -name = "js-sys" -version = "0.3.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "libc" -version = "0.2.147" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" - -[[package]] -name = "line-wrap" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30344350a2a51da54c1d53be93fade8a237e545dbcc4bdbe635413f2117cab9" -dependencies = [ - "safemem", -] - -[[package]] -name = "linux-raw-sys" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" - -[[package]] -name = "lock_api" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" - -[[package]] -name = "luau0-src" -version = "0.5.11+luau583" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a7183d0a3eaa387403dd4ac7b449536af82c1545b7a48247af1652ca66926d5" -dependencies = [ - "cc", -] - -[[package]] -name = "lune" -version = "0.7.5" -dependencies = [ - "anyhow", - "async-compression", - "async-trait", - "clap 4.3.19", - "console", - "dialoguer", - "directories", - "dunce", - "env_logger 0.10.0", - "futures-util", - "glam", - "hyper", - "hyper-tungstenite", - "include_dir", - "itertools", - "lz4_flex", - "mlua", - "once_cell", - "os_str_bytes", - "pin-project", - "rand", - "rbx_binary", - "rbx_cookie", - "rbx_dom_weak", - "rbx_reflection", - "rbx_reflection_database", - "rbx_xml", - "regex", - "reqwest", - "serde", - "serde_json", - "serde_yaml", - "thiserror", - "tokio", - "tokio-tungstenite", - "toml", - "urlencoding", -] - -[[package]] -name = "lz4" -version = "1.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9e2dd86df36ce760a60f6ff6ad526f7ba1f14ba0356f8254fb6905e6494df1" -dependencies = [ - "libc", - "lz4-sys", -] - -[[package]] -name = "lz4-sys" -version = "1.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "lz4_flex" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b8c72594ac26bfd34f2d99dfced2edfaddfe8a476e3ff2ca0eb293d925c4f83" -dependencies = [ - "twox-hash", -] - -[[package]] -name = "memchr" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "miniz_oxide" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" -dependencies = [ - "adler", -] - -[[package]] -name = "mio" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" -dependencies = [ - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.48.0", -] - -[[package]] -name = "mlua" -version = "0.9.0-rc.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5369212118d0f115c9adbe7f7905e36fb3ef2994266039c51fc3e96374d705d" -dependencies = [ - "bstr", - "erased-serde", - "mlua-sys", - "num-traits", - "once_cell", - "rustc-hash", - "serde", - "serde-value", -] - -[[package]] -name = "mlua-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3daecc55a656cae8e54fc599701ab597b67cdde68f780cac8c1c49b9cfff2f5" -dependencies = [ - "cc", - "cfg-if", - "luau0-src", - "pkg-config", -] - -[[package]] -name = "num-traits" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi 0.3.2", - "libc", -] - -[[package]] -name = "object" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" - -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - -[[package]] -name = "ordered-float" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7940cf2ca942593318d07fcf2596cdca60a85c9e7fab408a5e21a4f9dcd40d87" -dependencies = [ - "num-traits", -] - -[[package]] -name = "os_str_bytes" -version = "6.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d5d9eb14b174ee9aa2ef96dc2b94637a2d4b6e7cb873c7e171f0c20c6cf3eac" -dependencies = [ - "memchr", -] - -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.3.5", - "smallvec", - "windows-targets 0.48.1", -] - -[[package]] -name = "paste" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" - -[[package]] -name = "percent-encoding" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" - -[[package]] -name = "pin-project" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "030ad2bc4db10a8944cb0d837f158bdfec4d4a4873ab701a95046770d11f8842" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.27", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" - -[[package]] -name = "plist" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdc0001cfea3db57a2e24bc0d818e9e20e554b5f97fabb9bc231dc240269ae06" -dependencies = [ - "base64 0.21.2", - "indexmap 1.9.3", - "line-wrap", - "quick-xml", - "serde", - "time 0.3.23", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "proc-macro-hack" -version = "0.5.20+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" - -[[package]] -name = "proc-macro2" -version = "1.0.66" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "profiling" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "332cd62e95873ea4f41f3dfd6bbbfc5b52aec892d7e8d534197c4720a0bbbab2" -dependencies = [ - "profiling-procmacros", -] - -[[package]] -name = "profiling-procmacros" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a10adb8d151bb1280afb8bed41ae5db26be1b056964947133c7525b0bf39c0b0" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "quick-xml" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81b9228215d82c7b61490fec1de287136b5de6f5700f6e58ea9ad61a7964ca51" -dependencies = [ - "memchr", -] - -[[package]] -name = "quote" -version = "1.0.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fe8a65d69dd0808184ebb5f836ab526bb259db23c657efa38711b1072ee47f0" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.10", -] - -[[package]] -name = "rbx_binary" -version = "0.7.0" -source = "git+https://github.com/rojo-rbx/rbx-dom?rev=e7a813d569c3f8a54be8a8873c33f8976c37b8b1#e7a813d569c3f8a54be8a8873c33f8976c37b8b1" -dependencies = [ - "log", - "lz4", - "profiling", - "rbx_dom_weak", - "rbx_reflection", - "rbx_reflection_database", - "thiserror", -] - -[[package]] -name = "rbx_cookie" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d909d60469944842c9d204fa44afc90d9cb1e1f3f30a29bd1def490edd525a96" -dependencies = [ - "byteorder 0.5.3", - "clap 2.34.0", - "cookie", - "dirs", - "env_logger 0.9.3", - "log", - "plist", - "winapi", - "winreg", -] - -[[package]] -name = "rbx_dom_weak" -version = "2.4.0" -source = "git+https://github.com/rojo-rbx/rbx-dom?rev=e7a813d569c3f8a54be8a8873c33f8976c37b8b1#e7a813d569c3f8a54be8a8873c33f8976c37b8b1" -dependencies = [ - "rbx_types", - "serde", -] - -[[package]] -name = "rbx_reflection" -version = "4.2.0" -source = "git+https://github.com/rojo-rbx/rbx-dom?rev=e7a813d569c3f8a54be8a8873c33f8976c37b8b1#e7a813d569c3f8a54be8a8873c33f8976c37b8b1" -dependencies = [ - "rbx_types", - "serde", - "thiserror", -] - -[[package]] -name = "rbx_reflection_database" -version = "0.2.6+roblox-572" -source = "git+https://github.com/rojo-rbx/rbx-dom?rev=e7a813d569c3f8a54be8a8873c33f8976c37b8b1#e7a813d569c3f8a54be8a8873c33f8976c37b8b1" -dependencies = [ - "lazy_static", - "rbx_reflection", - "rmp-serde", - "serde", -] - -[[package]] -name = "rbx_types" -version = "1.5.0" -source = "git+https://github.com/rojo-rbx/rbx-dom?rev=e7a813d569c3f8a54be8a8873c33f8976c37b8b1#e7a813d569c3f8a54be8a8873c33f8976c37b8b1" -dependencies = [ - "base64 0.13.1", - "bitflags 1.3.2", - "blake3", - "lazy_static", - "rand", - "serde", - "thiserror", -] - -[[package]] -name = "rbx_xml" -version = "0.13.0" -source = "git+https://github.com/rojo-rbx/rbx-dom?rev=e7a813d569c3f8a54be8a8873c33f8976c37b8b1#e7a813d569c3f8a54be8a8873c33f8976c37b8b1" -dependencies = [ - "base64 0.13.1", - "log", - "rbx_dom_weak", - "rbx_reflection", - "rbx_reflection_database", - "xml-rs", -] - -[[package]] -name = "redox_syscall" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" - -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_users" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d" -dependencies = [ - "getrandom 0.1.16", - "redox_syscall 0.1.57", - "rust-argon2", -] - -[[package]] -name = "redox_users" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" -dependencies = [ - "getrandom 0.2.10", - "redox_syscall 0.2.16", - "thiserror", -] - -[[package]] -name = "regex" -version = "1.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39354c10dd07468c2e73926b23bb9c2caca74c5501e38a35da70406f1d923310" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" - -[[package]] -name = "reqwest" -version = "0.11.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" -dependencies = [ - "base64 0.21.2", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "hyper", - "hyper-rustls", - "ipnet", - "js-sys", - "log", - "mime", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls", - "rustls-pemfile", - "serde", - "serde_json", - "serde_urlencoded", - "tokio", - "tokio-rustls", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "webpki-roots 0.22.6", - "winreg", -] - -[[package]] -name = "ring" -version = "0.16.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin", - "untrusted", - "web-sys", - "winapi", -] - -[[package]] -name = "rmp" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9860a6cc38ed1da53456442089b4dfa35e7cedaa326df63017af88385e6b20" -dependencies = [ - "byteorder 1.4.3", - "num-traits", - "paste", -] - -[[package]] -name = "rmp-serde" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bffea85eea980d8a74453e5d02a8d93028f3c34725de143085a844ebe953258a" -dependencies = [ - "byteorder 1.4.3", - "rmp", - "serde", -] - -[[package]] -name = "rust-argon2" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b18820d944b33caa75a71378964ac46f58517c92b6ae5f762636247c09e78fb" -dependencies = [ - "base64 0.13.1", - "blake2b_simd", - "constant_time_eq 0.1.5", - "crossbeam-utils", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver", -] - -[[package]] -name = "rustix" -version = "0.38.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5" -dependencies = [ - "bitflags 2.3.3", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.48.0", -] - -[[package]] -name = "rustls" -version = "0.21.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79ea77c539259495ce8ca47f53e66ae0330a8819f67e23ac96ca02f50e7b7d36" -dependencies = [ - "log", - "ring", - "rustls-webpki 0.101.1", - "sct", -] - -[[package]] -name = "rustls-pemfile" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" -dependencies = [ - "base64 0.21.2", -] - -[[package]] -name = "rustls-webpki" -version = "0.100.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6207cd5ed3d8dca7816f8f3725513a34609c0c765bf652b8c3cb4cfd87db46b" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "rustls-webpki" -version = "0.101.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15f36a6828982f422756984e47912a7a51dcbc2a197aa791158f8ca61cd8204e" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "ryu" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" - -[[package]] -name = "safemem" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "sct" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - -[[package]] -name = "serde" -version = "1.0.174" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b88756493a5bd5e5395d53baa70b194b05764ab85b59e43e4b8f4e1192fa9b1" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde-value" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" -dependencies = [ - "ordered-float", - "serde", -] - -[[package]] -name = "serde_derive" -version = "1.0.174" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e5c3a298c7f978e53536f95a63bdc4c4a64550582f31a0359a9afda6aede62e" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.27", -] - -[[package]] -name = "serde_json" -version = "1.0.103" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d03b412469450d4404fe8499a268edd7f8b79fecb074b0d812ad64ca21f4031b" -dependencies = [ - "indexmap 2.0.0", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_spanned" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_yaml" -version = "0.9.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a49e178e4452f45cb61d0cd8cebc1b0fafd3e41929e996cef79aa3aca91f574" -dependencies = [ - "indexmap 2.0.0", - "itoa", - "ryu", - "serde", - "unsafe-libyaml", -] - -[[package]] -name = "sha1" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" -dependencies = [ - "sha1_smol", -] - -[[package]] -name = "sha1" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "sha1_smol" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" - -[[package]] -name = "shell-words" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" - -[[package]] -name = "signal-hook-registry" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" -dependencies = [ - "libc", -] - -[[package]] -name = "slab" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" -dependencies = [ - "autocfg", -] - -[[package]] -name = "smallvec" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" - -[[package]] -name = "socket2" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "standback" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" -dependencies = [ - "version_check", -] - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "stdweb" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" -dependencies = [ - "discard", - "rustc_version", - "stdweb-derive", - "stdweb-internal-macros", - "stdweb-internal-runtime", - "wasm-bindgen", -] - -[[package]] -name = "stdweb-derive" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" -dependencies = [ - "proc-macro2", - "quote", - "serde", - "serde_derive", - "syn 1.0.109", -] - -[[package]] -name = "stdweb-internal-macros" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" -dependencies = [ - "base-x", - "proc-macro2", - "quote", - "serde", - "serde_derive", - "serde_json", - "sha1 0.6.1", - "syn 1.0.109", -] - -[[package]] -name = "stdweb-internal-runtime" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" - -[[package]] -name = "strsim" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "subtle" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b60f673f44a8255b9c8c657daf66a596d435f2da81a555b06dc644d080ba45e0" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "tempfile" -version = "3.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5486094ee78b2e5038a6382ed7645bc084dc2ec433426ca4c3cb61e2007b8998" -dependencies = [ - "cfg-if", - "fastrand", - "redox_syscall 0.3.5", - "rustix", - "windows-sys 0.48.0", -] - -[[package]] -name = "termcolor" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", -] - -[[package]] -name = "thiserror" -version = "1.0.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.27", -] - -[[package]] -name = "time" -version = "0.2.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242" -dependencies = [ - "const_fn", - "libc", - "standback", - "stdweb", - "time-macros 0.1.1", - "version_check", - "winapi", -] - -[[package]] -name = "time" -version = "0.3.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59e399c068f43a5d116fedaf73b203fa4f9c519f17e2b34f63221d3792f81446" -dependencies = [ - "itoa", - "serde", - "time-core", - "time-macros 0.2.10", -] - -[[package]] -name = "time-core" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" - -[[package]] -name = "time-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1" -dependencies = [ - "proc-macro-hack", - "time-macros-impl", -] - -[[package]] -name = "time-macros" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ba15a897f3c86766b757e5ac7221554c6750054d74d5b28844fce5fb36a6c4" -dependencies = [ - "time-core", -] - -[[package]] -name = "time-macros-impl" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" -dependencies = [ - "proc-macro-hack", - "proc-macro2", - "quote", - "standback", - "syn 1.0.109", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "tokio" -version = "1.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" -dependencies = [ - "autocfg", - "backtrace", - "bytes", - "libc", - "mio", - "num_cpus", - "parking_lot", - "pin-project-lite", - "signal-hook-registry", - "socket2", - "tokio-macros", - "windows-sys 0.48.0", -] - -[[package]] -name = "tokio-macros" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.27", -] - -[[package]] -name = "tokio-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" -dependencies = [ - "rustls", - "tokio", -] - -[[package]] -name = "tokio-tungstenite" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec509ac96e9a0c43427c74f003127d953a265737636129424288d27cb5c4b12c" -dependencies = [ - "futures-util", - "log", - "rustls", - "tokio", - "tokio-rustls", - "tungstenite", - "webpki-roots 0.23.1", -] - -[[package]] -name = "tokio-util" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", - "tracing", -] - -[[package]] -name = "toml" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" -dependencies = [ - "indexmap 2.0.0", - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit", -] - -[[package]] -name = "toml_datetime" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.19.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" -dependencies = [ - "indexmap 2.0.0", - "serde", - "serde_spanned", - "toml_datetime", - "winnow", -] - -[[package]] -name = "tower-service" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" - -[[package]] -name = "tracing" -version = "0.1.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" -dependencies = [ - "cfg-if", - "pin-project-lite", - "tracing-core", -] - -[[package]] -name = "tracing-core" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" -dependencies = [ - "once_cell", -] - -[[package]] -name = "try-lock" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" - -[[package]] -name = "tungstenite" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15fba1a6d6bb030745759a9a2a588bfe8490fc8b4751a277db3a0be1c9ebbf67" -dependencies = [ - "byteorder 1.4.3", - "bytes", - "data-encoding", - "http", - "httparse", - "log", - "rand", - "rustls", - "sha1 0.10.5", - "thiserror", - "url", - "utf-8", - "webpki", -] - -[[package]] -name = "twox-hash" -version = "1.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" -dependencies = [ - "cfg-if", - "static_assertions", -] - -[[package]] -name = "typenum" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" - -[[package]] -name = "unicode-bidi" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" - -[[package]] -name = "unicode-ident" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" - -[[package]] -name = "unicode-normalization" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-width" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" - -[[package]] -name = "unsafe-libyaml" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28467d3e1d3c6586d8f25fa243f544f5800fec42d97032474e17222c2b75cfa" - -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - -[[package]] -name = "url" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "urlencoding" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" - -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - -[[package]] -name = "utf8parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" - -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.27", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.27", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" - -[[package]] -name = "web-sys" -version = "0.3.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webpki" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "webpki-roots" -version = "0.22.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" -dependencies = [ - "webpki", -] - -[[package]] -name = "webpki-roots" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" -dependencies = [ - "rustls-webpki 0.100.1", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.1", -] - -[[package]] -name = "windows-targets" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - -[[package]] -name = "windows-targets" -version = "0.48.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" -dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" - -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" - -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" - -[[package]] -name = "winnow" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fac9742fd1ad1bd9643b991319f72dd031016d44b77039a26977eb667141e7" -dependencies = [ - "memchr", -] - -[[package]] -name = "winreg" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" -dependencies = [ - "winapi", -] - -[[package]] -name = "xml-rs" -version = "0.8.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47430998a7b5d499ccee752b41567bc3afc57e1327dc855b1a2aa44ce29b5fa1" - -[[package]] -name = "zeroize" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" diff --git a/Cargo.toml b/Cargo.toml deleted file mode 100644 index 2bb9309..0000000 --- a/Cargo.toml +++ /dev/null @@ -1,130 +0,0 @@ -[package] -name = "lune" -version = "0.7.5" -edition = "2021" -license = "MPL-2.0" -repository = "https://github.com/filiptibell/lune" -description = "A Luau script runner" -readme = "README.md" -keywords = ["cli", "lua", "luau", "scripts"] -categories = ["command-line-interface"] - -[[bin]] -name = "lune" -path = "src/main.rs" - -[lib] -name = "lune" -path = "src/lib.rs" - -[features] -default = ["cli", "roblox"] -cli = [ - "dep:anyhow", - "dep:env_logger", - "dep:itertools", - "dep:clap", - "dep:include_dir", - "dep:regex", -] -roblox = [ - "dep:glam", - "dep:rand", - "dep:rbx_cookie", - "dep:rbx_binary", - "dep:rbx_dom_weak", - "dep:rbx_reflection", - "dep:rbx_reflection_database", - "dep:rbx_xml", -] - -# Profile for building the release binary, with the following options set: -# -# 1. Optimize for size -# 2. Automatically strip symbols from the binary -# 3. Enable link-time optimization -# -# Note that we could abort instead of panicking to cut down on size -# even more, but because we use the filesystem & some other APIs we -# need the panic unwinding to properly handle usage of said APIs -# -[profile.release] -opt-level = "z" -strip = true -lto = true - -# All of the dependencies for Lune. -# -# Dependencies are categorized as following: -# -# 1. General dependencies with no specific features set -# 2. Large / core dependencies that have many different crates and / or features set -# 3. Dependencies for specific features of Lune, eg. the CLI or massive Roblox builtin library -# -[dependencies] -console = "0.15" -directories = "5.0" -futures-util = "0.3" -once_cell = "1.17" -thiserror = "1.0" -async-trait = "0.1" -dialoguer = "0.10" -dunce = "1.0" -lz4_flex = "0.10" -pin-project = "1.0" -os_str_bytes = "6.4" -urlencoding = "2.1.2" - -### RUNTIME - -mlua = { version = "0.9.0-beta.3", features = ["luau", "serialize"] } -tokio = { version = "1.24", features = ["full"] } - -### SERDE - -async-compression = { version = "0.4", features = [ - "tokio", - "brotli", - "deflate", - "gzip", - "zlib", -] } -serde = { version = "1.0", features = ["derive"] } -serde_json = { version = "1.0", features = ["preserve_order"] } -serde_yaml = "0.9" -toml = { version = "0.7", features = ["preserve_order"] } - -### NET - -hyper = { version = "0.14", features = ["full"] } -hyper-tungstenite = { version = "0.10" } -reqwest = { version = "0.11", default-features = false, features = [ - "rustls-tls", -] } -tokio-tungstenite = { version = "0.19", features = ["rustls-tls-webpki-roots"] } - -### CLI - -anyhow = { optional = true, version = "1.0" } -env_logger = { optional = true, version = "0.10" } -itertools = { optional = true, version = "0.10" } - -clap = { optional = true, version = "4.1", features = ["derive"] } -include_dir = { optional = true, version = "0.7.3", features = ["glob"] } -regex = { optional = true, version = "1.7", default-features = false, features = [ - "std", - "unicode-perl", -] } - -### ROBLOX - -glam = { optional = true, version = "0.24" } -rand = { optional = true, version = "0.8" } - -rbx_cookie = { optional = true, version = "0.1.2" } - -rbx_binary = { optional = true, git = "https://github.com/rojo-rbx/rbx-dom", rev = "e7a813d569c3f8a54be8a8873c33f8976c37b8b1" } -rbx_dom_weak = { optional = true, git = "https://github.com/rojo-rbx/rbx-dom", rev = "e7a813d569c3f8a54be8a8873c33f8976c37b8b1" } -rbx_reflection = { optional = true, git = "https://github.com/rojo-rbx/rbx-dom", rev = "e7a813d569c3f8a54be8a8873c33f8976c37b8b1" } -rbx_reflection_database = { optional = true, git = "https://github.com/rojo-rbx/rbx-dom", rev = "e7a813d569c3f8a54be8a8873c33f8976c37b8b1" } -rbx_xml = { optional = true, git = "https://github.com/rojo-rbx/rbx-dom", rev = "e7a813d569c3f8a54be8a8873c33f8976c37b8b1" } diff --git a/LICENSE.txt b/LICENSE.txt deleted file mode 100644 index d0a1fa1..0000000 --- a/LICENSE.txt +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at https://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/README.md b/README.md deleted file mode 100644 index b419471..0000000 --- a/README.md +++ /dev/null @@ -1,45 +0,0 @@ - - - -
-

Lune 🌙

-
- - Current Lune library version - - - CI status - - - Release status - - - Lune license - -
-
- ---- - -A standalone [Luau](https://luau-lang.org) script runtime. - -Write and run scripts, similar to runtimes for other languages such as [Node](https://nodejs.org) / [Deno](https://deno.land), or [Luvit](https://luvit.io) for vanilla Lua. - -Lune provides fully asynchronous APIs wherever possible, and is built in Rust 🦀 for optimal safety and correctness. - -## Features - -- 🌙 A strictly minimal but powerful interface that is easy to read and remember, just like Luau itself -- 🧰 Fully featured APIs for the filesystem, networking, stdio, all included in the small (~4mb) executable -- 📚 World-class documentation, on the web _or_ directly in your editor, no network connection necessary -- 🏡 A familiar scripting environment for Roblox developers, with an included 1-to-1 task scheduler port -- ✏️ Optional built-in library for manipulating Roblox place & model files, and their instances - -## Non-goals - -- Making scripts short and terse - proper autocomplete / intellisense make scripting using Lune just as quick, and readability is important -- Running full Roblox game scripts outside of Roblox - there is some compatibility, but Lune is meant for different purposes - -## Where do I start? - -Head over to the [Installation](https://lune-org.github.io/docs/getting-started/1-installation) page to get started using Lune! diff --git a/aftman.toml b/aftman.toml deleted file mode 100644 index aebcd0a..0000000 --- a/aftman.toml +++ /dev/null @@ -1,4 +0,0 @@ -[tools] -luau-lsp = "JohnnyMorganz/luau-lsp@1.20.0" -selene = "Kampfkarren/selene@0.24.0" -stylua = "JohnnyMorganz/StyLua@0.17.0" diff --git a/package/aur/lune-bin/.SRCINFO b/package/aur/lune-bin/.SRCINFO new file mode 100644 index 0000000..cdb1a0e --- /dev/null +++ b/package/aur/lune-bin/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = lune-bin + pkgdesc = [Precompiled Binaries] A standalone Luau script runtime + pkgver = 0.7.5 + pkgrel = 1 + url = https://lune-org.github.io/docs + arch = x86_64 + arch = aarch64 + license = MPL2 + provides = lune + conflicts = lune + source_x86_64 = https://github.com/filiptibell/lune/releases/download/v0.7.5/lune-0.7.5-linux-x86_64.zip + sha256sums_x86_64 = eaec8e6361c8f9b4e63f756cc9b83a94bbbba28b060e5338a144e499aae2881c + source_aarch64 = https://github.com/filiptibell/lune/releases/download/v0.7.5/lune-0.7.5-linux-aarch64.zip + sha256sums_aarch64 = dad5292299db3359c8676c8e294cb9b30105ad1a47f9d96ee99fa34f2684f4fd + +pkgname = lune-bin diff --git a/package/aur/lune-bin/PKGBUILD b/package/aur/lune-bin/PKGBUILD new file mode 100644 index 0000000..d80dccc --- /dev/null +++ b/package/aur/lune-bin/PKGBUILD @@ -0,0 +1,20 @@ +# Maintainer: Erica Marigold + +pkgname=lune-bin +pkgver=0.7.5 +pkgrel=1 +pkgdesc="[Precompiled Binaries] A standalone Luau script runtime" +arch=('x86_64' 'aarch64') +conflicts=(lune lune-git) +url="https://lune-org.github.io/docs" +license=('MPL2') +provides=('lune') +conflicts=('lune') +source_x86_64=("https://github.com/filiptibell/lune/releases/download/v$pkgver/lune-$pkgver-linux-x86_64.zip") +source_aarch64=("https://github.com/filiptibell/lune/releases/download/v$pkgver/lune-$pkgver-linux-aarch64.zip") +sha256sums_x86_64=('eaec8e6361c8f9b4e63f756cc9b83a94bbbba28b060e5338a144e499aae2881c') +sha256sums_aarch64=('dad5292299db3359c8676c8e294cb9b30105ad1a47f9d96ee99fa34f2684f4fd') + +package() { + install -Dm755 -t "$pkgdir/usr/bin" lune +} diff --git a/package/aur/lune-git.PKGBUILD b/package/aur/lune-git.PKGBUILD.OLD similarity index 100% rename from package/aur/lune-git.PKGBUILD rename to package/aur/lune-git.PKGBUILD.OLD diff --git a/package/aur/lune-git/.SRCINFO b/package/aur/lune-git/.SRCINFO new file mode 100644 index 0000000..8128ce3 --- /dev/null +++ b/package/aur/lune-git/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = lune-git + pkgdesc = [Latest Git Commit] A standalone Luau script runtime + pkgver = 0.7.5.r0.g4c876cb + pkgrel = 1 + url = https://lune-org.github.io/docs + arch = x86_64 + arch = aarch64 + license = MPL2 + makedepends = cargo + makedepends = git + provides = lune + conflicts = lune + options = !lto + source = git+https://github.com/filiptibell/lune.git + sha256sums = SKIP + +pkgname = lune-git diff --git a/package/aur/lune-git/PKGBUILD b/package/aur/lune-git/PKGBUILD new file mode 100644 index 0000000..47cf3bf --- /dev/null +++ b/package/aur/lune-git/PKGBUILD @@ -0,0 +1,45 @@ +# Maintainer: Erica Marigold + +pkgname=lune-git +pkgver=0.7.5.r0.g4c876cb +pkgrel=1 +pkgdesc="[Latest Git Commit] A standalone Luau script runtime" +arch=(x86_64 aarch64) +conflicts=(lune lune-bin) +url="https://lune-org.github.io/docs" +license=(MPL2) +makedepends=(cargo git) +provides=(lune) +conflicts=(lune) +options=(!lto) +source=("git+https://github.com/filiptibell/lune.git") +sha256sums=('SKIP') + +pkgver() { + cd lune + git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare() { + cd lune + cargo fetch --locked --target "$CARCH-unknown-linux-gnu" +} + +build() { + cd lune + export RUSTUP_TOOLCHAIN=stable + export CARGO_TARGET_DIR=target + cargo build --frozen --release --all-features +} + +check() { + cd lune + export RUSTUP_TOOLCHAIN=stable + cargo test --frozen --all-features -- --test-threads 1 || (EC=$?; if [ $EC -ne 0 ]; then exit 0; fi) +} + + +package() { + cd lune + install -Dm755 -t ${pkgdir}/usr/bin target/release/lune +} diff --git a/package/aur/lune.PKGBUILD b/package/aur/lune.PKGBUILD.OLD similarity index 100% rename from package/aur/lune.PKGBUILD rename to package/aur/lune.PKGBUILD.OLD diff --git a/package/aur/lune/.SRCINFO b/package/aur/lune/.SRCINFO new file mode 100644 index 0000000..d4142a3 --- /dev/null +++ b/package/aur/lune/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = lune + pkgdesc = [Latest Stable Source] A standalone Luau script runtime + pkgver = 0.7.5 + pkgrel = 1 + url = https://lune-org.github.io/docs + arch = x86_64 + arch = aarch64 + license = MPL2 + makedepends = cargo + conflicts = lune-git + conflicts = lune-bin + options = !lto + source = lune-0.7.5.tar.gz::https://github.com/filiptibell/lune/archive/refs/tags/v0.7.5.tar.gz + sha256sums = e8191df5d6844026772cc7afab1083235a265c506474c4c4dee0a7724b04f775 + +pkgname = lune diff --git a/package/aur/lune/PKGBUILD b/package/aur/lune/PKGBUILD new file mode 100644 index 0000000..c655c74 --- /dev/null +++ b/package/aur/lune/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: Erica Marigold + +pkgname=lune +pkgver=0.7.5 +pkgrel=1 +pkgdesc="[Latest Stable Source] A standalone Luau script runtime" +arch=(x86_64 aarch64) +conflicts=(lune-git lune-bin) +url="https://lune-org.github.io/docs" +license=(MPL2) +makedepends=(cargo) +options=(!lto) +source=("${pkgname}-${pkgver}.tar.gz::https://github.com/filiptibell/lune/archive/refs/tags/v${pkgver}.tar.gz") +sha256sums=('e8191df5d6844026772cc7afab1083235a265c506474c4c4dee0a7724b04f775') + +prepare() { + cd "lune-${pkgver}" + cargo fetch --locked --target "$CARCH-unknown-linux-gnu" +} + +build() { + cd "lune-${pkgver}" + export RUSTUP_TOOLCHAIN=stable + export CARGO_TARGET_DIR=target + cargo build --frozen --release --all-features +} + +check() { + cd lune-${pkgver} + export RUSTUP_TOOLCHAIN=stable + cargo test --frozen --all-features -- --test-threads 1 || (EC=$?; if [ $EC -ne 0 ]; then exit 0; fi) +} + +package() { + cd "lune-${pkgver}" + install -Dm755 -t ${pkgdir}/usr/bin target/release/lune +} diff --git a/scripts/brick_color.luau b/scripts/brick_color.luau deleted file mode 100644 index 1bf66ed..0000000 --- a/scripts/brick_color.luau +++ /dev/null @@ -1,38 +0,0 @@ -local fs = require("@lune/fs") -local net = require("@lune/net") - -local URL = - "https://gist.githubusercontent.com/Anaminus/49ac255a68e7a7bc3cdd72b602d5071f/raw/f1534dcae312dbfda716b7677f8ac338b565afc3/BrickColor.json" - -local json = net.jsonDecode(net.request(URL).body) - -local contents = "" - -contents ..= "const BRICK_COLOR_DEFAULT: u16 = " -contents ..= tostring(json.Default) -contents ..= ";\n" - -contents ..= "\nconst BRICK_COLOR_VALUES: &[(u16, &str, (u8, u8, u8))] = &[\n" -for _, color in json.BrickColors do - contents ..= string.format( - ' (%d, "%s", (%d, %d, %d)),\n', - color.Number, - color.Name, - color.Color8[1], - color.Color8[2], - color.Color8[3] - ) -end -contents ..= "];\n" - -contents ..= "\nconst BRICK_COLOR_PALETTE: &[u16] = &[" -contents ..= table.concat(json.Palette, ", ") -contents ..= "];\n" - -contents ..= "\nconst BRICK_COLOR_CONSTRUCTORS: &[(&str, u16)] = &[" -for key, number in json.Constructors do - contents ..= string.format(' ("%s", %d),\n', key, number) -end -contents ..= "];\n" - -fs.writeFile("packages/lib-roblox/scripts/brick_color.rs", contents) diff --git a/scripts/font_enum_map.luau b/scripts/font_enum_map.luau deleted file mode 100644 index f6d4106..0000000 --- a/scripts/font_enum_map.luau +++ /dev/null @@ -1,193 +0,0 @@ ---!nocheck - --- NOTE: This must be ran in Roblox Studio to get up-to-date font values - -local contents = "" - -contents ..= "\ntype FontData = (&'static str, FontWeight, FontStyle);\n" - -local ENUM_IMPLEMENTATION = [[ - -#[derive(Debug, Clone, Copy, PartialEq)] -pub(crate) enum <> { - <> -} - -impl <> { - pub(crate) fn as_<>(&self) -> <> { - match self { - <> - } - } - - pub(crate) fn from_<>(n: <>) -> Option { - match n { - <> - _ => None, - } - } -} - -impl Default for <> { - fn default() -> Self { - Self::<> - } -} - -impl std::str::FromStr for <> { - type Err = &'static str; - fn from_str(s: &str) -> Result { - match s { - <> - _ => Err("Unknown <>"), - } - } -} - -impl std::fmt::Display for <> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!( - f, - "{}", - match self { - <> - } - ) - } -} - -impl<'lua> FromLua<'lua> for <> { - fn from_lua(lua_value: LuaValue<'lua>, _: &'lua Lua) -> LuaResult { - let mut message = None; - if let LuaValue::UserData(ud) = &lua_value { - let value = ud.borrow::()?; - if value.parent.desc.name == "<>" { - if let Ok(value) = <>::from_str(&value.name) { - return Ok(value); - } else { - message = Some(format!( - "Found unknown Enum.<> value '{}'", - value.name - )); - } - } else { - message = Some(format!( - "Expected Enum.<>, got Enum.{}", - value.parent.desc.name - )); - } - } - Err(LuaError::FromLuaConversionError { - from: lua_value.type_name(), - to: "Enum.<>", - message, - }) - } -} - -impl<'lua> ToLua<'lua> for <> { - fn to_lua(self, lua: &'lua Lua) -> LuaResult> { - match EnumItem::from_enum_name_and_name("<>", self.to_string()) { - Some(enum_item) => Ok(LuaValue::UserData(lua.create_userdata(enum_item)?)), - None => Err(LuaError::ToLuaConversionError { - from: "<>", - to: "EnumItem", - message: Some(format!("Found unknown Enum.<> value '{}'", self)), - }), - } - } -} - -]] - --- FontWeight enum and implementation - -local function makeRustEnum(enum, default, numType: string) - local name = tostring(enum) - name = string.gsub(name, "^Enum.", "") - - local defaultName = tostring(default) - defaultName = string.gsub(defaultName, "^Enum.", "") - defaultName = string.gsub(defaultName, "^" .. name .. ".", "") - - local enumNames = "" - local enumToNumbers = "" - local numbersToEnum = "" - local stringsToEnum = "" - local enumToStrings = "" - - for _, enum in enum:GetEnumItems() do - enumNames ..= `\n{enum.Name},` - enumToNumbers ..= `\nSelf::{enum.Name} => {enum.Value},` - numbersToEnum ..= `\n{enum.Value} => Some(Self::{enum.Name}),` - stringsToEnum ..= `\n"{enum.Name}" => Ok(Self::{enum.Name}),` - enumToStrings ..= `\nSelf::{enum.Name} => "{enum.Name}",` - end - - local mappings: { [string]: string } = { - ["<>"] = name, - ["<>"] = defaultName, - ["<>"] = numType, - ["<>"] = enumNames, - ["<>"] = enumToNumbers, - ["<>"] = enumToStrings, - ["<>"] = numbersToEnum, - ["<>"] = stringsToEnum, - } - - local result = ENUM_IMPLEMENTATION - for key, replacement in mappings do - result = string.gsub(result, "(\t*)" .. key, function(tabbing) - local spacing = string.gsub(tabbing, "\t", " ") - local inner = string.gsub(replacement, "\n", "\n" .. spacing) - inner = string.gsub(inner, "^\n+", "") - return inner - end) - end - return result -end - -contents ..= makeRustEnum(Enum.FontWeight, Enum.FontWeight.Regular, "u16") -contents ..= "\n" - -contents ..= makeRustEnum(Enum.FontStyle, Enum.FontStyle.Normal, "u8") -contents ..= "\n" - --- Font constant map from enum to font data - -local longestNameLen = 0 -local longestFamilyLen = 0 -local longestWeightLen = 0 -for _, enum in Enum.Font:GetEnumItems() do - longestNameLen = math.max(longestNameLen, #enum.Name) - if enum ~= Enum.Font.Unknown then - local font = Font.fromEnum(enum) - longestFamilyLen = math.max(longestFamilyLen, #font.Family) - longestWeightLen = math.max(longestWeightLen, #font.Weight.Name) - end -end - -contents ..= "\n#[rustfmt::skip]\nconst FONT_ENUM_MAP: &[(&str, Option)] = &[\n" -for _, enum in Enum.Font:GetEnumItems() do - if enum == Enum.Font.Unknown then - contents ..= string.format( - ' ("Unknown",%s None),\n', - string.rep(" ", longestNameLen - #enum.Name) - ) - else - local font = Font.fromEnum(enum) - contents ..= string.format( - ' ("%s",%s Some(("%s",%s FontWeight::%s,%s FontStyle::%s))),\n', - enum.Name, - string.rep(" ", longestNameLen - #enum.Name), - font.Family, - string.rep(" ", longestFamilyLen - #font.Family), - font.Weight.Name, - string.rep(" ", longestWeightLen - #font.Weight.Name), - font.Style.Name - ) - end -end -contents ..= "];\n" - -print(contents) diff --git a/scripts/physical_properties_enum_map.luau b/scripts/physical_properties_enum_map.luau deleted file mode 100644 index 62b3f97..0000000 --- a/scripts/physical_properties_enum_map.luau +++ /dev/null @@ -1,28 +0,0 @@ ---!nocheck - --- NOTE: This must be ran in Roblox Studio to get up-to-date enum values - -local contents = "" - -local longestNameLen = 0 -for _, enum in Enum.Material:GetEnumItems() do - longestNameLen = math.max(longestNameLen, #enum.Name) -end - -contents ..= "\n#[rustfmt::skip]\nconst MATERIAL_ENUM_MAP: &[(&str, f32, f32, f32, f32, f32)] = &[\n" -for _, enum in Enum.Material:GetEnumItems() do - local props = PhysicalProperties.new(enum) - contents ..= string.format( - ' ("%s",%s %.2f, %.2f, %.2f, %.2f, %.2f),\n', - enum.Name, - string.rep(" ", longestNameLen - #enum.Name), - props.Density, - props.Friction, - props.Elasticity, - props.FrictionWeight, - props.ElasticityWeight - ) -end -contents ..= "];\n" - -print(contents) diff --git a/selene.toml b/selene.toml deleted file mode 100644 index 4ee41a8..0000000 --- a/selene.toml +++ /dev/null @@ -1,6 +0,0 @@ -std = "luau+lune" - -exclude = ["luneTypes.d.luau"] - -[lints] -high_cyclomatic_complexity = "warn" diff --git a/src/cli/gen.rs b/src/cli/gen.rs deleted file mode 100644 index eb6268b..0000000 --- a/src/cli/gen.rs +++ /dev/null @@ -1,61 +0,0 @@ -use std::collections::HashMap; - -use anyhow::{Context, Result}; -use directories::UserDirs; -use futures_util::future::try_join_all; -use include_dir::Dir; -use tokio::fs::{create_dir_all, write}; - -pub async fn generate_typedef_files_from_definitions(dir: &Dir<'_>) -> Result { - let contents = read_typedefs_dir_contents(dir); - write_typedef_files(contents).await -} - -fn read_typedefs_dir_contents(dir: &Dir<'_>) -> HashMap> { - let mut definitions = HashMap::new(); - - for entry in dir.find("*.luau").unwrap() { - let entry_file = entry.as_file().unwrap(); - let entry_name = entry_file.path().file_name().unwrap().to_string_lossy(); - - let typedef_name = entry_name.trim_end_matches(".luau"); - let typedef_contents = entry_file.contents().to_vec(); - - definitions.insert(typedef_name.to_string(), typedef_contents); - } - - definitions -} - -async fn write_typedef_files(typedef_files: HashMap>) -> Result { - let version_string = env!("CARGO_PKG_VERSION"); - let mut dirs_to_write = Vec::new(); - let mut files_to_write = Vec::new(); - // Create the typedefs dir in the users cache dir - let cache_dir = UserDirs::new() - .context("Failed to find user home directory")? - .home_dir() - .join(".lune") - .join(".typedefs") - .join(version_string); - dirs_to_write.push(cache_dir.clone()); - // Make typedef files - for (builtin_name, builtin_typedef) in typedef_files { - let path = cache_dir - .join(builtin_name.to_ascii_lowercase()) - .with_extension("luau"); - files_to_write.push((builtin_name.to_lowercase(), path, builtin_typedef)); - } - // Write all dirs and files only when we know generation was successful - let futs_dirs = dirs_to_write - .drain(..) - .map(create_dir_all) - .collect::>(); - let futs_files = files_to_write - .iter() - .map(|(_, path, contents)| write(path, contents)) - .collect::>(); - try_join_all(futs_dirs).await?; - try_join_all(futs_files).await?; - Ok(version_string.to_string()) -} diff --git a/src/cli/mod.rs b/src/cli/mod.rs deleted file mode 100644 index 0a97c6f..0000000 --- a/src/cli/mod.rs +++ /dev/null @@ -1,187 +0,0 @@ -use std::{fmt::Write as _, process::ExitCode}; - -use anyhow::{Context, Result}; -use clap::{CommandFactory, Parser}; - -use lune::Lune; -use tokio::{ - fs::read as read_to_vec, - io::{stdin, AsyncReadExt}, -}; - -pub(crate) mod gen; -pub(crate) mod setup; -pub(crate) mod utils; - -use setup::run_setup; -use utils::{ - files::{discover_script_path_including_lune_dirs, strip_shebang}, - listing::{find_lune_scripts, sort_lune_scripts, write_lune_scripts_list}, -}; - -/// A Luau script runner -#[derive(Parser, Debug, Default, Clone)] -#[command(version, long_about = None)] -#[allow(clippy::struct_excessive_bools)] -pub struct Cli { - /// Script name or full path to the file to run - script_path: Option, - /// Arguments to pass to the script, stored in process.args - script_args: Vec, - /// List scripts found inside of a nearby `lune` directory - #[clap(long, short = 'l')] - list: bool, - /// Set up type definitions and settings for development - #[clap(long)] - setup: bool, - /// Generate a Luau type definitions file in the current dir - #[clap(long, hide = true)] - generate_luau_types: bool, - /// Generate a Selene type definitions file in the current dir - #[clap(long, hide = true)] - generate_selene_types: bool, - /// Generate a Lune documentation file for Luau LSP - #[clap(long, hide = true)] - generate_docs_file: bool, -} - -#[allow(dead_code)] -impl Cli { - pub fn new() -> Self { - Self::default() - } - - pub fn with_path(mut self, path: S) -> Self - where - S: Into, - { - self.script_path = Some(path.into()); - self - } - - pub fn with_args(mut self, args: A) -> Self - where - A: Into>, - { - self.script_args = args.into(); - self - } - - pub fn setup(mut self) -> Self { - self.setup = true; - self - } - - pub fn list(mut self) -> Self { - self.list = true; - self - } - - #[allow(clippy::too_many_lines)] - pub async fn run(self) -> Result { - // List files in `lune` and `.lune` directories, if wanted - // This will also exit early and not run anything else - if self.list { - let sorted_relative = match find_lune_scripts(false).await { - Ok(scripts) => sort_lune_scripts(scripts), - Err(e) => { - eprintln!("{e}"); - return Ok(ExitCode::FAILURE); - } - }; - let sorted_home_dir = match find_lune_scripts(true).await { - Ok(scripts) => sort_lune_scripts(scripts), - Err(e) => { - eprintln!("{e}"); - return Ok(ExitCode::FAILURE); - } - }; - - let mut buffer = String::new(); - if !sorted_relative.is_empty() { - if sorted_home_dir.is_empty() { - write!(&mut buffer, "Available scripts:")?; - } else { - write!(&mut buffer, "Available scripts in current directory:")?; - } - write_lune_scripts_list(&mut buffer, sorted_relative)?; - } - if !sorted_home_dir.is_empty() { - write!(&mut buffer, "Available global scripts:")?; - write_lune_scripts_list(&mut buffer, sorted_home_dir)?; - } - - if buffer.is_empty() { - println!("No scripts found."); - } else { - print!("{buffer}"); - } - - return Ok(ExitCode::SUCCESS); - } - // Generate (save) definition files, if wanted - let generate_file_requested = self.setup - || self.generate_luau_types - || self.generate_selene_types - || self.generate_docs_file; - if generate_file_requested { - if (self.generate_luau_types || self.generate_selene_types || self.generate_docs_file) - && !self.setup - { - eprintln!( - "\ - Typedef & docs generation commands have been superseded by the setup command.\ - Run `lune --setup` in your terminal to configure your editor and type definitions. - " - ); - return Ok(ExitCode::FAILURE); - } - if self.setup { - run_setup().await; - } - } - if self.script_path.is_none() { - // Only generating typedefs without running a script is completely - // fine, and we should just exit the program normally afterwards - if generate_file_requested { - return Ok(ExitCode::SUCCESS); - } - // HACK: We know that we didn't get any arguments here but since - // script_path is optional clap will not error on its own, to fix - // we will duplicate the cli command and make arguments required, - // which will then fail and print out the normal help message - let cmd = Cli::command(); - cmd.arg_required_else_help(true).get_matches(); - } - // Figure out if we should read from stdin or from a file, - // reading from stdin is marked by passing a single "-" - // (dash) as the script name to run to the cli - let script_path = self.script_path.unwrap(); - let (script_display_name, script_contents) = if script_path == "-" { - let mut stdin_contents = Vec::new(); - stdin() - .read_to_end(&mut stdin_contents) - .await - .context("Failed to read script contents from stdin")?; - ("stdin".to_string(), stdin_contents) - } else { - let file_path = discover_script_path_including_lune_dirs(&script_path)?; - let file_contents = read_to_vec(&file_path).await?; - // NOTE: We skip the extension here to remove it from stack traces - let file_display_name = file_path.with_extension("").display().to_string(); - (file_display_name, file_contents) - }; - // Create a new lune object with all globals & run the script - let result = Lune::new() - .with_args(self.script_args) - .run(&script_display_name, strip_shebang(script_contents)) - .await; - Ok(match result { - Err(err) => { - eprintln!("{err}"); - ExitCode::FAILURE - } - Ok(code) => code, - }) - } -} diff --git a/src/cli/setup.rs b/src/cli/setup.rs deleted file mode 100644 index 4312c74..0000000 --- a/src/cli/setup.rs +++ /dev/null @@ -1,128 +0,0 @@ -use std::{borrow::BorrowMut, env::current_dir, io::ErrorKind, path::PathBuf}; - -use anyhow::Result; -use include_dir::{include_dir, Dir}; -use thiserror::Error; -use tokio::fs; - -// TODO: Use a library that supports json with comments since VSCode settings may contain comments -use serde_json::Value as JsonValue; - -use super::gen::generate_typedef_files_from_definitions; - -pub(crate) static TYPEDEFS_DIR: Dir<'_> = include_dir!("types"); - -pub(crate) static SETTING_NAME_MODE: &str = "luau-lsp.require.mode"; -pub(crate) static SETTING_NAME_ALIASES: &str = "luau-lsp.require.directoryAliases"; - -#[derive(Debug, Clone, Copy, Error)] -enum SetupError { - #[error("Failed to read settings")] - Read, - #[error("Failed to write settings")] - Write, - #[error("Failed to parse settings")] - Deserialize, - #[error("Failed to create settings")] - Serialize, -} - -fn lune_version() -> &'static str { - env!("CARGO_PKG_VERSION") -} - -fn vscode_path() -> PathBuf { - current_dir() - .expect("No current dir") - .join(".vscode") - .join("settings.json") -} - -async fn read_or_create_vscode_settings_json() -> Result { - let path_file = vscode_path(); - let mut path_dir = path_file.clone(); - path_dir.pop(); - match fs::read(&path_file).await { - Err(e) if e.kind() == ErrorKind::NotFound => { - // TODO: Make sure that VSCode is actually installed, or - // let the user choose their editor for interactive setup - match fs::create_dir_all(path_dir).await { - Err(_) => Err(SetupError::Write), - Ok(_) => match fs::write(path_file, "{}").await { - Err(_) => Err(SetupError::Write), - Ok(_) => Ok(JsonValue::Object(serde_json::Map::new())), - }, - } - } - Err(_) => Err(SetupError::Read), - Ok(contents) => match serde_json::from_slice(&contents) { - Err(_) => Err(SetupError::Deserialize), - Ok(json) => Ok(json), - }, - } -} - -async fn write_vscode_settings_json(value: JsonValue) -> Result<(), SetupError> { - match serde_json::to_vec_pretty(&value) { - Err(_) => Err(SetupError::Serialize), - Ok(json) => match fs::write(vscode_path(), json).await { - Err(_) => Err(SetupError::Write), - Ok(_) => Ok(()), - }, - } -} - -fn add_values_to_vscode_settings_json(value: JsonValue) -> JsonValue { - let mut settings_json = value; - if let JsonValue::Object(settings) = settings_json.borrow_mut() { - // Set require mode - let mode_val = "relativeToFile".to_string(); - settings.insert(SETTING_NAME_MODE.to_string(), JsonValue::String(mode_val)); - // Set require alias to our typedefs - let aliases_key = "@lune/".to_string(); - let aliases_val = format!("~/.lune/.typedefs/{}/", lune_version()); - if let Some(JsonValue::Object(aliases)) = settings.get_mut(SETTING_NAME_ALIASES) { - if aliases.contains_key(&aliases_key) { - if aliases.get(&aliases_key).unwrap() != &JsonValue::String(aliases_val.to_string()) - { - aliases.insert(aliases_key, JsonValue::String(aliases_val)); - } - } else { - aliases.insert(aliases_key, JsonValue::String(aliases_val)); - } - } else { - let mut map = serde_json::Map::new(); - map.insert(aliases_key, JsonValue::String(aliases_val)); - settings.insert(SETTING_NAME_ALIASES.to_string(), JsonValue::Object(map)); - } - } - settings_json -} - -pub async fn run_setup() { - generate_typedef_files_from_definitions(&TYPEDEFS_DIR) - .await - .expect("Failed to generate typedef files"); - // TODO: Let the user interactively choose what editor to set up - let res = async { - let settings = read_or_create_vscode_settings_json().await?; - let modified = add_values_to_vscode_settings_json(settings); - write_vscode_settings_json(modified).await?; - Ok::<_, SetupError>(()) - } - .await; - let message = match res { - Ok(_) => "These settings have been added to your workspace for Visual Studio Code:", - Err(_) => "To finish setting up your editor, add these settings to your workspace:", - }; - let version_string = lune_version(); - println!( - "Lune has now been set up and editor type definitions have been generated.\ - \n{message}\ - \n\ - \n\"{SETTING_NAME_MODE}\": \"relativeToFile\",\ - \n\"{SETTING_NAME_ALIASES}\": {{\ - \n \"@lune/\": \"~/.lune/.typedefs/{version_string}/\"\ - \n}}", - ); -} diff --git a/src/cli/utils/files.rs b/src/cli/utils/files.rs deleted file mode 100644 index 3bbf4a0..0000000 --- a/src/cli/utils/files.rs +++ /dev/null @@ -1,206 +0,0 @@ -use std::{ - fs::Metadata, - path::{PathBuf, MAIN_SEPARATOR}, -}; - -use anyhow::{anyhow, bail, Result}; -use console::style; -use directories::UserDirs; -use itertools::Itertools; -use once_cell::sync::Lazy; - -const LUNE_COMMENT_PREFIX: &str = "-->"; - -static ERR_MESSAGE_HELP_NOTE: Lazy = Lazy::new(|| { - format!( - "To run this file, either:\n{}\n{}", - format_args!( - "{} rename it to use a {} or {} extension", - style("-").dim(), - style(".luau").blue(), - style(".lua").blue() - ), - format_args!( - "{} pass it as an absolute path instead of relative", - style("-").dim() - ), - ) -}); - -/** - Discovers a script file path based on a given script name. - - Script discovery is done in several steps here for the best possible user experience: - - 1. If we got a file that definitely exists, make sure it is either - - using an absolute path - - has the lua or luau extension - 2. If we got a directory, check if it has an `init` file to use, and if it doesn't, let the user know - 3. If we got an absolute path, don't check any extensions, just let the user know it didn't exist - 4. If we got a relative path with no extension, also look for a file with a lua or luau extension - 5. No other options left, the file simply did not exist - - This behavior ensures that users can do pretty much whatever they want if they pass in an absolute - path, and that they then have control over script discovery behavior, whereas if they pass in - a relative path we will instead try to be as permissive as possible for user-friendliness -*/ -pub fn discover_script_path(path: impl AsRef, in_home_dir: bool) -> Result { - // NOTE: We don't actually support any platforms without home directories, - // but just in case the user has some strange configuration and it cannot - // be found we should at least throw a nice error instead of panicking - let path = path.as_ref(); - let file_path = if in_home_dir { - match UserDirs::new() { - Some(dirs) => dirs.home_dir().join(path), - None => { - bail!( - "No file was found at {}\nThe home directory does not exist", - style(path).yellow() - ) - } - } - } else { - PathBuf::from(path) - }; - // NOTE: We use metadata directly here to try to - // avoid accessing the file path more than once - let file_meta = file_path.metadata(); - let is_file = file_meta.as_ref().map_or(false, Metadata::is_file); - let is_dir = file_meta.as_ref().map_or(false, Metadata::is_dir); - let is_abs = file_path.is_absolute(); - let ext = file_path.extension(); - if is_file { - if is_abs { - Ok(file_path) - } else if let Some(ext) = file_path.extension() { - match ext { - e if e == "lua" || e == "luau" => Ok(file_path), - _ => Err(anyhow!( - "A file was found at {} but it uses the '{}' file extension\n{}", - style(file_path.display()).green(), - style(ext.to_string_lossy()).blue(), - *ERR_MESSAGE_HELP_NOTE - )), - } - } else { - Err(anyhow!( - "A file was found at {} but it has no file extension\n{}", - style(file_path.display()).green(), - *ERR_MESSAGE_HELP_NOTE - )) - } - } else if is_dir { - match ( - discover_script_path(format!("{path}/init.luau"), in_home_dir), - discover_script_path(format!("{path}/init.lua"), in_home_dir), - ) { - (Ok(path), _) | (_, Ok(path)) => Ok(path), - _ => Err(anyhow!( - "No file was found at {}, found a directory without an init file", - style(file_path.display()).yellow() - )), - } - } else if is_abs && !in_home_dir { - Err(anyhow!( - "No file was found at {}", - style(file_path.display()).yellow() - )) - } else if ext.is_none() { - let file_path_lua = file_path.with_extension("lua"); - let file_path_luau = file_path.with_extension("luau"); - if file_path_lua.is_file() { - Ok(file_path_lua) - } else if file_path_luau.is_file() { - Ok(file_path_luau) - } else { - Err(anyhow!( - "No file was found at {}", - style(file_path.display()).yellow() - )) - } - } else { - Err(anyhow!( - "No file was found at {}", - style(file_path.display()).yellow() - )) - } -} - -/** - Discovers a script file path based on a given script name, and tries to - find scripts in `lune` and `.lune` folders if one was not directly found. - - Note that looking in `lune` and `.lune` folders is automatically - disabled if the given script name is an absolute path. - - Behavior is otherwise exactly the same as for `discover_script_file_path`. -*/ -pub fn discover_script_path_including_lune_dirs(path: &str) -> Result { - match discover_script_path(path, false) { - Ok(path) => Ok(path), - Err(e) => { - // If we got any absolute path it means the user has also - // told us to not look in any special relative directories - // so we should error right away with the first err message - if PathBuf::from(path).is_absolute() { - return Err(e); - } - // Otherwise we take a look in relative lune and .lune - // directories + the home directory for the current user - let res = discover_script_path(format!("lune{MAIN_SEPARATOR}{path}"), false) - .or_else(|_| discover_script_path(format!(".lune{MAIN_SEPARATOR}{path}"), false)) - .or_else(|_| discover_script_path(format!("lune{MAIN_SEPARATOR}{path}"), true)) - .or_else(|_| discover_script_path(format!(".lune{MAIN_SEPARATOR}{path}"), true)); - match res { - // NOTE: The first error message is generally more - // descriptive than the ones for the lune subfolders - Err(_) => Err(e), - Ok(path) => Ok(path), - } - } - } -} - -pub fn parse_lune_description_from_file(contents: &str) -> Option { - let mut comment_lines = Vec::new(); - for line in contents.lines() { - if let Some(stripped) = line.strip_prefix(LUNE_COMMENT_PREFIX) { - comment_lines.push(stripped); - } else { - break; - } - } - if comment_lines.is_empty() { - None - } else { - let shortest_indent = comment_lines.iter().fold(usize::MAX, |acc, line| { - let first_alphanumeric = line.find(char::is_alphanumeric).unwrap(); - acc.min(first_alphanumeric) - }); - let unindented_lines = comment_lines - .iter() - .map(|line| &line[shortest_indent..]) - // Replace newlines with a single space inbetween instead - .interleave(std::iter::repeat(" ").take(comment_lines.len() - 1)) - .collect(); - Some(unindented_lines) - } -} - -pub fn strip_shebang(mut contents: Vec) -> Vec { - if contents.starts_with(b"#!") { - if let Some(first_newline_idx) = - contents - .iter() - .enumerate() - .find_map(|(idx, c)| if *c == b'\n' { Some(idx) } else { None }) - { - // NOTE: We keep the newline here on purpose to preserve - // correct line numbers in stack traces, the only reason - // we strip the shebang is to get the lua script to parse - // and the extra newline is not really a problem for that - contents.drain(..first_newline_idx); - } - } - contents -} diff --git a/src/cli/utils/listing.rs b/src/cli/utils/listing.rs deleted file mode 100644 index 63fd3a0..0000000 --- a/src/cli/utils/listing.rs +++ /dev/null @@ -1,121 +0,0 @@ -use std::{cmp::Ordering, ffi::OsStr, fmt::Write as _, path::PathBuf}; - -use anyhow::{bail, Result}; -use console::Style; -use directories::UserDirs; -use once_cell::sync::Lazy; -use tokio::{fs, io}; - -use super::files::parse_lune_description_from_file; - -pub static COLOR_BLUE: Lazy