@editframe/cli 0.47.1 → 0.48.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/LICENSE-FULL.md +148 -0
- package/LICENSE.md +58 -0
- package/dist/VERSION.js +2 -2
- package/dist/VERSION.js.map +1 -1
- package/dist/commands/auth.js +2 -3
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/check.js +5 -6
- package/dist/commands/check.js.map +1 -1
- package/dist/commands/cloud-render.js +4 -5
- package/dist/commands/cloud-render.js.map +1 -1
- package/dist/commands/preview.js +2 -3
- package/dist/commands/preview.js.map +1 -1
- package/dist/commands/process-file.js +2 -3
- package/dist/commands/process-file.js.map +1 -1
- package/dist/commands/process.js +2 -3
- package/dist/commands/process.js.map +1 -1
- package/dist/commands/render.js +4 -5
- package/dist/commands/render.js.map +1 -1
- package/dist/commands/sync.js +2 -3
- package/dist/commands/sync.js.map +1 -1
- package/dist/commands/transcribe.js +2 -3
- package/dist/commands/transcribe.js.map +1 -1
- package/dist/commands/webhook.js +5 -6
- package/dist/commands/webhook.js.map +1 -1
- package/dist/index.d.ts +1 -3
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/dist/operations/processRenderInfo.js +1 -2
- package/dist/operations/processRenderInfo.js.map +1 -1
- package/dist/operations/syncAssetsDirectory/SubAssetSync.js +1 -2
- package/dist/operations/syncAssetsDirectory/SubAssetSync.js.map +1 -1
- package/dist/operations/syncAssetsDirectory/SyncCaption.js +3 -4
- package/dist/operations/syncAssetsDirectory/SyncCaption.js.map +1 -1
- package/dist/operations/syncAssetsDirectory/SyncFragmentIndex.js +3 -4
- package/dist/operations/syncAssetsDirectory/SyncFragmentIndex.js.map +1 -1
- package/dist/operations/syncAssetsDirectory/SyncImage.js +3 -4
- package/dist/operations/syncAssetsDirectory/SyncImage.js.map +1 -1
- package/dist/operations/syncAssetsDirectory/SyncStatus.js +1 -2
- package/dist/operations/syncAssetsDirectory/SyncStatus.js.map +1 -1
- package/dist/operations/syncAssetsDirectory/SyncTrack.js +3 -4
- package/dist/operations/syncAssetsDirectory/SyncTrack.js.map +1 -1
- package/dist/operations/syncAssetsDirectory/doAssetSync.js +1 -1
- package/dist/operations/syncAssetsDirectory/doAssetSync.js.map +1 -1
- package/dist/operations/syncAssetsDirectory.js +4 -5
- package/dist/operations/syncAssetsDirectory.js.map +1 -1
- package/dist/utils/createReadableStreamFromReadable.js +1 -2
- package/dist/utils/createReadableStreamFromReadable.js.map +1 -1
- package/dist/utils/detectChrome.js +1 -2
- package/dist/utils/detectChrome.js.map +1 -1
- package/dist/utils/index.js +1 -2
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/launchBrowserAndWaitForSDK.js +1 -2
- package/dist/utils/launchBrowserAndWaitForSDK.js.map +1 -1
- package/dist/utils/patchFragmentedMp4.js +1 -2
- package/dist/utils/patchFragmentedMp4.js.map +1 -1
- package/dist/utils/profileRender.js +1 -2
- package/dist/utils/profileRender.js.map +1 -1
- package/dist/utils/spawnViteServer.js +1 -2
- package/dist/utils/spawnViteServer.js.map +1 -1
- package/dist/utils/startPreviewServer.js +1 -2
- package/dist/utils/startPreviewServer.js.map +1 -1
- package/dist/utils/validateVideoResolution.js +1 -2
- package/dist/utils/validateVideoResolution.js.map +1 -1
- package/dist/utils/withSpinner.js +1 -2
- package/dist/utils/withSpinner.js.map +1 -1
- package/package.json +7 -9
package/LICENSE-FULL.md
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Editframe SDK License Agreement
|
|
2
|
+
|
|
3
|
+
**Effective Date:** January 12, 2026 **Version:** 2.0
|
|
4
|
+
|
|
5
|
+
This License Agreement ("License") governs your use of the Editframe SDK. By downloading, accessing, or using the SDK, you agree to these terms.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. Definitions
|
|
10
|
+
|
|
11
|
+
**"Total Employees"** — All full-time employees, part-time employees, and contractor equivalents across your Organization and all affiliated entities under common control. Contractors are counted proportionally by time worked.
|
|
12
|
+
|
|
13
|
+
**"Organization"** — You, your company, and all affiliates, subsidiaries, or related entities under common control.
|
|
14
|
+
|
|
15
|
+
**"Client-Side SDK"** — The source-available browser-based video rendering components, including the custom video tag for local file playback.
|
|
16
|
+
|
|
17
|
+
**"Server-Side Rendering"** — Hosted cloud service for parallel rendering at scale, supporting simultaneous rendering of large volumes of videos including longer and more complex ones.
|
|
18
|
+
|
|
19
|
+
**"Premium Player"** — Cloud-based CDN streaming service with API-authenticated streaming capabilities, optimized for editing workflows.
|
|
20
|
+
|
|
21
|
+
**"Cloud Services"** — Server-Side Rendering and Premium Player collectively.
|
|
22
|
+
|
|
23
|
+
**"Commercial Use"** — Any use in connection with business operations, revenue-generating activities, or professional services, including internal tools, production environments, and client deliverables.
|
|
24
|
+
|
|
25
|
+
**"Evaluation Use"** — Good-faith testing and proof-of-concept development, limited to 30 days. Excludes production deployment and ongoing business use.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 2. License Grant
|
|
30
|
+
|
|
31
|
+
### 2.1 Free Tier (≤3 Employees)
|
|
32
|
+
|
|
33
|
+
A limited, non-exclusive, non-transferable, revocable license to use the Client-Side SDK.
|
|
34
|
+
|
|
35
|
+
**Eligible:**
|
|
36
|
+
|
|
37
|
+
- Organizations with ≤3 total employees (Commercial Use permitted)
|
|
38
|
+
- Evaluation Use (any size, 30 days, non-production)
|
|
39
|
+
- Registered non-profits (any size)
|
|
40
|
+
- Accredited educational institutions
|
|
41
|
+
- Personal non-commercial projects
|
|
42
|
+
|
|
43
|
+
**Permitted:**
|
|
44
|
+
|
|
45
|
+
- Install and use the Client-Side SDK
|
|
46
|
+
- Use the custom video tag for local file playback (no API key required)
|
|
47
|
+
- Create and distribute video outputs for personal or Commercial Use
|
|
48
|
+
|
|
49
|
+
**Not included:** Cloud Services. Cloud Services require a Cloud Tier subscription regardless of company size.
|
|
50
|
+
|
|
51
|
+
### 2.2 Team Tier (4–10 Employees)
|
|
52
|
+
|
|
53
|
+
Includes all Free Tier rights. Full Client-Side SDK use for any business purpose including production. Does not include Cloud Services. See [editframe.com/pricing](https://editframe.com/pricing) for pricing.
|
|
54
|
+
|
|
55
|
+
### 2.3 Cloud Tier (11–20 Employees, or Any Size Requiring Cloud)
|
|
56
|
+
|
|
57
|
+
Required for organizations with 11–20 employees, or any organization using Cloud Services.
|
|
58
|
+
|
|
59
|
+
Includes all Team Tier rights, plus Server-Side Rendering and Premium Player via API. Usage-based billing applies in addition to base subscription. See [editframe.com/pricing](https://editframe.com/pricing) for pricing.
|
|
60
|
+
|
|
61
|
+
### 2.4 Enterprise (21+ Employees)
|
|
62
|
+
|
|
63
|
+
Contact [hello@editframe.com](mailto:hello@editframe.com). Includes all Cloud Tier features plus priority support and custom SLAs.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## 3. Restrictions
|
|
68
|
+
|
|
69
|
+
### 3.1 Prohibited
|
|
70
|
+
|
|
71
|
+
- Do not offer the Client-Side SDK or CLI itself as a managed rendering API or infrastructure product to third parties
|
|
72
|
+
- Do not fork, redistribute, or sublicense the Client-Side SDK or CLI under different terms
|
|
73
|
+
- Do not use the SDK above your tier threshold without upgrading
|
|
74
|
+
- Do not share credentials or API keys across separate organizations
|
|
75
|
+
- Do not implement workarounds to avoid usage-based billing
|
|
76
|
+
- Do not reverse engineer, decompile, or extract proprietary algorithms from Server-Side Rendering or Premium Player
|
|
77
|
+
- Do not access Cloud Service APIs other than through official client libraries
|
|
78
|
+
- Do not disable, circumvent, or tamper with telemetry
|
|
79
|
+
- Do not remove or alter copyright notices or attribution
|
|
80
|
+
- Do not use the SDK for unlawful purposes or in violation of export control regulations
|
|
81
|
+
|
|
82
|
+
### 3.2 Permitted
|
|
83
|
+
|
|
84
|
+
- Build any product that creates, processes, or delivers video — editors, workflows, motion design tools, content automation, and more
|
|
85
|
+
- Integrate the Client-Side SDK into platforms, coding environments, vibe coding tools, and AI agents (end users are individually responsible for compliance)
|
|
86
|
+
- Use the Client-Side SDK in CI/CD pipelines and development environments, provided you are not using it to render production video at scale
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## 4. Intellectual Property
|
|
91
|
+
|
|
92
|
+
Editframe, Inc. retains all rights to the SDK. This License does not transfer ownership. You retain all rights to video outputs you create ("Your Content"). Feedback may be used by us without obligation.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## 5. Telemetry
|
|
97
|
+
|
|
98
|
+
The SDK includes always-on telemetry collecting render counts, durations, IP addresses, domains, and feature usage. Telemetry cannot be disabled. Required for usage-based billing and license compliance. No video content is collected. See [editframe.com/privacy](https://editframe.com/privacy).
|
|
99
|
+
|
|
100
|
+
High Client-Side rendering volume does not trigger payment requirements — eligibility is determined by company size only.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## 6. Support
|
|
105
|
+
|
|
106
|
+
- **Free:** Community support
|
|
107
|
+
- **Team/Cloud:** Email and Slack, 48-hour response
|
|
108
|
+
- **Enterprise:** Dedicated support, custom SLAs
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 7. Warranties
|
|
113
|
+
|
|
114
|
+
THE SDK IS PROVIDED "AS IS" WITHOUT WARRANTIES OF ANY KIND. WE DO NOT WARRANT THAT THE SDK WILL BE ERROR-FREE, SECURE, OR UNINTERRUPTED. YOU ASSUME ALL RISKS.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## 8. Limitation of Liability
|
|
119
|
+
|
|
120
|
+
WE SHALL NOT BE LIABLE FOR INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES. TOTAL LIABILITY SHALL NOT EXCEED AMOUNTS PAID IN THE 12 MONTHS PRECEDING THE CLAIM, OR $100 USD, WHICHEVER IS GREATER.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## 9. Termination
|
|
125
|
+
|
|
126
|
+
This License is effective upon first use. We may terminate immediately for breach, failure to maintain required subscription tier, or fraudulent conduct (10 days' notice where feasible). Upon termination, all rights cease and you must delete all SDK copies.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## 10. Compliance
|
|
131
|
+
|
|
132
|
+
Self-report your employee count accurately. Violations may result in termination, back-payment of owed fees, liquidated damages (3× unpaid fees), and legal action. Voluntary disclosure may result in waived penalties.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## 11. General
|
|
137
|
+
|
|
138
|
+
- **Governing Law:** Delaware
|
|
139
|
+
- **Jurisdiction:** New York County, NY
|
|
140
|
+
- **Export Controls:** You must comply with U.S. Export Administration Regulations
|
|
141
|
+
- **Assignment:** You may not assign this License without written consent
|
|
142
|
+
- **Entire Agreement:** This License, Terms of Service, and Privacy Policy constitute the full agreement
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
[hello@editframe.com](mailto:hello@editframe.com) · editframe.com
|
|
147
|
+
|
|
148
|
+
**By using the SDK, you agree to these terms.**
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Editframe SDK License
|
|
2
|
+
|
|
3
|
+
The Editframe SDK is source-available and free for individuals and small teams, including for commercial use. We've kept the bar low intentionally — if you're building something, you should be able to just use it.
|
|
4
|
+
|
|
5
|
+
- [Free Tier](#free-tier)
|
|
6
|
+
- [Paid Tiers](#paid-tiers)
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Free Tier
|
|
11
|
+
|
|
12
|
+
Copyright © 2026 [Editframe](https://editframe.com)
|
|
13
|
+
|
|
14
|
+
### Who Qualifies
|
|
15
|
+
|
|
16
|
+
- Individuals and freelancers
|
|
17
|
+
- Organizations with 3 or fewer total employees
|
|
18
|
+
- Non-profits and not-for-profit organizations (any size)
|
|
19
|
+
- Accredited educational institutions
|
|
20
|
+
- Organizations evaluating Editframe in good faith, prior to commercial deployment (30 days)
|
|
21
|
+
|
|
22
|
+
### What You Can Build
|
|
23
|
+
|
|
24
|
+
Use and modify the SDK to build any product that creates, processes, or delivers video — editors, workflows, motion design tools, content automation, and more. Platforms, coding environments, vibe coding tools, and AI agents may freely integrate the SDK. End users are each responsible for their own license compliance.
|
|
25
|
+
|
|
26
|
+
### What Is Not Permitted
|
|
27
|
+
|
|
28
|
+
You may not offer the Client-Side SDK or CLI itself as a managed rendering API or infrastructure product to third parties. You may not sell, sublicense, or redistribute the SDK or modifications to it as a standalone product.
|
|
29
|
+
|
|
30
|
+
### Warranty
|
|
31
|
+
|
|
32
|
+
The SDK is provided as-is without warranty of any kind. See the [Full License Agreement](./LICENSE-FULL.md) for complete terms.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Paid Tiers
|
|
37
|
+
|
|
38
|
+
Organizations outside the Free Tier must subscribe to a paid plan.
|
|
39
|
+
|
|
40
|
+
| Tier | Employees |
|
|
41
|
+
| :---- | :---- |
|
|
42
|
+
| Team | 4–10 |
|
|
43
|
+
| Cloud | 11–20, or any size needing Cloud Rendering & Player |
|
|
44
|
+
| Enterprise | 21+ |
|
|
45
|
+
|
|
46
|
+
All paid tiers include full SDK rights.
|
|
47
|
+
|
|
48
|
+
Cloud Rendering & Player — parallel rendering and CDN streaming optimized for editing workflows — requires a Cloud Tier subscription regardless of company size.
|
|
49
|
+
|
|
50
|
+
[View pricing →](https://editframe.com/pricing) · Enterprise: [hello@editframe.com](mailto:hello@editframe.com)
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
Unsure which tier applies? See the [FAQ](https://editframe.com/faq) or reach out at [hello@editframe.com](mailto:hello@editframe.com).
|
|
55
|
+
|
|
56
|
+
[Full License Agreement](./LICENSE-FULL.md) · [Terms of Service](https://editframe.com/terms)
|
|
57
|
+
|
|
58
|
+
*© 2026 Editframe, Inc.*
|
package/dist/VERSION.js
CHANGED
package/dist/VERSION.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VERSION.js","names":[],"sources":["../src/VERSION.ts"],"
|
|
1
|
+
{"version":3,"file":"VERSION.js","names":[],"sources":["../src/VERSION.ts"],"mappings":";AAAA,MAAa,UAAU"}
|
package/dist/commands/auth.js
CHANGED
|
@@ -3,7 +3,6 @@ import { program } from "commander";
|
|
|
3
3
|
import chalk from "chalk";
|
|
4
4
|
import debug from "debug";
|
|
5
5
|
import ora from "ora";
|
|
6
|
-
|
|
7
6
|
//#region src/commands/auth.ts
|
|
8
7
|
const log = debug("ef:cli:auth");
|
|
9
8
|
const getApiData = async () => {
|
|
@@ -22,7 +21,7 @@ const authCommand = program.command("auth").description("Fetch organization data
|
|
|
22
21
|
log("Error:", error);
|
|
23
22
|
}
|
|
24
23
|
});
|
|
25
|
-
|
|
26
24
|
//#endregion
|
|
27
|
-
export {
|
|
25
|
+
export {};
|
|
26
|
+
|
|
28
27
|
//# sourceMappingURL=auth.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","names":[
|
|
1
|
+
{"version":3,"file":"auth.js","names":[],"sources":["../../src/commands/auth.ts"],"mappings":";;;;;;AAOA,MAAM,MAAM,MAAM,cAAc;AAWhC,MAAa,aAAa,YAAY;AAEpC,SADiB,MAAM,WAAW,CAAC,mBAAmB,uBAAuB,EAC7D,MAAM;;AAGxB,MAAM,cAAc,QACjB,QAAQ,OAAO,CACf,YAAY,0CAA0C,CACtD,OAAO,YAAY;AAElB,KAAI,YADY,YAAY,MAAM,CACV;CAExB,MAAM,UAAU,IAAI,aAAa,CAAC,OAAO;AAEzC,KAAI;EACF,MAAM,UAAU,MAAM,YAAY;AAClC,UAAQ,QAAQ,4BAA4B;AAC5C,UAAQ,OAAO,MAAM,MAAM,MAAM,gBAAgB,QAAQ,WAAW,eAAe,CAAC;AACpF,UAAQ,OAAO,MAAM,MAAM,KAAK,cAAc,QAAQ,YAAY,oBAAoB,CAAC;UAChF,OAAY;AACnB,UAAQ,KAAK,yBAAyB;AACtC,MAAI,UAAU,MAAM;;EAEtB"}
|
package/dist/commands/check.js
CHANGED
|
@@ -3,14 +3,13 @@ import chalk from "chalk";
|
|
|
3
3
|
import ora from "ora";
|
|
4
4
|
import { exec } from "node:child_process";
|
|
5
5
|
import os from "node:os";
|
|
6
|
-
|
|
7
6
|
//#region src/commands/check.ts
|
|
8
7
|
const checks = {
|
|
9
8
|
ffmpeg: {
|
|
10
9
|
message: () => {
|
|
11
|
-
const platform
|
|
10
|
+
const platform = os.platform();
|
|
12
11
|
const message = ["Processing assets for <ef-video>, <ef-audio>, <ef-captions>, and <ef-waveform>\n elements requires ffmpeg to be installed."];
|
|
13
|
-
switch (platform
|
|
12
|
+
switch (platform) {
|
|
14
13
|
case "darwin":
|
|
15
14
|
message.push("On platform=darwin you can install ffmpeg using Homebrew:");
|
|
16
15
|
message.push(" - brew install ffmpeg");
|
|
@@ -27,7 +26,7 @@ const checks = {
|
|
|
27
26
|
message.push(" - winget install ffmpeg");
|
|
28
27
|
break;
|
|
29
28
|
default:
|
|
30
|
-
message.push(`Unrecognized platform ${platform
|
|
29
|
+
message.push(`Unrecognized platform ${platform}`);
|
|
31
30
|
message.push("You can download ffmpeg from https://ffmpeg.org/download.html");
|
|
32
31
|
message.push("Or try installing it from your operating system's package manager");
|
|
33
32
|
break;
|
|
@@ -83,7 +82,7 @@ program.command("check").description("Check on dependencies and other requiremen
|
|
|
83
82
|
}
|
|
84
83
|
}
|
|
85
84
|
});
|
|
86
|
-
|
|
87
85
|
//#endregion
|
|
88
|
-
export {
|
|
86
|
+
export {};
|
|
87
|
+
|
|
89
88
|
//# sourceMappingURL=check.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check.js","names":[
|
|
1
|
+
{"version":3,"file":"check.js","names":[],"sources":["../../src/commands/check.ts"],"mappings":";;;;;;AAWA,MAAM,SAA0C;CAC9C,QAAQ;EAC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MAAI;AACF,SAAM,MAAM,OAAO;AACnB,WAAQ,QAAQ,MAAM,MAAM,QAAQ,cAAc,UAAU,WAAW,CAAC;WACjE,QAAQ;AACf,WAAQ,KAAK,MAAM,MAAM,MAAM,eAAe,UAAU,WAAW,CAAC;AACpE,WAAQ,OAAO,MAAM,MAAM,IAAI,MAAM,SAAS,CAAC,KAAK,OAAO,CAAC,CAAC;AAC7D,WAAQ,OAAO,MAAM,KAAK;;;EAG9B"}
|
|
@@ -19,12 +19,11 @@ import { inspect } from "node:util";
|
|
|
19
19
|
import { RenderInfoSchema, getRenderInfo } from "@editframe/elements/node";
|
|
20
20
|
import { parse } from "node-html-parser";
|
|
21
21
|
import * as tar from "tar";
|
|
22
|
-
|
|
23
22
|
//#region src/commands/cloud-render.ts
|
|
24
23
|
const log = debug("ef:cli:render");
|
|
25
|
-
const buildAssetId = async (srcDir, src, basename
|
|
24
|
+
const buildAssetId = async (srcDir, src, basename) => {
|
|
26
25
|
log(`Building image asset id for ${src}\n`);
|
|
27
|
-
const syncStatus = new SyncStatus(join(srcDir, "assets", ".cache", await md5FilePath(path.join(srcDir, src)), basename
|
|
26
|
+
const syncStatus = new SyncStatus(join(srcDir, "assets", ".cache", await md5FilePath(path.join(srcDir, src)), basename));
|
|
28
27
|
const info = await syncStatus.readInfo();
|
|
29
28
|
if (!info) throw new Error(`SyncStatus info is not found for ${syncStatus.infoPath}`);
|
|
30
29
|
return info.id;
|
|
@@ -127,7 +126,7 @@ program.command("cloud-render [directory]").description("Render a directory's in
|
|
|
127
126
|
process.stderr.write("\n");
|
|
128
127
|
});
|
|
129
128
|
});
|
|
130
|
-
|
|
131
129
|
//#endregion
|
|
132
|
-
export {
|
|
130
|
+
export {};
|
|
131
|
+
|
|
133
132
|
//# sourceMappingURL=cloud-render.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud-render.js","names":["
|
|
1
|
+
{"version":3,"file":"cloud-render.js","names":["parseHTML"],"sources":["../../src/commands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WAAW;AAChC,WAAQ,OAAO,MACb,iBAAiB,QAAQ,OAAO,0DACjC;AACD;;;;;;;;;EASF,MAAM,YAAY,IAAI,OACpB;GACE,MAAM;GACN,KAAK;GACN,EACD,CAAC,IAAI,CACN;EACD,MAAM,WAAW,IAAI,aAAa;AAClC,YAAU,KAAK,SAAS;AAExB,QAAM,aAAa,WAAW,EAAE,OAAO,IAAI,iCAAiC,SAAS,CAAC;AACtF,UAAQ,OAAO,MAAM,2BAA2B;AAChD,UAAQ,OAAO,MAAM,QAAQ,OAAO,CAAC;AACrC,UAAQ,OAAO,MAAM,KAAK;GAE7B;EACD"}
|
package/dist/commands/preview.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { program } from "commander";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { spawn } from "node:child_process";
|
|
4
|
-
|
|
5
4
|
//#region src/commands/preview.ts
|
|
6
5
|
program.command("preview [directory]").description("Preview a directory's index.html file").action(async (projectDirectory = ".") => {
|
|
7
6
|
const baseCwd = process.env.ORIGINAL_CWD || process.cwd();
|
|
@@ -11,7 +10,7 @@ program.command("preview [directory]").description("Preview a directory's index.
|
|
|
11
10
|
stdio: "inherit"
|
|
12
11
|
});
|
|
13
12
|
});
|
|
14
|
-
|
|
15
13
|
//#endregion
|
|
16
|
-
export {
|
|
14
|
+
export {};
|
|
15
|
+
|
|
17
16
|
//# sourceMappingURL=preview.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preview.js","names":[],"sources":["../../src/commands/preview.ts"],"
|
|
1
|
+
{"version":3,"file":"preview.js","names":[],"sources":["../../src/commands/preview.ts"],"mappings":";;;;AAIA,QACG,QAAQ,sBAAsB,CAC9B,YAAY,wCAAwC,CACpD,OAAO,OAAO,mBAAmB,QAAQ;CAGxC,MAAM,UAAU,QAAQ,IAAI,gBAAgB,QAAQ,KAAK;AAGzD,OAAM,OAAO,CAAC,QAAQ,MAAM,EAAE;EAC5B,KAHyB,KAAK,QAAQ,SAAS,iBAAiB;EAIhE,OAAO;EACP,OAAO;EACR,CAAC;EACF"}
|
|
@@ -2,7 +2,6 @@ import { getClient } from "../utils/index.js";
|
|
|
2
2
|
import { program } from "commander";
|
|
3
3
|
import ora from "ora";
|
|
4
4
|
import { getFileDetail, getFileProcessingProgress, upload } from "@editframe/api/node";
|
|
5
|
-
|
|
6
5
|
//#region src/commands/process-file.ts
|
|
7
6
|
program.command("process-file <file>").description("Upload a audio/video to Editframe for processing.").action(async (path) => {
|
|
8
7
|
const client = getClient();
|
|
@@ -24,7 +23,7 @@ program.command("process-file <file>").description("Upload a audio/video to Edit
|
|
|
24
23
|
console.log("Processed file info");
|
|
25
24
|
console.log(detail);
|
|
26
25
|
});
|
|
27
|
-
|
|
28
26
|
//#endregion
|
|
29
|
-
export {
|
|
27
|
+
export {};
|
|
28
|
+
|
|
30
29
|
//# sourceMappingURL=process-file.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-file.js","names":[],"sources":["../../src/commands/process-file.ts"],"
|
|
1
|
+
{"version":3,"file":"process-file.js","names":[],"sources":["../../src/commands/process-file.ts"],"mappings":";;;;;AAKA,QACG,QAAQ,sBAAsB,CAC9B,YAAY,oDAAoD,CAChE,OAAO,OAAO,SAAiB;CAC9B,MAAM,SAAS,WAAW;CAE1B,MAAM,gBAAgB,IAAI,8BAA8B,CAAC,OAAO;CAEhE,MAAM,EAAE,MAAM,mBAAmB,MAAM,OAAO,QAAQ,KAAK;AAE3D,YAAW,MAAM,SAAS,eACxB,eAAc,OAAO,oBAAoB,MAAM,MAAM,UAAU,QAAQ,EAAE,CAAC;AAE5E,eAAc,QAAQ,kBAAkB;AAExC,KAAI,KAAK,SAAS,SAAS;AACzB,UAAQ,IAAI,cAAc,KAAK,KAAK,gCAAgC;AACpE,UAAQ,IAAI,YAAY,KAAK,GAAG;AAChC;;CAGF,MAAM,iBAAiB,IAAI,qCAAqC;AAChE,gBAAe,OAAO;CACtB,MAAM,WAAW,MAAM,0BAA0B,QAAQ,KAAK,GAAG;AAEjE,YAAW,MAAM,SAAS,SACxB,KAAI,MAAM,SAAS,WACjB,gBAAe,OAAO,gBAAgB,MAAM,MAAM,KAAK,UAAU,QAAQ,EAAE,CAAC;UACnE,MAAM,SAAS,WACxB,gBAAe,QAAQ,sBAAsB;CAIjD,MAAM,SAAS,MAAM,cAAc,QAAQ,KAAK,GAAG;AAEnD,SAAQ,IAAI,sBAAsB;AAClC,SAAQ,IAAI,OAAO;EACnB"}
|
package/dist/commands/process.js
CHANGED
|
@@ -6,7 +6,6 @@ import { program } from "commander";
|
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import { spawnSync } from "node:child_process";
|
|
8
8
|
import { getRenderInfo } from "@editframe/elements/node";
|
|
9
|
-
|
|
10
9
|
//#region src/commands/process.ts
|
|
11
10
|
program.command("process [directory]").description("Process's a directory's index.html file, analyzing assets and processing them for rendering").action(async (directory) => {
|
|
12
11
|
directory ??= ".";
|
|
@@ -33,7 +32,7 @@ program.command("process [directory]").description("Process's a directory's inde
|
|
|
33
32
|
await processRenderInfo(await page.evaluate(getRenderInfo));
|
|
34
33
|
});
|
|
35
34
|
});
|
|
36
|
-
|
|
37
35
|
//#endregion
|
|
38
|
-
export {
|
|
36
|
+
export {};
|
|
37
|
+
|
|
39
38
|
//# sourceMappingURL=process.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process.js","names":[],"sources":["../../src/commands/process.ts"],"
|
|
1
|
+
{"version":3,"file":"process.js","names":[],"sources":["../../src/commands/process.ts"],"mappings":";;;;;;;;;AASA,QACG,QAAQ,sBAAsB,CAC9B,YACC,8FACD,CACA,OAAO,OAAO,cAAc;AAC3B,eAAc;CAGd,MAAM,UAAU,QAAQ,IAAI,gBAAgB,QAAQ,KAAK;CACzD,MAAM,oBAAoB,KAAK,QAAQ,SAAS,UAAU;CAE1D,MAAM,UAAU,KAAK,KAAK,mBAAmB,OAAO;AACpD,OAAM,YAAY,cAAc,YAAY;AAC1C,YAAU,OAAO;GAAC;GAAQ;GAAS;GAAkB,EAAE,EACrD,OAAO,WACR,CAAC;GACF;CAEF,MAAM,gBAAgB,MAAM,cAAc,MAAM,QAAQ;AACxD,SAAQ,OAAO,MAAM,6BAA6B;AAClD,SAAQ,OAAO,MAAM,cAAc,IAAI;AACvC,SAAQ,OAAO,MAAM,KAAK;AAC1B,OAAM,2BACJ;EACE,KAAK,cAAc;EACnB,eAAe;EACf,aAAa;EACb,UAAU;EACX,EACD,OAAO,SAAS;AAEd,QAAM,kBADa,MAAM,KAAK,SAAS,cAAc,CAClB;GAEtC;EACD"}
|
package/dist/commands/render.js
CHANGED
|
@@ -9,7 +9,6 @@ import ora from "ora";
|
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
import { readFile } from "node:fs/promises";
|
|
11
11
|
import { createWriteStream, mkdirSync } from "node:fs";
|
|
12
|
-
|
|
13
12
|
//#region src/commands/render.ts
|
|
14
13
|
const log = debug("ef:cli:render");
|
|
15
14
|
async function sendTelemetry(efRenderHost, token, payload) {
|
|
@@ -168,10 +167,10 @@ program.command("render [directory]").description("Render a video composition lo
|
|
|
168
167
|
throw error;
|
|
169
168
|
}
|
|
170
169
|
outputStream.end();
|
|
171
|
-
await new Promise((resolve
|
|
170
|
+
await new Promise((resolve, reject) => {
|
|
172
171
|
outputStream.on("finish", () => {
|
|
173
172
|
log(`Render complete: ${chunkCount} chunks, ${totalBytes} bytes written to ${outputPath}`);
|
|
174
|
-
resolve
|
|
173
|
+
resolve();
|
|
175
174
|
});
|
|
176
175
|
outputStream.on("error", reject);
|
|
177
176
|
});
|
|
@@ -188,7 +187,7 @@ program.command("render [directory]").description("Render a video composition lo
|
|
|
188
187
|
}
|
|
189
188
|
process.stderr.write(`\nRender complete: ${outputPath}\n`);
|
|
190
189
|
});
|
|
191
|
-
|
|
192
190
|
//#endregion
|
|
193
|
-
export {
|
|
191
|
+
export {};
|
|
192
|
+
|
|
194
193
|
//# sourceMappingURL=render.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","names":["token: string | undefined","efRenderHost: string","renderData: Record<string, unknown> | undefined","renderUrl: string","viteServer: SpawnedViteServer | null","lastProgress: {\n currentFrame: number;\n totalFrames: number;\n renderedMs: number;\n totalDurationMs: number;\n elapsedMs: number;\n speedMultiplier: number;\n } | null","renderInfo: any","renderOptions: any"],"sources":["../../src/commands/render.ts"],"sourcesContent":["import { readFile } from \"node:fs/promises\";\nimport { createWriteStream, mkdirSync } from \"node:fs\";\nimport path from \"node:path\";\nimport { program } from \"commander\";\nimport debug from \"debug\";\nimport ora from \"ora\";\nimport { launchBrowserAndWaitForSDK } from \"../utils/launchBrowserAndWaitForSDK.js\";\nimport { spawnViteServer, type SpawnedViteServer } from \"../utils/spawnViteServer.js\";\nimport { patchFragmentedMp4 } from \"../utils/patchFragmentedMp4.js\";\nimport { StreamTargetChunk } from \"mediabunny\";\nimport { withProfiling } from \"../utils/profileRender.js\";\nimport { VERSION } from \"../VERSION.js\";\n\ndeclare global {\n interface Window {\n EF_RENDER_DATA: any;\n EF_RENDER: any;\n }\n}\n\nconst log = debug(\"ef:cli:render\");\n\nexport async function sendTelemetry(\n efRenderHost: string,\n token: string | undefined,\n payload: Record<string, unknown>,\n): Promise<void> {\n if (process.env.EF_NO_TELEMETRY) return;\n try {\n await fetch(`${efRenderHost}/api/v1/telemetry`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n ...(token && { Authorization: `Bearer ${token}` }),\n },\n body: JSON.stringify(payload),\n });\n } catch {\n // Telemetry must never fail the render — swallow all errors.\n }\n}\n\n/**\n * Format milliseconds as MM:SS or HH:MM:SS\n */\nfunction formatTime(ms: number): string {\n const totalSeconds = Math.floor(ms / 1000);\n const hours = Math.floor(totalSeconds / 3600);\n const minutes = Math.floor((totalSeconds % 3600) / 60);\n const seconds = totalSeconds % 60;\n\n if (hours > 0) {\n return `${hours}:${minutes.toString().padStart(2, \"0\")}:${seconds.toString().padStart(2, \"0\")}`;\n }\n return `${minutes}:${seconds.toString().padStart(2, \"0\")}`;\n}\n\nprogram\n .command(\"render [directory]\")\n .description(\"Render a video composition locally\")\n .option(\"-o, --output <path>\", \"Output file path\", \"output.mp4\")\n .option(\"--url <url>\", \"URL to render (bypasses directory/server startup)\")\n .option(\"-d, --data <json>\", \"Custom render data (JSON string)\")\n .option(\"--data-file <path>\", \"Custom render data from JSON file\")\n .option(\"--fps <number>\", \"Frame rate\", \"30\")\n .option(\"--scale <number>\", \"Resolution scale (0-1)\", \"1\")\n .option(\"--include-audio\", \"Include audio track\", true)\n .option(\"--no-include-audio\", \"Exclude audio track\")\n .option(\"--from-ms <number>\", \"Start time in milliseconds\")\n .option(\"--to-ms <number>\", \"End time in milliseconds\")\n .option(\"--experimental-native-render\", \"Use experimental canvas capture API (faster)\")\n .option(\"--profile\", \"Enable CPU profiling\")\n .option(\"--profile-output <path>\", \"Profile output path\", \"./render-profile.cpuprofile\")\n .action(async (directory = \".\", options) => {\n const programOpts = program.opts();\n const token: string | undefined = programOpts.token || process.env.EF_TOKEN;\n const efRenderHost: string =\n programOpts.efRenderHost || process.env.EF_RENDER_HOST || \"https://editframe.com\";\n\n // If running from the dev script (via tsx), ORIGINAL_CWD contains the user's actual directory\n const baseCwd = process.env.ORIGINAL_CWD || process.cwd();\n const outputPath = path.resolve(baseCwd, options.output);\n\n // Parse custom data if provided\n let renderData: Record<string, unknown> | undefined;\n if (options.dataFile) {\n const dataFileContent = await readFile(options.dataFile, \"utf-8\");\n renderData = JSON.parse(dataFileContent);\n log(\"Loaded render data from file:\", options.dataFile);\n } else if (options.data) {\n renderData = JSON.parse(options.data);\n log(\"Using render data from --data option\");\n }\n\n // Parse numeric options\n const fps = parseInt(options.fps, 10);\n const scale = parseFloat(options.scale);\n const fromMs = options.fromMs ? parseInt(options.fromMs, 10) : undefined;\n const toMs = options.toMs ? parseInt(options.toMs, 10) : undefined;\n\n // Single initialization spinner for all setup steps\n const initSpinner = ora(\"Initializing...\").start();\n\n let renderUrl: string;\n let viteServer: SpawnedViteServer | null = null;\n let renderStarted = false;\n\n try {\n // Determine URL to render\n if (options.url) {\n // Use provided URL directly\n renderUrl = options.url;\n log(\"Using provided URL:\", renderUrl);\n } else {\n // Spawn Vite dev server as subprocess\n // This allows Vite to run with full config resolution (including Tailwind)\n // while we maintain Playwright control for rendering\n const srcDir = path.resolve(baseCwd, directory);\n viteServer = await spawnViteServer(srcDir);\n renderUrl = viteServer.url;\n log(\"Vite server spawned at:\", renderUrl);\n }\n\n // Launch browser and load SDK (all within initialization)\n await launchBrowserAndWaitForSDK(\n {\n url: renderUrl,\n headless: true,\n interactive: false,\n efInteractive: false,\n nativeRender: options.experimentalNativeRender === true,\n profile: options.profile === true,\n profileOutput: options.profileOutput,\n silent: true, // Suppress individual spinners since we show unified \"Initializing...\"\n },\n async (page) => {\n initSpinner.succeed(\"Ready\");\n\n // Now handle the render\n await withProfiling(\n page,\n {\n enabled: options.profile === true,\n outputPath: options.profileOutput,\n },\n async () => {\n // Ensure output directory exists\n mkdirSync(path.dirname(outputPath), { recursive: true });\n\n // Open output file for streaming writes\n const outputStream = createWriteStream(outputPath);\n let chunkCount = 0;\n let totalBytes = 0;\n\n // Expose chunk handler - writes through the stream in order\n await page.exposeFunction(\"onRenderChunk\", (chunk: StreamTargetChunk) => {\n outputStream.write(Buffer.from(chunk.data));\n chunkCount++;\n totalBytes += chunk.data.length;\n log(\n `Received chunk ${chunkCount}: ${chunk.data.length} bytes (total: ${totalBytes} bytes)`,\n );\n });\n\n // Set custom render data if provided\n if (renderData) {\n await page.evaluate((data) => {\n window.EF_RENDER_DATA = data;\n }, renderData);\n log(\"Set EF_RENDER_DATA:\", renderData);\n }\n\n // Wait for EF_RENDER API to be available\n await page.waitForFunction(() => typeof window.EF_RENDER !== \"undefined\", {\n timeout: 10_000,\n });\n\n // Check if ready\n const isReady = await page.evaluate(() => window.EF_RENDER?.isReady());\n if (!isReady) {\n throw new Error(\"Render API is not ready. No ef-timegroup found.\");\n }\n\n // Create progress spinner\n const progressSpinner = ora(\"Rendering video...\").start();\n\n // Track last progress for completion message\n let lastProgress: {\n currentFrame: number;\n totalFrames: number;\n renderedMs: number;\n totalDurationMs: number;\n elapsedMs: number;\n speedMultiplier: number;\n } | null = null;\n\n // Expose progress callback\n await page.exposeFunction(\n \"onRenderProgress\",\n (progress: {\n progress: number;\n currentFrame: number;\n totalFrames: number;\n renderedMs: number;\n totalDurationMs: number;\n elapsedMs: number;\n estimatedRemainingMs: number;\n speedMultiplier: number;\n }) => {\n const percent = (progress.progress * 100).toFixed(1);\n const renderedTime = formatTime(progress.renderedMs);\n const totalTime = formatTime(progress.totalDurationMs);\n const remainingTime = formatTime(progress.estimatedRemainingMs);\n const speed = progress.speedMultiplier.toFixed(2);\n\n progressSpinner.text = `Rendering: ${progress.currentFrame}/${progress.totalFrames} frames (${percent}%) | ${renderedTime}/${totalTime} | ${remainingTime} remaining | ${speed}x speed`;\n\n // Store last progress for completion message\n lastProgress = {\n currentFrame: progress.currentFrame,\n totalFrames: progress.totalFrames,\n renderedMs: progress.renderedMs,\n totalDurationMs: progress.totalDurationMs,\n elapsedMs: progress.elapsedMs,\n speedMultiplier: progress.speedMultiplier,\n };\n },\n );\n\n // Render with streaming\n renderStarted = true;\n let renderInfo: any = null;\n try {\n const renderOptions: any = {\n fps,\n scale,\n includeAudio: options.includeAudio !== false,\n };\n\n if (fromMs !== undefined) {\n renderOptions.fromMs = fromMs;\n }\n if (toMs !== undefined) {\n renderOptions.toMs = toMs;\n }\n\n const renderStartTime = Date.now();\n await page.evaluate(async (opts) => {\n await window.EF_RENDER!.renderStreaming(opts);\n }, renderOptions);\n const renderDurationMs = Date.now() - renderStartTime;\n\n // Collect render info for telemetry and moov patching\n renderInfo = await page.evaluate(async () => {\n try {\n return await window.EF_RENDER!.getRenderInfo();\n } catch {\n return null;\n }\n });\n\n // Build completion message with performance stats\n if (lastProgress) {\n const p = lastProgress as {\n currentFrame: number;\n totalFrames: number;\n renderedMs: number;\n totalDurationMs: number;\n elapsedMs: number;\n speedMultiplier: number;\n };\n const renderedTime = formatTime(p.renderedMs);\n const totalTime = formatTime(p.totalDurationMs);\n const elapsedTime = formatTime(p.elapsedMs);\n const speed = p.speedMultiplier.toFixed(2);\n progressSpinner.succeed(\n `Render complete: ${p.currentFrame}/${p.totalFrames} frames | ${renderedTime}/${totalTime} | ${elapsedTime} elapsed | ${speed}x speed`,\n );\n } else {\n progressSpinner.succeed(\"Render complete\");\n }\n\n // Send telemetry (fire-and-forget)\n void sendTelemetry(efRenderHost, token, {\n render_path: \"cli\",\n duration_ms: renderDurationMs,\n ...(renderInfo?.width != null && { width: renderInfo.width }),\n ...(renderInfo?.height != null && {\n height: renderInfo.height,\n }),\n ...(renderInfo?.fps != null && { fps: renderInfo.fps }),\n feature_usage: {\n efMediaCount: renderInfo ? Object.keys(renderInfo.assets.efMedia).length : 0,\n efImageCount: renderInfo?.assets.efImage.length ?? 0,\n efCaptionsCount: renderInfo?.assets.efCaptions.length ?? 0,\n efTextCount: 0,\n },\n cli_version: VERSION,\n });\n } catch (error) {\n progressSpinner.fail(\"Render failed\");\n throw error;\n }\n\n // Close the output stream and wait for all chunks to flush\n outputStream.end();\n await new Promise<void>((resolve, reject) => {\n outputStream.on(\"finish\", () => {\n log(\n `Render complete: ${chunkCount} chunks, ${totalBytes} bytes written to ${outputPath}`,\n );\n resolve();\n });\n outputStream.on(\"error\", reject);\n });\n\n if (renderInfo?.durationMs) {\n await patchFragmentedMp4(outputPath, renderInfo.durationMs);\n }\n },\n );\n },\n );\n } catch (error) {\n if (!renderStarted) {\n initSpinner.fail(\"Initialization failed\");\n }\n throw error;\n }\n\n // Clean up spawned Vite process\n if (viteServer) {\n viteServer.kill();\n log(\"Vite server stopped\");\n }\n\n process.stderr.write(`\\nRender complete: ${outputPath}\\n`);\n });\n"],"mappings":";;;;;;;;;;;;;AAoBA,MAAM,MAAM,MAAM,gBAAgB;AAElC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O,WAAW,OAAO;MAC5D,GAAI,YAAY,UAAU,QAAQ,EAChC,QAAQ,WAAW,QACpB;MACD,GAAI,YAAY,OAAO,QAAQ,EAAE,KAAK,WAAW,KAAK;MACtD,eAAe;OACb,cAAc,aAAa,OAAO,KAAK,WAAW,OAAO,QAAQ,CAAC,SAAS;OAC3E,cAAc,YAAY,OAAO,QAAQ,UAAU;OACnD,iBAAiB,YAAY,OAAO,WAAW,UAAU;OACzD,aAAa;OACd;MACD,aAAa;MACd,CAAC;aACK,OAAO;AACd,qBAAgB,KAAK,gBAAgB;AACrC,WAAM;;AAIR,iBAAa,KAAK;AAClB,UAAM,IAAI,SAAe,SAAS,WAAW;AAC3C,kBAAa,GAAG,gBAAgB;AAC9B,UACE,oBAAoB,WAAW,WAAW,WAAW,oBAAoB,aAC1E;AACD,eAAS;OACT;AACF,kBAAa,GAAG,SAAS,OAAO;MAChC;AAEF,QAAI,YAAY,WACd,OAAM,mBAAmB,YAAY,WAAW,WAAW;KAGhE;IAEJ;UACM,OAAO;AACd,MAAI,CAAC,cACH,aAAY,KAAK,wBAAwB;AAE3C,QAAM;;AAIR,KAAI,YAAY;AACd,aAAW,MAAM;AACjB,MAAI,sBAAsB;;AAG5B,SAAQ,OAAO,MAAM,sBAAsB,WAAW,IAAI;EAC1D"}
|
package/dist/commands/sync.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { syncAssetDirectory } from "../operations/syncAssetsDirectory.js";
|
|
2
2
|
import { program } from "commander";
|
|
3
3
|
import path, { join } from "node:path";
|
|
4
|
-
|
|
5
4
|
//#region src/commands/sync.ts
|
|
6
5
|
program.command("sync").description("Sync assets to Editframe servers for rendering").argument("[directory]", "Path to project directory to sync.").action(async (directory = ".") => {
|
|
7
6
|
const baseCwd = process.env.ORIGINAL_CWD || process.cwd();
|
|
8
7
|
await syncAssetDirectory(join(path.resolve(baseCwd, directory), "src", "assets", ".cache"));
|
|
9
8
|
});
|
|
10
|
-
|
|
11
9
|
//#endregion
|
|
12
|
-
export {
|
|
10
|
+
export {};
|
|
11
|
+
|
|
13
12
|
//# sourceMappingURL=sync.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.js","names":[],"sources":["../../src/commands/sync.ts"],"
|
|
1
|
+
{"version":3,"file":"sync.js","names":[],"sources":["../../src/commands/sync.ts"],"mappings":";;;;AAIA,QACG,QAAQ,OAAO,CACf,YAAY,iDAAiD,CAC7D,SAAS,eAAe,qCAAqC,CAC7D,OAAO,OAAO,YAAY,QAAQ;CAEjC,MAAM,UAAU,QAAQ,IAAI,gBAAgB,QAAQ,KAAK;AAGzD,OAAM,mBAAmB,KAFC,KAAK,QAAQ,SAAS,UAAU,EAET,OAAO,UAAU,SAAS,CAAC;EAC5E"}
|
|
@@ -4,7 +4,6 @@ import ora from "ora";
|
|
|
4
4
|
import { resolve } from "node:path";
|
|
5
5
|
import { writeFile } from "node:fs/promises";
|
|
6
6
|
import { generateCaptionDataFromPath } from "@editframe/assets";
|
|
7
|
-
|
|
8
7
|
//#region src/commands/transcribe.ts
|
|
9
8
|
program.command("transcribe <input>").description("Generate captions from audio/video file using whisper_timestamped").option("-o, --output <file>", "Output JSON file", "captions.json").option("-l, --language <lang>", "Language code (e.g., en, es, fr)", "en").action(async (input, options) => {
|
|
10
9
|
const spinner = ora("Generating captions...").start();
|
|
@@ -31,7 +30,7 @@ program.command("transcribe <input>").description("Generate captions from audio/
|
|
|
31
30
|
process.exit(1);
|
|
32
31
|
}
|
|
33
32
|
});
|
|
34
|
-
|
|
35
33
|
//#endregion
|
|
36
|
-
export {
|
|
34
|
+
export {};
|
|
35
|
+
|
|
37
36
|
//# sourceMappingURL=transcribe.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transcribe.js","names":[],"sources":["../../src/commands/transcribe.ts"],"
|
|
1
|
+
{"version":3,"file":"transcribe.js","names":[],"sources":["../../src/commands/transcribe.ts"],"mappings":";;;;;;;AAOA,QACG,Q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ts";
|
|
7
|
-
|
|
8
7
|
//#region src/commands/webhook.ts
|
|
9
8
|
const log = debug("ef:cli:auth");
|
|
10
9
|
const topics = [
|
|
@@ -30,9 +29,9 @@ const webhookCommand = program.command("webhook").description("Test webhook URL
|
|
|
30
29
|
if (!webhookURL) webhookURL = await input({ message: "Enter a webhook URL:" });
|
|
31
30
|
if (!topic) topic = await select({
|
|
32
31
|
message: "Select a topic:",
|
|
33
|
-
choices: topics.map((topic
|
|
34
|
-
title: topic
|
|
35
|
-
value: topic
|
|
32
|
+
choices: topics.map((topic) => ({
|
|
33
|
+
title: topic,
|
|
34
|
+
value: topic
|
|
36
35
|
}))
|
|
37
36
|
});
|
|
38
37
|
const spinner = ora("Testing...").start();
|
|
@@ -50,7 +49,7 @@ const webhookCommand = program.command("webhook").description("Test webhook URL
|
|
|
50
49
|
log("Error:", error);
|
|
51
50
|
}
|
|
52
51
|
});
|
|
53
|
-
|
|
54
52
|
//#endregion
|
|
55
|
-
export {
|
|
53
|
+
export {};
|
|
54
|
+
|
|
56
55
|
//# sourceMappingURL=webhook.js.map
|