Commit Graph

116 Commits

Author SHA1 Message Date
Greg Johnston 90ba3529e9 working on Axum version 2024-01-19 14:16:58 -05:00
Greg Johnston 1ad7ee8a03 generalize error redirect behavior across integrations 2024-01-19 14:16:58 -05:00
Greg Johnston 88fee243a8 support setting server URL on either platform 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 def4be80b2 docs 2024-01-19 14:16:58 -05:00
Greg Johnston 15b04a8a85 more docs 2024-01-19 14:16:58 -05:00
Greg Johnston 0a9cdba22e getting started on docs 2024-01-19 14:16:58 -05:00
Greg Johnston 6c8e704fb3 smh 2024-01-19 14:16:58 -05:00
Greg Johnston 81fb5160e5 missing makefiles 2024-01-19 14:16:58 -05:00
Greg Johnston f5c007df7b use server fns directly in ActionForm and MultiActionForm 2024-01-19 14:16:18 -05:00
Rakshith Ravi a1bd84f3dc feat: add `serde-lite` codec for server functions (#2168) 2024-01-19 14:16:18 -05:00
Rakshith Ravi f6ce82c9d1 Fixed tests for `server_fn` (#2167)
* Fixed server_fn tests

* Changed type_name to TypeId

* Fixed handling of leading slashes for server_fn endpoint
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 566df034ff actually use server functions in `ActionForm` 2024-01-19 14:16:17 -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 db4158f5c3 clear up warnings 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
Greg Johnston 2dbc5899f3 cargo fmt 2024-01-19 14:16:03 -05:00
Greg Johnston dd368a845c @ealmloff changes to reexport actix/axum 2024-01-19 14:16:03 -05:00
Greg Johnston 9c258219dd fix Actix implementation with middleware 2024-01-19 14:16:03 -05:00
Greg Johnston 6a1685936b fix rkyv 2024-01-19 14:16:03 -05:00
Greg Johnston 7d45e6bb13 clean up my mistake 2024-01-19 14:16:03 -05:00
Greg Johnston 8fae76828e `FromStr`-based lightweight `ServerFnError` deserialization 2024-01-19 14:16:03 -05:00
Greg Johnston d5b9e84f36 properly gate `inventory` 2024-01-19 14:16:03 -05:00
benwis 197edebd51 Made some progress, started work on pavex integration as well 2024-01-19 14:16:03 -05:00
benwis c9627bfeb4 Setup folder structure as before. Got a cyclical dependency though 2024-01-19 14:16:03 -05:00
benwis c7422cd96e First commit, checkpoint for cyclical dependency error 2024-01-19 14:15:51 -05:00
Greg Johnston 33590d487b
chore: clean up warnings causing CI issues (#2119) 2023-12-18 08:15:46 -05:00
martin frances 362e3bc603
chore: stop using std::fmt, instead used core::fmt. (#2033) 2023-11-17 15:36:13 -05:00
Fangdun Tsai 2374439cd8
chore(server_fn): improve docs in `server_fn` (#1734) 2023-09-19 21:16:30 -04:00
Greg Johnston 689022661d
change: move logging macros into a `logging` module to avoid name conflicts with `log` and `tracing` (#1658) 2023-09-08 07:42:58 -04:00
Daniel Oliveira 4d7e1f4d26
feat: improve server function client side error handling (#1597)
Handle all error codes 401-499 in addition to the
400 and 500-599 that were already handled.

In addition, handle them all in the same way
and improve the error message.
2023-08-29 20:40:03 -04:00
Greg Johnston dbc707adcd
feat/change: adopt reactive ownership model and drop `cx`/`Scope` (#918) 2023-08-21 19:31:37 -04:00
Danik Vitek 248beb4a55
docs: typo in docs for `ServerFnErrorErr` (#1477) 2023-08-01 14:27:39 -04:00
martin frances c9f608d030
docs: fix doclink to `Error` (#1469) 2023-08-01 13:24:13 -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 3eed86fbf3
docs/warnings: improve `ServerFnError` when a server function is not found (#1350) 2023-07-14 12:43:08 -04:00
Greg Johnston 3ea3a40395
fix: `server_fn` `rustls` feature shouldn't pull in `default-tls` (#1343) 2023-07-13 19:41:55 -04:00
Joseph Cruz 3481a6ee53
build: run tasks from workpace or member directory (#1339) 2023-07-13 16:46:51 -04:00
Michael Zimmermann 8fb4e88439
feat: implement PartialEq on ServerFnError (#1260)
This allows returning it in a memo.
2023-07-02 17:22:06 -04:00
Greg Johnston 8cb95b4646
docs: update server fn docs (#1252) 2023-06-30 10:40:06 -04:00
Greg Johnston ee7dbafc85
change: migrate to `nightly` and `csr` features rather than `stable` and `default-features = false` (#1227) 2023-06-26 21:12:14 -04:00
Greg Johnston 966100c2d6
feat: add an `anyhow`-like `Result` type for easier error handling (#1228) 2023-06-25 15:18:00 -04:00
martin frances 10c0a2de65
chore: cleared clippy warnings (#1190)
The change in indentation makes the PR hard to review

so I will discuss the change in conversational language

Two "if"'s checks were merged into one "if"

this

-        if let Some(expr) = node.value() {
-            if let syn::Expr::Tuple(tuple) = expr {

becomes

+        if let Some(Tuple(tuple)) = node.value() {
2023-06-15 20:11:50 -04:00
hchockarprasad 601db7aa86
fix: handle nested data in serde_qs deserialization correctly (#1183) 2023-06-15 10:15:10 -04:00
Greg Johnston bb10b32200
feat: register server functions automatically (#1154) 2023-06-11 09:09:21 -04:00
Vladimir Motylenko 5a71ca797a
feat: RSX parser with recovery after errors, and unquoted text (#1054)
* Feat: Upgrade to new local version of syn-rsx

* chore: Make macro more IDE friendly

1. Add quotation to RawText node.
2. Replace vec! macro with [].to_vec().
Cons:
1. Temporary remove allow(unused_braces) from expressions, to allow completion after dot in rust-analyzer.

* chore: Change dependency from syn-rsx to rstml

* chore: Fix value_to_string usage, pr comments, and fmt.
2023-05-21 06:45:53 -04:00
Greg Johnston d8e03773f0
feat: allow structs in server function arguments (#987) 2023-05-03 15:26:48 -04:00
Matt Crane ddf9df2b5e
change: replace `serde_urlencoded` with `serde_html_form` to support `Vec<_>` in server fn args (#973) 2023-05-01 17:17:45 -04:00
Jonas Matser a08d6bae10
fix: `ServerFnError::Serialization` error string (#939) 2023-04-23 16:17:20 -04:00
Daniel Santana 39261a276c
docs: add the GetCbor and GetJson to server macro documentation. (#938) 2023-04-23 15:42:05 -04:00
Greg Johnston 2c7ee0d415
feat: `rustls` feature for `reqwest` and any other relevant dependencies (#842) 2023-04-10 13:15:00 -04:00
Greg Johnston ff5ceddbe2
fix: correctly pass server fn errors to client (#822) 2023-04-07 08:12:10 -04:00
Ben Wishovich 8b57ba7aa8
feat: add the ability for server fns to be submitted via GET requests (#789) 2023-04-05 06:47:17 -04:00
ealmloff 6917027204
fix server functions default macro on stable (#784) 2023-04-01 17:31:56 -04:00
Greg Johnston 1e037ecb60
chore: clippy and docs warnings (#779) 2023-03-31 17:12:42 -04:00
István Donkó 8ab9c08448
docs: fix typo in server_fn docs (#740) 2023-03-24 21:42:27 -04:00
Greg Johnston 38daaf3b72
chore: apply `cargo machete` systematically (#671) 2023-03-13 10:16:20 -04:00
Greg Johnston b55e9a9e64
`v0.2.3`: fix broken stable support (#670) 2023-03-13 07:25:08 -04:00
ealmloff 29fb1842a5
feat: make server functions work outside of WASM (#643) 2023-03-09 18:03:57 -05:00
Greg Johnston bb5ad101a2
publish framework-independent `server_fn` crate (#605) 2023-03-02 07:22:36 -05:00
ealmloff 0c261c0fb0
feat: make server functions framework agnostic (#596) 2023-03-01 20:56:30 -05:00