-- Generated by scripts/generate.mjs. Do not edit. module Dagger.ModuleSource ( asModule , asString , blueprint , clientSchemaIntrospectionJSON , cloneRef , commit , configClients , configExists , contextDirectory , dependencies , digest , directory , engineVersion , generate , generatedContextChangeset , generatedContextDirectory , htmlRepoURL , htmlURL , id , introspectionSchemaJSON , kind_ , localContextDirectoryPath , moduleName , moduleOriginalName , originalSubpath , pin , repoRootPath , sdk , sourceRootSubpath , sourceSubpath , sync , toolchains , updatedConfigDirectory , userDefaults , version , withBlueprint , withClient , withDependencies , withEngineVersion , withExperimentalFeatures , withIncludes , withName , withoutBlueprint , withoutClient , withoutDependencies , withoutExperimentalFeatures , withoutToolchains , withSDK , withSourceSubpath , withToolchains , withUpdateBlueprint , withUpdatedClients , withUpdateDependencies , withUpdateToolchains ) where import Data.Maybe (Maybe) import Effect.Aff (Aff) import Dagger.Internal.Runtime as R import Dagger.Types as T -- | Load the source as a module. If this is a local source, the parent directory must have been provided during module source creation asModule :: T.ModuleSource -> T.Module asModule = R.select "asModule" [] -- | A human readable ref string representation of this module source. asString :: T.ModuleSource -> Aff String asString = R.scalar "asString" [] -- | The blueprint referenced by the module source. -- | Deprecated: Legacy dagger.json field. Generic module loading no longer honors it; use workspace modules in dagger.toml instead. blueprint :: T.ModuleSource -> T.ModuleSource blueprint = R.select "blueprint" [] -- | The client-facing introspection schema JSON file for this module source. -- | -- | This is the schema consumed by client codegen: unlike introspectionSchemaJSON (the module-facing schema), it hides no core types and installs this module (reached via dag.) so a generated client can bind it. The module's dependencies are excluded: a client is generated for a single module plus core, not its dependency graph. clientSchemaIntrospectionJSON :: T.ModuleSource -> T.File clientSchemaIntrospectionJSON = R.select "clientSchemaIntrospectionJSON" [] -- | The ref to clone the root of the git repo from. Only valid for git sources. cloneRef :: T.ModuleSource -> Aff String cloneRef = R.scalar "cloneRef" [] -- | The resolved commit of the git repo this source points to. commit :: T.ModuleSource -> Aff String commit = R.scalar "commit" [] -- | The clients generated for the module. configClients :: T.ModuleSource -> Aff (Array T.ModuleConfigClient) configClients = R.objectList "ModuleConfigClient" "configClients" [] -- | Whether an existing module config file was found. configExists :: T.ModuleSource -> Aff Boolean configExists = R.scalar "configExists" [] -- | The full directory loaded for the module source, including the source code as a subdirectory. contextDirectory :: T.ModuleSource -> T.Directory contextDirectory = R.select "contextDirectory" [] -- | The dependencies of the module source. dependencies :: T.ModuleSource -> Aff (Array T.ModuleSource) dependencies = R.objectList "ModuleSource" "dependencies" [] -- | A content-hash of the module source. Module sources with the same digest will output the same generated context and convert into the same module instance. digest :: T.ModuleSource -> Aff String digest = R.scalar "digest" [] -- | The directory containing the module configuration and source code (source code may be in a subdir). directory :: String -> T.ModuleSource -> T.Directory directory argPath = R.select "directory" [R.argument "path" "String!" argPath] -- | The engine version of the module. engineVersion :: T.ModuleSource -> Aff String engineVersion = R.scalar "engineVersion" [] -- | Return the supplied workspace with this module's generated context applied. -- | -- | The workspace change baseline is preserved, so a later Workspace.changes call includes this generation together with any other edits made by the caller. generate :: T.Workspace -> T.ModuleSource -> T.Workspace generate argWorkspace = R.select "generate" [R.objectArgument "workspace" "ID!" argWorkspace] -- | The generated files and directories made on top of the module source's context directory, returned as a Changeset. generatedContextChangeset :: T.ModuleSource -> T.Changeset generatedContextChangeset = R.select "generatedContextChangeset" [] -- | The generated files and directories made on top of the module source's context directory. generatedContextDirectory :: T.ModuleSource -> T.Directory generatedContextDirectory = R.select "generatedContextDirectory" [] -- | The URL to access the web view of the repository (e.g., GitHub, GitLab, Bitbucket). htmlRepoURL :: T.ModuleSource -> Aff String htmlRepoURL = R.scalar "htmlRepoURL" [] -- | The URL to the source's git repo in a web browser. Only valid for git sources. htmlURL :: T.ModuleSource -> Aff String htmlURL = R.scalar "htmlURL" [] -- | A unique identifier for this ModuleSource. id :: T.ModuleSource -> Aff T.ID id = R.scalar "id" [] -- | The introspection schema JSON file for this module source. -- | -- | This file represents the schema visible to the module's source code, including all core types and those from the dependencies. -- | -- | Note: this is in the context of a module, so some core types may be hidden. introspectionSchemaJSON :: T.ModuleSource -> T.File introspectionSchemaJSON = R.select "introspectionSchemaJSON" [] -- | The kind of module source (currently local, git or dir). kind_ :: T.ModuleSource -> Aff T.ModuleSourceKind kind_ = R.scalar "kind" [] -- | The full absolute path to the context directory on the caller's host filesystem that this module source is loaded from. Only valid for local module sources. localContextDirectoryPath :: T.ModuleSource -> Aff String localContextDirectoryPath = R.scalar "localContextDirectoryPath" [] -- | The name of the module, including any setting via the withName API. moduleName :: T.ModuleSource -> Aff String moduleName = R.scalar "moduleName" [] -- | The original name of the module as read from the module config file (or set for the first time with the withName API). moduleOriginalName :: T.ModuleSource -> Aff String moduleOriginalName = R.scalar "moduleOriginalName" [] -- | The original subpath used when instantiating this module source, relative to the context directory. originalSubpath :: T.ModuleSource -> Aff String originalSubpath = R.scalar "originalSubpath" [] -- | The pinned version of this module source. pin :: T.ModuleSource -> Aff String pin = R.scalar "pin" [] -- | The import path corresponding to the root of the git repo this source points to. Only valid for git sources. repoRootPath :: T.ModuleSource -> Aff String repoRootPath = R.scalar "repoRootPath" [] -- | The SDK configuration of the module. sdk :: T.ModuleSource -> Aff (Maybe T.SDKConfig) sdk = R.nullableObject "SDKConfig" "sdk" [] -- | The path, relative to the context directory, that contains the module config. sourceRootSubpath :: T.ModuleSource -> Aff String sourceRootSubpath = R.scalar "sourceRootSubpath" [] -- | The path to the directory containing the module's source code, relative to the context directory. sourceSubpath :: T.ModuleSource -> Aff String sourceSubpath = R.scalar "sourceSubpath" [] -- | Forces evaluation of the module source, including any loading into the engine and associated validation. sync :: T.ModuleSource -> Aff T.ID sync = R.scalar "sync" [] -- | The toolchains referenced by the module source. -- | Deprecated: Legacy dagger.json field. Generic module loading no longer honors it; use workspace modules in dagger.toml instead. toolchains :: T.ModuleSource -> Aff (Array T.ModuleSource) toolchains = R.objectList "ModuleSource" "toolchains" [] -- | The module's dagger.json with any in-memory edits from with* APIs applied, as a diff relative to the source's context directory. -- | -- | Unlike generatedContextDirectory, this does not run codegen and does not validate the engine version against the running engine, so it can be used to declare an engine requirement newer than the running engine. Loading or serving such a module still fails at moduleSource.asModule. updatedConfigDirectory :: T.ModuleSource -> T.Directory updatedConfigDirectory = R.select "updatedConfigDirectory" [] -- | User-defined defaults read from local .env files userDefaults :: T.ModuleSource -> T.EnvFile userDefaults = R.select "userDefaults" [] -- | The specified version of the git repo this source points to. version :: T.ModuleSource -> Aff String version = R.scalar "version" [] -- | Set a blueprint for the module source. -- | Deprecated: Legacy dagger.json field. Generic module loading no longer honors it; use workspace modules in `dagger.toml` instead. withBlueprint :: T.ModuleSource -> T.ModuleSource -> T.ModuleSource withBlueprint argBlueprint = R.select "withBlueprint" [R.objectArgument "blueprint" "ID!" argBlueprint] -- | Update the module source with a new client to generate. withClient :: String -> String -> T.ModuleSource -> T.ModuleSource withClient argGenerator argOutputDir = R.select "withClient" [R.argument "generator" "String!" argGenerator, R.argument "outputDir" "String!" argOutputDir] -- | Append the provided dependencies to the module source's dependency list. withDependencies :: (Array T.ModuleSource) -> T.ModuleSource -> T.ModuleSource withDependencies argDependencies = R.select "withDependencies" [R.objectsArgument "dependencies" "[ID!]!" argDependencies] -- | Upgrade the engine version of the module to the given value. withEngineVersion :: String -> T.ModuleSource -> T.ModuleSource withEngineVersion argVersion = R.select "withEngineVersion" [R.argument "version" "String!" argVersion] -- | Enable the experimental features for the module source. withExperimentalFeatures :: (Array T.ModuleSourceExperimentalFeature) -> T.ModuleSource -> T.ModuleSource withExperimentalFeatures argFeatures = R.select "withExperimentalFeatures" [R.argument "features" "[ModuleSourceExperimentalFeature!]!" argFeatures] -- | Update the module source with additional include patterns for files+directories from its context that are required for building it withIncludes :: (Array String) -> T.ModuleSource -> T.ModuleSource withIncludes argPatterns = R.select "withIncludes" [R.argument "patterns" "[String!]!" argPatterns] -- | Update the module source with a new name. withName :: String -> T.ModuleSource -> T.ModuleSource withName argName = R.select "withName" [R.argument "name" "String!" argName] -- | Remove the current blueprint from the module source. -- | Deprecated: Legacy dagger.json field. Generic module loading no longer honors it; use workspace modules in `dagger.toml` instead. withoutBlueprint :: T.ModuleSource -> T.ModuleSource withoutBlueprint = R.select "withoutBlueprint" [] -- | Remove a client from the module source. withoutClient :: String -> T.ModuleSource -> T.ModuleSource withoutClient argPath = R.select "withoutClient" [R.argument "path" "String!" argPath] -- | Remove the provided dependencies from the module source's dependency list. withoutDependencies :: (Array String) -> T.ModuleSource -> T.ModuleSource withoutDependencies argDependencies = R.select "withoutDependencies" [R.argument "dependencies" "[String!]!" argDependencies] -- | Disable experimental features for the module source. withoutExperimentalFeatures :: (Array T.ModuleSourceExperimentalFeature) -> T.ModuleSource -> T.ModuleSource withoutExperimentalFeatures argFeatures = R.select "withoutExperimentalFeatures" [R.argument "features" "[ModuleSourceExperimentalFeature!]!" argFeatures] -- | Remove the provided toolchains from the module source. -- | Deprecated: Legacy dagger.json field. Generic module loading no longer honors it; use workspace modules in `dagger.toml` instead. withoutToolchains :: (Array String) -> T.ModuleSource -> T.ModuleSource withoutToolchains argToolchains = R.select "withoutToolchains" [R.argument "toolchains" "[String!]!" argToolchains] -- | Update the module source with a new SDK. withSDK :: String -> T.ModuleSource -> T.ModuleSource withSDK argSource = R.select "withSDK" [R.argument "source" "String!" argSource] -- | Update the module source with a new source subpath. withSourceSubpath :: String -> T.ModuleSource -> T.ModuleSource withSourceSubpath argPath = R.select "withSourceSubpath" [R.argument "path" "String!" argPath] -- | Add toolchains to the module source. -- | Deprecated: Legacy dagger.json field. Generic module loading no longer honors it; use workspace modules in `dagger.toml` instead. withToolchains :: (Array T.ModuleSource) -> T.ModuleSource -> T.ModuleSource withToolchains argToolchains = R.select "withToolchains" [R.objectsArgument "toolchains" "[ID!]!" argToolchains] -- | Update the blueprint module to the latest version. -- | Deprecated: Legacy dagger.json field. Generic module loading no longer honors it; use workspace modules in `dagger.toml` instead. withUpdateBlueprint :: T.ModuleSource -> T.ModuleSource withUpdateBlueprint = R.select "withUpdateBlueprint" [] -- | Update one or more clients. withUpdatedClients :: (Array String) -> T.ModuleSource -> T.ModuleSource withUpdatedClients argClients = R.select "withUpdatedClients" [R.argument "clients" "[String!]!" argClients] -- | Update one or more module dependencies. withUpdateDependencies :: (Array String) -> T.ModuleSource -> T.ModuleSource withUpdateDependencies argDependencies = R.select "withUpdateDependencies" [R.argument "dependencies" "[String!]!" argDependencies] -- | Update one or more toolchains. -- | Deprecated: Legacy dagger.json field. Generic module loading no longer honors it; use workspace modules in `dagger.toml` instead. withUpdateToolchains :: (Array String) -> T.ModuleSource -> T.ModuleSource withUpdateToolchains argToolchains = R.select "withUpdateToolchains" [R.argument "toolchains" "[String!]!" argToolchains]