@editframe/cli 0.7.0-beta.1 → 0.7.0-beta.11
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/VERSION.cjs +1 -1
- package/dist/VERSION.js +1 -1
- package/dist/commands/auth.cjs +14 -11
- package/dist/commands/auth.js +15 -12
- package/dist/commands/check.cjs +2 -2
- package/dist/commands/check.js +2 -2
- package/dist/commands/process.cjs +36 -0
- package/dist/commands/process.js +35 -0
- package/dist/commands/render.cjs +34 -25
- package/dist/commands/render.js +34 -25
- package/dist/index.cjs +1 -11
- package/dist/index.js +1 -12
- package/dist/operations/getRenderInfo.cjs +59 -0
- package/dist/operations/getRenderInfo.js +59 -0
- package/dist/operations/processRenderInfo.cjs +30 -0
- package/dist/operations/processRenderInfo.js +30 -0
- package/dist/operations/syncAssetsDirectory.cjs +83 -40
- package/dist/operations/syncAssetsDirectory.js +82 -39
- package/dist/utils/index.cjs +8 -15
- package/dist/utils/index.js +8 -15
- package/dist/utils/launchBrowserAndWaitForSDK.cjs +7 -3
- package/dist/utils/launchBrowserAndWaitForSDK.js +7 -3
- package/dist/utils/validateVideoResolution.cjs +27 -0
- package/dist/utils/validateVideoResolution.js +27 -0
- package/package.json +6 -12
- package/src/commands/auth.ts +14 -12
- package/src/commands/check.ts +2 -2
- package/src/commands/process.ts +43 -37
- package/src/commands/render.ts +32 -30
- package/src/operations/getRenderInfo.ts +80 -0
- package/src/operations/processRenderInfo.ts +37 -0
- package/src/operations/syncAssetsDirectory.ts +77 -40
- package/src/utils/index.ts +7 -16
- package/src/utils/launchBrowserAndWaitForSDK.ts +9 -3
- package/src/utils/validateVideoResolution.ts +33 -0
- package/dist/api/caption-file.cjs +0 -48
- package/dist/api/caption-file.js +0 -48
- package/dist/api/image-file.cjs +0 -49
- package/dist/api/image-file.js +0 -49
- package/dist/api/index.cjs +0 -12
- package/dist/api/index.js +0 -12
- package/dist/api/isobmff-file.cjs +0 -48
- package/dist/api/isobmff-file.js +0 -48
- package/dist/api/isobmff-track.cjs +0 -63
- package/dist/api/isobmff-track.js +0 -63
- package/dist/api/renders.cjs +0 -51
- package/dist/api/renders.js +0 -51
- package/src/api/caption-file.ts +0 -60
- package/src/api/image-file.ts +0 -58
- package/src/api/index.ts +0 -17
- package/src/api/isobmff-file.ts +0 -59
- package/src/api/isobmff-track.ts +0 -77
- package/src/api/renders.ts +0 -59
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import ora from "ora";
|
|
3
|
+
import debug from "debug";
|
|
4
|
+
const log = debug("ef:cli:auth");
|
|
5
|
+
const schema = z.object({
|
|
6
|
+
width: z.number().int(),
|
|
7
|
+
height: z.number().int()
|
|
8
|
+
}).refine((data) => data.width % 2 === 0 && data.height % 2 === 0, {
|
|
9
|
+
message: "Both width and height must be divisible by 2.",
|
|
10
|
+
path: ["width", "height"]
|
|
11
|
+
});
|
|
12
|
+
const validateVideoResolution = async (rawPayload) => {
|
|
13
|
+
const spinner = ora("Validating video resolution").start();
|
|
14
|
+
const result = schema.safeParse(rawPayload);
|
|
15
|
+
if (result.success) {
|
|
16
|
+
spinner.succeed("Video resolution is valid");
|
|
17
|
+
return result.data;
|
|
18
|
+
}
|
|
19
|
+
spinner.fail("Invalid video resolution");
|
|
20
|
+
process.stderr.write(result.error?.errors.map((e) => e.message).join("\n"));
|
|
21
|
+
process.stderr.write("\n");
|
|
22
|
+
log("Error:", result.error?.errors.map((e) => e.message).join("\n"));
|
|
23
|
+
process.exit(1);
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
validateVideoResolution
|
|
27
|
+
};
|
package/package.json
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@editframe/cli",
|
|
3
|
-
"version": "0.7.0-beta.
|
|
3
|
+
"version": "0.7.0-beta.11",
|
|
4
4
|
"description": "Command line interface for EditFrame",
|
|
5
5
|
"bin": {
|
|
6
6
|
"editframe": "./dist/index.js"
|
|
7
7
|
},
|
|
8
|
-
"exports": {
|
|
9
|
-
"./api": {
|
|
10
|
-
"import": "./dist/api/index.js",
|
|
11
|
-
"require": "./dist/api/index.cjs"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"types": "./dist/index.d.ts",
|
|
15
8
|
"type": "module",
|
|
16
9
|
"scripts": {
|
|
17
10
|
"typecheck": "tsc --noEmit --emitDeclarationOnly false",
|
|
@@ -29,13 +22,14 @@
|
|
|
29
22
|
"vite-tsconfig-paths": "^4.3.2"
|
|
30
23
|
},
|
|
31
24
|
"dependencies": {
|
|
32
|
-
"@editframe/
|
|
33
|
-
"@editframe/
|
|
34
|
-
"@editframe/
|
|
25
|
+
"@editframe/api": "0.7.0-beta.11",
|
|
26
|
+
"@editframe/assets": "0.7.0-beta.11",
|
|
27
|
+
"@editframe/elements": "0.7.0-beta.11",
|
|
28
|
+
"@editframe/vite-plugin": "0.7.0-beta.11",
|
|
35
29
|
"axios": "^1.6.8",
|
|
36
30
|
"chalk": "^5.3.0",
|
|
37
31
|
"commander": "^12.0.0",
|
|
38
|
-
"debug": "^4.3.
|
|
32
|
+
"debug": "^4.3.5",
|
|
39
33
|
"dotenv": "^16.4.5",
|
|
40
34
|
"mime": "^4.0.3",
|
|
41
35
|
"mp4box": "^0.5.2",
|
package/src/commands/auth.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { program } from "commander";
|
|
2
2
|
import ora from "ora";
|
|
3
3
|
import chalk from "chalk";
|
|
4
|
-
import
|
|
4
|
+
import debug from "debug";
|
|
5
|
+
|
|
6
|
+
import { getClient } from "../utils";
|
|
7
|
+
|
|
8
|
+
const log = debug("ef:cli:auth");
|
|
5
9
|
|
|
6
10
|
export interface APIOrgResult {
|
|
7
11
|
name: string;
|
|
@@ -13,32 +17,30 @@ export interface APIOrgResult {
|
|
|
13
17
|
}
|
|
14
18
|
|
|
15
19
|
export const getApiData = async () => {
|
|
16
|
-
const response = await authenticatedFetch("/api/org");
|
|
20
|
+
const response = await getClient().authenticatedFetch("/api/org");
|
|
17
21
|
return response.json() as Promise<APIOrgResult>;
|
|
18
22
|
};
|
|
19
23
|
|
|
20
24
|
const authCommand = program
|
|
21
25
|
.command("auth")
|
|
22
26
|
.description("Fetch organization data using API token")
|
|
23
|
-
.option("-d, --debug", "output extra debugging")
|
|
24
27
|
.action(async () => {
|
|
25
28
|
const options = authCommand.opts();
|
|
26
|
-
|
|
27
|
-
console.log("Options:", options);
|
|
28
|
-
}
|
|
29
|
+
log("Options:", options);
|
|
29
30
|
|
|
30
31
|
const spinner = ora("Loading...").start();
|
|
31
32
|
|
|
32
33
|
try {
|
|
33
34
|
const apiData = await getApiData();
|
|
34
35
|
spinner.succeed("You are authenticated! 🎉");
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
process.stderr.write(chalk.green(`Name: ${apiData.name}\n`));
|
|
37
|
+
process.stderr.write(
|
|
38
|
+
chalk.green(`Welcome to ${apiData.org_display_name}!\n`),
|
|
39
|
+
);
|
|
37
40
|
} catch (error: any) {
|
|
38
41
|
spinner.fail("Authentication failed!");
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
42
|
+
process.stderr.write(error?.message);
|
|
43
|
+
process.stderr.write("\n");
|
|
44
|
+
log("Error:", error);
|
|
43
45
|
}
|
|
44
46
|
});
|
package/src/commands/check.ts
CHANGED
|
@@ -122,8 +122,8 @@ program
|
|
|
122
122
|
);
|
|
123
123
|
} catch (error) {
|
|
124
124
|
spinner.fail(chalk.white.bgRed(` Check for ${checkName} failed `));
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
process.stderr.write(chalk.red(check.message().join("\n\n")));
|
|
126
|
+
process.stderr.write("\n");
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
});
|
package/src/commands/process.ts
CHANGED
|
@@ -1,38 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
// import type {} from "@/elements/elements";
|
|
4
|
-
// import { launchBrowserAndWaitForSDK } from "../utils/launchBrowserAndWaitForSDK";
|
|
1
|
+
import { spawnSync } from "node:child_process";
|
|
2
|
+
import path from "node:path";
|
|
5
3
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
//
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
4
|
+
import { program } from "commander";
|
|
5
|
+
|
|
6
|
+
import { withSpinner } from "../utils/withSpinner";
|
|
7
|
+
import { launchBrowserAndWaitForSDK } from "../utils/launchBrowserAndWaitForSDK";
|
|
8
|
+
import { PreviewServer } from "../utils/startPreviewServer";
|
|
9
|
+
import { getRenderInfo } from "../operations/getRenderInfo";
|
|
10
|
+
import { processRenderInfo } from "../operations/processRenderInfo";
|
|
11
|
+
|
|
12
|
+
program
|
|
13
|
+
.command("process [directory]")
|
|
14
|
+
.description(
|
|
15
|
+
"Process's a directory's index.html file, analyzing assets and processing them for rendering",
|
|
16
|
+
)
|
|
17
|
+
.action(async (directory) => {
|
|
18
|
+
directory ??= ".";
|
|
19
|
+
|
|
20
|
+
// const srcDir = path.join(directory, "src");
|
|
21
|
+
const distDir = path.join(directory, "dist");
|
|
22
|
+
await withSpinner("Building\n", async () => {
|
|
23
|
+
spawnSync("npx", ["vite", "build", directory], {
|
|
24
|
+
stdio: "inherit",
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const previewServer = await PreviewServer.start(distDir);
|
|
29
|
+
process.stderr.write("Preview server started at ");
|
|
30
|
+
process.stderr.write(previewServer.url);
|
|
31
|
+
process.stderr.write("\n");
|
|
32
|
+
await launchBrowserAndWaitForSDK(
|
|
33
|
+
{
|
|
34
|
+
url: previewServer.url,
|
|
35
|
+
efInteractive: false,
|
|
36
|
+
interactive: false,
|
|
37
|
+
headless: true,
|
|
38
|
+
},
|
|
39
|
+
async (page) => {
|
|
40
|
+
const renderInfo = await page.evaluate(getRenderInfo);
|
|
41
|
+
await processRenderInfo(renderInfo);
|
|
42
|
+
},
|
|
43
|
+
);
|
|
44
|
+
});
|
package/src/commands/render.ts
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
import { spawnSync } from "node:child_process";
|
|
2
1
|
import path from "node:path";
|
|
3
2
|
import { readFile, writeFile } from "node:fs/promises";
|
|
4
3
|
|
|
5
4
|
import * as tar from "tar";
|
|
6
5
|
import { program, Option } from "commander";
|
|
7
6
|
import { parse as parseHTML } from "node-html-parser";
|
|
7
|
+
import { build } from "vite";
|
|
8
8
|
|
|
9
9
|
import { md5Directory, md5FilePath } from "@editframe/assets";
|
|
10
|
-
import type { EFTimegroup } from "@editframe/elements";
|
|
11
10
|
|
|
12
11
|
import { withSpinner } from "../utils/withSpinner";
|
|
13
|
-
import { createRender, uploadRender } from "
|
|
12
|
+
import { createRender, uploadRender } from "@editframe/api";
|
|
14
13
|
import { launchBrowserAndWaitForSDK } from "../utils/launchBrowserAndWaitForSDK";
|
|
15
14
|
import { PreviewServer } from "../utils/startPreviewServer";
|
|
16
15
|
import { PassThrough } from "node:stream";
|
|
17
16
|
import { syncAssetDirectory } from "../operations/syncAssetsDirectory";
|
|
17
|
+
import { getClient } from "../utils";
|
|
18
|
+
import { getRenderInfo } from "../operations/getRenderInfo";
|
|
19
|
+
import { processRenderInfo } from "../operations/processRenderInfo";
|
|
20
|
+
import { inspect } from "node:util";
|
|
21
|
+
import { validateVideoResolution } from "../utils/validateVideoResolution";
|
|
18
22
|
|
|
19
23
|
interface StrategyBuilder {
|
|
20
24
|
buildProductionUrl: (tagName: string, assetPath: string) => Promise<string>;
|
|
@@ -87,13 +91,21 @@ program
|
|
|
87
91
|
return;
|
|
88
92
|
}
|
|
89
93
|
await withSpinner("Building\n", async () => {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
94
|
+
try {
|
|
95
|
+
await build({
|
|
96
|
+
root: directory,
|
|
97
|
+
logLevel: "info", // Optional: adjust log level as needed
|
|
98
|
+
clearScreen: false, // Optional: keep console output clean
|
|
99
|
+
});
|
|
100
|
+
} catch (error) {
|
|
101
|
+
console.error("Build failed:", error);
|
|
102
|
+
}
|
|
93
103
|
});
|
|
94
104
|
|
|
95
105
|
const previewServer = await PreviewServer.start(distDir);
|
|
96
|
-
|
|
106
|
+
process.stderr.write("Preview server started at:");
|
|
107
|
+
process.stderr.write(previewServer.url);
|
|
108
|
+
process.stderr.write("\n");
|
|
97
109
|
await launchBrowserAndWaitForSDK(
|
|
98
110
|
{
|
|
99
111
|
url: previewServer.url,
|
|
@@ -102,26 +114,15 @@ program
|
|
|
102
114
|
headless: true,
|
|
103
115
|
},
|
|
104
116
|
async (page) => {
|
|
105
|
-
const renderInfo = await page.evaluate(
|
|
106
|
-
const rootTimeGroup = document.querySelector("ef-timegroup") as
|
|
107
|
-
| EFTimegroup
|
|
108
|
-
| undefined;
|
|
109
|
-
if (!rootTimeGroup) {
|
|
110
|
-
throw new Error("No ef-timegroup found");
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
console.log("Waiting for media durations", rootTimeGroup);
|
|
114
|
-
await rootTimeGroup.waitForMediaDurations();
|
|
115
|
-
|
|
116
|
-
const width = rootTimeGroup.clientWidth;
|
|
117
|
-
const height = rootTimeGroup.clientHeight;
|
|
118
|
-
const fps = 30;
|
|
119
|
-
const durationMs = Math.round(rootTimeGroup.durationMs);
|
|
117
|
+
const renderInfo = await page.evaluate(getRenderInfo);
|
|
120
118
|
|
|
121
|
-
|
|
119
|
+
validateVideoResolution({
|
|
120
|
+
width: renderInfo.width,
|
|
121
|
+
height: renderInfo.height,
|
|
122
122
|
});
|
|
123
123
|
|
|
124
|
-
|
|
124
|
+
await processRenderInfo(renderInfo);
|
|
125
|
+
|
|
125
126
|
const doc = parseHTML(
|
|
126
127
|
await readFile(path.join(distDir, "index.html"), "utf-8"),
|
|
127
128
|
);
|
|
@@ -147,7 +148,7 @@ program
|
|
|
147
148
|
await writeFile(path.join(distDir, "index.html"), doc.toString());
|
|
148
149
|
|
|
149
150
|
const md5 = await md5Directory(distDir);
|
|
150
|
-
const render = await createRender({
|
|
151
|
+
const render = await createRender(getClient(), {
|
|
151
152
|
id: md5,
|
|
152
153
|
width: renderInfo.width,
|
|
153
154
|
height: renderInfo.height,
|
|
@@ -157,8 +158,8 @@ program
|
|
|
157
158
|
strategy: options.strategy,
|
|
158
159
|
});
|
|
159
160
|
if (render?.status !== "created") {
|
|
160
|
-
|
|
161
|
-
`Render is in '${render?.status}' status. It cannot be recreated while in this status
|
|
161
|
+
process.stderr.write(
|
|
162
|
+
`Render is in '${render?.status}' status. It cannot be recreated while in this status.\n`,
|
|
162
163
|
);
|
|
163
164
|
return;
|
|
164
165
|
}
|
|
@@ -178,9 +179,10 @@ program
|
|
|
178
179
|
);
|
|
179
180
|
const readable = new PassThrough();
|
|
180
181
|
tarStream.pipe(readable);
|
|
181
|
-
await uploadRender(md5, readable);
|
|
182
|
-
|
|
183
|
-
|
|
182
|
+
await uploadRender(getClient(), md5, readable);
|
|
183
|
+
process.stderr.write("Render assets uploaded\n");
|
|
184
|
+
process.stderr.write(inspect(render));
|
|
185
|
+
process.stderr.write("\n");
|
|
184
186
|
},
|
|
185
187
|
);
|
|
186
188
|
});
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THIS MODULE DOESNT USE THE DEBUG LOGGER BECAUSE IT IS
|
|
3
|
+
* RUN IN A WEB BROWSER. LOGS ARE CAPTURED AND RE-LOGGED.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type {
|
|
7
|
+
EFCaptions,
|
|
8
|
+
EFImage,
|
|
9
|
+
EFMedia,
|
|
10
|
+
EFTimegroup,
|
|
11
|
+
} from "@editframe/elements";
|
|
12
|
+
|
|
13
|
+
export const getRenderInfo = async () => {
|
|
14
|
+
const rootTimeGroup = document.querySelector("ef-timegroup") as
|
|
15
|
+
| EFTimegroup
|
|
16
|
+
| undefined;
|
|
17
|
+
if (!rootTimeGroup) {
|
|
18
|
+
throw new Error("No ef-timegroup found");
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
console.error("Waiting for media durations", rootTimeGroup);
|
|
22
|
+
await rootTimeGroup.waitForMediaDurations();
|
|
23
|
+
|
|
24
|
+
const width = rootTimeGroup.clientWidth;
|
|
25
|
+
const height = rootTimeGroup.clientHeight;
|
|
26
|
+
const fps = 30;
|
|
27
|
+
const durationMs = Math.round(rootTimeGroup.durationMs);
|
|
28
|
+
|
|
29
|
+
const elements = document.querySelectorAll(
|
|
30
|
+
"ef-audio, ef-video, ef-image, ef-captions",
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
const assets = {
|
|
34
|
+
efMedia: <Record<string, any>>{},
|
|
35
|
+
efCaptions: new Set<string>(),
|
|
36
|
+
efImage: new Set<string>(),
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
for (const element of elements) {
|
|
40
|
+
switch (element.tagName) {
|
|
41
|
+
case "EF-AUDIO":
|
|
42
|
+
case "EF-VIDEO": {
|
|
43
|
+
const src = (element as EFMedia).src;
|
|
44
|
+
console.error("Processing element", element.tagName, src);
|
|
45
|
+
assets.efMedia[src] = (
|
|
46
|
+
element as EFMedia
|
|
47
|
+
).trackFragmentIndexLoader.value;
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
case "EF-IMAGE": {
|
|
51
|
+
const src = (element as EFImage).src;
|
|
52
|
+
console.error("Processing element", element.tagName, src);
|
|
53
|
+
assets.efImage.add(src);
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
case "EF-CAPTIONS": {
|
|
57
|
+
const src = (element as EFCaptions).targetElement?.src;
|
|
58
|
+
console.error("Processing element", element.tagName, src);
|
|
59
|
+
assets.efCaptions.add(src);
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const renderInfo = {
|
|
66
|
+
width,
|
|
67
|
+
height,
|
|
68
|
+
fps,
|
|
69
|
+
durationMs,
|
|
70
|
+
assets: {
|
|
71
|
+
efMedia: assets.efMedia,
|
|
72
|
+
efCaptions: Array.from(assets.efCaptions),
|
|
73
|
+
efImage: Array.from(assets.efImage),
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
console.error("Render info", renderInfo);
|
|
78
|
+
|
|
79
|
+
return renderInfo;
|
|
80
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import {
|
|
2
|
+
generateTrack,
|
|
3
|
+
cacheImage,
|
|
4
|
+
findOrCreateCaptions,
|
|
5
|
+
} from "@editframe/assets";
|
|
6
|
+
import type { getRenderInfo } from "./getRenderInfo";
|
|
7
|
+
|
|
8
|
+
export const processRenderInfo = async (
|
|
9
|
+
renderInfo: Awaited<ReturnType<typeof getRenderInfo>>,
|
|
10
|
+
) => {
|
|
11
|
+
for (const [src, tracks] of Object.entries(renderInfo.assets.efMedia)) {
|
|
12
|
+
process.stderr.write("Processing media asset: ");
|
|
13
|
+
process.stderr.write(src);
|
|
14
|
+
process.stderr.write("\n");
|
|
15
|
+
for (const trackId in tracks) {
|
|
16
|
+
await generateTrack(
|
|
17
|
+
"./src/assets",
|
|
18
|
+
`./src${src}`,
|
|
19
|
+
`src?trackId=${trackId}`,
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
for (const imageAsset of renderInfo.assets.efImage) {
|
|
25
|
+
process.stderr.write("Processing image asset: ");
|
|
26
|
+
process.stderr.write(imageAsset);
|
|
27
|
+
process.stderr.write("\n");
|
|
28
|
+
await cacheImage("./src/assets", `./src${imageAsset}`);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
for (const captionsAsset of renderInfo.assets.efCaptions) {
|
|
32
|
+
process.stderr.write("Processing captions asset: ");
|
|
33
|
+
process.stderr.write(captionsAsset);
|
|
34
|
+
process.stderr.write("\n");
|
|
35
|
+
await findOrCreateCaptions("./src/assets", `./src${captionsAsset}`);
|
|
36
|
+
}
|
|
37
|
+
};
|