repowise 0.1.76 → 0.1.78
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/dist/bin/repowise.js +24 -11
- package/package.json +1 -1
package/dist/bin/repowise.js
CHANGED
|
@@ -2420,22 +2420,29 @@ async function create() {
|
|
|
2420
2420
|
syncId = triggerResult.syncId;
|
|
2421
2421
|
} catch (triggerErr) {
|
|
2422
2422
|
const msg = triggerErr instanceof Error ? triggerErr.message : "";
|
|
2423
|
-
if (!msg.toLowerCase().includes("already running")) {
|
|
2423
|
+
if (!msg.toLowerCase().includes("already running") && !msg.toLowerCase().includes("already in progress")) {
|
|
2424
2424
|
throw triggerErr;
|
|
2425
2425
|
}
|
|
2426
2426
|
spinner.text = "Resuming existing pipeline...";
|
|
2427
2427
|
const syncs = await apiRequest(
|
|
2428
|
-
`/v1/repos/${repoId}/syncs?limit=
|
|
2428
|
+
`/v1/repos/${repoId}/syncs?limit=10`
|
|
2429
2429
|
);
|
|
2430
2430
|
const active = syncs.items.find(
|
|
2431
2431
|
(s) => s.status === "in_progress" || s.status === "awaiting_input"
|
|
2432
2432
|
);
|
|
2433
2433
|
if (!active) {
|
|
2434
|
-
|
|
2434
|
+
spinner.text = "Retrying...";
|
|
2435
|
+
const endpoint = useFreeRescan ? `/v1/repos/${repoId}/full-rescan` : `/v1/repos/${repoId}/sync`;
|
|
2436
|
+
const retryResult = await apiRequest(endpoint, {
|
|
2437
|
+
method: "POST",
|
|
2438
|
+
body: useFreeRescan ? void 0 : JSON.stringify({ scanType: "full", contextStorage })
|
|
2439
|
+
});
|
|
2440
|
+
syncId = retryResult.syncId;
|
|
2441
|
+
} else {
|
|
2442
|
+
syncId = active.syncId;
|
|
2443
|
+
spinner.info(chalk5.cyan("Resuming existing pipeline..."));
|
|
2444
|
+
spinner.start();
|
|
2435
2445
|
}
|
|
2436
|
-
syncId = active.syncId;
|
|
2437
|
-
spinner.info(chalk5.cyan("Resuming existing pipeline..."));
|
|
2438
|
-
spinner.start();
|
|
2439
2446
|
}
|
|
2440
2447
|
let pollAttempts = 0;
|
|
2441
2448
|
let pollErrors = 0;
|
|
@@ -2865,17 +2872,23 @@ async function sync() {
|
|
|
2865
2872
|
}
|
|
2866
2873
|
spinner.text = "Resuming existing sync...";
|
|
2867
2874
|
const syncs = await apiRequest(
|
|
2868
|
-
`/v1/repos/${repoId}/syncs?limit=
|
|
2875
|
+
`/v1/repos/${repoId}/syncs?limit=10`
|
|
2869
2876
|
);
|
|
2870
2877
|
const active = syncs.items.find(
|
|
2871
2878
|
(s) => s.status === "in_progress" || s.status === "awaiting_input"
|
|
2872
2879
|
);
|
|
2873
2880
|
if (!active) {
|
|
2874
|
-
|
|
2881
|
+
spinner.text = "Retrying...";
|
|
2882
|
+
const retryResult = await apiRequest(`/v1/repos/${repoId}/sync`, {
|
|
2883
|
+
method: "POST",
|
|
2884
|
+
body: JSON.stringify({ scanType: "incremental" })
|
|
2885
|
+
});
|
|
2886
|
+
syncId = retryResult.syncId;
|
|
2887
|
+
} else {
|
|
2888
|
+
syncId = active.syncId;
|
|
2889
|
+
spinner.info(chalk8.cyan("Resuming existing sync..."));
|
|
2890
|
+
spinner.start();
|
|
2875
2891
|
}
|
|
2876
|
-
syncId = active.syncId;
|
|
2877
|
-
spinner.info(chalk8.cyan("Resuming existing sync..."));
|
|
2878
|
-
spinner.start();
|
|
2879
2892
|
}
|
|
2880
2893
|
let pollAttempts = 0;
|
|
2881
2894
|
const progressRenderer = new ProgressRenderer();
|