[WIP] A (somewhat barebones) atproto app for creating custom sites without hosting!

upload: add subcrate for lexicon

vielle.dev 9377c5ca 8dbd7ddc

verified
Changed files
+153 -20
upload
+32 -18
upload/Cargo.lock
··· 388 388 389 389 [[package]] 390 390 name = "cfg-if" 391 - version = "1.0.3" 391 + version = "1.0.4" 392 392 source = "registry+https://github.com/rust-lang/crates.io-index" 393 - checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" 393 + checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" 394 394 395 395 [[package]] 396 396 name = "cfg_aliases" ··· 1507 1507 1508 1508 [[package]] 1509 1509 name = "jacquard" 1510 - version = "0.5.2" 1510 + version = "0.5.3" 1511 1511 source = "registry+https://github.com/rust-lang/crates.io-index" 1512 - checksum = "4d4477374935842a97de2f51f93ef2575a1b9a23567947fe6c1f9542f11edc17" 1512 + checksum = "bf257386e29370eb7387093736d59f2aeda3ac692a37481c7201bc5f9cc82fae" 1513 1513 dependencies = [ 1514 - "async-trait", 1515 1514 "bon", 1516 1515 "bytes", 1516 + "getrandom 0.2.16", 1517 1517 "http", 1518 1518 "jacquard-api", 1519 1519 "jacquard-common", ··· 1533 1533 "smol_str", 1534 1534 "thiserror 2.0.17", 1535 1535 "tokio", 1536 + "trait-variant", 1536 1537 "url", 1537 1538 ] 1538 1539 1539 1540 [[package]] 1540 1541 name = "jacquard-api" 1541 - version = "0.5.2" 1542 + version = "0.5.3" 1542 1543 source = "registry+https://github.com/rust-lang/crates.io-index" 1543 - checksum = "17c7c2f4b0e969cab15bba8ed4aac2e5b75a5d9a81fb96263d03c3628d73d15b" 1544 + checksum = "e67619aa60467ee687633e5face5743835e5f9d8e57c387a8d830cfd2ba8d2c8" 1544 1545 dependencies = [ 1545 1546 "bon", 1546 1547 "bytes", ··· 1553 1554 1554 1555 [[package]] 1555 1556 name = "jacquard-common" 1556 - version = "0.5.2" 1557 + version = "0.5.3" 1557 1558 source = "registry+https://github.com/rust-lang/crates.io-index" 1558 - checksum = "79cbf503a1be52ef18c2c08de74f386c8dc9f181d33d792c9be6b20577aaeb2c" 1559 + checksum = "8b1c05d479eee46004ba3ec495e7802b7c02cc429396aeb7296a558b9cb6e6ce" 1559 1560 dependencies = [ 1560 - "async-trait", 1561 1561 "base64 0.22.1", 1562 1562 "bon", 1563 1563 "bytes", 1564 1564 "chrono", 1565 1565 "cid", 1566 + "getrandom 0.3.4", 1566 1567 "http", 1567 1568 "ipld-core", 1568 1569 "k256", ··· 1583 1584 "smol_str", 1584 1585 "thiserror 2.0.17", 1585 1586 "tokio", 1587 + "trait-variant", 1586 1588 "url", 1587 1589 ] 1588 1590 1589 1591 [[package]] 1590 1592 name = "jacquard-derive" 1591 - version = "0.5.2" 1593 + version = "0.5.3" 1592 1594 source = "registry+https://github.com/rust-lang/crates.io-index" 1593 - checksum = "40dc06e43329af02a8b9cea7bbaf1a401cc6b5de1325345e767bf90e0aa60636" 1595 + checksum = "aadace50223141e60d16e26a28c8c8a9b647f291814986010234cf1c130367ab" 1594 1596 dependencies = [ 1595 1597 "proc-macro2", 1596 1598 "quote", ··· 1599 1601 1600 1602 [[package]] 1601 1603 name = "jacquard-identity" 1602 - version = "0.5.2" 1604 + version = "0.5.3" 1603 1605 source = "registry+https://github.com/rust-lang/crates.io-index" 1604 - checksum = "85bc5e8bc22c344d7c8ae2f5d474ef6450d0928dabeaf87c6eb8104f4dd8033c" 1606 + checksum = "afafcd8fcc26095789aeefe4f54cda4471f1748ba11fa7886184f515362b6339" 1605 1607 dependencies = [ 1606 - "async-trait", 1607 1608 "bon", 1608 1609 "bytes", 1609 1610 "hickory-resolver", ··· 1618 1619 "serde_json", 1619 1620 "thiserror 2.0.17", 1620 1621 "tokio", 1622 + "trait-variant", 1621 1623 "url", 1622 1624 "urlencoding", 1623 1625 ] 1624 1626 1625 1627 [[package]] 1626 1628 name = "jacquard-oauth" 1627 - version = "0.5.2" 1629 + version = "0.5.3" 1628 1630 source = "registry+https://github.com/rust-lang/crates.io-index" 1629 - checksum = "505c788d716c82e93f91847032b4c1abe397b89941a0dd7f4a354f3f7e76c3e4" 1631 + checksum = "597e74c6697a449e834936dde22c30165f0f2da0c38b42ec599173b58d73a098" 1630 1632 dependencies = [ 1631 - "async-trait", 1632 1633 "base64 0.22.1", 1633 1634 "bytes", 1634 1635 "chrono", ··· 1756 1757 checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" 1757 1758 dependencies = [ 1758 1759 "spin", 1760 + ] 1761 + 1762 + [[package]] 1763 + name = "lexicons" 1764 + version = "0.1.0" 1765 + dependencies = [ 1766 + "bon", 1767 + "bytes", 1768 + "jacquard-common", 1769 + "jacquard-derive", 1770 + "miette", 1771 + "serde", 1772 + "thiserror 2.0.17", 1759 1773 ] 1760 1774 1761 1775 [[package]]
+14 -2
upload/Cargo.toml
··· 1 + [workspace] 2 + resolver = "3" 3 + members = ["lexicons"] 4 + 1 5 [package] 2 6 name = "atcities-upload" 3 7 version = "0.1.0" 4 8 edition = "2024" 5 9 6 10 [dependencies] 11 + # lexicons = { path = "./lexicons" } 7 12 clap = { version = "4.5.49", features = ["derive"] } 8 13 ignore = "0.4.23" 9 14 regex = "1.12.2" 10 15 mime_guess = "2.0.5" 11 16 tokio = { version = "1.48.0", features = ["full"] } 12 - jacquard = { version = "0.5.2", features = ["api", "api_full", "derive", "dns", "loopback"] } 13 - reqwest = { version = "0.12.24", features = ["__tls", "charset", "default-tls", "h2", "http2", "system-proxy"] } 17 + jacquard = { version = "0.5.2", features = ["api", "dns"] } 18 + reqwest = { version = "0.12.24", features = [ 19 + "__tls", 20 + "charset", 21 + "default-tls", 22 + "h2", 23 + "http2", 24 + "system-proxy", 25 + ] }
+17
upload/lexicons/Cargo.toml
··· 1 + [package] 2 + name = "lexicons" 3 + version = "0.1.0" 4 + edition = "2024" 5 + 6 + [features] 7 + default = ["dev_atcities"] 8 + dev_atcities = [] 9 + 10 + [dependencies] 11 + bon = "3.8.1" 12 + bytes = { version = "1.10.1", features = ["serde"] } 13 + miette = "7.6.0" 14 + serde = "1.0.228" 15 + thiserror = "2.0.17" 16 + jacquard-common = "0.5.3" 17 + jacquard-derive = "0.5.3"
+6
upload/lexicons/src/dev_atcities.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // This file was automatically generated from Lexicon schemas. 4 + // Any manual changes will be overwritten on the next regeneration. 5 + 6 + pub mod route;
+77
upload/lexicons/src/dev_atcities/route.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: dev.atcities.route 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[jacquard_derive::lexicon] 9 + #[derive( 10 + serde::Serialize, 11 + serde::Deserialize, 12 + Debug, 13 + Clone, 14 + PartialEq, 15 + Eq, 16 + jacquard_derive::IntoStatic, 17 + bon::Builder, 18 + )] 19 + #[serde(rename_all = "camelCase")] 20 + pub struct Blob<'a> { 21 + #[serde(borrow)] 22 + pub blob: jacquard_common::types::blob::Blob<'a>, 23 + } 24 + 25 + /// Page URL maps directly to a record key 26 + #[jacquard_derive::lexicon] 27 + #[derive( 28 + serde::Serialize, 29 + serde::Deserialize, 30 + Debug, 31 + Clone, 32 + PartialEq, 33 + Eq, 34 + jacquard_derive::IntoStatic, 35 + bon::Builder, 36 + )] 37 + #[serde(rename_all = "camelCase")] 38 + pub struct Route<'a> { 39 + #[serde(borrow)] 40 + pub page: crate::dev_atcities::route::Blob<'a>, 41 + } 42 + 43 + /// Typed wrapper for GetRecord response with this collection's record type. 44 + #[derive( 45 + serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, 46 + )] 47 + #[serde(rename_all = "camelCase")] 48 + pub struct RouteGetRecordOutput<'a> { 49 + #[serde(skip_serializing_if = "std::option::Option::is_none")] 50 + #[serde(borrow)] 51 + pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>, 52 + #[serde(borrow)] 53 + pub uri: jacquard_common::types::string::AtUri<'a>, 54 + #[serde(borrow)] 55 + pub value: Route<'a>, 56 + } 57 + 58 + /// Marker type for deserializing records from this collection. 59 + pub struct RouteRecord; 60 + impl jacquard_common::xrpc::XrpcResp for RouteRecord { 61 + const NSID: &'static str = "dev.atcities.route"; 62 + const ENCODING: &'static str = "application/json"; 63 + type Output<'de> = RouteGetRecordOutput<'de>; 64 + type Err<'de> = jacquard_common::types::collection::RecordError<'de>; 65 + } 66 + 67 + impl jacquard_common::types::collection::Collection for Route<'_> { 68 + const NSID: &'static str = "dev.atcities.route"; 69 + type Record = RouteRecord; 70 + } 71 + 72 + impl From<RouteGetRecordOutput<'_>> for Route<'_> { 73 + fn from(output: RouteGetRecordOutput<'_>) -> Self { 74 + use jacquard_common::IntoStatic; 75 + output.value.into_static() 76 + } 77 + }
+7
upload/lexicons/src/lib.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // This file was automatically generated from Lexicon schemas. 4 + // Any manual changes will be overwritten on the next regeneration. 5 + 6 + #[cfg(feature = "dev_atcities")] 7 + pub mod dev_atcities;