@digimakers/cli 0.3.20 → 0.3.21
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.
|
Binary file
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,9 @@ import { startServer, stopServer, createPdfGenerator, convertWithConcurrency, fi
|
|
|
8
8
|
const OUTPUT_DIR = path.resolve(process.cwd(), 'output');
|
|
9
9
|
async function ensureGeminiKey() {
|
|
10
10
|
if (process.env.GEMINI_API_KEY) {
|
|
11
|
+
if (!process.env.GOOGLE_GENERATIVE_AI_API_KEY) {
|
|
12
|
+
process.env.GOOGLE_GENERATIVE_AI_API_KEY = process.env.GEMINI_API_KEY;
|
|
13
|
+
}
|
|
11
14
|
return true;
|
|
12
15
|
}
|
|
13
16
|
if (!process.stdin.isTTY || !process.stdout.isTTY) {
|
|
@@ -26,6 +29,7 @@ async function ensureGeminiKey() {
|
|
|
26
29
|
return false;
|
|
27
30
|
}
|
|
28
31
|
process.env.GEMINI_API_KEY = trimmed;
|
|
32
|
+
process.env.GOOGLE_GENERATIVE_AI_API_KEY = trimmed;
|
|
29
33
|
return true;
|
|
30
34
|
}
|
|
31
35
|
async function main() {
|
|
@@ -39,6 +43,7 @@ async function main() {
|
|
|
39
43
|
.middleware((argv) => {
|
|
40
44
|
if (argv.geminiKey) {
|
|
41
45
|
process.env.GEMINI_API_KEY = String(argv.geminiKey);
|
|
46
|
+
process.env.GOOGLE_GENERATIVE_AI_API_KEY = String(argv.geminiKey);
|
|
42
47
|
}
|
|
43
48
|
})
|
|
44
49
|
.command('convert [path]', 'Convert .docx files to PDF', (yargs) => yargs
|