document-drive 1.21.0 → 1.21.1
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/prisma/schema.prisma +93 -0
- package/package.json +7 -4
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
// This is your Prisma schema file,
|
|
2
|
+
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
|
3
|
+
|
|
4
|
+
generator client {
|
|
5
|
+
provider = "prisma-client-js"
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
datasource db {
|
|
9
|
+
provider = "postgresql"
|
|
10
|
+
url = env("DATABASE_URL")
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
model Drive {
|
|
14
|
+
slug String @id
|
|
15
|
+
id String
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
model Document {
|
|
19
|
+
id String
|
|
20
|
+
driveId String
|
|
21
|
+
created DateTime @default(now())
|
|
22
|
+
lastModified DateTime @default(now())
|
|
23
|
+
revision String
|
|
24
|
+
name String?
|
|
25
|
+
operations Operation[]
|
|
26
|
+
initialState String // json object with the scope as keys of the root object
|
|
27
|
+
documentType String
|
|
28
|
+
syncronizationUnits SyncronizationUnit[]
|
|
29
|
+
|
|
30
|
+
@@id([id, driveId])
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
model Operation {
|
|
34
|
+
id String @id @default(uuid())
|
|
35
|
+
opId String?
|
|
36
|
+
driveId String
|
|
37
|
+
Document Document? @relation(fields: [driveId, documentId], references: [driveId, id], onDelete: Cascade)
|
|
38
|
+
documentId String
|
|
39
|
+
scope String
|
|
40
|
+
branch String
|
|
41
|
+
index Int
|
|
42
|
+
skip Int
|
|
43
|
+
hash String
|
|
44
|
+
timestamp DateTime
|
|
45
|
+
input String
|
|
46
|
+
type String
|
|
47
|
+
attachments Attachment[]
|
|
48
|
+
syncId String?
|
|
49
|
+
clipboard Boolean? @default(false)
|
|
50
|
+
context Json?
|
|
51
|
+
resultingState Bytes?
|
|
52
|
+
|
|
53
|
+
SyncronizationUnit SyncronizationUnit? @relation(fields: [syncId, driveId], references: [id, driveId], onDelete: Cascade)
|
|
54
|
+
|
|
55
|
+
@@unique([driveId, documentId, scope, branch, index(sort: Asc)], name: "unique_operation")
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
model SyncronizationUnit {
|
|
59
|
+
id String
|
|
60
|
+
driveId String
|
|
61
|
+
documentId String
|
|
62
|
+
|
|
63
|
+
Document Document @relation(fields: [documentId, driveId], references: [id, driveId], onDelete: Cascade)
|
|
64
|
+
scope String
|
|
65
|
+
branch String
|
|
66
|
+
operations Operation[]
|
|
67
|
+
|
|
68
|
+
@@id([id, driveId])
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
model Attachment {
|
|
72
|
+
id String @id @default(uuid())
|
|
73
|
+
operationId String
|
|
74
|
+
Operation Operation @relation(fields: [operationId], references: [id], onDelete: Cascade)
|
|
75
|
+
|
|
76
|
+
mimeType String
|
|
77
|
+
data String
|
|
78
|
+
filename String?
|
|
79
|
+
extension String?
|
|
80
|
+
hash String
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
model Listener {
|
|
84
|
+
listenerId String @id @default(uuid())
|
|
85
|
+
driveId String
|
|
86
|
+
|
|
87
|
+
label String?
|
|
88
|
+
block Boolean
|
|
89
|
+
system Boolean
|
|
90
|
+
|
|
91
|
+
filter Json
|
|
92
|
+
callInfo Json
|
|
93
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "document-drive",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.1",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -39,13 +39,14 @@
|
|
|
39
39
|
"sqlite3": "^5.1.7",
|
|
40
40
|
"uuid": "^11.0.5",
|
|
41
41
|
"zod": "^3.24.2",
|
|
42
|
+
"@powerhousedao/scalars": "1.25.1",
|
|
42
43
|
"@powerhousedao/codegen": "0.38.0",
|
|
43
|
-
"document-model": "2.21.1"
|
|
44
|
-
"@powerhousedao/scalars": "1.25.1"
|
|
44
|
+
"document-model": "2.21.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/node": "^20.14.11",
|
|
48
48
|
"@types/uuid": "^9.0.8",
|
|
49
|
+
"copyfiles": "^2.4.1",
|
|
49
50
|
"fake-indexeddb": "^5.0.2",
|
|
50
51
|
"msw": "^2.3.1",
|
|
51
52
|
"vitest": "^3.0.7",
|
|
@@ -58,6 +59,7 @@
|
|
|
58
59
|
"lint": "eslint .",
|
|
59
60
|
"lint:nx": "eslint . --fix --quiet",
|
|
60
61
|
"build": "tsc --build",
|
|
62
|
+
"postbuild": "npm run copy-prisma",
|
|
61
63
|
"release": "semantic-release",
|
|
62
64
|
"test": "vitest run --coverage --exclude \"test/flaky/**\"",
|
|
63
65
|
"test:watch": "vitest --coverage --exclude \"test/flaky/**\"",
|
|
@@ -65,6 +67,7 @@
|
|
|
65
67
|
"clean": "rimraf dist",
|
|
66
68
|
"clean:node_modules": "rimraf node_modules",
|
|
67
69
|
"migrate": "prisma generate && prisma db push",
|
|
68
|
-
"
|
|
70
|
+
"copy-prisma": "copyfiles prisma/schema.prisma dist/",
|
|
71
|
+
"prebuild": "prisma generate --no-hints"
|
|
69
72
|
}
|
|
70
73
|
}
|