diff --git a/.pmomusic.yml b/.pmomusic.yml index a7f84c7e..c91972b5 100644 --- a/.pmomusic.yml +++ b/.pmomusic.yml @@ -1,9 +1,9 @@ devices: - mediarenderer: - fakerenderer: - udn: d7eaad15-7d21-4411-926a-bc1eea0713db - mediaserver: - qobuz: - udn: 28963b75-4c5f-4da7-b10e-ffafd + mediarenderer: + fakerenderer: + udn: d7eaad15-7d21-4411-926a-bc1eea0713db + mediaserver: + qobuz: + udn: 28963b75-4c5f-4da7-b10e-ffafd host: - http_port: "8080" + http_port: '8080' diff --git a/Cargo.lock b/Cargo.lock index 6f21dc06..63ce9106 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5,6 +5,39 @@ version = 4 [[package]] name = "PMOMusic" version = "0.1.0" +dependencies = [ + "axum", + "pmoconfig", + "pmoupnp", + "serde_json", + "tokio", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "addr2line" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] [[package]] name = "android_system_properties" @@ -15,18 +48,195 @@ dependencies = [ "libc", ] +[[package]] +name = "anyhow" +version = "1.0.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" + +[[package]] +name = "async-stream" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "async-trait" +version = "0.1.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "autocfg" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +[[package]] +name = "axum" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18ed336352031311f4e0b4dd2ff392d4fbb370777c9d18d7fc9d7359f73871" +dependencies = [ + "axum-core 0.5.5", + "bytes", + "form_urlencoded", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "serde_core", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "axum-core" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "mime", + "pin-project-lite", + "rustversion", + "sync_wrapper", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59446ce19cd142f8833f856eb31f3eb097812d1479ab224f54d72428ca21ea22" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "http-body-util", + "mime", + "pin-project-lite", + "sync_wrapper", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "axum-embed" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "077959a7f8cf438676af90b483304528eb7e16eadadb7f44e9ada4f9dceb9e62" +dependencies = [ + "axum-core 0.4.5", + "chrono", + "http", + "mime_guess", + "rust-embed", + "tower-service", +] + +[[package]] +name = "axum-server" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "495c05f60d6df0093e8fb6e74aa5846a0ad06abaf96d76166283720bf740f8ab" +dependencies = [ + "bytes", + "fs-err", + "http", + "http-body", + "hyper", + "hyper-util", + "tokio", + "tower-service", +] + +[[package]] +name = "backtrace" +version = "0.3.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-link", +] + [[package]] name = "base64" version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "bitflags" +version = "2.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + [[package]] name = "bumpalo" version = "3.19.0" @@ -34,10 +244,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" [[package]] -name = "cc" -version = "1.2.37" +name = "bytes" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65193589c6404eb80b450d618eaf9a2cafaaafd57ecce47370519ef674a7bd44" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" + +[[package]] +name = "c_linked_list" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4964518bd3b4a8190e832886cdc0da9794f12e8e6c1613a9e90ff331c4c8724b" + +[[package]] +name = "cc" +version = "1.2.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1354349954c6fc9cb0deab020f27f783cf0b604e8bb754dc4658ecf0d29c35f" dependencies = [ "find-msvc-tools", "shlex", @@ -58,6 +280,7 @@ dependencies = [ "iana-time-zone", "js-sys", "num-traits", + "serde", "wasm-bindgen", "windows-link", ] @@ -68,6 +291,56 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "dirs" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.61.1", +] + [[package]] name = "displaydoc" version = "0.2.5" @@ -80,10 +353,22 @@ dependencies = [ ] [[package]] -name = "find-msvc-tools" -version = "0.1.1" +name = "equivalent" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fd99930f64d146689264c637b5af2f0233a933bef0d8570e2526bf9e083192d" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "find-msvc-tools" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ced73b1dacfc750a6db6c0a0c3a3853c8b41997e2e2c563dc90804ae6867959" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" @@ -94,12 +379,287 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fs-err" +version = "3.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44f150ffc8782f35521cec2b23727707cb4045706ba3c854e86bef66b3a8cdbd" +dependencies = [ + "autocfg", + "tokio", +] + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "gcc" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "get_if_addrs" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abddb55a898d32925f3148bd281174a68eeb68bbfd9a5938a57b18f506ee4ef7" +dependencies = [ + "c_linked_list", + "get_if_addrs-sys", + "libc", + "winapi", +] + +[[package]] +name = "get_if_addrs-sys" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d04f9fb746cf36b191c00f3ede8bde9c8e64f9f4b05ae2694a9ccf5e3f5ab48" +dependencies = [ + "gcc", + "libc", +] + +[[package]] +name = "getrandom" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasi 0.14.7+wasi-0.2.4", +] + +[[package]] +name = "gimli" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" + +[[package]] +name = "h2" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" + [[package]] name = "hex" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "http" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "pin-utils", + "smallvec", + "tokio", +] + +[[package]] +name = "hyper-util" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c6995591a8f1380fcb4ba966a252a4b29188d51d2b89e3a252f5305be65aea8" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "hyper", + "pin-project-lite", + "tokio", + "tower-service", +] + [[package]] name = "iana-time-zone" version = "0.1.64" @@ -232,20 +792,63 @@ dependencies = [ ] [[package]] -name = "js-sys" -version = "0.3.78" +name = "indexmap" +version = "2.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c0b063578492ceec17683ef2f8c5e89121fbd0b172cbc280635ab7567db2738" +checksum = "4b0f83760fb341a774ed326568e19f5a863af4a952def8c39f9ab92fd95b88e5" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "io-uring" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b" +dependencies = [ + "bitflags", + "cfg-if", + "libc", +] + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "js-sys" +version = "0.3.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec48937a97411dcb524a265206ccd4c90bb711fca92b2792c407f268825b9305" dependencies = [ "once_cell", "wasm-bindgen", ] [[package]] -name = "libc" -version = "0.2.175" +name = "lazy_static" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "libc" +version = "0.2.176" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58f929b4d672ea937a23a1ab494143d968337a5f47e56d0815df1e0890ddf174" + +[[package]] +name = "libredox" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb" +dependencies = [ + "bitflags", + "libc", +] [[package]] name = "litemap" @@ -253,12 +856,88 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" +[[package]] +name = "lock_api" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" +dependencies = [ + "autocfg", + "scopeguard", +] + [[package]] name = "log" version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" +[[package]] +name = "matchers" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" +dependencies = [ + "regex-automata", +] + +[[package]] +name = "matchit" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" + +[[package]] +name = "memchr" +version = "2.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", +] + +[[package]] +name = "mio" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" +dependencies = [ + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", + "windows-sys 0.59.0", +] + +[[package]] +name = "nu-ansi-term" +version = "0.50.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4a28e057d01f97e61255210fcff094d74ed0466038633e95017f5beb68e4399" +dependencies = [ + "windows-sys 0.52.0", +] + [[package]] name = "num-traits" version = "0.2.19" @@ -268,31 +947,122 @@ dependencies = [ "autocfg", ] +[[package]] +name = "object" +version = "0.37.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" +dependencies = [ + "memchr", +] + [[package]] name = "once_cell" version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "parking_lot" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets", +] + [[package]] name = "percent-encoding" version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pmoconfig" +version = "0.1.0" +dependencies = [ + "anyhow", + "dirs", + "lazy_static", + "log", + "pmoutils", + "serde", + "serde_yaml", + "tracing", + "uuid", +] + [[package]] name = "pmoupnp" version = "0.1.0" dependencies = [ + "anyhow", + "async-stream", + "axum", + "axum-embed", + "axum-server", "base64", "chrono", + "futures", + "futures-util", + "get_if_addrs", "hex", + "log", + "once_cell", + "parking_lot", + "pmoconfig", + "rust-embed", + "serde", + "serde_json", "thiserror", + "tokio", + "tokio-stream", + "tracing", + "tracing-subscriber", "url", "uuid", "xmltree", ] +[[package]] +name = "pmoutils" +version = "0.1.0" +dependencies = [ + "get_if_addrs", +] + [[package]] name = "potential_utf" version = "0.1.3" @@ -313,13 +1083,96 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.40" +version = "1.0.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1" dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "redox_syscall" +version = "0.5.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" +dependencies = [ + "bitflags", +] + +[[package]] +name = "redox_users" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" +dependencies = [ + "getrandom 0.2.16", + "libredox", + "thiserror", +] + +[[package]] +name = "regex-automata" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "833eb9ce86d40ef33cb1306d8accf7bc8ec2bfea4355cbdebb3df68b40925cad" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" + +[[package]] +name = "rust-embed" +version = "8.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "025908b8682a26ba8d12f6f2d66b987584a4a87bc024abc5bbc12553a8cd178a" +dependencies = [ + "rust-embed-impl", + "rust-embed-utils", + "walkdir", +] + +[[package]] +name = "rust-embed-impl" +version = "8.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6065f1a4392b71819ec1ea1df1120673418bf386f50de1d6f54204d836d4349c" +dependencies = [ + "proc-macro2", + "quote", + "rust-embed-utils", + "syn", + "walkdir", +] + +[[package]] +name = "rust-embed-utils" +version = "8.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6cc0c81648b20b70c491ff8cce00c1c3b223bb8ed2b5d41f0e54c6c4c0a3594" +dependencies = [ + "sha2", + "walkdir", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" + [[package]] name = "rustversion" version = "1.0.22" @@ -327,10 +1180,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] -name = "serde" -version = "1.0.225" +name = "ryu" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6c24dee235d0da097043389623fb913daddf92c76e9f5a1db88607a0bcbd1d" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" dependencies = [ "serde_core", "serde_derive", @@ -338,36 +1212,130 @@ dependencies = [ [[package]] name = "serde_core" -version = "1.0.225" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "659356f9a0cb1e529b24c01e43ad2bdf520ec4ceaf83047b83ddcc2251f96383" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.225" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea936adf78b1f766949a4977b91d2f5595825bd6ec079aa9543ad2685fc4516" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", "syn", ] +[[package]] +name = "serde_json" +version = "1.0.145" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", + "serde_core", +] + +[[package]] +name = "serde_path_to_error" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457" +dependencies = [ + "itoa", + "serde", + "serde_core", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_yaml" +version = "0.9.34+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" +dependencies = [ + "indexmap", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + [[package]] name = "shlex" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +[[package]] +name = "signal-hook-registry" +version = "1.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" +dependencies = [ + "libc", +] + +[[package]] +name = "slab" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" + [[package]] name = "smallvec" version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +[[package]] +name = "socket2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -385,6 +1353,12 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" + [[package]] name = "synstructure" version = "0.13.2" @@ -398,24 +1372,33 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.16" +version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0" +checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "2.0.16" +version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960" +checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" dependencies = [ "proc-macro2", "quote", "syn", ] +[[package]] +name = "thread_local" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" +dependencies = [ + "cfg-if", +] + [[package]] name = "tinystr" version = "0.8.1" @@ -426,12 +1409,174 @@ dependencies = [ "zerovec", ] +[[package]] +name = "tokio" +version = "1.47.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" +dependencies = [ + "backtrace", + "bytes", + "io-uring", + "libc", + "mio", + "pin-project-lite", + "signal-hook-registry", + "slab", + "socket2", + "tokio-macros", + "windows-sys 0.59.0", +] + +[[package]] +name = "tokio-macros" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tokio-stream" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex-automata", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "typenum" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" + +[[package]] +name = "unicase" +version = "2.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" + [[package]] name = "unicode-ident" version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d" +[[package]] +name = "unsafe-libyaml" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" + [[package]] name = "url" version = "2.5.7" @@ -456,15 +1601,62 @@ version = "1.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2" dependencies = [ + "getrandom 0.3.3", "js-sys", "wasm-bindgen", ] [[package]] -name = "wasm-bindgen" -version = "0.2.101" +name = "valuable" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e14915cadd45b529bb8d1f343c4ed0ac1de926144b746e2710f9cd05df6603b" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasi" +version = "0.14.7+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "883478de20367e224c0090af9cf5f9fa85bed63a95c1abf3afc5c083ebc06e8c" +dependencies = [ + "wasip2", +] + +[[package]] +name = "wasip2" +version = "1.0.1+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1da10c01ae9f1ae40cbfac0bac3b1e724b320abfcf52229f80b547c0d250e2d" dependencies = [ "cfg-if", "once_cell", @@ -475,9 +1667,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.101" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28d1ba982ca7923fd01448d5c30c6864d0a14109560296a162f80f305fb93bb" +checksum = "671c9a5a66f49d8a47345ab942e2cb93c7d1d0339065d4f8139c486121b43b19" dependencies = [ "bumpalo", "log", @@ -489,9 +1681,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.101" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c3d463ae3eff775b0c45df9da45d68837702ac35af998361e2c84e7c5ec1b0d" +checksum = "7ca60477e4c59f5f2986c50191cd972e3a50d8a95603bc9434501cf156a9a119" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -499,9 +1691,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.101" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bb4ce89b08211f923caf51d527662b75bdc9c9c7aab40f86dcb9fb85ac552aa" +checksum = "9f07d2f20d4da7b26400c9f4a0511e6e0345b040694e8a75bd41d578fa4421d7" dependencies = [ "proc-macro2", "quote", @@ -512,18 +1704,33 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.101" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f143854a3b13752c6950862c906306adb27c7e839f7414cec8fea35beab624c1" +checksum = "bad67dc8b2a1a6e5448428adec4c3e84c43e561d8c9ee8a9e5aabeb193ec41d1" dependencies = [ "unicode-ident", ] [[package]] -name = "windows-core" -version = "0.62.0" +name = "winapi" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57fe7168f7de578d2d8a05b07fd61870d2e73b4020e9f49aa00da8471723497c" +checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.1", +] + +[[package]] +name = "windows-core" +version = "0.62.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6844ee5416b285084d3d3fffd743b925a6c9385455f64f6d4fa3031c4c2749a9" dependencies = [ "windows-implement", "windows-interface", @@ -534,9 +1741,9 @@ dependencies = [ [[package]] name = "windows-implement" -version = "0.60.0" +version = "0.60.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" +checksum = "edb307e42a74fb6de9bf3a02d9712678b22399c87e6fa869d6dfcd8c1b7754e0" dependencies = [ "proc-macro2", "quote", @@ -545,9 +1752,9 @@ dependencies = [ [[package]] name = "windows-interface" -version = "0.59.1" +version = "0.59.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" +checksum = "c0abd1ddbc6964ac14db11c7213d6532ef34bd9aa042c2e5935f59d7908b46a5" dependencies = [ "proc-macro2", "quote", @@ -578,6 +1785,103 @@ dependencies = [ "windows-link", ] +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.61.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f109e41dd4a3c848907eb83d5a42ea98b3769495597450cf6d153507b166f0f" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "wit-bindgen" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" + [[package]] name = "writeable" version = "0.6.1" diff --git a/Cargo.toml b/Cargo.toml index a8514150..54434dea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,3 @@ [workspace] resolver = "3" -members = ["PMOMusic", "pmoupnp"] +members = ["PMOMusic", "pmoupnp","pmoconfig", "pmoutils"] diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..6540c5c5 --- /dev/null +++ b/Makefile @@ -0,0 +1,190 @@ +# Makefile pour projet Rust + Vue.js +# Variables de configuration +CARGO = cargo +NPM = npm +WEBAPP_DIR = pmoupnp/webapp +DIST_DIR = $(WEBAPP_DIR)/dist +RUST_TARGET = target/release +DOC_DIR = target/doc +BINARY_NAME = PMOMusic + +# Couleurs pour l'affichage +GREEN = \033[0;32m +YELLOW = \033[1;33m +RED = \033[0;31m +NC = \033[0m # No Color + +.PHONY: all help build release debug test doc webapp clean install dev check fmt clippy watch + +# Cible par défaut +all: build + +## help: Affiche cette aide +help: + @echo "$(GREEN)Commandes disponibles :$(NC)" + @sed -n 's/^##//p' $(MAKEFILE_LIST) | column -t -s ':' | sed -e 's/^/ /' + +## build: Compile tout (Rust + Vue.js) +build: webapp release + @echo "$(GREEN)✓ Build complet terminé$(NC)" + +## release: Compile le binaire Rust en mode release +release: + @echo "$(YELLOW)→ Compilation Rust (release)...$(NC)" + $(CARGO) build --release + @echo "$(GREEN)✓ Binaire disponible : $(RUST_TARGET)/$(BINARY_NAME)$(NC)" + +## debug: Compile le binaire Rust en mode debug +debug: + @echo "$(YELLOW)→ Compilation Rust (debug)...$(NC)" + $(CARGO) build + @echo "$(GREEN)✓ Binaire disponible : target/debug/$(BINARY_NAME)$(NC)" + +## test: Exécute tous les tests Rust +test: + @echo "$(YELLOW)→ Exécution des tests Rust...$(NC)" + $(CARGO) test --all + @echo "$(GREEN)✓ Tests terminés$(NC)" + +## test-doc: Teste les exemples dans la documentation +test-doc: + @echo "$(YELLOW)→ Test des exemples de documentation...$(NC)" + $(CARGO) test --doc + @echo "$(GREEN)✓ Tests de documentation terminés$(NC)" + +## doc: Génère et ouvre la documentation Rust +doc: + @echo "$(YELLOW)→ Génération de la documentation...$(NC)" + $(CARGO) doc --no-deps --document-private-items --open + @echo "$(GREEN)✓ Documentation générée dans $(DOC_DIR)$(NC)" + +## doc-build: Génère la documentation sans l'ouvrir +doc-build: + @echo "$(YELLOW)→ Génération de la documentation...$(NC)" + $(CARGO) doc --no-deps --document-private-items + @echo "$(GREEN)✓ Documentation générée dans $(DOC_DIR)$(NC)" + +## webapp: Compile l'application Vue.js +webapp: webapp-install + @echo "$(YELLOW)→ Build Vue.js...$(NC)" + cd $(WEBAPP_DIR) && $(NPM) run build + @echo "$(GREEN)✓ Application Vue.js compilée dans $(DIST_DIR)$(NC)" + +## webapp-install: Installe les dépendances npm +webapp-install: + @echo "$(YELLOW)→ Installation des dépendances npm...$(NC)" + cd $(WEBAPP_DIR) && $(NPM) install + @echo "$(GREEN)✓ Dépendances npm installées$(NC)" + +## webapp-dev: Lance le serveur de développement Vue.js +webapp-dev: + @echo "$(YELLOW)→ Démarrage du serveur de dev Vue.js...$(NC)" + cd $(WEBAPP_DIR) && $(NPM) run dev + +## clean: Nettoie les fichiers de build +clean: + @echo "$(YELLOW)→ Nettoyage...$(NC)" + $(CARGO) clean + rm -rf $(DIST_DIR) + rm -rf $(WEBAPP_DIR)/node_modules + @echo "$(GREEN)✓ Nettoyage terminé$(NC)" + +## clean-rust: Nettoie uniquement les builds Rust +clean-rust: + @echo "$(YELLOW)→ Nettoyage Rust...$(NC)" + $(CARGO) clean + @echo "$(GREEN)✓ Nettoyage Rust terminé$(NC)" + +## clean-webapp: Nettoie uniquement le build Vue.js +clean-webapp: + @echo "$(YELLOW)→ Nettoyage Vue.js...$(NC)" + rm -rf $(DIST_DIR) + @echo "$(GREEN)✓ Nettoyage Vue.js terminé$(NC)" + +## install: Installe le binaire dans ~/.cargo/bin +install: release + @echo "$(YELLOW)→ Installation du binaire...$(NC)" + $(CARGO) install --path . + @echo "$(GREEN)✓ $(BINARY_NAME) installé$(NC)" + +## dev: Lance le serveur en mode debug (recompile à chaque changement) +dev: + @echo "$(YELLOW)→ Démarrage en mode développement...$(NC)" + $(CARGO) watch -x run + +## check: Vérifie que le code compile sans générer de binaire +check: + @echo "$(YELLOW)→ Vérification du code...$(NC)" + $(CARGO) check --all + @echo "$(GREEN)✓ Code valide$(NC)" + +## fmt: Formate le code Rust +fmt: + @echo "$(YELLOW)→ Formatage du code...$(NC)" + $(CARGO) fmt --all + @echo "$(GREEN)✓ Code formaté$(NC)" + +## fmt-check: Vérifie le formatage sans modifier +fmt-check: + @echo "$(YELLOW)→ Vérification du formatage...$(NC)" + $(CARGO) fmt --all -- --check + +## clippy: Exécute clippy (linter Rust) +clippy: + @echo "$(YELLOW)→ Analyse avec clippy...$(NC)" + $(CARGO) clippy --all-targets --all-features -- -D warnings + @echo "$(GREEN)✓ Analyse clippy terminée$(NC)" + +## watch: Recompile automatiquement à chaque changement +watch: + @echo "$(YELLOW)→ Mode watch activé...$(NC)" + $(CARGO) watch -x check + +## ci: Exécute toutes les vérifications CI +ci: fmt-check clippy test doc-build webapp + @echo "$(GREEN)✓ Toutes les vérifications CI passées$(NC)" + +## run: Lance le binaire en mode debug +run: debug + @echo "$(YELLOW)→ Lancement de l'application...$(NC)" + ./target/debug/$(BINARY_NAME) + +## run-release: Lance le binaire en mode release +run-release: release + @echo "$(YELLOW)→ Lancement de l'application (release)...$(NC)" + ./$(RUST_TARGET)/$(BINARY_NAME) + +## size: Affiche la taille du binaire +size: + @echo "$(YELLOW)Taille des binaires :$(NC)" + @if [ -f "target/debug/$(BINARY_NAME)" ]; then \ + echo " Debug: $$(du -h target/debug/$(BINARY_NAME) | cut -f1)"; \ + fi + @if [ -f "$(RUST_TARGET)/$(BINARY_NAME)" ]; then \ + echo " Release: $$(du -h $(RUST_TARGET)/$(BINARY_NAME) | cut -f1)"; \ + fi + +## deps: Liste les dépendances obsolètes +deps: + @echo "$(YELLOW)→ Vérification des dépendances...$(NC)" + $(CARGO) outdated + +## update: Met à jour les dépendances +update: + @echo "$(YELLOW)→ Mise à jour des dépendances Rust...$(NC)" + $(CARGO) update + @echo "$(YELLOW)→ Mise à jour des dépendances npm...$(NC)" + cd $(WEBAPP_DIR) && $(NPM) update + @echo "$(GREEN)✓ Dépendances mises à jour$(NC)" + +## bench: Exécute les benchmarks +bench: + @echo "$(YELLOW)→ Exécution des benchmarks...$(NC)" + $(CARGO) bench + +## coverage: Génère un rapport de couverture de code +coverage: + @echo "$(YELLOW)→ Génération du rapport de couverture...$(NC)" + $(CARGO) tarpaulin --out Html --output-dir target/coverage + @echo "$(GREEN)✓ Rapport disponible dans target/coverage/index.html$(NC)" + \ No newline at end of file diff --git a/PMOMusic/Cargo.toml b/PMOMusic/Cargo.toml index ea97f699..05a06ed5 100644 --- a/PMOMusic/Cargo.toml +++ b/PMOMusic/Cargo.toml @@ -4,3 +4,12 @@ version = "0.1.0" edition = "2024" [dependencies] +pmoconfig = { path = "../pmoconfig" } +pmoupnp = { path = "../pmoupnp"} + + +tokio = { version = "1.35", features = ["rt-multi-thread", "macros", "sync", "time","signal"] } +tracing = "0.1.41" +tracing-subscriber = "0.3.20" +axum = "0.8.4" +serde_json = "1.0.145" diff --git a/PMOMusic/src/main.rs b/PMOMusic/src/main.rs index e7a11a96..91e68538 100644 --- a/PMOMusic/src/main.rs +++ b/PMOMusic/src/main.rs @@ -1,3 +1,52 @@ -fn main() { - println!("Hello, world!"); +use pmoupnp::server::{ + ServerBuilder, Webapp, + logs::{LogState, SseLayer, log_dump, log_sse}, +}; // ton module pmoupnp::server +use tracing_subscriber::Registry; +use tracing_subscriber::prelude::*; + +#[tokio::main] +async fn main() { + // Charger la config + + let mut server = ServerBuilder::new_configured().build(); + + // Ajouter des routes + server + .add_route("/hello", || async { + serde_json::json!({"message": "Hello World"}) + }) + .await; + + server + .add_route("/info", || async { + serde_json::json!({"version": "1.0.0"}) + }) + .await; + + server.add_spa::("/app").await; + + // Gère la sortie des logs et sur le serveur SSE pour l'interface web et sur la console + let log_state = LogState::new(1000); + let subscriber = Registry::default() + .with( + tracing_subscriber::fmt::layer() + .with_target(true) + .with_level(true) + .with_ansi(true), // Couleurs dans le terminal + ) + .with(SseLayer::new(log_state.clone())); + tracing::subscriber::set_global_default(subscriber).unwrap(); + + server + .add_handler_with_state("/log-sse", log_sse, log_state.clone()) + .await; + server + .add_handler_with_state("/log-dump", log_dump, log_state.clone()) + .await; + + server.add_redirect("/", "/app").await; + + server.start().await; + server.wait().await; } diff --git a/pmoconfig/.gitignore b/pmoconfig/.gitignore new file mode 100644 index 00000000..ea8c4bf7 --- /dev/null +++ b/pmoconfig/.gitignore @@ -0,0 +1 @@ +/target diff --git a/pmoconfig/Cargo.toml b/pmoconfig/Cargo.toml new file mode 100644 index 00000000..f42a2581 --- /dev/null +++ b/pmoconfig/Cargo.toml @@ -0,0 +1,17 @@ + +[package] +name = "pmoconfig" +version = "0.1.0" +edition = "2021" + +[dependencies] +pmoutils ={ path = "../pmoutils" } + +serde = { version = "1.0", features = ["derive"] } +serde_yaml = "0.9.33" +lazy_static = "1.4.0" +dirs = "6.0.0" +log = "0.4.20" +anyhow = "1.0.75" +uuid = { version = "1.18.1", features = ["v4"] } +tracing = "0.1.41" \ No newline at end of file diff --git a/pmoconfig/src/lib.rs b/pmoconfig/src/lib.rs new file mode 100644 index 00000000..0c39ac7e --- /dev/null +++ b/pmoconfig/src/lib.rs @@ -0,0 +1,319 @@ +use anyhow::{anyhow, Result}; +use dirs::home_dir; +use lazy_static::lazy_static; +use pmoutils::guess_local_ip; +use serde_yaml::{Mapping, Value}; +use std::{ + env, fs, + path::{Path, PathBuf}, + sync::{Arc, Mutex}, +}; +use tracing::{info, warn}; +use uuid::Uuid; + +// Configuration par défaut intégrée +const DEFAULT_CONFIG: &str = include_str!("pmomusic.yaml"); + +lazy_static! { + static ref CONFIG: Arc = + Arc::new(Config::load_config("").expect("Failed to load PMOMusic configuration")) ; +} + +const ENV_CONFIG_FILE: &str = "PMOMUSIC_CONFIG"; +const ENV_PREFIX: &str = "PMOMUSIC_CONFIG__"; + +#[derive(Debug)] +pub struct Config { + path: String, + data: Mutex, +} + +// Implémentation manuelle de Clone +impl Clone for Config { + fn clone(&self) -> Self { + let data = self.data.lock().unwrap().clone(); + Self { + path: self.path.clone(), + data: Mutex::new(data), + } + } +} + +impl Config { + pub fn load_config(filename: &str) -> Result { + let mut path = filename.to_string(); + let mut data: Option> = None; + + // Essayer de charger depuis différents emplacements + if !filename.is_empty() { + info!(config_file=%path, "Trying to load config"); + data = fs::read(&path).ok(); + if data.is_none() { + warn!(config_file=%path, "Cannot read config file"); + path.clear(); + } + } + + if path.is_empty() { + if let Ok(env_path) = env::var(ENV_CONFIG_FILE) { + info!(env_var=ENV_CONFIG_FILE, path=%env_path, "Trying to load config from env"); + path = env_path.clone(); + data = fs::read(&path).ok(); + if data.is_none() { + warn!(config_file=%path, "Cannot read config file from env var"); + path.clear(); + } + } + } + + if path.is_empty() { + let current_dir = env::current_dir().unwrap_or_else(|_| PathBuf::from(".")); + path = current_dir + .join(".pmomusic.yml") + .to_string_lossy() + .to_string(); + info!(config_file=%path, "Trying to load config file from current directory"); + data = fs::read(&path).ok(); + if data.is_none() { + warn!(config_file=%path, "Cannot read config file in current dir"); + path.clear(); + } + } + + if path.is_empty() { + path = Self::get_home_yml_path(); + info!(config_file=%path, "Trying to load config file from home directory"); + data = fs::read(&path).ok(); + if data.is_none() { + warn!(config_file=%path, "Cannot read config file in home directory"); + path.clear(); + } + } + + let yaml_data = if let Some(d) = data { + d + } else { + info!("Using default embedded config"); + DEFAULT_CONFIG.as_bytes().to_vec() + }; + + let mut config_value: Value = serde_yaml::from_slice(&yaml_data)?; + config_value = Self::lower_keys_value(config_value); + Self::apply_env_overrides(&mut config_value); + + if path.is_empty() || !Self::is_writable(&path) { + let candidates = [ + filename.to_string(), + env::var(ENV_CONFIG_FILE).unwrap_or_default(), + ".pmomusic.yml".to_string(), + Self::get_home_yml_path(), + ]; + for candidate in candidates.iter().filter(|c| !c.is_empty()) { + if Self::is_writable(candidate) { + path = candidate.clone(); + break; + } + } + } + + if path.is_empty() { + return Err(anyhow!("Cannot find a place to store config file")); + } + + info!(config_file=%path, "Config file will be stored here"); + + let config = Config { + path, + data: Mutex::new(config_value), + }; + config.save()?; + Ok(config) + } + + pub fn save(&self) -> Result<()> { + let data = self.data.lock().unwrap(); + let yaml = serde_yaml::to_string(&*data)?; + fs::write(&self.path, yaml)?; + Ok(()) + } + + pub fn set_value(&self, path: &[&str], value: Value) -> Result<()> { + let mut data = self.data.lock().unwrap(); + Self::set_value_internal(&mut data, path, value.clone())?; + drop(data); + self.save()?; + Ok(()) + } + + fn set_value_internal(data: &mut Value, path: &[&str], value: Value) -> Result<()> { + if path.is_empty() { + *data = value; + return Ok(()); + } + if let Value::Mapping(map) = data { + let key = path[0].to_lowercase(); + let key_value = Value::String(key.clone()); + if path.len() == 1 { + map.insert(key_value, value); + } else { + let entry = map + .entry(key_value) + .or_insert(Value::Mapping(Mapping::new())); + Self::set_value_internal(entry, &path[1..], value)?; + } + Ok(()) + } else { + Err(anyhow!("Current node is not a map")) + } + } + + pub fn get_value(&self, path: &[&str]) -> Result { + let data = self.data.lock().unwrap(); + Self::get_value_internal(&data, path) + } + + fn get_value_internal(data: &Value, path: &[&str]) -> Result { + let mut current = data; + for (i, key) in path.iter().enumerate() { + if let Value::Mapping(map) = current { + let key = key.to_lowercase(); + if let Some(next) = map.get(&Value::String(key)) { + current = next; + } else { + return Err(anyhow!("Path {} does not exist", path[..=i].join("."))); + } + } else { + return Err(anyhow!("Path {} is not a Config", path[..i].join("."))); + } + } + Ok(current.clone()) + } + + fn get_home_yml_path() -> String { + home_dir() + .map(|p| p.join(".pmomusic.yml")) + .unwrap_or_else(|| PathBuf::from(".")) + .to_string_lossy() + .to_string() + } + + fn apply_env_overrides(config: &mut Value) { + for (key, value) in env::vars() { + if key.starts_with(ENV_PREFIX) { + let key_path = key + .trim_start_matches(ENV_PREFIX) + .split("__") + .collect::>(); + let yaml_value = Self::convert_env_value(&value); + let _ = Self::set_value_internal(config, &key_path, yaml_value); + } + } + } + + fn convert_env_value(value: &str) -> Value { + if let Ok(parsed) = serde_yaml::from_str::(value) { + return parsed; + } + Value::String(value.to_string()) + } + + fn lower_keys_value(value: Value) -> Value { + match value { + Value::Mapping(map) => { + let mut new_map = Mapping::new(); + for (k, v) in map { + if let Value::String(s) = k { + let new_key = Value::String(s.to_lowercase()); + let new_val = Self::lower_keys_value(v); + new_map.insert(new_key, new_val); + } else { + new_map.insert(k, Self::lower_keys_value(v)); + } + } + Value::Mapping(new_map) + } + Value::Sequence(seq) => { + Value::Sequence(seq.into_iter().map(Self::lower_keys_value).collect()) + } + _ => value, + } + } + + fn is_writable(path: &str) -> bool { + let path = Path::new(path); + if let Some(parent) = path.parent() { + fs::metadata(parent) + .map(|m| !m.permissions().readonly()) + .unwrap_or(false) + } else { + false + } + } + + pub fn get_base_url(&self) -> String { + match self.get_value(&["host", "base_url"]) { + Ok(Value::String(s)) if !s.is_empty() => s, + Ok(_) => { + tracing::warn!("Base URL is not a string or empty, using default localhost"); + guess_local_ip() + } + Err(err) => { + tracing::warn!("Failed to get base URL: {}, using default localhost", err); + guess_local_ip() + } + } + } + + pub fn get_http_port(&self) -> u16 { + match self.get_value(&["host", "http_port"]) { + Ok(Value::Number(n)) if n.is_i64() => n.as_i64().unwrap() as u16, + Ok(Value::String(s)) => match s.parse::() { + Ok(port) => port, + Err(_) => { + tracing::warn!("Invalid HTTP port '{}', using default 8080", s); + 8080 + } + }, + Ok(_) => { + tracing::warn!("HTTP port not a number or string, using default 8080"); + 8080 + } + Err(err) => { + tracing::warn!("Failed to get HTTP port: {}, using default 8080", err); + 8080 + } + } + } + + pub fn get_device_udn(&self, devtype: &str, name: &str) -> Result { + let path = &["devices", devtype, name, "udn"]; + match self.get_value(path) { + Ok(Value::String(udn)) => Ok(udn), + _ => { + let new_udn = Uuid::new_v4().to_string(); + self.set_value(path, Value::String(new_udn.clone()))?; + Ok(new_udn) + } + } + } + + pub fn get_cover_cache_dir(&self) -> Result { + match self.get_value(&["host", "cover_cache", "directory"])? { + Value::String(s) => Ok(s), + _ => Ok("./.pmomusic_covers".to_string()), + } + } + + pub fn get_cover_cache_size(&self) -> Result { + match self.get_value(&["host", "cover_cache", "size"])? { + Value::Number(n) if n.is_i64() => Ok(n.as_i64().unwrap() as usize), + Value::Number(n) if n.is_u64() => Ok(n.as_u64().unwrap() as usize), + _ => Ok(2000), + } + } +} + +/// Retourne l'instance globale +pub fn get_config() -> Arc { + CONFIG.clone() +} diff --git a/pmoconfig/src/pmomusic.yaml b/pmoconfig/src/pmomusic.yaml new file mode 100644 index 00000000..c2acfad7 --- /dev/null +++ b/pmoconfig/src/pmomusic.yaml @@ -0,0 +1,11 @@ +host: + http_port: "8080" + cover_cache: + directory: "./.pmomusic_covers" + size: 2000 +devices: + mediarenderer: + mpd_renderer: + mediaserver: + qobuz: + udn: "uuid:28963b75-4c5f-4da7-b10e-ffafd" \ No newline at end of file diff --git a/pmoupnp/Cargo.toml b/pmoupnp/Cargo.toml index b62f2dd2..89ff943b 100644 --- a/pmoupnp/Cargo.toml +++ b/pmoupnp/Cargo.toml @@ -4,10 +4,30 @@ version = "0.1.0" edition = "2024" [dependencies] -chrono = "0.4.42" +pmoconfig = { path = "../pmoconfig" } + url = "2.5.7" uuid = "1.18.1" hex = "0.4.3" base64 = "0.22.1" thiserror = "2.0.16" -xmltree = "0.11.0" \ No newline at end of file +xmltree = "0.11.0" +get_if_addrs = "0.5.3" +axum = "0.8.4" +tokio = { version = "1.35", features = ["rt-multi-thread", "macros", "sync", "time"] } +tokio-stream = "0.1" +futures-util = "0.3" +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" +chrono = { version = "0.4.42", features = ["serde"] } +log = "0.4.28" +once_cell = "1.20" +parking_lot = "0.12" +tracing = "0.1" +tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"] } +futures = "0.3" +async-stream = "0.3.6" +axum-server = "0.7.2" +axum-embed = "0.1.0" +rust-embed = "8.7.2" +anyhow = "1.0" diff --git a/pmoupnp/src/lib.rs b/pmoupnp/src/lib.rs index 436f39a1..114fc40e 100644 --- a/pmoupnp/src/lib.rs +++ b/pmoupnp/src/lib.rs @@ -3,6 +3,7 @@ mod object_trait; pub mod variable_types; pub mod state_variables; pub mod value_ranges; +pub mod server; pub use crate::object_trait::UpnpObject; diff --git a/pmoupnp/src/server/logs/mod.rs b/pmoupnp/src/server/logs/mod.rs new file mode 100644 index 00000000..312bcd40 --- /dev/null +++ b/pmoupnp/src/server/logs/mod.rs @@ -0,0 +1,158 @@ +// logs.rs +mod sselayer; + +pub use sselayer::SseLayer; + +use std::{ + collections::VecDeque, + sync::{Arc, RwLock}, + time::SystemTime, +}; + +use axum::{ + extract::{Query, State}, + response::{sse::{Event, KeepAlive, Sse}, IntoResponse}, + Json, +}; +use serde::{Deserialize, Serialize}; +use tokio::sync::broadcast; + +/// Représente une entrée de log +#[derive(Debug, Clone, Serialize)] +pub struct LogEntry { + pub timestamp: SystemTime, + pub level: String, + pub target: String, + pub message: String, +} + +/// Buffer circulaire partagé +#[derive(Clone)] +pub struct LogState { + buffer: Arc>>, + tx: broadcast::Sender, +} + +impl LogState { + pub fn new(capacity: usize) -> Self { + Self { + buffer: Arc::new(RwLock::new(VecDeque::with_capacity(capacity))), + tx: broadcast::channel(1000).0, + } + } + + fn push(&self, entry: LogEntry) { + let mut buf = self.buffer.write().unwrap(); + if buf.len() == buf.capacity() { + buf.pop_front(); + } + buf.push_back(entry.clone()); + let _ = self.tx.send(entry); + } + + pub fn subscribe(&self) -> broadcast::Receiver { + self.tx.subscribe() + } + + pub fn dump(&self) -> Vec { + self.buffer.read().unwrap().iter().cloned().collect() + } +} + + + +/// Query params pour /log-sse +#[derive(Debug, Deserialize)] +pub struct LogQuery { + #[serde(default)] + pub error: Option, + #[serde(default)] + pub warn: Option, + #[serde(default)] + pub info: Option, + #[serde(default)] + pub debug: Option, + #[serde(default)] + pub trace: Option, + #[serde(default)] + pub search: Option, +} + +/// Handler SSE +// Dans logs.rs +pub async fn log_sse( + State(state): State, + Query(params): Query, +) -> impl IntoResponse { + let mut rx = state.subscribe(); + + // Récupérer l'historique du buffer + let history = state.dump(); + + let stream = async_stream::stream! { + // 1. Envoyer d'abord tous les logs historiques + for entry in history { + if !filter_entry(&entry, ¶ms) { + continue; + } + let json = serde_json::to_string(&entry).unwrap(); + yield Ok::<_, axum::Error>(Event::default().data(json)); + } + + // 2. Puis streamer les nouveaux logs en temps réel + while let Ok(entry) = rx.recv().await { + if !filter_entry(&entry, ¶ms) { + continue; + } + let json = serde_json::to_string(&entry).unwrap(); + yield Ok::<_, axum::Error>(Event::default().data(json)); + } + }; + + Sse::new(stream).keep_alive(KeepAlive::default()) +} + +/// Handler REST (dump JSON du buffer) +pub async fn log_dump(State(state): State) -> impl IntoResponse { + Json(state.dump()) +} + +/// Fonction de filtrage +fn filter_entry(entry: &LogEntry, q: &LogQuery) -> bool { + // Filtrage par niveau + let lvl = entry.level.to_lowercase(); + let mut allowed = false; + + if let Some(true) = q.error { + allowed |= lvl == "error"; + } + if let Some(true) = q.warn { + allowed |= lvl == "warn"; + } + if let Some(true) = q.info { + allowed |= lvl == "info"; + } + if let Some(true) = q.debug { + allowed |= lvl == "debug"; + } + if let Some(true) = q.trace { + allowed |= lvl == "trace"; + } + + // si aucun flag → tout est autorisé + if !(q.error.unwrap_or(false) + || q.warn.unwrap_or(false) + || q.info.unwrap_or(false) + || q.debug.unwrap_or(false) + || q.trace.unwrap_or(false)) + { + allowed = true; + } + + // Filtrage par mot-clé + if let Some(search) = &q.search { + allowed &= entry.message.contains(search) || entry.target.contains(search); + } + + allowed +} diff --git a/pmoupnp/src/server/logs/sselayer.rs b/pmoupnp/src/server/logs/sselayer.rs new file mode 100644 index 00000000..017523f6 --- /dev/null +++ b/pmoupnp/src/server/logs/sselayer.rs @@ -0,0 +1,62 @@ +use tracing::{Event, Subscriber}; +use tracing_subscriber::{layer::Context, Layer}; +use tracing::field::{Visit, Field}; + +use super::{LogEntry, LogState}; +use std::time::SystemTime; + +struct LogVisitor { + message: String, +} + +impl LogVisitor { + fn new() -> Self { + Self { + message: String::new(), + } + } +} + +impl Visit for LogVisitor { + fn record_debug(&mut self, field: &Field, value: &dyn std::fmt::Debug) { + // capture le champ "message" ou concatène les autres + if field.name() == "message" { + self.message = format!("{:?}", value); + } else { + if !self.message.is_empty() { + self.message.push(' '); + } + self.message.push_str(&format!("{}={:?}", field.name(), value)); + } + } +} + +/// Layer de tracing qui pousse les events dans le buffer +pub struct SseLayer { + state: LogState, +} + +impl SseLayer { + pub fn new(state: LogState) -> Self { + Self { state } + } +} + +impl Layer for SseLayer +where + S: Subscriber, +{ + fn on_event(&self, event: &Event<'_>, _ctx: Context<'_, S>) { + let mut visitor = LogVisitor::new(); + event.record(&mut visitor); + + let entry = LogEntry { + timestamp: SystemTime::now(), + level: event.metadata().level().to_string(), + target: event.metadata().target().to_string(), + message: visitor.message, + }; + + self.state.push(entry); + } +} diff --git a/pmoupnp/src/server/mod.rs b/pmoupnp/src/server/mod.rs new file mode 100644 index 00000000..503661c4 --- /dev/null +++ b/pmoupnp/src/server/mod.rs @@ -0,0 +1,520 @@ +//! # Module Server - API de haut niveau pour Axum +//! +//! Ce module fournit une abstraction simple et ergonomique pour créer des serveurs HTTP +//! avec Axum, en cachant la complexité de la configuration et du routage. +//! +//! ## Fonctionnalités +//! +//! - 🚀 **Routes JSON simples** : Ajoutez des endpoints API avec `add_route()` +//! - 📁 **Fichiers statiques** : Servez des assets avec `add_dir()` +//! - ⚛️ **Applications SPA** : Support pour Vue.js/React avec `add_spa()` +//! - 🔀 **Redirections** : Redirigez des routes avec `add_redirect()` +//! - 🎯 **Handlers personnalisés** : Support SSE, WebSocket, etc. avec `add_handler_with_state()` +//! - ⚡ **Gestion gracieuse** : Arrêt propre sur Ctrl+C +//! +//! ## Exemple d'utilisation +//! +//! ```rust,no_run +//! use pmoupnp::server::{ServerBuilder, Server}; +//! use rust_embed::RustEmbed; +//! +//! #[derive(RustEmbed, Clone)] +//! #[folder = "static/"] +//! struct Assets; +//! +//! #[tokio::main] +//! async fn main() { +//! let mut server = ServerBuilder::new("MyAPI", "http://localhost:3000", 3000) +//! .build(); +//! +//! // Route JSON simple +//! server.add_route("/api/hello", || async { +//! serde_json::json!({"message": "Hello World"}) +//! }).await; +//! +//! // Redirection +//! server.add_redirect("/", "/app").await; +//! +//! // Application Vue.js +//! server.add_spa::("/app").await; +//! +//! server.start().await; +//! server.wait().await; +//! } +//! ``` + +pub mod logs; + +use axum::handler::Handler; +use axum::response::Redirect; +use axum::routing::get; +use axum::{Json, Router}; +use axum_embed::ServeEmbed; +use pmoconfig::get_config; +use rust_embed::RustEmbed; +use serde::Serialize; +use std::{net::SocketAddr, sync::Arc}; +use tokio::{signal, sync::RwLock, task::JoinHandle}; +use tracing::{info,warn,debug,error}; + +/// Info serveur sérialisable +#[derive(Clone, Serialize)] +pub struct ServerInfo { + pub name: String, + pub base_url: String, + pub http_port: u16, +} + +/// Serveur principal +pub struct Server { + name: String, + base_url: String, + http_port: u16, + router: Arc>, + join_handle: Option>, +} + +#[derive(RustEmbed, Clone)] +#[folder = "webapp/dist"] +pub struct Webapp; + +impl Server { + /// Crée une nouvelle instance de serveur + /// + /// # Arguments + /// + /// * `name` - Nom du serveur (pour les logs) + /// * `base_url` - URL de base (ex: "http://localhost:3000") + /// * `http_port` - Port HTTP à écouter + /// + /// # Exemple + /// + /// ```rust + /// # use pmoupnp::server::Server; + /// let server = Server::new("MyAPI", "http://localhost:3000", 3000); + /// ``` + pub fn new(name: impl Into, base_url: impl Into, http_port: u16) -> Self { + Self { + name: name.into(), + base_url: base_url.into(), + http_port, + router: Arc::new(RwLock::new(Router::new())), + join_handle: None, + } + } + + pub fn new_configured() -> Self { + let config = get_config(); + let url = config.get_base_url(); + let port = config.get_http_port(); + + return Self::new("PMO-Music-Server", url, port); + } + + /// Ajoute une route dynamique + /// Ajoute une route JSON dynamique + /// + /// Crée un endpoint qui retourne du JSON. La closure fournie sera appelée + /// à chaque requête GET sur le chemin spécifié. + /// + /// # Arguments + /// + /// * `path` - Chemin de la route (ex: "/api/hello") + /// * `f` - Closure async retournant une valeur sérialisable + /// + /// # Exemple + /// + /// ```rust,no_run + /// # use pmoupnp::server::Server; + /// # #[tokio::main] + /// # async fn main() { + /// # let mut server = Server::new("Test", "http://localhost:3000", 3000); + /// server.add_route("/api/status", || async { + /// serde_json::json!({ + /// "status": "online", + /// "version": "1.0.0" + /// }) + /// }).await; + /// # } + /// ``` + pub async fn add_route(&mut self, path: &str, f: F) + where + F: Fn() -> Fut + Send + Sync + 'static, + Fut: std::future::Future + Send + 'static, + T: Serialize + Send + 'static, + { + let f = Arc::new(f); + + let handler = { + let f = f.clone(); + move || { + let f = f.clone(); + async move { Json(f().await) } + } + }; + + let route = Router::new().route("/", get(handler)); + + let mut r = self.router.write().await; + *r = std::mem::take(&mut *r).nest(path, route); + } + + /// Ajoute un répertoire de fichiers statiques + /// + /// Sert des fichiers embarqués via `RustEmbed`. Les fichiers sont compilés + /// dans le binaire à la compilation. + /// + /// # Arguments + /// + /// * `path` - Chemin où monter les fichiers statiques + /// + /// # Type Parameter + /// + /// * `E` - Type RustEmbed définissant le répertoire à servir + /// + /// # Exemple + /// + /// ```rust,no_run + /// # use pmoupnp::server::Server; + /// # use rust_embed::RustEmbed; + /// #[derive(RustEmbed, Clone)] + /// #[folder = "static/"] + /// struct Assets; + /// + /// # #[tokio::main] + /// # async fn main() { + /// # let mut server = Server::new("Test", "http://localhost:3000", 3000); + /// server.add_dir::("/assets").await; + /// // Les fichiers de static/ sont accessibles via /assets/* + /// # } + /// ``` + pub async fn add_dir(&mut self, path: &str) + where + E: RustEmbed + Clone + Send + Sync + 'static, + { + let serve = ServeEmbed::::new(); + + let mut r = self.router.write().await; + + if path == "/" { + *r = std::mem::take(&mut *r).fallback_service(serve); + } else { + let route = Router::new().fallback_service(serve); + *r = std::mem::take(&mut *r).nest(path, route); + } + } + + /// Ajoute une Single Page Application (SPA) + /// + /// Sert une application JavaScript moderne (Vue.js, React, etc.) avec support + /// du routage côté client. Tous les chemins non trouvés renvoient `index.html` + /// pour permettre au routeur JavaScript de gérer la navigation. + /// + /// # Arguments + /// + /// * `path` - Chemin où monter l'application (souvent "/" ou "/app") + /// + /// # Type Parameter + /// + /// * `E` - Type RustEmbed contenant les fichiers de la SPA + /// + /// # Exemple avec Vue.js + /// + /// ```rust,no_run + /// # use pmoupnp::server::Server; + /// # use rust_embed::RustEmbed; + /// #[derive(RustEmbed, Clone)] + /// #[folder = "webapp/dist"] // Build output de Vue.js + /// struct WebApp; + /// + /// # #[tokio::main] + /// # async fn main() { + /// # let mut server = Server::new("Test", "http://localhost:3000", 3000); + /// server.add_spa::("/").await; + /// // L'app Vue.js gère toutes les routes comme /about, /users, etc. + /// # } + /// ``` + /// + /// # Note + /// + /// Pour Vue.js/Vite, configure le `base` dans `vite.config.js` si tu montes + /// sur un sous-chemin : + /// ```javascript + /// export default { + /// base: '/app/' + /// } + /// ``` + pub async fn add_spa(&mut self, path: &str) + where + E: RustEmbed + Clone + Send + Sync + 'static, + { + let serve = ServeEmbed::::with_parameters( + Some("index.html".to_string()), + axum_embed::FallbackBehavior::Ok, + Some("index.html".to_string()), + ); + + let mut r = self.router.write().await; + + if path == "/" { + *r = std::mem::take(&mut *r).fallback_service(serve); + } else { + let route = Router::new().fallback_service(serve); + *r = std::mem::take(&mut *r).nest(path, route); + } + } + + /// Ajoute un handler Axum personnalisé + /// + /// Pour des cas d'usage avancés nécessitant un contrôle complet sur le handler. + /// + /// # Arguments + /// + /// * `path` - Chemin de la route + /// * `handler` - Handler Axum + /// + /// # Exemple + /// + /// ```rust,no_run + /// # use pmoupnp::server::Server; + /// # use axum::response::Html; + /// # #[tokio::main] + /// # async fn main() { + /// # let mut server = Server::new("Test", "http://localhost:3000", 3000); + /// async fn custom_handler() -> Html<&'static str> { + /// Html("

Custom Response

") + /// } + /// + /// server.add_handler("/custom", custom_handler).await; + /// # } + /// ``` + pub async fn add_handler(&mut self, path: &str, handler: H) + where + H: Handler, + T: 'static, + { + let route = Router::new().route("/", get(handler)); + + let mut r = self.router.write().await; + *r = std::mem::take(&mut *r).nest(path, route); + } + + /// Ajoute un handler avec state (pour SSE, extracteurs, etc.) + /// + /// Permet d'utiliser des extracteurs Axum comme `State`, `Query`, etc. + /// Idéal pour Server-Sent Events (SSE), WebSockets ou tout handler nécessitant un état partagé. + /// + /// # Arguments + /// + /// * `path` - Chemin de la route + /// * `handler` - Handler Axum avec extracteurs + /// * `state` - État partagé (doit être Clone + Send + Sync) + /// + /// # Exemple avec SSE + /// + /// ```rust,no_run + /// # use pmoupnp::server::Server; + /// # use axum::extract::State; + /// # use axum::response::sse::{Event, Sse, KeepAlive}; + /// # use tokio::sync::broadcast; + /// # #[derive(Clone)] + /// # struct LogState { tx: broadcast::Sender } + /// # impl LogState { fn subscribe(&self) -> broadcast::Receiver { self.tx.subscribe() } } + /// # #[tokio::main] + /// # async fn main() { + /// # let mut server = Server::new("Test", "http://localhost:3000", 3000); + /// async fn log_sse(State(state): State) -> Sse>> { + /// let mut rx = state.subscribe(); + /// let stream = async_stream::stream! { + /// while let Ok(msg) = rx.recv().await { + /// yield Ok(Event::default().data(msg)); + /// } + /// }; + /// Sse::new(stream).keep_alive(KeepAlive::default()) + /// } + /// + /// let log_state = LogState { tx: broadcast::channel(100).0 }; + /// server.add_handler_with_state("/logs", log_sse, log_state).await; + /// # } + /// ``` + pub async fn add_handler_with_state(&mut self, path: &str, handler: H, state: S) + where + H: Handler, + T: 'static, + S: Clone + Send + Sync + 'static, + { + let route = Router::new() + .route("/", get(handler)) + .with_state(state); + + let mut r = self.router.write().await; + *r = std::mem::take(&mut *r).nest(path, route); + } + + /// Ajoute un handler POST avec state + /// + /// Similaire à `add_handler_with_state` mais pour les requêtes POST. + /// + /// # Arguments + /// + /// * `path` - Chemin de la route + /// * `handler` - Handler Axum pour POST + /// * `state` - État partagé + pub async fn add_post_handler_with_state(&mut self, path: &str, handler: H, state: S) + where + H: Handler, + T: 'static, + S: Clone + Send + Sync + 'static, + { + let route = Router::new() + .route("/", axum::routing::post(handler)) + .with_state(state); + + let mut r = self.router.write().await; + *r = std::mem::take(&mut *r).nest(path, route); + } + + /// Ajoute une redirection HTTP + /// + /// Redirige automatiquement les requêtes d'un chemin vers un autre avec un code 308 (permanent). + /// + /// # Arguments + /// + /// * `from` - Chemin source (peut être "/" pour la racine) + /// * `to` - Chemin de destination + /// + /// # Exemple + /// + /// ```rust,no_run + /// # use pmoupnp::server::Server; + /// # #[tokio::main] + /// # async fn main() { + /// # let mut server = Server::new("Test", "http://localhost:3000", 3000); + /// // Rediriger la racine vers /app + /// server.add_redirect("/", "/app").await; + /// # } + /// ``` + pub async fn add_redirect(&mut self, from: &str, to: &str) { + let to = to.to_string(); + let handler = move || { + let to = to.clone(); + async move { Redirect::permanent(&to) } + }; + + let mut r = self.router.write().await; + + if from == "/" { + // Pour la racine, utiliser merge au lieu de nest + let route = Router::new().route("/", get(handler)); + *r = std::mem::take(&mut *r).merge(route); + } else { + let route = Router::new().route("/", get(handler)); + *r = std::mem::take(&mut *r).nest(from, route); + } + } + + /// Démarre le serveur HTTP + /// + /// Lance le serveur sur le port configuré et met en place la gestion + /// de Ctrl+C pour un arrêt gracieux. + /// + /// # Exemple + /// + /// ```rust,no_run + /// # use pmoupnp::server::Server; + /// # #[tokio::main] + /// # async fn main() { + /// # let mut server = Server::new("Test", "http://localhost:3000", 3000); + /// server.start().await; + /// server.wait().await; // Attend Ctrl+C + /// # } + /// ``` + pub async fn start(&mut self) { + let addr = SocketAddr::from(([0, 0, 0, 0], self.http_port)); + info!("Server {} running at [http://{}:{}](http://{}:{})", self.name, self.base_url, self.http_port, self.base_url, self.http_port); + + let router = self.router.clone(); + + let server_task = tokio::spawn(async move { + let r = router.read().await.clone(); + let listener = tokio::net::TcpListener::bind(addr).await.unwrap(); + axum::serve(listener, r.into_make_service()).await.unwrap(); + }); + + let shutdown_task = tokio::spawn(async move { + signal::ctrl_c().await.expect("failed to listen for ctrl_c"); + info!("Ctrl+C reçu, arrêt gracieux"); + }); + + self.join_handle = Some(tokio::spawn(async move { + tokio::select! { + _ = server_task => {}, + _ = shutdown_task => {}, + } + })); + } + + /// Attend la fin du serveur + pub async fn wait(&mut self) { + if let Some(h) = self.join_handle.take() { + let _ = h.await; + } + } + + /// Récupère les infos du serveur + pub fn info(&self) -> ServerInfo { + ServerInfo { + name: self.name.clone(), + base_url: self.base_url.clone(), + http_port: self.http_port, + } + } +} + +/// Builder pattern +pub struct ServerBuilder { + name: String, + base_url: String, + http_port: u16, +} + +impl ServerBuilder { + /// Crée un nouveau builder + /// + /// # Arguments + /// + /// * `name` - Nom du serveur + /// * `base_url` - URL de base (ex: "http://localhost:3000") + /// * `http_port` - Port HTTP + pub fn new(name: impl Into, base_url: impl Into, http_port: u16) -> Self { + Self { + name: name.into(), + base_url: base_url.into(), + http_port, + } + } + + pub fn new_configured() -> Self { + let config = get_config(); + Self { + name: "PMO-Music-Server".to_string(), + base_url: config.get_base_url(), + http_port: config.get_http_port() + } + } + + /// Construit le serveur + /// + /// Consomme le builder et retourne une instance de `Server` prête à l'emploi. + /// + /// # Exemple + /// + /// ```rust + /// # use pmoupnp::server::ServerBuilder; + /// let mut server = ServerBuilder::new("MyAPI", "http://localhost:3000", 3000) + /// .build(); + /// ``` + pub fn build(self) -> Server { + Server::new(self.name, self.base_url, self.http_port) + } +} diff --git a/pmoupnp/webapp/.gitignore b/pmoupnp/webapp/.gitignore index db4c6d9b..a547bf36 100644 --- a/pmoupnp/webapp/.gitignore +++ b/pmoupnp/webapp/.gitignore @@ -1,2 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules dist -node_modules \ No newline at end of file +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/pmoupnp/webapp/.vscode/extensions.json b/pmoupnp/webapp/.vscode/extensions.json new file mode 100644 index 00000000..a7cea0b0 --- /dev/null +++ b/pmoupnp/webapp/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["Vue.volar"] +} diff --git a/pmoupnp/webapp/README.md b/pmoupnp/webapp/README.md new file mode 100644 index 00000000..33895ab2 --- /dev/null +++ b/pmoupnp/webapp/README.md @@ -0,0 +1,5 @@ +# Vue 3 + TypeScript + Vite + +This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 ` + + diff --git a/pmoupnp/webapp/package-lock.json b/pmoupnp/webapp/package-lock.json new file mode 100644 index 00000000..e8814061 --- /dev/null +++ b/pmoupnp/webapp/package-lock.json @@ -0,0 +1,1486 @@ +{ + "name": "webapp", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "webapp", + "version": "0.0.0", + "dependencies": { + "dompurify": "^3.2.7", + "marked": "^16.3.0", + "vue": "^3.5.21", + "vue-router": "^4.5.1" + }, + "devDependencies": { + "@types/dompurify": "^3.0.5", + "@vitejs/plugin-vue": "^6.0.1", + "@vue/tsconfig": "^0.8.1", + "typescript": "~5.8.3", + "vite": "^7.1.7", + "vue-tsc": "^3.0.7" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.4.tgz", + "integrity": "sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg==", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.4" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/types": { + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.4.tgz", + "integrity": "sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==", + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.10.tgz", + "integrity": "sha512-0NFWnA+7l41irNuaSVlLfgNT12caWJVLzp5eAVhZ0z1qpxbockccEt3s+149rE64VUI3Ml2zt8Nv5JVc4QXTsw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.10.tgz", + "integrity": "sha512-dQAxF1dW1C3zpeCDc5KqIYuZ1tgAdRXNoZP7vkBIRtKZPYe2xVr/d3SkirklCHudW1B45tGiUlz2pUWDfbDD4w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.10.tgz", + "integrity": "sha512-LSQa7eDahypv/VO6WKohZGPSJDq5OVOo3UoFR1E4t4Gj1W7zEQMUhI+lo81H+DtB+kP+tDgBp+M4oNCwp6kffg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.10.tgz", + "integrity": "sha512-MiC9CWdPrfhibcXwr39p9ha1x0lZJ9KaVfvzA0Wxwz9ETX4v5CHfF09bx935nHlhi+MxhA63dKRRQLiVgSUtEg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.10.tgz", + "integrity": "sha512-JC74bdXcQEpW9KkV326WpZZjLguSZ3DfS8wrrvPMHgQOIEIG/sPXEN/V8IssoJhbefLRcRqw6RQH2NnpdprtMA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.10.tgz", + "integrity": "sha512-tguWg1olF6DGqzws97pKZ8G2L7Ig1vjDmGTwcTuYHbuU6TTjJe5FXbgs5C1BBzHbJ2bo1m3WkQDbWO2PvamRcg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.10.tgz", + "integrity": "sha512-3ZioSQSg1HT2N05YxeJWYR+Libe3bREVSdWhEEgExWaDtyFbbXWb49QgPvFH8u03vUPX10JhJPcz7s9t9+boWg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.10.tgz", + "integrity": "sha512-LLgJfHJk014Aa4anGDbh8bmI5Lk+QidDmGzuC2D+vP7mv/GeSN+H39zOf7pN5N8p059FcOfs2bVlrRr4SK9WxA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.10.tgz", + "integrity": "sha512-oR31GtBTFYCqEBALI9r6WxoU/ZofZl962pouZRTEYECvNF/dtXKku8YXcJkhgK/beU+zedXfIzHijSRapJY3vg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.10.tgz", + "integrity": "sha512-5luJWN6YKBsawd5f9i4+c+geYiVEw20FVW5x0v1kEMWNq8UctFjDiMATBxLvmmHA4bf7F6hTRaJgtghFr9iziQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.10.tgz", + "integrity": "sha512-NrSCx2Kim3EnnWgS4Txn0QGt0Xipoumb6z6sUtl5bOEZIVKhzfyp/Lyw4C1DIYvzeW/5mWYPBFJU3a/8Yr75DQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.10.tgz", + "integrity": "sha512-xoSphrd4AZda8+rUDDfD9J6FUMjrkTz8itpTITM4/xgerAZZcFW7Dv+sun7333IfKxGG8gAq+3NbfEMJfiY+Eg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.10.tgz", + "integrity": "sha512-ab6eiuCwoMmYDyTnyptoKkVS3k8fy/1Uvq7Dj5czXI6DF2GqD2ToInBI0SHOp5/X1BdZ26RKc5+qjQNGRBelRA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.10.tgz", + "integrity": "sha512-NLinzzOgZQsGpsTkEbdJTCanwA5/wozN9dSgEl12haXJBzMTpssebuXR42bthOF3z7zXFWH1AmvWunUCkBE4EA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.10.tgz", + "integrity": "sha512-FE557XdZDrtX8NMIeA8LBJX3dC2M8VGXwfrQWU7LB5SLOajfJIxmSdyL/gU1m64Zs9CBKvm4UAuBp5aJ8OgnrA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.10.tgz", + "integrity": "sha512-3BBSbgzuB9ajLoVZk0mGu+EHlBwkusRmeNYdqmznmMc9zGASFjSsxgkNsqmXugpPk00gJ0JNKh/97nxmjctdew==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.10.tgz", + "integrity": "sha512-QSX81KhFoZGwenVyPoberggdW1nrQZSvfVDAIUXr3WqLRZGZqWk/P4T8p2SP+de2Sr5HPcvjhcJzEiulKgnxtA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.10.tgz", + "integrity": "sha512-AKQM3gfYfSW8XRk8DdMCzaLUFB15dTrZfnX8WXQoOUpUBQ+NaAFCP1kPS/ykbbGYz7rxn0WS48/81l9hFl3u4A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.10.tgz", + "integrity": "sha512-7RTytDPGU6fek/hWuN9qQpeGPBZFfB4zZgcz2VK2Z5VpdUxEI8JKYsg3JfO0n/Z1E/6l05n0unDCNc4HnhQGig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.10.tgz", + "integrity": "sha512-5Se0VM9Wtq797YFn+dLimf2Zx6McttsH2olUBsDml+lm0GOCRVebRWUvDtkY4BWYv/3NgzS8b/UM3jQNh5hYyw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.10.tgz", + "integrity": "sha512-XkA4frq1TLj4bEMB+2HnI0+4RnjbuGZfet2gs/LNs5Hc7D89ZQBHQ0gL2ND6Lzu1+QVkjp3x1gIcPKzRNP8bXw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.10.tgz", + "integrity": "sha512-AVTSBhTX8Y/Fz6OmIVBip9tJzZEUcY8WLh7I59+upa5/GPhh2/aM6bvOMQySspnCCHvFi79kMtdJS1w0DXAeag==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.10.tgz", + "integrity": "sha512-fswk3XT0Uf2pGJmOpDB7yknqhVkJQkAQOcW/ccVOtfx05LkbWOaRAtn5SaqXypeKQra1QaEa841PgrSL9ubSPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.10.tgz", + "integrity": "sha512-ah+9b59KDTSfpaCg6VdJoOQvKjI33nTaQr4UluQwW7aEwZQsbMCfTmfEO4VyewOxx4RaDT/xCy9ra2GPWmO7Kw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.10.tgz", + "integrity": "sha512-QHPDbKkrGO8/cz9LKVnJU22HOi4pxZnZhhA2HYHez5Pz4JeffhDjf85E57Oyco163GnzNCVkZK0b/n4Y0UHcSw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.10.tgz", + "integrity": "sha512-9KpxSVFCu0iK1owoez6aC/s/EdUQLDN3adTxGCqxMVhrPDj6bt5dbrHDXUuq+Bs2vATFBBrQS5vdQ/Ed2P+nbw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "license": "MIT" + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.0-beta.29", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.29.tgz", + "integrity": "sha512-NIJgOsMjbxAXvoGq/X0gD7VPMQ8j9g0BiDaNjVNVjvl+iKXxL3Jre0v31RmBYeLEmkbj2s02v8vFTbUXi5XS2Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.52.3.tgz", + "integrity": "sha512-h6cqHGZ6VdnwliFG1NXvMPTy/9PS3h8oLh7ImwR+kl+oYnQizgjxsONmmPSb2C66RksfkfIxEVtDSEcJiO0tqw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.52.3.tgz", + "integrity": "sha512-wd+u7SLT/u6knklV/ifG7gr5Qy4GUbH2hMWcDauPFJzmCZUAJ8L2bTkVXC2niOIxp8lk3iH/QX8kSrUxVZrOVw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.52.3.tgz", + "integrity": "sha512-lj9ViATR1SsqycwFkJCtYfQTheBdvlWJqzqxwc9f2qrcVrQaF/gCuBRTiTolkRWS6KvNxSk4KHZWG7tDktLgjg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.52.3.tgz", + "integrity": "sha512-+Dyo7O1KUmIsbzx1l+4V4tvEVnVQqMOIYtrxK7ncLSknl1xnMHLgn7gddJVrYPNZfEB8CIi3hK8gq8bDhb3h5A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.52.3.tgz", + "integrity": "sha512-u9Xg2FavYbD30g3DSfNhxgNrxhi6xVG4Y6i9Ur1C7xUuGDW3banRbXj+qgnIrwRN4KeJ396jchwy9bCIzbyBEQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.52.3.tgz", + "integrity": "sha512-5M8kyi/OX96wtD5qJR89a/3x5x8x5inXBZO04JWhkQb2JWavOWfjgkdvUqibGJeNNaz1/Z1PPza5/tAPXICI6A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.52.3.tgz", + "integrity": "sha512-IoerZJ4l1wRMopEHRKOO16e04iXRDyZFZnNZKrWeNquh5d6bucjezgd+OxG03mOMTnS1x7hilzb3uURPkJ0OfA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.52.3.tgz", + "integrity": "sha512-ZYdtqgHTDfvrJHSh3W22TvjWxwOgc3ThK/XjgcNGP2DIwFIPeAPNsQxrJO5XqleSlgDux2VAoWQ5iJrtaC1TbA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.52.3.tgz", + "integrity": "sha512-NcViG7A0YtuFDA6xWSgmFb6iPFzHlf5vcqb2p0lGEbT+gjrEEz8nC/EeDHvx6mnGXnGCC1SeVV+8u+smj0CeGQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.52.3.tgz", + "integrity": "sha512-d3pY7LWno6SYNXRm6Ebsq0DJGoiLXTb83AIPCXl9fmtIQs/rXoS8SJxxUNtFbJ5MiOvs+7y34np77+9l4nfFMw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.52.3.tgz", + "integrity": "sha512-3y5GA0JkBuirLqmjwAKwB0keDlI6JfGYduMlJD/Rl7fvb4Ni8iKdQs1eiunMZJhwDWdCvrcqXRY++VEBbvk6Eg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.52.3.tgz", + "integrity": "sha512-AUUH65a0p3Q0Yfm5oD2KVgzTKgwPyp9DSXc3UA7DtxhEb/WSPfbG4wqXeSN62OG5gSo18em4xv6dbfcUGXcagw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.52.3.tgz", + "integrity": "sha512-1makPhFFVBqZE+XFg3Dkq+IkQ7JvmUrwwqaYBL2CE+ZpxPaqkGaiWFEWVGyvTwZace6WLJHwjVh/+CXbKDGPmg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.52.3.tgz", + "integrity": "sha512-OOFJa28dxfl8kLOPMUOQBCO6z3X2SAfzIE276fwT52uXDWUS178KWq0pL7d6p1kz7pkzA0yQwtqL0dEPoVcRWg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.52.3.tgz", + "integrity": "sha512-jMdsML2VI5l+V7cKfZx3ak+SLlJ8fKvLJ0Eoa4b9/vCUrzXKgoKxvHqvJ/mkWhFiyp88nCkM5S2v6nIwRtPcgg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.52.3.tgz", + "integrity": "sha512-tPgGd6bY2M2LJTA1uGq8fkSPK8ZLYjDjY+ZLK9WHncCnfIz29LIXIqUgzCR0hIefzy6Hpbe8Th5WOSwTM8E7LA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.52.3.tgz", + "integrity": "sha512-BCFkJjgk+WFzP+tcSMXq77ymAPIxsX9lFJWs+2JzuZTLtksJ2o5hvgTdIcZ5+oKzUDMwI0PfWzRBYAydAHF2Mw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.52.3.tgz", + "integrity": "sha512-KTD/EqjZF3yvRaWUJdD1cW+IQBk4fbQaHYJUmP8N4XoKFZilVL8cobFSTDnjTtxWJQ3JYaMgF4nObY/+nYkumA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.52.3.tgz", + "integrity": "sha512-+zteHZdoUYLkyYKObGHieibUFLbttX2r+58l27XZauq0tcWYYuKUwY2wjeCN9oK1Um2YgH2ibd6cnX/wFD7DuA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.52.3.tgz", + "integrity": "sha512-of1iHkTQSo3kr6dTIRX6t81uj/c/b15HXVsPcEElN5sS859qHrOepM5p9G41Hah+CTqSh2r8Bm56dL2z9UQQ7g==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.52.3.tgz", + "integrity": "sha512-s0hybmlHb56mWVZQj8ra9048/WZTPLILKxcvcq+8awSZmyiSUZjjem1AhU3Tf4ZKpYhK4mg36HtHDOe8QJS5PQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.52.3.tgz", + "integrity": "sha512-zGIbEVVXVtauFgl3MRwGWEN36P5ZGenHRMgNw88X5wEhEBpq0XrMEZwOn07+ICrwM17XO5xfMZqh0OldCH5VTA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@types/dompurify": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/dompurify/-/dompurify-3.0.5.tgz", + "integrity": "sha512-1Wg0g3BtQF7sSb27fJQAKck1HECM6zV1EB66j8JH9i3LCjYabJa0FSdiSgsD5K/RbrsR0SiraKacLB+T8ZVYAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/trusted-types": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/@vitejs/plugin-vue": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-6.0.1.tgz", + "integrity": "sha512-+MaE752hU0wfPFJEUAIxqw18+20euHHdxVtMvbFcOEpjEyfqXH/5DCoTHiVJ0J29EhTJdoTkjEv5YBKU9dnoTw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rolldown/pluginutils": "1.0.0-beta.29" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "peerDependencies": { + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0", + "vue": "^3.2.25" + } + }, + "node_modules/@volar/language-core": { + "version": "2.4.23", + "resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-2.4.23.tgz", + "integrity": "sha512-hEEd5ET/oSmBC6pi1j6NaNYRWoAiDhINbT8rmwtINugR39loROSlufGdYMF9TaKGfz+ViGs1Idi3mAhnuPcoGQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@volar/source-map": "2.4.23" + } + }, + "node_modules/@volar/source-map": { + "version": "2.4.23", + "resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-2.4.23.tgz", + "integrity": "sha512-Z1Uc8IB57Lm6k7q6KIDu/p+JWtf3xsXJqAX/5r18hYOTpJyBn0KXUR8oTJ4WFYOcDzWC9n3IflGgHowx6U6z9Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/@volar/typescript": { + "version": "2.4.23", + "resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-2.4.23.tgz", + "integrity": "sha512-lAB5zJghWxVPqfcStmAP1ZqQacMpe90UrP5RJ3arDyrhy4aCUQqmxPPLB2PWDKugvylmO41ljK7vZ+t6INMTag==", + "dev": true, + "license": "MIT", + "dependencies": { + "@volar/language-core": "2.4.23", + "path-browserify": "^1.0.1", + "vscode-uri": "^3.0.8" + } + }, + "node_modules/@vue/compiler-core": { + "version": "3.5.22", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.22.tgz", + "integrity": "sha512-jQ0pFPmZwTEiRNSb+i9Ow/I/cHv2tXYqsnHKKyCQ08irI2kdF5qmYedmF8si8mA7zepUFmJ2hqzS8CQmNOWOkQ==", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.28.4", + "@vue/shared": "3.5.22", + "entities": "^4.5.0", + "estree-walker": "^2.0.2", + "source-map-js": "^1.2.1" + } + }, + "node_modules/@vue/compiler-dom": { + "version": "3.5.22", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.22.tgz", + "integrity": "sha512-W8RknzUM1BLkypvdz10OVsGxnMAuSIZs9Wdx1vzA3mL5fNMN15rhrSCLiTm6blWeACwUwizzPVqGJgOGBEN/hA==", + "license": "MIT", + "dependencies": { + "@vue/compiler-core": "3.5.22", + "@vue/shared": "3.5.22" + } + }, + "node_modules/@vue/compiler-sfc": { + "version": "3.5.22", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.22.tgz", + "integrity": "sha512-tbTR1zKGce4Lj+JLzFXDq36K4vcSZbJ1RBu8FxcDv1IGRz//Dh2EBqksyGVypz3kXpshIfWKGOCcqpSbyGWRJQ==", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.28.4", + "@vue/compiler-core": "3.5.22", + "@vue/compiler-dom": "3.5.22", + "@vue/compiler-ssr": "3.5.22", + "@vue/shared": "3.5.22", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.19", + "postcss": "^8.5.6", + "source-map-js": "^1.2.1" + } + }, + "node_modules/@vue/compiler-ssr": { + "version": "3.5.22", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.22.tgz", + "integrity": "sha512-GdgyLvg4R+7T8Nk2Mlighx7XGxq/fJf9jaVofc3IL0EPesTE86cP/8DD1lT3h1JeZr2ySBvyqKQJgbS54IX1Ww==", + "license": "MIT", + "dependencies": { + "@vue/compiler-dom": "3.5.22", + "@vue/shared": "3.5.22" + } + }, + "node_modules/@vue/devtools-api": { + "version": "6.6.4", + "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.6.4.tgz", + "integrity": "sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g==", + "license": "MIT" + }, + "node_modules/@vue/language-core": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@vue/language-core/-/language-core-3.1.0.tgz", + "integrity": "sha512-a7ns+X9vTbdmk7QLrvnZs8s4E1wwtxG/sELzr6F2j4pU+r/OoAv6jJGSz+5tVTU6e4+3rjepGhSP8jDmBBcb3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@volar/language-core": "2.4.23", + "@vue/compiler-dom": "^3.5.0", + "@vue/shared": "^3.5.0", + "alien-signals": "^3.0.0", + "muggle-string": "^0.4.1", + "path-browserify": "^1.0.1", + "picomatch": "^4.0.2" + }, + "peerDependencies": { + "typescript": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@vue/reactivity": { + "version": "3.5.22", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.22.tgz", + "integrity": "sha512-f2Wux4v/Z2pqc9+4SmgZC1p73Z53fyD90NFWXiX9AKVnVBEvLFOWCEgJD3GdGnlxPZt01PSlfmLqbLYzY/Fw4A==", + "license": "MIT", + "dependencies": { + "@vue/shared": "3.5.22" + } + }, + "node_modules/@vue/runtime-core": { + "version": "3.5.22", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.22.tgz", + "integrity": "sha512-EHo4W/eiYeAzRTN5PCextDUZ0dMs9I8mQ2Fy+OkzvRPUYQEyK9yAjbasrMCXbLNhF7P0OUyivLjIy0yc6VrLJQ==", + "license": "MIT", + "dependencies": { + "@vue/reactivity": "3.5.22", + "@vue/shared": "3.5.22" + } + }, + "node_modules/@vue/runtime-dom": { + "version": "3.5.22", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.22.tgz", + "integrity": "sha512-Av60jsryAkI023PlN7LsqrfPvwfxOd2yAwtReCjeuugTJTkgrksYJJstg1e12qle0NarkfhfFu1ox2D+cQotww==", + "license": "MIT", + "dependencies": { + "@vue/reactivity": "3.5.22", + "@vue/runtime-core": "3.5.22", + "@vue/shared": "3.5.22", + "csstype": "^3.1.3" + } + }, + "node_modules/@vue/server-renderer": { + "version": "3.5.22", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.22.tgz", + "integrity": "sha512-gXjo+ao0oHYTSswF+a3KRHZ1WszxIqO7u6XwNHqcqb9JfyIL/pbWrrh/xLv7jeDqla9u+LK7yfZKHih1e1RKAQ==", + "license": "MIT", + "dependencies": { + "@vue/compiler-ssr": "3.5.22", + "@vue/shared": "3.5.22" + }, + "peerDependencies": { + "vue": "3.5.22" + } + }, + "node_modules/@vue/shared": { + "version": "3.5.22", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.22.tgz", + "integrity": "sha512-F4yc6palwq3TT0u+FYf0Ns4Tfl9GRFURDN2gWG7L1ecIaS/4fCIuFOjMTnCyjsu/OK6vaDKLCrGAa+KvvH+h4w==", + "license": "MIT" + }, + "node_modules/@vue/tsconfig": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@vue/tsconfig/-/tsconfig-0.8.1.tgz", + "integrity": "sha512-aK7feIWPXFSUhsCP9PFqPyFOcz4ENkb8hZ2pneL6m2UjCkccvaOhC/5KCKluuBufvp2KzkbdA2W2pk20vLzu3g==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "typescript": "5.x", + "vue": "^3.4.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + }, + "vue": { + "optional": true + } + } + }, + "node_modules/alien-signals": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/alien-signals/-/alien-signals-3.0.0.tgz", + "integrity": "sha512-JHoRJf18Y6HN4/KZALr3iU+0vW9LKG+8FMThQlbn4+gv8utsLIkwpomjElGPccGeNwh0FI2HN6BLnyFLo6OyLQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "license": "MIT" + }, + "node_modules/dompurify": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.7.tgz", + "integrity": "sha512-WhL/YuveyGXJaerVlMYGWhvQswa7myDG17P7Vu65EWC05o8vfeNbvNf4d/BOvH99+ZW+LlQsc1GDKMa1vNK6dw==", + "license": "(MPL-2.0 OR Apache-2.0)", + "optionalDependencies": { + "@types/trusted-types": "^2.0.7" + } + }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/esbuild": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.10.tgz", + "integrity": "sha512-9RiGKvCwaqxO2owP61uQ4BgNborAQskMR6QusfWzQqv7AZOg5oGehdY2pRJMTKuwxd1IDBP4rSbI5lHzU7SMsQ==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.10", + "@esbuild/android-arm": "0.25.10", + "@esbuild/android-arm64": "0.25.10", + "@esbuild/android-x64": "0.25.10", + "@esbuild/darwin-arm64": "0.25.10", + "@esbuild/darwin-x64": "0.25.10", + "@esbuild/freebsd-arm64": "0.25.10", + "@esbuild/freebsd-x64": "0.25.10", + "@esbuild/linux-arm": "0.25.10", + "@esbuild/linux-arm64": "0.25.10", + "@esbuild/linux-ia32": "0.25.10", + "@esbuild/linux-loong64": "0.25.10", + "@esbuild/linux-mips64el": "0.25.10", + "@esbuild/linux-ppc64": "0.25.10", + "@esbuild/linux-riscv64": "0.25.10", + "@esbuild/linux-s390x": "0.25.10", + "@esbuild/linux-x64": "0.25.10", + "@esbuild/netbsd-arm64": "0.25.10", + "@esbuild/netbsd-x64": "0.25.10", + "@esbuild/openbsd-arm64": "0.25.10", + "@esbuild/openbsd-x64": "0.25.10", + "@esbuild/openharmony-arm64": "0.25.10", + "@esbuild/sunos-x64": "0.25.10", + "@esbuild/win32-arm64": "0.25.10", + "@esbuild/win32-ia32": "0.25.10", + "@esbuild/win32-x64": "0.25.10" + } + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "license": "MIT" + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/magic-string": { + "version": "0.30.19", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.19.tgz", + "integrity": "sha512-2N21sPY9Ws53PZvsEpVtNuSW+ScYbQdp4b9qUaL+9QkHUrGFKo56Lg9Emg5s9V/qrtNBmiR01sYhUOwu3H+VOw==", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/marked": { + "version": "16.3.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-16.3.0.tgz", + "integrity": "sha512-K3UxuKu6l6bmA5FUwYho8CfJBlsUWAooKtdGgMcERSpF7gcBUrCGsLH7wDaaNOzwq18JzSUDyoEb/YsrqMac3w==", + "license": "MIT", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/muggle-string": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/muggle-string/-/muggle-string-0.4.1.tgz", + "integrity": "sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", + "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/rollup": { + "version": "4.52.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.52.3.tgz", + "integrity": "sha512-RIDh866U8agLgiIcdpB+COKnlCreHJLfIhWC3LVflku5YHfpnsIKigRZeFfMfCc4dVcqNVfQQ5gO/afOck064A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.8" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.52.3", + "@rollup/rollup-android-arm64": "4.52.3", + "@rollup/rollup-darwin-arm64": "4.52.3", + "@rollup/rollup-darwin-x64": "4.52.3", + "@rollup/rollup-freebsd-arm64": "4.52.3", + "@rollup/rollup-freebsd-x64": "4.52.3", + "@rollup/rollup-linux-arm-gnueabihf": "4.52.3", + "@rollup/rollup-linux-arm-musleabihf": "4.52.3", + "@rollup/rollup-linux-arm64-gnu": "4.52.3", + "@rollup/rollup-linux-arm64-musl": "4.52.3", + "@rollup/rollup-linux-loong64-gnu": "4.52.3", + "@rollup/rollup-linux-ppc64-gnu": "4.52.3", + "@rollup/rollup-linux-riscv64-gnu": "4.52.3", + "@rollup/rollup-linux-riscv64-musl": "4.52.3", + "@rollup/rollup-linux-s390x-gnu": "4.52.3", + "@rollup/rollup-linux-x64-gnu": "4.52.3", + "@rollup/rollup-linux-x64-musl": "4.52.3", + "@rollup/rollup-openharmony-arm64": "4.52.3", + "@rollup/rollup-win32-arm64-msvc": "4.52.3", + "@rollup/rollup-win32-ia32-msvc": "4.52.3", + "@rollup/rollup-win32-x64-gnu": "4.52.3", + "@rollup/rollup-win32-x64-msvc": "4.52.3", + "fsevents": "~2.3.2" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/typescript": { + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", + "devOptional": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/vite": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.1.7.tgz", + "integrity": "sha512-VbA8ScMvAISJNJVbRDTJdCwqQoAareR/wutevKanhR2/1EkoXVZVkkORaYm/tNVCjP/UDTKtcw3bAkwOUdedmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.25.0", + "fdir": "^6.5.0", + "picomatch": "^4.0.3", + "postcss": "^8.5.6", + "rollup": "^4.43.0", + "tinyglobby": "^0.2.15" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "lightningcss": "^1.21.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vscode-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.1.0.tgz", + "integrity": "sha512-/BpdSx+yCQGnCvecbyXdxHDkuk55/G3xwnC0GqY4gmQ3j+A+g8kzzgB4Nk/SINjqn6+waqw3EgbVF2QKExkRxQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/vue": { + "version": "3.5.22", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.22.tgz", + "integrity": "sha512-toaZjQ3a/G/mYaLSbV+QsQhIdMo9x5rrqIpYRObsJ6T/J+RyCSFwN2LHNVH9v8uIcljDNa3QzPVdv3Y6b9hAJQ==", + "license": "MIT", + "dependencies": { + "@vue/compiler-dom": "3.5.22", + "@vue/compiler-sfc": "3.5.22", + "@vue/runtime-dom": "3.5.22", + "@vue/server-renderer": "3.5.22", + "@vue/shared": "3.5.22" + }, + "peerDependencies": { + "typescript": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/vue-router": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.5.1.tgz", + "integrity": "sha512-ogAF3P97NPm8fJsE4by9dwSYtDwXIY1nFY9T6DyQnGHd1E2Da94w9JIolpe42LJGIl0DwOHBi8TcRPlPGwbTtw==", + "license": "MIT", + "dependencies": { + "@vue/devtools-api": "^6.6.4" + }, + "funding": { + "url": "https://github.com/sponsors/posva" + }, + "peerDependencies": { + "vue": "^3.2.0" + } + }, + "node_modules/vue-tsc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/vue-tsc/-/vue-tsc-3.1.0.tgz", + "integrity": "sha512-fbMynMG7kXSnqZTRBSCh9ROYaVpXfCZbEO0gY3lqOjLbp361uuS88n6BDajiUriDIF+SGLWoinjvf6stS2J3Gg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@volar/typescript": "2.4.23", + "@vue/language-core": "3.1.0" + }, + "bin": { + "vue-tsc": "bin/vue-tsc.js" + }, + "peerDependencies": { + "typescript": ">=5.0.0" + } + } + } +} diff --git a/pmoupnp/webapp/package.json b/pmoupnp/webapp/package.json new file mode 100644 index 00000000..bffcc82e --- /dev/null +++ b/pmoupnp/webapp/package.json @@ -0,0 +1,25 @@ +{ + "name": "webapp", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vue-tsc -b && vite build", + "preview": "vite preview" + }, + "dependencies": { + "dompurify": "^3.2.7", + "marked": "^16.3.0", + "vue": "^3.5.21", + "vue-router": "^4.5.1" + }, + "devDependencies": { + "@types/dompurify": "^3.0.5", + "@vitejs/plugin-vue": "^6.0.1", + "@vue/tsconfig": "^0.8.1", + "typescript": "~5.8.3", + "vite": "^7.1.7", + "vue-tsc": "^3.0.7" + } +} diff --git a/pmoupnp/webapp/public/vite.svg b/pmoupnp/webapp/public/vite.svg new file mode 100644 index 00000000..e7b8dfb1 --- /dev/null +++ b/pmoupnp/webapp/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/pmoupnp/webapp/src/App.vue b/pmoupnp/webapp/src/App.vue new file mode 100644 index 00000000..f8a79926 --- /dev/null +++ b/pmoupnp/webapp/src/App.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/pmoupnp/webapp/src/assets/vue.svg b/pmoupnp/webapp/src/assets/vue.svg new file mode 100644 index 00000000..770e9d33 --- /dev/null +++ b/pmoupnp/webapp/src/assets/vue.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/pmoupnp/webapp/src/components/HelloWorld.vue b/pmoupnp/webapp/src/components/HelloWorld.vue new file mode 100644 index 00000000..b58e52b9 --- /dev/null +++ b/pmoupnp/webapp/src/components/HelloWorld.vue @@ -0,0 +1,41 @@ + + + + + diff --git a/pmoupnp/webapp/src/components/LogView.vue b/pmoupnp/webapp/src/components/LogView.vue new file mode 100644 index 00000000..ead130e8 --- /dev/null +++ b/pmoupnp/webapp/src/components/LogView.vue @@ -0,0 +1,580 @@ + + + + + \ No newline at end of file diff --git a/pmoupnp/webapp/src/main.ts b/pmoupnp/webapp/src/main.ts new file mode 100644 index 00000000..0e93bac4 --- /dev/null +++ b/pmoupnp/webapp/src/main.ts @@ -0,0 +1,7 @@ +import { createApp } from "vue"; +import App from "./App.vue"; +import router from "./router"; + +import "./style.css"; + +createApp(App).use(router).mount("#app"); diff --git a/pmoupnp/webapp/src/router/index.ts b/pmoupnp/webapp/src/router/index.ts new file mode 100644 index 00000000..8cb9c97e --- /dev/null +++ b/pmoupnp/webapp/src/router/index.ts @@ -0,0 +1,16 @@ +import { createRouter, createWebHistory } from "vue-router"; +import HelloWorld from "../components/HelloWorld.vue"; +import LogView from "../components/LogView.vue"; + +const routes = [ + { path: "/", name: "home", component: HelloWorld }, + { path: "/logs", name: "logs", component: LogView }, +]; + +const router = createRouter({ + // history avec base /app + history: createWebHistory("/app"), + routes, +}); + +export default router; diff --git a/pmoupnp/webapp/src/shims-vue.d.ts b/pmoupnp/webapp/src/shims-vue.d.ts new file mode 100644 index 00000000..daba9b9e --- /dev/null +++ b/pmoupnp/webapp/src/shims-vue.d.ts @@ -0,0 +1,5 @@ +declare module "*.vue" { + import { DefineComponent } from "vue"; + const component: DefineComponent<{}, {}, any>; + export default component; +} diff --git a/pmoupnp/webapp/src/style.css b/pmoupnp/webapp/src/style.css new file mode 100644 index 00000000..1c69e469 --- /dev/null +++ b/pmoupnp/webapp/src/style.css @@ -0,0 +1,80 @@ +:root { + font-family: system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; + width: 100vw; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #646cff; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +.card { + padding: 2em; +} + +#app { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } +} diff --git a/pmoupnp/webapp/tsconfig.app.json b/pmoupnp/webapp/tsconfig.app.json new file mode 100644 index 00000000..8d16e425 --- /dev/null +++ b/pmoupnp/webapp/tsconfig.app.json @@ -0,0 +1,16 @@ +{ + "extends": "@vue/tsconfig/tsconfig.dom.json", + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", + "types": ["vite/client"], + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "erasableSyntaxOnly": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedSideEffectImports": true + }, + "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"] +} diff --git a/pmoupnp/webapp/tsconfig.json b/pmoupnp/webapp/tsconfig.json new file mode 100644 index 00000000..1ffef600 --- /dev/null +++ b/pmoupnp/webapp/tsconfig.json @@ -0,0 +1,7 @@ +{ + "files": [], + "references": [ + { "path": "./tsconfig.app.json" }, + { "path": "./tsconfig.node.json" } + ] +} diff --git a/pmoupnp/webapp/tsconfig.node.json b/pmoupnp/webapp/tsconfig.node.json new file mode 100644 index 00000000..7a77bab3 --- /dev/null +++ b/pmoupnp/webapp/tsconfig.node.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", + "target": "ES2023", + "lib": ["ES2023"], + "module": "ESNext", + "types": [], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "moduleDetection": "force", + "noEmit": true, + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "erasableSyntaxOnly": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedSideEffectImports": true + }, + "include": ["vite.config.ts"] +} diff --git a/pmoupnp/webapp/vite.config.ts b/pmoupnp/webapp/vite.config.ts new file mode 100644 index 00000000..c7e0ac58 --- /dev/null +++ b/pmoupnp/webapp/vite.config.ts @@ -0,0 +1,8 @@ +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' + +// https://vite.dev/config/ +export default defineConfig({ + plugins: [vue()], + base: '/app/', // Base path pour le déploiement +}) diff --git a/pmoutils/Cargo.toml b/pmoutils/Cargo.toml new file mode 100644 index 00000000..439ebc85 --- /dev/null +++ b/pmoutils/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "pmoutils" +version = "0.1.0" +edition = "2024" + +[dependencies] +get_if_addrs = "0.5.3" \ No newline at end of file diff --git a/pmoutils/src/ip_utils.rs b/pmoutils/src/ip_utils.rs new file mode 100644 index 00000000..5e7aa671 --- /dev/null +++ b/pmoutils/src/ip_utils.rs @@ -0,0 +1,41 @@ +use std::net::UdpSocket; +use get_if_addrs::get_if_addrs; + +pub fn guess_local_ip() -> String { + // On tente de deviner l'IP locale + match UdpSocket::bind("0.0.0.0:0") { + Ok(socket) => { + if socket.connect("8.8.8.8:80").is_ok() { + if let Ok(local_addr) = socket.local_addr() { + return local_addr.ip().to_string(); + } + } + // Si erreur sur connect ou récupération de l'adresse + "127.0.0.1".to_string() + } + Err(_) => "127.0.0.1".to_string(), // Si bind échoue + } +} + + +fn list_all_ips() -> std::collections::HashMap> { + let mut result = std::collections::HashMap::new(); + + if let Ok(interfaces) = get_if_addrs() { + for iface in interfaces { + let ip = iface.ip(); + if ip.is_loopback() { + continue; + } + if ip.is_ipv4() { + result.entry(iface.name) + .or_insert_with(Vec::new) + .push(ip.to_string()); + } + } + } else { + result.insert("error".to_string(), vec!["Failed to get interfaces".to_string()]); + } + + result +} diff --git a/pmoutils/src/lib.rs b/pmoutils/src/lib.rs new file mode 100644 index 00000000..548e0ba7 --- /dev/null +++ b/pmoutils/src/lib.rs @@ -0,0 +1,3 @@ +mod ip_utils; + +pub use ip_utils::guess_local_ip; \ No newline at end of file