@helloao/cli 0.0.12 → 0.0.13

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
 
@@ -5796,7 +5831,7 @@ async function* serializeOutputFiles(files, options) {
5796
5831
  yield serializedFiles2;
5797
5832
  }
5798
5833
  let serializedFiles = [];
5799
- for (let [path4, files2] of mergableFiles) {
5834
+ for (let [path5, files2] of mergableFiles) {
5800
5835
  let content = {};
5801
5836
  for (let file of files2) {
5802
5837
  if (!content) {
@@ -5815,7 +5850,7 @@ async function* serializeOutputFiles(files, options) {
5815
5850
  }
5816
5851
  }
5817
5852
  if (content) {
5818
- const serialized = await serializeFile(path4, content, options);
5853
+ const serialized = await serializeFile(path5, content, options);
5819
5854
  if (serialized) {
5820
5855
  serializedFiles.push(serialized);
5821
5856
  }
@@ -5823,7 +5858,7 @@ async function* serializeOutputFiles(files, options) {
5823
5858
  }
5824
5859
  yield serializedFiles;
5825
5860
  }
5826
- async function serializeFile(path4, content, options) {
5861
+ async function serializeFile(path5, content, options) {
5827
5862
  const logger = log.getLogger();
5828
5863
  let fileContent;
5829
5864
  if (typeof content === "function") {
@@ -5831,7 +5866,7 @@ async function serializeFile(path4, content, options) {
5831
5866
  } else {
5832
5867
  fileContent = content;
5833
5868
  }
5834
- const ext = extname(path4);
5869
+ const ext = extname(path5);
5835
5870
  if (ext === ".json") {
5836
5871
  let json;
5837
5872
  if (fileContent instanceof ReadableStream) {
@@ -5849,23 +5884,23 @@ async function serializeFile(path4, content, options) {
5849
5884
  );
5850
5885
  }
5851
5886
  return {
5852
- path: path4,
5887
+ path: path5,
5853
5888
  content: json,
5854
5889
  sha256: () => fromByteArray(new Uint8Array(sha256().update(json).digest()))
5855
5890
  };
5856
5891
  } else if (ext === ".mp3") {
5857
5892
  if (fileContent instanceof ReadableStream) {
5858
5893
  return {
5859
- path: path4,
5894
+ path: path5,
5860
5895
  content: Readable.fromWeb(fileContent)
5861
5896
  };
5862
5897
  } else {
5863
- logger.warn("Expected content to be a readable stream for", path4);
5898
+ logger.warn("Expected content to be a readable stream for", path5);
5864
5899
  logger.warn("Skipping file");
5865
5900
  return null;
5866
5901
  }
5867
5902
  }
5868
- logger.warn("Unknown file type", path4);
5903
+ logger.warn("Unknown file type", path5);
5869
5904
  logger.warn("Skipping file");
5870
5905
  return null;
5871
5906
  }
@@ -6092,21 +6127,21 @@ var ZipUploader = class {
6092
6127
  }
6093
6128
  }
6094
6129
  };
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);
6130
+ function trimRelativePath(path5) {
6131
+ if (path5.startsWith("./")) {
6132
+ return path5.substring(2);
6133
+ } else if (path5.startsWith("../")) {
6134
+ return path5.substring(3);
6135
+ } else if (path5.startsWith("/")) {
6136
+ return path5.substring(1);
6102
6137
  }
6103
- return path4;
6138
+ return path5;
6104
6139
  }
6105
- function makeRelativePath(path4) {
6106
- if (path4.startsWith("/")) {
6107
- return "." + path4;
6140
+ function makeRelativePath(path5) {
6141
+ if (path5.startsWith("/")) {
6142
+ return "." + path5;
6108
6143
  }
6109
- return path4;
6144
+ return path5;
6110
6145
  }
6111
6146
  function hashInputFiles(files) {
6112
6147
  let sha = sha256();
@@ -6194,8 +6229,12 @@ async function importFileBatch(db, files, parser, overwrite) {
6194
6229
  insertCommentaries(db, output.commentaries);
6195
6230
  updateCommentaryHashes(db, output.commentaries);
6196
6231
  insertFileMetadata(db, changedFiles);
6232
+ insertWarningMetadata(db, output.parseMessages);
6197
6233
  logger.log(`Inserted ${output.translations.length} translations into DB`);
6198
6234
  logger.log(`Inserted ${output.commentaries.length} commentaries into DB`);
6235
+ logger.log(
6236
+ `Produced ${output.parseMessages?.length ?? 0} warnings/errors.`
6237
+ );
6199
6238
  }
6200
6239
  function getChangedOrNewInputFiles(db, files) {
6201
6240
  const fileExists = db.prepare(
@@ -6302,7 +6341,8 @@ function insertTranslationBooks(db, translation, translationBooks) {
6302
6341
  name,
6303
6342
  commonName,
6304
6343
  numberOfChapters,
6305
- \`order\`
6344
+ \`order\`,
6345
+ isApocryphal
6306
6346
  ) VALUES (
6307
6347
  @id,
6308
6348
  @translationId,
@@ -6310,13 +6350,15 @@ function insertTranslationBooks(db, translation, translationBooks) {
6310
6350
  @name,
6311
6351
  @commonName,
6312
6352
  @numberOfChapters,
6313
- @bookOrder
6353
+ @bookOrder,
6354
+ @isApocryphal
6314
6355
  ) ON CONFLICT(id,translationId) DO
6315
6356
  UPDATE SET
6316
6357
  title=excluded.title,
6317
6358
  name=excluded.name,
6318
6359
  commonName=excluded.commonName,
6319
- numberOfChapters=excluded.numberOfChapters;`);
6360
+ numberOfChapters=excluded.numberOfChapters,
6361
+ isApocryphal=excluded.isApocryphal;`);
6320
6362
  const insertMany = db.transaction((books) => {
6321
6363
  for (let book of books) {
6322
6364
  if (!book) {
@@ -6329,7 +6371,8 @@ function insertTranslationBooks(db, translation, translationBooks) {
6329
6371
  name: book.name,
6330
6372
  commonName: book.commonName,
6331
6373
  numberOfChapters: book.chapters.length,
6332
- bookOrder: book.order ?? 9999
6374
+ bookOrder: book.order ?? 9999,
6375
+ isApocryphal: Number(book.isApocryphal ?? false)
6333
6376
  });
6334
6377
  }
6335
6378
  });
@@ -7076,8 +7119,12 @@ async function* loadTranslationDatasets(db, translationsPerBatch = 50, translati
7076
7119
  );
7077
7120
  const datasetBook = {
7078
7121
  ...book,
7079
- chapters: bookChapters
7122
+ chapters: bookChapters,
7123
+ isApocryphal: book.isApocryphal ?? false
7080
7124
  };
7125
+ if (!datasetBook.isApocryphal) {
7126
+ delete datasetBook.isApocryphal;
7127
+ }
7081
7128
  datasetTranslation.books.push(datasetBook);
7082
7129
  }
7083
7130
  }
@@ -7194,23 +7241,45 @@ function serializeDatasets(datasets, options = {}) {
7194
7241
  options
7195
7242
  );
7196
7243
  }
7244
+ function insertWarningMetadata(db, parseMessages) {
7245
+ if (!parseMessages) return;
7246
+ const logger = log2.getLogger();
7247
+ const insertStatement = db.prepare(
7248
+ "INSERT INTO InputFileWarning (name, type, message) VALUES (?, ?, ?) ON CONFLICT (name, type, message) DO NOTHING;"
7249
+ );
7250
+ for (const [fileName, messages] of Object.entries(parseMessages)) {
7251
+ for (const message of messages) {
7252
+ logger.warn(`Warning in file ${fileName}: ${message.message}`);
7253
+ insertStatement.run(fileName, message.type, message.message);
7254
+ }
7255
+ }
7256
+ }
7197
7257
 
7198
7258
  // packages/helloao-cli/downloads.ts
7199
7259
  var downloads_exports = {};
7200
7260
  __export(downloads_exports, {
7201
- downloadFile: () => downloadFile
7261
+ downloadFile: () => downloadFile,
7262
+ downloadResponse: () => downloadResponse,
7263
+ unzipToDirectory: () => unzipToDirectory
7202
7264
  });
7203
7265
  import { log as log3 } from "@helloao/tools";
7266
+ import { BlobWriter } from "@zip.js/zip.js";
7204
7267
  import { createWriteStream } from "fs-extra";
7268
+ import path3 from "node:path";
7205
7269
  import { Readable as Readable2 } from "node:stream";
7206
7270
  import { finished } from "node:stream/promises";
7207
- async function downloadFile(url, path4, onProgress) {
7271
+ import { exists as exists2 } from "fs-extra";
7272
+ import { writeFile as writeFile2 } from "node:fs/promises";
7273
+ async function downloadFile(url, path5, onProgress) {
7208
7274
  const logger = log3.getLogger();
7209
- logger.log("Downloading", url, "to", path4);
7275
+ logger.log("Downloading", url, "to", path5);
7210
7276
  const response = await fetch(url);
7277
+ await downloadResponse(response, path5, onProgress);
7278
+ }
7279
+ async function downloadResponse(response, path5, onProgress) {
7211
7280
  const totalSize = Number(response.headers.get("content-length"));
7212
7281
  const reader = response.body;
7213
- const writeStream = createWriteStream(path4);
7282
+ const writeStream = createWriteStream(path5);
7214
7283
  const readable = Readable2.fromWeb(reader);
7215
7284
  if (onProgress) {
7216
7285
  let downloadedSize = 0;
@@ -7221,6 +7290,40 @@ async function downloadFile(url, path4, onProgress) {
7221
7290
  }
7222
7291
  await finished(readable.pipe(writeStream));
7223
7292
  }
7293
+ async function unzipToDirectory(zip, directory, overwrite, entryFilter = () => true, closeWhenDone = true) {
7294
+ try {
7295
+ const logger = log3.getLogger();
7296
+ const entries = await zip.getEntries();
7297
+ let usfmFileCount = 0;
7298
+ for (let entry of entries) {
7299
+ if (entry.getData && entry.directory === false && entryFilter(entry)) {
7300
+ usfmFileCount++;
7301
+ const outputPath = path3.resolve(directory, entry.filename);
7302
+ if (!overwrite && await exists2(outputPath)) {
7303
+ logger.log(
7304
+ `File already exists, skipping: ${entry.filename}`
7305
+ );
7306
+ continue;
7307
+ } else if (overwrite && await exists2(outputPath)) {
7308
+ logger.log(`Overwriting existing file: ${entry.filename}`);
7309
+ }
7310
+ const blob = await entry.getData(
7311
+ new BlobWriter("text/plain"),
7312
+ {}
7313
+ );
7314
+ await writeFile2(
7315
+ outputPath,
7316
+ new Uint8Array(await blob.arrayBuffer())
7317
+ );
7318
+ }
7319
+ }
7320
+ return usfmFileCount;
7321
+ } finally {
7322
+ if (closeWhenDone) {
7323
+ await zip.close();
7324
+ }
7325
+ }
7326
+ }
7224
7327
 
7225
7328
  // packages/helloao-cli/uploads.ts
7226
7329
  var uploads_exports = {};
@@ -7273,8 +7376,8 @@ var S3Uploader = class {
7273
7376
  }
7274
7377
  async upload(file, overwrite) {
7275
7378
  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;
7379
+ const path5 = file.path.startsWith("/") ? file.path.substring(1) : file.path;
7380
+ const key = this._keyPrefix ? `${this._keyPrefix}/${path5}` : path5;
7278
7381
  const hash = file.sha256?.();
7279
7382
  const head = new HeadObjectCommand({
7280
7383
  Bucket: this._bucketName,
@@ -7575,39 +7678,271 @@ async function uploadFilesUsingUploader(uploader, options, serializedFiles) {
7575
7678
  // packages/helloao-cli/actions.ts
7576
7679
  var actions_exports = {};
7577
7680
  __export(actions_exports, {
7681
+ CONVERSION_INSTRUCTIONS: () => CONVERSION_INSTRUCTIONS,
7578
7682
  askForMetadata: () => askForMetadata,
7579
7683
  fetchAudio: () => fetchAudio,
7580
- fetchTranslations: () => fetchTranslations,
7581
7684
  generateTranslationFiles: () => generateTranslationFiles,
7582
7685
  generateTranslationsFiles: () => generateTranslationsFiles,
7686
+ getMetaPath: () => getMetaPath,
7583
7687
  importCommentaries: () => importCommentaries2,
7584
7688
  importCommentary: () => importCommentary,
7585
7689
  importTranslation: () => importTranslation,
7586
7690
  importTranslations: () => importTranslations2,
7587
7691
  initDb: () => initDb,
7692
+ listEBibleTranslations: () => listEBibleTranslations,
7693
+ printConversionInstructions: () => printConversionInstructions,
7694
+ sourceTranslations: () => sourceTranslations,
7588
7695
  uploadTestTranslation: () => uploadTestTranslation,
7589
7696
  uploadTestTranslations: () => uploadTestTranslations
7590
7697
  });
7591
- import path3, { basename, extname as extname4 } from "node:path";
7698
+ import path4, { basename, extname as extname4 } from "node:path";
7592
7699
  import Sql3 from "better-sqlite3";
7593
7700
  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";
7701
+ import { mkdir as mkdir3, readdir as readdir4, rm as rm2, writeFile as writeFile3 } from "node:fs/promises";
7702
+ import { getFirstNonEmpty, normalizeLanguage } from "@helloao/tools/utils.js";
7703
+ import { exists as exists3, readFile as readFile3 } from "fs-extra";
7602
7704
  import { KNOWN_AUDIO_TRANSLATIONS } from "@helloao/tools/generation/audio.js";
7603
7705
  import { bookChapterCountMap } from "@helloao/tools/generation/book-order.js";
7604
7706
  import { batch, toAsyncIterable } from "@helloao/tools/parser/iterators.js";
7605
7707
  import { generateDataset as generateDataset2 } from "@helloao/tools/generation/dataset.js";
7606
- import { input as input2, select, confirm } from "@inquirer/prompts";
7708
+ import { input as input3, select, confirm as confirm2, checkbox } from "@inquirer/prompts";
7607
7709
  import { isValid } from "all-iso-language-codes";
7710
+ import { log as log7 } from "@helloao/tools";
7711
+ import { DateTime as DateTime2 } from "luxon";
7712
+ import { BlobReader, ZipReader as ZipReader2 } from "@zip.js/zip.js";
7713
+ import { tmpdir } from "node:os";
7714
+ import { existsSync as existsSync3 } from "fs";
7715
+
7716
+ // packages/helloao-cli/conversion.ts
7717
+ import { mkdir as mkdir2, readdir as readdir3 } from "node:fs/promises";
7718
+ import { existsSync as existsSync2 } from "fs";
7719
+ import { execFile as execFileCallback } from "child_process";
7720
+ import { promisify } from "util";
7721
+ import { confirm, input as input2 } from "@inquirer/prompts";
7608
7722
  import { log as log6 } from "@helloao/tools";
7609
- async function initDb(dbPath, options) {
7723
+ var execFile = promisify(execFileCallback);
7724
+ async function findBibleMultiConverterJar(providedPath) {
7725
+ const logger = log6.getLogger();
7726
+ if (providedPath && existsSync2(providedPath)) {
7727
+ return providedPath;
7728
+ }
7729
+ const commonPaths = [
7730
+ "./BibleMultiConverter.jar",
7731
+ "./tools/BibleMultiConverter.jar",
7732
+ "../BibleMultiConverter.jar",
7733
+ "../../BibleMultiConverter.jar",
7734
+ "BibleMultiConverter.jar"
7735
+ ];
7736
+ const folderPaths = [
7737
+ "./BibleMultiConverter/BibleMultiConverter.jar",
7738
+ "./tools/BibleMultiConverter/BibleMultiConverter.jar",
7739
+ "../BibleMultiConverter/BibleMultiConverter.jar",
7740
+ "../../BibleMultiConverter/BibleMultiConverter.jar"
7741
+ ];
7742
+ const allPaths = [...commonPaths, ...folderPaths];
7743
+ for (const jarPath of allPaths) {
7744
+ if (existsSync2(jarPath)) {
7745
+ logger.log(`Found BibleMultiConverter.jar at: ${jarPath}`);
7746
+ return jarPath;
7747
+ }
7748
+ }
7749
+ return null;
7750
+ }
7751
+ async function promptForBibleMultiConverter() {
7610
7752
  const logger = log6.getLogger();
7753
+ logger.log("BibleMultiConverter.jar not found in common locations.");
7754
+ const hasConverter = await confirm({
7755
+ message: "Do you have BibleMultiConverter.jar available?"
7756
+ });
7757
+ if (!hasConverter) {
7758
+ logger.log(
7759
+ "Please download BibleMultiConverter.jar from: https://github.com/schierlm/BibleMultiConverter/releases"
7760
+ );
7761
+ return null;
7762
+ }
7763
+ const jarPath = await input2({
7764
+ message: "Enter the full path to BibleMultiConverter.jar:",
7765
+ validate: (input4) => {
7766
+ if (!existsSync2(input4)) {
7767
+ return "File not found. Please enter a valid path.";
7768
+ }
7769
+ if (!input4.endsWith(".jar")) {
7770
+ return "Please provide a .jar file.";
7771
+ }
7772
+ return true;
7773
+ }
7774
+ });
7775
+ return jarPath;
7776
+ }
7777
+ async function convertUsfmToUsx3(inputDir, outputDir, jarPath) {
7778
+ const logger = log6.getLogger();
7779
+ try {
7780
+ logger.log(`Converting USFM files from ${inputDir} to USX3 format...`);
7781
+ await mkdir2(outputDir, { recursive: true });
7782
+ const args = [
7783
+ "-jar",
7784
+ jarPath,
7785
+ "ParatextConverter",
7786
+ "USFM",
7787
+ inputDir,
7788
+ "USX3",
7789
+ outputDir,
7790
+ "*.usx"
7791
+ ];
7792
+ logger.log(`Running: java ${args.join(" ")}`);
7793
+ const { stdout, stderr } = await execFile("java", args);
7794
+ if (stdout) logger.log("Conversion output:", stdout);
7795
+ if (stderr) logger.log("Conversion warnings:", stderr);
7796
+ const files = await readdir3(outputDir);
7797
+ const usxFiles = files.filter((f) => f.endsWith(".usx"));
7798
+ if (usxFiles.length > 0) {
7799
+ logger.log(
7800
+ `Successfully converted to ${usxFiles.length} USX3 files`
7801
+ );
7802
+ return true;
7803
+ } else {
7804
+ logger.log("No USX3 files were created");
7805
+ return false;
7806
+ }
7807
+ } catch (error) {
7808
+ logger.error("Conversion failed:", error.message);
7809
+ return false;
7810
+ }
7811
+ }
7812
+
7813
+ // packages/helloao-cli/ebible.ts
7814
+ import { parse as parse2 } from "papaparse";
7815
+ import { DateTime } from "luxon";
7816
+ import { sha256 as sha2563 } from "hash.js";
7817
+ import { getTranslationId } from "@helloao/tools/utils.js";
7818
+ async function fetchEBibleMetadata() {
7819
+ const translationsResponse = await fetch(
7820
+ "https://ebible.org/Scriptures/translations.csv"
7821
+ );
7822
+ const translationsCsv = await translationsResponse.text();
7823
+ const ebibleTranslations = parse2(translationsCsv.trimEnd(), {
7824
+ header: true
7825
+ });
7826
+ return ebibleTranslations.data.map((translation) => {
7827
+ const fcbhid = translation.FCBHID.trim();
7828
+ const languageCode = translation.languageCode.trim();
7829
+ const source = {
7830
+ id: translation.translationId,
7831
+ translationId: getTranslationId(
7832
+ `${languageCode.toLowerCase()}_${fcbhid.slice(3).toLowerCase()}`
7833
+ ),
7834
+ title: translation.title.trim(),
7835
+ shortTitle: translation.shortTitle.trim(),
7836
+ textDirection: translation.textDirection.trim(),
7837
+ languageCode,
7838
+ copyright: translation.Copyright.trim(),
7839
+ description: translation.description.trim(),
7840
+ oldTestamentBooks: parseInt(translation.OTbooks.trim()),
7841
+ oldTestamentChapters: parseInt(translation.OTchapters.trim()),
7842
+ oldTestamentVerses: parseInt(translation.OTverses.trim()),
7843
+ newTestamentBooks: parseInt(translation.NTbooks.trim()),
7844
+ newTestamentChapters: parseInt(translation.NTchapters.trim()),
7845
+ newTestamentVerses: parseInt(translation.NTverses.trim()),
7846
+ apocryphaBooks: parseInt(translation.DCbooks.trim()),
7847
+ apocryphaChapters: parseInt(translation.DCchapters.trim()),
7848
+ apocryphaVerses: parseInt(translation.DCverses.trim()),
7849
+ redistributable: translation.Redistributable.trim().toUpperCase() === "TRUE" ? "TRUE" : "FALSE",
7850
+ FCBHID: fcbhid,
7851
+ sourceDate: DateTime.fromISO(
7852
+ translation.sourceDate.trim()
7853
+ ).toISO(),
7854
+ updateDate: DateTime.fromISO(
7855
+ translation.UpdateDate.trim()
7856
+ ).toISO(),
7857
+ usfmDownloadDate: null,
7858
+ usfmDownloadPath: null,
7859
+ usfmZipUrl: null,
7860
+ usfmZipEtag: null,
7861
+ sha256: null
7862
+ };
7863
+ 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");
7864
+ return source;
7865
+ });
7866
+ }
7867
+
7868
+ // packages/helloao-cli/actions.ts
7869
+ var dirname4 = __dirname;
7870
+ if (!dirname4) {
7871
+ dirname4 = import.meta.dirname;
7872
+ }
7873
+ var metaDir = null;
7874
+ async function getMetaPath() {
7875
+ if (metaDir) {
7876
+ return metaDir;
7877
+ }
7878
+ const metaPaths = ["../../meta"];
7879
+ for (let metaPath of metaPaths) {
7880
+ const fullPath = path4.resolve(dirname4, metaPath);
7881
+ if (await exists3(fullPath)) {
7882
+ metaDir = fullPath;
7883
+ return fullPath;
7884
+ }
7885
+ }
7886
+ return null;
7887
+ }
7888
+ async function createMetadataJson(outputDir, source, overwrite = false) {
7889
+ const logger = log7.getLogger();
7890
+ const metadataPath = path4.resolve(outputDir, "metadata.json");
7891
+ const metadataExists = await exists3(metadataPath);
7892
+ if (!overwrite && metadataExists) {
7893
+ logger.log(`Metadata file already exists: ${metadataPath}`);
7894
+ return;
7895
+ }
7896
+ const metaDir2 = await getMetaPath();
7897
+ let metadata = null;
7898
+ if (metaDir2) {
7899
+ const overridePath = path4.resolve(
7900
+ metaDir2,
7901
+ `${source.translationId}.json`
7902
+ );
7903
+ const overrideExists = await exists3(overridePath);
7904
+ if (overrideExists) {
7905
+ logger.log(`Using override metadata file: ${overridePath}`);
7906
+ const overrideMetadata = await readFile3(overridePath, "utf-8");
7907
+ metadata = JSON.parse(overrideMetadata);
7908
+ }
7909
+ }
7910
+ if (!metadata) {
7911
+ const language = normalizeLanguage(source.languageCode);
7912
+ const englishName = getFirstNonEmpty(
7913
+ source.shortTitle?.normalize("NFKC")?.replace(/\p{Diacritic}/gu, ""),
7914
+ source.title
7915
+ );
7916
+ let shortName = null;
7917
+ if (language === "eng") {
7918
+ shortName = source.title.replace(/[^A-Z]/g, "").toUpperCase().slice(0, 5);
7919
+ if (shortName.length <= 2) {
7920
+ shortName = null;
7921
+ }
7922
+ }
7923
+ if (!shortName) {
7924
+ shortName = source.translationId.toUpperCase().replace(/[^A-Z0-9]/g, "").slice(3);
7925
+ }
7926
+ metadata = {
7927
+ id: source.translationId,
7928
+ name: getFirstNonEmpty(
7929
+ source.title,
7930
+ source.shortTitle,
7931
+ source.translationId
7932
+ ),
7933
+ direction: /rtl/gi.test(source.textDirection ?? "ltr") ? "rtl" : "ltr",
7934
+ englishName,
7935
+ language,
7936
+ licenseUrl: `https://ebible.org/Scriptures/details.php?id=${source.id}`,
7937
+ shortName,
7938
+ website: `https://ebible.org/Scriptures/details.php?id=${source.id}`
7939
+ };
7940
+ }
7941
+ await writeFile3(metadataPath, JSON.stringify(metadata, null, 2));
7942
+ logger.log(`Created metadata.json: ${metadataPath}`);
7943
+ }
7944
+ async function initDb(dbPath, options) {
7945
+ const logger = log7.getLogger();
7611
7946
  logger.log("Initializing new Bible API DB...");
7612
7947
  if (options.source) {
7613
7948
  if (options.source.startsWith("https://")) {
@@ -7622,7 +7957,7 @@ async function initDb(dbPath, options) {
7622
7957
  });
7623
7958
  } else {
7624
7959
  const databasePath = getDbPath(dbPath);
7625
- if (await exists2(databasePath)) {
7960
+ if (await exists3(databasePath)) {
7626
7961
  if (!options.overwrite) {
7627
7962
  logger.log("Database already exists.");
7628
7963
  return;
@@ -7632,7 +7967,7 @@ async function initDb(dbPath, options) {
7632
7967
  }
7633
7968
  }
7634
7969
  const db = new Sql3(databasePath, {});
7635
- const sourcePath = path3.resolve(options.source);
7970
+ const sourcePath = path4.resolve(options.source);
7636
7971
  try {
7637
7972
  logger.log("Copying schema from source DB...");
7638
7973
  if (options.language) {
@@ -7729,15 +8064,15 @@ async function importTranslation(dir, dirs, options) {
7729
8064
  }
7730
8065
  }
7731
8066
  async function importTranslations2(dir, options) {
7732
- const logger = log6.getLogger();
8067
+ const logger = log7.getLogger();
7733
8068
  const parser = new DOMParser();
7734
8069
  globalThis.DOMParser = DOMParser;
7735
8070
  globalThis.Element = Element;
7736
8071
  globalThis.Node = Node;
7737
8072
  const db = await getDbFromDir(process.cwd());
7738
8073
  try {
7739
- const files = await readdir3(dir);
7740
- const translationDirs = files.map((f) => path3.resolve(dir, f));
8074
+ const files = await readdir4(dir);
8075
+ const translationDirs = files.map((f) => path4.resolve(dir, f));
7741
8076
  logger.log(`Importing ${translationDirs.length} translations`);
7742
8077
  await importTranslations(
7743
8078
  db,
@@ -7767,15 +8102,15 @@ async function importCommentary(dir, dirs, options) {
7767
8102
  }
7768
8103
  }
7769
8104
  async function importCommentaries2(dir, options) {
7770
- const logger = log6.getLogger();
8105
+ const logger = log7.getLogger();
7771
8106
  const parser = new DOMParser();
7772
8107
  globalThis.DOMParser = DOMParser;
7773
8108
  globalThis.Element = Element;
7774
8109
  globalThis.Node = Node;
7775
8110
  const db = await getDbFromDir(process.cwd());
7776
8111
  try {
7777
- const files = await readdir3(dir);
7778
- const commentaryDirs = files.map((f) => path3.resolve(dir, f));
8112
+ const files = await readdir4(dir);
8113
+ const commentaryDirs = files.map((f) => path4.resolve(dir, f));
7779
8114
  logger.log(`Importing ${commentaryDirs.length} commentaries`);
7780
8115
  await importCommentaries(
7781
8116
  db,
@@ -7787,105 +8122,8 @@ async function importCommentaries2(dir, options) {
7787
8122
  db.close();
7788
8123
  }
7789
8124
  }
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
8125
  async function fetchAudio(dir, translations, options = {}) {
7888
- const logger = log6.getLogger();
8126
+ const logger = log7.getLogger();
7889
8127
  for (let translation of translations) {
7890
8128
  const [translationId, reader] = translation.split("/");
7891
8129
  const generator = KNOWN_AUDIO_TRANSLATIONS.get(translationId)?.get(reader);
@@ -7899,14 +8137,14 @@ async function fetchAudio(dir, translations, options = {}) {
7899
8137
  const ext = extname4(url);
7900
8138
  const [translationId2, reader2] = translation.split("/");
7901
8139
  const name = `${chapter}.${reader2}${ext}`;
7902
- const fullPath = path3.resolve(
8140
+ const fullPath = path4.resolve(
7903
8141
  dir,
7904
8142
  "audio",
7905
8143
  translationId2,
7906
8144
  bookId,
7907
8145
  name
7908
8146
  );
7909
- if (!options.all && await exists2(fullPath)) {
8147
+ if (!options.all && await exists3(fullPath)) {
7910
8148
  continue;
7911
8149
  }
7912
8150
  await downloadFile(url, fullPath);
@@ -7914,12 +8152,12 @@ async function fetchAudio(dir, translations, options = {}) {
7914
8152
  }
7915
8153
  }
7916
8154
  }
7917
- async function generateTranslationsFiles(input3, dest, options) {
8155
+ async function generateTranslationsFiles(input4, dest, options) {
7918
8156
  const parser = new DOMParser();
7919
8157
  globalThis.DOMParser = DOMParser;
7920
8158
  globalThis.Element = Element;
7921
8159
  globalThis.Node = Node;
7922
- const dirs = await readdir3(path3.resolve(input3));
8160
+ const dirs = await readdir4(path4.resolve(input4));
7923
8161
  const batchSize = typeof options.batchSize === "number" ? options.batchSize : parseInt(options.batchSize);
7924
8162
  for (let b2 of batch(dirs, batchSize)) {
7925
8163
  const files = await loadTranslationsFiles(b2);
@@ -7931,14 +8169,508 @@ async function generateTranslationsFiles(input3, dest, options) {
7931
8169
  );
7932
8170
  }
7933
8171
  }
7934
- async function generateTranslationFiles(input3, dest, options) {
7935
- const logger = log6.getLogger();
8172
+ var CONVERSION_INSTRUCTIONS = {
8173
+ downloadUrl: "https://github.com/schierlm/BibleMultiConverter/releases",
8174
+ javaRequirement: "Java 8 or higher required",
8175
+ getConversionCommand: (inputDir, outputDir, filenamePattern = "*.usx") => {
8176
+ return `java -jar BibleMultiConverter.jar ParatextConverter USFM "${inputDir}" USX3 "${outputDir}" "${filenamePattern}"`;
8177
+ },
8178
+ examples: {
8179
+ windows: 'java -jar BibleMultiConverter.jar ParatextConverter USFM "C:\\input\\usfm" USX3 "C:\\output\\usx3" "*.usx"',
8180
+ unix: 'java -jar BibleMultiConverter.jar ParatextConverter USFM "/path/to/input/usfm" USX3 "/path/to/output/usx3" "*.usx"'
8181
+ }
8182
+ };
8183
+ function printConversionInstructions() {
8184
+ const logger = log7.getLogger();
8185
+ logger.log("\n=== MANUAL CONVERSION REQUIRED ===");
8186
+ logger.log("Automatic conversion is not available.");
8187
+ logger.log("");
8188
+ logger.log("To enable automatic conversion, please:");
8189
+ logger.log("1. Download BibleMultiConverter.zip from:");
8190
+ logger.log(` ${CONVERSION_INSTRUCTIONS.downloadUrl}`);
8191
+ logger.log("");
8192
+ logger.log("2. Extract the zip file to one of these locations:");
8193
+ logger.log(" \u2022 Current directory (./BibleMultiConverter/)");
8194
+ logger.log(" \u2022 Tools subdirectory (./tools/BibleMultiConverter/)");
8195
+ logger.log(" \u2022 Parent directory (../BibleMultiConverter/)");
8196
+ logger.log(
8197
+ " \u2022 Or extract anywhere and provide the JAR path when prompted"
8198
+ );
8199
+ logger.log("");
8200
+ logger.log("3. Ensure Java 8+ is installed");
8201
+ logger.log("");
8202
+ logger.log("4. Re-run this command with the --convertToUsx3 option");
8203
+ logger.log("");
8204
+ logger.log("==========================================\n");
8205
+ }
8206
+ function matchesTranslation(translationQuery, source) {
8207
+ const lowerQuery = translationQuery.toLowerCase();
8208
+ const lowerSourceId = source.id.toLowerCase();
8209
+ const lowerTranslationId = source.translationId.toLowerCase();
8210
+ const exactMatch = translationQuery === source.translationId || translationQuery === source.id;
8211
+ const caseInsensitiveMatch = lowerQuery === lowerTranslationId || lowerQuery === lowerSourceId;
8212
+ const partialMatch = lowerSourceId.includes(lowerQuery) || lowerTranslationId.includes(lowerQuery);
8213
+ return exactMatch || caseInsensitiveMatch || partialMatch;
8214
+ }
8215
+ function groupSourcesByTranslation(sources, translationQueries) {
8216
+ const groups = /* @__PURE__ */ new Map();
8217
+ for (const query of translationQueries) {
8218
+ const matchingSources = sources.filter(
8219
+ (source) => matchesTranslation(query, source)
8220
+ );
8221
+ if (matchingSources.length > 0) {
8222
+ groups.set(query, matchingSources);
8223
+ }
8224
+ }
8225
+ return groups;
8226
+ }
8227
+ async function selectSourcesForTranslation(translationQuery, sources) {
8228
+ const logger = log7.getLogger();
8229
+ if (sources.length === 0) {
8230
+ logger.log(`No sources found for translation: ${translationQuery}`);
8231
+ return [];
8232
+ }
8233
+ if (sources.length === 1) {
8234
+ logger.log(
8235
+ `Found 1 source for '${translationQuery}': ${sources[0].id} -> ${sources[0].translationId} | ${sources[0].title}`
8236
+ );
8237
+ logger.log(`Automatically selecting: ${sources[0].id}`);
8238
+ return sources;
8239
+ }
8240
+ logger.log(`
8241
+ Found ${sources.length} sources for '${translationQuery}':`);
8242
+ sources.forEach((source, index) => {
8243
+ logger.log(
8244
+ ` ${index + 1}. ${source.id} -> ${source.translationId} | ${source.title} | ${source.languageCode}`
8245
+ );
8246
+ });
8247
+ const SELECT_ALL_VALUE = -1;
8248
+ const choices = [
8249
+ ...sources.map((source, index) => ({
8250
+ name: `${source.id} -> ${source.translationId} | ${source.title} | ${source.languageCode}`,
8251
+ value: index,
8252
+ checked: false
8253
+ })),
8254
+ { name: "Select All", value: SELECT_ALL_VALUE, checked: false }
8255
+ ];
8256
+ const selectedIndices = await checkbox({
8257
+ message: `Select sources for '${translationQuery}' (use space to select, enter to confirm):`,
8258
+ choices,
8259
+ validate: (choices2) => {
8260
+ if (choices2.length === 0) {
8261
+ return 'Please select at least one source or "Select All"';
8262
+ }
8263
+ return true;
8264
+ }
8265
+ });
8266
+ if (selectedIndices.includes(SELECT_ALL_VALUE)) {
8267
+ logger.log(
8268
+ `Selected all ${sources.length} sources for '${translationQuery}'.`
8269
+ );
8270
+ return sources;
8271
+ } else {
8272
+ const selectedSources = selectedIndices.filter((index) => index !== SELECT_ALL_VALUE).map((index) => sources[index]);
8273
+ logger.log(
8274
+ `Selected ${selectedSources.length} sources for '${translationQuery}'.`
8275
+ );
8276
+ return selectedSources;
8277
+ }
8278
+ }
8279
+ async function sourceTranslations(outputDir, translations, options = {}) {
8280
+ const logger = log7.getLogger();
8281
+ const {
8282
+ convertToUsx3 = false,
8283
+ useDatabase = true,
8284
+ // Default to true
8285
+ bibleMultiConverterPath,
8286
+ overwrite = false
8287
+ } = options;
8288
+ logger.log("Fetching eBible metadata...");
8289
+ const ebibleSources = await fetchEBibleMetadata();
8290
+ logger.log(`Total eBible sources found: ${ebibleSources.length}`);
8291
+ logger.log("");
8292
+ if (useDatabase) {
8293
+ logger.log("DATABASE TRACKING: ENABLED");
8294
+ logger.log(" \u2022 Will check existing downloads in database");
8295
+ logger.log(" \u2022 Will skip already downloaded sources");
8296
+ logger.log(" \u2022 Will update database with download information");
8297
+ } else {
8298
+ logger.log("DATABASE TRACKING: DISABLED");
8299
+ logger.log(" \u2022 All matching sources will be processed");
8300
+ logger.log(" \u2022 No database filtering or updates will be performed");
8301
+ logger.log(" \u2022 Downloads may overwrite existing files");
8302
+ }
8303
+ logger.log("");
8304
+ let filteredSources = ebibleSources.filter((source) => {
8305
+ if (!source.FCBHID) {
8306
+ return false;
8307
+ }
8308
+ if (translations && translations.length > 0 && !translations.some((t) => matchesTranslation(t, source))) {
8309
+ return false;
8310
+ }
8311
+ return true;
8312
+ });
8313
+ let db = null;
8314
+ let sourceExists = null;
8315
+ let sourceUpsert = null;
8316
+ let skippedByDatabase = 0;
8317
+ if (useDatabase) {
8318
+ logger.log("Connecting to database for download tracking...");
8319
+ db = await getDbFromDir(process.cwd());
8320
+ sourceExists = db.prepare(
8321
+ "SELECT usfmZipEtag, usfmDownloadDate FROM EBibleSource WHERE id = @id AND sha256 = @sha256;"
8322
+ );
8323
+ filteredSources = filteredSources.filter((source) => {
8324
+ if (overwrite) {
8325
+ return true;
8326
+ }
8327
+ const existingSource = sourceExists.get(source);
8328
+ if (existingSource) {
8329
+ if (!existingSource.usfmDownloadDate) {
8330
+ return true;
8331
+ }
8332
+ source.usfmZipEtag = existingSource.usfmZipEtag;
8333
+ source.usfmDownloadDate = existingSource.usfmDownloadDate;
8334
+ if (translations && translations.length > 0 && translations.some((t) => matchesTranslation(t, source))) {
8335
+ return true;
8336
+ }
8337
+ skippedByDatabase++;
8338
+ return false;
8339
+ }
8340
+ return true;
8341
+ });
8342
+ if (skippedByDatabase > 0) {
8343
+ logger.log(
8344
+ `Database filtering: Skipped ${skippedByDatabase} already downloaded sources`
8345
+ );
8346
+ } else {
8347
+ logger.log(
8348
+ "Database filtering: No sources were skipped (none previously downloaded)"
8349
+ );
8350
+ }
8351
+ sourceUpsert = db.prepare(`INSERT INTO EBibleSource(
8352
+ id, translationId, title, shortTitle, languageCode, textDirection, copyright, description,
8353
+ oldTestamentBooks, oldTestamentChapters, oldTestamentVerses,
8354
+ newTestamentBooks, newTestamentChapters, newTestamentVerses,
8355
+ apocryphaBooks, apocryphaChapters, apocryphaVerses,
8356
+ redistributable, sourceDate, updateDate, usfmDownloadDate,
8357
+ usfmDownloadPath, sha256, usfmZipUrl, usfmZipEtag, FCBHID
8358
+ ) VALUES (
8359
+ @id, @translationId, @title, @shortTitle, @languageCode, @textDirection, @copyright, @description,
8360
+ @oldTestamentBooks, @oldTestamentChapters, @oldTestamentVerses,
8361
+ @newTestamentBooks, @newTestamentChapters, @newTestamentVerses,
8362
+ @apocryphaBooks, @apocryphaChapters, @apocryphaVerses,
8363
+ @redistributable, @sourceDate, @updateDate, @usfmDownloadDate,
8364
+ @usfmDownloadPath, @sha256, @usfmZipUrl, @usfmZipEtag, @FCBHID
8365
+ ) ON CONFLICT(id) DO UPDATE SET
8366
+ translationId = excluded.translationId, title = excluded.title, shortTitle = excluded.shortTitle,
8367
+ languageCode = excluded.languageCode, textDirection = excluded.textDirection, copyright = excluded.copyright,
8368
+ description = excluded.description, oldTestamentBooks = excluded.oldTestamentBooks,
8369
+ oldTestamentChapters = excluded.oldTestamentChapters, oldTestamentVerses = excluded.oldTestamentVerses,
8370
+ newTestamentBooks = excluded.newTestamentBooks, newTestamentChapters = excluded.newTestamentChapters,
8371
+ newTestamentVerses = excluded.newTestamentVerses, apocryphaBooks = excluded.apocryphaBooks,
8372
+ apocryphaChapters = excluded.apocryphaChapters, apocryphaVerses = excluded.apocryphaVerses,
8373
+ redistributable = excluded.redistributable, sourceDate = excluded.sourceDate,
8374
+ updateDate = excluded.updateDate, usfmDownloadDate = excluded.usfmDownloadDate,
8375
+ usfmDownloadPath = excluded.usfmDownloadPath, sha256 = excluded.sha256,
8376
+ usfmZipUrl = excluded.usfmZipUrl, usfmZipEtag = excluded.usfmZipEtag,
8377
+ FCBHID = excluded.FCBHID;
8378
+ `);
8379
+ } else {
8380
+ logger.log("Database connection skipped (tracking disabled)");
8381
+ }
8382
+ logger.log(`Found ${filteredSources.length} sources to process`);
8383
+ let selectedSources = [];
8384
+ if (translations && translations.length > 0) {
8385
+ const sourceGroups = groupSourcesByTranslation(
8386
+ filteredSources,
8387
+ translations
8388
+ );
8389
+ if (sourceGroups.size === 0) {
8390
+ logger.log(
8391
+ "No matching sources found for any of the specified translations."
8392
+ );
8393
+ logger.log(
8394
+ 'Tip: Use the "list-ebible-translations" command to find available translations.'
8395
+ );
8396
+ return;
8397
+ }
8398
+ logger.log(`Processing ${sourceGroups.size} translation(s)...
8399
+ `);
8400
+ for (const [translationQuery, sources] of sourceGroups) {
8401
+ const selected = await selectSourcesForTranslation(
8402
+ translationQuery,
8403
+ sources
8404
+ );
8405
+ selectedSources.push(...selected);
8406
+ }
8407
+ if (selectedSources.length === 0) {
8408
+ logger.log("No sources selected for download.");
8409
+ return;
8410
+ }
8411
+ logger.log(
8412
+ `
8413
+ Total selected: ${selectedSources.length} sources from ${sourceGroups.size} translation(s).`
8414
+ );
8415
+ } else {
8416
+ selectedSources = filteredSources;
8417
+ if (selectedSources.length === 0) {
8418
+ logger.log("No sources found.");
8419
+ return;
8420
+ }
8421
+ }
8422
+ const tempDir = path4.join(
8423
+ tmpdir(),
8424
+ "bible-api",
8425
+ "ebible",
8426
+ "usfm-downloads"
8427
+ );
8428
+ try {
8429
+ const downloadBatches = [];
8430
+ const downloadBatchSize = 50;
8431
+ const conversionBatchSize = 10;
8432
+ while (selectedSources.length > 0) {
8433
+ downloadBatches.push(selectedSources.splice(0, downloadBatchSize));
8434
+ }
8435
+ let numDownloaded = 0;
8436
+ let numErrored = 0;
8437
+ let numConverted = 0;
8438
+ let conversionsNeeded = [];
8439
+ let jarPath = await findBibleMultiConverterJar(bibleMultiConverterPath);
8440
+ if (!jarPath && convertToUsx3) {
8441
+ jarPath = await promptForBibleMultiConverter();
8442
+ }
8443
+ if (!jarPath && convertToUsx3) {
8444
+ logger.error(
8445
+ "BibleMultiConverter JAR not found. Cannot convert USFM to USX3."
8446
+ );
8447
+ printConversionInstructions();
8448
+ return;
8449
+ }
8450
+ console.log(
8451
+ `Processing ${downloadBatches.length} batches of ${downloadBatchSize} sources each.`
8452
+ );
8453
+ for (let i = 0; i < downloadBatches.length; i++) {
8454
+ const sources = downloadBatches[i];
8455
+ logger.log(
8456
+ `Processing batch ${i + 1} of ${downloadBatches.length}`
8457
+ );
8458
+ await Promise.all(
8459
+ sources.map(async (source) => {
8460
+ try {
8461
+ logger.log(`Processing: ${source.translationId}`);
8462
+ const detailsPage = await fetch(
8463
+ `https://ebible.org/Scriptures/details.php?id=${source.id}`
8464
+ );
8465
+ const detailsHtml = await detailsPage.text();
8466
+ const hasUsfm = detailsHtml.includes(
8467
+ `${source.id}_usfm.zip`
8468
+ );
8469
+ if (hasUsfm) {
8470
+ const usfmZipUrl = `https://ebible.org/Scriptures/${source.id}_usfm.zip`;
8471
+ source.usfmZipUrl = usfmZipUrl;
8472
+ const usfmResult = await fetch(usfmZipUrl);
8473
+ if (usfmResult.status === 404) {
8474
+ source.usfmZipUrl = null;
8475
+ } else if (usfmResult.status === 200) {
8476
+ source.usfmZipEtag = usfmResult.headers.get("etag") || null;
8477
+ const finalOutputPath = path4.resolve(
8478
+ outputDir,
8479
+ source.translationId
8480
+ );
8481
+ const downloadDir = convertToUsx3 ? path4.resolve(
8482
+ tempDir,
8483
+ source.translationId
8484
+ ) : path4.resolve(
8485
+ outputDir,
8486
+ source.translationId
8487
+ );
8488
+ if (overwrite) {
8489
+ if (existsSync3(downloadDir)) {
8490
+ logger.log(
8491
+ `Overwriting existing directory: ${downloadDir}`
8492
+ );
8493
+ await rm2(downloadDir, {
8494
+ recursive: true,
8495
+ force: true
8496
+ });
8497
+ }
8498
+ if (existsSync3(finalOutputPath)) {
8499
+ logger.log(
8500
+ `Overwriting existing directory: ${downloadDir}`
8501
+ );
8502
+ await rm2(downloadDir, {
8503
+ recursive: true,
8504
+ force: true
8505
+ });
8506
+ }
8507
+ }
8508
+ await mkdir3(downloadDir, { recursive: true });
8509
+ await mkdir3(finalOutputPath, {
8510
+ recursive: true
8511
+ });
8512
+ const reader = new BlobReader(
8513
+ await usfmResult.blob()
8514
+ );
8515
+ const zip = new ZipReader2(reader);
8516
+ const usfmFileCount = await unzipToDirectory(
8517
+ zip,
8518
+ downloadDir,
8519
+ overwrite,
8520
+ (entry) => entry.filename.endsWith(".usfm")
8521
+ );
8522
+ await createMetadataJson(
8523
+ finalOutputPath,
8524
+ source,
8525
+ overwrite
8526
+ );
8527
+ if (convertToUsx3) {
8528
+ if (usfmFileCount > 0) {
8529
+ conversionsNeeded.push({
8530
+ tempPath: downloadDir,
8531
+ outputPath: finalOutputPath,
8532
+ source
8533
+ });
8534
+ } else {
8535
+ logger.warn(
8536
+ `No USFM files found for ${source.translationId}.`
8537
+ );
8538
+ }
8539
+ } else {
8540
+ source.usfmDownloadDate = DateTime2.utc().toISO();
8541
+ source.usfmDownloadPath = finalOutputPath;
8542
+ }
8543
+ numDownloaded++;
8544
+ } else {
8545
+ numErrored += 1;
8546
+ }
8547
+ } else {
8548
+ logger.warn(
8549
+ `No USFM zip found for ${source.translationId}. Skipping.`
8550
+ );
8551
+ numErrored++;
8552
+ return;
8553
+ }
8554
+ if (!convertToUsx3) {
8555
+ source.usfmDownloadDate = DateTime2.utc().toISO();
8556
+ source.usfmDownloadPath = outputDir;
8557
+ }
8558
+ if (sourceUpsert) {
8559
+ sourceUpsert.run(source);
8560
+ }
8561
+ } catch (error) {
8562
+ numErrored++;
8563
+ logger.error(
8564
+ `Error processing ${source.translationId}:`,
8565
+ error
8566
+ );
8567
+ }
8568
+ })
8569
+ );
8570
+ }
8571
+ logger.log("");
8572
+ logger.log("DOWNLOAD SUMMARY:");
8573
+ logger.log(` Downloaded: ${numDownloaded} sources`);
8574
+ logger.log(` Errored: ${numErrored} sources`);
8575
+ logger.log("");
8576
+ if (convertToUsx3 && conversionsNeeded.length > 0) {
8577
+ logger.log(
8578
+ `${conversionsNeeded.length} translations need conversion to USX3.`
8579
+ );
8580
+ logger.log(`Starting automatic conversion using: ${jarPath}`);
8581
+ const conversionBatches = [];
8582
+ while (conversionsNeeded.length > 0) {
8583
+ conversionBatches.push(
8584
+ conversionsNeeded.splice(0, conversionBatchSize)
8585
+ );
8586
+ }
8587
+ logger.log(
8588
+ `Processing ${conversionBatches.length} conversion batches of ${conversionBatchSize} each.`
8589
+ );
8590
+ for (let i = 0; i < conversionBatches.length; i++) {
8591
+ logger.log(
8592
+ `Processing conversion batch ${i + 1} of ${conversionBatches.length}`
8593
+ );
8594
+ const sources = conversionBatches[i];
8595
+ await Promise.all(
8596
+ sources.map(async ({ tempPath, outputPath, source }) => {
8597
+ logger.log(`Converting ${source.translationId}...`);
8598
+ const success = await convertUsfmToUsx3(
8599
+ tempPath,
8600
+ outputPath,
8601
+ jarPath
8602
+ );
8603
+ if (success) {
8604
+ if (sourceUpsert) {
8605
+ source.usfmDownloadDate = DateTime2.utc().toISO();
8606
+ source.usfmDownloadPath = outputPath;
8607
+ sourceUpsert.run(source);
8608
+ }
8609
+ numConverted++;
8610
+ } else {
8611
+ numErrored++;
8612
+ }
8613
+ })
8614
+ );
8615
+ }
8616
+ if (tempDir && existsSync3(tempDir)) {
8617
+ logger.log(`Cleaning up temporary directory: ${tempDir}`);
8618
+ await rm2(tempDir, { recursive: true, force: true });
8619
+ }
8620
+ logger.log(`CONVERSION SUMMARY:`);
8621
+ logger.log(` Converted: ${numConverted}`);
8622
+ logger.log(` Errored: ${numErrored}`);
8623
+ } else {
8624
+ logger.log(
8625
+ "Conversion to USX3 was skipped or no conversions were needed."
8626
+ );
8627
+ }
8628
+ } finally {
8629
+ if (db) {
8630
+ db.close();
8631
+ }
8632
+ }
8633
+ }
8634
+ async function listEBibleTranslations(searchTerm) {
8635
+ const logger = log7.getLogger();
8636
+ logger.log("Fetching eBible translation list...");
8637
+ const ebibleSources = await fetchEBibleMetadata();
8638
+ let filteredSources = ebibleSources;
8639
+ if (searchTerm) {
8640
+ const search = searchTerm.toLowerCase();
8641
+ filteredSources = ebibleSources.filter(
8642
+ (source) => source.id.toLowerCase().includes(search) || source.translationId.toLowerCase().includes(search) || source.title.toLowerCase().includes(search) || source.languageCode.toLowerCase().includes(search)
8643
+ );
8644
+ logger.log(
8645
+ `Found ${filteredSources.length} translations matching "${searchTerm}":`
8646
+ );
8647
+ } else {
8648
+ logger.log(
8649
+ `All ${filteredSources.length} available eBible translations:`
8650
+ );
8651
+ }
8652
+ logger.log("Format: [ID] -> [TranslationID] | [Title] | [Language]");
8653
+ logger.log("\u2500".repeat(80));
8654
+ filteredSources.forEach((source) => {
8655
+ logger.log(
8656
+ `${source.id} -> ${source.translationId} | ${source.title} | ${source.languageCode}`
8657
+ );
8658
+ });
8659
+ if (searchTerm && filteredSources.length === 0) {
8660
+ logger.log("No translations found. Try a different search term.");
8661
+ logger.log(
8662
+ 'Tip: Try searching for language codes like "en", "es", "fr", etc.'
8663
+ );
8664
+ }
8665
+ }
8666
+ async function generateTranslationFiles(input4, dest, options) {
8667
+ const logger = log7.getLogger();
7936
8668
  const parser = new DOMParser();
7937
8669
  globalThis.DOMParser = DOMParser;
7938
8670
  globalThis.Element = Element;
7939
8671
  globalThis.Node = Node;
7940
8672
  const files = await loadTranslationFilesOrAskForMetadata(
7941
- path3.resolve(input3)
8673
+ path4.resolve(input4)
7942
8674
  );
7943
8675
  if (!files) {
7944
8676
  logger.log("No translation files found.");
@@ -7947,12 +8679,12 @@ async function generateTranslationFiles(input3, dest, options) {
7947
8679
  const dataset = generateDataset2(files, parser);
7948
8680
  await serializeAndUploadDatasets(dest, toAsyncIterable([dataset]), options);
7949
8681
  }
7950
- async function uploadTestTranslations(input3, options) {
8682
+ async function uploadTestTranslations(input4, options) {
7951
8683
  const parser = new DOMParser();
7952
8684
  globalThis.DOMParser = DOMParser;
7953
8685
  globalThis.Element = Element;
7954
8686
  globalThis.Node = Node;
7955
- const dirs = await readdir3(path3.resolve(input3));
8687
+ const dirs = await readdir4(path4.resolve(input4));
7956
8688
  const files = await loadTranslationsFiles(dirs);
7957
8689
  const hash = hashInputFiles(files);
7958
8690
  const dataset = generateDataset2(files, parser, options.bookNameMap);
@@ -7968,13 +8700,13 @@ async function uploadTestTranslations(input3, options) {
7968
8700
  availableTranslationsUrl: `${urls.url}/${hash}/api/available_translations.json`
7969
8701
  };
7970
8702
  }
7971
- async function uploadTestTranslation(input3, options) {
7972
- const logger = log6.getLogger();
8703
+ async function uploadTestTranslation(input4, options) {
8704
+ const logger = log7.getLogger();
7973
8705
  const parser = new DOMParser();
7974
8706
  globalThis.DOMParser = DOMParser;
7975
8707
  globalThis.Element = Element;
7976
8708
  globalThis.Node = Node;
7977
- const inputPath = path3.resolve(input3);
8709
+ const inputPath = path4.resolve(input4);
7978
8710
  const files = await loadTranslationFilesOrAskForMetadata(
7979
8711
  inputPath,
7980
8712
  options.translationMetadata
@@ -8005,11 +8737,11 @@ function getUrls(dest) {
8005
8737
  };
8006
8738
  }
8007
8739
  async function loadTranslationFilesOrAskForMetadata(dir, translationMetadata) {
8008
- const logger = log6.getLogger();
8740
+ const logger = log7.getLogger();
8009
8741
  let files = await loadTranslationFiles(dir, translationMetadata);
8010
8742
  if (!files) {
8011
8743
  logger.log(`No metadata found for the translation in ${dir}`);
8012
- const enterMetadata = await confirm({
8744
+ const enterMetadata = await confirm2({
8013
8745
  message: "Do you want to enter the metadata for the translation?"
8014
8746
  });
8015
8747
  if (!enterMetadata) {
@@ -8017,12 +8749,12 @@ async function loadTranslationFilesOrAskForMetadata(dir, translationMetadata) {
8017
8749
  }
8018
8750
  const defaultId = basename(dir);
8019
8751
  const metadata = await askForMetadata(defaultId);
8020
- const saveMetadata = await confirm({
8752
+ const saveMetadata = await confirm2({
8021
8753
  message: "Do you want to save this metadata?"
8022
8754
  });
8023
8755
  if (saveMetadata) {
8024
- await writeFile2(
8025
- path3.resolve(dir, "metadata.json"),
8756
+ await writeFile3(
8757
+ path4.resolve(dir, "metadata.json"),
8026
8758
  JSON.stringify(metadata, null, 2)
8027
8759
  );
8028
8760
  }
@@ -8031,14 +8763,14 @@ async function loadTranslationFilesOrAskForMetadata(dir, translationMetadata) {
8031
8763
  return files;
8032
8764
  }
8033
8765
  async function askForMetadata(defaultId) {
8034
- const id2 = await input2({
8766
+ const id2 = await input3({
8035
8767
  message: "Enter the translation ID",
8036
8768
  default: defaultId
8037
8769
  });
8038
- const language = await input2({
8770
+ const language = await input3({
8039
8771
  message: "Enter the ISO 639 translation language",
8040
- validate: (input3) => {
8041
- return isValid(input3) ? true : "Invalid language code.";
8772
+ validate: (input4) => {
8773
+ return isValid(input4) ? true : "Invalid language code.";
8042
8774
  },
8043
8775
  required: true
8044
8776
  });
@@ -8050,24 +8782,24 @@ async function askForMetadata(defaultId) {
8050
8782
  ],
8051
8783
  default: "ltr"
8052
8784
  });
8053
- const shortName = await input2({
8785
+ const shortName = await input3({
8054
8786
  message: "Enter the short name of the translation",
8055
8787
  default: id2,
8056
8788
  required: false
8057
8789
  });
8058
- const name = await input2({
8790
+ const name = await input3({
8059
8791
  message: "Enter the name of the translation",
8060
8792
  required: true
8061
8793
  });
8062
- const englishName = await input2({
8794
+ const englishName = await input3({
8063
8795
  message: "Enter the English name of the translation",
8064
8796
  default: name
8065
8797
  });
8066
- const licenseUrl = await input2({
8798
+ const licenseUrl = await input3({
8067
8799
  message: "Enter the license URL for the translation",
8068
8800
  required: true
8069
8801
  });
8070
- const website = await input2({
8802
+ const website = await input3({
8071
8803
  message: "Enter the website URL for the translation",
8072
8804
  required: true,
8073
8805
  default: licenseUrl