Compare commits
2 commits
e19459cd3d
...
a8864786aa
Author | SHA1 | Date | |
---|---|---|---|
a8864786aa | |||
e6316bef59 |
4 changed files with 18 additions and 4 deletions
15
CHANGELOG.md
Normal file
15
CHANGELOG.md
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# 0.2.3
|
||||||
|
- Refactored the detection of which methods exist,
|
||||||
|
we actually parse the file now instead of just checking that it contains `pub async #method_name`
|
||||||
|
|
||||||
|
# 0.2.2
|
||||||
|
- Re-licensed to MIT
|
||||||
|
|
||||||
|
# 0.2.1
|
||||||
|
- Documentation & test improvements
|
||||||
|
|
||||||
|
# 0.2.0
|
||||||
|
- Generate module imports instead of `include!`ing, so rust-analyzer works.
|
||||||
|
|
||||||
|
# 0.1.0
|
||||||
|
- MVP adapted from https://github.com/richardanaya/axum-folder-router-htmx
|
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -85,7 +85,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "axum-folder-router"
|
name = "axum-folder-router"
|
||||||
version = "0.2.2"
|
version = "0.2.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"axum",
|
"axum",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "axum-folder-router"
|
name = "axum-folder-router"
|
||||||
version = "0.2.2"
|
version = "0.2.3"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
readme = "./README.md"
|
readme = "./README.md"
|
||||||
authors = ["Tristan Druyen <ek36g2vcc@mozmail.com>"]
|
authors = ["Tristan Druyen <ek36g2vcc@mozmail.com>"]
|
||||||
|
@ -16,7 +16,7 @@ path = "./src/lib.rs"
|
||||||
proc-macro = true
|
proc-macro = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
syn = "2.0"
|
syn = { version = "2.0", features = ["full"] }
|
||||||
quote = "1.0"
|
quote = "1.0"
|
||||||
proc-macro2 = "1.0"
|
proc-macro2 = "1.0"
|
||||||
glob = "0.3"
|
glob = "0.3"
|
||||||
|
|
|
@ -296,7 +296,6 @@ pub fn folder_router(input: TokenStream) -> TokenStream {
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// it returns: `vec!["get"]`
|
/// it returns: `vec!["get"]`
|
||||||
///
|
|
||||||
fn methods_for_route(route_path: &PathBuf) -> Vec<&'static str> {
|
fn methods_for_route(route_path: &PathBuf) -> Vec<&'static str> {
|
||||||
// Read the file content
|
// Read the file content
|
||||||
let file_content = match fs::read_to_string(route_path) {
|
let file_content = match fs::read_to_string(route_path) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue