@friggframework/core 2.0.0-next.80 → 2.0.0-next.81
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/CLAUDE.md +8 -0
- package/generated/prisma-mongodb/edge.js +3 -3
- package/generated/prisma-mongodb/index.d.ts +2 -2
- package/generated/prisma-mongodb/index.js +9 -9
- package/generated/prisma-mongodb/{query-engine-debian-openssl-3.0.x → libquery_engine-debian-openssl-3.0.x.so.node} +0 -0
- package/generated/prisma-mongodb/{query-engine-rhel-openssl-3.0.x → libquery_engine-rhel-openssl-3.0.x.so.node} +0 -0
- package/generated/prisma-mongodb/package.json +1 -1
- package/generated/prisma-mongodb/runtime/library.js +146 -0
- package/generated/prisma-mongodb/schema.prisma +7 -1
- package/generated/prisma-mongodb/wasm.js +3 -3
- package/generated/prisma-postgresql/edge.js +3 -3
- package/generated/prisma-postgresql/index.d.ts +6 -2
- package/generated/prisma-postgresql/index.js +9 -9
- package/generated/prisma-postgresql/{query-engine-debian-openssl-3.0.x → libquery_engine-debian-openssl-3.0.x.so.node} +0 -0
- package/generated/prisma-postgresql/{query-engine-rhel-openssl-3.0.x → libquery_engine-rhel-openssl-3.0.x.so.node} +0 -0
- package/generated/prisma-postgresql/package.json +1 -1
- package/generated/prisma-postgresql/runtime/library.js +146 -0
- package/generated/prisma-postgresql/schema.prisma +7 -1
- package/generated/prisma-postgresql/wasm.js +3 -3
- package/integrations/integration-router.js +2 -1
- package/integrations/repositories/process-repository-documentdb.js +68 -0
- package/integrations/repositories/process-repository-interface.js +46 -0
- package/integrations/repositories/process-repository-mongo.js +72 -0
- package/integrations/repositories/process-repository-postgres.js +163 -0
- package/integrations/repositories/process-update-ops-shared.js +112 -0
- package/integrations/use-cases/update-process-metrics.js +106 -102
- package/integrations/use-cases/update-process-state.js +58 -19
- package/modules/module.js +3 -1
- package/modules/requester/requester.js +145 -37
- package/modules/use-cases/get-module-instance-from-type.js +4 -1
- package/package.json +5 -5
- package/prisma-mongodb/schema.prisma +7 -1
- package/prisma-postgresql/migrations/20260422120000_add_entity_data_column/migration.sql +10 -0
- package/prisma-postgresql/migrations/20260422120001_create_process_table/migration.sql +48 -0
- package/prisma-postgresql/schema.prisma +7 -1
- package/generated/prisma-mongodb/runtime/binary.d.ts +0 -1
- package/generated/prisma-mongodb/runtime/binary.js +0 -289
- package/generated/prisma-postgresql/runtime/binary.d.ts +0 -1
- package/generated/prisma-postgresql/runtime/binary.js +0 -289
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
-- CreateTable
|
|
2
|
+
-- The Process model is declared in schema.prisma but was never created by
|
|
3
|
+
-- any prior migration. ProcessRepositoryPostgres (read/write) and
|
|
4
|
+
-- FriggProcessManager rely on this table for long-running job tracking —
|
|
5
|
+
-- e.g. fan-out sync progress, batch state machines. Without the table,
|
|
6
|
+
-- any `prisma.process.create` at runtime throws P2021.
|
|
7
|
+
CREATE TABLE "Process" (
|
|
8
|
+
"id" SERIAL NOT NULL,
|
|
9
|
+
"userId" INTEGER NOT NULL,
|
|
10
|
+
"integrationId" INTEGER NOT NULL,
|
|
11
|
+
"name" TEXT NOT NULL,
|
|
12
|
+
"type" TEXT NOT NULL,
|
|
13
|
+
"state" TEXT NOT NULL,
|
|
14
|
+
"context" JSONB NOT NULL DEFAULT '{}',
|
|
15
|
+
"results" JSONB NOT NULL DEFAULT '{}',
|
|
16
|
+
"parentProcessId" INTEGER,
|
|
17
|
+
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
18
|
+
"updatedAt" TIMESTAMP(3) NOT NULL,
|
|
19
|
+
|
|
20
|
+
CONSTRAINT "Process_pkey" PRIMARY KEY ("id")
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
-- CreateIndex
|
|
24
|
+
CREATE INDEX "Process_userId_idx" ON "Process"("userId");
|
|
25
|
+
|
|
26
|
+
-- CreateIndex
|
|
27
|
+
CREATE INDEX "Process_integrationId_idx" ON "Process"("integrationId");
|
|
28
|
+
|
|
29
|
+
-- CreateIndex
|
|
30
|
+
CREATE INDEX "Process_type_idx" ON "Process"("type");
|
|
31
|
+
|
|
32
|
+
-- CreateIndex
|
|
33
|
+
CREATE INDEX "Process_state_idx" ON "Process"("state");
|
|
34
|
+
|
|
35
|
+
-- CreateIndex
|
|
36
|
+
CREATE INDEX "Process_name_idx" ON "Process"("name");
|
|
37
|
+
|
|
38
|
+
-- CreateIndex
|
|
39
|
+
CREATE INDEX "Process_parentProcessId_idx" ON "Process"("parentProcessId");
|
|
40
|
+
|
|
41
|
+
-- AddForeignKey
|
|
42
|
+
ALTER TABLE "Process" ADD CONSTRAINT "Process_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
43
|
+
|
|
44
|
+
-- AddForeignKey
|
|
45
|
+
ALTER TABLE "Process" ADD CONSTRAINT "Process_integrationId_fkey" FOREIGN KEY ("integrationId") REFERENCES "Integration"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
46
|
+
|
|
47
|
+
-- AddForeignKey
|
|
48
|
+
ALTER TABLE "Process" ADD CONSTRAINT "Process_parentProcessId_fkey" FOREIGN KEY ("parentProcessId") REFERENCES "Process"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
@@ -6,7 +6,13 @@ generator client {
|
|
|
6
6
|
provider = "prisma-client-js"
|
|
7
7
|
output = "../generated/prisma-postgresql"
|
|
8
8
|
binaryTargets = ["native", "rhel-openssl-3.0.x"] // native for local dev, rhel for Lambda deployment
|
|
9
|
-
|
|
9
|
+
// Library engine (default since Prisma 3.x): Rust query engine loads as a
|
|
10
|
+
// Node-API addon inside the same process. The binary engine forks a child
|
|
11
|
+
// query-engine subprocess and communicates over a local HTTP/IPC pipe with
|
|
12
|
+
// NO client-side timeout — a zombied child wedges the Node process until
|
|
13
|
+
// Lambda's 900s cap. Switching to library eliminates that entire class of
|
|
14
|
+
// silent hangs. See friggframework/frigg#580 for the investigation.
|
|
15
|
+
engineType = "library"
|
|
10
16
|
}
|
|
11
17
|
|
|
12
18
|
datasource db {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./library"
|