this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Replace better-sqlite3 with libsql

futurGH 7ddc1b65 a38a6da7

+97 -222
+2 -3
package.json
··· 26 26 "./scripts": "./dist/scripts/index.js" 27 27 }, 28 28 "devDependencies": { 29 - "@types/better-sqlite3": "^7.6.11", 30 29 "@types/node": "^20.11.19", 31 30 "@types/prompts": "^2.4.9", 32 31 "@types/ws": "^8.5.12", ··· 38 37 }, 39 38 "dependencies": { 40 39 "@atcute/bluesky": "^1.0.7", 41 - "@atcute/ozone": "^1.0.4", 42 40 "@atcute/cbor": "^1.0.2", 43 41 "@atcute/client": "^2.0.3", 42 + "@atcute/ozone": "^1.0.4", 44 43 "@fastify/websocket": "^10.0.1", 45 44 "@noble/curves": "^1.6.0", 46 45 "@noble/hashes": "^1.5.0", 47 - "better-sqlite3": "^11.1.2", 48 46 "fastify": "^4.28.1", 47 + "libsql": "^0.4.6", 49 48 "prompts": "^2.4.2", 50 49 "uint8arrays": "^5.1.0" 51 50 },
+84 -210
pnpm-lock.yaml
··· 29 29 '@noble/hashes': 30 30 specifier: ^1.5.0 31 31 version: 1.5.0 32 - better-sqlite3: 33 - specifier: ^11.1.2 34 - version: 11.1.2 35 32 fastify: 36 33 specifier: ^4.28.1 37 34 version: 4.28.1 35 + libsql: 36 + specifier: ^0.4.6 37 + version: 0.4.6 38 38 prompts: 39 39 specifier: ^2.4.2 40 40 version: 2.4.2 ··· 42 42 specifier: ^5.1.0 43 43 version: 5.1.0 44 44 devDependencies: 45 - '@types/better-sqlite3': 46 - specifier: ^7.6.11 47 - version: 7.6.11 48 45 '@types/node': 49 46 specifier: ^20.11.19 50 47 version: 20.11.19 ··· 176 173 '@humanwhocodes/object-schema@2.0.2': 177 174 resolution: {integrity: sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==} 178 175 176 + '@libsql/darwin-arm64@0.4.6': 177 + resolution: {integrity: sha512-45i604CJ2Lubbg7NqtDodjarF6VgST8rS5R8xB++MoRqixtDns9PZ6tocT9pRJDWuTWEiy2sjthPOFWMKwYAsg==} 178 + cpu: [arm64] 179 + os: [darwin] 180 + 181 + '@libsql/darwin-x64@0.4.6': 182 + resolution: {integrity: sha512-dRKliflhfr5zOPSNgNJ6C2nZDd4YA8bTXF3MUNqNkcxQ8BffaH9uUwL9kMq89LkFIZQHcyP75bBgZctxfJ/H5Q==} 183 + cpu: [x64] 184 + os: [darwin] 185 + 186 + '@libsql/linux-arm64-gnu@0.4.6': 187 + resolution: {integrity: sha512-DMPavVyY6vYPAYcQR1iOotHszg+5xSjHSg6F9kNecPX0KKdGq84zuPJmORfKOPtaWvzPewNFdML/e+s1fu09XQ==} 188 + cpu: [arm64] 189 + os: [linux] 190 + 191 + '@libsql/linux-arm64-musl@0.4.6': 192 + resolution: {integrity: sha512-whuHSYAZyclGjM3L0mKGXyWqdAy7qYvPPn+J1ve7FtGkFlM0DiIPjA5K30aWSGJSRh72sD9DBZfnu8CpfSjT6w==} 193 + cpu: [arm64] 194 + os: [linux] 195 + 196 + '@libsql/linux-x64-gnu@0.4.6': 197 + resolution: {integrity: sha512-0ggx+5RwEbYabIlDBBAvavdfIJCZ757u6nDZtBeQIhzW99EKbWG3lvkXHM3qudFb/pDWSUY4RFBm6vVtF1cJGA==} 198 + cpu: [x64] 199 + os: [linux] 200 + 201 + '@libsql/linux-x64-musl@0.4.6': 202 + resolution: {integrity: sha512-SWNrv7Hz72QWlbM/ZsbL35MPopZavqCUmQz2HNDZ55t0F+kt8pXuP+bbI2KvmaQ7wdsoqAA4qBmjol0+bh4ndw==} 203 + cpu: [x64] 204 + os: [linux] 205 + 206 + '@libsql/win32-x64-msvc@0.4.6': 207 + resolution: {integrity: sha512-Q0axn110zDNELfkEog3Nl8p9BU4eI/UvgaHevGyOiSDN7s0KPfj0j6jwVHk4oz3o/d/Gg3DRIxomZ4ftfTOy/g==} 208 + cpu: [x64] 209 + os: [win32] 210 + 211 + '@neon-rs/load@0.0.4': 212 + resolution: {integrity: sha512-kTPhdZyTQxB+2wpiRcFWrDcejc4JI6tkPuS7UZCG4l6Zvc5kU/gGQ/ozvHTh1XR5tS+UlfAfGuPajjzQjCiHCw==} 213 + 179 214 '@noble/curves@1.6.0': 180 215 resolution: {integrity: sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ==} 181 216 engines: {node: ^14.21.3 || >=16} ··· 195 230 '@nodelib/fs.walk@1.2.8': 196 231 resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} 197 232 engines: {node: '>= 8'} 198 - 199 - '@types/better-sqlite3@7.6.11': 200 - resolution: {integrity: sha512-i8KcD3PgGtGBLl3+mMYA8PdKkButvPyARxA7IQAd6qeslht13qxb1zzO8dRCtE7U3IoJS782zDBAeoKiM695kg==} 201 233 202 234 '@types/json-schema@7.0.15': 203 235 resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} ··· 339 371 base64-js@1.5.1: 340 372 resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} 341 373 342 - better-sqlite3@11.1.2: 343 - resolution: {integrity: sha512-gujtFwavWU4MSPT+h9B+4pkvZdyOUkH54zgLdIrMmmmd4ZqiBIrRNBzNzYVFO417xo882uP5HBu4GjOfaSrIQw==} 344 - 345 - bindings@1.5.0: 346 - resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==} 347 - 348 - bl@4.1.0: 349 - resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} 350 - 351 374 brace-expansion@1.1.11: 352 375 resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} 353 376 354 377 braces@3.0.2: 355 378 resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} 356 379 engines: {node: '>=8'} 357 - 358 - buffer@5.7.1: 359 - resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} 360 380 361 381 buffer@6.0.3: 362 382 resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} ··· 369 389 resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} 370 390 engines: {node: '>=10'} 371 391 372 - chownr@1.1.4: 373 - resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} 374 - 375 392 color-convert@2.0.1: 376 393 resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} 377 394 engines: {node: '>=7.0.0'} ··· 399 416 supports-color: 400 417 optional: true 401 418 402 - decompress-response@6.0.0: 403 - resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} 404 - engines: {node: '>=10'} 405 - 406 - deep-extend@0.6.0: 407 - resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} 408 - engines: {node: '>=4.0.0'} 409 - 410 419 deep-is@0.1.4: 411 420 resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} 412 421 413 - detect-libc@2.0.3: 414 - resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==} 422 + detect-libc@2.0.2: 423 + resolution: {integrity: sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==} 415 424 engines: {node: '>=8'} 416 425 417 426 dir-glob@3.0.1: ··· 477 486 resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} 478 487 engines: {node: '>=0.8.x'} 479 488 480 - expand-template@2.0.3: 481 - resolution: {integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==} 482 - engines: {node: '>=6'} 483 - 484 489 fast-content-type-parse@1.1.0: 485 490 resolution: {integrity: sha512-fBHHqSTFLVnR61C+gltJuE5GkVQMV0S2nqUO8TJ+5Z3qAKG8vAx4FKai1s5jq/inV1+sREynIWSuQ6HgoSXpDQ==} 486 491 ··· 528 533 file-entry-cache@6.0.1: 529 534 resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} 530 535 engines: {node: ^10.12.0 || >=12.0.0} 531 - 532 - file-uri-to-path@1.0.0: 533 - resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==} 534 536 535 537 fill-range@7.0.1: 536 538 resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} ··· 558 560 fp16@0.3.0: 559 561 resolution: {integrity: sha512-Iw6hLaH345EETQGU56NiAcJ173IraDRdJrVy+0fBMPdkZhzKNN/k3eqXFyNmnyx2/jnIzF2nr0mHh5nHrQBMEQ==} 560 562 561 - fs-constants@1.0.0: 562 - resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} 563 - 564 563 fs.realpath@1.0.0: 565 564 resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} 566 - 567 - github-from-package@0.0.0: 568 - resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==} 569 565 570 566 glob-parent@5.1.2: 571 567 resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} ··· 613 609 614 610 inherits@2.0.4: 615 611 resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} 616 - 617 - ini@1.3.8: 618 - resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} 619 612 620 613 ipaddr.js@1.9.1: 621 614 resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} ··· 670 663 resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} 671 664 engines: {node: '>= 0.8.0'} 672 665 666 + libsql@0.4.6: 667 + resolution: {integrity: sha512-F5M+ltteK6dCcpjMahrkgT96uFJvVI8aQ4r9f2AzHQjC7BkAYtvfMSTWGvRBezRgMUIU2h1Sy0pF9nOGOD5iyA==} 668 + os: [darwin, linux, win32] 669 + 673 670 light-my-request@5.13.0: 674 671 resolution: {integrity: sha512-9IjUN9ZyCS9pTG+KqTDEQo68Sui2lHsYBrfMyVUTTZ3XhH8PMZq7xO94Kr+eP9dhi/kcKsx4N41p2IXEBil1pQ==} 675 672 ··· 692 689 resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} 693 690 engines: {node: '>=8.6'} 694 691 695 - mimic-response@3.1.0: 696 - resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} 697 - engines: {node: '>=10'} 698 - 699 692 minimatch@3.1.2: 700 693 resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} 701 694 702 - minimist@1.2.8: 703 - resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} 704 - 705 - mkdirp-classic@0.5.3: 706 - resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==} 707 - 708 695 ms@2.1.2: 709 696 resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} 710 697 711 698 multiformats@13.2.2: 712 699 resolution: {integrity: sha512-RWI+nyf0q64vyOxL8LbKtjJMki0sogRL/8axvklNtiTM0iFCVtHwME9w6+0P1/v4dQvsIg8A45oT3ka1t/M/+A==} 713 700 714 - napi-build-utils@1.0.2: 715 - resolution: {integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==} 716 - 717 701 natural-compare@1.4.0: 718 702 resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} 719 703 720 - node-abi@3.65.0: 721 - resolution: {integrity: sha512-ThjYBfoDNr08AWx6hGaRbfPwxKV9kVzAzOzlLKbk2CuqXE2xnCh+cbAGnwM3t8Lq4v9rUB7VfondlkBckcJrVA==} 722 - engines: {node: '>=10'} 723 - 724 704 on-exit-leak-free@2.1.2: 725 705 resolution: {integrity: sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==} 726 706 engines: {node: '>=14.0.0'} ··· 774 754 resolution: {integrity: sha512-WtARBjgZ7LNEkrGWxMBN/jvlFiE17LTbBoH0konmBU684Kd0uIiDwBXlcTCW7iJnA6HfIKwUssS/2AC6cDEanw==} 775 755 hasBin: true 776 756 777 - prebuild-install@7.1.2: 778 - resolution: {integrity: sha512-UnNke3IQb6sgarcZIDU3gbMeTp/9SSU1DAIkil7PrqG1vZlBtY5msYccSKSHDqa3hNg436IXK+SNImReuA1wEQ==} 779 - engines: {node: '>=10'} 780 - hasBin: true 781 - 782 757 prelude-ls@1.2.1: 783 758 resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} 784 759 engines: {node: '>= 0.8.0'} ··· 801 776 resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} 802 777 engines: {node: '>= 0.10'} 803 778 804 - pump@3.0.0: 805 - resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} 806 - 807 779 punycode@2.3.1: 808 780 resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} 809 781 engines: {node: '>=6'} ··· 813 785 814 786 quick-format-unescaped@4.0.4: 815 787 resolution: {integrity: sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==} 816 - 817 - rc@1.2.8: 818 - resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} 819 - hasBin: true 820 788 821 789 readable-stream@3.6.2: 822 790 resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} ··· 885 853 resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} 886 854 engines: {node: '>=8'} 887 855 888 - simple-concat@1.0.1: 889 - resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==} 890 - 891 - simple-get@4.0.1: 892 - resolution: {integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==} 893 - 894 856 sisteransi@1.0.5: 895 857 resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} 896 858 ··· 915 877 resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} 916 878 engines: {node: '>=8'} 917 879 918 - strip-json-comments@2.0.1: 919 - resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} 920 - engines: {node: '>=0.10.0'} 921 - 922 880 strip-json-comments@3.1.1: 923 881 resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} 924 882 engines: {node: '>=8'} ··· 927 885 resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} 928 886 engines: {node: '>=8'} 929 887 930 - tar-fs@2.1.1: 931 - resolution: {integrity: sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==} 932 - 933 - tar-stream@2.2.0: 934 - resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} 935 - engines: {node: '>=6'} 936 - 937 888 text-table@0.2.0: 938 889 resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} 939 890 ··· 953 904 engines: {node: '>=16'} 954 905 peerDependencies: 955 906 typescript: '>=4.2.0' 956 - 957 - tunnel-agent@0.6.0: 958 - resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} 959 907 960 908 type-check@0.4.0: 961 909 resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} ··· 1117 1065 1118 1066 '@humanwhocodes/object-schema@2.0.2': {} 1119 1067 1068 + '@libsql/darwin-arm64@0.4.6': 1069 + optional: true 1070 + 1071 + '@libsql/darwin-x64@0.4.6': 1072 + optional: true 1073 + 1074 + '@libsql/linux-arm64-gnu@0.4.6': 1075 + optional: true 1076 + 1077 + '@libsql/linux-arm64-musl@0.4.6': 1078 + optional: true 1079 + 1080 + '@libsql/linux-x64-gnu@0.4.6': 1081 + optional: true 1082 + 1083 + '@libsql/linux-x64-musl@0.4.6': 1084 + optional: true 1085 + 1086 + '@libsql/win32-x64-msvc@0.4.6': 1087 + optional: true 1088 + 1089 + '@neon-rs/load@0.0.4': {} 1090 + 1120 1091 '@noble/curves@1.6.0': 1121 1092 dependencies: 1122 1093 '@noble/hashes': 1.5.0 ··· 1134 1105 dependencies: 1135 1106 '@nodelib/fs.scandir': 2.1.5 1136 1107 fastq: 1.17.1 1137 - 1138 - '@types/better-sqlite3@7.6.11': 1139 - dependencies: 1140 - '@types/node': 20.11.19 1141 1108 1142 1109 '@types/json-schema@7.0.15': {} 1143 1110 ··· 1296 1263 1297 1264 base64-js@1.5.1: {} 1298 1265 1299 - better-sqlite3@11.1.2: 1300 - dependencies: 1301 - bindings: 1.5.0 1302 - prebuild-install: 7.1.2 1303 - 1304 - bindings@1.5.0: 1305 - dependencies: 1306 - file-uri-to-path: 1.0.0 1307 - 1308 - bl@4.1.0: 1309 - dependencies: 1310 - buffer: 5.7.1 1311 - inherits: 2.0.4 1312 - readable-stream: 3.6.2 1313 - 1314 1266 brace-expansion@1.1.11: 1315 1267 dependencies: 1316 1268 balanced-match: 1.0.2 ··· 1320 1272 dependencies: 1321 1273 fill-range: 7.0.1 1322 1274 1323 - buffer@5.7.1: 1324 - dependencies: 1325 - base64-js: 1.5.1 1326 - ieee754: 1.2.1 1327 - 1328 1275 buffer@6.0.3: 1329 1276 dependencies: 1330 1277 base64-js: 1.5.1 ··· 1337 1284 ansi-styles: 4.3.0 1338 1285 supports-color: 7.2.0 1339 1286 1340 - chownr@1.1.4: {} 1341 - 1342 1287 color-convert@2.0.1: 1343 1288 dependencies: 1344 1289 color-name: 1.1.4 ··· 1359 1304 dependencies: 1360 1305 ms: 2.1.2 1361 1306 1362 - decompress-response@6.0.0: 1363 - dependencies: 1364 - mimic-response: 3.1.0 1365 - 1366 - deep-extend@0.6.0: {} 1367 - 1368 1307 deep-is@0.1.4: {} 1369 1308 1370 - detect-libc@2.0.3: {} 1309 + detect-libc@2.0.2: {} 1371 1310 1372 1311 dir-glob@3.0.1: 1373 1312 dependencies: ··· 1470 1409 1471 1410 events@3.3.0: {} 1472 1411 1473 - expand-template@2.0.3: {} 1474 - 1475 1412 fast-content-type-parse@1.1.0: {} 1476 1413 1477 1414 fast-decode-uri-component@1.0.1: {} ··· 1539 1476 dependencies: 1540 1477 flat-cache: 3.2.0 1541 1478 1542 - file-uri-to-path@1.0.0: {} 1543 - 1544 1479 fill-range@7.0.1: 1545 1480 dependencies: 1546 1481 to-regex-range: 5.0.1 ··· 1568 1503 1569 1504 fp16@0.3.0: {} 1570 1505 1571 - fs-constants@1.0.0: {} 1572 - 1573 1506 fs.realpath@1.0.0: {} 1574 - 1575 - github-from-package@0.0.0: {} 1576 1507 1577 1508 glob-parent@5.1.2: 1578 1509 dependencies: ··· 1626 1557 1627 1558 inherits@2.0.4: {} 1628 1559 1629 - ini@1.3.8: {} 1630 - 1631 1560 ipaddr.js@1.9.1: {} 1632 1561 1633 1562 is-extglob@2.1.1: {} ··· 1669 1598 prelude-ls: 1.2.1 1670 1599 type-check: 0.4.0 1671 1600 1601 + libsql@0.4.6: 1602 + dependencies: 1603 + '@neon-rs/load': 0.0.4 1604 + detect-libc: 2.0.2 1605 + optionalDependencies: 1606 + '@libsql/darwin-arm64': 0.4.6 1607 + '@libsql/darwin-x64': 0.4.6 1608 + '@libsql/linux-arm64-gnu': 0.4.6 1609 + '@libsql/linux-arm64-musl': 0.4.6 1610 + '@libsql/linux-x64-gnu': 0.4.6 1611 + '@libsql/linux-x64-musl': 0.4.6 1612 + '@libsql/win32-x64-msvc': 0.4.6 1613 + 1672 1614 light-my-request@5.13.0: 1673 1615 dependencies: 1674 1616 cookie: 0.6.0 ··· 1692 1634 braces: 3.0.2 1693 1635 picomatch: 2.3.1 1694 1636 1695 - mimic-response@3.1.0: {} 1696 - 1697 1637 minimatch@3.1.2: 1698 1638 dependencies: 1699 1639 brace-expansion: 1.1.11 1700 - 1701 - minimist@1.2.8: {} 1702 - 1703 - mkdirp-classic@0.5.3: {} 1704 1640 1705 1641 ms@2.1.2: {} 1706 1642 1707 1643 multiformats@13.2.2: {} 1708 1644 1709 - napi-build-utils@1.0.2: {} 1710 - 1711 1645 natural-compare@1.4.0: {} 1712 - 1713 - node-abi@3.65.0: 1714 - dependencies: 1715 - semver: 7.6.0 1716 1646 1717 1647 on-exit-leak-free@2.1.2: {} 1718 1648 ··· 1772 1702 sonic-boom: 4.0.1 1773 1703 thread-stream: 3.1.0 1774 1704 1775 - prebuild-install@7.1.2: 1776 - dependencies: 1777 - detect-libc: 2.0.3 1778 - expand-template: 2.0.3 1779 - github-from-package: 0.0.0 1780 - minimist: 1.2.8 1781 - mkdirp-classic: 0.5.3 1782 - napi-build-utils: 1.0.2 1783 - node-abi: 3.65.0 1784 - pump: 3.0.0 1785 - rc: 1.2.8 1786 - simple-get: 4.0.1 1787 - tar-fs: 2.1.1 1788 - tunnel-agent: 0.6.0 1789 - 1790 1705 prelude-ls@1.2.1: {} 1791 1706 1792 1707 process-warning@3.0.0: {} ··· 1804 1719 dependencies: 1805 1720 forwarded: 0.2.0 1806 1721 ipaddr.js: 1.9.1 1807 - 1808 - pump@3.0.0: 1809 - dependencies: 1810 - end-of-stream: 1.4.4 1811 - once: 1.4.0 1812 1722 1813 1723 punycode@2.3.1: {} 1814 1724 ··· 1816 1726 1817 1727 quick-format-unescaped@4.0.4: {} 1818 1728 1819 - rc@1.2.8: 1820 - dependencies: 1821 - deep-extend: 0.6.0 1822 - ini: 1.3.8 1823 - minimist: 1.2.8 1824 - strip-json-comments: 2.0.1 1825 - 1826 1729 readable-stream@3.6.2: 1827 1730 dependencies: 1828 1731 inherits: 2.0.4 ··· 1879 1782 1880 1783 shebang-regex@3.0.0: {} 1881 1784 1882 - simple-concat@1.0.1: {} 1883 - 1884 - simple-get@4.0.1: 1885 - dependencies: 1886 - decompress-response: 6.0.0 1887 - once: 1.4.0 1888 - simple-concat: 1.0.1 1889 - 1890 1785 sisteransi@1.0.5: {} 1891 1786 1892 1787 slash@3.0.0: {} ··· 1907 1802 dependencies: 1908 1803 ansi-regex: 5.0.1 1909 1804 1910 - strip-json-comments@2.0.1: {} 1911 - 1912 1805 strip-json-comments@3.1.1: {} 1913 1806 1914 1807 supports-color@7.2.0: 1915 1808 dependencies: 1916 1809 has-flag: 4.0.0 1917 1810 1918 - tar-fs@2.1.1: 1919 - dependencies: 1920 - chownr: 1.1.4 1921 - mkdirp-classic: 0.5.3 1922 - pump: 3.0.0 1923 - tar-stream: 2.2.0 1924 - 1925 - tar-stream@2.2.0: 1926 - dependencies: 1927 - bl: 4.1.0 1928 - end-of-stream: 1.4.4 1929 - fs-constants: 1.0.0 1930 - inherits: 2.0.4 1931 - readable-stream: 3.6.2 1932 - 1933 1811 text-table@0.2.0: {} 1934 1812 1935 1813 thread-stream@3.1.0: ··· 1945 1823 ts-api-utils@1.2.1(typescript@5.5.4): 1946 1824 dependencies: 1947 1825 typescript: 5.5.4 1948 - 1949 - tunnel-agent@0.6.0: 1950 - dependencies: 1951 - safe-buffer: 5.2.1 1952 1826 1953 1827 type-check@0.4.0: 1954 1828 dependencies:
+5 -5
src/LabelerServer.ts
··· 6 6 ToolsOzoneModerationEmitEvent, 7 7 } from "@atcute/client/lexicons"; 8 8 import { fastifyWebsocket } from "@fastify/websocket"; 9 - import Database, { type Database as SQLiteDatabase } from "better-sqlite3"; 10 9 import fastify, { type FastifyInstance, type FastifyRequest } from "fastify"; 10 + import Database, { type Database as SQLiteDatabase } from "libsql"; 11 11 import { fromString as ui8FromString } from "uint8arrays"; 12 12 import type { WebSocket } from "ws"; 13 13 import { verifyJwt } from "./util/crypto.js"; ··· 295 295 return pattern.slice(0, -1) + "%"; 296 296 }); 297 297 298 - const stmt = this.db.prepare<unknown[], SavedLabel>(` 298 + const stmt = this.db.prepare(` 299 299 SELECT * FROM labels 300 300 WHERE 1 = 1 301 301 ${patterns.length ? "AND " + patterns.map(() => "uri LIKE ?").join(" OR ") : ""} ··· 311 311 if (cursor) params.push(cursor); 312 312 params.push(limit); 313 313 314 - const rows = stmt.all(params); 314 + const rows = stmt.all(params) as Array<SavedLabel>; 315 315 const labels = rows.map(formatLabel); 316 316 317 317 const nextCursor = rows[rows.length - 1]?.id?.toString(10) || "0"; ··· 338 338 ws.terminate(); 339 339 } 340 340 341 - const stmt = this.db.prepare<[number], SavedLabel>(` 341 + const stmt = this.db.prepare<[number]>(` 342 342 SELECT * FROM labels 343 343 WHERE id > ? 344 344 ORDER BY id ASC ··· 346 346 347 347 try { 348 348 for (const row of stmt.iterate(cursor)) { 349 - const { id: seq, ...label } = row; 349 + const { id: seq, ...label } = row as SavedLabel; 350 350 const bytes = frameToBytes( 351 351 "message", 352 352 { seq, labels: [formatLabel(label)] },
+5 -3
src/util/labels.ts
··· 12 12 } 13 13 14 14 export function formatLabel( 15 - label: UnsignedLabel & { sig?: Uint8Array | At.Bytes }, 15 + label: UnsignedLabel & { sig?: ArrayBuffer | Uint8Array | At.Bytes }, 16 16 ): FormattedLabel { 17 - const sig = label.sig instanceof Uint8Array 17 + const sig = label.sig instanceof ArrayBuffer 18 + ? { $bytes: ui8ToString(new Uint8Array(label.sig), "base64") } 19 + : label.sig instanceof Uint8Array 18 20 ? { $bytes: ui8ToString(label.sig, "base64") } 19 21 : label.sig; 20 - if (sig && !("$bytes" in sig)) { 22 + if (!sig || !("$bytes" in sig)) { 21 23 throw new Error("Expected sig to be an object with base64 $bytes, got " + sig); 22 24 } 23 25 return excludeNullish({ ...label, ver: LABEL_VERSION, neg: !!label.neg, sig });
+1 -1
src/util/types.ts
··· 39 39 export type UnsignedLabel = Omit<ComAtprotoLabelDefs.Label, "sig">; 40 40 export type SignedLabel = UnsignedLabel & { sig: Uint8Array }; 41 41 export type FormattedLabel = UnsignedLabel & { sig?: At.Bytes }; 42 - export type SavedLabel = SignedLabel & { id: number }; 42 + export type SavedLabel = UnsignedLabel & { sig: ArrayBuffer; id: number }; 43 43 44 44 export type QueryHandler< 45 45 T extends RouteGenericInterface["Querystring"] = RouteGenericInterface["Querystring"],