@atproto/pds 0.4.59 → 0.4.61
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +48 -0
- package/dist/account-manager/helpers/account.d.ts +1 -0
- package/dist/account-manager/helpers/account.d.ts.map +1 -1
- package/dist/account-manager/helpers/account.js +15 -1
- package/dist/account-manager/helpers/account.js.map +1 -1
- package/dist/account-manager/helpers/invite.d.ts +1 -1
- package/dist/account-manager/helpers/invite.d.ts.map +1 -1
- package/dist/account-manager/helpers/invite.js +20 -9
- package/dist/account-manager/helpers/invite.js.map +1 -1
- package/dist/account-manager/index.d.ts +2 -0
- package/dist/account-manager/index.d.ts.map +1 -1
- package/dist/account-manager/index.js +8 -1
- package/dist/account-manager/index.js.map +1 -1
- package/dist/api/app/bsky/actor/getProfile.d.ts.map +1 -1
- package/dist/api/app/bsky/actor/getProfile.js +2 -9
- package/dist/api/app/bsky/actor/getProfile.js.map +1 -1
- package/dist/api/app/bsky/actor/getProfiles.d.ts.map +1 -1
- package/dist/api/app/bsky/actor/getProfiles.js +2 -6
- package/dist/api/app/bsky/actor/getProfiles.js.map +1 -1
- package/dist/api/app/bsky/feed/getActorLikes.d.ts.map +1 -1
- package/dist/api/app/bsky/feed/getActorLikes.js +2 -9
- package/dist/api/app/bsky/feed/getActorLikes.js.map +1 -1
- package/dist/api/app/bsky/feed/getAuthorFeed.d.ts.map +1 -1
- package/dist/api/app/bsky/feed/getAuthorFeed.js +2 -9
- package/dist/api/app/bsky/feed/getAuthorFeed.js.map +1 -1
- package/dist/api/app/bsky/feed/getFeed.d.ts.map +1 -1
- package/dist/api/app/bsky/feed/getFeed.js +2 -1
- package/dist/api/app/bsky/feed/getFeed.js.map +1 -1
- package/dist/api/app/bsky/feed/getPostThread.d.ts.map +1 -1
- package/dist/api/app/bsky/feed/getPostThread.js +12 -14
- package/dist/api/app/bsky/feed/getPostThread.js.map +1 -1
- package/dist/api/app/bsky/feed/getTimeline.d.ts.map +1 -1
- package/dist/api/app/bsky/feed/getTimeline.js +2 -6
- package/dist/api/app/bsky/feed/getTimeline.js.map +1 -1
- package/dist/api/com/atproto/admin/getAccountInfo.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/getAccountInfo.js +6 -14
- package/dist/api/com/atproto/admin/getAccountInfo.js.map +1 -1
- package/dist/api/com/atproto/admin/getAccountInfos.d.ts +4 -0
- package/dist/api/com/atproto/admin/getAccountInfos.d.ts.map +1 -0
- package/dist/api/com/atproto/admin/getAccountInfos.js +32 -0
- package/dist/api/com/atproto/admin/getAccountInfos.js.map +1 -0
- package/dist/api/com/atproto/admin/index.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/index.js +2 -0
- package/dist/api/com/atproto/admin/index.js.map +1 -1
- package/dist/api/com/atproto/admin/util.d.ts +17 -0
- package/dist/api/com/atproto/admin/util.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/util.js +27 -1
- package/dist/api/com/atproto/admin/util.js.map +1 -1
- package/dist/api/com/atproto/repo/getRecord.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/getRecord.js +2 -2
- package/dist/api/com/atproto/repo/getRecord.js.map +1 -1
- package/dist/api/com/atproto/server/requestPasswordReset.js +1 -1
- package/dist/api/com/atproto/server/requestPasswordReset.js.map +1 -1
- package/dist/config/config.d.ts +17 -0
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/config.js +11 -1
- package/dist/config/config.js.map +1 -1
- package/dist/config/env.d.ts +7 -1
- package/dist/config/env.d.ts.map +1 -1
- package/dist/config/env.js +9 -1
- package/dist/config/env.js.map +1 -1
- package/dist/context.d.ts +6 -2
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +55 -11
- package/dist/context.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lexicon/index.d.ts +4 -0
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +8 -0
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +118 -0
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +135 -3
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts +2 -0
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/defs.js.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/profile.d.ts +1 -0
- package/dist/lexicon/types/app/bsky/actor/profile.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/profile.js.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/defs.d.ts +13 -2
- package/dist/lexicon/types/app/bsky/feed/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/defs.js +21 -1
- package/dist/lexicon/types/app/bsky/feed/defs.js.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/getAuthorFeed.d.ts +1 -0
- package/dist/lexicon/types/app/bsky/feed/getAuthorFeed.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/graph/getSuggestedFollowsByActor.d.ts +2 -0
- package/dist/lexicon/types/app/bsky/graph/getSuggestedFollowsByActor.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/unspecced/getSuggestionsSkeleton.d.ts +2 -0
- package/dist/lexicon/types/app/bsky/unspecced/getSuggestionsSkeleton.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/repo/getRecord.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/repo/getRecord.d.ts.map +1 -1
- package/dist/lexicon/types/tools/ozone/moderation/getRecords.d.ts +39 -0
- package/dist/lexicon/types/tools/ozone/moderation/getRecords.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/moderation/getRecords.js +3 -0
- package/dist/lexicon/types/tools/ozone/moderation/getRecords.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/moderation/getRepos.d.ts +39 -0
- package/dist/lexicon/types/tools/ozone/moderation/getRepos.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/moderation/getRepos.js +3 -0
- package/dist/lexicon/types/tools/ozone/moderation/getRepos.js.map +1 -0
- package/dist/mailer/index.d.ts +1 -1
- package/dist/mailer/index.d.ts.map +1 -1
- package/dist/mailer/index.js.map +1 -1
- package/dist/mailer/templates/confirm-email.js +1 -1
- package/dist/mailer/templates/confirm-email.js.map +2 -2
- package/dist/mailer/templates/delete-account.js +1 -1
- package/dist/mailer/templates/delete-account.js.map +2 -2
- package/dist/mailer/templates/plc-operation.js +1 -1
- package/dist/mailer/templates/plc-operation.js.map +2 -2
- package/dist/mailer/templates/reset-password.js +1 -1
- package/dist/mailer/templates/reset-password.js.map +2 -2
- package/dist/mailer/templates/update-email.js +1 -1
- package/dist/mailer/templates/update-email.js.map +2 -2
- package/dist/pipethrough.d.ts +26 -26
- package/dist/pipethrough.d.ts.map +1 -1
- package/dist/pipethrough.js +360 -228
- package/dist/pipethrough.js.map +1 -1
- package/dist/read-after-write/util.d.ts +13 -5
- package/dist/read-after-write/util.d.ts.map +1 -1
- package/dist/read-after-write/util.js +37 -22
- package/dist/read-after-write/util.js.map +1 -1
- package/package.json +15 -14
- package/src/account-manager/helpers/account.ts +22 -0
- package/src/account-manager/helpers/invite.ts +19 -9
- package/src/account-manager/index.ts +13 -1
- package/src/api/app/bsky/actor/getProfile.ts +3 -17
- package/src/api/app/bsky/actor/getProfiles.ts +3 -15
- package/src/api/app/bsky/feed/getActorLikes.ts +3 -19
- package/src/api/app/bsky/feed/getAuthorFeed.ts +3 -17
- package/src/api/app/bsky/feed/getFeed.ts +3 -1
- package/src/api/app/bsky/feed/getPostThread.ts +16 -23
- package/src/api/app/bsky/feed/getTimeline.ts +3 -14
- package/src/api/com/atproto/admin/getAccountInfo.ts +6 -13
- package/src/api/com/atproto/admin/getAccountInfos.ts +33 -0
- package/src/api/com/atproto/admin/index.ts +2 -0
- package/src/api/com/atproto/admin/util.ts +38 -0
- package/src/api/com/atproto/repo/getRecord.ts +5 -2
- package/src/api/com/atproto/server/requestPasswordReset.ts +1 -1
- package/src/config/config.ts +31 -1
- package/src/config/env.ts +22 -2
- package/src/context.ts +62 -17
- package/src/index.ts +1 -0
- package/src/lexicon/index.ts +24 -0
- package/src/lexicon/lexicons.ts +137 -3
- package/src/lexicon/types/app/bsky/actor/defs.ts +2 -0
- package/src/lexicon/types/app/bsky/actor/profile.ts +1 -0
- package/src/lexicon/types/app/bsky/feed/defs.ts +38 -2
- package/src/lexicon/types/app/bsky/feed/getAuthorFeed.ts +1 -0
- package/src/lexicon/types/app/bsky/graph/getSuggestedFollowsByActor.ts +2 -0
- package/src/lexicon/types/app/bsky/unspecced/getSuggestionsSkeleton.ts +2 -0
- package/src/lexicon/types/com/atproto/repo/getRecord.ts +1 -0
- package/src/lexicon/types/tools/ozone/moderation/getRecords.ts +50 -0
- package/src/lexicon/types/tools/ozone/moderation/getRepos.ts +50 -0
- package/src/mailer/index.ts +1 -1
- package/src/mailer/templates/confirm-email.hbs +106 -336
- package/src/mailer/templates/delete-account.hbs +110 -346
- package/src/mailer/templates/plc-operation.hbs +107 -338
- package/src/mailer/templates/reset-password.d.ts +1 -1
- package/src/mailer/templates/reset-password.hbs +108 -344
- package/src/mailer/templates/update-email.hbs +107 -337
- package/src/pipethrough.ts +528 -233
- package/src/read-after-write/util.ts +58 -32
- package/tests/account-deletion.test.ts +1 -1
- package/tests/account.test.ts +2 -2
- package/tests/email-confirmation.test.ts +2 -2
- package/tests/plc-operations.test.ts +1 -1
- package/tests/proxied/proxy-catchall.test.ts +255 -0
- package/tests/proxied/proxy-header.test.ts +31 -1
- package/tests/proxied/read-after-write.test.ts +77 -0
package/dist/pipethrough.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipethrough.js","sourceRoot":"","sources":["../src/pipethrough.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,iDAAkC;AAClC,wDAA0B;AAC1B,8DAAgC;AAEhC,8CAAoE;AACpE,sDAK6B;AAC7B,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pC,KAAK,cAAG,CAAC,yBAAyB,CAAC;QACnC,KAAK,cAAG,CAAC,qCAAqC,CAAC;QAC/C,KAAK,cAAG,CAAC,qCAAqC,CAAC;QAC/C,KAAK,cAAG,CAAC,qCAAqC,CAAC;QAC/C,KAAK,cAAG,CAAC,oCAAoC,CAAC;QAC9C,KAAK,cAAG,CAAC,6BAA6B,CAAC;QACvC,KAAK,cAAG,CAAC,4BAA4B,CAAC;QACtC,KAAK,cAAG,CAAC,6BAA6B,CAAC;QACvC,KAAK,cAAG,CAAC,2BAA2B,CAAC;QACrC,KAAK,cAAG,CAAC,+BAA+B,CAAC;QACzC,KAAK,cAAG,CAAC,iCAAiC,CAAC;QAC3C,KAAK,cAAG,CAAC,+BAA+B;YACtC,OAAO,GAAG,CAAC,GAAG,CAAC,UAAU,CAAA;QAC3B,KAAK,cAAG,CAAC,gCAAgC;YACvC,OAAO,GAAG,CAAC,GAAG,CAAC,aAAa,CAAA;QAC9B;YACE,OAAO,GAAG,CAAC,GAAG,CAAC,WAAW,CAAA;IAC9B,CAAC;AACH,CAAC,CAAA;AAED,MAAM,UAAU,GAAG,CAAC,GAAY,EAAsB,EAAE;IACtD,OAAO,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAA;AAClD,CAAC,CAAA;AAED,SAAS,gBAAgB,CAAuB,GAAY;IAC1D,mBAAU,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,EAAE,oCAAoC,CAAC,CAAA;AAChE,CAAC"}
|
@@ -1,10 +1,18 @@
|
|
1
|
-
|
1
|
+
/// <reference types="node" />
|
2
|
+
import { HeadersMap } from '@atproto/xrpc';
|
3
|
+
import { HandlerPipeThrough } from '@atproto/xrpc-server';
|
4
|
+
import express from 'express';
|
2
5
|
import AppContext from '../context';
|
3
6
|
import { HandlerResponse, LocalRecords, MungeFn } from './types';
|
4
|
-
|
5
|
-
export declare const getRepoRev: (headers: Headers) => string | undefined;
|
7
|
+
export declare const getRepoRev: (headers: HeadersMap) => string | undefined;
|
6
8
|
export declare const getLocalLag: (local: LocalRecords) => number | undefined;
|
7
|
-
export declare const
|
8
|
-
|
9
|
+
export declare const pipethroughReadAfterWrite: <T>(ctx: AppContext, reqCtx: {
|
10
|
+
req: express.Request;
|
11
|
+
auth: {
|
12
|
+
credentials: {
|
13
|
+
did: string;
|
14
|
+
};
|
15
|
+
};
|
16
|
+
}, munge: MungeFn<T>) => Promise<HandlerResponse<T> | HandlerPipeThrough>;
|
9
17
|
export declare const formatMungedResponse: <T>(body: T, lag?: number) => HandlerResponse<T>;
|
10
18
|
//# sourceMappingURL=util.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/read-after-write/util.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/read-after-write/util.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EACL,kBAAkB,EAGnB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,OAAO,MAAM,SAAS,CAAA;AAE7B,OAAO,UAAU,MAAM,YAAY,CAAA;AAQnC,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAKhE,eAAO,MAAM,UAAU,YAAa,UAAU,KAAG,MAAM,GAAG,SAEzD,CAAA;AAED,eAAO,MAAM,WAAW,UAAW,YAAY,KAAG,MAAM,GAAG,SAS1D,CAAA;AAED,eAAO,MAAM,yBAAyB,WAC/B,UAAU,UACP;IAAE,GAAG,EAAE,eAAe,CAAC;IAAC,IAAI,EAAE;QAAE,WAAW,EAAE;YAAE,GAAG,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAA;CAAE,SACjE,QAAQ,CAAC,CAAC,KAChB,QAAQ,gBAAgB,CAAC,CAAC,GAAG,kBAAkB,CA4CjD,CAAA;AAED,eAAO,MAAM,oBAAoB,YACzB,CAAC,QACD,MAAM,KACX,gBAAgB,CAAC,CASlB,CAAA"}
|
@@ -1,9 +1,12 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.formatMungedResponse = exports.
|
3
|
+
exports.formatMungedResponse = exports.pipethroughReadAfterWrite = exports.getLocalLag = exports.getRepoRev = void 0;
|
4
|
+
const lexicon_1 = require("@atproto/lexicon");
|
5
|
+
const xrpc_server_1 = require("@atproto/xrpc-server");
|
6
|
+
const lexicons_1 = require("../lexicon/lexicons");
|
4
7
|
const logger_1 = require("../logger");
|
5
|
-
const viewer_1 = require("./viewer");
|
6
8
|
const pipethrough_1 = require("../pipethrough");
|
9
|
+
const viewer_1 = require("./viewer");
|
7
10
|
const REPO_REV_HEADER = 'atproto-repo-rev';
|
8
11
|
const getRepoRev = (headers) => {
|
9
12
|
return headers[REPO_REV_HEADER];
|
@@ -21,32 +24,44 @@ const getLocalLag = (local) => {
|
|
21
24
|
return Date.now() - new Date(oldest).getTime();
|
22
25
|
};
|
23
26
|
exports.getLocalLag = getLocalLag;
|
24
|
-
const
|
27
|
+
const pipethroughReadAfterWrite = async (ctx, reqCtx, munge) => {
|
28
|
+
const { req, auth } = reqCtx;
|
29
|
+
const requester = auth.credentials.did;
|
30
|
+
const streamRes = await (0, pipethrough_1.pipethrough)(ctx, req, { iss: requester });
|
31
|
+
const rev = (0, exports.getRepoRev)(streamRes.headers);
|
32
|
+
if (!rev)
|
33
|
+
return streamRes;
|
34
|
+
if ((0, pipethrough_1.isJsonContentType)(streamRes.headers['content-type']) === false) {
|
35
|
+
// content-type is present but not JSON, we can't munge this
|
36
|
+
return streamRes;
|
37
|
+
}
|
38
|
+
// if the munging fails, we can't return the original response because the
|
39
|
+
// stream will already have been read. If we end-up buffering the response,
|
40
|
+
// we'll return the buffered response in case of an error.
|
41
|
+
let bufferRes;
|
25
42
|
try {
|
26
|
-
|
43
|
+
const lxm = (0, xrpc_server_1.parseReqNsid)(req);
|
44
|
+
return await ctx.actorStore.read(requester, async (store) => {
|
45
|
+
const local = await (0, viewer_1.getRecordsSinceRev)(store, rev);
|
46
|
+
if (local.count === 0)
|
47
|
+
return streamRes;
|
48
|
+
const { buffer } = (bufferRes = await (0, pipethrough_1.asPipeThroughBuffer)(streamRes));
|
49
|
+
const lex = (0, lexicon_1.jsonToLex)(JSON.parse(buffer.toString('utf8')));
|
50
|
+
const parsedRes = lexicons_1.lexicons.assertValidXrpcOutput(lxm, lex);
|
51
|
+
const localViewer = ctx.localViewer(store);
|
52
|
+
const data = await munge(localViewer, parsedRes, local, requester);
|
53
|
+
return (0, exports.formatMungedResponse)(data, (0, exports.getLocalLag)(local));
|
54
|
+
});
|
27
55
|
}
|
28
56
|
catch (err) {
|
57
|
+
// The error occurred while reading the stream, this is non-recoverable
|
58
|
+
if (!bufferRes && !streamRes.stream.readable)
|
59
|
+
throw err;
|
29
60
|
logger_1.readStickyLogger.warn({ err, requester }, 'error in read after write munge');
|
30
|
-
return
|
61
|
+
return bufferRes ?? streamRes;
|
31
62
|
}
|
32
63
|
};
|
33
|
-
exports.
|
34
|
-
const readAfterWriteInternal = async (ctx, nsid, requester, res, munge) => {
|
35
|
-
const rev = (0, exports.getRepoRev)(res.headers ?? {});
|
36
|
-
if (!rev)
|
37
|
-
return res;
|
38
|
-
return ctx.actorStore.read(requester, async (store) => {
|
39
|
-
const local = await (0, viewer_1.getRecordsSinceRev)(store, rev);
|
40
|
-
if (local.count === 0) {
|
41
|
-
return res;
|
42
|
-
}
|
43
|
-
const localViewer = ctx.localViewer(store);
|
44
|
-
const parsedRes = (0, pipethrough_1.parseRes)(nsid, res);
|
45
|
-
const data = await munge(localViewer, parsedRes, local, requester);
|
46
|
-
return (0, exports.formatMungedResponse)(data, (0, exports.getLocalLag)(local));
|
47
|
-
});
|
48
|
-
};
|
49
|
-
exports.readAfterWriteInternal = readAfterWriteInternal;
|
64
|
+
exports.pipethroughReadAfterWrite = pipethroughReadAfterWrite;
|
50
65
|
const formatMungedResponse = (body, lag) => ({
|
51
66
|
encoding: 'application/json',
|
52
67
|
body,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/read-after-write/util.ts"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/read-after-write/util.ts"],"names":[],"mappings":";;;AAAA,8CAA4C;AAE5C,sDAI6B;AAI7B,kDAA8C;AAC9C,sCAAmD;AACnD,gDAIuB;AAEvB,qCAA6C;AAE7C,MAAM,eAAe,GAAG,kBAAkB,CAAA;AAEnC,MAAM,UAAU,GAAG,CAAC,OAAmB,EAAsB,EAAE;IACpE,OAAO,OAAO,CAAC,eAAe,CAAC,CAAA;AACjC,CAAC,CAAA;AAFY,QAAA,UAAU,cAEtB;AAEM,MAAM,WAAW,GAAG,CAAC,KAAmB,EAAsB,EAAE;IACrE,IAAI,MAAM,GAAuB,KAAK,CAAC,OAAO,EAAE,SAAS,CAAA;IACzD,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;QAC/B,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,SAAS,GAAG,MAAM,EAAE,CAAC;YACvC,MAAM,GAAG,IAAI,CAAC,SAAS,CAAA;QACzB,CAAC;IACH,CAAC;IACD,IAAI,CAAC,MAAM;QAAE,OAAO,SAAS,CAAA;IAC7B,OAAO,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,CAAA;AAChD,CAAC,CAAA;AATY,QAAA,WAAW,eASvB;AAEM,MAAM,yBAAyB,GAAG,KAAK,EAC5C,GAAe,EACf,MAAwE,EACxE,KAAiB,EACiC,EAAE;IACpD,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,MAAM,CAAA;IAC5B,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,GAA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SAAS,EAAE,KAAK,EAAE,SAAS,CAAC,CAAA;YAClE,OAAO,IAAA,4BAAoB,EAAC,IAAI,EAAE,IAAA,mBAAW,EAAC,KAAK,CAAC,CAAC,CAAA;QACvD,CAAC,CAAC,CAAA;IACJ,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,uEAAuE;QACvE,IAAI,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ;YAAE,MAAM,GAAG,CAAA;QAEvD,yBAAG,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,iCAAiC,CAAC,CAAA;QAC/D,OAAO,SAAS,IAAI,SAAS,CAAA;IAC/B,CAAC;AACH,CAAC,CAAA;AAhDY,QAAA,yBAAyB,6BAgDrC;AAEM,MAAM,oBAAoB,GAAG,CAClC,IAAO,EACP,GAAY,EACQ,EAAE,CAAC,CAAC;IACxB,QAAQ,EAAE,kBAAkB;IAC5B,IAAI;IACJ,OAAO,EACL,GAAG,KAAK,SAAS;QACf,CAAC,CAAC;YACE,sBAAsB,EAAE,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;SACzC;QACH,CAAC,CAAC,SAAS;CAChB,CAAC,CAAA;AAZW,QAAA,oBAAoB,wBAY/B"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atproto/pds",
|
3
|
-
"version": "0.4.
|
3
|
+
"version": "0.4.61",
|
4
4
|
"license": "MIT",
|
5
5
|
"description": "Reference implementation of atproto Personal Data Server (PDS)",
|
6
6
|
"keywords": [
|
@@ -42,19 +42,20 @@
|
|
42
42
|
"sharp": "^0.32.6",
|
43
43
|
"typed-emitter": "^2.1.0",
|
44
44
|
"uint8arrays": "3.0.0",
|
45
|
+
"undici": "^6.19.8",
|
45
46
|
"zod": "^3.23.8",
|
46
|
-
"@atproto-labs/fetch-node": "0.1.
|
47
|
-
"@atproto/api": "^0.13.
|
48
|
-
"@atproto/aws": "^0.2.
|
49
|
-
"@atproto/common": "^0.4.
|
47
|
+
"@atproto-labs/fetch-node": "0.1.1",
|
48
|
+
"@atproto/api": "^0.13.9",
|
49
|
+
"@atproto/aws": "^0.2.7",
|
50
|
+
"@atproto/common": "^0.4.4",
|
50
51
|
"@atproto/crypto": "^0.4.1",
|
51
|
-
"@atproto/identity": "^0.4.
|
52
|
-
"@atproto/lexicon": "^0.4.
|
53
|
-
"@atproto/oauth-provider": "^0.2.
|
54
|
-
"@atproto/repo": "^0.5.
|
52
|
+
"@atproto/identity": "^0.4.2",
|
53
|
+
"@atproto/lexicon": "^0.4.2",
|
54
|
+
"@atproto/oauth-provider": "^0.2.3",
|
55
|
+
"@atproto/repo": "^0.5.3",
|
55
56
|
"@atproto/syntax": "^0.3.0",
|
56
|
-
"@atproto/xrpc": "^0.6.
|
57
|
-
"@atproto/xrpc-server": "^0.
|
57
|
+
"@atproto/xrpc": "^0.6.3",
|
58
|
+
"@atproto/xrpc-server": "^0.7.1"
|
58
59
|
},
|
59
60
|
"devDependencies": {
|
60
61
|
"@atproto/pds-entryway": "npm:@atproto/pds@0.3.0-entryway.3",
|
@@ -72,9 +73,9 @@
|
|
72
73
|
"jest": "^28.1.2",
|
73
74
|
"ts-node": "^10.8.2",
|
74
75
|
"ws": "^8.12.0",
|
75
|
-
"@atproto/api": "^0.13.
|
76
|
-
"@atproto/bsky": "^0.0.
|
77
|
-
"@atproto/lex-cli": "^0.5.
|
76
|
+
"@atproto/api": "^0.13.9",
|
77
|
+
"@atproto/bsky": "^0.0.85",
|
78
|
+
"@atproto/lex-cli": "^0.5.1"
|
78
79
|
},
|
79
80
|
"scripts": {
|
80
81
|
"codegen": "lex gen-server --yes ./src/lexicon ../../lexicons/com/atproto/*/* ../../lexicons/app/bsky/*/* ../../lexicons/chat/bsky/*/* ../../lexicons/tools/ozone/*/*",
|
@@ -64,6 +64,28 @@ export const getAccount = async (
|
|
64
64
|
return found || null
|
65
65
|
}
|
66
66
|
|
67
|
+
export const getAccounts = async (
|
68
|
+
db: AccountDb,
|
69
|
+
dids: string[],
|
70
|
+
flags?: AvailabilityFlags,
|
71
|
+
): Promise<Map<string, ActorAccount>> => {
|
72
|
+
const results = new Map<string, ActorAccount>()
|
73
|
+
|
74
|
+
if (!dids.length) {
|
75
|
+
return results
|
76
|
+
}
|
77
|
+
|
78
|
+
const accounts = await selectAccountQB(db, flags)
|
79
|
+
.where('actor.did', 'in', dids)
|
80
|
+
.execute()
|
81
|
+
|
82
|
+
accounts.forEach((account) => {
|
83
|
+
results.set(account.did, account)
|
84
|
+
})
|
85
|
+
|
86
|
+
return results
|
87
|
+
}
|
88
|
+
|
67
89
|
export const getAccountByEmail = async (
|
68
90
|
db: AccountDb,
|
69
91
|
email: string,
|
@@ -139,20 +139,30 @@ export const selectInviteCodesQb = (db: AccountDb) => {
|
|
139
139
|
return db.db.selectFrom(builder.as('codes')).selectAll()
|
140
140
|
}
|
141
141
|
|
142
|
-
export const
|
142
|
+
export const getAccountsInviteCodes = async (
|
143
143
|
db: AccountDb,
|
144
|
-
|
145
|
-
): Promise<CodeDetail[]
|
144
|
+
dids: string[],
|
145
|
+
): Promise<Map<string, CodeDetail[]>> => {
|
146
|
+
const results = new Map<string, CodeDetail[]>()
|
147
|
+
// We don't want to pass an empty array to kysely and let's avoid running a query entirely if there is nothing to match for
|
148
|
+
if (!dids.length) return results
|
146
149
|
const res = await selectInviteCodesQb(db)
|
147
|
-
.where('forAccount', '
|
150
|
+
.where('forAccount', 'in', dids)
|
148
151
|
.execute()
|
149
152
|
const codes = res.map((row) => row.code)
|
150
153
|
const uses = await getInviteCodesUses(db, codes)
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
154
|
+
res.forEach((row) => {
|
155
|
+
const existing = results.get(row.forAccount) ?? []
|
156
|
+
results.set(row.forAccount, [
|
157
|
+
...existing,
|
158
|
+
{
|
159
|
+
...row,
|
160
|
+
uses: uses[row.code] ?? [],
|
161
|
+
disabled: row.disabled === 1,
|
162
|
+
},
|
163
|
+
])
|
164
|
+
})
|
165
|
+
return results
|
156
166
|
}
|
157
167
|
|
158
168
|
export const getInviteCodesUses = async (
|
@@ -78,6 +78,13 @@ export class AccountManager
|
|
78
78
|
return account.getAccount(this.db, handleOrDid, flags)
|
79
79
|
}
|
80
80
|
|
81
|
+
async getAccounts(
|
82
|
+
dids: string[],
|
83
|
+
flags?: account.AvailabilityFlags,
|
84
|
+
): Promise<Map<string, ActorAccount>> {
|
85
|
+
return account.getAccounts(this.db, dids, flags)
|
86
|
+
}
|
87
|
+
|
81
88
|
async getAccountByEmail(
|
82
89
|
email: string,
|
83
90
|
flags?: account.AvailabilityFlags,
|
@@ -397,7 +404,12 @@ export class AccountManager
|
|
397
404
|
}
|
398
405
|
|
399
406
|
async getAccountInvitesCodes(did: string) {
|
400
|
-
|
407
|
+
const inviteCodes = await invite.getAccountsInviteCodes(this.db, [did])
|
408
|
+
return inviteCodes.get(did) ?? []
|
409
|
+
}
|
410
|
+
|
411
|
+
async getAccountsInvitesCodes(dids: string[]) {
|
412
|
+
return invite.getAccountsInviteCodes(this.db, dids)
|
401
413
|
}
|
402
414
|
|
403
415
|
async getInvitedByForAccounts(dids: string[]) {
|
@@ -4,30 +4,16 @@ import { OutputSchema } from '../../../../lexicon/types/app/bsky/actor/getProfil
|
|
4
4
|
import {
|
5
5
|
LocalViewer,
|
6
6
|
LocalRecords,
|
7
|
-
|
7
|
+
pipethroughReadAfterWrite,
|
8
8
|
} from '../../../../read-after-write'
|
9
|
-
import { pipethrough } from '../../../../pipethrough'
|
10
|
-
|
11
|
-
const METHOD_NSID = 'app.bsky.actor.getProfile'
|
12
9
|
|
13
10
|
export default function (server: Server, ctx: AppContext) {
|
14
11
|
const { bskyAppView } = ctx.cfg
|
15
12
|
if (!bskyAppView) return
|
16
13
|
server.app.bsky.actor.getProfile({
|
17
14
|
auth: ctx.authVerifier.accessStandard(),
|
18
|
-
handler: async (
|
19
|
-
|
20
|
-
const res = await pipethrough(ctx, req, requester)
|
21
|
-
if (!requester) {
|
22
|
-
return res
|
23
|
-
}
|
24
|
-
return handleReadAfterWrite(
|
25
|
-
ctx,
|
26
|
-
METHOD_NSID,
|
27
|
-
requester,
|
28
|
-
res,
|
29
|
-
getProfileMunge,
|
30
|
-
)
|
15
|
+
handler: async (reqCtx) => {
|
16
|
+
return pipethroughReadAfterWrite(ctx, reqCtx, getProfileMunge)
|
31
17
|
},
|
32
18
|
})
|
33
19
|
}
|
@@ -1,31 +1,19 @@
|
|
1
1
|
import AppContext from '../../../../context'
|
2
2
|
import { Server } from '../../../../lexicon'
|
3
3
|
import { OutputSchema } from '../../../../lexicon/types/app/bsky/actor/getProfiles'
|
4
|
-
import { pipethrough } from '../../../../pipethrough'
|
5
4
|
import {
|
6
5
|
LocalViewer,
|
7
|
-
|
6
|
+
pipethroughReadAfterWrite,
|
8
7
|
LocalRecords,
|
9
8
|
} from '../../../../read-after-write'
|
10
9
|
|
11
|
-
const METHOD_NSID = 'app.bsky.actor.getProfiles'
|
12
|
-
|
13
10
|
export default function (server: Server, ctx: AppContext) {
|
14
11
|
const { bskyAppView } = ctx.cfg
|
15
12
|
if (!bskyAppView) return
|
16
13
|
server.app.bsky.actor.getProfiles({
|
17
14
|
auth: ctx.authVerifier.accessStandard(),
|
18
|
-
handler: async (
|
19
|
-
|
20
|
-
|
21
|
-
const res = await pipethrough(ctx, req, requester)
|
22
|
-
return handleReadAfterWrite(
|
23
|
-
ctx,
|
24
|
-
METHOD_NSID,
|
25
|
-
requester,
|
26
|
-
res,
|
27
|
-
getProfilesMunge,
|
28
|
-
)
|
15
|
+
handler: async (reqCtx) => {
|
16
|
+
return pipethroughReadAfterWrite(ctx, reqCtx, getProfilesMunge)
|
29
17
|
},
|
30
18
|
})
|
31
19
|
}
|
@@ -3,33 +3,17 @@ import AppContext from '../../../../context'
|
|
3
3
|
import { OutputSchema } from '../../../../lexicon/types/app/bsky/feed/getAuthorFeed'
|
4
4
|
import {
|
5
5
|
LocalViewer,
|
6
|
-
|
6
|
+
pipethroughReadAfterWrite,
|
7
7
|
LocalRecords,
|
8
8
|
} from '../../../../read-after-write'
|
9
|
-
import { pipethrough } from '../../../../pipethrough'
|
10
|
-
|
11
|
-
const METHOD_NSID = 'app.bsky.feed.getActorLikes'
|
12
9
|
|
13
10
|
export default function (server: Server, ctx: AppContext) {
|
14
11
|
const { bskyAppView } = ctx.cfg
|
15
12
|
if (!bskyAppView) return
|
16
13
|
server.app.bsky.feed.getActorLikes({
|
17
14
|
auth: ctx.authVerifier.accessStandard(),
|
18
|
-
handler: async (
|
19
|
-
|
20
|
-
const res = await pipethrough(ctx, req, requester)
|
21
|
-
|
22
|
-
if (!requester) {
|
23
|
-
return res
|
24
|
-
}
|
25
|
-
|
26
|
-
return await handleReadAfterWrite(
|
27
|
-
ctx,
|
28
|
-
METHOD_NSID,
|
29
|
-
requester,
|
30
|
-
res,
|
31
|
-
getAuthorMunge,
|
32
|
-
)
|
15
|
+
handler: async (reqCtx) => {
|
16
|
+
return pipethroughReadAfterWrite(ctx, reqCtx, getAuthorMunge)
|
33
17
|
},
|
34
18
|
})
|
35
19
|
}
|
@@ -4,31 +4,17 @@ import { OutputSchema } from '../../../../lexicon/types/app/bsky/feed/getAuthorF
|
|
4
4
|
import { isReasonRepost } from '../../../../lexicon/types/app/bsky/feed/defs'
|
5
5
|
import {
|
6
6
|
LocalViewer,
|
7
|
-
|
7
|
+
pipethroughReadAfterWrite,
|
8
8
|
LocalRecords,
|
9
9
|
} from '../../../../read-after-write'
|
10
|
-
import { pipethrough } from '../../../../pipethrough'
|
11
|
-
|
12
|
-
const METHOD_NSID = 'app.bsky.feed.getAuthorFeed'
|
13
10
|
|
14
11
|
export default function (server: Server, ctx: AppContext) {
|
15
12
|
const { bskyAppView } = ctx.cfg
|
16
13
|
if (!bskyAppView) return
|
17
14
|
server.app.bsky.feed.getAuthorFeed({
|
18
15
|
auth: ctx.authVerifier.accessStandard(),
|
19
|
-
handler: async (
|
20
|
-
|
21
|
-
const res = await pipethrough(ctx, req, requester)
|
22
|
-
if (!requester) {
|
23
|
-
return res
|
24
|
-
}
|
25
|
-
return await handleReadAfterWrite(
|
26
|
-
ctx,
|
27
|
-
METHOD_NSID,
|
28
|
-
requester,
|
29
|
-
res,
|
30
|
-
getAuthorMunge,
|
31
|
-
)
|
16
|
+
handler: async (reqCtx) => {
|
17
|
+
return pipethroughReadAfterWrite(ctx, reqCtx, getAuthorMunge)
|
32
18
|
},
|
33
19
|
})
|
34
20
|
}
|
@@ -20,7 +20,9 @@ export default function (server: Server, ctx: AppContext) {
|
|
20
20
|
ids.AppBskyFeedGetFeedGenerator,
|
21
21
|
),
|
22
22
|
)
|
23
|
-
|
23
|
+
|
24
|
+
return pipethrough(ctx, req, {
|
25
|
+
iss: requester,
|
24
26
|
aud: feed.view.did,
|
25
27
|
lxm: ids.AppBskyFeedGetFeedSkeleton,
|
26
28
|
})
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import assert from 'node:assert'
|
2
2
|
import { AtUri } from '@atproto/syntax'
|
3
|
-
import {
|
3
|
+
import { XRPCError } from '@atproto/xrpc'
|
4
|
+
|
4
5
|
import { Server } from '../../../../lexicon'
|
5
6
|
import AppContext from '../../../../context'
|
6
7
|
import {
|
@@ -18,35 +19,30 @@ import {
|
|
18
19
|
getRepoRev,
|
19
20
|
LocalRecords,
|
20
21
|
RecordDescript,
|
21
|
-
|
22
|
+
pipethroughReadAfterWrite,
|
22
23
|
formatMungedResponse,
|
23
24
|
} from '../../../../read-after-write'
|
24
|
-
import { pipethrough } from '../../../../pipethrough'
|
25
25
|
import { ids } from '../../../../lexicon/lexicons'
|
26
26
|
|
27
|
-
const METHOD_NSID = 'app.bsky.feed.getPostThread'
|
28
|
-
|
29
27
|
export default function (server: Server, ctx: AppContext) {
|
30
28
|
const { bskyAppView } = ctx.cfg
|
31
29
|
if (!bskyAppView) return
|
32
30
|
server.app.bsky.feed.getPostThread({
|
33
31
|
auth: ctx.authVerifier.accessStandard(),
|
34
|
-
handler: async (
|
35
|
-
const requester = auth.credentials.did
|
36
|
-
|
32
|
+
handler: async (reqCtx) => {
|
37
33
|
try {
|
38
|
-
|
39
|
-
|
40
|
-
return await handleReadAfterWrite(
|
41
|
-
ctx,
|
42
|
-
METHOD_NSID,
|
43
|
-
requester,
|
44
|
-
res,
|
45
|
-
getPostThreadMunge,
|
46
|
-
)
|
34
|
+
return await pipethroughReadAfterWrite(ctx, reqCtx, getPostThreadMunge)
|
47
35
|
} catch (err) {
|
48
36
|
if (err instanceof XRPCError && err.error === 'NotFound') {
|
49
|
-
const
|
37
|
+
const { auth, params } = reqCtx
|
38
|
+
const requester = auth.credentials.did
|
39
|
+
|
40
|
+
const rev = err.headers && getRepoRev(err.headers)
|
41
|
+
if (!rev) throw err
|
42
|
+
|
43
|
+
const uri = new AtUri(params.uri)
|
44
|
+
if (uri.hostname !== requester) throw err
|
45
|
+
|
50
46
|
const local = await ctx.actorStore.read(requester, (store) => {
|
51
47
|
const localViewer = ctx.localViewer(store)
|
52
48
|
return readAfterWriteNotFound(
|
@@ -54,7 +50,7 @@ export default function (server: Server, ctx: AppContext) {
|
|
54
50
|
localViewer,
|
55
51
|
params,
|
56
52
|
requester,
|
57
|
-
|
53
|
+
rev,
|
58
54
|
)
|
59
55
|
})
|
60
56
|
if (local === null) {
|
@@ -168,11 +164,8 @@ const readAfterWriteNotFound = async (
|
|
168
164
|
localViewer: LocalViewer,
|
169
165
|
params: QueryParams,
|
170
166
|
requester: string,
|
171
|
-
|
167
|
+
rev: string,
|
172
168
|
): Promise<{ data: OutputSchema; lag?: number } | null> => {
|
173
|
-
if (!headers) return null
|
174
|
-
const rev = getRepoRev(headers)
|
175
|
-
if (!rev) return null
|
176
169
|
const uri = new AtUri(params.uri)
|
177
170
|
if (uri.hostname !== requester) {
|
178
171
|
return null
|
@@ -3,28 +3,17 @@ import AppContext from '../../../../context'
|
|
3
3
|
import { OutputSchema } from '../../../../lexicon/types/app/bsky/feed/getTimeline'
|
4
4
|
import {
|
5
5
|
LocalViewer,
|
6
|
-
|
6
|
+
pipethroughReadAfterWrite,
|
7
7
|
LocalRecords,
|
8
8
|
} from '../../../../read-after-write'
|
9
|
-
import { pipethrough } from '../../../../pipethrough'
|
10
|
-
|
11
|
-
const METHOD_NSID = 'app.bsky.feed.getTimeline'
|
12
9
|
|
13
10
|
export default function (server: Server, ctx: AppContext) {
|
14
11
|
const { bskyAppView } = ctx.cfg
|
15
12
|
if (!bskyAppView) return
|
16
13
|
server.app.bsky.feed.getTimeline({
|
17
14
|
auth: ctx.authVerifier.accessStandard(),
|
18
|
-
handler: async (
|
19
|
-
|
20
|
-
const res = await pipethrough(ctx, req, requester)
|
21
|
-
return await handleReadAfterWrite(
|
22
|
-
ctx,
|
23
|
-
METHOD_NSID,
|
24
|
-
requester,
|
25
|
-
res,
|
26
|
-
getTimelineMunge,
|
27
|
-
)
|
15
|
+
handler: async (reqCtx) => {
|
16
|
+
return pipethroughReadAfterWrite(ctx, reqCtx, getTimelineMunge)
|
28
17
|
},
|
29
18
|
})
|
30
19
|
}
|
@@ -2,6 +2,7 @@ import { Server } from '../../../../lexicon'
|
|
2
2
|
import AppContext from '../../../../context'
|
3
3
|
import { InvalidRequestError } from '@atproto/xrpc-server'
|
4
4
|
import { INVALID_HANDLE } from '@atproto/syntax'
|
5
|
+
import { formatAccountInfo } from './util'
|
5
6
|
|
6
7
|
export default function (server: Server, ctx: AppContext) {
|
7
8
|
server.com.atproto.admin.getAccountInfo({
|
@@ -21,19 +22,11 @@ export default function (server: Server, ctx: AppContext) {
|
|
21
22
|
const managesOwnInvites = !ctx.cfg.entryway
|
22
23
|
return {
|
23
24
|
encoding: 'application/json',
|
24
|
-
body: {
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
emailConfirmedAt: account.emailConfirmedAt ?? undefined,
|
30
|
-
invitedBy: managesOwnInvites ? invitedBy[params.did] : undefined,
|
31
|
-
invites: managesOwnInvites ? invites : undefined,
|
32
|
-
invitesDisabled: managesOwnInvites
|
33
|
-
? account.invitesDisabled === 1
|
34
|
-
: undefined,
|
35
|
-
deactivatedAt: account.deactivatedAt ?? undefined,
|
36
|
-
},
|
25
|
+
body: formatAccountInfo(account, {
|
26
|
+
managesOwnInvites,
|
27
|
+
invitedBy,
|
28
|
+
invites,
|
29
|
+
}),
|
37
30
|
}
|
38
31
|
},
|
39
32
|
})
|