diff --git a/Cargo.lock b/Cargo.lock index b771d7a..23c1fef 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,12 +2,78 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + [[package]] name = "adler2" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" +[[package]] +name = "aead" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common", + "generic-array", +] + +[[package]] +name = "aes" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +dependencies = [ + "cfg-if 1.0.4", + "cipher", + "cpufeatures", +] + +[[package]] +name = "aes-gcm" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" +dependencies = [ + "aead", + "aes", + "cipher", + "ctr", + "ghash", + "subtle", +] + +[[package]] +name = "aes-kw" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69fa2b352dcefb5f7f3a5fb840e02665d311d878955380515e4fd50095dd3d8c" +dependencies = [ + "aes", +] + +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if 1.0.4", + "once_cell", + "version_check", + "zerocopy", +] + [[package]] name = "aho-corasick" version = "1.1.4" @@ -17,6 +83,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + [[package]] name = "anstream" version = "0.6.21" @@ -73,6 +145,39 @@ version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" +[[package]] +name = "ar_archive_writer" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7eb93bbb63b9c227414f6eb3a0adfddca591a8ce1e9b60661bb08969b87e340b" +dependencies = [ + "object", +] + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "ascii" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16" + +[[package]] +name = "ast_node" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91fb5864e2f5bf9fd9797b94b2dfd1554d4c3092b535008b27d7e15c86675a2f" +dependencies = [ + "proc-macro2", + "quote", + "swc_macros_common 1.0.0", + "syn", +] + [[package]] name = "async-trait" version = "0.1.89" @@ -97,6 +202,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9a7b350e3bb1767102698302bc37256cbd48422809984b98d292c40e2579aa9" dependencies = [ "aws-lc-sys", + "untrusted 0.7.1", "zeroize", ] @@ -120,7 +226,7 @@ checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" dependencies = [ "async-trait", "axum-core", - "base64", + "base64 0.21.7", "bitflags 1.3.2", "bytes", "futures-util", @@ -202,12 +308,24 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be5eb007b7cacc6c660343e96f650fedf4b5a77512399eb952ca6642cf8d13f7" +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + [[package]] name = "base64" version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + [[package]] name = "base64-simd" version = "0.8.0" @@ -218,6 +336,21 @@ dependencies = [ "vsimd", ] +[[package]] +name = "base64ct" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" + +[[package]] +name = "better_scoped_tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd228125315b132eed175bf47619ac79b945b26e56b848ba203ae4ea8603609" +dependencies = [ + "scoped-tls", +] + [[package]] name = "bincode" version = "1.3.3" @@ -227,6 +360,26 @@ dependencies = [ "serde", ] +[[package]] +name = "bindgen" +version = "0.71.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" +dependencies = [ + "bitflags 2.10.0", + "cexpr", + "clang-sys", + "itertools", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn", +] + [[package]] name = "bindgen" version = "0.72.1" @@ -295,6 +448,15 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-padding" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" +dependencies = [ + "generic-array", +] + [[package]] name = "boxed_error" version = "0.2.3" @@ -310,6 +472,9 @@ name = "bumpalo" version = "3.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" +dependencies = [ + "allocator-api2", +] [[package]] name = "byteorder" @@ -359,6 +524,24 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" +[[package]] +name = "castaway" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dec551ab6e7578819132c713a93c022a05d60159dc86e7a7050223577484c55a" +dependencies = [ + "rustversion", +] + +[[package]] +name = "cbc" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" +dependencies = [ + "cipher", +] + [[package]] name = "cc" version = "1.2.55" @@ -419,6 +602,16 @@ dependencies = [ "half", ] +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + [[package]] name = "clang-sys" version = "1.8.1" @@ -482,6 +675,19 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "compact_str" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f86b9c4c00838774a6d902ef931eff7470720c51d90c2e32cfe15dc304737b3f" +dependencies = [ + "castaway", + "cfg-if 1.0.4", + "itoa", + "ryu", + "static_assertions", +] + [[package]] name = "console_error_panic_hook" version = "0.1.7" @@ -492,6 +698,12 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + [[package]] name = "cooked-waker" version = "5.0.0" @@ -562,6 +774,18 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core", + "subtle", + "zeroize", +] + [[package]] name = "crypto-common" version = "0.1.7" @@ -569,9 +793,45 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" dependencies = [ "generic-array", + "rand_core", "typenum", ] +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher", +] + +[[package]] +name = "curve25519-dalek" +version = "4.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +dependencies = [ + "cfg-if 1.0.4", + "cpufeatures", + "curve25519-dalek-derive", + "fiat-crypto 0.2.9", + "rustc_version", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "daemonize" version = "0.5.0" @@ -581,12 +841,31 @@ dependencies = [ "libc", ] +[[package]] +name = "dashmap" +version = "5.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +dependencies = [ + "cfg-if 1.0.4", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + [[package]] name = "data-encoding" version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7a1e2f27636f116493b8b860f5546edb47c8d8f8ea73e1d2a20be88e28d1fea" +[[package]] +name = "data-url" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be1e0bca6c3637f992fc1cc7cbc52a78c1ef6db076dbf1059c4323d6a2048376" + [[package]] name = "debugid" version = "0.8.0" @@ -597,6 +876,96 @@ dependencies = [ "uuid", ] +[[package]] +name = "deno_ast" +version = "0.49.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24158ccf7def38c00fd253fd1b48c8c6207214078fe499f47168763fa2445bf2" +dependencies = [ + "base64 0.22.1", + "capacity_builder", + "deno_error", + "deno_media_type", + "deno_terminal", + "dprint-swc-ext", + "percent-encoding", + "serde", + "sourcemap", + "swc_atoms", + "swc_common", + "swc_config", + "swc_config_macro", + "swc_ecma_ast", + "swc_ecma_codegen", + "swc_ecma_codegen_macros", + "swc_ecma_loader", + "swc_ecma_parser", + "swc_ecma_transforms_base", + "swc_ecma_transforms_classes", + "swc_ecma_transforms_macros", + "swc_ecma_transforms_proposal", + "swc_ecma_transforms_react", + "swc_ecma_transforms_typescript", + "swc_ecma_utils", + "swc_ecma_visit", + "swc_eq_ignore_macros", + "swc_macros_common 1.0.0", + "swc_visit", + "swc_visit_macros", + "text_lines", + "thiserror 2.0.18", + "unicode-width 0.2.2", + "url", +] + +[[package]] +name = "deno_console" +version = "0.213.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c53d2fbfe68ff0d39dcbffb869bfa30019da2db5d0efbfb4b3fcc04bd1aed0e" +dependencies = [ + "deno_core 0.355.0", +] + +[[package]] +name = "deno_core" +version = "0.355.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "775d2fde80a2ec3116d179703b38346a931bb9626f4a826148d5fe8631cab29f" +dependencies = [ + "anyhow", + "az", + "bincode", + "bit-set", + "bit-vec", + "boxed_error", + "bytes", + "capacity_builder", + "cooked-waker", + "deno_core_icudata 0.74.0", + "deno_error", + "deno_ops 0.231.0", + "deno_path_util", + "deno_unsync", + "futures", + "indexmap", + "libc", + "parking_lot", + "percent-encoding", + "pin-project", + "serde", + "serde_json", + "serde_v8 0.264.0", + "smallvec", + "sourcemap", + "static_assertions", + "thiserror 2.0.18", + "tokio", + "url", + "v8 137.3.0", + "wasm_dep_analyzer", +] + [[package]] name = "deno_core" version = "0.385.0" @@ -612,9 +981,9 @@ dependencies = [ "bytes", "capacity_builder", "cooked-waker", - "deno_core_icudata", + "deno_core_icudata 0.77.0", "deno_error", - "deno_ops", + "deno_ops 0.261.0", "deno_path_util", "deno_unsync", "futures", @@ -625,17 +994,23 @@ dependencies = [ "pin-project", "serde", "serde_json", - "serde_v8", + "serde_v8 0.294.0", "smallvec", "sourcemap", "static_assertions", "thiserror 2.0.18", "tokio", "url", - "v8", + "v8 145.0.0", "wasm_dep_analyzer", ] +[[package]] +name = "deno_core_icudata" +version = "0.74.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe4dccb6147bb3f3ba0c7a48e993bfeb999d2c2e47a81badee80e2b370c8d695" + [[package]] name = "deno_core_icudata" version = "0.77.0" @@ -643,10 +1018,50 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9efff8990a82c1ae664292507e1a5c6749ddd2312898cdf9cd7cb1fd4bc64c6" [[package]] -name = "deno_error" -version = "0.7.3" +name = "deno_crypto" +version = "0.227.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3007d3f1ea92ea503324ae15883aac0c2de2b8cf6fead62203ff6a67161007ab" +checksum = "c0f8afd2869b8cefa809e912ba73242485ac69009b6195581eea8a75bc1b89c7" +dependencies = [ + "aes", + "aes-gcm", + "aes-kw", + "aws-lc-rs", + "base64 0.22.1", + "cbc", + "const-oid", + "ctr", + "curve25519-dalek", + "deno_core 0.355.0", + "deno_error", + "deno_web", + "ecdsa", + "ed448-goldilocks", + "elliptic-curve", + "num-traits", + "once_cell", + "p256", + "p384", + "p521", + "rand", + "rsa", + "serde", + "serde_bytes", + "sha1", + "sha2", + "signature", + "spki", + "thiserror 2.0.18", + "tokio", + "uuid", + "x25519-dalek", +] + +[[package]] +name = "deno_error" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dde60bd153886964234c5012d3d9caf788287f28d81fb24a884436904101ef10" dependencies = [ "deno_error_macro", "libc", @@ -658,15 +1073,54 @@ dependencies = [ [[package]] name = "deno_error_macro" -version = "0.7.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b565e60a9685cdf312c888665b5f8647ac692a7da7e058a5e2268a466da8eaf" +checksum = "409f265785bd946d3006756955aaf40b0e4deb25752eae6a990afe54a31cfd83" dependencies = [ "proc-macro2", "quote", "syn", ] +[[package]] +name = "deno_features" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e73252505f94efc5be0e5c8255b8d2b7e4c1b6361a36c033486ae83d2cddbd37" +dependencies = [ + "deno_core 0.355.0", + "serde", + "serde_json", +] + +[[package]] +name = "deno_media_type" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0ec0dada9dc5ac4733b4175d36f6a150b7dd68fab46db35cb1ef00dd7366acb" +dependencies = [ + "data-url", + "serde", + "url", +] + +[[package]] +name = "deno_ops" +version = "0.231.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ca530772bbcbc9ad389ad7bcd86623b2ec555f68a2d062d23cc008915cbe781" +dependencies = [ + "indexmap", + "proc-macro-rules", + "proc-macro2", + "quote", + "stringcase", + "strum", + "strum_macros", + "syn", + "thiserror 2.0.18", +] + [[package]] name = "deno_ops" version = "0.261.0" @@ -686,9 +1140,9 @@ dependencies = [ [[package]] name = "deno_path_util" -version = "0.6.4" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78c7e98943f0d068928906db0c7bde89de684fa32c6a8018caacc4cee2cdd72b" +checksum = "bfe02936964b2910719bd488841f6e884349360113c7abf6f4c6b28ca9cd7a19" dependencies = [ "deno_error", "percent-encoding", @@ -697,6 +1151,45 @@ dependencies = [ "url", ] +[[package]] +name = "deno_permissions" +version = "0.72.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e08943b9430d1e78b7ddae254666aadfe5d8b3ee5cb253f1dff872ef5b22f10" +dependencies = [ + "capacity_builder", + "deno_error", + "deno_path_util", + "deno_terminal", + "deno_unsync", + "fqdn", + "ipnetwork", + "libc", + "log", + "nix", + "once_cell", + "parking_lot", + "percent-encoding", + "serde", + "serde_json", + "sys_traits", + "thiserror 2.0.18", + "url", + "which 8.0.0", + "winapi", + "windows-sys 0.59.0", +] + +[[package]] +name = "deno_terminal" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23f71c27009e0141dedd315f1dfa3ebb0a6ca4acce7c080fac576ea415a465f6" +dependencies = [ + "once_cell", + "termcolor", +] + [[package]] name = "deno_unsync" version = "0.4.4" @@ -708,6 +1201,58 @@ dependencies = [ "tokio", ] +[[package]] +name = "deno_url" +version = "0.213.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ebe63615f18221afbdcf0dd97f128af21529c6a4d012a7b9b4a0223c91359b2" +dependencies = [ + "deno_core 0.355.0", + "deno_error", + "urlpattern", +] + +[[package]] +name = "deno_web" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55a863aae15f3dbccb11b3776e9dea399f510a9b1d4dac22a4dcfff96bcff9d7" +dependencies = [ + "async-trait", + "base64-simd", + "bytes", + "deno_core 0.355.0", + "deno_error", + "deno_permissions", + "encoding_rs", + "flate2", + "futures", + "serde", + "thiserror 2.0.18", + "tokio", + "uuid", +] + +[[package]] +name = "deno_webidl" +version = "0.213.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68682e535768112593274795b70f4dee5d31d6d973f4be14d660c0a8954e0abb" +dependencies = [ + "deno_core 0.355.0", +] + +[[package]] +name = "der" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +dependencies = [ + "const-oid", + "pem-rfc7468", + "zeroize", +] + [[package]] name = "digest" version = "0.10.7" @@ -715,7 +1260,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", + "const-oid", "crypto-common", + "subtle", ] [[package]] @@ -761,6 +1308,21 @@ dependencies = [ "syn", ] +[[package]] +name = "dprint-swc-ext" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a09827d6db1a3af25e105553d674ee9019be58fa3d6745c2a2803f8ce8e3eb8" +dependencies = [ + "num-bigint", + "rustc-hash", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_parser", + "text_lines", +] + [[package]] name = "dunce" version = "1.0.5" @@ -773,12 +1335,71 @@ version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + +[[package]] +name = "ed448-goldilocks" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06924531e9e90130842b012e447f85bdaf9161bc8a0f8092be8cb70b01ebe092" +dependencies = [ + "fiat-crypto 0.1.20", + "hex", + "subtle", + "zeroize", +] + [[package]] name = "either" version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "base64ct", + "crypto-bigint", + "digest", + "ff", + "generic-array", + "group", + "hkdf", + "pem-rfc7468", + "pkcs8", + "rand_core", + "sec1", + "serde_json", + "serdect", + "subtle", + "zeroize", +] + +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if 1.0.4", +] + [[package]] name = "equivalent" version = "1.0.2" @@ -804,6 +1425,28 @@ dependencies = [ "getrandom 0.2.17", ] +[[package]] +name = "ff" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" +dependencies = [ + "rand_core", + "subtle", +] + +[[package]] +name = "fiat-crypto" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" + +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + [[package]] name = "filetime" version = "0.2.27" @@ -870,6 +1513,23 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fqdn" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb540cf7bc4fe6df9d8f7f0c974cfd0dce8ed4e9e8884e73433b503ee78b4e7d" + +[[package]] +name = "from_variant" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d7ccf961415e7aa17ef93dcb6c2441faaa8e768abe09e659b908089546f74c5" +dependencies = [ + "proc-macro2", + "swc_macros_common 1.0.0", + "syn", +] + [[package]] name = "fs_extra" version = "1.3.0" @@ -988,6 +1648,7 @@ checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", + "zeroize", ] [[package]] @@ -1015,12 +1676,33 @@ dependencies = [ "wasip2", ] +[[package]] +name = "ghash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" +dependencies = [ + "opaque-debug", + "polyval", +] + [[package]] name = "glob" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core", + "subtle", +] + [[package]] name = "gzip-header" version = "1.0.0" @@ -1041,6 +1723,16 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", +] + [[package]] name = "hashbrown" version = "0.16.1" @@ -1053,7 +1745,7 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" dependencies = [ - "base64", + "base64 0.21.7", "bytes", "headers-core", "http", @@ -1083,6 +1775,36 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +[[package]] +name = "hermit-abi" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + [[package]] name = "home" version = "0.5.12" @@ -1092,6 +1814,19 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "hstr" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b85186bc48d3c611ead052cc3f907748e40b63d73a99e4ed34d18063e2baaf1b" +dependencies = [ + "hashbrown 0.14.5", + "new_debug_unreachable", + "once_cell", + "rustc-hash", + "triomphe", +] + [[package]] name = "http" version = "0.2.12" @@ -1330,7 +2065,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.16.1", +] + +[[package]] +name = "inout" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" +dependencies = [ + "block-padding", + "generic-array", ] [[package]] @@ -1338,6 +2083,27 @@ name = "interner" version = "0.2.1" source = "git+https://github.com/c2vi/interner#746e7586bb65e2e50ac02140c6414574efb2eb4e" +[[package]] +name = "ipnetwork" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf466541e9d546596ee94f9f69590f89473455f88372423e0008fc1a7daf100e" +dependencies = [ + "serde", +] + +[[package]] +name = "is-macro" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d57a3e447e24c22647738e4607f1df1e0ec6f72e16182c4cd199f647cdfb0e4" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "is_terminal_polyfill" version = "1.70.2" @@ -1390,6 +2156,9 @@ name = "lazy_static" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +dependencies = [ + "spin", +] [[package]] name = "libc" @@ -1462,10 +2231,11 @@ name = "marts" version = "0.1.0" dependencies = [ "clap", - "deno_core", + "deno_core 0.385.0", "flume 0.12.0", "futures", "mize", + "rustyscript", "tokio", ] @@ -1484,6 +2254,15 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" +[[package]] +name = "maybe_path" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9c9329bd78af28f0d589085c383e5af47a24fbe070bc282cc7aa54a021c285b" +dependencies = [ + "serde", +] + [[package]] name = "memchr" version = "2.7.6" @@ -1608,6 +2387,12 @@ dependencies = [ "getrandom 0.2.17", ] +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + [[package]] name = "nix" version = "0.27.1" @@ -1656,6 +2441,23 @@ dependencies = [ "num-integer", "num-traits", "rand", + "serde", +] + +[[package]] +name = "num-bigint-dig" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e661dda6640fad38e827a6d4a310ff4763082116fe217f279885c97f511bb0b7" +dependencies = [ + "lazy_static", + "libm", + "num-integer", + "num-iter", + "num-traits", + "rand", + "smallvec", + "zeroize", ] [[package]] @@ -1667,6 +2469,17 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-iter" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + [[package]] name = "num-traits" version = "0.2.19" @@ -1677,6 +2490,25 @@ dependencies = [ "libm", ] +[[package]] +name = "num_cpus" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" +dependencies = [ + "hermit-abi", + "libc", +] + +[[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" @@ -1695,12 +2527,75 @@ version = "11.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + [[package]] name = "outref" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a80800c0488c3a21695ea981a54918fbb37abf04f4d0720c453632255e2ff0e" +[[package]] +name = "p256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2", +] + +[[package]] +name = "p384" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe42f1670a52a47d448f14b6a5c61dd78fce51856e68edaa38f7ae3a46b8d6b6" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2", +] + +[[package]] +name = "p521" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fc9e2161f1f215afdfce23677034ae137bbd45016a880c2eb3ba8eb95f085b2" +dependencies = [ + "base16ct", + "ecdsa", + "elliptic-curve", + "primeorder", + "rand_core", + "sha2", +] + +[[package]] +name = "par-core" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "757892557993c69e82f9de0f9051e87144278aa342f03bf53617bbf044554484" +dependencies = [ + "once_cell", +] + +[[package]] +name = "par-iter" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a5b20f31e9ba82bfcbbb54a67aa40be6cebec9f668ba5753be138f9523c531a" +dependencies = [ + "either", + "par-core", +] + [[package]] name = "parking_lot" version = "0.12.5" @@ -1730,12 +2625,69 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +[[package]] +name = "pathdiff" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" + +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + [[package]] name = "percent-encoding" version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" +[[package]] +name = "phf" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" +dependencies = [ + "phf_macros", + "phf_shared", +] + +[[package]] +name = "phf_generator" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" +dependencies = [ + "phf_shared", + "rand", +] + +[[package]] +name = "phf_macros" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "phf_shared" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" +dependencies = [ + "siphasher 1.0.2", +] + [[package]] name = "pin-project" version = "1.1.10" @@ -1762,6 +2714,39 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" +[[package]] +name = "pkcs1" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" +dependencies = [ + "der", + "pkcs8", + "spki", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "polyval" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" +dependencies = [ + "cfg-if 1.0.4", + "cpufeatures", + "opaque-debug", + "universal-hash", +] + [[package]] name = "potential_utf" version = "0.1.4" @@ -1803,6 +2788,38 @@ dependencies = [ "syn", ] +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", +] + +[[package]] +name = "proc-macro-rules" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07c277e4e643ef00c1233393c673f655e3672cf7eb3ba08a00bdd0ea59139b5f" +dependencies = [ + "proc-macro-rules-macros", + "proc-macro2", + "syn", +] + +[[package]] +name = "proc-macro-rules-macros" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "207fffb0fe655d1d47f6af98cc2793405e85929bdbc420d685554ff07be27ac7" +dependencies = [ + "once_cell", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "proc-macro2" version = "1.0.106" @@ -1812,6 +2829,16 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "psm" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3852766467df634d74f0b2d7819bf8dc483a0eb2e3b0f50f756f9cfe8b0d18d8" +dependencies = [ + "ar_archive_writer", + "cc", +] + [[package]] name = "quote" version = "1.0.44" @@ -1940,6 +2967,16 @@ dependencies = [ "serde_core", ] +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + [[package]] name = "ring" version = "0.17.14" @@ -1950,16 +2987,45 @@ dependencies = [ "cfg-if 1.0.4", "getrandom 0.2.17", "libc", - "untrusted", + "untrusted 0.9.0", "windows-sys 0.52.0", ] +[[package]] +name = "rsa" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8573f03f5883dcaebdfcf4725caa1ecb9c15b2ef50c43a07b816e06799bb12d" +dependencies = [ + "const-oid", + "digest", + "num-bigint-dig", + "num-integer", + "num-traits", + "pkcs1", + "pkcs8", + "rand_core", + "signature", + "spki", + "subtle", + "zeroize", +] + [[package]] name = "rustc-hash" version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + [[package]] name = "rustix" version = "0.38.44" @@ -2028,7 +3094,7 @@ dependencies = [ "aws-lc-rs", "ring", "rustls-pki-types", - "untrusted", + "untrusted 0.9.0", ] [[package]] @@ -2037,12 +3103,44 @@ version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" +[[package]] +name = "rustyscript" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7022cabe11c65c8a34a3b0e92ca1d55a0add1f873cec4def14c5b82938003d6" +dependencies = [ + "async-trait", + "base64-simd", + "deno_ast", + "deno_console", + "deno_core 0.355.0", + "deno_crypto", + "deno_error", + "deno_features", + "deno_media_type", + "deno_terminal", + "deno_url", + "deno_webidl", + "maybe_path", + "paste", + "serde", + "thiserror 2.0.18", + "tokio", + "tokio-util", +] + [[package]] name = "ryu" version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a50f4cf475b65d88e057964e0e9bb1f0aa9bbb2036dc65c64596b42932536984" +[[package]] +name = "ryu-js" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd29631678d6fb0903b69223673e122c32e9ae559d0960a38d574695ebc0ea15" + [[package]] name = "same-file" version = "1.0.6" @@ -2052,12 +3150,39 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + [[package]] name = "scopeguard" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "serdect", + "subtle", + "zeroize", +] + +[[package]] +name = "semver" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" + [[package]] name = "serde" version = "1.0.228" @@ -2079,6 +3204,16 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "serde_bytes" +version = "0.11.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5d440709e79d88e51ac01c4b72fc6cb7314017bb7da9eeff678aa94c10e3ea8" +dependencies = [ + "serde", + "serde_core", +] + [[package]] name = "serde_core" version = "1.0.228" @@ -2145,6 +3280,20 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_v8" +version = "0.264.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34707712f3815e73e1c8319bba06e5bc105bb65fe812ea2e7279ffb905f6312" +dependencies = [ + "deno_error", + "num-bigint", + "serde", + "smallvec", + "thiserror 2.0.18", + "v8 137.3.0", +] + [[package]] name = "serde_v8" version = "0.294.0" @@ -2156,7 +3305,17 @@ dependencies = [ "serde", "smallvec", "thiserror 2.0.18", - "v8", + "v8 145.0.0", +] + +[[package]] +name = "serdect" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" +dependencies = [ + "base16ct", + "serde", ] [[package]] @@ -2206,12 +3365,34 @@ dependencies = [ "libc", ] +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest", + "rand_core", +] + [[package]] name = "simd-adler32" version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + +[[package]] +name = "siphasher" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e" + [[package]] name = "slab" version = "0.4.12" @@ -2224,6 +3405,17 @@ version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +[[package]] +name = "smartstring" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fb72c633efbaa2dd666986505016c32c3044395ceaf881518399d2f4127ee29" +dependencies = [ + "autocfg", + "static_assertions", + "version_check", +] + [[package]] name = "socket2" version = "0.5.10" @@ -2271,12 +3463,35 @@ dependencies = [ "lock_api", ] +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + [[package]] name = "stable_deref_trait" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" +[[package]] +name = "stacker" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d74a23609d509411d10e2176dc2a4346e3b4aea2e7b1869f19fdedbc71c013" +dependencies = [ + "cc", + "cfg-if 1.0.4", + "libc", + "psm", + "windows-sys 0.59.0", +] + [[package]] name = "static_assertions" version = "1.1.0" @@ -2292,6 +3507,18 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "string_enum" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9fe66b8ee349846ce2f9557a26b8f1e74843c4a13fb381f9a3d73617a5f956a" +dependencies = [ + "proc-macro2", + "quote", + "swc_macros_common 1.0.0", + "syn", +] + [[package]] name = "stringcase" version = "0.4.0" @@ -2331,6 +3558,412 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" +[[package]] +name = "swc_allocator" +version = "4.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d7eefd2c8b228a8c73056482b2ae4b3a1071fbe07638e3b55ceca8570cc48bb" +dependencies = [ + "allocator-api2", + "bumpalo", + "hashbrown 0.14.5", + "rustc-hash", +] + +[[package]] +name = "swc_atoms" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d7077ba879f95406459bc0c81f3141c529b34580bc64d7ab7bd15e7118a0391" +dependencies = [ + "hstr", + "once_cell", + "rustc-hash", + "serde", +] + +[[package]] +name = "swc_common" +version = "9.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a56b6f5a8e5affa271b56757a93badee6f44defcd28f3ba106bb2603afe40d3d" +dependencies = [ + "anyhow", + "ast_node", + "better_scoped_tls", + "cfg-if 1.0.4", + "either", + "from_variant", + "new_debug_unreachable", + "num-bigint", + "once_cell", + "rustc-hash", + "serde", + "siphasher 0.3.11", + "sourcemap", + "swc_allocator", + "swc_atoms", + "swc_eq_ignore_macros", + "swc_visit", + "tracing", + "unicode-width 0.1.14", + "url", +] + +[[package]] +name = "swc_config" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a01bfcbbdea182bdda93713aeecd997749ae324686bf7944f54d128e56be4ea9" +dependencies = [ + "anyhow", + "indexmap", + "serde", + "serde_json", + "swc_config_macro", +] + +[[package]] +name = "swc_config_macro" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f2ebd37ef52a8555c8c9be78b694d64adcb5e3bc16c928f030d82f1d65fac57" +dependencies = [ + "proc-macro2", + "quote", + "swc_macros_common 1.0.0", + "syn", +] + +[[package]] +name = "swc_ecma_ast" +version = "9.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0613d84468a6bb6d45d13c5a3368b37bd21f3067a089f69adac630dcb462a018" +dependencies = [ + "bitflags 2.10.0", + "is-macro", + "num-bigint", + "once_cell", + "phf", + "rustc-hash", + "scoped-tls", + "serde", + "string_enum", + "swc_atoms", + "swc_common", + "swc_visit", + "unicode-id-start", +] + +[[package]] +name = "swc_ecma_codegen" +version = "11.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b01b3de365a86b8f982cc162f257c82f84bda31d61084174a3be37e8ab15c0f4" +dependencies = [ + "ascii", + "compact_str", + "memchr", + "num-bigint", + "once_cell", + "regex", + "rustc-hash", + "serde", + "sourcemap", + "swc_allocator", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_codegen_macros", + "tracing", +] + +[[package]] +name = "swc_ecma_codegen_macros" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e99e1931669a67c83e2c2b4375674f6901d1480994a76aa75b23f1389e6c5076" +dependencies = [ + "proc-macro2", + "quote", + "swc_macros_common 1.0.0", + "syn", +] + +[[package]] +name = "swc_ecma_lexer" +version = "12.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d11c8e71901401b9aae2ece4946eeb7674b14b8301a53768afbbeeb0e48b599" +dependencies = [ + "arrayvec", + "bitflags 2.10.0", + "either", + "new_debug_unreachable", + "num-bigint", + "num-traits", + "phf", + "rustc-hash", + "serde", + "smallvec", + "smartstring", + "stacker", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "tracing", + "typed-arena", +] + +[[package]] +name = "swc_ecma_loader" +version = "9.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eb574d660c05f3483c984107452b386e45b95531bdb1253794077edc986f413" +dependencies = [ + "anyhow", + "pathdiff", + "rustc-hash", + "serde", + "swc_atoms", + "swc_common", + "tracing", +] + +[[package]] +name = "swc_ecma_parser" +version = "12.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "250786944fbc05f6484eda9213df129ccfe17226ae9ad51b62fce2f72135dbee" +dependencies = [ + "arrayvec", + "bitflags 2.10.0", + "either", + "new_debug_unreachable", + "num-bigint", + "num-traits", + "phf", + "rustc-hash", + "serde", + "smallvec", + "smartstring", + "stacker", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_lexer", + "tracing", + "typed-arena", +] + +[[package]] +name = "swc_ecma_transforms_base" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6856da3da598f4da001b7e4ce225ee8970bc9d5cbaafcaf580190cf0a6031ec5" +dependencies = [ + "better_scoped_tls", + "bitflags 2.10.0", + "indexmap", + "once_cell", + "par-core", + "phf", + "rustc-hash", + "serde", + "smallvec", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_parser", + "swc_ecma_utils", + "swc_ecma_visit", + "tracing", +] + +[[package]] +name = "swc_ecma_transforms_classes" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f84248f82bad599d250bbcd52cb4db6ff6409f48267fd6f001302a2e9716f80" +dependencies = [ + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_transforms_base", + "swc_ecma_utils", + "swc_ecma_visit", +] + +[[package]] +name = "swc_ecma_transforms_macros" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6845dfb88569f3e8cd05901505916a8ebe98be3922f94769ca49f84e8ccec8f7" +dependencies = [ + "proc-macro2", + "quote", + "swc_macros_common 1.0.0", + "syn", +] + +[[package]] +name = "swc_ecma_transforms_proposal" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "193237e318421ef621c2b3958b4db174770c5280ef999f1878f2df93a2837ca6" +dependencies = [ + "either", + "rustc-hash", + "serde", + "smallvec", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_transforms_base", + "swc_ecma_transforms_classes", + "swc_ecma_transforms_macros", + "swc_ecma_utils", + "swc_ecma_visit", +] + +[[package]] +name = "swc_ecma_transforms_react" +version = "15.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baae39c70229103a72090119887922fc5e32f934f5ca45c0423a5e65dac7e549" +dependencies = [ + "base64 0.22.1", + "dashmap", + "indexmap", + "once_cell", + "rustc-hash", + "serde", + "sha1", + "string_enum", + "swc_allocator", + "swc_atoms", + "swc_common", + "swc_config", + "swc_ecma_ast", + "swc_ecma_parser", + "swc_ecma_transforms_base", + "swc_ecma_transforms_macros", + "swc_ecma_utils", + "swc_ecma_visit", +] + +[[package]] +name = "swc_ecma_transforms_typescript" +version = "15.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3c65e0b49f7e2a2bd92f1d89c9a404de27232ce00f6a4053f04bda446d50e5c" +dependencies = [ + "once_cell", + "rustc-hash", + "ryu-js", + "serde", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_transforms_base", + "swc_ecma_transforms_react", + "swc_ecma_utils", + "swc_ecma_visit", +] + +[[package]] +name = "swc_ecma_utils" +version = "13.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ed837406d5dbbfbf5792b1dc90964245a0cf659753d4745fe177ffebe8598b9" +dependencies = [ + "indexmap", + "num_cpus", + "once_cell", + "par-core", + "par-iter", + "rustc-hash", + "ryu-js", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_visit", + "tracing", + "unicode-id", +] + +[[package]] +name = "swc_ecma_visit" +version = "9.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "249dc9eede1a4ad59a038f9cfd61ce67845bd2c1392ade3586d714e7181f3c1a" +dependencies = [ + "new_debug_unreachable", + "num-bigint", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_visit", + "tracing", +] + +[[package]] +name = "swc_eq_ignore_macros" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e96e15288bf385ab85eb83cff7f9e2d834348da58d0a31b33bdb572e66ee413e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "swc_macros_common" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27e18fbfe83811ffae2bb23727e45829a0d19c6870bced7c0f545cc99ad248dd" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "swc_macros_common" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a509f56fca05b39ba6c15f3e58636c3924c78347d63853632ed2ffcb6f5a0ac7" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "swc_visit" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9138b6a36bbe76dd6753c4c0794f7e26480ea757bee499738bedbbb3ae3ec5f3" +dependencies = [ + "either", + "new_debug_unreachable", +] + +[[package]] +name = "swc_visit_macros" +version = "0.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92807d840959f39c60ce8a774a3f83e8193c658068e6d270dbe0a05e40e90b41" +dependencies = [ + "Inflector", + "proc-macro2", + "quote", + "swc_macros_common 0.3.14", + "syn", +] + [[package]] name = "syn" version = "2.0.114" @@ -2372,9 +4005,9 @@ dependencies = [ [[package]] name = "sys_traits" -version = "0.1.24" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5410f31d223892c1ce7a098da845c99d023b4c7f18632bc8f09e60dfae3cbb75" +checksum = "4f74a2c95f72e36fa6bd04a40d15623a9904bab1cc2fa6c6135b09d774a65088" dependencies = [ "sys_traits_macros", ] @@ -2455,6 +4088,24 @@ dependencies = [ "writeable", ] +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "text_lines" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fd5828de7deaa782e1dd713006ae96b3bee32d3279b79eb67ecf8072c059bcf" +dependencies = [ + "serde", +] + [[package]] name = "thiserror" version = "1.0.69" @@ -2735,6 +4386,16 @@ dependencies = [ "tracing-log", ] +[[package]] +name = "triomphe" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd69c5aa8f924c7519d6372789a74eac5b94fb0f8fcf0d4a97eb0bfc3e785f39" +dependencies = [ + "serde", + "stable_deref_trait", +] + [[package]] name = "try-lock" version = "0.2.5" @@ -2760,18 +4421,71 @@ dependencies = [ "utf-8", ] +[[package]] +name = "typed-arena" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" + [[package]] name = "typenum" version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" +[[package]] +name = "unic-char-property" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" +dependencies = [ + "unic-char-range", +] + +[[package]] +name = "unic-char-range" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" + +[[package]] +name = "unic-common" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" + +[[package]] +name = "unic-ucd-ident" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e230a37c0381caa9219d67cf063aa3a375ffed5bf541a452db16e744bdab6987" +dependencies = [ + "unic-char-property", + "unic-char-range", + "unic-ucd-version", +] + +[[package]] +name = "unic-ucd-version" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" +dependencies = [ + "unic-common", +] + [[package]] name = "unicase" version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" +[[package]] +name = "unicode-id" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ba288e709927c043cbe476718d37be306be53fb1fafecd0dbe36d072be2580" + [[package]] name = "unicode-id-start" version = "1.4.0" @@ -2784,6 +4498,34 @@ version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" +[[package]] +name = "unicode-width" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" + +[[package]] +name = "unicode-width" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" + +[[package]] +name = "universal-hash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +dependencies = [ + "crypto-common", + "subtle", +] + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + [[package]] name = "untrusted" version = "0.9.0" @@ -2803,6 +4545,18 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "urlpattern" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70acd30e3aa1450bc2eece896ce2ad0d178e9c079493819301573dae3c37ba6d" +dependencies = [ + "regex", + "serde", + "unic-ucd-ident", + "url", +] + [[package]] name = "utf-8" version = "0.7.6" @@ -2827,17 +4581,35 @@ version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee48d38b119b0cd71fe4141b30f5ba9c7c5d9f4e7a3a8b4a674e4b6ef789976f" dependencies = [ + "getrandom 0.3.4", "js-sys", + "serde_core", "wasm-bindgen", ] +[[package]] +name = "v8" +version = "137.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33995a1fee055ff743281cde33a41f0d618ee0bdbe8bdf6859e11864499c2595" +dependencies = [ + "bindgen 0.71.1", + "bitflags 2.10.0", + "fslock", + "gzip-header", + "home", + "miniz_oxide", + "paste", + "which 6.0.3", +] + [[package]] name = "v8" version = "145.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61d9a107e16bae35a0be2bb0096ac1d2318aac352c82edd796ab2b9cac66d8f0" dependencies = [ - "bindgen", + "bindgen 0.72.1", "bitflags 2.10.0", "fslock", "gzip-header", @@ -2845,7 +4617,7 @@ dependencies = [ "miniz_oxide", "paste", "temporal_capi", - "which", + "which 6.0.3", ] [[package]] @@ -3025,7 +4797,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ "ring", - "untrusted", + "untrusted 0.9.0", ] [[package]] @@ -3070,6 +4842,12 @@ dependencies = [ "winsafe", ] +[[package]] +name = "which" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3fabb953106c3c8eea8306e4393700d7657561cb43122571b172bbfb7c7ba1d" + [[package]] name = "winapi" version = "0.3.9" @@ -3327,6 +5105,18 @@ dependencies = [ "tap", ] +[[package]] +name = "x25519-dalek" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7e468321c81fb07fa7f4c636c3972b9100f0346e5b6a9f2bd0603a52f7ed277" +dependencies = [ + "curve25519-dalek", + "rand_core", + "serde", + "zeroize", +] + [[package]] name = "xattr" version = "1.6.1" @@ -3406,6 +5196,20 @@ name = "zeroize" version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85a5b4158499876c763cb03bc4e49185d3cccbabb15b33c627f7884f43db852e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] [[package]] name = "zerotrie" diff --git a/packages/marts/Cargo.toml b/packages/marts/Cargo.toml index f2c1c4b..0e2adad 100644 --- a/packages/marts/Cargo.toml +++ b/packages/marts/Cargo.toml @@ -10,6 +10,7 @@ deno_core = { version = "0.385.0", optional = true } flume = "0.12.0" futures = "0.3.32" mize = { path = "../mize/", default-features = false } +rustyscript = "0.12.3" tokio = "1.49.0" [features] diff --git a/packages/marts/c2vi/deno.ts b/packages/marts/c2vi/deno.ts new file mode 100644 index 0000000..a9412bb --- /dev/null +++ b/packages/marts/c2vi/deno.ts @@ -0,0 +1,431 @@ +import { createClient } from "@libsql/client"; +import { drizzle } from "drizzle-orm/libsql"; +import { sqliteTable, text, integer } from "drizzle-orm/sqlite-core"; +import { eq } from "drizzle-orm"; +import fs from "node:fs"; +import path from "node:path"; +import os from "node:os"; +import { spawnSync } from "node:child_process"; + +export async function init(ppc: PPC) { + ppc.c2vi = new C2vi(ppc); + + ppc.cli + .command("bed", "command to run when c2vi goes to bed") + .action(async () => { + await save_habitica_dailies(ppc); + await save_habitica_logs(ppc); + }); + + ppc.cli + .command("clearTodos", "command to run when c2vi goes to bed") + .alias("clt") + .action(async () => { + const todos = await ppc.habitica.get_tasks(); + for (const todo of todos) { + await ppc.habitica.delete_task(todo.id); + } + }); + + ppc.cli + .command("listTodos", "command to run when c2vi goes to bed") + .alias("dut") + .action(async () => { + const todos = await ppc.habitica.get_tasks(); + for (const todo of todos) { + console.log(todo.text); + } + }); + + ppc.cli + .command("buyHealthPotion", "command to run when c2vi goes to bed") + .alias("buyh") + .action(async () => { + await ppc.habitica.api_request("POST", "/user/buy-health-potion"); + }); + + ppc.cli + .command("addActionItems", "command to run when c2vi goes to bed") + .alias("aal") + .action(async () => { + await add_action_items(ppc); + }); + + ppc.cli + .command("test", "a command to run some test code") + .alias("t") + .action(async () => {}); + + ppc.cli + .command("skip [num]", "command to skip a habitica todo") + .alias("sk") + .action((num = 1) => { + skip_habitica_todo(ppc, parseInt(num)); + }); + + ppc.cli.command("dumpLog", "dump the complete habitica log").action(() => { + dump_habitica_logs(ppc); + }); + + ppc.cli + .command("listDailies", "list all dailies") + .action(async (folder, options) => { + const allDailies = await ppc.c2vi.db.select().from(dailiesTable).all(); + for (const task of allDailies) { + console.log(task.id + ": " + task.text); + } + }); + + ppc.cli + .command("printTask ", "print a specific todo") + .action(async (id) => { + const data = await ppc.habitica.api_request("GET", `/tasks/${id}`, {}); + console.log(data.history); + }); +} + +class C2vi { + [key: string]: any; + + constructor(ppc: PPC) { + this.ppc = ppc; + this.db = drizzle( + createClient({ + url: "file://" + ppc.config.local_storage_path + "/data.db", + }), + ); + } +} + +function formatDate(d) { + const pad = (n) => n.toString().padStart(2, "0"); + + // Custom YYYY-MM-DD format + const formatted = `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`; + return formatted; +} + +// ============= SCHEMA DEFINITION ============= +const dailiesTable = sqliteTable("habitica_dailies", { + id: text("id").primaryKey(), + text: text("text").notNull(), + notes: text("notes"), + priority: text("priority"), // 0.1, 1, 1.5, 2 + frequency: text("frequency"), // 'daily', 'weekly', etc. +}); +const habiticaLogTable = sqliteTable("habitica_log", { + date: text("date").primaryKey(), + data: text("data").notNull(), +}); + +async function save_habitica_dailies(ppc) { + console.log("######### cli bed cmd #########"); + await ppc.c2vi.db.run( + "CREATE TABLE IF NOT EXISTS habitica_dailies (id TEXT PRIMARY KEY, text TEXT NOT NULL, notes TEXT, priority TEXT, frequency TEXT)", + ); + await ppc.c2vi.db.run( + "CREATE TABLE IF NOT EXISTS habitica_log (date TEXT PRIMARY KEY, data TEXT NOT NULL)", + ); + + // ============= DATABASE INITIALIZATION ============= + if (!ppc.config.habitica.user_id || !ppc.config.habitica.api_token) { + console.error( + "Error: HABITICA_USER_ID and HABITICA_API_TOKEN env vars required", + ); + console.error( + "Get these from Habitica Settings > API and configure them in the ppc.config", + ); + process.exit(1); + } + + const dailies = await ppc.habitica.get_tasks("dailys"); + + await writeDailiesToDatabase(dailies, ppc); +} + +async function dump_habitica_logs(ppc) { + const entries = await ppc.c2vi.db.select().from(habiticaLogTable).all(); + for (const entry of entries) { + console.log(entry.date + ": ", JSON.parse(entry.data)); + } +} + +async function skip_habitica_todo(ppc, num) { + await ppc.c2vi.db.run( + "CREATE TABLE IF NOT EXISTS habitica_dailies (id TEXT PRIMARY KEY, text TEXT NOT NULL, notes TEXT, priority TEXT, frequency TEXT)", + ); + await ppc.c2vi.db.run( + "CREATE TABLE IF NOT EXISTS habitica_log (date TEXT PRIMARY KEY, data TEXT NOT NULL)", + ); + + const todos = await ppc.habitica.get_tasks("todos"); + + const date = new Date(); + const save_for_yesterday = date.getHours() < 12; + if (save_for_yesterday) { + console.log( + "Saving logs for yesterday!!!! because it is " + + date.getHours() + + "hours of the day", + ); + date.setDate(date.getDate() - 1); + } + + const result = await ppc.c2vi.db + .select() + .from(habiticaLogTable) + .where(eq(habiticaLogTable.date, formatDate(date))); + + const data = result[0] + ? JSON.parse(result[0].data) + : { + dailies_done: [], + dailies_skipped: [], + todos_done: [], + todos_skipped: [], + }; + + for (let i = 0; i < num; i++) { + const todo = todos[i]; + if (!todo) continue; + await ppc.habitica.delete_task(todo.id); + await incrementHabit(ppc); + + data.todos_skipped.push({ + id: todo.id, + text: todo.text, + notes: todo.notes || "", + checklist: todo.checklist || [], + tags: todo.tags || [], + }); + } + + // saving to db + await ppc.c2vi.db + .insert(habiticaLogTable) + .values({ date: formatDate(date), data: JSON.stringify(data) }) + .onConflictDoUpdate({ + target: habiticaLogTable.date, + set: { + data: JSON.stringify(data), + }, + }); +} + +async function save_habitica_logs(ppc) { + const date = new Date(); + const save_for_yesterday = date.getHours() < 12; + if (save_for_yesterday) { + console.log( + "Saving logs for yesterday!!!! because it is " + + date.getHours() + + "hours of the day", + ); + date.setDate(date.getDate() - 1); + } + + const result = await ppc.c2vi.db + .select() + .from(habiticaLogTable) + .where(eq(habiticaLogTable.date, formatDate(date))); + + const data = result[0] + ? JSON.parse(result[0].data) + : { + dailies_done: [], + dailies_skipped: [], + todos_done: [], + todos_skipped: [], + }; + + // dailies + const dailies = await ppc.habitica.get_tasks("dailys"); + for (const daily of dailies) { + let completed = daily.completed; + let isDue = daily.isDue; + if (save_for_yesterday) { + const yesterday = daily.history.reduce((prev, current) => { + return prev.date > current.date ? prev : current; + }); + completed = yesterday.completed; + isDue = yesterday.isDue; + } + if (!isDue) { + continue; + } + if (completed) { + data.dailies_done.push(daily.id); + console.log("daily-done: " + daily.text); + } else { + data.dailies_skipped.push(daily.id); + console.log("daily-skipped: " + daily.text); + } + } + + // todos done + const todos = await ppc.habitica.get_tasks("completedTodos"); + for (const todo of todos) { + const dateCompleted = new Date(todo.dateCompleted); + + // check if this todo is already saved in yesterday's log entry + if (save_for_yesterday) { + // get yesterday log entry + const result = await ppc.c2vi.db + .select() + .from(habiticaLogTable) + .where(eq(habiticaLogTable.date, formatDate(date))); + + const data = result[0] + ? JSON.parse(result[0].data) + : { + dailies_done: [], + dailies_skipped: [], + todos_done: [], + todos_skipped: [], + }; + + // check if this todo is already saved in yesterday's log entry + const todoIndex = data.todos_done.findIndex((t) => t.id === todo.id); + if (todoIndex !== -1) { + continue; // skipp saving this todo + } + } + + if (dateCompleted.toDateString() == date.toDateString()) { + console.log("todo-done:", todo.text); + data.todos_done.push({ + id: todo.id, + text: todo.text, + notes: todo.notes || "", + checklist: todo.checklist || [], + tags: todo.tags || [], + }); + } + + // we save_for_yesterday but the todo was completed today... also save that for this day + if ( + save_for_yesterday && + dateCompleted.toDateString() == new Date().toDateString() + ) { + console.log("todo-done:", todo.text); + data.todos_done.push({ + id: todo.id, + text: todo.text, + notes: todo.notes || "", + checklist: todo.checklist || [], + tags: todo.tags || [], + }); + } + } + + // saving to db + await ppc.c2vi.db + .insert(habiticaLogTable) + .values({ date: formatDate(date), data: JSON.stringify(data) }) + .onConflictDoUpdate({ + target: habiticaLogTable.date, + set: { + data: JSON.stringify(data), + }, + }); +} + +async function writeDailiesToDatabase(dailies, ppc) { + console.log(`Syncing ${dailies.length} dailies to database...`); + + const records = dailies.map((daily) => ({ + id: daily.id, + text: daily.text, + notes: daily.notes || "", + priority: daily.priority?.toString() || null, + frequency: daily.frequency || "daily", + })); + + async function upsertMany(records) { + for (const record of records) { + await ppc.c2vi.db + .insert(dailiesTable) + .values(record) + .onConflictDoUpdate({ + target: dailiesTable.id, + set: { + text: record.text, + notes: record.notes, + priority: record.priority, + frequency: record.frequency, + }, + }); + } + } + + await upsertMany(records); +} + +async function incrementHabit(ppc) { + const habits = await ppc.habitica.get_tasks("habits"); + let id = ""; + for (const habit of habits) { + if ((habit.text = "skipped a planned task")) { + id = habit.id; + } + } + await ppc.habitica.api_request("POST", `tasks/${id}/score/down`); +} + +async function add_action_items(ppc: PPC) { + let task_ids = []; + + const tmpFile = path.join(os.tmpdir(), `habitica-tasks-${Date.now()}.md`); + const initialContent = ` +gu 10min TIMER +uw 15min FROG +b coffee/tee/kakau +uw FROG +b breakfast, brush teeth, lüften +uw FROG + +lunch + +uw 15min TIMER of next days FROG +fw +dt 30min TIMER + +fun 20:00 (smth that can be stopped easily) +se 21:40 +read +bed 22:10 +`; + + fs.writeFileSync(tmpFile, initialContent.trim()); + + spawnSync("nvim", [tmpFile], { stdio: "inherit" }); + + // read file + const listStr = fs.readFileSync(tmpFile, "utf8"); + + // delete file + fs.unlinkSync(tmpFile); + + // Simple parser: filter out empty lines + const tasks = listStr + .split("\n") + .map((t) => t.trim()) + .filter((t) => t.length > 0); + + // 5. Add tasks to Habitica + for (const todoText of tasks) { + const data = await ppc.habitica.api_request( + "POST", + "tasks/user", + {}, + { text: todoText, type: "todo" }, + ); + task_ids.push(data.id); + console.log(`Added to-do: '${todoText}' with id '${data.id}'`); + } + + // 6. Move tasks to bottom + for (const taskId of task_ids) { + await ppc.habitica.api_request("POST", `tasks/${taskId}/move/to/-1`); + } +} diff --git a/packages/marts/cli/mod.rs b/packages/marts/cli/mod.rs index 9fd368c..4c41916 100644 --- a/packages/marts/cli/mod.rs +++ b/packages/marts/cli/mod.rs @@ -9,26 +9,53 @@ pub struct CliPart { mize: Mize, cmd: Option, actions: HashMap MizeResult<()>>, + parsers: Option) -> MizeResult<()>) + Send + Sync>>>, } pub fn cli(mize: &mut Mize) -> MizeResult<()> { + let command = Command::new("marts-cli").allow_external_subcommands(true); let cli_part = CliPart { mize: mize.clone(), - cmd: Some(Command::new("marts-cli")), + cmd: Some(command), actions: HashMap::new(), + parsers: Some(Vec::new()), }; - mize.register_part(Box::new(cli_part)) + mize.add_part(Box::new(cli_part)) } impl MizePart for CliPart { fn init(&mut self, _mize: &mut Mize) -> MizeResult<()> { Ok(()) } - fn run(&mut self, _mize: &mut Mize) -> MizeResult<()> { + fn run(&mut self, mize: &mut Mize) -> MizeResult<()> { let matches = self.cmd.take().unwrap().get_matches(); - let sub_cmd = matches.subcommand_name().unwrap(); - let action = self.actions.get(sub_cmd).unwrap(); + let sub_cmd = match matches.subcommand_name() { + Some(sub_cmd) => sub_cmd, + None => { + println!("No subcommand provided"); + return Ok(()); + } + }; + let action = match self.actions.get(sub_cmd) { + Some(action) => action, + None => { + // external parsers + for parser in self.parsers.take().unwrap() { + parser( + mize.clone(), + matches + .subcommand_matches(sub_cmd) + .unwrap() + .get_many::("") + .unwrap() + .map(|s| s.to_string()) + .collect::>(), + )?; + } + return Ok(()); + } + }; action(matches.subcommand_matches(sub_cmd).unwrap())?; Ok(()) } @@ -49,6 +76,15 @@ impl CliPart { self.cmd = Some(cmd); self.cmd.as_mut().unwrap() } + pub fn add_sub_parser< + T: FnOnce(Mize, Vec) -> MizeResult<()> + Send + Sync + 'static, + >( + &mut self, + parser: T, + ) -> MizeResult<()> { + self.parsers.as_mut().unwrap().push(Box::new(parser)); + Ok(()) + } pub fn with_cmd( &mut self, func: fn(mize: Mize, cmd: Command) -> MizeResult, diff --git a/packages/marts/js/stub_deno.ts b/packages/marts/js/stub_deno.ts index 01f5755..3fa85b0 100644 --- a/packages/marts/js/stub_deno.ts +++ b/packages/marts/js/stub_deno.ts @@ -8,3 +8,8 @@ export class Mize { } type MizeError = string; + +export class Cli { + constructor(mize: Mize) {} + async sub_command(name: string, cmd: any): Promise {} +} diff --git a/packages/marts/lib.rs b/packages/marts/lib.rs index 34eef46..2520edf 100644 --- a/packages/marts/lib.rs +++ b/packages/marts/lib.rs @@ -1,17 +1,22 @@ +use mize::MizeResult; + #[cfg(feature = "target-os")] mod cli; #[cfg(feature = "target-os")] -pub use cli::cli; +pub use cli::*; -mod js; +pub mod js; +pub use js::*; #[cfg(feature = "target-os")] -pub fn habitica(mize: &mut mize::Mize) { - use deno_core::{ascii_str_include, include_js_files}; +pub fn habitica(mize: &mut mize::Mize) -> MizeResult<()> { + use deno_core::ascii_str_include; js::part_from_file( mize, "habitica", ascii_str_include!("./deno_dist/habitica.js"), - ); + )?; + + Ok(()) } diff --git a/packages/mize/src/core/instance/mod.rs b/packages/mize/src/core/instance/mod.rs index 42e3ac4..52f3c1b 100644 --- a/packages/mize/src/core/instance/mod.rs +++ b/packages/mize/src/core/instance/mod.rs @@ -315,6 +315,9 @@ impl Mize { None => Err(mize_err!("Part not found or currently taken")), } } + pub fn has_part(&mut self, name: &str) -> bool { + self.parts.lock().unwrap().contains_key(name) + } pub fn add_part(&mut self, part: Box) -> MizeResult<()> { self.part_names.lock().unwrap().push(part.name()); self.parts.lock().unwrap().insert(part.name(), Some(part)); diff --git a/packages/ppc/platform/os/main.rs b/packages/ppc/platform/os/main.rs index 712a9a8..39b9afd 100644 --- a/packages/ppc/platform/os/main.rs +++ b/packages/ppc/platform/os/main.rs @@ -16,6 +16,8 @@ fn main() { #[cfg(feature = "target-os")] fn os_main(mize: &mut Mize) -> MizeResult<()> { marts::cli(mize)?; + marts::js(mize)?; + marts::habitica(mize)?; let mut cli = mize.get_part_native::("cli")?;