@dvmkit/dvm-cli 0.14.0 → 0.15.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.
- package/dist/{chunk-CO2TD5RO.js → chunk-5SHB3MZ7.js} +16 -4
- package/dist/{chunk-DU7YCGCQ.js → chunk-BFYZO3BV.js} +2643 -2281
- package/dist/{client-DC7TVYNU.js → client-YIHI4AIC.js} +1 -1
- package/dist/dvm.js +553 -237
- package/dist/{pocket-refill-HEVLAMKN.js → pocket-refill-KA37CF4N.js} +2 -2
- package/package.json +3 -1
- package/skills/dvm/calling.md +1 -1
- package/skills/dvm/credit.md +3 -1
- package/skills/dvm/recovery.md +50 -0
|
@@ -42,13 +42,25 @@ var warnings = new AsyncLocalStorage();
|
|
|
42
42
|
function withOutputWarnings(run) {
|
|
43
43
|
return warnings.run([], run);
|
|
44
44
|
}
|
|
45
|
+
function sameWarning(prior, entry) {
|
|
46
|
+
if (prior.code === "auto_pay_bound_exceeded" && entry.code === "auto_pay_bound_exceeded") {
|
|
47
|
+
return prior.auto_pay_below === entry.auto_pay_below && prior.source === entry.source;
|
|
48
|
+
}
|
|
49
|
+
if (prior.code === "draw_funding_unverified" && entry.code === "draw_funding_unverified") {
|
|
50
|
+
return prior.job_id === entry.job_id && prior.reason === entry.reason && prior.display === entry.display;
|
|
51
|
+
}
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
45
54
|
function addOutputWarnings(entries, human) {
|
|
46
55
|
const pending = warnings.getStore();
|
|
56
|
+
const added = [];
|
|
47
57
|
for (const entry of entries) {
|
|
48
|
-
if (pending?.some((prior) => prior
|
|
58
|
+
if (pending?.some((prior) => sameWarning(prior, entry))) continue;
|
|
49
59
|
pending?.push(entry);
|
|
60
|
+
added.push(entry);
|
|
50
61
|
if (human) info(`Warning: ${entry.display}`);
|
|
51
62
|
}
|
|
63
|
+
return added;
|
|
52
64
|
}
|
|
53
65
|
var _traceId = null;
|
|
54
66
|
function setOutputTraceId(id) {
|
|
@@ -415,6 +427,9 @@ export {
|
|
|
415
427
|
info,
|
|
416
428
|
raw,
|
|
417
429
|
progress,
|
|
430
|
+
resolveBtcUsdRate,
|
|
431
|
+
tryResolveBtcUsdRate,
|
|
432
|
+
staleRateNotice,
|
|
418
433
|
formatSats,
|
|
419
434
|
formatAmount,
|
|
420
435
|
formatPaymentAmount,
|
|
@@ -423,8 +438,5 @@ export {
|
|
|
423
438
|
parseBudget,
|
|
424
439
|
assertValidBudget,
|
|
425
440
|
formatAmountBestEffort,
|
|
426
|
-
resolveBtcUsdRate,
|
|
427
|
-
tryResolveBtcUsdRate,
|
|
428
|
-
staleRateNotice,
|
|
429
441
|
tryX402Payment
|
|
430
442
|
};
|