2024-01-01 19:58:21 +00:00
|
|
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2020-12-13 18:45:53 +00:00
|
|
|
|
2021-05-22 16:08:24 +00:00
|
|
|
pub use deno_broadcast_channel;
|
2022-09-28 12:11:12 +00:00
|
|
|
pub use deno_cache;
|
2024-01-22 11:08:01 +00:00
|
|
|
pub use deno_canvas;
|
2021-03-12 20:23:59 +00:00
|
|
|
pub use deno_console;
|
2021-11-28 18:07:32 +00:00
|
|
|
pub use deno_core;
|
2023-11-01 18:57:55 +00:00
|
|
|
pub use deno_cron;
|
2020-12-13 18:45:53 +00:00
|
|
|
pub use deno_crypto;
|
|
|
|
pub use deno_fetch;
|
2021-08-06 21:28:10 +00:00
|
|
|
pub use deno_ffi;
|
2023-03-07 09:13:44 +00:00
|
|
|
pub use deno_fs;
|
2021-07-12 10:44:49 +00:00
|
|
|
pub use deno_http;
|
2023-03-05 00:39:48 +00:00
|
|
|
pub use deno_io;
|
2023-03-22 04:13:24 +00:00
|
|
|
pub use deno_kv;
|
2022-10-05 14:06:44 +00:00
|
|
|
pub use deno_napi;
|
2021-06-28 23:43:03 +00:00
|
|
|
pub use deno_net;
|
2022-08-09 19:06:01 +00:00
|
|
|
pub use deno_node;
|
2024-03-12 17:42:26 +00:00
|
|
|
pub use deno_permissions;
|
|
|
|
pub use deno_terminal::colors;
|
2021-08-07 12:49:38 +00:00
|
|
|
pub use deno_tls;
|
chore: split web op crate (#9635)
This commit starts splitting out the deno_web op crate into multiple
smaller crates. This commit splits out WebIDL and URL API, but in the
future I want to split out each spec into its own crate. That means we
will have (in rough order of loading): `webidl`, `dom`, `streams`,
`console`, `encoding`, `url`, `file`, `fetch`, `websocket`, and
`webgpu` crates.
2021-03-12 15:17:18 +00:00
|
|
|
pub use deno_url;
|
2020-12-13 18:45:53 +00:00
|
|
|
pub use deno_web;
|
2023-12-09 00:19:16 +00:00
|
|
|
pub use deno_webgpu;
|
chore: split web op crate (#9635)
This commit starts splitting out the deno_web op crate into multiple
smaller crates. This commit splits out WebIDL and URL API, but in the
future I want to split out each spec into its own crate. That means we
will have (in rough order of loading): `webidl`, `dom`, `streams`,
`console`, `encoding`, `url`, `file`, `fetch`, `websocket`, and
`webgpu` crates.
2021-03-12 15:17:18 +00:00
|
|
|
pub use deno_webidl;
|
2021-01-06 15:57:28 +00:00
|
|
|
pub use deno_websocket;
|
2021-05-10 10:02:47 +00:00
|
|
|
pub use deno_webstorage;
|
2020-12-13 18:45:53 +00:00
|
|
|
|
|
|
|
pub mod errors;
|
2022-09-02 20:53:23 +00:00
|
|
|
pub mod fmt_errors;
|
2020-12-13 18:45:53 +00:00
|
|
|
pub mod fs_util;
|
2021-05-26 19:07:12 +00:00
|
|
|
pub mod inspector_server;
|
2020-12-13 18:45:53 +00:00
|
|
|
pub mod js;
|
|
|
|
pub mod ops;
|
|
|
|
pub mod permissions;
|
2023-11-14 12:15:49 +00:00
|
|
|
pub mod snapshot;
|
2020-12-13 18:45:53 +00:00
|
|
|
pub mod tokio_util;
|
|
|
|
pub mod web_worker;
|
|
|
|
pub mod worker;
|
2021-10-05 20:41:14 +00:00
|
|
|
|
|
|
|
mod worker_bootstrap;
|
|
|
|
pub use worker_bootstrap::BootstrapOptions;
|
2023-05-30 15:34:50 +00:00
|
|
|
pub use worker_bootstrap::WorkerLogLevel;
|
2023-08-28 21:30:46 +00:00
|
|
|
|
|
|
|
mod shared;
|
|
|
|
pub use shared::runtime;
|
2024-01-23 14:33:07 +00:00
|
|
|
|
|
|
|
// NOTE(bartlomieju): keep IDs in sync with `runtime/90_deno_ns.js` (search for `unstableFeatures`)
|
|
|
|
pub static UNSTABLE_GRANULAR_FLAGS: &[(
|
|
|
|
// flag name
|
|
|
|
&str,
|
|
|
|
// help text
|
|
|
|
&str,
|
|
|
|
// id to enable it in runtime/99_main.js
|
|
|
|
i32,
|
|
|
|
)] = &[
|
|
|
|
(
|
|
|
|
deno_broadcast_channel::UNSTABLE_FEATURE_NAME,
|
|
|
|
"Enable unstable `BroadcastChannel` API",
|
|
|
|
1,
|
|
|
|
),
|
|
|
|
(
|
|
|
|
deno_cron::UNSTABLE_FEATURE_NAME,
|
|
|
|
"Enable unstable Deno.cron API",
|
|
|
|
2,
|
|
|
|
),
|
|
|
|
(
|
|
|
|
deno_ffi::UNSTABLE_FEATURE_NAME,
|
|
|
|
"Enable unstable FFI APIs",
|
|
|
|
3,
|
|
|
|
),
|
|
|
|
(
|
|
|
|
deno_fs::UNSTABLE_FEATURE_NAME,
|
|
|
|
"Enable unstable file system APIs",
|
|
|
|
4,
|
|
|
|
),
|
|
|
|
(
|
|
|
|
ops::http::UNSTABLE_FEATURE_NAME,
|
|
|
|
"Enable unstable HTTP APIs",
|
|
|
|
5,
|
|
|
|
),
|
|
|
|
(
|
|
|
|
deno_kv::UNSTABLE_FEATURE_NAME,
|
|
|
|
"Enable unstable Key-Value store APIs",
|
|
|
|
6,
|
|
|
|
),
|
|
|
|
(
|
|
|
|
deno_net::UNSTABLE_FEATURE_NAME,
|
|
|
|
"Enable unstable net APIs",
|
|
|
|
7,
|
|
|
|
),
|
2024-03-08 00:32:11 +00:00
|
|
|
("temporal", "Enable unstable Temporal API", 8),
|
2024-01-23 14:33:07 +00:00
|
|
|
(
|
|
|
|
"unsafe-proto",
|
|
|
|
"Enable unsafe __proto__ support. This is a security risk.",
|
|
|
|
// This number is used directly in the JS code. Search
|
|
|
|
// for "unstableIds" to see where it's used.
|
|
|
|
9,
|
|
|
|
),
|
|
|
|
(
|
|
|
|
deno_webgpu::UNSTABLE_FEATURE_NAME,
|
|
|
|
"Enable unstable `WebGPU` API",
|
|
|
|
10,
|
|
|
|
),
|
|
|
|
(
|
|
|
|
ops::worker_host::UNSTABLE_FEATURE_NAME,
|
|
|
|
"Enable unstable Web Worker APIs",
|
|
|
|
11,
|
|
|
|
),
|
|
|
|
];
|
|
|
|
|
|
|
|
#[cfg(test)]
|
|
|
|
mod test {
|
|
|
|
use super::*;
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn unstable_granular_flag_names_sorted() {
|
|
|
|
let flags = UNSTABLE_GRANULAR_FLAGS
|
|
|
|
.iter()
|
|
|
|
.map(|(name, _, _)| name.to_string())
|
|
|
|
.collect::<Vec<_>>();
|
|
|
|
let mut sorted_flags = flags.clone();
|
|
|
|
sorted_flags.sort();
|
|
|
|
// sort the flags by name so they appear nicely in the help text
|
|
|
|
assert_eq!(flags, sorted_flags);
|
|
|
|
}
|
|
|
|
}
|