@vite-hub/schedule 0.0.3 → 0.0.4

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/vite.d.ts CHANGED
@@ -1,4 +1,8 @@
1
+ import { t as DiscoveredScheduleDefinition } from "./types-Bcje4dLV.js";
2
+ import { t as discoverScheduleDefinitions } from "./discovery-DkFAN7Wd.js";
3
+
1
4
  //#region src/vite.d.ts
5
+ declare function readScheduleDefinitionCrons(definitions: DiscoveredScheduleDefinition[]): Promise<Map<string, string>>;
2
6
  interface ScheduleProcessRuntimeOptions {
3
7
  concurrency?: number;
4
8
  driver: "process";
@@ -12,6 +16,8 @@ interface ScheduleVitePluginOptions {
12
16
  }
13
17
  interface ScheduleNitroConfigOptions extends ScheduleVitePluginOptions {
14
18
  command?: "build" | "serve";
19
+ /** @internal Resolve generated Nitro registrations from the ViteHub project root. */
20
+ nitroOwnsPaths?: boolean;
15
21
  nitro?: unknown;
16
22
  root?: string;
17
23
  /** @internal Framework-resolved server definition directories. */
@@ -31,8 +37,16 @@ type NitroConfig = Record<string, unknown> & {
31
37
  } & Record<string, unknown>;
32
38
  modules?: unknown[];
33
39
  plugins?: unknown[];
40
+ vercel?: {
41
+ config?: {
42
+ crons?: Array<{
43
+ path: string;
44
+ schedule: string;
45
+ }>;
46
+ } & Record<string, unknown>;
47
+ } & Record<string, unknown>;
34
48
  };
35
49
  declare function createScheduleNitroConfig(options?: ScheduleNitroConfigOptions): Promise<NitroConfig | null>;
36
50
  declare function hubSchedule(options?: ScheduleVitePluginOptions): ScheduleVitePlugin;
37
51
  //#endregion
38
- export { ScheduleNitroConfigOptions, ScheduleProcessRuntimeOptions, ScheduleVitePlugin, ScheduleVitePluginOptions, createScheduleNitroConfig, hubSchedule };
52
+ export { ScheduleNitroConfigOptions, ScheduleProcessRuntimeOptions, ScheduleVitePlugin, ScheduleVitePluginOptions, createScheduleNitroConfig, discoverScheduleDefinitions, hubSchedule, readScheduleDefinitionCrons };
package/dist/vite.js CHANGED
@@ -1,2 +1,3 @@
1
- import { n as hubSchedule, t as createScheduleNitroConfig } from "./vite-BX6_KiRw.js";
2
- export { createScheduleNitroConfig, hubSchedule };
1
+ import { t as discoverScheduleDefinitions } from "./discovery-DvU3B6iD.js";
2
+ import { n as hubSchedule, r as readScheduleDefinitionCrons, t as createScheduleNitroConfig } from "./vite-BHs17nWX.js";
3
+ export { createScheduleNitroConfig, discoverScheduleDefinitions, hubSchedule, readScheduleDefinitionCrons };
@@ -5,7 +5,7 @@ function createLocalWaitUntil() {
5
5
  let failed = false;
6
6
  return {
7
7
  async flush() {
8
- while (pending.size > 0) await Promise.allSettled([...pending]);
8
+ while (pending.size > 0) await Promise.allSettled(pending);
9
9
  if (failed) throw error;
10
10
  },
11
11
  waitUntil(value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vite-hub/schedule",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "Schedule primitives and definition discovery for ViteHub.",
5
5
  "keywords": [
6
6
  "cron",
@@ -36,24 +36,24 @@
36
36
  "./package.json": "./package.json"
37
37
  },
38
38
  "dependencies": {
39
+ "@vite-hub/runtime": "0.0.4",
39
40
  "cron-schedule": "^6.0.0",
40
41
  "effect": "4.0.0-beta.99",
41
- "esbuild": "^0.28.1",
42
- "@vite-hub/runtime": "0.0.3"
42
+ "esbuild": "^0.28.1"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@types/node": "^24.13.3",
46
+ "@vite-hub/kv": "0.0.4",
46
47
  "publint": "^0.3.21",
47
48
  "typescript": "^6.0.3",
48
49
  "vite": "^8.0.8",
49
50
  "vite-plus": "^0.1.24",
50
51
  "vitest": "^4.1.4",
51
- "@vite-hub/kv": "0.0.3",
52
52
  "@vite-hub/internal": "0.0.1"
53
53
  },
54
54
  "peerDependencies": {
55
- "vite": ">=8.0.0",
56
- "@vite-hub/kv": "0.0.3"
55
+ "@vite-hub/kv": "0.0.4",
56
+ "vite": ">=8.0.0"
57
57
  },
58
58
  "peerDependenciesMeta": {
59
59
  "@vite-hub/kv": {