Dagger NodeJS SDK
api/client.gen.ModuleSource
The source needed to load and run a module, along with any metadata about the source such as versions/urls/etc.
Hierarchy
-
BaseClient
↳
ModuleSource
Constructors
constructor
new ModuleSource(parent?
, _id?
, _asString?
, _configExists?
, _kind?
, _moduleName?
, _moduleOriginalName?
, _resolveContextPathFromCaller?
, _sourceRootSubpath?
, _sourceSubpath?
): ModuleSource
Constructor is used for internal usage only, do not create object from it.
Parameters
Name | Type |
---|---|
parent? | Object |
parent.ctx | Context |
parent.queryTree? | QueryTree [] |
_id? | ModuleSourceID |
_asString? | string |
_configExists? | boolean |
_kind? | ModuleSourceKind |
_moduleName? | string |
_moduleOriginalName? | string |
_resolveContextPathFromCaller? | string |
_sourceRootSubpath? | string |
_sourceSubpath? | string |
Returns
Overrides
BaseClient.constructor
Properties
_asString
Private
Optional
Readonly
_asString: string
= undefined
_configExists
Private
Optional
Readonly
_configExists: boolean
= undefined
_id
Private
Optional
Readonly
_id: ModuleSourceID
= undefined
_kind
Private
Optional
Readonly
_kind: ModuleSourceKind
= undefined
_moduleName
Private
Optional
Readonly
_moduleName: string
= undefined
_moduleOriginalName
Private
Optional
Readonly
_moduleOriginalName: string
= undefined
_resolveContextPathFromCaller
Private
Optional
Readonly
_resolveContextPathFromCaller: string
= undefined
_sourceRootSubpath
Private
Optional
Readonly
_sourceRootSubpath: string
= undefined
_sourceSubpath
Private
Optional
Readonly
_sourceSubpath: string
= undefined
Methods
asGitSource
asGitSource(): GitModuleSource
If the source is a of kind git, the git source representation of it.
Returns
asLocalSource
asLocalSource(): LocalModuleSource
If the source is of kind local, the local source representation of it.
Returns
asModule
asModule(): Module_
Load the source as a module. If this is a local source, the parent directory must have been provided during module source creation
Returns
asString
asString(): Promise
<string
>
A human readable ref string representation of this module source.
Returns
Promise
<string
>
configExists
configExists(): Promise
<boolean
>
Returns whether the module source has a configuration file.
Returns
Promise
<boolean
>
contextDirectory
contextDirectory(): Directory
The directory containing everything needed to load load and use the module.
Returns
dependencies
dependencies(): Promise
<ModuleDependency
[]>
The dependencies of the module source. Includes dependencies from the configuration and any extras from withDependencies calls.
Returns
Promise
<ModuleDependency
[]>
directory
directory(path
): Directory
The directory containing the module configuration and source code (source code may be in a subdir).
Parameters
Name | Type | Description |
---|---|---|
path | string | The path from the source directory to select. |
Returns
id
id(): Promise
<ModuleSourceID
>
A unique identifier for this ModuleSource.
Returns
Promise
<ModuleSourceID
>
kind
kind(): Promise
<ModuleSourceKind
>
The kind of source (e.g. local, git, etc.)
Returns
Promise
<ModuleSourceKind
>
moduleName
moduleName(): Promise
<string
>
If set, the name of the module this source references, including any overrides at runtime by callers.
Returns
Promise
<string
>