Skip to content

Commit

Permalink
Router getting started WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
bryn committed May 20, 2022
1 parent 6a0b76c commit 21f601c
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 120 deletions.
4 changes: 3 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions apollo-router/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ uname = "0.1.1"
uname = "0.1.1"

[dev-dependencies]
#TODO Fix this once new scaffold is released
cargo-scaffold = {path = "../../cargo-scaffold"}
cargo-scaffold = "0.6.1"
insta = "1.12.0"
str_inflector = "0.12.0"
jsonpath_lib = "0.3.0"
Expand Down
1 change: 1 addition & 0 deletions apollo-router/tests/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ pub struct TracingTest {
test_config_location: PathBuf,
}

#[allow(dead_code)]
impl TracingTest {
pub fn new<P: TextMapPropagator + Send + Sync + 'static>(
tracer: Tracer,
Expand Down
1 change: 0 additions & 1 deletion apollo-router/tests/scaffold.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use cargo_scaffold::{Opts, ScaffoldDescription};
use inflector::Inflector;
use std::collections::BTreeMap;
use std::fs;
use std::process::Command;
use tower::BoxError;

Expand Down
1 change: 1 addition & 0 deletions docs/source/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"Customizations": {
"Overview": "/customizations/overview",
"Native Rust plugins": "/customizations/native",
"Native Rust plugins - Tutorial": "/customizations/native-tutorial",
"Rhai scripts (experimental)": "/customizations/rhai"
},
"Third-Party Support": {
Expand Down
115 changes: 0 additions & 115 deletions docs/source/customizations/getting-started.mdx

This file was deleted.

2 changes: 1 addition & 1 deletion scaffold/xtask/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ version = "0.1.0"
[dependencies]
clap = { version = "3.1.8", features = ["derive"] }
anyhow = "1.0.56"
cargo-scaffold = "0.6.0"
cargo-scaffold = "0.6.1"
regex = "1"
str_inflector = "0.12.0"
toml = "0.5.8"
4 changes: 4 additions & 0 deletions scaffold/xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ fn main() -> Result<()> {
Action::Plugin {
action: PluginAction::Create { name },
} => {
if Path::new(&format!("src/plugins/{}.rs", name.to_snake_case())).exists() {
return Err(anyhow::anyhow!("plugin '{}' already exists", name));
}

let opts = cargo_scaffold::Opts::builder()
.template_path("scaffold/plugin")
.target_dir(".")
Expand Down

0 comments on commit 21f601c

Please sign in to comment.