zakstucke
fd2817de26
Allow CDN_PKG_PATH at runtime as well as current build time, preferring it when available. ( #2466 )
2024-03-28 08:30:54 +00:00
sify21
104c09f3bf
register server_fn first to allow for wildcard Route path ( #2435 )
...
It's normal to have a `NotFound` page with a wildcard path like this
```
<Routes>
...
<Route path="*any" view=NotFound>
</Routes>
```
In `ssr` mode, most servers do a `first match win` approach, so we
should register server functions before view routes, or else a wildcard
route would block all api requests.
https://discord.com/channels/1031524867910148188/1218508054442545185
Signed-off-by: 司芳源 <sify21@163.com>
2024-03-19 09:37:42 -07:00
battmdpkq
4faf3fa894
chore: fix types in some comments ( #2413 )
...
Signed-off-by: battmdpkq <cmaker@163.com>
2024-03-09 07:38:25 -05:00
Ben Wishovich
1da2fff706
Fix missed stuff ( #2398 )
2024-03-02 17:57:20 -08:00
Greg Johnston
d72b12524e
Merge pull request #2395 from leptos-rs/int-ax-doc
2024-03-01 20:08:18 -05:00
Greg Johnston
8e79c5be5c
fix: ignore as with other doctests for now
2024-03-01 18:39:55 -05:00
Greg Johnston
de25658c36
Merge pull request #2392 from paul-hansen/fix-ci
...
fix(ci): "needless borrow" error and example never exiting
2024-03-01 18:37:48 -05:00
Sam Judelson
f70ebc1289
docs: add note on how to get ResponseOptions
( #2380 )
2024-03-01 10:47:02 -05:00
Paul Hansen
b431315f7c
fix(ci): "needless borrow" error
2024-03-01 09:21:58 -06:00
Paul Hansen
6a83161368
chore: add MSRV ( #2360 )
2024-02-28 07:19:09 -05:00
Marc-Stefan Cassola
4b00c16cb9
added hashes generated from cargo-leptos ( #2373 )
...
* added hashes generated from cargo-leptos
* Added config option to disable frontend file name hash
2024-02-27 16:28:27 -08:00
zoomiti
4809cf473e
feat: provide leptos_router::Method
via context ( #1808 ) ( #2315 )
2024-02-26 21:25:53 -05:00
Tadas Dailyda
aa977001c1
feat: add support for trailing slashes ( closes #2154 ) ( #2217 )
2024-02-26 20:56:44 -05:00
zoomiti
753bf1ed54
Fix Broken Doc links and Deprecate FromUtf8Error
in oco.rs
( #2318 )
...
* fix: deprecate `FromUtf8Error` in `oco.rs`
* chore: fix broken doc links (#859 )
* chore: fix broken doc link to server attribute macro
* cargo fmt
2024-02-21 19:24:40 -08:00
Janu (Janeshwar) Cambrelen
0a73487152
feat(leptos-axum): propagate trace context to server functions ( #2340 )
2024-02-21 19:21:00 -08:00
zoomiti
95bd9cc544
feat: use CDN_PKG_PATH
at build time to set alternate base URL for JS/WASM bundles ( #2281 ) ( #2283 )
2024-02-15 20:21:47 -05:00
Sam Judelson
1b55227d10
fix: remove unnecessary default features on axum
in server_fns
to support running Axum in a WASM environment ( #2270 )
2024-02-07 11:08:48 -05:00
SleeplessOne1917
1ddb39e9bd
docs: typo in actix integrations docs ( #2258 )
...
Co-authored-by: SleeplessOne1917 <insomnia-void@protonmail.com>
2024-02-04 20:57:51 -05:00
Chris
15d4ca0638
feat(axum): provide state to server fn context ( #2257 )
...
Note that this is a minimal implementation and will __not__ allow the
user to `expect_state` if they have external calls to rendering their
app (i.e. using `render_app_to_*` directly).
2024-02-04 19:26:21 -05:00
Greg Johnston
56088a9ead
fix: error rather than panicking if unable to send response in Axum integration ( #2241 )
...
* fix: error rather than panicking if unable to send response in Axum integration
2024-02-03 19:18:41 -05:00
Greg Johnston
a834c03974
fix: bug with Actix redirects ( #2246 )
2024-01-31 09:14:40 -05:00
Greg Johnston
1b5961edaa
fix: fix type inference on extract()
functions ( #2233 )
2024-01-26 17:54:42 -05:00
benwis
ac12e1a411
0.6.0
...
Signed-off-by: benwis <ben@celcyon.com>
2024-01-26 11:54:07 -08:00
Greg Johnston
ca3806e6bc
v0.6.0-rc1
2024-01-24 21:35:14 -05:00
Greg Johnston
7d1ce45a57
chore: minimize features activated with leptos_axum
's default feature ( #1846 ) ( #2213 )
...
- `leptos_axum` default feature:
- remove `tokio/full`, `axum/macros`
- add `tokio/fs`, `tokio/sync`
- example `leptos-tailwind-axum`:
- enable `tokio`'s `rt-multi-thread` and `macros` features
- example `ssr_modes_axum`:
- enable `tokio`'s `rt-multi-thread` and `macros` features
Co-authored-by: Paul Nettleton <paulnett7@hotmail.com>
2024-01-21 15:22:46 -05:00
Greg Johnston
567644df8f
clarify docs here
2024-01-20 14:29:22 -05:00
Greg Johnston
39f5481b8c
clean up in docs and rename Axum extract() to match Actix extract()
2024-01-20 14:29:08 -05:00
Greg Johnston
eb45d05f3b
clippy
2024-01-19 17:43:05 -05:00
Greg Johnston
94cb4c0ec3
remove pavex work (now in pavex
branch)
2024-01-19 14:17:26 -05:00
Greg Johnston
7a086ad159
update version number
2024-01-19 14:17:25 -05:00
Greg Johnston
1ad7ee8a03
generalize error redirect behavior across integrations
2024-01-19 14:16:58 -05:00
Greg Johnston
5e08253521
get both client and server side working
2024-01-19 14:16:58 -05:00
Greg Johnston
cc6f65cd83
initial version of server action error handling without JS
2024-01-19 14:16:58 -05:00
Greg Johnston
a5cbfa0aad
remove viz integration (see #2177 )
2024-01-19 14:16:58 -05:00
Greg Johnston
738eeefe73
chore: clear warnings
2024-01-19 14:16:18 -05:00
Greg Johnston
853c080707
add missing server fn registration
2024-01-19 14:16:18 -05:00
Greg Johnston
5e6f4403ca
set up redirects in Actix
2024-01-19 14:16:18 -05:00
Greg Johnston
4e3f1c834c
handle client-side and server-side redirects correctly (in Axum)
2024-01-19 14:16:18 -05:00
Greg Johnston
c8fbee18c8
finished Actix support?
2024-01-19 14:16:17 -05:00
Greg Johnston
e1a9856ca9
more Actix work
2024-01-19 14:16:17 -05:00
Greg Johnston
60efaefff4
start Actix work
2024-01-19 14:16:17 -05:00
Greg Johnston
af62d2e900
automatically include server function handler in .leptos_router()
2024-01-19 14:16:17 -05:00
Greg Johnston
c3e3ce7878
changes to get todo_app_sqlite_axum
example working
2024-01-19 14:16:17 -05:00
benwis
c7422cd96e
First commit, checkpoint for cyclical dependency error
2024-01-19 14:15:51 -05:00
Daniel Santana
cadd217078
Update integration with support for axum 0.7 ( #2082 )
...
* chore: update to axum 0.7
Removed http, since it's included in axum, and replaced hyper by http-body-util, which is a smaller.
* chore: update samples to work with nre axum
Missing sessions_axum_auth, pending PR merge.
* chore: all dependencies update to axum 0.7
* chore: cargo fmt
* chore: fix doctests
* chore: Fix example that in reality doesn't use axum.
Fixed anyway.
* chore: more examples support for axum 0.7
* Small tweak
2024-01-19 14:13:55 -05:00
Greg Johnston
ae1de88916
Revert "Better handling for trailing slashes. ( #2154 ) ( #2172 )"
...
This reverts commit 1eaf886481
.
2024-01-19 10:27:38 -05:00
benwis
98f18e7c31
release: version 0.5.6
2024-01-16 16:57:07 -08:00
Greg Johnston
3a5730800c
v0.5.5
2024-01-15 17:10:49 -05:00
Greg Johnston
d71feada7e
change: change all tracing levels to trace
to reduce verbosity ( #2176 )
2024-01-13 08:19:12 -08:00
Cody Casterline
1eaf886481
Better handling for trailing slashes. ( #2154 ) ( #2172 )
...
* retain trailing slashes in paths but leave matching trail-slash-insensitive
* fix: Allow trailing slashes to remain in leptos_path.
* Better handling for trailing slashes. (#2154 )
This adds a trailing_slash option to <Router> and <Route>.
By default, this option is backward compatible with current Leptos
behavior, but users can opt into two new modes for handling trailing
slashes.
* cargo fmt
* Fix redirect routes for wildcard patterns.
* Clippy fixies
* (Re)Reduce the scope of PossibleBranchContext's internals.
* Test real code, not copied code.
* Test TrailingSlash redirects.
* Fixes and more tests for matching "" && "/".
This path is the exception to the rule and *should* be treated
as equivalent regardless of its trailing slash.
* cargo fmt
---------
Co-authored-by: Tadas Dailyda <tadas@dailyda.com>
2024-01-11 13:51:31 -08:00
Niklas Eicker
fb0a62f3f6
fix: support additional context for route generation ( #2113 )
2023-12-17 20:37:27 -05:00
martin frances
731b028b11
chore: Bump http from 0.2.8 to 0.2.11. ( #2068 )
2023-11-29 07:36:03 -05:00
Greg Johnston
b95a79240e
v0.5.4
2023-11-28 18:46:51 -05:00
Greg Johnston
d6ee2a37f4
v0.5.3
2023-11-27 19:38:33 -05:00
martin frances
362e3bc603
chore: stop using std::fmt, instead used core::fmt. ( #2033 )
2023-11-17 15:36:13 -05:00
Greg Johnston
7aced17976
docs: clarify need to provide context to both rendering and server function handler ( #1983 )
2023-11-03 18:34:50 -04:00
Greg Johnston
777095670e
fix: add leptos_axum::build_static_routes
( closes #1843 ) ( #1855 )
2023-10-27 17:09:52 -04:00
Greg Johnston
5f53a1459e
v0.5.2
2023-10-24 21:03:29 -04:00
Greg Johnston
d943a50df1
fix: misaligned </head>
tags in streaming responses ( closes #1930 ) ( #1932 )
2023-10-24 15:42:07 -04:00
martin frances
d999ff857d
chore: remove cargo doc
lint warnings ( #1936 )
2023-10-24 14:28:01 -04:00
Greg Johnston
6abdca0597
docs: better document default
and wasm
features on leptos_axum
( closes #1872 ) ( #1883 )
2023-10-20 14:57:53 -04:00
Greg Johnston
0d4862b238
feat: add extractor
functions with better API than extract
( closes #1755 ) ( #1859 )
2023-10-07 13:10:30 -04:00
Ben Wishovich
5220c37edd
fix: make Async Mode return Content-Type header in Response ( #1851 )
2023-10-05 21:13:33 -04:00
Ben Wishovich
2d634364a9
feat: set Content-Type header for all Responses to text/html;charset="utf-8" ( #1803 )
2023-09-29 13:51:15 -04:00
Ben Wishovich
d7fff5a8ab
fix: render_route
error message and matching of non standard routes ( #1799 )
2023-09-29 09:10:59 -04:00
Sean Aye
50678dafe1
feat: add JS Fetch integration support ( #1554 )
2023-09-25 07:51:25 -04:00
Nico Burniske
38d1727e9c
change: generate_route_list
no longer async in any integration ( #1485 )
2023-09-22 15:42:58 -04:00
Village
3b864ac1a0
feat: Static Site Generation ( #1649 )
2023-09-22 13:32:09 -04:00
Chris
a821abfb11
fix: relax bounds on LeptosRoutes
( #1729 )
2023-09-15 18:17:55 -04:00
Cosmo Brain
5db2590bc6
feat: implement LeptosRoutes
for &mut ServiceConfig
in leptos_actix
( #1706 )
2023-09-13 20:56:03 -04:00
Greg Johnston
2fe5be2483
fix: restore deleted extract_with_state
function ( #1683 )
2023-09-10 07:55:13 -04:00
Greg Johnston
66dfef8729
Merge pull request #1681 from leptos-rs/docs
2023-09-08 17:11:47 -04:00
Greg Johnston
238d61ce1e
feat: experimental islands ( #1660 )
2023-09-08 16:33:00 -04:00
Greg Johnston
23d48d4c0e
docs: remove stray references to Scope
( closes #1671 )
2023-09-08 16:02:45 -04:00
IcosaHedron
d9e83121c1
feat: add reload websocket configuration and enable env configuration ( #1613 )
2023-09-01 20:51:46 -04:00
Greg Johnston
8f067dcde7
chore: clear release-mode warnings
2023-08-25 17:16:00 -04:00
Matt Cuneo
a789100e22
feat: allow autoreload websocket connection to work outside of localhost ( #1548 )
...
* Updated client reloading to use window.location.protocol/host to determine websocket connection. Added optional config reload_external_port to provide further control of the client websocket connection. These changes allow reloading while accessing the served site from outside of localhost.
2023-08-25 15:54:22 -04:00
Greg Johnston
dbc707adcd
feat/change: adopt reactive ownership model and drop cx
/Scope
( #918 )
2023-08-21 19:31:37 -04:00
mateusvmv
4001561987
fix: scoping of JS variable names in inline scripts ( #1489 )
2023-08-03 08:46:06 -04:00
martin frances
1e002c2c2f
chore: Removed call to .into(), plus minor touch to docs. ( #1396 )
2023-07-20 08:07:31 -04:00
Greg Johnston
e8aa9b24f1
fix: memory leak in leptos_axum
( #1374 )
2023-07-17 21:59:20 -04:00
Greg Johnston
8e68699435
feat: add support for adding CSP nonces ( #1348 )
2023-07-14 16:37:18 -04:00
Joseph Cruz
7902e7edb7
ci: speed up verification ( #1347 )
...
* build: introduce ci task
* refactor(ci): rename cargo make task runner
* ci: add ci workflow
* ci: remove redundant workflows
2023-07-14 14:37:17 -04:00
Greg Johnston
4ad223277d
fix: duplicated meta content during async rendering ( #1352 )
2023-07-14 13:14:19 -04:00
Greg Johnston
3eed86fbf3
docs/warnings: improve ServerFnError
when a server function is not found ( #1350 )
2023-07-14 12:43:08 -04:00
Joseph Cruz
3481a6ee53
build: run tasks from workpace or member directory ( #1339 )
2023-07-13 16:46:51 -04:00
Greg Johnston
5d48911f01
fix: check LEPTOS_OUTPUT_NAME
correctly at compile time ( #1338 )
2023-07-13 10:49:13 -04:00
Greg Johnston
576bb078f7
fix: Actix server fn redirect()
duplicate Location
headers ( #1326 )
2023-07-11 13:57:44 -04:00
sjud
7e540a8f49
feat: support Axum extractors with state other than ()
( #1275 )
...
This requires state to be provided via context using a special handler, but allows for extractors that use this state, rather than only `()`, as previously.
2023-07-05 20:40:29 -04:00
Greg Johnston
66f54e7f1a
docs: add docs on responses/redirects and clarification re: Axum State(_)
extractors ( #1272 )
2023-07-03 09:58:02 -04:00
Greg Johnston
23594a43ea
fix: allow FnOnce
extractors ( #1192 )
2023-06-15 20:09:13 -04:00
martin frances
6fac92cb62
perf: removed duplicate calls to .collect() and .into_iter() in leptos_actix
( #1133 )
2023-06-11 21:54:24 -04:00
Greg Johnston
bb10b32200
feat: register server functions automatically ( #1154 )
2023-06-11 09:09:21 -04:00
martin frances
f6d856ee11
chore: cargo clippy --fix. ( #1136 )
2023-06-03 11:35:33 -04:00
Greg Johnston
4e41fad107
fix: wait for blocking fragments to resolve before pulling metadata ( closes #1118 ) ( #1137 )
2023-06-02 17:32:32 -04:00
Greg Johnston
5d70275c3a
fix: dispose of runtime when stream is actually finished ( closes #1097 ) ( #1110 )
2023-05-28 13:44:31 -04:00
Greg Johnston
4d3dd7a6e6
feat: add Axum extract()
function ( #1093 )
2023-05-25 11:16:58 -04:00
yuuma03
cc68d20758
fix: duplicate headers (like Set-Cookie) on the actix integration ( #1086 )
2023-05-25 11:16:29 -04:00
Ben Wishovich
06d28f7d67
feat: use Axum SubStates to enable .with_state
in Axum router ( #1085 )
2023-05-24 08:34:17 -04:00
yuuma03
b2faa6b86c
feat: allow multipart forms on server fns (Actix) ( #1048 )
2023-05-17 19:53:55 -04:00