Skip to content

Commit

Permalink
[plugin] add +bun, +node
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Apr 10, 2024
1 parent f9937b9 commit 7bbf0ac
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion plugin/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugin/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2021"
name = "cloudflare"
version = "0.9.0"
version = "0.9.1"

[lib]
crate-type = ["cdylib"]
Expand Down
12 changes: 7 additions & 5 deletions plugin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ pub fn deploy(args: String) -> FnResult<String> {
let stdout = dag()
.pipeline("deploy")?
.pkgx()?
.with_packages(vec!["node", "bun", "classic.yarnpkg.com"])?
.with_exec(vec!["yarn", "install"])?
.with_exec(vec!["bunx", "wrangler", "deploy", &args])?
.with_exec(vec!["pkgx", "+classic.yarnpkg.com", "yarn", "install"])?
.with_exec(vec![
"pkgx", "+bun", "+node", "bunx", "wrangler", "deploy", &args,
])?
.stdout()?;
Ok(stdout)
}
Expand All @@ -18,8 +19,9 @@ pub fn pages_deploy(args: String) -> FnResult<String> {
let stdout = dag()
.pipeline("pages_deploy")?
.pkgx()?
.with_packages(vec!["node", "bun", "classic.yarnpkg.com"])?
.with_exec(vec!["bunx", "wrangler", "pages", "deploy", &args])?
.with_exec(vec![
"pkgx", "+node", "+bun", "bunx", "wrangler", "pages", "deploy", &args,
])?
.stdout()?;
Ok(stdout)
}

0 comments on commit 7bbf0ac

Please sign in to comment.