@atproto/bsky 0.0.17 → 0.0.18
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.
|
@@ -21,7 +21,6 @@ export declare class ActorViews {
|
|
|
21
21
|
includeSoftDeleted?: boolean;
|
|
22
22
|
}): Promise<ActorInfoMap>;
|
|
23
23
|
profilesBasic(results: (ActorResult | string)[], viewer: string | null, opts?: {
|
|
24
|
-
omitLabels?: boolean;
|
|
25
24
|
includeSoftDeleted?: boolean;
|
|
26
25
|
}): Promise<ActorInfoMap>;
|
|
27
26
|
profilesList(results: ActorResult[], viewer: string | null, opts?: {
|
|
@@ -50,9 +49,7 @@ export declare class ActorViews {
|
|
|
50
49
|
labels: Labels;
|
|
51
50
|
bam: BlockAndMuteState;
|
|
52
51
|
}, viewer: string | null): ProfileViewMap;
|
|
53
|
-
profileBasicPresentation(dids: string[], state: ProfileHydrationState, viewer: string | null
|
|
54
|
-
omitLabels?: boolean;
|
|
55
|
-
}): ProfileViewMap;
|
|
52
|
+
profileBasicPresentation(dids: string[], state: ProfileHydrationState, viewer: string | null): ProfileViewMap;
|
|
56
53
|
}
|
|
57
54
|
declare type ActorResult = Actor;
|
|
58
55
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atproto/bsky",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Reference implementation of app.bsky App View (Bluesky API)",
|
|
6
6
|
"keywords": [
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
"sharp": "^0.32.6",
|
|
36
36
|
"typed-emitter": "^2.1.0",
|
|
37
37
|
"uint8arrays": "3.0.0",
|
|
38
|
-
"@atproto/api": "^0.7.
|
|
38
|
+
"@atproto/api": "^0.7.1",
|
|
39
39
|
"@atproto/common": "^0.3.3",
|
|
40
40
|
"@atproto/crypto": "^0.3.0",
|
|
41
41
|
"@atproto/syntax": "^0.1.5",
|
|
42
|
-
"@atproto/identity": "^0.3.2",
|
|
43
42
|
"@atproto/lexicon": "^0.3.1",
|
|
44
43
|
"@atproto/repo": "^0.3.6",
|
|
44
|
+
"@atproto/identity": "^0.3.2",
|
|
45
45
|
"@atproto/xrpc-server": "^0.4.2"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
"@types/pg": "^8.6.6",
|
|
53
53
|
"@types/qs": "^6.9.7",
|
|
54
54
|
"axios": "^0.27.2",
|
|
55
|
-
"@atproto/api": "^0.7.
|
|
56
|
-
"@atproto/dev-env": "^0.2.
|
|
55
|
+
"@atproto/api": "^0.7.1",
|
|
56
|
+
"@atproto/dev-env": "^0.2.18",
|
|
57
57
|
"@atproto/lex-cli": "^0.2.5",
|
|
58
|
-
"@atproto/pds": "^0.3.
|
|
58
|
+
"@atproto/pds": "^0.3.6",
|
|
59
59
|
"@atproto/xrpc": "^0.4.1"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
@@ -35,7 +35,7 @@ export default function (server: Server, ctx: AppContext) {
|
|
|
35
35
|
|
|
36
36
|
const actors = await ctx.services
|
|
37
37
|
.actor(db)
|
|
38
|
-
.views.profilesBasic(results, requester
|
|
38
|
+
.views.profilesBasic(results, requester)
|
|
39
39
|
|
|
40
40
|
const SKIP = []
|
|
41
41
|
const filtered = results.flatMap((did) => {
|
|
@@ -57,7 +57,7 @@ export class ActorViews {
|
|
|
57
57
|
async profilesBasic(
|
|
58
58
|
results: (ActorResult | string)[],
|
|
59
59
|
viewer: string | null,
|
|
60
|
-
opts?: {
|
|
60
|
+
opts?: { includeSoftDeleted?: boolean },
|
|
61
61
|
): Promise<ActorInfoMap> {
|
|
62
62
|
if (results.length === 0) return {}
|
|
63
63
|
const dids = results.map((res) => (typeof res === 'string' ? res : res.did))
|
|
@@ -65,7 +65,7 @@ export class ActorViews {
|
|
|
65
65
|
viewer,
|
|
66
66
|
includeSoftDeleted: opts?.includeSoftDeleted,
|
|
67
67
|
})
|
|
68
|
-
return this.profileBasicPresentation(dids, hydrated, viewer
|
|
68
|
+
return this.profileBasicPresentation(dids, hydrated, viewer)
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
async profilesList(
|
|
@@ -355,9 +355,6 @@ export class ActorViews {
|
|
|
355
355
|
dids: string[],
|
|
356
356
|
state: ProfileHydrationState,
|
|
357
357
|
viewer: string | null,
|
|
358
|
-
opts?: {
|
|
359
|
-
omitLabels?: boolean
|
|
360
|
-
},
|
|
361
358
|
): ProfileViewMap {
|
|
362
359
|
const result = this.profilePresentation(dids, state, viewer)
|
|
363
360
|
return Object.values(result).reduce((acc, prof) => {
|
|
@@ -367,7 +364,7 @@ export class ActorViews {
|
|
|
367
364
|
displayName: prof.displayName,
|
|
368
365
|
avatar: prof.avatar,
|
|
369
366
|
viewer: prof.viewer,
|
|
370
|
-
labels:
|
|
367
|
+
labels: prof.labels,
|
|
371
368
|
}
|
|
372
369
|
acc[prof.did] = profileBasic
|
|
373
370
|
return acc
|