@rmdes/indiekit-endpoint-blogroll 1.0.23 → 1.0.24
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 { blogsController } from "./lib/controllers/blogs.js";
|
|
|
7
7
|
import { sourcesController } from "./lib/controllers/sources.js";
|
|
8
8
|
import { apiController } from "./lib/controllers/api.js";
|
|
9
9
|
import { startSync, stopSync } from "./lib/sync/scheduler.js";
|
|
10
|
+
import { waitForReady } from "@rmdes/indiekit-startup-gate";
|
|
10
11
|
|
|
11
12
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
12
13
|
|
|
@@ -142,11 +143,15 @@ export default class BlogrollEndpoint {
|
|
|
142
143
|
|
|
143
144
|
// Start background sync if database is available
|
|
144
145
|
if (Indiekit.config.application.mongodbUrl) {
|
|
145
|
-
|
|
146
|
+
this._stopGate = waitForReady(
|
|
147
|
+
() => startSync(Indiekit, this.options),
|
|
148
|
+
{ label: "Blogroll" },
|
|
149
|
+
);
|
|
146
150
|
}
|
|
147
151
|
}
|
|
148
152
|
|
|
149
153
|
destroy() {
|
|
154
|
+
this._stopGate?.();
|
|
150
155
|
stopSync();
|
|
151
156
|
}
|
|
152
157
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rmdes/indiekit-endpoint-blogroll",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.24",
|
|
4
4
|
"description": "Blogroll endpoint for Indiekit. Aggregates blog feeds from OPML, JSON feeds, or manual entry.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"indiekit",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"index.js"
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
|
+
"@rmdes/indiekit-startup-gate": "^1.0.0",
|
|
43
44
|
"@indiekit/error": "^1.0.0-beta.25",
|
|
44
45
|
"@indiekit/frontend": "^1.0.0-beta.25",
|
|
45
46
|
"express": "^5.0.0",
|