@vite-hub/workflow 0.6.1 → 0.8.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.
- package/README.md +33 -9
- package/dist/{app-DXUHElAz.js → app-Cpa9qCXr.js} +1 -1
- package/dist/{client-CbBg4HlH.js → client-T41cNf3k.js} +41 -52
- package/dist/cloudflare-concurrency-counter-CDHHiMfn.js +136 -0
- package/dist/{config-CizNRTMi.js → config-G0z9jHLM.js} +6 -6
- package/dist/definition.d.ts +1 -1
- package/dist/definition.js +4 -1
- package/dist/{delay-CtT3442d.js → delay-B4azP18B.js} +7 -5
- package/dist/durability.d.ts +3 -1
- package/dist/durability.js +7 -1
- package/dist/{error-diagnostics--2cV_ER1.js → error-diagnostics-35AEmfve.js} +25 -5
- package/dist/{error-diagnostics-kKXseq8d.js → error-diagnostics-CsiNo_oI.js} +3 -3
- package/dist/{errors-CJZuvOcx.d.ts → errors-DwKy5MQ8.d.ts} +1 -1
- package/dist/execute-zu08sWGG.js +353 -0
- package/dist/index.d.ts +12 -10
- package/dist/index.js +3 -3
- package/dist/{openworkflow-defaults-DfQWtSRU.js → invariant-Dj2R1eMr.js} +1 -4
- package/dist/{openworkflow-CdKbUGGa.d.ts → openworkflow-DHuxMJQB.d.ts} +23 -4
- package/dist/openworkflow-defaults-1n0DbLdb.js +4 -0
- package/dist/openworkflow-zD8luED5.js +749 -0
- package/dist/{operation-definition-CqZkx1Rm.d.ts → operations-Blwi3jQF.d.ts} +1 -0
- package/dist/{operations-BBTmDm2H.js → operations-C2XbDDDV.js} +71 -15
- package/dist/operations.d.ts +3 -59
- package/dist/operations.js +5 -5
- package/dist/results-DqbEUMCH.d.ts +60 -0
- package/dist/{run-error-8p4BtTMv.js → run-error-zZh1_IBo.js} +5 -21
- package/dist/runtime/cloudflare-concurrency.d.ts +21 -0
- package/dist/runtime/cloudflare-concurrency.js +21 -0
- package/dist/runtime/cloudflare-runner.d.ts +1 -1
- package/dist/runtime/cloudflare-runner.js +7 -3
- package/dist/runtime/cloudflare-vite.d.ts +1 -1
- package/dist/runtime/cloudflare-vite.js +2 -2
- package/dist/runtime/execute.d.ts +8 -2
- package/dist/runtime/execute.js +1 -278
- package/dist/runtime/openworkflow-worker.d.ts +2 -2
- package/dist/runtime/openworkflow-worker.js +5 -6
- package/dist/runtime/openworkflow.d.ts +2 -2
- package/dist/runtime/openworkflow.js +1 -481
- package/dist/runtime/state.d.ts +1 -1
- package/dist/runtime/state.js +2 -2
- package/dist/runtime/vercel-vite.d.ts +1 -1
- package/dist/runtime/vercel-vite.js +2 -2
- package/dist/{signals-BHQdxoJo.js → signals-CdaxRNjN.js} +1 -1
- package/dist/{types-DvYcvbPG.d.ts → types-DrhUXMsE.d.ts} +34 -4
- package/dist/{vercel-Cw_Z9-j4.js → vercel-DRezYOUp.js} +8 -6
- package/dist/vite.d.ts +19 -4
- package/dist/vite.js +970 -212
- package/package.json +3 -3
- package/dist/cloudflare-Sgywkm1N.js +0 -57
package/dist/vite.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as OperationContributionEntry } from "./
|
|
2
|
-
import {
|
|
1
|
+
import { n as OperationContributionEntry } from "./operations-Blwi3jQF.js";
|
|
2
|
+
import { D as WorkflowOptions, a as DiscoveredWorkflowDefinition } from "./types-DrhUXMsE.js";
|
|
3
3
|
import { Plugin, ResolvedConfig, Rolldown, UserConfig } from "vite";
|
|
4
|
-
type WorkflowRuntimeModuleName = "cloudflare-runner" | "cloudflare-vite" | "dev-runs" | "execute" | "openworkflow-worker" | "state" | "vercel-vite";
|
|
4
|
+
type WorkflowRuntimeModuleName = "cloudflare-concurrency" | "cloudflare-runner" | "cloudflare-vite" | "dev-runs" | "execute" | "openworkflow-worker" | "state" | "vercel-vite";
|
|
5
5
|
/**
|
|
6
6
|
* The file path of a Workflow runtime module. Generated code imports it by path, so it needs no package export.
|
|
7
7
|
* Schedule and Agent output receive these paths from the Workflow plugin.
|
|
@@ -149,6 +149,7 @@ type NitroPackageLoadingOptions = {
|
|
|
149
149
|
};
|
|
150
150
|
export declare function discoverWorkflowDefinitions(options: {
|
|
151
151
|
mode?: "vite-suffix" | "standalone";
|
|
152
|
+
projectRoot?: string;
|
|
152
153
|
rootDir: string;
|
|
153
154
|
scanDirs?: string[];
|
|
154
155
|
serverDirs?: string[];
|
|
@@ -516,7 +517,20 @@ interface WorkflowNitroConfigOptions {
|
|
|
516
517
|
transformRegistry?: (code: string, id: string) => string | Promise<string>;
|
|
517
518
|
viteConfig?: UserConfig;
|
|
518
519
|
}
|
|
519
|
-
|
|
520
|
+
type WorkflowNitro = Parameters<ProviderOutputEnvironmentOwner["nitro"]["setup"]>[0] & {
|
|
521
|
+
options: {
|
|
522
|
+
alias?: Record<string, string>;
|
|
523
|
+
};
|
|
524
|
+
hooks?: {
|
|
525
|
+
hook: (name: "compiled", callback: () => Promise<void>) => unknown;
|
|
526
|
+
};
|
|
527
|
+
};
|
|
528
|
+
export type WorkflowVitePlugin = Plugin & {
|
|
529
|
+
nitro?: {
|
|
530
|
+
name: string;
|
|
531
|
+
setup: (nitro: WorkflowNitro) => void;
|
|
532
|
+
};
|
|
533
|
+
} & {
|
|
520
534
|
/** The variables that Workflow reads on the deployed host. See `workflowDeploymentEnv()`. */
|
|
521
535
|
api: {
|
|
522
536
|
deploymentEnv: DeploymentEnvContribution;
|
|
@@ -525,6 +539,7 @@ export type WorkflowVitePlugin = Plugin & Partial<Pick<ProviderOutputEnvironment
|
|
|
525
539
|
operations?: readonly OperationContributionEntry[];
|
|
526
540
|
workflow?: {
|
|
527
541
|
createNitroConfig?: (options: WorkflowNitroConfigOptions) => Promise<Record<string, unknown>>;
|
|
542
|
+
prepareSeparateNitroBuild?: (config: ResolvedConfig) => void;
|
|
528
543
|
prepareScheduleRuntime?: (artifactDir?: string, config?: ResolvedConfig) => Promise<{
|
|
529
544
|
bundleAlias: Record<string, string>;
|
|
530
545
|
bundlePlugins?: Rolldown.Plugin[];
|