@editframe/cli 0.7.0-beta.12 → 0.7.0-beta.16
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.d.ts +1 -1
- package/dist/VERSION.js +1 -1
- package/dist/commands/process-file.js +11 -6
- package/package.json +5 -5
- package/src/commands/process-file.ts +13 -6
package/dist/VERSION.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "0.7.0-beta.
|
|
1
|
+
export declare const VERSION = "0.7.0-beta.16";
|
package/dist/VERSION.js
CHANGED
|
@@ -5,7 +5,7 @@ import { getClient } from "../utils/index.js";
|
|
|
5
5
|
import { createReadStream } from "node:fs";
|
|
6
6
|
import { createUnprocessedFile, uploadUnprocessedFile, updateUnprocessedFile } from "@editframe/api";
|
|
7
7
|
import { md5FilePath } from "@editframe/assets";
|
|
8
|
-
program.command("process-file <file>").description("Upload a
|
|
8
|
+
program.command("process-file <file>").description("Upload a audio/video to Editframe for processing.").action(async (path) => {
|
|
9
9
|
const client = getClient();
|
|
10
10
|
const fileId = await md5FilePath(path);
|
|
11
11
|
await withSpinner("Creating unprocessed file record", async () => {
|
|
@@ -19,9 +19,14 @@ program.command("process-file <file>").description("Upload a file to Editframe f
|
|
|
19
19
|
await withSpinner("Uploading file", async () => {
|
|
20
20
|
await uploadUnprocessedFile(client, fileId, readStream);
|
|
21
21
|
});
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
const unprocessedFile = await withSpinner(
|
|
23
|
+
"Marking for processing",
|
|
24
|
+
async () => {
|
|
25
|
+
return await updateUnprocessedFile(client, fileId, {
|
|
26
|
+
processes: ["isobmff"]
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
process.stderr.write("File uploaded and marked for processing.\n");
|
|
31
|
+
console.log(JSON.stringify(unprocessedFile, null, 2));
|
|
27
32
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@editframe/cli",
|
|
3
|
-
"version": "0.7.0-beta.
|
|
3
|
+
"version": "0.7.0-beta.16",
|
|
4
4
|
"description": "Command line interface for EditFrame",
|
|
5
5
|
"bin": {
|
|
6
6
|
"editframe": "./dist/index.js"
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"vite-tsconfig-paths": "^4.3.2"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@editframe/api": "0.7.0-beta.
|
|
27
|
-
"@editframe/assets": "0.7.0-beta.
|
|
28
|
-
"@editframe/elements": "0.7.0-beta.
|
|
29
|
-
"@editframe/vite-plugin": "0.7.0-beta.
|
|
26
|
+
"@editframe/api": "0.7.0-beta.16",
|
|
27
|
+
"@editframe/assets": "0.7.0-beta.16",
|
|
28
|
+
"@editframe/elements": "0.7.0-beta.16",
|
|
29
|
+
"@editframe/vite-plugin": "0.7.0-beta.16",
|
|
30
30
|
"axios": "^1.6.8",
|
|
31
31
|
"chalk": "^5.3.0",
|
|
32
32
|
"commander": "^12.0.0",
|
|
@@ -15,7 +15,7 @@ import { md5FilePath } from "@editframe/assets";
|
|
|
15
15
|
|
|
16
16
|
program
|
|
17
17
|
.command("process-file <file>")
|
|
18
|
-
.description("Upload a
|
|
18
|
+
.description("Upload a audio/video to Editframe for processing.")
|
|
19
19
|
.action(async (path: string) => {
|
|
20
20
|
const client = getClient();
|
|
21
21
|
|
|
@@ -35,9 +35,16 @@ program
|
|
|
35
35
|
await uploadUnprocessedFile(client, fileId, readStream);
|
|
36
36
|
});
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
const unprocessedFile = await withSpinner(
|
|
39
|
+
"Marking for processing",
|
|
40
|
+
async () => {
|
|
41
|
+
return await updateUnprocessedFile(client, fileId, {
|
|
42
|
+
processes: ["isobmff"],
|
|
43
|
+
});
|
|
44
|
+
},
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
process.stderr.write("File uploaded and marked for processing.\n");
|
|
48
|
+
|
|
49
|
+
console.log(JSON.stringify(unprocessedFile, null, 2));
|
|
43
50
|
});
|