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