2019-01-01 19:58:40 -05:00
|
|
|
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
2018-07-26 17:54:22 -04:00
|
|
|
#[macro_use]
|
2018-09-24 19:51:37 -04:00
|
|
|
extern crate lazy_static;
|
|
|
|
#[macro_use]
|
2018-07-26 17:54:22 -04:00
|
|
|
extern crate log;
|
2018-10-26 21:34:42 -04:00
|
|
|
#[macro_use]
|
|
|
|
extern crate futures;
|
2019-01-09 12:59:46 -05:00
|
|
|
#[macro_use]
|
|
|
|
extern crate serde_json;
|
2019-04-06 18:13:06 -04:00
|
|
|
extern crate clap;
|
|
|
|
extern crate deno;
|
2019-06-09 09:08:20 -04:00
|
|
|
extern crate indexmap;
|
2019-04-21 21:26:56 -04:00
|
|
|
#[cfg(unix)]
|
|
|
|
extern crate nix;
|
2019-05-17 14:03:01 -04:00
|
|
|
extern crate rand;
|
2019-07-17 18:15:30 -04:00
|
|
|
extern crate url;
|
2018-07-26 17:54:22 -04:00
|
|
|
|
2019-02-07 20:07:20 -05:00
|
|
|
mod ansi;
|
2019-07-31 13:16:03 -04:00
|
|
|
pub mod compilers;
|
2018-10-31 14:11:10 -04:00
|
|
|
pub mod deno_dir;
|
2019-06-19 22:07:01 -04:00
|
|
|
pub mod deno_error;
|
2019-06-04 09:03:56 -04:00
|
|
|
pub mod diagnostics;
|
2019-07-17 18:15:30 -04:00
|
|
|
mod disk_cache;
|
2019-05-03 00:06:43 -04:00
|
|
|
mod dispatch_minimal;
|
2019-07-31 07:58:41 -04:00
|
|
|
mod file_fetcher;
|
2018-10-31 14:11:10 -04:00
|
|
|
pub mod flags;
|
2019-06-19 22:07:01 -04:00
|
|
|
pub mod fmt_errors;
|
2018-07-26 17:54:22 -04:00
|
|
|
mod fs;
|
2019-03-10 15:37:05 -04:00
|
|
|
mod global_timer;
|
2018-10-25 19:14:04 -04:00
|
|
|
mod http_body;
|
2018-10-10 13:35:10 -04:00
|
|
|
mod http_util;
|
2019-06-09 09:08:20 -04:00
|
|
|
mod import_map;
|
2018-10-31 14:11:10 -04:00
|
|
|
pub mod msg;
|
2018-11-02 20:09:10 -04:00
|
|
|
pub mod msg_util;
|
2018-10-03 20:48:02 -04:00
|
|
|
pub mod ops;
|
2018-10-31 14:11:10 -04:00
|
|
|
pub mod permissions;
|
2019-05-11 10:23:19 -04:00
|
|
|
mod progress;
|
2018-11-05 12:55:59 -05:00
|
|
|
mod repl;
|
2019-01-13 22:14:59 -05:00
|
|
|
pub mod resolve_addr;
|
2018-10-31 14:11:10 -04:00
|
|
|
pub mod resources;
|
2019-05-30 11:07:58 -04:00
|
|
|
mod shell;
|
2019-04-21 21:26:56 -04:00
|
|
|
mod signal;
|
2019-06-19 22:07:01 -04:00
|
|
|
pub mod source_maps;
|
2019-03-18 20:03:37 -04:00
|
|
|
mod startup_data;
|
2019-04-09 13:11:25 -04:00
|
|
|
pub mod state;
|
2018-09-18 14:53:16 -04:00
|
|
|
mod tokio_util;
|
2018-10-19 16:10:25 -04:00
|
|
|
mod tokio_write;
|
2018-10-31 14:11:10 -04:00
|
|
|
pub mod version;
|
2019-04-08 17:10:00 -04:00
|
|
|
pub mod worker;
|
2018-07-04 14:50:28 -04:00
|
|
|
|
2019-05-11 10:23:19 -04:00
|
|
|
use crate::progress::Progress;
|
2019-04-09 13:11:25 -04:00
|
|
|
use crate::state::ThreadSafeState;
|
2019-04-08 17:10:00 -04:00
|
|
|
use crate::worker::Worker;
|
2019-04-21 11:34:18 -04:00
|
|
|
use deno::v8_set_flags;
|
2019-07-10 18:53:48 -04:00
|
|
|
use deno::ErrBox;
|
2019-06-12 19:55:59 -04:00
|
|
|
use deno::ModuleSpecifier;
|
2019-04-21 11:34:18 -04:00
|
|
|
use flags::DenoFlags;
|
2019-04-29 19:43:06 -04:00
|
|
|
use flags::DenoSubcommand;
|
2019-06-08 07:10:12 -04:00
|
|
|
use futures::future;
|
2019-03-14 19:17:52 -04:00
|
|
|
use futures::lazy;
|
|
|
|
use futures::Future;
|
2019-06-22 12:02:51 -04:00
|
|
|
use log::Level;
|
|
|
|
use log::Metadata;
|
|
|
|
use log::Record;
|
2018-07-25 21:27:27 -04:00
|
|
|
use std::env;
|
2018-07-26 17:37:09 -04:00
|
|
|
|
|
|
|
static LOGGER: Logger = Logger;
|
|
|
|
|
|
|
|
struct Logger;
|
|
|
|
|
|
|
|
impl log::Log for Logger {
|
2019-01-29 10:37:27 -05:00
|
|
|
fn enabled(&self, metadata: &Metadata) -> bool {
|
2018-08-07 13:33:36 -04:00
|
|
|
metadata.level() <= log::max_level()
|
2018-07-26 17:37:09 -04:00
|
|
|
}
|
|
|
|
|
2019-01-29 10:37:27 -05:00
|
|
|
fn log(&self, record: &Record) {
|
2018-07-26 17:37:09 -04:00
|
|
|
if self.enabled(record.metadata()) {
|
2019-05-25 12:23:47 -04:00
|
|
|
let mut target = record.target().to_string();
|
|
|
|
|
|
|
|
if let Some(line_no) = record.line() {
|
|
|
|
target.push_str(":");
|
|
|
|
target.push_str(&line_no.to_string());
|
|
|
|
}
|
|
|
|
|
|
|
|
println!("{} RS - {} - {}", record.level(), target, record.args());
|
2018-07-26 17:37:09 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
fn flush(&self) {}
|
|
|
|
}
|
|
|
|
|
2019-07-10 18:53:48 -04:00
|
|
|
fn print_err_and_exit(err: ErrBox) {
|
2018-12-10 17:50:41 -05:00
|
|
|
eprintln!("{}", err.to_string());
|
2018-12-06 23:05:36 -05:00
|
|
|
std::process::exit(1);
|
|
|
|
}
|
|
|
|
|
2019-07-10 18:53:48 -04:00
|
|
|
fn js_check(r: Result<(), ErrBox>) {
|
2019-03-14 19:17:52 -04:00
|
|
|
if let Err(err) = r {
|
2019-07-10 18:53:48 -04:00
|
|
|
print_err_and_exit(err);
|
2019-03-14 19:17:52 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-07-31 13:16:03 -04:00
|
|
|
// TODO: we might want to rethink how this method works
|
2019-06-08 06:03:04 -04:00
|
|
|
pub fn print_file_info(
|
|
|
|
worker: Worker,
|
2019-06-12 15:00:08 -04:00
|
|
|
module_specifier: &ModuleSpecifier,
|
2019-06-08 06:03:04 -04:00
|
|
|
) -> impl Future<Item = Worker, Error = ()> {
|
2019-07-17 18:15:30 -04:00
|
|
|
let state_ = worker.state.clone();
|
|
|
|
let module_specifier_ = module_specifier.clone();
|
2019-06-12 15:00:08 -04:00
|
|
|
|
2019-07-17 18:15:30 -04:00
|
|
|
state_
|
2019-07-31 07:58:41 -04:00
|
|
|
.file_fetcher
|
2019-07-17 18:15:30 -04:00
|
|
|
.fetch_source_file_async(&module_specifier)
|
|
|
|
.map_err(|err| println!("{}", err))
|
2019-07-31 13:16:03 -04:00
|
|
|
.and_then(|out| {
|
2019-06-08 06:03:04 -04:00
|
|
|
println!(
|
|
|
|
"{} {}",
|
2019-07-17 18:15:30 -04:00
|
|
|
ansi::bold("local:".to_string()),
|
|
|
|
out.filename.to_str().unwrap()
|
2019-06-08 06:03:04 -04:00
|
|
|
);
|
2019-04-16 15:13:42 -04:00
|
|
|
|
2019-06-12 15:00:08 -04:00
|
|
|
println!(
|
|
|
|
"{} {}",
|
2019-07-17 18:15:30 -04:00
|
|
|
ansi::bold("type:".to_string()),
|
|
|
|
msg::enum_name_media_type(out.media_type)
|
2019-06-12 15:00:08 -04:00
|
|
|
);
|
2019-06-08 07:10:12 -04:00
|
|
|
|
2019-07-17 18:15:30 -04:00
|
|
|
state_
|
|
|
|
.clone()
|
2019-07-31 13:16:03 -04:00
|
|
|
.fetch_compiled_module(&module_specifier_)
|
2019-07-17 18:15:30 -04:00
|
|
|
.map_err(|e| {
|
|
|
|
debug!("compiler error exiting!");
|
|
|
|
eprintln!("\n{}", e.to_string());
|
|
|
|
std::process::exit(1);
|
2019-07-31 17:11:37 -04:00
|
|
|
})
|
|
|
|
.and_then(move |compiled| {
|
2019-07-31 13:16:03 -04:00
|
|
|
if out.media_type == msg::MediaType::TypeScript
|
|
|
|
|| (out.media_type == msg::MediaType::JavaScript
|
|
|
|
&& state_.ts_compiler.compile_js)
|
|
|
|
{
|
|
|
|
let compiled_source_file = state_
|
|
|
|
.ts_compiler
|
|
|
|
.get_compiled_source_file(&out.url)
|
|
|
|
.unwrap();
|
|
|
|
|
2019-07-17 18:15:30 -04:00
|
|
|
println!(
|
|
|
|
"{} {}",
|
|
|
|
ansi::bold("compiled:".to_string()),
|
2019-07-31 13:16:03 -04:00
|
|
|
compiled_source_file.filename.to_str().unwrap(),
|
2019-07-17 18:15:30 -04:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
if let Ok(source_map) = state_
|
|
|
|
.clone()
|
|
|
|
.ts_compiler
|
|
|
|
.get_source_map_file(&module_specifier_)
|
|
|
|
{
|
|
|
|
println!(
|
|
|
|
"{} {}",
|
|
|
|
ansi::bold("map:".to_string()),
|
|
|
|
source_map.filename.to_str().unwrap()
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2019-07-31 13:16:03 -04:00
|
|
|
if let Some(deps) =
|
|
|
|
worker.state.modules.lock().unwrap().deps(&compiled.name)
|
2019-07-17 18:15:30 -04:00
|
|
|
{
|
|
|
|
println!("{}{}", ansi::bold("deps:\n".to_string()), deps.name);
|
|
|
|
if let Some(ref depsdeps) = deps.deps {
|
|
|
|
for d in depsdeps {
|
|
|
|
println!("{}", d);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
println!(
|
|
|
|
"{} cannot retrieve full dependency graph",
|
|
|
|
ansi::bold("deps:".to_string()),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
Ok(worker)
|
|
|
|
})
|
|
|
|
})
|
2019-04-16 15:13:42 -04:00
|
|
|
}
|
|
|
|
|
2019-04-21 11:34:18 -04:00
|
|
|
fn create_worker_and_state(
|
|
|
|
flags: DenoFlags,
|
|
|
|
argv: Vec<String>,
|
|
|
|
) -> (Worker, ThreadSafeState) {
|
2019-05-30 11:07:58 -04:00
|
|
|
use crate::shell::Shell;
|
|
|
|
use std::sync::Arc;
|
|
|
|
use std::sync::Mutex;
|
|
|
|
let shell = Arc::new(Mutex::new(Shell::new()));
|
2019-05-11 10:23:19 -04:00
|
|
|
let progress = Progress::new();
|
2019-05-30 11:07:58 -04:00
|
|
|
progress.set_callback(move |_done, _completed, _total, status, msg| {
|
|
|
|
if !status.is_empty() {
|
|
|
|
let mut s = shell.lock().unwrap();
|
|
|
|
s.status(status, msg).expect("shell problem");
|
2019-05-11 10:23:19 -04:00
|
|
|
}
|
|
|
|
});
|
2019-07-31 07:58:41 -04:00
|
|
|
let state =
|
|
|
|
ThreadSafeState::new(flags, argv, ops::op_selector_std, progress).unwrap();
|
2019-04-21 11:34:18 -04:00
|
|
|
let worker = Worker::new(
|
|
|
|
"main".to_string(),
|
|
|
|
startup_data::deno_isolate_init(),
|
|
|
|
state.clone(),
|
|
|
|
);
|
2019-02-07 16:19:50 -05:00
|
|
|
|
2019-04-21 11:34:18 -04:00
|
|
|
(worker, state)
|
|
|
|
}
|
2018-11-06 01:41:39 -05:00
|
|
|
|
2019-04-21 11:34:18 -04:00
|
|
|
fn types_command() {
|
2019-04-25 14:27:30 -04:00
|
|
|
let content = include_str!(concat!(
|
2019-04-21 11:34:18 -04:00
|
|
|
env!("GN_OUT_DIR"),
|
|
|
|
"/gen/cli/lib/lib.deno_runtime.d.ts"
|
|
|
|
));
|
|
|
|
println!("{}", content);
|
|
|
|
}
|
2018-11-06 01:41:39 -05:00
|
|
|
|
2019-04-25 13:47:33 -04:00
|
|
|
fn fetch_or_info_command(
|
2019-04-21 11:34:18 -04:00
|
|
|
flags: DenoFlags,
|
|
|
|
argv: Vec<String>,
|
|
|
|
print_info: bool,
|
|
|
|
) {
|
|
|
|
let (mut worker, state) = create_worker_and_state(flags, argv);
|
2019-02-01 18:29:00 -05:00
|
|
|
|
2019-04-21 11:34:18 -04:00
|
|
|
let main_module = state.main_module().unwrap();
|
|
|
|
let main_future = lazy(move || {
|
|
|
|
// Setup runtime.
|
|
|
|
js_check(worker.execute("denoMain()"));
|
|
|
|
debug!("main_module {}", main_module);
|
2019-01-15 12:19:58 -05:00
|
|
|
|
2019-04-21 11:34:18 -04:00
|
|
|
worker
|
2019-06-12 15:00:08 -04:00
|
|
|
.execute_mod_async(&main_module, true)
|
2019-06-08 07:10:12 -04:00
|
|
|
.map_err(print_err_and_exit)
|
2019-06-05 16:35:38 -04:00
|
|
|
.and_then(move |()| {
|
2019-04-21 11:34:18 -04:00
|
|
|
if print_info {
|
2019-06-08 06:03:04 -04:00
|
|
|
future::Either::A(print_file_info(worker, &main_module))
|
|
|
|
} else {
|
|
|
|
future::Either::B(future::ok(worker))
|
2019-04-21 11:34:18 -04:00
|
|
|
}
|
2019-07-31 17:11:37 -04:00
|
|
|
})
|
|
|
|
.and_then(|worker| {
|
2019-04-21 11:34:18 -04:00
|
|
|
worker.then(|result| {
|
|
|
|
js_check(result);
|
|
|
|
Ok(())
|
|
|
|
})
|
2019-06-08 07:10:12 -04:00
|
|
|
})
|
2019-04-21 11:34:18 -04:00
|
|
|
});
|
|
|
|
tokio_util::run(main_future);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn eval_command(flags: DenoFlags, argv: Vec<String>) {
|
|
|
|
let (mut worker, state) = create_worker_and_state(flags, argv);
|
|
|
|
// Wrap provided script in async function so asynchronous methods
|
|
|
|
// work. This is required until top-level await is not supported.
|
|
|
|
let js_source = format!(
|
|
|
|
"async function _topLevelWrapper(){{
|
|
|
|
{}
|
|
|
|
}}
|
|
|
|
_topLevelWrapper();
|
|
|
|
",
|
|
|
|
&state.argv[1]
|
2019-04-09 13:11:25 -04:00
|
|
|
);
|
2019-01-09 12:59:46 -05:00
|
|
|
|
2019-04-21 11:34:18 -04:00
|
|
|
let main_future = lazy(move || {
|
|
|
|
js_check(worker.execute("denoMain()"));
|
|
|
|
// ATM imports in `deno eval` are not allowed
|
|
|
|
// TODO Support ES modules once Worker supports evaluating anonymous modules.
|
|
|
|
js_check(worker.execute(&js_source));
|
|
|
|
worker.then(|result| {
|
|
|
|
js_check(result);
|
|
|
|
Ok(())
|
|
|
|
})
|
|
|
|
});
|
|
|
|
tokio_util::run(main_future);
|
|
|
|
}
|
|
|
|
|
2019-05-03 16:24:09 -04:00
|
|
|
fn xeval_command(flags: DenoFlags, argv: Vec<String>) {
|
|
|
|
let xeval_replvar = flags.xeval_replvar.clone().unwrap();
|
|
|
|
let (mut worker, state) = create_worker_and_state(flags, argv);
|
|
|
|
let xeval_source = format!(
|
|
|
|
"window._xevalWrapper = async function ({}){{
|
|
|
|
{}
|
|
|
|
}}",
|
|
|
|
&xeval_replvar, &state.argv[1]
|
|
|
|
);
|
|
|
|
|
|
|
|
let main_future = lazy(move || {
|
|
|
|
// Setup runtime.
|
|
|
|
js_check(worker.execute(&xeval_source));
|
|
|
|
js_check(worker.execute("denoMain()"));
|
|
|
|
worker
|
|
|
|
.then(|result| {
|
|
|
|
js_check(result);
|
|
|
|
Ok(())
|
2019-07-31 17:11:37 -04:00
|
|
|
})
|
|
|
|
.map_err(print_err_and_exit)
|
2019-05-03 16:24:09 -04:00
|
|
|
});
|
|
|
|
tokio_util::run(main_future);
|
|
|
|
}
|
|
|
|
|
2019-06-08 14:42:28 -04:00
|
|
|
fn bundle_command(flags: DenoFlags, argv: Vec<String>) {
|
|
|
|
let (mut _worker, state) = create_worker_and_state(flags, argv);
|
|
|
|
|
|
|
|
let main_module = state.main_module().unwrap();
|
|
|
|
assert!(state.argv.len() >= 3);
|
|
|
|
let out_file = state.argv[2].clone();
|
|
|
|
debug!(">>>>> bundle_async START");
|
2019-07-17 18:15:30 -04:00
|
|
|
let bundle_future = state
|
|
|
|
.ts_compiler
|
|
|
|
.bundle_async(state.clone(), main_module.to_string(), out_file)
|
2019-07-10 18:53:48 -04:00
|
|
|
.map_err(|err| {
|
2019-06-08 14:42:28 -04:00
|
|
|
debug!("diagnostics returned, exiting!");
|
2019-07-10 18:53:48 -04:00
|
|
|
eprintln!("");
|
|
|
|
print_err_and_exit(err);
|
2019-07-31 17:11:37 -04:00
|
|
|
})
|
|
|
|
.and_then(move |_| {
|
2019-06-08 14:42:28 -04:00
|
|
|
debug!(">>>>> bundle_async END");
|
|
|
|
Ok(())
|
|
|
|
});
|
|
|
|
tokio_util::run(bundle_future);
|
|
|
|
}
|
|
|
|
|
2019-04-21 11:34:18 -04:00
|
|
|
fn run_repl(flags: DenoFlags, argv: Vec<String>) {
|
|
|
|
let (mut worker, _state) = create_worker_and_state(flags, argv);
|
|
|
|
|
|
|
|
// REPL situation.
|
|
|
|
let main_future = lazy(move || {
|
|
|
|
// Setup runtime.
|
|
|
|
js_check(worker.execute("denoMain()"));
|
|
|
|
worker
|
|
|
|
.then(|result| {
|
2019-04-16 15:13:42 -04:00
|
|
|
js_check(result);
|
|
|
|
Ok(())
|
2019-07-31 17:11:37 -04:00
|
|
|
})
|
|
|
|
.map_err(|(err, _worker): (ErrBox, Worker)| print_err_and_exit(err))
|
2019-04-21 11:34:18 -04:00
|
|
|
});
|
|
|
|
tokio_util::run(main_future);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn run_script(flags: DenoFlags, argv: Vec<String>) {
|
2019-07-31 11:02:20 -04:00
|
|
|
let use_current_thread = flags.current_thread;
|
2019-04-21 11:34:18 -04:00
|
|
|
let (mut worker, state) = create_worker_and_state(flags, argv);
|
|
|
|
|
|
|
|
let main_module = state.main_module().unwrap();
|
|
|
|
// Normal situation of executing a module.
|
|
|
|
let main_future = lazy(move || {
|
|
|
|
// Setup runtime.
|
|
|
|
js_check(worker.execute("denoMain()"));
|
|
|
|
debug!("main_module {}", main_module);
|
|
|
|
|
|
|
|
worker
|
2019-06-12 15:00:08 -04:00
|
|
|
.execute_mod_async(&main_module, false)
|
2019-06-05 16:35:38 -04:00
|
|
|
.and_then(move |()| {
|
2019-07-16 00:19:26 -04:00
|
|
|
js_check(worker.execute("window.dispatchEvent(new Event('load'))"));
|
2019-04-21 11:34:18 -04:00
|
|
|
worker.then(|result| {
|
2019-04-16 15:13:42 -04:00
|
|
|
js_check(result);
|
|
|
|
Ok(())
|
|
|
|
})
|
2019-07-31 17:11:37 -04:00
|
|
|
})
|
|
|
|
.map_err(print_err_and_exit)
|
2019-04-21 11:34:18 -04:00
|
|
|
});
|
2019-07-31 11:02:20 -04:00
|
|
|
|
|
|
|
if use_current_thread {
|
|
|
|
tokio_util::run_on_current_thread(main_future);
|
|
|
|
} else {
|
|
|
|
tokio_util::run(main_future);
|
|
|
|
}
|
2019-04-21 11:34:18 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
#[cfg(windows)]
|
|
|
|
ansi_term::enable_ansi_support().ok(); // For Windows 10
|
|
|
|
|
|
|
|
log::set_logger(&LOGGER).unwrap();
|
|
|
|
let args: Vec<String> = env::args().collect();
|
2019-04-29 19:43:06 -04:00
|
|
|
let (flags, subcommand, argv) = flags::flags_from_vec(args);
|
2019-04-21 11:34:18 -04:00
|
|
|
|
2019-05-02 20:37:02 -04:00
|
|
|
if let Some(ref v8_flags) = flags.v8_flags {
|
|
|
|
v8_set_flags(v8_flags.clone());
|
|
|
|
}
|
2019-04-21 11:34:18 -04:00
|
|
|
|
2019-06-22 12:02:51 -04:00
|
|
|
let log_level = match flags.log_level {
|
|
|
|
Some(level) => level,
|
|
|
|
None => Level::Warn,
|
|
|
|
};
|
|
|
|
log::set_max_level(log_level.to_level_filter());
|
2019-04-21 11:34:18 -04:00
|
|
|
|
2019-04-29 19:43:06 -04:00
|
|
|
match subcommand {
|
2019-06-08 14:42:28 -04:00
|
|
|
DenoSubcommand::Bundle => bundle_command(flags, argv),
|
2019-06-26 06:02:13 -04:00
|
|
|
DenoSubcommand::Completions => {}
|
2019-04-29 19:43:06 -04:00
|
|
|
DenoSubcommand::Eval => eval_command(flags, argv),
|
|
|
|
DenoSubcommand::Fetch => fetch_or_info_command(flags, argv, false),
|
|
|
|
DenoSubcommand::Info => fetch_or_info_command(flags, argv, true),
|
2019-06-14 13:05:06 -04:00
|
|
|
DenoSubcommand::Install => run_script(flags, argv),
|
2019-04-29 19:43:06 -04:00
|
|
|
DenoSubcommand::Repl => run_repl(flags, argv),
|
|
|
|
DenoSubcommand::Run => run_script(flags, argv),
|
|
|
|
DenoSubcommand::Types => types_command(),
|
2019-05-03 18:48:50 -04:00
|
|
|
DenoSubcommand::Version => run_repl(flags, argv),
|
2019-05-03 16:24:09 -04:00
|
|
|
DenoSubcommand::Xeval => xeval_command(flags, argv),
|
2019-04-16 15:13:42 -04:00
|
|
|
}
|
2018-06-15 19:43:23 -04:00
|
|
|
}
|