pixelkiln 0.96.0 → 0.96.1
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/cli.js +21 -0
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +21 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +0 -6
- package/dist/index.d.ts +0 -6
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -1
- package/docs/CLI.md +5 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -19249,7 +19249,27 @@ function handEditMembers(loaded, spec, lock, editPath) {
|
|
|
19249
19249
|
}
|
|
19250
19250
|
return [{ role: null, path: editPath, base: bases?.[0]?.path ?? null }];
|
|
19251
19251
|
}
|
|
19252
|
+
function refuseUneditable(spec) {
|
|
19253
|
+
const key2 = `${spec.styleId}/${spec.assetId}`;
|
|
19254
|
+
if (spec.derive) {
|
|
19255
|
+
const from = spec.derive.source.kind === "asset" ? spec.derive.source.assetId : spec.derive.source.file;
|
|
19256
|
+
throw new ManifestEditError(
|
|
19257
|
+
`${key2} is derived from ${from} (${spec.derive.transform}), so it has no hand edit of its own; edit its source, or change the derive transform in the manifest`
|
|
19258
|
+
);
|
|
19259
|
+
}
|
|
19260
|
+
if (spec.external) {
|
|
19261
|
+
throw new ManifestEditError(
|
|
19262
|
+
`${key2} is built outside pixelkiln (${spec.external.builder}); change it there, then run pixelkiln adopt --local --force to record the new file`
|
|
19263
|
+
);
|
|
19264
|
+
}
|
|
19265
|
+
if (spec.mirror) {
|
|
19266
|
+
throw new ManifestEditError(
|
|
19267
|
+
`${key2} is a flip of ${spec.mirror.sourceAssetId}, so it has no hand edit of its own; edit ${spec.mirror.sourceAssetId} and flip it again`
|
|
19268
|
+
);
|
|
19269
|
+
}
|
|
19270
|
+
}
|
|
19252
19271
|
async function startHandEdit(loaded, lock, spec, opts = {}) {
|
|
19272
|
+
refuseUneditable(spec);
|
|
19253
19273
|
const entry = lock.entries[lockKey(spec.styleId, spec.assetId)];
|
|
19254
19274
|
if (entry && entry.outputs.length > 1 && !isMemberSetEntry(entry)) {
|
|
19255
19275
|
throw new ManifestEditError(
|
|
@@ -19363,6 +19383,7 @@ async function readHandEditCompanion(editPath) {
|
|
|
19363
19383
|
}
|
|
19364
19384
|
var MAX_HAND_EDIT_BYTES = 16 * 1024 * 1024;
|
|
19365
19385
|
async function saveHandEdit(loaded, lock, spec, input) {
|
|
19386
|
+
refuseUneditable(spec);
|
|
19366
19387
|
const entry = lock.entries[lockKey(spec.styleId, spec.assetId)];
|
|
19367
19388
|
const memberSet = entry ? isMemberSetEntry(entry) : false;
|
|
19368
19389
|
const incoming = input.frames ?? (input.png ? [{ role: null, png: input.png }] : []);
|