@vite-hub/schedule 0.5.0 → 0.6.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.
Files changed (49) hide show
  1. package/dist/{console-DueeEBcM.d.ts → console-BdlDJUfS.d.ts} +1 -5
  2. package/dist/{cron-C1l3TquN.js → cron-BT3ef48f.js} +2 -4
  3. package/dist/definition.d.ts +2 -4
  4. package/dist/definition.js +4 -5
  5. package/dist/{due-n120-_nz.js → due-D-0trD1g.js} +2 -3
  6. package/dist/durability.d.ts +1 -3
  7. package/dist/durability.js +1 -2
  8. package/dist/{error-diagnostics-DTmP6baC.js → error-diagnostics-B1AaIGWP.js} +1 -2
  9. package/dist/{error-diagnostics-C0KyI408.js → error-diagnostics-kKXseq8d.js} +5 -2
  10. package/dist/index.d.ts +3 -13
  11. package/dist/index.js +5 -7
  12. package/dist/{inspect-DTfAo5gS.js → inspect-CW0qwt9p.js} +2 -4
  13. package/dist/{kv-storage-2kZtP2CC.js → kv-storage-Dsr3TL9c.js} +1 -2
  14. package/dist/{kv-storage-Bm9aYLfZ.d.ts → kv-storage-hI2IOjb5.d.ts} +0 -2
  15. package/dist/{object-Da1zyPCR.js → object-CAK6UYR5.js} +1 -2
  16. package/dist/{operation-definition-CI2PJGqu.d.ts → operation-definition-CqZkx1Rm.d.ts} +0 -4
  17. package/dist/{operations-DlrK9mlH.js → operations-BTUQeba1.js} +7 -8
  18. package/dist/operations.d.ts +2 -6
  19. package/dist/operations.js +8 -13
  20. package/dist/os.d.ts +0 -8
  21. package/dist/os.js +13 -22
  22. package/dist/{out-BbXG-yVX.js → out-By90R-Bo.js} +3345 -2394
  23. package/dist/{rolldown-runtime-CMFfr-1z.js → rolldown-runtime-DegdyBIC.js} +2 -3
  24. package/dist/runtime/console.d.ts +2 -4
  25. package/dist/runtime/console.js +2 -3
  26. package/dist/runtime/kv.d.ts +2 -4
  27. package/dist/runtime/kv.js +2 -3
  28. package/dist/runtime/process.d.ts +1 -3
  29. package/dist/runtime/process.js +10 -13
  30. package/dist/runtime/state.d.ts +1 -1
  31. package/dist/runtime/state.js +1 -2
  32. package/dist/runtime/static.d.ts +1 -1
  33. package/dist/runtime/static.js +2 -2
  34. package/dist/runtime.d.ts +5 -7
  35. package/dist/runtime.js +5 -5
  36. package/dist/{started-BWWr7Ufw.js → started-B1Se_Iwo.js} +6 -7
  37. package/dist/{started-BXdWMdji.js → started-Bzvr4t5f.js} +6 -7
  38. package/dist/{started-errors-BMg04lL3.js → started-errors-IG9DlT2A.js} +6 -9
  39. package/dist/{started-name-DudQ0fsR.js → started-name-w6n9uDdt.js} +1 -2
  40. package/dist/{state-CJKAhskJ.d.ts → state-BDEDVlyr.d.ts} +1 -5
  41. package/dist/{state-BjWnxyhv.js → state-BZLy46UJ.js} +4 -6
  42. package/dist/{static-BgoOCoe5.js → static-Bg7Jj92L.js} +11 -18
  43. package/dist/{static-CcBWx1kU.d.ts → static-DeRvJqcQ.d.ts} +1 -5
  44. package/dist/{store-CZHZfttA.d.ts → store-CEv3cScg.d.ts} +2 -6
  45. package/dist/{time-zone-SBldrUgt.js → time-zone-pMp_g8Uu.js} +1 -2
  46. package/dist/{types-Cw5LjPuc.d.ts → types-DTVPVY5O.d.ts} +0 -2
  47. package/dist/vite.d.ts +3 -19
  48. package/dist/vite.js +1456 -927
  49. package/package.json +9 -9
@@ -1,12 +1,12 @@
1
1
  import { createRequire } from "node:module";
2
- //#region \0rolldown/runtime.js
2
+ // \0rolldown/runtime.js
3
3
  var __create = Object.create;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
7
  var __getProtoOf = Object.getPrototypeOf;
8
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
9
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod, mod.exports), cb = null), mod.exports);
10
10
  var __copyProps = (to, from, except, desc) => {
11
11
  if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
12
12
  key = keys[i];
@@ -22,5 +22,4 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
22
22
  enumerable: true
23
23
  }) : target, mod));
24
24
  var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
25
- //#endregion
26
25
  export { __require as n, __toESM as r, __commonJSMin as t };
@@ -1,5 +1,4 @@
1
- import { t as ViteHubConsoleRecord } from "../console-DueeEBcM.js";
2
- //#region src/runtime/console.d.ts
1
+ import { t as ViteHubConsoleRecord } from "../console-BdlDJUfS.js";
3
2
  /** The Cron column of the Console: the cron, with the time zone when it is not UTC. */
4
3
  export declare function scheduleConsoleTiming(cron: string, timeZone: string): string;
5
4
  /**
@@ -8,5 +7,4 @@ export declare function scheduleConsoleTiming(cron: string, timeZone: string): s
8
7
  * build-time record of its Schedule. Without a Process Runtime, provider cron output uses the static UTC cron that the
9
8
  * build checked.
10
9
  */
11
- export declare function readScheduleConsoleRecords(): Promise<ViteHubConsoleRecord[]>;
12
- //#endregion
10
+ export declare function readScheduleConsoleRecords(): Promise<ViteHubConsoleRecord[]>;
@@ -1,5 +1,5 @@
1
- import { n as getProcessScheduleDefinitions, o as getStartedScheduleRuntime } from "../state-BjWnxyhv.js";
2
- //#region src/runtime/console.ts
1
+ import { n as getProcessScheduleDefinitions, o as getStartedScheduleRuntime } from "../state-BZLy46UJ.js";
2
+ // src/runtime/console.ts
3
3
  /** The Cron column of the Console: the cron, with the time zone when it is not UTC. */
4
4
  function scheduleConsoleTiming(cron, timeZone) {
5
5
  return timeZone === "UTC" ? cron : `${cron} (${timeZone})`;
@@ -81,5 +81,4 @@ async function readScheduleConsoleRecords() {
81
81
  if (!started) return records;
82
82
  return [...records, ...(await started.store.list()).map(startedScheduleRecord)];
83
83
  }
84
- //#endregion
85
84
  export { readScheduleConsoleRecords, scheduleConsoleTiming };
@@ -1,4 +1,2 @@
1
- import { t as ScheduleKVStorage } from "../kv-storage-Bm9aYLfZ.js";
2
- //#region src/runtime/kv.d.ts
3
- export declare const scheduleKVStorage: ScheduleKVStorage;
4
- //#endregion
1
+ import { t as ScheduleKVStorage } from "../kv-storage-hI2IOjb5.js";
2
+ export declare const scheduleKVStorage: ScheduleKVStorage;
@@ -1,6 +1,5 @@
1
- import { t as createScheduleKVStorage } from "../kv-storage-2kZtP2CC.js";
1
+ import { t as createScheduleKVStorage } from "../kv-storage-Dsr3TL9c.js";
2
2
  import * as kvPackage from "@vite-hub/kv";
3
- //#region src/runtime/kv.ts
3
+ // src/runtime/kv.ts
4
4
  const scheduleKVStorage = createScheduleKVStorage(kvPackage.kv);
5
- //#endregion
6
5
  export { scheduleKVStorage };
@@ -1,7 +1,6 @@
1
- import { a as ScheduleDefinitionRegistry, g as ScheduleRunStore } from "../types-Cw5LjPuc.js";
1
+ import { a as ScheduleDefinitionRegistry, g as ScheduleRunStore } from "../types-DTVPVY5O.js";
2
2
  import { LeaseStore } from "@vite-hub/runtime";
3
3
  import { onShutdown } from "@vite-hub/runtime/internal/shutdown";
4
- //#region src/runtime/process.d.ts
5
4
  export interface ProcessScheduleRuntimeOptions {
6
5
  /**
7
6
  * How far back, in milliseconds, the runtime runs due minutes that it did not check, such as minutes during a
@@ -55,5 +54,4 @@ export interface ProcessScheduleTiming {
55
54
  * Processes that share `leases` run each occurrence once between them. Call `close()` during host shutdown.
56
55
  */
57
56
  export declare function installProcessScheduleRuntime(options: ProcessScheduleRuntimeOptions): Promise<ScheduleRuntimeController>;
58
- //#endregion
59
57
  export { onShutdown };
@@ -1,13 +1,13 @@
1
- import { n as isRecordOrFunction } from "../object-Da1zyPCR.js";
2
- import { t as scheduleErrorDiagnostics } from "../error-diagnostics-DTmP6baC.js";
3
- import { S as createScheduleError, b as scheduleIdempotencyKey, c as markLoggedScheduleError } from "../static-BgoOCoe5.js";
4
- import { a as executeStaticSchedule, l as toRunId } from "../started-errors-BMg04lL3.js";
5
- import { n as isScheduleDue } from "../due-n120-_nz.js";
6
- import { a as getScheduleRuntimeRegistry, c as registerProcessScheduleDefinitions, d as setScheduleOccurrenceClaims, f as setScheduleRunStore, i as getScheduleRunStore, p as setScheduleRuntimeRegistry, r as getScheduleOccurrenceClaims } from "../state-BjWnxyhv.js";
7
- import { i as runStartedSchedules } from "../started-BXdWMdji.js";
1
+ import { n as isRecordOrFunction } from "../object-CAK6UYR5.js";
2
+ import { n as isScheduleDue } from "../due-D-0trD1g.js";
3
+ import { t as scheduleErrorDiagnostics } from "../error-diagnostics-B1AaIGWP.js";
4
+ import { S as createScheduleError, b as scheduleIdempotencyKey, c as markLoggedScheduleError } from "../static-Bg7Jj92L.js";
5
+ import { a as executeStaticSchedule, l as toRunId } from "../started-errors-IG9DlT2A.js";
6
+ import { i as runStartedSchedules } from "../started-Bzvr4t5f.js";
7
+ import { a as getScheduleRuntimeRegistry, c as registerProcessScheduleDefinitions, d as setScheduleOccurrenceClaims, f as setScheduleRunStore, i as getScheduleRunStore, p as setScheduleRuntimeRegistry, r as getScheduleOccurrenceClaims } from "../state-BZLy46UJ.js";
8
8
  import { createMemoryLeaseStore, getInstanceId } from "@vite-hub/runtime";
9
9
  import { onShutdown } from "@vite-hub/runtime/internal/shutdown";
10
- //#region src/internal/process-wake-runtime.ts
10
+ // src/internal/process-wake-runtime.ts
11
11
  const minuteMs$1 = 6e4;
12
12
  const DEFAULT_INTERVAL_MS = 6e4;
13
13
  const DEFAULT_CONCURRENCY = 1;
@@ -204,8 +204,7 @@ function createProcessWakeDriver(options, context) {
204
204
  }
205
205
  };
206
206
  }
207
- //#endregion
208
- //#region src/runtime/claims.ts
207
+ // src/runtime/claims.ts
209
208
  /** The lease key of one occurrence within an app's Schedule prefix. */
210
209
  function occurrenceLeaseKey(runId, prefix = "vitehub:schedule") {
211
210
  const base = prefix.replace(/^\/+|\/+$/g, "");
@@ -284,8 +283,7 @@ function createOccurrenceClaims(options) {
284
283
  }
285
284
  } };
286
285
  }
287
- //#endregion
288
- //#region src/runtime/process.ts
286
+ // src/runtime/process.ts
289
287
  function isStaticScheduleDefinition(value) {
290
288
  return isRecordOrFunction(value) && Object.hasOwn(value, "cron") && Object.hasOwn(value, "handler") && typeof value.handler === "function";
291
289
  }
@@ -510,5 +508,4 @@ async function installProcessScheduleRuntime(options) {
510
508
  })();
511
509
  } };
512
510
  }
513
- //#endregion
514
511
  export { installProcessScheduleRuntime, onShutdown };
@@ -1,2 +1,2 @@
1
- import { a as getScheduleRunStore, c as loadScheduleDefinition, d as setHostScheduleInventory, f as setScheduleOccurrenceClaims, h as setStartedScheduleRuntime, i as getScheduleOccurrenceClaims, l as registerProcessScheduleDefinitions, m as setScheduleRuntimeRegistry, n as getHostScheduleInventory, o as getScheduleRuntimeRegistry, p as setScheduleRunStore, r as getProcessScheduleDefinitions, s as getStartedScheduleRuntime, t as StartedScheduleRuntime, u as resetScheduleRuntime } from "../state-CJKAhskJ.js";
1
+ import { a as getScheduleRunStore, c as loadScheduleDefinition, d as setHostScheduleInventory, f as setScheduleOccurrenceClaims, h as setStartedScheduleRuntime, i as getScheduleOccurrenceClaims, l as registerProcessScheduleDefinitions, m as setScheduleRuntimeRegistry, n as getHostScheduleInventory, o as getScheduleRuntimeRegistry, p as setScheduleRunStore, r as getProcessScheduleDefinitions, s as getStartedScheduleRuntime, t as StartedScheduleRuntime, u as resetScheduleRuntime } from "../state-BDEDVlyr.js";
2
2
  export { StartedScheduleRuntime, getHostScheduleInventory, getProcessScheduleDefinitions, getScheduleOccurrenceClaims, getScheduleRunStore, getScheduleRuntimeRegistry, getStartedScheduleRuntime, loadScheduleDefinition, registerProcessScheduleDefinitions, resetScheduleRuntime, setHostScheduleInventory, setScheduleOccurrenceClaims, setScheduleRunStore, setScheduleRuntimeRegistry, setStartedScheduleRuntime };
@@ -1,2 +1 @@
1
- import { a as getScheduleRuntimeRegistry, c as registerProcessScheduleDefinitions, d as setScheduleOccurrenceClaims, f as setScheduleRunStore, i as getScheduleRunStore, l as resetScheduleRuntime, m as setStartedScheduleRuntime, n as getProcessScheduleDefinitions, o as getStartedScheduleRuntime, p as setScheduleRuntimeRegistry, r as getScheduleOccurrenceClaims, s as loadScheduleDefinition, t as getHostScheduleInventory, u as setHostScheduleInventory } from "../state-BjWnxyhv.js";
2
- export { getHostScheduleInventory, getProcessScheduleDefinitions, getScheduleOccurrenceClaims, getScheduleRunStore, getScheduleRuntimeRegistry, getStartedScheduleRuntime, loadScheduleDefinition, registerProcessScheduleDefinitions, resetScheduleRuntime, setHostScheduleInventory, setScheduleOccurrenceClaims, setScheduleRunStore, setScheduleRuntimeRegistry, setStartedScheduleRuntime };
1
+ export { t as getHostScheduleInventory, n as getProcessScheduleDefinitions, r as getScheduleOccurrenceClaims, i as getScheduleRunStore, a as getScheduleRuntimeRegistry, o as getStartedScheduleRuntime, s as loadScheduleDefinition, c as registerProcessScheduleDefinitions, l as resetScheduleRuntime, u as setHostScheduleInventory, d as setScheduleOccurrenceClaims, f as setScheduleRunStore, p as setScheduleRuntimeRegistry, m as setStartedScheduleRuntime } from "../state-BZLy46UJ.js";
@@ -1,2 +1,2 @@
1
- import { _ as unwrapScheduleDefinition, a as createStaticScheduleRun, c as executeStaticSchedule, d as logScheduleRuntimeError, f as markLoggedScheduleError, g as scheduledWakeTime, h as normalizeScheduleRuntimeError, i as StaticScheduleRun, l as isScheduleCronAuthorized, m as normalizeCron, n as ExecuteMatchingStaticSchedulesOptions, o as executeCloudflareStaticSchedules, p as missingScheduleDefinitionError, r as ExecuteStaticScheduleOptions, s as executeMatchingStaticSchedules, t as ExecuteCloudflareStaticSchedulesOptions, u as isTimeZoneWakeDue, v as cronWithWeekdayNames } from "../static-CcBWx1kU.js";
1
+ import { _ as unwrapScheduleDefinition, a as createStaticScheduleRun, c as executeStaticSchedule, d as logScheduleRuntimeError, f as markLoggedScheduleError, g as scheduledWakeTime, h as normalizeScheduleRuntimeError, i as StaticScheduleRun, l as isScheduleCronAuthorized, m as normalizeCron, n as ExecuteMatchingStaticSchedulesOptions, o as executeCloudflareStaticSchedules, p as missingScheduleDefinitionError, r as ExecuteStaticScheduleOptions, s as executeMatchingStaticSchedules, t as ExecuteCloudflareStaticSchedulesOptions, u as isTimeZoneWakeDue, v as cronWithWeekdayNames } from "../static-DeRvJqcQ.js";
2
2
  export { ExecuteCloudflareStaticSchedulesOptions, ExecuteMatchingStaticSchedulesOptions, ExecuteStaticScheduleOptions, StaticScheduleRun, createStaticScheduleRun, cronWithWeekdayNames, executeCloudflareStaticSchedules, executeMatchingStaticSchedules, executeStaticSchedule, isScheduleCronAuthorized, isTimeZoneWakeDue, logScheduleRuntimeError, markLoggedScheduleError, missingScheduleDefinitionError, normalizeCron, normalizeScheduleRuntimeError, scheduledWakeTime, unwrapScheduleDefinition };
@@ -1,3 +1,3 @@
1
- import { a as isScheduleCronAuthorized, c as markLoggedScheduleError, d as normalizeScheduleRuntimeError, f as scheduledWakeTime, i as executeStaticSchedule, l as missingScheduleDefinitionError, n as executeCloudflareStaticSchedules, o as isTimeZoneWakeDue, p as unwrapScheduleDefinition, r as executeMatchingStaticSchedules, s as logScheduleRuntimeError, t as createStaticScheduleRun, u as normalizeCron } from "../static-BgoOCoe5.js";
2
- import { t as cronWithWeekdayNames } from "../due-n120-_nz.js";
1
+ import { a as isScheduleCronAuthorized, c as markLoggedScheduleError, d as normalizeScheduleRuntimeError, f as scheduledWakeTime, i as executeStaticSchedule, l as missingScheduleDefinitionError, n as executeCloudflareStaticSchedules, o as isTimeZoneWakeDue, p as unwrapScheduleDefinition, r as executeMatchingStaticSchedules, s as logScheduleRuntimeError, t as createStaticScheduleRun, u as normalizeCron } from "../static-Bg7Jj92L.js";
2
+ import { t as cronWithWeekdayNames } from "../due-D-0trD1g.js";
3
3
  export { createStaticScheduleRun, cronWithWeekdayNames, executeCloudflareStaticSchedules, executeMatchingStaticSchedules, executeStaticSchedule, isScheduleCronAuthorized, isTimeZoneWakeDue, logScheduleRuntimeError, markLoggedScheduleError, missingScheduleDefinitionError, normalizeCron, normalizeScheduleRuntimeError, scheduledWakeTime, unwrapScheduleDefinition };
package/dist/runtime.d.ts CHANGED
@@ -1,10 +1,9 @@
1
1
  /// <reference path="./registry-module.d.ts" />
2
- import { a as ScheduleDefinitionRegistry, b as StartedScheduleStore, c as ScheduleRunAttemptRecord, f as ScheduleRunListOptions, g as ScheduleRunStore, i as ScheduleDefinitionOptions, n as ScheduleDefinition, o as ScheduleHandler, p as ScheduleRunRecord, s as ScheduleRegistryDefinition, u as ScheduleRunContext } from "./types-Cw5LjPuc.js";
3
- import { a as createScheduleRun, c as runScheduleFrom, n as createKVScheduleRunStore, o as executeSchedule, r as createMemoryScheduleRunStore, s as executeStaticSchedule, t as KVScheduleStoreOptions } from "./store-CZHZfttA.js";
4
- import { n as createScheduleKVStorage, t as ScheduleKVStorage } from "./kv-storage-Bm9aYLfZ.js";
5
- import { _ as unwrapScheduleDefinition, m as normalizeCron } from "./static-CcBWx1kU.js";
6
- import { a as getScheduleRunStore, p as setScheduleRunStore, u as resetScheduleRuntime } from "./state-CJKAhskJ.js";
7
- //#region src/runtime/started.d.ts
2
+ import { a as createScheduleRun, c as runScheduleFrom, n as createKVScheduleRunStore, o as executeSchedule, r as createMemoryScheduleRunStore, s as executeStaticSchedule, t as KVScheduleStoreOptions } from "./store-CEv3cScg.js";
3
+ import { _ as unwrapScheduleDefinition, m as normalizeCron } from "./static-DeRvJqcQ.js";
4
+ import { n as createScheduleKVStorage, t as ScheduleKVStorage } from "./kv-storage-hI2IOjb5.js";
5
+ import { a as ScheduleDefinitionRegistry, b as StartedScheduleStore, c as ScheduleRunAttemptRecord, f as ScheduleRunListOptions, g as ScheduleRunStore, i as ScheduleDefinitionOptions, n as ScheduleDefinition, o as ScheduleHandler, p as ScheduleRunRecord, s as ScheduleRegistryDefinition, u as ScheduleRunContext } from "./types-DTVPVY5O.js";
6
+ import { a as getScheduleRunStore, p as setScheduleRunStore, u as resetScheduleRuntime } from "./state-BDEDVlyr.js";
8
7
  interface InstallStartedSchedulesOptions {
9
8
  /**
10
9
  * How far back, in milliseconds, the first tick after a start runs cron minutes that no tick checked. Use it only with
@@ -35,5 +34,4 @@ export declare function createKVStartedScheduleStore(options: KVStartedScheduleS
35
34
  * that started Schedule and logged; it does not fail the tick.
36
35
  */
37
36
  export declare function runStartedSchedules(context: ScheduleRunContext): Promise<void>;
38
- //#endregion
39
37
  export { type InstallStartedSchedulesOptions, type KVScheduleStoreOptions, type KVStartedScheduleStoreOptions, type ScheduleDefinition, type ScheduleDefinitionOptions, type ScheduleDefinitionRegistry, type ScheduleHandler, type ScheduleKVStorage, type ScheduleRegistryDefinition, type ScheduleRunAttemptRecord, type ScheduleRunContext, type ScheduleRunListOptions, type ScheduleRunRecord, type ScheduleRunStore, createKVScheduleRunStore, createMemoryScheduleRunStore, createScheduleKVStorage, createScheduleRun, executeSchedule, executeStaticSchedule, getScheduleRunStore, normalizeCron, resetScheduleRuntime, runScheduleFrom, setScheduleRunStore, unwrapScheduleDefinition };
package/dist/runtime.js CHANGED
@@ -1,6 +1,6 @@
1
- import { p as unwrapScheduleDefinition, u as normalizeCron } from "./static-BgoOCoe5.js";
2
- import { a as executeStaticSchedule, c as runScheduleFrom, i as executeSchedule, n as createScheduleRun } from "./started-errors-BMg04lL3.js";
3
- import { f as setScheduleRunStore, g as createMemoryScheduleRunStore, h as createKVScheduleRunStore, i as getScheduleRunStore, l as resetScheduleRuntime } from "./state-BjWnxyhv.js";
4
- import { t as createScheduleKVStorage } from "./kv-storage-2kZtP2CC.js";
5
- import { i as runStartedSchedules, n as createMemoryStartedScheduleStore, r as installStartedSchedules, t as createKVStartedScheduleStore } from "./started-BXdWMdji.js";
1
+ import { a as executeStaticSchedule, c as runScheduleFrom, i as executeSchedule, n as createScheduleRun } from "./started-errors-IG9DlT2A.js";
2
+ import { p as unwrapScheduleDefinition, u as normalizeCron } from "./static-Bg7Jj92L.js";
3
+ import { t as createScheduleKVStorage } from "./kv-storage-Dsr3TL9c.js";
4
+ import { f as setScheduleRunStore, g as createMemoryScheduleRunStore, h as createKVScheduleRunStore, i as getScheduleRunStore, l as resetScheduleRuntime } from "./state-BZLy46UJ.js";
5
+ import { i as runStartedSchedules, n as createMemoryStartedScheduleStore, r as installStartedSchedules, t as createKVStartedScheduleStore } from "./started-Bzvr4t5f.js";
6
6
  export { createKVScheduleRunStore, createKVStartedScheduleStore, createMemoryScheduleRunStore, createMemoryStartedScheduleStore, createScheduleKVStorage, createScheduleRun, executeSchedule, executeStaticSchedule, getScheduleRunStore, installStartedSchedules, normalizeCron, resetScheduleRuntime, runScheduleFrom, runStartedSchedules, setScheduleRunStore, unwrapScheduleDefinition };
@@ -1,10 +1,10 @@
1
- import { t as isIanaTimeZone } from "./time-zone-SBldrUgt.js";
2
- import { n as isRecordOrFunction } from "./object-Da1zyPCR.js";
3
- import { y as parseScheduledAt } from "./static-BgoOCoe5.js";
4
- import { t as startedScheduleErrors, u as randomId } from "./started-errors-BMg04lL3.js";
5
- import { o as getStartedScheduleRuntime } from "./state-BjWnxyhv.js";
1
+ import { t as startedScheduleErrors, u as randomId } from "./started-errors-IG9DlT2A.js";
2
+ import { t as isIanaTimeZone } from "./time-zone-pMp_g8Uu.js";
3
+ import { n as isRecordOrFunction } from "./object-CAK6UYR5.js";
4
+ import { y as parseScheduledAt } from "./static-Bg7Jj92L.js";
5
+ import { o as getStartedScheduleRuntime } from "./state-BZLy46UJ.js";
6
6
  import { parseCronExpression } from "cron-schedule";
7
- //#region src/started.ts
7
+ // src/started.ts
8
8
  const optionKeys = /* @__PURE__ */ new Set([
9
9
  "at",
10
10
  "cron",
@@ -141,5 +141,4 @@ async function cancelSchedule(id) {
141
141
  if (storeError) return [storeError, void 0];
142
142
  return deleted ? [void 0, schedule] : [startedScheduleErrors.SCHEDULE_NOT_FOUND({ id: String(id) }), void 0];
143
143
  }
144
- //#endregion
145
144
  export { startSchedule as i, getSchedule as n, listSchedules as r, cancelSchedule as t };
@@ -1,10 +1,10 @@
1
- import { n as isRecordOrFunction } from "./object-Da1zyPCR.js";
2
- import { _ as errorCode, v as logFailure } from "./static-BgoOCoe5.js";
3
- import { i as executeSchedule, l as toRunId, t as startedScheduleErrors } from "./started-errors-BMg04lL3.js";
4
- import { n as isScheduleDue } from "./due-n120-_nz.js";
5
- import { _ as joinKey, m as setStartedScheduleRuntime, o as getStartedScheduleRuntime, r as getScheduleOccurrenceClaims, v as keySegments } from "./state-BjWnxyhv.js";
1
+ import { n as isScheduleDue } from "./due-D-0trD1g.js";
2
+ import { i as executeSchedule, l as toRunId, t as startedScheduleErrors } from "./started-errors-IG9DlT2A.js";
3
+ import { _ as joinKey, m as setStartedScheduleRuntime, o as getStartedScheduleRuntime, r as getScheduleOccurrenceClaims, v as keySegments } from "./state-BZLy46UJ.js";
4
+ import { n as isRecordOrFunction } from "./object-CAK6UYR5.js";
5
+ import { _ as errorCode, v as logFailure } from "./static-Bg7Jj92L.js";
6
6
  import { normalizeRuntimeDiagnosticError } from "@vite-hub/runtime";
7
- //#region src/runtime/started.ts
7
+ // src/runtime/started.ts
8
8
  const minuteMs = 6e4;
9
9
  /** Installs the store and the Definitions that `startSchedule()` and the tick use. The generated Nitro plugin calls it. */
10
10
  function installStartedSchedules(options) {
@@ -215,5 +215,4 @@ async function runStartedSchedules(context) {
215
215
  });
216
216
  if (results.every((result) => result.status === "fulfilled")) runtime.checkedThrough = Math.max(runtime.checkedThrough ?? minute, minute);
217
217
  }
218
- //#endregion
219
218
  export { runStartedSchedules as i, createMemoryStartedScheduleStore as n, installStartedSchedules as r, createKVStartedScheduleStore as t };
@@ -1,17 +1,16 @@
1
- import { n as isRecordOrFunction } from "./object-Da1zyPCR.js";
2
- import { S as createScheduleError, _ as errorCode, b as scheduleIdempotencyKey, c as markLoggedScheduleError, d as normalizeScheduleRuntimeError, g as emitLogEvent, h as logScheduleRun, m as runWithScheduleWaitUntil, x as validateScheduledAt, y as parseScheduledAt } from "./static-BgoOCoe5.js";
3
- import { i as getScheduleRunStore } from "./state-BjWnxyhv.js";
1
+ import { n as isRecordOrFunction } from "./object-CAK6UYR5.js";
2
+ import { S as createScheduleError, _ as errorCode, b as scheduleIdempotencyKey, c as markLoggedScheduleError, d as normalizeScheduleRuntimeError, g as emitLogEvent, h as logScheduleRun, m as runWithScheduleWaitUntil, x as validateScheduledAt, y as parseScheduledAt } from "./static-Bg7Jj92L.js";
3
+ import { i as getScheduleRunStore } from "./state-BZLy46UJ.js";
4
4
  import { defineErrors } from "@vite-hub/runtime";
5
5
  import { serializeResponse, toResponse } from "@vite-hub/runtime/internal/response";
6
6
  import { emitRunFailed, toRunFailedError } from "@vite-hub/runtime/internal/run-failed";
7
7
  import { runInRunScopes } from "@vite-hub/runtime/internal/run-scope";
8
- //#region ../internal/src/runtime/random.ts
8
+ // ../internal/src/runtime/random.ts
9
9
  function randomId(prefix) {
10
10
  const body = `${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 10)}`;
11
11
  return prefix ? `${prefix}_${body}` : body;
12
12
  }
13
- //#endregion
14
- //#region src/runtime/execute.ts
13
+ // src/runtime/execute.ts
15
14
  function normalizeRunSource(source) {
16
15
  return source ?? "direct";
17
16
  }
@@ -266,8 +265,7 @@ function executeManualSchedule(definition, name, scheduledAt) {
266
265
  async function runScheduleFrom(registry, name, options = {}) {
267
266
  return await executeManualSchedule(await resolveManualSchedule(registry, name), name, parseScheduledAt(options.scheduledAt));
268
267
  }
269
- //#endregion
270
- //#region src/started-errors.ts
268
+ // src/started-errors.ts
271
269
  const startedScheduleErrors = /*#__PURE__*/ defineErrors({
272
270
  docs: "https://vitehub.dev/docs/schedule/diagnostics",
273
271
  codes: {
@@ -293,5 +291,4 @@ const startedScheduleErrors = /*#__PURE__*/ defineErrors({
293
291
  }
294
292
  }
295
293
  });
296
- //#endregion
297
294
  export { executeStaticSchedule as a, runScheduleFrom as c, executeSchedule as i, toRunId as l, createScheduleRun as n, loadStaticScheduleDefinition as o, executeManualSchedule as r, resolveManualSchedule as s, startedScheduleErrors as t, randomId as u };
@@ -1,5 +1,4 @@
1
- //#region src/runtime/started-name.ts
1
+ // src/runtime/started-name.ts
2
2
  /** Name of the Schedule that runs due started Schedules each minute. Discovery adds it when a Definition has no `cron`. */
3
3
  const startedSchedulesTickName = "vitehub/started-schedules";
4
- //#endregion
5
4
  export { startedSchedulesTickName as t };
@@ -1,6 +1,5 @@
1
- import { a as ScheduleDefinitionRegistry, b as StartedScheduleStore, g as ScheduleRunStore, n as ScheduleDefinition, s as ScheduleRegistryDefinition } from "./types-Cw5LjPuc.js";
1
+ import { a as ScheduleDefinitionRegistry, b as StartedScheduleStore, g as ScheduleRunStore, n as ScheduleDefinition, s as ScheduleRegistryDefinition } from "./types-DTVPVY5O.js";
2
2
  import { LeaseStore } from "@vite-hub/runtime";
3
- //#region src/runtime/claims.d.ts
4
3
  /** `held` when another process holds the occurrence now, `done` when a process finished it, `ran` when this call ran it. */
5
4
  type OccurrenceClaimResult = "done" | "held" | "ran";
6
5
  /** Runs each Schedule occurrence in one process of all the processes that share `leases`. */
@@ -12,8 +11,6 @@ interface OccurrenceClaims {
12
11
  */
13
12
  run(runId: string, run: (markFinal: () => void) => Promise<unknown>): Promise<OccurrenceClaimResult>;
14
13
  }
15
- //#endregion
16
- //#region src/runtime/state.d.ts
17
14
  type ProcessScheduleTimingRecord = Pick<ScheduleDefinition, "cron" | "timeZone">;
18
15
  interface HostScheduleInventory {
19
16
  timings: Readonly<Record<string, {
@@ -55,5 +52,4 @@ declare function setStartedScheduleRuntime(runtime: StartedScheduleRuntime | und
55
52
  declare function getStartedScheduleRuntime(): StartedScheduleRuntime | undefined;
56
53
  declare function loadScheduleDefinition(name: string): Promise<ScheduleRegistryDefinition | undefined>;
57
54
  declare function resetScheduleRuntime(): void;
58
- //#endregion
59
55
  export { getScheduleRunStore as a, loadScheduleDefinition as c, setHostScheduleInventory as d, setScheduleOccurrenceClaims as f, setStartedScheduleRuntime as h, getScheduleOccurrenceClaims as i, registerProcessScheduleDefinitions as l, setScheduleRuntimeRegistry as m, getHostScheduleInventory as n, getScheduleRuntimeRegistry as o, setScheduleRunStore as p, getProcessScheduleDefinitions as r, getStartedScheduleRuntime as s, StartedScheduleRuntime as t, resetScheduleRuntime as u };
@@ -1,7 +1,7 @@
1
- import { n as isRecordOrFunction } from "./object-Da1zyPCR.js";
2
- import { t as scheduleErrorDiagnostics } from "./error-diagnostics-DTmP6baC.js";
1
+ import { t as scheduleErrorDiagnostics } from "./error-diagnostics-B1AaIGWP.js";
2
+ import { n as isRecordOrFunction } from "./object-CAK6UYR5.js";
3
3
  import { AsyncLocalStorage } from "node:async_hooks";
4
- //#region src/runtime/store.ts
4
+ // src/runtime/store.ts
5
5
  function trimPrefix(prefix) {
6
6
  return prefix.replace(/^\/+|\/+$/g, "");
7
7
  }
@@ -318,8 +318,7 @@ function createKVScheduleRunStore(options) {
318
318
  }
319
319
  };
320
320
  }
321
- //#endregion
322
- //#region src/runtime/state.ts
321
+ // src/runtime/state.ts
323
322
  let runtimeRegistry;
324
323
  let hostInventory;
325
324
  const processDefinitions = /* @__PURE__ */ new Set();
@@ -425,5 +424,4 @@ function resetScheduleRuntime() {
425
424
  loadedRegistryEntries.clear();
426
425
  loadingRegistryEntries.clear();
427
426
  }
428
- //#endregion
429
427
  export { joinKey as _, getScheduleRuntimeRegistry as a, registerProcessScheduleDefinitions as c, setScheduleOccurrenceClaims as d, setScheduleRunStore as f, createMemoryScheduleRunStore as g, createKVScheduleRunStore as h, getScheduleRunStore as i, resetScheduleRuntime as l, setStartedScheduleRuntime as m, getProcessScheduleDefinitions as n, getStartedScheduleRuntime as o, setScheduleRuntimeRegistry as p, getScheduleOccurrenceClaims as r, loadScheduleDefinition as s, getHostScheduleInventory as t, setHostScheduleInventory as u, keySegments as v };
@@ -1,11 +1,11 @@
1
- import { n as isRecordOrFunction } from "./object-Da1zyPCR.js";
2
- import { t as scheduleErrorDiagnostics } from "./error-diagnostics-DTmP6baC.js";
3
- import { n as isScheduleDue, r as latestCronMinute, t as cronWithWeekdayNames } from "./due-n120-_nz.js";
4
- import "./started-name-DudQ0fsR.js";
1
+ import { t as scheduleErrorDiagnostics } from "./error-diagnostics-B1AaIGWP.js";
2
+ import { n as isRecordOrFunction } from "./object-CAK6UYR5.js";
3
+ import { n as isScheduleDue, r as latestCronMinute, t as cronWithWeekdayNames } from "./due-D-0trD1g.js";
4
+ import "./started-name-w6n9uDdt.js";
5
5
  import { ViteHubError, normalizeRuntimeDiagnosticError } from "@vite-hub/runtime";
6
6
  import { emitRunFailed, toRunFailedError } from "@vite-hub/runtime/internal/run-failed";
7
7
  import { runInRunScopes } from "@vite-hub/runtime/internal/run-scope";
8
- //#region src/errors.ts
8
+ // src/errors.ts
9
9
  const scheduleErrorMessages = {
10
10
  SCHEDULE_DEFINITION_NOT_FOUND: "Static Schedule Definition was not found.",
11
11
  SCHEDULE_INVALID_CRON: "Schedule cron is invalid.",
@@ -38,8 +38,7 @@ function invalidScheduleValueDetails(field, value) {
38
38
  function createScheduleError(code, options = {}) {
39
39
  return new ViteHubError(code, scheduleErrorMessages[code], options);
40
40
  }
41
- //#endregion
42
- //#region src/runtime/date.ts
41
+ // src/runtime/date.ts
43
42
  /** The idempotency key of one Schedule occurrence. Two runs of the same Schedule for the same time share it. */
44
43
  function scheduleIdempotencyKey(name, scheduledAt) {
45
44
  return `schedule:${name}:${scheduledAt.toISOString()}`;
@@ -77,8 +76,7 @@ function parseScheduledAt(scheduledAt) {
77
76
  if (parsed) return parsed;
78
77
  throw createScheduleError("SCHEDULE_INVALID_SCHEDULED_AT", { details: invalidScheduleValueDetails("scheduledAt", scheduledAt) });
79
78
  }
80
- //#endregion
81
- //#region ../internal/src/runtime/request-log.ts
79
+ // ../internal/src/runtime/request-log.ts
82
80
  function isRequestLog(value) {
83
81
  return value !== null && typeof value === "object" && typeof Reflect.get(value, "set") === "function" && typeof Reflect.get(value, "warn") === "function" && typeof Reflect.get(value, "error") === "function";
84
82
  }
@@ -181,8 +179,7 @@ function logFailure(failure, fallback) {
181
179
  fallback();
182
180
  } catch {}
183
181
  }
184
- //#endregion
185
- //#region src/runtime/log.ts
182
+ // src/runtime/log.ts
186
183
  const loggedKey = Symbol.for("vitehub.schedule.logged-errors");
187
184
  const runtimeGlobal = globalThis;
188
185
  const logged = runtimeGlobal[loggedKey] ||= /* @__PURE__ */ new WeakSet();
@@ -224,8 +221,7 @@ function rememberLoggedScheduleError(error) {
224
221
  function isLoggedScheduleError(error) {
225
222
  return typeof error === "object" && error !== null && logged.has(error);
226
223
  }
227
- //#endregion
228
- //#region src/runtime/wait-until.ts
224
+ // src/runtime/wait-until.ts
229
225
  function createLocalWaitUntil() {
230
226
  const pending = /* @__PURE__ */ new Set();
231
227
  let error;
@@ -269,8 +265,7 @@ function logDeferredFailure(error) {
269
265
  error
270
266
  }, () => console.error("[vitehub:schedule] Deferred work failed after the handler failed.", error));
271
267
  }
272
- //#endregion
273
- //#region ../internal/src/secret.ts
268
+ // ../internal/src/secret.ts
274
269
  const secretEncoder = new TextEncoder();
275
270
  /**
276
271
  * Compares a request value with an expected secret in constant time for the length of `expected`. Returns `false`
@@ -292,8 +287,7 @@ function isViteHubBearerSecretEqual(authorization, expected) {
292
287
  return isViteHubSecretEqual(/^Bearer\s+(.+)$/i.exec(authorization ?? "")?.[1], expected);
293
288
  }
294
289
  Object.freeze({ prefix: "sha256=" });
295
- //#endregion
296
- //#region src/runtime/static.ts
290
+ // src/runtime/static.ts
297
291
  const intrinsicErrorIsError = Error.isError;
298
292
  const intrinsicNativeErrorIsError = (() => {
299
293
  try {
@@ -606,5 +600,4 @@ function unwrapScheduleDefinition(loaded) {
606
600
  const candidate = isRecordOrFunction(loaded) && Object.hasOwn(loaded, "default") ? loaded.default : loaded;
607
601
  return isStaticScheduleDefinition(candidate) ? candidate : void 0;
608
602
  }
609
- //#endregion
610
603
  export { createScheduleError as S, errorCode as _, isScheduleCronAuthorized as a, scheduleIdempotencyKey as b, markLoggedScheduleError as c, normalizeScheduleRuntimeError as d, scheduledWakeTime as f, emitLogEvent as g, logScheduleRun as h, executeStaticSchedule as i, missingScheduleDefinitionError as l, runWithScheduleWaitUntil as m, executeCloudflareStaticSchedules as n, isTimeZoneWakeDue as o, unwrapScheduleDefinition as p, executeMatchingStaticSchedules as r, logScheduleRuntimeError as s, createStaticScheduleRun as t, normalizeCron as u, logFailure as v, validateScheduledAt as x, parseScheduledAt as y };
@@ -1,13 +1,10 @@
1
- import { a as ScheduleDefinitionRegistry, n as ScheduleDefinition, u as ScheduleRunContext } from "./types-Cw5LjPuc.js";
2
- //#region src/runtime/due.d.ts
1
+ import { a as ScheduleDefinitionRegistry, n as ScheduleDefinition, u as ScheduleRunContext } from "./types-DTVPVY5O.js";
3
2
  /**
4
3
  * Returns `cron` with its weekday field written as names, such as `0 4 * * MON,FRI`. Cloudflare and Deno number
5
4
  * weekdays 1-7 from Sunday, so standard 0-6 numbers fire one day early or fail to deploy. Names have one meaning on
6
5
  * every host.
7
6
  */
8
7
  declare function cronWithWeekdayNames(cron: string): string;
9
- //#endregion
10
- //#region src/runtime/static.d.ts
11
8
  interface ExecuteStaticScheduleOptions {
12
9
  cron: string;
13
10
  definition: ScheduleDefinition;
@@ -92,5 +89,4 @@ declare function executeCloudflareStaticSchedules(event: CloudflareScheduledEven
92
89
  declare function unwrapScheduleDefinition(loaded: unknown): (ScheduleDefinition & {
93
90
  cron: string;
94
91
  }) | undefined;
95
- //#endregion
96
92
  export { unwrapScheduleDefinition as _, createStaticScheduleRun as a, executeStaticSchedule as c, logScheduleRuntimeError as d, markLoggedScheduleError as f, scheduledWakeTime as g, normalizeScheduleRuntimeError as h, StaticScheduleRun as i, isScheduleCronAuthorized as l, normalizeCron as m, ExecuteMatchingStaticSchedulesOptions as n, executeCloudflareStaticSchedules as o, missingScheduleDefinitionError as p, ExecuteStaticScheduleOptions as r, executeMatchingStaticSchedules as s, ExecuteCloudflareStaticSchedulesOptions as t, isTimeZoneWakeDue as u, cronWithWeekdayNames as v };
@@ -1,6 +1,5 @@
1
- import { a as ScheduleDefinitionRegistry, g as ScheduleRunStore, n as ScheduleDefinition, p as ScheduleRunRecord } from "./types-Cw5LjPuc.js";
2
- import { t as ScheduleKVStorage } from "./kv-storage-Bm9aYLfZ.js";
3
- //#region src/runtime/execute.d.ts
1
+ import { a as ScheduleDefinitionRegistry, g as ScheduleRunStore, n as ScheduleDefinition, p as ScheduleRunRecord } from "./types-DTVPVY5O.js";
2
+ import { t as ScheduleKVStorage } from "./kv-storage-hI2IOjb5.js";
4
3
  interface ExecuteScheduleOptions {
5
4
  captureHandlerFailure?: boolean;
6
5
  claimed?: boolean;
@@ -37,13 +36,10 @@ declare function executeSchedule(options: ExecuteScheduleOptions): Promise<Sched
37
36
  declare function executeStaticSchedule(options: ExecuteStaticScheduleOptions): Promise<ScheduleRunRecord>;
38
37
  /** Runs a manually dispatchable static Schedule Definition of `registry` immediately. */
39
38
  declare function runScheduleFrom(registry: ScheduleDefinitionRegistry, name: string, options?: RunScheduleOptions): Promise<ScheduleRunRecord>;
40
- //#endregion
41
- //#region src/runtime/store.d.ts
42
39
  interface KVScheduleStoreOptions {
43
40
  kvStore: ScheduleKVStorage;
44
41
  prefix?: string;
45
42
  }
46
43
  declare function createMemoryScheduleRunStore(): ScheduleRunStore;
47
44
  declare function createKVScheduleRunStore(options: KVScheduleStoreOptions): ScheduleRunStore;
48
- //#endregion
49
45
  export { createScheduleRun as a, runScheduleFrom as c, RunScheduleOptions as i, createKVScheduleRunStore as n, executeSchedule as o, createMemoryScheduleRunStore as r, executeStaticSchedule as s, KVScheduleStoreOptions as t };
@@ -1,4 +1,4 @@
1
- //#region ../internal/src/runtime/time-zone.ts
1
+ // ../internal/src/runtime/time-zone.ts
2
2
  const slashlessIanaTimeZones = /* @__PURE__ */ new Set([
3
3
  "CET",
4
4
  "CST6CDT",
@@ -55,5 +55,4 @@ function isIanaTimeZone(timeZone) {
55
55
  return false;
56
56
  }
57
57
  }
58
- //#endregion
59
58
  export { isIanaTimeZone as t };
@@ -1,5 +1,4 @@
1
1
  import { SerializedResponse } from "@vite-hub/runtime";
2
- //#region src/types.d.ts
3
2
  interface ScheduleRunContext {
4
3
  id: string;
5
4
  attemptId?: string;
@@ -163,5 +162,4 @@ interface StartedScheduleStore {
163
162
  list: () => Promise<StartedSchedule[]>;
164
163
  put: (schedule: StartedSchedule) => Promise<void>;
165
164
  }
166
- //#endregion
167
165
  export { StartScheduleOptions as _, ScheduleDefinitionRegistry as a, StartedScheduleStore as b, ScheduleRunAttemptRecord as c, ScheduleRunError as d, ScheduleRunListOptions as f, ScheduleRunStore as g, ScheduleRunStatus as h, ScheduleDefinitionOptions as i, ScheduleRunAttemptStatus as l, ScheduleRunResponse as m, ScheduleDefinition as n, ScheduleHandler as o, ScheduleRunRecord as p, ScheduleDefinitionInput as r, ScheduleRegistryDefinition as s, DiscoveredScheduleDefinition as t, ScheduleRunContext as u, StartScheduleTiming as v, StartedSchedule as y };
package/dist/vite.d.ts CHANGED
@@ -1,11 +1,8 @@
1
- import { t as DiscoveredScheduleDefinition } from "./types-Cw5LjPuc.js";
2
- import { n as OperationContributionEntry } from "./operation-definition-CI2PJGqu.js";
3
- import { i as ViteHubInspectionPluginMetadata, n as ViteHubConsoleRuntimeRecordTableSection, r as ViteHubDefinitionSummary } from "./console-DueeEBcM.js";
4
- //#region ../internal/src/deployment.d.ts
1
+ import { i as ViteHubInspectionPluginMetadata, n as ViteHubConsoleRuntimeRecordTableSection, r as ViteHubDefinitionSummary } from "./console-BdlDJUfS.js";
2
+ import { n as OperationContributionEntry } from "./operation-definition-CqZkx1Rm.js";
3
+ import { t as DiscoveredScheduleDefinition } from "./types-DTVPVY5O.js";
5
4
  /** The host that ViteHub builds for: the `host` option of `vitehub()` and the value of `VITEHUB_HOST`. */
6
5
  type ViteHubHost = "cloudflare" | "deno" | "netlify" | "node" | "vercel";
7
- //#endregion
8
- //#region ../internal/src/build/deployment-plan-output.d.ts
9
6
  /**
10
7
  * One set of host variables that the deployed app reads, as `deployment.json` lists it: a Server Env declaration, or
11
8
  * a variable that a primitive reads itself, such as `VITEHUB_SECRET` or `BLOB_READ_WRITE_TOKEN`.
@@ -35,8 +32,6 @@ interface DeploymentEnvContext {
35
32
  * Return names only, never values.
36
33
  */
37
34
  type DeploymentEnvContribution = (context: DeploymentEnvContext) => readonly DeploymentEnvEntry[];
38
- //#endregion
39
- //#region ../internal/src/durability.d.ts
40
35
  /**
41
36
  * One durability reporter that a primitive's Vite plugin contributes through `vitehub.durability`. The Node server
42
37
  * imports `export` from `module` at boot and calls it with `input` and the server environment. It returns the
@@ -59,8 +54,6 @@ interface DurabilityPluginMetadata {
59
54
  /** Called after Vite resolves the config. Return an empty list when the primitive is off. */
60
55
  durability?: () => readonly DurabilityContribution[];
61
56
  }
62
- //#endregion
63
- //#region ../internal/src/contributions.d.ts
64
57
  /** Module and export that hold a contributed Definition. */
65
58
  interface ContributionDefinition {
66
59
  /**
@@ -115,8 +108,6 @@ interface CollectedContribution {
115
108
  /** Name of the contributing Vite plugin. */
116
109
  plugin: string;
117
110
  }
118
- //#endregion
119
- //#region src/contributions.d.ts
120
111
  /**
121
112
  * A Schedule Definition that another package adds from its Vite plugin. The Schedule plugin merges it with the
122
113
  * discovered files, so provider wake output, the Process Runtime, `vitehub schedule run`, inspection,
@@ -139,8 +130,6 @@ type CollectedScheduleContribution = CollectedContribution;
139
130
  * `SCHEDULE_B0006`. Invalid entries fail with `SCHEDULE_B0007`.
140
131
  */
141
132
  export declare function collectScheduleContributions(plugins: readonly unknown[] | undefined, context: ScheduleContributionContext): Promise<CollectedScheduleContribution[]>;
142
- //#endregion
143
- //#region src/discovery.d.ts
144
133
  /** Discovery source of Schedule Definitions that Vite plugins contribute through `vitehub.schedules`. */
145
134
  export declare const contributedScheduleSource = "vite-plugin-contribution";
146
135
  interface ScheduleDiscoveryOptions {
@@ -164,8 +153,6 @@ type DiscoverScheduleDefinitionsOptions = ScheduleDiscoveryOptions | {
164
153
  export declare function discoverScheduleDefinitions(options: DiscoverScheduleDefinitionsOptions): DiscoveredScheduleDefinition[];
165
154
  /** Discovers the Schedule Definitions without `cron`. Only `startSchedule()` runs them. */
166
155
  export declare function discoverStartableScheduleDefinitions(options: DiscoverScheduleDefinitionsOptions): DiscoveredScheduleDefinition[];
167
- //#endregion
168
- //#region src/inspect.d.ts
169
156
  interface ScheduleInspectionOptions {
170
157
  /** Cron per Schedule name that this build's host runs in place of the declared cron. */
171
158
  cron?: Readonly<Record<string, string>>;
@@ -188,8 +175,6 @@ export declare function inspectScheduleDefinitions(options: ScheduleInspectionOp
188
175
  * that a runtime recorded.
189
176
  */
190
177
  export declare const scheduleConsoleSection: ViteHubConsoleRuntimeRecordTableSection<ScheduleInspectionOptions>;
191
- //#endregion
192
- //#region src/vite.d.ts
193
178
  export declare function readScheduleDefinitionCrons(definitions: DiscoveredScheduleDefinition[]): Promise<Map<string, string>>;
194
179
  export interface ScheduleProcessRuntimeOptions {
195
180
  catchUpMs?: number;
@@ -253,5 +238,4 @@ type NitroConfig = Record<string, unknown> & {
253
238
  };
254
239
  export declare function createScheduleNitroConfig(options?: ScheduleNitroConfigOptions): Promise<NitroConfig | null>;
255
240
  export declare function hubSchedule(options?: ScheduleOptions): ScheduleVitePlugin;
256
- //#endregion
257
241
  export type { CollectedScheduleContribution, ScheduleContributingPlugin, ScheduleContribution, ScheduleContributionContext, ScheduleContributionFactory, ScheduleDiscoveryOptions, ScheduleInspectionOptions };