@apilift/cli 1.9.0 → 1.9.1
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.
|
@@ -173559,6 +173559,8 @@ async function deliverPending(ledger, state, site, fetcher = fetch, now = Date.n
|
|
|
173559
173559
|
const result = await createCliApi(site, transport, installation.token).call("postMeasurements", { body: { executions, baselines: baselinePayloads } });
|
|
173560
173560
|
if (!stillLinked(state, installation)) return;
|
|
173561
173561
|
const acknowledged = new Map(result.results.map((item) => [item.id, item]));
|
|
173562
|
+
const missingReportCutoff = new Date(now - 7 * 864e5).toISOString();
|
|
173563
|
+
const pendingReport = state.db.prepare("SELECT 1 FROM pending_execution_report WHERE installation_id=? AND id=?");
|
|
173562
173564
|
for (const row of rows) {
|
|
173563
173565
|
const item = acknowledged.get(row.id);
|
|
173564
173566
|
if (!item || item.revision !== row.revision) continue;
|
|
@@ -173566,7 +173568,9 @@ async function deliverPending(ledger, state, site, fetcher = fetch, now = Date.n
|
|
|
173566
173568
|
ledger.db.prepare("UPDATE invocation SET next_attempt_at=? WHERE id=? AND revision=?").run(now + 6e4, row.id, row.revision);
|
|
173567
173569
|
continue;
|
|
173568
173570
|
}
|
|
173569
|
-
|
|
173571
|
+
const orphaned = item.status === "pending" && item.code === "report-missing" && row.finished_at < missingReportCutoff && row.execution_id !== null && !pendingReport.get(installation.id, row.execution_id);
|
|
173572
|
+
const status = orphaned ? "rejected" : item.status;
|
|
173573
|
+
if (status === "accepted" || status === "duplicate" || status === "rejected") ledger.db.prepare("UPDATE invocation SET status=? WHERE id=? AND revision=?").run(status, row.id, row.revision);
|
|
173570
173574
|
else ledger.db.prepare("UPDATE invocation SET attempts=attempts+1,next_attempt_at=? WHERE id=? AND revision=?").run(now + Math.min(3600, 2 ** Math.min(20, row.attempts + 1)) * 1e3, row.id, row.revision);
|
|
173571
173575
|
}
|
|
173572
173576
|
for (const row of baselineRows) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apilift/cli",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"engines": {
|
|
38
38
|
"node": ">=24.16.0 <27"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "e48099c81498800a157051b14263c3adc87123ee",
|
|
41
41
|
"repository": {
|
|
42
42
|
"type": "git",
|
|
43
43
|
"url": "git+https://github.com/egor-sergeev/apilift.git",
|