prompt for api key
parent
0352665076
commit
07ac720d73
13
src/app.ts
13
src/app.ts
|
|
@ -244,6 +244,19 @@ export class App {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (exporters.includes("splashcat")) {
|
if (exporters.includes("splashcat")) {
|
||||||
|
if (!state.splashcatApiKey) {
|
||||||
|
const key = (await this.env.prompts.prompt(
|
||||||
|
"Splashcat API key is not set. Please enter below.",
|
||||||
|
)).trim();
|
||||||
|
if (!key) {
|
||||||
|
this.env.logger.error("API key is required.");
|
||||||
|
Deno.exit(1);
|
||||||
|
}
|
||||||
|
await this.profile.writeState({
|
||||||
|
...state,
|
||||||
|
splashcatApiKey: key,
|
||||||
|
});
|
||||||
|
}
|
||||||
out.push(new SplashcatExporter({
|
out.push(new SplashcatExporter({
|
||||||
env: this.env,
|
env: this.env,
|
||||||
uploadMode: this.opts.monitor ? "Monitoring" : "Manual",
|
uploadMode: this.opts.monitor ? "Monitoring" : "Manual",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue