@editframe/cli 0.10.0-beta.2 → 0.10.0-beta.4

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 CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "0.10.0-beta.2";
1
+ export declare const VERSION = "0.10.0-beta.4";
package/dist/VERSION.js CHANGED
@@ -1,4 +1,4 @@
1
- const VERSION = "0.10.0-beta.2";
1
+ const VERSION = "0.10.0-beta.4";
2
2
  export {
3
3
  VERSION
4
4
  };
@@ -10,26 +10,32 @@ program.command("process-file <file>").description("Upload a audio/video to Edit
10
10
  const client = getClient();
11
11
  const md5 = await md5FilePath(path);
12
12
  const byte_size = (await stat(path)).size;
13
- await withSpinner("Creating unprocessed file record", async () => {
14
- await createUnprocessedFile(client, {
13
+ const unprocessedFile = await withSpinner(
14
+ "Creating unprocessed file record",
15
+ async () => await createUnprocessedFile(client, {
15
16
  md5,
16
17
  processes: [],
17
18
  filename: basename(path),
18
19
  byte_size
19
- });
20
- });
20
+ })
21
+ );
21
22
  const readStream = createReadStream(path);
22
23
  await withSpinner("Uploading file", async () => {
23
- await uploadUnprocessedFile(client, md5, readStream, byte_size);
24
+ await uploadUnprocessedFile(
25
+ client,
26
+ unprocessedFile.id,
27
+ readStream,
28
+ byte_size
29
+ );
24
30
  });
25
- const unprocessedFile = await withSpinner(
31
+ const updatedUnprocessedFile = await withSpinner(
26
32
  "Marking for processing",
27
33
  async () => {
28
- return await updateUnprocessedFile(client, md5, {
34
+ return await updateUnprocessedFile(client, unprocessedFile.id, {
29
35
  processes: ["isobmff"]
30
36
  });
31
37
  }
32
38
  );
33
39
  process.stderr.write("File uploaded and marked for processing.\n");
34
- console.log(JSON.stringify(unprocessedFile, null, 2));
40
+ console.log(JSON.stringify(updatedUnprocessedFile, null, 2));
35
41
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@editframe/cli",
3
- "version": "0.10.0-beta.2",
3
+ "version": "0.10.0-beta.4",
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.10.0-beta.2",
27
- "@editframe/assets": "0.10.0-beta.2",
28
- "@editframe/elements": "0.10.0-beta.2",
29
- "@editframe/vite-plugin": "0.10.0-beta.2",
26
+ "@editframe/api": "0.10.0-beta.4",
27
+ "@editframe/assets": "0.10.0-beta.4",
28
+ "@editframe/elements": "0.10.0-beta.4",
29
+ "@editframe/vite-plugin": "0.10.0-beta.4",
30
30
  "@inquirer/prompts": "^5.3.8",
31
31
  "axios": "^1.6.8",
32
32
  "chalk": "^5.3.0",
@@ -24,25 +24,32 @@ program
24
24
 
25
25
  const byte_size = (await stat(path)).size;
26
26
 
27
- await withSpinner("Creating unprocessed file record", async () => {
28
- await createUnprocessedFile(client, {
29
- md5,
30
- processes: [],
31
- filename: basename(path),
32
- byte_size,
33
- });
34
- });
27
+ const unprocessedFile = await withSpinner(
28
+ "Creating unprocessed file record",
29
+ async () =>
30
+ await createUnprocessedFile(client, {
31
+ md5,
32
+ processes: [],
33
+ filename: basename(path),
34
+ byte_size,
35
+ }),
36
+ );
35
37
 
36
38
  const readStream = createReadStream(path);
37
39
 
38
40
  await withSpinner("Uploading file", async () => {
39
- await uploadUnprocessedFile(client, md5, readStream, byte_size);
41
+ await uploadUnprocessedFile(
42
+ client,
43
+ unprocessedFile.id,
44
+ readStream,
45
+ byte_size,
46
+ );
40
47
  });
41
48
 
42
- const unprocessedFile = await withSpinner(
49
+ const updatedUnprocessedFile = await withSpinner(
43
50
  "Marking for processing",
44
51
  async () => {
45
- return await updateUnprocessedFile(client, md5, {
52
+ return await updateUnprocessedFile(client, unprocessedFile.id, {
46
53
  processes: ["isobmff"],
47
54
  });
48
55
  },
@@ -50,5 +57,5 @@ program
50
57
 
51
58
  process.stderr.write("File uploaded and marked for processing.\n");
52
59
 
53
- console.log(JSON.stringify(unprocessedFile, null, 2));
60
+ console.log(JSON.stringify(updatedUnprocessedFile, null, 2));
54
61
  });