Commit graph

179 commits

Author SHA1 Message Date
Ryan Dahl 4d2b9cd37a
Fix Op definitions (#4814) 2020-04-18 20:05:13 -04:00
EnokMan 47617e60d5
feat: startTLS (#4773) 2020-04-18 11:21:20 -04:00
Bartek Iwańczuk 41f836dc91
replace block_on in net interfaces (#4796) 2020-04-17 18:45:34 +02:00
Bartek Iwańczuk d359789c52
feat: support Deno namespace in Worker API (#4784) 2020-04-16 23:40:29 +02:00
Bartek Iwańczuk 0c48470b35
remove more calls to futures::executor::block_on (#4775) 2020-04-16 16:29:28 +02:00
Bartek Iwańczuk aab26d226e
remove calls to futures::executor::block_on (#4760) 2020-04-15 23:14:28 -04:00
Ryan Dahl fab0204cbf
Make writeSync, readSync, seekSync, openSync, isatty proper synchronous syscalls (#4762) 2020-04-15 20:43:19 -04:00
Bartek Iwańczuk e08ece2d2c
fix(worker): make worker name spec compliant (#4746) 2020-04-14 17:41:06 +02:00
Nayeem Rahman 0ea6eb83a9
refactor(core/js_error): Align JSStackFrame with CallSite (#4715)
Renames and adds missing fields to JSStackFrame from CallSite. Fixes #4705.

Cleans up base changes for line and column numbers.
2020-04-13 10:54:16 -04:00
gewoonwoutje 2feb661b85
Replace panic with invalid_utf8 OpError (#4704)
Co-authored-by: Wout Elstgeest <w.elstgeest@inepro.com>
2020-04-10 22:14:16 -04:00
Bartek Iwańczuk be71885628
implement Worker.terminate() and self.close() (#4684) 2020-04-10 00:15:17 +02:00
Kitson Kelly f527407287
clippy (#4618) 2020-04-03 22:41:16 -04:00
dubiousjim 6f9c78979d
Properly handle invalid utf8 in paths (#4609) 2020-04-03 13:47:57 -04:00
dubiousjim c5c3abc517
adjust docs for Deno.seek (#4610) 2020-04-03 13:45:44 -04:00
dubiousjim d4d0b5d90c
Properly track isFile, isSymlink, isDirectory (#4541)
* Properly track isFile, isSymlink, isDirectory

These don't exhaust all the possibilities, so none of them should be
defined as "neither of the others".

* empty
2020-03-31 13:46:25 -04:00
Ryan Dahl 2874664e91
feat: Support Inspector / Chrome Devtools (#4484)
This is a first pass implementation which is still missing several important
features:
- support for --inspect-brk (#4503)
- support for source maps (#4501)
- support for piping console.log to devtools console (#4502)

Co-authored-by: Bert Belder <bertbelder@gmail.com>
Co-authored-by: Matt Harrison <mt.harrison86@gmail.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2020-03-27 16:09:51 -04:00
João Souto 70a5034431
feat: Support Unix Domain Sockets (#4176) 2020-03-23 18:02:51 -04:00
Akshat Agarwal b8a5c29bf8
BREAKING CHANGE Rename Deno.run's args to cmd (#4444)
This is to avoid confusion with Deno.args which does not include the 
executable to be run.
2020-03-21 17:44:18 -04:00
dubiousjim 77a44163fb
chmod should throw on Windows (#4446) 2020-03-20 16:03:04 -04:00
dubiousjim 1c6f177d19
use prebuilt "not implemented" error (#4442) 2020-03-20 12:10:02 -04:00
dubiousjim 69303e2149
refactor: move code from fs.rs into ops/fs.rs (#4428)
This a complex boring PR that shifts around code (primarily) in cli/fs.rs and
cli/ops/fs.rs. The gain of this refactoring is to ease the way for #4188 and
#4017, and also to avoid some future development pain.

Mostly there is no change in functionality. Except:
* squashed bugs where op_utime and op_chown weren't using `resolve_from_cwd`
* eliminated the use of the external `remove_dir_all` crate.
* op_chmod now only queries metadata to verify file/dir exists on Windows (it
  will already fail on Unix if it doesn't)
* op_chown now verifies the file/dir's existence on Windows like chmod does.
2020-03-20 09:46:26 -04:00
Kitson Kelly da8cb408c8
Provide compiled JSON to TypeScript compiler. (#4404)
Fixes #4101

Previously, we would just provide the raw JSON to the TypeScript
compiler worker, but TypeScript does not transform JSON.  This caused
a problem when emitting a bundle, that the JSON would just be "inlined"
into the output, instead of being transformed into a module.

This fixes this problem by providing the compiled JSON to the TypeScript
compiler, so TypeScript just sees JSON as a "normal" TypeScript module.
2020-03-18 12:39:53 -04:00
dubiousjim f9557a4ff6
Add mode option to open/create (#4289) 2020-03-16 15:02:41 -04:00
Gurwinder Singh 8077ade741
refactor: remove an unsafe and some boxing (#4398) 2020-03-16 10:46:31 -07:00
dubiousjim 6cc40b0865
BREAKING CHANGE FileInfo.len renamed to FileName.size (#4338) 2020-03-14 22:57:42 -04:00
Ryan Dahl 3ac642c183
upgrade: Rust 1.42.0 (#4331) 2020-03-12 18:07:57 +01:00
João Souto fb5c31416d
Add waker to StreamResource to fix hang on close bugs (#4293) 2020-03-11 18:19:24 -04:00
dubiousjim a28fa2415f
support permission mode in mkdir (#4286) 2020-03-11 16:14:23 -04:00
Nayeem Rahman 55119aaee2
refactor(cli/js/net): Cleanup iterable APIs (#4236)
Listener and UDPConn are AsyncIterables instead of AsyncIterators.
The [Symbol.asyncIterator]()s are defined as generators and the
next() methods are gone.

"Listener/Socket has been closed" errors are now BadResource.
2020-03-10 15:14:22 -04:00
dubiousjim 8078d976d2
Add Deno.umask (#4290) 2020-03-10 15:11:27 -04:00
Bartek Iwańczuk 88b77da25c
refactor: remove cli/ops/files.rs (#4246)
* "op_close" - moved to "cli/ops/resources.rs"
* "op_seek", "op_open" - moved to "cli/ops/fs.rs"

Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2020-03-07 13:20:27 +01:00
dubiousjim acf0958e94
Rename name/filename arguments to path (#4227)
There's a lot of variation in doc comments and internal code about
whether the first parameter to file system calls is `path` or `name` or
`filename`. For consistency, have made it always be `path`.
2020-03-06 11:29:23 -05:00
Ryan Dahl afea9b2edd
fix: call unwatch when dropping FsEventsResource (#4266) 2020-03-05 20:01:08 -05:00
Ryan Dahl 54a1688868
Allow BadResource errors to take a custom message (#4251) 2020-03-05 08:30:41 -05:00
Bert Belder 5d3dfa4cf6
Remove unnecessary macro from cli/ops/tty.rs (#4254)
It contains a clippy issue, and there's no need for this macro anyway.
2020-03-04 15:54:09 -08:00
Bert Belder eafd40feab
Do not convert exceptions to JSON and back (#4214) 2020-03-02 14:20:16 -08:00
Bartek Iwańczuk ff5bba3be8
feat: update metrics to track different op types (#4221) 2020-03-02 19:13:36 +01:00
Bartek Iwańczuk cfe4369ded
refactor: rename structures related to Modules (#4217)
* rename structures related to ES Modules; add "Modules" prefix
* remove unneeded Unpin trait requirement for "ModuleLoader"
2020-03-02 19:12:49 +01:00
bartOssh 4a47ffa5c4
seek should return cursor position (#4211) 2020-03-02 11:44:46 -05:00
dubiousjim 6cd46fa3ef
Cleanup comments and internal variables (#4205) 2020-03-02 10:19:42 -05:00
ecyrbe 2a594bd3b2
feat(std/node): add os.tmpdir() implementation (#4213) 2020-03-01 19:05:04 -05:00
Bartek Iwańczuk fa5f3aa600
replace impl Future with poll_fn for net.rs, process.rs, tls.rs (#4158) 2020-02-27 21:08:21 +01:00
Bartek Iwańczuk daf7617f42
rewrite normalize_path (#4143)
Rewrite "normalize_path()" to remove all intermediate components from the path, ie. "./" and "../". It's very similar in functionality to fs::canonicalize(), however "normalize_path() doesn't resolve symlinks.
2020-02-26 22:11:52 +01:00
Bartek Iwańczuk 7fff2d2d1e
remove Read/Write futures, use poll_fn instead (#4150) 2020-02-26 22:06:20 +01:00
Kevin (Kun) "Kassimo" Qian 5946808f66
tty: Deno.setRaw(rid, mode) to turn on/off raw mode (#3958) 2020-02-26 01:01:24 -05:00
Ryan Dahl f47f3f9672
Remove _async from method names since _sync are gone (#4128) 2020-02-25 20:42:00 +01:00
Nayeem Rahman 14e7e1e3af
fix: Resolve makeTemp* paths from CWD (#4104) 2020-02-25 09:23:23 -05:00
Ryan Dahl 91b606aaae
Clean up how we use opIds (#4118) 2020-02-25 09:14:27 -05:00
Kitson Kelly 2b7e28b591
feat: Add Deno.formatDiagnostics (#4032) 2020-02-24 14:48:14 -05:00
ecyrbe fb08cf7005
Add missing node os.release() implementation (#4065) 2020-02-24 08:35:45 -05:00