summaryrefslogtreecommitdiff
path: root/cli/args/flags.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/args/flags.rs')
-rw-r--r--cli/args/flags.rs44
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 =