Skip to content

Commit 490c6c9

Browse files
committed
worker-build@0.1.13
1 parent f46625b commit 490c6c9

3 files changed

Lines changed: 5 additions & 9 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

worker-build/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
authors = ["Cloudflare Workers Team <workers@cloudflare.com>"]
33
edition = "2018"
44
name = "worker-build"
5-
version = "0.1.12"
5+
version = "0.1.13"
66
license = "Apache-2.0"
77
repository = "https://github.com/cloudflare/workers-rs/tree/main/worker-build"
88
readme = "README.md"

worker-build/src/main.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,10 @@ fn generate_handlers() -> Result<String> {
154154
handlers += &format!(
155155
"Entrypoint.prototype.fetch = async function fetch(request) {{
156156
let response = exports.fetch(request, this.env, this.ctx);
157-
{}
157+
this.ctx.waitUntil(response);
158+
return response;
158159
}}
159-
",
160-
if env::var("RUN_TO_COMPLETION").is_ok() {
161-
"this.ctx.waitUntil(response);\n return response;"
162-
} else {
163-
"return response;"
164-
}
160+
"
165161
);
166162
} else if func_name == "fetch" || func_name == "queue" || func_name == "scheduled" {
167163
// TODO: Switch these over to https://github.com/wasm-bindgen/wasm-bindgen/pull/4757

0 commit comments

Comments
 (0)