@rmdes/indiekit-endpoint-github 1.2.5 → 1.2.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.
- package/index.js +18 -7
- package/package.json +2 -1
package/index.js
CHANGED
|
@@ -2,6 +2,8 @@ import express from "express";
|
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
|
|
5
|
+
import { waitForReady } from "@rmdes/indiekit-startup-gate";
|
|
6
|
+
|
|
5
7
|
import { activityController } from "./lib/controllers/activity.js";
|
|
6
8
|
import { changelogController } from "./lib/controllers/changelog.js";
|
|
7
9
|
import { commitsController } from "./lib/controllers/commits.js";
|
|
@@ -115,13 +117,22 @@ export default class GitHubEndpoint {
|
|
|
115
117
|
|
|
116
118
|
// Start background sync for starred repos (if token + DB available)
|
|
117
119
|
if (this.options.token && Indiekit.database) {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
120
|
+
this._stopGate = waitForReady(
|
|
121
|
+
() => {
|
|
122
|
+
import("./lib/starred-sync.js")
|
|
123
|
+
.then(({ startStarredSync }) => {
|
|
124
|
+
startStarredSync(Indiekit, this.options);
|
|
125
|
+
})
|
|
126
|
+
.catch((error) => {
|
|
127
|
+
console.error("[GitHub Stars] Sync scheduler failed to start:", error.message);
|
|
128
|
+
});
|
|
129
|
+
},
|
|
130
|
+
{ label: "GitHub" },
|
|
131
|
+
);
|
|
125
132
|
}
|
|
126
133
|
}
|
|
134
|
+
|
|
135
|
+
destroy() {
|
|
136
|
+
this._stopGate?.();
|
|
137
|
+
}
|
|
127
138
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rmdes/indiekit-endpoint-github",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.7",
|
|
4
4
|
"description": "GitHub activity endpoint for Indiekit. Display commits, stars, contributions, and featured repositories.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"indiekit",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@indiekit/error": "^1.0.0-beta.25",
|
|
43
|
+
"@rmdes/indiekit-startup-gate": "^1.0.0",
|
|
43
44
|
"express": "^5.0.0"
|
|
44
45
|
},
|
|
45
46
|
"peerDependencies": {
|