···1// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT.
2//!Definitions for the `sh.weaver.actor` namespace.
3pub mod defs;
04pub mod profile;
5#[derive(Debug)]
6pub struct Profile;
···1// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT.
2//!Definitions for the `sh.weaver.actor` namespace.
3pub mod defs;
4+pub mod get_profile;
5pub mod profile;
6#[derive(Debug)]
7pub struct Profile;
···1+// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT.
2+//!Definitions for the `sh.weaver.actor.getProfile` namespace.
3+pub const NSID: &str = "sh.weaver.actor.getProfile";
4+#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5+#[serde(rename_all = "camelCase")]
6+pub struct ParametersData {
7+ ///Handle or DID of account to fetch profile of.
8+ pub actor: atrium_api::types::string::AtIdentifier,
9+}
10+pub type Parameters = atrium_api::types::Object<ParametersData>;
11+pub type Output = crate::sh::weaver::actor::defs::ProfileDataView;
12+#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
13+#[serde(tag = "error", content = "message")]
14+pub enum Error {}
15+impl std::fmt::Display for Error {
16+ fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
17+ Ok(())
18+ }
19+}
+21-2
crates/weaver-common/src/lib.rs
···1-pub mod client;
2-pub mod compat;
3pub mod config;
4pub mod error;
5pub mod lexicons;
6pub mod oauth;
7pub mod resolver;
008pub use lexicons::*;
910pub use crate::error::{Error, IoError, ParseError, SerDeError};
···34 markdown_weaver::CowStr::Inlined(s) => std::borrow::Cow::Owned(s.as_ref().to_owned()),
35 }
36}
000000000000000000
···1+pub mod agent;
02pub mod config;
3pub mod error;
4pub mod lexicons;
5pub mod oauth;
6pub mod resolver;
7+pub mod xrpc_server;
8+use atrium_api::types::{BlobRef, TypedBlobRef, string::Did};
9pub use lexicons::*;
1011pub use crate::error::{Error, IoError, ParseError, SerDeError};
···35 markdown_weaver::CowStr::Inlined(s) => std::borrow::Cow::Owned(s.as_ref().to_owned()),
36 }
37}
38+39+pub fn avatar_cdn_url(did: &Did, blob_ref: &BlobRef) -> String {
40+ let (cid, mime_type) = match blob_ref {
41+ BlobRef::Typed(TypedBlobRef::Blob(b)) => (
42+ atrium_api::types::string::Cid::new(b.r#ref.0)
43+ .as_ref()
44+ .to_string(),
45+ &b.mime_type,
46+ ),
47+ BlobRef::Untyped(r) => (r.cid.clone(), &r.mime_type),
48+ };
49+ format!(
50+ "https://cdn.bsky.app/img/avatar/plain/{}/{}@{}",
51+ did.as_str(),
52+ cid,
53+ mime_type.strip_prefix("image/").unwrap_or(mime_type)
54+ )
55+}
···1+//! Weaver renderer
2+//!
3+//! This crate works with the weaver-markdown crate to render and optionally upload markdown notebooks to your ATProto PDS.
4+//!
56+pub mod types;
···1+//! Weaver server
2+//!
3+//! This crate is a lightweight HTTP server which can serve a notebook.
4+//! It will auto-reload
5+6+use axum::{Router, response::Html, routing::get};
7+8+use tokio::net::TcpListener;
9+10#[tokio::main]
11async fn main() {}
12+13+async fn handler() -> Html<&'static str> {
14+ Html("<h1>Hello, World!</h1>")
15+}
+44-5
crates/weaver-workspace-hack/Cargo.toml
···1617### BEGIN HAKARI SECTION
18[dependencies]
00019data-encoding = { version = "2" }
20-futures-channel = { version = "0.3" }
21-futures-core = { version = "0.3" }
000000000022idna = { version = "1" }
23-memchr = { version = "2" }
000000024percent-encoding = { version = "2" }
25-proc-macro2 = { version = "1" }
026quote = { version = "1" }
0027scopeguard = { version = "1" }
000028smallvec = { version = "1", default-features = false, features = ["const_new"] }
0029syn = { version = "2", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] }
030tokio = { version = "1", features = ["full"] }
0031tracing = { version = "0.1", features = ["log"] }
003233[build-dependencies]
34data-encoding = { version = "2" }
35-proc-macro2 = { version = "1" }
00036quote = { version = "1" }
037syn = { version = "2", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] }
03839### END HAKARI SECTION
···1617### BEGIN HAKARI SECTION
18[dependencies]
19+base16ct = { version = "0.2", default-features = false, features = ["alloc"] }
20+byteorder = { version = "1" }
21+chrono = { version = "0.4", features = ["serde"] }
22data-encoding = { version = "2" }
23+der = { version = "0.7", default-features = false, features = ["oid", "pem"] }
24+diesel = { version = "2", features = ["chrono", "i-implement-a-third-party-backend-and-opt-into-breaking-changes", "postgres", "serde_json", "sqlite"] }
25+diesel-async = { version = "0.5", features = ["deadpool", "postgres", "sync-connection-wrapper"] }
26+ecdsa = { version = "0.16", features = ["alloc", "der", "signing", "verifying"] }
27+either = { version = "1", features = ["use_std"] }
28+elliptic-curve = { version = "0.13", features = ["digest", "hazmat", "jwk", "pem"] }
29+fastrand = { version = "2" }
30+ff = { version = "0.13", default-features = false, features = ["alloc"] }
31+futures-channel = { version = "0.3", features = ["sink"] }
32+generic-array = { version = "0.14", default-features = false, features = ["more_lengths", "serde", "zeroize"] }
33+group = { version = "0.13", default-features = false, features = ["alloc"] }
34+hashbrown = { version = "0.15", features = ["serde"] }
35idna = { version = "1" }
36+libsqlite3-sys = { version = "0.30", features = ["bundled"] }
37+log = { version = "0.4", default-features = false, features = ["std"] }
38+memchr = { version = "2", features = ["use_std"] }
39+miette = { version = "7", features = ["fancy", "syntect-highlighter"] }
40+mime_guess = { version = "2" }
41+minijinja = { version = "2" }
42+num-traits = { version = "0.2", default-features = false, features = ["i128", "libm", "std"] }
43+p384 = { version = "0.13", default-features = false, features = ["ecdsa"] }
44percent-encoding = { version = "2" }
45+pkcs8 = { version = "0.10", default-features = false, features = ["pem"] }
46+proc-macro2 = { version = "1", features = ["span-locations"] }
47quote = { version = "1" }
48+rand_core = { version = "0.6", default-features = false, features = ["std"] }
49+reqwest = { version = "0.12", features = ["gzip", "json", "rustls-tls"] }
50scopeguard = { version = "1" }
51+sec1 = { version = "0.7", features = ["pem", "serde", "subtle"] }
52+serde = { version = "1", features = ["alloc", "derive"] }
53+serde_json = { version = "1", features = ["alloc", "preserve_order", "raw_value"] }
54+sha2 = { version = "0.10", features = ["oid"] }
55smallvec = { version = "1", default-features = false, features = ["const_new"] }
56+spki = { version = "0.7", default-features = false, features = ["pem"] }
57+subtle = { version = "2" }
58syn = { version = "2", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] }
59+time = { version = "0.3", features = ["formatting", "local-offset", "macros", "parsing"] }
60tokio = { version = "1", features = ["full"] }
61+tokio-util = { version = "0.7", features = ["codec", "io"] }
62+toml = { version = "0.8", features = ["preserve_order"] }
63tracing = { version = "0.1", features = ["log"] }
64+tracing-core = { version = "0.1" }
65+zeroize = { version = "1", features = ["derive", "serde"] }
6667[build-dependencies]
68data-encoding = { version = "2" }
69+diesel_derives = { version = "2", features = ["32-column-tables", "chrono", "postgres", "sqlite", "with-deprecated"] }
70+either = { version = "1", features = ["use_std"] }
71+hashbrown = { version = "0.15", features = ["serde"] }
72+proc-macro2 = { version = "1", features = ["span-locations"] }
73quote = { version = "1" }
74+serde = { version = "1", features = ["alloc", "derive"] }
75syn = { version = "2", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] }
76+toml = { version = "0.8", features = ["preserve_order"] }
7778### END HAKARI SECTION