mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 04:23:40 +00:00
Merge branch 'next' of github.com:Start9Labs/start-os into rebase/integration/refactors
This commit is contained in:
528
system-images/compat/Cargo.lock
generated
528
system-images/compat/Cargo.lock
generated
@@ -41,6 +41,18 @@ dependencies = [
|
||||
"version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ahash"
|
||||
version = "0.8.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"getrandom 0.2.8",
|
||||
"once_cell",
|
||||
"version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aho-corasick"
|
||||
version = "0.7.20"
|
||||
@@ -301,15 +313,6 @@ version = "1.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
||||
|
||||
[[package]]
|
||||
name = "bitmaps"
|
||||
version = "2.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2"
|
||||
dependencies = [
|
||||
"typenum",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bitmaps"
|
||||
version = "3.2.0"
|
||||
@@ -364,44 +367,6 @@ version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae"
|
||||
|
||||
[[package]]
|
||||
name = "bollard"
|
||||
version = "0.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d82e7850583ead5f8bbef247e2a3c37a19bd576e8420cd262a6711921827e1e5"
|
||||
dependencies = [
|
||||
"base64 0.13.1",
|
||||
"bollard-stubs",
|
||||
"bytes",
|
||||
"futures-core",
|
||||
"futures-util",
|
||||
"hex",
|
||||
"http",
|
||||
"hyper",
|
||||
"hyperlocal",
|
||||
"log",
|
||||
"pin-project-lite",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"serde_urlencoded",
|
||||
"thiserror",
|
||||
"tokio",
|
||||
"tokio-util",
|
||||
"url",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bollard-stubs"
|
||||
version = "1.42.0-rc.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ed59b5c00048f48d7af971b71f800fdf23e858844a6f9e4d32ca72e9399e7864"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_with 1.14.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "brotli"
|
||||
version = "3.3.4"
|
||||
@@ -493,7 +458,7 @@ version = "0.9.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "23170228b96236b5a7299057ac284a321457700bc8c41a4476052f0f4ba5349d"
|
||||
dependencies = [
|
||||
"hashbrown",
|
||||
"hashbrown 0.12.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -593,7 +558,7 @@ dependencies = [
|
||||
"indenter",
|
||||
"once_cell",
|
||||
"owo-colors",
|
||||
"tracing-error 0.2.0",
|
||||
"tracing-error",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -605,7 +570,7 @@ dependencies = [
|
||||
"once_cell",
|
||||
"owo-colors",
|
||||
"tracing-core",
|
||||
"tracing-error 0.2.0",
|
||||
"tracing-error",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -618,6 +583,7 @@ dependencies = [
|
||||
"dashmap",
|
||||
"emver",
|
||||
"failure",
|
||||
"imbl-value",
|
||||
"indexmap",
|
||||
"itertools 0.10.5",
|
||||
"lazy_static",
|
||||
@@ -644,6 +610,19 @@ dependencies = [
|
||||
"crossbeam-utils",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "console"
|
||||
version = "0.15.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8"
|
||||
dependencies = [
|
||||
"encode_unicode 0.3.6",
|
||||
"lazy_static",
|
||||
"libc",
|
||||
"unicode-width",
|
||||
"windows-sys 0.45.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "const-oid"
|
||||
version = "0.9.1"
|
||||
@@ -914,38 +893,14 @@ dependencies = [
|
||||
"syn 1.0.107",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "darling"
|
||||
version = "0.13.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c"
|
||||
dependencies = [
|
||||
"darling_core 0.13.4",
|
||||
"darling_macro 0.13.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "darling"
|
||||
version = "0.14.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa"
|
||||
dependencies = [
|
||||
"darling_core 0.14.2",
|
||||
"darling_macro 0.14.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "darling_core"
|
||||
version = "0.13.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610"
|
||||
dependencies = [
|
||||
"fnv",
|
||||
"ident_case",
|
||||
"proc-macro2 1.0.50",
|
||||
"quote 1.0.23",
|
||||
"strsim 0.10.0",
|
||||
"syn 1.0.107",
|
||||
"darling_core",
|
||||
"darling_macro",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -962,24 +917,13 @@ dependencies = [
|
||||
"syn 1.0.107",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "darling_macro"
|
||||
version = "0.13.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835"
|
||||
dependencies = [
|
||||
"darling_core 0.13.4",
|
||||
"quote 1.0.23",
|
||||
"syn 1.0.107",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "darling_macro"
|
||||
version = "0.14.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e"
|
||||
dependencies = [
|
||||
"darling_core 0.14.2",
|
||||
"darling_core",
|
||||
"quote 1.0.23",
|
||||
"syn 1.0.107",
|
||||
]
|
||||
@@ -991,7 +935,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "907076dfda823b0b36d2a1bb5f90c96660a5bbcd7729e10727f07858f22c4edc"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"hashbrown",
|
||||
"hashbrown 0.12.3",
|
||||
"lock_api",
|
||||
"once_cell",
|
||||
"parking_lot_core 0.9.6",
|
||||
@@ -1201,7 +1145,7 @@ dependencies = [
|
||||
"color-eyre",
|
||||
"futures",
|
||||
"helpers",
|
||||
"imbl 2.0.0",
|
||||
"imbl",
|
||||
"nix 0.25.1",
|
||||
"procfs",
|
||||
"serde",
|
||||
@@ -1209,9 +1153,9 @@ dependencies = [
|
||||
"tokio",
|
||||
"tokio-stream",
|
||||
"tracing",
|
||||
"tracing-error 0.2.0",
|
||||
"tracing-error",
|
||||
"tracing-futures",
|
||||
"tracing-subscriber 0.3.16",
|
||||
"tracing-subscriber",
|
||||
"yajrc 0.1.0 (git+https://github.com/dr-bonez/yajrc.git?branch=develop)",
|
||||
]
|
||||
|
||||
@@ -1235,6 +1179,12 @@ dependencies = [
|
||||
"log",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "encode_unicode"
|
||||
version = "0.3.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f"
|
||||
|
||||
[[package]]
|
||||
name = "encode_unicode"
|
||||
version = "1.0.0"
|
||||
@@ -1262,7 +1212,7 @@ version = "0.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c9720bba047d567ffc8a3cba48bf19126600e249ab7f128e9233e6376976a116"
|
||||
dependencies = [
|
||||
"heck 0.4.0",
|
||||
"heck",
|
||||
"proc-macro2 1.0.50",
|
||||
"quote 1.0.23",
|
||||
"syn 1.0.107",
|
||||
@@ -1655,7 +1605,16 @@ version = "0.12.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"ahash 0.7.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
version = "0.13.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e"
|
||||
dependencies = [
|
||||
"ahash 0.8.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1664,23 +1623,14 @@ version = "0.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "69fe1fcf8b4278d860ad0548329f892a3631fb63f82574df68275f34cdbe0ffa"
|
||||
dependencies = [
|
||||
"hashbrown",
|
||||
"hashbrown 0.12.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "heck"
|
||||
version = "0.3.3"
|
||||
version = "0.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c"
|
||||
dependencies = [
|
||||
"unicode-segmentation",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "heck"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9"
|
||||
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
|
||||
dependencies = [
|
||||
"unicode-segmentation",
|
||||
]
|
||||
@@ -1861,19 +1811,6 @@ dependencies = [
|
||||
"tokio-tungstenite",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hyperlocal"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0fafdf7b2b2de7c9784f76e02c0935e65a8117ec3b768644379983ab333ac98c"
|
||||
dependencies = [
|
||||
"futures-util",
|
||||
"hex",
|
||||
"hyper",
|
||||
"pin-project",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "iana-time-zone"
|
||||
version = "0.1.53"
|
||||
@@ -1934,30 +1871,17 @@ dependencies = [
|
||||
"unicode-normalization",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "imbl"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "543682c9082b25e63d03b5acbd65ad111fd49dd93e70843e5175db4ff81d606b"
|
||||
dependencies = [
|
||||
"bitmaps 2.1.0",
|
||||
"rand_core 0.6.4",
|
||||
"rand_xoshiro",
|
||||
"sized-chunks",
|
||||
"typenum",
|
||||
"version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "imbl"
|
||||
version = "2.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c2806b69cd9f4664844027b64465eacb444c67c1db9c778e341adff0c25cdb0d"
|
||||
dependencies = [
|
||||
"bitmaps 3.2.0",
|
||||
"bitmaps",
|
||||
"imbl-sized-chunks",
|
||||
"rand_core 0.6.4",
|
||||
"rand_xoshiro",
|
||||
"serde",
|
||||
"version_check",
|
||||
]
|
||||
|
||||
@@ -1967,7 +1891,19 @@ version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e6957ea0b2541c5ca561d3ef4538044af79f8a05a1eb3a3b148936aaceaa1076"
|
||||
dependencies = [
|
||||
"bitmaps 3.2.0",
|
||||
"bitmaps",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "imbl-value"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/Start9Labs/imbl-value.git#929395141c3a882ac366c12ac9402d0ebaa2201b"
|
||||
dependencies = [
|
||||
"imbl",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"treediff",
|
||||
"yasi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2002,10 +1938,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"hashbrown",
|
||||
"hashbrown 0.12.3",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "indicatif"
|
||||
version = "0.17.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25"
|
||||
dependencies = [
|
||||
"console",
|
||||
"instant",
|
||||
"number_prefix",
|
||||
"portable-atomic",
|
||||
"tokio",
|
||||
"unicode-width",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "instant"
|
||||
version = "0.1.12"
|
||||
@@ -2015,20 +1965,6 @@ dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "internment"
|
||||
version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2a798d7677f07d6f1e77be484ea8626ddb1566194de399f1206306820c406371"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"dashmap",
|
||||
"hashbrown",
|
||||
"once_cell",
|
||||
"parking_lot 0.12.1",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "io-lifetimes"
|
||||
version = "1.0.4"
|
||||
@@ -2125,7 +2061,7 @@ version = "0.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "eb52eeac20f256459e909bd4a03bb8c4fab6a1fdbb8ed52d00f644152df48ece"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"ahash 0.7.6",
|
||||
"dyn-clone",
|
||||
"hifijson",
|
||||
"indexmap",
|
||||
@@ -2188,9 +2124,9 @@ dependencies = [
|
||||
name = "json-patch"
|
||||
version = "0.2.7-alpha.0"
|
||||
dependencies = [
|
||||
"imbl-value",
|
||||
"json-ptr",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"treediff",
|
||||
]
|
||||
|
||||
@@ -2198,17 +2134,18 @@ dependencies = [
|
||||
name = "json-ptr"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"imbl",
|
||||
"imbl-value",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "jsonpath_lib"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "eaa63191d68230cccb81c5aa23abd53ed64d83337cacbb25a7b8c7979523774f"
|
||||
source = "git+https://github.com/Start9Labs/jsonpath.git#1cacbd64afa2e1941a21fef06bad14317ba92f30"
|
||||
dependencies = [
|
||||
"imbl-value",
|
||||
"log",
|
||||
"serde",
|
||||
"serde_json",
|
||||
@@ -2399,6 +2336,15 @@ dependencies = [
|
||||
"autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "memoffset"
|
||||
version = "0.7.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mime"
|
||||
version = "0.3.16"
|
||||
@@ -2436,11 +2382,10 @@ dependencies = [
|
||||
name = "models"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"bollard",
|
||||
"base64 0.21.0",
|
||||
"color-eyre",
|
||||
"ed25519-dalek",
|
||||
"emver",
|
||||
"internment",
|
||||
"ipnet",
|
||||
"lazy_static",
|
||||
"mbrman",
|
||||
@@ -2448,6 +2393,7 @@ dependencies = [
|
||||
"patch-db",
|
||||
"rand 0.8.5",
|
||||
"regex",
|
||||
"reqwest",
|
||||
"rpc-toolkit",
|
||||
"serde",
|
||||
"serde_json",
|
||||
@@ -2457,6 +2403,7 @@ dependencies = [
|
||||
"tokio",
|
||||
"torut",
|
||||
"tracing",
|
||||
"yasi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2502,19 +2449,6 @@ dependencies = [
|
||||
"smallvec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nix"
|
||||
version = "0.23.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8f3790c00a0150112de0f4cd161e3d7fc4b2d8a5542ffc35f099a2562aecb35c"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"cc",
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"memoffset",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nix"
|
||||
version = "0.24.3"
|
||||
@@ -2524,7 +2458,7 @@ dependencies = [
|
||||
"bitflags",
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"memoffset",
|
||||
"memoffset 0.6.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2537,7 +2471,20 @@ dependencies = [
|
||||
"bitflags",
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"memoffset",
|
||||
"memoffset 0.6.5",
|
||||
"pin-utils",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nix"
|
||||
version = "0.26.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"memoffset 0.7.1",
|
||||
"pin-utils",
|
||||
]
|
||||
|
||||
@@ -2686,6 +2633,12 @@ dependencies = [
|
||||
"syn 1.0.107",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "number_prefix"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3"
|
||||
|
||||
[[package]]
|
||||
name = "object"
|
||||
version = "0.30.2"
|
||||
@@ -2899,19 +2852,19 @@ dependencies = [
|
||||
"async-trait",
|
||||
"fd-lock-rs",
|
||||
"futures",
|
||||
"imbl 1.0.1",
|
||||
"imbl",
|
||||
"imbl-value",
|
||||
"json-patch",
|
||||
"json-ptr",
|
||||
"lazy_static",
|
||||
"nix 0.23.2",
|
||||
"nix 0.26.4",
|
||||
"patch-db-macro",
|
||||
"serde",
|
||||
"serde_cbor 0.11.1",
|
||||
"serde_json",
|
||||
"thiserror",
|
||||
"tokio",
|
||||
"tracing",
|
||||
"tracing-error 0.1.2",
|
||||
"tracing-error",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2927,7 +2880,7 @@ dependencies = [
|
||||
name = "patch-db-macro-internals"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"heck 0.3.3",
|
||||
"heck",
|
||||
"proc-macro2 1.0.50",
|
||||
"quote 1.0.23",
|
||||
"syn 1.0.107",
|
||||
@@ -3089,6 +3042,12 @@ version = "0.3.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160"
|
||||
|
||||
[[package]]
|
||||
name = "portable-atomic"
|
||||
version = "1.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "31114a898e107c51bb1609ffaf55a0e011cf6a4d7f1170d0015a165082c0338b"
|
||||
|
||||
[[package]]
|
||||
name = "ppv-lite86"
|
||||
version = "0.2.17"
|
||||
@@ -3108,7 +3067,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "eea25e07510aa6ab6547308ebe3c036016d162b8da920dbb079e3ba8acf3d95a"
|
||||
dependencies = [
|
||||
"csv",
|
||||
"encode_unicode",
|
||||
"encode_unicode 1.0.0",
|
||||
"is-terminal",
|
||||
"lazy_static",
|
||||
"term",
|
||||
@@ -3419,11 +3378,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "reqwest"
|
||||
version = "0.11.13"
|
||||
version = "0.11.20"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "68cc60575865c7831548863cc02356512e3f1dc2f3f82cb837d7fc4cc8f3c97c"
|
||||
checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1"
|
||||
dependencies = [
|
||||
"base64 0.13.1",
|
||||
"base64 0.21.0",
|
||||
"bytes",
|
||||
"cookie",
|
||||
"cookie_store 0.16.1",
|
||||
@@ -3443,7 +3402,6 @@ dependencies = [
|
||||
"once_cell",
|
||||
"percent-encoding",
|
||||
"pin-project-lite",
|
||||
"proc-macro-hack",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_urlencoded",
|
||||
@@ -3455,6 +3413,7 @@ dependencies = [
|
||||
"url",
|
||||
"wasm-bindgen",
|
||||
"wasm-bindgen-futures",
|
||||
"wasm-streams",
|
||||
"web-sys",
|
||||
"winreg",
|
||||
]
|
||||
@@ -3833,16 +3792,6 @@ dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_with"
|
||||
version = "1.14.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "678b5a069e50bf00ecd22d0cd8ddf7c236f68581b03db652061ed5eb13a312ff"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_with_macros 1.5.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_with"
|
||||
version = "2.2.0"
|
||||
@@ -3855,29 +3804,17 @@ dependencies = [
|
||||
"indexmap",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_with_macros 2.2.0",
|
||||
"serde_with_macros",
|
||||
"time 0.3.17",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_with_macros"
|
||||
version = "1.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082"
|
||||
dependencies = [
|
||||
"darling 0.13.4",
|
||||
"proc-macro2 1.0.50",
|
||||
"quote 1.0.23",
|
||||
"syn 1.0.107",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_with_macros"
|
||||
version = "2.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a1966009f3c05f095697c537312f5415d1e3ed31ce0a56942bac4c771c5c335e"
|
||||
dependencies = [
|
||||
"darling 0.14.2",
|
||||
"darling",
|
||||
"proc-macro2 1.0.50",
|
||||
"quote 1.0.23",
|
||||
"syn 1.0.107",
|
||||
@@ -4021,16 +3958,6 @@ version = "0.3.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de"
|
||||
|
||||
[[package]]
|
||||
name = "sized-chunks"
|
||||
version = "0.6.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e"
|
||||
dependencies = [
|
||||
"bitmaps 2.1.0",
|
||||
"typenum",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "slab"
|
||||
version = "0.4.7"
|
||||
@@ -4099,7 +4026,7 @@ version = "0.6.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dcbc16ddba161afc99e14d1713a453747a2b07fc097d2009f4c300ec99286105"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"ahash 0.7.6",
|
||||
"atoi",
|
||||
"base64 0.13.1",
|
||||
"bitflags",
|
||||
@@ -4155,7 +4082,7 @@ checksum = "b850fa514dc11f2ee85be9d055c512aa866746adfacd1cb42d867d68e6a5b0d9"
|
||||
dependencies = [
|
||||
"dotenvy",
|
||||
"either",
|
||||
"heck 0.4.0",
|
||||
"heck",
|
||||
"hex",
|
||||
"once_cell",
|
||||
"proc-macro2 1.0.50",
|
||||
@@ -4221,12 +4148,12 @@ dependencies = [
|
||||
"base64 0.13.1",
|
||||
"base64ct",
|
||||
"basic-cookies",
|
||||
"bollard",
|
||||
"bytes",
|
||||
"chrono",
|
||||
"ciborium",
|
||||
"clap 3.2.23",
|
||||
"color-eyre",
|
||||
"console",
|
||||
"cookie",
|
||||
"cookie_store 0.19.0",
|
||||
"current_platform",
|
||||
@@ -4247,9 +4174,11 @@ dependencies = [
|
||||
"http",
|
||||
"hyper",
|
||||
"hyper-ws-listener",
|
||||
"imbl 2.0.0",
|
||||
"imbl",
|
||||
"imbl-value",
|
||||
"include_dir",
|
||||
"indexmap",
|
||||
"indicatif",
|
||||
"ipnet",
|
||||
"iprange",
|
||||
"isocountry",
|
||||
@@ -4289,7 +4218,7 @@ dependencies = [
|
||||
"scopeguard",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_with 2.2.0",
|
||||
"serde_with",
|
||||
"serde_yaml 0.9.16",
|
||||
"sha2 0.10.6",
|
||||
"sha2 0.9.9",
|
||||
@@ -4309,9 +4238,9 @@ dependencies = [
|
||||
"toml",
|
||||
"torut",
|
||||
"tracing",
|
||||
"tracing-error 0.2.0",
|
||||
"tracing-error",
|
||||
"tracing-futures",
|
||||
"tracing-subscriber 0.3.16",
|
||||
"tracing-subscriber",
|
||||
"trust-dns-server",
|
||||
"typed-builder",
|
||||
"url",
|
||||
@@ -4762,16 +4691,6 @@ dependencies = [
|
||||
"valuable",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-error"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b4d7c0b83d4a500748fa5879461652b361edf5c9d51ede2a2ac03875ca185e24"
|
||||
dependencies = [
|
||||
"tracing",
|
||||
"tracing-subscriber 0.2.25",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-error"
|
||||
version = "0.2.0"
|
||||
@@ -4779,7 +4698,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e"
|
||||
dependencies = [
|
||||
"tracing",
|
||||
"tracing-subscriber 0.3.16",
|
||||
"tracing-subscriber",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4803,17 +4722,6 @@ dependencies = [
|
||||
"tracing-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-subscriber"
|
||||
version = "0.2.25"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71"
|
||||
dependencies = [
|
||||
"sharded-slab",
|
||||
"thread_local",
|
||||
"tracing-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-subscriber"
|
||||
version = "0.3.16"
|
||||
@@ -5198,6 +5106,19 @@ version = "0.2.83"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f"
|
||||
|
||||
[[package]]
|
||||
name = "wasm-streams"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b4609d447824375f43e1ffbc051b50ad8f4b3ae8219680c94452ea05eb240ac7"
|
||||
dependencies = [
|
||||
"futures-util",
|
||||
"js-sys",
|
||||
"wasm-bindgen",
|
||||
"wasm-bindgen-futures",
|
||||
"web-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "web-sys"
|
||||
version = "0.3.60"
|
||||
@@ -5274,13 +5195,13 @@ version = "0.42.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"
|
||||
dependencies = [
|
||||
"windows_aarch64_gnullvm",
|
||||
"windows_aarch64_msvc",
|
||||
"windows_i686_gnu",
|
||||
"windows_i686_msvc",
|
||||
"windows_x86_64_gnu",
|
||||
"windows_x86_64_gnullvm",
|
||||
"windows_x86_64_msvc",
|
||||
"windows_aarch64_gnullvm 0.42.1",
|
||||
"windows_aarch64_msvc 0.42.1",
|
||||
"windows_i686_gnu 0.42.1",
|
||||
"windows_i686_msvc 0.42.1",
|
||||
"windows_x86_64_gnu 0.42.1",
|
||||
"windows_x86_64_gnullvm 0.42.1",
|
||||
"windows_x86_64_msvc 0.42.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5289,7 +5210,16 @@ version = "0.45.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
|
||||
dependencies = [
|
||||
"windows-targets",
|
||||
"windows-targets 0.42.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
|
||||
dependencies = [
|
||||
"windows-targets 0.48.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5298,13 +5228,28 @@ version = "0.42.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7"
|
||||
dependencies = [
|
||||
"windows_aarch64_gnullvm",
|
||||
"windows_aarch64_msvc",
|
||||
"windows_i686_gnu",
|
||||
"windows_i686_msvc",
|
||||
"windows_x86_64_gnu",
|
||||
"windows_x86_64_gnullvm",
|
||||
"windows_x86_64_msvc",
|
||||
"windows_aarch64_gnullvm 0.42.1",
|
||||
"windows_aarch64_msvc 0.42.1",
|
||||
"windows_i686_gnu 0.42.1",
|
||||
"windows_i686_msvc 0.42.1",
|
||||
"windows_x86_64_gnu 0.42.1",
|
||||
"windows_x86_64_gnullvm 0.42.1",
|
||||
"windows_x86_64_msvc 0.42.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-targets"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
|
||||
dependencies = [
|
||||
"windows_aarch64_gnullvm 0.48.5",
|
||||
"windows_aarch64_msvc 0.48.5",
|
||||
"windows_i686_gnu 0.48.5",
|
||||
"windows_i686_msvc 0.48.5",
|
||||
"windows_x86_64_gnu 0.48.5",
|
||||
"windows_x86_64_gnullvm 0.48.5",
|
||||
"windows_x86_64_msvc 0.48.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5313,36 +5258,72 @@ version = "0.42.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_gnullvm"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_msvc"
|
||||
version = "0.42.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_msvc"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnu"
|
||||
version = "0.42.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnu"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_msvc"
|
||||
version = "0.42.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_msvc"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnu"
|
||||
version = "0.42.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnu"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnullvm"
|
||||
version = "0.42.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnullvm"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_msvc"
|
||||
version = "0.42.1"
|
||||
@@ -5350,12 +5331,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd"
|
||||
|
||||
[[package]]
|
||||
name = "winreg"
|
||||
version = "0.10.1"
|
||||
name = "windows_x86_64_msvc"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d"
|
||||
checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
|
||||
|
||||
[[package]]
|
||||
name = "winreg"
|
||||
version = "0.50.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1"
|
||||
dependencies = [
|
||||
"winapi",
|
||||
"cfg-if",
|
||||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5408,6 +5396,18 @@ dependencies = [
|
||||
"linked-hash-map",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "yasi"
|
||||
version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7f355ab62ebe30b758c1f4ab096a306722c4b7dbfb9d8c07d18c70d71a945588"
|
||||
dependencies = [
|
||||
"ahash 0.8.3",
|
||||
"hashbrown 0.13.2",
|
||||
"lazy_static",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zeroize"
|
||||
version = "1.5.7"
|
||||
|
||||
@@ -17,6 +17,7 @@ emver = { version = "0.1.7", git = "https://github.com/Start9Labs/emver-rs.git",
|
||||
] }
|
||||
failure = "0.1.8"
|
||||
indexmap = { version = "1.6.2", features = ["serde"] }
|
||||
imbl-value = { git = "https://github.com/Start9Labs/imbl-value.git" }
|
||||
itertools = "0.10.0"
|
||||
lazy_static = "1.4"
|
||||
linear-map = { version = "1.2", features = ["serde_impl"] }
|
||||
|
||||
@@ -60,11 +60,7 @@ pub fn validate_configuration(
|
||||
)?;
|
||||
std::fs::rename(config_path.with_extension("tmp"), config_path)?;
|
||||
// return set result
|
||||
Ok(SetResult {
|
||||
depends_on,
|
||||
// sending sigterm so service is restarted - in 0.3.x services, this is whatever signal is needed to send to the process to pick up the configuration
|
||||
signal: Some(nix::sys::signal::SIGTERM),
|
||||
})
|
||||
Ok(SetResult { depends_on })
|
||||
}
|
||||
Err(e) => Err(anyhow!("{}", e)),
|
||||
}
|
||||
@@ -83,7 +79,7 @@ pub fn validate_dependency_configuration(
|
||||
if let Some(config) = config {
|
||||
cfgs.insert(name, Cow::Borrowed(&config))
|
||||
} else {
|
||||
cfgs.insert(name, Cow::Owned(serde_json::Map::new()))
|
||||
cfgs.insert(name, Cow::Owned(imbl_value::InOMap::new()))
|
||||
};
|
||||
let rule_check = rules
|
||||
.into_iter()
|
||||
@@ -108,7 +104,7 @@ pub fn apply_dependency_configuration(
|
||||
cfgs.insert(dependency_id, Cow::Owned(dep_config.clone()));
|
||||
match config {
|
||||
Some(config) => cfgs.insert(package_id, Cow::Owned(config.clone())),
|
||||
None => cfgs.insert(package_id, Cow::Owned(serde_json::Map::new())),
|
||||
None => cfgs.insert(package_id, Cow::Owned(imbl_value::InOMap::new())),
|
||||
};
|
||||
let rule_check = rules
|
||||
.into_iter()
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
use std::borrow::Cow;
|
||||
use std::sync::Arc;
|
||||
|
||||
use imbl_value::{InternedString, Value};
|
||||
use linear_map::LinearMap;
|
||||
use pest::iterators::Pairs;
|
||||
use pest::Parser;
|
||||
use rand::SeedableRng;
|
||||
use serde_json::Value;
|
||||
|
||||
use startos::config::util::STATIC_NULL;
|
||||
use startos::config::Config;
|
||||
@@ -382,7 +382,7 @@ fn compile_var_rec(mut ident: Pairs<Rule>) -> Option<Accessor> {
|
||||
match idx.as_rule() {
|
||||
Rule::list_access_function_first => {
|
||||
let mut pred_iter = idx.into_inner();
|
||||
let item_var = pred_iter.next().unwrap().as_str().to_owned();
|
||||
let item_var: InternedString = pred_iter.next().unwrap().as_str().into();
|
||||
let predicate = compile_bool_expr(pred_iter.next().unwrap().into_inner());
|
||||
Box::new(move |v, cfgs| match v {
|
||||
Value::Array(l) => VarRes::Exactly(
|
||||
@@ -411,7 +411,7 @@ fn compile_var_rec(mut ident: Pairs<Rule>) -> Option<Accessor> {
|
||||
}
|
||||
Rule::list_access_function_last => {
|
||||
let mut pred_iter = idx.into_inner();
|
||||
let item_var = pred_iter.next().unwrap().as_str().to_owned();
|
||||
let item_var: InternedString = pred_iter.next().unwrap().as_str().into();
|
||||
let predicate = compile_bool_expr(pred_iter.next().unwrap().into_inner());
|
||||
Box::new(move |v, cfgs| match v {
|
||||
Value::Array(l) => VarRes::Exactly(
|
||||
@@ -440,7 +440,7 @@ fn compile_var_rec(mut ident: Pairs<Rule>) -> Option<Accessor> {
|
||||
}
|
||||
Rule::list_access_function_any => {
|
||||
let mut pred_iter = idx.into_inner();
|
||||
let item_var = pred_iter.next().unwrap().as_str().to_owned();
|
||||
let item_var: InternedString = pred_iter.next().unwrap().as_str().into();
|
||||
let predicate = compile_bool_expr(pred_iter.next().unwrap().into_inner());
|
||||
Box::new(move |v, cfgs| match v {
|
||||
Value::Array(l) => VarRes::Any(
|
||||
@@ -469,7 +469,7 @@ fn compile_var_rec(mut ident: Pairs<Rule>) -> Option<Accessor> {
|
||||
}
|
||||
Rule::list_access_function_all => {
|
||||
let mut pred_iter = idx.into_inner();
|
||||
let item_var = pred_iter.next().unwrap().as_str().to_owned();
|
||||
let item_var: InternedString = pred_iter.next().unwrap().as_str().into();
|
||||
let predicate = compile_bool_expr(pred_iter.next().unwrap().into_inner());
|
||||
Box::new(move |v, cfgs| match v {
|
||||
Value::Array(l) => VarRes::All(
|
||||
@@ -506,7 +506,7 @@ fn compile_var_rec(mut ident: Pairs<Rule>) -> Option<Accessor> {
|
||||
let idx = idx.as_str().to_owned();
|
||||
Box::new(move |v, _| match v {
|
||||
Value::Object(o) => {
|
||||
VarRes::Exactly(o.get(&idx).unwrap_or(&STATIC_NULL))
|
||||
VarRes::Exactly(o.get(&*idx).unwrap_or(&STATIC_NULL))
|
||||
}
|
||||
_ => VarRes::Exactly(&STATIC_NULL),
|
||||
})
|
||||
@@ -514,8 +514,9 @@ fn compile_var_rec(mut ident: Pairs<Rule>) -> Option<Accessor> {
|
||||
Rule::sub_ident_regular_expr => {
|
||||
let idx = compile_str_expr(idx.into_inner().next().unwrap().into_inner());
|
||||
Box::new(move |v, dep_cfg| match v {
|
||||
Value::Object(o) => idx(&Config::default(), dep_cfg)
|
||||
.map(|idx| idx.and_then(|idx| o.get(&idx)).unwrap_or(&STATIC_NULL)),
|
||||
Value::Object(o) => idx(&Config::default(), dep_cfg).map(|idx| {
|
||||
idx.and_then(|idx| o.get(&*idx)).unwrap_or(&STATIC_NULL)
|
||||
}),
|
||||
_ => VarRes::Exactly(&STATIC_NULL),
|
||||
})
|
||||
}
|
||||
@@ -575,7 +576,7 @@ fn compile_var(mut var: Pairs<Rule>) -> CompiledExpr<VarRes<Value>> {
|
||||
return VarRes::Exactly(Value::Null);
|
||||
};
|
||||
}
|
||||
let val = cfg.get(&first_seg_string).unwrap_or(&STATIC_NULL);
|
||||
let val = cfg.get(&*first_seg_string).unwrap_or(&STATIC_NULL);
|
||||
if let Some(accessor) = &accessor {
|
||||
accessor(val, cfgs).map(|v| v.clone())
|
||||
} else {
|
||||
@@ -593,7 +594,7 @@ fn compile_var_mut_rec(mut ident: Pairs<Rule>) -> Result<Option<AccessorMut>, fa
|
||||
match idx.as_rule() {
|
||||
Rule::list_access_function_first => {
|
||||
let mut pred_iter = idx.into_inner();
|
||||
let item_var = pred_iter.next().unwrap().as_str().to_owned();
|
||||
let item_var: InternedString = pred_iter.next().unwrap().as_str().into();
|
||||
let predicate = compile_bool_expr(pred_iter.next().unwrap().into_inner());
|
||||
Box::new(move |v, cfgs| match v {
|
||||
Value::Array(l) => l
|
||||
@@ -618,7 +619,7 @@ fn compile_var_mut_rec(mut ident: Pairs<Rule>) -> Result<Option<AccessorMut>, fa
|
||||
}
|
||||
Rule::list_access_function_last => {
|
||||
let mut pred_iter = idx.into_inner();
|
||||
let item_var = pred_iter.next().unwrap().as_str().to_owned();
|
||||
let item_var: InternedString = pred_iter.next().unwrap().as_str().into();
|
||||
let predicate = compile_bool_expr(pred_iter.next().unwrap().into_inner());
|
||||
Box::new(move |v, cfgs| match v {
|
||||
Value::Array(l) => l
|
||||
@@ -651,14 +652,14 @@ fn compile_var_mut_rec(mut ident: Pairs<Rule>) -> Result<Option<AccessorMut>, fa
|
||||
let idx = idx.into_inner().next().unwrap();
|
||||
match idx.as_rule() {
|
||||
Rule::sub_ident_regular_base => {
|
||||
let idx = idx.as_str().to_owned();
|
||||
let idx: InternedString = idx.as_str().into();
|
||||
Box::new(move |v, _| match v {
|
||||
Value::Object(ref mut o) => {
|
||||
if o.contains_key(&idx) {
|
||||
o.get_mut(&idx)
|
||||
if o.contains_key(&*idx) {
|
||||
o.get_mut(&*idx)
|
||||
} else {
|
||||
o.insert(idx.clone(), Value::Null);
|
||||
o.get_mut(&idx)
|
||||
o.get_mut(&*idx)
|
||||
}
|
||||
}
|
||||
_ => None,
|
||||
@@ -669,11 +670,11 @@ fn compile_var_mut_rec(mut ident: Pairs<Rule>) -> Result<Option<AccessorMut>, fa
|
||||
Box::new(
|
||||
move |v, dep_cfg| match (v, idx(&Config::default(), dep_cfg)) {
|
||||
(Value::Object(ref mut o), VarRes::Exactly(Some(ref idx))) => {
|
||||
if o.contains_key(idx) {
|
||||
o.get_mut(idx)
|
||||
if o.contains_key(&**idx) {
|
||||
o.get_mut(&**idx)
|
||||
} else {
|
||||
o.insert(idx.clone(), Value::Null);
|
||||
o.get_mut(idx)
|
||||
o.get_mut(&**idx)
|
||||
}
|
||||
}
|
||||
_ => None,
|
||||
@@ -693,7 +694,7 @@ fn compile_var_mut_rec(mut ident: Pairs<Rule>) -> Result<Option<AccessorMut>, fa
|
||||
if l.len() > idx {
|
||||
l.get_mut(idx)
|
||||
} else if idx == l.len() {
|
||||
l.push(Value::Null);
|
||||
l.push_back(Value::Null);
|
||||
l.get_mut(idx)
|
||||
} else {
|
||||
None
|
||||
@@ -711,7 +712,7 @@ fn compile_var_mut_rec(mut ident: Pairs<Rule>) -> Result<Option<AccessorMut>, fa
|
||||
if l.len() > idx {
|
||||
l.get_mut(idx)
|
||||
} else if idx == l.len() {
|
||||
l.push(Value::Null);
|
||||
l.push_back(Value::Null);
|
||||
l.get_mut(idx)
|
||||
} else {
|
||||
None
|
||||
@@ -741,11 +742,11 @@ fn compile_var_mut(mut var: Pairs<Rule>) -> Result<CompiledReference, failure::E
|
||||
if first_seg.as_rule() == Rule::app_id {
|
||||
failure::bail!("Can only assign to relative path");
|
||||
}
|
||||
let first_seg_string = first_seg.as_str().to_owned();
|
||||
let first_seg_string: InternedString = first_seg.as_str().into();
|
||||
let accessor_mut = compile_var_mut_rec(var)?;
|
||||
Ok(Box::new(move |cfg, cfgs| {
|
||||
let var = if cfg.contains_key(&first_seg_string) {
|
||||
cfg.get_mut(&first_seg_string).unwrap()
|
||||
let var = if cfg.contains_key(&*first_seg_string) {
|
||||
cfg.get_mut(&*first_seg_string).unwrap()
|
||||
} else {
|
||||
cfg.insert(first_seg_string.clone(), Value::Null);
|
||||
cfg.get_mut(&first_seg_string).unwrap()
|
||||
@@ -865,19 +866,19 @@ fn compile_num_cmp_expr(mut pairs: Pairs<Rule>) -> CompiledRule {
|
||||
}
|
||||
}
|
||||
|
||||
fn compile_str_var(var: Pairs<Rule>) -> CompiledExpr<VarRes<Option<String>>> {
|
||||
fn compile_str_var(var: Pairs<Rule>) -> CompiledExpr<VarRes<Option<InternedString>>> {
|
||||
let var = compile_var(var);
|
||||
Box::new(move |cfg, cfgs| {
|
||||
var(cfg, cfgs).map(|a| match a {
|
||||
Value::String(s) => Some(s),
|
||||
Value::Number(n) => Some(format!("{}", n)),
|
||||
Value::Bool(b) => Some(format!("{}", b)),
|
||||
Value::String(s) => Some(InternedString::from(&*s)),
|
||||
Value::Number(n) => Some(InternedString::from_display(&n)),
|
||||
Value::Bool(b) => Some(InternedString::from_display(&b)),
|
||||
_ => None,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
fn compile_str(str_str: &str) -> CompiledExpr<VarRes<Option<String>>> {
|
||||
fn compile_str(str_str: &str) -> CompiledExpr<VarRes<Option<InternedString>>> {
|
||||
let str_str = &str_str[1..str_str.len() - 1];
|
||||
let mut out = String::with_capacity(str_str.len());
|
||||
let mut escape = false;
|
||||
@@ -904,11 +905,11 @@ fn compile_str(str_str: &str) -> CompiledExpr<VarRes<Option<String>>> {
|
||||
}
|
||||
}
|
||||
}
|
||||
let res = VarRes::Exactly(Some(out));
|
||||
let res = VarRes::Exactly(Some(out.into()));
|
||||
Box::new(move |_, _| res.clone())
|
||||
}
|
||||
|
||||
fn compile_str_expr(pairs: Pairs<Rule>) -> CompiledExpr<VarRes<Option<String>>> {
|
||||
fn compile_str_expr(pairs: Pairs<Rule>) -> CompiledExpr<VarRes<Option<InternedString>>> {
|
||||
STR_PREC_CLIMBER.climb(
|
||||
pairs,
|
||||
|pair| match pair.as_rule() {
|
||||
@@ -921,9 +922,9 @@ fn compile_str_expr(pairs: Pairs<Rule>) -> CompiledExpr<VarRes<Option<String>>>
|
||||
Rule::add => Box::new(move |cfg, cfgs| {
|
||||
lhs(cfg, cfgs).and_then(|lhs| {
|
||||
rhs(cfg, cfgs).map(|rhs| {
|
||||
let lhs = lhs.clone()?;
|
||||
let lhs = lhs.as_ref()?.to_string();
|
||||
let rhs = rhs?;
|
||||
Some(lhs + &rhs)
|
||||
Some(InternedString::from(lhs + &*rhs))
|
||||
})
|
||||
})
|
||||
}),
|
||||
@@ -941,7 +942,7 @@ fn compile_str_cmp_expr(mut pairs: Pairs<Rule>) -> CompiledRule {
|
||||
lhs(cfg, cfgs)
|
||||
.and_then(|lhs| {
|
||||
rhs(cfg, cfgs).map(|rhs| match (&lhs, &rhs) {
|
||||
(Some(lhs), Some(rhs)) => rhs.contains(lhs) && lhs.len() < rhs.len(),
|
||||
(Some(lhs), Some(rhs)) => rhs.contains(&**lhs) && lhs.len() < rhs.len(),
|
||||
_ => false,
|
||||
})
|
||||
})
|
||||
@@ -951,7 +952,7 @@ fn compile_str_cmp_expr(mut pairs: Pairs<Rule>) -> CompiledRule {
|
||||
lhs(cfg, cfgs)
|
||||
.and_then(|lhs| {
|
||||
rhs(cfg, cfgs).map(|rhs| match (&lhs, &rhs) {
|
||||
(Some(lhs), Some(rhs)) => rhs.contains(lhs),
|
||||
(Some(lhs), Some(rhs)) => rhs.contains(&**lhs),
|
||||
_ => false,
|
||||
})
|
||||
})
|
||||
@@ -983,7 +984,7 @@ fn compile_str_cmp_expr(mut pairs: Pairs<Rule>) -> CompiledRule {
|
||||
lhs(cfg, cfgs)
|
||||
.and_then(|lhs| {
|
||||
rhs(cfg, cfgs).map(|rhs| match (&lhs, &rhs) {
|
||||
(Some(lhs), Some(rhs)) => lhs.contains(rhs) && lhs.len() > rhs.len(),
|
||||
(Some(lhs), Some(rhs)) => lhs.contains(&**rhs) && lhs.len() > rhs.len(),
|
||||
_ => true,
|
||||
})
|
||||
})
|
||||
@@ -993,7 +994,7 @@ fn compile_str_cmp_expr(mut pairs: Pairs<Rule>) -> CompiledRule {
|
||||
lhs(cfg, cfgs)
|
||||
.and_then(|lhs| {
|
||||
rhs(cfg, cfgs).map(|rhs| match (&lhs, &rhs) {
|
||||
(Some(lhs), Some(rhs)) => lhs.contains(rhs),
|
||||
(Some(lhs), Some(rhs)) => lhs.contains(&**rhs),
|
||||
_ => true,
|
||||
})
|
||||
})
|
||||
@@ -1037,7 +1038,10 @@ fn compile_value_expr(mut pairs: Pairs<Rule>) -> CompiledExpr<VarRes<Value>> {
|
||||
Rule::str_expr => {
|
||||
let expr = compile_str_expr(expr.into_inner());
|
||||
Box::new(move |cfg, cfgs| {
|
||||
expr(cfg, cfgs).map(|s| s.map(Value::String).unwrap_or(Value::Null))
|
||||
expr(cfg, cfgs).map(|s| {
|
||||
s.map(|s| Value::String(Arc::new(s.to_string())))
|
||||
.unwrap_or(Value::Null)
|
||||
})
|
||||
})
|
||||
}
|
||||
Rule::num_expr => {
|
||||
@@ -1059,7 +1063,7 @@ fn compile_value_expr(mut pairs: Pairs<Rule>) -> CompiledExpr<VarRes<Value>> {
|
||||
|
||||
fn compile_del_action(mut pairs: Pairs<Rule>) -> Result<Mutator, failure::Error> {
|
||||
let list_mut = compile_var_mut(pairs.next().unwrap().into_inner())?;
|
||||
let var = pairs.next().unwrap().as_str().to_owned();
|
||||
let var: InternedString = pairs.next().unwrap().as_str().into();
|
||||
let predicate = compile_bool_expr(pairs.next().unwrap().into_inner());
|
||||
Ok(Box::new(move |cfg, cfgs| match (&list_mut)(cfg, cfgs) {
|
||||
Some(Value::Array(ref mut l)) => {
|
||||
@@ -1093,7 +1097,7 @@ fn compile_push_action(mut pairs: Pairs<Rule>, value: Value) -> Result<Mutator,
|
||||
Some(Value::Array(ref mut a)) => a,
|
||||
_ => return,
|
||||
};
|
||||
vec.push(value.clone())
|
||||
vec.push_back(value.clone())
|
||||
}))
|
||||
}
|
||||
|
||||
@@ -1122,7 +1126,9 @@ fn compile_set_action(var: &str, to: &SetVariant) -> Result<Mutator, failure::Er
|
||||
let entropy = entropy.clone();
|
||||
Box::new(move |cfg, cfgs| {
|
||||
if let Some(var) = get_mut(cfg, cfgs) {
|
||||
*var = Value::String(entropy.gen(&mut rand::rngs::StdRng::from_entropy()));
|
||||
*var = Value::String(Arc::new(
|
||||
entropy.gen(&mut rand::rngs::StdRng::from_entropy()),
|
||||
));
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user