Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ napi_sym = { version = "0.141.0", path = "./ext/napi/sym" }
node_resolver = { version = "0.49.0", path = "./libs/node_resolver" }
test_util = { package = "test_server", path = "./tests/util/server" }

deno_tunnel = "0.4.0"
deno_tunnel = "0.5.0"

# widely used libraries
anyhow = "1.0.57"
Expand Down
18 changes: 18 additions & 0 deletions cli/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ pub mod sys {
pub type CliSys = sys_traits::impls::RealSys;
}

use std::collections::HashMap;
use std::env;
use std::future::Future;
use std::io::IsTerminal;
Expand Down Expand Up @@ -911,6 +912,21 @@ async fn initialize_tunnel(
deno_runtime::deno_tls::SocketUse::GeneralSsl,
)?;

let mut metadata = HashMap::new();
metadata.insert(
"hostname".into(),
deno_runtime::deno_os::sys_info::hostname(),
);
if let Some(entrypoint) = match &flags.subcommand {
DenoSubcommand::Run(run_flags) => Some(run_flags.script.to_owned()),
DenoSubcommand::Serve(serve_flags) => Some(serve_flags.script.to_owned()),
DenoSubcommand::Repl(_) => Some("<repl>".into()),
DenoSubcommand::Eval(_) => Some("<eval>".into()),
_ => None,
} {
metadata.insert("entrypoint".into(), entrypoint);
}

let (tunnel, mut events) =
match deno_runtime::deno_net::tunnel::TunnelConnection::connect(
addr,
Expand All @@ -921,6 +937,7 @@ async fn initialize_tunnel(
org: org.clone(),
app: app.clone(),
},
metadata.clone(),
)
.await
{
Expand All @@ -938,6 +955,7 @@ async fn initialize_tunnel(
org,
app,
},
metadata.clone(),
)
.await?
}
Expand Down
Loading