refactor(cli): more options on Worker (#8724)

This commit is contained in:
Bartek Iwańczuk 2020-12-12 00:36:18 +01:00 committed by GitHub
parent 39c86df4e5
commit 31935c6b8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 137 additions and 59 deletions

View file

@ -5,6 +5,7 @@ use crate::file_fetcher::CacheSetting;
use crate::file_fetcher::FileFetcher;
use crate::flags;
use crate::http_cache;
use crate::http_util;
use crate::import_map::ImportMap;
use crate::inspector::InspectorServer;
use crate::lockfile::Lockfile;
@ -99,7 +100,10 @@ impl ProgramState {
let maybe_inspect_host = flags.inspect.or(flags.inspect_brk);
let maybe_inspector_server = match maybe_inspect_host {
Some(host) => Some(Arc::new(InspectorServer::new(host))),
Some(host) => Some(Arc::new(InspectorServer::new(
host,
http_util::get_user_agent(),
))),
None => None,
};