runtime

package
v0.0.0-...-2b706d3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultRuntimeName = "deno"

DefaultRuntimeName is the runtime used when none are specified or detected

Variables

This section is empty.

Functions

This section is empty.

Types

type Runtime

type Runtime interface {
	IgnoreDirectories() []string
	InstallProjectDependencies(context.Context, string, hooks.HookExecutor, iostreams.IOStreamer, afero.Fs, types.Os) (string, error)
	Name() string
	Version() string
	SetVersion(string)
	HooksJSONTemplate() []byte
	PreparePackage(context.Context, hooks.SDKCLIConfig, hooks.HookExecutor, types.PreparePackageOpts) error
}

Runtime interface generalizes the required functionality for any runtime language. Example runtimes: Node.js, Deno, Python, Java, etc.

func New

func New(runtimeName string) (Runtime, error)

New creates a new runtime using runtimeName to choose the runtime

runtimeName uses the hosted version pattern, e.g. deno1.1, deno1.x

func NewDetectProject

func NewDetectProject(ctx context.Context, fs afero.Fs, dirPath string, sdkConfig hooks.SDKCLIConfig) (Runtime, error)

NewDetectProject returns a new Runtime based on the project type of dirPath

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL