UNPKG

windmill-utils-internal

Version:

Internal utility functions for Windmill

29 lines (28 loc) 1.25 kB
import { RawScript } from "../gen/types.gen"; /** * Union type of all supported programming languages in Windmill */ export type SupportedLanguage = RawScript["language"] | "frontend" | "bunnative" | "oracledb" | "rust" | "csharp" | "nu" | "ansible" | "java" | "duckdb"; /** * Mapping of supported languages to their file extensions */ export declare const LANGUAGE_EXTENSIONS: Record<SupportedLanguage, string>; /** * Gets the appropriate file extension for a given programming language. * Handles special cases for TypeScript variants based on the default runtime. * * @param language - The programming language to get extension for * @param defaultTs - Default TypeScript runtime ("bun" or "deno") * @returns File extension string (without the dot) */ export declare function getLanguageExtension(language: SupportedLanguage, defaultTs?: "bun" | "deno"): string; export interface PathAssigner { assignPath(summary: string | undefined, language: SupportedLanguage): [string, string]; } /** * Creates a new path assigner for inline scripts. * * @param defaultTs - Default TypeScript runtime ("bun" or "deno") * @returns Path assigner function */ export declare function newPathAssigner(defaultTs: "bun" | "deno"): PathAssigner;