@vocoder/cli 0.1.22 → 0.1.23
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/bin.mjs +9 -1
- package/dist/bin.mjs.map +1 -1
- package/package.json +1 -1
package/dist/bin.mjs
CHANGED
|
@@ -3600,7 +3600,15 @@ async function sync(options = {}) {
|
|
|
3600
3600
|
}
|
|
3601
3601
|
if (error instanceof Error) {
|
|
3602
3602
|
p8.log.error(error.message);
|
|
3603
|
-
|
|
3603
|
+
const isInvalidKey = error.message.toLowerCase().includes("invalid api key") || error instanceof VocoderAPIError && error.status === 401;
|
|
3604
|
+
if (isInvalidKey) {
|
|
3605
|
+
p8.log.warn(
|
|
3606
|
+
"API key rejected \u2014 the project may have been deleted or the key revoked."
|
|
3607
|
+
);
|
|
3608
|
+
p8.log.info(
|
|
3609
|
+
" Run `npx @vocoder/cli init` to create a new project and key."
|
|
3610
|
+
);
|
|
3611
|
+
} else if (error.message.includes("VOCODER_API_KEY")) {
|
|
3604
3612
|
p8.log.warn(
|
|
3605
3613
|
"VOCODER_API_KEY is only needed for `vocoder sync` (CLI push)."
|
|
3606
3614
|
);
|