From 2e74f164b6dcf0ecbf8dd38fba9fae550d784bd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sun, 13 Dec 2020 19:45:53 +0100 Subject: refactor: deno_runtime crate (#8640) This commit moves Deno JS runtime, ops, permissions and inspector implementation to new "deno_runtime" crate located in "runtime/" directory. Details in "runtime/README.md". Co-authored-by: Ryan Dahl --- cli/ops/runtime_compiler.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cli/ops/runtime_compiler.rs') diff --git a/cli/ops/runtime_compiler.rs b/cli/ops/runtime_compiler.rs index 03ba88c76..ec9806e60 100644 --- a/cli/ops/runtime_compiler.rs +++ b/cli/ops/runtime_compiler.rs @@ -6,12 +6,12 @@ use crate::media_type::MediaType; use crate::module_graph::BundleType; use crate::module_graph::EmitOptions; use crate::module_graph::GraphBuilder; -use crate::permissions::Permissions; use crate::program_state::ProgramState; use crate::specifier_handler::FetchHandler; use crate::specifier_handler::MemoryHandler; use crate::specifier_handler::SpecifierHandler; use crate::tsc_config; +use deno_runtime::permissions::Permissions; use std::sync::Arc; use deno_core::error::AnyError; @@ -49,9 +49,9 @@ async fn op_compile( ) -> Result { let args: CompileArgs = serde_json::from_value(args)?; if args.bundle { - super::check_unstable2(&state, "Deno.bundle"); + deno_runtime::ops::check_unstable2(&state, "Deno.bundle"); } else { - super::check_unstable2(&state, "Deno.compile"); + deno_runtime::ops::check_unstable2(&state, "Deno.compile"); } let program_state = state.borrow().borrow::>().clone(); let runtime_permissions = { @@ -113,7 +113,7 @@ async fn op_transpile( args: Value, _data: BufVec, ) -> Result { - super::check_unstable2(&state, "Deno.transpileOnly"); + deno_runtime::ops::check_unstable2(&state, "Deno.transpileOnly"); let args: TranspileArgs = serde_json::from_value(args)?; let mut compiler_options = tsc_config::TsConfig::new(json!({ -- cgit v1.2.3