@helloao/cli 0.0.12 → 0.0.14

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/esm/index.js CHANGED
@@ -5480,7 +5480,7 @@ var require_prisma_gen = __commonJS({
5480
5480
  JsonNull: objectEnumValues2.classes.JsonNull,
5481
5481
  AnyNull: objectEnumValues2.classes.AnyNull
5482
5482
  };
5483
- var path4 = __require("path");
5483
+ var path5 = __require("path");
5484
5484
  exports2.Prisma.TransactionIsolationLevel = makeStrictEnum2({
5485
5485
  Serializable: "Serializable"
5486
5486
  });
@@ -5507,6 +5507,34 @@ var require_prisma_gen = __commonJS({
5507
5507
  textDirection: "textDirection",
5508
5508
  sha256: "sha256"
5509
5509
  };
5510
+ exports2.Prisma.EBibleSourceScalarFieldEnum = {
5511
+ id: "id",
5512
+ usfmZipUrl: "usfmZipUrl",
5513
+ usfmZipEtag: "usfmZipEtag",
5514
+ languageCode: "languageCode",
5515
+ title: "title",
5516
+ shortTitle: "shortTitle",
5517
+ textDirection: "textDirection",
5518
+ redistributable: "redistributable",
5519
+ description: "description",
5520
+ copyright: "copyright",
5521
+ FCBHID: "FCBHID",
5522
+ updateDate: "updateDate",
5523
+ sourceDate: "sourceDate",
5524
+ oldTestamentBooks: "oldTestamentBooks",
5525
+ oldTestamentChapters: "oldTestamentChapters",
5526
+ oldTestamentVerses: "oldTestamentVerses",
5527
+ newTestamentBooks: "newTestamentBooks",
5528
+ newTestamentChapters: "newTestamentChapters",
5529
+ newTestamentVerses: "newTestamentVerses",
5530
+ apocryphaBooks: "apocryphaBooks",
5531
+ apocryphaChapters: "apocryphaChapters",
5532
+ apocryphaVerses: "apocryphaVerses",
5533
+ translationId: "translationId",
5534
+ usfmDownloadDate: "usfmDownloadDate",
5535
+ usfmDownloadPath: "usfmDownloadPath",
5536
+ sha256: "sha256"
5537
+ };
5510
5538
  exports2.Prisma.InputFileScalarFieldEnum = {
5511
5539
  translationId: "translationId",
5512
5540
  name: "name",
@@ -5514,6 +5542,11 @@ var require_prisma_gen = __commonJS({
5514
5542
  sha256: "sha256",
5515
5543
  sizeInBytes: "sizeInBytes"
5516
5544
  };
5545
+ exports2.Prisma.InputFileWarningScalarFieldEnum = {
5546
+ name: "name",
5547
+ type: "type",
5548
+ message: "message"
5549
+ };
5517
5550
  exports2.Prisma.BookScalarFieldEnum = {
5518
5551
  id: "id",
5519
5552
  translationId: "translationId",
@@ -5522,6 +5555,7 @@ var require_prisma_gen = __commonJS({
5522
5555
  title: "title",
5523
5556
  order: "order",
5524
5557
  numberOfChapters: "numberOfChapters",
5558
+ isApocryphal: "isApocryphal",
5525
5559
  sha256: "sha256"
5526
5560
  };
5527
5561
  exports2.Prisma.CommentaryBookScalarFieldEnum = {
@@ -5608,7 +5642,9 @@ var require_prisma_gen = __commonJS({
5608
5642
  exports2.Prisma.ModelName = {
5609
5643
  Translation: "Translation",
5610
5644
  Commentary: "Commentary",
5645
+ EBibleSource: "EBibleSource",
5611
5646
  InputFile: "InputFile",
5647
+ InputFileWarning: "InputFileWarning",
5612
5648
  Book: "Book",
5613
5649
  CommentaryBook: "CommentaryBook",
5614
5650
  CommentaryProfile: "CommentaryProfile",
@@ -5654,7 +5690,6 @@ var require_prisma_gen = __commonJS({
5654
5690
  "db"
5655
5691
  ],
5656
5692
  "activeProvider": "sqlite",
5657
- "postinstall": false,
5658
5693
  "inlineDatasources": {
5659
5694
  "db": {
5660
5695
  "url": {
@@ -5663,38 +5698,38 @@ var require_prisma_gen = __commonJS({
5663
5698
  }
5664
5699
  }
5665
5700
  },
5666
- "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 licenseNotes 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 Commentary {\n id String @id\n name String\n website String\n licenseUrl String\n licenseNotes 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 CommentaryBook[]\n chapters CommentaryChapter[]\n verses CommentaryChapterVerse[]\n profiles CommentaryProfile[]\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 CommentaryBook {\n id String\n\n commentaryId String\n commentary Commentary @relation(fields: [commentaryId], references: [id])\n\n name String\n commonName String\n introduction String?\n introductionSummary String?\n order Int\n\n numberOfChapters Int\n\n // The SHA-256 hash of the book\n sha256 String?\n\n chapters CommentaryChapter[]\n verses CommentaryChapterVerse[]\n\n @@id([commentaryId, id])\n}\n\nmodel CommentaryProfile {\n id String\n\n commentaryId String\n commentary Commentary @relation(fields: [commentaryId], references: [id])\n\n subject String\n content String\n\n referenceBook String?\n referenceChapter Int?\n referenceVerse Int?\n referenceEndChapter Int?\n referenceEndVerse Int?\n\n json String // The JSON of the profile\n\n // The SHA-256 hash of the profile\n sha256 String?\n\n @@id([commentaryId, 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 CommentaryChapter {\n number Int\n\n bookId String\n book CommentaryBook @relation(fields: [commentaryId, bookId], references: [commentaryId, id])\n\n commentaryId String\n commentary Commentary @relation(fields: [commentaryId], references: [id])\n\n introduction String?\n json String // The JSON of the chapter\n\n // The SHA-256 hash of the chapter\n sha256 String?\n\n verses CommentaryChapterVerse[]\n\n @@id([commentaryId, 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 CommentaryChapterVerse {\n number Int\n\n chapterNumber Int\n chapter CommentaryChapter @relation(fields: [commentaryId, bookId, chapterNumber], references: [commentaryId, bookId, number])\n\n bookId String\n book CommentaryBook @relation(fields: [commentaryId, bookId], references: [commentaryId, id])\n\n commentaryId String\n commentary Commentary @relation(fields: [commentaryId], 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 @@id([commentaryId, 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',
5667
- "inlineSchemaHash": "08edf78c3005a949802f54a98c2ee2f0c1b9d743daca796df13c9881b8bc6e9c",
5701
+ "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 licenseNotes 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 Commentary {\n id String @id\n name String\n website String\n licenseUrl String\n licenseNotes 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 CommentaryBook[]\n chapters CommentaryChapter[]\n verses CommentaryChapterVerse[]\n profiles CommentaryProfile[]\n}\n\n// The ebible.org source for a particular translation\n// Contains metadata that is useful for managing downloads\nmodel EBibleSource {\n id String @id\n\n // The URL to the USFM zip file download\n usfmZipUrl String?\n // The ETag of the downloaded USFM zip file\n usfmZipEtag String?\n\n languageCode String\n title String\n shortTitle String?\n textDirection String?\n redistributable Boolean\n description String\n copyright String\n FCBHID String\n updateDate DateTime\n sourceDate DateTime\n\n oldTestamentBooks Int\n oldTestamentChapters Int\n oldTestamentVerses Int\n newTestamentBooks Int\n newTestamentChapters Int\n newTestamentVerses Int\n apocryphaBooks Int\n apocryphaChapters Int\n apocryphaVerses Int\n\n // The ID of the translation that the source is for\n translationId String\n\n // The date that the source was downloaded\n usfmDownloadDate DateTime?\n\n // The path that the USFM was downloaded to\n usfmDownloadPath String?\n\n // The SHA-256 hash of the source\n // Can be used to determine if the source has changed\n sha256 String?\n}\n\n// Files that were input into the API generator\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 InputFileWarning {\n // The name of the file\n name String\n\n // The type of the warning\n type String\n\n // The message of the warning\n message String\n\n @@id([name, type, message])\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 isApocryphal Boolean? // Whether the book is an apocryphal book\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 CommentaryBook {\n id String\n\n commentaryId String\n commentary Commentary @relation(fields: [commentaryId], references: [id])\n\n name String\n commonName String\n introduction String?\n introductionSummary String?\n order Int\n\n numberOfChapters Int\n\n // The SHA-256 hash of the book\n sha256 String?\n\n chapters CommentaryChapter[]\n verses CommentaryChapterVerse[]\n\n @@id([commentaryId, id])\n}\n\nmodel CommentaryProfile {\n id String\n\n commentaryId String\n commentary Commentary @relation(fields: [commentaryId], references: [id])\n\n subject String\n content String\n\n referenceBook String?\n referenceChapter Int?\n referenceVerse Int?\n referenceEndChapter Int?\n referenceEndVerse Int?\n\n json String // The JSON of the profile\n\n // The SHA-256 hash of the profile\n sha256 String?\n\n @@id([commentaryId, 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 CommentaryChapter {\n number Int\n\n bookId String\n book CommentaryBook @relation(fields: [commentaryId, bookId], references: [commentaryId, id])\n\n commentaryId String\n commentary Commentary @relation(fields: [commentaryId], references: [id])\n\n introduction String?\n json String // The JSON of the chapter\n\n // The SHA-256 hash of the chapter\n sha256 String?\n\n verses CommentaryChapterVerse[]\n\n @@id([commentaryId, 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 CommentaryChapterVerse {\n number Int\n\n chapterNumber Int\n chapter CommentaryChapter @relation(fields: [commentaryId, bookId, chapterNumber], references: [commentaryId, bookId, number])\n\n bookId String\n book CommentaryBook @relation(fields: [commentaryId, bookId], references: [commentaryId, id])\n\n commentaryId String\n commentary Commentary @relation(fields: [commentaryId], 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 @@id([commentaryId, 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',
5702
+ "inlineSchemaHash": "cf0107729a685f4aa99d2adfde7b3b0c1dce02d373410196a85ec0e31fa0a0f8",
5668
5703
  "copyEngine": true
5669
5704
  };
5670
5705
  var fs2 = __require("fs");
5671
5706
  config2.dirname = __dirname;
5672
- if (!fs2.existsSync(path4.join(__dirname, "schema.prisma"))) {
5707
+ if (!fs2.existsSync(path5.join(__dirname, "schema.prisma"))) {
5673
5708
  const alternativePaths = [
5674
5709
  "packages/helloao-cli/prisma-gen",
5675
5710
  "helloao-cli/prisma-gen"
5676
5711
  ];
5677
5712
  const alternativePath = alternativePaths.find((altPath) => {
5678
- return fs2.existsSync(path4.join(process.cwd(), altPath, "schema.prisma"));
5713
+ return fs2.existsSync(path5.join(process.cwd(), altPath, "schema.prisma"));
5679
5714
  }) ?? alternativePaths[0];
5680
- config2.dirname = path4.join(process.cwd(), alternativePath);
5715
+ config2.dirname = path5.join(process.cwd(), alternativePath);
5681
5716
  config2.isBundled = true;
5682
5717
  }
5683
- config2.runtimeDataModel = JSON.parse('{"models":{"Translation":{"dbName":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"name","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"website","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"licenseUrl","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"licenseNotes","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"shortName","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"englishName","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"language","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"textDirection","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"books","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Book","relationName":"BookToTranslation","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"chapters","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Chapter","relationName":"ChapterToTranslation","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"verses","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterVerse","relationName":"ChapterVerseToTranslation","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"footnotes","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterFootnote","relationName":"ChapterFootnoteToTranslation","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"audioUrls","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterAudioUrl","relationName":"ChapterAudioUrlToTranslation","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"Commentary":{"dbName":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"name","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"website","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"licenseUrl","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"licenseNotes","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"englishName","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"language","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"textDirection","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"books","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryBook","relationName":"CommentaryToCommentaryBook","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"chapters","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryChapter","relationName":"CommentaryToCommentaryChapter","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"verses","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryChapterVerse","relationName":"CommentaryToCommentaryChapterVerse","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"profiles","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryProfile","relationName":"CommentaryToCommentaryProfile","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"InputFile":{"dbName":null,"fields":[{"name":"translationId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"name","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"format","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sizeInBytes","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["translationId","name"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"Book":{"dbName":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"translationId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"translation","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Translation","relationName":"BookToTranslation","relationFromFields":["translationId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"name","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commonName","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"title","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"order","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"numberOfChapters","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"chapters","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Chapter","relationName":"BookToChapter","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"verses","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterVerse","relationName":"BookToChapterVerse","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"footnotes","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterFootnote","relationName":"BookToChapterFootnote","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"audioUrls","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterAudioUrl","relationName":"BookToChapterAudioUrl","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["translationId","id"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"CommentaryBook":{"dbName":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commentaryId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commentary","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Commentary","relationName":"CommentaryToCommentaryBook","relationFromFields":["commentaryId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"name","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commonName","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"introduction","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"introductionSummary","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"order","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"numberOfChapters","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"chapters","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryChapter","relationName":"CommentaryBookToCommentaryChapter","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"verses","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryChapterVerse","relationName":"CommentaryBookToCommentaryChapterVerse","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["commentaryId","id"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"CommentaryProfile":{"dbName":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commentaryId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commentary","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Commentary","relationName":"CommentaryToCommentaryProfile","relationFromFields":["commentaryId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"subject","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"content","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"referenceBook","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"referenceChapter","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"referenceVerse","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"referenceEndChapter","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"referenceEndVerse","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"json","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["commentaryId","id"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"Chapter":{"dbName":null,"fields":[{"name":"number","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"bookId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"book","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Book","relationName":"BookToChapter","relationFromFields":["translationId","bookId"],"relationToFields":["translationId","id"],"isGenerated":false,"isUpdatedAt":false},{"name":"translationId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"translation","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Translation","relationName":"ChapterToTranslation","relationFromFields":["translationId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"json","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"verses","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterVerse","relationName":"ChapterToChapterVerse","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"footnotes","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterFootnote","relationName":"ChapterToChapterFootnote","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"audioUrls","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterAudioUrl","relationName":"ChapterToChapterAudioUrl","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["translationId","bookId","number"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"CommentaryChapter":{"dbName":null,"fields":[{"name":"number","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"bookId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"book","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryBook","relationName":"CommentaryBookToCommentaryChapter","relationFromFields":["commentaryId","bookId"],"relationToFields":["commentaryId","id"],"isGenerated":false,"isUpdatedAt":false},{"name":"commentaryId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commentary","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Commentary","relationName":"CommentaryToCommentaryChapter","relationFromFields":["commentaryId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"introduction","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"json","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"verses","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryChapterVerse","relationName":"CommentaryChapterToCommentaryChapterVerse","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["commentaryId","bookId","number"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"ChapterAudioUrl":{"dbName":null,"fields":[{"name":"number","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"bookId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"book","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Book","relationName":"BookToChapterAudioUrl","relationFromFields":["translationId","bookId"],"relationToFields":["translationId","id"],"isGenerated":false,"isUpdatedAt":false},{"name":"translationId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"translation","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Translation","relationName":"ChapterAudioUrlToTranslation","relationFromFields":["translationId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"chapter","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Chapter","relationName":"ChapterToChapterAudioUrl","relationFromFields":["translationId","bookId","number"],"relationToFields":["translationId","bookId","number"],"isGenerated":false,"isUpdatedAt":false},{"name":"reader","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"url","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["translationId","bookId","number","reader"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"ChapterVerse":{"dbName":null,"fields":[{"name":"number","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"chapterNumber","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"chapter","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Chapter","relationName":"ChapterToChapterVerse","relationFromFields":["translationId","bookId","chapterNumber"],"relationToFields":["translationId","bookId","number"],"isGenerated":false,"isUpdatedAt":false},{"name":"bookId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"book","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Book","relationName":"BookToChapterVerse","relationFromFields":["translationId","bookId"],"relationToFields":["translationId","id"],"isGenerated":false,"isUpdatedAt":false},{"name":"translationId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"translation","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Translation","relationName":"ChapterVerseToTranslation","relationFromFields":["translationId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"text","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"contentJson","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"footnotes","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterFootnote","relationName":"ChapterFootnoteToChapterVerse","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["translationId","bookId","chapterNumber","number"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"CommentaryChapterVerse":{"dbName":null,"fields":[{"name":"number","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"chapterNumber","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"chapter","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryChapter","relationName":"CommentaryChapterToCommentaryChapterVerse","relationFromFields":["commentaryId","bookId","chapterNumber"],"relationToFields":["commentaryId","bookId","number"],"isGenerated":false,"isUpdatedAt":false},{"name":"bookId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"book","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryBook","relationName":"CommentaryBookToCommentaryChapterVerse","relationFromFields":["commentaryId","bookId"],"relationToFields":["commentaryId","id"],"isGenerated":false,"isUpdatedAt":false},{"name":"commentaryId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commentary","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Commentary","relationName":"CommentaryToCommentaryChapterVerse","relationFromFields":["commentaryId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"text","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"contentJson","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["commentaryId","bookId","chapterNumber","number"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"ChapterFootnote":{"dbName":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"chapterNumber","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"chapter","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Chapter","relationName":"ChapterToChapterFootnote","relationFromFields":["translationId","bookId","chapterNumber"],"relationToFields":["translationId","bookId","number"],"isGenerated":false,"isUpdatedAt":false},{"name":"bookId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"book","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Book","relationName":"BookToChapterFootnote","relationFromFields":["translationId","bookId"],"relationToFields":["translationId","id"],"isGenerated":false,"isUpdatedAt":false},{"name":"translationId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"translation","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Translation","relationName":"ChapterFootnoteToTranslation","relationFromFields":["translationId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"text","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"verseNumber","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"verse","kind":"object","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterVerse","relationName":"ChapterFootnoteToChapterVerse","relationFromFields":["translationId","bookId","chapterNumber","verseNumber"],"relationToFields":["translationId","bookId","chapterNumber","number"],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["translationId","bookId","chapterNumber","id"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false}},"enums":{},"types":{}}');
5718
+ config2.runtimeDataModel = JSON.parse('{"models":{"Translation":{"dbName":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"name","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"website","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"licenseUrl","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"licenseNotes","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"shortName","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"englishName","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"language","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"textDirection","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"books","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Book","relationName":"BookToTranslation","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"chapters","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Chapter","relationName":"ChapterToTranslation","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"verses","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterVerse","relationName":"ChapterVerseToTranslation","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"footnotes","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterFootnote","relationName":"ChapterFootnoteToTranslation","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"audioUrls","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterAudioUrl","relationName":"ChapterAudioUrlToTranslation","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"Commentary":{"dbName":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"name","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"website","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"licenseUrl","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"licenseNotes","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"englishName","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"language","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"textDirection","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"books","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryBook","relationName":"CommentaryToCommentaryBook","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"chapters","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryChapter","relationName":"CommentaryToCommentaryChapter","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"verses","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryChapterVerse","relationName":"CommentaryToCommentaryChapterVerse","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"profiles","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryProfile","relationName":"CommentaryToCommentaryProfile","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"EBibleSource":{"dbName":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"usfmZipUrl","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"usfmZipEtag","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"languageCode","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"title","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"shortTitle","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"textDirection","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"redistributable","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Boolean","isGenerated":false,"isUpdatedAt":false},{"name":"description","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"copyright","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"FCBHID","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"updateDate","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","isGenerated":false,"isUpdatedAt":false},{"name":"sourceDate","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","isGenerated":false,"isUpdatedAt":false},{"name":"oldTestamentBooks","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"oldTestamentChapters","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"oldTestamentVerses","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"newTestamentBooks","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"newTestamentChapters","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"newTestamentVerses","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"apocryphaBooks","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"apocryphaChapters","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"apocryphaVerses","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"translationId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"usfmDownloadDate","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","isGenerated":false,"isUpdatedAt":false},{"name":"usfmDownloadPath","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"InputFile":{"dbName":null,"fields":[{"name":"translationId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"name","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"format","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sizeInBytes","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["translationId","name"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"InputFileWarning":{"dbName":null,"fields":[{"name":"name","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"type","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"message","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["name","type","message"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"Book":{"dbName":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"translationId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"translation","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Translation","relationName":"BookToTranslation","relationFromFields":["translationId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"name","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commonName","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"title","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"order","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"numberOfChapters","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"isApocryphal","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Boolean","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"chapters","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Chapter","relationName":"BookToChapter","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"verses","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterVerse","relationName":"BookToChapterVerse","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"footnotes","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterFootnote","relationName":"BookToChapterFootnote","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"audioUrls","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterAudioUrl","relationName":"BookToChapterAudioUrl","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["translationId","id"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"CommentaryBook":{"dbName":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commentaryId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commentary","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Commentary","relationName":"CommentaryToCommentaryBook","relationFromFields":["commentaryId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"name","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commonName","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"introduction","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"introductionSummary","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"order","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"numberOfChapters","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"chapters","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryChapter","relationName":"CommentaryBookToCommentaryChapter","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"verses","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryChapterVerse","relationName":"CommentaryBookToCommentaryChapterVerse","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["commentaryId","id"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"CommentaryProfile":{"dbName":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commentaryId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commentary","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Commentary","relationName":"CommentaryToCommentaryProfile","relationFromFields":["commentaryId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"subject","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"content","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"referenceBook","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"referenceChapter","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"referenceVerse","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"referenceEndChapter","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"referenceEndVerse","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"json","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["commentaryId","id"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"Chapter":{"dbName":null,"fields":[{"name":"number","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"bookId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"book","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Book","relationName":"BookToChapter","relationFromFields":["translationId","bookId"],"relationToFields":["translationId","id"],"isGenerated":false,"isUpdatedAt":false},{"name":"translationId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"translation","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Translation","relationName":"ChapterToTranslation","relationFromFields":["translationId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"json","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"verses","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterVerse","relationName":"ChapterToChapterVerse","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"footnotes","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterFootnote","relationName":"ChapterToChapterFootnote","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"audioUrls","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterAudioUrl","relationName":"ChapterToChapterAudioUrl","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["translationId","bookId","number"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"CommentaryChapter":{"dbName":null,"fields":[{"name":"number","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"bookId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"book","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryBook","relationName":"CommentaryBookToCommentaryChapter","relationFromFields":["commentaryId","bookId"],"relationToFields":["commentaryId","id"],"isGenerated":false,"isUpdatedAt":false},{"name":"commentaryId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commentary","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Commentary","relationName":"CommentaryToCommentaryChapter","relationFromFields":["commentaryId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"introduction","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"json","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"verses","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryChapterVerse","relationName":"CommentaryChapterToCommentaryChapterVerse","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["commentaryId","bookId","number"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"ChapterAudioUrl":{"dbName":null,"fields":[{"name":"number","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"bookId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"book","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Book","relationName":"BookToChapterAudioUrl","relationFromFields":["translationId","bookId"],"relationToFields":["translationId","id"],"isGenerated":false,"isUpdatedAt":false},{"name":"translationId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"translation","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Translation","relationName":"ChapterAudioUrlToTranslation","relationFromFields":["translationId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"chapter","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Chapter","relationName":"ChapterToChapterAudioUrl","relationFromFields":["translationId","bookId","number"],"relationToFields":["translationId","bookId","number"],"isGenerated":false,"isUpdatedAt":false},{"name":"reader","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"url","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["translationId","bookId","number","reader"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"ChapterVerse":{"dbName":null,"fields":[{"name":"number","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"chapterNumber","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"chapter","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Chapter","relationName":"ChapterToChapterVerse","relationFromFields":["translationId","bookId","chapterNumber"],"relationToFields":["translationId","bookId","number"],"isGenerated":false,"isUpdatedAt":false},{"name":"bookId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"book","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Book","relationName":"BookToChapterVerse","relationFromFields":["translationId","bookId"],"relationToFields":["translationId","id"],"isGenerated":false,"isUpdatedAt":false},{"name":"translationId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"translation","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Translation","relationName":"ChapterVerseToTranslation","relationFromFields":["translationId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"text","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"contentJson","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"footnotes","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterFootnote","relationName":"ChapterFootnoteToChapterVerse","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["translationId","bookId","chapterNumber","number"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"CommentaryChapterVerse":{"dbName":null,"fields":[{"name":"number","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"chapterNumber","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"chapter","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryChapter","relationName":"CommentaryChapterToCommentaryChapterVerse","relationFromFields":["commentaryId","bookId","chapterNumber"],"relationToFields":["commentaryId","bookId","number"],"isGenerated":false,"isUpdatedAt":false},{"name":"bookId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"book","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryBook","relationName":"CommentaryBookToCommentaryChapterVerse","relationFromFields":["commentaryId","bookId"],"relationToFields":["commentaryId","id"],"isGenerated":false,"isUpdatedAt":false},{"name":"commentaryId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commentary","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Commentary","relationName":"CommentaryToCommentaryChapterVerse","relationFromFields":["commentaryId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"text","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"contentJson","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["commentaryId","bookId","chapterNumber","number"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"ChapterFootnote":{"dbName":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"chapterNumber","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"chapter","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Chapter","relationName":"ChapterToChapterFootnote","relationFromFields":["translationId","bookId","chapterNumber"],"relationToFields":["translationId","bookId","number"],"isGenerated":false,"isUpdatedAt":false},{"name":"bookId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"book","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Book","relationName":"BookToChapterFootnote","relationFromFields":["translationId","bookId"],"relationToFields":["translationId","id"],"isGenerated":false,"isUpdatedAt":false},{"name":"translationId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"translation","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Translation","relationName":"ChapterFootnoteToTranslation","relationFromFields":["translationId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"text","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"verseNumber","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"verse","kind":"object","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterVerse","relationName":"ChapterFootnoteToChapterVerse","relationFromFields":["translationId","bookId","chapterNumber","verseNumber"],"relationToFields":["translationId","bookId","chapterNumber","number"],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["translationId","bookId","chapterNumber","id"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false}},"enums":{},"types":{}}');
5684
5719
  defineDmmfProperty2(exports2.Prisma, config2.runtimeDataModel);
5685
5720
  config2.engineWasm = void 0;
5686
5721
  var { warnEnvConflicts: warnEnvConflicts2 } = require_library();
5687
5722
  warnEnvConflicts2({
5688
- rootEnvPath: config2.relativeEnvPaths.rootEnvPath && path4.resolve(config2.dirname, config2.relativeEnvPaths.rootEnvPath),
5689
- schemaEnvPath: config2.relativeEnvPaths.schemaEnvPath && path4.resolve(config2.dirname, config2.relativeEnvPaths.schemaEnvPath)
5723
+ rootEnvPath: config2.relativeEnvPaths.rootEnvPath && path5.resolve(config2.dirname, config2.relativeEnvPaths.rootEnvPath),
5724
+ schemaEnvPath: config2.relativeEnvPaths.schemaEnvPath && path5.resolve(config2.dirname, config2.relativeEnvPaths.schemaEnvPath)
5690
5725
  });
5691
5726
  var PrismaClient2 = getPrismaClient2(config2);
5692
5727
  exports2.PrismaClient = PrismaClient2;
5693
5728
  Object.assign(exports2, Prisma2);
5694
- path4.join(__dirname, "query_engine-windows.dll.node");
5695
- path4.join(process.cwd(), "packages/helloao-cli/prisma-gen/query_engine-windows.dll.node");
5696
- path4.join(__dirname, "schema.prisma");
5697
- path4.join(process.cwd(), "packages/helloao-cli/prisma-gen/schema.prisma");
5729
+ path5.join(__dirname, "query_engine-windows.dll.node");
5730
+ path5.join(process.cwd(), "packages/helloao-cli/prisma-gen/query_engine-windows.dll.node");
5731
+ path5.join(__dirname, "schema.prisma");
5732
+ path5.join(process.cwd(), "packages/helloao-cli/prisma-gen/schema.prisma");
5698
5733
  }
5699
5734
  });
5700
5735
 
@@ -5703,11 +5738,10 @@ var db_exports = {};
5703
5738
  __export(db_exports, {
5704
5739
  getChangedOrNewInputFiles: () => getChangedOrNewInputFiles,
5705
5740
  getDb: () => getDb,
5706
- getDbFromDir: () => getDbFromDir,
5707
5741
  getDbPath: () => getDbPath,
5708
5742
  getDbPathFromDir: () => getDbPathFromDir,
5709
5743
  getMigrationsPath: () => getMigrationsPath,
5710
- getPrismaDbFromDir: () => getPrismaDbFromDir,
5744
+ getPrismaDb: () => getPrismaDb,
5711
5745
  importCommentaries: () => importCommentaries,
5712
5746
  importFileBatch: () => importFileBatch,
5713
5747
  importFiles: () => importFiles,
@@ -5796,7 +5830,7 @@ async function* serializeOutputFiles(files, options) {
5796
5830
  yield serializedFiles2;
5797
5831
  }
5798
5832
  let serializedFiles = [];
5799
- for (let [path4, files2] of mergableFiles) {
5833
+ for (let [path5, files2] of mergableFiles) {
5800
5834
  let content = {};
5801
5835
  for (let file of files2) {
5802
5836
  if (!content) {
@@ -5815,7 +5849,7 @@ async function* serializeOutputFiles(files, options) {
5815
5849
  }
5816
5850
  }
5817
5851
  if (content) {
5818
- const serialized = await serializeFile(path4, content, options);
5852
+ const serialized = await serializeFile(path5, content, options);
5819
5853
  if (serialized) {
5820
5854
  serializedFiles.push(serialized);
5821
5855
  }
@@ -5823,7 +5857,7 @@ async function* serializeOutputFiles(files, options) {
5823
5857
  }
5824
5858
  yield serializedFiles;
5825
5859
  }
5826
- async function serializeFile(path4, content, options) {
5860
+ async function serializeFile(path5, content, options) {
5827
5861
  const logger = log.getLogger();
5828
5862
  let fileContent;
5829
5863
  if (typeof content === "function") {
@@ -5831,7 +5865,7 @@ async function serializeFile(path4, content, options) {
5831
5865
  } else {
5832
5866
  fileContent = content;
5833
5867
  }
5834
- const ext = extname(path4);
5868
+ const ext = extname(path5);
5835
5869
  if (ext === ".json") {
5836
5870
  let json;
5837
5871
  if (fileContent instanceof ReadableStream) {
@@ -5849,23 +5883,23 @@ async function serializeFile(path4, content, options) {
5849
5883
  );
5850
5884
  }
5851
5885
  return {
5852
- path: path4,
5886
+ path: path5,
5853
5887
  content: json,
5854
5888
  sha256: () => fromByteArray(new Uint8Array(sha256().update(json).digest()))
5855
5889
  };
5856
5890
  } else if (ext === ".mp3") {
5857
5891
  if (fileContent instanceof ReadableStream) {
5858
5892
  return {
5859
- path: path4,
5893
+ path: path5,
5860
5894
  content: Readable.fromWeb(fileContent)
5861
5895
  };
5862
5896
  } else {
5863
- logger.warn("Expected content to be a readable stream for", path4);
5897
+ logger.warn("Expected content to be a readable stream for", path5);
5864
5898
  logger.warn("Skipping file");
5865
5899
  return null;
5866
5900
  }
5867
5901
  }
5868
- logger.warn("Unknown file type", path4);
5902
+ logger.warn("Unknown file type", path5);
5869
5903
  logger.warn("Skipping file");
5870
5904
  return null;
5871
5905
  }
@@ -6092,21 +6126,21 @@ var ZipUploader = class {
6092
6126
  }
6093
6127
  }
6094
6128
  };
6095
- function trimRelativePath(path4) {
6096
- if (path4.startsWith("./")) {
6097
- return path4.substring(2);
6098
- } else if (path4.startsWith("../")) {
6099
- return path4.substring(3);
6100
- } else if (path4.startsWith("/")) {
6101
- return path4.substring(1);
6129
+ function trimRelativePath(path5) {
6130
+ if (path5.startsWith("./")) {
6131
+ return path5.substring(2);
6132
+ } else if (path5.startsWith("../")) {
6133
+ return path5.substring(3);
6134
+ } else if (path5.startsWith("/")) {
6135
+ return path5.substring(1);
6102
6136
  }
6103
- return path4;
6137
+ return path5;
6104
6138
  }
6105
- function makeRelativePath(path4) {
6106
- if (path4.startsWith("/")) {
6107
- return "." + path4;
6139
+ function makeRelativePath(path5) {
6140
+ if (path5.startsWith("/")) {
6141
+ return "." + path5;
6108
6142
  }
6109
- return path4;
6143
+ return path5;
6110
6144
  }
6111
6145
  function hashInputFiles(files) {
6112
6146
  let sha = sha256();
@@ -6194,8 +6228,12 @@ async function importFileBatch(db, files, parser, overwrite) {
6194
6228
  insertCommentaries(db, output.commentaries);
6195
6229
  updateCommentaryHashes(db, output.commentaries);
6196
6230
  insertFileMetadata(db, changedFiles);
6231
+ insertWarningMetadata(db, output.parseMessages);
6197
6232
  logger.log(`Inserted ${output.translations.length} translations into DB`);
6198
6233
  logger.log(`Inserted ${output.commentaries.length} commentaries into DB`);
6234
+ logger.log(
6235
+ `Produced ${output.parseMessages?.length ?? 0} warnings/errors.`
6236
+ );
6199
6237
  }
6200
6238
  function getChangedOrNewInputFiles(db, files) {
6201
6239
  const fileExists = db.prepare(
@@ -6302,7 +6340,8 @@ function insertTranslationBooks(db, translation, translationBooks) {
6302
6340
  name,
6303
6341
  commonName,
6304
6342
  numberOfChapters,
6305
- \`order\`
6343
+ \`order\`,
6344
+ isApocryphal
6306
6345
  ) VALUES (
6307
6346
  @id,
6308
6347
  @translationId,
@@ -6310,13 +6349,15 @@ function insertTranslationBooks(db, translation, translationBooks) {
6310
6349
  @name,
6311
6350
  @commonName,
6312
6351
  @numberOfChapters,
6313
- @bookOrder
6352
+ @bookOrder,
6353
+ @isApocryphal
6314
6354
  ) ON CONFLICT(id,translationId) DO
6315
6355
  UPDATE SET
6316
6356
  title=excluded.title,
6317
6357
  name=excluded.name,
6318
6358
  commonName=excluded.commonName,
6319
- numberOfChapters=excluded.numberOfChapters;`);
6359
+ numberOfChapters=excluded.numberOfChapters,
6360
+ isApocryphal=excluded.isApocryphal;`);
6320
6361
  const insertMany = db.transaction((books) => {
6321
6362
  for (let book of books) {
6322
6363
  if (!book) {
@@ -6329,7 +6370,8 @@ function insertTranslationBooks(db, translation, translationBooks) {
6329
6370
  name: book.name,
6330
6371
  commonName: book.commonName,
6331
6372
  numberOfChapters: book.chapters.length,
6332
- bookOrder: book.order ?? 9999
6373
+ bookOrder: book.order ?? 9999,
6374
+ isApocryphal: Number(book.isApocryphal ?? false)
6333
6375
  });
6334
6376
  }
6335
6377
  });
@@ -6911,8 +6953,9 @@ function getDbPath(p) {
6911
6953
  }
6912
6954
  return getDbPathFromDir(process.cwd());
6913
6955
  }
6914
- function getPrismaDbFromDir(dir) {
6915
- const dbPath = getDbPathFromDir(dir);
6956
+ function getPrismaDb(path5) {
6957
+ const dbPath = getDbPath(path5);
6958
+ console.log("Opening database at", dbPath);
6916
6959
  const prisma = new import_prisma_gen.PrismaClient({
6917
6960
  datasources: {
6918
6961
  db: {
@@ -6922,12 +6965,13 @@ function getPrismaDbFromDir(dir) {
6922
6965
  });
6923
6966
  return prisma;
6924
6967
  }
6925
- async function getDbFromDir(dir) {
6926
- const dbPath = getDbPathFromDir(dir);
6927
- const db = await getDb(dbPath);
6968
+ async function getDb(path5) {
6969
+ const dbPath = getDbPath(path5);
6970
+ const db = await getDbFromPath(dbPath);
6928
6971
  return db;
6929
6972
  }
6930
- async function getDb(dbPath) {
6973
+ async function getDbFromPath(dbPath) {
6974
+ console.log("Opening database at", dbPath);
6931
6975
  const logger = log2.getLogger();
6932
6976
  const migrationsPath = await getMigrationsPath();
6933
6977
  if (!migrationsPath) {
@@ -7076,8 +7120,12 @@ async function* loadTranslationDatasets(db, translationsPerBatch = 50, translati
7076
7120
  );
7077
7121
  const datasetBook = {
7078
7122
  ...book,
7079
- chapters: bookChapters
7123
+ chapters: bookChapters,
7124
+ isApocryphal: book.isApocryphal ?? false
7080
7125
  };
7126
+ if (!datasetBook.isApocryphal) {
7127
+ delete datasetBook.isApocryphal;
7128
+ }
7081
7129
  datasetTranslation.books.push(datasetBook);
7082
7130
  }
7083
7131
  }
@@ -7194,23 +7242,45 @@ function serializeDatasets(datasets, options = {}) {
7194
7242
  options
7195
7243
  );
7196
7244
  }
7245
+ function insertWarningMetadata(db, parseMessages) {
7246
+ if (!parseMessages) return;
7247
+ const logger = log2.getLogger();
7248
+ const insertStatement = db.prepare(
7249
+ "INSERT INTO InputFileWarning (name, type, message) VALUES (?, ?, ?) ON CONFLICT (name, type, message) DO NOTHING;"
7250
+ );
7251
+ for (const [fileName, messages] of Object.entries(parseMessages)) {
7252
+ for (const message of messages) {
7253
+ logger.warn(`Warning in file ${fileName}: ${message.message}`);
7254
+ insertStatement.run(fileName, message.type, message.message);
7255
+ }
7256
+ }
7257
+ }
7197
7258
 
7198
7259
  // packages/helloao-cli/downloads.ts
7199
7260
  var downloads_exports = {};
7200
7261
  __export(downloads_exports, {
7201
- downloadFile: () => downloadFile
7262
+ downloadFile: () => downloadFile,
7263
+ downloadResponse: () => downloadResponse,
7264
+ unzipToDirectory: () => unzipToDirectory
7202
7265
  });
7203
7266
  import { log as log3 } from "@helloao/tools";
7267
+ import { BlobWriter } from "@zip.js/zip.js";
7204
7268
  import { createWriteStream } from "fs-extra";
7269
+ import path3 from "node:path";
7205
7270
  import { Readable as Readable2 } from "node:stream";
7206
7271
  import { finished } from "node:stream/promises";
7207
- async function downloadFile(url, path4, onProgress) {
7272
+ import { exists as exists2 } from "fs-extra";
7273
+ import { writeFile as writeFile2 } from "node:fs/promises";
7274
+ async function downloadFile(url, path5, onProgress) {
7208
7275
  const logger = log3.getLogger();
7209
- logger.log("Downloading", url, "to", path4);
7276
+ logger.log("Downloading", url, "to", path5);
7210
7277
  const response = await fetch(url);
7278
+ await downloadResponse(response, path5, onProgress);
7279
+ }
7280
+ async function downloadResponse(response, path5, onProgress) {
7211
7281
  const totalSize = Number(response.headers.get("content-length"));
7212
7282
  const reader = response.body;
7213
- const writeStream = createWriteStream(path4);
7283
+ const writeStream = createWriteStream(path5);
7214
7284
  const readable = Readable2.fromWeb(reader);
7215
7285
  if (onProgress) {
7216
7286
  let downloadedSize = 0;
@@ -7221,6 +7291,40 @@ async function downloadFile(url, path4, onProgress) {
7221
7291
  }
7222
7292
  await finished(readable.pipe(writeStream));
7223
7293
  }
7294
+ async function unzipToDirectory(zip, directory, overwrite, entryFilter = () => true, closeWhenDone = true) {
7295
+ try {
7296
+ const logger = log3.getLogger();
7297
+ const entries = await zip.getEntries();
7298
+ let usfmFileCount = 0;
7299
+ for (let entry of entries) {
7300
+ if (entry.getData && entry.directory === false && entryFilter(entry)) {
7301
+ usfmFileCount++;
7302
+ const outputPath = path3.resolve(directory, entry.filename);
7303
+ if (!overwrite && await exists2(outputPath)) {
7304
+ logger.log(
7305
+ `File already exists, skipping: ${entry.filename}`
7306
+ );
7307
+ continue;
7308
+ } else if (overwrite && await exists2(outputPath)) {
7309
+ logger.log(`Overwriting existing file: ${entry.filename}`);
7310
+ }
7311
+ const blob = await entry.getData(
7312
+ new BlobWriter("text/plain"),
7313
+ {}
7314
+ );
7315
+ await writeFile2(
7316
+ outputPath,
7317
+ new Uint8Array(await blob.arrayBuffer())
7318
+ );
7319
+ }
7320
+ }
7321
+ return usfmFileCount;
7322
+ } finally {
7323
+ if (closeWhenDone) {
7324
+ await zip.close();
7325
+ }
7326
+ }
7327
+ }
7224
7328
 
7225
7329
  // packages/helloao-cli/uploads.ts
7226
7330
  var uploads_exports = {};
@@ -7273,8 +7377,8 @@ var S3Uploader = class {
7273
7377
  }
7274
7378
  async upload(file, overwrite) {
7275
7379
  const logger = log4.getLogger();
7276
- const path4 = file.path.startsWith("/") ? file.path.substring(1) : file.path;
7277
- const key = this._keyPrefix ? `${this._keyPrefix}/${path4}` : path4;
7380
+ const path5 = file.path.startsWith("/") ? file.path.substring(1) : file.path;
7381
+ const key = this._keyPrefix ? `${this._keyPrefix}/${path5}` : path5;
7278
7382
  const hash = file.sha256?.();
7279
7383
  const head = new HeadObjectCommand({
7280
7384
  Bucket: this._bucketName,
@@ -7575,39 +7679,271 @@ async function uploadFilesUsingUploader(uploader, options, serializedFiles) {
7575
7679
  // packages/helloao-cli/actions.ts
7576
7680
  var actions_exports = {};
7577
7681
  __export(actions_exports, {
7682
+ CONVERSION_INSTRUCTIONS: () => CONVERSION_INSTRUCTIONS,
7578
7683
  askForMetadata: () => askForMetadata,
7579
7684
  fetchAudio: () => fetchAudio,
7580
- fetchTranslations: () => fetchTranslations,
7581
7685
  generateTranslationFiles: () => generateTranslationFiles,
7582
7686
  generateTranslationsFiles: () => generateTranslationsFiles,
7687
+ getMetaPath: () => getMetaPath,
7583
7688
  importCommentaries: () => importCommentaries2,
7584
7689
  importCommentary: () => importCommentary,
7585
7690
  importTranslation: () => importTranslation,
7586
7691
  importTranslations: () => importTranslations2,
7587
7692
  initDb: () => initDb,
7693
+ listEBibleTranslations: () => listEBibleTranslations,
7694
+ printConversionInstructions: () => printConversionInstructions,
7695
+ sourceTranslations: () => sourceTranslations,
7588
7696
  uploadTestTranslation: () => uploadTestTranslation,
7589
7697
  uploadTestTranslations: () => uploadTestTranslations
7590
7698
  });
7591
- import path3, { basename, extname as extname4 } from "node:path";
7699
+ import path4, { basename, extname as extname4 } from "node:path";
7592
7700
  import Sql3 from "better-sqlite3";
7593
7701
  import { DOMParser, Element, Node } from "linkedom";
7594
- import { mkdir as mkdir2, readdir as readdir3, rm as rm2, writeFile as writeFile2 } from "node:fs/promises";
7595
- import { BibleClient } from "@gracious.tech/fetch-client";
7596
- import {
7597
- getFirstNonEmpty,
7598
- getTranslationId,
7599
- normalizeLanguage
7600
- } from "@helloao/tools/utils.js";
7601
- import { exists as exists2 } from "fs-extra";
7702
+ import { mkdir as mkdir3, readdir as readdir4, rm as rm2, writeFile as writeFile3 } from "node:fs/promises";
7703
+ import { getFirstNonEmpty, normalizeLanguage } from "@helloao/tools/utils.js";
7704
+ import { exists as exists3, readFile as readFile3 } from "fs-extra";
7602
7705
  import { KNOWN_AUDIO_TRANSLATIONS } from "@helloao/tools/generation/audio.js";
7603
7706
  import { bookChapterCountMap } from "@helloao/tools/generation/book-order.js";
7604
7707
  import { batch, toAsyncIterable } from "@helloao/tools/parser/iterators.js";
7605
7708
  import { generateDataset as generateDataset2 } from "@helloao/tools/generation/dataset.js";
7606
- import { input as input2, select, confirm } from "@inquirer/prompts";
7709
+ import { input as input3, select, confirm as confirm2, checkbox } from "@inquirer/prompts";
7607
7710
  import { isValid } from "all-iso-language-codes";
7711
+ import { log as log7 } from "@helloao/tools";
7712
+ import { DateTime as DateTime2 } from "luxon";
7713
+ import { BlobReader, ZipReader as ZipReader2 } from "@zip.js/zip.js";
7714
+ import { tmpdir } from "node:os";
7715
+ import { existsSync as existsSync3 } from "fs";
7716
+
7717
+ // packages/helloao-cli/conversion.ts
7718
+ import { mkdir as mkdir2, readdir as readdir3 } from "node:fs/promises";
7719
+ import { existsSync as existsSync2 } from "fs";
7720
+ import { execFile as execFileCallback } from "child_process";
7721
+ import { promisify } from "util";
7722
+ import { confirm, input as input2 } from "@inquirer/prompts";
7608
7723
  import { log as log6 } from "@helloao/tools";
7609
- async function initDb(dbPath, options) {
7724
+ var execFile = promisify(execFileCallback);
7725
+ async function findBibleMultiConverterJar(providedPath) {
7726
+ const logger = log6.getLogger();
7727
+ if (providedPath && existsSync2(providedPath)) {
7728
+ return providedPath;
7729
+ }
7730
+ const commonPaths = [
7731
+ "./BibleMultiConverter.jar",
7732
+ "./tools/BibleMultiConverter.jar",
7733
+ "../BibleMultiConverter.jar",
7734
+ "../../BibleMultiConverter.jar",
7735
+ "BibleMultiConverter.jar"
7736
+ ];
7737
+ const folderPaths = [
7738
+ "./BibleMultiConverter/BibleMultiConverter.jar",
7739
+ "./tools/BibleMultiConverter/BibleMultiConverter.jar",
7740
+ "../BibleMultiConverter/BibleMultiConverter.jar",
7741
+ "../../BibleMultiConverter/BibleMultiConverter.jar"
7742
+ ];
7743
+ const allPaths = [...commonPaths, ...folderPaths];
7744
+ for (const jarPath of allPaths) {
7745
+ if (existsSync2(jarPath)) {
7746
+ logger.log(`Found BibleMultiConverter.jar at: ${jarPath}`);
7747
+ return jarPath;
7748
+ }
7749
+ }
7750
+ return null;
7751
+ }
7752
+ async function promptForBibleMultiConverter() {
7610
7753
  const logger = log6.getLogger();
7754
+ logger.log("BibleMultiConverter.jar not found in common locations.");
7755
+ const hasConverter = await confirm({
7756
+ message: "Do you have BibleMultiConverter.jar available?"
7757
+ });
7758
+ if (!hasConverter) {
7759
+ logger.log(
7760
+ "Please download BibleMultiConverter.jar from: https://github.com/schierlm/BibleMultiConverter/releases"
7761
+ );
7762
+ return null;
7763
+ }
7764
+ const jarPath = await input2({
7765
+ message: "Enter the full path to BibleMultiConverter.jar:",
7766
+ validate: (input4) => {
7767
+ if (!existsSync2(input4)) {
7768
+ return "File not found. Please enter a valid path.";
7769
+ }
7770
+ if (!input4.endsWith(".jar")) {
7771
+ return "Please provide a .jar file.";
7772
+ }
7773
+ return true;
7774
+ }
7775
+ });
7776
+ return jarPath;
7777
+ }
7778
+ async function convertUsfmToUsx3(inputDir, outputDir, jarPath) {
7779
+ const logger = log6.getLogger();
7780
+ try {
7781
+ logger.log(`Converting USFM files from ${inputDir} to USX3 format...`);
7782
+ await mkdir2(outputDir, { recursive: true });
7783
+ const args = [
7784
+ "-jar",
7785
+ jarPath,
7786
+ "ParatextConverter",
7787
+ "USFM",
7788
+ inputDir,
7789
+ "USX3",
7790
+ outputDir,
7791
+ "*.usx"
7792
+ ];
7793
+ logger.log(`Running: java ${args.join(" ")}`);
7794
+ const { stdout, stderr } = await execFile("java", args);
7795
+ if (stdout) logger.log("Conversion output:", stdout);
7796
+ if (stderr) logger.log("Conversion warnings:", stderr);
7797
+ const files = await readdir3(outputDir);
7798
+ const usxFiles = files.filter((f) => f.endsWith(".usx"));
7799
+ if (usxFiles.length > 0) {
7800
+ logger.log(
7801
+ `Successfully converted to ${usxFiles.length} USX3 files`
7802
+ );
7803
+ return true;
7804
+ } else {
7805
+ logger.log("No USX3 files were created");
7806
+ return false;
7807
+ }
7808
+ } catch (error) {
7809
+ logger.error("Conversion failed:", error.message);
7810
+ return false;
7811
+ }
7812
+ }
7813
+
7814
+ // packages/helloao-cli/ebible.ts
7815
+ import { parse as parse2 } from "papaparse";
7816
+ import { DateTime } from "luxon";
7817
+ import { sha256 as sha2563 } from "hash.js";
7818
+ import { getTranslationId } from "@helloao/tools/utils.js";
7819
+ async function fetchEBibleMetadata() {
7820
+ const translationsResponse = await fetch(
7821
+ "https://ebible.org/Scriptures/translations.csv"
7822
+ );
7823
+ const translationsCsv = await translationsResponse.text();
7824
+ const ebibleTranslations = parse2(translationsCsv.trimEnd(), {
7825
+ header: true
7826
+ });
7827
+ return ebibleTranslations.data.map((translation) => {
7828
+ const fcbhid = translation.FCBHID.trim();
7829
+ const languageCode = translation.languageCode.trim();
7830
+ const source = {
7831
+ id: translation.translationId,
7832
+ translationId: getTranslationId(
7833
+ `${languageCode.toLowerCase()}_${fcbhid.slice(3).toLowerCase()}`
7834
+ ),
7835
+ title: translation.title.trim(),
7836
+ shortTitle: translation.shortTitle.trim(),
7837
+ textDirection: translation.textDirection.trim(),
7838
+ languageCode,
7839
+ copyright: translation.Copyright.trim(),
7840
+ description: translation.description.trim(),
7841
+ oldTestamentBooks: parseInt(translation.OTbooks.trim()),
7842
+ oldTestamentChapters: parseInt(translation.OTchapters.trim()),
7843
+ oldTestamentVerses: parseInt(translation.OTverses.trim()),
7844
+ newTestamentBooks: parseInt(translation.NTbooks.trim()),
7845
+ newTestamentChapters: parseInt(translation.NTchapters.trim()),
7846
+ newTestamentVerses: parseInt(translation.NTverses.trim()),
7847
+ apocryphaBooks: parseInt(translation.DCbooks.trim()),
7848
+ apocryphaChapters: parseInt(translation.DCchapters.trim()),
7849
+ apocryphaVerses: parseInt(translation.DCverses.trim()),
7850
+ redistributable: translation.Redistributable.trim().toUpperCase() === "TRUE" ? "TRUE" : "FALSE",
7851
+ FCBHID: fcbhid,
7852
+ sourceDate: DateTime.fromISO(
7853
+ translation.sourceDate.trim()
7854
+ ).toISO(),
7855
+ updateDate: DateTime.fromISO(
7856
+ translation.UpdateDate.trim()
7857
+ ).toISO(),
7858
+ usfmDownloadDate: null,
7859
+ usfmDownloadPath: null,
7860
+ usfmZipUrl: null,
7861
+ usfmZipEtag: null,
7862
+ sha256: null
7863
+ };
7864
+ source.sha256 = sha2563().update(source.id).update(source.translationId).update(source.title).update(source.shortTitle).update(source.languageCode).update(source.textDirection).update(source.copyright).update(source.description).update(source.oldTestamentBooks).update(source.oldTestamentChapters).update(source.oldTestamentVerses).update(source.newTestamentBooks).update(source.newTestamentChapters).update(source.newTestamentVerses).update(source.apocryphaBooks).update(source.apocryphaChapters).update(source.apocryphaVerses).update(source.redistributable).update(source.sourceDate).update(source.updateDate).digest("hex");
7865
+ return source;
7866
+ });
7867
+ }
7868
+
7869
+ // packages/helloao-cli/actions.ts
7870
+ var dirname4 = __dirname;
7871
+ if (!dirname4) {
7872
+ dirname4 = import.meta.dirname;
7873
+ }
7874
+ var metaDir = null;
7875
+ async function getMetaPath() {
7876
+ if (metaDir) {
7877
+ return metaDir;
7878
+ }
7879
+ const metaPaths = ["../../meta"];
7880
+ for (let metaPath of metaPaths) {
7881
+ const fullPath = path4.resolve(dirname4, metaPath);
7882
+ if (await exists3(fullPath)) {
7883
+ metaDir = fullPath;
7884
+ return fullPath;
7885
+ }
7886
+ }
7887
+ return null;
7888
+ }
7889
+ async function createMetadataJson(outputDir, source, overwrite = false) {
7890
+ const logger = log7.getLogger();
7891
+ const metadataPath = path4.resolve(outputDir, "metadata.json");
7892
+ const metadataExists = await exists3(metadataPath);
7893
+ if (!overwrite && metadataExists) {
7894
+ logger.log(`Metadata file already exists: ${metadataPath}`);
7895
+ return;
7896
+ }
7897
+ const metaDir2 = await getMetaPath();
7898
+ let metadata = null;
7899
+ if (metaDir2) {
7900
+ const overridePath = path4.resolve(
7901
+ metaDir2,
7902
+ `${source.translationId}.json`
7903
+ );
7904
+ const overrideExists = await exists3(overridePath);
7905
+ if (overrideExists) {
7906
+ logger.log(`Using override metadata file: ${overridePath}`);
7907
+ const overrideMetadata = await readFile3(overridePath, "utf-8");
7908
+ metadata = JSON.parse(overrideMetadata);
7909
+ }
7910
+ }
7911
+ if (!metadata) {
7912
+ const language = normalizeLanguage(source.languageCode);
7913
+ const englishName = getFirstNonEmpty(
7914
+ source.shortTitle?.normalize("NFKC")?.replace(/\p{Diacritic}/gu, ""),
7915
+ source.title
7916
+ );
7917
+ let shortName = null;
7918
+ if (language === "eng") {
7919
+ shortName = source.title.replace(/[^A-Z]/g, "").toUpperCase().slice(0, 5);
7920
+ if (shortName.length <= 2) {
7921
+ shortName = null;
7922
+ }
7923
+ }
7924
+ if (!shortName) {
7925
+ shortName = source.translationId.toUpperCase().replace(/[^A-Z0-9]/g, "").slice(3);
7926
+ }
7927
+ metadata = {
7928
+ id: source.translationId,
7929
+ name: getFirstNonEmpty(
7930
+ source.title,
7931
+ source.shortTitle,
7932
+ source.translationId
7933
+ ),
7934
+ direction: /rtl/gi.test(source.textDirection ?? "ltr") ? "rtl" : "ltr",
7935
+ englishName,
7936
+ language,
7937
+ licenseUrl: `https://ebible.org/Scriptures/details.php?id=${source.id}`,
7938
+ shortName,
7939
+ website: `https://ebible.org/Scriptures/details.php?id=${source.id}`
7940
+ };
7941
+ }
7942
+ await writeFile3(metadataPath, JSON.stringify(metadata, null, 2));
7943
+ logger.log(`Created metadata.json: ${metadataPath}`);
7944
+ }
7945
+ async function initDb(dbPath, options) {
7946
+ const logger = log7.getLogger();
7611
7947
  logger.log("Initializing new Bible API DB...");
7612
7948
  if (options.source) {
7613
7949
  if (options.source.startsWith("https://")) {
@@ -7622,7 +7958,7 @@ async function initDb(dbPath, options) {
7622
7958
  });
7623
7959
  } else {
7624
7960
  const databasePath = getDbPath(dbPath);
7625
- if (await exists2(databasePath)) {
7961
+ if (await exists3(databasePath)) {
7626
7962
  if (!options.overwrite) {
7627
7963
  logger.log("Database already exists.");
7628
7964
  return;
@@ -7632,7 +7968,7 @@ async function initDb(dbPath, options) {
7632
7968
  }
7633
7969
  }
7634
7970
  const db = new Sql3(databasePath, {});
7635
- const sourcePath = path3.resolve(options.source);
7971
+ const sourcePath = path4.resolve(options.source);
7636
7972
  try {
7637
7973
  logger.log("Copying schema from source DB...");
7638
7974
  if (options.language) {
@@ -7707,7 +8043,7 @@ async function initDb(dbPath, options) {
7707
8043
  }
7708
8044
  }
7709
8045
  } else {
7710
- const db = await getDb(getDbPath(dbPath));
8046
+ const db = await getDb(dbPath);
7711
8047
  db.close();
7712
8048
  }
7713
8049
  }
@@ -7716,7 +8052,7 @@ async function importTranslation(dir, dirs, options) {
7716
8052
  globalThis.DOMParser = DOMParser;
7717
8053
  globalThis.Element = Element;
7718
8054
  globalThis.Node = Node;
7719
- const db = await getDbFromDir(process.cwd());
8055
+ const db = await getDb(options.db);
7720
8056
  try {
7721
8057
  await importTranslations(
7722
8058
  db,
@@ -7729,15 +8065,15 @@ async function importTranslation(dir, dirs, options) {
7729
8065
  }
7730
8066
  }
7731
8067
  async function importTranslations2(dir, options) {
7732
- const logger = log6.getLogger();
8068
+ const logger = log7.getLogger();
7733
8069
  const parser = new DOMParser();
7734
8070
  globalThis.DOMParser = DOMParser;
7735
8071
  globalThis.Element = Element;
7736
8072
  globalThis.Node = Node;
7737
- const db = await getDbFromDir(process.cwd());
8073
+ const db = await getDb(options.db);
7738
8074
  try {
7739
- const files = await readdir3(dir);
7740
- const translationDirs = files.map((f) => path3.resolve(dir, f));
8075
+ const files = await readdir4(dir);
8076
+ const translationDirs = files.map((f) => path4.resolve(dir, f));
7741
8077
  logger.log(`Importing ${translationDirs.length} translations`);
7742
8078
  await importTranslations(
7743
8079
  db,
@@ -7754,7 +8090,7 @@ async function importCommentary(dir, dirs, options) {
7754
8090
  globalThis.DOMParser = DOMParser;
7755
8091
  globalThis.Element = Element;
7756
8092
  globalThis.Node = Node;
7757
- const db = await getDbFromDir(process.cwd());
8093
+ const db = await getDb(options.db);
7758
8094
  try {
7759
8095
  await importCommentaries(
7760
8096
  db,
@@ -7767,15 +8103,15 @@ async function importCommentary(dir, dirs, options) {
7767
8103
  }
7768
8104
  }
7769
8105
  async function importCommentaries2(dir, options) {
7770
- const logger = log6.getLogger();
8106
+ const logger = log7.getLogger();
7771
8107
  const parser = new DOMParser();
7772
8108
  globalThis.DOMParser = DOMParser;
7773
8109
  globalThis.Element = Element;
7774
8110
  globalThis.Node = Node;
7775
- const db = await getDbFromDir(process.cwd());
8111
+ const db = await getDb(options.db);
7776
8112
  try {
7777
- const files = await readdir3(dir);
7778
- const commentaryDirs = files.map((f) => path3.resolve(dir, f));
8113
+ const files = await readdir4(dir);
8114
+ const commentaryDirs = files.map((f) => path4.resolve(dir, f));
7779
8115
  logger.log(`Importing ${commentaryDirs.length} commentaries`);
7780
8116
  await importCommentaries(
7781
8117
  db,
@@ -7787,105 +8123,8 @@ async function importCommentaries2(dir, options) {
7787
8123
  db.close();
7788
8124
  }
7789
8125
  }
7790
- async function fetchTranslations(dir, translations, options = {}) {
7791
- const logger = log6.getLogger();
7792
- const translationsSet = new Set(translations);
7793
- const client = new BibleClient({
7794
- remember_fetches: false
7795
- });
7796
- const collection = await client.fetch_collection();
7797
- const collectionTranslations = collection.get_translations();
7798
- logger.log(`Discovered ${collectionTranslations.length} translations`);
7799
- const filtered = translations && translations.length <= 0 ? collectionTranslations : collectionTranslations.filter((t) => translationsSet.has(t.id));
7800
- let batches = [];
7801
- while (filtered.length > 0) {
7802
- batches.push(filtered.splice(0, 10));
7803
- }
7804
- logger.log(
7805
- `Downloading ${filtered.length} translations in ${batches.length} batches`
7806
- );
7807
- for (let i = 0; i < batches.length; i++) {
7808
- const batch2 = batches[i];
7809
- logger.log(`Downloading batch ${i + 1} of ${batches.length}`);
7810
- const translations2 = await Promise.all(
7811
- batch2.map(async (t) => {
7812
- const id2 = getTranslationId(t.id);
7813
- const translation = {
7814
- id: id2,
7815
- name: getFirstNonEmpty(
7816
- t.name_local,
7817
- t.name_english,
7818
- t.name_abbrev
7819
- ),
7820
- direction: getFirstNonEmpty(t.direction, "ltr"),
7821
- englishName: getFirstNonEmpty(
7822
- t.name_english,
7823
- t.name_abbrev,
7824
- t.name_local
7825
- ),
7826
- language: normalizeLanguage(t.language),
7827
- licenseUrl: t.attribution_url,
7828
- shortName: getFirstNonEmpty(t.name_abbrev, id2),
7829
- website: t.attribution_url
7830
- };
7831
- const books = await Promise.all(
7832
- collection.get_books(t.id).map(async (b2) => {
7833
- const name = `${b2.id}.usx`;
7834
- if (!options.all && await exists2(
7835
- path3.resolve(dir, translation.id, name)
7836
- )) {
7837
- return null;
7838
- }
7839
- const content = await collection.fetch_book(
7840
- t.id,
7841
- b2.id,
7842
- "usx"
7843
- );
7844
- const contentString = content.get_whole();
7845
- const file = {
7846
- fileType: "usx",
7847
- content: contentString,
7848
- metadata: translation,
7849
- name
7850
- };
7851
- return file;
7852
- })
7853
- );
7854
- return {
7855
- translation,
7856
- books
7857
- };
7858
- })
7859
- );
7860
- logger.log(`Writing batch ${i + 1} of ${batches.length}`);
7861
- let promises = [];
7862
- for (let { translation, books } of translations2) {
7863
- for (let book of books) {
7864
- if (!book) {
7865
- continue;
7866
- }
7867
- if (!book.name) {
7868
- throw new Error("Book name is required");
7869
- }
7870
- const fullPath = path3.resolve(dir, translation.id, book.name);
7871
- await mkdir2(path3.dirname(fullPath), { recursive: true });
7872
- const promise = writeFile2(fullPath, book.content);
7873
- promises.push(promise);
7874
- }
7875
- const translationPath = path3.resolve(
7876
- dir,
7877
- translation.id,
7878
- "metadata.json"
7879
- );
7880
- await mkdir2(path3.dirname(translationPath), { recursive: true });
7881
- const translationData = JSON.stringify(translation, null, 2);
7882
- promises.push(writeFile2(translationPath, translationData));
7883
- }
7884
- await Promise.all(promises);
7885
- }
7886
- }
7887
8126
  async function fetchAudio(dir, translations, options = {}) {
7888
- const logger = log6.getLogger();
8127
+ const logger = log7.getLogger();
7889
8128
  for (let translation of translations) {
7890
8129
  const [translationId, reader] = translation.split("/");
7891
8130
  const generator = KNOWN_AUDIO_TRANSLATIONS.get(translationId)?.get(reader);
@@ -7899,14 +8138,14 @@ async function fetchAudio(dir, translations, options = {}) {
7899
8138
  const ext = extname4(url);
7900
8139
  const [translationId2, reader2] = translation.split("/");
7901
8140
  const name = `${chapter}.${reader2}${ext}`;
7902
- const fullPath = path3.resolve(
8141
+ const fullPath = path4.resolve(
7903
8142
  dir,
7904
8143
  "audio",
7905
8144
  translationId2,
7906
8145
  bookId,
7907
8146
  name
7908
8147
  );
7909
- if (!options.all && await exists2(fullPath)) {
8148
+ if (!options.all && await exists3(fullPath)) {
7910
8149
  continue;
7911
8150
  }
7912
8151
  await downloadFile(url, fullPath);
@@ -7914,12 +8153,12 @@ async function fetchAudio(dir, translations, options = {}) {
7914
8153
  }
7915
8154
  }
7916
8155
  }
7917
- async function generateTranslationsFiles(input3, dest, options) {
8156
+ async function generateTranslationsFiles(input4, dest, options) {
7918
8157
  const parser = new DOMParser();
7919
8158
  globalThis.DOMParser = DOMParser;
7920
8159
  globalThis.Element = Element;
7921
8160
  globalThis.Node = Node;
7922
- const dirs = await readdir3(path3.resolve(input3));
8161
+ const dirs = await readdir4(path4.resolve(input4));
7923
8162
  const batchSize = typeof options.batchSize === "number" ? options.batchSize : parseInt(options.batchSize);
7924
8163
  for (let b2 of batch(dirs, batchSize)) {
7925
8164
  const files = await loadTranslationsFiles(b2);
@@ -7931,14 +8170,520 @@ async function generateTranslationsFiles(input3, dest, options) {
7931
8170
  );
7932
8171
  }
7933
8172
  }
7934
- async function generateTranslationFiles(input3, dest, options) {
7935
- const logger = log6.getLogger();
8173
+ var CONVERSION_INSTRUCTIONS = {
8174
+ downloadUrl: "https://github.com/schierlm/BibleMultiConverter/releases",
8175
+ javaRequirement: "Java 8 or higher required",
8176
+ getConversionCommand: (inputDir, outputDir, filenamePattern = "*.usx") => {
8177
+ return `java -jar BibleMultiConverter.jar ParatextConverter USFM "${inputDir}" USX3 "${outputDir}" "${filenamePattern}"`;
8178
+ },
8179
+ examples: {
8180
+ windows: 'java -jar BibleMultiConverter.jar ParatextConverter USFM "C:\\input\\usfm" USX3 "C:\\output\\usx3" "*.usx"',
8181
+ unix: 'java -jar BibleMultiConverter.jar ParatextConverter USFM "/path/to/input/usfm" USX3 "/path/to/output/usx3" "*.usx"'
8182
+ }
8183
+ };
8184
+ function printConversionInstructions() {
8185
+ const logger = log7.getLogger();
8186
+ logger.log("\n=== MANUAL CONVERSION REQUIRED ===");
8187
+ logger.log("Automatic conversion is not available.");
8188
+ logger.log("");
8189
+ logger.log("To enable automatic conversion, please:");
8190
+ logger.log("1. Download BibleMultiConverter.zip from:");
8191
+ logger.log(` ${CONVERSION_INSTRUCTIONS.downloadUrl}`);
8192
+ logger.log("");
8193
+ logger.log("2. Extract the zip file to one of these locations:");
8194
+ logger.log(" \u2022 Current directory (./BibleMultiConverter/)");
8195
+ logger.log(" \u2022 Tools subdirectory (./tools/BibleMultiConverter/)");
8196
+ logger.log(" \u2022 Parent directory (../BibleMultiConverter/)");
8197
+ logger.log(
8198
+ " \u2022 Or extract anywhere and provide the JAR path when prompted"
8199
+ );
8200
+ logger.log("");
8201
+ logger.log("3. Ensure Java 8+ is installed");
8202
+ logger.log("");
8203
+ logger.log("4. Re-run this command with the --convertToUsx3 option");
8204
+ logger.log("");
8205
+ logger.log("==========================================\n");
8206
+ }
8207
+ function matchesTranslation(translationQuery, source) {
8208
+ const lowerQuery = translationQuery.toLowerCase();
8209
+ const lowerSourceId = source.id.toLowerCase();
8210
+ const lowerTranslationId = source.translationId.toLowerCase();
8211
+ const exactMatch = translationQuery === source.translationId || translationQuery === source.id;
8212
+ const caseInsensitiveMatch = lowerQuery === lowerTranslationId || lowerQuery === lowerSourceId;
8213
+ const partialMatch = lowerSourceId.includes(lowerQuery) || lowerTranslationId.includes(lowerQuery);
8214
+ return exactMatch || caseInsensitiveMatch || partialMatch;
8215
+ }
8216
+ function groupSourcesByTranslation(sources, translationQueries) {
8217
+ const groups = /* @__PURE__ */ new Map();
8218
+ for (const query of translationQueries) {
8219
+ const matchingSources = sources.filter(
8220
+ (source) => matchesTranslation(query, source)
8221
+ );
8222
+ if (matchingSources.length > 0) {
8223
+ groups.set(query, matchingSources);
8224
+ }
8225
+ }
8226
+ return groups;
8227
+ }
8228
+ async function selectSourcesForTranslation(translationQuery, sources) {
8229
+ const logger = log7.getLogger();
8230
+ if (sources.length === 0) {
8231
+ logger.log(`No sources found for translation: ${translationQuery}`);
8232
+ return [];
8233
+ }
8234
+ if (sources.length === 1) {
8235
+ logger.log(
8236
+ `Found 1 source for '${translationQuery}': ${sources[0].id} -> ${sources[0].translationId} | ${sources[0].title}`
8237
+ );
8238
+ logger.log(`Automatically selecting: ${sources[0].id}`);
8239
+ return sources;
8240
+ }
8241
+ logger.log(`
8242
+ Found ${sources.length} sources for '${translationQuery}':`);
8243
+ sources.forEach((source, index) => {
8244
+ logger.log(
8245
+ ` ${index + 1}. ${source.id} -> ${source.translationId} | ${source.title} | ${source.languageCode}`
8246
+ );
8247
+ });
8248
+ const SELECT_ALL_VALUE = -1;
8249
+ const choices = [
8250
+ ...sources.map((source, index) => ({
8251
+ name: `${source.id} -> ${source.translationId} | ${source.title} | ${source.languageCode}`,
8252
+ value: index,
8253
+ checked: false
8254
+ })),
8255
+ { name: "Select All", value: SELECT_ALL_VALUE, checked: false }
8256
+ ];
8257
+ const selectedIndices = await checkbox({
8258
+ message: `Select sources for '${translationQuery}' (use space to select, enter to confirm):`,
8259
+ choices,
8260
+ validate: (choices2) => {
8261
+ if (choices2.length === 0) {
8262
+ return 'Please select at least one source or "Select All"';
8263
+ }
8264
+ return true;
8265
+ }
8266
+ });
8267
+ if (selectedIndices.includes(SELECT_ALL_VALUE)) {
8268
+ logger.log(
8269
+ `Selected all ${sources.length} sources for '${translationQuery}'.`
8270
+ );
8271
+ return sources;
8272
+ } else {
8273
+ const selectedSources = selectedIndices.filter((index) => index !== SELECT_ALL_VALUE).map((index) => sources[index]);
8274
+ logger.log(
8275
+ `Selected ${selectedSources.length} sources for '${translationQuery}'.`
8276
+ );
8277
+ return selectedSources;
8278
+ }
8279
+ }
8280
+ async function sourceTranslations(outputDir, translations, options = {}) {
8281
+ const logger = log7.getLogger();
8282
+ let {
8283
+ convertToUsx3 = false,
8284
+ useDatabase = true,
8285
+ // Default to true
8286
+ bibleMultiConverterPath,
8287
+ overwrite = false
8288
+ } = options;
8289
+ logger.log("Fetching eBible metadata...");
8290
+ const ebibleSources = await fetchEBibleMetadata();
8291
+ logger.log(`Total eBible sources found: ${ebibleSources.length}`);
8292
+ logger.log("");
8293
+ if (useDatabase) {
8294
+ logger.log("DATABASE TRACKING: ENABLED");
8295
+ logger.log(" \u2022 Will check existing downloads in database");
8296
+ logger.log(" \u2022 Will skip already downloaded sources");
8297
+ logger.log(" \u2022 Will update database with download information");
8298
+ } else {
8299
+ logger.log("DATABASE TRACKING: DISABLED");
8300
+ logger.log(" \u2022 All matching sources will be processed");
8301
+ logger.log(" \u2022 No database filtering or updates will be performed");
8302
+ logger.log(" \u2022 Downloads may overwrite existing files");
8303
+ }
8304
+ logger.log("");
8305
+ let filteredSources = ebibleSources.filter((source) => {
8306
+ if (!source.FCBHID) {
8307
+ return false;
8308
+ }
8309
+ if (translations && translations.length > 0 && !translations.some((t) => matchesTranslation(t, source))) {
8310
+ return false;
8311
+ }
8312
+ return true;
8313
+ });
8314
+ let db = null;
8315
+ let sourceExists = null;
8316
+ let sourceUpsert = null;
8317
+ if (useDatabase) {
8318
+ if (!overwrite) {
8319
+ overwrite = true;
8320
+ console.warn(
8321
+ "Overwriting files is enabled due to database tracking."
8322
+ );
8323
+ }
8324
+ logger.log("Connecting to database for download tracking...");
8325
+ db = await getDb(options.db);
8326
+ sourceExists = db.prepare(
8327
+ "SELECT usfmZipEtag, usfmDownloadDate FROM EBibleSource WHERE id = @id AND sha256 = @sha256;"
8328
+ );
8329
+ let skippedByDatabase = 0;
8330
+ let sourcesChecked = 0;
8331
+ let notDownloaded = 0;
8332
+ filteredSources = filteredSources.filter((source) => {
8333
+ const existingSource = sourceExists.get(source);
8334
+ sourcesChecked++;
8335
+ if (existingSource) {
8336
+ if (!existingSource.usfmDownloadDate) {
8337
+ notDownloaded++;
8338
+ return true;
8339
+ }
8340
+ source.usfmZipEtag = existingSource.usfmZipEtag;
8341
+ source.usfmDownloadDate = existingSource.usfmDownloadDate;
8342
+ if (translations && translations.length > 0 && translations.some((t) => matchesTranslation(t, source))) {
8343
+ return true;
8344
+ }
8345
+ skippedByDatabase++;
8346
+ return false;
8347
+ }
8348
+ return true;
8349
+ });
8350
+ if (skippedByDatabase > 0) {
8351
+ logger.log(
8352
+ `Database filtering: Skipped ${skippedByDatabase} already downloaded sources.`
8353
+ );
8354
+ } else {
8355
+ logger.log(`Database filtering: No sources were skipped.`);
8356
+ }
8357
+ logger.log(`Database filtering:`);
8358
+ logger.log(` \u2022 Checked: ${sourcesChecked}`);
8359
+ logger.log(` \u2022 Skipped: ${skippedByDatabase}`);
8360
+ logger.log(` \u2022 New: ${notDownloaded}`);
8361
+ logger.log(
8362
+ ` \u2022 Needs Update: ${filteredSources.length - notDownloaded}`
8363
+ );
8364
+ sourceUpsert = db.prepare(`INSERT INTO EBibleSource(
8365
+ id, translationId, title, shortTitle, languageCode, textDirection, copyright, description,
8366
+ oldTestamentBooks, oldTestamentChapters, oldTestamentVerses,
8367
+ newTestamentBooks, newTestamentChapters, newTestamentVerses,
8368
+ apocryphaBooks, apocryphaChapters, apocryphaVerses,
8369
+ redistributable, sourceDate, updateDate, usfmDownloadDate,
8370
+ usfmDownloadPath, sha256, usfmZipUrl, usfmZipEtag, FCBHID
8371
+ ) VALUES (
8372
+ @id, @translationId, @title, @shortTitle, @languageCode, @textDirection, @copyright, @description,
8373
+ @oldTestamentBooks, @oldTestamentChapters, @oldTestamentVerses,
8374
+ @newTestamentBooks, @newTestamentChapters, @newTestamentVerses,
8375
+ @apocryphaBooks, @apocryphaChapters, @apocryphaVerses,
8376
+ @redistributable, @sourceDate, @updateDate, @usfmDownloadDate,
8377
+ @usfmDownloadPath, @sha256, @usfmZipUrl, @usfmZipEtag, @FCBHID
8378
+ ) ON CONFLICT(id) DO UPDATE SET
8379
+ translationId = excluded.translationId, title = excluded.title, shortTitle = excluded.shortTitle,
8380
+ languageCode = excluded.languageCode, textDirection = excluded.textDirection, copyright = excluded.copyright,
8381
+ description = excluded.description, oldTestamentBooks = excluded.oldTestamentBooks,
8382
+ oldTestamentChapters = excluded.oldTestamentChapters, oldTestamentVerses = excluded.oldTestamentVerses,
8383
+ newTestamentBooks = excluded.newTestamentBooks, newTestamentChapters = excluded.newTestamentChapters,
8384
+ newTestamentVerses = excluded.newTestamentVerses, apocryphaBooks = excluded.apocryphaBooks,
8385
+ apocryphaChapters = excluded.apocryphaChapters, apocryphaVerses = excluded.apocryphaVerses,
8386
+ redistributable = excluded.redistributable, sourceDate = excluded.sourceDate,
8387
+ updateDate = excluded.updateDate, usfmDownloadDate = excluded.usfmDownloadDate,
8388
+ usfmDownloadPath = excluded.usfmDownloadPath, sha256 = excluded.sha256,
8389
+ usfmZipUrl = excluded.usfmZipUrl, usfmZipEtag = excluded.usfmZipEtag,
8390
+ FCBHID = excluded.FCBHID;
8391
+ `);
8392
+ } else {
8393
+ logger.log("Database connection skipped (tracking disabled)");
8394
+ }
8395
+ logger.log(`Found ${filteredSources.length} sources to process`);
8396
+ let selectedSources = [];
8397
+ if (translations && translations.length > 0) {
8398
+ const sourceGroups = groupSourcesByTranslation(
8399
+ filteredSources,
8400
+ translations
8401
+ );
8402
+ if (sourceGroups.size === 0) {
8403
+ logger.log(
8404
+ "No matching sources found for any of the specified translations."
8405
+ );
8406
+ logger.log(
8407
+ 'Tip: Use the "list-ebible-translations" command to find available translations.'
8408
+ );
8409
+ return;
8410
+ }
8411
+ logger.log(`Processing ${sourceGroups.size} translation(s)...
8412
+ `);
8413
+ for (const [translationQuery, sources] of sourceGroups) {
8414
+ const selected = await selectSourcesForTranslation(
8415
+ translationQuery,
8416
+ sources
8417
+ );
8418
+ selectedSources.push(...selected);
8419
+ }
8420
+ if (selectedSources.length === 0) {
8421
+ logger.log("No sources selected for download.");
8422
+ return;
8423
+ }
8424
+ logger.log(
8425
+ `
8426
+ Total selected: ${selectedSources.length} sources from ${sourceGroups.size} translation(s).`
8427
+ );
8428
+ } else {
8429
+ selectedSources = filteredSources;
8430
+ if (selectedSources.length === 0) {
8431
+ logger.log("No sources found.");
8432
+ return;
8433
+ }
8434
+ }
8435
+ const tempDir = path4.join(
8436
+ tmpdir(),
8437
+ "bible-api",
8438
+ "ebible",
8439
+ "usfm-downloads"
8440
+ );
8441
+ try {
8442
+ const downloadBatches = [];
8443
+ const downloadBatchSize = 50;
8444
+ const conversionBatchSize = 10;
8445
+ while (selectedSources.length > 0) {
8446
+ downloadBatches.push(selectedSources.splice(0, downloadBatchSize));
8447
+ }
8448
+ let numDownloaded = 0;
8449
+ let numErrored = 0;
8450
+ let numConverted = 0;
8451
+ let conversionsNeeded = [];
8452
+ let jarPath = await findBibleMultiConverterJar(bibleMultiConverterPath);
8453
+ if (!jarPath && convertToUsx3) {
8454
+ jarPath = await promptForBibleMultiConverter();
8455
+ }
8456
+ if (!jarPath && convertToUsx3) {
8457
+ logger.error(
8458
+ "BibleMultiConverter JAR not found. Cannot convert USFM to USX3."
8459
+ );
8460
+ printConversionInstructions();
8461
+ return;
8462
+ }
8463
+ console.log(
8464
+ `Processing ${downloadBatches.length} batches of ${downloadBatchSize} sources each.`
8465
+ );
8466
+ for (let i = 0; i < downloadBatches.length; i++) {
8467
+ const sources = downloadBatches[i];
8468
+ logger.log(
8469
+ `Processing batch ${i + 1} of ${downloadBatches.length}`
8470
+ );
8471
+ await Promise.all(
8472
+ sources.map(async (source) => {
8473
+ try {
8474
+ logger.log(`Processing: ${source.translationId}`);
8475
+ const detailsPage = await fetch(
8476
+ `https://ebible.org/Scriptures/details.php?id=${source.id}`
8477
+ );
8478
+ const detailsHtml = await detailsPage.text();
8479
+ const hasUsfm = detailsHtml.includes(
8480
+ `${source.id}_usfm.zip`
8481
+ );
8482
+ if (hasUsfm) {
8483
+ const usfmZipUrl = `https://ebible.org/Scriptures/${source.id}_usfm.zip`;
8484
+ source.usfmZipUrl = usfmZipUrl;
8485
+ const usfmResult = await fetch(usfmZipUrl);
8486
+ if (usfmResult.status === 404) {
8487
+ source.usfmZipUrl = null;
8488
+ } else if (usfmResult.status === 200) {
8489
+ source.usfmZipEtag = usfmResult.headers.get("etag") || null;
8490
+ const finalOutputPath = path4.resolve(
8491
+ outputDir,
8492
+ source.translationId
8493
+ );
8494
+ const downloadDir = convertToUsx3 ? path4.resolve(
8495
+ tempDir,
8496
+ source.translationId
8497
+ ) : path4.resolve(
8498
+ outputDir,
8499
+ source.translationId
8500
+ );
8501
+ if (overwrite) {
8502
+ if (existsSync3(downloadDir)) {
8503
+ logger.log(
8504
+ `Overwriting existing directory: ${downloadDir}`
8505
+ );
8506
+ await rm2(downloadDir, {
8507
+ recursive: true,
8508
+ force: true
8509
+ });
8510
+ }
8511
+ if (existsSync3(finalOutputPath)) {
8512
+ logger.log(
8513
+ `Overwriting existing directory: ${downloadDir}`
8514
+ );
8515
+ await rm2(downloadDir, {
8516
+ recursive: true,
8517
+ force: true
8518
+ });
8519
+ }
8520
+ }
8521
+ await mkdir3(downloadDir, { recursive: true });
8522
+ await mkdir3(finalOutputPath, {
8523
+ recursive: true
8524
+ });
8525
+ const reader = new BlobReader(
8526
+ await usfmResult.blob()
8527
+ );
8528
+ const zip = new ZipReader2(reader);
8529
+ const usfmFileCount = await unzipToDirectory(
8530
+ zip,
8531
+ downloadDir,
8532
+ overwrite,
8533
+ (entry) => entry.filename.endsWith(".usfm")
8534
+ );
8535
+ await createMetadataJson(
8536
+ finalOutputPath,
8537
+ source,
8538
+ overwrite
8539
+ );
8540
+ if (convertToUsx3) {
8541
+ if (usfmFileCount > 0) {
8542
+ conversionsNeeded.push({
8543
+ tempPath: downloadDir,
8544
+ outputPath: finalOutputPath,
8545
+ source
8546
+ });
8547
+ } else {
8548
+ logger.warn(
8549
+ `No USFM files found for ${source.translationId}.`
8550
+ );
8551
+ }
8552
+ } else {
8553
+ source.usfmDownloadDate = DateTime2.utc().toISO();
8554
+ source.usfmDownloadPath = finalOutputPath;
8555
+ }
8556
+ numDownloaded++;
8557
+ } else {
8558
+ numErrored += 1;
8559
+ }
8560
+ } else {
8561
+ logger.warn(
8562
+ `No USFM zip found for ${source.translationId}. Skipping.`
8563
+ );
8564
+ numErrored++;
8565
+ return;
8566
+ }
8567
+ if (!convertToUsx3) {
8568
+ source.usfmDownloadDate = DateTime2.utc().toISO();
8569
+ source.usfmDownloadPath = outputDir;
8570
+ if (sourceUpsert) {
8571
+ sourceUpsert.run(source);
8572
+ }
8573
+ }
8574
+ } catch (error) {
8575
+ numErrored++;
8576
+ logger.error(
8577
+ `Error processing ${source.translationId}:`,
8578
+ error
8579
+ );
8580
+ }
8581
+ })
8582
+ );
8583
+ }
8584
+ logger.log("");
8585
+ logger.log("DOWNLOAD SUMMARY:");
8586
+ logger.log(` Downloaded: ${numDownloaded} sources`);
8587
+ logger.log(` Errored: ${numErrored} sources`);
8588
+ logger.log("");
8589
+ if (convertToUsx3 && conversionsNeeded.length > 0) {
8590
+ logger.log(
8591
+ `${conversionsNeeded.length} translations need conversion to USX3.`
8592
+ );
8593
+ logger.log(`Starting automatic conversion using: ${jarPath}`);
8594
+ const conversionBatches = [];
8595
+ while (conversionsNeeded.length > 0) {
8596
+ conversionBatches.push(
8597
+ conversionsNeeded.splice(0, conversionBatchSize)
8598
+ );
8599
+ }
8600
+ logger.log(
8601
+ `Processing ${conversionBatches.length} conversion batches of ${conversionBatchSize} each.`
8602
+ );
8603
+ for (let i = 0; i < conversionBatches.length; i++) {
8604
+ logger.log(
8605
+ `Processing conversion batch ${i + 1} of ${conversionBatches.length}`
8606
+ );
8607
+ const sources = conversionBatches[i];
8608
+ await Promise.all(
8609
+ sources.map(async ({ tempPath, outputPath, source }) => {
8610
+ logger.log(`Converting ${source.translationId}...`);
8611
+ const success = await convertUsfmToUsx3(
8612
+ tempPath,
8613
+ outputPath,
8614
+ jarPath
8615
+ );
8616
+ if (success) {
8617
+ if (sourceUpsert) {
8618
+ source.usfmDownloadDate = DateTime2.utc().toISO();
8619
+ source.usfmDownloadPath = outputPath;
8620
+ sourceUpsert.run(source);
8621
+ }
8622
+ numConverted++;
8623
+ } else {
8624
+ numErrored++;
8625
+ }
8626
+ })
8627
+ );
8628
+ }
8629
+ if (tempDir && existsSync3(tempDir)) {
8630
+ logger.log(`Cleaning up temporary directory: ${tempDir}`);
8631
+ await rm2(tempDir, { recursive: true, force: true });
8632
+ }
8633
+ logger.log(`CONVERSION SUMMARY:`);
8634
+ logger.log(` Converted: ${numConverted}`);
8635
+ logger.log(` Errored: ${numErrored}`);
8636
+ } else {
8637
+ logger.log(
8638
+ "Conversion to USX3 was skipped or no conversions were needed."
8639
+ );
8640
+ }
8641
+ } finally {
8642
+ if (db) {
8643
+ db.close();
8644
+ }
8645
+ }
8646
+ }
8647
+ async function listEBibleTranslations(searchTerm) {
8648
+ const logger = log7.getLogger();
8649
+ logger.log("Fetching eBible translation list...");
8650
+ const ebibleSources = await fetchEBibleMetadata();
8651
+ let filteredSources = ebibleSources;
8652
+ if (searchTerm) {
8653
+ const search = searchTerm.toLowerCase();
8654
+ filteredSources = ebibleSources.filter(
8655
+ (source) => source.id.toLowerCase().includes(search) || source.translationId.toLowerCase().includes(search) || source.title.toLowerCase().includes(search) || source.languageCode.toLowerCase().includes(search)
8656
+ );
8657
+ logger.log(
8658
+ `Found ${filteredSources.length} translations matching "${searchTerm}":`
8659
+ );
8660
+ } else {
8661
+ logger.log(
8662
+ `All ${filteredSources.length} available eBible translations:`
8663
+ );
8664
+ }
8665
+ logger.log("Format: [ID] -> [TranslationID] | [Title] | [Language]");
8666
+ logger.log("\u2500".repeat(80));
8667
+ filteredSources.forEach((source) => {
8668
+ logger.log(
8669
+ `${source.id} -> ${source.translationId} | ${source.title} | ${source.languageCode}`
8670
+ );
8671
+ });
8672
+ if (searchTerm && filteredSources.length === 0) {
8673
+ logger.log("No translations found. Try a different search term.");
8674
+ logger.log(
8675
+ 'Tip: Try searching for language codes like "en", "es", "fr", etc.'
8676
+ );
8677
+ }
8678
+ }
8679
+ async function generateTranslationFiles(input4, dest, options) {
8680
+ const logger = log7.getLogger();
7936
8681
  const parser = new DOMParser();
7937
8682
  globalThis.DOMParser = DOMParser;
7938
8683
  globalThis.Element = Element;
7939
8684
  globalThis.Node = Node;
7940
8685
  const files = await loadTranslationFilesOrAskForMetadata(
7941
- path3.resolve(input3)
8686
+ path4.resolve(input4)
7942
8687
  );
7943
8688
  if (!files) {
7944
8689
  logger.log("No translation files found.");
@@ -7947,12 +8692,12 @@ async function generateTranslationFiles(input3, dest, options) {
7947
8692
  const dataset = generateDataset2(files, parser);
7948
8693
  await serializeAndUploadDatasets(dest, toAsyncIterable([dataset]), options);
7949
8694
  }
7950
- async function uploadTestTranslations(input3, options) {
8695
+ async function uploadTestTranslations(input4, options) {
7951
8696
  const parser = new DOMParser();
7952
8697
  globalThis.DOMParser = DOMParser;
7953
8698
  globalThis.Element = Element;
7954
8699
  globalThis.Node = Node;
7955
- const dirs = await readdir3(path3.resolve(input3));
8700
+ const dirs = await readdir4(path4.resolve(input4));
7956
8701
  const files = await loadTranslationsFiles(dirs);
7957
8702
  const hash = hashInputFiles(files);
7958
8703
  const dataset = generateDataset2(files, parser, options.bookNameMap);
@@ -7968,13 +8713,13 @@ async function uploadTestTranslations(input3, options) {
7968
8713
  availableTranslationsUrl: `${urls.url}/${hash}/api/available_translations.json`
7969
8714
  };
7970
8715
  }
7971
- async function uploadTestTranslation(input3, options) {
7972
- const logger = log6.getLogger();
8716
+ async function uploadTestTranslation(input4, options) {
8717
+ const logger = log7.getLogger();
7973
8718
  const parser = new DOMParser();
7974
8719
  globalThis.DOMParser = DOMParser;
7975
8720
  globalThis.Element = Element;
7976
8721
  globalThis.Node = Node;
7977
- const inputPath = path3.resolve(input3);
8722
+ const inputPath = path4.resolve(input4);
7978
8723
  const files = await loadTranslationFilesOrAskForMetadata(
7979
8724
  inputPath,
7980
8725
  options.translationMetadata
@@ -8005,11 +8750,11 @@ function getUrls(dest) {
8005
8750
  };
8006
8751
  }
8007
8752
  async function loadTranslationFilesOrAskForMetadata(dir, translationMetadata) {
8008
- const logger = log6.getLogger();
8753
+ const logger = log7.getLogger();
8009
8754
  let files = await loadTranslationFiles(dir, translationMetadata);
8010
8755
  if (!files) {
8011
8756
  logger.log(`No metadata found for the translation in ${dir}`);
8012
- const enterMetadata = await confirm({
8757
+ const enterMetadata = await confirm2({
8013
8758
  message: "Do you want to enter the metadata for the translation?"
8014
8759
  });
8015
8760
  if (!enterMetadata) {
@@ -8017,12 +8762,12 @@ async function loadTranslationFilesOrAskForMetadata(dir, translationMetadata) {
8017
8762
  }
8018
8763
  const defaultId = basename(dir);
8019
8764
  const metadata = await askForMetadata(defaultId);
8020
- const saveMetadata = await confirm({
8765
+ const saveMetadata = await confirm2({
8021
8766
  message: "Do you want to save this metadata?"
8022
8767
  });
8023
8768
  if (saveMetadata) {
8024
- await writeFile2(
8025
- path3.resolve(dir, "metadata.json"),
8769
+ await writeFile3(
8770
+ path4.resolve(dir, "metadata.json"),
8026
8771
  JSON.stringify(metadata, null, 2)
8027
8772
  );
8028
8773
  }
@@ -8031,14 +8776,14 @@ async function loadTranslationFilesOrAskForMetadata(dir, translationMetadata) {
8031
8776
  return files;
8032
8777
  }
8033
8778
  async function askForMetadata(defaultId) {
8034
- const id2 = await input2({
8779
+ const id2 = await input3({
8035
8780
  message: "Enter the translation ID",
8036
8781
  default: defaultId
8037
8782
  });
8038
- const language = await input2({
8783
+ const language = await input3({
8039
8784
  message: "Enter the ISO 639 translation language",
8040
- validate: (input3) => {
8041
- return isValid(input3) ? true : "Invalid language code.";
8785
+ validate: (input4) => {
8786
+ return isValid(input4) ? true : "Invalid language code.";
8042
8787
  },
8043
8788
  required: true
8044
8789
  });
@@ -8050,24 +8795,24 @@ async function askForMetadata(defaultId) {
8050
8795
  ],
8051
8796
  default: "ltr"
8052
8797
  });
8053
- const shortName = await input2({
8798
+ const shortName = await input3({
8054
8799
  message: "Enter the short name of the translation",
8055
8800
  default: id2,
8056
8801
  required: false
8057
8802
  });
8058
- const name = await input2({
8803
+ const name = await input3({
8059
8804
  message: "Enter the name of the translation",
8060
8805
  required: true
8061
8806
  });
8062
- const englishName = await input2({
8807
+ const englishName = await input3({
8063
8808
  message: "Enter the English name of the translation",
8064
8809
  default: name
8065
8810
  });
8066
- const licenseUrl = await input2({
8811
+ const licenseUrl = await input3({
8067
8812
  message: "Enter the license URL for the translation",
8068
8813
  required: true
8069
8814
  });
8070
- const website = await input2({
8815
+ const website = await input3({
8071
8816
  message: "Enter the website URL for the translation",
8072
8817
  required: true,
8073
8818
  default: licenseUrl