Age | Commit message (Collapse) | Author |
|
|
|
Also cleanup & drop ignored wildcard op-args
|
|
Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
|
|
Co-authored-by: Erfan Safari <erfanshield@outlook.com>
|
|
Enabling op-middleware for overrides in lieu of imperative .replace_op() etc...
Impacts #13219, #12938, #13122
|
|
|
|
Move Arc into struct
|
|
Co-authored-by: Mike White <mike.white@auctane.com>
|
|
|
|
|
|
|
|
This commit changes formatting of JS errors; by not showing
source lines for internal code. Where possible, instead using
the top stack frame associated with user code i.e. the first
location that is colourful and not a "deno:" URL.
|
|
|
|
|
|
This commit does major refactor of "Worker" and "WebWorker",
in order to decouple them from "ProgramState" and "Flags".
The main points of interest are "create_main_worker()" and
"create_web_worker_callback()" functions which are responsible
for creating "Worker" and "WebWorker" in CLI context.
As a result it is now possible to factor out common "runtime"
functionality into a separate crate.
|
|
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
|
|
|
|
|
|
- remove "CliState.workers" and "CliState.next_worker_id", instead
store them on "OpState" using type aliases.
- remove "CliState.global_timer" and "CliState.start_time", instead
store them on "OpState" using type aliases.
- remove "CliState.is_internal", instead pass it to Worker::new
- move "CliState::permissions" to "OpState"
- move "CliState::main_module" to "OpState"
- move "CliState::global_state" to "OpState"
- move "CliState::check_unstable()" to "GlobalState"
- change "cli_state()" to "global_state()"
- change "deno_core::ModuleLoader" trait to pass "OpState" to callbacks
- rename "CliState" to "CliModuleLoader"
|
|
|
|
|
|
|
|
Provides a concrete state type that can be dynamically added. This is necessary for op crates.
* renames BasicState to OpState
* async ops take `Rc<RefCell<OpState>>`
* sync ops take `&mut OpState`
* removes `OpRegistry`, `OpRouter` traits
* `get_error_class_fn` moved to OpState
* ResourceTable moved to OpState
|
|
|
|
|
|
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
|
|
|
|
|
|
This PR removes op_cache and refactors how Deno interacts with TS compiler.
Ultimate goal is to completely sandbox TS compiler worker; it should operate on
simple request -> response basis. With this commit TS compiler no longer
caches compiled sources as they are generated but rather collects all sources
and sends them back to Rust when compilation is done.
Additionally "Diagnostic" and its children got refactored to use "Deserialize" trait
instead of manually implementing JSON deserialization.
|
|
|
|
Renames and adds missing fields to JSStackFrame from CallSite. Fixes #4705.
Cleans up base changes for line and column numbers.
|
|
|
|
|
|
|
|
To better reflect changes in error types in JS from #3662 this PR changes
default error type used in ops from "ErrBox" to "OpError".
"OpError" is a type that can be sent over to JSON; it has all
information needed to construct error in JavaScript. That
made "GetErrorKind" trait useless and so it was removed altogether.
To provide compatibility with previous use of "ErrBox" an implementation of
"From<ErrBox> for OpError" was added, however, it is an escape hatch and
ops implementors should strive to use "OpError" directly.
|
|
* rename ThreadSafeState to State
* State stores InnerState wrapped in Rc and RefCell
|
|
|
|
|
|
|
|
|
|
* Split ThreadSafeState into State and GlobalState. State is a "local"
state belonging to "Worker" while "GlobalState" is state shared by
whole program.
* Update "Worker" and ops to use "GlobalState" where applicable
* Move and refactor "WorkerChannels" resource
|
|
|
|
|
|
* Revert "port more ops to JSON (#2809)"
This reverts commit 137f33733d365026903d40e7cde6e34ac6c36dcf.
* Revert "port ops to JSON: compiler, errors, fetch, files (#2804)"
This reverts commit 79f82cf10ed1dbf91346994250d7311a4d74377a.
* Revert "Port rest of os ops to JSON (#2802)"
This reverts commit 5b2baa5c990fbeae747e952c5dcd7a5369e950b1.
|
|
|
|
Just some clean up reorganization around flatbuffer/minimal dispatch
code. This is prep for adding a JSON dispatcher.
|
|
Note cli/dispatch_minimal.rs ops are not yet included in cli/ops.
This is part of work towards #2730
|