diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-12-12 00:36:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-12 00:36:18 +0100 |
commit | 31935c6b8d8f763a5cf809b940427024da01a71c (patch) | |
tree | 7e35a4b806570c40dd0eae8378db77be12335ace /cli/standalone.rs | |
parent | 39c86df4e587bf45e446bd944bff4a91b8a63be3 (diff) |
refactor(cli): more options on Worker (#8724)
Diffstat (limited to 'cli/standalone.rs')
-rw-r--r-- | cli/standalone.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cli/standalone.rs b/cli/standalone.rs index d7ffd0fd2..067fec36a 100644 --- a/cli/standalone.rs +++ b/cli/standalone.rs @@ -2,6 +2,7 @@ use crate::colors; use crate::flags::Flags; use crate::permissions::Permissions; use crate::tokio_util; +use crate::version; use crate::worker::MainWorker; use crate::worker::WorkerOptions; use deno_core::error::type_error; @@ -120,6 +121,7 @@ async fn run(source_code: String, args: Vec<String>) -> Result<(), AnyError> { apply_source_maps: false, args: flags.argv.clone(), debug_flag: false, + user_agent: crate::http_util::get_user_agent(), unstable: true, ca_filepath: None, seed: None, @@ -129,6 +131,9 @@ async fn run(source_code: String, args: Vec<String>) -> Result<(), AnyError> { maybe_inspector_server: None, should_break_on_first_statement: false, module_loader, + runtime_version: version::deno(), + ts_version: version::TYPESCRIPT.to_string(), + no_color: !colors::use_color(), }; let mut worker = MainWorker::from_options(main_module.clone(), permissions, &options); |