mirror of
https://github.com/denoland/deno
synced 2024-08-27 12:00:17 +00:00
![Matt Mastracci](/assets/img/avatar_default.png)
This PR implements a graceful shutdown API for Deno.serve, allowing all current connections to drain from the server before shutting down, while preventing new connections from being started or new transactions on existing connections from being created. We split the cancellation handle into two parts: a listener handle, and a connection handle. A graceful shutdown cancels the listener only, while allowing the connections to drain. The connection handle aborts all futures. If the listener handle is cancelled, we put the connections into graceful shutdown mode, which disables keep-alive on http/1.1 and uses http/2 mechanisms for http/2 connections. In addition, we now guarantee that all connections are complete or cancelled, and all resources are cleaned up when the server `finished` promise resolves -- we use a Rust-side server refcount for this. Performance impact: does not appear to affect basic serving performance by more than 1% (~126k -> ~125k) --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
149 lines
4.4 KiB
TOML
149 lines
4.4 KiB
TOML
# Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
|
|
[package]
|
|
name = "deno"
|
|
version = "1.36.4"
|
|
authors.workspace = true
|
|
default-run = "deno"
|
|
edition.workspace = true
|
|
exclude = ["tests/testdata/npm/registry/*"]
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
description = "Provides the deno executable"
|
|
|
|
[[bin]]
|
|
name = "deno"
|
|
path = "main.rs"
|
|
doc = false
|
|
|
|
[[bench]]
|
|
name = "deno_bench"
|
|
harness = false
|
|
path = "./bench/main.rs"
|
|
|
|
[[bench]]
|
|
name = "lsp_bench_standalone"
|
|
harness = false
|
|
path = "./bench/lsp_bench_standalone.rs"
|
|
|
|
[features]
|
|
# A dev feature to disable creations and loading of snapshots in favor of
|
|
# loading JS sources at runtime.
|
|
__runtime_js_sources = ["deno_runtime/__runtime_js_sources"]
|
|
|
|
[build-dependencies]
|
|
deno_runtime = { workspace = true, features = ["exclude_runtime_main_js", "include_js_files_for_snapshotting"] }
|
|
deno_core = { workspace = true, features = ["include_js_files_for_snapshotting"] }
|
|
lazy-regex.workspace = true
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
zstd.workspace = true
|
|
glibc_version = "0.1.2"
|
|
|
|
[target.'cfg(windows)'.build-dependencies]
|
|
winapi.workspace = true
|
|
winres.workspace = true
|
|
|
|
[dependencies]
|
|
deno_ast = { workspace = true, features = ["bundler", "cjs", "codegen", "dep_graph", "module_specifier", "proposal", "react", "sourcemap", "transforms", "typescript", "view", "visit"] }
|
|
deno_cache_dir = "=0.6.0"
|
|
deno_config = "=0.3.1"
|
|
deno_core = { workspace = true, features = ["include_js_files_for_snapshotting"] }
|
|
deno_doc = "=0.66.0"
|
|
deno_emit = "=0.27.0"
|
|
deno_graph = "=0.54.0"
|
|
deno_lint = { version = "=0.51.0", features = ["docs"] }
|
|
deno_lockfile.workspace = true
|
|
deno_npm.workspace = true
|
|
deno_runtime = { workspace = true, features = ["dont_create_runtime_snapshot", "exclude_runtime_main_js", "include_js_files_for_snapshotting"] }
|
|
deno_semver.workspace = true
|
|
deno_task_shell = "=0.13.2"
|
|
eszip = "=0.52.0"
|
|
napi_sym.workspace = true
|
|
|
|
async-trait.workspace = true
|
|
base32 = "=0.4.0"
|
|
base64.workspace = true
|
|
bincode = "=1.3.3"
|
|
cache_control.workspace = true
|
|
chrono.workspace = true
|
|
clap = { version = "=4.3.3", features = ["string"] }
|
|
clap_complete = "=4.3.1"
|
|
clap_complete_fig = "=4.3.1"
|
|
console_static_text.workspace = true
|
|
data-url.workspace = true
|
|
dissimilar = "=1.0.4"
|
|
dprint-plugin-json = "=0.17.4"
|
|
dprint-plugin-markdown = "=0.16.1"
|
|
dprint-plugin-typescript = "=0.87.1"
|
|
encoding_rs.workspace = true
|
|
env_logger = "=0.10.0"
|
|
fancy-regex = "=0.10.0"
|
|
fastwebsockets.workspace = true
|
|
flate2.workspace = true
|
|
fs3.workspace = true
|
|
glob = "0.3.1"
|
|
http.workspace = true
|
|
hyper.workspace = true
|
|
import_map = "=0.15.0"
|
|
indexmap.workspace = true
|
|
indexmap1.workspace = true
|
|
jsonc-parser = { version = "=0.21.1", features = ["serde"] }
|
|
lazy-regex.workspace = true
|
|
libc.workspace = true
|
|
log = { workspace = true, features = ["serde"] }
|
|
lsp-types.workspace = true
|
|
monch = "=0.4.3"
|
|
notify.workspace = true
|
|
once_cell.workspace = true
|
|
os_pipe.workspace = true
|
|
percent-encoding.workspace = true
|
|
pin-project.workspace = true
|
|
quick-junit = "^0.3.3"
|
|
rand = { workspace = true, features = ["small_rng"] }
|
|
regex.workspace = true
|
|
ring.workspace = true
|
|
rustyline = { version = "=10.0.0", default-features = false, features = ["custom-bindings"] }
|
|
rustyline-derive = "=0.7.0"
|
|
serde.workspace = true
|
|
serde_repr.workspace = true
|
|
shell-escape = "=0.1.5"
|
|
tar.workspace = true
|
|
tempfile.workspace = true
|
|
text-size = "=1.1.0"
|
|
text_lines = "=0.6.0"
|
|
thiserror.workspace = true
|
|
tokio.workspace = true
|
|
tokio-util.workspace = true
|
|
tower-lsp.workspace = true
|
|
twox-hash = "=1.6.3"
|
|
typed-arena = "=2.0.1"
|
|
uuid = { workspace = true, features = ["serde"] }
|
|
walkdir = "=2.3.2"
|
|
zstd.workspace = true
|
|
|
|
[target.'cfg(windows)'.dependencies]
|
|
fwdansi.workspace = true
|
|
junction = "=0.2.0"
|
|
winapi = { workspace = true, features = ["knownfolders", "mswsock", "objbase", "shlobj", "tlhelp32", "winbase", "winerror", "winsock2"] }
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
nix.workspace = true
|
|
|
|
[dev-dependencies]
|
|
deno_bench_util.workspace = true
|
|
flaky_test = "=0.1.0"
|
|
once_cell.workspace = true
|
|
os_pipe.workspace = true
|
|
pretty_assertions.workspace = true
|
|
test_util.workspace = true
|
|
trust-dns-client = "=0.22.0"
|
|
trust-dns-server = "=0.22.1"
|
|
|
|
[package.metadata.winres]
|
|
# This section defines the metadata that appears in the deno.exe PE header.
|
|
OriginalFilename = "deno.exe"
|
|
LegalCopyright = "© Deno contributors & Deno Land Inc. MIT licensed."
|
|
ProductName = "Deno"
|
|
FileDescription = "Deno: A secure runtime for JavaScript and TypeScript"
|