pixelkiln 0.46.0 → 0.46.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 +10 -1
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +10 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -9019,8 +9019,9 @@ async function fetchAssets(provider, specs, lock, lockPath, opts = {}) {
|
|
|
9019
9019
|
const superseded = (entry.supersededOutputs ?? []).find(
|
|
9020
9020
|
(output, oldIndex, all) => currentOutputPath(output, spec, oldIndex, all.length) === target
|
|
9021
9021
|
);
|
|
9022
|
+
const outgoing = Boolean(superseded && currentHash === superseded.sha256);
|
|
9022
9023
|
if (!opts.force) {
|
|
9023
|
-
if (
|
|
9024
|
+
if (outgoing) {
|
|
9024
9025
|
} else if (recorded || superseded) {
|
|
9025
9026
|
throw new Error(
|
|
9026
9027
|
`refusing to overwrite modified output ${target}; pass --force to replace it`
|
|
@@ -9031,6 +9032,14 @@ async function fetchAssets(provider, specs, lock, lockPath, opts = {}) {
|
|
|
9031
9032
|
);
|
|
9032
9033
|
}
|
|
9033
9034
|
}
|
|
9035
|
+
if (outgoing && cacheDir) {
|
|
9036
|
+
try {
|
|
9037
|
+
const oldBytes = await (0, import_promises11.readFile)(target);
|
|
9038
|
+
const oldMediaType = detectMediaType(oldBytes);
|
|
9039
|
+
if (oldMediaType) await cacheMedia(cacheDir, oldBytes, oldMediaType, currentHash);
|
|
9040
|
+
} catch {
|
|
9041
|
+
}
|
|
9042
|
+
}
|
|
9034
9043
|
log(
|
|
9035
9044
|
` replace ${import_node_path18.default.relative(process.cwd(), target)}` + (opts.force ? " (--force)" : " (previous tracked generation)")
|
|
9036
9045
|
);
|