diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2021-05-22 18:08:24 +0200 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2021-05-23 15:16:42 +0200 |
commit | 8cf7f966f24d0fb996b41d92b04ad9647337a8f6 (patch) | |
tree | 306f60a892186dc14e06f65f7dd5c7b7dbfad147 /cli | |
parent | 5f0d91497b03795250c55340c7e7c7de66d4607b (diff) |
feat(extensions): add BroadcastChannel
Co-Authored-By: Ben Noordhuis <info@bnoordhuis.nl>
Fixes: #10354
Diffstat (limited to 'cli')
-rw-r--r-- | cli/build.rs | 9 | ||||
-rw-r--r-- | cli/main.rs | 3 | ||||
-rw-r--r-- | cli/tsc.rs | 2 |
3 files changed, 13 insertions, 1 deletions
diff --git a/cli/build.rs b/cli/build.rs index 116ce8167..ab2a7d0f7 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -8,6 +8,7 @@ use deno_core::serde_json::json; use deno_core::serde_json::Value; use deno_core::JsRuntime; use deno_core::RuntimeOptions; +use deno_runtime::deno_broadcast_channel; use deno_runtime::deno_console; use deno_runtime::deno_crypto; use deno_runtime::deno_fetch; @@ -74,6 +75,10 @@ fn create_compiler_snapshot( op_crate_libs.insert("deno.websocket", deno_websocket::get_declaration()); op_crate_libs.insert("deno.webstorage", deno_webstorage::get_declaration()); op_crate_libs.insert("deno.crypto", deno_crypto::get_declaration()); + op_crate_libs.insert( + "deno.broadcast_channel", + deno_broadcast_channel::get_declaration(), + ); // ensure we invalidate the build properly. for (_, path) in op_crate_libs.iter() { @@ -300,6 +305,10 @@ fn main() { "cargo:rustc-env=DENO_CRYPTO_LIB_PATH={}", deno_crypto::get_declaration().display() ); + println!( + "cargo:rustc-env=DENO_BROADCAST_CHANNEL_LIB_PATH={}", + deno_broadcast_channel::get_declaration().display() + ); println!("cargo:rustc-env=TARGET={}", env::var("TARGET").unwrap()); println!("cargo:rustc-env=PROFILE={}", env::var("PROFILE").unwrap()); diff --git a/cli/main.rs b/cli/main.rs index aa144d1de..868805e92 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -302,7 +302,7 @@ fn print_cache_info( pub fn get_types(unstable: bool) -> String { let mut types = format!( - "{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}", + "{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}", crate::tsc::DENO_NS_LIB, crate::tsc::DENO_CONSOLE_LIB, crate::tsc::DENO_URL_LIB, @@ -313,6 +313,7 @@ pub fn get_types(unstable: bool) -> String { crate::tsc::DENO_WEBSOCKET_LIB, crate::tsc::DENO_WEBSTORAGE_LIB, crate::tsc::DENO_CRYPTO_LIB, + crate::tsc::DENO_BROADCAST_CHANNEL_LIB, crate::tsc::SHARED_GLOBALS_LIB, crate::tsc::WINDOW_LIB, ); diff --git a/cli/tsc.rs b/cli/tsc.rs index 6d2e297db..203bf794b 100644 --- a/cli/tsc.rs +++ b/cli/tsc.rs @@ -41,6 +41,8 @@ pub static DENO_WEBSOCKET_LIB: &str = pub static DENO_WEBSTORAGE_LIB: &str = include_str!(env!("DENO_WEBSTORAGE_LIB_PATH")); pub static DENO_CRYPTO_LIB: &str = include_str!(env!("DENO_CRYPTO_LIB_PATH")); +pub static DENO_BROADCAST_CHANNEL_LIB: &str = + include_str!(env!("DENO_BROADCAST_CHANNEL_LIB_PATH")); pub static SHARED_GLOBALS_LIB: &str = include_str!("dts/lib.deno.shared_globals.d.ts"); pub static WINDOW_LIB: &str = include_str!("dts/lib.deno.window.d.ts"); |