L
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Michael Zhang 2023-03-31 16:31:41 -05:00
parent a4bc2eb3e6
commit b86e9c2f81
6 changed files with 45 additions and 26 deletions

View file

@ -40,12 +40,18 @@
- Hooks: - Hooks:
- Hooks consist of a (pattern, type, callback). The pattern is a metadata - Hooks consist of a (pattern, type, callback). The pattern is a metadata
matcher, that determines if the node should be executed upon. The matcher, that determines if the node should be executed upon. The
callback is Javascript code executed in the app's execution context. callback is Javascript code executed in the app's execution context.
- Type determines what kind of callback to call. - Type determines what kind of callback to call.
- Ensures callbacks: these make sure that a node has
- - Ensures callbacks: these make sure that a node has
- Need to somehow figure out how to represent partially executed
processes? i.e if a video indexer needs to take time to go through the
video, the nodes should be available and committed, but somehow
indicate that one of its processes isn't done
- Maybe this should be a flag on the `NodeMeta` table
- Database service: - Database service:
@ -84,9 +90,9 @@
- Interfaces: - Interfaces:
- -
- Content / blob storage - Content / blob storage
- Interfaces: - Interfaces:
@ -125,7 +131,7 @@
- Migrations? - Migrations?
- If an application needs to migrate its data format, should we formalize - If an application needs to migrate its data format, should we formalize
this? this?
- Data migrations that don't need to create / delete nodes, only metadata - Data migrations that don't need to create / delete nodes, only metadata
- Have the frontend also shipped with the backend? - Have the frontend also shipped with the backend?

View file

@ -192,16 +192,16 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1677501028, "lastModified": 1679932808,
"narHash": "sha256-VAVrXSz75rPdBOz9Jg75rpA3VBvw4WO+hFvk+A4f6Mc=", "narHash": "sha256-bSyAWJ4ukiXVyKI1iGvCs2cMgW1jdYRs5cgTdOCXvrQ=",
"owner": "prisma", "owner": "prisma",
"repo": "prisma-engines", "repo": "prisma-engines",
"rev": "8fde8fef4033376662cad983758335009d522acb", "rev": "659ef412370fa3b41cd7bf6e94587c1dfb7f67e7",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "prisma", "owner": "prisma",
"ref": "4.11.0", "ref": "4.12.0",
"repo": "prisma-engines", "repo": "prisma-engines",
"type": "github" "type": "github"
} }

View file

@ -2,7 +2,7 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs"; nixpkgs.url = "github:nixos/nixpkgs";
fenix.url = "github:nix-community/fenix"; fenix.url = "github:nix-community/fenix";
prisma-engines.url = "github:prisma/prisma-engines?ref=4.11.0"; prisma-engines.url = "github:prisma/prisma-engines?ref=4.12.0";
}; };
outputs = { self, nixpkgs, flake-utils, fenix, prisma-engines }: outputs = { self, nixpkgs, flake-utils, fenix, prisma-engines }:

16
package-lock.json generated
View file

@ -18,7 +18,7 @@
"@types/express": "^4.17.17", "@types/express": "^4.17.17",
"json-schema-static-docs": "^0.23.0", "json-schema-static-docs": "^0.23.0",
"nativescript": "^8.5.1", "nativescript": "^8.5.1",
"prisma": "^4.11.0", "prisma": "^4.12.0",
"ts-node": "^10.9.1", "ts-node": "^10.9.1",
"typescript": "^5.0.2", "typescript": "^5.0.2",
"vite": "^4.2.1", "vite": "^4.2.1",
@ -1932,10 +1932,11 @@
} }
}, },
"node_modules/@prisma/engines": { "node_modules/@prisma/engines": {
"version": "4.11.0", "version": "4.12.0",
"resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-4.12.0.tgz",
"integrity": "sha512-0alKtnxhNB5hYU+ymESBlGI4b9XrGGSdv7Ud+8TE/fBNOEhIud0XQsAR+TrvUZgS4na5czubiMsODw0TUrgkIA==",
"devOptional": true, "devOptional": true,
"hasInstallScript": true, "hasInstallScript": true
"license": "Apache-2.0"
}, },
"node_modules/@prisma/engines-version": { "node_modules/@prisma/engines-version": {
"version": "4.11.0-57.8fde8fef4033376662cad983758335009d522acb", "version": "4.11.0-57.8fde8fef4033376662cad983758335009d522acb",
@ -9590,12 +9591,13 @@
} }
}, },
"node_modules/prisma": { "node_modules/prisma": {
"version": "4.11.0", "version": "4.12.0",
"resolved": "https://registry.npmjs.org/prisma/-/prisma-4.12.0.tgz",
"integrity": "sha512-xqVper4mbwl32BWzLpdznHAYvYDWQQWK2tBfXjdUD397XaveRyAP7SkBZ6kFlIg8kKayF4hvuaVtYwXd9BodAg==",
"devOptional": true, "devOptional": true,
"hasInstallScript": true, "hasInstallScript": true,
"license": "Apache-2.0",
"dependencies": { "dependencies": {
"@prisma/engines": "4.11.0" "@prisma/engines": "4.12.0"
}, },
"bin": { "bin": {
"prisma": "build/index.js", "prisma": "build/index.js",

View file

@ -14,7 +14,7 @@
"@types/express": "^4.17.17", "@types/express": "^4.17.17",
"json-schema-static-docs": "^0.23.0", "json-schema-static-docs": "^0.23.0",
"nativescript": "^8.5.1", "nativescript": "^8.5.1",
"prisma": "^4.11.0", "prisma": "^4.12.0",
"ts-node": "^10.9.1", "ts-node": "^10.9.1",
"typescript": "^5.0.2", "typescript": "^5.0.2",
"vite": "^4.2.1", "vite": "^4.2.1",

View file

@ -25,9 +25,15 @@ model Interface {
} }
model Edge { model Edge {
id String @id @default(uuid()) id String @id @default(uuid())
label String? label String?
/// The app that created this edge
app App @relation(fields: [appId], references: [id])
appId String
appKey String
fromId String fromId String
fromNode Node @relation(name: "fromNode", fields: [fromId], references: [id]) fromNode Node @relation(name: "fromNode", fields: [fromId], references: [id])
@ -35,19 +41,23 @@ model Edge {
toNode Node @relation(name: "toNode", fields: [toId], references: [id]) toNode Node @relation(name: "toNode", fields: [toId], references: [id])
@@unique([fromId, toId]) @@unique([fromId, toId])
@@index([appId, appKey])
} }
model NodeMeta { model NodeMeta {
nodeId String nodeId String
node Node @relation(fields: [nodeId], references: [id]) node Node @relation(fields: [nodeId], references: [id])
appId String /// The app that created this metadata field
app App @relation(fields: [appId], references: [id]) app App @relation(fields: [appId], references: [id])
appId String
appKey String
key String
value Bytes value Bytes
@@id([nodeId, appId, key]) @@id([nodeId, appId, appKey])
@@index([appId, appKey])
} }
model NodeImplements { model NodeImplements {
@ -70,6 +80,7 @@ model App {
patterns Patterns[] patterns Patterns[]
metaKeys NodeMeta[] metaKeys NodeMeta[]
edges Edge[]
} }
/// Regular expressions table /// Regular expressions table
@ -77,7 +88,7 @@ model Patterns {
id String @id @default(uuid()) id String @id @default(uuid())
pattern String pattern String
/// Pattern type, see docs for details /// Pattern type, see docs for details
type String type String