@rebasepro/server 0.9.1-canary.f2f61da → 0.9.1-canary.ff338b5
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/cron/cron-store.d.ts +18 -0
- package/dist/env.d.ts +3 -0
- package/dist/index.es.js +621 -99
- package/dist/index.es.js.map +1 -1
- package/dist/init.d.ts +21 -0
- package/dist/storage/LocalStorageController.d.ts +19 -2
- package/dist/storage/routes.d.ts +8 -1
- package/dist/storage/tus-handler.d.ts +21 -1
- package/dist/storage/types.d.ts +33 -0
- package/package.json +7 -6
|
@@ -28,5 +28,23 @@ export interface CronStore {
|
|
|
28
28
|
totalFailures: number;
|
|
29
29
|
lastRunAt?: string;
|
|
30
30
|
}>>;
|
|
31
|
+
/**
|
|
32
|
+
* Atomically claim a scheduled run slot for a job.
|
|
33
|
+
*
|
|
34
|
+
* `slot` is the *scheduled* fire time (ISO string) derived from the cron
|
|
35
|
+
* expression — deterministic across instances regardless of timer drift,
|
|
36
|
+
* so all instances contend on the same (jobId, slot) key. Exactly one
|
|
37
|
+
* caller wins the insert against the unique constraint and executes;
|
|
38
|
+
* the rest skip.
|
|
39
|
+
*
|
|
40
|
+
* Fails open (returns true) on unexpected store errors, so a broken
|
|
41
|
+
* claims table degrades to uncoordinated execution rather than silently
|
|
42
|
+
* never running jobs.
|
|
43
|
+
*
|
|
44
|
+
* Optional so custom stores written against the pre-claims interface
|
|
45
|
+
* keep working — the scheduler treats a missing implementation as
|
|
46
|
+
* uncoordinated (always run).
|
|
47
|
+
*/
|
|
48
|
+
tryClaimRun?(jobId: string, slot: string): Promise<boolean>;
|
|
31
49
|
}
|
|
32
50
|
export declare function createCronStore(driver: DataDriver): CronStore | undefined;
|
package/dist/env.d.ts
CHANGED
|
@@ -55,6 +55,9 @@ declare const rebaseEnvSchema: z.ZodObject<{
|
|
|
55
55
|
true: "true";
|
|
56
56
|
false: "false";
|
|
57
57
|
}>>, z.ZodTransform<boolean, "" | "true" | "false" | undefined>>;
|
|
58
|
+
GCS_BUCKET: z.ZodOptional<z.ZodString>;
|
|
59
|
+
GCS_PROJECT_ID: z.ZodOptional<z.ZodString>;
|
|
60
|
+
GCS_KEY_FILENAME: z.ZodOptional<z.ZodString>;
|
|
58
61
|
}, z.core.$strip>;
|
|
59
62
|
/** Inferred type of the validated environment. */
|
|
60
63
|
export type RebaseEnv = z.infer<typeof rebaseEnvSchema>;
|