@evanp/activitypub-bot 0.45.18 → 0.45.19

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,17 @@ and this project adheres to
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [0.45.19] - 2026-05-14
13
+
14
+ ### Changed
15
+
16
+ - Use connection keep-alive for outgoing requests in SafeAgent.
17
+
18
+ ### Fixed
19
+
20
+ - Use AbortSignal.timeout() in fetch() in ActivityPubClient instead of obsolete
21
+ and ignored `timeout` option.
22
+
12
23
  ## [0.45.18] - 2026-05-12
13
24
 
14
25
  ### Fixed
@@ -538,7 +538,7 @@ export class ActivityPubClient {
538
538
  const fullOptions = {
539
539
  ...options,
540
540
  agent: this.#agent ?? undefined,
541
- timeout: 10000,
541
+ signal: options?.signal ?? AbortSignal.timeout(10000),
542
542
  size: 1024 * 1024,
543
543
  follow: 10
544
544
  }
package/lib/safeagent.js CHANGED
@@ -19,6 +19,16 @@ class PrivateNetworkError extends Error {
19
19
  }
20
20
 
21
21
  export class SafeAgent extends https.Agent {
22
+ constructor (options = {}) {
23
+ super({
24
+ keepAlive: true,
25
+ keepAliveMsecs: 1000,
26
+ maxSockets: 64,
27
+ maxFreeSockets: 256,
28
+ ...options
29
+ })
30
+ }
31
+
22
32
  createConnection (options, callback) {
23
33
  dns.lookup(options.hostname, (err, address) => {
24
34
  if (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evanp/activitypub-bot",
3
- "version": "0.45.18",
3
+ "version": "0.45.19",
4
4
  "description": "server-side ActivityPub bot framework",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",