From a1d8c77edd16c8d1658bb49426cbdfca1663457c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 27 Aug 2024 14:03:39 -0400 Subject: [PATCH] Version packages (#2738) Co-authored-by: github-actions[bot] --- .changeset/chilled-jokes-relax.md | 7 - .changeset/cool-toes-rescue.md | 5 - .changeset/curvy-lemons-cross.md | 5 - .changeset/early-rivers-occur.md | 5 - .changeset/fluffy-apples-do.md | 5 - .changeset/gentle-horses-listen.md | 5 - .changeset/green-bags-flash.md | 5 - .changeset/healthy-bottles-hear.md | 5 - .changeset/hungry-parrots-study.md | 5 - .changeset/lemon-mice-rule.md | 6 - .changeset/light-dingos-dream.md | 5 - .changeset/many-bikes-poke.md | 5 - .changeset/nine-deers-count.md | 5 - .changeset/ninety-ants-collect.md | 5 - .changeset/odd-spies-boil.md | 5 - .changeset/old-mice-give.md | 6 - .changeset/orange-geese-punch.md | 5 - .changeset/plenty-turtles-shop.md | 6 - .changeset/polite-humans-sleep.md | 6 - .changeset/polite-peaches-repair.md | 5 - .changeset/polite-toys-happen.md | 5 - .changeset/poor-socks-sniff.md | 5 - .changeset/short-llamas-rescue.md | 5 - .changeset/short-toes-battle.md | 12 -- .changeset/six-ties-arrive.md | 5 - .changeset/smart-drinks-repeat.md | 5 - .changeset/smart-gifts-itch.md | 5 - .changeset/smooth-houses-hope.md | 5 - .changeset/tame-elephants-unite.md | 5 - .changeset/tasty-dingos-design.md | 5 - .changeset/thin-cycles-live.md | 5 - .changeset/tidy-cars-thank.md | 5 - .changeset/twelve-years-speak.md | 5 - .changeset/wet-radios-fry.md | 5 - packages/api/CHANGELOG.md | 17 ++ packages/api/package.json | 2 +- packages/aws/CHANGELOG.md | 8 + packages/aws/package.json | 2 +- packages/bsky/CHANGELOG.md | 13 ++ packages/bsky/package.json | 2 +- packages/crypto/CHANGELOG.md | 6 + packages/crypto/package.json | 2 +- packages/dev-env/CHANGELOG.md | 13 ++ packages/dev-env/package.json | 2 +- packages/identity/CHANGELOG.md | 7 + packages/identity/package.json | 2 +- .../oauth/oauth-client-browser/CHANGELOG.md | 18 ++ .../oauth/oauth-client-browser/package.json | 2 +- packages/oauth/oauth-client-node/CHANGELOG.md | 20 ++ packages/oauth/oauth-client-node/package.json | 2 +- packages/oauth/oauth-client/CHANGELOG.md | 32 +++ packages/oauth/oauth-client/package.json | 2 +- packages/oauth/oauth-provider/CHANGELOG.md | 29 +++ packages/oauth/oauth-provider/package.json | 2 +- packages/oauth/oauth-types/CHANGELOG.md | 10 + packages/oauth/oauth-types/package.json | 2 +- packages/ozone/CHANGELOG.md | 11 + packages/ozone/package.json | 2 +- packages/pds/CHANGELOG.md | 24 +++ packages/pds/package.json | 2 +- packages/repo/CHANGELOG.md | 7 + packages/repo/package.json | 2 +- packages/xrpc-server/CHANGELOG.md | 12 ++ packages/xrpc-server/package.json | 2 +- packages/xrpc/CHANGELOG.md | 190 +++++++++--------- packages/xrpc/package.json | 2 +- 66 files changed, 343 insertions(+), 289 deletions(-) delete mode 100644 .changeset/chilled-jokes-relax.md delete mode 100644 .changeset/cool-toes-rescue.md delete mode 100644 .changeset/curvy-lemons-cross.md delete mode 100644 .changeset/early-rivers-occur.md delete mode 100644 .changeset/fluffy-apples-do.md delete mode 100644 .changeset/gentle-horses-listen.md delete mode 100644 .changeset/green-bags-flash.md delete mode 100644 .changeset/healthy-bottles-hear.md delete mode 100644 .changeset/hungry-parrots-study.md delete mode 100644 .changeset/lemon-mice-rule.md delete mode 100644 .changeset/light-dingos-dream.md delete mode 100644 .changeset/many-bikes-poke.md delete mode 100644 .changeset/nine-deers-count.md delete mode 100644 .changeset/ninety-ants-collect.md delete mode 100644 .changeset/odd-spies-boil.md delete mode 100644 .changeset/old-mice-give.md delete mode 100644 .changeset/orange-geese-punch.md delete mode 100644 .changeset/plenty-turtles-shop.md delete mode 100644 .changeset/polite-humans-sleep.md delete mode 100644 .changeset/polite-peaches-repair.md delete mode 100644 .changeset/polite-toys-happen.md delete mode 100644 .changeset/poor-socks-sniff.md delete mode 100644 .changeset/short-llamas-rescue.md delete mode 100644 .changeset/short-toes-battle.md delete mode 100644 .changeset/six-ties-arrive.md delete mode 100644 .changeset/smart-drinks-repeat.md delete mode 100644 .changeset/smart-gifts-itch.md delete mode 100644 .changeset/smooth-houses-hope.md delete mode 100644 .changeset/tame-elephants-unite.md delete mode 100644 .changeset/tasty-dingos-design.md delete mode 100644 .changeset/thin-cycles-live.md delete mode 100644 .changeset/tidy-cars-thank.md delete mode 100644 .changeset/twelve-years-speak.md delete mode 100644 .changeset/wet-radios-fry.md diff --git a/.changeset/chilled-jokes-relax.md b/.changeset/chilled-jokes-relax.md deleted file mode 100644 index eb6f6888e1b..00000000000 --- a/.changeset/chilled-jokes-relax.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@atproto/oauth-client-browser": minor -"@atproto/oauth-client-node": minor -"@atproto/oauth-client": minor ---- - -The `OAuthClient` (and runtime specific sub-classes) no longer return @atproto/api `Agent` instances. Instead, they return `OAuthSession` instances that can be used to instantiate the `Agent` class. diff --git a/.changeset/cool-toes-rescue.md b/.changeset/cool-toes-rescue.md deleted file mode 100644 index 19ab036705c..00000000000 --- a/.changeset/cool-toes-rescue.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@atproto/oauth-provider": patch ---- - -Display requested scopes during the auth flow diff --git a/.changeset/curvy-lemons-cross.md b/.changeset/curvy-lemons-cross.md deleted file mode 100644 index c50b46d5c7d..00000000000 --- a/.changeset/curvy-lemons-cross.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@atproto/xrpc-server": patch ---- - -Add `iat` claim to service JWTs diff --git a/.changeset/early-rivers-occur.md b/.changeset/early-rivers-occur.md deleted file mode 100644 index b32e0dc7497..00000000000 --- a/.changeset/early-rivers-occur.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@atproto/oauth-client-node": patch ---- - -Remove un-necessary dev dependency diff --git a/.changeset/fluffy-apples-do.md b/.changeset/fluffy-apples-do.md deleted file mode 100644 index 22747fe35d8..00000000000 --- a/.changeset/fluffy-apples-do.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@atproto/pds": patch ---- - -Use locally defined authPassthru diff --git a/.changeset/gentle-horses-listen.md b/.changeset/gentle-horses-listen.md deleted file mode 100644 index 65c79ab5498..00000000000 --- a/.changeset/gentle-horses-listen.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@atproto/xrpc-server": patch ---- - -Ensure that service auth JWT headers contain an `alg` claim, and ensure that `typ`, if present, is not an unexpected type (e.g. not an access or DPoP token). diff --git a/.changeset/green-bags-flash.md b/.changeset/green-bags-flash.md deleted file mode 100644 index 2bbc6286710..00000000000 --- a/.changeset/green-bags-flash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@atproto/pds": patch ---- - -Add support for "transition:generic" and "transition:chat.bsky" oauth scopes diff --git a/.changeset/healthy-bottles-hear.md b/.changeset/healthy-bottles-hear.md deleted file mode 100644 index d210a116c98..00000000000 --- a/.changeset/healthy-bottles-hear.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@atproto/oauth-provider": patch ---- - -Generate proper invalid_authorization_details diff --git a/.changeset/hungry-parrots-study.md b/.changeset/hungry-parrots-study.md deleted file mode 100644 index c32a1e7b5fd..00000000000 --- a/.changeset/hungry-parrots-study.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@atproto/xrpc": patch ---- - -Improve handling of fetchHandler errors when turning them into `XrpcError`. diff --git a/.changeset/lemon-mice-rule.md b/.changeset/lemon-mice-rule.md deleted file mode 100644 index 9bff8aa1682..00000000000 --- a/.changeset/lemon-mice-rule.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@atproto/oauth-provider": minor -"@atproto/oauth-client": minor ---- - -Remove "nonce" from authorization request diff --git a/.changeset/light-dingos-dream.md b/.changeset/light-dingos-dream.md deleted file mode 100644 index a25c1025a87..00000000000 --- a/.changeset/light-dingos-dream.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@atproto/pds": patch ---- - -Ignore case when checking for dpop auth scheme diff --git a/.changeset/many-bikes-poke.md b/.changeset/many-bikes-poke.md deleted file mode 100644 index f412db46c8e..00000000000 --- a/.changeset/many-bikes-poke.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@atproto/pds": patch ---- - -Add, and verify, a "typ" header to access and refresh tokens diff --git a/.changeset/nine-deers-count.md b/.changeset/nine-deers-count.md deleted file mode 100644 index 61828ec6a58..00000000000 --- a/.changeset/nine-deers-count.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@atproto/api": patch ---- - -Drop use of `AtpBaseClient` class diff --git a/.changeset/ninety-ants-collect.md b/.changeset/ninety-ants-collect.md deleted file mode 100644 index 8abe5d741ce..00000000000 --- a/.changeset/ninety-ants-collect.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@atproto/oauth-provider": patch ---- - -Stronger CORS protections diff --git a/.changeset/odd-spies-boil.md b/.changeset/odd-spies-boil.md deleted file mode 100644 index 5a01cf7f127..00000000000 --- a/.changeset/odd-spies-boil.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@atproto/oauth-types": patch ---- - -Validate scopes characters according to OAuth 2.1 spec diff --git a/.changeset/old-mice-give.md b/.changeset/old-mice-give.md deleted file mode 100644 index 6d6bb1d5ea6..00000000000 --- a/.changeset/old-mice-give.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@atproto/api": patch ---- - -Expose the `CredentialSession` class that can be used to instantiate both `Agent` and `XrpcClient`, while internally managing credential based (username/password) sessions. - diff --git a/.changeset/orange-geese-punch.md b/.changeset/orange-geese-punch.md deleted file mode 100644 index 243a4081da5..00000000000 --- a/.changeset/orange-geese-punch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@atproto/api": patch ---- - -Deprecate Agent.accountDid in favor of Agent.assertDid diff --git a/.changeset/plenty-turtles-shop.md b/.changeset/plenty-turtles-shop.md deleted file mode 100644 index 20eb27db38b..00000000000 --- a/.changeset/plenty-turtles-shop.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@atproto/bsky": patch -"@atproto/api": patch ---- - -Add `threadgate: ThreadgateView` to response from `getPostThread` diff --git a/.changeset/polite-humans-sleep.md b/.changeset/polite-humans-sleep.md deleted file mode 100644 index 2879f0f6be9..00000000000 --- a/.changeset/polite-humans-sleep.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@atproto/oauth-provider": minor -"@atproto/oauth-client": minor ---- - -Mandate the use of "atproto" scope diff --git a/.changeset/polite-peaches-repair.md b/.changeset/polite-peaches-repair.md deleted file mode 100644 index 39dff1079a5..00000000000 --- a/.changeset/polite-peaches-repair.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@atproto/crypto": patch ---- - -Add "`jwtAlg`" option to `verifySignature()` function diff --git a/.changeset/polite-toys-happen.md b/.changeset/polite-toys-happen.md deleted file mode 100644 index 1547eed02f8..00000000000 --- a/.changeset/polite-toys-happen.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@atproto/api": patch ---- - -`Agent` is no longer an abstract class. Instead it can be instantiated using object implementing a new `SessionManager` interface. If your project extends `Agent` and overrides the constructor or any method implementations, consider that you may want to call them from `super`. diff --git a/.changeset/poor-socks-sniff.md b/.changeset/poor-socks-sniff.md deleted file mode 100644 index a3332467791..00000000000 --- a/.changeset/poor-socks-sniff.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@atproto/oauth-provider": patch ---- - -Do not require user consent during oauth flow for first party apps. diff --git a/.changeset/short-llamas-rescue.md b/.changeset/short-llamas-rescue.md deleted file mode 100644 index 13cc5276fe7..00000000000 --- a/.changeset/short-llamas-rescue.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@atproto/oauth-client": patch ---- - -Add `getTokenInfo()` method to `OAuthSession`. diff --git a/.changeset/short-toes-battle.md b/.changeset/short-toes-battle.md deleted file mode 100644 index cb5f9265ef4..00000000000 --- a/.changeset/short-toes-battle.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -"@atproto/oauth-provider": minor -"@atproto/oauth-client": minor -"@atproto/oauth-client-browser": minor -"@atproto/oauth-client-node": minor ---- - -Remove "openid" compatibility. The reason is that although we were technically "openid" compatible, ATProto identifiers are distributed identifiers. When a client relies on OpenID to authenticate users, it will use the auth provider in combination with the identifier to uniquely identify the user. Since ATProto identifiers are meant to be able to move from one provider to the other, OpenID compatibility could break authentication after a user was migrated to a different provider. - -The way OpenID compliant clients would adapt to this particularity would typically be to remove the provider + identifier combination and use the identifier alone. While this is indeed the right way to handle ATProto identifiers, it requires more work to avoid impersonation. In particular, when obtaining a user identifier, the client **must** verify that the issuer of the identity token is indeed the server responsible for that user. This mechanism being not enforced by the OpenID standard, OpenID compatibility could lead to security issues. For this reason, we decided to remove OpenID compatibility from the OAuth provider. - -Note that a trusted central authority could still offer OpenID compatibility by relying on ATProto's regular OAuth flow under the hood. This capability is out of the scope of this library. diff --git a/.changeset/six-ties-arrive.md b/.changeset/six-ties-arrive.md deleted file mode 100644 index a930161f3e9..00000000000 --- a/.changeset/six-ties-arrive.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@atproto/oauth-types": patch ---- - -Re-use code definition of oauthResponseTypeSchema diff --git a/.changeset/smart-drinks-repeat.md b/.changeset/smart-drinks-repeat.md deleted file mode 100644 index 37d86c1d4a7..00000000000 --- a/.changeset/smart-drinks-repeat.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@atproto/oauth-client": patch ---- - -Do not remove scopes not advertised in the AS's "scopes_supported" when building the authorization request. diff --git a/.changeset/smart-gifts-itch.md b/.changeset/smart-gifts-itch.md deleted file mode 100644 index 08ea7f32d87..00000000000 --- a/.changeset/smart-gifts-itch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@atproto/oauth-types": patch ---- - -Remove non-standard "sub" from OAuthTokenResponse diff --git a/.changeset/smooth-houses-hope.md b/.changeset/smooth-houses-hope.md deleted file mode 100644 index b9a7334c56b..00000000000 --- a/.changeset/smooth-houses-hope.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@atproto/oauth-client": minor ---- - -Rename OAuthAgent into OAuthSession diff --git a/.changeset/tame-elephants-unite.md b/.changeset/tame-elephants-unite.md deleted file mode 100644 index d537fe0732e..00000000000 --- a/.changeset/tame-elephants-unite.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@atproto/oauth-client": minor ---- - -Rename `OAuthSession`'s `request` method to `fetchHandler`. The goal of this change is to allow `OAuthSession` to be used in order to instantiate `XrpcClient` by implementing the `FetchHandlerObject` interface. diff --git a/.changeset/tasty-dingos-design.md b/.changeset/tasty-dingos-design.md deleted file mode 100644 index 45a0e7fa508..00000000000 --- a/.changeset/tasty-dingos-design.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@atproto/xrpc": patch ---- - -Add ability to instantiate XrpcClient from FetchHandlerObject type diff --git a/.changeset/thin-cycles-live.md b/.changeset/thin-cycles-live.md deleted file mode 100644 index 8650de71a23..00000000000 --- a/.changeset/thin-cycles-live.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@atproto/pds": patch ---- - -Allow OAuthProvider to define its own CORS policies diff --git a/.changeset/tidy-cars-thank.md b/.changeset/tidy-cars-thank.md deleted file mode 100644 index f0ecef9684d..00000000000 --- a/.changeset/tidy-cars-thank.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@atproto/oauth-provider": patch ---- - -Improve reporting of validation errors diff --git a/.changeset/twelve-years-speak.md b/.changeset/twelve-years-speak.md deleted file mode 100644 index ba9b68442b9..00000000000 --- a/.changeset/twelve-years-speak.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@atproto/xrpc": patch ---- - -Add global headers to `XrpcClient` instances diff --git a/.changeset/wet-radios-fry.md b/.changeset/wet-radios-fry.md deleted file mode 100644 index 296dccc2735..00000000000 --- a/.changeset/wet-radios-fry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@atproto/oauth-client": patch ---- - -Make `getTokenSet()` method public in `OAuthSession`. diff --git a/packages/api/CHANGELOG.md b/packages/api/CHANGELOG.md index 2dd688cebc5..f26b5e1e0be 100644 --- a/packages/api/CHANGELOG.md +++ b/packages/api/CHANGELOG.md @@ -1,5 +1,22 @@ # @atproto/api +## 0.13.4 + +### Patch Changes + +- [#2714](https://github.com/bluesky-social/atproto/pull/2714) [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Drop use of `AtpBaseClient` class + +- [#2714](https://github.com/bluesky-social/atproto/pull/2714) [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Expose the `CredentialSession` class that can be used to instantiate both `Agent` and `XrpcClient`, while internally managing credential based (username/password) sessions. + +- [`bbca17bc5`](https://github.com/bluesky-social/atproto/commit/bbca17bc5388e0b2af26fb107347c8ab507ee42f) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Deprecate Agent.accountDid in favor of Agent.assertDid + +- [#2737](https://github.com/bluesky-social/atproto/pull/2737) [`a8e1f9000`](https://github.com/bluesky-social/atproto/commit/a8e1f9000d9617c4df9d9f0e74ae0e0b73fcfd66) Thanks [@estrattonbailey](https://github.com/estrattonbailey)! - Add `threadgate: ThreadgateView` to response from `getPostThread` + +- [#2714](https://github.com/bluesky-social/atproto/pull/2714) [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c) Thanks [@matthieusieben](https://github.com/matthieusieben)! - `Agent` is no longer an abstract class. Instead it can be instantiated using object implementing a new `SessionManager` interface. If your project extends `Agent` and overrides the constructor or any method implementations, consider that you may want to call them from `super`. + +- Updated dependencies [[`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c)]: + - @atproto/xrpc@0.6.1 + ## 0.13.3 ### Patch Changes diff --git a/packages/api/package.json b/packages/api/package.json index c6fe324f32a..9e7c8e108dd 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -1,6 +1,6 @@ { "name": "@atproto/api", - "version": "0.13.3", + "version": "0.13.4", "license": "MIT", "description": "Client library for atproto and Bluesky", "keywords": [ diff --git a/packages/aws/CHANGELOG.md b/packages/aws/CHANGELOG.md index bb3ff22da5b..c3bd8a219b3 100644 --- a/packages/aws/CHANGELOG.md +++ b/packages/aws/CHANGELOG.md @@ -1,5 +1,13 @@ # @atproto/aws +## 0.2.3 + +### Patch Changes + +- Updated dependencies [[`ebb318325`](https://github.com/bluesky-social/atproto/commit/ebb318325b6e80c4ea1a93a617569da2698afe31)]: + - @atproto/crypto@0.4.1 + - @atproto/repo@0.4.3 + ## 0.2.2 ### Patch Changes diff --git a/packages/aws/package.json b/packages/aws/package.json index e46dd2d7cc6..333fb84c7f1 100644 --- a/packages/aws/package.json +++ b/packages/aws/package.json @@ -1,6 +1,6 @@ { "name": "@atproto/aws", - "version": "0.2.2", + "version": "0.2.3", "license": "MIT", "description": "Shared AWS cloud API helpers for atproto services", "keywords": [ diff --git a/packages/bsky/CHANGELOG.md b/packages/bsky/CHANGELOG.md index 76d6fad97d7..4510ccdfd62 100644 --- a/packages/bsky/CHANGELOG.md +++ b/packages/bsky/CHANGELOG.md @@ -1,5 +1,18 @@ # @atproto/bsky +## 0.0.79 + +### Patch Changes + +- [#2737](https://github.com/bluesky-social/atproto/pull/2737) [`a8e1f9000`](https://github.com/bluesky-social/atproto/commit/a8e1f9000d9617c4df9d9f0e74ae0e0b73fcfd66) Thanks [@estrattonbailey](https://github.com/estrattonbailey)! - Add `threadgate: ThreadgateView` to response from `getPostThread` + +- Updated dependencies [[`ebb318325`](https://github.com/bluesky-social/atproto/commit/ebb318325b6e80c4ea1a93a617569da2698afe31), [`ebb318325`](https://github.com/bluesky-social/atproto/commit/ebb318325b6e80c4ea1a93a617569da2698afe31), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c), [`bbca17bc5`](https://github.com/bluesky-social/atproto/commit/bbca17bc5388e0b2af26fb107347c8ab507ee42f), [`a8e1f9000`](https://github.com/bluesky-social/atproto/commit/a8e1f9000d9617c4df9d9f0e74ae0e0b73fcfd66), [`ebb318325`](https://github.com/bluesky-social/atproto/commit/ebb318325b6e80c4ea1a93a617569da2698afe31), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c)]: + - @atproto/xrpc-server@0.6.3 + - @atproto/api@0.13.4 + - @atproto/crypto@0.4.1 + - @atproto/identity@0.4.1 + - @atproto/repo@0.4.3 + ## 0.0.78 ### Patch Changes diff --git a/packages/bsky/package.json b/packages/bsky/package.json index ce8a26dea5d..6ef9fed903b 100644 --- a/packages/bsky/package.json +++ b/packages/bsky/package.json @@ -1,6 +1,6 @@ { "name": "@atproto/bsky", - "version": "0.0.78", + "version": "0.0.79", "license": "MIT", "description": "Reference implementation of app.bsky App View (Bluesky API)", "keywords": [ diff --git a/packages/crypto/CHANGELOG.md b/packages/crypto/CHANGELOG.md index e194c82dd70..04ce19e9bcc 100644 --- a/packages/crypto/CHANGELOG.md +++ b/packages/crypto/CHANGELOG.md @@ -1,5 +1,11 @@ # @atproto/crypto +## 0.4.1 + +### Patch Changes + +- [#2743](https://github.com/bluesky-social/atproto/pull/2743) [`ebb318325`](https://github.com/bluesky-social/atproto/commit/ebb318325b6e80c4ea1a93a617569da2698afe31) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Add "`jwtAlg`" option to `verifySignature()` function + ## 0.4.0 ### Minor Changes diff --git a/packages/crypto/package.json b/packages/crypto/package.json index b951e72b4bf..4bf6983637a 100644 --- a/packages/crypto/package.json +++ b/packages/crypto/package.json @@ -1,6 +1,6 @@ { "name": "@atproto/crypto", - "version": "0.4.0", + "version": "0.4.1", "license": "MIT", "description": "Library for cryptographic keys and signing in atproto", "keywords": [ diff --git a/packages/dev-env/CHANGELOG.md b/packages/dev-env/CHANGELOG.md index 89132a22ae1..d49c745563c 100644 --- a/packages/dev-env/CHANGELOG.md +++ b/packages/dev-env/CHANGELOG.md @@ -1,5 +1,18 @@ # @atproto/dev-env +## 0.3.45 + +### Patch Changes + +- Updated dependencies [[`ebb318325`](https://github.com/bluesky-social/atproto/commit/ebb318325b6e80c4ea1a93a617569da2698afe31), [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7), [`ebb318325`](https://github.com/bluesky-social/atproto/commit/ebb318325b6e80c4ea1a93a617569da2698afe31), [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7), [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7), [`ebb318325`](https://github.com/bluesky-social/atproto/commit/ebb318325b6e80c4ea1a93a617569da2698afe31), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c), [`bbca17bc5`](https://github.com/bluesky-social/atproto/commit/bbca17bc5388e0b2af26fb107347c8ab507ee42f), [`a8e1f9000`](https://github.com/bluesky-social/atproto/commit/a8e1f9000d9617c4df9d9f0e74ae0e0b73fcfd66), [`ebb318325`](https://github.com/bluesky-social/atproto/commit/ebb318325b6e80c4ea1a93a617569da2698afe31), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c), [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7)]: + - @atproto/xrpc-server@0.6.3 + - @atproto/pds@0.4.54 + - @atproto/api@0.13.4 + - @atproto/bsky@0.0.79 + - @atproto/crypto@0.4.1 + - @atproto/ozone@0.1.41 + - @atproto/identity@0.4.1 + ## 0.3.44 ### Patch Changes diff --git a/packages/dev-env/package.json b/packages/dev-env/package.json index 039e8e8df6b..653045881be 100644 --- a/packages/dev-env/package.json +++ b/packages/dev-env/package.json @@ -1,6 +1,6 @@ { "name": "@atproto/dev-env", - "version": "0.3.44", + "version": "0.3.45", "license": "MIT", "description": "Local development environment helper for atproto development", "keywords": [ diff --git a/packages/identity/CHANGELOG.md b/packages/identity/CHANGELOG.md index 9789a2fa1c3..15e6170bd6b 100644 --- a/packages/identity/CHANGELOG.md +++ b/packages/identity/CHANGELOG.md @@ -1,5 +1,12 @@ # @atproto/identity +## 0.4.1 + +### Patch Changes + +- Updated dependencies [[`ebb318325`](https://github.com/bluesky-social/atproto/commit/ebb318325b6e80c4ea1a93a617569da2698afe31)]: + - @atproto/crypto@0.4.1 + ## 0.4.0 ### Minor Changes diff --git a/packages/identity/package.json b/packages/identity/package.json index 867ed489579..cfb88805d8e 100644 --- a/packages/identity/package.json +++ b/packages/identity/package.json @@ -1,6 +1,6 @@ { "name": "@atproto/identity", - "version": "0.4.0", + "version": "0.4.1", "license": "MIT", "description": "Library for decentralized identities in atproto using DIDs and handles", "keywords": [ diff --git a/packages/oauth/oauth-client-browser/CHANGELOG.md b/packages/oauth/oauth-client-browser/CHANGELOG.md index 60313cd07e2..ae84b216570 100644 --- a/packages/oauth/oauth-client-browser/CHANGELOG.md +++ b/packages/oauth/oauth-client-browser/CHANGELOG.md @@ -1,5 +1,23 @@ # @atproto/oauth-client-browser +## 0.2.0 + +### Minor Changes + +- [#2714](https://github.com/bluesky-social/atproto/pull/2714) [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c) Thanks [@matthieusieben](https://github.com/matthieusieben)! - The `OAuthClient` (and runtime specific sub-classes) no longer return @atproto/api `Agent` instances. Instead, they return `OAuthSession` instances that can be used to instantiate the `Agent` class. + +- [#2734](https://github.com/bluesky-social/atproto/pull/2734) [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Remove "openid" compatibility. The reason is that although we were technically "openid" compatible, ATProto identifiers are distributed identifiers. When a client relies on OpenID to authenticate users, it will use the auth provider in combination with the identifier to uniquely identify the user. Since ATProto identifiers are meant to be able to move from one provider to the other, OpenID compatibility could break authentication after a user was migrated to a different provider. + + The way OpenID compliant clients would adapt to this particularity would typically be to remove the provider + identifier combination and use the identifier alone. While this is indeed the right way to handle ATProto identifiers, it requires more work to avoid impersonation. In particular, when obtaining a user identifier, the client **must** verify that the issuer of the identity token is indeed the server responsible for that user. This mechanism being not enforced by the OpenID standard, OpenID compatibility could lead to security issues. For this reason, we decided to remove OpenID compatibility from the OAuth provider. + + Note that a trusted central authority could still offer OpenID compatibility by relying on ATProto's regular OAuth flow under the hood. This capability is out of the scope of this library. + +### Patch Changes + +- Updated dependencies [[`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c), [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7), [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7), [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c), [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7), [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7), [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7), [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c)]: + - @atproto/oauth-client@0.2.0 + - @atproto/oauth-types@0.1.4 + ## 0.1.7 ### Patch Changes diff --git a/packages/oauth/oauth-client-browser/package.json b/packages/oauth/oauth-client-browser/package.json index 6a689a0620f..a728725394b 100644 --- a/packages/oauth/oauth-client-browser/package.json +++ b/packages/oauth/oauth-client-browser/package.json @@ -1,6 +1,6 @@ { "name": "@atproto/oauth-client-browser", - "version": "0.1.7", + "version": "0.2.0", "license": "MIT", "description": "ATPROTO OAuth client for the browser (relies on WebCrypto & Indexed DB)", "keywords": [ diff --git a/packages/oauth/oauth-client-node/CHANGELOG.md b/packages/oauth/oauth-client-node/CHANGELOG.md index d6ee2b46e4d..105f4d4742e 100644 --- a/packages/oauth/oauth-client-node/CHANGELOG.md +++ b/packages/oauth/oauth-client-node/CHANGELOG.md @@ -1,5 +1,25 @@ # @atproto/oauth-client-node +## 0.1.0 + +### Minor Changes + +- [#2714](https://github.com/bluesky-social/atproto/pull/2714) [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c) Thanks [@matthieusieben](https://github.com/matthieusieben)! - The `OAuthClient` (and runtime specific sub-classes) no longer return @atproto/api `Agent` instances. Instead, they return `OAuthSession` instances that can be used to instantiate the `Agent` class. + +- [#2734](https://github.com/bluesky-social/atproto/pull/2734) [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Remove "openid" compatibility. The reason is that although we were technically "openid" compatible, ATProto identifiers are distributed identifiers. When a client relies on OpenID to authenticate users, it will use the auth provider in combination with the identifier to uniquely identify the user. Since ATProto identifiers are meant to be able to move from one provider to the other, OpenID compatibility could break authentication after a user was migrated to a different provider. + + The way OpenID compliant clients would adapt to this particularity would typically be to remove the provider + identifier combination and use the identifier alone. While this is indeed the right way to handle ATProto identifiers, it requires more work to avoid impersonation. In particular, when obtaining a user identifier, the client **must** verify that the issuer of the identity token is indeed the server responsible for that user. This mechanism being not enforced by the OpenID standard, OpenID compatibility could lead to security issues. For this reason, we decided to remove OpenID compatibility from the OAuth provider. + + Note that a trusted central authority could still offer OpenID compatibility by relying on ATProto's regular OAuth flow under the hood. This capability is out of the scope of this library. + +### Patch Changes + +- [#2714](https://github.com/bluesky-social/atproto/pull/2714) [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Remove un-necessary dev dependency + +- Updated dependencies [[`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c), [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7), [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7), [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c), [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7), [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7), [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7), [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c)]: + - @atproto/oauth-client@0.2.0 + - @atproto/oauth-types@0.1.4 + ## 0.0.7 ### Patch Changes diff --git a/packages/oauth/oauth-client-node/package.json b/packages/oauth/oauth-client-node/package.json index e3d8370bf78..62f1e306666 100644 --- a/packages/oauth/oauth-client-node/package.json +++ b/packages/oauth/oauth-client-node/package.json @@ -1,6 +1,6 @@ { "name": "@atproto/oauth-client-node", - "version": "0.0.7", + "version": "0.1.0", "license": "MIT", "description": "ATPROTO OAuth client for the NodeJS", "keywords": [ diff --git a/packages/oauth/oauth-client/CHANGELOG.md b/packages/oauth/oauth-client/CHANGELOG.md index 72a1dd5c587..b6ae5e4e908 100644 --- a/packages/oauth/oauth-client/CHANGELOG.md +++ b/packages/oauth/oauth-client/CHANGELOG.md @@ -1,5 +1,37 @@ # @atproto/oauth-client +## 0.2.0 + +### Minor Changes + +- [#2714](https://github.com/bluesky-social/atproto/pull/2714) [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c) Thanks [@matthieusieben](https://github.com/matthieusieben)! - The `OAuthClient` (and runtime specific sub-classes) no longer return @atproto/api `Agent` instances. Instead, they return `OAuthSession` instances that can be used to instantiate the `Agent` class. + +- [#2734](https://github.com/bluesky-social/atproto/pull/2734) [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Remove "nonce" from authorization request + +- [#2734](https://github.com/bluesky-social/atproto/pull/2734) [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Mandate the use of "atproto" scope + +- [#2734](https://github.com/bluesky-social/atproto/pull/2734) [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Remove "openid" compatibility. The reason is that although we were technically "openid" compatible, ATProto identifiers are distributed identifiers. When a client relies on OpenID to authenticate users, it will use the auth provider in combination with the identifier to uniquely identify the user. Since ATProto identifiers are meant to be able to move from one provider to the other, OpenID compatibility could break authentication after a user was migrated to a different provider. + + The way OpenID compliant clients would adapt to this particularity would typically be to remove the provider + identifier combination and use the identifier alone. While this is indeed the right way to handle ATProto identifiers, it requires more work to avoid impersonation. In particular, when obtaining a user identifier, the client **must** verify that the issuer of the identity token is indeed the server responsible for that user. This mechanism being not enforced by the OpenID standard, OpenID compatibility could lead to security issues. For this reason, we decided to remove OpenID compatibility from the OAuth provider. + + Note that a trusted central authority could still offer OpenID compatibility by relying on ATProto's regular OAuth flow under the hood. This capability is out of the scope of this library. + +- [#2714](https://github.com/bluesky-social/atproto/pull/2714) [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Rename OAuthAgent into OAuthSession + +- [#2714](https://github.com/bluesky-social/atproto/pull/2714) [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Rename `OAuthSession`'s `request` method to `fetchHandler`. The goal of this change is to allow `OAuthSession` to be used in order to instantiate `XrpcClient` by implementing the `FetchHandlerObject` interface. + +### Patch Changes + +- [#2714](https://github.com/bluesky-social/atproto/pull/2714) [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Add `getTokenInfo()` method to `OAuthSession`. + +- [#2734](https://github.com/bluesky-social/atproto/pull/2734) [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Do not remove scopes not advertised in the AS's "scopes_supported" when building the authorization request. + +- [#2714](https://github.com/bluesky-social/atproto/pull/2714) [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Make `getTokenSet()` method public in `OAuthSession`. + +- Updated dependencies [[`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c), [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7), [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7), [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c)]: + - @atproto/xrpc@0.6.1 + - @atproto/oauth-types@0.1.4 + ## 0.1.7 ### Patch Changes diff --git a/packages/oauth/oauth-client/package.json b/packages/oauth/oauth-client/package.json index 717aedfe71e..61ee436a652 100644 --- a/packages/oauth/oauth-client/package.json +++ b/packages/oauth/oauth-client/package.json @@ -1,6 +1,6 @@ { "name": "@atproto/oauth-client", - "version": "0.1.7", + "version": "0.2.0", "license": "MIT", "description": "OAuth client for ATPROTO PDS. This package serves as common base for environment-specific implementations (NodeJS, Browser, React-Native).", "keywords": [ diff --git a/packages/oauth/oauth-provider/CHANGELOG.md b/packages/oauth/oauth-provider/CHANGELOG.md index d8324bf47da..092257fcc19 100644 --- a/packages/oauth/oauth-provider/CHANGELOG.md +++ b/packages/oauth/oauth-provider/CHANGELOG.md @@ -1,5 +1,34 @@ # @atproto/oauth-provider +## 0.2.0 + +### Minor Changes + +- [#2734](https://github.com/bluesky-social/atproto/pull/2734) [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Remove "nonce" from authorization request + +- [#2734](https://github.com/bluesky-social/atproto/pull/2734) [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Mandate the use of "atproto" scope + +- [#2734](https://github.com/bluesky-social/atproto/pull/2734) [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Remove "openid" compatibility. The reason is that although we were technically "openid" compatible, ATProto identifiers are distributed identifiers. When a client relies on OpenID to authenticate users, it will use the auth provider in combination with the identifier to uniquely identify the user. Since ATProto identifiers are meant to be able to move from one provider to the other, OpenID compatibility could break authentication after a user was migrated to a different provider. + + The way OpenID compliant clients would adapt to this particularity would typically be to remove the provider + identifier combination and use the identifier alone. While this is indeed the right way to handle ATProto identifiers, it requires more work to avoid impersonation. In particular, when obtaining a user identifier, the client **must** verify that the issuer of the identity token is indeed the server responsible for that user. This mechanism being not enforced by the OpenID standard, OpenID compatibility could lead to security issues. For this reason, we decided to remove OpenID compatibility from the OAuth provider. + + Note that a trusted central authority could still offer OpenID compatibility by relying on ATProto's regular OAuth flow under the hood. This capability is out of the scope of this library. + +### Patch Changes + +- [#2734](https://github.com/bluesky-social/atproto/pull/2734) [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Display requested scopes during the auth flow + +- [#2734](https://github.com/bluesky-social/atproto/pull/2734) [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Generate proper invalid_authorization_details + +- [#2734](https://github.com/bluesky-social/atproto/pull/2734) [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Stronger CORS protections + +- [#2734](https://github.com/bluesky-social/atproto/pull/2734) [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Do not require user consent during oauth flow for first party apps. + +- [#2734](https://github.com/bluesky-social/atproto/pull/2734) [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Improve reporting of validation errors + +- Updated dependencies [[`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7), [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7), [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7)]: + - @atproto/oauth-types@0.1.4 + ## 0.1.3 ### Patch Changes diff --git a/packages/oauth/oauth-provider/package.json b/packages/oauth/oauth-provider/package.json index f272e12af16..b4ef1bcb399 100644 --- a/packages/oauth/oauth-provider/package.json +++ b/packages/oauth/oauth-provider/package.json @@ -1,6 +1,6 @@ { "name": "@atproto/oauth-provider", - "version": "0.1.3", + "version": "0.2.0", "license": "MIT", "description": "Generic OAuth2 and OpenID Connect provider for Node.js. Currently only supports features needed for Atproto.", "keywords": [ diff --git a/packages/oauth/oauth-types/CHANGELOG.md b/packages/oauth/oauth-types/CHANGELOG.md index 0e187f93c78..b9de355e878 100644 --- a/packages/oauth/oauth-types/CHANGELOG.md +++ b/packages/oauth/oauth-types/CHANGELOG.md @@ -1,5 +1,15 @@ # @atproto/oauth-types +## 0.1.4 + +### Patch Changes + +- [#2734](https://github.com/bluesky-social/atproto/pull/2734) [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Validate scopes characters according to OAuth 2.1 spec + +- [#2734](https://github.com/bluesky-social/atproto/pull/2734) [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Re-use code definition of oauthResponseTypeSchema + +- [#2734](https://github.com/bluesky-social/atproto/pull/2734) [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Remove non-standard "sub" from OAuthTokenResponse + ## 0.1.3 ### Patch Changes diff --git a/packages/oauth/oauth-types/package.json b/packages/oauth/oauth-types/package.json index de69c4055e1..01cde68611d 100644 --- a/packages/oauth/oauth-types/package.json +++ b/packages/oauth/oauth-types/package.json @@ -1,6 +1,6 @@ { "name": "@atproto/oauth-types", - "version": "0.1.3", + "version": "0.1.4", "license": "MIT", "description": "OAuth typing & validation library", "keywords": [ diff --git a/packages/ozone/CHANGELOG.md b/packages/ozone/CHANGELOG.md index 1a952795866..b9d4f704a05 100644 --- a/packages/ozone/CHANGELOG.md +++ b/packages/ozone/CHANGELOG.md @@ -1,5 +1,16 @@ # @atproto/ozone +## 0.1.41 + +### Patch Changes + +- Updated dependencies [[`ebb318325`](https://github.com/bluesky-social/atproto/commit/ebb318325b6e80c4ea1a93a617569da2698afe31), [`ebb318325`](https://github.com/bluesky-social/atproto/commit/ebb318325b6e80c4ea1a93a617569da2698afe31), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c), [`bbca17bc5`](https://github.com/bluesky-social/atproto/commit/bbca17bc5388e0b2af26fb107347c8ab507ee42f), [`a8e1f9000`](https://github.com/bluesky-social/atproto/commit/a8e1f9000d9617c4df9d9f0e74ae0e0b73fcfd66), [`ebb318325`](https://github.com/bluesky-social/atproto/commit/ebb318325b6e80c4ea1a93a617569da2698afe31), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c)]: + - @atproto/xrpc-server@0.6.3 + - @atproto/xrpc@0.6.1 + - @atproto/api@0.13.4 + - @atproto/crypto@0.4.1 + - @atproto/identity@0.4.1 + ## 0.1.40 ### Patch Changes diff --git a/packages/ozone/package.json b/packages/ozone/package.json index 4134b8ed334..ca9fa9f2aaf 100644 --- a/packages/ozone/package.json +++ b/packages/ozone/package.json @@ -1,6 +1,6 @@ { "name": "@atproto/ozone", - "version": "0.1.40", + "version": "0.1.41", "license": "MIT", "description": "Backend service for moderating the Bluesky network.", "keywords": [ diff --git a/packages/pds/CHANGELOG.md b/packages/pds/CHANGELOG.md index 8bfb767594e..3ae093c338a 100644 --- a/packages/pds/CHANGELOG.md +++ b/packages/pds/CHANGELOG.md @@ -1,5 +1,29 @@ # @atproto/pds +## 0.4.54 + +### Patch Changes + +- [#2734](https://github.com/bluesky-social/atproto/pull/2734) [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Use locally defined authPassthru + +- [#2734](https://github.com/bluesky-social/atproto/pull/2734) [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Add support for "transition:generic" and "transition:chat.bsky" oauth scopes + +- [#2734](https://github.com/bluesky-social/atproto/pull/2734) [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Ignore case when checking for dpop auth scheme + +- [#2743](https://github.com/bluesky-social/atproto/pull/2743) [`ebb318325`](https://github.com/bluesky-social/atproto/commit/ebb318325b6e80c4ea1a93a617569da2698afe31) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Add, and verify, a "typ" header to access and refresh tokens + +- [#2734](https://github.com/bluesky-social/atproto/pull/2734) [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Allow OAuthProvider to define its own CORS policies + +- Updated dependencies [[`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7), [`ebb318325`](https://github.com/bluesky-social/atproto/commit/ebb318325b6e80c4ea1a93a617569da2698afe31), [`ebb318325`](https://github.com/bluesky-social/atproto/commit/ebb318325b6e80c4ea1a93a617569da2698afe31), [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c), [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c), [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c), [`bbca17bc5`](https://github.com/bluesky-social/atproto/commit/bbca17bc5388e0b2af26fb107347c8ab507ee42f), [`a8e1f9000`](https://github.com/bluesky-social/atproto/commit/a8e1f9000d9617c4df9d9f0e74ae0e0b73fcfd66), [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7), [`ebb318325`](https://github.com/bluesky-social/atproto/commit/ebb318325b6e80c4ea1a93a617569da2698afe31), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c), [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7), [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c), [`dee817b6e`](https://github.com/bluesky-social/atproto/commit/dee817b6e0fc02351d51ce310b5e65239b7c5ed7), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c)]: + - @atproto/oauth-provider@0.2.0 + - @atproto/xrpc-server@0.6.3 + - @atproto/xrpc@0.6.1 + - @atproto/api@0.13.4 + - @atproto/crypto@0.4.1 + - @atproto/aws@0.2.3 + - @atproto/identity@0.4.1 + - @atproto/repo@0.4.3 + ## 0.4.53 ### Patch Changes diff --git a/packages/pds/package.json b/packages/pds/package.json index 579e42e4dce..18aee8fcd76 100644 --- a/packages/pds/package.json +++ b/packages/pds/package.json @@ -1,6 +1,6 @@ { "name": "@atproto/pds", - "version": "0.4.53", + "version": "0.4.54", "license": "MIT", "description": "Reference implementation of atproto Personal Data Server (PDS)", "keywords": [ diff --git a/packages/repo/CHANGELOG.md b/packages/repo/CHANGELOG.md index 3cdbf4c1e54..1d2d2b68690 100644 --- a/packages/repo/CHANGELOG.md +++ b/packages/repo/CHANGELOG.md @@ -1,5 +1,12 @@ # @atproto/repo +## 0.4.3 + +### Patch Changes + +- Updated dependencies [[`ebb318325`](https://github.com/bluesky-social/atproto/commit/ebb318325b6e80c4ea1a93a617569da2698afe31)]: + - @atproto/crypto@0.4.1 + ## 0.4.2 ### Patch Changes diff --git a/packages/repo/package.json b/packages/repo/package.json index 8b89dac1a16..3326ff816c4 100644 --- a/packages/repo/package.json +++ b/packages/repo/package.json @@ -1,6 +1,6 @@ { "name": "@atproto/repo", - "version": "0.4.2", + "version": "0.4.3", "license": "MIT", "description": "atproto repo and MST implementation", "keywords": [ diff --git a/packages/xrpc-server/CHANGELOG.md b/packages/xrpc-server/CHANGELOG.md index 001ef6cccde..af904cea1e4 100644 --- a/packages/xrpc-server/CHANGELOG.md +++ b/packages/xrpc-server/CHANGELOG.md @@ -1,5 +1,17 @@ # @atproto/xrpc-server +## 0.6.3 + +### Patch Changes + +- [#2743](https://github.com/bluesky-social/atproto/pull/2743) [`ebb318325`](https://github.com/bluesky-social/atproto/commit/ebb318325b6e80c4ea1a93a617569da2698afe31) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Add `iat` claim to service JWTs + +- [#2743](https://github.com/bluesky-social/atproto/pull/2743) [`ebb318325`](https://github.com/bluesky-social/atproto/commit/ebb318325b6e80c4ea1a93a617569da2698afe31) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Ensure that service auth JWT headers contain an `alg` claim, and ensure that `typ`, if present, is not an unexpected type (e.g. not an access or DPoP token). + +- Updated dependencies [[`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c), [`ebb318325`](https://github.com/bluesky-social/atproto/commit/ebb318325b6e80c4ea1a93a617569da2698afe31), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c), [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c)]: + - @atproto/xrpc@0.6.1 + - @atproto/crypto@0.4.1 + ## 0.6.2 ### Patch Changes diff --git a/packages/xrpc-server/package.json b/packages/xrpc-server/package.json index cec9a1e38e3..a86055503ba 100644 --- a/packages/xrpc-server/package.json +++ b/packages/xrpc-server/package.json @@ -1,6 +1,6 @@ { "name": "@atproto/xrpc-server", - "version": "0.6.2", + "version": "0.6.3", "license": "MIT", "description": "atproto HTTP API (XRPC) server library", "keywords": [ diff --git a/packages/xrpc/CHANGELOG.md b/packages/xrpc/CHANGELOG.md index d7188122dd8..6f19c1a9636 100644 --- a/packages/xrpc/CHANGELOG.md +++ b/packages/xrpc/CHANGELOG.md @@ -1,5 +1,15 @@ # @atproto/xrpc +## 0.6.1 + +### Patch Changes + +- [#2714](https://github.com/bluesky-social/atproto/pull/2714) [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Improve handling of fetchHandler errors when turning them into `XrpcError`. + +- [#2714](https://github.com/bluesky-social/atproto/pull/2714) [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Add ability to instantiate XrpcClient from FetchHandlerObject type + +- [#2714](https://github.com/bluesky-social/atproto/pull/2714) [`d9ffa3c46`](https://github.com/bluesky-social/atproto/commit/d9ffa3c460924010d7002b616cb7a0c66111cc6c) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Add global headers to `XrpcClient` instances + ## 0.6.0 ### Minor Changes @@ -42,7 +52,7 @@ `AtpAgent`. ```ts - import { Agent, AtpAgent } from '@atproto/api' + import { Agent, AtpAgent } from "@atproto/api"; async function setupAgent( service: string, @@ -54,30 +64,30 @@ persistSession: (evt, session) => { // handle session update }, - }) + }); - await agent.login(username, password) + await agent.login(username, password); - return agent + return agent; } ``` ```ts - import { Agent } from '@atproto/api' + import { Agent } from "@atproto/api"; async function doStuffWithAgent(agent: Agent, arg: string) { - return agent.resolveHandle(arg) + return agent.resolveHandle(arg); } ``` ```ts - import { Agent, AtpAgent } from '@atproto/api' + import { Agent, AtpAgent } from "@atproto/api"; class MyClass { - agent: Agent + agent: Agent; constructor() { - this.agent = new AtpAgent() + this.agent = new AtpAgent(); } } ``` @@ -155,24 +165,24 @@ ```ts - import { AtpBaseClient, ComAtprotoSyncSubscribeRepos } from '@atproto/api' + import { AtpBaseClient, ComAtprotoSyncSubscribeRepos } from "@atproto/api"; - const baseClient = new AtpBaseClient() + const baseClient = new AtpBaseClient(); - baseClient.xrpc.lex.assertValidXrpcMessage('io.example.doStuff', { + baseClient.xrpc.lex.assertValidXrpcMessage("io.example.doStuff", { // ... - }) + }); ``` ```ts - import { lexicons } from '@atproto/api' + import { lexicons } from "@atproto/api"; - lexicons.assertValidXrpcMessage('io.example.doStuff', { + lexicons.assertValidXrpcMessage("io.example.doStuff", { // ... - }) + }); ``` @@ -189,23 +199,23 @@ ```ts - import { BskyAgent } from '@atproto/api' + import { BskyAgent } from "@atproto/api"; class MyAgent extends BskyAgent { - private accessToken?: string + private accessToken?: string; async createOrRefreshSession(identifier: string, password: string) { // custom logic here - this.accessToken = 'my-access-jwt' + this.accessToken = "my-access-jwt"; } async doStuff() { - return this.call('io.example.doStuff', { + return this.call("io.example.doStuff", { headers: { Authorization: this.accessToken && `Bearer ${this.accessToken}`, }, - }) + }); } } ``` @@ -214,11 +224,11 @@ ```ts - import { Agent } from '@atproto/api' + import { Agent } from "@atproto/api"; class MyAgent extends Agent { - private accessToken?: string - public did?: string + private accessToken?: string; + public did?: string; constructor(private readonly service: string | URL) { super({ @@ -227,21 +237,21 @@ Authorization: () => this.accessToken ? `Bearer ${this.accessToken}` : null, }, - }) + }); } clone(): MyAgent { - const agent = new MyAgent(this.service) - agent.accessToken = this.accessToken - agent.did = this.did - return this.copyInto(agent) + const agent = new MyAgent(this.service); + agent.accessToken = this.accessToken; + agent.did = this.did; + return this.copyInto(agent); } async createOrRefreshSession(identifier: string, password: string) { // custom logic here - this.did = 'did:example:123' - this.accessToken = 'my-access-jwt' + this.did = "did:example:123"; + this.accessToken = "my-access-jwt"; } } ``` @@ -260,38 +270,38 @@ ```ts - import { BskyAgent } from '@atproto/api' - import { RateLimitThreshold } from 'rate-limit-threshold' + import { BskyAgent } from "@atproto/api"; + import { RateLimitThreshold } from "rate-limit-threshold"; - const agent = new BskyAgent() - const limiter = new RateLimitThreshold(3000, 300_000) + const agent = new BskyAgent(); + const limiter = new RateLimitThreshold(3000, 300_000); - const origCall = agent.api.xrpc.call + const origCall = agent.api.xrpc.call; agent.api.xrpc.call = async function (...args) { - await limiter.wait() - return origCall.call(this, ...args) - } + await limiter.wait(); + return origCall.call(this, ...args); + }; ``` ```ts - import { AtpAgent } from '@atproto/api' - import { RateLimitThreshold } from 'rate-limit-threshold' + import { AtpAgent } from "@atproto/api"; + import { RateLimitThreshold } from "rate-limit-threshold"; class LimitedAtpAgent extends AtpAgent { constructor(options: AtpAgentOptions) { - const fetch: typeof globalThis.fetch = options.fetch ?? globalThis.fetch - const limiter = new RateLimitThreshold(3000, 300_000) + const fetch: typeof globalThis.fetch = options.fetch ?? globalThis.fetch; + const limiter = new RateLimitThreshold(3000, 300_000); super({ ...options, fetch: async (...args) => { - await limiter.wait() - return fetch(...args) + await limiter.wait(); + return fetch(...args); }, - }) + }); } } ``` @@ -312,40 +322,40 @@ ```ts - import { BskyAgent, defaultFetchHandler } from '@atproto/api' + import { BskyAgent, defaultFetchHandler } from "@atproto/api"; BskyAgent.configure({ fetch: async (httpUri, httpMethod, httpHeaders, httpReqBody) => { - const ua = httpHeaders['User-Agent'] + const ua = httpHeaders["User-Agent"]; - httpHeaders['User-Agent'] = ua ? `${ua} ${userAgent}` : userAgent + httpHeaders["User-Agent"] = ua ? `${ua} ${userAgent}` : userAgent; - return defaultFetchHandler(httpUri, httpMethod, httpHeaders, httpReqBody) + return defaultFetchHandler(httpUri, httpMethod, httpHeaders, httpReqBody); }, - }) + }); ``` ```ts - import { AtpAgent } from '@atproto/api' + import { AtpAgent } from "@atproto/api"; class MyAtpAgent extends AtpAgent { constructor(options: AtpAgentOptions) { - const fetch = options.fetch ?? globalThis.fetch + const fetch = options.fetch ?? globalThis.fetch; super({ ...options, fetch: async (url, init) => { - const headers = new Headers(init.headers) + const headers = new Headers(init.headers); - const ua = headersList.get('User-Agent') - headersList.set('User-Agent', ua ? `${ua} ${userAgent}` : userAgent) + const ua = headersList.get("User-Agent"); + headersList.set("User-Agent", ua ? `${ua} ${userAgent}` : userAgent); - return fetch(url, { ...init, headers }) + return fetch(url, { ...init, headers }); }, - }) + }); } } ``` @@ -404,7 +414,7 @@ */ url: string, init: RequestInit, - ) => Promise + ) => Promise; ``` A noticeable change that has been introduced is that the `uri` field of the @@ -442,7 +452,7 @@ ```ts - import client, { defaultFetchHandler } from '@atproto/xrpc' + import client, { defaultFetchHandler } from "@atproto/xrpc"; client.fetch = function ( httpUri: string, @@ -451,50 +461,50 @@ httpReqBody: unknown, ) { // Custom logic here - return defaultFetchHandler(httpUri, httpMethod, httpHeaders, httpReqBody) - } + return defaultFetchHandler(httpUri, httpMethod, httpHeaders, httpReqBody); + }; client.addLexicon({ lexicon: 1, - id: 'io.example.doStuff', + id: "io.example.doStuff", defs: {}, - }) + }); - const instance = client.service('http://my-service.com') + const instance = client.service("http://my-service.com"); - instance.setHeader('my-header', 'my-value') + instance.setHeader("my-header", "my-value"); - await instance.call('io.example.doStuff') + await instance.call("io.example.doStuff"); ``` ```ts - import { XrpcClient } from '@atproto/xrpc' + import { XrpcClient } from "@atproto/xrpc"; const instance = new XrpcClient( async (url, init) => { - const headers = new Headers(init.headers) + const headers = new Headers(init.headers); - headers.set('my-header', 'my-value') + headers.set("my-header", "my-value"); // Custom logic here - const fullUrl = new URL(url, 'http://my-service.com') + const fullUrl = new URL(url, "http://my-service.com"); - return fetch(fullUrl, { ...init, headers }) + return fetch(fullUrl, { ...init, headers }); }, [ { lexicon: 1, - id: 'io.example.doStuff', + id: "io.example.doStuff", defs: {}, }, ], - ) + ); - await instance.call('io.example.doStuff') + await instance.call("io.example.doStuff"); ``` @@ -506,62 +516,62 @@ previous example can be simplified to: ```ts - import { XrpcClient } from '@atproto/xrpc' + import { XrpcClient } from "@atproto/xrpc"; - const instance = new XrpcClient('http://my-service.com', [ + const instance = new XrpcClient("http://my-service.com", [ { lexicon: 1, - id: 'io.example.doStuff', + id: "io.example.doStuff", defs: {}, }, - ]) + ]); ``` If you need to add static headers to all requests, you can instead instantiate the `XrpcClient` as follows: ```ts - import { XrpcClient } from '@atproto/xrpc' + import { XrpcClient } from "@atproto/xrpc"; const instance = new XrpcClient( { - service: 'http://my-service.com', + service: "http://my-service.com", headers: { - 'my-header': 'my-value', + "my-header": "my-value", }, }, [ { lexicon: 1, - id: 'io.example.doStuff', + id: "io.example.doStuff", defs: {}, }, ], - ) + ); ``` If you need the headers or service url to be dynamic, you can define them using functions: ```ts - import { XrpcClient } from '@atproto/xrpc' + import { XrpcClient } from "@atproto/xrpc"; const instance = new XrpcClient( { - service: () => 'http://my-service.com', + service: () => "http://my-service.com", headers: { - 'my-header': () => 'my-value', - 'my-ignored-header': () => null, // ignored + "my-header": () => "my-value", + "my-ignored-header": () => null, // ignored }, }, [ { lexicon: 1, - id: 'io.example.doStuff', + id: "io.example.doStuff", defs: {}, }, ], - ) + ); ``` - [#2483](https://github.com/bluesky-social/atproto/pull/2483) [`b934b396b`](https://github.com/bluesky-social/atproto/commit/b934b396b13ba32bf2bf7e75ecdf6871e5f310dd) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Add the ability to use `fetch()` compatible `BodyInit` body when making XRPC calls. diff --git a/packages/xrpc/package.json b/packages/xrpc/package.json index 6a1851c2806..56454bed8bb 100644 --- a/packages/xrpc/package.json +++ b/packages/xrpc/package.json @@ -1,6 +1,6 @@ { "name": "@atproto/xrpc", - "version": "0.6.0", + "version": "0.6.1", "license": "MIT", "description": "atproto HTTP API (XRPC) client library", "keywords": [