@atproto/bsky 0.0.183 → 0.0.185
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 +14 -0
- package/dist/lexicon/lexicons.d.ts +34 -0
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +17 -0
- 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 +3 -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/views/index.d.ts +1 -0
- package/dist/views/index.d.ts.map +1 -1
- package/dist/views/index.js +11 -0
- package/dist/views/index.js.map +1 -1
- package/package.json +6 -6
- package/src/lexicon/lexicons.ts +17 -0
- package/src/lexicon/types/app/bsky/actor/defs.ts +2 -0
- package/src/lexicon/types/app/bsky/actor/profile.ts +3 -0
- package/src/views/index.ts +12 -0
- package/tests/views/__snapshots__/profile.test.ts.snap +54 -0
- package/tests/views/profile.test.ts +43 -0
|
@@ -255,6 +255,60 @@ Array [
|
|
|
255
255
|
"muted": false,
|
|
256
256
|
},
|
|
257
257
|
},
|
|
258
|
+
Object {
|
|
259
|
+
"associated": Object {
|
|
260
|
+
"activitySubscription": Object {
|
|
261
|
+
"allowSubscriptions": "followers",
|
|
262
|
+
},
|
|
263
|
+
"feedgens": 0,
|
|
264
|
+
"labeler": false,
|
|
265
|
+
"lists": 0,
|
|
266
|
+
"starterPacks": 0,
|
|
267
|
+
},
|
|
268
|
+
"avatar": "https://bsky.public.url/img/avatar/plain/user(7)/cids(0)@jpeg",
|
|
269
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
270
|
+
"description": "It's me, eve",
|
|
271
|
+
"did": "user(6)",
|
|
272
|
+
"displayName": "eve",
|
|
273
|
+
"followersCount": 0,
|
|
274
|
+
"followsCount": 0,
|
|
275
|
+
"handle": "eve.test",
|
|
276
|
+
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
277
|
+
"labels": Array [],
|
|
278
|
+
"postsCount": 0,
|
|
279
|
+
"pronouns": "They/them",
|
|
280
|
+
"viewer": Object {
|
|
281
|
+
"blockedBy": false,
|
|
282
|
+
"muted": false,
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
Object {
|
|
286
|
+
"associated": Object {
|
|
287
|
+
"activitySubscription": Object {
|
|
288
|
+
"allowSubscriptions": "followers",
|
|
289
|
+
},
|
|
290
|
+
"feedgens": 0,
|
|
291
|
+
"labeler": false,
|
|
292
|
+
"lists": 0,
|
|
293
|
+
"starterPacks": 0,
|
|
294
|
+
},
|
|
295
|
+
"avatar": "https://bsky.public.url/img/avatar/plain/user(9)/cids(0)@jpeg",
|
|
296
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
297
|
+
"description": "It's me, frank",
|
|
298
|
+
"did": "user(8)",
|
|
299
|
+
"displayName": "frank",
|
|
300
|
+
"followersCount": 0,
|
|
301
|
+
"followsCount": 0,
|
|
302
|
+
"handle": "frank.test",
|
|
303
|
+
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
304
|
+
"labels": Array [],
|
|
305
|
+
"postsCount": 0,
|
|
306
|
+
"viewer": Object {
|
|
307
|
+
"blockedBy": false,
|
|
308
|
+
"muted": false,
|
|
309
|
+
},
|
|
310
|
+
"website": "https://frank.example.com",
|
|
311
|
+
},
|
|
258
312
|
]
|
|
259
313
|
`;
|
|
260
314
|
|
|
@@ -16,6 +16,8 @@ describe('pds profile views', () => {
|
|
|
16
16
|
let alice: string
|
|
17
17
|
let bob: string
|
|
18
18
|
let dan: string
|
|
19
|
+
let eve: string
|
|
20
|
+
let frank: string
|
|
19
21
|
|
|
20
22
|
beforeAll(async () => {
|
|
21
23
|
network = await TestNetwork.create({
|
|
@@ -25,10 +27,47 @@ describe('pds profile views', () => {
|
|
|
25
27
|
pdsAgent = network.pds.getClient()
|
|
26
28
|
sc = network.getSeedClient()
|
|
27
29
|
await basicSeed(sc)
|
|
30
|
+
|
|
31
|
+
await sc.createAccount('eve', {
|
|
32
|
+
handle: 'eve.test',
|
|
33
|
+
email: 'eve@test.com',
|
|
34
|
+
password: 'eve-pass',
|
|
35
|
+
})
|
|
36
|
+
await sc.createProfile(
|
|
37
|
+
sc.dids.eve,
|
|
38
|
+
'eve',
|
|
39
|
+
`It's me, eve`,
|
|
40
|
+
undefined,
|
|
41
|
+
undefined,
|
|
42
|
+
{
|
|
43
|
+
pronouns: 'They/them',
|
|
44
|
+
// Not allowing that to go through, even though is a valid URL.
|
|
45
|
+
website: 'wss://jetstream1.us-east.bsky.network',
|
|
46
|
+
},
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
await sc.createAccount('frank', {
|
|
50
|
+
handle: 'frank.test',
|
|
51
|
+
email: 'frank@test.com',
|
|
52
|
+
password: 'frank-pass',
|
|
53
|
+
})
|
|
54
|
+
await sc.createProfile(
|
|
55
|
+
sc.dids.frank,
|
|
56
|
+
'frank',
|
|
57
|
+
`It's me, frank`,
|
|
58
|
+
undefined,
|
|
59
|
+
undefined,
|
|
60
|
+
{
|
|
61
|
+
website: 'https://frank.example.com',
|
|
62
|
+
},
|
|
63
|
+
)
|
|
64
|
+
|
|
28
65
|
await network.processAll()
|
|
29
66
|
alice = sc.dids.alice
|
|
30
67
|
bob = sc.dids.bob
|
|
31
68
|
dan = sc.dids.dan
|
|
69
|
+
eve = sc.dids.eve
|
|
70
|
+
frank = sc.dids.frank
|
|
32
71
|
})
|
|
33
72
|
|
|
34
73
|
afterAll(async () => {
|
|
@@ -100,6 +139,8 @@ describe('pds profile views', () => {
|
|
|
100
139
|
'did:example:missing',
|
|
101
140
|
'carol.test',
|
|
102
141
|
dan,
|
|
142
|
+
eve,
|
|
143
|
+
frank,
|
|
103
144
|
'missing.test',
|
|
104
145
|
],
|
|
105
146
|
},
|
|
@@ -113,6 +154,8 @@ describe('pds profile views', () => {
|
|
|
113
154
|
'bob.test',
|
|
114
155
|
'carol.test',
|
|
115
156
|
'dan.test',
|
|
157
|
+
'eve.test',
|
|
158
|
+
'frank.test',
|
|
116
159
|
])
|
|
117
160
|
|
|
118
161
|
expect(forSnapshot(profiles)).toMatchSnapshot()
|