typescript-sdk
No long description provided.
Installation
dagger install github.com/wingyplus/dagger/sdk/typescript/runtime@65c18cb299a1d2f725343e64bb7de318b6e4d9aa
Entrypoint
Return Type
TypescriptSdk !
Arguments
Name | Type | Description |
---|---|---|
sdkSourceDir | Directory | No description provided |
Example
dagger -m github.com/wingyplus/dagger/sdk/typescript/runtime@65c18cb299a1d2f725343e64bb7de318b6e4d9aa call \
func (m *myModule) example() *TypescriptSdk {
return dag.
TypescriptSdk()
}
@function
def example() -> dag.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@65c18cb299a1d2f725343e64bb7de318b6e4d9aa call \
sdksource-dir
func (m *myModule) example() *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@65c18cb299a1d2f725343e64bb7de318b6e4d9aa call \
required-paths
func (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 *ModuleSource, introspectionJson *File) *Container {
return dag.
TypescriptSdk().
ModuleRuntime(modSource, introspectionJson)
}
@function
def example(mod_source: dag.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 *ModuleSource, introspectionJson *File) *GeneratedCode {
return dag.
TypescriptSdk().
Codegen(modSource, introspectionJson)
}
@function
def example(mod_source: dag.ModuleSource, introspection_json: dagger.File) -> dag.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 *ModuleSource, introspectionJson *File) *Container {
return dag.
TypescriptSdk().
CodegenBase(modSource, introspectionJson)
}
@function
def example(mod_source: dag.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@65c18cb299a1d2f725343e64bb7de318b6e4d9aa call \
base --runtime string
func (m *myModule) example(runtime string) *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)
}