From f39ba3573a21275aa780e711b669f4278398a7db Mon Sep 17 00:00:00 2001 From: Tsiry Sandratraina Date: Thu, 15 Aug 2024 15:00:08 +0000 Subject: [PATCH] [sdk/gleam] update README.md [sdk/gleam] update README.md [sdk/gleam] update README.md --- sdk/gleam/.gitignore | 4 + sdk/gleam/LICENSE | 19 + sdk/gleam/README.md | 57 ++ sdk/gleam/demo/.github/workflows/test.yml | 23 - .../demo/src/{dagger.mjs => dagger_ffi.mjs} | 0 sdk/gleam/demo/src/demo.gleam | 2 +- .../{fluentci/client.gleam => fluentci.gleam} | 38 +- sdk/gleam/demo/src/fluentci/cache.gleam | 16 +- .../src/fluentci/dagger/cache_volume.gleam | 2 +- .../demo/src/fluentci/dagger/client.gleam | 16 +- .../demo/src/fluentci/dagger/container.gleam | 10 +- .../demo/src/fluentci/dagger/directory.gleam | 40 +- .../src/fluentci/dagger/enum_type_def.gleam | 10 +- .../fluentci/dagger/enum_value_type_def.gleam | 6 +- .../src/fluentci/dagger/env_variable.gleam | 6 +- sdk/gleam/demo/src/fluentci/dagger/file.gleam | 18 +- .../demo/src/fluentci/dagger/function.gleam | 14 +- .../src/fluentci/dagger/function_arg.gleam | 10 +- .../src/fluentci/dagger/function_call.gleam | 12 +- .../dagger/function_call_arg_value.gleam | 6 +- .../src/fluentci/dagger/generated_code.gleam | 12 +- sdk/gleam/demo/src/fluentci/dagger/git.gleam | 18 +- .../fluentci/dagger/git_module_source.gleam | 16 +- .../demo/src/fluentci/dagger/git_ref.gleam | 6 +- sdk/gleam/demo/src/fluentci/dagger/host.gleam | 14 +- .../fluentci/dagger/local_module_source.gleam | 2 +- .../demo/src/fluentci/dagger/module.gleam | 6 +- .../fluentci/dagger/module_dependency.gleam | 6 +- .../src/fluentci/dagger/module_source.gleam | 52 +- .../fluentci/dagger/module_source_view.gleam | 6 +- sdk/gleam/demo/src/fluentci/dagger/port.gleam | 10 +- .../demo/src/fluentci/dagger/secret.gleam | 6 +- .../demo/src/fluentci/dagger/service.gleam | 14 +- .../demo/src/fluentci/dagger/socket.gleam | 2 +- .../demo/src/fluentci/dagger/terminal.gleam | 2 +- .../demo/src/fluentci/dagger/type_def.gleam | 4 +- sdk/gleam/demo/src/fluentci/devbox.gleam | 22 +- sdk/gleam/demo/src/fluentci/devenv.gleam | 22 +- sdk/gleam/demo/src/fluentci/directory.gleam | 42 +- sdk/gleam/demo/src/fluentci/envhub.gleam | 24 +- sdk/gleam/demo/src/fluentci/file.gleam | 16 +- sdk/gleam/demo/src/fluentci/flox.gleam | 22 +- sdk/gleam/demo/src/fluentci/git.gleam | 8 +- sdk/gleam/demo/src/fluentci/mise.gleam | 22 +- sdk/gleam/demo/src/fluentci/nix.gleam | 22 +- sdk/gleam/demo/src/fluentci/pipeline.gleam | 36 +- sdk/gleam/demo/src/fluentci/pixi.gleam | 22 +- sdk/gleam/demo/src/fluentci/pkgx.gleam | 24 +- sdk/gleam/demo/src/fluentci/secret.gleam | 8 +- .../demo/src/fluentci/secret_manager.gleam | 4 +- sdk/gleam/demo/src/fluentci/service.gleam | 2 +- .../src/{fluentci.mjs => fluentci_ffi.mjs} | 0 .../demo/src/{plugin.mjs => plugin_ffi.mjs} | 0 sdk/gleam/gleam.toml | 35 + sdk/gleam/manifest.toml | 13 + sdk/gleam/src/dagger_ffi.mjs | 669 ++++++++++++++++++ sdk/gleam/src/fluentci.gleam | 97 +++ sdk/gleam/src/fluentci/cache.gleam | 9 + .../src/fluentci/dagger/cache_volume.gleam | 6 + sdk/gleam/src/fluentci/dagger/client.gleam | 31 + sdk/gleam/src/fluentci/dagger/container.gleam | 19 + sdk/gleam/src/fluentci/dagger/directory.gleam | 71 ++ .../src/fluentci/dagger/enum_type_def.gleam | 20 + .../fluentci/dagger/enum_value_type_def.gleam | 12 + .../src/fluentci/dagger/env_variable.gleam | 12 + sdk/gleam/src/fluentci/dagger/file.gleam | 30 + sdk/gleam/src/fluentci/dagger/function.gleam | 27 + .../src/fluentci/dagger/function_arg.gleam | 20 + .../src/fluentci/dagger/function_call.gleam | 25 + .../dagger/function_call_arg_value.gleam | 13 + .../src/fluentci/dagger/generated_code.gleam | 29 + sdk/gleam/src/fluentci/dagger/git.gleam | 33 + .../fluentci/dagger/git_module_source.gleam | 28 + sdk/gleam/src/fluentci/dagger/git_ref.gleam | 13 + sdk/gleam/src/fluentci/dagger/host.gleam | 29 + .../fluentci/dagger/local_module_source.gleam | 6 + sdk/gleam/src/fluentci/dagger/module.gleam | 19 + .../fluentci/dagger/module_dependency.gleam | 11 + .../src/fluentci/dagger/module_source.gleam | 108 +++ .../fluentci/dagger/module_source_view.gleam | 12 + sdk/gleam/src/fluentci/dagger/port.gleam | 18 + sdk/gleam/src/fluentci/dagger/secret.gleam | 12 + sdk/gleam/src/fluentci/dagger/service.gleam | 27 + sdk/gleam/src/fluentci/dagger/socket.gleam | 6 + sdk/gleam/src/fluentci/dagger/terminal.gleam | 6 + sdk/gleam/src/fluentci/dagger/type_def.gleam | 10 + sdk/gleam/src/fluentci/dagger/void.gleam | 1 + sdk/gleam/src/fluentci/devbox.gleam | 44 ++ sdk/gleam/src/fluentci/devenv.gleam | 44 ++ sdk/gleam/src/fluentci/directory.gleam | 83 +++ sdk/gleam/src/fluentci/envhub.gleam | 47 ++ sdk/gleam/src/fluentci/file.gleam | 26 + sdk/gleam/src/fluentci/flox.gleam | 40 ++ sdk/gleam/src/fluentci/git.gleam | 16 + sdk/gleam/src/fluentci/mise.gleam | 40 ++ sdk/gleam/src/fluentci/nix.gleam | 40 ++ sdk/gleam/src/fluentci/pipeline.gleam | 76 ++ sdk/gleam/src/fluentci/pixi.gleam | 40 ++ sdk/gleam/src/fluentci/pkgx.gleam | 43 ++ sdk/gleam/src/fluentci/secret.gleam | 15 + sdk/gleam/src/fluentci/secret_manager.gleam | 14 + sdk/gleam/src/fluentci/service.gleam | 6 + sdk/gleam/src/fluentci_ffi.mjs | 210 ++++++ sdk/gleam/src/plugin_ffi.mjs | 0 sdk/gleam/test/fluentci_test.gleam | 12 + 105 files changed, 2688 insertions(+), 366 deletions(-) create mode 100644 sdk/gleam/.gitignore create mode 100644 sdk/gleam/LICENSE create mode 100644 sdk/gleam/README.md delete mode 100644 sdk/gleam/demo/.github/workflows/test.yml rename sdk/gleam/demo/src/{dagger.mjs => dagger_ffi.mjs} (100%) rename sdk/gleam/demo/src/{fluentci/client.gleam => fluentci.gleam} (63%) rename sdk/gleam/demo/src/{fluentci.mjs => fluentci_ffi.mjs} (100%) rename sdk/gleam/demo/src/{plugin.mjs => plugin_ffi.mjs} (100%) create mode 100644 sdk/gleam/gleam.toml create mode 100644 sdk/gleam/manifest.toml create mode 100644 sdk/gleam/src/dagger_ffi.mjs create mode 100644 sdk/gleam/src/fluentci.gleam create mode 100644 sdk/gleam/src/fluentci/cache.gleam create mode 100644 sdk/gleam/src/fluentci/dagger/cache_volume.gleam create mode 100644 sdk/gleam/src/fluentci/dagger/client.gleam create mode 100644 sdk/gleam/src/fluentci/dagger/container.gleam create mode 100644 sdk/gleam/src/fluentci/dagger/directory.gleam create mode 100644 sdk/gleam/src/fluentci/dagger/enum_type_def.gleam create mode 100644 sdk/gleam/src/fluentci/dagger/enum_value_type_def.gleam create mode 100644 sdk/gleam/src/fluentci/dagger/env_variable.gleam create mode 100644 sdk/gleam/src/fluentci/dagger/file.gleam create mode 100644 sdk/gleam/src/fluentci/dagger/function.gleam create mode 100644 sdk/gleam/src/fluentci/dagger/function_arg.gleam create mode 100644 sdk/gleam/src/fluentci/dagger/function_call.gleam create mode 100644 sdk/gleam/src/fluentci/dagger/function_call_arg_value.gleam create mode 100644 sdk/gleam/src/fluentci/dagger/generated_code.gleam create mode 100644 sdk/gleam/src/fluentci/dagger/git.gleam create mode 100644 sdk/gleam/src/fluentci/dagger/git_module_source.gleam create mode 100644 sdk/gleam/src/fluentci/dagger/git_ref.gleam create mode 100644 sdk/gleam/src/fluentci/dagger/host.gleam create mode 100644 sdk/gleam/src/fluentci/dagger/local_module_source.gleam create mode 100644 sdk/gleam/src/fluentci/dagger/module.gleam create mode 100644 sdk/gleam/src/fluentci/dagger/module_dependency.gleam create mode 100644 sdk/gleam/src/fluentci/dagger/module_source.gleam create mode 100644 sdk/gleam/src/fluentci/dagger/module_source_view.gleam create mode 100644 sdk/gleam/src/fluentci/dagger/port.gleam create mode 100644 sdk/gleam/src/fluentci/dagger/secret.gleam create mode 100644 sdk/gleam/src/fluentci/dagger/service.gleam create mode 100644 sdk/gleam/src/fluentci/dagger/socket.gleam create mode 100644 sdk/gleam/src/fluentci/dagger/terminal.gleam create mode 100644 sdk/gleam/src/fluentci/dagger/type_def.gleam create mode 100644 sdk/gleam/src/fluentci/dagger/void.gleam create mode 100644 sdk/gleam/src/fluentci/devbox.gleam create mode 100644 sdk/gleam/src/fluentci/devenv.gleam create mode 100644 sdk/gleam/src/fluentci/directory.gleam create mode 100644 sdk/gleam/src/fluentci/envhub.gleam create mode 100644 sdk/gleam/src/fluentci/file.gleam create mode 100644 sdk/gleam/src/fluentci/flox.gleam create mode 100644 sdk/gleam/src/fluentci/git.gleam create mode 100644 sdk/gleam/src/fluentci/mise.gleam create mode 100644 sdk/gleam/src/fluentci/nix.gleam create mode 100644 sdk/gleam/src/fluentci/pipeline.gleam create mode 100644 sdk/gleam/src/fluentci/pixi.gleam create mode 100644 sdk/gleam/src/fluentci/pkgx.gleam create mode 100644 sdk/gleam/src/fluentci/secret.gleam create mode 100644 sdk/gleam/src/fluentci/secret_manager.gleam create mode 100644 sdk/gleam/src/fluentci/service.gleam create mode 100644 sdk/gleam/src/fluentci_ffi.mjs create mode 100644 sdk/gleam/src/plugin_ffi.mjs create mode 100644 sdk/gleam/test/fluentci_test.gleam diff --git a/sdk/gleam/.gitignore b/sdk/gleam/.gitignore new file mode 100644 index 0000000..599be4e --- /dev/null +++ b/sdk/gleam/.gitignore @@ -0,0 +1,4 @@ +*.beam +*.ez +/build +erl_crash.dump diff --git a/sdk/gleam/LICENSE b/sdk/gleam/LICENSE new file mode 100644 index 0000000..515dd5f --- /dev/null +++ b/sdk/gleam/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2024 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/sdk/gleam/README.md b/sdk/gleam/README.md new file mode 100644 index 0000000..7733f4f --- /dev/null +++ b/sdk/gleam/README.md @@ -0,0 +1,57 @@ +# FluentCI Gleam SDK + +[![Package Version](https://img.shields.io/hexpm/v/fluentci)](https://hex.pm/packages/fluentci) +[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/fluentci/) + +The FluentCI Gleam SDK provides a set of APIs to interact with FluentCI in Gleam, it allows you to write CI/CD pipelines in Gleam. + +## 🚚 Installation + +```sh +gleam add fluentci +``` + +## 🚀 Quick Start + +```gleam +import fluentci.{dag, pipeline, set_secret} +import fluentci/pipeline.{ stdout, with_exec, with_secret_variable} +import fluentci/secret.{plaintext} +import gleam/io +import gleam/javascript/array.{from_list} +import gleam/javascript/promise.{await, resolve} + +pub fn main() { + // This pipeline will print "Hello, World!" to the console + dag() + |> pipeline("hello-world") + |> with_exec(from_list(["echo", "Hello, World!"])) + |> await(fn(output) { + io.println(output) + resolve(value) + }) + + // This pipeline will print the value of a secret to the console + let secret = dag() |> set_secret("GITHUB", "my-github-token") + secret + |> plaintext + |> await(fn(value) { + io.println(value) + resolve(value) + }) + + dag() + |> pipeline("secret-demo") + |> with_secret_variable("GITHUB", secret) + |> with_exec(from_list(["echo", "$GITHUB"])) + |> stdout + |> await(fn(value) { + io.print("Secret demo: ") + io.println(value) + resolve(value) + }) +} + +``` + +Further documentation can be found at . diff --git a/sdk/gleam/demo/.github/workflows/test.yml b/sdk/gleam/demo/.github/workflows/test.yml deleted file mode 100644 index 06d00ad..0000000 --- a/sdk/gleam/demo/.github/workflows/test.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: test - -on: - push: - branches: - - master - - main - pull_request: - -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: erlef/setup-beam@v1 - with: - otp-version: "26.0.2" - gleam-version: "1.4.1" - rebar3-version: "3" - # elixir-version: "1.15.4" - - run: gleam deps download - - run: gleam test - - run: gleam format --check src test diff --git a/sdk/gleam/demo/src/dagger.mjs b/sdk/gleam/demo/src/dagger_ffi.mjs similarity index 100% rename from sdk/gleam/demo/src/dagger.mjs rename to sdk/gleam/demo/src/dagger_ffi.mjs diff --git a/sdk/gleam/demo/src/demo.gleam b/sdk/gleam/demo/src/demo.gleam index 0c0edf7..33d384d 100644 --- a/sdk/gleam/demo/src/demo.gleam +++ b/sdk/gleam/demo/src/demo.gleam @@ -1,4 +1,4 @@ -import fluentci/client.{dag, pipeline, set_secret} +import fluentci.{dag, pipeline, set_secret} import fluentci/mise import fluentci/pipeline.{mise, stdout, with_exec, with_secret_variable} import fluentci/secret.{plaintext} diff --git a/sdk/gleam/demo/src/fluentci/client.gleam b/sdk/gleam/demo/src/fluentci.gleam similarity index 63% rename from sdk/gleam/demo/src/fluentci/client.gleam rename to sdk/gleam/demo/src/fluentci.gleam index 08f8f07..0957096 100644 --- a/sdk/gleam/demo/src/fluentci/client.gleam +++ b/sdk/gleam/demo/src/fluentci.gleam @@ -18,10 +18,10 @@ pub type NixArgs { NixArgs(impure: Bool) } -@external(javascript, "../fluentci.mjs", "client") +@external(javascript, "./fluentci_ffi.mjs", "client") pub fn dag() -> Client -@external(javascript, "../fluentci.mjs", "azureSecretsManager") +@external(javascript, "./fluentci_ffi.mjs", "azureSecretsManager") pub fn azure_secrets_manager( client: Client, region: String, @@ -29,7 +29,7 @@ pub fn azure_secrets_manager( secret_access_key: String, ) -> SecretManager -@external(javascript, "../fluentci.mjs", "azureKeyvault") +@external(javascript, "./fluentci_ffi.mjs", "azureKeyvault") pub fn azure_keyvault( client: Client, client_id: String, @@ -39,35 +39,35 @@ pub fn azure_keyvault( keyvault_url: String, ) -> SecretManager -@external(javascript, "../fluentci.mjs", "cache") +@external(javascript, "./fluentci_ffi.mjs", "cache") pub fn cache(client: Client, key: String) -> Cache -@external(javascript, "../fluentci.mjs", "devbox") +@external(javascript, "./fluentci_ffi.mjs", "devbox") pub fn devbox(client: Client) -> Devbox -@external(javascript, "../fluentci.mjs", "devenv") +@external(javascript, "./fluentci_ffi.mjs", "devenv") pub fn devenv(client: Client) -> Devenv -@external(javascript, "../fluentci.mjs", "directory") +@external(javascript, "./fluentci_ffi.mjs", "directory") pub fn directory(client: Client, path: String) -> Directory -@external(javascript, "../fluentci.mjs", "file") +@external(javascript, "./fluentci_ffi.mjs", "file") pub fn file(client: Client, path: String) -> File -@external(javascript, "../fluentci.mjs", "flox") +@external(javascript, "./fluentci_ffi.mjs", "flox") pub fn flox(client: Client) -> Flox -@external(javascript, "../fluentci.mjs", "git") +@external(javascript, "./fluentci_ffi.mjs", "git") pub fn git(client: Client, url: String) -> Git -@external(javascript, "../fluentci.mjs", "googleCloudSecretManager") +@external(javascript, "./fluentci_ffi.mjs", "googleCloudSecretManager") pub fn google_cloud_secret_manager( client: Client, project: String, google_credentials_file: String, ) -> SecretManager -@external(javascript, "../fluentci.mjs", "hashicorpVault") +@external(javascript, "./fluentci_ffi.mjs", "hashicorpVault") pub fn hashicorp_vault( client: Client, address: String, @@ -75,23 +75,23 @@ pub fn hashicorp_vault( cacerts: String, ) -> SecretManager -@external(javascript, "../fluentci.mjs", "http") +@external(javascript, "./fluentci_ffi.mjs", "http") pub fn http(client: Client, url: String) -> File -@external(javascript, "../fluentci.mjs", "mise") +@external(javascript, "./fluentci_ffi.mjs", "mise") pub fn mise(client: Client) -> Mise -@external(javascript, "../fluentci.mjs", "nix") +@external(javascript, "./fluentci_ffi.mjs", "nix") pub fn nix(client: Client, args: NixArgs) -> Nix -@external(javascript, "../fluentci.mjs", "pipeline") +@external(javascript, "./fluentci_ffi.mjs", "pipeline") pub fn pipeline(client: Client, name: String) -> Pipeline -@external(javascript, "../fluentci.mjs", "pixi") +@external(javascript, "./fluentci_ffi.mjs", "pixi") pub fn pixi(client: Client) -> Pixi -@external(javascript, "../fluentci.mjs", "pkgx") +@external(javascript, "./fluentci_ffi.mjs", "pkgx") pub fn pkgx(client: Client) -> Pkgx -@external(javascript, "../fluentci.mjs", "setSecret") +@external(javascript, "./fluentci_ffi.mjs", "setSecret") pub fn set_secret(client: Client, name: String, value: String) -> Secret diff --git a/sdk/gleam/demo/src/fluentci/cache.gleam b/sdk/gleam/demo/src/fluentci/cache.gleam index cad6a1e..ca380d8 100644 --- a/sdk/gleam/demo/src/fluentci/cache.gleam +++ b/sdk/gleam/demo/src/fluentci/cache.gleam @@ -2,16 +2,8 @@ import gleam/javascript/promise.{type Promise} pub type Cache -@external(javascript, "../fluentci.mjs", "id") -pub fn id_(cache: Cache) -> Promise(String) +@external(javascript, "../fluentci_ffi.mjs", "id") +pub fn id(cache: Cache) -> Promise(String) -@external(javascript, "../fluentci.mjs", "key") -pub fn key_(cache: Cache) -> Promise(String) - -pub fn id(cache: Cache) -> Promise(String) { - id_(cache) -} - -pub fn key(cache: Cache) -> Promise(String) { - key_(cache) -} +@external(javascript, "../fluentci_ffi.mjs", "key") +pub fn key(cache: Cache) -> Promise(String) diff --git a/sdk/gleam/demo/src/fluentci/dagger/cache_volume.gleam b/sdk/gleam/demo/src/fluentci/dagger/cache_volume.gleam index 77391c7..e53d79b 100644 --- a/sdk/gleam/demo/src/fluentci/dagger/cache_volume.gleam +++ b/sdk/gleam/demo/src/fluentci/dagger/cache_volume.gleam @@ -2,5 +2,5 @@ import gleam/javascript/promise.{type Promise} pub type CacheVolume -@external(javascript, "../../dagger.mjs", "id") +@external(javascript, "../../dagger_ffi.mjs", "id") pub fn id(cache_volume: CacheVolume) -> Promise(String) diff --git a/sdk/gleam/demo/src/fluentci/dagger/client.gleam b/sdk/gleam/demo/src/fluentci/dagger/client.gleam index f13b764..4c2129f 100644 --- a/sdk/gleam/demo/src/fluentci/dagger/client.gleam +++ b/sdk/gleam/demo/src/fluentci/dagger/client.gleam @@ -6,26 +6,26 @@ import fluentci/dagger/host.{type Host} pub type Client -@external(javascript, "../../dagger.mjs", "client") +@external(javascript, "../../dagger_ffi.mjs", "client") pub fn dag() -> Client -@external(javascript, "../../dagger.mjs", "pipeline") +@external(javascript, "../../dagger_ffi.mjs", "pipeline") pub fn pipeline(client: Client, name: String) -> Client -@external(javascript, "../../dagger.mjs", "container") +@external(javascript, "../../dagger_ffi.mjs", "container") pub fn container(client: Client) -> Container -@external(javascript, "../../dagger.mjs", "cacheVolume") +@external(javascript, "../../dagger_ffi.mjs", "cacheVolume") pub fn cache_volume(client: Client, key: String) -> CacheVolume -@external(javascript, "../../dagger.mjs", "emptyDirectory") +@external(javascript, "../../dagger_ffi.mjs", "emptyDirectory") pub fn directory(client: Client) -> Directory -@external(javascript, "../../dagger.mjs", "git") +@external(javascript, "../../dagger_ffi.mjs", "git") pub fn git(client: Client, url: String) -> Directory -@external(javascript, "../../dagger.mjs", "host") +@external(javascript, "../../dagger_ffi.mjs", "host") pub fn host(client: Client) -> Host -@external(javascript, "../../dagger.mjs", "http") +@external(javascript, "../../dagger_ffi.mjs", "http") pub fn http(client: Client, url: String) -> File diff --git a/sdk/gleam/demo/src/fluentci/dagger/container.gleam b/sdk/gleam/demo/src/fluentci/dagger/container.gleam index 808ba79..e7b991d 100644 --- a/sdk/gleam/demo/src/fluentci/dagger/container.gleam +++ b/sdk/gleam/demo/src/fluentci/dagger/container.gleam @@ -3,17 +3,17 @@ import gleam/javascript/promise.{type Promise} pub type Container -@external(javascript, "../../dagger.mjs", "id") +@external(javascript, "../../dagger_ffi.mjs", "id") pub fn id(container: Container) -> Promise(String) -@external(javascript, "../../dagger.mjs", "from_") +@external(javascript, "../../dagger_ffi.mjs", "from_") pub fn from(container: Container, image: String) -> Container -@external(javascript, "../../dagger.mjs", "withExec") +@external(javascript, "../../dagger_ffi.mjs", "withExec") pub fn with_exec(container: Container, args: Array(String)) -> Container -@external(javascript, "../../dagger.mjs", "stdout") +@external(javascript, "../../dagger_ffi.mjs", "stdout") pub fn stdout(container: Container) -> Promise(String) -@external(javascript, "../../dagger.mjs", "stderr") +@external(javascript, "../../dagger_ffi.mjs", "stderr") pub fn stderr(container: Container) -> Promise(String) diff --git a/sdk/gleam/demo/src/fluentci/dagger/directory.gleam b/sdk/gleam/demo/src/fluentci/dagger/directory.gleam index ab101b2..1e529fe 100644 --- a/sdk/gleam/demo/src/fluentci/dagger/directory.gleam +++ b/sdk/gleam/demo/src/fluentci/dagger/directory.gleam @@ -6,66 +6,66 @@ import gleam/javascript/promise.{type Promise} pub type Directory -@external(javascript, "../../dagger.mjs", "id") +@external(javascript, "../../dagger_ffi.mjs", "id") pub fn id(directory: Directory) -> Promise(String) -@external(javascript, "../../dagger.mjs", "asModule") +@external(javascript, "../../dagger_ffi.mjs", "asModule") pub fn as_module(directory: Directory) -> Module -@external(javascript, "../../dagger.mjs", "diff") +@external(javascript, "../../dagger_ffi.mjs", "diff") pub fn diff(directory: Directory, other: Directory) -> Directory -@external(javascript, "../../dagger.mjs", "directory") +@external(javascript, "../../dagger_ffi.mjs", "directory") pub fn directory(d: Directory, path: String) -> Directory -@external(javascript, "../../dagger.mjs", "dockerBuild") +@external(javascript, "../../dagger_ffi.mjs", "dockerBuild") pub fn docker_build(directory: Directory) -> Container -@external(javascript, "../../dagger.mjs", "entries") +@external(javascript, "../../dagger_ffi.mjs", "entries") pub fn entries(directory: Directory) -> Promise(Array(String)) -@external(javascript, "../../dagger.mjs", "export_") +@external(javascript, "../../dagger_ffi.mjs", "export_") pub fn export(directory: Directory, path: String) -> Promise(String) -@external(javascript, "../../dagger.mjs", "file") +@external(javascript, "../../dagger_ffi.mjs", "file") pub fn file(directory: Directory, path: String) -> File -@external(javascript, "../../dagger.mjs", "glob") +@external(javascript, "../../dagger_ffi.mjs", "glob") pub fn glob(directory: Directory, pattern: String) -> Promise(Array(String)) -@external(javascript, "../../dagger.mjs", "pipeline") +@external(javascript, "../../dagger_ffi.mjs", "pipeline") pub fn pipeline(directory: Directory, name: String) -> Directory -@external(javascript, "../../dagger.mjs", "sync") +@external(javascript, "../../dagger_ffi.mjs", "sync") pub fn sync(directory: Directory) -> Directory -@external(javascript, "../../dagger.mjs", "terminal") +@external(javascript, "../../dagger_ffi.mjs", "terminal") pub fn terminal(directory: Directory) -> Directory -@external(javascript, "../../dagger.mjs", "withDirectory") +@external(javascript, "../../dagger_ffi.mjs", "withDirectory") pub fn with_directory( d: Directory, path: String, directory: Directory, ) -> Directory -@external(javascript, "../../dagger.mjs", "withFile") +@external(javascript, "../../dagger_ffi.mjs", "withFile") pub fn with_file(d: Directory, source: File) -> Directory -@external(javascript, "../../dagger.mjs", "withFiles") +@external(javascript, "../../dagger_ffi.mjs", "withFiles") pub fn with_files(d: Directory, sources: Array(File)) -> Directory -@external(javascript, "../../dagger.mjs", "withNewDirectory") +@external(javascript, "../../dagger_ffi.mjs", "withNewDirectory") pub fn with_new_directory(d: Directory, path: String) -> Directory -@external(javascript, "../../dagger.mjs", "withNewFile") +@external(javascript, "../../dagger_ffi.mjs", "withNewFile") pub fn with_new_file(d: Directory, path: String, contents: String) -> Directory -@external(javascript, "../../dagger.mjs", "withTimestamps") +@external(javascript, "../../dagger_ffi.mjs", "withTimestamps") pub fn with_timestamps(d: Directory, timestamp: Int) -> Directory -@external(javascript, "../../dagger.mjs", "withoutDirectory") +@external(javascript, "../../dagger_ffi.mjs", "withoutDirectory") pub fn without_directory(d: Directory, path: String) -> Directory -@external(javascript, "../../dagger.mjs", "withoutFile") +@external(javascript, "../../dagger_ffi.mjs", "withoutFile") pub fn without_file(d: Directory, path: String) -> Directory diff --git a/sdk/gleam/demo/src/fluentci/dagger/enum_type_def.gleam b/sdk/gleam/demo/src/fluentci/dagger/enum_type_def.gleam index ef0593e..ce10111 100644 --- a/sdk/gleam/demo/src/fluentci/dagger/enum_type_def.gleam +++ b/sdk/gleam/demo/src/fluentci/dagger/enum_type_def.gleam @@ -4,17 +4,17 @@ import gleam/javascript/promise.{type Promise} pub type EnumTypeDef -@external(javascript, "../../dagger.mjs", "id") +@external(javascript, "../../dagger_ffi.mjs", "id") pub fn id(f: EnumTypeDef) -> Promise(String) -@external(javascript, "../../dagger.mjs", "description") +@external(javascript, "../../dagger_ffi.mjs", "description") pub fn description(f: EnumTypeDef) -> Promise(String) -@external(javascript, "../../dagger.mjs", "name") +@external(javascript, "../../dagger_ffi.mjs", "name") pub fn name(f: EnumTypeDef) -> Promise(String) -@external(javascript, "../../dagger.mjs", "sourceModuleName") +@external(javascript, "../../dagger_ffi.mjs", "sourceModuleName") pub fn source_module_name(f: EnumTypeDef) -> Promise(String) -@external(javascript, "../../dagger.mjs", "values") +@external(javascript, "../../dagger_ffi.mjs", "values") pub fn values(f: EnumTypeDef) -> Promise(Array(EnumValueTypeDef)) diff --git a/sdk/gleam/demo/src/fluentci/dagger/enum_value_type_def.gleam b/sdk/gleam/demo/src/fluentci/dagger/enum_value_type_def.gleam index dca0b1f..77286ac 100644 --- a/sdk/gleam/demo/src/fluentci/dagger/enum_value_type_def.gleam +++ b/sdk/gleam/demo/src/fluentci/dagger/enum_value_type_def.gleam @@ -2,11 +2,11 @@ import gleam/javascript/promise.{type Promise} pub type EnumValueTypeDef -@external(javascript, "../../dagger.mjs", "id") +@external(javascript, "../../dagger_ffi.mjs", "id") pub fn id(f: EnumValueTypeDef) -> Promise(String) -@external(javascript, "../../dagger.mjs", "description") +@external(javascript, "../../dagger_ffi.mjs", "description") pub fn description(f: EnumValueTypeDef) -> Promise(String) -@external(javascript, "../../dagger.mjs", "name") +@external(javascript, "../../dagger_ffi.mjs", "name") pub fn name(f: EnumValueTypeDef) -> Promise(String) diff --git a/sdk/gleam/demo/src/fluentci/dagger/env_variable.gleam b/sdk/gleam/demo/src/fluentci/dagger/env_variable.gleam index 43890b5..85d3b68 100644 --- a/sdk/gleam/demo/src/fluentci/dagger/env_variable.gleam +++ b/sdk/gleam/demo/src/fluentci/dagger/env_variable.gleam @@ -2,11 +2,11 @@ import gleam/javascript/promise.{type Promise} pub type EnvVariable -@external(javascript, "../../dagger.mjs", "id") +@external(javascript, "../../dagger_ffi.mjs", "id") pub fn id(env_variable: EnvVariable) -> Promise(String) -@external(javascript, "../../dagger.mjs", "name") +@external(javascript, "../../dagger_ffi.mjs", "name") pub fn name(env_variable: EnvVariable) -> Promise(String) -@external(javascript, "../../dagger.mjs", "value") +@external(javascript, "../../dagger_ffi.mjs", "value") pub fn value(env_variable: EnvVariable) -> Promise(String) diff --git a/sdk/gleam/demo/src/fluentci/dagger/file.gleam b/sdk/gleam/demo/src/fluentci/dagger/file.gleam index 7aa4a9d..22bffbd 100644 --- a/sdk/gleam/demo/src/fluentci/dagger/file.gleam +++ b/sdk/gleam/demo/src/fluentci/dagger/file.gleam @@ -2,29 +2,29 @@ import gleam/javascript/promise.{type Promise} pub type File -@external(javascript, "../../dagger.mjs", "id") +@external(javascript, "../../dagger_ffi.mjs", "id") pub fn id(file: File) -> Promise(String) -@external(javascript, "../../dagger.mjs", "contents") +@external(javascript, "../../dagger_ffi.mjs", "contents") pub fn contents(file: File) -> Promise(String) -@external(javascript, "../../dagger.mjs", "digest") +@external(javascript, "../../dagger_ffi.mjs", "digest") pub fn digest(file: File) -> Promise(String) -@external(javascript, "../../dagger.mjs", "export_") +@external(javascript, "../../dagger_ffi.mjs", "export_") pub fn export(file: File, path: String) -> Promise(String) -@external(javascript, "../../dagger.mjs", "name") +@external(javascript, "../../dagger_ffi.mjs", "name") pub fn name(file: File) -> Promise(String) -@external(javascript, "../../dagger.mjs", "size") +@external(javascript, "../../dagger_ffi.mjs", "size") pub fn size(file: File) -> Promise(Int) -@external(javascript, "../../dagger.mjs", "sync") +@external(javascript, "../../dagger_ffi.mjs", "sync") pub fn sync(file: File) -> Promise(File) -@external(javascript, "../../dagger.mjs", "withName") +@external(javascript, "../../dagger_ffi.mjs", "withName") pub fn with_name(file: File, name: String) -> File -@external(javascript, "../../dagger.mjs", "withTimestamps") +@external(javascript, "../../dagger_ffi.mjs", "withTimestamps") pub fn with_timestamps(file: File, timestamp: Int) -> File diff --git a/sdk/gleam/demo/src/fluentci/dagger/function.gleam b/sdk/gleam/demo/src/fluentci/dagger/function.gleam index b34d3a2..4ee5273 100644 --- a/sdk/gleam/demo/src/fluentci/dagger/function.gleam +++ b/sdk/gleam/demo/src/fluentci/dagger/function.gleam @@ -5,23 +5,23 @@ import gleam/javascript/promise.{type Promise} pub type Function -@external(javascript, "../../dagger.mjs", "id") +@external(javascript, "../../dagger_ffi.mjs", "id") pub fn id(f: Function) -> Promise(String) -@external(javascript, "../../dagger.mjs", "args") +@external(javascript, "../../dagger_ffi.mjs", "args") pub fn args(f: Function) -> Promise(Array(FunctionArg)) -@external(javascript, "../../dagger.mjs", "description") +@external(javascript, "../../dagger_ffi.mjs", "description") pub fn description(f: Function) -> Promise(String) -@external(javascript, "../../dagger.mjs", "name") +@external(javascript, "../../dagger_ffi.mjs", "name") pub fn name(f: Function) -> Promise(String) -@external(javascript, "../../dagger.mjs", "returnType") +@external(javascript, "../../dagger_ffi.mjs", "returnType") pub fn return_type(f: Function) -> TypeDef -@external(javascript, "../../dagger.mjs", "withArg") +@external(javascript, "../../dagger_ffi.mjs", "withArg") pub fn with_arg(f: Function, arg: FunctionArg) -> Function -@external(javascript, "../../dagger.mjs", "withDescription") +@external(javascript, "../../dagger_ffi.mjs", "withDescription") pub fn with_description(f: Function, description: String) -> Function diff --git a/sdk/gleam/demo/src/fluentci/dagger/function_arg.gleam b/sdk/gleam/demo/src/fluentci/dagger/function_arg.gleam index b29cb5b..afc312b 100644 --- a/sdk/gleam/demo/src/fluentci/dagger/function_arg.gleam +++ b/sdk/gleam/demo/src/fluentci/dagger/function_arg.gleam @@ -4,17 +4,17 @@ pub type JSON pub type FunctionArg -@external(javascript, "../../dagger.mjs", "id") +@external(javascript, "../../dagger_ffi.mjs", "id") pub fn id(f: FunctionArg) -> Promise(String) -@external(javascript, "../../dagger.mjs", "defaultValue") +@external(javascript, "../../dagger_ffi.mjs", "defaultValue") pub fn default_value(f: FunctionArg) -> Promise(JSON) -@external(javascript, "../../dagger.mjs", "description") +@external(javascript, "../../dagger_ffi.mjs", "description") pub fn description(f: FunctionArg) -> Promise(String) -@external(javascript, "../../dagger.mjs", "name") +@external(javascript, "../../dagger_ffi.mjs", "name") pub fn name(f: FunctionArg) -> Promise(String) -@external(javascript, "../../dagger.mjs", "typeDef") +@external(javascript, "../../dagger_ffi.mjs", "typeDef") pub fn type_def(f: FunctionArg) -> Promise(JSON) diff --git a/sdk/gleam/demo/src/fluentci/dagger/function_call.gleam b/sdk/gleam/demo/src/fluentci/dagger/function_call.gleam index caafed6..d24d0d3 100644 --- a/sdk/gleam/demo/src/fluentci/dagger/function_call.gleam +++ b/sdk/gleam/demo/src/fluentci/dagger/function_call.gleam @@ -6,20 +6,20 @@ import gleam/javascript/promise.{type Promise} pub type FunctionCall -@external(javascript, "../../dagger.mjs", "id") +@external(javascript, "../../dagger_ffi.mjs", "id") pub fn id(f: FunctionCall) -> Promise(String) -@external(javascript, "../../dagger.mjs", "inputArgs") +@external(javascript, "../../dagger_ffi.mjs", "inputArgs") pub fn input_args(f: FunctionCall) -> Promise(Array(FunctionCallArgValue)) -@external(javascript, "../../dagger.mjs", "name") +@external(javascript, "../../dagger_ffi.mjs", "name") pub fn name(f: FunctionCall) -> Promise(String) -@external(javascript, "../../dagger.mjs", "parent") +@external(javascript, "../../dagger_ffi.mjs", "parent") pub fn parent(f: FunctionCall) -> Promise(JSON) -@external(javascript, "../../dagger.mjs", "parentName") +@external(javascript, "../../dagger_ffi.mjs", "parentName") pub fn parent_name(f: FunctionCall) -> Promise(String) -@external(javascript, "../../dagger.mjs", "returnValue") +@external(javascript, "../../dagger_ffi.mjs", "returnValue") pub fn return_value(f: FunctionCall, value: JSON) -> Promise(Void) diff --git a/sdk/gleam/demo/src/fluentci/dagger/function_call_arg_value.gleam b/sdk/gleam/demo/src/fluentci/dagger/function_call_arg_value.gleam index 2aad3e0..ba90a66 100644 --- a/sdk/gleam/demo/src/fluentci/dagger/function_call_arg_value.gleam +++ b/sdk/gleam/demo/src/fluentci/dagger/function_call_arg_value.gleam @@ -3,11 +3,11 @@ import gleam/javascript/promise.{type Promise} pub type FunctionCallArgValue -@external(javascript, "../../dagger.mjs", "id") +@external(javascript, "../../dagger_ffi.mjs", "id") pub fn id(f: FunctionCallArgValue) -> Promise(String) -@external(javascript, "../../dagger.mjs", "name") +@external(javascript, "../../dagger_ffi.mjs", "name") pub fn name(f: FunctionCallArgValue) -> Promise(String) -@external(javascript, "../../dagger.mjs", "value") +@external(javascript, "../../dagger_ffi.mjs", "value") pub fn value(f: FunctionCallArgValue) -> Promise(JSON) diff --git a/sdk/gleam/demo/src/fluentci/dagger/generated_code.gleam b/sdk/gleam/demo/src/fluentci/dagger/generated_code.gleam index 4e06154..bbb785e 100644 --- a/sdk/gleam/demo/src/fluentci/dagger/generated_code.gleam +++ b/sdk/gleam/demo/src/fluentci/dagger/generated_code.gleam @@ -4,25 +4,25 @@ import gleam/javascript/promise.{type Promise} pub type GeneratedCode -@external(javascript, "../../dagger.mjs", "id") +@external(javascript, "../../dagger_ffi.mjs", "id") pub fn id(f: GeneratedCode) -> Promise(String) -@external(javascript, "../../dagger.mjs", "code") +@external(javascript, "../../dagger_ffi.mjs", "code") pub fn code(f: GeneratedCode) -> Directory -@external(javascript, "../../dagger.mjs", "vcsGeneratedPaths") +@external(javascript, "../../dagger_ffi.mjs", "vcsGeneratedPaths") pub fn vcs_generated_paths(f: GeneratedCode) -> Promise(Array(String)) -@external(javascript, "../../dagger.mjs", "vcsIgnoredPaths") +@external(javascript, "../../dagger_ffi.mjs", "vcsIgnoredPaths") pub fn vcs_ignored_paths(f: GeneratedCode) -> Promise(Array(String)) -@external(javascript, "../../dagger.mjs", "withVSCGeneratedPaths") +@external(javascript, "../../dagger_ffi.mjs", "withVSCGeneratedPaths") pub fn with_vsc_generated_paths( f: GeneratedCode, paths: Array(String), ) -> GeneratedCode -@external(javascript, "../../dagger.mjs", "withVSCIgnoredPaths") +@external(javascript, "../../dagger_ffi.mjs", "withVSCIgnoredPaths") pub fn with_vsc_ignored_paths( f: GeneratedCode, paths: Array(String), diff --git a/sdk/gleam/demo/src/fluentci/dagger/git.gleam b/sdk/gleam/demo/src/fluentci/dagger/git.gleam index 394eace..b19783f 100644 --- a/sdk/gleam/demo/src/fluentci/dagger/git.gleam +++ b/sdk/gleam/demo/src/fluentci/dagger/git.gleam @@ -5,29 +5,29 @@ import gleam/javascript/promise.{type Promise} pub type GitRepository -@external(javascript, "../../dagger.mjs", "id") +@external(javascript, "../../dagger_ffi.mjs", "id") pub fn id(git: GitRepository) -> Promise(String) -@external(javascript, "../../dagger.mjs", "branch") +@external(javascript, "../../dagger_ffi.mjs", "branch") pub fn branch(git: GitRepository, name: String) -> GitRef -@external(javascript, "../../dagger.mjs", "commit") +@external(javascript, "../../dagger_ffi.mjs", "commit") pub fn commit(git: GitRepository, id: String) -> GitRef -@external(javascript, "../../dagger.mjs", "head") +@external(javascript, "../../dagger_ffi.mjs", "head") pub fn head(git: GitRepository) -> GitRef -@external(javascript, "../../dagger.mjs", "ref") +@external(javascript, "../../dagger_ffi.mjs", "ref") pub fn ref(git: GitRepository, name: String) -> GitRef -@external(javascript, "../../dagger.mjs", "tag") +@external(javascript, "../../dagger_ffi.mjs", "tag") pub fn tag(git: GitRepository, name: String) -> GitRef -@external(javascript, "../../dagger.mjs", "tags") +@external(javascript, "../../dagger_ffi.mjs", "tags") pub fn tags(git: GitRepository) -> Array(String) -@external(javascript, "../../dagger.mjs", "withAuthHeader") +@external(javascript, "../../dagger_ffi.mjs", "withAuthHeader") pub fn with_auth_header(git: GitRepository, header: Secret) -> GitRepository -@external(javascript, "../../dagger.mjs", "withAuthToken") +@external(javascript, "../../dagger_ffi.mjs", "withAuthToken") pub fn with_auth_token(git: GitRepository, token: Secret) -> GitRepository diff --git a/sdk/gleam/demo/src/fluentci/dagger/git_module_source.gleam b/sdk/gleam/demo/src/fluentci/dagger/git_module_source.gleam index 9b1b55d..70586aa 100644 --- a/sdk/gleam/demo/src/fluentci/dagger/git_module_source.gleam +++ b/sdk/gleam/demo/src/fluentci/dagger/git_module_source.gleam @@ -3,26 +3,26 @@ import gleam/javascript/promise.{type Promise} pub type GitModuleSource -@external(javascript, "../../dagger.mjs", "id") +@external(javascript, "../../dagger_ffi.mjs", "id") pub fn id(module_source: GitModuleSource) -> Promise(String) -@external(javascript, "../../dagger.mjs", "cloneURL") +@external(javascript, "../../dagger_ffi.mjs", "cloneURL") pub fn clone_url(module_source: GitModuleSource) -> Promise(String) -@external(javascript, "../../dagger.mjs", "commit") +@external(javascript, "../../dagger_ffi.mjs", "commit") pub fn commit(module_source: GitModuleSource) -> Promise(String) -@external(javascript, "../../dagger.mjs", "contextDirectory") +@external(javascript, "../../dagger_ffi.mjs", "contextDirectory") pub fn context_directory(module_source: GitModuleSource) -> Directory -@external(javascript, "../../dagger.mjs", "htmlURL") +@external(javascript, "../../dagger_ffi.mjs", "htmlURL") pub fn html_url(module_source: GitModuleSource) -> Promise(String) -@external(javascript, "../../dagger.mjs", "root") +@external(javascript, "../../dagger_ffi.mjs", "root") pub fn root(module_source: GitModuleSource) -> Promise(String) -@external(javascript, "../../dagger.mjs", "rootSubpath") +@external(javascript, "../../dagger_ffi.mjs", "rootSubpath") pub fn root_subpath(module_source: GitModuleSource) -> Promise(String) -@external(javascript, "../../dagger.mjs", "version") +@external(javascript, "../../dagger_ffi.mjs", "version") pub fn version(module_source: GitModuleSource) -> Promise(String) diff --git a/sdk/gleam/demo/src/fluentci/dagger/git_ref.gleam b/sdk/gleam/demo/src/fluentci/dagger/git_ref.gleam index 6582e91..bc13a29 100644 --- a/sdk/gleam/demo/src/fluentci/dagger/git_ref.gleam +++ b/sdk/gleam/demo/src/fluentci/dagger/git_ref.gleam @@ -3,11 +3,11 @@ import gleam/javascript/promise.{type Promise} pub type GitRef -@external(javascript, "../../dagger.mjs", "id") +@external(javascript, "../../dagger_ffi.mjs", "id") pub fn id(git_ref: GitRef) -> Promise(String) -@external(javascript, "../../dagger.mjs", "commit") +@external(javascript, "../../dagger_ffi.mjs", "commit") pub fn commit(git_ref: GitRef) -> Promise(String) -@external(javascript, "../../dagger.mjs", "tree") +@external(javascript, "../../dagger_ffi.mjs", "tree") pub fn tree(git_ref: GitRef) -> Directory diff --git a/sdk/gleam/demo/src/fluentci/dagger/host.gleam b/sdk/gleam/demo/src/fluentci/dagger/host.gleam index bb4e231..72e1d04 100644 --- a/sdk/gleam/demo/src/fluentci/dagger/host.gleam +++ b/sdk/gleam/demo/src/fluentci/dagger/host.gleam @@ -7,23 +7,23 @@ import gleam/javascript/promise.{type Promise} pub type Host -@external(javascript, "../../dagger.mjs", "id") +@external(javascript, "../../dagger_ffi.mjs", "id") pub fn id(host: Host) -> Promise(String) -@external(javascript, "../../dagger.mjs", "directory") +@external(javascript, "../../dagger_ffi.mjs", "directory") pub fn directory(host: Host, path: String) -> Directory -@external(javascript, "../../dagger.mjs", "file") +@external(javascript, "../../dagger_ffi.mjs", "file") pub fn file(host: Host, path: String) -> File -@external(javascript, "../../dagger.mjs", "service") +@external(javascript, "../../dagger_ffi.mjs", "service") pub fn service(host: Host) -> Service -@external(javascript, "../../dagger.mjs", "setSecretFile") +@external(javascript, "../../dagger_ffi.mjs", "setSecretFile") pub fn set_secret_file(host: Host, name: String, path: String) -> Secret -@external(javascript, "../../dagger.mjs", "tunnel") +@external(javascript, "../../dagger_ffi.mjs", "tunnel") pub fn tunnel(host: Host, service: Service) -> Service -@external(javascript, "../../dagger.mjs", "unixSocket") +@external(javascript, "../../dagger_ffi.mjs", "unixSocket") pub fn unix_socket(host: Host, path: String) -> Socket diff --git a/sdk/gleam/demo/src/fluentci/dagger/local_module_source.gleam b/sdk/gleam/demo/src/fluentci/dagger/local_module_source.gleam index 578bab4..7a172f0 100644 --- a/sdk/gleam/demo/src/fluentci/dagger/local_module_source.gleam +++ b/sdk/gleam/demo/src/fluentci/dagger/local_module_source.gleam @@ -2,5 +2,5 @@ import gleam/javascript/promise.{type Promise} pub type LocalModuleSource -@external(javascript, "../../dagger.mjs", "id") +@external(javascript, "../../dagger_ffi.mjs", "id") pub fn id(module_source: LocalModuleSource) -> Promise(String) diff --git a/sdk/gleam/demo/src/fluentci/dagger/module.gleam b/sdk/gleam/demo/src/fluentci/dagger/module.gleam index 8ad35ec..ba443da 100644 --- a/sdk/gleam/demo/src/fluentci/dagger/module.gleam +++ b/sdk/gleam/demo/src/fluentci/dagger/module.gleam @@ -9,11 +9,11 @@ pub type ModuleDependency pub type ModuleSourceView -@external(javascript, "../../dagger.mjs", "id") +@external(javascript, "../../dagger_ffi.mjs", "id") pub fn id(module: Module) -> Promise(String) -@external(javascript, "../../dagger.mjs", "dependencies") +@external(javascript, "../../dagger_ffi.mjs", "dependencies") pub fn dependencies(module: Module) -> Promise(Array(Module)) -@external(javascript, "../../dagger.mjs", "dependencyConfig") +@external(javascript, "../../dagger_ffi.mjs", "dependencyConfig") pub fn dependency_config(module: Module) -> Promise(Array(ModuleDependency)) diff --git a/sdk/gleam/demo/src/fluentci/dagger/module_dependency.gleam b/sdk/gleam/demo/src/fluentci/dagger/module_dependency.gleam index 75cd894..9806b8f 100644 --- a/sdk/gleam/demo/src/fluentci/dagger/module_dependency.gleam +++ b/sdk/gleam/demo/src/fluentci/dagger/module_dependency.gleam @@ -1,11 +1,11 @@ import fluentci/dagger/module.{type ModuleDependency, type ModuleSource} import gleam/javascript/promise.{type Promise} -@external(javascript, "../../dagger.mjs", "id") +@external(javascript, "../../dagger_ffi.mjs", "id") pub fn id(module_dependency: ModuleDependency) -> Promise(String) -@external(javascript, "../../dagger.mjs", "name") +@external(javascript, "../../dagger_ffi.mjs", "name") pub fn name(module_dependency: ModuleDependency) -> Promise(String) -@external(javascript, "../../dagger.mjs", "source") +@external(javascript, "../../dagger_ffi.mjs", "source") pub fn source(module_dependency: ModuleDependency) -> ModuleSource diff --git a/sdk/gleam/demo/src/fluentci/dagger/module_source.gleam b/sdk/gleam/demo/src/fluentci/dagger/module_source.gleam index 3781fd9..c7f40e3 100644 --- a/sdk/gleam/demo/src/fluentci/dagger/module_source.gleam +++ b/sdk/gleam/demo/src/fluentci/dagger/module_source.gleam @@ -7,101 +7,101 @@ import fluentci/dagger/module.{ import gleam/javascript/array.{type Array} import gleam/javascript/promise.{type Promise} -@external(javascript, "../../dagger.mjs", "id") +@external(javascript, "../../dagger_ffi.mjs", "id") pub fn id(module_source: ModuleSource) -> Promise(String) -@external(javascript, "../../dagger.mjs", "asGitSource") +@external(javascript, "../../dagger_ffi.mjs", "asGitSource") pub fn as_git_source(module_source: ModuleSource) -> GitModuleSource -@external(javascript, "../../dagger.mjs", "asLocalSource") +@external(javascript, "../../dagger_ffi.mjs", "asLocalSource") pub fn as_local_source(module_source: ModuleSource) -> LocalModuleSource -@external(javascript, "../../dagger.mjs", "asModule") +@external(javascript, "../../dagger_ffi.mjs", "asModule") pub fn as_module(module_source: ModuleSource) -> Module -@external(javascript, "../../dagger.mjs", "asString") +@external(javascript, "../../dagger_ffi.mjs", "asString") pub fn as_string(module_source: ModuleSource) -> Promise(String) -@external(javascript, "../../dagger.mjs", "configExists") +@external(javascript, "../../dagger_ffi.mjs", "configExists") pub fn config_exists(module_source: ModuleSource) -> Promise(bool) -@external(javascript, "../../dagger.mjs", "contextDirectory") +@external(javascript, "../../dagger_ffi.mjs", "contextDirectory") pub fn context_directory(module_source: ModuleSource) -> Directory -@external(javascript, "../../dagger.mjs", "dependencies") +@external(javascript, "../../dagger_ffi.mjs", "dependencies") pub fn dependencies( module_source: ModuleSource, ) -> Promise(Array(ModuleDependency)) -@external(javascript, "../../dagger.mjs", "directory") +@external(javascript, "../../dagger_ffi.mjs", "directory") pub fn directory(module_source: ModuleSource, path: String) -> Directory -@external(javascript, "../../dagger.mjs", "kind") +@external(javascript, "../../dagger_ffi.mjs", "kind") pub fn kind(module_source: ModuleSource) -> Promise(String) -@external(javascript, "../../dagger.mjs", "moduleName") +@external(javascript, "../../dagger_ffi.mjs", "moduleName") pub fn module_name(module_source: ModuleSource) -> Promise(String) -@external(javascript, "../../dagger.mjs", "moduleOriginalName") +@external(javascript, "../../dagger_ffi.mjs", "moduleOriginalName") pub fn module_original_name(module_source: ModuleSource) -> Promise(String) -@external(javascript, "../../dagger.mjs", "resolveContextPathFromCaller") +@external(javascript, "../../dagger_ffi.mjs", "resolveContextPathFromCaller") pub fn resolve_context_path_from_caller( module_source: ModuleSource, ) -> Promise(String) -@external(javascript, "../../dagger.mjs", "resolveDependency") +@external(javascript, "../../dagger_ffi.mjs", "resolveDependency") pub fn resolve_dependency( module_source: ModuleSource, dep: ModuleSource, ) -> ModuleSource -@external(javascript, "../../dagger.mjs", "resolveDirectoryFromCaller") +@external(javascript, "../../dagger_ffi.mjs", "resolveDirectoryFromCaller") pub fn resolve_directory_from_caller( module_source: ModuleSource, path: String, ) -> Directory -@external(javascript, "../../dagger.mjs", "resolveFromCaller") +@external(javascript, "../../dagger_ffi.mjs", "resolveFromCaller") pub fn resolve_from_caller(module_source: ModuleSource) -> ModuleSource -@external(javascript, "../../dagger.mjs", "sourceRootSubpath") +@external(javascript, "../../dagger_ffi.mjs", "sourceRootSubpath") pub fn source_root_subpath(module_source: ModuleSource) -> Promise(String) -@external(javascript, "../../dagger.mjs", "sourceDubpath") +@external(javascript, "../../dagger_ffi.mjs", "sourceDubpath") pub fn source_dubpath(module_source: ModuleSource) -> Promise(String) -@external(javascript, "../../dagger.mjs", "view") +@external(javascript, "../../dagger_ffi.mjs", "view") pub fn view(module_source: ModuleSource, name: String) -> ModuleSourceView -@external(javascript, "../../dagger.mjs", "views") +@external(javascript, "../../dagger_ffi.mjs", "views") pub fn views(module_source: ModuleSource) -> Promise(Array(ModuleSourceView)) -@external(javascript, "../../dagger.mjs", "withContextDirectory") +@external(javascript, "../../dagger_ffi.mjs", "withContextDirectory") pub fn with_context_directory( module_source: ModuleSource, directory: Directory, ) -> ModuleSource -@external(javascript, "../../dagger.mjs", "withDependencies") +@external(javascript, "../../dagger_ffi.mjs", "withDependencies") pub fn with_dependencies( module_source: ModuleSource, dependencies: Array(ModuleDependency), ) -> ModuleSource -@external(javascript, "../../dagger.mjs", "withName") +@external(javascript, "../../dagger_ffi.mjs", "withName") pub fn with_name(module_source: ModuleSource, name: String) -> ModuleSource -@external(javascript, "../../dagger.mjs", "withSdk") +@external(javascript, "../../dagger_ffi.mjs", "withSdk") pub fn with_sdk(module_source: ModuleSource, sdk: String) -> ModuleSource -@external(javascript, "../../dagger.mjs", "withSourceSubpath") +@external(javascript, "../../dagger_ffi.mjs", "withSourceSubpath") pub fn with_source_subpath( module_source: ModuleSource, path: String, ) -> ModuleSource -@external(javascript, "../../dagger.mjs", "withView") +@external(javascript, "../../dagger_ffi.mjs", "withView") pub fn with_view( module_source: ModuleSource, patterns: Array(String), diff --git a/sdk/gleam/demo/src/fluentci/dagger/module_source_view.gleam b/sdk/gleam/demo/src/fluentci/dagger/module_source_view.gleam index 51dfad6..b02ff9f 100644 --- a/sdk/gleam/demo/src/fluentci/dagger/module_source_view.gleam +++ b/sdk/gleam/demo/src/fluentci/dagger/module_source_view.gleam @@ -2,11 +2,11 @@ import fluentci/dagger/module.{type ModuleSourceView} import gleam/javascript/array.{type Array} import gleam/javascript/promise.{type Promise} -@external(javascript, "../../dagger.mjs", "id") +@external(javascript, "../../dagger_ffi.mjs", "id") pub fn id(module_source_view: ModuleSourceView) -> Promise(String) -@external(javascript, "../../dagger.mjs", "name") +@external(javascript, "../../dagger_ffi.mjs", "name") pub fn name(module_source_view: ModuleSourceView) -> Promise(String) -@external(javascript, "../../dagger.mjs", "patterns") +@external(javascript, "../../dagger_ffi.mjs", "patterns") pub fn patterns(module_source_view: ModuleSourceView) -> Promise(Array(String)) diff --git a/sdk/gleam/demo/src/fluentci/dagger/port.gleam b/sdk/gleam/demo/src/fluentci/dagger/port.gleam index 7c8bc20..b5615d5 100644 --- a/sdk/gleam/demo/src/fluentci/dagger/port.gleam +++ b/sdk/gleam/demo/src/fluentci/dagger/port.gleam @@ -2,17 +2,17 @@ import gleam/javascript/promise.{type Promise} pub type Port -@external(javascript, "../../dagger.mjs", "id") +@external(javascript, "../../dagger_ffi.mjs", "id") pub fn id(port: Port) -> Promise(String) -@external(javascript, "../../dagger.mjs", "description") +@external(javascript, "../../dagger_ffi.mjs", "description") pub fn description(port: Port) -> Promise(String) -@external(javascript, "../../dagger.mjs", "experimentalSkipHealthcheck") +@external(javascript, "../../dagger_ffi.mjs", "experimentalSkipHealthcheck") pub fn experimental_skip_healthcheck(port: Port) -> Promise(Bool) -@external(javascript, "../../dagger.mjs", "port") +@external(javascript, "../../dagger_ffi.mjs", "port") pub fn port(port: Port) -> Promise(Int) -@external(javascript, "../../dagger.mjs", "protocol") +@external(javascript, "../../dagger_ffi.mjs", "protocol") pub fn protocol(port: Port) -> Promise(String) diff --git a/sdk/gleam/demo/src/fluentci/dagger/secret.gleam b/sdk/gleam/demo/src/fluentci/dagger/secret.gleam index d5bdf59..fcf926d 100644 --- a/sdk/gleam/demo/src/fluentci/dagger/secret.gleam +++ b/sdk/gleam/demo/src/fluentci/dagger/secret.gleam @@ -2,11 +2,11 @@ import gleam/javascript/promise.{type Promise} pub type Secret -@external(javascript, "../../dagger.mjs", "id") +@external(javascript, "../../dagger_ffi.mjs", "id") pub fn id(secret: Secret) -> Promise(String) -@external(javascript, "../../dagger.mjs", "name") +@external(javascript, "../../dagger_ffi.mjs", "name") pub fn name(secret: Secret) -> Promise(String) -@external(javascript, "../../dagger.mjs", "plaintext") +@external(javascript, "../../dagger_ffi.mjs", "plaintext") pub fn plaintext(secret: Secret) -> Promise(String) diff --git a/sdk/gleam/demo/src/fluentci/dagger/service.gleam b/sdk/gleam/demo/src/fluentci/dagger/service.gleam index 77bde1b..ed9c742 100644 --- a/sdk/gleam/demo/src/fluentci/dagger/service.gleam +++ b/sdk/gleam/demo/src/fluentci/dagger/service.gleam @@ -5,23 +5,23 @@ import gleam/javascript/promise.{type Promise} pub type Service -@external(javascript, "../../dagger.mjs", "id") +@external(javascript, "../../dagger_ffi.mjs", "id") pub fn id(service: Service) -> Promise(String) -@external(javascript, "../../dagger.mjs", "endpoint") +@external(javascript, "../../dagger_ffi.mjs", "endpoint") pub fn endpoint(service: Service) -> Promise(String) -@external(javascript, "../../dagger.mjs", "hostname") +@external(javascript, "../../dagger_ffi.mjs", "hostname") pub fn hostname(service: Service) -> Promise(String) -@external(javascript, "../../dagger.mjs", "ports") +@external(javascript, "../../dagger_ffi.mjs", "ports") pub fn ports(service: Service) -> Promise(Array(Port)) -@external(javascript, "../../dagger.mjs", "start") +@external(javascript, "../../dagger_ffi.mjs", "start") pub fn start(service: Service) -> Promise(Service) -@external(javascript, "../../dagger.mjs", "stop") +@external(javascript, "../../dagger_ffi.mjs", "stop") pub fn stop(service: Service) -> Promise(Service) -@external(javascript, "../../dagger.mjs", "up") +@external(javascript, "../../dagger_ffi.mjs", "up") pub fn up(service: Service) -> Promise(Void) diff --git a/sdk/gleam/demo/src/fluentci/dagger/socket.gleam b/sdk/gleam/demo/src/fluentci/dagger/socket.gleam index ba85b4a..d89b297 100644 --- a/sdk/gleam/demo/src/fluentci/dagger/socket.gleam +++ b/sdk/gleam/demo/src/fluentci/dagger/socket.gleam @@ -2,5 +2,5 @@ import gleam/javascript/promise.{type Promise} pub type Socket -@external(javascript, "../../dagger.mjs", "id") +@external(javascript, "../../dagger_ffi.mjs", "id") pub fn id(socket: Socket) -> Promise(String) diff --git a/sdk/gleam/demo/src/fluentci/dagger/terminal.gleam b/sdk/gleam/demo/src/fluentci/dagger/terminal.gleam index 3252102..4d45b3f 100644 --- a/sdk/gleam/demo/src/fluentci/dagger/terminal.gleam +++ b/sdk/gleam/demo/src/fluentci/dagger/terminal.gleam @@ -2,5 +2,5 @@ import gleam/javascript/promise.{type Promise} pub type Terminal -@external(javascript, "../../dagger.mjs", "id") +@external(javascript, "../../dagger_ffi.mjs", "id") pub fn id(terminal: Terminal) -> Promise(String) diff --git a/sdk/gleam/demo/src/fluentci/dagger/type_def.gleam b/sdk/gleam/demo/src/fluentci/dagger/type_def.gleam index 403f2cc..190323a 100644 --- a/sdk/gleam/demo/src/fluentci/dagger/type_def.gleam +++ b/sdk/gleam/demo/src/fluentci/dagger/type_def.gleam @@ -3,8 +3,8 @@ import gleam/javascript/promise.{type Promise} pub type TypeDef -@external(javascript, "../../dagger.mjs", "id") +@external(javascript, "../../dagger_ffi.mjs", "id") pub fn id(t: TypeDef) -> Promise(String) -@external(javascript, "../../dagger.mjs", "asEnum") +@external(javascript, "../../dagger_ffi.mjs", "asEnum") pub fn as_enum(t: TypeDef) -> EnumTypeDef diff --git a/sdk/gleam/demo/src/fluentci/devbox.gleam b/sdk/gleam/demo/src/fluentci/devbox.gleam index 21912d1..c808ad0 100644 --- a/sdk/gleam/demo/src/fluentci/devbox.gleam +++ b/sdk/gleam/demo/src/fluentci/devbox.gleam @@ -6,39 +6,39 @@ import gleam/javascript/promise.{type Promise} pub type Devbox -@external(javascript, "../fluentci.mjs", "asService") +@external(javascript, "../fluentci_ffi.mjs", "asService") pub fn as_service(devbox: Devbox) -> Service -@external(javascript, "../fluentci.mjs", "id") +@external(javascript, "../fluentci_ffi.mjs", "id") pub fn id(devbox: Devbox) -> Promise(String) -@external(javascript, "../fluentci.mjs", "stderr") +@external(javascript, "../fluentci_ffi.mjs", "stderr") pub fn stderr(devbox: Devbox) -> Promise(String) -@external(javascript, "../fluentci.mjs", "stdout") +@external(javascript, "../fluentci_ffi.mjs", "stdout") pub fn stdout(devbox: Devbox) -> Promise(String) -@external(javascript, "../fluentci.mjs", "waitOn") +@external(javascript, "../fluentci_ffi.mjs", "waitOn") pub fn wait_on(devbox: Devbox, port: int, timeout: int) -> Devbox -@external(javascript, "../fluentci.mjs", "withCache") +@external(javascript, "../fluentci_ffi.mjs", "withCache") pub fn with_cache(devbox: Devbox, cache: Cache) -> Devbox -@external(javascript, "../fluentci.mjs", "withEnvVariable") +@external(javascript, "../fluentci_ffi.mjs", "withEnvVariable") pub fn with_env_variable(devbox: Devbox, name: String, value: String) -> Devbox -@external(javascript, "../fluentci.mjs", "withExec") +@external(javascript, "../fluentci_ffi.mjs", "withExec") pub fn with_exec(devbox: Devbox, command: Array(String)) -> Devbox -@external(javascript, "../fluentci.mjs", "withSecretVariable") +@external(javascript, "../fluentci_ffi.mjs", "withSecretVariable") pub fn with_secret_variable( devbox: Devbox, name: String, secret: Secret, ) -> Devbox -@external(javascript, "../fluentci.mjs", "withService") +@external(javascript, "../fluentci_ffi.mjs", "withService") pub fn with_service(devbox: Devbox, service: Service) -> Devbox -@external(javascript, "../fluentci.mjs", "withWorkdir") +@external(javascript, "../fluentci_ffi.mjs", "withWorkdir") pub fn with_workdir(devbox: Devbox, path: String) -> Devbox diff --git a/sdk/gleam/demo/src/fluentci/devenv.gleam b/sdk/gleam/demo/src/fluentci/devenv.gleam index 34c02ae..5d1dad9 100644 --- a/sdk/gleam/demo/src/fluentci/devenv.gleam +++ b/sdk/gleam/demo/src/fluentci/devenv.gleam @@ -6,39 +6,39 @@ import gleam/javascript/promise.{type Promise} pub type Devenv -@external(javascript, "../fluentci.mjs", "asService") +@external(javascript, "../fluentci_ffi.mjs", "asService") pub fn as_service(devenv: Devenv) -> Service -@external(javascript, "../fluentci.mjs", "id") +@external(javascript, "../fluentci_ffi.mjs", "id") pub fn id(devenv: Devenv) -> Promise(String) -@external(javascript, "../fluentci.mjs", "stderr") +@external(javascript, "../fluentci_ffi.mjs", "stderr") pub fn stderr(devenv: Devenv) -> Promise(String) -@external(javascript, "../fluentci.mjs", "stdout") +@external(javascript, "../fluentci_ffi.mjs", "stdout") pub fn stdout(devenv: Devenv) -> Promise(String) -@external(javascript, "../fluentci.mjs", "waitOn") +@external(javascript, "../fluentci_ffi.mjs", "waitOn") pub fn wait_on(devenv: Devenv, port: int, timeout: int) -> Devenv -@external(javascript, "../fluentci.mjs", "withCache") +@external(javascript, "../fluentci_ffi.mjs", "withCache") pub fn with_cache(devenv: Devenv, cache: Cache) -> Devenv -@external(javascript, "../fluentci.mjs", "withEnvVariable") +@external(javascript, "../fluentci_ffi.mjs", "withEnvVariable") pub fn with_env_variable(devenv: Devenv, name: String, value: String) -> Devenv -@external(javascript, "../fluentci.mjs", "withExec") +@external(javascript, "../fluentci_ffi.mjs", "withExec") pub fn with_exec(devenv: Devenv, command: Array(String)) -> Devenv -@external(javascript, "../fluentci.mjs", "withSecretVariable") +@external(javascript, "../fluentci_ffi.mjs", "withSecretVariable") pub fn with_secret_variable( devenv: Devenv, name: String, secret: Secret, ) -> Devenv -@external(javascript, "../fluentci.mjs", "withService") +@external(javascript, "../fluentci_ffi.mjs", "withService") pub fn with_service(devenv: Devenv, service: Service) -> Devenv -@external(javascript, "../fluentci.mjs", "withWorkdir") +@external(javascript, "../fluentci_ffi.mjs", "withWorkdir") pub fn with_workdir(devenv: Devenv, path: String) -> Devenv diff --git a/sdk/gleam/demo/src/fluentci/directory.gleam b/sdk/gleam/demo/src/fluentci/directory.gleam index b2135d8..99d2ef5 100644 --- a/sdk/gleam/demo/src/fluentci/directory.gleam +++ b/sdk/gleam/demo/src/fluentci/directory.gleam @@ -13,71 +13,71 @@ import gleam/javascript/promise.{type Promise} pub type Directory -@external(javascript, "../fluentci.mjs", "devbox") +@external(javascript, "../fluentci_ffi.mjs", "devbox") pub fn devbox(d: Directory) -> Devbox -@external(javascript, "../fluentci.mjs", "devenv") +@external(javascript, "../fluentci_ffi.mjs", "devenv") pub fn devenv(d: Directory) -> Devenv -@external(javascript, "../fluentci.mjs", "entries") +@external(javascript, "../fluentci_ffi.mjs", "entries") pub fn entries(d: Directory) -> Promise(Array(String)) -@external(javascript, "../fluentci.mjs", "flox") +@external(javascript, "../fluentci_ffi.mjs", "flox") pub fn flox(d: Directory) -> Flox -@external(javascript, "../fluentci.mjs", "mise") +@external(javascript, "../fluentci_ffi.mjs", "mise") pub fn mise(d: Directory) -> Mise -@external(javascript, "../fluentci.mjs", "nix") +@external(javascript, "../fluentci_ffi.mjs", "nix") pub fn nix(d: Directory) -> Nix -@external(javascript, "../fluentci.mjs", "pixi") +@external(javascript, "../fluentci_ffi.mjs", "pixi") pub fn pixi(d: Directory) -> Pixi -@external(javascript, "../fluentci.mjs", "pkgx") +@external(javascript, "../fluentci_ffi.mjs", "pkgx") pub fn pkgx(d: Directory) -> Pkgx -@external(javascript, "../fluentci.mjs", "directory") +@external(javascript, "../fluentci_ffi.mjs", "directory") pub fn directory(d: Directory, path: String) -> Directory -@external(javascript, "../fluentci.mjs", "stderr") +@external(javascript, "../fluentci_ffi.mjs", "stderr") pub fn stderr(d: Directory) -> Promise(String) -@external(javascript, "../fluentci.mjs", "stdout") +@external(javascript, "../fluentci_ffi.mjs", "stdout") pub fn stdout(d: Directory) -> Promise(String) -@external(javascript, "../fluentci.mjs", "waitOn") +@external(javascript, "../fluentci_ffi.mjs", "waitOn") pub fn wait_on(d: Directory, port: int, timeout: int) -> Directory -@external(javascript, "../fluentci.mjs", "withCache") +@external(javascript, "../fluentci_ffi.mjs", "withCache") pub fn with_cache(d: Directory, cache: Cache) -> Directory -@external(javascript, "../fluentci.mjs", "withEnvVariable") +@external(javascript, "../fluentci_ffi.mjs", "withEnvVariable") pub fn with_env_variable(d: Directory, name: String, value: String) -> Directory -@external(javascript, "../fluentci.mjs", "withExec") +@external(javascript, "../fluentci_ffi.mjs", "withExec") pub fn with_exec(d: Directory, command: Array(String)) -> Directory -@external(javascript, "../fluentci.mjs", "withSecretVariable") +@external(javascript, "../fluentci_ffi.mjs", "withSecretVariable") pub fn with_secret_variable( d: Directory, name: String, secret: Secret, ) -> Directory -@external(javascript, "../fluentci.mjs", "withService") +@external(javascript, "../fluentci_ffi.mjs", "withService") pub fn with_service(d: Directory, service: Service) -> Directory -@external(javascript, "../fluentci.mjs", "withWorkdir") +@external(javascript, "../fluentci_ffi.mjs", "withWorkdir") pub fn with_workdir(d: Directory, path: String) -> Directory -@external(javascript, "../fluentci.mjs", "withFile") +@external(javascript, "../fluentci_ffi.mjs", "withFile") pub fn with_file(d: Directory, file_id: String) -> Directory -@external(javascript, "../fluentci.mjs", "zip") +@external(javascript, "../fluentci_ffi.mjs", "zip") pub fn zip(d: Directory) -> File -@external(javascript, "../fluentci.mjs", "tarCzvf") +@external(javascript, "../fluentci_ffi.mjs", "tarCzvf") pub fn tar_czvf(d: Directory) -> File pub type File diff --git a/sdk/gleam/demo/src/fluentci/envhub.gleam b/sdk/gleam/demo/src/fluentci/envhub.gleam index b3ff828..9b99f7b 100644 --- a/sdk/gleam/demo/src/fluentci/envhub.gleam +++ b/sdk/gleam/demo/src/fluentci/envhub.gleam @@ -6,42 +6,42 @@ import gleam/javascript/promise.{type Promise} pub type Envhub -@external(javascript, "../fluentci.mjs", "asService") +@external(javascript, "../fluentci_ffi.mjs", "asService") pub fn as_service(envhub: Envhub) -> Service -@external(javascript, "../fluentci.mjs", "id") +@external(javascript, "../fluentci_ffi.mjs", "id") pub fn id(envhub: Envhub) -> Promise(String) -@external(javascript, "../fluentci.mjs", "stderr") +@external(javascript, "../fluentci_ffi.mjs", "stderr") pub fn stderr(envhub: Envhub) -> Promise(String) -@external(javascript, "../fluentci.mjs", "stdout") +@external(javascript, "../fluentci_ffi.mjs", "stdout") pub fn stdout(envhub: Envhub) -> Promise(String) -@external(javascript, "../fluentci.mjs", "use") +@external(javascript, "../fluentci_ffi.mjs", "use") pub fn use_environment(envhub: Envhub, environment: String) -> Envhub -@external(javascript, "../fluentci.mjs", "waitOn") +@external(javascript, "../fluentci_ffi.mjs", "waitOn") pub fn wait_on(envhub: Envhub, port: int, timeout: int) -> Envhub -@external(javascript, "../fluentci.mjs", "withCache") +@external(javascript, "../fluentci_ffi.mjs", "withCache") pub fn with_cache(envhub: Envhub, cache: Cache) -> Envhub -@external(javascript, "../fluentci.mjs", "withEnvVariable") +@external(javascript, "../fluentci_ffi.mjs", "withEnvVariable") pub fn with_env_variable(envhub: Envhub, name: String, value: String) -> Envhub -@external(javascript, "../fluentci.mjs", "withExec") +@external(javascript, "../fluentci_ffi.mjs", "withExec") pub fn with_exec(envhub: Envhub, command: Array(String)) -> Envhub -@external(javascript, "../fluentci.mjs", "withSecretVariable") +@external(javascript, "../fluentci_ffi.mjs", "withSecretVariable") pub fn with_secret_variable( envhub: Envhub, name: String, secret: Secret, ) -> Envhub -@external(javascript, "../fluentci.mjs", "withService") +@external(javascript, "../fluentci_ffi.mjs", "withService") pub fn with_service(envhub: Envhub, service: Service) -> Envhub -@external(javascript, "../fluentci.mjs", "withWorkdir") +@external(javascript, "../fluentci_ffi.mjs", "withWorkdir") pub fn with_workdir(envhub: Envhub, path: String) -> Envhub diff --git a/sdk/gleam/demo/src/fluentci/file.gleam b/sdk/gleam/demo/src/fluentci/file.gleam index f87656c..f65616d 100644 --- a/sdk/gleam/demo/src/fluentci/file.gleam +++ b/sdk/gleam/demo/src/fluentci/file.gleam @@ -1,26 +1,26 @@ import fluentci/directory.{type Directory, type File} import gleam/javascript/promise.{type Promise} -@external(javascript, "../fluentci.mjs", "id") +@external(javascript, "../fluentci_ffi.mjs", "id") pub fn id(f: File) -> Promise(String) -@external(javascript, "../fluentci.mjs", "chmod") +@external(javascript, "../fluentci_ffi.mjs", "chmod") pub fn chmod(f: File, mode: int) -> Promise(File) -@external(javascript, "../fluentci.mjs", "md5") +@external(javascript, "../fluentci_ffi.mjs", "md5") pub fn md5(f: File) -> Promise(String) -@external(javascript, "../fluentci.mjs", "path") +@external(javascript, "../fluentci_ffi.mjs", "path") pub fn path(f: File) -> Promise(String) -@external(javascript, "../fluentci.mjs", "sha256") +@external(javascript, "../fluentci_ffi.mjs", "sha256") pub fn sha256(f: File) -> Promise(String) -@external(javascript, "../fluentci.mjs", "tarCzvf") +@external(javascript, "../fluentci_ffi.mjs", "tarCzvf") pub fn tar_czvf(f: File, output_dir: String) -> Directory -@external(javascript, "../fluentci.mjs", "unzip") +@external(javascript, "../fluentci_ffi.mjs", "unzip") pub fn unzip(f: File, output_dir: String) -> Directory -@external(javascript, "../fluentci.mjs", "zip") +@external(javascript, "../fluentci_ffi.mjs", "zip") pub fn zip(f: File) -> Directory diff --git a/sdk/gleam/demo/src/fluentci/flox.gleam b/sdk/gleam/demo/src/fluentci/flox.gleam index f54cd21..1009415 100644 --- a/sdk/gleam/demo/src/fluentci/flox.gleam +++ b/sdk/gleam/demo/src/fluentci/flox.gleam @@ -6,35 +6,35 @@ import gleam/javascript/promise.{type Promise} pub type Flox -@external(javascript, "../fluentci.mjs", "asService") +@external(javascript, "../fluentci_ffi.mjs", "asService") pub fn as_service(flox: Flox) -> Service -@external(javascript, "../fluentci.mjs", "id") +@external(javascript, "../fluentci_ffi.mjs", "id") pub fn id(flox: Flox) -> Promise(String) -@external(javascript, "../fluentci.mjs", "stderr") +@external(javascript, "../fluentci_ffi.mjs", "stderr") pub fn stderr(flox: Flox) -> Promise(String) -@external(javascript, "../fluentci.mjs", "stdout") +@external(javascript, "../fluentci_ffi.mjs", "stdout") pub fn stdout(flox: Flox) -> Promise(String) -@external(javascript, "../fluentci.mjs", "waitOn") +@external(javascript, "../fluentci_ffi.mjs", "waitOn") pub fn wait_on(flox: Flox, port: int, timeout: int) -> Flox -@external(javascript, "../fluentci.mjs", "withCache") +@external(javascript, "../fluentci_ffi.mjs", "withCache") pub fn with_cache(flox: Flox, cache: Cache) -> Flox -@external(javascript, "../fluentci.mjs", "withEnvVariable") +@external(javascript, "../fluentci_ffi.mjs", "withEnvVariable") pub fn with_env_variable(flox: Flox, name: String, value: String) -> Flox -@external(javascript, "../fluentci.mjs", "withExec") +@external(javascript, "../fluentci_ffi.mjs", "withExec") pub fn with_exec(flox: Flox, command: Array(String)) -> Flox -@external(javascript, "../fluentci.mjs", "withSecretVariable") +@external(javascript, "../fluentci_ffi.mjs", "withSecretVariable") pub fn with_secret_variable(flox: Flox, name: String, secret: Secret) -> Flox -@external(javascript, "../fluentci.mjs", "withService") +@external(javascript, "../fluentci_ffi.mjs", "withService") pub fn with_service(flox: Flox, service: Service) -> Flox -@external(javascript, "../fluentci.mjs", "withWorkdir") +@external(javascript, "../fluentci_ffi.mjs", "withWorkdir") pub fn with_workdir(flox: Flox, path: String) -> Flox diff --git a/sdk/gleam/demo/src/fluentci/git.gleam b/sdk/gleam/demo/src/fluentci/git.gleam index f2b0bbb..4b8fda6 100644 --- a/sdk/gleam/demo/src/fluentci/git.gleam +++ b/sdk/gleam/demo/src/fluentci/git.gleam @@ -3,14 +3,14 @@ import gleam/javascript/promise.{type Promise} pub type Git -@external(javascript, "../fluentci.mjs", "git") +@external(javascript, "../fluentci_ffi.mjs", "git") pub fn branch(g: Git, name: String) -> Git -@external(javascript, "../fluentci.mjs", "commit") +@external(javascript, "../fluentci_ffi.mjs", "commit") pub fn commit(g: Git) -> Git -@external(javascript, "../fluentci.mjs", "id") +@external(javascript, "../fluentci_ffi.mjs", "id") pub fn id(g: Git) -> Promise(String) -@external(javascript, "../fluentci.mjs", "tree") +@external(javascript, "../fluentci_ffi.mjs", "tree") pub fn tree(g: Git) -> Directory diff --git a/sdk/gleam/demo/src/fluentci/mise.gleam b/sdk/gleam/demo/src/fluentci/mise.gleam index 6cf92aa..7e24b81 100644 --- a/sdk/gleam/demo/src/fluentci/mise.gleam +++ b/sdk/gleam/demo/src/fluentci/mise.gleam @@ -6,35 +6,35 @@ import gleam/javascript/promise.{type Promise} pub type Mise -@external(javascript, "../fluentci.mjs", "asService") +@external(javascript, "../fluentci_ffi.mjs", "asService") pub fn as_service(mise: Mise) -> Service -@external(javascript, "../fluentci.mjs", "id") +@external(javascript, "../fluentci_ffi.mjs", "id") pub fn id(mise: Mise) -> Promise(String) -@external(javascript, "../fluentci.mjs", "stderr") +@external(javascript, "../fluentci_ffi.mjs", "stderr") pub fn stderr(mise: Mise) -> Promise(String) -@external(javascript, "../fluentci.mjs", "stdout") +@external(javascript, "../fluentci_ffi.mjs", "stdout") pub fn stdout(mise: Mise) -> Promise(String) -@external(javascript, "../fluentci.mjs", "waitOn") +@external(javascript, "../fluentci_ffi.mjs", "waitOn") pub fn wait_on(mise: Mise, port: int, timeout: int) -> Mise -@external(javascript, "../fluentci.mjs", "withCache") +@external(javascript, "../fluentci_ffi.mjs", "withCache") pub fn with_cache(mise: Mise, cache: Cache) -> Mise -@external(javascript, "../fluentci.mjs", "withEnvVariable") +@external(javascript, "../fluentci_ffi.mjs", "withEnvVariable") pub fn with_env_variable(mise: Mise, name: String, value: String) -> Mise -@external(javascript, "../fluentci.mjs", "withExec") +@external(javascript, "../fluentci_ffi.mjs", "withExec") pub fn with_exec(mise: Mise, command: Array(String)) -> Mise -@external(javascript, "../fluentci.mjs", "withSecretVariable") +@external(javascript, "../fluentci_ffi.mjs", "withSecretVariable") pub fn with_secret_variable(mise: Mise, name: String, secret: Secret) -> Mise -@external(javascript, "../fluentci.mjs", "withService") +@external(javascript, "../fluentci_ffi.mjs", "withService") pub fn with_service(mise: Mise, service: Service) -> Mise -@external(javascript, "../fluentci.mjs", "withWorkdir") +@external(javascript, "../fluentci_ffi.mjs", "withWorkdir") pub fn with_workdir(mise: Mise, path: String) -> Mise diff --git a/sdk/gleam/demo/src/fluentci/nix.gleam b/sdk/gleam/demo/src/fluentci/nix.gleam index b3d2eb8..43f9e3c 100644 --- a/sdk/gleam/demo/src/fluentci/nix.gleam +++ b/sdk/gleam/demo/src/fluentci/nix.gleam @@ -6,35 +6,35 @@ import gleam/javascript/promise.{type Promise} pub type Nix -@external(javascript, "../fluentci.mjs", "asService") +@external(javascript, "../fluentci_ffi.mjs", "asService") pub fn as_service(nix: Nix) -> Service -@external(javascript, "../fluentci.mjs", "id") +@external(javascript, "../fluentci_ffi.mjs", "id") pub fn id(nix: Nix) -> Promise(String) -@external(javascript, "../fluentci.mjs", "stderr") +@external(javascript, "../fluentci_ffi.mjs", "stderr") pub fn stderr(nix: Nix) -> Promise(String) -@external(javascript, "../fluentci.mjs", "stdout") +@external(javascript, "../fluentci_ffi.mjs", "stdout") pub fn stdout(nix: Nix) -> Promise(String) -@external(javascript, "../fluentci.mjs", "waitOn") +@external(javascript, "../fluentci_ffi.mjs", "waitOn") pub fn wait_on(nix: Nix, port: int, timeout: int) -> Nix -@external(javascript, "../fluentci.mjs", "withCache") +@external(javascript, "../fluentci_ffi.mjs", "withCache") pub fn with_cache(nix: Nix, cache: Cache) -> Nix -@external(javascript, "../fluentci.mjs", "withEnvVariable") +@external(javascript, "../fluentci_ffi.mjs", "withEnvVariable") pub fn with_env_variable(nix: Nix, name: String, value: String) -> Nix -@external(javascript, "../fluentci.mjs", "withExec") +@external(javascript, "../fluentci_ffi.mjs", "withExec") pub fn with_exec(nix: Nix, command: Array(String)) -> Nix -@external(javascript, "../fluentci.mjs", "withSecretVariable") +@external(javascript, "../fluentci_ffi.mjs", "withSecretVariable") pub fn with_secret_variable(nix: Nix, name: String, secret: Secret) -> Nix -@external(javascript, "../fluentci.mjs", "withService") +@external(javascript, "../fluentci_ffi.mjs", "withService") pub fn with_service(nix: Nix, service: Service) -> Nix -@external(javascript, "../fluentci.mjs", "withWorkdir") +@external(javascript, "../fluentci_ffi.mjs", "withWorkdir") pub fn with_workdir(nix: Nix, path: String) -> Nix diff --git a/sdk/gleam/demo/src/fluentci/pipeline.gleam b/sdk/gleam/demo/src/fluentci/pipeline.gleam index faca4f0..86fb50b 100644 --- a/sdk/gleam/demo/src/fluentci/pipeline.gleam +++ b/sdk/gleam/demo/src/fluentci/pipeline.gleam @@ -13,64 +13,64 @@ import gleam/javascript/promise.{type Promise} pub type Pipeline -@external(javascript, "../fluentci.mjs", "asService") +@external(javascript, "../fluentci_ffi.mjs", "asService") pub fn as_service(pipeline: Pipeline) -> Service -@external(javascript, "../fluentci.mjs", "id") +@external(javascript, "../fluentci_ffi.mjs", "id") pub fn id(pipeline: Pipeline) -> Promise(String) -@external(javascript, "../fluentci.mjs", "devbox") +@external(javascript, "../fluentci_ffi.mjs", "devbox") pub fn devbox(pipeline: Pipeline) -> Devbox -@external(javascript, "../fluentci.mjs", "devenv") +@external(javascript, "../fluentci_ffi.mjs", "devenv") pub fn devenv(pipeline: Pipeline) -> Devenv -@external(javascript, "../fluentci.mjs", "envhub") +@external(javascript, "../fluentci_ffi.mjs", "envhub") pub fn envhub(pipeline: Pipeline) -> Envhub -@external(javascript, "../fluentci.mjs", "mise") +@external(javascript, "../fluentci_ffi.mjs", "mise") pub fn mise(pipeline: Pipeline) -> Mise -@external(javascript, "../fluentci.mjs", "nix") +@external(javascript, "../fluentci_ffi.mjs", "nix") pub fn nix(pipeline: Pipeline) -> Nix -@external(javascript, "../fluentci.mjs", "pixi") +@external(javascript, "../fluentci_ffi.mjs", "pixi") pub fn pixi(pipeline: Pipeline) -> Pixi -@external(javascript, "../fluentci.mjs", "pkgx") +@external(javascript, "../fluentci_ffi.mjs", "pkgx") pub fn pkgx(pipeline: Pipeline) -> Pkgx -@external(javascript, "../fluentci.mjs", "stderr") +@external(javascript, "../fluentci_ffi.mjs", "stderr") pub fn stderr(pipeline: Pipeline) -> Promise(String) -@external(javascript, "../fluentci.mjs", "stdout") +@external(javascript, "../fluentci_ffi.mjs", "stdout") pub fn stdout(pipeline: Pipeline) -> Promise(String) -@external(javascript, "../fluentci.mjs", "waitOn") +@external(javascript, "../fluentci_ffi.mjs", "waitOn") pub fn wait_on(pipeline: Pipeline, port: int, timeout: int) -> Pipeline -@external(javascript, "../fluentci.mjs", "withCache") +@external(javascript, "../fluentci_ffi.mjs", "withCache") pub fn with_cache(pipeline: Pipeline, cache: Cache) -> Pipeline -@external(javascript, "../fluentci.mjs", "withEnvVariable") +@external(javascript, "../fluentci_ffi.mjs", "withEnvVariable") pub fn with_env_variable( pipeline: Pipeline, name: String, value: String, ) -> Pipeline -@external(javascript, "../fluentci.mjs", "withExec") +@external(javascript, "../fluentci_ffi.mjs", "withExec") pub fn with_exec(pipeline: Pipeline, command: Array(String)) -> Pipeline -@external(javascript, "../fluentci.mjs", "withSecretVariable") +@external(javascript, "../fluentci_ffi.mjs", "withSecretVariable") pub fn with_secret_variable( pipeline: Pipeline, name: String, secret: Secret, ) -> Pipeline -@external(javascript, "../fluentci.mjs", "withService") +@external(javascript, "../fluentci_ffi.mjs", "withService") pub fn with_service(pipeline: Pipeline, service: Service) -> Pipeline -@external(javascript, "../fluentci.mjs", "withWorkdir") +@external(javascript, "../fluentci_ffi.mjs", "withWorkdir") pub fn with_workdir(pipeline: Pipeline, path: String) -> Pipeline diff --git a/sdk/gleam/demo/src/fluentci/pixi.gleam b/sdk/gleam/demo/src/fluentci/pixi.gleam index b748b0f..2548ec4 100644 --- a/sdk/gleam/demo/src/fluentci/pixi.gleam +++ b/sdk/gleam/demo/src/fluentci/pixi.gleam @@ -6,35 +6,35 @@ import gleam/javascript/promise.{type Promise} pub type Pixi -@external(javascript, "../fluentci.mjs", "asService") +@external(javascript, "../fluentci_ffi.mjs", "asService") pub fn as_service(pixi: Pixi) -> Service -@external(javascript, "../fluentci.mjs", "id") +@external(javascript, "../fluentci_ffi.mjs", "id") pub fn id(pixi: Pixi) -> Promise(String) -@external(javascript, "../fluentci.mjs", "stderr") +@external(javascript, "../fluentci_ffi.mjs", "stderr") pub fn stderr(pixi: Pixi) -> Promise(String) -@external(javascript, "../fluentci.mjs", "stdout") +@external(javascript, "../fluentci_ffi.mjs", "stdout") pub fn stdout(pixi: Pixi) -> Promise(String) -@external(javascript, "../fluentci.mjs", "waitOn") +@external(javascript, "../fluentci_ffi.mjs", "waitOn") pub fn wait_on(pixi: Pixi, port: int, timeout: int) -> Pixi -@external(javascript, "../fluentci.mjs", "withCache") +@external(javascript, "../fluentci_ffi.mjs", "withCache") pub fn with_cache(pixi: Pixi, cache: Cache) -> Pixi -@external(javascript, "../fluentci.mjs", "withEnvVariable") +@external(javascript, "../fluentci_ffi.mjs", "withEnvVariable") pub fn with_env_variable(pixi: Pixi, name: String, value: String) -> Pixi -@external(javascript, "../fluentci.mjs", "withExec") +@external(javascript, "../fluentci_ffi.mjs", "withExec") pub fn with_exec(pixi: Pixi, command: Array(String)) -> Pixi -@external(javascript, "../fluentci.mjs", "withSecretVariable") +@external(javascript, "../fluentci_ffi.mjs", "withSecretVariable") pub fn with_secret_variable(pixi: Pixi, name: String, secret: Secret) -> Pixi -@external(javascript, "../fluentci.mjs", "withService") +@external(javascript, "../fluentci_ffi.mjs", "withService") pub fn with_service(pixi: Pixi, service: Service) -> Pixi -@external(javascript, "../fluentci.mjs", "withWorkdir") +@external(javascript, "../fluentci_ffi.mjs", "withWorkdir") pub fn with_workdir(pixi: Pixi, path: String) -> Pixi diff --git a/sdk/gleam/demo/src/fluentci/pkgx.gleam b/sdk/gleam/demo/src/fluentci/pkgx.gleam index 704453b..eccc4e3 100644 --- a/sdk/gleam/demo/src/fluentci/pkgx.gleam +++ b/sdk/gleam/demo/src/fluentci/pkgx.gleam @@ -6,38 +6,38 @@ import gleam/javascript/promise.{type Promise} pub type Pkgx -@external(javascript, "../fluentci.mjs", "asService") +@external(javascript, "../fluentci_ffi.mjs", "asService") pub fn as_service(pkgx: Pkgx) -> Service -@external(javascript, "../fluentci.mjs", "id") +@external(javascript, "../fluentci_ffi.mjs", "id") pub fn id(pkgx: Pkgx) -> Promise(String) -@external(javascript, "../fluentci.mjs", "stderr") +@external(javascript, "../fluentci_ffi.mjs", "stderr") pub fn stderr(pkgx: Pkgx) -> Promise(String) -@external(javascript, "../fluentci.mjs", "stdout") +@external(javascript, "../fluentci_ffi.mjs", "stdout") pub fn stdout(pkgx: Pkgx) -> Promise(String) -@external(javascript, "../fluentci.mjs", "waitOn") +@external(javascript, "../fluentci_ffi.mjs", "waitOn") pub fn wait_on(pkgx: Pkgx, port: int, timeout: int) -> Pkgx -@external(javascript, "../fluentci.mjs", "withCache") +@external(javascript, "../fluentci_ffi.mjs", "withCache") pub fn with_cache(pkgx: Pkgx, cache: Cache) -> Pkgx -@external(javascript, "../fluentci.mjs", "withEnvVariable") +@external(javascript, "../fluentci_ffi.mjs", "withEnvVariable") pub fn with_env_variable(pkgx: Pkgx, name: String, value: String) -> Pkgx -@external(javascript, "../fluentci.mjs", "withExec") +@external(javascript, "../fluentci_ffi.mjs", "withExec") pub fn with_exec(pkgx: Pkgx, command: Array(String)) -> Pkgx -@external(javascript, "../fluentci.mjs", "withSecretVariable") +@external(javascript, "../fluentci_ffi.mjs", "withSecretVariable") pub fn with_secret_variable(pkgx: Pkgx, name: String, secret: Secret) -> Pkgx -@external(javascript, "../fluentci.mjs", "withPackages") +@external(javascript, "../fluentci_ffi.mjs", "withPackages") pub fn with_packages(pkgx: Pkgx, packages: Array(String)) -> Pkgx -@external(javascript, "../fluentci.mjs", "withService") +@external(javascript, "../fluentci_ffi.mjs", "withService") pub fn with_service(pkgx: Pkgx, service: Service) -> Pkgx -@external(javascript, "../fluentci.mjs", "withWorkdir") +@external(javascript, "../fluentci_ffi.mjs", "withWorkdir") pub fn with_workdir(pkgx: Pkgx, path: String) -> Pkgx diff --git a/sdk/gleam/demo/src/fluentci/secret.gleam b/sdk/gleam/demo/src/fluentci/secret.gleam index 1593533..077f806 100644 --- a/sdk/gleam/demo/src/fluentci/secret.gleam +++ b/sdk/gleam/demo/src/fluentci/secret.gleam @@ -2,14 +2,14 @@ import gleam/javascript/promise.{type Promise} pub type Secret -@external(javascript, "../fluentci.mjs", "id") +@external(javascript, "../fluentci_ffi.mjs", "id") pub fn id(secret: Secret) -> Promise(String) -@external(javascript, "../fluentci.mjs", "mount") +@external(javascript, "../fluentci_ffi.mjs", "mount") pub fn mount(secret: Secret) -> Promise(String) -@external(javascript, "../fluentci.mjs", "path") +@external(javascript, "../fluentci_ffi.mjs", "path") pub fn name(secret: Secret) -> Promise(String) -@external(javascript, "../fluentci.mjs", "plaintext") +@external(javascript, "../fluentci_ffi.mjs", "plaintext") pub fn plaintext(secret: Secret) -> Promise(String) diff --git a/sdk/gleam/demo/src/fluentci/secret_manager.gleam b/sdk/gleam/demo/src/fluentci/secret_manager.gleam index 543d2a9..cb2f8b0 100644 --- a/sdk/gleam/demo/src/fluentci/secret_manager.gleam +++ b/sdk/gleam/demo/src/fluentci/secret_manager.gleam @@ -4,11 +4,11 @@ import gleam/javascript/promise.{type Promise} pub type SecretManager -@external(javascript, "../fluentci.mjs", "getSecret") +@external(javascript, "../fluentci_ffi.mjs", "getSecret") pub fn get_secret( secret_manager: SecretManager, name: String, ) -> Promise(Array(Secret)) -@external(javascript, "../fluentci.mjs", "id") +@external(javascript, "../fluentci_ffi.mjs", "id") pub fn id(secret_manager: SecretManager) -> Promise(String) diff --git a/sdk/gleam/demo/src/fluentci/service.gleam b/sdk/gleam/demo/src/fluentci/service.gleam index 844072c..6ecced6 100644 --- a/sdk/gleam/demo/src/fluentci/service.gleam +++ b/sdk/gleam/demo/src/fluentci/service.gleam @@ -2,5 +2,5 @@ import gleam/javascript/promise.{type Promise} pub type Service -@external(javascript, "../fluentci.mjs", "id") +@external(javascript, "../fluentci_ffi.mjs", "id") pub fn id(service: Service) -> Promise(String) diff --git a/sdk/gleam/demo/src/fluentci.mjs b/sdk/gleam/demo/src/fluentci_ffi.mjs similarity index 100% rename from sdk/gleam/demo/src/fluentci.mjs rename to sdk/gleam/demo/src/fluentci_ffi.mjs diff --git a/sdk/gleam/demo/src/plugin.mjs b/sdk/gleam/demo/src/plugin_ffi.mjs similarity index 100% rename from sdk/gleam/demo/src/plugin.mjs rename to sdk/gleam/demo/src/plugin_ffi.mjs diff --git a/sdk/gleam/gleam.toml b/sdk/gleam/gleam.toml new file mode 100644 index 0000000..f9d81e8 --- /dev/null +++ b/sdk/gleam/gleam.toml @@ -0,0 +1,35 @@ +description = "Write CI/CD pipelines in Gleam" +licences = ["MIT"] +links = [ + {title = "Website", href = "https://fluentci.io"}, + {title = "Sponsor", href = "https://github.com/sponsors/fluentci-io"}, +] +name = "fluentci" +repository = {type = "github", user = "fluentci-io", repo = "fluentci-engine"} +target = "javascript" +version = "0.1.0" + +[javascript] +runtime = "deno" +typescript_declarations = true + +[javascript.deno] +allow_all = true + +# Fill out these fields if you intend to generate HTML documentation or publish +# your project to the Hex package manager. +# +# description = "" +# licences = ["Apache-2.0"] +# repository = { type = "github", user = "", repo = "" } +# links = [{ title = "Website", href = "" }] +# +# For a full reference of all the available options, you can have a look at +# https://gleam.run/writing-gleam/gleam-toml/. + +[dependencies] +gleam_javascript = ">= 0.11.0 and < 1.0.0" +gleam_stdlib = ">= 0.34.0 and < 2.0.0" + +[dev-dependencies] +gleeunit = ">= 1.0.0 and < 2.0.0" diff --git a/sdk/gleam/manifest.toml b/sdk/gleam/manifest.toml new file mode 100644 index 0000000..b47df9c --- /dev/null +++ b/sdk/gleam/manifest.toml @@ -0,0 +1,13 @@ +# This file was generated by Gleam +# You typically do not need to edit this file + +packages = [ + { name = "gleam_javascript", version = "0.11.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_javascript", source = "hex", outer_checksum = "483631D3001FCE8EB12ADEAD5E1B808440038E96F93DA7A32D326C82F480C0B2" }, + { name = "gleam_stdlib", version = "0.39.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "2D7DE885A6EA7F1D5015D1698920C9BAF7241102836CE0C3837A4F160128A9C4" }, + { name = "gleeunit", version = "1.2.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "F7A7228925D3EE7D0813C922E062BFD6D7E9310F0BEE585D3A42F3307E3CFD13" }, +] + +[requirements] +gleam_javascript = { version = ">= 0.11.0 and < 1.0.0" } +gleam_stdlib = { version = ">= 0.34.0 and < 2.0.0" } +gleeunit = { version = ">= 1.0.0 and < 2.0.0" } diff --git a/sdk/gleam/src/dagger_ffi.mjs b/sdk/gleam/src/dagger_ffi.mjs new file mode 100644 index 0000000..b7f6f3d --- /dev/null +++ b/sdk/gleam/src/dagger_ffi.mjs @@ -0,0 +1,669 @@ +import { dag } from "jsr:@fluentci/sdk/dagger"; + +export function client() { + return dag; +} + +export function id(c) { + return c.id(); +} + +export function cacheVolume(c, key) { + return c.cacheVolume(key); +} + +export function emptyDirectory(c) { + return c.directory(); +} + +export function pipeline(c, name) { + return c.pipeline(name); +} + +export function container(c) { + return c.container(); +} + +export function host(c) { + return c.host(); +} + +export function currentModule(c) { + return c.currentModule(); +} + +export function setSecret(c, name, value) { + return c.setSecret(name, value); +} + +export function git(c, url) { + return c.git(url); +} + +export function http(c, url) { + return c.http(url); +} + +export function directory(c, path) { + return c.directory(path); +} + +// Container +export function withExec(c, args) { + return c.withExec(args); +} + +export function from_(c, image) { + return c.from(image); +} + +export function stdout(c) { + return c.stdout(); +} + +export function stderr(c) { + return c.stderr(); +} + +export function asService(c) { + return c.asService(); +} + +export function asTarball(c) { + return c.asTarball(); +} + +export function build(c, context) { + return c.build(context); +} + +export function entrypoint(c) { + return c.entrypoint(); +} + +export function envVariable(c, name) { + return c.envVariable(name); +} + +export function envVariables(c) { + return c.envVariables(); +} + +export function export_(c, path) { + return c.export(path); +} + +export function exposedPorts(c) { + return c.exposedPorts(); +} + +export function file(c, path) { + return c.file(path); +} + +export function imageRef(c) { + return c.imageRef(); +} + +export function import_(c, source) { + return c.import(source); +} + +export function label(c, name) { + return c.label(name); +} + +export function labels(c) { + return c.labels(); +} + +export function mounts(c) { + return c.mounts(); +} + +export function platform(c) { + return c.platform(); +} + +export function publish(c, address) { + return c.publish(address); +} + +export function rootfs(c) { + return c.rootfs(); +} + +export function sync(c) { + return c.sync(); +} + +export function terminal(c) { + return c.terminal(); +} + +export function user(c) { + return c.user(); +} + +export function withDefaultArgs(c, args) { + return c.withDefaultArgs(args); +} + +export function withDefaultTerminalCmd(c, args) { + return c.withDefaultTerminalCmd(args); +} + +export function withDirectory(c, path, directory) { + return c.withDirectory(path, directory); +} + +export function withEntrypoint(c, args) { + return c.withEntrypoint(args); +} + +export function withEnvVariable(c, name, value) { + return c.withEnvVariable(name, value); +} + +export function withExposedPort(c, port) { + return c.withExposedPort(port); +} + +export function withFile(c, path, source) { + return c.withFile(path, source); +} + +export function withFiles(c, path, sources) { + return c.withFiles(path, sources); +} + +export function withFocus(c) { + return c.withFocus(); +} + +export function withLabel(c, name, value) { + return c.withLabel(name, value); +} + +export function withMountedCache(c, path, cache) { + return c.withMountedCache(path, cache); +} + +export function withMountedDirectory(c, path, source) { + return c.withMountedDirectory(path, source); +} + +export function withMountedFile(c, path, source) { + return c.withMountedFile(path, source); +} + +export function withMountedSecret(c, path, source) { + return c.withMountedSecret(path, source); +} + +export function withMountedTemp(c, path) { + return c.withMountedTemp(path); +} + +export function withNewFile(c, path, contents) { + return c.withNewFile(path, contents); +} + +export function withRegistryAuth(c, address, username, secret) { + return c.withRegistryAuth(address, username, secret); +} + +export function withRootfs(c, directory) { + return c.withRootfs(directory); +} + +export function withSecretVariable(c, name, secret) { + return c.withSecretVariable(name, secret); +} + +export function withServiceBinding(c, alias, service) { + return c.withServiceBinding(alias, service); +} + +export function withUnixSocket(c, path, source) { + return c.withUnixSocket(path, source); +} + +export function withUser(c, name) { + return c.withUser(name); +} + +export function withWorkdir(c, path) { + return c.withWorkdir(path); +} + +export function withoutDefaultArgs(c) { + return c.withoutDefaultArgs(); +} + +export function withoutDirectory(c, path) { + return c.withoutDirectory(path); +} + +export function withoutEntrypoint(c) { + return c.withoutEntrypoint(); +} + +export function withoutEnvVariable(c, name) { + return c.withoutEnvVariable(name); +} + +export function withoutExposedPort(c, port) { + return c.withoutExposedPort(port); +} + +export function withoutFile(c, path) { + return c.withoutFile(path); +} + +export function withoutFocus(c) { + return c.withoutFocus(); +} + +export function withoutLabel(c, name) { + return c.withoutLabel(name); +} + +export function withoutMount(c, path) { + return c.withoutMount(path); +} + +export function withoutRegistryAuth(c, address) { + return c.withoutRegistryAuth(address); +} + +export function withoutSecretVariable(c, name) { + return c.withoutSecretVariable(name); +} + +export function withoutUnixSocket(c, path) { + return c.withoutUnixSocket(path); +} + +export function withoutUser(c) { + return c.withoutUser(); +} + +export function withoutWorkdir(c) { + return c.withoutWorkdir(); +} + +export function workdir(c) { + return c.workdir(); +} + +// Directory +export function asModule(c) { + return c.asModule(); +} + +export function diff(c, other) { + return c.diff(other); +} + +export function dockerBuild(c) { + return c.dockerBuild(); +} + +export function entries(c) { + return c.entries(); +} + +export function glob(c, pattern) { + return c.glob(pattern); +} + +export function withNewDirectory(c, path) { + return c.withNewDirectory(path); +} + +export function withTimestamps(c, timestamps) { + return c.withTimestamps(timestamps); +} + +// File +export function contents(c) { + return c.contents(); +} + +export function digest(c) { + return c.digest(); +} + +export function name(c) { + return c.name(); +} + +export function size(c) { + return c.size(); +} + +export function withName(c, name) { + return c.withName(name); +} + +// Secret +export function plaintext(c) { + return c.plaintext(); +} + +// Service +export function endpoint(c) { + return c.endpoint(); +} + +export function hostname(c) { + return c.hostname(); +} + +export function ports(c) { + return c.ports(); +} + +export function start(c) { + return c.start(); +} + +export function stop(c) { + return c.stop(); +} + +export function up(c) { + return c.up(); +} + +// GitRepository +export function branch(c, name) { + return c.branch(name); +} + +export function commit(c, id) { + return c.commit(id); +} + +export function head(c) { + return c.head(); +} + +export function ref(c, name) { + return c.ref(name); +} + +export function tag(c, name) { + return c.tag(name); +} + +export function tags(c) { + return c.tags(); +} + +export function withAuthHeader(c, header) { + return c.withAuthHeader(header); +} + +export function withAuthToken(c, token) { + return c.withAuthToken(token); +} + +// Host +export function service(c) { + return c.service(); +} + +export function setSecretFile(c, name, path) { + return c.setSecretFile(name, path); +} + +export function tunnel(c, service) { + return c.tunnel(service); +} + +export function unixSocket(c, path) { + return c.unixSocket(path); +} + +export function value(c) { + return c.value(); +} + +// Module +export function dependencies(c) { + return c.dependencies(); +} + +export function dependencyConfig(c) { + return c.dependencyConfig(); +} + +export function description(c) { + return c.description(); +} + +export function enums(c) { + return c.enums(); +} + +export function generatedContextDiff(c) { + return c.generatedContextDiff(); +} + +export function generatedContextDirectory(c) { + return c.generatedContextDirectory(); +} + +export function initialize(c) { + return c.initialize(); +} + +export function interfaces(c) { + return c.interfaces(); +} + +export function objects(c) { + return c.objects(); +} + +export function runtime(c) { + return c.runtime(); +} + +export function sdk(c) { + return c.sdk(); +} + +export function serve(c) { + return c.serve(); +} + +export function source(c) { + return c.source(); +} + +export function withDescription(c, description) { + return c.withDescription(description); +} + +export function withEnums(c, enums) { + return c.withEnums(enums); +} + +export function withInterfaces(c, iface) { + return c.withInterfaces(iface); +} + +export function withObject(c, object) { + return c.withObject(object); +} + +export function withSource(c, source) { + return c.withSource(source); +} + +// ModuleSource +export function asGitSource(c) { + return c.asGitSource(); +} + +export function asLocalSource(c) { + return c.asLocalSource(); +} + +export function asString(c) { + return c.asString(); +} + +export function configExists(c) { + return c.configExists(); +} + +export function contextDirectory(c) { + return c.contextDirectory(); +} + +export function kind(c) { + return c.kind(); +} + +export function moduleName(c) { + return c.moduleName(); +} + +export function moduleOriginalName(c) { + return c.moduleOriginalName(); +} + +export function resolveContextPathFromCaller(c) { + return c.resolveContextPathFromCaller(); +} + +export function resolveDependency(c, dep) { + return c.resolveDependency(dep); +} + +export function resolveDirectoryFromCaller(c) { + return c.resolveDirectoryFromCaller(); +} + +export function resolveFromCaller(c) { + return c.resolveFromCaller(); +} + +export function sourceRootSubpath(c) { + return c.sourceRootSubpath(); +} + +export function sourceSubpath(c) { + return c.sourceSubpath(); +} + +export function view(c, name) { + return c.view(name); +} + +export function views(c) { + return c.views(); +} + +export function withContextDirectory(c, dir) { + return c.withContextDirectory(dir); +} + +export function withDependencies(c, dependencies) { + return c.withDependencies(dependencies); +} + +export function withSDK(c, sdk) { + return c.withSDK(sdk); +} + +export function withSourceSubpath(c, subpath) { + return c.withSourceSubpath(subpath); +} + +export function withView(c, name, patterns) { + return c.withView(name, patterns); +} + +// ModuleSourceView +export function patterns(c) { + return c.patterns(); +} + +// Port +export function experimentalSkipHealthcheck(c) { + return c.experimentalSkipHealthcheck(); +} + +export function port(c) { + return c.port(); +} + +export function protocol(c) { + return c.protocol(); +} + +// GitModuleSource +export function cloneURL(c) { + return c.cloneURL(); +} + +export function htmlURL(c) { + return c.htmlURL(); +} + +export function root(c) { + return c.root(); +} + +export function rootSubpath(c) { + return c.rootSubpath(); +} + +export function version(c) { + return c.version(); +} + +// GitRef +export function tree(c) { + return c.tree(); +} + +// Function +export function args(c) { + return c.args(); +} + +export function returnType(c) { + return c.returnType(); +} + +export function withArg(c, name, typeDef) { + return c.withArg(arg, name, typeDef); +} + +// FunctionArg +export function defaultValue(c) { + return c.defaultValue(); +} + +export function typeDef(c) { + return c.typeDef(); +} + +// FunctionCall +export function inputArgs(c) { + return c.inputArgs(); +} + +export function parentName(c) { + return c.parentName(); +} + +export function returnValue(c, value) { + return c.returnValue(value); +} diff --git a/sdk/gleam/src/fluentci.gleam b/sdk/gleam/src/fluentci.gleam new file mode 100644 index 0000000..0957096 --- /dev/null +++ b/sdk/gleam/src/fluentci.gleam @@ -0,0 +1,97 @@ +import fluentci/cache.{type Cache} +import fluentci/devbox.{type Devbox} +import fluentci/devenv.{type Devenv} +import fluentci/directory.{type Directory, type File} +import fluentci/flox.{type Flox} +import fluentci/git.{type Git} +import fluentci/mise.{type Mise} +import fluentci/nix.{type Nix} +import fluentci/pipeline.{type Pipeline} +import fluentci/pixi.{type Pixi} +import fluentci/pkgx.{type Pkgx} +import fluentci/secret.{type Secret} +import fluentci/secret_manager.{type SecretManager} + +pub type Client + +pub type NixArgs { + NixArgs(impure: Bool) +} + +@external(javascript, "./fluentci_ffi.mjs", "client") +pub fn dag() -> Client + +@external(javascript, "./fluentci_ffi.mjs", "azureSecretsManager") +pub fn azure_secrets_manager( + client: Client, + region: String, + access_key_id: String, + secret_access_key: String, +) -> SecretManager + +@external(javascript, "./fluentci_ffi.mjs", "azureKeyvault") +pub fn azure_keyvault( + client: Client, + client_id: String, + client_secret: String, + tenant_id: String, + keyvault_name: String, + keyvault_url: String, +) -> SecretManager + +@external(javascript, "./fluentci_ffi.mjs", "cache") +pub fn cache(client: Client, key: String) -> Cache + +@external(javascript, "./fluentci_ffi.mjs", "devbox") +pub fn devbox(client: Client) -> Devbox + +@external(javascript, "./fluentci_ffi.mjs", "devenv") +pub fn devenv(client: Client) -> Devenv + +@external(javascript, "./fluentci_ffi.mjs", "directory") +pub fn directory(client: Client, path: String) -> Directory + +@external(javascript, "./fluentci_ffi.mjs", "file") +pub fn file(client: Client, path: String) -> File + +@external(javascript, "./fluentci_ffi.mjs", "flox") +pub fn flox(client: Client) -> Flox + +@external(javascript, "./fluentci_ffi.mjs", "git") +pub fn git(client: Client, url: String) -> Git + +@external(javascript, "./fluentci_ffi.mjs", "googleCloudSecretManager") +pub fn google_cloud_secret_manager( + client: Client, + project: String, + google_credentials_file: String, +) -> SecretManager + +@external(javascript, "./fluentci_ffi.mjs", "hashicorpVault") +pub fn hashicorp_vault( + client: Client, + address: String, + token: String, + cacerts: String, +) -> SecretManager + +@external(javascript, "./fluentci_ffi.mjs", "http") +pub fn http(client: Client, url: String) -> File + +@external(javascript, "./fluentci_ffi.mjs", "mise") +pub fn mise(client: Client) -> Mise + +@external(javascript, "./fluentci_ffi.mjs", "nix") +pub fn nix(client: Client, args: NixArgs) -> Nix + +@external(javascript, "./fluentci_ffi.mjs", "pipeline") +pub fn pipeline(client: Client, name: String) -> Pipeline + +@external(javascript, "./fluentci_ffi.mjs", "pixi") +pub fn pixi(client: Client) -> Pixi + +@external(javascript, "./fluentci_ffi.mjs", "pkgx") +pub fn pkgx(client: Client) -> Pkgx + +@external(javascript, "./fluentci_ffi.mjs", "setSecret") +pub fn set_secret(client: Client, name: String, value: String) -> Secret diff --git a/sdk/gleam/src/fluentci/cache.gleam b/sdk/gleam/src/fluentci/cache.gleam new file mode 100644 index 0000000..ca380d8 --- /dev/null +++ b/sdk/gleam/src/fluentci/cache.gleam @@ -0,0 +1,9 @@ +import gleam/javascript/promise.{type Promise} + +pub type Cache + +@external(javascript, "../fluentci_ffi.mjs", "id") +pub fn id(cache: Cache) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "key") +pub fn key(cache: Cache) -> Promise(String) diff --git a/sdk/gleam/src/fluentci/dagger/cache_volume.gleam b/sdk/gleam/src/fluentci/dagger/cache_volume.gleam new file mode 100644 index 0000000..e53d79b --- /dev/null +++ b/sdk/gleam/src/fluentci/dagger/cache_volume.gleam @@ -0,0 +1,6 @@ +import gleam/javascript/promise.{type Promise} + +pub type CacheVolume + +@external(javascript, "../../dagger_ffi.mjs", "id") +pub fn id(cache_volume: CacheVolume) -> Promise(String) diff --git a/sdk/gleam/src/fluentci/dagger/client.gleam b/sdk/gleam/src/fluentci/dagger/client.gleam new file mode 100644 index 0000000..4c2129f --- /dev/null +++ b/sdk/gleam/src/fluentci/dagger/client.gleam @@ -0,0 +1,31 @@ +import fluentci/dagger/cache_volume.{type CacheVolume} +import fluentci/dagger/container.{type Container} +import fluentci/dagger/directory.{type Directory} +import fluentci/dagger/file.{type File} +import fluentci/dagger/host.{type Host} + +pub type Client + +@external(javascript, "../../dagger_ffi.mjs", "client") +pub fn dag() -> Client + +@external(javascript, "../../dagger_ffi.mjs", "pipeline") +pub fn pipeline(client: Client, name: String) -> Client + +@external(javascript, "../../dagger_ffi.mjs", "container") +pub fn container(client: Client) -> Container + +@external(javascript, "../../dagger_ffi.mjs", "cacheVolume") +pub fn cache_volume(client: Client, key: String) -> CacheVolume + +@external(javascript, "../../dagger_ffi.mjs", "emptyDirectory") +pub fn directory(client: Client) -> Directory + +@external(javascript, "../../dagger_ffi.mjs", "git") +pub fn git(client: Client, url: String) -> Directory + +@external(javascript, "../../dagger_ffi.mjs", "host") +pub fn host(client: Client) -> Host + +@external(javascript, "../../dagger_ffi.mjs", "http") +pub fn http(client: Client, url: String) -> File diff --git a/sdk/gleam/src/fluentci/dagger/container.gleam b/sdk/gleam/src/fluentci/dagger/container.gleam new file mode 100644 index 0000000..e7b991d --- /dev/null +++ b/sdk/gleam/src/fluentci/dagger/container.gleam @@ -0,0 +1,19 @@ +import gleam/javascript/array.{type Array} +import gleam/javascript/promise.{type Promise} + +pub type Container + +@external(javascript, "../../dagger_ffi.mjs", "id") +pub fn id(container: Container) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "from_") +pub fn from(container: Container, image: String) -> Container + +@external(javascript, "../../dagger_ffi.mjs", "withExec") +pub fn with_exec(container: Container, args: Array(String)) -> Container + +@external(javascript, "../../dagger_ffi.mjs", "stdout") +pub fn stdout(container: Container) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "stderr") +pub fn stderr(container: Container) -> Promise(String) diff --git a/sdk/gleam/src/fluentci/dagger/directory.gleam b/sdk/gleam/src/fluentci/dagger/directory.gleam new file mode 100644 index 0000000..1e529fe --- /dev/null +++ b/sdk/gleam/src/fluentci/dagger/directory.gleam @@ -0,0 +1,71 @@ +import fluentci/dagger/container.{type Container} +import fluentci/dagger/file.{type File} +import fluentci/dagger/module.{type Module} +import gleam/javascript/array.{type Array} +import gleam/javascript/promise.{type Promise} + +pub type Directory + +@external(javascript, "../../dagger_ffi.mjs", "id") +pub fn id(directory: Directory) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "asModule") +pub fn as_module(directory: Directory) -> Module + +@external(javascript, "../../dagger_ffi.mjs", "diff") +pub fn diff(directory: Directory, other: Directory) -> Directory + +@external(javascript, "../../dagger_ffi.mjs", "directory") +pub fn directory(d: Directory, path: String) -> Directory + +@external(javascript, "../../dagger_ffi.mjs", "dockerBuild") +pub fn docker_build(directory: Directory) -> Container + +@external(javascript, "../../dagger_ffi.mjs", "entries") +pub fn entries(directory: Directory) -> Promise(Array(String)) + +@external(javascript, "../../dagger_ffi.mjs", "export_") +pub fn export(directory: Directory, path: String) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "file") +pub fn file(directory: Directory, path: String) -> File + +@external(javascript, "../../dagger_ffi.mjs", "glob") +pub fn glob(directory: Directory, pattern: String) -> Promise(Array(String)) + +@external(javascript, "../../dagger_ffi.mjs", "pipeline") +pub fn pipeline(directory: Directory, name: String) -> Directory + +@external(javascript, "../../dagger_ffi.mjs", "sync") +pub fn sync(directory: Directory) -> Directory + +@external(javascript, "../../dagger_ffi.mjs", "terminal") +pub fn terminal(directory: Directory) -> Directory + +@external(javascript, "../../dagger_ffi.mjs", "withDirectory") +pub fn with_directory( + d: Directory, + path: String, + directory: Directory, +) -> Directory + +@external(javascript, "../../dagger_ffi.mjs", "withFile") +pub fn with_file(d: Directory, source: File) -> Directory + +@external(javascript, "../../dagger_ffi.mjs", "withFiles") +pub fn with_files(d: Directory, sources: Array(File)) -> Directory + +@external(javascript, "../../dagger_ffi.mjs", "withNewDirectory") +pub fn with_new_directory(d: Directory, path: String) -> Directory + +@external(javascript, "../../dagger_ffi.mjs", "withNewFile") +pub fn with_new_file(d: Directory, path: String, contents: String) -> Directory + +@external(javascript, "../../dagger_ffi.mjs", "withTimestamps") +pub fn with_timestamps(d: Directory, timestamp: Int) -> Directory + +@external(javascript, "../../dagger_ffi.mjs", "withoutDirectory") +pub fn without_directory(d: Directory, path: String) -> Directory + +@external(javascript, "../../dagger_ffi.mjs", "withoutFile") +pub fn without_file(d: Directory, path: String) -> Directory diff --git a/sdk/gleam/src/fluentci/dagger/enum_type_def.gleam b/sdk/gleam/src/fluentci/dagger/enum_type_def.gleam new file mode 100644 index 0000000..ce10111 --- /dev/null +++ b/sdk/gleam/src/fluentci/dagger/enum_type_def.gleam @@ -0,0 +1,20 @@ +import fluentci/dagger/enum_value_type_def.{type EnumValueTypeDef} +import gleam/javascript/array.{type Array} +import gleam/javascript/promise.{type Promise} + +pub type EnumTypeDef + +@external(javascript, "../../dagger_ffi.mjs", "id") +pub fn id(f: EnumTypeDef) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "description") +pub fn description(f: EnumTypeDef) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "name") +pub fn name(f: EnumTypeDef) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "sourceModuleName") +pub fn source_module_name(f: EnumTypeDef) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "values") +pub fn values(f: EnumTypeDef) -> Promise(Array(EnumValueTypeDef)) diff --git a/sdk/gleam/src/fluentci/dagger/enum_value_type_def.gleam b/sdk/gleam/src/fluentci/dagger/enum_value_type_def.gleam new file mode 100644 index 0000000..77286ac --- /dev/null +++ b/sdk/gleam/src/fluentci/dagger/enum_value_type_def.gleam @@ -0,0 +1,12 @@ +import gleam/javascript/promise.{type Promise} + +pub type EnumValueTypeDef + +@external(javascript, "../../dagger_ffi.mjs", "id") +pub fn id(f: EnumValueTypeDef) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "description") +pub fn description(f: EnumValueTypeDef) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "name") +pub fn name(f: EnumValueTypeDef) -> Promise(String) diff --git a/sdk/gleam/src/fluentci/dagger/env_variable.gleam b/sdk/gleam/src/fluentci/dagger/env_variable.gleam new file mode 100644 index 0000000..85d3b68 --- /dev/null +++ b/sdk/gleam/src/fluentci/dagger/env_variable.gleam @@ -0,0 +1,12 @@ +import gleam/javascript/promise.{type Promise} + +pub type EnvVariable + +@external(javascript, "../../dagger_ffi.mjs", "id") +pub fn id(env_variable: EnvVariable) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "name") +pub fn name(env_variable: EnvVariable) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "value") +pub fn value(env_variable: EnvVariable) -> Promise(String) diff --git a/sdk/gleam/src/fluentci/dagger/file.gleam b/sdk/gleam/src/fluentci/dagger/file.gleam new file mode 100644 index 0000000..22bffbd --- /dev/null +++ b/sdk/gleam/src/fluentci/dagger/file.gleam @@ -0,0 +1,30 @@ +import gleam/javascript/promise.{type Promise} + +pub type File + +@external(javascript, "../../dagger_ffi.mjs", "id") +pub fn id(file: File) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "contents") +pub fn contents(file: File) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "digest") +pub fn digest(file: File) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "export_") +pub fn export(file: File, path: String) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "name") +pub fn name(file: File) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "size") +pub fn size(file: File) -> Promise(Int) + +@external(javascript, "../../dagger_ffi.mjs", "sync") +pub fn sync(file: File) -> Promise(File) + +@external(javascript, "../../dagger_ffi.mjs", "withName") +pub fn with_name(file: File, name: String) -> File + +@external(javascript, "../../dagger_ffi.mjs", "withTimestamps") +pub fn with_timestamps(file: File, timestamp: Int) -> File diff --git a/sdk/gleam/src/fluentci/dagger/function.gleam b/sdk/gleam/src/fluentci/dagger/function.gleam new file mode 100644 index 0000000..4ee5273 --- /dev/null +++ b/sdk/gleam/src/fluentci/dagger/function.gleam @@ -0,0 +1,27 @@ +import fluentci/dagger/function_arg.{type FunctionArg} +import fluentci/dagger/type_def.{type TypeDef} +import gleam/javascript/array.{type Array} +import gleam/javascript/promise.{type Promise} + +pub type Function + +@external(javascript, "../../dagger_ffi.mjs", "id") +pub fn id(f: Function) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "args") +pub fn args(f: Function) -> Promise(Array(FunctionArg)) + +@external(javascript, "../../dagger_ffi.mjs", "description") +pub fn description(f: Function) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "name") +pub fn name(f: Function) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "returnType") +pub fn return_type(f: Function) -> TypeDef + +@external(javascript, "../../dagger_ffi.mjs", "withArg") +pub fn with_arg(f: Function, arg: FunctionArg) -> Function + +@external(javascript, "../../dagger_ffi.mjs", "withDescription") +pub fn with_description(f: Function, description: String) -> Function diff --git a/sdk/gleam/src/fluentci/dagger/function_arg.gleam b/sdk/gleam/src/fluentci/dagger/function_arg.gleam new file mode 100644 index 0000000..afc312b --- /dev/null +++ b/sdk/gleam/src/fluentci/dagger/function_arg.gleam @@ -0,0 +1,20 @@ +import gleam/javascript/promise.{type Promise} + +pub type JSON + +pub type FunctionArg + +@external(javascript, "../../dagger_ffi.mjs", "id") +pub fn id(f: FunctionArg) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "defaultValue") +pub fn default_value(f: FunctionArg) -> Promise(JSON) + +@external(javascript, "../../dagger_ffi.mjs", "description") +pub fn description(f: FunctionArg) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "name") +pub fn name(f: FunctionArg) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "typeDef") +pub fn type_def(f: FunctionArg) -> Promise(JSON) diff --git a/sdk/gleam/src/fluentci/dagger/function_call.gleam b/sdk/gleam/src/fluentci/dagger/function_call.gleam new file mode 100644 index 0000000..d24d0d3 --- /dev/null +++ b/sdk/gleam/src/fluentci/dagger/function_call.gleam @@ -0,0 +1,25 @@ +import fluentci/dagger/function_arg.{type JSON} +import fluentci/dagger/function_call_arg_value.{type FunctionCallArgValue} +import fluentci/dagger/void.{type Void} +import gleam/javascript/array.{type Array} +import gleam/javascript/promise.{type Promise} + +pub type FunctionCall + +@external(javascript, "../../dagger_ffi.mjs", "id") +pub fn id(f: FunctionCall) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "inputArgs") +pub fn input_args(f: FunctionCall) -> Promise(Array(FunctionCallArgValue)) + +@external(javascript, "../../dagger_ffi.mjs", "name") +pub fn name(f: FunctionCall) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "parent") +pub fn parent(f: FunctionCall) -> Promise(JSON) + +@external(javascript, "../../dagger_ffi.mjs", "parentName") +pub fn parent_name(f: FunctionCall) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "returnValue") +pub fn return_value(f: FunctionCall, value: JSON) -> Promise(Void) diff --git a/sdk/gleam/src/fluentci/dagger/function_call_arg_value.gleam b/sdk/gleam/src/fluentci/dagger/function_call_arg_value.gleam new file mode 100644 index 0000000..ba90a66 --- /dev/null +++ b/sdk/gleam/src/fluentci/dagger/function_call_arg_value.gleam @@ -0,0 +1,13 @@ +import fluentci/dagger/function_arg.{type JSON} +import gleam/javascript/promise.{type Promise} + +pub type FunctionCallArgValue + +@external(javascript, "../../dagger_ffi.mjs", "id") +pub fn id(f: FunctionCallArgValue) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "name") +pub fn name(f: FunctionCallArgValue) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "value") +pub fn value(f: FunctionCallArgValue) -> Promise(JSON) diff --git a/sdk/gleam/src/fluentci/dagger/generated_code.gleam b/sdk/gleam/src/fluentci/dagger/generated_code.gleam new file mode 100644 index 0000000..bbb785e --- /dev/null +++ b/sdk/gleam/src/fluentci/dagger/generated_code.gleam @@ -0,0 +1,29 @@ +import fluentci/dagger/directory.{type Directory} +import gleam/javascript/array.{type Array} +import gleam/javascript/promise.{type Promise} + +pub type GeneratedCode + +@external(javascript, "../../dagger_ffi.mjs", "id") +pub fn id(f: GeneratedCode) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "code") +pub fn code(f: GeneratedCode) -> Directory + +@external(javascript, "../../dagger_ffi.mjs", "vcsGeneratedPaths") +pub fn vcs_generated_paths(f: GeneratedCode) -> Promise(Array(String)) + +@external(javascript, "../../dagger_ffi.mjs", "vcsIgnoredPaths") +pub fn vcs_ignored_paths(f: GeneratedCode) -> Promise(Array(String)) + +@external(javascript, "../../dagger_ffi.mjs", "withVSCGeneratedPaths") +pub fn with_vsc_generated_paths( + f: GeneratedCode, + paths: Array(String), +) -> GeneratedCode + +@external(javascript, "../../dagger_ffi.mjs", "withVSCIgnoredPaths") +pub fn with_vsc_ignored_paths( + f: GeneratedCode, + paths: Array(String), +) -> GeneratedCode diff --git a/sdk/gleam/src/fluentci/dagger/git.gleam b/sdk/gleam/src/fluentci/dagger/git.gleam new file mode 100644 index 0000000..b19783f --- /dev/null +++ b/sdk/gleam/src/fluentci/dagger/git.gleam @@ -0,0 +1,33 @@ +import fluentci/dagger/git_ref.{type GitRef} +import fluentci/dagger/secret.{type Secret} +import gleam/javascript/array.{type Array} +import gleam/javascript/promise.{type Promise} + +pub type GitRepository + +@external(javascript, "../../dagger_ffi.mjs", "id") +pub fn id(git: GitRepository) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "branch") +pub fn branch(git: GitRepository, name: String) -> GitRef + +@external(javascript, "../../dagger_ffi.mjs", "commit") +pub fn commit(git: GitRepository, id: String) -> GitRef + +@external(javascript, "../../dagger_ffi.mjs", "head") +pub fn head(git: GitRepository) -> GitRef + +@external(javascript, "../../dagger_ffi.mjs", "ref") +pub fn ref(git: GitRepository, name: String) -> GitRef + +@external(javascript, "../../dagger_ffi.mjs", "tag") +pub fn tag(git: GitRepository, name: String) -> GitRef + +@external(javascript, "../../dagger_ffi.mjs", "tags") +pub fn tags(git: GitRepository) -> Array(String) + +@external(javascript, "../../dagger_ffi.mjs", "withAuthHeader") +pub fn with_auth_header(git: GitRepository, header: Secret) -> GitRepository + +@external(javascript, "../../dagger_ffi.mjs", "withAuthToken") +pub fn with_auth_token(git: GitRepository, token: Secret) -> GitRepository diff --git a/sdk/gleam/src/fluentci/dagger/git_module_source.gleam b/sdk/gleam/src/fluentci/dagger/git_module_source.gleam new file mode 100644 index 0000000..70586aa --- /dev/null +++ b/sdk/gleam/src/fluentci/dagger/git_module_source.gleam @@ -0,0 +1,28 @@ +import fluentci/dagger/directory.{type Directory} +import gleam/javascript/promise.{type Promise} + +pub type GitModuleSource + +@external(javascript, "../../dagger_ffi.mjs", "id") +pub fn id(module_source: GitModuleSource) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "cloneURL") +pub fn clone_url(module_source: GitModuleSource) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "commit") +pub fn commit(module_source: GitModuleSource) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "contextDirectory") +pub fn context_directory(module_source: GitModuleSource) -> Directory + +@external(javascript, "../../dagger_ffi.mjs", "htmlURL") +pub fn html_url(module_source: GitModuleSource) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "root") +pub fn root(module_source: GitModuleSource) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "rootSubpath") +pub fn root_subpath(module_source: GitModuleSource) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "version") +pub fn version(module_source: GitModuleSource) -> Promise(String) diff --git a/sdk/gleam/src/fluentci/dagger/git_ref.gleam b/sdk/gleam/src/fluentci/dagger/git_ref.gleam new file mode 100644 index 0000000..bc13a29 --- /dev/null +++ b/sdk/gleam/src/fluentci/dagger/git_ref.gleam @@ -0,0 +1,13 @@ +import fluentci/dagger/directory.{type Directory} +import gleam/javascript/promise.{type Promise} + +pub type GitRef + +@external(javascript, "../../dagger_ffi.mjs", "id") +pub fn id(git_ref: GitRef) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "commit") +pub fn commit(git_ref: GitRef) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "tree") +pub fn tree(git_ref: GitRef) -> Directory diff --git a/sdk/gleam/src/fluentci/dagger/host.gleam b/sdk/gleam/src/fluentci/dagger/host.gleam new file mode 100644 index 0000000..72e1d04 --- /dev/null +++ b/sdk/gleam/src/fluentci/dagger/host.gleam @@ -0,0 +1,29 @@ +import fluentci/dagger/directory.{type Directory} +import fluentci/dagger/file.{type File} +import fluentci/dagger/secret.{type Secret} +import fluentci/dagger/service.{type Service} +import fluentci/dagger/socket.{type Socket} +import gleam/javascript/promise.{type Promise} + +pub type Host + +@external(javascript, "../../dagger_ffi.mjs", "id") +pub fn id(host: Host) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "directory") +pub fn directory(host: Host, path: String) -> Directory + +@external(javascript, "../../dagger_ffi.mjs", "file") +pub fn file(host: Host, path: String) -> File + +@external(javascript, "../../dagger_ffi.mjs", "service") +pub fn service(host: Host) -> Service + +@external(javascript, "../../dagger_ffi.mjs", "setSecretFile") +pub fn set_secret_file(host: Host, name: String, path: String) -> Secret + +@external(javascript, "../../dagger_ffi.mjs", "tunnel") +pub fn tunnel(host: Host, service: Service) -> Service + +@external(javascript, "../../dagger_ffi.mjs", "unixSocket") +pub fn unix_socket(host: Host, path: String) -> Socket diff --git a/sdk/gleam/src/fluentci/dagger/local_module_source.gleam b/sdk/gleam/src/fluentci/dagger/local_module_source.gleam new file mode 100644 index 0000000..7a172f0 --- /dev/null +++ b/sdk/gleam/src/fluentci/dagger/local_module_source.gleam @@ -0,0 +1,6 @@ +import gleam/javascript/promise.{type Promise} + +pub type LocalModuleSource + +@external(javascript, "../../dagger_ffi.mjs", "id") +pub fn id(module_source: LocalModuleSource) -> Promise(String) diff --git a/sdk/gleam/src/fluentci/dagger/module.gleam b/sdk/gleam/src/fluentci/dagger/module.gleam new file mode 100644 index 0000000..ba443da --- /dev/null +++ b/sdk/gleam/src/fluentci/dagger/module.gleam @@ -0,0 +1,19 @@ +import gleam/javascript/array.{type Array} +import gleam/javascript/promise.{type Promise} + +pub type Module + +pub type ModuleSource + +pub type ModuleDependency + +pub type ModuleSourceView + +@external(javascript, "../../dagger_ffi.mjs", "id") +pub fn id(module: Module) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "dependencies") +pub fn dependencies(module: Module) -> Promise(Array(Module)) + +@external(javascript, "../../dagger_ffi.mjs", "dependencyConfig") +pub fn dependency_config(module: Module) -> Promise(Array(ModuleDependency)) diff --git a/sdk/gleam/src/fluentci/dagger/module_dependency.gleam b/sdk/gleam/src/fluentci/dagger/module_dependency.gleam new file mode 100644 index 0000000..9806b8f --- /dev/null +++ b/sdk/gleam/src/fluentci/dagger/module_dependency.gleam @@ -0,0 +1,11 @@ +import fluentci/dagger/module.{type ModuleDependency, type ModuleSource} +import gleam/javascript/promise.{type Promise} + +@external(javascript, "../../dagger_ffi.mjs", "id") +pub fn id(module_dependency: ModuleDependency) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "name") +pub fn name(module_dependency: ModuleDependency) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "source") +pub fn source(module_dependency: ModuleDependency) -> ModuleSource diff --git a/sdk/gleam/src/fluentci/dagger/module_source.gleam b/sdk/gleam/src/fluentci/dagger/module_source.gleam new file mode 100644 index 0000000..c7f40e3 --- /dev/null +++ b/sdk/gleam/src/fluentci/dagger/module_source.gleam @@ -0,0 +1,108 @@ +import fluentci/dagger/directory.{type Directory} +import fluentci/dagger/git_module_source.{type GitModuleSource} +import fluentci/dagger/local_module_source.{type LocalModuleSource} +import fluentci/dagger/module.{ + type Module, type ModuleDependency, type ModuleSource, type ModuleSourceView, +} +import gleam/javascript/array.{type Array} +import gleam/javascript/promise.{type Promise} + +@external(javascript, "../../dagger_ffi.mjs", "id") +pub fn id(module_source: ModuleSource) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "asGitSource") +pub fn as_git_source(module_source: ModuleSource) -> GitModuleSource + +@external(javascript, "../../dagger_ffi.mjs", "asLocalSource") +pub fn as_local_source(module_source: ModuleSource) -> LocalModuleSource + +@external(javascript, "../../dagger_ffi.mjs", "asModule") +pub fn as_module(module_source: ModuleSource) -> Module + +@external(javascript, "../../dagger_ffi.mjs", "asString") +pub fn as_string(module_source: ModuleSource) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "configExists") +pub fn config_exists(module_source: ModuleSource) -> Promise(bool) + +@external(javascript, "../../dagger_ffi.mjs", "contextDirectory") +pub fn context_directory(module_source: ModuleSource) -> Directory + +@external(javascript, "../../dagger_ffi.mjs", "dependencies") +pub fn dependencies( + module_source: ModuleSource, +) -> Promise(Array(ModuleDependency)) + +@external(javascript, "../../dagger_ffi.mjs", "directory") +pub fn directory(module_source: ModuleSource, path: String) -> Directory + +@external(javascript, "../../dagger_ffi.mjs", "kind") +pub fn kind(module_source: ModuleSource) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "moduleName") +pub fn module_name(module_source: ModuleSource) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "moduleOriginalName") +pub fn module_original_name(module_source: ModuleSource) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "resolveContextPathFromCaller") +pub fn resolve_context_path_from_caller( + module_source: ModuleSource, +) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "resolveDependency") +pub fn resolve_dependency( + module_source: ModuleSource, + dep: ModuleSource, +) -> ModuleSource + +@external(javascript, "../../dagger_ffi.mjs", "resolveDirectoryFromCaller") +pub fn resolve_directory_from_caller( + module_source: ModuleSource, + path: String, +) -> Directory + +@external(javascript, "../../dagger_ffi.mjs", "resolveFromCaller") +pub fn resolve_from_caller(module_source: ModuleSource) -> ModuleSource + +@external(javascript, "../../dagger_ffi.mjs", "sourceRootSubpath") +pub fn source_root_subpath(module_source: ModuleSource) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "sourceDubpath") +pub fn source_dubpath(module_source: ModuleSource) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "view") +pub fn view(module_source: ModuleSource, name: String) -> ModuleSourceView + +@external(javascript, "../../dagger_ffi.mjs", "views") +pub fn views(module_source: ModuleSource) -> Promise(Array(ModuleSourceView)) + +@external(javascript, "../../dagger_ffi.mjs", "withContextDirectory") +pub fn with_context_directory( + module_source: ModuleSource, + directory: Directory, +) -> ModuleSource + +@external(javascript, "../../dagger_ffi.mjs", "withDependencies") +pub fn with_dependencies( + module_source: ModuleSource, + dependencies: Array(ModuleDependency), +) -> ModuleSource + +@external(javascript, "../../dagger_ffi.mjs", "withName") +pub fn with_name(module_source: ModuleSource, name: String) -> ModuleSource + +@external(javascript, "../../dagger_ffi.mjs", "withSdk") +pub fn with_sdk(module_source: ModuleSource, sdk: String) -> ModuleSource + +@external(javascript, "../../dagger_ffi.mjs", "withSourceSubpath") +pub fn with_source_subpath( + module_source: ModuleSource, + path: String, +) -> ModuleSource + +@external(javascript, "../../dagger_ffi.mjs", "withView") +pub fn with_view( + module_source: ModuleSource, + patterns: Array(String), +) -> ModuleSource diff --git a/sdk/gleam/src/fluentci/dagger/module_source_view.gleam b/sdk/gleam/src/fluentci/dagger/module_source_view.gleam new file mode 100644 index 0000000..b02ff9f --- /dev/null +++ b/sdk/gleam/src/fluentci/dagger/module_source_view.gleam @@ -0,0 +1,12 @@ +import fluentci/dagger/module.{type ModuleSourceView} +import gleam/javascript/array.{type Array} +import gleam/javascript/promise.{type Promise} + +@external(javascript, "../../dagger_ffi.mjs", "id") +pub fn id(module_source_view: ModuleSourceView) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "name") +pub fn name(module_source_view: ModuleSourceView) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "patterns") +pub fn patterns(module_source_view: ModuleSourceView) -> Promise(Array(String)) diff --git a/sdk/gleam/src/fluentci/dagger/port.gleam b/sdk/gleam/src/fluentci/dagger/port.gleam new file mode 100644 index 0000000..b5615d5 --- /dev/null +++ b/sdk/gleam/src/fluentci/dagger/port.gleam @@ -0,0 +1,18 @@ +import gleam/javascript/promise.{type Promise} + +pub type Port + +@external(javascript, "../../dagger_ffi.mjs", "id") +pub fn id(port: Port) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "description") +pub fn description(port: Port) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "experimentalSkipHealthcheck") +pub fn experimental_skip_healthcheck(port: Port) -> Promise(Bool) + +@external(javascript, "../../dagger_ffi.mjs", "port") +pub fn port(port: Port) -> Promise(Int) + +@external(javascript, "../../dagger_ffi.mjs", "protocol") +pub fn protocol(port: Port) -> Promise(String) diff --git a/sdk/gleam/src/fluentci/dagger/secret.gleam b/sdk/gleam/src/fluentci/dagger/secret.gleam new file mode 100644 index 0000000..fcf926d --- /dev/null +++ b/sdk/gleam/src/fluentci/dagger/secret.gleam @@ -0,0 +1,12 @@ +import gleam/javascript/promise.{type Promise} + +pub type Secret + +@external(javascript, "../../dagger_ffi.mjs", "id") +pub fn id(secret: Secret) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "name") +pub fn name(secret: Secret) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "plaintext") +pub fn plaintext(secret: Secret) -> Promise(String) diff --git a/sdk/gleam/src/fluentci/dagger/service.gleam b/sdk/gleam/src/fluentci/dagger/service.gleam new file mode 100644 index 0000000..ed9c742 --- /dev/null +++ b/sdk/gleam/src/fluentci/dagger/service.gleam @@ -0,0 +1,27 @@ +import fluentci/dagger/port.{type Port} +import fluentci/dagger/void.{type Void} +import gleam/javascript/array.{type Array} +import gleam/javascript/promise.{type Promise} + +pub type Service + +@external(javascript, "../../dagger_ffi.mjs", "id") +pub fn id(service: Service) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "endpoint") +pub fn endpoint(service: Service) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "hostname") +pub fn hostname(service: Service) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "ports") +pub fn ports(service: Service) -> Promise(Array(Port)) + +@external(javascript, "../../dagger_ffi.mjs", "start") +pub fn start(service: Service) -> Promise(Service) + +@external(javascript, "../../dagger_ffi.mjs", "stop") +pub fn stop(service: Service) -> Promise(Service) + +@external(javascript, "../../dagger_ffi.mjs", "up") +pub fn up(service: Service) -> Promise(Void) diff --git a/sdk/gleam/src/fluentci/dagger/socket.gleam b/sdk/gleam/src/fluentci/dagger/socket.gleam new file mode 100644 index 0000000..d89b297 --- /dev/null +++ b/sdk/gleam/src/fluentci/dagger/socket.gleam @@ -0,0 +1,6 @@ +import gleam/javascript/promise.{type Promise} + +pub type Socket + +@external(javascript, "../../dagger_ffi.mjs", "id") +pub fn id(socket: Socket) -> Promise(String) diff --git a/sdk/gleam/src/fluentci/dagger/terminal.gleam b/sdk/gleam/src/fluentci/dagger/terminal.gleam new file mode 100644 index 0000000..4d45b3f --- /dev/null +++ b/sdk/gleam/src/fluentci/dagger/terminal.gleam @@ -0,0 +1,6 @@ +import gleam/javascript/promise.{type Promise} + +pub type Terminal + +@external(javascript, "../../dagger_ffi.mjs", "id") +pub fn id(terminal: Terminal) -> Promise(String) diff --git a/sdk/gleam/src/fluentci/dagger/type_def.gleam b/sdk/gleam/src/fluentci/dagger/type_def.gleam new file mode 100644 index 0000000..190323a --- /dev/null +++ b/sdk/gleam/src/fluentci/dagger/type_def.gleam @@ -0,0 +1,10 @@ +import fluentci/dagger/enum_type_def.{type EnumTypeDef} +import gleam/javascript/promise.{type Promise} + +pub type TypeDef + +@external(javascript, "../../dagger_ffi.mjs", "id") +pub fn id(t: TypeDef) -> Promise(String) + +@external(javascript, "../../dagger_ffi.mjs", "asEnum") +pub fn as_enum(t: TypeDef) -> EnumTypeDef diff --git a/sdk/gleam/src/fluentci/dagger/void.gleam b/sdk/gleam/src/fluentci/dagger/void.gleam new file mode 100644 index 0000000..6edf327 --- /dev/null +++ b/sdk/gleam/src/fluentci/dagger/void.gleam @@ -0,0 +1 @@ +pub type Void diff --git a/sdk/gleam/src/fluentci/devbox.gleam b/sdk/gleam/src/fluentci/devbox.gleam new file mode 100644 index 0000000..c808ad0 --- /dev/null +++ b/sdk/gleam/src/fluentci/devbox.gleam @@ -0,0 +1,44 @@ +import fluentci/cache.{type Cache} +import fluentci/secret.{type Secret} +import fluentci/service.{type Service} +import gleam/javascript/array.{type Array} +import gleam/javascript/promise.{type Promise} + +pub type Devbox + +@external(javascript, "../fluentci_ffi.mjs", "asService") +pub fn as_service(devbox: Devbox) -> Service + +@external(javascript, "../fluentci_ffi.mjs", "id") +pub fn id(devbox: Devbox) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "stderr") +pub fn stderr(devbox: Devbox) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "stdout") +pub fn stdout(devbox: Devbox) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "waitOn") +pub fn wait_on(devbox: Devbox, port: int, timeout: int) -> Devbox + +@external(javascript, "../fluentci_ffi.mjs", "withCache") +pub fn with_cache(devbox: Devbox, cache: Cache) -> Devbox + +@external(javascript, "../fluentci_ffi.mjs", "withEnvVariable") +pub fn with_env_variable(devbox: Devbox, name: String, value: String) -> Devbox + +@external(javascript, "../fluentci_ffi.mjs", "withExec") +pub fn with_exec(devbox: Devbox, command: Array(String)) -> Devbox + +@external(javascript, "../fluentci_ffi.mjs", "withSecretVariable") +pub fn with_secret_variable( + devbox: Devbox, + name: String, + secret: Secret, +) -> Devbox + +@external(javascript, "../fluentci_ffi.mjs", "withService") +pub fn with_service(devbox: Devbox, service: Service) -> Devbox + +@external(javascript, "../fluentci_ffi.mjs", "withWorkdir") +pub fn with_workdir(devbox: Devbox, path: String) -> Devbox diff --git a/sdk/gleam/src/fluentci/devenv.gleam b/sdk/gleam/src/fluentci/devenv.gleam new file mode 100644 index 0000000..5d1dad9 --- /dev/null +++ b/sdk/gleam/src/fluentci/devenv.gleam @@ -0,0 +1,44 @@ +import fluentci/cache.{type Cache} +import fluentci/secret.{type Secret} +import fluentci/service.{type Service} +import gleam/javascript/array.{type Array} +import gleam/javascript/promise.{type Promise} + +pub type Devenv + +@external(javascript, "../fluentci_ffi.mjs", "asService") +pub fn as_service(devenv: Devenv) -> Service + +@external(javascript, "../fluentci_ffi.mjs", "id") +pub fn id(devenv: Devenv) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "stderr") +pub fn stderr(devenv: Devenv) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "stdout") +pub fn stdout(devenv: Devenv) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "waitOn") +pub fn wait_on(devenv: Devenv, port: int, timeout: int) -> Devenv + +@external(javascript, "../fluentci_ffi.mjs", "withCache") +pub fn with_cache(devenv: Devenv, cache: Cache) -> Devenv + +@external(javascript, "../fluentci_ffi.mjs", "withEnvVariable") +pub fn with_env_variable(devenv: Devenv, name: String, value: String) -> Devenv + +@external(javascript, "../fluentci_ffi.mjs", "withExec") +pub fn with_exec(devenv: Devenv, command: Array(String)) -> Devenv + +@external(javascript, "../fluentci_ffi.mjs", "withSecretVariable") +pub fn with_secret_variable( + devenv: Devenv, + name: String, + secret: Secret, +) -> Devenv + +@external(javascript, "../fluentci_ffi.mjs", "withService") +pub fn with_service(devenv: Devenv, service: Service) -> Devenv + +@external(javascript, "../fluentci_ffi.mjs", "withWorkdir") +pub fn with_workdir(devenv: Devenv, path: String) -> Devenv diff --git a/sdk/gleam/src/fluentci/directory.gleam b/sdk/gleam/src/fluentci/directory.gleam new file mode 100644 index 0000000..99d2ef5 --- /dev/null +++ b/sdk/gleam/src/fluentci/directory.gleam @@ -0,0 +1,83 @@ +import fluentci/cache.{type Cache} +import fluentci/devbox.{type Devbox} +import fluentci/devenv.{type Devenv} +import fluentci/flox.{type Flox} +import fluentci/mise.{type Mise} +import fluentci/nix.{type Nix} +import fluentci/pixi.{type Pixi} +import fluentci/pkgx.{type Pkgx} +import fluentci/secret.{type Secret} +import fluentci/service.{type Service} +import gleam/javascript/array.{type Array} +import gleam/javascript/promise.{type Promise} + +pub type Directory + +@external(javascript, "../fluentci_ffi.mjs", "devbox") +pub fn devbox(d: Directory) -> Devbox + +@external(javascript, "../fluentci_ffi.mjs", "devenv") +pub fn devenv(d: Directory) -> Devenv + +@external(javascript, "../fluentci_ffi.mjs", "entries") +pub fn entries(d: Directory) -> Promise(Array(String)) + +@external(javascript, "../fluentci_ffi.mjs", "flox") +pub fn flox(d: Directory) -> Flox + +@external(javascript, "../fluentci_ffi.mjs", "mise") +pub fn mise(d: Directory) -> Mise + +@external(javascript, "../fluentci_ffi.mjs", "nix") +pub fn nix(d: Directory) -> Nix + +@external(javascript, "../fluentci_ffi.mjs", "pixi") +pub fn pixi(d: Directory) -> Pixi + +@external(javascript, "../fluentci_ffi.mjs", "pkgx") +pub fn pkgx(d: Directory) -> Pkgx + +@external(javascript, "../fluentci_ffi.mjs", "directory") +pub fn directory(d: Directory, path: String) -> Directory + +@external(javascript, "../fluentci_ffi.mjs", "stderr") +pub fn stderr(d: Directory) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "stdout") +pub fn stdout(d: Directory) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "waitOn") +pub fn wait_on(d: Directory, port: int, timeout: int) -> Directory + +@external(javascript, "../fluentci_ffi.mjs", "withCache") +pub fn with_cache(d: Directory, cache: Cache) -> Directory + +@external(javascript, "../fluentci_ffi.mjs", "withEnvVariable") +pub fn with_env_variable(d: Directory, name: String, value: String) -> Directory + +@external(javascript, "../fluentci_ffi.mjs", "withExec") +pub fn with_exec(d: Directory, command: Array(String)) -> Directory + +@external(javascript, "../fluentci_ffi.mjs", "withSecretVariable") +pub fn with_secret_variable( + d: Directory, + name: String, + secret: Secret, +) -> Directory + +@external(javascript, "../fluentci_ffi.mjs", "withService") +pub fn with_service(d: Directory, service: Service) -> Directory + +@external(javascript, "../fluentci_ffi.mjs", "withWorkdir") +pub fn with_workdir(d: Directory, path: String) -> Directory + +@external(javascript, "../fluentci_ffi.mjs", "withFile") +pub fn with_file(d: Directory, file_id: String) -> Directory + +@external(javascript, "../fluentci_ffi.mjs", "zip") +pub fn zip(d: Directory) -> File + +@external(javascript, "../fluentci_ffi.mjs", "tarCzvf") +pub fn tar_czvf(d: Directory) -> File + +pub type File diff --git a/sdk/gleam/src/fluentci/envhub.gleam b/sdk/gleam/src/fluentci/envhub.gleam new file mode 100644 index 0000000..9b99f7b --- /dev/null +++ b/sdk/gleam/src/fluentci/envhub.gleam @@ -0,0 +1,47 @@ +import fluentci/cache.{type Cache} +import fluentci/secret.{type Secret} +import fluentci/service.{type Service} +import gleam/javascript/array.{type Array} +import gleam/javascript/promise.{type Promise} + +pub type Envhub + +@external(javascript, "../fluentci_ffi.mjs", "asService") +pub fn as_service(envhub: Envhub) -> Service + +@external(javascript, "../fluentci_ffi.mjs", "id") +pub fn id(envhub: Envhub) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "stderr") +pub fn stderr(envhub: Envhub) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "stdout") +pub fn stdout(envhub: Envhub) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "use") +pub fn use_environment(envhub: Envhub, environment: String) -> Envhub + +@external(javascript, "../fluentci_ffi.mjs", "waitOn") +pub fn wait_on(envhub: Envhub, port: int, timeout: int) -> Envhub + +@external(javascript, "../fluentci_ffi.mjs", "withCache") +pub fn with_cache(envhub: Envhub, cache: Cache) -> Envhub + +@external(javascript, "../fluentci_ffi.mjs", "withEnvVariable") +pub fn with_env_variable(envhub: Envhub, name: String, value: String) -> Envhub + +@external(javascript, "../fluentci_ffi.mjs", "withExec") +pub fn with_exec(envhub: Envhub, command: Array(String)) -> Envhub + +@external(javascript, "../fluentci_ffi.mjs", "withSecretVariable") +pub fn with_secret_variable( + envhub: Envhub, + name: String, + secret: Secret, +) -> Envhub + +@external(javascript, "../fluentci_ffi.mjs", "withService") +pub fn with_service(envhub: Envhub, service: Service) -> Envhub + +@external(javascript, "../fluentci_ffi.mjs", "withWorkdir") +pub fn with_workdir(envhub: Envhub, path: String) -> Envhub diff --git a/sdk/gleam/src/fluentci/file.gleam b/sdk/gleam/src/fluentci/file.gleam new file mode 100644 index 0000000..f65616d --- /dev/null +++ b/sdk/gleam/src/fluentci/file.gleam @@ -0,0 +1,26 @@ +import fluentci/directory.{type Directory, type File} +import gleam/javascript/promise.{type Promise} + +@external(javascript, "../fluentci_ffi.mjs", "id") +pub fn id(f: File) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "chmod") +pub fn chmod(f: File, mode: int) -> Promise(File) + +@external(javascript, "../fluentci_ffi.mjs", "md5") +pub fn md5(f: File) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "path") +pub fn path(f: File) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "sha256") +pub fn sha256(f: File) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "tarCzvf") +pub fn tar_czvf(f: File, output_dir: String) -> Directory + +@external(javascript, "../fluentci_ffi.mjs", "unzip") +pub fn unzip(f: File, output_dir: String) -> Directory + +@external(javascript, "../fluentci_ffi.mjs", "zip") +pub fn zip(f: File) -> Directory diff --git a/sdk/gleam/src/fluentci/flox.gleam b/sdk/gleam/src/fluentci/flox.gleam new file mode 100644 index 0000000..1009415 --- /dev/null +++ b/sdk/gleam/src/fluentci/flox.gleam @@ -0,0 +1,40 @@ +import fluentci/cache.{type Cache} +import fluentci/secret.{type Secret} +import fluentci/service.{type Service} +import gleam/javascript/array.{type Array} +import gleam/javascript/promise.{type Promise} + +pub type Flox + +@external(javascript, "../fluentci_ffi.mjs", "asService") +pub fn as_service(flox: Flox) -> Service + +@external(javascript, "../fluentci_ffi.mjs", "id") +pub fn id(flox: Flox) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "stderr") +pub fn stderr(flox: Flox) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "stdout") +pub fn stdout(flox: Flox) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "waitOn") +pub fn wait_on(flox: Flox, port: int, timeout: int) -> Flox + +@external(javascript, "../fluentci_ffi.mjs", "withCache") +pub fn with_cache(flox: Flox, cache: Cache) -> Flox + +@external(javascript, "../fluentci_ffi.mjs", "withEnvVariable") +pub fn with_env_variable(flox: Flox, name: String, value: String) -> Flox + +@external(javascript, "../fluentci_ffi.mjs", "withExec") +pub fn with_exec(flox: Flox, command: Array(String)) -> Flox + +@external(javascript, "../fluentci_ffi.mjs", "withSecretVariable") +pub fn with_secret_variable(flox: Flox, name: String, secret: Secret) -> Flox + +@external(javascript, "../fluentci_ffi.mjs", "withService") +pub fn with_service(flox: Flox, service: Service) -> Flox + +@external(javascript, "../fluentci_ffi.mjs", "withWorkdir") +pub fn with_workdir(flox: Flox, path: String) -> Flox diff --git a/sdk/gleam/src/fluentci/git.gleam b/sdk/gleam/src/fluentci/git.gleam new file mode 100644 index 0000000..4b8fda6 --- /dev/null +++ b/sdk/gleam/src/fluentci/git.gleam @@ -0,0 +1,16 @@ +import fluentci/directory.{type Directory} +import gleam/javascript/promise.{type Promise} + +pub type Git + +@external(javascript, "../fluentci_ffi.mjs", "git") +pub fn branch(g: Git, name: String) -> Git + +@external(javascript, "../fluentci_ffi.mjs", "commit") +pub fn commit(g: Git) -> Git + +@external(javascript, "../fluentci_ffi.mjs", "id") +pub fn id(g: Git) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "tree") +pub fn tree(g: Git) -> Directory diff --git a/sdk/gleam/src/fluentci/mise.gleam b/sdk/gleam/src/fluentci/mise.gleam new file mode 100644 index 0000000..7e24b81 --- /dev/null +++ b/sdk/gleam/src/fluentci/mise.gleam @@ -0,0 +1,40 @@ +import fluentci/cache.{type Cache} +import fluentci/secret.{type Secret} +import fluentci/service.{type Service} +import gleam/javascript/array.{type Array} +import gleam/javascript/promise.{type Promise} + +pub type Mise + +@external(javascript, "../fluentci_ffi.mjs", "asService") +pub fn as_service(mise: Mise) -> Service + +@external(javascript, "../fluentci_ffi.mjs", "id") +pub fn id(mise: Mise) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "stderr") +pub fn stderr(mise: Mise) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "stdout") +pub fn stdout(mise: Mise) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "waitOn") +pub fn wait_on(mise: Mise, port: int, timeout: int) -> Mise + +@external(javascript, "../fluentci_ffi.mjs", "withCache") +pub fn with_cache(mise: Mise, cache: Cache) -> Mise + +@external(javascript, "../fluentci_ffi.mjs", "withEnvVariable") +pub fn with_env_variable(mise: Mise, name: String, value: String) -> Mise + +@external(javascript, "../fluentci_ffi.mjs", "withExec") +pub fn with_exec(mise: Mise, command: Array(String)) -> Mise + +@external(javascript, "../fluentci_ffi.mjs", "withSecretVariable") +pub fn with_secret_variable(mise: Mise, name: String, secret: Secret) -> Mise + +@external(javascript, "../fluentci_ffi.mjs", "withService") +pub fn with_service(mise: Mise, service: Service) -> Mise + +@external(javascript, "../fluentci_ffi.mjs", "withWorkdir") +pub fn with_workdir(mise: Mise, path: String) -> Mise diff --git a/sdk/gleam/src/fluentci/nix.gleam b/sdk/gleam/src/fluentci/nix.gleam new file mode 100644 index 0000000..43f9e3c --- /dev/null +++ b/sdk/gleam/src/fluentci/nix.gleam @@ -0,0 +1,40 @@ +import fluentci/cache.{type Cache} +import fluentci/secret.{type Secret} +import fluentci/service.{type Service} +import gleam/javascript/array.{type Array} +import gleam/javascript/promise.{type Promise} + +pub type Nix + +@external(javascript, "../fluentci_ffi.mjs", "asService") +pub fn as_service(nix: Nix) -> Service + +@external(javascript, "../fluentci_ffi.mjs", "id") +pub fn id(nix: Nix) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "stderr") +pub fn stderr(nix: Nix) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "stdout") +pub fn stdout(nix: Nix) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "waitOn") +pub fn wait_on(nix: Nix, port: int, timeout: int) -> Nix + +@external(javascript, "../fluentci_ffi.mjs", "withCache") +pub fn with_cache(nix: Nix, cache: Cache) -> Nix + +@external(javascript, "../fluentci_ffi.mjs", "withEnvVariable") +pub fn with_env_variable(nix: Nix, name: String, value: String) -> Nix + +@external(javascript, "../fluentci_ffi.mjs", "withExec") +pub fn with_exec(nix: Nix, command: Array(String)) -> Nix + +@external(javascript, "../fluentci_ffi.mjs", "withSecretVariable") +pub fn with_secret_variable(nix: Nix, name: String, secret: Secret) -> Nix + +@external(javascript, "../fluentci_ffi.mjs", "withService") +pub fn with_service(nix: Nix, service: Service) -> Nix + +@external(javascript, "../fluentci_ffi.mjs", "withWorkdir") +pub fn with_workdir(nix: Nix, path: String) -> Nix diff --git a/sdk/gleam/src/fluentci/pipeline.gleam b/sdk/gleam/src/fluentci/pipeline.gleam new file mode 100644 index 0000000..86fb50b --- /dev/null +++ b/sdk/gleam/src/fluentci/pipeline.gleam @@ -0,0 +1,76 @@ +import fluentci/cache.{type Cache} +import fluentci/devbox.{type Devbox} +import fluentci/devenv.{type Devenv} +import fluentci/envhub.{type Envhub} +import fluentci/mise.{type Mise} +import fluentci/nix.{type Nix} +import fluentci/pixi.{type Pixi} +import fluentci/pkgx.{type Pkgx} +import fluentci/secret.{type Secret} +import fluentci/service.{type Service} +import gleam/javascript/array.{type Array} +import gleam/javascript/promise.{type Promise} + +pub type Pipeline + +@external(javascript, "../fluentci_ffi.mjs", "asService") +pub fn as_service(pipeline: Pipeline) -> Service + +@external(javascript, "../fluentci_ffi.mjs", "id") +pub fn id(pipeline: Pipeline) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "devbox") +pub fn devbox(pipeline: Pipeline) -> Devbox + +@external(javascript, "../fluentci_ffi.mjs", "devenv") +pub fn devenv(pipeline: Pipeline) -> Devenv + +@external(javascript, "../fluentci_ffi.mjs", "envhub") +pub fn envhub(pipeline: Pipeline) -> Envhub + +@external(javascript, "../fluentci_ffi.mjs", "mise") +pub fn mise(pipeline: Pipeline) -> Mise + +@external(javascript, "../fluentci_ffi.mjs", "nix") +pub fn nix(pipeline: Pipeline) -> Nix + +@external(javascript, "../fluentci_ffi.mjs", "pixi") +pub fn pixi(pipeline: Pipeline) -> Pixi + +@external(javascript, "../fluentci_ffi.mjs", "pkgx") +pub fn pkgx(pipeline: Pipeline) -> Pkgx + +@external(javascript, "../fluentci_ffi.mjs", "stderr") +pub fn stderr(pipeline: Pipeline) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "stdout") +pub fn stdout(pipeline: Pipeline) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "waitOn") +pub fn wait_on(pipeline: Pipeline, port: int, timeout: int) -> Pipeline + +@external(javascript, "../fluentci_ffi.mjs", "withCache") +pub fn with_cache(pipeline: Pipeline, cache: Cache) -> Pipeline + +@external(javascript, "../fluentci_ffi.mjs", "withEnvVariable") +pub fn with_env_variable( + pipeline: Pipeline, + name: String, + value: String, +) -> Pipeline + +@external(javascript, "../fluentci_ffi.mjs", "withExec") +pub fn with_exec(pipeline: Pipeline, command: Array(String)) -> Pipeline + +@external(javascript, "../fluentci_ffi.mjs", "withSecretVariable") +pub fn with_secret_variable( + pipeline: Pipeline, + name: String, + secret: Secret, +) -> Pipeline + +@external(javascript, "../fluentci_ffi.mjs", "withService") +pub fn with_service(pipeline: Pipeline, service: Service) -> Pipeline + +@external(javascript, "../fluentci_ffi.mjs", "withWorkdir") +pub fn with_workdir(pipeline: Pipeline, path: String) -> Pipeline diff --git a/sdk/gleam/src/fluentci/pixi.gleam b/sdk/gleam/src/fluentci/pixi.gleam new file mode 100644 index 0000000..2548ec4 --- /dev/null +++ b/sdk/gleam/src/fluentci/pixi.gleam @@ -0,0 +1,40 @@ +import fluentci/cache.{type Cache} +import fluentci/secret.{type Secret} +import fluentci/service.{type Service} +import gleam/javascript/array.{type Array} +import gleam/javascript/promise.{type Promise} + +pub type Pixi + +@external(javascript, "../fluentci_ffi.mjs", "asService") +pub fn as_service(pixi: Pixi) -> Service + +@external(javascript, "../fluentci_ffi.mjs", "id") +pub fn id(pixi: Pixi) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "stderr") +pub fn stderr(pixi: Pixi) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "stdout") +pub fn stdout(pixi: Pixi) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "waitOn") +pub fn wait_on(pixi: Pixi, port: int, timeout: int) -> Pixi + +@external(javascript, "../fluentci_ffi.mjs", "withCache") +pub fn with_cache(pixi: Pixi, cache: Cache) -> Pixi + +@external(javascript, "../fluentci_ffi.mjs", "withEnvVariable") +pub fn with_env_variable(pixi: Pixi, name: String, value: String) -> Pixi + +@external(javascript, "../fluentci_ffi.mjs", "withExec") +pub fn with_exec(pixi: Pixi, command: Array(String)) -> Pixi + +@external(javascript, "../fluentci_ffi.mjs", "withSecretVariable") +pub fn with_secret_variable(pixi: Pixi, name: String, secret: Secret) -> Pixi + +@external(javascript, "../fluentci_ffi.mjs", "withService") +pub fn with_service(pixi: Pixi, service: Service) -> Pixi + +@external(javascript, "../fluentci_ffi.mjs", "withWorkdir") +pub fn with_workdir(pixi: Pixi, path: String) -> Pixi diff --git a/sdk/gleam/src/fluentci/pkgx.gleam b/sdk/gleam/src/fluentci/pkgx.gleam new file mode 100644 index 0000000..eccc4e3 --- /dev/null +++ b/sdk/gleam/src/fluentci/pkgx.gleam @@ -0,0 +1,43 @@ +import fluentci/cache.{type Cache} +import fluentci/secret.{type Secret} +import fluentci/service.{type Service} +import gleam/javascript/array.{type Array} +import gleam/javascript/promise.{type Promise} + +pub type Pkgx + +@external(javascript, "../fluentci_ffi.mjs", "asService") +pub fn as_service(pkgx: Pkgx) -> Service + +@external(javascript, "../fluentci_ffi.mjs", "id") +pub fn id(pkgx: Pkgx) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "stderr") +pub fn stderr(pkgx: Pkgx) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "stdout") +pub fn stdout(pkgx: Pkgx) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "waitOn") +pub fn wait_on(pkgx: Pkgx, port: int, timeout: int) -> Pkgx + +@external(javascript, "../fluentci_ffi.mjs", "withCache") +pub fn with_cache(pkgx: Pkgx, cache: Cache) -> Pkgx + +@external(javascript, "../fluentci_ffi.mjs", "withEnvVariable") +pub fn with_env_variable(pkgx: Pkgx, name: String, value: String) -> Pkgx + +@external(javascript, "../fluentci_ffi.mjs", "withExec") +pub fn with_exec(pkgx: Pkgx, command: Array(String)) -> Pkgx + +@external(javascript, "../fluentci_ffi.mjs", "withSecretVariable") +pub fn with_secret_variable(pkgx: Pkgx, name: String, secret: Secret) -> Pkgx + +@external(javascript, "../fluentci_ffi.mjs", "withPackages") +pub fn with_packages(pkgx: Pkgx, packages: Array(String)) -> Pkgx + +@external(javascript, "../fluentci_ffi.mjs", "withService") +pub fn with_service(pkgx: Pkgx, service: Service) -> Pkgx + +@external(javascript, "../fluentci_ffi.mjs", "withWorkdir") +pub fn with_workdir(pkgx: Pkgx, path: String) -> Pkgx diff --git a/sdk/gleam/src/fluentci/secret.gleam b/sdk/gleam/src/fluentci/secret.gleam new file mode 100644 index 0000000..077f806 --- /dev/null +++ b/sdk/gleam/src/fluentci/secret.gleam @@ -0,0 +1,15 @@ +import gleam/javascript/promise.{type Promise} + +pub type Secret + +@external(javascript, "../fluentci_ffi.mjs", "id") +pub fn id(secret: Secret) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "mount") +pub fn mount(secret: Secret) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "path") +pub fn name(secret: Secret) -> Promise(String) + +@external(javascript, "../fluentci_ffi.mjs", "plaintext") +pub fn plaintext(secret: Secret) -> Promise(String) diff --git a/sdk/gleam/src/fluentci/secret_manager.gleam b/sdk/gleam/src/fluentci/secret_manager.gleam new file mode 100644 index 0000000..cb2f8b0 --- /dev/null +++ b/sdk/gleam/src/fluentci/secret_manager.gleam @@ -0,0 +1,14 @@ +import fluentci/secret.{type Secret} +import gleam/javascript/array.{type Array} +import gleam/javascript/promise.{type Promise} + +pub type SecretManager + +@external(javascript, "../fluentci_ffi.mjs", "getSecret") +pub fn get_secret( + secret_manager: SecretManager, + name: String, +) -> Promise(Array(Secret)) + +@external(javascript, "../fluentci_ffi.mjs", "id") +pub fn id(secret_manager: SecretManager) -> Promise(String) diff --git a/sdk/gleam/src/fluentci/service.gleam b/sdk/gleam/src/fluentci/service.gleam new file mode 100644 index 0000000..6ecced6 --- /dev/null +++ b/sdk/gleam/src/fluentci/service.gleam @@ -0,0 +1,6 @@ +import gleam/javascript/promise.{type Promise} + +pub type Service + +@external(javascript, "../fluentci_ffi.mjs", "id") +pub fn id(service: Service) -> Promise(String) diff --git a/sdk/gleam/src/fluentci_ffi.mjs b/sdk/gleam/src/fluentci_ffi.mjs new file mode 100644 index 0000000..16bf7af --- /dev/null +++ b/sdk/gleam/src/fluentci_ffi.mjs @@ -0,0 +1,210 @@ +import { dag } from "jsr:@fluentci/sdk"; + +export function client() { + return dag; +} + +export function azureSecretsManager(c, region, accessKeyId, secretAccessKey) { + return c.azureSecretsManager(region, accessKeyId, secretAccessKey); +} + +export function azureKeyvault( + c, + clientId, + clientSecret, + tenantId, + keyvaultName, + keyvaultUrl +) { + return c.azureKeyvault( + clientId, + clientSecret, + tenantId, + keyvaultName, + keyvaultUrl + ); +} + +export function cache(c, key) { + return c.cache(key); +} + +export function devbox(c) { + return c.devbox(); +} + +export function devenv(c) { + return c.devenv(); +} + +export function directory(c, path) { + return c.directory(path); +} + +export function envhub(c) { + return c.envhub(); +} + +export function file(c, path) { + return c.file(path); +} + +export function flox(c) { + return c.flox(); +} + +export function git(c, url) { + return c.git(url); +} + +export function googleCloudSecretManager(c, project, googleCredentialsFile) { + return c.googleCloudSecretManager(project, googleCredentialsFile); +} + +export function hashicorpVault(c, address, token, cacerts) { + return c.hashicorpVault(address, token, cacerts); +} + +export function http(c, url) { + return c.http(url); +} + +export function mise(c) { + return c.mise(); +} + +export function nix(c, args) { + return c.nix(args); +} + +export function pipeline(c, name) { + return c.pipeline(name); +} + +export function pixi(c) { + return c.pixi(); +} + +export function pkgx(c) { + return c.pkgx(); +} + +export function setSecret(c, name, value) { + return c.setSecret(name, value); +} + +export function plaintext(s) { + return s.plaintext(); +} + +export function id(c) { + return c.id(); +} + +export function key(c) { + return c.key(); +} + +export function asService(c) { + return c.asService(); +} + +export function stderr(c) { + return c.stderr(); +} + +export function stdout(c) { + return c.stdout(); +} + +export function waitOn(c, port, timeout) { + return c.waitOn(port, timeout); +} + +export function withCache(c, cache) { + return c.withCache(cache); +} + +export function withEnvVariable(c, name, value) { + return c.withEnvVariable(name, value); +} + +export function withExec(c, args) { + return c.withExec(args); +} + +export function withSecretVariable(c, name, secret) { + return c.withSecretVariable(name, secret); +} + +export function withService(c, service) { + return c.withService(service); +} + +export function withWorkdir(c, path) { + return c.withWorkdir(path); +} + +export function use(c, environment) { + return c.use(environment); +} + +export function withPackages(c, packages) { + return c.withPackages(packages); +} + +export function entries(c) { + return c.entries(); +} + +export function withFile(c, fileId) { + return c.withFile(fileId); +} + +export function zip(c) { + return c.zip(); +} + +export function tarCzvf(c) { + return c.tarCzvf(); +} + +export function chmod(c, mode) { + return c.chmod(mode); +} + +export function md5(c) { + return c.md5(); +} + +export function path(c) { + return c.path(); +} + +export function sha256(c) { + return c.sha256(); +} + +export function unzip(c) { + return c.unzip(); +} + +export function mount(c) { + return c.mount(); +} + +export function name(c) { + return c.name(); +} + +export function commit(c) { + return c.commit(); +} + +export function tree(c) { + return c.tree(); +} + +export function getSecret(c, name) { + return c.getSecret(name); +} diff --git a/sdk/gleam/src/plugin_ffi.mjs b/sdk/gleam/src/plugin_ffi.mjs new file mode 100644 index 0000000..e69de29 diff --git a/sdk/gleam/test/fluentci_test.gleam b/sdk/gleam/test/fluentci_test.gleam new file mode 100644 index 0000000..3831e7a --- /dev/null +++ b/sdk/gleam/test/fluentci_test.gleam @@ -0,0 +1,12 @@ +import gleeunit +import gleeunit/should + +pub fn main() { + gleeunit.main() +} + +// gleeunit test functions end in `_test` +pub fn hello_world_test() { + 1 + |> should.equal(1) +}