@wahooks/channel 2.1.0 → 2.1.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/daemon.js +2 -1
- package/dist/index.js +2 -1
- package/package.json +1 -1
package/dist/daemon.js
CHANGED
|
@@ -109,7 +109,8 @@ function checkReminders(parseExpression) {
|
|
|
109
109
|
}
|
|
110
110
|
async function main() {
|
|
111
111
|
fs.mkdirSync(WAHOOKS_DIR, { recursive: true });
|
|
112
|
-
const
|
|
112
|
+
const cronParser = await import("cron-parser");
|
|
113
|
+
const parseExpression = cronParser.default?.parseExpression ?? cronParser.parseExpression;
|
|
113
114
|
console.log(`[reminders] Daemon started — checking every ${CHECK_INTERVAL / 1000}s`);
|
|
114
115
|
checkReminders(parseExpression);
|
|
115
116
|
setInterval(() => checkReminders(parseExpression), CHECK_INTERVAL);
|
package/dist/index.js
CHANGED
|
@@ -537,7 +537,8 @@ mcp.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
|
537
537
|
// Calculate next run
|
|
538
538
|
let nextRunAt;
|
|
539
539
|
try {
|
|
540
|
-
const
|
|
540
|
+
const cronParser = await import("cron-parser");
|
|
541
|
+
const parseExpression = cronParser.default?.parseExpression ?? cronParser.parseExpression;
|
|
541
542
|
const interval = parseExpression(args.schedule);
|
|
542
543
|
nextRunAt = interval.next().toDate().toISOString();
|
|
543
544
|
}
|