mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-30 16:17:25 +00:00
* implement single line pin * make panic-safe * use pin even if multiple modules imported withing single statement * add repins and make imports respect pins * keep all pins * Allow multiple pins * add comments + handle stuff more safely * fix fully qualified imports * remove ignore * sort nested * apply unique to output requirements list * fix typo * remove mut * update sqlx * sort imports * sort imports * fix formatter and format * feat: add ruby support * fix * update sqlx * add ruby to flake.nix Signed-off-by: pyranota <pyra@duck.com> * upgrade par_install_language_dependencies helper rename fields + allow passing custom payload Signed-off-by: pyranota <pyra@duck.com> * change migrations Signed-off-by: pyranota <pyra@duck.com> * make full pipeline work! Signed-off-by: pyranota <pyra@duck.com> * do a bit fixing * stage Signed-off-by: pyranota <pyra@duck.com> * add ruby in dockerfiles Signed-off-by: pyranota <pyra@duck.com> * implement auto-require + 'windmill/inline' Signed-off-by: pyranota <pyra@duck.com> * create 'windmill/inline' only if does not exist Signed-off-by: pyranota <pyra@duck.com> * add nsjail Signed-off-by: pyranota <pyra@duck.com> * update global settings Signed-off-by: pyranota <pyra@duck.com> * add ruby icon * generate lockfile on deploy (but broken) Signed-off-by: pyranota <pyra@duck.com> * fix(frontend): display deployed script lockfile and other info Signed-off-by: pyranota <pyra@duck.com> * feat: add mini-wmill client Methods: - get_resource - get_variable Additionally add shortcuts on frontend Signed-off-by: pyranota <pyra@duck.com> * add nit warning Signed-off-by: pyranota <pyra@duck.com> * support private repos credentials Signed-off-by: pyranota <pyra@duck.com> * fix compilation error Signed-off-by: pyranota <pyra@duck.com> * found rustc bug + refactor universal installer Signed-off-by: pyranota <pyra@duck.com> * more refactor + fixes Signed-off-by: pyranota <pyra@duck.com> * bug fixing + polishing Signed-off-by: pyranota <pyra@duck.com> * cleanup Signed-off-by: pyranota <pyra@duck.com> * change 'windmill/inline' Signed-off-by: pyranota <pyra@duck.com> * delegate env_clear to universal installer Signed-off-by: pyranota <pyra@duck.com> * update init script Signed-off-by: pyranota <pyra@duck.com> * add cli support Signed-off-by: pyranota <pyra@duck.com> * unhardcode frontend Signed-off-by: pyranota <pyra@duck.com> * fix cli Signed-off-by: pyranota <pyra@duck.com> * fix init script Signed-off-by: pyranota <pyra@duck.com> * make it work on ms windows Signed-off-by: pyranota <pyra@duck.com> * do not clean env in the end Signed-off-by: pyranota <pyra@duck.com> * fix windows (again) Signed-off-by: pyranota <pyra@duck.com> * include PROXY_ENVS (untested) Signed-off-by: pyranota <pyra@duck.com> * feat: self-signed certs + proxy support (tested) Signed-off-by: pyranota <pyra@duck.com> * flake: pin ruby to 3.4 * merge follow-ups Signed-off-by: pyranota <pyra@duck.com> * remove obsolete libc crate Signed-off-by: pyranota <pyra@duck.com> * cleanup parser Signed-off-by: pyranota <pyra@duck.com> * fix java ci Signed-off-by: pyranota <pyra@duck.com> * cleanup Signed-off-by: pyranota <pyra@duck.com> * fix nits Signed-off-by: pyranota <pyra@duck.com> * Update backend/windmill-worker/src/universal_pkg_installer.rs Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * Update backend/windmill-worker/src/ruby_executor.rs Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * add nsjail for lock stage Signed-off-by: pyranota <pyra@duck.com> * fix merge Signed-off-by: pyranota <pyra@duck.com> * Update common.rs * regen windmill-api-client Signed-off-by: pyranota <pyra@duck.com> * fix tests Signed-off-by: pyranota <pyra@duck.com> * fix tests again Signed-off-by: pyranota <pyra@duck.com> * reference published ruby parser Signed-off-by: pyranota <pyra@duck.com> --------- Signed-off-by: pyranota <pyra@duck.com> Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
115 lines
2.6 KiB
TypeScript
115 lines
2.6 KiB
TypeScript
export function langToExt(lang: string): string {
|
|
switch (lang) {
|
|
case 'tsx':
|
|
return 'tsx'
|
|
case 'javascript':
|
|
return 'js'
|
|
case 'jsx':
|
|
return 'js'
|
|
case 'bunnative':
|
|
return 'ts'
|
|
case 'json':
|
|
return 'json'
|
|
case 'sql':
|
|
return 'sql'
|
|
case 'yaml':
|
|
return 'yaml'
|
|
case 'typescript':
|
|
return 'ts'
|
|
case 'python':
|
|
return 'py'
|
|
case 'go':
|
|
return 'go'
|
|
case 'bash':
|
|
return 'sh'
|
|
case 'powershell':
|
|
return 'ps1'
|
|
case 'php':
|
|
return 'php'
|
|
case 'rust':
|
|
return 'rs'
|
|
case 'deno':
|
|
return 'ts'
|
|
case 'nativets':
|
|
return 'ts'
|
|
case 'graphql':
|
|
return 'gql'
|
|
case 'css':
|
|
return 'css'
|
|
case 'ansible':
|
|
return 'yml'
|
|
case 'csharp':
|
|
return 'cs'
|
|
case 'nu':
|
|
return 'nu'
|
|
case 'java':
|
|
return 'java'
|
|
case 'svelte':
|
|
return 'svelte'
|
|
case 'vue':
|
|
return 'vue'
|
|
default:
|
|
return 'unknown'
|
|
}
|
|
}
|
|
|
|
export function extToLang(ext: string) {
|
|
switch (ext) {
|
|
case 'tsx':
|
|
return 'typescript'
|
|
case 'ts':
|
|
return 'typescript'
|
|
case 'js':
|
|
return 'javascript'
|
|
case 'jsx':
|
|
return 'javascript'
|
|
case 'json':
|
|
return 'json'
|
|
case 'sql':
|
|
return 'sql'
|
|
case 'yaml':
|
|
return 'yaml'
|
|
case 'py':
|
|
return 'python'
|
|
case 'go':
|
|
return 'go'
|
|
case 'sh':
|
|
return 'bash'
|
|
case 'ps1':
|
|
return 'powershell'
|
|
case 'php':
|
|
return 'php'
|
|
case 'rs':
|
|
return 'rust'
|
|
case 'gql':
|
|
return 'graphql'
|
|
case 'css':
|
|
return 'css'
|
|
case 'yml':
|
|
return 'ansible'
|
|
case 'cs':
|
|
return 'csharp'
|
|
case 'svelte':
|
|
return 'svelte'
|
|
case 'vue':
|
|
return 'vue'
|
|
case 'nu':
|
|
return 'nu'
|
|
case 'java':
|
|
return 'java'
|
|
case 'rb':
|
|
return 'ruby'
|
|
// for related places search: ADD_NEW_LANG
|
|
default:
|
|
return 'unknown'
|
|
}
|
|
}
|
|
|
|
export function createHash() {
|
|
return (Math.random() + 1).toString(36).substring(2)
|
|
}
|
|
|
|
export function createLongHash() {
|
|
return 'h' + Math.random().toString(36).substring(2) + Math.random().toString(36).substring(2)
|
|
}
|