Compare commits

..

4 Commits

11 changed files with 109 additions and 120 deletions

52
Cargo.lock generated
View File

@@ -114,7 +114,7 @@ version = "0.1.0"
dependencies = [ dependencies = [
"clap", "clap",
"color-eyre", "color-eyre",
"dagger-sdk 0.2.11", "dagger-sdk",
"eyre", "eyre",
"tokio", "tokio",
] ]
@@ -249,7 +249,7 @@ name = "dagger-codegen"
version = "0.2.7" version = "0.2.7"
dependencies = [ dependencies = [
"convert_case", "convert_case",
"dagger-core 0.2.5", "dagger-core",
"eyre", "eyre",
"genco", "genco",
"itertools", "itertools",
@@ -260,32 +260,7 @@ dependencies = [
[[package]] [[package]]
name = "dagger-core" name = "dagger-core"
version = "0.2.4" version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71f74120a67a030e76c6039457909ba31e53fb022b0b633f5836f008eb4e1766"
dependencies = [
"clap",
"dirs",
"eyre",
"flate2",
"genco",
"graphql-introspection-query",
"graphql_client",
"hex",
"hex-literal",
"platform-info",
"reqwest",
"serde",
"serde_json",
"sha2",
"tar",
"tempfile",
"tokio",
]
[[package]]
name = "dagger-core"
version = "0.2.5"
dependencies = [ dependencies = [
"clap", "clap",
"dirs", "dirs",
@@ -313,7 +288,7 @@ dependencies = [
"clap", "clap",
"color-eyre", "color-eyre",
"dagger-codegen", "dagger-codegen",
"dagger-core 0.2.5", "dagger-core",
"dirs", "dirs",
"eyre", "eyre",
"flate2", "flate2",
@@ -332,29 +307,12 @@ dependencies = [
"tokio", "tokio",
] ]
[[package]]
name = "dagger-sdk"
version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d86c5bf1ad09a730d6fc5c73c39664eb38b9843fc21dedfee4629976ae04cba4"
dependencies = [
"base64",
"dagger-core 0.2.4",
"derive_builder",
"eyre",
"futures",
"gql_client",
"serde",
"serde_json",
"tokio",
]
[[package]] [[package]]
name = "dagger-sdk" name = "dagger-sdk"
version = "0.2.12" version = "0.2.12"
dependencies = [ dependencies = [
"base64", "base64",
"dagger-core 0.2.5", "dagger-core",
"derive_builder", "derive_builder",
"eyre", "eyre",
"futures", "futures",

View File

@@ -8,6 +8,6 @@ edition = "2021"
[dependencies] [dependencies]
clap = "4.1.6" clap = "4.1.6"
color-eyre = "0.6.2" color-eyre = "0.6.2"
dagger-sdk = "0.2.11" dagger-sdk = { path = "../crates/dagger-sdk/", version = "^0.2.12" }
eyre = "0.6.8" eyre = "0.6.8"
tokio = { version = "1.25.0", features = ["full"] } tokio = { version = "1.25.0", features = ["full"] }

View File

@@ -15,7 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
<csr-read-only-do-not-edit/> <csr-read-only-do-not-edit/>
- 1 commit contributed to the release. - 2 commits contributed to the release.
- 1 commit was understood as [conventional](https://www.conventionalcommits.org). - 1 commit was understood as [conventional](https://www.conventionalcommits.org).
- 0 issues like '(#ID)' were seen in commit messages - 0 issues like '(#ID)' were seen in commit messages
@@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
<details><summary>view details</summary> <details><summary>view details</summary>
* **Uncategorized** * **Uncategorized**
- Release dagger-core v0.2.5, dagger-sdk v0.2.12, dagger-codegen v0.2.7 ([`1725c51`](https://github.com/kjuulh/dagger-rs/commit/1725c5188e8a81069ec4a4de569484c921a94927))
- race condition in process ([`a13a2a9`](https://github.com/kjuulh/dagger-rs/commit/a13a2a9ecbfdfac80ed8eb0cbb9e9db317da65de)) - race condition in process ([`a13a2a9`](https://github.com/kjuulh/dagger-rs/commit/a13a2a9ecbfdfac80ed8eb0cbb9e9db317da65de))
</details> </details>

View File

@@ -11,7 +11,7 @@ publish = true
[dependencies] [dependencies]
convert_case = "0.6.0" convert_case = "0.6.0"
dagger-core = { path = "../dagger-core", version = "^0.2.5" } dagger-core = { path = "../dagger-core", version = "^0.2.6" }
eyre = "0.6.8" eyre = "0.6.8"
genco = "0.17.3" genco = "0.17.3"

View File

@@ -5,6 +5,35 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## v0.2.6 (2023-02-20)
### Chore
- <csr-id-1f77d90c0f0ac832a181b2322350ea395612986c/> ran clippy
### Bug Fixes
- <csr-id-8dfecf976c5537cc2c03881de2b2fd2b2508683a/> cli session keep session alive
### Commit Statistics
<csr-read-only-do-not-edit/>
- 2 commits contributed to the release.
- 2 commits were understood as [conventional](https://www.conventionalcommits.org).
- 0 issues like '(#ID)' were seen in commit messages
### Commit Details
<csr-read-only-do-not-edit/>
<details><summary>view details</summary>
* **Uncategorized**
- ran clippy ([`1f77d90`](https://github.com/kjuulh/dagger-rs/commit/1f77d90c0f0ac832a181b2322350ea395612986c))
- cli session keep session alive ([`8dfecf9`](https://github.com/kjuulh/dagger-rs/commit/8dfecf976c5537cc2c03881de2b2fd2b2508683a))
</details>
## v0.2.5 (2023-02-20) ## v0.2.5 (2023-02-20)
### Bug Fixes ### Bug Fixes
@@ -15,7 +44,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
<csr-read-only-do-not-edit/> <csr-read-only-do-not-edit/>
- 1 commit contributed to the release. - 2 commits contributed to the release.
- 1 commit was understood as [conventional](https://www.conventionalcommits.org). - 1 commit was understood as [conventional](https://www.conventionalcommits.org).
- 0 issues like '(#ID)' were seen in commit messages - 0 issues like '(#ID)' were seen in commit messages
@@ -26,6 +55,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
<details><summary>view details</summary> <details><summary>view details</summary>
* **Uncategorized** * **Uncategorized**
- Release dagger-core v0.2.5, dagger-sdk v0.2.12, dagger-codegen v0.2.7 ([`1725c51`](https://github.com/kjuulh/dagger-rs/commit/1725c5188e8a81069ec4a4de569484c921a94927))
- race condition in process ([`a13a2a9`](https://github.com/kjuulh/dagger-rs/commit/a13a2a9ecbfdfac80ed8eb0cbb9e9db317da65de)) - race condition in process ([`a13a2a9`](https://github.com/kjuulh/dagger-rs/commit/a13a2a9ecbfdfac80ed8eb0cbb9e9db317da65de))
</details> </details>

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "dagger-core" name = "dagger-core"
version = "0.2.5" version = "0.2.6"
edition = "2021" edition = "2021"
readme = "README.md" readme = "README.md"
license-file = "LICENSE.MIT" license-file = "LICENSE.MIT"

View File

@@ -1,8 +1,7 @@
use std::{ use std::{
fs::canonicalize, fs::canonicalize,
io::{BufRead, BufReader},
path::PathBuf, path::PathBuf,
process::{Child, Stdio}, process::Stdio,
sync::Arc, sync::Arc,
}; };
@@ -89,26 +88,21 @@ impl InnerCliSession {
let (sender, mut receiver) = tokio::sync::mpsc::channel(1); let (sender, mut receiver) = tokio::sync::mpsc::channel(1);
tokio::spawn(async move { tokio::spawn(async move {
let stdout_bufr = tokio::io::BufReader::new(stdout); let mut stdout_bufr = tokio::io::BufReader::new(stdout).lines();
for line in stdout_bufr.lines().next_line().await { while let Ok(Some(line)) = stdout_bufr.next_line().await {
let out = line.as_ref().unwrap(); if let Ok(conn) = serde_json::from_str::<ConnectParams>(&line) {
if let Ok(conn) = serde_json::from_str::<ConnectParams>(&out) {
sender.send(conn).await.unwrap(); sender.send(conn).await.unwrap();
} }
if let Some(line) = line {
println!("dagger: {}", line); println!("dagger: {}", line);
} }
}
}); });
tokio::spawn(async move { tokio::spawn(async move {
let stdout_bufr = tokio::io::BufReader::new(stderr); let mut stdout_bufr = tokio::io::BufReader::new(stderr).lines();
for line in stdout_bufr.lines().next_line().await { while let Ok(Some(line)) = stdout_bufr.next_line().await {
if let Some(line) = line {
println!("dagger: {}", line); println!("dagger: {}", line);
} }
//panic!("could not start dagger session: {}", out)
}
}); });
let conn = receiver.recv().await.ok_or(eyre::anyhow!("could not receive ok signal from dagger-engine"))?; let conn = receiver.recv().await.ok_or(eyre::anyhow!("could not receive ok signal from dagger-engine"))?;

View File

@@ -1,4 +1,4 @@
use std::process::Child;
use crate::{ use crate::{
cli_session::CliSession, config::Config, connect_params::ConnectParams, downloader::Downloader, cli_session::CliSession, config::Config, connect_params::ConnectParams, downloader::Downloader,

View File

@@ -8,6 +8,10 @@ and this project adheres to
## v0.2.12 (2023-02-20) ## v0.2.12 (2023-02-20)
### Chore
- <csr-id-1f77d90c0f0ac832a181b2322350ea395612986c/> ran clippy
### Bug Fixes ### Bug Fixes
- <csr-id-a13a2a9ecbfdfac80ed8eb0cbb9e9db317da65de/> race condition in process - <csr-id-a13a2a9ecbfdfac80ed8eb0cbb9e9db317da65de/> race condition in process
@@ -16,8 +20,8 @@ and this project adheres to
<csr-read-only-do-not-edit/> <csr-read-only-do-not-edit/>
- 1 commit contributed to the release. - 3 commits contributed to the release.
- 1 commit was understood as [conventional](https://www.conventionalcommits.org). - 2 commits were understood as [conventional](https://www.conventionalcommits.org).
- 0 issues like '(#ID)' were seen in commit messages - 0 issues like '(#ID)' were seen in commit messages
### Commit Details ### Commit Details
@@ -27,6 +31,8 @@ and this project adheres to
<details><summary>view details</summary> <details><summary>view details</summary>
* **Uncategorized** * **Uncategorized**
- ran clippy ([`1f77d90`](https://github.com/kjuulh/dagger-rs/commit/1f77d90c0f0ac832a181b2322350ea395612986c))
- Release dagger-core v0.2.5, dagger-sdk v0.2.12, dagger-codegen v0.2.7 ([`1725c51`](https://github.com/kjuulh/dagger-rs/commit/1725c5188e8a81069ec4a4de569484c921a94927))
- race condition in process ([`a13a2a9`](https://github.com/kjuulh/dagger-rs/commit/a13a2a9ecbfdfac80ed8eb0cbb9e9db317da65de)) - race condition in process ([`a13a2a9`](https://github.com/kjuulh/dagger-rs/commit/a13a2a9ecbfdfac80ed8eb0cbb9e9db317da65de))
</details> </details>

View File

@@ -11,7 +11,7 @@ publish = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
dagger-core = { path = "../dagger-core", version = "^0.2.5" } dagger-core = { path = "../dagger-core", version = "^0.2.6" }
base64 = "0.21.0" base64 = "0.21.0"
eyre = "0.6.8" eyre = "0.6.8"

View File

@@ -35,7 +35,7 @@ impl CacheVolume {
pub async fn id( pub async fn id(
&self, &self,
) -> eyre::Result<CacheId> { ) -> eyre::Result<CacheId> {
let mut query = self.selection.select("id"); let query = self.selection.select("id");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }
@@ -216,7 +216,7 @@ impl Container {
pub async fn default_args( pub async fn default_args(
&self, &self,
) -> eyre::Result<Vec<String>> { ) -> eyre::Result<Vec<String>> {
let mut query = self.selection.select("defaultArgs"); let query = self.selection.select("defaultArgs");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }
@@ -239,7 +239,7 @@ impl Container {
pub async fn entrypoint( pub async fn entrypoint(
&self, &self,
) -> eyre::Result<Vec<String>> { ) -> eyre::Result<Vec<String>> {
let mut query = self.selection.select("entrypoint"); let query = self.selection.select("entrypoint");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }
@@ -258,7 +258,7 @@ impl Container {
pub fn env_variables( pub fn env_variables(
&self, &self,
) -> Vec<EnvVariable> { ) -> Vec<EnvVariable> {
let mut query = self.selection.select("envVariables"); let query = self.selection.select("envVariables");
return vec![EnvVariable { return vec![EnvVariable {
proc: self.proc.clone(), proc: self.proc.clone(),
@@ -274,7 +274,7 @@ impl Container {
pub fn exec( pub fn exec(
&self, &self,
) -> Container { ) -> Container {
let mut query = self.selection.select("exec"); let query = self.selection.select("exec");
return Container { return Container {
proc: self.proc.clone(), proc: self.proc.clone(),
@@ -321,7 +321,7 @@ impl Container {
pub async fn exit_code( pub async fn exit_code(
&self, &self,
) -> eyre::Result<isize> { ) -> eyre::Result<isize> {
let mut query = self.selection.select("exitCode"); let query = self.selection.select("exitCode");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }
@@ -405,7 +405,7 @@ impl Container {
pub fn fs( pub fn fs(
&self, &self,
) -> Directory { ) -> Directory {
let mut query = self.selection.select("fs"); let query = self.selection.select("fs");
return Directory { return Directory {
proc: self.proc.clone(), proc: self.proc.clone(),
@@ -417,7 +417,7 @@ impl Container {
pub async fn id( pub async fn id(
&self, &self,
) -> eyre::Result<ContainerId> { ) -> eyre::Result<ContainerId> {
let mut query = self.selection.select("id"); let query = self.selection.select("id");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }
@@ -436,7 +436,7 @@ impl Container {
pub fn labels( pub fn labels(
&self, &self,
) -> Vec<Label> { ) -> Vec<Label> {
let mut query = self.selection.select("labels"); let query = self.selection.select("labels");
return vec![Label { return vec![Label {
proc: self.proc.clone(), proc: self.proc.clone(),
@@ -448,7 +448,7 @@ impl Container {
pub async fn mounts( pub async fn mounts(
&self, &self,
) -> eyre::Result<Vec<String>> { ) -> eyre::Result<Vec<String>> {
let mut query = self.selection.select("mounts"); let query = self.selection.select("mounts");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }
@@ -499,7 +499,7 @@ impl Container {
pub async fn platform( pub async fn platform(
&self, &self,
) -> eyre::Result<Platform> { ) -> eyre::Result<Platform> {
let mut query = self.selection.select("platform"); let query = self.selection.select("platform");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }
@@ -546,7 +546,7 @@ impl Container {
pub fn rootfs( pub fn rootfs(
&self, &self,
) -> Directory { ) -> Directory {
let mut query = self.selection.select("rootfs"); let query = self.selection.select("rootfs");
return Directory { return Directory {
proc: self.proc.clone(), proc: self.proc.clone(),
@@ -559,7 +559,7 @@ impl Container {
pub async fn stderr( pub async fn stderr(
&self, &self,
) -> eyre::Result<String> { ) -> eyre::Result<String> {
let mut query = self.selection.select("stderr"); let query = self.selection.select("stderr");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }
@@ -568,7 +568,7 @@ impl Container {
pub async fn stdout( pub async fn stdout(
&self, &self,
) -> eyre::Result<String> { ) -> eyre::Result<String> {
let mut query = self.selection.select("stdout"); let query = self.selection.select("stdout");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }
@@ -576,7 +576,7 @@ impl Container {
pub async fn user( pub async fn user(
&self, &self,
) -> eyre::Result<String> { ) -> eyre::Result<String> {
let mut query = self.selection.select("user"); let query = self.selection.select("user");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }
@@ -588,7 +588,7 @@ impl Container {
pub fn with_default_args( pub fn with_default_args(
&self, &self,
) -> Container { ) -> Container {
let mut query = self.selection.select("withDefaultArgs"); let query = self.selection.select("withDefaultArgs");
return Container { return Container {
proc: self.proc.clone(), proc: self.proc.clone(),
@@ -1188,7 +1188,7 @@ impl Container {
pub async fn workdir( pub async fn workdir(
&self, &self,
) -> eyre::Result<String> { ) -> eyre::Result<String> {
let mut query = self.selection.select("workdir"); let query = self.selection.select("workdir");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }
@@ -1298,7 +1298,7 @@ impl Directory {
pub fn docker_build( pub fn docker_build(
&self, &self,
) -> Container { ) -> Container {
let mut query = self.selection.select("dockerBuild"); let query = self.selection.select("dockerBuild");
return Container { return Container {
proc: self.proc.clone(), proc: self.proc.clone(),
@@ -1345,7 +1345,7 @@ impl Directory {
pub async fn entries( pub async fn entries(
&self, &self,
) -> eyre::Result<Vec<String>> { ) -> eyre::Result<Vec<String>> {
let mut query = self.selection.select("entries"); let query = self.selection.select("entries");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }
@@ -1397,7 +1397,7 @@ impl Directory {
pub async fn id( pub async fn id(
&self, &self,
) -> eyre::Result<DirectoryId> { ) -> eyre::Result<DirectoryId> {
let mut query = self.selection.select("id"); let query = self.selection.select("id");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }
@@ -1703,7 +1703,7 @@ impl EnvVariable {
pub async fn name( pub async fn name(
&self, &self,
) -> eyre::Result<String> { ) -> eyre::Result<String> {
let mut query = self.selection.select("name"); let query = self.selection.select("name");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }
@@ -1711,7 +1711,7 @@ impl EnvVariable {
pub async fn value( pub async fn value(
&self, &self,
) -> eyre::Result<String> { ) -> eyre::Result<String> {
let mut query = self.selection.select("value"); let query = self.selection.select("value");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }
@@ -1727,7 +1727,7 @@ impl File {
pub async fn contents( pub async fn contents(
&self, &self,
) -> eyre::Result<String> { ) -> eyre::Result<String> {
let mut query = self.selection.select("contents"); let query = self.selection.select("contents");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }
@@ -1746,7 +1746,7 @@ impl File {
pub async fn id( pub async fn id(
&self, &self,
) -> eyre::Result<FileId> { ) -> eyre::Result<FileId> {
let mut query = self.selection.select("id"); let query = self.selection.select("id");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }
@@ -1754,7 +1754,7 @@ impl File {
pub fn secret( pub fn secret(
&self, &self,
) -> Secret { ) -> Secret {
let mut query = self.selection.select("secret"); let query = self.selection.select("secret");
return Secret { return Secret {
proc: self.proc.clone(), proc: self.proc.clone(),
@@ -1766,7 +1766,7 @@ impl File {
pub async fn size( pub async fn size(
&self, &self,
) -> eyre::Result<isize> { ) -> eyre::Result<isize> {
let mut query = self.selection.select("size"); let query = self.selection.select("size");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }
@@ -1806,7 +1806,7 @@ impl GitRef {
pub async fn digest( pub async fn digest(
&self, &self,
) -> eyre::Result<String> { ) -> eyre::Result<String> {
let mut query = self.selection.select("digest"); let query = self.selection.select("digest");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }
@@ -1818,7 +1818,7 @@ impl GitRef {
pub fn tree( pub fn tree(
&self, &self,
) -> Directory { ) -> Directory {
let mut query = self.selection.select("tree"); let query = self.selection.select("tree");
return Directory { return Directory {
proc: self.proc.clone(), proc: self.proc.clone(),
@@ -1878,7 +1878,7 @@ impl GitRepository {
pub async fn branches( pub async fn branches(
&self, &self,
) -> eyre::Result<Vec<String>> { ) -> eyre::Result<Vec<String>> {
let mut query = self.selection.select("branches"); let query = self.selection.select("branches");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }
@@ -1916,7 +1916,7 @@ impl GitRepository {
pub async fn tags( pub async fn tags(
&self, &self,
) -> eyre::Result<Vec<String>> { ) -> eyre::Result<Vec<String>> {
let mut query = self.selection.select("tags"); let query = self.selection.select("tags");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }
@@ -2029,7 +2029,7 @@ impl Host {
pub fn workdir( pub fn workdir(
&self, &self,
) -> Directory { ) -> Directory {
let mut query = self.selection.select("workdir"); let query = self.selection.select("workdir");
return Directory { return Directory {
proc: self.proc.clone(), proc: self.proc.clone(),
@@ -2074,7 +2074,7 @@ impl HostVariable {
pub fn secret( pub fn secret(
&self, &self,
) -> Secret { ) -> Secret {
let mut query = self.selection.select("secret"); let query = self.selection.select("secret");
return Secret { return Secret {
proc: self.proc.clone(), proc: self.proc.clone(),
@@ -2086,7 +2086,7 @@ impl HostVariable {
pub async fn value( pub async fn value(
&self, &self,
) -> eyre::Result<String> { ) -> eyre::Result<String> {
let mut query = self.selection.select("value"); let query = self.selection.select("value");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }
@@ -2102,7 +2102,7 @@ impl Label {
pub async fn name( pub async fn name(
&self, &self,
) -> eyre::Result<String> { ) -> eyre::Result<String> {
let mut query = self.selection.select("name"); let query = self.selection.select("name");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }
@@ -2110,7 +2110,7 @@ impl Label {
pub async fn value( pub async fn value(
&self, &self,
) -> eyre::Result<String> { ) -> eyre::Result<String> {
let mut query = self.selection.select("value"); let query = self.selection.select("value");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }
@@ -2126,7 +2126,7 @@ impl Project {
pub fn extensions( pub fn extensions(
&self, &self,
) -> Vec<Project> { ) -> Vec<Project> {
let mut query = self.selection.select("extensions"); let query = self.selection.select("extensions");
return vec![Project { return vec![Project {
proc: self.proc.clone(), proc: self.proc.clone(),
@@ -2138,7 +2138,7 @@ impl Project {
pub fn generated_code( pub fn generated_code(
&self, &self,
) -> Directory { ) -> Directory {
let mut query = self.selection.select("generatedCode"); let query = self.selection.select("generatedCode");
return Directory { return Directory {
proc: self.proc.clone(), proc: self.proc.clone(),
@@ -2150,7 +2150,7 @@ impl Project {
pub async fn install( pub async fn install(
&self, &self,
) -> eyre::Result<bool> { ) -> eyre::Result<bool> {
let mut query = self.selection.select("install"); let query = self.selection.select("install");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }
@@ -2158,7 +2158,7 @@ impl Project {
pub async fn name( pub async fn name(
&self, &self,
) -> eyre::Result<String> { ) -> eyre::Result<String> {
let mut query = self.selection.select("name"); let query = self.selection.select("name");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }
@@ -2166,7 +2166,7 @@ impl Project {
pub async fn schema( pub async fn schema(
&self, &self,
) -> eyre::Result<String> { ) -> eyre::Result<String> {
let mut query = self.selection.select("schema"); let query = self.selection.select("schema");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }
@@ -2174,7 +2174,7 @@ impl Project {
pub async fn sdk( pub async fn sdk(
&self, &self,
) -> eyre::Result<String> { ) -> eyre::Result<String> {
let mut query = self.selection.select("sdk"); let query = self.selection.select("sdk");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }
@@ -2248,7 +2248,7 @@ impl Query {
pub fn container( pub fn container(
&self, &self,
) -> Container { ) -> Container {
let mut query = self.selection.select("container"); let query = self.selection.select("container");
return Container { return Container {
proc: self.proc.clone(), proc: self.proc.clone(),
@@ -2287,7 +2287,7 @@ impl Query {
pub async fn default_platform( pub async fn default_platform(
&self, &self,
) -> eyre::Result<Platform> { ) -> eyre::Result<Platform> {
let mut query = self.selection.select("defaultPlatform"); let query = self.selection.select("defaultPlatform");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }
@@ -2299,7 +2299,7 @@ impl Query {
pub fn directory( pub fn directory(
&self, &self,
) -> Directory { ) -> Directory {
let mut query = self.selection.select("directory"); let query = self.selection.select("directory");
return Directory { return Directory {
proc: self.proc.clone(), proc: self.proc.clone(),
@@ -2391,7 +2391,7 @@ impl Query {
pub fn host( pub fn host(
&self, &self,
) -> Host { ) -> Host {
let mut query = self.selection.select("host"); let query = self.selection.select("host");
return Host { return Host {
proc: self.proc.clone(), proc: self.proc.clone(),
@@ -2495,7 +2495,7 @@ impl Query {
pub fn socket( pub fn socket(
&self, &self,
) -> Socket { ) -> Socket {
let mut query = self.selection.select("socket"); let query = self.selection.select("socket");
return Socket { return Socket {
proc: self.proc.clone(), proc: self.proc.clone(),
@@ -2537,7 +2537,7 @@ impl Secret {
pub async fn id( pub async fn id(
&self, &self,
) -> eyre::Result<SecretId> { ) -> eyre::Result<SecretId> {
let mut query = self.selection.select("id"); let query = self.selection.select("id");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }
@@ -2545,7 +2545,7 @@ impl Secret {
pub async fn plaintext( pub async fn plaintext(
&self, &self,
) -> eyre::Result<String> { ) -> eyre::Result<String> {
let mut query = self.selection.select("plaintext"); let query = self.selection.select("plaintext");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }
@@ -2561,7 +2561,7 @@ impl Socket {
pub async fn id( pub async fn id(
&self, &self,
) -> eyre::Result<SocketId> { ) -> eyre::Result<SocketId> {
let mut query = self.selection.select("id"); let query = self.selection.select("id");
query.execute(&graphql_client(&self.conn)).await query.execute(&graphql_client(&self.conn)).await
} }