moving stuff around, getting ready for atproto

Orual 41e905e3 3339277f

+751 -494
+292 -83
Cargo.lock
··· 9 9 checksum = "087113bd50d9adce24850eed5d0476c7d199d532fce8fab5173650331e09033a" 10 10 dependencies = [ 11 11 "abnf-core", 12 - "nom", 12 + "nom 7.1.3", 13 13 ] 14 14 15 15 [[package]] ··· 18 18 source = "registry+https://github.com/rust-lang/crates.io-index" 19 19 checksum = "c44e09c43ae1c368fb91a03a566472d0087c26cf7e1b9e8e289c14ede681dd7d" 20 20 dependencies = [ 21 - "nom", 21 + "nom 7.1.3", 22 22 ] 23 23 24 24 [[package]] ··· 48 48 source = "registry+https://github.com/rust-lang/crates.io-index" 49 49 checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" 50 50 dependencies = [ 51 - "memchr", 51 + "memchr 2.7.6", 52 52 ] 53 53 54 54 [[package]] ··· 85 85 checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 86 86 dependencies = [ 87 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", 88 97 ] 89 98 90 99 [[package]] ··· 191 200 checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" 192 201 193 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]] 194 214 name = "autocfg" 195 215 version = "1.5.0" 196 216 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 213 233 "hyper-util", 214 234 "itoa", 215 235 "matchit", 216 - "memchr", 236 + "memchr 2.7.6", 217 237 "mime", 218 238 "percent-encoding", 219 239 "pin-project-lite", ··· 255 275 checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" 256 276 dependencies = [ 257 277 "addr2line", 258 - "cfg-if", 278 + "cfg-if 1.0.4", 259 279 "libc", 260 280 "miniz_oxide", 261 281 "object", ··· 424 444 source = "registry+https://github.com/rust-lang/crates.io-index" 425 445 checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab" 426 446 dependencies = [ 427 - "memchr", 447 + "memchr 2.7.6", 428 448 "serde", 429 449 ] 430 450 ··· 458 478 source = "registry+https://github.com/rust-lang/crates.io-index" 459 479 checksum = "b953a6887648bb07a535631f2bc00fbdb2a2216f135552cb3f534ed136b9c07f" 460 480 dependencies = [ 461 - "memchr", 481 + "memchr 2.7.6", 462 482 "safemem", 463 483 ] 464 484 ··· 521 541 522 542 [[package]] 523 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" 524 550 version = "1.0.4" 525 551 source = "registry+https://github.com/rust-lang/crates.io-index" 526 552 checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" ··· 594 620 595 621 [[package]] 596 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" 597 638 version = "4.5.51" 598 639 source = "registry+https://github.com/rust-lang/crates.io-index" 599 640 checksum = "4c26d721170e0295f191a69bd9a1f93efcdb0aff38684b61ab5750468972e5f5" ··· 611 652 "anstream", 612 653 "anstyle", 613 654 "clap_lex", 614 - "strsim", 655 + "strsim 0.11.1", 615 656 "unicase", 616 657 "unicode-width 0.2.2", 617 658 ] ··· 635 676 checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" 636 677 637 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]] 638 688 name = "colorchoice" 639 689 version = "1.0.4" 640 690 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 647 697 checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" 648 698 dependencies = [ 649 699 "bytes", 650 - "memchr", 700 + "memchr 2.7.6", 651 701 ] 652 702 653 703 [[package]] ··· 668 718 dependencies = [ 669 719 "compression-core", 670 720 "flate2", 671 - "memchr", 721 + "memchr 2.7.6", 672 722 ] 673 723 674 724 [[package]] ··· 763 813 source = "registry+https://github.com/rust-lang/crates.io-index" 764 814 checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" 765 815 dependencies = [ 766 - "memchr", 816 + "memchr 2.7.6", 767 817 ] 768 818 769 819 [[package]] ··· 781 831 source = "registry+https://github.com/rust-lang/crates.io-index" 782 832 checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" 783 833 dependencies = [ 784 - "cfg-if", 834 + "cfg-if 1.0.4", 785 835 ] 786 836 787 837 [[package]] ··· 852 902 source = "registry+https://github.com/rust-lang/crates.io-index" 853 903 checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" 854 904 dependencies = [ 855 - "cfg-if", 905 + "cfg-if 1.0.4", 856 906 "cpufeatures", 857 907 "curve25519-dalek-derive", 858 908 "digest", ··· 903 953 "ident_case", 904 954 "proc-macro2", 905 955 "quote", 906 - "strsim", 956 + "strsim 0.11.1", 907 957 "syn 2.0.108", 908 958 ] 909 959 ··· 917 967 "ident_case", 918 968 "proc-macro2", 919 969 "quote", 920 - "strsim", 970 + "strsim 0.11.1", 921 971 "syn 2.0.108", 922 972 ] 923 973 ··· 949 999 source = "registry+https://github.com/rust-lang/crates.io-index" 950 1000 checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" 951 1001 dependencies = [ 952 - "cfg-if", 1002 + "cfg-if 1.0.4", 953 1003 "crossbeam-utils", 954 1004 "hashbrown 0.14.5", 955 - "lock_api", 1005 + "lock_api 0.4.14", 956 1006 "once_cell", 957 - "parking_lot_core", 1007 + "parking_lot_core 0.9.12", 958 1008 ] 959 1009 960 1010 [[package]] ··· 1293 1343 source = "registry+https://github.com/rust-lang/crates.io-index" 1294 1344 checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" 1295 1345 dependencies = [ 1296 - "cfg-if", 1346 + "cfg-if 1.0.4", 1297 1347 ] 1298 1348 1299 1349 [[package]] ··· 1390 1440 source = "registry+https://github.com/rust-lang/crates.io-index" 1391 1441 checksum = "bc0505cd1b6fa6580283f6bdf70a73fcf4aba1184038c90902b92b3dd0df63ed" 1392 1442 dependencies = [ 1393 - "cfg-if", 1443 + "cfg-if 1.0.4", 1394 1444 "libc", 1395 1445 "libredox", 1396 1446 "windows-sys 0.60.2", ··· 1403 1453 checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" 1404 1454 1405 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]] 1406 1462 name = "flate2" 1407 1463 version = "1.1.5" 1408 1464 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1586 1642 "futures-macro", 1587 1643 "futures-sink", 1588 1644 "futures-task", 1589 - "memchr", 1645 + "memchr 2.7.6", 1590 1646 "pin-project-lite", 1591 1647 "pin-utils", 1592 1648 "slab", ··· 1599 1655 checksum = "605183a538e3e2a9c1038635cc5c2d194e2ee8fd0d1b66b8349fad7dbacce5a2" 1600 1656 dependencies = [ 1601 1657 "cc", 1602 - "cfg-if", 1658 + "cfg-if 1.0.4", 1603 1659 "libc", 1604 1660 "log", 1605 1661 "rustversion", ··· 1633 1689 source = "registry+https://github.com/rust-lang/crates.io-index" 1634 1690 checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" 1635 1691 dependencies = [ 1636 - "cfg-if", 1692 + "cfg-if 1.0.4", 1637 1693 "js-sys", 1638 1694 "libc", 1639 1695 "wasi", ··· 1646 1702 source = "registry+https://github.com/rust-lang/crates.io-index" 1647 1703 checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" 1648 1704 dependencies = [ 1649 - "cfg-if", 1705 + "cfg-if 1.0.4", 1650 1706 "js-sys", 1651 1707 "libc", 1652 1708 "r-efi", ··· 1724 1780 source = "registry+https://github.com/rust-lang/crates.io-index" 1725 1781 checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" 1726 1782 dependencies = [ 1727 - "cfg-if", 1783 + "cfg-if 1.0.4", 1728 1784 "crunchy", 1729 1785 "zerocopy", 1730 1786 ] ··· 1782 1838 1783 1839 [[package]] 1784 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" 1785 1850 version = "0.5.2" 1786 1851 source = "registry+https://github.com/rust-lang/crates.io-index" 1787 1852 checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" ··· 1805 1870 checksum = "92652067c9ce6f66ce53cc38d1169daa36e6e7eb7dd3b63b5103bd9d97117248" 1806 1871 dependencies = [ 1807 1872 "async-trait", 1808 - "cfg-if", 1873 + "cfg-if 1.0.4", 1809 1874 "data-encoding", 1810 1875 "enum-as-inner", 1811 1876 "futures-channel", ··· 1828 1893 source = "registry+https://github.com/rust-lang/crates.io-index" 1829 1894 checksum = "cbb117a1ca520e111743ab2f6688eddee69db4e0ea242545a604dce8a66fd22e" 1830 1895 dependencies = [ 1831 - "cfg-if", 1896 + "cfg-if 1.0.4", 1832 1897 "futures-util", 1833 1898 "hickory-proto", 1834 1899 "ipconfig", 1835 1900 "lru-cache", 1836 1901 "once_cell", 1837 - "parking_lot", 1902 + "parking_lot 0.12.5", 1838 1903 "rand 0.8.5", 1839 1904 "resolv-conf", 1840 1905 "smallvec", ··· 2150 2215 "crossbeam-deque", 2151 2216 "globset", 2152 2217 "log", 2153 - "memchr", 2218 + "memchr 2.7.6", 2154 2219 "regex-automata", 2155 2220 "same-file", 2156 2221 "walkdir", ··· 2265 2330 source = "registry+https://github.com/rust-lang/crates.io-index" 2266 2331 checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" 2267 2332 dependencies = [ 2268 - "memchr", 2333 + "memchr 2.7.6", 2269 2334 "serde", 2270 2335 ] 2271 2336 ··· 2290 2355 [[package]] 2291 2356 name = "jacquard" 2292 2357 version = "0.8.0" 2293 - source = "git+https://tangled.org/@nonbinary.computer/jacquard#ece153be8332f8f222163257b910ba03d50951c8" 2358 + source = "git+https://tangled.org/@nonbinary.computer/jacquard#10d719d2a2c459ab562b2be6fecdfe11f52b521c" 2294 2359 dependencies = [ 2295 2360 "bytes", 2296 2361 "getrandom 0.2.16", ··· 2319 2384 [[package]] 2320 2385 name = "jacquard-api" 2321 2386 version = "0.8.0" 2322 - source = "git+https://tangled.org/@nonbinary.computer/jacquard#ece153be8332f8f222163257b910ba03d50951c8" 2387 + source = "git+https://tangled.org/@nonbinary.computer/jacquard#10d719d2a2c459ab562b2be6fecdfe11f52b521c" 2323 2388 dependencies = [ 2324 2389 "bon", 2325 2390 "bytes", ··· 2337 2402 [[package]] 2338 2403 name = "jacquard-axum" 2339 2404 version = "0.8.0" 2340 - source = "git+https://tangled.org/@nonbinary.computer/jacquard#ece153be8332f8f222163257b910ba03d50951c8" 2405 + source = "git+https://tangled.org/@nonbinary.computer/jacquard#10d719d2a2c459ab562b2be6fecdfe11f52b521c" 2341 2406 dependencies = [ 2342 2407 "axum", 2343 2408 "bytes", ··· 2359 2424 [[package]] 2360 2425 name = "jacquard-common" 2361 2426 version = "0.8.0" 2362 - source = "git+https://tangled.org/@nonbinary.computer/jacquard#ece153be8332f8f222163257b910ba03d50951c8" 2427 + source = "git+https://tangled.org/@nonbinary.computer/jacquard#10d719d2a2c459ab562b2be6fecdfe11f52b521c" 2363 2428 dependencies = [ 2364 2429 "base64 0.22.1", 2365 2430 "bon", ··· 2402 2467 [[package]] 2403 2468 name = "jacquard-derive" 2404 2469 version = "0.8.0" 2405 - source = "git+https://tangled.org/@nonbinary.computer/jacquard#ece153be8332f8f222163257b910ba03d50951c8" 2470 + source = "git+https://tangled.org/@nonbinary.computer/jacquard#10d719d2a2c459ab562b2be6fecdfe11f52b521c" 2406 2471 dependencies = [ 2407 2472 "heck 0.5.0", 2408 2473 "jacquard-lexicon", ··· 2414 2479 [[package]] 2415 2480 name = "jacquard-identity" 2416 2481 version = "0.8.0" 2417 - source = "git+https://tangled.org/@nonbinary.computer/jacquard#ece153be8332f8f222163257b910ba03d50951c8" 2482 + source = "git+https://tangled.org/@nonbinary.computer/jacquard#10d719d2a2c459ab562b2be6fecdfe11f52b521c" 2418 2483 dependencies = [ 2419 2484 "bon", 2420 2485 "bytes", ··· 2441 2506 [[package]] 2442 2507 name = "jacquard-lexicon" 2443 2508 version = "0.8.0" 2444 - source = "git+https://tangled.org/@nonbinary.computer/jacquard#ece153be8332f8f222163257b910ba03d50951c8" 2509 + source = "git+https://tangled.org/@nonbinary.computer/jacquard#10d719d2a2c459ab562b2be6fecdfe11f52b521c" 2445 2510 dependencies = [ 2446 2511 "cid", 2447 2512 "dashmap", ··· 2467 2532 [[package]] 2468 2533 name = "jacquard-oauth" 2469 2534 version = "0.8.0" 2470 - source = "git+https://tangled.org/@nonbinary.computer/jacquard#ece153be8332f8f222163257b910ba03d50951c8" 2535 + source = "git+https://tangled.org/@nonbinary.computer/jacquard#10d719d2a2c459ab562b2be6fecdfe11f52b521c" 2471 2536 dependencies = [ 2472 2537 "base64 0.22.1", 2473 2538 "bytes", ··· 2504 2569 checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" 2505 2570 dependencies = [ 2506 2571 "cesu8", 2507 - "cfg-if", 2572 + "cfg-if 1.0.4", 2508 2573 "combine", 2509 2574 "jni-sys", 2510 2575 "log", ··· 2536 2601 checksum = "de791f8b277ef903d49b0c6f3f3b866569ae8cb1d0829825eea28374cc4c803c" 2537 2602 dependencies = [ 2538 2603 "base64ct", 2539 - "cfg-if", 2604 + "cfg-if 1.0.4", 2540 2605 "digest", 2541 2606 "ecdsa", 2542 2607 "ed25519-dalek", ··· 2614 2679 source = "registry+https://github.com/rust-lang/crates.io-index" 2615 2680 checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" 2616 2681 dependencies = [ 2617 - "cfg-if", 2682 + "cfg-if 1.0.4", 2618 2683 "ecdsa", 2619 2684 "elliptic-curve", 2620 2685 "sha2", ··· 2627 2692 checksum = "e03e2e96c5926fe761088d66c8c2aee3a4352a2573f4eaca50043ad130af9117" 2628 2693 dependencies = [ 2629 2694 "miette 5.10.0", 2630 - "nom", 2695 + "nom 7.1.3", 2631 2696 "thiserror 1.0.69", 2632 2697 ] 2633 2698 ··· 2691 2756 dependencies = [ 2692 2757 "bitflags 2.10.0", 2693 2758 "libc", 2694 - "redox_syscall", 2759 + "redox_syscall 0.5.18", 2695 2760 ] 2696 2761 2697 2762 [[package]] ··· 2724 2789 2725 2790 [[package]] 2726 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" 2727 2801 version = "0.4.14" 2728 2802 source = "registry+https://github.com/rust-lang/crates.io-index" 2729 2803 checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" ··· 2743 2817 source = "registry+https://github.com/rust-lang/crates.io-index" 2744 2818 checksum = "419e0dc8046cb947daa77eb95ae174acfbddb7673b4151f56d1eed8e93fbfaca" 2745 2819 dependencies = [ 2746 - "cfg-if", 2820 + "cfg-if 1.0.4", 2747 2821 "generator", 2748 2822 "scoped-tls", 2749 2823 "tracing", ··· 2788 2862 "bitflags 2.10.0", 2789 2863 "getopts", 2790 2864 "markdown-weaver-escape", 2791 - "memchr", 2865 + "memchr 2.7.6", 2792 2866 "serde", 2793 2867 "unicase", 2794 2868 ] ··· 2856 2930 source = "registry+https://github.com/rust-lang/crates.io-index" 2857 2931 checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" 2858 2932 dependencies = [ 2859 - "cfg-if", 2933 + "cfg-if 1.0.4", 2860 2934 "digest", 2861 2935 ] 2862 2936 ··· 2867 2941 checksum = "33746aadcb41349ec291e7f2f0a3aa6834d1d7c58066fb4b01f68efc4c4b7631" 2868 2942 dependencies = [ 2869 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", 2870 2953 ] 2871 2954 2872 2955 [[package]] ··· 2895 2978 dependencies = [ 2896 2979 "backtrace", 2897 2980 "backtrace-ext", 2898 - "cfg-if", 2981 + "cfg-if 1.0.4", 2899 2982 "miette-derive 7.6.0", 2900 2983 "owo-colors", 2901 2984 "supports-color", ··· 2903 2986 "supports-unicode", 2904 2987 "syntect", 2905 2988 "terminal_size", 2906 - "textwrap", 2989 + "textwrap 0.16.2", 2907 2990 "unicode-width 0.1.14", 2908 2991 ] 2909 2992 ··· 3026 3109 "equivalent", 3027 3110 "event-listener", 3028 3111 "futures-util", 3029 - "parking_lot", 3112 + "parking_lot 0.12.5", 3030 3113 "portable-atomic", 3031 3114 "rustc_version", 3032 3115 "smallvec", ··· 3127 3210 3128 3211 [[package]] 3129 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" 3130 3222 version = "7.1.3" 3131 3223 source = "registry+https://github.com/rust-lang/crates.io-index" 3132 3224 checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" 3133 3225 dependencies = [ 3134 - "memchr", 3226 + "memchr 2.7.6", 3135 3227 "minimal-lexical", 3136 3228 ] 3137 3229 ··· 3227 3319 source = "registry+https://github.com/rust-lang/crates.io-index" 3228 3320 checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" 3229 3321 dependencies = [ 3230 - "hermit-abi", 3322 + "hermit-abi 0.5.2", 3231 3323 "libc", 3232 3324 ] 3233 3325 ··· 3255 3347 source = "registry+https://github.com/rust-lang/crates.io-index" 3256 3348 checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" 3257 3349 dependencies = [ 3258 - "memchr", 3350 + "memchr 2.7.6", 3259 3351 ] 3260 3352 3261 3353 [[package]] ··· 3299 3391 checksum = "24ad14dd45412269e1a30f52ad8f0664f0f4f4a89ee8fe28c3b3527021ebb654" 3300 3392 dependencies = [ 3301 3393 "bitflags 2.10.0", 3302 - "cfg-if", 3394 + "cfg-if 1.0.4", 3303 3395 "foreign-types", 3304 3396 "libc", 3305 3397 "once_cell", ··· 3413 3505 3414 3506 [[package]] 3415 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" 3416 3518 version = "0.12.5" 3417 3519 source = "registry+https://github.com/rust-lang/crates.io-index" 3418 3520 checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" 3419 3521 dependencies = [ 3420 - "lock_api", 3421 - "parking_lot_core", 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", 3422 3538 ] 3423 3539 3424 3540 [[package]] ··· 3427 3543 source = "registry+https://github.com/rust-lang/crates.io-index" 3428 3544 checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" 3429 3545 dependencies = [ 3430 - "cfg-if", 3546 + "cfg-if 1.0.4", 3431 3547 "libc", 3432 - "redox_syscall", 3548 + "redox_syscall 0.5.18", 3433 3549 "smallvec", 3434 3550 "windows-link 0.2.1", 3435 3551 ] ··· 3456 3572 checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" 3457 3573 3458 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]] 3459 3585 name = "phf" 3460 3586 version = "0.11.3" 3461 3587 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3602 3728 "fallible-iterator", 3603 3729 "hmac", 3604 3730 "md-5", 3605 - "memchr", 3731 + "memchr 2.7.6", 3606 3732 "rand 0.9.2", 3607 3733 "sha2", 3608 3734 "stringprep", ··· 3737 3863 source = "registry+https://github.com/rust-lang/crates.io-index" 3738 3864 checksum = "42a232e7487fc2ef313d96dde7948e7a3c05101870d8985e4fd8d26aedd27b89" 3739 3865 dependencies = [ 3740 - "memchr", 3866 + "memchr 2.7.6", 3741 3867 ] 3742 3868 3743 3869 [[package]] ··· 3883 4009 3884 4010 [[package]] 3885 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" 3886 4018 version = "0.5.18" 3887 4019 source = "registry+https://github.com/rust-lang/crates.io-index" 3888 4020 checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" ··· 3928 4060 checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" 3929 4061 dependencies = [ 3930 4062 "aho-corasick", 3931 - "memchr", 4063 + "memchr 2.7.6", 3932 4064 "regex-automata", 3933 4065 "regex-syntax", 3934 4066 ] ··· 3940 4072 checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" 3941 4073 dependencies = [ 3942 4074 "aho-corasick", 3943 - "memchr", 4075 + "memchr 2.7.6", 3944 4076 "regex-syntax", 3945 4077 ] 3946 4078 ··· 4021 4153 checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" 4022 4154 dependencies = [ 4023 4155 "cc", 4024 - "cfg-if", 4156 + "cfg-if 1.0.4", 4025 4157 "getrandom 0.2.16", 4026 4158 "libc", 4027 4159 "untrusted", ··· 4229 4361 checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" 4230 4362 4231 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]] 4232 4370 name = "scopeguard" 4233 4371 version = "1.2.0" 4234 4372 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 4400 4538 dependencies = [ 4401 4539 "indexmap 2.12.0", 4402 4540 "itoa", 4403 - "memchr", 4541 + "memchr 2.7.6", 4404 4542 "ryu", 4405 4543 "serde", 4406 4544 "serde_core", ··· 4505 4643 source = "registry+https://github.com/rust-lang/crates.io-index" 4506 4644 checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" 4507 4645 dependencies = [ 4508 - "cfg-if", 4646 + "cfg-if 1.0.4", 4509 4647 "cpufeatures", 4510 4648 "digest", 4511 4649 ] ··· 4522 4660 source = "registry+https://github.com/rust-lang/crates.io-index" 4523 4661 checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" 4524 4662 dependencies = [ 4525 - "cfg-if", 4663 + "cfg-if 1.0.4", 4526 4664 "cpufeatures", 4527 4665 "digest", 4528 4666 ] ··· 4682 4820 checksum = "bf776ba3fa74f83bf4b63c3dcbbf82173db2632ed8452cb2d891d33f459de70f" 4683 4821 dependencies = [ 4684 4822 "new_debug_unreachable", 4685 - "parking_lot", 4823 + "parking_lot 0.12.5", 4686 4824 "phf_shared 0.11.3", 4687 4825 "precomputed-hash", 4688 4826 "serde", ··· 4713 4851 4714 4852 [[package]] 4715 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" 4716 4860 version = "0.11.1" 4717 4861 source = "registry+https://github.com/rust-lang/crates.io-index" 4718 4862 checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" ··· 4830 4974 ] 4831 4975 4832 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]] 4833 4986 name = "tagptr" 4834 4987 version = "0.2.0" 4835 4988 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 4867 5020 dependencies = [ 4868 5021 "rustix", 4869 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", 4870 5032 ] 4871 5033 4872 5034 [[package]] ··· 4925 5087 source = "registry+https://github.com/rust-lang/crates.io-index" 4926 5088 checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" 4927 5089 dependencies = [ 4928 - "cfg-if", 5090 + "cfg-if 1.0.4", 4929 5091 ] 4930 5092 4931 5093 [[package]] ··· 5016 5178 "bytes", 5017 5179 "libc", 5018 5180 "mio", 5019 - "parking_lot", 5181 + "parking_lot 0.12.5", 5020 5182 "pin-project-lite", 5021 5183 "signal-hook-registry", 5022 5184 "socket2 0.6.1", ··· 5058 5220 "futures-channel", 5059 5221 "futures-util", 5060 5222 "log", 5061 - "parking_lot", 5223 + "parking_lot 0.12.5", 5062 5224 "percent-encoding", 5063 5225 "phf 0.13.1", 5064 5226 "pin-project-lite", ··· 5237 5399 "cookie", 5238 5400 "futures-util", 5239 5401 "http", 5240 - "parking_lot", 5402 + "parking_lot 0.12.5", 5241 5403 "pin-project-lite", 5242 5404 "tower-layer", 5243 5405 "tower-service", ··· 5303 5465 checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" 5304 5466 dependencies = [ 5305 5467 "crossbeam-channel", 5306 - "parking_lot", 5468 + "parking_lot 0.12.5", 5307 5469 "thiserror 1.0.69", 5308 5470 "time", 5309 5471 "tracing-subscriber", ··· 5384 5546 ] 5385 5547 5386 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]] 5387 5567 name = "try-lock" 5388 5568 version = "0.2.5" 5389 5569 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 5415 5595 source = "registry+https://github.com/rust-lang/crates.io-index" 5416 5596 checksum = "59b11b2b5241ba34be09c3cc85a36e56e48f9888862e19cedf23336d35316ed1" 5417 5597 dependencies = [ 5418 - "memchr", 5598 + "memchr 2.7.6", 5419 5599 ] 5420 5600 5421 5601 [[package]] ··· 5560 5740 checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 5561 5741 5562 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]] 5563 5749 name = "version_check" 5564 5750 version = "0.9.5" 5565 5751 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 5611 5797 source = "registry+https://github.com/rust-lang/crates.io-index" 5612 5798 checksum = "da95793dfc411fbbd93f5be7715b0578ec61fe87cb1a42b12eb625caa5c5ea60" 5613 5799 dependencies = [ 5614 - "cfg-if", 5800 + "cfg-if 1.0.4", 5615 5801 "once_cell", 5616 5802 "rustversion", 5617 5803 "wasm-bindgen-macro", ··· 5624 5810 source = "registry+https://github.com/rust-lang/crates.io-index" 5625 5811 checksum = "551f88106c6d5e7ccc7cd9a16f312dd3b5d36ea8b4954304657d5dfba115d4a0" 5626 5812 dependencies = [ 5627 - "cfg-if", 5813 + "cfg-if 1.0.4", 5628 5814 "js-sys", 5629 5815 "once_cell", 5630 5816 "wasm-bindgen", ··· 5678 5864 5679 5865 [[package]] 5680 5866 name = "weaver-api" 5681 - version = "0.8.0" 5867 + version = "0.1.0" 5682 5868 dependencies = [ 5683 5869 "bytes", 5684 5870 "jacquard-common", ··· 5698 5884 dependencies = [ 5699 5885 "axum", 5700 5886 "chrono", 5701 - "clap", 5887 + "clap 4.5.51", 5702 5888 "dashmap", 5703 5889 "diesel", 5704 5890 "diesel-async", ··· 5735 5921 name = "weaver-cli" 5736 5922 version = "0.1.0" 5737 5923 dependencies = [ 5738 - "clap", 5924 + "clap 4.5.51", 5739 5925 "dirs", 5740 5926 "jacquard", 5741 5927 "jacquard-api", ··· 5755 5941 "hickory-resolver", 5756 5942 "http", 5757 5943 "jacquard", 5758 - "jacquard-api", 5759 5944 "jose-jwk", 5760 5945 "markdown-weaver", 5761 5946 "markdown-weaver-escape", ··· 5779 5964 "tower-service", 5780 5965 "tracing", 5781 5966 "trait-variant", 5967 + "tree_magic", 5968 + "weaver-api", 5782 5969 "weaver-workspace-hack", 5783 5970 ] 5784 5971 ··· 5820 6007 version = "0.1.0" 5821 6008 dependencies = [ 5822 6009 "axum", 5823 - "clap", 6010 + "clap 4.5.51", 5824 6011 "jacquard", 5825 6012 "jacquard-axum", 5826 6013 "notify", ··· 5855 6042 "jacquard-lexicon", 5856 6043 "jacquard-oauth", 5857 6044 "log", 5858 - "memchr", 6045 + "memchr 2.7.6", 5859 6046 "miette 7.6.0", 5860 6047 "minijinja", 5861 6048 "minimal-lexical", 5862 - "nom", 6049 + "nom 7.1.3", 5863 6050 "num-traits", 5864 6051 "p384", 5865 6052 "percent-encoding", ··· 5962 6149 checksum = "72069c3113ab32ab29e5584db3c6ec55d416895e60715417b5b883a357c3e471" 5963 6150 5964 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]] 5965 6168 name = "winapi-util" 5966 6169 version = "0.1.11" 5967 6170 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 5969 6172 dependencies = [ 5970 6173 "windows-sys 0.61.2", 5971 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" 5972 6181 5973 6182 [[package]] 5974 6183 name = "windows" ··· 6432 6641 source = "registry+https://github.com/rust-lang/crates.io-index" 6433 6642 checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" 6434 6643 dependencies = [ 6435 - "memchr", 6644 + "memchr 2.7.6", 6436 6645 ] 6437 6646 6438 6647 [[package]] ··· 6441 6650 source = "registry+https://github.com/rust-lang/crates.io-index" 6442 6651 checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" 6443 6652 dependencies = [ 6444 - "cfg-if", 6653 + "cfg-if 1.0.4", 6445 6654 "windows-sys 0.48.0", 6446 6655 ] 6447 6656
+1
Cargo.toml
··· 42 42 jacquard = { git = "https://tangled.org/@nonbinary.computer/jacquard", default-features = false, features = ["derive", "api_bluesky", "dns"] } 43 43 jacquard-api = { git = "https://tangled.org/@nonbinary.computer/jacquard" } 44 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 2 name = "weaver-api" 3 3 description = "Generated AT Protocol API bindings for Weaver" 4 4 edition.workspace = true 5 - version = "0.8.0" 5 + version = "0.1.0" 6 6 authors.workspace = true 7 7 8 8 [dependencies]
-10
crates/weaver-api/lexicons/sh_weaver_edit_root.json
··· 9 9 "record": { 10 10 "type": "object", 11 11 "required": [ 12 - "cid", 13 - "uri", 14 12 "doc", 15 13 "snapshot" 16 14 ], 17 15 "properties": { 18 - "cid": { 19 - "type": "string", 20 - "format": "cid" 21 - }, 22 16 "doc": { 23 17 "type": "ref", 24 18 "ref": "sh.weaver.edit.defs#docRef" ··· 29 23 "*/*" 30 24 ], 31 25 "maxSize": 30000000 32 - }, 33 - "uri": { 34 - "type": "string", 35 - "format": "at-uri" 36 26 } 37 27 } 38 28 }
+9 -21
crates/weaver-api/lexicons/sh_weaver_embed_recordWithMedia.json
··· 6 6 "main": { 7 7 "type": "object", 8 8 "required": [ 9 - "record", 9 + "records", 10 10 "media" 11 11 ], 12 12 "properties": { ··· 15 15 "refs": [ 16 16 "sh.weaver.embed.images", 17 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" 18 + "sh.weaver.embed.video" 22 19 ] 23 20 }, 24 - "record": { 25 - "type": "union", 26 - "refs": [ 27 - "app.bsky.embed.record", 28 - "sh.weaver.embed.records" 29 - ] 21 + "records": { 22 + "type": "ref", 23 + "ref": "sh.weaver.embed.records" 30 24 } 31 25 } 32 26 }, ··· 42 36 "refs": [ 43 37 "sh.weaver.embed.images#view", 44 38 "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" 39 + "sh.weaver.embed.video#view" 49 40 ] 50 41 }, 51 - "record": { 52 - "type": "union", 53 - "refs": [ 54 - "sh.weaver.embed.records#view", 55 - "app.bsky.embed.record#view" 56 - ] 42 + "records": { 43 + "type": "ref", 44 + "ref": "sh.weaver.embed.records#view" 57 45 } 58 46 } 59 47 }
-5
crates/weaver-api/lexicons/sh_weaver_embed_records.json
··· 48 48 "recordView": { 49 49 "type": "union", 50 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 51 "sh.weaver.embed.records#view", 57 52 "sh.weaver.embed.images#view", 58 53 "sh.weaver.embed.recordWithMedia#view",
+7 -1
crates/weaver-api/lexicons/sh_weaver_publish_blob.json
··· 9 9 "record": { 10 10 "type": "object", 11 11 "required": [ 12 - "upload" 12 + "upload", 13 + "path" 13 14 ], 14 15 "properties": { 16 + "path": { 17 + "type": "string", 18 + "description": "relative path to the blob", 19 + "minLength": 1 20 + }, 15 21 "upload": { 16 22 "type": "blob", 17 23 "description": "Reference to the uploaded file",
+7 -123
crates/weaver-api/src/sh_weaver/edit/root.rs
··· 19 19 #[serde(rename_all = "camelCase")] 20 20 pub struct Root<'a> { 21 21 #[serde(borrow)] 22 - pub cid: jacquard_common::types::string::Cid<'a>, 23 - #[serde(borrow)] 24 22 pub doc: crate::sh_weaver::edit::DocRef<'a>, 25 23 #[serde(borrow)] 26 24 pub snapshot: jacquard_common::types::blob::BlobRef<'a>, 27 - #[serde(borrow)] 28 - pub uri: jacquard_common::types::string::AtUri<'a>, 29 25 } 30 26 31 27 pub mod root_state { ··· 38 34 } 39 35 /// State trait tracking which required fields have been set 40 36 pub trait State: sealed::Sealed { 41 - type Cid; 42 - type Uri; 43 37 type Doc; 44 38 type Snapshot; 45 39 } ··· 47 41 pub struct Empty(()); 48 42 impl sealed::Sealed for Empty {} 49 43 impl State for Empty { 50 - type Cid = Unset; 51 - type Uri = Unset; 52 44 type Doc = Unset; 53 45 type Snapshot = Unset; 54 46 } 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 47 ///State transition - sets the `doc` field to Set 74 48 pub struct SetDoc<S: State = Empty>(PhantomData<fn() -> S>); 75 49 impl<S: State> sealed::Sealed for SetDoc<S> {} 76 50 impl<S: State> State for SetDoc<S> { 77 - type Cid = S::Cid; 78 - type Uri = S::Uri; 79 51 type Doc = Set<members::doc>; 80 52 type Snapshot = S::Snapshot; 81 53 } ··· 83 55 pub struct SetSnapshot<S: State = Empty>(PhantomData<fn() -> S>); 84 56 impl<S: State> sealed::Sealed for SetSnapshot<S> {} 85 57 impl<S: State> State for SetSnapshot<S> { 86 - type Cid = S::Cid; 87 - type Uri = S::Uri; 88 58 type Doc = S::Doc; 89 59 type Snapshot = Set<members::snapshot>; 90 60 } 91 61 /// Marker types for field names 92 62 #[allow(non_camel_case_types)] 93 63 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 64 ///Marker type for the `doc` field 99 65 pub struct doc(()); 100 66 ///Marker type for the `snapshot` field ··· 106 72 pub struct RootBuilder<'a, S: root_state::State> { 107 73 _phantom_state: ::core::marker::PhantomData<fn() -> S>, 108 74 __unsafe_private_named: ( 109 - ::core::option::Option<jacquard_common::types::string::Cid<'a>>, 110 75 ::core::option::Option<crate::sh_weaver::edit::DocRef<'a>>, 111 76 ::core::option::Option<jacquard_common::types::blob::BlobRef<'a>>, 112 - ::core::option::Option<jacquard_common::types::string::AtUri<'a>>, 113 77 ), 114 78 _phantom: ::core::marker::PhantomData<&'a ()>, 115 79 } ··· 126 90 pub fn new() -> Self { 127 91 RootBuilder { 128 92 _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, 93 + __unsafe_private_named: (None, None), 149 94 _phantom: ::core::marker::PhantomData, 150 95 } 151 96 } ··· 161 106 mut self, 162 107 value: impl Into<crate::sh_weaver::edit::DocRef<'a>>, 163 108 ) -> RootBuilder<'a, root_state::SetDoc<S>> { 164 - self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); 109 + self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); 165 110 RootBuilder { 166 111 _phantom_state: ::core::marker::PhantomData, 167 112 __unsafe_private_named: self.__unsafe_private_named, ··· 180 125 mut self, 181 126 value: impl Into<jacquard_common::types::blob::BlobRef<'a>>, 182 127 ) -> 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()); 128 + self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); 203 129 RootBuilder { 204 130 _phantom_state: ::core::marker::PhantomData, 205 131 __unsafe_private_named: self.__unsafe_private_named, ··· 211 137 impl<'a, S> RootBuilder<'a, S> 212 138 where 213 139 S: root_state::State, 214 - S::Cid: root_state::IsSet, 215 - S::Uri: root_state::IsSet, 216 140 S::Doc: root_state::IsSet, 217 141 S::Snapshot: root_state::IsSet, 218 142 { 219 143 /// Build the final struct 220 144 pub fn build(self) -> Root<'a> { 221 145 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(), 146 + doc: self.__unsafe_private_named.0.unwrap(), 147 + snapshot: self.__unsafe_private_named.1.unwrap(), 226 148 extra_data: Default::default(), 227 149 } 228 150 } ··· 235 157 >, 236 158 ) -> Root<'a> { 237 159 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(), 160 + doc: self.__unsafe_private_named.0.unwrap(), 161 + snapshot: self.__unsafe_private_named.1.unwrap(), 242 162 extra_data: Some(extra_data), 243 163 } 244 164 } ··· 345 265 description: None, 346 266 required: Some( 347 267 vec![ 348 - ::jacquard_common::smol_str::SmolStr::new_static("cid"), 349 - ::jacquard_common::smol_str::SmolStr::new_static("uri"), 350 268 ::jacquard_common::smol_str::SmolStr::new_static("doc"), 351 269 ::jacquard_common::smol_str::SmolStr::new_static("snapshot") 352 270 ], ··· 356 274 #[allow(unused_mut)] 357 275 let mut map = ::std::collections::BTreeMap::new(); 358 276 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 277 ::jacquard_common::smol_str::SmolStr::new_static("doc"), 377 278 ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { 378 279 description: None, ··· 389 290 description: None, 390 291 accept: None, 391 292 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 293 }), 410 294 ); 411 295 map
+53 -112
crates/weaver-api/src/sh_weaver/embed/record_with_media.rs
··· 20 20 #[serde(borrow)] 21 21 pub media: RecordWithMediaMedia<'a>, 22 22 #[serde(borrow)] 23 - pub record: RecordWithMediaRecord<'a>, 23 + pub records: crate::sh_weaver::embed::records::Records<'a>, 24 24 } 25 25 26 26 pub mod record_with_media_state { ··· 33 33 } 34 34 /// State trait tracking which required fields have been set 35 35 pub trait State: sealed::Sealed { 36 - type Record; 36 + type Records; 37 37 type Media; 38 38 } 39 39 /// Empty state - all required fields are unset 40 40 pub struct Empty(()); 41 41 impl sealed::Sealed for Empty {} 42 42 impl State for Empty { 43 - type Record = Unset; 43 + type Records = Unset; 44 44 type Media = Unset; 45 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>; 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 51 type Media = S::Media; 52 52 } 53 53 ///State transition - sets the `media` field to Set 54 54 pub struct SetMedia<S: State = Empty>(PhantomData<fn() -> S>); 55 55 impl<S: State> sealed::Sealed for SetMedia<S> {} 56 56 impl<S: State> State for SetMedia<S> { 57 - type Record = S::Record; 57 + type Records = S::Records; 58 58 type Media = Set<members::media>; 59 59 } 60 60 /// Marker types for field names 61 61 #[allow(non_camel_case_types)] 62 62 pub mod members { 63 - ///Marker type for the `record` field 64 - pub struct record(()); 63 + ///Marker type for the `records` field 64 + pub struct records(()); 65 65 ///Marker type for the `media` field 66 66 pub struct media(()); 67 67 } ··· 72 72 _phantom_state: ::core::marker::PhantomData<fn() -> S>, 73 73 __unsafe_private_named: ( 74 74 ::core::option::Option<RecordWithMediaMedia<'a>>, 75 - ::core::option::Option<RecordWithMediaRecord<'a>>, 75 + ::core::option::Option<crate::sh_weaver::embed::records::Records<'a>>, 76 76 ), 77 77 _phantom: ::core::marker::PhantomData<&'a ()>, 78 78 } ··· 117 117 impl<'a, S> RecordWithMediaBuilder<'a, S> 118 118 where 119 119 S: record_with_media_state::State, 120 - S::Record: record_with_media_state::IsUnset, 120 + S::Records: record_with_media_state::IsUnset, 121 121 { 122 - /// Set the `record` field (required) 123 - pub fn record( 122 + /// Set the `records` field (required) 123 + pub fn records( 124 124 mut self, 125 - value: impl Into<RecordWithMediaRecord<'a>>, 126 - ) -> RecordWithMediaBuilder<'a, record_with_media_state::SetRecord<S>> { 125 + value: impl Into<crate::sh_weaver::embed::records::Records<'a>>, 126 + ) -> RecordWithMediaBuilder<'a, record_with_media_state::SetRecords<S>> { 127 127 self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); 128 128 RecordWithMediaBuilder { 129 129 _phantom_state: ::core::marker::PhantomData, ··· 136 136 impl<'a, S> RecordWithMediaBuilder<'a, S> 137 137 where 138 138 S: record_with_media_state::State, 139 - S::Record: record_with_media_state::IsSet, 139 + S::Records: record_with_media_state::IsSet, 140 140 S::Media: record_with_media_state::IsSet, 141 141 { 142 142 /// Build the final struct 143 143 pub fn build(self) -> RecordWithMedia<'a> { 144 144 RecordWithMedia { 145 145 media: self.__unsafe_private_named.0.unwrap(), 146 - record: self.__unsafe_private_named.1.unwrap(), 146 + records: self.__unsafe_private_named.1.unwrap(), 147 147 extra_data: Default::default(), 148 148 } 149 149 } ··· 157 157 ) -> RecordWithMedia<'a> { 158 158 RecordWithMedia { 159 159 media: self.__unsafe_private_named.0.unwrap(), 160 - record: self.__unsafe_private_named.1.unwrap(), 160 + records: self.__unsafe_private_named.1.unwrap(), 161 161 extra_data: Some(extra_data), 162 162 } 163 163 } ··· 182 182 External(Box<crate::sh_weaver::embed::external::External<'a>>), 183 183 #[serde(rename = "sh.weaver.embed.video")] 184 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 185 } 211 186 212 187 fn lexicon_doc_sh_weaver_embed_recordWithMedia() -> ::jacquard_lexicon::lexicon::LexiconDoc< ··· 225 200 description: None, 226 201 required: Some( 227 202 vec![ 228 - ::jacquard_common::smol_str::SmolStr::new_static("record"), 203 + ::jacquard_common::smol_str::SmolStr::new_static("records"), 229 204 ::jacquard_common::smol_str::SmolStr::new_static("media") 230 205 ], 231 206 ), ··· 240 215 refs: vec![ 241 216 ::jacquard_common::CowStr::new_static("sh.weaver.embed.images"), 242 217 ::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") 218 + ::jacquard_common::CowStr::new_static("sh.weaver.embed.video") 247 219 ], 248 220 closed: None, 249 221 }), 250 222 ); 251 223 map.insert( 252 - ::jacquard_common::smol_str::SmolStr::new_static("record"), 253 - ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion { 224 + ::jacquard_common::smol_str::SmolStr::new_static("records"), 225 + ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { 254 226 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, 227 + r#ref: ::jacquard_common::CowStr::new_static( 228 + "sh.weaver.embed.records", 229 + ), 260 230 }), 261 231 ); 262 232 map ··· 284 254 refs: vec![ 285 255 ::jacquard_common::CowStr::new_static("sh.weaver.embed.images#view"), 286 256 ::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") 257 + ::jacquard_common::CowStr::new_static("sh.weaver.embed.video#view") 291 258 ], 292 259 closed: None, 293 260 }), 294 261 ); 295 262 map.insert( 296 - ::jacquard_common::smol_str::SmolStr::new_static("record"), 297 - ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion { 263 + ::jacquard_common::smol_str::SmolStr::new_static("records"), 264 + ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { 298 265 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, 266 + r#ref: ::jacquard_common::CowStr::new_static( 267 + "sh.weaver.embed.records#view", 268 + ), 304 269 }), 305 270 ); 306 271 map ··· 343 308 pub struct View<'a> { 344 309 #[serde(borrow)] 345 310 pub media: ViewMedia<'a>, 311 + #[serde(skip_serializing_if = "std::option::Option::is_none")] 346 312 #[serde(borrow)] 347 - pub record: ViewRecord<'a>, 313 + pub records: Option<crate::sh_weaver::embed::records::View<'a>>, 348 314 } 349 315 350 316 pub mod view_state { ··· 396 362 _phantom_state: ::core::marker::PhantomData<fn() -> S>, 397 363 __unsafe_private_named: ( 398 364 ::core::option::Option<ViewMedia<'a>>, 399 - ::core::option::Option<ViewRecord<'a>>, 365 + ::core::option::Option<crate::sh_weaver::embed::records::View<'a>>, 400 366 ), 401 367 _phantom: ::core::marker::PhantomData<&'a ()>, 402 368 } ··· 438 404 } 439 405 } 440 406 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( 407 + impl<'a, S: view_state::State> ViewBuilder<'a, S> { 408 + /// Set the `records` field (optional) 409 + pub fn records( 448 410 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 - } 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 457 423 } 458 424 } 459 425 ··· 467 433 pub fn build(self) -> View<'a> { 468 434 View { 469 435 media: self.__unsafe_private_named.0.unwrap(), 470 - record: self.__unsafe_private_named.1.unwrap(), 436 + records: self.__unsafe_private_named.1, 471 437 extra_data: Default::default(), 472 438 } 473 439 } ··· 481 447 ) -> View<'a> { 482 448 View { 483 449 media: self.__unsafe_private_named.0.unwrap(), 484 - record: self.__unsafe_private_named.1.unwrap(), 450 + records: self.__unsafe_private_named.1, 485 451 extra_data: Some(extra_data), 486 452 } 487 453 } ··· 506 472 ExternalView(Box<crate::sh_weaver::embed::external::View<'a>>), 507 473 #[serde(rename = "sh.weaver.embed.video#view")] 508 474 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 475 } 535 476 536 477 impl<'a> ::jacquard_lexicon::schema::LexiconSchema for View<'a> {
-15
crates/weaver-api/src/sh_weaver/embed/records.rs
··· 237 237 ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion { 238 238 description: None, 239 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 240 ::jacquard_common::CowStr::new_static("sh.weaver.embed.records#view"), 246 241 ::jacquard_common::CowStr::new_static("sh.weaver.embed.images#view"), 247 242 ::jacquard_common::CowStr::new_static("sh.weaver.embed.recordWithMedia#view"), ··· 957 952 #[serde(tag = "$type")] 958 953 #[serde(bound(deserialize = "'de: 'a"))] 959 954 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 955 #[serde(rename = "sh.weaver.embed.records#view")] 971 956 View(Box<crate::sh_weaver::embed::records::View<'a>>), 972 957 #[serde(rename = "sh.weaver.embed.images#view")]
+76 -5
crates/weaver-api/src/sh_weaver/publish/blob.rs
··· 18 18 )] 19 19 #[serde(rename_all = "camelCase")] 20 20 pub struct Blob<'a> { 21 + /// relative path to the blob 22 + #[serde(borrow)] 23 + pub path: jacquard_common::CowStr<'a>, 21 24 /// Reference to the uploaded file 22 25 #[serde(borrow)] 23 26 pub upload: jacquard_common::types::blob::BlobRef<'a>, ··· 34 37 /// State trait tracking which required fields have been set 35 38 pub trait State: sealed::Sealed { 36 39 type Upload; 40 + type Path; 37 41 } 38 42 /// Empty state - all required fields are unset 39 43 pub struct Empty(()); 40 44 impl sealed::Sealed for Empty {} 41 45 impl State for Empty { 42 46 type Upload = Unset; 47 + type Path = Unset; 43 48 } 44 49 ///State transition - sets the `upload` field to Set 45 50 pub struct SetUpload<S: State = Empty>(PhantomData<fn() -> S>); 46 51 impl<S: State> sealed::Sealed for SetUpload<S> {} 47 52 impl<S: State> State for SetUpload<S> { 48 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>; 49 62 } 50 63 /// Marker types for field names 51 64 #[allow(non_camel_case_types)] 52 65 pub mod members { 53 66 ///Marker type for the `upload` field 54 67 pub struct upload(()); 68 + ///Marker type for the `path` field 69 + pub struct path(()); 55 70 } 56 71 } 57 72 ··· 59 74 pub struct BlobBuilder<'a, S: blob_state::State> { 60 75 _phantom_state: ::core::marker::PhantomData<fn() -> S>, 61 76 __unsafe_private_named: ( 77 + ::core::option::Option<jacquard_common::CowStr<'a>>, 62 78 ::core::option::Option<jacquard_common::types::blob::BlobRef<'a>>, 63 79 ), 64 80 _phantom: ::core::marker::PhantomData<&'a ()>, ··· 76 92 pub fn new() -> Self { 77 93 BlobBuilder { 78 94 _phantom_state: ::core::marker::PhantomData, 79 - __unsafe_private_named: (None,), 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, 80 115 _phantom: ::core::marker::PhantomData, 81 116 } 82 117 } ··· 92 127 mut self, 93 128 value: impl Into<jacquard_common::types::blob::BlobRef<'a>>, 94 129 ) -> BlobBuilder<'a, blob_state::SetUpload<S>> { 95 - self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); 130 + self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); 96 131 BlobBuilder { 97 132 _phantom_state: ::core::marker::PhantomData, 98 133 __unsafe_private_named: self.__unsafe_private_named, ··· 105 140 where 106 141 S: blob_state::State, 107 142 S::Upload: blob_state::IsSet, 143 + S::Path: blob_state::IsSet, 108 144 { 109 145 /// Build the final struct 110 146 pub fn build(self) -> Blob<'a> { 111 147 Blob { 112 - upload: self.__unsafe_private_named.0.unwrap(), 148 + path: self.__unsafe_private_named.0.unwrap(), 149 + upload: self.__unsafe_private_named.1.unwrap(), 113 150 extra_data: Default::default(), 114 151 } 115 152 } ··· 122 159 >, 123 160 ) -> Blob<'a> { 124 161 Blob { 125 - upload: self.__unsafe_private_named.0.unwrap(), 162 + path: self.__unsafe_private_named.0.unwrap(), 163 + upload: self.__unsafe_private_named.1.unwrap(), 126 164 extra_data: Some(extra_data), 127 165 } 128 166 } ··· 202 240 fn validate( 203 241 &self, 204 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 + } 205 256 Ok(()) 206 257 } 207 258 } ··· 229 280 description: None, 230 281 required: Some( 231 282 vec![ 232 - ::jacquard_common::smol_str::SmolStr::new_static("upload") 283 + ::jacquard_common::smol_str::SmolStr::new_static("upload"), 284 + ::jacquard_common::smol_str::SmolStr::new_static("path") 233 285 ], 234 286 ), 235 287 nullable: None, 236 288 properties: { 237 289 #[allow(unused_mut)] 238 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 + ); 239 310 map.insert( 240 311 ::jacquard_common::smol_str::SmolStr::new_static("upload"), 241 312 ::jacquard_lexicon::lexicon::LexObjectProperty::Blob(::jacquard_lexicon::lexicon::LexBlob {
+2 -2
crates/weaver-common/Cargo.toml
··· 13 13 [dependencies] 14 14 n0-future = { workspace = true } 15 15 weaver-workspace-hack = { version = "0.1", path = "../weaver-workspace-hack" } 16 + weaver-api = { version = "0.1", path = "../weaver-api" } 16 17 markdown-weaver = { workspace = true } 17 18 #libsqlite3-sys = { version = "0.30.1", features = ["bundled"] } 18 19 19 20 http = "1.3.1" 20 21 21 22 jacquard = { workspace = true } 22 - jacquard-api = { workspace = true, features = ["sh_weaver"] } 23 23 trait-variant = "0.1" 24 24 25 25 serde = { workspace = true } ··· 58 58 dirs = "6.0.0" 59 59 regex = "1.11.1" 60 60 markdown-weaver-escape = { workspace = true, features = ["std"] } 61 - 61 + tree_magic.workspace = true 62 62 63 63 64 64 [dev-dependencies]
+9
crates/weaver-common/src/error.rs
··· 1 1 //! Error types for weaver - thin wrapper over jacquard errors 2 2 3 + use jacquard::{types::string::AtStrError, xrpc::GenericXrpcError}; 3 4 use miette::{Diagnostic, NamedSource, SourceOffset, SourceSpan}; 4 5 use std::borrow::Cow; 5 6 ··· 36 37 /// Task join error 37 38 #[error(transparent)] 38 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>), 39 48 } 40 49 41 50 /// Parse error with source code location information
+190 -24
crates/weaver-common/src/lib.rs
··· 4 4 5 5 // Re-export jacquard for convenience 6 6 pub use jacquard; 7 - use jacquard::CowStr; 8 - pub use jacquard_api; 7 + use jacquard::error::ClientError; 8 + use jacquard::types::ident::AtIdentifier; 9 + use jacquard::{CowStr, IntoStatic, xrpc}; 9 10 10 11 pub use error::WeaverError; 12 + use jacquard::types::tid::{Ticker, Tid}; 11 13 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}; 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; 16 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())); 17 32 18 33 /// Extension trait providing weaver-specific multi-step operations on Agent 19 34 /// ··· 26 41 /// - `agent.upload_blob()` - Upload a single blob 27 42 /// 28 43 /// This trait is for multi-step workflows that coordinate between multiple operations. 29 - #[trait_variant::make(Send)] 30 - pub trait WeaverExt { 44 + //#[trait_variant::make(Send)] 45 + pub trait WeaverExt: AgentSessionExt { 31 46 /// Publish a notebook directory to the user's PDS 32 47 /// 33 48 /// Multi-step workflow: ··· 38 53 /// 5. Create book record with entry refs 39 54 /// 40 55 /// Returns the AT-URI of the published book 41 - async fn publish_notebook(&self, path: &Path) -> Result<PublishResult<'_>, WeaverError>; 56 + fn publish_notebook( 57 + &self, 58 + path: &Path, 59 + ) -> impl Future<Output = Result<PublishResult<'_>, WeaverError>>; 42 60 43 - /// Upload assets from markdown content 61 + /// Publish a blob to the user's PDS 44 62 /// 45 63 /// 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 64 + /// 1. Upload blob to PDS 65 + /// 2. Create blob record with CID 49 66 /// 50 - /// Used by renderer to transform local refs to atproto refs 51 - async fn upload_assets( 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( 52 76 &self, 53 - markdown: &str, 54 - ) -> Result<Vec<(String, BlobRef<'_>)>, WeaverError>; 77 + uri: &AtUri<'_>, 78 + ) -> impl Future<Output = Result<StrongRef<'_>, WeaverError>>; 55 79 } 56 80 57 - impl<A: AgentSession> WeaverExt for Agent<A> { 81 + impl<A: AgentSession + IdentityResolver> WeaverExt for Agent<A> { 58 82 async fn publish_notebook(&self, _path: &Path) -> Result<PublishResult<'_>, WeaverError> { 59 83 // TODO: Implementation 60 84 todo!("publish_notebook not yet implemented") 61 85 } 62 86 63 - async fn upload_assets( 87 + async fn publish_blob<'a>( 64 88 &self, 65 - _markdown: &str, 66 - ) -> Result<Vec<(String, BlobRef<'_>)>, WeaverError> { 67 - // TODO: Implementation 68 - todo!("upload_assets not yet implemented") 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()) 69 167 } 70 168 } 71 169 ··· 77 175 /// CID of the book record 78 176 pub cid: Cid<'a>, 79 177 /// URIs of published entries 80 - pub entries: Vec<AtUri<'a>>, 178 + pub entries: Vec<StrongRef<'a>>, 81 179 } 82 180 83 181 /// too many cows, so we have conversions ··· 173 271 Some(CowStr::Borrowed(aturi)) 174 272 } 175 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 3 //! This crate works with the weaver-markdown crate to render and optionally upload markdown notebooks to your Atproto PDS. 4 4 //! 5 5 6 - use async_trait::async_trait; 7 6 use markdown_weaver::CowStr; 8 7 use markdown_weaver::Event; 9 - use markdown_weaver::LinkType; 10 8 use markdown_weaver::Tag; 11 9 use n0_future::Stream; 12 - use n0_future::StreamExt; 13 10 use n0_future::pin; 14 11 use n0_future::stream::once_future; 15 12 use yaml_rust2::Yaml;
+1 -4
crates/weaver-renderer/src/utils.rs
··· 1 - use std::{fmt::Arguments, path::Path, sync::OnceLock}; 1 + use std::{path::Path, sync::OnceLock}; 2 2 3 3 use markdown_weaver::{CodeBlockKind, CowStr, Event, Tag}; 4 - use markdown_weaver_escape::StrWrite; 5 4 use miette::IntoDiagnostic; 6 5 use n0_future::TryFutureExt; 7 - use n0_future::io::AsyncWrite; 8 - use n0_future::io::AsyncWriteExt; 9 6 use regex::Regex; 10 7 11 8 #[cfg(not(all(target_family = "wasm", target_os = "unknown")))]
+61 -27
flake.nix
··· 109 109 # cargo won't be able to find the sources for all members. 110 110 weaver-cli = craneLib.buildPackage (individualCrateArgs 111 111 // { 112 - pname = "${name}-cli"; 112 + pname = "${name}"; 113 113 cargoExtraArgs = "-p ${name}-cli"; 114 114 src = fileSetForCrate ./crates/weaver-cli; 115 115 }); ··· 217 217 }; 218 218 }; 219 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"; 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 231 232 - LD_LIBRARY_PATH = "$LD_LIBRARY_PATH:$NIX_LD_LIBRARY_PATH"; 233 - DATABASE_URL = "postgres://postgres:@localhost/weaver_appview"; 232 + wasmBindgen = 233 + pkgs.lib.findFirst 234 + (pkg: pkg.name == "wasm-bindgen") 235 + (throw "Could not find wasm-bindgen package") 236 + cargoLock.package; 234 237 235 - # Additional dev-shell environment variables can be set directly 236 - # MY_CUSTOM_DEVELOPMENT_VAR = "something else"; 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 + }; 237 244 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 - }; 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 + }; 249 283 }); 250 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 8 "key": "tid", 9 9 "record": { 10 10 "type": "object", 11 - "required": ["cid", "uri", "doc", "snapshot"], 11 + "required": ["doc", "snapshot"], 12 12 "properties": { 13 - "uri": { "type": "string", "format": "at-uri" }, 14 - "cid": { "type": "string", "format": "cid" }, 15 13 "snapshot": { 16 14 "type": "blob", 17 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 35 "recordView": { 36 36 "type": "union", 37 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 38 "sh.weaver.embed.records#view", 44 39 "sh.weaver.embed.images#view", 45 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 8 "key": "tid", 9 9 "record": { 10 10 "type": "object", 11 - "required": ["upload"], 11 + "required": ["upload", "path"], 12 12 "properties": { 13 + "path": { 14 + "type": "string", 15 + "description": "relative path to the blob", 16 + "minLength": 1 17 + }, 13 18 "upload": { 14 19 "type": "blob", 15 20 "description": "Reference to the uploaded file",
lexicons/sh/weaver/publish/defs.json lexicons/publish/defs.json