Documentation
¶
Index ¶
- func CopyRuntimeFiles(lang string, outputDir string, silent bool) error
- func CopyRuntimeFilesToPackage(lang string, outputDir string, packageName string, silent bool) error
- func GetRuntimeFiles(lang string) (map[string][]byte, error)
- func GetRuntimeFilesForStyle(lang, style string) (map[string][]byte, error)
- func IsPythonTestFile(filename string) bool
- func ListRuntimes() []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyRuntimeFiles ¶
CopyRuntimeFiles copies all runtime files for the specified language to the output directory The files are copied to outputDir/{runtimePackageName}/ where runtimePackageName is typically "pulserpc" for most languages, "PulseRPC" for C#, "com/bitmechanic/pulserpc" for Java If silent is true, no file paths are printed
func CopyRuntimeFilesToPackage ¶
func CopyRuntimeFilesToPackage(lang string, outputDir string, packageName string, silent bool) error
CopyRuntimeFilesToPackage copies all runtime files for the specified language to the output directory using the specified package name (relative to outputDir). If packageName is empty, files are copied directly into outputDir. If silent is true, no file paths are printed
func GetRuntimeFiles ¶
GetRuntimeFiles returns a map of filename -> file contents for the specified language runtime. It is equivalent to GetRuntimeFilesForStyle(lang, "") and is kept for backwards compatibility with callers that don't care about TypeScript module style.
func GetRuntimeFilesForStyle ¶ added in v0.3.5
GetRuntimeFilesForStyle returns runtime files for a given language and module style. For non-TypeScript languages, style must be empty.
For lang == "ts", style selects between the runtime trees:
- "" (default), "esm-node", "node", "esm" → ts-node (Node ESM) tree
- "esm-bundler", "bundler" → ts-node tree; caller must apply the bundler post-process transform to strip the ".js" import suffix
- "cjs", "commonjs" → ts-cjs (CommonJS) tree
Unknown styles produce an error.
func IsPythonTestFile ¶ added in v0.3.1
IsPythonTestFile returns true if the filename is a Python test file
func ListRuntimes ¶
func ListRuntimes() []string
ListRuntimes returns a list of all available embedded runtime languages. Deprecated aliases (e.g. "ts" in addition to "ts-node") are excluded from the list so callers see only canonical names.
Types ¶
This section is empty.