@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 +7 -0
- package/dist/index.js +14 -3
- package/dist/index.js.map +2 -2
- package/dist/lexicon/lexicons.d.ts +3 -0
- package/dist/lexicon/types/com/atproto/server/getSession.d.ts +1 -0
- package/package.json +5 -5
- package/src/api/com/atproto/server/getSession.ts +6 -1
- package/src/lexicon/lexicons.ts +3 -0
- package/src/lexicon/types/com/atproto/server/getSession.ts +1 -0
package/CHANGELOG.md
CHANGED
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
|
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
|
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
|
254806
|
+
return import_util97.default.format(this.appviewCdnUrlPattern, pattern, did2, cid2);
|
254796
254807
|
}
|
254797
254808
|
async serviceAuthHeaders(did2) {
|
254798
254809
|
if (!this.appviewDid) {
|