···11-JETSTREAM_URL="wss://jetstream2.us-east.bsky.network"
11+# main indexers
22+JETSTREAM_URL="wss://jetstream.whey.party"
23SPACEDUST_URL="wss://spacedust.microcosm.blue"
44+55+# for backfill (useless if you just started the instance right now)
36CONSTELLATION_URL="https://constellation.microcosm.blue"
77+# i dont actually know why i need this
48SLINGSHOT_URL="https://slingshot.microcosm.blue"
59610SERVICE_DID="did:web:local3768forumtest.whey.party"
+1-1
index/onboardingBackfill.ts
···11-import { db, handleIndex } from "../main.ts"
11+import { systemDB, handleIndex } from "../main.ts"
22import { FINEPDSAndHandleFromDid } from "../utils/identity.ts";
3344
+64-64
indexclient/index.ts
···55 XrpcClient,
66 type FetchHandler,
77 type FetchHandlerOptions,
88-} from '@atproto/xrpc'
99-import { schemas } from './lexicons.js'
1010-import { CID } from 'multiformats/cid'
1111-import { type OmitKey, type Un$Typed } from './util.js'
1212-import * as AppBskyActorDefs from './types/app/bsky/actor/defs.js'
1313-import * as AppBskyActorGetProfile from './types/app/bsky/actor/getProfile.js'
1414-import * as AppBskyActorGetProfiles from './types/app/bsky/actor/getProfiles.js'
1515-import * as AppBskyEmbedDefs from './types/app/bsky/embed/defs.js'
1616-import * as AppBskyEmbedExternal from './types/app/bsky/embed/external.js'
1717-import * as AppBskyEmbedImages from './types/app/bsky/embed/images.js'
1818-import * as AppBskyEmbedRecord from './types/app/bsky/embed/record.js'
1919-import * as AppBskyEmbedRecordWithMedia from './types/app/bsky/embed/recordWithMedia.js'
2020-import * as AppBskyEmbedVideo from './types/app/bsky/embed/video.js'
2121-import * as AppBskyFeedDefs from './types/app/bsky/feed/defs.js'
2222-import * as AppBskyFeedGetActorFeeds from './types/app/bsky/feed/getActorFeeds.js'
2323-import * as AppBskyFeedGetFeedGenerator from './types/app/bsky/feed/getFeedGenerator.js'
2424-import * as AppBskyFeedGetFeedGenerators from './types/app/bsky/feed/getFeedGenerators.js'
2525-import * as AppBskyFeedGetPosts from './types/app/bsky/feed/getPosts.js'
2626-import * as AppBskyFeedPostgate from './types/app/bsky/feed/postgate.js'
2727-import * as AppBskyFeedThreadgate from './types/app/bsky/feed/threadgate.js'
2828-import * as AppBskyGraphDefs from './types/app/bsky/graph/defs.js'
2929-import * as AppBskyNotificationDefs from './types/app/bsky/notification/defs.js'
3030-import * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet.js'
3131-import * as ComAtprotoLabelDefs from './types/com/atproto/label/defs.js'
3232-import * as ComAtprotoRepoStrongRef from './types/com/atproto/repo/strongRef.js'
3333-import * as PartyWheyAppBskyActorDefs from './types/party/whey/app/bsky/actor/defs.js'
3434-import * as PartyWheyAppBskyFeedDefs from './types/party/whey/app/bsky/feed/defs.js'
3535-import * as PartyWheyAppBskyFeedGetActorLikesPartial from './types/party/whey/app/bsky/feed/getActorLikesPartial.js'
3636-import * as PartyWheyAppBskyFeedGetAuthorFeedPartial from './types/party/whey/app/bsky/feed/getAuthorFeedPartial.js'
3737-import * as PartyWheyAppBskyFeedGetLikesPartial from './types/party/whey/app/bsky/feed/getLikesPartial.js'
3838-import * as PartyWheyAppBskyFeedGetListFeedPartial from './types/party/whey/app/bsky/feed/getListFeedPartial.js'
3939-import * as PartyWheyAppBskyFeedGetPostThreadPartial from './types/party/whey/app/bsky/feed/getPostThreadPartial.js'
4040-import * as PartyWheyAppBskyFeedGetQuotesPartial from './types/party/whey/app/bsky/feed/getQuotesPartial.js'
4141-import * as PartyWheyAppBskyFeedGetRepostedByPartial from './types/party/whey/app/bsky/feed/getRepostedByPartial.js'
88+} from 'npm:@atproto/xrpc'
99+import { schemas } from './lexicons.ts'
1010+import { CID } from 'npm:multiformats/cid'
1111+import { type OmitKey, type Un$Typed } from './util.ts'
1212+import * as AppBskyActorDefs from './types/app/bsky/actor/defs.ts'
1313+import * as AppBskyActorGetProfile from './types/app/bsky/actor/getProfile.ts'
1414+import * as AppBskyActorGetProfiles from './types/app/bsky/actor/getProfiles.ts'
1515+import * as AppBskyEmbedDefs from './types/app/bsky/embed/defs.ts'
1616+import * as AppBskyEmbedExternal from './types/app/bsky/embed/external.ts'
1717+import * as AppBskyEmbedImages from './types/app/bsky/embed/images.ts'
1818+import * as AppBskyEmbedRecord from './types/app/bsky/embed/record.ts'
1919+import * as AppBskyEmbedRecordWithMedia from './types/app/bsky/embed/recordWithMedia.ts'
2020+import * as AppBskyEmbedVideo from './types/app/bsky/embed/video.ts'
2121+import * as AppBskyFeedDefs from './types/app/bsky/feed/defs.ts'
2222+import * as AppBskyFeedGetActorFeeds from './types/app/bsky/feed/getActorFeeds.ts'
2323+import * as AppBskyFeedGetFeedGenerator from './types/app/bsky/feed/getFeedGenerator.ts'
2424+import * as AppBskyFeedGetFeedGenerators from './types/app/bsky/feed/getFeedGenerators.ts'
2525+import * as AppBskyFeedGetPosts from './types/app/bsky/feed/getPosts.ts'
2626+import * as AppBskyFeedPostgate from './types/app/bsky/feed/postgate.ts'
2727+import * as AppBskyFeedThreadgate from './types/app/bsky/feed/threadgate.ts'
2828+import * as AppBskyGraphDefs from './types/app/bsky/graph/defs.ts'
2929+import * as AppBskyNotificationDefs from './types/app/bsky/notification/defs.ts'
3030+import * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet.ts'
3131+import * as ComAtprotoLabelDefs from './types/com/atproto/label/defs.ts'
3232+import * as ComAtprotoRepoStrongRef from './types/com/atproto/repo/strongRef.ts'
3333+import * as PartyWheyAppBskyActorDefs from './types/party/whey/app/bsky/actor/defs.ts'
3434+import * as PartyWheyAppBskyFeedDefs from './types/party/whey/app/bsky/feed/defs.ts'
3535+import * as PartyWheyAppBskyFeedGetActorLikesPartial from './types/party/whey/app/bsky/feed/getActorLikesPartial.ts'
3636+import * as PartyWheyAppBskyFeedGetAuthorFeedPartial from './types/party/whey/app/bsky/feed/getAuthorFeedPartial.ts'
3737+import * as PartyWheyAppBskyFeedGetLikesPartial from './types/party/whey/app/bsky/feed/getLikesPartial.ts'
3838+import * as PartyWheyAppBskyFeedGetListFeedPartial from './types/party/whey/app/bsky/feed/getListFeedPartial.ts'
3939+import * as PartyWheyAppBskyFeedGetPostThreadPartial from './types/party/whey/app/bsky/feed/getPostThreadPartial.ts'
4040+import * as PartyWheyAppBskyFeedGetQuotesPartial from './types/party/whey/app/bsky/feed/getQuotesPartial.ts'
4141+import * as PartyWheyAppBskyFeedGetRepostedByPartial from './types/party/whey/app/bsky/feed/getRepostedByPartial.ts'
42424343-export * as AppBskyActorDefs from './types/app/bsky/actor/defs.js'
4444-export * as AppBskyActorGetProfile from './types/app/bsky/actor/getProfile.js'
4545-export * as AppBskyActorGetProfiles from './types/app/bsky/actor/getProfiles.js'
4646-export * as AppBskyEmbedDefs from './types/app/bsky/embed/defs.js'
4747-export * as AppBskyEmbedExternal from './types/app/bsky/embed/external.js'
4848-export * as AppBskyEmbedImages from './types/app/bsky/embed/images.js'
4949-export * as AppBskyEmbedRecord from './types/app/bsky/embed/record.js'
5050-export * as AppBskyEmbedRecordWithMedia from './types/app/bsky/embed/recordWithMedia.js'
5151-export * as AppBskyEmbedVideo from './types/app/bsky/embed/video.js'
5252-export * as AppBskyFeedDefs from './types/app/bsky/feed/defs.js'
5353-export * as AppBskyFeedGetActorFeeds from './types/app/bsky/feed/getActorFeeds.js'
5454-export * as AppBskyFeedGetFeedGenerator from './types/app/bsky/feed/getFeedGenerator.js'
5555-export * as AppBskyFeedGetFeedGenerators from './types/app/bsky/feed/getFeedGenerators.js'
5656-export * as AppBskyFeedGetPosts from './types/app/bsky/feed/getPosts.js'
5757-export * as AppBskyFeedPostgate from './types/app/bsky/feed/postgate.js'
5858-export * as AppBskyFeedThreadgate from './types/app/bsky/feed/threadgate.js'
5959-export * as AppBskyGraphDefs from './types/app/bsky/graph/defs.js'
6060-export * as AppBskyNotificationDefs from './types/app/bsky/notification/defs.js'
6161-export * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet.js'
6262-export * as ComAtprotoLabelDefs from './types/com/atproto/label/defs.js'
6363-export * as ComAtprotoRepoStrongRef from './types/com/atproto/repo/strongRef.js'
6464-export * as PartyWheyAppBskyActorDefs from './types/party/whey/app/bsky/actor/defs.js'
6565-export * as PartyWheyAppBskyFeedDefs from './types/party/whey/app/bsky/feed/defs.js'
6666-export * as PartyWheyAppBskyFeedGetActorLikesPartial from './types/party/whey/app/bsky/feed/getActorLikesPartial.js'
6767-export * as PartyWheyAppBskyFeedGetAuthorFeedPartial from './types/party/whey/app/bsky/feed/getAuthorFeedPartial.js'
6868-export * as PartyWheyAppBskyFeedGetLikesPartial from './types/party/whey/app/bsky/feed/getLikesPartial.js'
6969-export * as PartyWheyAppBskyFeedGetListFeedPartial from './types/party/whey/app/bsky/feed/getListFeedPartial.js'
7070-export * as PartyWheyAppBskyFeedGetPostThreadPartial from './types/party/whey/app/bsky/feed/getPostThreadPartial.js'
7171-export * as PartyWheyAppBskyFeedGetQuotesPartial from './types/party/whey/app/bsky/feed/getQuotesPartial.js'
7272-export * as PartyWheyAppBskyFeedGetRepostedByPartial from './types/party/whey/app/bsky/feed/getRepostedByPartial.js'
4343+export * as AppBskyActorDefs from './types/app/bsky/actor/defs.ts'
4444+export * as AppBskyActorGetProfile from './types/app/bsky/actor/getProfile.ts'
4545+export * as AppBskyActorGetProfiles from './types/app/bsky/actor/getProfiles.ts'
4646+export * as AppBskyEmbedDefs from './types/app/bsky/embed/defs.ts'
4747+export * as AppBskyEmbedExternal from './types/app/bsky/embed/external.ts'
4848+export * as AppBskyEmbedImages from './types/app/bsky/embed/images.ts'
4949+export * as AppBskyEmbedRecord from './types/app/bsky/embed/record.ts'
5050+export * as AppBskyEmbedRecordWithMedia from './types/app/bsky/embed/recordWithMedia.ts'
5151+export * as AppBskyEmbedVideo from './types/app/bsky/embed/video.ts'
5252+export * as AppBskyFeedDefs from './types/app/bsky/feed/defs.ts'
5353+export * as AppBskyFeedGetActorFeeds from './types/app/bsky/feed/getActorFeeds.ts'
5454+export * as AppBskyFeedGetFeedGenerator from './types/app/bsky/feed/getFeedGenerator.ts'
5555+export * as AppBskyFeedGetFeedGenerators from './types/app/bsky/feed/getFeedGenerators.ts'
5656+export * as AppBskyFeedGetPosts from './types/app/bsky/feed/getPosts.ts'
5757+export * as AppBskyFeedPostgate from './types/app/bsky/feed/postgate.ts'
5858+export * as AppBskyFeedThreadgate from './types/app/bsky/feed/threadgate.ts'
5959+export * as AppBskyGraphDefs from './types/app/bsky/graph/defs.ts'
6060+export * as AppBskyNotificationDefs from './types/app/bsky/notification/defs.ts'
6161+export * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet.ts'
6262+export * as ComAtprotoLabelDefs from './types/com/atproto/label/defs.ts'
6363+export * as ComAtprotoRepoStrongRef from './types/com/atproto/repo/strongRef.ts'
6464+export * as PartyWheyAppBskyActorDefs from './types/party/whey/app/bsky/actor/defs.ts'
6565+export * as PartyWheyAppBskyFeedDefs from './types/party/whey/app/bsky/feed/defs.ts'
6666+export * as PartyWheyAppBskyFeedGetActorLikesPartial from './types/party/whey/app/bsky/feed/getActorLikesPartial.ts'
6767+export * as PartyWheyAppBskyFeedGetAuthorFeedPartial from './types/party/whey/app/bsky/feed/getAuthorFeedPartial.ts'
6868+export * as PartyWheyAppBskyFeedGetLikesPartial from './types/party/whey/app/bsky/feed/getLikesPartial.ts'
6969+export * as PartyWheyAppBskyFeedGetListFeedPartial from './types/party/whey/app/bsky/feed/getListFeedPartial.ts'
7070+export * as PartyWheyAppBskyFeedGetPostThreadPartial from './types/party/whey/app/bsky/feed/getPostThreadPartial.ts'
7171+export * as PartyWheyAppBskyFeedGetQuotesPartial from './types/party/whey/app/bsky/feed/getQuotesPartial.ts'
7272+export * as PartyWheyAppBskyFeedGetRepostedByPartial from './types/party/whey/app/bsky/feed/getRepostedByPartial.ts'
73737474export const APP_BSKY_FEED = {
7575 DefsRequestLess: 'app.bsky.feed.defs#requestLess',
+2-2
indexclient/lexicons.ts
···66 Lexicons,
77 ValidationError,
88 type ValidationResult,
99-} from '@atproto/lexicon'
1010-import { type $Typed, is$typed, maybe$typed } from './util.js'
99+} from 'npm:@atproto/lexicon'
1010+import { type $Typed, is$typed, maybe$typed } from './util.ts'
11111212export const schemaDict = {
1313 AppBskyActorDefs: {
+11-11
indexclient/types/app/bsky/actor/defs.ts
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { type ValidationResult, BlobRef } from '@atproto/lexicon'
55-import { CID } from 'multiformats/cid'
66-import { validate as _validate } from '../../../../lexicons'
44+import { type ValidationResult, BlobRef } from 'npm:@atproto/lexicon'
55+import { CID } from 'npm:multiformats/cid'
66+import { validate as _validate } from '../../../../lexicons.ts'
77import {
88 type $Typed,
99 is$typed as _is$typed,
1010 type OmitKey,
1111-} from '../../../../util'
1212-import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js'
1313-import type * as AppBskyGraphDefs from '../graph/defs.js'
1414-import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js'
1515-import type * as AppBskyNotificationDefs from '../notification/defs.js'
1616-import type * as AppBskyFeedThreadgate from '../feed/threadgate.js'
1717-import type * as AppBskyFeedPostgate from '../feed/postgate.js'
1818-import type * as AppBskyEmbedExternal from '../embed/external.js'
1111+} from '../../../../util.ts'
1212+import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.ts'
1313+import type * as AppBskyGraphDefs from '../graph/defs.ts'
1414+import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.ts'
1515+import type * as AppBskyNotificationDefs from '../notification/defs.ts'
1616+import type * as AppBskyFeedThreadgate from '../feed/threadgate.ts'
1717+import type * as AppBskyFeedPostgate from '../feed/postgate.ts'
1818+import type * as AppBskyEmbedExternal from '../embed/external.ts'
19192020const is$typed = _is$typed,
2121 validate = _validate
+6-6
indexclient/types/app/bsky/actor/getProfile.ts
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { HeadersMap, XRPCError } from '@atproto/xrpc'
55-import { type ValidationResult, BlobRef } from '@atproto/lexicon'
66-import { CID } from 'multiformats/cid'
77-import { validate as _validate } from '../../../../lexicons'
44+import { HeadersMap, XRPCError } from 'npm:@atproto/xrpc'
55+import { type ValidationResult, BlobRef } from 'npm:@atproto/lexicon'
66+import { CID } from 'npm:multiformats/cid'
77+import { validate as _validate } from '../../../../lexicons.ts'
88import {
99 type $Typed,
1010 is$typed as _is$typed,
1111 type OmitKey,
1212-} from '../../../../util'
1313-import type * as AppBskyActorDefs from './defs.js'
1212+} from '../../../../util.ts'
1313+import type * as AppBskyActorDefs from './defs.ts'
14141515const is$typed = _is$typed,
1616 validate = _validate
+6-6
indexclient/types/app/bsky/actor/getProfiles.ts
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { HeadersMap, XRPCError } from '@atproto/xrpc'
55-import { type ValidationResult, BlobRef } from '@atproto/lexicon'
66-import { CID } from 'multiformats/cid'
77-import { validate as _validate } from '../../../../lexicons'
44+import { HeadersMap, XRPCError } from 'npm:@atproto/xrpc'
55+import { type ValidationResult, BlobRef } from 'npm:@atproto/lexicon'
66+import { CID } from 'npm:multiformats/cid'
77+import { validate as _validate } from '../../../../lexicons.ts'
88import {
99 type $Typed,
1010 is$typed as _is$typed,
1111 type OmitKey,
1212-} from '../../../../util'
1313-import type * as AppBskyActorDefs from './defs.js'
1212+} from '../../../../util.ts'
1313+import type * as AppBskyActorDefs from './defs.ts'
14141515const is$typed = _is$typed,
1616 validate = _validate
+4-4
indexclient/types/app/bsky/embed/defs.ts
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { type ValidationResult, BlobRef } from '@atproto/lexicon'
55-import { CID } from 'multiformats/cid'
66-import { validate as _validate } from '../../../../lexicons'
44+import { type ValidationResult, BlobRef } from 'npm:@atproto/lexicon'
55+import { CID } from 'npm:multiformats/cid'
66+import { validate as _validate } from '../../../../lexicons.ts'
77import {
88 type $Typed,
99 is$typed as _is$typed,
1010 type OmitKey,
1111-} from '../../../../util'
1111+} from '../../../../util.ts'
12121313const is$typed = _is$typed,
1414 validate = _validate
+4-4
indexclient/types/app/bsky/embed/external.ts
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { type ValidationResult, BlobRef } from '@atproto/lexicon'
55-import { CID } from 'multiformats/cid'
66-import { validate as _validate } from '../../../../lexicons'
44+import { type ValidationResult, BlobRef } from 'npm:@atproto/lexicon'
55+import { CID } from 'npm:multiformats/cid'
66+import { validate as _validate } from '../../../../lexicons.ts'
77import {
88 type $Typed,
99 is$typed as _is$typed,
1010 type OmitKey,
1111-} from '../../../../util'
1111+} from '../../../../util.ts'
12121313const is$typed = _is$typed,
1414 validate = _validate
+5-5
indexclient/types/app/bsky/embed/images.ts
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { type ValidationResult, BlobRef } from '@atproto/lexicon'
55-import { CID } from 'multiformats/cid'
66-import { validate as _validate } from '../../../../lexicons'
44+import { type ValidationResult, BlobRef } from 'npm:@atproto/lexicon'
55+import { CID } from 'npm:multiformats/cid'
66+import { validate as _validate } from '../../../../lexicons.ts'
77import {
88 type $Typed,
99 is$typed as _is$typed,
1010 type OmitKey,
1111-} from '../../../../util'
1212-import type * as AppBskyEmbedDefs from './defs.js'
1111+} from '../../../../util.ts'
1212+import type * as AppBskyEmbedDefs from './defs.ts'
13131414const is$typed = _is$typed,
1515 validate = _validate
+14-14
indexclient/types/app/bsky/embed/record.ts
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { type ValidationResult, BlobRef } from '@atproto/lexicon'
55-import { CID } from 'multiformats/cid'
66-import { validate as _validate } from '../../../../lexicons'
44+import { type ValidationResult, BlobRef } from 'npm:@atproto/lexicon'
55+import { CID } from 'npm:multiformats/cid'
66+import { validate as _validate } from '../../../../lexicons.ts'
77import {
88 type $Typed,
99 is$typed as _is$typed,
1010 type OmitKey,
1111-} from '../../../../util'
1212-import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js'
1313-import type * as AppBskyFeedDefs from '../feed/defs.js'
1414-import type * as AppBskyGraphDefs from '../graph/defs.js'
1515-import type * as AppBskyLabelerDefs from '../labeler/defs.js'
1616-import type * as AppBskyActorDefs from '../actor/defs.js'
1717-import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js'
1818-import type * as AppBskyEmbedImages from './images.js'
1919-import type * as AppBskyEmbedVideo from './video.js'
2020-import type * as AppBskyEmbedExternal from './external.js'
2121-import type * as AppBskyEmbedRecordWithMedia from './recordWithMedia.js'
1111+} from '../../../../util.ts'
1212+import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.ts'
1313+import type * as AppBskyFeedDefs from '../feed/defs.ts'
1414+import type * as AppBskyGraphDefs from '../graph/defs.ts'
1515+import type * as AppBskyLabelerDefs from '../labeler/defs.ts'
1616+import type * as AppBskyActorDefs from '../actor/defs.ts'
1717+import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.ts'
1818+import type * as AppBskyEmbedImages from './images.ts'
1919+import type * as AppBskyEmbedVideo from './video.ts'
2020+import type * as AppBskyEmbedExternal from './external.ts'
2121+import type * as AppBskyEmbedRecordWithMedia from './recordWithMedia.ts'
22222323const is$typed = _is$typed,
2424 validate = _validate
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { type ValidationResult, BlobRef } from '@atproto/lexicon'
55-import { CID } from 'multiformats/cid'
66-import { validate as _validate } from '../../../../lexicons'
44+import { type ValidationResult, BlobRef } from 'npm:@atproto/lexicon'
55+import { CID } from 'npm:multiformats/cid'
66+import { validate as _validate } from '../../../../lexicons.ts'
77import {
88 type $Typed,
99 is$typed as _is$typed,
1010 type OmitKey,
1111-} from '../../../../util'
1212-import type * as AppBskyEmbedRecord from './record.js'
1313-import type * as AppBskyEmbedImages from './images.js'
1414-import type * as AppBskyEmbedVideo from './video.js'
1515-import type * as AppBskyEmbedExternal from './external.js'
1111+} from '../../../../util.ts'
1212+import type * as AppBskyEmbedRecord from './record.ts'
1313+import type * as AppBskyEmbedImages from './images.ts'
1414+import type * as AppBskyEmbedVideo from './video.ts'
1515+import type * as AppBskyEmbedExternal from './external.ts'
16161717const is$typed = _is$typed,
1818 validate = _validate
+5-5
indexclient/types/app/bsky/embed/video.ts
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { type ValidationResult, BlobRef } from '@atproto/lexicon'
55-import { CID } from 'multiformats/cid'
66-import { validate as _validate } from '../../../../lexicons'
44+import { type ValidationResult, BlobRef } from 'npm:@atproto/lexicon'
55+import { CID } from 'npm:multiformats/cid'
66+import { validate as _validate } from '../../../../lexicons.ts'
77import {
88 type $Typed,
99 is$typed as _is$typed,
1010 type OmitKey,
1111-} from '../../../../util'
1212-import type * as AppBskyEmbedDefs from './defs.js'
1111+} from '../../../../util.ts'
1212+import type * as AppBskyEmbedDefs from './defs.ts'
13131414const is$typed = _is$typed,
1515 validate = _validate
+13-13
indexclient/types/app/bsky/feed/defs.ts
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { type ValidationResult, BlobRef } from '@atproto/lexicon'
55-import { CID } from 'multiformats/cid'
66-import { validate as _validate } from '../../../../lexicons'
44+import { type ValidationResult, BlobRef } from 'npm:@atproto/lexicon'
55+import { CID } from 'npm:multiformats/cid'
66+import { validate as _validate } from '../../../../lexicons.ts'
77import {
88 type $Typed,
99 is$typed as _is$typed,
1010 type OmitKey,
1111-} from '../../../../util'
1212-import type * as AppBskyActorDefs from '../actor/defs.js'
1313-import type * as AppBskyEmbedImages from '../embed/images.js'
1414-import type * as AppBskyEmbedVideo from '../embed/video.js'
1515-import type * as AppBskyEmbedExternal from '../embed/external.js'
1616-import type * as AppBskyEmbedRecord from '../embed/record.js'
1717-import type * as AppBskyEmbedRecordWithMedia from '../embed/recordWithMedia.js'
1818-import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js'
1919-import type * as AppBskyRichtextFacet from '../richtext/facet.js'
2020-import type * as AppBskyGraphDefs from '../graph/defs.js'
1111+} from '../../../../util.ts'
1212+import type * as AppBskyActorDefs from '../actor/defs.ts'
1313+import type * as AppBskyEmbedImages from '../embed/images.ts'
1414+import type * as AppBskyEmbedVideo from '../embed/video.ts'
1515+import type * as AppBskyEmbedExternal from '../embed/external.ts'
1616+import type * as AppBskyEmbedRecord from '../embed/record.ts'
1717+import type * as AppBskyEmbedRecordWithMedia from '../embed/recordWithMedia.ts'
1818+import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.ts'
1919+import type * as AppBskyRichtextFacet from '../richtext/facet.ts'
2020+import type * as AppBskyGraphDefs from '../graph/defs.ts'
21212222const is$typed = _is$typed,
2323 validate = _validate
+6-6
indexclient/types/app/bsky/feed/getActorFeeds.ts
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { HeadersMap, XRPCError } from '@atproto/xrpc'
55-import { type ValidationResult, BlobRef } from '@atproto/lexicon'
66-import { CID } from 'multiformats/cid'
77-import { validate as _validate } from '../../../../lexicons'
44+import { HeadersMap, XRPCError } from 'npm:@atproto/xrpc'
55+import { type ValidationResult, BlobRef } from 'npm:@atproto/lexicon'
66+import { CID } from 'npm:multiformats/cid'
77+import { validate as _validate } from '../../../../lexicons.ts'
88import {
99 type $Typed,
1010 is$typed as _is$typed,
1111 type OmitKey,
1212-} from '../../../../util'
1313-import type * as AppBskyFeedDefs from './defs.js'
1212+} from '../../../../util.ts'
1313+import type * as AppBskyFeedDefs from './defs.ts'
14141515const is$typed = _is$typed,
1616 validate = _validate
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { HeadersMap, XRPCError } from '@atproto/xrpc'
55-import { type ValidationResult, BlobRef } from '@atproto/lexicon'
66-import { CID } from 'multiformats/cid'
77-import { validate as _validate } from '../../../../lexicons'
44+import { HeadersMap, XRPCError } from 'npm:@atproto/xrpc'
55+import { type ValidationResult, BlobRef } from 'npm:@atproto/lexicon'
66+import { CID } from 'npm:multiformats/cid'
77+import { validate as _validate } from '../../../../lexicons.ts'
88import {
99 type $Typed,
1010 is$typed as _is$typed,
1111 type OmitKey,
1212-} from '../../../../util'
1313-import type * as AppBskyFeedDefs from './defs.js'
1212+} from '../../../../util.ts'
1313+import type * as AppBskyFeedDefs from './defs.ts'
14141515const is$typed = _is$typed,
1616 validate = _validate
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { HeadersMap, XRPCError } from '@atproto/xrpc'
55-import { type ValidationResult, BlobRef } from '@atproto/lexicon'
66-import { CID } from 'multiformats/cid'
77-import { validate as _validate } from '../../../../lexicons'
44+import { HeadersMap, XRPCError } from 'npm:@atproto/xrpc'
55+import { type ValidationResult, BlobRef } from 'npm:@atproto/lexicon'
66+import { CID } from 'npm:multiformats/cid'
77+import { validate as _validate } from '../../../../lexicons.ts'
88import {
99 type $Typed,
1010 is$typed as _is$typed,
1111 type OmitKey,
1212-} from '../../../../util'
1313-import type * as AppBskyFeedDefs from './defs.js'
1212+} from '../../../../util.ts'
1313+import type * as AppBskyFeedDefs from './defs.ts'
14141515const is$typed = _is$typed,
1616 validate = _validate
+6-6
indexclient/types/app/bsky/feed/getPosts.ts
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { HeadersMap, XRPCError } from '@atproto/xrpc'
55-import { type ValidationResult, BlobRef } from '@atproto/lexicon'
66-import { CID } from 'multiformats/cid'
77-import { validate as _validate } from '../../../../lexicons'
44+import { HeadersMap, XRPCError } from 'npm:@atproto/xrpc'
55+import { type ValidationResult, BlobRef } from 'npm:@atproto/lexicon'
66+import { CID } from 'npm:multiformats/cid'
77+import { validate as _validate } from '../../../../lexicons.ts'
88import {
99 type $Typed,
1010 is$typed as _is$typed,
1111 type OmitKey,
1212-} from '../../../../util'
1313-import type * as AppBskyFeedDefs from './defs.js'
1212+} from '../../../../util.ts'
1313+import type * as AppBskyFeedDefs from './defs.ts'
14141515const is$typed = _is$typed,
1616 validate = _validate
+4-4
indexclient/types/app/bsky/feed/postgate.ts
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { type ValidationResult, BlobRef } from '@atproto/lexicon'
55-import { CID } from 'multiformats/cid'
66-import { validate as _validate } from '../../../../lexicons'
44+import { type ValidationResult, BlobRef } from 'npm:@atproto/lexicon'
55+import { CID } from 'npm:multiformats/cid'
66+import { validate as _validate } from '../../../../lexicons.ts'
77import {
88 type $Typed,
99 is$typed as _is$typed,
1010 type OmitKey,
1111-} from '../../../../util'
1111+} from '../../../../util.ts'
12121313const is$typed = _is$typed,
1414 validate = _validate
+4-4
indexclient/types/app/bsky/feed/threadgate.ts
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { type ValidationResult, BlobRef } from '@atproto/lexicon'
55-import { CID } from 'multiformats/cid'
66-import { validate as _validate } from '../../../../lexicons'
44+import { type ValidationResult, BlobRef } from 'npm:@atproto/lexicon'
55+import { CID } from 'npm:multiformats/cid'
66+import { validate as _validate } from '../../../../lexicons.ts'
77import {
88 type $Typed,
99 is$typed as _is$typed,
1010 type OmitKey,
1111-} from '../../../../util'
1111+} from '../../../../util.ts'
12121313const is$typed = _is$typed,
1414 validate = _validate
+8-8
indexclient/types/app/bsky/graph/defs.ts
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { type ValidationResult, BlobRef } from '@atproto/lexicon'
55-import { CID } from 'multiformats/cid'
66-import { validate as _validate } from '../../../../lexicons'
44+import { type ValidationResult, BlobRef } from 'npm:@atproto/lexicon'
55+import { CID } from 'npm:multiformats/cid'
66+import { validate as _validate } from '../../../../lexicons.ts'
77import {
88 type $Typed,
99 is$typed as _is$typed,
1010 type OmitKey,
1111-} from '../../../../util'
1212-import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js'
1313-import type * as AppBskyActorDefs from '../actor/defs.js'
1414-import type * as AppBskyRichtextFacet from '../richtext/facet.js'
1515-import type * as AppBskyFeedDefs from '../feed/defs.js'
1111+} from '../../../../util.ts'
1212+import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.ts'
1313+import type * as AppBskyActorDefs from '../actor/defs.ts'
1414+import type * as AppBskyRichtextFacet from '../richtext/facet.ts'
1515+import type * as AppBskyFeedDefs from '../feed/defs.ts'
16161717const is$typed = _is$typed,
1818 validate = _validate
+4-4
indexclient/types/app/bsky/notification/defs.ts
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { type ValidationResult, BlobRef } from '@atproto/lexicon'
55-import { CID } from 'multiformats/cid'
66-import { validate as _validate } from '../../../../lexicons'
44+import { type ValidationResult, BlobRef } from 'npm:@atproto/lexicon'
55+import { CID } from 'npm:multiformats/cid'
66+import { validate as _validate } from '../../../../lexicons.ts'
77import {
88 type $Typed,
99 is$typed as _is$typed,
1010 type OmitKey,
1111-} from '../../../../util'
1111+} from '../../../../util.ts'
12121313const is$typed = _is$typed,
1414 validate = _validate
+4-4
indexclient/types/app/bsky/richtext/facet.ts
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { type ValidationResult, BlobRef } from '@atproto/lexicon'
55-import { CID } from 'multiformats/cid'
66-import { validate as _validate } from '../../../../lexicons'
44+import { type ValidationResult, BlobRef } from 'npm:@atproto/lexicon'
55+import { CID } from 'npm:multiformats/cid'
66+import { validate as _validate } from '../../../../lexicons.ts'
77import {
88 type $Typed,
99 is$typed as _is$typed,
1010 type OmitKey,
1111-} from '../../../../util'
1111+} from '../../../../util.ts'
12121313const is$typed = _is$typed,
1414 validate = _validate
+4-4
indexclient/types/com/atproto/label/defs.ts
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { type ValidationResult, BlobRef } from '@atproto/lexicon'
55-import { CID } from 'multiformats/cid'
66-import { validate as _validate } from '../../../../lexicons'
44+import { type ValidationResult, BlobRef } from 'npm:@atproto/lexicon'
55+import { CID } from 'npm:multiformats/cid'
66+import { validate as _validate } from '../../../../lexicons.ts'
77import {
88 type $Typed,
99 is$typed as _is$typed,
1010 type OmitKey,
1111-} from '../../../../util'
1111+} from '../../../../util.ts'
12121313const is$typed = _is$typed,
1414 validate = _validate
+4-4
indexclient/types/com/atproto/repo/strongRef.ts
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { type ValidationResult, BlobRef } from '@atproto/lexicon'
55-import { CID } from 'multiformats/cid'
66-import { validate as _validate } from '../../../../lexicons'
44+import { type ValidationResult, BlobRef } from 'npm:@atproto/lexicon'
55+import { CID } from 'npm:multiformats/cid'
66+import { validate as _validate } from '../../../../lexicons.ts'
77import {
88 type $Typed,
99 is$typed as _is$typed,
1010 type OmitKey,
1111-} from '../../../../util'
1111+} from '../../../../util.ts'
12121313const is$typed = _is$typed,
1414 validate = _validate
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { type ValidationResult, BlobRef } from '@atproto/lexicon'
55-import { CID } from 'multiformats/cid'
66-import { validate as _validate } from '../../../../../../lexicons'
44+import { type ValidationResult, BlobRef } from 'npm:@atproto/lexicon'
55+import { CID } from 'npm:multiformats/cid'
66+import { validate as _validate } from '../../../../../../lexicons.ts'
77import {
88 type $Typed,
99 is$typed as _is$typed,
1010 type OmitKey,
1111-} from '../../../../../../util'
1111+} from '../../../../../../util.ts'
12121313const is$typed = _is$typed,
1414 validate = _validate
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { type ValidationResult, BlobRef } from '@atproto/lexicon'
55-import { CID } from 'multiformats/cid'
66-import { validate as _validate } from '../../../../../../lexicons'
44+import { type ValidationResult, BlobRef } from 'npm:@atproto/lexicon'
55+import { CID } from 'npm:multiformats/cid'
66+import { validate as _validate } from '../../../../../../lexicons.ts'
77import {
88 type $Typed,
99 is$typed as _is$typed,
1010 type OmitKey,
1111-} from '../../../../../../util'
1212-import type * as AppBskyFeedDefs from '../../../../../app/bsky/feed/defs.js'
1313-import type * as PartyWheyAppBskyActorDefs from '../actor/defs.js'
1414-import type * as AppBskyActorDefs from '../../../../../app/bsky/actor/defs.js'
1111+} from '../../../../../../util.ts'
1212+import type * as AppBskyFeedDefs from '../../../../../app/bsky/feed/defs.ts'
1313+import type * as PartyWheyAppBskyActorDefs from '../actor/defs.ts'
1414+import type * as AppBskyActorDefs from '../../../../../app/bsky/actor/defs.ts'
15151616const is$typed = _is$typed,
1717 validate = _validate
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { HeadersMap, XRPCError } from '@atproto/xrpc'
55-import { type ValidationResult, BlobRef } from '@atproto/lexicon'
66-import { CID } from 'multiformats/cid'
77-import { validate as _validate } from '../../../../../../lexicons'
44+import { HeadersMap, XRPCError } from 'npm:@atproto/xrpc'
55+import { type ValidationResult, BlobRef } from 'npm:@atproto/lexicon'
66+import { CID } from 'npm:multiformats/cid'
77+import { validate as _validate } from '../../../../../../lexicons.ts'
88import {
99 type $Typed,
1010 is$typed as _is$typed,
1111 type OmitKey,
1212-} from '../../../../../../util'
1313-import type * as PartyWheyAppBskyFeedDefs from './defs.js'
1414-import type * as AppBskyFeedDefs from '../../../../../app/bsky/feed/defs.js'
1212+} from '../../../../../../util.ts'
1313+import type * as PartyWheyAppBskyFeedDefs from './defs.ts'
1414+import type * as AppBskyFeedDefs from '../../../../../app/bsky/feed/defs.ts'
15151616const is$typed = _is$typed,
1717 validate = _validate
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { HeadersMap, XRPCError } from '@atproto/xrpc'
55-import { type ValidationResult, BlobRef } from '@atproto/lexicon'
66-import { CID } from 'multiformats/cid'
77-import { validate as _validate } from '../../../../../../lexicons'
44+import { HeadersMap, XRPCError } from 'npm:@atproto/xrpc'
55+import { type ValidationResult, BlobRef } from 'npm:@atproto/lexicon'
66+import { CID } from 'npm:multiformats/cid'
77+import { validate as _validate } from '../../../../../../lexicons.ts'
88import {
99 type $Typed,
1010 is$typed as _is$typed,
1111 type OmitKey,
1212-} from '../../../../../../util'
1313-import type * as PartyWheyAppBskyFeedDefs from './defs.js'
1414-import type * as AppBskyFeedDefs from '../../../../../app/bsky/feed/defs.js'
1212+} from '../../../../../../util.ts'
1313+import type * as PartyWheyAppBskyFeedDefs from './defs.ts'
1414+import type * as AppBskyFeedDefs from '../../../../../app/bsky/feed/defs.ts'
15151616const is$typed = _is$typed,
1717 validate = _validate
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { HeadersMap, XRPCError } from '@atproto/xrpc'
55-import { type ValidationResult, BlobRef } from '@atproto/lexicon'
66-import { CID } from 'multiformats/cid'
77-import { validate as _validate } from '../../../../../../lexicons'
44+import { HeadersMap, XRPCError } from 'npm:@atproto/xrpc'
55+import { type ValidationResult, BlobRef } from 'npm:@atproto/lexicon'
66+import { CID } from 'npm:multiformats/cid'
77+import { validate as _validate } from '../../../../../../lexicons.ts'
88import {
99 type $Typed,
1010 is$typed as _is$typed,
1111 type OmitKey,
1212-} from '../../../../../../util'
1313-import type * as PartyWheyAppBskyActorDefs from '../actor/defs.js'
1212+} from '../../../../../../util.ts'
1313+import type * as PartyWheyAppBskyActorDefs from '../actor/defs.ts'
14141515const is$typed = _is$typed,
1616 validate = _validate
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { HeadersMap, XRPCError } from '@atproto/xrpc'
55-import { type ValidationResult, BlobRef } from '@atproto/lexicon'
66-import { CID } from 'multiformats/cid'
77-import { validate as _validate } from '../../../../../../lexicons'
44+import { HeadersMap, XRPCError } from 'npm:@atproto/xrpc'
55+import { type ValidationResult, BlobRef } from 'npm:@atproto/lexicon'
66+import { CID } from 'npm:multiformats/cid'
77+import { validate as _validate } from '../../../../../../lexicons.ts'
88import {
99 type $Typed,
1010 is$typed as _is$typed,
1111 type OmitKey,
1212-} from '../../../../../../util'
1313-import type * as PartyWheyAppBskyFeedDefs from './defs.js'
1212+} from '../../../../../../util.ts'
1313+import type * as PartyWheyAppBskyFeedDefs from './defs.ts'
14141515const is$typed = _is$typed,
1616 validate = _validate
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { HeadersMap, XRPCError } from '@atproto/xrpc'
55-import { type ValidationResult, BlobRef } from '@atproto/lexicon'
66-import { CID } from 'multiformats/cid'
77-import { validate as _validate } from '../../../../../../lexicons'
44+import { HeadersMap, XRPCError } from 'npm:@atproto/xrpc'
55+import { type ValidationResult, BlobRef } from 'npm:@atproto/lexicon'
66+import { CID } from 'npm:multiformats/cid'
77+import { validate as _validate } from '../../../../../../lexicons.ts'
88import {
99 type $Typed,
1010 is$typed as _is$typed,
1111 type OmitKey,
1212-} from '../../../../../../util'
1313-import type * as PartyWheyAppBskyFeedDefs from './defs.js'
1414-import type * as AppBskyFeedDefs from '../../../../../app/bsky/feed/defs.js'
1212+} from '../../../../../../util.ts'
1313+import type * as PartyWheyAppBskyFeedDefs from './defs.ts'
1414+import type * as AppBskyFeedDefs from '../../../../../app/bsky/feed/defs.ts'
15151616const is$typed = _is$typed,
1717 validate = _validate
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { HeadersMap, XRPCError } from '@atproto/xrpc'
55-import { type ValidationResult, BlobRef } from '@atproto/lexicon'
66-import { CID } from 'multiformats/cid'
77-import { validate as _validate } from '../../../../../../lexicons'
44+import { HeadersMap, XRPCError } from 'npm:@atproto/xrpc'
55+import { type ValidationResult, BlobRef } from 'npm:@atproto/lexicon'
66+import { CID } from 'npm:multiformats/cid'
77+import { validate as _validate } from '../../../../../../lexicons.ts'
88import {
99 type $Typed,
1010 is$typed as _is$typed,
1111 type OmitKey,
1212-} from '../../../../../../util'
1313-import type * as PartyWheyAppBskyFeedDefs from './defs.js'
1414-import type * as AppBskyFeedDefs from '../../../../../app/bsky/feed/defs.js'
1212+} from '../../../../../../util.ts'
1313+import type * as PartyWheyAppBskyFeedDefs from './defs.ts'
1414+import type * as AppBskyFeedDefs from '../../../../../app/bsky/feed/defs.ts'
15151616const is$typed = _is$typed,
1717 validate = _validate
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { HeadersMap, XRPCError } from '@atproto/xrpc'
55-import { type ValidationResult, BlobRef } from '@atproto/lexicon'
66-import { CID } from 'multiformats/cid'
77-import { validate as _validate } from '../../../../../../lexicons'
44+import { HeadersMap, XRPCError } from 'npm:@atproto/xrpc'
55+import { type ValidationResult, BlobRef } from 'npm:@atproto/lexicon'
66+import { CID } from 'npm:multiformats/cid'
77+import { validate as _validate } from '../../../../../../lexicons.ts'
88import {
99 type $Typed,
1010 is$typed as _is$typed,
1111 type OmitKey,
1212-} from '../../../../../../util'
1313-import type * as PartyWheyAppBskyActorDefs from '../actor/defs.js'
1414-import type * as AppBskyActorDefs from '../../../../../app/bsky/actor/defs.js'
1212+} from '../../../../../../util.ts'
1313+import type * as PartyWheyAppBskyActorDefs from '../actor/defs.ts'
1414+import type * as AppBskyActorDefs from '../../../../../app/bsky/actor/defs.ts'
15151616const is$typed = _is$typed,
1717 validate = _validate
+1-1
indexclient/util.ts
···22 * GENERATED CODE - DO NOT MODIFY
33 */
4455-import { type ValidationResult } from '@atproto/lexicon'
55+import { type ValidationResult } from 'npm:@atproto/lexicon'
6677export type OmitKey<T, K extends keyof T> = {
88 [K2 in keyof T as K2 extends K ? never : K2]: T[K2]
+9
indexserver.ts
···11+export async function indexServerHandler(req: Request): Promise<Response> {
22+ const url = new URL(req.url);
33+44+ if (url.pathname === "/ping") {
55+ return new Response("pong", { status: 200 });
66+ }
77+88+ return new Response("Not Found", { status: 404 });
99+}
···11-import { db } from "../main.ts"
22-33-export default function dbsetup(){
44-55- const baseColumns = `
66- uri TEXT PRIMARY KEY NOT NULL,
77- did TEXT NOT NULL,
88- cid TEXT,
99- rev TEXT,
1010- createdat INTEGER,
1111- indexedat INTEGER NOT NULL,
1212- json TEXT
1313- `;
1414-1515- const innerArrayID = "id INTEGER PRIMARY KEY AUTOINCREMENT";
1616- const createTableINE = "CREATE TABLE IF NOT EXISTS";
1717- const createIndexINE = "CREATE INDEX IF NOT EXISTS";
1818-1919- db.exec(`
2020- ${createTableINE} users (
2121- did TEXT PRIMARY KEY NOT NULL,
2222- role TEXT,
2323- registrationdate TEXT,
2424- onboardingstatus TEXT
2525- );
2626-2727- ${createTableINE} remoteprofileview (
2828- did TEXT PRIMARY KEY NOT NULL,
2929- handle TEXT,
3030- displayname TEXT,
3131- description TEXT,
3232- avatar TEXT,
3333- banner TEXT
3434- );
3535-3636- ${createTableINE} did (
3737- did TEXT PRIMARY KEY NOT NULL,
3838- method TEXT,
3939- string TEXT,
4040- doc TEXT,
4141- pds TEXT,
4242- handle TEXT
4343- );
4444- ${createIndexINE} idx_did_handle ON did(handle);
4545-4646- ${createTableINE} prefs (
4747- did TEXT PRIMARY KEY NOT NULL,
4848- json TEXT
4949- );
5050- ${createIndexINE} idx_prefs_did ON prefs(did);
5151-5252- ${createTableINE} backlink_skeleton (
5353- id INTEGER PRIMARY KEY AUTOINCREMENT,
5454- srcuri TEXT,
5555- srcdid TEXT,
5656- srcfield TEXT,
5757- srccol TEXT,
5858- suburi TEXT,
5959- subdid TEXT,
6060- subcol TEXT
6161- );
6262- ${createIndexINE} idx_backlink_subdid_mod ON backlink_skeleton(subdid, srcdid);
6363- ${createIndexINE} idx_backlink_suburi_mod ON backlink_skeleton(suburi, srcdid);
6464- ${createIndexINE} idx_backlink_subdid_filter_mod ON backlink_skeleton(subdid, srccol, srcdid);
6565- ${createIndexINE} idx_backlink_suburi_filter_mod ON backlink_skeleton(suburi, srccol, srcdid);
6666-6767- ${createTableINE} app_bsky_actor_profile (
6868- ${baseColumns},
6969- displayname TEXT,
7070- description TEXT,
7171- avatarcid TEXT,
7272- avatarmime TEXT,
7373- bannercid TEXT,
7474- bannermime TEXT
7575- );
7676- ${createIndexINE} idx_actor_profile_did ON app_bsky_actor_profile(did);
7777-7878- ${createTableINE} app_bsky_feed_post (
7979- ${baseColumns},
8080- text TEXT,
8181- replyroot TEXT,
8282- replyparent TEXT,
8383- quote TEXT,
8484- imagecount INTEGER,
8585- image1cid TEXT,
8686- image1mime TEXT,
8787- image1aspect TEXT,
8888- image2cid TEXT,
8989- image2mime TEXT,
9090- image2aspect TEXT,
9191- image3cid TEXT,
9292- image3mime TEXT,
9393- image3aspect TEXT,
9494- image4cid TEXT,
9595- image4mime TEXT,
9696- image4aspect TEXT,
9797- videocount INTEGER,
9898- videocid TEXT,
9999- videomime TEXT,
100100- videoaspect TEXT
101101- );
102102-103103- ${createIndexINE} idx_post_author_timeline ON app_bsky_feed_post(did, createdat DESC);
104104- ${createIndexINE} idx_post_global_timeline ON app_bsky_feed_post(indexedat DESC);
105105- ${createIndexINE} idx_post_replyroot ON app_bsky_feed_post(replyroot);
106106- ${createIndexINE} idx_post_replyparent ON app_bsky_feed_post(replyparent);
107107- ${createIndexINE} idx_post_quote ON app_bsky_feed_post(quote);
108108-109109- ${createTableINE} app_bsky_feed_post_langs (
110110- ${innerArrayID},
111111- post TEXT NOT NULL,
112112- lang TEXT NOT NULL
113113- );
114114- ${createIndexINE} idx_post_langs_lang ON app_bsky_feed_post_langs(lang);
115115- ${createIndexINE} idx_post_langs_post ON app_bsky_feed_post_langs(post);
116116-117117- ${createTableINE} app_bsky_feed_post_hashtags (
118118- ${innerArrayID},
119119- post TEXT NOT NULL,
120120- hashtag TEXT NOT NULL
121121- );
122122- ${createIndexINE} idx_post_hashtags_hashtag ON app_bsky_feed_post_hashtags(hashtag);
123123- ${createIndexINE} idx_post_hashtags_post ON app_bsky_feed_post_hashtags(post);
124124-125125- ${createTableINE} app_bsky_feed_post_mentions (
126126- ${innerArrayID},
127127- post TEXT NOT NULL,
128128- mention TEXT NOT NULL
129129- );
130130- ${createIndexINE} idx_post_mentions_mention ON app_bsky_feed_post_mentions(mention);
131131- ${createIndexINE} idx_post_mentions_post ON app_bsky_feed_post_mentions(post);
132132-133133-134134- ${createTableINE} app_bsky_feed_like (
135135- ${baseColumns},
136136- subject TEXT NOT NULL,
137137- subjectcid TEXT
138138- );
139139- ${createIndexINE} idx_like_author_timeline ON app_bsky_feed_like(did, createdat DESC);
140140- ${createIndexINE} idx_like_subject ON app_bsky_feed_like(subject);
141141-142142- ${createTableINE} app_bsky_feed_repost (
143143- ${baseColumns},
144144- subject TEXT NOT NULL,
145145- subjectcid TEXT
146146- );
147147- ${createIndexINE} idx_repost_author_timeline ON app_bsky_feed_repost(did, createdat DESC);
148148- ${createIndexINE} idx_repost_subject ON app_bsky_feed_repost(subject);
149149-150150-151151- ${createTableINE} app_bsky_graph_follow (
152152- ${baseColumns},
153153- subject TEXT NOT NULL
154154- );
155155- ${createIndexINE} idx_follow_author_timeline ON app_bsky_graph_follow(did, createdat DESC);
156156- ${createIndexINE} idx_follow_subject_timeline ON app_bsky_graph_follow(subject, createdat DESC);
157157-158158- ${createTableINE} app_bsky_graph_block (
159159- ${baseColumns},
160160- subject TEXT NOT NULL
161161- );
162162- ${createIndexINE} idx_block_author ON app_bsky_graph_block(did);
163163- ${createIndexINE} idx_block_subject ON app_bsky_graph_block(subject);
164164-165165- ${createTableINE} app_bsky_graph_list (
166166- ${baseColumns},
167167- name TEXT,
168168- description TEXT,
169169- purpose TEXT,
170170- avatarcid TEXT,
171171- avatarmime TEXT
172172- );
173173- ${createIndexINE} idx_list_author ON app_bsky_graph_list(did);
174174- ${createIndexINE} idx_list_purpose ON app_bsky_graph_list(purpose);
175175-176176- ${createTableINE} app_bsky_graph_listitem (
177177- ${baseColumns},
178178- list TEXT NOT NULL,
179179- subject TEXT NOT NULL
180180- );
181181- ${createIndexINE} idx_listitem_list ON app_bsky_graph_listitem(list);
182182- ${createIndexINE} idx_listitem_subject ON app_bsky_graph_listitem(subject);
183183- ${createIndexINE} idx_listitem_author ON app_bsky_graph_listitem(did);
184184-185185-186186-187187- ${createTableINE} app_bsky_feed_generator (
188188- ${baseColumns},
189189- displayname TEXT,
190190- description TEXT,
191191- avatarcid TEXT,
192192- avatarmime TEXT
193193- );
194194- ${createIndexINE} idx_feed_generator_author ON app_bsky_feed_generator(did);
195195-196196- ${createTableINE} app_bsky_feed_threadgate (
197197- ${baseColumns},
198198- post TEXT NOT NULL
199199- );
200200- ${createIndexINE} idx_threadgate_post ON app_bsky_feed_threadgate(post);
201201- ${createIndexINE} idx_threadgate_author ON app_bsky_feed_threadgate(did);
202202-203203-204204- ${createTableINE} app_bsky_feed_threadgate_hiddenreplies (
205205- ${innerArrayID},
206206- threadgate TEXT NOT NULL,
207207- reply TEXT NOT NULL
208208- );
209209- ${createIndexINE} idx_threadgate_hiddenreplies_gate ON app_bsky_feed_threadgate_hiddenreplies(threadgate);
210210-211211- ${createTableINE} app_bsky_graph_listblock (
212212- ${baseColumns},
213213- subject TEXT NOT NULL
214214- );
215215- ${createIndexINE} idx_listblock_subject ON app_bsky_graph_listblock(subject);
216216- ${createIndexINE} idx_listblock_author ON app_bsky_graph_listblock(did);
217217-218218- ${createTableINE} app_bsky_notification_declaration (
219219- ${baseColumns},
220220- allowSubscriptions TEXT
221221- );
222222- ${createIndexINE} idx_notification_declaration_author ON app_bsky_notification_declaration(did);
223223-224224- `);
225225-}
+53
utils/dbsystem.ts
···11+import { Database } from "jsr:@db/sqlite@0.11";
22+33+export function setupSystemDb(db: Database) {
44+ const createTableINE = "CREATE TABLE IF NOT EXISTS";
55+ const createIndexINE = "CREATE INDEX IF NOT EXISTS";
66+77+ db.exec(`
88+ -- Master list of all users known to the system
99+ ${createTableINE} users (
1010+ did TEXT PRIMARY KEY NOT NULL,
1111+ role TEXT,
1212+ registrationdate TEXT,
1313+ onboardingstatus TEXT
1414+ );
1515+1616+ -- Cache of profiles for *other* users, prevents storing this in every user's DB
1717+ ${createTableINE} remoteprofileview (
1818+ did TEXT PRIMARY KEY NOT NULL,
1919+ handle TEXT,
2020+ displayname TEXT,
2121+ description TEXT,
2222+ avatar TEXT,
2323+ banner TEXT
2424+ );
2525+2626+ -- Central DID document cache and handle resolution
2727+ ${createTableINE} did (
2828+ did TEXT PRIMARY KEY NOT NULL,
2929+ method TEXT,
3030+ string TEXT,
3131+ doc TEXT,
3232+ pds TEXT,
3333+ handle TEXT
3434+ );
3535+ ${createIndexINE} idx_did_handle ON did(handle);
3636+3737+ -- A global index for relationships between any two pieces of content
3838+ ${createTableINE} backlink_skeleton (
3939+ id INTEGER PRIMARY KEY AUTOINCREMENT,
4040+ srcuri TEXT,
4141+ srcdid TEXT,
4242+ srcfield TEXT,
4343+ srccol TEXT,
4444+ suburi TEXT,
4545+ subdid TEXT,
4646+ subcol TEXT
4747+ );
4848+ ${createIndexINE} idx_backlink_subdid_mod ON backlink_skeleton(subdid, srcdid);
4949+ ${createIndexINE} idx_backlink_suburi_mod ON backlink_skeleton(suburi, srcdid);
5050+ ${createIndexINE} idx_backlink_subdid_filter_mod ON backlink_skeleton(subdid, srccol, srcdid);
5151+ ${createIndexINE} idx_backlink_suburi_filter_mod ON backlink_skeleton(suburi, srccol, srcdid);
5252+ `);
5353+}
+135
utils/dbuser.ts
···11+import { Database } from "jsr:@db/sqlite@0.11";
22+33+export function setupUserDb(db: Database) {
44+55+ const baseColumns = `
66+ uri TEXT PRIMARY KEY NOT NULL,
77+ did TEXT NOT NULL,
88+ cid TEXT,
99+ rev TEXT,
1010+ createdat INTEGER,
1111+ indexedat INTEGER NOT NULL,
1212+ json TEXT
1313+ `;
1414+1515+ const innerArrayID = "id INTEGER PRIMARY KEY AUTOINCREMENT";
1616+ const createTableINE = "CREATE TABLE IF NOT EXISTS";
1717+ const createIndexINE = "CREATE INDEX IF NOT EXISTS";
1818+1919+ db.exec(`
2020+ -- User's own personal preferences
2121+ ${createTableINE} prefs (
2222+ did TEXT PRIMARY KEY NOT NULL,
2323+ json TEXT
2424+ );
2525+ ${createIndexINE} idx_prefs_did ON prefs(did);
2626+2727+ -- The user's own profile record
2828+ ${createTableINE} app_bsky_actor_profile (
2929+ ${baseColumns},
3030+ displayname TEXT,
3131+ description TEXT,
3232+ avatarcid TEXT,
3333+ avatarmime TEXT,
3434+ bannercid TEXT,
3535+ bannermime TEXT
3636+ );
3737+ ${createIndexINE} idx_actor_profile_did ON app_bsky_actor_profile(did);
3838+3939+ -- All posts created by the user
4040+ ${createTableINE} app_bsky_feed_post (
4141+ ${baseColumns},
4242+ text TEXT,
4343+ replyroot TEXT,
4444+ replyparent TEXT,
4545+ quote TEXT,
4646+ imagecount INTEGER,
4747+ image1cid TEXT,
4848+ image1mime TEXT,
4949+ image1aspect TEXT,
5050+ image2cid TEXT,
5151+ image2mime TEXT,
5252+ image2aspect TEXT,
5353+ image3cid TEXT,
5454+ image3mime TEXT,
5555+ image3aspect TEXT,
5656+ image4cid TEXT,
5757+ image4mime TEXT,
5858+ image4aspect TEXT,
5959+ videocount INTEGER,
6060+ videocid TEXT,
6161+ videomime TEXT,
6262+ videoaspect TEXT
6363+ );
6464+ ${createIndexINE} idx_post_author_timeline ON app_bsky_feed_post(did, createdat DESC);
6565+ ${createIndexINE} idx_post_global_timeline ON app_bsky_feed_post(indexedat DESC);
6666+ ${createIndexINE} idx_post_replyroot ON app_bsky_feed_post(replyroot);
6767+ ${createIndexINE} idx_post_replyparent ON app_bsky_feed_post(replyparent);
6868+ ${createIndexINE} idx_post_quote ON app_bsky_feed_post(quote);
6969+7070+ -- Data related to the user's posts
7171+ ${createTableINE} app_bsky_feed_post_langs ( ${innerArrayID}, post TEXT NOT NULL, lang TEXT NOT NULL );
7272+ ${createIndexINE} idx_post_langs_lang ON app_bsky_feed_post_langs(lang);
7373+ ${createIndexINE} idx_post_langs_post ON app_bsky_feed_post_langs(post);
7474+7575+ ${createTableINE} app_bsky_feed_post_hashtags ( ${innerArrayID}, post TEXT NOT NULL, hashtag TEXT NOT NULL );
7676+ ${createIndexINE} idx_post_hashtags_hashtag ON app_bsky_feed_post_hashtags(hashtag);
7777+ ${createIndexINE} idx_post_hashtags_post ON app_bsky_feed_post_hashtags(post);
7878+7979+ ${createTableINE} app_bsky_feed_post_mentions ( ${innerArrayID}, post TEXT NOT NULL, mention TEXT NOT NULL );
8080+ ${createIndexINE} idx_post_mentions_mention ON app_bsky_feed_post_mentions(mention);
8181+ ${createIndexINE} idx_post_mentions_post ON app_bsky_feed_post_mentions(post);
8282+8383+ -- All likes created by the user
8484+ ${createTableINE} app_bsky_feed_like ( ${baseColumns}, subject TEXT NOT NULL, subjectcid TEXT );
8585+ ${createIndexINE} idx_like_author_timeline ON app_bsky_feed_like(did, createdat DESC);
8686+ ${createIndexINE} idx_like_subject ON app_bsky_feed_like(subject);
8787+8888+ -- All reposts created by the user
8989+ ${createTableINE} app_bsky_feed_repost ( ${baseColumns}, subject TEXT NOT NULL, subjectcid TEXT );
9090+ ${createIndexINE} idx_repost_author_timeline ON app_bsky_feed_repost(did, createdat DESC);
9191+ ${createIndexINE} idx_repost_subject ON app_bsky_feed_repost(subject);
9292+9393+ -- All follows created by the user
9494+ ${createTableINE} app_bsky_graph_follow ( ${baseColumns}, subject TEXT NOT NULL );
9595+ ${createIndexINE} idx_follow_author_timeline ON app_bsky_graph_follow(did, createdat DESC);
9696+ ${createIndexINE} idx_follow_subject_timeline ON app_bsky_graph_follow(subject, createdat DESC);
9797+9898+ -- All blocks created by the user
9999+ ${createTableINE} app_bsky_graph_block ( ${baseColumns}, subject TEXT NOT NULL );
100100+ ${createIndexINE} idx_block_author ON app_bsky_graph_block(did);
101101+ ${createIndexINE} idx_block_subject ON app_bsky_graph_block(subject);
102102+103103+ -- All lists created by the user
104104+ ${createTableINE} app_bsky_graph_list ( ${baseColumns}, name TEXT, description TEXT, purpose TEXT, avatarcid TEXT, avatarmime TEXT );
105105+ ${createIndexINE} idx_list_author ON app_bsky_graph_list(did);
106106+ ${createIndexINE} idx_list_purpose ON app_bsky_graph_list(purpose);
107107+108108+ -- All list items created by the user
109109+ ${createTableINE} app_bsky_graph_listitem ( ${baseColumns}, list TEXT NOT NULL, subject TEXT NOT NULL );
110110+ ${createIndexINE} idx_listitem_list ON app_bsky_graph_listitem(list);
111111+ ${createIndexINE} idx_listitem_subject ON app_bsky_graph_listitem(subject);
112112+ ${createIndexINE} idx_listitem_author ON app_bsky_graph_listitem(did);
113113+114114+ -- All feed generators created by the user
115115+ ${createTableINE} app_bsky_feed_generator ( ${baseColumns}, displayname TEXT, description TEXT, avatarcid TEXT, avatarmime TEXT );
116116+ ${createIndexINE} idx_feed_generator_author ON app_bsky_feed_generator(did);
117117+118118+ -- All threadgates created by the user
119119+ ${createTableINE} app_bsky_feed_threadgate ( ${baseColumns}, post TEXT NOT NULL );
120120+ ${createIndexINE} idx_threadgate_post ON app_bsky_feed_threadgate(post);
121121+ ${createIndexINE} idx_threadgate_author ON app_bsky_feed_threadgate(did);
122122+123123+ ${createTableINE} app_bsky_feed_threadgate_hiddenreplies ( ${innerArrayID}, threadgate TEXT NOT NULL, reply TEXT NOT NULL );
124124+ ${createIndexINE} idx_threadgate_hiddenreplies_gate ON app_bsky_feed_threadgate_hiddenreplies(threadgate);
125125+126126+ -- All list blocks created by the user
127127+ ${createTableINE} app_bsky_graph_listblock ( ${baseColumns}, subject TEXT NOT NULL );
128128+ ${createIndexINE} idx_listblock_subject ON app_bsky_graph_listblock(subject);
129129+ ${createIndexINE} idx_listblock_author ON app_bsky_graph_listblock(did);
130130+131131+ -- User's notification settings declaration
132132+ ${createTableINE} app_bsky_notification_declaration ( ${baseColumns}, allowSubscriptions TEXT );
133133+ ${createIndexINE} idx_notification_declaration_author ON app_bsky_notification_declaration(did);
134134+ `);
135135+}
+7-7
utils/identity.ts
···1122import { DidResolver, HandleResolver } from "npm:@atproto/identity";
33-import { db } from "../main.ts";
33+import { systemDB } from "../main.ts";
44type DidMethod = "web" | "plc";
55type DidDoc = {
66 "@context"?: unknown;
···3535}
36363737function getDidFromHandle(handle: string): { did: string } | null {
3838- const row = db.prepare("SELECT did FROM did WHERE handle = ?").get(handle);
3838+ const row = systemDB.prepare("SELECT did FROM did WHERE handle = ?").get(handle);
3939 if (!row) return null;
40404141 try {
···6565function getDidDoc(
6666 did: string
6767): { method: "web" | "plc"; doc: DidDoc } | null {
6868- const row = db.prepare("SELECT method, doc FROM did WHERE did = ?").get(did);
6868+ const row = systemDB.prepare("SELECT method, doc FROM did WHERE did = ?").get(did);
6969 if (!row) return null;
70707171 try {
···126126function getPDSAndHandleFromDid(
127127 did: string
128128): { pds: string; handle?: string } | null {
129129- const row = db.prepare("SELECT pds, handle FROM did WHERE did = ?").get(did);
129129+ const row = systemDB.prepare("SELECT pds, handle FROM did WHERE did = ?").get(did);
130130131131 if (!row) return null;
132132 return {
···144144 const { did } = await resolveDidFromHandle(handle);
145145 const { diddoc, didmethod } = await resolveDidDoc(did);
146146147147- db.prepare(
147147+ systemDB.prepare(
148148 "INSERT OR REPLACE INTO did (did, handle, doc, method) VALUES (?, ?, ?, ?)"
149149 ).run(did, handle, JSON.stringify(diddoc), didmethod);
150150···162162 try {
163163 const { diddoc, didmethod } = await resolveDidDoc(did);
164164165165- db.prepare(
165165+ systemDB.prepare(
166166 "INSERT OR REPLACE INTO did (did, doc, method) VALUES (?, ?, ?)"
167167 ).run(did, JSON.stringify(diddoc), didmethod);
168168···215215 if (aka) handle = aka.slice("at://".length);
216216 }
217217218218- db.prepare(
218218+ systemDB.prepare(
219219 "INSERT OR REPLACE INTO did (did, pds, handle) VALUES (?, ?, ?)"
220220 ).run(did, serviceEndpoint, handle ?? null);
221221
utils/indexserver.ts
This is a binary file and will not be displayed.
+13
utils/indexservertypes.ts
···11+export * as AppBskyActorGetProfile from '../indexserver/types/app/bsky/actor/getProfile.ts'
22+export * as AppBskyActorGetProfiles from '../indexserver/types/app/bsky/actor/getProfiles.ts'
33+export * as AppBskyFeedGetActorFeeds from '../indexserver/types/app/bsky/feed/getActorFeeds.ts'
44+export * as AppBskyFeedGetFeedGenerator from '../indexserver/types/app/bsky/feed/getFeedGenerator.ts'
55+export * as AppBskyFeedGetFeedGenerators from '../indexserver/types/app/bsky/feed/getFeedGenerators.ts'
66+export * as AppBskyFeedGetPosts from '../indexserver/types/app/bsky/feed/getPosts.ts'
77+export * as PartyWheyAppBskyFeedGetActorLikesPartial from '../indexserver/types/party/whey/app/bsky/feed/getActorLikesPartial.ts'
88+export * as PartyWheyAppBskyFeedGetAuthorFeedPartial from '../indexserver/types/party/whey/app/bsky/feed/getAuthorFeedPartial.ts'
99+export * as PartyWheyAppBskyFeedGetLikesPartial from '../indexserver/types/party/whey/app/bsky/feed/getLikesPartial.ts'
1010+export * as PartyWheyAppBskyFeedGetListFeedPartial from '../indexserver/types/party/whey/app/bsky/feed/getListFeedPartial.ts'
1111+export * as PartyWheyAppBskyFeedGetPostThreadPartial from '../indexserver/types/party/whey/app/bsky/feed/getPostThreadPartial.ts'
1212+export * as PartyWheyAppBskyFeedGetQuotesPartial from '../indexserver/types/party/whey/app/bsky/feed/getQuotesPartial.ts'
1313+export * as PartyWheyAppBskyFeedGetRepostedByPartial from '../indexserver/types/party/whey/app/bsky/feed/getRepostedByPartial.ts'