@rmdes/indiekit-endpoint-rss 1.0.14 → 1.0.15
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 +9 -1
- package/package.json +2 -1
package/index.js
CHANGED
|
@@ -7,6 +7,7 @@ import { feedsController } from "./lib/controllers/feeds.js";
|
|
|
7
7
|
import { itemsController } from "./lib/controllers/items.js";
|
|
8
8
|
import { statusController } from "./lib/controllers/status.js";
|
|
9
9
|
import { startSync } 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
|
|
|
@@ -110,7 +111,14 @@ export default class RssEndpoint {
|
|
|
110
111
|
|
|
111
112
|
// Start background sync if database is available
|
|
112
113
|
if (Indiekit.config.application.mongodbUrl) {
|
|
113
|
-
|
|
114
|
+
this._stopGate = waitForReady(
|
|
115
|
+
() => startSync(Indiekit, this.options),
|
|
116
|
+
{ label: "RSS" },
|
|
117
|
+
);
|
|
114
118
|
}
|
|
115
119
|
}
|
|
120
|
+
|
|
121
|
+
destroy() {
|
|
122
|
+
this._stopGate?.();
|
|
123
|
+
}
|
|
116
124
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rmdes/indiekit-endpoint-rss",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"description": "RSS feed reader endpoint for Indiekit. Aggregates multiple feeds, caches in MongoDB, displays on frontend.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"indiekit",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"index.js"
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
|
+
"@rmdes/indiekit-startup-gate": "^1.0.0",
|
|
44
45
|
"@indiekit/error": "^1.0.0-beta.25",
|
|
45
46
|
"express": "^5.0.0",
|
|
46
47
|
"rss-parser": "^3.13.0",
|