Your one-stop-cake-shop for everything Freshly Baked has to offer

feat(m): improve search engine support #196

merged opened by a.starrysky.fyi targeting main from private/minion/push-ylnkptnukolr

FYI: if this doesn't work for you, you may need to use it from a different URL than http://go/ (try https://starry.sk or https://menu.freshlybakedca.ke) - I'm not sure why exactly, I suspect some browsers may be unhappy with accessing this over http

Labels

None yet.

requested-reviewers

None yet.

approved

None yet.

tested-working

None yet.

rejected

None yet.

assignee

None yet.

Participants 2
AT URI
at://did:plc:uuyqs6y3pwtbteet4swt5i5y/sh.tangled.repo.pull/3mdxwnwzzl422
+957 -36
Diff #2
+730 -15
menu/Cargo.lock
··· 49 49 source = "registry+https://github.com/rust-lang/crates.io-index" 50 50 checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" 51 51 52 + [[package]] 53 + name = "aws-lc-rs" 54 + version = "1.15.4" 55 + source = "registry+https://github.com/rust-lang/crates.io-index" 56 + checksum = "7b7b6141e96a8c160799cc2d5adecd5cbbe5054cb8c7c4af53da0f83bb7ad256" 57 + dependencies = [ 58 + "aws-lc-sys", 59 + "zeroize", 60 + ] 61 + 62 + [[package]] 63 + name = "aws-lc-sys" 64 + version = "0.37.0" 65 + source = "registry+https://github.com/rust-lang/crates.io-index" 66 + checksum = "5c34dda4df7017c8db52132f0f8a2e0f8161649d15723ed63fc00c82d0f2081a" 67 + dependencies = [ 68 + "cc", 69 + "cmake", 70 + "dunce", 71 + "fs_extra", 72 + ] 73 + 52 74 [[package]] 53 75 name = "axum" 54 76 version = "0.8.8" ··· 168 190 checksum = "7a0aeaff4ff1a90589618835a598e545176939b97874f7abc7851caa0618f203" 169 191 dependencies = [ 170 192 "find-msvc-tools", 193 + "jobserver", 194 + "libc", 171 195 "shlex", 172 196 ] 173 197 198 + [[package]] 199 + name = "cesu8" 200 + version = "1.1.0" 201 + source = "registry+https://github.com/rust-lang/crates.io-index" 202 + checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" 203 + 174 204 [[package]] 175 205 name = "cfg-if" 176 206 version = "1.0.4" 177 207 source = "registry+https://github.com/rust-lang/crates.io-index" 178 208 checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" 179 209 210 + [[package]] 211 + name = "cfg_aliases" 212 + version = "0.2.1" 213 + source = "registry+https://github.com/rust-lang/crates.io-index" 214 + checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" 215 + 216 + [[package]] 217 + name = "cmake" 218 + version = "0.1.57" 219 + source = "registry+https://github.com/rust-lang/crates.io-index" 220 + checksum = "75443c44cd6b379beb8c5b45d85d0773baf31cce901fe7bb252f4eff3008ef7d" 221 + dependencies = [ 222 + "cc", 223 + ] 224 + 225 + [[package]] 226 + name = "combine" 227 + version = "4.6.7" 228 + source = "registry+https://github.com/rust-lang/crates.io-index" 229 + checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" 230 + dependencies = [ 231 + "bytes", 232 + "memchr", 233 + ] 234 + 180 235 [[package]] 181 236 name = "concurrent-queue" 182 237 version = "2.5.0" ··· 203 258 "version_check", 204 259 ] 205 260 261 + [[package]] 262 + name = "core-foundation" 263 + version = "0.9.4" 264 + source = "registry+https://github.com/rust-lang/crates.io-index" 265 + checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" 266 + dependencies = [ 267 + "core-foundation-sys", 268 + "libc", 269 + ] 270 + 271 + [[package]] 272 + name = "core-foundation" 273 + version = "0.10.1" 274 + source = "registry+https://github.com/rust-lang/crates.io-index" 275 + checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" 276 + dependencies = [ 277 + "core-foundation-sys", 278 + "libc", 279 + ] 280 + 281 + [[package]] 282 + name = "core-foundation-sys" 283 + version = "0.8.7" 284 + source = "registry+https://github.com/rust-lang/crates.io-index" 285 + checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" 286 + 206 287 [[package]] 207 288 name = "cpufeatures" 208 289 version = "0.2.17" ··· 302 383 source = "registry+https://github.com/rust-lang/crates.io-index" 303 384 checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" 304 385 386 + [[package]] 387 + name = "dunce" 388 + version = "1.0.5" 389 + source = "registry+https://github.com/rust-lang/crates.io-index" 390 + checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" 391 + 305 392 [[package]] 306 393 name = "either" 307 394 version = "1.15.0" ··· 311 398 "serde", 312 399 ] 313 400 401 + [[package]] 402 + name = "encoding_rs" 403 + version = "0.8.35" 404 + source = "registry+https://github.com/rust-lang/crates.io-index" 405 + checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" 406 + dependencies = [ 407 + "cfg-if", 408 + ] 409 + 314 410 [[package]] 315 411 name = "equivalent" 316 412 version = "1.0.2" ··· 339 435 "pin-project-lite", 340 436 ] 341 437 438 + [[package]] 439 + name = "fastrand" 440 + version = "2.3.0" 441 + source = "registry+https://github.com/rust-lang/crates.io-index" 442 + checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" 443 + 342 444 [[package]] 343 445 name = "find-msvc-tools" 344 446 version = "0.1.6" ··· 356 458 "spin", 357 459 ] 358 460 461 + [[package]] 462 + name = "fnv" 463 + version = "1.0.7" 464 + source = "registry+https://github.com/rust-lang/crates.io-index" 465 + checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 466 + 359 467 [[package]] 360 468 name = "foldhash" 361 469 version = "0.1.5" ··· 371 479 "percent-encoding", 372 480 ] 373 481 482 + [[package]] 483 + name = "fs_extra" 484 + version = "1.3.0" 485 + source = "registry+https://github.com/rust-lang/crates.io-index" 486 + checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" 487 + 374 488 [[package]] 375 489 name = "futures" 376 490 version = "0.3.31" ··· 486 600 checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" 487 601 dependencies = [ 488 602 "cfg-if", 603 + "js-sys", 489 604 "libc", 490 605 "wasi", 606 + "wasm-bindgen", 491 607 ] 492 608 493 609 [[package]] ··· 497 613 checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" 498 614 dependencies = [ 499 615 "cfg-if", 616 + "js-sys", 500 617 "libc", 501 618 "r-efi", 502 619 "wasip2", 620 + "wasm-bindgen", 621 + ] 622 + 623 + [[package]] 624 + name = "h2" 625 + version = "0.4.13" 626 + source = "registry+https://github.com/rust-lang/crates.io-index" 627 + checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54" 628 + dependencies = [ 629 + "atomic-waker", 630 + "bytes", 631 + "fnv", 632 + "futures-core", 633 + "futures-sink", 634 + "http", 635 + "indexmap", 636 + "slab", 637 + "tokio", 638 + "tokio-util", 639 + "tracing", 503 640 ] 504 641 505 642 [[package]] ··· 637 774 "bytes", 638 775 "futures-channel", 639 776 "futures-core", 777 + "h2", 640 778 "http", 641 779 "http-body", 642 780 "httparse", ··· 646 784 "pin-utils", 647 785 "smallvec", 648 786 "tokio", 787 + "want", 788 + ] 789 + 790 + [[package]] 791 + name = "hyper-rustls" 792 + version = "0.27.7" 793 + source = "registry+https://github.com/rust-lang/crates.io-index" 794 + checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" 795 + dependencies = [ 796 + "http", 797 + "hyper", 798 + "hyper-util", 799 + "rustls", 800 + "rustls-pki-types", 801 + "tokio", 802 + "tokio-rustls", 803 + "tower-service", 649 804 ] 650 805 651 806 [[package]] ··· 654 809 source = "registry+https://github.com/rust-lang/crates.io-index" 655 810 checksum = "727805d60e7938b76b826a6ef209eb70eaa1812794f9424d4a4e2d740662df5f" 656 811 dependencies = [ 812 + "base64", 657 813 "bytes", 814 + "futures-channel", 658 815 "futures-core", 816 + "futures-util", 659 817 "http", 660 818 "http-body", 661 819 "hyper", 820 + "ipnet", 821 + "libc", 822 + "percent-encoding", 662 823 "pin-project-lite", 824 + "socket2", 825 + "system-configuration", 663 826 "tokio", 664 827 "tower-service", 828 + "tracing", 829 + "windows-registry", 665 830 ] 666 831 667 832 [[package]] ··· 795 960 "hashbrown 0.16.1", 796 961 ] 797 962 963 + [[package]] 964 + name = "ipnet" 965 + version = "2.11.0" 966 + source = "registry+https://github.com/rust-lang/crates.io-index" 967 + checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" 968 + 969 + [[package]] 970 + name = "iri-string" 971 + version = "0.7.10" 972 + source = "registry+https://github.com/rust-lang/crates.io-index" 973 + checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a" 974 + dependencies = [ 975 + "memchr", 976 + "serde", 977 + ] 978 + 798 979 [[package]] 799 980 name = "itoa" 800 981 version = "1.0.17" 801 982 source = "registry+https://github.com/rust-lang/crates.io-index" 802 983 checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" 803 984 985 + [[package]] 986 + name = "jni" 987 + version = "0.21.1" 988 + source = "registry+https://github.com/rust-lang/crates.io-index" 989 + checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" 990 + dependencies = [ 991 + "cesu8", 992 + "cfg-if", 993 + "combine", 994 + "jni-sys", 995 + "log", 996 + "thiserror 1.0.69", 997 + "walkdir", 998 + "windows-sys 0.45.0", 999 + ] 1000 + 1001 + [[package]] 1002 + name = "jni-sys" 1003 + version = "0.3.0" 1004 + source = "registry+https://github.com/rust-lang/crates.io-index" 1005 + checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" 1006 + 1007 + [[package]] 1008 + name = "jobserver" 1009 + version = "0.1.34" 1010 + source = "registry+https://github.com/rust-lang/crates.io-index" 1011 + checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" 1012 + dependencies = [ 1013 + "getrandom 0.3.4", 1014 + "libc", 1015 + ] 1016 + 804 1017 [[package]] 805 1018 name = "js-sys" 806 1019 version = "0.3.83" ··· 875 1088 source = "registry+https://github.com/rust-lang/crates.io-index" 876 1089 checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" 877 1090 1091 + [[package]] 1092 + name = "lru-slab" 1093 + version = "0.1.2" 1094 + source = "registry+https://github.com/rust-lang/crates.io-index" 1095 + checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" 1096 + 878 1097 [[package]] 879 1098 name = "matchit" 880 1099 version = "0.8.4" ··· 905 1124 "html-escape", 906 1125 "include_dir", 907 1126 "percent-encoding", 1127 + "phf", 908 1128 "regex", 909 1129 "regex_static", 1130 + "reqwest", 910 1131 "serde", 911 1132 "sqlx", 912 1133 "tokio", ··· 956 1177 "num-integer", 957 1178 "num-iter", 958 1179 "num-traits", 959 - "rand", 1180 + "rand 0.8.5", 960 1181 "smallvec", 961 1182 "zeroize", 962 1183 ] ··· 1003 1224 source = "registry+https://github.com/rust-lang/crates.io-index" 1004 1225 checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" 1005 1226 1227 + [[package]] 1228 + name = "openssl-probe" 1229 + version = "0.2.1" 1230 + source = "registry+https://github.com/rust-lang/crates.io-index" 1231 + checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" 1232 + 1006 1233 [[package]] 1007 1234 name = "parking" 1008 1235 version = "2.2.1" ··· 1047 1274 source = "registry+https://github.com/rust-lang/crates.io-index" 1048 1275 checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" 1049 1276 1277 + [[package]] 1278 + name = "phf" 1279 + version = "0.13.1" 1280 + source = "registry+https://github.com/rust-lang/crates.io-index" 1281 + checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" 1282 + dependencies = [ 1283 + "phf_macros", 1284 + "phf_shared", 1285 + "serde", 1286 + ] 1287 + 1288 + [[package]] 1289 + name = "phf_generator" 1290 + version = "0.13.1" 1291 + source = "registry+https://github.com/rust-lang/crates.io-index" 1292 + checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" 1293 + dependencies = [ 1294 + "fastrand", 1295 + "phf_shared", 1296 + ] 1297 + 1298 + [[package]] 1299 + name = "phf_macros" 1300 + version = "0.13.1" 1301 + source = "registry+https://github.com/rust-lang/crates.io-index" 1302 + checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef" 1303 + dependencies = [ 1304 + "phf_generator", 1305 + "phf_shared", 1306 + "proc-macro2", 1307 + "quote", 1308 + "syn 2.0.112", 1309 + ] 1310 + 1311 + [[package]] 1312 + name = "phf_shared" 1313 + version = "0.13.1" 1314 + source = "registry+https://github.com/rust-lang/crates.io-index" 1315 + checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" 1316 + dependencies = [ 1317 + "siphasher", 1318 + ] 1319 + 1050 1320 [[package]] 1051 1321 name = "pin-project" 1052 1322 version = "1.1.10" ··· 1139 1409 "unicode-ident", 1140 1410 ] 1141 1411 1412 + [[package]] 1413 + name = "quinn" 1414 + version = "0.11.9" 1415 + source = "registry+https://github.com/rust-lang/crates.io-index" 1416 + checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" 1417 + dependencies = [ 1418 + "bytes", 1419 + "cfg_aliases", 1420 + "pin-project-lite", 1421 + "quinn-proto", 1422 + "quinn-udp", 1423 + "rustc-hash", 1424 + "rustls", 1425 + "socket2", 1426 + "thiserror 2.0.17", 1427 + "tokio", 1428 + "tracing", 1429 + "web-time", 1430 + ] 1431 + 1432 + [[package]] 1433 + name = "quinn-proto" 1434 + version = "0.11.13" 1435 + source = "registry+https://github.com/rust-lang/crates.io-index" 1436 + checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" 1437 + dependencies = [ 1438 + "aws-lc-rs", 1439 + "bytes", 1440 + "getrandom 0.3.4", 1441 + "lru-slab", 1442 + "rand 0.9.2", 1443 + "ring", 1444 + "rustc-hash", 1445 + "rustls", 1446 + "rustls-pki-types", 1447 + "slab", 1448 + "thiserror 2.0.17", 1449 + "tinyvec", 1450 + "tracing", 1451 + "web-time", 1452 + ] 1453 + 1454 + [[package]] 1455 + name = "quinn-udp" 1456 + version = "0.5.14" 1457 + source = "registry+https://github.com/rust-lang/crates.io-index" 1458 + checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" 1459 + dependencies = [ 1460 + "cfg_aliases", 1461 + "libc", 1462 + "once_cell", 1463 + "socket2", 1464 + "tracing", 1465 + "windows-sys 0.60.2", 1466 + ] 1467 + 1142 1468 [[package]] 1143 1469 name = "quote" 1144 1470 version = "1.0.42" ··· 1161 1487 checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1162 1488 dependencies = [ 1163 1489 "libc", 1164 - "rand_chacha", 1165 - "rand_core", 1490 + "rand_chacha 0.3.1", 1491 + "rand_core 0.6.4", 1492 + ] 1493 + 1494 + [[package]] 1495 + name = "rand" 1496 + version = "0.9.2" 1497 + source = "registry+https://github.com/rust-lang/crates.io-index" 1498 + checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" 1499 + dependencies = [ 1500 + "rand_chacha 0.9.0", 1501 + "rand_core 0.9.5", 1166 1502 ] 1167 1503 1168 1504 [[package]] ··· 1172 1508 checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1173 1509 dependencies = [ 1174 1510 "ppv-lite86", 1175 - "rand_core", 1511 + "rand_core 0.6.4", 1512 + ] 1513 + 1514 + [[package]] 1515 + name = "rand_chacha" 1516 + version = "0.9.0" 1517 + source = "registry+https://github.com/rust-lang/crates.io-index" 1518 + checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" 1519 + dependencies = [ 1520 + "ppv-lite86", 1521 + "rand_core 0.9.5", 1176 1522 ] 1177 1523 1178 1524 [[package]] ··· 1184 1530 "getrandom 0.2.16", 1185 1531 ] 1186 1532 1533 + [[package]] 1534 + name = "rand_core" 1535 + version = "0.9.5" 1536 + source = "registry+https://github.com/rust-lang/crates.io-index" 1537 + checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" 1538 + dependencies = [ 1539 + "getrandom 0.3.4", 1540 + ] 1541 + 1187 1542 [[package]] 1188 1543 name = "redox_syscall" 1189 1544 version = "0.5.18" ··· 1271 1626 "syn 1.0.109", 1272 1627 ] 1273 1628 1629 + [[package]] 1630 + name = "reqwest" 1631 + version = "0.13.1" 1632 + source = "registry+https://github.com/rust-lang/crates.io-index" 1633 + checksum = "04e9018c9d814e5f30cc16a0f03271aeab3571e609612d9fe78c1aa8d11c2f62" 1634 + dependencies = [ 1635 + "base64", 1636 + "bytes", 1637 + "encoding_rs", 1638 + "futures-core", 1639 + "h2", 1640 + "http", 1641 + "http-body", 1642 + "http-body-util", 1643 + "hyper", 1644 + "hyper-rustls", 1645 + "hyper-util", 1646 + "js-sys", 1647 + "log", 1648 + "mime", 1649 + "percent-encoding", 1650 + "pin-project-lite", 1651 + "quinn", 1652 + "rustls", 1653 + "rustls-pki-types", 1654 + "rustls-platform-verifier", 1655 + "sync_wrapper", 1656 + "tokio", 1657 + "tokio-rustls", 1658 + "tower", 1659 + "tower-http", 1660 + "tower-service", 1661 + "url", 1662 + "wasm-bindgen", 1663 + "wasm-bindgen-futures", 1664 + "web-sys", 1665 + ] 1666 + 1274 1667 [[package]] 1275 1668 name = "ring" 1276 1669 version = "0.17.14" ··· 1298 1691 "num-traits", 1299 1692 "pkcs1", 1300 1693 "pkcs8", 1301 - "rand_core", 1694 + "rand_core 0.6.4", 1302 1695 "signature", 1303 1696 "spki", 1304 1697 "subtle", 1305 1698 "zeroize", 1306 1699 ] 1307 1700 1701 + [[package]] 1702 + name = "rustc-hash" 1703 + version = "2.1.1" 1704 + source = "registry+https://github.com/rust-lang/crates.io-index" 1705 + checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" 1706 + 1308 1707 [[package]] 1309 1708 name = "rustls" 1310 1709 version = "0.23.35" 1311 1710 source = "registry+https://github.com/rust-lang/crates.io-index" 1312 1711 checksum = "533f54bc6a7d4f647e46ad909549eda97bf5afc1585190ef692b4286b198bd8f" 1313 1712 dependencies = [ 1713 + "aws-lc-rs", 1314 1714 "once_cell", 1315 1715 "ring", 1316 1716 "rustls-pki-types", ··· 1319 1719 "zeroize", 1320 1720 ] 1321 1721 1722 + [[package]] 1723 + name = "rustls-native-certs" 1724 + version = "0.8.3" 1725 + source = "registry+https://github.com/rust-lang/crates.io-index" 1726 + checksum = "612460d5f7bea540c490b2b6395d8e34a953e52b491accd6c86c8164c5932a63" 1727 + dependencies = [ 1728 + "openssl-probe", 1729 + "rustls-pki-types", 1730 + "schannel", 1731 + "security-framework", 1732 + ] 1733 + 1322 1734 [[package]] 1323 1735 name = "rustls-pki-types" 1324 1736 version = "1.13.2" 1325 1737 source = "registry+https://github.com/rust-lang/crates.io-index" 1326 1738 checksum = "21e6f2ab2928ca4291b86736a8bd920a277a399bba1589409d72154ff87c1282" 1327 1739 dependencies = [ 1740 + "web-time", 1328 1741 "zeroize", 1329 1742 ] 1330 1743 1744 + [[package]] 1745 + name = "rustls-platform-verifier" 1746 + version = "0.6.2" 1747 + source = "registry+https://github.com/rust-lang/crates.io-index" 1748 + checksum = "1d99feebc72bae7ab76ba994bb5e121b8d83d910ca40b36e0921f53becc41784" 1749 + dependencies = [ 1750 + "core-foundation 0.10.1", 1751 + "core-foundation-sys", 1752 + "jni", 1753 + "log", 1754 + "once_cell", 1755 + "rustls", 1756 + "rustls-native-certs", 1757 + "rustls-platform-verifier-android", 1758 + "rustls-webpki", 1759 + "security-framework", 1760 + "security-framework-sys", 1761 + "webpki-root-certs", 1762 + "windows-sys 0.61.2", 1763 + ] 1764 + 1765 + [[package]] 1766 + name = "rustls-platform-verifier-android" 1767 + version = "0.1.1" 1768 + source = "registry+https://github.com/rust-lang/crates.io-index" 1769 + checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" 1770 + 1331 1771 [[package]] 1332 1772 name = "rustls-webpki" 1333 1773 version = "0.103.8" 1334 1774 source = "registry+https://github.com/rust-lang/crates.io-index" 1335 1775 checksum = "2ffdfa2f5286e2247234e03f680868ac2815974dc39e00ea15adc445d0aafe52" 1336 1776 dependencies = [ 1777 + "aws-lc-rs", 1337 1778 "ring", 1338 1779 "rustls-pki-types", 1339 1780 "untrusted", ··· 1351 1792 source = "registry+https://github.com/rust-lang/crates.io-index" 1352 1793 checksum = "a50f4cf475b65d88e057964e0e9bb1f0aa9bbb2036dc65c64596b42932536984" 1353 1794 1795 + [[package]] 1796 + name = "same-file" 1797 + version = "1.0.6" 1798 + source = "registry+https://github.com/rust-lang/crates.io-index" 1799 + checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 1800 + dependencies = [ 1801 + "winapi-util", 1802 + ] 1803 + 1804 + [[package]] 1805 + name = "schannel" 1806 + version = "0.1.28" 1807 + source = "registry+https://github.com/rust-lang/crates.io-index" 1808 + checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" 1809 + dependencies = [ 1810 + "windows-sys 0.61.2", 1811 + ] 1812 + 1354 1813 [[package]] 1355 1814 name = "scopeguard" 1356 1815 version = "1.2.0" 1357 1816 source = "registry+https://github.com/rust-lang/crates.io-index" 1358 1817 checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 1359 1818 1819 + [[package]] 1820 + name = "security-framework" 1821 + version = "3.5.1" 1822 + source = "registry+https://github.com/rust-lang/crates.io-index" 1823 + checksum = "b3297343eaf830f66ede390ea39da1d462b6b0c1b000f420d0a83f898bbbe6ef" 1824 + dependencies = [ 1825 + "bitflags", 1826 + "core-foundation 0.10.1", 1827 + "core-foundation-sys", 1828 + "libc", 1829 + "security-framework-sys", 1830 + ] 1831 + 1832 + [[package]] 1833 + name = "security-framework-sys" 1834 + version = "2.15.0" 1835 + source = "registry+https://github.com/rust-lang/crates.io-index" 1836 + checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0" 1837 + dependencies = [ 1838 + "core-foundation-sys", 1839 + "libc", 1840 + ] 1841 + 1360 1842 [[package]] 1361 1843 name = "serde" 1362 1844 version = "1.0.228" ··· 1458 1940 checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" 1459 1941 dependencies = [ 1460 1942 "digest", 1461 - "rand_core", 1943 + "rand_core 0.6.4", 1462 1944 ] 1463 1945 1946 + [[package]] 1947 + name = "siphasher" 1948 + version = "1.0.2" 1949 + source = "registry+https://github.com/rust-lang/crates.io-index" 1950 + checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e" 1951 + 1464 1952 [[package]] 1465 1953 name = "slab" 1466 1954 version = "0.4.11" ··· 1546 2034 "serde_json", 1547 2035 "sha2", 1548 2036 "smallvec", 1549 - "thiserror", 2037 + "thiserror 2.0.17", 1550 2038 "tokio", 1551 2039 "tokio-stream", 1552 2040 "tracing", ··· 1622 2110 "memchr", 1623 2111 "once_cell", 1624 2112 "percent-encoding", 1625 - "rand", 2113 + "rand 0.8.5", 1626 2114 "rsa", 1627 2115 "serde", 1628 2116 "sha1", ··· 1630 2118 "smallvec", 1631 2119 "sqlx-core", 1632 2120 "stringprep", 1633 - "thiserror", 2121 + "thiserror 2.0.17", 1634 2122 "tracing", 1635 2123 "uuid", 1636 2124 "whoami", ··· 1661 2149 "md-5", 1662 2150 "memchr", 1663 2151 "once_cell", 1664 - "rand", 2152 + "rand 0.8.5", 1665 2153 "serde", 1666 2154 "serde_json", 1667 2155 "sha2", 1668 2156 "smallvec", 1669 2157 "sqlx-core", 1670 2158 "stringprep", 1671 - "thiserror", 2159 + "thiserror 2.0.17", 1672 2160 "tracing", 1673 2161 "uuid", 1674 2162 "whoami", ··· 1693 2181 "serde", 1694 2182 "serde_urlencoded", 1695 2183 "sqlx-core", 1696 - "thiserror", 2184 + "thiserror 2.0.17", 1697 2185 "tracing", 1698 2186 "url", 1699 2187 "uuid", ··· 1749 2237 version = "1.0.2" 1750 2238 source = "registry+https://github.com/rust-lang/crates.io-index" 1751 2239 checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" 2240 + dependencies = [ 2241 + "futures-core", 2242 + ] 1752 2243 1753 2244 [[package]] 1754 2245 name = "synstructure" ··· 1761 2252 "syn 2.0.112", 1762 2253 ] 1763 2254 2255 + [[package]] 2256 + name = "system-configuration" 2257 + version = "0.6.1" 2258 + source = "registry+https://github.com/rust-lang/crates.io-index" 2259 + checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" 2260 + dependencies = [ 2261 + "bitflags", 2262 + "core-foundation 0.9.4", 2263 + "system-configuration-sys", 2264 + ] 2265 + 2266 + [[package]] 2267 + name = "system-configuration-sys" 2268 + version = "0.6.0" 2269 + source = "registry+https://github.com/rust-lang/crates.io-index" 2270 + checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" 2271 + dependencies = [ 2272 + "core-foundation-sys", 2273 + "libc", 2274 + ] 2275 + 2276 + [[package]] 2277 + name = "thiserror" 2278 + version = "1.0.69" 2279 + source = "registry+https://github.com/rust-lang/crates.io-index" 2280 + checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" 2281 + dependencies = [ 2282 + "thiserror-impl 1.0.69", 2283 + ] 2284 + 1764 2285 [[package]] 1765 2286 name = "thiserror" 1766 2287 version = "2.0.17" 1767 2288 source = "registry+https://github.com/rust-lang/crates.io-index" 1768 2289 checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" 1769 2290 dependencies = [ 1770 - "thiserror-impl", 2291 + "thiserror-impl 2.0.17", 2292 + ] 2293 + 2294 + [[package]] 2295 + name = "thiserror-impl" 2296 + version = "1.0.69" 2297 + source = "registry+https://github.com/rust-lang/crates.io-index" 2298 + checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" 2299 + dependencies = [ 2300 + "proc-macro2", 2301 + "quote", 2302 + "syn 2.0.112", 1771 2303 ] 1772 2304 1773 2305 [[package]] ··· 1863 2395 "syn 2.0.112", 1864 2396 ] 1865 2397 2398 + [[package]] 2399 + name = "tokio-rustls" 2400 + version = "0.26.4" 2401 + source = "registry+https://github.com/rust-lang/crates.io-index" 2402 + checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" 2403 + dependencies = [ 2404 + "rustls", 2405 + "tokio", 2406 + ] 2407 + 1866 2408 [[package]] 1867 2409 name = "tokio-stream" 1868 2410 version = "0.1.17" ··· 1934 2476 "http-body-util", 1935 2477 "http-range-header", 1936 2478 "httpdate", 2479 + "iri-string", 1937 2480 "mime", 1938 2481 "mime_guess", 1939 2482 "percent-encoding", 1940 2483 "pin-project-lite", 1941 2484 "tokio", 1942 2485 "tokio-util", 2486 + "tower", 1943 2487 "tower-layer", 1944 2488 "tower-service", 1945 2489 "tracing", ··· 2008 2552 "futures", 2009 2553 "http", 2010 2554 "parking_lot", 2011 - "rand", 2555 + "rand 0.8.5", 2012 2556 "serde", 2013 2557 "serde_json", 2014 - "thiserror", 2558 + "thiserror 2.0.17", 2015 2559 "time", 2016 2560 "tokio", 2017 2561 "tracing", ··· 2061 2605 "once_cell", 2062 2606 ] 2063 2607 2608 + [[package]] 2609 + name = "try-lock" 2610 + version = "0.2.5" 2611 + source = "registry+https://github.com/rust-lang/crates.io-index" 2612 + checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" 2613 + 2064 2614 [[package]] 2065 2615 name = "typenum" 2066 2616 version = "1.19.0" ··· 2154 2704 source = "registry+https://github.com/rust-lang/crates.io-index" 2155 2705 checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" 2156 2706 2707 + [[package]] 2708 + name = "walkdir" 2709 + version = "2.5.0" 2710 + source = "registry+https://github.com/rust-lang/crates.io-index" 2711 + checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" 2712 + dependencies = [ 2713 + "same-file", 2714 + "winapi-util", 2715 + ] 2716 + 2717 + [[package]] 2718 + name = "want" 2719 + version = "0.3.1" 2720 + source = "registry+https://github.com/rust-lang/crates.io-index" 2721 + checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" 2722 + dependencies = [ 2723 + "try-lock", 2724 + ] 2725 + 2157 2726 [[package]] 2158 2727 name = "wasi" 2159 2728 version = "0.11.1+wasi-snapshot-preview1" ··· 2188 2757 "wasm-bindgen-shared", 2189 2758 ] 2190 2759 2760 + [[package]] 2761 + name = "wasm-bindgen-futures" 2762 + version = "0.4.56" 2763 + source = "registry+https://github.com/rust-lang/crates.io-index" 2764 + checksum = "836d9622d604feee9e5de25ac10e3ea5f2d65b41eac0d9ce72eb5deae707ce7c" 2765 + dependencies = [ 2766 + "cfg-if", 2767 + "js-sys", 2768 + "once_cell", 2769 + "wasm-bindgen", 2770 + "web-sys", 2771 + ] 2772 + 2191 2773 [[package]] 2192 2774 name = "wasm-bindgen-macro" 2193 2775 version = "0.2.106" ··· 2220 2802 "unicode-ident", 2221 2803 ] 2222 2804 2805 + [[package]] 2806 + name = "web-sys" 2807 + version = "0.3.83" 2808 + source = "registry+https://github.com/rust-lang/crates.io-index" 2809 + checksum = "9b32828d774c412041098d182a8b38b16ea816958e07cf40eec2bc080ae137ac" 2810 + dependencies = [ 2811 + "js-sys", 2812 + "wasm-bindgen", 2813 + ] 2814 + 2815 + [[package]] 2816 + name = "web-time" 2817 + version = "1.1.0" 2818 + source = "registry+https://github.com/rust-lang/crates.io-index" 2819 + checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" 2820 + dependencies = [ 2821 + "js-sys", 2822 + "wasm-bindgen", 2823 + ] 2824 + 2825 + [[package]] 2826 + name = "webpki-root-certs" 2827 + version = "1.0.5" 2828 + source = "registry+https://github.com/rust-lang/crates.io-index" 2829 + checksum = "36a29fc0408b113f68cf32637857ab740edfafdf460c326cd2afaa2d84cc05dc" 2830 + dependencies = [ 2831 + "rustls-pki-types", 2832 + ] 2833 + 2223 2834 [[package]] 2224 2835 name = "webpki-roots" 2225 2836 version = "0.26.11" ··· 2248 2859 "wasite", 2249 2860 ] 2250 2861 2862 + [[package]] 2863 + name = "winapi-util" 2864 + version = "0.1.11" 2865 + source = "registry+https://github.com/rust-lang/crates.io-index" 2866 + checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" 2867 + dependencies = [ 2868 + "windows-sys 0.61.2", 2869 + ] 2870 + 2251 2871 [[package]] 2252 2872 name = "windows-link" 2253 2873 version = "0.2.1" 2254 2874 source = "registry+https://github.com/rust-lang/crates.io-index" 2255 2875 checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" 2256 2876 2877 + [[package]] 2878 + name = "windows-registry" 2879 + version = "0.6.1" 2880 + source = "registry+https://github.com/rust-lang/crates.io-index" 2881 + checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720" 2882 + dependencies = [ 2883 + "windows-link", 2884 + "windows-result", 2885 + "windows-strings", 2886 + ] 2887 + 2888 + [[package]] 2889 + name = "windows-result" 2890 + version = "0.4.1" 2891 + source = "registry+https://github.com/rust-lang/crates.io-index" 2892 + checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" 2893 + dependencies = [ 2894 + "windows-link", 2895 + ] 2896 + 2897 + [[package]] 2898 + name = "windows-strings" 2899 + version = "0.5.1" 2900 + source = "registry+https://github.com/rust-lang/crates.io-index" 2901 + checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" 2902 + dependencies = [ 2903 + "windows-link", 2904 + ] 2905 + 2906 + [[package]] 2907 + name = "windows-sys" 2908 + version = "0.45.0" 2909 + source = "registry+https://github.com/rust-lang/crates.io-index" 2910 + checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" 2911 + dependencies = [ 2912 + "windows-targets 0.42.2", 2913 + ] 2914 + 2257 2915 [[package]] 2258 2916 name = "windows-sys" 2259 2917 version = "0.48.0" ··· 2290 2948 "windows-link", 2291 2949 ] 2292 2950 2951 + [[package]] 2952 + name = "windows-targets" 2953 + version = "0.42.2" 2954 + source = "registry+https://github.com/rust-lang/crates.io-index" 2955 + checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" 2956 + dependencies = [ 2957 + "windows_aarch64_gnullvm 0.42.2", 2958 + "windows_aarch64_msvc 0.42.2", 2959 + "windows_i686_gnu 0.42.2", 2960 + "windows_i686_msvc 0.42.2", 2961 + "windows_x86_64_gnu 0.42.2", 2962 + "windows_x86_64_gnullvm 0.42.2", 2963 + "windows_x86_64_msvc 0.42.2", 2964 + ] 2965 + 2293 2966 [[package]] 2294 2967 name = "windows-targets" 2295 2968 version = "0.48.5" ··· 2338 3011 "windows_x86_64_msvc 0.53.1", 2339 3012 ] 2340 3013 3014 + [[package]] 3015 + name = "windows_aarch64_gnullvm" 3016 + version = "0.42.2" 3017 + source = "registry+https://github.com/rust-lang/crates.io-index" 3018 + checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" 3019 + 2341 3020 [[package]] 2342 3021 name = "windows_aarch64_gnullvm" 2343 3022 version = "0.48.5" ··· 2356 3035 source = "registry+https://github.com/rust-lang/crates.io-index" 2357 3036 checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" 2358 3037 3038 + [[package]] 3039 + name = "windows_aarch64_msvc" 3040 + version = "0.42.2" 3041 + source = "registry+https://github.com/rust-lang/crates.io-index" 3042 + checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" 3043 + 2359 3044 [[package]] 2360 3045 name = "windows_aarch64_msvc" 2361 3046 version = "0.48.5" ··· 2374 3059 source = "registry+https://github.com/rust-lang/crates.io-index" 2375 3060 checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" 2376 3061 3062 + [[package]] 3063 + name = "windows_i686_gnu" 3064 + version = "0.42.2" 3065 + source = "registry+https://github.com/rust-lang/crates.io-index" 3066 + checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" 3067 + 2377 3068 [[package]] 2378 3069 name = "windows_i686_gnu" 2379 3070 version = "0.48.5" ··· 2404 3095 source = "registry+https://github.com/rust-lang/crates.io-index" 2405 3096 checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" 2406 3097 3098 + [[package]] 3099 + name = "windows_i686_msvc" 3100 + version = "0.42.2" 3101 + source = "registry+https://github.com/rust-lang/crates.io-index" 3102 + checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" 3103 + 2407 3104 [[package]] 2408 3105 name = "windows_i686_msvc" 2409 3106 version = "0.48.5" ··· 2422 3119 source = "registry+https://github.com/rust-lang/crates.io-index" 2423 3120 checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" 2424 3121 3122 + [[package]] 3123 + name = "windows_x86_64_gnu" 3124 + version = "0.42.2" 3125 + source = "registry+https://github.com/rust-lang/crates.io-index" 3126 + checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" 3127 + 2425 3128 [[package]] 2426 3129 name = "windows_x86_64_gnu" 2427 3130 version = "0.48.5" ··· 2440 3143 source = "registry+https://github.com/rust-lang/crates.io-index" 2441 3144 checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" 2442 3145 3146 + [[package]] 3147 + name = "windows_x86_64_gnullvm" 3148 + version = "0.42.2" 3149 + source = "registry+https://github.com/rust-lang/crates.io-index" 3150 + checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" 3151 + 2443 3152 [[package]] 2444 3153 name = "windows_x86_64_gnullvm" 2445 3154 version = "0.48.5" ··· 2458 3167 source = "registry+https://github.com/rust-lang/crates.io-index" 2459 3168 checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" 2460 3169 3170 + [[package]] 3171 + name = "windows_x86_64_msvc" 3172 + version = "0.42.2" 3173 + source = "registry+https://github.com/rust-lang/crates.io-index" 3174 + checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" 3175 + 2461 3176 [[package]] 2462 3177 name = "windows_x86_64_msvc" 2463 3178 version = "0.48.5"
+2
menu/Cargo.toml
··· 12 12 html-escape = "0.2.13" 13 13 include_dir = "0.7.4" 14 14 percent-encoding = "2.3.2" 15 + phf = { version = "0.13.1", features = ["macros"] } 15 16 regex = "1.12.2" 16 17 regex_static = "0.1.1" 18 + reqwest = "0.13.1" 17 19 serde = { version = "1.0.228", features = ["derive"] } 18 20 sqlx = { version = "0.8.6", features = ["runtime-tokio", "tls-rustls-ring-webpki", "postgres", "uuid", "macros"] } 19 21 tokio = { version = "1.49.0", features = ["macros", "rt-multi-thread"] }
+2
menu/src/html/create.html
··· 9 9 <title>Add shortlink</title> 10 10 <link rel="stylesheet" href="/_/public/logo.css"/> 11 11 <link rel="stylesheet" href="/_/public/forms.css"/> 12 + <link rel="icon" type="image/x-icon" href="/_/public/favicon.ico"/> 13 + <link rel="icon" type="image/png" href="/_/public/favicon.png"/> 12 14 </head> 13 15 14 16 <body>
+2
menu/src/html/create/conflict/direct.html
··· 10 10 <link rel="stylesheet" href="/_/public/logo.css"/> 11 11 <link rel="stylesheet" href="/_/public/colors.css"/> 12 12 <link rel="stylesheet" href="/_/public/actions.css"/> 13 + <link rel="icon" type="image/x-icon" href="/_/public/favicon.ico"/> 14 + <link rel="icon" type="image/png" href="/_/public/favicon.png"/> 13 15 </head> 14 16 15 17 <body>
+2
menu/src/html/create/conflict/regex.html
··· 10 10 <link rel="stylesheet" href="/_/public/logo.css"/> 11 11 <link rel="stylesheet" href="/_/public/colors.css"/> 12 12 <link rel="stylesheet" href="/_/public/actions.css"/> 13 + <link rel="icon" type="image/x-icon" href="/_/public/favicon.ico"/> 14 + <link rel="icon" type="image/png" href="/_/public/favicon.png"/> 13 15 </head> 14 16 15 17 <body>
+2
menu/src/html/create/failure.html
··· 10 10 <link rel="stylesheet" href="/_/public/logo.css"/> 11 11 <link rel="stylesheet" href="/_/public/colors.css"/> 12 12 <link rel="stylesheet" href="/_/public/actions.css"/> 13 + <link rel="icon" type="image/x-icon" href="/_/public/favicon.ico"/> 14 + <link rel="icon" type="image/png" href="/_/public/favicon.png"/> 13 15 </head> 14 16 15 17 <body>
+2
menu/src/html/create/success/direct.html
··· 10 10 <link rel="stylesheet" href="/_/public/logo.css"/> 11 11 <link rel="stylesheet" href="/_/public/colors.css"/> 12 12 <link rel="stylesheet" href="/_/public/actions.css"/> 13 + <link rel="icon" type="image/x-icon" href="/_/public/favicon.ico"/> 14 + <link rel="icon" type="image/png" href="/_/public/favicon.png"/> 13 15 </head> 14 16 15 17 <body>
+2
menu/src/html/create/success/regex.html
··· 10 10 <link rel="stylesheet" href="/_/public/logo.css"/> 11 11 <link rel="stylesheet" href="/_/public/colors.css"/> 12 12 <link rel="stylesheet" href="/_/public/actions.css"/> 13 + <link rel="icon" type="image/x-icon" href="/_/public/favicon.ico"/> 14 + <link rel="icon" type="image/png" href="/_/public/favicon.png"/> 13 15 </head> 14 16 15 17 <body>
+2
menu/src/html/delete/failure.html
··· 10 10 <link rel="stylesheet" href="/_/public/logo.css"/> 11 11 <link rel="stylesheet" href="/_/public/colors.css"/> 12 12 <link rel="stylesheet" href="/_/public/actions.css"/> 13 + <link rel="icon" type="image/x-icon" href="/_/public/favicon.ico"/> 14 + <link rel="icon" type="image/png" href="/_/public/favicon.png"/> 13 15 </head> 14 16 15 17 <body>
+2
menu/src/html/delete/success/direct.html
··· 10 10 <link rel="stylesheet" href="/_/public/logo.css"/> 11 11 <link rel="stylesheet" href="/_/public/colors.css"/> 12 12 <link rel="stylesheet" href="/_/public/actions.css"/> 13 + <link rel="icon" type="image/x-icon" href="/_/public/favicon.ico"/> 14 + <link rel="icon" type="image/png" href="/_/public/favicon.png"/> 13 15 </head> 14 16 15 17 <body>
+2
menu/src/html/delete/success/regex.html
··· 10 10 <link rel="stylesheet" href="/_/public/logo.css"/> 11 11 <link rel="stylesheet" href="/_/public/colors.css"/> 12 12 <link rel="stylesheet" href="/_/public/actions.css"/> 13 + <link rel="icon" type="image/x-icon" href="/_/public/favicon.ico"/> 14 + <link rel="icon" type="image/png" href="/_/public/favicon.png"/> 13 15 </head> 14 16 15 17 <body>
+3
menu/src/html/index.html
··· 10 10 <title>Add shortlink</title> 11 11 <link rel="stylesheet" href="/_/public/logo.css"/> 12 12 <link rel="stylesheet" href="/_/public/tables.css"/> 13 + <link rel="icon" type="image/x-icon" href="/_/public/favicon.ico"/> 14 + <link rel="icon" type="image/png" href="/_/public/favicon.png"/> 15 + {search_engines:dangerous_raw} 13 16 </head> 14 17 15 18 <body>
+17
menu/src/html/opensearch.xml
··· 1 + <!-- 2 + SPDX-FileCopyrightText: 2026 Freshly BakedCake 3 + 4 + SPDX-License-Identifier: MIT 5 + --> 6 + 7 + <OpenSearchDescription 8 + xmlns="http://a9.com/-/spec/opensearch/1.1/" 9 + xmlns:moz="http://www.mozilla.org/2006/browser/search/"> 10 + <ShortName>Menu {name}</ShortName> 11 + <Description>Menu {name} - Resolve shortlinks before searching</Description> 12 + <InputEncoding>UTF-8</InputEncoding> 13 + <Image type="image/x-icon">/_/public/favicon.ico</Image> 14 + <Image type="image/png">/_/public/favicon.png</Image> 15 + <Url type="text/html" template="https://menu.freshlybakedca.ke/_/search?engine={engine:url}&amp;q={searchTerms}"/> 16 + <Url type="application/x-suggestions+json" template="https://menu.freshlybakedca.ke/_/suggest?engine={engine:url}&amp;q={searchTerms}"/> 17 + </OpenSearchDescription>
menu/src/html/public/favicon.ico

This is a binary file and will not be displayed.

+3
menu/src/html/public/favicon.ico.license
··· 1 + SPDX-FileCopyrightText: 2026 Freshly BakedCake 2 + 3 + SPDX-License-Identifier: MIT
menu/src/html/public/favicon.png

This is a binary file and will not be displayed.

+3
menu/src/html/public/favicon.png.license
··· 1 + SPDX-FileCopyrightText: 2026 Freshly BakedCake 2 + 3 + SPDX-License-Identifier: MIT
+132 -18
menu/src/main.rs
··· 8 8 9 9 use axum::{ 10 10 Router, ServiceExt, 11 - body::Body, 12 11 extract::{Path, Query, Request}, 13 - http::{HeaderMap, Response, StatusCode}, 14 - response::{Html, IntoResponse, Redirect, Result}, 12 + http::{HeaderMap, StatusCode}, 13 + response::{IntoResponse, Redirect, Response, Result}, 15 14 routing::get, 16 15 }; 17 16 use include_dir::{Dir, include_dir}; 18 17 use percent_encoding::{NON_ALPHANUMERIC, utf8_percent_encode}; 18 + use phf::phf_map; 19 19 use sqlx::{Connection, PgConnection}; 20 20 use tower_sessions::{MemoryStore, Session, SessionManagerLayer}; 21 21 ··· 51 51 "starry.sk", 52 52 ]; 53 53 54 + const SEARCH_ENGINES: phf::Map<&'static str, [&'static str; 3]> = phf_map! { 55 + "kagi" => [ 56 + "Kagi", 57 + "https://kagi.com/search?q=", 58 + "https://kagi.com/api/autosuggest?q=", 59 + ], 60 + "google" => [ 61 + "Google", 62 + "https://www.google.com/search?q=", 63 + "https://www.google.com/complete/search?q=", 64 + ], 65 + "udm14" => [ 66 + "Google+UDM14", 67 + "https://www.google.com/search?udm=14&q=", 68 + "https://www.google.com/complete/search?q=", 69 + ], 70 + "ddg" => [ 71 + "DuckDuckGo", 72 + "https://duckduckgo.com?q=", 73 + "https://duckduckgo.com/ac/?q=", 74 + ], 75 + "noai" => [ 76 + "DuckDuckGo+NoAI", 77 + "https://noai.duckduckgo.com?q=", 78 + "https://noai.duckduckgo.com/ac/?q=", 79 + ] 80 + }; 81 + 54 82 fn clean_host(provided_host: &str) -> &str { 55 83 if ALLOWED_HOSTS.contains(&provided_host) { 56 84 return provided_host; ··· 72 100 } 73 101 74 102 async fn get_redirect_base(go: &str) -> Redirect { 75 - get_redirect(go) 103 + get_redirect(go).await.unwrap_or_else(|| { 104 + Redirect::temporary( 105 + &("/_/create?format=direct&from=".to_string() 106 + + &utf8_percent_encode(go, NON_ALPHANUMERIC).to_string()), 107 + ) 108 + }) 109 + } 110 + 111 + struct InvalidSearchEngine { 112 + engine: String, 113 + } 114 + impl IntoResponse for InvalidSearchEngine { 115 + fn into_response(self) -> Response { 116 + return ( 117 + StatusCode::NOT_FOUND, 118 + format!("Invalid Search Engine {}", self.engine), 119 + ) 120 + .into_response(); 121 + } 122 + } 123 + 124 + async fn handle_search_suggest(Query(params): Query<HashMap<String, String>>) -> Result<String> { 125 + if let Some(q) = params.get("q") { 126 + let Some(search_engine_metadata) = (match params.get("engine") { 127 + Some(e) => SEARCH_ENGINES.get(e), 128 + None => SEARCH_ENGINES.get("kagi"), // This is the default for historical reasons ... 129 + }) else { 130 + return Err(InvalidSearchEngine { 131 + engine: params 132 + .get("engine") 133 + .and_then(|e| Some(e.as_str())) 134 + .unwrap_or("null") 135 + .to_owned(), 136 + } 137 + .into()); 138 + }; 139 + 140 + Ok(reqwest::get( 141 + &(search_engine_metadata[2].to_owned() 142 + + &utf8_percent_encode(q, NON_ALPHANUMERIC).to_string()), 143 + ) 144 + .await 145 + .map_err(|_e| StatusCode::INTERNAL_SERVER_ERROR)? 146 + .text() 76 147 .await 77 - .unwrap_or_else(|| Redirect::temporary(&("/_/create?format=direct&from=".to_string() + &utf8_percent_encode(go, NON_ALPHANUMERIC).to_string()))) 148 + .map_err(|_e| StatusCode::INTERNAL_SERVER_ERROR)?) 149 + } else { 150 + Err(StatusCode::BAD_REQUEST.into()) 151 + } 78 152 } 79 153 80 - async fn get_redirect_search(go: &str) -> Redirect { 154 + async fn get_redirect_search(go: &str, engine: Option<&str>) -> Result<Redirect> { 81 155 get_redirect(go) 82 156 .await 83 - .unwrap_or_else(|| Redirect::temporary(&("https://kagi.com/search?q=".to_string() + &utf8_percent_encode(go, NON_ALPHANUMERIC).to_string()))) 157 + .and_then(|r| Some(Ok(r))) 158 + .unwrap_or_else(|| { 159 + let Some(search_engine_metadata) = (match engine { 160 + Some(e) => SEARCH_ENGINES.get(e), 161 + None => SEARCH_ENGINES.get("kagi"), // This is the default for historical reasons ... 162 + }) else { 163 + return Err(InvalidSearchEngine { 164 + engine: engine.unwrap_or("null").to_owned(), 165 + } 166 + .into()); 167 + }; 168 + 169 + Ok(Redirect::temporary( 170 + &(search_engine_metadata[1].to_owned() 171 + + &utf8_percent_encode(go, NON_ALPHANUMERIC).to_string()), 172 + )) 173 + }) 174 + } 175 + 176 + fn get_search_engines() -> String { 177 + let mut result = "".to_owned(); 178 + for (engine, meta) in SEARCH_ENGINES.entries() { 179 + let engine_url = utf8_percent_encode(engine, NON_ALPHANUMERIC).to_string(); 180 + let name_attr = html_escape::encode_quoted_attribute(meta[0]); 181 + let name_url = utf8_percent_encode(meta[0], NON_ALPHANUMERIC).to_string(); 182 + 183 + result += format!( 184 + r#"<link rel="search" type="application/opensearchdescription+xml" title="Menu {name_attr}" href="/_/opensearch.xml?name={name_url}&engine={engine_url}" />"# 185 + ).as_str(); 186 + } 187 + 188 + result 84 189 } 85 190 86 191 #[axum::debug_handler] ··· 88 193 session: Session, 89 194 headers: HeaderMap, 90 195 Query(params): Query<HashMap<String, String>>, 91 - ) -> Result<Html<String>> { 196 + ) -> Result<Response> { 92 197 handle_static_page(StaticPageType::Index, session, &params, &headers).await 93 198 } 94 199 ··· 96 201 get_redirect_base(&go).await 97 202 } 98 203 99 - async fn handle_search(Query(params): Query<HashMap<String, String>>) -> Redirect { 204 + async fn handle_search(Query(params): Query<HashMap<String, String>>) -> Result<Redirect> { 100 205 if let Some(go) = params.get("q") { 101 - get_redirect_search(&go).await 206 + get_redirect_search(&go, params.get("engine").and_then(|s| Some(s.as_str()))).await 102 207 } else { 103 - Redirect::temporary("/") 208 + Ok(Redirect::temporary("/")) 104 209 } 105 210 } 106 211 ··· 120 225 session: Session, 121 226 Query(params): Query<HashMap<String, String>>, 122 227 headers: HeaderMap, 123 - ) -> Result<Html<String>> { 228 + ) -> Result<Response> { 124 229 handle_static_page(StaticPageType::Create, session, &params, &headers).await 125 230 } 126 231 async fn handle_create_success_page( 127 232 session: Session, 128 233 Query(params): Query<HashMap<String, String>>, 129 234 headers: HeaderMap, 130 - ) -> Result<Html<String>> { 235 + ) -> Result<Response> { 131 236 match params.get("format").and_then(|s| Some(s.as_str())) { 132 237 Some("direct") => { 133 238 handle_static_page( ··· 154 259 session: Session, 155 260 Query(params): Query<HashMap<String, String>>, 156 261 headers: HeaderMap, 157 - ) -> Result<Html<String>> { 262 + ) -> Result<Response> { 158 263 match params.get("format").and_then(|s| Some(s.as_str())) { 159 264 Some("direct") => { 160 265 handle_static_page( ··· 190 295 session: Session, 191 296 Query(params): Query<HashMap<String, String>>, 192 297 headers: HeaderMap, 193 - ) -> Result<Html<String>> { 298 + ) -> Result<Response> { 194 299 match params.get("format").and_then(|s| Some(s.as_str())) { 195 300 Some("direct") => { 196 301 handle_static_page( ··· 217 322 session: Session, 218 323 Query(params): Query<HashMap<String, String>>, 219 324 headers: HeaderMap, 220 - ) -> Result<Html<String>> { 325 + ) -> Result<Response> { 221 326 handle_static_page(StaticPageType::DeleteFailure, session, &params, &headers).await 222 327 } 328 + async fn handle_opensearch_xml_page( 329 + session: Session, 330 + Query(params): Query<HashMap<String, String>>, 331 + headers: HeaderMap, 332 + ) -> Result<Response> { 333 + handle_static_page(StaticPageType::OpenSearch, session, &params, &headers).await 334 + } 223 335 224 336 #[axum::debug_handler] 225 337 async fn handle_create_do( 226 338 session: Session, 227 339 headers: HeaderMap, 228 340 Query(params): Query<HashMap<String, String>>, 229 - ) -> Result<Response<Body>> { 341 + ) -> Result<Response> { 230 342 ensure_token(&session, &params).await?; 231 343 let owner = ensure_authenticated( 232 344 &headers, ··· 275 387 session: Session, 276 388 headers: HeaderMap, 277 389 Query(params): Query<HashMap<String, String>>, 278 - ) -> Result<Response<Body>> { 390 + ) -> Result<Response> { 279 391 ensure_token(&session, &params).await?; 280 392 ensure_authenticated( 281 393 &headers, ··· 396 508 .route("/_/delete/success", get(handle_delete_success_page)) 397 509 .route("/_/delete/failure", get(handle_delete_failure_page)) 398 510 .route("/_/search", get(handle_search)) 511 + .route("/_/suggest", get(handle_search_suggest)) 512 + .route("/_/opensearch.xml", get(handle_opensearch_xml_page)) 399 513 .route("/_/{*route}", get(handle_404)) 400 514 .route("/{*go}", get(handle_base)); 401 515 let app = NormalizePathLayer::trim_trailing_slash().layer(router.layer(session_layer));
+49 -3
menu/src/static_html.rs
··· 1 1 // SPDX-FileCopyrightText: 2026 Freshly Baked Cake 2 2 // 3 3 // SPDX-License-Identifier: MIT 4 - use axum::{http::HeaderMap, response::Html, response::Result}; 4 + use axum::{ 5 + http::{HeaderMap, header::CONTENT_TYPE}, 6 + response::{Html, IntoResponse, Response, Result}, 7 + }; 5 8 use percent_encoding::{NON_ALPHANUMERIC, utf8_percent_encode}; 6 9 use regex::Captures; 7 10 use std::collections::HashMap; ··· 49 52 DeleteDirectSuccess, 50 53 DeleteRegexSuccess, 51 54 Index, 55 + OpenSearch, 52 56 } 53 57 54 58 pub(crate) async fn handle_static_page<'a>( ··· 56 60 session: Session, 57 61 params: &'a HashMap<String, String>, 58 62 headers: &'a HeaderMap, 59 - ) -> Result<Html<String>> { 63 + ) -> Result<Response> { 60 64 let auth_required = match page_type { 61 65 _ => true, 62 66 }; ··· 84 88 include_String_dynamic!("./html/delete/success/regex.html") 85 89 } 86 90 StaticPageType::Index => include_String_dynamic!("./html/index.html"), 91 + StaticPageType::OpenSearch => include_String_dynamic!("./html/opensearch.xml"), 87 92 }; 88 93 89 94 let username = if auth_required { ··· 161 166 "regex_links", 162 167 Box::new(move || Some(AnyString::Owned(regex_link_table.clone()))), 163 168 ); 169 + 170 + let search_engines = crate::get_search_engines(); 171 + 172 + replacements.insert( 173 + "search_engines", 174 + Box::new(move || Some(AnyString::Owned(search_engines.clone()))), 175 + ); 176 + } 177 + 178 + if matches!(page_type, StaticPageType::OpenSearch) { 179 + replacements.insert( 180 + "shortname", 181 + Box::new(|| { 182 + params 183 + .get("shortname") 184 + .and_then(|name| Some(AnyString::Ref(name.as_str()))) 185 + }), 186 + ); 187 + replacements.insert( 188 + "name", 189 + Box::new(|| { 190 + params 191 + .get("name") 192 + .and_then(|name| Some(AnyString::Ref(name.as_str()))) 193 + }), 194 + ); 195 + replacements.insert( 196 + "engine", 197 + Box::new(|| { 198 + params 199 + .get("engine") 200 + .and_then(|engine| Some(AnyString::Ref(engine.as_str()))) 201 + }), 202 + ); 164 203 } 165 204 166 205 replacements.insert( ··· 169 208 ); 170 209 171 210 let result = template_html(html, replacements); 172 - Ok(Html(result)) 211 + match page_type { 212 + StaticPageType::OpenSearch => { 213 + let mut headers = HeaderMap::new(); 214 + headers.insert(CONTENT_TYPE, "application/xml".parse().unwrap()); 215 + Ok((headers, result).into_response()) 216 + } 217 + _ => Ok(Html(result).into_response()), 218 + } 173 219 } 174 220 175 221 fn template_html<'a>(

History

3 rounds 1 comment
sign up or login to add to the discussion
1 commit
expand
feat(m): improve search engine support
5/5 success
expand
expand 0 comments
pull request successfully merged
1 commit
expand
feat(m): improve search engine support
5/5 success
expand
expand 1 comment

any reason for unauthorized (401) instead of bad request or not found for https://tangled.org/freshlybakedca.ke/patisserie/pulls/196#menu%2fsrc%2fmain.rs-N117

1 commit
expand
feat(m): improve search engine support
1/5 failed, 4/5 success
expand
expand 0 comments