1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-01 09:24:20 -04:00
Commit graph

59 commits

Author SHA1 Message Date
Ryan Dahl
3c8d2bde68
Support request method and headers in fetch() (#1188)
Adds a general HttpHeader flatbuffer message for serializing requests
and responses.
2018-11-14 17:36:34 -08:00
Ryan Dahl
b1579460ce Support streaming response bodies from fetch()
Also Buffer.readFrom in fetch() to buffer response.
2018-11-13 21:44:38 -08:00
Andy Hayden
13e1eb2b87 Fix many of the clippy::pedantic warnings 2018-11-06 06:43:02 -08:00
Andy Hayden
27ecfc1617 Add repl (#998)
- Running repl from js side.
- Add tests for repl behavior.
- Handle ctrl-C and ctrl-D.
2018-11-05 09:55:59 -08:00
Ryan Dahl
ee24254bad Rename EnvPair to KeyValue. 2018-11-02 20:50:01 -07:00
Ryan Dahl
80b5c61460 Rename FetchReq op to Fetch. 2018-10-30 17:42:19 -07:00
Bartek Iwańczuk
946acbc559 Add resources op (#1119) 2018-10-30 12:58:55 -07:00
Kitson Kelly
8b39d2c99e Separate source map from output code. 2018-10-29 08:16:35 -07:00
Kevin (Kun) "Kassimo" Qian
a99aaf5def Add chmod/chmodSync on unix (and fix Cargo.toml) (#1088)
Initial implementation by Srijan Reddy (@srijanreddy98, #672).
2018-10-26 13:01:45 -07:00
Kitson Kelly
8ef7da2611 Enforce media types 2018-10-23 04:48:00 -07:00
Jinho Bang
1322f3de9f deno -v should report typescript version
Fixes #993
2018-10-15 22:16:55 -04:00
Shiva Prasanth
bbf88c5295 Add cwd() and chdir() (#907) 2018-10-13 16:03:27 -04:00
Kitson Kelly
298d755152 Add support for --types 2018-10-11 20:29:43 -04:00
Bartek Iwańczuk
51f9331ecb Add deno.metrics() 2018-10-11 15:45:51 -04:00
J2P
7cc9b64ff7 Rename BadFileDescriptor 2018-10-10 12:21:01 -04:00
Kevin (Kun) "Kassimo" Qian
941e27d8c1 Implement closeRead/closeWrite using TcpStream::shutdown (#903) 2018-10-05 12:16:23 -04:00
Ryan Dahl
f774953011 Rename flatbuffer base.msg to base.inner
This better disambiguates with the msg_generated.ts module, which in JS
we call "fbs", but would be better called "msg".
2018-10-04 00:25:55 -04:00
Ryan Dahl
0422b224e8
First pass at support for TCP servers and clients. (#884)
Adds deno.listen(), deno.dial(), deno.Listener and deno.Conn.
2018-10-03 23:58:29 -04:00
J2P
ea87034e26 Implemented readDirSync, readDir 2018-10-03 18:22:57 -04:00
Bert Belder
4eeda9ea27
timers: remove the old timer implementation
Fixes #878.
2018-10-03 13:27:59 -07:00
Bert Belder
aa691ea26c
timers: implement timers in javascript 2018-10-03 13:27:55 -07:00
Ryan Dahl
42c5b103ec Rename FdTable to ResourceTable.
Add docs to src/resources.rs.
2018-10-01 22:30:57 -04:00
Kevin (Kun) "Kassimo" Qian
50a9c2b575 Add copyFile/copyFileSync (#863) 2018-09-30 18:06:41 -04:00
Kevin (Kun) "Kassimo" Qian
eceeabdab2 Remove unused table WriteFileSync 2018-09-30 18:05:37 -04:00
ztplz
062b22fe56 Add deno.truncate (#805) 2018-09-30 15:06:20 -04:00
Ryan Dahl
bcbbee7399 Adds basic File I/O and FD table.
Adds deno.stdin, deno.stdout, deno.stderr, deno.open(), deno.write(),
deno.read(), deno.Reader, deno.Writer, deno.copy().

Fixes #721. tests/cat.ts works.
2018-09-28 20:53:33 -04:00
Ryan Dahl
d38ccfc6dc
Support zero-copy data in libdeno.send(). (#838)
This is a large API refactor of deno.h which replaces
deno_send() and deno_set_response() with deno_respond().
It also adds a req_id parameter to the deno_recv_cb.

Make writeFile/writeFileSync use it.
2018-09-27 17:33:10 -04:00
Ryan Dahl
b088b58f76 Add SetGlobalTimeout().
To be used for a timers implementation soon.
2018-09-25 17:02:49 -04:00
Mani Maghsoudlou
ad5065e23e Implement deno.readlink() (#797) 2018-09-25 00:20:49 -04:00
Bartek Iwańczuk
3fe4be07ca Add flag --recompile (#801) 2018-09-24 15:33:50 -04:00
Mani Maghsoudlou
017ef096df Implement deno.symlink() (#742) 2018-09-18 21:38:24 -07:00
Kevin (Kun) "Kassimo" Qian
e3d634eb21 Make mode always u32 and switch to has_mode for StatRes fbs (#761) 2018-09-17 16:53:55 -07:00
qti3e
41c70b154f Add support for fetch() headers (#727) 2018-09-12 15:16:42 -04:00
Mani Maghsoudlou
88d42f0b18 Implement deno.rename() (#731) 2018-09-12 11:44:58 -04:00
Kevin (Kun) "Kassimo" Qian
26081a32df Add unix-only mode for FileInfo (#732) 2018-09-12 10:28:48 -04:00
Kevin (Kun) "Kassimo" Qian
1ffae65165 Add remove(), removeAll().
and removeSync(), removeAllSync().
2018-09-12 10:24:17 -04:00
Sajjad Hashemian
7c50c11f40 Implement deno.stat() and deno.lstat() 2018-09-11 16:05:00 -04:00
Kevin (Kun) "Kassimo" Qian
05f87a0cf2 Move writeFileSync to write_file.ts, add writeFile and tests (#728) 2018-09-11 12:00:57 -04:00
Sajjad Hashemian
c2663e1d82 Implement deno.mkdir() 2018-09-10 15:02:07 -04:00
Ryan Dahl
35bc9ddf63 Implement deno.readFile()
As an example of how to implement ops that have both sync and async
versions.
2018-09-10 00:14:28 -04:00
Ryan Dahl
a4f1b367b9 Remove namespace from src/msg.fbs 2018-09-09 23:12:22 -04:00
Ryan Dahl
0d03fafbfe Map promises onto futures.
Refactors handlers.rs

The idea is that all Deno "ops" (aka bindings) should map onto
a Rust Future. By setting the "sync" flag in the Base message
users can determine if the future is executed immediately or put
on the event loop.

In the case of async futures, a promise is automatically created.
Errors are automatically forwarded and raised.

TODO:

- The file system ops in src/handler.rs are not using the thread pool
  yet. This will be done in the future using tokio_threadpool::blocking.
  That is, if you try to call them asynchronously, you will get a promise
  and it will act asynchronous, but currently it will be blocking.
- Handlers in src/handler.rs returned boxed futures. This was to make
  it easy while developing. We should try to remove this allocation.
2018-09-09 18:47:22 -04:00
J2P
3deaf99a92 Format msg.fbs 2018-09-07 20:36:18 -04:00
Mirko Jotic
fcdfacc2de Implementing --deps flag
- Adding a ModuleId type alias to specify original url or local file of
dependency
- Modifying ModuleMetaData class to contain ModuleId
- Adding a --deps flag
2018-09-06 10:42:07 -04:00
Mani Maghsoudlou
641e3d404d Implement renameSync 2018-09-04 11:57:04 -04:00
Sajjad Hashemian
b2b4299e3b Implement mkdirSync 2018-09-03 15:06:00 -04:00
Aaron Power
f131445a46 Implemented deno.env and refactored flags.rs 2018-08-31 13:18:24 -04:00
Aaron Power
b86bf4d8a4 Implemented statSync and lStatSync 2018-08-30 12:39:33 -04:00
Bert Belder
ceaf822682
Implement makeTempDirSync() 2018-08-29 22:40:05 +02:00
Ryan Dahl
e2f9b0e6fd First pass at HTTP imports
Implement --reload

Integrate hyper errors into DenoError

In collaboration with Tommy Savaria <tommy.savaria@protonmail.ch>
2018-08-23 09:41:08 -04:00