Something went wrong. Try again.
Dagger 1.0.0 beta SDK experiments
Something went wrong. Try again.
14 kB · 296 lines
at main
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297-- 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 Rimport 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 creationasModule :: T.ModuleSource -> T.ModuleasModule = R.select "asModule" []
-- | A human readable ref string representation of this module source.asString :: T.ModuleSource -> Aff StringasString = 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.ModuleSourceblueprint = 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.<moduleName>) 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.FileclientSchemaIntrospectionJSON = R.select "clientSchemaIntrospectionJSON" []
-- | The ref to clone the root of the git repo from. Only valid for git sources.cloneRef :: T.ModuleSource -> Aff StringcloneRef = R.scalar "cloneRef" []
-- | The resolved commit of the git repo this source points to.commit :: T.ModuleSource -> Aff Stringcommit = 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 BooleanconfigExists = R.scalar "configExists" []
-- | The full directory loaded for the module source, including the source code as a subdirectory.contextDirectory :: T.ModuleSource -> T.DirectorycontextDirectory = 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 Stringdigest = R.scalar "digest" []
-- | The directory containing the module configuration and source code (source code may be in a subdir).directory :: String -> T.ModuleSource -> T.Directorydirectory argPath = R.select "directory" [R.argument "path" "String!" argPath]
-- | The engine version of the module.engineVersion :: T.ModuleSource -> Aff StringengineVersion = 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.Workspacegenerate 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.ChangesetgeneratedContextChangeset = R.select "generatedContextChangeset" []
-- | The generated files and directories made on top of the module source's context directory.generatedContextDirectory :: T.ModuleSource -> T.DirectorygeneratedContextDirectory = R.select "generatedContextDirectory" []
-- | The URL to access the web view of the repository (e.g., GitHub, GitLab, Bitbucket).htmlRepoURL :: T.ModuleSource -> Aff StringhtmlRepoURL = R.scalar "htmlRepoURL" []
-- | The URL to the source's git repo in a web browser. Only valid for git sources.htmlURL :: T.ModuleSource -> Aff StringhtmlURL = R.scalar "htmlURL" []
-- | A unique identifier for this ModuleSource.id :: T.ModuleSource -> Aff T.IDid = 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.FileintrospectionSchemaJSON = R.select "introspectionSchemaJSON" []
-- | The kind of module source (currently local, git or dir).kind_ :: T.ModuleSource -> Aff T.ModuleSourceKindkind_ = 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 StringlocalContextDirectoryPath = R.scalar "localContextDirectoryPath" []
-- | The name of the module, including any setting via the withName API.moduleName :: T.ModuleSource -> Aff StringmoduleName = 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 StringmoduleOriginalName = R.scalar "moduleOriginalName" []
-- | The original subpath used when instantiating this module source, relative to the context directory.originalSubpath :: T.ModuleSource -> Aff StringoriginalSubpath = R.scalar "originalSubpath" []
-- | The pinned version of this module source.pin :: T.ModuleSource -> Aff Stringpin = 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 StringrepoRootPath = 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 StringsourceRootSubpath = R.scalar "sourceRootSubpath" []
-- | The path to the directory containing the module's source code, relative to the context directory.sourceSubpath :: T.ModuleSource -> Aff StringsourceSubpath = R.scalar "sourceSubpath" []
-- | Forces evaluation of the module source, including any loading into the engine and associated validation.sync :: T.ModuleSource -> Aff T.IDsync = 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.DirectoryupdatedConfigDirectory = R.select "updatedConfigDirectory" []
-- | User-defined defaults read from local .env filesuserDefaults :: T.ModuleSource -> T.EnvFileuserDefaults = R.select "userDefaults" []
-- | The specified version of the git repo this source points to.version :: T.ModuleSource -> Aff Stringversion = 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.ModuleSourcewithBlueprint 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.ModuleSourcewithClient 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.ModuleSourcewithDependencies 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.ModuleSourcewithEngineVersion argVersion = R.select "withEngineVersion" [R.argument "version" "String!" argVersion]
-- | Enable the experimental features for the module source.withExperimentalFeatures :: (Array T.ModuleSourceExperimentalFeature) -> T.ModuleSource -> T.ModuleSourcewithExperimentalFeatures 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 itwithIncludes :: (Array String) -> T.ModuleSource -> T.ModuleSourcewithIncludes argPatterns = R.select "withIncludes" [R.argument "patterns" "[String!]!" argPatterns]
-- | Update the module source with a new name.withName :: String -> T.ModuleSource -> T.ModuleSourcewithName 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.ModuleSourcewithoutBlueprint = R.select "withoutBlueprint" []
-- | Remove a client from the module source.withoutClient :: String -> T.ModuleSource -> T.ModuleSourcewithoutClient 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.ModuleSourcewithoutDependencies argDependencies = R.select "withoutDependencies" [R.argument "dependencies" "[String!]!" argDependencies]
-- | Disable experimental features for the module source.withoutExperimentalFeatures :: (Array T.ModuleSourceExperimentalFeature) -> T.ModuleSource -> T.ModuleSourcewithoutExperimentalFeatures 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.ModuleSourcewithoutToolchains argToolchains = R.select "withoutToolchains" [R.argument "toolchains" "[String!]!" argToolchains]
-- | Update the module source with a new SDK.withSDK :: String -> T.ModuleSource -> T.ModuleSourcewithSDK argSource = R.select "withSDK" [R.argument "source" "String!" argSource]
-- | Update the module source with a new source subpath.withSourceSubpath :: String -> T.ModuleSource -> T.ModuleSourcewithSourceSubpath 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.ModuleSourcewithToolchains 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.ModuleSourcewithUpdateBlueprint = R.select "withUpdateBlueprint" []
-- | Update one or more clients.withUpdatedClients :: (Array String) -> T.ModuleSource -> T.ModuleSourcewithUpdatedClients argClients = R.select "withUpdatedClients" [R.argument "clients" "[String!]!" argClients]
-- | Update one or more module dependencies.withUpdateDependencies :: (Array String) -> T.ModuleSource -> T.ModuleSourcewithUpdateDependencies 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.ModuleSourcewithUpdateToolchains argToolchains = R.select "withUpdateToolchains" [R.argument "toolchains" "[String!]!" argToolchains]