@cronwatch/sdk 0.9.0 → 0.11.0

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.
Files changed (86) hide show
  1. package/README.md +4 -4
  2. package/dist/anthropic.d.cts +1 -1
  3. package/dist/anthropic.d.ts +1 -1
  4. package/dist/bugsnag.d.cts +1 -1
  5. package/dist/bugsnag.d.ts +1 -1
  6. package/dist/{client-D35cfnNV.d.cts → client-CRMfhylq.d.cts} +129 -37
  7. package/dist/{client-CQm-8-mR.d.ts → client-D2Xk2600.d.ts} +129 -37
  8. package/dist/d1.cjs +29 -11
  9. package/dist/d1.cjs.map +1 -1
  10. package/dist/d1.d.cts +1 -1
  11. package/dist/d1.d.ts +1 -1
  12. package/dist/d1.js +29 -11
  13. package/dist/d1.js.map +1 -1
  14. package/dist/datadog.d.cts +1 -1
  15. package/dist/datadog.d.ts +1 -1
  16. package/dist/discord.cjs +25 -4
  17. package/dist/discord.cjs.map +1 -1
  18. package/dist/discord.d.cts +20 -4
  19. package/dist/discord.d.ts +20 -4
  20. package/dist/discord.js +22 -3
  21. package/dist/discord.js.map +1 -1
  22. package/dist/{email-BxCp9RQV.d.ts → email-BWuUiCkw.d.ts} +1 -1
  23. package/dist/{email-D1d5niMy.d.cts → email-Dcqe3k8n.d.cts} +1 -1
  24. package/dist/honeybadger.d.cts +1 -1
  25. package/dist/honeybadger.d.ts +1 -1
  26. package/dist/index.cjs +380 -123
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.d.cts +15 -9
  29. package/dist/index.d.ts +15 -9
  30. package/dist/index.js +379 -124
  31. package/dist/index.js.map +1 -1
  32. package/dist/mailgun.d.cts +2 -2
  33. package/dist/mailgun.d.ts +2 -2
  34. package/dist/newrelic.d.cts +1 -1
  35. package/dist/newrelic.d.ts +1 -1
  36. package/dist/pg-cron.cjs +19 -8
  37. package/dist/pg-cron.cjs.map +1 -1
  38. package/dist/pg-cron.d.cts +15 -12
  39. package/dist/pg-cron.d.ts +15 -12
  40. package/dist/pg-cron.js +16 -5
  41. package/dist/pg-cron.js.map +1 -1
  42. package/dist/postgres.cjs +28 -10
  43. package/dist/postgres.cjs.map +1 -1
  44. package/dist/postgres.d.cts +1 -1
  45. package/dist/postgres.d.ts +1 -1
  46. package/dist/postgres.js +28 -10
  47. package/dist/postgres.js.map +1 -1
  48. package/dist/postmark.d.cts +2 -2
  49. package/dist/postmark.d.ts +2 -2
  50. package/dist/resend.d.cts +2 -2
  51. package/dist/resend.d.ts +2 -2
  52. package/dist/rollbar.d.cts +1 -1
  53. package/dist/rollbar.d.ts +1 -1
  54. package/dist/sendgrid.d.cts +2 -2
  55. package/dist/sendgrid.d.ts +2 -2
  56. package/dist/sentry.cjs +4 -1
  57. package/dist/sentry.cjs.map +1 -1
  58. package/dist/sentry.d.cts +5 -2
  59. package/dist/sentry.d.ts +5 -2
  60. package/dist/sentry.js +4 -1
  61. package/dist/sentry.js.map +1 -1
  62. package/dist/ses.d.cts +2 -2
  63. package/dist/ses.d.ts +2 -2
  64. package/dist/slack.d.cts +1 -1
  65. package/dist/slack.d.ts +1 -1
  66. package/dist/sqlite.cjs +29 -11
  67. package/dist/sqlite.cjs.map +1 -1
  68. package/dist/sqlite.d.cts +1 -1
  69. package/dist/sqlite.d.ts +1 -1
  70. package/dist/sqlite.js +29 -11
  71. package/dist/sqlite.js.map +1 -1
  72. package/dist/twilio.cjs +10 -4
  73. package/dist/twilio.cjs.map +1 -1
  74. package/dist/twilio.d.cts +12 -7
  75. package/dist/twilio.d.ts +12 -7
  76. package/dist/twilio.js +7 -1
  77. package/dist/twilio.js.map +1 -1
  78. package/dist/{types-Cz47Boks.d.cts → types-DLnlUie8.d.cts} +18 -2
  79. package/dist/{types-Cz47Boks.d.ts → types-DLnlUie8.d.ts} +18 -2
  80. package/dist/webhook.cjs +10 -5
  81. package/dist/webhook.cjs.map +1 -1
  82. package/dist/webhook.d.cts +18 -7
  83. package/dist/webhook.d.ts +18 -7
  84. package/dist/webhook.js +10 -6
  85. package/dist/webhook.js.map +1 -1
  86. package/package.json +1 -1
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
- import { C as CronWatchOptions, a as CronWatch } from './client-D35cfnNV.cjs';
2
- export { F as FetchHandler, H as HandlerFn, b as HandlerOptions, J as JobContext, c as JobFn, d as JobHandle, R as RecordRunOptions, e as Routes, f as RoutesOptions, g as RunHandle, h as RunOutcome, S as Source, i as SourceHost, j as StartOptions, k as consoleChannel, l as createRoutes, m as custom } from './client-D35cfnNV.cjs';
3
- import { S as Store, D as Duration, b as AlertDraft, c as StoredJobDefinition, A as Alert } from './types-Cz47Boks.cjs';
4
- export { a as AlertChannel, d as AlertDetails, e as AlertType, B as BudgetBreach, C as ChannelContext, f as CheckResult, g as Condition, E as ExpectRule, J as JobDefinition, h as JobHealth, i as JobOptions, j as JobState, k as JobSummary, R as Run, l as RunStatus, m as StoredJob, T as TriageContext, n as TriageFn } from './types-Cz47Boks.cjs';
1
+ import { C as CronwatchOptions, a as Cronwatch } from './client-CRMfhylq.cjs';
2
+ export { b as CronWatch, c as CronWatchOptions, F as FetchHandler, H as HandlerFn, d as HandlerOptions, J as JobContext, e as JobFn, f as JobHandle, R as RecordRunOptions, g as Routes, h as RoutesOptions, i as RunHandle, j as RunOutcome, S as Source, k as SourceHost, l as StartOptions, m as consoleChannel, n as createRoutes, o as custom } from './client-CRMfhylq.cjs';
3
+ import { S as Store, D as Duration, b as AlertDraft, c as StoredJobDefinition, A as Alert } from './types-DLnlUie8.cjs';
4
+ export { a as AlertChannel, d as AlertDetails, e as AlertType, B as BudgetBreach, C as ChannelContext, f as CheckResult, g as Condition, E as ExpectRule, h as JobDefinition, i as JobHealth, J as JobOptions, j as JobState, k as JobSummary, R as Run, l as RunStatus, m as SendingAlert, n as StoredJob, T as TriageContext, o as TriageFn } from './types-DLnlUie8.cjs';
5
5
 
6
6
  /**
7
7
  * Keeps everything in process memory. The default when no store is given,
@@ -10,6 +10,9 @@ export { a as AlertChannel, d as AlertDetails, e as AlertType, B as BudgetBreach
10
10
  */
11
11
  declare function memory(): Store;
12
12
 
13
+ /** This release of @cronwatch/sdk. scripts/release.mjs keeps it in step with package.json. */
14
+ declare const VERSION = "0.11.0";
15
+
13
16
  /**
14
17
  * "15m" -> 900000. Accepts a plain number of milliseconds, and compound
15
18
  * strings such as "1h30m". Whitespace between parts is fine.
@@ -28,9 +31,12 @@ interface ParsedSchedule {
28
31
  }
29
32
  /**
30
33
  * "0 2 * * *" (cron, five or six fields), "@hourly", or "every 5m".
31
- * Parsed once per (schedule, timezone) pair and cached. The croner instance
32
- * gets no callback, so it schedules nothing; it is only used to compute fire
33
- * times. Without a timezone the expression is read in the process timezone,
34
+ * Text with a colon after its first character, which croner would take for
35
+ * a one-time date, is refused. A cron that names a date no month has
36
+ * ("0 0 30 2 *") is read, and never fires: nothing is ever due, so it is
37
+ * never missed. Parsed once per (schedule, timezone) pair and cached. The
38
+ * croner instance gets no callback, so it schedules nothing; it is only used
39
+ * to compute fire times. Without a timezone the expression is read in the process timezone,
34
40
  * like crontab. Vercel and GitHub Actions run their crons in UTC, so pass
35
41
  * timezone: "UTC" for those.
36
42
  */
@@ -47,6 +53,6 @@ declare function composeAlert(draft: AlertDraft, def: StoredJobDefinition, now:
47
53
  * export const cw = cronwatch({ store: sqlite({ path: "./data/cronwatch.db" }), alerts: [slack({ webhookUrl })] });
48
54
  * export const nightly = cw.job("nightly-report", { schedule: "0 2 * * *", grace: "15m" });
49
55
  */
50
- declare function cronwatch(options?: CronWatchOptions): CronWatch;
56
+ declare function cronwatch(options?: CronwatchOptions): Cronwatch;
51
57
 
52
- export { Alert, AlertDraft, CronWatch, CronWatchOptions, Duration, type ParsedSchedule, Store, StoredJobDefinition, composeAlert, cronwatch, formatDuration, memory, nextFire, parseDuration, parseSchedule };
58
+ export { Alert, AlertDraft, Cronwatch, CronwatchOptions, Duration, type ParsedSchedule, Store, StoredJobDefinition, VERSION, composeAlert, cronwatch, formatDuration, memory, nextFire, parseDuration, parseSchedule };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { C as CronWatchOptions, a as CronWatch } from './client-CQm-8-mR.js';
2
- export { F as FetchHandler, H as HandlerFn, b as HandlerOptions, J as JobContext, c as JobFn, d as JobHandle, R as RecordRunOptions, e as Routes, f as RoutesOptions, g as RunHandle, h as RunOutcome, S as Source, i as SourceHost, j as StartOptions, k as consoleChannel, l as createRoutes, m as custom } from './client-CQm-8-mR.js';
3
- import { S as Store, D as Duration, b as AlertDraft, c as StoredJobDefinition, A as Alert } from './types-Cz47Boks.js';
4
- export { a as AlertChannel, d as AlertDetails, e as AlertType, B as BudgetBreach, C as ChannelContext, f as CheckResult, g as Condition, E as ExpectRule, J as JobDefinition, h as JobHealth, i as JobOptions, j as JobState, k as JobSummary, R as Run, l as RunStatus, m as StoredJob, T as TriageContext, n as TriageFn } from './types-Cz47Boks.js';
1
+ import { C as CronwatchOptions, a as Cronwatch } from './client-D2Xk2600.js';
2
+ export { b as CronWatch, c as CronWatchOptions, F as FetchHandler, H as HandlerFn, d as HandlerOptions, J as JobContext, e as JobFn, f as JobHandle, R as RecordRunOptions, g as Routes, h as RoutesOptions, i as RunHandle, j as RunOutcome, S as Source, k as SourceHost, l as StartOptions, m as consoleChannel, n as createRoutes, o as custom } from './client-D2Xk2600.js';
3
+ import { S as Store, D as Duration, b as AlertDraft, c as StoredJobDefinition, A as Alert } from './types-DLnlUie8.js';
4
+ export { a as AlertChannel, d as AlertDetails, e as AlertType, B as BudgetBreach, C as ChannelContext, f as CheckResult, g as Condition, E as ExpectRule, h as JobDefinition, i as JobHealth, J as JobOptions, j as JobState, k as JobSummary, R as Run, l as RunStatus, m as SendingAlert, n as StoredJob, T as TriageContext, o as TriageFn } from './types-DLnlUie8.js';
5
5
 
6
6
  /**
7
7
  * Keeps everything in process memory. The default when no store is given,
@@ -10,6 +10,9 @@ export { a as AlertChannel, d as AlertDetails, e as AlertType, B as BudgetBreach
10
10
  */
11
11
  declare function memory(): Store;
12
12
 
13
+ /** This release of @cronwatch/sdk. scripts/release.mjs keeps it in step with package.json. */
14
+ declare const VERSION = "0.11.0";
15
+
13
16
  /**
14
17
  * "15m" -> 900000. Accepts a plain number of milliseconds, and compound
15
18
  * strings such as "1h30m". Whitespace between parts is fine.
@@ -28,9 +31,12 @@ interface ParsedSchedule {
28
31
  }
29
32
  /**
30
33
  * "0 2 * * *" (cron, five or six fields), "@hourly", or "every 5m".
31
- * Parsed once per (schedule, timezone) pair and cached. The croner instance
32
- * gets no callback, so it schedules nothing; it is only used to compute fire
33
- * times. Without a timezone the expression is read in the process timezone,
34
+ * Text with a colon after its first character, which croner would take for
35
+ * a one-time date, is refused. A cron that names a date no month has
36
+ * ("0 0 30 2 *") is read, and never fires: nothing is ever due, so it is
37
+ * never missed. Parsed once per (schedule, timezone) pair and cached. The
38
+ * croner instance gets no callback, so it schedules nothing; it is only used
39
+ * to compute fire times. Without a timezone the expression is read in the process timezone,
34
40
  * like crontab. Vercel and GitHub Actions run their crons in UTC, so pass
35
41
  * timezone: "UTC" for those.
36
42
  */
@@ -47,6 +53,6 @@ declare function composeAlert(draft: AlertDraft, def: StoredJobDefinition, now:
47
53
  * export const cw = cronwatch({ store: sqlite({ path: "./data/cronwatch.db" }), alerts: [slack({ webhookUrl })] });
48
54
  * export const nightly = cw.job("nightly-report", { schedule: "0 2 * * *", grace: "15m" });
49
55
  */
50
- declare function cronwatch(options?: CronWatchOptions): CronWatch;
56
+ declare function cronwatch(options?: CronwatchOptions): Cronwatch;
51
57
 
52
- export { Alert, AlertDraft, CronWatch, CronWatchOptions, Duration, type ParsedSchedule, Store, StoredJobDefinition, composeAlert, cronwatch, formatDuration, memory, nextFire, parseDuration, parseSchedule };
58
+ export { Alert, AlertDraft, Cronwatch, CronwatchOptions, Duration, type ParsedSchedule, Store, StoredJobDefinition, VERSION, composeAlert, cronwatch, formatDuration, memory, nextFire, parseDuration, parseSchedule };