tangled
alpha
login
or
join now
essem.space
/
pds-feedgen
2
fork
atom
A couple of Bluesky feeds focused around PDSes
2
fork
atom
overview
issues
pulls
pipelines
Switch to @atcute/jetstream
essem.space
2 weeks ago
9edabb3e
5a7b4617
+182
-150
3 changed files
expand all
collapse all
unified
split
deno.json
deno.lock
ingest.ts
+9
-9
deno.json
···
1
{
2
"imports": {
3
-
"@atcute/atproto": "npm:@atcute/atproto@^3.1.7",
4
-
"@atcute/bluesky": "npm:@atcute/bluesky@^3.2.7",
5
-
"@atcute/client": "npm:@atcute/client@^4.0.5",
6
-
"@atcute/identity-resolver": "npm:@atcute/identity-resolver@^1.1.4",
7
-
"@atcute/lexicons": "npm:@atcute/lexicons@^1.2.2",
8
-
"@atcute/xrpc-server": "npm:@atcute/xrpc-server@^0.1.2",
9
-
"@db/sqlite": "jsr:@db/sqlite@^0.12.0",
10
-
"@skyware/jetstream": "npm:@skyware/jetstream@^0.2.5",
11
-
"redis": "npm:redis@^5.8.3"
12
},
13
"tasks": {
14
"start-feedgen": "deno serve --no-prompt --env-file --allow-net --allow-env --allow-ffi --allow-read --port=4000 feedgen.ts",
···
1
{
2
"imports": {
3
+
"@atcute/atproto": "npm:@atcute/atproto@^3.1.10",
4
+
"@atcute/bluesky": "npm:@atcute/bluesky@^3.2.19",
5
+
"@atcute/client": "npm:@atcute/client@^4.2.1",
6
+
"@atcute/identity-resolver": "npm:@atcute/identity-resolver@^1.2.2",
7
+
"@atcute/jetstream": "npm:@atcute/jetstream@^1.1.2",
8
+
"@atcute/lexicons": "npm:@atcute/lexicons@^1.2.9",
9
+
"@atcute/xrpc-server": "npm:@atcute/xrpc-server@^0.1.11",
10
+
"@db/sqlite": "jsr:@db/sqlite@^0.13.0",
11
+
"redis": "npm:redis@^5.11.0"
12
},
13
"tasks": {
14
"start-feedgen": "deno serve --no-prompt --env-file --allow-net --allow-env --allow-ffi --allow-read --port=4000 feedgen.ts",
+119
-85
deno.lock
···
1
{
2
"version": "5",
3
"specifiers": {
4
-
"jsr:@db/sqlite@0.12": "0.12.0",
5
"jsr:@denosaurs/plug@1": "1.1.0",
6
-
"jsr:@std/assert@0.217": "0.217.0",
7
"jsr:@std/encoding@1": "1.0.10",
8
"jsr:@std/fmt@1": "1.0.8",
9
"jsr:@std/fs@1": "1.0.19",
10
-
"jsr:@std/internal@^1.0.9": "1.0.9",
11
-
"jsr:@std/path@0.217": "0.217.0",
12
-
"jsr:@std/path@1": "1.1.1",
13
"jsr:@std/path@^1.1.1": "1.1.1",
14
-
"npm:@atcute/atproto@^3.1.7": "3.1.7",
15
-
"npm:@atcute/bluesky@^3.2.7": "3.2.7",
16
-
"npm:@atcute/client@^4.0.5": "4.0.5",
17
-
"npm:@atcute/identity-resolver@^1.1.4": "1.1.4_@atcute+identity@1.1.1",
18
-
"npm:@atcute/lexicons@^1.2.2": "1.2.2",
19
-
"npm:@atcute/xrpc-server@~0.1.2": "0.1.2_@atcute+identity@1.1.1",
20
-
"npm:@skyware/jetstream@~0.2.5": "0.2.5",
21
-
"npm:redis@^5.8.3": "5.8.3_@redis+client@5.8.3"
22
},
23
"jsr": {
24
-
"@db/sqlite@0.12.0": {
25
-
"integrity": "dd1ef7f621ad50fc1e073a1c3609c4470bd51edc0994139c5bf9851de7a6d85f",
26
"dependencies": [
27
"jsr:@denosaurs/plug",
28
-
"jsr:@std/path@0.217"
29
]
30
},
31
"@denosaurs/plug@1.1.0": {
···
37
"jsr:@std/path@1"
38
]
39
},
40
-
"@std/assert@0.217.0": {
41
-
"integrity": "c98e279362ca6982d5285c3b89517b757c1e3477ee9f14eb2fdf80a45aaa9642"
42
-
},
43
"@std/encoding@1.0.10": {
44
"integrity": "8783c6384a2d13abd5e9e87a7ae0520a30e9f56aeeaa3bdf910a3eaaf5c811a1"
45
},
···
53
"jsr:@std/path@^1.1.1"
54
]
55
},
56
-
"@std/internal@1.0.9": {
57
-
"integrity": "bdfb97f83e4db7a13e8faab26fb1958d1b80cc64366501af78a0aee151696eb8"
58
},
59
-
"@std/path@0.217.0": {
60
-
"integrity": "1217cc25534bca9a2f672d7fe7c6f356e4027df400c0e85c0ef3e4343bc67d11",
61
-
"dependencies": [
62
-
"jsr:@std/assert"
63
-
]
64
},
65
"@std/path@1.1.1": {
66
"integrity": "fe00026bd3a7e6a27f73709b83c607798be40e20c81dde655ce34052fd82ec76",
···
70
}
71
},
72
"npm": {
73
-
"@atcute/atproto@3.1.7": {
74
-
"integrity": "sha512-3Ym8qaVZg2vf8qw0KO1aue39z/5oik5J+UDoSes1vr8ddw40UVLA5sV4bXSKmLnhzQHiLLgoVZXe4zaKfozPoQ==",
75
"dependencies": [
76
"@atcute/lexicons"
77
]
78
},
79
-
"@atcute/bluesky@3.2.7": {
80
-
"integrity": "sha512-mofkZySIIp+Z+TbBD+cDWaPY6FVKNRZG8yhMFkh6uMCuiazDUAUjxr4yaFjYMVcgMN9FkwGllwQJevUH9aTSnQ==",
81
"dependencies": [
82
"@atcute/atproto",
83
"@atcute/lexicons"
84
]
85
},
86
-
"@atcute/client@4.0.5": {
87
-
"integrity": "sha512-R8Qen8goGmEkynYGg2m6XFlVmz0GTDvQ+9w+4QqOob+XMk8/WDpF4aImev7WKEde/rV2gjcqW7zM8E6W9NShDA==",
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
88
"dependencies": [
89
"@atcute/identity",
90
"@atcute/lexicons"
91
]
92
},
93
-
"@atcute/crypto@2.2.5": {
94
-
"integrity": "sha512-9CbQ9cJ68XewsbLrgdmWQS2uDD9D0hizWFJ3OOZ16TCuARREmzKEpFgHlMxPswR3bDxjwfiXzmYUlHaTqsnxRQ==",
95
"dependencies": [
96
"@atcute/multibase",
97
"@atcute/uint8array",
98
"@noble/secp256k1"
99
]
100
},
101
-
"@atcute/identity-resolver@1.1.4_@atcute+identity@1.1.1": {
102
-
"integrity": "sha512-/SVh8vf2cXFJenmBnGeYF2aY3WGQm3cJeew5NWTlkqoy3LvJ5wkvKq9PWu4Tv653VF40rPOp6LOdVr9Fa+q5rA==",
103
"dependencies": [
104
"@atcute/identity",
105
"@atcute/lexicons",
···
107
"@badrap/valita"
108
]
109
},
110
-
"@atcute/identity@1.1.1": {
111
-
"integrity": "sha512-zax42n693VEhnC+5tndvO2KLDTMkHOz8UExwmklvJv7R9VujfEwiSWhcv6Jgwb3ellaG8wjiQ1lMOIjLLvwh0Q==",
112
"dependencies": [
113
"@atcute/lexicons",
114
"@badrap/valita"
115
]
116
},
117
-
"@atcute/lexicons@1.2.2": {
118
-
"integrity": "sha512-bgEhJq5Z70/0TbK5sx+tAkrR8FsCODNiL2gUEvS5PuJfPxmFmRYNWaMGehxSPaXWpU2+Oa9ckceHiYbrItDTkA==",
0
0
0
0
0
0
0
0
0
0
0
0
119
"dependencies": [
0
0
120
"@standard-schema/spec",
121
"esm-env"
122
]
123
},
124
-
"@atcute/multibase@1.1.6": {
125
-
"integrity": "sha512-HBxuCgYLKPPxETV0Rot4VP9e24vKl8JdzGCZOVsDaOXJgbRZoRIF67Lp0H/OgnJeH/Xpva8Z5ReoTNJE5dn3kg==",
126
"dependencies": [
127
"@atcute/uint8array"
128
]
129
},
130
-
"@atcute/uint8array@1.0.5": {
131
-
"integrity": "sha512-XLWWxoR2HNl2qU+FCr0rp1APwJXci7HnzbOQLxK55OaMNBXZ19+xNC5ii4QCsThsDxa4JS/JTzuiQLziITWf2Q=="
132
},
133
-
"@atcute/util-fetch@1.0.3": {
134
-
"integrity": "sha512-f8zzTb/xlKIwv2OQ31DhShPUNCmIIleX6p7qIXwWwEUjX6x8skUtpdISSjnImq01LXpltGV5y8yhV4/Mlb7CRQ==",
135
"dependencies": [
136
"@badrap/valita"
137
]
138
},
139
-
"@atcute/xrpc-server@0.1.2_@atcute+identity@1.1.1": {
140
-
"integrity": "sha512-smBmWGEM6nBTq2ozONXBCJtvFzTEnJgH6cALGfq26k38k/OmX6mpMvr5/Z0Iuc6+rNG2j3YY/kOSl+z3c8JOVg==",
141
"dependencies": [
0
0
0
0
0
0
0
142
"@atcute/crypto",
143
"@atcute/identity",
144
"@atcute/identity-resolver",
···
152
"@badrap/valita@0.4.6": {
153
"integrity": "sha512-4kdqcjyxo/8RQ8ayjms47HCWZIF5981oE5nIenbfThKDxWXtEHKipAOWlflpPJzZx9y/JWYQkp18Awr7VuepFg=="
154
},
155
-
"@noble/secp256k1@2.3.0": {
156
-
"integrity": "sha512-0TQed2gcBbIrh7Ccyw+y/uZQvbJwm7Ao4scBUxqpBCcsOlZG0O4KGfjtNAy/li4W8n1xt3dxrwJ0beZ2h2G6Kw=="
0
0
0
0
0
0
0
0
0
157
},
158
-
"@redis/bloom@5.8.3_@redis+client@5.8.3": {
159
-
"integrity": "sha512-1eldTzHvdW3Oi0TReb8m1yiFt8ZwyF6rv1NpZyG5R4TpCwuAdKQetBKoCw7D96tNFgsVVd6eL+NaGZZCqhRg4g==",
160
"dependencies": [
161
"@redis/client"
162
]
163
},
164
-
"@redis/client@5.8.3": {
165
-
"integrity": "sha512-MZVUE+l7LmMIYlIjubPosruJ9ltSLGFmJqsXApTqPLyHLjsJUSAbAJb/A3N34fEqean4ddiDkdWzNu4ZKPvRUg==",
166
"dependencies": [
167
"cluster-key-slot"
168
]
169
},
170
-
"@redis/json@5.8.3_@redis+client@5.8.3": {
171
-
"integrity": "sha512-DRR09fy/u8gynHGJ4gzXYeM7D8nlS6EMv5o+h20ndTJiAc7RGR01fdk2FNjnn1Nz5PjgGGownF+s72bYG4nZKQ==",
172
"dependencies": [
173
"@redis/client"
174
]
175
},
176
-
"@redis/search@5.8.3_@redis+client@5.8.3": {
177
-
"integrity": "sha512-EMIvEeGRR2I0BJEz4PV88DyCuPmMT1rDtznlsHY3cKSDcc9vj0Q411jUnX0iU2vVowUgWn/cpySKjpXdZ8m+5g==",
178
"dependencies": [
179
"@redis/client"
180
]
181
},
182
-
"@redis/time-series@5.8.3_@redis+client@5.8.3": {
183
-
"integrity": "sha512-5Jwy3ilsUYQjzpE7WZ1lEeG1RkqQ5kHtwV1p8yxXHSEmyUbC/T/AVgyjMcm52Olj/Ov/mhDKjx6ndYUi14bXsw==",
184
"dependencies": [
185
"@redis/client"
186
]
187
},
188
-
"@skyware/jetstream@0.2.5": {
189
-
"integrity": "sha512-fM/zs03DLwqRyzZZJFWN20e76KrdqIp97Tlm8Cek+vxn96+tu5d/fx79V6H85L0QN6HvGiX2l9A8hWFqHvYlOA==",
190
-
"dependencies": [
191
-
"@atcute/atproto",
192
-
"@atcute/bluesky",
193
-
"@atcute/lexicons",
194
-
"partysocket",
195
-
"tiny-emitter"
196
-
]
197
-
},
198
-
"@standard-schema/spec@1.0.0": {
199
-
"integrity": "sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA=="
200
},
201
"cluster-key-slot@1.1.2": {
202
"integrity": "sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA=="
···
217
"event-target-polyfill"
218
]
219
},
220
-
"redis@5.8.3_@redis+client@5.8.3": {
221
-
"integrity": "sha512-MfSrfV6+tEfTw8c4W0yFp6XWX8Il4laGU7Bx4kvW4uiYM1AuZ3KGqEGt1LdQHeD1nEyLpIWetZ/SpY3kkbgrYw==",
222
"dependencies": [
223
"@redis/bloom",
224
"@redis/client",
···
227
"@redis/time-series"
228
]
229
},
230
-
"tiny-emitter@2.1.0": {
231
-
"integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q=="
0
0
0
0
0
0
232
}
233
},
234
"workspace": {
235
"dependencies": [
236
-
"jsr:@db/sqlite@0.12",
237
-
"npm:@atcute/atproto@^3.1.7",
238
-
"npm:@atcute/bluesky@^3.2.7",
239
-
"npm:@atcute/client@^4.0.5",
240
-
"npm:@atcute/identity-resolver@^1.1.4",
241
-
"npm:@atcute/lexicons@^1.2.2",
242
-
"npm:@atcute/xrpc-server@~0.1.2",
243
-
"npm:@skyware/jetstream@~0.2.5",
244
-
"npm:redis@^5.8.3"
245
]
246
}
247
}
···
1
{
2
"version": "5",
3
"specifiers": {
4
+
"jsr:@db/sqlite@0.13": "0.13.0",
5
"jsr:@denosaurs/plug@1": "1.1.0",
0
6
"jsr:@std/encoding@1": "1.0.10",
7
"jsr:@std/fmt@1": "1.0.8",
8
"jsr:@std/fs@1": "1.0.19",
9
+
"jsr:@std/internal@^1.0.9": "1.0.12",
10
+
"jsr:@std/path@1": "1.0.9",
11
+
"jsr:@std/path@1.0": "1.0.9",
12
"jsr:@std/path@^1.1.1": "1.1.1",
13
+
"npm:@atcute/atproto@^3.1.10": "3.1.10",
14
+
"npm:@atcute/bluesky@^3.2.19": "3.2.19",
15
+
"npm:@atcute/client@^4.2.1": "4.2.1",
16
+
"npm:@atcute/identity-resolver@^1.2.2": "1.2.2_@atcute+identity@1.1.3",
17
+
"npm:@atcute/jetstream@^1.1.2": "1.1.2",
18
+
"npm:@atcute/lexicons@^1.2.9": "1.2.9",
19
+
"npm:@atcute/xrpc-server@~0.1.11": "0.1.11_@atcute+identity@1.1.3",
20
+
"npm:redis@^5.11.0": "5.11.0_@redis+client@5.11.0"
21
},
22
"jsr": {
23
+
"@db/sqlite@0.13.0": {
24
+
"integrity": "4545c635e0b3d4ddfdc0f2240f932f24b8ad0178e9c2e3a0f9403e7b18ae2fb5",
25
"dependencies": [
26
"jsr:@denosaurs/plug",
27
+
"jsr:@std/path@1.0"
28
]
29
},
30
"@denosaurs/plug@1.1.0": {
···
36
"jsr:@std/path@1"
37
]
38
},
0
0
0
39
"@std/encoding@1.0.10": {
40
"integrity": "8783c6384a2d13abd5e9e87a7ae0520a30e9f56aeeaa3bdf910a3eaaf5c811a1"
41
},
···
49
"jsr:@std/path@^1.1.1"
50
]
51
},
52
+
"@std/internal@1.0.12": {
53
+
"integrity": "972a634fd5bc34b242024402972cd5143eac68d8dffaca5eaa4dba30ce17b027"
54
},
55
+
"@std/path@1.0.9": {
56
+
"integrity": "260a49f11edd3db93dd38350bf9cd1b4d1366afa98e81b86167b4e3dd750129e"
0
0
0
57
},
58
"@std/path@1.1.1": {
59
"integrity": "fe00026bd3a7e6a27f73709b83c607798be40e20c81dde655ce34052fd82ec76",
···
63
}
64
},
65
"npm": {
66
+
"@atcute/atproto@3.1.10": {
67
+
"integrity": "sha512-+GKZpOc0PJcdWMQEkTfg/rSNDAAHxmAUGBl60g2az15etqJn5WaUPNGFE2sB7hKpwi5Ue2h/L0OacINcE/JDDQ==",
68
"dependencies": [
69
"@atcute/lexicons"
70
]
71
},
72
+
"@atcute/bluesky@3.2.19": {
73
+
"integrity": "sha512-W/Sy2671A5eKkdWJn6nfCGoixqMFOouEKRbqRV3630I13Er9iS+gA/rGWUXlp5xNpbfCNmsQ6C1pEidUmO+00g==",
74
"dependencies": [
75
"@atcute/atproto",
76
"@atcute/lexicons"
77
]
78
},
79
+
"@atcute/cbor@2.3.2": {
80
+
"integrity": "sha512-xP2SORSau/VVI00x2V4BjwIkHr6EQ7l/MXEOPaa4LGYtePFc4gnD4L1yN10dT5NEuUnvGEuCh6arLB7gz1smVQ==",
81
+
"dependencies": [
82
+
"@atcute/cid",
83
+
"@atcute/multibase",
84
+
"@atcute/uint8array"
85
+
]
86
+
},
87
+
"@atcute/cid@2.4.1": {
88
+
"integrity": "sha512-bwhna69RCv7yetXudtj+2qrMPYvhhIQqvJz6YUpUS98v7OdF3X2dnye9Nig2NDrklZcuyOsu7sQo7GOykJXRLQ==",
89
+
"dependencies": [
90
+
"@atcute/multibase",
91
+
"@atcute/uint8array"
92
+
]
93
+
},
94
+
"@atcute/client@4.2.1": {
95
+
"integrity": "sha512-ZBFM2pW075JtgGFu5g7HHZBecrClhlcNH8GVP9Zz1aViWR+cjjBsTpeE63rJs+FCOHFYlirUyo5L8SGZ4kMINw==",
96
"dependencies": [
97
"@atcute/identity",
98
"@atcute/lexicons"
99
]
100
},
101
+
"@atcute/crypto@2.3.0": {
102
+
"integrity": "sha512-w5pkJKCjbNMQu+F4JRHbR3ROQyhi1wbn+GSC6WDQamcYHkZmEZk1/eoI354bIQOOfkEM6aFLv718iskrkon4GQ==",
103
"dependencies": [
104
"@atcute/multibase",
105
"@atcute/uint8array",
106
"@noble/secp256k1"
107
]
108
},
109
+
"@atcute/identity-resolver@1.2.2_@atcute+identity@1.1.3": {
110
+
"integrity": "sha512-eUh/UH4bFvuXS0X7epYCeJC/kj4rbBXfSRumLEH4smMVwNOgTo7cL/0Srty+P/qVPoZEyXdfEbS0PHJyzoXmHw==",
111
"dependencies": [
112
"@atcute/identity",
113
"@atcute/lexicons",
···
115
"@badrap/valita"
116
]
117
},
118
+
"@atcute/identity@1.1.3": {
119
+
"integrity": "sha512-oIqPoI8TwWeQxvcLmFEZLdN2XdWcaLVtlm8pNk0E72As9HNzzD9pwKPrLr3rmTLRIoULPPFmq9iFNsTeCIU9ng==",
120
"dependencies": [
121
"@atcute/lexicons",
122
"@badrap/valita"
123
]
124
},
125
+
"@atcute/jetstream@1.1.2": {
126
+
"integrity": "sha512-u6p/h2xppp7LE6W/9xErAJ6frfN60s8adZuCKtfAaaBBiiYbb1CfpzN8Uc+2qtJZNorqGvuuDb5572Jmh7yHBQ==",
127
+
"dependencies": [
128
+
"@atcute/lexicons",
129
+
"@badrap/valita",
130
+
"@mary-ext/event-iterator",
131
+
"@mary-ext/simple-event-emitter",
132
+
"partysocket",
133
+
"type-fest",
134
+
"yocto-queue"
135
+
]
136
+
},
137
+
"@atcute/lexicons@1.2.9": {
138
+
"integrity": "sha512-/RRHm2Cw9o8Mcsrq0eo8fjS9okKYLGfuFwrQ0YoP/6sdSDsXshaTLJsvLlcUcaDaSJ1YFOuHIo3zr2Om2F/16g==",
139
"dependencies": [
140
+
"@atcute/uint8array",
141
+
"@atcute/util-text",
142
"@standard-schema/spec",
143
"esm-env"
144
]
145
},
146
+
"@atcute/multibase@1.1.8": {
147
+
"integrity": "sha512-pJgtImMZKCjqwRbu+2GzB+4xQjKBXDwdZOzeqe0u97zYKRGftpGYGvYv3+pMe2xXe+msDyu7Nv8iJp+U14otTA==",
148
"dependencies": [
149
"@atcute/uint8array"
150
]
151
},
152
+
"@atcute/uint8array@1.1.1": {
153
+
"integrity": "sha512-3LsC8XB8TKe9q/5hOA5sFuzGaIFdJZJNewC5OKa3o/eU6+K7JR6see9Zy2JbQERNVnRl11EzbNov1efgLMAs4g=="
154
},
155
+
"@atcute/util-fetch@1.0.5": {
156
+
"integrity": "sha512-qjHj01BGxjSjIFdPiAjSARnodJIIyKxnCMMEcXMESo9TAyND6XZQqrie5fia+LlYWVXdpsTds8uFQwc9jdKTig==",
157
"dependencies": [
158
"@badrap/valita"
159
]
160
},
161
+
"@atcute/util-text@1.1.1": {
162
+
"integrity": "sha512-JH0SxzUQJAmbOBTYyhxQbkkI6M33YpjlVLEcbP5GYt43xgFArzV0FJVmEpvIj0kjsmphHB45b6IitdvxPdec9w==",
163
"dependencies": [
164
+
"unicode-segmenter"
165
+
]
166
+
},
167
+
"@atcute/xrpc-server@0.1.11_@atcute+identity@1.1.3": {
168
+
"integrity": "sha512-KapH0UDvNovtQ0anbLKAh24Of5vNqLXEkK08DXQF5o59xG7fYaGeaDXS7VBSUzyd7eu3KXcTgXhzx7Ez8W2N1w==",
169
+
"dependencies": [
170
+
"@atcute/cbor",
171
"@atcute/crypto",
172
"@atcute/identity",
173
"@atcute/identity-resolver",
···
181
"@badrap/valita@0.4.6": {
182
"integrity": "sha512-4kdqcjyxo/8RQ8ayjms47HCWZIF5981oE5nIenbfThKDxWXtEHKipAOWlflpPJzZx9y/JWYQkp18Awr7VuepFg=="
183
},
184
+
"@mary-ext/event-iterator@1.0.0": {
185
+
"integrity": "sha512-l6gCPsWJ8aRCe/s7/oCmero70kDHgIK5m4uJvYgwEYTqVxoBOIXbKr5tnkLqUHEg6mNduB4IWvms3h70Hp9ADQ==",
186
+
"dependencies": [
187
+
"yocto-queue"
188
+
]
189
+
},
190
+
"@mary-ext/simple-event-emitter@1.0.1": {
191
+
"integrity": "sha512-9+VvZisxZ/gSg+JJH7hmXaA8Qj42Qjz3O58RSB+INYc8iLA0icATZxHB9vKbj59ojDGZjO3hCKzMXocx3L0H8w=="
192
+
},
193
+
"@noble/secp256k1@3.0.0": {
194
+
"integrity": "sha512-NJBaR352KyIvj3t6sgT/+7xrNyF9Xk9QlLSIqUGVUYlsnDTAUqY8LOmwpcgEx4AMJXRITQ5XEVHD+mMaPfr3mg=="
195
},
196
+
"@redis/bloom@5.11.0_@redis+client@5.11.0": {
197
+
"integrity": "sha512-KYiVilAhAFN3057afUb/tfYJpsEyTkQB+tQcn5gVVA7DgcNOAj8lLxe4j8ov8BF6I9C1Fe/kwlbuAICcTMX8Lw==",
198
"dependencies": [
199
"@redis/client"
200
]
201
},
202
+
"@redis/client@5.11.0": {
203
+
"integrity": "sha512-GHoprlNQD51Xq2Ztd94HHV94MdFZQ3CVrpA04Fz8MVoHM0B7SlbmPEVIjwTbcv58z8QyjnrOuikS0rWF03k5dQ==",
204
"dependencies": [
205
"cluster-key-slot"
206
]
207
},
208
+
"@redis/json@5.11.0_@redis+client@5.11.0": {
209
+
"integrity": "sha512-1iAy9kAtcD0quB21RbPTbUqqy+T2Uu2JxucwE+B4A+VaDbIRvpZR6DMqV8Iqaws2YxJYB3GC5JVNzPYio2ErUg==",
210
"dependencies": [
211
"@redis/client"
212
]
213
},
214
+
"@redis/search@5.11.0_@redis+client@5.11.0": {
215
+
"integrity": "sha512-g1l7f3Rnyk/xI99oGHIgWHSKFl45Re5YTIcO8j/JE8olz389yUFyz2+A6nqVy/Zi031VgPDWscbbgOk8hlhZ3g==",
216
"dependencies": [
217
"@redis/client"
218
]
219
},
220
+
"@redis/time-series@5.11.0_@redis+client@5.11.0": {
221
+
"integrity": "sha512-TWFeOcU4xkj0DkndnOyhtxvX1KWD+78UHT3XX3x3XRBUGWeQrKo3jqzDsZwxbggUgf9yLJr/akFHXru66X5UQA==",
222
"dependencies": [
223
"@redis/client"
224
]
225
},
226
+
"@standard-schema/spec@1.1.0": {
227
+
"integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w=="
0
0
0
0
0
0
0
0
0
0
228
},
229
"cluster-key-slot@1.1.2": {
230
"integrity": "sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA=="
···
245
"event-target-polyfill"
246
]
247
},
248
+
"redis@5.11.0_@redis+client@5.11.0": {
249
+
"integrity": "sha512-YwXjATVDT+AuxcyfOwZn046aml9jMlQPvU1VXIlLDVAExe0u93aTfPYSeRgG4p9Q/Jlkj+LXJ1XEoFV+j2JKcQ==",
250
"dependencies": [
251
"@redis/bloom",
252
"@redis/client",
···
255
"@redis/time-series"
256
]
257
},
258
+
"type-fest@4.41.0": {
259
+
"integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA=="
260
+
},
261
+
"unicode-segmenter@0.14.5": {
262
+
"integrity": "sha512-jHGmj2LUuqDcX3hqY12Ql+uhUTn8huuxNZGq7GvtF6bSybzH3aFgedYu/KTzQStEgt1Ra2F3HxadNXsNjb3m3g=="
263
+
},
264
+
"yocto-queue@1.2.1": {
265
+
"integrity": "sha512-AyeEbWOu/TAXdxlV9wmGcR0+yh2j3vYPGOECcIj2S7MkrLyC7ne+oye2BKTItt0ii2PHk4cDy+95+LshzbXnGg=="
266
}
267
},
268
"workspace": {
269
"dependencies": [
270
+
"jsr:@db/sqlite@0.13",
271
+
"npm:@atcute/atproto@^3.1.10",
272
+
"npm:@atcute/bluesky@^3.2.19",
273
+
"npm:@atcute/client@^4.2.1",
274
+
"npm:@atcute/identity-resolver@^1.2.2",
275
+
"npm:@atcute/jetstream@^1.1.2",
276
+
"npm:@atcute/lexicons@^1.2.9",
277
+
"npm:@atcute/xrpc-server@~0.1.11",
278
+
"npm:redis@^5.11.0"
279
]
280
}
281
}
+54
-56
ingest.ts
···
5
WebDidDocumentResolver,
6
} from "@atcute/identity-resolver";
7
import type { ActorIdentifier, ResourceUri } from "@atcute/lexicons/syntax";
8
-
import { Jetstream, CommitType } from "@skyware/jetstream";
9
10
import type {} from "@atcute/atproto";
11
···
66
67
const dbCursor = getCursor.get<{ cursor?: string }>();
68
const cursor = dbCursor ? Number(dbCursor.cursor) : 0;
69
-
const jetstream = new Jetstream({
70
wantedCollections: ["app.bsky.feed.post"],
71
cursor: cursor - 10000000, // back up a bit for seamless playback
72
-
endpoint:
73
-
Deno.env.get("JETSTREAM") ??
74
"wss://jetstream1.us-east.bsky.network/subscribe",
75
-
});
76
-
77
-
jetstream.on("open", () => console.log("Listening to the jetstream..."));
78
-
79
-
jetstream.on("error", (e, c) => {
80
-
console.error(e);
81
-
worker.postMessage({
82
-
op: 3,
83
-
cursor: c,
84
-
});
85
});
86
87
let count = 0;
88
89
-
jetstream.on("commit", async (e) => {
90
-
count++;
91
-
if (count >= 1024) {
92
-
count = 0;
93
-
worker.postMessage({
94
-
op: 3,
95
-
cursor: e.time_us,
96
-
});
97
-
}
0
98
99
-
const atUri: ResourceUri = `at://${e.did}/app.bsky.feed.post/${e.commit.rkey}`;
100
-
let pds;
101
-
try {
102
-
pds = await getPDS(e.did as DID);
103
-
} catch (e) {
104
-
console.error(e);
105
-
return;
106
-
}
107
108
-
if (!pds) {
109
-
console.error(`PDS not found for ${e.did}`);
110
-
return;
111
-
}
112
113
-
if (e.commit.operation === CommitType.Create) {
114
-
worker.postMessage({
115
-
op: 0,
116
-
atUri,
117
-
cid: e.commit.cid,
118
-
did: e.did,
119
-
pds,
120
-
});
121
-
} else if (e.commit.operation === CommitType.Delete) {
122
-
worker.postMessage({
123
-
op: 1,
124
-
atUri,
125
-
pds,
126
-
});
0
0
0
127
}
128
-
});
129
130
async function backfillUser(did: ActorIdentifier) {
131
const cached = getAuthor.get<Author>(did);
···
153
}
154
return true;
155
}
156
-
157
-
jetstream.on("identity", async (e) => {
158
-
await backfillUser(e.did);
159
-
});
160
-
161
-
jetstream.start();
162
163
export default {
164
async fetch(request) {
···
5
WebDidDocumentResolver,
6
} from "@atcute/identity-resolver";
7
import type { ActorIdentifier, ResourceUri } from "@atcute/lexicons/syntax";
8
+
import { JetstreamSubscription } from "@atcute/jetstream";
9
10
import type {} from "@atcute/atproto";
11
···
66
67
const dbCursor = getCursor.get<{ cursor?: string }>();
68
const cursor = dbCursor ? Number(dbCursor.cursor) : 0;
69
+
const jetstream = new JetstreamSubscription({
70
wantedCollections: ["app.bsky.feed.post"],
71
cursor: cursor - 10000000, // back up a bit for seamless playback
72
+
url:
73
+
Deno.env.get("JETSTREAM")?.split(",") ??
74
"wss://jetstream1.us-east.bsky.network/subscribe",
75
+
onConnectionOpen() {
76
+
console.log("Listening to the jetstream...");
77
+
},
78
+
onConnectionError(event) {
79
+
console.error(event.error);
80
+
worker.postMessage({
81
+
op: 3,
82
+
cursor: jetstream.cursor,
83
+
});
84
+
},
85
});
86
87
let count = 0;
88
89
+
for await (const event of jetstream) {
90
+
if (event.kind === "commit") {
91
+
count++;
92
+
if (count >= 1024) {
93
+
count = 0;
94
+
worker.postMessage({
95
+
op: 3,
96
+
cursor: event.time_us,
97
+
});
98
+
}
99
100
+
const atUri: ResourceUri = `at://${event.did}/app.bsky.feed.post/${event.commit.rkey}`;
101
+
let pds;
102
+
try {
103
+
pds = await getPDS(event.did as DID);
104
+
} catch (e) {
105
+
console.error(e);
106
+
continue;
107
+
}
108
109
+
if (!pds) {
110
+
console.error(`PDS not found for ${event.did}`);
111
+
continue;
112
+
}
113
114
+
if (event.commit.operation === "create") {
115
+
worker.postMessage({
116
+
op: 0,
117
+
atUri,
118
+
cid: event.commit.cid,
119
+
did: event.did,
120
+
pds,
121
+
});
122
+
} else if (event.commit.operation === "delete") {
123
+
worker.postMessage({
124
+
op: 1,
125
+
atUri,
126
+
pds,
127
+
});
128
+
}
129
+
} else if (event.kind === "identity") {
130
+
await backfillUser(event.did);
131
}
132
+
}
133
134
async function backfillUser(did: ActorIdentifier) {
135
const cached = getAuthor.get<Author>(did);
···
157
}
158
return true;
159
}
0
0
0
0
0
0
160
161
export default {
162
async fetch(request) {