@rmdes/indiekit-endpoint-webmention-io 1.0.7 → 1.0.8
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/index.js +6 -1
- package/package.json +2 -1
package/index.js
CHANGED
|
@@ -7,6 +7,7 @@ import { blocklistController } from "./lib/controllers/blocklist.js";
|
|
|
7
7
|
import { syncController } from "./lib/controllers/sync-controller.js";
|
|
8
8
|
import { apiController } from "./lib/controllers/api.js";
|
|
9
9
|
import { startSync, stopSync } from "./lib/sync.js";
|
|
10
|
+
import { waitForReady } from "@rmdes/indiekit-startup-gate";
|
|
10
11
|
|
|
11
12
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
12
13
|
|
|
@@ -103,11 +104,15 @@ export default class WebmentionEndpoint {
|
|
|
103
104
|
|
|
104
105
|
// Start background sync if database is available
|
|
105
106
|
if (Indiekit.config.application.mongodbUrl) {
|
|
106
|
-
|
|
107
|
+
this._stopGate = waitForReady(
|
|
108
|
+
() => startSync(Indiekit, this.options),
|
|
109
|
+
{ label: "Webmention.io" },
|
|
110
|
+
);
|
|
107
111
|
}
|
|
108
112
|
}
|
|
109
113
|
|
|
110
114
|
destroy() {
|
|
115
|
+
this._stopGate?.();
|
|
111
116
|
stopSync();
|
|
112
117
|
}
|
|
113
118
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rmdes/indiekit-endpoint-webmention-io",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "Webmention moderation endpoint for Indiekit. Syncs webmentions from webmention.io into MongoDB with delete, block, and privacy removal capabilities.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"indiekit",
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"index.js"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
+
"@rmdes/indiekit-startup-gate": "^1.0.0",
|
|
40
41
|
"@indiekit/error": "^1.0.0-beta.25",
|
|
41
42
|
"@indiekit/frontend": "^1.0.0-beta.25",
|
|
42
43
|
"express": "^5.0.0",
|