@revideo/cli 0.5.11-alpha.1102 → 0.5.11-alpha.1104

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/editor.js ADDED
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.launchEditor = launchEditor;
7
+ const vite_plugin_1 = __importDefault(require("@revideo/vite-plugin"));
8
+ const vite_1 = require("vite");
9
+ async function launchEditor(projectPath, port) {
10
+ const server = await (0, vite_1.createServer)({
11
+ configFile: false,
12
+ plugins: [
13
+ (0, vite_plugin_1.default)({
14
+ project: projectPath,
15
+ buildForEditor: false,
16
+ }),
17
+ ],
18
+ build: {
19
+ minify: false,
20
+ rollupOptions: {
21
+ output: {
22
+ entryFileNames: '[name].js',
23
+ },
24
+ },
25
+ },
26
+ server: {
27
+ port: parseInt(port),
28
+ },
29
+ });
30
+ return server.listen();
31
+ }
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  const telemetry_1 = require("@revideo/telemetry");
5
5
  const commander_1 = require("commander");
6
+ const editor_1 = require("./editor");
6
7
  const index_1 = require("./server/index");
7
8
  const program = new commander_1.Command();
8
9
  program
@@ -11,8 +12,7 @@ program
11
12
  .version('0.5.10');
12
13
  program
13
14
  .command('serve')
14
- .description('UNSTABLE (still WIP): Start the revideo server in development mode. Watches for changes ' +
15
- 'in the project directory and re-builds the player on each change.')
15
+ .description('Exposes a render endpoint to render videos from a project file. Automatically rebuilds the project when the project file changes. Use for local development.')
16
16
  .option('--projectFile <path>', 'Path to the project file', './src/project.ts')
17
17
  .option('--port <number>', 'Port on which to start the server', '4000')
18
18
  .action(async (options) => {
@@ -25,4 +25,13 @@ program
25
25
  console.log();
26
26
  });
27
27
  });
28
+ program
29
+ .command('editor')
30
+ .description('Start the revideo editor')
31
+ .option('--projectFile <path>', 'Path to the project file', './src/project.ts')
32
+ .option('--port <number>', 'Port on which to start the server', '9000')
33
+ .action(async (options) => {
34
+ await (0, editor_1.launchEditor)(options.projectFile, options.port);
35
+ console.log(`Editor running on port ${options.port}`);
36
+ });
28
37
  program.parse(process.argv);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revideo/cli",
3
- "version": "0.5.11-alpha.1102+0e7e4d50",
3
+ "version": "0.5.11-alpha.1104+bde9632d",
4
4
  "description": "A CLI for revideo",
5
5
  "main": "dist/index.js",
6
6
  "author": "revideo",
@@ -25,13 +25,14 @@
25
25
  "typescript": "^5.4.3"
26
26
  },
27
27
  "dependencies": {
28
- "@revideo/renderer": "^0.5.11-alpha.1102+0e7e4d50",
29
- "@revideo/telemetry": "^0.5.11-alpha.1102+0e7e4d50",
28
+ "@revideo/renderer": "^0.5.11-alpha.1104+bde9632d",
29
+ "@revideo/telemetry": "^0.5.11-alpha.1104+bde9632d",
30
+ "@revideo/vite-plugin": "^0.5.11-alpha.1104+bde9632d",
30
31
  "chokidar": "^3.5.3",
31
32
  "commander": "^12.0.0",
32
33
  "cors": "^2.8.5",
33
34
  "express": "^4.19.2",
34
35
  "uuid": "^9.0.1"
35
36
  },
36
- "gitHead": "0e7e4d507edb33100545ec8d052af54452455a04"
37
+ "gitHead": "bde9632d22c56cf625242c5ea2136a83fd39b952"
37
38
  }