diff options
Diffstat (limited to 'cli/main.rs')
-rw-r--r-- | cli/main.rs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/cli/main.rs b/cli/main.rs index ac0d2f591..932e465c0 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -113,7 +113,7 @@ fn create_web_worker_callback( .log_level .map_or(false, |l| l == log::Level::Debug), unstable: program_state.flags.unstable, - ca_filepath: program_state.flags.ca_file.clone(), + ca_data: program_state.ca_data.clone(), user_agent: http_util::get_user_agent(), seed: program_state.flags.seed, module_loader, @@ -189,7 +189,7 @@ pub fn create_main_worker( .log_level .map_or(false, |l| l == log::Level::Debug), unstable: program_state.flags.unstable, - ca_filepath: program_state.flags.ca_file.clone(), + ca_data: program_state.ca_data.clone(), user_agent: http_util::get_user_agent(), seed: program_state.flags.seed, js_error_create_fn: Some(js_error_create_fn), @@ -295,6 +295,7 @@ async fn compile_command( flags: Flags, source_file: String, output: Option<PathBuf>, + args: Vec<String>, ) -> Result<(), AnyError> { if !flags.unstable { exit_unstable("compile"); @@ -302,6 +303,8 @@ async fn compile_command( let debug = flags.log_level == Some(log::Level::Debug); + let run_flags = standalone::compile_to_runtime_flags(flags.clone(), args)?; + let module_specifier = ModuleSpecifier::resolve_url_or_path(&source_file)?; let program_state = ProgramState::new(flags.clone())?; @@ -330,8 +333,7 @@ async fn compile_command( colors::green("Compile"), module_specifier.to_string() ); - create_standalone_binary(bundle_str.as_bytes().to_vec(), output.clone()) - .await?; + create_standalone_binary(bundle_str, run_flags, output.clone()).await?; info!("{} {}", colors::green("Emit"), output.display()); @@ -1069,6 +1071,7 @@ fn init_v8_flags(v8_flags: &[String]) { let v8_flags_includes_help = v8_flags .iter() .any(|flag| flag == "-help" || flag == "--help"); + // Keep in sync with `standalone.rs`. let v8_flags = once("UNUSED_BUT_NECESSARY_ARG0".to_owned()) .chain(v8_flags.iter().cloned()) .collect::<Vec<_>>(); @@ -1147,7 +1150,8 @@ fn get_subcommand( DenoSubcommand::Compile { source_file, output, - } => compile_command(flags, source_file, output).boxed_local(), + args, + } => compile_command(flags, source_file, output, args).boxed_local(), DenoSubcommand::Fmt { check, files, |