claude-task-worker 0.26.0 → 0.26.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/index.js +6 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1665,9 +1665,14 @@ function jstFields(date) {
|
|
|
1665
1665
|
const pick2 = (type) => parts.find((p) => p.type === type)?.value ?? "";
|
|
1666
1666
|
return { month: pick2("month"), day: pick2("day"), hour: pick2("hour"), minute: pick2("minute") };
|
|
1667
1667
|
}
|
|
1668
|
+
var MINUTE_MS = 6e4;
|
|
1669
|
+
function ceilToMinute(date) {
|
|
1670
|
+
const remainder = date.getTime() % MINUTE_MS;
|
|
1671
|
+
return remainder === 0 ? date : new Date(date.getTime() + (MINUTE_MS - remainder));
|
|
1672
|
+
}
|
|
1668
1673
|
function parseResetsAt(isoString) {
|
|
1669
1674
|
const date = new Date(isoString);
|
|
1670
|
-
return Number.isNaN(date.getTime()) ? null : date;
|
|
1675
|
+
return Number.isNaN(date.getTime()) ? null : ceilToMinute(date);
|
|
1671
1676
|
}
|
|
1672
1677
|
function resetStamp(isoString, now = /* @__PURE__ */ new Date()) {
|
|
1673
1678
|
const date = parseResetsAt(isoString);
|