@editframe/cli 0.23.8-beta.0 → 0.25.0-beta.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/dist/VERSION.js +5 -1
- package/dist/VERSION.js.map +1 -0
- package/dist/commands/auth.js +8 -3
- package/dist/commands/auth.js.map +1 -0
- package/dist/commands/check.js +7 -2
- package/dist/commands/check.js.map +1 -0
- package/dist/commands/preview.js +6 -1
- package/dist/commands/preview.js.map +1 -0
- package/dist/commands/process-file.js +6 -1
- package/dist/commands/process-file.js.map +1 -0
- package/dist/commands/process.js +6 -1
- package/dist/commands/process.js.map +1 -0
- package/dist/commands/render.js +14 -2
- package/dist/commands/render.js.map +1 -0
- package/dist/commands/sync.js +6 -1
- package/dist/commands/sync.js.map +1 -0
- package/dist/commands/webhook.js +9 -4
- package/dist/commands/webhook.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -0
- package/dist/operations/processRenderInfo.js +5 -0
- package/dist/operations/processRenderInfo.js.map +1 -0
- package/dist/operations/syncAssetsDirectory/SubAssetSync.js +10 -5
- package/dist/operations/syncAssetsDirectory/SubAssetSync.js.map +1 -0
- package/dist/operations/syncAssetsDirectory/SyncCaption.js +5 -0
- package/dist/operations/syncAssetsDirectory/SyncCaption.js.map +1 -0
- package/dist/operations/syncAssetsDirectory/SyncFragmentIndex.js +5 -0
- package/dist/operations/syncAssetsDirectory/SyncFragmentIndex.js.map +1 -0
- package/dist/operations/syncAssetsDirectory/SyncImage.js +5 -0
- package/dist/operations/syncAssetsDirectory/SyncImage.js.map +1 -0
- package/dist/operations/syncAssetsDirectory/SyncStatus.js +7 -2
- package/dist/operations/syncAssetsDirectory/SyncStatus.js.map +1 -0
- package/dist/operations/syncAssetsDirectory/SyncTrack.js +5 -0
- package/dist/operations/syncAssetsDirectory/SyncTrack.js.map +1 -0
- package/dist/operations/syncAssetsDirectory/doAssetSync.js +4 -0
- package/dist/operations/syncAssetsDirectory/doAssetSync.js.map +1 -0
- package/dist/operations/syncAssetsDirectory.js +5 -0
- package/dist/operations/syncAssetsDirectory.js.map +1 -0
- package/dist/utils/createReadableStreamFromReadable.js +5 -0
- package/dist/utils/createReadableStreamFromReadable.js.map +1 -0
- package/dist/utils/index.js +6 -1
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/launchBrowserAndWaitForSDK.js +6 -1
- package/dist/utils/launchBrowserAndWaitForSDK.js.map +1 -0
- package/dist/utils/startPreviewServer.js +7 -2
- package/dist/utils/startPreviewServer.js.map +1 -0
- package/dist/utils/validateVideoResolution.js +7 -2
- package/dist/utils/validateVideoResolution.js.map +1 -0
- package/dist/utils/withSpinner.js +5 -0
- package/dist/utils/withSpinner.js.map +1 -0
- package/package.json +16 -16
- package/src/utils/startDevServer.ts +1 -1
- package/src/utils/startPreviewServer.ts +1 -1
- package/tsdown.config.ts +20 -0
- package/dist/VERSION.d.ts +0 -1
- package/dist/commands/auth.d.ts +0 -9
- package/dist/commands/check.d.ts +0 -1
- package/dist/commands/mux.d.ts +0 -1
- package/dist/commands/preview.d.ts +0 -1
- package/dist/commands/process-file.d.ts +0 -1
- package/dist/commands/process.d.ts +0 -1
- package/dist/commands/render.d.ts +0 -1
- package/dist/commands/sync.d.ts +0 -1
- package/dist/commands/webhook.d.ts +0 -7
- package/dist/operations/processRenderInfo.d.ts +0 -2
- package/dist/operations/syncAssetsDirectory/SubAssetSync.d.ts +0 -20
- package/dist/operations/syncAssetsDirectory/SyncCaption.d.ts +0 -19
- package/dist/operations/syncAssetsDirectory/SyncCaption.test.d.ts +0 -1
- package/dist/operations/syncAssetsDirectory/SyncFragmentIndex.d.ts +0 -20
- package/dist/operations/syncAssetsDirectory/SyncFragmentIndex.test.d.ts +0 -1
- package/dist/operations/syncAssetsDirectory/SyncImage.d.ts +0 -23
- package/dist/operations/syncAssetsDirectory/SyncImage.test.d.ts +0 -1
- package/dist/operations/syncAssetsDirectory/SyncStatus.d.ts +0 -37
- package/dist/operations/syncAssetsDirectory/SyncTrack.d.ts +0 -78
- package/dist/operations/syncAssetsDirectory/SyncTrack.test.d.ts +0 -1
- package/dist/operations/syncAssetsDirectory/doAssetSync.d.ts +0 -5
- package/dist/operations/syncAssetsDirectory/doAssetSync.test.d.ts +0 -1
- package/dist/operations/syncAssetsDirectory.d.ts +0 -1
- package/dist/operations/syncAssetsDirectory.test.d.ts +0 -1
- package/dist/utils/attachWorkbench.d.ts +0 -2
- package/dist/utils/createReadableStreamFromReadable.d.ts +0 -4
- package/dist/utils/getFolderSize.d.ts +0 -1
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/launchBrowserAndWaitForSDK.d.ts +0 -9
- package/dist/utils/startDevServer.d.ts +0 -7
- package/dist/utils/startPreviewServer.d.ts +0 -7
- package/dist/utils/validateVideoResolution.d.ts +0 -9
- package/dist/utils/withSpinner.d.ts +0 -1
package/dist/utils/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import "dotenv/config";
|
|
2
2
|
import { program } from "commander";
|
|
3
3
|
import { Client } from "@editframe/api";
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
//#region src/utils/index.ts
|
|
6
|
+
let client;
|
|
5
7
|
const getClient = () => {
|
|
6
8
|
if (!client) {
|
|
7
9
|
const programOpts = program.opts();
|
|
@@ -12,4 +14,7 @@ const getClient = () => {
|
|
|
12
14
|
}
|
|
13
15
|
return client;
|
|
14
16
|
};
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
15
19
|
export { getClient };
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["client: Client"],"sources":["../../src/utils/index.ts"],"sourcesContent":["import { program } from \"commander\";\nimport \"dotenv/config\";\nimport { Client } from \"@editframe/api\";\n\nlet client: Client;\n\nexport const getClient = () => {\n if (!client) {\n const programOpts = program.opts();\n const token = programOpts.token || process.env.EF_TOKEN;\n const efHost = programOpts.efHost || process.env.EF_HOST;\n if (!token) {\n throw new Error(\n \"EF_TOKEN must be set or supplied as command line argument\",\n );\n }\n client = new Client(token, efHost);\n }\n return client;\n};\n"],"mappings":";;;;;AAIA,IAAIA;AAEJ,MAAa,kBAAkB;AAC7B,KAAI,CAAC,QAAQ;EACX,MAAM,cAAc,QAAQ,MAAM;EAClC,MAAM,QAAQ,YAAY,SAAS,QAAQ,IAAI;EAC/C,MAAM,SAAS,YAAY,UAAU,QAAQ,IAAI;AACjD,MAAI,CAAC,MACH,OAAM,IAAI,MACR,4DACD;AAEH,WAAS,IAAI,OAAO,OAAO,OAAO;;AAEpC,QAAO"}
|
|
@@ -2,7 +2,9 @@ import { withSpinner } from "./withSpinner.js";
|
|
|
2
2
|
import chalk from "chalk";
|
|
3
3
|
import debug from "debug";
|
|
4
4
|
import { chromium } from "playwright";
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
//#region src/utils/launchBrowserAndWaitForSDK.ts
|
|
7
|
+
const browserLog = debug("ef:cli::browser");
|
|
6
8
|
async function launchBrowserAndWaitForSDK(options, fn) {
|
|
7
9
|
const browser = await withSpinner("Launching chrome", async () => {
|
|
8
10
|
return chromium.launch({
|
|
@@ -33,4 +35,7 @@ async function launchBrowserAndWaitForSDK(options, fn) {
|
|
|
33
35
|
process.exit(0);
|
|
34
36
|
}
|
|
35
37
|
}
|
|
38
|
+
|
|
39
|
+
//#endregion
|
|
36
40
|
export { launchBrowserAndWaitForSDK };
|
|
41
|
+
//# sourceMappingURL=launchBrowserAndWaitForSDK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"launchBrowserAndWaitForSDK.js","names":["pageOptions: Parameters<Browser[\"newPage\"]>[0]"],"sources":["../../src/utils/launchBrowserAndWaitForSDK.ts"],"sourcesContent":["import chalk from \"chalk\";\nimport debug from \"debug\";\nimport { type Browser, chromium, type Page } from \"playwright\";\n\nimport { withSpinner } from \"./withSpinner.js\";\n\nconst browserLog = debug(\"ef:cli::browser\");\n\ninterface LaunchOptions {\n url: string;\n headless?: boolean;\n interactive?: boolean;\n efInteractive?: boolean;\n}\n\nexport async function launchBrowserAndWaitForSDK(\n options: LaunchOptions,\n fn: (page: Page) => Promise<void>,\n) {\n const browser = await withSpinner(\"Launching chrome\", async () => {\n return chromium.launch({\n channel: \"chrome\",\n headless: options.headless ?? true,\n // headless: false,\n devtools: options.interactive === true,\n });\n });\n\n const page = await withSpinner(\"Loading Editframe SDK\", async () => {\n const pageOptions: Parameters<Browser[\"newPage\"]>[0] = {};\n if (options.interactive === true) {\n // By default, playwright uses its own viewport, so resizing the browser window\n // doesn't actually change the viewport. And the gui doesn't scale to fit.\n // This is not desirable for interactive mode, so we disable the viewport feature.\n pageOptions.viewport = null;\n }\n const page = await browser.newPage(pageOptions);\n page.on(\"console\", (msg) => {\n browserLog(chalk.blue(`browser (${msg.type()}) |`), msg.text());\n });\n const url =\n options.url + (options.efInteractive ? \"\" : \"?EF_NONINTERACTIVE=1\");\n process.stderr.write(\"\\nLoading url: \");\n process.stderr.write(url);\n process.stderr.write(\"\\n\");\n await page.goto(url);\n await page.waitForFunction(\n () => {\n return (\n // @ts-expect-error\n window.EF_REGISTERED\n );\n },\n [],\n { timeout: 10_000 },\n );\n return page;\n });\n await fn(page);\n if (options.interactive !== true) {\n await browser.close();\n process.exit(0);\n }\n}\n"],"mappings":";;;;;;AAMA,MAAM,aAAa,MAAM,kBAAkB;AAS3C,eAAsB,2BACpB,SACA,IACA;CACA,MAAM,UAAU,MAAM,YAAY,oBAAoB,YAAY;AAChE,SAAO,SAAS,OAAO;GACrB,SAAS;GACT,UAAU,QAAQ,YAAY;GAE9B,UAAU,QAAQ,gBAAgB;GACnC,CAAC;GACF;AAgCF,OAAM,GA9BO,MAAM,YAAY,yBAAyB,YAAY;EAClE,MAAMA,cAAiD,EAAE;AACzD,MAAI,QAAQ,gBAAgB,KAI1B,aAAY,WAAW;EAEzB,MAAM,OAAO,MAAM,QAAQ,QAAQ,YAAY;AAC/C,OAAK,GAAG,YAAY,QAAQ;AAC1B,cAAW,MAAM,KAAK,YAAY,IAAI,MAAM,CAAC,KAAK,EAAE,IAAI,MAAM,CAAC;IAC/D;EACF,MAAM,MACJ,QAAQ,OAAO,QAAQ,gBAAgB,KAAK;AAC9C,UAAQ,OAAO,MAAM,kBAAkB;AACvC,UAAQ,OAAO,MAAM,IAAI;AACzB,UAAQ,OAAO,MAAM,KAAK;AAC1B,QAAM,KAAK,KAAK,IAAI;AACpB,QAAM,KAAK,sBACH;AACJ,UAEE,OAAO;KAGX,EAAE,EACF,EAAE,SAAS,KAAQ,CACpB;AACD,SAAO;GACP,CACY;AACd,KAAI,QAAQ,gBAAgB,MAAM;AAChC,QAAM,QAAQ,OAAO;AACrB,UAAQ,KAAK,EAAE"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { withSpinner } from "./withSpinner.js";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { vitePluginEditframe } from "@editframe/vite-plugin";
|
|
4
|
-
import { createServer } from "
|
|
4
|
+
import { createServer } from "vite";
|
|
5
|
+
|
|
6
|
+
//#region src/utils/startPreviewServer.ts
|
|
5
7
|
var PreviewServer = class PreviewServer {
|
|
6
8
|
static async start(directory) {
|
|
7
9
|
return new PreviewServer(await startPreviewServer(directory));
|
|
@@ -13,7 +15,7 @@ var PreviewServer = class PreviewServer {
|
|
|
13
15
|
return `http://localhost:${this.previewServer.config.server.port}`;
|
|
14
16
|
}
|
|
15
17
|
};
|
|
16
|
-
|
|
18
|
+
const startPreviewServer = async (directory) => {
|
|
17
19
|
return await withSpinner("Starting vite...", async () => {
|
|
18
20
|
const resolvedDirectory = path.resolve(process.cwd(), directory);
|
|
19
21
|
const devServer = await createServer({
|
|
@@ -28,4 +30,7 @@ var startPreviewServer = async (directory) => {
|
|
|
28
30
|
return devServer;
|
|
29
31
|
});
|
|
30
32
|
};
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
31
35
|
export { PreviewServer };
|
|
36
|
+
//# sourceMappingURL=startPreviewServer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"startPreviewServer.js","names":["previewServer: ViteDevServer","editframe"],"sources":["../../src/utils/startPreviewServer.ts"],"sourcesContent":["import path from \"node:path\";\nimport { vitePluginEditframe as editframe } from \"@editframe/vite-plugin\";\nimport { createServer, type ViteDevServer } from \"vite\";\n\nimport { withSpinner } from \"./withSpinner.js\";\n\nexport class PreviewServer {\n static async start(directory: string) {\n return new PreviewServer(await startPreviewServer(directory));\n }\n\n constructor(private previewServer: ViteDevServer) {}\n\n get url() {\n return `http://localhost:${this.previewServer.config.server.port}`;\n }\n}\n\nconst startPreviewServer = async (directory: string) => {\n return await withSpinner(\"Starting vite...\", async () => {\n const resolvedDirectory = path.resolve(process.cwd(), directory);\n const cacheRoot = path.join(resolvedDirectory, \"assets\");\n const devServer = await createServer({\n server: {\n watch: null,\n },\n root: resolvedDirectory,\n plugins: [\n editframe({\n root: resolvedDirectory,\n cacheRoot,\n }),\n ],\n });\n await devServer.listen();\n return devServer;\n });\n};\n"],"mappings":";;;;;;AAMA,IAAa,gBAAb,MAAa,cAAc;CACzB,aAAa,MAAM,WAAmB;AACpC,SAAO,IAAI,cAAc,MAAM,mBAAmB,UAAU,CAAC;;CAG/D,YAAY,AAAQA,eAA8B;EAA9B;;CAEpB,IAAI,MAAM;AACR,SAAO,oBAAoB,KAAK,cAAc,OAAO,OAAO;;;AAIhE,MAAM,qBAAqB,OAAO,cAAsB;AACtD,QAAO,MAAM,YAAY,oBAAoB,YAAY;EACvD,MAAM,oBAAoB,KAAK,QAAQ,QAAQ,KAAK,EAAE,UAAU;EAEhE,MAAM,YAAY,MAAM,aAAa;GACnC,QAAQ,EACN,OAAO,MACR;GACD,MAAM;GACN,SAAS,CACPC,oBAAU;IACR,MAAM;IACN,WATY,KAAK,KAAK,mBAAmB,SAAS;IAUnD,CAAC,CACH;GACF,CAAC;AACF,QAAM,UAAU,QAAQ;AACxB,SAAO;GACP"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import debug from "debug";
|
|
2
2
|
import ora from "ora";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
|
|
5
|
+
//#region src/utils/validateVideoResolution.ts
|
|
6
|
+
const log = debug("ef:cli:validateVideoResolution");
|
|
7
|
+
const schema = z.object({
|
|
6
8
|
width: z.number().int(),
|
|
7
9
|
height: z.number().int()
|
|
8
10
|
}).refine((data) => data.width % 2 === 0, {
|
|
@@ -22,4 +24,7 @@ const validateVideoResolution = async (rawPayload) => {
|
|
|
22
24
|
log("Error:", result.error?.errors.map((e) => e.message).join("\n"));
|
|
23
25
|
process.exit(1);
|
|
24
26
|
};
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
25
29
|
export { validateVideoResolution };
|
|
30
|
+
//# sourceMappingURL=validateVideoResolution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateVideoResolution.js","names":[],"sources":["../../src/utils/validateVideoResolution.ts"],"sourcesContent":["import debug from \"debug\";\nimport ora from \"ora\";\nimport { z } from \"zod\";\n\nconst log = debug(\"ef:cli:validateVideoResolution\");\n\ntype VideoPayload = {\n width: number;\n height: number;\n};\n\nconst schema = z\n .object({\n width: z.number().int(),\n height: z.number().int(),\n })\n .refine((data) => data.width % 2 === 0, {\n message: \"Width must be divisible by 2\",\n path: [\"width\"],\n })\n .refine((data) => data.height % 2 === 0, {\n message: \"Height must be divisible by 2\",\n });\nexport const validateVideoResolution = async (rawPayload: VideoPayload) => {\n const spinner = ora(\"Validating video resolution\").start();\n const result = schema.safeParse(rawPayload);\n if (result.success) {\n spinner.succeed(\"Video resolution is valid\");\n return result.data;\n }\n spinner.fail(\"Invalid video resolution\");\n process.stderr.write(result.error?.errors.map((e) => e.message).join(\"\\n\"));\n process.stderr.write(\"\\n\");\n log(\"Error:\", result.error?.errors.map((e) => e.message).join(\"\\n\"));\n process.exit(1);\n};\n"],"mappings":";;;;;AAIA,MAAM,MAAM,MAAM,iCAAiC;AAOnD,MAAM,SAAS,EACZ,OAAO;CACN,OAAO,EAAE,QAAQ,CAAC,KAAK;CACvB,QAAQ,EAAE,QAAQ,CAAC,KAAK;CACzB,CAAC,CACD,QAAQ,SAAS,KAAK,QAAQ,MAAM,GAAG;CACtC,SAAS;CACT,MAAM,CAAC,QAAQ;CAChB,CAAC,CACD,QAAQ,SAAS,KAAK,SAAS,MAAM,GAAG,EACvC,SAAS,iCACV,CAAC;AACJ,MAAa,0BAA0B,OAAO,eAA6B;CACzE,MAAM,UAAU,IAAI,8BAA8B,CAAC,OAAO;CAC1D,MAAM,SAAS,OAAO,UAAU,WAAW;AAC3C,KAAI,OAAO,SAAS;AAClB,UAAQ,QAAQ,4BAA4B;AAC5C,SAAO,OAAO;;AAEhB,SAAQ,KAAK,2BAA2B;AACxC,SAAQ,OAAO,MAAM,OAAO,OAAO,OAAO,KAAK,MAAM,EAAE,QAAQ,CAAC,KAAK,KAAK,CAAC;AAC3E,SAAQ,OAAO,MAAM,KAAK;AAC1B,KAAI,UAAU,OAAO,OAAO,OAAO,KAAK,MAAM,EAAE,QAAQ,CAAC,KAAK,KAAK,CAAC;AACpE,SAAQ,KAAK,EAAE"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import ora from "ora";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/withSpinner.ts
|
|
2
4
|
const withSpinner = async (label, fn) => {
|
|
3
5
|
const spinner = ora(label).start();
|
|
4
6
|
try {
|
|
@@ -10,4 +12,7 @@ const withSpinner = async (label, fn) => {
|
|
|
10
12
|
throw error;
|
|
11
13
|
}
|
|
12
14
|
};
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
13
17
|
export { withSpinner };
|
|
18
|
+
//# sourceMappingURL=withSpinner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withSpinner.js","names":[],"sources":["../../src/utils/withSpinner.ts"],"sourcesContent":["import ora from \"ora\";\n\nexport const withSpinner = async <T extends any | undefined>(\n label: string,\n fn: () => Promise<T>,\n) => {\n const spinner = ora(label).start();\n try {\n const result = await fn();\n spinner.succeed();\n return result;\n } catch (error) {\n spinner.fail();\n throw error;\n }\n};\n"],"mappings":";;;AAEA,MAAa,cAAc,OACzB,OACA,OACG;CACH,MAAM,UAAU,IAAI,MAAM,CAAC,OAAO;AAClC,KAAI;EACF,MAAM,SAAS,MAAM,IAAI;AACzB,UAAQ,SAAS;AACjB,SAAO;UACA,OAAO;AACd,UAAQ,MAAM;AACd,QAAM"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@editframe/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0-beta.0",
|
|
4
4
|
"description": "Command line interface for EditFrame",
|
|
5
5
|
"bin": {
|
|
6
6
|
"editframe": "./dist/index.js"
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"type": "module",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"typecheck": "tsc --noEmit --emitDeclarationOnly false",
|
|
11
|
-
"build": "
|
|
12
|
-
"build:watch": "
|
|
11
|
+
"build": "tsdown",
|
|
12
|
+
"build:watch": "tsdown --watch"
|
|
13
13
|
},
|
|
14
14
|
"author": "",
|
|
15
15
|
"license": "UNLICENSED",
|
|
@@ -18,31 +18,31 @@
|
|
|
18
18
|
"@types/node": "^20.14.13",
|
|
19
19
|
"@types/promptly": "^3.0.5",
|
|
20
20
|
"@types/tar": "^6.1.13",
|
|
21
|
-
"typescript": "^5.5.4"
|
|
22
|
-
"vite-plugin-dts": "^4.5.4",
|
|
23
|
-
"vite-tsconfig-paths": "^4.3.2"
|
|
21
|
+
"typescript": "^5.5.4"
|
|
24
22
|
},
|
|
25
23
|
"dependencies": {
|
|
26
|
-
"@editframe/api": "0.
|
|
27
|
-
"@editframe/assets": "0.
|
|
28
|
-
"@editframe/elements": "0.
|
|
29
|
-
"@editframe/vite-plugin": "0.
|
|
24
|
+
"@editframe/api": "0.25.0-beta.0",
|
|
25
|
+
"@editframe/assets": "0.25.0-beta.0",
|
|
26
|
+
"@editframe/elements": "0.25.0-beta.0",
|
|
27
|
+
"@editframe/vite-plugin": "0.25.0-beta.0",
|
|
30
28
|
"@inquirer/prompts": "^5.3.8",
|
|
31
|
-
"axios": "^1.6.8",
|
|
32
29
|
"chalk": "^5.3.0",
|
|
33
30
|
"commander": "^12.0.0",
|
|
34
31
|
"debug": "^4.3.5",
|
|
35
32
|
"dotenv": "^16.4.5",
|
|
36
|
-
"mime": "^4.0.3",
|
|
37
|
-
"node-fetch": "^3.3.2",
|
|
38
33
|
"node-html-parser": "^6.1.13",
|
|
39
34
|
"ora": "^8.0.1",
|
|
40
|
-
"parse5-html-rewriting-stream": "^7.0.0",
|
|
41
35
|
"playwright": "^1.53.0",
|
|
42
|
-
"promptly": "^3.2.0",
|
|
43
|
-
"rolldown-vite": "^7.1.15",
|
|
44
36
|
"tailwindcss": "^3.4.3",
|
|
37
|
+
"vite": "npm:rolldown-vite@^7.1.15",
|
|
45
38
|
"tar": "^7.1.0",
|
|
46
39
|
"zod": "^3.23.8"
|
|
40
|
+
},
|
|
41
|
+
"main": "./dist/index.js",
|
|
42
|
+
"module": "./dist/index.js",
|
|
43
|
+
"types": "./dist/index.d.ts",
|
|
44
|
+
"exports": {
|
|
45
|
+
".": "./dist/index.js",
|
|
46
|
+
"./package.json": "./package.json"
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { vitePluginEditframe as editframe } from "@editframe/vite-plugin";
|
|
3
|
-
import { createServer, type ViteDevServer } from "rolldown-vite";
|
|
4
3
|
import tailwindcss from "tailwindcss";
|
|
4
|
+
import { createServer, type ViteDevServer } from "vite";
|
|
5
5
|
|
|
6
6
|
import { withSpinner } from "./withSpinner.js";
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { vitePluginEditframe as editframe } from "@editframe/vite-plugin";
|
|
3
|
-
import { createServer, type ViteDevServer } from "
|
|
3
|
+
import { createServer, type ViteDevServer } from "vite";
|
|
4
4
|
|
|
5
5
|
import { withSpinner } from "./withSpinner.js";
|
|
6
6
|
|
package/tsdown.config.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { exec } from "node:child_process";
|
|
2
|
+
import { promisify } from "node:util";
|
|
3
|
+
|
|
4
|
+
import { defineConfig } from "tsdown";
|
|
5
|
+
|
|
6
|
+
import { createTsdownConfig } from "../tsdown.config.base.ts";
|
|
7
|
+
|
|
8
|
+
const execPromise = promisify(exec);
|
|
9
|
+
|
|
10
|
+
export default defineConfig(
|
|
11
|
+
createTsdownConfig({
|
|
12
|
+
platform: "node",
|
|
13
|
+
hooks: {
|
|
14
|
+
async onSuccess() {
|
|
15
|
+
process.stderr.write("Marking dist/index.js as executable\n");
|
|
16
|
+
await execPromise("chmod +x dist/index.js");
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
}),
|
|
20
|
+
);
|
package/dist/VERSION.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const VERSION = "0.23.8-beta.0";
|
package/dist/commands/auth.d.ts
DELETED
package/dist/commands/check.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/commands/mux.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const buildAssetId: (srcDir: string, src: string, basename: string) => Promise<string>;
|
package/dist/commands/sync.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { SyncCaption } from './SyncCaption.js';
|
|
2
|
-
import { SyncFragmentIndex } from './SyncFragmentIndex.js';
|
|
3
|
-
import { SyncImage } from './SyncImage.js';
|
|
4
|
-
import { SyncStatus } from './SyncStatus.js';
|
|
5
|
-
import { SyncTrack } from './SyncTrack.js';
|
|
6
|
-
export interface SubAssetSync<CreationType> {
|
|
7
|
-
icon: string;
|
|
8
|
-
label: string;
|
|
9
|
-
path: string;
|
|
10
|
-
md5: string;
|
|
11
|
-
prepare: () => Promise<void>;
|
|
12
|
-
validate: () => Promise<void>;
|
|
13
|
-
create: () => Promise<void>;
|
|
14
|
-
upload: () => Promise<void>;
|
|
15
|
-
syncStatus: SyncStatus;
|
|
16
|
-
isComplete: () => boolean;
|
|
17
|
-
markSynced: () => Promise<void>;
|
|
18
|
-
created: CreationType | null;
|
|
19
|
-
}
|
|
20
|
-
export declare const getAssetSync: (subAssetPath: string, md5: string) => SyncCaption | SyncFragmentIndex | SyncImage | SyncTrack;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { CreateCaptionFileResult, LookupCaptionFileByMd5Result } from '../../../../api/src/index.ts';
|
|
2
|
-
import { SubAssetSync } from './SubAssetSync.js';
|
|
3
|
-
import { SyncStatus } from './SyncStatus.js';
|
|
4
|
-
export declare class SyncCaption implements SubAssetSync<CreateCaptionFileResult> {
|
|
5
|
-
path: string;
|
|
6
|
-
md5: string;
|
|
7
|
-
icon: string;
|
|
8
|
-
label: string;
|
|
9
|
-
syncStatus: SyncStatus;
|
|
10
|
-
created: CreateCaptionFileResult | LookupCaptionFileByMd5Result | null;
|
|
11
|
-
constructor(path: string, md5: string);
|
|
12
|
-
byteSize(): Promise<number>;
|
|
13
|
-
prepare(): Promise<void>;
|
|
14
|
-
validate(): Promise<void>;
|
|
15
|
-
create(): Promise<void>;
|
|
16
|
-
isComplete(): boolean;
|
|
17
|
-
upload(): Promise<void>;
|
|
18
|
-
markSynced(): Promise<void>;
|
|
19
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { CreateISOBMFFFileResult, LookupISOBMFFFileByMd5Result } from '../../../../api/src/index.ts';
|
|
2
|
-
import { SubAssetSync } from './SubAssetSync.js';
|
|
3
|
-
import { SyncStatus } from './SyncStatus.js';
|
|
4
|
-
export declare class SyncFragmentIndex implements SubAssetSync<CreateISOBMFFFileResult> {
|
|
5
|
-
path: string;
|
|
6
|
-
md5: string;
|
|
7
|
-
icon: string;
|
|
8
|
-
label: string;
|
|
9
|
-
syncStatus: SyncStatus;
|
|
10
|
-
fileSyncStatus: SyncStatus;
|
|
11
|
-
created: CreateISOBMFFFileResult | LookupISOBMFFFileByMd5Result | null;
|
|
12
|
-
constructor(path: string, md5: string);
|
|
13
|
-
byteSize(): Promise<number>;
|
|
14
|
-
prepare(): Promise<void>;
|
|
15
|
-
validate(): Promise<void>;
|
|
16
|
-
create(): Promise<void>;
|
|
17
|
-
isComplete(): boolean;
|
|
18
|
-
upload(): Promise<void>;
|
|
19
|
-
markSynced(): Promise<void>;
|
|
20
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { CreateImageFileResult, LookupImageFileByMd5Result } from '../../../../api/src/index.ts';
|
|
2
|
-
import { Probe } from '../../../../assets/src/index.ts';
|
|
3
|
-
import { SubAssetSync } from './SubAssetSync.js';
|
|
4
|
-
import { SyncStatus } from './SyncStatus.js';
|
|
5
|
-
export declare class SyncImage implements SubAssetSync<CreateImageFileResult> {
|
|
6
|
-
path: string;
|
|
7
|
-
md5: string;
|
|
8
|
-
icon: string;
|
|
9
|
-
label: string;
|
|
10
|
-
syncStatus: SyncStatus;
|
|
11
|
-
created: CreateImageFileResult | LookupImageFileByMd5Result | null;
|
|
12
|
-
constructor(path: string, md5: string);
|
|
13
|
-
private _probeResult;
|
|
14
|
-
prepare(): Promise<void>;
|
|
15
|
-
get probeResult(): Probe;
|
|
16
|
-
get extension(): string;
|
|
17
|
-
byteSize(): Promise<number>;
|
|
18
|
-
validate(): Promise<void>;
|
|
19
|
-
create(): Promise<void>;
|
|
20
|
-
isComplete(): boolean;
|
|
21
|
-
upload(): Promise<void>;
|
|
22
|
-
markSynced(): Promise<void>;
|
|
23
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
declare const SyncStatusSchema: z.ZodObject<{
|
|
3
|
-
version: z.ZodString;
|
|
4
|
-
complete: z.ZodBoolean;
|
|
5
|
-
id: z.ZodString;
|
|
6
|
-
md5: z.ZodString;
|
|
7
|
-
byte_size: z.ZodNumber;
|
|
8
|
-
}, "strip", z.ZodTypeAny, {
|
|
9
|
-
complete: boolean;
|
|
10
|
-
id: string;
|
|
11
|
-
md5: string;
|
|
12
|
-
byte_size: number;
|
|
13
|
-
version: string;
|
|
14
|
-
}, {
|
|
15
|
-
complete: boolean;
|
|
16
|
-
id: string;
|
|
17
|
-
md5: string;
|
|
18
|
-
byte_size: number;
|
|
19
|
-
version: string;
|
|
20
|
-
}>;
|
|
21
|
-
export interface SyncStatusInfo extends z.infer<typeof SyncStatusSchema> {
|
|
22
|
-
}
|
|
23
|
-
export declare class SyncStatus {
|
|
24
|
-
private basePath;
|
|
25
|
-
infoPath: string;
|
|
26
|
-
constructor(basePath: string);
|
|
27
|
-
isSynced(): Promise<boolean>;
|
|
28
|
-
readInfo(): Promise<{
|
|
29
|
-
complete: boolean;
|
|
30
|
-
id: string;
|
|
31
|
-
md5: string;
|
|
32
|
-
byte_size: number;
|
|
33
|
-
version: string;
|
|
34
|
-
} | null>;
|
|
35
|
-
markSynced(info: SyncStatusInfo): Promise<void>;
|
|
36
|
-
}
|
|
37
|
-
export {};
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { CreateISOBMFFFileResult, CreateISOBMFFTrackResult, LookupISOBMFFFileByMd5Result } from '../../../../api/src/index.ts';
|
|
2
|
-
import { Probe } from '../../../../assets/src/index.ts';
|
|
3
|
-
import { SubAssetSync } from './SubAssetSync.js';
|
|
4
|
-
import { SyncStatus } from './SyncStatus.js';
|
|
5
|
-
export declare class SyncTrack implements SubAssetSync<CreateISOBMFFTrackResult> {
|
|
6
|
-
path: string;
|
|
7
|
-
md5: string;
|
|
8
|
-
icon: string;
|
|
9
|
-
label: string;
|
|
10
|
-
syncStatus: SyncStatus;
|
|
11
|
-
fileSyncStatus: SyncStatus;
|
|
12
|
-
created: CreateISOBMFFTrackResult | null;
|
|
13
|
-
constructor(path: string, md5: string);
|
|
14
|
-
private _isoFile;
|
|
15
|
-
get isoFile(): CreateISOBMFFFileResult | LookupISOBMFFFileByMd5Result;
|
|
16
|
-
byteSize(): Promise<number>;
|
|
17
|
-
private _probeResult;
|
|
18
|
-
get probeResult(): Probe;
|
|
19
|
-
get track(): {
|
|
20
|
-
index: number;
|
|
21
|
-
codec_name: string;
|
|
22
|
-
codec_long_name: string;
|
|
23
|
-
codec_type: "audio";
|
|
24
|
-
codec_tag_string: string;
|
|
25
|
-
codec_tag: string;
|
|
26
|
-
sample_fmt: string;
|
|
27
|
-
sample_rate: string;
|
|
28
|
-
channels: number;
|
|
29
|
-
bits_per_sample: number;
|
|
30
|
-
r_frame_rate: string;
|
|
31
|
-
avg_frame_rate: string;
|
|
32
|
-
time_base: string;
|
|
33
|
-
duration_ts: number;
|
|
34
|
-
duration: number;
|
|
35
|
-
bit_rate: string;
|
|
36
|
-
disposition: Record<string, unknown>;
|
|
37
|
-
channel_layout?: string | undefined;
|
|
38
|
-
initial_padding?: number | undefined;
|
|
39
|
-
start_pts?: number | undefined;
|
|
40
|
-
start_time?: number | undefined;
|
|
41
|
-
} | {
|
|
42
|
-
height: number;
|
|
43
|
-
width: number;
|
|
44
|
-
index: number;
|
|
45
|
-
codec_name: string;
|
|
46
|
-
codec_long_name: string;
|
|
47
|
-
codec_type: "video";
|
|
48
|
-
codec_tag_string: string;
|
|
49
|
-
codec_tag: string;
|
|
50
|
-
r_frame_rate: string;
|
|
51
|
-
avg_frame_rate: string;
|
|
52
|
-
time_base: string;
|
|
53
|
-
disposition: Record<string, unknown>;
|
|
54
|
-
coded_width: number;
|
|
55
|
-
coded_height: number;
|
|
56
|
-
start_pts?: number | undefined;
|
|
57
|
-
start_time?: number | undefined;
|
|
58
|
-
duration_ts?: number | undefined;
|
|
59
|
-
duration?: number | undefined;
|
|
60
|
-
bit_rate?: string | undefined;
|
|
61
|
-
profile?: string | undefined;
|
|
62
|
-
level?: number | undefined;
|
|
63
|
-
} | {
|
|
64
|
-
index: number;
|
|
65
|
-
codec_type: "data";
|
|
66
|
-
start_pts?: number | undefined;
|
|
67
|
-
duration_ts?: number | undefined;
|
|
68
|
-
duration?: string | undefined;
|
|
69
|
-
};
|
|
70
|
-
prepare(): Promise<void>;
|
|
71
|
-
get trackId(): string;
|
|
72
|
-
get trackDuration(): number;
|
|
73
|
-
validate(): Promise<void>;
|
|
74
|
-
create(): Promise<void>;
|
|
75
|
-
isComplete(): boolean;
|
|
76
|
-
upload(): Promise<void>;
|
|
77
|
-
markSynced(): Promise<void>;
|
|
78
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const syncAssetDirectory: (cacheDir: string) => Promise<void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getFolderSize(dir: string): Promise<number>;
|
package/dist/utils/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Page } from 'playwright';
|
|
2
|
-
interface LaunchOptions {
|
|
3
|
-
url: string;
|
|
4
|
-
headless?: boolean;
|
|
5
|
-
interactive?: boolean;
|
|
6
|
-
efInteractive?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare function launchBrowserAndWaitForSDK(options: LaunchOptions, fn: (page: Page) => Promise<void>): Promise<void>;
|
|
9
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const withSpinner: <T extends unknown>(label: string, fn: () => Promise<T>) => Promise<T>;
|