From cc573e3a213d4c1ff3efcee92762b2c0a42e3072 Mon Sep 17 00:00:00 2001 From: Miles Johnson Date: Mon, 5 Feb 2024 16:24:22 -0800 Subject: [PATCH] v0.14 (#98) --- CHANGELOG.md | 25 + Cargo.lock | 2126 +---------------- Cargo.toml | 4 +- crates/macros/src/common/field.rs | 5 +- crates/macros/src/config/field.rs | 2 +- crates/macros/src/config/variant.rs | 2 +- crates/schematic/Cargo.toml | 31 +- crates/schematic/src/merge.rs | 4 + crates/schematic/src/schema/mod.rs | 14 +- crates/schematic/src/schema/renderers/mod.rs | 14 +- crates/schematic/src/validate.rs | 184 -- crates/schematic/src/validate/email.rs | 12 + crates/schematic/src/validate/extends.rs | 66 + crates/schematic/src/validate/ip.rs | 32 + crates/schematic/src/validate/length.rs | 42 + crates/schematic/src/validate/mod.rs | 30 + crates/schematic/src/validate/number.rs | 13 + crates/schematic/src/validate/string.rs | 57 + crates/schematic/src/validate/url.rs | 31 + crates/schematic/tests/code_sources_test.rs | 4 +- crates/schematic/tests/defaults_test.rs | 4 +- crates/schematic/tests/env_test.rs | 4 +- crates/schematic/tests/extends_test.rs | 4 +- crates/schematic/tests/generator_test.rs | 8 +- crates/schematic/tests/macro_enum_test.rs | 15 +- crates/schematic/tests/macros_test.rs | 13 +- crates/schematic/tests/settings_test.rs | 6 +- ...generator_test__json_schema__defaults.snap | 23 - ...nerator_test__typescript__const_enums.snap | 4 - .../generator_test__typescript__defaults.snap | 4 - .../generator_test__typescript__enums.snap | 4 - ...erator_test__typescript__exclude_refs.snap | 4 - ...ator_test__typescript__external_types.snap | 4 - .../generator_test__typescript__no_refs.snap | 4 - ...ator_test__typescript__object_aliases.snap | 4 - ...nerator_test__typescript__value_enums.snap | 4 - crates/schematic/tests/validate_test.rs | 2 +- crates/schematic/tests/variants_test.rs | 20 +- crates/test-app/src/main.rs | 4 +- crates/types/Cargo.toml | 6 - crates/types/src/externals.rs | 17 - 41 files changed, 516 insertions(+), 2340 deletions(-) delete mode 100644 crates/schematic/src/validate.rs create mode 100644 crates/schematic/src/validate/email.rs create mode 100644 crates/schematic/src/validate/extends.rs create mode 100644 crates/schematic/src/validate/ip.rs create mode 100644 crates/schematic/src/validate/length.rs create mode 100644 crates/schematic/src/validate/mod.rs create mode 100644 crates/schematic/src/validate/number.rs create mode 100644 crates/schematic/src/validate/string.rs create mode 100644 crates/schematic/src/validate/url.rs diff --git a/CHANGELOG.md b/CHANGELOG.md index 4767da02..33bda635 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,30 @@ # Changelog +## Unreleased + +#### 💥 Breaking + +- Removed `type_version_spec` and `type_warpgate` features (use the `schematic` feature on those + crates instead). +- Renamed renderer related features: + - `json_schema` -> `renderer_json_schema` + - `template` -> `renderer_template` + - `typescript` -> `renderer_typescript` +- Added a 4th boolean argument to validator functions, which denotes whether its validating the + final config, or a partial config. This arg can be used to differentiate between the 2, change + logic, or avoid validating. + +#### 🚀 Updates + +- Added 4 new validator functions: + - `min_bytes` and `max_bytes` + - `min_chars` and `max_chars` + +#### ⚙️ Internal + +- Updated `garde` (validation) to v0.18. +- Updated `miette` to v7. + ## 0.13.7 #### 🚀 Updates diff --git a/Cargo.lock b/Cargo.lock index 7090c674..296795e7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -28,19 +28,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "ahash" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" -dependencies = [ - "cfg-if", - "getrandom", - "once_cell", - "version_check", - "zerocopy", -] - [[package]] name = "aho-corasick" version = "1.1.2" @@ -50,12 +37,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "ambient-authority" -version = "0.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9d4ee0d472d1cd2e28c97dfa124b3d8d992e10eb0a035f33f5d12e3a177ba3b" - [[package]] name = "android-tzdata" version = "0.1.1" @@ -73,21 +54,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" - -[[package]] -name = "anyhow" -version = "1.0.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" - -[[package]] -name = "arbitrary" -version = "1.3.2" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" [[package]] name = "arrayvec" @@ -125,17 +94,6 @@ dependencies = [ "tempfile", ] -[[package]] -name = "async-trait" -version = "0.1.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - [[package]] name = "autocfg" version = "1.1.0" @@ -172,15 +130,6 @@ version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - [[package]] name = "bitflags" version = "1.3.2" @@ -189,9 +138,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" [[package]] name = "bitvec" @@ -205,15 +154,6 @@ dependencies = [ "wyz", ] -[[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 = "borsh" version = "1.3.1" @@ -245,7 +185,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc" dependencies = [ "memchr", - "regex-automata 0.4.5", + "regex-automata", "serde", ] @@ -257,9 +197,9 @@ checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "bytecheck" -version = "0.6.11" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6372023ac861f6e6dc89c8344a8f398fb42aaba2b5dbc649ca0c0e9dbcb627" +checksum = "23cdc57ce23ac53c931e88a43d06d070a6fd142f2617be5855eb75efc9beb1c2" dependencies = [ "bytecheck_derive", "ptr_meta", @@ -268,110 +208,21 @@ dependencies = [ [[package]] name = "bytecheck_derive" -version = "0.6.11" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7ec4c6f261935ad534c0c22dbef2201b45918860eb1c574b972bd213a76af61" +checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" dependencies = [ "proc-macro2", "quote", "syn 1.0.109", ] -[[package]] -name = "bytemuck" -version = "1.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - [[package]] name = "bytes" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" -[[package]] -name = "cap-fs-ext" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88e341d15ac1029aadce600be764a1a1edafe40e03cde23285bc1d261b3a4866" -dependencies = [ - "cap-primitives", - "cap-std", - "io-lifetimes", - "windows-sys 0.52.0", -] - -[[package]] -name = "cap-net-ext" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "434168fe6533055f0f4204039abe3ff6d7db338ef46872a5fa39e9d5ad5ab7a9" -dependencies = [ - "cap-primitives", - "cap-std", - "rustix", - "smallvec", -] - -[[package]] -name = "cap-primitives" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe16767ed8eee6d3f1f00d6a7576b81c226ab917eb54b96e5f77a5216ef67abb" -dependencies = [ - "ambient-authority", - "fs-set-times", - "io-extras", - "io-lifetimes", - "ipnet", - "maybe-owned", - "rustix", - "windows-sys 0.52.0", - "winx", -] - -[[package]] -name = "cap-rand" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20e5695565f0cd7106bc3c7170323597540e772bb73e0be2cd2c662a0f8fa4ca" -dependencies = [ - "ambient-authority", - "rand", -] - -[[package]] -name = "cap-std" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "593db20e4c51f62d3284bae7ee718849c3214f93a3b94ea1899ad85ba119d330" -dependencies = [ - "cap-primitives", - "io-extras", - "io-lifetimes", - "rustix", -] - -[[package]] -name = "cap-time-ext" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03261630f291f425430a36f38c847828265bc928f517cdd2004c56f4b02f002b" -dependencies = [ - "ambient-authority", - "cap-primitives", - "iana-time-zone", - "once_cell", - "rustix", - "winx", -] - [[package]] name = "castaway" version = "0.2.2" @@ -381,31 +232,12 @@ dependencies = [ "rustversion", ] -[[package]] -name = "cbindgen" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da6bc11b07529f16944307272d5bd9b22530bc7d05751717c9d416586cedab49" -dependencies = [ - "heck", - "indexmap 1.9.3", - "log", - "proc-macro2", - "quote", - "serde", - "serde_json", - "syn 1.0.109", - "tempfile", - "toml 0.5.11", -] - [[package]] name = "cc" version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ - "jobserver", "libc", ] @@ -467,26 +299,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "const_format" -version = "0.2.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3a214c7af3d04997541b18d432afaff4c455e79e2029079647e72fc2bd27673" -dependencies = [ - "const_format_proc_macros", -] - -[[package]] -name = "const_format_proc_macros" -version = "0.2.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500" -dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", -] - [[package]] name = "convert_case" version = "0.6.0" @@ -512,142 +324,6 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" -[[package]] -name = "cpp_demangle" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeaa953eaad386a53111e47172c2fedba671e5684c8dd601a5f474f4f118710f" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "cpufeatures" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" -dependencies = [ - "libc", -] - -[[package]] -name = "cranelift-bforest" -version = "0.103.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c22542c0b95bd3302f7ed6839869c561f2324bac2fd5e7e99f5cfa65fdc8b92" -dependencies = [ - "cranelift-entity", -] - -[[package]] -name = "cranelift-codegen" -version = "0.103.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b3db903ef2e9c8a4de2ea6db5db052c7857282952f9df604aa55d169e6000d8" -dependencies = [ - "bumpalo", - "cranelift-bforest", - "cranelift-codegen-meta", - "cranelift-codegen-shared", - "cranelift-control", - "cranelift-entity", - "cranelift-isle", - "gimli", - "hashbrown 0.14.3", - "log", - "regalloc2", - "smallvec", - "target-lexicon", -] - -[[package]] -name = "cranelift-codegen-meta" -version = "0.103.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6590feb5a1d6438f974bf6a5ac4dddf69fca14e1f07f3265d880f69e61a94463" -dependencies = [ - "cranelift-codegen-shared", -] - -[[package]] -name = "cranelift-codegen-shared" -version = "0.103.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7239038c56fafe77fddc8788fc8533dd6c474dc5bdc5637216404f41ba807330" - -[[package]] -name = "cranelift-control" -version = "0.103.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7dc9c595341404d381d27a3d950160856b35b402275f0c3990cd1ad683c8053" -dependencies = [ - "arbitrary", -] - -[[package]] -name = "cranelift-entity" -version = "0.103.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44e3ee532fc4776c69bcedf7e62f9632cbb3f35776fa9a525cdade3195baa3f7" -dependencies = [ - "serde", - "serde_derive", -] - -[[package]] -name = "cranelift-frontend" -version = "0.103.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a612c94d09e653662ec37681dc2d6fd2b9856e6df7147be0afc9aabb0abf19df" -dependencies = [ - "cranelift-codegen", - "log", - "smallvec", - "target-lexicon", -] - -[[package]] -name = "cranelift-isle" -version = "0.103.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85db9830abeb1170b7d29b536ffd55af1d4d26ac8a77570b5d1aca003bf225cc" - -[[package]] -name = "cranelift-native" -version = "0.103.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301ef0edafeaeda5771a5d2db64ac53e1818ae3111220a185677025fe91db4a1" -dependencies = [ - "cranelift-codegen", - "libc", - "target-lexicon", -] - -[[package]] -name = "cranelift-wasm" -version = "0.103.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380f0abe8264e4570ac615fc31cef32a3b90a77f7eb97b08331f9dd357b1f500" -dependencies = [ - "cranelift-codegen", - "cranelift-entity", - "cranelift-frontend", - "itertools 0.10.5", - "log", - "smallvec", - "wasmparser 0.118.1", - "wasmtime-types", -] - -[[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-deque" version = "0.8.5" @@ -673,16 +349,6 @@ version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" -[[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 = "darling" version = "0.20.5" @@ -731,15 +397,6 @@ dependencies = [ "parking_lot_core", ] -[[package]] -name = "debugid" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" -dependencies = [ - "uuid", -] - [[package]] name = "diff" version = "0.1.13" @@ -752,53 +409,13 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", -] - -[[package]] -name = "directories-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc" -dependencies = [ - "cfg-if", - "dirs-sys-next", -] - -[[package]] -name = "dirs" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" -dependencies = [ - "dirs-sys 0.3.7", -] - [[package]] name = "dirs" version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" dependencies = [ - "dirs-sys 0.4.1", -] - -[[package]] -name = "dirs-sys" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" -dependencies = [ - "libc", - "redox_users", - "winapi", + "dirs-sys", ] [[package]] @@ -813,17 +430,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "dirs-sys-next" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - [[package]] name = "doc-comment" version = "0.3.3" @@ -836,12 +442,6 @@ version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" -[[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" @@ -874,101 +474,11 @@ dependencies = [ ] [[package]] -name = "extism" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5472dcd9d979ac3a094f1712dea48936a4ef7c35600184f89464c145c2e7dd1c" -dependencies = [ - "anyhow", - "cbindgen", - "extism-convert", - "extism-manifest", - "glob", - "libc", - "serde", - "serde_json", - "sha2", - "toml 0.8.9", - "tracing", - "tracing-subscriber", - "ureq", - "url", - "uuid", - "wasmtime", - "wasmtime-wasi", -] - -[[package]] -name = "extism-convert" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37b5889f52d54f53d540f4661af6122cb6443449a0c9111d5458383352aa2dda" -dependencies = [ - "anyhow", - "base64", - "bytemuck", - "prost", - "rmp-serde", - "serde", - "serde_json", -] - -[[package]] -name = "extism-manifest" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e977dc7c7b75e819b184f35a67c4922e5b2a5424fbdc5c4188e74991b9c9e199" -dependencies = [ - "base64", - "serde", - "serde_json", -] - -[[package]] -name = "fallible-iterator" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" - -[[package]] -name = "fastrand" -version = "2.0.1" +name = "fastrand" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" -[[package]] -name = "fd-lock" -version = "4.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e5768da2206272c81ef0b5e951a41862938a6070da63bcea197899942d3b947" -dependencies = [ - "cfg-if", - "rustix", - "windows-sys 0.52.0", -] - -[[package]] -name = "filetime" -version = "0.2.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "windows-sys 0.52.0", -] - -[[package]] -name = "flate2" -version = "1.0.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - [[package]] name = "float-cmp" version = "0.9.0" @@ -993,17 +503,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "fs-set-times" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "033b337d725b97690d86893f9de22b67b80dcc4e9ad815f348254c38119db8fb" -dependencies = [ - "io-lifetimes", - "rustix", - "windows-sys 0.52.0", -] - [[package]] name = "funty" version = "2.0.0" @@ -1087,33 +586,11 @@ dependencies = [ "slab", ] -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - -[[package]] -name = "fxprof-processed-profile" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27d12c0aed7f1e24276a241aadc4cb8ea9f83000f34bc062b7cc2d51e3b0fabd" -dependencies = [ - "bitflags 2.4.1", - "debugid", - "fxhash", - "serde", - "serde_json", -] - [[package]] name = "garde" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0237d668ccb63fd96dff6a81c5f37b7d984872f9584794dc1d1a62472d2c7b57" +checksum = "d5fa8fb3ffe035745c6194540b2064b2fe275f32367fbb4eb026024b7921e2e5" dependencies = [ "compact_str", "garde_derive", @@ -1125,9 +602,9 @@ dependencies = [ [[package]] name = "garde_derive" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a42efb40be9de1926cfd15881ff08adb7a70c6cedacced425537c8b1f96ac4f" +checksum = "9cf62650515830c41553b72bd49ec20fb120226f9277c7f2847f071cf998325b" dependencies = [ "proc-macro2", "quote", @@ -1135,16 +612,6 @@ dependencies = [ "syn 2.0.48", ] -[[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.2.12" @@ -1161,17 +628,6 @@ name = "gimli" version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" -dependencies = [ - "fallible-iterator", - "indexmap 2.2.2", - "stable_deref_trait", -] - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" @@ -1182,8 +638,8 @@ dependencies = [ "aho-corasick", "bstr", "log", - "regex-automata 0.4.5", - "regex-syntax 0.8.2", + "regex-automata", + "regex-syntax", ] [[package]] @@ -1192,16 +648,16 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf760ebf69878d9fd8f110c89703d90ce35095324d1f1edcb595c63945ee757" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "ignore", "walkdir", ] [[package]] name = "h2" -version = "0.3.23" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b553656127a00601c8ae5590fcfdc118e4083a7924b6cf4ffc1ea4b99dc429d7" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" dependencies = [ "bytes", "fnv", @@ -1209,7 +665,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.2.2", + "indexmap", "slab", "tokio", "tokio-util", @@ -1222,16 +678,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash 0.7.7", -] - -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash 0.8.7", + "ahash", ] [[package]] @@ -1239,21 +686,12 @@ name = "hashbrown" version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" -dependencies = [ - "ahash 0.8.7", -] - -[[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.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "d0c62115964e08cb8039170eb33c1d0e2388a256930279edca206fff675f82c3" [[package]] name = "http" @@ -1289,12 +727,6 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" -[[package]] -name = "human-sort" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "140a09c9305e6d5e557e2ed7cbc68e05765a7d4213975b87cb04920689cc6219" - [[package]] name = "hyper" version = "0.14.28" @@ -1335,9 +767,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.59" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1356,12 +788,6 @@ dependencies = [ "cc", ] -[[package]] -name = "id-arena" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" - [[package]] name = "ident_case" version = "1.0.1" @@ -1388,22 +814,12 @@ dependencies = [ "globset", "log", "memchr", - "regex-automata 0.4.5", + "regex-automata", "same-file", "walkdir", "winapi-util", ] -[[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.2.2" @@ -1428,62 +844,17 @@ dependencies = [ "yaml-rust", ] -[[package]] -name = "io-extras" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c301e73fb90e8a29e600a9f402d095765f74310d582916a952f618836a1bd1ed" -dependencies = [ - "io-lifetimes", - "windows-sys 0.52.0", -] - -[[package]] -name = "io-lifetimes" -version = "2.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a611371471e98973dbcab4e0ec66c31a10bc356eeb4d54a0e05eac8158fe38c" - [[package]] name = "ipnet" version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" -[[package]] -name = "is-terminal" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" -dependencies = [ - "hermit-abi", - "rustix", - "windows-sys 0.52.0", -] - [[package]] name = "is_ci" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "616cde7c720bb2bb5824a224687d8f77bfd38922027f01d825cd7453be5099fb" - -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.11.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" -dependencies = [ - "either", -] +checksum = "7655c9839580ee829dfacba1d1278c2b7883e50a277ff7541299489d6bdfdc45" [[package]] name = "itoa" @@ -1491,35 +862,6 @@ version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" -[[package]] -name = "ittapi" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b996fe614c41395cdaedf3cf408a9534851090959d90d54a535f675550b64b1" -dependencies = [ - "anyhow", - "ittapi-sys", - "log", -] - -[[package]] -name = "ittapi-sys" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52f5385394064fa2c886205dba02598013ce83d3e92d33dbdc0c52fe0e7bf4fc" -dependencies = [ - "cc", -] - -[[package]] -name = "jobserver" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" -dependencies = [ - "libc", -] - [[package]] name = "js-sys" version = "0.3.67" @@ -1529,29 +871,17 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "json_comments" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dbbfed4e59ba9750e15ba154fdfd9329cee16ff3df539c2666b70f58cc32105" - [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -[[package]] -name = "leb128" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" - [[package]] name = "libc" -version = "0.2.152" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libredox" @@ -1559,7 +889,7 @@ version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "libc", "redox_syscall", ] @@ -1572,9 +902,9 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "lock_api" @@ -1592,76 +922,21 @@ version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" -[[package]] -name = "lzma-sys" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fda04ab3764e6cde78b9974eec4f779acaba7c4e84b36eca3cf77c581b85d27" -dependencies = [ - "cc", - "libc", - "pkg-config", -] - -[[package]] -name = "mach" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" -dependencies = [ - "libc", -] - -[[package]] -name = "matchers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" -dependencies = [ - "regex-automata 0.1.10", -] - -[[package]] -name = "maybe-owned" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4facc753ae494aeb6e3c22f839b158aebd4f9270f55cd3c79906c45476c47ab4" - [[package]] name = "memchr" version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" -[[package]] -name = "memfd" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" -dependencies = [ - "rustix", -] - -[[package]] -name = "memoffset" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" -dependencies = [ - "autocfg", -] - [[package]] name = "miette" -version = "5.10.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59bb584eaeeab6bd0226ccf3509a69d7936d148cf3d036ad350abe35e8c6856e" +checksum = "98a72adfa0c7ae88ba0abcbd00047a476616c66b831d628b8ac7f1e9de0cfd67" dependencies = [ "backtrace", "backtrace-ext", - "is-terminal", "miette-derive", - "once_cell", "owo-colors", "supports-color", "supports-hyperlinks", @@ -1674,9 +949,9 @@ dependencies = [ [[package]] name = "miette-derive" -version = "5.10.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" +checksum = "279def6bf114a34b3cf887489eb440d4dfcf709ab3ce9955e4a6f957ce5cce77" dependencies = [ "proc-macro2", "quote", @@ -1689,17 +964,11 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" dependencies = [ "adler", ] @@ -1715,32 +984,12 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - [[package]] name = "normalize-line-endings" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" -[[package]] -name = "nu-ansi-term" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" -dependencies = [ - "overload", - "winapi", -] - [[package]] name = "num-traits" version = "0.2.17" @@ -1766,9 +1015,6 @@ version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ - "crc32fast", - "hashbrown 0.14.3", - "indexmap 2.2.2", "memchr", ] @@ -1778,18 +1024,6 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" -[[package]] -name = "once_map" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f2d1d09016ea926b4a8c89938674322fca80bc139d605b21a574c0ce1000a19" -dependencies = [ - "ahash 0.8.7", - "hashbrown 0.14.3", - "parking_lot", - "stable_deref_trait", -] - [[package]] name = "openssl-probe" version = "0.1.5" @@ -1802,17 +1036,11 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - [[package]] name = "owo-colors" -version = "3.5.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" +checksum = "caff54706df99d2a78a5a4e3455ff45448d81ef1bb63c22cd14052ca0e993a3f" [[package]] name = "parking_lot" @@ -1837,12 +1065,6 @@ dependencies = [ "windows-targets 0.48.5", ] -[[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.1" @@ -1862,29 +1084,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] -name = "pkg-config" -version = "0.3.28" +name = "ppv-lite86" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] -name = "pori" -version = "0.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a63d338dec139f56dacc692ca63ad35a6be6a797442479b55acd611d79e906" -dependencies = [ - "nom", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "predicates" -version = "3.1.0" +name = "predicates" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68b87bfd4605926cdfefc1c3b5f8fe560e3feca9d5552cf68c466d3d8236c7e8" dependencies = [ @@ -1924,11 +1131,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b2685dd208a3771337d8d386a89840f0f43cd68be8dae90a5f8c2384effc9cd" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ - "toml_edit", + "toml_edit 0.21.1", ] [[package]] @@ -1963,38 +1170,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "prost" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" -dependencies = [ - "bytes", - "prost-derive", -] - -[[package]] -name = "prost-derive" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" -dependencies = [ - "anyhow", - "itertools 0.11.0", - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "psm" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" -dependencies = [ - "cc", -] - [[package]] name = "ptr_meta" version = "0.1.4" @@ -2060,26 +1235,6 @@ dependencies = [ "getrandom", ] -[[package]] -name = "rayon" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" -dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -] - [[package]] name = "redox_syscall" version = "0.4.1" @@ -2100,19 +1255,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "regalloc2" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad156d539c879b7a24a363a2016d77961786e71f48f2e2fc8302a92abd2429a6" -dependencies = [ - "hashbrown 0.13.2", - "log", - "rustc-hash", - "slice-group-by", - "smallvec", -] - [[package]] name = "regex" version = "1.10.3" @@ -2121,17 +1263,8 @@ checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.5", - "regex-syntax 0.8.2", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", + "regex-automata", + "regex-syntax", ] [[package]] @@ -2142,15 +1275,9 @@ checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.2", + "regex-syntax", ] -[[package]] -name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - [[package]] name = "regex-syntax" version = "0.8.2" @@ -2168,9 +1295,9 @@ dependencies = [ [[package]] name = "rend" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2571463863a6bd50c32f94402933f03457a3fbaf697a707c5be741e459f08fd" +checksum = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c" dependencies = [ "bytecheck", ] @@ -2232,9 +1359,9 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.43" +version = "0.7.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "527a97cdfef66f65998b5f3b637c26f5a5ec09cc52a3f9932313ac645f4190f5" +checksum = "5cba464629b3394fc4dbc6f940ff8f5b4ff5c7aef40f29166fd4ad12acbc99c0" dependencies = [ "bitvec", "bytecheck", @@ -2250,37 +1377,15 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.43" +version = "0.7.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5c462a1328c8e67e4d6dbad1eb0355dd43e8ab432c6e227a43657f16ade5033" +checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65" dependencies = [ "proc-macro2", "quote", "syn 1.0.109", ] -[[package]] -name = "rmp" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9860a6cc38ed1da53456442089b4dfa35e7cedaa326df63017af88385e6b20" -dependencies = [ - "byteorder", - "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", - "rmp", - "serde", -] - [[package]] name = "rust_decimal" version = "1.34.2" @@ -2303,24 +1408,16 @@ 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 = "rustix" -version = "0.38.30" +version = "0.38.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" +checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "errno", - "itoa", "libc", "linux-raw-sys", - "once_cell", "windows-sys 0.52.0", ] @@ -2414,7 +1511,7 @@ version = "0.13.7" dependencies = [ "chrono", "garde", - "indexmap 2.2.2", + "indexmap", "miette", "regex", "relative-path", @@ -2431,13 +1528,11 @@ dependencies = [ "serde_yaml", "serial_test", "starbase_sandbox", - "starbase_styles 0.2.0", + "starbase_styles", "thiserror", - "toml 0.8.9", + "toml", "tracing", "url", - "version_spec", - "warpgate", ] [[package]] @@ -2456,7 +1551,7 @@ name = "schematic_types" version = "0.5.5" dependencies = [ "chrono", - "indexmap 2.2.2", + "indexmap", "regex", "relative-path", "rust_decimal", @@ -2464,10 +1559,8 @@ dependencies = [ "semver", "serde_json", "serde_yaml", - "toml 0.8.9", + "toml", "url", - "version_spec", - "warpgate", ] [[package]] @@ -2592,7 +1685,7 @@ version = "0.9.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adf8a49373e98a4c5f0ceb5d05aa7c648d75f63774981ed95b7c7443bbd50c6e" dependencies = [ - "indexmap 2.2.2", + "indexmap", "itoa", "ryu", "serde", @@ -2624,41 +1717,6 @@ dependencies = [ "syn 2.0.48", ] -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "sharded-slab" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "shell-words" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" - -[[package]] -name = "shellexpand" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ccc8076840c4da029af4f87e4e8daeb0fca6b87bbb02e10cb60b791450e11e4" -dependencies = [ - "dirs 4.0.0", -] - [[package]] name = "simdutf8" version = "0.1.4" @@ -2680,17 +1738,11 @@ dependencies = [ "autocfg", ] -[[package]] -name = "slice-group-by" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" - [[package]] name = "smallvec" -version = "1.12.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2593d31f82ead8df961d8bd23a64c2ccf2eb5dd34b0a34bfb4dd54011c72009e" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "smawk" @@ -2714,42 +1766,11 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -[[package]] -name = "sptr" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9b39299b249ad65f3b7e96443bad61c02ca5cd3589f46cb6d610a0fd6c0d6a" - -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "starbase_archive" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4a0d1c404d4e987597b018bee76fb8e79937f3b2ab0cf5963ce043031092694" -dependencies = [ - "flate2", - "miette", - "rustc-hash", - "starbase_styles 0.1.18", - "starbase_utils 0.3.11", - "tar", - "thiserror", - "tracing", - "xz2", - "zip", - "zstd 0.13.0", -] - [[package]] name = "starbase_sandbox" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "748e774a71b67ddc32cf643c362532cc89b3d8bdb1664810054621b1222254b0" +checksum = "46c13185a91009f058c1649eb9692957e3e78398d98a89ed5fc9c3e24844e9c7" dependencies = [ "assert_cmd", "assert_fs", @@ -2758,62 +1779,30 @@ dependencies = [ "once_cell", "predicates", "pretty_assertions", - "starbase_utils 0.4.2", -] - -[[package]] -name = "starbase_styles" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aadf4bb3f99ac3782017aa75123781dd64de38b543469c6b9e96ca9f29fc4868" -dependencies = [ - "dirs 5.0.1", - "owo-colors", - "supports-color", + "starbase_utils", ] [[package]] name = "starbase_styles" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e27efc120aa8c888aff0f996a7adb8cf0d686e4839af033c324e2f3d4955f70" +checksum = "0e06fa37c027e48ef341787d8c3d26cfbe8507aa4e2e8c61fcba82fe931bb598" dependencies = [ - "dirs 5.0.1", + "dirs", "owo-colors", "supports-color", ] [[package]] name = "starbase_utils" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9af464d976956393070880234f8d9f3509f04555266174abfd9b11386cdce4bc" -dependencies = [ - "dirs 5.0.1", - "json_comments", - "miette", - "once_cell", - "regex", - "relative-path", - "serde", - "serde_json", - "starbase_styles 0.1.18", - "thiserror", - "toml 0.8.9", - "tracing", - "wax", -] - -[[package]] -name = "starbase_utils" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f8f5278795a3a700dff9c6af197fb1c81d69f7b9e0d12dda5d2f4bea03766a3" +checksum = "f23570a8fa500ad7ccb3bbfed7d9dc759b657ed536fb9b10eec729ad9de1b60e" dependencies = [ - "dirs 5.0.1", + "dirs", "once_cell", "relative-path", - "starbase_styles 0.2.0", + "starbase_styles", "thiserror", "tracing", ] @@ -2832,31 +1821,24 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "supports-color" -version = "2.1.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6398cde53adc3c4557306a96ce67b302968513830a77a95b2b17305d9719a89" +checksum = "9829b314621dfc575df4e409e79f9d6a66a3bd707ab73f23cb4aa3a854ac854f" dependencies = [ - "is-terminal", "is_ci", ] [[package]] name = "supports-hyperlinks" -version = "2.1.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84231692eb0d4d41e4cdd0cabfdd2e6cd9e255e65f80c9aa7c98dd502b4233d" -dependencies = [ - "is-terminal", -] +checksum = "2c0a1e5168041f5f3ff68ff7d95dcb9c8749df29f6e7e89ada40dd4c9de404ee" [[package]] name = "supports-unicode" -version = "2.0.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b6c2cb240ab5dd21ed4906895ee23fe5a48acdbd15a3ce388e7b62a9b66baf7" -dependencies = [ - "is-terminal", -] +checksum = "b7401a30af6cb5818bb64852270bb722533397edcfc7344954a38f420819ece2" [[package]] name = "syn" @@ -2919,88 +1901,32 @@ dependencies = [ "libc", ] -[[package]] -name = "system-interface" -version = "0.26.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0682e006dd35771e392a6623ac180999a9a854b1d4a6c12fb2e804941c2b1f58" -dependencies = [ - "bitflags 2.4.1", - "cap-fs-ext", - "cap-std", - "fd-lock", - "io-lifetimes", - "rustix", - "windows-sys 0.52.0", - "winx", -] - -[[package]] -name = "system_env" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dbaf08f70781cb6543bb0cce3d6b63a50cce05f4b071db833d78426f072ef7b" -dependencies = [ - "serde", - "serde_json", - "shell-words", - "thiserror", -] - [[package]] name = "tap" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" -[[package]] -name = "tar" -version = "0.4.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" -dependencies = [ - "filetime", - "libc", - "xattr", -] - -[[package]] -name = "tardar" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900c942f83b6a8b9998cc8f74ad3ffa24b7ff3c4279ea1c1c52d95dced9f3516" -dependencies = [ - "miette", - "vec1", -] - -[[package]] -name = "target-lexicon" -version = "0.12.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" - [[package]] name = "tempfile" -version = "3.9.0" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" +checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" dependencies = [ "cfg-if", "fastrand", - "redox_syscall", "rustix", "windows-sys 0.52.0", ] [[package]] name = "terminal_size" -version = "0.1.17" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" +checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" dependencies = [ - "libc", - "winapi", + "rustix", + "windows-sys 0.48.0", ] [[package]] @@ -3024,9 +1950,9 @@ dependencies = [ [[package]] name = "textwrap" -version = "0.15.2" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7b3e525a49ec206798b40326a44121291b530c963cfb01018f63e135bac543d" +checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" dependencies = [ "smawk", "unicode-linebreak", @@ -3053,16 +1979,6 @@ dependencies = [ "syn 2.0.48", ] -[[package]] -name = "thread_local" -version = "1.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" -dependencies = [ - "cfg-if", - "once_cell", -] - [[package]] name = "tinyvec" version = "1.6.0" @@ -3080,9 +1996,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.35.1" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" +checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" dependencies = [ "backtrace", "bytes", @@ -3120,23 +2036,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - -[[package]] -name = "toml" -version = "0.8.9" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6a4b9e8023eb94392d3dca65d717c53abc5dad49c07cb65bb8fcd87115fa325" +checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit", + "toml_edit 0.22.0", ] [[package]] @@ -3154,7 +2061,18 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "indexmap 2.2.2", + "indexmap", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8dc77def39ce6079c2d0c866cc20848f591b1898f153c9fe7c4f29e1154510b" +dependencies = [ + "indexmap", "serde", "serde_spanned", "toml_datetime", @@ -3173,7 +2091,6 @@ version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -3197,36 +2114,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", - "valuable", -] - -[[package]] -name = "tracing-log" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" -dependencies = [ - "log", - "once_cell", - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" -dependencies = [ - "matchers", - "nu-ansi-term", - "once_cell", - "regex", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", ] [[package]] @@ -3235,17 +2122,11 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - [[package]] name = "unicode-bidi" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" @@ -3280,12 +2161,6 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" -[[package]] -name = "unicode-xid" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" - [[package]] name = "unsafe-libyaml" version = "0.2.10" @@ -3298,22 +2173,6 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" -[[package]] -name = "ureq" -version = "2.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8cdd25c339e200129fe4de81451814e5228c9b771d57378817d6117cc2b3f97" -dependencies = [ - "base64", - "flate2", - "log", - "once_cell", - "rustls", - "rustls-webpki", - "url", - "webpki-roots", -] - [[package]] name = "url" version = "2.5.0" @@ -3328,24 +2187,9 @@ dependencies = [ [[package]] name = "uuid" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" -dependencies = [ - "getrandom", -] - -[[package]] -name = "valuable" -version = "0.1.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" - -[[package]] -name = "vec1" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bda7c41ca331fe9a1c278a9e7ee055f4be7f5eb1c2b72f079b4ff8b5fce9d5c" +checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" [[package]] name = "version_check" @@ -3353,18 +2197,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "version_spec" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28f9327e7b3c0554ec9291491b8e16bf693d35ea18ba4173efbcf2e76078c91f" -dependencies = [ - "human-sort", - "regex", - "semver", - "serde", -] - [[package]] name = "wait-timeout" version = "0.2.0" @@ -3393,94 +2225,12 @@ dependencies = [ "try-lock", ] -[[package]] -name = "warpgate" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8b7164a23f2561bbfecb7a304ca83d0381742fd8aa02da2bebfbb623cce5f1d" -dependencies = [ - "extism", - "miette", - "once_cell", - "once_map", - "regex", - "reqwest", - "rustc-hash", - "serde", - "serde_json", - "sha2", - "starbase_archive", - "starbase_styles 0.1.18", - "starbase_utils 0.3.11", - "system_env", - "thiserror", - "tracing", - "warpgate_api", -] - -[[package]] -name = "warpgate_api" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8447cf00028d12898929b70a9ed8e3e6f5975f0cfde155dd1f5ef2b96aef80d5" -dependencies = [ - "anyhow", - "rustc-hash", - "serde", - "serde_json", - "system_env", - "thiserror", -] - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" -[[package]] -name = "wasi-cap-std-sync" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "154528979a211aa28d969846e883df75705809ed9bcc70aba61460683ea7355b" -dependencies = [ - "anyhow", - "async-trait", - "cap-fs-ext", - "cap-rand", - "cap-std", - "cap-time-ext", - "fs-set-times", - "io-extras", - "io-lifetimes", - "once_cell", - "rustix", - "system-interface", - "tracing", - "wasi-common", - "windows-sys 0.48.0", -] - -[[package]] -name = "wasi-common" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d888b611fee7d273dd057dc009d2dd3132736f36710ffd65657ac83628d1e3b" -dependencies = [ - "anyhow", - "bitflags 2.4.1", - "cap-rand", - "cap-std", - "io-extras", - "log", - "rustix", - "thiserror", - "tracing", - "wasmtime", - "wiggle", - "windows-sys 0.48.0", -] - [[package]] name = "wasm-bindgen" version = "0.2.90" @@ -3547,444 +2297,6 @@ version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" -[[package]] -name = "wasm-encoder" -version = "0.38.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad2b51884de9c7f4fe2fd1043fccb8dcad4b1e29558146ee57a144d15779f3f" -dependencies = [ - "leb128", -] - -[[package]] -name = "wasm-encoder" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "111495d6204760238512f57a9af162f45086504da332af210f2f75dd80b34f1d" -dependencies = [ - "leb128", -] - -[[package]] -name = "wasmparser" -version = "0.118.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ee9723b928e735d53000dec9eae7b07a60e490c85ab54abb66659fc61bfcd9" -dependencies = [ - "indexmap 2.2.2", - "semver", -] - -[[package]] -name = "wasmparser" -version = "0.119.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c35daf77afb4f9b14016625144a391085ec2ca99ca9cc53ed291bb53ab5278d" -dependencies = [ - "bitflags 2.4.1", - "indexmap 2.2.2", - "semver", -] - -[[package]] -name = "wasmprinter" -version = "0.2.76" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cac2a7745372074e5573e365e17100f5a26058740576313784ef03fb900ea8d2" -dependencies = [ - "anyhow", - "wasmparser 0.119.0", -] - -[[package]] -name = "wasmtime" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8e539fded2495422ea3c4dfa7beeddba45904eece182cf315294009e1a323bf" -dependencies = [ - "anyhow", - "async-trait", - "bincode", - "bumpalo", - "cfg-if", - "encoding_rs", - "fxprof-processed-profile", - "indexmap 2.2.2", - "libc", - "log", - "object", - "once_cell", - "paste", - "rayon", - "serde", - "serde_derive", - "serde_json", - "target-lexicon", - "wasm-encoder 0.38.1", - "wasmparser 0.118.1", - "wasmtime-cache", - "wasmtime-component-macro", - "wasmtime-component-util", - "wasmtime-cranelift", - "wasmtime-environ", - "wasmtime-fiber", - "wasmtime-jit", - "wasmtime-runtime", - "wasmtime-winch", - "wat", - "windows-sys 0.48.0", -] - -[[package]] -name = "wasmtime-asm-macros" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "660ba9143e15a2acd921820df221b73aee256bd3ca2d208d73d8adc9587ccbb9" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "wasmtime-cache" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3ce373743892002f9391c6741ef0cb0335b55ec899d874f311222b7e36f4594" -dependencies = [ - "anyhow", - "base64", - "bincode", - "directories-next", - "log", - "rustix", - "serde", - "serde_derive", - "sha2", - "toml 0.5.11", - "windows-sys 0.48.0", - "zstd 0.11.2+zstd.1.5.2", -] - -[[package]] -name = "wasmtime-component-macro" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ef32643324e564e1c359e9044daa06cbf90d7e2d6c99a738d17a12959f01a5" -dependencies = [ - "anyhow", - "proc-macro2", - "quote", - "syn 2.0.48", - "wasmtime-component-util", - "wasmtime-wit-bindgen", - "wit-parser", -] - -[[package]] -name = "wasmtime-component-util" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c87d06c18d21a4818f354c00a85f4ebc62b2270961cd022968452b0e4dbed9d" - -[[package]] -name = "wasmtime-cranelift" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d648c8b4064a7911093b02237cd5569f71ca171d3a0a486bf80600b19e1cba2" -dependencies = [ - "anyhow", - "cfg-if", - "cranelift-codegen", - "cranelift-control", - "cranelift-entity", - "cranelift-frontend", - "cranelift-native", - "cranelift-wasm", - "gimli", - "log", - "object", - "target-lexicon", - "thiserror", - "wasmparser 0.118.1", - "wasmtime-cranelift-shared", - "wasmtime-environ", - "wasmtime-versioned-export-macros", -] - -[[package]] -name = "wasmtime-cranelift-shared" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290a89027688782da8ff60b12bb95695494b1874e0d0ba2ba387d23dace6d70c" -dependencies = [ - "anyhow", - "cranelift-codegen", - "cranelift-control", - "cranelift-native", - "gimli", - "object", - "target-lexicon", - "wasmtime-environ", -] - -[[package]] -name = "wasmtime-environ" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61eb64fb3e0da883e2df4a13a81d6282e072336e6cb6295021d0f7ab2e352754" -dependencies = [ - "anyhow", - "cranelift-entity", - "gimli", - "indexmap 2.2.2", - "log", - "object", - "serde", - "serde_derive", - "target-lexicon", - "thiserror", - "wasm-encoder 0.38.1", - "wasmparser 0.118.1", - "wasmprinter", - "wasmtime-component-util", - "wasmtime-types", -] - -[[package]] -name = "wasmtime-fiber" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecf1d3a838b0956b71ad3f8cb80069a228339775bf02dd35d86a5a68bbe443" -dependencies = [ - "anyhow", - "cc", - "cfg-if", - "rustix", - "wasmtime-asm-macros", - "wasmtime-versioned-export-macros", - "windows-sys 0.48.0", -] - -[[package]] -name = "wasmtime-jit" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f485336add49267d8859e8f8084d2d4b9a4b1564496b6f30ba5b168d50c10ceb" -dependencies = [ - "addr2line", - "anyhow", - "bincode", - "cfg-if", - "cpp_demangle", - "gimli", - "ittapi", - "log", - "object", - "rustc-demangle", - "rustix", - "serde", - "serde_derive", - "target-lexicon", - "wasmtime-environ", - "wasmtime-jit-debug", - "wasmtime-jit-icache-coherence", - "wasmtime-runtime", - "windows-sys 0.48.0", -] - -[[package]] -name = "wasmtime-jit-debug" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e119affec40edb2fab9044f188759a00c2df9c3017278d047012a2de1efb4f" -dependencies = [ - "object", - "once_cell", - "rustix", - "wasmtime-versioned-export-macros", -] - -[[package]] -name = "wasmtime-jit-icache-coherence" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b6d197fcc34ad32ed440e1f9552fd57d1f377d9699d31dee1b5b457322c1f8a" -dependencies = [ - "cfg-if", - "libc", - "windows-sys 0.48.0", -] - -[[package]] -name = "wasmtime-runtime" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "794b2bb19b99ef8322ff0dd9fe1ba7e19c41036dfb260b3f99ecce128c42ff92" -dependencies = [ - "anyhow", - "cc", - "cfg-if", - "encoding_rs", - "indexmap 2.2.2", - "libc", - "log", - "mach", - "memfd", - "memoffset", - "paste", - "psm", - "rustix", - "sptr", - "wasm-encoder 0.38.1", - "wasmtime-asm-macros", - "wasmtime-environ", - "wasmtime-fiber", - "wasmtime-jit-debug", - "wasmtime-versioned-export-macros", - "wasmtime-wmemcheck", - "windows-sys 0.48.0", -] - -[[package]] -name = "wasmtime-types" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d995db8bb56f2cd8d2dc0ed5ffab94ffb435283b0fe6747f80f7aab40b2d06a1" -dependencies = [ - "cranelift-entity", - "serde", - "serde_derive", - "thiserror", - "wasmparser 0.118.1", -] - -[[package]] -name = "wasmtime-versioned-export-macros" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55c5565959287c21dd0f4277ae3518dd2ae62679f655ee2dbc4396e19d210db" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "wasmtime-wasi" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd8370078149d49a3a47e93741553fd79b700421464b6a27ca32718192ab130" -dependencies = [ - "anyhow", - "async-trait", - "bitflags 2.4.1", - "bytes", - "cap-fs-ext", - "cap-net-ext", - "cap-rand", - "cap-std", - "cap-time-ext", - "fs-set-times", - "futures", - "io-extras", - "io-lifetimes", - "libc", - "log", - "once_cell", - "rustix", - "system-interface", - "thiserror", - "tokio", - "tracing", - "url", - "wasi-cap-std-sync", - "wasi-common", - "wasmtime", - "wiggle", - "windows-sys 0.48.0", -] - -[[package]] -name = "wasmtime-winch" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6f945ff9bad96e0a69973d74f193c19f627c8adbf250e7cb73ae7564b6cc8a" -dependencies = [ - "anyhow", - "cranelift-codegen", - "gimli", - "object", - "target-lexicon", - "wasmparser 0.118.1", - "wasmtime-cranelift-shared", - "wasmtime-environ", - "winch-codegen", -] - -[[package]] -name = "wasmtime-wit-bindgen" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f328b2d4a690270324756e886ed5be3a4da4c00be0eea48253f4595ad068062b" -dependencies = [ - "anyhow", - "heck", - "indexmap 2.2.2", - "wit-parser", -] - -[[package]] -name = "wasmtime-wmemcheck" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67761d8f8c0b3c13a5d34356274b10a40baba67fe9cfabbfc379a8b414e45de2" - -[[package]] -name = "wast" -version = "35.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ef140f1b49946586078353a453a1d28ba90adfc54dde75710bc1931de204d68" -dependencies = [ - "leb128", -] - -[[package]] -name = "wast" -version = "70.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ee4bc54bbe1c6924160b9f75e374a1d07532e7580eb632c0ee6cdd109bb217e" -dependencies = [ - "leb128", - "memchr", - "unicode-width", - "wasm-encoder 0.39.0", -] - -[[package]] -name = "wat" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f0dce8cdc288c717cf01e461a1e451a7b8445d53451123536ba576e423a101a" -dependencies = [ - "wast 70.0.0", -] - -[[package]] -name = "wax" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d12a78aa0bab22d2f26ed1a96df7ab58e8a93506a3e20adb47c51a93b4e1357" -dependencies = [ - "const_format", - "itertools 0.11.0", - "miette", - "nom", - "pori", - "regex", - "tardar", - "thiserror", - "walkdir", -] - [[package]] name = "web-sys" version = "0.3.67" @@ -3995,54 +2307,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki-roots" -version = "0.25.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" - -[[package]] -name = "wiggle" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0afb26cd3269289bb314a361ff0a6685e5ce793b62181a9fe3f81ace15051697" -dependencies = [ - "anyhow", - "async-trait", - "bitflags 2.4.1", - "thiserror", - "tracing", - "wasmtime", - "wiggle-macro", -] - -[[package]] -name = "wiggle-generate" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cef2868fed7584d2b552fa317104858ded80021d23b073b2d682d3c932a027bd" -dependencies = [ - "anyhow", - "heck", - "proc-macro2", - "quote", - "shellexpand", - "syn 2.0.48", - "witx", -] - -[[package]] -name = "wiggle-macro" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31ae1ec11a17ea481539ee9a5719a278c9790d974060fbf71db4b2c05378780b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", - "wiggle-generate", -] - [[package]] name = "winapi" version = "0.3.9" @@ -4074,22 +2338,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "winch-codegen" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58e58c236a6abdd9ab454552b4f29e16cfa837a86897c1503313b2e62e7609ec" -dependencies = [ - "anyhow", - "cranelift-codegen", - "gimli", - "regalloc2", - "smallvec", - "target-lexicon", - "wasmparser 0.118.1", - "wasmtime-environ", -] - [[package]] name = "windows-core" version = "0.52.0" @@ -4233,9 +2481,9 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.34" +version = "0.5.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16" +checksum = "a7cad8365489051ae9f054164e459304af2e7e9bb407c958076c8bf4aef52da5" dependencies = [ "memchr", ] @@ -4250,45 +2498,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "winx" -version = "0.36.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9643b83820c0cd246ecabe5fa454dd04ba4fa67996369466d0747472d337346" -dependencies = [ - "bitflags 2.4.1", - "windows-sys 0.52.0", -] - -[[package]] -name = "wit-parser" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df4913a2219096373fd6512adead1fb77ecdaa59d7fc517972a7d30b12f625be" -dependencies = [ - "anyhow", - "id-arena", - "indexmap 2.2.2", - "log", - "semver", - "serde", - "serde_derive", - "serde_json", - "unicode-xid", -] - -[[package]] -name = "witx" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e366f27a5cabcddb2706a78296a40b8fcc451e1a6aba2fc1d94b4a01bdaaef4b" -dependencies = [ - "anyhow", - "log", - "thiserror", - "wast 35.0.2", -] - [[package]] name = "wyz" version = "0.5.1" @@ -4298,26 +2507,6 @@ dependencies = [ "tap", ] -[[package]] -name = "xattr" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" -dependencies = [ - "libc", - "linux-raw-sys", - "rustix", -] - -[[package]] -name = "xz2" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388c44dc09d76f1536602ead6d325eb532f5c122f17782bd57fb47baeeb767e2" -dependencies = [ - "lzma-sys", -] - [[package]] name = "yaml-rust" version = "0.4.5" @@ -4332,82 +2521,3 @@ name = "yansi" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" - -[[package]] -name = "zerocopy" -version = "0.7.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "zip" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" -dependencies = [ - "byteorder", - "crc32fast", - "crossbeam-utils", - "flate2", -] - -[[package]] -name = "zstd" -version = "0.11.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" -dependencies = [ - "zstd-safe 5.0.2+zstd.1.5.2", -] - -[[package]] -name = "zstd" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bffb3309596d527cfcba7dfc6ed6052f1d39dfbd7c867aa2e865e4a449c10110" -dependencies = [ - "zstd-safe 7.0.0", -] - -[[package]] -name = "zstd-safe" -version = "5.0.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" -dependencies = [ - "libc", - "zstd-sys", -] - -[[package]] -name = "zstd-safe" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43747c7422e2924c11144d5229878b98180ef8b06cca4ab5af37afc8a8d8ea3e" -dependencies = [ - "zstd-sys", -] - -[[package]] -name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" -dependencies = [ - "cc", - "pkg-config", -] diff --git a/Cargo.toml b/Cargo.toml index 3b4dd346..c86b57f4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ members = ["crates/*"] [workspace.dependencies] chrono = "0.4.33" indexmap = "2.2.2" -miette = "5.10.0" +miette = "7.0.0" regex = "1.10.3" relative-path = "1.9.2" rust_decimal = "1.34.2" @@ -15,5 +15,3 @@ serde_json = "1.0.113" serde_yaml = "0.9.31" toml = "0.8.9" url = "2.5.0" -version_spec = "0.2.0" -warpgate = "0.10.5" diff --git a/crates/macros/src/common/field.rs b/crates/macros/src/common/field.rs index c8106753..f9f86359 100644 --- a/crates/macros/src/common/field.rs +++ b/crates/macros/src/common/field.rs @@ -39,6 +39,7 @@ pub struct FieldArgs { pub validate: Option, // serde + pub alias: Option, pub flatten: bool, pub rename: Option, pub skip: bool, @@ -145,7 +146,9 @@ impl<'l> Field<'l> { pub fn get_serde_meta(&self) -> Option { let mut meta = vec![]; - if let Some(alias) = &self.serde_args.alias { + if let Some(alias) = &self.args.alias { + meta.push(quote! { alias = #alias }); + } else if let Some(alias) = &self.serde_args.alias { meta.push(quote! { alias = #alias }); } diff --git a/crates/macros/src/config/field.rs b/crates/macros/src/config/field.rs index e7c8baab..146aa142 100644 --- a/crates/macros/src/config/field.rs +++ b/crates/macros/src/config/field.rs @@ -115,7 +115,7 @@ impl<'l> Field<'l> { }; stmts.push(quote! { - if let Err(error) = #func(setting, self, context) { + if let Err(error) = #func(setting, self, context, finalize) { errors.push(schematic::ValidateErrorType::setting( path.join_key(#name_quoted), error, diff --git a/crates/macros/src/config/variant.rs b/crates/macros/src/config/variant.rs index 450ef7b7..a0bda621 100644 --- a/crates/macros/src/config/variant.rs +++ b/crates/macros/src/config/variant.rs @@ -168,7 +168,7 @@ impl<'l> Variant<'l> { }; stmts.push(quote! { - if let Err(error) = #func(#value, self, context) { + if let Err(error) = #func(#value, self, context, finalize) { errors.push(schematic::ValidateErrorType::setting( path.clone(), error, diff --git a/crates/schematic/Cargo.toml b/crates/schematic/Cargo.toml index ad5d7b3e..6a80681a 100644 --- a/crates/schematic/Cargo.toml +++ b/crates/schematic/Cargo.toml @@ -24,15 +24,15 @@ thiserror = "1.0.56" tracing = "0.1.40" # config -garde = { version = "0.17.0", default-features = false, optional = true, features = [ +garde = { version = "0.18.0", default-features = false, optional = true, features = [ "regex", ] } serde = { workspace = true } serde_path_to_error = { version = "0.1.15", optional = true } -starbase_styles = { version = "0.2.0", optional = true } +starbase_styles = { version = "0.3.0", optional = true } # schema -indexmap = { workspace = true, optional = true } +indexmap = { workspace = true, optional = true, features = ["serde"] } # json serde_json = { workspace = true, optional = true } @@ -60,14 +60,15 @@ config = [ "schematic_macros/config", ] json = ["dep:serde_json"] -json_schema = ["dep:schemars", "json", "schema"] schema = ["dep:indexmap", "schematic_macros/schema"] -template = [] toml = ["dep:toml"] -typescript = ["schema"] url = ["dep:reqwest"] yaml = ["dep:serde_yaml"] +renderer_json_schema = ["dep:schemars", "json", "schema"] +renderer_template = [] +renderer_typescript = ["schema"] + type_chrono = ["schematic_types/chrono"] type_indexmap = ["schematic_types/indexmap"] type_regex = ["schematic_types/regex"] @@ -78,8 +79,6 @@ type_serde_json = ["schematic_types/serde_json"] type_serde_toml = ["schematic_types/serde_toml"] type_serde_yaml = ["schematic_types/serde_yaml"] type_url = ["schematic_types/url"] -type_version_spec = ["schematic_types/version_spec"] -type_warpgate = ["schematic_types/warpgate"] valid_email = ["garde/email"] valid_url = ["garde/url"] @@ -87,12 +86,12 @@ valid_url = ["garde/url"] [dev-dependencies] schematic = { path = ".", features = [ "config", - "json_schema", "json", "schema", - "template", "toml", - "typescript", + "renderer_json_schema", + "renderer_template", + "renderer_typescript", "type_chrono", "type_indexmap", "type_regex", @@ -103,15 +102,17 @@ schematic = { path = ".", features = [ "type_serde_toml", "type_serde_yaml", "type_url", - "type_version_spec", - "type_warpgate", "url", "valid_email", "valid_url", "yaml", ] } +reqwest = { version = "0.11.24", default-features = false, features = [ + "blocking", + "rustls-tls-native-roots", +] } serial_test = "3.0.0" -starbase_sandbox = "0.3.0" +starbase_sandbox = "0.4.0" # Types chrono = { workspace = true } @@ -121,5 +122,3 @@ relative-path = { workspace = true, features = ["serde"] } rust_decimal = { workspace = true } semver = { workspace = true, features = ["serde"] } url = { workspace = true, features = ["serde"] } -version_spec = { workspace = true } -warpgate = { workspace = true } diff --git a/crates/schematic/src/merge.rs b/crates/schematic/src/merge.rs index c291b716..0e40bce1 100644 --- a/crates/schematic/src/merge.rs +++ b/crates/schematic/src/merge.rs @@ -4,6 +4,10 @@ use std::{ hash::Hash, }; +/// A merger function that receives the previous and next values, the current +/// context, and can return a [`ConfigError`] on failure. +pub type Merger = Box Result<(), ConfigError>>; + /// Discard both previous and next values and return [`None`]. pub fn discard(_: T, _: T, _: &C) -> Result, ConfigError> { Ok(None) diff --git a/crates/schematic/src/schema/mod.rs b/crates/schematic/src/schema/mod.rs index 2a2b0ea6..d6fa1a66 100644 --- a/crates/schematic/src/schema/mod.rs +++ b/crates/schematic/src/schema/mod.rs @@ -8,30 +8,30 @@ pub use renderer::*; pub use schematic_types::*; /// Renders JSON schemas. -#[cfg(feature = "json_schema")] +#[cfg(feature = "renderer_json_schema")] pub use renderers::json_schema::{self, *}; /// Renders JSON config templates. -#[cfg(all(feature = "template", feature = "json"))] +#[cfg(all(feature = "renderer_template", feature = "json"))] pub use renderers::json_template::*; /// Renders JSONC config templates. -#[cfg(all(feature = "template", feature = "json"))] +#[cfg(all(feature = "renderer_template", feature = "json"))] pub use renderers::jsonc_template::*; /// Helpers for config templates. -#[cfg(feature = "template")] +#[cfg(feature = "renderer_template")] #[allow(deprecated)] pub use renderers::template::{self, TemplateOptions, TemplateRenderer}; /// Renders TOML config templates. -#[cfg(all(feature = "template", feature = "toml"))] +#[cfg(all(feature = "renderer_template", feature = "toml"))] pub use renderers::toml_template::*; /// Renders TypeScript types. -#[cfg(feature = "typescript")] +#[cfg(feature = "renderer_typescript")] pub use renderers::typescript::{self, *}; /// Renders YAML config templates. -#[cfg(all(feature = "template", feature = "yaml"))] +#[cfg(all(feature = "renderer_template", feature = "yaml"))] pub use renderers::yaml_template::*; diff --git a/crates/schematic/src/schema/renderers/mod.rs b/crates/schematic/src/schema/renderers/mod.rs index 7fa63eec..f8af7653 100644 --- a/crates/schematic/src/schema/renderers/mod.rs +++ b/crates/schematic/src/schema/renderers/mod.rs @@ -1,20 +1,20 @@ -#[cfg(feature = "json_schema")] +#[cfg(feature = "renderer_json_schema")] pub mod json_schema; -#[cfg(all(feature = "template", feature = "json"))] +#[cfg(all(feature = "renderer_template", feature = "json"))] pub mod json_template; -#[cfg(all(feature = "template", feature = "json"))] +#[cfg(all(feature = "renderer_template", feature = "json"))] pub mod jsonc_template; -#[cfg(feature = "template")] +#[cfg(feature = "renderer_template")] pub mod template; -#[cfg(all(feature = "template", feature = "toml"))] +#[cfg(all(feature = "renderer_template", feature = "toml"))] pub mod toml_template; -#[cfg(feature = "typescript")] +#[cfg(feature = "renderer_typescript")] pub mod typescript; -#[cfg(all(feature = "template", feature = "yaml"))] +#[cfg(all(feature = "renderer_template", feature = "yaml"))] pub mod yaml_template; diff --git a/crates/schematic/src/validate.rs b/crates/schematic/src/validate.rs deleted file mode 100644 index 4aa5f358..00000000 --- a/crates/schematic/src/validate.rs +++ /dev/null @@ -1,184 +0,0 @@ -use crate::config::{ - is_file_like, is_secure_url, is_source_format, is_url_like, ExtendsFrom, Path, PathSegment, - ValidateError, -}; -use garde::rules as r; -use std::fmt::Display; - -/// A validator function that receives a setting value to validate, the parent -/// configuration the setting belongs to, the current context, and can return -/// a [`ValidateError`] on failure. -pub type Validator = - Box Result<(), ValidateError>>; - -fn map_err(error: garde::Error) -> ValidateError { - ValidateError::new(error.to_string()) -} - -pub use r::alphanumeric::Alphanumeric; - -/// Validate a string is only composed of alpha-numeric characters. -pub fn alphanumeric(value: &T, _: &D, _: &C) -> Result<(), ValidateError> { - r::alphanumeric::apply(value, ()).map_err(map_err) -} - -pub use r::ascii::Ascii; - -/// Validate a string is only composed of ASCII characters. -pub fn ascii(value: &T, _: &D, _: &C) -> Result<(), ValidateError> { - r::ascii::apply(value, ()).map_err(map_err) -} - -pub use r::contains::Contains; - -/// Validate a string contains the provided pattern. -pub fn contains(pattern: &str) -> Validator { - let pattern = pattern.to_owned(); - - Box::new(move |value, _, _| r::contains::apply(value, (&pattern,)).map_err(map_err)) -} - -#[cfg(feature = "valid_email")] -pub use r::email::Email; - -#[cfg(feature = "valid_email")] -/// Validate a string matches an email address. -pub fn email(value: &T, _: &D, _: &C) -> Result<(), ValidateError> { - r::email::apply(value, ()).map_err(map_err) -} - -pub use r::ip::{Ip, IpKind}; - -/// Validate a string is either an IP v4 or v6 address. -pub fn ip(value: &T, _: &D, _: &C) -> Result<(), ValidateError> { - r::ip::apply(value, (IpKind::Any,)).map_err(map_err) -} - -/// Validate a string is either an IP v4 address. -pub fn ip_v4(value: &T, _: &D, _: &C) -> Result<(), ValidateError> { - r::ip::apply(value, (IpKind::V4,)).map_err(map_err) -} - -/// Validate a string is either an IP v6 address. -pub fn ip_v6(value: &T, _: &D, _: &C) -> Result<(), ValidateError> { - r::ip::apply(value, (IpKind::V6,)).map_err(map_err) -} - -pub use r::pattern::Pattern; - -/// Validate a string matches the provided regex pattern. -pub fn regex(pattern: &str) -> Validator { - let pattern = r::pattern::regex::Regex::new(pattern).unwrap(); - - Box::new(move |value, _, _| r::pattern::apply(value, (&pattern,)).map_err(map_err)) -} - -pub use r::length::{HasLength, Length}; - -/// Validate a value is at least the provided length. -pub fn min_length(min: usize) -> Validator { - Box::new(move |value, _, _| r::length::apply(value, (min, usize::MAX)).map_err(map_err)) -} - -/// Validate a value is at most the provided length. -pub fn max_length(max: usize) -> Validator { - Box::new(move |value, _, _| r::length::apply(value, (usize::MIN, max)).map_err(map_err)) -} - -/// Validate a value is within the provided length. -pub fn in_length(min: usize, max: usize) -> Validator { - Box::new(move |value, _, _| r::length::apply(value, (min, max)).map_err(map_err)) -} - -/// Validate the value is not empty. -pub fn not_empty(value: &T, _: &D, _: &C) -> Result<(), ValidateError> { - if value.length() == 0 { - return Err(ValidateError::new("must not be empty")); - } - - Ok(()) -} - -#[cfg(feature = "valid_url")] -pub use r::url::Url; - -#[cfg(feature = "valid_url")] -/// Validate a string matches a URL. -pub fn url(value: &T, _: &D, _: &C) -> Result<(), ValidateError> { - r::url::apply(value, ()).map_err(map_err) -} - -#[cfg(feature = "valid_url")] -/// Validate a string matches a URL and starts with https://. -pub fn url_secure, D, C>( - value: T, - data: &D, - context: &C, -) -> Result<(), ValidateError> { - let value = value.as_ref(); - - url(&value, data, context)?; - - if !is_secure_url(value) { - return Err(ValidateError::new("only secure URLs are allowed")); - } - - Ok(()) -} - -pub use r::range::Bounds; - -/// Validate a numeric value is between the provided bounds (non-inclusive). -pub fn in_range( - min: T::Size, - max: T::Size, -) -> Validator { - Box::new(move |value, _, _| r::range::apply(value, (Some(min), Some(max))).map_err(map_err)) -} - -/// Validate an `extend` value is either a file path or secure URL. -pub fn extends_string(value: &str, _data: &D, _context: &C) -> Result<(), ValidateError> { - let is_file = is_file_like(value); - let is_url = is_url_like(value); - - if !is_url && !is_file { - return Err(ValidateError::new( - "only file paths and URLs can be extended", - )); - } - - if !value.is_empty() && !is_source_format(value) { - return Err(ValidateError::new( - "invalid format, try a supported extension", - )); - } - - if is_url && !is_secure_url(value) { - return Err(ValidateError::new("only secure URLs can be extended")); - } - - Ok(()) -} - -/// Validate a list of `extend` values are either a file path or secure URL. -pub fn extends_list(values: &[String], data: &D, context: &C) -> Result<(), ValidateError> { - for (i, value) in values.iter().enumerate() { - if let Err(mut error) = extends_string(value, data, context) { - error.path = Path::new(vec![PathSegment::Index(i)]); - - return Err(error); - } - } - - Ok(()) -} - -/// Validate an `extend` value is either a file path or secure URL. -pub fn extends_from(value: &ExtendsFrom, data: &D, context: &C) -> Result<(), ValidateError> { - match value { - ExtendsFrom::String(string) => extends_string(string, data, context)?, - ExtendsFrom::List(list) => extends_list(list, data, context)?, - }; - - Ok(()) -} diff --git a/crates/schematic/src/validate/email.rs b/crates/schematic/src/validate/email.rs new file mode 100644 index 00000000..bf80e9cd --- /dev/null +++ b/crates/schematic/src/validate/email.rs @@ -0,0 +1,12 @@ +use super::{map_err, ValidateError}; +pub use garde::rules::email::Email; + +/// Validate a string matches an email address. +pub fn email( + value: &T, + _data: &D, + _context: &C, + _finalize: bool, +) -> Result<(), ValidateError> { + garde::rules::email::apply(value, ()).map_err(map_err) +} diff --git a/crates/schematic/src/validate/extends.rs b/crates/schematic/src/validate/extends.rs new file mode 100644 index 00000000..eb320f49 --- /dev/null +++ b/crates/schematic/src/validate/extends.rs @@ -0,0 +1,66 @@ +use crate::config::{ + is_file_like, is_secure_url, is_source_format, is_url_like, ExtendsFrom, Path, PathSegment, + ValidateError, +}; + +/// Validate an `extend` value is either a file path or secure URL. +pub fn extends_string( + value: &str, + _data: &D, + _context: &C, + _finalize: bool, +) -> Result<(), ValidateError> { + let is_file = is_file_like(value); + let is_url = is_url_like(value); + + if !is_url && !is_file { + return Err(ValidateError::new( + "only file paths and URLs can be extended", + )); + } + + if !value.is_empty() && !is_source_format(value) { + return Err(ValidateError::new( + "invalid format, try a supported extension", + )); + } + + if is_url && !is_secure_url(value) { + return Err(ValidateError::new("only secure URLs can be extended")); + } + + Ok(()) +} + +/// Validate a list of `extend` values are either a file path or secure URL. +pub fn extends_list( + values: &[String], + data: &D, + context: &C, + finalize: bool, +) -> Result<(), ValidateError> { + for (i, value) in values.iter().enumerate() { + if let Err(mut error) = extends_string(value, data, context, finalize) { + error.path = Path::new(vec![PathSegment::Index(i)]); + + return Err(error); + } + } + + Ok(()) +} + +/// Validate an `extend` value is either a file path or secure URL. +pub fn extends_from( + value: &ExtendsFrom, + data: &D, + context: &C, + finalize: bool, +) -> Result<(), ValidateError> { + match value { + ExtendsFrom::String(string) => extends_string(string, data, context, finalize)?, + ExtendsFrom::List(list) => extends_list(list, data, context, finalize)?, + }; + + Ok(()) +} diff --git a/crates/schematic/src/validate/ip.rs b/crates/schematic/src/validate/ip.rs new file mode 100644 index 00000000..7d16892c --- /dev/null +++ b/crates/schematic/src/validate/ip.rs @@ -0,0 +1,32 @@ +use super::{map_err, ValidateError}; +pub use garde::rules::ip::{Ip, IpKind}; + +/// Validate a string is either an IP v4 or v6 address. +pub fn ip( + value: &T, + _data: &D, + _context: &C, + _finalize: bool, +) -> Result<(), ValidateError> { + garde::rules::ip::apply(value, (IpKind::Any,)).map_err(map_err) +} + +/// Validate a string is either an IP v4 address. +pub fn ip_v4( + value: &T, + _data: &D, + _context: &C, + _finalize: bool, +) -> Result<(), ValidateError> { + garde::rules::ip::apply(value, (IpKind::V4,)).map_err(map_err) +} + +/// Validate a string is either an IP v6 address. +pub fn ip_v6( + value: &T, + _data: &D, + _context: &C, + _finalize: bool, +) -> Result<(), ValidateError> { + garde::rules::ip::apply(value, (IpKind::V6,)).map_err(map_err) +} diff --git a/crates/schematic/src/validate/length.rs b/crates/schematic/src/validate/length.rs new file mode 100644 index 00000000..54599059 --- /dev/null +++ b/crates/schematic/src/validate/length.rs @@ -0,0 +1,42 @@ +use super::{map_err, Validator}; +pub use garde::rules::length::{ + bytes::{Bytes, HasBytes}, + chars::{Chars, HasChars}, + simple::Simple, + HasSimpleLength, +}; + +/// Validate a value is within the provided length. +pub fn in_length(min: usize, max: usize) -> Validator { + Box::new(move |value, _, _, _| T::validate_length(value, min, max).map_err(map_err)) +} + +/// Validate a value is at least the provided length. +pub fn min_length(min: usize) -> Validator { + Box::new(move |value, _, _, _| T::validate_length(value, min, usize::MAX).map_err(map_err)) +} + +/// Validate a value is at most the provided length. +pub fn max_length(max: usize) -> Validator { + Box::new(move |value, _, _, _| T::validate_length(value, usize::MIN, max).map_err(map_err)) +} + +/// Validate a value has the minimum required number of characters. +pub fn min_chars(min: usize) -> Validator { + Box::new(move |value, _, _, _| T::validate_num_chars(value, min, usize::MAX).map_err(map_err)) +} + +/// Validate a value has the maximum required number of characters. +pub fn max_chars(max: usize) -> Validator { + Box::new(move |value, _, _, _| T::validate_num_chars(value, usize::MIN, max).map_err(map_err)) +} + +/// Validate a value has the minimum required number of bytes. +pub fn min_bytes(min: usize) -> Validator { + Box::new(move |value, _, _, _| T::validate_num_bytes(value, min, usize::MAX).map_err(map_err)) +} + +/// Validate a value has the maximum required number of bytes. +pub fn max_bytes(max: usize) -> Validator { + Box::new(move |value, _, _, _| T::validate_num_bytes(value, usize::MIN, max).map_err(map_err)) +} diff --git a/crates/schematic/src/validate/mod.rs b/crates/schematic/src/validate/mod.rs new file mode 100644 index 00000000..cb693950 --- /dev/null +++ b/crates/schematic/src/validate/mod.rs @@ -0,0 +1,30 @@ +#[cfg(feature = "valid_email")] +mod email; +mod extends; +mod ip; +mod length; +mod number; +mod string; +#[cfg(feature = "valid_url")] +mod url; + +pub use crate::config::ValidateError; +#[cfg(feature = "valid_email")] +pub use email::*; +pub use extends::*; +pub use ip::*; +pub use length::*; +pub use number::*; +pub use string::*; +#[cfg(feature = "valid_url")] +pub use url::*; + +/// A validator function that receives a setting value to validate, the parent +/// configuration the setting belongs to, the current context, and can return +/// a [`ValidateError`] on failure. +pub type Validator = + Box Result<(), ValidateError>>; + +pub(crate) fn map_err(error: garde::Error) -> ValidateError { + ValidateError::new(error.to_string()) +} diff --git a/crates/schematic/src/validate/number.rs b/crates/schematic/src/validate/number.rs new file mode 100644 index 00000000..fb1d05d7 --- /dev/null +++ b/crates/schematic/src/validate/number.rs @@ -0,0 +1,13 @@ +use super::{map_err, Validator}; +pub use garde::rules::range::Bounds; +use std::fmt::Display; + +/// Validate a numeric value is between the provided bounds (non-inclusive). +pub fn in_range( + min: T::Size, + max: T::Size, +) -> Validator { + Box::new(move |value, _, _, _| { + garde::rules::range::apply(value, (Some(min), Some(max))).map_err(map_err) + }) +} diff --git a/crates/schematic/src/validate/string.rs b/crates/schematic/src/validate/string.rs new file mode 100644 index 00000000..d405d857 --- /dev/null +++ b/crates/schematic/src/validate/string.rs @@ -0,0 +1,57 @@ +use super::{map_err, ValidateError, Validator}; +pub use garde::rules::{ + alphanumeric::Alphanumeric, ascii::Ascii, contains::Contains, length::HasSimpleLength, + pattern::Pattern, +}; + +/// Validate a string is only composed of alpha-numeric characters. +pub fn alphanumeric( + value: &T, + _data: &D, + _context: &C, + _finalize: bool, +) -> Result<(), ValidateError> { + garde::rules::alphanumeric::apply(value, ()).map_err(map_err) +} + +/// Validate a string is only composed of ASCII characters. +pub fn ascii( + value: &T, + _data: &D, + _context: &C, + _finalize: bool, +) -> Result<(), ValidateError> { + garde::rules::ascii::apply(value, ()).map_err(map_err) +} + +/// Validate a string contains the provided pattern. +pub fn contains(pattern: &str) -> Validator { + let pattern = pattern.to_owned(); + + Box::new(move |value, _, _, _| { + garde::rules::contains::apply(value, (&pattern,)).map_err(map_err) + }) +} + +/// Validate a string matches the provided regex pattern. +pub fn regex(pattern: &str) -> Validator { + let pattern = garde::rules::pattern::regex::Regex::new(pattern).unwrap(); + + Box::new(move |value, _, _, _| { + garde::rules::pattern::apply(value, (&pattern,)).map_err(map_err) + }) +} + +/// Validate the value is not empty. +pub fn not_empty( + value: &T, + _data: &D, + _context: &C, + _finalize: bool, +) -> Result<(), ValidateError> { + if value.length() == 0 { + return Err(ValidateError::new("must not be empty")); + } + + Ok(()) +} diff --git a/crates/schematic/src/validate/url.rs b/crates/schematic/src/validate/url.rs new file mode 100644 index 00000000..935f9280 --- /dev/null +++ b/crates/schematic/src/validate/url.rs @@ -0,0 +1,31 @@ +use super::{map_err, ValidateError}; +use crate::config::is_secure_url; +pub use garde::rules::url::Url; + +/// Validate a string matches a URL. +pub fn url( + value: &T, + _data: &D, + _context: &C, + _finalize: bool, +) -> Result<(), ValidateError> { + garde::rules::url::apply(value, ()).map_err(map_err) +} + +/// Validate a string matches a URL and starts with https://. +pub fn url_secure, D, C>( + value: T, + data: &D, + context: &C, + finalize: bool, +) -> Result<(), ValidateError> { + let value = value.as_ref(); + + url(&value, data, context, finalize)?; + + if !is_secure_url(value) { + return Err(ValidateError::new("only secure URLs are allowed")); + } + + Ok(()) +} diff --git a/crates/schematic/tests/code_sources_test.rs b/crates/schematic/tests/code_sources_test.rs index 6b6a8444..b208a19d 100644 --- a/crates/schematic/tests/code_sources_test.rs +++ b/crates/schematic/tests/code_sources_test.rs @@ -105,7 +105,7 @@ vector: [x, y, z] assert_eq!(result.config.vector, vec!["x", "y", "z"]); } -#[cfg(feature = "json_schema")] +#[cfg(feature = "renderer_json_schema")] #[test] fn generates_json_schema() { use starbase_sandbox::{assert_snapshot, create_empty_sandbox}; @@ -123,7 +123,7 @@ fn generates_json_schema() { assert_snapshot!(std::fs::read_to_string(file).unwrap()); } -#[cfg(feature = "typescript")] +#[cfg(feature = "renderer_typescript")] #[test] fn generates_typescript() { use starbase_sandbox::{assert_snapshot, create_empty_sandbox}; diff --git a/crates/schematic/tests/defaults_test.rs b/crates/schematic/tests/defaults_test.rs index 1d3963b4..5d5ae099 100644 --- a/crates/schematic/tests/defaults_test.rs +++ b/crates/schematic/tests/defaults_test.rs @@ -141,7 +141,7 @@ fn handles_nested_defaults() { assert!(!result.config.nested.boolean); } -#[cfg(feature = "json_schema")] +#[cfg(feature = "renderer_json_schema")] #[test] fn generates_json_schema() { use starbase_sandbox::{assert_snapshot, create_empty_sandbox}; @@ -162,7 +162,7 @@ fn generates_json_schema() { assert_snapshot!(std::fs::read_to_string(file).unwrap()); } -#[cfg(feature = "typescript")] +#[cfg(feature = "renderer_typescript")] #[test] fn generates_typescript() { use starbase_sandbox::{assert_snapshot, create_empty_sandbox}; diff --git a/crates/schematic/tests/env_test.rs b/crates/schematic/tests/env_test.rs index cfd3ecbe..b29a7034 100644 --- a/crates/schematic/tests/env_test.rs +++ b/crates/schematic/tests/env_test.rs @@ -208,7 +208,7 @@ fn loads_from_prefixed() { assert_eq!(result.config.list2, vec![1, 2, 3]); } -#[cfg(feature = "json_schema")] +#[cfg(feature = "renderer_json_schema")] #[test] fn generates_json_schema() { use starbase_sandbox::{assert_snapshot, create_empty_sandbox}; @@ -226,7 +226,7 @@ fn generates_json_schema() { assert_snapshot!(std::fs::read_to_string(file).unwrap()); } -#[cfg(feature = "typescript")] +#[cfg(feature = "renderer_typescript")] #[test] fn generates_typescript() { use starbase_sandbox::{assert_snapshot, create_empty_sandbox}; diff --git a/crates/schematic/tests/extends_test.rs b/crates/schematic/tests/extends_test.rs index a7f3864e..2167c8d6 100644 --- a/crates/schematic/tests/extends_test.rs +++ b/crates/schematic/tests/extends_test.rs @@ -209,7 +209,7 @@ fn extends_from_optional() { ); } -#[cfg(feature = "json_schema")] +#[cfg(feature = "renderer_json_schema")] #[test] fn generates_json_schema() { use starbase_sandbox::{assert_snapshot, create_empty_sandbox}; @@ -230,7 +230,7 @@ fn generates_json_schema() { assert_snapshot!(std::fs::read_to_string(file).unwrap()); } -#[cfg(feature = "typescript")] +#[cfg(feature = "renderer_typescript")] #[test] fn generates_typescript() { use starbase_sandbox::{assert_snapshot, create_empty_sandbox}; diff --git a/crates/schematic/tests/generator_test.rs b/crates/schematic/tests/generator_test.rs index 3b557fa5..ac100d89 100644 --- a/crates/schematic/tests/generator_test.rs +++ b/crates/schematic/tests/generator_test.rs @@ -52,10 +52,6 @@ struct GenConfig { url: Option, version: Option, version_req: semver::VersionReq, - spec: version_spec::VersionSpec, - spec_unresolved: version_spec::UnresolvedVersionSpec, - id: warpgate::Id, - locator: Option, json_value: serde_json::Value, toml_value: Option, yaml_value: serde_yaml::Value, @@ -151,7 +147,7 @@ fn create_template_options() -> TemplateOptions { } } -#[cfg(feature = "json_schema")] +#[cfg(feature = "renderer_json_schema")] mod json_schema { use super::*; use schematic::schema::json_schema::*; @@ -235,7 +231,7 @@ mod template_yaml { } } -#[cfg(feature = "typescript")] +#[cfg(feature = "renderer_typescript")] mod typescript { use super::*; use schematic::schema::typescript::*; diff --git a/crates/schematic/tests/macro_enum_test.rs b/crates/schematic/tests/macro_enum_test.rs index 75744305..891b7a98 100644 --- a/crates/schematic/tests/macro_enum_test.rs +++ b/crates/schematic/tests/macro_enum_test.rs @@ -41,11 +41,16 @@ fn merge_tuple( Ok(Some((format!("{}-{}", prev.0, next.0), (prev.1 + next.1)))) } -fn validate_tuple(_: (&String, &usize), _: &T, _: &C) -> Result<(), ValidateError> { +fn validate_tuple(_: (&String, &usize), _: &T, _: &C, _: bool) -> Result<(), ValidateError> { Ok(()) } -fn validate_nested(_: &PartialSomeConfig, _: &T, _: &C) -> Result<(), ValidateError> { +fn validate_nested( + _: &PartialSomeConfig, + _: &T, + _: &C, + _: bool, +) -> Result<(), ValidateError> { Ok(()) } @@ -69,7 +74,7 @@ enum NestedConfigs { } #[allow(unused_parens)] -fn validate_string(_: (&Option), _: &T, _: &C) -> Result<(), ValidateError> { +fn validate_string(_: (&Option), _: &T, _: &C, _: bool) -> Result<(), ValidateError> { Ok(()) } @@ -174,7 +179,7 @@ fn create_gen() -> schema::SchemaGenerator { generator } -#[cfg(feature = "json_schema")] +#[cfg(feature = "renderer_json_schema")] #[test] fn generates_json_schema() { use starbase_sandbox::{assert_snapshot, create_empty_sandbox}; @@ -191,7 +196,7 @@ fn generates_json_schema() { assert_snapshot!(std::fs::read_to_string(file).unwrap()); } -#[cfg(feature = "typescript")] +#[cfg(feature = "renderer_typescript")] #[test] fn generates_typescript() { use starbase_sandbox::{assert_snapshot, create_empty_sandbox}; diff --git a/crates/schematic/tests/macros_test.rs b/crates/schematic/tests/macros_test.rs index a0e30e21..95a46b1d 100644 --- a/crates/schematic/tests/macros_test.rs +++ b/crates/schematic/tests/macros_test.rs @@ -179,11 +179,16 @@ struct EnvVars { // invalid: Vec, } -fn validate_test(_: &str, _: &T, _: &C) -> Result<(), ValidateError> { +fn validate_test(_: &str, _: &T, _: &C, _: bool) -> Result<(), ValidateError> { Ok(()) } -fn validate_nested(_: &PartialNestedValidations, _: &T, _: &C) -> Result<(), ValidateError> { +fn validate_nested( + _: &PartialNestedValidations, + _: &T, + _: &C, + _: bool, +) -> Result<(), ValidateError> { Ok(()) } @@ -273,7 +278,7 @@ enum AliasedEnum { Baz, } -#[cfg(feature = "json_schema")] +#[cfg(feature = "renderer_json_schema")] #[test] fn generates_json_schema() { use starbase_sandbox::{assert_snapshot, create_empty_sandbox}; @@ -313,7 +318,7 @@ fn generates_json_schema() { assert_snapshot!(std::fs::read_to_string(file).unwrap()); } -#[cfg(feature = "typescript")] +#[cfg(feature = "renderer_typescript")] #[test] fn generates_typescript() { use schema::typescript::*; diff --git a/crates/schematic/tests/settings_test.rs b/crates/schematic/tests/settings_test.rs index 75a53e03..8156f4af 100644 --- a/crates/schematic/tests/settings_test.rs +++ b/crates/schematic/tests/settings_test.rs @@ -3,7 +3,7 @@ use serial_test::serial; use std::collections::HashMap; use std::env; -fn test_string(_: &String, _: &T, context: &Context) -> Result<(), ValidateError> { +fn test_string(_: &String, _: &T, context: &Context, _: bool) -> Result<(), ValidateError> { if context.fail { return Err(ValidateError::new("invalid")); } @@ -382,7 +382,7 @@ mod nested_map { } } -#[cfg(feature = "json_schema")] +#[cfg(feature = "renderer_json_schema")] #[test] fn generates_json_schema() { use starbase_sandbox::{assert_snapshot, create_empty_sandbox}; @@ -403,7 +403,7 @@ fn generates_json_schema() { assert_snapshot!(std::fs::read_to_string(file).unwrap()); } -#[cfg(feature = "typescript")] +#[cfg(feature = "renderer_typescript")] #[test] fn generates_typescript() { use starbase_sandbox::{assert_snapshot, create_empty_sandbox}; diff --git a/crates/schematic/tests/snapshots/generator_test__json_schema__defaults.snap b/crates/schematic/tests/snapshots/generator_test__json_schema__defaults.snap index 51f439f7..30b8d0ed 100644 --- a/crates/schematic/tests/snapshots/generator_test__json_schema__defaults.snap +++ b/crates/schematic/tests/snapshots/generator_test__json_schema__defaults.snap @@ -14,18 +14,14 @@ expression: "fs::read_to_string(file).unwrap()" "enums", "float32", "float64", - "id", "indexmap", "indexset", "jsonValue", - "locator", "map", "nested", "number", "path", "relPath", - "spec", - "specUnresolved", "string", "time", "tomlValue", @@ -65,9 +61,6 @@ expression: "fs::read_to_string(file).unwrap()" "float64": { "type": "number" }, - "id": { - "type": "string" - }, "indexmap": { "type": "object", "additionalProperties": { @@ -100,16 +93,6 @@ expression: "fs::read_to_string(file).unwrap()" "integer" ] }, - "locator": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, "map": { "type": "object", "additionalProperties": { @@ -137,12 +120,6 @@ expression: "fs::read_to_string(file).unwrap()" "type": "string", "format": "path" }, - "spec": { - "type": "string" - }, - "specUnresolved": { - "type": "string" - }, "string": { "type": "string" }, diff --git a/crates/schematic/tests/snapshots/generator_test__typescript__const_enums.snap b/crates/schematic/tests/snapshots/generator_test__typescript__const_enums.snap index 14bf720b..e5bb1c31 100644 --- a/crates/schematic/tests/snapshots/generator_test__typescript__const_enums.snap +++ b/crates/schematic/tests/snapshots/generator_test__typescript__const_enums.snap @@ -33,18 +33,14 @@ export interface GenConfig { enums: BasicEnum; float32: number; float64: number; - id: string; indexmap: Record; indexset: string[] | null; jsonValue: unknown; - locator: string | null; map: Record; nested: AnotherConfig; number: number; path: string; relPath: string; - spec: string; - specUnresolved: string; string: string; time: string; tomlValue: unknown | null; diff --git a/crates/schematic/tests/snapshots/generator_test__typescript__defaults.snap b/crates/schematic/tests/snapshots/generator_test__typescript__defaults.snap index caf52e36..1e6cc302 100644 --- a/crates/schematic/tests/snapshots/generator_test__typescript__defaults.snap +++ b/crates/schematic/tests/snapshots/generator_test__typescript__defaults.snap @@ -29,18 +29,14 @@ export interface GenConfig { enums: BasicEnum; float32: number; float64: number; - id: string; indexmap: Record; indexset: string[] | null; jsonValue: unknown; - locator: string | null; map: Record; nested: AnotherConfig; number: number; path: string; relPath: string; - spec: string; - specUnresolved: string; string: string; time: string; tomlValue: unknown | null; diff --git a/crates/schematic/tests/snapshots/generator_test__typescript__enums.snap b/crates/schematic/tests/snapshots/generator_test__typescript__enums.snap index 509dd471..3a223d96 100644 --- a/crates/schematic/tests/snapshots/generator_test__typescript__enums.snap +++ b/crates/schematic/tests/snapshots/generator_test__typescript__enums.snap @@ -33,18 +33,14 @@ export interface GenConfig { enums: BasicEnum; float32: number; float64: number; - id: string; indexmap: Record; indexset: string[] | null; jsonValue: unknown; - locator: string | null; map: Record; nested: AnotherConfig; number: number; path: string; relPath: string; - spec: string; - specUnresolved: string; string: string; time: string; tomlValue: unknown | null; diff --git a/crates/schematic/tests/snapshots/generator_test__typescript__exclude_refs.snap b/crates/schematic/tests/snapshots/generator_test__typescript__exclude_refs.snap index 8e6ab0f2..8d0af264 100644 --- a/crates/schematic/tests/snapshots/generator_test__typescript__exclude_refs.snap +++ b/crates/schematic/tests/snapshots/generator_test__typescript__exclude_refs.snap @@ -27,18 +27,14 @@ export interface GenConfig { enums: BasicEnum; float32: number; float64: number; - id: string; indexmap: Record; indexset: string[] | null; jsonValue: unknown; - locator: string | null; map: Record; nested: AnotherConfig; number: number; path: string; relPath: string; - spec: string; - specUnresolved: string; string: string; time: string; tomlValue: unknown | null; diff --git a/crates/schematic/tests/snapshots/generator_test__typescript__external_types.snap b/crates/schematic/tests/snapshots/generator_test__typescript__external_types.snap index 4514d193..acc8a345 100644 --- a/crates/schematic/tests/snapshots/generator_test__typescript__external_types.snap +++ b/crates/schematic/tests/snapshots/generator_test__typescript__external_types.snap @@ -31,18 +31,14 @@ export interface GenConfig { enums: BasicEnum; float32: number; float64: number; - id: string; indexmap: Record; indexset: string[] | null; jsonValue: unknown; - locator: string | null; map: Record; nested: AnotherConfig; number: number; path: string; relPath: string; - spec: string; - specUnresolved: string; string: string; time: string; tomlValue: unknown | null; diff --git a/crates/schematic/tests/snapshots/generator_test__typescript__no_refs.snap b/crates/schematic/tests/snapshots/generator_test__typescript__no_refs.snap index dda39b98..bbd5d360 100644 --- a/crates/schematic/tests/snapshots/generator_test__typescript__no_refs.snap +++ b/crates/schematic/tests/snapshots/generator_test__typescript__no_refs.snap @@ -29,11 +29,9 @@ export interface GenConfig { enums: 'foo' | 'bar' | 'baz'; float32: number; float64: number; - id: string; indexmap: Record; indexset: string[] | null; jsonValue: unknown; - locator: string | null; map: Record; nested: { /** An optional string. */ @@ -48,8 +46,6 @@ export interface GenConfig { number: number; path: string; relPath: string; - spec: string; - specUnresolved: string; string: string; time: string; tomlValue: unknown | null; diff --git a/crates/schematic/tests/snapshots/generator_test__typescript__object_aliases.snap b/crates/schematic/tests/snapshots/generator_test__typescript__object_aliases.snap index b45a050c..4be763f8 100644 --- a/crates/schematic/tests/snapshots/generator_test__typescript__object_aliases.snap +++ b/crates/schematic/tests/snapshots/generator_test__typescript__object_aliases.snap @@ -29,18 +29,14 @@ export type GenConfig = { enums: BasicEnum, float32: number, float64: number, - id: string, indexmap: Record, indexset: string[] | null, jsonValue: unknown, - locator: string | null, map: Record, nested: AnotherConfig, number: number, path: string, relPath: string, - spec: string, - specUnresolved: string, string: string, time: string, tomlValue: unknown | null, diff --git a/crates/schematic/tests/snapshots/generator_test__typescript__value_enums.snap b/crates/schematic/tests/snapshots/generator_test__typescript__value_enums.snap index 96814533..5dd2a84c 100644 --- a/crates/schematic/tests/snapshots/generator_test__typescript__value_enums.snap +++ b/crates/schematic/tests/snapshots/generator_test__typescript__value_enums.snap @@ -33,18 +33,14 @@ export interface GenConfig { enums: BasicEnum; float32: number; float64: number; - id: string; indexmap: Record; indexset: string[] | null; jsonValue: unknown; - locator: string | null; map: Record; nested: AnotherConfig; number: number; path: string; relPath: string; - spec: string; - specUnresolved: string; string: string; time: string; tomlValue: unknown | null; diff --git a/crates/schematic/tests/validate_test.rs b/crates/schematic/tests/validate_test.rs index a6301c27..8b119c98 100644 --- a/crates/schematic/tests/validate_test.rs +++ b/crates/schematic/tests/validate_test.rs @@ -3,7 +3,7 @@ use schematic::*; use std::collections::HashMap; -fn test_string(value: &String, _: &T, _: &C) -> Result<(), ValidateError> { +fn test_string(value: &String, _: &T, _: &C, _: bool) -> Result<(), ValidateError> { if value.is_empty() { return Ok(()); } diff --git a/crates/schematic/tests/variants_test.rs b/crates/schematic/tests/variants_test.rs index ea024dc9..64f1fee0 100644 --- a/crates/schematic/tests/variants_test.rs +++ b/crates/schematic/tests/variants_test.rs @@ -3,7 +3,7 @@ use serial_test::serial; use std::collections::HashMap; use std::env; -fn test_list(_: &[String], _: &T, context: &Context) -> Result<(), ValidateError> { +fn test_list(_: &[String], _: &T, context: &Context, _: bool) -> Result<(), ValidateError> { if context.fail { return Err(ValidateError::new("invalid")); } @@ -11,7 +11,12 @@ fn test_list(_: &[String], _: &T, context: &Context) -> Result<(), ValidateEr Ok(()) } -fn test_map(_: &HashMap, _: &T, context: &Context) -> Result<(), ValidateError> { +fn test_map( + _: &HashMap, + _: &T, + context: &Context, + _: bool, +) -> Result<(), ValidateError> { if context.fail { return Err(ValidateError::new("invalid")); } @@ -19,7 +24,12 @@ fn test_map(_: &HashMap, _: &T, context: &Context) -> Result< Ok(()) } -fn test_cfg(_: &PartialProjectsConfig, _: &T, context: &Context) -> Result<(), ValidateError> { +fn test_cfg( + _: &PartialProjectsConfig, + _: &T, + context: &Context, + _: bool, +) -> Result<(), ValidateError> { if context.fail { return Err(ValidateError::new("invalid")); } @@ -319,7 +329,7 @@ mod validating { } } -#[cfg(feature = "json_schema")] +#[cfg(feature = "renderer_json_schema")] #[test] fn generates_json_schema() { use starbase_sandbox::{assert_snapshot, create_empty_sandbox}; @@ -337,7 +347,7 @@ fn generates_json_schema() { assert_snapshot!(std::fs::read_to_string(file).unwrap()); } -#[cfg(feature = "typescript")] +#[cfg(feature = "renderer_typescript")] #[test] fn generates_typescript() { use starbase_sandbox::{assert_snapshot, create_empty_sandbox}; diff --git a/crates/test-app/src/main.rs b/crates/test-app/src/main.rs index e17eebe2..abf25060 100644 --- a/crates/test-app/src/main.rs +++ b/crates/test-app/src/main.rs @@ -4,7 +4,7 @@ use rust_decimal::Decimal; use schematic::{Config, ConfigLoader, Format, ValidateError}; use serde::Serialize; -fn validate_string(_: &str, _: &D, _: &C) -> Result<(), ValidateError> { +fn validate_string(_: &str, _: &D, _: &C, _: bool) -> Result<(), ValidateError> { use schematic::PathSegment; Err(ValidateError::with_segments( "This string is ugly!", @@ -13,7 +13,7 @@ fn validate_string(_: &str, _: &D, _: &C) -> Result<(), ValidateError> { // Ok(()) } -fn validate_number(_: &usize, _: &D, _: &C) -> Result<(), ValidateError> { +fn validate_number(_: &usize, _: &D, _: &C, _: bool) -> Result<(), ValidateError> { Err(ValidateError::new("Nah, we don't accept numbers.")) // Ok(()) } diff --git a/crates/types/Cargo.toml b/crates/types/Cargo.toml index a61e5305..9eadd6b0 100644 --- a/crates/types/Cargo.toml +++ b/crates/types/Cargo.toml @@ -18,8 +18,6 @@ semver = { workspace = true, optional = true } serde_json = { workspace = true, optional = true } serde_yaml = { workspace = true, optional = true } toml = { workspace = true, optional = true } -version_spec = { workspace = true, optional = true } -warpgate = { workspace = true, optional = true } [dev-dependencies] schematic_types = { path = ".", features = [ @@ -33,8 +31,6 @@ schematic_types = { path = ".", features = [ "serde_toml", "serde_yaml", "url", - "version_spec", - "warpgate", ] } [features] @@ -49,5 +45,3 @@ serde_json = ["dep:serde_json"] serde_toml = ["dep:toml"] serde_yaml = ["dep:serde_yaml"] url = ["dep:url"] -version_spec = ["dep:version_spec"] -warpgate = ["dep:warpgate"] diff --git a/crates/types/src/externals.rs b/crates/types/src/externals.rs index ade4d924..150dada4 100644 --- a/crates/types/src/externals.rs +++ b/crates/types/src/externals.rs @@ -185,20 +185,3 @@ mod url_feature { impl_string_format!(url::Url, "uri"); } - -#[cfg(feature = "version_spec")] -mod version_spec_feature { - use super::*; - - impl_string!(version_spec::UnresolvedVersionSpec); - impl_string!(version_spec::VersionSpec); -} - -#[cfg(feature = "warpgate")] -mod warpgate_feature { - use super::*; - - impl_string!(warpgate::Id); - impl_string!(warpgate::PluginLocator); - impl_string_format!(warpgate::VirtualPath, "path"); -}