cheogram-www
created pr with
cheogram-www/sqlite-driver.1
commented
Changes are available at https://tangled.org/mrry.band/cheogram-www on branch sqlite-driver.
cmds
checkout latest patchset:
ssh pr.pico.sh pull cheogram-www:sqlite-driver | git am -3checkout specific patchset revision:
ssh pr.pico.sh pull cheogram-www:sqlite-driver [rev] | git am -3add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh cheogram-www:sqlite-driveradd comment to patch request:
ssh pr.pico.sh comment cheogram-www:sqlite-driver "lgtm!"
Patchset
cheogram-www/sqlite-driver.1
Put sqlite db to app data directory
Eric Roberts
2026-11-05T20:53:25ZDefault of the tauri sql plugin is to put it into app config but it just takes a path so we get the app data dir and put it there instead.
Semantic diff summary
7 added,
4 modified,
0 signature changed,
0 removed
across 4 analyzed files
(4 files skipped: unsupported file type)
+1
-0
package.json
#
+785
-5
src-tauri/Cargo.lock
#
| ... | ... | @@ -32,6 +32,12 @@ dependencies = [ | |
| 32 | 32 | "alloc-no-stdlib", | |
| 33 | 33 | ] | |
| 34 | 34 | ||
| 35 | + | [[package]] | |
| 36 | + | name = "allocator-api2" | |
| 37 | + | version = "0.2.21" | |
| 38 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 39 | + | checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" | |
| 40 | + | ||
| 35 | 41 | [[package]] | |
| 36 | 42 | name = "android_log-sys" | |
| 37 | 43 | version = "0.3.2" |
| ... | ... | @@ -64,6 +70,12 @@ version = "1.0.104" | |
| 64 | 70 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 65 | 71 | checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" | |
| 66 | 72 | ||
| 73 | + | [[package]] | |
| 74 | + | name = "arrayvec" | |
| 75 | + | version = "0.7.8" | |
| 76 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 77 | + | checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56" | |
| 78 | + | ||
| 67 | 79 | [[package]] | |
| 68 | 80 | name = "async-broadcast" | |
| 69 | 81 | version = "0.7.2" |
| ... | ... | @@ -230,6 +242,15 @@ dependencies = [ | |
| 230 | 242 | "system-deps", | |
| 231 | 243 | ] | |
| 232 | 244 | ||
| 245 | + | [[package]] | |
| 246 | + | name = "atoi" | |
| 247 | + | version = "2.0.0" | |
| 248 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 249 | + | checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" | |
| 250 | + | dependencies = [ | |
| 251 | + | "num-traits", | |
| 252 | + | ] | |
| 253 | + | ||
| 233 | 254 | [[package]] | |
| 234 | 255 | name = "atomic-waker" | |
| 235 | 256 | version = "1.1.2" |
| ... | ... | @@ -283,6 +304,12 @@ version = "0.23.1" | |
| 283 | 304 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 284 | 305 | checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" | |
| 285 | 306 | ||
| 307 | + | [[package]] | |
| 308 | + | name = "base64ct" | |
| 309 | + | version = "1.8.3" | |
| 310 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 311 | + | checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" | |
| 312 | + | ||
| 286 | 313 | [[package]] | |
| 287 | 314 | name = "bit-set" | |
| 288 | 315 | version = "0.8.0" |
| ... | ... | @@ -344,6 +371,30 @@ dependencies = [ | |
| 344 | 371 | "piper", | |
| 345 | 372 | ] | |
| 346 | 373 | ||
| 374 | + | [[package]] | |
| 375 | + | name = "borsh" | |
| 376 | + | version = "1.8.1" | |
| 377 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 378 | + | checksum = "553c5d846a6ba5150c65e3b1b8ec073bcf1abc20f9b7220de384a4443ea4e20a" | |
| 379 | + | dependencies = [ | |
| 380 | + | "borsh-derive", | |
| 381 | + | "bytes", | |
| 382 | + | "cfg_aliases", | |
| 383 | + | ] | |
| 384 | + | ||
| 385 | + | [[package]] | |
| 386 | + | name = "borsh-derive" | |
| 387 | + | version = "1.8.1" | |
| 388 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 389 | + | checksum = "12cdfe656708a01f89b451a7d36466e6fe6c414de0aa18fc54f864f6f9ca9f56" | |
| 390 | + | dependencies = [ | |
| 391 | + | "once_cell", | |
| 392 | + | "proc-macro-crate 3.5.0", | |
| 393 | + | "proc-macro2", | |
| 394 | + | "quote", | |
| 395 | + | "syn 3.0.10", | |
| 396 | + | ] | |
| 397 | + | ||
| 347 | 398 | [[package]] | |
| 348 | 399 | name = "brotli" | |
| 349 | 400 | version = "9.1.1" |
| ... | ... | @@ -614,6 +666,12 @@ dependencies = [ | |
| 614 | 666 | "crossbeam-utils", | |
| 615 | 667 | ] | |
| 616 | 668 | ||
| 669 | + | [[package]] | |
| 670 | + | name = "const-oid" | |
| 671 | + | version = "0.9.6" | |
| 672 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 673 | + | checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" | |
| 674 | + | ||
| 617 | 675 | [[package]] | |
| 618 | 676 | name = "cookie" | |
| 619 | 677 | version = "0.18.2" |
| ... | ... | @@ -682,6 +740,21 @@ dependencies = [ | |
| 682 | 740 | "libc", | |
| 683 | 741 | ] | |
| 684 | 742 | ||
| 743 | + | [[package]] | |
| 744 | + | name = "crc" | |
| 745 | + | version = "3.4.0" | |
| 746 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 747 | + | checksum = "5eb8a2a1cd12ab0d987a5d5e825195d372001a4094a0376319d5a0ad71c1ba0d" | |
| 748 | + | dependencies = [ | |
| 749 | + | "crc-catalog", | |
| 750 | + | ] | |
| 751 | + | ||
| 752 | + | [[package]] | |
| 753 | + | name = "crc-catalog" | |
| 754 | + | version = "2.5.0" | |
| 755 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 756 | + | checksum = "217698eaf96b4a3f0bc4f3662aaa55bdf913cd54d7204591faa790070c6d0853" | |
| 757 | + | ||
| 685 | 758 | [[package]] | |
| 686 | 759 | name = "crc32fast" | |
| 687 | 760 | version = "1.5.4" |
| ... | ... | @@ -715,6 +788,15 @@ dependencies = [ | |
| 715 | 788 | "crossbeam-utils", | |
| 716 | 789 | ] | |
| 717 | 790 | ||
| 791 | + | [[package]] | |
| 792 | + | name = "crossbeam-queue" | |
| 793 | + | version = "0.3.14" | |
| 794 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 795 | + | checksum = "03e8bd762f7479489c70ed6c768ddca99d7296857de437a68dcb2a94365b3fae" | |
| 796 | + | dependencies = [ | |
| 797 | + | "crossbeam-utils", | |
| 798 | + | ] | |
| 799 | + | ||
| 718 | 800 | [[package]] | |
| 719 | 801 | name = "crossbeam-utils" | |
| 720 | 802 | version = "0.8.23" |
| ... | ... | @@ -811,6 +893,17 @@ dependencies = [ | |
| 811 | 893 | "windows-sys 0.61.2", | |
| 812 | 894 | ] | |
| 813 | 895 | ||
| 896 | + | [[package]] | |
| 897 | + | name = "der" | |
| 898 | + | version = "0.7.10" | |
| 899 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 900 | + | checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" | |
| 901 | + | dependencies = [ | |
| 902 | + | "const-oid", | |
| 903 | + | "pem-rfc7468", | |
| 904 | + | "zeroize", | |
| 905 | + | ] | |
| 906 | + | ||
| 814 | 907 | [[package]] | |
| 815 | 908 | name = "deranged" | |
| 816 | 909 | version = "0.5.9" |
| ... | ... | @@ -854,7 +947,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 854 | 947 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" | |
| 855 | 948 | dependencies = [ | |
| 856 | 949 | "block-buffer", | |
| 950 | + | "const-oid", | |
| 857 | 951 | "crypto-common", | |
| 952 | + | "subtle", | |
| 858 | 953 | ] | |
| 859 | 954 | ||
| 860 | 955 | [[package]] |
| ... | ... | @@ -932,13 +1027,19 @@ checksum = "fac5fca71e65e94cc718a6e2af65d6e0f9c6027751c2aa562fbb5087fda639bc" | |
| 932 | 1027 | dependencies = [ | |
| 933 | 1028 | "bit-set", | |
| 934 | 1029 | "cssparser", | |
| 935 | - | "foldhash", | |
| 1030 | + | "foldhash 0.2.0", | |
| 936 | 1031 | "html5ever", | |
| 937 | 1032 | "precomputed-hash", | |
| 938 | 1033 | "selectors", | |
| 939 | 1034 | "tendril", | |
| 940 | 1035 | ] | |
| 941 | 1036 | ||
| 1037 | + | [[package]] | |
| 1038 | + | name = "dotenvy" | |
| 1039 | + | version = "0.15.7" | |
| 1040 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1041 | + | checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" | |
| 1042 | + | ||
| 942 | 1043 | [[package]] | |
| 943 | 1044 | name = "dpi" | |
| 944 | 1045 | version = "0.1.2" |
| ... | ... | @@ -975,6 +1076,15 @@ version = "1.0.20" | |
| 975 | 1076 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 976 | 1077 | checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" | |
| 977 | 1078 | ||
| 1079 | + | [[package]] | |
| 1080 | + | name = "either" | |
| 1081 | + | version = "1.19.0" | |
| 1082 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1083 | + | checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be" | |
| 1084 | + | dependencies = [ | |
| 1085 | + | "serde", | |
| 1086 | + | ] | |
| 1087 | + | ||
| 978 | 1088 | [[package]] | |
| 979 | 1089 | name = "embed-resource" | |
| 980 | 1090 | version = "3.0.12" |
| ... | ... | @@ -1071,6 +1181,17 @@ dependencies = [ | |
| 1071 | 1181 | "windows-sys 0.61.2", | |
| 1072 | 1182 | ] | |
| 1073 | 1183 | ||
| 1184 | + | [[package]] | |
| 1185 | + | name = "etcetera" | |
| 1186 | + | version = "0.8.0" | |
| 1187 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1188 | + | checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" | |
| 1189 | + | dependencies = [ | |
| 1190 | + | "cfg-if", | |
| 1191 | + | "home", | |
| 1192 | + | "windows-sys 0.48.0", | |
| 1193 | + | ] | |
| 1194 | + | ||
| 1074 | 1195 | [[package]] | |
| 1075 | 1196 | name = "event-listener" | |
| 1076 | 1197 | version = "5.4.2" |
| ... | ... | @@ -1097,7 +1218,7 @@ version = "0.17.0" | |
| 1097 | 1218 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1098 | 1219 | checksum = "ef975e30683b2d965054bb0a836f8973857c4ebf6acf274fe46617cd285060d8" | |
| 1099 | 1220 | dependencies = [ | |
| 1100 | - | "foldhash", | |
| 1221 | + | "foldhash 0.2.0", | |
| 1101 | 1222 | "libm", | |
| 1102 | 1223 | "portable-atomic", | |
| 1103 | 1224 | "siphasher", |
| ... | ... | @@ -1154,12 +1275,29 @@ dependencies = [ | |
| 1154 | 1275 | "zlib-rs", | |
| 1155 | 1276 | ] | |
| 1156 | 1277 | ||
| 1278 | + | [[package]] | |
| 1279 | + | name = "flume" | |
| 1280 | + | version = "0.11.1" | |
| 1281 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1282 | + | checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" | |
| 1283 | + | dependencies = [ | |
| 1284 | + | "futures-core", | |
| 1285 | + | "futures-sink", | |
| 1286 | + | "spin", | |
| 1287 | + | ] | |
| 1288 | + | ||
| 1157 | 1289 | [[package]] | |
| 1158 | 1290 | name = "fnv" | |
| 1159 | 1291 | version = "1.0.7" | |
| 1160 | 1292 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1161 | 1293 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" | |
| 1162 | 1294 | ||
| 1295 | + | [[package]] | |
| 1296 | + | name = "foldhash" | |
| 1297 | + | version = "0.1.5" | |
| 1298 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1299 | + | checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" | |
| 1300 | + | ||
| 1163 | 1301 | [[package]] | |
| 1164 | 1302 | name = "foldhash" | |
| 1165 | 1303 | version = "0.2.0" |
| ... | ... | @@ -1250,6 +1388,17 @@ dependencies = [ | |
| 1250 | 1388 | "futures-util", | |
| 1251 | 1389 | ] | |
| 1252 | 1390 | ||
| 1391 | + | [[package]] | |
| 1392 | + | name = "futures-intrusive" | |
| 1393 | + | version = "0.5.0" | |
| 1394 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1395 | + | checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" | |
| 1396 | + | dependencies = [ | |
| 1397 | + | "futures-core", | |
| 1398 | + | "lock_api", | |
| 1399 | + | "parking_lot", | |
| 1400 | + | ] | |
| 1401 | + | ||
| 1253 | 1402 | [[package]] | |
| 1254 | 1403 | name = "futures-io" | |
| 1255 | 1404 | version = "0.3.34" |
| ... | ... | @@ -1611,12 +1760,32 @@ version = "0.12.3" | |
| 1611 | 1760 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1612 | 1761 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" | |
| 1613 | 1762 | ||
| 1763 | + | [[package]] | |
| 1764 | + | name = "hashbrown" | |
| 1765 | + | version = "0.15.5" | |
| 1766 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1767 | + | checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" | |
| 1768 | + | dependencies = [ | |
| 1769 | + | "allocator-api2", | |
| 1770 | + | "equivalent", | |
| 1771 | + | "foldhash 0.1.5", | |
| 1772 | + | ] | |
| 1773 | + | ||
| 1614 | 1774 | [[package]] | |
| 1615 | 1775 | name = "hashbrown" | |
| 1616 | 1776 | version = "0.17.1" | |
| 1617 | 1777 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1618 | 1778 | checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" | |
| 1619 | 1779 | ||
| 1780 | + | [[package]] | |
| 1781 | + | name = "hashlink" | |
| 1782 | + | version = "0.10.0" | |
| 1783 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1784 | + | checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" | |
| 1785 | + | dependencies = [ | |
| 1786 | + | "hashbrown 0.15.5", | |
| 1787 | + | ] | |
| 1788 | + | ||
| 1620 | 1789 | [[package]] | |
| 1621 | 1790 | name = "heck" | |
| 1622 | 1791 | version = "0.4.1" |
| ... | ... | @@ -1690,6 +1859,33 @@ dependencies = [ | |
| 1690 | 1859 | "tracing", | |
| 1691 | 1860 | ] | |
| 1692 | 1861 | ||
| 1862 | + | [[package]] | |
| 1863 | + | name = "hkdf" | |
| 1864 | + | version = "0.12.4" | |
| 1865 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1866 | + | checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" | |
| 1867 | + | dependencies = [ | |
| 1868 | + | "hmac", | |
| 1869 | + | ] | |
| 1870 | + | ||
| 1871 | + | [[package]] | |
| 1872 | + | name = "hmac" | |
| 1873 | + | version = "0.12.1" | |
| 1874 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1875 | + | checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" | |
| 1876 | + | dependencies = [ | |
| 1877 | + | "digest", | |
| 1878 | + | ] | |
| 1879 | + | ||
| 1880 | + | [[package]] | |
| 1881 | + | name = "home" | |
| 1882 | + | version = "0.5.12" | |
| 1883 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1884 | + | checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d" | |
| 1885 | + | dependencies = [ | |
| 1886 | + | "windows-sys 0.61.2", | |
| 1887 | + | ] | |
| 1888 | + | ||
| 1693 | 1889 | [[package]] | |
| 1694 | 1890 | name = "html5ever" | |
| 1695 | 1891 | version = "0.39.0" |
| ... | ... | @@ -2219,6 +2415,15 @@ dependencies = [ | |
| 2219 | 2415 | "serde", | |
| 2220 | 2416 | ] | |
| 2221 | 2417 | ||
| 2418 | + | [[package]] | |
| 2419 | + | name = "lazy_static" | |
| 2420 | + | version = "1.5.1" | |
| 2421 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 2422 | + | checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb" | |
| 2423 | + | dependencies = [ | |
| 2424 | + | "spin", | |
| 2425 | + | ] | |
| 2426 | + | ||
| 2222 | 2427 | [[package]] | |
| 2223 | 2428 | name = "libappindicator" | |
| 2224 | 2429 | version = "0.9.0" |
| ... | ... | @@ -2280,7 +2485,21 @@ version = "0.1.25" | |
| 2280 | 2485 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 2281 | 2486 | checksum = "61ff90caf6077a803a240f62fdbe88645a890bbca49ef8174c3cb0404362171d" | |
| 2282 | 2487 | dependencies = [ | |
| 2488 | + | "bitflags 2.13.2", | |
| 2283 | 2489 | "libc", | |
| 2490 | + | "plain", | |
| 2491 | + | "redox_syscall 0.9.5", | |
| 2492 | + | ] | |
| 2493 | + | ||
| 2494 | + | [[package]] | |
| 2495 | + | name = "libsqlite3-sys" | |
| 2496 | + | version = "0.30.1" | |
| 2497 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 2498 | + | checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" | |
| 2499 | + | dependencies = [ | |
| 2500 | + | "cc", | |
| 2501 | + | "pkg-config", | |
| 2502 | + | "vcpkg", | |
| 2284 | 2503 | ] | |
| 2285 | 2504 | ||
| 2286 | 2505 | [[package]] |
| ... | ... | @@ -2341,6 +2560,16 @@ dependencies = [ | |
| 2341 | 2560 | "web_atoms", | |
| 2342 | 2561 | ] | |
| 2343 | 2562 | ||
| 2563 | + | [[package]] | |
| 2564 | + | name = "md-5" | |
| 2565 | + | version = "0.10.6" | |
| 2566 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 2567 | + | checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" | |
| 2568 | + | dependencies = [ | |
| 2569 | + | "cfg-if", | |
| 2570 | + | "digest", | |
| 2571 | + | ] | |
| 2572 | + | ||
| 2344 | 2573 | [[package]] | |
| 2345 | 2574 | name = "memchr" | |
| 2346 | 2575 | version = "2.8.3" |
| ... | ... | @@ -2486,12 +2715,47 @@ dependencies = [ | |
| 2486 | 2715 | "zbus 6.2.1", | |
| 2487 | 2716 | ] | |
| 2488 | 2717 | ||
| 2718 | + | [[package]] | |
| 2719 | + | name = "num-bigint-dig" | |
| 2720 | + | version = "0.8.6" | |
| 2721 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 2722 | + | checksum = "e661dda6640fad38e827a6d4a310ff4763082116fe217f279885c97f511bb0b7" | |
| 2723 | + | dependencies = [ | |
| 2724 | + | "lazy_static", | |
| 2725 | + | "libm", | |
| 2726 | + | "num-integer", | |
| 2727 | + | "num-iter", | |
| 2728 | + | "num-traits", | |
| 2729 | + | "rand 0.8.8", | |
| 2730 | + | "smallvec", | |
| 2731 | + | "zeroize", | |
| 2732 | + | ] | |
| 2733 | + | ||
| 2489 | 2734 | [[package]] | |
| 2490 | 2735 | name = "num-conv" | |
| 2491 | 2736 | version = "0.2.2" | |
| 2492 | 2737 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 2493 | 2738 | checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" | |
| 2494 | 2739 | ||
| 2740 | + | [[package]] | |
| 2741 | + | name = "num-integer" | |
| 2742 | + | version = "0.1.47" | |
| 2743 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 2744 | + | checksum = "7ce2d95d4b3734dc35aa2f45e1aa22cd416814592a4f9d9205e11affd5b8e10b" | |
| 2745 | + | dependencies = [ | |
| 2746 | + | "num-traits", | |
| 2747 | + | ] | |
| 2748 | + | ||
| 2749 | + | [[package]] | |
| 2750 | + | name = "num-iter" | |
| 2751 | + | version = "0.1.46" | |
| 2752 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 2753 | + | checksum = "c92800bd69a1eac91786bcfe9da64a897eb72911b8dc3095decbd07429e8048b" | |
| 2754 | + | dependencies = [ | |
| 2755 | + | "num-integer", | |
| 2756 | + | "num-traits", | |
| 2757 | + | ] | |
| 2758 | + | ||
| 2495 | 2759 | [[package]] | |
| 2496 | 2760 | name = "num-traits" | |
| 2497 | 2761 | version = "0.2.19" |
| ... | ... | @@ -2821,11 +3086,20 @@ checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" | |
| 2821 | 3086 | dependencies = [ | |
| 2822 | 3087 | "cfg-if", | |
| 2823 | 3088 | "libc", | |
| 2824 | - | "redox_syscall", | |
| 3089 | + | "redox_syscall 0.5.18", | |
| 2825 | 3090 | "smallvec", | |
| 2826 | 3091 | "windows-link", | |
| 2827 | 3092 | ] | |
| 2828 | 3093 | ||
| 3094 | + | [[package]] | |
| 3095 | + | name = "pem-rfc7468" | |
| 3096 | + | version = "0.7.0" | |
| 3097 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 3098 | + | checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" | |
| 3099 | + | dependencies = [ | |
| 3100 | + | "base64ct", | |
| 3101 | + | ] | |
| 3102 | + | ||
| 2829 | 3103 | [[package]] | |
| 2830 | 3104 | name = "percent-encoding" | |
| 2831 | 3105 | version = "2.3.2" |
| ... | ... | @@ -2902,12 +3176,39 @@ dependencies = [ | |
| 2902 | 3176 | "futures-io", | |
| 2903 | 3177 | ] | |
| 2904 | 3178 | ||
| 3179 | + | [[package]] | |
| 3180 | + | name = "pkcs1" | |
| 3181 | + | version = "0.7.5" | |
| 3182 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 3183 | + | checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" | |
| 3184 | + | dependencies = [ | |
| 3185 | + | "der", | |
| 3186 | + | "pkcs8", | |
| 3187 | + | "spki", | |
| 3188 | + | ] | |
| 3189 | + | ||
| 3190 | + | [[package]] | |
| 3191 | + | name = "pkcs8" | |
| 3192 | + | version = "0.10.2" | |
| 3193 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 3194 | + | checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" | |
| 3195 | + | dependencies = [ | |
| 3196 | + | "der", | |
| 3197 | + | "spki", | |
| 3198 | + | ] | |
| 3199 | + | ||
| 2905 | 3200 | [[package]] | |
| 2906 | 3201 | name = "pkg-config" | |
| 2907 | 3202 | version = "0.3.34" | |
| 2908 | 3203 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 2909 | 3204 | checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" | |
| 2910 | 3205 | ||
| 3206 | + | [[package]] | |
| 3207 | + | name = "plain" | |
| 3208 | + | version = "0.2.3" | |
| 3209 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 3210 | + | checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" | |
| 3211 | + | ||
| 2911 | 3212 | [[package]] | |
| 2912 | 3213 | name = "plist" | |
| 2913 | 3214 | version = "1.10.3" |
| ... | ... | @@ -3143,13 +3444,24 @@ version = "6.0.0" | |
| 3143 | 3444 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 3144 | 3445 | checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" | |
| 3145 | 3446 | ||
| 3447 | + | [[package]] | |
| 3448 | + | name = "rand" | |
| 3449 | + | version = "0.8.8" | |
| 3450 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 3451 | + | checksum = "e058c7de0b26af77780c769414d6257830bb240f3c38477dbc2c16e5f54d6d4c" | |
| 3452 | + | dependencies = [ | |
| 3453 | + | "libc", | |
| 3454 | + | "rand_chacha 0.3.1", | |
| 3455 | + | "rand_core 0.6.4", | |
| 3456 | + | ] | |
| 3457 | + | ||
| 3146 | 3458 | [[package]] | |
| 3147 | 3459 | name = "rand" | |
| 3148 | 3460 | version = "0.9.5" | |
| 3149 | 3461 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 3150 | 3462 | checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41" | |
| 3151 | 3463 | dependencies = [ | |
| 3152 | - | "rand_chacha", | |
| 3464 | + | "rand_chacha 0.9.0", | |
| 3153 | 3465 | "rand_core 0.9.5", | |
| 3154 | 3466 | ] | |
| 3155 | 3467 |
| ... | ... | @@ -3164,6 +3476,16 @@ dependencies = [ | |
| 3164 | 3476 | "rand_core 0.10.1", | |
| 3165 | 3477 | ] | |
| 3166 | 3478 | ||
| 3479 | + | [[package]] | |
| 3480 | + | name = "rand_chacha" | |
| 3481 | + | version = "0.3.1" | |
| 3482 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 3483 | + | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" | |
| 3484 | + | dependencies = [ | |
| 3485 | + | "ppv-lite86", | |
| 3486 | + | "rand_core 0.6.4", | |
| 3487 | + | ] | |
| 3488 | + | ||
| 3167 | 3489 | [[package]] | |
| 3168 | 3490 | name = "rand_chacha" | |
| 3169 | 3491 | version = "0.9.0" |
| ... | ... | @@ -3174,6 +3496,15 @@ dependencies = [ | |
| 3174 | 3496 | "rand_core 0.9.5", | |
| 3175 | 3497 | ] | |
| 3176 | 3498 | ||
| 3499 | + | [[package]] | |
| 3500 | + | name = "rand_core" | |
| 3501 | + | version = "0.6.4" | |
| 3502 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 3503 | + | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" | |
| 3504 | + | dependencies = [ | |
| 3505 | + | "getrandom 0.2.17", | |
| 3506 | + | ] | |
| 3507 | + | ||
| 3177 | 3508 | [[package]] | |
| 3178 | 3509 | name = "rand_core" | |
| 3179 | 3510 | version = "0.9.5" |
| ... | ... | @@ -3213,6 +3544,15 @@ dependencies = [ | |
| 3213 | 3544 | "bitflags 2.13.2", | |
| 3214 | 3545 | ] | |
| 3215 | 3546 | ||
| 3547 | + | [[package]] | |
| 3548 | + | name = "redox_syscall" | |
| 3549 | + | version = "0.9.5" | |
| 3550 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 3551 | + | checksum = "580c875845b41ecb1564ad1ae4703044cef774145e3d7a94dc2b3fa7c97868fd" | |
| 3552 | + | dependencies = [ | |
| 3553 | + | "bitflags 2.13.2", | |
| 3554 | + | ] | |
| 3555 | + | ||
| 3216 | 3556 | [[package]] | |
| 3217 | 3557 | name = "redox_users" | |
| 3218 | 3558 | version = "0.5.3" |
| ... | ... | @@ -3331,6 +3671,43 @@ dependencies = [ | |
| 3331 | 3671 | "windows-sys 0.52.0", | |
| 3332 | 3672 | ] | |
| 3333 | 3673 | ||
| 3674 | + | [[package]] | |
| 3675 | + | name = "rsa" | |
| 3676 | + | version = "0.9.10" | |
| 3677 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 3678 | + | checksum = "b8573f03f5883dcaebdfcf4725caa1ecb9c15b2ef50c43a07b816e06799bb12d" | |
| 3679 | + | dependencies = [ | |
| 3680 | + | "const-oid", | |
| 3681 | + | "digest", | |
| 3682 | + | "num-bigint-dig", | |
| 3683 | + | "num-integer", | |
| 3684 | + | "num-traits", | |
| 3685 | + | "pkcs1", | |
| 3686 | + | "pkcs8", | |
| 3687 | + | "rand_core 0.6.4", | |
| 3688 | + | "signature", | |
| 3689 | + | "spki", | |
| 3690 | + | "subtle", | |
| 3691 | + | "zeroize", | |
| 3692 | + | ] | |
| 3693 | + | ||
| 3694 | + | [[package]] | |
| 3695 | + | name = "rust_decimal" | |
| 3696 | + | version = "1.43.0" | |
| 3697 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 3698 | + | checksum = "7653272e75dcac41dc199fbea6f5797633994fafd339943c06c9af16bf29cd3a" | |
| 3699 | + | dependencies = [ | |
| 3700 | + | "arrayvec", | |
| 3701 | + | "borsh", | |
| 3702 | + | "bytes", | |
| 3703 | + | "num-traits", | |
| 3704 | + | "rand 0.8.8", | |
| 3705 | + | "rand 0.9.5", | |
| 3706 | + | "serde", | |
| 3707 | + | "serde_json", | |
| 3708 | + | "wasm-bindgen", | |
| 3709 | + | ] | |
| 3710 | + | ||
| 3334 | 3711 | [[package]] | |
| 3335 | 3712 | name = "rustc-hash" | |
| 3336 | 3713 | version = "2.1.3" |
| ... | ... | @@ -3442,6 +3819,12 @@ version = "1.0.23" | |
| 3442 | 3819 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 3443 | 3820 | checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" | |
| 3444 | 3821 | ||
| 3822 | + | [[package]] | |
| 3823 | + | name = "ryu" | |
| 3824 | + | version = "1.0.23" | |
| 3825 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 3826 | + | checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" | |
| 3827 | + | ||
| 3445 | 3828 | [[package]] | |
| 3446 | 3829 | name = "same-file" | |
| 3447 | 3830 | version = "1.0.6" |
| ... | ... | @@ -3673,6 +4056,18 @@ dependencies = [ | |
| 3673 | 4056 | "serde_core", | |
| 3674 | 4057 | ] | |
| 3675 | 4058 | ||
| 4059 | + | [[package]] | |
| 4060 | + | name = "serde_urlencoded" | |
| 4061 | + | version = "0.7.1" | |
| 4062 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4063 | + | checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" | |
| 4064 | + | dependencies = [ | |
| 4065 | + | "form_urlencoded", | |
| 4066 | + | "itoa", | |
| 4067 | + | "ryu", | |
| 4068 | + | "serde", | |
| 4069 | + | ] | |
| 4070 | + | ||
| 3676 | 4071 | [[package]] | |
| 3677 | 4072 | name = "serde_with" | |
| 3678 | 4073 | version = "3.24.0" |
| ... | ... | @@ -3775,6 +4170,16 @@ dependencies = [ | |
| 3775 | 4170 | "libc", | |
| 3776 | 4171 | ] | |
| 3777 | 4172 | ||
| 4173 | + | [[package]] | |
| 4174 | + | name = "signature" | |
| 4175 | + | version = "2.2.0" | |
| 4176 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4177 | + | checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" | |
| 4178 | + | dependencies = [ | |
| 4179 | + | "digest", | |
| 4180 | + | "rand_core 0.6.4", | |
| 4181 | + | ] | |
| 4182 | + | ||
| 3778 | 4183 | [[package]] | |
| 3779 | 4184 | name = "simd-adler32" | |
| 3780 | 4185 | version = "0.3.10" |
| ... | ... | @@ -3814,6 +4219,9 @@ name = "smallvec" | |
| 3814 | 4219 | version = "1.16.5" | |
| 3815 | 4220 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 3816 | 4221 | checksum = "149309498a5f7334b12ddae0cad8aba81ce785fe91755068867e017cf98fee46" | |
| 4222 | + | dependencies = [ | |
| 4223 | + | "serde", | |
| 4224 | + | ] | |
| 3817 | 4225 | ||
| 3818 | 4226 | [[package]] | |
| 3819 | 4227 | name = "socket2" |
| ... | ... | @@ -3873,6 +4281,224 @@ dependencies = [ | |
| 3873 | 4281 | "system-deps", | |
| 3874 | 4282 | ] | |
| 3875 | 4283 | ||
| 4284 | + | [[package]] | |
| 4285 | + | name = "spin" | |
| 4286 | + | version = "0.9.9" | |
| 4287 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4288 | + | checksum = "3763264f6b73151db08c50ff20d7d8a0b8796e021cdea7ceedad07b80155fa0e" | |
| 4289 | + | dependencies = [ | |
| 4290 | + | "lock_api", | |
| 4291 | + | ] | |
| 4292 | + | ||
| 4293 | + | [[package]] | |
| 4294 | + | name = "spki" | |
| 4295 | + | version = "0.7.3" | |
| 4296 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4297 | + | checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" | |
| 4298 | + | dependencies = [ | |
| 4299 | + | "base64ct", | |
| 4300 | + | "der", | |
| 4301 | + | ] | |
| 4302 | + | ||
| 4303 | + | [[package]] | |
| 4304 | + | name = "sqlx" | |
| 4305 | + | version = "0.8.6" | |
| 4306 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4307 | + | checksum = "1fefb893899429669dcdd979aff487bd78f4064e5e7907e4269081e0ef7d97dc" | |
| 4308 | + | dependencies = [ | |
| 4309 | + | "sqlx-core", | |
| 4310 | + | "sqlx-macros", | |
| 4311 | + | "sqlx-mysql", | |
| 4312 | + | "sqlx-postgres", | |
| 4313 | + | "sqlx-sqlite", | |
| 4314 | + | ] | |
| 4315 | + | ||
| 4316 | + | [[package]] | |
| 4317 | + | name = "sqlx-core" | |
| 4318 | + | version = "0.8.6" | |
| 4319 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4320 | + | checksum = "ee6798b1838b6a0f69c007c133b8df5866302197e404e8b6ee8ed3e3a5e68dc6" | |
| 4321 | + | dependencies = [ | |
| 4322 | + | "base64 0.22.1", | |
| 4323 | + | "bytes", | |
| 4324 | + | "crc", | |
| 4325 | + | "crossbeam-queue", | |
| 4326 | + | "either", | |
| 4327 | + | "event-listener", | |
| 4328 | + | "futures-core", | |
| 4329 | + | "futures-intrusive", | |
| 4330 | + | "futures-io", | |
| 4331 | + | "futures-util", | |
| 4332 | + | "hashbrown 0.15.5", | |
| 4333 | + | "hashlink", | |
| 4334 | + | "indexmap 2.14.2", | |
| 4335 | + | "log", | |
| 4336 | + | "memchr", | |
| 4337 | + | "once_cell", | |
| 4338 | + | "percent-encoding", | |
| 4339 | + | "rust_decimal", | |
| 4340 | + | "serde", | |
| 4341 | + | "serde_json", | |
| 4342 | + | "sha2", | |
| 4343 | + | "smallvec", | |
| 4344 | + | "thiserror 2.0.21", | |
| 4345 | + | "time", | |
| 4346 | + | "tokio", | |
| 4347 | + | "tokio-stream", | |
| 4348 | + | "tracing", | |
| 4349 | + | "url", | |
| 4350 | + | "uuid", | |
| 4351 | + | ] | |
| 4352 | + | ||
| 4353 | + | [[package]] | |
| 4354 | + | name = "sqlx-macros" | |
| 4355 | + | version = "0.8.6" | |
| 4356 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4357 | + | checksum = "a2d452988ccaacfbf5e0bdbc348fb91d7c8af5bee192173ac3636b5fb6e6715d" | |
| 4358 | + | dependencies = [ | |
| 4359 | + | "proc-macro2", | |
| 4360 | + | "quote", | |
| 4361 | + | "sqlx-core", | |
| 4362 | + | "sqlx-macros-core", | |
| 4363 | + | "syn 2.0.119", | |
| 4364 | + | ] | |
| 4365 | + | ||
| 4366 | + | [[package]] | |
| 4367 | + | name = "sqlx-macros-core" | |
| 4368 | + | version = "0.8.6" | |
| 4369 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4370 | + | checksum = "19a9c1841124ac5a61741f96e1d9e2ec77424bf323962dd894bdb93f37d5219b" | |
| 4371 | + | dependencies = [ | |
| 4372 | + | "dotenvy", | |
| 4373 | + | "either", | |
| 4374 | + | "heck 0.5.0", | |
| 4375 | + | "hex", | |
| 4376 | + | "once_cell", | |
| 4377 | + | "proc-macro2", | |
| 4378 | + | "quote", | |
| 4379 | + | "serde", | |
| 4380 | + | "serde_json", | |
| 4381 | + | "sha2", | |
| 4382 | + | "sqlx-core", | |
| 4383 | + | "sqlx-mysql", | |
| 4384 | + | "sqlx-postgres", | |
| 4385 | + | "sqlx-sqlite", | |
| 4386 | + | "syn 2.0.119", | |
| 4387 | + | "tokio", | |
| 4388 | + | "url", | |
| 4389 | + | ] | |
| 4390 | + | ||
| 4391 | + | [[package]] | |
| 4392 | + | name = "sqlx-mysql" | |
| 4393 | + | version = "0.8.6" | |
| 4394 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4395 | + | checksum = "aa003f0038df784eb8fecbbac13affe3da23b45194bd57dba231c8f48199c526" | |
| 4396 | + | dependencies = [ | |
| 4397 | + | "atoi", | |
| 4398 | + | "base64 0.22.1", | |
| 4399 | + | "bitflags 2.13.2", | |
| 4400 | + | "byteorder", | |
| 4401 | + | "bytes", | |
| 4402 | + | "crc", | |
| 4403 | + | "digest", | |
| 4404 | + | "dotenvy", | |
| 4405 | + | "either", | |
| 4406 | + | "futures-channel", | |
| 4407 | + | "futures-core", | |
| 4408 | + | "futures-io", | |
| 4409 | + | "futures-util", | |
| 4410 | + | "generic-array", | |
| 4411 | + | "hex", | |
| 4412 | + | "hkdf", | |
| 4413 | + | "hmac", | |
| 4414 | + | "itoa", | |
| 4415 | + | "log", | |
| 4416 | + | "md-5", | |
| 4417 | + | "memchr", | |
| 4418 | + | "once_cell", | |
| 4419 | + | "percent-encoding", | |
| 4420 | + | "rand 0.8.8", | |
| 4421 | + | "rsa", | |
| 4422 | + | "rust_decimal", | |
| 4423 | + | "serde", | |
| 4424 | + | "sha1", | |
| 4425 | + | "sha2", | |
| 4426 | + | "smallvec", | |
| 4427 | + | "sqlx-core", | |
| 4428 | + | "stringprep", | |
| 4429 | + | "thiserror 2.0.21", | |
| 4430 | + | "time", | |
| 4431 | + | "tracing", | |
| 4432 | + | "uuid", | |
| 4433 | + | "whoami", | |
| 4434 | + | ] | |
| 4435 | + | ||
| 4436 | + | [[package]] | |
| 4437 | + | name = "sqlx-postgres" | |
| 4438 | + | version = "0.8.6" | |
| 4439 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4440 | + | checksum = "db58fcd5a53cf07c184b154801ff91347e4c30d17a3562a635ff028ad5deda46" | |
| 4441 | + | dependencies = [ | |
| 4442 | + | "atoi", | |
| 4443 | + | "base64 0.22.1", | |
| 4444 | + | "bitflags 2.13.2", | |
| 4445 | + | "byteorder", | |
| 4446 | + | "crc", | |
| 4447 | + | "dotenvy", | |
| 4448 | + | "etcetera", | |
| 4449 | + | "futures-channel", | |
| 4450 | + | "futures-core", | |
| 4451 | + | "futures-util", | |
| 4452 | + | "hex", | |
| 4453 | + | "hkdf", | |
| 4454 | + | "hmac", | |
| 4455 | + | "home", | |
| 4456 | + | "itoa", | |
| 4457 | + | "log", | |
| 4458 | + | "md-5", | |
| 4459 | + | "memchr", | |
| 4460 | + | "once_cell", | |
| 4461 | + | "rand 0.8.8", | |
| 4462 | + | "rust_decimal", | |
| 4463 | + | "serde", | |
| 4464 | + | "serde_json", | |
| 4465 | + | "sha2", | |
| 4466 | + | "smallvec", | |
| 4467 | + | "sqlx-core", | |
| 4468 | + | "stringprep", | |
| 4469 | + | "thiserror 2.0.21", | |
| 4470 | + | "time", | |
| 4471 | + | "tracing", | |
| 4472 | + | "uuid", | |
| 4473 | + | "whoami", | |
| 4474 | + | ] | |
| 4475 | + | ||
| 4476 | + | [[package]] | |
| 4477 | + | name = "sqlx-sqlite" | |
| 4478 | + | version = "0.8.6" | |
| 4479 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4480 | + | checksum = "c2d12fe70b2c1b4401038055f90f151b78208de1f9f89a7dbfd41587a10c3eea" | |
| 4481 | + | dependencies = [ | |
| 4482 | + | "atoi", | |
| 4483 | + | "flume", | |
| 4484 | + | "futures-channel", | |
| 4485 | + | "futures-core", | |
| 4486 | + | "futures-executor", | |
| 4487 | + | "futures-intrusive", | |
| 4488 | + | "futures-util", | |
| 4489 | + | "libsqlite3-sys", | |
| 4490 | + | "log", | |
| 4491 | + | "percent-encoding", | |
| 4492 | + | "serde", | |
| 4493 | + | "serde_urlencoded", | |
| 4494 | + | "sqlx-core", | |
| 4495 | + | "thiserror 2.0.21", | |
| 4496 | + | "time", | |
| 4497 | + | "tracing", | |
| 4498 | + | "url", | |
| 4499 | + | "uuid", | |
| 4500 | + | ] | |
| 4501 | + | ||
| 3876 | 4502 | [[package]] | |
| 3877 | 4503 | name = "stable_deref_trait" | |
| 3878 | 4504 | version = "1.2.1" |
| ... | ... | @@ -3909,6 +4535,17 @@ dependencies = [ | |
| 3909 | 4535 | "quote", | |
| 3910 | 4536 | ] | |
| 3911 | 4537 | ||
| 4538 | + | [[package]] | |
| 4539 | + | name = "stringprep" | |
| 4540 | + | version = "0.1.5" | |
| 4541 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4542 | + | checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" | |
| 4543 | + | dependencies = [ | |
| 4544 | + | "unicode-bidi", | |
| 4545 | + | "unicode-normalization", | |
| 4546 | + | "unicode-properties", | |
| 4547 | + | ] | |
| 4548 | + | ||
| 3912 | 4549 | [[package]] | |
| 3913 | 4550 | name = "strsim" | |
| 3914 | 4551 | version = "0.11.1" |
| ... | ... | @@ -4253,6 +4890,27 @@ dependencies = [ | |
| 4253 | 4890 | "zbus 5.19.0", | |
| 4254 | 4891 | ] | |
| 4255 | 4892 | ||
| 4893 | + | [[package]] | |
| 4894 | + | name = "tauri-plugin-sql" | |
| 4895 | + | version = "2.6.0" | |
| 4896 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4897 | + | checksum = "ed265036ad01e492a6bf6ae269267dd37dae4419ac0a80dbd93d275c763bb32d" | |
| 4898 | + | dependencies = [ | |
| 4899 | + | "futures-core", | |
| 4900 | + | "indexmap 2.14.2", | |
| 4901 | + | "log", | |
| 4902 | + | "rust_decimal", | |
| 4903 | + | "serde", | |
| 4904 | + | "serde_json", | |
| 4905 | + | "sqlx", | |
| 4906 | + | "tauri", | |
| 4907 | + | "tauri-plugin", | |
| 4908 | + | "thiserror 2.0.21", | |
| 4909 | + | "time", | |
| 4910 | + | "tokio", | |
| 4911 | + | "uuid", | |
| 4912 | + | ] | |
| 4913 | + | ||
| 4256 | 4914 | [[package]] | |
| 4257 | 4915 | name = "tauri-runtime" | |
| 4258 | 4916 | version = "2.12.2" |
| ... | ... | @@ -4510,6 +5168,17 @@ dependencies = [ | |
| 4510 | 5168 | "tokio", | |
| 4511 | 5169 | ] | |
| 4512 | 5170 | ||
| 5171 | + | [[package]] | |
| 5172 | + | name = "tokio-stream" | |
| 5173 | + | version = "0.1.19" | |
| 5174 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 5175 | + | checksum = "a3d06f0b082ba57c26b79407372e57cf2a1e28124f78e9479fe80322cf53420b" | |
| 5176 | + | dependencies = [ | |
| 5177 | + | "futures-core", | |
| 5178 | + | "pin-project-lite", | |
| 5179 | + | "tokio", | |
| 5180 | + | ] | |
| 5181 | + | ||
| 4513 | 5182 | [[package]] | |
| 4514 | 5183 | name = "tokio-util" | |
| 4515 | 5184 | version = "0.7.20" |
| ... | ... | @@ -4699,6 +5368,7 @@ version = "0.1.44" | |
| 4699 | 5368 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4700 | 5369 | checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" | |
| 4701 | 5370 | dependencies = [ | |
| 5371 | + | "log", | |
| 4702 | 5372 | "pin-project-lite", | |
| 4703 | 5373 | "tracing-attributes", | |
| 4704 | 5374 | "tracing-core", |
| ... | ... | @@ -4775,12 +5445,33 @@ dependencies = [ | |
| 4775 | 5445 | "windows-sys 0.61.2", | |
| 4776 | 5446 | ] | |
| 4777 | 5447 | ||
| 5448 | + | [[package]] | |
| 5449 | + | name = "unicode-bidi" | |
| 5450 | + | version = "0.3.18" | |
| 5451 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 5452 | + | checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" | |
| 5453 | + | ||
| 4778 | 5454 | [[package]] | |
| 4779 | 5455 | name = "unicode-ident" | |
| 4780 | 5456 | version = "1.0.27" | |
| 4781 | 5457 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4782 | 5458 | checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563" | |
| 4783 | 5459 | ||
| 5460 | + | [[package]] | |
| 5461 | + | name = "unicode-normalization" | |
| 5462 | + | version = "0.1.26" | |
| 5463 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 5464 | + | checksum = "75cd3fb03d5288b3ba9a1ee103ac7e9cbb59f0b03d64f8ddfcc04dd42758a85d" | |
| 5465 | + | dependencies = [ | |
| 5466 | + | "tinyvec", | |
| 5467 | + | ] | |
| 5468 | + | ||
| 5469 | + | [[package]] | |
| 5470 | + | name = "unicode-properties" | |
| 5471 | + | version = "0.1.5" | |
| 5472 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 5473 | + | checksum = "993ad287eb20e8ba755312801cfe1413e0f25d604075863acaddca10b04c1833" | |
| 5474 | + | ||
| 4784 | 5475 | [[package]] | |
| 4785 | 5476 | name = "unicode-segmentation" | |
| 4786 | 5477 | version = "1.13.3" |
| ... | ... | @@ -4845,6 +5536,12 @@ dependencies = [ | |
| 4845 | 5536 | "wasm-bindgen", | |
| 4846 | 5537 | ] | |
| 4847 | 5538 | ||
| 5539 | + | [[package]] | |
| 5540 | + | name = "vcpkg" | |
| 5541 | + | version = "0.2.15" | |
| 5542 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 5543 | + | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" | |
| 5544 | + | ||
| 4848 | 5545 | [[package]] | |
| 4849 | 5546 | name = "version-compare" | |
| 4850 | 5547 | version = "0.2.1" |
| ... | ... | @@ -4911,6 +5608,12 @@ dependencies = [ | |
| 4911 | 5608 | "wit-bindgen", | |
| 4912 | 5609 | ] | |
| 4913 | 5610 | ||
| 5611 | + | [[package]] | |
| 5612 | + | name = "wasite" | |
| 5613 | + | version = "0.1.0" | |
| 5614 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 5615 | + | checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" | |
| 5616 | + | ||
| 4914 | 5617 | [[package]] | |
| 4915 | 5618 | name = "wasm-bindgen" | |
| 4916 | 5619 | version = "0.2.130" |
| ... | ... | @@ -5140,6 +5844,16 @@ dependencies = [ | |
| 5140 | 5844 | "windows-core", | |
| 5141 | 5845 | ] | |
| 5142 | 5846 | ||
| 5847 | + | [[package]] | |
| 5848 | + | name = "whoami" | |
| 5849 | + | version = "1.6.1" | |
| 5850 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 5851 | + | checksum = "5d4a4db5077702ca3015d3d02d74974948aba2ad9e12ab7df718ee64ccd7e97d" | |
| 5852 | + | dependencies = [ | |
| 5853 | + | "libredox", | |
| 5854 | + | "wasite", | |
| 5855 | + | ] | |
| 5856 | + | ||
| 5143 | 5857 | [[package]] | |
| 5144 | 5858 | name = "widestring" | |
| 5145 | 5859 | version = "1.2.1" |
| ... | ... | @@ -5314,6 +6028,15 @@ dependencies = [ | |
| 5314 | 6028 | "windows-targets 0.42.2", | |
| 5315 | 6029 | ] | |
| 5316 | 6030 | ||
| 6031 | + | [[package]] | |
| 6032 | + | name = "windows-sys" | |
| 6033 | + | version = "0.48.0" | |
| 6034 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 6035 | + | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" | |
| 6036 | + | dependencies = [ | |
| 6037 | + | "windows-targets 0.48.5", | |
| 6038 | + | ] | |
| 6039 | + | ||
| 5317 | 6040 | [[package]] | |
| 5318 | 6041 | name = "windows-sys" | |
| 5319 | 6042 | version = "0.52.0" |
| ... | ... | @@ -5347,6 +6070,21 @@ dependencies = [ | |
| 5347 | 6070 | "windows_x86_64_msvc 0.42.2", | |
| 5348 | 6071 | ] | |
| 5349 | 6072 | ||
| 6073 | + | [[package]] | |
| 6074 | + | name = "windows-targets" | |
| 6075 | + | version = "0.48.5" | |
| 6076 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 6077 | + | checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" | |
| 6078 | + | dependencies = [ | |
| 6079 | + | "windows_aarch64_gnullvm 0.48.5", | |
| 6080 | + | "windows_aarch64_msvc 0.48.5", | |
| 6081 | + | "windows_i686_gnu 0.48.5", | |
| 6082 | + | "windows_i686_msvc 0.48.5", | |
| 6083 | + | "windows_x86_64_gnu 0.48.5", | |
| 6084 | + | "windows_x86_64_gnullvm 0.48.5", | |
| 6085 | + | "windows_x86_64_msvc 0.48.5", | |
| 6086 | + | ] | |
| 6087 | + | ||
| 5350 | 6088 | [[package]] | |
| 5351 | 6089 | name = "windows-targets" | |
| 5352 | 6090 | version = "0.52.6" |
| ... | ... | @@ -5387,6 +6125,12 @@ version = "0.42.2" | |
| 5387 | 6125 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 5388 | 6126 | checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" | |
| 5389 | 6127 | ||
| 6128 | + | [[package]] | |
| 6129 | + | name = "windows_aarch64_gnullvm" | |
| 6130 | + | version = "0.48.5" | |
| 6131 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 6132 | + | checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" | |
| 6133 | + | ||
| 5390 | 6134 | [[package]] | |
| 5391 | 6135 | name = "windows_aarch64_gnullvm" | |
| 5392 | 6136 | version = "0.52.6" |
| ... | ... | @@ -5399,6 +6143,12 @@ version = "0.42.2" | |
| 5399 | 6143 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 5400 | 6144 | checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" | |
| 5401 | 6145 | ||
| 6146 | + | [[package]] | |
| 6147 | + | name = "windows_aarch64_msvc" | |
| 6148 | + | version = "0.48.5" | |
| 6149 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 6150 | + | checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" | |
| 6151 | + | ||
| 5402 | 6152 | [[package]] | |
| 5403 | 6153 | name = "windows_aarch64_msvc" | |
| 5404 | 6154 | version = "0.52.6" |
| ... | ... | @@ -5411,6 +6161,12 @@ version = "0.42.2" | |
| 5411 | 6161 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 5412 | 6162 | checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" | |
| 5413 | 6163 | ||
| 6164 | + | [[package]] | |
| 6165 | + | name = "windows_i686_gnu" | |
| 6166 | + | version = "0.48.5" | |
| 6167 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 6168 | + | checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" | |
| 6169 | + | ||
| 5414 | 6170 | [[package]] | |
| 5415 | 6171 | name = "windows_i686_gnu" | |
| 5416 | 6172 | version = "0.52.6" |
| ... | ... | @@ -5429,6 +6185,12 @@ version = "0.42.2" | |
| 5429 | 6185 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 5430 | 6186 | checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" | |
| 5431 | 6187 | ||
| 6188 | + | [[package]] | |
| 6189 | + | name = "windows_i686_msvc" | |
| 6190 | + | version = "0.48.5" | |
| 6191 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 6192 | + | checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" | |
| 6193 | + | ||
| 5432 | 6194 | [[package]] | |
| 5433 | 6195 | name = "windows_i686_msvc" | |
| 5434 | 6196 | version = "0.52.6" |
| ... | ... | @@ -5441,6 +6203,12 @@ version = "0.42.2" | |
| 5441 | 6203 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 5442 | 6204 | checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" | |
| 5443 | 6205 | ||
| 6206 | + | [[package]] | |
| 6207 | + | name = "windows_x86_64_gnu" | |
| 6208 | + | version = "0.48.5" | |
| 6209 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 6210 | + | checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" | |
| 6211 | + | ||
| 5444 | 6212 | [[package]] | |
| 5445 | 6213 | name = "windows_x86_64_gnu" | |
| 5446 | 6214 | version = "0.52.6" |
| ... | ... | @@ -5453,6 +6221,12 @@ version = "0.42.2" | |
| 5453 | 6221 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 5454 | 6222 | checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" | |
| 5455 | 6223 | ||
| 6224 | + | [[package]] | |
| 6225 | + | name = "windows_x86_64_gnullvm" | |
| 6226 | + | version = "0.48.5" | |
| 6227 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 6228 | + | checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" | |
| 6229 | + | ||
| 5456 | 6230 | [[package]] | |
| 5457 | 6231 | name = "windows_x86_64_gnullvm" | |
| 5458 | 6232 | version = "0.52.6" |
| ... | ... | @@ -5465,6 +6239,12 @@ version = "0.42.2" | |
| 5465 | 6239 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 5466 | 6240 | checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" | |
| 5467 | 6241 | ||
| 6242 | + | [[package]] | |
| 6243 | + | name = "windows_x86_64_msvc" | |
| 6244 | + | version = "0.48.5" | |
| 6245 | + | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 6246 | + | checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" | |
| 6247 | + | ||
| 5468 | 6248 | [[package]] | |
| 5469 | 6249 | name = "windows_x86_64_msvc" | |
| 5470 | 6250 | version = "0.52.6" |
+1
-0
src-tauri/Cargo.toml
#
+9
-1
src-tauri/capabilities/default.json
#
| ... | ... | @@ -3,5 +3,13 @@ | |
| 3 | 3 | "identifier": "default", | |
| 4 | 4 | "description": "enables the default permissions", | |
| 5 | 5 | "windows": ["main"], | |
| 6 | - | "permissions": ["core:default", "opener:default", "notification:default", "core:window:allow-show", "core:window:allow-unminimize", "core:window:allow-set-focus"] | |
| 6 | + | "permissions": [ | |
| 7 | + | "core:default", | |
| 8 | + | "opener:default", | |
| 9 | + | "notification:default", | |
| 10 | + | "sql:default", | |
| 11 | + | "core:window:allow-show", | |
| 12 | + | "core:window:allow-unminimize", | |
| 13 | + | "core:window:allow-set-focus" | |
| 14 | + | ] | |
| 7 | 15 | } |
+2
-0
src-tauri/src/lib.rs
#
| ... | ... | @@ -10,6 +10,7 @@ pub fn run() { | |
| 10 | 10 | tauri::Builder::default() | |
| 11 | 11 | .plugin(tauri_plugin_opener::init()) | |
| 12 | 12 | .plugin(tauri_plugin_notification::init()) | |
| 13 | + | .plugin(tauri_plugin_sql::Builder::default().build()) | |
| 13 | 14 | .manage(XmppState::default()) | |
| 14 | 15 | .invoke_handler(tauri::generate_handler![ | |
| 15 | 16 | media::begin_media, |
+11
-1
src/App.tsx
#
| ... | ... | @@ -21,6 +21,7 @@ import { SettingsContext, SettingsData } from "./components/Settings"; | |
| 21 | 21 | import { Call } from "./components/Call"; | |
| 22 | 22 | import { LoginRequest } from "./components/LoginRequest"; | |
| 23 | 23 | import { mediaStore } from "./media-store"; | |
| 24 | + | import { SqliteDriverTauri } from "./sqlite-driver-tauri"; | |
| 24 | 25 | ||
| 25 | 26 | Sentry.init({ | |
| 26 | 27 | dsn: "https://ec9ae5aef68e4035937d4c5943c4156c@app.glitchtip.com/7125", |
| ... | ... | @@ -39,7 +40,16 @@ Sentry.init({ | |
| 39 | 40 | ||
| 40 | 41 | const idbp = await borogove.persistence.IDB("snikket", mediaStore, null, stem); | |
| 41 | 42 | let persistence = null; | |
| 42 | - | if (typeof navigator.storage?.getDirectory === "function" && (webkit || ios)) { | |
| 43 | + | if (isTauri()) { | |
| 44 | + | persistence = new borogoveSqlite( | |
| 45 | + | "db.sqlite3", | |
| 46 | + | mediaStore, | |
| 47 | + | (file, migrate) => new SqliteDriverTauri(file, migrate), | |
| 48 | + | ); | |
| 49 | + | } else if ( | |
| 50 | + | typeof navigator.storage?.getDirectory === "function" && | |
| 51 | + | (webkit || ios) | |
| 52 | + | ) { | |
| 43 | 53 | persistence = new borogoveSqlite("snikket.sqlite3", mediaStore); | |
| 44 | 54 | mediaStore.setKV(idbp); // Use IDB for media KV for now because we can't use opfs-sahpool from service worker | |
| 45 | 55 | } else { |
+34
-0
src/sqlite-driver-tauri.test.ts
#
| ... | ... | @@ -0,0 +1,34 @@ | |
| 1 | + | // @vitest-environment jsdom | |
| 2 | + | import { clearMocks, mockIPC } from "@tauri-apps/api/mocks"; | |
| 3 | + | import { afterEach, expect, it } from "vitest"; | |
| 4 | + | import { SqliteDriverTauri } from "./sqlite-driver-tauri"; | |
| 5 | + | ||
| 6 | + | afterEach(clearMocks); | |
| 7 | + | ||
| 8 | + | it("converts BLOB byte arrays into ArrayBuffers", async () => { | |
| 9 | + | const data = [0, 128, 255]; | |
| 10 | + | mockIPC((command) => { | |
| 11 | + | switch (command) { | |
| 12 | + | case "plugin:path|resolve_directory": | |
| 13 | + | return "/app/data"; | |
| 14 | + | case "plugin:path|join": | |
| 15 | + | return "/app/data/test.db"; | |
| 16 | + | case "plugin:sql|load": | |
| 17 | + | return "sqlite:/app/data/test.db"; | |
| 18 | + | case "plugin:sql|select": | |
| 19 | + | return [{ data, empty: [], name: "test", count: 3, absent: null }]; | |
| 20 | + | default: | |
| 21 | + | throw new Error(`Unexpected IPC command: ${command}`); | |
| 22 | + | } | |
| 23 | + | }); | |
| 24 | + | const driver = new SqliteDriverTauri("test.db", async () => {}); | |
| 25 | + | const [row] = await driver.exec("SELECT * FROM kv"); | |
| 26 | + | ||
| 27 | + | expect(row).toEqual({ | |
| 28 | + | data: new Uint8Array(data).buffer, | |
| 29 | + | empty: new ArrayBuffer(0), | |
| 30 | + | name: "test", | |
| 31 | + | count: 3, | |
| 32 | + | absent: null, | |
| 33 | + | }); | |
| 34 | + | }); |
+46
-0
src/sqlite-driver-tauri.ts
#
| ... | ... | @@ -0,0 +1,46 @@ | |
| 1 | + | import Database from "@tauri-apps/plugin-sql"; | |
| 2 | + | import { appDataDir, join } from "@tauri-apps/api/path"; | |
| 3 | + | import { borogove_persistence_Sqlite as Sqlite } from "borogove/sqlite-wasm"; | |
| 4 | + | ||
| 5 | + | type Query = { sql: string; params?: unknown[] }; | |
| 6 | + | type Row = Record<string, unknown>; | |
| 7 | + | ||
| 8 | + | export class SqliteDriverTauri { | |
| 9 | + | private readonly db: Promise<Database>; | |
| 10 | + | ||
| 11 | + | constructor( | |
| 12 | + | dbfile: string, | |
| 13 | + | migrate: (exec: (sql: string[]) => Promise<Row[]>) => Promise<unknown>, | |
| 14 | + | ) { | |
| 15 | + | this.db = appDataDir().then(async (directory) => { | |
| 16 | + | const path = await join(directory, dbfile); | |
| 17 | + | const db = await Database.load(`sqlite:${path}`); | |
| 18 | + | await migrate((sql) => | |
| 19 | + | this.execute( | |
| 20 | + | db, | |
| 21 | + | sql.map((sql) => ({ sql })), | |
| 22 | + | ), | |
| 23 | + | ); | |
| 24 | + | return db; | |
| 25 | + | }); | |
| 26 | + | } | |
| 27 | + | ||
| 28 | + | private async execute(db: Database, qs: Query[]): Promise<Row[]> { | |
| 29 | + | const sql = qs.map((q) => Sqlite.prepare(q)).join(";"); | |
| 30 | + | const rows = await db.select<Row[]>(sql); | |
| 31 | + | for (const row of rows) { | |
| 32 | + | for (const key of Object.keys(row)) { | |
| 33 | + | if (Array.isArray(row[key])) row[key] = new Uint8Array(row[key]).buffer; | |
| 34 | + | } | |
| 35 | + | } | |
| 36 | + | return rows; | |
| 37 | + | } | |
| 38 | + | ||
| 39 | + | async execMany(qs: Query[]) { | |
| 40 | + | return this.execute(await this.db, qs); | |
| 41 | + | } | |
| 42 | + | ||
| 43 | + | exec(sql: Query["sql"], params?: Query["params"]) { | |
| 44 | + | return this.execMany([{ sql, params }]); | |
| 45 | + | } | |
| 46 | + | } |