@atproto/oauth-client 0.7.0 → 0.7.1

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atproto/oauth-client
2
2
 
3
+ ## 0.7.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#4954](https://github.com/bluesky-social/atproto/pull/4954) [`e6c6343`](https://github.com/bluesky-social/atproto/commit/e6c6343bd3727455bd0da12300bb4929a944e4f1) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Allow custom `RuntimeImplementation` to return a `SharedArrayBuffer`-backed `Uint8Array` from the `digest()` method. Input to this function will always be `Uint8Array<ArrayBuffer>`.
8
+
3
9
  ## 0.7.0
4
10
 
5
11
  ### Minor Changes
@@ -6,7 +6,7 @@ export type RuntimeRandomValues = (length: number) => Awaitable<Uint8Array>;
6
6
  export type DigestAlgorithm = {
7
7
  name: 'sha256' | 'sha384' | 'sha512';
8
8
  };
9
- export type RuntimeDigest = (data: Uint8Array<ArrayBuffer>, alg: DigestAlgorithm) => Awaitable<Uint8Array<ArrayBuffer>>;
9
+ export type RuntimeDigest = (data: Uint8Array<ArrayBuffer>, alg: DigestAlgorithm) => Awaitable<Uint8Array>;
10
10
  export type RuntimeLock = <T>(name: string, fn: () => Awaitable<T>) => Awaitable<T>;
11
11
  export interface RuntimeImplementation {
12
12
  createKey: RuntimeKeyFactory;
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-implementation.d.ts","sourceRoot":"","sources":["../src/runtime-implementation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAErC,YAAY,EAAE,GAAG,EAAE,CAAA;AACnB,MAAM,MAAM,iBAAiB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,GAAG,GAAG,WAAW,CAAC,GAAG,CAAC,CA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I,EAAE,UAAU,CAAC,WAAW,CAAC,EAC7B,GAAG,EAAE,eAAe,KACjB,SAAS,CAAC,UAAU,CAAC,CAAA;AAE1B,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,EAC1B,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,SAAS,CAAC,CAAC,CAAC,KACnB,SAAS,CAAC,CAAC,CAAC,CAAA;AAEjB,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,iBAAiB,CAAA;IAC5B,eAAe,EAAE,mBAAmB,CAAA;IACpC,MAAM,EAAE,aAAa,CAAA;IACrB,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-implementation.js","sourceRoot":"","sources":["../src/runtime-implementation.ts"],"names":[],"mappings":"","sourcesContent":["import { Key } from '@atproto/jwk'\nimport { Awaitable } from './util.js'\n\nexport type { Key }\nexport type RuntimeKeyFactory = (algs: string[]) => Key | PromiseLike<Key>\n\nexport type RuntimeRandomValues = (length: number) => Awaitable<Uint8Array>\n\nexport type DigestAlgorithm = { name: 'sha256' | 'sha384' | 'sha512' }\nexport type RuntimeDigest = (\n data: Uint8Array<ArrayBuffer>,\n alg: DigestAlgorithm,\n) => Awaitable<Uint8Array<ArrayBuffer>>\n\nexport type RuntimeLock = <T>(\n name: string,\n fn: () => Awaitable<T>,\n) => Awaitable<T>\n\nexport interface RuntimeImplementation {\n createKey: RuntimeKeyFactory\n getRandomValues: RuntimeRandomValues\n digest: RuntimeDigest\n requestLock?: RuntimeLock\n}\n"]}
1
+ {"version":3,"file":"runtime-implementation.js","sourceRoot":"","sources":["../src/runtime-implementation.ts"],"names":[],"mappings":"","sourcesContent":["import { Key } from '@atproto/jwk'\nimport { Awaitable } from './util.js'\n\nexport type { Key }\nexport type RuntimeKeyFactory = (algs: string[]) => Key | PromiseLike<Key>\n\nexport type RuntimeRandomValues = (length: number) => Awaitable<Uint8Array>\n\nexport type DigestAlgorithm = { name: 'sha256' | 'sha384' | 'sha512' }\nexport type RuntimeDigest = (\n data: Uint8Array<ArrayBuffer>,\n alg: DigestAlgorithm,\n) => Awaitable<Uint8Array>\n\nexport type RuntimeLock = <T>(\n name: string,\n fn: () => Awaitable<T>,\n) => Awaitable<T>\n\nexport interface RuntimeImplementation {\n createKey: RuntimeKeyFactory\n getRandomValues: RuntimeRandomValues\n digest: RuntimeDigest\n requestLock?: RuntimeLock\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/oauth-client",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "engines": {
5
5
  "node": ">=22"
6
6
  },
@@ -34,11 +34,11 @@
34
34
  "@atproto-labs/handle-resolver": "^0.4.0",
35
35
  "@atproto-labs/identity-resolver": "^0.4.0",
36
36
  "@atproto-labs/simple-store": "^0.4.0",
37
+ "@atproto-labs/simple-store-memory": "^0.2.0",
38
+ "@atproto/did": "^0.4.0",
37
39
  "@atproto/jwk": "^0.7.0",
38
40
  "@atproto/oauth-types": "^0.7.0",
39
- "@atproto-labs/simple-store-memory": "^0.2.0",
40
- "@atproto/xrpc": "^0.8.0",
41
- "@atproto/did": "^0.4.0"
41
+ "@atproto/xrpc": "^0.8.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "typescript": "^6.0.3"
@@ -10,7 +10,7 @@ export type DigestAlgorithm = { name: 'sha256' | 'sha384' | 'sha512' }
10
10
  export type RuntimeDigest = (
11
11
  data: Uint8Array<ArrayBuffer>,
12
12
  alg: DigestAlgorithm,
13
- ) => Awaitable<Uint8Array<ArrayBuffer>>
13
+ ) => Awaitable<Uint8Array>
14
14
 
15
15
  export type RuntimeLock = <T>(
16
16
  name: string,