@atproto/pds 0.5.7 → 0.5.9
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 +39 -0
- package/dist/account-manager/oauth-store.d.ts +1 -1
- package/dist/account-manager/oauth-store.d.ts.map +1 -1
- package/dist/account-manager/oauth-store.js +2 -1
- package/dist/account-manager/oauth-store.js.map +1 -1
- package/dist/actor-store/actor-store.js +1 -1
- package/dist/actor-store/actor-store.js.map +1 -1
- package/dist/lexicons/app/bsky/authFullApp.defs.d.ts.map +1 -1
- package/dist/lexicons/app/bsky/authFullApp.defs.js +1 -0
- package/dist/lexicons/app/bsky/authFullApp.defs.js.map +1 -1
- package/dist/lexicons/app/bsky/authViewAll.defs.d.ts.map +1 -1
- package/dist/lexicons/app/bsky/authViewAll.defs.js +1 -0
- package/dist/lexicons/app/bsky/authViewAll.defs.js.map +1 -1
- package/dist/lexicons/app/bsky/feed/searchPostsV2.d.ts +3 -0
- package/dist/lexicons/app/bsky/feed/searchPostsV2.d.ts.map +1 -0
- package/dist/lexicons/app/bsky/feed/searchPostsV2.defs.d.ts +156 -0
- package/dist/lexicons/app/bsky/feed/searchPostsV2.defs.d.ts.map +1 -0
- package/dist/lexicons/app/bsky/feed/searchPostsV2.defs.js +74 -0
- package/dist/lexicons/app/bsky/feed/searchPostsV2.defs.js.map +1 -0
- package/dist/lexicons/app/bsky/feed/searchPostsV2.js +6 -0
- package/dist/lexicons/app/bsky/feed/searchPostsV2.js.map +1 -0
- package/dist/lexicons/app/bsky/feed.d.ts +1 -0
- package/dist/lexicons/app/bsky/feed.d.ts.map +1 -1
- package/dist/lexicons/app/bsky/feed.js +1 -0
- package/dist/lexicons/app/bsky/feed.js.map +1 -1
- package/dist/lexicons/chat/bsky/actor/declaration.defs.d.ts +1 -1
- package/dist/lexicons/chat/bsky/actor/declaration.defs.js.map +1 -1
- package/dist/lexicons/chat/bsky/actor/defs.defs.d.ts +4 -6
- package/dist/lexicons/chat/bsky/actor/defs.defs.d.ts.map +1 -1
- package/dist/lexicons/chat/bsky/actor/defs.defs.js +2 -3
- package/dist/lexicons/chat/bsky/actor/defs.defs.js.map +1 -1
- package/dist/lexicons/chat/bsky/convo/defs.defs.d.ts +73 -71
- package/dist/lexicons/chat/bsky/convo/defs.defs.d.ts.map +1 -1
- package/dist/lexicons/chat/bsky/convo/defs.defs.js +38 -35
- package/dist/lexicons/chat/bsky/convo/defs.defs.js.map +1 -1
- package/dist/lexicons/chat/bsky/convo/getUnreadCounts.defs.d.ts +1 -1
- package/dist/lexicons/chat/bsky/convo/getUnreadCounts.defs.d.ts.map +1 -1
- package/dist/lexicons/chat/bsky/convo/getUnreadCounts.defs.js +1 -1
- package/dist/lexicons/chat/bsky/convo/getUnreadCounts.defs.js.map +1 -1
- package/dist/lexicons/chat/bsky/convo/listConvoRequests.defs.d.ts +1 -1
- package/dist/lexicons/chat/bsky/convo/listConvoRequests.defs.d.ts.map +1 -1
- package/dist/lexicons/chat/bsky/convo/listConvoRequests.defs.js +1 -1
- package/dist/lexicons/chat/bsky/convo/listConvoRequests.defs.js.map +1 -1
- package/dist/lexicons/chat/bsky/convo/lockConvo.defs.d.ts +1 -1
- package/dist/lexicons/chat/bsky/convo/lockConvo.defs.d.ts.map +1 -1
- package/dist/lexicons/chat/bsky/convo/lockConvo.defs.js +1 -1
- package/dist/lexicons/chat/bsky/convo/lockConvo.defs.js.map +1 -1
- package/dist/lexicons/chat/bsky/convo/unlockConvo.defs.d.ts +1 -1
- package/dist/lexicons/chat/bsky/convo/unlockConvo.defs.d.ts.map +1 -1
- package/dist/lexicons/chat/bsky/convo/unlockConvo.defs.js +1 -1
- package/dist/lexicons/chat/bsky/convo/unlockConvo.defs.js.map +1 -1
- package/dist/lexicons/chat/bsky/group/addMembers.defs.d.ts +1 -1
- package/dist/lexicons/chat/bsky/group/addMembers.defs.d.ts.map +1 -1
- package/dist/lexicons/chat/bsky/group/addMembers.defs.js +1 -1
- package/dist/lexicons/chat/bsky/group/addMembers.defs.js.map +1 -1
- package/dist/lexicons/chat/bsky/group/approveJoinRequest.defs.d.ts +1 -1
- package/dist/lexicons/chat/bsky/group/approveJoinRequest.defs.d.ts.map +1 -1
- package/dist/lexicons/chat/bsky/group/approveJoinRequest.defs.js +1 -1
- package/dist/lexicons/chat/bsky/group/approveJoinRequest.defs.js.map +1 -1
- package/dist/lexicons/chat/bsky/group/createGroup.defs.d.ts +1 -1
- package/dist/lexicons/chat/bsky/group/createGroup.defs.d.ts.map +1 -1
- package/dist/lexicons/chat/bsky/group/createGroup.defs.js +1 -1
- package/dist/lexicons/chat/bsky/group/createGroup.defs.js.map +1 -1
- package/dist/lexicons/chat/bsky/group/createJoinLink.defs.d.ts +1 -1
- package/dist/lexicons/chat/bsky/group/createJoinLink.defs.d.ts.map +1 -1
- package/dist/lexicons/chat/bsky/group/createJoinLink.defs.js +1 -1
- package/dist/lexicons/chat/bsky/group/createJoinLink.defs.js.map +1 -1
- package/dist/lexicons/chat/bsky/group/disableJoinLink.defs.d.ts +1 -1
- package/dist/lexicons/chat/bsky/group/disableJoinLink.defs.d.ts.map +1 -1
- package/dist/lexicons/chat/bsky/group/disableJoinLink.defs.js +1 -1
- package/dist/lexicons/chat/bsky/group/disableJoinLink.defs.js.map +1 -1
- package/dist/lexicons/chat/bsky/group/editGroup.defs.d.ts +1 -1
- package/dist/lexicons/chat/bsky/group/editGroup.defs.d.ts.map +1 -1
- package/dist/lexicons/chat/bsky/group/editGroup.defs.js +1 -1
- package/dist/lexicons/chat/bsky/group/editGroup.defs.js.map +1 -1
- package/dist/lexicons/chat/bsky/group/editJoinLink.defs.d.ts +1 -1
- package/dist/lexicons/chat/bsky/group/editJoinLink.defs.d.ts.map +1 -1
- package/dist/lexicons/chat/bsky/group/editJoinLink.defs.js +1 -1
- package/dist/lexicons/chat/bsky/group/editJoinLink.defs.js.map +1 -1
- package/dist/lexicons/chat/bsky/group/enableJoinLink.defs.d.ts +1 -1
- package/dist/lexicons/chat/bsky/group/enableJoinLink.defs.d.ts.map +1 -1
- package/dist/lexicons/chat/bsky/group/enableJoinLink.defs.js +1 -1
- package/dist/lexicons/chat/bsky/group/enableJoinLink.defs.js.map +1 -1
- package/dist/lexicons/chat/bsky/group/getJoinLinkPreviews.defs.d.ts +1 -1
- package/dist/lexicons/chat/bsky/group/getJoinLinkPreviews.defs.d.ts.map +1 -1
- package/dist/lexicons/chat/bsky/group/getJoinLinkPreviews.defs.js +1 -1
- package/dist/lexicons/chat/bsky/group/getJoinLinkPreviews.defs.js.map +1 -1
- package/dist/lexicons/chat/bsky/group/listJoinRequests.defs.d.ts +1 -1
- package/dist/lexicons/chat/bsky/group/listJoinRequests.defs.d.ts.map +1 -1
- package/dist/lexicons/chat/bsky/group/listJoinRequests.defs.js +1 -1
- package/dist/lexicons/chat/bsky/group/listJoinRequests.defs.js.map +1 -1
- package/dist/lexicons/chat/bsky/group/listMutualGroups.defs.d.ts +1 -1
- package/dist/lexicons/chat/bsky/group/listMutualGroups.defs.d.ts.map +1 -1
- package/dist/lexicons/chat/bsky/group/listMutualGroups.defs.js +1 -1
- package/dist/lexicons/chat/bsky/group/listMutualGroups.defs.js.map +1 -1
- package/dist/lexicons/chat/bsky/group/rejectJoinRequest.defs.d.ts +1 -1
- package/dist/lexicons/chat/bsky/group/rejectJoinRequest.defs.d.ts.map +1 -1
- package/dist/lexicons/chat/bsky/group/rejectJoinRequest.defs.js +1 -1
- package/dist/lexicons/chat/bsky/group/rejectJoinRequest.defs.js.map +1 -1
- package/dist/lexicons/chat/bsky/group/removeMembers.defs.d.ts +1 -1
- package/dist/lexicons/chat/bsky/group/removeMembers.defs.d.ts.map +1 -1
- package/dist/lexicons/chat/bsky/group/removeMembers.defs.js +1 -1
- package/dist/lexicons/chat/bsky/group/removeMembers.defs.js.map +1 -1
- package/dist/lexicons/chat/bsky/group/requestJoin.defs.d.ts +1 -1
- package/dist/lexicons/chat/bsky/group/requestJoin.defs.d.ts.map +1 -1
- package/dist/lexicons/chat/bsky/group/requestJoin.defs.js +1 -1
- package/dist/lexicons/chat/bsky/group/requestJoin.defs.js.map +1 -1
- package/dist/lexicons/chat/bsky/group/updateJoinRequestsRead.defs.d.ts +1 -1
- package/dist/lexicons/chat/bsky/group/updateJoinRequestsRead.defs.d.ts.map +1 -1
- package/dist/lexicons/chat/bsky/group/updateJoinRequestsRead.defs.js +1 -1
- package/dist/lexicons/chat/bsky/group/updateJoinRequestsRead.defs.js.map +1 -1
- package/dist/lexicons/chat/bsky/group/withdrawJoinRequest.defs.d.ts +1 -1
- package/dist/lexicons/chat/bsky/group/withdrawJoinRequest.defs.d.ts.map +1 -1
- package/dist/lexicons/chat/bsky/group/withdrawJoinRequest.defs.js +1 -1
- package/dist/lexicons/chat/bsky/group/withdrawJoinRequest.defs.js.map +1 -1
- package/dist/lexicons/chat/bsky/moderation/defs.defs.d.ts +6 -6
- package/dist/lexicons/chat/bsky/moderation/defs.defs.d.ts.map +1 -1
- package/dist/lexicons/chat/bsky/moderation/defs.defs.js +3 -3
- package/dist/lexicons/chat/bsky/moderation/defs.defs.js.map +1 -1
- package/dist/lexicons/chat/bsky/moderation/getConvo.defs.d.ts +1 -1
- package/dist/lexicons/chat/bsky/moderation/getConvo.defs.d.ts.map +1 -1
- package/dist/lexicons/chat/bsky/moderation/getConvo.defs.js +1 -1
- package/dist/lexicons/chat/bsky/moderation/getConvo.defs.js.map +1 -1
- package/dist/lexicons/chat/bsky/moderation/getConvoMembers.defs.d.ts +1 -1
- package/dist/lexicons/chat/bsky/moderation/getConvoMembers.defs.d.ts.map +1 -1
- package/dist/lexicons/chat/bsky/moderation/getConvoMembers.defs.js +1 -1
- package/dist/lexicons/chat/bsky/moderation/getConvoMembers.defs.js.map +1 -1
- package/dist/lexicons/chat/bsky/moderation/getConvos.defs.d.ts +1 -1
- package/dist/lexicons/chat/bsky/moderation/getConvos.defs.d.ts.map +1 -1
- package/dist/lexicons/chat/bsky/moderation/getConvos.defs.js +1 -1
- package/dist/lexicons/chat/bsky/moderation/getConvos.defs.js.map +1 -1
- package/dist/logger.d.ts +13 -13
- package/dist/logger.d.ts.map +1 -1
- package/package.json +27 -27
- package/src/account-manager/oauth-store.ts +5 -1
- package/src/actor-store/actor-store.ts +1 -1
- package/tests/account-deactivation.test.ts +2 -1
- package/tests/blob-deletes.test.ts +4 -3
- package/tests/invites-admin.test.ts +4 -3
- package/tests/plc-operations.test.ts +2 -1
- package/tests/proxied/admin.test.ts +2 -1
- package/tests/proxied/procedures.test.ts +4 -3
- package/tests/proxied/proxy-header.test.ts +2 -1
- package/tests/proxied/read-after-write.test.ts +3 -2
- package/tests/proxied/views.test.ts +5 -4
- package/tests/seeds/follows.ts +1 -1
- package/tests/seeds/users-bulk.ts +2 -1
- package/tests/seeds/users.ts +1 -1
- package/tests/sequencer.test.ts +5 -3
- package/tests/server.test.ts +2 -1
- package/tests/sync/invertible-ops.test.ts +3 -0
- package/tests/sync/subscribe-repos.test.ts +6 -5
- package/tests/sync/sync.test.ts +1 -1
- package/tests/takedown-appeal.test.ts +2 -1
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -134,7 +134,7 @@ export class ActorStore {
|
|
|
134
134
|
store.repo.blob.getBlobCids(),
|
|
135
135
|
)
|
|
136
136
|
await blobstore.deleteMany(cids).catch((err) => {
|
|
137
|
-
blobStoreLogger.error(
|
|
137
|
+
blobStoreLogger.error({ did, cids, err }, 'Failed to delete blobs')
|
|
138
138
|
})
|
|
139
139
|
}
|
|
140
140
|
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
TestNetworkNoAppView,
|
|
6
6
|
basicSeed,
|
|
7
7
|
} from '@atproto/dev-env'
|
|
8
|
+
import type { DidString } from '@atproto/syntax'
|
|
8
9
|
|
|
9
10
|
describe('account deactivation', () => {
|
|
10
11
|
let network: TestNetworkNoAppView
|
|
@@ -12,7 +13,7 @@ describe('account deactivation', () => {
|
|
|
12
13
|
let sc: SeedClient
|
|
13
14
|
let agent: AtpAgent
|
|
14
15
|
|
|
15
|
-
let alice:
|
|
16
|
+
let alice: DidString
|
|
16
17
|
let aliceAvatar: ImageRef
|
|
17
18
|
|
|
18
19
|
beforeAll(async () => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AtpAgent, BlobRef } from '@atproto/api'
|
|
2
2
|
import { SeedClient, TestNetworkNoAppView } from '@atproto/dev-env'
|
|
3
|
+
import type { DidString } from '@atproto/syntax'
|
|
3
4
|
import { AppContext } from '../src/index.js'
|
|
4
5
|
|
|
5
6
|
describe('blob deletes', () => {
|
|
@@ -9,8 +10,8 @@ describe('blob deletes', () => {
|
|
|
9
10
|
|
|
10
11
|
let ctx: AppContext
|
|
11
12
|
|
|
12
|
-
let alice:
|
|
13
|
-
let bob:
|
|
13
|
+
let alice: DidString
|
|
14
|
+
let bob: DidString
|
|
14
15
|
|
|
15
16
|
beforeAll(async () => {
|
|
16
17
|
network = await TestNetworkNoAppView.create({
|
|
@@ -184,7 +185,7 @@ describe('blob deletes', () => {
|
|
|
184
185
|
|
|
185
186
|
async function updateProfile(
|
|
186
187
|
sc: SeedClient,
|
|
187
|
-
did:
|
|
188
|
+
did: DidString,
|
|
188
189
|
avatar?: BlobRef,
|
|
189
190
|
banner?: BlobRef,
|
|
190
191
|
) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AtpAgent } from '@atproto/api'
|
|
2
2
|
import { randomStr } from '@atproto/crypto'
|
|
3
3
|
import { SeedClient, TestNetworkNoAppView } from '@atproto/dev-env'
|
|
4
|
+
import type { DidString } from '@atproto/syntax'
|
|
4
5
|
|
|
5
6
|
describe('pds admin invite views', () => {
|
|
6
7
|
let network: TestNetworkNoAppView
|
|
@@ -23,9 +24,9 @@ describe('pds admin invite views', () => {
|
|
|
23
24
|
await network?.close()
|
|
24
25
|
})
|
|
25
26
|
|
|
26
|
-
let alice:
|
|
27
|
-
let bob:
|
|
28
|
-
let carol:
|
|
27
|
+
let alice: DidString
|
|
28
|
+
let bob: DidString
|
|
29
|
+
let carol: DidString
|
|
29
30
|
|
|
30
31
|
beforeAll(async () => {
|
|
31
32
|
const adminCode = await agent.api.com.atproto.server.createInviteCode(
|
|
@@ -6,6 +6,7 @@ import { AtpAgent } from '@atproto/api'
|
|
|
6
6
|
import { check } from '@atproto/common'
|
|
7
7
|
import { Secp256k1Keypair } from '@atproto/crypto'
|
|
8
8
|
import { SeedClient, TestNetworkNoAppView, basicSeed } from '@atproto/dev-env'
|
|
9
|
+
import type { DidString } from '@atproto/syntax'
|
|
9
10
|
import { AppContext } from '../src/index.js'
|
|
10
11
|
|
|
11
12
|
describe('plc operations', () => {
|
|
@@ -17,7 +18,7 @@ describe('plc operations', () => {
|
|
|
17
18
|
const mailCatcher = new EventEmitter()
|
|
18
19
|
let _origSendMail
|
|
19
20
|
|
|
20
|
-
let alice:
|
|
21
|
+
let alice: DidString
|
|
21
22
|
|
|
22
23
|
let sampleKey: string
|
|
23
24
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AtpAgent } from '@atproto/api'
|
|
2
2
|
import { SeedClient, TestNetwork } from '@atproto/dev-env'
|
|
3
|
+
import type { DidString } from '@atproto/syntax'
|
|
3
4
|
import { forSnapshot } from '../_util.js'
|
|
4
5
|
import basicSeed from '../seeds/basic.js'
|
|
5
6
|
|
|
@@ -8,7 +9,7 @@ describe('proxies admin requests', () => {
|
|
|
8
9
|
let agent: AtpAgent
|
|
9
10
|
let sc: SeedClient
|
|
10
11
|
|
|
11
|
-
let moderator:
|
|
12
|
+
let moderator: DidString
|
|
12
13
|
|
|
13
14
|
beforeAll(async () => {
|
|
14
15
|
network = await TestNetwork.create({
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AtpAgent } from '@atproto/api'
|
|
2
2
|
import { SeedClient, TestNetwork } from '@atproto/dev-env'
|
|
3
|
+
import type { DidString } from '@atproto/syntax'
|
|
3
4
|
import basicSeed from '../seeds/basic.js'
|
|
4
5
|
|
|
5
6
|
describe('proxies appview procedures', () => {
|
|
@@ -7,9 +8,9 @@ describe('proxies appview procedures', () => {
|
|
|
7
8
|
let agent: AtpAgent
|
|
8
9
|
let sc: SeedClient
|
|
9
10
|
|
|
10
|
-
let alice:
|
|
11
|
-
let bob:
|
|
12
|
-
let carol:
|
|
11
|
+
let alice: DidString
|
|
12
|
+
let bob: DidString
|
|
13
|
+
let carol: DidString
|
|
13
14
|
|
|
14
15
|
beforeAll(async () => {
|
|
15
16
|
network = await TestNetwork.create({
|
|
@@ -8,6 +8,7 @@ import express from 'express'
|
|
|
8
8
|
import httpTerminator from 'http-terminator'
|
|
9
9
|
import { Keypair } from '@atproto/crypto'
|
|
10
10
|
import { SeedClient, TestNetworkNoAppView, usersSeed } from '@atproto/dev-env'
|
|
11
|
+
import type { DidString } from '@atproto/syntax'
|
|
11
12
|
import { verifyJwt } from '@atproto/xrpc-server'
|
|
12
13
|
import { parseProxyHeader } from '../../src/pipethrough.js'
|
|
13
14
|
|
|
@@ -15,7 +16,7 @@ describe('proxy header', () => {
|
|
|
15
16
|
let network: TestNetworkNoAppView
|
|
16
17
|
let sc: SeedClient
|
|
17
18
|
|
|
18
|
-
let alice:
|
|
19
|
+
let alice: DidString
|
|
19
20
|
|
|
20
21
|
let proxyServer: ProxyServer
|
|
21
22
|
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
AtpAgent,
|
|
10
10
|
} from '@atproto/api'
|
|
11
11
|
import { RecordRef, SeedClient, TestNetwork } from '@atproto/dev-env'
|
|
12
|
+
import type { DidString } from '@atproto/syntax'
|
|
12
13
|
import { app } from '../../src/lexicons/index.js'
|
|
13
14
|
import basicSeed from '../seeds/basic.js'
|
|
14
15
|
|
|
@@ -17,8 +18,8 @@ describe('proxy read after write', () => {
|
|
|
17
18
|
let agent: AtpAgent
|
|
18
19
|
let sc: SeedClient
|
|
19
20
|
|
|
20
|
-
let alice:
|
|
21
|
-
let carol:
|
|
21
|
+
let alice: DidString
|
|
22
|
+
let carol: DidString
|
|
22
23
|
|
|
23
24
|
beforeAll(async () => {
|
|
24
25
|
network = await TestNetwork.create({
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AtUri, AtpAgent } from '@atproto/api'
|
|
2
2
|
import { SeedClient, TestNetwork } from '@atproto/dev-env'
|
|
3
|
+
import type { DidString } from '@atproto/syntax'
|
|
3
4
|
import { forSnapshot } from '../_util.js'
|
|
4
5
|
import basicSeed from '../seeds/basic.js'
|
|
5
6
|
|
|
@@ -8,10 +9,10 @@ describe('proxies view requests', () => {
|
|
|
8
9
|
let agent: AtpAgent
|
|
9
10
|
let sc: SeedClient
|
|
10
11
|
|
|
11
|
-
let alice:
|
|
12
|
-
let bob:
|
|
13
|
-
let carol:
|
|
14
|
-
let dan:
|
|
12
|
+
let alice: DidString
|
|
13
|
+
let bob: DidString
|
|
14
|
+
let carol: DidString
|
|
15
|
+
let dan: DidString
|
|
15
16
|
|
|
16
17
|
beforeAll(async () => {
|
|
17
18
|
network = await TestNetwork.create({
|
package/tests/seeds/follows.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { chunkArray } from '@atproto/common'
|
|
2
2
|
import { SeedClient } from '@atproto/dev-env'
|
|
3
|
+
import type { HandleString } from '@atproto/syntax'
|
|
3
4
|
|
|
4
5
|
export default async (sc: SeedClient, max = Infinity) => {
|
|
5
6
|
// @TODO when these are run in parallel, seem to get an intermittent
|
|
@@ -41,7 +42,7 @@ export default async (sc: SeedClient, max = Infinity) => {
|
|
|
41
42
|
// return sc
|
|
42
43
|
// }
|
|
43
44
|
|
|
44
|
-
const users = [
|
|
45
|
+
const users: { handle: HandleString; displayName: string | null }[] = [
|
|
45
46
|
{ handle: 'silas77.test', displayName: 'Tanya Denesik' },
|
|
46
47
|
{ handle: 'nicolas-krajcik10.test', displayName: null },
|
|
47
48
|
{ handle: 'lennie-strosin.test', displayName: null },
|
package/tests/seeds/users.ts
CHANGED
package/tests/sequencer.test.ts
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
import { randomStr } from '@atproto/crypto'
|
|
8
8
|
import { SeedClient, TestNetworkNoAppView } from '@atproto/dev-env'
|
|
9
9
|
import { readCarWithRoot } from '@atproto/repo'
|
|
10
|
+
import type { DidString } from '@atproto/syntax'
|
|
10
11
|
import {
|
|
11
12
|
SeqEvt,
|
|
12
13
|
Sequencer,
|
|
@@ -20,8 +21,8 @@ describe('sequencer', () => {
|
|
|
20
21
|
let network: TestNetworkNoAppView
|
|
21
22
|
let sequencer: Sequencer
|
|
22
23
|
let sc: SeedClient
|
|
23
|
-
let alice:
|
|
24
|
-
let bob:
|
|
24
|
+
let alice: DidString
|
|
25
|
+
let bob: DidString
|
|
25
26
|
|
|
26
27
|
let totalEvts
|
|
27
28
|
let lastSeen: number
|
|
@@ -48,7 +49,8 @@ describe('sequencer', () => {
|
|
|
48
49
|
await network?.close()
|
|
49
50
|
})
|
|
50
51
|
|
|
51
|
-
const randomPost = async (by:
|
|
52
|
+
const randomPost = async (by: DidString) =>
|
|
53
|
+
sc.post(by, randomStr(8, 'base32'))
|
|
52
54
|
const createPosts = async (count: number): Promise<void> => {
|
|
53
55
|
const promises: Promise<unknown>[] = []
|
|
54
56
|
for (let i = 0; i < count; i++) {
|
package/tests/server.test.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { request } from 'undici'
|
|
|
4
4
|
import { AtUri, AtpAgent } from '@atproto/api'
|
|
5
5
|
import { randomStr } from '@atproto/crypto'
|
|
6
6
|
import { SeedClient, TestNetworkNoAppView } from '@atproto/dev-env'
|
|
7
|
+
import type { DidString } from '@atproto/syntax'
|
|
7
8
|
import { handler as errorHandler } from '../src/error.js'
|
|
8
9
|
import { startServer } from './_util.js'
|
|
9
10
|
import basicSeed from './seeds/basic.js'
|
|
@@ -12,7 +13,7 @@ describe('server', () => {
|
|
|
12
13
|
let network: TestNetworkNoAppView
|
|
13
14
|
let agent: AtpAgent
|
|
14
15
|
let sc: SeedClient
|
|
15
|
-
let alice:
|
|
16
|
+
let alice: DidString
|
|
16
17
|
|
|
17
18
|
beforeAll(async () => {
|
|
18
19
|
network = await TestNetworkNoAppView.create({
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import assert from 'node:assert'
|
|
1
2
|
import { AtUri } from '@atproto/api'
|
|
2
3
|
import { SeedClient, TestNetworkNoAppView } from '@atproto/dev-env'
|
|
3
4
|
import * as repo from '@atproto/repo'
|
|
5
|
+
import { isValidDid } from '@atproto/syntax'
|
|
4
6
|
import { Subscription } from '@atproto/xrpc-server'
|
|
5
7
|
import { com } from '../../src/lexicons.js'
|
|
6
8
|
import basicSeed from '../seeds/basic.js'
|
|
@@ -33,6 +35,7 @@ describe('invertible ops', () => {
|
|
|
33
35
|
]
|
|
34
36
|
}
|
|
35
37
|
for (const post of posts) {
|
|
38
|
+
assert(isValidDid(post.hostname))
|
|
36
39
|
await sc.deletePost(post.hostname, post)
|
|
37
40
|
}
|
|
38
41
|
|
|
@@ -12,6 +12,7 @@ import { SeedClient, TestNetworkNoAppView } from '@atproto/dev-env'
|
|
|
12
12
|
import { Cid } from '@atproto/lex-data'
|
|
13
13
|
import * as repo from '@atproto/repo'
|
|
14
14
|
import { readCar } from '@atproto/repo'
|
|
15
|
+
import type { DidString } from '@atproto/syntax'
|
|
15
16
|
import { ErrorFrame, Frame, MessageFrame, byFrame } from '@atproto/xrpc-server'
|
|
16
17
|
import { AccountStatus } from '../../src/account-manager/account-manager.js'
|
|
17
18
|
import { AppContext } from '../../src/index.js'
|
|
@@ -26,10 +27,10 @@ describe('repo subscribe repos', () => {
|
|
|
26
27
|
|
|
27
28
|
let agent: AtpAgent
|
|
28
29
|
let sc: SeedClient
|
|
29
|
-
let alice:
|
|
30
|
-
let bob:
|
|
31
|
-
let carol:
|
|
32
|
-
let dan:
|
|
30
|
+
let alice: DidString
|
|
31
|
+
let bob: DidString
|
|
32
|
+
let carol: DidString
|
|
33
|
+
let dan: DidString
|
|
33
34
|
|
|
34
35
|
beforeAll(async () => {
|
|
35
36
|
network = await TestNetworkNoAppView.create({
|
|
@@ -219,7 +220,7 @@ describe('repo subscribe repos', () => {
|
|
|
219
220
|
}
|
|
220
221
|
}
|
|
221
222
|
|
|
222
|
-
const randomPost = (by:
|
|
223
|
+
const randomPost = (by: DidString) => sc.post(by, randomStr(8, 'base32'))
|
|
223
224
|
const makePosts = async () => {
|
|
224
225
|
for (let i = 0; i < 10; i++) {
|
|
225
226
|
await Promise.all([
|
package/tests/sync/sync.test.ts
CHANGED
|
@@ -301,7 +301,7 @@ describe('repo sync', () => {
|
|
|
301
301
|
})
|
|
302
302
|
})
|
|
303
303
|
|
|
304
|
-
const makePost = async (sc: SeedClient, did:
|
|
304
|
+
const makePost = async (sc: SeedClient, did: DidString) => {
|
|
305
305
|
const res = await sc.post(did, randomStr(32, 'base32'))
|
|
306
306
|
const uri = res.ref.uri
|
|
307
307
|
const data = await sc.client.call(com.atproto.repo.getRecord, {
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { AtpAgent, ComAtprotoModerationDefs } from '@atproto/api'
|
|
2
2
|
import { SeedClient, TestNetwork } from '@atproto/dev-env'
|
|
3
|
+
import type { DidString } from '@atproto/syntax'
|
|
3
4
|
import { forSubjectStatusSnapshot } from './_util.js'
|
|
4
5
|
|
|
5
6
|
describe('appeal account takedown', () => {
|
|
6
7
|
let network: TestNetwork
|
|
7
8
|
let agent: AtpAgent
|
|
8
9
|
let sc: SeedClient
|
|
9
|
-
let moderator:
|
|
10
|
+
let moderator: DidString
|
|
10
11
|
|
|
11
12
|
beforeAll(async () => {
|
|
12
13
|
network = await TestNetwork.create({
|