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

Hello Patricia!

+ + ), + }); + +serve(handler); diff --git a/example/.fluentci/.fluentci/fixtures/.gitlab-ci.yml b/example/.fluentci/.fluentci/fixtures/.gitlab-ci.yml new file mode 100644 index 0000000..299e4c6 --- /dev/null +++ b/example/.fluentci/.fluentci/fixtures/.gitlab-ci.yml @@ -0,0 +1,19 @@ +# Do not edit this file directly. It is generated by Fluent GitLab CI + +image: denoland/deno:alpine + +fmt: + image: denoland/deno:alpine + script: + - deno fmt --check + +lint: + image: denoland/deno:alpine + script: + - deno lint + +test: + image: denoland/deno:alpine + script: + - deno test + diff --git a/example/.fluentci/.fluentci/flake.lock b/example/.fluentci/.fluentci/flake.lock new file mode 100644 index 0000000..af7453c --- /dev/null +++ b/example/.fluentci/.fluentci/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1687709756, + "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1688910226, + "narHash": "sha256-kLTsFu9CAU2Gb288JhIBN/WlX4UUUDz4WiC/U59nvwk=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "2540432a940aee979be6ccfefba9ea0652c273a0", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "release-23.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/example/.fluentci/.fluentci/flake.nix b/example/.fluentci/.fluentci/flake.nix new file mode 100644 index 0000000..b13ea7d --- /dev/null +++ b/example/.fluentci/.fluentci/flake.nix @@ -0,0 +1,26 @@ +{ + description = "A Nix-flake-based Deno development environment"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/release-23.05"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { + self, + nixpkgs, + flake-utils, + }: + flake-utils.lib.eachDefaultSystem + (system: let + pkgs = import nixpkgs { + inherit system; + }; + in { + devShells.default = pkgs.mkShell { + buildInputs = [ + pkgs.deno + ]; + }; + }); +} \ No newline at end of file diff --git a/example/.fluentci/.fluentci/import_map.json b/example/.fluentci/.fluentci/import_map.json new file mode 100644 index 0000000..12c59ff --- /dev/null +++ b/example/.fluentci/.fluentci/import_map.json @@ -0,0 +1,28 @@ +{ + "imports": { + "@dagger.io/dagger": "https://esm.sh/v128/*@dagger.io/dagger@0.6.3", + "fluent_gitlab_ci": "https://deno.land/x/fluent_gitlab_ci@v0.3.2/mod.ts", + "fluent_github_actions": "https://deno.land/x/fluent_github_actions@v0.1.2/mod.ts", + "url": "node:url", + "readline": "node:readline", + "process": "node:process", + "path": "node:path", + "os": "node:os", + "fs": "node:fs", + "crypto": "node:crypto" + }, + "scopes": { + "https://esm.sh/v128/": { + "@lifeomic/axios-fetch": "https://esm.sh/v128/@lifeomic/axios-fetch@3.0.1", + "adm-zip": "https://esm.sh/v128/adm-zip@0.5.10", + "env-paths": "https://esm.sh/v128/env-paths@3.0.0", + "execa": "https://esm.sh/v128/execa@7.1.1", + "graphql-request": "https://esm.sh/v128/graphql-request@6.1.0", + "graphql-tag": "https://esm.sh/v128/graphql-tag@2.12.6", + "graphql": "https://esm.sh/v128/graphql@16.7.1", + "node-color-log": "https://esm.sh/v128/node-color-log@10.0.2", + "node-fetch": "https://esm.sh/v128/node-fetch@3.3.1", + "tar": "https://esm.sh/v128/tar@6.1.15" + } + } +} \ No newline at end of file diff --git a/example/.fluentci/.fluentci/mod.ts b/example/.fluentci/.fluentci/mod.ts new file mode 100644 index 0000000..6152fb6 --- /dev/null +++ b/example/.fluentci/.fluentci/mod.ts @@ -0,0 +1,4 @@ +import * as GitLab from "./src/gitlab/index.ts"; +import * as Dagger from "./src/dagger/index.ts"; + +export { Dagger, GitLab }; diff --git a/example/.fluentci/.fluentci/src/dagger/index.ts b/example/.fluentci/.fluentci/src/dagger/index.ts new file mode 100644 index 0000000..392c001 --- /dev/null +++ b/example/.fluentci/.fluentci/src/dagger/index.ts @@ -0,0 +1,4 @@ +import pipeline from "./pipeline.ts"; +import { fmt, lint, test } from "./jobs.ts"; + +export { fmt, lint, pipeline, test }; diff --git a/example/.fluentci/.fluentci/src/dagger/jobs.ts b/example/.fluentci/.fluentci/src/dagger/jobs.ts new file mode 100644 index 0000000..862b599 --- /dev/null +++ b/example/.fluentci/.fluentci/src/dagger/jobs.ts @@ -0,0 +1,197 @@ +import Client from "@dagger.io/dagger"; +import { upload } from "https://deno.land/x/codecov_pipeline@v0.1.1/src/dagger/jobs.ts"; +import { withDevbox } from "https://deno.land/x/nix_installer_pipeline@v0.3.6/src/dagger/steps.ts"; +import { existsSync } from "fs"; + +export enum Job { + fmt = "fmt", + lint = "lint", + test = "test", + deploy = "deploy", + codecov = "codecov", +} + +const baseCtr = (client: Client, pipeline: string) => { + if (existsSync("devbox.json")) { + return withDevbox( + client + .pipeline(pipeline) + .container() + .from("alpine:latest") + .withExec(["apk", "update"]) + .withExec(["apk", "add", "bash", "curl"]) + .withMountedCache("/nix", client.cacheVolume("nix")) + .withMountedCache("/etc/nix", client.cacheVolume("nix-etc")) + ); + } + return client.pipeline(pipeline).container().from("denoland/deno:alpine"); +}; + +export const lint = async (client: Client, src = ".") => { + const context = client.host().directory(src); + let command = ["deno", "lint"]; + + if (existsSync("devbox.json")) { + command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; + } + + const ctr = baseCtr(client, Job.lint) + .withDirectory("/app", context, { + exclude: [".git", ".devbox", ".fluentci"], + }) + .withWorkdir("/app") + .withExec(command); + + const result = await ctr.stdout(); + + console.log(result); +}; + +export const fmt = async (client: Client, src = ".") => { + const context = client.host().directory(src); + let command = ["deno", "fmt"]; + + if (existsSync("devbox.json")) { + command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; + } + + const ctr = baseCtr(client, Job.fmt) + .withDirectory("/app", context, { + exclude: [".git", ".devbox", ".fluentci"], + }) + .withWorkdir("/app") + .withExec(command); + + const result = await ctr.stdout(); + + console.log(result); +}; + +export const test = async ( + client: Client, + src = ".", + options: { ignore: string[] } = { ignore: [] } +) => { + const context = client.host().directory(src); + let command = ["deno", "test", "-A", "--coverage=coverage", "--lock-write"]; + + if (options.ignore.length > 0) { + command = command.concat([`--ignore=${options.ignore.join(",")}`]); + } + + if (existsSync("devbox.json")) { + command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; + } + + const ctr = baseCtr(client, Job.test) + .from("denoland/deno:alpine") + .withDirectory("/app", context, { + exclude: [".git", ".devbox", ".fluentci"], + }) + .withWorkdir("/app") + .withMountedCache("/root/.cache/deno", client.cacheVolume("deno-cache")) + .withExec(command) + .withExec(["sh", "-c", "deno coverage ./coverage --lcov > coverage.lcov"]); + + const result = await ctr.stdout(); + + await ctr.file("/app/coverage.lcov").export("./coverage.lcov"); + + console.log(result); +}; + +export const deploy = async (client: Client, src = ".") => { + const context = client.host().directory(src); + let installDeployCtl = [ + "deno", + "install", + "--allow-all", + "--no-check", + "-r", + "-f", + "https://deno.land/x/deploy/deployctl.ts", + ]; + const project = Deno.env.get("DENO_PROJECT"); + const noStatic = Deno.env.get("NO_STATIC"); + const exclude = Deno.env.get("EXCLUDE"); + + let command = ["deployctl", "deploy"]; + + if (noStatic) { + command = command.concat(["--no-static"]); + } + + if (exclude) { + command = command.concat([`--exclude=${exclude}`]); + } + + if (!Deno.env.get("DENO_DEPLOY_TOKEN")) { + throw new Error("DENO_DEPLOY_TOKEN environment variable is not set"); + } + + if (!project) { + throw new Error("DENO_PROJECT environment variable is not set"); + } + + const script = Deno.env.get("DENO_MAIN_SCRIPT") || "main.tsx"; + command = command.concat([`--project=${project}`, script]); + + if (existsSync("devbox.json")) { + command = ["sh", "-c", `devbox run -- ${command.join(" ")}`]; + installDeployCtl = [ + "sh", + "-c", + `devbox run -- ${installDeployCtl.join(" ")}`, + ]; + } + + const ctr = baseCtr(client, Job.deploy) + .from("denoland/deno:alpine") + .withDirectory("/app", context, { + exclude: [".git", ".devbox", ".fluentci"], + }) + .withWorkdir("/app") + .withEnvVariable("PATH", "/root/.deno/bin:$PATH", { expand: true }) + .withEnvVariable("DENO_DEPLOY_TOKEN", Deno.env.get("DENO_DEPLOY_TOKEN")!) + .withEnvVariable( + "DENO_MAIN_SCRIPT", + Deno.env.get("DENO_MAIN_SCRIPT") || "main.tsx" + ) + .withExec(installDeployCtl) + .withExec(command); + + const result = await ctr.stdout(); + + console.log(result); +}; + +export type JobExec = ( + client: Client, + src?: string +) => + | Promise + | (( + client: Client, + src?: string, + options?: { + ignore: string[]; + } + ) => Promise); + +export const codecov = upload; + +export const runnableJobs: Record = { + [Job.fmt]: fmt, + [Job.lint]: lint, + [Job.test]: test, + [Job.deploy]: deploy, + [Job.codecov]: upload, +}; + +export const jobDescriptions: Record = { + [Job.fmt]: "Format your code", + [Job.lint]: "Lint your code", + [Job.test]: "Run your tests", + [Job.deploy]: "Deploy your code to Deno Deploy", + [Job.codecov]: "Upload your code coverage to Codecov", +}; diff --git a/example/.fluentci/.fluentci/src/dagger/list_jobs.ts b/example/.fluentci/.fluentci/src/dagger/list_jobs.ts new file mode 100644 index 0000000..12bb3cb --- /dev/null +++ b/example/.fluentci/.fluentci/src/dagger/list_jobs.ts @@ -0,0 +1,21 @@ +import { brightGreen } from "https://deno.land/std@0.191.0/fmt/colors.ts"; +import { runnableJobs, jobDescriptions, Job } from "./jobs.ts"; +import { stringifyTree } from "https://esm.sh/stringify-tree@1.1.1"; + +const tree = { + name: brightGreen("deno_pipeline"), + children: (Object.keys(runnableJobs) as Job[]).map((job) => ({ + name: jobDescriptions[job] + ? `${brightGreen(job)} - ${jobDescriptions[job]}` + : brightGreen(job), + children: [], + })), +}; + +console.log( + stringifyTree( + tree, + (t) => t.name, + (t) => t.children + ) +); diff --git a/example/.fluentci/.fluentci/src/dagger/pipeline.ts b/example/.fluentci/.fluentci/src/dagger/pipeline.ts new file mode 100644 index 0000000..bad7372 --- /dev/null +++ b/example/.fluentci/.fluentci/src/dagger/pipeline.ts @@ -0,0 +1,27 @@ +import Client, { connect } from "@dagger.io/dagger"; +import * as jobs from "./jobs.ts"; + +const { fmt, lint, test, runnableJobs } = jobs; + +export default function pipeline(src = ".", args: string[] = []) { + connect(async (client: Client) => { + if (args.length > 0) { + await runSpecificJobs(client, args as jobs.Job[]); + return; + } + + await fmt(client, src); + await lint(client, src); + await test(client, src); + }); +} + +async function runSpecificJobs(client: Client, args: jobs.Job[]) { + for (const name of args) { + const job = runnableJobs[name]; + if (!job) { + throw new Error(`Job ${name} not found`); + } + await job(client); + } +} diff --git a/example/.fluentci/.fluentci/src/dagger/runner.ts b/example/.fluentci/.fluentci/src/dagger/runner.ts new file mode 100644 index 0000000..e23879e --- /dev/null +++ b/example/.fluentci/.fluentci/src/dagger/runner.ts @@ -0,0 +1,3 @@ +import pipeline from "./pipeline.ts"; + +pipeline(".", Deno.args); diff --git a/example/.fluentci/.fluentci/src/github/config.ts b/example/.fluentci/.fluentci/src/github/config.ts new file mode 100644 index 0000000..1e6b7a0 --- /dev/null +++ b/example/.fluentci/.fluentci/src/github/config.ts @@ -0,0 +1,52 @@ +import { JobSpec, Workflow } from "fluent_github_actions"; + +export function generateYaml() { + const workflow = new Workflow("Codecov"); + + const push = { + branches: ["main"], + }; + + const setupDagger = `\ + curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh + sudo mv bin/dagger /usr/local/bin + dagger version`; + + const tests: JobSpec = { + "runs-on": "ubuntu-latest", + steps: [ + { + uses: "actions/checkout@v2", + }, + { + uses: "denolib/setup-deno@v2", + with: { + "deno-version": "v1.36", + }, + }, + { + name: "Setup Fluent CI CLI", + run: "deno install -A -r https://cli.fluentci.io -n fluentci", + }, + { + name: "Setup Dagger", + run: setupDagger, + }, + { + name: "Run Dagger Pipelines", + run: "dagger run fluentci . fmt lint test", + }, + { + name: "Upload to Codecov", + run: "dagger run fluentci codecov_pipeline", + env: { + CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}", + }, + }, + ], + }; + + workflow.on({ push }).jobs({ tests }); + + workflow.save(".github/workflows/ci.yml"); +} diff --git a/example/.fluentci/.fluentci/src/github/init.ts b/example/.fluentci/.fluentci/src/github/init.ts new file mode 100644 index 0000000..6097dd5 --- /dev/null +++ b/example/.fluentci/.fluentci/src/github/init.ts @@ -0,0 +1,3 @@ +import { generateYaml } from "./config.ts"; + +generateYaml(); diff --git a/example/.fluentci/.fluentci/src/gitlab/index.ts b/example/.fluentci/.fluentci/src/gitlab/index.ts new file mode 100644 index 0000000..392c001 --- /dev/null +++ b/example/.fluentci/.fluentci/src/gitlab/index.ts @@ -0,0 +1,4 @@ +import pipeline from "./pipeline.ts"; +import { fmt, lint, test } from "./jobs.ts"; + +export { fmt, lint, pipeline, test }; diff --git a/example/.fluentci/.fluentci/src/gitlab/jobs.ts b/example/.fluentci/.fluentci/src/gitlab/jobs.ts new file mode 100644 index 0000000..46be50c --- /dev/null +++ b/example/.fluentci/.fluentci/src/gitlab/jobs.ts @@ -0,0 +1,9 @@ +import { Job } from "https://deno.land/x/fluent_gitlab_ci@v0.3.2/mod.ts"; + +export const fmt = new Job() + .image("denoland/deno:alpine") + .script("deno fmt --check"); + +export const lint = new Job().image("denoland/deno:alpine").script("deno lint"); + +export const test = new Job().image("denoland/deno:alpine").script("deno test"); diff --git a/example/.fluentci/.fluentci/src/gitlab/pipeline.ts b/example/.fluentci/.fluentci/src/gitlab/pipeline.ts new file mode 100644 index 0000000..366de64 --- /dev/null +++ b/example/.fluentci/.fluentci/src/gitlab/pipeline.ts @@ -0,0 +1,10 @@ +import { GitlabCI } from "https://deno.land/x/fluent_gitlab_ci@v0.3.2/mod.ts"; +import { fmt, lint, test } from "./jobs.ts"; + +const pipeline = new GitlabCI() + .image("denoland/deno:alpine") + .addJob("fmt", fmt) + .addJob("lint", lint) + .addJob("test", test); + +export default pipeline; diff --git a/example/.fluentci/.fluentci/src/gitlab/pipeline_test.ts b/example/.fluentci/.fluentci/src/gitlab/pipeline_test.ts new file mode 100644 index 0000000..ca24710 --- /dev/null +++ b/example/.fluentci/.fluentci/src/gitlab/pipeline_test.ts @@ -0,0 +1,8 @@ +import pipeline from "./pipeline.ts"; +import { assertEquals } from "https://deno.land/std@0.191.0/testing/asserts.ts"; + +Deno.test(function pipelineTest() { + const expected = Deno.readTextFileSync("./fixtures/.gitlab-ci.yml"); + const actual = pipeline.toString(); + assertEquals(actual, expected); +}); diff --git a/example/.fluentci/.github/workflows/ci.yml b/example/.fluentci/.github/workflows/ci.yml index 3ac7dd7..faabe80 100644 --- a/example/.fluentci/.github/workflows/ci.yml +++ b/example/.fluentci/.github/workflows/ci.yml @@ -1,28 +1,28 @@ -name: Codecov +# Do not edit this file directly. It is generated by Fluent Github Actions -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch +name: Codecov on: push: - branches: [main] - pull_request: - branches: [main] - + branches: + - main jobs: - test: + tests: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: denolib/setup-deno@v2 with: - deno-version: v1.34 - - name: Create coverage files - run: deno test --allow-read --coverage=coverage --lock-write # create coverage files - - name: Create coverage report - run: deno coverage ./coverage --lcov > coverage.lcov # create coverage report - - name: Collect coverage - uses: codecov/codecov-action@v3 # upload the report on Codecov + deno-version: v1.36 + - name: Setup Fluent CI CLI + run: deno install -A -r https://cli.fluentci.io -n fluentci + - name: Setup Dagger + run: | + curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh + sudo mv bin/dagger /usr/local/bin + dagger version + - name: Run Dagger Pipelines + run: dagger run fluentci . fmt lint test + - name: Upload to Codecov + run: dagger run fluentci codecov_pipeline env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - with: - file: ./coverage.lcov diff --git a/example/.fluentci/README.md b/example/.fluentci/README.md index 042eeea..f058863 100644 --- a/example/.fluentci/README.md +++ b/example/.fluentci/README.md @@ -4,142 +4,46 @@ ![deno compatibility](https://shield.deno.dev/deno/^1.34) [![](https://img.shields.io/codecov/c/gh/fluent-ci-templates/android-pipeline)](https://codecov.io/gh/fluent-ci-templates/android-pipeline) -A ready-to-use GitLab CI Pipeline and Jobs for your Android projects. +A ready-to-use CI/CD Pipeline for your Android projects. ## ๐Ÿš€ Usage -Quick start: +Run the following command: -```ts -import { GitLab } from "https://deno.land/x/android_pipeline/mod.ts"; +```bash +dagger run fluentci android_pipeline +``` -const { pipeline } = GitLab; +Or, if you want to use it as a template: -pipeline.write(); // Write the pipeline to the file .gitlab-ci.yml +```bash +fluentci init -t android ``` -Or, if you want to use the predefined jobs: +This will create a `.fluentci` folder in your project. -```ts -import { GitlabCI } from "https://deno.land/x/fluent_gitlab_ci/mod.ts"; -import { GitLab } from "https://deno.land/x/android_pipeline/mod.ts"; - -const { assembleDebug, debugTests, lintDebug } = GitLab; - -const const pipeline = new GitlabCI() - .image("openjdk:11-jdk") - .variables({ - ANDROID_COMPILE_SDK: "30", - ANDROID_BUILD_TOOLS: "30.0.3", - ANDROID_SDK_TOOLS: "7583922", - }) - .comment("Packages installation before running script") - .beforeScript( - ` - apt-get --quiet update --yes - apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1 - export ANDROID_HOME="\${PWD}/android-home" - install -d $ANDROID_HOME - wget --output-document=$ANDROID_HOME/cmdline-tools.zip https://dl.google.com/android/repository/commandlinetools-linux-\${ANDROID_SDK_TOOLS}_latest.zip - pushd $ANDROID_HOME - unzip -d cmdline-tools cmdline-tools.zip - pushd cmdline-tools - mv cmdline-tools tools || true - popd - popd - export PATH=$PATH:\${ANDROID_HOME}/cmdline-tools/tools/bin/ - sdkmanager --version - yes | sdkmanager --licenses || true - sdkmanager "platforms;android-\${ANDROID_COMPILE_SDK}" - sdkmanager "platform-tools" - sdkmanager "build-tools;\${ANDROID_BUILD_TOOLS}" - chmod +x ./gradlew - ` - ) - .comment("Basic android and gradle stuff") - .comment("Check linting") - .addJob("lintDebug", lintDebug) - .comment("Make Project") - .addJob("assembleDebug", assembleDebug) - .comment("Run all tests, if any fails, interrupt the pipeline(fail it)") - .addJob("debugTests", debugTests); - -pipeline.write(); // Write the pipeline to the file .gitlab-ci.yml -``` +Now you can run the pipeline with: -It will generate the following `.gitlab-ci.yml` file: - -```yaml -# Do not edit this file directly. It is generated by Fluent GitLab CI - -image: openjdk:11-jdk - -variables: - ANDROID_COMPILE_SDK: "30" - ANDROID_BUILD_TOOLS: 30.0.3 - ANDROID_SDK_TOOLS: "7583922" - -# Packages installation before running script -before_script: - - apt-get --quiet update --yes - - apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1 - - export ANDROID_HOME="${PWD}/android-home" - - install -d $ANDROID_HOME - - wget --output-document=$ANDROID_HOME/cmdline-tools.zip https://dl.google.com/android/repository/commandlinetools-linux-${ANDROID_SDK_TOOLS}_latest.zip - - pushd $ANDROID_HOME - - unzip -d cmdline-tools cmdline-tools.zip - - pushd cmdline-tools - - mv cmdline-tools tools || true - - popd - - popd - - export PATH=$PATH:${ANDROID_HOME}/cmdline-tools/tools/bin/ - - sdkmanager --version - - yes | sdkmanager --licenses || true - - sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}" - - sdkmanager "platform-tools" - - sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}" - - chmod +x ./gradlew - -# Basic android and gradle stuff -# Check linting -lintDebug: - interruptible: true - stage: build - script: - - ./gradlew -Pci --console=plain :app:lintDebug -PbuildDir=lint - -# Make Project -assembleDebug: - interruptible: true - stage: build - script: - - ./gradlew assembleDebug - artifacts: - paths: - - app/build/outputs/ - -# Run all tests, if any fails, interrupt the pipeline(fail it) -debugTests: - interruptible: true - stage: test - script: - - ./gradlew -Pci --console=plain :app:testDebug +```bash +dagger run fluentci . ``` -## ๐Ÿงช Advanced Usage +## Jobs -This package also provides a ready-to-use pipeline for -[Dagger](https://dagger.io/), just run the following command on your Android -project: +| Job | Description | +| -------------- | --------------------- | +| lintDebug | Lint your code | +| assembleDebug | generate apk (debug) | +| debugTests | Run your tests | +| assembleRelease| generate apk (release)| +| bundleRelease | generate aab (release)| -```sh -dagger run deno run -A https://deno.land/x/android_pipeline/ci.ts -``` +## Programmatic usage -Or, if you want to use the predefined jobs: +You can also use this pipeline programmatically: ```ts -import Client, { connect } from "@dagger.io/dagger"; +import { Client, connect } from "https://esm.sh/@dagger.io/dagger@0.8.1"; import { Dagger } from "https://deno.land/x/android_pipeline/mod.ts"; const { lintDebug, assembleDebug, debugTests } = Dagger; diff --git a/example/.fluentci/deno.json b/example/.fluentci/deno.json index add6a0b..d976349 100644 --- a/example/.fluentci/deno.json +++ b/example/.fluentci/deno.json @@ -4,5 +4,14 @@ "esm:add": "deno run -A https://esm.sh/v128 add", "esm:update": "deno run -A https://esm.sh/v128 update", "esm:remove": "deno run -A https://esm.sh/v128 remove" + }, + "fmt": { + "exclude": ["example/", ".fluentci/"] + }, + "lint": { + "exclude": ["example/", ".fluentci/"] + }, + "test": { + "exclude": ["example/", ".fluentci/"] } } diff --git a/example/.fluentci/deno.lock b/example/.fluentci/deno.lock index fb8508a..9ecd5c6 100644 --- a/example/.fluentci/deno.lock +++ b/example/.fluentci/deno.lock @@ -8,15 +8,18 @@ "https://deno.land/std@0.191.0/testing/_diff.ts": "1a3c044aedf77647d6cac86b798c6417603361b66b54c53331b312caeb447aea", "https://deno.land/std@0.191.0/testing/_format.ts": "a69126e8a469009adf4cf2a50af889aca364c349797e63174884a52ff75cf4c7", "https://deno.land/std@0.191.0/testing/asserts.ts": "e16d98b4d73ffc4ed498d717307a12500ae4f2cbe668f1a215632d19fcffc22f", + "https://deno.land/x/fluent_github_actions@v0.1.2/mod.ts": "dc62b622791da77bc27f68e33cba618983a0770a9a12dcc9e0f9a61161bb90e5", + "https://deno.land/x/fluent_github_actions@v0.1.2/src/event.ts": "c31430af085682cb4ad522c655a8a0800a3ab8b8aec7c979d60c909051d853b0", + "https://deno.land/x/fluent_github_actions@v0.1.2/src/job_spec.ts": "ee7af83e75285b4776ff4f9e14764187737178b4abc6c277da1c32491c41dfca", + "https://deno.land/x/fluent_github_actions@v0.1.2/src/step_spec.ts": "3207071b5dee8487f36fe4ea1881e8fd3b77c472c965c20a14093a3c919af9af", + "https://deno.land/x/fluent_github_actions@v0.1.2/src/workflow.ts": "488556e230fdeeb3a5b0d0bf548c570606aa356b0a7f667ea1d031d3263eb566", + "https://deno.land/x/fluent_github_actions@v0.1.2/src/workflow_spec.ts": "3ca9e565dc1dedd0531e0b852d50b9a3853a1ad35f2010760e0326590b80fa43", "https://deno.land/x/fluent_gitlab_ci@v0.3.2/mod.ts": "3becefe569f5c9814dffa1b534794a42b948481753a5903fa1b48d5337206ced", "https://deno.land/x/fluent_gitlab_ci@v0.3.2/src/environment.ts": "f12ee4fb50e5100fccec29dc1d35aa430bfe8373e84286a8ab9f7b8e178f14e3", "https://deno.land/x/fluent_gitlab_ci@v0.3.2/src/gitlabci.ts": "85d2335622c2def4a9554a9d8b8de4e62156f5d76d59a553e157bab4e6b6591f", "https://deno.land/x/fluent_gitlab_ci@v0.3.2/src/gitlabci_spec.ts": "b60f40ecf26d243db2391aee70fdf71b133de3faaf789052020f58f98cf1b500", "https://deno.land/x/fluent_gitlab_ci@v0.3.2/src/index.ts": "b5e374a24e3bca1d6fead0861f2c1b1e09e087a17e59297263f681ee71c972fe", "https://deno.land/x/fluent_gitlab_ci@v0.3.2/src/job.ts": "a1ddf8d37ca33239de9d2c61f98835e585f6671748b37af8d647ebba5e1a9974", - "https://deno.land/x/nix_installer_pipeline@v0.3.3/src/dagger/steps.ts": "05ef2931080fe9771f27f322a6ace921bf3df8143b5599cd92409fe25568e613", - "https://deno.land/x/nix_installer_pipeline@v0.3.4/src/dagger/steps.ts": "aec120f6cbf4a5ea6621b13444e041ce682c8e50b550575541aca1d563cff097", - "https://deno.land/x/nix_installer_pipeline@v0.3.5/src/dagger/steps.ts": "37aaf4015ddea4de0fc23af6ed8068aa500b44eba39cb6f5862d350de04d06d5", "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", @@ -73,10 +76,10 @@ "https://esm.sh/v128/web-streams-polyfill@3.2.1/denonext/dist/ponyfill.es2018.js": "a2edb52a93494cda06386b3d6a168016b366e78f02c5eff1f94a0240be12ac96", "https://esm.sh/v128/which@2.0.2/denonext/which.mjs": "86bf76e4937edb7fa3464d7bb9a426ef273684d1cefbec5ba5f1bdcb5cafff91", "https://esm.sh/v128/yallist@4.0.0/denonext/yallist.mjs": "61f180d807dda50bac17028eda05d5722a3fecef6e98a9064e2353ea6864fd82", - "https://esm.sh/v128/yaml@2.3.1/denonext/yaml.mjs": "71f677b4bfc69271af9d98db5194e354f9a1863955e208e26d32a9ef78bd89f5", "https://esm.sh/v130/lodash.flatten@4.4.0/denonext/lodash.flatten.mjs": "8e86ab607deea15cc3c1acfb5eae278ecbc5b80f24167b4e8f4c56df3278cd55", "https://esm.sh/v130/stringify-tree@1.1.1/denonext/stringify-tree.mjs": "40a9d40e0282b5432302a3da68b88aa11685bc0b8a0b70246168deed5c5773fe", - "https://esm.sh/yaml@v2.3.1": "8ef3aee065e93b03cebf8fd5a3418bc30131344b7f2b8c8ae27bf9f277416087" + "https://esm.sh/v131/yaml@2.3.1/denonext/yaml.mjs": "71f677b4bfc69271af9d98db5194e354f9a1863955e208e26d32a9ef78bd89f5", + "https://esm.sh/yaml@v2.3.1": "1fe2490feb3d9c6d2c71c64dbdbed90acd4164b00628b3c68a311b6731ca38b5" }, "npm": { "specifiers": { diff --git a/example/.fluentci/example/.fluentci/.devcontainer/devcontainer.json b/example/.fluentci/example/.fluentci/.devcontainer/devcontainer.json new file mode 100644 index 0000000..39a38ae --- /dev/null +++ b/example/.fluentci/example/.fluentci/.devcontainer/devcontainer.json @@ -0,0 +1,25 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/debian +{ + "name": "Debian", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/base:bullseye", + "features": { + "ghcr.io/devcontainers/features/github-cli:1": {}, + "ghcr.io/devcontainers/features/nix:1": {} + }, + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "nix develop --experimental-features \"nix-command flakes\"" + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/example/.fluentci/example/.fluentci/.github/workflows/ci.yml b/example/.fluentci/example/.fluentci/.github/workflows/ci.yml new file mode 100644 index 0000000..3ac7dd7 --- /dev/null +++ b/example/.fluentci/example/.fluentci/.github/workflows/ci.yml @@ -0,0 +1,28 @@ +name: Codecov + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: denolib/setup-deno@v2 + with: + deno-version: v1.34 + - name: Create coverage files + run: deno test --allow-read --coverage=coverage --lock-write # create coverage files + - name: Create coverage report + run: deno coverage ./coverage --lcov > coverage.lcov # create coverage report + - name: Collect coverage + uses: codecov/codecov-action@v3 # upload the report on Codecov + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + with: + file: ./coverage.lcov diff --git a/example/.fluentci/example/.fluentci/.vscode/settings.json b/example/.fluentci/example/.fluentci/.vscode/settings.json new file mode 100644 index 0000000..cbac569 --- /dev/null +++ b/example/.fluentci/example/.fluentci/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "deno.enable": true +} diff --git a/example/.fluentci/example/.fluentci/CODE_OF_CONDUCT.md b/example/.fluentci/example/.fluentci/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..9914103 --- /dev/null +++ b/example/.fluentci/example/.fluentci/CODE_OF_CONDUCT.md @@ -0,0 +1,132 @@ +# 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/android-pipeline/issues). +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or permanent +ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the +community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.1, available at +[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. + +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at +[https://www.contributor-covenant.org/translations][translations]. + +[homepage]: https://www.contributor-covenant.org +[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html +[Mozilla CoC]: https://github.com/mozilla/diversity +[FAQ]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations diff --git a/example/.fluentci/example/.fluentci/CONTRIBUTING.md b/example/.fluentci/example/.fluentci/CONTRIBUTING.md new file mode 100644 index 0000000..e50de72 --- /dev/null +++ b/example/.fluentci/example/.fluentci/CONTRIBUTING.md @@ -0,0 +1,70 @@ +# Contributing Guidelines + +Thank you for your interest in contributing to our project. Whether it's a bug +report, new feature, correction, or additional documentation, we greatly value +feedback and contributions from our community. + +Please read through this document before submitting any issues or pull requests +to ensure we have all the necessary information to effectively respond to your +bug report or contribution. + +## Reporting Bugs/Feature Requests + +We welcome you to use the GitHub issue tracker to report bugs or suggest +features. + +When filing an issue, please check existing open, or recently closed, issues to +make sure somebody else hasn't already reported the issue. Please try to include +as much information as you can. Details like these are incredibly useful: + +- A reproducible test case or series of steps +- The version of our code being used +- Any modifications you've made relevant to the bug +- Anything unusual about your environment or deployment + +## Contributing via Pull Requests + +Contributions via pull requests are much appreciated. Before sending us a pull +request, please ensure that: + +1. You are working against the latest source on the _master_ branch. +2. You check existing open, and recently merged, pull requests to make sure + someone else hasn't addressed the problem already. +3. You open an issue to discuss any significant work - we would hate for your + time to be wasted. + +To send us a pull request, please: + +1. Fork the repository. +2. Modify the source; please focus on the specific change you are contributing. + If you also reformat all the code, it will be hard for us to focus on your + change. +3. Ensure local tests pass. +4. Commit to your fork using clear commit messages. +5. Send us a pull request, answering any default questions in the pull request + interface. +6. Pay attention to any automated CI failures reported in the pull request, and + stay involved in the conversation. + +GitHub provides additional document on +[forking a repository](https://help.github.com/articles/fork-a-repo/) and +[creating a pull request](https://help.github.com/articles/creating-a-pull-request/). + +## Finding contributions to work on + +Looking at the existing issues is a great way to find something to contribute +on. As our projects, by default, use the default GitHub issue labels +(enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any +'help wanted' issues is a great place to start. + +## Code of Conduct + +This project has adopted the +[Contributor Covenant](https://www.contributor-covenant.org/), version 2.1, +available at +https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. + +## Licensing + +See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to +confirm the licensing of your contribution. diff --git a/example/.fluentci/example/.fluentci/LICENSE b/example/.fluentci/example/.fluentci/LICENSE new file mode 100644 index 0000000..d9ab36a --- /dev/null +++ b/example/.fluentci/example/.fluentci/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2023 Tsiry Sandratraina + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/example/.fluentci/example/.fluentci/README.md b/example/.fluentci/example/.fluentci/README.md new file mode 100644 index 0000000..042eeea --- /dev/null +++ b/example/.fluentci/example/.fluentci/README.md @@ -0,0 +1,156 @@ +# Android Pipeline + +[![deno module](https://shield.deno.dev/x/android_pipeline)](https://deno.land/x/android_pipeline) +![deno compatibility](https://shield.deno.dev/deno/^1.34) +[![](https://img.shields.io/codecov/c/gh/fluent-ci-templates/android-pipeline)](https://codecov.io/gh/fluent-ci-templates/android-pipeline) + +A ready-to-use GitLab CI Pipeline and Jobs for your Android projects. + +## ๐Ÿš€ Usage + +Quick start: + +```ts +import { GitLab } from "https://deno.land/x/android_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/android_pipeline/mod.ts"; + +const { assembleDebug, debugTests, lintDebug } = GitLab; + +const const pipeline = new GitlabCI() + .image("openjdk:11-jdk") + .variables({ + ANDROID_COMPILE_SDK: "30", + ANDROID_BUILD_TOOLS: "30.0.3", + ANDROID_SDK_TOOLS: "7583922", + }) + .comment("Packages installation before running script") + .beforeScript( + ` + apt-get --quiet update --yes + apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1 + export ANDROID_HOME="\${PWD}/android-home" + install -d $ANDROID_HOME + wget --output-document=$ANDROID_HOME/cmdline-tools.zip https://dl.google.com/android/repository/commandlinetools-linux-\${ANDROID_SDK_TOOLS}_latest.zip + pushd $ANDROID_HOME + unzip -d cmdline-tools cmdline-tools.zip + pushd cmdline-tools + mv cmdline-tools tools || true + popd + popd + export PATH=$PATH:\${ANDROID_HOME}/cmdline-tools/tools/bin/ + sdkmanager --version + yes | sdkmanager --licenses || true + sdkmanager "platforms;android-\${ANDROID_COMPILE_SDK}" + sdkmanager "platform-tools" + sdkmanager "build-tools;\${ANDROID_BUILD_TOOLS}" + chmod +x ./gradlew + ` + ) + .comment("Basic android and gradle stuff") + .comment("Check linting") + .addJob("lintDebug", lintDebug) + .comment("Make Project") + .addJob("assembleDebug", assembleDebug) + .comment("Run all tests, if any fails, interrupt the pipeline(fail it)") + .addJob("debugTests", debugTests); + +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: openjdk:11-jdk + +variables: + ANDROID_COMPILE_SDK: "30" + ANDROID_BUILD_TOOLS: 30.0.3 + ANDROID_SDK_TOOLS: "7583922" + +# Packages installation before running script +before_script: + - apt-get --quiet update --yes + - apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1 + - export ANDROID_HOME="${PWD}/android-home" + - install -d $ANDROID_HOME + - wget --output-document=$ANDROID_HOME/cmdline-tools.zip https://dl.google.com/android/repository/commandlinetools-linux-${ANDROID_SDK_TOOLS}_latest.zip + - pushd $ANDROID_HOME + - unzip -d cmdline-tools cmdline-tools.zip + - pushd cmdline-tools + - mv cmdline-tools tools || true + - popd + - popd + - export PATH=$PATH:${ANDROID_HOME}/cmdline-tools/tools/bin/ + - sdkmanager --version + - yes | sdkmanager --licenses || true + - sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}" + - sdkmanager "platform-tools" + - sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}" + - chmod +x ./gradlew + +# Basic android and gradle stuff +# Check linting +lintDebug: + interruptible: true + stage: build + script: + - ./gradlew -Pci --console=plain :app:lintDebug -PbuildDir=lint + +# Make Project +assembleDebug: + interruptible: true + stage: build + script: + - ./gradlew assembleDebug + artifacts: + paths: + - app/build/outputs/ + +# Run all tests, if any fails, interrupt the pipeline(fail it) +debugTests: + interruptible: true + stage: test + script: + - ./gradlew -Pci --console=plain :app:testDebug +``` + +## ๐Ÿงช Advanced Usage + +This package also provides a ready-to-use pipeline for +[Dagger](https://dagger.io/), just run the following command on your Android +project: + +```sh +dagger run deno run -A https://deno.land/x/android_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/android_pipeline/mod.ts"; + +const { lintDebug, assembleDebug, debugTests } = Dagger; + +function pipeline(src = ".") { + connect(async (client: Client) => { + await lintDebug(client, src); + await assembleDebug(client, src); + await debugTests(client, src); + }); +} + +pipeline(); +``` diff --git a/example/.fluentci/example/.fluentci/ci.ts b/example/.fluentci/example/.fluentci/ci.ts new file mode 100644 index 0000000..1bbf4a6 --- /dev/null +++ b/example/.fluentci/example/.fluentci/ci.ts @@ -0,0 +1,12 @@ +const command = new Deno.Command(Deno.execPath(), { + args: [ + "run", + "-A", + "--import-map=https://deno.land/x/android_pipeline/import_map.json", + "https://deno.land/x/android_pipeline/src/dagger/runner.ts", + ], +}); + +const { stdout } = await command.output(); + +console.log(new TextDecoder().decode(stdout)); diff --git a/example/.fluentci/example/.fluentci/deno.json b/example/.fluentci/example/.fluentci/deno.json new file mode 100644 index 0000000..add6a0b --- /dev/null +++ b/example/.fluentci/example/.fluentci/deno.json @@ -0,0 +1,8 @@ +{ + "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" + } +} diff --git a/example/.fluentci/example/.fluentci/deno.lock b/example/.fluentci/example/.fluentci/deno.lock new file mode 100644 index 0000000..fb8508a --- /dev/null +++ b/example/.fluentci/example/.fluentci/deno.lock @@ -0,0 +1,92 @@ +{ + "version": "2", + "remote": { + "https://deno.land/std@0.150.0/media_types/_util.ts": "ce9b4fc4ba1c447dafab619055e20fd88236ca6bdd7834a21f98bd193c3fbfa1", + "https://deno.land/std@0.150.0/media_types/mod.ts": "2d4b6f32a087029272dc59e0a55ae3cc4d1b27b794ccf528e94b1925795b3118", + "https://deno.land/std@0.150.0/media_types/vendor/mime-db.v1.52.0.ts": "724cee25fa40f1a52d3937d6b4fbbfdd7791ff55e1b7ac08d9319d5632c7f5af", + "https://deno.land/std@0.191.0/fmt/colors.ts": "d67e3cd9f472535241a8e410d33423980bec45047e343577554d3356e1f0ef4e", + "https://deno.land/std@0.191.0/testing/_diff.ts": "1a3c044aedf77647d6cac86b798c6417603361b66b54c53331b312caeb447aea", + "https://deno.land/std@0.191.0/testing/_format.ts": "a69126e8a469009adf4cf2a50af889aca364c349797e63174884a52ff75cf4c7", + "https://deno.land/std@0.191.0/testing/asserts.ts": "e16d98b4d73ffc4ed498d717307a12500ae4f2cbe668f1a215632d19fcffc22f", + "https://deno.land/x/fluent_gitlab_ci@v0.3.2/mod.ts": "3becefe569f5c9814dffa1b534794a42b948481753a5903fa1b48d5337206ced", + "https://deno.land/x/fluent_gitlab_ci@v0.3.2/src/environment.ts": "f12ee4fb50e5100fccec29dc1d35aa430bfe8373e84286a8ab9f7b8e178f14e3", + "https://deno.land/x/fluent_gitlab_ci@v0.3.2/src/gitlabci.ts": "85d2335622c2def4a9554a9d8b8de4e62156f5d76d59a553e157bab4e6b6591f", + "https://deno.land/x/fluent_gitlab_ci@v0.3.2/src/gitlabci_spec.ts": "b60f40ecf26d243db2391aee70fdf71b133de3faaf789052020f58f98cf1b500", + "https://deno.land/x/fluent_gitlab_ci@v0.3.2/src/index.ts": "b5e374a24e3bca1d6fead0861f2c1b1e09e087a17e59297263f681ee71c972fe", + "https://deno.land/x/fluent_gitlab_ci@v0.3.2/src/job.ts": "a1ddf8d37ca33239de9d2c61f98835e585f6671748b37af8d647ebba5e1a9974", + "https://deno.land/x/nix_installer_pipeline@v0.3.3/src/dagger/steps.ts": "05ef2931080fe9771f27f322a6ace921bf3df8143b5599cd92409fe25568e613", + "https://deno.land/x/nix_installer_pipeline@v0.3.4/src/dagger/steps.ts": "aec120f6cbf4a5ea6621b13444e041ce682c8e50b550575541aca1d563cff097", + "https://deno.land/x/nix_installer_pipeline@v0.3.5/src/dagger/steps.ts": "37aaf4015ddea4de0fc23af6ed8068aa500b44eba39cb6f5862d350de04d06d5", + "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/v128/yaml@2.3.1/denonext/yaml.mjs": "71f677b4bfc69271af9d98db5194e354f9a1863955e208e26d32a9ef78bd89f5", + "https://esm.sh/v130/lodash.flatten@4.4.0/denonext/lodash.flatten.mjs": "8e86ab607deea15cc3c1acfb5eae278ecbc5b80f24167b4e8f4c56df3278cd55", + "https://esm.sh/v130/stringify-tree@1.1.1/denonext/stringify-tree.mjs": "40a9d40e0282b5432302a3da68b88aa11685bc0b8a0b70246168deed5c5773fe", + "https://esm.sh/yaml@v2.3.1": "8ef3aee065e93b03cebf8fd5a3418bc30131344b7f2b8c8ae27bf9f277416087" + }, + "npm": { + "specifiers": { + "@types/node": "@types/node@18.16.19" + }, + "packages": { + "@types/node@18.16.19": { + "integrity": "sha512-IXl7o+R9iti9eBW4Wg2hx1xQDig183jj7YLn8F7udNceyfkbn1ZxmzZXuak20gR40D7pIkIY1kYGx5VIGbaHKA==", + "dependencies": {} + } + } + } +} diff --git a/example/.fluentci/example/.fluentci/example/.gitignore b/example/.fluentci/example/.fluentci/example/.gitignore new file mode 100644 index 0000000..7f1082f --- /dev/null +++ b/example/.fluentci/example/.fluentci/example/.gitignore @@ -0,0 +1,17 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx +local.properties +/lint +/app/lint \ No newline at end of file diff --git a/example/.fluentci/example/.fluentci/example/README.md b/example/.fluentci/example/.fluentci/example/README.md new file mode 100644 index 0000000..2e532fa --- /dev/null +++ b/example/.fluentci/example/.fluentci/example/README.md @@ -0,0 +1,7 @@ +# Android Project + Android Pipeline + +Run the following commands to run Android Pipeline on this project: + +```bash +dagger run deno run -A https://deno.land/x/android_pipeline/ci.ts +``` diff --git a/example/.fluentci/example/.fluentci/example/app/.gitignore b/example/.fluentci/example/.fluentci/example/app/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/example/.fluentci/example/.fluentci/example/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/example/.fluentci/example/.fluentci/example/app/build.gradle b/example/.fluentci/example/.fluentci/example/app/build.gradle new file mode 100644 index 0000000..3be4142 --- /dev/null +++ b/example/.fluentci/example/.fluentci/example/app/build.gradle @@ -0,0 +1,67 @@ +plugins { + id 'com.android.application' + id 'org.jetbrains.kotlin.android' +} + +android { + namespace 'com.example.demo' + compileSdk 33 + + defaultConfig { + applicationId "com.example.demo" + minSdk 24 + targetSdk 33 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + vectorDrawables { + useSupportLibrary true + } + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = '1.8' + } + buildFeatures { + compose true + } + composeOptions { + kotlinCompilerExtensionVersion '1.3.2' + } + packagingOptions { + resources { + excludes += '/META-INF/{AL2.0,LGPL2.1}' + } + } +} + +dependencies { + + implementation 'androidx.core:core-ktx:1.8.0' + implementation platform('org.jetbrains.kotlin:kotlin-bom:1.8.0') + implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1' + implementation 'androidx.activity:activity-compose:1.5.1' + implementation platform('androidx.compose:compose-bom:2022.10.00') + implementation 'androidx.compose.ui:ui' + implementation 'androidx.compose.ui:ui-graphics' + implementation 'androidx.compose.ui:ui-tooling-preview' + implementation 'androidx.compose.material3:material3' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.3' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' + androidTestImplementation platform('androidx.compose:compose-bom:2022.10.00') + androidTestImplementation 'androidx.compose.ui:ui-test-junit4' + debugImplementation 'androidx.compose.ui:ui-tooling' + debugImplementation 'androidx.compose.ui:ui-test-manifest' +} \ No newline at end of file diff --git a/example/.fluentci/example/.fluentci/example/app/proguard-rules.pro b/example/.fluentci/example/.fluentci/example/app/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/example/.fluentci/example/.fluentci/example/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/example/.fluentci/example/.fluentci/example/app/src/androidTest/java/com/example/demo/ExampleInstrumentedTest.kt b/example/.fluentci/example/.fluentci/example/app/src/androidTest/java/com/example/demo/ExampleInstrumentedTest.kt new file mode 100644 index 0000000..4586e1b --- /dev/null +++ b/example/.fluentci/example/.fluentci/example/app/src/androidTest/java/com/example/demo/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package com.example.demo + +import androidx.test.platform.app.InstrumentationRegistry +import androidx.test.ext.junit.runners.AndroidJUnit4 + +import org.junit.Test +import org.junit.runner.RunWith + +import org.junit.Assert.* + +/** + * Instrumented test, which will execute on an Android device. + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +@RunWith(AndroidJUnit4::class) +class ExampleInstrumentedTest { + @Test + fun useAppContext() { + // Context of the app under test. + val appContext = InstrumentationRegistry.getInstrumentation().targetContext + assertEquals("com.example.demo", appContext.packageName) + } +} \ No newline at end of file diff --git a/example/.fluentci/example/.fluentci/example/app/src/main/AndroidManifest.xml b/example/.fluentci/example/.fluentci/example/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..2df04d5 --- /dev/null +++ b/example/.fluentci/example/.fluentci/example/app/src/main/AndroidManifest.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/example/.fluentci/example/.fluentci/example/app/src/main/java/com/example/demo/MainActivity.kt b/example/.fluentci/example/.fluentci/example/app/src/main/java/com/example/demo/MainActivity.kt new file mode 100644 index 0000000..743acb5 --- /dev/null +++ b/example/.fluentci/example/.fluentci/example/app/src/main/java/com/example/demo/MainActivity.kt @@ -0,0 +1,43 @@ +package com.example.demo + +import android.os.Bundle +import androidx.activity.ComponentActivity +import androidx.activity.compose.setContent +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.tooling.preview.Preview +import com.example.demo.ui.theme.DemoTheme + +class MainActivity : ComponentActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContent { + DemoTheme { + // A surface container using the 'background' color from the theme + Surface(modifier = Modifier.fillMaxSize(), color = MaterialTheme.colorScheme.background) { + Greeting("Android") + } + } + } + } +} + +@Composable +fun Greeting(name: String, modifier: Modifier = Modifier) { + Text( + text = "Hello $name!", + modifier = modifier + ) +} + +@Preview(showBackground = true) +@Composable +fun GreetingPreview() { + DemoTheme { + Greeting("Android") + } +} \ No newline at end of file diff --git a/example/.fluentci/example/.fluentci/example/app/src/main/java/com/example/demo/ui/theme/Color.kt b/example/.fluentci/example/.fluentci/example/app/src/main/java/com/example/demo/ui/theme/Color.kt new file mode 100644 index 0000000..5e352ae --- /dev/null +++ b/example/.fluentci/example/.fluentci/example/app/src/main/java/com/example/demo/ui/theme/Color.kt @@ -0,0 +1,11 @@ +package com.example.demo.ui.theme + +import androidx.compose.ui.graphics.Color + +val Purple80 = Color(0xFFD0BCFF) +val PurpleGrey80 = Color(0xFFCCC2DC) +val Pink80 = Color(0xFFEFB8C8) + +val Purple40 = Color(0xFF6650a4) +val PurpleGrey40 = Color(0xFF625b71) +val Pink40 = Color(0xFF7D5260) \ No newline at end of file diff --git a/example/.fluentci/example/.fluentci/example/app/src/main/java/com/example/demo/ui/theme/Theme.kt b/example/.fluentci/example/.fluentci/example/app/src/main/java/com/example/demo/ui/theme/Theme.kt new file mode 100644 index 0000000..e4d323c --- /dev/null +++ b/example/.fluentci/example/.fluentci/example/app/src/main/java/com/example/demo/ui/theme/Theme.kt @@ -0,0 +1,70 @@ +package com.example.demo.ui.theme + +import android.app.Activity +import android.os.Build +import androidx.compose.foundation.isSystemInDarkTheme +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.darkColorScheme +import androidx.compose.material3.dynamicDarkColorScheme +import androidx.compose.material3.dynamicLightColorScheme +import androidx.compose.material3.lightColorScheme +import androidx.compose.runtime.Composable +import androidx.compose.runtime.SideEffect +import androidx.compose.ui.graphics.toArgb +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.platform.LocalView +import androidx.core.view.WindowCompat + +private val DarkColorScheme = darkColorScheme( + primary = Purple80, + secondary = PurpleGrey80, + tertiary = Pink80 +) + +private val LightColorScheme = lightColorScheme( + primary = Purple40, + secondary = PurpleGrey40, + tertiary = Pink40 + + /* Other default colors to override + background = Color(0xFFFFFBFE), + surface = Color(0xFFFFFBFE), + onPrimary = Color.White, + onSecondary = Color.White, + onTertiary = Color.White, + onBackground = Color(0xFF1C1B1F), + onSurface = Color(0xFF1C1B1F), + */ +) + +@Composable +fun DemoTheme( + darkTheme: Boolean = isSystemInDarkTheme(), + // Dynamic color is available on Android 12+ + dynamicColor: Boolean = true, + content: @Composable () -> Unit +) { + val colorScheme = when { + dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> { + val context = LocalContext.current + if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context) + } + + darkTheme -> DarkColorScheme + else -> LightColorScheme + } + val view = LocalView.current + if (!view.isInEditMode) { + SideEffect { + val window = (view.context as Activity).window + window.statusBarColor = colorScheme.primary.toArgb() + WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = darkTheme + } + } + + MaterialTheme( + colorScheme = colorScheme, + typography = Typography, + content = content + ) +} \ No newline at end of file diff --git a/example/.fluentci/example/.fluentci/example/app/src/main/java/com/example/demo/ui/theme/Type.kt b/example/.fluentci/example/.fluentci/example/app/src/main/java/com/example/demo/ui/theme/Type.kt new file mode 100644 index 0000000..98fc2c5 --- /dev/null +++ b/example/.fluentci/example/.fluentci/example/app/src/main/java/com/example/demo/ui/theme/Type.kt @@ -0,0 +1,34 @@ +package com.example.demo.ui.theme + +import androidx.compose.material3.Typography +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.font.FontFamily +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.sp + +// Set of Material typography styles to start with +val Typography = Typography( + bodyLarge = TextStyle( + fontFamily = FontFamily.Default, + fontWeight = FontWeight.Normal, + fontSize = 16.sp, + lineHeight = 24.sp, + letterSpacing = 0.5.sp + ) + /* Other default text styles to override + titleLarge = TextStyle( + fontFamily = FontFamily.Default, + fontWeight = FontWeight.Normal, + fontSize = 22.sp, + lineHeight = 28.sp, + letterSpacing = 0.sp + ), + labelSmall = TextStyle( + fontFamily = FontFamily.Default, + fontWeight = FontWeight.Medium, + fontSize = 11.sp, + lineHeight = 16.sp, + letterSpacing = 0.5.sp + ) + */ +) \ No newline at end of file diff --git a/example/.fluentci/example/.fluentci/example/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/example/.fluentci/example/.fluentci/example/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000..2b068d1 --- /dev/null +++ b/example/.fluentci/example/.fluentci/example/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/example/.fluentci/example/.fluentci/example/app/src/main/res/drawable/ic_launcher_background.xml b/example/.fluentci/example/.fluentci/example/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..07d5da9 --- /dev/null +++ b/example/.fluentci/example/.fluentci/example/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/.fluentci/example/.fluentci/example/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/example/.fluentci/example/.fluentci/example/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..6f3b755 --- /dev/null +++ b/example/.fluentci/example/.fluentci/example/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/example/.fluentci/example/.fluentci/example/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/example/.fluentci/example/.fluentci/example/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000..6f3b755 --- /dev/null +++ b/example/.fluentci/example/.fluentci/example/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/example/.fluentci/example/.fluentci/example/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/example/.fluentci/example/.fluentci/example/app/src/main/res/mipmap-hdpi/ic_launcher.webp new file mode 100644 index 0000000000000000000000000000000000000000..c209e78ecd372343283f4157dcfd918ec5165bb3 GIT binary patch literal 1404 zcmV-?1%vuhNk&F=1pok7MM6+kP&il$0000G0000-002h-06|PpNX!5L00Dqw+t%{r zzW2vH!KF=w&cMnnN@{whkTw+#mAh0SV?YL=)3MimFYCWp#fpdtz~8$hD5VPuQgtcN zXl<@<#Cme5f5yr2h%@8TWh?)bSK`O z^Z@d={gn7J{iyxL_y_%J|L>ep{dUxUP8a{byupH&!UNR*OutO~0{*T4q5R6@ApLF! z5{w?Z150gC7#>(VHFJZ-^6O@PYp{t!jH(_Z*nzTK4 zkc{fLE4Q3|mA2`CWQ3{8;gxGizgM!zccbdQoOLZc8hThi-IhN90RFT|zlxh3Ty&VG z?Fe{#9RrRnxzsu|Lg2ddugg7k%>0JeD+{XZ7>Z~{=|M+sh1MF7~ zz>To~`~LVQe1nNoR-gEzkpe{Ak^7{{ZBk2i_<+`Bq<^GB!RYG+z)h;Y3+<{zlMUYd zrd*W4w&jZ0%kBuDZ1EW&KLpyR7r2=}fF2%0VwHM4pUs}ZI2egi#DRMYZPek*^H9YK zay4Iy3WXFG(F14xYsoDA|KXgGc5%2DhmQ1gFCkrgHBm!lXG8I5h*uf{rn48Z!_@ z4Bk6TJAB2CKYqPjiX&mWoW>OPFGd$wqroa($ne7EUK;#3VYkXaew%Kh^3OrMhtjYN?XEoY`tRPQsAkH-DSL^QqyN0>^ zmC>{#F14jz4GeW{pJoRpLFa_*GI{?T93^rX7SPQgT@LbLqpNA}<@2wH;q493)G=1Y z#-sCiRNX~qf3KgiFzB3I>4Z%AfS(3$`-aMIBU+6?gbgDb!)L~A)je+;fR0jWLL-Fu z4)P{c7{B4Hp91&%??2$v9iRSFnuckHUm}or9seH6 z>%NbT+5*@L5(I9j@06@(!{ZI?U0=pKn8uwIg&L{JV14+8s2hnvbRrU|hZCd}IJu7*;;ECgO%8_*W Kmw_-CKmY()leWbG literal 0 HcmV?d00001 diff --git a/example/.fluentci/example/.fluentci/example/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/example/.fluentci/example/.fluentci/example/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp new file mode 100644 index 0000000000000000000000000000000000000000..b2dfe3d1ba5cf3ee31b3ecc1ced89044a1f3b7a9 GIT binary patch literal 2898 zcmV-Y3$650Nk&FW3jhFDMM6+kP&il$0000G0000-002h-06|PpNWB9900E$G+qN-D z+81ABX7q?;bwx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<*CU%+d1PQQ0a1U=&b0vkF207%xU0ssI2 literal 0 HcmV?d00001 diff --git a/example/.fluentci/example/.fluentci/example/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/example/.fluentci/example/.fluentci/example/app/src/main/res/mipmap-mdpi/ic_launcher.webp new file mode 100644 index 0000000000000000000000000000000000000000..4f0f1d64e58ba64d180ce43ee13bf9a17835fbca GIT binary patch literal 982 zcmV;{11bDcNk&G_0{{S5MM6+kP&il$0000G0000l001ul06|PpNU8t;00Dqo+t#w^ z^1csucXz7-Qrhzl9HuHB%l>&>1tG2^vb*E&k^T3$FG1eQZ51g$uv4V+kI`0<^1Z@N zk?Jjh$olyC%l>)Xq;7!>{iBj&BjJ`P&$fsCfpve_epJOBkTF?nu-B7D!hO=2ZR}

C%4 zc_9eOXvPbC4kzU8YowIA8cW~Uv|eB&yYwAObSwL2vY~UYI7NXPvf3b+c^?wcs~_t{ ze_m66-0)^{JdOMKPwjpQ@Sna!*?$wTZ~su*tNv7o!gXT!GRgivP}ec?5>l1!7<(rT zds|8x(qGc673zrvYIz;J23FG{9nHMnAuP}NpAED^laz3mAN1sy+NXK)!6v1FxQ;lh zOBLA>$~P3r4b*NcqR;y6pwyhZ3_PiDb|%n1gGjl3ZU}ujInlP{eks-#oA6>rh&g+!f`hv#_%JrgYPu z(U^&XLW^QX7F9Z*SRPpQl{B%x)_AMp^}_v~?j7 zapvHMKxSf*Mtyx8I}-<*UGn3)oHd(nn=)BZ`d$lDBwq_GL($_TPaS{UeevT(AJ`p0 z9%+hQb6z)U9qjbuXjg|dExCLjpS8$VKQ55VsIC%@{N5t{NsW)=hNGI`J=x97_kbz@ E0Of=7!TQj4N+cqN`nQhxvX7dAV-`K|Ub$-q+H-5I?Tx0g9jWxd@A|?POE8`3b8fO$T))xP* z(X?&brZw({`)WU&rdAs1iTa0x6F@PIxJ&&L|dpySV!ID|iUhjCcKz(@mE z!x@~W#3H<)4Ae(4eQJRk`Iz3<1)6^m)0b_4_TRZ+cz#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fluentci/example/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/example/.fluentci/example/.fluentci/example/app/src/main/res/mipmap-xhdpi/ic_launcher.webp new file mode 100644 index 0000000000000000000000000000000000000000..948a3070fe34c611c42c0d3ad3013a0dce358be0 GIT binary patch literal 1900 zcmV-y2b1_xNk&Fw2LJ$9MM6+kP&il$0000G0001A003VA06|PpNH75a00DqwTbm-~ zullQTcXxO9ki!OCRx^i?oR|n!<8G0=kI^!JSjFi-LL*`V;ET0H2IXfU0*i>o6o6Gy zRq6Ap5(_{XLdXcL-MzlN`ugSdZY_`jXhcENAu)N_0?GhF))9R;E`!bo9p?g?SRgw_ zEXHhFG$0{qYOqhdX<(wE4N@es3VIo$%il%6xP9gjiBri+2pI6aY4 zJbgh-Ud|V%3O!IcHKQx1FQH(_*TK;1>FQWbt^$K1zNn^cczkBs=QHCYZ8b&l!UV{K z{L0$KCf_&KR^}&2Fe|L&?1I7~pBENnCtCuH3sjcx6$c zwqkNkru);ie``q+_QI;IYLD9OV0ZxkuyBz|5<$1BH|vtey$> z5oto4=l-R-Aaq`Dk0}o9N0VrkqW_#;!u{!bJLDq%0092{Ghe=F;(kn} z+sQ@1=UlX30+2nWjkL$B^b!H2^QYO@iFc0{(-~yXj2TWz?VG{v`Jg zg}WyYnwGgn>{HFaG7E~pt=)sOO}*yd(UU-D(E&x{xKEl6OcU?pl)K%#U$dn1mDF19 zSw@l8G!GNFB3c3VVK0?uyqN&utT-D5%NM4g-3@Sii9tSXKtwce~uF zS&Jn746EW^wV~8zdQ1XC28~kXu8+Yo9p!<8h&(Q({J*4DBglPdpe4M_mD8AguZFn~ ztiuO~{6Bx?SfO~_ZV(GIboeR9~hAym{{fV|VM=77MxDrbW6`ujX z<3HF(>Zr;#*uCvC*bpoSr~C$h?_%nXps@A)=l_;({Fo#6Y1+Zv`!T5HB+)#^-Ud_; zBwftPN=d8Vx)*O1Mj+0oO=mZ+NVH*ptNDC-&zZ7Hwho6UQ#l-yNvc0Cm+2$$6YUk2D2t#vdZX-u3>-Be1u9gtTBiMB^xwWQ_rgvGpZ6(C@e23c!^K=>ai-Rqu zhqT`ZQof;9Bu!AD(i^PCbYV%yha9zuoKMp`U^z;3!+&d@Hud&_iy!O-$b9ZLcSRh? z)R|826w}TU!J#X6P%@Zh=La$I6zXa#h!B;{qfug}O%z@K{EZECu6zl)7CiNi%xti0 zB{OKfAj83~iJvmpTU|&q1^?^cIMn2RQ?jeSB95l}{DrEPTW{_gmU_pqTc)h@4T>~& zluq3)GM=xa(#^VU5}@FNqpc$?#SbVsX!~RH*5p0p@w z;~v{QMX0^bFT1!cXGM8K9FP+=9~-d~#TK#ZE{4umGT=;dfvWi?rYj;^l_Zxywze`W z^Cr{55U@*BalS}K%Czii_80e0#0#Zkhlij4-~I@}`-JFJ7$5{>LnoJSs??J8kWVl6|8A}RCGAu9^rAsfCE=2}tHwl93t0C?#+jMpvr7O3`2=tr{Hg$=HlnjVG^ewm|Js0J*kfPa6*GhtB>`fN!m#9J(sU!?(OSfzY*zS(FJ<-Vb zfAIg+`U)YaXv#sY(c--|X zEB+TVyZ%Ie4L$gi#Fc++`h6%vzsS$pjz9aLt+ZL(g;n$Dzy5=m=_TV(3H8^C{r0xd zp#a%}ht55dOq?yhwYPrtp-m1xXp;4X;)NhxxUpgP%XTLmO zcjaFva^}dP3$&sfFTIR_jC=2pHh9kpI@2(6V*GQo7Ws)`j)hd+tr@P~gR*2gO@+1? zG<`_tB+LJuF|SZ9tIec;h%}}6WClT`L>HSW?E{Hp1h^+mlbf_$9zA>!ug>NALJsO{ mU%z=YwVD?}XMya)Bp;vlyE5&E_6!fzx9pwrdz474!~g(M6R?N? literal 0 HcmV?d00001 diff --git a/example/.fluentci/example/.fluentci/example/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/example/.fluentci/example/.fluentci/example/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp new file mode 100644 index 0000000000000000000000000000000000000000..1b9a6956b3acdc11f40ce2bb3f6efbd845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51sVmqO3m)=B55aPwf@0=e}cN+$-BdKxY`YrT_4)0 z_d10#i44Q*rFr8MC>*)v$EJvz``(pb{e&*6k+b zsMz%($|1+8hn8c2?P(l@;Rb&CsZeYoCI3?2!LqjbwPXW3z4G$Qfj=cT5Yb%vY0(AX oeb?AaKtwrnc|$|zzw9vfvn^aJJ!zd)XFXqqy0000001=f@-~a#s literal 0 HcmV?d00001 diff --git a/example/.fluentci/example/.fluentci/example/app/src/main/res/values/colors.xml b/example/.fluentci/example/.fluentci/example/app/src/main/res/values/colors.xml new file mode 100644 index 0000000..f8c6127 --- /dev/null +++ b/example/.fluentci/example/.fluentci/example/app/src/main/res/values/colors.xml @@ -0,0 +1,10 @@ + + + #FFBB86FC + #FF6200EE + #FF3700B3 + #FF03DAC5 + #FF018786 + #FF000000 + #FFFFFFFF + \ No newline at end of file diff --git a/example/.fluentci/example/.fluentci/example/app/src/main/res/values/strings.xml b/example/.fluentci/example/.fluentci/example/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..aee84b4 --- /dev/null +++ b/example/.fluentci/example/.fluentci/example/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + Demo + \ No newline at end of file diff --git a/example/.fluentci/example/.fluentci/example/app/src/main/res/values/themes.xml b/example/.fluentci/example/.fluentci/example/app/src/main/res/values/themes.xml new file mode 100644 index 0000000..f8dcc51 --- /dev/null +++ b/example/.fluentci/example/.fluentci/example/app/src/main/res/values/themes.xml @@ -0,0 +1,5 @@ + + + +