@voyant-travel/workflows-orchestrator 0.118.0 → 0.119.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.
@@ -65,7 +65,7 @@ export async function loadPostgresMigrations(dir) {
65
65
  return migrations;
66
66
  }
67
67
  export function defaultMigrationsDir() {
68
- return fileURLToPath(new URL("../../drizzle", import.meta.url));
68
+ return fileURLToPath(new URL("../../migrations", import.meta.url));
69
69
  }
70
70
  function isAlreadyAppliedSchemaError(err) {
71
71
  const code = typeof err === "object" && err !== null && "code" in err
@@ -0,0 +1,26 @@
1
+ CREATE TABLE IF NOT EXISTS "voyant_snapshot_runs" (
2
+ "id" text PRIMARY KEY NOT NULL,
3
+ "workflow_id" text NOT NULL,
4
+ "status" text NOT NULL,
5
+ "started_at" bigint NOT NULL,
6
+ "completed_at" bigint,
7
+ "duration_ms" integer,
8
+ "tags" jsonb NOT NULL,
9
+ "result" jsonb NOT NULL,
10
+ "input" jsonb NOT NULL,
11
+ "entry_file" text,
12
+ "replay_of" text
13
+ );
14
+ --> statement-breakpoint
15
+ CREATE TABLE IF NOT EXISTS "voyant_wakeups" (
16
+ "run_id" text PRIMARY KEY NOT NULL,
17
+ "wake_at" bigint NOT NULL,
18
+ "lease_owner" text,
19
+ "lease_expires_at" bigint,
20
+ "updated_at" bigint NOT NULL
21
+ );
22
+ --> statement-breakpoint
23
+ CREATE INDEX IF NOT EXISTS "voyant_snapshot_runs_workflow_started_idx" ON "voyant_snapshot_runs" USING btree ("workflow_id","started_at");--> statement-breakpoint
24
+ CREATE INDEX IF NOT EXISTS "voyant_snapshot_runs_status_started_idx" ON "voyant_snapshot_runs" USING btree ("status","started_at");--> statement-breakpoint
25
+ CREATE INDEX IF NOT EXISTS "voyant_wakeups_due_idx" ON "voyant_wakeups" USING btree ("wake_at");--> statement-breakpoint
26
+ CREATE INDEX IF NOT EXISTS "voyant_wakeups_lease_idx" ON "voyant_wakeups" USING btree ("lease_expires_at");
@@ -0,0 +1 @@
1
+ ALTER TABLE "voyant_snapshot_runs" ADD COLUMN IF NOT EXISTS "run_record" jsonb;
@@ -0,0 +1,2 @@
1
+ ALTER TABLE "voyant_snapshot_runs" ADD COLUMN IF NOT EXISTS "idempotency_key" text;--> statement-breakpoint
2
+ CREATE UNIQUE INDEX IF NOT EXISTS "voyant_snapshot_runs_idempotency_idx" ON "voyant_snapshot_runs" USING btree ("workflow_id","idempotency_key") WHERE "voyant_snapshot_runs"."idempotency_key" IS NOT NULL;
@@ -1,4 +1,4 @@
1
- CREATE TABLE "voyant_workflow_manifests" (
1
+ CREATE TABLE IF NOT EXISTS "voyant_workflow_manifests" (
2
2
  "environment" text NOT NULL,
3
3
  "version_id" text NOT NULL,
4
4
  "manifest" jsonb NOT NULL,
@@ -7,4 +7,4 @@ CREATE TABLE "voyant_workflow_manifests" (
7
7
  CONSTRAINT "voyant_workflow_manifests_environment_version_id_pk" PRIMARY KEY("environment","version_id")
8
8
  );
9
9
  --> statement-breakpoint
10
- CREATE UNIQUE INDEX "voyant_workflow_manifests_current_idx" ON "voyant_workflow_manifests" USING btree ("environment") WHERE "voyant_workflow_manifests"."is_current";
10
+ CREATE UNIQUE INDEX IF NOT EXISTS "voyant_workflow_manifests_current_idx" ON "voyant_workflow_manifests" USING btree ("environment") WHERE "voyant_workflow_manifests"."is_current";
@@ -0,0 +1,3 @@
1
+ ALTER TABLE "voyant_wakeups" ADD COLUMN IF NOT EXISTS "priority" integer DEFAULT 0 NOT NULL;--> statement-breakpoint
2
+ DROP INDEX IF EXISTS "voyant_wakeups_due_idx";--> statement-breakpoint
3
+ CREATE INDEX IF NOT EXISTS "voyant_wakeups_due_idx" ON "voyant_wakeups" USING btree ("priority" DESC,"wake_at" ASC);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voyant-travel/workflows-orchestrator",
3
- "version": "0.118.0",
3
+ "version": "0.119.0",
4
4
  "description": "Postgres self-host orchestrator runtime for Voyant Workflows — drives runs through the tenant step handler over the v1 wire protocol.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -40,7 +40,7 @@
40
40
  "types": "./dist/index.d.ts",
41
41
  "files": [
42
42
  "dist",
43
- "drizzle",
43
+ "migrations",
44
44
  "src",
45
45
  "!**/*.test.*",
46
46
  "!**/*.spec.*",
@@ -49,7 +49,7 @@
49
49
  "dependencies": {
50
50
  "drizzle-orm": "^0.45.2",
51
51
  "pg": "^8.22.0",
52
- "@voyant-travel/workflows": "^0.118.0"
52
+ "@voyant-travel/workflows": "^0.119.0"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@types/node": "^25.5.2",
@@ -91,7 +91,7 @@ export async function loadPostgresMigrations(dir: string): Promise<PostgresMigra
91
91
  }
92
92
 
93
93
  export function defaultMigrationsDir(): string {
94
- return fileURLToPath(new URL("../../drizzle", import.meta.url))
94
+ return fileURLToPath(new URL("../../migrations", import.meta.url))
95
95
  }
96
96
 
97
97
  function isAlreadyAppliedSchemaError(err: unknown): boolean {
@@ -1,26 +0,0 @@
1
- CREATE TABLE "voyant_snapshot_runs" (
2
- "id" text PRIMARY KEY NOT NULL,
3
- "workflow_id" text NOT NULL,
4
- "status" text NOT NULL,
5
- "started_at" bigint NOT NULL,
6
- "completed_at" bigint,
7
- "duration_ms" integer,
8
- "tags" jsonb NOT NULL,
9
- "result" jsonb NOT NULL,
10
- "input" jsonb NOT NULL,
11
- "entry_file" text,
12
- "replay_of" text
13
- );
14
- --> statement-breakpoint
15
- CREATE TABLE "voyant_wakeups" (
16
- "run_id" text PRIMARY KEY NOT NULL,
17
- "wake_at" bigint NOT NULL,
18
- "lease_owner" text,
19
- "lease_expires_at" bigint,
20
- "updated_at" bigint NOT NULL
21
- );
22
- --> statement-breakpoint
23
- CREATE INDEX "voyant_snapshot_runs_workflow_started_idx" ON "voyant_snapshot_runs" USING btree ("workflow_id","started_at");--> statement-breakpoint
24
- CREATE INDEX "voyant_snapshot_runs_status_started_idx" ON "voyant_snapshot_runs" USING btree ("status","started_at");--> statement-breakpoint
25
- CREATE INDEX "voyant_wakeups_due_idx" ON "voyant_wakeups" USING btree ("wake_at");--> statement-breakpoint
26
- CREATE INDEX "voyant_wakeups_lease_idx" ON "voyant_wakeups" USING btree ("lease_expires_at");
@@ -1 +0,0 @@
1
- ALTER TABLE "voyant_snapshot_runs" ADD COLUMN "run_record" jsonb;
@@ -1,2 +0,0 @@
1
- ALTER TABLE "voyant_snapshot_runs" ADD COLUMN "idempotency_key" text;--> statement-breakpoint
2
- CREATE UNIQUE INDEX "voyant_snapshot_runs_idempotency_idx" ON "voyant_snapshot_runs" USING btree ("workflow_id","idempotency_key") WHERE "voyant_snapshot_runs"."idempotency_key" IS NOT NULL;
@@ -1,3 +0,0 @@
1
- ALTER TABLE "voyant_wakeups" ADD COLUMN "priority" integer DEFAULT 0 NOT NULL;--> statement-breakpoint
2
- DROP INDEX "voyant_wakeups_due_idx";--> statement-breakpoint
3
- CREATE INDEX "voyant_wakeups_due_idx" ON "voyant_wakeups" USING btree ("priority" DESC,"wake_at" ASC);
File without changes
File without changes
File without changes
File without changes