353 Commits

Author SHA1 Message Date
Zeb
d10c6b9fe1 wip debug alloc 2024-11-15 08:59:57 -05:00
github-actions[bot]
636d76047f
chore: bump versions (#650)
Co-authored-by: kflansburg <6134007+kflansburg@users.noreply.github.com>
2024-10-10 20:44:08 -04:00
Marc Mettke
b5de9b534a
Adding host_metadata to Cloudflare Request Data (#348)
* Adding host_metadata to Cloudflare Request Data

* Update incoming_request_cf_properties.rs

Make `host_metadata` method `catch`

* Update cf.rs

---------

Co-authored-by: Kevin Flansburg <kflansburg@cloudflare.com>
Co-authored-by: Kevin Flansburg <kevin.flansburg@gmail.com>
2024-10-10 20:06:18 -04:00
github-actions[bot]
c81a753dc7
chore: bump versions (#642)
Co-authored-by: kflansburg <6134007+kflansburg@users.noreply.github.com>
2024-09-26 08:24:41 -04:00
Kevin Flansburg
9fc2fbd0f3
Implement Rate Limiter Binding (#603)
* Implement Rate Limiter binding

* Make success field public
2024-09-26 08:10:55 -04:00
github-actions[bot]
af6ee9a99c
chore: bump versions (#637)
Co-authored-by: kflansburg <6134007+kflansburg@users.noreply.github.com>
2024-09-13 15:37:08 -04:00
Thibault
535e103974
[worker] Add FormData conversion into JsValue (#634)
This allows FormData to be constructed and passed as JsValue later on.
For instance, `RequestInit::new().with_body(Some(formdata.into()))`
2024-09-12 15:09:50 -04:00
nakamura shuta
5100f4e5d5
Implement get_all function to return non-folding set-cookie headers (#597)
* Add `get_all` function. (#423)

* Implement get_all using wasm-bindgen

* Refactor Headers get_all method and improve error handling

- Update HeadersExt trait to return js_sys::Array directly
- Modify Headers::get_all to handle potential invalid values
- Adjust import order in ext.rs for consistency

* Included in glue module along with other modules
2024-09-02 06:28:15 -04:00
Oliver Evans
d0d33183fb
Fix typos in CORS argument names (#629) 2024-08-30 16:08:08 +01:00
Michael Goulet
51e1feb77e
Relax type of callback arguments to Router methods (#605) 2024-08-27 14:25:44 +01:00
Lane Kolbly
ba9c868309
Make R2 Object::size return u64 (#625)
Co-authored-by: Lane Kolbly <lkolbly@cloudflare.com>
2024-08-27 08:59:18 +01:00
github-actions[bot]
aaf5c672c0
chore: bump versions (#622)
Co-authored-by: kflansburg <6134007+kflansburg@users.noreply.github.com>
2024-08-19 11:29:49 -04:00
Kevin Flansburg
c7e966cf2b
Remove HeaderExt and AbortSignalExt (#621)
* Remove HeaderExt

Closes #617

* Fix deprecation warnings

* feature
2024-08-19 11:15:05 -04:00
github-actions[bot]
6a5bfc1c8d
chore: bump versions (#615)
Co-authored-by: kflansburg <6134007+kflansburg@users.noreply.github.com>
2024-08-06 15:41:52 -04:00
Noah Kennedy
1e8183a38b
durable: add location hint support (#614) 2024-08-06 14:35:42 -04:00
github-actions[bot]
488e1b7b45
chore: bump versions (#611)
Co-authored-by: kflansburg <6134007+kflansburg@users.noreply.github.com>
2024-08-02 13:15:22 -04:00
Mendes
b243b3ebbd
Fix broken durable object jurisdiction link (#610) 2024-08-02 11:36:35 -04:00
Gonçalo
bd2a034f59
Publicly expose VersionMetadataBinding (#606)
Co-authored-by: GoncaloGarcia <ggarcia@cloudflare.com>
2024-07-31 12:58:00 -04:00
Gonçalo
87dd6b4ea5
clippy for 1.80 (#607)
Co-authored-by: Kevin Flansburg <kflansburg@cloudflare.com>
2024-07-31 11:36:49 -04:00
github-actions[bot]
59e551edca
chore: bump versions (#602)
Co-authored-by: kflansburg <6134007+kflansburg@users.noreply.github.com>
2024-07-25 11:26:09 -04:00
Gonçalo
611ac9368d
Add support for Version Metadata Binding (#598)
* Add support for Version Metadata Binding

Allows users to fetch the version metadata fron the worker environment. This is useful when using Gradual Deployments.

* Add timestamp field to version object

---------

Co-authored-by: GoncaloGarcia <ggarcia@cloudflare.com>
2024-07-23 12:54:36 -04:00
Fisher Darling
80d1c6ca33
Support sha256 cert fingerprints in TlsClientAuth (#601)
This adds support for getting a client sha256 fingerprint.
2024-07-23 12:24:34 -04:00
伊欧
d0a40f1bac
Add a binding to meta object for D1Result. (#591)
* fix: Add a binding to meta object for `D1Result`.

* Fix typo.
2024-07-05 11:39:53 -04:00
Ramnivas Laddad
c577e4c0ec
Expose Hyperdrive from the worker crate (#584)
This allows users to pass around the instance of `Hyperdrive`.
2024-06-07 15:12:46 -05:00
Supachai Kheawjuy
078d15bb60
chore: typo response in response.rs (#581) 2024-05-22 16:37:42 -04:00
Kevin Flansburg
235bffa7ed Fix missing error behind feature flag 2024-05-19 10:01:35 -04:00
github-actions[bot]
8a52472e55
chore: bump versions (#579)
Co-authored-by: kflansburg <6134007+kflansburg@users.noreply.github.com>
2024-05-19 08:58:32 -04:00
Kevin Flansburg
bfe6d566ab
Add encodeBody and cf to ResponseInit. Adopt builder pattern. (#568)
* Add `encodeBody` and `cf` to ResponseInit. Adopt builder pattern.

Closes #567

* Refine builder pattern

* address comments

* Response.clone, test, http extensions

* Do not check content-type in Response.json

Closes #577
2024-05-19 08:33:57 -04:00
Kevin Flansburg
6bf6cf7e30
Use u64 for R2 range requests (#564)
* Use u64 for R2 range requests

Closes #560

* address comment

* Clarify  options
2024-05-19 08:24:34 -04:00
Kian
64f1e9c6b3
Add MSRV to worker crate (#570) 2024-05-07 08:53:34 -04:00
Alexander van Saase
a2b50b728d
Hyperdrive binding (#566)
* Starting to add hyperdrive binding

* Add Hyperdrive getters

* Expose getters from worker crate
2024-05-03 16:58:28 -04:00
Alexander van Saase
53b2ebc3ae
Implement Send, Sync and Clone for some Durable Object types (#563) 2024-05-03 16:58:14 -04:00
Kevin Flansburg
abbcb00bc9
Fix clippy lints (#565) 2024-05-03 11:55:48 -04:00
David Komer
3945ae6c16
Rust-friendly DigestStream API (#529)
* Rust-friendly DigestStream API

* Fixes #383

* refactor DigestStream

* move comment back

* delete examples yarn.lock

* Update worker/src/crypto.rs

Co-authored-by: Kevin Flansburg <kevin.flansburg@gmail.com>

* fix SendFuture syntax

* upgrade example deps

* remove allow dead code

---------

Co-authored-by: Kevin Flansburg <kevin.flansburg@gmail.com>
2024-04-30 12:26:49 -04:00
github-actions[bot]
8454d87844
chore: bump versions (#558)
Co-authored-by: kflansburg <6134007+kflansburg@users.noreply.github.com>
2024-04-28 19:37:49 -04:00
Loch Wansbrough
c6c83bb89a
feat: Allow instantiating an UploadPart from its constituent parts (#552)
* feat: Allow instantiating an UploadPart from its constituent parts

* fix: Drop promises

* fix for reflect calls. tested and working.

* cargo fmt

---------

Co-authored-by: Kevin Flansburg <kevin.flansburg@gmail.com>
2024-04-28 18:52:10 -04:00
Kevin Flansburg
f3eb1eb535
Experimental RPC Support (#551)
* Prototyping

* rpc client example

* Prototype WIT codegen

* Documentation

* Final tweaks
2024-04-28 18:44:12 -04:00
Kevin Flansburg
36b646cd62
Allow returning any error that implements std::error::Error (#527)
* IntoResponse and FromRequest return Result

* Generic error return types

* Fix example
2024-04-28 18:37:50 -04:00
David Komer
0a94def73f
WorkerRequest/WorkerResponse traits (#530)
* http traits

* WorkerRequest
* WorkerResponse

* delete comment block

* consolidate macro

* FromRequest / IntoResponse

* and a bit of cleanup to clarify previous naming conflict of WorkerResponse

* more generic IntoResponse impl
2024-04-28 09:25:06 -04:00
Jasper Bekkers
c76fdc485c
🎏 Add ReadableStream to Data (#548) 2024-04-15 15:23:19 -04:00
Jasper Bekkers
76c0c22250
🤽 worker-sys Make all methods catch (#546)
* Replace mechanically all wasm_bindgen(method) and return types

Return types find:

pub fn(.*)-> (?!Result)(.*);

Replace:
pub fn$1-> Result<$2, JsValue>

* Manual fixups

* Cleanup call-sites

* clippy lints
2024-04-14 09:54:41 -04:00
Jasper Bekkers
21cb563c51
💡 Expose uploadId for multipart uploads (#542) 2024-04-10 08:46:06 -04:00
Alexander van Saase
d4df3f65fa
Bump worker-kv depedency, use path dependency for local development (#540) 2024-04-08 10:03:43 -04:00
Kevin Flansburg
e9f5810418
Fix axum feature (#538) 2024-04-04 15:32:32 -04:00
github-actions[bot]
449a16e36d
chore: bump versions (#535)
Co-authored-by: kflansburg <6134007+kflansburg@users.noreply.github.com>
2024-04-04 14:39:30 -04:00
Kevin Flansburg
2e26b3d08a
Introduce axum feature (#534) 2024-04-04 08:12:30 -04:00
Kevin Flansburg
1428322d34
Fix issue with data corruption in web_sys::WebSocket (#523)
* Apply patch to avoid websocket data corruption in web_sys

* Comment
2024-04-04 07:55:31 -04:00
David Komer
50230a5a87
d1 js array optimization (#522)
very small improvement...
on the JS side it already knows the capacity of the Vec
so to_vec() may be slightly more efficient than iterating/collecting
2024-04-01 11:12:42 -04:00
Kevin Flansburg
7fecf35365
Add socket tests (#518)
* Add socket tests

* Fix d1 error again :/
2024-04-01 11:00:57 -04:00
David Komer
4228f28f6c
Expose D1 Statements JsValue API (#521)
* raw_js_value(): like raw(), but returns a Vec of JsValues
* inner(): return the inner JsValue version of the prepared statement
2024-04-01 09:10:10 -04:00