@atproto/pds 0.3.1 → 0.3.2

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,12 @@
1
1
  # @atproto/pds
2
2
 
3
+ ## 0.3.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`772736a0`](https://github.com/bluesky-social/atproto/commit/772736a01081f39504e1b19a1b3687783bb78f07)]:
8
+ - @atproto/api@0.6.23
9
+
3
10
  ## 0.3.1
4
11
 
5
12
  ### Patch Changes
package/dist/index.js CHANGED
@@ -221484,6 +221484,9 @@ var schemaDict = {
221484
221484
  },
221485
221485
  emailConfirmed: {
221486
221486
  type: "boolean"
221487
+ },
221488
+ didDoc: {
221489
+ type: "unknown"
221487
221490
  }
221488
221491
  }
221489
221492
  }
@@ -241089,7 +241092,10 @@ function getSession_default(server, ctx) {
241089
241092
  auth: ctx.authVerifier.access,
241090
241093
  handler: async ({ auth }) => {
241091
241094
  const did2 = auth.credentials.did;
241092
- const user = await ctx.services.account(ctx.db).getAccount(did2);
241095
+ const [user, didDoc] = await Promise.all([
241096
+ ctx.services.account(ctx.db).getAccount(did2),
241097
+ didDocForSession(ctx, did2)
241098
+ ]);
241093
241099
  if (!user) {
241094
241100
  throw new InvalidRequestError(`Could not find user info for account: ${did2}`);
241095
241101
  }
@@ -241098,6 +241104,7 @@ function getSession_default(server, ctx) {
241098
241104
  body: {
241099
241105
  handle: user.handle,
241100
241106
  did: user.did,
241107
+ didDoc,
241101
241108
  email: user.email,
241102
241109
  emailConfirmed: !!user.emailConfirmedAt
241103
241110
  }
@@ -244950,6 +244957,9 @@ var schemaDict2 = {
244950
244957
  },
244951
244958
  emailConfirmed: {
244952
244959
  type: "boolean"
244960
+ },
244961
+ didDoc: {
244962
+ type: "unknown"
244953
244963
  }
244954
244964
  }
244955
244965
  }
@@ -251626,6 +251636,7 @@ var _AtpAgent = class {
251626
251636
  this.session.email = res.data.email;
251627
251637
  this.session.handle = res.data.handle;
251628
251638
  this.session.emailConfirmed = res.data.emailConfirmed;
251639
+ this._updateApiEndpoint(res.data.didDoc);
251629
251640
  return res;
251630
251641
  } catch (e) {
251631
251642
  this.session = void 0;
@@ -254768,7 +254779,7 @@ var statusTotakedownRef = (state) => {
254768
254779
  };
254769
254780
 
254770
254781
  // src/services/local/index.ts
254771
- var import_util96 = __toESM(require("util"));
254782
+ var import_util97 = __toESM(require("util"));
254772
254783
 
254773
254784
  // src/lexicon/types/app/bsky/embed/record.ts
254774
254785
  function isMain5(v) {
@@ -254792,7 +254803,7 @@ var LocalService = class {
254792
254803
  if (!this.appviewCdnUrlPattern) {
254793
254804
  return `https://${this.pdsHostname}/xrpc/${ids.ComAtprotoSyncGetBlob}?did=${did2}&cid=${cid2}`;
254794
254805
  }
254795
- return import_util96.default.format(this.appviewCdnUrlPattern, pattern, did2, cid2);
254806
+ return import_util97.default.format(this.appviewCdnUrlPattern, pattern, did2, cid2);
254796
254807
  }
254797
254808
  async serviceAuthHeaders(did2) {
254798
254809
  if (!this.appviewDid) {