cdk-real-drift 0.9.10 → 0.9.11
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/cli.js +25 -7
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -15313,6 +15313,26 @@ async function revertStack(p) {
|
|
|
15313
15313
|
out(style.note(` ↻ ${displayId}: ${reason} — retry ${attempt} (next in ${secs}s)…`));
|
|
15314
15314
|
}
|
|
15315
15315
|
});
|
|
15316
|
+
const itemsPerLogical = /* @__PURE__ */ new Map();
|
|
15317
|
+
for (const item of plan.items) itemsPerLogical.set(item.logicalId, (itemsPerLogical.get(item.logicalId) ?? 0) + 1);
|
|
15318
|
+
const streamedLogical = /* @__PURE__ */ new Set();
|
|
15319
|
+
const streamResultLine = (logicalId) => {
|
|
15320
|
+
if (streamedLogical.has(logicalId)) return;
|
|
15321
|
+
const forResource = applied.filter((a) => a.logicalId === logicalId);
|
|
15322
|
+
if (forResource.length < (itemsPerLogical.get(logicalId) ?? 0)) return;
|
|
15323
|
+
streamedLogical.add(logicalId);
|
|
15324
|
+
for (const s of summarizeRevertResults(forResource)) printRevertResultLine(s);
|
|
15325
|
+
};
|
|
15326
|
+
const printRevertResultLine = (s) => {
|
|
15327
|
+
if (s.ok) out(style.ok(` reverted: ${s.displayId}`));
|
|
15328
|
+
else {
|
|
15329
|
+
out(style.fail(` FAILED: ${s.displayId} — ${s.error}`));
|
|
15330
|
+
if (s.hint) {
|
|
15331
|
+
const suffix = waitMs === void 0 ? " (or re-run with --wait to block until it settles)" : "";
|
|
15332
|
+
out(style.note(` ↳ ${s.hint}${suffix}`));
|
|
15333
|
+
}
|
|
15334
|
+
}
|
|
15335
|
+
};
|
|
15316
15336
|
const deleteItems = plan.items.filter((i) => i.kind === "delete");
|
|
15317
15337
|
for (const item of plan.items) {
|
|
15318
15338
|
if (item.kind === "delete") continue;
|
|
@@ -15353,6 +15373,7 @@ async function revertStack(p) {
|
|
|
15353
15373
|
});
|
|
15354
15374
|
if (!r.ok) worst = Math.max(worst, 2);
|
|
15355
15375
|
if (!r.ok) failedUpdateIds.add(item.logicalId);
|
|
15376
|
+
streamResultLine(item.logicalId);
|
|
15356
15377
|
}
|
|
15357
15378
|
const deleteDeadlineMs = waitMs !== void 0 ? clock() + waitMs : void 0;
|
|
15358
15379
|
const deleteOutcomes = await applyRevertDeletes(deleteItems, (item) => applyRevertDelete(cc, item, item.physicalId, buildRetryOpts(item.displayId, deleteDeadlineMs)));
|
|
@@ -15366,17 +15387,14 @@ async function revertStack(p) {
|
|
|
15366
15387
|
...r.hint !== void 0 && { hint: r.hint }
|
|
15367
15388
|
});
|
|
15368
15389
|
if (!r.ok) worst = Math.max(worst, 2);
|
|
15390
|
+
streamResultLine(item.logicalId);
|
|
15369
15391
|
}
|
|
15370
15392
|
const summarized = summarizeRevertResults(applied);
|
|
15371
15393
|
const revertedCount = summarized.filter((s) => s.ok).length;
|
|
15372
15394
|
const failedCount = summarized.filter((s) => !s.ok).length;
|
|
15373
|
-
for (const
|
|
15374
|
-
|
|
15375
|
-
|
|
15376
|
-
if (s.hint) {
|
|
15377
|
-
const suffix = waitMs === void 0 ? " (or re-run with --wait to block until it settles)" : "";
|
|
15378
|
-
out(style.note(` ↳ ${s.hint}${suffix}`));
|
|
15379
|
-
}
|
|
15395
|
+
for (const item of plan.items) {
|
|
15396
|
+
if (streamedLogical.has(item.logicalId)) continue;
|
|
15397
|
+
streamResultLine(item.logicalId);
|
|
15380
15398
|
}
|
|
15381
15399
|
const touched = new Set(plan.items.map((i) => i.logicalId));
|
|
15382
15400
|
out("\n" + style.note(`verifying convergence (re-reading ${touched.size} resource(s))...`));
|