@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.
- package/README.md +4 -4
- package/dist/anthropic.d.cts +1 -1
- package/dist/anthropic.d.ts +1 -1
- package/dist/bugsnag.d.cts +1 -1
- package/dist/bugsnag.d.ts +1 -1
- package/dist/{client-D35cfnNV.d.cts → client-CRMfhylq.d.cts} +129 -37
- package/dist/{client-CQm-8-mR.d.ts → client-D2Xk2600.d.ts} +129 -37
- package/dist/d1.cjs +29 -11
- package/dist/d1.cjs.map +1 -1
- package/dist/d1.d.cts +1 -1
- package/dist/d1.d.ts +1 -1
- package/dist/d1.js +29 -11
- package/dist/d1.js.map +1 -1
- package/dist/datadog.d.cts +1 -1
- package/dist/datadog.d.ts +1 -1
- package/dist/discord.cjs +25 -4
- package/dist/discord.cjs.map +1 -1
- package/dist/discord.d.cts +20 -4
- package/dist/discord.d.ts +20 -4
- package/dist/discord.js +22 -3
- package/dist/discord.js.map +1 -1
- package/dist/{email-BxCp9RQV.d.ts → email-BWuUiCkw.d.ts} +1 -1
- package/dist/{email-D1d5niMy.d.cts → email-Dcqe3k8n.d.cts} +1 -1
- package/dist/honeybadger.d.cts +1 -1
- package/dist/honeybadger.d.ts +1 -1
- package/dist/index.cjs +380 -123
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -9
- package/dist/index.d.ts +15 -9
- package/dist/index.js +379 -124
- package/dist/index.js.map +1 -1
- package/dist/mailgun.d.cts +2 -2
- package/dist/mailgun.d.ts +2 -2
- package/dist/newrelic.d.cts +1 -1
- package/dist/newrelic.d.ts +1 -1
- package/dist/pg-cron.cjs +19 -8
- package/dist/pg-cron.cjs.map +1 -1
- package/dist/pg-cron.d.cts +15 -12
- package/dist/pg-cron.d.ts +15 -12
- package/dist/pg-cron.js +16 -5
- package/dist/pg-cron.js.map +1 -1
- package/dist/postgres.cjs +28 -10
- package/dist/postgres.cjs.map +1 -1
- package/dist/postgres.d.cts +1 -1
- package/dist/postgres.d.ts +1 -1
- package/dist/postgres.js +28 -10
- package/dist/postgres.js.map +1 -1
- package/dist/postmark.d.cts +2 -2
- package/dist/postmark.d.ts +2 -2
- package/dist/resend.d.cts +2 -2
- package/dist/resend.d.ts +2 -2
- package/dist/rollbar.d.cts +1 -1
- package/dist/rollbar.d.ts +1 -1
- package/dist/sendgrid.d.cts +2 -2
- package/dist/sendgrid.d.ts +2 -2
- package/dist/sentry.cjs +4 -1
- package/dist/sentry.cjs.map +1 -1
- package/dist/sentry.d.cts +5 -2
- package/dist/sentry.d.ts +5 -2
- package/dist/sentry.js +4 -1
- package/dist/sentry.js.map +1 -1
- package/dist/ses.d.cts +2 -2
- package/dist/ses.d.ts +2 -2
- package/dist/slack.d.cts +1 -1
- package/dist/slack.d.ts +1 -1
- package/dist/sqlite.cjs +29 -11
- package/dist/sqlite.cjs.map +1 -1
- package/dist/sqlite.d.cts +1 -1
- package/dist/sqlite.d.ts +1 -1
- package/dist/sqlite.js +29 -11
- package/dist/sqlite.js.map +1 -1
- package/dist/twilio.cjs +10 -4
- package/dist/twilio.cjs.map +1 -1
- package/dist/twilio.d.cts +12 -7
- package/dist/twilio.d.ts +12 -7
- package/dist/twilio.js +7 -1
- package/dist/twilio.js.map +1 -1
- package/dist/{types-Cz47Boks.d.cts → types-DLnlUie8.d.cts} +18 -2
- package/dist/{types-Cz47Boks.d.ts → types-DLnlUie8.d.ts} +18 -2
- package/dist/webhook.cjs +10 -5
- package/dist/webhook.cjs.map +1 -1
- package/dist/webhook.d.cts +18 -7
- package/dist/webhook.d.ts +18 -7
- package/dist/webhook.js +10 -6
- package/dist/webhook.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
export { F as FetchHandler, H as HandlerFn,
|
|
3
|
-
import { S as Store, D as Duration, b as AlertDraft, c as StoredJobDefinition, A as Alert } from './types-
|
|
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,
|
|
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
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
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?:
|
|
56
|
+
declare function cronwatch(options?: CronwatchOptions): Cronwatch;
|
|
51
57
|
|
|
52
|
-
export { Alert, AlertDraft,
|
|
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
|
|
2
|
-
export { F as FetchHandler, H as HandlerFn,
|
|
3
|
-
import { S as Store, D as Duration, b as AlertDraft, c as StoredJobDefinition, A as Alert } from './types-
|
|
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,
|
|
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
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
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?:
|
|
56
|
+
declare function cronwatch(options?: CronwatchOptions): Cronwatch;
|
|
51
57
|
|
|
52
|
-
export { Alert, AlertDraft,
|
|
58
|
+
export { Alert, AlertDraft, Cronwatch, CronwatchOptions, Duration, type ParsedSchedule, Store, StoredJobDefinition, VERSION, composeAlert, cronwatch, formatDuration, memory, nextFire, parseDuration, parseSchedule };
|