diff --git a/.fluentci/.devcontainer/devcontainer.json b/.fluentci/.devcontainer/devcontainer.json deleted file mode 100644 index 39a38ae..0000000 --- a/.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/.devcontainer/devcontainer.json b/.fluentci/.fluentci/.devcontainer/devcontainer.json deleted file mode 100644 index 39a38ae..0000000 --- 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 39a38ae..0000000 --- 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 a7f9464..0000000 --- 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/.vscode/settings.json b/.fluentci/.fluentci/.fluentci/.vscode/settings.json deleted file mode 100644 index cbac569..0000000 --- a/.fluentci/.fluentci/.fluentci/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "deno.enable": true -} diff --git a/.fluentci/.fluentci/.fluentci/CODE_OF_CONDUCT.md b/.fluentci/.fluentci/.fluentci/CODE_OF_CONDUCT.md deleted file mode 100644 index e9c20f9..0000000 --- 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 e50de72..0000000 --- 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 d9ab36a..0000000 --- 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 23f6a94..0000000 --- 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 67e5a80..0000000 --- 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 4240219..0000000 --- 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 a364136..0000000 --- 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 299e4c6..0000000 --- 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 af7453c..0000000 --- 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 b13ea7d..0000000 --- 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 12c59ff..0000000 --- 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 6152fb6..0000000 --- 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 392c001..0000000 --- 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 658ed39..0000000 --- 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 12bb3cb..0000000 --- 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 bad7372..0000000 --- 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 e23879e..0000000 --- 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 481e992..0000000 --- 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 6097dd5..0000000 --- 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 392c001..0000000 --- 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 46be50c..0000000 --- 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 366de64..0000000 --- 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 ca24710..0000000 --- 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 b467bdb..0000000 --- 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 a2442bb..0000000 --- a/.fluentci/.fluentci/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -coverage/ -coverage.lcov \ No newline at end of file diff --git a/.fluentci/.fluentci/.vscode/settings.json b/.fluentci/.fluentci/.vscode/settings.json deleted file mode 100644 index cbac569..0000000 --- a/.fluentci/.fluentci/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "deno.enable": true -} diff --git a/.fluentci/.fluentci/CODE_OF_CONDUCT.md b/.fluentci/.fluentci/CODE_OF_CONDUCT.md deleted file mode 100644 index e9c20f9..0000000 --- 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 e50de72..0000000 --- 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 d9ab36a..0000000 --- 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 b8517c1..0000000 --- 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 67e5a80..0000000 --- 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 4240219..0000000 --- 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 a874952..0000000 --- a/.fluentci/.fluentci/deno.lock +++ /dev/null @@ -1,97 +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/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/x/codecov_pipeline@v0.1.0/src/dagger/jobs.ts": "e980479e0bcd759773286145f3345ce7e1662c7d6734bfc4bbf8e6bfc93b974e", - "https://deno.land/x/codecov_pipeline@v0.1.1/src/dagger/jobs.ts": "ea5ea4fb985f879fdd1c0aed77ac635ba090606c1ecce9d5f5c107493d287984", - "https://deno.land/x/fluent_github_actions@v0.1.2/mod.ts": "dc62b622791da77bc27f68e33cba618983a0770a9a12dcc9e0f9a61161bb90e5", - "https://deno.land/x/fluent_github_actions@v0.1.2/src/event.ts": "c31430af085682cb4ad522c655a8a0800a3ab8b8aec7c979d60c909051d853b0", - "https://deno.land/x/fluent_github_actions@v0.1.2/src/job_spec.ts": "ee7af83e75285b4776ff4f9e14764187737178b4abc6c277da1c32491c41dfca", - "https://deno.land/x/fluent_github_actions@v0.1.2/src/step_spec.ts": "3207071b5dee8487f36fe4ea1881e8fd3b77c472c965c20a14093a3c919af9af", - "https://deno.land/x/fluent_github_actions@v0.1.2/src/workflow.ts": "488556e230fdeeb3a5b0d0bf548c570606aa356b0a7f667ea1d031d3263eb566", - "https://deno.land/x/fluent_github_actions@v0.1.2/src/workflow_spec.ts": "3ca9e565dc1dedd0531e0b852d50b9a3853a1ad35f2010760e0326590b80fa43", - "https://deno.land/x/fluent_gitlab_ci@v0.3.2/mod.ts": "3becefe569f5c9814dffa1b534794a42b948481753a5903fa1b48d5337206ced", - "https://deno.land/x/fluent_gitlab_ci@v0.3.2/src/environment.ts": "f12ee4fb50e5100fccec29dc1d35aa430bfe8373e84286a8ab9f7b8e178f14e3", - "https://deno.land/x/fluent_gitlab_ci@v0.3.2/src/gitlabci.ts": "85d2335622c2def4a9554a9d8b8de4e62156f5d76d59a553e157bab4e6b6591f", - "https://deno.land/x/fluent_gitlab_ci@v0.3.2/src/gitlabci_spec.ts": "b60f40ecf26d243db2391aee70fdf71b133de3faaf789052020f58f98cf1b500", - "https://deno.land/x/fluent_gitlab_ci@v0.3.2/src/index.ts": "b5e374a24e3bca1d6fead0861f2c1b1e09e087a17e59297263f681ee71c972fe", - "https://deno.land/x/fluent_gitlab_ci@v0.3.2/src/job.ts": "a1ddf8d37ca33239de9d2c61f98835e585f6671748b37af8d647ebba5e1a9974", - "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", - "https://esm.sh/v130/yaml@2.3.1/denonext/yaml.mjs": "71f677b4bfc69271af9d98db5194e354f9a1863955e208e26d32a9ef78bd89f5", - "https://esm.sh/yaml@v2.3.1": "9f8730b9d2fdb4d9320be0c0e62d57936097826342588991d561ae35555aca55" - }, - "npm": { - "specifiers": { - "@types/node": "@types/node@18.16.19" - }, - "packages": { - "@types/node@18.16.19": { - "integrity": "sha512-IXl7o+R9iti9eBW4Wg2hx1xQDig183jj7YLn8F7udNceyfkbn1ZxmzZXuak20gR40D7pIkIY1kYGx5VIGbaHKA==", - "dependencies": {} - } - } - } -} diff --git a/.fluentci/.fluentci/example/.fluentci/.devcontainer/devcontainer.json b/.fluentci/.fluentci/example/.fluentci/.devcontainer/devcontainer.json deleted file mode 100644 index 39a38ae..0000000 --- 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 39a38ae..0000000 --- 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 a7f9464..0000000 --- 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/.vscode/settings.json b/.fluentci/.fluentci/example/.fluentci/.fluentci/.vscode/settings.json deleted file mode 100644 index cbac569..0000000 --- a/.fluentci/.fluentci/example/.fluentci/.fluentci/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "deno.enable": true -} 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 e9c20f9..0000000 --- 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 e50de72..0000000 --- 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 d9ab36a..0000000 --- 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 23f6a94..0000000 --- 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 67e5a80..0000000 --- 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 4240219..0000000 --- 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 23cc878..0000000 --- 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 299e4c6..0000000 --- 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 af7453c..0000000 --- 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 b13ea7d..0000000 --- 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 801ea9a..0000000 --- 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 6152fb6..0000000 --- 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 392c001..0000000 --- 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 42b4554..0000000 --- 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 12bb3cb..0000000 --- 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 bad7372..0000000 --- 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 e23879e..0000000 --- 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 392c001..0000000 --- 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 46be50c..0000000 --- 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 366de64..0000000 --- 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 ca24710..0000000 --- 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 a7f9464..0000000 --- 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/.vscode/settings.json b/.fluentci/.fluentci/example/.fluentci/.vscode/settings.json deleted file mode 100644 index cbac569..0000000 --- a/.fluentci/.fluentci/example/.fluentci/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "deno.enable": true -} 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 e9c20f9..0000000 --- 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 e50de72..0000000 --- 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 d9ab36a..0000000 --- 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 1afc7c6..0000000 --- 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 67e5a80..0000000 --- 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 4240219..0000000 --- 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 f8af4c3..0000000 --- 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 299e4c6..0000000 --- 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 af7453c..0000000 --- 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 b13ea7d..0000000 --- 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 801ea9a..0000000 --- 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 6152fb6..0000000 --- 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 392c001..0000000 --- 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 611a5e0..0000000 --- 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 12bb3cb..0000000 --- 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 bad7372..0000000 --- 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 e23879e..0000000 --- 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 392c001..0000000 --- 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 46be50c..0000000 --- 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 366de64..0000000 --- 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 ca24710..0000000 --- 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/.vscode/settings.json b/.fluentci/.fluentci/example/.vscode/settings.json deleted file mode 100644 index cbac569..0000000 --- a/.fluentci/.fluentci/example/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "deno.enable": true -} diff --git a/.fluentci/.fluentci/example/README.md b/.fluentci/.fluentci/example/README.md deleted file mode 100644 index a6193e1..0000000 --- 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 dd48266..0000000 --- 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 299e4c6..0000000 --- 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 af7453c..0000000 --- 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 b13ea7d..0000000 --- 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 12c59ff..0000000 --- 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 6152fb6..0000000 --- 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 392c001..0000000 --- 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 862b599..0000000 --- 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 12bb3cb..0000000 --- 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 bad7372..0000000 --- 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 e23879e..0000000 --- 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 9508e83..0000000 --- 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 6097dd5..0000000 --- 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 392c001..0000000 --- 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 46be50c..0000000 --- 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 366de64..0000000 --- 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 ca24710..0000000 --- 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 f8521e3..0000000 --- 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.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/.gitignore b/.fluentci/.gitignore deleted file mode 100644 index a2442bb..0000000 --- a/.fluentci/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -coverage/ -coverage.lcov \ No newline at end of file diff --git a/.fluentci/.vscode/settings.json b/.fluentci/.vscode/settings.json deleted file mode 100644 index cbac569..0000000 --- a/.fluentci/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "deno.enable": true -} diff --git a/.fluentci/CODE_OF_CONDUCT.md b/.fluentci/CODE_OF_CONDUCT.md deleted file mode 100644 index e9c20f9..0000000 --- a/.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/CONTRIBUTING.md b/.fluentci/CONTRIBUTING.md deleted file mode 100644 index e50de72..0000000 --- a/.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/LICENSE b/.fluentci/LICENSE deleted file mode 100644 index d9ab36a..0000000 --- a/.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/README.md b/.fluentci/README.md deleted file mode 100644 index b8517c1..0000000 --- a/.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/ci.ts b/.fluentci/ci.ts deleted file mode 100644 index 67e5a80..0000000 --- a/.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/deno.json b/.fluentci/deno.json deleted file mode 100644 index d976349..0000000 --- a/.fluentci/deno.json +++ /dev/null @@ -1,17 +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" - }, - "fmt": { - "exclude": ["example/", ".fluentci/"] - }, - "lint": { - "exclude": ["example/", ".fluentci/"] - }, - "test": { - "exclude": ["example/", ".fluentci/"] - } -} diff --git a/.fluentci/deno.lock b/.fluentci/deno.lock deleted file mode 100644 index 9c42db4..0000000 --- a/.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.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": "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/.devcontainer/devcontainer.json b/.fluentci/example/.fluentci/.devcontainer/devcontainer.json deleted file mode 100644 index 39a38ae..0000000 --- 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 39a38ae..0000000 --- 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/.github/workflows/ci.yml b/.fluentci/example/.fluentci/.fluentci/.github/workflows/ci.yml deleted file mode 100644 index a7f9464..0000000 --- a/.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/.vscode/settings.json b/.fluentci/example/.fluentci/.fluentci/.vscode/settings.json deleted file mode 100644 index cbac569..0000000 --- a/.fluentci/example/.fluentci/.fluentci/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "deno.enable": true -} 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 e9c20f9..0000000 --- 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 e50de72..0000000 --- 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 d9ab36a..0000000 --- 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 23f6a94..0000000 --- a/.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/ci.ts b/.fluentci/example/.fluentci/.fluentci/ci.ts deleted file mode 100644 index 67e5a80..0000000 --- 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 4240219..0000000 --- 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 23cc878..0000000 --- a/.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/fixtures/.gitlab-ci.yml b/.fluentci/example/.fluentci/.fluentci/fixtures/.gitlab-ci.yml deleted file mode 100644 index 299e4c6..0000000 --- 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 af7453c..0000000 --- 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 b13ea7d..0000000 --- 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 801ea9a..0000000 --- a/.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/mod.ts b/.fluentci/example/.fluentci/.fluentci/mod.ts deleted file mode 100644 index 6152fb6..0000000 --- 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 392c001..0000000 --- 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 42b4554..0000000 --- a/.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/src/dagger/list_jobs.ts b/.fluentci/example/.fluentci/.fluentci/src/dagger/list_jobs.ts deleted file mode 100644 index 12bb3cb..0000000 --- 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 bad7372..0000000 --- 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 e23879e..0000000 --- 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/gitlab/index.ts b/.fluentci/example/.fluentci/.fluentci/src/gitlab/index.ts deleted file mode 100644 index 392c001..0000000 --- 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 46be50c..0000000 --- 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 366de64..0000000 --- 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 ca24710..0000000 --- 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 a7f9464..0000000 --- a/.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/.vscode/settings.json b/.fluentci/example/.fluentci/.vscode/settings.json deleted file mode 100644 index cbac569..0000000 --- a/.fluentci/example/.fluentci/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "deno.enable": true -} diff --git a/.fluentci/example/.fluentci/CODE_OF_CONDUCT.md b/.fluentci/example/.fluentci/CODE_OF_CONDUCT.md deleted file mode 100644 index e9c20f9..0000000 --- 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/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/CONTRIBUTING.md b/.fluentci/example/.fluentci/CONTRIBUTING.md deleted file mode 100644 index e50de72..0000000 --- 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 d9ab36a..0000000 --- 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 1afc7c6..0000000 --- a/.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/ci.ts b/.fluentci/example/.fluentci/ci.ts deleted file mode 100644 index 67e5a80..0000000 --- a/.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/deno.json b/.fluentci/example/.fluentci/deno.json deleted file mode 100644 index 4240219..0000000 --- a/.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/deno.lock b/.fluentci/example/.fluentci/deno.lock deleted file mode 100644 index f8af4c3..0000000 --- a/.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/fixtures/.gitlab-ci.yml b/.fluentci/example/.fluentci/fixtures/.gitlab-ci.yml deleted file mode 100644 index 299e4c6..0000000 --- a/.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/flake.lock b/.fluentci/example/.fluentci/flake.lock deleted file mode 100644 index af7453c..0000000 --- a/.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/flake.nix b/.fluentci/example/.fluentci/flake.nix deleted file mode 100644 index b13ea7d..0000000 --- a/.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/import_map.json b/.fluentci/example/.fluentci/import_map.json deleted file mode 100644 index 801ea9a..0000000 --- a/.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/mod.ts b/.fluentci/example/.fluentci/mod.ts deleted file mode 100644 index 6152fb6..0000000 --- a/.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/src/dagger/index.ts b/.fluentci/example/.fluentci/src/dagger/index.ts deleted file mode 100644 index 392c001..0000000 --- a/.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/src/dagger/jobs.ts b/.fluentci/example/.fluentci/src/dagger/jobs.ts deleted file mode 100644 index 611a5e0..0000000 --- a/.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/src/dagger/list_jobs.ts b/.fluentci/example/.fluentci/src/dagger/list_jobs.ts deleted file mode 100644 index 12bb3cb..0000000 --- a/.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/src/dagger/pipeline.ts b/.fluentci/example/.fluentci/src/dagger/pipeline.ts deleted file mode 100644 index bad7372..0000000 --- a/.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/src/dagger/runner.ts b/.fluentci/example/.fluentci/src/dagger/runner.ts deleted file mode 100644 index e23879e..0000000 --- a/.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/src/gitlab/index.ts b/.fluentci/example/.fluentci/src/gitlab/index.ts deleted file mode 100644 index 392c001..0000000 --- a/.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/src/gitlab/jobs.ts b/.fluentci/example/.fluentci/src/gitlab/jobs.ts deleted file mode 100644 index 46be50c..0000000 --- a/.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/src/gitlab/pipeline.ts b/.fluentci/example/.fluentci/src/gitlab/pipeline.ts deleted file mode 100644 index 366de64..0000000 --- a/.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/src/gitlab/pipeline_test.ts b/.fluentci/example/.fluentci/src/gitlab/pipeline_test.ts deleted file mode 100644 index ca24710..0000000 --- a/.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/.vscode/settings.json b/.fluentci/example/.vscode/settings.json deleted file mode 100644 index cbac569..0000000 --- a/.fluentci/example/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "deno.enable": true -} diff --git a/.fluentci/example/README.md b/.fluentci/example/README.md deleted file mode 100644 index a6193e1..0000000 --- a/.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/main.tsx b/.fluentci/example/main.tsx deleted file mode 100644 index dd48266..0000000 --- a/.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/fixtures/.gitlab-ci.yml b/.fluentci/fixtures/.gitlab-ci.yml deleted file mode 100644 index 46714d3..0000000 --- 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: - - dagger run fluentci deno_pipeline fmt lint test - diff --git a/.fluentci/fixtures/azure-pipelines.yml b/.fluentci/fixtures/azure-pipelines.yml deleted file mode 100644 index 5898473..0000000 --- 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: dagger run fluentci deno_pipeline fmt lint test - displayName: Run Dagger Pipelines diff --git a/.fluentci/fixtures/buildspec.yml b/.fluentci/fixtures/buildspec.yml deleted file mode 100644 index f9bab4c..0000000 --- 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: - - dagger run fluentci deno_pipeline fmt lint test - 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 164d0ba..0000000 --- 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: dagger run fluentci deno_pipeline fmt lint test - 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 6ad2355..0000000 --- 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: Tests -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 deno_pipeline fmt lint test diff --git a/.fluentci/flake.lock b/.fluentci/flake.lock deleted file mode 100644 index af7453c..0000000 --- a/.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/flake.nix b/.fluentci/flake.nix deleted file mode 100644 index b13ea7d..0000000 --- a/.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/import_map.json b/.fluentci/import_map.json deleted file mode 100644 index e44a1b8..0000000 --- a/.fluentci/import_map.json +++ /dev/null @@ -1,31 +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.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", - "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/mod.ts b/.fluentci/mod.ts deleted file mode 100644 index 2c3acca..0000000 --- a/.fluentci/mod.ts +++ /dev/null @@ -1,3 +0,0 @@ -import * as Dagger from "./src/dagger/index.ts"; - -export { Dagger }; diff --git a/.fluentci/src/aws/README.md b/.fluentci/src/aws/README.md deleted file mode 100644 index 048735a..0000000 --- a/.fluentci/src/aws/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# AWS CodePipeline - -[![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) - -The following command will generate a `buildspec.yml` file in your project: - -```bash -fluentci ac init -t deno_pipeline fmt lint test -``` - -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: - - dagger run fluentci deno_pipeline fmt lint test - 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 e8d46b7..0000000 --- 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: ["dagger run fluentci deno_pipeline fmt lint test"], - }) - .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 97bed68..0000000 --- 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 83944b7..0000000 --- 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 7e7017b..0000000 --- a/.fluentci/src/azure/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# Azure Pipelines - -[![deno module](https://shield.deno.dev/x/codecov_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) - -The following command will generate a `azure-pipelines.yml` file in your project: - -```bash -fluentci ap init -t deno_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: dagger run fluentci deno_pipeline fmt lint test - 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 537c6a6..0000000 --- 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: "dagger run fluentci deno_pipeline fmt lint test", - 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 0311f55..0000000 --- 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 2e71b2e..0000000 --- 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 bbc35fb..0000000 --- a/.fluentci/src/circleci/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# Circle CI - -[![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) - - -The following command will generate a `.circleci/config.yml` file in your project: - -```bash -fluentci cci init -t deno_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: dagger run fluentci deno_pipeline fmt lint test - 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 27790aa..0000000 --- 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: "dagger run fluentci deno_pipeline fmt lint test", - }, - }, - ]); - - 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 283a9c3..0000000 --- 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 1f71248..0000000 --- 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 392c001..0000000 --- a/.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/src/dagger/jobs.ts b/.fluentci/src/dagger/jobs.ts deleted file mode 100644 index 658ed39..0000000 --- a/.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/src/dagger/list_jobs.ts b/.fluentci/src/dagger/list_jobs.ts deleted file mode 100644 index 12bb3cb..0000000 --- a/.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/src/dagger/pipeline.ts b/.fluentci/src/dagger/pipeline.ts deleted file mode 100644 index bad7372..0000000 --- a/.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/src/dagger/runner.ts b/.fluentci/src/dagger/runner.ts deleted file mode 100644 index e23879e..0000000 --- a/.fluentci/src/dagger/runner.ts +++ /dev/null @@ -1,3 +0,0 @@ -import pipeline from "./pipeline.ts"; - -pipeline(".", Deno.args); diff --git a/.fluentci/src/github/README.md b/.fluentci/src/github/README.md deleted file mode 100644 index 7bcc96f..0000000 --- a/.fluentci/src/github/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# Github Actions - -[![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) - -The following command will generate a `.github/workflows/ci.yml` file in your project: - -```bash -fluentci gh init -t deno_pipeline -``` - -Or, if you already have a `.fluentci` folder (generated from `fluentci init -t deno`) in your project: - -```bash -fluentci gh init -``` - -Generated file: - -```yaml -# Do not edit this file directly. It is generated by Fluent Github Actions - -name: Tests -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 deno_pipeline fmt lint test -``` - -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 b90de6d..0000000 --- a/.fluentci/src/github/config.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { JobSpec, Workflow } from "fluent_github_actions"; - -export function generateYaml(): Workflow { - const workflow = new Workflow("Tests"); - - 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: "fluentci run deno_pipeline", - }, - { - name: "Upload to Codecov", - run: "fluentci run codecov_pipeline", - env: { - CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}", - }, - }, - ], - }; - - workflow.on({ push }).jobs({ tests }); - return workflow; -} diff --git a/.fluentci/src/github/config_test.ts b/.fluentci/src/github/config_test.ts deleted file mode 100644 index 88bf54f..0000000 --- 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 4788c58..0000000 --- a/.fluentci/src/github/init.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { generateYaml } from "./config.ts"; - -generateYaml().save(".github/workflows/ci.yml"); diff --git a/.fluentci/src/gitlab/README.md b/.fluentci/src/gitlab/README.md deleted file mode 100644 index c619026..0000000 --- a/.fluentci/src/gitlab/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# Gitlab CI - -[![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) - -The following command will generate a `.gitlab-ci.yml` file in your project: - -```bash -fluentci gl init -t deno_pipeline -``` - -Generated file: - -```yaml - -# Do not edit this file directly. It is generated by 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: - - dagger run fluentci deno_pipeline fmt lint test - -``` - -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 38300e1..0000000 --- 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("dagger run fluentci deno_pipeline fmt lint test"); - - 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 bf5c856..0000000 --- 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 4da66cf..0000000 --- a/.fluentci/src/gitlab/init.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { generateYaml } from "./config.ts"; - -generateYaml().write(); diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4a68337..cd9a5f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,10 +11,18 @@ jobs: steps: - uses: actions/checkout@v2 - name: Setup Fluent CI - uses: fluentci-io/setup-fluentci@v3 + uses: fluentci-io/setup-fluentci@v5 + with: + wasm: true + plugin: deno + args: | + fmt + lint + test + coverage - name: Run Dagger Pipelines run: fluentci run deno_pipeline - name: Upload to Codecov - run: fluentci run codecov_pipeline + run: fluentci run --wasm codecov upload env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/dagger.json b/dagger.json index 5783a46..e5c5834 100644 --- a/dagger.json +++ b/dagger.json @@ -1,4 +1,8 @@ { "name": "terragrunt", - "sdk": "github.com/fluentci-io/daggerverse/deno-sdk@main" + "sdk": "github.com/fluentci-io/daggerverse/deno-sdk@main", + "version": "v0.7.0", + "description": "", + "author": "Tsiry Sandratraina", + "license": "MIT" } \ No newline at end of file diff --git a/deno.lock b/deno.lock index 1a439e8..df9fec4 100644 --- a/deno.lock +++ b/deno.lock @@ -1,234 +1,201 @@ { "version": "3", - "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://cdn.skypack.dev/-/lodash@v4.17.21-K6GEbP02mWFnLA45zAmi/dist=es2019,mode=imports/optimized/lodash.js": "10c4df47937ffc78548d136dd535a021df5f57182a653260d715c0690dd22978", - "https://cdn.skypack.dev/lodash": "8280de0b3efd87f06ea0eb330d15b8de32c059556023b8c6524e9eb9e4844dc0", - "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.205.0/assert/assert.ts": "9a97dad6d98c238938e7540736b826440ad8c1c1e54430ca4c4e623e585607ee", - "https://deno.land/std@0.205.0/assert/assertion_error.ts": "4d0bde9b374dfbcbe8ac23f54f567b77024fb67dbb1906a852d67fe050d42f56", - "https://deno.land/std@0.205.0/flags/mod.ts": "0948466fc437f017f00c0b972a422b3dc3317a790bcf326429d23182977eaf9f", - "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.9.3": "9bd1df6375031727868e2a7aa24e7517d1eba916b49529a412f9a214a0d58992", - "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.9.3/denonext/dagger.mjs": "998e8e63729621141c0a9b74128db8f81ab7446d1a5d4ff41a6a6b0944db4ddf", - "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.3/deps.ts": "469c1f084eda8d2ee78135b0bf4f9490b80b36d8d0bdb88594167133a918da8e", - "https://nix.fluentci.io/v0.5.3/src/dagger/steps.ts": "b766f4fa9624a032e7af884a5ca47bc666a529c4a472d38b74b55ca0d63cf81d", - "https://sdk.fluentci.io/v0.3.0/deps.ts": "3a145e76b4345a9a7888f09b1b48cb54523ebfa43247a1abebc40a9e82d555f4", - "https://sdk.fluentci.io/v0.3.0/mod.ts": "261ba81a4728f5def4e327a5cd80664ea8449515a2f4eea5f3f416acae39a1fa", - "https://sdk.fluentci.io/v0.3.0/src/client.ts": "7f1df4b1fee62dd6f946fa9d15d47a37b938ffb4ac91faf3d39b44b83d4f5921", - "https://sdk.fluentci.io/v0.3.0/src/connect.ts": "4aff111c403cf78672384a10214a9885e08319dde579ec458f98a7bb04874101", - "https://sdk.fluentci.io/v0.3.0/src/context.ts": "2939ff58d0a79d7377d5553e725c9a2110a0013035a5a57abe9a9a5da975c4ce", - "https://sdk.fluentci.io/v0.3.0/src/utils.ts": "5dcd6d83553930502069d067ff42bc44698e22c23426fdb78630c4b39769d308" - } + "packages": { + "specifiers": { + "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/fluent-az-pipelines@0.3": "jsr:@tsirysndr/fluent-az-pipelines@0.3.0", + "jsr:@tsirysndr/fluent-circleci@0.3": "jsr:@tsirysndr/fluent-circleci@0.3.0", + "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/fluent-az-pipelines@0.3.0": { + "integrity": "a2a23089a186b0f04e45daa7a9df98527c54b845842c1ebe3b7f2cf03e5aec0d", + "dependencies": [ + "jsr:@std/testing@0.217.0", + "npm:yaml@2.3.1", + "npm:zod@3.22.1" + ] + }, + "@tsirysndr/fluent-circleci@0.3.0": { + "integrity": "f2ab207d83b7b2a728a6708a51c3ad93cf2d89b08a13460793e3b6c7af8f5dd9", + "dependencies": [ + "jsr:@std/testing@0.217.0", + "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.0" + } + }, + "@types/lodash@4.17.0": { + "integrity": "sha512-t7dhREVv6dbNj0q17X12j7yDG4bD/DHYX7o5/DbDxobP0HnGPgpRz2Ej77aL7TZT3DSw13fqUTj8J4mMnqa7WA==", + "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": {} + }, + "lodash.flatten@4.4.0": { + "integrity": "sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==", + "dependencies": {} + }, + "lodash@4.17.21": { + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dependencies": {} + }, + "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": { + "whatwg-url": "whatwg-url@5.0.0" + } + }, + "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": {} } diff --git a/deps.ts b/deps.ts index 9ef174b..747351a 100644 --- a/deps.ts +++ b/deps.ts @@ -1,27 +1,23 @@ -export { assertEquals } from "https://deno.land/std@0.191.0/testing/asserts.ts"; -import { Client } from "./sdk/client.gen.ts"; -export default Client; +export { assertEquals } from "jsr:@std/testing@0.218.2/asserts"; export type { DirectoryID, SecretID } from "./sdk/client.gen.ts"; -export { Directory, Secret, File, Container, dag } from "./sdk/client.gen.ts"; -export { connect, uploadContext } from "https://sdk.fluentci.io/v0.3.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.3/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 { File, Directory, Secret, 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 "https://deno.land/std@0.203.0/path/mod.ts"; -export { parse } from "https://deno.land/std@0.205.0/flags/mod.ts"; -export { snakeCase, camelCase } from "https://cdn.skypack.dev/lodash"; +export { dirname, join, resolve } from "jsr:@std/path@0.218.2"; +export { parse } from "jsr:@std/flags@0.218.2"; -export { - ClientError, - GraphQLClient, -} from "https://esm.sh/v128/graphql-request@6.1.0"; +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 { ClientError, GraphQLClient } from "npm:graphql-request@6.1.0"; export { DaggerSDKError, UnknownDaggerError, @@ -35,15 +31,10 @@ export { EngineSessionConnectionTimeoutError, NotAwaitedRequestError, ERROR_CODES, -} from "https://esm.sh/@dagger.io/dagger@0.9.3"; - -export type { - CallbackFct, - ConnectOpts, -} from "https://sdk.fluentci.io/v0.3.0/mod.ts"; +} 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/plugin/.gitignore b/plugin/.gitignore new file mode 100644 index 0000000..9f97022 --- /dev/null +++ b/plugin/.gitignore @@ -0,0 +1 @@ +target/ \ No newline at end of file diff --git a/plugin/Cargo.lock b/plugin/Cargo.lock new file mode 100644 index 0000000..7cd6151 --- /dev/null +++ b/plugin/Cargo.lock @@ -0,0 +1,395 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "anyhow" +version = "1.0.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" + +[[package]] +name = "autocfg" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51" + +[[package]] +name = "bytemuck" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" + +[[package]] +name = "either" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "extism-convert" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a63bfc6d371d3b51d6094fd96c4c32a084ceefece3b4f4b328f30067d29da064" +dependencies = [ + "anyhow", + "base64 0.22.0", + "bytemuck", + "extism-convert-macros", + "prost", + "rmp-serde", + "serde", + "serde_json", +] + +[[package]] +name = "extism-convert-macros" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "519ccf960500c87244bef99caf8e58222ac95bf1abb06a32f5217b4788857aa6" +dependencies = [ + "manyhow", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "extism-manifest" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05c7d16695dc6b72418e23b58c943411a08264332af403ae9870997b4d495c3d" +dependencies = [ + "base64 0.22.0", + "serde", + "serde_json", +] + +[[package]] +name = "extism-pdk" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f9a87d636d30b75e697642dd4f6cff2054db5a7a5d69d6601041a76265bb681" +dependencies = [ + "anyhow", + "base64 0.21.7", + "extism-convert", + "extism-manifest", + "extism-pdk-derive", + "serde", + "serde_json", +] + +[[package]] +name = "extism-pdk-derive" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d83995c2023720a0fd5ef2a349c89c1670efb37a979228b0218705f5ddb50d4b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "fluentci-pdk" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d8004273f0e173b96811a72cb742fc9010fc54fec89c59c2c4e7e159fc2bde7" +dependencies = [ + "extism-pdk", + "fluentci-types", + "serde", +] + +[[package]] +name = "fluentci-types" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7592ba0dd1c48f06166fa485af48c8df942e7266c62216fe01360b33e33fe047" +dependencies = [ + "serde", +] + +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "manyhow" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02bc2a348104913df6d14170bedef54faf224a0970ec7b1f8750748ab94fcd52" +dependencies = [ + "manyhow-macros", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "manyhow-macros" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "532aa12d5846b38a524b3acd99fb74dc8a5f193b33e65dac142ef92bd60f9416" +dependencies = [ + "proc-macro-utils", + "proc-macro2", + "quote", +] + +[[package]] +name = "memchr" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" + +[[package]] +name = "num-traits" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[package]] +name = "proc-macro-crate" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro-utils" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f59e109e2f795a5070e69578c4dc101068139f74616778025ae1011d4cd41a8" +dependencies = [ + "proc-macro2", + "quote", + "smallvec", +] + +[[package]] +name = "proc-macro2" +version = "1.0.80" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a56dea16b0a29e94408b9aa5e2940a4eedbd128a1ba20e8f7ae60fd3d465af0e" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "prost" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0f5d036824e4761737860779c906171497f6d55681139d8312388f8fe398922" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-derive" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19de2de2a00075bf566bee3bd4db014b11587e84184d3f7a791bc17f1a8e9e48" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rmp" +version = "0.8.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bddb316f4b9cae1a3e89c02f1926d557d1142d0d2e684b038c11c1b77705229a" +dependencies = [ + "byteorder", + "num-traits", + "paste", +] + +[[package]] +name = "rmp-serde" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "938a142ab806f18b88a97b0dea523d39e0fd730a064b035726adcfc58a8a5188" +dependencies = [ + "byteorder", + "rmp", + "serde", +] + +[[package]] +name = "ryu" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" + +[[package]] +name = "serde" +version = "1.0.197" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.197" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.116" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "syn" +version = "2.0.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a6531ffc7b071655e4ce2e04bd464c4830bb585a61cabb96cf808f05172615a" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "terragrunt" +version = "0.7.0" +dependencies = [ + "extism-pdk", + "fluentci-pdk", +] + +[[package]] +name = "toml_datetime" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" + +[[package]] +name = "toml_edit" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow", +] + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] diff --git a/plugin/Cargo.toml b/plugin/Cargo.toml new file mode 100644 index 0000000..7728b63 --- /dev/null +++ b/plugin/Cargo.toml @@ -0,0 +1,13 @@ +[package] +edition = "2021" +name = "terragrunt" +version = "0.7.0" + +[lib] +crate-type = ["cdylib"] + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +extism-pdk = "1.1.0" +fluentci-pdk = "0.1.9" diff --git a/plugin/src/lib.rs b/plugin/src/lib.rs new file mode 100644 index 0000000..4a57000 --- /dev/null +++ b/plugin/src/lib.rs @@ -0,0 +1,88 @@ +use std::vec; + +use extism_pdk::*; +use fluentci_pdk::dag; + +#[plugin_fn] +pub fn setup() -> FnResult { + let tf_version = dag().get_env("TF_VERSION").unwrap_or_default(); + let mut tf_version = tf_version.as_str(); + if tf_version.is_empty() { + tf_version = "latest"; + } + + let stdout = dag() + .pkgx()? + .with_exec(vec![ + "pkgx", + "install", + &format!("terraform@{}", tf_version), + "terragrunt", + ])? + .stdout()?; + Ok(stdout) +} + +#[plugin_fn] +pub fn validate(args: String) -> FnResult { + let args = args.split_whitespace().collect::>(); + let stdout = dag() + .pkgx()? + .with_exec(vec![ + "terragrunt", + "run-all", + "validate", + "--terragrunt-non-interactive", + &args.join(" "), + ])? + .stdout()?; + Ok(stdout) +} + +#[plugin_fn] +pub fn init(args: String) -> FnResult { + let args = args.split_whitespace().collect::>(); + let stdout = dag() + .pkgx()? + .with_exec(vec![ + "terragrunt", + "run-all", + "init", + "--terragrunt-non-interactive", + &args.join(" "), + ])? + .stdout()?; + Ok(stdout) +} + +#[plugin_fn] +pub fn plan(args: String) -> FnResult { + let args = args.split_whitespace().collect::>(); + let stdout = dag() + .pkgx()? + .with_exec(vec![ + "terragrunt", + "run-all", + "plan", + "--terragrunt-non-interactive", + &args.join(" "), + ])? + .stdout()?; + Ok(stdout) +} + +#[plugin_fn] +pub fn apply(args: String) -> FnResult { + let args = args.split_whitespace().collect::>(); + let stdout = dag() + .pkgx()? + .with_exec(vec![ + "terragrunt", + "run-all", + "apply", + "--terragrunt-non-interactive", + &args.join(" "), + ])? + .stdout()?; + Ok(stdout) +} diff --git a/sdk/builder.ts b/sdk/builder.ts index f06951a..10182d6 100644 --- a/sdk/builder.ts +++ b/sdk/builder.ts @@ -1,5 +1,6 @@ import { createGQLClient } from "./client.ts"; import { Context } from "./context.ts"; +import { env } from "../deps.ts"; /** * @hidden @@ -10,9 +11,9 @@ export function initDefaultContext(): Context { let ctx = new Context(); // Prefer DAGGER_SESSION_PORT if set - const daggerSessionPort = Deno.env.get("DAGGER_SESSION_PORT"); + const daggerSessionPort = env.get("DAGGER_SESSION_PORT"); if (daggerSessionPort) { - const sessionToken = Deno.env.get("DAGGER_SESSION_TOKEN"); + const sessionToken = env.get("DAGGER_SESSION_TOKEN"); if (!sessionToken) { throw new Error( "DAGGER_SESSION_TOKEN must be set when using DAGGER_SESSION_PORT" diff --git a/sdk/client.gen.ts b/sdk/client.gen.ts index b128be8..5e20f82 100644 --- a/sdk/client.gen.ts +++ b/sdk/client.gen.ts @@ -127,7 +127,7 @@ export type ContainerBuildOpts = { * * 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) + * 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[]; }; @@ -197,6 +197,13 @@ export type ContainerPublishOpts = { 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/"]). @@ -276,6 +283,11 @@ export type ContainerWithExposedPortOpts = { * Optional port description */ description?: string; + + /** + * Skip the health check when run as a service. + */ + experimentalSkipHealthcheck?: boolean; }; export type ContainerWithFileOpts = { @@ -294,6 +306,22 @@ export type ContainerWithFileOpts = { 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. @@ -408,15 +436,32 @@ export type ContainerWithoutExposedPortOpts = { */ 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 source code. + * 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. */ - sourceSubpath?: string; + sourceRootPath?: string; }; export type DirectoryDockerBuildOpts = { @@ -486,6 +531,13 @@ export type DirectoryWithFileOpts = { 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). @@ -566,6 +618,11 @@ export type FunctionID = string & { __FunctionID: never }; */ 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. @@ -657,6 +714,11 @@ 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. */ @@ -677,27 +739,33 @@ export type LabelID = string & { __LabelID: never }; */ export type ListTypeDefID = string & { __ListTypeDefID: never }; -export type ModuleWithSourceOpts = { - /** - * An optional subpath of the directory which contains the module's source code. - * - * 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. - */ - subpath?: string; -}; +/** + * The `LocalModuleSourceID` scalar type represents an identifier for an object of type LocalModuleSource. + */ +export type LocalModuleSourceID = string & { __LocalModuleSourceID: never }; /** - * The `ModuleConfigID` scalar type represents an identifier for an object of type ModuleConfig. + * The `ModuleDependencyID` scalar type represents an identifier for an object of type ModuleDependency. */ -export type ModuleConfigID = string & { __ModuleConfigID: never }; +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. */ @@ -799,8 +867,18 @@ export type ClientHttpOpts = { experimentalServiceHost?: Service; }; -export type ClientModuleConfigOpts = { - subpath?: string; +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 = { @@ -815,6 +893,10 @@ export type ClientPipelineOpts = { labels?: PipelineLabel[]; }; +export type ClientSecretOpts = { + accessor?: string; +}; + /** * The `SecretID` scalar type represents an identifier for an object of type Secret. */ @@ -832,6 +914,27 @@ export type ServiceEndpointOpts = { 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. */ @@ -842,6 +945,11 @@ export type ServiceID = string & { __ServiceID: never }; */ 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 @@ -871,6 +979,11 @@ export enum TypeDefKind { */ BooleanKind = "BOOLEAN_KIND", + /** + * A graphql input type, used only when representing the core API via TypeDefs. + */ + InputKind = "INPUT_KIND", + /** * An integer value. */ @@ -975,7 +1088,6 @@ export class Container extends BaseClient { private readonly _label?: string = undefined; private readonly _platform?: Platform = undefined; private readonly _publish?: string = undefined; - private readonly _shellEndpoint?: string = undefined; private readonly _stderr?: string = undefined; private readonly _stdout?: string = undefined; private readonly _sync?: ContainerID = undefined; @@ -994,7 +1106,6 @@ export class Container extends BaseClient { _label?: string, _platform?: Platform, _publish?: string, - _shellEndpoint?: string, _stderr?: string, _stdout?: string, _sync?: ContainerID, @@ -1010,7 +1121,6 @@ export class Container extends BaseClient { this._label = _label; this._platform = _platform; this._publish = _publish; - this._shellEndpoint = _shellEndpoint; this._stderr = _stderr; this._stdout = _stdout; this._sync = _sync; @@ -1096,7 +1206,7 @@ export class Container extends BaseClient { * * 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) + * 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({ @@ -1607,29 +1717,6 @@ export class Container extends BaseClient { }); }; - /** - * Return a websocket endpoint that, if connected to, will start the container with a TTY streamed over the websocket. - * - * Primarily intended for internal use with the dagger CLI. - */ - shellEndpoint = async (): Promise => { - if (this._shellEndpoint) { - return this._shellEndpoint; - } - - const response: Awaited = await computeQuery( - [ - ...this._queryTree, - { - operation: "shellEndpoint", - }, - ], - await this._ctx.connection() - ); - - return response; - }; - /** * The error stream of the last executed command. * @@ -1695,6 +1782,23 @@ export class Container extends BaseClient { 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. */ @@ -1733,6 +1837,23 @@ export class Container extends BaseClient { }); }; + /** + * 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"). @@ -1844,6 +1965,7 @@ export class Container extends BaseClient { * @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, @@ -1893,6 +2015,34 @@ export class Container extends BaseClient { }); }; + /** + * 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. */ @@ -2457,6 +2607,121 @@ export class Container extends BaseClient { }; } +/** + * 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. */ @@ -2504,7 +2769,7 @@ export class Directory extends BaseClient { /** * Load the directory as a Dagger module - * @param opts.sourceSubpath An optional subpath of the directory which contains the module's source code. + * @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. * @@ -2742,20 +3007,22 @@ export class Directory extends BaseClient { }; /** - * 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). + * 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). */ - withNewDirectory = ( + withFiles = ( path: string, - opts?: DirectoryWithNewDirectoryOpts + sources: File[], + opts?: DirectoryWithFilesOpts ): Directory => { return new Directory({ queryTree: [ ...this._queryTree, { - operation: "withNewDirectory", - args: { path, ...opts }, + operation: "withFiles", + args: { path, sources, ...opts }, }, ], ctx: this._ctx, @@ -2763,9 +3030,30 @@ export class Directory extends BaseClient { }; /** - * 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!"). + * 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 = ( @@ -2892,6 +3180,10 @@ export class EnvVariable extends BaseClient { return response; }; + + /** + * The environment variable name. + */ name = async (): Promise => { if (this._name) { return this._name; @@ -2909,6 +3201,10 @@ export class EnvVariable extends BaseClient { return response; }; + + /** + * The environment variable value. + */ value = async (): Promise => { if (this._value) { return this._value; @@ -2974,6 +3270,10 @@ export class FieldTypeDef extends BaseClient { return response; }; + + /** + * A doc string for the field, if any. + */ description = async (): Promise => { if (this._description) { return this._description; @@ -2991,6 +3291,10 @@ export class FieldTypeDef extends BaseClient { return response; }; + + /** + * The name of the field in lowerCamelCase format. + */ name = async (): Promise => { if (this._name) { return this._name; @@ -3008,6 +3312,10 @@ export class FieldTypeDef extends BaseClient { return response; }; + + /** + * The type of the field. + */ typeDef = (): TypeDef => { return new TypeDef({ queryTree: [ @@ -3254,6 +3562,10 @@ export class Function_ extends BaseClient { return response; }; + + /** + * Arguments accepted by the function, if any. + */ args = async (): Promise => { type args = { id: FunctionArgID; @@ -3288,6 +3600,10 @@ export class Function_ extends BaseClient { ) ); }; + + /** + * A doc string for the function, if any. + */ description = async (): Promise => { if (this._description) { return this._description; @@ -3305,6 +3621,10 @@ export class Function_ extends BaseClient { return response; }; + + /** + * The name of the function. + */ name = async (): Promise => { if (this._name) { return this._name; @@ -3322,6 +3642,10 @@ export class Function_ extends BaseClient { return response; }; + + /** + * The type returned by the function. + */ returnType = (): TypeDef => { return new TypeDef({ queryTree: [ @@ -3434,6 +3758,10 @@ export class FunctionArg extends BaseClient { 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; @@ -3451,6 +3779,10 @@ export class FunctionArg extends BaseClient { return response; }; + + /** + * A doc string for the argument, if any. + */ description = async (): Promise => { if (this._description) { return this._description; @@ -3468,6 +3800,10 @@ export class FunctionArg extends BaseClient { return response; }; + + /** + * The name of the argument in lowerCamelCase format. + */ name = async (): Promise => { if (this._name) { return this._name; @@ -3485,6 +3821,10 @@ export class FunctionArg extends BaseClient { return response; }; + + /** + * The type of the argument. + */ typeDef = (): TypeDef => { return new TypeDef({ queryTree: [ @@ -3548,6 +3888,10 @@ export class FunctionCall extends BaseClient { return response; }; + + /** + * The argument values the function is being invoked with. + */ inputArgs = async (): Promise => { type inputArgs = { id: FunctionCallArgValueID; @@ -3582,6 +3926,10 @@ export class FunctionCall extends BaseClient { ) ); }; + + /** + * The name of the function being called. + */ name = async (): Promise => { if (this._name) { return this._name; @@ -3599,6 +3947,10 @@ export class FunctionCall extends BaseClient { 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; @@ -3616,6 +3968,10 @@ export class FunctionCall extends BaseClient { 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; @@ -3702,6 +4058,10 @@ export class FunctionCallArgValue extends BaseClient { return response; }; + + /** + * The name of the argument. + */ name = async (): Promise => { if (this._name) { return this._name; @@ -3719,6 +4079,10 @@ export class FunctionCallArgValue extends BaseClient { return response; }; + + /** + * The value of the argument represented as a JSON serialized string. + */ value = async (): Promise => { if (this._value) { return this._value; @@ -3776,6 +4140,10 @@ export class GeneratedCode extends BaseClient { return response; }; + + /** + * The directory containing the generated code. + */ code = (): Directory => { return new Directory({ queryTree: [ @@ -3787,6 +4155,10 @@ export class GeneratedCode extends BaseClient { ctx: this._ctx, }); }; + + /** + * List of paths to mark generated in version control (i.e. .gitattributes). + */ vcsGeneratedPaths = async (): Promise => { const response: Awaited = await computeQuery( [ @@ -3800,6 +4172,10 @@ export class GeneratedCode extends BaseClient { return response; }; + + /** + * List of paths to ignore in version control (i.e. .gitignore). + */ vcsIgnoredPaths = async (): Promise => { const response: Awaited = await computeQuery( [ @@ -3856,6 +4232,181 @@ export class GeneratedCode extends BaseClient { }; } +/** + * 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). */ @@ -4011,6 +4562,23 @@ export class GitRepository extends BaseClient { }); }; + /** + * 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"). @@ -4192,41 +4760,38 @@ export class Host extends BaseClient { } /** - * A definition of a custom interface defined in a Module. + * 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 InterfaceTypeDef extends BaseClient { - private readonly _id?: InterfaceTypeDefID = undefined; - private readonly _description?: string = undefined; +export class InputTypeDef extends BaseClient { + private readonly _id?: InputTypeDefID = 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 + _id?: InputTypeDefID, + _name?: string ) { super(parent); this._id = _id; - this._description = _description; this._name = _name; - this._sourceModuleName = _sourceModuleName; } /** - * A unique identifier for this InterfaceTypeDef. + * A unique identifier for this InputTypeDef. */ - id = async (): Promise => { + id = async (): Promise => { if (this._id) { return this._id; } - const response: Awaited = await computeQuery( + const response: Awaited = await computeQuery( [ ...this._queryTree, { @@ -4238,14 +4803,126 @@ export class InterfaceTypeDef extends BaseClient { return response; }; - description = async (): Promise => { - if (this._description) { - return this._description; - } - const response: Awaited = await computeQuery( - [ - ...this._queryTree, + /** + * 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", }, @@ -4255,6 +4932,10 @@ export class InterfaceTypeDef extends BaseClient { return response; }; + + /** + * Functions defined on this interface, if any. + */ functions = async (): Promise => { type functions = { id: FunctionID; @@ -4289,6 +4970,10 @@ export class InterfaceTypeDef extends BaseClient { ) ); }; + + /** + * The name of the interface. + */ name = async (): Promise => { if (this._name) { return this._name; @@ -4306,6 +4991,10 @@ export class InterfaceTypeDef extends BaseClient { 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; @@ -4369,6 +5058,10 @@ export class Label extends BaseClient { return response; }; + + /** + * The label name. + */ name = async (): Promise => { if (this._name) { return this._name; @@ -4386,6 +5079,10 @@ export class Label extends BaseClient { return response; }; + + /** + * The label value. + */ value = async (): Promise => { if (this._value) { return this._value; @@ -4443,6 +5140,10 @@ export class ListTypeDef extends BaseClient { return response; }; + + /** + * The type of the elements in the list. + */ elementTypeDef = (): TypeDef => { return new TypeDef({ queryTree: [ @@ -4456,6 +5157,85 @@ export class ListTypeDef extends BaseClient { }; } +/** + * 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. */ @@ -4465,7 +5245,6 @@ export class Module_ extends BaseClient { private readonly _name?: string = undefined; private readonly _sdk?: string = undefined; private readonly _serve?: Void = undefined; - private readonly _sourceDirectorySubpath?: string = undefined; /** * Constructor is used for internal usage only, do not create object from it. @@ -4476,8 +5255,7 @@ export class Module_ extends BaseClient { _description?: string, _name?: string, _sdk?: string, - _serve?: Void, - _sourceDirectorySubpath?: string + _serve?: Void ) { super(parent); @@ -4486,7 +5264,6 @@ export class Module_ extends BaseClient { this._name = _name; this._sdk = _sdk; this._serve = _serve; - this._sourceDirectorySubpath = _sourceDirectorySubpath; } /** @@ -4509,6 +5286,10 @@ export class Module_ extends BaseClient { return response; }; + + /** + * Modules used by this module. + */ dependencies = async (): Promise => { type dependencies = { id: ModuleID; @@ -4543,19 +5324,48 @@ export class Module_ extends BaseClient { ) ); }; - dependencyConfig = async (): Promise => { - const response: Awaited = await computeQuery( + + /** + * 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; + 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; @@ -4573,12 +5383,31 @@ export class Module_ extends BaseClient { return response; }; - generatedCode = (): GeneratedCode => { - return new GeneratedCode({ + + /** + * The generated files and directories made on top of the module source's context directory. + */ + generatedContextDiff = (): Directory => { + return new Directory({ queryTree: [ ...this._queryTree, { - operation: "generatedCode", + 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, @@ -4599,6 +5428,10 @@ export class Module_ extends BaseClient { ctx: this._ctx, }); }; + + /** + * Interfaces served by this module. + */ interfaces = async (): Promise => { type interfaces = { id: TypeDefID; @@ -4633,6 +5466,10 @@ export class Module_ extends BaseClient { ) ); }; + + /** + * The name of the module + */ name = async (): Promise => { if (this._name) { return this._name; @@ -4650,6 +5487,10 @@ export class Module_ extends BaseClient { return response; }; + + /** + * Objects served by this module. + */ objects = async (): Promise => { type objects = { id: TypeDefID; @@ -4684,12 +5525,31 @@ export class Module_ extends BaseClient { ) ); }; - sdk = async (): Promise => { - if (this._sdk) { - return this._sdk; - } - const response: Awaited = await computeQuery( + /** + * 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, { @@ -4724,33 +5584,37 @@ export class Module_ extends BaseClient { return response; }; - sourceDirectory = (): Directory => { - return new Directory({ + + /** + * The source for the module. + */ + source = (): ModuleSource => { + return new ModuleSource({ queryTree: [ ...this._queryTree, { - operation: "sourceDirectory", + operation: "source", }, ], ctx: this._ctx, }); }; - sourceDirectorySubpath = async (): Promise => { - if (this._sourceDirectorySubpath) { - return this._sourceDirectorySubpath; - } - const response: Awaited = await computeQuery( - [ + /** + * Retrieves the module with the given description + * @param description The description to set + */ + withDescription = (description: string): Module_ => { + return new Module_({ + queryTree: [ ...this._queryTree, { - operation: "sourceDirectorySubpath", + operation: "withDescription", + args: { description }, }, ], - await this._ctx.connection() - ); - - return response; + ctx: this._ctx, + }); }; /** @@ -4786,21 +5650,16 @@ export class Module_ extends BaseClient { }; /** - * Retrieves the module with basic configuration loaded, ready for initialization. - * @param directory The directory containing the module's source code. - * @param opts.subpath An optional subpath of the directory which contains the module's source code. - * - * 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. + * Retrieves the module with basic configuration loaded if present. + * @param source The module source to initialize from. */ - withSource = (directory: Directory, opts?: ModuleWithSourceOpts): Module_ => { + withSource = (source: ModuleSource): Module_ => { return new Module_({ queryTree: [ ...this._queryTree, { operation: "withSource", - args: { directory, ...opts }, + args: { source }, }, ], ctx: this._ctx, @@ -4818,41 +5677,35 @@ export class Module_ extends BaseClient { } /** - * Static configuration for a module (e.g. parsed contents of dagger.json) + * The configuration of dependency of a module. */ -export class ModuleConfig extends BaseClient { - private readonly _id?: ModuleConfigID = undefined; +export class ModuleDependency extends BaseClient { + private readonly _id?: ModuleDependencyID = undefined; private readonly _name?: string = undefined; - private readonly _root?: string = undefined; - private readonly _sdk?: string = undefined; /** * Constructor is used for internal usage only, do not create object from it. */ constructor( parent?: { queryTree?: QueryTree[]; ctx: Context }, - _id?: ModuleConfigID, - _name?: string, - _root?: string, - _sdk?: string + _id?: ModuleDependencyID, + _name?: string ) { super(parent); this._id = _id; this._name = _name; - this._root = _root; - this._sdk = _sdk; } /** - * A unique identifier for this ModuleConfig. + * A unique identifier for this ModuleDependency. */ - id = async (): Promise => { + id = async (): Promise => { if (this._id) { return this._id; } - const response: Awaited = await computeQuery( + const response: Awaited = await computeQuery( [ ...this._queryTree, { @@ -4864,25 +5717,298 @@ export class ModuleConfig extends BaseClient { return response; }; - dependencies = async (): Promise => { - const response: Awaited = await computeQuery( + + /** + * 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; }; - exclude = async (): Promise => { - const response: Awaited = await computeQuery( + + /** + * 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: "exclude", + operation: "moduleName", }, ], await this._ctx.connection() @@ -4890,12 +6016,20 @@ export class ModuleConfig extends BaseClient { return response; }; - include = async (): Promise => { - const response: Awaited = await computeQuery( + + /** + * 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: "include", + operation: "moduleOriginalName", }, ], await this._ctx.connection() @@ -4903,16 +6037,20 @@ export class ModuleConfig extends BaseClient { return response; }; - name = async (): Promise => { - if (this._name) { - return this._name; + + /** + * 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: "name", + operation: "resolveContextPathFromCaller", }, ], await this._ctx.connection() @@ -4920,16 +6058,52 @@ export class ModuleConfig extends BaseClient { return response; }; - root = async (): Promise => { - if (this._root) { - return this._root; + + /** + * 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: "root", + operation: "sourceRootSubpath", }, ], await this._ctx.connection() @@ -4937,22 +6111,120 @@ export class ModuleConfig extends BaseClient { return response; }; - sdk = async (): Promise => { - if (this._sdk) { - return this._sdk; + + /** + * 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( - [ + 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: "sdk", + operation: "withSourceSubpath", + args: { path }, }, ], - await this._ctx.connection() - ); + ctx: this._ctx, + }); + }; - return response; + /** + * 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); }; } @@ -5003,6 +6275,10 @@ export class ObjectTypeDef extends BaseClient { return response; }; + + /** + * The function used to construct new instances of this object, if any + */ constructor_ = (): Function_ => { return new Function_({ queryTree: [ @@ -5014,6 +6290,10 @@ export class ObjectTypeDef extends BaseClient { ctx: this._ctx, }); }; + + /** + * The doc string for the object, if any. + */ description = async (): Promise => { if (this._description) { return this._description; @@ -5031,6 +6311,10 @@ export class ObjectTypeDef extends BaseClient { return response; }; + + /** + * Static fields defined on this object, if any. + */ fields = async (): Promise => { type fields = { id: FieldTypeDefID; @@ -5065,6 +6349,10 @@ export class ObjectTypeDef extends BaseClient { ) ); }; + + /** + * Functions defined on this object, if any. + */ functions = async (): Promise => { type functions = { id: FunctionID; @@ -5099,6 +6387,10 @@ export class ObjectTypeDef extends BaseClient { ) ); }; + + /** + * The name of the object. + */ name = async (): Promise => { if (this._name) { return this._name; @@ -5116,6 +6408,10 @@ export class ObjectTypeDef extends BaseClient { 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; @@ -5141,6 +6437,7 @@ export class ObjectTypeDef extends BaseClient { 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; @@ -5151,6 +6448,7 @@ export class Port extends BaseClient { parent?: { queryTree?: QueryTree[]; ctx: Context }, _id?: PortID, _description?: string, + _experimentalSkipHealthcheck?: boolean, _port?: number, _protocol?: NetworkProtocol ) { @@ -5158,6 +6456,7 @@ export class Port extends BaseClient { this._id = _id; this._description = _description; + this._experimentalSkipHealthcheck = _experimentalSkipHealthcheck; this._port = _port; this._protocol = _protocol; } @@ -5182,6 +6481,10 @@ export class Port extends BaseClient { return response; }; + + /** + * The port description. + */ description = async (): Promise => { if (this._description) { return this._description; @@ -5199,6 +6502,31 @@ export class Port extends BaseClient { 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; @@ -5216,6 +6544,10 @@ export class Port extends BaseClient { return response; }; + + /** + * The transport layer protocol. + */ protocol = async (): Promise => { if (this._protocol) { return this._protocol; @@ -5281,6 +6613,23 @@ export class Client extends BaseClient { }); }; + /** + * 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"). @@ -5357,8 +6706,8 @@ export class Client extends BaseClient { /** * The module currently being served in the session, if any. */ - currentModule = (): Module_ => { - return new Module_({ + currentModule = (): CurrentModule => { + return new CurrentModule({ queryTree: [ ...this._queryTree, { @@ -5581,6 +6930,22 @@ export class Client extends BaseClient { }); }; + /** + * 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. */ @@ -5727,6 +7092,22 @@ export class Client extends BaseClient { }); }; + /** + * 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. */ @@ -5775,6 +7156,22 @@ export class Client extends BaseClient { }); }; + /** + * 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. */ @@ -5824,14 +7221,32 @@ export class Client extends BaseClient { }; /** - * Load a ModuleConfig from its ID. + * Load a LocalModuleSource from its ID. */ - loadModuleConfigFromID = (id: ModuleConfigID): ModuleConfig => { - return new ModuleConfig({ + loadLocalModuleSourceFromID = ( + id: LocalModuleSourceID + ): LocalModuleSource => { + return new LocalModuleSource({ queryTree: [ ...this._queryTree, { - operation: "loadModuleConfigFromID", + 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 }, }, ], @@ -5855,6 +7270,22 @@ export class Client extends BaseClient { }); }; + /** + * 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. */ @@ -5935,6 +7366,22 @@ export class Client extends BaseClient { }); }; + /** + * 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. */ @@ -5967,18 +7414,41 @@ export class Client extends BaseClient { }; /** - * Load the static configuration for a module from the given source directory and optional subpath. + * 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. */ - moduleConfig = ( - sourceDirectory: Directory, - opts?: ClientModuleConfigOpts - ): ModuleConfig => { - return new ModuleConfig({ + moduleSource = ( + refString: string, + opts?: ClientModuleSourceOpts + ): ModuleSource => { + return new ModuleSource({ queryTree: [ ...this._queryTree, { - operation: "moduleConfig", - args: { sourceDirectory, ...opts }, + operation: "moduleSource", + args: { refString, ...opts }, }, ], ctx: this._ctx, @@ -6007,13 +7477,13 @@ export class Client extends BaseClient { /** * Reference a secret by name. */ - secret = (name: string): Secret => { + secret = (name: string, opts?: ClientSecretOpts): Secret => { return new Secret({ queryTree: [ ...this._queryTree, { operation: "secret", - args: { name }, + args: { name, ...opts }, }, ], ctx: this._ctx, @@ -6155,6 +7625,7 @@ export class Service extends BaseClient { 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. @@ -6165,7 +7636,8 @@ export class Service extends BaseClient { _endpoint?: string, _hostname?: string, _start?: ServiceID, - _stop?: ServiceID + _stop?: ServiceID, + _up?: Void ) { super(parent); @@ -6174,6 +7646,7 @@ export class Service extends BaseClient { this._hostname = _hostname; this._start = _start; this._stop = _stop; + this._up = _up; } /** @@ -6305,13 +7778,15 @@ export class Service extends BaseClient { /** * Stop the service. + * @param opts.kill Immediately kill the service without waiting for a graceful exit */ - stop = async (): Promise => { + stop = async (opts?: ServiceStopOpts): Promise => { await computeQuery( [ ...this._queryTree, { operation: "stop", + args: { ...opts }, }, ], await this._ctx.connection() @@ -6319,6 +7794,32 @@ export class Service extends BaseClient { 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; + }; } /** @@ -6361,6 +7862,70 @@ export class Socket extends BaseClient { }; } +/** + * 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. */ @@ -6405,6 +7970,25 @@ export class TypeDef extends BaseClient { 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: [ @@ -6416,6 +8000,10 @@ export class TypeDef extends BaseClient { 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: [ @@ -6427,6 +8015,10 @@ export class TypeDef extends BaseClient { 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: [ @@ -6438,6 +8030,10 @@ export class TypeDef extends BaseClient { ctx: this._ctx, }); }; + + /** + * The kind of type this is (e.g. primitive, list, object). + */ kind = async (): Promise => { if (this._kind) { return this._kind; @@ -6455,6 +8051,10 @@ export class TypeDef extends BaseClient { return response; }; + + /** + * Whether this type can be set to null. Defaults to false. + */ optional = async (): Promise => { if (this._optional) { return this._optional; diff --git a/sdk/common/errors/DaggerSDKError.ts b/sdk/common/errors/DaggerSDKError.ts new file mode 100644 index 0000000..f2f009d --- /dev/null +++ b/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/sdk/common/errors/DockerImageRefValidationError.ts b/sdk/common/errors/DockerImageRefValidationError.ts new file mode 100644 index 0000000..6f45b46 --- /dev/null +++ b/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/sdk/common/errors/EngineSessionConnectParamsParseError.ts b/sdk/common/errors/EngineSessionConnectParamsParseError.ts new file mode 100644 index 0000000..8acd47a --- /dev/null +++ b/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/sdk/common/errors/EngineSessionConnectionTimeoutError.ts b/sdk/common/errors/EngineSessionConnectionTimeoutError.ts new file mode 100644 index 0000000..e2550ac --- /dev/null +++ b/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/sdk/common/errors/EngineSessionErrorOptions.ts b/sdk/common/errors/EngineSessionErrorOptions.ts new file mode 100644 index 0000000..ba0ec90 --- /dev/null +++ b/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/sdk/common/errors/ExecError.ts b/sdk/common/errors/ExecError.ts new file mode 100644 index 0000000..ede655b --- /dev/null +++ b/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/sdk/common/errors/GraphQLRequestError.ts b/sdk/common/errors/GraphQLRequestError.ts new file mode 100644 index 0000000..59584f8 --- /dev/null +++ b/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/sdk/common/errors/InitEngineSessionBinaryError.ts b/sdk/common/errors/InitEngineSessionBinaryError.ts new file mode 100644 index 0000000..879c1ce --- /dev/null +++ b/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/sdk/common/errors/NotAwaitedRequestError.ts b/sdk/common/errors/NotAwaitedRequestError.ts new file mode 100644 index 0000000..291b924 --- /dev/null +++ b/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/sdk/common/errors/TooManyNestedObjectsError.ts b/sdk/common/errors/TooManyNestedObjectsError.ts new file mode 100644 index 0000000..7b8b907 --- /dev/null +++ b/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/sdk/common/errors/UnknownDaggerError.ts b/sdk/common/errors/UnknownDaggerError.ts new file mode 100644 index 0000000..fe29169 --- /dev/null +++ b/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/sdk/common/errors/errors-codes.ts b/sdk/common/errors/errors-codes.ts new file mode 100644 index 0000000..a6e4d48 --- /dev/null +++ b/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/sdk/common/errors/index.ts b/sdk/common/errors/index.ts new file mode 100644 index 0000000..61faf70 --- /dev/null +++ b/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/sdk/common/errors/types.ts b/sdk/common/errors/types.ts new file mode 100644 index 0000000..f5b1582 --- /dev/null +++ b/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/sdk/common/utils.ts b/sdk/common/utils.ts new file mode 100644 index 0000000..5853601 --- /dev/null +++ b/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/src/dagger/pipeline.ts b/src/dagger/pipeline.ts index 51ef1b1..a4af425 100644 --- a/src/dagger/pipeline.ts +++ b/src/dagger/pipeline.ts @@ -1,12 +1,8 @@ -import { uploadContext } from "../../deps.ts"; import * as jobs from "./jobs.ts"; -const { apply, runnableJobs, exclude } = jobs; +const { apply, runnableJobs } = 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 as jobs.Job[], src); return;