Dagger NodeJS SDK
api/client.gen.CurrentModule
Reflective module API provided to functions at runtime.
Hierarchy
-
BaseClient
↳
CurrentModule
Constructors
constructor
new CurrentModule(parent?
, _id?
, _name?
): CurrentModule
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? | CurrentModuleID |
_name? | string |
Returns
Overrides
BaseClient.constructor
Properties
_id
Private
Optional
Readonly
_id: CurrentModuleID
= undefined
_name
Private
Optional
Readonly
_name: string
= undefined
Methods
id
id(): Promise
<CurrentModuleID
>
A unique identifier for this CurrentModule.
Returns
Promise
<CurrentModuleID
>
name
name(): Promise
<string
>
The name of the module being executed in
Returns
Promise
<string
>
source
source(): Directory
The directory containing the module's source code loaded into the engine (plus any generated code that may have been created).
Returns
workdir
workdir(path
, opts?
): Directory
Load a directory from the module's scratch working directory, including any changes that may have been made to it during module function execution.
Parameters
Name | Type | Description |
---|---|---|
path | string | Location of the directory to access (e.g., "."). |
opts? | CurrentModuleWorkdirOpts | - |
Returns
workdirFile
workdirFile(path
): File
Load a file from the module's scratch working directory, including any changes that may have been made to it during module function execution.Load a file from the module's scratch working directory, including any changes that may have been made to it during module function execution.
Parameters
Name | Type | Description |
---|---|---|
path | string | Location of the file to retrieve (e.g., "README.md"). |