@wahooks/channel 2.1.0 → 2.1.2

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 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 { parseExpression } = await import("cron-parser");
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
@@ -533,11 +533,13 @@ mcp.setRequestHandler(CallToolRequestSchema, async (req) => {
533
533
  }
534
534
  case "wahooks_schedule_reminder": {
535
535
  const id = `rem_${Date.now().toString(36)}`;
536
- const oneTime = args.one_time === "true";
536
+ const rawOneTime = args.one_time;
537
+ const oneTime = rawOneTime === true || rawOneTime === "true";
537
538
  // Calculate next run
538
539
  let nextRunAt;
539
540
  try {
540
- const { parseExpression } = await import("cron-parser");
541
+ const cronParser = await import("cron-parser");
542
+ const parseExpression = cronParser.default?.parseExpression ?? cronParser.parseExpression;
541
543
  const interval = parseExpression(args.schedule);
542
544
  nextRunAt = interval.next().toDate().toISOString();
543
545
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wahooks/channel",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "WhatsApp channel for Claude Code — chat with Claude via WhatsApp",
5
5
  "type": "module",
6
6
  "bin": {