@atproto/lex 0.6.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/README.md +15 -0
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @atproto/lex
|
|
2
2
|
|
|
3
|
+
## 0.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#6020](https://github.com/bluesky-social/atproto/pull/6020) [`58ca16d`](https://github.com/bluesky-social/atproto/commit/58ca16d32ccb50b30e1d4c800c6263af7511a4ff) Thanks [@matthieusieben](https://github.com/matthieusieben)! - **Breaking:** `applyDefaults`, `asUint8ArrayArrayBuffer`, `canParseUrl`, `isAsyncIterable`, `isBlobLike`, `toReadableStream`, `toReadableStreamPonyfill`, `trim`, `wait` and the `WithDefaults` type are no longer exported from `@atproto/lex-rpc`, nor re-exported from `@atproto/lex-client` and `@atproto/lex`.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- [#6019](https://github.com/bluesky-social/atproto/pull/6019) [`315aba7`](https://github.com/bluesky-social/atproto/commit/315aba7d157f2e7376b56e927e9bc088a3a622c1) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Add a `redirect` option to XRPC requests and to the `Client` constructor, setting the redirect mode passed to `fetch()` (still `"follow"` by default).
|
|
12
|
+
- Updated dependencies [[`315aba7`](https://github.com/bluesky-social/atproto/commit/315aba7d157f2e7376b56e927e9bc088a3a622c1), [`58ca16d`](https://github.com/bluesky-social/atproto/commit/58ca16d32ccb50b30e1d4c800c6263af7511a4ff), [`315aba7`](https://github.com/bluesky-social/atproto/commit/315aba7d157f2e7376b56e927e9bc088a3a622c1), [`2ed73cc`](https://github.com/bluesky-social/atproto/commit/2ed73cc657769447d2617f1c3642b06f69b69dc5), [`58ca16d`](https://github.com/bluesky-social/atproto/commit/58ca16d32ccb50b30e1d4c800c6263af7511a4ff)]:
|
|
13
|
+
- @atproto/lex-rpc@0.3.0
|
|
14
|
+
- @atproto/lex-client@0.7.0
|
|
15
|
+
- @atproto/lex-schema@0.3.2
|
|
16
|
+
- @atproto/lex-installer@0.2.13
|
|
17
|
+
- @atproto/lex-builder@0.1.23
|
|
18
|
+
|
|
19
|
+
## 0.6.2
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies [[`9901412`](https://github.com/bluesky-social/atproto/commit/9901412468741c11399c130a39aa44bc7dd06cb8)]:
|
|
24
|
+
- @atproto/lex-json@0.1.11
|
|
25
|
+
- @atproto/lex-client@0.6.2
|
|
26
|
+
- @atproto/lex-rpc@0.2.2
|
|
27
|
+
- @atproto/lex-installer@0.2.12
|
|
28
|
+
|
|
3
29
|
## 0.6.1
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -762,6 +762,21 @@ const client = new Client(session, {
|
|
|
762
762
|
- **`validateResponse`** — When `true`, incoming response bodies are validated against the Lexicon output schema. Disabling this can improve performance when you trust the upstream service. Default: `true`.
|
|
763
763
|
- **`strictResponseProcessing`** — When `true` (default), the client will strictly process responses according to Lex encoding rules, rejecting responses containing invalid Lex data (e.g. floating-point numbers, malformed `$bytes` or `$link` objects). When `false`, the client accepts such responses in a lenient mode: invalid values are returned as-is rather than being rejected or converted, `datetime` string format checks become more lenient (e.g. datetimes without timezones are accepted) while other string formats remain strict, blob MIME type and size constraints are not enforced, and legacy blob reference format (objects with `cid` and `mimeType` properties) is accepted. Default: `true`.
|
|
764
764
|
|
|
765
|
+
#### Redirects
|
|
766
|
+
|
|
767
|
+
Requests follow redirects by default. The `redirect` option sets the [redirect mode](https://developer.mozilla.org/en-US/docs/Web/API/RequestInit#redirect) passed to `fetch()`, for all of the client's requests or (as with `xrpc()`) for a single call. This is typically needed when talking to untrusted services through an SSRF-protected `fetch`:
|
|
768
|
+
|
|
769
|
+
```typescript
|
|
770
|
+
const client = new Client(
|
|
771
|
+
{ service: 'https://pds.example.com', fetch: safeFetch },
|
|
772
|
+
{ redirect: 'error' },
|
|
773
|
+
)
|
|
774
|
+
```
|
|
775
|
+
|
|
776
|
+
- **`"follow"`** (default) — Redirects are followed by `fetch()`.
|
|
777
|
+
- **`"error"`** — A redirect makes the request fail with an `XrpcFetchError`.
|
|
778
|
+
- **`"manual"`** — A redirect makes the request fail with an `XrpcInvalidResponseError`, whose `response` is the unfollowed redirect response (an opaque response with status `0` in browsers).
|
|
779
|
+
|
|
765
780
|
### Core Methods
|
|
766
781
|
|
|
767
782
|
#### `client.call()`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atproto/lex",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Lexicon tooling for AT",
|
|
6
6
|
"keywords": [
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
"node": ">=22"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@atproto/lex-builder": "^0.1.
|
|
39
|
+
"@atproto/lex-builder": "^0.1.23",
|
|
40
40
|
"@atproto/lex-cbor": "^0.1.11",
|
|
41
|
-
"@atproto/lex-client": "^0.
|
|
41
|
+
"@atproto/lex-client": "^0.7.0",
|
|
42
42
|
"@atproto/lex-data": "^0.1.11",
|
|
43
|
-
"@atproto/lex-json": "^0.1.
|
|
44
|
-
"@atproto/lex-installer": "^0.2.
|
|
45
|
-
"@atproto/lex-rpc": "^0.
|
|
46
|
-
"@atproto/lex-schema": "^0.3.
|
|
43
|
+
"@atproto/lex-json": "^0.1.11",
|
|
44
|
+
"@atproto/lex-installer": "^0.2.13",
|
|
45
|
+
"@atproto/lex-rpc": "^0.3.0",
|
|
46
|
+
"@atproto/lex-schema": "^0.3.2",
|
|
47
47
|
"tslib": "^2.8.1",
|
|
48
48
|
"yargs": "^18.2.0"
|
|
49
49
|
},
|