@vite-hub/workflow 0.0.1 → 0.0.2

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 (37) hide show
  1. package/README.md +56 -6
  2. package/dist/{cloudflare-env-BVUMOgFK.d.ts → cloudflare-env-CIjdFTv6.d.ts} +2 -1
  3. package/dist/{cloudflare-env-g0Rf3ClH.js → cloudflare-env-mFp2Uj6Z.js} +7 -3
  4. package/dist/{cloudflare-vite-DcM5YVTP.js → cloudflare-vite-B0zel2Do.js} +4 -5
  5. package/dist/{config-DkgsQuXz.js → config-BDqB6I4E.js} +43 -5
  6. package/dist/index.d.ts +43 -18
  7. package/dist/index.js +99 -111
  8. package/dist/provider-operation-CWIV4k42.js +62 -0
  9. package/dist/runtime/cloudflare-runner.d.ts +2 -2
  10. package/dist/runtime/cloudflare-runner.js +15 -14
  11. package/dist/runtime/cloudflare-shared.d.ts +2 -2
  12. package/dist/runtime/cloudflare-shared.js +2 -2
  13. package/dist/runtime/cloudflare-vite.d.ts +3 -3
  14. package/dist/runtime/cloudflare-vite.js +1 -1
  15. package/dist/runtime/execute.d.ts +1 -1
  16. package/dist/runtime/openworkflow-worker.d.ts +4 -2
  17. package/dist/runtime/openworkflow-worker.js +63 -6
  18. package/dist/runtime/openworkflow.d.ts +22 -1
  19. package/dist/runtime/openworkflow.js +110 -37
  20. package/dist/runtime/state.d.ts +1 -1
  21. package/dist/runtime/vercel-vite.d.ts +58 -3
  22. package/dist/runtime/vercel-vite.js +3 -2
  23. package/dist/{types-ThDitg7Z.d.ts → types-BUlYBZwH.d.ts} +48 -6
  24. package/dist/vercel-D2_J5D_Y.js +217 -0
  25. package/dist/vite.d.ts +2 -5
  26. package/dist/vite.js +1678 -144
  27. package/package.json +45 -48
  28. package/dist/module-UYEnVfxy.js +0 -1546
  29. package/dist/nitro.d.ts +0 -19
  30. package/dist/nitro.js +0 -2
  31. package/dist/openworkflow-amN7IkGO.d.ts +0 -24
  32. package/dist/runtime/nitro-plugin.d.ts +0 -6
  33. package/dist/runtime/nitro-plugin.js +0 -14
  34. /package/dist/{_app-BVWpnNHo.d.ts → _app-DgwN4ulW.d.ts} +0 -0
  35. /package/dist/{app-BE3EYOWn.js → app-BZpq2cwC.js} +0 -0
  36. /package/dist/{cloudflare-CeHVSHoN.js → cloudflare-Cds1VIWa.js} +0 -0
  37. /package/dist/{cloudflare-shared-BIeY2kak.d.ts → cloudflare-shared-BVVgDSdq.d.ts} +0 -0
package/dist/nitro.d.ts DELETED
@@ -1,19 +0,0 @@
1
- import { l as ResolvedWorkflowOptions, y as WorkflowModuleOptions } from "./types-ThDitg7Z.js";
2
- import { NitroModule } from "nitro/types";
3
-
4
- //#region src/nitro/module.d.ts
5
- declare const workflowNitroModule: NitroModule;
6
- declare module "nitro/types" {
7
- interface NitroConfig {
8
- workflow?: WorkflowModuleOptions;
9
- }
10
- interface NitroOptions {
11
- workflow?: WorkflowModuleOptions;
12
- }
13
- interface NitroRuntimeConfig {
14
- hosting?: string;
15
- workflow?: false | ResolvedWorkflowOptions;
16
- }
17
- }
18
- //#endregion
19
- export { workflowNitroModule as default };
package/dist/nitro.js DELETED
@@ -1,2 +0,0 @@
1
- import { t as workflowNitroModule } from "./module-UYEnVfxy.js";
2
- export { workflowNitroModule as default };
@@ -1,24 +0,0 @@
1
- import { f as WorkflowDeferOptions, l as ResolvedWorkflowOptions, p as WorkflowDefinition, w as WorkflowRun } from "./types-ThDitg7Z.js";
2
- import * as _$openworkflow from "openworkflow";
3
- import * as _$openworkflow_postgres0 from "openworkflow/postgres";
4
-
5
- //#region src/runtime/openworkflow.d.ts
6
- type OpenWorkflowModule = typeof _$openworkflow;
7
- type OpenWorkflowPostgresModule = typeof _$openworkflow_postgres0;
8
- type OpenWorkflowClient = InstanceType<OpenWorkflowModule["OpenWorkflow"]>;
9
- type OpenWorkflowBackend = Awaited<ReturnType<OpenWorkflowPostgresModule["BackendPostgres"]["connect"]>>;
10
- type OpenWorkflowRunnable = ReturnType<OpenWorkflowClient["defineWorkflow"]>;
11
- type OpenWorkflowImporter = <T>(specifier: string) => Promise<T>;
12
- interface OpenWorkflowRuntime {
13
- backend: OpenWorkflowBackend;
14
- client: OpenWorkflowClient;
15
- workflows: Map<string, OpenWorkflowRunnable>;
16
- }
17
- declare function getOpenWorkflowRuntime(config: ResolvedWorkflowOptions): Promise<OpenWorkflowRuntime>;
18
- declare function registerOpenWorkflowDefinition(runtime: OpenWorkflowRuntime, name: string, definition: WorkflowDefinition): Promise<OpenWorkflowRunnable>;
19
- declare function runOpenWorkflow<TPayload = unknown, TResult = unknown>(config: ResolvedWorkflowOptions, name: string, payload: TPayload | undefined, definition: WorkflowDefinition<TPayload, TResult>, options: WorkflowDeferOptions): Promise<WorkflowRun<TPayload, TResult>>;
20
- declare function getOpenWorkflowRun<TPayload = unknown, TResult = unknown>(config: ResolvedWorkflowOptions, name: string, id: string): Promise<WorkflowRun<TPayload, TResult>>;
21
- declare function resetOpenWorkflowRuntime(): Promise<void>;
22
- declare function setOpenWorkflowImporter(importer: OpenWorkflowImporter): void;
23
- //#endregion
24
- export { runOpenWorkflow as a, resetOpenWorkflowRuntime as i, getOpenWorkflowRuntime as n, setOpenWorkflowImporter as o, registerOpenWorkflowDefinition as r, getOpenWorkflowRun as t };
@@ -1,6 +0,0 @@
1
- import { definePlugin } from "nitro";
2
-
3
- //#region src/runtime/nitro-plugin.d.ts
4
- declare const workflowNitroPlugin: ReturnType<typeof definePlugin>;
5
- //#endregion
6
- export { workflowNitroPlugin as default };
@@ -1,14 +0,0 @@
1
- import { enterWorkflowRuntimeEvent, setWorkflowRuntimeConfig, setWorkflowRuntimeRegistry } from "./state.js";
2
- import { definePlugin } from "nitro";
3
- import { useRuntimeConfig } from "nitro/runtime-config";
4
- import workflowRegistry from "#vitehub/workflow/registry";
5
- //#region src/runtime/nitro-plugin.ts
6
- const workflowNitroPlugin = definePlugin((nitroApp) => {
7
- setWorkflowRuntimeConfig(useRuntimeConfig().workflow);
8
- setWorkflowRuntimeRegistry(workflowRegistry);
9
- nitroApp.hooks.hook("request", (event) => {
10
- enterWorkflowRuntimeEvent(event);
11
- });
12
- });
13
- //#endregion
14
- export { workflowNitroPlugin as default };
File without changes
File without changes