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 3ac7dd7..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: denolib/setup-deno@v2 - 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 5a35a70..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: "denolib/setup-deno@v2", - with: { - "deno-version": "v1.36", - }, - }, - { - 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 99f51d2..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: denolib/setup-deno@v2 - with: - deno-version: v1.36 - - 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 3ac7dd7..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: denolib/setup-deno@v2 - 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 3ac7dd7..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: denolib/setup-deno@v2 - 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 1e6b7a0..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: "denolib/setup-deno@v2", - with: { - "deno-version": "v1.36", - }, - }, - { - 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 faabe80..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: denolib/setup-deno@v2 - with: - deno-version: v1.36 - - 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 5510c76..0000000 --- a/.fluentci/deno.lock +++ /dev/null @@ -1,122 +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/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/nix_installer_pipeline@v0.3.6/src/dagger/steps.ts": "a34aea3753c7079de5877f592ce31f30d05d552155729ff3e695d77326405133", - "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/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/v128/yaml@2.3.1": "8ef3aee065e93b03cebf8fd5a3418bc30131344b7f2b8c8ae27bf9f277416087", - "https://esm.sh/v128/yaml@2.3.1/denonext/yaml.mjs": "71f677b4bfc69271af9d98db5194e354f9a1863955e208e26d32a9ef78bd89f5", - "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/v131/yaml@2.3.1": "1fe2490feb3d9c6d2c71c64dbdbed90acd4164b00628b3c68a311b6731ca38b5", - "https://esm.sh/v131/yaml@2.3.1/denonext/yaml.mjs": "71f677b4bfc69271af9d98db5194e354f9a1863955e208e26d32a9ef78bd89f5", - "https://esm.sh/yaml@v2.3.1": "1fe2490feb3d9c6d2c71c64dbdbed90acd4164b00628b3c68a311b6731ca38b5" - }, - "npm": { - "specifiers": { - "@types/node": "@types/node@18.16.19" - }, - "packages": { - "@types/node@18.16.19": { - "integrity": "sha512-IXl7o+R9iti9eBW4Wg2hx1xQDig183jj7YLn8F7udNceyfkbn1ZxmzZXuak20gR40D7pIkIY1kYGx5VIGbaHKA==", - "dependencies": {} - } - } - } -} 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 3ac7dd7..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: denolib/setup-deno@v2 - 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 3ac7dd7..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: denolib/setup-deno@v2 - 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 ae6ec7d..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: denolib/setup-deno@v2 - with: - deno-version: v1.36 - - 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 dbece06..0000000 --- a/.fluentci/src/dagger/jobs.ts +++ /dev/null @@ -1,194 +0,0 @@ -import Client from "@fluentci.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.4.1/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", "--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, -}; - -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/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 cb52ac4..0000000 --- a/.fluentci/src/dagger/pipeline.ts +++ /dev/null @@ -1,27 +0,0 @@ -import Client, { connect } from "@fluentci.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 5c0e630..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: denolib/setup-deno@v2 - with: - deno-version: v1.36 - - 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 543a14c..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.36", - }, - }, - { - 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 deno_pipeline fmt lint test", - }, - { - name: "Upload to Codecov", - run: "dagger run fluentci 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 062098d..2538d9a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,11 +10,19 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Setup Fluent CI CLI - uses: fluentci-io/setup-fluentci@v2 + - name: Setup Fluent CI + uses: fluentci-io/setup-fluentci@v5 + with: + wasm: true + plugin: deno + args: | + fmt + test + coverage - name: Run Dagger Pipelines - run: fluentci run deno_pipeline fmt lint test + run: | + dagger -m github.com/fluent-ci-templates/python-pipeline@main functions - name: Upload to Codecov - run: fluentci run codecov_pipeline + run: fluentci run --wasm codecov upload env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/example.yml b/.github/workflows/example.yml index adbd62f..26d2c8c 100644 --- a/.github/workflows/example.yml +++ b/.github/workflows/example.yml @@ -11,16 +11,8 @@ jobs: package_manager: [pip, pipenv, poetry] steps: - uses: actions/checkout@v2 - - uses: denolib/setup-deno@v2 - 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.9.3 sh - sudo mv bin/dagger /usr/local/bin - dagger version + uses: fluentci-io/setup-fluentci@v5 - name: Run Dagger Pipelines run: dagger run deno run -A ../../src/dagger/runner.ts working-directory: example/${{ matrix.package_manager }} diff --git a/.github/workflows/zenith.yml b/.github/workflows/zenith.yml index d926038..9a1e2b7 100644 --- a/.github/workflows/zenith.yml +++ b/.github/workflows/zenith.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Dagger Zenith run: | - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.9.3 sh + curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.11.7 sh sudo mv bin/dagger /usr/local/bin dagger version - name: Run Dagger Pipelines diff --git a/README.md b/README.md index ef644bc..da1e4ab 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ fluentci run . Use as a [Dagger](https://dagger.io) module: ```bash -dagger mod install github.com/fluent-ci-templates/python-pipeline@mod +dagger install github.com/fluent-ci-templates/python-pipeline@main ``` ## Environment variables diff --git a/fluentci.toml b/fluentci.toml new file mode 100644 index 0000000..0995f5b --- /dev/null +++ b/fluentci.toml @@ -0,0 +1,8 @@ +[package] +authors = [ + "Tsiry Sandratraina ", +] +description = "CI/CD Plugin for Python" +license = "MIT" +name = "python" +version = "0.5.0"