moving stuff around, getting ready for atproto

Orual 41e905e3 3339277f

+751 -494
+292 -83
Cargo.lock
··· 9 checksum = "087113bd50d9adce24850eed5d0476c7d199d532fce8fab5173650331e09033a" 10 dependencies = [ 11 "abnf-core", 12 - "nom", 13 ] 14 15 [[package]] ··· 18 source = "registry+https://github.com/rust-lang/crates.io-index" 19 checksum = "c44e09c43ae1c368fb91a03a566472d0087c26cf7e1b9e8e289c14ede681dd7d" 20 dependencies = [ 21 - "nom", 22 ] 23 24 [[package]] ··· 48 source = "registry+https://github.com/rust-lang/crates.io-index" 49 checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" 50 dependencies = [ 51 - "memchr", 52 ] 53 54 [[package]] ··· 85 checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 86 dependencies = [ 87 "libc", 88 ] 89 90 [[package]] ··· 191 checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" 192 193 [[package]] 194 name = "autocfg" 195 version = "1.5.0" 196 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 213 "hyper-util", 214 "itoa", 215 "matchit", 216 - "memchr", 217 "mime", 218 "percent-encoding", 219 "pin-project-lite", ··· 255 checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" 256 dependencies = [ 257 "addr2line", 258 - "cfg-if", 259 "libc", 260 "miniz_oxide", 261 "object", ··· 424 source = "registry+https://github.com/rust-lang/crates.io-index" 425 checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab" 426 dependencies = [ 427 - "memchr", 428 "serde", 429 ] 430 ··· 458 source = "registry+https://github.com/rust-lang/crates.io-index" 459 checksum = "b953a6887648bb07a535631f2bc00fbdb2a2216f135552cb3f534ed136b9c07f" 460 dependencies = [ 461 - "memchr", 462 "safemem", 463 ] 464 ··· 521 522 [[package]] 523 name = "cfg-if" 524 version = "1.0.4" 525 source = "registry+https://github.com/rust-lang/crates.io-index" 526 checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" ··· 594 595 [[package]] 596 name = "clap" 597 version = "4.5.51" 598 source = "registry+https://github.com/rust-lang/crates.io-index" 599 checksum = "4c26d721170e0295f191a69bd9a1f93efcdb0aff38684b61ab5750468972e5f5" ··· 611 "anstream", 612 "anstyle", 613 "clap_lex", 614 - "strsim", 615 "unicase", 616 "unicode-width 0.2.2", 617 ] ··· 635 checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" 636 637 [[package]] 638 name = "colorchoice" 639 version = "1.0.4" 640 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 647 checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" 648 dependencies = [ 649 "bytes", 650 - "memchr", 651 ] 652 653 [[package]] ··· 668 dependencies = [ 669 "compression-core", 670 "flate2", 671 - "memchr", 672 ] 673 674 [[package]] ··· 763 source = "registry+https://github.com/rust-lang/crates.io-index" 764 checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" 765 dependencies = [ 766 - "memchr", 767 ] 768 769 [[package]] ··· 781 source = "registry+https://github.com/rust-lang/crates.io-index" 782 checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" 783 dependencies = [ 784 - "cfg-if", 785 ] 786 787 [[package]] ··· 852 source = "registry+https://github.com/rust-lang/crates.io-index" 853 checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" 854 dependencies = [ 855 - "cfg-if", 856 "cpufeatures", 857 "curve25519-dalek-derive", 858 "digest", ··· 903 "ident_case", 904 "proc-macro2", 905 "quote", 906 - "strsim", 907 "syn 2.0.108", 908 ] 909 ··· 917 "ident_case", 918 "proc-macro2", 919 "quote", 920 - "strsim", 921 "syn 2.0.108", 922 ] 923 ··· 949 source = "registry+https://github.com/rust-lang/crates.io-index" 950 checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" 951 dependencies = [ 952 - "cfg-if", 953 "crossbeam-utils", 954 "hashbrown 0.14.5", 955 - "lock_api", 956 "once_cell", 957 - "parking_lot_core", 958 ] 959 960 [[package]] ··· 1293 source = "registry+https://github.com/rust-lang/crates.io-index" 1294 checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" 1295 dependencies = [ 1296 - "cfg-if", 1297 ] 1298 1299 [[package]] ··· 1390 source = "registry+https://github.com/rust-lang/crates.io-index" 1391 checksum = "bc0505cd1b6fa6580283f6bdf70a73fcf4aba1184038c90902b92b3dd0df63ed" 1392 dependencies = [ 1393 - "cfg-if", 1394 "libc", 1395 "libredox", 1396 "windows-sys 0.60.2", ··· 1403 checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" 1404 1405 [[package]] 1406 name = "flate2" 1407 version = "1.1.5" 1408 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1586 "futures-macro", 1587 "futures-sink", 1588 "futures-task", 1589 - "memchr", 1590 "pin-project-lite", 1591 "pin-utils", 1592 "slab", ··· 1599 checksum = "605183a538e3e2a9c1038635cc5c2d194e2ee8fd0d1b66b8349fad7dbacce5a2" 1600 dependencies = [ 1601 "cc", 1602 - "cfg-if", 1603 "libc", 1604 "log", 1605 "rustversion", ··· 1633 source = "registry+https://github.com/rust-lang/crates.io-index" 1634 checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" 1635 dependencies = [ 1636 - "cfg-if", 1637 "js-sys", 1638 "libc", 1639 "wasi", ··· 1646 source = "registry+https://github.com/rust-lang/crates.io-index" 1647 checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" 1648 dependencies = [ 1649 - "cfg-if", 1650 "js-sys", 1651 "libc", 1652 "r-efi", ··· 1724 source = "registry+https://github.com/rust-lang/crates.io-index" 1725 checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" 1726 dependencies = [ 1727 - "cfg-if", 1728 "crunchy", 1729 "zerocopy", 1730 ] ··· 1782 1783 [[package]] 1784 name = "hermit-abi" 1785 version = "0.5.2" 1786 source = "registry+https://github.com/rust-lang/crates.io-index" 1787 checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" ··· 1805 checksum = "92652067c9ce6f66ce53cc38d1169daa36e6e7eb7dd3b63b5103bd9d97117248" 1806 dependencies = [ 1807 "async-trait", 1808 - "cfg-if", 1809 "data-encoding", 1810 "enum-as-inner", 1811 "futures-channel", ··· 1828 source = "registry+https://github.com/rust-lang/crates.io-index" 1829 checksum = "cbb117a1ca520e111743ab2f6688eddee69db4e0ea242545a604dce8a66fd22e" 1830 dependencies = [ 1831 - "cfg-if", 1832 "futures-util", 1833 "hickory-proto", 1834 "ipconfig", 1835 "lru-cache", 1836 "once_cell", 1837 - "parking_lot", 1838 "rand 0.8.5", 1839 "resolv-conf", 1840 "smallvec", ··· 2150 "crossbeam-deque", 2151 "globset", 2152 "log", 2153 - "memchr", 2154 "regex-automata", 2155 "same-file", 2156 "walkdir", ··· 2265 source = "registry+https://github.com/rust-lang/crates.io-index" 2266 checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" 2267 dependencies = [ 2268 - "memchr", 2269 "serde", 2270 ] 2271 ··· 2290 [[package]] 2291 name = "jacquard" 2292 version = "0.8.0" 2293 - source = "git+https://tangled.org/@nonbinary.computer/jacquard#ece153be8332f8f222163257b910ba03d50951c8" 2294 dependencies = [ 2295 "bytes", 2296 "getrandom 0.2.16", ··· 2319 [[package]] 2320 name = "jacquard-api" 2321 version = "0.8.0" 2322 - source = "git+https://tangled.org/@nonbinary.computer/jacquard#ece153be8332f8f222163257b910ba03d50951c8" 2323 dependencies = [ 2324 "bon", 2325 "bytes", ··· 2337 [[package]] 2338 name = "jacquard-axum" 2339 version = "0.8.0" 2340 - source = "git+https://tangled.org/@nonbinary.computer/jacquard#ece153be8332f8f222163257b910ba03d50951c8" 2341 dependencies = [ 2342 "axum", 2343 "bytes", ··· 2359 [[package]] 2360 name = "jacquard-common" 2361 version = "0.8.0" 2362 - source = "git+https://tangled.org/@nonbinary.computer/jacquard#ece153be8332f8f222163257b910ba03d50951c8" 2363 dependencies = [ 2364 "base64 0.22.1", 2365 "bon", ··· 2402 [[package]] 2403 name = "jacquard-derive" 2404 version = "0.8.0" 2405 - source = "git+https://tangled.org/@nonbinary.computer/jacquard#ece153be8332f8f222163257b910ba03d50951c8" 2406 dependencies = [ 2407 "heck 0.5.0", 2408 "jacquard-lexicon", ··· 2414 [[package]] 2415 name = "jacquard-identity" 2416 version = "0.8.0" 2417 - source = "git+https://tangled.org/@nonbinary.computer/jacquard#ece153be8332f8f222163257b910ba03d50951c8" 2418 dependencies = [ 2419 "bon", 2420 "bytes", ··· 2441 [[package]] 2442 name = "jacquard-lexicon" 2443 version = "0.8.0" 2444 - source = "git+https://tangled.org/@nonbinary.computer/jacquard#ece153be8332f8f222163257b910ba03d50951c8" 2445 dependencies = [ 2446 "cid", 2447 "dashmap", ··· 2467 [[package]] 2468 name = "jacquard-oauth" 2469 version = "0.8.0" 2470 - source = "git+https://tangled.org/@nonbinary.computer/jacquard#ece153be8332f8f222163257b910ba03d50951c8" 2471 dependencies = [ 2472 "base64 0.22.1", 2473 "bytes", ··· 2504 checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" 2505 dependencies = [ 2506 "cesu8", 2507 - "cfg-if", 2508 "combine", 2509 "jni-sys", 2510 "log", ··· 2536 checksum = "de791f8b277ef903d49b0c6f3f3b866569ae8cb1d0829825eea28374cc4c803c" 2537 dependencies = [ 2538 "base64ct", 2539 - "cfg-if", 2540 "digest", 2541 "ecdsa", 2542 "ed25519-dalek", ··· 2614 source = "registry+https://github.com/rust-lang/crates.io-index" 2615 checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" 2616 dependencies = [ 2617 - "cfg-if", 2618 "ecdsa", 2619 "elliptic-curve", 2620 "sha2", ··· 2627 checksum = "e03e2e96c5926fe761088d66c8c2aee3a4352a2573f4eaca50043ad130af9117" 2628 dependencies = [ 2629 "miette 5.10.0", 2630 - "nom", 2631 "thiserror 1.0.69", 2632 ] 2633 ··· 2691 dependencies = [ 2692 "bitflags 2.10.0", 2693 "libc", 2694 - "redox_syscall", 2695 ] 2696 2697 [[package]] ··· 2724 2725 [[package]] 2726 name = "lock_api" 2727 version = "0.4.14" 2728 source = "registry+https://github.com/rust-lang/crates.io-index" 2729 checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" ··· 2743 source = "registry+https://github.com/rust-lang/crates.io-index" 2744 checksum = "419e0dc8046cb947daa77eb95ae174acfbddb7673b4151f56d1eed8e93fbfaca" 2745 dependencies = [ 2746 - "cfg-if", 2747 "generator", 2748 "scoped-tls", 2749 "tracing", ··· 2788 "bitflags 2.10.0", 2789 "getopts", 2790 "markdown-weaver-escape", 2791 - "memchr", 2792 "serde", 2793 "unicase", 2794 ] ··· 2856 source = "registry+https://github.com/rust-lang/crates.io-index" 2857 checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" 2858 dependencies = [ 2859 - "cfg-if", 2860 "digest", 2861 ] 2862 ··· 2867 checksum = "33746aadcb41349ec291e7f2f0a3aa6834d1d7c58066fb4b01f68efc4c4b7631" 2868 dependencies = [ 2869 "serde", 2870 ] 2871 2872 [[package]] ··· 2895 dependencies = [ 2896 "backtrace", 2897 "backtrace-ext", 2898 - "cfg-if", 2899 "miette-derive 7.6.0", 2900 "owo-colors", 2901 "supports-color", ··· 2903 "supports-unicode", 2904 "syntect", 2905 "terminal_size", 2906 - "textwrap", 2907 "unicode-width 0.1.14", 2908 ] 2909 ··· 3026 "equivalent", 3027 "event-listener", 3028 "futures-util", 3029 - "parking_lot", 3030 "portable-atomic", 3031 "rustc_version", 3032 "smallvec", ··· 3127 3128 [[package]] 3129 name = "nom" 3130 version = "7.1.3" 3131 source = "registry+https://github.com/rust-lang/crates.io-index" 3132 checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" 3133 dependencies = [ 3134 - "memchr", 3135 "minimal-lexical", 3136 ] 3137 ··· 3227 source = "registry+https://github.com/rust-lang/crates.io-index" 3228 checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" 3229 dependencies = [ 3230 - "hermit-abi", 3231 "libc", 3232 ] 3233 ··· 3255 source = "registry+https://github.com/rust-lang/crates.io-index" 3256 checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" 3257 dependencies = [ 3258 - "memchr", 3259 ] 3260 3261 [[package]] ··· 3299 checksum = "24ad14dd45412269e1a30f52ad8f0664f0f4f4a89ee8fe28c3b3527021ebb654" 3300 dependencies = [ 3301 "bitflags 2.10.0", 3302 - "cfg-if", 3303 "foreign-types", 3304 "libc", 3305 "once_cell", ··· 3413 3414 [[package]] 3415 name = "parking_lot" 3416 version = "0.12.5" 3417 source = "registry+https://github.com/rust-lang/crates.io-index" 3418 checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" 3419 dependencies = [ 3420 - "lock_api", 3421 - "parking_lot_core", 3422 ] 3423 3424 [[package]] ··· 3427 source = "registry+https://github.com/rust-lang/crates.io-index" 3428 checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" 3429 dependencies = [ 3430 - "cfg-if", 3431 "libc", 3432 - "redox_syscall", 3433 "smallvec", 3434 "windows-link 0.2.1", 3435 ] ··· 3456 checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" 3457 3458 [[package]] 3459 name = "phf" 3460 version = "0.11.3" 3461 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3602 "fallible-iterator", 3603 "hmac", 3604 "md-5", 3605 - "memchr", 3606 "rand 0.9.2", 3607 "sha2", 3608 "stringprep", ··· 3737 source = "registry+https://github.com/rust-lang/crates.io-index" 3738 checksum = "42a232e7487fc2ef313d96dde7948e7a3c05101870d8985e4fd8d26aedd27b89" 3739 dependencies = [ 3740 - "memchr", 3741 ] 3742 3743 [[package]] ··· 3883 3884 [[package]] 3885 name = "redox_syscall" 3886 version = "0.5.18" 3887 source = "registry+https://github.com/rust-lang/crates.io-index" 3888 checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" ··· 3928 checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" 3929 dependencies = [ 3930 "aho-corasick", 3931 - "memchr", 3932 "regex-automata", 3933 "regex-syntax", 3934 ] ··· 3940 checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" 3941 dependencies = [ 3942 "aho-corasick", 3943 - "memchr", 3944 "regex-syntax", 3945 ] 3946 ··· 4021 checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" 4022 dependencies = [ 4023 "cc", 4024 - "cfg-if", 4025 "getrandom 0.2.16", 4026 "libc", 4027 "untrusted", ··· 4229 checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" 4230 4231 [[package]] 4232 name = "scopeguard" 4233 version = "1.2.0" 4234 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 4400 dependencies = [ 4401 "indexmap 2.12.0", 4402 "itoa", 4403 - "memchr", 4404 "ryu", 4405 "serde", 4406 "serde_core", ··· 4505 source = "registry+https://github.com/rust-lang/crates.io-index" 4506 checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" 4507 dependencies = [ 4508 - "cfg-if", 4509 "cpufeatures", 4510 "digest", 4511 ] ··· 4522 source = "registry+https://github.com/rust-lang/crates.io-index" 4523 checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" 4524 dependencies = [ 4525 - "cfg-if", 4526 "cpufeatures", 4527 "digest", 4528 ] ··· 4682 checksum = "bf776ba3fa74f83bf4b63c3dcbbf82173db2632ed8452cb2d891d33f459de70f" 4683 dependencies = [ 4684 "new_debug_unreachable", 4685 - "parking_lot", 4686 "phf_shared 0.11.3", 4687 "precomputed-hash", 4688 "serde", ··· 4713 4714 [[package]] 4715 name = "strsim" 4716 version = "0.11.1" 4717 source = "registry+https://github.com/rust-lang/crates.io-index" 4718 checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" ··· 4830 ] 4831 4832 [[package]] 4833 name = "tagptr" 4834 version = "0.2.0" 4835 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 4867 dependencies = [ 4868 "rustix", 4869 "windows-sys 0.60.2", 4870 ] 4871 4872 [[package]] ··· 4925 source = "registry+https://github.com/rust-lang/crates.io-index" 4926 checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" 4927 dependencies = [ 4928 - "cfg-if", 4929 ] 4930 4931 [[package]] ··· 5016 "bytes", 5017 "libc", 5018 "mio", 5019 - "parking_lot", 5020 "pin-project-lite", 5021 "signal-hook-registry", 5022 "socket2 0.6.1", ··· 5058 "futures-channel", 5059 "futures-util", 5060 "log", 5061 - "parking_lot", 5062 "percent-encoding", 5063 "phf 0.13.1", 5064 "pin-project-lite", ··· 5237 "cookie", 5238 "futures-util", 5239 "http", 5240 - "parking_lot", 5241 "pin-project-lite", 5242 "tower-layer", 5243 "tower-service", ··· 5303 checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" 5304 dependencies = [ 5305 "crossbeam-channel", 5306 - "parking_lot", 5307 "thiserror 1.0.69", 5308 "time", 5309 "tracing-subscriber", ··· 5384 ] 5385 5386 [[package]] 5387 name = "try-lock" 5388 version = "0.2.5" 5389 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 5415 source = "registry+https://github.com/rust-lang/crates.io-index" 5416 checksum = "59b11b2b5241ba34be09c3cc85a36e56e48f9888862e19cedf23336d35316ed1" 5417 dependencies = [ 5418 - "memchr", 5419 ] 5420 5421 [[package]] ··· 5560 checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 5561 5562 [[package]] 5563 name = "version_check" 5564 version = "0.9.5" 5565 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 5611 source = "registry+https://github.com/rust-lang/crates.io-index" 5612 checksum = "da95793dfc411fbbd93f5be7715b0578ec61fe87cb1a42b12eb625caa5c5ea60" 5613 dependencies = [ 5614 - "cfg-if", 5615 "once_cell", 5616 "rustversion", 5617 "wasm-bindgen-macro", ··· 5624 source = "registry+https://github.com/rust-lang/crates.io-index" 5625 checksum = "551f88106c6d5e7ccc7cd9a16f312dd3b5d36ea8b4954304657d5dfba115d4a0" 5626 dependencies = [ 5627 - "cfg-if", 5628 "js-sys", 5629 "once_cell", 5630 "wasm-bindgen", ··· 5678 5679 [[package]] 5680 name = "weaver-api" 5681 - version = "0.8.0" 5682 dependencies = [ 5683 "bytes", 5684 "jacquard-common", ··· 5698 dependencies = [ 5699 "axum", 5700 "chrono", 5701 - "clap", 5702 "dashmap", 5703 "diesel", 5704 "diesel-async", ··· 5735 name = "weaver-cli" 5736 version = "0.1.0" 5737 dependencies = [ 5738 - "clap", 5739 "dirs", 5740 "jacquard", 5741 "jacquard-api", ··· 5755 "hickory-resolver", 5756 "http", 5757 "jacquard", 5758 - "jacquard-api", 5759 "jose-jwk", 5760 "markdown-weaver", 5761 "markdown-weaver-escape", ··· 5779 "tower-service", 5780 "tracing", 5781 "trait-variant", 5782 "weaver-workspace-hack", 5783 ] 5784 ··· 5820 version = "0.1.0" 5821 dependencies = [ 5822 "axum", 5823 - "clap", 5824 "jacquard", 5825 "jacquard-axum", 5826 "notify", ··· 5855 "jacquard-lexicon", 5856 "jacquard-oauth", 5857 "log", 5858 - "memchr", 5859 "miette 7.6.0", 5860 "minijinja", 5861 "minimal-lexical", 5862 - "nom", 5863 "num-traits", 5864 "p384", 5865 "percent-encoding", ··· 5962 checksum = "72069c3113ab32ab29e5584db3c6ec55d416895e60715417b5b883a357c3e471" 5963 5964 [[package]] 5965 name = "winapi-util" 5966 version = "0.1.11" 5967 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 5969 dependencies = [ 5970 "windows-sys 0.61.2", 5971 ] 5972 5973 [[package]] 5974 name = "windows" ··· 6432 source = "registry+https://github.com/rust-lang/crates.io-index" 6433 checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" 6434 dependencies = [ 6435 - "memchr", 6436 ] 6437 6438 [[package]] ··· 6441 source = "registry+https://github.com/rust-lang/crates.io-index" 6442 checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" 6443 dependencies = [ 6444 - "cfg-if", 6445 "windows-sys 0.48.0", 6446 ] 6447
··· 9 checksum = "087113bd50d9adce24850eed5d0476c7d199d532fce8fab5173650331e09033a" 10 dependencies = [ 11 "abnf-core", 12 + "nom 7.1.3", 13 ] 14 15 [[package]] ··· 18 source = "registry+https://github.com/rust-lang/crates.io-index" 19 checksum = "c44e09c43ae1c368fb91a03a566472d0087c26cf7e1b9e8e289c14ede681dd7d" 20 dependencies = [ 21 + "nom 7.1.3", 22 ] 23 24 [[package]] ··· 48 source = "registry+https://github.com/rust-lang/crates.io-index" 49 checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" 50 dependencies = [ 51 + "memchr 2.7.6", 52 ] 53 54 [[package]] ··· 85 checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 86 dependencies = [ 87 "libc", 88 + ] 89 + 90 + [[package]] 91 + name = "ansi_term" 92 + version = "0.12.1" 93 + source = "registry+https://github.com/rust-lang/crates.io-index" 94 + checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" 95 + dependencies = [ 96 + "winapi", 97 ] 98 99 [[package]] ··· 200 checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" 201 202 [[package]] 203 + name = "atty" 204 + version = "0.2.14" 205 + source = "registry+https://github.com/rust-lang/crates.io-index" 206 + checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 207 + dependencies = [ 208 + "hermit-abi 0.1.19", 209 + "libc", 210 + "winapi", 211 + ] 212 + 213 + [[package]] 214 name = "autocfg" 215 version = "1.5.0" 216 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 233 "hyper-util", 234 "itoa", 235 "matchit", 236 + "memchr 2.7.6", 237 "mime", 238 "percent-encoding", 239 "pin-project-lite", ··· 275 checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" 276 dependencies = [ 277 "addr2line", 278 + "cfg-if 1.0.4", 279 "libc", 280 "miniz_oxide", 281 "object", ··· 444 source = "registry+https://github.com/rust-lang/crates.io-index" 445 checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab" 446 dependencies = [ 447 + "memchr 2.7.6", 448 "serde", 449 ] 450 ··· 478 source = "registry+https://github.com/rust-lang/crates.io-index" 479 checksum = "b953a6887648bb07a535631f2bc00fbdb2a2216f135552cb3f534ed136b9c07f" 480 dependencies = [ 481 + "memchr 2.7.6", 482 "safemem", 483 ] 484 ··· 541 542 [[package]] 543 name = "cfg-if" 544 + version = "0.1.10" 545 + source = "registry+https://github.com/rust-lang/crates.io-index" 546 + checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" 547 + 548 + [[package]] 549 + name = "cfg-if" 550 version = "1.0.4" 551 source = "registry+https://github.com/rust-lang/crates.io-index" 552 checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" ··· 620 621 [[package]] 622 name = "clap" 623 + version = "2.34.0" 624 + source = "registry+https://github.com/rust-lang/crates.io-index" 625 + checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" 626 + dependencies = [ 627 + "ansi_term", 628 + "atty", 629 + "bitflags 1.3.2", 630 + "strsim 0.8.0", 631 + "textwrap 0.11.0", 632 + "unicode-width 0.1.14", 633 + "vec_map", 634 + ] 635 + 636 + [[package]] 637 + name = "clap" 638 version = "4.5.51" 639 source = "registry+https://github.com/rust-lang/crates.io-index" 640 checksum = "4c26d721170e0295f191a69bd9a1f93efcdb0aff38684b61ab5750468972e5f5" ··· 652 "anstream", 653 "anstyle", 654 "clap_lex", 655 + "strsim 0.11.1", 656 "unicase", 657 "unicode-width 0.2.2", 658 ] ··· 676 checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" 677 678 [[package]] 679 + name = "cloudabi" 680 + version = "0.0.3" 681 + source = "registry+https://github.com/rust-lang/crates.io-index" 682 + checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" 683 + dependencies = [ 684 + "bitflags 1.3.2", 685 + ] 686 + 687 + [[package]] 688 name = "colorchoice" 689 version = "1.0.4" 690 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 697 checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" 698 dependencies = [ 699 "bytes", 700 + "memchr 2.7.6", 701 ] 702 703 [[package]] ··· 718 dependencies = [ 719 "compression-core", 720 "flate2", 721 + "memchr 2.7.6", 722 ] 723 724 [[package]] ··· 813 source = "registry+https://github.com/rust-lang/crates.io-index" 814 checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" 815 dependencies = [ 816 + "memchr 2.7.6", 817 ] 818 819 [[package]] ··· 831 source = "registry+https://github.com/rust-lang/crates.io-index" 832 checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" 833 dependencies = [ 834 + "cfg-if 1.0.4", 835 ] 836 837 [[package]] ··· 902 source = "registry+https://github.com/rust-lang/crates.io-index" 903 checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" 904 dependencies = [ 905 + "cfg-if 1.0.4", 906 "cpufeatures", 907 "curve25519-dalek-derive", 908 "digest", ··· 953 "ident_case", 954 "proc-macro2", 955 "quote", 956 + "strsim 0.11.1", 957 "syn 2.0.108", 958 ] 959 ··· 967 "ident_case", 968 "proc-macro2", 969 "quote", 970 + "strsim 0.11.1", 971 "syn 2.0.108", 972 ] 973 ··· 999 source = "registry+https://github.com/rust-lang/crates.io-index" 1000 checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" 1001 dependencies = [ 1002 + "cfg-if 1.0.4", 1003 "crossbeam-utils", 1004 "hashbrown 0.14.5", 1005 + "lock_api 0.4.14", 1006 "once_cell", 1007 + "parking_lot_core 0.9.12", 1008 ] 1009 1010 [[package]] ··· 1343 source = "registry+https://github.com/rust-lang/crates.io-index" 1344 checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" 1345 dependencies = [ 1346 + "cfg-if 1.0.4", 1347 ] 1348 1349 [[package]] ··· 1440 source = "registry+https://github.com/rust-lang/crates.io-index" 1441 checksum = "bc0505cd1b6fa6580283f6bdf70a73fcf4aba1184038c90902b92b3dd0df63ed" 1442 dependencies = [ 1443 + "cfg-if 1.0.4", 1444 "libc", 1445 "libredox", 1446 "windows-sys 0.60.2", ··· 1453 checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" 1454 1455 [[package]] 1456 + name = "fixedbitset" 1457 + version = "0.2.0" 1458 + source = "registry+https://github.com/rust-lang/crates.io-index" 1459 + checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" 1460 + 1461 + [[package]] 1462 name = "flate2" 1463 version = "1.1.5" 1464 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1642 "futures-macro", 1643 "futures-sink", 1644 "futures-task", 1645 + "memchr 2.7.6", 1646 "pin-project-lite", 1647 "pin-utils", 1648 "slab", ··· 1655 checksum = "605183a538e3e2a9c1038635cc5c2d194e2ee8fd0d1b66b8349fad7dbacce5a2" 1656 dependencies = [ 1657 "cc", 1658 + "cfg-if 1.0.4", 1659 "libc", 1660 "log", 1661 "rustversion", ··· 1689 source = "registry+https://github.com/rust-lang/crates.io-index" 1690 checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" 1691 dependencies = [ 1692 + "cfg-if 1.0.4", 1693 "js-sys", 1694 "libc", 1695 "wasi", ··· 1702 source = "registry+https://github.com/rust-lang/crates.io-index" 1703 checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" 1704 dependencies = [ 1705 + "cfg-if 1.0.4", 1706 "js-sys", 1707 "libc", 1708 "r-efi", ··· 1780 source = "registry+https://github.com/rust-lang/crates.io-index" 1781 checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" 1782 dependencies = [ 1783 + "cfg-if 1.0.4", 1784 "crunchy", 1785 "zerocopy", 1786 ] ··· 1838 1839 [[package]] 1840 name = "hermit-abi" 1841 + version = "0.1.19" 1842 + source = "registry+https://github.com/rust-lang/crates.io-index" 1843 + checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 1844 + dependencies = [ 1845 + "libc", 1846 + ] 1847 + 1848 + [[package]] 1849 + name = "hermit-abi" 1850 version = "0.5.2" 1851 source = "registry+https://github.com/rust-lang/crates.io-index" 1852 checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" ··· 1870 checksum = "92652067c9ce6f66ce53cc38d1169daa36e6e7eb7dd3b63b5103bd9d97117248" 1871 dependencies = [ 1872 "async-trait", 1873 + "cfg-if 1.0.4", 1874 "data-encoding", 1875 "enum-as-inner", 1876 "futures-channel", ··· 1893 source = "registry+https://github.com/rust-lang/crates.io-index" 1894 checksum = "cbb117a1ca520e111743ab2f6688eddee69db4e0ea242545a604dce8a66fd22e" 1895 dependencies = [ 1896 + "cfg-if 1.0.4", 1897 "futures-util", 1898 "hickory-proto", 1899 "ipconfig", 1900 "lru-cache", 1901 "once_cell", 1902 + "parking_lot 0.12.5", 1903 "rand 0.8.5", 1904 "resolv-conf", 1905 "smallvec", ··· 2215 "crossbeam-deque", 2216 "globset", 2217 "log", 2218 + "memchr 2.7.6", 2219 "regex-automata", 2220 "same-file", 2221 "walkdir", ··· 2330 source = "registry+https://github.com/rust-lang/crates.io-index" 2331 checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" 2332 dependencies = [ 2333 + "memchr 2.7.6", 2334 "serde", 2335 ] 2336 ··· 2355 [[package]] 2356 name = "jacquard" 2357 version = "0.8.0" 2358 + source = "git+https://tangled.org/@nonbinary.computer/jacquard#10d719d2a2c459ab562b2be6fecdfe11f52b521c" 2359 dependencies = [ 2360 "bytes", 2361 "getrandom 0.2.16", ··· 2384 [[package]] 2385 name = "jacquard-api" 2386 version = "0.8.0" 2387 + source = "git+https://tangled.org/@nonbinary.computer/jacquard#10d719d2a2c459ab562b2be6fecdfe11f52b521c" 2388 dependencies = [ 2389 "bon", 2390 "bytes", ··· 2402 [[package]] 2403 name = "jacquard-axum" 2404 version = "0.8.0" 2405 + source = "git+https://tangled.org/@nonbinary.computer/jacquard#10d719d2a2c459ab562b2be6fecdfe11f52b521c" 2406 dependencies = [ 2407 "axum", 2408 "bytes", ··· 2424 [[package]] 2425 name = "jacquard-common" 2426 version = "0.8.0" 2427 + source = "git+https://tangled.org/@nonbinary.computer/jacquard#10d719d2a2c459ab562b2be6fecdfe11f52b521c" 2428 dependencies = [ 2429 "base64 0.22.1", 2430 "bon", ··· 2467 [[package]] 2468 name = "jacquard-derive" 2469 version = "0.8.0" 2470 + source = "git+https://tangled.org/@nonbinary.computer/jacquard#10d719d2a2c459ab562b2be6fecdfe11f52b521c" 2471 dependencies = [ 2472 "heck 0.5.0", 2473 "jacquard-lexicon", ··· 2479 [[package]] 2480 name = "jacquard-identity" 2481 version = "0.8.0" 2482 + source = "git+https://tangled.org/@nonbinary.computer/jacquard#10d719d2a2c459ab562b2be6fecdfe11f52b521c" 2483 dependencies = [ 2484 "bon", 2485 "bytes", ··· 2506 [[package]] 2507 name = "jacquard-lexicon" 2508 version = "0.8.0" 2509 + source = "git+https://tangled.org/@nonbinary.computer/jacquard#10d719d2a2c459ab562b2be6fecdfe11f52b521c" 2510 dependencies = [ 2511 "cid", 2512 "dashmap", ··· 2532 [[package]] 2533 name = "jacquard-oauth" 2534 version = "0.8.0" 2535 + source = "git+https://tangled.org/@nonbinary.computer/jacquard#10d719d2a2c459ab562b2be6fecdfe11f52b521c" 2536 dependencies = [ 2537 "base64 0.22.1", 2538 "bytes", ··· 2569 checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" 2570 dependencies = [ 2571 "cesu8", 2572 + "cfg-if 1.0.4", 2573 "combine", 2574 "jni-sys", 2575 "log", ··· 2601 checksum = "de791f8b277ef903d49b0c6f3f3b866569ae8cb1d0829825eea28374cc4c803c" 2602 dependencies = [ 2603 "base64ct", 2604 + "cfg-if 1.0.4", 2605 "digest", 2606 "ecdsa", 2607 "ed25519-dalek", ··· 2679 source = "registry+https://github.com/rust-lang/crates.io-index" 2680 checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" 2681 dependencies = [ 2682 + "cfg-if 1.0.4", 2683 "ecdsa", 2684 "elliptic-curve", 2685 "sha2", ··· 2692 checksum = "e03e2e96c5926fe761088d66c8c2aee3a4352a2573f4eaca50043ad130af9117" 2693 dependencies = [ 2694 "miette 5.10.0", 2695 + "nom 7.1.3", 2696 "thiserror 1.0.69", 2697 ] 2698 ··· 2756 dependencies = [ 2757 "bitflags 2.10.0", 2758 "libc", 2759 + "redox_syscall 0.5.18", 2760 ] 2761 2762 [[package]] ··· 2789 2790 [[package]] 2791 name = "lock_api" 2792 + version = "0.3.4" 2793 + source = "registry+https://github.com/rust-lang/crates.io-index" 2794 + checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" 2795 + dependencies = [ 2796 + "scopeguard", 2797 + ] 2798 + 2799 + [[package]] 2800 + name = "lock_api" 2801 version = "0.4.14" 2802 source = "registry+https://github.com/rust-lang/crates.io-index" 2803 checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" ··· 2817 source = "registry+https://github.com/rust-lang/crates.io-index" 2818 checksum = "419e0dc8046cb947daa77eb95ae174acfbddb7673b4151f56d1eed8e93fbfaca" 2819 dependencies = [ 2820 + "cfg-if 1.0.4", 2821 "generator", 2822 "scoped-tls", 2823 "tracing", ··· 2862 "bitflags 2.10.0", 2863 "getopts", 2864 "markdown-weaver-escape", 2865 + "memchr 2.7.6", 2866 "serde", 2867 "unicase", 2868 ] ··· 2930 source = "registry+https://github.com/rust-lang/crates.io-index" 2931 checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" 2932 dependencies = [ 2933 + "cfg-if 1.0.4", 2934 "digest", 2935 ] 2936 ··· 2941 checksum = "33746aadcb41349ec291e7f2f0a3aa6834d1d7c58066fb4b01f68efc4c4b7631" 2942 dependencies = [ 2943 "serde", 2944 + ] 2945 + 2946 + [[package]] 2947 + name = "memchr" 2948 + version = "1.0.2" 2949 + source = "registry+https://github.com/rust-lang/crates.io-index" 2950 + checksum = "148fab2e51b4f1cfc66da2a7c32981d1d3c083a803978268bb11fe4b86925e7a" 2951 + dependencies = [ 2952 + "libc", 2953 ] 2954 2955 [[package]] ··· 2978 dependencies = [ 2979 "backtrace", 2980 "backtrace-ext", 2981 + "cfg-if 1.0.4", 2982 "miette-derive 7.6.0", 2983 "owo-colors", 2984 "supports-color", ··· 2986 "supports-unicode", 2987 "syntect", 2988 "terminal_size", 2989 + "textwrap 0.16.2", 2990 "unicode-width 0.1.14", 2991 ] 2992 ··· 3109 "equivalent", 3110 "event-listener", 3111 "futures-util", 3112 + "parking_lot 0.12.5", 3113 "portable-atomic", 3114 "rustc_version", 3115 "smallvec", ··· 3210 3211 [[package]] 3212 name = "nom" 3213 + version = "3.2.1" 3214 + source = "registry+https://github.com/rust-lang/crates.io-index" 3215 + checksum = "05aec50c70fd288702bcd93284a8444607f3292dbdf2a30de5ea5dcdbe72287b" 3216 + dependencies = [ 3217 + "memchr 1.0.2", 3218 + ] 3219 + 3220 + [[package]] 3221 + name = "nom" 3222 version = "7.1.3" 3223 source = "registry+https://github.com/rust-lang/crates.io-index" 3224 checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" 3225 dependencies = [ 3226 + "memchr 2.7.6", 3227 "minimal-lexical", 3228 ] 3229 ··· 3319 source = "registry+https://github.com/rust-lang/crates.io-index" 3320 checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" 3321 dependencies = [ 3322 + "hermit-abi 0.5.2", 3323 "libc", 3324 ] 3325 ··· 3347 source = "registry+https://github.com/rust-lang/crates.io-index" 3348 checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" 3349 dependencies = [ 3350 + "memchr 2.7.6", 3351 ] 3352 3353 [[package]] ··· 3391 checksum = "24ad14dd45412269e1a30f52ad8f0664f0f4f4a89ee8fe28c3b3527021ebb654" 3392 dependencies = [ 3393 "bitflags 2.10.0", 3394 + "cfg-if 1.0.4", 3395 "foreign-types", 3396 "libc", 3397 "once_cell", ··· 3505 3506 [[package]] 3507 name = "parking_lot" 3508 + version = "0.10.2" 3509 + source = "registry+https://github.com/rust-lang/crates.io-index" 3510 + checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" 3511 + dependencies = [ 3512 + "lock_api 0.3.4", 3513 + "parking_lot_core 0.7.3", 3514 + ] 3515 + 3516 + [[package]] 3517 + name = "parking_lot" 3518 version = "0.12.5" 3519 source = "registry+https://github.com/rust-lang/crates.io-index" 3520 checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" 3521 dependencies = [ 3522 + "lock_api 0.4.14", 3523 + "parking_lot_core 0.9.12", 3524 + ] 3525 + 3526 + [[package]] 3527 + name = "parking_lot_core" 3528 + version = "0.7.3" 3529 + source = "registry+https://github.com/rust-lang/crates.io-index" 3530 + checksum = "b93f386bb233083c799e6e642a9d73db98c24a5deeb95ffc85bf281255dffc98" 3531 + dependencies = [ 3532 + "cfg-if 0.1.10", 3533 + "cloudabi", 3534 + "libc", 3535 + "redox_syscall 0.1.57", 3536 + "smallvec", 3537 + "winapi", 3538 ] 3539 3540 [[package]] ··· 3543 source = "registry+https://github.com/rust-lang/crates.io-index" 3544 checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" 3545 dependencies = [ 3546 + "cfg-if 1.0.4", 3547 "libc", 3548 + "redox_syscall 0.5.18", 3549 "smallvec", 3550 "windows-link 0.2.1", 3551 ] ··· 3572 checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" 3573 3574 [[package]] 3575 + name = "petgraph" 3576 + version = "0.5.1" 3577 + source = "registry+https://github.com/rust-lang/crates.io-index" 3578 + checksum = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7" 3579 + dependencies = [ 3580 + "fixedbitset", 3581 + "indexmap 1.9.3", 3582 + ] 3583 + 3584 + [[package]] 3585 name = "phf" 3586 version = "0.11.3" 3587 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3728 "fallible-iterator", 3729 "hmac", 3730 "md-5", 3731 + "memchr 2.7.6", 3732 "rand 0.9.2", 3733 "sha2", 3734 "stringprep", ··· 3863 source = "registry+https://github.com/rust-lang/crates.io-index" 3864 checksum = "42a232e7487fc2ef313d96dde7948e7a3c05101870d8985e4fd8d26aedd27b89" 3865 dependencies = [ 3866 + "memchr 2.7.6", 3867 ] 3868 3869 [[package]] ··· 4009 4010 [[package]] 4011 name = "redox_syscall" 4012 + version = "0.1.57" 4013 + source = "registry+https://github.com/rust-lang/crates.io-index" 4014 + checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" 4015 + 4016 + [[package]] 4017 + name = "redox_syscall" 4018 version = "0.5.18" 4019 source = "registry+https://github.com/rust-lang/crates.io-index" 4020 checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" ··· 4060 checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" 4061 dependencies = [ 4062 "aho-corasick", 4063 + "memchr 2.7.6", 4064 "regex-automata", 4065 "regex-syntax", 4066 ] ··· 4072 checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" 4073 dependencies = [ 4074 "aho-corasick", 4075 + "memchr 2.7.6", 4076 "regex-syntax", 4077 ] 4078 ··· 4153 checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" 4154 dependencies = [ 4155 "cc", 4156 + "cfg-if 1.0.4", 4157 "getrandom 0.2.16", 4158 "libc", 4159 "untrusted", ··· 4361 checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" 4362 4363 [[package]] 4364 + name = "scoped_threadpool" 4365 + version = "0.1.9" 4366 + source = "registry+https://github.com/rust-lang/crates.io-index" 4367 + checksum = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8" 4368 + 4369 + [[package]] 4370 name = "scopeguard" 4371 version = "1.2.0" 4372 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 4538 dependencies = [ 4539 "indexmap 2.12.0", 4540 "itoa", 4541 + "memchr 2.7.6", 4542 "ryu", 4543 "serde", 4544 "serde_core", ··· 4643 source = "registry+https://github.com/rust-lang/crates.io-index" 4644 checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" 4645 dependencies = [ 4646 + "cfg-if 1.0.4", 4647 "cpufeatures", 4648 "digest", 4649 ] ··· 4660 source = "registry+https://github.com/rust-lang/crates.io-index" 4661 checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" 4662 dependencies = [ 4663 + "cfg-if 1.0.4", 4664 "cpufeatures", 4665 "digest", 4666 ] ··· 4820 checksum = "bf776ba3fa74f83bf4b63c3dcbbf82173db2632ed8452cb2d891d33f459de70f" 4821 dependencies = [ 4822 "new_debug_unreachable", 4823 + "parking_lot 0.12.5", 4824 "phf_shared 0.11.3", 4825 "precomputed-hash", 4826 "serde", ··· 4851 4852 [[package]] 4853 name = "strsim" 4854 + version = "0.8.0" 4855 + source = "registry+https://github.com/rust-lang/crates.io-index" 4856 + checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" 4857 + 4858 + [[package]] 4859 + name = "strsim" 4860 version = "0.11.1" 4861 source = "registry+https://github.com/rust-lang/crates.io-index" 4862 checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" ··· 4974 ] 4975 4976 [[package]] 4977 + name = "tabwriter" 4978 + version = "1.4.1" 4979 + source = "registry+https://github.com/rust-lang/crates.io-index" 4980 + checksum = "fce91f2f0ec87dff7e6bcbbeb267439aa1188703003c6055193c821487400432" 4981 + dependencies = [ 4982 + "unicode-width 0.2.2", 4983 + ] 4984 + 4985 + [[package]] 4986 name = "tagptr" 4987 version = "0.2.0" 4988 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 5020 dependencies = [ 5021 "rustix", 5022 "windows-sys 0.60.2", 5023 + ] 5024 + 5025 + [[package]] 5026 + name = "textwrap" 5027 + version = "0.11.0" 5028 + source = "registry+https://github.com/rust-lang/crates.io-index" 5029 + checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" 5030 + dependencies = [ 5031 + "unicode-width 0.1.14", 5032 ] 5033 5034 [[package]] ··· 5087 source = "registry+https://github.com/rust-lang/crates.io-index" 5088 checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" 5089 dependencies = [ 5090 + "cfg-if 1.0.4", 5091 ] 5092 5093 [[package]] ··· 5178 "bytes", 5179 "libc", 5180 "mio", 5181 + "parking_lot 0.12.5", 5182 "pin-project-lite", 5183 "signal-hook-registry", 5184 "socket2 0.6.1", ··· 5220 "futures-channel", 5221 "futures-util", 5222 "log", 5223 + "parking_lot 0.12.5", 5224 "percent-encoding", 5225 "phf 0.13.1", 5226 "pin-project-lite", ··· 5399 "cookie", 5400 "futures-util", 5401 "http", 5402 + "parking_lot 0.12.5", 5403 "pin-project-lite", 5404 "tower-layer", 5405 "tower-service", ··· 5465 checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" 5466 dependencies = [ 5467 "crossbeam-channel", 5468 + "parking_lot 0.12.5", 5469 "thiserror 1.0.69", 5470 "time", 5471 "tracing-subscriber", ··· 5546 ] 5547 5548 [[package]] 5549 + name = "tree_magic" 5550 + version = "0.2.3" 5551 + source = "registry+https://github.com/rust-lang/crates.io-index" 5552 + checksum = "b1d99367ce3e553a84738f73bd626ccca541ef90ae757fdcdc4cbe728e6cb629" 5553 + dependencies = [ 5554 + "clap 2.34.0", 5555 + "fnv", 5556 + "lazy_static", 5557 + "nom 3.2.1", 5558 + "num_cpus", 5559 + "parking_lot 0.10.2", 5560 + "petgraph", 5561 + "scoped_threadpool", 5562 + "tabwriter", 5563 + "walkdir", 5564 + ] 5565 + 5566 + [[package]] 5567 name = "try-lock" 5568 version = "0.2.5" 5569 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 5595 source = "registry+https://github.com/rust-lang/crates.io-index" 5596 checksum = "59b11b2b5241ba34be09c3cc85a36e56e48f9888862e19cedf23336d35316ed1" 5597 dependencies = [ 5598 + "memchr 2.7.6", 5599 ] 5600 5601 [[package]] ··· 5740 checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 5741 5742 [[package]] 5743 + name = "vec_map" 5744 + version = "0.8.2" 5745 + source = "registry+https://github.com/rust-lang/crates.io-index" 5746 + checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" 5747 + 5748 + [[package]] 5749 name = "version_check" 5750 version = "0.9.5" 5751 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 5797 source = "registry+https://github.com/rust-lang/crates.io-index" 5798 checksum = "da95793dfc411fbbd93f5be7715b0578ec61fe87cb1a42b12eb625caa5c5ea60" 5799 dependencies = [ 5800 + "cfg-if 1.0.4", 5801 "once_cell", 5802 "rustversion", 5803 "wasm-bindgen-macro", ··· 5810 source = "registry+https://github.com/rust-lang/crates.io-index" 5811 checksum = "551f88106c6d5e7ccc7cd9a16f312dd3b5d36ea8b4954304657d5dfba115d4a0" 5812 dependencies = [ 5813 + "cfg-if 1.0.4", 5814 "js-sys", 5815 "once_cell", 5816 "wasm-bindgen", ··· 5864 5865 [[package]] 5866 name = "weaver-api" 5867 + version = "0.1.0" 5868 dependencies = [ 5869 "bytes", 5870 "jacquard-common", ··· 5884 dependencies = [ 5885 "axum", 5886 "chrono", 5887 + "clap 4.5.51", 5888 "dashmap", 5889 "diesel", 5890 "diesel-async", ··· 5921 name = "weaver-cli" 5922 version = "0.1.0" 5923 dependencies = [ 5924 + "clap 4.5.51", 5925 "dirs", 5926 "jacquard", 5927 "jacquard-api", ··· 5941 "hickory-resolver", 5942 "http", 5943 "jacquard", 5944 "jose-jwk", 5945 "markdown-weaver", 5946 "markdown-weaver-escape", ··· 5964 "tower-service", 5965 "tracing", 5966 "trait-variant", 5967 + "tree_magic", 5968 + "weaver-api", 5969 "weaver-workspace-hack", 5970 ] 5971 ··· 6007 version = "0.1.0" 6008 dependencies = [ 6009 "axum", 6010 + "clap 4.5.51", 6011 "jacquard", 6012 "jacquard-axum", 6013 "notify", ··· 6042 "jacquard-lexicon", 6043 "jacquard-oauth", 6044 "log", 6045 + "memchr 2.7.6", 6046 "miette 7.6.0", 6047 "minijinja", 6048 "minimal-lexical", 6049 + "nom 7.1.3", 6050 "num-traits", 6051 "p384", 6052 "percent-encoding", ··· 6149 checksum = "72069c3113ab32ab29e5584db3c6ec55d416895e60715417b5b883a357c3e471" 6150 6151 [[package]] 6152 + name = "winapi" 6153 + version = "0.3.9" 6154 + source = "registry+https://github.com/rust-lang/crates.io-index" 6155 + checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 6156 + dependencies = [ 6157 + "winapi-i686-pc-windows-gnu", 6158 + "winapi-x86_64-pc-windows-gnu", 6159 + ] 6160 + 6161 + [[package]] 6162 + name = "winapi-i686-pc-windows-gnu" 6163 + version = "0.4.0" 6164 + source = "registry+https://github.com/rust-lang/crates.io-index" 6165 + checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 6166 + 6167 + [[package]] 6168 name = "winapi-util" 6169 version = "0.1.11" 6170 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 6172 dependencies = [ 6173 "windows-sys 0.61.2", 6174 ] 6175 + 6176 + [[package]] 6177 + name = "winapi-x86_64-pc-windows-gnu" 6178 + version = "0.4.0" 6179 + source = "registry+https://github.com/rust-lang/crates.io-index" 6180 + checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 6181 6182 [[package]] 6183 name = "windows" ··· 6641 source = "registry+https://github.com/rust-lang/crates.io-index" 6642 checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" 6643 dependencies = [ 6644 + "memchr 2.7.6", 6645 ] 6646 6647 [[package]] ··· 6650 source = "registry+https://github.com/rust-lang/crates.io-index" 6651 checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" 6652 dependencies = [ 6653 + "cfg-if 1.0.4", 6654 "windows-sys 0.48.0", 6655 ] 6656
+1
Cargo.toml
··· 42 jacquard = { git = "https://tangled.org/@nonbinary.computer/jacquard", default-features = false, features = ["derive", "api_bluesky", "dns"] } 43 jacquard-api = { git = "https://tangled.org/@nonbinary.computer/jacquard" } 44 jacquard-axum = { git = "https://tangled.org/@nonbinary.computer/jacquard" }
··· 42 jacquard = { git = "https://tangled.org/@nonbinary.computer/jacquard", default-features = false, features = ["derive", "api_bluesky", "dns"] } 43 jacquard-api = { git = "https://tangled.org/@nonbinary.computer/jacquard" } 44 jacquard-axum = { git = "https://tangled.org/@nonbinary.computer/jacquard" } 45 + tree_magic = { version = "0.2.3", features = ["cli"] }
+1 -1
crates/weaver-api/Cargo.toml
··· 2 name = "weaver-api" 3 description = "Generated AT Protocol API bindings for Weaver" 4 edition.workspace = true 5 - version = "0.8.0" 6 authors.workspace = true 7 8 [dependencies]
··· 2 name = "weaver-api" 3 description = "Generated AT Protocol API bindings for Weaver" 4 edition.workspace = true 5 + version = "0.1.0" 6 authors.workspace = true 7 8 [dependencies]
-10
crates/weaver-api/lexicons/sh_weaver_edit_root.json
··· 9 "record": { 10 "type": "object", 11 "required": [ 12 - "cid", 13 - "uri", 14 "doc", 15 "snapshot" 16 ], 17 "properties": { 18 - "cid": { 19 - "type": "string", 20 - "format": "cid" 21 - }, 22 "doc": { 23 "type": "ref", 24 "ref": "sh.weaver.edit.defs#docRef" ··· 29 "*/*" 30 ], 31 "maxSize": 30000000 32 - }, 33 - "uri": { 34 - "type": "string", 35 - "format": "at-uri" 36 } 37 } 38 }
··· 9 "record": { 10 "type": "object", 11 "required": [ 12 "doc", 13 "snapshot" 14 ], 15 "properties": { 16 "doc": { 17 "type": "ref", 18 "ref": "sh.weaver.edit.defs#docRef" ··· 23 "*/*" 24 ], 25 "maxSize": 30000000 26 } 27 } 28 }
+9 -21
crates/weaver-api/lexicons/sh_weaver_embed_recordWithMedia.json
··· 6 "main": { 7 "type": "object", 8 "required": [ 9 - "record", 10 "media" 11 ], 12 "properties": { ··· 15 "refs": [ 16 "sh.weaver.embed.images", 17 "sh.weaver.embed.external", 18 - "sh.weaver.embed.video", 19 - "app.bsky.embed.images", 20 - "app.bsky.embed.video", 21 - "app.bsky.embed.external" 22 ] 23 }, 24 - "record": { 25 - "type": "union", 26 - "refs": [ 27 - "app.bsky.embed.record", 28 - "sh.weaver.embed.records" 29 - ] 30 } 31 } 32 }, ··· 42 "refs": [ 43 "sh.weaver.embed.images#view", 44 "sh.weaver.embed.external#view", 45 - "sh.weaver.embed.video#view", 46 - "app.bsky.embed.images#view", 47 - "app.bsky.embed.video#view", 48 - "app.bsky.embed.external#view" 49 ] 50 }, 51 - "record": { 52 - "type": "union", 53 - "refs": [ 54 - "sh.weaver.embed.records#view", 55 - "app.bsky.embed.record#view" 56 - ] 57 } 58 } 59 }
··· 6 "main": { 7 "type": "object", 8 "required": [ 9 + "records", 10 "media" 11 ], 12 "properties": { ··· 15 "refs": [ 16 "sh.weaver.embed.images", 17 "sh.weaver.embed.external", 18 + "sh.weaver.embed.video" 19 ] 20 }, 21 + "records": { 22 + "type": "ref", 23 + "ref": "sh.weaver.embed.records" 24 } 25 } 26 }, ··· 36 "refs": [ 37 "sh.weaver.embed.images#view", 38 "sh.weaver.embed.external#view", 39 + "sh.weaver.embed.video#view" 40 ] 41 }, 42 + "records": { 43 + "type": "ref", 44 + "ref": "sh.weaver.embed.records#view" 45 } 46 } 47 }
-5
crates/weaver-api/lexicons/sh_weaver_embed_records.json
··· 48 "recordView": { 49 "type": "union", 50 "refs": [ 51 - "app.bsky.embed.images#view", 52 - "app.bsky.embed.video#view", 53 - "app.bsky.embed.external#view", 54 - "app.bsky.embed.record#view", 55 - "app.bsky.embed.recordWithMedia#view", 56 "sh.weaver.embed.records#view", 57 "sh.weaver.embed.images#view", 58 "sh.weaver.embed.recordWithMedia#view",
··· 48 "recordView": { 49 "type": "union", 50 "refs": [ 51 "sh.weaver.embed.records#view", 52 "sh.weaver.embed.images#view", 53 "sh.weaver.embed.recordWithMedia#view",
+7 -1
crates/weaver-api/lexicons/sh_weaver_publish_blob.json
··· 9 "record": { 10 "type": "object", 11 "required": [ 12 - "upload" 13 ], 14 "properties": { 15 "upload": { 16 "type": "blob", 17 "description": "Reference to the uploaded file",
··· 9 "record": { 10 "type": "object", 11 "required": [ 12 + "upload", 13 + "path" 14 ], 15 "properties": { 16 + "path": { 17 + "type": "string", 18 + "description": "relative path to the blob", 19 + "minLength": 1 20 + }, 21 "upload": { 22 "type": "blob", 23 "description": "Reference to the uploaded file",
+7 -123
crates/weaver-api/src/sh_weaver/edit/root.rs
··· 19 #[serde(rename_all = "camelCase")] 20 pub struct Root<'a> { 21 #[serde(borrow)] 22 - pub cid: jacquard_common::types::string::Cid<'a>, 23 - #[serde(borrow)] 24 pub doc: crate::sh_weaver::edit::DocRef<'a>, 25 #[serde(borrow)] 26 pub snapshot: jacquard_common::types::blob::BlobRef<'a>, 27 - #[serde(borrow)] 28 - pub uri: jacquard_common::types::string::AtUri<'a>, 29 } 30 31 pub mod root_state { ··· 38 } 39 /// State trait tracking which required fields have been set 40 pub trait State: sealed::Sealed { 41 - type Cid; 42 - type Uri; 43 type Doc; 44 type Snapshot; 45 } ··· 47 pub struct Empty(()); 48 impl sealed::Sealed for Empty {} 49 impl State for Empty { 50 - type Cid = Unset; 51 - type Uri = Unset; 52 type Doc = Unset; 53 type Snapshot = Unset; 54 } 55 - ///State transition - sets the `cid` field to Set 56 - pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>); 57 - impl<S: State> sealed::Sealed for SetCid<S> {} 58 - impl<S: State> State for SetCid<S> { 59 - type Cid = Set<members::cid>; 60 - type Uri = S::Uri; 61 - type Doc = S::Doc; 62 - type Snapshot = S::Snapshot; 63 - } 64 - ///State transition - sets the `uri` field to Set 65 - pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>); 66 - impl<S: State> sealed::Sealed for SetUri<S> {} 67 - impl<S: State> State for SetUri<S> { 68 - type Cid = S::Cid; 69 - type Uri = Set<members::uri>; 70 - type Doc = S::Doc; 71 - type Snapshot = S::Snapshot; 72 - } 73 ///State transition - sets the `doc` field to Set 74 pub struct SetDoc<S: State = Empty>(PhantomData<fn() -> S>); 75 impl<S: State> sealed::Sealed for SetDoc<S> {} 76 impl<S: State> State for SetDoc<S> { 77 - type Cid = S::Cid; 78 - type Uri = S::Uri; 79 type Doc = Set<members::doc>; 80 type Snapshot = S::Snapshot; 81 } ··· 83 pub struct SetSnapshot<S: State = Empty>(PhantomData<fn() -> S>); 84 impl<S: State> sealed::Sealed for SetSnapshot<S> {} 85 impl<S: State> State for SetSnapshot<S> { 86 - type Cid = S::Cid; 87 - type Uri = S::Uri; 88 type Doc = S::Doc; 89 type Snapshot = Set<members::snapshot>; 90 } 91 /// Marker types for field names 92 #[allow(non_camel_case_types)] 93 pub mod members { 94 - ///Marker type for the `cid` field 95 - pub struct cid(()); 96 - ///Marker type for the `uri` field 97 - pub struct uri(()); 98 ///Marker type for the `doc` field 99 pub struct doc(()); 100 ///Marker type for the `snapshot` field ··· 106 pub struct RootBuilder<'a, S: root_state::State> { 107 _phantom_state: ::core::marker::PhantomData<fn() -> S>, 108 __unsafe_private_named: ( 109 - ::core::option::Option<jacquard_common::types::string::Cid<'a>>, 110 ::core::option::Option<crate::sh_weaver::edit::DocRef<'a>>, 111 ::core::option::Option<jacquard_common::types::blob::BlobRef<'a>>, 112 - ::core::option::Option<jacquard_common::types::string::AtUri<'a>>, 113 ), 114 _phantom: ::core::marker::PhantomData<&'a ()>, 115 } ··· 126 pub fn new() -> Self { 127 RootBuilder { 128 _phantom_state: ::core::marker::PhantomData, 129 - __unsafe_private_named: (None, None, None, None), 130 - _phantom: ::core::marker::PhantomData, 131 - } 132 - } 133 - } 134 - 135 - impl<'a, S> RootBuilder<'a, S> 136 - where 137 - S: root_state::State, 138 - S::Cid: root_state::IsUnset, 139 - { 140 - /// Set the `cid` field (required) 141 - pub fn cid( 142 - mut self, 143 - value: impl Into<jacquard_common::types::string::Cid<'a>>, 144 - ) -> RootBuilder<'a, root_state::SetCid<S>> { 145 - self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); 146 - RootBuilder { 147 - _phantom_state: ::core::marker::PhantomData, 148 - __unsafe_private_named: self.__unsafe_private_named, 149 _phantom: ::core::marker::PhantomData, 150 } 151 } ··· 161 mut self, 162 value: impl Into<crate::sh_weaver::edit::DocRef<'a>>, 163 ) -> RootBuilder<'a, root_state::SetDoc<S>> { 164 - self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); 165 RootBuilder { 166 _phantom_state: ::core::marker::PhantomData, 167 __unsafe_private_named: self.__unsafe_private_named, ··· 180 mut self, 181 value: impl Into<jacquard_common::types::blob::BlobRef<'a>>, 182 ) -> RootBuilder<'a, root_state::SetSnapshot<S>> { 183 - self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); 184 - RootBuilder { 185 - _phantom_state: ::core::marker::PhantomData, 186 - __unsafe_private_named: self.__unsafe_private_named, 187 - _phantom: ::core::marker::PhantomData, 188 - } 189 - } 190 - } 191 - 192 - impl<'a, S> RootBuilder<'a, S> 193 - where 194 - S: root_state::State, 195 - S::Uri: root_state::IsUnset, 196 - { 197 - /// Set the `uri` field (required) 198 - pub fn uri( 199 - mut self, 200 - value: impl Into<jacquard_common::types::string::AtUri<'a>>, 201 - ) -> RootBuilder<'a, root_state::SetUri<S>> { 202 - self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into()); 203 RootBuilder { 204 _phantom_state: ::core::marker::PhantomData, 205 __unsafe_private_named: self.__unsafe_private_named, ··· 211 impl<'a, S> RootBuilder<'a, S> 212 where 213 S: root_state::State, 214 - S::Cid: root_state::IsSet, 215 - S::Uri: root_state::IsSet, 216 S::Doc: root_state::IsSet, 217 S::Snapshot: root_state::IsSet, 218 { 219 /// Build the final struct 220 pub fn build(self) -> Root<'a> { 221 Root { 222 - cid: self.__unsafe_private_named.0.unwrap(), 223 - doc: self.__unsafe_private_named.1.unwrap(), 224 - snapshot: self.__unsafe_private_named.2.unwrap(), 225 - uri: self.__unsafe_private_named.3.unwrap(), 226 extra_data: Default::default(), 227 } 228 } ··· 235 >, 236 ) -> Root<'a> { 237 Root { 238 - cid: self.__unsafe_private_named.0.unwrap(), 239 - doc: self.__unsafe_private_named.1.unwrap(), 240 - snapshot: self.__unsafe_private_named.2.unwrap(), 241 - uri: self.__unsafe_private_named.3.unwrap(), 242 extra_data: Some(extra_data), 243 } 244 } ··· 345 description: None, 346 required: Some( 347 vec![ 348 - ::jacquard_common::smol_str::SmolStr::new_static("cid"), 349 - ::jacquard_common::smol_str::SmolStr::new_static("uri"), 350 ::jacquard_common::smol_str::SmolStr::new_static("doc"), 351 ::jacquard_common::smol_str::SmolStr::new_static("snapshot") 352 ], ··· 356 #[allow(unused_mut)] 357 let mut map = ::std::collections::BTreeMap::new(); 358 map.insert( 359 - ::jacquard_common::smol_str::SmolStr::new_static("cid"), 360 - ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 361 - description: None, 362 - format: Some( 363 - ::jacquard_lexicon::lexicon::LexStringFormat::Cid, 364 - ), 365 - default: None, 366 - min_length: None, 367 - max_length: None, 368 - min_graphemes: None, 369 - max_graphemes: None, 370 - r#enum: None, 371 - r#const: None, 372 - known_values: None, 373 - }), 374 - ); 375 - map.insert( 376 ::jacquard_common::smol_str::SmolStr::new_static("doc"), 377 ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { 378 description: None, ··· 389 description: None, 390 accept: None, 391 max_size: None, 392 - }), 393 - ); 394 - map.insert( 395 - ::jacquard_common::smol_str::SmolStr::new_static("uri"), 396 - ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 397 - description: None, 398 - format: Some( 399 - ::jacquard_lexicon::lexicon::LexStringFormat::AtUri, 400 - ), 401 - default: None, 402 - min_length: None, 403 - max_length: None, 404 - min_graphemes: None, 405 - max_graphemes: None, 406 - r#enum: None, 407 - r#const: None, 408 - known_values: None, 409 }), 410 ); 411 map
··· 19 #[serde(rename_all = "camelCase")] 20 pub struct Root<'a> { 21 #[serde(borrow)] 22 pub doc: crate::sh_weaver::edit::DocRef<'a>, 23 #[serde(borrow)] 24 pub snapshot: jacquard_common::types::blob::BlobRef<'a>, 25 } 26 27 pub mod root_state { ··· 34 } 35 /// State trait tracking which required fields have been set 36 pub trait State: sealed::Sealed { 37 type Doc; 38 type Snapshot; 39 } ··· 41 pub struct Empty(()); 42 impl sealed::Sealed for Empty {} 43 impl State for Empty { 44 type Doc = Unset; 45 type Snapshot = Unset; 46 } 47 ///State transition - sets the `doc` field to Set 48 pub struct SetDoc<S: State = Empty>(PhantomData<fn() -> S>); 49 impl<S: State> sealed::Sealed for SetDoc<S> {} 50 impl<S: State> State for SetDoc<S> { 51 type Doc = Set<members::doc>; 52 type Snapshot = S::Snapshot; 53 } ··· 55 pub struct SetSnapshot<S: State = Empty>(PhantomData<fn() -> S>); 56 impl<S: State> sealed::Sealed for SetSnapshot<S> {} 57 impl<S: State> State for SetSnapshot<S> { 58 type Doc = S::Doc; 59 type Snapshot = Set<members::snapshot>; 60 } 61 /// Marker types for field names 62 #[allow(non_camel_case_types)] 63 pub mod members { 64 ///Marker type for the `doc` field 65 pub struct doc(()); 66 ///Marker type for the `snapshot` field ··· 72 pub struct RootBuilder<'a, S: root_state::State> { 73 _phantom_state: ::core::marker::PhantomData<fn() -> S>, 74 __unsafe_private_named: ( 75 ::core::option::Option<crate::sh_weaver::edit::DocRef<'a>>, 76 ::core::option::Option<jacquard_common::types::blob::BlobRef<'a>>, 77 ), 78 _phantom: ::core::marker::PhantomData<&'a ()>, 79 } ··· 90 pub fn new() -> Self { 91 RootBuilder { 92 _phantom_state: ::core::marker::PhantomData, 93 + __unsafe_private_named: (None, None), 94 _phantom: ::core::marker::PhantomData, 95 } 96 } ··· 106 mut self, 107 value: impl Into<crate::sh_weaver::edit::DocRef<'a>>, 108 ) -> RootBuilder<'a, root_state::SetDoc<S>> { 109 + self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); 110 RootBuilder { 111 _phantom_state: ::core::marker::PhantomData, 112 __unsafe_private_named: self.__unsafe_private_named, ··· 125 mut self, 126 value: impl Into<jacquard_common::types::blob::BlobRef<'a>>, 127 ) -> RootBuilder<'a, root_state::SetSnapshot<S>> { 128 + self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); 129 RootBuilder { 130 _phantom_state: ::core::marker::PhantomData, 131 __unsafe_private_named: self.__unsafe_private_named, ··· 137 impl<'a, S> RootBuilder<'a, S> 138 where 139 S: root_state::State, 140 S::Doc: root_state::IsSet, 141 S::Snapshot: root_state::IsSet, 142 { 143 /// Build the final struct 144 pub fn build(self) -> Root<'a> { 145 Root { 146 + doc: self.__unsafe_private_named.0.unwrap(), 147 + snapshot: self.__unsafe_private_named.1.unwrap(), 148 extra_data: Default::default(), 149 } 150 } ··· 157 >, 158 ) -> Root<'a> { 159 Root { 160 + doc: self.__unsafe_private_named.0.unwrap(), 161 + snapshot: self.__unsafe_private_named.1.unwrap(), 162 extra_data: Some(extra_data), 163 } 164 } ··· 265 description: None, 266 required: Some( 267 vec![ 268 ::jacquard_common::smol_str::SmolStr::new_static("doc"), 269 ::jacquard_common::smol_str::SmolStr::new_static("snapshot") 270 ], ··· 274 #[allow(unused_mut)] 275 let mut map = ::std::collections::BTreeMap::new(); 276 map.insert( 277 ::jacquard_common::smol_str::SmolStr::new_static("doc"), 278 ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { 279 description: None, ··· 290 description: None, 291 accept: None, 292 max_size: None, 293 }), 294 ); 295 map
+53 -112
crates/weaver-api/src/sh_weaver/embed/record_with_media.rs
··· 20 #[serde(borrow)] 21 pub media: RecordWithMediaMedia<'a>, 22 #[serde(borrow)] 23 - pub record: RecordWithMediaRecord<'a>, 24 } 25 26 pub mod record_with_media_state { ··· 33 } 34 /// State trait tracking which required fields have been set 35 pub trait State: sealed::Sealed { 36 - type Record; 37 type Media; 38 } 39 /// Empty state - all required fields are unset 40 pub struct Empty(()); 41 impl sealed::Sealed for Empty {} 42 impl State for Empty { 43 - type Record = Unset; 44 type Media = Unset; 45 } 46 - ///State transition - sets the `record` field to Set 47 - pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>); 48 - impl<S: State> sealed::Sealed for SetRecord<S> {} 49 - impl<S: State> State for SetRecord<S> { 50 - type Record = Set<members::record>; 51 type Media = S::Media; 52 } 53 ///State transition - sets the `media` field to Set 54 pub struct SetMedia<S: State = Empty>(PhantomData<fn() -> S>); 55 impl<S: State> sealed::Sealed for SetMedia<S> {} 56 impl<S: State> State for SetMedia<S> { 57 - type Record = S::Record; 58 type Media = Set<members::media>; 59 } 60 /// Marker types for field names 61 #[allow(non_camel_case_types)] 62 pub mod members { 63 - ///Marker type for the `record` field 64 - pub struct record(()); 65 ///Marker type for the `media` field 66 pub struct media(()); 67 } ··· 72 _phantom_state: ::core::marker::PhantomData<fn() -> S>, 73 __unsafe_private_named: ( 74 ::core::option::Option<RecordWithMediaMedia<'a>>, 75 - ::core::option::Option<RecordWithMediaRecord<'a>>, 76 ), 77 _phantom: ::core::marker::PhantomData<&'a ()>, 78 } ··· 117 impl<'a, S> RecordWithMediaBuilder<'a, S> 118 where 119 S: record_with_media_state::State, 120 - S::Record: record_with_media_state::IsUnset, 121 { 122 - /// Set the `record` field (required) 123 - pub fn record( 124 mut self, 125 - value: impl Into<RecordWithMediaRecord<'a>>, 126 - ) -> RecordWithMediaBuilder<'a, record_with_media_state::SetRecord<S>> { 127 self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); 128 RecordWithMediaBuilder { 129 _phantom_state: ::core::marker::PhantomData, ··· 136 impl<'a, S> RecordWithMediaBuilder<'a, S> 137 where 138 S: record_with_media_state::State, 139 - S::Record: record_with_media_state::IsSet, 140 S::Media: record_with_media_state::IsSet, 141 { 142 /// Build the final struct 143 pub fn build(self) -> RecordWithMedia<'a> { 144 RecordWithMedia { 145 media: self.__unsafe_private_named.0.unwrap(), 146 - record: self.__unsafe_private_named.1.unwrap(), 147 extra_data: Default::default(), 148 } 149 } ··· 157 ) -> RecordWithMedia<'a> { 158 RecordWithMedia { 159 media: self.__unsafe_private_named.0.unwrap(), 160 - record: self.__unsafe_private_named.1.unwrap(), 161 extra_data: Some(extra_data), 162 } 163 } ··· 182 External(Box<crate::sh_weaver::embed::external::External<'a>>), 183 #[serde(rename = "sh.weaver.embed.video")] 184 Video(Box<crate::sh_weaver::embed::video::VideoRecord<'a>>), 185 - #[serde(rename = "app.bsky.embed.images")] 186 - BskyImages(Box<crate::app_bsky::embed::images::Images<'a>>), 187 - #[serde(rename = "app.bsky.embed.video")] 188 - BskyVideo(Box<crate::app_bsky::embed::video::Video<'a>>), 189 - #[serde(rename = "app.bsky.embed.external")] 190 - BskyExternal(Box<crate::app_bsky::embed::external::ExternalRecord<'a>>), 191 - } 192 - 193 - #[jacquard_derive::open_union] 194 - #[derive( 195 - serde::Serialize, 196 - serde::Deserialize, 197 - Debug, 198 - Clone, 199 - PartialEq, 200 - Eq, 201 - jacquard_derive::IntoStatic 202 - )] 203 - #[serde(tag = "$type")] 204 - #[serde(bound(deserialize = "'de: 'a"))] 205 - pub enum RecordWithMediaRecord<'a> { 206 - #[serde(rename = "app.bsky.embed.record")] 207 - Record(Box<crate::app_bsky::embed::record::Record<'a>>), 208 - #[serde(rename = "sh.weaver.embed.records")] 209 - Records(Box<crate::sh_weaver::embed::records::Records<'a>>), 210 } 211 212 fn lexicon_doc_sh_weaver_embed_recordWithMedia() -> ::jacquard_lexicon::lexicon::LexiconDoc< ··· 225 description: None, 226 required: Some( 227 vec![ 228 - ::jacquard_common::smol_str::SmolStr::new_static("record"), 229 ::jacquard_common::smol_str::SmolStr::new_static("media") 230 ], 231 ), ··· 240 refs: vec![ 241 ::jacquard_common::CowStr::new_static("sh.weaver.embed.images"), 242 ::jacquard_common::CowStr::new_static("sh.weaver.embed.external"), 243 - ::jacquard_common::CowStr::new_static("sh.weaver.embed.video"), 244 - ::jacquard_common::CowStr::new_static("app.bsky.embed.images"), 245 - ::jacquard_common::CowStr::new_static("app.bsky.embed.video"), 246 - ::jacquard_common::CowStr::new_static("app.bsky.embed.external") 247 ], 248 closed: None, 249 }), 250 ); 251 map.insert( 252 - ::jacquard_common::smol_str::SmolStr::new_static("record"), 253 - ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion { 254 description: None, 255 - refs: vec![ 256 - ::jacquard_common::CowStr::new_static("app.bsky.embed.record"), 257 - ::jacquard_common::CowStr::new_static("sh.weaver.embed.records") 258 - ], 259 - closed: None, 260 }), 261 ); 262 map ··· 284 refs: vec![ 285 ::jacquard_common::CowStr::new_static("sh.weaver.embed.images#view"), 286 ::jacquard_common::CowStr::new_static("sh.weaver.embed.external#view"), 287 - ::jacquard_common::CowStr::new_static("sh.weaver.embed.video#view"), 288 - ::jacquard_common::CowStr::new_static("app.bsky.embed.images#view"), 289 - ::jacquard_common::CowStr::new_static("app.bsky.embed.video#view"), 290 - ::jacquard_common::CowStr::new_static("app.bsky.embed.external#view") 291 ], 292 closed: None, 293 }), 294 ); 295 map.insert( 296 - ::jacquard_common::smol_str::SmolStr::new_static("record"), 297 - ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion { 298 description: None, 299 - refs: vec![ 300 - ::jacquard_common::CowStr::new_static("sh.weaver.embed.records#view"), 301 - ::jacquard_common::CowStr::new_static("app.bsky.embed.record#view") 302 - ], 303 - closed: None, 304 }), 305 ); 306 map ··· 343 pub struct View<'a> { 344 #[serde(borrow)] 345 pub media: ViewMedia<'a>, 346 #[serde(borrow)] 347 - pub record: ViewRecord<'a>, 348 } 349 350 pub mod view_state { ··· 396 _phantom_state: ::core::marker::PhantomData<fn() -> S>, 397 __unsafe_private_named: ( 398 ::core::option::Option<ViewMedia<'a>>, 399 - ::core::option::Option<ViewRecord<'a>>, 400 ), 401 _phantom: ::core::marker::PhantomData<&'a ()>, 402 } ··· 438 } 439 } 440 441 - impl<'a, S> ViewBuilder<'a, S> 442 - where 443 - S: view_state::State, 444 - S::Record: view_state::IsUnset, 445 - { 446 - /// Set the `record` field (required) 447 - pub fn record( 448 mut self, 449 - value: impl Into<ViewRecord<'a>>, 450 - ) -> ViewBuilder<'a, view_state::SetRecord<S>> { 451 - self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); 452 - ViewBuilder { 453 - _phantom_state: ::core::marker::PhantomData, 454 - __unsafe_private_named: self.__unsafe_private_named, 455 - _phantom: ::core::marker::PhantomData, 456 - } 457 } 458 } 459 ··· 467 pub fn build(self) -> View<'a> { 468 View { 469 media: self.__unsafe_private_named.0.unwrap(), 470 - record: self.__unsafe_private_named.1.unwrap(), 471 extra_data: Default::default(), 472 } 473 } ··· 481 ) -> View<'a> { 482 View { 483 media: self.__unsafe_private_named.0.unwrap(), 484 - record: self.__unsafe_private_named.1.unwrap(), 485 extra_data: Some(extra_data), 486 } 487 } ··· 506 ExternalView(Box<crate::sh_weaver::embed::external::View<'a>>), 507 #[serde(rename = "sh.weaver.embed.video#view")] 508 VideoView(Box<crate::sh_weaver::embed::video::View<'a>>), 509 - #[serde(rename = "app.bsky.embed.images#view")] 510 - BskyImagesView(Box<crate::app_bsky::embed::images::View<'a>>), 511 - #[serde(rename = "app.bsky.embed.video#view")] 512 - BskyVideoView(Box<crate::app_bsky::embed::video::View<'a>>), 513 - #[serde(rename = "app.bsky.embed.external#view")] 514 - BskyExternalView(Box<crate::app_bsky::embed::external::View<'a>>), 515 - } 516 - 517 - #[jacquard_derive::open_union] 518 - #[derive( 519 - serde::Serialize, 520 - serde::Deserialize, 521 - Debug, 522 - Clone, 523 - PartialEq, 524 - Eq, 525 - jacquard_derive::IntoStatic 526 - )] 527 - #[serde(tag = "$type")] 528 - #[serde(bound(deserialize = "'de: 'a"))] 529 - pub enum ViewRecord<'a> { 530 - #[serde(rename = "sh.weaver.embed.records#view")] 531 - RecordsView(Box<crate::sh_weaver::embed::records::View<'a>>), 532 - #[serde(rename = "app.bsky.embed.record#view")] 533 - RecordView(Box<crate::app_bsky::embed::record::View<'a>>), 534 } 535 536 impl<'a> ::jacquard_lexicon::schema::LexiconSchema for View<'a> {
··· 20 #[serde(borrow)] 21 pub media: RecordWithMediaMedia<'a>, 22 #[serde(borrow)] 23 + pub records: crate::sh_weaver::embed::records::Records<'a>, 24 } 25 26 pub mod record_with_media_state { ··· 33 } 34 /// State trait tracking which required fields have been set 35 pub trait State: sealed::Sealed { 36 + type Records; 37 type Media; 38 } 39 /// Empty state - all required fields are unset 40 pub struct Empty(()); 41 impl sealed::Sealed for Empty {} 42 impl State for Empty { 43 + type Records = Unset; 44 type Media = Unset; 45 } 46 + ///State transition - sets the `records` field to Set 47 + pub struct SetRecords<S: State = Empty>(PhantomData<fn() -> S>); 48 + impl<S: State> sealed::Sealed for SetRecords<S> {} 49 + impl<S: State> State for SetRecords<S> { 50 + type Records = Set<members::records>; 51 type Media = S::Media; 52 } 53 ///State transition - sets the `media` field to Set 54 pub struct SetMedia<S: State = Empty>(PhantomData<fn() -> S>); 55 impl<S: State> sealed::Sealed for SetMedia<S> {} 56 impl<S: State> State for SetMedia<S> { 57 + type Records = S::Records; 58 type Media = Set<members::media>; 59 } 60 /// Marker types for field names 61 #[allow(non_camel_case_types)] 62 pub mod members { 63 + ///Marker type for the `records` field 64 + pub struct records(()); 65 ///Marker type for the `media` field 66 pub struct media(()); 67 } ··· 72 _phantom_state: ::core::marker::PhantomData<fn() -> S>, 73 __unsafe_private_named: ( 74 ::core::option::Option<RecordWithMediaMedia<'a>>, 75 + ::core::option::Option<crate::sh_weaver::embed::records::Records<'a>>, 76 ), 77 _phantom: ::core::marker::PhantomData<&'a ()>, 78 } ··· 117 impl<'a, S> RecordWithMediaBuilder<'a, S> 118 where 119 S: record_with_media_state::State, 120 + S::Records: record_with_media_state::IsUnset, 121 { 122 + /// Set the `records` field (required) 123 + pub fn records( 124 mut self, 125 + value: impl Into<crate::sh_weaver::embed::records::Records<'a>>, 126 + ) -> RecordWithMediaBuilder<'a, record_with_media_state::SetRecords<S>> { 127 self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); 128 RecordWithMediaBuilder { 129 _phantom_state: ::core::marker::PhantomData, ··· 136 impl<'a, S> RecordWithMediaBuilder<'a, S> 137 where 138 S: record_with_media_state::State, 139 + S::Records: record_with_media_state::IsSet, 140 S::Media: record_with_media_state::IsSet, 141 { 142 /// Build the final struct 143 pub fn build(self) -> RecordWithMedia<'a> { 144 RecordWithMedia { 145 media: self.__unsafe_private_named.0.unwrap(), 146 + records: self.__unsafe_private_named.1.unwrap(), 147 extra_data: Default::default(), 148 } 149 } ··· 157 ) -> RecordWithMedia<'a> { 158 RecordWithMedia { 159 media: self.__unsafe_private_named.0.unwrap(), 160 + records: self.__unsafe_private_named.1.unwrap(), 161 extra_data: Some(extra_data), 162 } 163 } ··· 182 External(Box<crate::sh_weaver::embed::external::External<'a>>), 183 #[serde(rename = "sh.weaver.embed.video")] 184 Video(Box<crate::sh_weaver::embed::video::VideoRecord<'a>>), 185 } 186 187 fn lexicon_doc_sh_weaver_embed_recordWithMedia() -> ::jacquard_lexicon::lexicon::LexiconDoc< ··· 200 description: None, 201 required: Some( 202 vec![ 203 + ::jacquard_common::smol_str::SmolStr::new_static("records"), 204 ::jacquard_common::smol_str::SmolStr::new_static("media") 205 ], 206 ), ··· 215 refs: vec![ 216 ::jacquard_common::CowStr::new_static("sh.weaver.embed.images"), 217 ::jacquard_common::CowStr::new_static("sh.weaver.embed.external"), 218 + ::jacquard_common::CowStr::new_static("sh.weaver.embed.video") 219 ], 220 closed: None, 221 }), 222 ); 223 map.insert( 224 + ::jacquard_common::smol_str::SmolStr::new_static("records"), 225 + ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { 226 description: None, 227 + r#ref: ::jacquard_common::CowStr::new_static( 228 + "sh.weaver.embed.records", 229 + ), 230 }), 231 ); 232 map ··· 254 refs: vec![ 255 ::jacquard_common::CowStr::new_static("sh.weaver.embed.images#view"), 256 ::jacquard_common::CowStr::new_static("sh.weaver.embed.external#view"), 257 + ::jacquard_common::CowStr::new_static("sh.weaver.embed.video#view") 258 ], 259 closed: None, 260 }), 261 ); 262 map.insert( 263 + ::jacquard_common::smol_str::SmolStr::new_static("records"), 264 + ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { 265 description: None, 266 + r#ref: ::jacquard_common::CowStr::new_static( 267 + "sh.weaver.embed.records#view", 268 + ), 269 }), 270 ); 271 map ··· 308 pub struct View<'a> { 309 #[serde(borrow)] 310 pub media: ViewMedia<'a>, 311 + #[serde(skip_serializing_if = "std::option::Option::is_none")] 312 #[serde(borrow)] 313 + pub records: Option<crate::sh_weaver::embed::records::View<'a>>, 314 } 315 316 pub mod view_state { ··· 362 _phantom_state: ::core::marker::PhantomData<fn() -> S>, 363 __unsafe_private_named: ( 364 ::core::option::Option<ViewMedia<'a>>, 365 + ::core::option::Option<crate::sh_weaver::embed::records::View<'a>>, 366 ), 367 _phantom: ::core::marker::PhantomData<&'a ()>, 368 } ··· 404 } 405 } 406 407 + impl<'a, S: view_state::State> ViewBuilder<'a, S> { 408 + /// Set the `records` field (optional) 409 + pub fn records( 410 mut self, 411 + value: impl Into<Option<crate::sh_weaver::embed::records::View<'a>>>, 412 + ) -> Self { 413 + self.__unsafe_private_named.1 = value.into(); 414 + self 415 + } 416 + /// Set the `records` field to an Option value (optional) 417 + pub fn maybe_records( 418 + mut self, 419 + value: Option<crate::sh_weaver::embed::records::View<'a>>, 420 + ) -> Self { 421 + self.__unsafe_private_named.1 = value; 422 + self 423 } 424 } 425 ··· 433 pub fn build(self) -> View<'a> { 434 View { 435 media: self.__unsafe_private_named.0.unwrap(), 436 + records: self.__unsafe_private_named.1, 437 extra_data: Default::default(), 438 } 439 } ··· 447 ) -> View<'a> { 448 View { 449 media: self.__unsafe_private_named.0.unwrap(), 450 + records: self.__unsafe_private_named.1, 451 extra_data: Some(extra_data), 452 } 453 } ··· 472 ExternalView(Box<crate::sh_weaver::embed::external::View<'a>>), 473 #[serde(rename = "sh.weaver.embed.video#view")] 474 VideoView(Box<crate::sh_weaver::embed::video::View<'a>>), 475 } 476 477 impl<'a> ::jacquard_lexicon::schema::LexiconSchema for View<'a> {
-15
crates/weaver-api/src/sh_weaver/embed/records.rs
··· 237 ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion { 238 description: None, 239 refs: vec![ 240 - ::jacquard_common::CowStr::new_static("app.bsky.embed.images#view"), 241 - ::jacquard_common::CowStr::new_static("app.bsky.embed.video#view"), 242 - ::jacquard_common::CowStr::new_static("app.bsky.embed.external#view"), 243 - ::jacquard_common::CowStr::new_static("app.bsky.embed.record#view"), 244 - ::jacquard_common::CowStr::new_static("app.bsky.embed.recordWithMedia#view"), 245 ::jacquard_common::CowStr::new_static("sh.weaver.embed.records#view"), 246 ::jacquard_common::CowStr::new_static("sh.weaver.embed.images#view"), 247 ::jacquard_common::CowStr::new_static("sh.weaver.embed.recordWithMedia#view"), ··· 957 #[serde(tag = "$type")] 958 #[serde(bound(deserialize = "'de: 'a"))] 959 pub enum RecordEmbedViewRecordView<'a> { 960 - #[serde(rename = "app.bsky.embed.images#view")] 961 - BskyImagesView(Box<crate::app_bsky::embed::images::View<'a>>), 962 - #[serde(rename = "app.bsky.embed.video#view")] 963 - BskyVideoView(Box<crate::app_bsky::embed::video::View<'a>>), 964 - #[serde(rename = "app.bsky.embed.external#view")] 965 - ExternalView(Box<crate::app_bsky::embed::external::View<'a>>), 966 - #[serde(rename = "app.bsky.embed.record#view")] 967 - RecordView(Box<crate::app_bsky::embed::record::View<'a>>), 968 - #[serde(rename = "app.bsky.embed.recordWithMedia#view")] 969 - BskyRecordWithMediaView(Box<crate::app_bsky::embed::record_with_media::View<'a>>), 970 #[serde(rename = "sh.weaver.embed.records#view")] 971 View(Box<crate::sh_weaver::embed::records::View<'a>>), 972 #[serde(rename = "sh.weaver.embed.images#view")]
··· 237 ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion { 238 description: None, 239 refs: vec![ 240 ::jacquard_common::CowStr::new_static("sh.weaver.embed.records#view"), 241 ::jacquard_common::CowStr::new_static("sh.weaver.embed.images#view"), 242 ::jacquard_common::CowStr::new_static("sh.weaver.embed.recordWithMedia#view"), ··· 952 #[serde(tag = "$type")] 953 #[serde(bound(deserialize = "'de: 'a"))] 954 pub enum RecordEmbedViewRecordView<'a> { 955 #[serde(rename = "sh.weaver.embed.records#view")] 956 View(Box<crate::sh_weaver::embed::records::View<'a>>), 957 #[serde(rename = "sh.weaver.embed.images#view")]
+76 -5
crates/weaver-api/src/sh_weaver/publish/blob.rs
··· 18 )] 19 #[serde(rename_all = "camelCase")] 20 pub struct Blob<'a> { 21 /// Reference to the uploaded file 22 #[serde(borrow)] 23 pub upload: jacquard_common::types::blob::BlobRef<'a>, ··· 34 /// State trait tracking which required fields have been set 35 pub trait State: sealed::Sealed { 36 type Upload; 37 } 38 /// Empty state - all required fields are unset 39 pub struct Empty(()); 40 impl sealed::Sealed for Empty {} 41 impl State for Empty { 42 type Upload = Unset; 43 } 44 ///State transition - sets the `upload` field to Set 45 pub struct SetUpload<S: State = Empty>(PhantomData<fn() -> S>); 46 impl<S: State> sealed::Sealed for SetUpload<S> {} 47 impl<S: State> State for SetUpload<S> { 48 type Upload = Set<members::upload>; 49 } 50 /// Marker types for field names 51 #[allow(non_camel_case_types)] 52 pub mod members { 53 ///Marker type for the `upload` field 54 pub struct upload(()); 55 } 56 } 57 ··· 59 pub struct BlobBuilder<'a, S: blob_state::State> { 60 _phantom_state: ::core::marker::PhantomData<fn() -> S>, 61 __unsafe_private_named: ( 62 ::core::option::Option<jacquard_common::types::blob::BlobRef<'a>>, 63 ), 64 _phantom: ::core::marker::PhantomData<&'a ()>, ··· 76 pub fn new() -> Self { 77 BlobBuilder { 78 _phantom_state: ::core::marker::PhantomData, 79 - __unsafe_private_named: (None,), 80 _phantom: ::core::marker::PhantomData, 81 } 82 } ··· 92 mut self, 93 value: impl Into<jacquard_common::types::blob::BlobRef<'a>>, 94 ) -> BlobBuilder<'a, blob_state::SetUpload<S>> { 95 - self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); 96 BlobBuilder { 97 _phantom_state: ::core::marker::PhantomData, 98 __unsafe_private_named: self.__unsafe_private_named, ··· 105 where 106 S: blob_state::State, 107 S::Upload: blob_state::IsSet, 108 { 109 /// Build the final struct 110 pub fn build(self) -> Blob<'a> { 111 Blob { 112 - upload: self.__unsafe_private_named.0.unwrap(), 113 extra_data: Default::default(), 114 } 115 } ··· 122 >, 123 ) -> Blob<'a> { 124 Blob { 125 - upload: self.__unsafe_private_named.0.unwrap(), 126 extra_data: Some(extra_data), 127 } 128 } ··· 202 fn validate( 203 &self, 204 ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 205 Ok(()) 206 } 207 } ··· 229 description: None, 230 required: Some( 231 vec![ 232 - ::jacquard_common::smol_str::SmolStr::new_static("upload") 233 ], 234 ), 235 nullable: None, 236 properties: { 237 #[allow(unused_mut)] 238 let mut map = ::std::collections::BTreeMap::new(); 239 map.insert( 240 ::jacquard_common::smol_str::SmolStr::new_static("upload"), 241 ::jacquard_lexicon::lexicon::LexObjectProperty::Blob(::jacquard_lexicon::lexicon::LexBlob {
··· 18 )] 19 #[serde(rename_all = "camelCase")] 20 pub struct Blob<'a> { 21 + /// relative path to the blob 22 + #[serde(borrow)] 23 + pub path: jacquard_common::CowStr<'a>, 24 /// Reference to the uploaded file 25 #[serde(borrow)] 26 pub upload: jacquard_common::types::blob::BlobRef<'a>, ··· 37 /// State trait tracking which required fields have been set 38 pub trait State: sealed::Sealed { 39 type Upload; 40 + type Path; 41 } 42 /// Empty state - all required fields are unset 43 pub struct Empty(()); 44 impl sealed::Sealed for Empty {} 45 impl State for Empty { 46 type Upload = Unset; 47 + type Path = Unset; 48 } 49 ///State transition - sets the `upload` field to Set 50 pub struct SetUpload<S: State = Empty>(PhantomData<fn() -> S>); 51 impl<S: State> sealed::Sealed for SetUpload<S> {} 52 impl<S: State> State for SetUpload<S> { 53 type Upload = Set<members::upload>; 54 + type Path = S::Path; 55 + } 56 + ///State transition - sets the `path` field to Set 57 + pub struct SetPath<S: State = Empty>(PhantomData<fn() -> S>); 58 + impl<S: State> sealed::Sealed for SetPath<S> {} 59 + impl<S: State> State for SetPath<S> { 60 + type Upload = S::Upload; 61 + type Path = Set<members::path>; 62 } 63 /// Marker types for field names 64 #[allow(non_camel_case_types)] 65 pub mod members { 66 ///Marker type for the `upload` field 67 pub struct upload(()); 68 + ///Marker type for the `path` field 69 + pub struct path(()); 70 } 71 } 72 ··· 74 pub struct BlobBuilder<'a, S: blob_state::State> { 75 _phantom_state: ::core::marker::PhantomData<fn() -> S>, 76 __unsafe_private_named: ( 77 + ::core::option::Option<jacquard_common::CowStr<'a>>, 78 ::core::option::Option<jacquard_common::types::blob::BlobRef<'a>>, 79 ), 80 _phantom: ::core::marker::PhantomData<&'a ()>, ··· 92 pub fn new() -> Self { 93 BlobBuilder { 94 _phantom_state: ::core::marker::PhantomData, 95 + __unsafe_private_named: (None, None), 96 + _phantom: ::core::marker::PhantomData, 97 + } 98 + } 99 + } 100 + 101 + impl<'a, S> BlobBuilder<'a, S> 102 + where 103 + S: blob_state::State, 104 + S::Path: blob_state::IsUnset, 105 + { 106 + /// Set the `path` field (required) 107 + pub fn path( 108 + mut self, 109 + value: impl Into<jacquard_common::CowStr<'a>>, 110 + ) -> BlobBuilder<'a, blob_state::SetPath<S>> { 111 + self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); 112 + BlobBuilder { 113 + _phantom_state: ::core::marker::PhantomData, 114 + __unsafe_private_named: self.__unsafe_private_named, 115 _phantom: ::core::marker::PhantomData, 116 } 117 } ··· 127 mut self, 128 value: impl Into<jacquard_common::types::blob::BlobRef<'a>>, 129 ) -> BlobBuilder<'a, blob_state::SetUpload<S>> { 130 + self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); 131 BlobBuilder { 132 _phantom_state: ::core::marker::PhantomData, 133 __unsafe_private_named: self.__unsafe_private_named, ··· 140 where 141 S: blob_state::State, 142 S::Upload: blob_state::IsSet, 143 + S::Path: blob_state::IsSet, 144 { 145 /// Build the final struct 146 pub fn build(self) -> Blob<'a> { 147 Blob { 148 + path: self.__unsafe_private_named.0.unwrap(), 149 + upload: self.__unsafe_private_named.1.unwrap(), 150 extra_data: Default::default(), 151 } 152 } ··· 159 >, 160 ) -> Blob<'a> { 161 Blob { 162 + path: self.__unsafe_private_named.0.unwrap(), 163 + upload: self.__unsafe_private_named.1.unwrap(), 164 extra_data: Some(extra_data), 165 } 166 } ··· 240 fn validate( 241 &self, 242 ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 243 + { 244 + let value = &self.path; 245 + #[allow(unused_comparisons)] 246 + if <str>::len(value.as_ref()) < 1usize { 247 + return Err(::jacquard_lexicon::validation::ConstraintError::MinLength { 248 + path: ::jacquard_lexicon::validation::ValidationPath::from_field( 249 + "path", 250 + ), 251 + min: 1usize, 252 + actual: <str>::len(value.as_ref()), 253 + }); 254 + } 255 + } 256 Ok(()) 257 } 258 } ··· 280 description: None, 281 required: Some( 282 vec![ 283 + ::jacquard_common::smol_str::SmolStr::new_static("upload"), 284 + ::jacquard_common::smol_str::SmolStr::new_static("path") 285 ], 286 ), 287 nullable: None, 288 properties: { 289 #[allow(unused_mut)] 290 let mut map = ::std::collections::BTreeMap::new(); 291 + map.insert( 292 + ::jacquard_common::smol_str::SmolStr::new_static("path"), 293 + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 294 + description: Some( 295 + ::jacquard_common::CowStr::new_static( 296 + "relative path to the blob", 297 + ), 298 + ), 299 + format: None, 300 + default: None, 301 + min_length: Some(1usize), 302 + max_length: None, 303 + min_graphemes: None, 304 + max_graphemes: None, 305 + r#enum: None, 306 + r#const: None, 307 + known_values: None, 308 + }), 309 + ); 310 map.insert( 311 ::jacquard_common::smol_str::SmolStr::new_static("upload"), 312 ::jacquard_lexicon::lexicon::LexObjectProperty::Blob(::jacquard_lexicon::lexicon::LexBlob {
+2 -2
crates/weaver-common/Cargo.toml
··· 13 [dependencies] 14 n0-future = { workspace = true } 15 weaver-workspace-hack = { version = "0.1", path = "../weaver-workspace-hack" } 16 markdown-weaver = { workspace = true } 17 #libsqlite3-sys = { version = "0.30.1", features = ["bundled"] } 18 19 http = "1.3.1" 20 21 jacquard = { workspace = true } 22 - jacquard-api = { workspace = true, features = ["sh_weaver"] } 23 trait-variant = "0.1" 24 25 serde = { workspace = true } ··· 58 dirs = "6.0.0" 59 regex = "1.11.1" 60 markdown-weaver-escape = { workspace = true, features = ["std"] } 61 - 62 63 64 [dev-dependencies]
··· 13 [dependencies] 14 n0-future = { workspace = true } 15 weaver-workspace-hack = { version = "0.1", path = "../weaver-workspace-hack" } 16 + weaver-api = { version = "0.1", path = "../weaver-api" } 17 markdown-weaver = { workspace = true } 18 #libsqlite3-sys = { version = "0.30.1", features = ["bundled"] } 19 20 http = "1.3.1" 21 22 jacquard = { workspace = true } 23 trait-variant = "0.1" 24 25 serde = { workspace = true } ··· 58 dirs = "6.0.0" 59 regex = "1.11.1" 60 markdown-weaver-escape = { workspace = true, features = ["std"] } 61 + tree_magic.workspace = true 62 63 64 [dev-dependencies]
+9
crates/weaver-common/src/error.rs
··· 1 //! Error types for weaver - thin wrapper over jacquard errors 2 3 use miette::{Diagnostic, NamedSource, SourceOffset, SourceSpan}; 4 use std::borrow::Cow; 5 ··· 36 /// Task join error 37 #[error(transparent)] 38 Task(#[from] n0_future::task::JoinError), 39 } 40 41 /// Parse error with source code location information
··· 1 //! Error types for weaver - thin wrapper over jacquard errors 2 3 + use jacquard::{types::string::AtStrError, xrpc::GenericXrpcError}; 4 use miette::{Diagnostic, NamedSource, SourceOffset, SourceSpan}; 5 use std::borrow::Cow; 6 ··· 37 /// Task join error 38 #[error(transparent)] 39 Task(#[from] n0_future::task::JoinError), 40 + 41 + /// atproto string parsing error 42 + #[error(transparent)] 43 + AtprotoString(#[from] AtStrError), 44 + 45 + /// XRPC error 46 + #[error(transparent)] 47 + Xrpc(#[from] jacquard::xrpc::XrpcError<GenericXrpcError>), 48 } 49 50 /// Parse error with source code location information
+190 -24
crates/weaver-common/src/lib.rs
··· 4 5 // Re-export jacquard for convenience 6 pub use jacquard; 7 - use jacquard::CowStr; 8 - pub use jacquard_api; 9 10 pub use error::WeaverError; 11 12 - use jacquard::client::{Agent, AgentSession}; 13 - use jacquard::types::blob::BlobRef; 14 - use jacquard::types::string::{AtUri, Cid, Did}; 15 - use jacquard_api::sh_weaver::notebook::{book, chapter, entry}; 16 use std::path::Path; 17 18 /// Extension trait providing weaver-specific multi-step operations on Agent 19 /// ··· 26 /// - `agent.upload_blob()` - Upload a single blob 27 /// 28 /// This trait is for multi-step workflows that coordinate between multiple operations. 29 - #[trait_variant::make(Send)] 30 - pub trait WeaverExt { 31 /// Publish a notebook directory to the user's PDS 32 /// 33 /// Multi-step workflow: ··· 38 /// 5. Create book record with entry refs 39 /// 40 /// Returns the AT-URI of the published book 41 - async fn publish_notebook(&self, path: &Path) -> Result<PublishResult<'_>, WeaverError>; 42 43 - /// Upload assets from markdown content 44 /// 45 /// Multi-step workflow: 46 - /// 1. Parse markdown for image/asset refs 47 - /// 2. Upload each asset → BlobRef 48 - /// 3. Return mapping of original path → BlobRef 49 /// 50 - /// Used by renderer to transform local refs to atproto refs 51 - async fn upload_assets( 52 &self, 53 - markdown: &str, 54 - ) -> Result<Vec<(String, BlobRef<'_>)>, WeaverError>; 55 } 56 57 - impl<A: AgentSession> WeaverExt for Agent<A> { 58 async fn publish_notebook(&self, _path: &Path) -> Result<PublishResult<'_>, WeaverError> { 59 // TODO: Implementation 60 todo!("publish_notebook not yet implemented") 61 } 62 63 - async fn upload_assets( 64 &self, 65 - _markdown: &str, 66 - ) -> Result<Vec<(String, BlobRef<'_>)>, WeaverError> { 67 - // TODO: Implementation 68 - todo!("upload_assets not yet implemented") 69 } 70 } 71 ··· 77 /// CID of the book record 78 pub cid: Cid<'a>, 79 /// URIs of published entries 80 - pub entries: Vec<AtUri<'a>>, 81 } 82 83 /// too many cows, so we have conversions ··· 173 Some(CowStr::Borrowed(aturi)) 174 } 175 }
··· 4 5 // Re-export jacquard for convenience 6 pub use jacquard; 7 + use jacquard::error::ClientError; 8 + use jacquard::types::ident::AtIdentifier; 9 + use jacquard::{CowStr, IntoStatic, xrpc}; 10 11 pub use error::WeaverError; 12 + use jacquard::types::tid::{Ticker, Tid}; 13 14 + use jacquard::bytes::Bytes; 15 + use jacquard::client::{Agent, AgentError, AgentErrorKind, AgentSession, AgentSessionExt}; 16 + use jacquard::prelude::*; 17 + use jacquard::smol_str::SmolStr; 18 + use jacquard::types::blob::{BlobRef, MimeType}; 19 + use jacquard::types::string::{AtUri, Cid, Did, Handle, RecordKey}; 20 + use jacquard::xrpc::Response; 21 use std::path::Path; 22 + use std::sync::LazyLock; 23 + use tokio::sync::Mutex; 24 + use weaver_api::com_atproto::repo::get_record::GetRecordResponse; 25 + use weaver_api::com_atproto::repo::strong_ref::StrongRef; 26 + use weaver_api::sh_weaver::notebook::{book, chapter, entry}; 27 + use weaver_api::sh_weaver::publish::blob::Blob as PublishedBlob; 28 + 29 + use crate::error::ParseError; 30 + 31 + static W_TICKER: LazyLock<Mutex<Ticker>> = LazyLock::new(|| Mutex::new(Ticker::new())); 32 33 /// Extension trait providing weaver-specific multi-step operations on Agent 34 /// ··· 41 /// - `agent.upload_blob()` - Upload a single blob 42 /// 43 /// This trait is for multi-step workflows that coordinate between multiple operations. 44 + //#[trait_variant::make(Send)] 45 + pub trait WeaverExt: AgentSessionExt { 46 /// Publish a notebook directory to the user's PDS 47 /// 48 /// Multi-step workflow: ··· 53 /// 5. Create book record with entry refs 54 /// 55 /// Returns the AT-URI of the published book 56 + fn publish_notebook( 57 + &self, 58 + path: &Path, 59 + ) -> impl Future<Output = Result<PublishResult<'_>, WeaverError>>; 60 61 + /// Publish a blob to the user's PDS 62 /// 63 /// Multi-step workflow: 64 + /// 1. Upload blob to PDS 65 + /// 2. Create blob record with CID 66 /// 67 + /// Returns the AT-URI of the published blob 68 + fn publish_blob<'a>( 69 + &self, 70 + blob: Bytes, 71 + url_path: &'a str, 72 + prev: Option<Tid>, 73 + ) -> impl Future<Output = Result<(StrongRef<'a>, PublishedBlob<'a>), WeaverError>>; 74 + 75 + fn confirm_record_ref( 76 &self, 77 + uri: &AtUri<'_>, 78 + ) -> impl Future<Output = Result<StrongRef<'_>, WeaverError>>; 79 } 80 81 + impl<A: AgentSession + IdentityResolver> WeaverExt for Agent<A> { 82 async fn publish_notebook(&self, _path: &Path) -> Result<PublishResult<'_>, WeaverError> { 83 // TODO: Implementation 84 todo!("publish_notebook not yet implemented") 85 } 86 87 + async fn publish_blob<'a>( 88 &self, 89 + blob: Bytes, 90 + url_path: &'a str, 91 + prev: Option<Tid>, 92 + ) -> Result<(StrongRef<'a>, PublishedBlob<'a>), WeaverError> { 93 + let mime_type = MimeType::new_owned(tree_magic::from_u8(blob.as_ref())); 94 + 95 + let blob = self.upload_blob(blob, mime_type).await?; 96 + let publish_record = PublishedBlob::new() 97 + .path(url_path) 98 + .upload(BlobRef::Blob(blob)) 99 + .build(); 100 + let tid = W_TICKER.lock().await.next(prev); 101 + let record = self 102 + .create_record(publish_record.clone(), Some(RecordKey::any(tid.as_str())?)) 103 + .await?; 104 + let strong_ref = StrongRef::new().uri(record.uri).cid(record.cid).build(); 105 + 106 + Ok((strong_ref, publish_record)) 107 + } 108 + 109 + async fn confirm_record_ref(&self, uri: &AtUri<'_>) -> Result<StrongRef<'_>, WeaverError> { 110 + let rkey = uri.rkey().ok_or_else(|| { 111 + AgentError::from( 112 + ClientError::invalid_request("AtUri missing rkey") 113 + .with_help("ensure the URI includes a record key after the collection"), 114 + ) 115 + })?; 116 + 117 + // Resolve authority (DID or handle) to get DID and PDS 118 + use jacquard::types::ident::AtIdentifier; 119 + let (repo_did, pds_url) = match uri.authority() { 120 + AtIdentifier::Did(did) => { 121 + let pds = self.pds_for_did(did).await.map_err(|e| { 122 + AgentError::from( 123 + ClientError::from(e) 124 + .with_context("DID document resolution failed during record retrieval"), 125 + ) 126 + })?; 127 + (did.clone(), pds) 128 + } 129 + AtIdentifier::Handle(handle) => self.pds_for_handle(handle).await.map_err(|e| { 130 + AgentError::from( 131 + ClientError::from(e) 132 + .with_context("handle resolution failed during record retrieval"), 133 + ) 134 + })?, 135 + }; 136 + 137 + // Make stateless XRPC call to that PDS (no auth required for public records) 138 + use weaver_api::com_atproto::repo::get_record::GetRecord; 139 + let request = GetRecord::new() 140 + .repo(AtIdentifier::Did(repo_did)) 141 + .collection( 142 + uri.collection() 143 + .expect("collection should exist if rkey does") 144 + .clone(), 145 + ) 146 + .rkey(rkey.clone()) 147 + .build(); 148 + 149 + let response: Response<GetRecordResponse> = { 150 + let http_request = xrpc::build_http_request(&pds_url, &request, &self.opts().await) 151 + .map_err(|e| AgentError::from(ClientError::transport(e)))?; 152 + 153 + let http_response = self 154 + .send_http(http_request) 155 + .await 156 + .map_err(|e| AgentError::from(ClientError::transport(e)))?; 157 + 158 + xrpc::process_response(http_response) 159 + } 160 + .map_err(|e| AgentError::new(AgentErrorKind::Client, Some(e.into())))?; 161 + let record = response.parse().map_err(|e| AgentError::xrpc(e))?; 162 + let strong_ref = StrongRef::new() 163 + .uri(record.uri) 164 + .cid(record.cid.expect("when does this NOT have a CID?")) 165 + .build(); 166 + Ok(strong_ref.into_static()) 167 } 168 } 169 ··· 175 /// CID of the book record 176 pub cid: Cid<'a>, 177 /// URIs of published entries 178 + pub entries: Vec<StrongRef<'a>>, 179 } 180 181 /// too many cows, so we have conversions ··· 271 Some(CowStr::Borrowed(aturi)) 272 } 273 } 274 + 275 + pub enum LinkUri<'a> { 276 + AtRecord(AtUri<'a>), 277 + AtIdent(Did<'a>, Handle<'a>), 278 + Web(jacquard::url::Url), 279 + Path(markdown_weaver::CowStr<'a>), 280 + Heading(markdown_weaver::CowStr<'a>), 281 + Footnote(markdown_weaver::CowStr<'a>), 282 + } 283 + 284 + impl<'a> LinkUri<'a> { 285 + pub async fn resolve<A>(dest_url: &'a str, agent: &Agent<A>) -> LinkUri<'a> 286 + where 287 + A: AgentSession + IdentityResolver, 288 + { 289 + if dest_url.starts_with('@') { 290 + if let Ok(handle) = Handle::new(dest_url) { 291 + if let Ok(did) = agent.resolve_handle(&handle).await { 292 + return Self::AtIdent(did, handle); 293 + } 294 + } 295 + } else if dest_url.starts_with("did:") { 296 + if let Ok(did) = Did::new(dest_url) { 297 + if let Ok(doc) = agent.resolve_did_doc(&did).await { 298 + if let Ok(doc) = doc.parse_validated() { 299 + if let Some(handle) = doc.handles().first() { 300 + return Self::AtIdent(did, handle.clone()); 301 + } 302 + } 303 + } 304 + } 305 + } else if dest_url.starts_with('#') { 306 + // local fragment 307 + return Self::Heading(markdown_weaver::CowStr::Borrowed(dest_url)); 308 + } else if dest_url.starts_with('^') { 309 + // footnote 310 + return Self::Footnote(markdown_weaver::CowStr::Borrowed(dest_url)); 311 + } 312 + if let Ok(url) = jacquard::url::Url::parse(dest_url) { 313 + if let Some(uri) = jacquard::richtext::extract_at_uri_from_url( 314 + url.as_str(), 315 + jacquard::richtext::DEFAULT_EMBED_DOMAINS, 316 + ) { 317 + if let AtIdentifier::Handle(handle) = uri.authority() { 318 + if let Ok(did) = agent.resolve_handle(handle).await { 319 + let mut aturi = format!("at://{did}"); 320 + if let Some(collection) = uri.collection() { 321 + aturi.push_str(&format!("/{}", collection)); 322 + if let Some(record) = uri.rkey() { 323 + aturi.push_str(&format!("/{}", record.0)); 324 + } 325 + } 326 + if let Ok(aturi) = AtUri::new_owned(aturi) { 327 + return Self::AtRecord(aturi); 328 + } 329 + } 330 + return Self::AtRecord(uri); 331 + } else { 332 + return Self::AtRecord(uri); 333 + } 334 + } else if url.scheme() == "http" || url.scheme() == "https" { 335 + return Self::Web(url); 336 + } 337 + } 338 + 339 + LinkUri::Path(markdown_weaver::CowStr::Borrowed(dest_url)) 340 + } 341 + }
-3
crates/weaver-renderer/src/lib.rs
··· 3 //! This crate works with the weaver-markdown crate to render and optionally upload markdown notebooks to your Atproto PDS. 4 //! 5 6 - use async_trait::async_trait; 7 use markdown_weaver::CowStr; 8 use markdown_weaver::Event; 9 - use markdown_weaver::LinkType; 10 use markdown_weaver::Tag; 11 use n0_future::Stream; 12 - use n0_future::StreamExt; 13 use n0_future::pin; 14 use n0_future::stream::once_future; 15 use yaml_rust2::Yaml;
··· 3 //! This crate works with the weaver-markdown crate to render and optionally upload markdown notebooks to your Atproto PDS. 4 //! 5 6 use markdown_weaver::CowStr; 7 use markdown_weaver::Event; 8 use markdown_weaver::Tag; 9 use n0_future::Stream; 10 use n0_future::pin; 11 use n0_future::stream::once_future; 12 use yaml_rust2::Yaml;
+1 -4
crates/weaver-renderer/src/utils.rs
··· 1 - use std::{fmt::Arguments, path::Path, sync::OnceLock}; 2 3 use markdown_weaver::{CodeBlockKind, CowStr, Event, Tag}; 4 - use markdown_weaver_escape::StrWrite; 5 use miette::IntoDiagnostic; 6 use n0_future::TryFutureExt; 7 - use n0_future::io::AsyncWrite; 8 - use n0_future::io::AsyncWriteExt; 9 use regex::Regex; 10 11 #[cfg(not(all(target_family = "wasm", target_os = "unknown")))]
··· 1 + use std::{path::Path, sync::OnceLock}; 2 3 use markdown_weaver::{CodeBlockKind, CowStr, Event, Tag}; 4 use miette::IntoDiagnostic; 5 use n0_future::TryFutureExt; 6 use regex::Regex; 7 8 #[cfg(not(all(target_family = "wasm", target_os = "unknown")))]
+61 -27
flake.nix
··· 109 # cargo won't be able to find the sources for all members. 110 weaver-cli = craneLib.buildPackage (individualCrateArgs 111 // { 112 - pname = "${name}-cli"; 113 cargoExtraArgs = "-p ${name}-cli"; 114 src = fileSetForCrate ./crates/weaver-cli; 115 }); ··· 217 }; 218 }; 219 220 - devShells.default = craneLib.devShell { 221 - inherit name; 222 - # Inherit inputs from checks. 223 - checks = self.checks.${system}; 224 - NIX_LD_LIBRARY_PATH = with pkgs; 225 - lib.makeLibraryPath [ 226 - stdenv.cc.cc 227 - openssl 228 - # ... 229 - ]; 230 - NIX_LD = lib.fileContents "${pkgs.stdenv.cc}/nix-support/dynamic-linker"; 231 232 - LD_LIBRARY_PATH = "$LD_LIBRARY_PATH:$NIX_LD_LIBRARY_PATH"; 233 - DATABASE_URL = "postgres://postgres:@localhost/weaver_appview"; 234 235 - # Additional dev-shell environment variables can be set directly 236 - # MY_CUSTOM_DEVELOPMENT_VAR = "something else"; 237 238 - # Extra inputs can be added here; cargo and rustc are provided by default. 239 - packages = with pkgs; [ 240 - cargo-hakari 241 - nixd 242 - alejandra 243 - diesel-cli 244 - postgresql 245 - cargo-insta 246 - jq 247 - ]; 248 - }; 249 }); 250 }
··· 109 # cargo won't be able to find the sources for all members. 110 weaver-cli = craneLib.buildPackage (individualCrateArgs 111 // { 112 + pname = "${name}"; 113 cargoExtraArgs = "-p ${name}-cli"; 114 src = fileSetForCrate ./crates/weaver-cli; 115 }); ··· 217 }; 218 }; 219 220 + devShells.default = let 221 + # dioxus-cli = pkgs.dioxus-cli.overrideAttrs (_: { 222 + # postPatch = '' 223 + # rm Cargo.lock 224 + # cp ${./Dioxus.lock} Cargo.lock 225 + # ''; 226 + # cargoDeps = pkgs.rustPlatform.importCargoLock { 227 + # lockFile = ./Dioxus.lock; 228 + # }; 229 + # }); 230 + cargoLock = builtins.fromTOML (builtins.readFile ./Cargo.lock); 231 232 + wasmBindgen = 233 + pkgs.lib.findFirst 234 + (pkg: pkg.name == "wasm-bindgen") 235 + (throw "Could not find wasm-bindgen package") 236 + cargoLock.package; 237 238 + wasm-bindgen-cli = pkgs.buildWasmBindgenCli rec { 239 + src = pkgs.fetchCrate { 240 + pname = "wasm-bindgen-cli"; 241 + version = wasmBindgen.version; 242 + hash = "sha256-zLPFFgnqAWq5R2KkaTGAYqVQswfBEYm9x3OPjx8DJRY="; 243 + }; 244 245 + cargoDeps = pkgs.rustPlatform.fetchCargoVendor { 246 + inherit src; 247 + inherit (src) pname version; 248 + hash = "sha256-a2X9bzwnMWNt0fTf30qAiJ4noal/ET1jEtf5fBFj5OU="; 249 + }; 250 + }; 251 + in 252 + craneLib.devShell { 253 + inherit name; 254 + # Inherit inputs from checks. 255 + checks = self.checks.${system}; 256 + NIX_LD_LIBRARY_PATH = with pkgs; 257 + lib.makeLibraryPath [ 258 + stdenv.cc.cc 259 + openssl 260 + # ... 261 + ]; 262 + NIX_LD = lib.fileContents "${pkgs.stdenv.cc}/nix-support/dynamic-linker"; 263 + 264 + LD_LIBRARY_PATH = "$LD_LIBRARY_PATH:$NIX_LD_LIBRARY_PATH"; 265 + DATABASE_URL = "postgres://postgres:@localhost/weaver_appview"; 266 + 267 + # Additional dev-shell environment variables can be set directly 268 + # MY_CUSTOM_DEVELOPMENT_VAR = "something else"; 269 + 270 + # Extra inputs can be added here; cargo and rustc are provided by default. 271 + packages = with pkgs; [ 272 + cargo-hakari 273 + nixd 274 + alejandra 275 + diesel-cli 276 + postgresql 277 + cargo-insta 278 + jq 279 + dioxus-cli 280 + wasm-bindgen-cli 281 + ]; 282 + }; 283 }); 284 }
+35
lexicons/embed/recordWithMedia.json
···
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.weaver.embed.recordWithMedia", 4 + "description": "A representation of a record embedded in a Weaver record (eg, a notebook entry), alongside other compatible embeds. For example, a quote post and image, or a quote post and external URL card.", 5 + "defs": { 6 + "main": { 7 + "type": "object", 8 + "required": ["records", "media"], 9 + "properties": { 10 + "records": { 11 + "type": "ref", 12 + "ref": "sh.weaver.embed.records" 13 + }, 14 + "media": { 15 + "type": "union", 16 + "refs": ["sh.weaver.embed.images", "sh.weaver.embed.external", "sh.weaver.embed.video"] 17 + } 18 + } 19 + }, 20 + "view": { 21 + "type": "object", 22 + "required": ["record", "media"], 23 + "properties": { 24 + "records": { 25 + "type": "ref", 26 + "ref": "sh.weaver.embed.records#view" 27 + }, 28 + "media": { 29 + "type": "union", 30 + "refs": ["sh.weaver.embed.images#view", "sh.weaver.embed.external#view", "sh.weaver.embed.video#view"] 31 + } 32 + } 33 + } 34 + } 35 + }
lexicons/sh/weaver/actor/defs.json lexicons/actor/defs.json
lexicons/sh/weaver/actor/getProfile.json lexicons/actor/getProfile.json
lexicons/sh/weaver/actor/profile.json lexicons/actor/profile.json
lexicons/sh/weaver/edit/cursor.json lexicons/edit/cursor.json
lexicons/sh/weaver/edit/defs.json lexicons/edit/defs.json
lexicons/sh/weaver/edit/diff.json lexicons/edit/diff.json
+1 -3
lexicons/sh/weaver/edit/root.json lexicons/edit/root.json
··· 8 "key": "tid", 9 "record": { 10 "type": "object", 11 - "required": ["cid", "uri", "doc", "snapshot"], 12 "properties": { 13 - "uri": { "type": "string", "format": "at-uri" }, 14 - "cid": { "type": "string", "format": "cid" }, 15 "snapshot": { 16 "type": "blob", 17 "accept": ["*/*"],
··· 8 "key": "tid", 9 "record": { 10 "type": "object", 11 + "required": ["doc", "snapshot"], 12 "properties": { 13 "snapshot": { 14 "type": "blob", 15 "accept": ["*/*"],
lexicons/sh/weaver/embed/defs.json lexicons/embed/defs.json
lexicons/sh/weaver/embed/external.json lexicons/embed/external.json
lexicons/sh/weaver/embed/images.json lexicons/embed/images.json
-49
lexicons/sh/weaver/embed/recordWithMedia.json
··· 1 - { 2 - "lexicon": 1, 3 - "id": "sh.weaver.embed.recordWithMedia", 4 - "description": "A representation of a record embedded in a Weaver record (eg, a notebook entry), alongside other compatible embeds. For example, a quote post and image, or a quote post and external URL card.", 5 - "defs": { 6 - "main": { 7 - "type": "object", 8 - "required": ["record", "media"], 9 - "properties": { 10 - "record": { 11 - "type": "union", 12 - "refs": ["app.bsky.embed.record", "sh.weaver.embed.records"] 13 - }, 14 - "media": { 15 - "type": "union", 16 - "refs": [ 17 - "sh.weaver.embed.images", 18 - "sh.weaver.embed.external", 19 - "sh.weaver.embed.video", 20 - "app.bsky.embed.images", 21 - "app.bsky.embed.video", 22 - "app.bsky.embed.external" 23 - ] 24 - } 25 - } 26 - }, 27 - "view": { 28 - "type": "object", 29 - "required": ["record", "media"], 30 - "properties": { 31 - "record": { 32 - "type": "union", 33 - "refs": ["sh.weaver.embed.records#view", "app.bsky.embed.record#view"] 34 - }, 35 - "media": { 36 - "type": "union", 37 - "refs": [ 38 - "sh.weaver.embed.images#view", 39 - "sh.weaver.embed.external#view", 40 - "sh.weaver.embed.video#view", 41 - "app.bsky.embed.images#view", 42 - "app.bsky.embed.video#view", 43 - "app.bsky.embed.external#view" 44 - ] 45 - } 46 - } 47 - } 48 - } 49 - }
···
-5
lexicons/sh/weaver/embed/records.json lexicons/embed/records.json
··· 35 "recordView": { 36 "type": "union", 37 "refs": [ 38 - "app.bsky.embed.images#view", 39 - "app.bsky.embed.video#view", 40 - "app.bsky.embed.external#view", 41 - "app.bsky.embed.record#view", 42 - "app.bsky.embed.recordWithMedia#view", 43 "sh.weaver.embed.records#view", 44 "sh.weaver.embed.images#view", 45 "sh.weaver.embed.recordWithMedia#view",
··· 35 "recordView": { 36 "type": "union", 37 "refs": [ 38 "sh.weaver.embed.records#view", 39 "sh.weaver.embed.images#view", 40 "sh.weaver.embed.recordWithMedia#view",
lexicons/sh/weaver/embed/video.json lexicons/embed/video.json
lexicons/sh/weaver/notebook/authors.json lexicons/notebook/authors.json
lexicons/sh/weaver/notebook/book.json lexicons/notebook/book.json
lexicons/sh/weaver/notebook/chapter.json lexicons/notebook/chapter.json
lexicons/sh/weaver/notebook/defs.json lexicons/notebook/defs.json
lexicons/sh/weaver/notebook/entry.json lexicons/notebook/entry.json
lexicons/sh/weaver/notebook/page.json lexicons/notebook/page.json
+6 -1
lexicons/sh/weaver/publish/blob.json lexicons/publish/blob.json
··· 8 "key": "tid", 9 "record": { 10 "type": "object", 11 - "required": ["upload"], 12 "properties": { 13 "upload": { 14 "type": "blob", 15 "description": "Reference to the uploaded file",
··· 8 "key": "tid", 9 "record": { 10 "type": "object", 11 + "required": ["upload", "path"], 12 "properties": { 13 + "path": { 14 + "type": "string", 15 + "description": "relative path to the blob", 16 + "minLength": 1 17 + }, 18 "upload": { 19 "type": "blob", 20 "description": "Reference to the uploaded file",
lexicons/sh/weaver/publish/defs.json lexicons/publish/defs.json