@remotion/cli 4.0.420 → 4.0.422

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/add.js CHANGED
@@ -102,7 +102,12 @@ const addCommand = async ({ remotionRoot, packageManager, packageNames, logLevel
102
102
  throw new Error('No Remotion packages found in your project. Install Remotion first.');
103
103
  }
104
104
  }
105
- const manager = studio_server_1.StudioServerInternals.getPackageManager(remotionRoot, packageManager, 0);
105
+ const manager = studio_server_1.StudioServerInternals.getPackageManager({
106
+ remotionRoot,
107
+ packageManager,
108
+ dirUp: 0,
109
+ logLevel,
110
+ });
106
111
  if (manager === 'unknown') {
107
112
  throw new Error(`No lockfile was found in your project (one of ${studio_server_1.StudioServerInternals.lockFilePaths
108
113
  .map((p) => p.path)
@@ -13,7 +13,12 @@ const cloudrunCommand = async (remotionRoot, args, logLevel) => {
13
13
  process.exit(0);
14
14
  }
15
15
  catch (err) {
16
- const manager = studio_server_1.StudioServerInternals.getPackageManager(remotionRoot, undefined, 0);
16
+ const manager = studio_server_1.StudioServerInternals.getPackageManager({
17
+ remotionRoot,
18
+ packageManager: undefined,
19
+ dirUp: 0,
20
+ logLevel,
21
+ });
17
22
  const installCommand = manager === 'unknown' ? 'npm i' : manager.installCommand;
18
23
  log_1.Log.error({ indent: false, logLevel }, err);
19
24
  log_1.Log.error({ indent: false, logLevel }, 'Remotion Cloud Run is not installed.');
@@ -10,24 +10,50 @@ const setFrameRange = (newFrameRange) => {
10
10
  exports.setFrameRange = setFrameRange;
11
11
  const setFrameRangeFromCli = (newFrameRange) => {
12
12
  if (typeof newFrameRange === 'number') {
13
+ if (newFrameRange < 0) {
14
+ (0, exports.setFrameRange)([0, Math.abs(newFrameRange)]);
15
+ return;
16
+ }
13
17
  (0, exports.setFrameRange)(newFrameRange);
14
18
  range = newFrameRange;
15
19
  return;
16
20
  }
17
21
  if (typeof newFrameRange === 'string') {
18
- const parsed = newFrameRange.split('-').map((f) => Number(f));
19
- if (parsed.length > 2 || parsed.length <= 0) {
20
- throw new Error(`--frames flag must be a number or 2 numbers separated by '-', instead got ${parsed.length} numbers`);
22
+ if (newFrameRange.trim() === '') {
23
+ throw new Error('--frames flag must be a single number, or 2 numbers separated by `-`');
21
24
  }
22
- if (parsed.length === 2 && parsed[1] < parsed[0]) {
23
- throw new Error('The second number of the --frames flag number should be greater or equal than first number');
25
+ const parts = newFrameRange.split('-');
26
+ if (parts.length > 2 || parts.length <= 0) {
27
+ throw new Error(`--frames flag must be a number or 2 numbers separated by '-', instead got ${parts.length} numbers`);
28
+ }
29
+ if (parts.length === 1) {
30
+ const value = Number(parts[0]);
31
+ if (isNaN(value)) {
32
+ throw new Error('--frames flag must be a single number, or 2 numbers separated by `-`');
33
+ }
34
+ (0, exports.setFrameRange)(value);
35
+ return;
24
36
  }
37
+ const [firstPart, secondPart] = parts;
38
+ if (secondPart === '' && firstPart !== '') {
39
+ const start = Number(firstPart);
40
+ if (isNaN(start)) {
41
+ throw new Error('--frames flag must be a single number, or 2 numbers separated by `-`');
42
+ }
43
+ (0, exports.setFrameRange)([start, null]);
44
+ return;
45
+ }
46
+ const parsed = parts.map((f) => Number(f));
47
+ const [first, second] = parsed;
25
48
  for (const value of parsed) {
26
49
  if (isNaN(value)) {
27
50
  throw new Error('--frames flag must be a single number, or 2 numbers separated by `-`');
28
51
  }
29
52
  }
30
- (0, exports.setFrameRange)(parsed);
53
+ if (second < first) {
54
+ throw new Error('The second number of the --frames flag number should be greater or equal than first number');
55
+ }
56
+ (0, exports.setFrameRange)([first, second]);
31
57
  }
32
58
  };
33
59
  exports.setFrameRangeFromCli = setFrameRangeFromCli;
@@ -346,6 +346,11 @@ type FlatConfig = RemotionConfigObject & RemotionBundlingOptions & {
346
346
  */
347
347
  setAudioCodec: (codec: 'pcm-16' | 'aac' | 'mp3' | 'opus') => void;
348
348
  setOffthreadVideoCacheSizeInBytes: (size: number | null) => void;
349
+ /**
350
+ * Forces starting a new Studio instance even if one is already running on the same port for the same project.
351
+ * Default: false
352
+ */
353
+ setForceNewStudioEnabled: (forceNew: boolean) => void;
349
354
  setDeleteAfter: (day: DeleteAfter | null) => void;
350
355
  /**
351
356
  * Set whether S3 buckets should be allowed to expire.
@@ -367,6 +372,11 @@ type FlatConfig = RemotionConfigObject & RemotionBundlingOptions & {
367
372
  *
368
373
  */
369
374
  setHardwareAcceleration: (hardwareAccelerationOption: HardwareAccelerationOption) => void;
375
+ /**
376
+ * Forces Remotion to bind to an IPv4 interface for the Studio server.
377
+ * Default: false
378
+ */
379
+ setIPv4: (ipv4: boolean) => void;
370
380
  /**
371
381
  * Choose between using Chrome Headless Shell or Chrome for Testing
372
382
  */
@@ -30,7 +30,6 @@ const frame_range_2 = require("./frame-range");
30
30
  const height_1 = require("./height");
31
31
  const image_sequence_2 = require("./image-sequence");
32
32
  const metadata_1 = require("./metadata");
33
- const number_of_shared_audio_tags_1 = require("./number-of-shared-audio-tags");
34
33
  const open_browser_1 = require("./open-browser");
35
34
  const output_location_2 = require("./output-location");
36
35
  const override_webpack_2 = require("./override-webpack");
@@ -41,7 +40,7 @@ const user_agent_1 = require("./user-agent");
41
40
  const webpack_caching_2 = require("./webpack-caching");
42
41
  const webpack_poll_1 = require("./webpack-poll");
43
42
  const width_1 = require("./width");
44
- const { offthreadVideoCacheSizeInBytesOption, x264Option, audioBitrateOption, videoBitrateOption, scaleOption, crfOption, jpegQualityOption, enforceAudioOption, overwriteOption, chromeModeOption, mutedOption, videoCodecOption, colorSpaceOption, disallowParallelEncodingOption, deleteAfterOption, folderExpiryOption, enableMultiprocessOnLinuxOption, glOption, headlessOption, numberOfGifLoopsOption, beepOnFinishOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, enableLambdaInsights, logLevelOption, delayRenderTimeoutInMillisecondsOption, publicDirOption, binariesDirectoryOption, preferLosslessOption, forSeamlessAacConcatenationOption, audioCodecOption, publicPathOption, hardwareAccelerationOption, audioLatencyHintOption, enableCrossSiteIsolationOption, imageSequencePatternOption, darkModeOption, askAIOption, publicLicenseKeyOption, experimentalClientSideRenderingOption, keyboardShortcutsOption, } = client_1.BrowserSafeApis.options;
43
+ const { offthreadVideoCacheSizeInBytesOption, x264Option, audioBitrateOption, videoBitrateOption, scaleOption, crfOption, jpegQualityOption, enforceAudioOption, overwriteOption, chromeModeOption, mutedOption, videoCodecOption, colorSpaceOption, disallowParallelEncodingOption, deleteAfterOption, folderExpiryOption, enableMultiprocessOnLinuxOption, glOption, headlessOption, numberOfGifLoopsOption, beepOnFinishOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, enableLambdaInsights, logLevelOption, delayRenderTimeoutInMillisecondsOption, publicDirOption, binariesDirectoryOption, preferLosslessOption, forSeamlessAacConcatenationOption, audioCodecOption, publicPathOption, hardwareAccelerationOption, audioLatencyHintOption, enableCrossSiteIsolationOption, imageSequencePatternOption, darkModeOption, askAIOption, publicLicenseKeyOption, experimentalClientSideRenderingOption, keyboardShortcutsOption, forceNewStudioOption, numberOfSharedAudioTagsOption, ipv4Option, } = client_1.BrowserSafeApis.options;
45
44
  exports.Config = {
46
45
  get Bundling() {
47
46
  throw new Error('The config format has changed. Change `Config.Bundling.*()` calls to `Config.*()` in your config file.');
@@ -64,7 +63,7 @@ exports.Config = {
64
63
  setMaxTimelineTracks: studio_server_1.StudioServerInternals.setMaxTimelineTracks,
65
64
  setKeyboardShortcutsEnabled: keyboardShortcutsOption.setConfig,
66
65
  setExperimentalClientSideRenderingEnabled: experimentalClientSideRenderingOption.setConfig,
67
- setNumberOfSharedAudioTags: number_of_shared_audio_tags_1.setNumberOfSharedAudioTags,
66
+ setNumberOfSharedAudioTags: numberOfSharedAudioTagsOption.setConfig,
68
67
  setWebpackPollingInMilliseconds: webpack_poll_1.setWebpackPollingInMilliseconds,
69
68
  setShouldOpenBrowser: open_browser_1.setShouldOpenBrowser,
70
69
  setBufferStateDelayInMilliseconds: buffer_state_delay_in_milliseconds_1.setBufferStateDelayInMilliseconds,
@@ -141,6 +140,8 @@ exports.Config = {
141
140
  setEnableCrossSiteIsolation: enableCrossSiteIsolationOption.setConfig,
142
141
  setAskAIEnabled: askAIOption.setConfig,
143
142
  setPublicLicenseKey: publicLicenseKeyOption.setConfig,
143
+ setForceNewStudioEnabled: forceNewStudioOption.setConfig,
144
+ setIPv4: ipv4Option.setConfig,
144
145
  };
145
146
  exports.ConfigInternals = {
146
147
  getRange: frame_range_1.getRange,
@@ -0,0 +1,9 @@
1
+ type RemotionDetectionResult = {
2
+ type: 'match';
3
+ } | {
4
+ type: 'mismatch';
5
+ } | {
6
+ type: 'not-remotion';
7
+ };
8
+ export declare const detectRemotionServer: (port: number, cwd: string) => Promise<RemotionDetectionResult>;
9
+ export {};
@@ -0,0 +1,45 @@
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.detectRemotionServer = void 0;
7
+ const http_1 = __importDefault(require("http"));
8
+ const detectRemotionServer = (port, cwd) => {
9
+ return new Promise((resolve) => {
10
+ const req = http_1.default.get({
11
+ hostname: 'localhost',
12
+ port,
13
+ path: '/__remotion_config',
14
+ timeout: 1000,
15
+ }, (res) => {
16
+ let data = '';
17
+ res.on('data', (chunk) => {
18
+ data += chunk;
19
+ });
20
+ res.on('end', () => {
21
+ try {
22
+ const json = JSON.parse(data);
23
+ if ((json === null || json === void 0 ? void 0 : json.isRemotion) !== true) {
24
+ return resolve({ type: 'not-remotion' });
25
+ }
26
+ // Normalize paths for comparison to avoid issues with different separators or casing on Windows
27
+ const normalize = (p) => p.replace(/\\/g, '/').toLowerCase();
28
+ if (normalize(json.cwd) === normalize(cwd)) {
29
+ return resolve({ type: 'match' });
30
+ }
31
+ return resolve({ type: 'mismatch' });
32
+ }
33
+ catch (_a) {
34
+ resolve({ type: 'not-remotion' });
35
+ }
36
+ });
37
+ });
38
+ req.on('error', () => resolve({ type: 'not-remotion' }));
39
+ req.on('timeout', () => {
40
+ req.destroy();
41
+ resolve({ type: 'not-remotion' });
42
+ });
43
+ });
44
+ };
45
+ exports.detectRemotionServer = detectRemotionServer;
@@ -0,0 +1 @@
1
+ export declare const isPortOpen: (port: number) => Promise<boolean>;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isPortOpen = void 0;
4
+ const net_1 = require("net");
5
+ const isPortOpen = (port) => {
6
+ return new Promise((resolve, reject) => {
7
+ const server = (0, net_1.createServer)();
8
+ server.once('error', (err) => {
9
+ if (err.code === 'EADDRINUSE') {
10
+ resolve(false);
11
+ }
12
+ else {
13
+ reject(err);
14
+ }
15
+ });
16
+ server.once('listening', () => {
17
+ server.close(() => {
18
+ resolve(true);
19
+ });
20
+ });
21
+ server.listen(port);
22
+ });
23
+ };
24
+ exports.isPortOpen = isPortOpen;
@@ -13,7 +13,12 @@ const lambdaCommand = async (remotionRoot, args, logLevel) => {
13
13
  process.exit(0);
14
14
  }
15
15
  catch (err) {
16
- const manager = studio_server_1.StudioServerInternals.getPackageManager(remotionRoot, undefined, 0);
16
+ const manager = studio_server_1.StudioServerInternals.getPackageManager({
17
+ remotionRoot,
18
+ packageManager: undefined,
19
+ dirUp: 0,
20
+ logLevel,
21
+ });
17
22
  const installCommand = manager === 'unknown' ? 'npm i' : manager.installCommand;
18
23
  log_1.Log.error({ indent: false, logLevel }, err);
19
24
  log_1.Log.error({ indent: false, logLevel }, 'Remotion Lambda is not installed.');
@@ -4,7 +4,6 @@ exports.listOfRemotionPackages = void 0;
4
4
  // Generated by package-sync.test.ts
5
5
  exports.listOfRemotionPackages = [
6
6
  '@remotion/svg-3d-engine',
7
- '@remotion/ai-improvements',
8
7
  '@remotion/animation-utils',
9
8
  '@remotion/animated-emoji',
10
9
  '@remotion/astro-example',
@@ -314,6 +314,48 @@ declare const beepOnFinishOption: {
314
314
  };
315
315
  setConfig: (value: string | null) => void;
316
316
  type: string | null;
317
+ }, forceNewStudioOption: {
318
+ name: string;
319
+ cliFlag: "force-new";
320
+ description: () => import("react/jsx-runtime").JSX.Element;
321
+ ssrName: null;
322
+ docLink: string;
323
+ type: boolean;
324
+ getValue: ({ commandLine }: {
325
+ commandLine: Record<string, unknown>;
326
+ }) => {
327
+ value: boolean;
328
+ source: string;
329
+ };
330
+ setConfig(value: boolean): void;
331
+ }, numberOfSharedAudioTagsOption: {
332
+ name: string;
333
+ cliFlag: "number-of-shared-audio-tags";
334
+ description: () => import("react/jsx-runtime").JSX.Element;
335
+ ssrName: null;
336
+ docLink: string;
337
+ type: number;
338
+ getValue: ({ commandLine }: {
339
+ commandLine: Record<string, unknown>;
340
+ }) => {
341
+ value: number;
342
+ source: string;
343
+ };
344
+ setConfig(value: number): void;
345
+ }, ipv4Option: {
346
+ name: string;
347
+ cliFlag: "ipv4";
348
+ description: () => import("react/jsx-runtime").JSX.Element;
349
+ ssrName: null;
350
+ docLink: string;
351
+ type: boolean;
352
+ getValue: ({ commandLine }: {
353
+ commandLine: Record<string, unknown>;
354
+ }) => {
355
+ value: boolean;
356
+ source: string;
357
+ };
358
+ setConfig(value: boolean): void;
317
359
  };
318
360
  export type CommandLineOptions = {
319
361
  ['browser-executable']: BrowserExecutable;
@@ -328,7 +370,7 @@ export type CommandLineOptions = {
328
370
  ['disable-web-security']: string;
329
371
  ['every-nth-frame']: number;
330
372
  [numberOfGifLoopsOption.cliFlag]: TypeOfOption<typeof numberOfGifLoopsOption>;
331
- ['number-of-shared-audio-tags']: number;
373
+ [numberOfSharedAudioTagsOption.cliFlag]: TypeOfOption<typeof numberOfSharedAudioTagsOption>;
332
374
  [offthreadVideoCacheSizeInBytesOption.cliFlag]: TypeOfOption<typeof offthreadVideoCacheSizeInBytesOption>;
333
375
  [colorSpaceOption.cliFlag]: TypeOfOption<typeof colorSpaceOption>;
334
376
  [disallowParallelEncodingOption.cliFlag]: TypeOfOption<typeof disallowParallelEncodingOption>;
@@ -380,7 +422,7 @@ export type CommandLineOptions = {
380
422
  ['user-agent']: string;
381
423
  ['out-dir']: string;
382
424
  [audioLatencyHintOption.cliFlag]: AudioContextLatencyCategory;
383
- ipv4: boolean;
425
+ [ipv4Option.cliFlag]: TypeOfOption<typeof ipv4Option>;
384
426
  [deleteAfterOption.cliFlag]: TypeOfOption<typeof deleteAfterOption>;
385
427
  [folderExpiryOption.cliFlag]: TypeOfOption<typeof folderExpiryOption>;
386
428
  [enableMultiprocessOnLinuxOption.cliFlag]: TypeOfOption<typeof enableMultiprocessOnLinuxOption>;
@@ -388,6 +430,7 @@ export type CommandLineOptions = {
388
430
  'image-sequence-pattern': string;
389
431
  'license-key': string;
390
432
  [publicLicenseKeyOption.cliFlag]: string;
433
+ [forceNewStudioOption.cliFlag]: TypeOfOption<typeof forceNewStudioOption>;
391
434
  };
392
435
  export declare const parseCommandLine: () => void;
393
436
  export {};
@@ -5,7 +5,7 @@ const client_1 = require("@remotion/renderer/client");
5
5
  const config_1 = require("./config");
6
6
  const log_1 = require("./log");
7
7
  const parsed_cli_1 = require("./parsed-cli");
8
- const { beepOnFinishOption, colorSpaceOption, disallowParallelEncodingOption, offthreadVideoCacheSizeInBytesOption, encodingBufferSizeOption, encodingMaxRateOption, deleteAfterOption, folderExpiryOption, enableMultiprocessOnLinuxOption, numberOfGifLoopsOption, x264Option, enforceAudioOption, jpegQualityOption, audioBitrateOption, videoBitrateOption, audioCodecOption, publicPathOption, audioLatencyHintOption, darkModeOption, publicLicenseKeyOption, } = client_1.BrowserSafeApis.options;
8
+ const { beepOnFinishOption, colorSpaceOption, disallowParallelEncodingOption, offthreadVideoCacheSizeInBytesOption, encodingBufferSizeOption, encodingMaxRateOption, deleteAfterOption, folderExpiryOption, enableMultiprocessOnLinuxOption, numberOfGifLoopsOption, x264Option, enforceAudioOption, jpegQualityOption, audioBitrateOption, videoBitrateOption, audioCodecOption, publicPathOption, audioLatencyHintOption, darkModeOption, publicLicenseKeyOption, forceNewStudioOption, numberOfSharedAudioTagsOption, ipv4Option, } = client_1.BrowserSafeApis.options;
9
9
  const parseCommandLine = () => {
10
10
  if (parsed_cli_1.parsedCli['pixel-format']) {
11
11
  config_1.Config.setPixelFormat(parsed_cli_1.parsedCli['pixel-format']);
@@ -30,7 +30,7 @@ exports.BooleanFlags = [
30
30
  'disable-keyboard-shortcuts',
31
31
  'default-only',
32
32
  'no-open',
33
- 'ipv4',
33
+ client_1.BrowserSafeApis.options.ipv4Option.cliFlag,
34
34
  client_1.BrowserSafeApis.options.beepOnFinishOption.cliFlag,
35
35
  client_1.BrowserSafeApis.options.disableGitSourceOption.cliFlag,
36
36
  client_1.BrowserSafeApis.options.disallowParallelEncodingOption.cliFlag,
@@ -40,6 +40,7 @@ exports.BooleanFlags = [
40
40
  'force-path-style',
41
41
  'onlyAllocateCpuDuringRequestProcessing',
42
42
  client_1.BrowserSafeApis.options.isProductionOption.cliFlag,
43
+ client_1.BrowserSafeApis.options.forceNewStudioOption.cliFlag,
43
44
  ];
44
45
  exports.parsedCli = (0, minimist_1.default)(process.argv.slice(2), {
45
46
  boolean: exports.BooleanFlags,
package/dist/studio.js CHANGED
@@ -4,7 +4,6 @@ exports.studioCommand = void 0;
4
4
  const client_1 = require("@remotion/renderer/client");
5
5
  const studio_server_1 = require("@remotion/studio-server");
6
6
  const config_1 = require("./config");
7
- const number_of_shared_audio_tags_1 = require("./config/number-of-shared-audio-tags");
8
7
  const convert_entry_point_to_serve_url_1 = require("./convert-entry-point-to-serve-url");
9
8
  const entry_point_1 = require("./entry-point");
10
9
  const get_env_1 = require("./get-env");
@@ -24,9 +23,8 @@ const getPort = () => {
24
23
  }
25
24
  return null;
26
25
  };
27
- const { binariesDirectoryOption, publicDirOption, disableGitSourceOption, enableCrossSiteIsolationOption, askAIOption, experimentalClientSideRenderingOption, keyboardShortcutsOption, } = client_1.BrowserSafeApis.options;
26
+ const { binariesDirectoryOption, publicDirOption, disableGitSourceOption, enableCrossSiteIsolationOption, askAIOption, experimentalClientSideRenderingOption, keyboardShortcutsOption, forceNewStudioOption, numberOfSharedAudioTagsOption, audioLatencyHintOption, ipv4Option, } = client_1.BrowserSafeApis.options;
28
27
  const studioCommand = async (remotionRoot, args, logLevel) => {
29
- var _a;
30
28
  const { file, reason } = (0, entry_point_1.findEntryPoint)({
31
29
  args,
32
30
  remotionRoot,
@@ -85,7 +83,7 @@ const studioCommand = async (remotionRoot, args, logLevel) => {
85
83
  commandLine: parsed_cli_1.parsedCli,
86
84
  }).value;
87
85
  const gitSource = (0, get_github_repository_1.getGitSource)({ remotionRoot, disableGitSource, logLevel });
88
- await studio_server_1.StudioServerInternals.startStudio({
86
+ const result = await studio_server_1.StudioServerInternals.startStudio({
89
87
  previewEntry: require.resolve('@remotion/studio/previewEntry'),
90
88
  browserArgs: parsed_cli_1.parsedCli['browser-args'],
91
89
  browserFlag: parsed_cli_1.parsedCli.browser,
@@ -104,7 +102,9 @@ const studioCommand = async (remotionRoot, args, logLevel) => {
104
102
  poll: config_1.ConfigInternals.getWebpackPolling(),
105
103
  getRenderDefaults: get_render_defaults_1.getRenderDefaults,
106
104
  getRenderQueue: queue_1.getRenderQueue,
107
- numberOfAudioTags: (_a = parsed_cli_1.parsedCli['number-of-shared-audio-tags']) !== null && _a !== void 0 ? _a : (0, number_of_shared_audio_tags_1.getNumberOfSharedAudioTags)(),
105
+ numberOfAudioTags: numberOfSharedAudioTagsOption.getValue({
106
+ commandLine: parsed_cli_1.parsedCli,
107
+ }).value,
108
108
  queueMethods: {
109
109
  addJob: queue_1.addJob,
110
110
  cancelJob: queue_1.cancelJob,
@@ -116,11 +116,17 @@ const studioCommand = async (remotionRoot, args, logLevel) => {
116
116
  gitSource,
117
117
  bufferStateDelayInMilliseconds: config_1.ConfigInternals.getBufferStateDelayInMilliseconds(),
118
118
  binariesDirectory,
119
- forceIPv4: parsed_cli_1.parsedCli.ipv4,
120
- audioLatencyHint: parsed_cli_1.parsedCli['audio-latency-hint'],
119
+ forceIPv4: ipv4Option.getValue({ commandLine: parsed_cli_1.parsedCli }).value,
120
+ audioLatencyHint: audioLatencyHintOption.getValue({
121
+ commandLine: parsed_cli_1.parsedCli,
122
+ }).value,
121
123
  enableCrossSiteIsolation,
122
124
  askAIEnabled,
125
+ forceNew: forceNewStudioOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value,
123
126
  });
127
+ if (result.type === 'already-running') {
128
+ return;
129
+ }
124
130
  // If the server is restarted through the UI, let's do the whole thing again.
125
131
  await (0, exports.studioCommand)(remotionRoot, args, logLevel);
126
132
  };
package/dist/upgrade.js CHANGED
@@ -36,7 +36,12 @@ const upgradeCommand = async ({ remotionRoot, packageManager, version, logLevel,
36
36
  targetVersion = await studio_server_1.StudioServerInternals.getLatestRemotionVersion();
37
37
  log_1.Log.info({ indent: false, logLevel }, 'Newest Remotion version is', targetVersion);
38
38
  }
39
- const manager = studio_server_1.StudioServerInternals.getPackageManager(remotionRoot, packageManager, 0);
39
+ const manager = studio_server_1.StudioServerInternals.getPackageManager({
40
+ remotionRoot,
41
+ packageManager,
42
+ dirUp: 0,
43
+ logLevel,
44
+ });
40
45
  if (manager === 'unknown') {
41
46
  throw new Error(`No lockfile was found in your project (one of ${studio_server_1.StudioServerInternals.lockFilePaths
42
47
  .map((p) => p.path)
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/cli"
4
4
  },
5
5
  "name": "@remotion/cli",
6
- "version": "4.0.420",
6
+ "version": "4.0.422",
7
7
  "description": "Control Remotion features using the `npx remotion` command",
8
8
  "main": "dist/index.js",
9
9
  "sideEffects": false,
@@ -36,17 +36,17 @@
36
36
  "author": "Jonny Burger <jonny@remotion.dev>",
37
37
  "license": "SEE LICENSE IN LICENSE.md",
38
38
  "dependencies": {
39
- "@remotion/bundler": "4.0.420",
40
- "@remotion/media-utils": "4.0.420",
41
- "@remotion/player": "4.0.420",
42
- "@remotion/renderer": "4.0.420",
43
- "@remotion/studio-shared": "4.0.420",
44
- "@remotion/studio-server": "4.0.420",
45
- "@remotion/studio": "4.0.420",
39
+ "@remotion/bundler": "4.0.422",
40
+ "@remotion/media-utils": "4.0.422",
41
+ "@remotion/player": "4.0.422",
42
+ "@remotion/renderer": "4.0.422",
43
+ "@remotion/studio-shared": "4.0.422",
44
+ "@remotion/studio-server": "4.0.422",
45
+ "@remotion/studio": "4.0.422",
46
46
  "dotenv": "9.0.2",
47
47
  "minimist": "1.2.6",
48
48
  "prompts": "2.4.2",
49
- "remotion": "4.0.420"
49
+ "remotion": "4.0.422"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "react": ">=16.8.0",
@@ -57,14 +57,14 @@
57
57
  "@types/prompts": "^2.4.1",
58
58
  "@types/prettier": "^2.7.2",
59
59
  "@types/node": "20.12.14",
60
- "@remotion/zod-types": "4.0.420",
61
- "@remotion/tailwind-v4": "4.0.420",
62
- "@remotion/enable-scss": "4.0.420",
63
- "@remotion/skia": "4.0.420",
60
+ "@remotion/zod-types": "4.0.422",
61
+ "@remotion/tailwind-v4": "4.0.422",
62
+ "@remotion/enable-scss": "4.0.422",
63
+ "@remotion/skia": "4.0.422",
64
64
  "react": "19.2.3",
65
65
  "react-dom": "19.2.3",
66
66
  "zod": "3.22.3",
67
- "@remotion/eslint-config-internal": "4.0.420",
67
+ "@remotion/eslint-config-internal": "4.0.422",
68
68
  "eslint": "9.19.0"
69
69
  },
70
70
  "keywords": [