octaflow 0.29.1 → 0.29.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.
- package/dist/pg-boss/index.d.ts +2 -2
- package/dist/pg-boss/index.js +26 -1
- package/package.json +9 -9
package/dist/pg-boss/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import "../index-B8SvtiYn.js";
|
|
|
2
2
|
import { n as Logger } from "../logger-BCus3AOa.js";
|
|
3
3
|
import { r as Dispatcher } from "../dispatcher-B4haXU4w.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
-
import { PgBoss } from "pg-boss";
|
|
5
|
+
import { PgBoss, Schedule } from "pg-boss";
|
|
6
6
|
//#region src/pg-boss/payload.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* The wire payload for a step job. It is the flow-core `DispatchStepPayload`
|
|
@@ -193,7 +193,7 @@ export declare function createPgBossScheduler(deps: PgBossSchedulerDeps): {
|
|
|
193
193
|
/** Remove a schedule by key. */
|
|
194
194
|
unschedule(key: string): Promise<void>;
|
|
195
195
|
/** List the schedules registered on this queue. */
|
|
196
|
-
list(): Promise<
|
|
196
|
+
list(): Promise<Schedule[]>;
|
|
197
197
|
};
|
|
198
198
|
/**
|
|
199
199
|
* Invoked for each start job — typically resolves the type and calls `engine.startWorkflow`.
|
package/dist/pg-boss/index.js
CHANGED
|
@@ -334,6 +334,8 @@ async function ensureStartQueue(boss, queueName) {
|
|
|
334
334
|
throw e;
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
|
+
/** Rows asked for per `getSchedules()` call: pg-boss's default page. */
|
|
338
|
+
const SCHEDULE_PAGE = 1e3;
|
|
337
339
|
/** Registers cron schedules that enqueue workflow-start jobs. */
|
|
338
340
|
function createPgBossScheduler(deps) {
|
|
339
341
|
const { boss, queueName, partitionKey } = deps;
|
|
@@ -367,7 +369,30 @@ function createPgBossScheduler(deps) {
|
|
|
367
369
|
},
|
|
368
370
|
/** List the schedules registered on this queue. */
|
|
369
371
|
async list() {
|
|
370
|
-
|
|
372
|
+
const all = [];
|
|
373
|
+
const seen = /* @__PURE__ */ new Set();
|
|
374
|
+
let after;
|
|
375
|
+
for (;;) {
|
|
376
|
+
const page = await boss.getSchedules(void 0, void 0, {
|
|
377
|
+
limit: SCHEDULE_PAGE,
|
|
378
|
+
...after ? { after } : {}
|
|
379
|
+
});
|
|
380
|
+
let fresh = 0;
|
|
381
|
+
for (const s of page) {
|
|
382
|
+
const id = `${s.name}\u0000${s.key}`;
|
|
383
|
+
if (seen.has(id)) continue;
|
|
384
|
+
seen.add(id);
|
|
385
|
+
all.push(s);
|
|
386
|
+
fresh++;
|
|
387
|
+
}
|
|
388
|
+
const last = page.at(-1);
|
|
389
|
+
if (page.length < SCHEDULE_PAGE || fresh === 0 || !last) break;
|
|
390
|
+
after = {
|
|
391
|
+
name: last.name,
|
|
392
|
+
key: last.key
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
return all.filter((s) => s.name === queueName);
|
|
371
396
|
}
|
|
372
397
|
};
|
|
373
398
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "octaflow",
|
|
3
|
-
"version": "0.29.
|
|
3
|
+
"version": "0.29.2",
|
|
4
4
|
"description": "Durable DAG workflow engine: Zod-typed steps over Postgres + pg-boss, with an optional AI add-on (token/cost/quota). Layered single package.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -117,22 +117,22 @@
|
|
|
117
117
|
}
|
|
118
118
|
},
|
|
119
119
|
"devDependencies": {
|
|
120
|
-
"@ai-sdk/anthropic": "^4.0.
|
|
121
|
-
"@ai-sdk/mistral": "^4.0.
|
|
122
|
-
"@ai-sdk/openai": "^4.0.
|
|
123
|
-
"@ai-sdk/openai-compatible": "^3.0.
|
|
124
|
-
"@ai-sdk/provider": "^4.0.
|
|
120
|
+
"@ai-sdk/anthropic": "^4.0.81",
|
|
121
|
+
"@ai-sdk/mistral": "^4.0.65",
|
|
122
|
+
"@ai-sdk/openai": "^4.0.95",
|
|
123
|
+
"@ai-sdk/openai-compatible": "^3.0.70",
|
|
124
|
+
"@ai-sdk/provider": "^4.0.28",
|
|
125
125
|
"@testcontainers/postgresql": "^12.2.1",
|
|
126
126
|
"@types/node": "^26.6.5",
|
|
127
127
|
"@types/pg": "^8.23.1",
|
|
128
|
-
"ai": "^7.0.
|
|
128
|
+
"ai": "^7.0.142",
|
|
129
129
|
"drizzle-orm": "^0.45.4",
|
|
130
130
|
"pg": "^8.23.1",
|
|
131
|
-
"pg-boss": "^12.
|
|
131
|
+
"pg-boss": "^12.38.0",
|
|
132
132
|
"testcontainers": "^12.2.1",
|
|
133
133
|
"tsdown": "^0.23.1",
|
|
134
134
|
"typescript": "^7.0.2",
|
|
135
|
-
"vitest": "^5.0.
|
|
135
|
+
"vitest": "^5.0.5",
|
|
136
136
|
"zod": "^4.6.7"
|
|
137
137
|
},
|
|
138
138
|
"scripts": {
|