@editframe/cli 0.12.0-beta.16 → 0.12.0-beta.19
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.js +3 -3
- package/dist/commands/webhook.js +3 -3
- package/dist/operations/processRenderInfo.d.ts +1 -1
- package/dist/operations/syncAssetsDirectory/SubAssetSync.d.ts +5 -5
- package/dist/operations/syncAssetsDirectory/SyncCaption.d.ts +2 -2
- package/dist/operations/syncAssetsDirectory/SyncFragmentIndex.d.ts +2 -2
- package/dist/operations/syncAssetsDirectory/SyncImage.d.ts +2 -2
- package/dist/operations/syncAssetsDirectory/SyncTrack.d.ts +2 -2
- package/dist/operations/syncAssetsDirectory/doAssetSync.d.ts +1 -1
- package/dist/utils/startPreviewServer.js +1 -1
- package/package.json +5 -5
- package/src/commands/auth.ts +1 -1
- package/src/commands/process-file.ts +2 -2
- package/src/commands/process.ts +5 -5
- package/src/commands/render.ts +11 -11
- package/src/commands/sync.ts +1 -1
- package/src/commands/webhook.ts +4 -4
- package/src/operations/processRenderInfo.ts +2 -2
- package/src/operations/syncAssetsDirectory/SubAssetSync.ts +5 -5
- package/src/operations/syncAssetsDirectory/SyncCaption.test.ts +4 -4
- package/src/operations/syncAssetsDirectory/SyncCaption.ts +4 -4
- package/src/operations/syncAssetsDirectory/SyncFragmentIndex.test.ts +4 -4
- package/src/operations/syncAssetsDirectory/SyncFragmentIndex.ts +4 -4
- package/src/operations/syncAssetsDirectory/SyncImage.test.ts +4 -4
- package/src/operations/syncAssetsDirectory/SyncImage.ts +4 -4
- package/src/operations/syncAssetsDirectory/SyncTrack.test.ts +4 -4
- package/src/operations/syncAssetsDirectory/SyncTrack.ts +5 -7
- package/src/operations/syncAssetsDirectory/doAssetSync.test.ts +3 -3
- package/src/operations/syncAssetsDirectory/doAssetSync.ts +1 -1
- package/src/operations/syncAssetsDirectory.test.ts +3 -3
- package/src/operations/syncAssetsDirectory.ts +2 -2
- package/src/utils/launchBrowserAndWaitForSDK.ts +1 -1
- package/src/utils/startDevServer.ts +1 -1
- package/src/utils/startPreviewServer.ts +2 -2
- package/test-fixtures/fixture.ts +2 -2
- package/test-fixtures/network.ts +1 -1
package/dist/VERSION.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "0.12.0-beta.
|
|
1
|
+
export declare const VERSION = "0.12.0-beta.19";
|
package/dist/VERSION.js
CHANGED
package/dist/commands/process.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { spawnSync } from "node:child_process";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { program } from "commander";
|
|
4
|
-
import { withSpinner } from "../utils/withSpinner.js";
|
|
5
|
-
import { launchBrowserAndWaitForSDK } from "../utils/launchBrowserAndWaitForSDK.js";
|
|
6
|
-
import { PreviewServer } from "../utils/startPreviewServer.js";
|
|
7
4
|
import { getRenderInfo } from "../operations/getRenderInfo.js";
|
|
8
5
|
import { processRenderInfo } from "../operations/processRenderInfo.js";
|
|
6
|
+
import { launchBrowserAndWaitForSDK } from "../utils/launchBrowserAndWaitForSDK.js";
|
|
7
|
+
import { PreviewServer } from "../utils/startPreviewServer.js";
|
|
8
|
+
import { withSpinner } from "../utils/withSpinner.js";
|
|
9
9
|
program.command("process [directory]").description(
|
|
10
10
|
"Process's a directory's index.html file, analyzing assets and processing them for rendering"
|
|
11
11
|
).action(async (directory) => {
|
package/dist/commands/webhook.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import ora from "ora";
|
|
1
|
+
import { input, select } from "@inquirer/prompts";
|
|
3
2
|
import chalk from "chalk";
|
|
3
|
+
import { program, Option } from "commander";
|
|
4
4
|
import debug from "debug";
|
|
5
|
-
import
|
|
5
|
+
import ora from "ora";
|
|
6
6
|
import { getClient } from "../utils/index.js";
|
|
7
7
|
const log = debug("ef:cli:auth");
|
|
8
8
|
const topics = [
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { getRenderInfo } from './getRenderInfo.
|
|
1
|
+
import { getRenderInfo } from './getRenderInfo.js';
|
|
2
2
|
export declare const processRenderInfo: (renderInfo: Awaited<ReturnType<typeof getRenderInfo>>) => Promise<void>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { SyncStatus } from './SyncStatus.
|
|
2
|
-
import { SyncCaption } from './SyncCaption.
|
|
3
|
-
import { SyncFragmentIndex } from './SyncFragmentIndex.
|
|
4
|
-
import { SyncImage } from './SyncImage.
|
|
5
|
-
import { SyncTrack } from './SyncTrack.
|
|
1
|
+
import { SyncStatus } from './SyncStatus.js';
|
|
2
|
+
import { SyncCaption } from './SyncCaption.js';
|
|
3
|
+
import { SyncFragmentIndex } from './SyncFragmentIndex.js';
|
|
4
|
+
import { SyncImage } from './SyncImage.js';
|
|
5
|
+
import { SyncTrack } from './SyncTrack.js';
|
|
6
6
|
export interface SubAssetSync<CreationType> {
|
|
7
7
|
icon: string;
|
|
8
8
|
label: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CreateCaptionFileResult, LookupCaptionFileByMd5Result } from '../../../../api/src/index.ts';
|
|
2
|
-
import { SubAssetSync } from './SubAssetSync.
|
|
3
|
-
import { SyncStatus } from './SyncStatus.
|
|
2
|
+
import { SubAssetSync } from './SubAssetSync.js';
|
|
3
|
+
import { SyncStatus } from './SyncStatus.js';
|
|
4
4
|
export declare class SyncCaption implements SubAssetSync<CreateCaptionFileResult> {
|
|
5
5
|
path: string;
|
|
6
6
|
md5: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CreateISOBMFFFileResult, LookupISOBMFFFileByMd5Result } from '../../../../api/src/index.ts';
|
|
2
|
-
import { SubAssetSync } from './SubAssetSync.
|
|
3
|
-
import { SyncStatus } from './SyncStatus.
|
|
2
|
+
import { SubAssetSync } from './SubAssetSync.js';
|
|
3
|
+
import { SyncStatus } from './SyncStatus.js';
|
|
4
4
|
export declare class SyncFragmentIndex implements SubAssetSync<CreateISOBMFFFileResult> {
|
|
5
5
|
path: string;
|
|
6
6
|
md5: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CreateImageFileResult, LookupImageFileByMd5Result } from '../../../../api/src/index.ts';
|
|
2
2
|
import { Probe } from '../../../../assets/src/index.ts';
|
|
3
|
-
import { SubAssetSync } from './SubAssetSync.
|
|
4
|
-
import { SyncStatus } from './SyncStatus.
|
|
3
|
+
import { SubAssetSync } from './SubAssetSync.js';
|
|
4
|
+
import { SyncStatus } from './SyncStatus.js';
|
|
5
5
|
export declare class SyncImage implements SubAssetSync<CreateImageFileResult> {
|
|
6
6
|
path: string;
|
|
7
7
|
md5: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CreateISOBMFFFileResult, CreateISOBMFFTrackResult, LookupISOBMFFFileByMd5Result } from '../../../../api/src/index.ts';
|
|
2
2
|
import { Probe } from '../../../../assets/src/index.ts';
|
|
3
|
-
import { SubAssetSync } from './SubAssetSync.
|
|
4
|
-
import { SyncStatus } from './SyncStatus.
|
|
3
|
+
import { SubAssetSync } from './SubAssetSync.js';
|
|
4
|
+
import { SyncStatus } from './SyncStatus.js';
|
|
5
5
|
export declare class SyncTrack implements SubAssetSync<CreateISOBMFFTrackResult> {
|
|
6
6
|
path: string;
|
|
7
7
|
md5: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@editframe/cli",
|
|
3
|
-
"version": "0.12.0-beta.
|
|
3
|
+
"version": "0.12.0-beta.19",
|
|
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.12.0-beta.
|
|
27
|
-
"@editframe/assets": "0.12.0-beta.
|
|
28
|
-
"@editframe/elements": "0.12.0-beta.
|
|
29
|
-
"@editframe/vite-plugin": "0.12.0-beta.
|
|
26
|
+
"@editframe/api": "0.12.0-beta.19",
|
|
27
|
+
"@editframe/assets": "0.12.0-beta.19",
|
|
28
|
+
"@editframe/elements": "0.12.0-beta.19",
|
|
29
|
+
"@editframe/vite-plugin": "0.12.0-beta.19",
|
|
30
30
|
"@inquirer/prompts": "^5.3.8",
|
|
31
31
|
"axios": "^1.6.8",
|
|
32
32
|
"chalk": "^5.3.0",
|
package/src/commands/auth.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { program } from "commander";
|
|
2
2
|
|
|
3
|
-
import { withSpinner } from "../utils/withSpinner.
|
|
3
|
+
import { withSpinner } from "../utils/withSpinner.js";
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
createUnprocessedFileFromPath,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
uploadUnprocessedFile,
|
|
11
11
|
} from "@editframe/api/node";
|
|
12
12
|
import ora from "ora";
|
|
13
|
-
import { getClient } from "../utils/index.
|
|
13
|
+
import { getClient } from "../utils/index.js";
|
|
14
14
|
|
|
15
15
|
program
|
|
16
16
|
.command("process-file <file>")
|
package/src/commands/process.ts
CHANGED
|
@@ -3,11 +3,11 @@ import path from "node:path";
|
|
|
3
3
|
|
|
4
4
|
import { program } from "commander";
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
6
|
+
import { getRenderInfo } from "../operations/getRenderInfo.js";
|
|
7
|
+
import { processRenderInfo } from "../operations/processRenderInfo.js";
|
|
8
|
+
import { launchBrowserAndWaitForSDK } from "../utils/launchBrowserAndWaitForSDK.js";
|
|
9
|
+
import { PreviewServer } from "../utils/startPreviewServer.js";
|
|
10
|
+
import { withSpinner } from "../utils/withSpinner.js";
|
|
11
11
|
|
|
12
12
|
program
|
|
13
13
|
.command("process [directory]")
|
package/src/commands/render.ts
CHANGED
|
@@ -12,17 +12,17 @@ import { md5Directory, md5FilePath } from "@editframe/assets";
|
|
|
12
12
|
import { spawnSync } from "node:child_process";
|
|
13
13
|
import { createRender, uploadRender } from "@editframe/api";
|
|
14
14
|
import debug from "debug";
|
|
15
|
-
import { RenderInfo, getRenderInfo } from "../operations/getRenderInfo.
|
|
16
|
-
import { processRenderInfo } from "../operations/processRenderInfo.
|
|
17
|
-
import { syncAssetDirectory } from "../operations/syncAssetsDirectory.
|
|
18
|
-
import { SyncStatus } from "../operations/syncAssetsDirectory/SyncStatus.
|
|
19
|
-
import { createReadableStreamFromReadable } from "../utils/createReadableStreamFromReadable.
|
|
20
|
-
import { getFolderSize } from "../utils/getFolderSize.
|
|
21
|
-
import { getClient } from "../utils/index.
|
|
22
|
-
import { launchBrowserAndWaitForSDK } from "../utils/launchBrowserAndWaitForSDK.
|
|
23
|
-
import { PreviewServer } from "../utils/startPreviewServer.
|
|
24
|
-
import { validateVideoResolution } from "../utils/validateVideoResolution.
|
|
25
|
-
import { withSpinner } from "../utils/withSpinner.
|
|
15
|
+
import { RenderInfo, getRenderInfo } from "../operations/getRenderInfo.js";
|
|
16
|
+
import { processRenderInfo } from "../operations/processRenderInfo.js";
|
|
17
|
+
import { syncAssetDirectory } from "../operations/syncAssetsDirectory.js";
|
|
18
|
+
import { SyncStatus } from "../operations/syncAssetsDirectory/SyncStatus.js";
|
|
19
|
+
import { createReadableStreamFromReadable } from "../utils/createReadableStreamFromReadable.js";
|
|
20
|
+
import { getFolderSize } from "../utils/getFolderSize.js";
|
|
21
|
+
import { getClient } from "../utils/index.js";
|
|
22
|
+
import { launchBrowserAndWaitForSDK } from "../utils/launchBrowserAndWaitForSDK.js";
|
|
23
|
+
import { PreviewServer } from "../utils/startPreviewServer.js";
|
|
24
|
+
import { validateVideoResolution } from "../utils/validateVideoResolution.js";
|
|
25
|
+
import { withSpinner } from "../utils/withSpinner.js";
|
|
26
26
|
|
|
27
27
|
const log = debug("ef:cli:render");
|
|
28
28
|
|
package/src/commands/sync.ts
CHANGED
package/src/commands/webhook.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import ora from "ora";
|
|
1
|
+
import { input, select } from "@inquirer/prompts";
|
|
3
2
|
import chalk from "chalk";
|
|
3
|
+
import { Option, program } from "commander";
|
|
4
4
|
import debug from "debug";
|
|
5
|
-
import
|
|
5
|
+
import ora from "ora";
|
|
6
6
|
|
|
7
|
-
import { getClient } from "../utils/index.
|
|
7
|
+
import { getClient } from "../utils/index.js";
|
|
8
8
|
|
|
9
9
|
const log = debug("ef:cli:auth");
|
|
10
10
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
generateTrack,
|
|
3
2
|
cacheImage,
|
|
4
3
|
findOrCreateCaptions,
|
|
4
|
+
generateTrack,
|
|
5
5
|
} from "@editframe/assets";
|
|
6
|
-
import type { getRenderInfo } from "./getRenderInfo.
|
|
6
|
+
import type { getRenderInfo } from "./getRenderInfo.js";
|
|
7
7
|
|
|
8
8
|
export const processRenderInfo = async (
|
|
9
9
|
renderInfo: Awaited<ReturnType<typeof getRenderInfo>>,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import debug from "debug";
|
|
2
|
-
import type { SyncStatus } from "./SyncStatus.
|
|
2
|
+
import type { SyncStatus } from "./SyncStatus.js";
|
|
3
3
|
|
|
4
|
-
import { SyncCaption } from "./SyncCaption.
|
|
5
|
-
import { SyncFragmentIndex } from "./SyncFragmentIndex.
|
|
6
|
-
import { SyncImage } from "./SyncImage.
|
|
7
|
-
import { SyncTrack } from "./SyncTrack.
|
|
4
|
+
import { SyncCaption } from "./SyncCaption.js";
|
|
5
|
+
import { SyncFragmentIndex } from "./SyncFragmentIndex.js";
|
|
6
|
+
import { SyncImage } from "./SyncImage.js";
|
|
7
|
+
import { SyncTrack } from "./SyncTrack.js";
|
|
8
8
|
|
|
9
9
|
export interface SubAssetSync<CreationType> {
|
|
10
10
|
icon: string;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { useMSW } from "TEST/useMSW.
|
|
1
|
+
import { useMSW } from "TEST/useMSW.js";
|
|
2
2
|
import { describe, expect, test } from "vitest";
|
|
3
|
-
import { fixture, withFixtures } from "../../../test-fixtures/fixture.
|
|
3
|
+
import { fixture, withFixtures } from "../../../test-fixtures/fixture.js";
|
|
4
4
|
import {
|
|
5
5
|
mockCreateCaptionFile,
|
|
6
6
|
mockLookupCaptionFileByMd5,
|
|
7
7
|
mockLookupCaptionFileByMd5NotFound,
|
|
8
8
|
mockUploadCaptionFile,
|
|
9
|
-
} from "../../../test-fixtures/network.
|
|
10
|
-
import { SyncCaption } from "./SyncCaption.
|
|
9
|
+
} from "../../../test-fixtures/network.js";
|
|
10
|
+
import { SyncCaption } from "./SyncCaption.js";
|
|
11
11
|
describe("SyncCaption", async () => {
|
|
12
12
|
const server = useMSW();
|
|
13
13
|
await withFixtures(
|
|
@@ -9,12 +9,12 @@ import {
|
|
|
9
9
|
} from "@editframe/api";
|
|
10
10
|
|
|
11
11
|
import { Readable } from "node:stream";
|
|
12
|
-
import { getClient } from "../../utils/index.
|
|
12
|
+
import { getClient } from "../../utils/index.js";
|
|
13
13
|
|
|
14
14
|
import { basename } from "node:path";
|
|
15
|
-
import { createReadableStreamFromReadable } from "../../utils/createReadableStreamFromReadable.
|
|
16
|
-
import type { SubAssetSync } from "./SubAssetSync.
|
|
17
|
-
import { SyncStatus } from "./SyncStatus.
|
|
15
|
+
import { createReadableStreamFromReadable } from "../../utils/createReadableStreamFromReadable.js";
|
|
16
|
+
import type { SubAssetSync } from "./SubAssetSync.js";
|
|
17
|
+
import { SyncStatus } from "./SyncStatus.js";
|
|
18
18
|
export class SyncCaption implements SubAssetSync<CreateCaptionFileResult> {
|
|
19
19
|
icon = "📝";
|
|
20
20
|
label = "captions";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { useMSW } from "TEST/useMSW.
|
|
1
|
+
import { useMSW } from "TEST/useMSW.js";
|
|
2
2
|
import { describe, expect, test } from "vitest";
|
|
3
|
-
import { fixture, withFixtures } from "../../../test-fixtures/fixture.
|
|
3
|
+
import { fixture, withFixtures } from "../../../test-fixtures/fixture.js";
|
|
4
4
|
import {
|
|
5
5
|
mockCreateIsobmffFile,
|
|
6
6
|
mockLookupISOBMFFFileByMd5,
|
|
7
7
|
mockLookupISOBMFFFileByMd5NotFound,
|
|
8
8
|
mockUploadIsobmffFileIndex,
|
|
9
|
-
} from "../../../test-fixtures/network.
|
|
10
|
-
import { SyncFragmentIndex } from "./SyncFragmentIndex.
|
|
9
|
+
} from "../../../test-fixtures/network.js";
|
|
10
|
+
import { SyncFragmentIndex } from "./SyncFragmentIndex.js";
|
|
11
11
|
|
|
12
12
|
describe("SyncFragmentIndex", async () => {
|
|
13
13
|
const server = useMSW();
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
uploadFragmentIndex,
|
|
11
11
|
} from "@editframe/api";
|
|
12
12
|
|
|
13
|
-
import { createReadableStreamFromReadable } from "../../utils/createReadableStreamFromReadable.
|
|
14
|
-
import { getClient } from "../../utils/index.
|
|
15
|
-
import type { SubAssetSync } from "./SubAssetSync.
|
|
16
|
-
import { SyncStatus } from "./SyncStatus.
|
|
13
|
+
import { createReadableStreamFromReadable } from "../../utils/createReadableStreamFromReadable.js";
|
|
14
|
+
import { getClient } from "../../utils/index.js";
|
|
15
|
+
import type { SubAssetSync } from "./SubAssetSync.js";
|
|
16
|
+
import { SyncStatus } from "./SyncStatus.js";
|
|
17
17
|
|
|
18
18
|
export class SyncFragmentIndex
|
|
19
19
|
implements SubAssetSync<CreateISOBMFFFileResult>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { useMSW } from "TEST/useMSW.
|
|
1
|
+
import { useMSW } from "TEST/useMSW.js";
|
|
2
2
|
import { describe, expect, test } from "vitest";
|
|
3
|
-
import { fixture, withFixtures } from "../../../test-fixtures/fixture.
|
|
3
|
+
import { fixture, withFixtures } from "../../../test-fixtures/fixture.js";
|
|
4
4
|
import {
|
|
5
5
|
mockCreateImageFile,
|
|
6
6
|
mockGetUploadImageFile,
|
|
7
7
|
mockLookupImageFileByMd5,
|
|
8
8
|
mockLookupImageFileByMd5NotFound,
|
|
9
|
-
} from "../../../test-fixtures/network.
|
|
10
|
-
import { SyncImage } from "./SyncImage.
|
|
9
|
+
} from "../../../test-fixtures/network.js";
|
|
10
|
+
import { SyncImage } from "./SyncImage.js";
|
|
11
11
|
describe("SyncImage", async () => {
|
|
12
12
|
const server = useMSW();
|
|
13
13
|
await withFixtures(
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
|
|
13
13
|
import { Probe } from "@editframe/assets";
|
|
14
14
|
|
|
15
|
-
import { createReadableStreamFromReadable } from "../../utils/createReadableStreamFromReadable.
|
|
16
|
-
import { getClient } from "../../utils/index.
|
|
17
|
-
import type { SubAssetSync } from "./SubAssetSync.
|
|
18
|
-
import { SyncStatus } from "./SyncStatus.
|
|
15
|
+
import { createReadableStreamFromReadable } from "../../utils/createReadableStreamFromReadable.js";
|
|
16
|
+
import { getClient } from "../../utils/index.js";
|
|
17
|
+
import type { SubAssetSync } from "./SubAssetSync.js";
|
|
18
|
+
import { SyncStatus } from "./SyncStatus.js";
|
|
19
19
|
|
|
20
20
|
export class SyncImage implements SubAssetSync<CreateImageFileResult> {
|
|
21
21
|
icon = "🖼️";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { useMSW } from "TEST/useMSW.
|
|
1
|
+
import { useMSW } from "TEST/useMSW.js";
|
|
2
2
|
import { describe, expect, test } from "vitest";
|
|
3
|
-
import { fixture, withFixtures } from "../../../test-fixtures/fixture.
|
|
3
|
+
import { fixture, withFixtures } from "../../../test-fixtures/fixture.js";
|
|
4
4
|
import {
|
|
5
5
|
mockCreateIsobmffFile,
|
|
6
6
|
mockCreateIsobmffTrack,
|
|
7
7
|
mockGetIsobmffTrackUpload,
|
|
8
8
|
mockLookupISOBMFFFileByMd5,
|
|
9
9
|
mockLookupISOBMFFFileByMd5NotFound,
|
|
10
|
-
} from "../../../test-fixtures/network.
|
|
11
|
-
import { SyncTrack } from "./SyncTrack.
|
|
10
|
+
} from "../../../test-fixtures/network.js";
|
|
11
|
+
import { SyncTrack } from "./SyncTrack.js";
|
|
12
12
|
|
|
13
13
|
describe("SyncTrack", async () => {
|
|
14
14
|
const server = useMSW();
|
|
@@ -2,8 +2,6 @@ import { createReadStream } from "node:fs";
|
|
|
2
2
|
import fs from "node:fs/promises";
|
|
3
3
|
import { basename, dirname, join } from "node:path";
|
|
4
4
|
|
|
5
|
-
import type { z } from "zod";
|
|
6
|
-
|
|
7
5
|
import {
|
|
8
6
|
type CreateISOBMFFFileResult,
|
|
9
7
|
type CreateISOBMFFTrackPayload,
|
|
@@ -16,10 +14,10 @@ import {
|
|
|
16
14
|
} from "@editframe/api";
|
|
17
15
|
import { Probe } from "@editframe/assets";
|
|
18
16
|
|
|
19
|
-
import { createReadableStreamFromReadable } from "../../utils/createReadableStreamFromReadable.
|
|
20
|
-
import { getClient } from "../../utils/index.
|
|
21
|
-
import type { SubAssetSync } from "./SubAssetSync.
|
|
22
|
-
import { SyncStatus } from "./SyncStatus.
|
|
17
|
+
import { createReadableStreamFromReadable } from "../../utils/createReadableStreamFromReadable.js";
|
|
18
|
+
import { getClient } from "../../utils/index.js";
|
|
19
|
+
import type { SubAssetSync } from "./SubAssetSync.js";
|
|
20
|
+
import { SyncStatus } from "./SyncStatus.js";
|
|
23
21
|
|
|
24
22
|
export class SyncTrack implements SubAssetSync<CreateISOBMFFTrackResult> {
|
|
25
23
|
icon = "📼";
|
|
@@ -104,7 +102,7 @@ export class SyncTrack implements SubAssetSync<CreateISOBMFFTrackResult> {
|
|
|
104
102
|
const track = this.track;
|
|
105
103
|
const isoFile = this.isoFile;
|
|
106
104
|
|
|
107
|
-
const createPayload:
|
|
105
|
+
const createPayload: CreateISOBMFFTrackPayload =
|
|
108
106
|
track.codec_type === "audio"
|
|
109
107
|
? {
|
|
110
108
|
type: track.codec_type,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { describe, expect, test, vi } from "vitest";
|
|
2
|
-
import type { SubAssetSync } from "./SubAssetSync.
|
|
3
|
-
import type { SyncStatusInfo } from "./SyncStatus.
|
|
4
|
-
import { doAssetSync } from "./doAssetSync.
|
|
2
|
+
import type { SubAssetSync } from "./SubAssetSync.js";
|
|
3
|
+
import type { SyncStatusInfo } from "./SyncStatus.js";
|
|
4
|
+
import { doAssetSync } from "./doAssetSync.js";
|
|
5
5
|
|
|
6
6
|
const collectAsyncGenerator = async (
|
|
7
7
|
generator: SubAssetSync<unknown>,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { describe, it } from "vitest";
|
|
2
2
|
|
|
3
|
-
import { useMSW } from "TEST/useMSW.
|
|
4
|
-
import { fixture, withFixtures } from "../../test-fixtures/fixture.
|
|
3
|
+
import { useMSW } from "TEST/useMSW.js";
|
|
4
|
+
import { fixture, withFixtures } from "../../test-fixtures/fixture.js";
|
|
5
5
|
import {
|
|
6
6
|
mockCreateImageFile,
|
|
7
7
|
mockCreateIsobmffFile,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
mockLookupISOBMFFFileByMd5NotFound,
|
|
11
11
|
mockLookupImageFileByMd5NotFound,
|
|
12
12
|
mockUploadIsobmffFileIndex,
|
|
13
|
-
} from "../../test-fixtures/network.
|
|
13
|
+
} from "../../test-fixtures/network.js";
|
|
14
14
|
|
|
15
15
|
describe("syncAssetsDirectory", () => {
|
|
16
16
|
const server = useMSW();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import { getAssetSync } from "./syncAssetsDirectory/SubAssetSync.
|
|
4
|
-
import { doAssetSync } from "./syncAssetsDirectory/doAssetSync.
|
|
3
|
+
import { getAssetSync } from "./syncAssetsDirectory/SubAssetSync.js";
|
|
4
|
+
import { doAssetSync } from "./syncAssetsDirectory/doAssetSync.js";
|
|
5
5
|
|
|
6
6
|
export const syncAssetDirectory = async (
|
|
7
7
|
/**
|
|
@@ -2,7 +2,7 @@ import chalk from "chalk";
|
|
|
2
2
|
import debug from "debug";
|
|
3
3
|
import { type Browser, type Page, chromium } from "playwright";
|
|
4
4
|
|
|
5
|
-
import { withSpinner } from "./withSpinner.
|
|
5
|
+
import { withSpinner } from "./withSpinner.js";
|
|
6
6
|
|
|
7
7
|
const browserLog = debug("ef:cli::browser");
|
|
8
8
|
|
|
@@ -5,7 +5,7 @@ import { type ViteDevServer, createServer } from "vite";
|
|
|
5
5
|
|
|
6
6
|
import { vitePluginEditframe as editframe } from "@editframe/vite-plugin";
|
|
7
7
|
|
|
8
|
-
import { withSpinner } from "./withSpinner.
|
|
8
|
+
import { withSpinner } from "./withSpinner.js";
|
|
9
9
|
|
|
10
10
|
export class DevServer {
|
|
11
11
|
static async start(directory: string) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { type ViteDevServer, createServer } from "vite";
|
|
2
1
|
import path from "node:path";
|
|
2
|
+
import { type ViteDevServer, createServer } from "vite";
|
|
3
3
|
|
|
4
4
|
import { vitePluginEditframe as editframe } from "@editframe/vite-plugin";
|
|
5
5
|
|
|
6
|
-
import { withSpinner } from "./withSpinner.
|
|
6
|
+
import { withSpinner } from "./withSpinner.js";
|
|
7
7
|
|
|
8
8
|
export class PreviewServer {
|
|
9
9
|
static async start(directory: string) {
|
package/test-fixtures/fixture.ts
CHANGED
|
@@ -7,8 +7,8 @@ import { expect } from "vitest";
|
|
|
7
7
|
|
|
8
8
|
import { md5Buffer } from "@editframe/assets";
|
|
9
9
|
|
|
10
|
-
import { syncAssetDirectory } from "../src/operations/syncAssetsDirectory.
|
|
11
|
-
import type { SyncStatusInfo } from "../src/operations/syncAssetsDirectory/SyncStatus.
|
|
10
|
+
import { syncAssetDirectory } from "../src/operations/syncAssetsDirectory.js";
|
|
11
|
+
import type { SyncStatusInfo } from "../src/operations/syncAssetsDirectory/SyncStatus.js";
|
|
12
12
|
|
|
13
13
|
export const fixture = async (
|
|
14
14
|
fixture: string,
|
package/test-fixtures/network.ts
CHANGED