mirror of
https://github.com/lune-org/lune.git
synced 2025-04-18 10:53:46 +01:00
Merge branch 'main' into feature/process-stream
This commit is contained in:
commit
c29d7a9a3f
28 changed files with 545 additions and 442 deletions
64
.github/workflows/release.yaml
vendored
64
.github/workflows/release.yaml
vendored
|
@ -27,26 +27,26 @@ jobs:
|
||||||
file: crates/lune/Cargo.toml
|
file: crates/lune/Cargo.toml
|
||||||
field: package.version
|
field: package.version
|
||||||
|
|
||||||
dry-run:
|
# dry-run:
|
||||||
name: Dry-run
|
# name: Dry-run
|
||||||
needs: ["init"]
|
# needs: ["init"]
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
steps:
|
# steps:
|
||||||
- name: Checkout repository
|
# - name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
# uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Rust
|
# - name: Install Rust
|
||||||
uses: dtolnay/rust-toolchain@stable
|
# uses: dtolnay/rust-toolchain@stable
|
||||||
|
|
||||||
- name: Publish (dry-run)
|
# - name: Publish (dry-run)
|
||||||
uses: katyo/publish-crates@v2
|
# uses: katyo/publish-crates@v2
|
||||||
with:
|
# with:
|
||||||
dry-run: true
|
# dry-run: true
|
||||||
check-repo: true
|
# check-repo: true
|
||||||
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
# registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
||||||
|
|
||||||
build:
|
build:
|
||||||
needs: ["init", "dry-run"]
|
needs: ["init"] # , "dry-run"]
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -112,7 +112,7 @@ jobs:
|
||||||
release-github:
|
release-github:
|
||||||
name: Release (GitHub)
|
name: Release (GitHub)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: ["init", "dry-run", "build"]
|
needs: ["init", "build"] # , "dry-run", "build"]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
@ -139,20 +139,20 @@ jobs:
|
||||||
files: ./releases/*.zip
|
files: ./releases/*.zip
|
||||||
draft: true
|
draft: true
|
||||||
|
|
||||||
release-crates:
|
# release-crates:
|
||||||
name: Release (crates.io)
|
# name: Release (crates.io)
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
needs: ["init", "dry-run", "build"]
|
# needs: ["init", "dry-run", "build"]
|
||||||
steps:
|
# steps:
|
||||||
- name: Checkout repository
|
# - name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
# uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Rust
|
# - name: Install Rust
|
||||||
uses: dtolnay/rust-toolchain@stable
|
# uses: dtolnay/rust-toolchain@stable
|
||||||
|
|
||||||
- name: Publish crates
|
# - name: Publish crates
|
||||||
uses: katyo/publish-crates@v2
|
# uses: katyo/publish-crates@v2
|
||||||
with:
|
# with:
|
||||||
dry-run: false
|
# dry-run: false
|
||||||
check-repo: true
|
# check-repo: true
|
||||||
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
# registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
||||||
|
|
21
CHANGELOG.md
21
CHANGELOG.md
|
@ -8,6 +8,27 @@ 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/),
|
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).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## `0.8.7` - August 10th, 2024
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Added a compression level option to `serde.compress` ([#224])
|
||||||
|
- Added missing vector methods to the `roblox` library ([#228])
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Updated to Luau version `0.635`
|
||||||
|
- Updated to rbx-dom database version `0.634`
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed `fs.readDir` with trailing forward-slash on Windows ([#220])
|
||||||
|
- Fixed `__type` and `__tostring` metamethods not always being respected when formatting tables
|
||||||
|
|
||||||
|
[#220]: https://github.com/lune-org/lune/pull/220
|
||||||
|
[#224]: https://github.com/lune-org/lune/pull/224
|
||||||
|
[#228]: https://github.com/lune-org/lune/pull/228
|
||||||
|
|
||||||
## `0.8.6` - June 23rd, 2024
|
## `0.8.6` - June 23rd, 2024
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
695
Cargo.lock
generated
695
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -1,4 +1,3 @@
|
||||||
[tools]
|
[tools]
|
||||||
luau-lsp = "JohnnyMorganz/luau-lsp@1.29.1"
|
luau-lsp = "JohnnyMorganz/luau-lsp@1.32.1"
|
||||||
selene = "Kampfkarren/selene@0.27.1"
|
|
||||||
stylua = "JohnnyMorganz/StyLua@0.20.0"
|
stylua = "JohnnyMorganz/StyLua@0.20.0"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "lune-roblox"
|
name = "lune-roblox"
|
||||||
version = "0.1.2"
|
version = "0.1.3"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
repository = "https://github.com/lune-org/lune"
|
repository = "https://github.com/lune-org/lune"
|
||||||
|
@ -13,7 +13,7 @@ path = "src/lib.rs"
|
||||||
workspace = true
|
workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
mlua = { version = "0.9.7", features = ["luau"] }
|
mlua = { version = "0.9.9", features = ["luau"] }
|
||||||
|
|
||||||
glam = "0.27"
|
glam = "0.27"
|
||||||
rand = "0.8"
|
rand = "0.8"
|
||||||
|
@ -26,4 +26,4 @@ rbx_reflection = "4.4.0"
|
||||||
rbx_reflection_database = "0.2.9"
|
rbx_reflection_database = "0.2.9"
|
||||||
rbx_xml = "0.13.2"
|
rbx_xml = "0.13.2"
|
||||||
|
|
||||||
lune-utils = { version = "0.1.2", path = "../lune-utils" }
|
lune-utils = { version = "0.1.3", path = "../lune-utils" }
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "lune-std-datetime"
|
name = "lune-std-datetime"
|
||||||
version = "0.1.2"
|
version = "0.1.3"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
repository = "https://github.com/lune-org/lune"
|
repository = "https://github.com/lune-org/lune"
|
||||||
|
@ -13,10 +13,10 @@ path = "src/lib.rs"
|
||||||
workspace = true
|
workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
mlua = { version = "0.9.7", features = ["luau"] }
|
mlua = { version = "0.9.9", features = ["luau"] }
|
||||||
|
|
||||||
thiserror = "1.0"
|
thiserror = "1.0"
|
||||||
chrono = "0.4.38"
|
chrono = "0.4.38"
|
||||||
chrono_lc = "0.1.6"
|
chrono_lc = "0.1.6"
|
||||||
|
|
||||||
lune-utils = { version = "0.1.2", path = "../lune-utils" }
|
lune-utils = { version = "0.1.3", path = "../lune-utils" }
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "lune-std-fs"
|
name = "lune-std-fs"
|
||||||
version = "0.1.1"
|
version = "0.1.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
repository = "https://github.com/lune-org/lune"
|
repository = "https://github.com/lune-org/lune"
|
||||||
|
@ -13,11 +13,11 @@ path = "src/lib.rs"
|
||||||
workspace = true
|
workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
mlua = { version = "0.9.7", features = ["luau"] }
|
mlua = { version = "0.9.9", features = ["luau"] }
|
||||||
|
|
||||||
bstr = "1.9"
|
bstr = "1.9"
|
||||||
|
|
||||||
tokio = { version = "1", default-features = false, features = ["fs"] }
|
tokio = { version = "1", default-features = false, features = ["fs"] }
|
||||||
|
|
||||||
lune-utils = { version = "0.1.2", path = "../lune-utils" }
|
lune-utils = { version = "0.1.3", path = "../lune-utils" }
|
||||||
lune-std-datetime = { version = "0.1.1", path = "../lune-std-datetime" }
|
lune-std-datetime = { version = "0.1.2", path = "../lune-std-datetime" }
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "lune-std-luau"
|
name = "lune-std-luau"
|
||||||
version = "0.1.1"
|
version = "0.1.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
repository = "https://github.com/lune-org/lune"
|
repository = "https://github.com/lune-org/lune"
|
||||||
|
@ -13,6 +13,6 @@ path = "src/lib.rs"
|
||||||
workspace = true
|
workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
mlua = { version = "0.9.7", features = ["luau", "luau-jit"] }
|
mlua = { version = "0.9.9", features = ["luau", "luau-jit"] }
|
||||||
|
|
||||||
lune-utils = { version = "0.1.2", path = "../lune-utils" }
|
lune-utils = { version = "0.1.3", path = "../lune-utils" }
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "lune-std-net"
|
name = "lune-std-net"
|
||||||
version = "0.1.1"
|
version = "0.1.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
repository = "https://github.com/lune-org/lune"
|
repository = "https://github.com/lune-org/lune"
|
||||||
|
@ -13,7 +13,7 @@ path = "src/lib.rs"
|
||||||
workspace = true
|
workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
mlua = { version = "0.9.7", features = ["luau"] }
|
mlua = { version = "0.9.9", features = ["luau"] }
|
||||||
mlua-luau-scheduler = { version = "0.0.2", path = "../mlua-luau-scheduler" }
|
mlua-luau-scheduler = { version = "0.0.2", path = "../mlua-luau-scheduler" }
|
||||||
|
|
||||||
bstr = "1.9"
|
bstr = "1.9"
|
||||||
|
@ -35,5 +35,5 @@ tokio = { version = "1", default-features = false, features = [
|
||||||
"macros",
|
"macros",
|
||||||
] }
|
] }
|
||||||
|
|
||||||
lune-utils = { version = "0.1.2", path = "../lune-utils" }
|
lune-utils = { version = "0.1.3", path = "../lune-utils" }
|
||||||
lune-std-serde = { version = "0.1.1", path = "../lune-std-serde" }
|
lune-std-serde = { version = "0.1.2", path = "../lune-std-serde" }
|
||||||
|
|
|
@ -18,6 +18,7 @@ impl LuaRequest {
|
||||||
let path = self.head.uri.path().to_string();
|
let path = self.head.uri.path().to_string();
|
||||||
let body = lua.create_string(&self.body)?;
|
let body = lua.create_string(&self.body)?;
|
||||||
|
|
||||||
|
#[allow(clippy::mutable_key_type)]
|
||||||
let query: HashMap<LuaString, LuaString> = self
|
let query: HashMap<LuaString, LuaString> = self
|
||||||
.head
|
.head
|
||||||
.uri
|
.uri
|
||||||
|
@ -32,6 +33,7 @@ impl LuaRequest {
|
||||||
})
|
})
|
||||||
.collect::<LuaResult<_>>()?;
|
.collect::<LuaResult<_>>()?;
|
||||||
|
|
||||||
|
#[allow(clippy::mutable_key_type)]
|
||||||
let headers: HashMap<LuaString, LuaString> = self
|
let headers: HashMap<LuaString, LuaString> = self
|
||||||
.head
|
.head
|
||||||
.headers
|
.headers
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "lune-std-process"
|
name = "lune-std-process"
|
||||||
version = "0.1.2"
|
version = "0.1.3"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
repository = "https://github.com/lune-org/lune"
|
repository = "https://github.com/lune-org/lune"
|
||||||
|
@ -13,7 +13,7 @@ path = "src/lib.rs"
|
||||||
workspace = true
|
workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
mlua = { version = "0.9.7", features = ["luau"] }
|
mlua = { version = "0.9.9", features = ["luau"] }
|
||||||
mlua-luau-scheduler = { version = "0.0.2", path = "../mlua-luau-scheduler" }
|
mlua-luau-scheduler = { version = "0.0.2", path = "../mlua-luau-scheduler" }
|
||||||
|
|
||||||
directories = "5.0"
|
directories = "5.0"
|
||||||
|
@ -31,4 +31,4 @@ tokio = { version = "1", default-features = false, features = [
|
||||||
"sync",
|
"sync",
|
||||||
] }
|
] }
|
||||||
|
|
||||||
lune-utils = { version = "0.1.2", path = "../lune-utils" }
|
lune-utils = { version = "0.1.3", path = "../lune-utils" }
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "lune-std-regex"
|
name = "lune-std-regex"
|
||||||
version = "0.1.1"
|
version = "0.1.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
repository = "https://github.com/lune-org/lune"
|
repository = "https://github.com/lune-org/lune"
|
||||||
|
@ -13,9 +13,9 @@ path = "src/lib.rs"
|
||||||
workspace = true
|
workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
mlua = { version = "0.9.7", features = ["luau"] }
|
mlua = { version = "0.9.9", features = ["luau"] }
|
||||||
|
|
||||||
regex = "1.10"
|
regex = "1.10"
|
||||||
self_cell = "1.0"
|
self_cell = "1.0"
|
||||||
|
|
||||||
lune-utils = { version = "0.1.2", path = "../lune-utils" }
|
lune-utils = { version = "0.1.3", path = "../lune-utils" }
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "lune-std-roblox"
|
name = "lune-std-roblox"
|
||||||
version = "0.1.2"
|
version = "0.1.3"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
repository = "https://github.com/lune-org/lune"
|
repository = "https://github.com/lune-org/lune"
|
||||||
|
@ -13,11 +13,11 @@ path = "src/lib.rs"
|
||||||
workspace = true
|
workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
mlua = { version = "0.9.7", features = ["luau"] }
|
mlua = { version = "0.9.9", features = ["luau"] }
|
||||||
mlua-luau-scheduler = { version = "0.0.2", path = "../mlua-luau-scheduler" }
|
mlua-luau-scheduler = { version = "0.0.2", path = "../mlua-luau-scheduler" }
|
||||||
|
|
||||||
once_cell = "1.17"
|
once_cell = "1.17"
|
||||||
rbx_cookie = { version = "0.1.4", default-features = false }
|
rbx_cookie = { version = "0.1.4", default-features = false }
|
||||||
|
|
||||||
lune-utils = { version = "0.1.2", path = "../lune-utils" }
|
lune-utils = { version = "0.1.3", path = "../lune-utils" }
|
||||||
lune-roblox = { version = "0.1.2", path = "../lune-roblox" }
|
lune-roblox = { version = "0.1.3", path = "../lune-roblox" }
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "lune-std-serde"
|
name = "lune-std-serde"
|
||||||
version = "0.1.1"
|
version = "0.1.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
repository = "https://github.com/lune-org/lune"
|
repository = "https://github.com/lune-org/lune"
|
||||||
|
@ -13,7 +13,7 @@ path = "src/lib.rs"
|
||||||
workspace = true
|
workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
mlua = { version = "0.9.7", features = ["luau", "serialize"] }
|
mlua = { version = "0.9.9", features = ["luau", "serialize"] }
|
||||||
|
|
||||||
async-compression = { version = "0.4", features = [
|
async-compression = { version = "0.4", features = [
|
||||||
"tokio",
|
"tokio",
|
||||||
|
@ -23,7 +23,7 @@ async-compression = { version = "0.4", features = [
|
||||||
"zlib",
|
"zlib",
|
||||||
] }
|
] }
|
||||||
bstr = "1.9"
|
bstr = "1.9"
|
||||||
lz4 = "1.24"
|
lz4 = "1.26"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_json = { version = "1.0", features = ["preserve_order"] }
|
serde_json = { version = "1.0", features = ["preserve_order"] }
|
||||||
serde_yaml = "0.9"
|
serde_yaml = "0.9"
|
||||||
|
@ -44,4 +44,4 @@ tokio = { version = "1", default-features = false, features = [
|
||||||
"io-util",
|
"io-util",
|
||||||
] }
|
] }
|
||||||
|
|
||||||
lune-utils = { version = "0.1.2", path = "../lune-utils" }
|
lune-utils = { version = "0.1.3", path = "../lune-utils" }
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "lune-std-stdio"
|
name = "lune-std-stdio"
|
||||||
version = "0.1.1"
|
version = "0.1.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
repository = "https://github.com/lune-org/lune"
|
repository = "https://github.com/lune-org/lune"
|
||||||
|
@ -14,7 +14,7 @@ workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
dialoguer = "0.11"
|
dialoguer = "0.11"
|
||||||
mlua = { version = "0.9.7", features = ["luau"] }
|
mlua = { version = "0.9.9", features = ["luau"] }
|
||||||
mlua-luau-scheduler = { version = "0.0.2", path = "../mlua-luau-scheduler" }
|
mlua-luau-scheduler = { version = "0.0.2", path = "../mlua-luau-scheduler" }
|
||||||
|
|
||||||
tokio = { version = "1", default-features = false, features = [
|
tokio = { version = "1", default-features = false, features = [
|
||||||
|
@ -22,4 +22,4 @@ tokio = { version = "1", default-features = false, features = [
|
||||||
"io-util",
|
"io-util",
|
||||||
] }
|
] }
|
||||||
|
|
||||||
lune-utils = { version = "0.1.2", path = "../lune-utils" }
|
lune-utils = { version = "0.1.3", path = "../lune-utils" }
|
||||||
|
|
|
@ -194,14 +194,14 @@ pub fn prompt(options: PromptOptions) -> LuaResult<PromptResult> {
|
||||||
prompt = prompt.default(b);
|
prompt = prompt.default(b);
|
||||||
};
|
};
|
||||||
let result = prompt
|
let result = prompt
|
||||||
.with_prompt(&options.text.expect("Missing text in prompt options"))
|
.with_prompt(options.text.expect("Missing text in prompt options"))
|
||||||
.interact()
|
.interact()
|
||||||
.into_lua_err()?;
|
.into_lua_err()?;
|
||||||
Ok(PromptResult::Boolean(result))
|
Ok(PromptResult::Boolean(result))
|
||||||
}
|
}
|
||||||
PromptKind::Select => {
|
PromptKind::Select => {
|
||||||
let chosen = Select::with_theme(&theme)
|
let chosen = Select::with_theme(&theme)
|
||||||
.with_prompt(&options.text.unwrap_or_default())
|
.with_prompt(options.text.unwrap_or_default())
|
||||||
.items(&options.options.expect("Missing options in prompt options"))
|
.items(&options.options.expect("Missing options in prompt options"))
|
||||||
.interact_opt()
|
.interact_opt()
|
||||||
.into_lua_err()?;
|
.into_lua_err()?;
|
||||||
|
@ -212,7 +212,7 @@ pub fn prompt(options: PromptOptions) -> LuaResult<PromptResult> {
|
||||||
}
|
}
|
||||||
PromptKind::MultiSelect => {
|
PromptKind::MultiSelect => {
|
||||||
let chosen = MultiSelect::with_theme(&theme)
|
let chosen = MultiSelect::with_theme(&theme)
|
||||||
.with_prompt(&options.text.unwrap_or_default())
|
.with_prompt(options.text.unwrap_or_default())
|
||||||
.items(&options.options.expect("Missing options in prompt options"))
|
.items(&options.options.expect("Missing options in prompt options"))
|
||||||
.interact_opt()
|
.interact_opt()
|
||||||
.into_lua_err()?;
|
.into_lua_err()?;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "lune-std-task"
|
name = "lune-std-task"
|
||||||
version = "0.1.1"
|
version = "0.1.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
repository = "https://github.com/lune-org/lune"
|
repository = "https://github.com/lune-org/lune"
|
||||||
|
@ -13,9 +13,9 @@ path = "src/lib.rs"
|
||||||
workspace = true
|
workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
mlua = { version = "0.9.7", features = ["luau"] }
|
mlua = { version = "0.9.9", features = ["luau"] }
|
||||||
mlua-luau-scheduler = { version = "0.0.2", path = "../mlua-luau-scheduler" }
|
mlua-luau-scheduler = { version = "0.0.2", path = "../mlua-luau-scheduler" }
|
||||||
|
|
||||||
tokio = { version = "1", default-features = false, features = ["time"] }
|
tokio = { version = "1", default-features = false, features = ["time"] }
|
||||||
|
|
||||||
lune-utils = { version = "0.1.2", path = "../lune-utils" }
|
lune-utils = { version = "0.1.3", path = "../lune-utils" }
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "lune-std"
|
name = "lune-std"
|
||||||
version = "0.1.3"
|
version = "0.1.4"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
repository = "https://github.com/lune-org/lune"
|
repository = "https://github.com/lune-org/lune"
|
||||||
|
@ -38,22 +38,22 @@ stdio = ["dep:lune-std-stdio"]
|
||||||
task = ["dep:lune-std-task"]
|
task = ["dep:lune-std-task"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
mlua = { version = "0.9.7", features = ["luau"] }
|
mlua = { version = "0.9.9", features = ["luau"] }
|
||||||
mlua-luau-scheduler = { version = "0.0.2", path = "../mlua-luau-scheduler" }
|
mlua-luau-scheduler = { version = "0.0.2", path = "../mlua-luau-scheduler" }
|
||||||
|
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
tokio = { version = "1", default-features = false, features = ["fs", "sync"] }
|
tokio = { version = "1", default-features = false, features = ["fs", "sync"] }
|
||||||
|
|
||||||
lune-utils = { version = "0.1.2", path = "../lune-utils" }
|
lune-utils = { version = "0.1.3", path = "../lune-utils" }
|
||||||
|
|
||||||
lune-std-datetime = { optional = true, version = "0.1.2", path = "../lune-std-datetime" }
|
lune-std-datetime = { optional = true, version = "0.1.3", path = "../lune-std-datetime" }
|
||||||
lune-std-fs = { optional = true, version = "0.1.1", path = "../lune-std-fs" }
|
lune-std-fs = { optional = true, version = "0.1.2", path = "../lune-std-fs" }
|
||||||
lune-std-luau = { optional = true, version = "0.1.1", path = "../lune-std-luau" }
|
lune-std-luau = { optional = true, version = "0.1.2", path = "../lune-std-luau" }
|
||||||
lune-std-net = { optional = true, version = "0.1.1", path = "../lune-std-net" }
|
lune-std-net = { optional = true, version = "0.1.2", path = "../lune-std-net" }
|
||||||
lune-std-process = { optional = true, version = "0.1.2", path = "../lune-std-process" }
|
lune-std-process = { optional = true, version = "0.1.3", path = "../lune-std-process" }
|
||||||
lune-std-regex = { optional = true, version = "0.1.1", path = "../lune-std-regex" }
|
lune-std-regex = { optional = true, version = "0.1.2", path = "../lune-std-regex" }
|
||||||
lune-std-roblox = { optional = true, version = "0.1.2", path = "../lune-std-roblox" }
|
lune-std-roblox = { optional = true, version = "0.1.3", path = "../lune-std-roblox" }
|
||||||
lune-std-serde = { optional = true, version = "0.1.1", path = "../lune-std-serde" }
|
lune-std-serde = { optional = true, version = "0.1.2", path = "../lune-std-serde" }
|
||||||
lune-std-stdio = { optional = true, version = "0.1.1", path = "../lune-std-stdio" }
|
lune-std-stdio = { optional = true, version = "0.1.2", path = "../lune-std-stdio" }
|
||||||
lune-std-task = { optional = true, version = "0.1.1", path = "../lune-std-task" }
|
lune-std-task = { optional = true, version = "0.1.2", path = "../lune-std-task" }
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "lune-utils"
|
name = "lune-utils"
|
||||||
version = "0.1.2"
|
version = "0.1.3"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
repository = "https://github.com/lune-org/lune"
|
repository = "https://github.com/lune-org/lune"
|
||||||
|
@ -13,7 +13,7 @@ path = "src/lib.rs"
|
||||||
workspace = true
|
workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
mlua = { version = "0.9.7", features = ["luau", "async"] }
|
mlua = { version = "0.9.9", features = ["luau", "async"] }
|
||||||
|
|
||||||
tokio = { version = "1", default-features = false, features = ["fs"] }
|
tokio = { version = "1", default-features = false, features = ["fs"] }
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ use std::fmt::{self, Write as _};
|
||||||
|
|
||||||
use mlua::prelude::*;
|
use mlua::prelude::*;
|
||||||
|
|
||||||
|
use super::metamethods::{call_table_tostring_metamethod, get_table_type_metavalue};
|
||||||
use super::{
|
use super::{
|
||||||
basic::{format_value_styled, lua_value_as_plain_string_key},
|
basic::{format_value_styled, lua_value_as_plain_string_key},
|
||||||
config::ValueFormatConfig,
|
config::ValueFormatConfig,
|
||||||
|
@ -46,7 +47,12 @@ pub(crate) fn format_value_recursive(
|
||||||
let mut buffer = String::new();
|
let mut buffer = String::new();
|
||||||
|
|
||||||
if let LuaValue::Table(ref t) = value {
|
if let LuaValue::Table(ref t) = value {
|
||||||
if depth >= config.max_depth {
|
if let Some(formatted) = format_typename_and_tostringed(
|
||||||
|
get_table_type_metavalue(t),
|
||||||
|
call_table_tostring_metamethod(t),
|
||||||
|
) {
|
||||||
|
write!(buffer, "{formatted}")?;
|
||||||
|
} else if depth >= config.max_depth {
|
||||||
write!(buffer, "{}", STYLE_DIM.apply_to("{ ... }"))?;
|
write!(buffer, "{}", STYLE_DIM.apply_to("{ ... }"))?;
|
||||||
} else if !visited.insert(LuaValueId::from(t)) {
|
} else if !visited.insert(LuaValueId::from(t)) {
|
||||||
write!(buffer, "{}", STYLE_DIM.apply_to("{ recursive }"))?;
|
write!(buffer, "{}", STYLE_DIM.apply_to("{ recursive }"))?;
|
||||||
|
@ -164,3 +170,15 @@ fn format_table(
|
||||||
})
|
})
|
||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn format_typename_and_tostringed(
|
||||||
|
typename: Option<String>,
|
||||||
|
tostringed: Option<String>,
|
||||||
|
) -> Option<String> {
|
||||||
|
match (typename, tostringed) {
|
||||||
|
(Some(typename), Some(tostringed)) => Some(format!("<{typename}({tostringed})>")),
|
||||||
|
(Some(typename), None) => Some(format!("<{typename}>")),
|
||||||
|
(None, Some(tostringed)) => Some(tostringed),
|
||||||
|
(None, None) => None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "lune"
|
name = "lune"
|
||||||
version = "0.8.6"
|
version = "0.8.7"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
repository = "https://github.com/lune-org/lune"
|
repository = "https://github.com/lune-org/lune"
|
||||||
|
@ -50,7 +50,7 @@ cli = ["dep:clap", "dep:include_dir", "dep:rustyline", "dep:zip_next"]
|
||||||
workspace = true
|
workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
mlua = { version = "0.9.7", features = ["luau"] }
|
mlua = { version = "0.9.9", features = ["luau"] }
|
||||||
mlua-luau-scheduler = { version = "0.0.2", path = "../mlua-luau-scheduler" }
|
mlua-luau-scheduler = { version = "0.0.2", path = "../mlua-luau-scheduler" }
|
||||||
|
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
|
@ -71,9 +71,9 @@ reqwest = { version = "0.11", default-features = false, features = [
|
||||||
"rustls-tls",
|
"rustls-tls",
|
||||||
] }
|
] }
|
||||||
|
|
||||||
lune-std = { optional = true, version = "0.1.3", path = "../lune-std" }
|
lune-std = { optional = true, version = "0.1.4", path = "../lune-std" }
|
||||||
lune-roblox = { optional = true, version = "0.1.2", path = "../lune-roblox" }
|
lune-roblox = { optional = true, version = "0.1.3", path = "../lune-roblox" }
|
||||||
lune-utils = { version = "0.1.2", path = "../lune-utils" }
|
lune-utils = { version = "0.1.3", path = "../lune-utils" }
|
||||||
|
|
||||||
### CLI
|
### CLI
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ futures-lite = "2.2"
|
||||||
rustc-hash = "1.1"
|
rustc-hash = "1.1"
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
|
|
||||||
mlua = { version = "0.9.6", features = [
|
mlua = { version = "0.9.9", features = [
|
||||||
"luau",
|
"luau",
|
||||||
"luau-jit",
|
"luau-jit",
|
||||||
"async",
|
"async",
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
std = "luau+lune"
|
|
||||||
|
|
||||||
exclude = ["luneTypes.d.luau"]
|
|
||||||
|
|
||||||
[lints]
|
|
||||||
high_cyclomatic_complexity = "warn"
|
|
Binary file not shown.
Loading…
Add table
Reference in a new issue