@remotion/cli 4.0.79 → 4.0.81

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.
Files changed (39) hide show
  1. package/dist/cloudrun-command.js +3 -4
  2. package/dist/config/image-format.d.ts +1 -1
  3. package/dist/config/index.d.ts +2 -2
  4. package/dist/config/index.js +3 -4
  5. package/dist/download-progress.d.ts +1 -1
  6. package/dist/download-progress.js +2 -2
  7. package/dist/editor/components/NewComposition/RemInput.d.ts +1 -1
  8. package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayEditor.js +2 -1
  9. package/dist/editor/helpers/colors.d.ts +1 -1
  10. package/dist/get-cli-options.d.ts +2 -2
  11. package/dist/get-composition-id.js +2 -2
  12. package/dist/get-env.js +2 -2
  13. package/dist/get-render-defaults.d.ts +2 -0
  14. package/dist/get-render-defaults.js +71 -0
  15. package/dist/index.d.ts +9 -9
  16. package/dist/index.js +4 -4
  17. package/dist/lambda-command.js +3 -4
  18. package/dist/list-of-remotion-packages.js +1 -0
  19. package/dist/make-on-download.d.ts +1 -1
  20. package/dist/make-on-download.js +4 -2
  21. package/dist/progress-bar.d.ts +1 -9
  22. package/dist/progress-bar.js +3 -4
  23. package/dist/progress-types.d.ts +1 -31
  24. package/dist/render-flows/render.d.ts +1 -1
  25. package/dist/render-flows/still.d.ts +1 -1
  26. package/dist/render-queue/process-still.d.ts +8 -0
  27. package/dist/render-queue/process-still.js +49 -0
  28. package/dist/render-queue/process-video.d.ts +10 -0
  29. package/dist/render-queue/process-video.js +70 -0
  30. package/dist/render-queue/queue.d.ts +11 -0
  31. package/dist/render-queue/queue.js +220 -0
  32. package/dist/setup-cache.d.ts +1 -1
  33. package/dist/studio.js +30 -102
  34. package/dist/upgrade.js +4 -5
  35. package/dist/user-passed-output-location.js +2 -2
  36. package/package.json +10 -14
  37. package/styles/styles.css +0 -123
  38. package/types/global.d.ts +0 -4
  39. package/web/favicon.png +0 -0
@@ -0,0 +1,10 @@
1
+ import type { LogLevel } from '@remotion/renderer';
2
+ import type { JobProgressCallback, RenderJob } from '@remotion/studio';
3
+ export declare const processVideoJob: ({ job, remotionRoot, entryPoint, onProgress, addCleanupCallback, logLevel, }: {
4
+ job: RenderJob;
5
+ remotionRoot: string;
6
+ entryPoint: string;
7
+ onProgress: JobProgressCallback;
8
+ addCleanupCallback: (cb: () => void) => void;
9
+ logLevel: LogLevel;
10
+ }) => Promise<void>;
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.processVideoJob = void 0;
4
+ const preview_server_1 = require("../config/preview-server");
5
+ const convert_entry_point_to_serve_url_1 = require("../convert-entry-point-to-serve-url");
6
+ const get_cli_options_1 = require("../get-cli-options");
7
+ const render_1 = require("../render-flows/render");
8
+ const processVideoJob = async ({ job, remotionRoot, entryPoint, onProgress, addCleanupCallback, logLevel, }) => {
9
+ var _a, _b, _c;
10
+ if (job.type !== 'video' && job.type !== 'sequence') {
11
+ throw new Error('Expected video job');
12
+ }
13
+ const { publicDir, browserExecutable, browser, ffmpegOverride } = await (0, get_cli_options_1.getCliOptions)({
14
+ isLambda: false,
15
+ type: 'still',
16
+ remotionRoot,
17
+ logLevel,
18
+ });
19
+ const fullEntryPoint = (0, convert_entry_point_to_serve_url_1.convertEntryPointToServeUrl)(entryPoint);
20
+ await (0, render_1.renderVideoFlow)({
21
+ remotionRoot,
22
+ browser,
23
+ browserExecutable,
24
+ chromiumOptions: job.chromiumOptions,
25
+ entryPointReason: 'same as Studio',
26
+ envVariables: job.envVariables,
27
+ height: null,
28
+ fullEntryPoint,
29
+ serializedInputPropsWithCustomSchema: job.serializedInputPropsWithCustomSchema,
30
+ overwrite: true,
31
+ port: (0, preview_server_1.getRendererPortFromConfigFile)(),
32
+ publicDir,
33
+ puppeteerTimeout: job.delayRenderTimeout,
34
+ jpegQuality: (_a = job.jpegQuality) !== null && _a !== void 0 ? _a : undefined,
35
+ remainingArgs: [],
36
+ scale: job.scale,
37
+ width: null,
38
+ compositionIdFromUi: job.compositionId,
39
+ logLevel: job.logLevel,
40
+ onProgress,
41
+ indent: true,
42
+ concurrency: job.concurrency,
43
+ everyNthFrame: job.type === 'video' ? job.everyNthFrame : 1,
44
+ frameRange: [job.startFrame, job.endFrame],
45
+ quiet: false,
46
+ shouldOutputImageSequence: job.type === 'sequence',
47
+ addCleanupCallback,
48
+ outputLocationFromUI: job.outName,
49
+ uiCodec: job.type === 'video' ? job.codec : null,
50
+ uiImageFormat: job.imageFormat,
51
+ cancelSignal: job.cancelToken.cancelSignal,
52
+ crf: job.type === 'video' ? job.crf : null,
53
+ ffmpegOverride,
54
+ audioBitrate: job.type === 'video' ? job.audioBitrate : null,
55
+ muted: job.type === 'video' ? job.muted : true,
56
+ enforceAudioTrack: job.type === 'video' ? job.enforceAudioTrack : false,
57
+ proResProfile: job.type === 'video' ? (_b = job.proResProfile) !== null && _b !== void 0 ? _b : undefined : undefined,
58
+ x264Preset: job.type === 'video' ? (_c = job.x264Preset) !== null && _c !== void 0 ? _c : undefined : undefined,
59
+ pixelFormat: job.type === 'video' ? job.pixelFormat : 'yuv420p',
60
+ videoBitrate: job.type === 'video' ? job.videoBitrate : null,
61
+ encodingBufferSize: job.type === 'video' ? job.encodingBufferSize : null,
62
+ encodingMaxRate: job.type === 'video' ? job.encodingMaxRate : null,
63
+ numberOfGifLoops: job.type === 'video' ? job.numberOfGifLoops : null,
64
+ audioCodec: job.type === 'video' ? job.audioCodec : null,
65
+ disallowParallelEncoding: job.type === 'video' ? job.disallowParallelEncoding : false,
66
+ offthreadVideoCacheSizeInBytes: job.offthreadVideoCacheSizeInBytes,
67
+ colorSpace: job.type === 'video' ? job.colorSpace : 'default',
68
+ });
69
+ };
70
+ exports.processVideoJob = processVideoJob;
@@ -0,0 +1,11 @@
1
+ import type { LogLevel } from '@remotion/renderer';
2
+ import type { RenderJob, RenderJobWithCleanup } from '@remotion/studio';
3
+ export declare const getRenderQueue: () => RenderJob[];
4
+ export declare const addJob: ({ job, entryPoint, remotionRoot, logLevel, }: {
5
+ job: RenderJobWithCleanup;
6
+ entryPoint: string;
7
+ remotionRoot: string;
8
+ logLevel: LogLevel;
9
+ }) => void;
10
+ export declare const removeJob: (jobId: string) => void;
11
+ export declare const cancelJob: (jobId: string) => void;
@@ -0,0 +1,220 @@
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.cancelJob = exports.removeJob = exports.addJob = exports.getRenderQueue = void 0;
7
+ const studio_1 = require("@remotion/studio");
8
+ const node_path_1 = __importDefault(require("node:path"));
9
+ const chalk_1 = require("../chalk");
10
+ const config_1 = require("../config");
11
+ const log_1 = require("../log");
12
+ const print_error_1 = require("../print-error");
13
+ const progress_types_1 = require("../progress-types");
14
+ const process_still_1 = require("./process-still");
15
+ const process_video_1 = require("./process-video");
16
+ let jobQueue = [];
17
+ const updateJob = (id, updater) => {
18
+ jobQueue = jobQueue.map((j) => {
19
+ if (id === j.id) {
20
+ return updater(j);
21
+ }
22
+ return j;
23
+ });
24
+ notifyClientsOfJobUpdate();
25
+ };
26
+ const getRenderQueue = () => {
27
+ return jobQueue.map((j) => {
28
+ const { cleanup, ...rest } = j;
29
+ return rest;
30
+ });
31
+ };
32
+ exports.getRenderQueue = getRenderQueue;
33
+ const notifyClientsOfJobUpdate = () => {
34
+ studio_1.StudioInternals.waitForLiveEventsListener().then((listener) => {
35
+ listener.sendEventToClient({
36
+ type: 'render-queue-updated',
37
+ queue: (0, exports.getRenderQueue)(),
38
+ });
39
+ });
40
+ };
41
+ const processJob = async ({ job, remotionRoot, entryPoint, onProgress, addCleanupCallback, logLevel, }) => {
42
+ if (job.type === 'still') {
43
+ await (0, process_still_1.processStill)({
44
+ job,
45
+ remotionRoot,
46
+ entryPoint,
47
+ onProgress,
48
+ addCleanupCallback,
49
+ });
50
+ return;
51
+ }
52
+ if (job.type === 'video' || job.type === 'sequence') {
53
+ await (0, process_video_1.processVideoJob)({
54
+ job,
55
+ remotionRoot,
56
+ entryPoint,
57
+ onProgress,
58
+ addCleanupCallback,
59
+ logLevel,
60
+ });
61
+ return;
62
+ }
63
+ throw new Error(`Unknown job ${JSON.stringify(job)}`);
64
+ };
65
+ const addJob = ({ job, entryPoint, remotionRoot, logLevel, }) => {
66
+ jobQueue.push(job);
67
+ processJobIfPossible({ entryPoint, remotionRoot, logLevel });
68
+ notifyClientsOfJobUpdate();
69
+ };
70
+ exports.addJob = addJob;
71
+ const removeJob = (jobId) => {
72
+ jobQueue = jobQueue.filter((job) => {
73
+ if (job.id === jobId) {
74
+ job.cleanup.forEach((c) => {
75
+ c();
76
+ });
77
+ return false;
78
+ }
79
+ return true;
80
+ });
81
+ notifyClientsOfJobUpdate();
82
+ };
83
+ exports.removeJob = removeJob;
84
+ const cancelJob = (jobId) => {
85
+ for (const job of jobQueue) {
86
+ if (job.id === jobId) {
87
+ if (job.status !== 'running') {
88
+ throw new Error('Job is not running');
89
+ }
90
+ job.cancelToken.cancel();
91
+ break;
92
+ }
93
+ }
94
+ };
95
+ exports.cancelJob = cancelJob;
96
+ const processJobIfPossible = async ({ remotionRoot, entryPoint, logLevel, }) => {
97
+ const runningJob = jobQueue.find((q) => {
98
+ return q.status === 'running';
99
+ });
100
+ if (runningJob) {
101
+ return;
102
+ }
103
+ const nextJob = jobQueue.find((q) => {
104
+ return q.status === 'idle';
105
+ });
106
+ if (!nextJob) {
107
+ return;
108
+ }
109
+ const jobCleanups = [];
110
+ try {
111
+ updateJob(nextJob.id, (job) => {
112
+ return {
113
+ ...job,
114
+ status: 'running',
115
+ progress: {
116
+ value: 0,
117
+ message: 'Starting job...',
118
+ ...(0, progress_types_1.initialAggregateRenderProgress)(),
119
+ },
120
+ };
121
+ });
122
+ const startTime = Date.now();
123
+ log_1.Log.info(chalk_1.chalk.gray('╭─ Starting render '));
124
+ let lastProgress = null;
125
+ await processJob({
126
+ job: nextJob,
127
+ entryPoint,
128
+ remotionRoot,
129
+ onProgress: (progress) => {
130
+ updateJob(nextJob.id, (job) => {
131
+ lastProgress = progress;
132
+ // Ignore late callbacks of progress updates after cancelling
133
+ if (job.status === 'failed' || job.status === 'done') {
134
+ return job;
135
+ }
136
+ if (job.type === 'still') {
137
+ return {
138
+ ...job,
139
+ status: 'running',
140
+ progress,
141
+ };
142
+ }
143
+ if (job.type === 'video') {
144
+ return {
145
+ ...job,
146
+ status: 'running',
147
+ progress,
148
+ };
149
+ }
150
+ if (job.type === 'sequence') {
151
+ return {
152
+ ...job,
153
+ status: 'running',
154
+ progress,
155
+ };
156
+ }
157
+ throw new Error('Unknown job type');
158
+ });
159
+ },
160
+ addCleanupCallback: (cleanup) => {
161
+ jobCleanups.push(cleanup);
162
+ },
163
+ logLevel,
164
+ });
165
+ log_1.Log.info(chalk_1.chalk.gray('╰─ Done in ' + (Date.now() - startTime) + 'ms.'));
166
+ const { unwatch } = studio_1.StudioInternals.installFileWatcher({
167
+ file: node_path_1.default.resolve(remotionRoot, nextJob.outName),
168
+ onChange: (type) => {
169
+ if (type === 'created') {
170
+ updateJob(nextJob.id, (job) => ({
171
+ ...job,
172
+ deletedOutputLocation: false,
173
+ }));
174
+ }
175
+ if (type === 'deleted') {
176
+ updateJob(nextJob.id, (job) => ({
177
+ ...job,
178
+ deletedOutputLocation: true,
179
+ }));
180
+ }
181
+ },
182
+ });
183
+ updateJob(nextJob.id, (job) => {
184
+ if (!lastProgress) {
185
+ throw new Error('expected progress');
186
+ }
187
+ return {
188
+ ...job,
189
+ status: 'done',
190
+ cleanup: [...job.cleanup, unwatch],
191
+ progress: { message: 'Done', value: 1, ...lastProgress },
192
+ };
193
+ });
194
+ }
195
+ catch (err) {
196
+ log_1.Log.error(chalk_1.chalk.gray('╰─ '), chalk_1.chalk.red('Failed to render'));
197
+ updateJob(nextJob.id, (job) => {
198
+ return {
199
+ ...job,
200
+ status: 'failed',
201
+ error: {
202
+ message: err.message,
203
+ stack: err.stack,
204
+ },
205
+ };
206
+ });
207
+ await (0, print_error_1.printError)(err, config_1.ConfigInternals.Logging.getLogLevel());
208
+ studio_1.StudioInternals.waitForLiveEventsListener().then((listener) => {
209
+ listener.sendEventToClient({
210
+ type: 'render-job-failed',
211
+ compositionId: nextJob.compositionId,
212
+ error: err,
213
+ });
214
+ });
215
+ }
216
+ finally {
217
+ await Promise.all(jobCleanups.map((c) => c()));
218
+ }
219
+ processJobIfPossible({ remotionRoot, entryPoint, logLevel });
220
+ };
@@ -1,5 +1,5 @@
1
1
  import type { LogLevel } from '@remotion/renderer';
2
- import type { BundlingState, CopyingState } from './progress-bar';
2
+ import type { BundlingState, CopyingState } from '@remotion/studio';
3
3
  export declare const bundleOnCliOrTakeServeUrl: ({ fullPath, remotionRoot, publicDir, onProgress, indentOutput, logLevel, bundlingStep, steps, onDirectoryCreated, quietProgress, }: {
4
4
  fullPath: string;
5
5
  remotionRoot: string;
package/dist/studio.js CHANGED
@@ -1,50 +1,17 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.studioCommand = void 0;
7
- const node_crypto_1 = __importDefault(require("node:crypto"));
8
- const node_fs_1 = require("node:fs");
9
- const node_path_1 = __importDefault(require("node:path"));
10
- const better_opn_1 = require("./better-opn");
11
- const chalk_1 = require("./chalk");
4
+ const studio_1 = require("@remotion/studio");
12
5
  const config_1 = require("./config");
6
+ const number_of_shared_audio_tags_1 = require("./config/number-of-shared-audio-tags");
13
7
  const convert_entry_point_to_serve_url_1 = require("./convert-entry-point-to-serve-url");
14
8
  const entry_point_1 = require("./entry-point");
15
9
  const get_env_1 = require("./get-env");
16
10
  const get_input_props_1 = require("./get-input-props");
17
- const get_network_address_1 = require("./get-network-address");
11
+ const get_render_defaults_1 = require("./get-render-defaults");
18
12
  const log_1 = require("./log");
19
13
  const parse_command_line_1 = require("./parse-command-line");
20
- const get_absolute_public_dir_1 = require("./preview-server/get-absolute-public-dir");
21
- const live_events_1 = require("./preview-server/live-events");
22
- const public_folder_1 = require("./preview-server/public-folder");
23
- const start_server_1 = require("./preview-server/start-server");
24
- const server_ready_comment_1 = require("./server-ready-comment");
25
- const watch_root_file_1 = require("./watch-root-file");
26
- const noop = () => undefined;
27
- const getShouldOpenBrowser = () => {
28
- var _a;
29
- // Minimist quirk: Adding `--no-open` flag will result in {['no-open']: false, open: true}
30
- // @ts-expect-error
31
- if (parse_command_line_1.parsedCli.open === false) {
32
- return {
33
- shouldOpenBrowser: false,
34
- reasonForBrowserDecision: '--no-open specified',
35
- };
36
- }
37
- if (((_a = process.env.BROWSER) !== null && _a !== void 0 ? _a : '').toLowerCase() === 'none') {
38
- return {
39
- shouldOpenBrowser: false,
40
- reasonForBrowserDecision: 'env BROWSER=none was set',
41
- };
42
- }
43
- if (config_1.ConfigInternals.getShouldOpenBrowser() === false) {
44
- return { shouldOpenBrowser: false, reasonForBrowserDecision: 'Config file' };
45
- }
46
- return { shouldOpenBrowser: true, reasonForBrowserDecision: 'default' };
47
- };
14
+ const queue_1 = require("./render-queue/queue");
48
15
  const getPort = () => {
49
16
  if (parse_command_line_1.parsedCli.port) {
50
17
  return parse_command_line_1.parsedCli.port;
@@ -56,6 +23,7 @@ const getPort = () => {
56
23
  return null;
57
24
  };
58
25
  const studioCommand = async (remotionRoot, args, logLevel) => {
26
+ var _a;
59
27
  const { file, reason } = (0, entry_point_1.findEntryPoint)(args, remotionRoot, logLevel);
60
28
  log_1.Log.verbose({ indent: false, logLevel }, 'Entry point:', file, 'reason:', reason);
61
29
  if (!file) {
@@ -67,7 +35,7 @@ const studioCommand = async (remotionRoot, args, logLevel) => {
67
35
  const desiredPort = getPort();
68
36
  const fullEntryPath = (0, convert_entry_point_to_serve_url_1.convertEntryPointToServeUrl)(file);
69
37
  let inputProps = (0, get_input_props_1.getInputProps)((newProps) => {
70
- (0, live_events_1.waitForLiveEventsListener)().then((listener) => {
38
+ studio_1.StudioInternals.waitForLiveEventsListener().then((listener) => {
71
39
  inputProps = newProps;
72
40
  listener.sendEventToClient({
73
41
  type: 'new-input-props',
@@ -76,7 +44,7 @@ const studioCommand = async (remotionRoot, args, logLevel) => {
76
44
  });
77
45
  }, logLevel);
78
46
  let envVariables = (0, get_env_1.getEnvironmentVariables)((newEnvVariables) => {
79
- (0, live_events_1.waitForLiveEventsListener)().then((listener) => {
47
+ studio_1.StudioInternals.waitForLiveEventsListener().then((listener) => {
80
48
  envVariables = newEnvVariables;
81
49
  listener.sendEventToClient({
82
50
  type: 'new-env-variables',
@@ -84,74 +52,34 @@ const studioCommand = async (remotionRoot, args, logLevel) => {
84
52
  });
85
53
  });
86
54
  }, logLevel);
87
- const publicDir = (0, get_absolute_public_dir_1.getAbsolutePublicDir)({
88
- userPassedPublicDir: config_1.ConfigInternals.getPublicDir(),
89
- remotionRoot,
90
- });
91
- const hash = node_crypto_1.default.randomBytes(6).toString('hex');
92
- const outputHashPrefix = '/outputs-';
93
- const outputHash = `${outputHashPrefix}${hash}`;
94
- const staticHashPrefix = '/static-';
95
- const staticHash = `${staticHashPrefix}${hash}`;
96
- (0, public_folder_1.initPublicFolderWatch)({
97
- publicDir,
98
- remotionRoot,
99
- onUpdate: () => {
100
- (0, live_events_1.waitForLiveEventsListener)().then((listener) => {
101
- const files = (0, public_folder_1.getFiles)();
102
- listener.sendEventToClient({
103
- type: 'new-public-folder',
104
- files,
105
- folderExists: files.length > 0
106
- ? publicDir
107
- : (0, node_fs_1.existsSync)(publicDir)
108
- ? publicDir
109
- : null,
110
- });
111
- });
112
- },
113
- staticHash,
114
- });
115
- (0, watch_root_file_1.watchRootFile)(remotionRoot);
116
- const { port, liveEventsServer } = await (0, start_server_1.startServer)({
117
- entry: node_path_1.default.resolve(__dirname, 'previewEntry.js'),
118
- userDefinedComponent: fullEntryPath,
55
+ const maxTimelineTracks = config_1.ConfigInternals.getMaxTimelineTracks();
56
+ const keyboardShortcutsEnabled = config_1.ConfigInternals.getKeyboardShortcutsEnabled();
57
+ await studio_1.StudioInternals.startStudio({
58
+ browserArgs: parse_command_line_1.parsedCli['browser-args'],
59
+ browserFlag: parse_command_line_1.parsedCli.browser,
60
+ logLevel,
61
+ configValueShouldOpenBrowser: config_1.ConfigInternals.getShouldOpenBrowser(),
62
+ fullEntryPath,
119
63
  getCurrentInputProps: () => inputProps,
120
64
  getEnvVariables: () => envVariables,
121
- port: desiredPort,
122
- maxTimelineTracks: config_1.ConfigInternals.getMaxTimelineTracks(),
65
+ desiredPort,
66
+ keyboardShortcutsEnabled,
67
+ maxTimelineTracks,
123
68
  remotionRoot,
124
- keyboardShortcutsEnabled: config_1.ConfigInternals.getKeyboardShortcutsEnabled(),
125
- publicDir,
69
+ userPassedPublicDir: config_1.ConfigInternals.getPublicDir(),
126
70
  webpackOverride: config_1.ConfigInternals.getWebpackOverrideFn(),
127
71
  poll: config_1.ConfigInternals.getWebpackPolling(),
128
- userPassedPublicDir: config_1.ConfigInternals.getPublicDir(),
129
- staticHash,
130
- staticHashPrefix,
131
- outputHash,
132
- outputHashPrefix,
133
- logLevel,
72
+ getRenderDefaults: get_render_defaults_1.getRenderDefaults,
73
+ getRenderQueue: queue_1.getRenderQueue,
74
+ numberOfAudioTags: (_a = parse_command_line_1.parsedCli['number-of-shared-audio-tags']) !== null && _a !== void 0 ? _a : (0, number_of_shared_audio_tags_1.getNumberOfSharedAudioTags)(),
75
+ queueMethods: {
76
+ addJob: queue_1.addJob,
77
+ cancelJob: queue_1.cancelJob,
78
+ removeJob: queue_1.removeJob,
79
+ },
80
+ // Minimist quirk: Adding `--no-open` flag will result in {['no-open']: false, open: true}
81
+ // @ts-expect-error
82
+ parsedCliOpen: parse_command_line_1.parsedCli.open,
134
83
  });
135
- (0, live_events_1.setLiveEventsListener)(liveEventsServer);
136
- const networkAddress = (0, get_network_address_1.getNetworkAddress)();
137
- if (networkAddress) {
138
- (0, server_ready_comment_1.setServerReadyComment)(`Local: ${chalk_1.chalk.underline(`http://localhost:${port}`)}, Network: ${chalk_1.chalk.underline(`http://${networkAddress}:${port}`)}`);
139
- }
140
- else {
141
- (0, server_ready_comment_1.setServerReadyComment)(`http://localhost:${port}`);
142
- }
143
- (0, server_ready_comment_1.printServerReadyComment)('Server ready');
144
- const { reasonForBrowserDecision, shouldOpenBrowser } = getShouldOpenBrowser();
145
- if (shouldOpenBrowser) {
146
- await (0, better_opn_1.openBrowser)({
147
- url: `http://localhost:${port}`,
148
- browserArgs: parse_command_line_1.parsedCli['browser-args'],
149
- browserFlag: parse_command_line_1.parsedCli.browser,
150
- });
151
- }
152
- else {
153
- log_1.Log.verbose({ indent: false, logLevel }, `Not opening browser, reason: ${reasonForBrowserDecision}`);
154
- }
155
- await new Promise(noop);
156
84
  };
157
85
  exports.studioCommand = studioCommand;
package/dist/upgrade.js CHANGED
@@ -5,12 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.upgrade = void 0;
7
7
  const renderer_1 = require("@remotion/renderer");
8
+ const studio_1 = require("@remotion/studio");
8
9
  const node_path_1 = __importDefault(require("node:path"));
9
10
  const config_1 = require("./config");
10
- const get_latest_remotion_version_1 = require("./get-latest-remotion-version");
11
11
  const list_of_remotion_packages_1 = require("./list-of-remotion-packages");
12
12
  const log_1 = require("./log");
13
- const get_package_manager_1 = require("./preview-server/get-package-manager");
14
13
  const getUpgradeCommand = ({ manager, packages, version, }) => {
15
14
  const pkgList = packages.map((p) => `${p}@${version}`);
16
15
  const commands = {
@@ -35,12 +34,12 @@ const upgrade = async (remotionRoot, packageManager, version) => {
35
34
  log_1.Log.info('Upgrading to specified version: ' + version);
36
35
  }
37
36
  else {
38
- targetVersion = await (0, get_latest_remotion_version_1.getLatestRemotionVersion)();
37
+ targetVersion = await studio_1.StudioInternals.getLatestRemotionVersion();
39
38
  log_1.Log.info('Newest Remotion version is', targetVersion);
40
39
  }
41
- const manager = (0, get_package_manager_1.getPackageManager)(remotionRoot, packageManager);
40
+ const manager = studio_1.StudioInternals.getPackageManager(remotionRoot, packageManager);
42
41
  if (manager === 'unknown') {
43
- throw new Error(`No lockfile was found in your project (one of ${get_package_manager_1.lockFilePaths
42
+ throw new Error(`No lockfile was found in your project (one of ${studio_1.StudioInternals.lockFilePaths
44
43
  .map((p) => p.path)
45
44
  .join(', ')}). Install dependencies using your favorite manager!`);
46
45
  }
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getOutputLocation = exports.getUserPassedOutputLocation = void 0;
4
+ const studio_1 = require("@remotion/studio");
4
5
  const config_1 = require("./config");
5
- const get_default_out_name_1 = require("./get-default-out-name");
6
6
  const parse_command_line_1 = require("./parse-command-line");
7
7
  const getUserPassedOutputLocation = (args, uiPassedOutName) => {
8
8
  var _a, _b;
@@ -16,7 +16,7 @@ const getOutputLocation = ({ compositionId, defaultExtension, args, type, output
16
16
  typeof parse_command_line_1.parsedCli.output !== 'undefined') {
17
17
  throw new Error('Both an output flag (--output) and an output location as a positional argument were passed. Please choose only one of the ways.');
18
18
  }
19
- return ((_a = (0, exports.getUserPassedOutputLocation)(args, outputLocationFromUi)) !== null && _a !== void 0 ? _a : (0, get_default_out_name_1.getDefaultOutLocation)({
19
+ return ((_a = (0, exports.getUserPassedOutputLocation)(args, outputLocationFromUi)) !== null && _a !== void 0 ? _a : studio_1.StudioInternals.getDefaultOutLocation({
20
20
  compositionName: compositionId,
21
21
  defaultExtension,
22
22
  type,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/cli",
3
- "version": "4.0.79",
3
+ "version": "4.0.81",
4
4
  "description": "CLI for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -29,17 +29,14 @@
29
29
  "license": "SEE LICENSE IN LICENSE.md",
30
30
  "dependencies": {
31
31
  "dotenv": "9.0.2",
32
- "memfs": "3.4.3",
33
32
  "minimist": "1.2.6",
34
- "open": "^8.4.2",
35
- "prompts": "2.4.1",
36
- "semver": "7.5.3",
37
- "source-map": "0.6.1",
38
- "@remotion/bundler": "4.0.79",
39
- "@remotion/player": "4.0.79",
40
- "@remotion/media-utils": "4.0.79",
41
- "remotion": "4.0.79",
42
- "@remotion/renderer": "4.0.79"
33
+ "prompts": "2.4.2",
34
+ "@remotion/bundler": "4.0.81",
35
+ "@remotion/media-utils": "4.0.81",
36
+ "@remotion/player": "4.0.81",
37
+ "@remotion/renderer": "4.0.81",
38
+ "remotion": "4.0.81",
39
+ "@remotion/studio": "4.0.81"
43
40
  },
44
41
  "peerDependencies": {
45
42
  "react": ">=16.8.0",
@@ -54,7 +51,6 @@
54
51
  "@types/react": "18.0.26",
55
52
  "@types/prettier": "^2.7.2",
56
53
  "@types/react-dom": "18.0.11",
57
- "@types/semver": "^7.3.4",
58
54
  "eslint": "8.42.0",
59
55
  "eslint-plugin-10x": "1.5.2",
60
56
  "eslint-plugin-react": "7.32.2",
@@ -65,8 +61,8 @@
65
61
  "react-dom": "18.2.0",
66
62
  "vitest": "0.31.1",
67
63
  "zod": "^3.22.3",
68
- "@remotion/zod-types": "4.0.79",
69
- "@remotion/tailwind": "4.0.79"
64
+ "@remotion/zod-types": "4.0.81",
65
+ "@remotion/tailwind": "4.0.81"
70
66
  },
71
67
  "keywords": [
72
68
  "remotion",