summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/broadcast_channel/lib.rs3
-rw-r--r--ext/cache/lib.rs3
-rw-r--r--ext/console/lib.rs2
-rw-r--r--ext/crypto/lib.rs3
-rw-r--r--ext/fetch/lib.rs3
-rw-r--r--ext/ffi/lib.rs2
-rw-r--r--ext/flash/lib.rs9
-rw-r--r--ext/http/lib.rs3
-rw-r--r--ext/napi/lib.rs2
-rw-r--r--ext/net/lib.rs3
-rw-r--r--ext/net/ops.rs2
-rw-r--r--ext/node/lib.rs2
-rw-r--r--ext/tls/lib.rs2
-rw-r--r--ext/url/benches/url_ops.rs2
-rw-r--r--ext/url/lib.rs3
-rw-r--r--ext/web/Cargo.toml1
-rw-r--r--ext/web/benches/encoding.rs3
-rw-r--r--ext/web/benches/timers_ops.rs3
-rw-r--r--ext/web/lib.rs3
-rw-r--r--ext/webgpu/src/lib.rs3
-rw-r--r--ext/webidl/lib.rs2
-rw-r--r--ext/websocket/lib.rs3
-rw-r--r--ext/webstorage/lib.rs3
23 files changed, 43 insertions, 22 deletions
diff --git a/ext/broadcast_channel/lib.rs b/ext/broadcast_channel/lib.rs
index 00f8ec9ce..0bf359e6b 100644
--- a/ext/broadcast_channel/lib.rs
+++ b/ext/broadcast_channel/lib.rs
@@ -109,7 +109,8 @@ pub fn init<BC: BroadcastChannel + 'static>(
bc: BC,
unstable: bool,
) -> Extension {
- Extension::builder()
+ Extension::builder(env!("CARGO_PKG_NAME"))
+ .dependencies(vec!["deno_webidl", "deno_web"])
.js(include_js_files!(
prefix "deno:ext/broadcast_channel",
"01_broadcast_channel.js",
diff --git a/ext/cache/lib.rs b/ext/cache/lib.rs
index 50a07b255..c48b7cda4 100644
--- a/ext/cache/lib.rs
+++ b/ext/cache/lib.rs
@@ -26,7 +26,8 @@ pub struct CreateCache<C: Cache + 'static>(pub Arc<dyn Fn() -> C>);
pub fn init<CA: Cache + 'static>(
maybe_create_cache: Option<CreateCache<CA>>,
) -> Extension {
- Extension::builder()
+ Extension::builder(env!("CARGO_PKG_NAME"))
+ .dependencies(vec!["deno_webidl", "deno_web", "deno_url", "deno_fetch"])
.js(include_js_files!(
prefix "deno:ext/cache",
"01_cache.js",
diff --git a/ext/console/lib.rs b/ext/console/lib.rs
index 3d98fc57f..d8fdb38f3 100644
--- a/ext/console/lib.rs
+++ b/ext/console/lib.rs
@@ -5,7 +5,7 @@ use deno_core::Extension;
use std::path::PathBuf;
pub fn init() -> Extension {
- Extension::builder()
+ Extension::builder(env!("CARGO_PKG_NAME"))
.js(include_js_files!(
prefix "deno:ext/console",
"01_colors.js",
diff --git a/ext/crypto/lib.rs b/ext/crypto/lib.rs
index d5a83b5ec..cbcb816d9 100644
--- a/ext/crypto/lib.rs
+++ b/ext/crypto/lib.rs
@@ -73,7 +73,8 @@ use crate::key::HkdfOutput;
use crate::shared::RawKeyData;
pub fn init(maybe_seed: Option<u64>) -> Extension {
- Extension::builder()
+ Extension::builder(env!("CARGO_PKG_NAME"))
+ .dependencies(vec!["deno_webidl", "deno_web"])
.js(include_js_files!(
prefix "deno:ext/crypto",
"00_crypto.js",
diff --git a/ext/fetch/lib.rs b/ext/fetch/lib.rs
index 07af9fa15..b4c12fcbc 100644
--- a/ext/fetch/lib.rs
+++ b/ext/fetch/lib.rs
@@ -94,7 +94,8 @@ pub fn init<FP>(options: Options) -> Extension
where
FP: FetchPermissions + 'static,
{
- Extension::builder()
+ Extension::builder(env!("CARGO_PKG_NAME"))
+ .dependencies(vec!["deno_webidl", "deno_web", "deno_url", "deno_console"])
.js(include_js_files!(
prefix "deno:ext/fetch",
"01_fetch_util.js",
diff --git a/ext/ffi/lib.rs b/ext/ffi/lib.rs
index 0ae01dcd6..64d731491 100644
--- a/ext/ffi/lib.rs
+++ b/ext/ffi/lib.rs
@@ -84,7 +84,7 @@ pub(crate) struct FfiState {
}
pub fn init<P: FfiPermissions + 'static>(unstable: bool) -> Extension {
- Extension::builder()
+ Extension::builder(env!("CARGO_PKG_NAME"))
.js(include_js_files!(
prefix "deno:ext/ffi",
"00_ffi.js",
diff --git a/ext/flash/lib.rs b/ext/flash/lib.rs
index 6eaf39944..2e2417892 100644
--- a/ext/flash/lib.rs
+++ b/ext/flash/lib.rs
@@ -1505,7 +1505,14 @@ pub trait FlashPermissions {
}
pub fn init<P: FlashPermissions + 'static>(unstable: bool) -> Extension {
- Extension::builder()
+ Extension::builder(env!("CARGO_PKG_NAME"))
+ .dependencies(vec![
+ "deno_web",
+ "deno_net",
+ "deno_fetch",
+ "deno_websocket",
+ "deno_http",
+ ])
.js(deno_core::include_js_files!(
prefix "deno:ext/flash",
"01_http.js",
diff --git a/ext/http/lib.rs b/ext/http/lib.rs
index 8719f9de6..f1371ffec 100644
--- a/ext/http/lib.rs
+++ b/ext/http/lib.rs
@@ -78,7 +78,8 @@ pub mod compressible;
mod reader_stream;
pub fn init() -> Extension {
- Extension::builder()
+ Extension::builder(env!("CARGO_PKG_NAME"))
+ .dependencies(vec!["deno_web", "deno_net", "deno_fetch", "deno_websocket"])
.js(include_js_files!(
prefix "deno:ext/http",
"01_http.js",
diff --git a/ext/napi/lib.rs b/ext/napi/lib.rs
index b281fb9f2..e76a08ed9 100644
--- a/ext/napi/lib.rs
+++ b/ext/napi/lib.rs
@@ -410,7 +410,7 @@ impl Env {
}
pub fn init<P: NapiPermissions + 'static>(unstable: bool) -> Extension {
- Extension::builder()
+ Extension::builder(env!("CARGO_PKG_NAME"))
.ops(vec![op_napi_open::decl::<P>()])
.event_loop_middleware(|op_state_rc, cx| {
// `work` can call back into the runtime. It can also schedule an async task
diff --git a/ext/net/lib.rs b/ext/net/lib.rs
index 63016ae6c..64e28fd00 100644
--- a/ext/net/lib.rs
+++ b/ext/net/lib.rs
@@ -85,7 +85,8 @@ pub fn init<P: NetPermissions + 'static>(
) -> Extension {
let mut ops = ops::init::<P>();
ops.extend(ops_tls::init::<P>());
- Extension::builder()
+ Extension::builder(env!("CARGO_PKG_NAME"))
+ .dependencies(vec!["deno_web"])
.js(include_js_files!(
prefix "deno:ext/net",
"01_net.js",
diff --git a/ext/net/ops.rs b/ext/net/ops.rs
index 583ce6b45..5f832a4b9 100644
--- a/ext/net/ops.rs
+++ b/ext/net/ops.rs
@@ -865,7 +865,7 @@ mod tests {
let listener = TcpListener::bind(addr).await.unwrap();
let _ = listener.accept().await;
});
- let my_ext = Extension::builder()
+ let my_ext = Extension::builder("test_ext")
.state(move |state| {
state.put(TestPermission {});
state.put(UnstableChecker { unstable: true });
diff --git a/ext/node/lib.rs b/ext/node/lib.rs
index d6fdd7679..a670586d1 100644
--- a/ext/node/lib.rs
+++ b/ext/node/lib.rs
@@ -80,7 +80,7 @@ pub static NODE_ENV_VAR_ALLOWLIST: Lazy<HashSet<String>> = Lazy::new(|| {
pub fn init<P: NodePermissions + 'static>(
maybe_npm_resolver: Option<Rc<dyn RequireNpmResolver>>,
) -> Extension {
- Extension::builder()
+ Extension::builder(env!("CARGO_PKG_NAME"))
.js(include_js_files!(
prefix "deno:ext/node",
"01_node.js",
diff --git a/ext/tls/lib.rs b/ext/tls/lib.rs
index 2b4a0600d..b762ac90a 100644
--- a/ext/tls/lib.rs
+++ b/ext/tls/lib.rs
@@ -37,7 +37,7 @@ use std::time::SystemTime;
/// This extension has no runtime apis, it only exports some shared native functions.
pub fn init() -> Extension {
- Extension::builder().build()
+ Extension::builder(env!("CARGO_PKG_NAME")).build()
}
struct DefaultSignatureVerification;
diff --git a/ext/url/benches/url_ops.rs b/ext/url/benches/url_ops.rs
index 315ea7260..63810733d 100644
--- a/ext/url/benches/url_ops.rs
+++ b/ext/url/benches/url_ops.rs
@@ -8,7 +8,7 @@ fn setup() -> Vec<Extension> {
vec![
deno_webidl::init(),
deno_url::init(),
- Extension::builder()
+ Extension::builder("bench_setup")
.js(vec![(
"setup",
"const { URL } = globalThis.__bootstrap.url;",
diff --git a/ext/url/lib.rs b/ext/url/lib.rs
index ba1167d54..6990017f5 100644
--- a/ext/url/lib.rs
+++ b/ext/url/lib.rs
@@ -18,7 +18,8 @@ use crate::urlpattern::op_urlpattern_parse;
use crate::urlpattern::op_urlpattern_process_match_input;
pub fn init() -> Extension {
- Extension::builder()
+ Extension::builder(env!("CARGO_PKG_NAME"))
+ .dependencies(vec!["deno_webidl"])
.js(include_js_files!(
prefix "deno:ext/url",
"00_url.js",
diff --git a/ext/web/Cargo.toml b/ext/web/Cargo.toml
index bf30684ba..69a17963c 100644
--- a/ext/web/Cargo.toml
+++ b/ext/web/Cargo.toml
@@ -25,6 +25,7 @@ uuid = { workspace = true, features = ["serde"] }
[dev-dependencies]
deno_bench_util.workspace = true
+deno_console.workspace = true
deno_url.workspace = true
deno_webidl.workspace = true
diff --git a/ext/web/benches/encoding.rs b/ext/web/benches/encoding.rs
index 61c853328..8c9eaeb6c 100644
--- a/ext/web/benches/encoding.rs
+++ b/ext/web/benches/encoding.rs
@@ -24,8 +24,9 @@ fn setup() -> Vec<Extension> {
vec![
deno_webidl::init(),
deno_url::init(),
+ deno_console::init(),
deno_web::init::<Permissions>(BlobStore::default(), None),
- Extension::builder()
+ Extension::builder("bench_setup")
.js(vec![(
"setup",
r#"
diff --git a/ext/web/benches/timers_ops.rs b/ext/web/benches/timers_ops.rs
index 10b434015..2ba93c5e1 100644
--- a/ext/web/benches/timers_ops.rs
+++ b/ext/web/benches/timers_ops.rs
@@ -23,8 +23,9 @@ fn setup() -> Vec<Extension> {
vec![
deno_webidl::init(),
deno_url::init(),
+ deno_console::init(),
deno_web::init::<Permissions>(BlobStore::default(), None),
- Extension::builder()
+ Extension::builder("bench_setup")
.js(vec![
("setup", r#"
const { setTimeout, handleTimerMacrotask } = globalThis.__bootstrap.timers;
diff --git a/ext/web/lib.rs b/ext/web/lib.rs
index a270882a9..de8984232 100644
--- a/ext/web/lib.rs
+++ b/ext/web/lib.rs
@@ -62,7 +62,8 @@ pub fn init<P: TimersPermission + 'static>(
blob_store: BlobStore,
maybe_location: Option<Url>,
) -> Extension {
- Extension::builder()
+ Extension::builder(env!("CARGO_PKG_NAME"))
+ .dependencies(vec!["deno_webidl", "deno_console", "deno_url"])
.js(include_js_files!(
prefix "deno:ext/web",
"00_infra.js",
diff --git a/ext/webgpu/src/lib.rs b/ext/webgpu/src/lib.rs
index 8e67da6b8..9ee220dd0 100644
--- a/ext/webgpu/src/lib.rs
+++ b/ext/webgpu/src/lib.rs
@@ -104,7 +104,8 @@ impl Resource for WebGpuQuerySet {
}
pub fn init(unstable: bool) -> Extension {
- Extension::builder()
+ Extension::builder(env!("CARGO_PKG_NAME"))
+ .dependencies(vec!["deno_webidl", "deno_web"])
.js(include_js_files!(
prefix "deno:ext/webgpu",
"01_webgpu.js",
diff --git a/ext/webidl/lib.rs b/ext/webidl/lib.rs
index 583717d97..7962165c6 100644
--- a/ext/webidl/lib.rs
+++ b/ext/webidl/lib.rs
@@ -5,7 +5,7 @@ use deno_core::Extension;
/// Load and execute the javascript code.
pub fn init() -> Extension {
- Extension::builder()
+ Extension::builder(env!("CARGO_PKG_NAME"))
.js(include_js_files!(
prefix "deno:ext/webidl",
"00_webidl.js",
diff --git a/ext/websocket/lib.rs b/ext/websocket/lib.rs
index a58701e7a..bc4b3876d 100644
--- a/ext/websocket/lib.rs
+++ b/ext/websocket/lib.rs
@@ -602,7 +602,8 @@ pub fn init<P: WebSocketPermissions + 'static>(
root_cert_store: Option<RootCertStore>,
unsafely_ignore_certificate_errors: Option<Vec<String>>,
) -> Extension {
- Extension::builder()
+ Extension::builder(env!("CARGO_PKG_NAME"))
+ .dependencies(vec!["deno_url", "deno_webidl"])
.js(include_js_files!(
prefix "deno:ext/websocket",
"01_websocket.js",
diff --git a/ext/webstorage/lib.rs b/ext/webstorage/lib.rs
index 5425edc04..53175f196 100644
--- a/ext/webstorage/lib.rs
+++ b/ext/webstorage/lib.rs
@@ -22,7 +22,8 @@ struct OriginStorageDir(PathBuf);
const MAX_STORAGE_BYTES: u32 = 10 * 1024 * 1024;
pub fn init(origin_storage_dir: Option<PathBuf>) -> Extension {
- Extension::builder()
+ Extension::builder(env!("CARGO_PKG_NAME"))
+ .dependencies(vec!["deno_webidl"])
.js(include_js_files!(
prefix "deno:ext/webstorage",
"01_webstorage.js",