@magicpixelart/cli 0.5.5 → 0.5.6
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/CHANGELOG.md +15 -0
- package/README.md +11 -1
- package/dist/api.js +10 -2
- package/dist/util/telemetry.js +7 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.5.6] — 2026-08-21
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- **README positioning.** Lead with generation, reskins/variants, the full
|
|
15
|
+
browser editor, and MCP/CLI instead of sprites/tilesets/direction sheets.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- **Transient Supabase 546 (edge worker recycle).** Friendly error copy for
|
|
20
|
+
status 546, five retry attempts with a longer backoff (~7.5s coverage), and
|
|
21
|
+
546s are no longer reported as telemetry noise. Persistent 5xx still reports.
|
|
22
|
+
Shape-guard tests that exhaust those retries now use a 15s budget so CI
|
|
23
|
+
matches the new backoff.
|
|
24
|
+
|
|
10
25
|
## [0.5.5] — 2026-07-12
|
|
11
26
|
|
|
12
27
|
### Added
|
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# @magicpixelart/cli
|
|
2
2
|
|
|
3
|
-
Sync MagicPixel pixel-art assets to your local project as flattened PNGs. Zero runtime — just files on disk that your bundler picks up.
|
|
3
|
+
Sync your [MagicPixel](https://magicpixel.art) pixel-art assets to your local project as flattened PNGs. Zero runtime — just files on disk that your bundler picks up.
|
|
4
|
+
|
|
5
|
+
MagicPixel is an [AI pixel art generator](https://magicpixel.art) for game developers: generate new pixel art, reskin and remix the assets you already have, and finish them in a full browser editor — then pull them straight into your repo with this CLI. It also exposes a [Model Context Protocol server](https://magicpixel.art/guides/connect) so Claude, ChatGPT, and Cursor can generate assets for you, and a [Vite plugin](https://www.npmjs.com/package/@magicpixelart/vite) that syncs on save with no second terminal.
|
|
4
6
|
|
|
5
7
|
## Install
|
|
6
8
|
|
|
@@ -205,6 +207,14 @@ at a non-canonical host.
|
|
|
205
207
|
- A runtime JS SDK (your bundler already handles PNG imports)
|
|
206
208
|
- Cross-user asset sharing
|
|
207
209
|
|
|
210
|
+
## More about MagicPixel
|
|
211
|
+
|
|
212
|
+
- [AI pixel art generator](https://magicpixel.art) — generate new pixel art, and reskin or remix the assets you already have.
|
|
213
|
+
- [Pixel art editor](https://magicpixel.art/pixel-art-editor) — palette remapping, components, pixel-accurate cleanup, and animation frames.
|
|
214
|
+
- [Generating game sprites with AI](https://magicpixel.art/guides/generating-sprites) — the workflow for game-ready assets.
|
|
215
|
+
- [Editing AI pixel art](https://magicpixel.art/guides/editing-ai-art) — cleaning up and iterating on generated sprites.
|
|
216
|
+
- [Connect an AI agent over MCP](https://magicpixel.art/guides/connect) — Claude, ChatGPT, and Cursor.
|
|
217
|
+
|
|
208
218
|
## License
|
|
209
219
|
|
|
210
220
|
MIT
|
package/dist/api.js
CHANGED
|
@@ -47,6 +47,11 @@ function friendly(status, body, context) {
|
|
|
47
47
|
if (status === 429) {
|
|
48
48
|
return `${context}: 429 — rate limited. Retry shortly.`;
|
|
49
49
|
}
|
|
50
|
+
if (status === 546) {
|
|
51
|
+
// Supabase Edge Runtime platform code — worker boot / CPU / wall-time.
|
|
52
|
+
// Not one of ours; typically clears in seconds.
|
|
53
|
+
return `${context}: 546 — MagicPixel edge worker restarting. Retried automatically; if this persists, retry in ~30s.`;
|
|
54
|
+
}
|
|
50
55
|
if (status >= 500) {
|
|
51
56
|
return `${context}: ${status} — MagicPixel server error. Retry shortly; status at https://magicpixel.art.`;
|
|
52
57
|
}
|
|
@@ -140,7 +145,10 @@ export async function fetchManifestPage(opts) {
|
|
|
140
145
|
* request-id of the most recent attempt.
|
|
141
146
|
*/
|
|
142
147
|
export async function retryTransient(context, fn) {
|
|
143
|
-
|
|
148
|
+
// 5 attempts × (500ms, 1s, 2s, 4s) = ~7.5s of coverage. Enough to ride out
|
|
149
|
+
// a Supabase edge worker recycle (546) or a brief 5xx without surfacing to
|
|
150
|
+
// the user; short enough that a real outage still fails within one sync tick.
|
|
151
|
+
const maxAttempts = 5;
|
|
144
152
|
let lastErr = null;
|
|
145
153
|
let nextDelayMs = 0;
|
|
146
154
|
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
|
@@ -164,7 +172,7 @@ export async function retryTransient(context, fn) {
|
|
|
164
172
|
nextDelayMs = 0;
|
|
165
173
|
}
|
|
166
174
|
if (attempt < maxAttempts) {
|
|
167
|
-
const backoffMs =
|
|
175
|
+
const backoffMs = 500 * 2 ** (attempt - 1);
|
|
168
176
|
await new Promise((r) => setTimeout(r, Math.max(nextDelayMs, backoffMs)));
|
|
169
177
|
}
|
|
170
178
|
}
|
package/dist/util/telemetry.js
CHANGED
|
@@ -41,6 +41,13 @@ export function shouldReportCliError(err) {
|
|
|
41
41
|
if (!(err instanceof Error))
|
|
42
42
|
return false;
|
|
43
43
|
if (err instanceof ApiError) {
|
|
44
|
+
// 546 is a Supabase Edge Runtime platform code (worker boot / CPU /
|
|
45
|
+
// wall-time). It bypasses our function's try/catch and is almost always
|
|
46
|
+
// transient. Retries usually absorb it; a leaked-to-user 546 is still
|
|
47
|
+
// unactionable noise on /admin/errors. Persistent worker failures still
|
|
48
|
+
// surface as 500/502/503, which remain reported.
|
|
49
|
+
if (err.status === 546)
|
|
50
|
+
return false;
|
|
44
51
|
// User/config issues have actionable fix hints already; don't add noise.
|
|
45
52
|
return err.status >= 500;
|
|
46
53
|
}
|