@alteran/astro 0.3.5 → 0.3.7
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/package.json
CHANGED
package/src/lib/actor.ts
CHANGED
|
@@ -100,7 +100,21 @@ export function buildProfileViewBasic(actor: PrimaryActor) {
|
|
|
100
100
|
pronouns: actor.pronouns,
|
|
101
101
|
avatar: actor.avatar,
|
|
102
102
|
createdAt,
|
|
103
|
-
associated: {
|
|
103
|
+
associated: {
|
|
104
|
+
$type: 'app.bsky.actor.defs#profileAssociated',
|
|
105
|
+
lists: 0,
|
|
106
|
+
feedgens: 0,
|
|
107
|
+
starterPacks: 0,
|
|
108
|
+
labeler: false,
|
|
109
|
+
chat: {
|
|
110
|
+
$type: 'app.bsky.actor.defs#profileAssociatedChat',
|
|
111
|
+
allowIncoming: 'all',
|
|
112
|
+
},
|
|
113
|
+
activitySubscription: {
|
|
114
|
+
$type: 'app.bsky.actor.defs#profileAssociatedActivitySubscription',
|
|
115
|
+
allowSubscriptions: 'followers',
|
|
116
|
+
},
|
|
117
|
+
},
|
|
104
118
|
labels,
|
|
105
119
|
};
|
|
106
120
|
}
|
|
@@ -129,5 +143,6 @@ export function buildProfileViewDetailed(actor: PrimaryActor, counts: {
|
|
|
129
143
|
followersCount: counts.followers,
|
|
130
144
|
followsCount: counts.follows,
|
|
131
145
|
postsCount: counts.posts,
|
|
146
|
+
viewer: {},
|
|
132
147
|
};
|
|
133
148
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { APIContext } from 'astro';
|
|
2
|
+
import { proxyAppView } from '../../lib/appview';
|
|
3
|
+
import { isAuthorized, unauthorized } from '../../lib/auth';
|
|
4
|
+
|
|
5
|
+
export const prerender = false;
|
|
6
|
+
|
|
7
|
+
// Implements: app.bsky.feed.getActorFeeds
|
|
8
|
+
// Thin proxy to AppView with a safe empty fallback to satisfy clients.
|
|
9
|
+
export async function GET({ locals, request }: APIContext) {
|
|
10
|
+
const { env } = locals.runtime;
|
|
11
|
+
if (!(await isAuthorized(request, env))) return unauthorized();
|
|
12
|
+
|
|
13
|
+
return proxyAppView({
|
|
14
|
+
request,
|
|
15
|
+
env,
|
|
16
|
+
lxm: 'app.bsky.feed.getActorFeeds',
|
|
17
|
+
fallback: async () => {
|
|
18
|
+
// Minimal valid shape per lexicon when upstream unavailable
|
|
19
|
+
return new Response(JSON.stringify({ feeds: [] }), {
|
|
20
|
+
headers: { 'Content-Type': 'application/json' },
|
|
21
|
+
});
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { APIContext } from 'astro';
|
|
2
|
+
import { proxyAppView } from '../../lib/appview';
|
|
3
|
+
import { isAuthorized, unauthorized } from '../../lib/auth';
|
|
4
|
+
|
|
5
|
+
export const prerender = false;
|
|
6
|
+
|
|
7
|
+
// Implements: app.bsky.feed.getFeedGenerators
|
|
8
|
+
// Thin proxy to AppView with a safe empty fallback to satisfy clients.
|
|
9
|
+
export async function GET({ locals, request }: APIContext) {
|
|
10
|
+
const { env } = locals.runtime;
|
|
11
|
+
if (!(await isAuthorized(request, env))) return unauthorized();
|
|
12
|
+
|
|
13
|
+
return proxyAppView({
|
|
14
|
+
request,
|
|
15
|
+
env,
|
|
16
|
+
lxm: 'app.bsky.feed.getFeedGenerators',
|
|
17
|
+
fallback: async () => {
|
|
18
|
+
// Minimal valid shape per lexicon when upstream unavailable
|
|
19
|
+
return new Response(JSON.stringify({ feeds: [] }), {
|
|
20
|
+
headers: { 'Content-Type': 'application/json' },
|
|
21
|
+
});
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|