@magicpixelart/cli 0.5.26 → 0.5.27
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 +9 -0
- package/README.md +0 -1
- package/dist/commands/sync.js +2 -3
- package/dist/config.js +0 -1
- package/dist/util/unityFilter.js +5 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.5.27] — 2026-09-21
|
|
11
|
+
|
|
12
|
+
- Fixed Sync presses that changed only an artboard selection being skipped as
|
|
13
|
+
unchanged, which left the server without the selected-artboard metadata.
|
|
14
|
+
- Removed connected-folder and `unitySyncAll` selection fallbacks. Game sync
|
|
15
|
+
now downloads only artboards explicitly selected with Sync to Game.
|
|
16
|
+
- Previously downloaded, now-unselected variants remain eligible for safe,
|
|
17
|
+
tracked-only pruning during reconciliation.
|
|
18
|
+
|
|
10
19
|
## [0.5.26] — 2026-09-21
|
|
11
20
|
|
|
12
21
|
- Clicking Sync now selects exactly that artboard and clears sibling selections,
|
package/README.md
CHANGED
|
@@ -150,7 +150,6 @@ Sync is built to be cheap: a no-op run is one small manifest request, zero PNG b
|
|
|
150
150
|
| `connect` | `string[]` | `["**"]` on engines | Game PNG globs to keep in Connected. Empty on JS projects. |
|
|
151
151
|
| `emitIndex`| `boolean` | `true` | Emit `<outDir>/index.ts` with typed asset map. |
|
|
152
152
|
| `unityPpu` | `number?` | `32` | Unity only: pixels-per-unit in generated `.meta`. |
|
|
153
|
-
| `unitySyncAll` | `boolean?` | `false` | Game engines only: sync every artboard instead of only the one explicitly selected in the editor. |
|
|
154
153
|
| `push` | `boolean?` | `true` | Upload local PNG changes (outDir + `connect` working set) to MagicPixel on every `sync`. Set `false` for pull-only. |
|
|
155
154
|
| `endpoint` | `string?` | production URL | Override the API base (testing only). Must be **HTTPS**. |
|
|
156
155
|
|
package/dist/commands/sync.js
CHANGED
|
@@ -570,8 +570,7 @@ async function runOnce(opts, runOpts = {}) {
|
|
|
570
570
|
throw e;
|
|
571
571
|
}
|
|
572
572
|
// Game-engine projects sync only artboards explicitly selected in the
|
|
573
|
-
// editor (parity with the in-app sync button).
|
|
574
|
-
// magicpixel.json opts back into everything.
|
|
573
|
+
// editor (parity with the in-app sync button).
|
|
575
574
|
onStatus?.('Looking through your game sprites…');
|
|
576
575
|
const projectKind = await detectProjectKind();
|
|
577
576
|
const gameIndex = runOpts.gameIndex
|
|
@@ -627,7 +626,7 @@ async function runOnce(opts, runOpts = {}) {
|
|
|
627
626
|
// response must never delete art from someone's game project.
|
|
628
627
|
const unknownFlagPaths = new Set();
|
|
629
628
|
if (isEngineKind(projectKind)) {
|
|
630
|
-
const filtered = filterUnityManifest(manifest
|
|
629
|
+
const filtered = filterUnityManifest(manifest);
|
|
631
630
|
const syncedKeys = new Set(Object.keys(state.synced ?? {}));
|
|
632
631
|
if (filtered.unknown.length > 0) {
|
|
633
632
|
const n = filtered.unknown.length;
|
package/dist/config.js
CHANGED
package/dist/util/unityFilter.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Per-artboard game sync opt-in (strict).
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* mirrors the in-app sync button and pulls ONLY the flagged ones.
|
|
4
|
+
* A project may hold 100 drafts but only 3 artboards that belong in the game,
|
|
5
|
+
* so the CLI mirrors the in-app Sync to Game action and pulls ONLY the
|
|
6
|
+
* explicitly flagged ones.
|
|
8
7
|
*
|
|
9
8
|
* Strict opt-in: `unity === true` syncs, anything else does not. A missing
|
|
10
9
|
* flag means the server didn't say (older edge deploy, or a budget-starved
|
|
@@ -17,7 +16,7 @@
|
|
|
17
16
|
*/
|
|
18
17
|
/**
|
|
19
18
|
* Split the manifest into syncable entries and withheld ones. Withheld entries
|
|
20
|
-
* are never pull candidates
|
|
19
|
+
* are never pull candidates and carry no bytes;
|
|
21
20
|
* callers use them only to protect what's already on disk from pruning.
|
|
22
21
|
*/
|
|
23
22
|
export function partitionWithheldEntries(manifest) {
|
|
@@ -27,10 +26,8 @@ export function partitionWithheldEntries(manifest) {
|
|
|
27
26
|
(e.withheld === true ? withheld : entries).push(e);
|
|
28
27
|
return { entries, withheld };
|
|
29
28
|
}
|
|
30
|
-
export function filterUnityManifest(manifest
|
|
29
|
+
export function filterUnityManifest(manifest) {
|
|
31
30
|
const syncable = partitionWithheldEntries(manifest).entries;
|
|
32
|
-
if (opts.syncAll)
|
|
33
|
-
return { entries: syncable, noneFlagged: false, unknown: [] };
|
|
34
31
|
const entries = syncable.filter((e) => e.unity === true);
|
|
35
32
|
const unknown = syncable.filter((e) => typeof e.unity !== 'boolean');
|
|
36
33
|
return {
|