@teamkeel/functions-runtime 0.413.7 → 0.413.9
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/index.cjs +1 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -8
- package/dist/index.js.map +1 -1
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -11,10 +11,10 @@ import { sql as sql3 } from "kysely";
|
|
|
11
11
|
// src/database.ts
|
|
12
12
|
import { Kysely, PostgresDialect } from "kysely";
|
|
13
13
|
import * as neon from "@neondatabase/serverless";
|
|
14
|
-
import { AsyncLocalStorage as AsyncLocalStorage2 } from "
|
|
14
|
+
import { AsyncLocalStorage as AsyncLocalStorage2 } from "async_hooks";
|
|
15
15
|
|
|
16
16
|
// src/auditing.js
|
|
17
|
-
import { AsyncLocalStorage } from "
|
|
17
|
+
import { AsyncLocalStorage } from "async_hooks";
|
|
18
18
|
import TraceParent from "traceparent";
|
|
19
19
|
import { sql, SelectionNode } from "kysely";
|
|
20
20
|
var auditContextStorage = new AsyncLocalStorage();
|
|
@@ -354,7 +354,7 @@ __name(spanNameForModelAPI, "spanNameForModelAPI");
|
|
|
354
354
|
|
|
355
355
|
// src/database.ts
|
|
356
356
|
import WebSocket from "ws";
|
|
357
|
-
import { readFileSync } from "
|
|
357
|
+
import { readFileSync } from "fs";
|
|
358
358
|
var dbInstance = new AsyncLocalStorage2();
|
|
359
359
|
var vitestDb = null;
|
|
360
360
|
async function withDatabase(db, requiresTransaction, cb) {
|
|
@@ -2762,10 +2762,6 @@ async function handleFlow(request, config) {
|
|
|
2762
2762
|
db = createDatabaseClient({
|
|
2763
2763
|
connString: request.meta?.secrets?.KEEL_DB_CONN
|
|
2764
2764
|
});
|
|
2765
|
-
const flowRun = await db.selectFrom("keel.flow_run").where("id", "=", runId).selectAll().executeTakeFirst();
|
|
2766
|
-
if (!flowRun) {
|
|
2767
|
-
throw new Error("no flow run found");
|
|
2768
|
-
}
|
|
2769
2765
|
const ctx = createFlowContext(
|
|
2770
2766
|
request.meta.runId,
|
|
2771
2767
|
request.meta.data,
|
|
@@ -2786,7 +2782,7 @@ async function handleFlow(request, config) {
|
|
|
2786
2782
|
return stage;
|
|
2787
2783
|
})
|
|
2788
2784
|
};
|
|
2789
|
-
const inputs = parseInputs(
|
|
2785
|
+
const inputs = parseInputs(request.meta?.inputs);
|
|
2790
2786
|
try {
|
|
2791
2787
|
await tryExecuteFlow(db, async () => {
|
|
2792
2788
|
return flowFunction(ctx, inputs);
|