diff options
Diffstat (limited to 'cli/args/flags.rs')
-rw-r--r-- | cli/args/flags.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cli/args/flags.rs b/cli/args/flags.rs index 66981b239..138d77359 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -1,5 +1,6 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. +use clap::builder::FalseyValueParser; use clap::value_parser; use clap::Arg; use clap::ArgAction; @@ -405,6 +406,7 @@ pub struct Flags { pub reload: bool, pub seed: Option<u64>, pub unstable: bool, + pub unstable_bare_node_builtlins: bool, pub unsafely_ignore_certificate_errors: Option<Vec<String>>, pub v8_flags: Vec<String>, } @@ -801,6 +803,10 @@ pub fn flags_from_vec(args: Vec<String>) -> clap::error::Result<Flags> { flags.unstable = true; } + if matches.get_flag("unstable-bare-node-builtins") { + flags.unstable_bare_node_builtlins = true; + } + if matches.get_flag("quiet") { flags.log_level = Some(Level::Error); } else if let Some(log_level) = matches.get_one::<String>("log-level") { @@ -897,6 +903,15 @@ fn clap_root() -> Command { .global(true), ) .arg( + Arg::new("unstable-bare-node-builtins") + .long("unstable-bare-node-builtins") + .help("Enable unstable bare node builtins feature") + .env("DENO_UNSTABLE_BARE_NODE_BUILTINS") + .value_parser(FalseyValueParser::new()) + .action(ArgAction::SetTrue) + .global(true), + ) + .arg( Arg::new("log-level") .short('L') .long("log-level") |