@rmdes/indiekit-endpoint-activitypub 1.0.6 → 1.0.7

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.
@@ -16,6 +16,7 @@ import {
16
16
  createFederation,
17
17
  importSpki,
18
18
  } from "@fedify/fedify";
19
+ import { configure, getConsoleSink, getLogger } from "@logtape/logtape";
19
20
  import { MongoKvStore } from "./kv-store.js";
20
21
  import { registerInboxListeners } from "./inbox-listeners.js";
21
22
 
@@ -29,6 +30,9 @@ import { registerInboxListeners } from "./inbox-listeners.js";
29
30
  * @param {boolean} options.storeRawActivities - Whether to store full raw JSON
30
31
  * @returns {{ federation: import("@fedify/fedify").Federation }}
31
32
  */
33
+ // Track whether LogTape has been configured (can only call configure() once)
34
+ let _logtapeConfigured = false;
35
+
32
36
  export function setupFederation(options) {
33
37
  const {
34
38
  collections,
@@ -37,6 +41,26 @@ export function setupFederation(options) {
37
41
  storeRawActivities = false,
38
42
  } = options;
39
43
 
44
+ // Configure LogTape for Fedify delivery logging (once per process)
45
+ if (!_logtapeConfigured) {
46
+ _logtapeConfigured = true;
47
+ configure({
48
+ sinks: {
49
+ console: getConsoleSink(),
50
+ },
51
+ loggers: [
52
+ {
53
+ // All Fedify logs — federation, vocab, delivery, HTTP signatures
54
+ category: ["fedify"],
55
+ sinks: ["console"],
56
+ lowestLevel: "info",
57
+ },
58
+ ],
59
+ }).catch((error) => {
60
+ console.warn("[ActivityPub] LogTape configure failed:", error.message);
61
+ });
62
+ }
63
+
40
64
  const federation = createFederation({
41
65
  kv: new MongoKvStore(collections.ap_kv),
42
66
  queue: new InProcessMessageQueue(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rmdes/indiekit-endpoint-activitypub",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "ActivityPub federation endpoint for Indiekit via Fedify. Adds full fediverse support: actor, inbox, outbox, followers, following, syndication, and Mastodon migration.",
5
5
  "keywords": [
6
6
  "indiekit",