(
streamPath: string,
opts?: { fallback?: TimezoneFallback }
)
| 113 | } |
| 114 | |
| 115 | export function parseCronStreamPath( |
| 116 | streamPath: string, |
| 117 | opts?: { fallback?: TimezoneFallback } |
| 118 | ): CronScheduleSpec { |
| 119 | if (!streamPath.startsWith(CRON_STREAM_PREFIX)) { |
| 120 | throw new Error(`Invalid cron stream path: ${streamPath}`) |
| 121 | } |
| 122 | |
| 123 | const encoded = streamPath.slice(CRON_STREAM_PREFIX.length) |
| 124 | if (!encoded) { |
| 125 | throw new Error(`Invalid cron stream path: ${streamPath}`) |
| 126 | } |
| 127 | |
| 128 | return decodeCronScheduleSpec(encoded, opts) |
| 129 | } |
| 130 | |
| 131 | export function getNextCronFireAt( |
| 132 | expression: string, |
no test coverage detected