@helloao/cli 0.0.13 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/cli.cjs +106 -49
- package/dist/cjs/index.cjs +61 -38
- package/dist/esm/index.js +39 -26
- package/dist/esm/index.js.map +2 -2
- package/dist/types/actions.d.ts +10 -0
- package/dist/types/db.d.ts +8 -4
- package/package.json +2 -2
package/dist/types/actions.d.ts
CHANGED
|
@@ -66,8 +66,14 @@ export interface SourceTranslationsOptions {
|
|
|
66
66
|
bibleMultiConverterPath?: string;
|
|
67
67
|
/**
|
|
68
68
|
* Whether to overwrite existing files in output directory.
|
|
69
|
+
*
|
|
70
|
+
* If database tracking is enabled, this will prevent overwriting files that were not tracked in the database.
|
|
69
71
|
*/
|
|
70
72
|
overwrite?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* The database to use for tracking downloads.
|
|
75
|
+
*/
|
|
76
|
+
db?: string | null;
|
|
71
77
|
}
|
|
72
78
|
export declare function getMetaPath(): Promise<string | null>;
|
|
73
79
|
/**
|
|
@@ -81,6 +87,10 @@ export interface ImportTranslationOptions {
|
|
|
81
87
|
* Whether to forcibly import the translations, even if they have already been imported.
|
|
82
88
|
*/
|
|
83
89
|
overwrite?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* The database to import the translations into.
|
|
92
|
+
*/
|
|
93
|
+
db?: string | null;
|
|
84
94
|
}
|
|
85
95
|
/**
|
|
86
96
|
* Imports a translation from the given directory into the database in the current working directory.
|
package/dist/types/db.d.ts
CHANGED
|
@@ -71,16 +71,20 @@ export declare function insertCommentaryBooks(db: Database, commentary: DatasetC
|
|
|
71
71
|
export declare function insertCommentaryProfiles(db: Database, commentary: DatasetCommentary, commentaryProfiles: DatasetCommentaryProfile[]): void;
|
|
72
72
|
export declare function insertCommentaryContent(db: Database, commentary: DatasetCommentary, book: DatasetCommentaryBook, chapters: CommentaryBookChapter[]): void;
|
|
73
73
|
export declare function getDbPathFromDir(dir: string): string;
|
|
74
|
-
export declare function getDbPath(p
|
|
75
|
-
export declare function
|
|
74
|
+
export declare function getDbPath(p?: string | null): string;
|
|
75
|
+
export declare function getPrismaDb(path?: string | null): PrismaClient<{
|
|
76
76
|
datasources: {
|
|
77
77
|
db: {
|
|
78
78
|
url: string;
|
|
79
79
|
};
|
|
80
80
|
};
|
|
81
81
|
}, never, import("prisma-gen/runtime/library.js").DefaultArgs>;
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
/**
|
|
83
|
+
* Gets the database from the given path. If no path is provided, the current working directory is used.
|
|
84
|
+
* @param path The path to the database. If not provided, the current working directory is used.
|
|
85
|
+
* @returns
|
|
86
|
+
*/
|
|
87
|
+
export declare function getDb(path?: string | null): Promise<Database>;
|
|
84
88
|
export interface SerializedFile {
|
|
85
89
|
path: string;
|
|
86
90
|
content: string | Readable;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@helloao/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"description": "A CLI and related tools for managing HelloAO's Free Bible API",
|
|
5
5
|
"main": "./dist/cjs/index.cjs",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"all-iso-language-codes": "1.0.17",
|
|
44
44
|
"papaparse": "5.4.1",
|
|
45
45
|
"luxon": "3.5.0",
|
|
46
|
-
"@helloao/tools": "0.0.
|
|
46
|
+
"@helloao/tools": "0.0.14"
|
|
47
47
|
},
|
|
48
48
|
"files": [
|
|
49
49
|
"/README.md",
|