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

66 commits

Author SHA1 Message Date
Divy Srivastava
c41460ecc4
feat(ext/crypto): import RSA pkcs#8 keys (#11891) 2021-09-14 15:21:20 +02:00
Andreu Botella
4d6f412b0b
refactor(core): Turn the wasm_streaming_feed binding into ops (#11985)
Async WebAssembly compilation was implemented by adding two
bindings: `set_wasm_streaming_callback`, which registered a callback to
be called whenever a streaming wasm compilation was started, and
`wasm_streaming_feed`, which let the JS callback modify the state of the
v8 wasm compiler.

`set_wasm_streaming_callback` cannot currently be implemented as
anything other than a binding, but `wasm_streaming_feed` does not really
need to use anything specific to bindings, and could indeed be
implemented as one or more ops. This PR does that, resulting in a
simplification of the relevant code.

There are three operations on the state of the v8 wasm compiler that
`wasm_streaming_feed` allowed: feeding new bytes into the compiler,
letting it know that there are no more bytes coming from the network,
and aborting the compilation. This PR provides `op_wasm_streaming_feed`
to feed new bytes into the compiler, and `op_wasm_streaming_abort` to
abort the compilation. It doesn't provide an op to let v8 know that the
response is finished, but closing the resource with `Deno.core.close()`
will achieve that.
2021-09-13 14:27:54 +02:00
Luca Casonato
d0b5ff6db9
feat(ext/crypto): generate ECDH keys (#11870)
Add support for ECDH algorithm in SubtleCrypto#generateKey.
2021-09-13 11:35:49 +02:00
Divy Srivastava
2199bdaf64
feat(ext/crypto): export RSA keys as pkcs#8 (#11880) 2021-09-13 11:33:28 +02:00
Nayeem Rahman
2cc1577d28
fix(ext/fetch): Properly cancel upload stream when aborting (#11966)
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
2021-09-13 01:19:38 +02:00
Divy Srivastava
0520ae62dd
fix(ext/crypto): add HkdfParams and Pkdf2Params types (#11991) 2021-09-12 23:02:49 +02:00
Feng Yu
464dcc1388
fix: FileReader onevent attributes don't conform to spec (#11908) 2021-09-12 09:35:05 -04:00
Divy Srivastava
0cb22d4cba
feat(ext/crypto): implement HKDF operations (#11865)
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
2021-09-11 16:54:03 -04:00
Divy Srivastava
40c63d1255
feat(ext/crypto): verify ECDSA signatures (#11739) 2021-09-11 16:49:53 -04:00
Bartek Iwańczuk
ba8bbe6f1c
refactor: use Deno.core.tryClose (#11980) 2021-09-11 02:54:37 +02:00
Bert Belder
fa963909e5
perf(ext/http): optimize auto cleanup of request resource (#11978)
Fixes #11963.
2021-09-10 15:47:09 -07:00
Nayeem Rahman
d947629292
fix(ext/web): Preserve stack traces for DOMExceptions (#11959) 2021-09-08 23:14:26 +02:00
Bartek Iwańczuk
b31dad89a6
chore: add README to ext/http/ (#11958) 2021-09-08 20:48:28 +02:00
Bartek Iwańczuk
85e316bd6b
chore: release deno_http 0.8.0 (#11956) 2021-09-08 19:32:19 +02:00
Andreu Botella
1563088f06
fix: a Request whose URL is a revoked blob URL should still fetch (#11947)
In the spec, a URL record has an associated "blob URL entry", which for
`blob:` URLs is populated during parsing to contain a reference to the
`Blob` object that backs that object URL. It is this blob URL entry that
the `fetch` API uses to resolve an object URL.

Therefore, since the `Request` constructor parses URL inputs, it will
have an associated blob URL entry which will be used when fetching, even
if the object URL has been revoked since the construction of the
`Request` object. (The `Request` constructor takes the URL as a string
and parses it, so the object URL must be live at the time it is called.)

This PR adds a new `blobFromObjectUrl` JS function (backed by a new
`op_blob_from_object_url` op) that, if the URL is a valid object URL,
returns a new `Blob` object whose parts are references to the same Rust
`BlobPart`s used by the original `Blob` object. It uses this function to
add a new `blobUrlEntry` field to inner requests, which will be `null`
or such a `Blob`, and then uses `Blob.prototype.stream()` as the
response's body. As a result of this, the `blob:` URL resolution from
`op_fetch` is now useless, and has been removed.
2021-09-08 11:29:21 +02:00
Luca Casonato
e07f28d301
feat: add URLPattern API (#11941)
This adds support for the URLPattern  API.

The API is added in --unstable only, as it has not yet shipped in any
browser. It is targeted for shipping in Chrome 95.

Spec: https://wicg.github.io/urlpattern/

Co-authored-by: crowlKats < crowlkats@toaxl.com >
2021-09-08 11:14:29 +02:00
Bartek Iwańczuk
2de5587547
fix(ext/http): resource leak if request body is not consumed (#11955) 2021-09-08 10:12:23 +02:00
Yoshiya Hinosawa
3925435bf9
docs(ext/net): add note about listening 0.0.0.0 (#11938)
Co-authored-by: Craig Morten <cmorten@users.noreply.github.com>
2021-09-07 16:26:21 +09:00
David Sherret
987716798f
feat(fmt): add basic JS doc formatting (#11902) 2021-09-02 18:28:12 -04:00
Luca Casonato
1bf7b90ca8
chore: update dependencies (#11856)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-09-02 23:38:44 +02:00
Luca Casonato
cee5be4539
feat(ext/crypto): AES key generation (#11869)
Support AES-CTR, AES-CBC, AES-GCM, and AES-KW in
SubtleCrypto#generateKey.
2021-08-31 11:25:44 +02:00
Luca Casonato
fcd0992dba
fix: move unstable declarations to deno.unstable (#11876) 2021-08-31 11:25:15 +02:00
Divy Srivastava
5ee2110179
feat(ext/crypto): support JWK export for HMAC (#11864) 2021-08-29 14:23:51 +02:00
Divy Srivastava
1f57cd2c0f
feat(ext/crypto): support JWK import for HMAC (#11716) 2021-08-27 13:19:41 +02:00
Divy Srivastava
23a9bc099d
feat(ext/crypto): implement importKey and deriveBits for PBKDF2 (#11642) 2021-08-26 12:48:07 +02:00
Sean Michael Wykes
dccf4cbe36
feat(fetch): mTLS client certificates for fetch() (#11721)
This commit adds support for specifying client certificates when using fetch, by means of `Deno.createHttpClient`.
2021-08-25 14:25:12 +02:00
Luca Casonato
5d814a4c24
feat: ArrayBuffer in structured clone transfer (#11840) 2021-08-25 13:48:53 +02:00
Dayan C. Galiazzi
873cce27b8
fix(ext/http): websocket upgrade header check (#11830) 2021-08-25 00:55:32 +02:00
Divy Srivastava
85a56e7144
feat(ext/crypto): implement encrypt, decrypt & generateKey for RSA-OAEP (#11654) 2021-08-24 21:59:02 +02:00
Luca Casonato
4853be20f2
refactor(webgpu): use op interface idiomatically (#11835) 2021-08-24 20:32:25 +02:00
Nicolas Stucki
c4561ac969
feat(extensions/console): right align numeric columns in table (#11748) 2021-08-24 17:17:40 +02:00
Divy Srivastava
46e4ba38b2
fix(ext/crypto): KeyAlgorithm typings for supported algorithms (#11738) 2021-08-24 15:15:25 +02:00
Nayeem Rahman
1b7848c4a9
feat(unstable): Support file URLs in Deno.dlopen() (#11658) 2021-08-24 15:09:00 +02:00
Leo K
f4a9db350f
chore(ext/webgpu): update wgpu to 0.10.0 (#11781)
Co-authored-by: Luca Casonato <hello@lcas.dev>
2021-08-24 13:29:42 +02:00
Luca Casonato
50f69a6996
fix: FileReader.readAsText compat (#11814)
Fixes a WPT test.
2021-08-24 13:13:22 +02:00
David Sherret
6db8cbb650
chore: release crates for 1.13.2 (#11820) 2021-08-23 15:48:08 -04:00
Luca Casonato
df084b9f14
fix(ext/ffi): don't panic on invalid enum values (#11815)
Co-authored-by: Feng Yu <f3n67u@gmail.com>
2021-08-23 18:31:19 +02:00
Bartek Iwańczuk
2187c11e5d
fix(ext/http): resource leak on HttpConn.close() (#11805)
This commit adds tracking of resources that are related
to "HttpConn" so they can be closed automatically
when closing the connection.
2021-08-23 16:15:59 +02:00
Feng Yu
856884b2df
fix(ext/crypto): remove duplicate Algorithm interface defination (#11807) 2021-08-23 13:54:39 +10:00
Feng Yu
6f63d739ab
fiz(ext/fetch): Headers constructor error message (#11778) 2021-08-21 05:07:30 +02:00
Yusuke Tanaka
4ae57d185e
chore: upgrade dlint and run prefer-primordials rule (#11777) 2021-08-20 01:14:20 +02:00
Aaron O'Mullan
91051047cc
perf(ext/url): use DOMString instead of USVString as webidl converter for URL parsing (#11775)
A 20% decrease in url parsing:
- before: `~2450ns/parse`
- after: `~1950ns/parse`
2021-08-19 17:36:14 +02:00
Aaron O'Mullan
37c983d1e8
perf(ext/url): optimize UrlParts op serialization (#11765) 2021-08-19 13:41:47 +02:00
Aaron O'Mullan
bf0bacbc0e
perf(ext/url): cleanup and optimize url parsing op args (#11763)
This splits the previous `op_url_parse` into:
- `op_url_parse`: parses a href with an optional base
- `op_url_reparse`: reparses a href with a modifier

This is a cleaner separation of concerns and it allows us to optimize & simplify args passed. Resulting in a 25% reduction in call overhead (~5000ns/call => ~3700ns/call in url_ops bench on my M1 Air)
2021-08-18 23:21:33 +02:00
Divy Srivastava
af97535b7c
fix(ext/crypto): exportKey() for HMAC (#11737)
Fixes typings and innerKey processing (WPT doesn't test 
exportKey for HMAC so this wasn't caught earlier).
2021-08-17 11:29:32 +02:00
David Sherret
a66a7bebbe
chore: release crates for 1.13.1 (#11729) 2021-08-16 16:49:14 -04:00
Ben Noordhuis
6ced7b0383 fix(ext/fetch): better error if no content-type
The streaming WASM support code inspects the Response object's
Content-Type header but if that was missing, it failed with a fairly
inscrutable "String.prototype.toLowerCase called on null or undefined"
exception. Now it raises a more legible "Invalid WebAssembly content
type" exception.
2021-08-16 19:45:37 +02:00
Ben Noordhuis
6ddabb7427 fix(ext/fetch): don't use global Deno object
Don't use `Deno.core`, it's not present in embedders that don't expose
the Deno global object.
2021-08-16 19:45:37 +02:00
Divy Srivastava
eea6f578fc
fix(ext/crypto): enable non-extractable keys (#11705) 2021-08-16 18:11:36 +02:00
Andreu Botella
ddbb7b83f2
feat(runtime): support classic workers for internal testing (#11338)
This commit implements classic workers, but only when the `--enable-testing-features-do-not-use` flag is provided. This change is not user facing. Classic workers are used extensively in WPT tests. The classic workers do not support loading from disk, and do not support TypeScript.

Co-authored-by: Luca Casonato <hello@lcas.dev>
2021-08-16 14:29:54 +02:00