Skip to content

Commit

Permalink
bun fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenfiszel committed Jul 6, 2023
1 parent 54cd5ce commit b45c3d1
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions backend/windmill-api/src/workspaces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1400,6 +1400,7 @@ async fn tarball_workspace(
ScriptLang::Go => "go",
ScriptLang::Bash => "sh",
ScriptLang::Postgresql => "pg.sql",
ScriptLang::Mysql => "my.sql",
ScriptLang::Nativets => "fetch.ts",
ScriptLang::Bun => "bun.ts",
};
Expand Down
2 changes: 2 additions & 0 deletions backend/windmill-common/src/scripts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ pub enum ScriptLang {
Bash,
Postgresql,
Bun,
Mysql,
}

impl ScriptLang {
Expand All @@ -44,6 +45,7 @@ impl ScriptLang {
ScriptLang::Go => "go",
ScriptLang::Bash => "bash",
ScriptLang::Postgresql => "postgresql",
ScriptLang::Mysql => "mysql",
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion backend/windmill-worker/src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1999,7 +1999,6 @@ let child = if !*DISABLE_NSJAIL {
} else {
let script_path = format!("{job_dir}/wrapper.ts");
let mut args = vec!["run", &script_path, "--prefer-offline"];
args.push(&script_path);
Command::new(&*BUN_PATH)
.current_dir(job_dir)
.env_clear()
Expand Down Expand Up @@ -2255,6 +2254,7 @@ async fn capture_dependency_job(
Ok(String::new())
},
ScriptLang::Postgresql => Ok("".to_owned()),
ScriptLang::Mysql => Ok("".to_owned()),
ScriptLang::Bash => Ok("".to_owned()),
ScriptLang::Nativets => Ok("".to_owned()),

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ services:
- KEEP_JOB_DIR=false
- METRICS_ADDR=false
# To handle all tags, remove the env variable altogether. If you do so, you can remove the windmill_worker_native containers.
- WORKER_TAGS=deno,python3,go,bash,dependency,flow,hub,other
- WORKER_TAGS=deno,python3,go,bash,dependency,flow,hub,other,bun
# LICENSE_KEY is only needed for the enterprise edition
# - LICENSE_KEY=${WM_LICENSE_KEY}
depends_on:
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/script_helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export async function main(
`

export const BUN_INIT_CODE = `// import { toWords } from "number-to-words@1"
import { setClient, getVariable } from "[email protected].14"
import { setClient, getVariable } from "[email protected].15"
// fill the type, or use the +Resource type to get a type-safe reference to a resource
// type Postgresql = object
Expand Down

0 comments on commit b45c3d1

Please sign in to comment.