ModuleSource
class ModuleSource extends AbstractObject implements IdAble
The source needed to load and run a module, along with any metadata about the source such as versions/urls/etc.
Properties
$lastQuery | from AbstractObject |
Methods
No description
Load the source as a module. If this is a local source, the parent directory must have been provided during module source creation
A human readable ref string representation of this module source.
The ref to clone the root of the git repo from. Only valid for git sources.
The resolved commit of the git repo this source points to.
The clients generated for the module.
Whether an existing dagger.json for the module was found.
The full directory loaded for the module source, including the source code as a subdirectory.
The dependencies of the module source.
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.
The directory containing the module configuration and source code (source code may be in a subdir).
The engine version of the module.
The generated files and directories made on top of the module source's context directory.
The URL to access the web view of the repository (e.g., GitHub, GitLab, Bitbucket).
The URL to the source's git repo in a web browser. Only valid for git sources.
A unique identifier for this ModuleSource.
The kind of module source (currently local, git or dir).
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.
The name of the module, including any setting via the withName API.
The original name of the module as read from the module's dagger.json (or set for the first time with the withName API).
The original subpath used when instantiating this module source, relative to the context directory.
The pinned version of this module source.
The import path corresponding to the root of the git repo this source points to. Only valid for git sources.
The path, relative to the context directory, that contains the module's dagger.json.
The path to the directory containing the module's source code, relative to the context directory.
Forces evaluation of the module source, including any loading into the engine and associated validation.
The specified version of the git repo this source points to.
Update the module source with a new client to generate.
Append the provided dependencies to the module source's dependency list.
Upgrade the engine version of the module to the given value.
Update the module source with additional include patterns for files+directories from its context that are required for building it
Update the module source with a new name.
Update the module source with a new SDK.
Update the module source with a new source subpath.
Update one or more module dependencies.
Remove the provided dependencies from the module source's dependency list.
Details
in
AbstractObject at line 13
__construct(AbstractClient $client, QueryBuilderChain $queryBuilderChain)
No description
in
AbstractObject at line 19
protected null|array|string|int|float|bool
queryLeaf(QueryBuilder $leafQueryBuilder, string $leafKey)
No description
at line 19
Module
asModule()
Load the source as a module. If this is a local source, the parent directory must have been provided during module source creation
at line 28
string
asString()
A human readable ref string representation of this module source.
at line 37
string
cloneRef()
The ref to clone the root of the git repo from. Only valid for git sources.
at line 46
string
commit()
The resolved commit of the git repo this source points to.
at line 55
array
configClients()
The clients generated for the module.
at line 64
bool
configExists()
Whether an existing dagger.json for the module was found.
at line 73
Directory
contextDirectory()
The full directory loaded for the module source, including the source code as a subdirectory.
at line 82
array
dependencies()
The dependencies of the module source.
at line 91
string
digest()
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.
at line 100
Directory
directory(string $path)
The directory containing the module configuration and source code (source code may be in a subdir).
at line 110
string
engineVersion()
The engine version of the module.
at line 119
Directory
generatedContextDirectory()
The generated files and directories made on top of the module source's context directory.
at line 128
string
htmlRepoURL()
The URL to access the web view of the repository (e.g., GitHub, GitLab, Bitbucket).
at line 137
string
htmlURL()
The URL to the source's git repo in a web browser. Only valid for git sources.
at line 146
AbstractId
id()
A unique identifier for this ModuleSource.
at line 155
ModuleSourceKind
kind()
The kind of module source (currently local, git or dir).
at line 164
string
localContextDirectoryPath()
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.
at line 173
string
moduleName()
The name of the module, including any setting via the withName API.
at line 182
string
moduleOriginalName()
The original name of the module as read from the module's dagger.json (or set for the first time with the withName API).
at line 191
string
originalSubpath()
The original subpath used when instantiating this module source, relative to the context directory.
at line 200
string
pin()
The pinned version of this module source.
at line 209
string
repoRootPath()
The import path corresponding to the root of the git repo this source points to. Only valid for git sources.
at line 218
SDKConfig
sdk()
The SDK configuration of the module.
at line 227
string
sourceRootSubpath()
The path, relative to the context directory, that contains the module's dagger.json.
at line 236
string
sourceSubpath()
The path to the directory containing the module's source code, relative to the context directory.
at line 245
ModuleSourceId
sync()
Forces evaluation of the module source, including any loading into the engine and associated validation.
at line 254
string
version()
The specified version of the git repo this source points to.
at line 263
ModuleSource
withClient(string $generator, string $outputDir, bool|null $dev = null)
Update the module source with a new client to generate.
at line 277
ModuleSource
withDependencies(array $dependencies)
Append the provided dependencies to the module source's dependency list.
at line 287
ModuleSource
withEngineVersion(string $version)
Upgrade the engine version of the module to the given value.
at line 297
ModuleSource
withIncludes(array $patterns)
Update the module source with additional include patterns for files+directories from its context that are required for building it
at line 307
ModuleSource
withName(string $name)
Update the module source with a new name.
at line 317
ModuleSource
withSDK(string $source)
Update the module source with a new SDK.
at line 327
ModuleSource
withSourceSubpath(string $path)
Update the module source with a new source subpath.
at line 337
ModuleSource
withUpdateDependencies(array $dependencies)
Update one or more module dependencies.
at line 347
ModuleSource
withoutDependencies(array $dependencies)
Remove the provided dependencies from the module source's dependency list.