refactor: trim cron validation exports

This commit is contained in:
Peter Steinberger
2026-05-01 22:30:06 +01:00
parent d93867baf3
commit 9e5c45484c
3 changed files with 5 additions and 5 deletions

View File

@@ -36,7 +36,7 @@ export function resolveRetentionMs(cronConfig?: CronConfig): number | null {
return DEFAULT_RETENTION_MS;
}
export type ReaperResult = {
type ReaperResult = {
swept: boolean;
pruned: number;
};

View File

@@ -1,4 +1,4 @@
export const INVALID_CRON_SESSION_TARGET_ID_ERROR = "invalid cron sessionTarget session id";
const INVALID_CRON_SESSION_TARGET_ID_ERROR = "invalid cron sessionTarget session id";
export function isInvalidCronSessionTargetIdError(error: unknown): boolean {
return error instanceof Error && error.message === INVALID_CRON_SESSION_TARGET_ID_ERROR;

View File

@@ -5,16 +5,16 @@ import type { CronSchedule } from "./types.js";
const ONE_MINUTE_MS = 60 * 1000;
const TEN_YEARS_MS = 10 * 365.25 * 24 * 60 * 60 * 1000;
export type TimestampValidationError = {
type TimestampValidationError = {
ok: false;
message: string;
};
export type TimestampValidationSuccess = {
type TimestampValidationSuccess = {
ok: true;
};
export type TimestampValidationResult = TimestampValidationSuccess | TimestampValidationError;
type TimestampValidationResult = TimestampValidationSuccess | TimestampValidationError;
/**
* Validates at timestamps in cron schedules.