@evanp/activitypub-bot 0.47.1 → 0.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -9,6 +9,13 @@ and this project adheres to
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [0.48.0] - 2026-05-28
13
+
14
+ ### Added
15
+
16
+ - /favicon.ico with a little robot head emoji
17
+ - very permissive /robots.txt
18
+
12
19
  ## [0.47.1] - 2026-05-28
13
20
 
14
21
  ### Fixed
package/lib/app.js CHANGED
@@ -34,6 +34,8 @@ import sharedInboxRouter from './routes/sharedinbox.js'
34
34
  import profileRouter from './routes/profile.js'
35
35
  import proxyRouter from './routes/proxy.js'
36
36
  import nodeinfoRouter from './routes/nodeinfo.js'
37
+ import robotsTxtRouter from './routes/robotstxt.js'
38
+ import faviconRouter from './routes/favicon.js'
37
39
  import { BotContext } from './botcontext.js'
38
40
  import { Transformer } from './microsyntax.js'
39
41
  import { HTTPSignatureAuthenticator } from './httpsignatureauthenticator.js'
@@ -329,6 +331,8 @@ export async function makeApp ({ databaseUrl, origin, bots, logLevel = 'silent',
329
331
  app.use('/', webfingerRouter)
330
332
  app.use('/', proxyRouter)
331
333
  app.use('/', nodeinfoRouter)
334
+ app.use('/', robotsTxtRouter)
335
+ app.use('/', faviconRouter)
332
336
 
333
337
  // These should check HTTP Signature if provided
334
338
 
@@ -0,0 +1,16 @@
1
+ import { Router } from 'express'
2
+
3
+ const router = Router()
4
+
5
+ const FAVICON_ICO =
6
+ `<svg
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ viewBox="0 0 100 100">
9
+ <text y=".9em" font-size="90">🤖</text>
10
+ </svg>`
11
+
12
+ router.get('/favicon.ico', async (req, res, next) => {
13
+ res.status(200).type('image/svg+xml').end(FAVICON_ICO)
14
+ })
15
+
16
+ export default router
@@ -0,0 +1,15 @@
1
+ import { Router } from 'express'
2
+
3
+ const router = Router()
4
+
5
+ const ROBOTS_TXT =
6
+ `# We are all bots here
7
+ User-agent: *
8
+ Disallow:
9
+ `
10
+
11
+ router.get('/robots.txt', async (req, res, next) => {
12
+ res.status(200).type('text/plain').end(ROBOTS_TXT)
13
+ })
14
+
15
+ export default router
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evanp/activitypub-bot",
3
- "version": "0.47.1",
3
+ "version": "0.48.0",
4
4
  "description": "server-side ActivityPub bot framework",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",