typescript-sdk
No long description provided.
Installation
dagger install github.com/wingyplus/dagger/sdk/typescript/runtime@5e7c38f8c564590cdc45d7340f3c16fcdd2e9991Entrypoint
Return Type
TypescriptSdk !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| sdkSourceDir | Directory | - | No description provided |
Example
dagger -m github.com/wingyplus/dagger/sdk/typescript/runtime@5e7c38f8c564590cdc45d7340f3c16fcdd2e9991 call \
func (m *MyModule) Example() *dagger.TypescriptSdk {
return dag.
TypescriptSdk()
}@function
def example() -> dagger.TypescriptSdk:
return (
dag.typescript_sdk()
)@func()
example(): TypescriptSdk {
return dag
.typescriptSdk()
}Types
TypescriptSdk 🔗
sdksourceDir() 🔗
Return Type
Directory ! Example
dagger -m github.com/wingyplus/dagger/sdk/typescript/runtime@5e7c38f8c564590cdc45d7340f3c16fcdd2e9991 call \
sdksource-dirfunc (m *MyModule) Example() *dagger.Directory {
return dag.
TypescriptSdk().
SdksourceDir()
}@function
def example() -> dagger.Directory:
return (
dag.typescript_sdk()
.sdksource_dir()
)@func()
example(): Directory {
return dag
.typescriptSdk()
.sdksourceDir()
}requiredPaths() 🔗
Return Type
[String ! ] ! Example
dagger -m github.com/wingyplus/dagger/sdk/typescript/runtime@5e7c38f8c564590cdc45d7340f3c16fcdd2e9991 call \
required-pathsfunc (m *MyModule) Example(ctx context.Context) []string {
return dag.
TypescriptSdk().
RequiredPaths(ctx)
}@function
async def example() -> List[str]:
return await (
dag.typescript_sdk()
.required_paths()
)@func()
async example(): Promise<string[]> {
return dag
.typescriptSdk()
.requiredPaths()
}moduleRuntime() 🔗
ModuleRuntime returns a container with the node or bun entrypoint ready to be called.
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| modSource | ModuleSource ! | - | No description provided |
| introspectionJson | File ! | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(modSource *dagger.ModuleSource, introspectionJson *dagger.File) *dagger.Container {
return dag.
TypescriptSdk().
ModuleRuntime(modSource, introspectionJson)
}@function
def example(mod_source: dagger.ModuleSource, introspection_json: dagger.File) -> dagger.Container:
return (
dag.typescript_sdk()
.module_runtime(mod_source, introspection_json)
)@func()
example(modSource: ModuleSource, introspectionJson: File): Container {
return dag
.typescriptSdk()
.moduleRuntime(modSource, introspectionJson)
}codegen() 🔗
Codegen returns the generated API client based on user’s module
Return Type
GeneratedCode !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| modSource | ModuleSource ! | - | No description provided |
| introspectionJson | File ! | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(modSource *dagger.ModuleSource, introspectionJson *dagger.File) *dagger.GeneratedCode {
return dag.
TypescriptSdk().
Codegen(modSource, introspectionJson)
}@function
def example(mod_source: dagger.ModuleSource, introspection_json: dagger.File) -> dagger.GeneratedCode:
return (
dag.typescript_sdk()
.codegen(mod_source, introspection_json)
)@func()
example(modSource: ModuleSource, introspectionJson: File): GeneratedCode {
return dag
.typescriptSdk()
.codegen(modSource, introspectionJson)
}codegenBase() 🔗
CodegenBase returns a Container containing the SDK from the engine container and the user’s code with a generated API based on what he did.
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| modSource | ModuleSource ! | - | No description provided |
| introspectionJson | File ! | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(modSource *dagger.ModuleSource, introspectionJson *dagger.File) *dagger.Container {
return dag.
TypescriptSdk().
CodegenBase(modSource, introspectionJson)
}@function
def example(mod_source: dagger.ModuleSource, introspection_json: dagger.File) -> dagger.Container:
return (
dag.typescript_sdk()
.codegen_base(mod_source, introspection_json)
)@func()
example(modSource: ModuleSource, introspectionJson: File): Container {
return dag
.typescriptSdk()
.codegenBase(modSource, introspectionJson)
}base() 🔗
Base returns a Node or Bun container with cache setup for yarn or bun
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| runtime | String ! | - | No description provided |
Example
dagger -m github.com/wingyplus/dagger/sdk/typescript/runtime@5e7c38f8c564590cdc45d7340f3c16fcdd2e9991 call \
base --runtime stringfunc (m *MyModule) Example(runtime string) *dagger.Container {
return dag.
TypescriptSdk().
Base(runtime)
}@function
def example(runtime: str) -> dagger.Container:
return (
dag.typescript_sdk()
.base(runtime)
)@func()
example(runtime: string): Container {
return dag
.typescriptSdk()
.base(runtime)
}