node
No long description provided.
Installation
dagger install github.com/quartz-technology/daggerverse/node@v0.0.1Entrypoint
Return Type
Node Example
dagger -m github.com/quartz-technology/daggerverse/node@3b177a82780bf2dfe0f148e90608007cb1312e3c 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
Node 🔗
ctr() 🔗
Return Type
Container ! Example
dagger -m github.com/quartz-technology/daggerverse/node@3b177a82780bf2dfe0f148e90608007cb1312e3c call \
ctrfunc (m *MyModule) Example() *dagger.Container {
return dag.
Node().
Ctr()
}@function
def example() -> dagger.Container:
return (
dag.node()
.ctr()
)@func()
example(): Container {
return dag
.node()
.ctr()
}withVersion() 🔗
WithVersion returns Node container with given image version.
Return Type
Node !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | String ! | - | version to use |
Example
dagger -m github.com/quartz-technology/daggerverse/node@3b177a82780bf2dfe0f148e90608007cb1312e3c call \
with-version --version stringfunc (m *MyModule) Example(version string) *dagger.Node {
return dag.
Node().
WithVersion(version)
}@function
def example(version: str) -> dagger.Node:
return (
dag.node()
.with_version(version)
)@func()
example(version: string): Node {
return dag
.node()
.withVersion(version)
}withContainer() 🔗
WithContainer returns Node container with the given container.
Return Type
Node !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ctr | Container ! | - | container to use in Node. |
Example
dagger -m github.com/quartz-technology/daggerverse/node@3b177a82780bf2dfe0f148e90608007cb1312e3c call \
with-container --ctr IMAGE:TAGfunc (m *MyModule) Example(ctr *dagger.Container) *dagger.Node {
return dag.
Node().
WithContainer(ctr)
}@function
def example(ctr: dagger.Container) -> dagger.Node:
return (
dag.node()
.with_container(ctr)
)@func()
example(ctr: Container): Node {
return dag
.node()
.withContainer(ctr)
}container() 🔗
Container returns Node container.
Return Type
Container ! Example
dagger -m github.com/quartz-technology/daggerverse/node@3b177a82780bf2dfe0f148e90608007cb1312e3c 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() 🔗
WithSource returns the Node container with source and cache set in it.
Return Type
Node !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | source code to add to the Node container |
Example
dagger -m github.com/quartz-technology/daggerverse/node@3b177a82780bf2dfe0f148e90608007cb1312e3c 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() 🔗
WithYarn returns Node container with yarn configured as package manager.
Return Type
Node ! Example
dagger -m github.com/quartz-technology/daggerverse/node@3b177a82780bf2dfe0f148e90608007cb1312e3c 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() 🔗
WithNpm returns Node container with npm configured as package manager.
Return Type
Node ! Example
dagger -m github.com/quartz-technology/daggerverse/node@3b177a82780bf2dfe0f148e90608007cb1312e3c 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()
}run() 🔗
Run returns the container with the command set.
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| args | [String ! ] ! | - | arguments to execute |
Example
dagger -m github.com/quartz-technology/daggerverse/node@3b177a82780bf2dfe0f148e90608007cb1312e3c call \
run --args string1 --args string2func (m *MyModule) Example(args []string) *dagger.Container {
return dag.
Node().
Run(args)
}@function
def example(args: List[str]) -> dagger.Container:
return (
dag.node()
.run(args)
)@func()
example(args: string[]): Container {
return dag
.node()
.run(args)
}start() 🔗
Start returns the output of the code executed.
Return Type
String ! Example
dagger -m github.com/quartz-technology/daggerverse/node@3b177a82780bf2dfe0f148e90608007cb1312e3c call \
startfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Node().
Start(ctx)
}@function
async def example() -> str:
return await (
dag.node()
.start()
)@func()
async example(): Promise<string> {
return dag
.node()
.start()
}lint() 🔗
Lint returns the output of the lint command.
Return Type
String ! Example
dagger -m github.com/quartz-technology/daggerverse/node@3b177a82780bf2dfe0f148e90608007cb1312e3c call \
lintfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Node().
Lint(ctx)
}@function
async def example() -> str:
return await (
dag.node()
.lint()
)@func()
async example(): Promise<string> {
return dag
.node()
.lint()
}test() 🔗
Lint returns the output of the lint command.
Return Type
String ! Example
dagger -m github.com/quartz-technology/daggerverse/node@3b177a82780bf2dfe0f148e90608007cb1312e3c call \
testfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Node().
Test(ctx)
}@function
async def example() -> str:
return await (
dag.node()
.test()
)@func()
async example(): Promise<string> {
return dag
.node()
.test()
}build() 🔗
Build returns the Container with the source built.
Return Type
Node ! Example
dagger -m github.com/quartz-technology/daggerverse/node@3b177a82780bf2dfe0f148e90608007cb1312e3c call \
buildfunc (m *MyModule) Example() *dagger.Node {
return dag.
Node().
Build()
}@function
def example() -> dagger.Node:
return (
dag.node()
.build()
)@func()
example(): Node {
return dag
.node()
.build()
}publish() 🔗
Publish publishes the source code to npm registry.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| tokenSecret | Secret ! | - | secret token to register to npm registry |
| version | String ! | - | version of the package |
| access | String | - | access permission of the package |
| dryRun | Boolean ! | false | whether to do a dry run instead of an actual publish |
Example
dagger -m github.com/quartz-technology/daggerverse/node@3b177a82780bf2dfe0f148e90608007cb1312e3c call \
publish --token-secret env:MYSECRET --version string --dry-run booleanfunc (m *MyModule) Example(ctx context.Context, tokenSecret *dagger.Secret, version string, dryRun bool) string {
return dag.
Node().
Publish(ctx, tokenSecret, version, dryRun)
}@function
async def example(token_secret: dagger.Secret, version: str, dry_run: bool) -> str:
return await (
dag.node()
.publish(token_secret, version, dry_run)
)@func()
async example(tokenSecret: Secret, version: string, dryRun: boolean): Promise<string> {
return dag
.node()
.publish(tokenSecret, version, dryRun)
}install() 🔗
Install adds given package.
Return Type
Node !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| pkgs | [String ! ] ! | - | packages to additionally install |
Example
dagger -m github.com/quartz-technology/daggerverse/node@3b177a82780bf2dfe0f148e90608007cb1312e3c 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)
}