zotero-lib 1.0.90 → 1.0.91

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.
@@ -0,0 +1,101 @@
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_POST")
11
+ relationMode = "prisma"
12
+ }
13
+
14
+ model groups {
15
+ id Int @id
16
+ version Int
17
+ itemsVersion Int
18
+ createdAt DateTime
19
+ updatedAt DateTime
20
+ items items[]
21
+ alsoKnownAs alsoKnownAs[]
22
+ itemsArchive itemsArchive[]
23
+ }
24
+
25
+ model items {
26
+ id String @id
27
+ version Int
28
+ data Json
29
+ inconsistent Boolean?
30
+ group_id Int
31
+ group groups @relation(fields: [group_id], references: [id])
32
+ createdAt DateTime
33
+ updatedAt DateTime
34
+ isDeleted Boolean @default(false)
35
+ collection_items collection_items[]
36
+ alsoKnownAs alsoKnownAs[]
37
+
38
+ @@index([group_id])
39
+ }
40
+
41
+ model itemsArchive {
42
+ row_id Int @id @default(autoincrement())
43
+ id String
44
+ version Int
45
+ data Json
46
+ inconsistent Boolean? @default(false)
47
+ group_id Int
48
+ group groups @relation(fields: [group_id], references: [id])
49
+ createdAt DateTime
50
+ updatedAt DateTime
51
+ isDeleted Boolean @default(false)
52
+ collection_items collection_items[]
53
+ alsoKnownAs alsoKnownAs[]
54
+
55
+ @@index([group_id])
56
+ }
57
+
58
+ model collections {
59
+ id String @id
60
+ createdAt DateTime
61
+ updatedAt DateTime
62
+ collection_items collection_items[]
63
+ }
64
+
65
+ model collection_items {
66
+ id Int @id @default(autoincrement())
67
+ createdAt DateTime
68
+ updatedAt DateTime
69
+ collection_id String
70
+ collection collections @relation(fields: [collection_id], references: [id])
71
+ item_id String
72
+ item items @relation(fields: [item_id], references: [id])
73
+ itemsArchiveId String?
74
+ itemsArchive itemsArchive? @relation(fields: [itemsArchiveRow_id], references: [row_id])
75
+ itemsArchiveRow_id Int?
76
+
77
+ @@index([collection_id])
78
+ @@index([item_id])
79
+ @@index([itemsArchiveId])
80
+ @@index([itemsArchiveRow_id])
81
+ }
82
+
83
+ model alsoKnownAs {
84
+ id Int @id @default(autoincrement())
85
+ item_id String
86
+ item items @relation(fields: [item_id], references: [id], onDelete: Cascade)
87
+ group_id Int
88
+ group groups @relation(fields: [group_id], references: [id])
89
+ createdAt DateTime
90
+ updatedAt DateTime
91
+ data String
92
+ isDeleted Boolean @default(false)
93
+ itemsArchiveId String?
94
+ itemsArchive itemsArchive? @relation(fields: [itemsArchiveRow_id], references: [row_id])
95
+ itemsArchiveRow_id Int?
96
+
97
+ @@index([item_id])
98
+ @@index([group_id])
99
+ @@index([itemsArchiveId])
100
+ @@index([itemsArchiveRow_id])
101
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zotero-lib",
3
- "version": "1.0.90",
3
+ "version": "1.0.91",
4
4
  "description": "",
5
5
  "main": "build/zotero-lib.js",
6
6
  "bin": {
@@ -13,13 +13,15 @@
13
13
  "start": "node ./build/zotero-cli.js",
14
14
  "dev": "ts-node ./src/zotero-cli.ts",
15
15
  "lib": "node ./build/zotero-lib.js",
16
+ "prisma:generate": "prisma generate",
16
17
  "test:cli_to_javascript": "node ./tests/test_cli_to_javascript.js",
17
18
  "test": "jest",
18
19
  "legacy:test": "node ./tests/*.js",
19
20
  "legacy:test_create": "node ./tests/test_create.js",
20
21
  "legacy:test_item": "node ./tests/test_item.js",
21
22
  "legacy:test_update": "node ./tests/test_update.js",
22
- "build": "rimraf build/ && tsc",
23
+ "copy:schema": "copyfiles -u 1 prisma/schema.prisma build/prisma/",
24
+ "build": "rimraf build/ && npm run prisma:generate && tsc && npm run copy:schema",
23
25
  "prepublish": "npm run build",
24
26
  "prepack": "npm run build",
25
27
  "publish:patch": "npm version patch; npm publish; git push --tags",
@@ -79,6 +81,7 @@
79
81
  "@types/jest": "^27.4.0",
80
82
  "@typescript-eslint/eslint-plugin": "^4.22.1",
81
83
  "@typescript-eslint/parser": "^4.22.1",
84
+ "copyfiles": "^2.4.1",
82
85
  "eslint": "^7.26.0",
83
86
  "eslint-config-prettier": "^8.3.0",
84
87
  "eslint-plugin-import": "^2.22.1",