typescript-sdk
No long description provided.
Installation
dagger install github.com/shepherdjerred/dagger/sdk/typescript/runtime@2f9c992248c55486aa31ad53594ae7f56ba64dd4Entrypoint
Return Type
TypescriptSdk !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| sdkSourceDir | Directory | - | No description provided |
Example
dagger -m github.com/shepherdjerred/dagger/sdk/typescript/runtime@2f9c992248c55486aa31ad53594ae7f56ba64dd4 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/shepherdjerred/dagger/sdk/typescript/runtime@2f9c992248c55486aa31ad53594ae7f56ba64dd4 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()
}moduleRuntime() 🔗
ModuleRuntime implements the ModuleRuntime method from the SDK module interface.
It returns a ready to call container with the correct node, bun or deno runtime setup. On call, this will trigger the entrypoint that will either intropect and register the module in the Dagger engine or execute a function of that module.
The returned container has the codegen freshly generated and any necessary dependency installed.
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)
}moduleTypes() 🔗
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| modSource | ModuleSource ! | - | No description provided |
| introspectionJson | File ! | - | No description provided |
| outputFilePath | String ! | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(modSource *dagger.ModuleSource, introspectionJson *dagger.File, outputFilePath string) *dagger.Container {
return dag.
TypescriptSdk().
ModuleTypes(modSource, introspectionJson, outputFilePath)
}@function
def example(mod_source: dagger.ModuleSource, introspection_json: dagger.File, output_file_path: str) -> dagger.Container:
return (
dag.typescript_sdk()
.module_types(mod_source, introspection_json, output_file_path)
)@func()
example(modSource: ModuleSource, introspectionJson: File, outputFilePath: string): Container {
return dag
.typescriptSdk()
.moduleTypes(modSource, introspectionJson, outputFilePath)
}codegen() 🔗
Codegen implements the Codegen method from the SDK module interface.
It returns the generated API client based on user’s module as well as ignore directive regarding the generated content.
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)
}requiredClientGenerationFiles() 🔗
Returns the list of files that are copied from the host when generating the client.
Return Type
[String ! ] ! Example
dagger -m github.com/shepherdjerred/dagger/sdk/typescript/runtime@2f9c992248c55486aa31ad53594ae7f56ba64dd4 call \
required-client-generation-filesfunc (m *MyModule) Example(ctx context.Context) []string {
return dag.
TypescriptSdk().
RequiredClientGenerationFiles(ctx)
}@function
async def example() -> List[str]:
return await (
dag.typescript_sdk()
.required_client_generation_files()
)@func()
async example(): Promise<string[]> {
return dag
.typescriptSdk()
.requiredClientGenerationFiles()
}generateClient() 🔗
Returns a directory with a standalone generated client and any necessary configuration files that are required to work.
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| modSource | ModuleSource ! | - | No description provided |
| introspectionJson | File ! | - | No description provided |
| outputDir | String ! | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(modSource *dagger.ModuleSource, introspectionJson *dagger.File, outputDir string) *dagger.Directory {
return dag.
TypescriptSdk().
GenerateClient(modSource, introspectionJson, outputDir)
}@function
def example(mod_source: dagger.ModuleSource, introspection_json: dagger.File, output_dir: str) -> dagger.Directory:
return (
dag.typescript_sdk()
.generate_client(mod_source, introspection_json, output_dir)
)@func()
example(modSource: ModuleSource, introspectionJson: File, outputDir: string): Directory {
return dag
.typescriptSdk()
.generateClient(modSource, introspectionJson, outputDir)
}