From 09e4e578ee8e865e2a627858fa999fbe0a188cbe Mon Sep 17 00:00:00 2001 From: Tsiry Sandratraina Date: Fri, 23 Aug 2024 17:06:30 +0000 Subject: [PATCH] fix build issues with rust 1.80 --- .../.fluentci/.devcontainer/devcontainer.json | 25 - .../.fluentci/.devcontainer/devcontainer.json | 25 - .../.fluentci/.github/workflows/ci.yml | 28 - .../.fluentci/.fluentci/CODE_OF_CONDUCT.md | 132 - .fluentci/.fluentci/.fluentci/CONTRIBUTING.md | 70 - .fluentci/.fluentci/.fluentci/LICENSE | 19 - .fluentci/.fluentci/.fluentci/README.md | 88 - .fluentci/.fluentci/.fluentci/ci.ts | 12 - .fluentci/.fluentci/.fluentci/deno.json | 9 - .fluentci/.fluentci/.fluentci/deno.lock | 68 - .../.fluentci/fixtures/.gitlab-ci.yml | 19 - .fluentci/.fluentci/.fluentci/flake.lock | 61 - .fluentci/.fluentci/.fluentci/flake.nix | 26 - .fluentci/.fluentci/.fluentci/import_map.json | 28 - .fluentci/.fluentci/.fluentci/mod.ts | 4 - .../.fluentci/.fluentci/src/dagger/index.ts | 4 - .../.fluentci/.fluentci/src/dagger/jobs.ts | 197 - .../.fluentci/src/dagger/list_jobs.ts | 21 - .../.fluentci/src/dagger/pipeline.ts | 27 - .../.fluentci/.fluentci/src/dagger/runner.ts | 3 - .../.fluentci/.fluentci/src/github/config.ts | 52 - .../.fluentci/.fluentci/src/github/init.ts | 3 - .../.fluentci/.fluentci/src/gitlab/index.ts | 4 - .../.fluentci/.fluentci/src/gitlab/jobs.ts | 9 - .../.fluentci/src/gitlab/pipeline.ts | 10 - .../.fluentci/src/gitlab/pipeline_test.ts | 8 - .fluentci/.fluentci/.github/workflows/ci.yml | 28 - .fluentci/.fluentci/.gitignore | 2 - .fluentci/.fluentci/CODE_OF_CONDUCT.md | 132 - .fluentci/.fluentci/CONTRIBUTING.md | 70 - .fluentci/.fluentci/LICENSE | 19 - .fluentci/.fluentci/README.md | 69 - .fluentci/.fluentci/ci.ts | 12 - .fluentci/.fluentci/deno.json | 9 - .fluentci/.fluentci/deno.lock | 68 - .../.fluentci/.devcontainer/devcontainer.json | 25 - .../.fluentci/.devcontainer/devcontainer.json | 25 - .../.fluentci/.github/workflows/ci.yml | 28 - .../.fluentci/.fluentci/CODE_OF_CONDUCT.md | 132 - .../.fluentci/.fluentci/CONTRIBUTING.md | 70 - .../example/.fluentci/.fluentci/LICENSE | 19 - .../example/.fluentci/.fluentci/README.md | 88 - .../example/.fluentci/.fluentci/ci.ts | 12 - .../example/.fluentci/.fluentci/deno.json | 9 - .../example/.fluentci/.fluentci/deno.lock | 66 - .../.fluentci/fixtures/.gitlab-ci.yml | 19 - .../example/.fluentci/.fluentci/flake.lock | 61 - .../example/.fluentci/.fluentci/flake.nix | 26 - .../.fluentci/.fluentci/import_map.json | 27 - .../example/.fluentci/.fluentci/mod.ts | 4 - .../.fluentci/.fluentci/src/dagger/index.ts | 4 - .../.fluentci/.fluentci/src/dagger/jobs.ts | 111 - .../.fluentci/src/dagger/list_jobs.ts | 21 - .../.fluentci/src/dagger/pipeline.ts | 27 - .../.fluentci/.fluentci/src/dagger/runner.ts | 3 - .../.fluentci/.fluentci/src/gitlab/index.ts | 4 - .../.fluentci/.fluentci/src/gitlab/jobs.ts | 9 - .../.fluentci/src/gitlab/pipeline.ts | 10 - .../.fluentci/src/gitlab/pipeline_test.ts | 8 - .../.fluentci/.github/workflows/ci.yml | 28 - .../example/.fluentci/CODE_OF_CONDUCT.md | 132 - .../example/.fluentci/CONTRIBUTING.md | 70 - .fluentci/.fluentci/example/.fluentci/LICENSE | 19 - .../.fluentci/example/.fluentci/README.md | 58 - .fluentci/.fluentci/example/.fluentci/ci.ts | 12 - .../.fluentci/example/.fluentci/deno.json | 9 - .../.fluentci/example/.fluentci/deno.lock | 67 - .../example/.fluentci/fixtures/.gitlab-ci.yml | 19 - .../.fluentci/example/.fluentci/flake.lock | 61 - .../.fluentci/example/.fluentci/flake.nix | 26 - .../example/.fluentci/import_map.json | 27 - .fluentci/.fluentci/example/.fluentci/mod.ts | 4 - .../example/.fluentci/src/dagger/index.ts | 4 - .../example/.fluentci/src/dagger/jobs.ts | 188 - .../example/.fluentci/src/dagger/list_jobs.ts | 21 - .../example/.fluentci/src/dagger/pipeline.ts | 27 - .../example/.fluentci/src/dagger/runner.ts | 3 - .../example/.fluentci/src/gitlab/index.ts | 4 - .../example/.fluentci/src/gitlab/jobs.ts | 9 - .../example/.fluentci/src/gitlab/pipeline.ts | 10 - .../.fluentci/src/gitlab/pipeline_test.ts | 8 - .fluentci/.fluentci/example/README.md | 16 - .fluentci/.fluentci/example/main.tsx | 20 - .fluentci/.fluentci/fixtures/.gitlab-ci.yml | 19 - .fluentci/.fluentci/flake.lock | 61 - .fluentci/.fluentci/flake.nix | 26 - .fluentci/.fluentci/import_map.json | 28 - .fluentci/.fluentci/mod.ts | 4 - .fluentci/.fluentci/src/dagger/index.ts | 4 - .fluentci/.fluentci/src/dagger/jobs.ts | 197 - .fluentci/.fluentci/src/dagger/list_jobs.ts | 21 - .fluentci/.fluentci/src/dagger/pipeline.ts | 27 - .fluentci/.fluentci/src/dagger/runner.ts | 3 - .fluentci/.fluentci/src/github/config.ts | 52 - .fluentci/.fluentci/src/github/init.ts | 3 - .fluentci/.fluentci/src/gitlab/index.ts | 4 - .fluentci/.fluentci/src/gitlab/jobs.ts | 9 - .fluentci/.fluentci/src/gitlab/pipeline.ts | 10 - .../.fluentci/src/gitlab/pipeline_test.ts | 8 - .fluentci/.github/workflows/ci.yml | 28 - .fluentci/.github/workflows/example.yml | 25 - .fluentci/.github/workflows/zenith.yml | 23 - .fluentci/deno.lock | 422 +- .fluentci/deps.ts | 66 +- .../.fluentci/.devcontainer/devcontainer.json | 25 - .../.fluentci/.devcontainer/devcontainer.json | 25 - .../.fluentci/.devcontainer/devcontainer.json | 25 - .../.fluentci/.github/workflows/ci.yml | 28 - .../.fluentci/.fluentci/CODE_OF_CONDUCT.md | 132 - .../.fluentci/.fluentci/CONTRIBUTING.md | 70 - .../.fluentci/.fluentci/.fluentci/LICENSE | 19 - .../.fluentci/.fluentci/.fluentci/README.md | 88 - .../.fluentci/.fluentci/.fluentci/ci.ts | 12 - .../.fluentci/.fluentci/.fluentci/deno.json | 9 - .../.fluentci/.fluentci/.fluentci/deno.lock | 68 - .../.fluentci/fixtures/.gitlab-ci.yml | 19 - .../.fluentci/.fluentci/.fluentci/flake.lock | 61 - .../.fluentci/.fluentci/.fluentci/flake.nix | 26 - .../.fluentci/.fluentci/import_map.json | 28 - .../.fluentci/.fluentci/.fluentci/mod.ts | 4 - .../.fluentci/.fluentci/src/dagger/index.ts | 4 - .../.fluentci/.fluentci/src/dagger/jobs.ts | 197 - .../.fluentci/src/dagger/list_jobs.ts | 21 - .../.fluentci/src/dagger/pipeline.ts | 27 - .../.fluentci/.fluentci/src/dagger/runner.ts | 3 - .../.fluentci/.fluentci/src/github/config.ts | 52 - .../.fluentci/.fluentci/src/github/init.ts | 3 - .../.fluentci/.fluentci/src/gitlab/index.ts | 4 - .../.fluentci/.fluentci/src/gitlab/jobs.ts | 9 - .../.fluentci/src/gitlab/pipeline.ts | 10 - .../.fluentci/src/gitlab/pipeline_test.ts | 8 - .../.fluentci/.github/workflows/ci.yml | 28 - .../example/.fluentci/.fluentci/.gitignore | 2 - .../.fluentci/.fluentci/CODE_OF_CONDUCT.md | 132 - .../.fluentci/.fluentci/CONTRIBUTING.md | 70 - .fluentci/example/.fluentci/.fluentci/LICENSE | 19 - .../example/.fluentci/.fluentci/README.md | 69 - .fluentci/example/.fluentci/.fluentci/ci.ts | 12 - .../example/.fluentci/.fluentci/deno.json | 9 - .../example/.fluentci/.fluentci/deno.lock | 68 - .../.fluentci/.devcontainer/devcontainer.json | 25 - .../.fluentci/.devcontainer/devcontainer.json | 25 - .../.fluentci/.github/workflows/ci.yml | 28 - .../.fluentci/.fluentci/CODE_OF_CONDUCT.md | 132 - .../.fluentci/.fluentci/CONTRIBUTING.md | 70 - .../example/.fluentci/.fluentci/LICENSE | 19 - .../example/.fluentci/.fluentci/README.md | 88 - .../example/.fluentci/.fluentci/ci.ts | 12 - .../example/.fluentci/.fluentci/deno.json | 9 - .../example/.fluentci/.fluentci/deno.lock | 66 - .../.fluentci/fixtures/.gitlab-ci.yml | 19 - .../example/.fluentci/.fluentci/flake.lock | 61 - .../example/.fluentci/.fluentci/flake.nix | 26 - .../.fluentci/.fluentci/import_map.json | 27 - .../example/.fluentci/.fluentci/mod.ts | 4 - .../.fluentci/.fluentci/src/dagger/index.ts | 4 - .../.fluentci/.fluentci/src/dagger/jobs.ts | 111 - .../.fluentci/src/dagger/list_jobs.ts | 21 - .../.fluentci/src/dagger/pipeline.ts | 27 - .../.fluentci/.fluentci/src/dagger/runner.ts | 3 - .../.fluentci/.fluentci/src/gitlab/index.ts | 4 - .../.fluentci/.fluentci/src/gitlab/jobs.ts | 9 - .../.fluentci/src/gitlab/pipeline.ts | 10 - .../.fluentci/src/gitlab/pipeline_test.ts | 8 - .../.fluentci/.github/workflows/ci.yml | 28 - .../example/.fluentci/CODE_OF_CONDUCT.md | 132 - .../example/.fluentci/CONTRIBUTING.md | 70 - .../.fluentci/example/.fluentci/LICENSE | 19 - .../.fluentci/example/.fluentci/README.md | 58 - .../.fluentci/example/.fluentci/ci.ts | 12 - .../.fluentci/example/.fluentci/deno.json | 9 - .../.fluentci/example/.fluentci/deno.lock | 67 - .../example/.fluentci/fixtures/.gitlab-ci.yml | 19 - .../.fluentci/example/.fluentci/flake.lock | 61 - .../.fluentci/example/.fluentci/flake.nix | 26 - .../example/.fluentci/import_map.json | 27 - .../.fluentci/example/.fluentci/mod.ts | 4 - .../example/.fluentci/src/dagger/index.ts | 4 - .../example/.fluentci/src/dagger/jobs.ts | 188 - .../example/.fluentci/src/dagger/list_jobs.ts | 21 - .../example/.fluentci/src/dagger/pipeline.ts | 27 - .../example/.fluentci/src/dagger/runner.ts | 3 - .../example/.fluentci/src/gitlab/index.ts | 4 - .../example/.fluentci/src/gitlab/jobs.ts | 9 - .../example/.fluentci/src/gitlab/pipeline.ts | 10 - .../.fluentci/src/gitlab/pipeline_test.ts | 8 - .../.fluentci/.fluentci/example/README.md | 16 - .../.fluentci/.fluentci/example/main.tsx | 20 - .../.fluentci/fixtures/.gitlab-ci.yml | 19 - .../example/.fluentci/.fluentci/flake.lock | 61 - .../example/.fluentci/.fluentci/flake.nix | 26 - .../.fluentci/.fluentci/import_map.json | 28 - .fluentci/example/.fluentci/.fluentci/mod.ts | 4 - .../.fluentci/.fluentci/src/dagger/index.ts | 4 - .../.fluentci/.fluentci/src/dagger/jobs.ts | 197 - .../.fluentci/src/dagger/list_jobs.ts | 21 - .../.fluentci/src/dagger/pipeline.ts | 27 - .../.fluentci/.fluentci/src/dagger/runner.ts | 3 - .../.fluentci/.fluentci/src/github/config.ts | 52 - .../.fluentci/.fluentci/src/github/init.ts | 3 - .../.fluentci/.fluentci/src/gitlab/index.ts | 4 - .../.fluentci/.fluentci/src/gitlab/jobs.ts | 9 - .../.fluentci/src/gitlab/pipeline.ts | 10 - .../.fluentci/src/gitlab/pipeline_test.ts | 8 - .../.fluentci/.github/workflows/ci.yml | 28 - .../.fluentci/.github/workflows/example.yml | 25 - .../.fluentci/.github/workflows/zenith.yml | 23 - .../example/.fluentci/CODE_OF_CONDUCT.md | 132 - .fluentci/example/.fluentci/CONTRIBUTING.md | 70 - .fluentci/example/.fluentci/LICENSE | 19 - .fluentci/example/.fluentci/README.md | 61 - .fluentci/example/.fluentci/ci.ts | 14 - .fluentci/example/.fluentci/dagger.json | 5 - .fluentci/example/.fluentci/deno.json | 31 - .fluentci/example/.fluentci/deno.lock | 264 - .fluentci/example/.fluentci/deps.ts | 34 - .../example/.github/workflows/tests.yml | 24 - .../example/.fluentci/example/.gitignore | 1 - .../example/.fluentci/example/Cargo.lock | 7 - .../example/.fluentci/example/Cargo.toml | 8 - .fluentci/example/.fluentci/example/build.gql | 5 - .../example/.fluentci/example/src/lib.rs | 14 - .fluentci/example/.fluentci/example/test.gql | 5 - .../example/.fluentci/fixtures/.gitlab-ci.yml | 28 - .../.fluentci/fixtures/azure-pipelines.yml | 22 - .../example/.fluentci/fixtures/buildspec.yml | 19 - .../example/.fluentci/fixtures/config.yml | 26 - .../example/.fluentci/fixtures/workflow.yml | 24 - .fluentci/example/.fluentci/gen/nexus.ts | 139 - .fluentci/example/.fluentci/import_map.json | 34 - .fluentci/example/.fluentci/mod.ts | 3 - .fluentci/example/.fluentci/schema.graphql | 8 - .fluentci/example/.fluentci/src/aws/README.md | 39 - .fluentci/example/.fluentci/src/aws/config.ts | 24 - .../example/.fluentci/src/aws/config_test.ts | 9 - .fluentci/example/.fluentci/src/aws/init.ts | 3 - .../example/.fluentci/src/azure/README.md | 42 - .../example/.fluentci/src/azure/config.ts | 41 - .../.fluentci/src/azure/config_test.ts | 9 - .fluentci/example/.fluentci/src/azure/init.ts | 3 - .../example/.fluentci/src/circleci/README.md | 47 - .../example/.fluentci/src/circleci/config.ts | 37 - .../.fluentci/src/circleci/config_test.ts | 9 - .../example/.fluentci/src/circleci/init.ts | 3 - .../example/.fluentci/src/dagger/index.ts | 4 - .../example/.fluentci/src/dagger/jobs.ts | 67 - .../example/.fluentci/src/dagger/list_jobs.ts | 20 - .../example/.fluentci/src/dagger/queries.ts | 13 - .../example/.fluentci/src/dagger/schema.ts | 36 - .../example/.fluentci/src/github/README.md | 50 - .../example/.fluentci/src/github/config.ts | 45 - .../.fluentci/src/github/config_test.ts | 9 - .../example/.fluentci/src/github/init.ts | 3 - .../example/.fluentci/src/gitlab/README.md | 48 - .../example/.fluentci/src/gitlab/config.ts | 34 - .../.fluentci/src/gitlab/config_test.ts | 9 - .../example/.fluentci/src/gitlab/init.ts | 3 - .fluentci/example/.github/workflows/tests.yml | 24 - .fluentci/example/.gitignore | 1 - .fluentci/example/Cargo.lock | 7 - .fluentci/example/Cargo.toml | 8 - .fluentci/example/build.gql | 5 - .fluentci/example/dagger.json | 5 - .fluentci/example/src/lib.rs | 14 - .fluentci/example/test.gql | 5 - .fluentci/fixtures/.gitlab-ci.yml | 28 - .fluentci/fixtures/azure-pipelines.yml | 22 - .fluentci/fixtures/buildspec.yml | 19 - .fluentci/fixtures/config.yml | 26 - .fluentci/fixtures/workflow.yml | 24 - .fluentci/gen/nexus.ts | 139 - .fluentci/mod.ts | 4 +- .fluentci/schema.graphql | 8 - .fluentci/sdk/builder.ts | 31 + .fluentci/sdk/client.gen.ts | 8231 +++++++++++++++++ .fluentci/sdk/client.ts | 9 + .fluentci/sdk/common/errors/DaggerSDKError.ts | 46 + .../errors/DockerImageRefValidationError.ts | 28 + .../EngineSessionConnectParamsParseError.ts | 31 + .../EngineSessionConnectionTimeoutError.ts | 31 + .../errors/EngineSessionErrorOptions.ts | 20 + .fluentci/sdk/common/errors/ExecError.ts | 54 + .../sdk/common/errors/GraphQLRequestError.ts | 36 + .../errors/InitEngineSessionBinaryError.ts | 17 + .../common/errors/NotAwaitedRequestError.ts | 17 + .../errors/TooManyNestedObjectsError.ts | 27 + .../sdk/common/errors/UnknownDaggerError.ts | 17 + .fluentci/sdk/common/errors/errors-codes.ts | 63 + .fluentci/sdk/common/errors/index.ts | 12 + .fluentci/sdk/common/errors/types.ts | 16 + .fluentci/sdk/common/utils.ts | 4 + .fluentci/sdk/connect.ts | 53 + .fluentci/sdk/context.ts | 53 + .fluentci/sdk/nix/example.ts | 17 + .fluentci/sdk/nix/example_with_devbox.ts | 19 + .fluentci/sdk/nix/example_with_devbox_pkg.ts | 21 + .fluentci/sdk/nix/example_with_devenv.ts | 17 + .fluentci/sdk/nix/example_with_flox.ts | 17 + .fluentci/sdk/nix/index.ts | 17 + .fluentci/sdk/nix/steps.ts | 103 + .fluentci/sdk/utils.ts | 244 + .fluentci/src/aws/README.md | 39 - .fluentci/src/aws/config.ts | 24 - .fluentci/src/aws/config_test.ts | 9 - .fluentci/src/aws/init.ts | 3 - .fluentci/src/azure/README.md | 42 - .fluentci/src/azure/config.ts | 41 - .fluentci/src/azure/config_test.ts | 9 - .fluentci/src/azure/init.ts | 3 - .fluentci/src/circleci/README.md | 47 - .fluentci/src/circleci/config.ts | 37 - .fluentci/src/circleci/config_test.ts | 9 - .fluentci/src/circleci/init.ts | 3 - .fluentci/src/dagger/index.ts | 4 - .fluentci/src/dagger/jobs.ts | 190 - .fluentci/src/dagger/list_jobs.ts | 20 - .fluentci/src/dagger/pipeline.ts | 29 - .fluentci/src/dagger/queries.ts | 13 - .fluentci/src/dagger/runner.ts | 3 - .fluentci/src/dagger/schema.ts | 36 - .fluentci/src/github/README.md | 50 - .fluentci/src/github/config.ts | 45 - .fluentci/src/github/config_test.ts | 9 - .fluentci/src/github/init.ts | 3 - .fluentci/src/gitlab/README.md | 48 - .fluentci/src/gitlab/config.ts | 34 - .fluentci/src/gitlab/config_test.ts | 9 - .fluentci/src/gitlab/init.ts | 3 - .fluentci/src/jobs.ts | 172 + .fluentci/src/mod.ts | 3 + .../.fluentci/src/dagger => src}/pipeline.ts | 7 +- .../.fluentci/src/dagger => src}/runner.ts | 0 .github/workflows/chromatic.yml | 2 +- .github/workflows/ci.yml | 2 +- .github/workflows/release-for-arm.yml | 2 +- .github/workflows/release-for-mac.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/rust-clippy.yml | 2 +- Cargo.lock | 429 +- Cargo.toml | 70 +- webui/Cargo.toml | 38 +- webui/musicplayer/src-tauri/Cargo.toml | 24 +- 342 files changed, 10026 insertions(+), 10324 deletions(-) delete mode 100644 .fluentci/.fluentci/.devcontainer/devcontainer.json delete mode 100644 .fluentci/.fluentci/.fluentci/.devcontainer/devcontainer.json delete mode 100644 .fluentci/.fluentci/.fluentci/.github/workflows/ci.yml delete mode 100644 .fluentci/.fluentci/.fluentci/CODE_OF_CONDUCT.md delete mode 100644 .fluentci/.fluentci/.fluentci/CONTRIBUTING.md delete mode 100644 .fluentci/.fluentci/.fluentci/LICENSE delete mode 100644 .fluentci/.fluentci/.fluentci/README.md delete mode 100644 .fluentci/.fluentci/.fluentci/ci.ts delete mode 100644 .fluentci/.fluentci/.fluentci/deno.json delete mode 100644 .fluentci/.fluentci/.fluentci/deno.lock delete mode 100644 .fluentci/.fluentci/.fluentci/fixtures/.gitlab-ci.yml delete mode 100644 .fluentci/.fluentci/.fluentci/flake.lock delete mode 100644 .fluentci/.fluentci/.fluentci/flake.nix delete mode 100644 .fluentci/.fluentci/.fluentci/import_map.json delete mode 100644 .fluentci/.fluentci/.fluentci/mod.ts delete mode 100644 .fluentci/.fluentci/.fluentci/src/dagger/index.ts delete mode 100644 .fluentci/.fluentci/.fluentci/src/dagger/jobs.ts delete mode 100644 .fluentci/.fluentci/.fluentci/src/dagger/list_jobs.ts delete mode 100644 .fluentci/.fluentci/.fluentci/src/dagger/pipeline.ts delete mode 100644 .fluentci/.fluentci/.fluentci/src/dagger/runner.ts delete mode 100644 .fluentci/.fluentci/.fluentci/src/github/config.ts delete mode 100644 .fluentci/.fluentci/.fluentci/src/github/init.ts delete mode 100644 .fluentci/.fluentci/.fluentci/src/gitlab/index.ts delete mode 100644 .fluentci/.fluentci/.fluentci/src/gitlab/jobs.ts delete mode 100644 .fluentci/.fluentci/.fluentci/src/gitlab/pipeline.ts delete mode 100644 .fluentci/.fluentci/.fluentci/src/gitlab/pipeline_test.ts delete mode 100644 .fluentci/.fluentci/.github/workflows/ci.yml delete mode 100644 .fluentci/.fluentci/.gitignore delete mode 100644 .fluentci/.fluentci/CODE_OF_CONDUCT.md delete mode 100644 .fluentci/.fluentci/CONTRIBUTING.md delete mode 100644 .fluentci/.fluentci/LICENSE delete mode 100644 .fluentci/.fluentci/README.md delete mode 100644 .fluentci/.fluentci/ci.ts delete mode 100644 .fluentci/.fluentci/deno.json delete mode 100644 .fluentci/.fluentci/deno.lock delete mode 100644 .fluentci/.fluentci/example/.fluentci/.devcontainer/devcontainer.json delete mode 100644 .fluentci/.fluentci/example/.fluentci/.fluentci/.devcontainer/devcontainer.json delete mode 100644 .fluentci/.fluentci/example/.fluentci/.fluentci/.github/workflows/ci.yml delete mode 100644 .fluentci/.fluentci/example/.fluentci/.fluentci/CODE_OF_CONDUCT.md delete mode 100644 .fluentci/.fluentci/example/.fluentci/.fluentci/CONTRIBUTING.md delete mode 100644 .fluentci/.fluentci/example/.fluentci/.fluentci/LICENSE delete mode 100644 .fluentci/.fluentci/example/.fluentci/.fluentci/README.md delete mode 100644 .fluentci/.fluentci/example/.fluentci/.fluentci/ci.ts delete mode 100644 .fluentci/.fluentci/example/.fluentci/.fluentci/deno.json delete mode 100644 .fluentci/.fluentci/example/.fluentci/.fluentci/deno.lock delete mode 100644 .fluentci/.fluentci/example/.fluentci/.fluentci/fixtures/.gitlab-ci.yml delete mode 100644 .fluentci/.fluentci/example/.fluentci/.fluentci/flake.lock delete mode 100644 .fluentci/.fluentci/example/.fluentci/.fluentci/flake.nix delete mode 100644 .fluentci/.fluentci/example/.fluentci/.fluentci/import_map.json delete mode 100644 .fluentci/.fluentci/example/.fluentci/.fluentci/mod.ts delete mode 100644 .fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/index.ts delete mode 100644 .fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/jobs.ts delete mode 100644 .fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/list_jobs.ts delete mode 100644 .fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/pipeline.ts delete mode 100644 .fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/runner.ts delete mode 100644 .fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/index.ts delete mode 100644 .fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/jobs.ts delete mode 100644 .fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/pipeline.ts delete mode 100644 .fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/pipeline_test.ts delete mode 100644 .fluentci/.fluentci/example/.fluentci/.github/workflows/ci.yml delete mode 100644 .fluentci/.fluentci/example/.fluentci/CODE_OF_CONDUCT.md delete mode 100644 .fluentci/.fluentci/example/.fluentci/CONTRIBUTING.md delete mode 100644 .fluentci/.fluentci/example/.fluentci/LICENSE delete mode 100644 .fluentci/.fluentci/example/.fluentci/README.md delete mode 100644 .fluentci/.fluentci/example/.fluentci/ci.ts delete mode 100644 .fluentci/.fluentci/example/.fluentci/deno.json delete mode 100644 .fluentci/.fluentci/example/.fluentci/deno.lock delete mode 100644 .fluentci/.fluentci/example/.fluentci/fixtures/.gitlab-ci.yml delete mode 100644 .fluentci/.fluentci/example/.fluentci/flake.lock delete mode 100644 .fluentci/.fluentci/example/.fluentci/flake.nix delete mode 100644 .fluentci/.fluentci/example/.fluentci/import_map.json delete mode 100644 .fluentci/.fluentci/example/.fluentci/mod.ts delete mode 100644 .fluentci/.fluentci/example/.fluentci/src/dagger/index.ts delete mode 100644 .fluentci/.fluentci/example/.fluentci/src/dagger/jobs.ts delete mode 100644 .fluentci/.fluentci/example/.fluentci/src/dagger/list_jobs.ts delete mode 100644 .fluentci/.fluentci/example/.fluentci/src/dagger/pipeline.ts delete mode 100644 .fluentci/.fluentci/example/.fluentci/src/dagger/runner.ts delete mode 100644 .fluentci/.fluentci/example/.fluentci/src/gitlab/index.ts delete mode 100644 .fluentci/.fluentci/example/.fluentci/src/gitlab/jobs.ts delete mode 100644 .fluentci/.fluentci/example/.fluentci/src/gitlab/pipeline.ts delete mode 100644 .fluentci/.fluentci/example/.fluentci/src/gitlab/pipeline_test.ts delete mode 100644 .fluentci/.fluentci/example/README.md delete mode 100644 .fluentci/.fluentci/example/main.tsx delete mode 100644 .fluentci/.fluentci/fixtures/.gitlab-ci.yml delete mode 100644 .fluentci/.fluentci/flake.lock delete mode 100644 .fluentci/.fluentci/flake.nix delete mode 100644 .fluentci/.fluentci/import_map.json delete mode 100644 .fluentci/.fluentci/mod.ts delete mode 100644 .fluentci/.fluentci/src/dagger/index.ts delete mode 100644 .fluentci/.fluentci/src/dagger/jobs.ts delete mode 100644 .fluentci/.fluentci/src/dagger/list_jobs.ts delete mode 100644 .fluentci/.fluentci/src/dagger/pipeline.ts delete mode 100644 .fluentci/.fluentci/src/dagger/runner.ts delete mode 100644 .fluentci/.fluentci/src/github/config.ts delete mode 100644 .fluentci/.fluentci/src/github/init.ts delete mode 100644 .fluentci/.fluentci/src/gitlab/index.ts delete mode 100644 .fluentci/.fluentci/src/gitlab/jobs.ts delete mode 100644 .fluentci/.fluentci/src/gitlab/pipeline.ts delete mode 100644 .fluentci/.fluentci/src/gitlab/pipeline_test.ts delete mode 100644 .fluentci/.github/workflows/ci.yml delete mode 100644 .fluentci/.github/workflows/example.yml delete mode 100644 .fluentci/.github/workflows/zenith.yml delete mode 100644 .fluentci/example/.fluentci/.devcontainer/devcontainer.json delete mode 100644 .fluentci/example/.fluentci/.fluentci/.devcontainer/devcontainer.json delete mode 100644 .fluentci/example/.fluentci/.fluentci/.fluentci/.devcontainer/devcontainer.json delete mode 100644 .fluentci/example/.fluentci/.fluentci/.fluentci/.github/workflows/ci.yml delete mode 100644 .fluentci/example/.fluentci/.fluentci/.fluentci/CODE_OF_CONDUCT.md delete mode 100644 .fluentci/example/.fluentci/.fluentci/.fluentci/CONTRIBUTING.md delete mode 100644 .fluentci/example/.fluentci/.fluentci/.fluentci/LICENSE delete mode 100644 .fluentci/example/.fluentci/.fluentci/.fluentci/README.md delete mode 100644 .fluentci/example/.fluentci/.fluentci/.fluentci/ci.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/.fluentci/deno.json delete mode 100644 .fluentci/example/.fluentci/.fluentci/.fluentci/deno.lock delete mode 100644 .fluentci/example/.fluentci/.fluentci/.fluentci/fixtures/.gitlab-ci.yml delete mode 100644 .fluentci/example/.fluentci/.fluentci/.fluentci/flake.lock delete mode 100644 .fluentci/example/.fluentci/.fluentci/.fluentci/flake.nix delete mode 100644 .fluentci/example/.fluentci/.fluentci/.fluentci/import_map.json delete mode 100644 .fluentci/example/.fluentci/.fluentci/.fluentci/mod.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/.fluentci/src/dagger/index.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/.fluentci/src/dagger/jobs.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/.fluentci/src/dagger/list_jobs.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/.fluentci/src/dagger/pipeline.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/.fluentci/src/dagger/runner.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/.fluentci/src/github/config.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/.fluentci/src/github/init.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/.fluentci/src/gitlab/index.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/.fluentci/src/gitlab/jobs.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/.fluentci/src/gitlab/pipeline.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/.fluentci/src/gitlab/pipeline_test.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/.github/workflows/ci.yml delete mode 100644 .fluentci/example/.fluentci/.fluentci/.gitignore delete mode 100644 .fluentci/example/.fluentci/.fluentci/CODE_OF_CONDUCT.md delete mode 100644 .fluentci/example/.fluentci/.fluentci/CONTRIBUTING.md delete mode 100644 .fluentci/example/.fluentci/.fluentci/LICENSE delete mode 100644 .fluentci/example/.fluentci/.fluentci/README.md delete mode 100644 .fluentci/example/.fluentci/.fluentci/ci.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/deno.json delete mode 100644 .fluentci/example/.fluentci/.fluentci/deno.lock delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/.devcontainer/devcontainer.json delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/.devcontainer/devcontainer.json delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/.github/workflows/ci.yml delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/CODE_OF_CONDUCT.md delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/CONTRIBUTING.md delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/LICENSE delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/README.md delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/ci.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/deno.json delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/deno.lock delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/fixtures/.gitlab-ci.yml delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/flake.lock delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/flake.nix delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/import_map.json delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/mod.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/index.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/jobs.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/list_jobs.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/pipeline.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/runner.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/index.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/jobs.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/pipeline.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/pipeline_test.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/.github/workflows/ci.yml delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/CODE_OF_CONDUCT.md delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/CONTRIBUTING.md delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/LICENSE delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/README.md delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/ci.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/deno.json delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/deno.lock delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/fixtures/.gitlab-ci.yml delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/flake.lock delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/flake.nix delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/import_map.json delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/mod.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/src/dagger/index.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/src/dagger/jobs.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/src/dagger/list_jobs.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/src/dagger/pipeline.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/src/dagger/runner.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/src/gitlab/index.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/src/gitlab/jobs.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/src/gitlab/pipeline.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/.fluentci/src/gitlab/pipeline_test.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/README.md delete mode 100644 .fluentci/example/.fluentci/.fluentci/example/main.tsx delete mode 100644 .fluentci/example/.fluentci/.fluentci/fixtures/.gitlab-ci.yml delete mode 100644 .fluentci/example/.fluentci/.fluentci/flake.lock delete mode 100644 .fluentci/example/.fluentci/.fluentci/flake.nix delete mode 100644 .fluentci/example/.fluentci/.fluentci/import_map.json delete mode 100644 .fluentci/example/.fluentci/.fluentci/mod.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/src/dagger/index.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/src/dagger/jobs.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/src/dagger/list_jobs.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/src/dagger/pipeline.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/src/dagger/runner.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/src/github/config.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/src/github/init.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/src/gitlab/index.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/src/gitlab/jobs.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/src/gitlab/pipeline.ts delete mode 100644 .fluentci/example/.fluentci/.fluentci/src/gitlab/pipeline_test.ts delete mode 100644 .fluentci/example/.fluentci/.github/workflows/ci.yml delete mode 100644 .fluentci/example/.fluentci/.github/workflows/example.yml delete mode 100644 .fluentci/example/.fluentci/.github/workflows/zenith.yml delete mode 100644 .fluentci/example/.fluentci/CODE_OF_CONDUCT.md delete mode 100644 .fluentci/example/.fluentci/CONTRIBUTING.md delete mode 100644 .fluentci/example/.fluentci/LICENSE delete mode 100644 .fluentci/example/.fluentci/README.md delete mode 100644 .fluentci/example/.fluentci/ci.ts delete mode 100644 .fluentci/example/.fluentci/dagger.json delete mode 100644 .fluentci/example/.fluentci/deno.json delete mode 100644 .fluentci/example/.fluentci/deno.lock delete mode 100644 .fluentci/example/.fluentci/deps.ts delete mode 100644 .fluentci/example/.fluentci/example/.github/workflows/tests.yml delete mode 100644 .fluentci/example/.fluentci/example/.gitignore delete mode 100644 .fluentci/example/.fluentci/example/Cargo.lock delete mode 100644 .fluentci/example/.fluentci/example/Cargo.toml delete mode 100644 .fluentci/example/.fluentci/example/build.gql delete mode 100644 .fluentci/example/.fluentci/example/src/lib.rs delete mode 100644 .fluentci/example/.fluentci/example/test.gql delete mode 100644 .fluentci/example/.fluentci/fixtures/.gitlab-ci.yml delete mode 100644 .fluentci/example/.fluentci/fixtures/azure-pipelines.yml delete mode 100644 .fluentci/example/.fluentci/fixtures/buildspec.yml delete mode 100644 .fluentci/example/.fluentci/fixtures/config.yml delete mode 100644 .fluentci/example/.fluentci/fixtures/workflow.yml delete mode 100644 .fluentci/example/.fluentci/gen/nexus.ts delete mode 100644 .fluentci/example/.fluentci/import_map.json delete mode 100644 .fluentci/example/.fluentci/mod.ts delete mode 100644 .fluentci/example/.fluentci/schema.graphql delete mode 100644 .fluentci/example/.fluentci/src/aws/README.md delete mode 100644 .fluentci/example/.fluentci/src/aws/config.ts delete mode 100644 .fluentci/example/.fluentci/src/aws/config_test.ts delete mode 100644 .fluentci/example/.fluentci/src/aws/init.ts delete mode 100644 .fluentci/example/.fluentci/src/azure/README.md delete mode 100644 .fluentci/example/.fluentci/src/azure/config.ts delete mode 100644 .fluentci/example/.fluentci/src/azure/config_test.ts delete mode 100644 .fluentci/example/.fluentci/src/azure/init.ts delete mode 100644 .fluentci/example/.fluentci/src/circleci/README.md delete mode 100644 .fluentci/example/.fluentci/src/circleci/config.ts delete mode 100644 .fluentci/example/.fluentci/src/circleci/config_test.ts delete mode 100644 .fluentci/example/.fluentci/src/circleci/init.ts delete mode 100644 .fluentci/example/.fluentci/src/dagger/index.ts delete mode 100644 .fluentci/example/.fluentci/src/dagger/jobs.ts delete mode 100644 .fluentci/example/.fluentci/src/dagger/list_jobs.ts delete mode 100644 .fluentci/example/.fluentci/src/dagger/queries.ts delete mode 100644 .fluentci/example/.fluentci/src/dagger/schema.ts delete mode 100644 .fluentci/example/.fluentci/src/github/README.md delete mode 100644 .fluentci/example/.fluentci/src/github/config.ts delete mode 100644 .fluentci/example/.fluentci/src/github/config_test.ts delete mode 100644 .fluentci/example/.fluentci/src/github/init.ts delete mode 100644 .fluentci/example/.fluentci/src/gitlab/README.md delete mode 100644 .fluentci/example/.fluentci/src/gitlab/config.ts delete mode 100644 .fluentci/example/.fluentci/src/gitlab/config_test.ts delete mode 100644 .fluentci/example/.fluentci/src/gitlab/init.ts delete mode 100644 .fluentci/example/.github/workflows/tests.yml delete mode 100644 .fluentci/example/.gitignore delete mode 100644 .fluentci/example/Cargo.lock delete mode 100644 .fluentci/example/Cargo.toml delete mode 100644 .fluentci/example/build.gql delete mode 100644 .fluentci/example/dagger.json delete mode 100644 .fluentci/example/src/lib.rs delete mode 100644 .fluentci/example/test.gql delete mode 100644 .fluentci/fixtures/.gitlab-ci.yml delete mode 100644 .fluentci/fixtures/azure-pipelines.yml delete mode 100644 .fluentci/fixtures/buildspec.yml delete mode 100644 .fluentci/fixtures/config.yml delete mode 100644 .fluentci/fixtures/workflow.yml delete mode 100644 .fluentci/gen/nexus.ts delete mode 100644 .fluentci/schema.graphql create mode 100644 .fluentci/sdk/builder.ts create mode 100644 .fluentci/sdk/client.gen.ts create mode 100644 .fluentci/sdk/client.ts create mode 100644 .fluentci/sdk/common/errors/DaggerSDKError.ts create mode 100644 .fluentci/sdk/common/errors/DockerImageRefValidationError.ts create mode 100644 .fluentci/sdk/common/errors/EngineSessionConnectParamsParseError.ts create mode 100644 .fluentci/sdk/common/errors/EngineSessionConnectionTimeoutError.ts create mode 100644 .fluentci/sdk/common/errors/EngineSessionErrorOptions.ts create mode 100644 .fluentci/sdk/common/errors/ExecError.ts create mode 100644 .fluentci/sdk/common/errors/GraphQLRequestError.ts create mode 100644 .fluentci/sdk/common/errors/InitEngineSessionBinaryError.ts create mode 100644 .fluentci/sdk/common/errors/NotAwaitedRequestError.ts create mode 100644 .fluentci/sdk/common/errors/TooManyNestedObjectsError.ts create mode 100644 .fluentci/sdk/common/errors/UnknownDaggerError.ts create mode 100644 .fluentci/sdk/common/errors/errors-codes.ts create mode 100644 .fluentci/sdk/common/errors/index.ts create mode 100644 .fluentci/sdk/common/errors/types.ts create mode 100644 .fluentci/sdk/common/utils.ts create mode 100644 .fluentci/sdk/connect.ts create mode 100644 .fluentci/sdk/context.ts create mode 100644 .fluentci/sdk/nix/example.ts create mode 100644 .fluentci/sdk/nix/example_with_devbox.ts create mode 100644 .fluentci/sdk/nix/example_with_devbox_pkg.ts create mode 100644 .fluentci/sdk/nix/example_with_devenv.ts create mode 100644 .fluentci/sdk/nix/example_with_flox.ts create mode 100644 .fluentci/sdk/nix/index.ts create mode 100644 .fluentci/sdk/nix/steps.ts create mode 100644 .fluentci/sdk/utils.ts delete mode 100644 .fluentci/src/aws/README.md delete mode 100644 .fluentci/src/aws/config.ts delete mode 100644 .fluentci/src/aws/config_test.ts delete mode 100644 .fluentci/src/aws/init.ts delete mode 100644 .fluentci/src/azure/README.md delete mode 100644 .fluentci/src/azure/config.ts delete mode 100644 .fluentci/src/azure/config_test.ts delete mode 100644 .fluentci/src/azure/init.ts delete mode 100644 .fluentci/src/circleci/README.md delete mode 100644 .fluentci/src/circleci/config.ts delete mode 100644 .fluentci/src/circleci/config_test.ts delete mode 100644 .fluentci/src/circleci/init.ts delete mode 100644 .fluentci/src/dagger/index.ts delete mode 100644 .fluentci/src/dagger/jobs.ts delete mode 100644 .fluentci/src/dagger/list_jobs.ts delete mode 100644 .fluentci/src/dagger/pipeline.ts delete mode 100644 .fluentci/src/dagger/queries.ts delete mode 100644 .fluentci/src/dagger/runner.ts delete mode 100644 .fluentci/src/dagger/schema.ts delete mode 100644 .fluentci/src/github/README.md delete mode 100644 .fluentci/src/github/config.ts delete mode 100644 .fluentci/src/github/config_test.ts delete mode 100644 .fluentci/src/github/init.ts delete mode 100644 .fluentci/src/gitlab/README.md delete mode 100644 .fluentci/src/gitlab/config.ts delete mode 100644 .fluentci/src/gitlab/config_test.ts delete mode 100644 .fluentci/src/gitlab/init.ts create mode 100644 .fluentci/src/jobs.ts create mode 100644 .fluentci/src/mod.ts rename .fluentci/{example/.fluentci/src/dagger => src}/pipeline.ts (73%) rename .fluentci/{example/.fluentci/src/dagger => src}/runner.ts (100%) diff --git a/.fluentci/.fluentci/.devcontainer/devcontainer.json b/.fluentci/.fluentci/.devcontainer/devcontainer.json deleted file mode 100644 index 39a38aea..00000000 --- a/.fluentci/.fluentci/.devcontainer/devcontainer.json +++ /dev/null @@ -1,25 +0,0 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/debian -{ - "name": "Debian", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/base:bullseye", - "features": { - "ghcr.io/devcontainers/features/github-cli:1": {}, - "ghcr.io/devcontainers/features/nix:1": {} - }, - - // Features to add to the dev container. More info: https://containers.dev/features. - // "features": {}, - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "nix develop --experimental-features \"nix-command flakes\"" - // Configure tool-specific properties. - // "customizations": {}, - - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" -} diff --git a/.fluentci/.fluentci/.fluentci/.devcontainer/devcontainer.json b/.fluentci/.fluentci/.fluentci/.devcontainer/devcontainer.json deleted file mode 100644 index 39a38aea..00000000 --- a/.fluentci/.fluentci/.fluentci/.devcontainer/devcontainer.json +++ /dev/null @@ -1,25 +0,0 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/debian -{ - "name": "Debian", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/base:bullseye", - "features": { - "ghcr.io/devcontainers/features/github-cli:1": {}, - "ghcr.io/devcontainers/features/nix:1": {} - }, - - // Features to add to the dev container. More info: https://containers.dev/features. - // "features": {}, - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "nix develop --experimental-features \"nix-command flakes\"" - // Configure tool-specific properties. - // "customizations": {}, - - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" -} diff --git a/.fluentci/.fluentci/.fluentci/.github/workflows/ci.yml b/.fluentci/.fluentci/.fluentci/.github/workflows/ci.yml deleted file mode 100644 index a7f9464b..00000000 --- a/.fluentci/.fluentci/.fluentci/.github/workflows/ci.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Codecov - -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: denoland/setup-deno@v1 - with: - deno-version: v1.34 - - name: Create coverage files - run: deno test --allow-read --coverage=coverage --lock-write # create coverage files - - name: Create coverage report - run: deno coverage ./coverage --lcov > coverage.lcov # create coverage report - - name: Collect coverage - uses: codecov/codecov-action@v3 # upload the report on Codecov - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - with: - file: ./coverage.lcov diff --git a/.fluentci/.fluentci/.fluentci/CODE_OF_CONDUCT.md b/.fluentci/.fluentci/.fluentci/CODE_OF_CONDUCT.md deleted file mode 100644 index e9c20f9c..00000000 --- a/.fluentci/.fluentci/.fluentci/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,132 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -We as members, contributors, and leaders pledge to make participation in our -community a harassment-free experience for everyone, regardless of age, body -size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socio-economic status, -nationality, personal appearance, race, caste, color, religion, or sexual -identity and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, -diverse, inclusive, and healthy community. - -## Our Standards - -Examples of behavior that contributes to a positive environment for our -community include: - -- Demonstrating empathy and kindness toward other people -- Being respectful of differing opinions, viewpoints, and experiences -- Giving and gracefully accepting constructive feedback -- Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience -- Focusing on what is best not just for us as individuals, but for the overall - community - -Examples of unacceptable behavior include: - -- The use of sexualized language or imagery, and sexual attention or advances of - any kind -- Trolling, insulting or derogatory comments, and personal or political attacks -- Public or private harassment -- Publishing others' private information, such as a physical or email address, - without their explicit permission -- Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Enforcement Responsibilities - -Community leaders are responsible for clarifying and enforcing our standards of -acceptable behavior and will take appropriate and fair corrective action in -response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. - -Community leaders have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, and will communicate reasons for moderation -decisions when appropriate. - -## Scope - -This Code of Conduct applies within all community spaces, and also applies when -an individual is officially representing the community in public spaces. -Examples of representing our community include using an official e-mail address, -posting via an official social media account, or acting as an appointed -representative at an online or offline event. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at -[GitHub Issues](https://github.com/fluent-ci-templates/deno-pipeline/issues). -All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. - -## Enforcement Guidelines - -Community leaders will follow these Community Impact Guidelines in determining -the consequences for any action they deem in violation of this Code of Conduct: - -### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed -unprofessional or unwelcome in the community. - -**Consequence**: A private, written warning from community leaders, providing -clarity around the nature of the violation and an explanation of why the -behavior was inappropriate. A public apology may be requested. - -### 2. Warning - -**Community Impact**: A violation through a single incident or series of -actions. - -**Consequence**: A warning with consequences for continued behavior. No -interaction with the people involved, including unsolicited interaction with -those enforcing the Code of Conduct, for a specified period of time. This -includes avoiding interactions in community spaces as well as external channels -like social media. Violating these terms may lead to a temporary or permanent -ban. - -### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including -sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public -communication with the community for a specified period of time. No public or -private interaction with the people involved, including unsolicited interaction -with those enforcing the Code of Conduct, is allowed during this period. -Violating these terms may lead to a permanent ban. - -### 4. Permanent Ban - -**Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an -individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within the -community. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 2.1, available at -[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. - -Community Impact Guidelines were inspired by -[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. - -For answers to common questions about this code of conduct, see the FAQ at -[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at -[https://www.contributor-covenant.org/translations][translations]. - -[homepage]: https://www.contributor-covenant.org -[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html -[Mozilla CoC]: https://github.com/mozilla/diversity -[FAQ]: https://www.contributor-covenant.org/faq -[translations]: https://www.contributor-covenant.org/translations diff --git a/.fluentci/.fluentci/.fluentci/CONTRIBUTING.md b/.fluentci/.fluentci/.fluentci/CONTRIBUTING.md deleted file mode 100644 index e50de724..00000000 --- a/.fluentci/.fluentci/.fluentci/CONTRIBUTING.md +++ /dev/null @@ -1,70 +0,0 @@ -# Contributing Guidelines - -Thank you for your interest in contributing to our project. Whether it's a bug -report, new feature, correction, or additional documentation, we greatly value -feedback and contributions from our community. - -Please read through this document before submitting any issues or pull requests -to ensure we have all the necessary information to effectively respond to your -bug report or contribution. - -## Reporting Bugs/Feature Requests - -We welcome you to use the GitHub issue tracker to report bugs or suggest -features. - -When filing an issue, please check existing open, or recently closed, issues to -make sure somebody else hasn't already reported the issue. Please try to include -as much information as you can. Details like these are incredibly useful: - -- A reproducible test case or series of steps -- The version of our code being used -- Any modifications you've made relevant to the bug -- Anything unusual about your environment or deployment - -## Contributing via Pull Requests - -Contributions via pull requests are much appreciated. Before sending us a pull -request, please ensure that: - -1. You are working against the latest source on the _master_ branch. -2. You check existing open, and recently merged, pull requests to make sure - someone else hasn't addressed the problem already. -3. You open an issue to discuss any significant work - we would hate for your - time to be wasted. - -To send us a pull request, please: - -1. Fork the repository. -2. Modify the source; please focus on the specific change you are contributing. - If you also reformat all the code, it will be hard for us to focus on your - change. -3. Ensure local tests pass. -4. Commit to your fork using clear commit messages. -5. Send us a pull request, answering any default questions in the pull request - interface. -6. Pay attention to any automated CI failures reported in the pull request, and - stay involved in the conversation. - -GitHub provides additional document on -[forking a repository](https://help.github.com/articles/fork-a-repo/) and -[creating a pull request](https://help.github.com/articles/creating-a-pull-request/). - -## Finding contributions to work on - -Looking at the existing issues is a great way to find something to contribute -on. As our projects, by default, use the default GitHub issue labels -(enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any -'help wanted' issues is a great place to start. - -## Code of Conduct - -This project has adopted the -[Contributor Covenant](https://www.contributor-covenant.org/), version 2.1, -available at -https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. - -## Licensing - -See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to -confirm the licensing of your contribution. diff --git a/.fluentci/.fluentci/.fluentci/LICENSE b/.fluentci/.fluentci/.fluentci/LICENSE deleted file mode 100644 index d9ab36a4..00000000 --- a/.fluentci/.fluentci/.fluentci/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2023 Tsiry Sandratraina - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/.fluentci/.fluentci/.fluentci/README.md b/.fluentci/.fluentci/.fluentci/README.md deleted file mode 100644 index 23f6a94b..00000000 --- a/.fluentci/.fluentci/.fluentci/README.md +++ /dev/null @@ -1,88 +0,0 @@ -# Deno Pipeline - -[![deno module](https://shield.deno.dev/x/deno_pipeline)](https://deno.land/x/deno_pipeline) -![deno compatibility](https://shield.deno.dev/deno/^1.34) -[![](https://img.shields.io/codecov/c/gh/fluent-ci-templates/deno-pipeline)](https://codecov.io/gh/fluent-ci-templates/deno-pipeline) - -A ready-to-use GitLab CI Pipeline and Jobs for your Deno projects. - -## ๐Ÿš€ Usage - -Quick start: - -```ts -import { GitLab } from "https://deno.land/x/deno_pipeline/mod.ts"; - -const { pipeline } = GitLab; - -pipeline.write(); // Write the pipeline to the file .gitlab-ci.yml -``` - -Or, if you want to use the predefined jobs: - -```ts -import { GitlabCI } from "https://deno.land/x/fluent_gitlab_ci/mod.ts"; -import { GitLab } from "https://deno.land/x/deno_pipeline/mod.ts"; - -const { fmt, lint, test } = GitLab; - -const const pipeline = new GitlabCI() - .image("denoland/deno:alpine") - .addJob("fmt", fmt) - .addJob("lint", lint) - .addJob("test", test); - -pipeline.write(); // Write the pipeline to the file .gitlab-ci.yml -``` - -It will generate the following `.gitlab-ci.yml` file: - -```yaml -# Do not edit this file directly. It is generated by Fluent GitLab CI - -image: denoland/deno:alpine - -fmt: - image: denoland/deno:alpine - script: - - deno fmt --check - -lint: - image: denoland/deno:alpine - script: - - deno lint - -test: - image: denoland/deno:alpine - script: - - deno test -``` - -## ๐Ÿงช Advanced Usage - -This package also provides a ready-to-use pipeline for -[Dagger](https://dagger.io/), just run the following command on your Deno -project: - -```sh -dagger run deno run -A https://deno.land/x/deno_pipeline/ci.ts -``` - -Or, if you want to use the predefined jobs: - -```ts -import Client, { connect } from "@dagger.io/dagger"; -import { Dagger } from "https://deno.land/x/deno_pipeline/mod.ts"; - -const { fmt, lint, test } = Dagger; - -function pipeline(src = ".") { - connect(async (client: Client) => { - await fmt(client, src); - await lint(client, src); - await test(client, src); - }); -} - -pipeline(); -``` diff --git a/.fluentci/.fluentci/.fluentci/ci.ts b/.fluentci/.fluentci/.fluentci/ci.ts deleted file mode 100644 index 67e5a808..00000000 --- a/.fluentci/.fluentci/.fluentci/ci.ts +++ /dev/null @@ -1,12 +0,0 @@ -const command = new Deno.Command(Deno.execPath(), { - args: [ - "run", - "-A", - "--import-map=https://deno.land/x/deno_pipeline/import_map.json", - "https://deno.land/x/deno_pipeline/src/dagger/runner.ts", - ], -}); - -const { stdout } = await command.output(); - -console.log(new TextDecoder().decode(stdout)); diff --git a/.fluentci/.fluentci/.fluentci/deno.json b/.fluentci/.fluentci/.fluentci/deno.json deleted file mode 100644 index 42402195..00000000 --- a/.fluentci/.fluentci/.fluentci/deno.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "importMap": "import_map.json", - "tasks": { - "esm:add": "deno run -A https://esm.sh/v128 add", - "esm:update": "deno run -A https://esm.sh/v128 update", - "esm:remove": "deno run -A https://esm.sh/v128 remove", - "ci:dagger": "dagger run deno run -A src/dagger/runner.ts" - } -} diff --git a/.fluentci/.fluentci/.fluentci/deno.lock b/.fluentci/.fluentci/.fluentci/deno.lock deleted file mode 100644 index a364136a..00000000 --- a/.fluentci/.fluentci/.fluentci/deno.lock +++ /dev/null @@ -1,68 +0,0 @@ -{ - "version": "2", - "remote": { - "https://deno.land/std@0.150.0/media_types/_util.ts": "ce9b4fc4ba1c447dafab619055e20fd88236ca6bdd7834a21f98bd193c3fbfa1", - "https://deno.land/std@0.150.0/media_types/mod.ts": "2d4b6f32a087029272dc59e0a55ae3cc4d1b27b794ccf528e94b1925795b3118", - "https://deno.land/std@0.150.0/media_types/vendor/mime-db.v1.52.0.ts": "724cee25fa40f1a52d3937d6b4fbbfdd7791ff55e1b7ac08d9319d5632c7f5af", - "https://deno.land/std@0.191.0/fmt/colors.ts": "d67e3cd9f472535241a8e410d33423980bec45047e343577554d3356e1f0ef4e", - "https://deno.land/x/codecov_pipeline@v0.1.0/src/dagger/jobs.ts": "e980479e0bcd759773286145f3345ce7e1662c7d6734bfc4bbf8e6bfc93b974e", - "https://deno.land/x/nix_installer_pipeline@v0.3.6/src/dagger/steps.ts": "a34aea3753c7079de5877f592ce31f30d05d552155729ff3e695d77326405133", - "https://deno.land/x/xhr@0.3.0/mod.ts": "094aacd627fd9635cd942053bf8032b5223b909858fa9dc8ffa583752ff63b20", - "https://esm.sh/stringify-tree@1.1.1": "8d994a105481fa944515323d89bd2596c1de79f3d9bd1386266463934716eca0", - "https://esm.sh/v128/*@dagger.io/dagger@0.6.3": "cb691a77c0cdaee22f2b8393731b5143c83ce22dbbea204cdbfd203768d15b64", - "https://esm.sh/v128/@dagger.io/dagger@0.6.3/X-ZS8q/denonext/dagger.mjs": "fd0901784d75b99615b5409c3654b5c7edfc5ba377c9e1a5a67ffff4f7d3ac32", - "https://esm.sh/v128/adm-zip@0.5.10": "d9c54d6d2dd788462781a57d923295bd79304e6fd74b242fd4b30e35b39c5dcf", - "https://esm.sh/v128/adm-zip@0.5.10/denonext/adm-zip.mjs": "07a9731547905e0ca55ae917e1969d7f6d04fb3773f906ce3306891337eb4849", - "https://esm.sh/v128/chownr@2.0.0/denonext/chownr.mjs": "30b8f17084dfbe475a5052b615f706b06ddd17dca0535103340d485c6b94e952", - "https://esm.sh/v128/cross-fetch@3.1.8/denonext/cross-fetch.mjs": "8fba9e7c3fbaf0d2168beb63ce0cd21b5bfbfbd77e2fcbf8d957d533a71222f6", - "https://esm.sh/v128/cross-spawn@7.0.3/denonext/cross-spawn.mjs": "0569a26e7ad4b3376516cbc9b1942e10961a58030eadcea8c848e6b956eb355c", - "https://esm.sh/v128/data-uri-to-buffer@4.0.1/denonext/data-uri-to-buffer.mjs": "70ef987b1da58391495ecfad9888d996469224faf3cd996d81dc2e059feb9f31", - "https://esm.sh/v128/env-paths@3.0.0": "8400fb23319be9b30d7b40d1c865541c5b3c7726cdf9b74000bc0f1678d52ecf", - "https://esm.sh/v128/env-paths@3.0.0/denonext/env-paths.mjs": "77984a05eb16450087f25060a070ed500ec546719d471143e16d976ca73ca956", - "https://esm.sh/v128/execa@7.1.1": "a40c7030df81ab0847a5d844f4c5c6420af973dff05fef88e53cbb9b8667fdc2", - "https://esm.sh/v128/execa@7.1.1/denonext/execa.mjs": "9d5943544c0df3761b52f2c095f89a03ca6c028d818a8f0475ff883b0408f154", - "https://esm.sh/v128/fetch-blob@3.2.0/denonext/fetch-blob.mjs": "0531568b36c0f6db3e9825fbb2d08dee51100eb675c2bf1d98d6971a92010721", - "https://esm.sh/v128/fetch-blob@3.2.0/denonext/file.js": "fd82828163a4e7bdc15190d8c3dbfd92f93274d05bd7f7f5ab81093e3ad7e9c2", - "https://esm.sh/v128/fetch-blob@3.2.0/denonext/from.js": "7d3258c7960755497f90879806f0b815d5e564c2ac1523238af5cb9552ff5c45", - "https://esm.sh/v128/formdata-polyfill@4.0.10/denonext/esm.min.js": "b6d65a204e81eca699d9eb6f867e9efffa42db39a8f161690915a89e5eb1766f", - "https://esm.sh/v128/fs-minipass@2.1.0/denonext/fs-minipass.mjs": "74b00283d556b281bdfd6a669576d852f2c43702043c411985f8f8188d208c5d", - "https://esm.sh/v128/get-stream@6.0.1/denonext/get-stream.mjs": "a947a16f8cb3052fd654a84f8b36b40ce96b6a5acfb3ad4ab69d814bcf3351fb", - "https://esm.sh/v128/graphql-request@6.1.0": "17f00c323eb825811ce14e2b0e88a0c873acb666c382ac963d1edeb03e01f372", - "https://esm.sh/v128/graphql-request@6.1.0/denonext/graphql-request.mjs": "0b15f49d44489423ae6f06004725b6d050b6359da4969e6569bd6ad45065bd94", - "https://esm.sh/v128/graphql-tag@2.12.6": "5bfa27da9c9918fb52a01b8579891e804e0365d91118df1f2e0957a72dacdc39", - "https://esm.sh/v128/graphql-tag@2.12.6/denonext/graphql-tag.mjs": "331d09949efc4ac60c84a69b52a7da8b333210493900e54953ae4604c9874527", - "https://esm.sh/v128/graphql@16.7.1/denonext/graphql.mjs": "418ad7c07b0f2d687f33b6275d3b5f317f4afbef1f462f318229f458dff45416", - "https://esm.sh/v128/human-signals@4.3.1/denonext/human-signals.mjs": "3889110cedd907804443d018cffe0a1d892d5e7467661376caf967feff55cbe9", - "https://esm.sh/v128/is-stream@3.0.0/denonext/is-stream.mjs": "5c8b65f2fa051c4b18e88bbae11dac8bba9caf57752577d69bcea86d1f05c5b7", - "https://esm.sh/v128/isexe@2.0.0/denonext/isexe.mjs": "3cfefd270d1bfdfb864ee98dbb8f41d150cbf480925158f4a8f0ade8a9e17d6c", - "https://esm.sh/v128/merge-stream@2.0.0/denonext/merge-stream.mjs": "2c2af22401c294158d6bff659d157e3d2c028c218cc1bd2246534a45a4c03c61", - "https://esm.sh/v128/mimic-fn@4.0.0/denonext/mimic-fn.mjs": "10bcf0f2f20cbbba0c289ef7bf4d2422639bbc1c36c247be876afd6fe2d67138", - "https://esm.sh/v128/minipass@3.3.6/denonext/minipass.mjs": "59bbe430514455e78cb30c389b21af66efb2bf010cda071820a17d8c76d0d1cf", - "https://esm.sh/v128/minipass@5.0.0/denonext/minipass.mjs": "de0e049728f8c387b58c86439eb9d69a16b6a88756a6bc694e2fecbd7fd00401", - "https://esm.sh/v128/minizlib@2.1.2/denonext/minizlib.mjs": "0d919b6a0c60d5a31e14d748ff9d62aeae2923b604bcc6a22f90fa4bbd400d68", - "https://esm.sh/v128/mkdirp@1.0.4/denonext/mkdirp.mjs": "ee129b32e55dd8bede6b1bbd1978f7775fa5e2720d5a7ae07bf1e8c99abd77c7", - "https://esm.sh/v128/node-color-log@10.0.2": "05a277987c64153af1252167135076155fdc6b39ca260b2bdc39750da12d2a2d", - "https://esm.sh/v128/node-color-log@10.0.2/denonext/node-color-log.mjs": "2504391bd0ce1dd4c2bf0ed0b839b8a3ad84c028d9dd17cc58dccd2e14dacfde", - "https://esm.sh/v128/node-domexception@1.0.0/denonext/node-domexception.mjs": "bb35ba54c1a2b35870618876c0c96310a28ae58aecff33c8eed58a582e270ff4", - "https://esm.sh/v128/node-fetch@3.3.1": "916dcee177a69fb0e46970c528cb66fcd4973488f861844c0a235bfc645b0506", - "https://esm.sh/v128/node-fetch@3.3.1/denonext/node-fetch.mjs": "dc3a8f1f2fc9eb26d0d33e49f3750acc265d51a1a54bbd670c5d9f640b633a93", - "https://esm.sh/v128/node-fetch@3.3.1/denonext/src/utils/multipart-parser.js": "713b1b8cbafc4bfb7358debeb35d507e0d2328f0a28b8a2a7d79a3e5e4f5e5b8", - "https://esm.sh/v128/npm-run-path@5.1.0/denonext/npm-run-path.mjs": "3540b8c2dd1430f10d580f323f3a51aa30094da27a9220cce03ce69884b163bb", - "https://esm.sh/v128/onetime@6.0.0/denonext/onetime.mjs": "6e362222575d815f37fb813168d7069dd6a0f6bb6f972ed54d1bccb0f9fb3e1b", - "https://esm.sh/v128/original-fs@1.2.0/denonext/original-fs.mjs": "2b1098818e54d2c6748ff5b0dd9ea5f6a61b4b6d0f63fb625f21773d11cfc667", - "https://esm.sh/v128/path-key@3.1.1/denonext/path-key.mjs": "add83c631278b7df9b33ae84e41142db88bb291295bcc27eb4e77a1cbdfa71d0", - "https://esm.sh/v128/path-key@4.0.0/denonext/path-key.mjs": "2c2e3922bd0e6e414fa2752ff800bdc6b9208035ce797fa22e49b859f8259417", - "https://esm.sh/v128/shebang-command@2.0.0/denonext/shebang-command.mjs": "404e0fb09a782ca9495d53c721bb84b673b7b2e1054e021852143a6b91ca0e4f", - "https://esm.sh/v128/shebang-regex@3.0.0/denonext/shebang-regex.mjs": "03983ba59dd2cba9402935e21b46d05f5249364cba9f5757aef23c6c2fea65b9", - "https://esm.sh/v128/signal-exit@3.0.7/denonext/signal-exit.mjs": "2a176e5f9b351fa8057213c627a1503d63bf308b64447ef47f1ca6fbb2a91c81", - "https://esm.sh/v128/strip-final-newline@3.0.0/denonext/strip-final-newline.mjs": "03d9be4e8a249d63cbbddeb2fb675a1bbbcb335283e604d4ce56c88c90e6f102", - "https://esm.sh/v128/tar@6.1.15": "0460339f8aba5f287e8bebe258fe3fe13cb12f85820693f25724f0d98ef1258e", - "https://esm.sh/v128/tar@6.1.15/denonext/tar.mjs": "6194d892de8457b3b1f11d5cbacda1d540b453b45e8cb9f5f610abfb3e490b65", - "https://esm.sh/v128/tslib@2.6.0/denonext/tslib.mjs": "2215292e6fcf28a7a081eee911f127bb3c44cdd61ff0651e3e384d7a49b4e42b", - "https://esm.sh/v128/web-streams-polyfill@3.2.1/denonext/dist/ponyfill.es2018.js": "a2edb52a93494cda06386b3d6a168016b366e78f02c5eff1f94a0240be12ac96", - "https://esm.sh/v128/which@2.0.2/denonext/which.mjs": "86bf76e4937edb7fa3464d7bb9a426ef273684d1cefbec5ba5f1bdcb5cafff91", - "https://esm.sh/v128/yallist@4.0.0/denonext/yallist.mjs": "61f180d807dda50bac17028eda05d5722a3fecef6e98a9064e2353ea6864fd82", - "https://esm.sh/v130/lodash.flatten@4.4.0/denonext/lodash.flatten.mjs": "8e86ab607deea15cc3c1acfb5eae278ecbc5b80f24167b4e8f4c56df3278cd55", - "https://esm.sh/v130/stringify-tree@1.1.1/denonext/stringify-tree.mjs": "40a9d40e0282b5432302a3da68b88aa11685bc0b8a0b70246168deed5c5773fe" - } -} diff --git a/.fluentci/.fluentci/.fluentci/fixtures/.gitlab-ci.yml b/.fluentci/.fluentci/.fluentci/fixtures/.gitlab-ci.yml deleted file mode 100644 index 299e4c62..00000000 --- a/.fluentci/.fluentci/.fluentci/fixtures/.gitlab-ci.yml +++ /dev/null @@ -1,19 +0,0 @@ -# Do not edit this file directly. It is generated by Fluent GitLab CI - -image: denoland/deno:alpine - -fmt: - image: denoland/deno:alpine - script: - - deno fmt --check - -lint: - image: denoland/deno:alpine - script: - - deno lint - -test: - image: denoland/deno:alpine - script: - - deno test - diff --git a/.fluentci/.fluentci/.fluentci/flake.lock b/.fluentci/.fluentci/.fluentci/flake.lock deleted file mode 100644 index af7453c0..00000000 --- a/.fluentci/.fluentci/.fluentci/flake.lock +++ /dev/null @@ -1,61 +0,0 @@ -{ - "nodes": { - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1687709756, - "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1688910226, - "narHash": "sha256-kLTsFu9CAU2Gb288JhIBN/WlX4UUUDz4WiC/U59nvwk=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "2540432a940aee979be6ccfefba9ea0652c273a0", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "release-23.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/.fluentci/.fluentci/.fluentci/flake.nix b/.fluentci/.fluentci/.fluentci/flake.nix deleted file mode 100644 index b13ea7df..00000000 --- a/.fluentci/.fluentci/.fluentci/flake.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ - description = "A Nix-flake-based Deno development environment"; - - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/release-23.05"; - flake-utils.url = "github:numtide/flake-utils"; - }; - - outputs = { - self, - nixpkgs, - flake-utils, - }: - flake-utils.lib.eachDefaultSystem - (system: let - pkgs = import nixpkgs { - inherit system; - }; - in { - devShells.default = pkgs.mkShell { - buildInputs = [ - pkgs.deno - ]; - }; - }); -} \ No newline at end of file diff --git a/.fluentci/.fluentci/.fluentci/import_map.json b/.fluentci/.fluentci/.fluentci/import_map.json deleted file mode 100644 index 12c59ffe..00000000 --- a/.fluentci/.fluentci/.fluentci/import_map.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "imports": { - "@dagger.io/dagger": "https://esm.sh/v128/*@dagger.io/dagger@0.6.3", - "fluent_gitlab_ci": "https://deno.land/x/fluent_gitlab_ci@v0.3.2/mod.ts", - "fluent_github_actions": "https://deno.land/x/fluent_github_actions@v0.1.2/mod.ts", - "url": "node:url", - "readline": "node:readline", - "process": "node:process", - "path": "node:path", - "os": "node:os", - "fs": "node:fs", - "crypto": "node:crypto" - }, - "scopes": { - "https://esm.sh/v128/": { - "@lifeomic/axios-fetch": "https://esm.sh/v128/@lifeomic/axios-fetch@3.0.1", - "adm-zip": "https://esm.sh/v128/adm-zip@0.5.10", - "env-paths": "https://esm.sh/v128/env-paths@3.0.0", - "execa": "https://esm.sh/v128/execa@7.1.1", - "graphql-request": "https://esm.sh/v128/graphql-request@6.1.0", - "graphql-tag": "https://esm.sh/v128/graphql-tag@2.12.6", - "graphql": "https://esm.sh/v128/graphql@16.7.1", - "node-color-log": "https://esm.sh/v128/node-color-log@10.0.2", - "node-fetch": "https://esm.sh/v128/node-fetch@3.3.1", - "tar": "https://esm.sh/v128/tar@6.1.15" - } - } -} \ No newline at end of file diff --git a/.fluentci/.fluentci/.fluentci/mod.ts b/.fluentci/.fluentci/.fluentci/mod.ts deleted file mode 100644 index 6152fb62..00000000 --- a/.fluentci/.fluentci/.fluentci/mod.ts +++ /dev/null @@ -1,4 +0,0 @@ -import * as GitLab from "./src/gitlab/index.ts"; -import * as Dagger from "./src/dagger/index.ts"; - -export { Dagger, GitLab }; diff --git a/.fluentci/.fluentci/.fluentci/src/dagger/index.ts b/.fluentci/.fluentci/.fluentci/src/dagger/index.ts deleted file mode 100644 index 392c0011..00000000 --- a/.fluentci/.fluentci/.fluentci/src/dagger/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import pipeline from "./pipeline.ts"; -import { fmt, lint, test } from "./jobs.ts"; - -export { fmt, lint, pipeline, test }; diff --git a/.fluentci/.fluentci/.fluentci/src/dagger/jobs.ts b/.fluentci/.fluentci/.fluentci/src/dagger/jobs.ts deleted file mode 100644 index 658ed395..00000000 --- a/.fluentci/.fluentci/.fluentci/src/dagger/jobs.ts +++ /dev/null @@ -1,197 +0,0 @@ -import Client from "@dagger.io/dagger"; -import { upload } from "https://deno.land/x/codecov_pipeline@v0.1.0/src/dagger/jobs.ts"; -import { withDevbox } from "https://deno.land/x/nix_installer_pipeline@v0.3.6/src/dagger/steps.ts"; -import { existsSync } from "fs"; - -export enum Job { - fmt = "fmt", - lint = "lint", - test = "test", - deploy = "deploy", - codecov = "codecov", -} - -const baseCtr = (client: Client, pipeline: string) => { - if (existsSync("devbox.json")) { - return withDevbox( - client - .pipeline(pipeline) - .container() - .from("alpine:latest") - .withExec(["apk", "update"]) - .withExec(["apk", "add", "bash", "curl"]) - .withMountedCache("/nix", client.cacheVolume("nix")) - .withMountedCache("/etc/nix", client.cacheVolume("nix-etc")) - ); - } - return client.pipeline(pipeline).container().from("denoland/deno:alpine"); -}; - -export const lint = async (client: Client, src = ".") => { - const context = client.host().directory(src); - let command = ["deno", "lint"]; - - if (existsSync("devbox.json")) { - command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; - } - - const ctr = baseCtr(client, Job.lint) - .withDirectory("/app", context, { - exclude: [".git", ".devbox", ".fluentci"], - }) - .withWorkdir("/app") - .withExec(command); - - const result = await ctr.stdout(); - - console.log(result); -}; - -export const fmt = async (client: Client, src = ".") => { - const context = client.host().directory(src); - let command = ["deno", "fmt"]; - - if (existsSync("devbox.json")) { - command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; - } - - const ctr = baseCtr(client, Job.fmt) - .withDirectory("/app", context, { - exclude: [".git", ".devbox", ".fluentci"], - }) - .withWorkdir("/app") - .withExec(command); - - const result = await ctr.stdout(); - - console.log(result); -}; - -export const test = async ( - client: Client, - src = ".", - options: { ignore: string[] } = { ignore: [] } -) => { - const context = client.host().directory(src); - let command = ["deno", "test", "-A", "--coverage=coverage", "--lock-write"]; - - if (options.ignore.length > 0) { - command = command.concat([`--ignore=${options.ignore.join(",")}`]); - } - - if (existsSync("devbox.json")) { - command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; - } - - const ctr = baseCtr(client, Job.test) - .from("denoland/deno:alpine") - .withDirectory("/app", context, { - exclude: [".git", ".devbox", ".fluentci"], - }) - .withWorkdir("/app") - .withMountedCache("/root/.cache/deno", client.cacheVolume("deno-cache")) - .withExec(command) - .withExec(["sh", "-c", "deno coverage ./coverage --lcov > coverage.lcov"]); - - await ctr.file("/app/coverage.lcov").export("./coverage.lcov"); - - const result = await ctr.stdout(); - - console.log(result); -}; - -export const deploy = async (client: Client, src = ".") => { - const context = client.host().directory(src); - let installDeployCtl = [ - "deno", - "install", - "--allow-all", - "--no-check", - "-r", - "-f", - "https://deno.land/x/deploy/deployctl.ts", - ]; - const project = Deno.env.get("DENO_PROJECT"); - const noStatic = Deno.env.get("NO_STATIC"); - const exclude = Deno.env.get("EXCLUDE"); - - let command = ["deployctl", "deploy"]; - - if (noStatic) { - command = command.concat(["--no-static"]); - } - - if (exclude) { - command = command.concat([`--exclude=${exclude}`]); - } - - if (!Deno.env.get("DENO_DEPLOY_TOKEN")) { - throw new Error("DENO_DEPLOY_TOKEN environment variable is not set"); - } - - if (!project) { - throw new Error("DENO_PROJECT environment variable is not set"); - } - - const script = Deno.env.get("DENO_MAIN_SCRIPT") || "main.tsx"; - command = command.concat([`--project=${project}`, script]); - - if (existsSync("devbox.json")) { - command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; - installDeployCtl = [ - "sh", - "-c", - `devbox run -- ${installDeployCtl.join(" ")}`, - ]; - } - - const ctr = baseCtr(client, Job.deploy) - .from("denoland/deno:alpine") - .withDirectory("/app", context, { - exclude: [".git", ".devbox", ".fluentci"], - }) - .withWorkdir("/app") - .withEnvVariable("PATH", "/root/.deno/bin:$PATH", { expand: true }) - .withEnvVariable("DENO_DEPLOY_TOKEN", Deno.env.get("DENO_DEPLOY_TOKEN")!) - .withEnvVariable( - "DENO_MAIN_SCRIPT", - Deno.env.get("DENO_MAIN_SCRIPT") || "main.tsx" - ) - .withExec(installDeployCtl) - .withExec(command); - - const result = await ctr.stdout(); - - console.log(result); -}; - -export type JobExec = ( - client: Client, - src?: string -) => - | Promise - | (( - client: Client, - src?: string, - options?: { - ignore: string[]; - } - ) => Promise); - -export const codecov = upload; - -export const runnableJobs: Record = { - [Job.fmt]: fmt, - [Job.lint]: lint, - [Job.test]: test, - [Job.deploy]: deploy, - [Job.codecov]: upload, -}; - -export const jobDescriptions: Record = { - [Job.fmt]: "Format your code", - [Job.lint]: "Lint your code", - [Job.test]: "Run your tests", - [Job.deploy]: "Deploy your code to Deno Deploy", - [Job.codecov]: "Upload your code coverage to Codecov", -}; diff --git a/.fluentci/.fluentci/.fluentci/src/dagger/list_jobs.ts b/.fluentci/.fluentci/.fluentci/src/dagger/list_jobs.ts deleted file mode 100644 index 12bb3cbb..00000000 --- a/.fluentci/.fluentci/.fluentci/src/dagger/list_jobs.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { brightGreen } from "https://deno.land/std@0.191.0/fmt/colors.ts"; -import { runnableJobs, jobDescriptions, Job } from "./jobs.ts"; -import { stringifyTree } from "https://esm.sh/stringify-tree@1.1.1"; - -const tree = { - name: brightGreen("deno_pipeline"), - children: (Object.keys(runnableJobs) as Job[]).map((job) => ({ - name: jobDescriptions[job] - ? `${brightGreen(job)} - ${jobDescriptions[job]}` - : brightGreen(job), - children: [], - })), -}; - -console.log( - stringifyTree( - tree, - (t) => t.name, - (t) => t.children - ) -); diff --git a/.fluentci/.fluentci/.fluentci/src/dagger/pipeline.ts b/.fluentci/.fluentci/.fluentci/src/dagger/pipeline.ts deleted file mode 100644 index bad73729..00000000 --- a/.fluentci/.fluentci/.fluentci/src/dagger/pipeline.ts +++ /dev/null @@ -1,27 +0,0 @@ -import Client, { connect } from "@dagger.io/dagger"; -import * as jobs from "./jobs.ts"; - -const { fmt, lint, test, runnableJobs } = jobs; - -export default function pipeline(src = ".", args: string[] = []) { - connect(async (client: Client) => { - if (args.length > 0) { - await runSpecificJobs(client, args as jobs.Job[]); - return; - } - - await fmt(client, src); - await lint(client, src); - await test(client, src); - }); -} - -async function runSpecificJobs(client: Client, args: jobs.Job[]) { - for (const name of args) { - const job = runnableJobs[name]; - if (!job) { - throw new Error(`Job ${name} not found`); - } - await job(client); - } -} diff --git a/.fluentci/.fluentci/.fluentci/src/dagger/runner.ts b/.fluentci/.fluentci/.fluentci/src/dagger/runner.ts deleted file mode 100644 index e23879e7..00000000 --- a/.fluentci/.fluentci/.fluentci/src/dagger/runner.ts +++ /dev/null @@ -1,3 +0,0 @@ -import pipeline from "./pipeline.ts"; - -pipeline(".", Deno.args); diff --git a/.fluentci/.fluentci/.fluentci/src/github/config.ts b/.fluentci/.fluentci/.fluentci/src/github/config.ts deleted file mode 100644 index 481e992a..00000000 --- a/.fluentci/.fluentci/.fluentci/src/github/config.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { JobSpec, Workflow } from "fluent_github_actions"; - -export function generateYaml() { - const workflow = new Workflow("Codecov"); - - const push = { - branches: ["main"], - }; - - const setupDagger = `\ - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - sudo mv bin/dagger /usr/local/bin - dagger version`; - - const tests: JobSpec = { - "runs-on": "ubuntu-latest", - steps: [ - { - uses: "actions/checkout@v2", - }, - { - uses: "denoland/setup-deno@v1", - with: { - "deno-version": "v1.37", - }, - }, - { - name: "Setup Fluent CI CLI", - run: "deno install -A -r https://cli.fluentci.io -n fluentci", - }, - { - name: "Setup Dagger", - run: setupDagger, - }, - { - name: "List Jobs", - run: "fluentci ls .", - }, - { - name: "Run Dagger Pipelines", - run: "dagger run fluentci . fmt lint test codecov", - env: { - CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}", - }, - }, - ], - }; - - workflow.on({ push }).jobs({ tests }); - - workflow.save(".github/workflows/ci.yml"); -} diff --git a/.fluentci/.fluentci/.fluentci/src/github/init.ts b/.fluentci/.fluentci/.fluentci/src/github/init.ts deleted file mode 100644 index 6097dd54..00000000 --- a/.fluentci/.fluentci/.fluentci/src/github/init.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { generateYaml } from "./config.ts"; - -generateYaml(); diff --git a/.fluentci/.fluentci/.fluentci/src/gitlab/index.ts b/.fluentci/.fluentci/.fluentci/src/gitlab/index.ts deleted file mode 100644 index 392c0011..00000000 --- a/.fluentci/.fluentci/.fluentci/src/gitlab/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import pipeline from "./pipeline.ts"; -import { fmt, lint, test } from "./jobs.ts"; - -export { fmt, lint, pipeline, test }; diff --git a/.fluentci/.fluentci/.fluentci/src/gitlab/jobs.ts b/.fluentci/.fluentci/.fluentci/src/gitlab/jobs.ts deleted file mode 100644 index 46be50c3..00000000 --- a/.fluentci/.fluentci/.fluentci/src/gitlab/jobs.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Job } from "https://deno.land/x/fluent_gitlab_ci@v0.3.2/mod.ts"; - -export const fmt = new Job() - .image("denoland/deno:alpine") - .script("deno fmt --check"); - -export const lint = new Job().image("denoland/deno:alpine").script("deno lint"); - -export const test = new Job().image("denoland/deno:alpine").script("deno test"); diff --git a/.fluentci/.fluentci/.fluentci/src/gitlab/pipeline.ts b/.fluentci/.fluentci/.fluentci/src/gitlab/pipeline.ts deleted file mode 100644 index 366de64b..00000000 --- a/.fluentci/.fluentci/.fluentci/src/gitlab/pipeline.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { GitlabCI } from "https://deno.land/x/fluent_gitlab_ci@v0.3.2/mod.ts"; -import { fmt, lint, test } from "./jobs.ts"; - -const pipeline = new GitlabCI() - .image("denoland/deno:alpine") - .addJob("fmt", fmt) - .addJob("lint", lint) - .addJob("test", test); - -export default pipeline; diff --git a/.fluentci/.fluentci/.fluentci/src/gitlab/pipeline_test.ts b/.fluentci/.fluentci/.fluentci/src/gitlab/pipeline_test.ts deleted file mode 100644 index ca247109..00000000 --- a/.fluentci/.fluentci/.fluentci/src/gitlab/pipeline_test.ts +++ /dev/null @@ -1,8 +0,0 @@ -import pipeline from "./pipeline.ts"; -import { assertEquals } from "https://deno.land/std@0.191.0/testing/asserts.ts"; - -Deno.test(function pipelineTest() { - const expected = Deno.readTextFileSync("./fixtures/.gitlab-ci.yml"); - const actual = pipeline.toString(); - assertEquals(actual, expected); -}); diff --git a/.fluentci/.fluentci/.github/workflows/ci.yml b/.fluentci/.fluentci/.github/workflows/ci.yml deleted file mode 100644 index b467bdbb..00000000 --- a/.fluentci/.fluentci/.github/workflows/ci.yml +++ /dev/null @@ -1,28 +0,0 @@ -# Do not edit this file directly. It is generated by Fluent Github Actions - -name: Codecov -on: - push: - branches: - - main -jobs: - tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: denoland/setup-deno@v1 - with: - deno-version: v1.37 - - name: Setup Fluent CI CLI - run: deno install -A -r https://cli.fluentci.io -n fluentci - - name: Setup Dagger - run: | - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - sudo mv bin/dagger /usr/local/bin - dagger version - - name: List Jobs - run: fluentci ls . - - name: Run Dagger Pipelines - run: dagger run fluentci . fmt lint test codecov - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.fluentci/.fluentci/.gitignore b/.fluentci/.fluentci/.gitignore deleted file mode 100644 index a2442bbf..00000000 --- a/.fluentci/.fluentci/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -coverage/ -coverage.lcov \ No newline at end of file diff --git a/.fluentci/.fluentci/CODE_OF_CONDUCT.md b/.fluentci/.fluentci/CODE_OF_CONDUCT.md deleted file mode 100644 index e9c20f9c..00000000 --- a/.fluentci/.fluentci/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,132 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -We as members, contributors, and leaders pledge to make participation in our -community a harassment-free experience for everyone, regardless of age, body -size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socio-economic status, -nationality, personal appearance, race, caste, color, religion, or sexual -identity and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, -diverse, inclusive, and healthy community. - -## Our Standards - -Examples of behavior that contributes to a positive environment for our -community include: - -- Demonstrating empathy and kindness toward other people -- Being respectful of differing opinions, viewpoints, and experiences -- Giving and gracefully accepting constructive feedback -- Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience -- Focusing on what is best not just for us as individuals, but for the overall - community - -Examples of unacceptable behavior include: - -- The use of sexualized language or imagery, and sexual attention or advances of - any kind -- Trolling, insulting or derogatory comments, and personal or political attacks -- Public or private harassment -- Publishing others' private information, such as a physical or email address, - without their explicit permission -- Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Enforcement Responsibilities - -Community leaders are responsible for clarifying and enforcing our standards of -acceptable behavior and will take appropriate and fair corrective action in -response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. - -Community leaders have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, and will communicate reasons for moderation -decisions when appropriate. - -## Scope - -This Code of Conduct applies within all community spaces, and also applies when -an individual is officially representing the community in public spaces. -Examples of representing our community include using an official e-mail address, -posting via an official social media account, or acting as an appointed -representative at an online or offline event. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at -[GitHub Issues](https://github.com/fluent-ci-templates/deno-pipeline/issues). -All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. - -## Enforcement Guidelines - -Community leaders will follow these Community Impact Guidelines in determining -the consequences for any action they deem in violation of this Code of Conduct: - -### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed -unprofessional or unwelcome in the community. - -**Consequence**: A private, written warning from community leaders, providing -clarity around the nature of the violation and an explanation of why the -behavior was inappropriate. A public apology may be requested. - -### 2. Warning - -**Community Impact**: A violation through a single incident or series of -actions. - -**Consequence**: A warning with consequences for continued behavior. No -interaction with the people involved, including unsolicited interaction with -those enforcing the Code of Conduct, for a specified period of time. This -includes avoiding interactions in community spaces as well as external channels -like social media. Violating these terms may lead to a temporary or permanent -ban. - -### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including -sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public -communication with the community for a specified period of time. No public or -private interaction with the people involved, including unsolicited interaction -with those enforcing the Code of Conduct, is allowed during this period. -Violating these terms may lead to a permanent ban. - -### 4. Permanent Ban - -**Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an -individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within the -community. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 2.1, available at -[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. - -Community Impact Guidelines were inspired by -[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. - -For answers to common questions about this code of conduct, see the FAQ at -[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at -[https://www.contributor-covenant.org/translations][translations]. - -[homepage]: https://www.contributor-covenant.org -[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html -[Mozilla CoC]: https://github.com/mozilla/diversity -[FAQ]: https://www.contributor-covenant.org/faq -[translations]: https://www.contributor-covenant.org/translations diff --git a/.fluentci/.fluentci/CONTRIBUTING.md b/.fluentci/.fluentci/CONTRIBUTING.md deleted file mode 100644 index e50de724..00000000 --- a/.fluentci/.fluentci/CONTRIBUTING.md +++ /dev/null @@ -1,70 +0,0 @@ -# Contributing Guidelines - -Thank you for your interest in contributing to our project. Whether it's a bug -report, new feature, correction, or additional documentation, we greatly value -feedback and contributions from our community. - -Please read through this document before submitting any issues or pull requests -to ensure we have all the necessary information to effectively respond to your -bug report or contribution. - -## Reporting Bugs/Feature Requests - -We welcome you to use the GitHub issue tracker to report bugs or suggest -features. - -When filing an issue, please check existing open, or recently closed, issues to -make sure somebody else hasn't already reported the issue. Please try to include -as much information as you can. Details like these are incredibly useful: - -- A reproducible test case or series of steps -- The version of our code being used -- Any modifications you've made relevant to the bug -- Anything unusual about your environment or deployment - -## Contributing via Pull Requests - -Contributions via pull requests are much appreciated. Before sending us a pull -request, please ensure that: - -1. You are working against the latest source on the _master_ branch. -2. You check existing open, and recently merged, pull requests to make sure - someone else hasn't addressed the problem already. -3. You open an issue to discuss any significant work - we would hate for your - time to be wasted. - -To send us a pull request, please: - -1. Fork the repository. -2. Modify the source; please focus on the specific change you are contributing. - If you also reformat all the code, it will be hard for us to focus on your - change. -3. Ensure local tests pass. -4. Commit to your fork using clear commit messages. -5. Send us a pull request, answering any default questions in the pull request - interface. -6. Pay attention to any automated CI failures reported in the pull request, and - stay involved in the conversation. - -GitHub provides additional document on -[forking a repository](https://help.github.com/articles/fork-a-repo/) and -[creating a pull request](https://help.github.com/articles/creating-a-pull-request/). - -## Finding contributions to work on - -Looking at the existing issues is a great way to find something to contribute -on. As our projects, by default, use the default GitHub issue labels -(enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any -'help wanted' issues is a great place to start. - -## Code of Conduct - -This project has adopted the -[Contributor Covenant](https://www.contributor-covenant.org/), version 2.1, -available at -https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. - -## Licensing - -See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to -confirm the licensing of your contribution. diff --git a/.fluentci/.fluentci/LICENSE b/.fluentci/.fluentci/LICENSE deleted file mode 100644 index d9ab36a4..00000000 --- a/.fluentci/.fluentci/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2023 Tsiry Sandratraina - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/.fluentci/.fluentci/README.md b/.fluentci/.fluentci/README.md deleted file mode 100644 index b8517c15..00000000 --- a/.fluentci/.fluentci/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# Deno Pipeline - -[![deno module](https://shield.deno.dev/x/deno_pipeline)](https://deno.land/x/deno_pipeline) -![deno compatibility](https://shield.deno.dev/deno/^1.34) -[![](https://img.shields.io/codecov/c/gh/fluent-ci-templates/deno-pipeline)](https://codecov.io/gh/fluent-ci-templates/deno-pipeline) - -A ready-to-use CI/CD Pipeline for your Deno projects. - -## ๐Ÿš€ Usage - -Run the following command: - -```bash -dagger run fluentci deno_pipeline -``` - -Or, if you want to use it as a template: - -```bash -fluentci init -t deno -``` - -This will create a `.fluentci` folder in your project. - -Now you can run the pipeline with: - -```bash -dagger run fluentci . -``` - -## Environment variables (Deno Deploy) - -| Variable | Description | Default | -| ----------------- | ------------------------- | ---------- | -| DENO_PROJECT | Your project name | | -| NO_STATIC | Disable static assets | `false` | -| EXCLUDE | Exclude files from deploy | | -| DENO_DEPLOY_TOKEN | Your Deno Deploy token | | -| DENO_MAIN_SCRIPT | Your main script | `main.tsx` | - -## Jobs - -| Job | Description | Options | -| ------ | ------------------------------ | ---------------------- | -| fmt | Format your code | | -| lint | Lint your code | | -| test | Run your tests | `{ ignore: string[] }` | -| deploy | Deploy your app to Deno Deploy | | - -## Programmatic usage - -You can also use this pipeline programmatically: - -```ts -import { Client, connect } from "https://esm.sh/@dagger.io/dagger@0.8.1"; -import { Dagger } from "https://deno.land/x/deno_pipeline/mod.ts"; - -const { fmt, lint, test } = Dagger; - -function pipeline(src = ".") { - connect(async (client: Client) => { - await fmt(client, src); - await lint(client, src); - await test(client, src); - }); -} - -pipeline(); -``` diff --git a/.fluentci/.fluentci/ci.ts b/.fluentci/.fluentci/ci.ts deleted file mode 100644 index 67e5a808..00000000 --- a/.fluentci/.fluentci/ci.ts +++ /dev/null @@ -1,12 +0,0 @@ -const command = new Deno.Command(Deno.execPath(), { - args: [ - "run", - "-A", - "--import-map=https://deno.land/x/deno_pipeline/import_map.json", - "https://deno.land/x/deno_pipeline/src/dagger/runner.ts", - ], -}); - -const { stdout } = await command.output(); - -console.log(new TextDecoder().decode(stdout)); diff --git a/.fluentci/.fluentci/deno.json b/.fluentci/.fluentci/deno.json deleted file mode 100644 index 42402195..00000000 --- a/.fluentci/.fluentci/deno.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "importMap": "import_map.json", - "tasks": { - "esm:add": "deno run -A https://esm.sh/v128 add", - "esm:update": "deno run -A https://esm.sh/v128 update", - "esm:remove": "deno run -A https://esm.sh/v128 remove", - "ci:dagger": "dagger run deno run -A src/dagger/runner.ts" - } -} diff --git a/.fluentci/.fluentci/deno.lock b/.fluentci/.fluentci/deno.lock deleted file mode 100644 index e6af1f43..00000000 --- a/.fluentci/.fluentci/deno.lock +++ /dev/null @@ -1,68 +0,0 @@ -{ - "version": "3", - "remote": { - "https://deno.land/std@0.150.0/media_types/_util.ts": "ce9b4fc4ba1c447dafab619055e20fd88236ca6bdd7834a21f98bd193c3fbfa1", - "https://deno.land/std@0.150.0/media_types/mod.ts": "2d4b6f32a087029272dc59e0a55ae3cc4d1b27b794ccf528e94b1925795b3118", - "https://deno.land/std@0.150.0/media_types/vendor/mime-db.v1.52.0.ts": "724cee25fa40f1a52d3937d6b4fbbfdd7791ff55e1b7ac08d9319d5632c7f5af", - "https://deno.land/std@0.191.0/fmt/colors.ts": "d67e3cd9f472535241a8e410d33423980bec45047e343577554d3356e1f0ef4e", - "https://deno.land/x/codecov_pipeline@v0.1.1/src/dagger/jobs.ts": "ea5ea4fb985f879fdd1c0aed77ac635ba090606c1ecce9d5f5c107493d287984", - "https://deno.land/x/nix_installer_pipeline@v0.3.6/src/dagger/steps.ts": "a34aea3753c7079de5877f592ce31f30d05d552155729ff3e695d77326405133", - "https://deno.land/x/xhr@0.3.0/mod.ts": "094aacd627fd9635cd942053bf8032b5223b909858fa9dc8ffa583752ff63b20", - "https://esm.sh/stringify-tree@1.1.1": "a0515b0f4fe97a6972047a588b7982592d9079e7aeac3323b0d26448a757cf84", - "https://esm.sh/v128/*@dagger.io/dagger@0.6.3": "cb691a77c0cdaee22f2b8393731b5143c83ce22dbbea204cdbfd203768d15b64", - "https://esm.sh/v128/@dagger.io/dagger@0.6.3/X-ZS8q/denonext/dagger.mjs": "fd0901784d75b99615b5409c3654b5c7edfc5ba377c9e1a5a67ffff4f7d3ac32", - "https://esm.sh/v128/adm-zip@0.5.10": "d9c54d6d2dd788462781a57d923295bd79304e6fd74b242fd4b30e35b39c5dcf", - "https://esm.sh/v128/adm-zip@0.5.10/denonext/adm-zip.mjs": "07a9731547905e0ca55ae917e1969d7f6d04fb3773f906ce3306891337eb4849", - "https://esm.sh/v128/chownr@2.0.0/denonext/chownr.mjs": "30b8f17084dfbe475a5052b615f706b06ddd17dca0535103340d485c6b94e952", - "https://esm.sh/v128/cross-fetch@3.1.8/denonext/cross-fetch.mjs": "8fba9e7c3fbaf0d2168beb63ce0cd21b5bfbfbd77e2fcbf8d957d533a71222f6", - "https://esm.sh/v128/cross-spawn@7.0.3/denonext/cross-spawn.mjs": "0569a26e7ad4b3376516cbc9b1942e10961a58030eadcea8c848e6b956eb355c", - "https://esm.sh/v128/data-uri-to-buffer@4.0.1/denonext/data-uri-to-buffer.mjs": "70ef987b1da58391495ecfad9888d996469224faf3cd996d81dc2e059feb9f31", - "https://esm.sh/v128/env-paths@3.0.0": "8400fb23319be9b30d7b40d1c865541c5b3c7726cdf9b74000bc0f1678d52ecf", - "https://esm.sh/v128/env-paths@3.0.0/denonext/env-paths.mjs": "77984a05eb16450087f25060a070ed500ec546719d471143e16d976ca73ca956", - "https://esm.sh/v128/execa@7.1.1": "a40c7030df81ab0847a5d844f4c5c6420af973dff05fef88e53cbb9b8667fdc2", - "https://esm.sh/v128/execa@7.1.1/denonext/execa.mjs": "9d5943544c0df3761b52f2c095f89a03ca6c028d818a8f0475ff883b0408f154", - "https://esm.sh/v128/fetch-blob@3.2.0/denonext/fetch-blob.mjs": "0531568b36c0f6db3e9825fbb2d08dee51100eb675c2bf1d98d6971a92010721", - "https://esm.sh/v128/fetch-blob@3.2.0/denonext/file.js": "fd82828163a4e7bdc15190d8c3dbfd92f93274d05bd7f7f5ab81093e3ad7e9c2", - "https://esm.sh/v128/fetch-blob@3.2.0/denonext/from.js": "7d3258c7960755497f90879806f0b815d5e564c2ac1523238af5cb9552ff5c45", - "https://esm.sh/v128/formdata-polyfill@4.0.10/denonext/esm.min.js": "b6d65a204e81eca699d9eb6f867e9efffa42db39a8f161690915a89e5eb1766f", - "https://esm.sh/v128/fs-minipass@2.1.0/denonext/fs-minipass.mjs": "74b00283d556b281bdfd6a669576d852f2c43702043c411985f8f8188d208c5d", - "https://esm.sh/v128/get-stream@6.0.1/denonext/get-stream.mjs": "a947a16f8cb3052fd654a84f8b36b40ce96b6a5acfb3ad4ab69d814bcf3351fb", - "https://esm.sh/v128/graphql-request@6.1.0": "17f00c323eb825811ce14e2b0e88a0c873acb666c382ac963d1edeb03e01f372", - "https://esm.sh/v128/graphql-request@6.1.0/denonext/graphql-request.mjs": "0b15f49d44489423ae6f06004725b6d050b6359da4969e6569bd6ad45065bd94", - "https://esm.sh/v128/graphql-tag@2.12.6": "5bfa27da9c9918fb52a01b8579891e804e0365d91118df1f2e0957a72dacdc39", - "https://esm.sh/v128/graphql-tag@2.12.6/denonext/graphql-tag.mjs": "331d09949efc4ac60c84a69b52a7da8b333210493900e54953ae4604c9874527", - "https://esm.sh/v128/graphql@16.7.1/denonext/graphql.mjs": "418ad7c07b0f2d687f33b6275d3b5f317f4afbef1f462f318229f458dff45416", - "https://esm.sh/v128/human-signals@4.3.1/denonext/human-signals.mjs": "3889110cedd907804443d018cffe0a1d892d5e7467661376caf967feff55cbe9", - "https://esm.sh/v128/is-stream@3.0.0/denonext/is-stream.mjs": "5c8b65f2fa051c4b18e88bbae11dac8bba9caf57752577d69bcea86d1f05c5b7", - "https://esm.sh/v128/isexe@2.0.0/denonext/isexe.mjs": "3cfefd270d1bfdfb864ee98dbb8f41d150cbf480925158f4a8f0ade8a9e17d6c", - "https://esm.sh/v128/merge-stream@2.0.0/denonext/merge-stream.mjs": "2c2af22401c294158d6bff659d157e3d2c028c218cc1bd2246534a45a4c03c61", - "https://esm.sh/v128/mimic-fn@4.0.0/denonext/mimic-fn.mjs": "10bcf0f2f20cbbba0c289ef7bf4d2422639bbc1c36c247be876afd6fe2d67138", - "https://esm.sh/v128/minipass@3.3.6/denonext/minipass.mjs": "59bbe430514455e78cb30c389b21af66efb2bf010cda071820a17d8c76d0d1cf", - "https://esm.sh/v128/minipass@5.0.0/denonext/minipass.mjs": "de0e049728f8c387b58c86439eb9d69a16b6a88756a6bc694e2fecbd7fd00401", - "https://esm.sh/v128/minizlib@2.1.2/denonext/minizlib.mjs": "0d919b6a0c60d5a31e14d748ff9d62aeae2923b604bcc6a22f90fa4bbd400d68", - "https://esm.sh/v128/mkdirp@1.0.4/denonext/mkdirp.mjs": "ee129b32e55dd8bede6b1bbd1978f7775fa5e2720d5a7ae07bf1e8c99abd77c7", - "https://esm.sh/v128/node-color-log@10.0.2": "05a277987c64153af1252167135076155fdc6b39ca260b2bdc39750da12d2a2d", - "https://esm.sh/v128/node-color-log@10.0.2/denonext/node-color-log.mjs": "2504391bd0ce1dd4c2bf0ed0b839b8a3ad84c028d9dd17cc58dccd2e14dacfde", - "https://esm.sh/v128/node-domexception@1.0.0/denonext/node-domexception.mjs": "bb35ba54c1a2b35870618876c0c96310a28ae58aecff33c8eed58a582e270ff4", - "https://esm.sh/v128/node-fetch@3.3.1": "916dcee177a69fb0e46970c528cb66fcd4973488f861844c0a235bfc645b0506", - "https://esm.sh/v128/node-fetch@3.3.1/denonext/node-fetch.mjs": "dc3a8f1f2fc9eb26d0d33e49f3750acc265d51a1a54bbd670c5d9f640b633a93", - "https://esm.sh/v128/node-fetch@3.3.1/denonext/src/utils/multipart-parser.js": "713b1b8cbafc4bfb7358debeb35d507e0d2328f0a28b8a2a7d79a3e5e4f5e5b8", - "https://esm.sh/v128/npm-run-path@5.1.0/denonext/npm-run-path.mjs": "3540b8c2dd1430f10d580f323f3a51aa30094da27a9220cce03ce69884b163bb", - "https://esm.sh/v128/onetime@6.0.0/denonext/onetime.mjs": "6e362222575d815f37fb813168d7069dd6a0f6bb6f972ed54d1bccb0f9fb3e1b", - "https://esm.sh/v128/original-fs@1.2.0/denonext/original-fs.mjs": "2b1098818e54d2c6748ff5b0dd9ea5f6a61b4b6d0f63fb625f21773d11cfc667", - "https://esm.sh/v128/path-key@3.1.1/denonext/path-key.mjs": "add83c631278b7df9b33ae84e41142db88bb291295bcc27eb4e77a1cbdfa71d0", - "https://esm.sh/v128/path-key@4.0.0/denonext/path-key.mjs": "2c2e3922bd0e6e414fa2752ff800bdc6b9208035ce797fa22e49b859f8259417", - "https://esm.sh/v128/shebang-command@2.0.0/denonext/shebang-command.mjs": "404e0fb09a782ca9495d53c721bb84b673b7b2e1054e021852143a6b91ca0e4f", - "https://esm.sh/v128/shebang-regex@3.0.0/denonext/shebang-regex.mjs": "03983ba59dd2cba9402935e21b46d05f5249364cba9f5757aef23c6c2fea65b9", - "https://esm.sh/v128/signal-exit@3.0.7/denonext/signal-exit.mjs": "2a176e5f9b351fa8057213c627a1503d63bf308b64447ef47f1ca6fbb2a91c81", - "https://esm.sh/v128/strip-final-newline@3.0.0/denonext/strip-final-newline.mjs": "03d9be4e8a249d63cbbddeb2fb675a1bbbcb335283e604d4ce56c88c90e6f102", - "https://esm.sh/v128/tar@6.1.15": "0460339f8aba5f287e8bebe258fe3fe13cb12f85820693f25724f0d98ef1258e", - "https://esm.sh/v128/tar@6.1.15/denonext/tar.mjs": "6194d892de8457b3b1f11d5cbacda1d540b453b45e8cb9f5f610abfb3e490b65", - "https://esm.sh/v128/tslib@2.6.0/denonext/tslib.mjs": "2215292e6fcf28a7a081eee911f127bb3c44cdd61ff0651e3e384d7a49b4e42b", - "https://esm.sh/v128/web-streams-polyfill@3.2.1/denonext/dist/ponyfill.es2018.js": "a2edb52a93494cda06386b3d6a168016b366e78f02c5eff1f94a0240be12ac96", - "https://esm.sh/v128/which@2.0.2/denonext/which.mjs": "86bf76e4937edb7fa3464d7bb9a426ef273684d1cefbec5ba5f1bdcb5cafff91", - "https://esm.sh/v128/yallist@4.0.0/denonext/yallist.mjs": "61f180d807dda50bac17028eda05d5722a3fecef6e98a9064e2353ea6864fd82", - "https://esm.sh/v132/lodash.flatten@4.4.0/denonext/lodash.flatten.mjs": "8e86ab607deea15cc3c1acfb5eae278ecbc5b80f24167b4e8f4c56df3278cd55", - "https://esm.sh/v132/stringify-tree@1.1.1/denonext/stringify-tree.mjs": "eaa9333a5219638ad170d12e12603ae00ae80fc8bf02cc112cfec7294e6bcb43" - } -} diff --git a/.fluentci/.fluentci/example/.fluentci/.devcontainer/devcontainer.json b/.fluentci/.fluentci/example/.fluentci/.devcontainer/devcontainer.json deleted file mode 100644 index 39a38aea..00000000 --- a/.fluentci/.fluentci/example/.fluentci/.devcontainer/devcontainer.json +++ /dev/null @@ -1,25 +0,0 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/debian -{ - "name": "Debian", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/base:bullseye", - "features": { - "ghcr.io/devcontainers/features/github-cli:1": {}, - "ghcr.io/devcontainers/features/nix:1": {} - }, - - // Features to add to the dev container. More info: https://containers.dev/features. - // "features": {}, - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "nix develop --experimental-features \"nix-command flakes\"" - // Configure tool-specific properties. - // "customizations": {}, - - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" -} diff --git a/.fluentci/.fluentci/example/.fluentci/.fluentci/.devcontainer/devcontainer.json b/.fluentci/.fluentci/example/.fluentci/.fluentci/.devcontainer/devcontainer.json deleted file mode 100644 index 39a38aea..00000000 --- a/.fluentci/.fluentci/example/.fluentci/.fluentci/.devcontainer/devcontainer.json +++ /dev/null @@ -1,25 +0,0 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/debian -{ - "name": "Debian", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/base:bullseye", - "features": { - "ghcr.io/devcontainers/features/github-cli:1": {}, - "ghcr.io/devcontainers/features/nix:1": {} - }, - - // Features to add to the dev container. More info: https://containers.dev/features. - // "features": {}, - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "nix develop --experimental-features \"nix-command flakes\"" - // Configure tool-specific properties. - // "customizations": {}, - - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" -} diff --git a/.fluentci/.fluentci/example/.fluentci/.fluentci/.github/workflows/ci.yml b/.fluentci/.fluentci/example/.fluentci/.fluentci/.github/workflows/ci.yml deleted file mode 100644 index a7f9464b..00000000 --- a/.fluentci/.fluentci/example/.fluentci/.fluentci/.github/workflows/ci.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Codecov - -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: denoland/setup-deno@v1 - with: - deno-version: v1.34 - - name: Create coverage files - run: deno test --allow-read --coverage=coverage --lock-write # create coverage files - - name: Create coverage report - run: deno coverage ./coverage --lcov > coverage.lcov # create coverage report - - name: Collect coverage - uses: codecov/codecov-action@v3 # upload the report on Codecov - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - with: - file: ./coverage.lcov diff --git a/.fluentci/.fluentci/example/.fluentci/.fluentci/CODE_OF_CONDUCT.md b/.fluentci/.fluentci/example/.fluentci/.fluentci/CODE_OF_CONDUCT.md deleted file mode 100644 index e9c20f9c..00000000 --- a/.fluentci/.fluentci/example/.fluentci/.fluentci/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,132 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -We as members, contributors, and leaders pledge to make participation in our -community a harassment-free experience for everyone, regardless of age, body -size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socio-economic status, -nationality, personal appearance, race, caste, color, religion, or sexual -identity and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, -diverse, inclusive, and healthy community. - -## Our Standards - -Examples of behavior that contributes to a positive environment for our -community include: - -- Demonstrating empathy and kindness toward other people -- Being respectful of differing opinions, viewpoints, and experiences -- Giving and gracefully accepting constructive feedback -- Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience -- Focusing on what is best not just for us as individuals, but for the overall - community - -Examples of unacceptable behavior include: - -- The use of sexualized language or imagery, and sexual attention or advances of - any kind -- Trolling, insulting or derogatory comments, and personal or political attacks -- Public or private harassment -- Publishing others' private information, such as a physical or email address, - without their explicit permission -- Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Enforcement Responsibilities - -Community leaders are responsible for clarifying and enforcing our standards of -acceptable behavior and will take appropriate and fair corrective action in -response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. - -Community leaders have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, and will communicate reasons for moderation -decisions when appropriate. - -## Scope - -This Code of Conduct applies within all community spaces, and also applies when -an individual is officially representing the community in public spaces. -Examples of representing our community include using an official e-mail address, -posting via an official social media account, or acting as an appointed -representative at an online or offline event. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at -[GitHub Issues](https://github.com/fluent-ci-templates/deno-pipeline/issues). -All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. - -## Enforcement Guidelines - -Community leaders will follow these Community Impact Guidelines in determining -the consequences for any action they deem in violation of this Code of Conduct: - -### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed -unprofessional or unwelcome in the community. - -**Consequence**: A private, written warning from community leaders, providing -clarity around the nature of the violation and an explanation of why the -behavior was inappropriate. A public apology may be requested. - -### 2. Warning - -**Community Impact**: A violation through a single incident or series of -actions. - -**Consequence**: A warning with consequences for continued behavior. No -interaction with the people involved, including unsolicited interaction with -those enforcing the Code of Conduct, for a specified period of time. This -includes avoiding interactions in community spaces as well as external channels -like social media. Violating these terms may lead to a temporary or permanent -ban. - -### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including -sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public -communication with the community for a specified period of time. No public or -private interaction with the people involved, including unsolicited interaction -with those enforcing the Code of Conduct, is allowed during this period. -Violating these terms may lead to a permanent ban. - -### 4. Permanent Ban - -**Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an -individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within the -community. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 2.1, available at -[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. - -Community Impact Guidelines were inspired by -[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. - -For answers to common questions about this code of conduct, see the FAQ at -[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at -[https://www.contributor-covenant.org/translations][translations]. - -[homepage]: https://www.contributor-covenant.org -[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html -[Mozilla CoC]: https://github.com/mozilla/diversity -[FAQ]: https://www.contributor-covenant.org/faq -[translations]: https://www.contributor-covenant.org/translations diff --git a/.fluentci/.fluentci/example/.fluentci/.fluentci/CONTRIBUTING.md b/.fluentci/.fluentci/example/.fluentci/.fluentci/CONTRIBUTING.md deleted file mode 100644 index e50de724..00000000 --- a/.fluentci/.fluentci/example/.fluentci/.fluentci/CONTRIBUTING.md +++ /dev/null @@ -1,70 +0,0 @@ -# Contributing Guidelines - -Thank you for your interest in contributing to our project. Whether it's a bug -report, new feature, correction, or additional documentation, we greatly value -feedback and contributions from our community. - -Please read through this document before submitting any issues or pull requests -to ensure we have all the necessary information to effectively respond to your -bug report or contribution. - -## Reporting Bugs/Feature Requests - -We welcome you to use the GitHub issue tracker to report bugs or suggest -features. - -When filing an issue, please check existing open, or recently closed, issues to -make sure somebody else hasn't already reported the issue. Please try to include -as much information as you can. Details like these are incredibly useful: - -- A reproducible test case or series of steps -- The version of our code being used -- Any modifications you've made relevant to the bug -- Anything unusual about your environment or deployment - -## Contributing via Pull Requests - -Contributions via pull requests are much appreciated. Before sending us a pull -request, please ensure that: - -1. You are working against the latest source on the _master_ branch. -2. You check existing open, and recently merged, pull requests to make sure - someone else hasn't addressed the problem already. -3. You open an issue to discuss any significant work - we would hate for your - time to be wasted. - -To send us a pull request, please: - -1. Fork the repository. -2. Modify the source; please focus on the specific change you are contributing. - If you also reformat all the code, it will be hard for us to focus on your - change. -3. Ensure local tests pass. -4. Commit to your fork using clear commit messages. -5. Send us a pull request, answering any default questions in the pull request - interface. -6. Pay attention to any automated CI failures reported in the pull request, and - stay involved in the conversation. - -GitHub provides additional document on -[forking a repository](https://help.github.com/articles/fork-a-repo/) and -[creating a pull request](https://help.github.com/articles/creating-a-pull-request/). - -## Finding contributions to work on - -Looking at the existing issues is a great way to find something to contribute -on. As our projects, by default, use the default GitHub issue labels -(enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any -'help wanted' issues is a great place to start. - -## Code of Conduct - -This project has adopted the -[Contributor Covenant](https://www.contributor-covenant.org/), version 2.1, -available at -https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. - -## Licensing - -See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to -confirm the licensing of your contribution. diff --git a/.fluentci/.fluentci/example/.fluentci/.fluentci/LICENSE b/.fluentci/.fluentci/example/.fluentci/.fluentci/LICENSE deleted file mode 100644 index d9ab36a4..00000000 --- a/.fluentci/.fluentci/example/.fluentci/.fluentci/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2023 Tsiry Sandratraina - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/.fluentci/.fluentci/example/.fluentci/.fluentci/README.md b/.fluentci/.fluentci/example/.fluentci/.fluentci/README.md deleted file mode 100644 index 23f6a94b..00000000 --- a/.fluentci/.fluentci/example/.fluentci/.fluentci/README.md +++ /dev/null @@ -1,88 +0,0 @@ -# Deno Pipeline - -[![deno module](https://shield.deno.dev/x/deno_pipeline)](https://deno.land/x/deno_pipeline) -![deno compatibility](https://shield.deno.dev/deno/^1.34) -[![](https://img.shields.io/codecov/c/gh/fluent-ci-templates/deno-pipeline)](https://codecov.io/gh/fluent-ci-templates/deno-pipeline) - -A ready-to-use GitLab CI Pipeline and Jobs for your Deno projects. - -## ๐Ÿš€ Usage - -Quick start: - -```ts -import { GitLab } from "https://deno.land/x/deno_pipeline/mod.ts"; - -const { pipeline } = GitLab; - -pipeline.write(); // Write the pipeline to the file .gitlab-ci.yml -``` - -Or, if you want to use the predefined jobs: - -```ts -import { GitlabCI } from "https://deno.land/x/fluent_gitlab_ci/mod.ts"; -import { GitLab } from "https://deno.land/x/deno_pipeline/mod.ts"; - -const { fmt, lint, test } = GitLab; - -const const pipeline = new GitlabCI() - .image("denoland/deno:alpine") - .addJob("fmt", fmt) - .addJob("lint", lint) - .addJob("test", test); - -pipeline.write(); // Write the pipeline to the file .gitlab-ci.yml -``` - -It will generate the following `.gitlab-ci.yml` file: - -```yaml -# Do not edit this file directly. It is generated by Fluent GitLab CI - -image: denoland/deno:alpine - -fmt: - image: denoland/deno:alpine - script: - - deno fmt --check - -lint: - image: denoland/deno:alpine - script: - - deno lint - -test: - image: denoland/deno:alpine - script: - - deno test -``` - -## ๐Ÿงช Advanced Usage - -This package also provides a ready-to-use pipeline for -[Dagger](https://dagger.io/), just run the following command on your Deno -project: - -```sh -dagger run deno run -A https://deno.land/x/deno_pipeline/ci.ts -``` - -Or, if you want to use the predefined jobs: - -```ts -import Client, { connect } from "@dagger.io/dagger"; -import { Dagger } from "https://deno.land/x/deno_pipeline/mod.ts"; - -const { fmt, lint, test } = Dagger; - -function pipeline(src = ".") { - connect(async (client: Client) => { - await fmt(client, src); - await lint(client, src); - await test(client, src); - }); -} - -pipeline(); -``` diff --git a/.fluentci/.fluentci/example/.fluentci/.fluentci/ci.ts b/.fluentci/.fluentci/example/.fluentci/.fluentci/ci.ts deleted file mode 100644 index 67e5a808..00000000 --- a/.fluentci/.fluentci/example/.fluentci/.fluentci/ci.ts +++ /dev/null @@ -1,12 +0,0 @@ -const command = new Deno.Command(Deno.execPath(), { - args: [ - "run", - "-A", - "--import-map=https://deno.land/x/deno_pipeline/import_map.json", - "https://deno.land/x/deno_pipeline/src/dagger/runner.ts", - ], -}); - -const { stdout } = await command.output(); - -console.log(new TextDecoder().decode(stdout)); diff --git a/.fluentci/.fluentci/example/.fluentci/.fluentci/deno.json b/.fluentci/.fluentci/example/.fluentci/.fluentci/deno.json deleted file mode 100644 index 42402195..00000000 --- a/.fluentci/.fluentci/example/.fluentci/.fluentci/deno.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "importMap": "import_map.json", - "tasks": { - "esm:add": "deno run -A https://esm.sh/v128 add", - "esm:update": "deno run -A https://esm.sh/v128 update", - "esm:remove": "deno run -A https://esm.sh/v128 remove", - "ci:dagger": "dagger run deno run -A src/dagger/runner.ts" - } -} diff --git a/.fluentci/.fluentci/example/.fluentci/.fluentci/deno.lock b/.fluentci/.fluentci/example/.fluentci/.fluentci/deno.lock deleted file mode 100644 index 23cc8781..00000000 --- a/.fluentci/.fluentci/example/.fluentci/.fluentci/deno.lock +++ /dev/null @@ -1,66 +0,0 @@ -{ - "version": "2", - "remote": { - "https://deno.land/std@0.150.0/media_types/_util.ts": "ce9b4fc4ba1c447dafab619055e20fd88236ca6bdd7834a21f98bd193c3fbfa1", - "https://deno.land/std@0.150.0/media_types/mod.ts": "2d4b6f32a087029272dc59e0a55ae3cc4d1b27b794ccf528e94b1925795b3118", - "https://deno.land/std@0.150.0/media_types/vendor/mime-db.v1.52.0.ts": "724cee25fa40f1a52d3937d6b4fbbfdd7791ff55e1b7ac08d9319d5632c7f5af", - "https://deno.land/std@0.191.0/fmt/colors.ts": "d67e3cd9f472535241a8e410d33423980bec45047e343577554d3356e1f0ef4e", - "https://deno.land/x/xhr@0.3.0/mod.ts": "094aacd627fd9635cd942053bf8032b5223b909858fa9dc8ffa583752ff63b20", - "https://esm.sh/stringify-tree@1.1.1": "8d994a105481fa944515323d89bd2596c1de79f3d9bd1386266463934716eca0", - "https://esm.sh/v128/*@dagger.io/dagger@0.6.3": "cb691a77c0cdaee22f2b8393731b5143c83ce22dbbea204cdbfd203768d15b64", - "https://esm.sh/v128/@dagger.io/dagger@0.6.3/X-ZS8q/denonext/dagger.mjs": "fd0901784d75b99615b5409c3654b5c7edfc5ba377c9e1a5a67ffff4f7d3ac32", - "https://esm.sh/v128/adm-zip@0.5.10": "d9c54d6d2dd788462781a57d923295bd79304e6fd74b242fd4b30e35b39c5dcf", - "https://esm.sh/v128/adm-zip@0.5.10/denonext/adm-zip.mjs": "07a9731547905e0ca55ae917e1969d7f6d04fb3773f906ce3306891337eb4849", - "https://esm.sh/v128/chownr@2.0.0/denonext/chownr.mjs": "30b8f17084dfbe475a5052b615f706b06ddd17dca0535103340d485c6b94e952", - "https://esm.sh/v128/cross-fetch@3.1.8/denonext/cross-fetch.mjs": "8fba9e7c3fbaf0d2168beb63ce0cd21b5bfbfbd77e2fcbf8d957d533a71222f6", - "https://esm.sh/v128/cross-spawn@7.0.3/denonext/cross-spawn.mjs": "0569a26e7ad4b3376516cbc9b1942e10961a58030eadcea8c848e6b956eb355c", - "https://esm.sh/v128/data-uri-to-buffer@4.0.1/denonext/data-uri-to-buffer.mjs": "70ef987b1da58391495ecfad9888d996469224faf3cd996d81dc2e059feb9f31", - "https://esm.sh/v128/env-paths@3.0.0": "8400fb23319be9b30d7b40d1c865541c5b3c7726cdf9b74000bc0f1678d52ecf", - "https://esm.sh/v128/env-paths@3.0.0/denonext/env-paths.mjs": "77984a05eb16450087f25060a070ed500ec546719d471143e16d976ca73ca956", - "https://esm.sh/v128/execa@7.1.1": "a40c7030df81ab0847a5d844f4c5c6420af973dff05fef88e53cbb9b8667fdc2", - "https://esm.sh/v128/execa@7.1.1/denonext/execa.mjs": "9d5943544c0df3761b52f2c095f89a03ca6c028d818a8f0475ff883b0408f154", - "https://esm.sh/v128/fetch-blob@3.2.0/denonext/fetch-blob.mjs": "0531568b36c0f6db3e9825fbb2d08dee51100eb675c2bf1d98d6971a92010721", - "https://esm.sh/v128/fetch-blob@3.2.0/denonext/file.js": "fd82828163a4e7bdc15190d8c3dbfd92f93274d05bd7f7f5ab81093e3ad7e9c2", - "https://esm.sh/v128/fetch-blob@3.2.0/denonext/from.js": "7d3258c7960755497f90879806f0b815d5e564c2ac1523238af5cb9552ff5c45", - "https://esm.sh/v128/formdata-polyfill@4.0.10/denonext/esm.min.js": "b6d65a204e81eca699d9eb6f867e9efffa42db39a8f161690915a89e5eb1766f", - "https://esm.sh/v128/fs-minipass@2.1.0/denonext/fs-minipass.mjs": "74b00283d556b281bdfd6a669576d852f2c43702043c411985f8f8188d208c5d", - "https://esm.sh/v128/get-stream@6.0.1/denonext/get-stream.mjs": "a947a16f8cb3052fd654a84f8b36b40ce96b6a5acfb3ad4ab69d814bcf3351fb", - "https://esm.sh/v128/graphql-request@6.1.0": "17f00c323eb825811ce14e2b0e88a0c873acb666c382ac963d1edeb03e01f372", - "https://esm.sh/v128/graphql-request@6.1.0/denonext/graphql-request.mjs": "0b15f49d44489423ae6f06004725b6d050b6359da4969e6569bd6ad45065bd94", - "https://esm.sh/v128/graphql-tag@2.12.6": "5bfa27da9c9918fb52a01b8579891e804e0365d91118df1f2e0957a72dacdc39", - "https://esm.sh/v128/graphql-tag@2.12.6/denonext/graphql-tag.mjs": "331d09949efc4ac60c84a69b52a7da8b333210493900e54953ae4604c9874527", - "https://esm.sh/v128/graphql@16.7.1/denonext/graphql.mjs": "418ad7c07b0f2d687f33b6275d3b5f317f4afbef1f462f318229f458dff45416", - "https://esm.sh/v128/human-signals@4.3.1/denonext/human-signals.mjs": "3889110cedd907804443d018cffe0a1d892d5e7467661376caf967feff55cbe9", - "https://esm.sh/v128/is-stream@3.0.0/denonext/is-stream.mjs": "5c8b65f2fa051c4b18e88bbae11dac8bba9caf57752577d69bcea86d1f05c5b7", - "https://esm.sh/v128/isexe@2.0.0/denonext/isexe.mjs": "3cfefd270d1bfdfb864ee98dbb8f41d150cbf480925158f4a8f0ade8a9e17d6c", - "https://esm.sh/v128/merge-stream@2.0.0/denonext/merge-stream.mjs": "2c2af22401c294158d6bff659d157e3d2c028c218cc1bd2246534a45a4c03c61", - "https://esm.sh/v128/mimic-fn@4.0.0/denonext/mimic-fn.mjs": "10bcf0f2f20cbbba0c289ef7bf4d2422639bbc1c36c247be876afd6fe2d67138", - "https://esm.sh/v128/minipass@3.3.6/denonext/minipass.mjs": "59bbe430514455e78cb30c389b21af66efb2bf010cda071820a17d8c76d0d1cf", - "https://esm.sh/v128/minipass@5.0.0/denonext/minipass.mjs": "de0e049728f8c387b58c86439eb9d69a16b6a88756a6bc694e2fecbd7fd00401", - "https://esm.sh/v128/minizlib@2.1.2/denonext/minizlib.mjs": "0d919b6a0c60d5a31e14d748ff9d62aeae2923b604bcc6a22f90fa4bbd400d68", - "https://esm.sh/v128/mkdirp@1.0.4/denonext/mkdirp.mjs": "ee129b32e55dd8bede6b1bbd1978f7775fa5e2720d5a7ae07bf1e8c99abd77c7", - "https://esm.sh/v128/node-color-log@10.0.2": "05a277987c64153af1252167135076155fdc6b39ca260b2bdc39750da12d2a2d", - "https://esm.sh/v128/node-color-log@10.0.2/denonext/node-color-log.mjs": "2504391bd0ce1dd4c2bf0ed0b839b8a3ad84c028d9dd17cc58dccd2e14dacfde", - "https://esm.sh/v128/node-domexception@1.0.0/denonext/node-domexception.mjs": "bb35ba54c1a2b35870618876c0c96310a28ae58aecff33c8eed58a582e270ff4", - "https://esm.sh/v128/node-fetch@3.3.1": "916dcee177a69fb0e46970c528cb66fcd4973488f861844c0a235bfc645b0506", - "https://esm.sh/v128/node-fetch@3.3.1/denonext/node-fetch.mjs": "dc3a8f1f2fc9eb26d0d33e49f3750acc265d51a1a54bbd670c5d9f640b633a93", - "https://esm.sh/v128/node-fetch@3.3.1/denonext/src/utils/multipart-parser.js": "713b1b8cbafc4bfb7358debeb35d507e0d2328f0a28b8a2a7d79a3e5e4f5e5b8", - "https://esm.sh/v128/npm-run-path@5.1.0/denonext/npm-run-path.mjs": "3540b8c2dd1430f10d580f323f3a51aa30094da27a9220cce03ce69884b163bb", - "https://esm.sh/v128/onetime@6.0.0/denonext/onetime.mjs": "6e362222575d815f37fb813168d7069dd6a0f6bb6f972ed54d1bccb0f9fb3e1b", - "https://esm.sh/v128/original-fs@1.2.0/denonext/original-fs.mjs": "2b1098818e54d2c6748ff5b0dd9ea5f6a61b4b6d0f63fb625f21773d11cfc667", - "https://esm.sh/v128/path-key@3.1.1/denonext/path-key.mjs": "add83c631278b7df9b33ae84e41142db88bb291295bcc27eb4e77a1cbdfa71d0", - "https://esm.sh/v128/path-key@4.0.0/denonext/path-key.mjs": "2c2e3922bd0e6e414fa2752ff800bdc6b9208035ce797fa22e49b859f8259417", - "https://esm.sh/v128/shebang-command@2.0.0/denonext/shebang-command.mjs": "404e0fb09a782ca9495d53c721bb84b673b7b2e1054e021852143a6b91ca0e4f", - "https://esm.sh/v128/shebang-regex@3.0.0/denonext/shebang-regex.mjs": "03983ba59dd2cba9402935e21b46d05f5249364cba9f5757aef23c6c2fea65b9", - "https://esm.sh/v128/signal-exit@3.0.7/denonext/signal-exit.mjs": "2a176e5f9b351fa8057213c627a1503d63bf308b64447ef47f1ca6fbb2a91c81", - "https://esm.sh/v128/strip-final-newline@3.0.0/denonext/strip-final-newline.mjs": "03d9be4e8a249d63cbbddeb2fb675a1bbbcb335283e604d4ce56c88c90e6f102", - "https://esm.sh/v128/tar@6.1.15": "0460339f8aba5f287e8bebe258fe3fe13cb12f85820693f25724f0d98ef1258e", - "https://esm.sh/v128/tar@6.1.15/denonext/tar.mjs": "6194d892de8457b3b1f11d5cbacda1d540b453b45e8cb9f5f610abfb3e490b65", - "https://esm.sh/v128/tslib@2.6.0/denonext/tslib.mjs": "2215292e6fcf28a7a081eee911f127bb3c44cdd61ff0651e3e384d7a49b4e42b", - "https://esm.sh/v128/web-streams-polyfill@3.2.1/denonext/dist/ponyfill.es2018.js": "a2edb52a93494cda06386b3d6a168016b366e78f02c5eff1f94a0240be12ac96", - "https://esm.sh/v128/which@2.0.2/denonext/which.mjs": "86bf76e4937edb7fa3464d7bb9a426ef273684d1cefbec5ba5f1bdcb5cafff91", - "https://esm.sh/v128/yallist@4.0.0/denonext/yallist.mjs": "61f180d807dda50bac17028eda05d5722a3fecef6e98a9064e2353ea6864fd82", - "https://esm.sh/v130/lodash.flatten@4.4.0/denonext/lodash.flatten.mjs": "8e86ab607deea15cc3c1acfb5eae278ecbc5b80f24167b4e8f4c56df3278cd55", - "https://esm.sh/v130/stringify-tree@1.1.1/denonext/stringify-tree.mjs": "40a9d40e0282b5432302a3da68b88aa11685bc0b8a0b70246168deed5c5773fe" - } -} diff --git a/.fluentci/.fluentci/example/.fluentci/.fluentci/fixtures/.gitlab-ci.yml b/.fluentci/.fluentci/example/.fluentci/.fluentci/fixtures/.gitlab-ci.yml deleted file mode 100644 index 299e4c62..00000000 --- a/.fluentci/.fluentci/example/.fluentci/.fluentci/fixtures/.gitlab-ci.yml +++ /dev/null @@ -1,19 +0,0 @@ -# Do not edit this file directly. It is generated by Fluent GitLab CI - -image: denoland/deno:alpine - -fmt: - image: denoland/deno:alpine - script: - - deno fmt --check - -lint: - image: denoland/deno:alpine - script: - - deno lint - -test: - image: denoland/deno:alpine - script: - - deno test - diff --git a/.fluentci/.fluentci/example/.fluentci/.fluentci/flake.lock b/.fluentci/.fluentci/example/.fluentci/.fluentci/flake.lock deleted file mode 100644 index af7453c0..00000000 --- a/.fluentci/.fluentci/example/.fluentci/.fluentci/flake.lock +++ /dev/null @@ -1,61 +0,0 @@ -{ - "nodes": { - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1687709756, - "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1688910226, - "narHash": "sha256-kLTsFu9CAU2Gb288JhIBN/WlX4UUUDz4WiC/U59nvwk=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "2540432a940aee979be6ccfefba9ea0652c273a0", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "release-23.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/.fluentci/.fluentci/example/.fluentci/.fluentci/flake.nix b/.fluentci/.fluentci/example/.fluentci/.fluentci/flake.nix deleted file mode 100644 index b13ea7df..00000000 --- a/.fluentci/.fluentci/example/.fluentci/.fluentci/flake.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ - description = "A Nix-flake-based Deno development environment"; - - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/release-23.05"; - flake-utils.url = "github:numtide/flake-utils"; - }; - - outputs = { - self, - nixpkgs, - flake-utils, - }: - flake-utils.lib.eachDefaultSystem - (system: let - pkgs = import nixpkgs { - inherit system; - }; - in { - devShells.default = pkgs.mkShell { - buildInputs = [ - pkgs.deno - ]; - }; - }); -} \ No newline at end of file diff --git a/.fluentci/.fluentci/example/.fluentci/.fluentci/import_map.json b/.fluentci/.fluentci/example/.fluentci/.fluentci/import_map.json deleted file mode 100644 index 801ea9a7..00000000 --- a/.fluentci/.fluentci/example/.fluentci/.fluentci/import_map.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "imports": { - "@dagger.io/dagger": "https://esm.sh/v128/*@dagger.io/dagger@0.6.3", - "fluent_gitlab_ci": "https://deno.land/x/fluent_gitlab_ci@v0.3.2/mod.ts", - "url": "node:url", - "readline": "node:readline", - "process": "node:process", - "path": "node:path", - "os": "node:os", - "fs": "node:fs", - "crypto": "node:crypto" - }, - "scopes": { - "https://esm.sh/v128/": { - "@lifeomic/axios-fetch": "https://esm.sh/v128/@lifeomic/axios-fetch@3.0.1", - "adm-zip": "https://esm.sh/v128/adm-zip@0.5.10", - "env-paths": "https://esm.sh/v128/env-paths@3.0.0", - "execa": "https://esm.sh/v128/execa@7.1.1", - "graphql-request": "https://esm.sh/v128/graphql-request@6.1.0", - "graphql-tag": "https://esm.sh/v128/graphql-tag@2.12.6", - "graphql": "https://esm.sh/v128/graphql@16.7.1", - "node-color-log": "https://esm.sh/v128/node-color-log@10.0.2", - "node-fetch": "https://esm.sh/v128/node-fetch@3.3.1", - "tar": "https://esm.sh/v128/tar@6.1.15" - } - } -} diff --git a/.fluentci/.fluentci/example/.fluentci/.fluentci/mod.ts b/.fluentci/.fluentci/example/.fluentci/.fluentci/mod.ts deleted file mode 100644 index 6152fb62..00000000 --- a/.fluentci/.fluentci/example/.fluentci/.fluentci/mod.ts +++ /dev/null @@ -1,4 +0,0 @@ -import * as GitLab from "./src/gitlab/index.ts"; -import * as Dagger from "./src/dagger/index.ts"; - -export { Dagger, GitLab }; diff --git a/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/index.ts b/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/index.ts deleted file mode 100644 index 392c0011..00000000 --- a/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import pipeline from "./pipeline.ts"; -import { fmt, lint, test } from "./jobs.ts"; - -export { fmt, lint, pipeline, test }; diff --git a/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/jobs.ts b/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/jobs.ts deleted file mode 100644 index 42b45545..00000000 --- a/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/jobs.ts +++ /dev/null @@ -1,111 +0,0 @@ -import Client from "@dagger.io/dagger"; -import { existsSync } from "fs"; - -export enum Job { - fmt = "fmt", - lint = "lint", - test = "test", -} - -export const lint = async (client: Client, src = ".") => { - const context = client.host().directory(src); - let command = ["deno", "lint"]; - - if (existsSync("devbox.json")) { - command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; - } - - const ctr = client - .pipeline(Job.lint) - .container() - .from("denoland/deno:alpine") - .withDirectory("/app", context, { - exclude: [".git", ".devbox", ".fluentci"], - }) - .withWorkdir("/app") - .withExec(command); - - const result = await ctr.stdout(); - - console.log(result); -}; - -export const fmt = async (client: Client, src = ".") => { - const context = client.host().directory(src); - let command = ["deno", "fmt"]; - - if (existsSync("devbox.json")) { - command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; - } - - const ctr = client - .pipeline(Job.fmt) - .container() - .from("denoland/deno:alpine") - .withDirectory("/app", context, { - exclude: [".git", ".devbox", ".fluentci"], - }) - .withWorkdir("/app") - .withExec(command); - - const result = await ctr.stdout(); - - console.log(result); -}; - -export const test = async ( - client: Client, - src = ".", - options: { ignore: string[] } = { ignore: [] } -) => { - const context = client.host().directory(src); - let command = ["deno", "test", "-A", "--lock-write"]; - - if (options.ignore.length > 0) { - command = command.concat([`--ignore=${options.ignore.join(",")}`]); - } - - if (existsSync("devbox.json")) { - command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; - } - - const ctr = client - .pipeline(Job.test) - .container() - .from("denoland/deno:alpine") - .withDirectory("/app", context, { - exclude: [".git", ".devbox", ".fluentci"], - }) - .withWorkdir("/app") - .withMountedCache("/root/.cache/deno", client.cacheVolume("deno-cache")) - .withExec(command); - - const result = await ctr.stdout(); - - console.log(result); -}; - -export type JobExec = ( - client: Client, - src?: string -) => - | Promise - | (( - client: Client, - src?: string, - options?: { - ignore: string[]; - } - ) => Promise); - -export const runnableJobs: Record = { - [Job.fmt]: fmt, - [Job.lint]: lint, - [Job.test]: test, -}; - -export const jobDescriptions: Record = { - [Job.fmt]: "Format your code", - [Job.lint]: "Lint your code", - [Job.test]: "Run your tests", -}; diff --git a/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/list_jobs.ts b/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/list_jobs.ts deleted file mode 100644 index 12bb3cbb..00000000 --- a/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/list_jobs.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { brightGreen } from "https://deno.land/std@0.191.0/fmt/colors.ts"; -import { runnableJobs, jobDescriptions, Job } from "./jobs.ts"; -import { stringifyTree } from "https://esm.sh/stringify-tree@1.1.1"; - -const tree = { - name: brightGreen("deno_pipeline"), - children: (Object.keys(runnableJobs) as Job[]).map((job) => ({ - name: jobDescriptions[job] - ? `${brightGreen(job)} - ${jobDescriptions[job]}` - : brightGreen(job), - children: [], - })), -}; - -console.log( - stringifyTree( - tree, - (t) => t.name, - (t) => t.children - ) -); diff --git a/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/pipeline.ts b/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/pipeline.ts deleted file mode 100644 index bad73729..00000000 --- a/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/pipeline.ts +++ /dev/null @@ -1,27 +0,0 @@ -import Client, { connect } from "@dagger.io/dagger"; -import * as jobs from "./jobs.ts"; - -const { fmt, lint, test, runnableJobs } = jobs; - -export default function pipeline(src = ".", args: string[] = []) { - connect(async (client: Client) => { - if (args.length > 0) { - await runSpecificJobs(client, args as jobs.Job[]); - return; - } - - await fmt(client, src); - await lint(client, src); - await test(client, src); - }); -} - -async function runSpecificJobs(client: Client, args: jobs.Job[]) { - for (const name of args) { - const job = runnableJobs[name]; - if (!job) { - throw new Error(`Job ${name} not found`); - } - await job(client); - } -} diff --git a/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/runner.ts b/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/runner.ts deleted file mode 100644 index e23879e7..00000000 --- a/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/runner.ts +++ /dev/null @@ -1,3 +0,0 @@ -import pipeline from "./pipeline.ts"; - -pipeline(".", Deno.args); diff --git a/.fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/index.ts b/.fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/index.ts deleted file mode 100644 index 392c0011..00000000 --- a/.fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import pipeline from "./pipeline.ts"; -import { fmt, lint, test } from "./jobs.ts"; - -export { fmt, lint, pipeline, test }; diff --git a/.fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/jobs.ts b/.fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/jobs.ts deleted file mode 100644 index 46be50c3..00000000 --- a/.fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/jobs.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Job } from "https://deno.land/x/fluent_gitlab_ci@v0.3.2/mod.ts"; - -export const fmt = new Job() - .image("denoland/deno:alpine") - .script("deno fmt --check"); - -export const lint = new Job().image("denoland/deno:alpine").script("deno lint"); - -export const test = new Job().image("denoland/deno:alpine").script("deno test"); diff --git a/.fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/pipeline.ts b/.fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/pipeline.ts deleted file mode 100644 index 366de64b..00000000 --- a/.fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/pipeline.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { GitlabCI } from "https://deno.land/x/fluent_gitlab_ci@v0.3.2/mod.ts"; -import { fmt, lint, test } from "./jobs.ts"; - -const pipeline = new GitlabCI() - .image("denoland/deno:alpine") - .addJob("fmt", fmt) - .addJob("lint", lint) - .addJob("test", test); - -export default pipeline; diff --git a/.fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/pipeline_test.ts b/.fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/pipeline_test.ts deleted file mode 100644 index ca247109..00000000 --- a/.fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/pipeline_test.ts +++ /dev/null @@ -1,8 +0,0 @@ -import pipeline from "./pipeline.ts"; -import { assertEquals } from "https://deno.land/std@0.191.0/testing/asserts.ts"; - -Deno.test(function pipelineTest() { - const expected = Deno.readTextFileSync("./fixtures/.gitlab-ci.yml"); - const actual = pipeline.toString(); - assertEquals(actual, expected); -}); diff --git a/.fluentci/.fluentci/example/.fluentci/.github/workflows/ci.yml b/.fluentci/.fluentci/example/.fluentci/.github/workflows/ci.yml deleted file mode 100644 index a7f9464b..00000000 --- a/.fluentci/.fluentci/example/.fluentci/.github/workflows/ci.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Codecov - -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: denoland/setup-deno@v1 - with: - deno-version: v1.34 - - name: Create coverage files - run: deno test --allow-read --coverage=coverage --lock-write # create coverage files - - name: Create coverage report - run: deno coverage ./coverage --lcov > coverage.lcov # create coverage report - - name: Collect coverage - uses: codecov/codecov-action@v3 # upload the report on Codecov - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - with: - file: ./coverage.lcov diff --git a/.fluentci/.fluentci/example/.fluentci/CODE_OF_CONDUCT.md b/.fluentci/.fluentci/example/.fluentci/CODE_OF_CONDUCT.md deleted file mode 100644 index e9c20f9c..00000000 --- a/.fluentci/.fluentci/example/.fluentci/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,132 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -We as members, contributors, and leaders pledge to make participation in our -community a harassment-free experience for everyone, regardless of age, body -size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socio-economic status, -nationality, personal appearance, race, caste, color, religion, or sexual -identity and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, -diverse, inclusive, and healthy community. - -## Our Standards - -Examples of behavior that contributes to a positive environment for our -community include: - -- Demonstrating empathy and kindness toward other people -- Being respectful of differing opinions, viewpoints, and experiences -- Giving and gracefully accepting constructive feedback -- Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience -- Focusing on what is best not just for us as individuals, but for the overall - community - -Examples of unacceptable behavior include: - -- The use of sexualized language or imagery, and sexual attention or advances of - any kind -- Trolling, insulting or derogatory comments, and personal or political attacks -- Public or private harassment -- Publishing others' private information, such as a physical or email address, - without their explicit permission -- Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Enforcement Responsibilities - -Community leaders are responsible for clarifying and enforcing our standards of -acceptable behavior and will take appropriate and fair corrective action in -response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. - -Community leaders have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, and will communicate reasons for moderation -decisions when appropriate. - -## Scope - -This Code of Conduct applies within all community spaces, and also applies when -an individual is officially representing the community in public spaces. -Examples of representing our community include using an official e-mail address, -posting via an official social media account, or acting as an appointed -representative at an online or offline event. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at -[GitHub Issues](https://github.com/fluent-ci-templates/deno-pipeline/issues). -All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. - -## Enforcement Guidelines - -Community leaders will follow these Community Impact Guidelines in determining -the consequences for any action they deem in violation of this Code of Conduct: - -### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed -unprofessional or unwelcome in the community. - -**Consequence**: A private, written warning from community leaders, providing -clarity around the nature of the violation and an explanation of why the -behavior was inappropriate. A public apology may be requested. - -### 2. Warning - -**Community Impact**: A violation through a single incident or series of -actions. - -**Consequence**: A warning with consequences for continued behavior. No -interaction with the people involved, including unsolicited interaction with -those enforcing the Code of Conduct, for a specified period of time. This -includes avoiding interactions in community spaces as well as external channels -like social media. Violating these terms may lead to a temporary or permanent -ban. - -### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including -sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public -communication with the community for a specified period of time. No public or -private interaction with the people involved, including unsolicited interaction -with those enforcing the Code of Conduct, is allowed during this period. -Violating these terms may lead to a permanent ban. - -### 4. Permanent Ban - -**Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an -individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within the -community. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 2.1, available at -[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. - -Community Impact Guidelines were inspired by -[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. - -For answers to common questions about this code of conduct, see the FAQ at -[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at -[https://www.contributor-covenant.org/translations][translations]. - -[homepage]: https://www.contributor-covenant.org -[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html -[Mozilla CoC]: https://github.com/mozilla/diversity -[FAQ]: https://www.contributor-covenant.org/faq -[translations]: https://www.contributor-covenant.org/translations diff --git a/.fluentci/.fluentci/example/.fluentci/CONTRIBUTING.md b/.fluentci/.fluentci/example/.fluentci/CONTRIBUTING.md deleted file mode 100644 index e50de724..00000000 --- a/.fluentci/.fluentci/example/.fluentci/CONTRIBUTING.md +++ /dev/null @@ -1,70 +0,0 @@ -# Contributing Guidelines - -Thank you for your interest in contributing to our project. Whether it's a bug -report, new feature, correction, or additional documentation, we greatly value -feedback and contributions from our community. - -Please read through this document before submitting any issues or pull requests -to ensure we have all the necessary information to effectively respond to your -bug report or contribution. - -## Reporting Bugs/Feature Requests - -We welcome you to use the GitHub issue tracker to report bugs or suggest -features. - -When filing an issue, please check existing open, or recently closed, issues to -make sure somebody else hasn't already reported the issue. Please try to include -as much information as you can. Details like these are incredibly useful: - -- A reproducible test case or series of steps -- The version of our code being used -- Any modifications you've made relevant to the bug -- Anything unusual about your environment or deployment - -## Contributing via Pull Requests - -Contributions via pull requests are much appreciated. Before sending us a pull -request, please ensure that: - -1. You are working against the latest source on the _master_ branch. -2. You check existing open, and recently merged, pull requests to make sure - someone else hasn't addressed the problem already. -3. You open an issue to discuss any significant work - we would hate for your - time to be wasted. - -To send us a pull request, please: - -1. Fork the repository. -2. Modify the source; please focus on the specific change you are contributing. - If you also reformat all the code, it will be hard for us to focus on your - change. -3. Ensure local tests pass. -4. Commit to your fork using clear commit messages. -5. Send us a pull request, answering any default questions in the pull request - interface. -6. Pay attention to any automated CI failures reported in the pull request, and - stay involved in the conversation. - -GitHub provides additional document on -[forking a repository](https://help.github.com/articles/fork-a-repo/) and -[creating a pull request](https://help.github.com/articles/creating-a-pull-request/). - -## Finding contributions to work on - -Looking at the existing issues is a great way to find something to contribute -on. As our projects, by default, use the default GitHub issue labels -(enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any -'help wanted' issues is a great place to start. - -## Code of Conduct - -This project has adopted the -[Contributor Covenant](https://www.contributor-covenant.org/), version 2.1, -available at -https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. - -## Licensing - -See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to -confirm the licensing of your contribution. diff --git a/.fluentci/.fluentci/example/.fluentci/LICENSE b/.fluentci/.fluentci/example/.fluentci/LICENSE deleted file mode 100644 index d9ab36a4..00000000 --- a/.fluentci/.fluentci/example/.fluentci/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2023 Tsiry Sandratraina - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/.fluentci/.fluentci/example/.fluentci/README.md b/.fluentci/.fluentci/example/.fluentci/README.md deleted file mode 100644 index 1afc7c6e..00000000 --- a/.fluentci/.fluentci/example/.fluentci/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# Deno Pipeline - -[![deno module](https://shield.deno.dev/x/deno_pipeline)](https://deno.land/x/deno_pipeline) -![deno compatibility](https://shield.deno.dev/deno/^1.34) -[![](https://img.shields.io/codecov/c/gh/fluent-ci-templates/deno-pipeline)](https://codecov.io/gh/fluent-ci-templates/deno-pipeline) - -A ready-to-use CI/CD Pipeline for your Deno projects. - -## ๐Ÿš€ Usage - -Run the following command: - -```bash -dagger run fluentci deno_pipeline -``` - -Or, if you want to use it as a template: - -```bash -fluentci init -t deno -``` - -This will create a `.fluentci` folder in your project. - -Now you can run the pipeline with: - -```bash -dagger run fluentci . -``` - -## Jobs - -| Job | Description | Options | -| ----- | ---------------- | ---------------------- | -| fmt | Format your code | | -| lint | Lint your code | | -| test | Run your tests | `{ ignore: string[] }` | - -## Programmatic usage - -You can also use this pipeline programmatically: - -```ts -import Client, { connect } from "@dagger.io/dagger"; -import { Dagger } from "https://deno.land/x/deno_pipeline/mod.ts"; - -const { fmt, lint, test } = Dagger; - -function pipeline(src = ".") { - connect(async (client: Client) => { - await fmt(client, src); - await lint(client, src); - await test(client, src); - }); -} - -pipeline(); -``` diff --git a/.fluentci/.fluentci/example/.fluentci/ci.ts b/.fluentci/.fluentci/example/.fluentci/ci.ts deleted file mode 100644 index 67e5a808..00000000 --- a/.fluentci/.fluentci/example/.fluentci/ci.ts +++ /dev/null @@ -1,12 +0,0 @@ -const command = new Deno.Command(Deno.execPath(), { - args: [ - "run", - "-A", - "--import-map=https://deno.land/x/deno_pipeline/import_map.json", - "https://deno.land/x/deno_pipeline/src/dagger/runner.ts", - ], -}); - -const { stdout } = await command.output(); - -console.log(new TextDecoder().decode(stdout)); diff --git a/.fluentci/.fluentci/example/.fluentci/deno.json b/.fluentci/.fluentci/example/.fluentci/deno.json deleted file mode 100644 index 42402195..00000000 --- a/.fluentci/.fluentci/example/.fluentci/deno.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "importMap": "import_map.json", - "tasks": { - "esm:add": "deno run -A https://esm.sh/v128 add", - "esm:update": "deno run -A https://esm.sh/v128 update", - "esm:remove": "deno run -A https://esm.sh/v128 remove", - "ci:dagger": "dagger run deno run -A src/dagger/runner.ts" - } -} diff --git a/.fluentci/.fluentci/example/.fluentci/deno.lock b/.fluentci/.fluentci/example/.fluentci/deno.lock deleted file mode 100644 index f8af4c36..00000000 --- a/.fluentci/.fluentci/example/.fluentci/deno.lock +++ /dev/null @@ -1,67 +0,0 @@ -{ - "version": "2", - "remote": { - "https://deno.land/std@0.150.0/media_types/_util.ts": "ce9b4fc4ba1c447dafab619055e20fd88236ca6bdd7834a21f98bd193c3fbfa1", - "https://deno.land/std@0.150.0/media_types/mod.ts": "2d4b6f32a087029272dc59e0a55ae3cc4d1b27b794ccf528e94b1925795b3118", - "https://deno.land/std@0.150.0/media_types/vendor/mime-db.v1.52.0.ts": "724cee25fa40f1a52d3937d6b4fbbfdd7791ff55e1b7ac08d9319d5632c7f5af", - "https://deno.land/std@0.191.0/fmt/colors.ts": "d67e3cd9f472535241a8e410d33423980bec45047e343577554d3356e1f0ef4e", - "https://deno.land/x/nix_installer_pipeline@v0.3.6/src/dagger/steps.ts": "a34aea3753c7079de5877f592ce31f30d05d552155729ff3e695d77326405133", - "https://deno.land/x/xhr@0.3.0/mod.ts": "094aacd627fd9635cd942053bf8032b5223b909858fa9dc8ffa583752ff63b20", - "https://esm.sh/stringify-tree@1.1.1": "8d994a105481fa944515323d89bd2596c1de79f3d9bd1386266463934716eca0", - "https://esm.sh/v128/*@dagger.io/dagger@0.6.3": "cb691a77c0cdaee22f2b8393731b5143c83ce22dbbea204cdbfd203768d15b64", - "https://esm.sh/v128/@dagger.io/dagger@0.6.3/X-ZS8q/denonext/dagger.mjs": "fd0901784d75b99615b5409c3654b5c7edfc5ba377c9e1a5a67ffff4f7d3ac32", - "https://esm.sh/v128/adm-zip@0.5.10": "d9c54d6d2dd788462781a57d923295bd79304e6fd74b242fd4b30e35b39c5dcf", - "https://esm.sh/v128/adm-zip@0.5.10/denonext/adm-zip.mjs": "07a9731547905e0ca55ae917e1969d7f6d04fb3773f906ce3306891337eb4849", - "https://esm.sh/v128/chownr@2.0.0/denonext/chownr.mjs": "30b8f17084dfbe475a5052b615f706b06ddd17dca0535103340d485c6b94e952", - "https://esm.sh/v128/cross-fetch@3.1.8/denonext/cross-fetch.mjs": "8fba9e7c3fbaf0d2168beb63ce0cd21b5bfbfbd77e2fcbf8d957d533a71222f6", - "https://esm.sh/v128/cross-spawn@7.0.3/denonext/cross-spawn.mjs": "0569a26e7ad4b3376516cbc9b1942e10961a58030eadcea8c848e6b956eb355c", - "https://esm.sh/v128/data-uri-to-buffer@4.0.1/denonext/data-uri-to-buffer.mjs": "70ef987b1da58391495ecfad9888d996469224faf3cd996d81dc2e059feb9f31", - "https://esm.sh/v128/env-paths@3.0.0": "8400fb23319be9b30d7b40d1c865541c5b3c7726cdf9b74000bc0f1678d52ecf", - "https://esm.sh/v128/env-paths@3.0.0/denonext/env-paths.mjs": "77984a05eb16450087f25060a070ed500ec546719d471143e16d976ca73ca956", - "https://esm.sh/v128/execa@7.1.1": "a40c7030df81ab0847a5d844f4c5c6420af973dff05fef88e53cbb9b8667fdc2", - "https://esm.sh/v128/execa@7.1.1/denonext/execa.mjs": "9d5943544c0df3761b52f2c095f89a03ca6c028d818a8f0475ff883b0408f154", - "https://esm.sh/v128/fetch-blob@3.2.0/denonext/fetch-blob.mjs": "0531568b36c0f6db3e9825fbb2d08dee51100eb675c2bf1d98d6971a92010721", - "https://esm.sh/v128/fetch-blob@3.2.0/denonext/file.js": "fd82828163a4e7bdc15190d8c3dbfd92f93274d05bd7f7f5ab81093e3ad7e9c2", - "https://esm.sh/v128/fetch-blob@3.2.0/denonext/from.js": "7d3258c7960755497f90879806f0b815d5e564c2ac1523238af5cb9552ff5c45", - "https://esm.sh/v128/formdata-polyfill@4.0.10/denonext/esm.min.js": "b6d65a204e81eca699d9eb6f867e9efffa42db39a8f161690915a89e5eb1766f", - "https://esm.sh/v128/fs-minipass@2.1.0/denonext/fs-minipass.mjs": "74b00283d556b281bdfd6a669576d852f2c43702043c411985f8f8188d208c5d", - "https://esm.sh/v128/get-stream@6.0.1/denonext/get-stream.mjs": "a947a16f8cb3052fd654a84f8b36b40ce96b6a5acfb3ad4ab69d814bcf3351fb", - "https://esm.sh/v128/graphql-request@6.1.0": "17f00c323eb825811ce14e2b0e88a0c873acb666c382ac963d1edeb03e01f372", - "https://esm.sh/v128/graphql-request@6.1.0/denonext/graphql-request.mjs": "0b15f49d44489423ae6f06004725b6d050b6359da4969e6569bd6ad45065bd94", - "https://esm.sh/v128/graphql-tag@2.12.6": "5bfa27da9c9918fb52a01b8579891e804e0365d91118df1f2e0957a72dacdc39", - "https://esm.sh/v128/graphql-tag@2.12.6/denonext/graphql-tag.mjs": "331d09949efc4ac60c84a69b52a7da8b333210493900e54953ae4604c9874527", - "https://esm.sh/v128/graphql@16.7.1/denonext/graphql.mjs": "418ad7c07b0f2d687f33b6275d3b5f317f4afbef1f462f318229f458dff45416", - "https://esm.sh/v128/human-signals@4.3.1/denonext/human-signals.mjs": "3889110cedd907804443d018cffe0a1d892d5e7467661376caf967feff55cbe9", - "https://esm.sh/v128/is-stream@3.0.0/denonext/is-stream.mjs": "5c8b65f2fa051c4b18e88bbae11dac8bba9caf57752577d69bcea86d1f05c5b7", - "https://esm.sh/v128/isexe@2.0.0/denonext/isexe.mjs": "3cfefd270d1bfdfb864ee98dbb8f41d150cbf480925158f4a8f0ade8a9e17d6c", - "https://esm.sh/v128/merge-stream@2.0.0/denonext/merge-stream.mjs": "2c2af22401c294158d6bff659d157e3d2c028c218cc1bd2246534a45a4c03c61", - "https://esm.sh/v128/mimic-fn@4.0.0/denonext/mimic-fn.mjs": "10bcf0f2f20cbbba0c289ef7bf4d2422639bbc1c36c247be876afd6fe2d67138", - "https://esm.sh/v128/minipass@3.3.6/denonext/minipass.mjs": "59bbe430514455e78cb30c389b21af66efb2bf010cda071820a17d8c76d0d1cf", - "https://esm.sh/v128/minipass@5.0.0/denonext/minipass.mjs": "de0e049728f8c387b58c86439eb9d69a16b6a88756a6bc694e2fecbd7fd00401", - "https://esm.sh/v128/minizlib@2.1.2/denonext/minizlib.mjs": "0d919b6a0c60d5a31e14d748ff9d62aeae2923b604bcc6a22f90fa4bbd400d68", - "https://esm.sh/v128/mkdirp@1.0.4/denonext/mkdirp.mjs": "ee129b32e55dd8bede6b1bbd1978f7775fa5e2720d5a7ae07bf1e8c99abd77c7", - "https://esm.sh/v128/node-color-log@10.0.2": "05a277987c64153af1252167135076155fdc6b39ca260b2bdc39750da12d2a2d", - "https://esm.sh/v128/node-color-log@10.0.2/denonext/node-color-log.mjs": "2504391bd0ce1dd4c2bf0ed0b839b8a3ad84c028d9dd17cc58dccd2e14dacfde", - "https://esm.sh/v128/node-domexception@1.0.0/denonext/node-domexception.mjs": "bb35ba54c1a2b35870618876c0c96310a28ae58aecff33c8eed58a582e270ff4", - "https://esm.sh/v128/node-fetch@3.3.1": "916dcee177a69fb0e46970c528cb66fcd4973488f861844c0a235bfc645b0506", - "https://esm.sh/v128/node-fetch@3.3.1/denonext/node-fetch.mjs": "dc3a8f1f2fc9eb26d0d33e49f3750acc265d51a1a54bbd670c5d9f640b633a93", - "https://esm.sh/v128/node-fetch@3.3.1/denonext/src/utils/multipart-parser.js": "713b1b8cbafc4bfb7358debeb35d507e0d2328f0a28b8a2a7d79a3e5e4f5e5b8", - "https://esm.sh/v128/npm-run-path@5.1.0/denonext/npm-run-path.mjs": "3540b8c2dd1430f10d580f323f3a51aa30094da27a9220cce03ce69884b163bb", - "https://esm.sh/v128/onetime@6.0.0/denonext/onetime.mjs": "6e362222575d815f37fb813168d7069dd6a0f6bb6f972ed54d1bccb0f9fb3e1b", - "https://esm.sh/v128/original-fs@1.2.0/denonext/original-fs.mjs": "2b1098818e54d2c6748ff5b0dd9ea5f6a61b4b6d0f63fb625f21773d11cfc667", - "https://esm.sh/v128/path-key@3.1.1/denonext/path-key.mjs": "add83c631278b7df9b33ae84e41142db88bb291295bcc27eb4e77a1cbdfa71d0", - "https://esm.sh/v128/path-key@4.0.0/denonext/path-key.mjs": "2c2e3922bd0e6e414fa2752ff800bdc6b9208035ce797fa22e49b859f8259417", - "https://esm.sh/v128/shebang-command@2.0.0/denonext/shebang-command.mjs": "404e0fb09a782ca9495d53c721bb84b673b7b2e1054e021852143a6b91ca0e4f", - "https://esm.sh/v128/shebang-regex@3.0.0/denonext/shebang-regex.mjs": "03983ba59dd2cba9402935e21b46d05f5249364cba9f5757aef23c6c2fea65b9", - "https://esm.sh/v128/signal-exit@3.0.7/denonext/signal-exit.mjs": "2a176e5f9b351fa8057213c627a1503d63bf308b64447ef47f1ca6fbb2a91c81", - "https://esm.sh/v128/strip-final-newline@3.0.0/denonext/strip-final-newline.mjs": "03d9be4e8a249d63cbbddeb2fb675a1bbbcb335283e604d4ce56c88c90e6f102", - "https://esm.sh/v128/tar@6.1.15": "0460339f8aba5f287e8bebe258fe3fe13cb12f85820693f25724f0d98ef1258e", - "https://esm.sh/v128/tar@6.1.15/denonext/tar.mjs": "6194d892de8457b3b1f11d5cbacda1d540b453b45e8cb9f5f610abfb3e490b65", - "https://esm.sh/v128/tslib@2.6.0/denonext/tslib.mjs": "2215292e6fcf28a7a081eee911f127bb3c44cdd61ff0651e3e384d7a49b4e42b", - "https://esm.sh/v128/web-streams-polyfill@3.2.1/denonext/dist/ponyfill.es2018.js": "a2edb52a93494cda06386b3d6a168016b366e78f02c5eff1f94a0240be12ac96", - "https://esm.sh/v128/which@2.0.2/denonext/which.mjs": "86bf76e4937edb7fa3464d7bb9a426ef273684d1cefbec5ba5f1bdcb5cafff91", - "https://esm.sh/v128/yallist@4.0.0/denonext/yallist.mjs": "61f180d807dda50bac17028eda05d5722a3fecef6e98a9064e2353ea6864fd82", - "https://esm.sh/v130/lodash.flatten@4.4.0/denonext/lodash.flatten.mjs": "8e86ab607deea15cc3c1acfb5eae278ecbc5b80f24167b4e8f4c56df3278cd55", - "https://esm.sh/v130/stringify-tree@1.1.1/denonext/stringify-tree.mjs": "40a9d40e0282b5432302a3da68b88aa11685bc0b8a0b70246168deed5c5773fe" - } -} diff --git a/.fluentci/.fluentci/example/.fluentci/fixtures/.gitlab-ci.yml b/.fluentci/.fluentci/example/.fluentci/fixtures/.gitlab-ci.yml deleted file mode 100644 index 299e4c62..00000000 --- a/.fluentci/.fluentci/example/.fluentci/fixtures/.gitlab-ci.yml +++ /dev/null @@ -1,19 +0,0 @@ -# Do not edit this file directly. It is generated by Fluent GitLab CI - -image: denoland/deno:alpine - -fmt: - image: denoland/deno:alpine - script: - - deno fmt --check - -lint: - image: denoland/deno:alpine - script: - - deno lint - -test: - image: denoland/deno:alpine - script: - - deno test - diff --git a/.fluentci/.fluentci/example/.fluentci/flake.lock b/.fluentci/.fluentci/example/.fluentci/flake.lock deleted file mode 100644 index af7453c0..00000000 --- a/.fluentci/.fluentci/example/.fluentci/flake.lock +++ /dev/null @@ -1,61 +0,0 @@ -{ - "nodes": { - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1687709756, - "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1688910226, - "narHash": "sha256-kLTsFu9CAU2Gb288JhIBN/WlX4UUUDz4WiC/U59nvwk=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "2540432a940aee979be6ccfefba9ea0652c273a0", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "release-23.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/.fluentci/.fluentci/example/.fluentci/flake.nix b/.fluentci/.fluentci/example/.fluentci/flake.nix deleted file mode 100644 index b13ea7df..00000000 --- a/.fluentci/.fluentci/example/.fluentci/flake.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ - description = "A Nix-flake-based Deno development environment"; - - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/release-23.05"; - flake-utils.url = "github:numtide/flake-utils"; - }; - - outputs = { - self, - nixpkgs, - flake-utils, - }: - flake-utils.lib.eachDefaultSystem - (system: let - pkgs = import nixpkgs { - inherit system; - }; - in { - devShells.default = pkgs.mkShell { - buildInputs = [ - pkgs.deno - ]; - }; - }); -} \ No newline at end of file diff --git a/.fluentci/.fluentci/example/.fluentci/import_map.json b/.fluentci/.fluentci/example/.fluentci/import_map.json deleted file mode 100644 index 801ea9a7..00000000 --- a/.fluentci/.fluentci/example/.fluentci/import_map.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "imports": { - "@dagger.io/dagger": "https://esm.sh/v128/*@dagger.io/dagger@0.6.3", - "fluent_gitlab_ci": "https://deno.land/x/fluent_gitlab_ci@v0.3.2/mod.ts", - "url": "node:url", - "readline": "node:readline", - "process": "node:process", - "path": "node:path", - "os": "node:os", - "fs": "node:fs", - "crypto": "node:crypto" - }, - "scopes": { - "https://esm.sh/v128/": { - "@lifeomic/axios-fetch": "https://esm.sh/v128/@lifeomic/axios-fetch@3.0.1", - "adm-zip": "https://esm.sh/v128/adm-zip@0.5.10", - "env-paths": "https://esm.sh/v128/env-paths@3.0.0", - "execa": "https://esm.sh/v128/execa@7.1.1", - "graphql-request": "https://esm.sh/v128/graphql-request@6.1.0", - "graphql-tag": "https://esm.sh/v128/graphql-tag@2.12.6", - "graphql": "https://esm.sh/v128/graphql@16.7.1", - "node-color-log": "https://esm.sh/v128/node-color-log@10.0.2", - "node-fetch": "https://esm.sh/v128/node-fetch@3.3.1", - "tar": "https://esm.sh/v128/tar@6.1.15" - } - } -} diff --git a/.fluentci/.fluentci/example/.fluentci/mod.ts b/.fluentci/.fluentci/example/.fluentci/mod.ts deleted file mode 100644 index 6152fb62..00000000 --- a/.fluentci/.fluentci/example/.fluentci/mod.ts +++ /dev/null @@ -1,4 +0,0 @@ -import * as GitLab from "./src/gitlab/index.ts"; -import * as Dagger from "./src/dagger/index.ts"; - -export { Dagger, GitLab }; diff --git a/.fluentci/.fluentci/example/.fluentci/src/dagger/index.ts b/.fluentci/.fluentci/example/.fluentci/src/dagger/index.ts deleted file mode 100644 index 392c0011..00000000 --- a/.fluentci/.fluentci/example/.fluentci/src/dagger/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import pipeline from "./pipeline.ts"; -import { fmt, lint, test } from "./jobs.ts"; - -export { fmt, lint, pipeline, test }; diff --git a/.fluentci/.fluentci/example/.fluentci/src/dagger/jobs.ts b/.fluentci/.fluentci/example/.fluentci/src/dagger/jobs.ts deleted file mode 100644 index 611a5e03..00000000 --- a/.fluentci/.fluentci/example/.fluentci/src/dagger/jobs.ts +++ /dev/null @@ -1,188 +0,0 @@ -import Client from "@dagger.io/dagger"; -import { withDevbox } from "https://deno.land/x/nix_installer_pipeline@v0.3.6/src/dagger/steps.ts"; -import { existsSync } from "fs"; - -export enum Job { - fmt = "fmt", - lint = "lint", - test = "test", - deploy = "deploy", -} - -const baseCtr = (client: Client, pipeline: string) => { - if (existsSync("devbox.json")) { - return withDevbox( - client - .pipeline(pipeline) - .container() - .from("alpine:latest") - .withExec(["apk", "update"]) - .withExec(["apk", "add", "bash", "curl"]) - .withMountedCache("/nix", client.cacheVolume("nix")) - .withMountedCache("/etc/nix", client.cacheVolume("nix-etc")) - ); - } - return client.pipeline(pipeline).container().from("denoland/deno:alpine"); -}; - -export const lint = async (client: Client, src = ".") => { - const context = client.host().directory(src); - let command = ["deno", "lint"]; - - if (existsSync("devbox.json")) { - command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; - } - - const ctr = baseCtr(client, Job.lint) - .withDirectory("/app", context, { - exclude: [".git", ".devbox", ".fluentci"], - }) - .withWorkdir("/app") - .withExec(command); - - const result = await ctr.stdout(); - - console.log(result); -}; - -export const fmt = async (client: Client, src = ".") => { - const context = client.host().directory(src); - let command = ["deno", "fmt"]; - - if (existsSync("devbox.json")) { - command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; - } - - const ctr = baseCtr(client, Job.fmt) - .withDirectory("/app", context, { - exclude: [".git", ".devbox", ".fluentci"], - }) - .withWorkdir("/app") - .withExec(command); - - const result = await ctr.stdout(); - - console.log(result); -}; - -export const test = async ( - client: Client, - src = ".", - options: { ignore: string[] } = { ignore: [] } -) => { - const context = client.host().directory(src); - let command = ["deno", "test", "-A", "--lock-write"]; - - if (options.ignore.length > 0) { - command = command.concat([`--ignore=${options.ignore.join(",")}`]); - } - - if (existsSync("devbox.json")) { - command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; - } - - const ctr = baseCtr(client, Job.test) - .from("denoland/deno:alpine") - .withDirectory("/app", context, { - exclude: [".git", ".devbox", ".fluentci"], - }) - .withWorkdir("/app") - .withMountedCache("/root/.cache/deno", client.cacheVolume("deno-cache")) - .withExec(command); - - const result = await ctr.stdout(); - - console.log(result); -}; - -export const deploy = async (client: Client, src = ".") => { - const context = client.host().directory(src); - let installDeployCtl = [ - "deno", - "install", - "--allow-all", - "--no-check", - "-r", - "-f", - "https://deno.land/x/deploy/deployctl.ts", - ]; - const project = Deno.env.get("DENO_PROJECT"); - const noStatic = Deno.env.get("NO_STATIC"); - const exclude = Deno.env.get("EXCLUDE"); - - let command = ["deployctl", "deploy"]; - - if (noStatic) { - command = command.concat(["--no-static"]); - } - - if (exclude) { - command = command.concat([`--exclude=${exclude}`]); - } - - if (!Deno.env.get("DENO_DEPLOY_TOKEN")) { - throw new Error("DENO_DEPLOY_TOKEN environment variable is not set"); - } - - if (!project) { - throw new Error("DENO_PROJECT environment variable is not set"); - } - - const script = Deno.env.get("DENO_MAIN_SCRIPT") || "main.tsx"; - command = command.concat([`--project=${project}`, script]); - - if (existsSync("devbox.json")) { - command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; - installDeployCtl = [ - "sh", - "-c", - `devbox run -- ${installDeployCtl.join(" ")}`, - ]; - } - - const ctr = baseCtr(client, Job.deploy) - .from("denoland/deno:alpine") - .withDirectory("/app", context, { - exclude: [".git", ".devbox", ".fluentci"], - }) - .withWorkdir("/app") - .withEnvVariable("PATH", "/root/.deno/bin:$PATH", { expand: true }) - .withEnvVariable("DENO_DEPLOY_TOKEN", Deno.env.get("DENO_DEPLOY_TOKEN")!) - .withEnvVariable( - "DENO_MAIN_SCRIPT", - Deno.env.get("DENO_MAIN_SCRIPT") || "main.tsx" - ) - .withExec(installDeployCtl) - .withExec(command); - - const result = await ctr.stdout(); - - console.log(result); -}; - -export type JobExec = ( - client: Client, - src?: string -) => - | Promise - | (( - client: Client, - src?: string, - options?: { - ignore: string[]; - } - ) => Promise); - -export const runnableJobs: Record = { - [Job.fmt]: fmt, - [Job.lint]: lint, - [Job.test]: test, - [Job.deploy]: deploy, -}; - -export const jobDescriptions: Record = { - [Job.fmt]: "Format your code", - [Job.lint]: "Lint your code", - [Job.test]: "Run your tests", - [Job.deploy]: "Deploy your code to Deno Deploy", -}; diff --git a/.fluentci/.fluentci/example/.fluentci/src/dagger/list_jobs.ts b/.fluentci/.fluentci/example/.fluentci/src/dagger/list_jobs.ts deleted file mode 100644 index 12bb3cbb..00000000 --- a/.fluentci/.fluentci/example/.fluentci/src/dagger/list_jobs.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { brightGreen } from "https://deno.land/std@0.191.0/fmt/colors.ts"; -import { runnableJobs, jobDescriptions, Job } from "./jobs.ts"; -import { stringifyTree } from "https://esm.sh/stringify-tree@1.1.1"; - -const tree = { - name: brightGreen("deno_pipeline"), - children: (Object.keys(runnableJobs) as Job[]).map((job) => ({ - name: jobDescriptions[job] - ? `${brightGreen(job)} - ${jobDescriptions[job]}` - : brightGreen(job), - children: [], - })), -}; - -console.log( - stringifyTree( - tree, - (t) => t.name, - (t) => t.children - ) -); diff --git a/.fluentci/.fluentci/example/.fluentci/src/dagger/pipeline.ts b/.fluentci/.fluentci/example/.fluentci/src/dagger/pipeline.ts deleted file mode 100644 index bad73729..00000000 --- a/.fluentci/.fluentci/example/.fluentci/src/dagger/pipeline.ts +++ /dev/null @@ -1,27 +0,0 @@ -import Client, { connect } from "@dagger.io/dagger"; -import * as jobs from "./jobs.ts"; - -const { fmt, lint, test, runnableJobs } = jobs; - -export default function pipeline(src = ".", args: string[] = []) { - connect(async (client: Client) => { - if (args.length > 0) { - await runSpecificJobs(client, args as jobs.Job[]); - return; - } - - await fmt(client, src); - await lint(client, src); - await test(client, src); - }); -} - -async function runSpecificJobs(client: Client, args: jobs.Job[]) { - for (const name of args) { - const job = runnableJobs[name]; - if (!job) { - throw new Error(`Job ${name} not found`); - } - await job(client); - } -} diff --git a/.fluentci/.fluentci/example/.fluentci/src/dagger/runner.ts b/.fluentci/.fluentci/example/.fluentci/src/dagger/runner.ts deleted file mode 100644 index e23879e7..00000000 --- a/.fluentci/.fluentci/example/.fluentci/src/dagger/runner.ts +++ /dev/null @@ -1,3 +0,0 @@ -import pipeline from "./pipeline.ts"; - -pipeline(".", Deno.args); diff --git a/.fluentci/.fluentci/example/.fluentci/src/gitlab/index.ts b/.fluentci/.fluentci/example/.fluentci/src/gitlab/index.ts deleted file mode 100644 index 392c0011..00000000 --- a/.fluentci/.fluentci/example/.fluentci/src/gitlab/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import pipeline from "./pipeline.ts"; -import { fmt, lint, test } from "./jobs.ts"; - -export { fmt, lint, pipeline, test }; diff --git a/.fluentci/.fluentci/example/.fluentci/src/gitlab/jobs.ts b/.fluentci/.fluentci/example/.fluentci/src/gitlab/jobs.ts deleted file mode 100644 index 46be50c3..00000000 --- a/.fluentci/.fluentci/example/.fluentci/src/gitlab/jobs.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Job } from "https://deno.land/x/fluent_gitlab_ci@v0.3.2/mod.ts"; - -export const fmt = new Job() - .image("denoland/deno:alpine") - .script("deno fmt --check"); - -export const lint = new Job().image("denoland/deno:alpine").script("deno lint"); - -export const test = new Job().image("denoland/deno:alpine").script("deno test"); diff --git a/.fluentci/.fluentci/example/.fluentci/src/gitlab/pipeline.ts b/.fluentci/.fluentci/example/.fluentci/src/gitlab/pipeline.ts deleted file mode 100644 index 366de64b..00000000 --- a/.fluentci/.fluentci/example/.fluentci/src/gitlab/pipeline.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { GitlabCI } from "https://deno.land/x/fluent_gitlab_ci@v0.3.2/mod.ts"; -import { fmt, lint, test } from "./jobs.ts"; - -const pipeline = new GitlabCI() - .image("denoland/deno:alpine") - .addJob("fmt", fmt) - .addJob("lint", lint) - .addJob("test", test); - -export default pipeline; diff --git a/.fluentci/.fluentci/example/.fluentci/src/gitlab/pipeline_test.ts b/.fluentci/.fluentci/example/.fluentci/src/gitlab/pipeline_test.ts deleted file mode 100644 index ca247109..00000000 --- a/.fluentci/.fluentci/example/.fluentci/src/gitlab/pipeline_test.ts +++ /dev/null @@ -1,8 +0,0 @@ -import pipeline from "./pipeline.ts"; -import { assertEquals } from "https://deno.land/std@0.191.0/testing/asserts.ts"; - -Deno.test(function pipelineTest() { - const expected = Deno.readTextFileSync("./fixtures/.gitlab-ci.yml"); - const actual = pipeline.toString(); - assertEquals(actual, expected); -}); diff --git a/.fluentci/.fluentci/example/README.md b/.fluentci/.fluentci/example/README.md deleted file mode 100644 index a6193e17..00000000 --- a/.fluentci/.fluentci/example/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Deno Pipeline Example - -This is an example using the [Deno Pipeline](https://github.com/fluent-ci-templates/deno-pipeline). - -## ๐Ÿš€ Usage - -You need to set the following environment variables: - -- `DENO_DEPLOY_TOKEN`: Your Deno Deploy token. -- `DENO_PROJECT`: Your project name. - -Then, run the following command: - -```bash -dagger run fluentci . fmt lint deploy -``` \ No newline at end of file diff --git a/.fluentci/.fluentci/example/main.tsx b/.fluentci/.fluentci/example/main.tsx deleted file mode 100644 index dd482662..00000000 --- a/.fluentci/.fluentci/example/main.tsx +++ /dev/null @@ -1,20 +0,0 @@ -/** @jsx h */ -import { serve } from "https://deno.land/std@0.190.0/http/server.ts"; -import html, { h } from "https://deno.land/x/htm@0.2.1/mod.ts"; - -const handler = (req: Request) => - html({ - title: "Hello World!", - styles: [ - "html, body { margin: 0; height: 100%; }", - "body { background: #86efac; display: flex; flex-direction: column; align-items: center; justify-content: center; }", - ], - body: ( - - -

Hello Patricia!

- - ), - }); - -serve(handler); diff --git a/.fluentci/.fluentci/fixtures/.gitlab-ci.yml b/.fluentci/.fluentci/fixtures/.gitlab-ci.yml deleted file mode 100644 index 299e4c62..00000000 --- a/.fluentci/.fluentci/fixtures/.gitlab-ci.yml +++ /dev/null @@ -1,19 +0,0 @@ -# Do not edit this file directly. It is generated by Fluent GitLab CI - -image: denoland/deno:alpine - -fmt: - image: denoland/deno:alpine - script: - - deno fmt --check - -lint: - image: denoland/deno:alpine - script: - - deno lint - -test: - image: denoland/deno:alpine - script: - - deno test - diff --git a/.fluentci/.fluentci/flake.lock b/.fluentci/.fluentci/flake.lock deleted file mode 100644 index af7453c0..00000000 --- a/.fluentci/.fluentci/flake.lock +++ /dev/null @@ -1,61 +0,0 @@ -{ - "nodes": { - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1687709756, - "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1688910226, - "narHash": "sha256-kLTsFu9CAU2Gb288JhIBN/WlX4UUUDz4WiC/U59nvwk=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "2540432a940aee979be6ccfefba9ea0652c273a0", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "release-23.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/.fluentci/.fluentci/flake.nix b/.fluentci/.fluentci/flake.nix deleted file mode 100644 index b13ea7df..00000000 --- a/.fluentci/.fluentci/flake.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ - description = "A Nix-flake-based Deno development environment"; - - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/release-23.05"; - flake-utils.url = "github:numtide/flake-utils"; - }; - - outputs = { - self, - nixpkgs, - flake-utils, - }: - flake-utils.lib.eachDefaultSystem - (system: let - pkgs = import nixpkgs { - inherit system; - }; - in { - devShells.default = pkgs.mkShell { - buildInputs = [ - pkgs.deno - ]; - }; - }); -} \ No newline at end of file diff --git a/.fluentci/.fluentci/import_map.json b/.fluentci/.fluentci/import_map.json deleted file mode 100644 index 12c59ffe..00000000 --- a/.fluentci/.fluentci/import_map.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "imports": { - "@dagger.io/dagger": "https://esm.sh/v128/*@dagger.io/dagger@0.6.3", - "fluent_gitlab_ci": "https://deno.land/x/fluent_gitlab_ci@v0.3.2/mod.ts", - "fluent_github_actions": "https://deno.land/x/fluent_github_actions@v0.1.2/mod.ts", - "url": "node:url", - "readline": "node:readline", - "process": "node:process", - "path": "node:path", - "os": "node:os", - "fs": "node:fs", - "crypto": "node:crypto" - }, - "scopes": { - "https://esm.sh/v128/": { - "@lifeomic/axios-fetch": "https://esm.sh/v128/@lifeomic/axios-fetch@3.0.1", - "adm-zip": "https://esm.sh/v128/adm-zip@0.5.10", - "env-paths": "https://esm.sh/v128/env-paths@3.0.0", - "execa": "https://esm.sh/v128/execa@7.1.1", - "graphql-request": "https://esm.sh/v128/graphql-request@6.1.0", - "graphql-tag": "https://esm.sh/v128/graphql-tag@2.12.6", - "graphql": "https://esm.sh/v128/graphql@16.7.1", - "node-color-log": "https://esm.sh/v128/node-color-log@10.0.2", - "node-fetch": "https://esm.sh/v128/node-fetch@3.3.1", - "tar": "https://esm.sh/v128/tar@6.1.15" - } - } -} \ No newline at end of file diff --git a/.fluentci/.fluentci/mod.ts b/.fluentci/.fluentci/mod.ts deleted file mode 100644 index 6152fb62..00000000 --- a/.fluentci/.fluentci/mod.ts +++ /dev/null @@ -1,4 +0,0 @@ -import * as GitLab from "./src/gitlab/index.ts"; -import * as Dagger from "./src/dagger/index.ts"; - -export { Dagger, GitLab }; diff --git a/.fluentci/.fluentci/src/dagger/index.ts b/.fluentci/.fluentci/src/dagger/index.ts deleted file mode 100644 index 392c0011..00000000 --- a/.fluentci/.fluentci/src/dagger/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import pipeline from "./pipeline.ts"; -import { fmt, lint, test } from "./jobs.ts"; - -export { fmt, lint, pipeline, test }; diff --git a/.fluentci/.fluentci/src/dagger/jobs.ts b/.fluentci/.fluentci/src/dagger/jobs.ts deleted file mode 100644 index 862b599a..00000000 --- a/.fluentci/.fluentci/src/dagger/jobs.ts +++ /dev/null @@ -1,197 +0,0 @@ -import Client from "@dagger.io/dagger"; -import { upload } from "https://deno.land/x/codecov_pipeline@v0.1.1/src/dagger/jobs.ts"; -import { withDevbox } from "https://deno.land/x/nix_installer_pipeline@v0.3.6/src/dagger/steps.ts"; -import { existsSync } from "fs"; - -export enum Job { - fmt = "fmt", - lint = "lint", - test = "test", - deploy = "deploy", - codecov = "codecov", -} - -const baseCtr = (client: Client, pipeline: string) => { - if (existsSync("devbox.json")) { - return withDevbox( - client - .pipeline(pipeline) - .container() - .from("alpine:latest") - .withExec(["apk", "update"]) - .withExec(["apk", "add", "bash", "curl"]) - .withMountedCache("/nix", client.cacheVolume("nix")) - .withMountedCache("/etc/nix", client.cacheVolume("nix-etc")) - ); - } - return client.pipeline(pipeline).container().from("denoland/deno:alpine"); -}; - -export const lint = async (client: Client, src = ".") => { - const context = client.host().directory(src); - let command = ["deno", "lint"]; - - if (existsSync("devbox.json")) { - command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; - } - - const ctr = baseCtr(client, Job.lint) - .withDirectory("/app", context, { - exclude: [".git", ".devbox", ".fluentci"], - }) - .withWorkdir("/app") - .withExec(command); - - const result = await ctr.stdout(); - - console.log(result); -}; - -export const fmt = async (client: Client, src = ".") => { - const context = client.host().directory(src); - let command = ["deno", "fmt"]; - - if (existsSync("devbox.json")) { - command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; - } - - const ctr = baseCtr(client, Job.fmt) - .withDirectory("/app", context, { - exclude: [".git", ".devbox", ".fluentci"], - }) - .withWorkdir("/app") - .withExec(command); - - const result = await ctr.stdout(); - - console.log(result); -}; - -export const test = async ( - client: Client, - src = ".", - options: { ignore: string[] } = { ignore: [] } -) => { - const context = client.host().directory(src); - let command = ["deno", "test", "-A", "--coverage=coverage", "--lock-write"]; - - if (options.ignore.length > 0) { - command = command.concat([`--ignore=${options.ignore.join(",")}`]); - } - - if (existsSync("devbox.json")) { - command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; - } - - const ctr = baseCtr(client, Job.test) - .from("denoland/deno:alpine") - .withDirectory("/app", context, { - exclude: [".git", ".devbox", ".fluentci"], - }) - .withWorkdir("/app") - .withMountedCache("/root/.cache/deno", client.cacheVolume("deno-cache")) - .withExec(command) - .withExec(["sh", "-c", "deno coverage ./coverage --lcov > coverage.lcov"]); - - const result = await ctr.stdout(); - - await ctr.file("/app/coverage.lcov").export("./coverage.lcov"); - - console.log(result); -}; - -export const deploy = async (client: Client, src = ".") => { - const context = client.host().directory(src); - let installDeployCtl = [ - "deno", - "install", - "--allow-all", - "--no-check", - "-r", - "-f", - "https://deno.land/x/deploy/deployctl.ts", - ]; - const project = Deno.env.get("DENO_PROJECT"); - const noStatic = Deno.env.get("NO_STATIC"); - const exclude = Deno.env.get("EXCLUDE"); - - let command = ["deployctl", "deploy"]; - - if (noStatic) { - command = command.concat(["--no-static"]); - } - - if (exclude) { - command = command.concat([`--exclude=${exclude}`]); - } - - if (!Deno.env.get("DENO_DEPLOY_TOKEN")) { - throw new Error("DENO_DEPLOY_TOKEN environment variable is not set"); - } - - if (!project) { - throw new Error("DENO_PROJECT environment variable is not set"); - } - - const script = Deno.env.get("DENO_MAIN_SCRIPT") || "main.tsx"; - command = command.concat([`--project=${project}`, script]); - - if (existsSync("devbox.json")) { - command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; - installDeployCtl = [ - "sh", - "-c", - `devbox run -- ${installDeployCtl.join(" ")}`, - ]; - } - - const ctr = baseCtr(client, Job.deploy) - .from("denoland/deno:alpine") - .withDirectory("/app", context, { - exclude: [".git", ".devbox", ".fluentci"], - }) - .withWorkdir("/app") - .withEnvVariable("PATH", "/root/.deno/bin:$PATH", { expand: true }) - .withEnvVariable("DENO_DEPLOY_TOKEN", Deno.env.get("DENO_DEPLOY_TOKEN")!) - .withEnvVariable( - "DENO_MAIN_SCRIPT", - Deno.env.get("DENO_MAIN_SCRIPT") || "main.tsx" - ) - .withExec(installDeployCtl) - .withExec(command); - - const result = await ctr.stdout(); - - console.log(result); -}; - -export type JobExec = ( - client: Client, - src?: string -) => - | Promise - | (( - client: Client, - src?: string, - options?: { - ignore: string[]; - } - ) => Promise); - -export const codecov = upload; - -export const runnableJobs: Record = { - [Job.fmt]: fmt, - [Job.lint]: lint, - [Job.test]: test, - [Job.deploy]: deploy, - [Job.codecov]: upload, -}; - -export const jobDescriptions: Record = { - [Job.fmt]: "Format your code", - [Job.lint]: "Lint your code", - [Job.test]: "Run your tests", - [Job.deploy]: "Deploy your code to Deno Deploy", - [Job.codecov]: "Upload your code coverage to Codecov", -}; diff --git a/.fluentci/.fluentci/src/dagger/list_jobs.ts b/.fluentci/.fluentci/src/dagger/list_jobs.ts deleted file mode 100644 index 12bb3cbb..00000000 --- a/.fluentci/.fluentci/src/dagger/list_jobs.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { brightGreen } from "https://deno.land/std@0.191.0/fmt/colors.ts"; -import { runnableJobs, jobDescriptions, Job } from "./jobs.ts"; -import { stringifyTree } from "https://esm.sh/stringify-tree@1.1.1"; - -const tree = { - name: brightGreen("deno_pipeline"), - children: (Object.keys(runnableJobs) as Job[]).map((job) => ({ - name: jobDescriptions[job] - ? `${brightGreen(job)} - ${jobDescriptions[job]}` - : brightGreen(job), - children: [], - })), -}; - -console.log( - stringifyTree( - tree, - (t) => t.name, - (t) => t.children - ) -); diff --git a/.fluentci/.fluentci/src/dagger/pipeline.ts b/.fluentci/.fluentci/src/dagger/pipeline.ts deleted file mode 100644 index bad73729..00000000 --- a/.fluentci/.fluentci/src/dagger/pipeline.ts +++ /dev/null @@ -1,27 +0,0 @@ -import Client, { connect } from "@dagger.io/dagger"; -import * as jobs from "./jobs.ts"; - -const { fmt, lint, test, runnableJobs } = jobs; - -export default function pipeline(src = ".", args: string[] = []) { - connect(async (client: Client) => { - if (args.length > 0) { - await runSpecificJobs(client, args as jobs.Job[]); - return; - } - - await fmt(client, src); - await lint(client, src); - await test(client, src); - }); -} - -async function runSpecificJobs(client: Client, args: jobs.Job[]) { - for (const name of args) { - const job = runnableJobs[name]; - if (!job) { - throw new Error(`Job ${name} not found`); - } - await job(client); - } -} diff --git a/.fluentci/.fluentci/src/dagger/runner.ts b/.fluentci/.fluentci/src/dagger/runner.ts deleted file mode 100644 index e23879e7..00000000 --- a/.fluentci/.fluentci/src/dagger/runner.ts +++ /dev/null @@ -1,3 +0,0 @@ -import pipeline from "./pipeline.ts"; - -pipeline(".", Deno.args); diff --git a/.fluentci/.fluentci/src/github/config.ts b/.fluentci/.fluentci/src/github/config.ts deleted file mode 100644 index 9508e832..00000000 --- a/.fluentci/.fluentci/src/github/config.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { JobSpec, Workflow } from "fluent_github_actions"; - -export function generateYaml() { - const workflow = new Workflow("Codecov"); - - const push = { - branches: ["main"], - }; - - const setupDagger = `\ - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - sudo mv bin/dagger /usr/local/bin - dagger version`; - - const tests: JobSpec = { - "runs-on": "ubuntu-latest", - steps: [ - { - uses: "actions/checkout@v2", - }, - { - uses: "denoland/setup-deno@v1", - with: { - "deno-version": "v1.37", - }, - }, - { - name: "Setup Fluent CI CLI", - run: "deno install -A -r https://cli.fluentci.io -n fluentci", - }, - { - name: "Setup Dagger", - run: setupDagger, - }, - { - name: "Run Dagger Pipelines", - run: "dagger run fluentci . fmt lint test", - }, - { - name: "Upload to Codecov", - run: "dagger run fluentci codecov_pipeline", - env: { - CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}", - }, - }, - ], - }; - - workflow.on({ push }).jobs({ tests }); - - workflow.save(".github/workflows/ci.yml"); -} diff --git a/.fluentci/.fluentci/src/github/init.ts b/.fluentci/.fluentci/src/github/init.ts deleted file mode 100644 index 6097dd54..00000000 --- a/.fluentci/.fluentci/src/github/init.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { generateYaml } from "./config.ts"; - -generateYaml(); diff --git a/.fluentci/.fluentci/src/gitlab/index.ts b/.fluentci/.fluentci/src/gitlab/index.ts deleted file mode 100644 index 392c0011..00000000 --- a/.fluentci/.fluentci/src/gitlab/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import pipeline from "./pipeline.ts"; -import { fmt, lint, test } from "./jobs.ts"; - -export { fmt, lint, pipeline, test }; diff --git a/.fluentci/.fluentci/src/gitlab/jobs.ts b/.fluentci/.fluentci/src/gitlab/jobs.ts deleted file mode 100644 index 46be50c3..00000000 --- a/.fluentci/.fluentci/src/gitlab/jobs.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Job } from "https://deno.land/x/fluent_gitlab_ci@v0.3.2/mod.ts"; - -export const fmt = new Job() - .image("denoland/deno:alpine") - .script("deno fmt --check"); - -export const lint = new Job().image("denoland/deno:alpine").script("deno lint"); - -export const test = new Job().image("denoland/deno:alpine").script("deno test"); diff --git a/.fluentci/.fluentci/src/gitlab/pipeline.ts b/.fluentci/.fluentci/src/gitlab/pipeline.ts deleted file mode 100644 index 366de64b..00000000 --- a/.fluentci/.fluentci/src/gitlab/pipeline.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { GitlabCI } from "https://deno.land/x/fluent_gitlab_ci@v0.3.2/mod.ts"; -import { fmt, lint, test } from "./jobs.ts"; - -const pipeline = new GitlabCI() - .image("denoland/deno:alpine") - .addJob("fmt", fmt) - .addJob("lint", lint) - .addJob("test", test); - -export default pipeline; diff --git a/.fluentci/.fluentci/src/gitlab/pipeline_test.ts b/.fluentci/.fluentci/src/gitlab/pipeline_test.ts deleted file mode 100644 index ca247109..00000000 --- a/.fluentci/.fluentci/src/gitlab/pipeline_test.ts +++ /dev/null @@ -1,8 +0,0 @@ -import pipeline from "./pipeline.ts"; -import { assertEquals } from "https://deno.land/std@0.191.0/testing/asserts.ts"; - -Deno.test(function pipelineTest() { - const expected = Deno.readTextFileSync("./fixtures/.gitlab-ci.yml"); - const actual = pipeline.toString(); - assertEquals(actual, expected); -}); diff --git a/.fluentci/.github/workflows/ci.yml b/.fluentci/.github/workflows/ci.yml deleted file mode 100644 index a3ab0742..00000000 --- a/.fluentci/.github/workflows/ci.yml +++ /dev/null @@ -1,28 +0,0 @@ -# Do not edit this file directly. It is generated by Fluent Github Actions - -name: Codecov -on: - push: - branches: - - main -jobs: - tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: denoland/setup-deno@v1 - with: - deno-version: v1.37 - - name: Setup Fluent CI CLI - run: deno install -A -r https://cli.fluentci.io -n fluentci - - name: Setup Dagger - run: | - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.8 sh - sudo mv bin/dagger /usr/local/bin - dagger version - - name: Run Dagger Pipelines - run: dagger run fluentci . fmt lint test - - name: Upload to Codecov - run: dagger run fluentci codecov_pipeline - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.fluentci/.github/workflows/example.yml b/.fluentci/.github/workflows/example.yml deleted file mode 100644 index 2016b59f..00000000 --- a/.fluentci/.github/workflows/example.yml +++ /dev/null @@ -1,25 +0,0 @@ -# Do not edit this file directly. It is generated by https://deno.land/x/fluent_github_actions - -name: Example -on: - push: - branches: - - main -jobs: - tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: denoland/setup-deno@v1 - with: - deno-version: v1.37 - - name: Setup Fluent CI CLI - run: deno install -A -r https://cli.fluentci.io -n fluentci - - name: Setup Dagger - run: | - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.8 sh - sudo mv bin/dagger /usr/local/bin - dagger version - - name: Run Dagger Pipelines - run: dagger run deno run -A ../src/dagger/runner.ts - working-directory: example diff --git a/.fluentci/.github/workflows/zenith.yml b/.fluentci/.github/workflows/zenith.yml deleted file mode 100644 index 247467e8..00000000 --- a/.fluentci/.github/workflows/zenith.yml +++ /dev/null @@ -1,23 +0,0 @@ -# Do not edit this file directly. It is generated by https://deno.land/x/fluent_github_actions - -name: Zenith Example -on: - push: - branches: - - zenith - -jobs: - tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Setup Dagger Zenith - run: | - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.8 sh - sudo mv bin/dagger /usr/local/bin - dagger version - - name: Run Dagger Pipelines - run: | - dagger query --doc test.gql - dagger query --doc build.gql - working-directory: example diff --git a/.fluentci/deno.lock b/.fluentci/deno.lock index ff5726af..08760a3e 100644 --- a/.fluentci/deno.lock +++ b/.fluentci/deno.lock @@ -2,255 +2,205 @@ "version": "3", "packages": { "specifiers": { - "npm:nexus": "npm:nexus@1.3.0_graphql@16.8.1" + "jsr:@std/assert@^0.217.0": "jsr:@std/assert@0.217.0", + "jsr:@std/assert@^0.218.2": "jsr:@std/assert@0.218.2", + "jsr:@std/flags@0.218.2": "jsr:@std/flags@0.218.2", + "jsr:@std/fmt@0.218.2": "jsr:@std/fmt@0.218.2", + "jsr:@std/fmt@^0.217.0": "jsr:@std/fmt@0.217.0", + "jsr:@std/fmt@^0.218.2": "jsr:@std/fmt@0.218.2", + "jsr:@std/path@0.218.2": "jsr:@std/path@0.218.2", + "jsr:@std/testing@0.217.0": "jsr:@std/testing@0.217.0", + "jsr:@std/testing@0.218.2": "jsr:@std/testing@0.218.2", + "jsr:@tsirysndr/env-js@0.1.2": "jsr:@tsirysndr/env-js@0.1.2", + "jsr:@tsirysndr/exit-js@0.1.0": "jsr:@tsirysndr/exit-js@0.1.0", + "jsr:@tsirysndr/fluent-az-pipelines@0.3": "jsr:@tsirysndr/fluent-az-pipelines@0.3.1", + "jsr:@tsirysndr/fluent-circleci@0.3": "jsr:@tsirysndr/fluent-circleci@0.3.1", + "jsr:@tsirysndr/fluent-codepipeline@0.3": "jsr:@tsirysndr/fluent-codepipeline@0.3.0", + "jsr:@tsirysndr/fluent-gh-actions@0.3": "jsr:@tsirysndr/fluent-gh-actions@0.3.0", + "jsr:@tsirysndr/fluent-gitlab-ci@0.5": "jsr:@tsirysndr/fluent-gitlab-ci@0.5.0", + "npm:graphql-request@6.1.0": "npm:graphql-request@6.1.0_graphql@16.8.1", + "npm:graphql@16.8.1": "npm:graphql@16.8.1", + "npm:lodash@4.17.21": "npm:lodash@4.17.21", + "npm:node-color-log@11.0.2": "npm:node-color-log@11.0.2", + "npm:stringify-tree@1.1.1": "npm:stringify-tree@1.1.1", + "npm:yaml@2.3.1": "npm:yaml@2.3.1", + "npm:zod@3.22.1": "npm:zod@3.22.1" + }, + "jsr": { + "@std/assert@0.217.0": { + "integrity": "c98e279362ca6982d5285c3b89517b757c1e3477ee9f14eb2fdf80a45aaa9642", + "dependencies": [ + "jsr:@std/fmt@^0.217.0" + ] + }, + "@std/assert@0.218.2": { + "integrity": "7f0a5a1a8cf86607cd6c2c030584096e1ffad27fc9271429a8cb48cfbdee5eaf", + "dependencies": [ + "jsr:@std/fmt@^0.218.2" + ] + }, + "@std/flags@0.218.2": { + "integrity": "0d4e8ac15e7dfede26153c63a6d55d0aad56ae88beb2ede38c14c775dfc5b25e", + "dependencies": [ + "jsr:@std/assert@^0.218.2" + ] + }, + "@std/fmt@0.217.0": { + "integrity": "cb99f82500b8da20202fedfa8bb94dd0222e81f0494ed9087de20ee3d8a39a8d" + }, + "@std/fmt@0.218.2": { + "integrity": "99526449d2505aa758b6cbef81e7dd471d8b28ec0dcb1491d122b284c548788a" + }, + "@std/path@0.218.2": { + "integrity": "b568fd923d9e53ad76d17c513e7310bda8e755a3e825e6289a0ce536404e2662", + "dependencies": [ + "jsr:@std/assert@^0.218.2" + ] + }, + "@std/testing@0.217.0": { + "integrity": "97508b254ca1888d512215288bfb3f192a4e6e84336ba56b189c7862258a058b", + "dependencies": [ + "jsr:@std/assert@^0.217.0" + ] + }, + "@std/testing@0.218.2": { + "integrity": "49410b23584c924533786e6c117d71486c1daa65f4911fd6cfc95e4edba9de7f", + "dependencies": [ + "jsr:@std/assert@^0.218.2" + ] + }, + "@tsirysndr/env-js@0.1.2": { + "integrity": "16a8cf4e60c8b43f4d62dd762006de40d56e5b144a56c0954a11f99ee12c5d3a" + }, + "@tsirysndr/exit-js@0.1.0": { + "integrity": "4ea378ce2575931426bcf60d4588c9e9cf489fa93d3907cd9ee60feb38960230" + }, + "@tsirysndr/fluent-az-pipelines@0.3.1": { + "integrity": "50f25c5d21908debf3d7218c3ec4c0f987ed891a85a0b3e133e497492c57361b", + "dependencies": [ + "jsr:@std/testing@0.217.0", + "npm:yaml@2.3.1", + "npm:zod@3.22.1" + ] + }, + "@tsirysndr/fluent-circleci@0.3.1": { + "integrity": "74bab37b52a2289d8a093b57ea41092afbf2ed488f17795d440811ac9ebc2543", + "dependencies": [ + "jsr:@std/testing@0.217.0", + "npm:lodash@4.17.21", + "npm:yaml@2.3.1", + "npm:zod@3.22.1" + ] + }, + "@tsirysndr/fluent-codepipeline@0.3.0": { + "integrity": "3050df3fed469d6791831a0a83529de77732d14c27f4a1446788de2c740c73df", + "dependencies": [ + "jsr:@std/testing@0.217.0", + "npm:yaml@2.3.1", + "npm:zod@3.22.1" + ] + }, + "@tsirysndr/fluent-gh-actions@0.3.0": { + "integrity": "2eaff18fbe9b25042fbb321d3bec61a34a15f736ec95bd2da214dcd1c3b8d5cd", + "dependencies": [ + "jsr:@std/testing@0.217.0", + "npm:yaml@2.3.1", + "npm:zod@3.22.1" + ] + }, + "@tsirysndr/fluent-gitlab-ci@0.5.0": { + "integrity": "57e7d231375902358d2bd5b63766f8ffb7030157a9e3764d5e0b0fb7533dd3f9", + "dependencies": [ + "jsr:@std/testing@0.217.0", + "npm:yaml@2.3.1", + "npm:zod@3.22.1" + ] + } }, "npm": { + "@graphql-typed-document-node/core@3.2.0_graphql@16.8.1": { + "integrity": "sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==", + "dependencies": { + "graphql": "graphql@16.8.1" + } + }, + "@types/lodash.flatten@4.4.9": { + "integrity": "sha512-JCW9xofpn9oJfFSccpBRF8IrB5guqmcKZIa7J9DnZqLd9wgGYbewaYnjbNw3Fb+St8BHVsnGmmS0A3j99LII3Q==", + "dependencies": { + "@types/lodash": "@types/lodash@4.17.7" + } + }, + "@types/lodash@4.17.7": { + "integrity": "sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA==", + "dependencies": {} + }, + "cross-fetch@3.1.8": { + "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", + "dependencies": { + "node-fetch": "node-fetch@2.7.0" + } + }, + "graphql-request@6.1.0_graphql@16.8.1": { + "integrity": "sha512-p+XPfS4q7aIpKVcgmnZKhMNqhltk20hfXtkaIkTfjjmiKMJ5xrt5c743cL03y/K7y1rg3WrIC49xGiEQ4mxdNw==", + "dependencies": { + "@graphql-typed-document-node/core": "@graphql-typed-document-node/core@3.2.0_graphql@16.8.1", + "cross-fetch": "cross-fetch@3.1.8", + "graphql": "graphql@16.8.1" + } + }, "graphql@16.8.1": { "integrity": "sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw==", "dependencies": {} }, - "iterall@1.3.0": { - "integrity": "sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==", + "lodash.flatten@4.4.0": { + "integrity": "sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==", + "dependencies": {} + }, + "lodash@4.17.21": { + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dependencies": {} }, - "nexus@1.3.0_graphql@16.8.1": { - "integrity": "sha512-w/s19OiNOs0LrtP7pBmD9/FqJHvZLmCipVRt6v1PM8cRUYIbhEswyNKGHVoC4eHZGPSnD+bOf5A3+gnbt0A5/A==", + "node-color-log@11.0.2": { + "integrity": "sha512-+gD5pQpVpEkEA3He9STku4VL1EO9SaOW3HElumCd3xWorulnfr2053NCSVwPCXrkwI5ihPYucQxSCSOuS1q+Eg==", + "dependencies": {} + }, + "node-fetch@2.7.0": { + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dependencies": { - "graphql": "graphql@16.8.1", - "iterall": "iterall@1.3.0", - "tslib": "tslib@2.6.2" + "whatwg-url": "whatwg-url@5.0.0" } }, - "tslib@2.6.2": { - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "stringify-tree@1.1.1": { + "integrity": "sha512-lVfVX+HJ9Gx2NUv0vJTRhqCPYlgzbdR25MF34Md1Bjq6jvJocOLgfHhusYtBSKi/bwpkgLGjtF/dVZlBbA6oZw==", + "dependencies": { + "@types/lodash.flatten": "@types/lodash.flatten@4.4.9", + "lodash.flatten": "lodash.flatten@4.4.0" + } + }, + "tr46@0.0.3": { + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dependencies": {} + }, + "webidl-conversions@3.0.1": { + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dependencies": {} + }, + "whatwg-url@5.0.0": { + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "tr46@0.0.3", + "webidl-conversions": "webidl-conversions@3.0.1" + } + }, + "yaml@2.3.1": { + "integrity": "sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==", + "dependencies": {} + }, + "zod@3.22.1": { + "integrity": "sha512-+qUhAMl414+Elh+fRNtpU+byrwjDFOS1N7NioLY+tSlcADTx4TkCUua/hxJvxwDXcV4397/nZ420jy4n4+3WUg==", "dependencies": {} } } }, - "remote": { - "https://cdn.jsdelivr.net/gh/tsirysndr/tar@v0.1.1/deps.ts": "096395daebc7ed8a18f0484e4ffcc3a7f70e50946735f7df9611a7fcfd8272cc", - "https://cdn.jsdelivr.net/gh/tsirysndr/tar@v0.1.1/mod.ts": "e269d71c72ae68e82c1960e5db2a0c7419c97c9683ef717de0ab75d90f364713", - "https://cdn.jsdelivr.net/gh/tsirysndr/tar@v0.1.1/src/tar.ts": "9b02eaaa784b225ad7a23d2769cd492adf113ea7c11c02e3646849e98f4ae43b", - "https://deno.land/std@0.129.0/_util/assert.ts": "e94f2eb37cebd7f199952e242c77654e43333c1ac4c5c700e929ea3aa5489f74", - "https://deno.land/std@0.129.0/_util/os.ts": "49b92edea1e82ba295ec946de8ffd956ed123e2948d9bd1d3e901b04e4307617", - "https://deno.land/std@0.129.0/archive/tar.ts": "35ea1baddec7988cc4034765a2cee7613bc8074bd40940d3f5e98f63070a716a", - "https://deno.land/std@0.129.0/async/abortable.ts": "a896ac6b0d4237bd2d2d248217cfa1f0d85ccda93cb25ebda55e33850e526be6", - "https://deno.land/std@0.129.0/async/deadline.ts": "48ac998d7564969f3e6ec6b6f9bf0217ebd00239b1b2292feba61272d5dd58d0", - "https://deno.land/std@0.129.0/async/debounce.ts": "564273ef242bcfcda19a439132f940db8694173abffc159ea34f07d18fc42620", - "https://deno.land/std@0.129.0/async/deferred.ts": "bc18e28108252c9f67dfca2bbc4587c3cbf3aeb6e155f8c864ca8ecff992b98a", - "https://deno.land/std@0.129.0/async/delay.ts": "cbbdf1c87d1aed8edc7bae13592fb3e27e3106e0748f089c263390d4f49e5f6c", - "https://deno.land/std@0.129.0/async/mod.ts": "2240c6841157738414331f47dee09bb8c0482c5b1980b6e3234dd03515c8132f", - "https://deno.land/std@0.129.0/async/mux_async_iterator.ts": "f4d1d259b0c694d381770ddaaa4b799a94843eba80c17f4a2ec2949168e52d1e", - "https://deno.land/std@0.129.0/async/pool.ts": "97b0dd27c69544e374df857a40902e74e39532f226005543eabacb551e277082", - "https://deno.land/std@0.129.0/async/tee.ts": "1341feb1f5b1a96f8628d0f8fc07d8c43d3813423f18a63bf1b4785568d21b1f", - "https://deno.land/std@0.129.0/bytes/bytes_list.ts": "67eb118e0b7891d2f389dad4add35856f4ad5faab46318ff99653456c23b025d", - "https://deno.land/std@0.129.0/bytes/equals.ts": "fc16dff2090cced02497f16483de123dfa91e591029f985029193dfaa9d894c9", - "https://deno.land/std@0.129.0/bytes/mod.ts": "d3b455c0dbd4804644159d1e25946ade5ee385d2359894de49e2c6101b18b7a9", - "https://deno.land/std@0.129.0/encoding/base64.ts": "c8c16b4adaa60d7a8eee047c73ece26844435e8f7f1328d74593dbb2dd58ea4f", - "https://deno.land/std@0.129.0/encoding/base64url.ts": "55f9d13df02efac10c6f96169daa3e702606a64e8aa27c0295f645f198c27130", - "https://deno.land/std@0.129.0/fmt/colors.ts": "30455035d6d728394781c10755351742dd731e3db6771b1843f9b9e490104d37", - "https://deno.land/std@0.129.0/fmt/printf.ts": "e2c0f72146aed1efecf0c39ab928b26ae493a2278f670a871a0fbdcf36ff3379", - "https://deno.land/std@0.129.0/fs/_util.ts": "0fb24eb4bfebc2c194fb1afdb42b9c3dda12e368f43e8f2321f84fc77d42cb0f", - "https://deno.land/std@0.129.0/fs/ensure_dir.ts": "9dc109c27df4098b9fc12d949612ae5c9c7169507660dcf9ad90631833209d9d", - "https://deno.land/std@0.129.0/fs/ensure_file.ts": "7d353e64fee3d4d1e7c6b6726a2a5e987ba402c15fb49566309042887349c545", - "https://deno.land/std@0.129.0/io/buffer.ts": "bd0c4bf53db4b4be916ca5963e454bddfd3fcd45039041ea161dbf826817822b", - "https://deno.land/std@0.129.0/io/files.ts": "d199ef64e918a256320ba8d8d44ae91de87c9077df8f8d6cca013f1b9fbbe285", - "https://deno.land/std@0.129.0/io/readers.ts": "679471f3b9929b54393c9cd75b6bd178b4bc6d9aab5c0f1f9538f862cf4746fe", - "https://deno.land/std@0.129.0/io/util.ts": "078da53bba767bec0d45f7da44411f6dbf269e51ef7fcfea5e3714e04681c674", - "https://deno.land/std@0.129.0/node/_buffer.mjs": "f4a7df481d4eed06dc0151b833177d8ef74fc3a96dd4d2b073e690b6ced9474d", - "https://deno.land/std@0.129.0/node/_core.ts": "568d277be2e086af996cbdd599fec569f5280e9a494335ca23ad392b130d7bb9", - "https://deno.land/std@0.129.0/node/_events.mjs": "c0e3e0e290a8b81fee9d2973a529c8dcd5ebb4406782d1f91085274e2cb8490f", - "https://deno.land/std@0.129.0/node/_fixed_queue.ts": "455b3c484de48e810b13bdf95cd1658ecb1ba6bcb8b9315ffe994efcde3ba5f5", - "https://deno.land/std@0.129.0/node/_next_tick.ts": "64c361f6bca21df2a72dd77b84bd49d80d97a694dd3080703bc78f52146351d1", - "https://deno.land/std@0.129.0/node/_process/exiting.ts": "bc9694769139ffc596f962087155a8bfef10101d03423b9dcbc51ce6e1f88fce", - "https://deno.land/std@0.129.0/node/_util/_util_callbackify.ts": "79928ad80df3e469f7dcdb198118a7436d18a9f6c08bd7a4382332ad25a718cf", - "https://deno.land/std@0.129.0/node/_utils.ts": "c2c352e83c4c96f5ff994b1c8246bff2abcb21bfc3f1c06162cb3af1d201e615", - "https://deno.land/std@0.129.0/node/buffer.ts": "fbecbf3f237fa49bec96e97ecf56a7b92d48037b3d11219288e68943cc921600", - "https://deno.land/std@0.129.0/node/events.ts": "a1d40fc0dbccc944379ef968b80ea08f9fce579e88b5057fdb64e4f0812476dd", - "https://deno.land/std@0.129.0/node/internal/buffer.mjs": "6662fe7fe517329453545be34cea27a24f8ccd6d09afd4f609f11ade2b6dfca7", - "https://deno.land/std@0.129.0/node/internal/crypto/keys.ts": "16ce7b15a9fc5e4e3dee8fde75dae12f3d722558d5a1a6e65a9b4f86d64a21e9", - "https://deno.land/std@0.129.0/node/internal/crypto/util.mjs": "1de55a47fdbed6721b467a77ba48fdd1550c10b5eee77bbdb602eaffee365a5e", - "https://deno.land/std@0.129.0/node/internal/error_codes.ts": "ac03c4eae33de3a69d6c98e8678003207eecf75a6900eb847e3fea3c8c9e6d8f", - "https://deno.land/std@0.129.0/node/internal/errors.ts": "0d3a1eb03b654beb29b8354759a6902f45a840d4f957e9a3c632a24ce4c32632", - "https://deno.land/std@0.129.0/node/internal/hide_stack_frames.ts": "a91962ec84610bc7ec86022c4593cdf688156a5910c07b5bcd71994225c13a03", - "https://deno.land/std@0.129.0/node/internal/normalize_encoding.mjs": "3779ec8a7adf5d963b0224f9b85d1bc974a2ec2db0e858396b5d3c2c92138a0a", - "https://deno.land/std@0.129.0/node/internal/util.mjs": "684653b962fae84fd2bc08997291b1a50bed09b95dcfa7d35e3c4143163e879a", - "https://deno.land/std@0.129.0/node/internal/util/comparisons.ts": "680b55fe8bdf1613633bc469fa0440f43162c76dbe36af9aa2966310e1bb9f6e", - "https://deno.land/std@0.129.0/node/internal/util/debuglog.ts": "99e91bdf26f6c67861031f684817e1705a5bc300e81346585b396f413387edfb", - "https://deno.land/std@0.129.0/node/internal/util/inspect.mjs": "d1c2569c66a3dab45eec03208f22ad4351482527859c0011a28a6c797288a0aa", - "https://deno.land/std@0.129.0/node/internal/util/types.ts": "b2dacb8f1f5d28a51c4da5c5b75172b7fcf694073ce95ca141323657e18b0c60", - "https://deno.land/std@0.129.0/node/internal/validators.mjs": "a7e82eafb7deb85c332d5f8d9ffef052f46a42d4a121eada4a54232451acc49a", - "https://deno.land/std@0.129.0/node/internal_binding/_libuv_winerror.ts": "801e05c2742ae6cd42a5f0fd555a255a7308a65732551e962e5345f55eedc519", - "https://deno.land/std@0.129.0/node/internal_binding/_node.ts": "e4075ba8a37aef4eb5b592c8e3807c39cb49ca8653faf8e01a43421938076c1b", - "https://deno.land/std@0.129.0/node/internal_binding/_utils.ts": "1c50883b5751a9ea1b38951e62ed63bacfdc9d69ea665292edfa28e1b1c5bd94", - "https://deno.land/std@0.129.0/node/internal_binding/_winerror.ts": "8811d4be66f918c165370b619259c1f35e8c3e458b8539db64c704fbde0a7cd2", - "https://deno.land/std@0.129.0/node/internal_binding/buffer.ts": "722c62b85f966e0777b2d98c021b60e75d7f2c2dabc43413ef37d60dbd13a5d9", - "https://deno.land/std@0.129.0/node/internal_binding/constants.ts": "aff06aac49eda4234bd3a2b0b8e1fbfc67824e281c532ff9960831ab503014cc", - "https://deno.land/std@0.129.0/node/internal_binding/string_decoder.ts": "5cb1863763d1e9b458bc21d6f976f16d9c18b3b3f57eaf0ade120aee38fba227", - "https://deno.land/std@0.129.0/node/internal_binding/types.ts": "4c26fb74ba2e45de553c15014c916df6789529a93171e450d5afb016b4c765e7", - "https://deno.land/std@0.129.0/node/internal_binding/util.ts": "90364292e2bd598ab5d105b48ca49817b6708f2d1d9cbaf08b2b3ab5ca4c90a7", - "https://deno.land/std@0.129.0/node/internal_binding/uv.ts": "3821bc5e676d6955d68f581988c961d77dd28190aba5a9c59f16001a4deb34ba", - "https://deno.land/std@0.129.0/node/util.ts": "7fd6933b37af89a8e64d73dc6ee1732455a59e7e6d0965311fbd73cd634ea630", - "https://deno.land/std@0.129.0/node/util/types.mjs": "f9288198cacd374b41bae7e92a23179d3160f4c0eaf14e19be3a4e7057219a60", - "https://deno.land/std@0.129.0/path/_constants.ts": "df1db3ffa6dd6d1252cc9617e5d72165cd2483df90e93833e13580687b6083c3", - "https://deno.land/std@0.129.0/path/_interface.ts": "ee3b431a336b80cf445441109d089b70d87d5e248f4f90ff906820889ecf8d09", - "https://deno.land/std@0.129.0/path/_util.ts": "c1e9686d0164e29f7d880b2158971d805b6e0efc3110d0b3e24e4b8af2190d2b", - "https://deno.land/std@0.129.0/path/common.ts": "bee563630abd2d97f99d83c96c2fa0cca7cee103e8cb4e7699ec4d5db7bd2633", - "https://deno.land/std@0.129.0/path/glob.ts": "cb5255638de1048973c3e69e420c77dc04f75755524cb3b2e160fe9277d939ee", - "https://deno.land/std@0.129.0/path/mod.ts": "4275129bb766f0e475ecc5246aa35689eeade419d72a48355203f31802640be7", - "https://deno.land/std@0.129.0/path/posix.ts": "663e4a6fe30a145f56aa41a22d95114c4c5582d8b57d2d7c9ed27ad2c47636bb", - "https://deno.land/std@0.129.0/path/separator.ts": "fe1816cb765a8068afb3e8f13ad272351c85cbc739af56dacfc7d93d710fe0f9", - "https://deno.land/std@0.129.0/path/win32.ts": "e7bdf63e8d9982b4d8a01ef5689425c93310ece950e517476e22af10f41a136e", - "https://deno.land/std@0.129.0/streams/conversion.ts": "712585bfa0172a97fb68dd46e784ae8ad59d11b88079d6a4ab098ff42e697d21", - "https://deno.land/std@0.129.0/testing/_diff.ts": "9d849cd6877694152e01775b2d93f9d6b7aef7e24bfe3bfafc4d7a1ac8e9f392", - "https://deno.land/std@0.129.0/testing/asserts.ts": "0a95d9e8076dd3e7f0eeb605a67c148078b4b11f4abcd5eef115b0361b0736a2", - "https://deno.land/std@0.150.0/media_types/_util.ts": "ce9b4fc4ba1c447dafab619055e20fd88236ca6bdd7834a21f98bd193c3fbfa1", - "https://deno.land/std@0.150.0/media_types/mod.ts": "2d4b6f32a087029272dc59e0a55ae3cc4d1b27b794ccf528e94b1925795b3118", - "https://deno.land/std@0.150.0/media_types/vendor/mime-db.v1.52.0.ts": "724cee25fa40f1a52d3937d6b4fbbfdd7791ff55e1b7ac08d9319d5632c7f5af", - "https://deno.land/std@0.191.0/fmt/colors.ts": "d67e3cd9f472535241a8e410d33423980bec45047e343577554d3356e1f0ef4e", - "https://deno.land/std@0.191.0/testing/_diff.ts": "1a3c044aedf77647d6cac86b798c6417603361b66b54c53331b312caeb447aea", - "https://deno.land/std@0.191.0/testing/_format.ts": "a69126e8a469009adf4cf2a50af889aca364c349797e63174884a52ff75cf4c7", - "https://deno.land/std@0.191.0/testing/asserts.ts": "e16d98b4d73ffc4ed498d717307a12500ae4f2cbe668f1a215632d19fcffc22f", - "https://deno.land/std@0.203.0/assert/assert.ts": "9a97dad6d98c238938e7540736b826440ad8c1c1e54430ca4c4e623e585607ee", - "https://deno.land/std@0.203.0/assert/assertion_error.ts": "4d0bde9b374dfbcbe8ac23f54f567b77024fb67dbb1906a852d67fe050d42f56", - "https://deno.land/std@0.203.0/path/_basename.ts": "057d420c9049821f983f784fd87fa73ac471901fb628920b67972b0f44319343", - "https://deno.land/std@0.203.0/path/_constants.ts": "e49961f6f4f48039c0dfed3c3f93e963ca3d92791c9d478ac5b43183413136e0", - "https://deno.land/std@0.203.0/path/_dirname.ts": "355e297236b2218600aee7a5301b937204c62e12da9db4b0b044993d9e658395", - "https://deno.land/std@0.203.0/path/_extname.ts": "eaaa5aae1acf1f03254d681bd6a8ce42a9cb5b7ff2213a9d4740e8ab31283664", - "https://deno.land/std@0.203.0/path/_format.ts": "4a99270d6810f082e614309164fad75d6f1a483b68eed97c830a506cc589f8b4", - "https://deno.land/std@0.203.0/path/_from_file_url.ts": "6eadfae2e6f63ad9ee46b26db4a1b16583055c0392acedfb50ed2fc694b6f581", - "https://deno.land/std@0.203.0/path/_interface.ts": "6471159dfbbc357e03882c2266d21ef9afdb1e4aa771b0545e90db58a0ba314b", - "https://deno.land/std@0.203.0/path/_is_absolute.ts": "05dac10b5e93c63198b92e3687baa2be178df5321c527dc555266c0f4f51558c", - "https://deno.land/std@0.203.0/path/_join.ts": "815f5e85b042285175b1492dd5781240ce126c23bd97bad6b8211fe7129c538e", - "https://deno.land/std@0.203.0/path/_normalize.ts": "a19ec8706b2707f9dd974662a5cd89fad438e62ab1857e08b314a8eb49a34d81", - "https://deno.land/std@0.203.0/path/_os.ts": "30b0c2875f360c9296dbe6b7f2d528f0f9c741cecad2e97f803f5219e91b40a2", - "https://deno.land/std@0.203.0/path/_parse.ts": "0f9b0ff43682dd9964eb1c4398610c4e165d8db9d3ac9d594220217adf480cfa", - "https://deno.land/std@0.203.0/path/_relative.ts": "27bdeffb5311a47d85be26d37ad1969979359f7636c5cd9fcf05dcd0d5099dc5", - "https://deno.land/std@0.203.0/path/_resolve.ts": "7a3616f1093735ed327e758313b79c3c04ea921808ca5f19ddf240cb68d0adf6", - "https://deno.land/std@0.203.0/path/_to_file_url.ts": "a141e4a525303e1a3a0c0571fd024552b5f3553a2af7d75d1ff3a503dcbb66d8", - "https://deno.land/std@0.203.0/path/_to_namespaced_path.ts": "0d5f4caa2ed98ef7a8786286df6af804b50e38859ae897b5b5b4c8c5930a75c8", - "https://deno.land/std@0.203.0/path/_util.ts": "4e191b1bac6b3bf0c31aab42e5ca2e01a86ab5a0d2e08b75acf8585047a86221", - "https://deno.land/std@0.203.0/path/basename.ts": "bdfa5a624c6a45564dc6758ef2077f2822978a6dbe77b0a3514f7d1f81362930", - "https://deno.land/std@0.203.0/path/common.ts": "ee7505ab01fd22de3963b64e46cff31f40de34f9f8de1fff6a1bd2fe79380000", - "https://deno.land/std@0.203.0/path/dirname.ts": "b6533f4ee4174a526dec50c279534df5345836dfdc15318400b08c62a62a39dd", - "https://deno.land/std@0.203.0/path/extname.ts": "62c4b376300795342fe1e4746c0de518b4dc9c4b0b4617bfee62a2973a9555cf", - "https://deno.land/std@0.203.0/path/format.ts": "110270b238514dd68455a4c54956215a1aff7e37e22e4427b7771cefe1920aa5", - "https://deno.land/std@0.203.0/path/from_file_url.ts": "9f5cb58d58be14c775ec2e57fc70029ac8b17ed3bd7fe93e475b07280adde0ac", - "https://deno.land/std@0.203.0/path/glob.ts": "593e2c3573883225c25c5a21aaa8e9382a696b8e175ea20a3b6a1471ad17aaed", - "https://deno.land/std@0.203.0/path/is_absolute.ts": "0b92eb35a0a8780e9f16f16bb23655b67dace6a8e0d92d42039e518ee38103c1", - "https://deno.land/std@0.203.0/path/join.ts": "31c5419f23d91655b08ec7aec403f4e4cd1a63d39e28f6e42642ea207c2734f8", - "https://deno.land/std@0.203.0/path/mod.ts": "6e1efb0b13121463aedb53ea51dabf5639a3172ab58c89900bbb72b486872532", - "https://deno.land/std@0.203.0/path/normalize.ts": "6ea523e0040979dd7ae2f1be5bf2083941881a252554c0f32566a18b03021955", - "https://deno.land/std@0.203.0/path/parse.ts": "be8de342bb9e1924d78dc4d93c45215c152db7bf738ec32475560424b119b394", - "https://deno.land/std@0.203.0/path/posix.ts": "0a1c1952d132323a88736d03e92bd236f3ed5f9f079e5823fae07c8d978ee61b", - "https://deno.land/std@0.203.0/path/relative.ts": "8bedac226afd360afc45d451a6c29fabceaf32978526bcb38e0c852661f66c61", - "https://deno.land/std@0.203.0/path/resolve.ts": "133161e4949fc97f9ca67988d51376b0f5eef8968a6372325ab84d39d30b80dc", - "https://deno.land/std@0.203.0/path/separator.ts": "40a3e9a4ad10bef23bc2cd6c610291b6c502a06237c2c4cd034a15ca78dedc1f", - "https://deno.land/std@0.203.0/path/to_file_url.ts": "00e6322373dd51ad109956b775e4e72e5f9fa68ce2c6b04e4af2a6eed3825d31", - "https://deno.land/std@0.203.0/path/to_namespaced_path.ts": "1b1db3055c343ab389901adfbda34e82b7386bcd1c744d54f9c1496ee0fd0c3d", - "https://deno.land/std@0.203.0/path/win32.ts": "8b3f80ef7a462511d5e8020ff490edcaa0a0d118f1b1e9da50e2916bdd73f9dd", - "https://deno.land/std@0.52.0/fmt/colors.ts": "ec9d653672a9a3c7b6eafe53c5bc797364a2db2dcf766ab649c1155fea7a80b2", - "https://deno.land/x/crc32@v0.2.0/mod.ts": "de7a3fa2d4ef24b96fc21e1cc4d2d65d1d2b1dcea92f63960e3e11bfa82df0fa", - "https://deno.land/x/fluent_aws_codepipeline@v0.2.3/mod.ts": "79cc758901d20a3573d7e3cc2db9f0a5fe56833f4d9befcedc072b94d542eec7", - "https://deno.land/x/fluent_aws_codepipeline@v0.2.3/src/buildspec.ts": "fb07cbbf9473586cea66c0c508412080c2d4ba4e7f4ea0985661afeed445710b", - "https://deno.land/x/fluent_aws_codepipeline@v0.2.3/src/spec.ts": "c0ce4c6e2685e23a3abdeb9fc18012253199dae355b06189d8248b052301a63e", - "https://deno.land/x/fluent_azure_pipelines@v0.2.0/mod.ts": "6f3c62419b96251dd1b5d8d6a172c0a8724a73b7feec786e540f51f0c8a0f0fd", - "https://deno.land/x/fluent_azure_pipelines@v0.2.0/src/config.ts": "619f4c64dad9b510c5788d4939a8afe013cb7dfc993dfd32f2ff4d0a2140075e", - "https://deno.land/x/fluent_azure_pipelines@v0.2.0/src/spec.ts": "cab6e4a6afb0f16e6c406cfab87264a963734720c468532c4f778228d1f1758d", - "https://deno.land/x/fluent_circleci@v0.2.5/mod.ts": "6a885bf35dbe08a7e971aa105763d724dd2a09c237b6292c9cd5de540237af37", - "https://deno.land/x/fluent_circleci@v0.2.5/src/config.ts": "d7e9902b4c2fddfa61ff6a509f3a09adee161fae9f93029dcbc8ec7a7bbd990b", - "https://deno.land/x/fluent_circleci@v0.2.5/src/job.ts": "b6ffb66ef10cf0e26460a88e1614ef864b606571e8d72376eeb09254f66a9926", - "https://deno.land/x/fluent_circleci@v0.2.5/src/spec.ts": "eda462e9ff535dbc7d3eb7e47253948d40ebaaf34d964e0931a6a25cdd823736", - "https://deno.land/x/fluent_github_actions@v0.2.1/mod.ts": "dc62b622791da77bc27f68e33cba618983a0770a9a12dcc9e0f9a61161bb90e5", - "https://deno.land/x/fluent_github_actions@v0.2.1/src/event.ts": "d44d42356a04aea7ba64ff9e9a12090f477605c27a940bbf80aba612e4e96d1e", - "https://deno.land/x/fluent_github_actions@v0.2.1/src/job_spec.ts": "93aa5b8b79cd8baaf875901322c4c38c27d4458439a831cb0ad86401b207a3dc", - "https://deno.land/x/fluent_github_actions@v0.2.1/src/step_spec.ts": "b399949d1fd9c45873cdda70d82c92e3d9d96ba9a1d5749f3010a1f242b20e35", - "https://deno.land/x/fluent_github_actions@v0.2.1/src/workflow.ts": "c9e3b7b3a59f7edff958eae8f27a8542f2a24889ea27c8aa016d0c0b0ca416c6", - "https://deno.land/x/fluent_github_actions@v0.2.1/src/workflow_spec.ts": "b5c696dc70ee3f777a565197c6a3a379d87d026e12d59942fef5b9dc72124c3a", - "https://deno.land/x/fluent_gitlab_ci@v0.4.2/mod.ts": "3becefe569f5c9814dffa1b534794a42b948481753a5903fa1b48d5337206ced", - "https://deno.land/x/fluent_gitlab_ci@v0.4.2/src/environment.ts": "f12ee4fb50e5100fccec29dc1d35aa430bfe8373e84286a8ab9f7b8e178f14e3", - "https://deno.land/x/fluent_gitlab_ci@v0.4.2/src/gitlabci.ts": "ef36465c41412ae94b919cfcb80b99ec1c04536dbf42ad09cd73abf3ea4d52a6", - "https://deno.land/x/fluent_gitlab_ci@v0.4.2/src/gitlabci_spec.ts": "37f4ecef3ea414f57c54a360bc0178f5fad21b4a9db59d29d1961cd368febaed", - "https://deno.land/x/fluent_gitlab_ci@v0.4.2/src/index.ts": "b5e374a24e3bca1d6fead0861f2c1b1e09e087a17e59297263f681ee71c972fe", - "https://deno.land/x/fluent_gitlab_ci@v0.4.2/src/job.ts": "65a5be7f5816846919907aab00530044b571570a54a8a0bc967f4269a2ce99b7", - "https://deno.land/x/spinners@v1.1.2/mod.ts": "ed5b3562d4ea6c6887bc7e9844612b08a3bc3a3678ca77cc7dfdf461c362751e", - "https://deno.land/x/spinners@v1.1.2/spinner-types.ts": "c67e6962a0c738aa57b4d3ad9fe06c8c0131f93360acbf95456f2ba200fd8826", - "https://deno.land/x/spinners@v1.1.2/terminal-spinner.ts": "1cf0c38a423781734e2e538323c1992027830d741e90f0b81f532e5bc993d035", - "https://deno.land/x/spinners@v1.1.2/util.ts": "7083203bedbda2e6144a14a7dd093747a7a01e73d95637c888bae8ac22a1c58b", - "https://deno.land/x/xhr@0.3.0/mod.ts": "094aacd627fd9635cd942053bf8032b5223b909858fa9dc8ffa583752ff63b20", - "https://deno.land/x/zod@v3.22.1/ZodError.ts": "4de18ff525e75a0315f2c12066b77b5c2ae18c7c15ef7df7e165d63536fdf2ea", - "https://deno.land/x/zod@v3.22.1/errors.ts": "5285922d2be9700cc0c70c95e4858952b07ae193aa0224be3cbd5cd5567eabef", - "https://deno.land/x/zod@v3.22.1/external.ts": "a6cfbd61e9e097d5f42f8a7ed6f92f93f51ff927d29c9fbaec04f03cbce130fe", - "https://deno.land/x/zod@v3.22.1/helpers/enumUtil.ts": "54efc393cc9860e687d8b81ff52e980def00fa67377ad0bf8b3104f8a5bf698c", - "https://deno.land/x/zod@v3.22.1/helpers/errorUtil.ts": "7a77328240be7b847af6de9189963bd9f79cab32bbc61502a9db4fe6683e2ea7", - "https://deno.land/x/zod@v3.22.1/helpers/parseUtil.ts": "f791e6e65a0340d85ad37d26cd7a3ba67126cd9957eac2b7163162155283abb1", - "https://deno.land/x/zod@v3.22.1/helpers/partialUtil.ts": "998c2fe79795257d4d1cf10361e74492f3b7d852f61057c7c08ac0a46488b7e7", - "https://deno.land/x/zod@v3.22.1/helpers/typeAliases.ts": "0fda31a063c6736fc3cf9090dd94865c811dfff4f3cb8707b932bf937c6f2c3e", - "https://deno.land/x/zod@v3.22.1/helpers/util.ts": "8baf19b19b2fca8424380367b90364b32503b6b71780269a6e3e67700bb02774", - "https://deno.land/x/zod@v3.22.1/index.ts": "d27aabd973613985574bc31f39e45cb5d856aa122ef094a9f38a463b8ef1a268", - "https://deno.land/x/zod@v3.22.1/locales/en.ts": "a7a25cd23563ccb5e0eed214d9b31846305ddbcdb9c5c8f508b108943366ab4c", - "https://deno.land/x/zod@v3.22.1/mod.ts": "64e55237cb4410e17d968cd08975566059f27638ebb0b86048031b987ba251c4", - "https://deno.land/x/zod@v3.22.1/types.ts": "4edc1823385f446532c8c9f676d84550c6dc54b17135e34508576647d9612d0e", - "https://esm.sh/@dagger.io/dagger@0.8.8": "15f25b274941de6f12d11de78245bf3d0326ba226212bfea57747b0b2a3e6542", - "https://esm.sh/graphql-tag@2.12.6": "132ebb1ed959bb4dac146160b0cd0fa678c7b9e6bd04f349bf4cacbfb46d0b53", - "https://esm.sh/nanoid@4.0.2": "eb872595ebf6390181971c3e477d1b0fe7ea8383d9b66ced7d09ac8f9c4cf2c7", - "https://esm.sh/stringify-tree@1.1.1": "bb68a933167b8d80b88481df0beff172fc9b645db0c32fbe7dc2d822f61ebaea", - "https://esm.sh/v128/cross-fetch@3.1.8/denonext/cross-fetch.mjs": "8fba9e7c3fbaf0d2168beb63ce0cd21b5bfbfbd77e2fcbf8d957d533a71222f6", - "https://esm.sh/v128/graphql-request@6.1.0": "17f00c323eb825811ce14e2b0e88a0c873acb666c382ac963d1edeb03e01f372", - "https://esm.sh/v128/graphql-request@6.1.0/denonext/graphql-request.mjs": "0b15f49d44489423ae6f06004725b6d050b6359da4969e6569bd6ad45065bd94", - "https://esm.sh/v128/graphql@16.7.1/denonext/graphql.mjs": "418ad7c07b0f2d687f33b6275d3b5f317f4afbef1f462f318229f458dff45416", - "https://esm.sh/v128/yaml@2.3.1": "8ef3aee065e93b03cebf8fd5a3418bc30131344b7f2b8c8ae27bf9f277416087", - "https://esm.sh/v128/yaml@2.3.1/denonext/yaml.mjs": "71f677b4bfc69271af9d98db5194e354f9a1863955e208e26d32a9ef78bd89f5", - "https://esm.sh/v131/yaml@2.3.1": "1fe2490feb3d9c6d2c71c64dbdbed90acd4164b00628b3c68a311b6731ca38b5", - "https://esm.sh/v131/yaml@2.3.1/denonext/yaml.mjs": "71f677b4bfc69271af9d98db5194e354f9a1863955e208e26d32a9ef78bd89f5", - "https://esm.sh/v135/@dagger.io/dagger@0.8.8/denonext/dagger.mjs": "417c7cc5b660567bf8cfbac1edc7192ff7c1325abe152611e05fd0bbefc7c010", - "https://esm.sh/v135/adm-zip@0.5.10/denonext/adm-zip.mjs": "9441de5c60a276046d55945f45775d674a319e8e5fd3a8ab7131d8d192d9abb3", - "https://esm.sh/v135/chownr@2.0.0/denonext/chownr.mjs": "d7282b2612a9f13c62084c76fc72cdfb20503bccce959178b77b6def14d3ffd2", - "https://esm.sh/v135/cross-fetch@3.1.8/denonext/cross-fetch.mjs": "8fba9e7c3fbaf0d2168beb63ce0cd21b5bfbfbd77e2fcbf8d957d533a71222f6", - "https://esm.sh/v135/cross-spawn@7.0.3/denonext/cross-spawn.mjs": "4d5a257de3627fb09c512b23fed30f1b393e29a2c13f8325e89720b8ca6673c1", - "https://esm.sh/v135/env-paths@3.0.0/denonext/env-paths.mjs": "77984a05eb16450087f25060a070ed500ec546719d471143e16d976ca73ca956", - "https://esm.sh/v135/execa@8.0.1/denonext/execa.mjs": "cfcca6be54deae22c8d7c4d8be8df397a9506a54d9af9171519b9eea8daea9a5", - "https://esm.sh/v135/fs-minipass@2.1.0/denonext/fs-minipass.mjs": "4b5b69251541833f5a1035be0e98d46bd6d02843fd7d40720577baf6caca21ce", - "https://esm.sh/v135/get-stream@8.0.1/denonext/get-stream.mjs": "b8ab640bf2638c1ae704a217b79e0a56e7a1f97bb48bbe40d723d5ea87eb0ecb", - "https://esm.sh/v135/graphql-request@6.1.0/denonext/graphql-request.mjs": "c97af0ff1802c36ae6fdf544153140ef4d950bf164f0e5e839e71aa599ea1555", - "https://esm.sh/v135/graphql-tag@2.12.6/denonext/graphql-tag.mjs": "ebaceefc216cba74424ddc55fde9e677f6e5a3e9d556a250faa1b53483574f03", - "https://esm.sh/v135/graphql@16.8.1/denonext/graphql.mjs": "585b84022623b931e27a7a8134cd24ec50b33ea12fd18b43254527628a0fddac", - "https://esm.sh/v135/human-signals@5.0.0/denonext/human-signals.mjs": "ab3130133ac5943273c909d7887e3c16b8374f66d72c38caeea2c44d659af023", - "https://esm.sh/v135/is-stream@3.0.0/denonext/is-stream.mjs": "5c8b65f2fa051c4b18e88bbae11dac8bba9caf57752577d69bcea86d1f05c5b7", - "https://esm.sh/v135/isexe@2.0.0/denonext/isexe.mjs": "4675d9d53a332f096efd344cb1418dbda8e6f2effc8a5c81edd43cdd56636be7", - "https://esm.sh/v135/lodash.flatten@4.4.0/denonext/lodash.flatten.mjs": "8e86ab607deea15cc3c1acfb5eae278ecbc5b80f24167b4e8f4c56df3278cd55", - "https://esm.sh/v135/merge-stream@2.0.0/denonext/merge-stream.mjs": "2c2af22401c294158d6bff659d157e3d2c028c218cc1bd2246534a45a4c03c61", - "https://esm.sh/v135/mimic-fn@4.0.0/denonext/mimic-fn.mjs": "10bcf0f2f20cbbba0c289ef7bf4d2422639bbc1c36c247be876afd6fe2d67138", - "https://esm.sh/v135/minipass@3.3.6/denonext/minipass.mjs": "195894c7a7f1fb71de48b4a41af182cd3ad0e357cadc0ad9d8b5340cda895cc0", - "https://esm.sh/v135/minipass@5.0.0/denonext/minipass.mjs": "de0e049728f8c387b58c86439eb9d69a16b6a88756a6bc694e2fecbd7fd00401", - "https://esm.sh/v135/minizlib@2.1.2/denonext/minizlib.mjs": "67abb7d83dacd0de153cce5d03ee3bfd68988c992306ff843370b68f038b43e0", - "https://esm.sh/v135/mkdirp@1.0.4/denonext/mkdirp.mjs": "41bc43ec9478e772660e2b0edf998f27f0158388c94003b7292d8093e699eb7b", - "https://esm.sh/v135/nanoid@4.0.2/denonext/nanoid.mjs": "4f26e89bc0867e6a838069435b3d75af305017d87ce5b51c9d6edc680954b52f", - "https://esm.sh/v135/node-color-log@10.0.2/denonext/node-color-log.mjs": "2504391bd0ce1dd4c2bf0ed0b839b8a3ad84c028d9dd17cc58dccd2e14dacfde", - "https://esm.sh/v135/node_fetch.js": "b11355358cf61343a3c30bd5942df60a3586d13e2c979b515164bfe851662798", - "https://esm.sh/v135/npm-run-path@5.1.0/denonext/npm-run-path.mjs": "4772cda227b5c18f4293db7edf53998879c75d48e776533009ce1a8daa464bf5", - "https://esm.sh/v135/onetime@6.0.0/denonext/onetime.mjs": "5326fe5207b076a7ebc96740b4c3dcec7a2522a1aa5985e3b4157c1b9cb1e2dd", - "https://esm.sh/v135/original-fs@1.2.0/denonext/original-fs.mjs": "2b1098818e54d2c6748ff5b0dd9ea5f6a61b4b6d0f63fb625f21773d11cfc667", - "https://esm.sh/v135/path-key@3.1.1/denonext/path-key.mjs": "add83c631278b7df9b33ae84e41142db88bb291295bcc27eb4e77a1cbdfa71d0", - "https://esm.sh/v135/path-key@4.0.0/denonext/path-key.mjs": "2c2e3922bd0e6e414fa2752ff800bdc6b9208035ce797fa22e49b859f8259417", - "https://esm.sh/v135/shebang-command@2.0.0/denonext/shebang-command.mjs": "245674cc2dffa2d06fcef0540b81040b626227485e5f41d76e77d386b30b18e0", - "https://esm.sh/v135/shebang-regex@3.0.0/denonext/shebang-regex.mjs": "03983ba59dd2cba9402935e21b46d05f5249364cba9f5757aef23c6c2fea65b9", - "https://esm.sh/v135/signal-exit@4.1.0/denonext/signal-exit.mjs": "c450b9024df3b59ded71e7b52aada1ac4b3856aad93e9d64bbc6ea3cdd181824", - "https://esm.sh/v135/stringify-tree@1.1.1/denonext/stringify-tree.mjs": "6cacda15ffe7dc2e1343636549956877e1bd830be5bd56587f40f94ca7becda4", - "https://esm.sh/v135/strip-final-newline@3.0.0/denonext/strip-final-newline.mjs": "139c0958b1fb9387d8ae5b95941682245a3f3d9ae531f5de9638c2e9109831e0", - "https://esm.sh/v135/tar@6.2.0/denonext/tar.mjs": "e13b56d41286f4935cb29acae60a040148af6e2649326a70e04c5ca6fe5ef04d", - "https://esm.sh/v135/tslib@2.6.2/denonext/tslib.mjs": "29782bcd3139f77ec063dc5a9385c0fff4a8d0a23b6765c73d9edeb169a04bf1", - "https://esm.sh/v135/which@2.0.2/denonext/which.mjs": "360f7d0aa13233975c86f120e2b1aa9695252b16e287ccdc651d3123473a3482", - "https://esm.sh/v135/yallist@4.0.0/denonext/yallist.mjs": "61f180d807dda50bac17028eda05d5722a3fecef6e98a9064e2353ea6864fd82", - "https://esm.sh/v135/yaml@2.3.1/denonext/yaml.mjs": "71f677b4bfc69271af9d98db5194e354f9a1863955e208e26d32a9ef78bd89f5", - "https://esm.sh/yaml@v2.3.1": "0b42df3dec58b0999df5639390c02346de67b8dae76717a156189855fb616858", - "https://nix.fluentci.io/v0.5.2/deps.ts": "6ccc8510c72998a52c24bc02c848b669413b5ef1d15dccd7e03a25dd0e408564", - "https://nix.fluentci.io/v0.5.2/src/dagger/steps.ts": "b766f4fa9624a032e7af884a5ca47bc666a529c4a472d38b74b55ca0d63cf81d", - "https://sdk.fluentci.io/v0.2.0/deps.ts": "20dd191afaf88662b82c2a42164afe6d06f2e79942f40ce07aa0972719fc858f", - "https://sdk.fluentci.io/v0.2.0/mod.ts": "261ba81a4728f5def4e327a5cd80664ea8449515a2f4eea5f3f416acae39a1fa", - "https://sdk.fluentci.io/v0.2.0/src/client.ts": "d350d4f59763e32a9b35f3f06f0b1058e5c8e5a3824e6d096cdaf3fc4332dcf6", - "https://sdk.fluentci.io/v0.2.0/src/connect.ts": "4aff111c403cf78672384a10214a9885e08319dde579ec458f98a7bb04874101", - "https://sdk.fluentci.io/v0.2.0/src/context.ts": "2939ff58d0a79d7377d5553e725c9a2110a0013035a5a57abe9a9a5da975c4ce", - "https://sdk.fluentci.io/v0.2.0/src/utils.ts": "5dcd6d83553930502069d067ff42bc44698e22c23426fdb78630c4b39769d308" - } + "remote": {} } diff --git a/.fluentci/deps.ts b/.fluentci/deps.ts index 56da144b..b601432a 100644 --- a/.fluentci/deps.ts +++ b/.fluentci/deps.ts @@ -1,35 +1,41 @@ -export { assertEquals } from "https://deno.land/std@0.191.0/testing/asserts.ts"; -import Client from "https://sdk.fluentci.io/v0.2.0/mod.ts"; -export default Client; +export { assertEquals } from "jsr:@std/testing@0.218.2/asserts"; -export { - connect, - uploadContext, - CacheSharingMode, - Container, -} from "https://sdk.fluentci.io/v0.2.0/mod.ts"; -export { brightGreen } from "https://deno.land/std@0.191.0/fmt/colors.ts"; -export { withDevbox } from "https://nix.fluentci.io/v0.5.2/src/dagger/steps.ts"; -export { stringifyTree } from "https://esm.sh/stringify-tree@1.1.1"; -import gql from "https://esm.sh/graphql-tag@2.12.6"; +export type { DirectoryID, SecretID } from "./sdk/client.gen.ts"; +export { Directory, Secret, File, dag } from "./sdk/client.gen.ts"; +export { brightGreen } from "jsr:@std/fmt@0.218.2/colors"; +export { stringifyTree } from "npm:stringify-tree@1.1.1"; +import { gql } from "npm:graphql-request@6.1.0"; export { gql }; +export { dirname, join, resolve } from "jsr:@std/path@0.218.2"; +export { parse } from "jsr:@std/flags@0.218.2"; +import * as _ from "npm:lodash@4.17.21"; +const snakeCase = _.default.snakeCase; +const camelCase = _.default.camelCase; +export { snakeCase, camelCase }; + +import * as env from "jsr:@tsirysndr/env-js@0.1.2"; +export { env }; +export { exit } from "jsr:@tsirysndr/exit-js@0.1.0"; + +export { ClientError, GraphQLClient } from "npm:graphql-request@6.1.0"; export { - arg, - queryType, - stringArg, - intArg, - nonNull, - makeSchema, -} from "npm:nexus"; -export { - dirname, - join, - resolve, -} from "https://deno.land/std@0.203.0/path/mod.ts"; + DaggerSDKError, + UnknownDaggerError, + DockerImageRefValidationError, + EngineSessionConnectParamsParseError, + ExecError, + GraphQLRequestError, + InitEngineSessionBinaryError, + TooManyNestedObjectsError, + EngineSessionError, + EngineSessionConnectionTimeoutError, + NotAwaitedRequestError, + ERROR_CODES, +} from "./sdk/common/errors/index.ts"; -export * as FluentGitlabCI from "https://deno.land/x/fluent_gitlab_ci@v0.4.2/mod.ts"; -export * as FluentGithubActions from "https://deno.land/x/fluent_github_actions@v0.2.1/mod.ts"; -export * as FluentCircleCI from "https://deno.land/x/fluent_circleci@v0.2.5/mod.ts"; -export * as FluentAzurePipelines from "https://deno.land/x/fluent_azure_pipelines@v0.2.0/mod.ts"; -export * as FluentAWSCodePipeline from "https://deno.land/x/fluent_aws_codepipeline@v0.2.3/mod.ts"; +export * as FluentGitlabCI from "jsr:@tsirysndr/fluent-gitlab-ci@0.5"; +export * as FluentGithubActions from "jsr:@tsirysndr/fluent-gh-actions@0.3"; +export * as FluentCircleCI from "jsr:@tsirysndr/fluent-circleci@0.3"; +export * as FluentAzurePipelines from "jsr:@tsirysndr/fluent-az-pipelines@0.3"; +export * as FluentAWSCodePipeline from "jsr:@tsirysndr/fluent-codepipeline@0.3"; diff --git a/.fluentci/example/.fluentci/.devcontainer/devcontainer.json b/.fluentci/example/.fluentci/.devcontainer/devcontainer.json deleted file mode 100644 index 39a38aea..00000000 --- a/.fluentci/example/.fluentci/.devcontainer/devcontainer.json +++ /dev/null @@ -1,25 +0,0 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/debian -{ - "name": "Debian", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/base:bullseye", - "features": { - "ghcr.io/devcontainers/features/github-cli:1": {}, - "ghcr.io/devcontainers/features/nix:1": {} - }, - - // Features to add to the dev container. More info: https://containers.dev/features. - // "features": {}, - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "nix develop --experimental-features \"nix-command flakes\"" - // Configure tool-specific properties. - // "customizations": {}, - - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" -} diff --git a/.fluentci/example/.fluentci/.fluentci/.devcontainer/devcontainer.json b/.fluentci/example/.fluentci/.fluentci/.devcontainer/devcontainer.json deleted file mode 100644 index 39a38aea..00000000 --- a/.fluentci/example/.fluentci/.fluentci/.devcontainer/devcontainer.json +++ /dev/null @@ -1,25 +0,0 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/debian -{ - "name": "Debian", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/base:bullseye", - "features": { - "ghcr.io/devcontainers/features/github-cli:1": {}, - "ghcr.io/devcontainers/features/nix:1": {} - }, - - // Features to add to the dev container. More info: https://containers.dev/features. - // "features": {}, - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "nix develop --experimental-features \"nix-command flakes\"" - // Configure tool-specific properties. - // "customizations": {}, - - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" -} diff --git a/.fluentci/example/.fluentci/.fluentci/.fluentci/.devcontainer/devcontainer.json b/.fluentci/example/.fluentci/.fluentci/.fluentci/.devcontainer/devcontainer.json deleted file mode 100644 index 39a38aea..00000000 --- a/.fluentci/example/.fluentci/.fluentci/.fluentci/.devcontainer/devcontainer.json +++ /dev/null @@ -1,25 +0,0 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/debian -{ - "name": "Debian", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/base:bullseye", - "features": { - "ghcr.io/devcontainers/features/github-cli:1": {}, - "ghcr.io/devcontainers/features/nix:1": {} - }, - - // Features to add to the dev container. More info: https://containers.dev/features. - // "features": {}, - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "nix develop --experimental-features \"nix-command flakes\"" - // Configure tool-specific properties. - // "customizations": {}, - - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" -} diff --git a/.fluentci/example/.fluentci/.fluentci/.fluentci/.github/workflows/ci.yml b/.fluentci/example/.fluentci/.fluentci/.fluentci/.github/workflows/ci.yml deleted file mode 100644 index a7f9464b..00000000 --- a/.fluentci/example/.fluentci/.fluentci/.fluentci/.github/workflows/ci.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Codecov - -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: denoland/setup-deno@v1 - with: - deno-version: v1.34 - - name: Create coverage files - run: deno test --allow-read --coverage=coverage --lock-write # create coverage files - - name: Create coverage report - run: deno coverage ./coverage --lcov > coverage.lcov # create coverage report - - name: Collect coverage - uses: codecov/codecov-action@v3 # upload the report on Codecov - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - with: - file: ./coverage.lcov diff --git a/.fluentci/example/.fluentci/.fluentci/.fluentci/CODE_OF_CONDUCT.md b/.fluentci/example/.fluentci/.fluentci/.fluentci/CODE_OF_CONDUCT.md deleted file mode 100644 index e9c20f9c..00000000 --- a/.fluentci/example/.fluentci/.fluentci/.fluentci/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,132 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -We as members, contributors, and leaders pledge to make participation in our -community a harassment-free experience for everyone, regardless of age, body -size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socio-economic status, -nationality, personal appearance, race, caste, color, religion, or sexual -identity and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, -diverse, inclusive, and healthy community. - -## Our Standards - -Examples of behavior that contributes to a positive environment for our -community include: - -- Demonstrating empathy and kindness toward other people -- Being respectful of differing opinions, viewpoints, and experiences -- Giving and gracefully accepting constructive feedback -- Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience -- Focusing on what is best not just for us as individuals, but for the overall - community - -Examples of unacceptable behavior include: - -- The use of sexualized language or imagery, and sexual attention or advances of - any kind -- Trolling, insulting or derogatory comments, and personal or political attacks -- Public or private harassment -- Publishing others' private information, such as a physical or email address, - without their explicit permission -- Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Enforcement Responsibilities - -Community leaders are responsible for clarifying and enforcing our standards of -acceptable behavior and will take appropriate and fair corrective action in -response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. - -Community leaders have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, and will communicate reasons for moderation -decisions when appropriate. - -## Scope - -This Code of Conduct applies within all community spaces, and also applies when -an individual is officially representing the community in public spaces. -Examples of representing our community include using an official e-mail address, -posting via an official social media account, or acting as an appointed -representative at an online or offline event. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at -[GitHub Issues](https://github.com/fluent-ci-templates/deno-pipeline/issues). -All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. - -## Enforcement Guidelines - -Community leaders will follow these Community Impact Guidelines in determining -the consequences for any action they deem in violation of this Code of Conduct: - -### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed -unprofessional or unwelcome in the community. - -**Consequence**: A private, written warning from community leaders, providing -clarity around the nature of the violation and an explanation of why the -behavior was inappropriate. A public apology may be requested. - -### 2. Warning - -**Community Impact**: A violation through a single incident or series of -actions. - -**Consequence**: A warning with consequences for continued behavior. No -interaction with the people involved, including unsolicited interaction with -those enforcing the Code of Conduct, for a specified period of time. This -includes avoiding interactions in community spaces as well as external channels -like social media. Violating these terms may lead to a temporary or permanent -ban. - -### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including -sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public -communication with the community for a specified period of time. No public or -private interaction with the people involved, including unsolicited interaction -with those enforcing the Code of Conduct, is allowed during this period. -Violating these terms may lead to a permanent ban. - -### 4. Permanent Ban - -**Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an -individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within the -community. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 2.1, available at -[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. - -Community Impact Guidelines were inspired by -[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. - -For answers to common questions about this code of conduct, see the FAQ at -[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at -[https://www.contributor-covenant.org/translations][translations]. - -[homepage]: https://www.contributor-covenant.org -[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html -[Mozilla CoC]: https://github.com/mozilla/diversity -[FAQ]: https://www.contributor-covenant.org/faq -[translations]: https://www.contributor-covenant.org/translations diff --git a/.fluentci/example/.fluentci/.fluentci/.fluentci/CONTRIBUTING.md b/.fluentci/example/.fluentci/.fluentci/.fluentci/CONTRIBUTING.md deleted file mode 100644 index e50de724..00000000 --- a/.fluentci/example/.fluentci/.fluentci/.fluentci/CONTRIBUTING.md +++ /dev/null @@ -1,70 +0,0 @@ -# Contributing Guidelines - -Thank you for your interest in contributing to our project. Whether it's a bug -report, new feature, correction, or additional documentation, we greatly value -feedback and contributions from our community. - -Please read through this document before submitting any issues or pull requests -to ensure we have all the necessary information to effectively respond to your -bug report or contribution. - -## Reporting Bugs/Feature Requests - -We welcome you to use the GitHub issue tracker to report bugs or suggest -features. - -When filing an issue, please check existing open, or recently closed, issues to -make sure somebody else hasn't already reported the issue. Please try to include -as much information as you can. Details like these are incredibly useful: - -- A reproducible test case or series of steps -- The version of our code being used -- Any modifications you've made relevant to the bug -- Anything unusual about your environment or deployment - -## Contributing via Pull Requests - -Contributions via pull requests are much appreciated. Before sending us a pull -request, please ensure that: - -1. You are working against the latest source on the _master_ branch. -2. You check existing open, and recently merged, pull requests to make sure - someone else hasn't addressed the problem already. -3. You open an issue to discuss any significant work - we would hate for your - time to be wasted. - -To send us a pull request, please: - -1. Fork the repository. -2. Modify the source; please focus on the specific change you are contributing. - If you also reformat all the code, it will be hard for us to focus on your - change. -3. Ensure local tests pass. -4. Commit to your fork using clear commit messages. -5. Send us a pull request, answering any default questions in the pull request - interface. -6. Pay attention to any automated CI failures reported in the pull request, and - stay involved in the conversation. - -GitHub provides additional document on -[forking a repository](https://help.github.com/articles/fork-a-repo/) and -[creating a pull request](https://help.github.com/articles/creating-a-pull-request/). - -## Finding contributions to work on - -Looking at the existing issues is a great way to find something to contribute -on. As our projects, by default, use the default GitHub issue labels -(enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any -'help wanted' issues is a great place to start. - -## Code of Conduct - -This project has adopted the -[Contributor Covenant](https://www.contributor-covenant.org/), version 2.1, -available at -https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. - -## Licensing - -See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to -confirm the licensing of your contribution. diff --git a/.fluentci/example/.fluentci/.fluentci/.fluentci/LICENSE b/.fluentci/example/.fluentci/.fluentci/.fluentci/LICENSE deleted file mode 100644 index d9ab36a4..00000000 --- a/.fluentci/example/.fluentci/.fluentci/.fluentci/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2023 Tsiry Sandratraina - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/.fluentci/example/.fluentci/.fluentci/.fluentci/README.md b/.fluentci/example/.fluentci/.fluentci/.fluentci/README.md deleted file mode 100644 index 23f6a94b..00000000 --- a/.fluentci/example/.fluentci/.fluentci/.fluentci/README.md +++ /dev/null @@ -1,88 +0,0 @@ -# Deno Pipeline - -[![deno module](https://shield.deno.dev/x/deno_pipeline)](https://deno.land/x/deno_pipeline) -![deno compatibility](https://shield.deno.dev/deno/^1.34) -[![](https://img.shields.io/codecov/c/gh/fluent-ci-templates/deno-pipeline)](https://codecov.io/gh/fluent-ci-templates/deno-pipeline) - -A ready-to-use GitLab CI Pipeline and Jobs for your Deno projects. - -## ๐Ÿš€ Usage - -Quick start: - -```ts -import { GitLab } from "https://deno.land/x/deno_pipeline/mod.ts"; - -const { pipeline } = GitLab; - -pipeline.write(); // Write the pipeline to the file .gitlab-ci.yml -``` - -Or, if you want to use the predefined jobs: - -```ts -import { GitlabCI } from "https://deno.land/x/fluent_gitlab_ci/mod.ts"; -import { GitLab } from "https://deno.land/x/deno_pipeline/mod.ts"; - -const { fmt, lint, test } = GitLab; - -const const pipeline = new GitlabCI() - .image("denoland/deno:alpine") - .addJob("fmt", fmt) - .addJob("lint", lint) - .addJob("test", test); - -pipeline.write(); // Write the pipeline to the file .gitlab-ci.yml -``` - -It will generate the following `.gitlab-ci.yml` file: - -```yaml -# Do not edit this file directly. It is generated by Fluent GitLab CI - -image: denoland/deno:alpine - -fmt: - image: denoland/deno:alpine - script: - - deno fmt --check - -lint: - image: denoland/deno:alpine - script: - - deno lint - -test: - image: denoland/deno:alpine - script: - - deno test -``` - -## ๐Ÿงช Advanced Usage - -This package also provides a ready-to-use pipeline for -[Dagger](https://dagger.io/), just run the following command on your Deno -project: - -```sh -dagger run deno run -A https://deno.land/x/deno_pipeline/ci.ts -``` - -Or, if you want to use the predefined jobs: - -```ts -import Client, { connect } from "@dagger.io/dagger"; -import { Dagger } from "https://deno.land/x/deno_pipeline/mod.ts"; - -const { fmt, lint, test } = Dagger; - -function pipeline(src = ".") { - connect(async (client: Client) => { - await fmt(client, src); - await lint(client, src); - await test(client, src); - }); -} - -pipeline(); -``` diff --git a/.fluentci/example/.fluentci/.fluentci/.fluentci/ci.ts b/.fluentci/example/.fluentci/.fluentci/.fluentci/ci.ts deleted file mode 100644 index 67e5a808..00000000 --- a/.fluentci/example/.fluentci/.fluentci/.fluentci/ci.ts +++ /dev/null @@ -1,12 +0,0 @@ -const command = new Deno.Command(Deno.execPath(), { - args: [ - "run", - "-A", - "--import-map=https://deno.land/x/deno_pipeline/import_map.json", - "https://deno.land/x/deno_pipeline/src/dagger/runner.ts", - ], -}); - -const { stdout } = await command.output(); - -console.log(new TextDecoder().decode(stdout)); diff --git a/.fluentci/example/.fluentci/.fluentci/.fluentci/deno.json b/.fluentci/example/.fluentci/.fluentci/.fluentci/deno.json deleted file mode 100644 index 42402195..00000000 --- a/.fluentci/example/.fluentci/.fluentci/.fluentci/deno.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "importMap": "import_map.json", - "tasks": { - "esm:add": "deno run -A https://esm.sh/v128 add", - "esm:update": "deno run -A https://esm.sh/v128 update", - "esm:remove": "deno run -A https://esm.sh/v128 remove", - "ci:dagger": "dagger run deno run -A src/dagger/runner.ts" - } -} diff --git a/.fluentci/example/.fluentci/.fluentci/.fluentci/deno.lock b/.fluentci/example/.fluentci/.fluentci/.fluentci/deno.lock deleted file mode 100644 index a364136a..00000000 --- a/.fluentci/example/.fluentci/.fluentci/.fluentci/deno.lock +++ /dev/null @@ -1,68 +0,0 @@ -{ - "version": "2", - "remote": { - "https://deno.land/std@0.150.0/media_types/_util.ts": "ce9b4fc4ba1c447dafab619055e20fd88236ca6bdd7834a21f98bd193c3fbfa1", - "https://deno.land/std@0.150.0/media_types/mod.ts": "2d4b6f32a087029272dc59e0a55ae3cc4d1b27b794ccf528e94b1925795b3118", - "https://deno.land/std@0.150.0/media_types/vendor/mime-db.v1.52.0.ts": "724cee25fa40f1a52d3937d6b4fbbfdd7791ff55e1b7ac08d9319d5632c7f5af", - "https://deno.land/std@0.191.0/fmt/colors.ts": "d67e3cd9f472535241a8e410d33423980bec45047e343577554d3356e1f0ef4e", - "https://deno.land/x/codecov_pipeline@v0.1.0/src/dagger/jobs.ts": "e980479e0bcd759773286145f3345ce7e1662c7d6734bfc4bbf8e6bfc93b974e", - "https://deno.land/x/nix_installer_pipeline@v0.3.6/src/dagger/steps.ts": "a34aea3753c7079de5877f592ce31f30d05d552155729ff3e695d77326405133", - "https://deno.land/x/xhr@0.3.0/mod.ts": "094aacd627fd9635cd942053bf8032b5223b909858fa9dc8ffa583752ff63b20", - "https://esm.sh/stringify-tree@1.1.1": "8d994a105481fa944515323d89bd2596c1de79f3d9bd1386266463934716eca0", - "https://esm.sh/v128/*@dagger.io/dagger@0.6.3": "cb691a77c0cdaee22f2b8393731b5143c83ce22dbbea204cdbfd203768d15b64", - "https://esm.sh/v128/@dagger.io/dagger@0.6.3/X-ZS8q/denonext/dagger.mjs": "fd0901784d75b99615b5409c3654b5c7edfc5ba377c9e1a5a67ffff4f7d3ac32", - "https://esm.sh/v128/adm-zip@0.5.10": "d9c54d6d2dd788462781a57d923295bd79304e6fd74b242fd4b30e35b39c5dcf", - "https://esm.sh/v128/adm-zip@0.5.10/denonext/adm-zip.mjs": "07a9731547905e0ca55ae917e1969d7f6d04fb3773f906ce3306891337eb4849", - "https://esm.sh/v128/chownr@2.0.0/denonext/chownr.mjs": "30b8f17084dfbe475a5052b615f706b06ddd17dca0535103340d485c6b94e952", - "https://esm.sh/v128/cross-fetch@3.1.8/denonext/cross-fetch.mjs": "8fba9e7c3fbaf0d2168beb63ce0cd21b5bfbfbd77e2fcbf8d957d533a71222f6", - "https://esm.sh/v128/cross-spawn@7.0.3/denonext/cross-spawn.mjs": "0569a26e7ad4b3376516cbc9b1942e10961a58030eadcea8c848e6b956eb355c", - "https://esm.sh/v128/data-uri-to-buffer@4.0.1/denonext/data-uri-to-buffer.mjs": "70ef987b1da58391495ecfad9888d996469224faf3cd996d81dc2e059feb9f31", - "https://esm.sh/v128/env-paths@3.0.0": "8400fb23319be9b30d7b40d1c865541c5b3c7726cdf9b74000bc0f1678d52ecf", - "https://esm.sh/v128/env-paths@3.0.0/denonext/env-paths.mjs": "77984a05eb16450087f25060a070ed500ec546719d471143e16d976ca73ca956", - "https://esm.sh/v128/execa@7.1.1": "a40c7030df81ab0847a5d844f4c5c6420af973dff05fef88e53cbb9b8667fdc2", - "https://esm.sh/v128/execa@7.1.1/denonext/execa.mjs": "9d5943544c0df3761b52f2c095f89a03ca6c028d818a8f0475ff883b0408f154", - "https://esm.sh/v128/fetch-blob@3.2.0/denonext/fetch-blob.mjs": "0531568b36c0f6db3e9825fbb2d08dee51100eb675c2bf1d98d6971a92010721", - "https://esm.sh/v128/fetch-blob@3.2.0/denonext/file.js": "fd82828163a4e7bdc15190d8c3dbfd92f93274d05bd7f7f5ab81093e3ad7e9c2", - "https://esm.sh/v128/fetch-blob@3.2.0/denonext/from.js": "7d3258c7960755497f90879806f0b815d5e564c2ac1523238af5cb9552ff5c45", - "https://esm.sh/v128/formdata-polyfill@4.0.10/denonext/esm.min.js": "b6d65a204e81eca699d9eb6f867e9efffa42db39a8f161690915a89e5eb1766f", - "https://esm.sh/v128/fs-minipass@2.1.0/denonext/fs-minipass.mjs": "74b00283d556b281bdfd6a669576d852f2c43702043c411985f8f8188d208c5d", - "https://esm.sh/v128/get-stream@6.0.1/denonext/get-stream.mjs": "a947a16f8cb3052fd654a84f8b36b40ce96b6a5acfb3ad4ab69d814bcf3351fb", - "https://esm.sh/v128/graphql-request@6.1.0": "17f00c323eb825811ce14e2b0e88a0c873acb666c382ac963d1edeb03e01f372", - "https://esm.sh/v128/graphql-request@6.1.0/denonext/graphql-request.mjs": "0b15f49d44489423ae6f06004725b6d050b6359da4969e6569bd6ad45065bd94", - "https://esm.sh/v128/graphql-tag@2.12.6": "5bfa27da9c9918fb52a01b8579891e804e0365d91118df1f2e0957a72dacdc39", - "https://esm.sh/v128/graphql-tag@2.12.6/denonext/graphql-tag.mjs": "331d09949efc4ac60c84a69b52a7da8b333210493900e54953ae4604c9874527", - "https://esm.sh/v128/graphql@16.7.1/denonext/graphql.mjs": "418ad7c07b0f2d687f33b6275d3b5f317f4afbef1f462f318229f458dff45416", - "https://esm.sh/v128/human-signals@4.3.1/denonext/human-signals.mjs": "3889110cedd907804443d018cffe0a1d892d5e7467661376caf967feff55cbe9", - "https://esm.sh/v128/is-stream@3.0.0/denonext/is-stream.mjs": "5c8b65f2fa051c4b18e88bbae11dac8bba9caf57752577d69bcea86d1f05c5b7", - "https://esm.sh/v128/isexe@2.0.0/denonext/isexe.mjs": "3cfefd270d1bfdfb864ee98dbb8f41d150cbf480925158f4a8f0ade8a9e17d6c", - "https://esm.sh/v128/merge-stream@2.0.0/denonext/merge-stream.mjs": "2c2af22401c294158d6bff659d157e3d2c028c218cc1bd2246534a45a4c03c61", - "https://esm.sh/v128/mimic-fn@4.0.0/denonext/mimic-fn.mjs": "10bcf0f2f20cbbba0c289ef7bf4d2422639bbc1c36c247be876afd6fe2d67138", - "https://esm.sh/v128/minipass@3.3.6/denonext/minipass.mjs": "59bbe430514455e78cb30c389b21af66efb2bf010cda071820a17d8c76d0d1cf", - "https://esm.sh/v128/minipass@5.0.0/denonext/minipass.mjs": "de0e049728f8c387b58c86439eb9d69a16b6a88756a6bc694e2fecbd7fd00401", - "https://esm.sh/v128/minizlib@2.1.2/denonext/minizlib.mjs": "0d919b6a0c60d5a31e14d748ff9d62aeae2923b604bcc6a22f90fa4bbd400d68", - "https://esm.sh/v128/mkdirp@1.0.4/denonext/mkdirp.mjs": "ee129b32e55dd8bede6b1bbd1978f7775fa5e2720d5a7ae07bf1e8c99abd77c7", - "https://esm.sh/v128/node-color-log@10.0.2": "05a277987c64153af1252167135076155fdc6b39ca260b2bdc39750da12d2a2d", - "https://esm.sh/v128/node-color-log@10.0.2/denonext/node-color-log.mjs": "2504391bd0ce1dd4c2bf0ed0b839b8a3ad84c028d9dd17cc58dccd2e14dacfde", - "https://esm.sh/v128/node-domexception@1.0.0/denonext/node-domexception.mjs": "bb35ba54c1a2b35870618876c0c96310a28ae58aecff33c8eed58a582e270ff4", - "https://esm.sh/v128/node-fetch@3.3.1": "916dcee177a69fb0e46970c528cb66fcd4973488f861844c0a235bfc645b0506", - "https://esm.sh/v128/node-fetch@3.3.1/denonext/node-fetch.mjs": "dc3a8f1f2fc9eb26d0d33e49f3750acc265d51a1a54bbd670c5d9f640b633a93", - "https://esm.sh/v128/node-fetch@3.3.1/denonext/src/utils/multipart-parser.js": "713b1b8cbafc4bfb7358debeb35d507e0d2328f0a28b8a2a7d79a3e5e4f5e5b8", - "https://esm.sh/v128/npm-run-path@5.1.0/denonext/npm-run-path.mjs": "3540b8c2dd1430f10d580f323f3a51aa30094da27a9220cce03ce69884b163bb", - "https://esm.sh/v128/onetime@6.0.0/denonext/onetime.mjs": "6e362222575d815f37fb813168d7069dd6a0f6bb6f972ed54d1bccb0f9fb3e1b", - "https://esm.sh/v128/original-fs@1.2.0/denonext/original-fs.mjs": "2b1098818e54d2c6748ff5b0dd9ea5f6a61b4b6d0f63fb625f21773d11cfc667", - "https://esm.sh/v128/path-key@3.1.1/denonext/path-key.mjs": "add83c631278b7df9b33ae84e41142db88bb291295bcc27eb4e77a1cbdfa71d0", - "https://esm.sh/v128/path-key@4.0.0/denonext/path-key.mjs": "2c2e3922bd0e6e414fa2752ff800bdc6b9208035ce797fa22e49b859f8259417", - "https://esm.sh/v128/shebang-command@2.0.0/denonext/shebang-command.mjs": "404e0fb09a782ca9495d53c721bb84b673b7b2e1054e021852143a6b91ca0e4f", - "https://esm.sh/v128/shebang-regex@3.0.0/denonext/shebang-regex.mjs": "03983ba59dd2cba9402935e21b46d05f5249364cba9f5757aef23c6c2fea65b9", - "https://esm.sh/v128/signal-exit@3.0.7/denonext/signal-exit.mjs": "2a176e5f9b351fa8057213c627a1503d63bf308b64447ef47f1ca6fbb2a91c81", - "https://esm.sh/v128/strip-final-newline@3.0.0/denonext/strip-final-newline.mjs": "03d9be4e8a249d63cbbddeb2fb675a1bbbcb335283e604d4ce56c88c90e6f102", - "https://esm.sh/v128/tar@6.1.15": "0460339f8aba5f287e8bebe258fe3fe13cb12f85820693f25724f0d98ef1258e", - "https://esm.sh/v128/tar@6.1.15/denonext/tar.mjs": "6194d892de8457b3b1f11d5cbacda1d540b453b45e8cb9f5f610abfb3e490b65", - "https://esm.sh/v128/tslib@2.6.0/denonext/tslib.mjs": "2215292e6fcf28a7a081eee911f127bb3c44cdd61ff0651e3e384d7a49b4e42b", - "https://esm.sh/v128/web-streams-polyfill@3.2.1/denonext/dist/ponyfill.es2018.js": "a2edb52a93494cda06386b3d6a168016b366e78f02c5eff1f94a0240be12ac96", - "https://esm.sh/v128/which@2.0.2/denonext/which.mjs": "86bf76e4937edb7fa3464d7bb9a426ef273684d1cefbec5ba5f1bdcb5cafff91", - "https://esm.sh/v128/yallist@4.0.0/denonext/yallist.mjs": "61f180d807dda50bac17028eda05d5722a3fecef6e98a9064e2353ea6864fd82", - "https://esm.sh/v130/lodash.flatten@4.4.0/denonext/lodash.flatten.mjs": "8e86ab607deea15cc3c1acfb5eae278ecbc5b80f24167b4e8f4c56df3278cd55", - "https://esm.sh/v130/stringify-tree@1.1.1/denonext/stringify-tree.mjs": "40a9d40e0282b5432302a3da68b88aa11685bc0b8a0b70246168deed5c5773fe" - } -} diff --git a/.fluentci/example/.fluentci/.fluentci/.fluentci/fixtures/.gitlab-ci.yml b/.fluentci/example/.fluentci/.fluentci/.fluentci/fixtures/.gitlab-ci.yml deleted file mode 100644 index 299e4c62..00000000 --- a/.fluentci/example/.fluentci/.fluentci/.fluentci/fixtures/.gitlab-ci.yml +++ /dev/null @@ -1,19 +0,0 @@ -# Do not edit this file directly. It is generated by Fluent GitLab CI - -image: denoland/deno:alpine - -fmt: - image: denoland/deno:alpine - script: - - deno fmt --check - -lint: - image: denoland/deno:alpine - script: - - deno lint - -test: - image: denoland/deno:alpine - script: - - deno test - diff --git a/.fluentci/example/.fluentci/.fluentci/.fluentci/flake.lock b/.fluentci/example/.fluentci/.fluentci/.fluentci/flake.lock deleted file mode 100644 index af7453c0..00000000 --- a/.fluentci/example/.fluentci/.fluentci/.fluentci/flake.lock +++ /dev/null @@ -1,61 +0,0 @@ -{ - "nodes": { - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1687709756, - "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1688910226, - "narHash": "sha256-kLTsFu9CAU2Gb288JhIBN/WlX4UUUDz4WiC/U59nvwk=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "2540432a940aee979be6ccfefba9ea0652c273a0", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "release-23.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/.fluentci/example/.fluentci/.fluentci/.fluentci/flake.nix b/.fluentci/example/.fluentci/.fluentci/.fluentci/flake.nix deleted file mode 100644 index b13ea7df..00000000 --- a/.fluentci/example/.fluentci/.fluentci/.fluentci/flake.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ - description = "A Nix-flake-based Deno development environment"; - - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/release-23.05"; - flake-utils.url = "github:numtide/flake-utils"; - }; - - outputs = { - self, - nixpkgs, - flake-utils, - }: - flake-utils.lib.eachDefaultSystem - (system: let - pkgs = import nixpkgs { - inherit system; - }; - in { - devShells.default = pkgs.mkShell { - buildInputs = [ - pkgs.deno - ]; - }; - }); -} \ No newline at end of file diff --git a/.fluentci/example/.fluentci/.fluentci/.fluentci/import_map.json b/.fluentci/example/.fluentci/.fluentci/.fluentci/import_map.json deleted file mode 100644 index 12c59ffe..00000000 --- a/.fluentci/example/.fluentci/.fluentci/.fluentci/import_map.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "imports": { - "@dagger.io/dagger": "https://esm.sh/v128/*@dagger.io/dagger@0.6.3", - "fluent_gitlab_ci": "https://deno.land/x/fluent_gitlab_ci@v0.3.2/mod.ts", - "fluent_github_actions": "https://deno.land/x/fluent_github_actions@v0.1.2/mod.ts", - "url": "node:url", - "readline": "node:readline", - "process": "node:process", - "path": "node:path", - "os": "node:os", - "fs": "node:fs", - "crypto": "node:crypto" - }, - "scopes": { - "https://esm.sh/v128/": { - "@lifeomic/axios-fetch": "https://esm.sh/v128/@lifeomic/axios-fetch@3.0.1", - "adm-zip": "https://esm.sh/v128/adm-zip@0.5.10", - "env-paths": "https://esm.sh/v128/env-paths@3.0.0", - "execa": "https://esm.sh/v128/execa@7.1.1", - "graphql-request": "https://esm.sh/v128/graphql-request@6.1.0", - "graphql-tag": "https://esm.sh/v128/graphql-tag@2.12.6", - "graphql": "https://esm.sh/v128/graphql@16.7.1", - "node-color-log": "https://esm.sh/v128/node-color-log@10.0.2", - "node-fetch": "https://esm.sh/v128/node-fetch@3.3.1", - "tar": "https://esm.sh/v128/tar@6.1.15" - } - } -} \ No newline at end of file diff --git a/.fluentci/example/.fluentci/.fluentci/.fluentci/mod.ts b/.fluentci/example/.fluentci/.fluentci/.fluentci/mod.ts deleted file mode 100644 index 6152fb62..00000000 --- a/.fluentci/example/.fluentci/.fluentci/.fluentci/mod.ts +++ /dev/null @@ -1,4 +0,0 @@ -import * as GitLab from "./src/gitlab/index.ts"; -import * as Dagger from "./src/dagger/index.ts"; - -export { Dagger, GitLab }; diff --git a/.fluentci/example/.fluentci/.fluentci/.fluentci/src/dagger/index.ts b/.fluentci/example/.fluentci/.fluentci/.fluentci/src/dagger/index.ts deleted file mode 100644 index 392c0011..00000000 --- a/.fluentci/example/.fluentci/.fluentci/.fluentci/src/dagger/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import pipeline from "./pipeline.ts"; -import { fmt, lint, test } from "./jobs.ts"; - -export { fmt, lint, pipeline, test }; diff --git a/.fluentci/example/.fluentci/.fluentci/.fluentci/src/dagger/jobs.ts b/.fluentci/example/.fluentci/.fluentci/.fluentci/src/dagger/jobs.ts deleted file mode 100644 index 658ed395..00000000 --- a/.fluentci/example/.fluentci/.fluentci/.fluentci/src/dagger/jobs.ts +++ /dev/null @@ -1,197 +0,0 @@ -import Client from "@dagger.io/dagger"; -import { upload } from "https://deno.land/x/codecov_pipeline@v0.1.0/src/dagger/jobs.ts"; -import { withDevbox } from "https://deno.land/x/nix_installer_pipeline@v0.3.6/src/dagger/steps.ts"; -import { existsSync } from "fs"; - -export enum Job { - fmt = "fmt", - lint = "lint", - test = "test", - deploy = "deploy", - codecov = "codecov", -} - -const baseCtr = (client: Client, pipeline: string) => { - if (existsSync("devbox.json")) { - return withDevbox( - client - .pipeline(pipeline) - .container() - .from("alpine:latest") - .withExec(["apk", "update"]) - .withExec(["apk", "add", "bash", "curl"]) - .withMountedCache("/nix", client.cacheVolume("nix")) - .withMountedCache("/etc/nix", client.cacheVolume("nix-etc")) - ); - } - return client.pipeline(pipeline).container().from("denoland/deno:alpine"); -}; - -export const lint = async (client: Client, src = ".") => { - const context = client.host().directory(src); - let command = ["deno", "lint"]; - - if (existsSync("devbox.json")) { - command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; - } - - const ctr = baseCtr(client, Job.lint) - .withDirectory("/app", context, { - exclude: [".git", ".devbox", ".fluentci"], - }) - .withWorkdir("/app") - .withExec(command); - - const result = await ctr.stdout(); - - console.log(result); -}; - -export const fmt = async (client: Client, src = ".") => { - const context = client.host().directory(src); - let command = ["deno", "fmt"]; - - if (existsSync("devbox.json")) { - command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; - } - - const ctr = baseCtr(client, Job.fmt) - .withDirectory("/app", context, { - exclude: [".git", ".devbox", ".fluentci"], - }) - .withWorkdir("/app") - .withExec(command); - - const result = await ctr.stdout(); - - console.log(result); -}; - -export const test = async ( - client: Client, - src = ".", - options: { ignore: string[] } = { ignore: [] } -) => { - const context = client.host().directory(src); - let command = ["deno", "test", "-A", "--coverage=coverage", "--lock-write"]; - - if (options.ignore.length > 0) { - command = command.concat([`--ignore=${options.ignore.join(",")}`]); - } - - if (existsSync("devbox.json")) { - command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; - } - - const ctr = baseCtr(client, Job.test) - .from("denoland/deno:alpine") - .withDirectory("/app", context, { - exclude: [".git", ".devbox", ".fluentci"], - }) - .withWorkdir("/app") - .withMountedCache("/root/.cache/deno", client.cacheVolume("deno-cache")) - .withExec(command) - .withExec(["sh", "-c", "deno coverage ./coverage --lcov > coverage.lcov"]); - - await ctr.file("/app/coverage.lcov").export("./coverage.lcov"); - - const result = await ctr.stdout(); - - console.log(result); -}; - -export const deploy = async (client: Client, src = ".") => { - const context = client.host().directory(src); - let installDeployCtl = [ - "deno", - "install", - "--allow-all", - "--no-check", - "-r", - "-f", - "https://deno.land/x/deploy/deployctl.ts", - ]; - const project = Deno.env.get("DENO_PROJECT"); - const noStatic = Deno.env.get("NO_STATIC"); - const exclude = Deno.env.get("EXCLUDE"); - - let command = ["deployctl", "deploy"]; - - if (noStatic) { - command = command.concat(["--no-static"]); - } - - if (exclude) { - command = command.concat([`--exclude=${exclude}`]); - } - - if (!Deno.env.get("DENO_DEPLOY_TOKEN")) { - throw new Error("DENO_DEPLOY_TOKEN environment variable is not set"); - } - - if (!project) { - throw new Error("DENO_PROJECT environment variable is not set"); - } - - const script = Deno.env.get("DENO_MAIN_SCRIPT") || "main.tsx"; - command = command.concat([`--project=${project}`, script]); - - if (existsSync("devbox.json")) { - command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; - installDeployCtl = [ - "sh", - "-c", - `devbox run -- ${installDeployCtl.join(" ")}`, - ]; - } - - const ctr = baseCtr(client, Job.deploy) - .from("denoland/deno:alpine") - .withDirectory("/app", context, { - exclude: [".git", ".devbox", ".fluentci"], - }) - .withWorkdir("/app") - .withEnvVariable("PATH", "/root/.deno/bin:$PATH", { expand: true }) - .withEnvVariable("DENO_DEPLOY_TOKEN", Deno.env.get("DENO_DEPLOY_TOKEN")!) - .withEnvVariable( - "DENO_MAIN_SCRIPT", - Deno.env.get("DENO_MAIN_SCRIPT") || "main.tsx" - ) - .withExec(installDeployCtl) - .withExec(command); - - const result = await ctr.stdout(); - - console.log(result); -}; - -export type JobExec = ( - client: Client, - src?: string -) => - | Promise - | (( - client: Client, - src?: string, - options?: { - ignore: string[]; - } - ) => Promise); - -export const codecov = upload; - -export const runnableJobs: Record = { - [Job.fmt]: fmt, - [Job.lint]: lint, - [Job.test]: test, - [Job.deploy]: deploy, - [Job.codecov]: upload, -}; - -export const jobDescriptions: Record = { - [Job.fmt]: "Format your code", - [Job.lint]: "Lint your code", - [Job.test]: "Run your tests", - [Job.deploy]: "Deploy your code to Deno Deploy", - [Job.codecov]: "Upload your code coverage to Codecov", -}; diff --git a/.fluentci/example/.fluentci/.fluentci/.fluentci/src/dagger/list_jobs.ts b/.fluentci/example/.fluentci/.fluentci/.fluentci/src/dagger/list_jobs.ts deleted file mode 100644 index 12bb3cbb..00000000 --- a/.fluentci/example/.fluentci/.fluentci/.fluentci/src/dagger/list_jobs.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { brightGreen } from "https://deno.land/std@0.191.0/fmt/colors.ts"; -import { runnableJobs, jobDescriptions, Job } from "./jobs.ts"; -import { stringifyTree } from "https://esm.sh/stringify-tree@1.1.1"; - -const tree = { - name: brightGreen("deno_pipeline"), - children: (Object.keys(runnableJobs) as Job[]).map((job) => ({ - name: jobDescriptions[job] - ? `${brightGreen(job)} - ${jobDescriptions[job]}` - : brightGreen(job), - children: [], - })), -}; - -console.log( - stringifyTree( - tree, - (t) => t.name, - (t) => t.children - ) -); diff --git a/.fluentci/example/.fluentci/.fluentci/.fluentci/src/dagger/pipeline.ts b/.fluentci/example/.fluentci/.fluentci/.fluentci/src/dagger/pipeline.ts deleted file mode 100644 index bad73729..00000000 --- a/.fluentci/example/.fluentci/.fluentci/.fluentci/src/dagger/pipeline.ts +++ /dev/null @@ -1,27 +0,0 @@ -import Client, { connect } from "@dagger.io/dagger"; -import * as jobs from "./jobs.ts"; - -const { fmt, lint, test, runnableJobs } = jobs; - -export default function pipeline(src = ".", args: string[] = []) { - connect(async (client: Client) => { - if (args.length > 0) { - await runSpecificJobs(client, args as jobs.Job[]); - return; - } - - await fmt(client, src); - await lint(client, src); - await test(client, src); - }); -} - -async function runSpecificJobs(client: Client, args: jobs.Job[]) { - for (const name of args) { - const job = runnableJobs[name]; - if (!job) { - throw new Error(`Job ${name} not found`); - } - await job(client); - } -} diff --git a/.fluentci/example/.fluentci/.fluentci/.fluentci/src/dagger/runner.ts b/.fluentci/example/.fluentci/.fluentci/.fluentci/src/dagger/runner.ts deleted file mode 100644 index e23879e7..00000000 --- a/.fluentci/example/.fluentci/.fluentci/.fluentci/src/dagger/runner.ts +++ /dev/null @@ -1,3 +0,0 @@ -import pipeline from "./pipeline.ts"; - -pipeline(".", Deno.args); diff --git a/.fluentci/example/.fluentci/.fluentci/.fluentci/src/github/config.ts b/.fluentci/example/.fluentci/.fluentci/.fluentci/src/github/config.ts deleted file mode 100644 index 481e992a..00000000 --- a/.fluentci/example/.fluentci/.fluentci/.fluentci/src/github/config.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { JobSpec, Workflow } from "fluent_github_actions"; - -export function generateYaml() { - const workflow = new Workflow("Codecov"); - - const push = { - branches: ["main"], - }; - - const setupDagger = `\ - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - sudo mv bin/dagger /usr/local/bin - dagger version`; - - const tests: JobSpec = { - "runs-on": "ubuntu-latest", - steps: [ - { - uses: "actions/checkout@v2", - }, - { - uses: "denoland/setup-deno@v1", - with: { - "deno-version": "v1.37", - }, - }, - { - name: "Setup Fluent CI CLI", - run: "deno install -A -r https://cli.fluentci.io -n fluentci", - }, - { - name: "Setup Dagger", - run: setupDagger, - }, - { - name: "List Jobs", - run: "fluentci ls .", - }, - { - name: "Run Dagger Pipelines", - run: "dagger run fluentci . fmt lint test codecov", - env: { - CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}", - }, - }, - ], - }; - - workflow.on({ push }).jobs({ tests }); - - workflow.save(".github/workflows/ci.yml"); -} diff --git a/.fluentci/example/.fluentci/.fluentci/.fluentci/src/github/init.ts b/.fluentci/example/.fluentci/.fluentci/.fluentci/src/github/init.ts deleted file mode 100644 index 6097dd54..00000000 --- a/.fluentci/example/.fluentci/.fluentci/.fluentci/src/github/init.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { generateYaml } from "./config.ts"; - -generateYaml(); diff --git a/.fluentci/example/.fluentci/.fluentci/.fluentci/src/gitlab/index.ts b/.fluentci/example/.fluentci/.fluentci/.fluentci/src/gitlab/index.ts deleted file mode 100644 index 392c0011..00000000 --- a/.fluentci/example/.fluentci/.fluentci/.fluentci/src/gitlab/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import pipeline from "./pipeline.ts"; -import { fmt, lint, test } from "./jobs.ts"; - -export { fmt, lint, pipeline, test }; diff --git a/.fluentci/example/.fluentci/.fluentci/.fluentci/src/gitlab/jobs.ts b/.fluentci/example/.fluentci/.fluentci/.fluentci/src/gitlab/jobs.ts deleted file mode 100644 index 46be50c3..00000000 --- a/.fluentci/example/.fluentci/.fluentci/.fluentci/src/gitlab/jobs.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Job } from "https://deno.land/x/fluent_gitlab_ci@v0.3.2/mod.ts"; - -export const fmt = new Job() - .image("denoland/deno:alpine") - .script("deno fmt --check"); - -export const lint = new Job().image("denoland/deno:alpine").script("deno lint"); - -export const test = new Job().image("denoland/deno:alpine").script("deno test"); diff --git a/.fluentci/example/.fluentci/.fluentci/.fluentci/src/gitlab/pipeline.ts b/.fluentci/example/.fluentci/.fluentci/.fluentci/src/gitlab/pipeline.ts deleted file mode 100644 index 366de64b..00000000 --- a/.fluentci/example/.fluentci/.fluentci/.fluentci/src/gitlab/pipeline.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { GitlabCI } from "https://deno.land/x/fluent_gitlab_ci@v0.3.2/mod.ts"; -import { fmt, lint, test } from "./jobs.ts"; - -const pipeline = new GitlabCI() - .image("denoland/deno:alpine") - .addJob("fmt", fmt) - .addJob("lint", lint) - .addJob("test", test); - -export default pipeline; diff --git a/.fluentci/example/.fluentci/.fluentci/.fluentci/src/gitlab/pipeline_test.ts b/.fluentci/example/.fluentci/.fluentci/.fluentci/src/gitlab/pipeline_test.ts deleted file mode 100644 index ca247109..00000000 --- a/.fluentci/example/.fluentci/.fluentci/.fluentci/src/gitlab/pipeline_test.ts +++ /dev/null @@ -1,8 +0,0 @@ -import pipeline from "./pipeline.ts"; -import { assertEquals } from "https://deno.land/std@0.191.0/testing/asserts.ts"; - -Deno.test(function pipelineTest() { - const expected = Deno.readTextFileSync("./fixtures/.gitlab-ci.yml"); - const actual = pipeline.toString(); - assertEquals(actual, expected); -}); diff --git a/.fluentci/example/.fluentci/.fluentci/.github/workflows/ci.yml b/.fluentci/example/.fluentci/.fluentci/.github/workflows/ci.yml deleted file mode 100644 index b467bdbb..00000000 --- a/.fluentci/example/.fluentci/.fluentci/.github/workflows/ci.yml +++ /dev/null @@ -1,28 +0,0 @@ -# Do not edit this file directly. It is generated by Fluent Github Actions - -name: Codecov -on: - push: - branches: - - main -jobs: - tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: denoland/setup-deno@v1 - with: - deno-version: v1.37 - - name: Setup Fluent CI CLI - run: deno install -A -r https://cli.fluentci.io -n fluentci - - name: Setup Dagger - run: | - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - sudo mv bin/dagger /usr/local/bin - dagger version - - name: List Jobs - run: fluentci ls . - - name: Run Dagger Pipelines - run: dagger run fluentci . fmt lint test codecov - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.fluentci/example/.fluentci/.fluentci/.gitignore b/.fluentci/example/.fluentci/.fluentci/.gitignore deleted file mode 100644 index a2442bbf..00000000 --- a/.fluentci/example/.fluentci/.fluentci/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -coverage/ -coverage.lcov \ No newline at end of file diff --git a/.fluentci/example/.fluentci/.fluentci/CODE_OF_CONDUCT.md b/.fluentci/example/.fluentci/.fluentci/CODE_OF_CONDUCT.md deleted file mode 100644 index e9c20f9c..00000000 --- a/.fluentci/example/.fluentci/.fluentci/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,132 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -We as members, contributors, and leaders pledge to make participation in our -community a harassment-free experience for everyone, regardless of age, body -size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socio-economic status, -nationality, personal appearance, race, caste, color, religion, or sexual -identity and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, -diverse, inclusive, and healthy community. - -## Our Standards - -Examples of behavior that contributes to a positive environment for our -community include: - -- Demonstrating empathy and kindness toward other people -- Being respectful of differing opinions, viewpoints, and experiences -- Giving and gracefully accepting constructive feedback -- Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience -- Focusing on what is best not just for us as individuals, but for the overall - community - -Examples of unacceptable behavior include: - -- The use of sexualized language or imagery, and sexual attention or advances of - any kind -- Trolling, insulting or derogatory comments, and personal or political attacks -- Public or private harassment -- Publishing others' private information, such as a physical or email address, - without their explicit permission -- Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Enforcement Responsibilities - -Community leaders are responsible for clarifying and enforcing our standards of -acceptable behavior and will take appropriate and fair corrective action in -response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. - -Community leaders have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, and will communicate reasons for moderation -decisions when appropriate. - -## Scope - -This Code of Conduct applies within all community spaces, and also applies when -an individual is officially representing the community in public spaces. -Examples of representing our community include using an official e-mail address, -posting via an official social media account, or acting as an appointed -representative at an online or offline event. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at -[GitHub Issues](https://github.com/fluent-ci-templates/deno-pipeline/issues). -All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. - -## Enforcement Guidelines - -Community leaders will follow these Community Impact Guidelines in determining -the consequences for any action they deem in violation of this Code of Conduct: - -### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed -unprofessional or unwelcome in the community. - -**Consequence**: A private, written warning from community leaders, providing -clarity around the nature of the violation and an explanation of why the -behavior was inappropriate. A public apology may be requested. - -### 2. Warning - -**Community Impact**: A violation through a single incident or series of -actions. - -**Consequence**: A warning with consequences for continued behavior. No -interaction with the people involved, including unsolicited interaction with -those enforcing the Code of Conduct, for a specified period of time. This -includes avoiding interactions in community spaces as well as external channels -like social media. Violating these terms may lead to a temporary or permanent -ban. - -### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including -sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public -communication with the community for a specified period of time. No public or -private interaction with the people involved, including unsolicited interaction -with those enforcing the Code of Conduct, is allowed during this period. -Violating these terms may lead to a permanent ban. - -### 4. Permanent Ban - -**Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an -individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within the -community. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 2.1, available at -[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. - -Community Impact Guidelines were inspired by -[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. - -For answers to common questions about this code of conduct, see the FAQ at -[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at -[https://www.contributor-covenant.org/translations][translations]. - -[homepage]: https://www.contributor-covenant.org -[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html -[Mozilla CoC]: https://github.com/mozilla/diversity -[FAQ]: https://www.contributor-covenant.org/faq -[translations]: https://www.contributor-covenant.org/translations diff --git a/.fluentci/example/.fluentci/.fluentci/CONTRIBUTING.md b/.fluentci/example/.fluentci/.fluentci/CONTRIBUTING.md deleted file mode 100644 index e50de724..00000000 --- a/.fluentci/example/.fluentci/.fluentci/CONTRIBUTING.md +++ /dev/null @@ -1,70 +0,0 @@ -# Contributing Guidelines - -Thank you for your interest in contributing to our project. Whether it's a bug -report, new feature, correction, or additional documentation, we greatly value -feedback and contributions from our community. - -Please read through this document before submitting any issues or pull requests -to ensure we have all the necessary information to effectively respond to your -bug report or contribution. - -## Reporting Bugs/Feature Requests - -We welcome you to use the GitHub issue tracker to report bugs or suggest -features. - -When filing an issue, please check existing open, or recently closed, issues to -make sure somebody else hasn't already reported the issue. Please try to include -as much information as you can. Details like these are incredibly useful: - -- A reproducible test case or series of steps -- The version of our code being used -- Any modifications you've made relevant to the bug -- Anything unusual about your environment or deployment - -## Contributing via Pull Requests - -Contributions via pull requests are much appreciated. Before sending us a pull -request, please ensure that: - -1. You are working against the latest source on the _master_ branch. -2. You check existing open, and recently merged, pull requests to make sure - someone else hasn't addressed the problem already. -3. You open an issue to discuss any significant work - we would hate for your - time to be wasted. - -To send us a pull request, please: - -1. Fork the repository. -2. Modify the source; please focus on the specific change you are contributing. - If you also reformat all the code, it will be hard for us to focus on your - change. -3. Ensure local tests pass. -4. Commit to your fork using clear commit messages. -5. Send us a pull request, answering any default questions in the pull request - interface. -6. Pay attention to any automated CI failures reported in the pull request, and - stay involved in the conversation. - -GitHub provides additional document on -[forking a repository](https://help.github.com/articles/fork-a-repo/) and -[creating a pull request](https://help.github.com/articles/creating-a-pull-request/). - -## Finding contributions to work on - -Looking at the existing issues is a great way to find something to contribute -on. As our projects, by default, use the default GitHub issue labels -(enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any -'help wanted' issues is a great place to start. - -## Code of Conduct - -This project has adopted the -[Contributor Covenant](https://www.contributor-covenant.org/), version 2.1, -available at -https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. - -## Licensing - -See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to -confirm the licensing of your contribution. diff --git a/.fluentci/example/.fluentci/.fluentci/LICENSE b/.fluentci/example/.fluentci/.fluentci/LICENSE deleted file mode 100644 index d9ab36a4..00000000 --- a/.fluentci/example/.fluentci/.fluentci/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2023 Tsiry Sandratraina - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/.fluentci/example/.fluentci/.fluentci/README.md b/.fluentci/example/.fluentci/.fluentci/README.md deleted file mode 100644 index b8517c15..00000000 --- a/.fluentci/example/.fluentci/.fluentci/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# Deno Pipeline - -[![deno module](https://shield.deno.dev/x/deno_pipeline)](https://deno.land/x/deno_pipeline) -![deno compatibility](https://shield.deno.dev/deno/^1.34) -[![](https://img.shields.io/codecov/c/gh/fluent-ci-templates/deno-pipeline)](https://codecov.io/gh/fluent-ci-templates/deno-pipeline) - -A ready-to-use CI/CD Pipeline for your Deno projects. - -## ๐Ÿš€ Usage - -Run the following command: - -```bash -dagger run fluentci deno_pipeline -``` - -Or, if you want to use it as a template: - -```bash -fluentci init -t deno -``` - -This will create a `.fluentci` folder in your project. - -Now you can run the pipeline with: - -```bash -dagger run fluentci . -``` - -## Environment variables (Deno Deploy) - -| Variable | Description | Default | -| ----------------- | ------------------------- | ---------- | -| DENO_PROJECT | Your project name | | -| NO_STATIC | Disable static assets | `false` | -| EXCLUDE | Exclude files from deploy | | -| DENO_DEPLOY_TOKEN | Your Deno Deploy token | | -| DENO_MAIN_SCRIPT | Your main script | `main.tsx` | - -## Jobs - -| Job | Description | Options | -| ------ | ------------------------------ | ---------------------- | -| fmt | Format your code | | -| lint | Lint your code | | -| test | Run your tests | `{ ignore: string[] }` | -| deploy | Deploy your app to Deno Deploy | | - -## Programmatic usage - -You can also use this pipeline programmatically: - -```ts -import { Client, connect } from "https://esm.sh/@dagger.io/dagger@0.8.1"; -import { Dagger } from "https://deno.land/x/deno_pipeline/mod.ts"; - -const { fmt, lint, test } = Dagger; - -function pipeline(src = ".") { - connect(async (client: Client) => { - await fmt(client, src); - await lint(client, src); - await test(client, src); - }); -} - -pipeline(); -``` diff --git a/.fluentci/example/.fluentci/.fluentci/ci.ts b/.fluentci/example/.fluentci/.fluentci/ci.ts deleted file mode 100644 index 67e5a808..00000000 --- a/.fluentci/example/.fluentci/.fluentci/ci.ts +++ /dev/null @@ -1,12 +0,0 @@ -const command = new Deno.Command(Deno.execPath(), { - args: [ - "run", - "-A", - "--import-map=https://deno.land/x/deno_pipeline/import_map.json", - "https://deno.land/x/deno_pipeline/src/dagger/runner.ts", - ], -}); - -const { stdout } = await command.output(); - -console.log(new TextDecoder().decode(stdout)); diff --git a/.fluentci/example/.fluentci/.fluentci/deno.json b/.fluentci/example/.fluentci/.fluentci/deno.json deleted file mode 100644 index 42402195..00000000 --- a/.fluentci/example/.fluentci/.fluentci/deno.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "importMap": "import_map.json", - "tasks": { - "esm:add": "deno run -A https://esm.sh/v128 add", - "esm:update": "deno run -A https://esm.sh/v128 update", - "esm:remove": "deno run -A https://esm.sh/v128 remove", - "ci:dagger": "dagger run deno run -A src/dagger/runner.ts" - } -} diff --git a/.fluentci/example/.fluentci/.fluentci/deno.lock b/.fluentci/example/.fluentci/.fluentci/deno.lock deleted file mode 100644 index e6af1f43..00000000 --- a/.fluentci/example/.fluentci/.fluentci/deno.lock +++ /dev/null @@ -1,68 +0,0 @@ -{ - "version": "3", - "remote": { - "https://deno.land/std@0.150.0/media_types/_util.ts": "ce9b4fc4ba1c447dafab619055e20fd88236ca6bdd7834a21f98bd193c3fbfa1", - "https://deno.land/std@0.150.0/media_types/mod.ts": "2d4b6f32a087029272dc59e0a55ae3cc4d1b27b794ccf528e94b1925795b3118", - "https://deno.land/std@0.150.0/media_types/vendor/mime-db.v1.52.0.ts": "724cee25fa40f1a52d3937d6b4fbbfdd7791ff55e1b7ac08d9319d5632c7f5af", - "https://deno.land/std@0.191.0/fmt/colors.ts": "d67e3cd9f472535241a8e410d33423980bec45047e343577554d3356e1f0ef4e", - "https://deno.land/x/codecov_pipeline@v0.1.1/src/dagger/jobs.ts": "ea5ea4fb985f879fdd1c0aed77ac635ba090606c1ecce9d5f5c107493d287984", - "https://deno.land/x/nix_installer_pipeline@v0.3.6/src/dagger/steps.ts": "a34aea3753c7079de5877f592ce31f30d05d552155729ff3e695d77326405133", - "https://deno.land/x/xhr@0.3.0/mod.ts": "094aacd627fd9635cd942053bf8032b5223b909858fa9dc8ffa583752ff63b20", - "https://esm.sh/stringify-tree@1.1.1": "a0515b0f4fe97a6972047a588b7982592d9079e7aeac3323b0d26448a757cf84", - "https://esm.sh/v128/*@dagger.io/dagger@0.6.3": "cb691a77c0cdaee22f2b8393731b5143c83ce22dbbea204cdbfd203768d15b64", - "https://esm.sh/v128/@dagger.io/dagger@0.6.3/X-ZS8q/denonext/dagger.mjs": "fd0901784d75b99615b5409c3654b5c7edfc5ba377c9e1a5a67ffff4f7d3ac32", - "https://esm.sh/v128/adm-zip@0.5.10": "d9c54d6d2dd788462781a57d923295bd79304e6fd74b242fd4b30e35b39c5dcf", - "https://esm.sh/v128/adm-zip@0.5.10/denonext/adm-zip.mjs": "07a9731547905e0ca55ae917e1969d7f6d04fb3773f906ce3306891337eb4849", - "https://esm.sh/v128/chownr@2.0.0/denonext/chownr.mjs": "30b8f17084dfbe475a5052b615f706b06ddd17dca0535103340d485c6b94e952", - "https://esm.sh/v128/cross-fetch@3.1.8/denonext/cross-fetch.mjs": "8fba9e7c3fbaf0d2168beb63ce0cd21b5bfbfbd77e2fcbf8d957d533a71222f6", - "https://esm.sh/v128/cross-spawn@7.0.3/denonext/cross-spawn.mjs": "0569a26e7ad4b3376516cbc9b1942e10961a58030eadcea8c848e6b956eb355c", - "https://esm.sh/v128/data-uri-to-buffer@4.0.1/denonext/data-uri-to-buffer.mjs": "70ef987b1da58391495ecfad9888d996469224faf3cd996d81dc2e059feb9f31", - "https://esm.sh/v128/env-paths@3.0.0": "8400fb23319be9b30d7b40d1c865541c5b3c7726cdf9b74000bc0f1678d52ecf", - "https://esm.sh/v128/env-paths@3.0.0/denonext/env-paths.mjs": "77984a05eb16450087f25060a070ed500ec546719d471143e16d976ca73ca956", - "https://esm.sh/v128/execa@7.1.1": "a40c7030df81ab0847a5d844f4c5c6420af973dff05fef88e53cbb9b8667fdc2", - "https://esm.sh/v128/execa@7.1.1/denonext/execa.mjs": "9d5943544c0df3761b52f2c095f89a03ca6c028d818a8f0475ff883b0408f154", - "https://esm.sh/v128/fetch-blob@3.2.0/denonext/fetch-blob.mjs": "0531568b36c0f6db3e9825fbb2d08dee51100eb675c2bf1d98d6971a92010721", - "https://esm.sh/v128/fetch-blob@3.2.0/denonext/file.js": "fd82828163a4e7bdc15190d8c3dbfd92f93274d05bd7f7f5ab81093e3ad7e9c2", - "https://esm.sh/v128/fetch-blob@3.2.0/denonext/from.js": "7d3258c7960755497f90879806f0b815d5e564c2ac1523238af5cb9552ff5c45", - "https://esm.sh/v128/formdata-polyfill@4.0.10/denonext/esm.min.js": "b6d65a204e81eca699d9eb6f867e9efffa42db39a8f161690915a89e5eb1766f", - "https://esm.sh/v128/fs-minipass@2.1.0/denonext/fs-minipass.mjs": "74b00283d556b281bdfd6a669576d852f2c43702043c411985f8f8188d208c5d", - "https://esm.sh/v128/get-stream@6.0.1/denonext/get-stream.mjs": "a947a16f8cb3052fd654a84f8b36b40ce96b6a5acfb3ad4ab69d814bcf3351fb", - "https://esm.sh/v128/graphql-request@6.1.0": "17f00c323eb825811ce14e2b0e88a0c873acb666c382ac963d1edeb03e01f372", - "https://esm.sh/v128/graphql-request@6.1.0/denonext/graphql-request.mjs": "0b15f49d44489423ae6f06004725b6d050b6359da4969e6569bd6ad45065bd94", - "https://esm.sh/v128/graphql-tag@2.12.6": "5bfa27da9c9918fb52a01b8579891e804e0365d91118df1f2e0957a72dacdc39", - "https://esm.sh/v128/graphql-tag@2.12.6/denonext/graphql-tag.mjs": "331d09949efc4ac60c84a69b52a7da8b333210493900e54953ae4604c9874527", - "https://esm.sh/v128/graphql@16.7.1/denonext/graphql.mjs": "418ad7c07b0f2d687f33b6275d3b5f317f4afbef1f462f318229f458dff45416", - "https://esm.sh/v128/human-signals@4.3.1/denonext/human-signals.mjs": "3889110cedd907804443d018cffe0a1d892d5e7467661376caf967feff55cbe9", - "https://esm.sh/v128/is-stream@3.0.0/denonext/is-stream.mjs": "5c8b65f2fa051c4b18e88bbae11dac8bba9caf57752577d69bcea86d1f05c5b7", - "https://esm.sh/v128/isexe@2.0.0/denonext/isexe.mjs": "3cfefd270d1bfdfb864ee98dbb8f41d150cbf480925158f4a8f0ade8a9e17d6c", - "https://esm.sh/v128/merge-stream@2.0.0/denonext/merge-stream.mjs": "2c2af22401c294158d6bff659d157e3d2c028c218cc1bd2246534a45a4c03c61", - "https://esm.sh/v128/mimic-fn@4.0.0/denonext/mimic-fn.mjs": "10bcf0f2f20cbbba0c289ef7bf4d2422639bbc1c36c247be876afd6fe2d67138", - "https://esm.sh/v128/minipass@3.3.6/denonext/minipass.mjs": "59bbe430514455e78cb30c389b21af66efb2bf010cda071820a17d8c76d0d1cf", - "https://esm.sh/v128/minipass@5.0.0/denonext/minipass.mjs": "de0e049728f8c387b58c86439eb9d69a16b6a88756a6bc694e2fecbd7fd00401", - "https://esm.sh/v128/minizlib@2.1.2/denonext/minizlib.mjs": "0d919b6a0c60d5a31e14d748ff9d62aeae2923b604bcc6a22f90fa4bbd400d68", - "https://esm.sh/v128/mkdirp@1.0.4/denonext/mkdirp.mjs": "ee129b32e55dd8bede6b1bbd1978f7775fa5e2720d5a7ae07bf1e8c99abd77c7", - "https://esm.sh/v128/node-color-log@10.0.2": "05a277987c64153af1252167135076155fdc6b39ca260b2bdc39750da12d2a2d", - "https://esm.sh/v128/node-color-log@10.0.2/denonext/node-color-log.mjs": "2504391bd0ce1dd4c2bf0ed0b839b8a3ad84c028d9dd17cc58dccd2e14dacfde", - "https://esm.sh/v128/node-domexception@1.0.0/denonext/node-domexception.mjs": "bb35ba54c1a2b35870618876c0c96310a28ae58aecff33c8eed58a582e270ff4", - "https://esm.sh/v128/node-fetch@3.3.1": "916dcee177a69fb0e46970c528cb66fcd4973488f861844c0a235bfc645b0506", - "https://esm.sh/v128/node-fetch@3.3.1/denonext/node-fetch.mjs": "dc3a8f1f2fc9eb26d0d33e49f3750acc265d51a1a54bbd670c5d9f640b633a93", - "https://esm.sh/v128/node-fetch@3.3.1/denonext/src/utils/multipart-parser.js": "713b1b8cbafc4bfb7358debeb35d507e0d2328f0a28b8a2a7d79a3e5e4f5e5b8", - "https://esm.sh/v128/npm-run-path@5.1.0/denonext/npm-run-path.mjs": "3540b8c2dd1430f10d580f323f3a51aa30094da27a9220cce03ce69884b163bb", - "https://esm.sh/v128/onetime@6.0.0/denonext/onetime.mjs": "6e362222575d815f37fb813168d7069dd6a0f6bb6f972ed54d1bccb0f9fb3e1b", - "https://esm.sh/v128/original-fs@1.2.0/denonext/original-fs.mjs": "2b1098818e54d2c6748ff5b0dd9ea5f6a61b4b6d0f63fb625f21773d11cfc667", - "https://esm.sh/v128/path-key@3.1.1/denonext/path-key.mjs": "add83c631278b7df9b33ae84e41142db88bb291295bcc27eb4e77a1cbdfa71d0", - "https://esm.sh/v128/path-key@4.0.0/denonext/path-key.mjs": "2c2e3922bd0e6e414fa2752ff800bdc6b9208035ce797fa22e49b859f8259417", - "https://esm.sh/v128/shebang-command@2.0.0/denonext/shebang-command.mjs": "404e0fb09a782ca9495d53c721bb84b673b7b2e1054e021852143a6b91ca0e4f", - "https://esm.sh/v128/shebang-regex@3.0.0/denonext/shebang-regex.mjs": "03983ba59dd2cba9402935e21b46d05f5249364cba9f5757aef23c6c2fea65b9", - "https://esm.sh/v128/signal-exit@3.0.7/denonext/signal-exit.mjs": "2a176e5f9b351fa8057213c627a1503d63bf308b64447ef47f1ca6fbb2a91c81", - "https://esm.sh/v128/strip-final-newline@3.0.0/denonext/strip-final-newline.mjs": "03d9be4e8a249d63cbbddeb2fb675a1bbbcb335283e604d4ce56c88c90e6f102", - "https://esm.sh/v128/tar@6.1.15": "0460339f8aba5f287e8bebe258fe3fe13cb12f85820693f25724f0d98ef1258e", - "https://esm.sh/v128/tar@6.1.15/denonext/tar.mjs": "6194d892de8457b3b1f11d5cbacda1d540b453b45e8cb9f5f610abfb3e490b65", - "https://esm.sh/v128/tslib@2.6.0/denonext/tslib.mjs": "2215292e6fcf28a7a081eee911f127bb3c44cdd61ff0651e3e384d7a49b4e42b", - "https://esm.sh/v128/web-streams-polyfill@3.2.1/denonext/dist/ponyfill.es2018.js": "a2edb52a93494cda06386b3d6a168016b366e78f02c5eff1f94a0240be12ac96", - "https://esm.sh/v128/which@2.0.2/denonext/which.mjs": "86bf76e4937edb7fa3464d7bb9a426ef273684d1cefbec5ba5f1bdcb5cafff91", - "https://esm.sh/v128/yallist@4.0.0/denonext/yallist.mjs": "61f180d807dda50bac17028eda05d5722a3fecef6e98a9064e2353ea6864fd82", - "https://esm.sh/v132/lodash.flatten@4.4.0/denonext/lodash.flatten.mjs": "8e86ab607deea15cc3c1acfb5eae278ecbc5b80f24167b4e8f4c56df3278cd55", - "https://esm.sh/v132/stringify-tree@1.1.1/denonext/stringify-tree.mjs": "eaa9333a5219638ad170d12e12603ae00ae80fc8bf02cc112cfec7294e6bcb43" - } -} diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.devcontainer/devcontainer.json b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.devcontainer/devcontainer.json deleted file mode 100644 index 39a38aea..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.devcontainer/devcontainer.json +++ /dev/null @@ -1,25 +0,0 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/debian -{ - "name": "Debian", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/base:bullseye", - "features": { - "ghcr.io/devcontainers/features/github-cli:1": {}, - "ghcr.io/devcontainers/features/nix:1": {} - }, - - // Features to add to the dev container. More info: https://containers.dev/features. - // "features": {}, - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "nix develop --experimental-features \"nix-command flakes\"" - // Configure tool-specific properties. - // "customizations": {}, - - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" -} diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/.devcontainer/devcontainer.json b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/.devcontainer/devcontainer.json deleted file mode 100644 index 39a38aea..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/.devcontainer/devcontainer.json +++ /dev/null @@ -1,25 +0,0 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/debian -{ - "name": "Debian", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/base:bullseye", - "features": { - "ghcr.io/devcontainers/features/github-cli:1": {}, - "ghcr.io/devcontainers/features/nix:1": {} - }, - - // Features to add to the dev container. More info: https://containers.dev/features. - // "features": {}, - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "nix develop --experimental-features \"nix-command flakes\"" - // Configure tool-specific properties. - // "customizations": {}, - - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" -} diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/.github/workflows/ci.yml b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/.github/workflows/ci.yml deleted file mode 100644 index a7f9464b..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/.github/workflows/ci.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Codecov - -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: denoland/setup-deno@v1 - with: - deno-version: v1.34 - - name: Create coverage files - run: deno test --allow-read --coverage=coverage --lock-write # create coverage files - - name: Create coverage report - run: deno coverage ./coverage --lcov > coverage.lcov # create coverage report - - name: Collect coverage - uses: codecov/codecov-action@v3 # upload the report on Codecov - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - with: - file: ./coverage.lcov diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/CODE_OF_CONDUCT.md b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/CODE_OF_CONDUCT.md deleted file mode 100644 index e9c20f9c..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,132 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -We as members, contributors, and leaders pledge to make participation in our -community a harassment-free experience for everyone, regardless of age, body -size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socio-economic status, -nationality, personal appearance, race, caste, color, religion, or sexual -identity and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, -diverse, inclusive, and healthy community. - -## Our Standards - -Examples of behavior that contributes to a positive environment for our -community include: - -- Demonstrating empathy and kindness toward other people -- Being respectful of differing opinions, viewpoints, and experiences -- Giving and gracefully accepting constructive feedback -- Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience -- Focusing on what is best not just for us as individuals, but for the overall - community - -Examples of unacceptable behavior include: - -- The use of sexualized language or imagery, and sexual attention or advances of - any kind -- Trolling, insulting or derogatory comments, and personal or political attacks -- Public or private harassment -- Publishing others' private information, such as a physical or email address, - without their explicit permission -- Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Enforcement Responsibilities - -Community leaders are responsible for clarifying and enforcing our standards of -acceptable behavior and will take appropriate and fair corrective action in -response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. - -Community leaders have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, and will communicate reasons for moderation -decisions when appropriate. - -## Scope - -This Code of Conduct applies within all community spaces, and also applies when -an individual is officially representing the community in public spaces. -Examples of representing our community include using an official e-mail address, -posting via an official social media account, or acting as an appointed -representative at an online or offline event. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at -[GitHub Issues](https://github.com/fluent-ci-templates/deno-pipeline/issues). -All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. - -## Enforcement Guidelines - -Community leaders will follow these Community Impact Guidelines in determining -the consequences for any action they deem in violation of this Code of Conduct: - -### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed -unprofessional or unwelcome in the community. - -**Consequence**: A private, written warning from community leaders, providing -clarity around the nature of the violation and an explanation of why the -behavior was inappropriate. A public apology may be requested. - -### 2. Warning - -**Community Impact**: A violation through a single incident or series of -actions. - -**Consequence**: A warning with consequences for continued behavior. No -interaction with the people involved, including unsolicited interaction with -those enforcing the Code of Conduct, for a specified period of time. This -includes avoiding interactions in community spaces as well as external channels -like social media. Violating these terms may lead to a temporary or permanent -ban. - -### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including -sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public -communication with the community for a specified period of time. No public or -private interaction with the people involved, including unsolicited interaction -with those enforcing the Code of Conduct, is allowed during this period. -Violating these terms may lead to a permanent ban. - -### 4. Permanent Ban - -**Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an -individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within the -community. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 2.1, available at -[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. - -Community Impact Guidelines were inspired by -[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. - -For answers to common questions about this code of conduct, see the FAQ at -[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at -[https://www.contributor-covenant.org/translations][translations]. - -[homepage]: https://www.contributor-covenant.org -[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html -[Mozilla CoC]: https://github.com/mozilla/diversity -[FAQ]: https://www.contributor-covenant.org/faq -[translations]: https://www.contributor-covenant.org/translations diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/CONTRIBUTING.md b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/CONTRIBUTING.md deleted file mode 100644 index e50de724..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/CONTRIBUTING.md +++ /dev/null @@ -1,70 +0,0 @@ -# Contributing Guidelines - -Thank you for your interest in contributing to our project. Whether it's a bug -report, new feature, correction, or additional documentation, we greatly value -feedback and contributions from our community. - -Please read through this document before submitting any issues or pull requests -to ensure we have all the necessary information to effectively respond to your -bug report or contribution. - -## Reporting Bugs/Feature Requests - -We welcome you to use the GitHub issue tracker to report bugs or suggest -features. - -When filing an issue, please check existing open, or recently closed, issues to -make sure somebody else hasn't already reported the issue. Please try to include -as much information as you can. Details like these are incredibly useful: - -- A reproducible test case or series of steps -- The version of our code being used -- Any modifications you've made relevant to the bug -- Anything unusual about your environment or deployment - -## Contributing via Pull Requests - -Contributions via pull requests are much appreciated. Before sending us a pull -request, please ensure that: - -1. You are working against the latest source on the _master_ branch. -2. You check existing open, and recently merged, pull requests to make sure - someone else hasn't addressed the problem already. -3. You open an issue to discuss any significant work - we would hate for your - time to be wasted. - -To send us a pull request, please: - -1. Fork the repository. -2. Modify the source; please focus on the specific change you are contributing. - If you also reformat all the code, it will be hard for us to focus on your - change. -3. Ensure local tests pass. -4. Commit to your fork using clear commit messages. -5. Send us a pull request, answering any default questions in the pull request - interface. -6. Pay attention to any automated CI failures reported in the pull request, and - stay involved in the conversation. - -GitHub provides additional document on -[forking a repository](https://help.github.com/articles/fork-a-repo/) and -[creating a pull request](https://help.github.com/articles/creating-a-pull-request/). - -## Finding contributions to work on - -Looking at the existing issues is a great way to find something to contribute -on. As our projects, by default, use the default GitHub issue labels -(enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any -'help wanted' issues is a great place to start. - -## Code of Conduct - -This project has adopted the -[Contributor Covenant](https://www.contributor-covenant.org/), version 2.1, -available at -https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. - -## Licensing - -See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to -confirm the licensing of your contribution. diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/LICENSE b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/LICENSE deleted file mode 100644 index d9ab36a4..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2023 Tsiry Sandratraina - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/README.md b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/README.md deleted file mode 100644 index 23f6a94b..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/README.md +++ /dev/null @@ -1,88 +0,0 @@ -# Deno Pipeline - -[![deno module](https://shield.deno.dev/x/deno_pipeline)](https://deno.land/x/deno_pipeline) -![deno compatibility](https://shield.deno.dev/deno/^1.34) -[![](https://img.shields.io/codecov/c/gh/fluent-ci-templates/deno-pipeline)](https://codecov.io/gh/fluent-ci-templates/deno-pipeline) - -A ready-to-use GitLab CI Pipeline and Jobs for your Deno projects. - -## ๐Ÿš€ Usage - -Quick start: - -```ts -import { GitLab } from "https://deno.land/x/deno_pipeline/mod.ts"; - -const { pipeline } = GitLab; - -pipeline.write(); // Write the pipeline to the file .gitlab-ci.yml -``` - -Or, if you want to use the predefined jobs: - -```ts -import { GitlabCI } from "https://deno.land/x/fluent_gitlab_ci/mod.ts"; -import { GitLab } from "https://deno.land/x/deno_pipeline/mod.ts"; - -const { fmt, lint, test } = GitLab; - -const const pipeline = new GitlabCI() - .image("denoland/deno:alpine") - .addJob("fmt", fmt) - .addJob("lint", lint) - .addJob("test", test); - -pipeline.write(); // Write the pipeline to the file .gitlab-ci.yml -``` - -It will generate the following `.gitlab-ci.yml` file: - -```yaml -# Do not edit this file directly. It is generated by Fluent GitLab CI - -image: denoland/deno:alpine - -fmt: - image: denoland/deno:alpine - script: - - deno fmt --check - -lint: - image: denoland/deno:alpine - script: - - deno lint - -test: - image: denoland/deno:alpine - script: - - deno test -``` - -## ๐Ÿงช Advanced Usage - -This package also provides a ready-to-use pipeline for -[Dagger](https://dagger.io/), just run the following command on your Deno -project: - -```sh -dagger run deno run -A https://deno.land/x/deno_pipeline/ci.ts -``` - -Or, if you want to use the predefined jobs: - -```ts -import Client, { connect } from "@dagger.io/dagger"; -import { Dagger } from "https://deno.land/x/deno_pipeline/mod.ts"; - -const { fmt, lint, test } = Dagger; - -function pipeline(src = ".") { - connect(async (client: Client) => { - await fmt(client, src); - await lint(client, src); - await test(client, src); - }); -} - -pipeline(); -``` diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/ci.ts b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/ci.ts deleted file mode 100644 index 67e5a808..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/ci.ts +++ /dev/null @@ -1,12 +0,0 @@ -const command = new Deno.Command(Deno.execPath(), { - args: [ - "run", - "-A", - "--import-map=https://deno.land/x/deno_pipeline/import_map.json", - "https://deno.land/x/deno_pipeline/src/dagger/runner.ts", - ], -}); - -const { stdout } = await command.output(); - -console.log(new TextDecoder().decode(stdout)); diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/deno.json b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/deno.json deleted file mode 100644 index 42402195..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/deno.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "importMap": "import_map.json", - "tasks": { - "esm:add": "deno run -A https://esm.sh/v128 add", - "esm:update": "deno run -A https://esm.sh/v128 update", - "esm:remove": "deno run -A https://esm.sh/v128 remove", - "ci:dagger": "dagger run deno run -A src/dagger/runner.ts" - } -} diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/deno.lock b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/deno.lock deleted file mode 100644 index 23cc8781..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/deno.lock +++ /dev/null @@ -1,66 +0,0 @@ -{ - "version": "2", - "remote": { - "https://deno.land/std@0.150.0/media_types/_util.ts": "ce9b4fc4ba1c447dafab619055e20fd88236ca6bdd7834a21f98bd193c3fbfa1", - "https://deno.land/std@0.150.0/media_types/mod.ts": "2d4b6f32a087029272dc59e0a55ae3cc4d1b27b794ccf528e94b1925795b3118", - "https://deno.land/std@0.150.0/media_types/vendor/mime-db.v1.52.0.ts": "724cee25fa40f1a52d3937d6b4fbbfdd7791ff55e1b7ac08d9319d5632c7f5af", - "https://deno.land/std@0.191.0/fmt/colors.ts": "d67e3cd9f472535241a8e410d33423980bec45047e343577554d3356e1f0ef4e", - "https://deno.land/x/xhr@0.3.0/mod.ts": "094aacd627fd9635cd942053bf8032b5223b909858fa9dc8ffa583752ff63b20", - "https://esm.sh/stringify-tree@1.1.1": "8d994a105481fa944515323d89bd2596c1de79f3d9bd1386266463934716eca0", - "https://esm.sh/v128/*@dagger.io/dagger@0.6.3": "cb691a77c0cdaee22f2b8393731b5143c83ce22dbbea204cdbfd203768d15b64", - "https://esm.sh/v128/@dagger.io/dagger@0.6.3/X-ZS8q/denonext/dagger.mjs": "fd0901784d75b99615b5409c3654b5c7edfc5ba377c9e1a5a67ffff4f7d3ac32", - "https://esm.sh/v128/adm-zip@0.5.10": "d9c54d6d2dd788462781a57d923295bd79304e6fd74b242fd4b30e35b39c5dcf", - "https://esm.sh/v128/adm-zip@0.5.10/denonext/adm-zip.mjs": "07a9731547905e0ca55ae917e1969d7f6d04fb3773f906ce3306891337eb4849", - "https://esm.sh/v128/chownr@2.0.0/denonext/chownr.mjs": "30b8f17084dfbe475a5052b615f706b06ddd17dca0535103340d485c6b94e952", - "https://esm.sh/v128/cross-fetch@3.1.8/denonext/cross-fetch.mjs": "8fba9e7c3fbaf0d2168beb63ce0cd21b5bfbfbd77e2fcbf8d957d533a71222f6", - "https://esm.sh/v128/cross-spawn@7.0.3/denonext/cross-spawn.mjs": "0569a26e7ad4b3376516cbc9b1942e10961a58030eadcea8c848e6b956eb355c", - "https://esm.sh/v128/data-uri-to-buffer@4.0.1/denonext/data-uri-to-buffer.mjs": "70ef987b1da58391495ecfad9888d996469224faf3cd996d81dc2e059feb9f31", - "https://esm.sh/v128/env-paths@3.0.0": "8400fb23319be9b30d7b40d1c865541c5b3c7726cdf9b74000bc0f1678d52ecf", - "https://esm.sh/v128/env-paths@3.0.0/denonext/env-paths.mjs": "77984a05eb16450087f25060a070ed500ec546719d471143e16d976ca73ca956", - "https://esm.sh/v128/execa@7.1.1": "a40c7030df81ab0847a5d844f4c5c6420af973dff05fef88e53cbb9b8667fdc2", - "https://esm.sh/v128/execa@7.1.1/denonext/execa.mjs": "9d5943544c0df3761b52f2c095f89a03ca6c028d818a8f0475ff883b0408f154", - "https://esm.sh/v128/fetch-blob@3.2.0/denonext/fetch-blob.mjs": "0531568b36c0f6db3e9825fbb2d08dee51100eb675c2bf1d98d6971a92010721", - "https://esm.sh/v128/fetch-blob@3.2.0/denonext/file.js": "fd82828163a4e7bdc15190d8c3dbfd92f93274d05bd7f7f5ab81093e3ad7e9c2", - "https://esm.sh/v128/fetch-blob@3.2.0/denonext/from.js": "7d3258c7960755497f90879806f0b815d5e564c2ac1523238af5cb9552ff5c45", - "https://esm.sh/v128/formdata-polyfill@4.0.10/denonext/esm.min.js": "b6d65a204e81eca699d9eb6f867e9efffa42db39a8f161690915a89e5eb1766f", - "https://esm.sh/v128/fs-minipass@2.1.0/denonext/fs-minipass.mjs": "74b00283d556b281bdfd6a669576d852f2c43702043c411985f8f8188d208c5d", - "https://esm.sh/v128/get-stream@6.0.1/denonext/get-stream.mjs": "a947a16f8cb3052fd654a84f8b36b40ce96b6a5acfb3ad4ab69d814bcf3351fb", - "https://esm.sh/v128/graphql-request@6.1.0": "17f00c323eb825811ce14e2b0e88a0c873acb666c382ac963d1edeb03e01f372", - "https://esm.sh/v128/graphql-request@6.1.0/denonext/graphql-request.mjs": "0b15f49d44489423ae6f06004725b6d050b6359da4969e6569bd6ad45065bd94", - "https://esm.sh/v128/graphql-tag@2.12.6": "5bfa27da9c9918fb52a01b8579891e804e0365d91118df1f2e0957a72dacdc39", - "https://esm.sh/v128/graphql-tag@2.12.6/denonext/graphql-tag.mjs": "331d09949efc4ac60c84a69b52a7da8b333210493900e54953ae4604c9874527", - "https://esm.sh/v128/graphql@16.7.1/denonext/graphql.mjs": "418ad7c07b0f2d687f33b6275d3b5f317f4afbef1f462f318229f458dff45416", - "https://esm.sh/v128/human-signals@4.3.1/denonext/human-signals.mjs": "3889110cedd907804443d018cffe0a1d892d5e7467661376caf967feff55cbe9", - "https://esm.sh/v128/is-stream@3.0.0/denonext/is-stream.mjs": "5c8b65f2fa051c4b18e88bbae11dac8bba9caf57752577d69bcea86d1f05c5b7", - "https://esm.sh/v128/isexe@2.0.0/denonext/isexe.mjs": "3cfefd270d1bfdfb864ee98dbb8f41d150cbf480925158f4a8f0ade8a9e17d6c", - "https://esm.sh/v128/merge-stream@2.0.0/denonext/merge-stream.mjs": "2c2af22401c294158d6bff659d157e3d2c028c218cc1bd2246534a45a4c03c61", - "https://esm.sh/v128/mimic-fn@4.0.0/denonext/mimic-fn.mjs": "10bcf0f2f20cbbba0c289ef7bf4d2422639bbc1c36c247be876afd6fe2d67138", - "https://esm.sh/v128/minipass@3.3.6/denonext/minipass.mjs": "59bbe430514455e78cb30c389b21af66efb2bf010cda071820a17d8c76d0d1cf", - "https://esm.sh/v128/minipass@5.0.0/denonext/minipass.mjs": "de0e049728f8c387b58c86439eb9d69a16b6a88756a6bc694e2fecbd7fd00401", - "https://esm.sh/v128/minizlib@2.1.2/denonext/minizlib.mjs": "0d919b6a0c60d5a31e14d748ff9d62aeae2923b604bcc6a22f90fa4bbd400d68", - "https://esm.sh/v128/mkdirp@1.0.4/denonext/mkdirp.mjs": "ee129b32e55dd8bede6b1bbd1978f7775fa5e2720d5a7ae07bf1e8c99abd77c7", - "https://esm.sh/v128/node-color-log@10.0.2": "05a277987c64153af1252167135076155fdc6b39ca260b2bdc39750da12d2a2d", - "https://esm.sh/v128/node-color-log@10.0.2/denonext/node-color-log.mjs": "2504391bd0ce1dd4c2bf0ed0b839b8a3ad84c028d9dd17cc58dccd2e14dacfde", - "https://esm.sh/v128/node-domexception@1.0.0/denonext/node-domexception.mjs": "bb35ba54c1a2b35870618876c0c96310a28ae58aecff33c8eed58a582e270ff4", - "https://esm.sh/v128/node-fetch@3.3.1": "916dcee177a69fb0e46970c528cb66fcd4973488f861844c0a235bfc645b0506", - "https://esm.sh/v128/node-fetch@3.3.1/denonext/node-fetch.mjs": "dc3a8f1f2fc9eb26d0d33e49f3750acc265d51a1a54bbd670c5d9f640b633a93", - "https://esm.sh/v128/node-fetch@3.3.1/denonext/src/utils/multipart-parser.js": "713b1b8cbafc4bfb7358debeb35d507e0d2328f0a28b8a2a7d79a3e5e4f5e5b8", - "https://esm.sh/v128/npm-run-path@5.1.0/denonext/npm-run-path.mjs": "3540b8c2dd1430f10d580f323f3a51aa30094da27a9220cce03ce69884b163bb", - "https://esm.sh/v128/onetime@6.0.0/denonext/onetime.mjs": "6e362222575d815f37fb813168d7069dd6a0f6bb6f972ed54d1bccb0f9fb3e1b", - "https://esm.sh/v128/original-fs@1.2.0/denonext/original-fs.mjs": "2b1098818e54d2c6748ff5b0dd9ea5f6a61b4b6d0f63fb625f21773d11cfc667", - "https://esm.sh/v128/path-key@3.1.1/denonext/path-key.mjs": "add83c631278b7df9b33ae84e41142db88bb291295bcc27eb4e77a1cbdfa71d0", - "https://esm.sh/v128/path-key@4.0.0/denonext/path-key.mjs": "2c2e3922bd0e6e414fa2752ff800bdc6b9208035ce797fa22e49b859f8259417", - "https://esm.sh/v128/shebang-command@2.0.0/denonext/shebang-command.mjs": "404e0fb09a782ca9495d53c721bb84b673b7b2e1054e021852143a6b91ca0e4f", - "https://esm.sh/v128/shebang-regex@3.0.0/denonext/shebang-regex.mjs": "03983ba59dd2cba9402935e21b46d05f5249364cba9f5757aef23c6c2fea65b9", - "https://esm.sh/v128/signal-exit@3.0.7/denonext/signal-exit.mjs": "2a176e5f9b351fa8057213c627a1503d63bf308b64447ef47f1ca6fbb2a91c81", - "https://esm.sh/v128/strip-final-newline@3.0.0/denonext/strip-final-newline.mjs": "03d9be4e8a249d63cbbddeb2fb675a1bbbcb335283e604d4ce56c88c90e6f102", - "https://esm.sh/v128/tar@6.1.15": "0460339f8aba5f287e8bebe258fe3fe13cb12f85820693f25724f0d98ef1258e", - "https://esm.sh/v128/tar@6.1.15/denonext/tar.mjs": "6194d892de8457b3b1f11d5cbacda1d540b453b45e8cb9f5f610abfb3e490b65", - "https://esm.sh/v128/tslib@2.6.0/denonext/tslib.mjs": "2215292e6fcf28a7a081eee911f127bb3c44cdd61ff0651e3e384d7a49b4e42b", - "https://esm.sh/v128/web-streams-polyfill@3.2.1/denonext/dist/ponyfill.es2018.js": "a2edb52a93494cda06386b3d6a168016b366e78f02c5eff1f94a0240be12ac96", - "https://esm.sh/v128/which@2.0.2/denonext/which.mjs": "86bf76e4937edb7fa3464d7bb9a426ef273684d1cefbec5ba5f1bdcb5cafff91", - "https://esm.sh/v128/yallist@4.0.0/denonext/yallist.mjs": "61f180d807dda50bac17028eda05d5722a3fecef6e98a9064e2353ea6864fd82", - "https://esm.sh/v130/lodash.flatten@4.4.0/denonext/lodash.flatten.mjs": "8e86ab607deea15cc3c1acfb5eae278ecbc5b80f24167b4e8f4c56df3278cd55", - "https://esm.sh/v130/stringify-tree@1.1.1/denonext/stringify-tree.mjs": "40a9d40e0282b5432302a3da68b88aa11685bc0b8a0b70246168deed5c5773fe" - } -} diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/fixtures/.gitlab-ci.yml b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/fixtures/.gitlab-ci.yml deleted file mode 100644 index 299e4c62..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/fixtures/.gitlab-ci.yml +++ /dev/null @@ -1,19 +0,0 @@ -# Do not edit this file directly. It is generated by Fluent GitLab CI - -image: denoland/deno:alpine - -fmt: - image: denoland/deno:alpine - script: - - deno fmt --check - -lint: - image: denoland/deno:alpine - script: - - deno lint - -test: - image: denoland/deno:alpine - script: - - deno test - diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/flake.lock b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/flake.lock deleted file mode 100644 index af7453c0..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/flake.lock +++ /dev/null @@ -1,61 +0,0 @@ -{ - "nodes": { - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1687709756, - "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1688910226, - "narHash": "sha256-kLTsFu9CAU2Gb288JhIBN/WlX4UUUDz4WiC/U59nvwk=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "2540432a940aee979be6ccfefba9ea0652c273a0", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "release-23.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/flake.nix b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/flake.nix deleted file mode 100644 index b13ea7df..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/flake.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ - description = "A Nix-flake-based Deno development environment"; - - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/release-23.05"; - flake-utils.url = "github:numtide/flake-utils"; - }; - - outputs = { - self, - nixpkgs, - flake-utils, - }: - flake-utils.lib.eachDefaultSystem - (system: let - pkgs = import nixpkgs { - inherit system; - }; - in { - devShells.default = pkgs.mkShell { - buildInputs = [ - pkgs.deno - ]; - }; - }); -} \ No newline at end of file diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/import_map.json b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/import_map.json deleted file mode 100644 index 801ea9a7..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/import_map.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "imports": { - "@dagger.io/dagger": "https://esm.sh/v128/*@dagger.io/dagger@0.6.3", - "fluent_gitlab_ci": "https://deno.land/x/fluent_gitlab_ci@v0.3.2/mod.ts", - "url": "node:url", - "readline": "node:readline", - "process": "node:process", - "path": "node:path", - "os": "node:os", - "fs": "node:fs", - "crypto": "node:crypto" - }, - "scopes": { - "https://esm.sh/v128/": { - "@lifeomic/axios-fetch": "https://esm.sh/v128/@lifeomic/axios-fetch@3.0.1", - "adm-zip": "https://esm.sh/v128/adm-zip@0.5.10", - "env-paths": "https://esm.sh/v128/env-paths@3.0.0", - "execa": "https://esm.sh/v128/execa@7.1.1", - "graphql-request": "https://esm.sh/v128/graphql-request@6.1.0", - "graphql-tag": "https://esm.sh/v128/graphql-tag@2.12.6", - "graphql": "https://esm.sh/v128/graphql@16.7.1", - "node-color-log": "https://esm.sh/v128/node-color-log@10.0.2", - "node-fetch": "https://esm.sh/v128/node-fetch@3.3.1", - "tar": "https://esm.sh/v128/tar@6.1.15" - } - } -} diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/mod.ts b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/mod.ts deleted file mode 100644 index 6152fb62..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/mod.ts +++ /dev/null @@ -1,4 +0,0 @@ -import * as GitLab from "./src/gitlab/index.ts"; -import * as Dagger from "./src/dagger/index.ts"; - -export { Dagger, GitLab }; diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/index.ts b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/index.ts deleted file mode 100644 index 392c0011..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import pipeline from "./pipeline.ts"; -import { fmt, lint, test } from "./jobs.ts"; - -export { fmt, lint, pipeline, test }; diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/jobs.ts b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/jobs.ts deleted file mode 100644 index 42b45545..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/jobs.ts +++ /dev/null @@ -1,111 +0,0 @@ -import Client from "@dagger.io/dagger"; -import { existsSync } from "fs"; - -export enum Job { - fmt = "fmt", - lint = "lint", - test = "test", -} - -export const lint = async (client: Client, src = ".") => { - const context = client.host().directory(src); - let command = ["deno", "lint"]; - - if (existsSync("devbox.json")) { - command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; - } - - const ctr = client - .pipeline(Job.lint) - .container() - .from("denoland/deno:alpine") - .withDirectory("/app", context, { - exclude: [".git", ".devbox", ".fluentci"], - }) - .withWorkdir("/app") - .withExec(command); - - const result = await ctr.stdout(); - - console.log(result); -}; - -export const fmt = async (client: Client, src = ".") => { - const context = client.host().directory(src); - let command = ["deno", "fmt"]; - - if (existsSync("devbox.json")) { - command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; - } - - const ctr = client - .pipeline(Job.fmt) - .container() - .from("denoland/deno:alpine") - .withDirectory("/app", context, { - exclude: [".git", ".devbox", ".fluentci"], - }) - .withWorkdir("/app") - .withExec(command); - - const result = await ctr.stdout(); - - console.log(result); -}; - -export const test = async ( - client: Client, - src = ".", - options: { ignore: string[] } = { ignore: [] } -) => { - const context = client.host().directory(src); - let command = ["deno", "test", "-A", "--lock-write"]; - - if (options.ignore.length > 0) { - command = command.concat([`--ignore=${options.ignore.join(",")}`]); - } - - if (existsSync("devbox.json")) { - command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; - } - - const ctr = client - .pipeline(Job.test) - .container() - .from("denoland/deno:alpine") - .withDirectory("/app", context, { - exclude: [".git", ".devbox", ".fluentci"], - }) - .withWorkdir("/app") - .withMountedCache("/root/.cache/deno", client.cacheVolume("deno-cache")) - .withExec(command); - - const result = await ctr.stdout(); - - console.log(result); -}; - -export type JobExec = ( - client: Client, - src?: string -) => - | Promise - | (( - client: Client, - src?: string, - options?: { - ignore: string[]; - } - ) => Promise); - -export const runnableJobs: Record = { - [Job.fmt]: fmt, - [Job.lint]: lint, - [Job.test]: test, -}; - -export const jobDescriptions: Record = { - [Job.fmt]: "Format your code", - [Job.lint]: "Lint your code", - [Job.test]: "Run your tests", -}; diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/list_jobs.ts b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/list_jobs.ts deleted file mode 100644 index 12bb3cbb..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/list_jobs.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { brightGreen } from "https://deno.land/std@0.191.0/fmt/colors.ts"; -import { runnableJobs, jobDescriptions, Job } from "./jobs.ts"; -import { stringifyTree } from "https://esm.sh/stringify-tree@1.1.1"; - -const tree = { - name: brightGreen("deno_pipeline"), - children: (Object.keys(runnableJobs) as Job[]).map((job) => ({ - name: jobDescriptions[job] - ? `${brightGreen(job)} - ${jobDescriptions[job]}` - : brightGreen(job), - children: [], - })), -}; - -console.log( - stringifyTree( - tree, - (t) => t.name, - (t) => t.children - ) -); diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/pipeline.ts b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/pipeline.ts deleted file mode 100644 index bad73729..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/pipeline.ts +++ /dev/null @@ -1,27 +0,0 @@ -import Client, { connect } from "@dagger.io/dagger"; -import * as jobs from "./jobs.ts"; - -const { fmt, lint, test, runnableJobs } = jobs; - -export default function pipeline(src = ".", args: string[] = []) { - connect(async (client: Client) => { - if (args.length > 0) { - await runSpecificJobs(client, args as jobs.Job[]); - return; - } - - await fmt(client, src); - await lint(client, src); - await test(client, src); - }); -} - -async function runSpecificJobs(client: Client, args: jobs.Job[]) { - for (const name of args) { - const job = runnableJobs[name]; - if (!job) { - throw new Error(`Job ${name} not found`); - } - await job(client); - } -} diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/runner.ts b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/runner.ts deleted file mode 100644 index e23879e7..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/dagger/runner.ts +++ /dev/null @@ -1,3 +0,0 @@ -import pipeline from "./pipeline.ts"; - -pipeline(".", Deno.args); diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/index.ts b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/index.ts deleted file mode 100644 index 392c0011..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import pipeline from "./pipeline.ts"; -import { fmt, lint, test } from "./jobs.ts"; - -export { fmt, lint, pipeline, test }; diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/jobs.ts b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/jobs.ts deleted file mode 100644 index 46be50c3..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/jobs.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Job } from "https://deno.land/x/fluent_gitlab_ci@v0.3.2/mod.ts"; - -export const fmt = new Job() - .image("denoland/deno:alpine") - .script("deno fmt --check"); - -export const lint = new Job().image("denoland/deno:alpine").script("deno lint"); - -export const test = new Job().image("denoland/deno:alpine").script("deno test"); diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/pipeline.ts b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/pipeline.ts deleted file mode 100644 index 366de64b..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/pipeline.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { GitlabCI } from "https://deno.land/x/fluent_gitlab_ci@v0.3.2/mod.ts"; -import { fmt, lint, test } from "./jobs.ts"; - -const pipeline = new GitlabCI() - .image("denoland/deno:alpine") - .addJob("fmt", fmt) - .addJob("lint", lint) - .addJob("test", test); - -export default pipeline; diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/pipeline_test.ts b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/pipeline_test.ts deleted file mode 100644 index ca247109..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.fluentci/src/gitlab/pipeline_test.ts +++ /dev/null @@ -1,8 +0,0 @@ -import pipeline from "./pipeline.ts"; -import { assertEquals } from "https://deno.land/std@0.191.0/testing/asserts.ts"; - -Deno.test(function pipelineTest() { - const expected = Deno.readTextFileSync("./fixtures/.gitlab-ci.yml"); - const actual = pipeline.toString(); - assertEquals(actual, expected); -}); diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.github/workflows/ci.yml b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.github/workflows/ci.yml deleted file mode 100644 index a7f9464b..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/.github/workflows/ci.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Codecov - -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: denoland/setup-deno@v1 - with: - deno-version: v1.34 - - name: Create coverage files - run: deno test --allow-read --coverage=coverage --lock-write # create coverage files - - name: Create coverage report - run: deno coverage ./coverage --lcov > coverage.lcov # create coverage report - - name: Collect coverage - uses: codecov/codecov-action@v3 # upload the report on Codecov - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - with: - file: ./coverage.lcov diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/CODE_OF_CONDUCT.md b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/CODE_OF_CONDUCT.md deleted file mode 100644 index e9c20f9c..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,132 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -We as members, contributors, and leaders pledge to make participation in our -community a harassment-free experience for everyone, regardless of age, body -size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socio-economic status, -nationality, personal appearance, race, caste, color, religion, or sexual -identity and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, -diverse, inclusive, and healthy community. - -## Our Standards - -Examples of behavior that contributes to a positive environment for our -community include: - -- Demonstrating empathy and kindness toward other people -- Being respectful of differing opinions, viewpoints, and experiences -- Giving and gracefully accepting constructive feedback -- Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience -- Focusing on what is best not just for us as individuals, but for the overall - community - -Examples of unacceptable behavior include: - -- The use of sexualized language or imagery, and sexual attention or advances of - any kind -- Trolling, insulting or derogatory comments, and personal or political attacks -- Public or private harassment -- Publishing others' private information, such as a physical or email address, - without their explicit permission -- Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Enforcement Responsibilities - -Community leaders are responsible for clarifying and enforcing our standards of -acceptable behavior and will take appropriate and fair corrective action in -response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. - -Community leaders have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, and will communicate reasons for moderation -decisions when appropriate. - -## Scope - -This Code of Conduct applies within all community spaces, and also applies when -an individual is officially representing the community in public spaces. -Examples of representing our community include using an official e-mail address, -posting via an official social media account, or acting as an appointed -representative at an online or offline event. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at -[GitHub Issues](https://github.com/fluent-ci-templates/deno-pipeline/issues). -All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. - -## Enforcement Guidelines - -Community leaders will follow these Community Impact Guidelines in determining -the consequences for any action they deem in violation of this Code of Conduct: - -### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed -unprofessional or unwelcome in the community. - -**Consequence**: A private, written warning from community leaders, providing -clarity around the nature of the violation and an explanation of why the -behavior was inappropriate. A public apology may be requested. - -### 2. Warning - -**Community Impact**: A violation through a single incident or series of -actions. - -**Consequence**: A warning with consequences for continued behavior. No -interaction with the people involved, including unsolicited interaction with -those enforcing the Code of Conduct, for a specified period of time. This -includes avoiding interactions in community spaces as well as external channels -like social media. Violating these terms may lead to a temporary or permanent -ban. - -### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including -sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public -communication with the community for a specified period of time. No public or -private interaction with the people involved, including unsolicited interaction -with those enforcing the Code of Conduct, is allowed during this period. -Violating these terms may lead to a permanent ban. - -### 4. Permanent Ban - -**Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an -individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within the -community. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 2.1, available at -[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. - -Community Impact Guidelines were inspired by -[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. - -For answers to common questions about this code of conduct, see the FAQ at -[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at -[https://www.contributor-covenant.org/translations][translations]. - -[homepage]: https://www.contributor-covenant.org -[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html -[Mozilla CoC]: https://github.com/mozilla/diversity -[FAQ]: https://www.contributor-covenant.org/faq -[translations]: https://www.contributor-covenant.org/translations diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/CONTRIBUTING.md b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/CONTRIBUTING.md deleted file mode 100644 index e50de724..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/CONTRIBUTING.md +++ /dev/null @@ -1,70 +0,0 @@ -# Contributing Guidelines - -Thank you for your interest in contributing to our project. Whether it's a bug -report, new feature, correction, or additional documentation, we greatly value -feedback and contributions from our community. - -Please read through this document before submitting any issues or pull requests -to ensure we have all the necessary information to effectively respond to your -bug report or contribution. - -## Reporting Bugs/Feature Requests - -We welcome you to use the GitHub issue tracker to report bugs or suggest -features. - -When filing an issue, please check existing open, or recently closed, issues to -make sure somebody else hasn't already reported the issue. Please try to include -as much information as you can. Details like these are incredibly useful: - -- A reproducible test case or series of steps -- The version of our code being used -- Any modifications you've made relevant to the bug -- Anything unusual about your environment or deployment - -## Contributing via Pull Requests - -Contributions via pull requests are much appreciated. Before sending us a pull -request, please ensure that: - -1. You are working against the latest source on the _master_ branch. -2. You check existing open, and recently merged, pull requests to make sure - someone else hasn't addressed the problem already. -3. You open an issue to discuss any significant work - we would hate for your - time to be wasted. - -To send us a pull request, please: - -1. Fork the repository. -2. Modify the source; please focus on the specific change you are contributing. - If you also reformat all the code, it will be hard for us to focus on your - change. -3. Ensure local tests pass. -4. Commit to your fork using clear commit messages. -5. Send us a pull request, answering any default questions in the pull request - interface. -6. Pay attention to any automated CI failures reported in the pull request, and - stay involved in the conversation. - -GitHub provides additional document on -[forking a repository](https://help.github.com/articles/fork-a-repo/) and -[creating a pull request](https://help.github.com/articles/creating-a-pull-request/). - -## Finding contributions to work on - -Looking at the existing issues is a great way to find something to contribute -on. As our projects, by default, use the default GitHub issue labels -(enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any -'help wanted' issues is a great place to start. - -## Code of Conduct - -This project has adopted the -[Contributor Covenant](https://www.contributor-covenant.org/), version 2.1, -available at -https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. - -## Licensing - -See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to -confirm the licensing of your contribution. diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/LICENSE b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/LICENSE deleted file mode 100644 index d9ab36a4..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2023 Tsiry Sandratraina - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/README.md b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/README.md deleted file mode 100644 index 1afc7c6e..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# Deno Pipeline - -[![deno module](https://shield.deno.dev/x/deno_pipeline)](https://deno.land/x/deno_pipeline) -![deno compatibility](https://shield.deno.dev/deno/^1.34) -[![](https://img.shields.io/codecov/c/gh/fluent-ci-templates/deno-pipeline)](https://codecov.io/gh/fluent-ci-templates/deno-pipeline) - -A ready-to-use CI/CD Pipeline for your Deno projects. - -## ๐Ÿš€ Usage - -Run the following command: - -```bash -dagger run fluentci deno_pipeline -``` - -Or, if you want to use it as a template: - -```bash -fluentci init -t deno -``` - -This will create a `.fluentci` folder in your project. - -Now you can run the pipeline with: - -```bash -dagger run fluentci . -``` - -## Jobs - -| Job | Description | Options | -| ----- | ---------------- | ---------------------- | -| fmt | Format your code | | -| lint | Lint your code | | -| test | Run your tests | `{ ignore: string[] }` | - -## Programmatic usage - -You can also use this pipeline programmatically: - -```ts -import Client, { connect } from "@dagger.io/dagger"; -import { Dagger } from "https://deno.land/x/deno_pipeline/mod.ts"; - -const { fmt, lint, test } = Dagger; - -function pipeline(src = ".") { - connect(async (client: Client) => { - await fmt(client, src); - await lint(client, src); - await test(client, src); - }); -} - -pipeline(); -``` diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/ci.ts b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/ci.ts deleted file mode 100644 index 67e5a808..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/ci.ts +++ /dev/null @@ -1,12 +0,0 @@ -const command = new Deno.Command(Deno.execPath(), { - args: [ - "run", - "-A", - "--import-map=https://deno.land/x/deno_pipeline/import_map.json", - "https://deno.land/x/deno_pipeline/src/dagger/runner.ts", - ], -}); - -const { stdout } = await command.output(); - -console.log(new TextDecoder().decode(stdout)); diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/deno.json b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/deno.json deleted file mode 100644 index 42402195..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/deno.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "importMap": "import_map.json", - "tasks": { - "esm:add": "deno run -A https://esm.sh/v128 add", - "esm:update": "deno run -A https://esm.sh/v128 update", - "esm:remove": "deno run -A https://esm.sh/v128 remove", - "ci:dagger": "dagger run deno run -A src/dagger/runner.ts" - } -} diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/deno.lock b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/deno.lock deleted file mode 100644 index f8af4c36..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/deno.lock +++ /dev/null @@ -1,67 +0,0 @@ -{ - "version": "2", - "remote": { - "https://deno.land/std@0.150.0/media_types/_util.ts": "ce9b4fc4ba1c447dafab619055e20fd88236ca6bdd7834a21f98bd193c3fbfa1", - "https://deno.land/std@0.150.0/media_types/mod.ts": "2d4b6f32a087029272dc59e0a55ae3cc4d1b27b794ccf528e94b1925795b3118", - "https://deno.land/std@0.150.0/media_types/vendor/mime-db.v1.52.0.ts": "724cee25fa40f1a52d3937d6b4fbbfdd7791ff55e1b7ac08d9319d5632c7f5af", - "https://deno.land/std@0.191.0/fmt/colors.ts": "d67e3cd9f472535241a8e410d33423980bec45047e343577554d3356e1f0ef4e", - "https://deno.land/x/nix_installer_pipeline@v0.3.6/src/dagger/steps.ts": "a34aea3753c7079de5877f592ce31f30d05d552155729ff3e695d77326405133", - "https://deno.land/x/xhr@0.3.0/mod.ts": "094aacd627fd9635cd942053bf8032b5223b909858fa9dc8ffa583752ff63b20", - "https://esm.sh/stringify-tree@1.1.1": "8d994a105481fa944515323d89bd2596c1de79f3d9bd1386266463934716eca0", - "https://esm.sh/v128/*@dagger.io/dagger@0.6.3": "cb691a77c0cdaee22f2b8393731b5143c83ce22dbbea204cdbfd203768d15b64", - "https://esm.sh/v128/@dagger.io/dagger@0.6.3/X-ZS8q/denonext/dagger.mjs": "fd0901784d75b99615b5409c3654b5c7edfc5ba377c9e1a5a67ffff4f7d3ac32", - "https://esm.sh/v128/adm-zip@0.5.10": "d9c54d6d2dd788462781a57d923295bd79304e6fd74b242fd4b30e35b39c5dcf", - "https://esm.sh/v128/adm-zip@0.5.10/denonext/adm-zip.mjs": "07a9731547905e0ca55ae917e1969d7f6d04fb3773f906ce3306891337eb4849", - "https://esm.sh/v128/chownr@2.0.0/denonext/chownr.mjs": "30b8f17084dfbe475a5052b615f706b06ddd17dca0535103340d485c6b94e952", - "https://esm.sh/v128/cross-fetch@3.1.8/denonext/cross-fetch.mjs": "8fba9e7c3fbaf0d2168beb63ce0cd21b5bfbfbd77e2fcbf8d957d533a71222f6", - "https://esm.sh/v128/cross-spawn@7.0.3/denonext/cross-spawn.mjs": "0569a26e7ad4b3376516cbc9b1942e10961a58030eadcea8c848e6b956eb355c", - "https://esm.sh/v128/data-uri-to-buffer@4.0.1/denonext/data-uri-to-buffer.mjs": "70ef987b1da58391495ecfad9888d996469224faf3cd996d81dc2e059feb9f31", - "https://esm.sh/v128/env-paths@3.0.0": "8400fb23319be9b30d7b40d1c865541c5b3c7726cdf9b74000bc0f1678d52ecf", - "https://esm.sh/v128/env-paths@3.0.0/denonext/env-paths.mjs": "77984a05eb16450087f25060a070ed500ec546719d471143e16d976ca73ca956", - "https://esm.sh/v128/execa@7.1.1": "a40c7030df81ab0847a5d844f4c5c6420af973dff05fef88e53cbb9b8667fdc2", - "https://esm.sh/v128/execa@7.1.1/denonext/execa.mjs": "9d5943544c0df3761b52f2c095f89a03ca6c028d818a8f0475ff883b0408f154", - "https://esm.sh/v128/fetch-blob@3.2.0/denonext/fetch-blob.mjs": "0531568b36c0f6db3e9825fbb2d08dee51100eb675c2bf1d98d6971a92010721", - "https://esm.sh/v128/fetch-blob@3.2.0/denonext/file.js": "fd82828163a4e7bdc15190d8c3dbfd92f93274d05bd7f7f5ab81093e3ad7e9c2", - "https://esm.sh/v128/fetch-blob@3.2.0/denonext/from.js": "7d3258c7960755497f90879806f0b815d5e564c2ac1523238af5cb9552ff5c45", - "https://esm.sh/v128/formdata-polyfill@4.0.10/denonext/esm.min.js": "b6d65a204e81eca699d9eb6f867e9efffa42db39a8f161690915a89e5eb1766f", - "https://esm.sh/v128/fs-minipass@2.1.0/denonext/fs-minipass.mjs": "74b00283d556b281bdfd6a669576d852f2c43702043c411985f8f8188d208c5d", - "https://esm.sh/v128/get-stream@6.0.1/denonext/get-stream.mjs": "a947a16f8cb3052fd654a84f8b36b40ce96b6a5acfb3ad4ab69d814bcf3351fb", - "https://esm.sh/v128/graphql-request@6.1.0": "17f00c323eb825811ce14e2b0e88a0c873acb666c382ac963d1edeb03e01f372", - "https://esm.sh/v128/graphql-request@6.1.0/denonext/graphql-request.mjs": "0b15f49d44489423ae6f06004725b6d050b6359da4969e6569bd6ad45065bd94", - "https://esm.sh/v128/graphql-tag@2.12.6": "5bfa27da9c9918fb52a01b8579891e804e0365d91118df1f2e0957a72dacdc39", - "https://esm.sh/v128/graphql-tag@2.12.6/denonext/graphql-tag.mjs": "331d09949efc4ac60c84a69b52a7da8b333210493900e54953ae4604c9874527", - "https://esm.sh/v128/graphql@16.7.1/denonext/graphql.mjs": "418ad7c07b0f2d687f33b6275d3b5f317f4afbef1f462f318229f458dff45416", - "https://esm.sh/v128/human-signals@4.3.1/denonext/human-signals.mjs": "3889110cedd907804443d018cffe0a1d892d5e7467661376caf967feff55cbe9", - "https://esm.sh/v128/is-stream@3.0.0/denonext/is-stream.mjs": "5c8b65f2fa051c4b18e88bbae11dac8bba9caf57752577d69bcea86d1f05c5b7", - "https://esm.sh/v128/isexe@2.0.0/denonext/isexe.mjs": "3cfefd270d1bfdfb864ee98dbb8f41d150cbf480925158f4a8f0ade8a9e17d6c", - "https://esm.sh/v128/merge-stream@2.0.0/denonext/merge-stream.mjs": "2c2af22401c294158d6bff659d157e3d2c028c218cc1bd2246534a45a4c03c61", - "https://esm.sh/v128/mimic-fn@4.0.0/denonext/mimic-fn.mjs": "10bcf0f2f20cbbba0c289ef7bf4d2422639bbc1c36c247be876afd6fe2d67138", - "https://esm.sh/v128/minipass@3.3.6/denonext/minipass.mjs": "59bbe430514455e78cb30c389b21af66efb2bf010cda071820a17d8c76d0d1cf", - "https://esm.sh/v128/minipass@5.0.0/denonext/minipass.mjs": "de0e049728f8c387b58c86439eb9d69a16b6a88756a6bc694e2fecbd7fd00401", - "https://esm.sh/v128/minizlib@2.1.2/denonext/minizlib.mjs": "0d919b6a0c60d5a31e14d748ff9d62aeae2923b604bcc6a22f90fa4bbd400d68", - "https://esm.sh/v128/mkdirp@1.0.4/denonext/mkdirp.mjs": "ee129b32e55dd8bede6b1bbd1978f7775fa5e2720d5a7ae07bf1e8c99abd77c7", - "https://esm.sh/v128/node-color-log@10.0.2": "05a277987c64153af1252167135076155fdc6b39ca260b2bdc39750da12d2a2d", - "https://esm.sh/v128/node-color-log@10.0.2/denonext/node-color-log.mjs": "2504391bd0ce1dd4c2bf0ed0b839b8a3ad84c028d9dd17cc58dccd2e14dacfde", - "https://esm.sh/v128/node-domexception@1.0.0/denonext/node-domexception.mjs": "bb35ba54c1a2b35870618876c0c96310a28ae58aecff33c8eed58a582e270ff4", - "https://esm.sh/v128/node-fetch@3.3.1": "916dcee177a69fb0e46970c528cb66fcd4973488f861844c0a235bfc645b0506", - "https://esm.sh/v128/node-fetch@3.3.1/denonext/node-fetch.mjs": "dc3a8f1f2fc9eb26d0d33e49f3750acc265d51a1a54bbd670c5d9f640b633a93", - "https://esm.sh/v128/node-fetch@3.3.1/denonext/src/utils/multipart-parser.js": "713b1b8cbafc4bfb7358debeb35d507e0d2328f0a28b8a2a7d79a3e5e4f5e5b8", - "https://esm.sh/v128/npm-run-path@5.1.0/denonext/npm-run-path.mjs": "3540b8c2dd1430f10d580f323f3a51aa30094da27a9220cce03ce69884b163bb", - "https://esm.sh/v128/onetime@6.0.0/denonext/onetime.mjs": "6e362222575d815f37fb813168d7069dd6a0f6bb6f972ed54d1bccb0f9fb3e1b", - "https://esm.sh/v128/original-fs@1.2.0/denonext/original-fs.mjs": "2b1098818e54d2c6748ff5b0dd9ea5f6a61b4b6d0f63fb625f21773d11cfc667", - "https://esm.sh/v128/path-key@3.1.1/denonext/path-key.mjs": "add83c631278b7df9b33ae84e41142db88bb291295bcc27eb4e77a1cbdfa71d0", - "https://esm.sh/v128/path-key@4.0.0/denonext/path-key.mjs": "2c2e3922bd0e6e414fa2752ff800bdc6b9208035ce797fa22e49b859f8259417", - "https://esm.sh/v128/shebang-command@2.0.0/denonext/shebang-command.mjs": "404e0fb09a782ca9495d53c721bb84b673b7b2e1054e021852143a6b91ca0e4f", - "https://esm.sh/v128/shebang-regex@3.0.0/denonext/shebang-regex.mjs": "03983ba59dd2cba9402935e21b46d05f5249364cba9f5757aef23c6c2fea65b9", - "https://esm.sh/v128/signal-exit@3.0.7/denonext/signal-exit.mjs": "2a176e5f9b351fa8057213c627a1503d63bf308b64447ef47f1ca6fbb2a91c81", - "https://esm.sh/v128/strip-final-newline@3.0.0/denonext/strip-final-newline.mjs": "03d9be4e8a249d63cbbddeb2fb675a1bbbcb335283e604d4ce56c88c90e6f102", - "https://esm.sh/v128/tar@6.1.15": "0460339f8aba5f287e8bebe258fe3fe13cb12f85820693f25724f0d98ef1258e", - "https://esm.sh/v128/tar@6.1.15/denonext/tar.mjs": "6194d892de8457b3b1f11d5cbacda1d540b453b45e8cb9f5f610abfb3e490b65", - "https://esm.sh/v128/tslib@2.6.0/denonext/tslib.mjs": "2215292e6fcf28a7a081eee911f127bb3c44cdd61ff0651e3e384d7a49b4e42b", - "https://esm.sh/v128/web-streams-polyfill@3.2.1/denonext/dist/ponyfill.es2018.js": "a2edb52a93494cda06386b3d6a168016b366e78f02c5eff1f94a0240be12ac96", - "https://esm.sh/v128/which@2.0.2/denonext/which.mjs": "86bf76e4937edb7fa3464d7bb9a426ef273684d1cefbec5ba5f1bdcb5cafff91", - "https://esm.sh/v128/yallist@4.0.0/denonext/yallist.mjs": "61f180d807dda50bac17028eda05d5722a3fecef6e98a9064e2353ea6864fd82", - "https://esm.sh/v130/lodash.flatten@4.4.0/denonext/lodash.flatten.mjs": "8e86ab607deea15cc3c1acfb5eae278ecbc5b80f24167b4e8f4c56df3278cd55", - "https://esm.sh/v130/stringify-tree@1.1.1/denonext/stringify-tree.mjs": "40a9d40e0282b5432302a3da68b88aa11685bc0b8a0b70246168deed5c5773fe" - } -} diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/fixtures/.gitlab-ci.yml b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/fixtures/.gitlab-ci.yml deleted file mode 100644 index 299e4c62..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/fixtures/.gitlab-ci.yml +++ /dev/null @@ -1,19 +0,0 @@ -# Do not edit this file directly. It is generated by Fluent GitLab CI - -image: denoland/deno:alpine - -fmt: - image: denoland/deno:alpine - script: - - deno fmt --check - -lint: - image: denoland/deno:alpine - script: - - deno lint - -test: - image: denoland/deno:alpine - script: - - deno test - diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/flake.lock b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/flake.lock deleted file mode 100644 index af7453c0..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/flake.lock +++ /dev/null @@ -1,61 +0,0 @@ -{ - "nodes": { - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1687709756, - "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1688910226, - "narHash": "sha256-kLTsFu9CAU2Gb288JhIBN/WlX4UUUDz4WiC/U59nvwk=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "2540432a940aee979be6ccfefba9ea0652c273a0", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "release-23.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/flake.nix b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/flake.nix deleted file mode 100644 index b13ea7df..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/flake.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ - description = "A Nix-flake-based Deno development environment"; - - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/release-23.05"; - flake-utils.url = "github:numtide/flake-utils"; - }; - - outputs = { - self, - nixpkgs, - flake-utils, - }: - flake-utils.lib.eachDefaultSystem - (system: let - pkgs = import nixpkgs { - inherit system; - }; - in { - devShells.default = pkgs.mkShell { - buildInputs = [ - pkgs.deno - ]; - }; - }); -} \ No newline at end of file diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/import_map.json b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/import_map.json deleted file mode 100644 index 801ea9a7..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/import_map.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "imports": { - "@dagger.io/dagger": "https://esm.sh/v128/*@dagger.io/dagger@0.6.3", - "fluent_gitlab_ci": "https://deno.land/x/fluent_gitlab_ci@v0.3.2/mod.ts", - "url": "node:url", - "readline": "node:readline", - "process": "node:process", - "path": "node:path", - "os": "node:os", - "fs": "node:fs", - "crypto": "node:crypto" - }, - "scopes": { - "https://esm.sh/v128/": { - "@lifeomic/axios-fetch": "https://esm.sh/v128/@lifeomic/axios-fetch@3.0.1", - "adm-zip": "https://esm.sh/v128/adm-zip@0.5.10", - "env-paths": "https://esm.sh/v128/env-paths@3.0.0", - "execa": "https://esm.sh/v128/execa@7.1.1", - "graphql-request": "https://esm.sh/v128/graphql-request@6.1.0", - "graphql-tag": "https://esm.sh/v128/graphql-tag@2.12.6", - "graphql": "https://esm.sh/v128/graphql@16.7.1", - "node-color-log": "https://esm.sh/v128/node-color-log@10.0.2", - "node-fetch": "https://esm.sh/v128/node-fetch@3.3.1", - "tar": "https://esm.sh/v128/tar@6.1.15" - } - } -} diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/mod.ts b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/mod.ts deleted file mode 100644 index 6152fb62..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/mod.ts +++ /dev/null @@ -1,4 +0,0 @@ -import * as GitLab from "./src/gitlab/index.ts"; -import * as Dagger from "./src/dagger/index.ts"; - -export { Dagger, GitLab }; diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/src/dagger/index.ts b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/src/dagger/index.ts deleted file mode 100644 index 392c0011..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/src/dagger/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import pipeline from "./pipeline.ts"; -import { fmt, lint, test } from "./jobs.ts"; - -export { fmt, lint, pipeline, test }; diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/src/dagger/jobs.ts b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/src/dagger/jobs.ts deleted file mode 100644 index 611a5e03..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/src/dagger/jobs.ts +++ /dev/null @@ -1,188 +0,0 @@ -import Client from "@dagger.io/dagger"; -import { withDevbox } from "https://deno.land/x/nix_installer_pipeline@v0.3.6/src/dagger/steps.ts"; -import { existsSync } from "fs"; - -export enum Job { - fmt = "fmt", - lint = "lint", - test = "test", - deploy = "deploy", -} - -const baseCtr = (client: Client, pipeline: string) => { - if (existsSync("devbox.json")) { - return withDevbox( - client - .pipeline(pipeline) - .container() - .from("alpine:latest") - .withExec(["apk", "update"]) - .withExec(["apk", "add", "bash", "curl"]) - .withMountedCache("/nix", client.cacheVolume("nix")) - .withMountedCache("/etc/nix", client.cacheVolume("nix-etc")) - ); - } - return client.pipeline(pipeline).container().from("denoland/deno:alpine"); -}; - -export const lint = async (client: Client, src = ".") => { - const context = client.host().directory(src); - let command = ["deno", "lint"]; - - if (existsSync("devbox.json")) { - command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; - } - - const ctr = baseCtr(client, Job.lint) - .withDirectory("/app", context, { - exclude: [".git", ".devbox", ".fluentci"], - }) - .withWorkdir("/app") - .withExec(command); - - const result = await ctr.stdout(); - - console.log(result); -}; - -export const fmt = async (client: Client, src = ".") => { - const context = client.host().directory(src); - let command = ["deno", "fmt"]; - - if (existsSync("devbox.json")) { - command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; - } - - const ctr = baseCtr(client, Job.fmt) - .withDirectory("/app", context, { - exclude: [".git", ".devbox", ".fluentci"], - }) - .withWorkdir("/app") - .withExec(command); - - const result = await ctr.stdout(); - - console.log(result); -}; - -export const test = async ( - client: Client, - src = ".", - options: { ignore: string[] } = { ignore: [] } -) => { - const context = client.host().directory(src); - let command = ["deno", "test", "-A", "--lock-write"]; - - if (options.ignore.length > 0) { - command = command.concat([`--ignore=${options.ignore.join(",")}`]); - } - - if (existsSync("devbox.json")) { - command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; - } - - const ctr = baseCtr(client, Job.test) - .from("denoland/deno:alpine") - .withDirectory("/app", context, { - exclude: [".git", ".devbox", ".fluentci"], - }) - .withWorkdir("/app") - .withMountedCache("/root/.cache/deno", client.cacheVolume("deno-cache")) - .withExec(command); - - const result = await ctr.stdout(); - - console.log(result); -}; - -export const deploy = async (client: Client, src = ".") => { - const context = client.host().directory(src); - let installDeployCtl = [ - "deno", - "install", - "--allow-all", - "--no-check", - "-r", - "-f", - "https://deno.land/x/deploy/deployctl.ts", - ]; - const project = Deno.env.get("DENO_PROJECT"); - const noStatic = Deno.env.get("NO_STATIC"); - const exclude = Deno.env.get("EXCLUDE"); - - let command = ["deployctl", "deploy"]; - - if (noStatic) { - command = command.concat(["--no-static"]); - } - - if (exclude) { - command = command.concat([`--exclude=${exclude}`]); - } - - if (!Deno.env.get("DENO_DEPLOY_TOKEN")) { - throw new Error("DENO_DEPLOY_TOKEN environment variable is not set"); - } - - if (!project) { - throw new Error("DENO_PROJECT environment variable is not set"); - } - - const script = Deno.env.get("DENO_MAIN_SCRIPT") || "main.tsx"; - command = command.concat([`--project=${project}`, script]); - - if (existsSync("devbox.json")) { - command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; - installDeployCtl = [ - "sh", - "-c", - `devbox run -- ${installDeployCtl.join(" ")}`, - ]; - } - - const ctr = baseCtr(client, Job.deploy) - .from("denoland/deno:alpine") - .withDirectory("/app", context, { - exclude: [".git", ".devbox", ".fluentci"], - }) - .withWorkdir("/app") - .withEnvVariable("PATH", "/root/.deno/bin:$PATH", { expand: true }) - .withEnvVariable("DENO_DEPLOY_TOKEN", Deno.env.get("DENO_DEPLOY_TOKEN")!) - .withEnvVariable( - "DENO_MAIN_SCRIPT", - Deno.env.get("DENO_MAIN_SCRIPT") || "main.tsx" - ) - .withExec(installDeployCtl) - .withExec(command); - - const result = await ctr.stdout(); - - console.log(result); -}; - -export type JobExec = ( - client: Client, - src?: string -) => - | Promise - | (( - client: Client, - src?: string, - options?: { - ignore: string[]; - } - ) => Promise); - -export const runnableJobs: Record = { - [Job.fmt]: fmt, - [Job.lint]: lint, - [Job.test]: test, - [Job.deploy]: deploy, -}; - -export const jobDescriptions: Record = { - [Job.fmt]: "Format your code", - [Job.lint]: "Lint your code", - [Job.test]: "Run your tests", - [Job.deploy]: "Deploy your code to Deno Deploy", -}; diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/src/dagger/list_jobs.ts b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/src/dagger/list_jobs.ts deleted file mode 100644 index 12bb3cbb..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/src/dagger/list_jobs.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { brightGreen } from "https://deno.land/std@0.191.0/fmt/colors.ts"; -import { runnableJobs, jobDescriptions, Job } from "./jobs.ts"; -import { stringifyTree } from "https://esm.sh/stringify-tree@1.1.1"; - -const tree = { - name: brightGreen("deno_pipeline"), - children: (Object.keys(runnableJobs) as Job[]).map((job) => ({ - name: jobDescriptions[job] - ? `${brightGreen(job)} - ${jobDescriptions[job]}` - : brightGreen(job), - children: [], - })), -}; - -console.log( - stringifyTree( - tree, - (t) => t.name, - (t) => t.children - ) -); diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/src/dagger/pipeline.ts b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/src/dagger/pipeline.ts deleted file mode 100644 index bad73729..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/src/dagger/pipeline.ts +++ /dev/null @@ -1,27 +0,0 @@ -import Client, { connect } from "@dagger.io/dagger"; -import * as jobs from "./jobs.ts"; - -const { fmt, lint, test, runnableJobs } = jobs; - -export default function pipeline(src = ".", args: string[] = []) { - connect(async (client: Client) => { - if (args.length > 0) { - await runSpecificJobs(client, args as jobs.Job[]); - return; - } - - await fmt(client, src); - await lint(client, src); - await test(client, src); - }); -} - -async function runSpecificJobs(client: Client, args: jobs.Job[]) { - for (const name of args) { - const job = runnableJobs[name]; - if (!job) { - throw new Error(`Job ${name} not found`); - } - await job(client); - } -} diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/src/dagger/runner.ts b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/src/dagger/runner.ts deleted file mode 100644 index e23879e7..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/src/dagger/runner.ts +++ /dev/null @@ -1,3 +0,0 @@ -import pipeline from "./pipeline.ts"; - -pipeline(".", Deno.args); diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/src/gitlab/index.ts b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/src/gitlab/index.ts deleted file mode 100644 index 392c0011..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/src/gitlab/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import pipeline from "./pipeline.ts"; -import { fmt, lint, test } from "./jobs.ts"; - -export { fmt, lint, pipeline, test }; diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/src/gitlab/jobs.ts b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/src/gitlab/jobs.ts deleted file mode 100644 index 46be50c3..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/src/gitlab/jobs.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Job } from "https://deno.land/x/fluent_gitlab_ci@v0.3.2/mod.ts"; - -export const fmt = new Job() - .image("denoland/deno:alpine") - .script("deno fmt --check"); - -export const lint = new Job().image("denoland/deno:alpine").script("deno lint"); - -export const test = new Job().image("denoland/deno:alpine").script("deno test"); diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/src/gitlab/pipeline.ts b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/src/gitlab/pipeline.ts deleted file mode 100644 index 366de64b..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/src/gitlab/pipeline.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { GitlabCI } from "https://deno.land/x/fluent_gitlab_ci@v0.3.2/mod.ts"; -import { fmt, lint, test } from "./jobs.ts"; - -const pipeline = new GitlabCI() - .image("denoland/deno:alpine") - .addJob("fmt", fmt) - .addJob("lint", lint) - .addJob("test", test); - -export default pipeline; diff --git a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/src/gitlab/pipeline_test.ts b/.fluentci/example/.fluentci/.fluentci/example/.fluentci/src/gitlab/pipeline_test.ts deleted file mode 100644 index ca247109..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/.fluentci/src/gitlab/pipeline_test.ts +++ /dev/null @@ -1,8 +0,0 @@ -import pipeline from "./pipeline.ts"; -import { assertEquals } from "https://deno.land/std@0.191.0/testing/asserts.ts"; - -Deno.test(function pipelineTest() { - const expected = Deno.readTextFileSync("./fixtures/.gitlab-ci.yml"); - const actual = pipeline.toString(); - assertEquals(actual, expected); -}); diff --git a/.fluentci/example/.fluentci/.fluentci/example/README.md b/.fluentci/example/.fluentci/.fluentci/example/README.md deleted file mode 100644 index a6193e17..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Deno Pipeline Example - -This is an example using the [Deno Pipeline](https://github.com/fluent-ci-templates/deno-pipeline). - -## ๐Ÿš€ Usage - -You need to set the following environment variables: - -- `DENO_DEPLOY_TOKEN`: Your Deno Deploy token. -- `DENO_PROJECT`: Your project name. - -Then, run the following command: - -```bash -dagger run fluentci . fmt lint deploy -``` \ No newline at end of file diff --git a/.fluentci/example/.fluentci/.fluentci/example/main.tsx b/.fluentci/example/.fluentci/.fluentci/example/main.tsx deleted file mode 100644 index dd482662..00000000 --- a/.fluentci/example/.fluentci/.fluentci/example/main.tsx +++ /dev/null @@ -1,20 +0,0 @@ -/** @jsx h */ -import { serve } from "https://deno.land/std@0.190.0/http/server.ts"; -import html, { h } from "https://deno.land/x/htm@0.2.1/mod.ts"; - -const handler = (req: Request) => - html({ - title: "Hello World!", - styles: [ - "html, body { margin: 0; height: 100%; }", - "body { background: #86efac; display: flex; flex-direction: column; align-items: center; justify-content: center; }", - ], - body: ( - - -

Hello Patricia!

- - ), - }); - -serve(handler); diff --git a/.fluentci/example/.fluentci/.fluentci/fixtures/.gitlab-ci.yml b/.fluentci/example/.fluentci/.fluentci/fixtures/.gitlab-ci.yml deleted file mode 100644 index 299e4c62..00000000 --- a/.fluentci/example/.fluentci/.fluentci/fixtures/.gitlab-ci.yml +++ /dev/null @@ -1,19 +0,0 @@ -# Do not edit this file directly. It is generated by Fluent GitLab CI - -image: denoland/deno:alpine - -fmt: - image: denoland/deno:alpine - script: - - deno fmt --check - -lint: - image: denoland/deno:alpine - script: - - deno lint - -test: - image: denoland/deno:alpine - script: - - deno test - diff --git a/.fluentci/example/.fluentci/.fluentci/flake.lock b/.fluentci/example/.fluentci/.fluentci/flake.lock deleted file mode 100644 index af7453c0..00000000 --- a/.fluentci/example/.fluentci/.fluentci/flake.lock +++ /dev/null @@ -1,61 +0,0 @@ -{ - "nodes": { - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1687709756, - "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1688910226, - "narHash": "sha256-kLTsFu9CAU2Gb288JhIBN/WlX4UUUDz4WiC/U59nvwk=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "2540432a940aee979be6ccfefba9ea0652c273a0", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "release-23.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/.fluentci/example/.fluentci/.fluentci/flake.nix b/.fluentci/example/.fluentci/.fluentci/flake.nix deleted file mode 100644 index b13ea7df..00000000 --- a/.fluentci/example/.fluentci/.fluentci/flake.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ - description = "A Nix-flake-based Deno development environment"; - - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/release-23.05"; - flake-utils.url = "github:numtide/flake-utils"; - }; - - outputs = { - self, - nixpkgs, - flake-utils, - }: - flake-utils.lib.eachDefaultSystem - (system: let - pkgs = import nixpkgs { - inherit system; - }; - in { - devShells.default = pkgs.mkShell { - buildInputs = [ - pkgs.deno - ]; - }; - }); -} \ No newline at end of file diff --git a/.fluentci/example/.fluentci/.fluentci/import_map.json b/.fluentci/example/.fluentci/.fluentci/import_map.json deleted file mode 100644 index 12c59ffe..00000000 --- a/.fluentci/example/.fluentci/.fluentci/import_map.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "imports": { - "@dagger.io/dagger": "https://esm.sh/v128/*@dagger.io/dagger@0.6.3", - "fluent_gitlab_ci": "https://deno.land/x/fluent_gitlab_ci@v0.3.2/mod.ts", - "fluent_github_actions": "https://deno.land/x/fluent_github_actions@v0.1.2/mod.ts", - "url": "node:url", - "readline": "node:readline", - "process": "node:process", - "path": "node:path", - "os": "node:os", - "fs": "node:fs", - "crypto": "node:crypto" - }, - "scopes": { - "https://esm.sh/v128/": { - "@lifeomic/axios-fetch": "https://esm.sh/v128/@lifeomic/axios-fetch@3.0.1", - "adm-zip": "https://esm.sh/v128/adm-zip@0.5.10", - "env-paths": "https://esm.sh/v128/env-paths@3.0.0", - "execa": "https://esm.sh/v128/execa@7.1.1", - "graphql-request": "https://esm.sh/v128/graphql-request@6.1.0", - "graphql-tag": "https://esm.sh/v128/graphql-tag@2.12.6", - "graphql": "https://esm.sh/v128/graphql@16.7.1", - "node-color-log": "https://esm.sh/v128/node-color-log@10.0.2", - "node-fetch": "https://esm.sh/v128/node-fetch@3.3.1", - "tar": "https://esm.sh/v128/tar@6.1.15" - } - } -} \ No newline at end of file diff --git a/.fluentci/example/.fluentci/.fluentci/mod.ts b/.fluentci/example/.fluentci/.fluentci/mod.ts deleted file mode 100644 index 6152fb62..00000000 --- a/.fluentci/example/.fluentci/.fluentci/mod.ts +++ /dev/null @@ -1,4 +0,0 @@ -import * as GitLab from "./src/gitlab/index.ts"; -import * as Dagger from "./src/dagger/index.ts"; - -export { Dagger, GitLab }; diff --git a/.fluentci/example/.fluentci/.fluentci/src/dagger/index.ts b/.fluentci/example/.fluentci/.fluentci/src/dagger/index.ts deleted file mode 100644 index 392c0011..00000000 --- a/.fluentci/example/.fluentci/.fluentci/src/dagger/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import pipeline from "./pipeline.ts"; -import { fmt, lint, test } from "./jobs.ts"; - -export { fmt, lint, pipeline, test }; diff --git a/.fluentci/example/.fluentci/.fluentci/src/dagger/jobs.ts b/.fluentci/example/.fluentci/.fluentci/src/dagger/jobs.ts deleted file mode 100644 index 862b599a..00000000 --- a/.fluentci/example/.fluentci/.fluentci/src/dagger/jobs.ts +++ /dev/null @@ -1,197 +0,0 @@ -import Client from "@dagger.io/dagger"; -import { upload } from "https://deno.land/x/codecov_pipeline@v0.1.1/src/dagger/jobs.ts"; -import { withDevbox } from "https://deno.land/x/nix_installer_pipeline@v0.3.6/src/dagger/steps.ts"; -import { existsSync } from "fs"; - -export enum Job { - fmt = "fmt", - lint = "lint", - test = "test", - deploy = "deploy", - codecov = "codecov", -} - -const baseCtr = (client: Client, pipeline: string) => { - if (existsSync("devbox.json")) { - return withDevbox( - client - .pipeline(pipeline) - .container() - .from("alpine:latest") - .withExec(["apk", "update"]) - .withExec(["apk", "add", "bash", "curl"]) - .withMountedCache("/nix", client.cacheVolume("nix")) - .withMountedCache("/etc/nix", client.cacheVolume("nix-etc")) - ); - } - return client.pipeline(pipeline).container().from("denoland/deno:alpine"); -}; - -export const lint = async (client: Client, src = ".") => { - const context = client.host().directory(src); - let command = ["deno", "lint"]; - - if (existsSync("devbox.json")) { - command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; - } - - const ctr = baseCtr(client, Job.lint) - .withDirectory("/app", context, { - exclude: [".git", ".devbox", ".fluentci"], - }) - .withWorkdir("/app") - .withExec(command); - - const result = await ctr.stdout(); - - console.log(result); -}; - -export const fmt = async (client: Client, src = ".") => { - const context = client.host().directory(src); - let command = ["deno", "fmt"]; - - if (existsSync("devbox.json")) { - command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; - } - - const ctr = baseCtr(client, Job.fmt) - .withDirectory("/app", context, { - exclude: [".git", ".devbox", ".fluentci"], - }) - .withWorkdir("/app") - .withExec(command); - - const result = await ctr.stdout(); - - console.log(result); -}; - -export const test = async ( - client: Client, - src = ".", - options: { ignore: string[] } = { ignore: [] } -) => { - const context = client.host().directory(src); - let command = ["deno", "test", "-A", "--coverage=coverage", "--lock-write"]; - - if (options.ignore.length > 0) { - command = command.concat([`--ignore=${options.ignore.join(",")}`]); - } - - if (existsSync("devbox.json")) { - command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; - } - - const ctr = baseCtr(client, Job.test) - .from("denoland/deno:alpine") - .withDirectory("/app", context, { - exclude: [".git", ".devbox", ".fluentci"], - }) - .withWorkdir("/app") - .withMountedCache("/root/.cache/deno", client.cacheVolume("deno-cache")) - .withExec(command) - .withExec(["sh", "-c", "deno coverage ./coverage --lcov > coverage.lcov"]); - - const result = await ctr.stdout(); - - await ctr.file("/app/coverage.lcov").export("./coverage.lcov"); - - console.log(result); -}; - -export const deploy = async (client: Client, src = ".") => { - const context = client.host().directory(src); - let installDeployCtl = [ - "deno", - "install", - "--allow-all", - "--no-check", - "-r", - "-f", - "https://deno.land/x/deploy/deployctl.ts", - ]; - const project = Deno.env.get("DENO_PROJECT"); - const noStatic = Deno.env.get("NO_STATIC"); - const exclude = Deno.env.get("EXCLUDE"); - - let command = ["deployctl", "deploy"]; - - if (noStatic) { - command = command.concat(["--no-static"]); - } - - if (exclude) { - command = command.concat([`--exclude=${exclude}`]); - } - - if (!Deno.env.get("DENO_DEPLOY_TOKEN")) { - throw new Error("DENO_DEPLOY_TOKEN environment variable is not set"); - } - - if (!project) { - throw new Error("DENO_PROJECT environment variable is not set"); - } - - const script = Deno.env.get("DENO_MAIN_SCRIPT") || "main.tsx"; - command = command.concat([`--project=${project}`, script]); - - if (existsSync("devbox.json")) { - command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; - installDeployCtl = [ - "sh", - "-c", - `devbox run -- ${installDeployCtl.join(" ")}`, - ]; - } - - const ctr = baseCtr(client, Job.deploy) - .from("denoland/deno:alpine") - .withDirectory("/app", context, { - exclude: [".git", ".devbox", ".fluentci"], - }) - .withWorkdir("/app") - .withEnvVariable("PATH", "/root/.deno/bin:$PATH", { expand: true }) - .withEnvVariable("DENO_DEPLOY_TOKEN", Deno.env.get("DENO_DEPLOY_TOKEN")!) - .withEnvVariable( - "DENO_MAIN_SCRIPT", - Deno.env.get("DENO_MAIN_SCRIPT") || "main.tsx" - ) - .withExec(installDeployCtl) - .withExec(command); - - const result = await ctr.stdout(); - - console.log(result); -}; - -export type JobExec = ( - client: Client, - src?: string -) => - | Promise - | (( - client: Client, - src?: string, - options?: { - ignore: string[]; - } - ) => Promise); - -export const codecov = upload; - -export const runnableJobs: Record = { - [Job.fmt]: fmt, - [Job.lint]: lint, - [Job.test]: test, - [Job.deploy]: deploy, - [Job.codecov]: upload, -}; - -export const jobDescriptions: Record = { - [Job.fmt]: "Format your code", - [Job.lint]: "Lint your code", - [Job.test]: "Run your tests", - [Job.deploy]: "Deploy your code to Deno Deploy", - [Job.codecov]: "Upload your code coverage to Codecov", -}; diff --git a/.fluentci/example/.fluentci/.fluentci/src/dagger/list_jobs.ts b/.fluentci/example/.fluentci/.fluentci/src/dagger/list_jobs.ts deleted file mode 100644 index 12bb3cbb..00000000 --- a/.fluentci/example/.fluentci/.fluentci/src/dagger/list_jobs.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { brightGreen } from "https://deno.land/std@0.191.0/fmt/colors.ts"; -import { runnableJobs, jobDescriptions, Job } from "./jobs.ts"; -import { stringifyTree } from "https://esm.sh/stringify-tree@1.1.1"; - -const tree = { - name: brightGreen("deno_pipeline"), - children: (Object.keys(runnableJobs) as Job[]).map((job) => ({ - name: jobDescriptions[job] - ? `${brightGreen(job)} - ${jobDescriptions[job]}` - : brightGreen(job), - children: [], - })), -}; - -console.log( - stringifyTree( - tree, - (t) => t.name, - (t) => t.children - ) -); diff --git a/.fluentci/example/.fluentci/.fluentci/src/dagger/pipeline.ts b/.fluentci/example/.fluentci/.fluentci/src/dagger/pipeline.ts deleted file mode 100644 index bad73729..00000000 --- a/.fluentci/example/.fluentci/.fluentci/src/dagger/pipeline.ts +++ /dev/null @@ -1,27 +0,0 @@ -import Client, { connect } from "@dagger.io/dagger"; -import * as jobs from "./jobs.ts"; - -const { fmt, lint, test, runnableJobs } = jobs; - -export default function pipeline(src = ".", args: string[] = []) { - connect(async (client: Client) => { - if (args.length > 0) { - await runSpecificJobs(client, args as jobs.Job[]); - return; - } - - await fmt(client, src); - await lint(client, src); - await test(client, src); - }); -} - -async function runSpecificJobs(client: Client, args: jobs.Job[]) { - for (const name of args) { - const job = runnableJobs[name]; - if (!job) { - throw new Error(`Job ${name} not found`); - } - await job(client); - } -} diff --git a/.fluentci/example/.fluentci/.fluentci/src/dagger/runner.ts b/.fluentci/example/.fluentci/.fluentci/src/dagger/runner.ts deleted file mode 100644 index e23879e7..00000000 --- a/.fluentci/example/.fluentci/.fluentci/src/dagger/runner.ts +++ /dev/null @@ -1,3 +0,0 @@ -import pipeline from "./pipeline.ts"; - -pipeline(".", Deno.args); diff --git a/.fluentci/example/.fluentci/.fluentci/src/github/config.ts b/.fluentci/example/.fluentci/.fluentci/src/github/config.ts deleted file mode 100644 index 9508e832..00000000 --- a/.fluentci/example/.fluentci/.fluentci/src/github/config.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { JobSpec, Workflow } from "fluent_github_actions"; - -export function generateYaml() { - const workflow = new Workflow("Codecov"); - - const push = { - branches: ["main"], - }; - - const setupDagger = `\ - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - sudo mv bin/dagger /usr/local/bin - dagger version`; - - const tests: JobSpec = { - "runs-on": "ubuntu-latest", - steps: [ - { - uses: "actions/checkout@v2", - }, - { - uses: "denoland/setup-deno@v1", - with: { - "deno-version": "v1.37", - }, - }, - { - name: "Setup Fluent CI CLI", - run: "deno install -A -r https://cli.fluentci.io -n fluentci", - }, - { - name: "Setup Dagger", - run: setupDagger, - }, - { - name: "Run Dagger Pipelines", - run: "dagger run fluentci . fmt lint test", - }, - { - name: "Upload to Codecov", - run: "dagger run fluentci codecov_pipeline", - env: { - CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}", - }, - }, - ], - }; - - workflow.on({ push }).jobs({ tests }); - - workflow.save(".github/workflows/ci.yml"); -} diff --git a/.fluentci/example/.fluentci/.fluentci/src/github/init.ts b/.fluentci/example/.fluentci/.fluentci/src/github/init.ts deleted file mode 100644 index 6097dd54..00000000 --- a/.fluentci/example/.fluentci/.fluentci/src/github/init.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { generateYaml } from "./config.ts"; - -generateYaml(); diff --git a/.fluentci/example/.fluentci/.fluentci/src/gitlab/index.ts b/.fluentci/example/.fluentci/.fluentci/src/gitlab/index.ts deleted file mode 100644 index 392c0011..00000000 --- a/.fluentci/example/.fluentci/.fluentci/src/gitlab/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import pipeline from "./pipeline.ts"; -import { fmt, lint, test } from "./jobs.ts"; - -export { fmt, lint, pipeline, test }; diff --git a/.fluentci/example/.fluentci/.fluentci/src/gitlab/jobs.ts b/.fluentci/example/.fluentci/.fluentci/src/gitlab/jobs.ts deleted file mode 100644 index 46be50c3..00000000 --- a/.fluentci/example/.fluentci/.fluentci/src/gitlab/jobs.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Job } from "https://deno.land/x/fluent_gitlab_ci@v0.3.2/mod.ts"; - -export const fmt = new Job() - .image("denoland/deno:alpine") - .script("deno fmt --check"); - -export const lint = new Job().image("denoland/deno:alpine").script("deno lint"); - -export const test = new Job().image("denoland/deno:alpine").script("deno test"); diff --git a/.fluentci/example/.fluentci/.fluentci/src/gitlab/pipeline.ts b/.fluentci/example/.fluentci/.fluentci/src/gitlab/pipeline.ts deleted file mode 100644 index 366de64b..00000000 --- a/.fluentci/example/.fluentci/.fluentci/src/gitlab/pipeline.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { GitlabCI } from "https://deno.land/x/fluent_gitlab_ci@v0.3.2/mod.ts"; -import { fmt, lint, test } from "./jobs.ts"; - -const pipeline = new GitlabCI() - .image("denoland/deno:alpine") - .addJob("fmt", fmt) - .addJob("lint", lint) - .addJob("test", test); - -export default pipeline; diff --git a/.fluentci/example/.fluentci/.fluentci/src/gitlab/pipeline_test.ts b/.fluentci/example/.fluentci/.fluentci/src/gitlab/pipeline_test.ts deleted file mode 100644 index ca247109..00000000 --- a/.fluentci/example/.fluentci/.fluentci/src/gitlab/pipeline_test.ts +++ /dev/null @@ -1,8 +0,0 @@ -import pipeline from "./pipeline.ts"; -import { assertEquals } from "https://deno.land/std@0.191.0/testing/asserts.ts"; - -Deno.test(function pipelineTest() { - const expected = Deno.readTextFileSync("./fixtures/.gitlab-ci.yml"); - const actual = pipeline.toString(); - assertEquals(actual, expected); -}); diff --git a/.fluentci/example/.fluentci/.github/workflows/ci.yml b/.fluentci/example/.fluentci/.github/workflows/ci.yml deleted file mode 100644 index f8521e3b..00000000 --- a/.fluentci/example/.fluentci/.github/workflows/ci.yml +++ /dev/null @@ -1,28 +0,0 @@ -# Do not edit this file directly. It is generated by Fluent Github Actions - -name: Codecov -on: - push: - branches: - - main -jobs: - tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: denoland/setup-deno@v1 - with: - deno-version: v1.37 - - name: Setup Fluent CI CLI - run: deno install -A -r https://cli.fluentci.io -n fluentci - - name: Setup Dagger - run: | - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - sudo mv bin/dagger /usr/local/bin - dagger version - - name: Run Dagger Pipelines - run: dagger run fluentci . fmt lint test - - name: Upload to Codecov - run: dagger run fluentci codecov_pipeline - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.fluentci/example/.fluentci/.github/workflows/example.yml b/.fluentci/example/.fluentci/.github/workflows/example.yml deleted file mode 100644 index 7a38ed15..00000000 --- a/.fluentci/example/.fluentci/.github/workflows/example.yml +++ /dev/null @@ -1,25 +0,0 @@ -# Do not edit this file directly. It is generated by https://deno.land/x/fluent_github_actions - -name: Example -on: - push: - branches: - - main -jobs: - tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: denoland/setup-deno@v1 - with: - deno-version: v1.37 - - name: Setup Fluent CI CLI - run: deno install -A -r https://cli.fluentci.io -n fluentci - - name: Setup Dagger - run: | - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - sudo mv bin/dagger /usr/local/bin - dagger version - - name: Run Dagger Pipelines - run: dagger run deno run -A ../src/dagger/runner.ts - working-directory: example diff --git a/.fluentci/example/.fluentci/.github/workflows/zenith.yml b/.fluentci/example/.fluentci/.github/workflows/zenith.yml deleted file mode 100644 index 2a34f74e..00000000 --- a/.fluentci/example/.fluentci/.github/workflows/zenith.yml +++ /dev/null @@ -1,23 +0,0 @@ -# Do not edit this file directly. It is generated by https://deno.land/x/fluent_github_actions - -name: Zenith Example -on: - push: - branches: - - zenith - -jobs: - tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Setup Dagger Zenith - run: | - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.8 sh - sudo mv bin/dagger /usr/local/bin - dagger version - - name: Run Dagger Pipelines - run: | - dagger query --doc build.gql - dagger query --doc test.gql - working-directory: example diff --git a/.fluentci/example/.fluentci/CODE_OF_CONDUCT.md b/.fluentci/example/.fluentci/CODE_OF_CONDUCT.md deleted file mode 100644 index 2c88d024..00000000 --- a/.fluentci/example/.fluentci/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,132 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -We as members, contributors, and leaders pledge to make participation in our -community a harassment-free experience for everyone, regardless of age, body -size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socio-economic status, -nationality, personal appearance, race, caste, color, religion, or sexual -identity and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, -diverse, inclusive, and healthy community. - -## Our Standards - -Examples of behavior that contributes to a positive environment for our -community include: - -- Demonstrating empathy and kindness toward other people -- Being respectful of differing opinions, viewpoints, and experiences -- Giving and gracefully accepting constructive feedback -- Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience -- Focusing on what is best not just for us as individuals, but for the overall - community - -Examples of unacceptable behavior include: - -- The use of sexualized language or imagery, and sexual attention or advances of - any kind -- Trolling, insulting or derogatory comments, and personal or political attacks -- Public or private harassment -- Publishing others' private information, such as a physical or email address, - without their explicit permission -- Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Enforcement Responsibilities - -Community leaders are responsible for clarifying and enforcing our standards of -acceptable behavior and will take appropriate and fair corrective action in -response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. - -Community leaders have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, and will communicate reasons for moderation -decisions when appropriate. - -## Scope - -This Code of Conduct applies within all community spaces, and also applies when -an individual is officially representing the community in public spaces. -Examples of representing our community include using an official e-mail address, -posting via an official social media account, or acting as an appointed -representative at an online or offline event. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at -[GitHub Issues](https://github.com/fluent-ci-templates/rust-pipeline/issues). -All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. - -## Enforcement Guidelines - -Community leaders will follow these Community Impact Guidelines in determining -the consequences for any action they deem in violation of this Code of Conduct: - -### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed -unprofessional or unwelcome in the community. - -**Consequence**: A private, written warning from community leaders, providing -clarity around the nature of the violation and an explanation of why the -behavior was inappropriate. A public apology may be requested. - -### 2. Warning - -**Community Impact**: A violation through a single incident or series of -actions. - -**Consequence**: A warning with consequences for continued behavior. No -interaction with the people involved, including unsolicited interaction with -those enforcing the Code of Conduct, for a specified period of time. This -includes avoiding interactions in community spaces as well as external channels -like social media. Violating these terms may lead to a temporary or permanent -ban. - -### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including -sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public -communication with the community for a specified period of time. No public or -private interaction with the people involved, including unsolicited interaction -with those enforcing the Code of Conduct, is allowed during this period. -Violating these terms may lead to a permanent ban. - -### 4. Permanent Ban - -**Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an -individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within the -community. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 2.1, available at -[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. - -Community Impact Guidelines were inspired by -[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. - -For answers to common questions about this code of conduct, see the FAQ at -[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at -[https://www.contributor-covenant.org/translations][translations]. - -[homepage]: https://www.contributor-covenant.org -[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html -[Mozilla CoC]: https://github.com/mozilla/diversity -[FAQ]: https://www.contributor-covenant.org/faq -[translations]: https://www.contributor-covenant.org/translations diff --git a/.fluentci/example/.fluentci/CONTRIBUTING.md b/.fluentci/example/.fluentci/CONTRIBUTING.md deleted file mode 100644 index e50de724..00000000 --- a/.fluentci/example/.fluentci/CONTRIBUTING.md +++ /dev/null @@ -1,70 +0,0 @@ -# Contributing Guidelines - -Thank you for your interest in contributing to our project. Whether it's a bug -report, new feature, correction, or additional documentation, we greatly value -feedback and contributions from our community. - -Please read through this document before submitting any issues or pull requests -to ensure we have all the necessary information to effectively respond to your -bug report or contribution. - -## Reporting Bugs/Feature Requests - -We welcome you to use the GitHub issue tracker to report bugs or suggest -features. - -When filing an issue, please check existing open, or recently closed, issues to -make sure somebody else hasn't already reported the issue. Please try to include -as much information as you can. Details like these are incredibly useful: - -- A reproducible test case or series of steps -- The version of our code being used -- Any modifications you've made relevant to the bug -- Anything unusual about your environment or deployment - -## Contributing via Pull Requests - -Contributions via pull requests are much appreciated. Before sending us a pull -request, please ensure that: - -1. You are working against the latest source on the _master_ branch. -2. You check existing open, and recently merged, pull requests to make sure - someone else hasn't addressed the problem already. -3. You open an issue to discuss any significant work - we would hate for your - time to be wasted. - -To send us a pull request, please: - -1. Fork the repository. -2. Modify the source; please focus on the specific change you are contributing. - If you also reformat all the code, it will be hard for us to focus on your - change. -3. Ensure local tests pass. -4. Commit to your fork using clear commit messages. -5. Send us a pull request, answering any default questions in the pull request - interface. -6. Pay attention to any automated CI failures reported in the pull request, and - stay involved in the conversation. - -GitHub provides additional document on -[forking a repository](https://help.github.com/articles/fork-a-repo/) and -[creating a pull request](https://help.github.com/articles/creating-a-pull-request/). - -## Finding contributions to work on - -Looking at the existing issues is a great way to find something to contribute -on. As our projects, by default, use the default GitHub issue labels -(enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any -'help wanted' issues is a great place to start. - -## Code of Conduct - -This project has adopted the -[Contributor Covenant](https://www.contributor-covenant.org/), version 2.1, -available at -https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. - -## Licensing - -See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to -confirm the licensing of your contribution. diff --git a/.fluentci/example/.fluentci/LICENSE b/.fluentci/example/.fluentci/LICENSE deleted file mode 100644 index d9ab36a4..00000000 --- a/.fluentci/example/.fluentci/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2023 Tsiry Sandratraina - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/.fluentci/example/.fluentci/README.md b/.fluentci/example/.fluentci/README.md deleted file mode 100644 index bd5e36cb..00000000 --- a/.fluentci/example/.fluentci/README.md +++ /dev/null @@ -1,61 +0,0 @@ -# Rust Pipeline - -[![fluentci pipeline](https://img.shields.io/badge/dynamic/json?label=pkg.fluentci.io&labelColor=%23000&color=%23460cf1&url=https%3A%2F%2Fapi.fluentci.io%2Fv1%2Fpipeline%2Frust_pipeline&query=%24.version)](https://pkg.fluentci.io/rust_pipeline) -[![deno module](https://shield.deno.dev/x/rust_pipeline)](https://deno.land/x/rust_pipeline) -![deno compatibility](https://shield.deno.dev/deno/^1.34) -[![](https://img.shields.io/codecov/c/gh/fluent-ci-templates/rust-pipeline)](https://codecov.io/gh/fluent-ci-templates/rust-pipeline) - -A ready-to-use CI/CD Pipeline for your Rust projects. -## ๐Ÿš€ Usage - -Run the following command in your Rust Project: - -```bash -fluentci run rust_pipeline -``` - -Or if you want to run specific jobs: - -```bash -fluentci run rust_pipeline test build -``` - - -if you want to use it as a template: - -```bash -fluentci init -t rust -``` - -This will create a `.fluentci` folder in your project. - -Now you can run the pipeline with: - -```bash -fluentci run . -``` - -## Jobs - -| Job | Description | -| ----- | ------------------ | -| build | build your project | -| test | Run your tests | - -## Programmatic usage - -You can also use this pipeline programmatically: - -```ts -import Client, { connect } from "https://sdk.fluentci.io/v0.1.9/mod.ts"; -import { build, test } from "https://pkg.fluentci.io/rust_pipeline@v0.5.2/mod.ts"; - -function pipeline(src = ".") { - connect(async (client: Client) => { - await test(client, src); - await build(client, src); - }); -} - -pipeline(); -``` diff --git a/.fluentci/example/.fluentci/ci.ts b/.fluentci/example/.fluentci/ci.ts deleted file mode 100644 index d07da87b..00000000 --- a/.fluentci/example/.fluentci/ci.ts +++ /dev/null @@ -1,14 +0,0 @@ -import Client, { connect } from "https://sdk.fluentci.io/v0.1.9/mod.ts"; -import { - build, - test, -} from "https://pkg.fluentci.io/rust_pipeline@v0.5.2/mod.ts"; - -function pipeline(src = ".") { - connect(async (client: Client) => { - await test(client, src); - await build(client, src); - }); -} - -pipeline(); diff --git a/.fluentci/example/.fluentci/dagger.json b/.fluentci/example/.fluentci/dagger.json deleted file mode 100644 index ded6aaf7..00000000 --- a/.fluentci/example/.fluentci/dagger.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "root": "", - "name": "rust", - "sdkRuntime": "tsiry/dagger-sdk-deno" -} \ No newline at end of file diff --git a/.fluentci/example/.fluentci/deno.json b/.fluentci/example/.fluentci/deno.json deleted file mode 100644 index e0e77b55..00000000 --- a/.fluentci/example/.fluentci/deno.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "importMap": "import_map.json", - "tasks": { - "esm:add": "deno run -A https://esm.sh/v128 add", - "esm:update": "deno run -A https://esm.sh/v128 update", - "esm:remove": "deno run -A https://esm.sh/v128 remove", - "schema": "deno run -A src/dagger/schema.ts", - "clean": "rm -rf gen schema.graphql" - }, - "fmt": { - "exclude": [ - "example/", - ".fluentci/", - "gen/" - ] - }, - "lint": { - "exclude": [ - "example/", - ".fluentci/", - "gen/" - ] - }, - "test": { - "exclude": [ - "example/", - ".fluentci/", - "gen/" - ] - } -} \ No newline at end of file diff --git a/.fluentci/example/.fluentci/deno.lock b/.fluentci/example/.fluentci/deno.lock deleted file mode 100644 index c20ee47d..00000000 --- a/.fluentci/example/.fluentci/deno.lock +++ /dev/null @@ -1,264 +0,0 @@ -{ - "version": "3", - "packages": { - "specifiers": { - "npm:nexus": "npm:nexus@1.3.0_graphql@16.8.1" - }, - "npm": { - "graphql@16.8.1": { - "integrity": "sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw==", - "dependencies": {} - }, - "iterall@1.3.0": { - "integrity": "sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==", - "dependencies": {} - }, - "nexus@1.3.0_graphql@16.8.1": { - "integrity": "sha512-w/s19OiNOs0LrtP7pBmD9/FqJHvZLmCipVRt6v1PM8cRUYIbhEswyNKGHVoC4eHZGPSnD+bOf5A3+gnbt0A5/A==", - "dependencies": { - "graphql": "graphql@16.8.1", - "iterall": "iterall@1.3.0", - "tslib": "tslib@2.6.2" - } - }, - "tslib@2.6.2": { - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dependencies": {} - } - } - }, - "remote": { - "https://cdn.jsdelivr.net/gh/tsirysndr/tar@v0.1.1/deps.ts": "096395daebc7ed8a18f0484e4ffcc3a7f70e50946735f7df9611a7fcfd8272cc", - "https://cdn.jsdelivr.net/gh/tsirysndr/tar@v0.1.1/mod.ts": "e269d71c72ae68e82c1960e5db2a0c7419c97c9683ef717de0ab75d90f364713", - "https://cdn.jsdelivr.net/gh/tsirysndr/tar@v0.1.1/src/tar.ts": "9b02eaaa784b225ad7a23d2769cd492adf113ea7c11c02e3646849e98f4ae43b", - "https://deno.land/std@0.129.0/_util/assert.ts": "e94f2eb37cebd7f199952e242c77654e43333c1ac4c5c700e929ea3aa5489f74", - "https://deno.land/std@0.129.0/_util/os.ts": "49b92edea1e82ba295ec946de8ffd956ed123e2948d9bd1d3e901b04e4307617", - "https://deno.land/std@0.129.0/archive/tar.ts": "35ea1baddec7988cc4034765a2cee7613bc8074bd40940d3f5e98f63070a716a", - "https://deno.land/std@0.129.0/async/abortable.ts": "a896ac6b0d4237bd2d2d248217cfa1f0d85ccda93cb25ebda55e33850e526be6", - "https://deno.land/std@0.129.0/async/deadline.ts": "48ac998d7564969f3e6ec6b6f9bf0217ebd00239b1b2292feba61272d5dd58d0", - "https://deno.land/std@0.129.0/async/debounce.ts": "564273ef242bcfcda19a439132f940db8694173abffc159ea34f07d18fc42620", - "https://deno.land/std@0.129.0/async/deferred.ts": "bc18e28108252c9f67dfca2bbc4587c3cbf3aeb6e155f8c864ca8ecff992b98a", - "https://deno.land/std@0.129.0/async/delay.ts": "cbbdf1c87d1aed8edc7bae13592fb3e27e3106e0748f089c263390d4f49e5f6c", - "https://deno.land/std@0.129.0/async/mod.ts": "2240c6841157738414331f47dee09bb8c0482c5b1980b6e3234dd03515c8132f", - "https://deno.land/std@0.129.0/async/mux_async_iterator.ts": "f4d1d259b0c694d381770ddaaa4b799a94843eba80c17f4a2ec2949168e52d1e", - "https://deno.land/std@0.129.0/async/pool.ts": "97b0dd27c69544e374df857a40902e74e39532f226005543eabacb551e277082", - "https://deno.land/std@0.129.0/async/tee.ts": "1341feb1f5b1a96f8628d0f8fc07d8c43d3813423f18a63bf1b4785568d21b1f", - "https://deno.land/std@0.129.0/bytes/bytes_list.ts": "67eb118e0b7891d2f389dad4add35856f4ad5faab46318ff99653456c23b025d", - "https://deno.land/std@0.129.0/bytes/equals.ts": "fc16dff2090cced02497f16483de123dfa91e591029f985029193dfaa9d894c9", - "https://deno.land/std@0.129.0/bytes/mod.ts": "d3b455c0dbd4804644159d1e25946ade5ee385d2359894de49e2c6101b18b7a9", - "https://deno.land/std@0.129.0/encoding/base64.ts": "c8c16b4adaa60d7a8eee047c73ece26844435e8f7f1328d74593dbb2dd58ea4f", - "https://deno.land/std@0.129.0/encoding/base64url.ts": "55f9d13df02efac10c6f96169daa3e702606a64e8aa27c0295f645f198c27130", - "https://deno.land/std@0.129.0/fmt/colors.ts": "30455035d6d728394781c10755351742dd731e3db6771b1843f9b9e490104d37", - "https://deno.land/std@0.129.0/fmt/printf.ts": "e2c0f72146aed1efecf0c39ab928b26ae493a2278f670a871a0fbdcf36ff3379", - "https://deno.land/std@0.129.0/fs/_util.ts": "0fb24eb4bfebc2c194fb1afdb42b9c3dda12e368f43e8f2321f84fc77d42cb0f", - "https://deno.land/std@0.129.0/fs/ensure_dir.ts": "9dc109c27df4098b9fc12d949612ae5c9c7169507660dcf9ad90631833209d9d", - "https://deno.land/std@0.129.0/fs/ensure_file.ts": "7d353e64fee3d4d1e7c6b6726a2a5e987ba402c15fb49566309042887349c545", - "https://deno.land/std@0.129.0/io/buffer.ts": "bd0c4bf53db4b4be916ca5963e454bddfd3fcd45039041ea161dbf826817822b", - "https://deno.land/std@0.129.0/io/files.ts": "d199ef64e918a256320ba8d8d44ae91de87c9077df8f8d6cca013f1b9fbbe285", - "https://deno.land/std@0.129.0/io/readers.ts": "679471f3b9929b54393c9cd75b6bd178b4bc6d9aab5c0f1f9538f862cf4746fe", - "https://deno.land/std@0.129.0/io/util.ts": "078da53bba767bec0d45f7da44411f6dbf269e51ef7fcfea5e3714e04681c674", - "https://deno.land/std@0.129.0/node/_buffer.mjs": "f4a7df481d4eed06dc0151b833177d8ef74fc3a96dd4d2b073e690b6ced9474d", - "https://deno.land/std@0.129.0/node/_core.ts": "568d277be2e086af996cbdd599fec569f5280e9a494335ca23ad392b130d7bb9", - "https://deno.land/std@0.129.0/node/_events.mjs": "c0e3e0e290a8b81fee9d2973a529c8dcd5ebb4406782d1f91085274e2cb8490f", - "https://deno.land/std@0.129.0/node/_fixed_queue.ts": "455b3c484de48e810b13bdf95cd1658ecb1ba6bcb8b9315ffe994efcde3ba5f5", - "https://deno.land/std@0.129.0/node/_next_tick.ts": "64c361f6bca21df2a72dd77b84bd49d80d97a694dd3080703bc78f52146351d1", - "https://deno.land/std@0.129.0/node/_process/exiting.ts": "bc9694769139ffc596f962087155a8bfef10101d03423b9dcbc51ce6e1f88fce", - "https://deno.land/std@0.129.0/node/_util/_util_callbackify.ts": "79928ad80df3e469f7dcdb198118a7436d18a9f6c08bd7a4382332ad25a718cf", - "https://deno.land/std@0.129.0/node/_utils.ts": "c2c352e83c4c96f5ff994b1c8246bff2abcb21bfc3f1c06162cb3af1d201e615", - "https://deno.land/std@0.129.0/node/buffer.ts": "fbecbf3f237fa49bec96e97ecf56a7b92d48037b3d11219288e68943cc921600", - "https://deno.land/std@0.129.0/node/events.ts": "a1d40fc0dbccc944379ef968b80ea08f9fce579e88b5057fdb64e4f0812476dd", - "https://deno.land/std@0.129.0/node/internal/buffer.mjs": "6662fe7fe517329453545be34cea27a24f8ccd6d09afd4f609f11ade2b6dfca7", - "https://deno.land/std@0.129.0/node/internal/crypto/keys.ts": "16ce7b15a9fc5e4e3dee8fde75dae12f3d722558d5a1a6e65a9b4f86d64a21e9", - "https://deno.land/std@0.129.0/node/internal/crypto/util.mjs": "1de55a47fdbed6721b467a77ba48fdd1550c10b5eee77bbdb602eaffee365a5e", - "https://deno.land/std@0.129.0/node/internal/error_codes.ts": "ac03c4eae33de3a69d6c98e8678003207eecf75a6900eb847e3fea3c8c9e6d8f", - "https://deno.land/std@0.129.0/node/internal/errors.ts": "0d3a1eb03b654beb29b8354759a6902f45a840d4f957e9a3c632a24ce4c32632", - "https://deno.land/std@0.129.0/node/internal/hide_stack_frames.ts": "a91962ec84610bc7ec86022c4593cdf688156a5910c07b5bcd71994225c13a03", - "https://deno.land/std@0.129.0/node/internal/normalize_encoding.mjs": "3779ec8a7adf5d963b0224f9b85d1bc974a2ec2db0e858396b5d3c2c92138a0a", - "https://deno.land/std@0.129.0/node/internal/util.mjs": "684653b962fae84fd2bc08997291b1a50bed09b95dcfa7d35e3c4143163e879a", - "https://deno.land/std@0.129.0/node/internal/util/comparisons.ts": "680b55fe8bdf1613633bc469fa0440f43162c76dbe36af9aa2966310e1bb9f6e", - "https://deno.land/std@0.129.0/node/internal/util/debuglog.ts": "99e91bdf26f6c67861031f684817e1705a5bc300e81346585b396f413387edfb", - "https://deno.land/std@0.129.0/node/internal/util/inspect.mjs": "d1c2569c66a3dab45eec03208f22ad4351482527859c0011a28a6c797288a0aa", - "https://deno.land/std@0.129.0/node/internal/util/types.ts": "b2dacb8f1f5d28a51c4da5c5b75172b7fcf694073ce95ca141323657e18b0c60", - "https://deno.land/std@0.129.0/node/internal/validators.mjs": "a7e82eafb7deb85c332d5f8d9ffef052f46a42d4a121eada4a54232451acc49a", - "https://deno.land/std@0.129.0/node/internal_binding/_libuv_winerror.ts": "801e05c2742ae6cd42a5f0fd555a255a7308a65732551e962e5345f55eedc519", - "https://deno.land/std@0.129.0/node/internal_binding/_node.ts": "e4075ba8a37aef4eb5b592c8e3807c39cb49ca8653faf8e01a43421938076c1b", - "https://deno.land/std@0.129.0/node/internal_binding/_utils.ts": "1c50883b5751a9ea1b38951e62ed63bacfdc9d69ea665292edfa28e1b1c5bd94", - "https://deno.land/std@0.129.0/node/internal_binding/_winerror.ts": "8811d4be66f918c165370b619259c1f35e8c3e458b8539db64c704fbde0a7cd2", - "https://deno.land/std@0.129.0/node/internal_binding/buffer.ts": "722c62b85f966e0777b2d98c021b60e75d7f2c2dabc43413ef37d60dbd13a5d9", - "https://deno.land/std@0.129.0/node/internal_binding/constants.ts": "aff06aac49eda4234bd3a2b0b8e1fbfc67824e281c532ff9960831ab503014cc", - "https://deno.land/std@0.129.0/node/internal_binding/string_decoder.ts": "5cb1863763d1e9b458bc21d6f976f16d9c18b3b3f57eaf0ade120aee38fba227", - "https://deno.land/std@0.129.0/node/internal_binding/types.ts": "4c26fb74ba2e45de553c15014c916df6789529a93171e450d5afb016b4c765e7", - "https://deno.land/std@0.129.0/node/internal_binding/util.ts": "90364292e2bd598ab5d105b48ca49817b6708f2d1d9cbaf08b2b3ab5ca4c90a7", - "https://deno.land/std@0.129.0/node/internal_binding/uv.ts": "3821bc5e676d6955d68f581988c961d77dd28190aba5a9c59f16001a4deb34ba", - "https://deno.land/std@0.129.0/node/util.ts": "7fd6933b37af89a8e64d73dc6ee1732455a59e7e6d0965311fbd73cd634ea630", - "https://deno.land/std@0.129.0/node/util/types.mjs": "f9288198cacd374b41bae7e92a23179d3160f4c0eaf14e19be3a4e7057219a60", - "https://deno.land/std@0.129.0/path/_constants.ts": "df1db3ffa6dd6d1252cc9617e5d72165cd2483df90e93833e13580687b6083c3", - "https://deno.land/std@0.129.0/path/_interface.ts": "ee3b431a336b80cf445441109d089b70d87d5e248f4f90ff906820889ecf8d09", - "https://deno.land/std@0.129.0/path/_util.ts": "c1e9686d0164e29f7d880b2158971d805b6e0efc3110d0b3e24e4b8af2190d2b", - "https://deno.land/std@0.129.0/path/common.ts": "bee563630abd2d97f99d83c96c2fa0cca7cee103e8cb4e7699ec4d5db7bd2633", - "https://deno.land/std@0.129.0/path/glob.ts": "cb5255638de1048973c3e69e420c77dc04f75755524cb3b2e160fe9277d939ee", - "https://deno.land/std@0.129.0/path/mod.ts": "4275129bb766f0e475ecc5246aa35689eeade419d72a48355203f31802640be7", - "https://deno.land/std@0.129.0/path/posix.ts": "663e4a6fe30a145f56aa41a22d95114c4c5582d8b57d2d7c9ed27ad2c47636bb", - "https://deno.land/std@0.129.0/path/separator.ts": "fe1816cb765a8068afb3e8f13ad272351c85cbc739af56dacfc7d93d710fe0f9", - "https://deno.land/std@0.129.0/path/win32.ts": "e7bdf63e8d9982b4d8a01ef5689425c93310ece950e517476e22af10f41a136e", - "https://deno.land/std@0.129.0/streams/conversion.ts": "712585bfa0172a97fb68dd46e784ae8ad59d11b88079d6a4ab098ff42e697d21", - "https://deno.land/std@0.129.0/testing/_diff.ts": "9d849cd6877694152e01775b2d93f9d6b7aef7e24bfe3bfafc4d7a1ac8e9f392", - "https://deno.land/std@0.129.0/testing/asserts.ts": "0a95d9e8076dd3e7f0eeb605a67c148078b4b11f4abcd5eef115b0361b0736a2", - "https://deno.land/std@0.150.0/media_types/_util.ts": "ce9b4fc4ba1c447dafab619055e20fd88236ca6bdd7834a21f98bd193c3fbfa1", - "https://deno.land/std@0.150.0/media_types/mod.ts": "2d4b6f32a087029272dc59e0a55ae3cc4d1b27b794ccf528e94b1925795b3118", - "https://deno.land/std@0.150.0/media_types/vendor/mime-db.v1.52.0.ts": "724cee25fa40f1a52d3937d6b4fbbfdd7791ff55e1b7ac08d9319d5632c7f5af", - "https://deno.land/std@0.191.0/fmt/colors.ts": "d67e3cd9f472535241a8e410d33423980bec45047e343577554d3356e1f0ef4e", - "https://deno.land/std@0.191.0/testing/_diff.ts": "1a3c044aedf77647d6cac86b798c6417603361b66b54c53331b312caeb447aea", - "https://deno.land/std@0.191.0/testing/_format.ts": "a69126e8a469009adf4cf2a50af889aca364c349797e63174884a52ff75cf4c7", - "https://deno.land/std@0.191.0/testing/asserts.ts": "e16d98b4d73ffc4ed498d717307a12500ae4f2cbe668f1a215632d19fcffc22f", - "https://deno.land/std@0.203.0/assert/assert.ts": "9a97dad6d98c238938e7540736b826440ad8c1c1e54430ca4c4e623e585607ee", - "https://deno.land/std@0.203.0/assert/assertion_error.ts": "4d0bde9b374dfbcbe8ac23f54f567b77024fb67dbb1906a852d67fe050d42f56", - "https://deno.land/std@0.203.0/path/_basename.ts": "057d420c9049821f983f784fd87fa73ac471901fb628920b67972b0f44319343", - "https://deno.land/std@0.203.0/path/_constants.ts": "e49961f6f4f48039c0dfed3c3f93e963ca3d92791c9d478ac5b43183413136e0", - "https://deno.land/std@0.203.0/path/_dirname.ts": "355e297236b2218600aee7a5301b937204c62e12da9db4b0b044993d9e658395", - "https://deno.land/std@0.203.0/path/_extname.ts": "eaaa5aae1acf1f03254d681bd6a8ce42a9cb5b7ff2213a9d4740e8ab31283664", - "https://deno.land/std@0.203.0/path/_format.ts": "4a99270d6810f082e614309164fad75d6f1a483b68eed97c830a506cc589f8b4", - "https://deno.land/std@0.203.0/path/_from_file_url.ts": "6eadfae2e6f63ad9ee46b26db4a1b16583055c0392acedfb50ed2fc694b6f581", - "https://deno.land/std@0.203.0/path/_interface.ts": "6471159dfbbc357e03882c2266d21ef9afdb1e4aa771b0545e90db58a0ba314b", - "https://deno.land/std@0.203.0/path/_is_absolute.ts": "05dac10b5e93c63198b92e3687baa2be178df5321c527dc555266c0f4f51558c", - "https://deno.land/std@0.203.0/path/_join.ts": "815f5e85b042285175b1492dd5781240ce126c23bd97bad6b8211fe7129c538e", - "https://deno.land/std@0.203.0/path/_normalize.ts": "a19ec8706b2707f9dd974662a5cd89fad438e62ab1857e08b314a8eb49a34d81", - "https://deno.land/std@0.203.0/path/_os.ts": "30b0c2875f360c9296dbe6b7f2d528f0f9c741cecad2e97f803f5219e91b40a2", - "https://deno.land/std@0.203.0/path/_parse.ts": "0f9b0ff43682dd9964eb1c4398610c4e165d8db9d3ac9d594220217adf480cfa", - "https://deno.land/std@0.203.0/path/_relative.ts": "27bdeffb5311a47d85be26d37ad1969979359f7636c5cd9fcf05dcd0d5099dc5", - "https://deno.land/std@0.203.0/path/_resolve.ts": "7a3616f1093735ed327e758313b79c3c04ea921808ca5f19ddf240cb68d0adf6", - "https://deno.land/std@0.203.0/path/_to_file_url.ts": "a141e4a525303e1a3a0c0571fd024552b5f3553a2af7d75d1ff3a503dcbb66d8", - "https://deno.land/std@0.203.0/path/_to_namespaced_path.ts": "0d5f4caa2ed98ef7a8786286df6af804b50e38859ae897b5b5b4c8c5930a75c8", - "https://deno.land/std@0.203.0/path/_util.ts": "4e191b1bac6b3bf0c31aab42e5ca2e01a86ab5a0d2e08b75acf8585047a86221", - "https://deno.land/std@0.203.0/path/basename.ts": "bdfa5a624c6a45564dc6758ef2077f2822978a6dbe77b0a3514f7d1f81362930", - "https://deno.land/std@0.203.0/path/common.ts": "ee7505ab01fd22de3963b64e46cff31f40de34f9f8de1fff6a1bd2fe79380000", - "https://deno.land/std@0.203.0/path/dirname.ts": "b6533f4ee4174a526dec50c279534df5345836dfdc15318400b08c62a62a39dd", - "https://deno.land/std@0.203.0/path/extname.ts": "62c4b376300795342fe1e4746c0de518b4dc9c4b0b4617bfee62a2973a9555cf", - "https://deno.land/std@0.203.0/path/format.ts": "110270b238514dd68455a4c54956215a1aff7e37e22e4427b7771cefe1920aa5", - "https://deno.land/std@0.203.0/path/from_file_url.ts": "9f5cb58d58be14c775ec2e57fc70029ac8b17ed3bd7fe93e475b07280adde0ac", - "https://deno.land/std@0.203.0/path/glob.ts": "593e2c3573883225c25c5a21aaa8e9382a696b8e175ea20a3b6a1471ad17aaed", - "https://deno.land/std@0.203.0/path/is_absolute.ts": "0b92eb35a0a8780e9f16f16bb23655b67dace6a8e0d92d42039e518ee38103c1", - "https://deno.land/std@0.203.0/path/join.ts": "31c5419f23d91655b08ec7aec403f4e4cd1a63d39e28f6e42642ea207c2734f8", - "https://deno.land/std@0.203.0/path/mod.ts": "6e1efb0b13121463aedb53ea51dabf5639a3172ab58c89900bbb72b486872532", - "https://deno.land/std@0.203.0/path/normalize.ts": "6ea523e0040979dd7ae2f1be5bf2083941881a252554c0f32566a18b03021955", - "https://deno.land/std@0.203.0/path/parse.ts": "be8de342bb9e1924d78dc4d93c45215c152db7bf738ec32475560424b119b394", - "https://deno.land/std@0.203.0/path/posix.ts": "0a1c1952d132323a88736d03e92bd236f3ed5f9f079e5823fae07c8d978ee61b", - "https://deno.land/std@0.203.0/path/relative.ts": "8bedac226afd360afc45d451a6c29fabceaf32978526bcb38e0c852661f66c61", - "https://deno.land/std@0.203.0/path/resolve.ts": "133161e4949fc97f9ca67988d51376b0f5eef8968a6372325ab84d39d30b80dc", - "https://deno.land/std@0.203.0/path/separator.ts": "40a3e9a4ad10bef23bc2cd6c610291b6c502a06237c2c4cd034a15ca78dedc1f", - "https://deno.land/std@0.203.0/path/to_file_url.ts": "00e6322373dd51ad109956b775e4e72e5f9fa68ce2c6b04e4af2a6eed3825d31", - "https://deno.land/std@0.203.0/path/to_namespaced_path.ts": "1b1db3055c343ab389901adfbda34e82b7386bcd1c744d54f9c1496ee0fd0c3d", - "https://deno.land/std@0.203.0/path/win32.ts": "8b3f80ef7a462511d5e8020ff490edcaa0a0d118f1b1e9da50e2916bdd73f9dd", - "https://deno.land/std@0.52.0/fmt/colors.ts": "ec9d653672a9a3c7b6eafe53c5bc797364a2db2dcf766ab649c1155fea7a80b2", - "https://deno.land/x/crc32@v0.2.0/mod.ts": "de7a3fa2d4ef24b96fc21e1cc4d2d65d1d2b1dcea92f63960e3e11bfa82df0fa", - "https://deno.land/x/fluent_aws_codepipeline@v0.2.3/mod.ts": "79cc758901d20a3573d7e3cc2db9f0a5fe56833f4d9befcedc072b94d542eec7", - "https://deno.land/x/fluent_aws_codepipeline@v0.2.3/src/buildspec.ts": "fb07cbbf9473586cea66c0c508412080c2d4ba4e7f4ea0985661afeed445710b", - "https://deno.land/x/fluent_aws_codepipeline@v0.2.3/src/spec.ts": "c0ce4c6e2685e23a3abdeb9fc18012253199dae355b06189d8248b052301a63e", - "https://deno.land/x/fluent_azure_pipelines@v0.2.0/mod.ts": "6f3c62419b96251dd1b5d8d6a172c0a8724a73b7feec786e540f51f0c8a0f0fd", - "https://deno.land/x/fluent_azure_pipelines@v0.2.0/src/config.ts": "619f4c64dad9b510c5788d4939a8afe013cb7dfc993dfd32f2ff4d0a2140075e", - "https://deno.land/x/fluent_azure_pipelines@v0.2.0/src/spec.ts": "cab6e4a6afb0f16e6c406cfab87264a963734720c468532c4f778228d1f1758d", - "https://deno.land/x/fluent_circleci@v0.2.5/mod.ts": "6a885bf35dbe08a7e971aa105763d724dd2a09c237b6292c9cd5de540237af37", - "https://deno.land/x/fluent_circleci@v0.2.5/src/config.ts": "d7e9902b4c2fddfa61ff6a509f3a09adee161fae9f93029dcbc8ec7a7bbd990b", - "https://deno.land/x/fluent_circleci@v0.2.5/src/job.ts": "b6ffb66ef10cf0e26460a88e1614ef864b606571e8d72376eeb09254f66a9926", - "https://deno.land/x/fluent_circleci@v0.2.5/src/spec.ts": "eda462e9ff535dbc7d3eb7e47253948d40ebaaf34d964e0931a6a25cdd823736", - "https://deno.land/x/fluent_github_actions@v0.2.1/mod.ts": "dc62b622791da77bc27f68e33cba618983a0770a9a12dcc9e0f9a61161bb90e5", - "https://deno.land/x/fluent_github_actions@v0.2.1/src/event.ts": "d44d42356a04aea7ba64ff9e9a12090f477605c27a940bbf80aba612e4e96d1e", - "https://deno.land/x/fluent_github_actions@v0.2.1/src/job_spec.ts": "93aa5b8b79cd8baaf875901322c4c38c27d4458439a831cb0ad86401b207a3dc", - "https://deno.land/x/fluent_github_actions@v0.2.1/src/step_spec.ts": "b399949d1fd9c45873cdda70d82c92e3d9d96ba9a1d5749f3010a1f242b20e35", - "https://deno.land/x/fluent_github_actions@v0.2.1/src/workflow.ts": "c9e3b7b3a59f7edff958eae8f27a8542f2a24889ea27c8aa016d0c0b0ca416c6", - "https://deno.land/x/fluent_github_actions@v0.2.1/src/workflow_spec.ts": "b5c696dc70ee3f777a565197c6a3a379d87d026e12d59942fef5b9dc72124c3a", - "https://deno.land/x/fluent_gitlab_ci@v0.4.2/mod.ts": "3becefe569f5c9814dffa1b534794a42b948481753a5903fa1b48d5337206ced", - "https://deno.land/x/fluent_gitlab_ci@v0.4.2/src/environment.ts": "f12ee4fb50e5100fccec29dc1d35aa430bfe8373e84286a8ab9f7b8e178f14e3", - "https://deno.land/x/fluent_gitlab_ci@v0.4.2/src/gitlabci.ts": "ef36465c41412ae94b919cfcb80b99ec1c04536dbf42ad09cd73abf3ea4d52a6", - "https://deno.land/x/fluent_gitlab_ci@v0.4.2/src/gitlabci_spec.ts": "37f4ecef3ea414f57c54a360bc0178f5fad21b4a9db59d29d1961cd368febaed", - "https://deno.land/x/fluent_gitlab_ci@v0.4.2/src/index.ts": "b5e374a24e3bca1d6fead0861f2c1b1e09e087a17e59297263f681ee71c972fe", - "https://deno.land/x/fluent_gitlab_ci@v0.4.2/src/job.ts": "65a5be7f5816846919907aab00530044b571570a54a8a0bc967f4269a2ce99b7", - "https://deno.land/x/spinners@v1.1.2/mod.ts": "ed5b3562d4ea6c6887bc7e9844612b08a3bc3a3678ca77cc7dfdf461c362751e", - "https://deno.land/x/spinners@v1.1.2/spinner-types.ts": "c67e6962a0c738aa57b4d3ad9fe06c8c0131f93360acbf95456f2ba200fd8826", - "https://deno.land/x/spinners@v1.1.2/terminal-spinner.ts": "1cf0c38a423781734e2e538323c1992027830d741e90f0b81f532e5bc993d035", - "https://deno.land/x/spinners@v1.1.2/util.ts": "7083203bedbda2e6144a14a7dd093747a7a01e73d95637c888bae8ac22a1c58b", - "https://deno.land/x/xhr@0.3.0/mod.ts": "094aacd627fd9635cd942053bf8032b5223b909858fa9dc8ffa583752ff63b20", - "https://deno.land/x/zod@v3.22.1/ZodError.ts": "4de18ff525e75a0315f2c12066b77b5c2ae18c7c15ef7df7e165d63536fdf2ea", - "https://deno.land/x/zod@v3.22.1/errors.ts": "5285922d2be9700cc0c70c95e4858952b07ae193aa0224be3cbd5cd5567eabef", - "https://deno.land/x/zod@v3.22.1/external.ts": "a6cfbd61e9e097d5f42f8a7ed6f92f93f51ff927d29c9fbaec04f03cbce130fe", - "https://deno.land/x/zod@v3.22.1/helpers/enumUtil.ts": "54efc393cc9860e687d8b81ff52e980def00fa67377ad0bf8b3104f8a5bf698c", - "https://deno.land/x/zod@v3.22.1/helpers/errorUtil.ts": "7a77328240be7b847af6de9189963bd9f79cab32bbc61502a9db4fe6683e2ea7", - "https://deno.land/x/zod@v3.22.1/helpers/parseUtil.ts": "f791e6e65a0340d85ad37d26cd7a3ba67126cd9957eac2b7163162155283abb1", - "https://deno.land/x/zod@v3.22.1/helpers/partialUtil.ts": "998c2fe79795257d4d1cf10361e74492f3b7d852f61057c7c08ac0a46488b7e7", - "https://deno.land/x/zod@v3.22.1/helpers/typeAliases.ts": "0fda31a063c6736fc3cf9090dd94865c811dfff4f3cb8707b932bf937c6f2c3e", - "https://deno.land/x/zod@v3.22.1/helpers/util.ts": "8baf19b19b2fca8424380367b90364b32503b6b71780269a6e3e67700bb02774", - "https://deno.land/x/zod@v3.22.1/index.ts": "d27aabd973613985574bc31f39e45cb5d856aa122ef094a9f38a463b8ef1a268", - "https://deno.land/x/zod@v3.22.1/locales/en.ts": "a7a25cd23563ccb5e0eed214d9b31846305ddbcdb9c5c8f508b108943366ab4c", - "https://deno.land/x/zod@v3.22.1/mod.ts": "64e55237cb4410e17d968cd08975566059f27638ebb0b86048031b987ba251c4", - "https://deno.land/x/zod@v3.22.1/types.ts": "4edc1823385f446532c8c9f676d84550c6dc54b17135e34508576647d9612d0e", - "https://esm.sh/@dagger.io/dagger@0.8.4": "424bddc1457c1fc4975c978425730be068b5414e92dca7a64f2d80e2123c4719", - "https://esm.sh/graphql-tag@2.12.6": "2d8f017bc251d9e7346bafc3f3aef4b65f7fdc302c6e0d085e3359f44c893068", - "https://esm.sh/nanoid@4.0.2": "df5af492771eb7ed903cec5e5d8ff721bc75e6c09ddf9fc9263215c8497961f4", - "https://esm.sh/stringify-tree@1.1.1": "a0515b0f4fe97a6972047a588b7982592d9079e7aeac3323b0d26448a757cf84", - "https://esm.sh/v128/cross-fetch@3.1.8/denonext/cross-fetch.mjs": "8fba9e7c3fbaf0d2168beb63ce0cd21b5bfbfbd77e2fcbf8d957d533a71222f6", - "https://esm.sh/v128/graphql-request@6.1.0": "17f00c323eb825811ce14e2b0e88a0c873acb666c382ac963d1edeb03e01f372", - "https://esm.sh/v128/graphql-request@6.1.0/denonext/graphql-request.mjs": "0b15f49d44489423ae6f06004725b6d050b6359da4969e6569bd6ad45065bd94", - "https://esm.sh/v128/graphql@16.7.1/denonext/graphql.mjs": "418ad7c07b0f2d687f33b6275d3b5f317f4afbef1f462f318229f458dff45416", - "https://esm.sh/v128/yaml@2.3.1": "8ef3aee065e93b03cebf8fd5a3418bc30131344b7f2b8c8ae27bf9f277416087", - "https://esm.sh/v128/yaml@2.3.1/denonext/yaml.mjs": "71f677b4bfc69271af9d98db5194e354f9a1863955e208e26d32a9ef78bd89f5", - "https://esm.sh/v131/yaml@2.3.1": "1fe2490feb3d9c6d2c71c64dbdbed90acd4164b00628b3c68a311b6731ca38b5", - "https://esm.sh/v131/yaml@2.3.1/denonext/yaml.mjs": "71f677b4bfc69271af9d98db5194e354f9a1863955e208e26d32a9ef78bd89f5", - "https://esm.sh/v132/@dagger.io/dagger@0.8.4/denonext/dagger.mjs": "a090c18168360a715fcc7ff731cc6cf940e8d08b8a5b18fa80983b47666118a9", - "https://esm.sh/v132/adm-zip@0.5.10/denonext/adm-zip.mjs": "bcdc3b866e0817ac4f1b2a3021dd0a9aafa2c65f1fd254511706b7924fa8b0b7", - "https://esm.sh/v132/chownr@2.0.0/denonext/chownr.mjs": "30b8f17084dfbe475a5052b615f706b06ddd17dca0535103340d485c6b94e952", - "https://esm.sh/v132/cross-fetch@3.1.8/denonext/cross-fetch.mjs": "8fba9e7c3fbaf0d2168beb63ce0cd21b5bfbfbd77e2fcbf8d957d533a71222f6", - "https://esm.sh/v132/cross-spawn@7.0.3/denonext/cross-spawn.mjs": "7c92cdafd952c699fe01eb7a0c29c7cc112c546068ff757cb8832fa110499f11", - "https://esm.sh/v132/env-paths@3.0.0/denonext/env-paths.mjs": "77984a05eb16450087f25060a070ed500ec546719d471143e16d976ca73ca956", - "https://esm.sh/v132/execa@7.2.0/denonext/execa.mjs": "5aa1c5a07843e56fd4ff4e0728d11941122d9f3c4bc37600971aa8e75c86d3a6", - "https://esm.sh/v132/fs-minipass@2.1.0/denonext/fs-minipass.mjs": "18bcb6852f74c79ad50261e900a8c5daf2e7c38ce6662859e4f6f61d18daa6ed", - "https://esm.sh/v132/get-stream@6.0.1/denonext/get-stream.mjs": "a947a16f8cb3052fd654a84f8b36b40ce96b6a5acfb3ad4ab69d814bcf3351fb", - "https://esm.sh/v132/graphql-request@6.1.0/denonext/graphql-request.mjs": "796e05cc81ad339ef182de57452ffc00e9fef874df14fbba41338ca893499733", - "https://esm.sh/v132/graphql-tag@2.12.6/denonext/graphql-tag.mjs": "ca4302aabfeec9e4335103f1a3eeaf26277af50b828a3bcde7f262fcd4e98e1d", - "https://esm.sh/v132/graphql@16.8.0/denonext/graphql.mjs": "e10e0db78cbbef8215b2665e5ed46cbb28fc61ecdb560f9e8d304a610f51f5bc", - "https://esm.sh/v132/human-signals@4.3.1/denonext/human-signals.mjs": "3889110cedd907804443d018cffe0a1d892d5e7467661376caf967feff55cbe9", - "https://esm.sh/v132/is-stream@3.0.0/denonext/is-stream.mjs": "5c8b65f2fa051c4b18e88bbae11dac8bba9caf57752577d69bcea86d1f05c5b7", - "https://esm.sh/v132/isexe@2.0.0/denonext/isexe.mjs": "3cfefd270d1bfdfb864ee98dbb8f41d150cbf480925158f4a8f0ade8a9e17d6c", - "https://esm.sh/v132/lodash.flatten@4.4.0/denonext/lodash.flatten.mjs": "8e86ab607deea15cc3c1acfb5eae278ecbc5b80f24167b4e8f4c56df3278cd55", - "https://esm.sh/v132/merge-stream@2.0.0/denonext/merge-stream.mjs": "2c2af22401c294158d6bff659d157e3d2c028c218cc1bd2246534a45a4c03c61", - "https://esm.sh/v132/mimic-fn@4.0.0/denonext/mimic-fn.mjs": "10bcf0f2f20cbbba0c289ef7bf4d2422639bbc1c36c247be876afd6fe2d67138", - "https://esm.sh/v132/minipass@3.3.6/denonext/minipass.mjs": "59bbe430514455e78cb30c389b21af66efb2bf010cda071820a17d8c76d0d1cf", - "https://esm.sh/v132/minipass@5.0.0/denonext/minipass.mjs": "de0e049728f8c387b58c86439eb9d69a16b6a88756a6bc694e2fecbd7fd00401", - "https://esm.sh/v132/minizlib@2.1.2/denonext/minizlib.mjs": "2e35ea8aa6cb4caa6f9b6c5b3c8684460698c868363e134af26c28d0e76ded5f", - "https://esm.sh/v132/mkdirp@1.0.4/denonext/mkdirp.mjs": "091be31ee8a9c0f5f716b769bf81397ac70a587a5f2b0367e1e3bda26f5a8af7", - "https://esm.sh/v132/nanoid@4.0.2/denonext/nanoid.mjs": "4f26e89bc0867e6a838069435b3d75af305017d87ce5b51c9d6edc680954b52f", - "https://esm.sh/v132/node-color-log@10.0.2/denonext/node-color-log.mjs": "2504391bd0ce1dd4c2bf0ed0b839b8a3ad84c028d9dd17cc58dccd2e14dacfde", - "https://esm.sh/v132/node_fetch.js": "b11355358cf61343a3c30bd5942df60a3586d13e2c979b515164bfe851662798", - "https://esm.sh/v132/npm-run-path@5.1.0/denonext/npm-run-path.mjs": "b97d372a504bcca269c98f5d13ba0671e47230aaaaa36c3554b4a705085044df", - "https://esm.sh/v132/onetime@6.0.0/denonext/onetime.mjs": "c0be3fa6d700bb157f9a710aaf23df049f70c6a7d7e66a7d76568c5177267c51", - "https://esm.sh/v132/original-fs@1.2.0/denonext/original-fs.mjs": "2b1098818e54d2c6748ff5b0dd9ea5f6a61b4b6d0f63fb625f21773d11cfc667", - "https://esm.sh/v132/path-key@3.1.1/denonext/path-key.mjs": "add83c631278b7df9b33ae84e41142db88bb291295bcc27eb4e77a1cbdfa71d0", - "https://esm.sh/v132/path-key@4.0.0/denonext/path-key.mjs": "2c2e3922bd0e6e414fa2752ff800bdc6b9208035ce797fa22e49b859f8259417", - "https://esm.sh/v132/shebang-command@2.0.0/denonext/shebang-command.mjs": "35a3eae8fe5ccaab6598ba16e81bfc06bc1b46128028cd4cf76d63786dcd54aa", - "https://esm.sh/v132/shebang-regex@3.0.0/denonext/shebang-regex.mjs": "03983ba59dd2cba9402935e21b46d05f5249364cba9f5757aef23c6c2fea65b9", - "https://esm.sh/v132/signal-exit@3.0.7/denonext/signal-exit.mjs": "2a176e5f9b351fa8057213c627a1503d63bf308b64447ef47f1ca6fbb2a91c81", - "https://esm.sh/v132/stringify-tree@1.1.1/denonext/stringify-tree.mjs": "eaa9333a5219638ad170d12e12603ae00ae80fc8bf02cc112cfec7294e6bcb43", - "https://esm.sh/v132/strip-final-newline@3.0.0/denonext/strip-final-newline.mjs": "03d9be4e8a249d63cbbddeb2fb675a1bbbcb335283e604d4ce56c88c90e6f102", - "https://esm.sh/v132/tar@6.2.0/denonext/tar.mjs": "f55c2f94c0ba1123048c9e3fa0af3a2bebac3af5a9895610865f05ae4d0b7f58", - "https://esm.sh/v132/tslib@2.6.2/denonext/tslib.mjs": "29782bcd3139f77ec063dc5a9385c0fff4a8d0a23b6765c73d9edeb169a04bf1", - "https://esm.sh/v132/which@2.0.2/denonext/which.mjs": "7482079af785ec16137592b26d53cb2808b05979559f5d0d9d036a80c6b1636e", - "https://esm.sh/v132/yallist@4.0.0/denonext/yallist.mjs": "61f180d807dda50bac17028eda05d5722a3fecef6e98a9064e2353ea6864fd82", - "https://esm.sh/v132/yaml@2.3.1/denonext/yaml.mjs": "71f677b4bfc69271af9d98db5194e354f9a1863955e208e26d32a9ef78bd89f5", - "https://esm.sh/yaml@v2.3.1": "5471fa3592a8a9d1a4a3d8cacf54070b01aedaca82f14fdbbdd056a491db00ec", - "https://nix.fluentci.io/v0.5.1/deps.ts": "d2fee07fcb79b609f64f988990ad5d67c7bf17455f75dcbf1b3bbfa5de7c73b2", - "https://nix.fluentci.io/v0.5.1/src/dagger/steps.ts": "b766f4fa9624a032e7af884a5ca47bc666a529c4a472d38b74b55ca0d63cf81d", - "https://nix.fluentci.io/zenith/deps.ts": "a8fd3aa32faea5de2779cc6494471b4fd9588f039d199ff1a1ff1b00343aef26", - "https://nix.fluentci.io/zenith/src/dagger/steps.ts": "b766f4fa9624a032e7af884a5ca47bc666a529c4a472d38b74b55ca0d63cf81d", - "https://sdk.fluentci.io/v0.1.9/deps.ts": "1b036b7614a602b11e062a6911f26a6e2ac4e470cc74ac230125afd466cc77ea", - "https://sdk.fluentci.io/v0.1.9/mod.ts": "a3c03bdb97c5a3b998c7c9f616c7b00d4268013c3b16e8a90c1a36a85529d841", - "https://sdk.fluentci.io/v0.1.9/src/client.ts": "a8dd54861feccd11a53df39b2d45bfb3b2a8a3dff509f5700c41b517d4dff44d", - "https://sdk.fluentci.io/v0.1.9/src/connect.ts": "1bb42b4e0c5073bb2125b90f1d7d08a66fcad9ad8c453924b944be72d3a56c98", - "https://sdk.fluentci.io/v0.1.9/src/context.ts": "2939ff58d0a79d7377d5553e725c9a2110a0013035a5a57abe9a9a5da975c4ce", - "https://sdk.fluentci.io/v0.1.9/src/utils.ts": "394d131cfd465f0f3d8f876237f3bad1ab4dba73b9b7a396ee705d02aee40c16", - "https://sdk.fluentci.io/z1/deps.ts": "1b036b7614a602b11e062a6911f26a6e2ac4e470cc74ac230125afd466cc77ea", - "https://sdk.fluentci.io/z1/mod.ts": "261ba81a4728f5def4e327a5cd80664ea8449515a2f4eea5f3f416acae39a1fa", - "https://sdk.fluentci.io/z1/src/client.ts": "dde6d20c41df43e5bb7763782eb3702a8d830a827444d1fb388fc574b2e6a64c", - "https://sdk.fluentci.io/z1/src/connect.ts": "4aff111c403cf78672384a10214a9885e08319dde579ec458f98a7bb04874101", - "https://sdk.fluentci.io/z1/src/context.ts": "2939ff58d0a79d7377d5553e725c9a2110a0013035a5a57abe9a9a5da975c4ce", - "https://sdk.fluentci.io/z1/src/utils.ts": "5dcd6d83553930502069d067ff42bc44698e22c23426fdb78630c4b39769d308" - } -} diff --git a/.fluentci/example/.fluentci/deps.ts b/.fluentci/example/.fluentci/deps.ts deleted file mode 100644 index 06b55cbb..00000000 --- a/.fluentci/example/.fluentci/deps.ts +++ /dev/null @@ -1,34 +0,0 @@ -export { assertEquals } from "https://deno.land/std@0.191.0/testing/asserts.ts"; -import Client from "https://sdk.fluentci.io/z1/mod.ts"; -export default Client; - -export { - connect, - uploadContext, - CacheSharingMode, -} from "https://sdk.fluentci.io/z1/mod.ts"; -export { brightGreen } from "https://deno.land/std@0.191.0/fmt/colors.ts"; -export { withDevbox } from "https://nix.fluentci.io/zenith/src/dagger/steps.ts"; -export { stringifyTree } from "https://esm.sh/stringify-tree@1.1.1"; -import gql from "https://esm.sh/graphql-tag@2.12.6"; -export { gql }; - -export { - arg, - queryType, - stringArg, - intArg, - nonNull, - makeSchema, -} from "npm:nexus"; -export { - dirname, - join, - resolve, -} from "https://deno.land/std@0.203.0/path/mod.ts"; - -export * as FluentGitlabCI from "https://deno.land/x/fluent_gitlab_ci@v0.4.2/mod.ts"; -export * as FluentGithubActions from "https://deno.land/x/fluent_github_actions@v0.2.1/mod.ts"; -export * as FluentCircleCI from "https://deno.land/x/fluent_circleci@v0.2.5/mod.ts"; -export * as FluentAzurePipelines from "https://deno.land/x/fluent_azure_pipelines@v0.2.0/mod.ts"; -export * as FluentAWSCodePipeline from "https://deno.land/x/fluent_aws_codepipeline@v0.2.3/mod.ts"; diff --git a/.fluentci/example/.fluentci/example/.github/workflows/tests.yml b/.fluentci/example/.fluentci/example/.github/workflows/tests.yml deleted file mode 100644 index 0d1aa580..00000000 --- a/.fluentci/example/.fluentci/example/.github/workflows/tests.yml +++ /dev/null @@ -1,24 +0,0 @@ -# Do not edit this file directly. It is generated by Fluent Github Actions - -name: Test -on: - push: - branches: - - main -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: denoland/setup-deno@v1 - with: - deno-version: v1.37 - - name: Setup Fluent CI CLI - run: deno install -A -r https://cli.fluentci.io -n fluentci - - name: Setup Dagger - run: | - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - sudo mv bin/dagger /usr/local/bin - dagger version - - name: Run Tests and Build - run: dagger run fluentci rust_pipeline test build diff --git a/.fluentci/example/.fluentci/example/.gitignore b/.fluentci/example/.fluentci/example/.gitignore deleted file mode 100644 index 2f7896d1..00000000 --- a/.fluentci/example/.fluentci/example/.gitignore +++ /dev/null @@ -1 +0,0 @@ -target/ diff --git a/.fluentci/example/.fluentci/example/Cargo.lock b/.fluentci/example/.fluentci/example/Cargo.lock deleted file mode 100644 index 21d186b3..00000000 --- a/.fluentci/example/.fluentci/example/Cargo.lock +++ /dev/null @@ -1,7 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "example" -version = "0.1.0" diff --git a/.fluentci/example/.fluentci/example/Cargo.toml b/.fluentci/example/.fluentci/example/Cargo.toml deleted file mode 100644 index 6bd8d795..00000000 --- a/.fluentci/example/.fluentci/example/Cargo.toml +++ /dev/null @@ -1,8 +0,0 @@ -[package] -name = "example" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] diff --git a/.fluentci/example/.fluentci/example/build.gql b/.fluentci/example/.fluentci/example/build.gql deleted file mode 100644 index 39cb3286..00000000 --- a/.fluentci/example/.fluentci/example/build.gql +++ /dev/null @@ -1,5 +0,0 @@ -{ - rust { - build(src: ".") - } -} diff --git a/.fluentci/example/.fluentci/example/src/lib.rs b/.fluentci/example/.fluentci/example/src/lib.rs deleted file mode 100644 index 7d12d9af..00000000 --- a/.fluentci/example/.fluentci/example/src/lib.rs +++ /dev/null @@ -1,14 +0,0 @@ -pub fn add(left: usize, right: usize) -> usize { - left + right -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn it_works() { - let result = add(2, 2); - assert_eq!(result, 4); - } -} diff --git a/.fluentci/example/.fluentci/example/test.gql b/.fluentci/example/.fluentci/example/test.gql deleted file mode 100644 index 07bd7c8a..00000000 --- a/.fluentci/example/.fluentci/example/test.gql +++ /dev/null @@ -1,5 +0,0 @@ -{ - rust { - test(src: ".") - } -} diff --git a/.fluentci/example/.fluentci/fixtures/.gitlab-ci.yml b/.fluentci/example/.fluentci/fixtures/.gitlab-ci.yml deleted file mode 100644 index 4fd0fec8..00000000 --- a/.fluentci/example/.fluentci/fixtures/.gitlab-ci.yml +++ /dev/null @@ -1,28 +0,0 @@ -# Do not edit this file directly. It is generated by https://deno.land/x/fluent_gitlab_ci - -.docker: - image: denoland/deno:alpine - services: - - docker:${DOCKER_VERSION}-dind - variables: - DOCKER_HOST: tcp://docker:2376 - DOCKER_TLS_VERIFY: "1" - DOCKER_TLS_CERTDIR: /certs - DOCKER_CERT_PATH: /certs/client - DOCKER_DRIVER: overlay2 - DOCKER_VERSION: 20.10.16 - -.dagger: - extends: .docker - before_script: - - apk add docker-cli curl unzip - - deno install -A -r https://cli.fluentci.io -n fluentci - - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - - mv bin/dagger /usr/local/bin - - dagger version - -tests: - extends: .dagger - script: - - fluentci run rust_pipeline test build - diff --git a/.fluentci/example/.fluentci/fixtures/azure-pipelines.yml b/.fluentci/example/.fluentci/fixtures/azure-pipelines.yml deleted file mode 100644 index 329d0ac9..00000000 --- a/.fluentci/example/.fluentci/fixtures/azure-pipelines.yml +++ /dev/null @@ -1,22 +0,0 @@ -# Do not edit this file directly. It is generated by https://deno.land/x/fluent_azure_pipelines - -trigger: - - main -pool: - name: Default - vmImage: ubuntu-latest -steps: - - script: | - curl -fsSL https://deno.land/x/install/install.sh | sh - export DENO_INSTALL="$HOME/.deno" - export PATH="$DENO_INSTALL/bin:$PATH" - displayName: Install Deno - - script: deno install -A -r https://cli.fluentci.io -n fluentci - displayName: Setup Fluent CI CLI - - script: | - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - sudo mv bin/dagger /usr/local/bin - dagger version - displayName: Setup Dagger - - script: fluentci run rust_pipeline test build - displayName: Run Dagger Pipelines diff --git a/.fluentci/example/.fluentci/fixtures/buildspec.yml b/.fluentci/example/.fluentci/fixtures/buildspec.yml deleted file mode 100644 index d40ba2c5..00000000 --- a/.fluentci/example/.fluentci/fixtures/buildspec.yml +++ /dev/null @@ -1,19 +0,0 @@ -# Do not edit this file directly. It is generated by https://deno.land/x/fluent_aws_codepipeline - -version: 0.2 -phases: - install: - commands: - - curl -fsSL https://deno.land/x/install/install.sh | sh - - export DENO_INSTALL="$HOME/.deno" - - export PATH="$DENO_INSTALL/bin:$PATH" - - deno install -A -r https://cli.fluentci.io -n fluentci - - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - - mv bin/dagger /usr/local/bin - - dagger version - build: - commands: - - fluentci run rust_pipeline test build - post_build: - commands: - - echo Build completed on `date` diff --git a/.fluentci/example/.fluentci/fixtures/config.yml b/.fluentci/example/.fluentci/fixtures/config.yml deleted file mode 100644 index 83d75999..00000000 --- a/.fluentci/example/.fluentci/fixtures/config.yml +++ /dev/null @@ -1,26 +0,0 @@ -# Do not edit this file directly. It is generated by https://deno.land/x/fluent_circleci - -version: 2.1 -jobs: - tests: - steps: - - checkout - - run: sudo apt-get update && sudo apt-get install -y curl unzip - - run: | - curl -fsSL https://deno.land/x/install/install.sh | sh - export DENO_INSTALL="$HOME/.deno" - export PATH="$DENO_INSTALL/bin:$PATH" - - run: deno install -A -r https://cli.fluentci.io -n fluentci - - run: | - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - sudo mv bin/dagger /usr/local/bin - dagger version - - run: - name: Run Dagger Pipelines - command: fluentci run rust_pipeline test build - machine: - image: ubuntu-2004:2023.07.1 -workflows: - dagger: - jobs: - - tests diff --git a/.fluentci/example/.fluentci/fixtures/workflow.yml b/.fluentci/example/.fluentci/fixtures/workflow.yml deleted file mode 100644 index d657222b..00000000 --- a/.fluentci/example/.fluentci/fixtures/workflow.yml +++ /dev/null @@ -1,24 +0,0 @@ -# Do not edit this file directly. It is generated by https://deno.land/x/fluent_github_actions - -name: Test -on: - push: - branches: - - main -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: denoland/setup-deno@v1 - with: - deno-version: v1.37 - - name: Setup Fluent CI CLI - run: deno install -A -r https://cli.fluentci.io -n fluentci - - name: Setup Dagger - run: | - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - sudo mv bin/dagger /usr/local/bin - dagger version - - name: Run Tests and Build - run: fluentci run rust_pipeline test build diff --git a/.fluentci/example/.fluentci/gen/nexus.ts b/.fluentci/example/.fluentci/gen/nexus.ts deleted file mode 100644 index 40c2c83f..00000000 --- a/.fluentci/example/.fluentci/gen/nexus.ts +++ /dev/null @@ -1,139 +0,0 @@ -/** - * This file was generated by Nexus Schema - * Do not make changes to this file directly - */ - - - - - - - -declare global { - interface NexusGen extends NexusGenTypes {} -} - -export interface NexusGenInputs { -} - -export interface NexusGenEnums { -} - -export interface NexusGenScalars { - String: string - Int: number - Float: number - Boolean: boolean - ID: string -} - -export interface NexusGenObjects { - Query: {}; -} - -export interface NexusGenInterfaces { -} - -export interface NexusGenUnions { -} - -export type NexusGenRootTypes = NexusGenObjects - -export type NexusGenAllTypes = NexusGenRootTypes & NexusGenScalars - -export interface NexusGenFieldTypes { - Query: { // field return type - build: string | null; // String - test: string | null; // String - } -} - -export interface NexusGenFieldTypeNames { - Query: { // field return type name - build: 'String' - test: 'String' - } -} - -export interface NexusGenArgTypes { - Query: { - build: { // args - src: string; // String! - } - test: { // args - src: string; // String! - } - } -} - -export interface NexusGenAbstractTypeMembers { -} - -export interface NexusGenTypeInterfaces { -} - -export type NexusGenObjectNames = keyof NexusGenObjects; - -export type NexusGenInputNames = never; - -export type NexusGenEnumNames = never; - -export type NexusGenInterfaceNames = never; - -export type NexusGenScalarNames = keyof NexusGenScalars; - -export type NexusGenUnionNames = never; - -export type NexusGenObjectsUsingAbstractStrategyIsTypeOf = never; - -export type NexusGenAbstractsUsingStrategyResolveType = never; - -export type NexusGenFeaturesConfig = { - abstractTypeStrategies: { - isTypeOf: false - resolveType: true - __typename: false - } -} - -export interface NexusGenTypes { - context: any; - inputTypes: NexusGenInputs; - rootTypes: NexusGenRootTypes; - inputTypeShapes: NexusGenInputs & NexusGenEnums & NexusGenScalars; - argTypes: NexusGenArgTypes; - fieldTypes: NexusGenFieldTypes; - fieldTypeNames: NexusGenFieldTypeNames; - allTypes: NexusGenAllTypes; - typeInterfaces: NexusGenTypeInterfaces; - objectNames: NexusGenObjectNames; - inputNames: NexusGenInputNames; - enumNames: NexusGenEnumNames; - interfaceNames: NexusGenInterfaceNames; - scalarNames: NexusGenScalarNames; - unionNames: NexusGenUnionNames; - allInputTypes: NexusGenTypes['inputNames'] | NexusGenTypes['enumNames'] | NexusGenTypes['scalarNames']; - allOutputTypes: NexusGenTypes['objectNames'] | NexusGenTypes['enumNames'] | NexusGenTypes['unionNames'] | NexusGenTypes['interfaceNames'] | NexusGenTypes['scalarNames']; - allNamedTypes: NexusGenTypes['allInputTypes'] | NexusGenTypes['allOutputTypes'] - abstractTypes: NexusGenTypes['interfaceNames'] | NexusGenTypes['unionNames']; - abstractTypeMembers: NexusGenAbstractTypeMembers; - objectsUsingAbstractStrategyIsTypeOf: NexusGenObjectsUsingAbstractStrategyIsTypeOf; - abstractsUsingStrategyResolveType: NexusGenAbstractsUsingStrategyResolveType; - features: NexusGenFeaturesConfig; -} - - -declare global { - interface NexusGenPluginTypeConfig { - } - interface NexusGenPluginInputTypeConfig { - } - interface NexusGenPluginFieldConfig { - } - interface NexusGenPluginInputFieldConfig { - } - interface NexusGenPluginSchemaConfig { - } - interface NexusGenPluginArgConfig { - } -} \ No newline at end of file diff --git a/.fluentci/example/.fluentci/import_map.json b/.fluentci/example/.fluentci/import_map.json deleted file mode 100644 index ff0f7652..00000000 --- a/.fluentci/example/.fluentci/import_map.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "imports": { - "@fluentci.io/dagger": "https://sdk.fluentci.io/v0.1.9/mod.ts", - "@dagger.io/dagger": "https://esm.sh/v128/*@dagger.io/dagger@0.8.4", - "graphql-tag": "https://esm.sh/v128/graphql-tag@2.12.6", - "graphql-request": "https://esm.sh/v128/graphql-request@6.1.0", - "fluent_gitlab_ci": "https://deno.land/x/fluent_gitlab_ci@v0.4.2/mod.ts", - "fluent_github_actions": "https://deno.land/x/fluent_github_actions@v0.2.1/mod.ts", - "fluent_circleci": "https://deno.land/x/fluent_circleci@v0.2.5/mod.ts", - "fluent_azure_pipelines": "https://deno.land/x/fluent_azure_pipelines@v0.2.0/mod.ts", - "fluent_aws_codepipeline": "https://deno.land/x/fluent_aws_codepipeline@v0.2.3/mod.ts", - "crypto": "node:crypto", - "fs": "node:fs", - "os": "node:os", - "path": "node:path", - "process": "node:process", - "readline": "node:readline", - "url": "node:url" - }, - "scopes": { - "https://esm.sh/v128/": { - "@lifeomic/axios-fetch": "https://esm.sh/v128/@lifeomic/axios-fetch@3.0.1", - "adm-zip": "https://esm.sh/v128/adm-zip@0.5.10", - "env-paths": "https://esm.sh/v128/env-paths@3.0.0", - "execa": "https://esm.sh/v128/execa@7.1.1", - "graphql-request": "https://esm.sh/v128/graphql-request@6.1.0", - "graphql-tag": "https://esm.sh/v128/graphql-tag@2.12.6", - "graphql": "https://esm.sh/v128/graphql@16.7.1", - "node-color-log": "https://esm.sh/v128/node-color-log@10.0.2", - "node-fetch": "https://esm.sh/v128/node-fetch@3.3.1", - "tar": "https://esm.sh/v128/tar@6.1.15" - } - } -} \ No newline at end of file diff --git a/.fluentci/example/.fluentci/mod.ts b/.fluentci/example/.fluentci/mod.ts deleted file mode 100644 index 52470dd1..00000000 --- a/.fluentci/example/.fluentci/mod.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./src/dagger/index.ts"; -export * as queries from "./src/dagger/queries.ts"; -export { schema } from "./src/dagger/schema.ts"; diff --git a/.fluentci/example/.fluentci/schema.graphql b/.fluentci/example/.fluentci/schema.graphql deleted file mode 100644 index 33883cab..00000000 --- a/.fluentci/example/.fluentci/schema.graphql +++ /dev/null @@ -1,8 +0,0 @@ -### This file was generated by Nexus Schema -### Do not make changes to this file directly - - -type Query { - build(src: String!): String - test(src: String!): String -} \ No newline at end of file diff --git a/.fluentci/example/.fluentci/src/aws/README.md b/.fluentci/example/.fluentci/src/aws/README.md deleted file mode 100644 index a83b380a..00000000 --- a/.fluentci/example/.fluentci/src/aws/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# AWS CodePipeline - -[![fluentci pipeline](https://img.shields.io/badge/dynamic/json?label=pkg.fluentci.io&labelColor=%23000&color=%23460cf1&url=https%3A%2F%2Fapi.fluentci.io%2Fv1%2Fpipeline%2Frust_pipeline&query=%24.version)](https://pkg.fluentci.io/rust_pipeline) -[![deno module](https://shield.deno.dev/x/rust_pipeline)](https://deno.land/x/rust_pipeline) -![deno compatibility](https://shield.deno.dev/deno/^1.34) -[![](https://img.shields.io/codecov/c/gh/fluent-ci-templates/rust-pipeline)](https://codecov.io/gh/fluent-ci-templates/rust-pipeline) - -The following command will generate a `buildspec.yml` file in your project: - -```bash -fluentci ac init -t rust_pipeline -``` - -Generated file: - -```yaml -# Do not edit this file directly. It is generated by https://deno.land/x/fluent_aws_codepipeline - -version: 0.2 -phases: - install: - commands: - - curl -fsSL https://deno.land/x/install/install.sh | sh - - export DENO_INSTALL="$HOME/.deno" - - export PATH="$DENO_INSTALL/bin:$PATH" - - deno install -A -r https://cli.fluentci.io -n fluentci - - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - - mv bin/dagger /usr/local/bin - - dagger version - build: - commands: - - fluentci run rust_pipeline test build - post_build: - commands: - - echo Build completed on `date` - -``` - -Feel free to edit the template generator at `.fluentci/src/aws/config.ts` to your needs. diff --git a/.fluentci/example/.fluentci/src/aws/config.ts b/.fluentci/example/.fluentci/src/aws/config.ts deleted file mode 100644 index aa00a1f6..00000000 --- a/.fluentci/example/.fluentci/src/aws/config.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { BuildSpec } from "fluent_aws_codepipeline"; - -export function generateYaml(): BuildSpec { - const buildspec = new BuildSpec(); - buildspec - .phase("install", { - commands: [ - "curl -fsSL https://deno.land/x/install/install.sh | sh", - 'export DENO_INSTALL="$HOME/.deno"', - 'export PATH="$DENO_INSTALL/bin:$PATH"', - "deno install -A -r https://cli.fluentci.io -n fluentci", - "curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh", - "mv bin/dagger /usr/local/bin", - "dagger version", - ], - }) - .phase("build", { - commands: ["fluentci run rust_pipeline test build"], - }) - .phase("post_build", { - commands: ["echo Build completed on `date`"], - }); - return buildspec; -} diff --git a/.fluentci/example/.fluentci/src/aws/config_test.ts b/.fluentci/example/.fluentci/src/aws/config_test.ts deleted file mode 100644 index 97bed687..00000000 --- a/.fluentci/example/.fluentci/src/aws/config_test.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { assertEquals } from "https://deno.land/std@0.191.0/testing/asserts.ts"; -import { generateYaml } from "./config.ts"; - -Deno.test(function generateAWSCodePipelineTest() { - const buildspec = generateYaml(); - const actual = buildspec.toString(); - const expected = Deno.readTextFileSync("./fixtures/buildspec.yml"); - assertEquals(actual, expected); -}); diff --git a/.fluentci/example/.fluentci/src/aws/init.ts b/.fluentci/example/.fluentci/src/aws/init.ts deleted file mode 100644 index 83944b7a..00000000 --- a/.fluentci/example/.fluentci/src/aws/init.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { generateYaml } from "./config.ts"; - -generateYaml().save("buildspec.yml"); diff --git a/.fluentci/example/.fluentci/src/azure/README.md b/.fluentci/example/.fluentci/src/azure/README.md deleted file mode 100644 index 7b3d238e..00000000 --- a/.fluentci/example/.fluentci/src/azure/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# Azure Pipelines - -[![fluentci pipeline](https://img.shields.io/badge/dynamic/json?label=pkg.fluentci.io&labelColor=%23000&color=%23460cf1&url=https%3A%2F%2Fapi.fluentci.io%2Fv1%2Fpipeline%2Frust_pipeline&query=%24.version)](https://pkg.fluentci.io/rust_pipeline) -[![deno module](https://shield.deno.dev/x/rust_pipeline)](https://deno.land/x/rust_pipeline) -![deno compatibility](https://shield.deno.dev/deno/^1.34) -[![](https://img.shields.io/codecov/c/gh/fluent-ci-templates/rust-pipeline)](https://codecov.io/gh/fluent-ci-templates/rust-pipeline) - -The following command will generate a `azure-pipelines.yml` file in your project: - -```bash -fluentci ap init -t rust_pipeline -``` - -Generated file: - -```yaml -# Do not edit this file directly. It is generated by https://deno.land/x/fluent_azure_pipelines - -trigger: - - main -pool: - name: Default - vmImage: ubuntu-latest -steps: - - script: | - curl -fsSL https://deno.land/x/install/install.sh | sh - export DENO_INSTALL="$HOME/.deno" - export PATH="$DENO_INSTALL/bin:$PATH" - displayName: Install Deno - - script: deno install -A -r https://cli.fluentci.io -n fluentci - displayName: Setup Fluent CI CLI - - script: | - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - sudo mv bin/dagger /usr/local/bin - dagger version - displayName: Setup Dagger - - script: fluentci run rust_pipeline test build - displayName: Run Dagger Pipelines - -``` - -Feel free to edit the template generator at `.fluentci/src/azure/config.ts` to your needs. diff --git a/.fluentci/example/.fluentci/src/azure/config.ts b/.fluentci/example/.fluentci/src/azure/config.ts deleted file mode 100644 index 5423dd26..00000000 --- a/.fluentci/example/.fluentci/src/azure/config.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { AzurePipeline } from "fluent_azure_pipelines"; - -export function generateYaml(): AzurePipeline { - const azurePipeline = new AzurePipeline(); - - const installDeno = `\ - curl -fsSL https://deno.land/x/install/install.sh | sh - export DENO_INSTALL="$HOME/.deno" - export PATH="$DENO_INSTALL/bin:$PATH" -`; - - const setupDagger = `\ - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - sudo mv bin/dagger /usr/local/bin - dagger version -`; - - azurePipeline - .trigger(["main"]) - .pool({ - name: "Default", - vmImage: "ubuntu-latest", - }) - .step({ - script: installDeno, - displayName: "Install Deno", - }) - .step({ - script: "deno install -A -r https://cli.fluentci.io -n fluentci", - displayName: "Setup Fluent CI CLI", - }) - .step({ - script: setupDagger, - displayName: "Setup Dagger", - }) - .step({ - script: "fluentci run rust_pipeline test build", - displayName: "Run Dagger Pipelines", - }); - return azurePipeline; -} diff --git a/.fluentci/example/.fluentci/src/azure/config_test.ts b/.fluentci/example/.fluentci/src/azure/config_test.ts deleted file mode 100644 index 0311f554..00000000 --- a/.fluentci/example/.fluentci/src/azure/config_test.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { assertEquals } from "https://deno.land/std@0.191.0/testing/asserts.ts"; -import { generateYaml } from "./config.ts"; - -Deno.test(function generateAzurePipelinesTest() { - const azurepipelines = generateYaml(); - const actual = azurepipelines.toString(); - const expected = Deno.readTextFileSync("./fixtures/azure-pipelines.yml"); - assertEquals(actual, expected); -}); diff --git a/.fluentci/example/.fluentci/src/azure/init.ts b/.fluentci/example/.fluentci/src/azure/init.ts deleted file mode 100644 index 2e71b2e4..00000000 --- a/.fluentci/example/.fluentci/src/azure/init.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { generateYaml } from "./config.ts"; - -generateYaml().save("azure-pipeline.yml"); diff --git a/.fluentci/example/.fluentci/src/circleci/README.md b/.fluentci/example/.fluentci/src/circleci/README.md deleted file mode 100644 index 623ffcea..00000000 --- a/.fluentci/example/.fluentci/src/circleci/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# Circle CI - -[![fluentci pipeline](https://img.shields.io/badge/dynamic/json?label=pkg.fluentci.io&labelColor=%23000&color=%23460cf1&url=https%3A%2F%2Fapi.fluentci.io%2Fv1%2Fpipeline%2Frust_pipeline&query=%24.version)](https://pkg.fluentci.io/rust_pipeline) -[![deno module](https://shield.deno.dev/x/rust_pipeline)](https://deno.land/x/rust_pipeline) -![deno compatibility](https://shield.deno.dev/deno/^1.34) -[![](https://img.shields.io/codecov/c/gh/fluent-ci-templates/rust-pipeline)](https://codecov.io/gh/fluent-ci-templates/rust-pipeline) - - -The following command will generate a `.circleci/config.yml` file in your project: - -```bash -fluentci cci init -t rust_pipeline -``` - -Generated file: - -```yaml -# Do not edit this file directly. It is generated by https://deno.land/x/fluent_circleci - -version: 2.1 -jobs: - tests: - steps: - - checkout - - run: sudo apt-get update && sudo apt-get install -y curl unzip - - run: | - curl -fsSL https://deno.land/x/install/install.sh | sh - export DENO_INSTALL="$HOME/.deno" - export PATH="$DENO_INSTALL/bin:$PATH" - - run: deno install -A -r https://cli.fluentci.io -n fluentci - - run: | - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - sudo mv bin/dagger /usr/local/bin - dagger version - - run: - name: Upload Coverage - command: fluentci run rust_pipeline test build - machine: - image: ubuntu-2004:2023.07.1 -workflows: - dagger: - jobs: - - tests - -``` - -Feel free to edit the template generator at `.fluentci/src/circleci/config.ts` to your needs. diff --git a/.fluentci/example/.fluentci/src/circleci/config.ts b/.fluentci/example/.fluentci/src/circleci/config.ts deleted file mode 100644 index eda36b95..00000000 --- a/.fluentci/example/.fluentci/src/circleci/config.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { CircleCI, Job } from "fluent_circleci"; - -export function generateYaml(): CircleCI { - const circleci = new CircleCI(); - - const tests = new Job().machine({ image: "ubuntu-2004:2023.07.1" }).steps([ - "checkout", - { - run: "sudo apt-get update && sudo apt-get install -y curl unzip", - }, - { - run: `\ -curl -fsSL https://deno.land/x/install/install.sh | sh -export DENO_INSTALL="$HOME/.deno" -export PATH="$DENO_INSTALL/bin:$PATH"`, - }, - { - run: "deno install -A -r https://cli.fluentci.io -n fluentci", - }, - { - run: `\ -curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh -sudo mv bin/dagger /usr/local/bin -dagger version`, - }, - { - run: { - name: "Run Dagger Pipelines", - command: "fluentci run rust_pipeline test build", - }, - }, - ]); - - circleci.jobs({ tests }).workflow("dagger", ["tests"]); - - return circleci; -} diff --git a/.fluentci/example/.fluentci/src/circleci/config_test.ts b/.fluentci/example/.fluentci/src/circleci/config_test.ts deleted file mode 100644 index 283a9c31..00000000 --- a/.fluentci/example/.fluentci/src/circleci/config_test.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { assertEquals } from "https://deno.land/std@0.191.0/testing/asserts.ts"; -import { generateYaml } from "./config.ts"; - -Deno.test(function generateCircleCITest() { - const circleci = generateYaml(); - const actual = circleci.toString(); - const expected = Deno.readTextFileSync("./fixtures/config.yml"); - assertEquals(actual, expected); -}); diff --git a/.fluentci/example/.fluentci/src/circleci/init.ts b/.fluentci/example/.fluentci/src/circleci/init.ts deleted file mode 100644 index 1f712482..00000000 --- a/.fluentci/example/.fluentci/src/circleci/init.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { generateYaml } from "./config.ts"; - -generateYaml().save(".circleci/config.yml"); diff --git a/.fluentci/example/.fluentci/src/dagger/index.ts b/.fluentci/example/.fluentci/src/dagger/index.ts deleted file mode 100644 index b915f315..00000000 --- a/.fluentci/example/.fluentci/src/dagger/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import pipeline from "./pipeline.ts"; -import { build, test } from "./jobs.ts"; - -export { pipeline, build, test }; diff --git a/.fluentci/example/.fluentci/src/dagger/jobs.ts b/.fluentci/example/.fluentci/src/dagger/jobs.ts deleted file mode 100644 index 42b7b85d..00000000 --- a/.fluentci/example/.fluentci/src/dagger/jobs.ts +++ /dev/null @@ -1,67 +0,0 @@ -import Client, { connect } from "../../deps.ts"; - -export enum Job { - test = "test", - build = "build", -} - -export const exclude = ["target", ".git", ".devbox", ".fluentci"]; - -export const test = async (src = ".", options: string[] = []) => { - await connect(async (client: Client) => { - const context = client.host().directory(src); - const ctr = client - .pipeline(Job.test) - .container() - .from("rust:latest") - .withDirectory("/app", context, { exclude }) - .withWorkdir("/app") - .withMountedCache("/app/target", client.cacheVolume("target")) - .withMountedCache("/root/cargo/registry", client.cacheVolume("registry")) - .withExec(["cargo", "test", ...options]); - - const result = await ctr.stdout(); - - console.log(result); - }); - return "done"; -}; - -export const build = async (src = ".", options: string[] = []) => { - await connect(async (client: Client) => { - const context = client.host().directory(src); - const ctr = client - .pipeline(Job.build) - .container() - .from("rust:latest") - .withDirectory("/app", context, { exclude }) - .withWorkdir("/app") - .withMountedCache("/app/target", client.cacheVolume("target")) - .withMountedCache("/root/cargo/registry", client.cacheVolume("registry")) - .withExec(["cargo", "build", "--release", ...options]); - - const result = await ctr.stdout(); - - console.log(result); - }); - return "done"; -}; - -export type JobExec = (src?: string) => - | Promise - | (( - src?: string, - options?: { - ignore: string[]; - } - ) => Promise); - -export const runnableJobs: Record = { - [Job.test]: test, - [Job.build]: build, -}; - -export const jobDescriptions: Record = { - [Job.test]: "Run tests", - [Job.build]: "Build the project", -}; diff --git a/.fluentci/example/.fluentci/src/dagger/list_jobs.ts b/.fluentci/example/.fluentci/src/dagger/list_jobs.ts deleted file mode 100644 index 028d5a4c..00000000 --- a/.fluentci/example/.fluentci/src/dagger/list_jobs.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { brightGreen, stringifyTree } from "../../deps.ts"; -import { runnableJobs, jobDescriptions, Job } from "./jobs.ts"; - -const tree = { - name: brightGreen("rust_pipeline"), - children: (Object.keys(runnableJobs) as Job[]).map((job) => ({ - name: jobDescriptions[job] - ? `${brightGreen(job)} - ${jobDescriptions[job]}` - : brightGreen(job), - children: [], - })), -}; - -console.log( - stringifyTree( - tree, - (t) => t.name, - (t) => t.children - ) -); diff --git a/.fluentci/example/.fluentci/src/dagger/queries.ts b/.fluentci/example/.fluentci/src/dagger/queries.ts deleted file mode 100644 index ea0b1d02..00000000 --- a/.fluentci/example/.fluentci/src/dagger/queries.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { gql } from "../../deps.ts"; - -export const test = gql` - query test($src: String!) { - test(src: $src) - } -`; - -export const build = gql` - query build($src: String!) { - build(src: $src) - } -`; diff --git a/.fluentci/example/.fluentci/src/dagger/schema.ts b/.fluentci/example/.fluentci/src/dagger/schema.ts deleted file mode 100644 index 320b9483..00000000 --- a/.fluentci/example/.fluentci/src/dagger/schema.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { - queryType, - makeSchema, - dirname, - join, - resolve, - stringArg, - nonNull, -} from "../../deps.ts"; - -import { test, build } from "./jobs.ts"; - -const Query = queryType({ - definition(t) { - t.string("test", { - args: { - src: nonNull(stringArg()), - }, - resolve: async (_root, args, _ctx) => await test(args.src), - }); - t.string("build", { - args: { - src: nonNull(stringArg()), - }, - resolve: async (_root, args, _ctx) => await build(args.src), - }); - }, -}); - -export const schema = makeSchema({ - types: [Query], - outputs: { - schema: resolve(join(dirname(".."), dirname(".."), "schema.graphql")), - typegen: resolve(join(dirname(".."), dirname(".."), "gen", "nexus.ts")), - }, -}); diff --git a/.fluentci/example/.fluentci/src/github/README.md b/.fluentci/example/.fluentci/src/github/README.md deleted file mode 100644 index 250a9afc..00000000 --- a/.fluentci/example/.fluentci/src/github/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# Github Actions - -[![fluentci pipeline](https://img.shields.io/badge/dynamic/json?label=pkg.fluentci.io&labelColor=%23000&color=%23460cf1&url=https%3A%2F%2Fapi.fluentci.io%2Fv1%2Fpipeline%2Frust_pipeline&query=%24.version)](https://pkg.fluentci.io/rust_pipeline) -[![deno module](https://shield.deno.dev/x/rust_pipeline)](https://deno.land/x/rust_pipeline) -![deno compatibility](https://shield.deno.dev/deno/^1.34) -[![](https://img.shields.io/codecov/c/gh/fluent-ci-templates/rust-pipeline)](https://codecov.io/gh/fluent-ci-templates/rust-pipeline) - -The following command will generate a `.github/workflows/tests.yml` file in your project: - -```bash -fluentci gh init -t rust_pipeline -``` - -Or, if you already have a `.fluentci` folder (generated from `fluentci init -t rust`) in your project: - -```bash -fluentci gh init -``` - -Generated file: - -```yaml -# Do not edit this file directly. It is generated by https://deno.land/x/fluent_github_actions - -name: Test -on: - push: - branches: - - main -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: denoland/setup-deno@v1 - with: - deno-version: v1.37 - - name: Setup Fluent CI CLI - run: deno install -A -r https://cli.fluentci.io -n fluentci - - name: Setup Dagger - run: | - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - sudo mv bin/dagger /usr/local/bin - dagger version - - name: Run Tests and Build - run: fluentci run rust_pipeline test build - -``` - -Feel free to edit the template generator at `.fluentci/src/github/config.ts` to your needs. diff --git a/.fluentci/example/.fluentci/src/github/config.ts b/.fluentci/example/.fluentci/src/github/config.ts deleted file mode 100644 index 34bf81a6..00000000 --- a/.fluentci/example/.fluentci/src/github/config.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { JobSpec, Workflow } from "fluent_github_actions"; - -export function generateYaml(): Workflow { - const workflow = new Workflow("Test"); - - const push = { - branches: ["main"], - }; - - const setupDagger = `\ - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - sudo mv bin/dagger /usr/local/bin - dagger version`; - - const test: JobSpec = { - "runs-on": "ubuntu-latest", - steps: [ - { - uses: "actions/checkout@v2", - }, - { - uses: "denoland/setup-deno@v1", - with: { - "deno-version": "v1.37", - }, - }, - { - name: "Setup Fluent CI CLI", - run: "deno install -A -r https://cli.fluentci.io -n fluentci", - }, - { - name: "Setup Dagger", - run: setupDagger, - }, - { - name: "Run Tests and Build", - run: "fluentci run rust_pipeline test build", - }, - ], - }; - - workflow.on({ push }).jobs({ test }); - - return workflow; -} diff --git a/.fluentci/example/.fluentci/src/github/config_test.ts b/.fluentci/example/.fluentci/src/github/config_test.ts deleted file mode 100644 index 88bf54f2..00000000 --- a/.fluentci/example/.fluentci/src/github/config_test.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { assertEquals } from "https://deno.land/std@0.191.0/testing/asserts.ts"; -import { generateYaml } from "./config.ts"; - -Deno.test(function generateGithubActionsWorkflowTest() { - const workflow = generateYaml(); - const actual = workflow.toString(); - const expected = Deno.readTextFileSync("./fixtures/workflow.yml"); - assertEquals(actual, expected); -}); diff --git a/.fluentci/example/.fluentci/src/github/init.ts b/.fluentci/example/.fluentci/src/github/init.ts deleted file mode 100644 index 513e790a..00000000 --- a/.fluentci/example/.fluentci/src/github/init.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { generateYaml } from "./config.ts"; - -generateYaml().save(".github/workflows/tests.yml"); diff --git a/.fluentci/example/.fluentci/src/gitlab/README.md b/.fluentci/example/.fluentci/src/gitlab/README.md deleted file mode 100644 index d371ba82..00000000 --- a/.fluentci/example/.fluentci/src/gitlab/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# Gitlab CI - -[![fluentci pipeline](https://img.shields.io/badge/dynamic/json?label=pkg.fluentci.io&labelColor=%23000&color=%23460cf1&url=https%3A%2F%2Fapi.fluentci.io%2Fv1%2Fpipeline%2Frust_pipeline&query=%24.version)](https://pkg.fluentci.io/rust_pipeline) -[![deno module](https://shield.deno.dev/x/rust_pipeline)](https://deno.land/x/rust_pipeline) -![deno compatibility](https://shield.deno.dev/deno/^1.34) -[![](https://img.shields.io/codecov/c/gh/fluent-ci-templates/rust-pipeline)](https://codecov.io/gh/fluent-ci-templates/rust-pipeline) - -The following command will generate a `.gitlab-ci.yml` file in your project: - -```bash -fluentci gl init -t rust_pipeline -``` - -Generated file: - -```yaml - -# Do not edit this file directly. It is generated by https://deno.land/x/fluent_gitlab_ci - -.docker: - image: denoland/deno:alpine - services: - - docker:${DOCKER_VERSION}-dind - variables: - DOCKER_HOST: tcp://docker:2376 - DOCKER_TLS_VERIFY: "1" - DOCKER_TLS_CERTDIR: /certs - DOCKER_CERT_PATH: /certs/client - DOCKER_DRIVER: overlay2 - DOCKER_VERSION: 20.10.16 - -.dagger: - extends: .docker - before_script: - - apk add docker-cli curl unzip - - deno install -A -r https://cli.fluentci.io -n fluentci - - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - - mv bin/dagger /usr/local/bin - - dagger version - -tests: - extends: .dagger - script: - - fluentci run rust_pipeline test build - -``` - -Feel free to edit the template generator at `.fluentci/src/gitlab/config.ts` to your needs. diff --git a/.fluentci/example/.fluentci/src/gitlab/config.ts b/.fluentci/example/.fluentci/src/gitlab/config.ts deleted file mode 100644 index ff43ce99..00000000 --- a/.fluentci/example/.fluentci/src/gitlab/config.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { GitlabCI, Job } from "fluent_gitlab_ci"; - -export function generateYaml(): GitlabCI { - const docker = new Job() - .image("denoland/deno:alpine") - .services(["docker:${DOCKER_VERSION}-dind"]) - .variables({ - DOCKER_HOST: "tcp://docker:2376", - DOCKER_TLS_VERIFY: "1", - DOCKER_TLS_CERTDIR: "/certs", - DOCKER_CERT_PATH: "/certs/client", - DOCKER_DRIVER: "overlay2", - DOCKER_VERSION: "20.10.16", - }); - - const dagger = new Job().extends(".docker").beforeScript( - ` - apk add docker-cli curl unzip - deno install -A -r https://cli.fluentci.io -n fluentci - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - mv bin/dagger /usr/local/bin - dagger version - ` - ); - - const tests = new Job() - .extends(".dagger") - .script("fluentci run rust_pipeline test build"); - - return new GitlabCI() - .addJob(".docker", docker) - .addJob(".dagger", dagger) - .addJob("tests", tests); -} diff --git a/.fluentci/example/.fluentci/src/gitlab/config_test.ts b/.fluentci/example/.fluentci/src/gitlab/config_test.ts deleted file mode 100644 index bf5c8563..00000000 --- a/.fluentci/example/.fluentci/src/gitlab/config_test.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { assertEquals } from "https://deno.land/std@0.191.0/testing/asserts.ts"; -import { generateYaml } from "./config.ts"; - -Deno.test(function generateGitlabCITest() { - const gitlabci = generateYaml(); - const actual = gitlabci.toString(); - const expected = Deno.readTextFileSync("./fixtures/.gitlab-ci.yml"); - assertEquals(actual, expected); -}); diff --git a/.fluentci/example/.fluentci/src/gitlab/init.ts b/.fluentci/example/.fluentci/src/gitlab/init.ts deleted file mode 100644 index 4da66cfc..00000000 --- a/.fluentci/example/.fluentci/src/gitlab/init.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { generateYaml } from "./config.ts"; - -generateYaml().write(); diff --git a/.fluentci/example/.github/workflows/tests.yml b/.fluentci/example/.github/workflows/tests.yml deleted file mode 100644 index 0d1aa580..00000000 --- a/.fluentci/example/.github/workflows/tests.yml +++ /dev/null @@ -1,24 +0,0 @@ -# Do not edit this file directly. It is generated by Fluent Github Actions - -name: Test -on: - push: - branches: - - main -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: denoland/setup-deno@v1 - with: - deno-version: v1.37 - - name: Setup Fluent CI CLI - run: deno install -A -r https://cli.fluentci.io -n fluentci - - name: Setup Dagger - run: | - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - sudo mv bin/dagger /usr/local/bin - dagger version - - name: Run Tests and Build - run: dagger run fluentci rust_pipeline test build diff --git a/.fluentci/example/.gitignore b/.fluentci/example/.gitignore deleted file mode 100644 index 2f7896d1..00000000 --- a/.fluentci/example/.gitignore +++ /dev/null @@ -1 +0,0 @@ -target/ diff --git a/.fluentci/example/Cargo.lock b/.fluentci/example/Cargo.lock deleted file mode 100644 index 21d186b3..00000000 --- a/.fluentci/example/Cargo.lock +++ /dev/null @@ -1,7 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "example" -version = "0.1.0" diff --git a/.fluentci/example/Cargo.toml b/.fluentci/example/Cargo.toml deleted file mode 100644 index 6bd8d795..00000000 --- a/.fluentci/example/Cargo.toml +++ /dev/null @@ -1,8 +0,0 @@ -[package] -name = "example" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] diff --git a/.fluentci/example/build.gql b/.fluentci/example/build.gql deleted file mode 100644 index 39cb3286..00000000 --- a/.fluentci/example/build.gql +++ /dev/null @@ -1,5 +0,0 @@ -{ - rust { - build(src: ".") - } -} diff --git a/.fluentci/example/dagger.json b/.fluentci/example/dagger.json deleted file mode 100644 index ded6aaf7..00000000 --- a/.fluentci/example/dagger.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "root": "", - "name": "rust", - "sdkRuntime": "tsiry/dagger-sdk-deno" -} \ No newline at end of file diff --git a/.fluentci/example/src/lib.rs b/.fluentci/example/src/lib.rs deleted file mode 100644 index 7d12d9af..00000000 --- a/.fluentci/example/src/lib.rs +++ /dev/null @@ -1,14 +0,0 @@ -pub fn add(left: usize, right: usize) -> usize { - left + right -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn it_works() { - let result = add(2, 2); - assert_eq!(result, 4); - } -} diff --git a/.fluentci/example/test.gql b/.fluentci/example/test.gql deleted file mode 100644 index 07bd7c8a..00000000 --- a/.fluentci/example/test.gql +++ /dev/null @@ -1,5 +0,0 @@ -{ - rust { - test(src: ".") - } -} diff --git a/.fluentci/fixtures/.gitlab-ci.yml b/.fluentci/fixtures/.gitlab-ci.yml deleted file mode 100644 index 4fd0fec8..00000000 --- a/.fluentci/fixtures/.gitlab-ci.yml +++ /dev/null @@ -1,28 +0,0 @@ -# Do not edit this file directly. It is generated by https://deno.land/x/fluent_gitlab_ci - -.docker: - image: denoland/deno:alpine - services: - - docker:${DOCKER_VERSION}-dind - variables: - DOCKER_HOST: tcp://docker:2376 - DOCKER_TLS_VERIFY: "1" - DOCKER_TLS_CERTDIR: /certs - DOCKER_CERT_PATH: /certs/client - DOCKER_DRIVER: overlay2 - DOCKER_VERSION: 20.10.16 - -.dagger: - extends: .docker - before_script: - - apk add docker-cli curl unzip - - deno install -A -r https://cli.fluentci.io -n fluentci - - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - - mv bin/dagger /usr/local/bin - - dagger version - -tests: - extends: .dagger - script: - - fluentci run rust_pipeline test build - diff --git a/.fluentci/fixtures/azure-pipelines.yml b/.fluentci/fixtures/azure-pipelines.yml deleted file mode 100644 index 329d0ac9..00000000 --- a/.fluentci/fixtures/azure-pipelines.yml +++ /dev/null @@ -1,22 +0,0 @@ -# Do not edit this file directly. It is generated by https://deno.land/x/fluent_azure_pipelines - -trigger: - - main -pool: - name: Default - vmImage: ubuntu-latest -steps: - - script: | - curl -fsSL https://deno.land/x/install/install.sh | sh - export DENO_INSTALL="$HOME/.deno" - export PATH="$DENO_INSTALL/bin:$PATH" - displayName: Install Deno - - script: deno install -A -r https://cli.fluentci.io -n fluentci - displayName: Setup Fluent CI CLI - - script: | - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - sudo mv bin/dagger /usr/local/bin - dagger version - displayName: Setup Dagger - - script: fluentci run rust_pipeline test build - displayName: Run Dagger Pipelines diff --git a/.fluentci/fixtures/buildspec.yml b/.fluentci/fixtures/buildspec.yml deleted file mode 100644 index d40ba2c5..00000000 --- a/.fluentci/fixtures/buildspec.yml +++ /dev/null @@ -1,19 +0,0 @@ -# Do not edit this file directly. It is generated by https://deno.land/x/fluent_aws_codepipeline - -version: 0.2 -phases: - install: - commands: - - curl -fsSL https://deno.land/x/install/install.sh | sh - - export DENO_INSTALL="$HOME/.deno" - - export PATH="$DENO_INSTALL/bin:$PATH" - - deno install -A -r https://cli.fluentci.io -n fluentci - - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - - mv bin/dagger /usr/local/bin - - dagger version - build: - commands: - - fluentci run rust_pipeline test build - post_build: - commands: - - echo Build completed on `date` diff --git a/.fluentci/fixtures/config.yml b/.fluentci/fixtures/config.yml deleted file mode 100644 index 83d75999..00000000 --- a/.fluentci/fixtures/config.yml +++ /dev/null @@ -1,26 +0,0 @@ -# Do not edit this file directly. It is generated by https://deno.land/x/fluent_circleci - -version: 2.1 -jobs: - tests: - steps: - - checkout - - run: sudo apt-get update && sudo apt-get install -y curl unzip - - run: | - curl -fsSL https://deno.land/x/install/install.sh | sh - export DENO_INSTALL="$HOME/.deno" - export PATH="$DENO_INSTALL/bin:$PATH" - - run: deno install -A -r https://cli.fluentci.io -n fluentci - - run: | - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - sudo mv bin/dagger /usr/local/bin - dagger version - - run: - name: Run Dagger Pipelines - command: fluentci run rust_pipeline test build - machine: - image: ubuntu-2004:2023.07.1 -workflows: - dagger: - jobs: - - tests diff --git a/.fluentci/fixtures/workflow.yml b/.fluentci/fixtures/workflow.yml deleted file mode 100644 index d657222b..00000000 --- a/.fluentci/fixtures/workflow.yml +++ /dev/null @@ -1,24 +0,0 @@ -# Do not edit this file directly. It is generated by https://deno.land/x/fluent_github_actions - -name: Test -on: - push: - branches: - - main -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: denoland/setup-deno@v1 - with: - deno-version: v1.37 - - name: Setup Fluent CI CLI - run: deno install -A -r https://cli.fluentci.io -n fluentci - - name: Setup Dagger - run: | - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - sudo mv bin/dagger /usr/local/bin - dagger version - - name: Run Tests and Build - run: fluentci run rust_pipeline test build diff --git a/.fluentci/gen/nexus.ts b/.fluentci/gen/nexus.ts deleted file mode 100644 index 40c2c83f..00000000 --- a/.fluentci/gen/nexus.ts +++ /dev/null @@ -1,139 +0,0 @@ -/** - * This file was generated by Nexus Schema - * Do not make changes to this file directly - */ - - - - - - - -declare global { - interface NexusGen extends NexusGenTypes {} -} - -export interface NexusGenInputs { -} - -export interface NexusGenEnums { -} - -export interface NexusGenScalars { - String: string - Int: number - Float: number - Boolean: boolean - ID: string -} - -export interface NexusGenObjects { - Query: {}; -} - -export interface NexusGenInterfaces { -} - -export interface NexusGenUnions { -} - -export type NexusGenRootTypes = NexusGenObjects - -export type NexusGenAllTypes = NexusGenRootTypes & NexusGenScalars - -export interface NexusGenFieldTypes { - Query: { // field return type - build: string | null; // String - test: string | null; // String - } -} - -export interface NexusGenFieldTypeNames { - Query: { // field return type name - build: 'String' - test: 'String' - } -} - -export interface NexusGenArgTypes { - Query: { - build: { // args - src: string; // String! - } - test: { // args - src: string; // String! - } - } -} - -export interface NexusGenAbstractTypeMembers { -} - -export interface NexusGenTypeInterfaces { -} - -export type NexusGenObjectNames = keyof NexusGenObjects; - -export type NexusGenInputNames = never; - -export type NexusGenEnumNames = never; - -export type NexusGenInterfaceNames = never; - -export type NexusGenScalarNames = keyof NexusGenScalars; - -export type NexusGenUnionNames = never; - -export type NexusGenObjectsUsingAbstractStrategyIsTypeOf = never; - -export type NexusGenAbstractsUsingStrategyResolveType = never; - -export type NexusGenFeaturesConfig = { - abstractTypeStrategies: { - isTypeOf: false - resolveType: true - __typename: false - } -} - -export interface NexusGenTypes { - context: any; - inputTypes: NexusGenInputs; - rootTypes: NexusGenRootTypes; - inputTypeShapes: NexusGenInputs & NexusGenEnums & NexusGenScalars; - argTypes: NexusGenArgTypes; - fieldTypes: NexusGenFieldTypes; - fieldTypeNames: NexusGenFieldTypeNames; - allTypes: NexusGenAllTypes; - typeInterfaces: NexusGenTypeInterfaces; - objectNames: NexusGenObjectNames; - inputNames: NexusGenInputNames; - enumNames: NexusGenEnumNames; - interfaceNames: NexusGenInterfaceNames; - scalarNames: NexusGenScalarNames; - unionNames: NexusGenUnionNames; - allInputTypes: NexusGenTypes['inputNames'] | NexusGenTypes['enumNames'] | NexusGenTypes['scalarNames']; - allOutputTypes: NexusGenTypes['objectNames'] | NexusGenTypes['enumNames'] | NexusGenTypes['unionNames'] | NexusGenTypes['interfaceNames'] | NexusGenTypes['scalarNames']; - allNamedTypes: NexusGenTypes['allInputTypes'] | NexusGenTypes['allOutputTypes'] - abstractTypes: NexusGenTypes['interfaceNames'] | NexusGenTypes['unionNames']; - abstractTypeMembers: NexusGenAbstractTypeMembers; - objectsUsingAbstractStrategyIsTypeOf: NexusGenObjectsUsingAbstractStrategyIsTypeOf; - abstractsUsingStrategyResolveType: NexusGenAbstractsUsingStrategyResolveType; - features: NexusGenFeaturesConfig; -} - - -declare global { - interface NexusGenPluginTypeConfig { - } - interface NexusGenPluginInputTypeConfig { - } - interface NexusGenPluginFieldConfig { - } - interface NexusGenPluginInputFieldConfig { - } - interface NexusGenPluginSchemaConfig { - } - interface NexusGenPluginArgConfig { - } -} \ No newline at end of file diff --git a/.fluentci/mod.ts b/.fluentci/mod.ts index 52470dd1..a1ca67ad 100644 --- a/.fluentci/mod.ts +++ b/.fluentci/mod.ts @@ -1,3 +1 @@ -export * from "./src/dagger/index.ts"; -export * as queries from "./src/dagger/queries.ts"; -export { schema } from "./src/dagger/schema.ts"; +export * from "./src/mod.ts"; diff --git a/.fluentci/schema.graphql b/.fluentci/schema.graphql deleted file mode 100644 index 33883cab..00000000 --- a/.fluentci/schema.graphql +++ /dev/null @@ -1,8 +0,0 @@ -### This file was generated by Nexus Schema -### Do not make changes to this file directly - - -type Query { - build(src: String!): String - test(src: String!): String -} \ No newline at end of file diff --git a/.fluentci/sdk/builder.ts b/.fluentci/sdk/builder.ts new file mode 100644 index 00000000..10182d6e --- /dev/null +++ b/.fluentci/sdk/builder.ts @@ -0,0 +1,31 @@ +import { createGQLClient } from "./client.ts"; +import { Context } from "./context.ts"; +import { env } from "../deps.ts"; + +/** + * @hidden + * + * Initialize a default client context from environment. + */ +export function initDefaultContext(): Context { + let ctx = new Context(); + + // Prefer DAGGER_SESSION_PORT if set + const daggerSessionPort = env.get("DAGGER_SESSION_PORT"); + if (daggerSessionPort) { + const sessionToken = env.get("DAGGER_SESSION_TOKEN"); + if (!sessionToken) { + throw new Error( + "DAGGER_SESSION_TOKEN must be set when using DAGGER_SESSION_PORT" + ); + } + + ctx = new Context({ + client: createGQLClient(Number(daggerSessionPort), sessionToken), + }); + } else { + throw new Error("DAGGER_SESSION_PORT must be set"); + } + + return ctx; +} diff --git a/.fluentci/sdk/client.gen.ts b/.fluentci/sdk/client.gen.ts new file mode 100644 index 00000000..5e20f826 --- /dev/null +++ b/.fluentci/sdk/client.gen.ts @@ -0,0 +1,8231 @@ +/** + * This file was auto-generated by `client-gen`. + * Do not make direct changes to the file. + */ +import { Context, defaultContext } from "./context.ts"; +import { computeQuery } from "./utils.ts"; + +/** + * @hidden + */ +export type QueryTree = { + operation: string; + args?: Record; +}; + +/** + * @hidden + */ +export type Metadata = { + [key: string]: { + is_enum?: boolean; + }; +}; + +interface ClientConfig { + queryTree?: QueryTree[]; + ctx?: Context; +} + +class BaseClient { + protected _queryTree: QueryTree[]; + protected _ctx: Context; + + /** + * @hidden + */ + constructor({ queryTree, ctx }: ClientConfig = {}) { + this._queryTree = queryTree || []; + this._ctx = ctx || new Context(); + } + + /** + * @hidden + */ + get queryTree() { + return this._queryTree; + } +} + +export type BuildArg = { + /** + * The build argument name. + */ + name: string; + + /** + * The build argument value. + */ + value: string; +}; + +/** + * Sharing mode of the cache volume. + */ +export enum CacheSharingMode { + /** + * Shares the cache volume amongst many build pipelines, but will serialize the writes + */ + Locked = "LOCKED", + + /** + * Keeps a cache volume for a single build pipeline + */ + Private = "PRIVATE", + + /** + * Shares the cache volume amongst many build pipelines + */ + Shared = "SHARED", +} +/** + * The `CacheVolumeID` scalar type represents an identifier for an object of type CacheVolume. + */ +export type CacheVolumeID = string & { __CacheVolumeID: never }; + +export type ContainerAsTarballOpts = { + /** + * Identifiers for other platform specific containers. + * + * Used for multi-platform images. + */ + platformVariants?: Container[]; + + /** + * Force each layer of the image to use the specified compression algorithm. + * + * If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip. + */ + forcedCompression?: ImageLayerCompression; + + /** + * Use the specified media types for the image's layers. + * + * Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support. + */ + mediaTypes?: ImageMediaTypes; +}; + +export type ContainerBuildOpts = { + /** + * Path to the Dockerfile to use. + */ + dockerfile?: string; + + /** + * Target build stage to build. + */ + target?: string; + + /** + * Additional build arguments. + */ + buildArgs?: BuildArg[]; + + /** + * Secrets to pass to the build. + * + * They will be mounted at /run/secrets/[secret-name] in the build container + * + * They can be accessed in the Dockerfile using the "secret" mount type and mount path /run/secrets/[secret-name], e.g. RUN --mount=type=secret,id=my-secret curl [http://example.com?token=$(cat /run/secrets/my-secret)](http://example.com?token=$(cat /run/secrets/my-secret)) + */ + secrets?: Secret[]; +}; + +export type ContainerExportOpts = { + /** + * Identifiers for other platform specific containers. + * + * Used for multi-platform image. + */ + platformVariants?: Container[]; + + /** + * Force each layer of the exported image to use the specified compression algorithm. + * + * If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip. + */ + forcedCompression?: ImageLayerCompression; + + /** + * Use the specified media types for the exported image's layers. + * + * Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support. + */ + mediaTypes?: ImageMediaTypes; +}; + +export type ContainerImportOpts = { + /** + * Identifies the tag to import from the archive, if the archive bundles multiple tags. + */ + tag?: string; +}; + +export type ContainerPipelineOpts = { + /** + * Description of the sub-pipeline. + */ + description?: string; + + /** + * Labels to apply to the sub-pipeline. + */ + labels?: PipelineLabel[]; +}; + +export type ContainerPublishOpts = { + /** + * Identifiers for other platform specific containers. + * + * Used for multi-platform image. + */ + platformVariants?: Container[]; + + /** + * Force each layer of the published image to use the specified compression algorithm. + * + * If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip. + */ + forcedCompression?: ImageLayerCompression; + + /** + * Use the specified media types for the published image's layers. + * + * Defaults to OCI, which is largely compatible with most recent registries, but Docker may be needed for older registries without OCI support. + */ + mediaTypes?: ImageMediaTypes; +}; + +export type ContainerTerminalOpts = { + /** + * If set, override the container's default terminal command and invoke these command arguments instead. + */ + cmd?: string[]; +}; + +export type ContainerWithDirectoryOpts = { + /** + * Patterns to exclude in the written directory (e.g. ["node_modules/**", ".gitignore", ".git/"]). + */ + exclude?: string[]; + + /** + * Patterns to include in the written directory (e.g. ["*.go", "go.mod", "go.sum"]). + */ + include?: string[]; + + /** + * A user:group to set for the directory and its contents. + * + * The user and group can either be an ID (1000:1000) or a name (foo:bar). + * + * If the group is omitted, it defaults to the same as the user. + */ + owner?: string; +}; + +export type ContainerWithEntrypointOpts = { + /** + * Don't remove the default arguments when setting the entrypoint. + */ + keepDefaultArgs?: boolean; +}; + +export type ContainerWithEnvVariableOpts = { + /** + * Replace `${VAR}` or `$VAR` in the value according to the current environment variables defined in the container (e.g., "/opt/bin:$PATH"). + */ + expand?: boolean; +}; + +export type ContainerWithExecOpts = { + /** + * If the container has an entrypoint, ignore it for args rather than using it to wrap them. + */ + skipEntrypoint?: boolean; + + /** + * Content to write to the command's standard input before closing (e.g., "Hello world"). + */ + stdin?: string; + + /** + * Redirect the command's standard output to a file in the container (e.g., "/tmp/stdout"). + */ + redirectStdout?: string; + + /** + * Redirect the command's standard error to a file in the container (e.g., "/tmp/stderr"). + */ + redirectStderr?: string; + + /** + * Provides dagger access to the executed command. + * + * Do not use this option unless you trust the command being executed; the command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM. + */ + experimentalPrivilegedNesting?: boolean; + + /** + * Execute the command with all root capabilities. This is similar to running a command with "sudo" or executing "docker run" with the "--privileged" flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands. + */ + insecureRootCapabilities?: boolean; +}; + +export type ContainerWithExposedPortOpts = { + /** + * Transport layer network protocol + */ + protocol?: NetworkProtocol; + + /** + * Optional port description + */ + description?: string; + + /** + * Skip the health check when run as a service. + */ + experimentalSkipHealthcheck?: boolean; +}; + +export type ContainerWithFileOpts = { + /** + * Permission given to the copied file (e.g., 0600). + */ + permissions?: number; + + /** + * A user:group to set for the file. + * + * The user and group can either be an ID (1000:1000) or a name (foo:bar). + * + * If the group is omitted, it defaults to the same as the user. + */ + owner?: string; +}; + +export type ContainerWithFilesOpts = { + /** + * Permission given to the copied files (e.g., 0600). + */ + permissions?: number; + + /** + * A user:group to set for the files. + * + * The user and group can either be an ID (1000:1000) or a name (foo:bar). + * + * If the group is omitted, it defaults to the same as the user. + */ + owner?: string; +}; + +export type ContainerWithMountedCacheOpts = { + /** + * Identifier of the directory to use as the cache volume's root. + */ + source?: Directory; + + /** + * Sharing mode of the cache volume. + */ + sharing?: CacheSharingMode; + + /** + * A user:group to set for the mounted cache directory. + * + * Note that this changes the ownership of the specified mount along with the initial filesystem provided by source (if any). It does not have any effect if/when the cache has already been created. + * + * The user and group can either be an ID (1000:1000) or a name (foo:bar). + * + * If the group is omitted, it defaults to the same as the user. + */ + owner?: string; +}; + +export type ContainerWithMountedDirectoryOpts = { + /** + * A user:group to set for the mounted directory and its contents. + * + * The user and group can either be an ID (1000:1000) or a name (foo:bar). + * + * If the group is omitted, it defaults to the same as the user. + */ + owner?: string; +}; + +export type ContainerWithMountedFileOpts = { + /** + * A user or user:group to set for the mounted file. + * + * The user and group can either be an ID (1000:1000) or a name (foo:bar). + * + * If the group is omitted, it defaults to the same as the user. + */ + owner?: string; +}; + +export type ContainerWithMountedSecretOpts = { + /** + * A user:group to set for the mounted secret. + * + * The user and group can either be an ID (1000:1000) or a name (foo:bar). + * + * If the group is omitted, it defaults to the same as the user. + */ + owner?: string; + + /** + * Permission given to the mounted secret (e.g., 0600). + * + * This option requires an owner to be set to be active. + */ + mode?: number; +}; + +export type ContainerWithNewFileOpts = { + /** + * Content of the file to write (e.g., "Hello world!"). + */ + contents?: string; + + /** + * Permission given to the written file (e.g., 0600). + */ + permissions?: number; + + /** + * A user:group to set for the file. + * + * The user and group can either be an ID (1000:1000) or a name (foo:bar). + * + * If the group is omitted, it defaults to the same as the user. + */ + owner?: string; +}; + +export type ContainerWithUnixSocketOpts = { + /** + * A user:group to set for the mounted socket. + * + * The user and group can either be an ID (1000:1000) or a name (foo:bar). + * + * If the group is omitted, it defaults to the same as the user. + */ + owner?: string; +}; + +export type ContainerWithoutEntrypointOpts = { + /** + * Don't remove the default arguments when unsetting the entrypoint. + */ + keepDefaultArgs?: boolean; +}; + +export type ContainerWithoutExposedPortOpts = { + /** + * Port protocol to unexpose + */ + protocol?: NetworkProtocol; +}; + +/** + * The `ContainerID` scalar type represents an identifier for an object of type Container. + */ +export type ContainerID = string & { __ContainerID: never }; + +export type CurrentModuleWorkdirOpts = { + /** + * Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]). + */ + exclude?: string[]; + + /** + * Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]). + */ + include?: string[]; +}; + +/** + * The `CurrentModuleID` scalar type represents an identifier for an object of type CurrentModule. + */ +export type CurrentModuleID = string & { __CurrentModuleID: never }; + +export type DirectoryAsModuleOpts = { + /** + * An optional subpath of the directory which contains the module's configuration file. + * + * This is needed when the module code is in a subdirectory but requires parent directories to be loaded in order to execute. For example, the module source code may need a go.mod, project.toml, package.json, etc. file from a parent directory. + * + * If not set, the module source code is loaded from the root of the directory. + */ + sourceRootPath?: string; +}; + +export type DirectoryDockerBuildOpts = { + /** + * The platform to build. + */ + platform?: Platform; + + /** + * Path to the Dockerfile to use (e.g., "frontend.Dockerfile"). + */ + dockerfile?: string; + + /** + * Target build stage to build. + */ + target?: string; + + /** + * Build arguments to use in the build. + */ + buildArgs?: BuildArg[]; + + /** + * Secrets to pass to the build. + * + * They will be mounted at /run/secrets/[secret-name]. + */ + secrets?: Secret[]; +}; + +export type DirectoryEntriesOpts = { + /** + * Location of the directory to look at (e.g., "/src"). + */ + path?: string; +}; + +export type DirectoryPipelineOpts = { + /** + * Description of the sub-pipeline. + */ + description?: string; + + /** + * Labels to apply to the sub-pipeline. + */ + labels?: PipelineLabel[]; +}; + +export type DirectoryWithDirectoryOpts = { + /** + * Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]). + */ + exclude?: string[]; + + /** + * Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]). + */ + include?: string[]; +}; + +export type DirectoryWithFileOpts = { + /** + * Permission given to the copied file (e.g., 0600). + */ + permissions?: number; +}; + +export type DirectoryWithFilesOpts = { + /** + * Permission given to the copied files (e.g., 0600). + */ + permissions?: number; +}; + +export type DirectoryWithNewDirectoryOpts = { + /** + * Permission granted to the created directory (e.g., 0777). + */ + permissions?: number; +}; + +export type DirectoryWithNewFileOpts = { + /** + * Permission given to the copied file (e.g., 0600). + */ + permissions?: number; +}; + +/** + * The `DirectoryID` scalar type represents an identifier for an object of type Directory. + */ +export type DirectoryID = string & { __DirectoryID: never }; + +/** + * The `EnvVariableID` scalar type represents an identifier for an object of type EnvVariable. + */ +export type EnvVariableID = string & { __EnvVariableID: never }; + +/** + * The `FieldTypeDefID` scalar type represents an identifier for an object of type FieldTypeDef. + */ +export type FieldTypeDefID = string & { __FieldTypeDefID: never }; + +export type FileExportOpts = { + /** + * If allowParentDirPath is true, the path argument can be a directory path, in which case the file will be created in that directory. + */ + allowParentDirPath?: boolean; +}; + +/** + * The `FileID` scalar type represents an identifier for an object of type File. + */ +export type FileID = string & { __FileID: never }; + +export type FunctionWithArgOpts = { + /** + * A doc string for the argument, if any + */ + description?: string; + + /** + * A default value to use for this argument if not explicitly set by the caller, if any + */ + defaultValue?: JSON; +}; + +/** + * The `FunctionArgID` scalar type represents an identifier for an object of type FunctionArg. + */ +export type FunctionArgID = string & { __FunctionArgID: never }; + +/** + * The `FunctionCallArgValueID` scalar type represents an identifier for an object of type FunctionCallArgValue. + */ +export type FunctionCallArgValueID = string & { + __FunctionCallArgValueID: never; +}; + +/** + * The `FunctionCallID` scalar type represents an identifier for an object of type FunctionCall. + */ +export type FunctionCallID = string & { __FunctionCallID: never }; + +/** + * The `FunctionID` scalar type represents an identifier for an object of type Function. + */ +export type FunctionID = string & { __FunctionID: never }; + +/** + * The `GeneratedCodeID` scalar type represents an identifier for an object of type GeneratedCode. + */ +export type GeneratedCodeID = string & { __GeneratedCodeID: never }; + +/** + * The `GitModuleSourceID` scalar type represents an identifier for an object of type GitModuleSource. + */ +export type GitModuleSourceID = string & { __GitModuleSourceID: never }; + +export type GitRefTreeOpts = { + /** + * DEPRECATED: This option should be passed to `git` instead. + */ + sshKnownHosts?: string; + + /** + * DEPRECATED: This option should be passed to `git` instead. + */ + sshAuthSocket?: Socket; +}; + +/** + * The `GitRefID` scalar type represents an identifier for an object of type GitRef. + */ +export type GitRefID = string & { __GitRefID: never }; + +/** + * The `GitRepositoryID` scalar type represents an identifier for an object of type GitRepository. + */ +export type GitRepositoryID = string & { __GitRepositoryID: never }; + +export type HostDirectoryOpts = { + /** + * Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]). + */ + exclude?: string[]; + + /** + * Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]). + */ + include?: string[]; +}; + +export type HostServiceOpts = { + /** + * Upstream host to forward traffic to. + */ + host?: string; + + /** + * Ports to expose via the service, forwarding through the host network. + * + * If a port's frontend is unspecified or 0, it defaults to the same as the backend port. + * + * An empty set of ports is not valid; an error will be returned. + */ + ports: PortForward[]; +}; + +export type HostTunnelOpts = { + /** + * Configure explicit port forwarding rules for the tunnel. + * + * If a port's frontend is unspecified or 0, a random port will be chosen by the host. + * + * If no ports are given, all of the service's ports are forwarded. If native is true, each port maps to the same port on the host. If native is false, each port maps to a random port chosen by the host. + * + * If ports are given and native is true, the ports are additive. + */ + ports?: PortForward[]; + + /** + * Map each service port to the same port on the host, as if the service were running natively. + * + * Note: enabling may result in port conflicts. + */ + native?: boolean; +}; + +/** + * The `HostID` scalar type represents an identifier for an object of type Host. + */ +export type HostID = string & { __HostID: never }; + +/** + * Compression algorithm to use for image layers. + */ +export enum ImageLayerCompression { + Estargz = "EStarGZ", + Gzip = "Gzip", + Uncompressed = "Uncompressed", + Zstd = "Zstd", +} +/** + * Mediatypes to use in published or exported image metadata. + */ +export enum ImageMediaTypes { + Dockermediatypes = "DockerMediaTypes", + Ocimediatypes = "OCIMediaTypes", +} +/** + * The `InputTypeDefID` scalar type represents an identifier for an object of type InputTypeDef. + */ +export type InputTypeDefID = string & { __InputTypeDefID: never }; + +/** + * The `InterfaceTypeDefID` scalar type represents an identifier for an object of type InterfaceTypeDef. + */ +export type InterfaceTypeDefID = string & { __InterfaceTypeDefID: never }; + +/** + * An arbitrary JSON-encoded value. + */ +export type JSON = string & { __JSON: never }; + +/** + * The `LabelID` scalar type represents an identifier for an object of type Label. + */ +export type LabelID = string & { __LabelID: never }; + +/** + * The `ListTypeDefID` scalar type represents an identifier for an object of type ListTypeDef. + */ +export type ListTypeDefID = string & { __ListTypeDefID: never }; + +/** + * The `LocalModuleSourceID` scalar type represents an identifier for an object of type LocalModuleSource. + */ +export type LocalModuleSourceID = string & { __LocalModuleSourceID: never }; + +/** + * The `ModuleDependencyID` scalar type represents an identifier for an object of type ModuleDependency. + */ +export type ModuleDependencyID = string & { __ModuleDependencyID: never }; + +/** + * The `ModuleID` scalar type represents an identifier for an object of type Module. + */ +export type ModuleID = string & { __ModuleID: never }; + +/** + * The `ModuleSourceID` scalar type represents an identifier for an object of type ModuleSource. + */ +export type ModuleSourceID = string & { __ModuleSourceID: never }; + +/** + * The kind of module source. + */ +export enum ModuleSourceKind { + GitSource = "GIT_SOURCE", + LocalSource = "LOCAL_SOURCE", +} +/** + * Transport layer network protocol associated to a port. + */ +export enum NetworkProtocol { + Tcp = "TCP", + Udp = "UDP", +} +/** + * The `ObjectTypeDefID` scalar type represents an identifier for an object of type ObjectTypeDef. + */ +export type ObjectTypeDefID = string & { __ObjectTypeDefID: never }; + +export type PipelineLabel = { + /** + * Label name. + */ + name: string; + + /** + * Label value. + */ + value: string; +}; + +/** + * The platform config OS and architecture in a Container. + * + * The format is [os]/[platform]/[version] (e.g., "darwin/arm64/v7", "windows/amd64", "linux/arm64"). + */ +export type Platform = string & { __Platform: never }; + +export type PortForward = { + /** + * Destination port for traffic. + */ + backend: number; + + /** + * Port to expose to clients. If unspecified, a default will be chosen. + */ + frontend?: number; + + /** + * Transport layer protocol to use for traffic. + */ + protocol?: NetworkProtocol; +}; + +/** + * The `PortID` scalar type represents an identifier for an object of type Port. + */ +export type PortID = string & { __PortID: never }; + +export type ClientContainerOpts = { + /** + * DEPRECATED: Use `loadContainerFromID` instead. + */ + id?: ContainerID; + + /** + * Platform to initialize the container with. + */ + platform?: Platform; +}; + +export type ClientDirectoryOpts = { + /** + * DEPRECATED: Use `loadDirectoryFromID` isntead. + */ + id?: DirectoryID; +}; + +export type ClientGitOpts = { + /** + * Set to true to keep .git directory. + */ + keepGitDir?: boolean; + + /** + * A service which must be started before the repo is fetched. + */ + experimentalServiceHost?: Service; + + /** + * Set SSH known hosts + */ + sshKnownHosts?: string; + + /** + * Set SSH auth socket + */ + sshAuthSocket?: Socket; +}; + +export type ClientHttpOpts = { + /** + * A service which must be started before the URL is fetched. + */ + experimentalServiceHost?: Service; +}; + +export type ClientModuleDependencyOpts = { + /** + * If set, the name to use for the dependency. Otherwise, once installed to a parent module, the name of the dependency module will be used by default. + */ + name?: string; +}; + +export type ClientModuleSourceOpts = { + /** + * If true, enforce that the source is a stable version for source kinds that support versioning. + */ + stable?: boolean; +}; + +export type ClientPipelineOpts = { + /** + * Description of the sub-pipeline. + */ + description?: string; + + /** + * Labels to apply to the sub-pipeline. + */ + labels?: PipelineLabel[]; +}; + +export type ClientSecretOpts = { + accessor?: string; +}; + +/** + * The `SecretID` scalar type represents an identifier for an object of type Secret. + */ +export type SecretID = string & { __SecretID: never }; + +export type ServiceEndpointOpts = { + /** + * The exposed port number for the endpoint + */ + port?: number; + + /** + * Return a URL with the given scheme, eg. http for http:// + */ + scheme?: string; +}; + +export type ServiceStopOpts = { + /** + * Immediately kill the service without waiting for a graceful exit + */ + kill?: boolean; +}; + +export type ServiceUpOpts = { + /** + * List of frontend/backend port mappings to forward. + * + * Frontend is the port accepting traffic on the host, backend is the service port. + */ + ports?: PortForward[]; + + /** + * Bind each tunnel port to a random port on the host. + */ + random?: boolean; +}; + +/** + * The `ServiceID` scalar type represents an identifier for an object of type Service. + */ +export type ServiceID = string & { __ServiceID: never }; + +/** + * The `SocketID` scalar type represents an identifier for an object of type Socket. + */ +export type SocketID = string & { __SocketID: never }; + +/** + * The `TerminalID` scalar type represents an identifier for an object of type Terminal. + */ +export type TerminalID = string & { __TerminalID: never }; + +export type TypeDefWithFieldOpts = { + /** + * A doc string for the field, if any + */ + description?: string; +}; + +export type TypeDefWithInterfaceOpts = { + description?: string; +}; + +export type TypeDefWithObjectOpts = { + description?: string; +}; + +/** + * The `TypeDefID` scalar type represents an identifier for an object of type TypeDef. + */ +export type TypeDefID = string & { __TypeDefID: never }; + +/** + * Distinguishes the different kinds of TypeDefs. + */ +export enum TypeDefKind { + /** + * A boolean value. + */ + BooleanKind = "BOOLEAN_KIND", + + /** + * A graphql input type, used only when representing the core API via TypeDefs. + */ + InputKind = "INPUT_KIND", + + /** + * An integer value. + */ + IntegerKind = "INTEGER_KIND", + + /** + * A named type of functions that can be matched+implemented by other objects+interfaces. + * + * Always paired with an InterfaceTypeDef. + */ + InterfaceKind = "INTERFACE_KIND", + + /** + * A list of values all having the same type. + * + * Always paired with a ListTypeDef. + */ + ListKind = "LIST_KIND", + + /** + * A named type defined in the GraphQL schema, with fields and functions. + * + * Always paired with an ObjectTypeDef. + */ + ObjectKind = "OBJECT_KIND", + + /** + * A string value. + */ + StringKind = "STRING_KIND", + + /** + * A special kind used to signify that no value is returned. + * + * This is used for functions that have no return value. The outer TypeDef specifying this Kind is always Optional, as the Void is never actually represented. + */ + VoidKind = "VOID_KIND", +} +/** + * The absence of a value. + * + * A Null Void is used as a placeholder for resolvers that do not return anything. + */ +export type Void = string & { __Void: never }; + +export type __TypeEnumValuesOpts = { + includeDeprecated?: boolean; +}; + +export type __TypeFieldsOpts = { + includeDeprecated?: boolean; +}; + +/** + * A directory whose contents persist across runs. + */ +export class CacheVolume extends BaseClient { + private readonly _id?: CacheVolumeID = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _id?: CacheVolumeID + ) { + super(parent); + + this._id = _id; + } + + /** + * A unique identifier for this CacheVolume. + */ + id = async (): Promise => { + if (this._id) { + return this._id; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response; + }; +} + +/** + * An OCI-compatible container, also known as a Docker container. + */ +export class Container extends BaseClient { + private readonly _id?: ContainerID = undefined; + private readonly _envVariable?: string = undefined; + private readonly _export?: boolean = undefined; + private readonly _imageRef?: string = undefined; + private readonly _label?: string = undefined; + private readonly _platform?: Platform = undefined; + private readonly _publish?: string = undefined; + private readonly _stderr?: string = undefined; + private readonly _stdout?: string = undefined; + private readonly _sync?: ContainerID = undefined; + private readonly _user?: string = undefined; + private readonly _workdir?: string = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _id?: ContainerID, + _envVariable?: string, + _export?: boolean, + _imageRef?: string, + _label?: string, + _platform?: Platform, + _publish?: string, + _stderr?: string, + _stdout?: string, + _sync?: ContainerID, + _user?: string, + _workdir?: string + ) { + super(parent); + + this._id = _id; + this._envVariable = _envVariable; + this._export = _export; + this._imageRef = _imageRef; + this._label = _label; + this._platform = _platform; + this._publish = _publish; + this._stderr = _stderr; + this._stdout = _stdout; + this._sync = _sync; + this._user = _user; + this._workdir = _workdir; + } + + /** + * A unique identifier for this Container. + */ + id = async (): Promise => { + if (this._id) { + return this._id; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Turn the container into a Service. + * + * Be sure to set any exposed ports before this conversion. + */ + asService = (): Service => { + return new Service({ + queryTree: [ + ...this._queryTree, + { + operation: "asService", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Returns a File representing the container serialized to a tarball. + * @param opts.platformVariants Identifiers for other platform specific containers. + * + * Used for multi-platform images. + * @param opts.forcedCompression Force each layer of the image to use the specified compression algorithm. + * + * If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip. + * @param opts.mediaTypes Use the specified media types for the image's layers. + * + * Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support. + */ + asTarball = (opts?: ContainerAsTarballOpts): File => { + const metadata: Metadata = { + forcedCompression: { is_enum: true }, + mediaTypes: { is_enum: true }, + }; + + return new File({ + queryTree: [ + ...this._queryTree, + { + operation: "asTarball", + args: { ...opts, __metadata: metadata }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Initializes this container from a Dockerfile build. + * @param context Directory context used by the Dockerfile. + * @param opts.dockerfile Path to the Dockerfile to use. + * @param opts.target Target build stage to build. + * @param opts.buildArgs Additional build arguments. + * @param opts.secrets Secrets to pass to the build. + * + * They will be mounted at /run/secrets/[secret-name] in the build container + * + * They can be accessed in the Dockerfile using the "secret" mount type and mount path /run/secrets/[secret-name], e.g. RUN --mount=type=secret,id=my-secret curl [http://example.com?token=$(cat /run/secrets/my-secret)](http://example.com?token=$(cat /run/secrets/my-secret)) + */ + build = (context: Directory, opts?: ContainerBuildOpts): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "build", + args: { context, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves default arguments for future commands. + */ + defaultArgs = async (): Promise => { + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "defaultArgs", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Retrieves a directory at the given path. + * + * Mounts are included. + * @param path The path of the directory to retrieve (e.g., "./src"). + */ + directory = (path: string): Directory => { + return new Directory({ + queryTree: [ + ...this._queryTree, + { + operation: "directory", + args: { path }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves entrypoint to be prepended to the arguments of all commands. + */ + entrypoint = async (): Promise => { + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "entrypoint", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Retrieves the value of the specified environment variable. + * @param name The name of the environment variable to retrieve (e.g., "PATH"). + */ + envVariable = async (name: string): Promise => { + if (this._envVariable) { + return this._envVariable; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "envVariable", + args: { name }, + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Retrieves the list of environment variables passed to commands. + */ + envVariables = async (): Promise => { + type envVariables = { + id: EnvVariableID; + }; + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "envVariables", + }, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response.map( + (r) => + new EnvVariable( + { + queryTree: [ + { + operation: "loadEnvVariableFromID", + args: { id: r.id }, + }, + ], + ctx: this._ctx, + }, + r.id + ) + ); + }; + + /** + * EXPERIMENTAL API! Subject to change/removal at any time. + * + * Configures all available GPUs on the host to be accessible to this container. + * + * This currently works for Nvidia devices only. + */ + experimentalWithAllGPUs = (): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "experimentalWithAllGPUs", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * EXPERIMENTAL API! Subject to change/removal at any time. + * + * Configures the provided list of devices to be accesible to this container. + * + * This currently works for Nvidia devices only. + * @param devices List of devices to be accessible to this container. + */ + experimentalWithGPU = (devices: string[]): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "experimentalWithGPU", + args: { devices }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Writes the container as an OCI tarball to the destination file path on the host. + * + * Return true on success. + * + * It can also export platform variants. + * @param path Host's destination path (e.g., "./tarball"). + * + * Path can be relative to the engine's workdir or absolute. + * @param opts.platformVariants Identifiers for other platform specific containers. + * + * Used for multi-platform image. + * @param opts.forcedCompression Force each layer of the exported image to use the specified compression algorithm. + * + * If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip. + * @param opts.mediaTypes Use the specified media types for the exported image's layers. + * + * Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support. + */ + export = async ( + path: string, + opts?: ContainerExportOpts + ): Promise => { + if (this._export) { + return this._export; + } + + const metadata: Metadata = { + forcedCompression: { is_enum: true }, + mediaTypes: { is_enum: true }, + }; + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "export", + args: { path, ...opts, __metadata: metadata }, + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Retrieves the list of exposed ports. + * + * This includes ports already exposed by the image, even if not explicitly added with dagger. + */ + exposedPorts = async (): Promise => { + type exposedPorts = { + id: PortID; + }; + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "exposedPorts", + }, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response.map( + (r) => + new Port( + { + queryTree: [ + { + operation: "loadPortFromID", + args: { id: r.id }, + }, + ], + ctx: this._ctx, + }, + r.id + ) + ); + }; + + /** + * Retrieves a file at the given path. + * + * Mounts are included. + * @param path The path of the file to retrieve (e.g., "./README.md"). + */ + file = (path: string): File => { + return new File({ + queryTree: [ + ...this._queryTree, + { + operation: "file", + args: { path }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Initializes this container from a pulled base image. + * @param address Image's address from its registry. + * + * Formatted as [host]/[user]/[repo]:[tag] (e.g., "docker.io/dagger/dagger:main"). + */ + from = (address: string): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "from", + args: { address }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * The unique image reference which can only be retrieved immediately after the 'Container.From' call. + */ + imageRef = async (): Promise => { + if (this._imageRef) { + return this._imageRef; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "imageRef", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Reads the container from an OCI tarball. + * @param source File to read the container from. + * @param opts.tag Identifies the tag to import from the archive, if the archive bundles multiple tags. + */ + import_ = (source: File, opts?: ContainerImportOpts): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "import", + args: { source, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves the value of the specified label. + * @param name The name of the label (e.g., "org.opencontainers.artifact.created"). + */ + label = async (name: string): Promise => { + if (this._label) { + return this._label; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "label", + args: { name }, + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Retrieves the list of labels passed to container. + */ + labels = async (): Promise => { + type labels = { + id: LabelID; + }; + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "labels", + }, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response.map( + (r) => + new Label( + { + queryTree: [ + { + operation: "loadLabelFromID", + args: { id: r.id }, + }, + ], + ctx: this._ctx, + }, + r.id + ) + ); + }; + + /** + * Retrieves the list of paths where a directory is mounted. + */ + mounts = async (): Promise => { + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "mounts", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Creates a named sub-pipeline. + * @param name Name of the sub-pipeline. + * @param opts.description Description of the sub-pipeline. + * @param opts.labels Labels to apply to the sub-pipeline. + */ + pipeline = (name: string, opts?: ContainerPipelineOpts): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "pipeline", + args: { name, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * The platform this container executes and publishes as. + */ + platform = async (): Promise => { + if (this._platform) { + return this._platform; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "platform", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Publishes this container as a new image to the specified address. + * + * Publish returns a fully qualified ref. + * + * It can also publish platform variants. + * @param address Registry's address to publish the image to. + * + * Formatted as [host]/[user]/[repo]:[tag] (e.g. "docker.io/dagger/dagger:main"). + * @param opts.platformVariants Identifiers for other platform specific containers. + * + * Used for multi-platform image. + * @param opts.forcedCompression Force each layer of the published image to use the specified compression algorithm. + * + * If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip. + * @param opts.mediaTypes Use the specified media types for the published image's layers. + * + * Defaults to OCI, which is largely compatible with most recent registries, but Docker may be needed for older registries without OCI support. + */ + publish = async ( + address: string, + opts?: ContainerPublishOpts + ): Promise => { + if (this._publish) { + return this._publish; + } + + const metadata: Metadata = { + forcedCompression: { is_enum: true }, + mediaTypes: { is_enum: true }, + }; + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "publish", + args: { address, ...opts, __metadata: metadata }, + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Retrieves this container's root filesystem. Mounts are not included. + */ + rootfs = (): Directory => { + return new Directory({ + queryTree: [ + ...this._queryTree, + { + operation: "rootfs", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * The error stream of the last executed command. + * + * Will execute default command if none is set, or error if there's no default. + */ + stderr = async (): Promise => { + if (this._stderr) { + return this._stderr; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "stderr", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The output stream of the last executed command. + * + * Will execute default command if none is set, or error if there's no default. + */ + stdout = async (): Promise => { + if (this._stdout) { + return this._stdout; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "stdout", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Forces evaluation of the pipeline in the engine. + * + * It doesn't run the default command if no exec has been set. + */ + sync = async (): Promise => { + await computeQuery( + [ + ...this._queryTree, + { + operation: "sync", + }, + ], + await this._ctx.connection() + ); + + return this; + }; + + /** + * Return an interactive terminal for this container using its configured default terminal command if not overridden by args (or sh as a fallback default). + * @param opts.cmd If set, override the container's default terminal command and invoke these command arguments instead. + */ + terminal = (opts?: ContainerTerminalOpts): Terminal => { + return new Terminal({ + queryTree: [ + ...this._queryTree, + { + operation: "terminal", + args: { ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves the user to be set for all commands. + */ + user = async (): Promise => { + if (this._user) { + return this._user; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "user", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Configures default arguments for future commands. + * @param args Arguments to prepend to future executions (e.g., ["-v", "--no-cache"]). + */ + withDefaultArgs = (args: string[]): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withDefaultArgs", + args: { args }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Set the default command to invoke for the container's terminal API. + * @param args The args of the command. + */ + withDefaultTerminalCmd = (args: string[]): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withDefaultTerminalCmd", + args: { args }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this container plus a directory written at the given path. + * @param path Location of the written directory (e.g., "/tmp/directory"). + * @param directory Identifier of the directory to write + * @param opts.exclude Patterns to exclude in the written directory (e.g. ["node_modules/**", ".gitignore", ".git/"]). + * @param opts.include Patterns to include in the written directory (e.g. ["*.go", "go.mod", "go.sum"]). + * @param opts.owner A user:group to set for the directory and its contents. + * + * The user and group can either be an ID (1000:1000) or a name (foo:bar). + * + * If the group is omitted, it defaults to the same as the user. + */ + withDirectory = ( + path: string, + directory: Directory, + opts?: ContainerWithDirectoryOpts + ): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withDirectory", + args: { path, directory, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this container but with a different command entrypoint. + * @param args Entrypoint to use for future executions (e.g., ["go", "run"]). + * @param opts.keepDefaultArgs Don't remove the default arguments when setting the entrypoint. + */ + withEntrypoint = ( + args: string[], + opts?: ContainerWithEntrypointOpts + ): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withEntrypoint", + args: { args, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this container plus the given environment variable. + * @param name The name of the environment variable (e.g., "HOST"). + * @param value The value of the environment variable. (e.g., "localhost"). + * @param opts.expand Replace `${VAR}` or `$VAR` in the value according to the current environment variables defined in the container (e.g., "/opt/bin:$PATH"). + */ + withEnvVariable = ( + name: string, + value: string, + opts?: ContainerWithEnvVariableOpts + ): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withEnvVariable", + args: { name, value, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this container after executing the specified command inside it. + * @param args Command to run instead of the container's default command (e.g., ["run", "main.go"]). + * + * If empty, the container's default command is used. + * @param opts.skipEntrypoint If the container has an entrypoint, ignore it for args rather than using it to wrap them. + * @param opts.stdin Content to write to the command's standard input before closing (e.g., "Hello world"). + * @param opts.redirectStdout Redirect the command's standard output to a file in the container (e.g., "/tmp/stdout"). + * @param opts.redirectStderr Redirect the command's standard error to a file in the container (e.g., "/tmp/stderr"). + * @param opts.experimentalPrivilegedNesting Provides dagger access to the executed command. + * + * Do not use this option unless you trust the command being executed; the command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM. + * @param opts.insecureRootCapabilities Execute the command with all root capabilities. This is similar to running a command with "sudo" or executing "docker run" with the "--privileged" flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands. + */ + withExec = (args: string[], opts?: ContainerWithExecOpts): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withExec", + args: { args, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Expose a network port. + * + * Exposed ports serve two purposes: + * + * - For health checks and introspection, when running services + * + * - For setting the EXPOSE OCI field when publishing the container + * @param port Port number to expose + * @param opts.protocol Transport layer network protocol + * @param opts.description Optional port description + * @param opts.experimentalSkipHealthcheck Skip the health check when run as a service. + */ + withExposedPort = ( + port: number, + opts?: ContainerWithExposedPortOpts + ): Container => { + const metadata: Metadata = { + protocol: { is_enum: true }, + }; + + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withExposedPort", + args: { port, ...opts, __metadata: metadata }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this container plus the contents of the given file copied to the given path. + * @param path Location of the copied file (e.g., "/tmp/file.txt"). + * @param source Identifier of the file to copy. + * @param opts.permissions Permission given to the copied file (e.g., 0600). + * @param opts.owner A user:group to set for the file. + * + * The user and group can either be an ID (1000:1000) or a name (foo:bar). + * + * If the group is omitted, it defaults to the same as the user. + */ + withFile = ( + path: string, + source: File, + opts?: ContainerWithFileOpts + ): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withFile", + args: { path, source, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this container plus the contents of the given files copied to the given path. + * @param path Location where copied files should be placed (e.g., "/src"). + * @param sources Identifiers of the files to copy. + * @param opts.permissions Permission given to the copied files (e.g., 0600). + * @param opts.owner A user:group to set for the files. + * + * The user and group can either be an ID (1000:1000) or a name (foo:bar). + * + * If the group is omitted, it defaults to the same as the user. + */ + withFiles = ( + path: string, + sources: File[], + opts?: ContainerWithFilesOpts + ): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withFiles", + args: { path, sources, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Indicate that subsequent operations should be featured more prominently in the UI. + */ + withFocus = (): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withFocus", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this container plus the given label. + * @param name The name of the label (e.g., "org.opencontainers.artifact.created"). + * @param value The value of the label (e.g., "2023-01-01T00:00:00Z"). + */ + withLabel = (name: string, value: string): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withLabel", + args: { name, value }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this container plus a cache volume mounted at the given path. + * @param path Location of the cache directory (e.g., "/cache/node_modules"). + * @param cache Identifier of the cache volume to mount. + * @param opts.source Identifier of the directory to use as the cache volume's root. + * @param opts.sharing Sharing mode of the cache volume. + * @param opts.owner A user:group to set for the mounted cache directory. + * + * Note that this changes the ownership of the specified mount along with the initial filesystem provided by source (if any). It does not have any effect if/when the cache has already been created. + * + * The user and group can either be an ID (1000:1000) or a name (foo:bar). + * + * If the group is omitted, it defaults to the same as the user. + */ + withMountedCache = ( + path: string, + cache: CacheVolume, + opts?: ContainerWithMountedCacheOpts + ): Container => { + const metadata: Metadata = { + sharing: { is_enum: true }, + }; + + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withMountedCache", + args: { path, cache, ...opts, __metadata: metadata }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this container plus a directory mounted at the given path. + * @param path Location of the mounted directory (e.g., "/mnt/directory"). + * @param source Identifier of the mounted directory. + * @param opts.owner A user:group to set for the mounted directory and its contents. + * + * The user and group can either be an ID (1000:1000) or a name (foo:bar). + * + * If the group is omitted, it defaults to the same as the user. + */ + withMountedDirectory = ( + path: string, + source: Directory, + opts?: ContainerWithMountedDirectoryOpts + ): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withMountedDirectory", + args: { path, source, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this container plus a file mounted at the given path. + * @param path Location of the mounted file (e.g., "/tmp/file.txt"). + * @param source Identifier of the mounted file. + * @param opts.owner A user or user:group to set for the mounted file. + * + * The user and group can either be an ID (1000:1000) or a name (foo:bar). + * + * If the group is omitted, it defaults to the same as the user. + */ + withMountedFile = ( + path: string, + source: File, + opts?: ContainerWithMountedFileOpts + ): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withMountedFile", + args: { path, source, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this container plus a secret mounted into a file at the given path. + * @param path Location of the secret file (e.g., "/tmp/secret.txt"). + * @param source Identifier of the secret to mount. + * @param opts.owner A user:group to set for the mounted secret. + * + * The user and group can either be an ID (1000:1000) or a name (foo:bar). + * + * If the group is omitted, it defaults to the same as the user. + * @param opts.mode Permission given to the mounted secret (e.g., 0600). + * + * This option requires an owner to be set to be active. + */ + withMountedSecret = ( + path: string, + source: Secret, + opts?: ContainerWithMountedSecretOpts + ): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withMountedSecret", + args: { path, source, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this container plus a temporary directory mounted at the given path. + * @param path Location of the temporary directory (e.g., "/tmp/temp_dir"). + */ + withMountedTemp = (path: string): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withMountedTemp", + args: { path }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this container plus a new file written at the given path. + * @param path Location of the written file (e.g., "/tmp/file.txt"). + * @param opts.contents Content of the file to write (e.g., "Hello world!"). + * @param opts.permissions Permission given to the written file (e.g., 0600). + * @param opts.owner A user:group to set for the file. + * + * The user and group can either be an ID (1000:1000) or a name (foo:bar). + * + * If the group is omitted, it defaults to the same as the user. + */ + withNewFile = (path: string, opts?: ContainerWithNewFileOpts): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withNewFile", + args: { path, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this container with a registry authentication for a given address. + * @param address Registry's address to bind the authentication to. + * + * Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main). + * @param username The username of the registry's account (e.g., "Dagger"). + * @param secret The API key, password or token to authenticate to this registry. + */ + withRegistryAuth = ( + address: string, + username: string, + secret: Secret + ): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withRegistryAuth", + args: { address, username, secret }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves the container with the given directory mounted to /. + * @param directory Directory to mount. + */ + withRootfs = (directory: Directory): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withRootfs", + args: { directory }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this container plus an env variable containing the given secret. + * @param name The name of the secret variable (e.g., "API_SECRET"). + * @param secret The identifier of the secret value. + */ + withSecretVariable = (name: string, secret: Secret): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withSecretVariable", + args: { name, secret }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Establish a runtime dependency on a service. + * + * The service will be started automatically when needed and detached when it is no longer needed, executing the default command if none is set. + * + * The service will be reachable from the container via the provided hostname alias. + * + * The service dependency will also convey to any files or directories produced by the container. + * @param alias A name that can be used to reach the service from the container + * @param service Identifier of the service container + */ + withServiceBinding = (alias: string, service: Service): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withServiceBinding", + args: { alias, service }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this container plus a socket forwarded to the given Unix socket path. + * @param path Location of the forwarded Unix socket (e.g., "/tmp/socket"). + * @param source Identifier of the socket to forward. + * @param opts.owner A user:group to set for the mounted socket. + * + * The user and group can either be an ID (1000:1000) or a name (foo:bar). + * + * If the group is omitted, it defaults to the same as the user. + */ + withUnixSocket = ( + path: string, + source: Socket, + opts?: ContainerWithUnixSocketOpts + ): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withUnixSocket", + args: { path, source, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this container with a different command user. + * @param name The user to set (e.g., "root"). + */ + withUser = (name: string): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withUser", + args: { name }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this container with a different working directory. + * @param path The path to set as the working directory (e.g., "/app"). + */ + withWorkdir = (path: string): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withWorkdir", + args: { path }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this container with unset default arguments for future commands. + */ + withoutDefaultArgs = (): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withoutDefaultArgs", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this container with an unset command entrypoint. + * @param opts.keepDefaultArgs Don't remove the default arguments when unsetting the entrypoint. + */ + withoutEntrypoint = (opts?: ContainerWithoutEntrypointOpts): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withoutEntrypoint", + args: { ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this container minus the given environment variable. + * @param name The name of the environment variable (e.g., "HOST"). + */ + withoutEnvVariable = (name: string): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withoutEnvVariable", + args: { name }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Unexpose a previously exposed port. + * @param port Port number to unexpose + * @param opts.protocol Port protocol to unexpose + */ + withoutExposedPort = ( + port: number, + opts?: ContainerWithoutExposedPortOpts + ): Container => { + const metadata: Metadata = { + protocol: { is_enum: true }, + }; + + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withoutExposedPort", + args: { port, ...opts, __metadata: metadata }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Indicate that subsequent operations should not be featured more prominently in the UI. + * + * This is the initial state of all containers. + */ + withoutFocus = (): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withoutFocus", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this container minus the given environment label. + * @param name The name of the label to remove (e.g., "org.opencontainers.artifact.created"). + */ + withoutLabel = (name: string): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withoutLabel", + args: { name }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this container after unmounting everything at the given path. + * @param path Location of the cache directory (e.g., "/cache/node_modules"). + */ + withoutMount = (path: string): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withoutMount", + args: { path }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this container without the registry authentication of a given address. + * @param address Registry's address to remove the authentication from. + * + * Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main). + */ + withoutRegistryAuth = (address: string): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withoutRegistryAuth", + args: { address }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this container with a previously added Unix socket removed. + * @param path Location of the socket to remove (e.g., "/tmp/socket"). + */ + withoutUnixSocket = (path: string): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withoutUnixSocket", + args: { path }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this container with an unset command user. + * + * Should default to root. + */ + withoutUser = (): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withoutUser", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this container with an unset working directory. + * + * Should default to "/". + */ + withoutWorkdir = (): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "withoutWorkdir", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves the working directory for all commands. + */ + workdir = async (): Promise => { + if (this._workdir) { + return this._workdir; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "workdir", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Call the provided function with current Container. + * + * This is useful for reusability and readability by not breaking the calling chain. + */ + with = (arg: (param: Container) => Container) => { + return arg(this); + }; +} + +/** + * Reflective module API provided to functions at runtime. + */ +export class CurrentModule extends BaseClient { + private readonly _id?: CurrentModuleID = undefined; + private readonly _name?: string = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _id?: CurrentModuleID, + _name?: string + ) { + super(parent); + + this._id = _id; + this._name = _name; + } + + /** + * A unique identifier for this CurrentModule. + */ + id = async (): Promise => { + if (this._id) { + return this._id; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The name of the module being executed in + */ + name = async (): Promise => { + if (this._name) { + return this._name; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "name", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The directory containing the module's source code loaded into the engine (plus any generated code that may have been created). + */ + source = (): Directory => { + return new Directory({ + queryTree: [ + ...this._queryTree, + { + operation: "source", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a directory from the module's scratch working directory, including any changes that may have been made to it during module function execution. + * @param path Location of the directory to access (e.g., "."). + * @param opts.exclude Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]). + * @param opts.include Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]). + */ + workdir = (path: string, opts?: CurrentModuleWorkdirOpts): Directory => { + return new Directory({ + queryTree: [ + ...this._queryTree, + { + operation: "workdir", + args: { path, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a file from the module's scratch working directory, including any changes that may have been made to it during module function execution.Load a file from the module's scratch working directory, including any changes that may have been made to it during module function execution. + * @param path Location of the file to retrieve (e.g., "README.md"). + */ + workdirFile = (path: string): File => { + return new File({ + queryTree: [ + ...this._queryTree, + { + operation: "workdirFile", + args: { path }, + }, + ], + ctx: this._ctx, + }); + }; +} + +/** + * A directory. + */ +export class Directory extends BaseClient { + private readonly _id?: DirectoryID = undefined; + private readonly _export?: boolean = undefined; + private readonly _sync?: DirectoryID = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _id?: DirectoryID, + _export?: boolean, + _sync?: DirectoryID + ) { + super(parent); + + this._id = _id; + this._export = _export; + this._sync = _sync; + } + + /** + * A unique identifier for this Directory. + */ + id = async (): Promise => { + if (this._id) { + return this._id; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Load the directory as a Dagger module + * @param opts.sourceRootPath An optional subpath of the directory which contains the module's configuration file. + * + * This is needed when the module code is in a subdirectory but requires parent directories to be loaded in order to execute. For example, the module source code may need a go.mod, project.toml, package.json, etc. file from a parent directory. + * + * If not set, the module source code is loaded from the root of the directory. + */ + asModule = (opts?: DirectoryAsModuleOpts): Module_ => { + return new Module_({ + queryTree: [ + ...this._queryTree, + { + operation: "asModule", + args: { ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Gets the difference between this directory and an another directory. + * @param other Identifier of the directory to compare. + */ + diff = (other: Directory): Directory => { + return new Directory({ + queryTree: [ + ...this._queryTree, + { + operation: "diff", + args: { other }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves a directory at the given path. + * @param path Location of the directory to retrieve (e.g., "/src"). + */ + directory = (path: string): Directory => { + return new Directory({ + queryTree: [ + ...this._queryTree, + { + operation: "directory", + args: { path }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Builds a new Docker container from this directory. + * @param opts.platform The platform to build. + * @param opts.dockerfile Path to the Dockerfile to use (e.g., "frontend.Dockerfile"). + * @param opts.target Target build stage to build. + * @param opts.buildArgs Build arguments to use in the build. + * @param opts.secrets Secrets to pass to the build. + * + * They will be mounted at /run/secrets/[secret-name]. + */ + dockerBuild = (opts?: DirectoryDockerBuildOpts): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "dockerBuild", + args: { ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Returns a list of files and directories at the given path. + * @param opts.path Location of the directory to look at (e.g., "/src"). + */ + entries = async (opts?: DirectoryEntriesOpts): Promise => { + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "entries", + args: { ...opts }, + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Writes the contents of the directory to a path on the host. + * @param path Location of the copied directory (e.g., "logs/"). + */ + export = async (path: string): Promise => { + if (this._export) { + return this._export; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "export", + args: { path }, + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Retrieves a file at the given path. + * @param path Location of the file to retrieve (e.g., "README.md"). + */ + file = (path: string): File => { + return new File({ + queryTree: [ + ...this._queryTree, + { + operation: "file", + args: { path }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Returns a list of files and directories that matche the given pattern. + * @param pattern Pattern to match (e.g., "*.md"). + */ + glob = async (pattern: string): Promise => { + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "glob", + args: { pattern }, + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Creates a named sub-pipeline. + * @param name Name of the sub-pipeline. + * @param opts.description Description of the sub-pipeline. + * @param opts.labels Labels to apply to the sub-pipeline. + */ + pipeline = (name: string, opts?: DirectoryPipelineOpts): Directory => { + return new Directory({ + queryTree: [ + ...this._queryTree, + { + operation: "pipeline", + args: { name, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Force evaluation in the engine. + */ + sync = async (): Promise => { + await computeQuery( + [ + ...this._queryTree, + { + operation: "sync", + }, + ], + await this._ctx.connection() + ); + + return this; + }; + + /** + * Retrieves this directory plus a directory written at the given path. + * @param path Location of the written directory (e.g., "/src/"). + * @param directory Identifier of the directory to copy. + * @param opts.exclude Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]). + * @param opts.include Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]). + */ + withDirectory = ( + path: string, + directory: Directory, + opts?: DirectoryWithDirectoryOpts + ): Directory => { + return new Directory({ + queryTree: [ + ...this._queryTree, + { + operation: "withDirectory", + args: { path, directory, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this directory plus the contents of the given file copied to the given path. + * @param path Location of the copied file (e.g., "/file.txt"). + * @param source Identifier of the file to copy. + * @param opts.permissions Permission given to the copied file (e.g., 0600). + */ + withFile = ( + path: string, + source: File, + opts?: DirectoryWithFileOpts + ): Directory => { + return new Directory({ + queryTree: [ + ...this._queryTree, + { + operation: "withFile", + args: { path, source, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this directory plus the contents of the given files copied to the given path. + * @param path Location where copied files should be placed (e.g., "/src"). + * @param sources Identifiers of the files to copy. + * @param opts.permissions Permission given to the copied files (e.g., 0600). + */ + withFiles = ( + path: string, + sources: File[], + opts?: DirectoryWithFilesOpts + ): Directory => { + return new Directory({ + queryTree: [ + ...this._queryTree, + { + operation: "withFiles", + args: { path, sources, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this directory plus a new directory created at the given path. + * @param path Location of the directory created (e.g., "/logs"). + * @param opts.permissions Permission granted to the created directory (e.g., 0777). + */ + withNewDirectory = ( + path: string, + opts?: DirectoryWithNewDirectoryOpts + ): Directory => { + return new Directory({ + queryTree: [ + ...this._queryTree, + { + operation: "withNewDirectory", + args: { path, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this directory plus a new file written at the given path. + * @param path Location of the written file (e.g., "/file.txt"). + * @param contents Content of the written file (e.g., "Hello world!"). + * @param opts.permissions Permission given to the copied file (e.g., 0600). + */ + withNewFile = ( + path: string, + contents: string, + opts?: DirectoryWithNewFileOpts + ): Directory => { + return new Directory({ + queryTree: [ + ...this._queryTree, + { + operation: "withNewFile", + args: { path, contents, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this directory with all file/dir timestamps set to the given time. + * @param timestamp Timestamp to set dir/files in. + * + * Formatted in seconds following Unix epoch (e.g., 1672531199). + */ + withTimestamps = (timestamp: number): Directory => { + return new Directory({ + queryTree: [ + ...this._queryTree, + { + operation: "withTimestamps", + args: { timestamp }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this directory with the directory at the given path removed. + * @param path Location of the directory to remove (e.g., ".github/"). + */ + withoutDirectory = (path: string): Directory => { + return new Directory({ + queryTree: [ + ...this._queryTree, + { + operation: "withoutDirectory", + args: { path }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves this directory with the file at the given path removed. + * @param path Location of the file to remove (e.g., "/file.txt"). + */ + withoutFile = (path: string): Directory => { + return new Directory({ + queryTree: [ + ...this._queryTree, + { + operation: "withoutFile", + args: { path }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Call the provided function with current Directory. + * + * This is useful for reusability and readability by not breaking the calling chain. + */ + with = (arg: (param: Directory) => Directory) => { + return arg(this); + }; +} + +/** + * An environment variable name and value. + */ +export class EnvVariable extends BaseClient { + private readonly _id?: EnvVariableID = undefined; + private readonly _name?: string = undefined; + private readonly _value?: string = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _id?: EnvVariableID, + _name?: string, + _value?: string + ) { + super(parent); + + this._id = _id; + this._name = _name; + this._value = _value; + } + + /** + * A unique identifier for this EnvVariable. + */ + id = async (): Promise => { + if (this._id) { + return this._id; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The environment variable name. + */ + name = async (): Promise => { + if (this._name) { + return this._name; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "name", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The environment variable value. + */ + value = async (): Promise => { + if (this._value) { + return this._value; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "value", + }, + ], + await this._ctx.connection() + ); + + return response; + }; +} + +/** + * A definition of a field on a custom object defined in a Module. + * + * A field on an object has a static value, as opposed to a function on an object whose value is computed by invoking code (and can accept arguments). + */ +export class FieldTypeDef extends BaseClient { + private readonly _id?: FieldTypeDefID = undefined; + private readonly _description?: string = undefined; + private readonly _name?: string = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _id?: FieldTypeDefID, + _description?: string, + _name?: string + ) { + super(parent); + + this._id = _id; + this._description = _description; + this._name = _name; + } + + /** + * A unique identifier for this FieldTypeDef. + */ + id = async (): Promise => { + if (this._id) { + return this._id; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * A doc string for the field, if any. + */ + description = async (): Promise => { + if (this._description) { + return this._description; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "description", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The name of the field in lowerCamelCase format. + */ + name = async (): Promise => { + if (this._name) { + return this._name; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "name", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The type of the field. + */ + typeDef = (): TypeDef => { + return new TypeDef({ + queryTree: [ + ...this._queryTree, + { + operation: "typeDef", + }, + ], + ctx: this._ctx, + }); + }; +} + +/** + * A file. + */ +export class File extends BaseClient { + private readonly _id?: FileID = undefined; + private readonly _contents?: string = undefined; + private readonly _export?: boolean = undefined; + private readonly _name?: string = undefined; + private readonly _size?: number = undefined; + private readonly _sync?: FileID = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _id?: FileID, + _contents?: string, + _export?: boolean, + _name?: string, + _size?: number, + _sync?: FileID + ) { + super(parent); + + this._id = _id; + this._contents = _contents; + this._export = _export; + this._name = _name; + this._size = _size; + this._sync = _sync; + } + + /** + * A unique identifier for this File. + */ + id = async (): Promise => { + if (this._id) { + return this._id; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Retrieves the contents of the file. + */ + contents = async (): Promise => { + if (this._contents) { + return this._contents; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "contents", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Writes the file to a file path on the host. + * @param path Location of the written directory (e.g., "output.txt"). + * @param opts.allowParentDirPath If allowParentDirPath is true, the path argument can be a directory path, in which case the file will be created in that directory. + */ + export = async (path: string, opts?: FileExportOpts): Promise => { + if (this._export) { + return this._export; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "export", + args: { path, ...opts }, + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Retrieves the name of the file. + */ + name = async (): Promise => { + if (this._name) { + return this._name; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "name", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Retrieves the size of the file, in bytes. + */ + size = async (): Promise => { + if (this._size) { + return this._size; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "size", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Force evaluation in the engine. + */ + sync = async (): Promise => { + await computeQuery( + [ + ...this._queryTree, + { + operation: "sync", + }, + ], + await this._ctx.connection() + ); + + return this; + }; + + /** + * Retrieves this file with its created/modified timestamps set to the given time. + * @param timestamp Timestamp to set dir/files in. + * + * Formatted in seconds following Unix epoch (e.g., 1672531199). + */ + withTimestamps = (timestamp: number): File => { + return new File({ + queryTree: [ + ...this._queryTree, + { + operation: "withTimestamps", + args: { timestamp }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Call the provided function with current File. + * + * This is useful for reusability and readability by not breaking the calling chain. + */ + with = (arg: (param: File) => File) => { + return arg(this); + }; +} + +/** + * Function represents a resolver provided by a Module. + * + * A function always evaluates against a parent object and is given a set of named arguments. + */ +export class Function_ extends BaseClient { + private readonly _id?: FunctionID = undefined; + private readonly _description?: string = undefined; + private readonly _name?: string = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _id?: FunctionID, + _description?: string, + _name?: string + ) { + super(parent); + + this._id = _id; + this._description = _description; + this._name = _name; + } + + /** + * A unique identifier for this Function. + */ + id = async (): Promise => { + if (this._id) { + return this._id; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Arguments accepted by the function, if any. + */ + args = async (): Promise => { + type args = { + id: FunctionArgID; + }; + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "args", + }, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response.map( + (r) => + new FunctionArg( + { + queryTree: [ + { + operation: "loadFunctionArgFromID", + args: { id: r.id }, + }, + ], + ctx: this._ctx, + }, + r.id + ) + ); + }; + + /** + * A doc string for the function, if any. + */ + description = async (): Promise => { + if (this._description) { + return this._description; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "description", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The name of the function. + */ + name = async (): Promise => { + if (this._name) { + return this._name; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "name", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The type returned by the function. + */ + returnType = (): TypeDef => { + return new TypeDef({ + queryTree: [ + ...this._queryTree, + { + operation: "returnType", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Returns the function with the provided argument + * @param name The name of the argument + * @param typeDef The type of the argument + * @param opts.description A doc string for the argument, if any + * @param opts.defaultValue A default value to use for this argument if not explicitly set by the caller, if any + */ + withArg = ( + name: string, + typeDef: TypeDef, + opts?: FunctionWithArgOpts + ): Function_ => { + return new Function_({ + queryTree: [ + ...this._queryTree, + { + operation: "withArg", + args: { name, typeDef, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Returns the function with the given doc string. + * @param description The doc string to set. + */ + withDescription = (description: string): Function_ => { + return new Function_({ + queryTree: [ + ...this._queryTree, + { + operation: "withDescription", + args: { description }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Call the provided function with current Function. + * + * This is useful for reusability and readability by not breaking the calling chain. + */ + with = (arg: (param: Function_) => Function_) => { + return arg(this); + }; +} + +/** + * An argument accepted by a function. + * + * This is a specification for an argument at function definition time, not an argument passed at function call time. + */ +export class FunctionArg extends BaseClient { + private readonly _id?: FunctionArgID = undefined; + private readonly _defaultValue?: JSON = undefined; + private readonly _description?: string = undefined; + private readonly _name?: string = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _id?: FunctionArgID, + _defaultValue?: JSON, + _description?: string, + _name?: string + ) { + super(parent); + + this._id = _id; + this._defaultValue = _defaultValue; + this._description = _description; + this._name = _name; + } + + /** + * A unique identifier for this FunctionArg. + */ + id = async (): Promise => { + if (this._id) { + return this._id; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * A default value to use for this argument when not explicitly set by the caller, if any. + */ + defaultValue = async (): Promise => { + if (this._defaultValue) { + return this._defaultValue; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "defaultValue", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * A doc string for the argument, if any. + */ + description = async (): Promise => { + if (this._description) { + return this._description; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "description", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The name of the argument in lowerCamelCase format. + */ + name = async (): Promise => { + if (this._name) { + return this._name; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "name", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The type of the argument. + */ + typeDef = (): TypeDef => { + return new TypeDef({ + queryTree: [ + ...this._queryTree, + { + operation: "typeDef", + }, + ], + ctx: this._ctx, + }); + }; +} + +/** + * An active function call. + */ +export class FunctionCall extends BaseClient { + private readonly _id?: FunctionCallID = undefined; + private readonly _name?: string = undefined; + private readonly _parent?: JSON = undefined; + private readonly _parentName?: string = undefined; + private readonly _returnValue?: Void = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _id?: FunctionCallID, + _name?: string, + _parent?: JSON, + _parentName?: string, + _returnValue?: Void + ) { + super(parent); + + this._id = _id; + this._name = _name; + this._parent = _parent; + this._parentName = _parentName; + this._returnValue = _returnValue; + } + + /** + * A unique identifier for this FunctionCall. + */ + id = async (): Promise => { + if (this._id) { + return this._id; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The argument values the function is being invoked with. + */ + inputArgs = async (): Promise => { + type inputArgs = { + id: FunctionCallArgValueID; + }; + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "inputArgs", + }, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response.map( + (r) => + new FunctionCallArgValue( + { + queryTree: [ + { + operation: "loadFunctionCallArgValueFromID", + args: { id: r.id }, + }, + ], + ctx: this._ctx, + }, + r.id + ) + ); + }; + + /** + * The name of the function being called. + */ + name = async (): Promise => { + if (this._name) { + return this._name; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "name", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The value of the parent object of the function being called. If the function is top-level to the module, this is always an empty object. + */ + parent = async (): Promise => { + if (this._parent) { + return this._parent; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "parent", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The name of the parent object of the function being called. If the function is top-level to the module, this is the name of the module. + */ + parentName = async (): Promise => { + if (this._parentName) { + return this._parentName; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "parentName", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Set the return value of the function call to the provided value. + * @param value JSON serialization of the return value. + */ + returnValue = async (value: JSON): Promise => { + if (this._returnValue) { + return this._returnValue; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "returnValue", + args: { value }, + }, + ], + await this._ctx.connection() + ); + + return response; + }; +} + +/** + * A value passed as a named argument to a function call. + */ +export class FunctionCallArgValue extends BaseClient { + private readonly _id?: FunctionCallArgValueID = undefined; + private readonly _name?: string = undefined; + private readonly _value?: JSON = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _id?: FunctionCallArgValueID, + _name?: string, + _value?: JSON + ) { + super(parent); + + this._id = _id; + this._name = _name; + this._value = _value; + } + + /** + * A unique identifier for this FunctionCallArgValue. + */ + id = async (): Promise => { + if (this._id) { + return this._id; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The name of the argument. + */ + name = async (): Promise => { + if (this._name) { + return this._name; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "name", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The value of the argument represented as a JSON serialized string. + */ + value = async (): Promise => { + if (this._value) { + return this._value; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "value", + }, + ], + await this._ctx.connection() + ); + + return response; + }; +} + +/** + * The result of running an SDK's codegen. + */ +export class GeneratedCode extends BaseClient { + private readonly _id?: GeneratedCodeID = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _id?: GeneratedCodeID + ) { + super(parent); + + this._id = _id; + } + + /** + * A unique identifier for this GeneratedCode. + */ + id = async (): Promise => { + if (this._id) { + return this._id; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The directory containing the generated code. + */ + code = (): Directory => { + return new Directory({ + queryTree: [ + ...this._queryTree, + { + operation: "code", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * List of paths to mark generated in version control (i.e. .gitattributes). + */ + vcsGeneratedPaths = async (): Promise => { + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "vcsGeneratedPaths", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * List of paths to ignore in version control (i.e. .gitignore). + */ + vcsIgnoredPaths = async (): Promise => { + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "vcsIgnoredPaths", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Set the list of paths to mark generated in version control. + */ + withVCSGeneratedPaths = (paths: string[]): GeneratedCode => { + return new GeneratedCode({ + queryTree: [ + ...this._queryTree, + { + operation: "withVCSGeneratedPaths", + args: { paths }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Set the list of paths to ignore in version control. + */ + withVCSIgnoredPaths = (paths: string[]): GeneratedCode => { + return new GeneratedCode({ + queryTree: [ + ...this._queryTree, + { + operation: "withVCSIgnoredPaths", + args: { paths }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Call the provided function with current GeneratedCode. + * + * This is useful for reusability and readability by not breaking the calling chain. + */ + with = (arg: (param: GeneratedCode) => GeneratedCode) => { + return arg(this); + }; +} + +/** + * Module source originating from a git repo. + */ +export class GitModuleSource extends BaseClient { + private readonly _id?: GitModuleSourceID = undefined; + private readonly _cloneURL?: string = undefined; + private readonly _commit?: string = undefined; + private readonly _htmlURL?: string = undefined; + private readonly _rootSubpath?: string = undefined; + private readonly _version?: string = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _id?: GitModuleSourceID, + _cloneURL?: string, + _commit?: string, + _htmlURL?: string, + _rootSubpath?: string, + _version?: string + ) { + super(parent); + + this._id = _id; + this._cloneURL = _cloneURL; + this._commit = _commit; + this._htmlURL = _htmlURL; + this._rootSubpath = _rootSubpath; + this._version = _version; + } + + /** + * A unique identifier for this GitModuleSource. + */ + id = async (): Promise => { + if (this._id) { + return this._id; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The URL from which the source's git repo can be cloned. + */ + cloneURL = async (): Promise => { + if (this._cloneURL) { + return this._cloneURL; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "cloneURL", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The resolved commit of the git repo this source points to. + */ + commit = async (): Promise => { + if (this._commit) { + return this._commit; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "commit", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The directory containing everything needed to load load and use the module. + */ + contextDirectory = (): Directory => { + return new Directory({ + queryTree: [ + ...this._queryTree, + { + operation: "contextDirectory", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * The URL to the source's git repo in a web browser + */ + htmlURL = async (): Promise => { + if (this._htmlURL) { + return this._htmlURL; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "htmlURL", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The path to the root of the module source under the context directory. This directory contains its configuration file. It also contains its source code (possibly as a subdirectory). + */ + rootSubpath = async (): Promise => { + if (this._rootSubpath) { + return this._rootSubpath; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "rootSubpath", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The specified version of the git repo this source points to. + */ + version = async (): Promise => { + if (this._version) { + return this._version; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "version", + }, + ], + await this._ctx.connection() + ); + + return response; + }; +} + +/** + * A git ref (tag, branch, or commit). + */ +export class GitRef extends BaseClient { + private readonly _id?: GitRefID = undefined; + private readonly _commit?: string = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _id?: GitRefID, + _commit?: string + ) { + super(parent); + + this._id = _id; + this._commit = _commit; + } + + /** + * A unique identifier for this GitRef. + */ + id = async (): Promise => { + if (this._id) { + return this._id; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The resolved commit id at this ref. + */ + commit = async (): Promise => { + if (this._commit) { + return this._commit; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "commit", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The filesystem tree at this ref. + * @param opts.sshKnownHosts DEPRECATED: This option should be passed to `git` instead. + * @param opts.sshAuthSocket DEPRECATED: This option should be passed to `git` instead. + */ + tree = (opts?: GitRefTreeOpts): Directory => { + return new Directory({ + queryTree: [ + ...this._queryTree, + { + operation: "tree", + args: { ...opts }, + }, + ], + ctx: this._ctx, + }); + }; +} + +/** + * A git repository. + */ +export class GitRepository extends BaseClient { + private readonly _id?: GitRepositoryID = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _id?: GitRepositoryID + ) { + super(parent); + + this._id = _id; + } + + /** + * A unique identifier for this GitRepository. + */ + id = async (): Promise => { + if (this._id) { + return this._id; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Returns details of a branch. + * @param name Branch's name (e.g., "main"). + */ + branch = (name: string): GitRef => { + return new GitRef({ + queryTree: [ + ...this._queryTree, + { + operation: "branch", + args: { name }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Returns details of a commit. + * @param id Identifier of the commit (e.g., "b6315d8f2810962c601af73f86831f6866ea798b"). + */ + commit = (id: string): GitRef => { + return new GitRef({ + queryTree: [ + ...this._queryTree, + { + operation: "commit", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Returns details of a ref. + * @param name Ref's name (can be a commit identifier, a tag name, a branch name, or a fully-qualified ref). + */ + ref = (name: string): GitRef => { + return new GitRef({ + queryTree: [ + ...this._queryTree, + { + operation: "ref", + args: { name }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Returns details of a tag. + * @param name Tag's name (e.g., "v0.3.9"). + */ + tag = (name: string): GitRef => { + return new GitRef({ + queryTree: [ + ...this._queryTree, + { + operation: "tag", + args: { name }, + }, + ], + ctx: this._ctx, + }); + }; +} + +/** + * Information about the host environment. + */ +export class Host extends BaseClient { + private readonly _id?: HostID = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _id?: HostID + ) { + super(parent); + + this._id = _id; + } + + /** + * A unique identifier for this Host. + */ + id = async (): Promise => { + if (this._id) { + return this._id; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Accesses a directory on the host. + * @param path Location of the directory to access (e.g., "."). + * @param opts.exclude Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]). + * @param opts.include Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]). + */ + directory = (path: string, opts?: HostDirectoryOpts): Directory => { + return new Directory({ + queryTree: [ + ...this._queryTree, + { + operation: "directory", + args: { path, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Accesses a file on the host. + * @param path Location of the file to retrieve (e.g., "README.md"). + */ + file = (path: string): File => { + return new File({ + queryTree: [ + ...this._queryTree, + { + operation: "file", + args: { path }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Creates a service that forwards traffic to a specified address via the host. + * @param opts.host Upstream host to forward traffic to. + * @param opts.ports Ports to expose via the service, forwarding through the host network. + * + * If a port's frontend is unspecified or 0, it defaults to the same as the backend port. + * + * An empty set of ports is not valid; an error will be returned. + */ + service = (opts?: HostServiceOpts): Service => { + return new Service({ + queryTree: [ + ...this._queryTree, + { + operation: "service", + args: { ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Sets a secret given a user-defined name and the file path on the host, and returns the secret. + * + * The file is limited to a size of 512000 bytes. + * @param name The user defined name for this secret. + * @param path Location of the file to set as a secret. + */ + setSecretFile = (name: string, path: string): Secret => { + return new Secret({ + queryTree: [ + ...this._queryTree, + { + operation: "setSecretFile", + args: { name, path }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Creates a tunnel that forwards traffic from the host to a service. + * @param service Service to send traffic from the tunnel. + * @param opts.ports Configure explicit port forwarding rules for the tunnel. + * + * If a port's frontend is unspecified or 0, a random port will be chosen by the host. + * + * If no ports are given, all of the service's ports are forwarded. If native is true, each port maps to the same port on the host. If native is false, each port maps to a random port chosen by the host. + * + * If ports are given and native is true, the ports are additive. + * @param opts.native Map each service port to the same port on the host, as if the service were running natively. + * + * Note: enabling may result in port conflicts. + */ + tunnel = (service: Service, opts?: HostTunnelOpts): Service => { + return new Service({ + queryTree: [ + ...this._queryTree, + { + operation: "tunnel", + args: { service, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Accesses a Unix socket on the host. + * @param path Location of the Unix socket (e.g., "/var/run/docker.sock"). + */ + unixSocket = (path: string): Socket => { + return new Socket({ + queryTree: [ + ...this._queryTree, + { + operation: "unixSocket", + args: { path }, + }, + ], + ctx: this._ctx, + }); + }; +} + +/** + * A graphql input type, which is essentially just a group of named args. + * This is currently only used to represent pre-existing usage of graphql input types + * in the core API. It is not used by user modules and shouldn't ever be as user + * module accept input objects via their id rather than graphql input types. + */ +export class InputTypeDef extends BaseClient { + private readonly _id?: InputTypeDefID = undefined; + private readonly _name?: string = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _id?: InputTypeDefID, + _name?: string + ) { + super(parent); + + this._id = _id; + this._name = _name; + } + + /** + * A unique identifier for this InputTypeDef. + */ + id = async (): Promise => { + if (this._id) { + return this._id; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Static fields defined on this input object, if any. + */ + fields = async (): Promise => { + type fields = { + id: FieldTypeDefID; + }; + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "fields", + }, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response.map( + (r) => + new FieldTypeDef( + { + queryTree: [ + { + operation: "loadFieldTypeDefFromID", + args: { id: r.id }, + }, + ], + ctx: this._ctx, + }, + r.id + ) + ); + }; + + /** + * The name of the input object. + */ + name = async (): Promise => { + if (this._name) { + return this._name; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "name", + }, + ], + await this._ctx.connection() + ); + + return response; + }; +} + +/** + * A definition of a custom interface defined in a Module. + */ +export class InterfaceTypeDef extends BaseClient { + private readonly _id?: InterfaceTypeDefID = undefined; + private readonly _description?: string = undefined; + private readonly _name?: string = undefined; + private readonly _sourceModuleName?: string = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _id?: InterfaceTypeDefID, + _description?: string, + _name?: string, + _sourceModuleName?: string + ) { + super(parent); + + this._id = _id; + this._description = _description; + this._name = _name; + this._sourceModuleName = _sourceModuleName; + } + + /** + * A unique identifier for this InterfaceTypeDef. + */ + id = async (): Promise => { + if (this._id) { + return this._id; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The doc string for the interface, if any. + */ + description = async (): Promise => { + if (this._description) { + return this._description; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "description", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Functions defined on this interface, if any. + */ + functions = async (): Promise => { + type functions = { + id: FunctionID; + }; + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "functions", + }, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response.map( + (r) => + new Function_( + { + queryTree: [ + { + operation: "loadFunction_FromID", + args: { id: r.id }, + }, + ], + ctx: this._ctx, + }, + r.id + ) + ); + }; + + /** + * The name of the interface. + */ + name = async (): Promise => { + if (this._name) { + return this._name; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "name", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * If this InterfaceTypeDef is associated with a Module, the name of the module. Unset otherwise. + */ + sourceModuleName = async (): Promise => { + if (this._sourceModuleName) { + return this._sourceModuleName; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "sourceModuleName", + }, + ], + await this._ctx.connection() + ); + + return response; + }; +} + +/** + * A simple key value object that represents a label. + */ +export class Label extends BaseClient { + private readonly _id?: LabelID = undefined; + private readonly _name?: string = undefined; + private readonly _value?: string = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _id?: LabelID, + _name?: string, + _value?: string + ) { + super(parent); + + this._id = _id; + this._name = _name; + this._value = _value; + } + + /** + * A unique identifier for this Label. + */ + id = async (): Promise => { + if (this._id) { + return this._id; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The label name. + */ + name = async (): Promise => { + if (this._name) { + return this._name; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "name", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The label value. + */ + value = async (): Promise => { + if (this._value) { + return this._value; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "value", + }, + ], + await this._ctx.connection() + ); + + return response; + }; +} + +/** + * A definition of a list type in a Module. + */ +export class ListTypeDef extends BaseClient { + private readonly _id?: ListTypeDefID = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _id?: ListTypeDefID + ) { + super(parent); + + this._id = _id; + } + + /** + * A unique identifier for this ListTypeDef. + */ + id = async (): Promise => { + if (this._id) { + return this._id; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The type of the elements in the list. + */ + elementTypeDef = (): TypeDef => { + return new TypeDef({ + queryTree: [ + ...this._queryTree, + { + operation: "elementTypeDef", + }, + ], + ctx: this._ctx, + }); + }; +} + +/** + * Module source that that originates from a path locally relative to an arbitrary directory. + */ +export class LocalModuleSource extends BaseClient { + private readonly _id?: LocalModuleSourceID = undefined; + private readonly _rootSubpath?: string = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _id?: LocalModuleSourceID, + _rootSubpath?: string + ) { + super(parent); + + this._id = _id; + this._rootSubpath = _rootSubpath; + } + + /** + * A unique identifier for this LocalModuleSource. + */ + id = async (): Promise => { + if (this._id) { + return this._id; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The directory containing everything needed to load load and use the module. + */ + contextDirectory = (): Directory => { + return new Directory({ + queryTree: [ + ...this._queryTree, + { + operation: "contextDirectory", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * The path to the root of the module source under the context directory. This directory contains its configuration file. It also contains its source code (possibly as a subdirectory). + */ + rootSubpath = async (): Promise => { + if (this._rootSubpath) { + return this._rootSubpath; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "rootSubpath", + }, + ], + await this._ctx.connection() + ); + + return response; + }; +} + +/** + * A Dagger module. + */ +export class Module_ extends BaseClient { + private readonly _id?: ModuleID = undefined; + private readonly _description?: string = undefined; + private readonly _name?: string = undefined; + private readonly _sdk?: string = undefined; + private readonly _serve?: Void = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _id?: ModuleID, + _description?: string, + _name?: string, + _sdk?: string, + _serve?: Void + ) { + super(parent); + + this._id = _id; + this._description = _description; + this._name = _name; + this._sdk = _sdk; + this._serve = _serve; + } + + /** + * A unique identifier for this Module. + */ + id = async (): Promise => { + if (this._id) { + return this._id; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Modules used by this module. + */ + dependencies = async (): Promise => { + type dependencies = { + id: ModuleID; + }; + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "dependencies", + }, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response.map( + (r) => + new Module_( + { + queryTree: [ + { + operation: "loadModule_FromID", + args: { id: r.id }, + }, + ], + ctx: this._ctx, + }, + r.id + ) + ); + }; + + /** + * The dependencies as configured by the module. + */ + dependencyConfig = async (): Promise => { + type dependencyConfig = { + id: ModuleDependencyID; + }; + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "dependencyConfig", + }, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response.map( + (r) => + new ModuleDependency( + { + queryTree: [ + { + operation: "loadModuleDependencyFromID", + args: { id: r.id }, + }, + ], + ctx: this._ctx, + }, + r.id + ) + ); + }; + + /** + * The doc string of the module, if any + */ + description = async (): Promise => { + if (this._description) { + return this._description; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "description", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The generated files and directories made on top of the module source's context directory. + */ + generatedContextDiff = (): Directory => { + return new Directory({ + queryTree: [ + ...this._queryTree, + { + operation: "generatedContextDiff", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * The module source's context plus any configuration and source files created by codegen. + */ + generatedContextDirectory = (): Directory => { + return new Directory({ + queryTree: [ + ...this._queryTree, + { + operation: "generatedContextDirectory", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves the module with the objects loaded via its SDK. + */ + initialize = (): Module_ => { + return new Module_({ + queryTree: [ + ...this._queryTree, + { + operation: "initialize", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Interfaces served by this module. + */ + interfaces = async (): Promise => { + type interfaces = { + id: TypeDefID; + }; + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "interfaces", + }, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response.map( + (r) => + new TypeDef( + { + queryTree: [ + { + operation: "loadTypeDefFromID", + args: { id: r.id }, + }, + ], + ctx: this._ctx, + }, + r.id + ) + ); + }; + + /** + * The name of the module + */ + name = async (): Promise => { + if (this._name) { + return this._name; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "name", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Objects served by this module. + */ + objects = async (): Promise => { + type objects = { + id: TypeDefID; + }; + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "objects", + }, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response.map( + (r) => + new TypeDef( + { + queryTree: [ + { + operation: "loadTypeDefFromID", + args: { id: r.id }, + }, + ], + ctx: this._ctx, + }, + r.id + ) + ); + }; + + /** + * The container that runs the module's entrypoint. It will fail to execute if the module doesn't compile. + */ + runtime = (): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "runtime", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * The SDK used by this module. Either a name of a builtin SDK or a module source ref string pointing to the SDK's implementation. + */ + sdk = async (): Promise => { + if (this._sdk) { + return this._sdk; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "sdk", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Serve a module's API in the current session. + * + * Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect. + */ + serve = async (): Promise => { + if (this._serve) { + return this._serve; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "serve", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The source for the module. + */ + source = (): ModuleSource => { + return new ModuleSource({ + queryTree: [ + ...this._queryTree, + { + operation: "source", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves the module with the given description + * @param description The description to set + */ + withDescription = (description: string): Module_ => { + return new Module_({ + queryTree: [ + ...this._queryTree, + { + operation: "withDescription", + args: { description }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * This module plus the given Interface type and associated functions + */ + withInterface = (iface: TypeDef): Module_ => { + return new Module_({ + queryTree: [ + ...this._queryTree, + { + operation: "withInterface", + args: { iface }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * This module plus the given Object type and associated functions. + */ + withObject = (object: TypeDef): Module_ => { + return new Module_({ + queryTree: [ + ...this._queryTree, + { + operation: "withObject", + args: { object }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves the module with basic configuration loaded if present. + * @param source The module source to initialize from. + */ + withSource = (source: ModuleSource): Module_ => { + return new Module_({ + queryTree: [ + ...this._queryTree, + { + operation: "withSource", + args: { source }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Call the provided function with current Module. + * + * This is useful for reusability and readability by not breaking the calling chain. + */ + with = (arg: (param: Module_) => Module_) => { + return arg(this); + }; +} + +/** + * The configuration of dependency of a module. + */ +export class ModuleDependency extends BaseClient { + private readonly _id?: ModuleDependencyID = undefined; + private readonly _name?: string = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _id?: ModuleDependencyID, + _name?: string + ) { + super(parent); + + this._id = _id; + this._name = _name; + } + + /** + * A unique identifier for this ModuleDependency. + */ + id = async (): Promise => { + if (this._id) { + return this._id; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The name of the dependency module. + */ + name = async (): Promise => { + if (this._name) { + return this._name; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "name", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The source for the dependency module. + */ + source = (): ModuleSource => { + return new ModuleSource({ + queryTree: [ + ...this._queryTree, + { + operation: "source", + }, + ], + ctx: this._ctx, + }); + }; +} + +/** + * The source needed to load and run a module, along with any metadata about the source such as versions/urls/etc. + */ +export class ModuleSource extends BaseClient { + private readonly _id?: ModuleSourceID = undefined; + private readonly _asString?: string = undefined; + private readonly _configExists?: boolean = undefined; + private readonly _kind?: ModuleSourceKind = undefined; + private readonly _moduleName?: string = undefined; + private readonly _moduleOriginalName?: string = undefined; + private readonly _resolveContextPathFromCaller?: string = undefined; + private readonly _sourceRootSubpath?: string = undefined; + private readonly _sourceSubpath?: string = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _id?: ModuleSourceID, + _asString?: string, + _configExists?: boolean, + _kind?: ModuleSourceKind, + _moduleName?: string, + _moduleOriginalName?: string, + _resolveContextPathFromCaller?: string, + _sourceRootSubpath?: string, + _sourceSubpath?: string + ) { + super(parent); + + this._id = _id; + this._asString = _asString; + this._configExists = _configExists; + this._kind = _kind; + this._moduleName = _moduleName; + this._moduleOriginalName = _moduleOriginalName; + this._resolveContextPathFromCaller = _resolveContextPathFromCaller; + this._sourceRootSubpath = _sourceRootSubpath; + this._sourceSubpath = _sourceSubpath; + } + + /** + * A unique identifier for this ModuleSource. + */ + id = async (): Promise => { + if (this._id) { + return this._id; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * If the source is a of kind git, the git source representation of it. + */ + asGitSource = (): GitModuleSource => { + return new GitModuleSource({ + queryTree: [ + ...this._queryTree, + { + operation: "asGitSource", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * If the source is of kind local, the local source representation of it. + */ + asLocalSource = (): LocalModuleSource => { + return new LocalModuleSource({ + queryTree: [ + ...this._queryTree, + { + operation: "asLocalSource", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load the source as a module. If this is a local source, the parent directory must have been provided during module source creation + */ + asModule = (): Module_ => { + return new Module_({ + queryTree: [ + ...this._queryTree, + { + operation: "asModule", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * A human readable ref string representation of this module source. + */ + asString = async (): Promise => { + if (this._asString) { + return this._asString; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "asString", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Returns whether the module source has a configuration file. + */ + configExists = async (): Promise => { + if (this._configExists) { + return this._configExists; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "configExists", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The directory containing everything needed to load load and use the module. + */ + contextDirectory = (): Directory => { + return new Directory({ + queryTree: [ + ...this._queryTree, + { + operation: "contextDirectory", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * The dependencies of the module source. Includes dependencies from the configuration and any extras from withDependencies calls. + */ + dependencies = async (): Promise => { + type dependencies = { + id: ModuleDependencyID; + }; + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "dependencies", + }, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response.map( + (r) => + new ModuleDependency( + { + queryTree: [ + { + operation: "loadModuleDependencyFromID", + args: { id: r.id }, + }, + ], + ctx: this._ctx, + }, + r.id + ) + ); + }; + + /** + * The directory containing the module configuration and source code (source code may be in a subdir). + * @param path The path from the source directory to select. + */ + directory = (path: string): Directory => { + return new Directory({ + queryTree: [ + ...this._queryTree, + { + operation: "directory", + args: { path }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * The kind of source (e.g. local, git, etc.) + */ + kind = async (): Promise => { + if (this._kind) { + return this._kind; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "kind", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * If set, the name of the module this source references, including any overrides at runtime by callers. + */ + moduleName = async (): Promise => { + if (this._moduleName) { + return this._moduleName; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "moduleName", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The original name of the module this source references, as defined in the module configuration. + */ + moduleOriginalName = async (): Promise => { + if (this._moduleOriginalName) { + return this._moduleOriginalName; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "moduleOriginalName", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The path to the module source's context directory on the caller's filesystem. Only valid for local sources. + */ + resolveContextPathFromCaller = async (): Promise => { + if (this._resolveContextPathFromCaller) { + return this._resolveContextPathFromCaller; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "resolveContextPathFromCaller", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Resolve the provided module source arg as a dependency relative to this module source. + * @param dep The dependency module source to resolve. + */ + resolveDependency = (dep: ModuleSource): ModuleSource => { + return new ModuleSource({ + queryTree: [ + ...this._queryTree, + { + operation: "resolveDependency", + args: { dep }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load the source from its path on the caller's filesystem, including only needed+configured files and directories. Only valid for local sources. + */ + resolveFromCaller = (): ModuleSource => { + return new ModuleSource({ + queryTree: [ + ...this._queryTree, + { + operation: "resolveFromCaller", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * The path relative to context of the root of the module source, which contains dagger.json. It also contains the module implementation source code, but that may or may not being a subdir of this root. + */ + sourceRootSubpath = async (): Promise => { + if (this._sourceRootSubpath) { + return this._sourceRootSubpath; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "sourceRootSubpath", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The path relative to context of the module implementation source code. + */ + sourceSubpath = async (): Promise => { + if (this._sourceSubpath) { + return this._sourceSubpath; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "sourceSubpath", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Update the module source with a new context directory. Only valid for local sources. + * @param dir The directory to set as the context directory. + */ + withContextDirectory = (dir: Directory): ModuleSource => { + return new ModuleSource({ + queryTree: [ + ...this._queryTree, + { + operation: "withContextDirectory", + args: { dir }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Append the provided dependencies to the module source's dependency list. + * @param dependencies The dependencies to append. + */ + withDependencies = (dependencies: ModuleDependency[]): ModuleSource => { + return new ModuleSource({ + queryTree: [ + ...this._queryTree, + { + operation: "withDependencies", + args: { dependencies }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Update the module source with a new name. + * @param name The name to set. + */ + withName = (name: string): ModuleSource => { + return new ModuleSource({ + queryTree: [ + ...this._queryTree, + { + operation: "withName", + args: { name }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Update the module source with a new SDK. + * @param sdk The SDK to set. + */ + withSDK = (sdk: string): ModuleSource => { + return new ModuleSource({ + queryTree: [ + ...this._queryTree, + { + operation: "withSDK", + args: { sdk }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Update the module source with a new source subpath. + * @param path The path to set as the source subpath. + */ + withSourceSubpath = (path: string): ModuleSource => { + return new ModuleSource({ + queryTree: [ + ...this._queryTree, + { + operation: "withSourceSubpath", + args: { path }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Call the provided function with current ModuleSource. + * + * This is useful for reusability and readability by not breaking the calling chain. + */ + with = (arg: (param: ModuleSource) => ModuleSource) => { + return arg(this); + }; +} + +/** + * A definition of a custom object defined in a Module. + */ +export class ObjectTypeDef extends BaseClient { + private readonly _id?: ObjectTypeDefID = undefined; + private readonly _description?: string = undefined; + private readonly _name?: string = undefined; + private readonly _sourceModuleName?: string = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _id?: ObjectTypeDefID, + _description?: string, + _name?: string, + _sourceModuleName?: string + ) { + super(parent); + + this._id = _id; + this._description = _description; + this._name = _name; + this._sourceModuleName = _sourceModuleName; + } + + /** + * A unique identifier for this ObjectTypeDef. + */ + id = async (): Promise => { + if (this._id) { + return this._id; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The function used to construct new instances of this object, if any + */ + constructor_ = (): Function_ => { + return new Function_({ + queryTree: [ + ...this._queryTree, + { + operation: "constructor", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * The doc string for the object, if any. + */ + description = async (): Promise => { + if (this._description) { + return this._description; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "description", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Static fields defined on this object, if any. + */ + fields = async (): Promise => { + type fields = { + id: FieldTypeDefID; + }; + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "fields", + }, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response.map( + (r) => + new FieldTypeDef( + { + queryTree: [ + { + operation: "loadFieldTypeDefFromID", + args: { id: r.id }, + }, + ], + ctx: this._ctx, + }, + r.id + ) + ); + }; + + /** + * Functions defined on this object, if any. + */ + functions = async (): Promise => { + type functions = { + id: FunctionID; + }; + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "functions", + }, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response.map( + (r) => + new Function_( + { + queryTree: [ + { + operation: "loadFunction_FromID", + args: { id: r.id }, + }, + ], + ctx: this._ctx, + }, + r.id + ) + ); + }; + + /** + * The name of the object. + */ + name = async (): Promise => { + if (this._name) { + return this._name; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "name", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * If this ObjectTypeDef is associated with a Module, the name of the module. Unset otherwise. + */ + sourceModuleName = async (): Promise => { + if (this._sourceModuleName) { + return this._sourceModuleName; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "sourceModuleName", + }, + ], + await this._ctx.connection() + ); + + return response; + }; +} + +/** + * A port exposed by a container. + */ +export class Port extends BaseClient { + private readonly _id?: PortID = undefined; + private readonly _description?: string = undefined; + private readonly _experimentalSkipHealthcheck?: boolean = undefined; + private readonly _port?: number = undefined; + private readonly _protocol?: NetworkProtocol = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _id?: PortID, + _description?: string, + _experimentalSkipHealthcheck?: boolean, + _port?: number, + _protocol?: NetworkProtocol + ) { + super(parent); + + this._id = _id; + this._description = _description; + this._experimentalSkipHealthcheck = _experimentalSkipHealthcheck; + this._port = _port; + this._protocol = _protocol; + } + + /** + * A unique identifier for this Port. + */ + id = async (): Promise => { + if (this._id) { + return this._id; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The port description. + */ + description = async (): Promise => { + if (this._description) { + return this._description; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "description", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Skip the health check when run as a service. + */ + experimentalSkipHealthcheck = async (): Promise => { + if (this._experimentalSkipHealthcheck) { + return this._experimentalSkipHealthcheck; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "experimentalSkipHealthcheck", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The port number. + */ + port = async (): Promise => { + if (this._port) { + return this._port; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "port", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The transport layer protocol. + */ + protocol = async (): Promise => { + if (this._protocol) { + return this._protocol; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "protocol", + }, + ], + await this._ctx.connection() + ); + + return response; + }; +} + +/** + * The root of the DAG. + */ +export class Client extends BaseClient { + private readonly _checkVersionCompatibility?: boolean = undefined; + private readonly _defaultPlatform?: Platform = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _checkVersionCompatibility?: boolean, + _defaultPlatform?: Platform + ) { + super(parent); + + this._checkVersionCompatibility = _checkVersionCompatibility; + this._defaultPlatform = _defaultPlatform; + } + + /** + * Retrieves a content-addressed blob. + * @param digest Digest of the blob + * @param size Size of the blob + * @param mediaType Media type of the blob + * @param uncompressed Digest of the uncompressed blob + */ + blob = ( + digest: string, + size: number, + mediaType: string, + uncompressed: string + ): Directory => { + return new Directory({ + queryTree: [ + ...this._queryTree, + { + operation: "blob", + args: { digest, size, mediaType, uncompressed }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Retrieves a container builtin to the engine. + * @param digest Digest of the image manifest + */ + builtinContainer = (digest: string): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "builtinContainer", + args: { digest }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Constructs a cache volume for a given cache key. + * @param key A string identifier to target this cache volume (e.g., "modules-cache"). + */ + cacheVolume = (key: string): CacheVolume => { + return new CacheVolume({ + queryTree: [ + ...this._queryTree, + { + operation: "cacheVolume", + args: { key }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Checks if the current Dagger Engine is compatible with an SDK's required version. + * @param version Version required by the SDK. + */ + checkVersionCompatibility = async (version: string): Promise => { + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "checkVersionCompatibility", + args: { version }, + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Creates a scratch container. + * + * Optional platform argument initializes new containers to execute and publish as that platform. Platform defaults to that of the builder's host. + * @param opts.id DEPRECATED: Use `loadContainerFromID` instead. + * @param opts.platform Platform to initialize the container with. + */ + container = (opts?: ClientContainerOpts): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "container", + args: { ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * The FunctionCall context that the SDK caller is currently executing in. + * + * If the caller is not currently executing in a function, this will return an error. + */ + currentFunctionCall = (): FunctionCall => { + return new FunctionCall({ + queryTree: [ + ...this._queryTree, + { + operation: "currentFunctionCall", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * The module currently being served in the session, if any. + */ + currentModule = (): CurrentModule => { + return new CurrentModule({ + queryTree: [ + ...this._queryTree, + { + operation: "currentModule", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * The TypeDef representations of the objects currently being served in the session. + */ + currentTypeDefs = async (): Promise => { + type currentTypeDefs = { + id: TypeDefID; + }; + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "currentTypeDefs", + }, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response.map( + (r) => + new TypeDef( + { + queryTree: [ + { + operation: "loadTypeDefFromID", + args: { id: r.id }, + }, + ], + ctx: this._ctx, + }, + r.id + ) + ); + }; + + /** + * The default platform of the engine. + */ + defaultPlatform = async (): Promise => { + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "defaultPlatform", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Creates an empty directory. + * @param opts.id DEPRECATED: Use `loadDirectoryFromID` isntead. + */ + directory = (opts?: ClientDirectoryOpts): Directory => { + return new Directory({ + queryTree: [ + ...this._queryTree, + { + operation: "directory", + args: { ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * @deprecated Use loadFileFromID instead. + */ + file = (id: FileID): File => { + return new File({ + queryTree: [ + ...this._queryTree, + { + operation: "file", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Creates a function. + * @param name Name of the function, in its original format from the implementation language. + * @param returnType Return type of the function. + */ + function_ = (name: string, returnType: TypeDef): Function_ => { + return new Function_({ + queryTree: [ + ...this._queryTree, + { + operation: "function", + args: { name, returnType }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Create a code generation result, given a directory containing the generated code. + */ + generatedCode = (code: Directory): GeneratedCode => { + return new GeneratedCode({ + queryTree: [ + ...this._queryTree, + { + operation: "generatedCode", + args: { code }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Queries a Git repository. + * @param url URL of the git repository. + * + * Can be formatted as `https://{host}/{owner}/{repo}`, `git@{host}:{owner}/{repo}`. + * + * Suffix ".git" is optional. + * @param opts.keepGitDir Set to true to keep .git directory. + * @param opts.experimentalServiceHost A service which must be started before the repo is fetched. + * @param opts.sshKnownHosts Set SSH known hosts + * @param opts.sshAuthSocket Set SSH auth socket + */ + git = (url: string, opts?: ClientGitOpts): GitRepository => { + return new GitRepository({ + queryTree: [ + ...this._queryTree, + { + operation: "git", + args: { url, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Queries the host environment. + */ + host = (): Host => { + return new Host({ + queryTree: [ + ...this._queryTree, + { + operation: "host", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Returns a file containing an http remote url content. + * @param url HTTP url to get the content from (e.g., "https://docs.dagger.io"). + * @param opts.experimentalServiceHost A service which must be started before the URL is fetched. + */ + http = (url: string, opts?: ClientHttpOpts): File => { + return new File({ + queryTree: [ + ...this._queryTree, + { + operation: "http", + args: { url, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a CacheVolume from its ID. + */ + loadCacheVolumeFromID = (id: CacheVolumeID): CacheVolume => { + return new CacheVolume({ + queryTree: [ + ...this._queryTree, + { + operation: "loadCacheVolumeFromID", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a Container from its ID. + */ + loadContainerFromID = (id: ContainerID): Container => { + return new Container({ + queryTree: [ + ...this._queryTree, + { + operation: "loadContainerFromID", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a CurrentModule from its ID. + */ + loadCurrentModuleFromID = (id: CurrentModuleID): CurrentModule => { + return new CurrentModule({ + queryTree: [ + ...this._queryTree, + { + operation: "loadCurrentModuleFromID", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a Directory from its ID. + */ + loadDirectoryFromID = (id: DirectoryID): Directory => { + return new Directory({ + queryTree: [ + ...this._queryTree, + { + operation: "loadDirectoryFromID", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a EnvVariable from its ID. + */ + loadEnvVariableFromID = (id: EnvVariableID): EnvVariable => { + return new EnvVariable({ + queryTree: [ + ...this._queryTree, + { + operation: "loadEnvVariableFromID", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a FieldTypeDef from its ID. + */ + loadFieldTypeDefFromID = (id: FieldTypeDefID): FieldTypeDef => { + return new FieldTypeDef({ + queryTree: [ + ...this._queryTree, + { + operation: "loadFieldTypeDefFromID", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a File from its ID. + */ + loadFileFromID = (id: FileID): File => { + return new File({ + queryTree: [ + ...this._queryTree, + { + operation: "loadFileFromID", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a FunctionArg from its ID. + */ + loadFunctionArgFromID = (id: FunctionArgID): FunctionArg => { + return new FunctionArg({ + queryTree: [ + ...this._queryTree, + { + operation: "loadFunctionArgFromID", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a FunctionCallArgValue from its ID. + */ + loadFunctionCallArgValueFromID = ( + id: FunctionCallArgValueID + ): FunctionCallArgValue => { + return new FunctionCallArgValue({ + queryTree: [ + ...this._queryTree, + { + operation: "loadFunctionCallArgValueFromID", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a FunctionCall from its ID. + */ + loadFunctionCallFromID = (id: FunctionCallID): FunctionCall => { + return new FunctionCall({ + queryTree: [ + ...this._queryTree, + { + operation: "loadFunctionCallFromID", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a Function from its ID. + */ + loadFunctionFromID = (id: FunctionID): Function_ => { + return new Function_({ + queryTree: [ + ...this._queryTree, + { + operation: "loadFunctionFromID", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a GeneratedCode from its ID. + */ + loadGeneratedCodeFromID = (id: GeneratedCodeID): GeneratedCode => { + return new GeneratedCode({ + queryTree: [ + ...this._queryTree, + { + operation: "loadGeneratedCodeFromID", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a GitModuleSource from its ID. + */ + loadGitModuleSourceFromID = (id: GitModuleSourceID): GitModuleSource => { + return new GitModuleSource({ + queryTree: [ + ...this._queryTree, + { + operation: "loadGitModuleSourceFromID", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a GitRef from its ID. + */ + loadGitRefFromID = (id: GitRefID): GitRef => { + return new GitRef({ + queryTree: [ + ...this._queryTree, + { + operation: "loadGitRefFromID", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a GitRepository from its ID. + */ + loadGitRepositoryFromID = (id: GitRepositoryID): GitRepository => { + return new GitRepository({ + queryTree: [ + ...this._queryTree, + { + operation: "loadGitRepositoryFromID", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a Host from its ID. + */ + loadHostFromID = (id: HostID): Host => { + return new Host({ + queryTree: [ + ...this._queryTree, + { + operation: "loadHostFromID", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a InputTypeDef from its ID. + */ + loadInputTypeDefFromID = (id: InputTypeDefID): InputTypeDef => { + return new InputTypeDef({ + queryTree: [ + ...this._queryTree, + { + operation: "loadInputTypeDefFromID", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a InterfaceTypeDef from its ID. + */ + loadInterfaceTypeDefFromID = (id: InterfaceTypeDefID): InterfaceTypeDef => { + return new InterfaceTypeDef({ + queryTree: [ + ...this._queryTree, + { + operation: "loadInterfaceTypeDefFromID", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a Label from its ID. + */ + loadLabelFromID = (id: LabelID): Label => { + return new Label({ + queryTree: [ + ...this._queryTree, + { + operation: "loadLabelFromID", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a ListTypeDef from its ID. + */ + loadListTypeDefFromID = (id: ListTypeDefID): ListTypeDef => { + return new ListTypeDef({ + queryTree: [ + ...this._queryTree, + { + operation: "loadListTypeDefFromID", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a LocalModuleSource from its ID. + */ + loadLocalModuleSourceFromID = ( + id: LocalModuleSourceID + ): LocalModuleSource => { + return new LocalModuleSource({ + queryTree: [ + ...this._queryTree, + { + operation: "loadLocalModuleSourceFromID", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a ModuleDependency from its ID. + */ + loadModuleDependencyFromID = (id: ModuleDependencyID): ModuleDependency => { + return new ModuleDependency({ + queryTree: [ + ...this._queryTree, + { + operation: "loadModuleDependencyFromID", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a Module from its ID. + */ + loadModuleFromID = (id: ModuleID): Module_ => { + return new Module_({ + queryTree: [ + ...this._queryTree, + { + operation: "loadModuleFromID", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a ModuleSource from its ID. + */ + loadModuleSourceFromID = (id: ModuleSourceID): ModuleSource => { + return new ModuleSource({ + queryTree: [ + ...this._queryTree, + { + operation: "loadModuleSourceFromID", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a ObjectTypeDef from its ID. + */ + loadObjectTypeDefFromID = (id: ObjectTypeDefID): ObjectTypeDef => { + return new ObjectTypeDef({ + queryTree: [ + ...this._queryTree, + { + operation: "loadObjectTypeDefFromID", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a Port from its ID. + */ + loadPortFromID = (id: PortID): Port => { + return new Port({ + queryTree: [ + ...this._queryTree, + { + operation: "loadPortFromID", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a Secret from its ID. + */ + loadSecretFromID = (id: SecretID): Secret => { + return new Secret({ + queryTree: [ + ...this._queryTree, + { + operation: "loadSecretFromID", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a Service from its ID. + */ + loadServiceFromID = (id: ServiceID): Service => { + return new Service({ + queryTree: [ + ...this._queryTree, + { + operation: "loadServiceFromID", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a Socket from its ID. + */ + loadSocketFromID = (id: SocketID): Socket => { + return new Socket({ + queryTree: [ + ...this._queryTree, + { + operation: "loadSocketFromID", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a Terminal from its ID. + */ + loadTerminalFromID = (id: TerminalID): Terminal => { + return new Terminal({ + queryTree: [ + ...this._queryTree, + { + operation: "loadTerminalFromID", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Load a TypeDef from its ID. + */ + loadTypeDefFromID = (id: TypeDefID): TypeDef => { + return new TypeDef({ + queryTree: [ + ...this._queryTree, + { + operation: "loadTypeDefFromID", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Create a new module. + */ + module_ = (): Module_ => { + return new Module_({ + queryTree: [ + ...this._queryTree, + { + operation: "module", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Create a new module dependency configuration from a module source and name + * @param source The source of the dependency + * @param opts.name If set, the name to use for the dependency. Otherwise, once installed to a parent module, the name of the dependency module will be used by default. + */ + moduleDependency = ( + source: ModuleSource, + opts?: ClientModuleDependencyOpts + ): ModuleDependency => { + return new ModuleDependency({ + queryTree: [ + ...this._queryTree, + { + operation: "moduleDependency", + args: { source, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Create a new module source instance from a source ref string. + * @param refString The string ref representation of the module source + * @param opts.stable If true, enforce that the source is a stable version for source kinds that support versioning. + */ + moduleSource = ( + refString: string, + opts?: ClientModuleSourceOpts + ): ModuleSource => { + return new ModuleSource({ + queryTree: [ + ...this._queryTree, + { + operation: "moduleSource", + args: { refString, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Creates a named sub-pipeline. + * @param name Name of the sub-pipeline. + * @param opts.description Description of the sub-pipeline. + * @param opts.labels Labels to apply to the sub-pipeline. + */ + pipeline = (name: string, opts?: ClientPipelineOpts): Client => { + return new Client({ + queryTree: [ + ...this._queryTree, + { + operation: "pipeline", + args: { name, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Reference a secret by name. + */ + secret = (name: string, opts?: ClientSecretOpts): Secret => { + return new Secret({ + queryTree: [ + ...this._queryTree, + { + operation: "secret", + args: { name, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Sets a secret given a user defined name to its plaintext and returns the secret. + * + * The plaintext value is limited to a size of 128000 bytes. + * @param name The user defined name for this secret + * @param plaintext The plaintext of the secret + */ + setSecret = (name: string, plaintext: string): Secret => { + return new Secret({ + queryTree: [ + ...this._queryTree, + { + operation: "setSecret", + args: { name, plaintext }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Loads a socket by its ID. + * @deprecated Use loadSocketFromID instead. + */ + socket = (id: SocketID): Socket => { + return new Socket({ + queryTree: [ + ...this._queryTree, + { + operation: "socket", + args: { id }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Create a new TypeDef. + */ + typeDef = (): TypeDef => { + return new TypeDef({ + queryTree: [ + ...this._queryTree, + { + operation: "typeDef", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Call the provided function with current Client. + * + * This is useful for reusability and readability by not breaking the calling chain. + */ + with = (arg: (param: Client) => Client) => { + return arg(this); + }; +} + +/** + * A reference to a secret value, which can be handled more safely than the value itself. + */ +export class Secret extends BaseClient { + private readonly _id?: SecretID = undefined; + private readonly _plaintext?: string = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _id?: SecretID, + _plaintext?: string + ) { + super(parent); + + this._id = _id; + this._plaintext = _plaintext; + } + + /** + * A unique identifier for this Secret. + */ + id = async (): Promise => { + if (this._id) { + return this._id; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * The value of this secret. + */ + plaintext = async (): Promise => { + if (this._plaintext) { + return this._plaintext; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "plaintext", + }, + ], + await this._ctx.connection() + ); + + return response; + }; +} + +/** + * A content-addressed service providing TCP connectivity. + */ +export class Service extends BaseClient { + private readonly _id?: ServiceID = undefined; + private readonly _endpoint?: string = undefined; + private readonly _hostname?: string = undefined; + private readonly _start?: ServiceID = undefined; + private readonly _stop?: ServiceID = undefined; + private readonly _up?: Void = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _id?: ServiceID, + _endpoint?: string, + _hostname?: string, + _start?: ServiceID, + _stop?: ServiceID, + _up?: Void + ) { + super(parent); + + this._id = _id; + this._endpoint = _endpoint; + this._hostname = _hostname; + this._start = _start; + this._stop = _stop; + this._up = _up; + } + + /** + * A unique identifier for this Service. + */ + id = async (): Promise => { + if (this._id) { + return this._id; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Retrieves an endpoint that clients can use to reach this container. + * + * If no port is specified, the first exposed port is used. If none exist an error is returned. + * + * If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned. + * @param opts.port The exposed port number for the endpoint + * @param opts.scheme Return a URL with the given scheme, eg. http for http:// + */ + endpoint = async (opts?: ServiceEndpointOpts): Promise => { + if (this._endpoint) { + return this._endpoint; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "endpoint", + args: { ...opts }, + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Retrieves a hostname which can be used by clients to reach this container. + */ + hostname = async (): Promise => { + if (this._hostname) { + return this._hostname; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "hostname", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Retrieves the list of ports provided by the service. + */ + ports = async (): Promise => { + type ports = { + id: PortID; + }; + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "ports", + }, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response.map( + (r) => + new Port( + { + queryTree: [ + { + operation: "loadPortFromID", + args: { id: r.id }, + }, + ], + ctx: this._ctx, + }, + r.id + ) + ); + }; + + /** + * Start the service and wait for its health checks to succeed. + * + * Services bound to a Container do not need to be manually started. + */ + start = async (): Promise => { + await computeQuery( + [ + ...this._queryTree, + { + operation: "start", + }, + ], + await this._ctx.connection() + ); + + return this; + }; + + /** + * Stop the service. + * @param opts.kill Immediately kill the service without waiting for a graceful exit + */ + stop = async (opts?: ServiceStopOpts): Promise => { + await computeQuery( + [ + ...this._queryTree, + { + operation: "stop", + args: { ...opts }, + }, + ], + await this._ctx.connection() + ); + + return this; + }; + + /** + * Creates a tunnel that forwards traffic from the caller's network to this service. + * @param opts.ports List of frontend/backend port mappings to forward. + * + * Frontend is the port accepting traffic on the host, backend is the service port. + * @param opts.random Bind each tunnel port to a random port on the host. + */ + up = async (opts?: ServiceUpOpts): Promise => { + if (this._up) { + return this._up; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "up", + args: { ...opts }, + }, + ], + await this._ctx.connection() + ); + + return response; + }; +} + +/** + * A Unix or TCP/IP socket that can be mounted into a container. + */ +export class Socket extends BaseClient { + private readonly _id?: SocketID = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _id?: SocketID + ) { + super(parent); + + this._id = _id; + } + + /** + * A unique identifier for this Socket. + */ + id = async (): Promise => { + if (this._id) { + return this._id; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response; + }; +} + +/** + * An interactive terminal that clients can connect to. + */ +export class Terminal extends BaseClient { + private readonly _id?: TerminalID = undefined; + private readonly _websocketEndpoint?: string = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _id?: TerminalID, + _websocketEndpoint?: string + ) { + super(parent); + + this._id = _id; + this._websocketEndpoint = _websocketEndpoint; + } + + /** + * A unique identifier for this Terminal. + */ + id = async (): Promise => { + if (this._id) { + return this._id; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * An http endpoint at which this terminal can be connected to over a websocket. + */ + websocketEndpoint = async (): Promise => { + if (this._websocketEndpoint) { + return this._websocketEndpoint; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "websocketEndpoint", + }, + ], + await this._ctx.connection() + ); + + return response; + }; +} + +/** + * A definition of a parameter or return type in a Module. + */ +export class TypeDef extends BaseClient { + private readonly _id?: TypeDefID = undefined; + private readonly _kind?: TypeDefKind = undefined; + private readonly _optional?: boolean = undefined; + + /** + * Constructor is used for internal usage only, do not create object from it. + */ + constructor( + parent?: { queryTree?: QueryTree[]; ctx: Context }, + _id?: TypeDefID, + _kind?: TypeDefKind, + _optional?: boolean + ) { + super(parent); + + this._id = _id; + this._kind = _kind; + this._optional = _optional; + } + + /** + * A unique identifier for this TypeDef. + */ + id = async (): Promise => { + if (this._id) { + return this._id; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "id", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * If kind is INPUT, the input-specific type definition. If kind is not INPUT, this will be null. + */ + asInput = (): InputTypeDef => { + return new InputTypeDef({ + queryTree: [ + ...this._queryTree, + { + operation: "asInput", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * If kind is INTERFACE, the interface-specific type definition. If kind is not INTERFACE, this will be null. + */ + asInterface = (): InterfaceTypeDef => { + return new InterfaceTypeDef({ + queryTree: [ + ...this._queryTree, + { + operation: "asInterface", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * If kind is LIST, the list-specific type definition. If kind is not LIST, this will be null. + */ + asList = (): ListTypeDef => { + return new ListTypeDef({ + queryTree: [ + ...this._queryTree, + { + operation: "asList", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * If kind is OBJECT, the object-specific type definition. If kind is not OBJECT, this will be null. + */ + asObject = (): ObjectTypeDef => { + return new ObjectTypeDef({ + queryTree: [ + ...this._queryTree, + { + operation: "asObject", + }, + ], + ctx: this._ctx, + }); + }; + + /** + * The kind of type this is (e.g. primitive, list, object). + */ + kind = async (): Promise => { + if (this._kind) { + return this._kind; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "kind", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Whether this type can be set to null. Defaults to false. + */ + optional = async (): Promise => { + if (this._optional) { + return this._optional; + } + + const response: Awaited = await computeQuery( + [ + ...this._queryTree, + { + operation: "optional", + }, + ], + await this._ctx.connection() + ); + + return response; + }; + + /** + * Adds a function for constructing a new instance of an Object TypeDef, failing if the type is not an object. + */ + withConstructor = (function_: Function_): TypeDef => { + return new TypeDef({ + queryTree: [ + ...this._queryTree, + { + operation: "withConstructor", + args: { + function: function_, + }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Adds a static field for an Object TypeDef, failing if the type is not an object. + * @param name The name of the field in the object + * @param typeDef The type of the field + * @param opts.description A doc string for the field, if any + */ + withField = ( + name: string, + typeDef: TypeDef, + opts?: TypeDefWithFieldOpts + ): TypeDef => { + return new TypeDef({ + queryTree: [ + ...this._queryTree, + { + operation: "withField", + args: { name, typeDef, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Adds a function for an Object or Interface TypeDef, failing if the type is not one of those kinds. + */ + withFunction = (function_: Function_): TypeDef => { + return new TypeDef({ + queryTree: [ + ...this._queryTree, + { + operation: "withFunction", + args: { + function: function_, + }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Returns a TypeDef of kind Interface with the provided name. + */ + withInterface = (name: string, opts?: TypeDefWithInterfaceOpts): TypeDef => { + return new TypeDef({ + queryTree: [ + ...this._queryTree, + { + operation: "withInterface", + args: { name, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Sets the kind of the type. + */ + withKind = (kind: TypeDefKind): TypeDef => { + const metadata: Metadata = { + kind: { is_enum: true }, + }; + + return new TypeDef({ + queryTree: [ + ...this._queryTree, + { + operation: "withKind", + args: { kind, __metadata: metadata }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Returns a TypeDef of kind List with the provided type for its elements. + */ + withListOf = (elementType: TypeDef): TypeDef => { + return new TypeDef({ + queryTree: [ + ...this._queryTree, + { + operation: "withListOf", + args: { elementType }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Returns a TypeDef of kind Object with the provided name. + * + * Note that an object's fields and functions may be omitted if the intent is only to refer to an object. This is how functions are able to return their own object, or any other circular reference. + */ + withObject = (name: string, opts?: TypeDefWithObjectOpts): TypeDef => { + return new TypeDef({ + queryTree: [ + ...this._queryTree, + { + operation: "withObject", + args: { name, ...opts }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Sets whether this type can be set to null. + */ + withOptional = (optional: boolean): TypeDef => { + return new TypeDef({ + queryTree: [ + ...this._queryTree, + { + operation: "withOptional", + args: { optional }, + }, + ], + ctx: this._ctx, + }); + }; + + /** + * Call the provided function with current TypeDef. + * + * This is useful for reusability and readability by not breaking the calling chain. + */ + with = (arg: (param: TypeDef) => TypeDef) => { + return arg(this); + }; +} + +export const dag = new Client({ ctx: defaultContext }); diff --git a/.fluentci/sdk/client.ts b/.fluentci/sdk/client.ts new file mode 100644 index 00000000..22ef15ef --- /dev/null +++ b/.fluentci/sdk/client.ts @@ -0,0 +1,9 @@ +import { GraphQLClient } from "../deps.ts"; + +export function createGQLClient(port: number, token: string): GraphQLClient { + return new GraphQLClient(`http://127.0.0.1:${port}/query`, { + headers: { + Authorization: "Basic " + btoa(token + ":"), + }, + }); +} diff --git a/.fluentci/sdk/common/errors/DaggerSDKError.ts b/.fluentci/sdk/common/errors/DaggerSDKError.ts new file mode 100644 index 00000000..f2f009d4 --- /dev/null +++ b/.fluentci/sdk/common/errors/DaggerSDKError.ts @@ -0,0 +1,46 @@ +import { log } from "../utils.ts"; +import { ErrorCodes, ErrorNames } from "./errors-codes.ts"; + +export interface DaggerSDKErrorOptions { + cause?: Error; +} + +/** + * The base error. Every other error inherits this error. + */ +export abstract class DaggerSDKError extends Error { + /** + * The name of the dagger error. + */ + abstract readonly name: ErrorNames; + + /** + * The dagger specific error code. + * Use this to identify dagger errors programmatically. + */ + abstract readonly code: ErrorCodes; + + /** + * The original error, which caused the DaggerSDKError. + */ + cause?: Error; + + protected constructor(message: string, options?: DaggerSDKErrorOptions) { + super(message); + this.cause = options?.cause; + } + + /** + * @hidden + */ + get [Symbol.toStringTag]() { + return this.name; + } + + /** + * Pretty prints the error + */ + printStackTrace() { + log(this.stack); + } +} diff --git a/.fluentci/sdk/common/errors/DockerImageRefValidationError.ts b/.fluentci/sdk/common/errors/DockerImageRefValidationError.ts new file mode 100644 index 00000000..6f45b46b --- /dev/null +++ b/.fluentci/sdk/common/errors/DockerImageRefValidationError.ts @@ -0,0 +1,28 @@ +import { DaggerSDKError, DaggerSDKErrorOptions } from "./DaggerSDKError.ts" +import { ERROR_CODES, ERROR_NAMES } from "./errors-codes.ts" + +interface DockerImageRefValidationErrorOptions extends DaggerSDKErrorOptions { + ref: string +} + +/** + * This error is thrown if the passed image reference does not pass validation and is not compliant with the + * DockerImage constructor. + */ +export class DockerImageRefValidationError extends DaggerSDKError { + name = ERROR_NAMES.DockerImageRefValidationError + code = ERROR_CODES.DockerImageRefValidationError + + /** + * The docker image reference, which caused the error. + */ + ref: string + + /** + * @hidden + */ + constructor(message: string, options: DockerImageRefValidationErrorOptions) { + super(message, options) + this.ref = options?.ref + } +} diff --git a/.fluentci/sdk/common/errors/EngineSessionConnectParamsParseError.ts b/.fluentci/sdk/common/errors/EngineSessionConnectParamsParseError.ts new file mode 100644 index 00000000..8acd47ae --- /dev/null +++ b/.fluentci/sdk/common/errors/EngineSessionConnectParamsParseError.ts @@ -0,0 +1,31 @@ +import { DaggerSDKError, DaggerSDKErrorOptions } from "./DaggerSDKError.ts"; +import { ERROR_CODES, ERROR_NAMES } from "./errors-codes.ts"; + +interface EngineSessionConnectParamsParseErrorOptions + extends DaggerSDKErrorOptions { + parsedLine: string; +} + +/** + * This error is thrown if the EngineSession does not manage to parse the required connection parameters from the session binary + */ +export class EngineSessionConnectParamsParseError extends DaggerSDKError { + name = ERROR_NAMES.EngineSessionConnectParamsParseError; + code = ERROR_CODES.EngineSessionConnectParamsParseError; + + /** + * the line, which caused the error during parsing, if the error was caused because of parsing. + */ + parsedLine: string; + + /** + * @hidden + */ + constructor( + message: string, + options: EngineSessionConnectParamsParseErrorOptions + ) { + super(message, options); + this.parsedLine = options.parsedLine; + } +} diff --git a/.fluentci/sdk/common/errors/EngineSessionConnectionTimeoutError.ts b/.fluentci/sdk/common/errors/EngineSessionConnectionTimeoutError.ts new file mode 100644 index 00000000..e2550ac2 --- /dev/null +++ b/.fluentci/sdk/common/errors/EngineSessionConnectionTimeoutError.ts @@ -0,0 +1,31 @@ +import { DaggerSDKError, DaggerSDKErrorOptions } from "./DaggerSDKError.ts"; +import { ERROR_CODES, ERROR_NAMES } from "./errors-codes.ts"; + +interface EngineSessionConnectionTimeoutErrorOptions + extends DaggerSDKErrorOptions { + timeOutDuration: number; +} + +/** + * This error is thrown if the EngineSession does not manage to parse the required port successfully because the sessions connection timed out. + */ +export class EngineSessionConnectionTimeoutError extends DaggerSDKError { + name = ERROR_NAMES.EngineSessionConnectionTimeoutError; + code = ERROR_CODES.EngineSessionConnectionTimeoutError; + + /** + * The duration until the timeout occurred in ms. + */ + timeOutDuration: number; + + /** + * @hidden + */ + constructor( + message: string, + options: EngineSessionConnectionTimeoutErrorOptions + ) { + super(message, options); + this.timeOutDuration = options.timeOutDuration; + } +} diff --git a/.fluentci/sdk/common/errors/EngineSessionErrorOptions.ts b/.fluentci/sdk/common/errors/EngineSessionErrorOptions.ts new file mode 100644 index 00000000..ba0ec908 --- /dev/null +++ b/.fluentci/sdk/common/errors/EngineSessionErrorOptions.ts @@ -0,0 +1,20 @@ +import { DaggerSDKError, DaggerSDKErrorOptions } from "./DaggerSDKError.ts"; +import { ERROR_CODES, ERROR_NAMES } from "./errors-codes.ts"; + +type EngineSessionErrorOptions = DaggerSDKErrorOptions; + +/** + * This error is thrown if the EngineSession does not manage to parse the required port successfully because a EOF is read before any valid port. + * This usually happens if no connection can be established. + */ +export class EngineSessionError extends DaggerSDKError { + name = ERROR_NAMES.EngineSessionError; + code = ERROR_CODES.EngineSessionError; + + /** + * @hidden + */ + constructor(message: string, options?: EngineSessionErrorOptions) { + super(message, options); + } +} diff --git a/.fluentci/sdk/common/errors/ExecError.ts b/.fluentci/sdk/common/errors/ExecError.ts new file mode 100644 index 00000000..ede655b9 --- /dev/null +++ b/.fluentci/sdk/common/errors/ExecError.ts @@ -0,0 +1,54 @@ +import { DaggerSDKError, DaggerSDKErrorOptions } from "./DaggerSDKError.ts"; +import { ERROR_CODES, ERROR_NAMES } from "./errors-codes.ts"; + +interface ExecErrorOptions extends DaggerSDKErrorOptions { + cmd: string[]; + exitCode: number; + stdout: string; + stderr: string; +} + +/** + * API error from an exec operation in a pipeline. + */ +export class ExecError extends DaggerSDKError { + name = ERROR_NAMES.ExecError; + code = ERROR_CODES.ExecError; + + /** + * The command that caused the error. + */ + cmd: string[]; + + /** + * The exit code of the command. + */ + exitCode: number; + + /** + * The stdout of the command. + */ + stdout: string; + + /** + * The stderr of the command. + */ + stderr: string; + + /** + * @hidden + */ + constructor(message: string, options: ExecErrorOptions) { + super(message, options); + this.cmd = options.cmd; + this.exitCode = options.exitCode; + this.stdout = options.stdout; + this.stderr = options.stderr; + } + + toString(): string { + return `${super.toString()}\nStdout:\n${this.stdout}\nStderr:\n${ + this.stderr + }`; + } +} diff --git a/.fluentci/sdk/common/errors/GraphQLRequestError.ts b/.fluentci/sdk/common/errors/GraphQLRequestError.ts new file mode 100644 index 00000000..59584f85 --- /dev/null +++ b/.fluentci/sdk/common/errors/GraphQLRequestError.ts @@ -0,0 +1,36 @@ +import { GraphQLRequestContext, GraphQLResponse } from "./types.ts"; + +import { DaggerSDKError, DaggerSDKErrorOptions } from "./DaggerSDKError.ts"; +import { ERROR_CODES, ERROR_NAMES } from "./errors-codes.ts"; + +interface GraphQLRequestErrorOptions extends DaggerSDKErrorOptions { + response: GraphQLResponse; + request: GraphQLRequestContext; +} + +/** + * This error originates from the dagger engine. It means that some error was thrown and sent back via GraphQL. + */ +export class GraphQLRequestError extends DaggerSDKError { + name = ERROR_NAMES.GraphQLRequestError; + code = ERROR_CODES.GraphQLRequestError; + + /** + * The query and variables, which caused the error. + */ + requestContext: GraphQLRequestContext; + + /** + * the GraphQL response containing the error. + */ + response: GraphQLResponse; + + /** + * @hidden + */ + constructor(message: string, options: GraphQLRequestErrorOptions) { + super(message, options); + this.requestContext = options.request; + this.response = options.response; + } +} diff --git a/.fluentci/sdk/common/errors/InitEngineSessionBinaryError.ts b/.fluentci/sdk/common/errors/InitEngineSessionBinaryError.ts new file mode 100644 index 00000000..879c1ced --- /dev/null +++ b/.fluentci/sdk/common/errors/InitEngineSessionBinaryError.ts @@ -0,0 +1,17 @@ +import { DaggerSDKError, DaggerSDKErrorOptions } from "./DaggerSDKError.ts"; +import { ERROR_CODES, ERROR_NAMES } from "./errors-codes.ts"; + +/** + * This error is thrown if the dagger binary cannot be copied from the dagger docker image and copied to the local host. + */ +export class InitEngineSessionBinaryError extends DaggerSDKError { + name = ERROR_NAMES.InitEngineSessionBinaryError; + code = ERROR_CODES.InitEngineSessionBinaryError; + + /** + * @hidden + */ + constructor(message: string, options?: DaggerSDKErrorOptions) { + super(message, options); + } +} diff --git a/.fluentci/sdk/common/errors/NotAwaitedRequestError.ts b/.fluentci/sdk/common/errors/NotAwaitedRequestError.ts new file mode 100644 index 00000000..291b9248 --- /dev/null +++ b/.fluentci/sdk/common/errors/NotAwaitedRequestError.ts @@ -0,0 +1,17 @@ +import { DaggerSDKError, DaggerSDKErrorOptions } from "./DaggerSDKError.ts"; +import { ERROR_CODES, ERROR_NAMES } from "./errors-codes.ts"; + +/** + * This error is thrown when the compute function isn't awaited. + */ +export class NotAwaitedRequestError extends DaggerSDKError { + name = ERROR_NAMES.NotAwaitedRequestError; + code = ERROR_CODES.NotAwaitedRequestError; + + /** + * @hidden + */ + constructor(message: string, options?: DaggerSDKErrorOptions) { + super(message, options); + } +} diff --git a/.fluentci/sdk/common/errors/TooManyNestedObjectsError.ts b/.fluentci/sdk/common/errors/TooManyNestedObjectsError.ts new file mode 100644 index 00000000..7b8b9075 --- /dev/null +++ b/.fluentci/sdk/common/errors/TooManyNestedObjectsError.ts @@ -0,0 +1,27 @@ +import { DaggerSDKError, DaggerSDKErrorOptions } from "./DaggerSDKError.ts"; +import { ERROR_CODES, ERROR_NAMES } from "./errors-codes.ts"; + +interface TooManyNestedObjectsErrorOptions extends DaggerSDKErrorOptions { + response: unknown; +} + +/** + * Dagger only expects one response value from the engine. If the engine returns more than one value this error is thrown. + */ +export class TooManyNestedObjectsError extends DaggerSDKError { + name = ERROR_NAMES.TooManyNestedObjectsError; + code = ERROR_CODES.TooManyNestedObjectsError; + + /** + * the response containing more than one value. + */ + response: unknown; + + /** + * @hidden + */ + constructor(message: string, options: TooManyNestedObjectsErrorOptions) { + super(message, options); + this.response = options.response; + } +} diff --git a/.fluentci/sdk/common/errors/UnknownDaggerError.ts b/.fluentci/sdk/common/errors/UnknownDaggerError.ts new file mode 100644 index 00000000..fe291697 --- /dev/null +++ b/.fluentci/sdk/common/errors/UnknownDaggerError.ts @@ -0,0 +1,17 @@ +import { DaggerSDKError, DaggerSDKErrorOptions } from "./DaggerSDKError.ts"; +import { ERROR_CODES, ERROR_NAMES } from "./errors-codes.ts"; + +/** + * This error is thrown if the dagger SDK does not identify the error and just wraps the cause. + */ +export class UnknownDaggerError extends DaggerSDKError { + name = ERROR_NAMES.UnknownDaggerError; + code = ERROR_CODES.UnknownDaggerError; + + /** + * @hidden + */ + constructor(message: string, options: DaggerSDKErrorOptions) { + super(message, options); + } +} diff --git a/.fluentci/sdk/common/errors/errors-codes.ts b/.fluentci/sdk/common/errors/errors-codes.ts new file mode 100644 index 00000000..a6e4d484 --- /dev/null +++ b/.fluentci/sdk/common/errors/errors-codes.ts @@ -0,0 +1,63 @@ +export const ERROR_CODES = { + /** + * {@link GraphQLRequestError} + */ + GraphQLRequestError: "D100", + + /** + * {@link UnknownDaggerError} + */ + UnknownDaggerError: "D101", + + /** + * {@link TooManyNestedObjectsError} + */ + TooManyNestedObjectsError: "D102", + + /** + * {@link EngineSessionConnectParamsParseError} + */ + EngineSessionConnectParamsParseError: "D103", + + /** + * {@link EngineSessionConnectionTimeoutError} + */ + EngineSessionConnectionTimeoutError: "D104", + + /** + * {@link EngineSessionError} + */ + EngineSessionError: "D105", + + /** + * {@link InitEngineSessionBinaryError} + */ + InitEngineSessionBinaryError: "D106", + + /** + * {@link DockerImageRefValidationError} + */ + DockerImageRefValidationError: "D107", + + /** + * {@link NotAwaitedRequestError} + */ + NotAwaitedRequestError: "D108", + + /** + * (@link ExecError} + */ + ExecError: "D109", +} as const + +type ErrorCodesType = typeof ERROR_CODES +export type ErrorNames = keyof ErrorCodesType +export type ErrorCodes = ErrorCodesType[ErrorNames] + +type ErrorNamesMap = { readonly [Key in ErrorNames]: Key } +export const ERROR_NAMES: ErrorNamesMap = ( + Object.keys(ERROR_CODES) as Array +).reduce( + (obj, item) => ({ ...obj, [item]: item }), + {} as ErrorNamesMap +) diff --git a/.fluentci/sdk/common/errors/index.ts b/.fluentci/sdk/common/errors/index.ts new file mode 100644 index 00000000..61faf702 --- /dev/null +++ b/.fluentci/sdk/common/errors/index.ts @@ -0,0 +1,12 @@ +export { DaggerSDKError } from "./DaggerSDKError.ts"; +export { UnknownDaggerError } from "./UnknownDaggerError.ts"; +export { DockerImageRefValidationError } from "./DockerImageRefValidationError.ts"; +export { EngineSessionConnectParamsParseError } from "./EngineSessionConnectParamsParseError.ts"; +export { ExecError } from "./ExecError.ts"; +export { GraphQLRequestError } from "./GraphQLRequestError.ts"; +export { InitEngineSessionBinaryError } from "./InitEngineSessionBinaryError.ts"; +export { TooManyNestedObjectsError } from "./TooManyNestedObjectsError.ts"; +export { EngineSessionError } from "./EngineSessionErrorOptions.ts"; +export { EngineSessionConnectionTimeoutError } from "./EngineSessionConnectionTimeoutError.ts"; +export { NotAwaitedRequestError } from "./NotAwaitedRequestError.ts"; +export { ERROR_CODES } from "./errors-codes.ts"; diff --git a/.fluentci/sdk/common/errors/types.ts b/.fluentci/sdk/common/errors/types.ts new file mode 100644 index 00000000..f5b15827 --- /dev/null +++ b/.fluentci/sdk/common/errors/types.ts @@ -0,0 +1,16 @@ +import { GraphQLError } from "npm:graphql@16.8.1"; + +export interface GraphQLResponse { + data?: T; + errors?: GraphQLError[]; + extensions?: unknown; + status: number; + [key: string]: unknown; +} + +export type Variables = Record; + +export interface GraphQLRequestContext { + query: string | string[]; + variables?: V; +} diff --git a/.fluentci/sdk/common/utils.ts b/.fluentci/sdk/common/utils.ts new file mode 100644 index 00000000..58536019 --- /dev/null +++ b/.fluentci/sdk/common/utils.ts @@ -0,0 +1,4 @@ +import logger from "npm:node-color-log@11.0.2"; + +export const log = (stack?: string) => + logger.bgColor("red").color("black").log(stack); diff --git a/.fluentci/sdk/connect.ts b/.fluentci/sdk/connect.ts new file mode 100644 index 00000000..02a97fa0 --- /dev/null +++ b/.fluentci/sdk/connect.ts @@ -0,0 +1,53 @@ +import { Writable } from "node:stream"; +import { Client } from "./client.gen.ts"; +import { Context } from "./context.ts"; + +/** + * ConnectOpts defines option used to connect to an engine. + */ +export interface ConnectOpts { + /** + * Use to overwrite Dagger workdir + * @defaultValue process.cwd() + */ + Workdir?: string; + /** + * Enable logs output + * @example + * LogOutput + * ```ts + * connect(async (client: Client) => { + const source = await client.host().workdir().id() + ... + }, {LogOutput: process.stdout}) + ``` + */ + LogOutput?: Writable; +} + +export type CallbackFct = (client: Client) => Promise; + +export interface ConnectParams { + port: number; + session_token: string; +} + +/** + * connect runs GraphQL server and initializes a + * GraphQL client to execute query on it through its callback. + * This implementation is based on the existing Go SDK. + */ +export async function connect( + cb: CallbackFct, + _config: ConnectOpts = {} +): Promise { + const ctx = new Context(); + const client = new Client({ ctx: ctx }); + + // Initialize connection + await ctx.connection(); + + await cb(client).finally(() => { + ctx.close(); + }); +} diff --git a/.fluentci/sdk/context.ts b/.fluentci/sdk/context.ts new file mode 100644 index 00000000..13b47cf6 --- /dev/null +++ b/.fluentci/sdk/context.ts @@ -0,0 +1,53 @@ +import { GraphQLClient } from "../deps.ts"; + +import { initDefaultContext } from "./builder.ts"; + +interface ContextConfig { + client?: GraphQLClient; +} + +/** + * Context abstracts the connection to the engine. + * + * It's required to implement the default global SDK. + * Its purpose is to store and returns the connection to the graphQL API, if + * no connection is set, it can create its own. + * + * This is also useful for lazy evaluation with the default global client, + * this one should only run the engine if it actually executes something. + */ +export class Context { + private _client?: GraphQLClient; + + constructor(config?: ContextConfig) { + this._client = config?.client; + } + + /** + * Returns a GraphQL client connected to the engine. + * + * If no client is set, it will create one. + */ + public async connection(): Promise { + if (!this._client) { + const defaultCtx = await initDefaultContext(); + this._client = defaultCtx._client as GraphQLClient; + } + + return this._client; + } + + /** + * Close the connection and the engine if this one was started by the node + * SDK. + */ + public close(): void { + // Reset client, so it can restart a new connection if necessary + this._client = undefined; + } +} + +/** + * Expose a default context for the global client + */ +export const defaultContext = new Context(); diff --git a/.fluentci/sdk/nix/example.ts b/.fluentci/sdk/nix/example.ts new file mode 100644 index 00000000..d30ebd51 --- /dev/null +++ b/.fluentci/sdk/nix/example.ts @@ -0,0 +1,17 @@ +import Client from "../../deps.ts"; +import { connect } from "../connect.ts"; +import { withNix } from "./steps.ts"; + +connect(async (client: Client) => { + const ctr = withNix( + client + .pipeline("nix-installer") + .container() + .from("alpine") + .withExec(["apk", "add", "curl"]) + ); + + const result = await ctr.stdout(); + + console.log(result); +}); diff --git a/.fluentci/sdk/nix/example_with_devbox.ts b/.fluentci/sdk/nix/example_with_devbox.ts new file mode 100644 index 00000000..60174e93 --- /dev/null +++ b/.fluentci/sdk/nix/example_with_devbox.ts @@ -0,0 +1,19 @@ +import Client from "../../deps.ts"; +import { connect } from "../connect.ts"; +import { withDevbox } from "./steps.ts"; + +connect(async (client: Client) => { + const ctr = withDevbox( + client + .pipeline("nix-installer") + .container() + .from("alpine") + .withExec(["apk", "add", "curl", "bash"]) + ) + .withExec(["devbox", "global", "add", "gh"]) + .withExec(["sh", "-c", 'eval "$(devbox global shellenv)" && gh version']); + + const result = await ctr.stdout(); + + console.log(result); +}); diff --git a/.fluentci/sdk/nix/example_with_devbox_pkg.ts b/.fluentci/sdk/nix/example_with_devbox_pkg.ts new file mode 100644 index 00000000..1728d3e0 --- /dev/null +++ b/.fluentci/sdk/nix/example_with_devbox_pkg.ts @@ -0,0 +1,21 @@ +import Client from "../../deps.ts"; +import { connect } from "../connect.ts"; +import { withDevboxExec, withPackageFromDevbox } from "./steps.ts"; + +connect(async (client: Client) => { + const ctr = withDevboxExec( + withPackageFromDevbox( + client + .pipeline("nix-installer") + .container() + .from("alpine") + .withExec(["apk", "add", "curl", "bash"]), + ["gh"] + ), + ["gh version"] + ); + + const result = await ctr.stdout(); + + console.log(result); +}); diff --git a/.fluentci/sdk/nix/example_with_devenv.ts b/.fluentci/sdk/nix/example_with_devenv.ts new file mode 100644 index 00000000..c3c4341a --- /dev/null +++ b/.fluentci/sdk/nix/example_with_devenv.ts @@ -0,0 +1,17 @@ +import Client from "../../deps.ts"; +import { connect } from "../connect.ts"; +import { withDevenv } from "./steps.ts"; + +connect(async (client: Client) => { + const ctr = withDevenv( + client + .pipeline("nix-installer") + .container() + .from("alpine") + .withExec(["apk", "add", "curl"]) + ); + + const result = await ctr.stdout(); + + console.log(result); +}); diff --git a/.fluentci/sdk/nix/example_with_flox.ts b/.fluentci/sdk/nix/example_with_flox.ts new file mode 100644 index 00000000..9eb98593 --- /dev/null +++ b/.fluentci/sdk/nix/example_with_flox.ts @@ -0,0 +1,17 @@ +import Client from "../../deps.ts"; +import { connect } from "../connect.ts"; +import { withFlox } from "./steps.ts"; + +connect(async (client: Client) => { + const ctr = withFlox( + client + .pipeline("nix-installer") + .container() + .from("alpine") + .withExec(["apk", "add", "curl"]) + ); + + const result = await ctr.stdout(); + + console.log(result); +}); diff --git a/.fluentci/sdk/nix/index.ts b/.fluentci/sdk/nix/index.ts new file mode 100644 index 00000000..4c1d2dbb --- /dev/null +++ b/.fluentci/sdk/nix/index.ts @@ -0,0 +1,17 @@ +import { + withDevbox, + withDevboxExec, + withDevenv, + withFlox, + withNix, + withPackageFromDevbox, +} from "./steps.ts"; + +export { + withDevbox, + withDevboxExec, + withDevenv, + withFlox, + withNix, + withPackageFromDevbox, +}; diff --git a/.fluentci/sdk/nix/steps.ts b/.fluentci/sdk/nix/steps.ts new file mode 100644 index 00000000..f1b1f0e3 --- /dev/null +++ b/.fluentci/sdk/nix/steps.ts @@ -0,0 +1,103 @@ +import { Container } from "../client.gen.ts"; + +export const withNix = (ctr: Container) => + ctr + .withExec([ + "sh", + "-c", + "[ -f /etc/nix/group ] && cp /etc/nix/group /etc/group; exit 0", + ]) + .withExec([ + "sh", + "-c", + "[ -f /etc/nix/passwd ] && cp /etc/nix/passwd /etc/passwd; exit 0", + ]) + .withExec([ + "sh", + "-c", + "[ -f /etc/nix/shadow ] && cp /etc/nix/shadow /etc/shadow; exit 0", + ]) + .withExec([ + "sh", + "-c", + '[ ! -f "/nix/receipt.json" ] && curl --proto =https --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install linux --extra-conf "sandbox = false" --init none --no-confirm; exit 0', + ]) + .withExec(["cp", "/etc/group", "/etc/nix/group"]) + .withExec(["cp", "/etc/passwd", "/etc/nix/passwd"]) + .withExec(["cp", "/etc/shadow", "/etc/nix/shadow"]) + .withExec([ + "sed", + "-i", + "s/auto-allocate-uids = true/auto-allocate-uids = false/g", + "/etc/nix/nix.conf", + ]) + .withEnvVariable("PATH", "${PATH}:/nix/var/nix/profiles/default/bin", { + expand: true, + }) + .withExec(["nix", "run", "nixpkgs#hello"]); + +export const withDevbox = (ctr: Container) => + withNix(ctr) + .withExec(["adduser", "--disabled-password", "devbox"]) + .withExec(["addgroup", "devbox", "nixbld"]) + .withEnvVariable("FORCE", "1") + .withExec(["sh", "-c", "curl -fsSL https://get.jetpack.io/devbox | bash"]) + .withExec(["devbox", "version"]); + +export const withPackageFromDevbox = (ctr: Container, pkgs: string[]) => + withDevbox(ctr).withExec(["devbox", "global", "add", ...pkgs]); + +export const withDevboxExec = (ctr: Container, cmds: string[]) => + cmds.reduce( + (ctr, cmd) => + ctr.withExec(["sh", "-c", `eval "$(devbox global shellenv)" && ${cmd}`]), + ctr + ); + +export const withDevenv = (ctr: Container) => + withNix(ctr) + .withExec(["adduser", "--disabled-password", "devenv"]) + .withExec(["addgroup", "devenv", "nixbld"]) + .withEnvVariable("USER", "root") + .withExec([ + "sh", + "-c", + 'echo "trusted-users = root $USER" | tee -a /etc/nix/nix.conf', + ]) + .withExec([ + "nix", + "profile", + "install", + "--accept-flake-config", + "github:cachix/cachix", + ]) + .withExec(["cachix", "use", "devenv"]) + .withExec([ + "nix", + "profile", + "install", + "--accept-flake-config", + "github:cachix/devenv/latest", + ]) + .withExec(["devenv", "version"]); + +export const withFlox = (ctr: Container) => + withNix(ctr) + .withExec(["adduser", "--disabled-password", "flox"]) + .withExec(["addgroup", "flox", "nixbld"]) + .withExec([ + "sh", + "-c", + "echo 'extra-trusted-substituters = https://cache.floxdev.com' | tee -a /etc/nix/nix.conf && echo 'extra-trusted-public-keys = flox-store-public-0:8c/B+kjIaQ+BloCmNkRUKwaVPFWkriSAd0JJvuDu4F0=' | tee -a /etc/nix/nix.conf", + ]) + .withExec([ + "nix", + "profile", + "install", + "--impure", + "--experimental-features", + "nix-command flakes auto-allocate-uids", + "--accept-flake-config", + "github:flox/floxpkgs#flox.fromCatalog", + ]) + .withExec(["flox", "--version"]); diff --git a/.fluentci/sdk/utils.ts b/.fluentci/sdk/utils.ts new file mode 100644 index 00000000..e779fad0 --- /dev/null +++ b/.fluentci/sdk/utils.ts @@ -0,0 +1,244 @@ +// deno-lint-ignore-file no-explicit-any +import { + ClientError, + gql, + GraphQLClient, + GraphQLRequestError, + TooManyNestedObjectsError, + UnknownDaggerError, + NotAwaitedRequestError, + ExecError, +} from "../deps.ts"; + +import { Metadata, QueryTree } from "./client.gen.ts"; + +/** + * Format argument into GraphQL query format. + */ +function buildArgs(args: any): string { + const metadata: Metadata = args.__metadata || {}; + + // Remove unwanted quotes + const formatValue = (key: string, value: string) => { + // Special treatment for enumeration, they must be inserted without quotes + if (metadata[key]?.is_enum) { + return JSON.stringify(value).replace(/['"]+/g, ""); + } + + return JSON.stringify(value).replace( + /\{"[a-zA-Z]+":|,"[a-zA-Z]+":/gi, + (str) => { + return str.replace(/"/g, ""); + } + ); + }; + + if (args === undefined || args === null) { + return ""; + } + + const formattedArgs = Object.entries(args).reduce( + (acc: any, [key, value]) => { + // Ignore internal metadata key + if (key === "__metadata") { + return acc; + } + + if (value !== undefined && value !== null) { + acc.push(`${key}: ${formatValue(key, value as string)}`); + } + + return acc; + }, + [] + ); + + if (formattedArgs.length === 0) { + return ""; + } + + return `(${formattedArgs})`; +} + +/** + * Find QueryTree, convert them into GraphQl query + * then compute and return the result to the appropriate field + */ +async function computeNestedQuery( + query: QueryTree[], + client: GraphQLClient +): Promise { + // Check if there is a nested queryTree to be executed + const isQueryTree = (value: any) => value["_queryTree"] !== undefined; + + // Check if there is a nested array of queryTree to be executed + const isArrayQueryTree = (value: any[]) => + value.every((v) => v instanceof Object && isQueryTree(v)); + + // Prepare query tree for final query by computing nested queries + // and building it with their results. + const computeQueryTree = async (value: any): Promise => { + // Resolve sub queries if operation's args is a subquery + for (const op of value["_queryTree"]) { + await computeNestedQuery([op], client); + } + + // push an id that will be used by the container + return buildQuery([ + ...value["_queryTree"], + { + operation: "id", + }, + ]); + }; + + // Remove all undefined args and assert args type + const queryToExec = query.filter((q): q is Required => !!q.args); + + for (const q of queryToExec) { + await Promise.all( + // Compute nested query for single object + Object.entries(q.args).map(async ([key, value]: any) => { + if (value instanceof Object && isQueryTree(value)) { + // push an id that will be used by the container + const getQueryTree = await computeQueryTree(value); + + q.args[key] = await compute(getQueryTree, client); + } + + // Compute nested query for array of object + if (Array.isArray(value) && isArrayQueryTree(value)) { + const tmp: any = q.args[key]; + + for (let i = 0; i < value.length; i++) { + // push an id that will be used by the container + const getQueryTree = await computeQueryTree(value[i]); + + tmp[i] = await compute(getQueryTree, client); + } + + q.args[key] = tmp; + } + }) + ); + } +} + +/** + * Convert the queryTree into a GraphQL query + * @param q + * @returns + */ +export function buildQuery(q: QueryTree[]): string { + const query = q.reduce((acc, { operation, args }, i) => { + const qLen = q.length; + + acc += ` ${operation} ${args ? `${buildArgs(args)}` : ""} ${ + qLen - 1 !== i ? "{" : "}".repeat(qLen - 1) + }`; + + return acc; + }, ""); + + return `{${query} }`; +} + +/** + * Convert querytree into a Graphql query then compute it + * @param q | QueryTree[] + * @param client | GraphQLClient + * @returns + */ +export async function computeQuery( + q: QueryTree[], + client: GraphQLClient +): Promise { + await computeNestedQuery(q, client); + + const query = buildQuery(q); + + return await compute(query, client); +} + +/** + * Return a Graphql query result flattened + * @param response any + * @returns + */ +export function queryFlatten(response: any): T { + // Recursion break condition + // If our response is not an object or an array we assume we reached the value + if (!(response instanceof Object) || Array.isArray(response)) { + return response; + } + + const keys = Object.keys(response); + + if (keys.length != 1) { + // Dagger is currently expecting to only return one value + // If the response is nested in a way were more than one object is nested inside throw an error + throw new TooManyNestedObjectsError( + "Too many nested objects inside graphql response", + { response: response } + ); + } + + const nestedKey = keys[0]; + + return queryFlatten(response[nestedKey]); +} + +/** + * Send a GraphQL document to the server + * return a flatten result + * @hidden + */ +export async function compute( + query: string, + client: GraphQLClient +): Promise { + let computeQuery: Awaited; + try { + computeQuery = await client.request( + gql` + ${query} + ` + ); + } catch (e: any) { + if (e instanceof ClientError) { + const msg = e.response.errors?.[0]?.message ?? `API Error`; + const ext = e.response.errors?.[0]?.extensions; + + if (ext?._type === "EXEC_ERROR") { + throw new ExecError(msg, { + cmd: (ext.cmd as string[]) ?? [], + exitCode: (ext.exitCode as number) ?? -1, + stdout: (ext.stdout as string) ?? "", + stderr: (ext.stderr as string) ?? "", + }); + } + + throw new GraphQLRequestError(msg, { + request: e.request, + response: e.response, + cause: e, + }); + } + + // Looking for connection error in case the function has not been awaited. + if (e.errno === "ECONNREFUSED") { + throw new NotAwaitedRequestError( + "Encountered an error while requesting data via graphql through a synchronous call. Make sure the function called is awaited.", + { cause: e } + ); + } + + // Just throw the unknown error + throw new UnknownDaggerError( + "Encountered an unknown error while requesting data via graphql", + { cause: e } + ); + } + + return queryFlatten(computeQuery); +} diff --git a/.fluentci/src/aws/README.md b/.fluentci/src/aws/README.md deleted file mode 100644 index a83b380a..00000000 --- a/.fluentci/src/aws/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# AWS CodePipeline - -[![fluentci pipeline](https://img.shields.io/badge/dynamic/json?label=pkg.fluentci.io&labelColor=%23000&color=%23460cf1&url=https%3A%2F%2Fapi.fluentci.io%2Fv1%2Fpipeline%2Frust_pipeline&query=%24.version)](https://pkg.fluentci.io/rust_pipeline) -[![deno module](https://shield.deno.dev/x/rust_pipeline)](https://deno.land/x/rust_pipeline) -![deno compatibility](https://shield.deno.dev/deno/^1.34) -[![](https://img.shields.io/codecov/c/gh/fluent-ci-templates/rust-pipeline)](https://codecov.io/gh/fluent-ci-templates/rust-pipeline) - -The following command will generate a `buildspec.yml` file in your project: - -```bash -fluentci ac init -t rust_pipeline -``` - -Generated file: - -```yaml -# Do not edit this file directly. It is generated by https://deno.land/x/fluent_aws_codepipeline - -version: 0.2 -phases: - install: - commands: - - curl -fsSL https://deno.land/x/install/install.sh | sh - - export DENO_INSTALL="$HOME/.deno" - - export PATH="$DENO_INSTALL/bin:$PATH" - - deno install -A -r https://cli.fluentci.io -n fluentci - - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - - mv bin/dagger /usr/local/bin - - dagger version - build: - commands: - - fluentci run rust_pipeline test build - post_build: - commands: - - echo Build completed on `date` - -``` - -Feel free to edit the template generator at `.fluentci/src/aws/config.ts` to your needs. diff --git a/.fluentci/src/aws/config.ts b/.fluentci/src/aws/config.ts deleted file mode 100644 index aa00a1f6..00000000 --- a/.fluentci/src/aws/config.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { BuildSpec } from "fluent_aws_codepipeline"; - -export function generateYaml(): BuildSpec { - const buildspec = new BuildSpec(); - buildspec - .phase("install", { - commands: [ - "curl -fsSL https://deno.land/x/install/install.sh | sh", - 'export DENO_INSTALL="$HOME/.deno"', - 'export PATH="$DENO_INSTALL/bin:$PATH"', - "deno install -A -r https://cli.fluentci.io -n fluentci", - "curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh", - "mv bin/dagger /usr/local/bin", - "dagger version", - ], - }) - .phase("build", { - commands: ["fluentci run rust_pipeline test build"], - }) - .phase("post_build", { - commands: ["echo Build completed on `date`"], - }); - return buildspec; -} diff --git a/.fluentci/src/aws/config_test.ts b/.fluentci/src/aws/config_test.ts deleted file mode 100644 index 97bed687..00000000 --- a/.fluentci/src/aws/config_test.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { assertEquals } from "https://deno.land/std@0.191.0/testing/asserts.ts"; -import { generateYaml } from "./config.ts"; - -Deno.test(function generateAWSCodePipelineTest() { - const buildspec = generateYaml(); - const actual = buildspec.toString(); - const expected = Deno.readTextFileSync("./fixtures/buildspec.yml"); - assertEquals(actual, expected); -}); diff --git a/.fluentci/src/aws/init.ts b/.fluentci/src/aws/init.ts deleted file mode 100644 index 83944b7a..00000000 --- a/.fluentci/src/aws/init.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { generateYaml } from "./config.ts"; - -generateYaml().save("buildspec.yml"); diff --git a/.fluentci/src/azure/README.md b/.fluentci/src/azure/README.md deleted file mode 100644 index 7b3d238e..00000000 --- a/.fluentci/src/azure/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# Azure Pipelines - -[![fluentci pipeline](https://img.shields.io/badge/dynamic/json?label=pkg.fluentci.io&labelColor=%23000&color=%23460cf1&url=https%3A%2F%2Fapi.fluentci.io%2Fv1%2Fpipeline%2Frust_pipeline&query=%24.version)](https://pkg.fluentci.io/rust_pipeline) -[![deno module](https://shield.deno.dev/x/rust_pipeline)](https://deno.land/x/rust_pipeline) -![deno compatibility](https://shield.deno.dev/deno/^1.34) -[![](https://img.shields.io/codecov/c/gh/fluent-ci-templates/rust-pipeline)](https://codecov.io/gh/fluent-ci-templates/rust-pipeline) - -The following command will generate a `azure-pipelines.yml` file in your project: - -```bash -fluentci ap init -t rust_pipeline -``` - -Generated file: - -```yaml -# Do not edit this file directly. It is generated by https://deno.land/x/fluent_azure_pipelines - -trigger: - - main -pool: - name: Default - vmImage: ubuntu-latest -steps: - - script: | - curl -fsSL https://deno.land/x/install/install.sh | sh - export DENO_INSTALL="$HOME/.deno" - export PATH="$DENO_INSTALL/bin:$PATH" - displayName: Install Deno - - script: deno install -A -r https://cli.fluentci.io -n fluentci - displayName: Setup Fluent CI CLI - - script: | - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - sudo mv bin/dagger /usr/local/bin - dagger version - displayName: Setup Dagger - - script: fluentci run rust_pipeline test build - displayName: Run Dagger Pipelines - -``` - -Feel free to edit the template generator at `.fluentci/src/azure/config.ts` to your needs. diff --git a/.fluentci/src/azure/config.ts b/.fluentci/src/azure/config.ts deleted file mode 100644 index 5423dd26..00000000 --- a/.fluentci/src/azure/config.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { AzurePipeline } from "fluent_azure_pipelines"; - -export function generateYaml(): AzurePipeline { - const azurePipeline = new AzurePipeline(); - - const installDeno = `\ - curl -fsSL https://deno.land/x/install/install.sh | sh - export DENO_INSTALL="$HOME/.deno" - export PATH="$DENO_INSTALL/bin:$PATH" -`; - - const setupDagger = `\ - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - sudo mv bin/dagger /usr/local/bin - dagger version -`; - - azurePipeline - .trigger(["main"]) - .pool({ - name: "Default", - vmImage: "ubuntu-latest", - }) - .step({ - script: installDeno, - displayName: "Install Deno", - }) - .step({ - script: "deno install -A -r https://cli.fluentci.io -n fluentci", - displayName: "Setup Fluent CI CLI", - }) - .step({ - script: setupDagger, - displayName: "Setup Dagger", - }) - .step({ - script: "fluentci run rust_pipeline test build", - displayName: "Run Dagger Pipelines", - }); - return azurePipeline; -} diff --git a/.fluentci/src/azure/config_test.ts b/.fluentci/src/azure/config_test.ts deleted file mode 100644 index 0311f554..00000000 --- a/.fluentci/src/azure/config_test.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { assertEquals } from "https://deno.land/std@0.191.0/testing/asserts.ts"; -import { generateYaml } from "./config.ts"; - -Deno.test(function generateAzurePipelinesTest() { - const azurepipelines = generateYaml(); - const actual = azurepipelines.toString(); - const expected = Deno.readTextFileSync("./fixtures/azure-pipelines.yml"); - assertEquals(actual, expected); -}); diff --git a/.fluentci/src/azure/init.ts b/.fluentci/src/azure/init.ts deleted file mode 100644 index 2e71b2e4..00000000 --- a/.fluentci/src/azure/init.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { generateYaml } from "./config.ts"; - -generateYaml().save("azure-pipeline.yml"); diff --git a/.fluentci/src/circleci/README.md b/.fluentci/src/circleci/README.md deleted file mode 100644 index 623ffcea..00000000 --- a/.fluentci/src/circleci/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# Circle CI - -[![fluentci pipeline](https://img.shields.io/badge/dynamic/json?label=pkg.fluentci.io&labelColor=%23000&color=%23460cf1&url=https%3A%2F%2Fapi.fluentci.io%2Fv1%2Fpipeline%2Frust_pipeline&query=%24.version)](https://pkg.fluentci.io/rust_pipeline) -[![deno module](https://shield.deno.dev/x/rust_pipeline)](https://deno.land/x/rust_pipeline) -![deno compatibility](https://shield.deno.dev/deno/^1.34) -[![](https://img.shields.io/codecov/c/gh/fluent-ci-templates/rust-pipeline)](https://codecov.io/gh/fluent-ci-templates/rust-pipeline) - - -The following command will generate a `.circleci/config.yml` file in your project: - -```bash -fluentci cci init -t rust_pipeline -``` - -Generated file: - -```yaml -# Do not edit this file directly. It is generated by https://deno.land/x/fluent_circleci - -version: 2.1 -jobs: - tests: - steps: - - checkout - - run: sudo apt-get update && sudo apt-get install -y curl unzip - - run: | - curl -fsSL https://deno.land/x/install/install.sh | sh - export DENO_INSTALL="$HOME/.deno" - export PATH="$DENO_INSTALL/bin:$PATH" - - run: deno install -A -r https://cli.fluentci.io -n fluentci - - run: | - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - sudo mv bin/dagger /usr/local/bin - dagger version - - run: - name: Upload Coverage - command: fluentci run rust_pipeline test build - machine: - image: ubuntu-2004:2023.07.1 -workflows: - dagger: - jobs: - - tests - -``` - -Feel free to edit the template generator at `.fluentci/src/circleci/config.ts` to your needs. diff --git a/.fluentci/src/circleci/config.ts b/.fluentci/src/circleci/config.ts deleted file mode 100644 index eda36b95..00000000 --- a/.fluentci/src/circleci/config.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { CircleCI, Job } from "fluent_circleci"; - -export function generateYaml(): CircleCI { - const circleci = new CircleCI(); - - const tests = new Job().machine({ image: "ubuntu-2004:2023.07.1" }).steps([ - "checkout", - { - run: "sudo apt-get update && sudo apt-get install -y curl unzip", - }, - { - run: `\ -curl -fsSL https://deno.land/x/install/install.sh | sh -export DENO_INSTALL="$HOME/.deno" -export PATH="$DENO_INSTALL/bin:$PATH"`, - }, - { - run: "deno install -A -r https://cli.fluentci.io -n fluentci", - }, - { - run: `\ -curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh -sudo mv bin/dagger /usr/local/bin -dagger version`, - }, - { - run: { - name: "Run Dagger Pipelines", - command: "fluentci run rust_pipeline test build", - }, - }, - ]); - - circleci.jobs({ tests }).workflow("dagger", ["tests"]); - - return circleci; -} diff --git a/.fluentci/src/circleci/config_test.ts b/.fluentci/src/circleci/config_test.ts deleted file mode 100644 index 283a9c31..00000000 --- a/.fluentci/src/circleci/config_test.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { assertEquals } from "https://deno.land/std@0.191.0/testing/asserts.ts"; -import { generateYaml } from "./config.ts"; - -Deno.test(function generateCircleCITest() { - const circleci = generateYaml(); - const actual = circleci.toString(); - const expected = Deno.readTextFileSync("./fixtures/config.yml"); - assertEquals(actual, expected); -}); diff --git a/.fluentci/src/circleci/init.ts b/.fluentci/src/circleci/init.ts deleted file mode 100644 index 1f712482..00000000 --- a/.fluentci/src/circleci/init.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { generateYaml } from "./config.ts"; - -generateYaml().save(".circleci/config.yml"); diff --git a/.fluentci/src/dagger/index.ts b/.fluentci/src/dagger/index.ts deleted file mode 100644 index 6aa8a773..00000000 --- a/.fluentci/src/dagger/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import pipeline from "./pipeline.ts"; -import { clippy, build, test } from "./jobs.ts"; - -export { pipeline, clippy, build, test }; diff --git a/.fluentci/src/dagger/jobs.ts b/.fluentci/src/dagger/jobs.ts deleted file mode 100644 index 22daa075..00000000 --- a/.fluentci/src/dagger/jobs.ts +++ /dev/null @@ -1,190 +0,0 @@ -import Client, { connect } from "../../deps.ts"; - -export enum Job { - clippy = "clippy", - test = "test", - build = "build", -} - -export const exclude = ["target", ".git", ".devbox", ".fluentci"]; - -export const clippy = async (src = ".") => { - await connect(async (client: Client) => { - const context = client.host().directory(src); - const ctr = client - .pipeline(Job.test) - .container() - .from("rust:1.73-bookworm") - .withExec(["apt-get", "update"]) - .withExec([ - "apt-get", - "install", - "-y", - "build-essential", - "libasound2-dev", - "protobuf-compiler", - "pkg-config", - ]) - .withExec(["rustup", "component", "add", "clippy"]) - .withExec(["cargo", "install", "clippy-sarif", "--version", "0.3.0"]) - .withExec(["cargo", "install", "sarif-fmt", "--version", "0.3.0"]) - .withDirectory("/app", context, { exclude }) - .withWorkdir("/app") - .withMountedCache("/app/target", client.cacheVolume("target")) - .withMountedCache("/root/cargo/registry", client.cacheVolume("registry")) - .withExec([ - "sh", - "-c", - "cargo clippy \ - --all-features \ - --message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt", - ]); - - await ctr - .file("/app/rust-clippy-results.sarif") - .export("./rust-clippy-results.sarif"); - await ctr.stdout(); - }); - return "Done"; -}; - -export const test = async (src = ".") => { - await connect(async (client: Client) => { - const context = client.host().directory(src); - const ctr = client - .pipeline(Job.test) - .container() - .from("rust:1.73-bookworm") - .withExec(["apt-get", "update"]) - .withExec([ - "apt-get", - "install", - "-y", - "build-essential", - "libasound2-dev", - "protobuf-compiler", - "wget", - "pkg-config", - "psmisc", - ]) - .withExec(["rustup", "component", "add", "llvm-tools"]) - .withExec([ - "wget", - "https://github.com/taiki-e/cargo-llvm-cov/releases/download/v0.5.36/cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz", - ]) - .withExec([ - "tar", - "xvf", - "cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz", - ]) - .withExec(["mv", "cargo-llvm-cov", "/usr/local/bin"]) - .withDirectory("/app", context, { exclude }) - .withWorkdir("/app") - .withMountedCache("/app/target", client.cacheVolume("target")) - .withMountedCache("/root/cargo/registry", client.cacheVolume("registry")) - .withExec(["cp", "-r", "fixtures/audio", "/tmp"]) - .withExec(["cp", "fixtures/asound.conf", "/etc"]) - .withWorkdir("/app/migration") - .withEnvVariable("DATABASE_URL", "sqlite:///tmp/music-player.sqlite3") - .withExec(["cargo", "run"]) - .withWorkdir("/app") - .withEnvVariable("MUSIC_PLAYER_APPLICATION_DIRECTORY", "/tmp") - .withEnvVariable("MUSIC_PLAYER_MUSIC_DIRECTORY", "/tmp/audio") - .withEnvVariable( - "MUSIC_PLAYER_DATABASE_URL", - "sqlite:///tmp/music-player.sqlite3" - ) - .withEnvVariable("MUSIC_PLAYER_PORT", "5040") - .withExec(["cargo", "install", "--path", "."]) - .withExec(["sh", "-c", "rm -rf target/*"]) - .withExec(["music-player", "scan"]) - .withExec([ - "sh", - "-c", - "music-player & \ - sleep 3 && \ - cargo llvm-cov --all-features --lib --workspace --lcov --output-path lcov.info && \ - killall -s TERM music-player", - ]); - - await ctr.file("/app/lcov.info").export("./lcov.info"); - await ctr.stdout(); - }); - return "Done"; -}; - -export const build = async (src = ".") => { - await connect(async (client: Client) => { - const context = client.host().directory(src); - const ctr = client - .pipeline(Job.build) - .container() - .from("ghcr.io/fluentci-io/pkgx:latest") - .withExec([ - "pkgx", - "install", - "rustc", - "cargo", - "node@18", - "bun", - "protoc", - ]) - .withExec(["apt-get", "update"]) - .withExec([ - "apt-get", - "install", - "-y", - "build-essential", - "libasound2-dev", - "pkg-config", - ]) - .withDirectory("/app", context, { exclude }) - .withWorkdir("/app/webui/musicplayer") - .withExec(["bun", "install"]) - .withExec(["bun", "run", "build"]) - .withWorkdir("/app") - .withMountedCache("/app/target", client.cacheVolume("target")) - .withMountedCache("/root/cargo/registry", client.cacheVolume("registry")) - .withMountedCache("/assets", client.cacheVolume("gh-release-assets")) - .withEnvVariable("TAG", Deno.env.get("TAG") || "latest") - .withEnvVariable( - "TARGET", - Deno.env.get("TARGET") || "x86_64-unknown-linux-gnu" - ) - .withExec(["bash", "-c", "cargo build --release --target $TARGET"]) - .withExec([ - "bash", - "-c", - "tar czvf /assets/music-player_${TAG}_${TARGET}.tar.gz target/$TARGET/release/music-player", - ]) - .withExec([ - "bash", - "-c", - "shasum -a 256 /assets/music-player_${TAG}_${TARGET}.tar.gz > /assets/music-player_${TAG}_${TARGET}.tar.gz.sha256", - ]); - - await ctr.stdout(); - }); - return "Done"; -}; - -export type JobExec = (src?: string) => - | Promise - | (( - src?: string, - options?: { - ignore: string[]; - } - ) => Promise); - -export const runnableJobs: Record = { - [Job.clippy]: clippy, - [Job.test]: test, - [Job.build]: build, -}; - -export const jobDescriptions: Record = { - [Job.clippy]: "Run Rust clippy", - [Job.test]: "Run tests", - [Job.build]: "Build the project", -}; diff --git a/.fluentci/src/dagger/list_jobs.ts b/.fluentci/src/dagger/list_jobs.ts deleted file mode 100644 index 028d5a4c..00000000 --- a/.fluentci/src/dagger/list_jobs.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { brightGreen, stringifyTree } from "../../deps.ts"; -import { runnableJobs, jobDescriptions, Job } from "./jobs.ts"; - -const tree = { - name: brightGreen("rust_pipeline"), - children: (Object.keys(runnableJobs) as Job[]).map((job) => ({ - name: jobDescriptions[job] - ? `${brightGreen(job)} - ${jobDescriptions[job]}` - : brightGreen(job), - children: [], - })), -}; - -console.log( - stringifyTree( - tree, - (t) => t.name, - (t) => t.children - ) -); diff --git a/.fluentci/src/dagger/pipeline.ts b/.fluentci/src/dagger/pipeline.ts deleted file mode 100644 index 2d0ef321..00000000 --- a/.fluentci/src/dagger/pipeline.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { uploadContext } from "../../deps.ts"; -import * as jobs from "./jobs.ts"; - -const { build, test, exclude } = jobs; - -export default async function pipeline(src = ".", args: string[] = []) { - if (Deno.env.has("FLUENTCI_SESSION_ID")) { - await uploadContext(src, exclude); - } - - if (args.length > 0) { - await runSpecificJobs(args); - return; - } - - await test(src); - await build(src); -} - -async function runSpecificJobs(args: string[]) { - for (const name of args) { - // deno-lint-ignore no-explicit-any - const job = (jobs as any)[name]; - if (!job) { - throw new Error(`Job ${name} not found`); - } - await job(); - } -} diff --git a/.fluentci/src/dagger/queries.ts b/.fluentci/src/dagger/queries.ts deleted file mode 100644 index ea0b1d02..00000000 --- a/.fluentci/src/dagger/queries.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { gql } from "../../deps.ts"; - -export const test = gql` - query test($src: String!) { - test(src: $src) - } -`; - -export const build = gql` - query build($src: String!) { - build(src: $src) - } -`; diff --git a/.fluentci/src/dagger/runner.ts b/.fluentci/src/dagger/runner.ts deleted file mode 100644 index ce5e3a51..00000000 --- a/.fluentci/src/dagger/runner.ts +++ /dev/null @@ -1,3 +0,0 @@ -import pipeline from "./pipeline.ts"; - -await pipeline(".", Deno.args); diff --git a/.fluentci/src/dagger/schema.ts b/.fluentci/src/dagger/schema.ts deleted file mode 100644 index 320b9483..00000000 --- a/.fluentci/src/dagger/schema.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { - queryType, - makeSchema, - dirname, - join, - resolve, - stringArg, - nonNull, -} from "../../deps.ts"; - -import { test, build } from "./jobs.ts"; - -const Query = queryType({ - definition(t) { - t.string("test", { - args: { - src: nonNull(stringArg()), - }, - resolve: async (_root, args, _ctx) => await test(args.src), - }); - t.string("build", { - args: { - src: nonNull(stringArg()), - }, - resolve: async (_root, args, _ctx) => await build(args.src), - }); - }, -}); - -export const schema = makeSchema({ - types: [Query], - outputs: { - schema: resolve(join(dirname(".."), dirname(".."), "schema.graphql")), - typegen: resolve(join(dirname(".."), dirname(".."), "gen", "nexus.ts")), - }, -}); diff --git a/.fluentci/src/github/README.md b/.fluentci/src/github/README.md deleted file mode 100644 index 250a9afc..00000000 --- a/.fluentci/src/github/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# Github Actions - -[![fluentci pipeline](https://img.shields.io/badge/dynamic/json?label=pkg.fluentci.io&labelColor=%23000&color=%23460cf1&url=https%3A%2F%2Fapi.fluentci.io%2Fv1%2Fpipeline%2Frust_pipeline&query=%24.version)](https://pkg.fluentci.io/rust_pipeline) -[![deno module](https://shield.deno.dev/x/rust_pipeline)](https://deno.land/x/rust_pipeline) -![deno compatibility](https://shield.deno.dev/deno/^1.34) -[![](https://img.shields.io/codecov/c/gh/fluent-ci-templates/rust-pipeline)](https://codecov.io/gh/fluent-ci-templates/rust-pipeline) - -The following command will generate a `.github/workflows/tests.yml` file in your project: - -```bash -fluentci gh init -t rust_pipeline -``` - -Or, if you already have a `.fluentci` folder (generated from `fluentci init -t rust`) in your project: - -```bash -fluentci gh init -``` - -Generated file: - -```yaml -# Do not edit this file directly. It is generated by https://deno.land/x/fluent_github_actions - -name: Test -on: - push: - branches: - - main -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: denoland/setup-deno@v1 - with: - deno-version: v1.37 - - name: Setup Fluent CI CLI - run: deno install -A -r https://cli.fluentci.io -n fluentci - - name: Setup Dagger - run: | - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - sudo mv bin/dagger /usr/local/bin - dagger version - - name: Run Tests and Build - run: fluentci run rust_pipeline test build - -``` - -Feel free to edit the template generator at `.fluentci/src/github/config.ts` to your needs. diff --git a/.fluentci/src/github/config.ts b/.fluentci/src/github/config.ts deleted file mode 100644 index 34bf81a6..00000000 --- a/.fluentci/src/github/config.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { JobSpec, Workflow } from "fluent_github_actions"; - -export function generateYaml(): Workflow { - const workflow = new Workflow("Test"); - - const push = { - branches: ["main"], - }; - - const setupDagger = `\ - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - sudo mv bin/dagger /usr/local/bin - dagger version`; - - const test: JobSpec = { - "runs-on": "ubuntu-latest", - steps: [ - { - uses: "actions/checkout@v2", - }, - { - uses: "denoland/setup-deno@v1", - with: { - "deno-version": "v1.37", - }, - }, - { - name: "Setup Fluent CI CLI", - run: "deno install -A -r https://cli.fluentci.io -n fluentci", - }, - { - name: "Setup Dagger", - run: setupDagger, - }, - { - name: "Run Tests and Build", - run: "fluentci run rust_pipeline test build", - }, - ], - }; - - workflow.on({ push }).jobs({ test }); - - return workflow; -} diff --git a/.fluentci/src/github/config_test.ts b/.fluentci/src/github/config_test.ts deleted file mode 100644 index 88bf54f2..00000000 --- a/.fluentci/src/github/config_test.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { assertEquals } from "https://deno.land/std@0.191.0/testing/asserts.ts"; -import { generateYaml } from "./config.ts"; - -Deno.test(function generateGithubActionsWorkflowTest() { - const workflow = generateYaml(); - const actual = workflow.toString(); - const expected = Deno.readTextFileSync("./fixtures/workflow.yml"); - assertEquals(actual, expected); -}); diff --git a/.fluentci/src/github/init.ts b/.fluentci/src/github/init.ts deleted file mode 100644 index 513e790a..00000000 --- a/.fluentci/src/github/init.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { generateYaml } from "./config.ts"; - -generateYaml().save(".github/workflows/tests.yml"); diff --git a/.fluentci/src/gitlab/README.md b/.fluentci/src/gitlab/README.md deleted file mode 100644 index d371ba82..00000000 --- a/.fluentci/src/gitlab/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# Gitlab CI - -[![fluentci pipeline](https://img.shields.io/badge/dynamic/json?label=pkg.fluentci.io&labelColor=%23000&color=%23460cf1&url=https%3A%2F%2Fapi.fluentci.io%2Fv1%2Fpipeline%2Frust_pipeline&query=%24.version)](https://pkg.fluentci.io/rust_pipeline) -[![deno module](https://shield.deno.dev/x/rust_pipeline)](https://deno.land/x/rust_pipeline) -![deno compatibility](https://shield.deno.dev/deno/^1.34) -[![](https://img.shields.io/codecov/c/gh/fluent-ci-templates/rust-pipeline)](https://codecov.io/gh/fluent-ci-templates/rust-pipeline) - -The following command will generate a `.gitlab-ci.yml` file in your project: - -```bash -fluentci gl init -t rust_pipeline -``` - -Generated file: - -```yaml - -# Do not edit this file directly. It is generated by https://deno.land/x/fluent_gitlab_ci - -.docker: - image: denoland/deno:alpine - services: - - docker:${DOCKER_VERSION}-dind - variables: - DOCKER_HOST: tcp://docker:2376 - DOCKER_TLS_VERIFY: "1" - DOCKER_TLS_CERTDIR: /certs - DOCKER_CERT_PATH: /certs/client - DOCKER_DRIVER: overlay2 - DOCKER_VERSION: 20.10.16 - -.dagger: - extends: .docker - before_script: - - apk add docker-cli curl unzip - - deno install -A -r https://cli.fluentci.io -n fluentci - - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - - mv bin/dagger /usr/local/bin - - dagger version - -tests: - extends: .dagger - script: - - fluentci run rust_pipeline test build - -``` - -Feel free to edit the template generator at `.fluentci/src/gitlab/config.ts` to your needs. diff --git a/.fluentci/src/gitlab/config.ts b/.fluentci/src/gitlab/config.ts deleted file mode 100644 index ff43ce99..00000000 --- a/.fluentci/src/gitlab/config.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { GitlabCI, Job } from "fluent_gitlab_ci"; - -export function generateYaml(): GitlabCI { - const docker = new Job() - .image("denoland/deno:alpine") - .services(["docker:${DOCKER_VERSION}-dind"]) - .variables({ - DOCKER_HOST: "tcp://docker:2376", - DOCKER_TLS_VERIFY: "1", - DOCKER_TLS_CERTDIR: "/certs", - DOCKER_CERT_PATH: "/certs/client", - DOCKER_DRIVER: "overlay2", - DOCKER_VERSION: "20.10.16", - }); - - const dagger = new Job().extends(".docker").beforeScript( - ` - apk add docker-cli curl unzip - deno install -A -r https://cli.fluentci.io -n fluentci - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh - mv bin/dagger /usr/local/bin - dagger version - ` - ); - - const tests = new Job() - .extends(".dagger") - .script("fluentci run rust_pipeline test build"); - - return new GitlabCI() - .addJob(".docker", docker) - .addJob(".dagger", dagger) - .addJob("tests", tests); -} diff --git a/.fluentci/src/gitlab/config_test.ts b/.fluentci/src/gitlab/config_test.ts deleted file mode 100644 index bf5c8563..00000000 --- a/.fluentci/src/gitlab/config_test.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { assertEquals } from "https://deno.land/std@0.191.0/testing/asserts.ts"; -import { generateYaml } from "./config.ts"; - -Deno.test(function generateGitlabCITest() { - const gitlabci = generateYaml(); - const actual = gitlabci.toString(); - const expected = Deno.readTextFileSync("./fixtures/.gitlab-ci.yml"); - assertEquals(actual, expected); -}); diff --git a/.fluentci/src/gitlab/init.ts b/.fluentci/src/gitlab/init.ts deleted file mode 100644 index 4da66cfc..00000000 --- a/.fluentci/src/gitlab/init.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { generateYaml } from "./config.ts"; - -generateYaml().write(); diff --git a/.fluentci/src/jobs.ts b/.fluentci/src/jobs.ts new file mode 100644 index 00000000..590b05fa --- /dev/null +++ b/.fluentci/src/jobs.ts @@ -0,0 +1,172 @@ +import { dag } from "../deps.ts"; + +export enum Job { + clippy = "clippy", + test = "test", + build = "build", +} + +export const exclude = ["target", ".git", ".devbox", ".fluentci"]; + +export const clippy = async (src = ".") => { + const context = dag.host().directory(src); + const ctr = dag + .pipeline(Job.test) + .container() + .from("rust:1.80-bookworm") + .withExec(["apt-get", "update"]) + .withExec([ + "apt-get", + "install", + "-y", + "build-essential", + "libasound2-dev", + "protobuf-compiler", + "pkg-config", + ]) + .withExec(["rustup", "component", "add", "clippy"]) + .withExec(["cargo", "install", "clippy-sarif", "--version", "0.3.0"]) + .withExec(["cargo", "install", "sarif-fmt", "--version", "0.3.0"]) + .withDirectory("/app", context, { exclude }) + .withWorkdir("/app") + .withMountedCache("/app/target", dag.cacheVolume("target")) + .withMountedCache("/root/cargo/registry", dag.cacheVolume("registry")) + .withExec([ + "sh", + "-c", + "cargo clippy \ + --all-features \ + --message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt", + ]); + + await ctr + .file("/app/rust-clippy-results.sarif") + .export("./rust-clippy-results.sarif"); + await ctr.stdout(); + return "Done"; +}; + +export const test = async (src = ".") => { + const context = dag.host().directory(src); + const ctr = dag + .pipeline(Job.test) + .container() + .from("rust:1.80-bookworm") + .withExec(["apt-get", "update"]) + .withExec([ + "apt-get", + "install", + "-y", + "build-essential", + "libasound2-dev", + "protobuf-compiler", + "wget", + "pkg-config", + "psmisc", + ]) + .withExec(["rustup", "component", "add", "llvm-tools"]) + .withExec([ + "wget", + "https://github.com/taiki-e/cargo-llvm-cov/releases/download/v0.5.36/cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz", + ]) + .withExec(["tar", "xvf", "cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz"]) + .withExec(["mv", "cargo-llvm-cov", "/usr/local/bin"]) + .withDirectory("/app", context, { exclude }) + .withWorkdir("/app") + .withMountedCache("/app/target", dag.cacheVolume("target")) + .withMountedCache("/root/cargo/registry", dag.cacheVolume("registry")) + .withExec(["cp", "-r", "fixtures/audio", "/tmp"]) + .withExec(["cp", "fixtures/asound.conf", "/etc"]) + .withWorkdir("/app/migration") + .withEnvVariable("DATABASE_URL", "sqlite:///tmp/music-player.sqlite3") + .withExec(["cargo", "run"]) + .withWorkdir("/app") + .withEnvVariable("MUSIC_PLAYER_APPLICATION_DIRECTORY", "/tmp") + .withEnvVariable("MUSIC_PLAYER_MUSIC_DIRECTORY", "/tmp/audio") + .withEnvVariable( + "MUSIC_PLAYER_DATABASE_URL", + "sqlite:///tmp/music-player.sqlite3" + ) + .withEnvVariable("MUSIC_PLAYER_PORT", "5040") + .withExec(["cargo", "install", "--path", "."]) + .withExec(["sh", "-c", "rm -rf target/*"]) + .withExec(["music-player", "scan"]) + .withExec([ + "sh", + "-c", + "music-player & \ + sleep 3 && \ + cargo llvm-cov --all-features --lib --workspace --lcov --output-path lcov.info && \ + killall -s TERM music-player", + ]); + + await ctr.file("/app/lcov.info").export("./lcov.info"); + await ctr.stdout(); + return "Done"; +}; + +export const build = async (src = ".") => { + const context = dag.host().directory(src); + const ctr = dag + .pipeline(Job.build) + .container() + .from("ghcr.io/fluentci-io/pkgx:latest") + .withExec(["pkgx", "install", "rustc", "cargo", "node@18", "bun", "protoc"]) + .withExec(["apt-get", "update"]) + .withExec([ + "apt-get", + "install", + "-y", + "build-essential", + "libasound2-dev", + "pkg-config", + ]) + .withDirectory("/app", context, { exclude }) + .withWorkdir("/app/webui/musicplayer") + .withExec(["bun", "install"]) + .withExec(["bun", "run", "build"]) + .withWorkdir("/app") + .withMountedCache("/app/target", dag.cacheVolume("target")) + .withMountedCache("/root/cargo/registry", dag.cacheVolume("registry")) + .withMountedCache("/assets", dag.cacheVolume("gh-release-assets")) + .withEnvVariable("TAG", Deno.env.get("TAG") || "latest") + .withEnvVariable( + "TARGET", + Deno.env.get("TARGET") || "x86_64-unknown-linux-gnu" + ) + .withExec(["bash", "-c", "cargo build --release --target $TARGET"]) + .withExec([ + "bash", + "-c", + "tar czvf /assets/music-player_${TAG}_${TARGET}.tar.gz target/$TARGET/release/music-player", + ]) + .withExec([ + "bash", + "-c", + "shasum -a 256 /assets/music-player_${TAG}_${TARGET}.tar.gz > /assets/music-player_${TAG}_${TARGET}.tar.gz.sha256", + ]); + + await ctr.stdout(); + return "Done"; +}; + +export type JobExec = (src?: string) => + | Promise + | (( + src?: string, + options?: { + ignore: string[]; + } + ) => Promise); + +export const runnableJobs: Record = { + [Job.clippy]: clippy, + [Job.test]: test, + [Job.build]: build, +}; + +export const jobDescriptions: Record = { + [Job.clippy]: "Run Rust clippy", + [Job.test]: "Run tests", + [Job.build]: "Build the project", +}; diff --git a/.fluentci/src/mod.ts b/.fluentci/src/mod.ts new file mode 100644 index 00000000..299e64fe --- /dev/null +++ b/.fluentci/src/mod.ts @@ -0,0 +1,3 @@ +import { clippy, build, test } from "./jobs.ts"; + +export { clippy, build, test }; diff --git a/.fluentci/example/.fluentci/src/dagger/pipeline.ts b/.fluentci/src/pipeline.ts similarity index 73% rename from .fluentci/example/.fluentci/src/dagger/pipeline.ts rename to .fluentci/src/pipeline.ts index 2d0ef321..55f5dddd 100644 --- a/.fluentci/example/.fluentci/src/dagger/pipeline.ts +++ b/.fluentci/src/pipeline.ts @@ -1,13 +1,8 @@ -import { uploadContext } from "../../deps.ts"; import * as jobs from "./jobs.ts"; -const { build, test, exclude } = jobs; +const { build, test } = jobs; export default async function pipeline(src = ".", args: string[] = []) { - if (Deno.env.has("FLUENTCI_SESSION_ID")) { - await uploadContext(src, exclude); - } - if (args.length > 0) { await runSpecificJobs(args); return; diff --git a/.fluentci/example/.fluentci/src/dagger/runner.ts b/.fluentci/src/runner.ts similarity index 100% rename from .fluentci/example/.fluentci/src/dagger/runner.ts rename to .fluentci/src/runner.ts diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml index 20245c42..21f42244 100644 --- a/.github/workflows/chromatic.yml +++ b/.github/workflows/chromatic.yml @@ -15,7 +15,7 @@ jobs: # Job steps steps: - name: Setup Fluent CI - uses: fluentci-io/setup-fluentci@v1 + uses: fluentci-io/setup-fluentci@v5 - uses: actions/checkout@v1 - name: Publish to Chromatic run: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9fa2f336..e3838e54 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Setup Fluent CI - uses: fluentci-io/setup-fluentci@v1 + uses: fluentci-io/setup-fluentci@v5 - name: Checkout code uses: actions/checkout@v2 - name: Run Dagger Pipelines diff --git a/.github/workflows/release-for-arm.yml b/.github/workflows/release-for-arm.yml index 017d0ecf..57188013 100644 --- a/.github/workflows/release-for-arm.yml +++ b/.github/workflows/release-for-arm.yml @@ -22,7 +22,7 @@ jobs: with: deno-version: v1.37 - name: Setup Fluent CI - uses: fluentci-io/setup-fluentci@v1 + uses: fluentci-io/setup-fluentci@v5 - uses: oven-sh/setup-bun@v1 with: bun-version: latest diff --git a/.github/workflows/release-for-mac.yml b/.github/workflows/release-for-mac.yml index 59d8dd9a..0ae0577f 100644 --- a/.github/workflows/release-for-mac.yml +++ b/.github/workflows/release-for-mac.yml @@ -18,7 +18,7 @@ jobs: with: deno-version: v1.37 - name: Setup Fluent CI - uses: fluentci-io/setup-fluentci@v1 + uses: fluentci-io/setup-fluentci@v5 - uses: oven-sh/setup-bun@v1 with: bun-version: latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d37ad889..79fbc13d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Setup Fluent CI - uses: fluentci-io/setup-fluentci@v4 + uses: fluentci-io/setup-fluentci@v5 - name: Set env run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - name: Build diff --git a/.github/workflows/rust-clippy.yml b/.github/workflows/rust-clippy.yml index e3f9f14e..4fcf5380 100644 --- a/.github/workflows/rust-clippy.yml +++ b/.github/workflows/rust-clippy.yml @@ -30,7 +30,7 @@ jobs: uses: actions/checkout@v2 - name: Setup Fluent CI - uses: fluentci-io/setup-fluentci@v1 + uses: fluentci-io/setup-fluentci@v5 - name: Run rust-clippy run: fluentci run . clippy diff --git a/Cargo.lock b/Cargo.lock index b7087272..8035fd89 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20,7 +20,7 @@ checksum = "f728064aca1c318585bf4bb04ffcfac9e75e508ab4e8b1bd9ba5dfe04e2cbed5" dependencies = [ "actix-rt", "actix_derive", - "bitflags", + "bitflags 1.3.2", "bytes", "crossbeam-channel", "futures-core", @@ -42,7 +42,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57a7559404a7f3573127aab53c08ce37a6c6a315c374a31070f3c91cd1b4a7fe" dependencies = [ - "bitflags", + "bitflags 1.3.2", "bytes", "futures-core", "futures-sink", @@ -79,7 +79,7 @@ dependencies = [ "actix-utils", "actix-web", "askama_escape", - "bitflags", + "bitflags 1.3.2", "bytes", "derive_more", "futures-core", @@ -93,18 +93,18 @@ dependencies = [ [[package]] name = "actix-http" -version = "3.3.0" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0070905b2c4a98d184c4e81025253cb192aa8a73827553f38e9410801ceb35bb" +checksum = "d48f96fc3003717aeb9856ca3d02a8c7de502667ad76eeacd830b48d2e91fac4" dependencies = [ "actix-codec", "actix-rt", "actix-service", "actix-utils", - "ahash 0.7.6", - "base64 0.21.0", - "bitflags", - "brotli", + "ahash 0.8.3", + "base64 0.22.1", + "bitflags 2.6.0", + "brotli 6.0.0", "bytes", "bytestring", "derive_more", @@ -142,13 +142,15 @@ dependencies = [ [[package]] name = "actix-router" -version = "0.5.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d66ff4d247d2b160861fa2866457e85706833527840e4133f8f49aa423a38799" +checksum = "13d324164c51f63867b57e73ba5936ea151b8a41a1d23d1031eeb9f70d0236f8" dependencies = [ "bytestring", + "cfg-if 1.0.0", "http", "regex", + "regex-lite", "serde", "tracing", ] @@ -176,7 +178,7 @@ dependencies = [ "futures-util", "mio", "num_cpus", - "socket2", + "socket2 0.4.7", "tokio", "tracing", ] @@ -204,9 +206,9 @@ dependencies = [ [[package]] name = "actix-web" -version = "4.3.0" +version = "4.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "464e0fddc668ede5f26ec1f9557a8d44eda948732f40c6b0ad79126930eb775f" +checksum = "9180d76e5cc7ccbc4d60a506f2c727730b154010262df5b910eb17dbe4b8cb38" dependencies = [ "actix-codec", "actix-http", @@ -217,7 +219,7 @@ dependencies = [ "actix-service", "actix-utils", "actix-web-codegen", - "ahash 0.7.6", + "ahash 0.8.3", "bytes", "bytestring", "cfg-if 1.0.0", @@ -226,7 +228,7 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "http", + "impl-more", "itoa 1.0.5", "language-tags", "log", @@ -234,12 +236,13 @@ dependencies = [ "once_cell", "pin-project-lite 0.2.9", "regex", + "regex-lite", "serde", "serde_json", "serde_urlencoded", "smallvec", - "socket2", - "time 0.3.19", + "socket2 0.5.7", + "time 0.3.36", "url", ] @@ -263,14 +266,14 @@ dependencies = [ [[package]] name = "actix-web-codegen" -version = "4.1.0" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fa9362663c8643d67b2d5eafba49e4cb2c8a053a29ed00a0bea121f17c76b13" +checksum = "f591380e2e68490b5dfaf1dd1aa0ebe78d84ba7067078512b4ea6e4492d622b8" dependencies = [ "actix-router", "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.75", ] [[package]] @@ -371,6 +374,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ "cfg-if 1.0.0", + "getrandom 0.2.8", "once_cell", "version_check", ] @@ -412,7 +416,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8512c9117059663fb5606788fbca3619e2a91dac0e3fe516242eab1fa6be5e44" dependencies = [ "alsa-sys", - "bitflags", + "bitflags 1.3.2", "libc", "nix 0.24.3", ] @@ -579,7 +583,7 @@ dependencies = [ "fnv", "futures-util", "http", - "indexmap", + "indexmap 1.9.2", "mime", "multer", "num-traits", @@ -661,7 +665,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a941b499fead4a3fb5392cabf42446566d18c86313f69f2deab69560394d65f" dependencies = [ "bytes", - "indexmap", + "indexmap 1.9.2", "serde", "serde_json", ] @@ -697,7 +701,7 @@ dependencies = [ "parking", "polling", "slab", - "socket2", + "socket2 0.4.7", "waker-fn", "windows-sys 0.42.0", ] @@ -886,7 +890,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c3d816ce6f0e2909a96830d6911c2aff044370b1ef92d7f267b43bae5addedd" dependencies = [ "atk-sys", - "bitflags", + "bitflags 1.3.2", "glib", "libc", ] @@ -949,7 +953,7 @@ checksum = "2fb79c228270dcf2426e74864cabc94babb5dbab01a4314e702d2f16540e1591" dependencies = [ "async-trait", "axum-core", - "bitflags", + "bitflags 1.3.2", "bytes", "futures-util", "http", @@ -1049,6 +1053,12 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + [[package]] name = "beef" version = "0.5.2" @@ -1083,7 +1093,7 @@ version = "0.61.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a022e58a142a46fea340d68012b9201c094e93ec3d033a944a24f8fd4a4f09a" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cexpr", "clang-sys", "lazy_static", @@ -1118,6 +1128,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" + [[package]] name = "bitpacking" version = "0.8.4" @@ -1233,7 +1249,18 @@ checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", - "brotli-decompressor", + "brotli-decompressor 2.3.4", +] + +[[package]] +name = "brotli" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor 4.0.1", ] [[package]] @@ -1246,6 +1273,16 @@ dependencies = [ "alloc-stdlib", ] +[[package]] +name = "brotli-decompressor" +version = "4.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + [[package]] name = "bstr" version = "1.3.0" @@ -1325,7 +1362,7 @@ version = "0.15.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c76ee391b03d35510d9fa917357c7f1855bd9a6659c95a1b392e33f49b3369bc" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cairo-sys-rs", "glib", "libc", @@ -1489,10 +1526,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" dependencies = [ "atty", - "bitflags", + "bitflags 1.3.2", "clap_derive", "clap_lex", - "indexmap", + "indexmap 1.9.2", "once_cell", "strsim", "termcolor", @@ -1533,7 +1570,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a" dependencies = [ - "bitflags", + "bitflags 1.3.2", "block", "cocoa-foundation", "core-foundation", @@ -1549,7 +1586,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ade49b65d560ca58c403a479bb396592b155c0185eada742ee323d1d68d6318" dependencies = [ - "bitflags", + "bitflags 1.3.2", "block", "core-foundation", "core-graphics-types", @@ -1677,7 +1714,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" dependencies = [ "percent-encoding", - "time 0.3.19", + "time 0.3.36", "version_check", ] @@ -1709,7 +1746,7 @@ version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-graphics-types", "foreign-types", @@ -1722,7 +1759,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "foreign-types", "libc", @@ -1734,7 +1771,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb17e2d1795b1996419648915df94bc7103c28f7b48062d7acf4652fc371b2ff" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation-sys 0.6.2", "coreaudio-sys", ] @@ -1871,7 +1908,7 @@ version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67" dependencies = [ - "bitflags", + "bitflags 1.3.2", "crossterm_winapi", "libc", "mio", @@ -2159,6 +2196,16 @@ dependencies = [ "tokio", ] +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", + "serde", +] + [[package]] name = "derive_more" version = "0.99.17" @@ -2353,6 +2400,12 @@ dependencies = [ "parking_lot 0.11.2", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "erased-serde" version = "0.3.24" @@ -2657,7 +2710,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.75", ] [[package]] @@ -2715,7 +2768,7 @@ version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6e05c1f572ab0e1f15be94217f0dc29088c248b14f792a5ff0af0d84bcda9e8" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cairo-rs", "gdk-pixbuf", "gdk-sys", @@ -2731,7 +2784,7 @@ version = "0.15.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad38dd9cc8b099cceecdf41375bb6d481b1b5a7cd5cd603e10a69a9383f8619a" dependencies = [ - "bitflags", + "bitflags 1.3.2", "gdk-pixbuf-sys", "gio", "glib", @@ -2848,7 +2901,7 @@ version = "0.15.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68fdbc90312d462781a395f7a16d96a2b379bb6ef8cd6310a2df272771c4283b" dependencies = [ - "bitflags", + "bitflags 1.3.2", "futures-channel", "futures-core", "futures-io", @@ -2878,7 +2931,7 @@ version = "0.15.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edb0306fbad0ab5428b0ca674a23893db909a98582969c9b537be4ced78c505d" dependencies = [ - "bitflags", + "bitflags 1.3.2", "futures-channel", "futures-core", "futures-executor", @@ -2999,7 +3052,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92e3004a2d5d6d8b5057d2b57b3712c9529b62e82c77f25c1fecde1fd5c23bd0" dependencies = [ "atk", - "bitflags", + "bitflags 1.3.2", "cairo-rs", "field-offset", "futures-channel", @@ -3049,9 +3102,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.15" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", @@ -3059,7 +3112,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 2.4.0", "slab", "tokio", "tokio-util", @@ -3084,6 +3137,12 @@ dependencies = [ "ahash 0.8.3", ] +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + [[package]] name = "hashlink" version = "0.8.1" @@ -3321,7 +3380,7 @@ dependencies = [ "httpdate", "itoa 1.0.5", "pin-project-lite 0.2.9", - "socket2", + "socket2 0.4.7", "tokio", "tower-service", "tracing", @@ -3462,6 +3521,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "impl-more" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "206ca75c9c03ba3d4ace2460e57b189f39f43de612c2f85836e65c929701bb2d" + [[package]] name = "indexmap" version = "1.9.2" @@ -3473,6 +3538,16 @@ dependencies = [ "serde", ] +[[package]] +name = "indexmap" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" +dependencies = [ + "equivalent", + "hashbrown 0.14.5", +] + [[package]] name = "infer" version = "0.2.3" @@ -3536,7 +3611,7 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf053e7843f2812ff03ef5afe34bb9c06ffee120385caad4f6b9967fcd37d41c" dependencies = [ - "bitflags", + "bitflags 1.3.2", "glib", "javascriptcore-rs-sys", ] @@ -3818,7 +3893,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" dependencies = [ "arrayvec 0.5.2", - "bitflags", + "bitflags 1.3.2", "cfg-if 1.0.0", "ryu", "static_assertions", @@ -3826,9 +3901,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.139" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libloading" @@ -3860,7 +3935,7 @@ dependencies = [ "multimap", "nix 0.23.2", "rand 0.8.5", - "socket2", + "socket2 0.4.7", "thiserror", "tokio", "winapi", @@ -3931,7 +4006,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb5eb03bdac69ee369631cbb0131787688639f8192a017d5aeb98c51223dd514" dependencies = [ "anyhow", - "socket2", + "socket2 0.4.7", ] [[package]] @@ -4131,7 +4206,7 @@ dependencies = [ "if-addrs", "log", "polling", - "socket2", + "socket2 0.4.7", ] [[package]] @@ -4298,6 +4373,7 @@ dependencies = [ "serde_json", "spinners", "tabled", + "time 0.3.36", "tokio", "tui", "tungstenite 0.17.3", @@ -4612,7 +4688,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2032c77e030ddee34a6787a64166008da93f6a352b629261d0fee232b8742dd4" dependencies = [ - "bitflags", + "bitflags 1.3.2", "jni-sys", "ndk-sys 0.3.0", "num_enum", @@ -4625,7 +4701,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" dependencies = [ - "bitflags", + "bitflags 1.3.2", "jni-sys", "ndk-sys 0.4.1+23.1.7779620", "num_enum", @@ -4680,7 +4756,7 @@ version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f3790c00a0150112de0f4cd161e3d7fc4b2d8a5542ffc35f099a2562aecb35c" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cc", "cfg-if 1.0.0", "libc", @@ -4693,7 +4769,7 @@ version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if 1.0.0", "libc", ] @@ -4778,6 +4854,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-derive" version = "0.3.3" @@ -5034,7 +5116,7 @@ version = "0.15.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22e4045548659aee5313bde6c582b0d83a627b7904dd20dc2d9ef0895d414e4f" dependencies = [ - "bitflags", + "bitflags 1.3.2", "glib", "libc", "once_cell", @@ -5193,7 +5275,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" dependencies = [ "fixedbitset", - "indexmap", + "indexmap 1.9.2", ] [[package]] @@ -5345,11 +5427,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9469799ca90293a376f68f6fcb8f11990d9cff55602cfba0ba83893c973a7f46" dependencies = [ "base64 0.21.0", - "indexmap", + "indexmap 1.9.2", "line-wrap", "quick-xml", "serde", - "time 0.3.19", + "time 0.3.36", ] [[package]] @@ -5358,7 +5440,7 @@ version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d708eaf860a19b19ce538740d2b4bdeeb8337fa53f7738455e706623ad5c638" dependencies = [ - "bitflags", + "bitflags 1.3.2", "crc32fast", "flate2", "miniz_oxide", @@ -5419,10 +5501,16 @@ dependencies = [ "postgres-protocol", "serde", "serde_json", - "time 0.3.19", + "time 0.3.36", "uuid 1.3.0", ] +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -5496,9 +5584,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -5510,7 +5598,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29f1b898011ce9595050a68e60f90bad083ff2987a695a42357134c8381fba70" dependencies = [ "bit-set", - "bitflags", + "bitflags 1.3.2", "byteorder", "lazy_static", "num-traits", @@ -5637,7 +5725,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d39b14605eaa1f6a340aec7f320b34064feb26c93aec35d6a9a2272a8ddfa49" dependencies = [ "anyhow", - "indexmap", + "indexmap 1.9.2", "log", "protobuf 3.2.0", "protobuf-support", @@ -5698,9 +5786,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.26" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -5848,7 +5936,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -5882,6 +5970,12 @@ dependencies = [ "regex-syntax", ] +[[package]] +name = "regex-lite" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a" + [[package]] name = "regex-syntax" version = "0.6.28" @@ -5966,7 +6060,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "88073939a61e5b7680558e6be56b419e208420c2adb92be54921fa6b72283f1a" dependencies = [ "base64 0.13.1", - "bitflags", + "bitflags 1.3.2", "serde", ] @@ -6264,7 +6358,7 @@ dependencies = [ "serde", "serde_json", "sqlx", - "time 0.3.19", + "time 0.3.36", "tracing", "url", "uuid 1.3.0", @@ -6328,7 +6422,7 @@ dependencies = [ "sea-query-derive", "sea-query-driver", "serde_json", - "time 0.3.19", + "time 0.3.36", "uuid 1.3.0", ] @@ -6413,7 +6507,7 @@ version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys 0.8.3", "libc", @@ -6436,7 +6530,7 @@ version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df320f1889ac4ba6bc0cdc9c9af7af4bd64bb927bccdf32d81140dc1f9be12fe" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cssparser", "derive_more", "fxhash", @@ -6500,22 +6594,22 @@ checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" [[package]] name = "serde" -version = "1.0.152" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" +checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.152" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" +checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.75", ] [[package]] @@ -6795,6 +6889,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "socket2" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "soketto" version = "0.7.1" @@ -6816,7 +6920,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2b4d76501d8ba387cf0fefbe055c3e0a59891d09f0f995ae4e4b16f6b60f3c0" dependencies = [ - "bitflags", + "bitflags 1.3.2", "gio", "glib", "libc", @@ -6830,7 +6934,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "009ef427103fcb17f802871647a7fa6c60cbb654b4c4e4c0ac60a31c5f6dc9cf" dependencies = [ - "bitflags", + "bitflags 1.3.2", "gio-sys", "glib-sys", "gobject-sys", @@ -6893,7 +6997,7 @@ checksum = "dcbc16ddba161afc99e14d1713a453747a2b07fc097d2009f4c300ec99286105" dependencies = [ "ahash 0.7.6", "atoi", - "bitflags", + "bitflags 1.3.2", "byteorder", "bytes", "chrono", @@ -6910,7 +7014,7 @@ dependencies = [ "futures-util", "hashlink", "hex", - "indexmap", + "indexmap 1.9.2", "itoa 1.0.5", "libc", "libsqlite3-sys", @@ -6931,7 +7035,7 @@ dependencies = [ "sqlx-rt", "stringprep", "thiserror", - "time 0.3.19", + "time 0.3.36", "tokio-stream", "url", "uuid 1.3.0", @@ -7248,7 +7352,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55a0846e7a2c9a8081ff799fc83a975170417ad2a143f644a77ec2e3e82a2b73" dependencies = [ - "bitflags", + "bitflags 1.3.2", "lazy_static", "log", "symphonia-core", @@ -7314,7 +7418,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b9567e2d8a5f866b2f94f5d366d811e0c6826babcff6d37de9e1a6690d38869" dependencies = [ "arrayvec 0.7.2", - "bitflags", + "bitflags 1.3.2", "bytemuck", "lazy_static", "log", @@ -7404,9 +7508,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.15" +version = "2.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" +checksum = "f6af063034fc1935ede7be0122941bafa9bacb949334d090b77ca98b5817c7d9" dependencies = [ "proc-macro2", "quote", @@ -7528,7 +7632,7 @@ dependencies = [ "tantivy-query-grammar", "tempfile", "thiserror", - "time 0.3.19", + "time 0.3.36", "uuid 1.3.0", "winapi", ] @@ -7577,7 +7681,7 @@ version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac8e6399427c8494f9849b58694754d7cc741293348a6836b6c8d2c5aa82d8e6" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cairo-rs", "cc", "cocoa", @@ -7696,7 +7800,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14388d484b6b1b5dc0f6a7d6cc6433b3b230bec85eaa576adcdf3f9fafa49251" dependencies = [ "base64 0.13.1", - "brotli", + "brotli 3.3.4", "ico", "json-patch", "plist", @@ -7709,7 +7813,7 @@ dependencies = [ "sha2 0.10.6", "tauri-utils", "thiserror", - "time 0.3.19", + "time 0.3.36", "uuid 1.3.0", "walkdir", ] @@ -7774,7 +7878,7 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5abbc109a6eb45127956ffcc26ef0e875d160150ac16cfa45d26a6b2871686f1" dependencies = [ - "brotli", + "brotli 3.3.4", "ctor", "glob", "heck 0.4.1", @@ -7941,21 +8045,24 @@ dependencies = [ [[package]] name = "time" -version = "0.3.19" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53250a3b3fed8ff8fd988587d8925d26a83ac3845d9e03b220b37f34c2b8d6c2" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ + "deranged", "itoa 1.0.5", + "num-conv", + "powerfmt", "serde", "time-core", - "time-macros 0.2.7", + "time-macros 0.2.18", ] [[package]] name = "time-core" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" @@ -7969,10 +8076,11 @@ dependencies = [ [[package]] name = "time-macros" -version = "0.2.7" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a460aeb8de6dcb0f381e1ee05f1cd56fcf5a5f6eb8187ff3d8f0b11078d38b7c" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ + "num-conv", "time-core", ] @@ -8019,7 +8127,7 @@ dependencies = [ "parking_lot 0.12.1", "pin-project-lite 0.2.9", "signal-hook-registry", - "socket2", + "socket2 0.4.7", "tokio-macros", "windows-sys 0.42.0", ] @@ -8125,7 +8233,7 @@ version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56c59d8dd7d0dcbc6428bf7aa2f0e823e26e43b3c9aca15bbc9475d23e5fa12b" dependencies = [ - "indexmap", + "indexmap 1.9.2", "nom8", "toml_datetime", ] @@ -8201,7 +8309,7 @@ checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ "futures-core", "futures-util", - "indexmap", + "indexmap 1.9.2", "pin-project", "pin-project-lite 0.2.9", "rand 0.8.5", @@ -8219,7 +8327,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" dependencies = [ - "bitflags", + "bitflags 1.3.2", "bytes", "futures-core", "futures-util", @@ -8338,7 +8446,7 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccdd26cbd674007e649a272da4475fb666d3aa0ad0531da7136db6fab0e5bad1" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cassowary", "crossterm", "serde", @@ -8741,7 +8849,7 @@ version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8f859735e4a452aeb28c6c56a852967a8a76c8eb1cc32dbf931ad28a13d6370" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cairo-rs", "gdk", "gdk-sys", @@ -8766,7 +8874,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d76ca6ecc47aeba01ec61e480139dda143796abcae6f83bcddf50d6b5b1dcf3" dependencies = [ "atk-sys", - "bitflags", + "bitflags 1.3.2", "cairo-sys-rs", "gdk-pixbuf-sys", "gdk-sys", @@ -8938,7 +9046,7 @@ version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdacb41e6a96a052c6cb63a144f24900236121c6f63f4f8219fef5977ecb0c25" dependencies = [ - "windows-targets", + "windows-targets 0.42.2", ] [[package]] @@ -8973,12 +9081,12 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "windows_aarch64_gnullvm", + "windows_aarch64_gnullvm 0.42.2", "windows_aarch64_msvc 0.42.2", "windows_i686_gnu 0.42.2", "windows_i686_msvc 0.42.2", "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm", + "windows_x86_64_gnullvm 0.42.2", "windows_x86_64_msvc 0.42.2", ] @@ -8988,7 +9096,16 @@ version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows-targets", + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -8997,15 +9114,31 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ - "windows_aarch64_gnullvm", + "windows_aarch64_gnullvm 0.42.2", "windows_aarch64_msvc 0.42.2", "windows_i686_gnu 0.42.2", "windows_i686_msvc 0.42.2", "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm", + "windows_x86_64_gnullvm 0.42.2", "windows_x86_64_msvc 0.42.2", ] +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + [[package]] name = "windows-tokens" version = "0.39.0" @@ -9018,6 +9151,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + [[package]] name = "windows_aarch64_msvc" version = "0.39.0" @@ -9030,6 +9169,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + [[package]] name = "windows_i686_gnu" version = "0.39.0" @@ -9042,6 +9187,18 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + [[package]] name = "windows_i686_msvc" version = "0.39.0" @@ -9054,6 +9211,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + [[package]] name = "windows_x86_64_gnu" version = "0.39.0" @@ -9066,12 +9229,24 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + [[package]] name = "windows_x86_64_msvc" version = "0.39.0" @@ -9084,6 +9259,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + [[package]] name = "winres" version = "0.1.12" @@ -9211,30 +9392,28 @@ dependencies = [ [[package]] name = "zstd" -version = "0.12.3+zstd.1.5.2" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76eea132fb024e0e13fd9c2f5d5d595d8a967aa72382ac2f9d39fcc95afd0806" +checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "6.0.4+zstd.1.5.4" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7afb4b54b8910cf5447638cb54bf4e8a65cbedd783af98b98c62ffe91f185543" +checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" dependencies = [ - "libc", "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.7+zstd.1.5.4" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94509c3ba2fe55294d752b79842c530ccfab760192521df74a081a78d2b3c7f5" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", - "libc", "pkg-config", ] diff --git a/Cargo.toml b/Cargo.toml index eb48da2c..f700b4d8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,36 +1,36 @@ [package] -name = "music-player" -version = "0.2.0-alpha.13" -edition = "2021" -repository = "https://github.com/tsirysndr/music-player" -license = "MIT" -readme = "README.md" authors = ["Tsiry Sandratraina "] categories = ["command-line-utilities"] -keywords = ["tokio", "music", "daemon", "streaming", "player"] description = "An extensible music player daemon written in Rust" +edition = "2021" +keywords = ["tokio", "music", "daemon", "streaming", "player"] +license = "MIT" +name = "music-player" +readme = "README.md" +repository = "https://github.com/tsirysndr/music-player" +version = "0.2.0-alpha.13" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [workspace] members = [ - "addons", - "audio", - "client", - "discovery", - "entity", - "graphql", - "migration", - "playback", - "scanner", - "server", - "settings", - "storage", - "tracklist", - "types", - "webui", - "webui/musicplayer/src-tauri" + "addons", + "audio", + "client", + "discovery", + "entity", + "graphql", + "migration", + "playback", + "scanner", + "server", + "settings", + "storage", + "tracklist", + "types", + "webui", + "webui/musicplayer/src-tauri", ] [[bin]] @@ -98,7 +98,6 @@ path = "audio" version = "0.1.6" [dependencies.sea-orm-migration] -version = "^0.9.0" features = [ # Enable at least one `ASYNC_RUNTIME` and `DATABASE_DRIVER` feature if you want to run migration via CLI. # View the list of supported features at https://www.sea-ql.org/SeaORM/docs/install-and-config/database-and-async-runtime. @@ -108,22 +107,23 @@ features = [ "runtime-tokio-rustls", "sqlx-sqlite", ] +version = "^0.9.0" [dependencies] +anyhow = "1.0.67" clap = "3.2.20" -tokio = { version = "1.21.0", features = ["full"] } -md5 = "0.7.0" -sea-orm = { version = "0.9.2", features = ["runtime-tokio-rustls", "sqlx-sqlite"] } +crossterm = {version = "0.25.0", features = ["serde"]} +dirs = "4.0.0" futures = "0.3.24" +futures-channel = "0.3.24" lofty = "0.9.0" +md5 = "0.7.0" owo-colors = "3.5.0" -tabled = "0.8.0" -crossterm = { version = "0.25.0", features = ["serde"] } -tui = { version = "0.19.0", features = ["crossterm", "serde"] } -tungstenite = "0.17.3" -futures-channel = "0.3.24" +sea-orm = {version = "0.9.2", features = ["runtime-tokio-rustls", "sqlx-sqlite"]} serde_json = "1.0.85" -dirs = "4.0.0" spinners = "4.1.0" -anyhow = "1.0.67" - +tabled = "0.8.0" +time = "0.3.36" +tokio = {version = "1.21.0", features = ["full"]} +tui = {version = "0.19.0", features = ["crossterm", "serde"]} +tungstenite = "0.17.3" diff --git a/webui/Cargo.toml b/webui/Cargo.toml index 9f2443f5..3d7ba5b6 100644 --- a/webui/Cargo.toml +++ b/webui/Cargo.toml @@ -1,12 +1,12 @@ [package] -name = "music-player-webui" -version = "0.1.15" -edition = "2021" -repository = "https://github.com/tsirysndr/music-player" -license = "MIT" authors = ["Tsiry Sandratraina "] -keywords = ["tokio", "music", "cli", "daemon", "streaming"] description = "The web ui of music player" +edition = "2021" +keywords = ["tokio", "music", "cli", "daemon", "streaming"] +license = "MIT" +name = "music-player-webui" +repository = "https://github.com/tsirysndr/music-player" +version = "0.1.15" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies.music-player-graphql] @@ -53,23 +53,23 @@ version = "0.1.5" futures-util = "0.3.25" serde_json = "1.0.89" -surf = { version = "2.3.2", features = ["h1-client-rustls"], default-features = false} -sea-orm = { version = "0.9.3", features = ["runtime-tokio-rustls", "sqlx-sqlite"] } +sea-orm = {version = "0.9.3", features = ["runtime-tokio-rustls", "sqlx-sqlite"]} +surf = {version = "2.3.2", features = ["h1-client-rustls"], default-features = false} [dependencies] -actix-web = "4.2.1" +actix-cors = "0.6.3" +actix-files = "0.6.2" +actix-web = "4.9.0" async-graphql = "4.0.15" async-graphql-actix-web = "4.0.15" -mime_guess = "2.0.4" -owo-colors = "3.5.0" -rust-embed = { version = "6.4.1", features = ["debug-embed", "actix"] } -actix-files = "0.6.2" dirs = "4.0.0" -serde_derive = "1.0.145" -serde = { version = "1.0.145", features = ["serde_derive"] } -tokio = { version = "1.21.2", features = ["full"] } -actix-cors = "0.6.3" -sea-orm = { version = "0.9.3", features = ["runtime-tokio-rustls", "sqlx-sqlite"] } +futures = "0.3.28" futures-util = "0.3.25" mime = "0.3.16" -futures = "0.3.28" +mime_guess = "2.0.4" +owo-colors = "3.5.0" +rust-embed = {version = "6.4.1", features = ["debug-embed", "actix"]} +sea-orm = {version = "0.9.3", features = ["runtime-tokio-rustls", "sqlx-sqlite"]} +serde = {version = "1.0.145", features = ["serde_derive"]} +serde_derive = "1.0.145" +tokio = {version = "1.21.2", features = ["full"]} diff --git a/webui/musicplayer/src-tauri/Cargo.toml b/webui/musicplayer/src-tauri/Cargo.toml index 2202439c..808834d6 100644 --- a/webui/musicplayer/src-tauri/Cargo.toml +++ b/webui/musicplayer/src-tauri/Cargo.toml @@ -1,18 +1,18 @@ [package] -name = "app" -version = "0.1.0" -description = "A Tauri App" authors = ["Jacob Stern "] -license = "" -repository = "" default-run = "app" +description = "A Tauri App" edition = "2021" +license = "" +name = "app" +repository = "" rust-version = "1.59" +version = "0.1.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [build-dependencies] -tauri-build = { version = "1.2.1", features = [] } +tauri-build = {version = "1.2.1", features = []} [dependencies.music-player-addons] path = "../../../addons" @@ -43,20 +43,20 @@ path = "../../../types" version = "0.1.5" [dependencies] -actix-web = "4.2.1" +actix-web = "4.9.0" async-graphql = "4.0.15" async-graphql-actix-web = "4.0.15" futures = "0.3.24" +serde = {version = "1.0", features = ["derive"]} serde_json = "1.0" -serde = { version = "1.0", features = ["derive"] } -tauri = { version = "1.2.1", features = ["path-all", "protocol-asset"] } -tokio = { version = "1.21.2", features = ["full"] } +tauri = {version = "1.2.1", features = ["path-all", "protocol-asset"]} +tokio = {version = "1.21.2", features = ["full"]} uuid = "1.1.2" [features] # by default Tauri runs in production mode # when `tauri dev` runs it is executed with `cargo run --no-default-features` if `devPath` is an URL -default = [ "custom-protocol" ] +default = ["custom-protocol"] # this feature is used for production builds where `devPath` points to the filesystem # DO NOT remove this -custom-protocol = [ "tauri/custom-protocol" ] +custom-protocol = ["tauri/custom-protocol"]