@helloao/cli 0.0.5 → 0.0.7
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/README.md +125 -126
- package/migrations/20240623183848_add_book_order/migration.sql +26 -26
- package/migrations/20240629194121_add_chapter_links/migration.sql +45 -45
- package/migrations/20240629194513_add_chapter_content/migration.sql +30 -30
- package/migrations/20240705221833_remove_unused_columns/migration.sql +27 -27
- package/package.json +5 -2
- package/prisma-gen/edge.js +5 -5
- package/prisma-gen/index.js +7 -7
- package/schema.prisma +154 -154
- package/actions.d.ts +0 -57
- package/actions.js +0 -262
- package/cli.d.ts +0 -3
- package/cli.js +0 -147
- package/db.d.ts +0 -79
- package/db.js +0 -662
- package/downloads.d.ts +0 -2
- package/downloads.js +0 -12
- package/files.d.ts +0 -113
- package/files.js +0 -341
- package/index.d.ts +0 -8
- package/index.js +0 -38
- package/s3.d.ts +0 -14
- package/s3.js +0 -76
- package/uploads.d.ts +0 -73
- package/uploads.js +0 -260
package/prisma-gen/index.js
CHANGED
|
@@ -183,7 +183,7 @@ const config = {
|
|
|
183
183
|
"value": "prisma-client-js"
|
|
184
184
|
},
|
|
185
185
|
"output": {
|
|
186
|
-
"value": "
|
|
186
|
+
"value": "C:\\Projects\\bible-api\\packages\\helloao-cli\\prisma-gen",
|
|
187
187
|
"fromEnvVar": null
|
|
188
188
|
},
|
|
189
189
|
"config": {
|
|
@@ -192,12 +192,12 @@ const config = {
|
|
|
192
192
|
"binaryTargets": [
|
|
193
193
|
{
|
|
194
194
|
"fromEnvVar": null,
|
|
195
|
-
"value": "
|
|
195
|
+
"value": "windows",
|
|
196
196
|
"native": true
|
|
197
197
|
}
|
|
198
198
|
],
|
|
199
199
|
"previewFeatures": [],
|
|
200
|
-
"sourceFilePath": "
|
|
200
|
+
"sourceFilePath": "C:\\Projects\\bible-api\\packages\\helloao-cli\\schema.prisma",
|
|
201
201
|
"isCustomOutput": true
|
|
202
202
|
},
|
|
203
203
|
"relativeEnvPaths": {
|
|
@@ -219,8 +219,8 @@ const config = {
|
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
},
|
|
222
|
-
"inlineSchema": "datasource db {\n provider = \"sqlite\"\n url = \"file:../../bible-api.dev.db\"\n}\n\ngenerator client {\n provider = \"prisma-client-js\"\n output = \"./prisma-gen\"\n}\n\nmodel Translation {\n id String @id\n name String\n website String\n licenseUrl String\n shortName String?\n englishName String\n language String\n textDirection String\n\n // The SHA-256 hash of the translation\n // includes everything about the translation, including the books, chapters, verses, footnotes, etc.\n sha256 String?\n \n books Book[]\n chapters Chapter[]\n verses ChapterVerse[]\n footnotes ChapterFootnote[]\n audioUrls ChapterAudioUrl[]\n}\n\nmodel InputFile {\n // The ID of the translation that the file is for\n translationId String\n\n // The name of the file\n name String\n\n format String\n\n // The SHA-256 hash of the file\n sha256 String\n \n sizeInBytes Int\n\n @@id([translationId, name])\n}\n\nmodel Book {\n id String\n\n translationId String\n translation Translation @relation(fields: [translationId], references: [id])\n\n name String\n commonName String\n title String?\n order Int\n\n numberOfChapters Int\n\n // The SHA-256 hash of the book\n sha256 String?\n\n chapters Chapter[]\n verses ChapterVerse[]\n footnotes ChapterFootnote[]\n audioUrls ChapterAudioUrl[]\n\n @@id([translationId, id])\n}\n\nmodel Chapter {\n number Int\n\n bookId String\n book Book @relation(fields: [translationId, bookId], references: [translationId, id])\n\n translationId String\n translation Translation @relation(fields: [translationId], references: [id])\n\n json String // The JSON of the chapter\n\n // The SHA-256 hash of the chapter\n sha256 String?\n\n verses ChapterVerse[]\n footnotes ChapterFootnote[]\n audioUrls ChapterAudioUrl[]\n\n @@id([translationId, bookId, number])\n}\n\nmodel ChapterAudioUrl {\n number Int\n bookId String\n book Book @relation(fields: [translationId, bookId], references: [translationId, id])\n\n translationId String\n translation Translation @relation(fields: [translationId], references: [id])\n\n chapter Chapter @relation(fields: [translationId, bookId, number], references: [translationId, bookId, number])\n\n reader String\n url String\n\n @@id([translationId, bookId, number, reader])\n}\n\nmodel ChapterVerse {\n number Int\n\n chapterNumber Int\n chapter Chapter @relation(fields: [translationId, bookId, chapterNumber], references: [translationId, bookId, number])\n\n bookId String\n book Book @relation(fields: [translationId, bookId], references: [translationId, id])\n\n translationId String\n translation Translation @relation(fields: [translationId], references: [id])\n\n text String // The text of the verse\n contentJson String // The JSON of the verse content\n\n // The SHA-256 hash of the verse\n sha256 String?\n\n footnotes ChapterFootnote[]\n\n @@id([translationId, bookId, chapterNumber, number])\n}\n\nmodel ChapterFootnote {\n id Int\n\n chapterNumber Int\n chapter Chapter @relation(fields: [translationId, bookId, chapterNumber], references: [translationId, bookId, number])\n\n bookId String\n book Book @relation(fields: [translationId, bookId], references: [translationId, id])\n\n translationId String\n translation Translation @relation(fields: [translationId], references: [id])\n\n text String\n\n // The SHA-256 hash of the footnote\n sha256 String?\n\n verseNumber Int?\n verse ChapterVerse? @relation(fields: [translationId, bookId, chapterNumber, verseNumber], references: [translationId, bookId, chapterNumber, number])\n\n @@id([translationId, bookId, chapterNumber, id])\n}\n",
|
|
223
|
-
"inlineSchemaHash": "
|
|
222
|
+
"inlineSchema": "datasource db {\r\n provider = \"sqlite\"\r\n url = \"file:../../bible-api.dev.db\"\r\n}\r\n\r\ngenerator client {\r\n provider = \"prisma-client-js\"\r\n output = \"./prisma-gen\"\r\n}\r\n\r\nmodel Translation {\r\n id String @id\r\n name String\r\n website String\r\n licenseUrl String\r\n shortName String?\r\n englishName String\r\n language String\r\n textDirection String\r\n\r\n // The SHA-256 hash of the translation\r\n // includes everything about the translation, including the books, chapters, verses, footnotes, etc.\r\n sha256 String?\r\n \r\n books Book[]\r\n chapters Chapter[]\r\n verses ChapterVerse[]\r\n footnotes ChapterFootnote[]\r\n audioUrls ChapterAudioUrl[]\r\n}\r\n\r\nmodel InputFile {\r\n // The ID of the translation that the file is for\r\n translationId String\r\n\r\n // The name of the file\r\n name String\r\n\r\n format String\r\n\r\n // The SHA-256 hash of the file\r\n sha256 String\r\n \r\n sizeInBytes Int\r\n\r\n @@id([translationId, name])\r\n}\r\n\r\nmodel Book {\r\n id String\r\n\r\n translationId String\r\n translation Translation @relation(fields: [translationId], references: [id])\r\n\r\n name String\r\n commonName String\r\n title String?\r\n order Int\r\n\r\n numberOfChapters Int\r\n\r\n // The SHA-256 hash of the book\r\n sha256 String?\r\n\r\n chapters Chapter[]\r\n verses ChapterVerse[]\r\n footnotes ChapterFootnote[]\r\n audioUrls ChapterAudioUrl[]\r\n\r\n @@id([translationId, id])\r\n}\r\n\r\nmodel Chapter {\r\n number Int\r\n\r\n bookId String\r\n book Book @relation(fields: [translationId, bookId], references: [translationId, id])\r\n\r\n translationId String\r\n translation Translation @relation(fields: [translationId], references: [id])\r\n\r\n json String // The JSON of the chapter\r\n\r\n // The SHA-256 hash of the chapter\r\n sha256 String?\r\n\r\n verses ChapterVerse[]\r\n footnotes ChapterFootnote[]\r\n audioUrls ChapterAudioUrl[]\r\n\r\n @@id([translationId, bookId, number])\r\n}\r\n\r\nmodel ChapterAudioUrl {\r\n number Int\r\n bookId String\r\n book Book @relation(fields: [translationId, bookId], references: [translationId, id])\r\n\r\n translationId String\r\n translation Translation @relation(fields: [translationId], references: [id])\r\n\r\n chapter Chapter @relation(fields: [translationId, bookId, number], references: [translationId, bookId, number])\r\n\r\n reader String\r\n url String\r\n\r\n @@id([translationId, bookId, number, reader])\r\n}\r\n\r\nmodel ChapterVerse {\r\n number Int\r\n\r\n chapterNumber Int\r\n chapter Chapter @relation(fields: [translationId, bookId, chapterNumber], references: [translationId, bookId, number])\r\n\r\n bookId String\r\n book Book @relation(fields: [translationId, bookId], references: [translationId, id])\r\n\r\n translationId String\r\n translation Translation @relation(fields: [translationId], references: [id])\r\n\r\n text String // The text of the verse\r\n contentJson String // The JSON of the verse content\r\n\r\n // The SHA-256 hash of the verse\r\n sha256 String?\r\n\r\n footnotes ChapterFootnote[]\r\n\r\n @@id([translationId, bookId, chapterNumber, number])\r\n}\r\n\r\nmodel ChapterFootnote {\r\n id Int\r\n\r\n chapterNumber Int\r\n chapter Chapter @relation(fields: [translationId, bookId, chapterNumber], references: [translationId, bookId, number])\r\n\r\n bookId String\r\n book Book @relation(fields: [translationId, bookId], references: [translationId, id])\r\n\r\n translationId String\r\n translation Translation @relation(fields: [translationId], references: [id])\r\n\r\n text String\r\n\r\n // The SHA-256 hash of the footnote\r\n sha256 String?\r\n\r\n verseNumber Int?\r\n verse ChapterVerse? @relation(fields: [translationId, bookId, chapterNumber, verseNumber], references: [translationId, bookId, chapterNumber, number])\r\n\r\n @@id([translationId, bookId, chapterNumber, id])\r\n}\r\n",
|
|
223
|
+
"inlineSchemaHash": "41764b814e923d5f889dfa978eb00e5b4ed97714ea6987e161972711cbecd4bb",
|
|
224
224
|
"copyEngine": true
|
|
225
225
|
}
|
|
226
226
|
|
|
@@ -258,8 +258,8 @@ exports.PrismaClient = PrismaClient
|
|
|
258
258
|
Object.assign(exports, Prisma)
|
|
259
259
|
|
|
260
260
|
// file annotations for bundling tools to include these files
|
|
261
|
-
path.join(__dirname, "
|
|
262
|
-
path.join(process.cwd(), "packages/helloao-cli/prisma-gen/
|
|
261
|
+
path.join(__dirname, "query_engine-windows.dll.node");
|
|
262
|
+
path.join(process.cwd(), "packages/helloao-cli/prisma-gen/query_engine-windows.dll.node")
|
|
263
263
|
// file annotations for bundling tools to include these files
|
|
264
264
|
path.join(__dirname, "schema.prisma");
|
|
265
265
|
path.join(process.cwd(), "packages/helloao-cli/prisma-gen/schema.prisma")
|
package/schema.prisma
CHANGED
|
@@ -1,154 +1,154 @@
|
|
|
1
|
-
datasource db {
|
|
2
|
-
provider = "sqlite"
|
|
3
|
-
url = "file:../../bible-api.dev.db"
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
generator client {
|
|
7
|
-
provider = "prisma-client-js"
|
|
8
|
-
output = "./prisma-gen"
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
model Translation {
|
|
12
|
-
id String @id
|
|
13
|
-
name String
|
|
14
|
-
website String
|
|
15
|
-
licenseUrl String
|
|
16
|
-
shortName String?
|
|
17
|
-
englishName String
|
|
18
|
-
language String
|
|
19
|
-
textDirection String
|
|
20
|
-
|
|
21
|
-
// The SHA-256 hash of the translation
|
|
22
|
-
// includes everything about the translation, including the books, chapters, verses, footnotes, etc.
|
|
23
|
-
sha256 String?
|
|
24
|
-
|
|
25
|
-
books Book[]
|
|
26
|
-
chapters Chapter[]
|
|
27
|
-
verses ChapterVerse[]
|
|
28
|
-
footnotes ChapterFootnote[]
|
|
29
|
-
audioUrls ChapterAudioUrl[]
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
model InputFile {
|
|
33
|
-
// The ID of the translation that the file is for
|
|
34
|
-
translationId String
|
|
35
|
-
|
|
36
|
-
// The name of the file
|
|
37
|
-
name String
|
|
38
|
-
|
|
39
|
-
format String
|
|
40
|
-
|
|
41
|
-
// The SHA-256 hash of the file
|
|
42
|
-
sha256 String
|
|
43
|
-
|
|
44
|
-
sizeInBytes Int
|
|
45
|
-
|
|
46
|
-
@@id([translationId, name])
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
model Book {
|
|
50
|
-
id String
|
|
51
|
-
|
|
52
|
-
translationId String
|
|
53
|
-
translation Translation @relation(fields: [translationId], references: [id])
|
|
54
|
-
|
|
55
|
-
name String
|
|
56
|
-
commonName String
|
|
57
|
-
title String?
|
|
58
|
-
order Int
|
|
59
|
-
|
|
60
|
-
numberOfChapters Int
|
|
61
|
-
|
|
62
|
-
// The SHA-256 hash of the book
|
|
63
|
-
sha256 String?
|
|
64
|
-
|
|
65
|
-
chapters Chapter[]
|
|
66
|
-
verses ChapterVerse[]
|
|
67
|
-
footnotes ChapterFootnote[]
|
|
68
|
-
audioUrls ChapterAudioUrl[]
|
|
69
|
-
|
|
70
|
-
@@id([translationId, id])
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
model Chapter {
|
|
74
|
-
number Int
|
|
75
|
-
|
|
76
|
-
bookId String
|
|
77
|
-
book Book @relation(fields: [translationId, bookId], references: [translationId, id])
|
|
78
|
-
|
|
79
|
-
translationId String
|
|
80
|
-
translation Translation @relation(fields: [translationId], references: [id])
|
|
81
|
-
|
|
82
|
-
json String // The JSON of the chapter
|
|
83
|
-
|
|
84
|
-
// The SHA-256 hash of the chapter
|
|
85
|
-
sha256 String?
|
|
86
|
-
|
|
87
|
-
verses ChapterVerse[]
|
|
88
|
-
footnotes ChapterFootnote[]
|
|
89
|
-
audioUrls ChapterAudioUrl[]
|
|
90
|
-
|
|
91
|
-
@@id([translationId, bookId, number])
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
model ChapterAudioUrl {
|
|
95
|
-
number Int
|
|
96
|
-
bookId String
|
|
97
|
-
book Book @relation(fields: [translationId, bookId], references: [translationId, id])
|
|
98
|
-
|
|
99
|
-
translationId String
|
|
100
|
-
translation Translation @relation(fields: [translationId], references: [id])
|
|
101
|
-
|
|
102
|
-
chapter Chapter @relation(fields: [translationId, bookId, number], references: [translationId, bookId, number])
|
|
103
|
-
|
|
104
|
-
reader String
|
|
105
|
-
url String
|
|
106
|
-
|
|
107
|
-
@@id([translationId, bookId, number, reader])
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
model ChapterVerse {
|
|
111
|
-
number Int
|
|
112
|
-
|
|
113
|
-
chapterNumber Int
|
|
114
|
-
chapter Chapter @relation(fields: [translationId, bookId, chapterNumber], references: [translationId, bookId, number])
|
|
115
|
-
|
|
116
|
-
bookId String
|
|
117
|
-
book Book @relation(fields: [translationId, bookId], references: [translationId, id])
|
|
118
|
-
|
|
119
|
-
translationId String
|
|
120
|
-
translation Translation @relation(fields: [translationId], references: [id])
|
|
121
|
-
|
|
122
|
-
text String // The text of the verse
|
|
123
|
-
contentJson String // The JSON of the verse content
|
|
124
|
-
|
|
125
|
-
// The SHA-256 hash of the verse
|
|
126
|
-
sha256 String?
|
|
127
|
-
|
|
128
|
-
footnotes ChapterFootnote[]
|
|
129
|
-
|
|
130
|
-
@@id([translationId, bookId, chapterNumber, number])
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
model ChapterFootnote {
|
|
134
|
-
id Int
|
|
135
|
-
|
|
136
|
-
chapterNumber Int
|
|
137
|
-
chapter Chapter @relation(fields: [translationId, bookId, chapterNumber], references: [translationId, bookId, number])
|
|
138
|
-
|
|
139
|
-
bookId String
|
|
140
|
-
book Book @relation(fields: [translationId, bookId], references: [translationId, id])
|
|
141
|
-
|
|
142
|
-
translationId String
|
|
143
|
-
translation Translation @relation(fields: [translationId], references: [id])
|
|
144
|
-
|
|
145
|
-
text String
|
|
146
|
-
|
|
147
|
-
// The SHA-256 hash of the footnote
|
|
148
|
-
sha256 String?
|
|
149
|
-
|
|
150
|
-
verseNumber Int?
|
|
151
|
-
verse ChapterVerse? @relation(fields: [translationId, bookId, chapterNumber, verseNumber], references: [translationId, bookId, chapterNumber, number])
|
|
152
|
-
|
|
153
|
-
@@id([translationId, bookId, chapterNumber, id])
|
|
154
|
-
}
|
|
1
|
+
datasource db {
|
|
2
|
+
provider = "sqlite"
|
|
3
|
+
url = "file:../../bible-api.dev.db"
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
generator client {
|
|
7
|
+
provider = "prisma-client-js"
|
|
8
|
+
output = "./prisma-gen"
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
model Translation {
|
|
12
|
+
id String @id
|
|
13
|
+
name String
|
|
14
|
+
website String
|
|
15
|
+
licenseUrl String
|
|
16
|
+
shortName String?
|
|
17
|
+
englishName String
|
|
18
|
+
language String
|
|
19
|
+
textDirection String
|
|
20
|
+
|
|
21
|
+
// The SHA-256 hash of the translation
|
|
22
|
+
// includes everything about the translation, including the books, chapters, verses, footnotes, etc.
|
|
23
|
+
sha256 String?
|
|
24
|
+
|
|
25
|
+
books Book[]
|
|
26
|
+
chapters Chapter[]
|
|
27
|
+
verses ChapterVerse[]
|
|
28
|
+
footnotes ChapterFootnote[]
|
|
29
|
+
audioUrls ChapterAudioUrl[]
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
model InputFile {
|
|
33
|
+
// The ID of the translation that the file is for
|
|
34
|
+
translationId String
|
|
35
|
+
|
|
36
|
+
// The name of the file
|
|
37
|
+
name String
|
|
38
|
+
|
|
39
|
+
format String
|
|
40
|
+
|
|
41
|
+
// The SHA-256 hash of the file
|
|
42
|
+
sha256 String
|
|
43
|
+
|
|
44
|
+
sizeInBytes Int
|
|
45
|
+
|
|
46
|
+
@@id([translationId, name])
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
model Book {
|
|
50
|
+
id String
|
|
51
|
+
|
|
52
|
+
translationId String
|
|
53
|
+
translation Translation @relation(fields: [translationId], references: [id])
|
|
54
|
+
|
|
55
|
+
name String
|
|
56
|
+
commonName String
|
|
57
|
+
title String?
|
|
58
|
+
order Int
|
|
59
|
+
|
|
60
|
+
numberOfChapters Int
|
|
61
|
+
|
|
62
|
+
// The SHA-256 hash of the book
|
|
63
|
+
sha256 String?
|
|
64
|
+
|
|
65
|
+
chapters Chapter[]
|
|
66
|
+
verses ChapterVerse[]
|
|
67
|
+
footnotes ChapterFootnote[]
|
|
68
|
+
audioUrls ChapterAudioUrl[]
|
|
69
|
+
|
|
70
|
+
@@id([translationId, id])
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
model Chapter {
|
|
74
|
+
number Int
|
|
75
|
+
|
|
76
|
+
bookId String
|
|
77
|
+
book Book @relation(fields: [translationId, bookId], references: [translationId, id])
|
|
78
|
+
|
|
79
|
+
translationId String
|
|
80
|
+
translation Translation @relation(fields: [translationId], references: [id])
|
|
81
|
+
|
|
82
|
+
json String // The JSON of the chapter
|
|
83
|
+
|
|
84
|
+
// The SHA-256 hash of the chapter
|
|
85
|
+
sha256 String?
|
|
86
|
+
|
|
87
|
+
verses ChapterVerse[]
|
|
88
|
+
footnotes ChapterFootnote[]
|
|
89
|
+
audioUrls ChapterAudioUrl[]
|
|
90
|
+
|
|
91
|
+
@@id([translationId, bookId, number])
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
model ChapterAudioUrl {
|
|
95
|
+
number Int
|
|
96
|
+
bookId String
|
|
97
|
+
book Book @relation(fields: [translationId, bookId], references: [translationId, id])
|
|
98
|
+
|
|
99
|
+
translationId String
|
|
100
|
+
translation Translation @relation(fields: [translationId], references: [id])
|
|
101
|
+
|
|
102
|
+
chapter Chapter @relation(fields: [translationId, bookId, number], references: [translationId, bookId, number])
|
|
103
|
+
|
|
104
|
+
reader String
|
|
105
|
+
url String
|
|
106
|
+
|
|
107
|
+
@@id([translationId, bookId, number, reader])
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
model ChapterVerse {
|
|
111
|
+
number Int
|
|
112
|
+
|
|
113
|
+
chapterNumber Int
|
|
114
|
+
chapter Chapter @relation(fields: [translationId, bookId, chapterNumber], references: [translationId, bookId, number])
|
|
115
|
+
|
|
116
|
+
bookId String
|
|
117
|
+
book Book @relation(fields: [translationId, bookId], references: [translationId, id])
|
|
118
|
+
|
|
119
|
+
translationId String
|
|
120
|
+
translation Translation @relation(fields: [translationId], references: [id])
|
|
121
|
+
|
|
122
|
+
text String // The text of the verse
|
|
123
|
+
contentJson String // The JSON of the verse content
|
|
124
|
+
|
|
125
|
+
// The SHA-256 hash of the verse
|
|
126
|
+
sha256 String?
|
|
127
|
+
|
|
128
|
+
footnotes ChapterFootnote[]
|
|
129
|
+
|
|
130
|
+
@@id([translationId, bookId, chapterNumber, number])
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
model ChapterFootnote {
|
|
134
|
+
id Int
|
|
135
|
+
|
|
136
|
+
chapterNumber Int
|
|
137
|
+
chapter Chapter @relation(fields: [translationId, bookId, chapterNumber], references: [translationId, bookId, number])
|
|
138
|
+
|
|
139
|
+
bookId String
|
|
140
|
+
book Book @relation(fields: [translationId, bookId], references: [translationId, id])
|
|
141
|
+
|
|
142
|
+
translationId String
|
|
143
|
+
translation Translation @relation(fields: [translationId], references: [id])
|
|
144
|
+
|
|
145
|
+
text String
|
|
146
|
+
|
|
147
|
+
// The SHA-256 hash of the footnote
|
|
148
|
+
sha256 String?
|
|
149
|
+
|
|
150
|
+
verseNumber Int?
|
|
151
|
+
verse ChapterVerse? @relation(fields: [translationId, bookId, chapterNumber, verseNumber], references: [translationId, bookId, chapterNumber, number])
|
|
152
|
+
|
|
153
|
+
@@id([translationId, bookId, chapterNumber, id])
|
|
154
|
+
}
|
package/actions.d.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
export interface InitDbOptions {
|
|
2
|
-
/**
|
|
3
|
-
* The path to the source database to copy the schema from.
|
|
4
|
-
*/
|
|
5
|
-
source?: string;
|
|
6
|
-
/**
|
|
7
|
-
* The languages to copy from the source database. If not specified, then all languages will be copied.
|
|
8
|
-
*/
|
|
9
|
-
language?: string[];
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Initializes a new Bible API DB.
|
|
13
|
-
* @param dbPath The path to the database. If null or empty, then the "bible-api.db" will be used from the current working directory.
|
|
14
|
-
* @param options The options for the initialization.
|
|
15
|
-
*/
|
|
16
|
-
export declare function initDb(dbPath: string | null, options: InitDbOptions): Promise<void>;
|
|
17
|
-
export interface ImportTranslationOptions {
|
|
18
|
-
/**
|
|
19
|
-
* Whether to forcibly import the translations, even if they have already been imported.
|
|
20
|
-
*/
|
|
21
|
-
overwrite?: boolean;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Imports a translation from the given directory into the database in the current working directory.
|
|
25
|
-
* @param dir The directory that the translation is located in.
|
|
26
|
-
* @param dirs Any extra directories that should be imported.
|
|
27
|
-
* @param options The options for the import.
|
|
28
|
-
*/
|
|
29
|
-
export declare function importTranslation(dir: string, dirs: string[], options: ImportTranslationOptions): Promise<void>;
|
|
30
|
-
/**
|
|
31
|
-
* Imports all the translations from the given directory into the database in the current working directory.
|
|
32
|
-
* @param dir The directory that the translations are located in.
|
|
33
|
-
* @param options The options.
|
|
34
|
-
*/
|
|
35
|
-
export declare function importTranslations(dir: string, options: ImportTranslationOptions): Promise<void>;
|
|
36
|
-
export interface FetchTranslationsOptions {
|
|
37
|
-
/**
|
|
38
|
-
* Fetch all translations. If omitted, only undownloaded translations will be fetched.
|
|
39
|
-
*/
|
|
40
|
-
all?: boolean;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Fetches the specified translations from fetch.bible and places them in the given directory.
|
|
44
|
-
* @param dir The directory that the translations should be placed in.
|
|
45
|
-
* @param translations The translations that should be downloaded. If not specified, then all translations will be downloaded.
|
|
46
|
-
* @param options The options.
|
|
47
|
-
*/
|
|
48
|
-
export declare function fetchTranslations(dir: string, translations?: string[], options?: FetchTranslationsOptions): Promise<void>;
|
|
49
|
-
/**
|
|
50
|
-
* Fetches the specified audio translations and places them in the given directory.
|
|
51
|
-
* Translations should be in the format "translationId/audioId". e.g. "BSB/gilbert"
|
|
52
|
-
* @param dir The directory that the translations should be placed in.
|
|
53
|
-
* @param translations The translations that should be downloaded.
|
|
54
|
-
* @param options The options.
|
|
55
|
-
*/
|
|
56
|
-
export declare function fetchAudio(dir: string, translations: string[], options?: FetchTranslationsOptions): Promise<void>;
|
|
57
|
-
//# sourceMappingURL=actions.d.ts.map
|