@koda-sl/baker-cli 0.403.0 → 0.404.0
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/README.md +15 -0
- package/canvas/static-ad-composition/index.html +573 -10
- package/canvas/static-ad-composition/meta.json +1 -0
- package/dist/{chunk-X7PLV5QH.js → chunk-KE6GXLDE.js} +11 -3
- package/dist/{chunk-X7PLV5QH.js.map → chunk-KE6GXLDE.js.map} +1 -1
- package/dist/cli.js +2854 -2461
- package/dist/cli.js.map +1 -1
- package/dist/engine/index.js +1 -1
- package/package.json +1 -1
|
@@ -8804,7 +8804,12 @@ var CompositionMetaSchema = z12.object({
|
|
|
8804
8804
|
fps: z12.number().int().positive().default(30),
|
|
8805
8805
|
default_duration: z12.number().positive().default(10),
|
|
8806
8806
|
inputs: z12.record(z12.string(), InputSpec).default({}),
|
|
8807
|
-
params: z12.record(z12.string(), ParamSpec).default({})
|
|
8807
|
+
params: z12.record(z12.string(), ParamSpec).default({}),
|
|
8808
|
+
/**
|
|
8809
|
+
* The page reads its own staged files (a picture's pixels), so a snapshot opens it with
|
|
8810
|
+
* file access. Off by default: Chromium grants it for every file:// path, not just these.
|
|
8811
|
+
*/
|
|
8812
|
+
reads_staged_files: z12.boolean().optional()
|
|
8808
8813
|
}).strict();
|
|
8809
8814
|
async function loadCompositionMeta(compositionDir) {
|
|
8810
8815
|
const metaPath = path13.join(compositionDir, "meta.json");
|
|
@@ -9835,7 +9840,7 @@ var hyperframeSnapshotNode = defineNode({
|
|
|
9835
9840
|
const pwSpecifier = ["play", "wright"].join("");
|
|
9836
9841
|
const playwright = require_3(pwSpecifier);
|
|
9837
9842
|
const { chromium } = playwright;
|
|
9838
|
-
const browser = await chromium.launch({ headless: true });
|
|
9843
|
+
const browser = await chromium.launch({ headless: true, args: chromiumArgsFor(meta) });
|
|
9839
9844
|
try {
|
|
9840
9845
|
const context = await browser.newContext({
|
|
9841
9846
|
viewport: { width: meta.width, height: meta.height },
|
|
@@ -9871,6 +9876,9 @@ var hyperframeSnapshotNode = defineNode({
|
|
|
9871
9876
|
}
|
|
9872
9877
|
}
|
|
9873
9878
|
});
|
|
9879
|
+
function chromiumArgsFor(meta) {
|
|
9880
|
+
return meta.reads_staged_files ? ["--allow-file-access-from-files"] : [];
|
|
9881
|
+
}
|
|
9874
9882
|
function validateAndParseDynamicParams2(meta, params) {
|
|
9875
9883
|
const dynamic = {};
|
|
9876
9884
|
for (const [k, v] of Object.entries(params)) {
|
|
@@ -11660,4 +11668,4 @@ export {
|
|
|
11660
11668
|
defaultRegistry,
|
|
11661
11669
|
createEngineFromEnv
|
|
11662
11670
|
};
|
|
11663
|
-
//# sourceMappingURL=chunk-
|
|
11671
|
+
//# sourceMappingURL=chunk-KE6GXLDE.js.map
|