Skip to content

Commit

Permalink
fix failing ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Milo123459 committed Nov 4, 2024
1 parent bed2135 commit a86c102
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 26 deletions.
9 changes: 1 addition & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,5 @@
"@napi-rs/triples": "^1.1.0",
"node-fetch": "^3.1.0",
"tar": "^6.1.11"
},
"module": "index.ts",
"devDependencies": {
"@types/bun": "latest"
},
"peerDependencies": {
"typescript": "^5.0.0"
}
}
}
2 changes: 0 additions & 2 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ pub async fn post_graphql<Q: GraphQLQuery, U: reqwest::IntoUrl>(
variables: Q::Variables,
) -> Result<Q::ResponseData, RailwayError> {
let body = Q::build_query(variables);
let b = &body;
dbg!(serde_json::to_string(&b).unwrap());
let res: GraphQLResponse<Q::ResponseData> =
client.post(url).json(&body).send().await?.json().await?;

Expand Down
14 changes: 7 additions & 7 deletions src/commands/add.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ pub async fn command(args: Args, _json: bool) -> Result<()> {
let type_of_create = if !args.database.is_empty() {
fake_select("What do you need?", "Database");
CreateKind::Database(args.database)
} else if args.service.is_some() {
fake_select("What do you need?", "Empty Service");
CreateKind::EmptyService {
name: prompt_name(args.service)?,
variables: prompt_variables(args.variables)?,
}
} else if args.repo.is_some() {
fake_select("What do you need?", "GitHub Repo");
CreateKind::GithubRepo {
Expand All @@ -69,6 +63,12 @@ pub async fn command(args: Args, _json: bool) -> Result<()> {
variables: prompt_variables(args.variables)?,
name: prompt_name(args.service)?,
}
} else if args.service.is_some() {
fake_select("What do you need?", "Empty Service");
CreateKind::EmptyService {
name: prompt_name(args.service)?,
variables: prompt_variables(args.variables)?,
}
} else {
let need = prompt_options("What do you need?", CreateKind::iter().collect())?;
match need {
Expand Down Expand Up @@ -171,7 +171,7 @@ fn prompt_repo(repo: Option<String>) -> Result<String> {
fake_select("Enter a repo", &repo);
return Ok(repo);
}

prompt_text_with_placeholder_disappear("Enter a repo", "<user/org>/<repo name>")
}

Expand Down
2 changes: 1 addition & 1 deletion src/gql/queries/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ pub struct TemplateDetail;
#[derive(GraphQLQuery)]
#[graphql(
schema_path = "src/gql/schema.json",
query_path = "src/gql/queries/strings/GithubRepos.graphql",
query_path = "src/gql/queries/strings/GitHubRepos.graphql",
response_derives = "Debug, Serialize, Clone"
)]
pub struct GitHubRepos;
2 changes: 1 addition & 1 deletion src/gql/queries/strings/GitHubRepos.graphql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
query GitHubRepos {
githubRepos {
fullName,
fullName
defaultBranch
}
}
31 changes: 24 additions & 7 deletions src/gql/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,6 @@
{
"description": null,
"enumValues": [
{
"deprecationReason": null,
"description": null,
"isDeprecated": false,
"name": "BACKUPS"
},
{
"deprecationReason": null,
"description": null,
Expand Down Expand Up @@ -22590,7 +22584,18 @@
}
},
{
"args": [],
"args": [
{
"defaultValue": null,
"description": null,
"name": "projectId",
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
}
],
"deprecationReason": null,
"description": "List available regions",
"isDeprecated": false,
Expand Down Expand Up @@ -26252,6 +26257,18 @@
"name": "String",
"ofType": null
}
},
{
"args": [],
"deprecationReason": null,
"description": null,
"isDeprecated": false,
"name": "teamId",
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
}
],
"inputFields": null,
Expand Down

0 comments on commit a86c102

Please sign in to comment.