babies first atproto thingy
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

initial

Clay 3c40e3f2

+598
+10
.env.example
··· 1 + # express 2 + PORT=3000 3 + 4 + # github 5 + WEBHOOK_SECRET=yourwebhooksecret 6 + 7 + # atproto 8 + IDENTIFIER=balls.bsky.social 9 + PASSWORD=nuhuh 10 + PDS=https://bsky.social
+1
.gitignore
··· 1 + .env
+3
.vscode/settings.json
··· 1 + { 2 + "deno.enable": true 3 + }
+5
README.md
··· 1 + # bluesky commit bot 2 + 3 + thingy that posts whenever you commit to a github repo 4 + 5 + uhh completely untested atm but whatever 👍
+6
deno.json
··· 1 + { 2 + "imports": { 3 + "@atproto/api": "npm:@atproto/api@^0.18.18", 4 + "express": "npm:express@^5.2.1" 5 + } 6 + }
+477
deno.lock
··· 1 + { 2 + "version": "5", 3 + "specifiers": { 4 + "npm:@atproto/api@~0.18.18": "0.18.18", 5 + "npm:express@^5.2.1": "5.2.1" 6 + }, 7 + "npm": { 8 + "@atproto/api@0.18.18": { 9 + "integrity": "sha512-Vg7/sjbwDQZDj8fXtb4E48U4gA+6RC1iSt7onGnH2NyR0E25uds1KnqSKMzqcphdJXrz5GXrgHWc747XPGibzg==", 10 + "dependencies": [ 11 + "@atproto/common-web", 12 + "@atproto/lexicon", 13 + "@atproto/syntax", 14 + "@atproto/xrpc", 15 + "await-lock", 16 + "multiformats", 17 + "tlds", 18 + "zod" 19 + ] 20 + }, 21 + "@atproto/common-web@0.4.14": { 22 + "integrity": "sha512-rMU8Q+kpyPpirUS9OqT7aOD1hxKa+diem3vc7BA0lOkj0tU6wcAxegxmbPZ8JaOsR7SSYhP/jCt/5wbT4qqkuQ==", 23 + "dependencies": [ 24 + "@atproto/lex-data", 25 + "@atproto/lex-json", 26 + "@atproto/syntax", 27 + "zod" 28 + ] 29 + }, 30 + "@atproto/lex-data@0.0.9": { 31 + "integrity": "sha512-1slwe4sG0cyWtsq16+rBoWIxNDqGPkkvN+PV6JuzA7dgUK9bjUmXBGQU4eZlUPSS43X1Nhmr/9VjgKmEzU9vDw==", 32 + "dependencies": [ 33 + "multiformats", 34 + "tslib", 35 + "uint8arrays", 36 + "unicode-segmenter" 37 + ] 38 + }, 39 + "@atproto/lex-json@0.0.9": { 40 + "integrity": "sha512-Q2v1EVZcnd+ndyZj1r2UlGikA7q6It24CFPLbxokcf5Ba4RBupH8IkkQX7mqUDSRWPgQdmZYIdW9wUln+MKDqw==", 41 + "dependencies": [ 42 + "@atproto/lex-data", 43 + "tslib" 44 + ] 45 + }, 46 + "@atproto/lexicon@0.6.1": { 47 + "integrity": "sha512-/vI1kVlY50Si+5MXpvOucelnYwb0UJ6Qto5mCp+7Q5C+Jtp+SoSykAPVvjVtTnQUH2vrKOFOwpb3C375vSKzXw==", 48 + "dependencies": [ 49 + "@atproto/common-web", 50 + "@atproto/syntax", 51 + "iso-datestring-validator", 52 + "multiformats", 53 + "zod" 54 + ] 55 + }, 56 + "@atproto/syntax@0.4.3": { 57 + "integrity": "sha512-YoZUz40YAJr5nPwvCDWgodEOlt5IftZqPJvA0JDWjuZKD8yXddTwSzXSaKQAzGOpuM+/A3uXRtPzJJqlScc+iA==", 58 + "dependencies": [ 59 + "tslib" 60 + ] 61 + }, 62 + "@atproto/xrpc@0.7.7": { 63 + "integrity": "sha512-K1ZyO/BU8JNtXX5dmPp7b5UrkLMMqpsIa/Lrj5D3Su+j1Xwq1m6QJ2XJ1AgjEjkI1v4Muzm7klianLE6XGxtmA==", 64 + "dependencies": [ 65 + "@atproto/lexicon", 66 + "zod" 67 + ] 68 + }, 69 + "accepts@2.0.0": { 70 + "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==", 71 + "dependencies": [ 72 + "mime-types", 73 + "negotiator" 74 + ] 75 + }, 76 + "await-lock@2.2.2": { 77 + "integrity": "sha512-aDczADvlvTGajTDjcjpJMqRkOF6Qdz3YbPZm/PyW6tKPkx2hlYBzxMhEywM/tU72HrVZjgl5VCdRuMlA7pZ8Gw==" 78 + }, 79 + "body-parser@2.2.1": { 80 + "integrity": "sha512-nfDwkulwiZYQIGwxdy0RUmowMhKcFVcYXUU7m4QlKYim1rUtg83xm2yjZ40QjDuc291AJjjeSc9b++AWHSgSHw==", 81 + "dependencies": [ 82 + "bytes", 83 + "content-type", 84 + "debug", 85 + "http-errors", 86 + "iconv-lite", 87 + "on-finished", 88 + "qs", 89 + "raw-body", 90 + "type-is" 91 + ] 92 + }, 93 + "bytes@3.1.2": { 94 + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==" 95 + }, 96 + "call-bind-apply-helpers@1.0.2": { 97 + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", 98 + "dependencies": [ 99 + "es-errors", 100 + "function-bind" 101 + ] 102 + }, 103 + "call-bound@1.0.4": { 104 + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", 105 + "dependencies": [ 106 + "call-bind-apply-helpers", 107 + "get-intrinsic" 108 + ] 109 + }, 110 + "content-disposition@1.0.1": { 111 + "integrity": "sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q==" 112 + }, 113 + "content-type@1.0.5": { 114 + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==" 115 + }, 116 + "cookie-signature@1.2.2": { 117 + "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==" 118 + }, 119 + "cookie@0.7.2": { 120 + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==" 121 + }, 122 + "debug@4.4.3": { 123 + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", 124 + "dependencies": [ 125 + "ms" 126 + ] 127 + }, 128 + "depd@2.0.0": { 129 + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" 130 + }, 131 + "dunder-proto@1.0.1": { 132 + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", 133 + "dependencies": [ 134 + "call-bind-apply-helpers", 135 + "es-errors", 136 + "gopd" 137 + ] 138 + }, 139 + "ee-first@1.1.1": { 140 + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" 141 + }, 142 + "encodeurl@2.0.0": { 143 + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==" 144 + }, 145 + "es-define-property@1.0.1": { 146 + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==" 147 + }, 148 + "es-errors@1.3.0": { 149 + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==" 150 + }, 151 + "es-object-atoms@1.1.1": { 152 + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", 153 + "dependencies": [ 154 + "es-errors" 155 + ] 156 + }, 157 + "escape-html@1.0.3": { 158 + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" 159 + }, 160 + "etag@1.8.1": { 161 + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==" 162 + }, 163 + "express@5.2.1": { 164 + "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==", 165 + "dependencies": [ 166 + "accepts", 167 + "body-parser", 168 + "content-disposition", 169 + "content-type", 170 + "cookie", 171 + "cookie-signature", 172 + "debug", 173 + "depd", 174 + "encodeurl", 175 + "escape-html", 176 + "etag", 177 + "finalhandler", 178 + "fresh", 179 + "http-errors", 180 + "merge-descriptors", 181 + "mime-types", 182 + "on-finished", 183 + "once", 184 + "parseurl", 185 + "proxy-addr", 186 + "qs", 187 + "range-parser", 188 + "router", 189 + "send", 190 + "serve-static", 191 + "statuses", 192 + "type-is", 193 + "vary" 194 + ] 195 + }, 196 + "finalhandler@2.1.1": { 197 + "integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==", 198 + "dependencies": [ 199 + "debug", 200 + "encodeurl", 201 + "escape-html", 202 + "on-finished", 203 + "parseurl", 204 + "statuses" 205 + ] 206 + }, 207 + "forwarded@0.2.0": { 208 + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==" 209 + }, 210 + "fresh@2.0.0": { 211 + "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==" 212 + }, 213 + "function-bind@1.1.2": { 214 + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" 215 + }, 216 + "get-intrinsic@1.3.0": { 217 + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", 218 + "dependencies": [ 219 + "call-bind-apply-helpers", 220 + "es-define-property", 221 + "es-errors", 222 + "es-object-atoms", 223 + "function-bind", 224 + "get-proto", 225 + "gopd", 226 + "has-symbols", 227 + "hasown", 228 + "math-intrinsics" 229 + ] 230 + }, 231 + "get-proto@1.0.1": { 232 + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", 233 + "dependencies": [ 234 + "dunder-proto", 235 + "es-object-atoms" 236 + ] 237 + }, 238 + "gopd@1.2.0": { 239 + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==" 240 + }, 241 + "has-symbols@1.1.0": { 242 + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==" 243 + }, 244 + "hasown@2.0.2": { 245 + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", 246 + "dependencies": [ 247 + "function-bind" 248 + ] 249 + }, 250 + "http-errors@2.0.1": { 251 + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", 252 + "dependencies": [ 253 + "depd", 254 + "inherits", 255 + "setprototypeof", 256 + "statuses", 257 + "toidentifier" 258 + ] 259 + }, 260 + "iconv-lite@0.7.1": { 261 + "integrity": "sha512-2Tth85cXwGFHfvRgZWszZSvdo+0Xsqmw8k8ZwxScfcBneNUraK+dxRxRm24nszx80Y0TVio8kKLt5sLE7ZCLlw==", 262 + "dependencies": [ 263 + "safer-buffer" 264 + ] 265 + }, 266 + "inherits@2.0.4": { 267 + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" 268 + }, 269 + "ipaddr.js@1.9.1": { 270 + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" 271 + }, 272 + "is-promise@4.0.0": { 273 + "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==" 274 + }, 275 + "iso-datestring-validator@2.2.2": { 276 + "integrity": "sha512-yLEMkBbLZTlVQqOnQ4FiMujR6T4DEcCb1xizmvXS+OxuhwcbtynoosRzdMA69zZCShCNAbi+gJ71FxZBBXx1SA==" 277 + }, 278 + "math-intrinsics@1.1.0": { 279 + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==" 280 + }, 281 + "media-typer@1.1.0": { 282 + "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==" 283 + }, 284 + "merge-descriptors@2.0.0": { 285 + "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==" 286 + }, 287 + "mime-db@1.54.0": { 288 + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==" 289 + }, 290 + "mime-types@3.0.2": { 291 + "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", 292 + "dependencies": [ 293 + "mime-db" 294 + ] 295 + }, 296 + "ms@2.1.3": { 297 + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" 298 + }, 299 + "multiformats@9.9.0": { 300 + "integrity": "sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg==" 301 + }, 302 + "negotiator@1.0.0": { 303 + "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==" 304 + }, 305 + "object-inspect@1.13.4": { 306 + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==" 307 + }, 308 + "on-finished@2.4.1": { 309 + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", 310 + "dependencies": [ 311 + "ee-first" 312 + ] 313 + }, 314 + "once@1.4.0": { 315 + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", 316 + "dependencies": [ 317 + "wrappy" 318 + ] 319 + }, 320 + "parseurl@1.3.3": { 321 + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" 322 + }, 323 + "path-to-regexp@8.3.0": { 324 + "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==" 325 + }, 326 + "proxy-addr@2.0.7": { 327 + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", 328 + "dependencies": [ 329 + "forwarded", 330 + "ipaddr.js" 331 + ] 332 + }, 333 + "qs@6.14.0": { 334 + "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", 335 + "dependencies": [ 336 + "side-channel" 337 + ] 338 + }, 339 + "range-parser@1.2.1": { 340 + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" 341 + }, 342 + "raw-body@3.0.2": { 343 + "integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==", 344 + "dependencies": [ 345 + "bytes", 346 + "http-errors", 347 + "iconv-lite", 348 + "unpipe" 349 + ] 350 + }, 351 + "router@2.2.0": { 352 + "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==", 353 + "dependencies": [ 354 + "debug", 355 + "depd", 356 + "is-promise", 357 + "parseurl", 358 + "path-to-regexp" 359 + ] 360 + }, 361 + "safer-buffer@2.1.2": { 362 + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 363 + }, 364 + "send@1.2.1": { 365 + "integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==", 366 + "dependencies": [ 367 + "debug", 368 + "encodeurl", 369 + "escape-html", 370 + "etag", 371 + "fresh", 372 + "http-errors", 373 + "mime-types", 374 + "ms", 375 + "on-finished", 376 + "range-parser", 377 + "statuses" 378 + ] 379 + }, 380 + "serve-static@2.2.1": { 381 + "integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==", 382 + "dependencies": [ 383 + "encodeurl", 384 + "escape-html", 385 + "parseurl", 386 + "send" 387 + ] 388 + }, 389 + "setprototypeof@1.2.0": { 390 + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" 391 + }, 392 + "side-channel-list@1.0.0": { 393 + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", 394 + "dependencies": [ 395 + "es-errors", 396 + "object-inspect" 397 + ] 398 + }, 399 + "side-channel-map@1.0.1": { 400 + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", 401 + "dependencies": [ 402 + "call-bound", 403 + "es-errors", 404 + "get-intrinsic", 405 + "object-inspect" 406 + ] 407 + }, 408 + "side-channel-weakmap@1.0.2": { 409 + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", 410 + "dependencies": [ 411 + "call-bound", 412 + "es-errors", 413 + "get-intrinsic", 414 + "object-inspect", 415 + "side-channel-map" 416 + ] 417 + }, 418 + "side-channel@1.1.0": { 419 + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", 420 + "dependencies": [ 421 + "es-errors", 422 + "object-inspect", 423 + "side-channel-list", 424 + "side-channel-map", 425 + "side-channel-weakmap" 426 + ] 427 + }, 428 + "statuses@2.0.2": { 429 + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==" 430 + }, 431 + "tlds@1.261.0": { 432 + "integrity": "sha512-QXqwfEl9ddlGBaRFXIvNKK6OhipSiLXuRuLJX5DErz0o0Q0rYxulWLdFryTkV5PkdZct5iMInwYEGe/eR++1AA==", 433 + "bin": true 434 + }, 435 + "toidentifier@1.0.1": { 436 + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==" 437 + }, 438 + "tslib@2.8.1": { 439 + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" 440 + }, 441 + "type-is@2.0.1": { 442 + "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==", 443 + "dependencies": [ 444 + "content-type", 445 + "media-typer", 446 + "mime-types" 447 + ] 448 + }, 449 + "uint8arrays@3.0.0": { 450 + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", 451 + "dependencies": [ 452 + "multiformats" 453 + ] 454 + }, 455 + "unicode-segmenter@0.14.5": { 456 + "integrity": "sha512-jHGmj2LUuqDcX3hqY12Ql+uhUTn8huuxNZGq7GvtF6bSybzH3aFgedYu/KTzQStEgt1Ra2F3HxadNXsNjb3m3g==" 457 + }, 458 + "unpipe@1.0.0": { 459 + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==" 460 + }, 461 + "vary@1.1.2": { 462 + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==" 463 + }, 464 + "wrappy@1.0.2": { 465 + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" 466 + }, 467 + "zod@3.25.76": { 468 + "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==" 469 + } 470 + }, 471 + "workspace": { 472 + "dependencies": [ 473 + "npm:@atproto/api@~0.18.18", 474 + "npm:express@^5.2.1" 475 + ] 476 + } 477 + }
+90
main.ts
··· 1 + import { AtpAgent, RichText } from "@atproto/api"; 2 + import express from "express"; 3 + import { timingSafeEqual } from "node:crypto"; 4 + import { Buffer } from "node:buffer"; 5 + 6 + const usermap: Record<string, string> = JSON.parse( 7 + await Deno.readTextFile(new URL("./usermap.json", import.meta.url)), 8 + ); 9 + 10 + const WEBHOOK_SECRET = Deno.env.get("WEBHOOK_SECRET")!; 11 + 12 + const agent = new AtpAgent({ 13 + service: Deno.env.get("PDS")!, 14 + }); 15 + const app = express(); 16 + 17 + await agent.login({ 18 + identifier: Deno.env.get("IDENTIFIER")!, 19 + password: Deno.env.get("PASSWORD")!, 20 + }); 21 + 22 + async function verifySignature( 23 + payload: string, 24 + signature: string, 25 + ): Promise<boolean> { 26 + const key = await crypto.subtle.importKey( 27 + "raw", 28 + new TextEncoder().encode(WEBHOOK_SECRET), 29 + { name: "HMAC", hash: "SHA-256" }, 30 + false, 31 + ["sign"], 32 + ); 33 + const sig = await crypto.subtle.sign( 34 + "HMAC", 35 + key, 36 + new TextEncoder().encode(payload), 37 + ); 38 + const expected = `sha256=${Array.from(new Uint8Array(sig)) 39 + .map((b) => b.toString(16).padStart(2, "0")) 40 + .join("")}`; 41 + try { 42 + return timingSafeEqual(Buffer.from(expected), Buffer.from(signature)); 43 + } catch { 44 + return false; 45 + } 46 + } 47 + 48 + app.post( 49 + "/webhook", 50 + express.text({ type: "application/json" }), 51 + async (req: any, res: any) => { 52 + const signature = req.headers["x-hub-signature-256"]; 53 + if (!signature || !(await verifySignature(req.body, signature))) { 54 + return res.status(401).send("Unauthorized"); 55 + } 56 + 57 + const payload = JSON.parse(req.body); 58 + res.status(202).send("Accepted"); 59 + 60 + const githubEvent = req.headers["x-github-event"]; 61 + 62 + if (githubEvent === "push") { 63 + const commits = payload.commits; 64 + 65 + for (const commit of commits) { 66 + if ( 67 + commit.author.name === "github-actions[bot]" || 68 + commit.author.name === "github-actions" 69 + ) { 70 + continue; 71 + } 72 + const bskyHandle = usermap[commit.author.username.toLowerCase()]; 73 + const author = bskyHandle ? `@${bskyHandle}` : commit.author.name; 74 + const title = commit.message.split("\n")[0]; 75 + const message = `${author} - ${title}\n${commit.url}`; 76 + const rt = new RichText({ text: message }); 77 + await rt.detectFacets(agent); 78 + await agent.post({ 79 + text: rt.text, 80 + facets: rt.facets, 81 + }); 82 + } 83 + } 84 + }, 85 + ); 86 + 87 + const PORT = Deno.env.get("PORT") || 3000; 88 + app.listen(PORT, () => { 89 + console.log(`Server is running on port ${PORT}`); 90 + });
+6
usermap.json
··· 1 + { 2 + "clay": "clay.rip", 3 + "claytontdm": "clay.rip", 4 + "roblnet13": "robinet13.pvzm.net", 5 + "robinet13": "robinet13.pvzm.net" 6 + }