@alteran/astro 0.3.1 → 0.3.2
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/index.js +22 -0
- package/package.json +1 -1
- package/src/entrypoints/server.ts +15 -1
package/index.js
CHANGED
|
@@ -40,6 +40,28 @@ const CORE_ROUTES = [
|
|
|
40
40
|
{ pattern: '/xrpc/com.atproto.sync.getRepo.range', entrypoint: './src/pages/xrpc/com.atproto.sync.getRepo.range.ts' },
|
|
41
41
|
{ pattern: '/xrpc/com.atproto.sync.listBlobs', entrypoint: './src/pages/xrpc/com.atproto.sync.listBlobs.ts' },
|
|
42
42
|
{ pattern: '/xrpc/com.atproto.sync.listRepos', entrypoint: './src/pages/xrpc/com.atproto.sync.listRepos.ts' },
|
|
43
|
+
// Additional atproto endpoints
|
|
44
|
+
{ pattern: '/xrpc/com.atproto.identity.signPlcOperation', entrypoint: './src/pages/xrpc/com.atproto.identity.signPlcOperation.ts' },
|
|
45
|
+
{ pattern: '/xrpc/com.atproto.server.getServiceAuth', entrypoint: './src/pages/xrpc/com.atproto.server.getServiceAuth.ts' },
|
|
46
|
+
// AppView proxy endpoints (bsky)
|
|
47
|
+
{ pattern: '/xrpc/app.bsky.actor.getProfile', entrypoint: './src/pages/xrpc/app.bsky.actor.getProfile.ts' },
|
|
48
|
+
{ pattern: '/xrpc/app.bsky.actor.getProfiles', entrypoint: './src/pages/xrpc/app.bsky.actor.getProfiles.ts' },
|
|
49
|
+
{ pattern: '/xrpc/app.bsky.actor.getPreferences', entrypoint: './src/pages/xrpc/app.bsky.actor.getPreferences.ts' },
|
|
50
|
+
{ pattern: '/xrpc/app.bsky.actor.putPreferences', entrypoint: './src/pages/xrpc/app.bsky.actor.putPreferences.ts' },
|
|
51
|
+
{ pattern: '/xrpc/app.bsky.feed.getAuthorFeed', entrypoint: './src/pages/xrpc/app.bsky.feed.getAuthorFeed.ts' },
|
|
52
|
+
{ pattern: '/xrpc/app.bsky.feed.getPostThread', entrypoint: './src/pages/xrpc/app.bsky.feed.getPostThread.ts' },
|
|
53
|
+
{ pattern: '/xrpc/app.bsky.feed.getPosts', entrypoint: './src/pages/xrpc/app.bsky.feed.getPosts.ts' },
|
|
54
|
+
{ pattern: '/xrpc/app.bsky.feed.getTimeline', entrypoint: './src/pages/xrpc/app.bsky.feed.getTimeline.ts' },
|
|
55
|
+
{ pattern: '/xrpc/app.bsky.graph.getFollowers', entrypoint: './src/pages/xrpc/app.bsky.graph.getFollowers.ts' },
|
|
56
|
+
{ pattern: '/xrpc/app.bsky.graph.getFollows', entrypoint: './src/pages/xrpc/app.bsky.graph.getFollows.ts' },
|
|
57
|
+
{ pattern: '/xrpc/app.bsky.labeler.getServices', entrypoint: './src/pages/xrpc/app.bsky.labeler.getServices.ts' },
|
|
58
|
+
{ pattern: '/xrpc/app.bsky.notification.getUnreadCount', entrypoint: './src/pages/xrpc/app.bsky.notification.getUnreadCount.ts' },
|
|
59
|
+
{ pattern: '/xrpc/app.bsky.notification.listNotifications', entrypoint: './src/pages/xrpc/app.bsky.notification.listNotifications.ts' },
|
|
60
|
+
{ pattern: '/xrpc/app.bsky.unspecced.getAgeAssuranceState', entrypoint: './src/pages/xrpc/app.bsky.unspecced.getAgeAssuranceState.ts' },
|
|
61
|
+
{ pattern: '/xrpc/app.bsky.unspecced.getConfig', entrypoint: './src/pages/xrpc/app.bsky.unspecced.getConfig.ts' },
|
|
62
|
+
// Chat endpoints (proxied)
|
|
63
|
+
{ pattern: '/xrpc/chat.bsky.convo.getLog', entrypoint: './src/pages/xrpc/chat.bsky.convo.getLog.ts' },
|
|
64
|
+
{ pattern: '/xrpc/chat.bsky.convo.listConvos', entrypoint: './src/pages/xrpc/chat.bsky.convo.listConvos.ts' },
|
|
43
65
|
];
|
|
44
66
|
|
|
45
67
|
const ROOT_ROUTE = {
|
package/package.json
CHANGED
|
@@ -6,8 +6,22 @@ import { Sequencer } from '../worker/sequencer';
|
|
|
6
6
|
export function createExports(manifest: SSRManifest) {
|
|
7
7
|
const app = new App(manifest);
|
|
8
8
|
const fetch = async (request: Request, env: unknown, context: unknown) => {
|
|
9
|
+
// Ensure ASSETS binding exists to satisfy @astrojs/cloudflare handler
|
|
10
|
+
// even when the worker has no static asset binding configured.
|
|
11
|
+
const e = env as any;
|
|
12
|
+
if (!e?.ASSETS || typeof e.ASSETS.fetch !== 'function') {
|
|
13
|
+
e.ASSETS = {
|
|
14
|
+
async fetch() {
|
|
15
|
+
return new Response('Not Found', {
|
|
16
|
+
status: 404,
|
|
17
|
+
headers: { 'Cache-Control': 'public, max-age=60' },
|
|
18
|
+
});
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
9
23
|
// Delegate to the Cloudflare adapter handler while preserving Alteran additions.
|
|
10
|
-
return await handle(manifest, app, request,
|
|
24
|
+
return await handle(manifest, app, request, e, context as any);
|
|
11
25
|
};
|
|
12
26
|
|
|
13
27
|
return {
|