diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-11-25 11:41:21 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-25 11:41:21 -0500 |
commit | a4ec7dfae01485290af91c62c1ce17a742dcb104 (patch) | |
tree | ac5f66523e5151b56e10304026ba096871fbb825 /cli/args/flags.rs | |
parent | 00e4c47890e9b5d95557b06f2048d14a79de8401 (diff) |
feat(unstable): --unstable-unsafe-proto (#21313)
Closes https://github.com/denoland/deno/issues/21276
Diffstat (limited to 'cli/args/flags.rs')
-rw-r--r-- | cli/args/flags.rs | 44 |
1 files changed, 5 insertions, 39 deletions
diff --git a/cli/args/flags.rs b/cli/args/flags.rs index d1f6c153d..d7d51b374 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -844,45 +844,11 @@ pub fn flags_from_vec(args: Vec<String>) -> clap::error::Result<Flags> { if matches.get_flag("unstable") { flags.unstable = true; } - if matches.get_flag("unstable-broadcast-channel") { - flags.unstable_features.push( - deno_runtime::deno_broadcast_channel::UNSTABLE_FEATURE_NAME.to_string(), - ); - } - if matches.get_flag("unstable-ffi") { - flags - .unstable_features - .push(deno_runtime::deno_ffi::UNSTABLE_FEATURE_NAME.to_string()); - } - if matches.get_flag("unstable-fs") { - flags - .unstable_features - .push(deno_runtime::deno_fs::UNSTABLE_FEATURE_NAME.to_string()); - } - if matches.get_flag("unstable-http") { - flags - .unstable_features - .push(deno_runtime::ops::http::UNSTABLE_FEATURE_NAME.to_string()); - } - if matches.get_flag("unstable-kv") { - flags - .unstable_features - .push(deno_runtime::deno_kv::UNSTABLE_FEATURE_NAME.to_string()); - } - if matches.get_flag("unstable-net") { - flags - .unstable_features - .push(deno_runtime::deno_net::UNSTABLE_FEATURE_NAME.to_string()); - } - if matches.get_flag("unstable-worker-options") { - flags - .unstable_features - .push(deno_runtime::ops::worker_host::UNSTABLE_FEATURE_NAME.to_string()); - } - if matches.get_flag("unstable-cron") { - flags - .unstable_features - .push(deno_runtime::deno_cron::UNSTABLE_FEATURE_NAME.to_string()); + + for (name, _, _) in crate::UNSTABLE_GRANULAR_FLAGS { + if matches.get_flag(&format!("unstable-{}", name)) { + flags.unstable_features.push(name.to_string()); + } } flags.unstable_bare_node_builtins = |