summaryrefslogtreecommitdiff
path: root/cli/ops/os.rs
AgeCommit message (Collapse)Author
2020-12-13refactor: deno_runtime crate (#8640)Bartek Iwańczuk
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 <ry@tinyclouds.org>
2020-10-26feat(unstable): add Deno.systemCpuInfo() (#7774)Elias Sjögreen
2020-09-26refactor: factor out check_unstable op helper (#7695)Bartek Iwańczuk
2020-09-21refactor: use futures and serde_json from deno_core (#7614)Bartek Iwańczuk
2020-09-20refactor: remove CliState, use OpState, add CliModuleLoader (#7588)Bartek Iwańczuk
- 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"
2020-09-16Re-export deno_core::url (#7525)Ryan Dahl
Also re-exports deno_core::futures and deno_core::serde_json but these are not yet used in the CLI.
2020-09-16Remove unnecessary serde_derive dependencyRyan Dahl
2020-09-15refactor: use the 'anyhow' crate instead of 'ErrBox' (#7476)Bert Belder
2020-09-10Use gotham-like state for ops (#7385)Ryan Dahl
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
2020-09-10feat(unstable): Add Deno.systemMemoryInfo() (#7350)Akshat Agarwal
Co-authored-by: marcopacini <pacinim88@gmail.com> Co-authored-by: Casper Beyer <caspervonb@pm.me>
2020-09-06Move JSON ops to deno_core (#7336)Bert Belder
2020-08-28refactor: migrate ops to new dispatch wrapper (#7118)Bartek Iwańczuk
2020-08-26refactor: remove OpError, use ErrBox everywhere (#7187)Bert Belder
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2020-08-19Make Rc/Arc wrapper around State/GlobalState visible (#7104)Bert Belder
2020-06-20Remove Deno.dir and dirs dependency (#6385)Ryan Dahl
2020-06-12Revert "feat: add Deno.osName()" (#6261)Ryan Dahl
Deno.build.os provides the same functionality This reverts commit 6ccf9037a6b36c81ea0e6ac12d0e2dbd793f6114.
2020-06-11feat: add Deno.osName() (#5714)Rubin Bhandari
2020-06-09feat(cli): Add Deno.env.delete() (#5859)Tuan Le
2020-06-01feat(core): Ops can take several zero copy buffers (#4788)Valentin Anger
2020-05-29fix(cli/permissions): Fix CWD and exec path leaks (#5642)Nayeem Rahman
2020-05-09BREAKING: make Deno.hostname unstable (#5108)Ryan Dahl
2020-05-06BREAKING: execPath should require allow-read (#5109)Ryan Dahl
2020-04-27loadavg and osRelease made unstable (#4938)Ryan Dahl
2020-04-27Make Deno.dir unstable (#4924)Ryan Dahl
2020-04-23Rename deno_core::Isolate to deno_core::CoreIsolate (#4851)Ryan Dahl
2020-04-03clippy (#4618)Kitson Kelly
2020-03-01feat(std/node): add os.tmpdir() implementation (#4213)ecyrbe
2020-02-26tty: Deno.setRaw(rid, mode) to turn on/off raw mode (#3958)Kevin (Kun) "Kassimo" Qian
2020-02-25Clean up how we use opIds (#4118)Ryan Dahl
2020-02-24Add missing node os.release() implementation (#4065)ecyrbe
2020-02-23refactor: use OpError instead of ErrBox for errors in ops (#4058)Bartek Iwańczuk
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.
2020-02-22feat(std/node): add os.loadavg() (#4075)ecyrbe
2020-02-08refactor: rename ThreadSafeState, use RefCell for mutable state (#3931)Bartek Iwańczuk
* rename ThreadSafeState to State * State stores InnerState wrapped in Rc and RefCell
2020-01-27refactor: isomorphic snapshot for CLI (#3728)Bartek Iwańczuk
2020-01-24s/PinnedBuf/ZeroCopyBuf (#3782)Ryan Dahl
2020-01-09feat: Deno.args now does not include script (#3628)Ry Dahl
Previously Deno.args was ["script.js", "arg1", "arg2"] Now it is just ["arg1", "arg2"] BREAKING CHANGE
2020-01-05Rename crates: 'deno' to 'deno_core' and 'deno_cli' to 'deno' (#3600)Ry Dahl
2020-01-02Happy new year! (#3578)Ry Dahl
2019-12-21feat: Add Deno.dir("executable") (#3526)Nayeem Rahman
2019-12-18Reduce all directory functions to Deno.dir() (#3518)Ry Dahl
2019-12-15Feat: Add more dir APIs for Deno (#3491)Axetroy
2019-12-03remove duplicated argv member from ThreadSafeGlobalState (#3433)Ry Dahl
2019-11-04Refactor Worker and ThreadSafeState (#3242)Bartek Iwańczuk
* 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
2019-10-11Add init methods for each op module (#3087)Ryan Dahl
2019-10-04Use xeval from deno_std (#3058)Nayeem Rahman
2019-10-02feat: Add support for passing a key to Deno.env() (#2952)Jed Fox
This adds a new op to get a single env var.
2019-09-27Add Deno.hostname() (#3032)Kevin (Kun) "Kassimo" Qian
2019-09-15Make deno_cli installable via crates.io (#2946)Ryan Dahl
- Fixes cargo publish on deno_typescript, deno_cli_snapshots, and deno_cli. - Combines cli_snapshots and js into one directory. - Extracts TS version at compile time rather than runtime - Bumps version awkwardly - it was necessary to test end-to-end publishing. Sorry. - Adds git submodule deno_typescript/typescript
2019-09-15Rename ansi.rs to colors.rs (#2956)Tomohito Nakayama
2019-09-06Remove replacements hack in deno_typescript (#2864)Yoshiya Hinosawa