@atproto/pds 0.4.105 → 0.4.106

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.
@@ -5,6 +5,7 @@ import express from 'express';
5
5
  import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
6
6
  import type * as ToolsOzoneTeamDefs from './defs.js';
7
7
  export interface QueryParams {
8
+ q?: string;
8
9
  disabled?: boolean;
9
10
  roles?: string[];
10
11
  limit: number;
@@ -1 +1 @@
1
- {"version":3,"file":"listMembers.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/tools/ozone/team/listMembers.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAK7B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAO,KAAK,KAAK,kBAAkB,MAAM,WAAW,CAAA;AAMpD,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,kBAAkB,CAAC,MAAM,EAAE,CAAA;CACrC;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,CAAA;AAEpC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;A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Ac;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,GAAG,kBAAkB,CAAA;AAC9E,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI;IAC1D,IAAI,EAAE,EAAE,CAAA;IACR,MAAM,EAAE,WAAW,CAAA;IACnB,KAAK,EAAE,YAAY,CAAA;IACnB,GAAG,EAAE,OAAO,CAAC,OAAO,CAAA;IACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAA;IACrB,oBAAoB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC1C,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI,CACpD,GAAG,EAAE,aAAa,CAAC,EAAE,CAAC,KACnB,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAA"}
@@ -4,6 +4,7 @@ import { CommitDataWithOps, SyncEvtData } from '../repo';
4
4
  import { RepoSeqInsert } from './db';
5
5
  export declare const formatSeqCommit: (did: string, commitData: CommitDataWithOps) => Promise<RepoSeqInsert>;
6
6
  export declare const formatSeqSyncEvt: (did: string, data: SyncEvtData) => Promise<RepoSeqInsert>;
7
+ export declare const syncEvtDataFromCommit: (commitData: CommitDataWithOps) => SyncEvtData;
7
8
  export declare const formatSeqIdentityEvt: (did: string, handle?: string) => Promise<RepoSeqInsert>;
8
9
  export declare const formatSeqAccountEvt: (did: string, status: AccountStatus) => Promise<RepoSeqInsert>;
9
10
  export declare const commitEvtOp: z.ZodObject<{
@@ -19,8 +20,8 @@ export declare const commitEvtOp: z.ZodObject<{
19
20
  }, {
20
21
  path: string;
21
22
  action: "create" | "delete" | "update";
22
- prev?: any;
23
23
  cid?: any;
24
+ prev?: any;
24
25
  }>;
25
26
  export type CommitEvtOp = z.infer<typeof commitEvtOp>;
26
27
  export declare const commitEvt: z.ZodObject<{
@@ -44,8 +45,8 @@ export declare const commitEvt: z.ZodObject<{
44
45
  }, {
45
46
  path: string;
46
47
  action: "create" | "delete" | "update";
47
- prev?: any;
48
48
  cid?: any;
49
+ prev?: any;
49
50
  }>, "many">;
50
51
  blobs: z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodAny, any, any>, import("multiformats/cid").CID, any>, "many">;
51
52
  prevData: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodAny, any, any>, import("multiformats/cid").CID, any>>;
@@ -76,8 +77,8 @@ export declare const commitEvt: z.ZodObject<{
76
77
  ops: {
77
78
  path: string;
78
79
  action: "create" | "delete" | "update";
79
- prev?: any;
80
80
  cid?: any;
81
+ prev?: any;
81
82
  }[];
82
83
  commit?: any;
83
84
  prevData?: any;
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/sequencer/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAClE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,MAAM,CAAA;AAEpC,eAAO,MAAM,eAAe,QACrB,MAAM,cACC,iBAAiB,KAC5B,OAAO,CAAC,aAAa,CAyBvB,CAAA;AAED,eAAO,MAAM,gBAAgB,QACtB,MAAM,QACL,WAAW,KAChB,OAAO,CAAC,aAAa,CAavB,CAAA;AAED,eAAO,MAAM,oBAAoB,QAC1B,MAAM,WACF,MAAM,KACd,OAAO,CAAC,aAAa,CAavB,CAAA;AAED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;AAEjD,eAAO,MAAM,OAAO;;;;;;;;;;;;EAIlB,CAAA;AACF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAA;AAE7C,eAAO,MAAM,WAAW;;;;;;;;;EAGtB,CAAA;AACF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAA;AAErD,eAAO,MAAM,UAAU;;;;;;;;;;;;EAWrB,CAAA;AACF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAA;AAEnD,KAAK,cAAc,GAAG;IACpB,IAAI,EAAE,QAAQ,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,SAAS,CAAA;CACf,CAAA;AACD,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,OAAO,CAAA;CACb,CAAA;AACD,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,UAAU,CAAA;IAChB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,WAAW,CAAA;CACjB,CAAA;AACD,KAAK,eAAe,GAAG;IACrB,IAAI,EAAE,SAAS,CAAA;IACf,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,UAAU,CAAA;CAChB,CAAA;AACD,MAAM,MAAM,MAAM,GACd,cAAc,GACd,YAAY,GACZ,gBAAgB,GAChB,eAAe,CAAA"}
@@ -1,6 +1,10 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.accountEvt = exports.identityEvt = exports.syncEvt = exports.commitEvt = exports.commitEvtOp = exports.formatSeqAccountEvt = exports.formatSeqIdentityEvt = exports.formatSeqSyncEvt = exports.formatSeqCommit = void 0;
6
+ exports.accountEvt = exports.identityEvt = exports.syncEvt = exports.commitEvt = exports.commitEvtOp = exports.formatSeqAccountEvt = exports.formatSeqIdentityEvt = exports.syncEvtDataFromCommit = exports.formatSeqSyncEvt = exports.formatSeqCommit = void 0;
7
+ const node_assert_1 = __importDefault(require("node:assert"));
4
8
  const zod_1 = require("zod");
5
9
  const common_1 = require("@atproto/common");
6
10
  const repo_1 = require("@atproto/repo");
@@ -45,6 +49,18 @@ const formatSeqSyncEvt = async (did, data) => {
45
49
  };
46
50
  };
47
51
  exports.formatSeqSyncEvt = formatSeqSyncEvt;
52
+ const syncEvtDataFromCommit = (commitData) => {
53
+ const { blocks, missing } = commitData.relevantBlocks.getMany([
54
+ commitData.cid,
55
+ ]);
56
+ (0, node_assert_1.default)(!missing.length, 'commit block was not found, could not build sync event');
57
+ return {
58
+ rev: commitData.rev,
59
+ cid: commitData.cid,
60
+ blocks,
61
+ };
62
+ };
63
+ exports.syncEvtDataFromCommit = syncEvtDataFromCommit;
48
64
  const formatSeqIdentityEvt = async (did, handle) => {
49
65
  const evt = {
50
66
  did,
@@ -1 +1 @@
1
- {"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/sequencer/events.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AACvB,4CAAqE;AACrE,wCAAyD;AACzD,wEAAkE;AAI3D,MAAM,eAAe,GAAG,KAAK,EAClC,GAAW,EACX,UAA6B,EACL,EAAE;IAC1B,MAAM,YAAY,GAAG,IAAI,eAAQ,EAAE,CAAA;IACnC,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAA;IACzC,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,CAAA;IAE9C,MAAM,GAAG,GAAG;QACV,IAAI,EAAE,GAAG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AAC,CAAC,MAAM,EAAE;IACf,MAAM,EAAE,eAAM,CAAC,KAAK;IACpB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;CAChB,CAAC,CAAA;AAGW,QAAA,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IAClC,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAA;AAGW,QAAA,UAAU,GAAG,OAAC,CAAC,MAAM,CAAC;IACjC,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,MAAM,EAAE,OAAC,CAAC,OAAO,EAAE;IACnB,MAAM,EAAE,OAAC;SACN,IAAI,CAAC;QACJ,+BAAa,CAAC,SAAS;QACvB,+BAAa,CAAC,SAAS;QACvB,+BAAa,CAAC,OAAO;QACrB,+BAAa,CAAC,WAAW;KAC1B,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/pds",
3
- "version": "0.4.105",
3
+ "version": "0.4.106",
4
4
  "license": "MIT",
5
5
  "description": "Reference implementation of atproto Personal Data Server (PDS)",
6
6
  "keywords": [
@@ -50,13 +50,13 @@
50
50
  "zod": "^3.23.8",
51
51
  "@atproto-labs/fetch-node": "0.1.8",
52
52
  "@atproto-labs/xrpc-utils": "0.0.8",
53
- "@atproto/api": "^0.14.8",
53
+ "@atproto/api": "^0.14.9",
54
54
  "@atproto/aws": "^0.2.17",
55
55
  "@atproto/common": "^0.4.8",
56
56
  "@atproto/crypto": "^0.4.4",
57
57
  "@atproto/identity": "^0.4.6",
58
58
  "@atproto/lexicon": "^0.4.8",
59
- "@atproto/oauth-provider": "^0.5.0",
59
+ "@atproto/oauth-provider": "^0.5.1",
60
60
  "@atproto/repo": "^0.7.1",
61
61
  "@atproto/syntax": "^0.3.4",
62
62
  "@atproto/xrpc": "^0.6.10",
@@ -78,8 +78,8 @@
78
78
  "ts-node": "^10.8.2",
79
79
  "typescript": "^5.6.3",
80
80
  "ws": "^8.12.0",
81
- "@atproto/api": "^0.14.8",
82
- "@atproto/bsky": "^0.0.125",
81
+ "@atproto/api": "^0.14.9",
82
+ "@atproto/bsky": "^0.0.126",
83
83
  "@atproto/lex-cli": "^0.6.2",
84
84
  "@atproto/oauth-client-browser-example": "0.0.2"
85
85
  },
@@ -10,6 +10,7 @@ import { AppContext } from '../../../../context'
10
10
  import { baseNormalizeAndValidate } from '../../../../handle'
11
11
  import { Server } from '../../../../lexicon'
12
12
  import { InputSchema as CreateAccountInput } from '../../../../lexicon/types/com/atproto/server/createAccount'
13
+ import { syncEvtDataFromCommit } from '../../../../sequencer'
13
14
  import { safeResolveDidDoc } from './util'
14
15
 
15
16
  export default function (server: Server, ctx: AppContext) {
@@ -75,6 +76,10 @@ export default function (server: Server, ctx: AppContext) {
75
76
  await ctx.sequencer.sequenceIdentityEvt(did, handle)
76
77
  await ctx.sequencer.sequenceAccountEvt(did, AccountStatus.Active)
77
78
  await ctx.sequencer.sequenceCommit(did, commit)
79
+ await ctx.sequencer.sequenceSyncEvt(
80
+ did,
81
+ syncEvtDataFromCommit(commit),
82
+ )
78
83
  }
79
84
  await ctx.accountManager.updateRepoRoot(did, commit.cid, commit.rev)
80
85
  await ctx.actorStore.clearReservedKeypair(signingKey.did(), did)
@@ -1,7 +1,7 @@
1
1
  import assert from 'node:assert'
2
2
  import path from 'node:path'
3
3
  import { DAY, HOUR, SECOND } from '@atproto/common'
4
- import { BrandingConfig, HcaptchaConfig } from '@atproto/oauth-provider'
4
+ import { BrandingInput, HcaptchaConfig } from '@atproto/oauth-provider'
5
5
  import { ServerEnvironment } from './env'
6
6
 
7
7
  // off-config but still from env:
@@ -277,8 +277,8 @@ export const envToCfg = (env: ServerEnvironment): ServerConfig => {
277
277
  colors: {
278
278
  brand: env.brandColor,
279
279
  error: env.errorColor,
280
- warning: env.warningColor,
281
280
  success: env.successColor,
281
+ warning: env.warningColor,
282
282
  },
283
283
  links: [
284
284
  {
@@ -447,7 +447,7 @@ export type OAuthConfig = {
447
447
  | false
448
448
  | {
449
449
  hcaptcha?: HcaptchaConfig
450
- branding: BrandingConfig
450
+ branding: BrandingInput
451
451
  }
452
452
  }
453
453
 
@@ -14365,6 +14365,9 @@ export const schemaDict = {
14365
14365
  parameters: {
14366
14366
  type: 'params',
14367
14367
  properties: {
14368
+ q: {
14369
+ type: 'string',
14370
+ },
14368
14371
  disabled: {
14369
14372
  type: 'boolean',
14370
14373
  },
@@ -14,6 +14,7 @@ const is$typed = _is$typed,
14
14
  const id = 'tools.ozone.team.listMembers'
15
15
 
16
16
  export interface QueryParams {
17
+ q?: string
17
18
  disabled?: boolean
18
19
  roles?: string[]
19
20
  limit: number
@@ -1,3 +1,4 @@
1
+ import assert from 'node:assert'
1
2
  import { z } from 'zod'
2
3
  import { cborEncode, noUndefinedVals, schema } from '@atproto/common'
3
4
  import { BlockMap, blocksToCarFile } from '@atproto/repo'
@@ -53,6 +54,23 @@ export const formatSeqSyncEvt = async (
53
54
  }
54
55
  }
55
56
 
57
+ export const syncEvtDataFromCommit = (
58
+ commitData: CommitDataWithOps,
59
+ ): SyncEvtData => {
60
+ const { blocks, missing } = commitData.relevantBlocks.getMany([
61
+ commitData.cid,
62
+ ])
63
+ assert(
64
+ !missing.length,
65
+ 'commit block was not found, could not build sync event',
66
+ )
67
+ return {
68
+ rev: commitData.rev,
69
+ cid: commitData.cid,
70
+ blocks,
71
+ }
72
+ }
73
+
56
74
  export const formatSeqIdentityEvt = async (
57
75
  did: string,
58
76
  handle?: string,
@@ -32,8 +32,8 @@ describe('sequencer', () => {
32
32
  await userSeed(sc)
33
33
  alice = sc.dids.alice
34
34
  bob = sc.dids.bob
35
- // 14 events in userSeed
36
- totalEvts = 14
35
+ // 18 events in userSeed
36
+ totalEvts = 18
37
37
  })
38
38
 
39
39
  beforeEach(async () => {
@@ -234,6 +234,28 @@ describe('repo subscribe repos', () => {
234
234
  return readFromGenerator(gen, isDone, waitFor)
235
235
  }
236
236
 
237
+ it('emits sync event on account creation, matching temporary commit event.', async () => {
238
+ const ws = new WebSocket(
239
+ `ws://${serverHost}/xrpc/com.atproto.sync.subscribeRepos?cursor=${-1}`,
240
+ )
241
+
242
+ const gen = byFrame(ws)
243
+ const evts = await readTillCaughtUp(gen)
244
+ ws.terminate()
245
+
246
+ const syncEvts = getSyncEvts(evts)
247
+ const commitEvts = getCommitEvents(evts).slice(0, 4)
248
+ expect(syncEvts.length).toBe(4)
249
+
250
+ let i = 0
251
+ for (const did of [alice, bob, carol, dan]) {
252
+ const syncEvt = syncEvts[i]
253
+ const commitEvt = commitEvts[i]
254
+ await verifySyncEvent(syncEvt, did, commitEvt.commit, commitEvt.rev)
255
+ i++
256
+ }
257
+ })
258
+
237
259
  it('sync backfilled events', async () => {
238
260
  const ws = new WebSocket(
239
261
  `ws://${serverHost}/xrpc/com.atproto.sync.subscribeRepos?cursor=${-1}`,