2024-01-01 14:58:21 -05:00
|
|
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2020-12-13 13:45:53 -05:00
|
|
|
|
2021-05-22 12:08:24 -04:00
|
|
|
pub use deno_broadcast_channel;
|
2022-09-28 08:11:12 -04:00
|
|
|
pub use deno_cache;
|
2024-01-22 06:08:01 -05:00
|
|
|
pub use deno_canvas;
|
2021-03-12 15:23:59 -05:00
|
|
|
pub use deno_console;
|
2021-11-28 13:07:32 -05:00
|
|
|
pub use deno_core;
|
2023-11-01 14:57:55 -04:00
|
|
|
pub use deno_cron;
|
2020-12-13 13:45:53 -05:00
|
|
|
pub use deno_crypto;
|
|
|
|
pub use deno_fetch;
|
2021-08-06 17:28:10 -04:00
|
|
|
pub use deno_ffi;
|
2023-03-07 04:13:44 -05:00
|
|
|
pub use deno_fs;
|
2021-07-12 06:44:49 -04:00
|
|
|
pub use deno_http;
|
2023-03-04 19:39:48 -05:00
|
|
|
pub use deno_io;
|
2023-03-22 00:13:24 -04:00
|
|
|
pub use deno_kv;
|
2022-10-05 10:06:44 -04:00
|
|
|
pub use deno_napi;
|
2021-06-28 19:43:03 -04:00
|
|
|
pub use deno_net;
|
2022-08-09 15:06:01 -04:00
|
|
|
pub use deno_node;
|
2024-03-12 13:42:26 -04:00
|
|
|
pub use deno_permissions;
|
|
|
|
pub use deno_terminal::colors;
|
2021-08-07 08:49:38 -04: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 10:17:18 -05:00
|
|
|
pub use deno_url;
|
2020-12-13 13:45:53 -05:00
|
|
|
pub use deno_web;
|
2023-12-08 19:19:16 -05: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 10:17:18 -05:00
|
|
|
pub use deno_webidl;
|
2021-01-06 10:57:28 -05:00
|
|
|
pub use deno_websocket;
|
2021-05-10 06:02:47 -04:00
|
|
|
pub use deno_webstorage;
|
2020-12-13 13:45:53 -05:00
|
|
|
|
2024-04-17 10:19:55 -04:00
|
|
|
pub mod code_cache;
|
2020-12-13 13:45:53 -05:00
|
|
|
pub mod errors;
|
2022-09-02 16:53:23 -04:00
|
|
|
pub mod fmt_errors;
|
2020-12-13 13:45:53 -05:00
|
|
|
pub mod fs_util;
|
2021-05-26 15:07:12 -04:00
|
|
|
pub mod inspector_server;
|
2020-12-13 13:45:53 -05:00
|
|
|
pub mod js;
|
|
|
|
pub mod ops;
|
|
|
|
pub mod permissions;
|
2023-11-14 07:15:49 -05:00
|
|
|
pub mod snapshot;
|
2020-12-13 13:45:53 -05:00
|
|
|
pub mod tokio_util;
|
|
|
|
pub mod web_worker;
|
|
|
|
pub mod worker;
|
2021-10-05 16:41:14 -04:00
|
|
|
|
|
|
|
mod worker_bootstrap;
|
|
|
|
pub use worker_bootstrap::BootstrapOptions;
|
2023-05-30 11:34:50 -04:00
|
|
|
pub use worker_bootstrap::WorkerLogLevel;
|
2023-08-28 17:30:46 -04:00
|
|
|
|
|
|
|
mod shared;
|
|
|
|
pub use shared::runtime;
|
2024-01-23 09:33:07 -05: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-07 19:32:11 -05:00
|
|
|
("temporal", "Enable unstable Temporal API", 8),
|
2024-01-23 09:33:07 -05: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);
|
|
|
|
}
|
|
|
|
}
|