Skip to main content

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

NameType
parent?Object
parent.ctxContext
parent.queryTree?QueryTree[]
_id?CurrentModuleID
_name?string

Returns

CurrentModule

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

Directory


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

NameTypeDescription
pathstringLocation of the directory to access (e.g., ".").
opts?CurrentModuleWorkdirOpts-

Returns

Directory


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

NameTypeDescription
pathstringLocation of the file to retrieve (e.g., "README.md").

Returns

File