@fedify/fedify 2.5.0-dev.2739 → 2.5.0-dev.2750

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/README.md CHANGED
@@ -3,8 +3,8 @@
3
3
  ![](./logo.svg) Fedify: an ActivityPub server framework
4
4
  =======================================================
5
5
 
6
- [![JSR][JSR badge]][JSR]
7
6
  [![npm][npm badge]][npm]
7
+ [![JSR][JSR badge]][JSR]
8
8
  [![GitHub Actions][GitHub Actions badge]][GitHub Actions]
9
9
  [![Matrix][Matrix badge]][Matrix]
10
10
  [![@fedify@hackers.pub][@fedify@hackers.pub badge]][@fedify@hackers.pub]
@@ -53,10 +53,10 @@ in the fediverse!
53
53
  [^1]: You may already know some of the networks in the fediverse, such as
54
54
  [Mastodon], [Lemmy], [Pixelfed], [PeerTube], and so on.
55
55
 
56
- [JSR badge]: https://jsr.io/badges/@fedify/fedify
57
- [JSR]: https://jsr.io/@fedify/fedify
58
56
  [npm badge]: https://img.shields.io/npm/v/@fedify/fedify?logo=npm
59
57
  [npm]: https://www.npmjs.com/package/@fedify/fedify
58
+ [JSR badge]: https://jsr.io/badges/@fedify/fedify
59
+ [JSR]: https://jsr.io/@fedify/fedify
60
60
  [GitHub Actions badge]: https://github.com/fedify-dev/fedify/actions/workflows/build.yaml/badge.svg
61
61
  [GitHub Actions]: https://github.com/fedify-dev/fedify/actions/workflows/build.yaml
62
62
  [Matrix badge]: https://img.shields.io/matrix/fedify%3Amatrix.org?logo=matrix
@@ -98,114 +98,114 @@ which provides the core functionality of the framework. Other packages provide
98
98
  integrations with various web frameworks, database drivers, and other features.
99
99
  Here is the list of packages:
100
100
 
101
- | Package | JSR | npm | Description |
101
+ | Package | npm | JSR | Description |
102
102
  | --------------------------------------------------------------- | --------------------------------------- | --------------------------------------- | ---------------------------------------- |
103
- | [@fedify/fedify](/packages/fedify/) | [JSR] | [npm] | The core framework of Fedify |
104
- | [@fedify/cli](/packages/cli/) | [JSR][jsr:@fedify/cli] | [npm][npm:@fedify/cli] | CLI toolchain for testing and debugging |
105
- | [@fedify/create](/packages/create/) | | [npm][npm:@fedify/create] | Create a new Fedify project |
106
- | [@fedify/adonisjs](/packages/adonisjs/) | | [npm][npm:@fedify/adonisjs] | AdonisJS integration |
107
- | [@fedify/amqp](/packages/amqp/) | [JSR][jsr:@fedify/amqp] | [npm][npm:@fedify/amqp] | AMQP/RabbitMQ driver |
108
- | [@fedify/astro](/packages/astro/) | [JSR][jsr:@fedify/astro] | [npm][npm:@fedify/astro] | Astro integration |
109
- | [@fedify/backfill](/packages/backfill/) | [JSR][jsr:@fedify/backfill] | [npm][npm:@fedify/backfill] | ActivityPub backfill support |
110
- | [@fedify/cfworkers](/packages/cfworkers/) | [JSR][jsr:@fedify/cfworkers] | [npm][npm:@fedify/cfworkers] | Cloudflare Workers integration |
111
- | [@fedify/debugger](/packages/debugger/) | [JSR][jsr:@fedify/debugger] | [npm][npm:@fedify/debugger] | Embedded ActivityPub debug dashboard |
112
- | [@fedify/denokv](/packages/denokv/) | [JSR][jsr:@fedify/denokv] | | Deno KV integration (deprecated) |
113
- | [@fedify/elysia](/packages/elysia/) | | [npm][npm:@fedify/elysia] | Elysia integration |
114
- | [@fedify/express](/packages/express/) | [JSR][jsr:@fedify/express] | [npm][npm:@fedify/express] | Express integration |
115
- | [@fedify/fastify](/packages/fastify/) | [JSR][jsr:@fedify/fastify] | [npm][npm:@fedify/fastify] | Fastify integration |
116
- | [@fedify/fresh](/packages/fresh/) | [JSR][jsr:@fedify/fresh] | | Fresh integration |
117
- | [@fedify/h3](/packages/h3/) | [JSR][jsr:@fedify/h3] | [npm][npm:@fedify/h3] | H3 integration |
118
- | [@fedify/hono](/packages/hono/) | [JSR][jsr:@fedify/hono] | [npm][npm:@fedify/hono] | Hono integration |
119
- | [@fedify/init](/packages/init/) | [JSR][jsr:@fedify/init] | [npm][npm:@fedify/init] | Project initializer for Fedify |
120
- | [@fedify/interaction-controls](/packages/interaction-controls/) | [JSR][jsr:@fedify/interaction-controls] | [npm][npm:@fedify/interaction-controls] | Interaction control helpers |
121
- | [@fedify/koa](/packages/koa/) | [JSR][jsr:@fedify/koa] | [npm][npm:@fedify/koa] | Koa integration |
122
- | [@fedify/lint](/packages/lint/) | [JSR][jsr:@fedify/lint] | [npm][npm:@fedify/lint] | Linting utilities |
123
- | [@fedify/nestjs](/packages/nestjs/) | | [npm][npm:@fedify/nestjs] | NestJS integration |
124
- | [@fedify/next](/packages/next/) | | [npm][npm:@fedify/next] | Next.js integration |
125
- | [@fedify/nuxt](/packages/nuxt/) | [JSR][jsr:@fedify/nuxt] | [npm][npm:@fedify/nuxt] | Nuxt integration |
126
- | [@fedify/mysql](/packages/mysql/) | [JSR][jsr:@fedify/mysql] | [npm][npm:@fedify/mysql] | MySQL/MariaDB driver |
127
- | [@fedify/netlify](/packages/netlify/) | [JSR][jsr:@fedify/netlify] | [npm][npm:@fedify/netlify] | Netlify Async Workloads integration |
128
- | [@fedify/pglite](/packages/pglite/) | [JSR][jsr:@fedify/pglite] | [npm][npm:@fedify/pglite] | PGlite driver |
129
- | [@fedify/postgres](/packages/postgres/) | [JSR][jsr:@fedify/postgres] | [npm][npm:@fedify/postgres] | PostgreSQL driver |
130
- | [@fedify/redis](/packages/redis/) | [JSR][jsr:@fedify/redis] | [npm][npm:@fedify/redis] | Redis driver |
131
- | [@fedify/relay](/packages/relay/) | [JSR][jsr:@fedify/relay] | [npm][npm:@fedify/relay] | ActivityPub relay support |
132
- | [@fedify/solidstart](/packages/solidstart/) | [JSR][jsr:@fedify/solidstart] | [npm][npm:@fedify/solidstart] | SolidStart integration |
133
- | [@fedify/sqlite](/packages/sqlite/) | [JSR][jsr:@fedify/sqlite] | [npm][npm:@fedify/sqlite] | SQLite driver |
134
- | [@fedify/sveltekit](/packages/sveltekit/) | [JSR][jsr:@fedify/sveltekit] | [npm][npm:@fedify/sveltekit] | SvelteKit integration |
135
- | [@fedify/testing](/packages/testing/) | [JSR][jsr:@fedify/testing] | [npm][npm:@fedify/testing] | Testing utilities |
136
- | [@fedify/uri-template](/packages/uri-template/) | [JSR][jsr:@fedify/uri-template] | [npm][npm:@fedify/uri-template] | RFC 6570 URI Template library |
137
- | [@fedify/vocab](/packages/vocab/) | [JSR][jsr:@fedify/vocab] | [npm][npm:@fedify/vocab] | Activity Vocabulary library |
138
- | [@fedify/vocab-runtime](/packages/vocab-runtime/) | [JSR][jsr:@fedify/vocab-runtime] | [npm][npm:@fedify/vocab-runtime] | Runtime library for code-generated vocab |
139
- | [@fedify/vocab-tools](/packages/vocab-tools/) | [JSR][jsr:@fedify/vocab-tools] | [npm][npm:@fedify/vocab-tools] | Code generation tools for Activity Vocab |
140
- | [@fedify/webfinger](/packages/webfinger/) | [JSR][jsr:@fedify/webfinger] | [npm][npm:@fedify/webfinger] | WebFinger client library for ActivityPub |
103
+ | [@fedify/fedify](/packages/fedify/) | [npm] | [JSR] | The core framework of Fedify |
104
+ | [@fedify/cli](/packages/cli/) | [npm][npm:@fedify/cli] | [JSR][jsr:@fedify/cli] | CLI toolchain for testing and debugging |
105
+ | [@fedify/create](/packages/create/) | [npm][npm:@fedify/create] | | Create a new Fedify project |
106
+ | [@fedify/adonisjs](/packages/adonisjs/) | [npm][npm:@fedify/adonisjs] | | AdonisJS integration |
107
+ | [@fedify/amqp](/packages/amqp/) | [npm][npm:@fedify/amqp] | [JSR][jsr:@fedify/amqp] | AMQP/RabbitMQ driver |
108
+ | [@fedify/astro](/packages/astro/) | [npm][npm:@fedify/astro] | [JSR][jsr:@fedify/astro] | Astro integration |
109
+ | [@fedify/backfill](/packages/backfill/) | [npm][npm:@fedify/backfill] | [JSR][jsr:@fedify/backfill] | ActivityPub backfill support |
110
+ | [@fedify/cfworkers](/packages/cfworkers/) | [npm][npm:@fedify/cfworkers] | [JSR][jsr:@fedify/cfworkers] | Cloudflare Workers integration |
111
+ | [@fedify/debugger](/packages/debugger/) | [npm][npm:@fedify/debugger] | [JSR][jsr:@fedify/debugger] | Embedded ActivityPub debug dashboard |
112
+ | [@fedify/denokv](/packages/denokv/) | | [JSR][jsr:@fedify/denokv] | Deno KV integration (deprecated) |
113
+ | [@fedify/elysia](/packages/elysia/) | [npm][npm:@fedify/elysia] | | Elysia integration |
114
+ | [@fedify/express](/packages/express/) | [npm][npm:@fedify/express] | [JSR][jsr:@fedify/express] | Express integration |
115
+ | [@fedify/fastify](/packages/fastify/) | [npm][npm:@fedify/fastify] | [JSR][jsr:@fedify/fastify] | Fastify integration |
116
+ | [@fedify/fresh](/packages/fresh/) | | [JSR][jsr:@fedify/fresh] | Fresh integration |
117
+ | [@fedify/h3](/packages/h3/) | [npm][npm:@fedify/h3] | [JSR][jsr:@fedify/h3] | H3 integration |
118
+ | [@fedify/hono](/packages/hono/) | [npm][npm:@fedify/hono] | [JSR][jsr:@fedify/hono] | Hono integration |
119
+ | [@fedify/init](/packages/init/) | [npm][npm:@fedify/init] | [JSR][jsr:@fedify/init] | Project initializer for Fedify |
120
+ | [@fedify/interaction-controls](/packages/interaction-controls/) | [npm][npm:@fedify/interaction-controls] | [JSR][jsr:@fedify/interaction-controls] | Interaction control helpers |
121
+ | [@fedify/koa](/packages/koa/) | [npm][npm:@fedify/koa] | [JSR][jsr:@fedify/koa] | Koa integration |
122
+ | [@fedify/lint](/packages/lint/) | [npm][npm:@fedify/lint] | [JSR][jsr:@fedify/lint] | Linting utilities |
123
+ | [@fedify/nestjs](/packages/nestjs/) | [npm][npm:@fedify/nestjs] | | NestJS integration |
124
+ | [@fedify/next](/packages/next/) | [npm][npm:@fedify/next] | | Next.js integration |
125
+ | [@fedify/nuxt](/packages/nuxt/) | [npm][npm:@fedify/nuxt] | [JSR][jsr:@fedify/nuxt] | Nuxt integration |
126
+ | [@fedify/mysql](/packages/mysql/) | [npm][npm:@fedify/mysql] | [JSR][jsr:@fedify/mysql] | MySQL/MariaDB driver |
127
+ | [@fedify/netlify](/packages/netlify/) | [npm][npm:@fedify/netlify] | [JSR][jsr:@fedify/netlify] | Netlify Async Workloads integration |
128
+ | [@fedify/pglite](/packages/pglite/) | [npm][npm:@fedify/pglite] | [JSR][jsr:@fedify/pglite] | PGlite driver |
129
+ | [@fedify/postgres](/packages/postgres/) | [npm][npm:@fedify/postgres] | [JSR][jsr:@fedify/postgres] | PostgreSQL driver |
130
+ | [@fedify/redis](/packages/redis/) | [npm][npm:@fedify/redis] | [JSR][jsr:@fedify/redis] | Redis driver |
131
+ | [@fedify/relay](/packages/relay/) | [npm][npm:@fedify/relay] | [JSR][jsr:@fedify/relay] | ActivityPub relay support |
132
+ | [@fedify/solidstart](/packages/solidstart/) | [npm][npm:@fedify/solidstart] | [JSR][jsr:@fedify/solidstart] | SolidStart integration |
133
+ | [@fedify/sqlite](/packages/sqlite/) | [npm][npm:@fedify/sqlite] | [JSR][jsr:@fedify/sqlite] | SQLite driver |
134
+ | [@fedify/sveltekit](/packages/sveltekit/) | [npm][npm:@fedify/sveltekit] | [JSR][jsr:@fedify/sveltekit] | SvelteKit integration |
135
+ | [@fedify/testing](/packages/testing/) | [npm][npm:@fedify/testing] | [JSR][jsr:@fedify/testing] | Testing utilities |
136
+ | [@fedify/uri-template](/packages/uri-template/) | [npm][npm:@fedify/uri-template] | [JSR][jsr:@fedify/uri-template] | RFC 6570 URI Template library |
137
+ | [@fedify/vocab](/packages/vocab/) | [npm][npm:@fedify/vocab] | [JSR][jsr:@fedify/vocab] | Activity Vocabulary library |
138
+ | [@fedify/vocab-runtime](/packages/vocab-runtime/) | [npm][npm:@fedify/vocab-runtime] | [JSR][jsr:@fedify/vocab-runtime] | Runtime library for code-generated vocab |
139
+ | [@fedify/vocab-tools](/packages/vocab-tools/) | [npm][npm:@fedify/vocab-tools] | [JSR][jsr:@fedify/vocab-tools] | Code generation tools for Activity Vocab |
140
+ | [@fedify/webfinger](/packages/webfinger/) | [npm][npm:@fedify/webfinger] | [JSR][jsr:@fedify/webfinger] | WebFinger client library for ActivityPub |
141
141
 
142
- [jsr:@fedify/cli]: https://jsr.io/@fedify/cli
143
142
  [npm:@fedify/cli]: https://www.npmjs.com/package/@fedify/cli
143
+ [jsr:@fedify/cli]: https://jsr.io/@fedify/cli
144
144
  [npm:@fedify/create]: https://www.npmjs.com/package/@fedify/create
145
145
  [npm:@fedify/adonisjs]: https://www.npmjs.com/package/@fedify/adonisjs
146
- [jsr:@fedify/amqp]: https://jsr.io/@fedify/amqp
147
146
  [npm:@fedify/amqp]: https://www.npmjs.com/package/@fedify/amqp
148
- [jsr:@fedify/astro]: https://jsr.io/@fedify/astro
147
+ [jsr:@fedify/amqp]: https://jsr.io/@fedify/amqp
149
148
  [npm:@fedify/astro]: https://www.npmjs.com/package/@fedify/astro
150
- [jsr:@fedify/backfill]: https://jsr.io/@fedify/backfill
149
+ [jsr:@fedify/astro]: https://jsr.io/@fedify/astro
151
150
  [npm:@fedify/backfill]: https://www.npmjs.com/package/@fedify/backfill
152
- [jsr:@fedify/cfworkers]: https://jsr.io/@fedify/cfworkers
151
+ [jsr:@fedify/backfill]: https://jsr.io/@fedify/backfill
153
152
  [npm:@fedify/cfworkers]: https://www.npmjs.com/package/@fedify/cfworkers
154
- [jsr:@fedify/debugger]: https://jsr.io/@fedify/debugger
153
+ [jsr:@fedify/cfworkers]: https://jsr.io/@fedify/cfworkers
155
154
  [npm:@fedify/debugger]: https://www.npmjs.com/package/@fedify/debugger
155
+ [jsr:@fedify/debugger]: https://jsr.io/@fedify/debugger
156
156
  [jsr:@fedify/denokv]: https://jsr.io/@fedify/denokv
157
157
  [npm:@fedify/elysia]: https://www.npmjs.com/package/@fedify/elysia
158
- [jsr:@fedify/express]: https://jsr.io/@fedify/express
159
158
  [npm:@fedify/express]: https://www.npmjs.com/package/@fedify/express
160
- [jsr:@fedify/fastify]: https://jsr.io/@fedify/fastify
159
+ [jsr:@fedify/express]: https://jsr.io/@fedify/express
161
160
  [npm:@fedify/fastify]: https://www.npmjs.com/package/@fedify/fastify
161
+ [jsr:@fedify/fastify]: https://jsr.io/@fedify/fastify
162
162
  [jsr:@fedify/fresh]: https://jsr.io/@fedify/fresh
163
- [jsr:@fedify/h3]: https://jsr.io/@fedify/h3
164
163
  [npm:@fedify/h3]: https://www.npmjs.com/package/@fedify/h3
165
- [jsr:@fedify/hono]: https://jsr.io/@fedify/hono
164
+ [jsr:@fedify/h3]: https://jsr.io/@fedify/h3
166
165
  [npm:@fedify/hono]: https://www.npmjs.com/package/@fedify/hono
167
- [jsr:@fedify/init]: https://jsr.io/@fedify/init
166
+ [jsr:@fedify/hono]: https://jsr.io/@fedify/hono
168
167
  [npm:@fedify/init]: https://www.npmjs.com/package/@fedify/init
169
- [jsr:@fedify/interaction-controls]: https://jsr.io/@fedify/interaction-controls
168
+ [jsr:@fedify/init]: https://jsr.io/@fedify/init
170
169
  [npm:@fedify/interaction-controls]: https://www.npmjs.com/package/@fedify/interaction-controls
171
- [jsr:@fedify/koa]: https://jsr.io/@fedify/koa
170
+ [jsr:@fedify/interaction-controls]: https://jsr.io/@fedify/interaction-controls
172
171
  [npm:@fedify/koa]: https://www.npmjs.com/package/@fedify/koa
173
- [jsr:@fedify/lint]: https://jsr.io/@fedify/lint
172
+ [jsr:@fedify/koa]: https://jsr.io/@fedify/koa
174
173
  [npm:@fedify/lint]: https://www.npmjs.com/package/@fedify/lint
174
+ [jsr:@fedify/lint]: https://jsr.io/@fedify/lint
175
175
  [npm:@fedify/nestjs]: https://www.npmjs.com/package/@fedify/nestjs
176
176
  [npm:@fedify/next]: https://www.npmjs.com/package/@fedify/next
177
- [jsr:@fedify/nuxt]: https://jsr.io/@fedify/nuxt
178
177
  [npm:@fedify/nuxt]: https://www.npmjs.com/package/@fedify/nuxt
179
- [jsr:@fedify/mysql]: https://jsr.io/@fedify/mysql
178
+ [jsr:@fedify/nuxt]: https://jsr.io/@fedify/nuxt
180
179
  [npm:@fedify/mysql]: https://www.npmjs.com/package/@fedify/mysql
181
- [jsr:@fedify/netlify]: https://jsr.io/@fedify/netlify
180
+ [jsr:@fedify/mysql]: https://jsr.io/@fedify/mysql
182
181
  [npm:@fedify/netlify]: https://www.npmjs.com/package/@fedify/netlify
183
- [jsr:@fedify/pglite]: https://jsr.io/@fedify/pglite
182
+ [jsr:@fedify/netlify]: https://jsr.io/@fedify/netlify
184
183
  [npm:@fedify/pglite]: https://www.npmjs.com/package/@fedify/pglite
185
- [jsr:@fedify/postgres]: https://jsr.io/@fedify/postgres
184
+ [jsr:@fedify/pglite]: https://jsr.io/@fedify/pglite
186
185
  [npm:@fedify/postgres]: https://www.npmjs.com/package/@fedify/postgres
187
- [jsr:@fedify/redis]: https://jsr.io/@fedify/redis
186
+ [jsr:@fedify/postgres]: https://jsr.io/@fedify/postgres
188
187
  [npm:@fedify/redis]: https://www.npmjs.com/package/@fedify/redis
189
- [jsr:@fedify/relay]: https://jsr.io/@fedify/relay
188
+ [jsr:@fedify/redis]: https://jsr.io/@fedify/redis
190
189
  [npm:@fedify/relay]: https://www.npmjs.com/package/@fedify/relay
191
- [jsr:@fedify/solidstart]: https://jsr.io/@fedify/solidstart
190
+ [jsr:@fedify/relay]: https://jsr.io/@fedify/relay
192
191
  [npm:@fedify/solidstart]: https://www.npmjs.com/package/@fedify/solidstart
193
- [jsr:@fedify/sqlite]: https://jsr.io/@fedify/sqlite
192
+ [jsr:@fedify/solidstart]: https://jsr.io/@fedify/solidstart
194
193
  [npm:@fedify/sqlite]: https://www.npmjs.com/package/@fedify/sqlite
195
- [jsr:@fedify/sveltekit]: https://jsr.io/@fedify/sveltekit
194
+ [jsr:@fedify/sqlite]: https://jsr.io/@fedify/sqlite
196
195
  [npm:@fedify/sveltekit]: https://www.npmjs.com/package/@fedify/sveltekit
197
- [jsr:@fedify/testing]: https://jsr.io/@fedify/testing
196
+ [jsr:@fedify/sveltekit]: https://jsr.io/@fedify/sveltekit
198
197
  [npm:@fedify/testing]: https://www.npmjs.com/package/@fedify/testing
199
- [jsr:@fedify/uri-template]: https://jsr.io/@fedify/uri-template
198
+ [jsr:@fedify/testing]: https://jsr.io/@fedify/testing
200
199
  [npm:@fedify/uri-template]: https://www.npmjs.com/package/@fedify/uri-template
201
- [jsr:@fedify/vocab]: https://jsr.io/@fedify/vocab
200
+ [jsr:@fedify/uri-template]: https://jsr.io/@fedify/uri-template
202
201
  [npm:@fedify/vocab]: https://www.npmjs.com/package/@fedify/vocab
203
- [jsr:@fedify/vocab-runtime]: https://jsr.io/@fedify/vocab-runtime
202
+ [jsr:@fedify/vocab]: https://jsr.io/@fedify/vocab
204
203
  [npm:@fedify/vocab-runtime]: https://www.npmjs.com/package/@fedify/vocab-runtime
205
- [jsr:@fedify/vocab-tools]: https://jsr.io/@fedify/vocab-tools
204
+ [jsr:@fedify/vocab-runtime]: https://jsr.io/@fedify/vocab-runtime
206
205
  [npm:@fedify/vocab-tools]: https://www.npmjs.com/package/@fedify/vocab-tools
207
- [jsr:@fedify/webfinger]: https://jsr.io/@fedify/webfinger
206
+ [jsr:@fedify/vocab-tools]: https://jsr.io/@fedify/vocab-tools
208
207
  [npm:@fedify/webfinger]: https://www.npmjs.com/package/@fedify/webfinger
208
+ [jsr:@fedify/webfinger]: https://jsr.io/@fedify/webfinger
209
209
 
210
210
 
211
211
  Sponsors
@@ -1,6 +1,6 @@
1
1
  const { URLPattern } = require("urlpattern-polyfill");
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const require_federation = require("../federation-D8v7qM7P.cjs");
3
+ const require_federation = require("../federation-ouQBkxYp.cjs");
4
4
  exports.CircuitBreaker = require_federation.CircuitBreaker;
5
5
  exports.InProcessMessageQueue = require_federation.InProcessMessageQueue;
6
6
  exports.MemoryKvStore = require_federation.MemoryKvStore;
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "temporal-polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { a as respondWithObjectIfAcceptable, c as buildCollectionSynchronizationHeader, d as normalizeCircuitBreakerOptions, f as parseCircuitBreakerKvState, i as respondWithObject, l as digest, n as handleWebFinger, o as SendActivityError, p as createFederationBuilder, r as createExponentialBackoffPolicy, s as isActorAuthenticated, t as createFederation, u as CircuitBreaker } from "../middleware-DebhSzOa.js";
3
+ import { a as respondWithObjectIfAcceptable, c as buildCollectionSynchronizationHeader, d as normalizeCircuitBreakerOptions, f as parseCircuitBreakerKvState, i as respondWithObject, l as digest, n as handleWebFinger, o as SendActivityError, p as createFederationBuilder, r as createExponentialBackoffPolicy, s as isActorAuthenticated, t as createFederation, u as CircuitBreaker } from "../middleware-Dkds6T_g.js";
4
4
  import { getLogger } from "@logtape/logtape";
5
5
  import { Router as Router$1, RouterError as RouterError$1, assertPath, isPath } from "@fedify/uri-template";
6
6
  import { isEqual } from "es-toolkit";
@@ -1,10 +1,10 @@
1
1
  const { URLPattern } = require("urlpattern-polyfill");
2
2
  const require_rolldown_runtime = require("./rolldown-runtime-Dmm3t92W.cjs");
3
3
  const require_transformers = require("./transformers-BalCrSsr.cjs");
4
- const require_http = require("./http-C8mgPcy_.cjs");
4
+ const require_http = require("./http-BFdGgNzO.cjs");
5
5
  const require_types = require("./types-hKCCjii0.cjs");
6
- const require_portable_collection = require("./portable-collection-CNX6EjCB.cjs");
7
- const require_kv_cache = require("./kv-cache-jwVDpfVy.cjs");
6
+ const require_portable_collection = require("./portable-collection-BxaQ34xU.cjs");
7
+ const require_kv_cache = require("./kv-cache-tlRl7L1J.cjs");
8
8
  let _logtape_logtape = require("@logtape/logtape");
9
9
  let _fedify_vocab_runtime = require("@fedify/vocab-runtime");
10
10
  let _fedify_uri_template = require("@fedify/uri-template");
@@ -17,7 +17,7 @@ json_canon = require_rolldown_runtime.__toESM(json_canon, 1);
17
17
  let _opentelemetry_semantic_conventions = require("@opentelemetry/semantic-conventions");
18
18
  //#region deno.json
19
19
  var name = "@fedify/fedify";
20
- var version = "2.5.0-dev.2739+50292f07";
20
+ var version = "2.5.0-dev.2750+3827839b";
21
21
  //#endregion
22
22
  //#region src/sig/portable-key-id.ts
23
23
  const COMPATIBLE_KEY_ID_PATH_PATTERN = /^\/\.well-known\/apgateway\/did(?::|%3A)/i;
@@ -15,7 +15,7 @@ import serialize from "json-canon";
15
15
  import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_URL_FULL } from "@opentelemetry/semantic-conventions";
16
16
  //#region deno.json
17
17
  var name = "@fedify/fedify";
18
- var version = "2.5.0-dev.2739+50292f07";
18
+ var version = "2.5.0-dev.2750+3827839b";
19
19
  //#endregion
20
20
  //#region src/sig/portable-key-id.ts
21
21
  const COMPATIBLE_KEY_ID_PATH_PATTERN = /^\/\.well-known\/apgateway\/did(?::|%3A)/i;
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "temporal-polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { X as validateCryptoKey, dt as recordDocumentCache, t as doubleKnockScoped } from "./http-DijuzWN6.js";
3
+ import { X as validateCryptoKey, dt as recordDocumentCache, t as doubleKnockScoped } from "./http-CNBy-0kL.js";
4
4
  import { getLogger } from "@logtape/logtape";
5
5
  import { FetchError, UrlError, createActivityPubRequest, getRemoteDocument, logRequest, preloadedContexts, resolveDocumentLoaderTimeout, withDocumentLoaderTimeout } from "@fedify/vocab-runtime";
6
6
  import { curry } from "es-toolkit";
@@ -1,5 +1,5 @@
1
1
  const { URLPattern } = require("urlpattern-polyfill");
2
- const require_http = require("./http-C8mgPcy_.cjs");
2
+ const require_http = require("./http-BFdGgNzO.cjs");
3
3
  let _logtape_logtape = require("@logtape/logtape");
4
4
  let _fedify_vocab_runtime = require("@fedify/vocab-runtime");
5
5
  let es_toolkit = require("es-toolkit");
@@ -2,10 +2,10 @@ import { Temporal } from "temporal-polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
3
  import { t as __exportAll } from "./rolldown-runtime-BC-Eo5Mj.js";
4
4
  import { r as getDefaultActivityTransformers } from "./transformers-DAtXl_Kc.js";
5
- import { $ as getVerifiedKeyOwnerEvidence, A as compactJsonLd, At as getRawCanonicalPortableId, B as verifyCompactJsonLdDetailed, C as verifyPortableObjectProofWithRoot, Ct as observeAttempt, D as InvalidContextReferenceError, Dt as getCanonicalPortableId, E as normalizeOutgoingActivityJsonLd, Et as getAuthenticationOrigin, F as hasSignatureLike, Ft as isPortableUri, I as isClearlyMalformedContextReference, It as isSameObjectId, L as isInvalidUrlTypeError, M as detachSignature, Mt as isCompatibleKeyId, N as getNormalizationContextLoader, Nt as isPortableId, O as assertSafeJsonLd, Ot as getGatewayKeyBase, P as hasSignature, Pt as isPortableKeyId, Q as MAX_PORTABLE_KEY_TTL, R as markEffectiveContextLoader, Rt as name, S as verifyPortableObjectProofPolicy, Tt as verificationObservation, U as wrapContextLoaderForJsonLd, W as exportJwk, X as validateCryptoKey, Y as importJwk, _ as signObject, _t as registerQueueDepthGauge, at as isAbortError, b as verifyObjectDetailed, c as verifyRequestDetailed, ct as recordCollectionPageItems, d as InvalidPortableObjectIdError, f as classifyFep2277CoreType, ft as recordFanoutRecipients, g as preparePortableObjectProofPolicy, gt as recordWebFingerHandle, h as hasProofLike, ht as recordOutboxEnqueue, i as selectRequestSignature, it as instrumentDocumentLoader, jt as hasPortableActor, kt as getPortableDid, lt as recordCollectionRequest, m as getProofSigner, mt as recordOutboxActivity, n as listRequestSignatures, nt as getFederationMetrics, o as validateMaxSignatures, ot as recordCircuitBreakerStateChange, pt as recordInboxActivity, r as parseRfc9421SignatureInput, rt as getRemoteHost, s as verifyRequest, st as recordCollectionDispatchDuration, t as doubleKnockScoped, tt as getDurationMs, ut as recordCollectionTotalItems, v as verifyMapLocalProof, vt as preloadedOnlyDocumentLoader, w as verifyPreparedPortableObjectProofPolicy, wt as snapshotKey, x as verifyPortableObjectProof, y as verifyObject, yt as formatAcceptSignature, z as signJsonLd, zt as version } from "./http-DijuzWN6.js";
5
+ import { $ as getVerifiedKeyOwnerEvidence, A as compactJsonLd, At as getRawCanonicalPortableId, B as verifyCompactJsonLdDetailed, C as verifyPortableObjectProofWithRoot, Ct as observeAttempt, D as InvalidContextReferenceError, Dt as getCanonicalPortableId, E as normalizeOutgoingActivityJsonLd, Et as getAuthenticationOrigin, F as hasSignatureLike, Ft as isPortableUri, I as isClearlyMalformedContextReference, It as isSameObjectId, L as isInvalidUrlTypeError, M as detachSignature, Mt as isCompatibleKeyId, N as getNormalizationContextLoader, Nt as isPortableId, O as assertSafeJsonLd, Ot as getGatewayKeyBase, P as hasSignature, Pt as isPortableKeyId, Q as MAX_PORTABLE_KEY_TTL, R as markEffectiveContextLoader, Rt as name, S as verifyPortableObjectProofPolicy, Tt as verificationObservation, U as wrapContextLoaderForJsonLd, W as exportJwk, X as validateCryptoKey, Y as importJwk, _ as signObject, _t as registerQueueDepthGauge, at as isAbortError, b as verifyObjectDetailed, c as verifyRequestDetailed, ct as recordCollectionPageItems, d as InvalidPortableObjectIdError, f as classifyFep2277CoreType, ft as recordFanoutRecipients, g as preparePortableObjectProofPolicy, gt as recordWebFingerHandle, h as hasProofLike, ht as recordOutboxEnqueue, i as selectRequestSignature, it as instrumentDocumentLoader, jt as hasPortableActor, kt as getPortableDid, lt as recordCollectionRequest, m as getProofSigner, mt as recordOutboxActivity, n as listRequestSignatures, nt as getFederationMetrics, o as validateMaxSignatures, ot as recordCircuitBreakerStateChange, pt as recordInboxActivity, r as parseRfc9421SignatureInput, rt as getRemoteHost, s as verifyRequest, st as recordCollectionDispatchDuration, t as doubleKnockScoped, tt as getDurationMs, ut as recordCollectionTotalItems, v as verifyMapLocalProof, vt as preloadedOnlyDocumentLoader, w as verifyPreparedPortableObjectProofPolicy, wt as snapshotKey, x as verifyPortableObjectProof, y as verifyObject, yt as formatAcceptSignature, z as signJsonLd, zt as version } from "./http-CNBy-0kL.js";
6
6
  import { a as MAX_BODY_SIZE, i as BodyTooLargeError, n as getNodeInfo, o as readBoundedText, t as nodeInfoToJson } from "./types-DUjZb4i6.js";
7
- import { n as doesActorOwnKey, r as getKeyOwner, t as verifyPortableObject } from "./portable-collection-9g5WxrvZ.js";
8
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-CHol17MD.js";
7
+ import { n as doesActorOwnKey, r as getKeyOwner, t as verifyPortableObject } from "./portable-collection-Bzk7-rqE.js";
8
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-BlWSvU1D.js";
9
9
  import { getLogger, withContext } from "@logtape/logtape";
10
10
  import { FetchError, UrlError, canonicalizePortableUri, decodeMultibase, formatIri, fromCompatibleEf61Id, getDocumentLoader, getFe34Origin, isGatewayUrl, parseDigestMultibase, parseHashlink, parseIri, preloadedContexts, resolveDocumentLoaderTimeout, toCompatibleEf61Id } from "@fedify/vocab-runtime";
11
11
  import { Router, RouterError, assertPath } from "@fedify/uri-template";
package/dist/mod.cjs CHANGED
@@ -3,11 +3,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  require("./rolldown-runtime-Dmm3t92W.cjs");
4
4
  const require_transformers = require("./transformers-BalCrSsr.cjs");
5
5
  require("./compat/mod.cjs");
6
- const require_federation = require("./federation-D8v7qM7P.cjs");
7
- const require_http = require("./http-C8mgPcy_.cjs");
6
+ const require_federation = require("./federation-ouQBkxYp.cjs");
7
+ const require_http = require("./http-BFdGgNzO.cjs");
8
8
  const require_types = require("./types-hKCCjii0.cjs");
9
- const require_portable_collection = require("./portable-collection-CNX6EjCB.cjs");
10
- const require_kv_cache = require("./kv-cache-jwVDpfVy.cjs");
9
+ const require_portable_collection = require("./portable-collection-BxaQ34xU.cjs");
10
+ const require_kv_cache = require("./kv-cache-tlRl7L1J.cjs");
11
11
  require("./nodeinfo/mod.cjs");
12
12
  require("./runtime/mod.cjs");
13
13
  require("./sig/mod.cjs");
package/dist/mod.js CHANGED
@@ -3,11 +3,11 @@ import { URLPattern } from "urlpattern-polyfill";
3
3
  import "./rolldown-runtime-BC-Eo5Mj.js";
4
4
  import { n as autoIdAssigner, r as getDefaultActivityTransformers, t as actorDehydrator } from "./transformers-DAtXl_Kc.js";
5
5
  import "./compat/mod.js";
6
- import { a as respondWithObjectIfAcceptable, c as buildCollectionSynchronizationHeader, d as normalizeCircuitBreakerOptions, f as parseCircuitBreakerKvState, i as respondWithObject, l as digest, n as handleWebFinger, o as SendActivityError, p as createFederationBuilder, r as createExponentialBackoffPolicy, s as isActorAuthenticated, t as createFederation, u as CircuitBreaker } from "./middleware-DebhSzOa.js";
7
- import { F as hasSignatureLike, H as verifySignature, J as generateCryptoKeyPair, K as fetchKey, M as detachSignature, St as validateAcceptSignature, T as verifyProof, V as verifyJsonLd, W as exportJwk, Y as importJwk, _ as signObject, a as signRequest, bt as fulfillAcceptSignature, c as verifyRequestDetailed, h as hasProofLike, j as createSignature, k as attachSignature, p as createProof, q as fetchKeyDetailed, s as verifyRequest, x as verifyPortableObjectProof, xt as parseAcceptSignature, y as verifyObject, yt as formatAcceptSignature, z as signJsonLd } from "./http-DijuzWN6.js";
6
+ import { a as respondWithObjectIfAcceptable, c as buildCollectionSynchronizationHeader, d as normalizeCircuitBreakerOptions, f as parseCircuitBreakerKvState, i as respondWithObject, l as digest, n as handleWebFinger, o as SendActivityError, p as createFederationBuilder, r as createExponentialBackoffPolicy, s as isActorAuthenticated, t as createFederation, u as CircuitBreaker } from "./middleware-Dkds6T_g.js";
7
+ import { F as hasSignatureLike, H as verifySignature, J as generateCryptoKeyPair, K as fetchKey, M as detachSignature, St as validateAcceptSignature, T as verifyProof, V as verifyJsonLd, W as exportJwk, Y as importJwk, _ as signObject, a as signRequest, bt as fulfillAcceptSignature, c as verifyRequestDetailed, h as hasProofLike, j as createSignature, k as attachSignature, p as createProof, q as fetchKeyDetailed, s as verifyRequest, x as verifyPortableObjectProof, xt as parseAcceptSignature, y as verifyObject, yt as formatAcceptSignature, z as signJsonLd } from "./http-CNBy-0kL.js";
8
8
  import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-DUjZb4i6.js";
9
- import { n as doesActorOwnKey, r as getKeyOwner, t as verifyPortableObject } from "./portable-collection-9g5WxrvZ.js";
10
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-CHol17MD.js";
9
+ import { n as doesActorOwnKey, r as getKeyOwner, t as verifyPortableObject } from "./portable-collection-Bzk7-rqE.js";
10
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-BlWSvU1D.js";
11
11
  import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError } from "./federation/mod.js";
12
12
  import "./nodeinfo/mod.js";
13
13
  import "./runtime/mod.js";
package/dist/otel/mod.cjs CHANGED
@@ -53,6 +53,8 @@ var FedifySpanExporter = class {
53
53
  #kv;
54
54
  #ttl;
55
55
  #keyPrefix;
56
+ #waitUntil;
57
+ #inFlight = /* @__PURE__ */ new Set();
56
58
  /**
57
59
  * Creates a new FedifySpanExporter.
58
60
  *
@@ -63,6 +65,7 @@ var FedifySpanExporter = class {
63
65
  this.#kv = kv;
64
66
  this.#ttl = options?.ttl;
65
67
  this.#keyPrefix = options?.keyPrefix ?? ["fedify", "traces"];
68
+ this.#waitUntil = options?.waitUntil;
66
69
  }
67
70
  /**
68
71
  * Exports spans to the KvStore.
@@ -71,14 +74,33 @@ var FedifySpanExporter = class {
71
74
  * @param resultCallback Callback to invoke with the export result.
72
75
  */
73
76
  export(spans, resultCallback) {
74
- this.#exportAsync(spans).then(() => resultCallback({ code: _opentelemetry_core.ExportResultCode.SUCCESS })).catch((error) => {
77
+ const completion = this.#exportAsync(spans).then(() => _opentelemetry_core.ExportResultCode.SUCCESS, (error) => {
78
+ this.#logError("Failed to export spans to KvStore: {error}", error);
79
+ return _opentelemetry_core.ExportResultCode.FAILED;
80
+ }).then((code) => {
81
+ try {
82
+ resultCallback({ code });
83
+ } catch (error) {
84
+ this.#logError("Span export result callback threw: {error}", error);
85
+ }
86
+ }).then(() => {
87
+ this.#inFlight.delete(completion);
88
+ });
89
+ this.#inFlight.add(completion);
90
+ try {
91
+ this.#waitUntil?.(completion);
92
+ } catch (error) {
93
+ this.#logError("Span export waitUntil callback threw: {error}", error);
94
+ }
95
+ }
96
+ #logError(message, error) {
97
+ try {
75
98
  (0, _logtape_logtape.getLogger)([
76
99
  "fedify",
77
100
  "otel",
78
101
  "exporter"
79
- ]).error("Failed to export spans to KvStore: {error}", { error });
80
- resultCallback({ code: _opentelemetry_core.ExportResultCode.FAILED });
81
- });
102
+ ]).error(message, { error });
103
+ } catch {}
82
104
  }
83
105
  async #exportAsync(spans) {
84
106
  const storeOperations = [];
@@ -249,14 +271,21 @@ var FedifySpanExporter = class {
249
271
  return summaries;
250
272
  }
251
273
  /**
252
- * Forces the exporter to flush any buffered data.
253
- * This is a no-op because we write directly to the KvStore without buffering.
274
+ * Waits for pending export attempts and their result callbacks to settle.
275
+ * Includes exports started while waiting, until the exporter becomes idle.
276
+ * Storage failures are logged and reported through the export callback;
277
+ * they do not reject this promise. This only covers exports already passed
278
+ * to this exporter, not spans still buffered by a span processor.
254
279
  */
255
- async forceFlush() {}
280
+ async forceFlush() {
281
+ while (this.#inFlight.size > 0) await Promise.allSettled([...this.#inFlight]);
282
+ }
256
283
  /**
257
- * Shuts down the exporter.
284
+ * Waits for pending exports to settle before shutdown.
258
285
  */
259
- async shutdown() {}
286
+ async shutdown() {
287
+ await this.forceFlush();
288
+ }
260
289
  };
261
290
  //#endregion
262
291
  exports.FedifySpanExporter = FedifySpanExporter;
@@ -139,6 +139,20 @@ interface FedifySpanExporterOptions {
139
139
  * Defaults to `["fedify", "traces"]`.
140
140
  */
141
141
  readonly keyPrefix?: KvKey;
142
+ /**
143
+ * Keeps each export alive after the current serverless invocation ends.
144
+ * Called synchronously from {@link FedifySpanExporter.export} with a promise
145
+ * that fulfills after the export attempt and its result callback finish,
146
+ * even if either fails. Exceptions thrown by this hook are logged and ignored.
147
+ * The platform's execution limits still apply.
148
+ *
149
+ * Use a request-aware callback for a shared exporter, or create the exporter
150
+ * per request before passing a bound `ctx.waitUntil`. Do not log through a
151
+ * LogTape sink that uses this same hook, which could cause recursion.
152
+ *
153
+ * @since 2.5.0
154
+ */
155
+ readonly waitUntil?: (promise: Promise<void>) => void;
142
156
  }
143
157
  /**
144
158
  * Options for the {@link FedifySpanExporter.getRecentTraces} method.
@@ -244,12 +258,15 @@ declare class FedifySpanExporter implements SpanExporter {
244
258
  */
245
259
  getRecentTraces(options?: GetRecentTracesOptions): Promise<TraceSummary[]>;
246
260
  /**
247
- * Forces the exporter to flush any buffered data.
248
- * This is a no-op because we write directly to the KvStore without buffering.
261
+ * Waits for pending export attempts and their result callbacks to settle.
262
+ * Includes exports started while waiting, until the exporter becomes idle.
263
+ * Storage failures are logged and reported through the export callback;
264
+ * they do not reject this promise. This only covers exports already passed
265
+ * to this exporter, not spans still buffered by a span processor.
249
266
  */
250
267
  forceFlush(): Promise<void>;
251
268
  /**
252
- * Shuts down the exporter.
269
+ * Waits for pending exports to settle before shutdown.
253
270
  */
254
271
  shutdown(): Promise<void>;
255
272
  }
@@ -139,6 +139,20 @@ interface FedifySpanExporterOptions {
139
139
  * Defaults to `["fedify", "traces"]`.
140
140
  */
141
141
  readonly keyPrefix?: KvKey;
142
+ /**
143
+ * Keeps each export alive after the current serverless invocation ends.
144
+ * Called synchronously from {@link FedifySpanExporter.export} with a promise
145
+ * that fulfills after the export attempt and its result callback finish,
146
+ * even if either fails. Exceptions thrown by this hook are logged and ignored.
147
+ * The platform's execution limits still apply.
148
+ *
149
+ * Use a request-aware callback for a shared exporter, or create the exporter
150
+ * per request before passing a bound `ctx.waitUntil`. Do not log through a
151
+ * LogTape sink that uses this same hook, which could cause recursion.
152
+ *
153
+ * @since 2.5.0
154
+ */
155
+ readonly waitUntil?: (promise: Promise<void>) => void;
142
156
  }
143
157
  /**
144
158
  * Options for the {@link FedifySpanExporter.getRecentTraces} method.
@@ -244,12 +258,15 @@ declare class FedifySpanExporter implements SpanExporter {
244
258
  */
245
259
  getRecentTraces(options?: GetRecentTracesOptions): Promise<TraceSummary[]>;
246
260
  /**
247
- * Forces the exporter to flush any buffered data.
248
- * This is a no-op because we write directly to the KvStore without buffering.
261
+ * Waits for pending export attempts and their result callbacks to settle.
262
+ * Includes exports started while waiting, until the exporter becomes idle.
263
+ * Storage failures are logged and reported through the export callback;
264
+ * they do not reject this promise. This only covers exports already passed
265
+ * to this exporter, not spans still buffered by a span processor.
249
266
  */
250
267
  forceFlush(): Promise<void>;
251
268
  /**
252
- * Shuts down the exporter.
269
+ * Waits for pending exports to settle before shutdown.
253
270
  */
254
271
  shutdown(): Promise<void>;
255
272
  }
package/dist/otel/mod.js CHANGED
@@ -53,6 +53,8 @@ var FedifySpanExporter = class {
53
53
  #kv;
54
54
  #ttl;
55
55
  #keyPrefix;
56
+ #waitUntil;
57
+ #inFlight = /* @__PURE__ */ new Set();
56
58
  /**
57
59
  * Creates a new FedifySpanExporter.
58
60
  *
@@ -63,6 +65,7 @@ var FedifySpanExporter = class {
63
65
  this.#kv = kv;
64
66
  this.#ttl = options?.ttl;
65
67
  this.#keyPrefix = options?.keyPrefix ?? ["fedify", "traces"];
68
+ this.#waitUntil = options?.waitUntil;
66
69
  }
67
70
  /**
68
71
  * Exports spans to the KvStore.
@@ -71,14 +74,33 @@ var FedifySpanExporter = class {
71
74
  * @param resultCallback Callback to invoke with the export result.
72
75
  */
73
76
  export(spans, resultCallback) {
74
- this.#exportAsync(spans).then(() => resultCallback({ code: ExportResultCode.SUCCESS })).catch((error) => {
77
+ const completion = this.#exportAsync(spans).then(() => ExportResultCode.SUCCESS, (error) => {
78
+ this.#logError("Failed to export spans to KvStore: {error}", error);
79
+ return ExportResultCode.FAILED;
80
+ }).then((code) => {
81
+ try {
82
+ resultCallback({ code });
83
+ } catch (error) {
84
+ this.#logError("Span export result callback threw: {error}", error);
85
+ }
86
+ }).then(() => {
87
+ this.#inFlight.delete(completion);
88
+ });
89
+ this.#inFlight.add(completion);
90
+ try {
91
+ this.#waitUntil?.(completion);
92
+ } catch (error) {
93
+ this.#logError("Span export waitUntil callback threw: {error}", error);
94
+ }
95
+ }
96
+ #logError(message, error) {
97
+ try {
75
98
  getLogger([
76
99
  "fedify",
77
100
  "otel",
78
101
  "exporter"
79
- ]).error("Failed to export spans to KvStore: {error}", { error });
80
- resultCallback({ code: ExportResultCode.FAILED });
81
- });
102
+ ]).error(message, { error });
103
+ } catch {}
82
104
  }
83
105
  async #exportAsync(spans) {
84
106
  const storeOperations = [];
@@ -249,14 +271,21 @@ var FedifySpanExporter = class {
249
271
  return summaries;
250
272
  }
251
273
  /**
252
- * Forces the exporter to flush any buffered data.
253
- * This is a no-op because we write directly to the KvStore without buffering.
274
+ * Waits for pending export attempts and their result callbacks to settle.
275
+ * Includes exports started while waiting, until the exporter becomes idle.
276
+ * Storage failures are logged and reported through the export callback;
277
+ * they do not reject this promise. This only covers exports already passed
278
+ * to this exporter, not spans still buffered by a span processor.
254
279
  */
255
- async forceFlush() {}
280
+ async forceFlush() {
281
+ while (this.#inFlight.size > 0) await Promise.allSettled([...this.#inFlight]);
282
+ }
256
283
  /**
257
- * Shuts down the exporter.
284
+ * Waits for pending exports to settle before shutdown.
258
285
  */
259
- async shutdown() {}
286
+ async shutdown() {
287
+ await this.forceFlush();
288
+ }
260
289
  };
261
290
  //#endregion
262
291
  export { FedifySpanExporter };
@@ -1,5 +1,5 @@
1
1
  const { URLPattern } = require("urlpattern-polyfill");
2
- const require_http = require("./http-C8mgPcy_.cjs");
2
+ const require_http = require("./http-BFdGgNzO.cjs");
3
3
  let _logtape_logtape = require("@logtape/logtape");
4
4
  let _fedify_vocab_runtime = require("@fedify/vocab-runtime");
5
5
  let _fedify_vocab = require("@fedify/vocab");
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "temporal-polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { $ as getVerifiedKeyOwnerEvidence, C as verifyPortableObjectProofWithRoot, Dt as getCanonicalPortableId, Ft as isPortableUri, G as fetchActorDocument, Lt as isSamePublicKey$1, Mt as isCompatibleKeyId, Nt as isPortableId, Rt as name, W as exportJwk, Z as verifyKeyOwnership, et as parseKeyOwnerEvidence, l as fetchPortableGatewayKey, u as resolvePortableActorKey, x as verifyPortableObjectProof, zt as version } from "./http-DijuzWN6.js";
3
+ import { $ as getVerifiedKeyOwnerEvidence, C as verifyPortableObjectProofWithRoot, Dt as getCanonicalPortableId, Ft as isPortableUri, G as fetchActorDocument, Lt as isSamePublicKey$1, Mt as isCompatibleKeyId, Nt as isPortableId, Rt as name, W as exportJwk, Z as verifyKeyOwnership, et as parseKeyOwnerEvidence, l as fetchPortableGatewayKey, u as resolvePortableActorKey, x as verifyPortableObjectProof, zt as version } from "./http-CNBy-0kL.js";
4
4
  import { getLogger } from "@logtape/logtape";
5
5
  import { canonicalizePortableUri, formatIri, fromCompatibleEf61Id, getDocumentLoader, getFe34Origin, parseIri } from "@fedify/vocab-runtime";
6
6
  import { CollectionPage, CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
package/dist/sig/mod.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  const { URLPattern } = require("urlpattern-polyfill");
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const require_http = require("../http-C8mgPcy_.cjs");
4
- const require_portable_collection = require("../portable-collection-CNX6EjCB.cjs");
3
+ const require_http = require("../http-BFdGgNzO.cjs");
4
+ const require_portable_collection = require("../portable-collection-BxaQ34xU.cjs");
5
5
  exports.attachSignature = require_http.attachSignature;
6
6
  exports.createProof = require_http.createProof;
7
7
  exports.createSignature = require_http.createSignature;
package/dist/sig/mod.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Temporal } from "temporal-polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { F as hasSignatureLike, H as verifySignature, J as generateCryptoKeyPair, K as fetchKey, M as detachSignature, St as validateAcceptSignature, T as verifyProof, V as verifyJsonLd, W as exportJwk, Y as importJwk, _ as signObject, a as signRequest, bt as fulfillAcceptSignature, c as verifyRequestDetailed, h as hasProofLike, j as createSignature, k as attachSignature, p as createProof, q as fetchKeyDetailed, s as verifyRequest, x as verifyPortableObjectProof, xt as parseAcceptSignature, y as verifyObject, yt as formatAcceptSignature, z as signJsonLd } from "../http-DijuzWN6.js";
4
- import { n as doesActorOwnKey, r as getKeyOwner, t as verifyPortableObject } from "../portable-collection-9g5WxrvZ.js";
3
+ import { F as hasSignatureLike, H as verifySignature, J as generateCryptoKeyPair, K as fetchKey, M as detachSignature, St as validateAcceptSignature, T as verifyProof, V as verifyJsonLd, W as exportJwk, Y as importJwk, _ as signObject, a as signRequest, bt as fulfillAcceptSignature, c as verifyRequestDetailed, h as hasProofLike, j as createSignature, k as attachSignature, p as createProof, q as fetchKeyDetailed, s as verifyRequest, x as verifyPortableObjectProof, xt as parseAcceptSignature, y as verifyObject, yt as formatAcceptSignature, z as signJsonLd } from "../http-CNBy-0kL.js";
4
+ import { n as doesActorOwnKey, r as getKeyOwner, t as verifyPortableObject } from "../portable-collection-Bzk7-rqE.js";
5
5
  export { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getKeyOwner, hasProofLike, hasSignatureLike, importJwk, parseAcceptSignature, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
@@ -1,5 +1,5 @@
1
1
  const { URLPattern } = require("urlpattern-polyfill");
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const require_kv_cache = require("../kv-cache-jwVDpfVy.cjs");
3
+ const require_kv_cache = require("../kv-cache-tlRl7L1J.cjs");
4
4
  exports.getAuthenticatedDocumentLoader = require_kv_cache.getAuthenticatedDocumentLoader;
5
5
  exports.kvCache = require_kv_cache.kvCache;
package/dist/utils/mod.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import { Temporal } from "temporal-polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "../kv-cache-CHol17MD.js";
3
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "../kv-cache-BlWSvU1D.js";
4
4
  export { getAuthenticatedDocumentLoader, kvCache };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/fedify",
3
- "version": "2.5.0-dev.2739+50292f07",
3
+ "version": "2.5.0-dev.2750+3827839b",
4
4
  "description": "An ActivityPub server framework",
5
5
  "keywords": [
6
6
  "ActivityPub",
@@ -164,10 +164,10 @@
164
164
  "structured-field-values": "^2.0.4",
165
165
  "temporal-polyfill": "^1.0.1",
166
166
  "urlpattern-polyfill": "^10.1.0",
167
- "@fedify/vocab": "2.5.0-dev.2739+50292f07",
168
- "@fedify/uri-template": "2.5.0-dev.2739+50292f07",
169
- "@fedify/webfinger": "2.5.0-dev.2739+50292f07",
170
- "@fedify/vocab-runtime": "2.5.0-dev.2739+50292f07"
167
+ "@fedify/uri-template": "2.5.0-dev.2750+3827839b",
168
+ "@fedify/vocab": "2.5.0-dev.2750+3827839b",
169
+ "@fedify/vocab-runtime": "2.5.0-dev.2750+3827839b",
170
+ "@fedify/webfinger": "2.5.0-dev.2750+3827839b"
171
171
  },
172
172
  "devDependencies": {
173
173
  "@std/assert": "npm:@jsr/std__assert@^0.226.0",
@@ -179,7 +179,7 @@
179
179
  "typescript": "^6.0.3",
180
180
  "wrangler": "^4.17.0",
181
181
  "@fedify/fixture": "2.0.0",
182
- "@fedify/vocab-tools": "^2.5.0-dev.2739+50292f07"
182
+ "@fedify/vocab-tools": "^2.5.0-dev.2750+3827839b"
183
183
  },
184
184
  "scripts": {
185
185
  "build:self": "tsdown",
@@ -189,6 +189,6 @@
189
189
  "test": "cd dist-tests/ && node --test",
190
190
  "pretest:bun": "pnpm build",
191
191
  "test:bun": "cd dist-tests/ && bun test --timeout 60000",
192
- "test:cfworkers": "deno task codegen && wrangler deploy --dry-run --outdir src/cfworkers && node --import=tsx scripts/check_cfworkers.ts && node --import=tsx src/cfworkers/client.ts"
192
+ "test:cfworkers": "node --experimental-strip-types ../vocab/scripts/codegen.ts && wrangler deploy --dry-run --outdir src/cfworkers && node --import=tsx scripts/check_cfworkers.ts && node --import=tsx src/cfworkers/client.ts"
193
193
  }
194
194
  }
@@ -20,7 +20,7 @@ Fedify skill
20
20
  ============
21
21
 
22
22
  Fedify is a TypeScript library for ActivityPub server applications. It
23
- works across Deno, Node.js, and Bun. The library takes care of the fiddly
23
+ works across Node.js, Bun, and Deno. The library takes care of the fiddly
24
24
  parts of the fediverse (HTTP Signatures, Object Integrity Proofs,
25
25
  WebFinger, NodeInfo, JSON-LD, delivery queues) so application code can
26
26
  stay focused on dispatchers and activity handlers.
@@ -477,6 +477,20 @@ its internals. For trace persistence, `@fedify/fedify/otel` exports
477
477
  `FedifySpanExporter`, which writes traces to a `KvStore` so the
478
478
  *@fedify/debugger* dashboard can render them.
479
479
 
480
+ On Cloudflare Workers, use `SimpleSpanProcessor` and configure the exporter's
481
+ `waitUntil` option (since 2.5.0) with a request-aware callback, or create the
482
+ exporter per request with `ctx.waitUntil.bind(ctx)`. A shared exporter must
483
+ not retain one request's execution context. In a `finally` block around
484
+ `await federation.fetch()`, pass `tracerProvider.forceFlush()` to
485
+ `ctx.waitUntil()` so the flush is scheduled on both success and failure.
486
+ With `SimpleSpanProcessor`, this also covers pending asynchronous resource
487
+ attributes. In `@opentelemetry/sdk-trace-base` 2.7.1, a batch already waiting
488
+ for resource attributes can be missed by a later provider flush, so do not rely
489
+ on that flush with `BatchSpanProcessor`. Batch timers alone do not keep an
490
+ invocation alive. The exporter's `forceFlush()` and `shutdown()` wait for
491
+ export attempts already started; storage failures are logged and reported
492
+ through the export callback.
493
+
480
494
  > [!CAUTION]
481
495
  > Initialize the OpenTelemetry SDK *before* importing Fedify. Later
482
496
  > registration leaves earlier spans untraced.