fix: got release builds actually working
This commit is contained in:
parent
118d56fc36
commit
d823603054
255
Cargo.lock
generated
255
Cargo.lock
generated
@ -119,7 +119,7 @@ checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
"synstructure",
|
||||
]
|
||||
|
||||
@ -131,7 +131,7 @@ checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -169,7 +169,7 @@ checksum = "644dd749086bf3771a2fbc5f256fdb982d53f011c7d5d560304eafeecebce79d"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -198,7 +198,7 @@ dependencies = [
|
||||
"manyhow",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -214,7 +214,7 @@ dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"quote-use",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -326,7 +326,7 @@ checksum = "57d123550fa8d071b7255cb0cc04dc302baa6c8c4a79f55701552684d8399bce"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -399,7 +399,7 @@ dependencies = [
|
||||
"regex",
|
||||
"rustc-hash 1.1.0",
|
||||
"shlex",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
"which",
|
||||
]
|
||||
|
||||
@ -474,9 +474,9 @@ checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3"
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.2.11"
|
||||
version = "1.2.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e4730490333d58093109dc02c23174c3f4d490998c3fed3cc8e82d57afedb9cf"
|
||||
checksum = "0c3d1b2e905a3a7b00a6141adb0e4c0bb941d11caf55349d863942a1cc44e3c9"
|
||||
dependencies = [
|
||||
"jobserver",
|
||||
"libc",
|
||||
@ -765,7 +765,7 @@ dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"strsim 0.11.1",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -776,7 +776,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806"
|
||||
dependencies = [
|
||||
"darling_core",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -795,9 +795,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "data-encoding"
|
||||
version = "2.7.0"
|
||||
version = "2.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0e60eed09d8c01d3cee5b7d30acb059b76614c918fa0f992e0dd6eeb10daad6f"
|
||||
checksum = "575f75dfd25738df5b91b8e43e14d44bda14637a58fae779fd2b064f8bf3e010"
|
||||
|
||||
[[package]]
|
||||
name = "default-struct-builder"
|
||||
@ -808,7 +808,7 @@ dependencies = [
|
||||
"darling",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -831,7 +831,7 @@ dependencies = [
|
||||
"proc-macro-error2",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -885,7 +885,7 @@ checksum = "62d671cc41a825ebabc75757b62d3d168c577f9149b2d49ece1dad1f72119d25"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -908,7 +908,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -959,9 +959,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "equivalent"
|
||||
version = "1.0.1"
|
||||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
|
||||
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
|
||||
|
||||
[[package]]
|
||||
name = "errno"
|
||||
@ -1136,7 +1136,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1252,9 +1252,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "guardian"
|
||||
version = "1.2.0"
|
||||
version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "493913a18c0d7bebb75127a26a432162c59edbe06f6cf712001e3e769345e8b5"
|
||||
checksum = "17e2ac29387b1aa07a1e448f7bb4f35b500787971e965b02842b900afa5c8f6f"
|
||||
|
||||
[[package]]
|
||||
name = "h2"
|
||||
@ -1656,7 +1656,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1771,9 +1771,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
|
||||
|
||||
[[package]]
|
||||
name = "leptos"
|
||||
version = "0.7.5"
|
||||
version = "0.7.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "78329c12843d64766d8f00216aae665416d804327302ce8e0ab83884dfa91887"
|
||||
checksum = "88613d81f70f4e267473b2ee107e1ee70cf765a3c3dfee945929c8e9c520b957"
|
||||
dependencies = [
|
||||
"any_spawner",
|
||||
"base64",
|
||||
@ -1792,7 +1792,7 @@ dependencies = [
|
||||
"paste",
|
||||
"rand 0.8.5",
|
||||
"reactive_graph",
|
||||
"rustc-hash 2.1.0",
|
||||
"rustc-hash 2.1.1",
|
||||
"send_wrapper",
|
||||
"serde",
|
||||
"serde_qs",
|
||||
@ -1809,9 +1809,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "leptos-use"
|
||||
version = "0.15.5"
|
||||
version = "0.15.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e63ce77018c615075541d944d678853b5bb40c79510e39edf695cadb9b128e13"
|
||||
checksum = "9c902c63e4b25c2cbe7c02132f81c81fadff6590f2583db2c7063bfb8a77dbdf"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"chrono",
|
||||
@ -1830,9 +1830,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "leptos_axum"
|
||||
version = "0.7.5"
|
||||
version = "0.7.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d59be1dd90fa5102d0a48696c93328c9947aaef19f2dbe9c81f819db3b11a849"
|
||||
checksum = "ba5f7e98cbafa64b6dc0201557d912c39621a324f7bca4d6d069a154e78d3458"
|
||||
dependencies = [
|
||||
"any_spawner",
|
||||
"axum",
|
||||
@ -1854,9 +1854,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "leptos_config"
|
||||
version = "0.7.5"
|
||||
version = "0.7.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "132a18e8ffc4fbe2d624f3743d88a1b4989bff2d5e12be2b0d2749201d9dfb52"
|
||||
checksum = "4172cfee12576224775ccfbb9d3e76625017a8b4207c4641a2f9b96a70e6d524"
|
||||
dependencies = [
|
||||
"config",
|
||||
"regex",
|
||||
@ -1867,9 +1867,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "leptos_dom"
|
||||
version = "0.7.5"
|
||||
version = "0.7.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d468f638f2f13d70d99d9952be98d671a75366034472f3828e586ba62d770049"
|
||||
checksum = "a41f6dc3ddaa09d876d7015f08f4f3905787da4ea5460cef130c365419483a89"
|
||||
dependencies = [
|
||||
"js-sys",
|
||||
"or_poisoned",
|
||||
@ -1882,9 +1882,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "leptos_hot_reload"
|
||||
version = "0.7.5"
|
||||
version = "0.7.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8ba37d76693fc6228554e0bb06a9aa41c59e2b5180caf423c7913557b81d01dd"
|
||||
checksum = "31f5c961e5d9b2aa6deab39d5d842272e8b1b165744b5caf674770d5cf0daa04"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"camino",
|
||||
@ -1894,15 +1894,15 @@ dependencies = [
|
||||
"quote",
|
||||
"rstml",
|
||||
"serde",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
"walkdir",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "leptos_integration_utils"
|
||||
version = "0.7.5"
|
||||
version = "0.7.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "123887e1b34f8fadab385b3192e14a4e5bd84505dec16c31de0b8c4ccc8553d3"
|
||||
checksum = "55d2c530c10566744f1e2c88e7a30d0ebfb971cf609223bb204a2291537b411b"
|
||||
dependencies = [
|
||||
"futures",
|
||||
"hydration_context",
|
||||
@ -1915,9 +1915,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "leptos_macro"
|
||||
version = "0.7.5"
|
||||
version = "0.7.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "064d0c8b144b93f8d7e84b30c16d1da0e64a63c7e91b9a872f7be63601c5868b"
|
||||
checksum = "2b9165909eabb02188a4b33b0ab6acff408bdf440018bf65b30bba0d38d61b19"
|
||||
dependencies = [
|
||||
"attribute-derive",
|
||||
"cfg-if",
|
||||
@ -1931,15 +1931,15 @@ dependencies = [
|
||||
"quote",
|
||||
"rstml",
|
||||
"server_fn_macro",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
"uuid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "leptos_meta"
|
||||
version = "0.7.5"
|
||||
version = "0.7.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3abd2ac7fbfeee757fd569f7db4bdbaafe1e899049435476f06d4be1911f6097"
|
||||
checksum = "4566969810e3f29cfdafd6dd430382e42f72f4cdebfbfa263bd98f75feaf166d"
|
||||
dependencies = [
|
||||
"futures",
|
||||
"indexmap",
|
||||
@ -1953,9 +1953,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "leptos_router"
|
||||
version = "0.7.5"
|
||||
version = "0.7.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8dbc548cc4d127608a79354361df357f53c7d8e89dc14ef9738d789cd338694a"
|
||||
checksum = "e83cf6033f987f366be6ffa556ee22fa6f9f433cbffd173826fd67327c3ae7ed"
|
||||
dependencies = [
|
||||
"any_spawner",
|
||||
"either_of",
|
||||
@ -1978,21 +1978,21 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "leptos_router_macro"
|
||||
version = "0.7.5"
|
||||
version = "0.7.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3010b3a222b5ff3d16421d074f74b52049df4353330373d17f675b2e0f51c9de"
|
||||
checksum = "84f580227933b49028cd3b6d7cd29ab7c6d30f9777cf0ac774eda2aab000a912"
|
||||
dependencies = [
|
||||
"proc-macro-error2",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "leptos_server"
|
||||
version = "0.7.5"
|
||||
version = "0.7.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fb1779f1f0570915066c132fb11f999add8b13d02ca5221735193eb02b3fa69a"
|
||||
checksum = "4fee9ed4526484b17561bc8ce1532c613e37be2c01788fed3d1c4104db674dd9"
|
||||
dependencies = [
|
||||
"any_spawner",
|
||||
"base64",
|
||||
@ -2090,7 +2090,7 @@ dependencies = [
|
||||
"manyhow-macros",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2159,9 +2159,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
|
||||
|
||||
[[package]]
|
||||
name = "miniz_oxide"
|
||||
version = "0.8.3"
|
||||
version = "0.8.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b8402cab7aefae129c6977bb0ff1b8fd9a04eb5b51efc50a70bea51cda0c7924"
|
||||
checksum = "b3b1c9bd4fe1f0f8b387f6eb9eb3b4a1aa26185e5750efb9140301703f62cd1b"
|
||||
dependencies = [
|
||||
"adler2",
|
||||
]
|
||||
@ -2340,9 +2340,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.20.2"
|
||||
version = "1.20.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
|
||||
checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e"
|
||||
|
||||
[[package]]
|
||||
name = "openssl"
|
||||
@ -2367,7 +2367,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2523,7 +2523,7 @@ checksum = "f6e859e6e5bd50440ab63c47e3ebabc90f26251f7c73c3d3e837b74a1cc3fa67"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2587,7 +2587,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6924ced06e1f7dfe3fa48d57b9f74f55d8915f5036121bef647ef4b204895fac"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2633,7 +2633,7 @@ dependencies = [
|
||||
"proc-macro-error-attr2",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2664,7 +2664,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
"version_check",
|
||||
"yansi",
|
||||
]
|
||||
@ -2697,7 +2697,7 @@ dependencies = [
|
||||
"proc-macro-utils",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2719,7 +2719,7 @@ checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94"
|
||||
dependencies = [
|
||||
"rand_chacha 0.9.0",
|
||||
"rand_core 0.9.0",
|
||||
"zerocopy 0.8.14",
|
||||
"zerocopy 0.8.18",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2758,7 +2758,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b08f3c9802962f7e1b25113931d94f43ed9725bebc59db9d0c3e9a23b67e15ff"
|
||||
dependencies = [
|
||||
"getrandom 0.3.1",
|
||||
"zerocopy 0.8.14",
|
||||
"zerocopy 0.8.18",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2777,9 +2777,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "reactive_graph"
|
||||
version = "0.1.5"
|
||||
version = "0.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "059aede5acae8f5c25b1d34b6df34700006418b3c493db3698b7ebcd4a8a6287"
|
||||
checksum = "9996b4c0f501d64a755ff3dfbe9276e9f834d105d7d45059ad4bd6d2a56477d0"
|
||||
dependencies = [
|
||||
"any_spawner",
|
||||
"async-lock",
|
||||
@ -2788,7 +2788,7 @@ dependencies = [
|
||||
"hydration_context",
|
||||
"or_poisoned",
|
||||
"pin-project-lite",
|
||||
"rustc-hash 2.1.0",
|
||||
"rustc-hash 2.1.1",
|
||||
"send_wrapper",
|
||||
"serde",
|
||||
"slotmap",
|
||||
@ -2798,9 +2798,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "reactive_stores"
|
||||
version = "0.1.5"
|
||||
version = "0.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4c7edacf4298579a5772285b8e2dc0b9953c8fbaa9c3f56c3dd69d56e5af7a48"
|
||||
checksum = "74c3d2a20d8edd8ac6628718209f743da86349d7f10a4458304666c2ddfc082e"
|
||||
dependencies = [
|
||||
"guardian",
|
||||
"itertools 0.13.0",
|
||||
@ -2808,20 +2808,20 @@ dependencies = [
|
||||
"paste",
|
||||
"reactive_graph",
|
||||
"reactive_stores_macro",
|
||||
"rustc-hash 2.1.0",
|
||||
"rustc-hash 2.1.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "reactive_stores_macro"
|
||||
version = "0.1.5"
|
||||
version = "0.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "178b1cd8b2871a45bfc8e13ff8076049b6e9a5132e72414e5cab3894c4a6adb3"
|
||||
checksum = "6d4d8e40112b8ee1424e5ec636fcbc9764c1a099e81f8fa818f6762b43cc10cd"
|
||||
dependencies = [
|
||||
"convert_case",
|
||||
"proc-macro-error2",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2879,15 +2879,14 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
|
||||
|
||||
[[package]]
|
||||
name = "ring"
|
||||
version = "0.17.8"
|
||||
version = "0.17.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d"
|
||||
checksum = "e75ec5e92c4d8aede845126adc388046234541629e76029599ed35a003c7ed24"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"cfg-if",
|
||||
"getrandom 0.2.15",
|
||||
"libc",
|
||||
"spin",
|
||||
"untrusted",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
@ -2933,7 +2932,7 @@ dependencies = [
|
||||
"proc-macro2",
|
||||
"proc-macro2-diagnostics",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
"syn_derive",
|
||||
"thiserror 2.0.11",
|
||||
]
|
||||
@ -2962,9 +2961,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
|
||||
|
||||
[[package]]
|
||||
name = "rustc-hash"
|
||||
version = "2.1.0"
|
||||
version = "2.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497"
|
||||
checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"
|
||||
|
||||
[[package]]
|
||||
name = "rusticata-macros"
|
||||
@ -3138,7 +3137,7 @@ checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -3197,9 +3196,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "server_fn"
|
||||
version = "0.7.5"
|
||||
version = "0.7.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5c183c31152fd00e994a3ea0ca43e6017056ccf7812160b0ae008acc3de8241c"
|
||||
checksum = "055476c2a42c9a98a69e3f0ce29b86aa3acbdef19a84e0523330f095097defcf"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"bytes",
|
||||
@ -3233,26 +3232,26 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "server_fn_macro"
|
||||
version = "0.7.5"
|
||||
version = "0.7.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c43b2266308c118be1a1cc60602f8efb07a64e72deed8d317704d5cfda092ca1"
|
||||
checksum = "e65737414a9583ce3b43dddd4e5dfb33fe385a6933ed79a9b539b8eb0767cd07"
|
||||
dependencies = [
|
||||
"const_format",
|
||||
"convert_case",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
"xxhash-rust",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "server_fn_macro_default"
|
||||
version = "0.7.5"
|
||||
version = "0.7.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "087eca61bc8f93d868b8c10ca058da358fd7aaeb7bc8415b572f9f3f27ce0b93"
|
||||
checksum = "563909a43390341403ab76fbc33fde306712613da02244e692eabeae8ffde949"
|
||||
dependencies = [
|
||||
"server_fn_macro",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -3343,9 +3342,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "smallvec"
|
||||
version = "1.13.2"
|
||||
version = "1.14.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
|
||||
checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
@ -3624,7 +3623,7 @@ dependencies = [
|
||||
"quote",
|
||||
"sqlx-core",
|
||||
"sqlx-macros-core",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -3647,7 +3646,7 @@ dependencies = [
|
||||
"sqlx-mysql",
|
||||
"sqlx-postgres",
|
||||
"sqlx-sqlite",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
"tempfile",
|
||||
"tokio",
|
||||
"url",
|
||||
@ -3830,9 +3829,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.96"
|
||||
version = "2.0.98"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80"
|
||||
checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@ -3848,7 +3847,7 @@ dependencies = [
|
||||
"proc-macro-error2",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -3865,14 +3864,14 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tachys"
|
||||
version = "0.1.5"
|
||||
version = "0.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "59a3bbcf8e3b52cad5f0aa860837d4d1796c7c4873b083c9520a1bbba4747973"
|
||||
checksum = "4c05fed41ed4e334257090500510df21bb1611680c0cfd3be14acec7ffdf3d95"
|
||||
dependencies = [
|
||||
"any_spawner",
|
||||
"async-trait",
|
||||
@ -3894,7 +3893,7 @@ dependencies = [
|
||||
"paste",
|
||||
"reactive_graph",
|
||||
"reactive_stores",
|
||||
"rustc-hash 2.1.0",
|
||||
"rustc-hash 2.1.1",
|
||||
"send_wrapper",
|
||||
"slotmap",
|
||||
"throw_error",
|
||||
@ -3951,7 +3950,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -3962,7 +3961,7 @@ checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -4067,7 +4066,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -4118,9 +4117,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "toml"
|
||||
version = "0.8.19"
|
||||
version = "0.8.20"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e"
|
||||
checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_spanned",
|
||||
@ -4139,15 +4138,15 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "toml_edit"
|
||||
version = "0.22.23"
|
||||
version = "0.22.24"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "02a8b472d1a3d7c18e2d61a489aee3453fd9031c33e4f55bd533f4a7adca1bee"
|
||||
checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474"
|
||||
dependencies = [
|
||||
"indexmap",
|
||||
"serde",
|
||||
"serde_spanned",
|
||||
"toml_datetime",
|
||||
"winnow 0.7.0",
|
||||
"winnow 0.7.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -4265,7 +4264,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -4361,7 +4360,7 @@ checksum = "560b82d656506509d43abe30e0ba64c56b1953ab3d4fe7ba5902747a7a3cedd5"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -4464,11 +4463,11 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
|
||||
|
||||
[[package]]
|
||||
name = "uuid"
|
||||
version = "1.12.1"
|
||||
version = "1.13.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b3758f5e68192bb96cc8f9b7e2c2cfdabb435499a28499a42f8f984092adad4b"
|
||||
checksum = "ced87ca4be083373936a67f8de945faa23b6b42384bd5b64434850802c6dccd0"
|
||||
dependencies = [
|
||||
"getrandom 0.2.15",
|
||||
"getrandom 0.3.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -4557,7 +4556,7 @@ dependencies = [
|
||||
"log",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
@ -4592,7 +4591,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
"wasm-bindgen-backend",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
@ -4722,7 +4721,7 @@ checksum = "83577b051e2f49a058c308f17f273b570a6a758386fc291b5f6a934dd84e48c1"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -4733,7 +4732,7 @@ checksum = "cb26fd936d991781ea39e87c3a27285081e3c0da5ca0fcbc02d368cc6f52ff01"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -4977,9 +4976,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "winnow"
|
||||
version = "0.7.0"
|
||||
version = "0.7.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7e49d2d35d3fad69b39b94139037ecfb4f359f08958b9c11e7315ce770462419"
|
||||
checksum = "59690dea168f2198d1a3b0cac23b8063efcd11012f10ae4698f284808c8ef603"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
@ -5074,7 +5073,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
"synstructure",
|
||||
]
|
||||
|
||||
@ -5090,11 +5089,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "zerocopy"
|
||||
version = "0.8.14"
|
||||
version = "0.8.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a367f292d93d4eab890745e75a778da40909cab4d6ff8173693812f79c4a2468"
|
||||
checksum = "79386d31a42a4996e3336b0919ddb90f81112af416270cff95b5f5af22b839c2"
|
||||
dependencies = [
|
||||
"zerocopy-derive 0.8.14",
|
||||
"zerocopy-derive 0.8.18",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -5105,18 +5104,18 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zerocopy-derive"
|
||||
version = "0.8.14"
|
||||
version = "0.8.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d3931cb58c62c13adec22e38686b559c86a30565e16ad6e8510a337cedc611e1"
|
||||
checksum = "76331675d372f91bf8d17e13afbd5fe639200b73d01f0fc748bb059f9cca2db7"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -5136,7 +5135,7 @@ checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
"synstructure",
|
||||
]
|
||||
|
||||
@ -5165,7 +5164,7 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
@ -66,6 +66,7 @@
|
||||
zig
|
||||
clang
|
||||
libclang
|
||||
libgcc
|
||||
mold
|
||||
|
||||
# Tools for building the web UI
|
||||
|
||||
45
packages.nix
45
packages.nix
@ -106,6 +106,26 @@ let
|
||||
RUSTFLAGS = "-Ctarget-feature=+crt-static";
|
||||
};
|
||||
|
||||
webCrateBuildArgs = commonArgs // {
|
||||
nativeBuildInputs = buildTools.linux ++ (with pkgs; [ glibc.static ]);
|
||||
|
||||
SPARSE_INSTALLER_LINUX =
|
||||
"${sparse-installer-linux}/bin/sparse-unix-installer";
|
||||
SPARSE_INSTALLER_FREEBSD =
|
||||
"${sparse-installer-freebsd}/bin/sparse-unix-installer";
|
||||
SPARSE_INSTALLER_WINDOWS =
|
||||
"${sparse-installer-windows}/bin/sparse-windows-installer.exe";
|
||||
|
||||
SPARSE_BEACON_LINUX = "${sparse-beacon-linux}/bin/sparse-unix-beacon";
|
||||
SPARSE_BEACON_LINUX_LOADER = "${linux-loader}/bin/unix-loader";
|
||||
SPARSE_BEACON_FREEBSD = "${sparse-beacon-freebsd}/bin/sparse-unix-beacon";
|
||||
SPARSE_BEACON_FREEBSD_LOADER = "${freebsd-loader}/bin/unix-loader";
|
||||
SPARSE_BEACON_WINDOWS =
|
||||
"${sparse-beacon-windows}/bin/sparse-windows-beacon.exe";
|
||||
SPARSE_BEACON_WINDOWS_SVC =
|
||||
"${sparse-beacon-windows-svc}/bin/sparse-windows-beacon.exe";
|
||||
};
|
||||
|
||||
freebsdArgs = commonArgs // {
|
||||
# Sigh...
|
||||
# For some reason, crane and cargo don't run the build script for FreeBSD
|
||||
@ -127,8 +147,7 @@ let
|
||||
OPENSSL_DIR = win-openssl;
|
||||
};
|
||||
|
||||
gnuLinuxCargoArtifacts = craneLib.buildDepsOnly (commonArgs // {
|
||||
nativeBuildInputs = buildTools.linux ++ (with pkgs; [ glibc.static ]);
|
||||
gnuLinuxCargoArtifacts = craneLib.buildDepsOnly (webCrateBuildArgs // {
|
||||
name = "sparse-deps-gnu-linux";
|
||||
cargoExtraArgs =
|
||||
"--target=x86_64-unknown-linux-gnu --locked -p sparse-server";
|
||||
@ -289,17 +308,17 @@ let
|
||||
SPARSE_LIBRARY = "${sparse-beacon-windows}/lib/sparse_windows_beacon.dll";
|
||||
});
|
||||
|
||||
sparse-server = craneLib.mkCargoDerivation (linuxArgs // {
|
||||
sparse-server = craneLib.mkCargoDerivation (webCrateBuildArgs // {
|
||||
src = fileSetForWebCrate;
|
||||
|
||||
cargoArtifacts = gnuLinuxCargoArtifacts;
|
||||
|
||||
nativeBuildInputs = buildTools.linux ++ (with pkgs; [ glibc.static ]);
|
||||
name = "sparse-server";
|
||||
pname = "sparse-server";
|
||||
|
||||
buildPhaseCargoCommand = ''
|
||||
cargo leptos build \
|
||||
-vv \
|
||||
--release \
|
||||
--project=sparse-server
|
||||
'';
|
||||
@ -311,24 +330,6 @@ let
|
||||
cp target/x86_64-unknown-linux-gnu/release/sparse-server $out/bin
|
||||
'';
|
||||
doCheck = false;
|
||||
|
||||
RUSTFLAGS = "";
|
||||
|
||||
SPARSE_INSTALLER_LINUX =
|
||||
"${sparse-installer-linux}/bin/sparse-unix-installer";
|
||||
SPARSE_INSTALLER_FREEBSD =
|
||||
"${sparse-installer-freebsd}/bin/sparse-unix-installer";
|
||||
SPARSE_INSTALLER_WINDOWS =
|
||||
"${sparse-installer-windows}/bin/sparse-windows-installer.exe";
|
||||
|
||||
SPARSE_BEACON_LINUX = "${sparse-beacon-linux}/bin/sparse-unix-beacon";
|
||||
SPARSE_BEACON_LINUX_LOADER = "${linux-loader}/bin/unix-loader";
|
||||
SPARSE_BEACON_FREEBSD = "${sparse-beacon-freebsd}/bin/sparse-unix-beacon";
|
||||
SPARSE_BEACON_FREEBSD_LOADER = "${freebsd-loader}/bin/unix-loader";
|
||||
SPARSE_BEACON_WINDOWS =
|
||||
"${sparse-beacon-windows}/bin/sparse-windows-beacon.exe";
|
||||
SPARSE_BEACON_WINDOWS_SVC =
|
||||
"${sparse-beacon-windows-svc}/bin/sparse-windows-beacon.exe";
|
||||
});
|
||||
|
||||
sparse-server-docker = pkgs.dockerTools.buildImage {
|
||||
|
||||
@ -12,7 +12,11 @@ pub mod error;
|
||||
pub use error::BeaconError;
|
||||
|
||||
pub fn install_rustls() {
|
||||
#[cfg(feature = "openssl")]
|
||||
let _ = rustls_openssl::default_provider().install_default();
|
||||
|
||||
#[cfg(feature = "ring")]
|
||||
let _ = rustls::crypto::ring::default_provider().install_default();
|
||||
}
|
||||
|
||||
pub async fn run_beacon_step<A>(
|
||||
|
||||
@ -48,6 +48,7 @@ sparse-actions = { path = "../sparse-actions", optional = true }
|
||||
sparse-handler = { path = "../sparse-handler", optional = true }
|
||||
|
||||
[features]
|
||||
embed-beacons = []
|
||||
hydrate = ["leptos/hydrate", "chrono/wasmbind"]
|
||||
ssr = [
|
||||
"dep:axum",
|
||||
|
||||
@ -8,22 +8,7 @@ use leptos_router::{
|
||||
|
||||
use crate::users::User;
|
||||
|
||||
#[server]
|
||||
pub async fn test_retrieve() -> Result<u64, ServerFnError> {
|
||||
use leptos::server_fn::error::NoCustomError;
|
||||
|
||||
tokio::time::sleep(tokio::time::Duration::from_millis(1000)).await;
|
||||
|
||||
let start = std::time::SystemTime::now();
|
||||
let since_the_epoch = start
|
||||
.duration_since(std::time::UNIX_EPOCH)
|
||||
.map_err(|e| ServerFnError::<NoCustomError>::ServerError(e.to_string()))?
|
||||
.as_secs();
|
||||
|
||||
Ok(since_the_epoch)
|
||||
}
|
||||
|
||||
#[server]
|
||||
#[server(endpoint = "me")]
|
||||
pub async fn me() -> Result<Option<User>, ServerFnError> {
|
||||
let user = crate::db::user::get_auth_session().await?;
|
||||
|
||||
@ -33,7 +18,7 @@ pub async fn me() -> Result<Option<User>, ServerFnError> {
|
||||
}))
|
||||
}
|
||||
|
||||
#[server]
|
||||
#[server(endpoint = "login")]
|
||||
async fn login(username: String, password: String, next: String) -> Result<(), ServerFnError> {
|
||||
crate::db::user::create_auth_session(username, password).await?;
|
||||
|
||||
@ -42,7 +27,7 @@ async fn login(username: String, password: String, next: String) -> Result<(), S
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[server]
|
||||
#[server(endpoint = "logout")]
|
||||
async fn logout() -> Result<(), ServerFnError> {
|
||||
crate::db::user::destroy_auth_session().await
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ pub struct Category {
|
||||
pub category_name: String,
|
||||
}
|
||||
|
||||
#[server]
|
||||
#[server(prefix = "/api/categories", endpoint = "get")]
|
||||
pub async fn get_categories() -> Result<Vec<Category>, ServerFnError> {
|
||||
let user = user::get_auth_session().await?;
|
||||
|
||||
@ -21,14 +21,14 @@ pub async fn get_categories() -> Result<Vec<Category>, ServerFnError> {
|
||||
));
|
||||
}
|
||||
|
||||
let db = expect_context::<SqlitePool>();
|
||||
let db = crate::db::get_db()?;
|
||||
|
||||
Ok(sqlx::query_as!(Category, "SELECT * FROM beacon_category")
|
||||
.fetch_all(&db)
|
||||
.await?)
|
||||
}
|
||||
|
||||
#[server]
|
||||
#[server(prefix = "/api/categories", endpoint = "add")]
|
||||
pub async fn add_category(name: String) -> Result<(), ServerFnError> {
|
||||
let user = user::get_auth_session().await?;
|
||||
|
||||
@ -38,7 +38,7 @@ pub async fn add_category(name: String) -> Result<(), ServerFnError> {
|
||||
));
|
||||
}
|
||||
|
||||
let db = expect_context::<SqlitePool>();
|
||||
let db = crate::db::get_db()?;
|
||||
|
||||
sqlx::query!(
|
||||
"INSERT INTO beacon_category (category_name) VALUES (?)",
|
||||
@ -50,7 +50,7 @@ pub async fn add_category(name: String) -> Result<(), ServerFnError> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[server]
|
||||
#[server(prefix = "/api/categories", endpoint = "remove")]
|
||||
pub async fn remove_category(id: i64) -> Result<(), ServerFnError> {
|
||||
let user = user::get_auth_session().await?;
|
||||
|
||||
@ -60,7 +60,7 @@ pub async fn remove_category(id: i64) -> Result<(), ServerFnError> {
|
||||
));
|
||||
}
|
||||
|
||||
let db = expect_context::<SqlitePool>();
|
||||
let db = crate::db::get_db()?;
|
||||
|
||||
sqlx::query!("DELETE FROM beacon_category WHERE category_id = ?", id)
|
||||
.execute(&db)
|
||||
@ -69,7 +69,7 @@ pub async fn remove_category(id: i64) -> Result<(), ServerFnError> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[server]
|
||||
#[server(prefix = "/api/categories", endpoint = "rename")]
|
||||
pub async fn rename_category(id: i64, name: String) -> Result<(), ServerFnError> {
|
||||
let user = user::get_auth_session().await?;
|
||||
|
||||
@ -79,7 +79,7 @@ pub async fn rename_category(id: i64, name: String) -> Result<(), ServerFnError>
|
||||
));
|
||||
}
|
||||
|
||||
let db = expect_context::<SqlitePool>();
|
||||
let db = crate::db::get_db()?;
|
||||
|
||||
sqlx::query!(
|
||||
"UPDATE beacon_category SET category_name = ? WHERE category_id = ?",
|
||||
|
||||
@ -48,7 +48,7 @@ pub struct BeaconConfig {
|
||||
pub config_type: BeaconConfigTypes,
|
||||
}
|
||||
|
||||
#[server]
|
||||
#[server(prefix = "/api/configs", endpoint = "get")]
|
||||
pub async fn get_beacon_configs() -> Result<Vec<BeaconConfig>, ServerFnError> {
|
||||
let user = user::get_auth_session().await?;
|
||||
|
||||
@ -58,14 +58,14 @@ pub async fn get_beacon_configs() -> Result<Vec<BeaconConfig>, ServerFnError> {
|
||||
));
|
||||
}
|
||||
|
||||
let db = expect_context::<SqlitePool>();
|
||||
let db = crate::db::get_db()?;
|
||||
|
||||
Ok(sqlx::query_as("SELECT * FROM beacon_config")
|
||||
.fetch_all(&db)
|
||||
.await?)
|
||||
}
|
||||
|
||||
#[server]
|
||||
#[server(prefix = "/api/configs", endpoint = "add")]
|
||||
pub async fn add_beacon_config(
|
||||
name: String,
|
||||
mode: String,
|
||||
@ -83,7 +83,7 @@ pub async fn add_beacon_config(
|
||||
));
|
||||
}
|
||||
|
||||
let db = expect_context::<SqlitePool>();
|
||||
let db = crate::db::get_db()?;
|
||||
|
||||
match &*mode {
|
||||
"single" => {
|
||||
@ -165,7 +165,7 @@ pub async fn add_beacon_config(
|
||||
}
|
||||
}
|
||||
|
||||
#[server]
|
||||
#[server(prefix = "/api/configs", endpoint = "remove")]
|
||||
pub async fn remove_beacon_config(id: i64) -> Result<(), ServerFnError> {
|
||||
let user = user::get_auth_session().await?;
|
||||
|
||||
@ -175,7 +175,7 @@ pub async fn remove_beacon_config(id: i64) -> Result<(), ServerFnError> {
|
||||
));
|
||||
}
|
||||
|
||||
let db = expect_context::<SqlitePool>();
|
||||
let db = crate::db::get_db()?;
|
||||
|
||||
sqlx::query!("DELETE FROM beacon_config WHERE config_id = ?", id)
|
||||
.execute(&db)
|
||||
|
||||
@ -31,7 +31,7 @@ pub struct PubListener {
|
||||
pub active: bool,
|
||||
}
|
||||
|
||||
#[server]
|
||||
#[server(prefix = "/api/listeners", endpoint = "get")]
|
||||
pub async fn get_listeners() -> Result<Vec<PubListener>, ServerFnError> {
|
||||
let user = user::get_auth_session().await?;
|
||||
|
||||
@ -41,7 +41,7 @@ pub async fn get_listeners() -> Result<Vec<PubListener>, ServerFnError> {
|
||||
));
|
||||
}
|
||||
|
||||
let db = expect_context::<SqlitePool>();
|
||||
let db = crate::db::get_db()?;
|
||||
let beacon_handles = expect_context::<BeaconListenerMap>();
|
||||
|
||||
let listeners = sqlx::query_as!(
|
||||
@ -84,7 +84,7 @@ pub fn generate_cert_from_keypair(
|
||||
params.self_signed(&kp)
|
||||
}
|
||||
|
||||
#[server]
|
||||
#[server(prefix = "/api/listeners", endpoint = "add")]
|
||||
pub async fn add_listener(
|
||||
public_ip: String,
|
||||
port: i16,
|
||||
@ -113,7 +113,7 @@ pub async fn add_listener(
|
||||
})
|
||||
.await??;
|
||||
|
||||
let db = expect_context::<SqlitePool>();
|
||||
let db = crate::db::get_db()?;
|
||||
|
||||
let public_ip = public_ip.to_string();
|
||||
let cert = cert.der().to_vec();
|
||||
@ -133,7 +133,7 @@ pub async fn add_listener(
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[server]
|
||||
#[server(prefix = "/api/listeners", endpoint = "remove")]
|
||||
pub async fn remove_listener(listener_id: i64) -> Result<(), ServerFnError> {
|
||||
let user = user::get_auth_session().await?;
|
||||
|
||||
@ -163,7 +163,7 @@ pub async fn remove_listener(listener_id: i64) -> Result<(), ServerFnError> {
|
||||
blm_handle.remove(&listener_id);
|
||||
}
|
||||
|
||||
let pool = expect_context::<SqlitePool>();
|
||||
let pool = crate::db::get_db()?;
|
||||
|
||||
sqlx::query!(
|
||||
"DELETE FROM beacon_listener WHERE listener_id = ?",
|
||||
@ -175,7 +175,7 @@ pub async fn remove_listener(listener_id: i64) -> Result<(), ServerFnError> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[server]
|
||||
#[server(prefix = "/api/listeners", endpoint = "start")]
|
||||
pub async fn start_listener(listener_id: i64) -> Result<(), ServerFnError> {
|
||||
let user = user::get_auth_session().await?;
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@ cfg_if::cfg_if! {
|
||||
}
|
||||
}
|
||||
|
||||
#[server]
|
||||
#[server(prefix = "/api/templates", endpoint = "add")]
|
||||
pub async fn add_template(
|
||||
template_name: String,
|
||||
operating_system: String,
|
||||
@ -104,7 +104,7 @@ pub async fn add_template(
|
||||
srverr!("Source MAC address is formatted incorrectly");
|
||||
}
|
||||
|
||||
let db = expect_context::<SqlitePool>();
|
||||
let db = crate::db::get_db()?;
|
||||
|
||||
let listener = sqlx::query!(
|
||||
"SELECT domain_name, certificate, privkey FROM beacon_listener WHERE listener_id = ?",
|
||||
@ -199,7 +199,7 @@ pub async fn add_template(
|
||||
}
|
||||
}
|
||||
|
||||
#[server]
|
||||
#[server(prefix = "/api/templates", endpoint = "remove")]
|
||||
pub async fn remove_template(template_id: i64) -> Result<(), ServerFnError> {
|
||||
let user = user::get_auth_session().await?;
|
||||
|
||||
@ -207,7 +207,7 @@ pub async fn remove_template(template_id: i64) -> Result<(), ServerFnError> {
|
||||
srverr!("You are not signed in!");
|
||||
}
|
||||
|
||||
let db = expect_context::<SqlitePool>();
|
||||
let db = crate::db::get_db()?;
|
||||
|
||||
sqlx::query!(
|
||||
"DELETE FROM beacon_template WHERE template_id = ?",
|
||||
@ -219,7 +219,7 @@ pub async fn remove_template(template_id: i64) -> Result<(), ServerFnError> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[server]
|
||||
#[server(prefix = "/api/templates", endpoint = "get")]
|
||||
pub async fn get_templates() -> Result<Vec<BeaconTemplate>, ServerFnError> {
|
||||
let user = user::get_auth_session().await?;
|
||||
|
||||
@ -229,7 +229,7 @@ pub async fn get_templates() -> Result<Vec<BeaconTemplate>, ServerFnError> {
|
||||
));
|
||||
}
|
||||
|
||||
let db = expect_context::<SqlitePool>();
|
||||
let db = crate::db::get_db()?;
|
||||
|
||||
Ok(sqlx::query_as("SELECT * FROM beacon_template")
|
||||
.fetch_all(&db)
|
||||
|
||||
@ -1,2 +1,28 @@
|
||||
#[cfg(feature = "ssr")]
|
||||
pub mod user;
|
||||
|
||||
#[cfg(feature = "ssr")]
|
||||
pub fn get_db() -> Result<sqlx::SqlitePool, leptos::prelude::ServerFnError> {
|
||||
let owner = leptos::prelude::Owner::current().unwrap();
|
||||
tracing::debug!(
|
||||
"Getting DB; debug ID: {:?}; ancestry: {:?}; type ID: {:?}",
|
||||
owner.debug_id(),
|
||||
owner.ancestry(),
|
||||
std::any::TypeId::of::<sqlx::SqlitePool>(),
|
||||
);
|
||||
|
||||
use leptos::{prelude::*, server_fn::error::NoCustomError};
|
||||
|
||||
match use_context::<sqlx::SqlitePool>() {
|
||||
Some(v) => {
|
||||
tracing::debug!("Got db pool!");
|
||||
Ok(v)
|
||||
}
|
||||
None => {
|
||||
tracing::debug!("Didn't get db pool!");
|
||||
Err(ServerFnError::<NoCustomError>::ServerError(
|
||||
"Could not use database connection".to_string(),
|
||||
))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
use leptos::prelude::ServerFnError;
|
||||
use leptos::{prelude::expect_context, server_fn::error::NoCustomError};
|
||||
use leptos::{prelude::*, server_fn::error::NoCustomError};
|
||||
use leptos_axum::{extract, ResponseOptions};
|
||||
use pbkdf2::{
|
||||
password_hash::{
|
||||
@ -121,7 +120,7 @@ pub async fn create_auth_session(username: String, password: String) -> Result<(
|
||||
use axum::http::{header, HeaderValue};
|
||||
use axum_extra::extract::cookie::{Cookie, SameSite};
|
||||
|
||||
let db = expect_context::<SqlitePool>();
|
||||
let db = crate::db::get_db()?;
|
||||
let resp = expect_context::<ResponseOptions>();
|
||||
|
||||
let user: Option<User> =
|
||||
@ -181,7 +180,7 @@ pub async fn create_auth_session(username: String, password: String) -> Result<(
|
||||
pub async fn destroy_auth_session() -> Result<(), ServerFnError> {
|
||||
use axum_extra::extract::cookie::CookieJar;
|
||||
|
||||
let db = expect_context::<SqlitePool>();
|
||||
let db = crate::db::get_db()?;
|
||||
let jar = extract::<CookieJar>().await?;
|
||||
|
||||
let Some(cookie) = jar.get(SESSION_ID_KEY) else {
|
||||
@ -200,7 +199,10 @@ pub async fn destroy_auth_session() -> Result<(), ServerFnError> {
|
||||
pub async fn get_auth_session() -> Result<Option<User>, ServerFnError> {
|
||||
use axum_extra::extract::cookie::CookieJar;
|
||||
|
||||
let db = expect_context::<SqlitePool>();
|
||||
println!("In get auth session");
|
||||
let owner = leptos::prelude::Owner::current().unwrap();
|
||||
|
||||
let db = crate::db::get_db()?;
|
||||
let jar = extract::<CookieJar>().await?;
|
||||
|
||||
let Some(cookie) = jar.get(SESSION_ID_KEY) else {
|
||||
|
||||
@ -21,7 +21,7 @@ async fn main() -> anyhow::Result<std::process::ExitCode> {
|
||||
tracing_subscriber::registry()
|
||||
.with(
|
||||
tracing_subscriber::EnvFilter::try_from_default_env().unwrap_or_else(|_| {
|
||||
format!("{}=debug,sparse_handler=debug", env!("CARGO_CRATE_NAME")).into()
|
||||
format!("{}=debug,sparse_handler=debug,tower_http=trace", env!("CARGO_CRATE_NAME")).into()
|
||||
}),
|
||||
)
|
||||
.with(tracing_subscriber::fmt::layer())
|
||||
|
||||
@ -58,7 +58,7 @@ pub struct PubUser {
|
||||
last_active: Option<DateTime<Utc>>,
|
||||
}
|
||||
|
||||
#[server]
|
||||
#[server(prefix = "/api/users", endpoint = "delete")]
|
||||
async fn delete_user(user_id: i64) -> Result<(), ServerFnError> {
|
||||
let user = user::get_auth_session().await?;
|
||||
|
||||
@ -68,7 +68,7 @@ async fn delete_user(user_id: i64) -> Result<(), ServerFnError> {
|
||||
));
|
||||
}
|
||||
|
||||
let pool = expect_context::<SqlitePool>();
|
||||
let pool = crate::db::get_db()?;
|
||||
|
||||
sqlx::query!("DELETE FROM users WHERE user_id = ?", user_id)
|
||||
.execute(&pool)
|
||||
@ -77,7 +77,7 @@ async fn delete_user(user_id: i64) -> Result<(), ServerFnError> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[server]
|
||||
#[server(prefix = "/api/users", endpoint = "reset")]
|
||||
async fn reset_password(user_id: i64, password: String) -> Result<(), ServerFnError> {
|
||||
let user = user::get_auth_session().await?;
|
||||
|
||||
@ -87,7 +87,7 @@ async fn reset_password(user_id: i64, password: String) -> Result<(), ServerFnEr
|
||||
));
|
||||
}
|
||||
|
||||
let pool = expect_context::<SqlitePool>();
|
||||
let pool = crate::db::get_db()?;
|
||||
|
||||
crate::db::user::reset_password(&pool, user_id as i16, password).await?;
|
||||
|
||||
@ -226,7 +226,7 @@ pub fn RenderUser(refresh_user_list: Action<(), ()>, user: PubUser) -> impl Into
|
||||
}
|
||||
}
|
||||
|
||||
#[server]
|
||||
#[server(prefix = "/api/users", endpoint = "list")]
|
||||
async fn list_users() -> Result<Vec<PubUser>, ServerFnError> {
|
||||
let user = user::get_auth_session().await?;
|
||||
|
||||
@ -238,7 +238,7 @@ async fn list_users() -> Result<Vec<PubUser>, ServerFnError> {
|
||||
|
||||
use futures::stream::StreamExt;
|
||||
|
||||
let pool = expect_context::<SqlitePool>();
|
||||
let pool = crate::db::get_db()?;
|
||||
|
||||
let users = sqlx::query_as!(DbUser, "SELECT user_id, user_name, last_active FROM users")
|
||||
.fetch(&pool)
|
||||
@ -260,7 +260,7 @@ async fn list_users() -> Result<Vec<PubUser>, ServerFnError> {
|
||||
Ok(users?)
|
||||
}
|
||||
|
||||
#[server]
|
||||
#[server(prefix = "/api/users", endpoint = "add")]
|
||||
async fn add_user(name: String, password: String) -> Result<(), ServerFnError> {
|
||||
let user = user::get_auth_session().await?;
|
||||
|
||||
@ -270,7 +270,7 @@ async fn add_user(name: String, password: String) -> Result<(), ServerFnError> {
|
||||
));
|
||||
}
|
||||
|
||||
let pool = expect_context::<SqlitePool>();
|
||||
let pool = crate::db::get_db()?;
|
||||
|
||||
crate::db::user::create_user(&pool, name, password).await?;
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ use std::{net::SocketAddrV4, process::ExitCode};
|
||||
use axum::{
|
||||
extract::{FromRef, Path, Query, State},
|
||||
response::IntoResponse,
|
||||
routing::get,
|
||||
routing::{get, post},
|
||||
Router,
|
||||
};
|
||||
use leptos::prelude::*;
|
||||
@ -323,18 +323,30 @@ pub async fn serve_web(
|
||||
db: db.clone(),
|
||||
};
|
||||
|
||||
println!("{:?}", std::any::TypeId::of::<SqlitePool>());
|
||||
|
||||
dbg!(&routes);
|
||||
|
||||
let app = Router::new()
|
||||
.route(
|
||||
"/binaries/installer/:template_id",
|
||||
get(download_beacon_installer),
|
||||
)
|
||||
.route("/binaries/beacon/:template_id", get(download_beacon))
|
||||
.route("/api/*fn_name", post(leptos_axum::handle_server_fns))
|
||||
.leptos_routes_with_context(
|
||||
&state,
|
||||
routes,
|
||||
move || {
|
||||
let owner = leptos::prelude::Owner::current().unwrap();
|
||||
tracing::debug!(
|
||||
"Providing DB; debug ID: {:?}; ancestry: {:?}; type ID: {:?}",
|
||||
owner.debug_id(),
|
||||
owner.ancestry(),
|
||||
std::any::TypeId::of::<sqlx::SqlitePool>(),
|
||||
);
|
||||
provide_context(beacon_listeners.clone());
|
||||
provide_context::<SqlitePool>(db.clone());
|
||||
provide_context(db.clone());
|
||||
},
|
||||
{
|
||||
let leptos_options = leptos_options.clone();
|
||||
|
||||
@ -8,6 +8,8 @@ mod adapter;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> anyhow::Result<()> {
|
||||
sparse_beacon::install_rustls();
|
||||
|
||||
let mut binary_file = tokio::fs::OpenOptions::new()
|
||||
.read(true)
|
||||
.open(std::env::current_exe()?)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user