@rmdes/indiekit-endpoint-github 1.2.2 → 1.2.3

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.
@@ -13,6 +13,7 @@ import {
13
13
  runIncrementalSync,
14
14
  runFullSync,
15
15
  getStarredSyncStatus,
16
+ syncListsManual,
16
17
  } from "../starred-sync.js";
17
18
 
18
19
  export const starredController = {
@@ -104,9 +105,11 @@ export const starredController = {
104
105
 
105
106
  // Run sync in background, respond immediately
106
107
  const syncFn = isFull ? runFullSync : runIncrementalSync;
107
- syncFn(db, config).catch((err) => {
108
- console.error("[GitHub Stars] Manual sync error:", err.message);
109
- });
108
+ syncFn(db, config)
109
+ .then(() => syncListsManual(db, config))
110
+ .catch((err) => {
111
+ console.error("[GitHub Stars] Manual sync error:", err.message);
112
+ });
110
113
 
111
114
  response.json({
112
115
  message: `${isFull ? "Full" : "Incremental"} sync started`,
@@ -41,6 +41,10 @@ export function getStarredSyncStatus() {
41
41
  * @param {import("mongodb").Db} db
42
42
  * @param {object} options - Plugin options (needs token)
43
43
  */
44
+ export async function syncListsManual(db, options) {
45
+ return syncLists(db, options);
46
+ }
47
+
44
48
  async function syncLists(db, options) {
45
49
  try {
46
50
  const lists = await fetchAllLists(options.token);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rmdes/indiekit-endpoint-github",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "GitHub activity endpoint for Indiekit. Display commits, stars, contributions, and featured repositories.",
5
5
  "keywords": [
6
6
  "indiekit",