@koda-sl/baker-cli 0.133.0 → 0.133.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.
|
@@ -2488,6 +2488,11 @@ import { readFile as readFile2 } from "fs/promises";
|
|
|
2488
2488
|
import path3 from "path";
|
|
2489
2489
|
import { z as z2 } from "zod";
|
|
2490
2490
|
|
|
2491
|
+
// src/engine/lib/url.ts
|
|
2492
|
+
function looksLikeHttpUrl(value) {
|
|
2493
|
+
return typeof value === "string" && /^https?:\/\//i.test(value.trim());
|
|
2494
|
+
}
|
|
2495
|
+
|
|
2491
2496
|
// src/engine/scaffold/lib/prompt-profiles.ts
|
|
2492
2497
|
var VEO_PERSON_GENERATION = "allow_adult";
|
|
2493
2498
|
var VEO_NEGATIVE_PROMPT = "subtitles, captions, on-screen text, watermark, logo, warped face, distorted hands, extra fingers, low quality";
|
|
@@ -2720,7 +2725,8 @@ var STAGE_CODES = {
|
|
|
2720
2725
|
ODD_DIMENSIONS: "VIDEO_ODD_DIMENSIONS",
|
|
2721
2726
|
REGION_DROPPED: "VIDEO_REGION_DROPPED",
|
|
2722
2727
|
OVERLAY_OUT_OF_BOUNDS: "VIDEO_OVERLAY_OUT_OF_BOUNDS",
|
|
2723
|
-
ORPHAN_NODE: "ORPHAN_NODE"
|
|
2728
|
+
ORPHAN_NODE: "ORPHAN_NODE",
|
|
2729
|
+
INGEST_PATH_URL_HEALED: "INGEST_PATH_URL_HEALED"
|
|
2724
2730
|
};
|
|
2725
2731
|
var SPAN_MODEL_SLACK_S = 0.25;
|
|
2726
2732
|
var VIDEO_TIME_SLACK_S = 0.75;
|
|
@@ -2777,6 +2783,7 @@ function validateCanvas(input, registry) {
|
|
|
2777
2783
|
checkUnknownNodeTypes(ctx);
|
|
2778
2784
|
if (issues.some((i) => i.code === STAGE_CODES.UNKNOWN_NODE)) return { ok: false, issues };
|
|
2779
2785
|
checkAllParams(ctx);
|
|
2786
|
+
checkIngestPathUrlHeals(ctx);
|
|
2780
2787
|
checkAllModelParams(ctx);
|
|
2781
2788
|
checkAllRefs(ctx);
|
|
2782
2789
|
checkAllModelInputs(ctx);
|
|
@@ -2899,6 +2906,22 @@ function checkAllParams(ctx) {
|
|
|
2899
2906
|
pushZodIssues(ctx.issues, parsed.error, `nodes[${i}].params`, STAGE_CODES.PARAMS, n.id, n.type);
|
|
2900
2907
|
}
|
|
2901
2908
|
}
|
|
2909
|
+
function checkIngestPathUrlHeals(ctx) {
|
|
2910
|
+
for (let i = 0; i < ctx.canvas.nodes.length; i++) {
|
|
2911
|
+
const n = ctx.canvas.nodes[i];
|
|
2912
|
+
if (!n || n.type !== "ingest") continue;
|
|
2913
|
+
const params = n.params ?? {};
|
|
2914
|
+
if (params.source !== "path" || !looksLikeHttpUrl(params.path)) continue;
|
|
2915
|
+
ctx.issues.push({
|
|
2916
|
+
path: `nodes[${i}].params.source`,
|
|
2917
|
+
code: STAGE_CODES.INGEST_PATH_URL_HEALED,
|
|
2918
|
+
message: `ingest "${n.id}" declares source:"path" but its value is a URL \u2014 running it as source:"url". Update the canvas JSON to source:"url" so it matches what baker runs.`,
|
|
2919
|
+
severity: "warning",
|
|
2920
|
+
node_id: n.id,
|
|
2921
|
+
node_type: n.type
|
|
2922
|
+
});
|
|
2923
|
+
}
|
|
2924
|
+
}
|
|
2902
2925
|
function checkAllModelParams(ctx) {
|
|
2903
2926
|
for (let i = 0; i < ctx.canvas.nodes.length; i++) {
|
|
2904
2927
|
const n = ctx.canvas.nodes[i];
|
|
@@ -4534,18 +4557,30 @@ function mapClientError(ctx, e) {
|
|
|
4534
4557
|
// src/engine/nodes/ingest.ts
|
|
4535
4558
|
var execFile = promisify(execFileCb);
|
|
4536
4559
|
var ExpectEnum = z5.enum(["image", "video", "audio", "text", "json", "font"]);
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4560
|
+
function coercePathUrlToUrl(input) {
|
|
4561
|
+
if (!input || typeof input !== "object") return input;
|
|
4562
|
+
const obj = input;
|
|
4563
|
+
if (obj.source === "path" && looksLikeHttpUrl(obj.path)) {
|
|
4564
|
+
const { path: _path, ...rest } = obj;
|
|
4565
|
+
return { ...rest, source: "url", url: obj.path.trim() };
|
|
4566
|
+
}
|
|
4567
|
+
return input;
|
|
4568
|
+
}
|
|
4569
|
+
var IngestParams = z5.preprocess(
|
|
4570
|
+
coercePathUrlToUrl,
|
|
4571
|
+
z5.discriminatedUnion("source", [
|
|
4572
|
+
z5.object({
|
|
4573
|
+
source: z5.literal("url"),
|
|
4574
|
+
url: z5.string().url(),
|
|
4575
|
+
expect: ExpectEnum
|
|
4576
|
+
}).strict(),
|
|
4577
|
+
z5.object({
|
|
4578
|
+
source: z5.literal("path"),
|
|
4579
|
+
path: z5.string().min(1),
|
|
4580
|
+
expect: ExpectEnum
|
|
4581
|
+
}).strict()
|
|
4582
|
+
])
|
|
4583
|
+
);
|
|
4549
4584
|
var IngestInputs = z5.object({}).strict();
|
|
4550
4585
|
var IngestOutputs = z5.object({ asset: AssetRef }).strict();
|
|
4551
4586
|
var RAW_TEXT_EXTENSIONS = [".txt", ".md"];
|
|
@@ -7744,6 +7779,7 @@ export {
|
|
|
7744
7779
|
REF_PREFIX,
|
|
7745
7780
|
parseRefExpr,
|
|
7746
7781
|
sha256Hex,
|
|
7782
|
+
looksLikeHttpUrl,
|
|
7747
7783
|
SEEDANCE_PROFILE,
|
|
7748
7784
|
clipProfileFor,
|
|
7749
7785
|
clipParamRecipe,
|
|
@@ -7762,4 +7798,4 @@ export {
|
|
|
7762
7798
|
defaultRegistry,
|
|
7763
7799
|
createEngineFromEnv
|
|
7764
7800
|
};
|
|
7765
|
-
//# sourceMappingURL=chunk-
|
|
7801
|
+
//# sourceMappingURL=chunk-Q4UI5JZN.js.map
|