node
No long description provided.
Installation
dagger install github.com/dagger/dagger/sdk/typescript/dev/node@fca9e788f6d605ef9d256beace4656c11d7f6fe5Entrypoint
Return Type
Commands !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ctr | Container ! | - | No description provided |
Example
Function Commands.Constructor is not accessible from the node moduleFunction Commands.Constructor is not accessible from the node moduleFunction Commands.Constructor is not accessible from the node moduleFunction Commands.Constructor is not accessible from the node moduleEntrypoint
Return Type
Node !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | String | - | No description provided |
| ctr | Container | - | No description provided |
Example
dagger -m github.com/dagger/dagger/sdk/typescript/dev/node@fca9e788f6d605ef9d256beace4656c11d7f6fe5 call \
func (m *MyModule) Example() *dagger.Node {
return dag.
Node()
}@function
def example() -> dagger.Node:
return (
dag.node()
)@func()
example(): Node {
return dag
.node()
}Types
Commands 🔗
run() 🔗
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| args | [String ! ] ! | - | No description provided |
Example
dagger -m github.com/dagger/dagger/sdk/typescript/dev/node@fca9e788f6d605ef9d256beace4656c11d7f6fe5 call \
commands \
run --args string1 --args string2func (m *MyModule) Example(args []string) *dagger.Container {
return dag.
Node().
Commands().
Run(args)
}@function
def example(args: List[str]) -> dagger.Container:
return (
dag.node()
.commands()
.run(args)
)@func()
example(args: string[]): Container {
return dag
.node()
.commands()
.run(args)
}lint() 🔗
Return Type
Container ! Example
dagger -m github.com/dagger/dagger/sdk/typescript/dev/node@fca9e788f6d605ef9d256beace4656c11d7f6fe5 call \
commands \
lintfunc (m *MyModule) Example() *dagger.Container {
return dag.
Node().
Commands().
Lint()
}@function
def example() -> dagger.Container:
return (
dag.node()
.commands()
.lint()
)@func()
example(): Container {
return dag
.node()
.commands()
.lint()
}test() 🔗
Return Type
Container ! Example
dagger -m github.com/dagger/dagger/sdk/typescript/dev/node@fca9e788f6d605ef9d256beace4656c11d7f6fe5 call \
commands \
testfunc (m *MyModule) Example() *dagger.Container {
return dag.
Node().
Commands().
Test()
}@function
def example() -> dagger.Container:
return (
dag.node()
.commands()
.test()
)@func()
example(): Container {
return dag
.node()
.commands()
.test()
}build() 🔗
Return Type
Container ! Example
dagger -m github.com/dagger/dagger/sdk/typescript/dev/node@fca9e788f6d605ef9d256beace4656c11d7f6fe5 call \
commands \
buildfunc (m *MyModule) Example() *dagger.Container {
return dag.
Node().
Commands().
Build()
}@function
def example() -> dagger.Container:
return (
dag.node()
.commands()
.build()
)@func()
example(): Container {
return dag
.node()
.commands()
.build()
}Node 🔗
version() 🔗
Return Type
String ! Example
dagger -m github.com/dagger/dagger/sdk/typescript/dev/node@fca9e788f6d605ef9d256beace4656c11d7f6fe5 call \
versionfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Node().
Version(ctx)
}@function
async def example() -> str:
return await (
dag.node()
.version()
)@func()
async example(): Promise<string> {
return dag
.node()
.version()
}container() 🔗
Return Type
Container ! Example
dagger -m github.com/dagger/dagger/sdk/typescript/dev/node@fca9e788f6d605ef9d256beace4656c11d7f6fe5 call \
containerfunc (m *MyModule) Example() *dagger.Container {
return dag.
Node().
Container()
}@function
def example() -> dagger.Container:
return (
dag.node()
.container()
)@func()
example(): Container {
return dag
.node()
.container()
}withSource() 🔗
Add source to the module container.
Return Type
Node !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | No description provided |
| cache | CacheVolume | - | No description provided |
Example
dagger -m github.com/dagger/dagger/sdk/typescript/dev/node@fca9e788f6d605ef9d256beace4656c11d7f6fe5 call \
with-source --source DIR_PATHfunc (m *MyModule) Example(source *dagger.Directory) *dagger.Node {
return dag.
Node().
WithSource(source)
}@function
def example(source: dagger.Directory) -> dagger.Node:
return (
dag.node()
.with_source(source)
)@func()
example(source: Directory): Node {
return dag
.node()
.withSource(source)
}withYarn() 🔗
Add yarn as package manager in the container.
This also update the container entrypoint to “yarn”.
Return Type
Node !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| cache | CacheVolume | - | No description provided |
Example
dagger -m github.com/dagger/dagger/sdk/typescript/dev/node@fca9e788f6d605ef9d256beace4656c11d7f6fe5 call \
with-yarnfunc (m *MyModule) Example() *dagger.Node {
return dag.
Node().
WithYarn()
}@function
def example() -> dagger.Node:
return (
dag.node()
.with_yarn()
)@func()
example(): Node {
return dag
.node()
.withYarn()
}withNpm() 🔗
Add npm as package manager in the container.
This also update the container entrypoint to “npm”.
Return Type
Node !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| cache | CacheVolume | - | No description provided |
Example
dagger -m github.com/dagger/dagger/sdk/typescript/dev/node@fca9e788f6d605ef9d256beace4656c11d7f6fe5 call \
with-npmfunc (m *MyModule) Example() *dagger.Node {
return dag.
Node().
WithNpm()
}@function
def example() -> dagger.Node:
return (
dag.node()
.with_npm()
)@func()
example(): Node {
return dag
.node()
.withNpm()
}withPnpm() 🔗
Add pnpm as package manager in the container.
This also update the container entrypoint to “pnpm”.
Return Type
Node !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| cache | CacheVolume | - | No description provided |
Example
dagger -m github.com/dagger/dagger/sdk/typescript/dev/node@fca9e788f6d605ef9d256beace4656c11d7f6fe5 call \
with-pnpmfunc (m *MyModule) Example() *dagger.Node {
return dag.
Node().
WithPnpm()
}@function
def example() -> dagger.Node:
return (
dag.node()
.with_pnpm()
)@func()
example(): Node {
return dag
.node()
.withPnpm()
}install() 🔗
Downloads dependencies in the container.
Return Type
Node !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| pkgs | [String ! ] ! | [] | No description provided |
Example
dagger -m github.com/dagger/dagger/sdk/typescript/dev/node@fca9e788f6d605ef9d256beace4656c11d7f6fe5 call \
install --pkgs string1 --pkgs string2func (m *MyModule) Example(pkgs []string) *dagger.Node {
return dag.
Node().
Install(pkgs)
}@function
def example(pkgs: List[str]) -> dagger.Node:
return (
dag.node()
.install(pkgs)
)@func()
example(pkgs: string[]): Node {
return dag
.node()
.install(pkgs)
}commands() 🔗
Execute commands in the container.
Return Type
Commands ! Example
dagger -m github.com/dagger/dagger/sdk/typescript/dev/node@fca9e788f6d605ef9d256beace4656c11d7f6fe5 call \
commandsfunc (m *MyModule) Example() *dagger.NodeCommands {
return dag.
Node().
Commands()
}@function
def example() -> dagger.NodeCommands:
return (
dag.node()
.commands()
)@func()
example(): NodeCommands {
return dag
.node()
.commands()
}