2026-07-29 19:38:40 +02:00
|
|
|
[package]
|
|
|
|
|
name = "portal"
|
2026-09-01 20:31:02 +02:00
|
|
|
version = "0.3.28"
|
2026-07-29 19:38:40 +02:00
|
|
|
edition = "2021"
|
|
|
|
|
|
|
|
|
|
[lib]
|
|
|
|
|
crate-type = ["cdylib", "rlib"]
|
|
|
|
|
|
|
|
|
|
[dependencies]
|
|
|
|
|
leptos = { version = "0.8" }
|
|
|
|
|
leptos_meta = { version = "0.8" }
|
|
|
|
|
leptos_router = { version = "0.8" }
|
|
|
|
|
serde = { version = "1", features = ["derive"] }
|
|
|
|
|
serde_json = "1"
|
2026-08-30 14:44:42 +02:00
|
|
|
# Inline markdown for content descriptions (links, emphasis, code) -
|
|
|
|
|
# runs on both server and client renders, so not feature-gated.
|
|
|
|
|
pulldown-cmark = { version = "0.13", default-features = false, features = ["html"] }
|
2026-07-29 19:38:40 +02:00
|
|
|
|
|
|
|
|
# --- server only ---
|
|
|
|
|
leptos_axum = { version = "0.8", optional = true }
|
|
|
|
|
axum = { version = "0.8", features = ["multipart"], optional = true }
|
|
|
|
|
aws-sdk-s3 = { version = "1", optional = true }
|
|
|
|
|
tokio = { version = "1", features = ["rt-multi-thread", "macros", "signal"], optional = true }
|
|
|
|
|
tower = { version = "0.5", optional = true }
|
2026-08-24 22:40:29 +02:00
|
|
|
tower-http = { version = "0.6", features = ["fs", "set-header"], optional = true }
|
2026-07-29 19:38:40 +02:00
|
|
|
tower-sessions = { version = "0.14", optional = true }
|
|
|
|
|
async-nats = { version = "0.38", optional = true }
|
2026-08-05 07:20:40 +02:00
|
|
|
arc-swap = { version = "1", optional = true }
|
2026-07-29 19:38:40 +02:00
|
|
|
url = { version = "2", optional = true }
|
|
|
|
|
serde_yaml = { version = "0.9", optional = true }
|
|
|
|
|
sha2 = { version = "0.10", optional = true }
|
|
|
|
|
openidconnect = { version = "4", optional = true }
|
|
|
|
|
# For pulling the `groups` custom claim out of the already-verified ID
|
|
|
|
|
# token's raw JWT payload - see server/oidc.rs::extract_groups_claim.
|
|
|
|
|
base64 = { version = "0.22", optional = true }
|
|
|
|
|
chrono = { version = "0.4", features = ["serde"], optional = true }
|
2026-08-06 08:52:29 +02:00
|
|
|
uuid = { version = "1", features = ["v4", "serde"], optional = true }
|
2026-07-29 19:38:40 +02:00
|
|
|
dotenvy = { version = "0.15", optional = true }
|
|
|
|
|
anyhow = { version = "1", optional = true }
|
|
|
|
|
futures = { version = "0.3", optional = true }
|
|
|
|
|
tracing = { version = "0.1", optional = true }
|
|
|
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"], optional = true }
|
2026-08-06 08:52:29 +02:00
|
|
|
# jq-filter evaluation for ResourceSource's optional `jq` field
|
|
|
|
|
# (src/resource.rs) - pure Rust, no shell-out to a `jq` binary.
|
|
|
|
|
jaq-core = { version = "3", optional = true }
|
|
|
|
|
jaq-std = { version = "3", optional = true }
|
|
|
|
|
jaq-json = { version = "2", features = ["sync"], optional = true }
|
2026-07-29 19:38:40 +02:00
|
|
|
|
|
|
|
|
# --- browser only ---
|
|
|
|
|
wasm-bindgen = { version = "0.2", optional = true }
|
|
|
|
|
wasm-bindgen-futures = { version = "0.4", optional = true }
|
|
|
|
|
js-sys = { version = "0.3", optional = true }
|
|
|
|
|
console_error_panic_hook = { version = "0.1", optional = true }
|
|
|
|
|
web-sys = { version = "0.3", features = [
|
|
|
|
|
"Blob",
|
|
|
|
|
"File",
|
|
|
|
|
"FileList",
|
|
|
|
|
"FormData",
|
|
|
|
|
"HtmlInputElement",
|
|
|
|
|
"Request",
|
|
|
|
|
"RequestInit",
|
|
|
|
|
"Response",
|
|
|
|
|
"Window",
|
|
|
|
|
], optional = true }
|
|
|
|
|
|
|
|
|
|
[features]
|
|
|
|
|
default = []
|
|
|
|
|
hydrate = [
|
|
|
|
|
"leptos/hydrate",
|
|
|
|
|
"dep:wasm-bindgen",
|
|
|
|
|
"dep:wasm-bindgen-futures",
|
|
|
|
|
"dep:js-sys",
|
|
|
|
|
"dep:console_error_panic_hook",
|
|
|
|
|
"dep:web-sys",
|
|
|
|
|
]
|
|
|
|
|
ssr = [
|
|
|
|
|
"leptos/ssr",
|
|
|
|
|
"leptos_meta/ssr",
|
|
|
|
|
"leptos_router/ssr",
|
|
|
|
|
"dep:leptos_axum",
|
|
|
|
|
"dep:axum",
|
|
|
|
|
"dep:aws-sdk-s3",
|
|
|
|
|
"dep:tokio",
|
|
|
|
|
"dep:tower",
|
|
|
|
|
"dep:tower-http",
|
|
|
|
|
"dep:tower-sessions",
|
|
|
|
|
"dep:async-nats",
|
2026-08-05 07:20:40 +02:00
|
|
|
"dep:arc-swap",
|
2026-07-29 19:38:40 +02:00
|
|
|
"dep:url",
|
|
|
|
|
"dep:serde_yaml",
|
|
|
|
|
"dep:sha2",
|
|
|
|
|
"dep:openidconnect",
|
|
|
|
|
"dep:base64",
|
|
|
|
|
"dep:chrono",
|
|
|
|
|
"dep:uuid",
|
|
|
|
|
"dep:dotenvy",
|
|
|
|
|
"dep:anyhow",
|
|
|
|
|
"dep:futures",
|
|
|
|
|
"dep:tracing",
|
|
|
|
|
"dep:tracing-subscriber",
|
2026-08-06 08:52:29 +02:00
|
|
|
"dep:jaq-core",
|
|
|
|
|
"dep:jaq-std",
|
|
|
|
|
"dep:jaq-json",
|
2026-07-29 19:38:40 +02:00
|
|
|
]
|
|
|
|
|
|
2026-08-06 08:52:29 +02:00
|
|
|
[dev-dependencies]
|
|
|
|
|
proptest = "1"
|
|
|
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
|
name = "question_lint"
|
|
|
|
|
path = "src/bin/question_lint.rs"
|
|
|
|
|
required-features = ["ssr"]
|
|
|
|
|
|
2026-07-29 19:38:40 +02:00
|
|
|
[profile.wasm-release]
|
|
|
|
|
inherits = "release"
|
|
|
|
|
opt-level = 'z'
|
|
|
|
|
lto = true
|
|
|
|
|
codegen-units = 1
|
|
|
|
|
|
|
|
|
|
[package.metadata.leptos]
|
|
|
|
|
output-name = "portal"
|
2026-08-11 21:43:32 +02:00
|
|
|
# Disambiguates the app binary from the utility [[bin]] target
|
|
|
|
|
# (question_lint) added alongside it - cargo-leptos otherwise can't
|
|
|
|
|
# tell which of the two is "the" server.
|
2026-08-06 08:57:58 +02:00
|
|
|
bin-target = "portal"
|
2026-07-29 19:38:40 +02:00
|
|
|
site-root = "target/site"
|
|
|
|
|
site-pkg-dir = "pkg"
|
|
|
|
|
style-file = "style/main.css"
|
|
|
|
|
assets-dir = "public"
|
|
|
|
|
site-addr = "127.0.0.1:3010"
|
|
|
|
|
reload-port = 3011
|
|
|
|
|
bin-features = ["ssr"]
|
|
|
|
|
bin-default-features = false
|
|
|
|
|
lib-features = ["hydrate"]
|
|
|
|
|
lib-default-features = false
|
|
|
|
|
lib-profile-release = "wasm-release"
|
2026-08-25 19:48:47 +02:00
|
|
|
# Content-hashed pkg names (portal.<hash>.js/wasm/css) + hash.txt: a
|
|
|
|
|
# freshly served page can never reference a stale cached bundle - an
|
|
|
|
|
# iPhone kept a heuristically-cached portal.js across three releases
|
|
|
|
|
# and paired it with new wasm, silently killing hydration. Runtime
|
|
|
|
|
# needs LEPTOS_HASH_FILES=true (set in each content repo's deploy env).
|
|
|
|
|
hash-files = true
|
2026-08-24 21:44:31 +02:00
|
|
|
|
|
|
|
|
# cargo release <level> is how a portal version is cut: bump, commit,
|
|
|
|
|
# tag v{{version}}, push. CI (publish.yml) reacts to the tag and
|
|
|
|
|
# publishes the release artifact; nothing on crates.io.
|
|
|
|
|
[package.metadata.release]
|
|
|
|
|
publish = false
|
|
|
|
|
push = true
|
|
|
|
|
tag-name = "v{{version}}"
|
|
|
|
|
pre-release-commit-message = "Release {{version}}"
|