summaryrefslogtreecommitdiff
path: root/cli/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/main.rs')
-rw-r--r--cli/main.rs51
1 files changed, 51 insertions, 0 deletions
diff --git a/cli/main.rs b/cli/main.rs
index 7a8647a81..24b964169 100644
--- a/cli/main.rs
+++ b/cli/main.rs
@@ -256,6 +256,57 @@ fn unwrap_or_exit<T>(result: Result<T, AnyError>) -> T {
}
}
+// NOTE(bartlomieju): keep IDs in sync with `runtime/90_deno_ns.js`.
+pub(crate) static UNSTABLE_GRANULAR_FLAGS: &[(
+ // flag name
+ &str,
+ // help text
+ &str,
+ // id to enable it in runtime/99_main.js
+ i32,
+)] = &[
+ (
+ deno_runtime::deno_broadcast_channel::UNSTABLE_FEATURE_NAME,
+ "Enable unstable `BroadcastChannel` API",
+ 1,
+ ),
+ (
+ deno_runtime::deno_ffi::UNSTABLE_FEATURE_NAME,
+ "Enable unstable FFI APIs",
+ 2,
+ ),
+ (
+ deno_runtime::deno_fs::UNSTABLE_FEATURE_NAME,
+ "Enable unstable file system APIs",
+ 3,
+ ),
+ (
+ deno_runtime::deno_kv::UNSTABLE_FEATURE_NAME,
+ "Enable unstable Key-Value store APIs",
+ 4,
+ ),
+ (
+ deno_runtime::deno_net::UNSTABLE_FEATURE_NAME,
+ "Enable unstable net APIs",
+ 5,
+ ),
+ (
+ deno_runtime::ops::http::UNSTABLE_FEATURE_NAME,
+ "Enable unstable HTTP APIs",
+ 6,
+ ),
+ (
+ deno_runtime::ops::worker_host::UNSTABLE_FEATURE_NAME,
+ "Enable unstable Web Worker APIs",
+ 7,
+ ),
+ (
+ deno_runtime::deno_cron::UNSTABLE_FEATURE_NAME,
+ "Enable unstable Deno.cron API",
+ 8,
+ ),
+];
+
pub(crate) fn unstable_exit_cb(_feature: &str, api_name: &str) {
// TODO(bartlomieju): change to "The `--unstable-{feature}` flag must be provided.".
eprintln!("Unstable API '{api_name}'. The --unstable flag must be provided.");