@takisvc/code-canvas 0.1.1 → 0.1.2
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/code-canvas.js +3 -3
- package/package.json +1 -1
package/dist/code-canvas.js
CHANGED
|
@@ -227,7 +227,7 @@ async function generateImage(endpoint2, prompt2, account2) {
|
|
|
227
227
|
console.log();
|
|
228
228
|
console.log(chalk.dim(`Server: ${errorBody.error}`));
|
|
229
229
|
}
|
|
230
|
-
return
|
|
230
|
+
return "needs-registration";
|
|
231
231
|
} finally {
|
|
232
232
|
clearInterval(interval);
|
|
233
233
|
}
|
|
@@ -244,5 +244,5 @@ if (!prompt) {
|
|
|
244
244
|
}
|
|
245
245
|
var account = ensureWallet();
|
|
246
246
|
var endpoint = `${SERVER_URL}/code-canvas/generate-image`;
|
|
247
|
-
var
|
|
248
|
-
process.exit(
|
|
247
|
+
var result = await generateImage(endpoint, prompt, account);
|
|
248
|
+
process.exit(result === true ? 0 : result === "needs-registration" ? 0 : 1);
|