@keystrokehq/keystroke 0.1.43 → 0.1.44
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/trigger.cjs +0 -16
- package/dist/trigger.cjs.map +1 -1
- package/dist/trigger.d.cts +12 -4
- package/dist/trigger.d.cts.map +1 -1
- package/dist/trigger.d.mts +12 -4
- package/dist/trigger.d.mts.map +1 -1
- package/dist/trigger.mjs +0 -16
- package/dist/trigger.mjs.map +1 -1
- package/package.json +1 -1
package/dist/trigger.cjs
CHANGED
|
@@ -8874,22 +8874,6 @@ function defineCronSource(options) {
|
|
|
8874
8874
|
};
|
|
8875
8875
|
return source;
|
|
8876
8876
|
}
|
|
8877
|
-
/**
|
|
8878
|
-
* Defines a poll trigger source — runs `run` on a schedule and, when the result
|
|
8879
|
-
* passes any `.filter(...)`, fires the attached workflow with it.
|
|
8880
|
-
*
|
|
8881
|
-
* @param options.slug - Stable trigger source slug; attachment slug is `{slug}:{targetSlug}`.
|
|
8882
|
-
* @param options.key - **Deprecated.** Accepted for backwards-compatible definitions.
|
|
8883
|
-
* @param options.id - Optional group id; poll sources sharing an id poll together.
|
|
8884
|
-
* @param options.schedule - Cron expression for the poll cadence (see `defineCronSource`).
|
|
8885
|
-
* @param options.state - Optional Zod schema for cursor state persisted between poll ticks.
|
|
8886
|
-
* @param options.run - Produces the payload checked by `filter` and passed to the workflow.
|
|
8887
|
-
* @param options.filter - Source-level predicate; the workflow only fires when it returns true.
|
|
8888
|
-
* @example
|
|
8889
|
-
* definePollSource({ slug: "inbox", schedule: "0 * * * *", run: fetchInbox })
|
|
8890
|
-
* .filter((r) => r.length > 0)
|
|
8891
|
-
* .attach({ workflow });
|
|
8892
|
-
*/
|
|
8893
8877
|
function definePollSource(options) {
|
|
8894
8878
|
const sourceSlug = resolveAuthoringSlug(options, "definePollSource");
|
|
8895
8879
|
const schedule = parseCronSchedule(options.schedule);
|