mirror of
https://github.com/tsirysndr/music-player.git
synced 2026-01-08 20:58:07 -05:00
fix build issues with rust 1.80
This commit is contained in:
@@ -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"
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
name: Codecov
|
||||
|
||||
# Controls when the action will run. Triggers the workflow on push or pull request
|
||||
# events but only for the master branch
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: denoland/setup-deno@v1
|
||||
with:
|
||||
deno-version: v1.34
|
||||
- name: Create coverage files
|
||||
run: deno test --allow-read --coverage=coverage --lock-write # create coverage files
|
||||
- name: Create coverage report
|
||||
run: deno coverage ./coverage --lcov > coverage.lcov # create coverage report
|
||||
- name: Collect coverage
|
||||
uses: codecov/codecov-action@v3 # upload the report on Codecov
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
with:
|
||||
file: ./coverage.lcov
|
||||
@@ -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
|
||||
@@ -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.
|
||||
@@ -1,19 +0,0 @@
|
||||
Copyright (c) 2023 Tsiry Sandratraina <tsiry.sndr@aol.com>
|
||||
|
||||
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.
|
||||
@@ -1,88 +0,0 @@
|
||||
# Deno Pipeline
|
||||
|
||||
[](https://deno.land/x/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();
|
||||
```
|
||||
@@ -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));
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
68
.fluentci/.fluentci/.fluentci/deno.lock
generated
68
.fluentci/.fluentci/.fluentci/deno.lock
generated
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
|
||||
61
.fluentci/.fluentci/.fluentci/flake.lock
generated
61
.fluentci/.fluentci/.fluentci/flake.lock
generated
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
];
|
||||
};
|
||||
});
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
import * as GitLab from "./src/gitlab/index.ts";
|
||||
import * as Dagger from "./src/dagger/index.ts";
|
||||
|
||||
export { Dagger, GitLab };
|
||||
@@ -1,4 +0,0 @@
|
||||
import pipeline from "./pipeline.ts";
|
||||
import { fmt, lint, test } from "./jobs.ts";
|
||||
|
||||
export { fmt, lint, pipeline, test };
|
||||
@@ -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<void>
|
||||
| ((
|
||||
client: Client,
|
||||
src?: string,
|
||||
options?: {
|
||||
ignore: string[];
|
||||
}
|
||||
) => Promise<void>);
|
||||
|
||||
export const codecov = upload;
|
||||
|
||||
export const runnableJobs: Record<Job, JobExec> = {
|
||||
[Job.fmt]: fmt,
|
||||
[Job.lint]: lint,
|
||||
[Job.test]: test,
|
||||
[Job.deploy]: deploy,
|
||||
[Job.codecov]: upload,
|
||||
};
|
||||
|
||||
export const jobDescriptions: Record<Job, string> = {
|
||||
[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",
|
||||
};
|
||||
@@ -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
|
||||
)
|
||||
);
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
import pipeline from "./pipeline.ts";
|
||||
|
||||
pipeline(".", Deno.args);
|
||||
@@ -1,52 +0,0 @@
|
||||
import { JobSpec, Workflow } from "fluent_github_actions";
|
||||
|
||||
export function generateYaml() {
|
||||
const workflow = new Workflow("Codecov");
|
||||
|
||||
const push = {
|
||||
branches: ["main"],
|
||||
};
|
||||
|
||||
const setupDagger = `\
|
||||
curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh
|
||||
sudo mv bin/dagger /usr/local/bin
|
||||
dagger version`;
|
||||
|
||||
const tests: JobSpec = {
|
||||
"runs-on": "ubuntu-latest",
|
||||
steps: [
|
||||
{
|
||||
uses: "actions/checkout@v2",
|
||||
},
|
||||
{
|
||||
uses: "denoland/setup-deno@v1",
|
||||
with: {
|
||||
"deno-version": "v1.37",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Setup Fluent CI CLI",
|
||||
run: "deno install -A -r https://cli.fluentci.io -n fluentci",
|
||||
},
|
||||
{
|
||||
name: "Setup Dagger",
|
||||
run: setupDagger,
|
||||
},
|
||||
{
|
||||
name: "List Jobs",
|
||||
run: "fluentci ls .",
|
||||
},
|
||||
{
|
||||
name: "Run Dagger Pipelines",
|
||||
run: "dagger run fluentci . fmt lint test codecov",
|
||||
env: {
|
||||
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}",
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
workflow.on({ push }).jobs({ tests });
|
||||
|
||||
workflow.save(".github/workflows/ci.yml");
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
import { generateYaml } from "./config.ts";
|
||||
|
||||
generateYaml();
|
||||
@@ -1,4 +0,0 @@
|
||||
import pipeline from "./pipeline.ts";
|
||||
import { fmt, lint, test } from "./jobs.ts";
|
||||
|
||||
export { fmt, lint, pipeline, test };
|
||||
@@ -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");
|
||||
@@ -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;
|
||||
@@ -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);
|
||||
});
|
||||
28
.fluentci/.fluentci/.github/workflows/ci.yml
vendored
28
.fluentci/.fluentci/.github/workflows/ci.yml
vendored
@@ -1,28 +0,0 @@
|
||||
# Do not edit this file directly. It is generated by Fluent Github Actions
|
||||
|
||||
name: Codecov
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: denoland/setup-deno@v1
|
||||
with:
|
||||
deno-version: v1.37
|
||||
- name: Setup Fluent CI CLI
|
||||
run: deno install -A -r https://cli.fluentci.io -n fluentci
|
||||
- name: Setup Dagger
|
||||
run: |
|
||||
curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh
|
||||
sudo mv bin/dagger /usr/local/bin
|
||||
dagger version
|
||||
- name: List Jobs
|
||||
run: fluentci ls .
|
||||
- name: Run Dagger Pipelines
|
||||
run: dagger run fluentci . fmt lint test codecov
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
2
.fluentci/.fluentci/.gitignore
vendored
2
.fluentci/.fluentci/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
coverage/
|
||||
coverage.lcov
|
||||
@@ -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
|
||||
@@ -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.
|
||||
@@ -1,19 +0,0 @@
|
||||
Copyright (c) 2023 Tsiry Sandratraina <tsiry.sndr@aol.com>
|
||||
|
||||
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.
|
||||
@@ -1,69 +0,0 @@
|
||||
# Deno Pipeline
|
||||
|
||||
[](https://deno.land/x/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();
|
||||
```
|
||||
@@ -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));
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
68
.fluentci/.fluentci/deno.lock
generated
68
.fluentci/.fluentci/deno.lock
generated
@@ -1,68 +0,0 @@
|
||||
{
|
||||
"version": "3",
|
||||
"remote": {
|
||||
"https://deno.land/std@0.150.0/media_types/_util.ts": "ce9b4fc4ba1c447dafab619055e20fd88236ca6bdd7834a21f98bd193c3fbfa1",
|
||||
"https://deno.land/std@0.150.0/media_types/mod.ts": "2d4b6f32a087029272dc59e0a55ae3cc4d1b27b794ccf528e94b1925795b3118",
|
||||
"https://deno.land/std@0.150.0/media_types/vendor/mime-db.v1.52.0.ts": "724cee25fa40f1a52d3937d6b4fbbfdd7791ff55e1b7ac08d9319d5632c7f5af",
|
||||
"https://deno.land/std@0.191.0/fmt/colors.ts": "d67e3cd9f472535241a8e410d33423980bec45047e343577554d3356e1f0ef4e",
|
||||
"https://deno.land/x/codecov_pipeline@v0.1.1/src/dagger/jobs.ts": "ea5ea4fb985f879fdd1c0aed77ac635ba090606c1ecce9d5f5c107493d287984",
|
||||
"https://deno.land/x/nix_installer_pipeline@v0.3.6/src/dagger/steps.ts": "a34aea3753c7079de5877f592ce31f30d05d552155729ff3e695d77326405133",
|
||||
"https://deno.land/x/xhr@0.3.0/mod.ts": "094aacd627fd9635cd942053bf8032b5223b909858fa9dc8ffa583752ff63b20",
|
||||
"https://esm.sh/stringify-tree@1.1.1": "a0515b0f4fe97a6972047a588b7982592d9079e7aeac3323b0d26448a757cf84",
|
||||
"https://esm.sh/v128/*@dagger.io/dagger@0.6.3": "cb691a77c0cdaee22f2b8393731b5143c83ce22dbbea204cdbfd203768d15b64",
|
||||
"https://esm.sh/v128/@dagger.io/dagger@0.6.3/X-ZS8q/denonext/dagger.mjs": "fd0901784d75b99615b5409c3654b5c7edfc5ba377c9e1a5a67ffff4f7d3ac32",
|
||||
"https://esm.sh/v128/adm-zip@0.5.10": "d9c54d6d2dd788462781a57d923295bd79304e6fd74b242fd4b30e35b39c5dcf",
|
||||
"https://esm.sh/v128/adm-zip@0.5.10/denonext/adm-zip.mjs": "07a9731547905e0ca55ae917e1969d7f6d04fb3773f906ce3306891337eb4849",
|
||||
"https://esm.sh/v128/chownr@2.0.0/denonext/chownr.mjs": "30b8f17084dfbe475a5052b615f706b06ddd17dca0535103340d485c6b94e952",
|
||||
"https://esm.sh/v128/cross-fetch@3.1.8/denonext/cross-fetch.mjs": "8fba9e7c3fbaf0d2168beb63ce0cd21b5bfbfbd77e2fcbf8d957d533a71222f6",
|
||||
"https://esm.sh/v128/cross-spawn@7.0.3/denonext/cross-spawn.mjs": "0569a26e7ad4b3376516cbc9b1942e10961a58030eadcea8c848e6b956eb355c",
|
||||
"https://esm.sh/v128/data-uri-to-buffer@4.0.1/denonext/data-uri-to-buffer.mjs": "70ef987b1da58391495ecfad9888d996469224faf3cd996d81dc2e059feb9f31",
|
||||
"https://esm.sh/v128/env-paths@3.0.0": "8400fb23319be9b30d7b40d1c865541c5b3c7726cdf9b74000bc0f1678d52ecf",
|
||||
"https://esm.sh/v128/env-paths@3.0.0/denonext/env-paths.mjs": "77984a05eb16450087f25060a070ed500ec546719d471143e16d976ca73ca956",
|
||||
"https://esm.sh/v128/execa@7.1.1": "a40c7030df81ab0847a5d844f4c5c6420af973dff05fef88e53cbb9b8667fdc2",
|
||||
"https://esm.sh/v128/execa@7.1.1/denonext/execa.mjs": "9d5943544c0df3761b52f2c095f89a03ca6c028d818a8f0475ff883b0408f154",
|
||||
"https://esm.sh/v128/fetch-blob@3.2.0/denonext/fetch-blob.mjs": "0531568b36c0f6db3e9825fbb2d08dee51100eb675c2bf1d98d6971a92010721",
|
||||
"https://esm.sh/v128/fetch-blob@3.2.0/denonext/file.js": "fd82828163a4e7bdc15190d8c3dbfd92f93274d05bd7f7f5ab81093e3ad7e9c2",
|
||||
"https://esm.sh/v128/fetch-blob@3.2.0/denonext/from.js": "7d3258c7960755497f90879806f0b815d5e564c2ac1523238af5cb9552ff5c45",
|
||||
"https://esm.sh/v128/formdata-polyfill@4.0.10/denonext/esm.min.js": "b6d65a204e81eca699d9eb6f867e9efffa42db39a8f161690915a89e5eb1766f",
|
||||
"https://esm.sh/v128/fs-minipass@2.1.0/denonext/fs-minipass.mjs": "74b00283d556b281bdfd6a669576d852f2c43702043c411985f8f8188d208c5d",
|
||||
"https://esm.sh/v128/get-stream@6.0.1/denonext/get-stream.mjs": "a947a16f8cb3052fd654a84f8b36b40ce96b6a5acfb3ad4ab69d814bcf3351fb",
|
||||
"https://esm.sh/v128/graphql-request@6.1.0": "17f00c323eb825811ce14e2b0e88a0c873acb666c382ac963d1edeb03e01f372",
|
||||
"https://esm.sh/v128/graphql-request@6.1.0/denonext/graphql-request.mjs": "0b15f49d44489423ae6f06004725b6d050b6359da4969e6569bd6ad45065bd94",
|
||||
"https://esm.sh/v128/graphql-tag@2.12.6": "5bfa27da9c9918fb52a01b8579891e804e0365d91118df1f2e0957a72dacdc39",
|
||||
"https://esm.sh/v128/graphql-tag@2.12.6/denonext/graphql-tag.mjs": "331d09949efc4ac60c84a69b52a7da8b333210493900e54953ae4604c9874527",
|
||||
"https://esm.sh/v128/graphql@16.7.1/denonext/graphql.mjs": "418ad7c07b0f2d687f33b6275d3b5f317f4afbef1f462f318229f458dff45416",
|
||||
"https://esm.sh/v128/human-signals@4.3.1/denonext/human-signals.mjs": "3889110cedd907804443d018cffe0a1d892d5e7467661376caf967feff55cbe9",
|
||||
"https://esm.sh/v128/is-stream@3.0.0/denonext/is-stream.mjs": "5c8b65f2fa051c4b18e88bbae11dac8bba9caf57752577d69bcea86d1f05c5b7",
|
||||
"https://esm.sh/v128/isexe@2.0.0/denonext/isexe.mjs": "3cfefd270d1bfdfb864ee98dbb8f41d150cbf480925158f4a8f0ade8a9e17d6c",
|
||||
"https://esm.sh/v128/merge-stream@2.0.0/denonext/merge-stream.mjs": "2c2af22401c294158d6bff659d157e3d2c028c218cc1bd2246534a45a4c03c61",
|
||||
"https://esm.sh/v128/mimic-fn@4.0.0/denonext/mimic-fn.mjs": "10bcf0f2f20cbbba0c289ef7bf4d2422639bbc1c36c247be876afd6fe2d67138",
|
||||
"https://esm.sh/v128/minipass@3.3.6/denonext/minipass.mjs": "59bbe430514455e78cb30c389b21af66efb2bf010cda071820a17d8c76d0d1cf",
|
||||
"https://esm.sh/v128/minipass@5.0.0/denonext/minipass.mjs": "de0e049728f8c387b58c86439eb9d69a16b6a88756a6bc694e2fecbd7fd00401",
|
||||
"https://esm.sh/v128/minizlib@2.1.2/denonext/minizlib.mjs": "0d919b6a0c60d5a31e14d748ff9d62aeae2923b604bcc6a22f90fa4bbd400d68",
|
||||
"https://esm.sh/v128/mkdirp@1.0.4/denonext/mkdirp.mjs": "ee129b32e55dd8bede6b1bbd1978f7775fa5e2720d5a7ae07bf1e8c99abd77c7",
|
||||
"https://esm.sh/v128/node-color-log@10.0.2": "05a277987c64153af1252167135076155fdc6b39ca260b2bdc39750da12d2a2d",
|
||||
"https://esm.sh/v128/node-color-log@10.0.2/denonext/node-color-log.mjs": "2504391bd0ce1dd4c2bf0ed0b839b8a3ad84c028d9dd17cc58dccd2e14dacfde",
|
||||
"https://esm.sh/v128/node-domexception@1.0.0/denonext/node-domexception.mjs": "bb35ba54c1a2b35870618876c0c96310a28ae58aecff33c8eed58a582e270ff4",
|
||||
"https://esm.sh/v128/node-fetch@3.3.1": "916dcee177a69fb0e46970c528cb66fcd4973488f861844c0a235bfc645b0506",
|
||||
"https://esm.sh/v128/node-fetch@3.3.1/denonext/node-fetch.mjs": "dc3a8f1f2fc9eb26d0d33e49f3750acc265d51a1a54bbd670c5d9f640b633a93",
|
||||
"https://esm.sh/v128/node-fetch@3.3.1/denonext/src/utils/multipart-parser.js": "713b1b8cbafc4bfb7358debeb35d507e0d2328f0a28b8a2a7d79a3e5e4f5e5b8",
|
||||
"https://esm.sh/v128/npm-run-path@5.1.0/denonext/npm-run-path.mjs": "3540b8c2dd1430f10d580f323f3a51aa30094da27a9220cce03ce69884b163bb",
|
||||
"https://esm.sh/v128/onetime@6.0.0/denonext/onetime.mjs": "6e362222575d815f37fb813168d7069dd6a0f6bb6f972ed54d1bccb0f9fb3e1b",
|
||||
"https://esm.sh/v128/original-fs@1.2.0/denonext/original-fs.mjs": "2b1098818e54d2c6748ff5b0dd9ea5f6a61b4b6d0f63fb625f21773d11cfc667",
|
||||
"https://esm.sh/v128/path-key@3.1.1/denonext/path-key.mjs": "add83c631278b7df9b33ae84e41142db88bb291295bcc27eb4e77a1cbdfa71d0",
|
||||
"https://esm.sh/v128/path-key@4.0.0/denonext/path-key.mjs": "2c2e3922bd0e6e414fa2752ff800bdc6b9208035ce797fa22e49b859f8259417",
|
||||
"https://esm.sh/v128/shebang-command@2.0.0/denonext/shebang-command.mjs": "404e0fb09a782ca9495d53c721bb84b673b7b2e1054e021852143a6b91ca0e4f",
|
||||
"https://esm.sh/v128/shebang-regex@3.0.0/denonext/shebang-regex.mjs": "03983ba59dd2cba9402935e21b46d05f5249364cba9f5757aef23c6c2fea65b9",
|
||||
"https://esm.sh/v128/signal-exit@3.0.7/denonext/signal-exit.mjs": "2a176e5f9b351fa8057213c627a1503d63bf308b64447ef47f1ca6fbb2a91c81",
|
||||
"https://esm.sh/v128/strip-final-newline@3.0.0/denonext/strip-final-newline.mjs": "03d9be4e8a249d63cbbddeb2fb675a1bbbcb335283e604d4ce56c88c90e6f102",
|
||||
"https://esm.sh/v128/tar@6.1.15": "0460339f8aba5f287e8bebe258fe3fe13cb12f85820693f25724f0d98ef1258e",
|
||||
"https://esm.sh/v128/tar@6.1.15/denonext/tar.mjs": "6194d892de8457b3b1f11d5cbacda1d540b453b45e8cb9f5f610abfb3e490b65",
|
||||
"https://esm.sh/v128/tslib@2.6.0/denonext/tslib.mjs": "2215292e6fcf28a7a081eee911f127bb3c44cdd61ff0651e3e384d7a49b4e42b",
|
||||
"https://esm.sh/v128/web-streams-polyfill@3.2.1/denonext/dist/ponyfill.es2018.js": "a2edb52a93494cda06386b3d6a168016b366e78f02c5eff1f94a0240be12ac96",
|
||||
"https://esm.sh/v128/which@2.0.2/denonext/which.mjs": "86bf76e4937edb7fa3464d7bb9a426ef273684d1cefbec5ba5f1bdcb5cafff91",
|
||||
"https://esm.sh/v128/yallist@4.0.0/denonext/yallist.mjs": "61f180d807dda50bac17028eda05d5722a3fecef6e98a9064e2353ea6864fd82",
|
||||
"https://esm.sh/v132/lodash.flatten@4.4.0/denonext/lodash.flatten.mjs": "8e86ab607deea15cc3c1acfb5eae278ecbc5b80f24167b4e8f4c56df3278cd55",
|
||||
"https://esm.sh/v132/stringify-tree@1.1.1/denonext/stringify-tree.mjs": "eaa9333a5219638ad170d12e12603ae00ae80fc8bf02cc112cfec7294e6bcb43"
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
name: Codecov
|
||||
|
||||
# Controls when the action will run. Triggers the workflow on push or pull request
|
||||
# events but only for the master branch
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: denoland/setup-deno@v1
|
||||
with:
|
||||
deno-version: v1.34
|
||||
- name: Create coverage files
|
||||
run: deno test --allow-read --coverage=coverage --lock-write # create coverage files
|
||||
- name: Create coverage report
|
||||
run: deno coverage ./coverage --lcov > coverage.lcov # create coverage report
|
||||
- name: Collect coverage
|
||||
uses: codecov/codecov-action@v3 # upload the report on Codecov
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
with:
|
||||
file: ./coverage.lcov
|
||||
@@ -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
|
||||
@@ -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.
|
||||
@@ -1,19 +0,0 @@
|
||||
Copyright (c) 2023 Tsiry Sandratraina <tsiry.sndr@aol.com>
|
||||
|
||||
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.
|
||||
@@ -1,88 +0,0 @@
|
||||
# Deno Pipeline
|
||||
|
||||
[](https://deno.land/x/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();
|
||||
```
|
||||
@@ -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));
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
];
|
||||
};
|
||||
});
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
import * as GitLab from "./src/gitlab/index.ts";
|
||||
import * as Dagger from "./src/dagger/index.ts";
|
||||
|
||||
export { Dagger, GitLab };
|
||||
@@ -1,4 +0,0 @@
|
||||
import pipeline from "./pipeline.ts";
|
||||
import { fmt, lint, test } from "./jobs.ts";
|
||||
|
||||
export { fmt, lint, pipeline, test };
|
||||
@@ -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<void>
|
||||
| ((
|
||||
client: Client,
|
||||
src?: string,
|
||||
options?: {
|
||||
ignore: string[];
|
||||
}
|
||||
) => Promise<void>);
|
||||
|
||||
export const runnableJobs: Record<Job, JobExec> = {
|
||||
[Job.fmt]: fmt,
|
||||
[Job.lint]: lint,
|
||||
[Job.test]: test,
|
||||
};
|
||||
|
||||
export const jobDescriptions: Record<Job, string> = {
|
||||
[Job.fmt]: "Format your code",
|
||||
[Job.lint]: "Lint your code",
|
||||
[Job.test]: "Run your tests",
|
||||
};
|
||||
@@ -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
|
||||
)
|
||||
);
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
import pipeline from "./pipeline.ts";
|
||||
|
||||
pipeline(".", Deno.args);
|
||||
@@ -1,4 +0,0 @@
|
||||
import pipeline from "./pipeline.ts";
|
||||
import { fmt, lint, test } from "./jobs.ts";
|
||||
|
||||
export { fmt, lint, pipeline, test };
|
||||
@@ -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");
|
||||
@@ -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;
|
||||
@@ -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);
|
||||
});
|
||||
@@ -1,28 +0,0 @@
|
||||
name: Codecov
|
||||
|
||||
# Controls when the action will run. Triggers the workflow on push or pull request
|
||||
# events but only for the master branch
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: denoland/setup-deno@v1
|
||||
with:
|
||||
deno-version: v1.34
|
||||
- name: Create coverage files
|
||||
run: deno test --allow-read --coverage=coverage --lock-write # create coverage files
|
||||
- name: Create coverage report
|
||||
run: deno coverage ./coverage --lcov > coverage.lcov # create coverage report
|
||||
- name: Collect coverage
|
||||
uses: codecov/codecov-action@v3 # upload the report on Codecov
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
with:
|
||||
file: ./coverage.lcov
|
||||
@@ -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
|
||||
@@ -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.
|
||||
@@ -1,19 +0,0 @@
|
||||
Copyright (c) 2023 Tsiry Sandratraina <tsiry.sndr@aol.com>
|
||||
|
||||
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.
|
||||
@@ -1,58 +0,0 @@
|
||||
# Deno Pipeline
|
||||
|
||||
[](https://deno.land/x/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();
|
||||
```
|
||||
@@ -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));
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
67
.fluentci/.fluentci/example/.fluentci/deno.lock
generated
67
.fluentci/.fluentci/example/.fluentci/deno.lock
generated
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
|
||||
61
.fluentci/.fluentci/example/.fluentci/flake.lock
generated
61
.fluentci/.fluentci/example/.fluentci/flake.lock
generated
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
];
|
||||
};
|
||||
});
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
import * as GitLab from "./src/gitlab/index.ts";
|
||||
import * as Dagger from "./src/dagger/index.ts";
|
||||
|
||||
export { Dagger, GitLab };
|
||||
@@ -1,4 +0,0 @@
|
||||
import pipeline from "./pipeline.ts";
|
||||
import { fmt, lint, test } from "./jobs.ts";
|
||||
|
||||
export { fmt, lint, pipeline, test };
|
||||
@@ -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<void>
|
||||
| ((
|
||||
client: Client,
|
||||
src?: string,
|
||||
options?: {
|
||||
ignore: string[];
|
||||
}
|
||||
) => Promise<void>);
|
||||
|
||||
export const runnableJobs: Record<Job, JobExec> = {
|
||||
[Job.fmt]: fmt,
|
||||
[Job.lint]: lint,
|
||||
[Job.test]: test,
|
||||
[Job.deploy]: deploy,
|
||||
};
|
||||
|
||||
export const jobDescriptions: Record<Job, string> = {
|
||||
[Job.fmt]: "Format your code",
|
||||
[Job.lint]: "Lint your code",
|
||||
[Job.test]: "Run your tests",
|
||||
[Job.deploy]: "Deploy your code to Deno Deploy",
|
||||
};
|
||||
@@ -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
|
||||
)
|
||||
);
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
import pipeline from "./pipeline.ts";
|
||||
|
||||
pipeline(".", Deno.args);
|
||||
@@ -1,4 +0,0 @@
|
||||
import pipeline from "./pipeline.ts";
|
||||
import { fmt, lint, test } from "./jobs.ts";
|
||||
|
||||
export { fmt, lint, pipeline, test };
|
||||
@@ -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");
|
||||
@@ -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;
|
||||
@@ -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);
|
||||
});
|
||||
@@ -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
|
||||
```
|
||||
@@ -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: (
|
||||
<body>
|
||||
<img width="64" src="https://dash.deno.com/assets/logo.svg" />
|
||||
<h1>Hello Patricia!</h1>
|
||||
</body>
|
||||
),
|
||||
});
|
||||
|
||||
serve(handler);
|
||||
@@ -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
|
||||
|
||||
61
.fluentci/.fluentci/flake.lock
generated
61
.fluentci/.fluentci/flake.lock
generated
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
];
|
||||
};
|
||||
});
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
import * as GitLab from "./src/gitlab/index.ts";
|
||||
import * as Dagger from "./src/dagger/index.ts";
|
||||
|
||||
export { Dagger, GitLab };
|
||||
@@ -1,4 +0,0 @@
|
||||
import pipeline from "./pipeline.ts";
|
||||
import { fmt, lint, test } from "./jobs.ts";
|
||||
|
||||
export { fmt, lint, pipeline, test };
|
||||
@@ -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<void>
|
||||
| ((
|
||||
client: Client,
|
||||
src?: string,
|
||||
options?: {
|
||||
ignore: string[];
|
||||
}
|
||||
) => Promise<void>);
|
||||
|
||||
export const codecov = upload;
|
||||
|
||||
export const runnableJobs: Record<Job, JobExec> = {
|
||||
[Job.fmt]: fmt,
|
||||
[Job.lint]: lint,
|
||||
[Job.test]: test,
|
||||
[Job.deploy]: deploy,
|
||||
[Job.codecov]: upload,
|
||||
};
|
||||
|
||||
export const jobDescriptions: Record<Job, string> = {
|
||||
[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",
|
||||
};
|
||||
@@ -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
|
||||
)
|
||||
);
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
import pipeline from "./pipeline.ts";
|
||||
|
||||
pipeline(".", Deno.args);
|
||||
@@ -1,52 +0,0 @@
|
||||
import { JobSpec, Workflow } from "fluent_github_actions";
|
||||
|
||||
export function generateYaml() {
|
||||
const workflow = new Workflow("Codecov");
|
||||
|
||||
const push = {
|
||||
branches: ["main"],
|
||||
};
|
||||
|
||||
const setupDagger = `\
|
||||
curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh
|
||||
sudo mv bin/dagger /usr/local/bin
|
||||
dagger version`;
|
||||
|
||||
const tests: JobSpec = {
|
||||
"runs-on": "ubuntu-latest",
|
||||
steps: [
|
||||
{
|
||||
uses: "actions/checkout@v2",
|
||||
},
|
||||
{
|
||||
uses: "denoland/setup-deno@v1",
|
||||
with: {
|
||||
"deno-version": "v1.37",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Setup Fluent CI CLI",
|
||||
run: "deno install -A -r https://cli.fluentci.io -n fluentci",
|
||||
},
|
||||
{
|
||||
name: "Setup Dagger",
|
||||
run: setupDagger,
|
||||
},
|
||||
{
|
||||
name: "Run Dagger Pipelines",
|
||||
run: "dagger run fluentci . fmt lint test",
|
||||
},
|
||||
{
|
||||
name: "Upload to Codecov",
|
||||
run: "dagger run fluentci codecov_pipeline",
|
||||
env: {
|
||||
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}",
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
workflow.on({ push }).jobs({ tests });
|
||||
|
||||
workflow.save(".github/workflows/ci.yml");
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
import { generateYaml } from "./config.ts";
|
||||
|
||||
generateYaml();
|
||||
@@ -1,4 +0,0 @@
|
||||
import pipeline from "./pipeline.ts";
|
||||
import { fmt, lint, test } from "./jobs.ts";
|
||||
|
||||
export { fmt, lint, pipeline, test };
|
||||
@@ -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");
|
||||
@@ -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;
|
||||
@@ -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);
|
||||
});
|
||||
28
.fluentci/.github/workflows/ci.yml
vendored
28
.fluentci/.github/workflows/ci.yml
vendored
@@ -1,28 +0,0 @@
|
||||
# Do not edit this file directly. It is generated by Fluent Github Actions
|
||||
|
||||
name: Codecov
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: denoland/setup-deno@v1
|
||||
with:
|
||||
deno-version: v1.37
|
||||
- name: Setup Fluent CI CLI
|
||||
run: deno install -A -r https://cli.fluentci.io -n fluentci
|
||||
- name: Setup Dagger
|
||||
run: |
|
||||
curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.8 sh
|
||||
sudo mv bin/dagger /usr/local/bin
|
||||
dagger version
|
||||
- name: Run Dagger Pipelines
|
||||
run: dagger run fluentci . fmt lint test
|
||||
- name: Upload to Codecov
|
||||
run: dagger run fluentci codecov_pipeline
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user