@helloao/tools 0.0.11 → 0.0.12
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../generation/common-types.ts"],
|
|
4
|
-
"sourcesContent": ["import { VerseRef } from '../utils.js';\n\n/**\n * Defines an interface that contains information about a input file.\n */\nexport type InputFile = InputTranslationFile | InputCommentaryFile;\n\nexport interface InputFileBase {\n name?: string;\n content: string;\n sha256?: string;\n}\n\nexport type InputFileMetadata =\n | InputTranslationMetadata\n | InputCommentaryMetadata;\n\nexport interface InputTranslationFile extends InputFileBase {\n fileType: 'usfm' | 'usx' | 'json';\n metadata: InputTranslationMetadata;\n}\n\nexport interface InputCommentaryFile extends InputFileBase {\n fileType: 'commentary/csv' | 'commentary/tyndale-xml';\n metadata: InputCommentaryMetadata;\n}\n\nexport type OutputFileContent = object | ReadableStream;\n\n/**\n * Defines an interface that contains information about a output file.\n */\nexport interface OutputFile {\n /**\n * The path that the file should be stored at.\n */\n path: string;\n\n /**\n * The content of the file.\n */\n content: OutputFileContent | (() => Promise<OutputFileContent>);\n\n /**\n * Whether the file can be merged with files of the same name but from other datasets.\n */\n mergable?: boolean;\n}\n\nexport interface MetadataBase {\n /**\n * The name of the translation.\n */\n name: string;\n\n /**\n * The english name of the translation.\n */\n englishName: string;\n\n /**\n * The website for the translation.\n */\n website: string;\n\n /**\n * The URL that the license for the translation can be found.\n */\n licenseUrl: string;\n\n /**\n * The ISO 639 letter language tag that the translation is primarily in.\n */\n language: string;\n\n /**\n * The direction that the text is written in.\n */\n direction: 'ltr' | 'rtl';\n}\n\n/**\n * The metadata for a translation that is input into the generator.\n */\nexport interface InputTranslationMetadata extends MetadataBase {\n /**\n * The ID of the translation.\n */\n id: string;\n\n /**\n * The short name for the translation.\n */\n shortName?: string;\n}\n\n/**\n * The metadata for a translation that is input into the generator.\n */\nexport interface InputCommentaryMetadata extends MetadataBase {\n /**\n * The ID of the commentary.\n */\n id: string;\n}\n\n/**\n * Defines an interface that contains information about a translation.\n */\nexport interface Translation {\n /**\n * The ID of the translation.\n */\n id: string;\n\n /**\n * The name of the translation.\n */\n name: string;\n\n /**\n * The website for the translation.\n */\n website: string;\n\n /**\n * The URL that the license for the translation can be found.\n */\n licenseUrl: string;\n\n /**\n * The API-added notes for the license.\n */\n licenseNotes?: string | null;\n\n /**\n * The short name for the translation.\n */\n shortName?: string;\n\n /**\n * The English name for the translation.\n */\n englishName: string;\n\n /**\n * The ISO 639 3-letter language tag that the translation is primarily in.\n */\n language: string;\n\n /**\n * The direction that the language is written in.\n * \"ltr\" indicates that the text is written from the left side of the page to the right.\n * \"rtl\" indicates that the text is written from the right side of the page to the left.\n */\n textDirection: 'ltr' | 'rtl';\n}\n\n/**\n * Defines an interface that contains information about a commentary.\n */\nexport interface Commentary {\n /**\n * The ID of the commentary.\n */\n id: string;\n\n /**\n * The name of the commentary.\n */\n name: string;\n\n /**\n * The website for the commentary.\n */\n website: string;\n\n /**\n * The URL that the license for the commentary can be found.\n */\n licenseUrl: string;\n\n /**\n * The API-added notes for the license.\n */\n licenseNotes?: string | null;\n\n /**\n * The english name for the commentary.\n */\n englishName: string;\n\n /**\n * The ISO 639 3-letter language tag that the translation is primarily in.\n */\n language: string;\n\n /**\n * The direction that the language is written in.\n * \"ltr\" indicates that the text is written from the left side of the page to the right.\n * \"rtl\" indicates that the text is written from the right side of the page to the left.\n */\n textDirection: 'ltr' | 'rtl';\n}\n\n/**\n * Defines an interface that contains information about a book.\n */\nexport interface TranslationBook {\n /**\n * The ID of the book. Should match the USFM book ID.\n */\n id: string;\n\n /**\n * The name that the translation provided for the book.\n */\n name: string;\n\n /**\n * The common name for the book.\n */\n commonName: string;\n\n /**\n * The title of the book.\n * This is usually a more descriptive version of the book name.\n * If not available, then one was not provided by the translation.\n */\n title: string | null;\n\n /**\n * The numerical order of the book in the translation.\n */\n order: number;\n}\n\n/**\n * Defines an interface that contains information about a book in a commentary.\n */\nexport interface CommentaryBook {\n /**\n * The ID of the book. Should match the USFM book ID.\n */\n id: string;\n\n /**\n * The name that the commentary provided for the book.\n */\n name: string;\n\n /**\n * The common name for the book.\n */\n commonName: string;\n\n /**\n * The commentary's introduction for the book.\n */\n introduction?: string;\n\n /**\n * The summary of the commentary's introduction for the book.\n */\n introductionSummary?: string;\n\n /**\n * The order of the book in the Bible.\n */\n order: number;\n}\n\n/**\n * Defines an interface that contains information about a profile in a commentary.\n */\nexport interface CommentaryProfile {\n /**\n * The ID of the profile.\n */\n id: string;\n\n /**\n * The subject of the profile.\n */\n subject: string;\n\n /**\n * The Bible reference that the profile is associated with.\n */\n reference: VerseRef | null;\n}\n\n/**\n * Defines an interface that contains information about a book chapter.\n */\nexport interface TranslationBookChapter {\n /**\n * The information for the chapter.\n */\n chapter: ChapterData;\n\n /**\n * The links to different audio versions for the chapter.\n */\n thisChapterAudioLinks: TranslationBookChapterAudioLinks;\n}\n\n/**\n * Defines an interface that contains information about a book chapter in a commentary.\n */\nexport interface CommentaryBookChapter {\n /**\n * The information for the chapter.\n */\n chapter: CommentaryChapterData;\n}\n\n/**\n * Defines an interface that contains the audio links for a book chapter.\n */\nexport interface TranslationBookChapterAudioLinks {\n /**\n * The reader for the chapter and the URL link to the audio file.\n */\n [reader: string]: string;\n}\n\n/**\n * Defines an interface that represents data in a chapter.\n */\nexport interface ChapterData {\n /**\n * The number of the chapter.\n */\n number: number;\n\n /**\n * The content of the chapter.\n */\n content: ChapterContent[];\n\n /**\n * The list of footnotes for the chapter.\n */\n footnotes: ChapterFootnote[];\n}\n\n/**\n * Defines an interface that represents data in a chapter in a commentary.\n */\nexport interface CommentaryChapterData {\n /**\n * The number of the chapter.\n */\n number: number;\n\n /**\n * The introduction that the commentary provided to the chapter.\n * Not all commentaries provide an introduction to a chapter.\n */\n introduction?: string;\n\n /**\n * The content of the chapter.\n */\n content: ChapterVerse[];\n}\n\n/**\n * A union type that represents a single piece of chapter content.\n * A piece of chapter content can be one of the following things:\n * - A heading.\n * - A line break.\n * - A verse.\n * - A Hebrew Subtitle.\n */\nexport type ChapterContent =\n | ChapterHeading\n | ChapterLineBreak\n | ChapterVerse\n | ChapterHebrewSubtitle;\n\n/**\n * A heading in a chapter.\n */\nexport interface ChapterHeading {\n /**\n * Indicates that the content represents a heading.\n */\n type: 'heading';\n\n /**\n * The content for the heading.\n * If multiple strings are included in the array, they should be concatenated with a space.\n */\n content: string[];\n}\n\n/**\n * A line break in a chapter.\n */\nexport interface ChapterLineBreak {\n /**\n * Indicates that the content represents a line break.\n */\n type: 'line_break';\n}\n\n/**\n * A Hebrew Subtitle in a chapter.\n * These are often used included as informational content that appeared in the original manuscripts.\n * For example, Psalms 49 has the Hebrew Subtitle \"To the choirmaster. A Psalm of the Sons of Korah.\"\n */\nexport interface ChapterHebrewSubtitle {\n /**\n * Indicates that the content represents a Hebrew Subtitle.\n */\n type: 'hebrew_subtitle';\n\n /**\n * The list of content that is contained in the subtitle.\n * Each element in the list could be a string, formatted text, or a footnote reference.\n */\n content: (string | FormattedText | VerseFootnoteReference)[];\n}\n\n/**\n * A verse in a chapter.\n */\nexport interface ChapterVerse {\n /**\n * Indicates that the content is a verse.\n */\n type: 'verse';\n\n /**\n * The number of the verse.\n */\n number: number;\n\n /**\n * The list of content for the verse.\n * Each element in the list could be a string, formatted text, or a footnote reference.\n */\n content: (\n | string\n | FormattedText\n | InlineHeading\n | InlineLineBreak\n | VerseFootnoteReference\n )[];\n}\n\n/**\n * Formatted text. That is, text that is formated in a particular manner.\n */\nexport interface FormattedText {\n /**\n * The text that is formatted.\n */\n text: string;\n\n /**\n * Whether the text represents a poem.\n * The number indicates the level of indent.\n *\n * Common in Psalms.\n */\n poem?: number;\n\n /**\n * Whether the text represents the Words of Jesus.\n */\n wordsOfJesus?: boolean;\n}\n\n/**\n * Defines an interface that represents a heading that is embedded in a verse.\n */\nexport interface InlineHeading {\n /**\n * The text of the heading.\n */\n heading: string;\n}\n\n/**\n * Defines an interface that represents a line break that is embedded in a verse.\n */\nexport interface InlineLineBreak {\n lineBreak: true;\n}\n\n/**\n * A footnote reference in a verse or a Hebrew Subtitle.\n */\nexport interface VerseFootnoteReference {\n /**\n * The ID of the note.\n */\n noteId: number;\n}\n\n/**\n * Information about a footnote.\n */\nexport interface ChapterFootnote {\n /**\n * The ID of the note that is referenced.\n */\n noteId: number;\n\n /**\n * The text of the footnote.\n */\n text: string;\n\n /**\n * The verse reference for the footnote.\n */\n reference?: {\n chapter: number;\n verse: number;\n };\n\n /**\n * The caller that should be used for the footnote.\n * For footnotes, a \"caller\" is the character that is used in the text to reference to footnote.\n *\n * For example, in the text:\n * Hello (a) World\n *\n * ----\n * (a) This is a footnote.\n *\n * The \"(a)\" is the caller.\n *\n * If \"+\", then the caller should be autogenerated.\n * If null, then the caller should be empty.\n * If a string, then the caller should be that string.\n */\n caller: '+' | string | null;\n}\n"],
|
|
4
|
+
"sourcesContent": ["import { VerseRef } from '../utils.js';\n\n/**\n * Defines an interface that contains information about a input file.\n */\nexport type InputFile = InputTranslationFile | InputCommentaryFile;\n\nexport interface InputFileBase {\n name?: string;\n content: string;\n sha256?: string;\n}\n\nexport type InputFileMetadata =\n | InputTranslationMetadata\n | InputCommentaryMetadata;\n\nexport interface InputTranslationFile extends InputFileBase {\n fileType: 'usfm' | 'usx' | 'json';\n metadata: InputTranslationMetadata;\n}\n\nexport interface InputCommentaryFile extends InputFileBase {\n fileType: 'commentary/csv' | 'commentary/tyndale-xml';\n metadata: InputCommentaryMetadata;\n}\n\nexport type OutputFileContent = object | ReadableStream;\n\n/**\n * Defines an interface that contains information about a output file.\n */\nexport interface OutputFile {\n /**\n * The path that the file should be stored at.\n */\n path: string;\n\n /**\n * The content of the file.\n */\n content: OutputFileContent | (() => Promise<OutputFileContent>);\n\n /**\n * Whether the file can be merged with files of the same name but from other datasets.\n */\n mergable?: boolean;\n}\n\nexport interface MetadataBase {\n /**\n * The name of the translation.\n */\n name: string;\n\n /**\n * The english name of the translation.\n */\n englishName: string;\n\n /**\n * The website for the translation.\n */\n website: string;\n\n /**\n * The URL that the license for the translation can be found.\n */\n licenseUrl: string;\n\n /**\n * The ISO 639 letter language tag that the translation is primarily in.\n */\n language: string;\n\n /**\n * The direction that the text is written in.\n */\n direction: 'ltr' | 'rtl';\n}\n\n/**\n * The metadata for a translation that is input into the generator.\n */\nexport interface InputTranslationMetadata extends MetadataBase {\n /**\n * The ID of the translation.\n */\n id: string;\n\n /**\n * The short name for the translation.\n */\n shortName: string;\n}\n\n/**\n * The metadata for a translation that is input into the generator.\n */\nexport interface InputCommentaryMetadata extends MetadataBase {\n /**\n * The ID of the commentary.\n */\n id: string;\n}\n\n/**\n * Defines an interface that contains information about a translation.\n */\nexport interface Translation {\n /**\n * The ID of the translation.\n */\n id: string;\n\n /**\n * The name of the translation.\n */\n name: string;\n\n /**\n * The website for the translation.\n */\n website: string;\n\n /**\n * The URL that the license for the translation can be found.\n */\n licenseUrl: string;\n\n /**\n * The API-added notes for the license.\n */\n licenseNotes?: string | null;\n\n /**\n * The short name for the translation.\n */\n shortName?: string;\n\n /**\n * The English name for the translation.\n */\n englishName: string;\n\n /**\n * The ISO 639 3-letter language tag that the translation is primarily in.\n */\n language: string;\n\n /**\n * The direction that the language is written in.\n * \"ltr\" indicates that the text is written from the left side of the page to the right.\n * \"rtl\" indicates that the text is written from the right side of the page to the left.\n */\n textDirection: 'ltr' | 'rtl';\n}\n\n/**\n * Defines an interface that contains information about a commentary.\n */\nexport interface Commentary {\n /**\n * The ID of the commentary.\n */\n id: string;\n\n /**\n * The name of the commentary.\n */\n name: string;\n\n /**\n * The website for the commentary.\n */\n website: string;\n\n /**\n * The URL that the license for the commentary can be found.\n */\n licenseUrl: string;\n\n /**\n * The API-added notes for the license.\n */\n licenseNotes?: string | null;\n\n /**\n * The english name for the commentary.\n */\n englishName: string;\n\n /**\n * The ISO 639 3-letter language tag that the translation is primarily in.\n */\n language: string;\n\n /**\n * The direction that the language is written in.\n * \"ltr\" indicates that the text is written from the left side of the page to the right.\n * \"rtl\" indicates that the text is written from the right side of the page to the left.\n */\n textDirection: 'ltr' | 'rtl';\n}\n\n/**\n * Defines an interface that contains information about a book.\n */\nexport interface TranslationBook {\n /**\n * The ID of the book. Should match the USFM book ID.\n */\n id: string;\n\n /**\n * The name that the translation provided for the book.\n */\n name: string;\n\n /**\n * The common name for the book.\n */\n commonName: string;\n\n /**\n * The title of the book.\n * This is usually a more descriptive version of the book name.\n * If not available, then one was not provided by the translation.\n */\n title: string | null;\n\n /**\n * The numerical order of the book in the translation.\n */\n order: number;\n}\n\n/**\n * Defines an interface that contains information about a book in a commentary.\n */\nexport interface CommentaryBook {\n /**\n * The ID of the book. Should match the USFM book ID.\n */\n id: string;\n\n /**\n * The name that the commentary provided for the book.\n */\n name: string;\n\n /**\n * The common name for the book.\n */\n commonName: string;\n\n /**\n * The commentary's introduction for the book.\n */\n introduction?: string;\n\n /**\n * The summary of the commentary's introduction for the book.\n */\n introductionSummary?: string;\n\n /**\n * The order of the book in the Bible.\n */\n order: number;\n}\n\n/**\n * Defines an interface that contains information about a profile in a commentary.\n */\nexport interface CommentaryProfile {\n /**\n * The ID of the profile.\n */\n id: string;\n\n /**\n * The subject of the profile.\n */\n subject: string;\n\n /**\n * The Bible reference that the profile is associated with.\n */\n reference: VerseRef | null;\n}\n\n/**\n * Defines an interface that contains information about a book chapter.\n */\nexport interface TranslationBookChapter {\n /**\n * The information for the chapter.\n */\n chapter: ChapterData;\n\n /**\n * The links to different audio versions for the chapter.\n */\n thisChapterAudioLinks: TranslationBookChapterAudioLinks;\n}\n\n/**\n * Defines an interface that contains information about a book chapter in a commentary.\n */\nexport interface CommentaryBookChapter {\n /**\n * The information for the chapter.\n */\n chapter: CommentaryChapterData;\n}\n\n/**\n * Defines an interface that contains the audio links for a book chapter.\n */\nexport interface TranslationBookChapterAudioLinks {\n /**\n * The reader for the chapter and the URL link to the audio file.\n */\n [reader: string]: string;\n}\n\n/**\n * Defines an interface that represents data in a chapter.\n */\nexport interface ChapterData {\n /**\n * The number of the chapter.\n */\n number: number;\n\n /**\n * The content of the chapter.\n */\n content: ChapterContent[];\n\n /**\n * The list of footnotes for the chapter.\n */\n footnotes: ChapterFootnote[];\n}\n\n/**\n * Defines an interface that represents data in a chapter in a commentary.\n */\nexport interface CommentaryChapterData {\n /**\n * The number of the chapter.\n */\n number: number;\n\n /**\n * The introduction that the commentary provided to the chapter.\n * Not all commentaries provide an introduction to a chapter.\n */\n introduction?: string;\n\n /**\n * The content of the chapter.\n */\n content: ChapterVerse[];\n}\n\n/**\n * A union type that represents a single piece of chapter content.\n * A piece of chapter content can be one of the following things:\n * - A heading.\n * - A line break.\n * - A verse.\n * - A Hebrew Subtitle.\n */\nexport type ChapterContent =\n | ChapterHeading\n | ChapterLineBreak\n | ChapterVerse\n | ChapterHebrewSubtitle;\n\n/**\n * A heading in a chapter.\n */\nexport interface ChapterHeading {\n /**\n * Indicates that the content represents a heading.\n */\n type: 'heading';\n\n /**\n * The content for the heading.\n * If multiple strings are included in the array, they should be concatenated with a space.\n */\n content: string[];\n}\n\n/**\n * A line break in a chapter.\n */\nexport interface ChapterLineBreak {\n /**\n * Indicates that the content represents a line break.\n */\n type: 'line_break';\n}\n\n/**\n * A Hebrew Subtitle in a chapter.\n * These are often used included as informational content that appeared in the original manuscripts.\n * For example, Psalms 49 has the Hebrew Subtitle \"To the choirmaster. A Psalm of the Sons of Korah.\"\n */\nexport interface ChapterHebrewSubtitle {\n /**\n * Indicates that the content represents a Hebrew Subtitle.\n */\n type: 'hebrew_subtitle';\n\n /**\n * The list of content that is contained in the subtitle.\n * Each element in the list could be a string, formatted text, or a footnote reference.\n */\n content: (string | FormattedText | VerseFootnoteReference)[];\n}\n\n/**\n * A verse in a chapter.\n */\nexport interface ChapterVerse {\n /**\n * Indicates that the content is a verse.\n */\n type: 'verse';\n\n /**\n * The number of the verse.\n */\n number: number;\n\n /**\n * The list of content for the verse.\n * Each element in the list could be a string, formatted text, or a footnote reference.\n */\n content: (\n | string\n | FormattedText\n | InlineHeading\n | InlineLineBreak\n | VerseFootnoteReference\n )[];\n}\n\n/**\n * Formatted text. That is, text that is formated in a particular manner.\n */\nexport interface FormattedText {\n /**\n * The text that is formatted.\n */\n text: string;\n\n /**\n * Whether the text represents a poem.\n * The number indicates the level of indent.\n *\n * Common in Psalms.\n */\n poem?: number;\n\n /**\n * Whether the text represents the Words of Jesus.\n */\n wordsOfJesus?: boolean;\n}\n\n/**\n * Defines an interface that represents a heading that is embedded in a verse.\n */\nexport interface InlineHeading {\n /**\n * The text of the heading.\n */\n heading: string;\n}\n\n/**\n * Defines an interface that represents a line break that is embedded in a verse.\n */\nexport interface InlineLineBreak {\n lineBreak: true;\n}\n\n/**\n * A footnote reference in a verse or a Hebrew Subtitle.\n */\nexport interface VerseFootnoteReference {\n /**\n * The ID of the note.\n */\n noteId: number;\n}\n\n/**\n * Information about a footnote.\n */\nexport interface ChapterFootnote {\n /**\n * The ID of the note that is referenced.\n */\n noteId: number;\n\n /**\n * The text of the footnote.\n */\n text: string;\n\n /**\n * The verse reference for the footnote.\n */\n reference?: {\n chapter: number;\n verse: number;\n };\n\n /**\n * The caller that should be used for the footnote.\n * For footnotes, a \"caller\" is the character that is used in the text to reference to footnote.\n *\n * For example, in the text:\n * Hello (a) World\n *\n * ----\n * (a) This is a footnote.\n *\n * The \"(a)\" is the caller.\n *\n * If \"+\", then the caller should be autogenerated.\n * If null, then the caller should be empty.\n * If a string, then the caller should be that string.\n */\n caller: '+' | string | null;\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|