feat: migrate to Fedify 2.0 with debug dashboard and modular imports

- Upgrade @fedify/fedify, @fedify/redis to ^2.0.0
- Add @fedify/debugger ^2.0.0 for live federation traffic dashboard
- Move all vocab type imports to @fedify/fedify/vocab (13 files)
- Move crypto imports (exportJwk, importJwk, generateCryptoKeyPair) to @fedify/fedify/sig
- Replace removed importSpki() with local Web Crypto API helper
- Add KvStore.list() async generator required by Fedify 2.0
- Add setOutboxPermanentFailureHandler for delivery failure logging
- Add debugDashboard/debugPassword config options
- Skip manual LogTape configure when debugger auto-configures it
- Fix Express-Fedify bridge to reconstruct body from req.body when
  Express body parser has already consumed the stream (fixes debug
  dashboard login TypeError)
- Add response.bodyUsed safety check in sendFedifyResponse
- Remove @fedify/express dependency (custom bridge handles sub-path mounting)
This commit is contained in:
Ricardo
2026-02-22 14:28:31 +01:00
parent 5c5e53bf3d
commit dd9bba711f
16 changed files with 2258 additions and 133 deletions

View File

@@ -86,6 +86,8 @@ const defaults = {
logLevel: "warning",
timelineRetention: 1000,
notificationRetentionDays: 30,
debugDashboard: false,
debugPassword: "",
};
export default class ActivityPubEndpoint {
@@ -505,7 +507,7 @@ export default class ActivityPubEndpoint {
}
try {
const { Follow } = await import("@fedify/fedify");
const { Follow } = await import("@fedify/fedify/vocab");
const handle = this.options.actor.handle;
const ctx = this._federation.createContext(
new URL(this._publicationUrl),
@@ -607,7 +609,7 @@ export default class ActivityPubEndpoint {
}
try {
const { Follow, Undo } = await import("@fedify/fedify");
const { Follow, Undo } = await import("@fedify/fedify/vocab");
const handle = this.options.actor.handle;
const ctx = this._federation.createContext(
new URL(this._publicationUrl),
@@ -692,7 +694,7 @@ export default class ActivityPubEndpoint {
if (!this._federation) return;
try {
const { Update } = await import("@fedify/fedify");
const { Update } = await import("@fedify/fedify/vocab");
const handle = this.options.actor.handle;
const ctx = this._federation.createContext(
new URL(this._publicationUrl),
@@ -967,6 +969,8 @@ export default class ActivityPubEndpoint {
parallelWorkers: this.options.parallelWorkers,
actorType: this.options.actorType,
logLevel: this.options.logLevel,
debugDashboard: this.options.debugDashboard,
debugPassword: this.options.debugPassword,
});
this._federation = federation;