@koda-sl/baker-cli 0.434.0-dev.2729b1413 → 0.434.0-dev.3587df0fa
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
CHANGED
|
@@ -160,6 +160,7 @@ import {
|
|
|
160
160
|
referenceNodeId,
|
|
161
161
|
referenceRole,
|
|
162
162
|
regenerateTargets,
|
|
163
|
+
relaidPictureRole,
|
|
163
164
|
replaceCopyDirective,
|
|
164
165
|
requireCredentialsFromEnv,
|
|
165
166
|
resolveAdaptFormats,
|
|
@@ -202,7 +203,7 @@ import {
|
|
|
202
203
|
withoutCastName,
|
|
203
204
|
wordCount,
|
|
204
205
|
ytDlpBlockSignal
|
|
205
|
-
} from "./chunk-
|
|
206
|
+
} from "./chunk-7NKAKF3K.js";
|
|
206
207
|
import {
|
|
207
208
|
NAME_CONTAINS_ARG,
|
|
208
209
|
csvOrJson,
|
|
@@ -77034,7 +77035,12 @@ async function previousAdImage(canvasRoot, runId, fetchRecord = fetchRunRecord,
|
|
|
77034
77035
|
const record = await fetchRecord(runId).catch(() => null);
|
|
77035
77036
|
if (!record) return null;
|
|
77036
77037
|
return chosenUrl(
|
|
77037
|
-
Object.fromEntries(
|
|
77038
|
+
Object.fromEntries(
|
|
77039
|
+
record.nodes.map((n) => {
|
|
77040
|
+
const role = n.role ?? roles[n.nodeId];
|
|
77041
|
+
return [n.nodeId, { images: n.outputs, ...role ? { role } : {} }];
|
|
77042
|
+
})
|
|
77043
|
+
)
|
|
77038
77044
|
);
|
|
77039
77045
|
}
|
|
77040
77046
|
async function previousDelivered(canvasRoot, runId, finalNode, labels, opts = {}) {
|
|
@@ -77194,7 +77200,7 @@ async function leadVersion(root, lead, fetchRecord = fetchRunRecord) {
|
|
|
77194
77200
|
);
|
|
77195
77201
|
}
|
|
77196
77202
|
const record = () => fetchRecord(runId).catch(() => null);
|
|
77197
|
-
const picture = await previousAdImage(canvasRoot, runId, record, rolesById(canvas));
|
|
77203
|
+
const picture = await previousAdImage(canvasRoot, runId, record, { ...rolesById(canvas), ...relaidPictureRole(canvas) });
|
|
77198
77204
|
const sizes = await deliveredSizes(canvasRoot, runId, canvas, record);
|
|
77199
77205
|
if (!picture) {
|
|
77200
77206
|
return refusal(
|
|
@@ -77833,16 +77839,20 @@ function withDeliveredSizes(canvas, last) {
|
|
|
77833
77839
|
const images = final?.inputs?.images;
|
|
77834
77840
|
if (!final || !Array.isArray(labels) || !Array.isArray(images)) return canvas;
|
|
77835
77841
|
const ingests = [];
|
|
77842
|
+
const roles = rolesById(canvas);
|
|
77836
77843
|
const delivered = images.map((ref2, i) => {
|
|
77837
77844
|
const format = labels[i];
|
|
77838
77845
|
const file = typeof format === "string" ? last[format] : void 0;
|
|
77839
77846
|
if (!file || typeof format !== "string") return ref2;
|
|
77840
77847
|
const id = `last_${formatSlug(format)}`;
|
|
77841
77848
|
const remote = /^(?:https?|data):/.test(file);
|
|
77849
|
+
const from = typeof ref2 === "string" ? /^\$ref:([^.]+)\./.exec(ref2)?.[1] : void 0;
|
|
77850
|
+
const role = from ? roles[from] : void 0;
|
|
77842
77851
|
ingests.push({
|
|
77843
77852
|
id,
|
|
77844
77853
|
type: "ingest",
|
|
77845
|
-
params: remote ? { source: "url", url: file, expect: "image" } : { source: "path", path: file, expect: "image" }
|
|
77854
|
+
params: remote ? { source: "url", url: file, expect: "image" } : { source: "path", path: file, expect: "image" },
|
|
77855
|
+
...role === STATIC_MASTER_ROLE ? { tags: { role } } : {}
|
|
77846
77856
|
});
|
|
77847
77857
|
return `$ref:${id}.asset`;
|
|
77848
77858
|
});
|