@pixelvibing/cli 0.7.0 → 0.9.0
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/pixel-vibing-cli.js +5 -3
- package/package.json +1 -1
package/dist/pixel-vibing-cli.js
CHANGED
|
@@ -339,11 +339,12 @@ class SignedOut extends Error {
|
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
341
|
class ApiError extends Error {
|
|
342
|
-
constructor(status, message, body = {}) {
|
|
342
|
+
constructor(status, message, body = {}, retryAfter = null) {
|
|
343
343
|
super(message);
|
|
344
344
|
this.name = "ApiError";
|
|
345
345
|
this.status = status;
|
|
346
346
|
this.body = body;
|
|
347
|
+
this.retryAfter = retryAfter;
|
|
347
348
|
}
|
|
348
349
|
}
|
|
349
350
|
async function refusalOf(response) {
|
|
@@ -383,7 +384,8 @@ function createCaller(fetcher = (input, init2) => fetch(input, init2), base = AP
|
|
|
383
384
|
}
|
|
384
385
|
if (!response.ok) {
|
|
385
386
|
const refused = await refusalOf(response);
|
|
386
|
-
|
|
387
|
+
const wait = Number(response.headers.get("retry-after") ?? Number.NaN);
|
|
388
|
+
throw new ApiError(response.status, refused.message, refused.body, Number.isFinite(wait) ? wait : null);
|
|
387
389
|
}
|
|
388
390
|
return response;
|
|
389
391
|
};
|
|
@@ -3760,7 +3762,7 @@ const seal = {
|
|
|
3760
3762
|
answer(context, { sealed: true, output: result.output }, result.output);
|
|
3761
3763
|
}
|
|
3762
3764
|
};
|
|
3763
|
-
const version = "0.
|
|
3765
|
+
const version = "0.9.0";
|
|
3764
3766
|
const manifest = {
|
|
3765
3767
|
version
|
|
3766
3768
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixelvibing/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "PixelVibing: pixel art game assets from the command line, and the Skills that teach coding assistants to make them.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://pixelvibing.com",
|