mirror of
https://github.com/kjuulh/dagger-rs.git
synced 2025-08-17 20:53:29 +02:00
Compare commits
1 Commits
dagger-cor
...
feat/loggi
Author | SHA1 | Date | |
---|---|---|---|
01c1232b50
|
150
.github/workflows/ci-multiplatform.yml
vendored
150
.github/workflows/ci-multiplatform.yml
vendored
@@ -1,150 +0,0 @@
|
||||
name: ci-multi-platform
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
schedule:
|
||||
- cron: '00 01 * * *'
|
||||
jobs:
|
||||
test:
|
||||
name: test
|
||||
env:
|
||||
# For some builds, we use cross to test on 32-bit and big-endian
|
||||
# systems.
|
||||
CARGO: cargo
|
||||
# When CARGO is set to CROSS, this is set to `--target matrix.target`.
|
||||
TARGET_FLAGS: ""
|
||||
# When CARGO is set to CROSS, TARGET_DIR includes matrix.target.
|
||||
TARGET_DIR: ./target
|
||||
# Emit backtraces on panics.
|
||||
RUST_BACKTRACE: 1
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
build:
|
||||
- pinned
|
||||
- stable
|
||||
- beta
|
||||
- nightly
|
||||
- nightly-musl
|
||||
#- nightly-32
|
||||
#- nightly-mips
|
||||
#- nightly-arm
|
||||
#- macos
|
||||
# - win-msvc
|
||||
#- win-gnu
|
||||
include:
|
||||
- build: pinned
|
||||
os: ubuntu-22.04
|
||||
rust: 1.65.0
|
||||
- build: stable
|
||||
os: ubuntu-22.04
|
||||
rust: stable
|
||||
- build: beta
|
||||
os: ubuntu-22.04
|
||||
rust: beta
|
||||
- build: nightly
|
||||
os: ubuntu-22.04
|
||||
rust: nightly
|
||||
- build: nightly-musl
|
||||
os: ubuntu-22.04
|
||||
rust: nightly
|
||||
target: x86_64-unknown-linux-musl
|
||||
#- build: nightly-32
|
||||
# os: ubuntu-22.04
|
||||
# rust: nightly
|
||||
# target: i686-unknown-linux-gnu
|
||||
#- build: nightly-mips
|
||||
# os: ubuntu-22.04
|
||||
# rust: nightly
|
||||
# target: mips64-unknown-linux-gnuabi64
|
||||
#- build: nightly-arm
|
||||
# os: ubuntu-22.04
|
||||
# rust: nightly
|
||||
# target: arm-unknown-linux-gnueabihf
|
||||
#- build: macos
|
||||
# os: macos-12
|
||||
# rust: nightly
|
||||
#- build: win-msvc
|
||||
# os: windows-2022
|
||||
# rust: nightly
|
||||
#- build: win-gnu
|
||||
# os: windows-2022
|
||||
# rust: nightly-x86_64-gnu
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
#- name: Install packages (Ubuntu)
|
||||
# if: matrix.os == 'ubuntu-22.04'
|
||||
# run: |
|
||||
# ci/ubuntu-install-packages
|
||||
- name: Install packages (macOS)
|
||||
if: matrix.os == 'macos-12'
|
||||
run: |
|
||||
ci/scripts/macos-install-packages
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2.0.0
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: ${{ matrix.rust }}
|
||||
- name: Use Cross
|
||||
if: matrix.target != ''
|
||||
run: |
|
||||
cargo install cross
|
||||
echo "CARGO=cross" >> $GITHUB_ENV
|
||||
echo "TARGET_FLAGS=--target ${{ matrix.target }}" >> $GITHUB_ENV
|
||||
echo "TARGET_DIR=./target/${{ matrix.target }}" >> $GITHUB_ENV
|
||||
- name: Show command used for Cargo
|
||||
run: |
|
||||
echo "cargo command is: ${{ env.CARGO }}"
|
||||
echo "target flag is: ${{ env.TARGET_FLAGS }}"
|
||||
- name: Build
|
||||
run: ${{ env.CARGO }} build --verbose --workspace ${{ env.TARGET_FLAGS }}
|
||||
- name: Run tests (without cross)
|
||||
if: matrix.target == ''
|
||||
run: ${{ env.CARGO }} test --verbose --workspace ${{ env.TARGET_FLAGS }}
|
||||
#- name: Run tests (with cross)
|
||||
# if: matrix.target != ''
|
||||
# run: ${{ env.CARGO }} test --verbose --workspace ${{ env.TARGET_FLAGS }}
|
||||
test_multi_platform:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- macos-latest
|
||||
- ubuntu-latest
|
||||
#- windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install packages (macOS)
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: |
|
||||
ci/scripts/macos-install-packages
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2.0.0
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: nightly
|
||||
- name: Run unit tests
|
||||
run: cargo test --locked --all-targets --workspace --all-features
|
||||
timeout-minutes: 10
|
||||
rustfmt:
|
||||
name: rustfmt
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
components: rustfmt
|
||||
- name: Check formatting
|
||||
run: cargo fmt --all --check
|
8
.github/workflows/ci.yaml
vendored
8
.github/workflows/ci.yaml
vendored
@@ -8,6 +8,7 @@ env:
|
||||
CARGO_TERM_COLOR: always
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
_EXPERIMENTAL_DAGGER_CACHE_CONFIG: type=gha;mode=max
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -27,10 +28,5 @@ jobs:
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2.0.0
|
||||
-
|
||||
name: Expose GitHub Runtime
|
||||
uses: crazy-max/ghaction-github-runtime@v2
|
||||
- name: Run dagger [CI]
|
||||
run: |
|
||||
export _EXPERIMENTAL_DAGGER_CACHE_CONFIG="type=gha,mode=max,url=$ACTIONS_CACHE_URL,token=$ACTIONS_RUNTIME_TOKEN"
|
||||
cargo run -p ci -- pr
|
||||
run: cargo run -p ci -- pr
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# Architecture
|
||||
|
||||
- `crates/dagger-bootstrap` Root project mainly used for generating the CLI,
|
||||
which in turn is used to bootstrap the code generation from `dagger`
|
||||
- `.` Root project mainly used for generating the CLI, which in turn is used to
|
||||
bootstrap the code generation from `dagger`
|
||||
- `crates/dagger-core` Contains all base types used during actual usage. This is
|
||||
where the primary logic lives in which the user interacts (\*disclaimer: most
|
||||
stuff haven't moved in here yet.)
|
||||
|
779
Cargo.lock
generated
779
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -3,14 +3,14 @@ members = [
|
||||
"crates/dagger-codegen",
|
||||
"crates/dagger-sdk",
|
||||
"crates/dagger-core",
|
||||
"crates/dagger-bootstrap",
|
||||
"crates/dagger-rs",
|
||||
"ci",
|
||||
]
|
||||
|
||||
[workspace.dependencies]
|
||||
dagger-codegen = { path = "crates/dagger-codegen", version = "^0.2.5" }
|
||||
dagger-core = { path = "crates/dagger-core", version = "^0.2.10" }
|
||||
dagger-bootstrap = { path = "crates/dagger-bootstrap", version = "^0.2.10" }
|
||||
dagger-core = { path = "crates/dagger-core", version = "^0.2.8" }
|
||||
dagger-rs = { path = "crates/dagger-rs", version = "^0.2.10" }
|
||||
dagger-sdk = { path = "crates/dagger-sdk", version = "^0.2.19" }
|
||||
|
||||
eyre = "0.6.8"
|
||||
|
@@ -1,2 +0,0 @@
|
||||
[target.x86_64-unknown-linux-musl]
|
||||
image = "messense/rust-musl-cross:x86_64-musl"
|
@@ -8,7 +8,7 @@ command = "cargo"
|
||||
args = [
|
||||
"run",
|
||||
"-p",
|
||||
"dagger-bootstrap",
|
||||
"dagger-rs",
|
||||
"--",
|
||||
"generate",
|
||||
"--output",
|
||||
|
14
README.md
14
README.md
@@ -2,20 +2,6 @@
|
||||
|
||||
A dagger sdk written in rust for rust.
|
||||
|
||||
## Plan for next release
|
||||
|
||||
- [ ] Introduce [thiserror](https://docs.rs/thiserror/latest/thiserror/) for
|
||||
better errors
|
||||
- [ ] Add compatibility with `dagger run`
|
||||
- [ ] Add open telemetry tracing to the sdk
|
||||
- [ ] Remove `id().await?` from passing to other dagger graphs, this should make
|
||||
the design much cleaner
|
||||
- [ ] Start MkBook on how to actually use the sdk
|
||||
- [ ] Update to newest upstream release
|
||||
- [ ] Fix bugs
|
||||
- [x] Run in conjunction with golang and other sdks
|
||||
- [ ] Stabilize the initial `Arc<Query>` model into something more extensible
|
||||
|
||||
## Examples
|
||||
|
||||
See [examples](./crates/dagger-sdk/examples/)
|
||||
|
@@ -8,6 +8,6 @@ edition = "2021"
|
||||
[dependencies]
|
||||
clap = "4.1.6"
|
||||
color-eyre = "0.6.2"
|
||||
dagger-sdk = { path = "../crates/dagger-sdk/", version = "^0.2.22" }
|
||||
dagger-sdk = { path = "../crates/dagger-sdk/", version = "^0.2.19" }
|
||||
eyre = "0.6.8"
|
||||
tokio = { version = "1.25.0", features = ["full"] }
|
||||
|
@@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
brew install docker
|
||||
colima start
|
@@ -48,8 +48,6 @@ async fn run_codegen(client: Arc<Query>, _subm: &ArgMatches) -> eyre::Result<()>
|
||||
.with_exec(vec![
|
||||
"cargo",
|
||||
"run",
|
||||
"-p",
|
||||
"dagger-bootstrap",
|
||||
"--",
|
||||
"generate",
|
||||
"--output",
|
||||
@@ -92,7 +90,7 @@ async fn release(client: Arc<Query>, _subm: &clap::ArgMatches) -> Result<(), col
|
||||
"--execute",
|
||||
"--allow-fully-generated-changelogs",
|
||||
"--no-changelog-preview",
|
||||
"dagger-sdk",
|
||||
"dagger-rs",
|
||||
"dagger-sdk",
|
||||
]);
|
||||
let exit = container.exit_code().await?;
|
||||
|
@@ -5,7 +5,7 @@ edition = "2021"
|
||||
readme = "README.md"
|
||||
license-file = "LICENSE.MIT"
|
||||
description = "dagger sdk codegen library"
|
||||
repository = "https://github.com/kjuulh/dagger-sdk"
|
||||
repository = "https://github.com/kjuulh/dagger-rs"
|
||||
publish = true
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
@@ -247,7 +247,7 @@ fn render_execution(funcs: &CommonFunctions, field: &FullTypeFields) -> rust::To
|
||||
return $(output_type) {
|
||||
proc: self.proc.clone(),
|
||||
selection: query,
|
||||
graphql_client: self.graphql_client.clone(),
|
||||
conn: self.conn.clone(),
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -273,13 +273,15 @@ fn render_execution(funcs: &CommonFunctions, field: &FullTypeFields) -> rust::To
|
||||
return vec![$(output_type) {
|
||||
proc: self.proc.clone(),
|
||||
selection: query,
|
||||
graphql_client: self.graphql_client.clone(),
|
||||
conn: self.conn.clone(),
|
||||
}]
|
||||
};
|
||||
}
|
||||
|
||||
let graphql_client = rust::import("crate::client", "graphql_client");
|
||||
|
||||
quote! {
|
||||
query.execute(self.graphql_client.clone()).await
|
||||
query.execute(&$graphql_client(&self.conn)).await
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -12,15 +12,15 @@ use crate::utility::OptionExt;
|
||||
pub fn render_object(funcs: &CommonFunctions, t: &FullType) -> eyre::Result<rust::Tokens> {
|
||||
let selection = rust::import("crate::querybuilder", "Selection");
|
||||
let child = rust::import("tokio::process", "Child");
|
||||
let graphql_client = rust::import("dagger_core::graphql_client", "DynGraphQLClient");
|
||||
let conn = rust::import("dagger_core::connect_params", "ConnectParams");
|
||||
let arc = rust::import("std::sync", "Arc");
|
||||
|
||||
Ok(quote! {
|
||||
#[derive(Clone)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct $(t.name.pipe(|s| format_name(s))) {
|
||||
pub proc: Option<$arc<$child>>,
|
||||
pub proc: $arc<$child>,
|
||||
pub selection: $selection,
|
||||
pub graphql_client: $graphql_client
|
||||
pub conn: $conn,
|
||||
}
|
||||
|
||||
$(t.fields.pipe(|f| render_optional_args(funcs, f)))
|
||||
|
@@ -5,108 +5,6 @@ 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/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## v0.2.11 (2023-04-29)
|
||||
|
||||
### New Features
|
||||
|
||||
- <csr-id-2a29a66217fa4d6c530ea1ce670c8836383e7051/> dagger-run support
|
||||
- <csr-id-eb7470c604169d1a15976078c0889d5cc7011257/> update to dagger-5.1
|
||||
|
||||
### Commit Statistics
|
||||
|
||||
<csr-read-only-do-not-edit/>
|
||||
|
||||
- 2 commits contributed to the release.
|
||||
- 4 days passed between releases.
|
||||
- 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**
|
||||
- dagger-run support ([`2a29a66`](https://github.com/kjuulh/dagger-sdk/commit/2a29a66217fa4d6c530ea1ce670c8836383e7051))
|
||||
- update to dagger-5.1 ([`eb7470c`](https://github.com/kjuulh/dagger-sdk/commit/eb7470c604169d1a15976078c0889d5cc7011257))
|
||||
</details>
|
||||
|
||||
## v0.2.10 (2023-04-25)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- <csr-id-9d3c21d16b4a64eb7a7b1888365a4c4ea56d7225/> delete other files/folder in downloads: #57
|
||||
|
||||
### Commit Statistics
|
||||
|
||||
<csr-read-only-do-not-edit/>
|
||||
|
||||
- 2 commits contributed to the release.
|
||||
- 21 days passed between releases.
|
||||
- 1 commit was 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**
|
||||
- Release dagger-core v0.2.10 ([`8011c42`](https://github.com/kjuulh/dagger-sdk/commit/8011c42dc077d101b1bccaf231fac17636dd249d))
|
||||
- delete other files/folder in downloads: #57 ([`9d3c21d`](https://github.com/kjuulh/dagger-sdk/commit/9d3c21d16b4a64eb7a7b1888365a4c4ea56d7225))
|
||||
</details>
|
||||
|
||||
## v0.2.9 (2023-04-03)
|
||||
|
||||
<csr-id-b55bcc159ffc6a61ecfcc5e3aa3de00a1a73b5b8/>
|
||||
|
||||
### New Features
|
||||
|
||||
- <csr-id-114f411cdb0e1043071c0ccc1768d344f78d4fcb/> with 0.4.2
|
||||
- <csr-id-b094ae4f539a880b0bde12841b7db1fbfcc0f123/> add musl ci
|
||||
This pr adds musl ci support for #50
|
||||
- <csr-id-2faabb0e502a9b15c88b0bdf5673d1b458198d70/> with multi platform ci
|
||||
This adds the first iteration of multi platform ci. This is the lowest level of testing added: pinned all the way to nightly. Next up will be macos, then musl and arm. And lastly windows. Each will probably require special handling, especially because of how cross and qemu interacts with the dagger-engine and docker.
|
||||
- <csr-id-11d20935c697e28caaa671e8da0e70a99d4310fc/> extract client
|
||||
This extracts the client (strategy pattern), this is so that it is will be possible to test the actual querier, without hitting / requiring the dagger-engine running.
|
||||
- <csr-id-384294b39038123b02c406a1038105b111c3b9be/> rename projects to point to github/kjuulh/dagger-sdk
|
||||
- <csr-id-79d931e908c58a0464fd9cf7d6ef02eb50f14c23/> with loggers
|
||||
|
||||
### Refactor
|
||||
|
||||
- <csr-id-b55bcc159ffc6a61ecfcc5e3aa3de00a1a73b5b8/> move dagger-rs and adopt workspace.deps
|
||||
|
||||
### Commit Statistics
|
||||
|
||||
<csr-read-only-do-not-edit/>
|
||||
|
||||
- 8 commits contributed to the release over the course of 19 calendar days.
|
||||
- 23 days passed between releases.
|
||||
- 7 commits were understood as [conventional](https://www.conventionalcommits.org).
|
||||
- 3 unique issues were worked on: [#46](https://github.com/kjuulh/dagger-sdk/issues/46), [#48](https://github.com/kjuulh/dagger-sdk/issues/48), [#51](https://github.com/kjuulh/dagger-sdk/issues/51)
|
||||
|
||||
### Commit Details
|
||||
|
||||
<csr-read-only-do-not-edit/>
|
||||
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **[#46](https://github.com/kjuulh/dagger-sdk/issues/46)**
|
||||
- with multi platform ci ([`2faabb0`](https://github.com/kjuulh/dagger-sdk/commit/2faabb0e502a9b15c88b0bdf5673d1b458198d70))
|
||||
* **[#48](https://github.com/kjuulh/dagger-sdk/issues/48)**
|
||||
- extract client ([`11d2093`](https://github.com/kjuulh/dagger-sdk/commit/11d20935c697e28caaa671e8da0e70a99d4310fc))
|
||||
* **[#51](https://github.com/kjuulh/dagger-sdk/issues/51)**
|
||||
- add musl ci ([`b094ae4`](https://github.com/kjuulh/dagger-sdk/commit/b094ae4f539a880b0bde12841b7db1fbfcc0f123))
|
||||
* **Uncategorized**
|
||||
- Release dagger-core v0.2.9, dagger-sdk v0.2.20 ([`f82075c`](https://github.com/kjuulh/dagger-sdk/commit/f82075c23808073d9500df63c1cd347cd9b99cef))
|
||||
- with 0.4.2 ([`114f411`](https://github.com/kjuulh/dagger-sdk/commit/114f411cdb0e1043071c0ccc1768d344f78d4fcb))
|
||||
- rename projects to point to github/kjuulh/dagger-sdk ([`384294b`](https://github.com/kjuulh/dagger-sdk/commit/384294b39038123b02c406a1038105b111c3b9be))
|
||||
- with loggers ([`79d931e`](https://github.com/kjuulh/dagger-sdk/commit/79d931e908c58a0464fd9cf7d6ef02eb50f14c23))
|
||||
- move dagger-rs and adopt workspace.deps ([`b55bcc1`](https://github.com/kjuulh/dagger-sdk/commit/b55bcc159ffc6a61ecfcc5e3aa3de00a1a73b5b8))
|
||||
</details>
|
||||
|
||||
## v0.2.8 (2023-03-10)
|
||||
|
||||
### New Features
|
||||
@@ -125,7 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
<csr-read-only-do-not-edit/>
|
||||
|
||||
- 5 commits contributed to the release over the course of 13 calendar days.
|
||||
- 4 commits contributed to the release over the course of 13 calendar days.
|
||||
- 13 days passed between releases.
|
||||
- 4 commits were understood as [conventional](https://www.conventionalcommits.org).
|
||||
- 0 issues like '(#ID)' were seen in commit messages
|
||||
@@ -137,11 +35,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **Uncategorized**
|
||||
- Release dagger-core v0.2.8, dagger-sdk v0.2.16 ([`f390eac`](https://github.com/kjuulh/dagger-sdk/commit/f390eac29f1d041d18d2207a5aa0a8d993aab68c))
|
||||
- bump version ([`41b20b6`](https://github.com/kjuulh/dagger-sdk/commit/41b20b6268db9d8defe333694e4d3ec019d7c923))
|
||||
- set internal warnings as errors ([`5f9b3a1`](https://github.com/kjuulh/dagger-sdk/commit/5f9b3a19c0ab6988bc335b020052074f3f101305))
|
||||
- introduce tests again ([`f9e7af9`](https://github.com/kjuulh/dagger-sdk/commit/f9e7af931d94fbedacf74f5da9a2f71b1992324b))
|
||||
- fix builder pattern to actually work with default values ([`ecca036`](https://github.com/kjuulh/dagger-sdk/commit/ecca036bc644fee93fbcb69bf6da9f29169e473e))
|
||||
- bump version ([`41b20b6`](https://github.com/kjuulh/dagger-rs/commit/41b20b6268db9d8defe333694e4d3ec019d7c923))
|
||||
- set internal warnings as errors ([`5f9b3a1`](https://github.com/kjuulh/dagger-rs/commit/5f9b3a19c0ab6988bc335b020052074f3f101305))
|
||||
- introduce tests again ([`f9e7af9`](https://github.com/kjuulh/dagger-rs/commit/f9e7af931d94fbedacf74f5da9a2f71b1992324b))
|
||||
- fix builder pattern to actually work with default values ([`ecca036`](https://github.com/kjuulh/dagger-rs/commit/ecca036bc644fee93fbcb69bf6da9f29169e473e))
|
||||
</details>
|
||||
|
||||
## v0.2.7 (2023-02-24)
|
||||
@@ -166,8 +63,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **Uncategorized**
|
||||
- Release dagger-core v0.2.7, dagger-sdk v0.2.15 ([`6a9a560`](https://github.com/kjuulh/dagger-sdk/commit/6a9a560cdca097abf23371d44599a2f1b726ae7f))
|
||||
- update to dagger-v0.3.13 ([`3e8ca8d`](https://github.com/kjuulh/dagger-sdk/commit/3e8ca8d86eafdc1f9d5e8b69f14fb60509549e0f))
|
||||
- Release dagger-core v0.2.7, dagger-sdk v0.2.15 ([`6a9a560`](https://github.com/kjuulh/dagger-rs/commit/6a9a560cdca097abf23371d44599a2f1b726ae7f))
|
||||
- update to dagger-v0.3.13 ([`3e8ca8d`](https://github.com/kjuulh/dagger-rs/commit/3e8ca8d86eafdc1f9d5e8b69f14fb60509549e0f))
|
||||
</details>
|
||||
|
||||
## v0.2.6 (2023-02-20)
|
||||
@@ -197,9 +94,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **Uncategorized**
|
||||
- Release dagger-core v0.2.6, dagger-codegen v0.2.7, dagger-sdk v0.2.12 ([`7179f8b`](https://github.com/kjuulh/dagger-sdk/commit/7179f8b598ef04e62925e39d3f55740253c01686))
|
||||
- ran clippy ([`1f77d90`](https://github.com/kjuulh/dagger-sdk/commit/1f77d90c0f0ac832a181b2322350ea395612986c))
|
||||
- cli session keep session alive ([`8dfecf9`](https://github.com/kjuulh/dagger-sdk/commit/8dfecf976c5537cc2c03881de2b2fd2b2508683a))
|
||||
- Release dagger-core v0.2.6, dagger-codegen v0.2.7, dagger-sdk v0.2.12 ([`7179f8b`](https://github.com/kjuulh/dagger-rs/commit/7179f8b598ef04e62925e39d3f55740253c01686))
|
||||
- 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)
|
||||
@@ -223,8 +120,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **Uncategorized**
|
||||
- Release dagger-core v0.2.5, dagger-sdk v0.2.12, dagger-codegen v0.2.7 ([`1725c51`](https://github.com/kjuulh/dagger-sdk/commit/1725c5188e8a81069ec4a4de569484c921a94927))
|
||||
- race condition in process ([`a13a2a9`](https://github.com/kjuulh/dagger-sdk/commit/a13a2a9ecbfdfac80ed8eb0cbb9e9db317da65de))
|
||||
- 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))
|
||||
</details>
|
||||
|
||||
## v0.2.4 (2023-02-20)
|
||||
@@ -249,10 +146,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **Uncategorized**
|
||||
- Release dagger-core v0.2.4, dagger-codegen v0.2.6, dagger-sdk v0.2.11 ([`f869e57`](https://github.com/kjuulh/dagger-sdk/commit/f869e574dd788cd60e5b1b5d502bec68e300694c))
|
||||
- remove blocking ([`921e61b`](https://github.com/kjuulh/dagger-sdk/commit/921e61b5e248013cb5fbf4f1bad3eef5a2673145))
|
||||
- Release dagger-core v0.2.4, dagger-codegen v0.2.6, dagger-sdk v0.2.11 ([`17ec62a`](https://github.com/kjuulh/dagger-sdk/commit/17ec62a5d58232ff57391523b9851fb7b07d02ab))
|
||||
- remove blocking ([`8385aa8`](https://github.com/kjuulh/dagger-sdk/commit/8385aa8a15ff7b45fecc3462c482b998118c14eb))
|
||||
- Release dagger-core v0.2.4, dagger-codegen v0.2.6, dagger-sdk v0.2.11 ([`f869e57`](https://github.com/kjuulh/dagger-rs/commit/f869e574dd788cd60e5b1b5d502bec68e300694c))
|
||||
- remove blocking ([`921e61b`](https://github.com/kjuulh/dagger-rs/commit/921e61b5e248013cb5fbf4f1bad3eef5a2673145))
|
||||
- Release dagger-core v0.2.4, dagger-codegen v0.2.6, dagger-sdk v0.2.11 ([`17ec62a`](https://github.com/kjuulh/dagger-rs/commit/17ec62a5d58232ff57391523b9851fb7b07d02ab))
|
||||
- remove blocking ([`8385aa8`](https://github.com/kjuulh/dagger-rs/commit/8385aa8a15ff7b45fecc3462c482b998118c14eb))
|
||||
</details>
|
||||
|
||||
## v0.2.3 (2023-02-20)
|
||||
@@ -277,8 +174,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **Uncategorized**
|
||||
- Release dagger-core v0.2.3, dagger-sdk v0.2.9, dagger-rs v0.2.10 ([`82de43a`](https://github.com/kjuulh/dagger-sdk/commit/82de43aa91d6a5e09a247d1959137fdc36a40d35))
|
||||
- Fix async panic on blocking #19 ([`75bc17e`](https://github.com/kjuulh/dagger-sdk/commit/75bc17e57db222492c6ffd2dfe80208d2bda75c9))
|
||||
- Release dagger-core v0.2.3, dagger-sdk v0.2.9, dagger-rs v0.2.10 ([`82de43a`](https://github.com/kjuulh/dagger-rs/commit/82de43aa91d6a5e09a247d1959137fdc36a40d35))
|
||||
- Fix async panic on blocking #19 ([`75bc17e`](https://github.com/kjuulh/dagger-rs/commit/75bc17e57db222492c6ffd2dfe80208d2bda75c9))
|
||||
</details>
|
||||
|
||||
## v0.2.2 (2023-02-19)
|
||||
@@ -302,8 +199,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **Uncategorized**
|
||||
- Release dagger-core v0.2.2, dagger-codegen v0.2.2, dagger-rs v0.2.8 ([`1638f15`](https://github.com/kjuulh/dagger-sdk/commit/1638f15fba9d16512e8452f87b908d6dce417cd9))
|
||||
- update to dagger v0.3.12 ([`6e5f407`](https://github.com/kjuulh/dagger-sdk/commit/6e5f4074329ab0462445b31d4153f8497c483438))
|
||||
- Release dagger-core v0.2.2, dagger-codegen v0.2.2, dagger-rs v0.2.8 ([`1638f15`](https://github.com/kjuulh/dagger-rs/commit/1638f15fba9d16512e8452f87b908d6dce417cd9))
|
||||
- update to dagger v0.3.12 ([`6e5f407`](https://github.com/kjuulh/dagger-rs/commit/6e5f4074329ab0462445b31d4153f8497c483438))
|
||||
</details>
|
||||
|
||||
## v0.2.1 (2023-02-18)
|
||||
@@ -318,7 +215,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
- 16 commits contributed to the release over the course of 19 calendar days.
|
||||
- 1 commit was understood as [conventional](https://www.conventionalcommits.org).
|
||||
- 2 unique issues were worked on: [#5](https://github.com/kjuulh/dagger-sdk/issues/5), [#6](https://github.com/kjuulh/dagger-sdk/issues/6)
|
||||
- 2 unique issues were worked on: [#5](https://github.com/kjuulh/dagger-rs/issues/5), [#6](https://github.com/kjuulh/dagger-rs/issues/6)
|
||||
|
||||
### Commit Details
|
||||
|
||||
@@ -326,24 +223,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **[#5](https://github.com/kjuulh/dagger-sdk/issues/5)**
|
||||
- update all dependencies ([`789b0e6`](https://github.com/kjuulh/dagger-sdk/commit/789b0e69c8c53d0e86d9cec89ab5345507aad514))
|
||||
* **[#6](https://github.com/kjuulh/dagger-sdk/issues/6)**
|
||||
- feature/add impl ([`4a4c03f`](https://github.com/kjuulh/dagger-sdk/commit/4a4c03f3c2ee7f6268c65976715e70767b4ea78d))
|
||||
* **[#5](https://github.com/kjuulh/dagger-rs/issues/5)**
|
||||
- update all dependencies ([`789b0e6`](https://github.com/kjuulh/dagger-rs/commit/789b0e69c8c53d0e86d9cec89ab5345507aad514))
|
||||
* **[#6](https://github.com/kjuulh/dagger-rs/issues/6)**
|
||||
- feature/add impl ([`4a4c03f`](https://github.com/kjuulh/dagger-rs/commit/4a4c03f3c2ee7f6268c65976715e70767b4ea78d))
|
||||
* **Uncategorized**
|
||||
- Release dagger-core v0.2.1, dagger-codegen v0.2.1, dagger-rs v0.2.1 ([`1332bc8`](https://github.com/kjuulh/dagger-sdk/commit/1332bc842ce2ea0254c651419813b63b36ca590c))
|
||||
- add changelogs ([`a064684`](https://github.com/kjuulh/dagger-sdk/commit/a064684fcf80196188a57d9ff9067c0b5769fb09))
|
||||
- Adjusting changelogs prior to release of dagger-core v0.2.1, dagger-codegen v0.2.1, dagger-rs v0.2.1 ([`f4a20fd`](https://github.com/kjuulh/dagger-sdk/commit/f4a20fda79063b29829cc899793775ba8cb17214))
|
||||
- with publish ([`989d5bc`](https://github.com/kjuulh/dagger-sdk/commit/989d5bc26036d46a199d939b5cbbe72aff2f8fb1))
|
||||
- with repo ([`e5383b5`](https://github.com/kjuulh/dagger-sdk/commit/e5383b51f3b290a87b729929c377e93bda3873e0))
|
||||
- with readme and license ([`1e26b38`](https://github.com/kjuulh/dagger-sdk/commit/1e26b383d4f6dbcbe20f5f7c19c749e743f6e607))
|
||||
- bump version ([`36b0ecd`](https://github.com/kjuulh/dagger-sdk/commit/36b0ecdabf4c220cffb2d0660fb6480387e3249a))
|
||||
- with println ([`d1726a0`](https://github.com/kjuulh/dagger-sdk/commit/d1726a052a6dc4e57f364864446cab3cbda7e0bf))
|
||||
- context and querier done ([`52a0db3`](https://github.com/kjuulh/dagger-sdk/commit/52a0db3e311f9f88447882f1406701d4cd612b1c))
|
||||
- tested full flow initially ([`7a008be`](https://github.com/kjuulh/dagger-sdk/commit/7a008be59e5ca183809e5840cdfae1d87665aa20))
|
||||
- move code to dagger-core ([`ec0d0b2`](https://github.com/kjuulh/dagger-sdk/commit/ec0d0b22e646c97acb3ce93f3afb3ddb8590e68f))
|
||||
- add fields ([`496a687`](https://github.com/kjuulh/dagger-sdk/commit/496a687bc34f7c58cc86df60c183be741b0b8a9c))
|
||||
- with objects ([`5fef514`](https://github.com/kjuulh/dagger-sdk/commit/5fef5148010f384d0158361d64b8e17d357d4819))
|
||||
- with enum ([`2a1f7c3`](https://github.com/kjuulh/dagger-sdk/commit/2a1f7c3f2666f1f4caebf7c22707709741c2cfad))
|
||||
- Release dagger-core v0.2.1, dagger-codegen v0.2.1, dagger-rs v0.2.1 ([`1332bc8`](https://github.com/kjuulh/dagger-rs/commit/1332bc842ce2ea0254c651419813b63b36ca590c))
|
||||
- add changelogs ([`a064684`](https://github.com/kjuulh/dagger-rs/commit/a064684fcf80196188a57d9ff9067c0b5769fb09))
|
||||
- Adjusting changelogs prior to release of dagger-core v0.2.1, dagger-codegen v0.2.1, dagger-rs v0.2.1 ([`f4a20fd`](https://github.com/kjuulh/dagger-rs/commit/f4a20fda79063b29829cc899793775ba8cb17214))
|
||||
- with publish ([`989d5bc`](https://github.com/kjuulh/dagger-rs/commit/989d5bc26036d46a199d939b5cbbe72aff2f8fb1))
|
||||
- with repo ([`e5383b5`](https://github.com/kjuulh/dagger-rs/commit/e5383b51f3b290a87b729929c377e93bda3873e0))
|
||||
- with readme and license ([`1e26b38`](https://github.com/kjuulh/dagger-rs/commit/1e26b383d4f6dbcbe20f5f7c19c749e743f6e607))
|
||||
- bump version ([`36b0ecd`](https://github.com/kjuulh/dagger-rs/commit/36b0ecdabf4c220cffb2d0660fb6480387e3249a))
|
||||
- with println ([`d1726a0`](https://github.com/kjuulh/dagger-rs/commit/d1726a052a6dc4e57f364864446cab3cbda7e0bf))
|
||||
- context and querier done ([`52a0db3`](https://github.com/kjuulh/dagger-rs/commit/52a0db3e311f9f88447882f1406701d4cd612b1c))
|
||||
- tested full flow initially ([`7a008be`](https://github.com/kjuulh/dagger-rs/commit/7a008be59e5ca183809e5840cdfae1d87665aa20))
|
||||
- move code to dagger-core ([`ec0d0b2`](https://github.com/kjuulh/dagger-rs/commit/ec0d0b22e646c97acb3ce93f3afb3ddb8590e68f))
|
||||
- add fields ([`496a687`](https://github.com/kjuulh/dagger-rs/commit/496a687bc34f7c58cc86df60c183be741b0b8a9c))
|
||||
- with objects ([`5fef514`](https://github.com/kjuulh/dagger-rs/commit/5fef5148010f384d0158361d64b8e17d357d4819))
|
||||
- with enum ([`2a1f7c3`](https://github.com/kjuulh/dagger-rs/commit/2a1f7c3f2666f1f4caebf7c22707709741c2cfad))
|
||||
</details>
|
||||
|
||||
|
@@ -1,11 +1,11 @@
|
||||
[package]
|
||||
name = "dagger-core"
|
||||
version = "0.2.11"
|
||||
version = "0.2.8"
|
||||
edition = "2021"
|
||||
readme = "README.md"
|
||||
license-file = "LICENSE.MIT"
|
||||
description = "dagger sdk core library"
|
||||
repository = "https://github.com/kjuulh/dagger-sdk"
|
||||
repository = "https://github.com/kjuulh/dagger-rs"
|
||||
publish = true
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
@@ -17,22 +17,14 @@ tokio = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
tracing-subscriber = { workspace = true }
|
||||
|
||||
base64 = "0.21.0"
|
||||
dirs = "4.0.0"
|
||||
flate2 = { version = "1.0.25", features = ["rust_backend"] }
|
||||
graphql_client = { version = "0.12.0", features = [
|
||||
"reqwest-rustls",
|
||||
"graphql_query_derive",
|
||||
], default-features = false }
|
||||
flate2 = { version = "1.0.25", features = ["zlib"] }
|
||||
graphql-introspection-query = "0.2.0"
|
||||
graphql_client = { version = "0.12.0", features = ["reqwest"] }
|
||||
hex = "0.4.3"
|
||||
hex-literal = "0.3.4"
|
||||
platform-info = "1.0.2"
|
||||
reqwest = { version = "0.11.14", features = [
|
||||
"stream",
|
||||
"rustls-tls",
|
||||
], default-features = false }
|
||||
|
||||
reqwest = { version = "0.11.14", features = ["stream", "deflate"] }
|
||||
sha2 = "0.10.6"
|
||||
tar = "0.4.38"
|
||||
tempfile = "3.3.0"
|
||||
async-trait = "0.1.67"
|
||||
|
@@ -89,7 +89,6 @@ impl InnerCliSession {
|
||||
while let Ok(Some(line)) = stdout_bufr.next_line().await {
|
||||
if let Ok(conn) = serde_json::from_str::<ConnectParams>(&line) {
|
||||
sender.send(conn).await.unwrap();
|
||||
continue;
|
||||
}
|
||||
|
||||
if let Some(logger) = &logger {
|
||||
|
@@ -135,6 +135,20 @@ impl Downloader {
|
||||
.context("failed to download CLI from archive")?;
|
||||
}
|
||||
|
||||
for file in self.cache_dir()?.read_dir()? {
|
||||
if let Ok(entry) = file {
|
||||
let path = entry.path();
|
||||
if path != cli_bin_path {
|
||||
tracing::debug!(
|
||||
path = path.display().to_string(),
|
||||
cli_bin_path = cli_bin_path.display().to_string(),
|
||||
"deleting existing dagger-engine"
|
||||
);
|
||||
std::fs::remove_file(path)?;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ok(cli_bin_path)
|
||||
}
|
||||
|
||||
|
@@ -23,25 +23,10 @@ impl Engine {
|
||||
pub async fn start(
|
||||
&self,
|
||||
cfg: &Config,
|
||||
) -> eyre::Result<(ConnectParams, Option<tokio::process::Child>)> {
|
||||
) -> eyre::Result<(ConnectParams, tokio::process::Child)> {
|
||||
tracing::info!("starting dagger-engine");
|
||||
|
||||
if let Ok(conn) = self.from_session_env().await {
|
||||
return Ok((conn, None));
|
||||
}
|
||||
|
||||
let (conn, proc) = self.from_cli(cfg).await?;
|
||||
|
||||
Ok((conn, Some(proc)))
|
||||
}
|
||||
|
||||
async fn from_session_env(&self) -> eyre::Result<ConnectParams> {
|
||||
let port = std::env::var("DAGGER_SESSION_PORT").map(|p| p.parse::<u64>())??;
|
||||
let token = std::env::var("DAGGER_SESSION_TOKEN")?;
|
||||
|
||||
Ok(ConnectParams {
|
||||
port,
|
||||
session_token: token,
|
||||
})
|
||||
// TODO: Add from existing session as well
|
||||
self.from_cli(cfg).await
|
||||
}
|
||||
}
|
||||
|
@@ -1,375 +0,0 @@
|
||||
use reqwest::Error;
|
||||
use reqwest::{Client, Url};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::collections::HashMap;
|
||||
use std::fmt::{self, Formatter};
|
||||
use std::str::FromStr;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct GraphQLError {
|
||||
message: String,
|
||||
json: Option<Vec<GraphQLErrorMessage>>,
|
||||
}
|
||||
|
||||
// https://spec.graphql.org/June2018/#sec-Errors
|
||||
#[derive(Deserialize, Debug, Clone)]
|
||||
#[allow(dead_code)]
|
||||
pub struct GraphQLErrorMessage {
|
||||
message: String,
|
||||
locations: Option<Vec<GraphQLErrorLocation>>,
|
||||
extensions: Option<HashMap<String, String>>,
|
||||
path: Option<Vec<GraphQLErrorPathParam>>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug, Clone)]
|
||||
#[allow(dead_code)]
|
||||
pub struct GraphQLErrorLocation {
|
||||
line: u32,
|
||||
column: u32,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug, Clone)]
|
||||
#[serde(untagged)]
|
||||
pub enum GraphQLErrorPathParam {
|
||||
String(String),
|
||||
Number(u32),
|
||||
}
|
||||
|
||||
impl GraphQLError {
|
||||
pub fn with_text(message: impl AsRef<str>) -> Self {
|
||||
Self {
|
||||
message: message.as_ref().to_string(),
|
||||
json: None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn with_message_and_json(message: impl AsRef<str>, json: Vec<GraphQLErrorMessage>) -> Self {
|
||||
Self {
|
||||
message: message.as_ref().to_string(),
|
||||
json: Some(json),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn with_json(json: Vec<GraphQLErrorMessage>) -> Self {
|
||||
Self::with_message_and_json("Look at json field for more details", json)
|
||||
}
|
||||
|
||||
pub fn message(&self) -> &str {
|
||||
&self.message
|
||||
}
|
||||
|
||||
pub fn json(&self) -> Option<Vec<GraphQLErrorMessage>> {
|
||||
self.json.clone()
|
||||
}
|
||||
}
|
||||
|
||||
fn format(err: &GraphQLError, f: &mut Formatter<'_>) -> fmt::Result {
|
||||
// Print the main error message
|
||||
writeln!(f, "\nGQLClient Error: {}", err.message)?;
|
||||
|
||||
// Check if query errors have been received
|
||||
if err.json.is_none() {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let errors = err.json.as_ref();
|
||||
|
||||
for err in errors.unwrap() {
|
||||
writeln!(f, "Message: {}", err.message)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
impl fmt::Display for GraphQLError {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
|
||||
format(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Debug for GraphQLError {
|
||||
#[allow(clippy::needless_borrow)]
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
format(&self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Error> for GraphQLError {
|
||||
fn from(error: Error) -> Self {
|
||||
Self {
|
||||
message: error.to_string(),
|
||||
json: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// GQL client config
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct ClientConfig {
|
||||
/// the endpoint about graphql server
|
||||
pub endpoint: String,
|
||||
/// gql query timeout, unit: seconds
|
||||
pub timeout: Option<u64>,
|
||||
/// additional request header
|
||||
pub headers: Option<HashMap<String, String>>,
|
||||
/// request proxy
|
||||
pub proxy: Option<GQLProxy>,
|
||||
}
|
||||
|
||||
/// proxy type
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub enum ProxyType {
|
||||
Http,
|
||||
Https,
|
||||
All,
|
||||
}
|
||||
|
||||
/// proxy auth, basic_auth
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct ProxyAuth {
|
||||
pub username: String,
|
||||
pub password: String,
|
||||
}
|
||||
|
||||
/// request proxy
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct GQLProxy {
|
||||
/// schema, proxy url
|
||||
pub schema: String,
|
||||
/// proxy type
|
||||
pub type_: ProxyType,
|
||||
/// auth
|
||||
pub auth: Option<ProxyAuth>,
|
||||
}
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
impl TryFrom<GQLProxy> for reqwest::Proxy {
|
||||
type Error = GraphQLError;
|
||||
|
||||
fn try_from(gql_proxy: GQLProxy) -> Result<Self, Self::Error> {
|
||||
let proxy = match gql_proxy.type_ {
|
||||
ProxyType::Http => reqwest::Proxy::http(gql_proxy.schema),
|
||||
ProxyType::Https => reqwest::Proxy::https(gql_proxy.schema),
|
||||
ProxyType::All => reqwest::Proxy::all(gql_proxy.schema),
|
||||
}
|
||||
.map_err(|e| Self::Error::with_text(format!("{:?}", e)))?;
|
||||
Ok(proxy)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct GQLClient {
|
||||
config: ClientConfig,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
struct RequestBody<T: Serialize> {
|
||||
query: String,
|
||||
variables: T,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
struct GraphQLResponse<T> {
|
||||
data: Option<T>,
|
||||
errors: Option<Vec<GraphQLErrorMessage>>,
|
||||
}
|
||||
|
||||
impl GQLClient {
|
||||
fn client(&self) -> Result<Client, GraphQLError> {
|
||||
let mut builder = Client::builder().timeout(std::time::Duration::from_secs(
|
||||
self.config.timeout.unwrap_or(5),
|
||||
));
|
||||
if let Some(proxy) = &self.config.proxy {
|
||||
builder = builder.proxy(proxy.clone().try_into()?);
|
||||
}
|
||||
builder
|
||||
.build()
|
||||
.map_err(|e| GraphQLError::with_text(format!("Can not create client: {:?}", e)))
|
||||
}
|
||||
}
|
||||
|
||||
impl GQLClient {
|
||||
pub fn new(endpoint: impl AsRef<str>) -> Self {
|
||||
Self {
|
||||
config: ClientConfig {
|
||||
endpoint: endpoint.as_ref().to_string(),
|
||||
timeout: None,
|
||||
headers: Default::default(),
|
||||
proxy: None,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new_with_headers(
|
||||
endpoint: impl AsRef<str>,
|
||||
headers: HashMap<impl ToString, impl ToString>,
|
||||
) -> Self {
|
||||
let _headers: HashMap<String, String> = headers
|
||||
.iter()
|
||||
.map(|(name, value)| (name.to_string(), value.to_string()))
|
||||
.into_iter()
|
||||
.collect();
|
||||
Self {
|
||||
config: ClientConfig {
|
||||
endpoint: endpoint.as_ref().to_string(),
|
||||
timeout: None,
|
||||
headers: Some(_headers),
|
||||
proxy: None,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new_with_config(config: ClientConfig) -> Self {
|
||||
Self { config }
|
||||
}
|
||||
}
|
||||
|
||||
impl GQLClient {
|
||||
pub async fn query<K>(&self, query: &str) -> Result<Option<K>, GraphQLError>
|
||||
where
|
||||
K: for<'de> Deserialize<'de>,
|
||||
{
|
||||
self.query_with_vars::<K, ()>(query, ()).await
|
||||
}
|
||||
|
||||
pub async fn query_unwrap<K>(&self, query: &str) -> Result<K, GraphQLError>
|
||||
where
|
||||
K: for<'de> Deserialize<'de>,
|
||||
{
|
||||
self.query_with_vars_unwrap::<K, ()>(query, ()).await
|
||||
}
|
||||
|
||||
pub async fn query_with_vars_unwrap<K, T: Serialize>(
|
||||
&self,
|
||||
query: &str,
|
||||
variables: T,
|
||||
) -> Result<K, GraphQLError>
|
||||
where
|
||||
K: for<'de> Deserialize<'de>,
|
||||
{
|
||||
match self.query_with_vars(query, variables).await? {
|
||||
Some(v) => Ok(v),
|
||||
None => Err(GraphQLError::with_text(format!(
|
||||
"No data from graphql server({}) for this query",
|
||||
self.config.endpoint
|
||||
))),
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn query_with_vars<K, T: Serialize>(
|
||||
&self,
|
||||
query: &str,
|
||||
variables: T,
|
||||
) -> Result<Option<K>, GraphQLError>
|
||||
where
|
||||
K: for<'de> Deserialize<'de>,
|
||||
{
|
||||
self.query_with_vars_by_endpoint(&self.config.endpoint, query, variables)
|
||||
.await
|
||||
}
|
||||
|
||||
async fn query_with_vars_by_endpoint<K, T: Serialize>(
|
||||
&self,
|
||||
endpoint: impl AsRef<str>,
|
||||
query: &str,
|
||||
variables: T,
|
||||
) -> Result<Option<K>, GraphQLError>
|
||||
where
|
||||
K: for<'de> Deserialize<'de>,
|
||||
{
|
||||
let mut times = 1;
|
||||
let mut endpoint = endpoint.as_ref().to_string();
|
||||
let endpoint_url = Url::from_str(&endpoint).map_err(|e| {
|
||||
GraphQLError::with_text(format!("Wrong endpoint: {}. {:?}", endpoint, e))
|
||||
})?;
|
||||
let schema = endpoint_url.scheme();
|
||||
let host = endpoint_url
|
||||
.host()
|
||||
.ok_or_else(|| GraphQLError::with_text(format!("Wrong endpoint: {}", endpoint)))?;
|
||||
|
||||
let client: Client = self.client()?;
|
||||
let body = RequestBody {
|
||||
query: query.to_string(),
|
||||
variables,
|
||||
};
|
||||
|
||||
loop {
|
||||
if times > 10 {
|
||||
return Err(GraphQLError::with_text(format!(
|
||||
"Many redirect location: {}",
|
||||
endpoint
|
||||
)));
|
||||
}
|
||||
|
||||
let mut request = client.post(&endpoint).json(&body);
|
||||
if let Some(headers) = &self.config.headers {
|
||||
if !headers.is_empty() {
|
||||
for (name, value) in headers {
|
||||
request = request.header(name, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let raw_response = request.send().await?;
|
||||
if let Some(location) = raw_response.headers().get(reqwest::header::LOCATION) {
|
||||
let redirect_url = location.to_str().map_err(|e| {
|
||||
GraphQLError::with_text(format!(
|
||||
"Failed to parse response header: Location. {:?}",
|
||||
e
|
||||
))
|
||||
})?;
|
||||
|
||||
// if the response location start with http:// or https://
|
||||
if redirect_url.starts_with("http://") || redirect_url.starts_with("https://") {
|
||||
times += 1;
|
||||
endpoint = redirect_url.to_string();
|
||||
continue;
|
||||
}
|
||||
|
||||
// without schema
|
||||
endpoint = if redirect_url.starts_with('/') {
|
||||
format!("{}://{}{}", schema, host, redirect_url)
|
||||
} else {
|
||||
format!("{}://{}/{}", schema, host, redirect_url)
|
||||
};
|
||||
times += 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
let status = raw_response.status();
|
||||
let response_body_text = raw_response
|
||||
.text()
|
||||
.await
|
||||
.map_err(|e| GraphQLError::with_text(format!("Can not get response: {:?}", e)))?;
|
||||
|
||||
let json: GraphQLResponse<K> =
|
||||
serde_json::from_str(&response_body_text).map_err(|e| {
|
||||
GraphQLError::with_text(format!(
|
||||
"Failed to parse response: {:?}. The response body is: {}",
|
||||
e, response_body_text
|
||||
))
|
||||
})?;
|
||||
|
||||
if !status.is_success() {
|
||||
return Err(GraphQLError::with_message_and_json(
|
||||
format!("The response is [{}]", status.as_u16()),
|
||||
json.errors.unwrap_or_default(),
|
||||
));
|
||||
}
|
||||
|
||||
// Check if error messages have been received
|
||||
if json.errors.is_some() {
|
||||
return Err(GraphQLError::with_json(json.errors.unwrap_or_default()));
|
||||
}
|
||||
if json.data.is_none() {
|
||||
tracing::warn!(
|
||||
target = "gql-client",
|
||||
response_text = response_body_text,
|
||||
"The deserialized data is none, the response",
|
||||
);
|
||||
}
|
||||
|
||||
return Ok(json.data);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,52 +0,0 @@
|
||||
use std::collections::HashMap;
|
||||
use std::sync::Arc;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use base64::engine::general_purpose;
|
||||
use base64::Engine;
|
||||
|
||||
use crate::connect_params::ConnectParams;
|
||||
use crate::gql_client::{ClientConfig, GQLClient};
|
||||
|
||||
#[async_trait]
|
||||
pub trait GraphQLClient {
|
||||
async fn query(&self, query: &str) -> eyre::Result<Option<serde_json::Value>>;
|
||||
}
|
||||
|
||||
pub type DynGraphQLClient = Arc<dyn GraphQLClient + Send + Sync>;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct DefaultGraphQLClient {
|
||||
client: GQLClient,
|
||||
}
|
||||
|
||||
impl DefaultGraphQLClient {
|
||||
pub fn new(conn: &ConnectParams) -> Self {
|
||||
let token = general_purpose::URL_SAFE.encode(format!("{}:", conn.session_token));
|
||||
|
||||
let mut headers = HashMap::new();
|
||||
headers.insert("Authorization".to_string(), format!("Basic {}", token));
|
||||
|
||||
Self {
|
||||
client: GQLClient::new_with_config(ClientConfig {
|
||||
endpoint: conn.url(),
|
||||
timeout: Some(1000),
|
||||
headers: Some(headers),
|
||||
proxy: None,
|
||||
}),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl GraphQLClient for DefaultGraphQLClient {
|
||||
async fn query(&self, query: &str) -> eyre::Result<Option<serde_json::Value>> {
|
||||
let res: Option<serde_json::Value> = self
|
||||
.client
|
||||
.query(&query)
|
||||
.await
|
||||
.map_err(|r| eyre::anyhow!(r.to_string()))?;
|
||||
|
||||
return Ok(res);
|
||||
}
|
||||
}
|
@@ -1,14 +1,12 @@
|
||||
#![deny(warnings)]
|
||||
|
||||
pub const DAGGER_ENGINE_VERSION: &'static str = "0.5.1";
|
||||
pub const DAGGER_ENGINE_VERSION: &'static str = "0.4.0";
|
||||
|
||||
pub mod cli_session;
|
||||
pub mod config;
|
||||
pub mod connect_params;
|
||||
pub mod downloader;
|
||||
pub mod engine;
|
||||
pub mod gql_client;
|
||||
pub mod graphql_client;
|
||||
pub mod introspection;
|
||||
pub mod logger;
|
||||
pub mod schema;
|
||||
|
@@ -1,11 +1,11 @@
|
||||
[package]
|
||||
name = "dagger-bootstrap"
|
||||
name = "dagger-rs"
|
||||
version = "0.2.10"
|
||||
edition = "2021"
|
||||
readme = "README.md"
|
||||
license-file = "LICENSE.MIT"
|
||||
description = "A dagger sdk for rust, written in rust"
|
||||
repository = "https://github.com/kjuulh/dagger-sdk"
|
||||
repository = "https://github.com/kjuulh/dagger-rs"
|
||||
publish = true
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
@@ -21,3 +21,14 @@ serde_json = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
|
||||
clap = "4.1.6"
|
||||
dirs = "4.0.0"
|
||||
flate2 = { version = "1.0.25", features = ["zlib"] }
|
||||
graphql-introspection-query = "0.2.0"
|
||||
graphql_client = { version = "0.12.0", features = ["reqwest"] }
|
||||
hex = "0.4.3"
|
||||
hex-literal = "0.3.4"
|
||||
platform-info = "1.0.2"
|
||||
reqwest = { version = "0.11.14", features = ["stream", "deflate"] }
|
||||
sha2 = "0.10.6"
|
||||
tar = "0.4.38"
|
||||
tempfile = "3.3.0"
|
@@ -6,124 +6,8 @@ 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).
|
||||
|
||||
## v0.2.22 (2023-04-29)
|
||||
|
||||
### New Features
|
||||
|
||||
- <csr-id-2a29a66217fa4d6c530ea1ce670c8836383e7051/> dagger-run support
|
||||
- <csr-id-eb7470c604169d1a15976078c0889d5cc7011257/> update to dagger-5.1
|
||||
|
||||
### Commit Statistics
|
||||
|
||||
<csr-read-only-do-not-edit/>
|
||||
|
||||
- 2 commits contributed to the release.
|
||||
- 4 days passed between releases.
|
||||
- 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**
|
||||
- dagger-run support ([`2a29a66`](https://github.com/kjuulh/dagger-sdk/commit/2a29a66217fa4d6c530ea1ce670c8836383e7051))
|
||||
- update to dagger-5.1 ([`eb7470c`](https://github.com/kjuulh/dagger-sdk/commit/eb7470c604169d1a15976078c0889d5cc7011257))
|
||||
</details>
|
||||
|
||||
## v0.2.21 (2023-04-25)
|
||||
|
||||
<csr-id-09881ee39bdfb9201d104e4679a51c3b76b5fe27/>
|
||||
|
||||
### Chore
|
||||
|
||||
- <csr-id-09881ee39bdfb9201d104e4679a51c3b76b5fe27/> add new dagger-core-version
|
||||
|
||||
### Commit Statistics
|
||||
|
||||
<csr-read-only-do-not-edit/>
|
||||
|
||||
- 2 commits contributed to the release.
|
||||
- 21 days passed between releases.
|
||||
- 1 commit was 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**
|
||||
- Release dagger-sdk v0.2.21 ([`6937ef0`](https://github.com/kjuulh/dagger-sdk/commit/6937ef0ace797315013513aa7e2af39a9206a738))
|
||||
- add new dagger-core-version ([`09881ee`](https://github.com/kjuulh/dagger-sdk/commit/09881ee39bdfb9201d104e4679a51c3b76b5fe27))
|
||||
</details>
|
||||
|
||||
## v0.2.20 (2023-04-03)
|
||||
|
||||
<csr-id-ea27fa8168cc54b20fac87c016f479061c6eda91/>
|
||||
<csr-id-6ef4bdf587e4aea290b722e7a0aed3184e72d6bb/>
|
||||
<csr-id-b55bcc159ffc6a61ecfcc5e3aa3de00a1a73b5b8/>
|
||||
|
||||
### Chore
|
||||
|
||||
- <csr-id-ea27fa8168cc54b20fac87c016f479061c6eda91/> fmt
|
||||
|
||||
### New Features
|
||||
|
||||
- <csr-id-9ea18700e78a7ee09f43e6976b0339dfc2747458/> with gen
|
||||
- <csr-id-11d20935c697e28caaa671e8da0e70a99d4310fc/> extract client
|
||||
This extracts the client (strategy pattern), this is so that it is will be possible to test the actual querier, without hitting / requiring the dagger-engine running.
|
||||
- <csr-id-384294b39038123b02c406a1038105b111c3b9be/> rename projects to point to github/kjuulh/dagger-sdk
|
||||
- <csr-id-79d931e908c58a0464fd9cf7d6ef02eb50f14c23/> with loggers
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- <csr-id-696007cf45ccbdfc1b8eb45e726940a040f52494/> update rust crate futures to 0.3.28
|
||||
- <csr-id-756a0805336d477f33e7868570a89a86fc14c1dd/> stable input fields and args
|
||||
- <csr-id-71f98d0293a773df3917f13174273c536854a197/> stable enum entries
|
||||
|
||||
### Refactor
|
||||
|
||||
- <csr-id-6ef4bdf587e4aea290b722e7a0aed3184e72d6bb/> add basic cargo make gen command
|
||||
- <csr-id-b55bcc159ffc6a61ecfcc5e3aa3de00a1a73b5b8/> move dagger-rs and adopt workspace.deps
|
||||
|
||||
### Commit Statistics
|
||||
|
||||
<csr-read-only-do-not-edit/>
|
||||
|
||||
- 11 commits contributed to the release over the course of 19 calendar days.
|
||||
- 20 days passed between releases.
|
||||
- 10 commits were understood as [conventional](https://www.conventionalcommits.org).
|
||||
- 1 unique issue was worked on: [#48](https://github.com/kjuulh/dagger-sdk/issues/48)
|
||||
|
||||
### Commit Details
|
||||
|
||||
<csr-read-only-do-not-edit/>
|
||||
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **[#48](https://github.com/kjuulh/dagger-sdk/issues/48)**
|
||||
- extract client ([`11d2093`](https://github.com/kjuulh/dagger-sdk/commit/11d20935c697e28caaa671e8da0e70a99d4310fc))
|
||||
* **Uncategorized**
|
||||
- Release dagger-core v0.2.9, dagger-sdk v0.2.20 ([`f82075c`](https://github.com/kjuulh/dagger-sdk/commit/f82075c23808073d9500df63c1cd347cd9b99cef))
|
||||
- with gen ([`9ea1870`](https://github.com/kjuulh/dagger-sdk/commit/9ea18700e78a7ee09f43e6976b0339dfc2747458))
|
||||
- update rust crate futures to 0.3.28 ([`696007c`](https://github.com/kjuulh/dagger-sdk/commit/696007cf45ccbdfc1b8eb45e726940a040f52494))
|
||||
- rename projects to point to github/kjuulh/dagger-sdk ([`384294b`](https://github.com/kjuulh/dagger-sdk/commit/384294b39038123b02c406a1038105b111c3b9be))
|
||||
- with loggers ([`79d931e`](https://github.com/kjuulh/dagger-sdk/commit/79d931e908c58a0464fd9cf7d6ef02eb50f14c23))
|
||||
- stable input fields and args ([`756a080`](https://github.com/kjuulh/dagger-sdk/commit/756a0805336d477f33e7868570a89a86fc14c1dd))
|
||||
- fmt ([`ea27fa8`](https://github.com/kjuulh/dagger-sdk/commit/ea27fa8168cc54b20fac87c016f479061c6eda91))
|
||||
- stable enum entries ([`71f98d0`](https://github.com/kjuulh/dagger-sdk/commit/71f98d0293a773df3917f13174273c536854a197))
|
||||
- add basic cargo make gen command ([`6ef4bdf`](https://github.com/kjuulh/dagger-sdk/commit/6ef4bdf587e4aea290b722e7a0aed3184e72d6bb))
|
||||
- move dagger-rs and adopt workspace.deps ([`b55bcc1`](https://github.com/kjuulh/dagger-sdk/commit/b55bcc159ffc6a61ecfcc5e3aa3de00a1a73b5b8))
|
||||
</details>
|
||||
|
||||
## v0.2.19 (2023-03-14)
|
||||
|
||||
<csr-id-6629d2db4fbc7cdba9b2e4a241e4b0a2592cf384/>
|
||||
|
||||
### Chore
|
||||
|
||||
- <csr-id-6629d2db4fbc7cdba9b2e4a241e4b0a2592cf384/> fix release version
|
||||
@@ -136,9 +20,9 @@ and this project adheres to
|
||||
|
||||
<csr-read-only-do-not-edit/>
|
||||
|
||||
- 3 commits contributed to the release.
|
||||
- 2 commits contributed to the release.
|
||||
- 2 commits were understood as [conventional](https://www.conventionalcommits.org).
|
||||
- 1 unique issue was worked on: [#34](https://github.com/kjuulh/dagger-sdk/issues/34)
|
||||
- 1 unique issue was worked on: [#34](https://github.com/kjuulh/dagger-rs/issues/34)
|
||||
|
||||
### Commit Details
|
||||
|
||||
@@ -146,11 +30,10 @@ and this project adheres to
|
||||
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **[#34](https://github.com/kjuulh/dagger-sdk/issues/34)**
|
||||
- serialization of enum args for graphql ([`8fd6bb9`](https://github.com/kjuulh/dagger-sdk/commit/8fd6bb983ef00b1aa2cf1ba3088028329033c38f))
|
||||
* **[#34](https://github.com/kjuulh/dagger-rs/issues/34)**
|
||||
- serialization of enum args for graphql ([`8fd6bb9`](https://github.com/kjuulh/dagger-rs/commit/8fd6bb983ef00b1aa2cf1ba3088028329033c38f))
|
||||
* **Uncategorized**
|
||||
- Release dagger-sdk v0.2.19 ([`76fab3f`](https://github.com/kjuulh/dagger-sdk/commit/76fab3f4662020c33af9b57daed715f6f65a8c7c))
|
||||
- fix release version ([`6629d2d`](https://github.com/kjuulh/dagger-sdk/commit/6629d2db4fbc7cdba9b2e4a241e4b0a2592cf384))
|
||||
- fix release version ([`6629d2d`](https://github.com/kjuulh/dagger-rs/commit/6629d2db4fbc7cdba9b2e4a241e4b0a2592cf384))
|
||||
</details>
|
||||
|
||||
## v0.2.17 (2023-03-13)
|
||||
@@ -194,16 +77,16 @@ and this project adheres to
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **Uncategorized**
|
||||
- Release dagger-sdk v0.2.17 ([`a8e6dde`](https://github.com/kjuulh/dagger-sdk/commit/a8e6dde615029d9a94d159ed84b5373121cd201f))
|
||||
- make sure tests have a command to execute ([`1bfd084`](https://github.com/kjuulh/dagger-sdk/commit/1bfd084cd28e2b984c61de7f3f9a065cc41be007))
|
||||
- remove unused imports ([`5593fce`](https://github.com/kjuulh/dagger-sdk/commit/5593fce2e16e0aa97a2e6843f15d3bb1121048f5))
|
||||
- remove export and instead use exitcode ([`2cc0231`](https://github.com/kjuulh/dagger-sdk/commit/2cc0231c5f29993081f0f7e15e44cac95a7d6086))
|
||||
- move issues to actual tests and refactor ([`9ba0139`](https://github.com/kjuulh/dagger-sdk/commit/9ba01396cb44ee02cf7a16008e3f0bdae9f78754))
|
||||
- add support for String as well ([`c025d17`](https://github.com/kjuulh/dagger-sdk/commit/c025d1742482d701946c292dcf104421d3cade8e))
|
||||
- move issues to another folder ([`e9e35ed`](https://github.com/kjuulh/dagger-sdk/commit/e9e35edb1cb67eee8cc033212aba3b1888def78f))
|
||||
- add public tuple field and into func ([`d7317e5`](https://github.com/kjuulh/dagger-sdk/commit/d7317e5cf34ee84a7b092357f5fbb15cd2bae2e3))
|
||||
- initial issue ([`f679281`](https://github.com/kjuulh/dagger-sdk/commit/f67928155f02076cbb41abd4010523879ff3caf1))
|
||||
- update rust crate futures to 0.3.27 ([`44fa024`](https://github.com/kjuulh/dagger-sdk/commit/44fa0240f8197f49fdf942b5c3d89079b59195d1))
|
||||
- Release dagger-sdk v0.2.17 ([`a8e6dde`](https://github.com/kjuulh/dagger-rs/commit/a8e6dde615029d9a94d159ed84b5373121cd201f))
|
||||
- make sure tests have a command to execute ([`1bfd084`](https://github.com/kjuulh/dagger-rs/commit/1bfd084cd28e2b984c61de7f3f9a065cc41be007))
|
||||
- remove unused imports ([`5593fce`](https://github.com/kjuulh/dagger-rs/commit/5593fce2e16e0aa97a2e6843f15d3bb1121048f5))
|
||||
- remove export and instead use exitcode ([`2cc0231`](https://github.com/kjuulh/dagger-rs/commit/2cc0231c5f29993081f0f7e15e44cac95a7d6086))
|
||||
- move issues to actual tests and refactor ([`9ba0139`](https://github.com/kjuulh/dagger-rs/commit/9ba01396cb44ee02cf7a16008e3f0bdae9f78754))
|
||||
- add support for String as well ([`c025d17`](https://github.com/kjuulh/dagger-rs/commit/c025d1742482d701946c292dcf104421d3cade8e))
|
||||
- move issues to another folder ([`e9e35ed`](https://github.com/kjuulh/dagger-rs/commit/e9e35edb1cb67eee8cc033212aba3b1888def78f))
|
||||
- add public tuple field and into func ([`d7317e5`](https://github.com/kjuulh/dagger-rs/commit/d7317e5cf34ee84a7b092357f5fbb15cd2bae2e3))
|
||||
- initial issue ([`f679281`](https://github.com/kjuulh/dagger-rs/commit/f67928155f02076cbb41abd4010523879ff3caf1))
|
||||
- update rust crate futures to 0.3.27 ([`44fa024`](https://github.com/kjuulh/dagger-rs/commit/44fa0240f8197f49fdf942b5c3d89079b59195d1))
|
||||
</details>
|
||||
|
||||
## v0.2.16 (2023-03-10)
|
||||
@@ -246,13 +129,13 @@ and this project adheres to
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **Uncategorized**
|
||||
- Release dagger-core v0.2.8, dagger-sdk v0.2.16 ([`f390eac`](https://github.com/kjuulh/dagger-sdk/commit/f390eac29f1d041d18d2207a5aa0a8d993aab68c))
|
||||
- fix tasks ([`e642778`](https://github.com/kjuulh/dagger-sdk/commit/e642778d9028726dfb07217814e15ad1dd3b83f2))
|
||||
- with dagger-engine v.0.4.0 ([`7133bfa`](https://github.com/kjuulh/dagger-sdk/commit/7133bfae9508bc5977548e373c49342a1248d6e4))
|
||||
- fix missing await in connect ([`13b7805`](https://github.com/kjuulh/dagger-sdk/commit/13b7805e7e6fcf47e0a1318adcc25b4ab773a3c9))
|
||||
- add tests to sdk ([`4381af0`](https://github.com/kjuulh/dagger-sdk/commit/4381af029521c2cbac9325278d261db79a994657))
|
||||
- set internal warnings as errors ([`5f9b3a1`](https://github.com/kjuulh/dagger-sdk/commit/5f9b3a19c0ab6988bc335b020052074f3f101305))
|
||||
- fix builder pattern to actually work with default values ([`ecca036`](https://github.com/kjuulh/dagger-sdk/commit/ecca036bc644fee93fbcb69bf6da9f29169e473e))
|
||||
- Release dagger-core v0.2.8, dagger-sdk v0.2.16 ([`f390eac`](https://github.com/kjuulh/dagger-rs/commit/f390eac29f1d041d18d2207a5aa0a8d993aab68c))
|
||||
- fix tasks ([`e642778`](https://github.com/kjuulh/dagger-rs/commit/e642778d9028726dfb07217814e15ad1dd3b83f2))
|
||||
- with dagger-engine v.0.4.0 ([`7133bfa`](https://github.com/kjuulh/dagger-rs/commit/7133bfae9508bc5977548e373c49342a1248d6e4))
|
||||
- fix missing await in connect ([`13b7805`](https://github.com/kjuulh/dagger-rs/commit/13b7805e7e6fcf47e0a1318adcc25b4ab773a3c9))
|
||||
- add tests to sdk ([`4381af0`](https://github.com/kjuulh/dagger-rs/commit/4381af029521c2cbac9325278d261db79a994657))
|
||||
- set internal warnings as errors ([`5f9b3a1`](https://github.com/kjuulh/dagger-rs/commit/5f9b3a19c0ab6988bc335b020052074f3f101305))
|
||||
- fix builder pattern to actually work with default values ([`ecca036`](https://github.com/kjuulh/dagger-rs/commit/ecca036bc644fee93fbcb69bf6da9f29169e473e))
|
||||
</details>
|
||||
|
||||
## v0.2.15 (2023-02-24)
|
||||
@@ -281,9 +164,9 @@ and this project adheres to
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **Uncategorized**
|
||||
- Release dagger-core v0.2.7, dagger-sdk v0.2.15 ([`6a9a560`](https://github.com/kjuulh/dagger-sdk/commit/6a9a560cdca097abf23371d44599a2f1b726ae7f))
|
||||
- set deserialize on enums as well ([`e578b0e`](https://github.com/kjuulh/dagger-sdk/commit/e578b0e371e13bc30ada793b7cd6ebe75ba83a07))
|
||||
- update to dagger-v0.3.13 ([`3e8ca8d`](https://github.com/kjuulh/dagger-sdk/commit/3e8ca8d86eafdc1f9d5e8b69f14fb60509549e0f))
|
||||
- Release dagger-core v0.2.7, dagger-sdk v0.2.15 ([`6a9a560`](https://github.com/kjuulh/dagger-rs/commit/6a9a560cdca097abf23371d44599a2f1b726ae7f))
|
||||
- set deserialize on enums as well ([`e578b0e`](https://github.com/kjuulh/dagger-rs/commit/e578b0e371e13bc30ada793b7cd6ebe75ba83a07))
|
||||
- update to dagger-v0.3.13 ([`3e8ca8d`](https://github.com/kjuulh/dagger-rs/commit/3e8ca8d86eafdc1f9d5e8b69f14fb60509549e0f))
|
||||
</details>
|
||||
|
||||
## v0.2.14 (2023-02-22)
|
||||
@@ -309,8 +192,8 @@ and this project adheres to
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **Uncategorized**
|
||||
- Release dagger-sdk v0.2.14 ([`88b055c`](https://github.com/kjuulh/dagger-sdk/commit/88b055cb47d3d474e2c37d8fa8259df5faad9da5))
|
||||
- fix whitespace ([`e331ca0`](https://github.com/kjuulh/dagger-sdk/commit/e331ca003546f4ebe00f33b65c3b45c6b0586514))
|
||||
- Release dagger-sdk v0.2.14 ([`88b055c`](https://github.com/kjuulh/dagger-rs/commit/88b055cb47d3d474e2c37d8fa8259df5faad9da5))
|
||||
- fix whitespace ([`e331ca0`](https://github.com/kjuulh/dagger-rs/commit/e331ca003546f4ebe00f33b65c3b45c6b0586514))
|
||||
</details>
|
||||
|
||||
## v0.2.13 (2023-02-22)
|
||||
@@ -347,13 +230,13 @@ and this project adheres to
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **Uncategorized**
|
||||
- Release dagger-codegen v0.2.8, dagger-sdk v0.2.13 ([`456f483`](https://github.com/kjuulh/dagger-sdk/commit/456f48389b5514d7f743a600a7732fb02dd87418))
|
||||
- ran clippy ([`7c3654d`](https://github.com/kjuulh/dagger-sdk/commit/7c3654d276bb5f66e692a210cb60cdf46b19e226))
|
||||
- with clone ([`266ad32`](https://github.com/kjuulh/dagger-sdk/commit/266ad32dff4c8957c7cdd291f9ef6f8a8c1d055c))
|
||||
- Release dagger-core v0.2.6, dagger-codegen v0.2.7, dagger-sdk v0.2.12 ([`7179f8b`](https://github.com/kjuulh/dagger-sdk/commit/7179f8b598ef04e62925e39d3f55740253c01686))
|
||||
- ran clippy ([`1f77d90`](https://github.com/kjuulh/dagger-sdk/commit/1f77d90c0f0ac832a181b2322350ea395612986c))
|
||||
- Release dagger-core v0.2.5, dagger-sdk v0.2.12, dagger-codegen v0.2.7 ([`1725c51`](https://github.com/kjuulh/dagger-sdk/commit/1725c5188e8a81069ec4a4de569484c921a94927))
|
||||
- race condition in process ([`a13a2a9`](https://github.com/kjuulh/dagger-sdk/commit/a13a2a9ecbfdfac80ed8eb0cbb9e9db317da65de))
|
||||
- Release dagger-codegen v0.2.8, dagger-sdk v0.2.13 ([`456f483`](https://github.com/kjuulh/dagger-rs/commit/456f48389b5514d7f743a600a7732fb02dd87418))
|
||||
- ran clippy ([`7c3654d`](https://github.com/kjuulh/dagger-rs/commit/7c3654d276bb5f66e692a210cb60cdf46b19e226))
|
||||
- with clone ([`266ad32`](https://github.com/kjuulh/dagger-rs/commit/266ad32dff4c8957c7cdd291f9ef6f8a8c1d055c))
|
||||
- Release dagger-core v0.2.6, dagger-codegen v0.2.7, dagger-sdk v0.2.12 ([`7179f8b`](https://github.com/kjuulh/dagger-rs/commit/7179f8b598ef04e62925e39d3f55740253c01686))
|
||||
- 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))
|
||||
</details>
|
||||
|
||||
## v0.2.12 (2023-02-20)
|
||||
@@ -391,9 +274,9 @@ and this project adheres to
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **Uncategorized**
|
||||
- Release dagger-core v0.2.4, dagger-codegen v0.2.6, dagger-sdk v0.2.11 ([`f869e57`](https://github.com/kjuulh/dagger-sdk/commit/f869e574dd788cd60e5b1b5d502bec68e300694c))
|
||||
- Release dagger-core v0.2.4, dagger-codegen v0.2.6, dagger-sdk v0.2.11 ([`17ec62a`](https://github.com/kjuulh/dagger-sdk/commit/17ec62a5d58232ff57391523b9851fb7b07d02ab))
|
||||
- ran clippy ([`803cfc4`](https://github.com/kjuulh/dagger-sdk/commit/803cfc4f8c4d72ab7d011be5523b3bfc6039de39))
|
||||
- Release dagger-core v0.2.4, dagger-codegen v0.2.6, dagger-sdk v0.2.11 ([`f869e57`](https://github.com/kjuulh/dagger-rs/commit/f869e574dd788cd60e5b1b5d502bec68e300694c))
|
||||
- Release dagger-core v0.2.4, dagger-codegen v0.2.6, dagger-sdk v0.2.11 ([`17ec62a`](https://github.com/kjuulh/dagger-rs/commit/17ec62a5d58232ff57391523b9851fb7b07d02ab))
|
||||
- ran clippy ([`803cfc4`](https://github.com/kjuulh/dagger-rs/commit/803cfc4f8c4d72ab7d011be5523b3bfc6039de39))
|
||||
</details>
|
||||
|
||||
## v0.2.10 (2023-02-20)
|
||||
@@ -419,14 +302,14 @@ Alignment release
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **Uncategorized**
|
||||
- Release dagger-sdk v0.2.10 ([`5cb9729`](https://github.com/kjuulh/dagger-sdk/commit/5cb97296b61677fb37e4bdb8519d30a484f93621))
|
||||
- changelog ([`b100285`](https://github.com/kjuulh/dagger-sdk/commit/b100285312df522218bfd4bc00bbf41b857a81bf))
|
||||
- Adjusting changelogs prior to release of dagger-sdk v0.2.10 ([`8ed0647`](https://github.com/kjuulh/dagger-sdk/commit/8ed06476e56f3290a419d2a67e7f25da575c63ad))
|
||||
- update changelog ([`09aa658`](https://github.com/kjuulh/dagger-sdk/commit/09aa658b6fb3c1e9a2de668c4a69bbe5be13202f))
|
||||
- Adjusting changelogs prior to release of dagger-sdk v0.2.10 ([`b436f27`](https://github.com/kjuulh/dagger-sdk/commit/b436f27a535f085bb8a4e66c7c4b3df461e74c21))
|
||||
- Adjusting changelogs prior to release of dagger-sdk v0.2.10, dagger-rs v0.2.10 ([`577a293`](https://github.com/kjuulh/dagger-sdk/commit/577a293c6777b9305a4f5fc7c3abee4aff4d74b5))
|
||||
- Adjusting changelogs prior to release of dagger-sdk v0.2.10, dagger-rs v0.2.10 ([`76bb1fc`](https://github.com/kjuulh/dagger-sdk/commit/76bb1fcedd03bd2d3b1e0f841f10325e4a85e108))
|
||||
- Release dagger-rs v0.2.10 ([`dc3487b`](https://github.com/kjuulh/dagger-sdk/commit/dc3487b840beb9543699f72d4282147e4ebc72f2))
|
||||
- Release dagger-sdk v0.2.10 ([`5cb9729`](https://github.com/kjuulh/dagger-rs/commit/5cb97296b61677fb37e4bdb8519d30a484f93621))
|
||||
- changelog ([`b100285`](https://github.com/kjuulh/dagger-rs/commit/b100285312df522218bfd4bc00bbf41b857a81bf))
|
||||
- Adjusting changelogs prior to release of dagger-sdk v0.2.10 ([`8ed0647`](https://github.com/kjuulh/dagger-rs/commit/8ed06476e56f3290a419d2a67e7f25da575c63ad))
|
||||
- update changelog ([`09aa658`](https://github.com/kjuulh/dagger-rs/commit/09aa658b6fb3c1e9a2de668c4a69bbe5be13202f))
|
||||
- Adjusting changelogs prior to release of dagger-sdk v0.2.10 ([`b436f27`](https://github.com/kjuulh/dagger-rs/commit/b436f27a535f085bb8a4e66c7c4b3df461e74c21))
|
||||
- Adjusting changelogs prior to release of dagger-sdk v0.2.10, dagger-rs v0.2.10 ([`577a293`](https://github.com/kjuulh/dagger-rs/commit/577a293c6777b9305a4f5fc7c3abee4aff4d74b5))
|
||||
- Adjusting changelogs prior to release of dagger-sdk v0.2.10, dagger-rs v0.2.10 ([`76bb1fc`](https://github.com/kjuulh/dagger-rs/commit/76bb1fcedd03bd2d3b1e0f841f10325e4a85e108))
|
||||
- Release dagger-rs v0.2.10 ([`dc3487b`](https://github.com/kjuulh/dagger-rs/commit/dc3487b840beb9543699f72d4282147e4ebc72f2))
|
||||
</details>
|
||||
|
||||
## v0.2.10
|
||||
@@ -479,8 +362,8 @@ Alignment release
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **Uncategorized**
|
||||
- Release dagger-core v0.2.3, dagger-sdk v0.2.9, dagger-rs v0.2.10 ([`82de43a`](https://github.com/kjuulh/dagger-sdk/commit/82de43aa91d6a5e09a247d1959137fdc36a40d35))
|
||||
- Fix async panic on blocking #19 ([`75bc17e`](https://github.com/kjuulh/dagger-sdk/commit/75bc17e57db222492c6ffd2dfe80208d2bda75c9))
|
||||
- Release dagger-core v0.2.3, dagger-sdk v0.2.9, dagger-rs v0.2.10 ([`82de43a`](https://github.com/kjuulh/dagger-rs/commit/82de43aa91d6a5e09a247d1959137fdc36a40d35))
|
||||
- Fix async panic on blocking #19 ([`75bc17e`](https://github.com/kjuulh/dagger-rs/commit/75bc17e57db222492c6ffd2dfe80208d2bda75c9))
|
||||
</details>
|
||||
|
||||
## v0.2.8 (2023-02-19)
|
||||
@@ -504,8 +387,8 @@ Alignment release
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **Uncategorized**
|
||||
- Release dagger-sdk v0.2.8, dagger-codegen v0.2.5 ([`0499024`](https://github.com/kjuulh/dagger-sdk/commit/04990247ba8e9d0555847f582fef14849dbedebf))
|
||||
- add documentation strings ([`978ede6`](https://github.com/kjuulh/dagger-sdk/commit/978ede68ae52f5b5150a2aa45b8d6e1fbbbee2f4))
|
||||
- Release dagger-sdk v0.2.8, dagger-codegen v0.2.5 ([`0499024`](https://github.com/kjuulh/dagger-rs/commit/04990247ba8e9d0555847f582fef14849dbedebf))
|
||||
- add documentation strings ([`978ede6`](https://github.com/kjuulh/dagger-rs/commit/978ede68ae52f5b5150a2aa45b8d6e1fbbbee2f4))
|
||||
</details>
|
||||
|
||||
## v0.2.7 (2023-02-19)
|
||||
@@ -554,9 +437,9 @@ Alignment release
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **Uncategorized**
|
||||
- Release dagger-sdk v0.2.7 ([`a1887af`](https://github.com/kjuulh/dagger-sdk/commit/a1887afc8b51f61491ba7f13c5e7a5b7619623c4))
|
||||
- change to await syntax ([`93f40b3`](https://github.com/kjuulh/dagger-sdk/commit/93f40b356c48f14e910968516bed9487912095c1))
|
||||
- Use async runtime instead of blocking. ([`9be6f43`](https://github.com/kjuulh/dagger-sdk/commit/9be6f435d9ea39f31a8906e55dbd3e8b1e5ec598))
|
||||
- Release dagger-sdk v0.2.7 ([`a1887af`](https://github.com/kjuulh/dagger-rs/commit/a1887afc8b51f61491ba7f13c5e7a5b7619623c4))
|
||||
- change to await syntax ([`93f40b3`](https://github.com/kjuulh/dagger-rs/commit/93f40b356c48f14e910968516bed9487912095c1))
|
||||
- Use async runtime instead of blocking. ([`9be6f43`](https://github.com/kjuulh/dagger-rs/commit/9be6f435d9ea39f31a8906e55dbd3e8b1e5ec598))
|
||||
</details>
|
||||
|
||||
## v0.2.6 (2023-02-19)
|
||||
@@ -580,8 +463,8 @@ Alignment release
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **Uncategorized**
|
||||
- Release dagger-sdk v0.2.6 ([`c312bc5`](https://github.com/kjuulh/dagger-sdk/commit/c312bc57ad3e5380b6a2a927f3bb758aa5344efd))
|
||||
- fix readme ([`04e70ce`](https://github.com/kjuulh/dagger-sdk/commit/04e70ce964b343e28b3dbd0c46d10ccda958ab8c))
|
||||
- Release dagger-sdk v0.2.6 ([`c312bc5`](https://github.com/kjuulh/dagger-rs/commit/c312bc57ad3e5380b6a2a927f3bb758aa5344efd))
|
||||
- fix readme ([`04e70ce`](https://github.com/kjuulh/dagger-rs/commit/04e70ce964b343e28b3dbd0c46d10ccda958ab8c))
|
||||
</details>
|
||||
|
||||
## v0.2.5 (2023-02-19)
|
||||
@@ -642,13 +525,13 @@ Alignment release
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **Uncategorized**
|
||||
- Release dagger-sdk v0.2.5, dagger-codegen v0.2.4 ([`f727318`](https://github.com/kjuulh/dagger-sdk/commit/f72731807d8358fdb3d80432136b7a08bb7b1773))
|
||||
- cargo clippy ([`c627595`](https://github.com/kjuulh/dagger-sdk/commit/c627595fd2695e236924175d137c42f1480ccd6b))
|
||||
- without Some in _opts functions ([`f29ff83`](https://github.com/kjuulh/dagger-sdk/commit/f29ff836cfd72d5e051ca6a71a230ba1e9933091))
|
||||
- with _opts methods ([`9762da8`](https://github.com/kjuulh/dagger-sdk/commit/9762da895a164e30c5dc60e89a83e934ceae47ab))
|
||||
- without phantom data ([`02006d4`](https://github.com/kjuulh/dagger-sdk/commit/02006d40fc2c0383e0412c15c36db9af7eda991f))
|
||||
- move to &str instead of String and introduce builder. ([`94336d0`](https://github.com/kjuulh/dagger-sdk/commit/94336d06378f035464e233b921dc3858070f582d))
|
||||
- dependencies ([`6e2292c`](https://github.com/kjuulh/dagger-sdk/commit/6e2292cf11942fbd26a52fe4e0fc8471e6eb70a3))
|
||||
- Release dagger-sdk v0.2.5, dagger-codegen v0.2.4 ([`f727318`](https://github.com/kjuulh/dagger-rs/commit/f72731807d8358fdb3d80432136b7a08bb7b1773))
|
||||
- cargo clippy ([`c627595`](https://github.com/kjuulh/dagger-rs/commit/c627595fd2695e236924175d137c42f1480ccd6b))
|
||||
- without Some in _opts functions ([`f29ff83`](https://github.com/kjuulh/dagger-rs/commit/f29ff836cfd72d5e051ca6a71a230ba1e9933091))
|
||||
- with _opts methods ([`9762da8`](https://github.com/kjuulh/dagger-rs/commit/9762da895a164e30c5dc60e89a83e934ceae47ab))
|
||||
- without phantom data ([`02006d4`](https://github.com/kjuulh/dagger-rs/commit/02006d40fc2c0383e0412c15c36db9af7eda991f))
|
||||
- move to &str instead of String and introduce builder. ([`94336d0`](https://github.com/kjuulh/dagger-rs/commit/94336d06378f035464e233b921dc3858070f582d))
|
||||
- dependencies ([`6e2292c`](https://github.com/kjuulh/dagger-rs/commit/6e2292cf11942fbd26a52fe4e0fc8471e6eb70a3))
|
||||
</details>
|
||||
|
||||
## v0.2.4 (2023-02-19)
|
||||
@@ -673,8 +556,8 @@ Alignment release
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **Uncategorized**
|
||||
- Release dagger-sdk v0.2.4 ([`cc81124`](https://github.com/kjuulh/dagger-sdk/commit/cc81124f899f44f80c1ee7d1e23a7e02d8cc4b7c))
|
||||
- readme dagger-rs -> dagger-sdk ([`7d04ab1`](https://github.com/kjuulh/dagger-sdk/commit/7d04ab1240e497e7804fed23a378d28c78f50a0a))
|
||||
- Release dagger-sdk v0.2.4 ([`cc81124`](https://github.com/kjuulh/dagger-rs/commit/cc81124f899f44f80c1ee7d1e23a7e02d8cc4b7c))
|
||||
- readme dagger-rs -> dagger-sdk ([`7d04ab1`](https://github.com/kjuulh/dagger-rs/commit/7d04ab1240e497e7804fed23a378d28c78f50a0a))
|
||||
</details>
|
||||
|
||||
## v0.2.3 (2023-02-19)
|
||||
@@ -704,10 +587,10 @@ Alignment release
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **Uncategorized**
|
||||
- Release dagger-sdk v0.2.3, dagger-codegen v0.2.3, dagger-rs v0.2.9 ([`9235030`](https://github.com/kjuulh/dagger-sdk/commit/92350306b3f0da40b4fc6dcaffcd90b891e83f70))
|
||||
- re-export through lib.rs ([`19ed6c2`](https://github.com/kjuulh/dagger-sdk/commit/19ed6c267f779b72430422c463ceed553f6fc618))
|
||||
- with return result instead of unwrap ([`de063ea`](https://github.com/kjuulh/dagger-sdk/commit/de063eae858eb3335d2558a57ee6a88689635200))
|
||||
- remove unnecessary option returns ([`5d66736`](https://github.com/kjuulh/dagger-sdk/commit/5d667369900a47d3a6015cd3814c240bc5c54436))
|
||||
- Release dagger-sdk v0.2.3, dagger-codegen v0.2.3, dagger-rs v0.2.9 ([`9235030`](https://github.com/kjuulh/dagger-rs/commit/92350306b3f0da40b4fc6dcaffcd90b891e83f70))
|
||||
- re-export through lib.rs ([`19ed6c2`](https://github.com/kjuulh/dagger-rs/commit/19ed6c267f779b72430422c463ceed553f6fc618))
|
||||
- with return result instead of unwrap ([`de063ea`](https://github.com/kjuulh/dagger-rs/commit/de063eae858eb3335d2558a57ee6a88689635200))
|
||||
- remove unnecessary option returns ([`5d66736`](https://github.com/kjuulh/dagger-rs/commit/5d667369900a47d3a6015cd3814c240bc5c54436))
|
||||
</details>
|
||||
|
||||
## v0.2.2 (2023-02-19)
|
||||
@@ -735,10 +618,10 @@ Alignment release
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **Uncategorized**
|
||||
- Release dagger-sdk v0.2.2 ([`e921ba1`](https://github.com/kjuulh/dagger-sdk/commit/e921ba13638987ccf5beaa48c4be9be5fd879bd0))
|
||||
- Release dagger-core v0.2.2, dagger-codegen v0.2.2, dagger-rs v0.2.8 ([`1638f15`](https://github.com/kjuulh/dagger-sdk/commit/1638f15fba9d16512e8452f87b908d6dce417cd9))
|
||||
- fixed fmt errors ([`10bc6f3`](https://github.com/kjuulh/dagger-sdk/commit/10bc6f3846b65cc82c2fb343d8cfe921784bef1b))
|
||||
- update to dagger v0.3.12 ([`6e5f407`](https://github.com/kjuulh/dagger-sdk/commit/6e5f4074329ab0462445b31d4153f8497c483438))
|
||||
- Release dagger-sdk v0.2.2 ([`e921ba1`](https://github.com/kjuulh/dagger-rs/commit/e921ba13638987ccf5beaa48c4be9be5fd879bd0))
|
||||
- Release dagger-core v0.2.2, dagger-codegen v0.2.2, dagger-rs v0.2.8 ([`1638f15`](https://github.com/kjuulh/dagger-rs/commit/1638f15fba9d16512e8452f87b908d6dce417cd9))
|
||||
- fixed fmt errors ([`10bc6f3`](https://github.com/kjuulh/dagger-rs/commit/10bc6f3846b65cc82c2fb343d8cfe921784bef1b))
|
||||
- update to dagger v0.3.12 ([`6e5f407`](https://github.com/kjuulh/dagger-rs/commit/6e5f4074329ab0462445b31d4153f8497c483438))
|
||||
</details>
|
||||
|
||||
## v0.2.1 (2023-02-18)
|
||||
@@ -753,7 +636,7 @@ Alignment release
|
||||
|
||||
- 40 commits contributed to the release over the course of 20 calendar days.
|
||||
- 1 commit was understood as [conventional](https://www.conventionalcommits.org).
|
||||
- 2 unique issues were worked on: [#5](https://github.com/kjuulh/dagger-sdk/issues/5), [#6](https://github.com/kjuulh/dagger-sdk/issues/6)
|
||||
- 2 unique issues were worked on: [#5](https://github.com/kjuulh/dagger-rs/issues/5), [#6](https://github.com/kjuulh/dagger-rs/issues/6)
|
||||
|
||||
### Commit Details
|
||||
|
||||
@@ -761,48 +644,48 @@ Alignment release
|
||||
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **[#5](https://github.com/kjuulh/dagger-sdk/issues/5)**
|
||||
- update all dependencies ([`789b0e6`](https://github.com/kjuulh/dagger-sdk/commit/789b0e69c8c53d0e86d9cec89ab5345507aad514))
|
||||
* **[#6](https://github.com/kjuulh/dagger-sdk/issues/6)**
|
||||
- feature/add impl ([`4a4c03f`](https://github.com/kjuulh/dagger-sdk/commit/4a4c03f3c2ee7f6268c65976715e70767b4ea78d))
|
||||
* **[#5](https://github.com/kjuulh/dagger-rs/issues/5)**
|
||||
- update all dependencies ([`789b0e6`](https://github.com/kjuulh/dagger-rs/commit/789b0e69c8c53d0e86d9cec89ab5345507aad514))
|
||||
* **[#6](https://github.com/kjuulh/dagger-rs/issues/6)**
|
||||
- feature/add impl ([`4a4c03f`](https://github.com/kjuulh/dagger-rs/commit/4a4c03f3c2ee7f6268c65976715e70767b4ea78d))
|
||||
* **Uncategorized**
|
||||
- Release dagger-sdk v0.2.1 ([`aa0c397`](https://github.com/kjuulh/dagger-sdk/commit/aa0c397b15566840eb59ca6186c083f631cc460b))
|
||||
- add dagger-sdk changelog ([`11a5247`](https://github.com/kjuulh/dagger-sdk/commit/11a5247933736bc6a4c5300c29599c88597fefb7))
|
||||
- Release dagger-rs v0.2.7, dagger-sdk v0.2.1 ([`20c7118`](https://github.com/kjuulh/dagger-sdk/commit/20c71189f6d5d978286ee16f8e958c6045756d80))
|
||||
- Adjusting changelogs prior to release of dagger-core v0.2.1, dagger-codegen v0.2.1, dagger-rs v0.2.1 ([`f4a20fd`](https://github.com/kjuulh/dagger-sdk/commit/f4a20fda79063b29829cc899793775ba8cb17214))
|
||||
- with actual versions ([`7153c24`](https://github.com/kjuulh/dagger-sdk/commit/7153c24f0105a05f170efd10ef2535d83ce0c87e))
|
||||
- with publish ([`989d5bc`](https://github.com/kjuulh/dagger-sdk/commit/989d5bc26036d46a199d939b5cbbe72aff2f8fb1))
|
||||
- with repo ([`e5383b5`](https://github.com/kjuulh/dagger-sdk/commit/e5383b51f3b290a87b729929c377e93bda3873e0))
|
||||
- with wildcard version ([`533b9df`](https://github.com/kjuulh/dagger-sdk/commit/533b9dfef0165c514127a8437d08daf52adf5739))
|
||||
- cargo version 0.2.0 ([`bec62de`](https://github.com/kjuulh/dagger-sdk/commit/bec62de62ff5638428174e232a36eee3ddd0f5ef))
|
||||
- bump version ([`36b0ecd`](https://github.com/kjuulh/dagger-sdk/commit/36b0ecdabf4c220cffb2d0660fb6480387e3249a))
|
||||
- document usage ([`578c2a6`](https://github.com/kjuulh/dagger-sdk/commit/578c2a68830eb40da888823a8770af4a764ed4c7))
|
||||
- fix all clippy ([`6be8482`](https://github.com/kjuulh/dagger-sdk/commit/6be8482b461e098384bbf1371ed7d67b259197fa))
|
||||
- add with dockerfile ([`0cbd179`](https://github.com/kjuulh/dagger-sdk/commit/0cbd1790b0b4030c68f0a0dd619325da26f14f60))
|
||||
- with caching ([`728840c`](https://github.com/kjuulh/dagger-sdk/commit/728840ca8e48b8bec66da4e5fa677bfa60d1d147))
|
||||
- add more quickstart ([`59e2572`](https://github.com/kjuulh/dagger-sdk/commit/59e2572173872c8091a0613a387a01e0cccc51bf))
|
||||
- build the application ([`d894def`](https://github.com/kjuulh/dagger-sdk/commit/d894def70c85ff2fc567bf614e3be6f4134965e2))
|
||||
- add test-the-application ([`cb9a4dd`](https://github.com/kjuulh/dagger-sdk/commit/cb9a4dd84fc13ef03ca3ad539646e95c3c047676))
|
||||
- with println ([`d1726a0`](https://github.com/kjuulh/dagger-sdk/commit/d1726a052a6dc4e57f364864446cab3cbda7e0bf))
|
||||
- unpack response ([`3b5b59b`](https://github.com/kjuulh/dagger-sdk/commit/3b5b59ba1c20cc68218dc5c0af18ff7a78f6953d))
|
||||
- tested full flow initially ([`7a008be`](https://github.com/kjuulh/dagger-sdk/commit/7a008be59e5ca183809e5840cdfae1d87665aa20))
|
||||
- move code to dagger-core ([`ec0d0b2`](https://github.com/kjuulh/dagger-sdk/commit/ec0d0b22e646c97acb3ce93f3afb3ddb8590e68f))
|
||||
- with selection impl default ([`9f0021b`](https://github.com/kjuulh/dagger-sdk/commit/9f0021b7086046c80b3f455f205149e03eb72da2))
|
||||
- fix warnings ([`2b49f9c`](https://github.com/kjuulh/dagger-sdk/commit/2b49f9c19098d96df2bb735253710774b0831c94))
|
||||
- fix test ([`03366b7`](https://github.com/kjuulh/dagger-sdk/commit/03366b7c5b3cce5ec42b5c7655843170236c56a1))
|
||||
- test marshaller ([`c5dfceb`](https://github.com/kjuulh/dagger-sdk/commit/c5dfcebaad9c255b10ba8c6e4d4dba00821c8941))
|
||||
- test marshaller ([`c4ec6f0`](https://github.com/kjuulh/dagger-sdk/commit/c4ec6f0c976ce0af2e05e818731b5e2bed7f0522))
|
||||
- implement sort by name and type ([`d9b51c1`](https://github.com/kjuulh/dagger-sdk/commit/d9b51c1ac90c00fb3af24332b6140e1201bc9be7))
|
||||
- fix optional types for real ([`26069a8`](https://github.com/kjuulh/dagger-sdk/commit/26069a82a69ec7265216c8ddaceb37228dd0fb81))
|
||||
- fix description ([`f4581ba`](https://github.com/kjuulh/dagger-sdk/commit/f4581ba4cd1693a906eaf6c58054398ceae3bfac))
|
||||
- with proper optional types ([`f4a812a`](https://github.com/kjuulh/dagger-sdk/commit/f4a812a7d24e9e09cb4e3cbde56ee0b3ac774b62))
|
||||
- set proper option type ([`8549cfc`](https://github.com/kjuulh/dagger-sdk/commit/8549cfc3a7d9f831febaeadc22db36604e465ea8))
|
||||
- add fields ([`496a687`](https://github.com/kjuulh/dagger-sdk/commit/496a687bc34f7c58cc86df60c183be741b0b8a9c))
|
||||
- add input_fields ([`d2cddff`](https://github.com/kjuulh/dagger-sdk/commit/d2cddff365c636feceb3f20a73df812fcab11a19))
|
||||
- with objects ([`5fef514`](https://github.com/kjuulh/dagger-sdk/commit/5fef5148010f384d0158361d64b8e17d357d4819))
|
||||
- with enum ([`2a1f7c3`](https://github.com/kjuulh/dagger-sdk/commit/2a1f7c3f2666f1f4caebf7c22707709741c2cfad))
|
||||
- with codegen output ([`0bf6b0e`](https://github.com/kjuulh/dagger-sdk/commit/0bf6b0e91ecc31c1f6b51338234137eb185810a0))
|
||||
- split out codegen parts ([`3263f1d`](https://github.com/kjuulh/dagger-sdk/commit/3263f1d589aee78065401c666533cb0cbadd06ce))
|
||||
- add dagger-sdk ([`9dccb83`](https://github.com/kjuulh/dagger-sdk/commit/9dccb83d94a720dd58deffe9f3e5aaea784336f3))
|
||||
- Release dagger-sdk v0.2.1 ([`aa0c397`](https://github.com/kjuulh/dagger-rs/commit/aa0c397b15566840eb59ca6186c083f631cc460b))
|
||||
- add dagger-sdk changelog ([`11a5247`](https://github.com/kjuulh/dagger-rs/commit/11a5247933736bc6a4c5300c29599c88597fefb7))
|
||||
- Release dagger-rs v0.2.7, dagger-sdk v0.2.1 ([`20c7118`](https://github.com/kjuulh/dagger-rs/commit/20c71189f6d5d978286ee16f8e958c6045756d80))
|
||||
- Adjusting changelogs prior to release of dagger-core v0.2.1, dagger-codegen v0.2.1, dagger-rs v0.2.1 ([`f4a20fd`](https://github.com/kjuulh/dagger-rs/commit/f4a20fda79063b29829cc899793775ba8cb17214))
|
||||
- with actual versions ([`7153c24`](https://github.com/kjuulh/dagger-rs/commit/7153c24f0105a05f170efd10ef2535d83ce0c87e))
|
||||
- with publish ([`989d5bc`](https://github.com/kjuulh/dagger-rs/commit/989d5bc26036d46a199d939b5cbbe72aff2f8fb1))
|
||||
- with repo ([`e5383b5`](https://github.com/kjuulh/dagger-rs/commit/e5383b51f3b290a87b729929c377e93bda3873e0))
|
||||
- with wildcard version ([`533b9df`](https://github.com/kjuulh/dagger-rs/commit/533b9dfef0165c514127a8437d08daf52adf5739))
|
||||
- cargo version 0.2.0 ([`bec62de`](https://github.com/kjuulh/dagger-rs/commit/bec62de62ff5638428174e232a36eee3ddd0f5ef))
|
||||
- bump version ([`36b0ecd`](https://github.com/kjuulh/dagger-rs/commit/36b0ecdabf4c220cffb2d0660fb6480387e3249a))
|
||||
- document usage ([`578c2a6`](https://github.com/kjuulh/dagger-rs/commit/578c2a68830eb40da888823a8770af4a764ed4c7))
|
||||
- fix all clippy ([`6be8482`](https://github.com/kjuulh/dagger-rs/commit/6be8482b461e098384bbf1371ed7d67b259197fa))
|
||||
- add with dockerfile ([`0cbd179`](https://github.com/kjuulh/dagger-rs/commit/0cbd1790b0b4030c68f0a0dd619325da26f14f60))
|
||||
- with caching ([`728840c`](https://github.com/kjuulh/dagger-rs/commit/728840ca8e48b8bec66da4e5fa677bfa60d1d147))
|
||||
- add more quickstart ([`59e2572`](https://github.com/kjuulh/dagger-rs/commit/59e2572173872c8091a0613a387a01e0cccc51bf))
|
||||
- build the application ([`d894def`](https://github.com/kjuulh/dagger-rs/commit/d894def70c85ff2fc567bf614e3be6f4134965e2))
|
||||
- add test-the-application ([`cb9a4dd`](https://github.com/kjuulh/dagger-rs/commit/cb9a4dd84fc13ef03ca3ad539646e95c3c047676))
|
||||
- with println ([`d1726a0`](https://github.com/kjuulh/dagger-rs/commit/d1726a052a6dc4e57f364864446cab3cbda7e0bf))
|
||||
- unpack response ([`3b5b59b`](https://github.com/kjuulh/dagger-rs/commit/3b5b59ba1c20cc68218dc5c0af18ff7a78f6953d))
|
||||
- tested full flow initially ([`7a008be`](https://github.com/kjuulh/dagger-rs/commit/7a008be59e5ca183809e5840cdfae1d87665aa20))
|
||||
- move code to dagger-core ([`ec0d0b2`](https://github.com/kjuulh/dagger-rs/commit/ec0d0b22e646c97acb3ce93f3afb3ddb8590e68f))
|
||||
- with selection impl default ([`9f0021b`](https://github.com/kjuulh/dagger-rs/commit/9f0021b7086046c80b3f455f205149e03eb72da2))
|
||||
- fix warnings ([`2b49f9c`](https://github.com/kjuulh/dagger-rs/commit/2b49f9c19098d96df2bb735253710774b0831c94))
|
||||
- fix test ([`03366b7`](https://github.com/kjuulh/dagger-rs/commit/03366b7c5b3cce5ec42b5c7655843170236c56a1))
|
||||
- test marshaller ([`c5dfceb`](https://github.com/kjuulh/dagger-rs/commit/c5dfcebaad9c255b10ba8c6e4d4dba00821c8941))
|
||||
- test marshaller ([`c4ec6f0`](https://github.com/kjuulh/dagger-rs/commit/c4ec6f0c976ce0af2e05e818731b5e2bed7f0522))
|
||||
- implement sort by name and type ([`d9b51c1`](https://github.com/kjuulh/dagger-rs/commit/d9b51c1ac90c00fb3af24332b6140e1201bc9be7))
|
||||
- fix optional types for real ([`26069a8`](https://github.com/kjuulh/dagger-rs/commit/26069a82a69ec7265216c8ddaceb37228dd0fb81))
|
||||
- fix description ([`f4581ba`](https://github.com/kjuulh/dagger-rs/commit/f4581ba4cd1693a906eaf6c58054398ceae3bfac))
|
||||
- with proper optional types ([`f4a812a`](https://github.com/kjuulh/dagger-rs/commit/f4a812a7d24e9e09cb4e3cbde56ee0b3ac774b62))
|
||||
- set proper option type ([`8549cfc`](https://github.com/kjuulh/dagger-rs/commit/8549cfc3a7d9f831febaeadc22db36604e465ea8))
|
||||
- add fields ([`496a687`](https://github.com/kjuulh/dagger-rs/commit/496a687bc34f7c58cc86df60c183be741b0b8a9c))
|
||||
- add input_fields ([`d2cddff`](https://github.com/kjuulh/dagger-rs/commit/d2cddff365c636feceb3f20a73df812fcab11a19))
|
||||
- with objects ([`5fef514`](https://github.com/kjuulh/dagger-rs/commit/5fef5148010f384d0158361d64b8e17d357d4819))
|
||||
- with enum ([`2a1f7c3`](https://github.com/kjuulh/dagger-rs/commit/2a1f7c3f2666f1f4caebf7c22707709741c2cfad))
|
||||
- with codegen output ([`0bf6b0e`](https://github.com/kjuulh/dagger-rs/commit/0bf6b0e91ecc31c1f6b51338234137eb185810a0))
|
||||
- split out codegen parts ([`3263f1d`](https://github.com/kjuulh/dagger-rs/commit/3263f1d589aee78065401c666533cb0cbadd06ce))
|
||||
- add dagger-sdk ([`9dccb83`](https://github.com/kjuulh/dagger-rs/commit/9dccb83d94a720dd58deffe9f3e5aaea784336f3))
|
||||
</details>
|
||||
|
||||
|
@@ -1,17 +1,17 @@
|
||||
[package]
|
||||
name = "dagger-sdk"
|
||||
version = "0.2.22"
|
||||
version = "0.2.19"
|
||||
edition = "2021"
|
||||
readme = "README.md"
|
||||
license-file = "LICENSE.MIT"
|
||||
description = "A dagger sdk for rust, written in rust"
|
||||
repository = "https://github.com/kjuulh/dagger-sdk"
|
||||
repository = "https://github.com/kjuulh/dagger-rs"
|
||||
publish = true
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
dagger-core = { workspace = true, version = "^0.2.11" }
|
||||
dagger-core = { workspace = true }
|
||||
|
||||
eyre = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
@@ -20,7 +20,9 @@ serde_json = { workspace = true }
|
||||
tracing.workspace = true
|
||||
tracing-subscriber.workspace = true
|
||||
|
||||
futures = "0.3.28"
|
||||
base64 = "0.21.0"
|
||||
futures = "0.3.27"
|
||||
gql_client = "1.0.7"
|
||||
derive_builder = "0.12.0"
|
||||
|
||||
[dev-dependencies]
|
||||
|
@@ -7,7 +7,7 @@ async fn main() -> eyre::Result<()> {
|
||||
let host_source_dir = client.host().directory_opts(
|
||||
"./examples/caching/app",
|
||||
dagger_sdk::HostDirectoryOptsBuilder::default()
|
||||
.exclude(vec!["node_modules/", "ci/"])
|
||||
.exclude(vec!["node_modules", "ci/"])
|
||||
.build()?,
|
||||
);
|
||||
|
||||
@@ -35,7 +35,7 @@ async fn main() -> eyre::Result<()> {
|
||||
.container()
|
||||
.from("nginx")
|
||||
.with_directory("/usr/share/nginx/html", build_dir.id().await?)
|
||||
.publish(format!("ttl.sh/hello-dagger-sdk-{}:1h", rng.gen::<u64>()))
|
||||
.publish(format!("ttl.sh/hello-dagger-rs-{}:1h", rng.gen::<u64>()))
|
||||
.await?;
|
||||
|
||||
println!("published image to: {}", ref_);
|
||||
|
@@ -13,7 +13,7 @@ async fn main() -> eyre::Result<()> {
|
||||
let ref_ = client
|
||||
.container()
|
||||
.build(context_dir.id().await?)
|
||||
.publish(format!("ttl.sh/hello-dagger-sdk-{}:1h", rng.gen::<u64>()))
|
||||
.publish(format!("ttl.sh/hello-dagger-rs-{}:1h", rng.gen::<u64>()))
|
||||
.await?;
|
||||
|
||||
println!("published image to: {}", ref_);
|
||||
|
@@ -34,7 +34,7 @@ async fn main() -> eyre::Result<()> {
|
||||
.container()
|
||||
.from("nginx")
|
||||
.with_directory("/usr/share/nginx/html", build_dir.id().await?)
|
||||
.publish(format!("ttl.sh/hello-dagger-sdk-{}:1h", rng.gen::<u64>()))
|
||||
.publish(format!("ttl.sh/hello-dagger-rs-{}:1h", rng.gen::<u64>()))
|
||||
.await?;
|
||||
|
||||
println!("published image to: {}", ref_);
|
||||
|
@@ -39,7 +39,7 @@ async fn main() -> eyre::Result<()> {
|
||||
"/usr/share/nginx/html",
|
||||
client.host().directory(output).id().await?,
|
||||
)
|
||||
.publish(format!("ttl.sh/hello-dagger-sdk-{}:1h", rng.gen::<u64>()))
|
||||
.publish(format!("ttl.sh/hello-dagger-rs-{}:1h", rng.gen::<u64>()))
|
||||
.await?;
|
||||
|
||||
println!("published image to: {}", ref_);
|
||||
|
@@ -1,8 +1,12 @@
|
||||
use std::collections::HashMap;
|
||||
use std::sync::Arc;
|
||||
|
||||
use dagger_core::graphql_client::DefaultGraphQLClient;
|
||||
use base64::engine::general_purpose;
|
||||
use base64::Engine;
|
||||
use gql_client::ClientConfig;
|
||||
|
||||
use dagger_core::config::Config;
|
||||
use dagger_core::connect_params::ConnectParams;
|
||||
use dagger_core::engine::Engine as DaggerEngine;
|
||||
|
||||
use crate::gen::Query;
|
||||
@@ -21,12 +25,26 @@ pub async fn connect_opts(cfg: Config) -> eyre::Result<DaggerConn> {
|
||||
let (conn, proc) = DaggerEngine::new().start(&cfg).await?;
|
||||
|
||||
Ok(Arc::new(Query {
|
||||
proc: proc.map(|p| Arc::new(p)),
|
||||
conn,
|
||||
proc: Arc::new(proc),
|
||||
selection: query(),
|
||||
graphql_client: Arc::new(DefaultGraphQLClient::new(&conn)),
|
||||
}))
|
||||
}
|
||||
|
||||
pub fn graphql_client(conn: &ConnectParams) -> gql_client::Client {
|
||||
let token = general_purpose::URL_SAFE.encode(format!("{}:", conn.session_token));
|
||||
|
||||
let mut headers = HashMap::new();
|
||||
headers.insert("Authorization".to_string(), format!("Basic {}", token));
|
||||
|
||||
gql_client::Client::new_with_config(ClientConfig {
|
||||
endpoint: conn.url(),
|
||||
timeout: Some(1000),
|
||||
headers: Some(headers),
|
||||
proxy: None,
|
||||
})
|
||||
}
|
||||
|
||||
// Conn will automatically close on drop of proc
|
||||
|
||||
#[cfg(test)]
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,5 @@
|
||||
use std::{collections::HashMap, ops::Add, sync::Arc};
|
||||
|
||||
use dagger_core::graphql_client::DynGraphQLClient;
|
||||
use eyre::Context;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
@@ -117,7 +116,7 @@ impl Selection {
|
||||
Ok(fields.join("{") + &"}".repeat(fields.len() - 1))
|
||||
}
|
||||
|
||||
pub async fn execute<D>(&self, gql_client: DynGraphQLClient) -> eyre::Result<D>
|
||||
pub async fn execute<D>(&self, gql_client: &gql_client::Client) -> eyre::Result<D>
|
||||
where
|
||||
D: for<'de> Deserialize<'de>,
|
||||
{
|
||||
|
Reference in New Issue
Block a user