@remotion/cli 4.0.505 → 4.0.507

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.
@@ -1,5 +1,5 @@
1
1
  import type { BundlerOverrideFn, RspackConfiguration, RspackOverrideFn, WebpackConfiguration, WebpackOverrideFn } from '@remotion/bundler';
2
- import type { BrowserExecutable, ChromeMode, CodecOrUndefined, ColorSpace, Crf, DeleteAfter, DefaultEditor, FrameRange, NumberOfGifLoops, StillImageFormat, VideoImageFormat } from '@remotion/renderer';
2
+ import type { BrowserExecutable, ChromeMode, CodecOrUndefined, ColorSpace, Crf, DefaultCodingAgent, DefaultEditor, DeleteAfter, FrameRange, NumberOfGifLoops, StillImageFormat, VideoImageFormat } from '@remotion/renderer';
3
3
  import type { HardwareAccelerationOption } from '@remotion/renderer/client';
4
4
  import type { Concurrency } from './concurrency';
5
5
  export type { BundlerOverrideFn, Concurrency, RspackConfiguration, RspackOverrideFn, WebpackConfiguration, WebpackOverrideFn, };
@@ -388,6 +388,10 @@ type FlatConfig = RemotionConfigObject & RemotionBundlingOptions & {
388
388
  * Set the editor used when opening files from Remotion Studio.
389
389
  */
390
390
  setDefaultEditor: (editor: DefaultEditor) => void;
391
+ /**
392
+ * Set the coding agent used by Remotion Studio.
393
+ */
394
+ setDefaultCodingAgent: (codingAgent: DefaultCodingAgent) => void;
391
395
  setDeleteAfter: (day: DeleteAfter | null) => void;
392
396
  /**
393
397
  * Set whether S3 buckets should be allowed to expire.
@@ -18,7 +18,7 @@ const preview_server_1 = require("./preview-server");
18
18
  const still_frame_1 = require("./still-frame");
19
19
  const webpack_caching_1 = require("./webpack-caching");
20
20
  const webpack_poll_1 = require("./webpack-poll");
21
- const { benchmarkConcurrenciesOption, concurrencyOption, offthreadVideoCacheSizeInBytesOption, x264Option, audioBitrateOption, videoBitrateOption, scaleOption, crfOption, jpegQualityOption, enforceAudioOption, overwriteOption, chromeModeOption, mutedOption, videoCodecOption, colorSpaceOption, disallowParallelEncodingOption, deleteAfterOption, folderExpiryOption, enableMultiprocessOnLinuxOption, glOption, gopSizeOption, headlessOption, numberOfGifLoopsOption, beepOnFinishOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, enableLambdaInsights, logLevelOption, delayRenderTimeoutInMillisecondsOption, publicDirOption, binariesDirectoryOption, preferLosslessOption, framesOption, forSeamlessAacConcatenationOption, audioCodecOption, publicPathOption, hardwareAccelerationOption, audioLatencyHintOption, enableCrossSiteIsolationOption, imageSequencePatternOption, darkModeOption, defaultEditorOption, askAIOption, publicLicenseKeyOption, interactivityOption, keyboardShortcutsOption, forceNewStudioOption, numberOfSharedAudioTagsOption, ipv4Option, pixelFormatOption, browserExecutableOption, everyNthFrameOption, proResProfileOption, stillImageFormatOption, videoImageFormatOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, rspackOption, outDirOption, webpackPollOption, imageSequenceOption, bundleCacheOption, envFileOption, runsOption, noOpenOption, sampleRateOption, previewSampleRateOption, } = client_1.BrowserSafeApis.options;
21
+ const { benchmarkConcurrenciesOption, concurrencyOption, offthreadVideoCacheSizeInBytesOption, x264Option, audioBitrateOption, videoBitrateOption, scaleOption, crfOption, jpegQualityOption, enforceAudioOption, overwriteOption, chromeModeOption, mutedOption, videoCodecOption, colorSpaceOption, disallowParallelEncodingOption, deleteAfterOption, folderExpiryOption, enableMultiprocessOnLinuxOption, glOption, gopSizeOption, headlessOption, numberOfGifLoopsOption, beepOnFinishOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, enableLambdaInsights, logLevelOption, delayRenderTimeoutInMillisecondsOption, publicDirOption, binariesDirectoryOption, preferLosslessOption, framesOption, forSeamlessAacConcatenationOption, audioCodecOption, publicPathOption, hardwareAccelerationOption, audioLatencyHintOption, enableCrossSiteIsolationOption, imageSequencePatternOption, darkModeOption, defaultCodingAgentOption, defaultEditorOption, askAIOption, publicLicenseKeyOption, interactivityOption, keyboardShortcutsOption, forceNewStudioOption, numberOfSharedAudioTagsOption, ipv4Option, pixelFormatOption, browserExecutableOption, everyNthFrameOption, proResProfileOption, stillImageFormatOption, videoImageFormatOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, rspackOption, outDirOption, webpackPollOption, imageSequenceOption, bundleCacheOption, envFileOption, runsOption, noOpenOption, sampleRateOption, previewSampleRateOption, } = client_1.BrowserSafeApis.options;
22
22
  const setAllowHtmlInCanvasEnabled = (_enabled) => {
23
23
  log_1.Log.warn({ indent: false, logLevel: 'info' }, 'Config.setAllowHtmlInCanvasEnabled() is now a no-op because HTML-in-canvas is enabled by default when supported. You can remove this option from your config file.');
24
24
  };
@@ -128,6 +128,7 @@ exports.Config = {
128
128
  setEnableCrossSiteIsolation: enableCrossSiteIsolationOption.setConfig,
129
129
  setAskAIEnabled: askAIOption.setConfig,
130
130
  setPublicLicenseKey: publicLicenseKeyOption.setConfig,
131
+ setDefaultCodingAgent: defaultCodingAgentOption.setConfig,
131
132
  setDefaultEditor: defaultEditorOption.setConfig,
132
133
  setForceNewStudioEnabled: forceNewStudioOption.setConfig,
133
134
  setIPv4: ipv4Option.setConfig,
@@ -0,0 +1,10 @@
1
+ import { type ConfigFileChangeType } from '@remotion/studio-shared';
2
+ export type ConfigFileFingerprints = {
3
+ reload: string;
4
+ restart: string;
5
+ };
6
+ export declare const makeConfigFileFingerprints: (code: string) => ConfigFileFingerprints;
7
+ export declare const classifyConfigFileChange: ({ currentCode, startupFingerprints, }: {
8
+ currentCode: string;
9
+ startupFingerprints: ConfigFileFingerprints;
10
+ }) => ConfigFileChangeType;
@@ -0,0 +1,148 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.classifyConfigFileChange = exports.makeConfigFileFingerprints = void 0;
4
+ const parser_1 = require("@babel/parser");
5
+ const studio_shared_1 = require("@remotion/studio-shared");
6
+ const validateConfigMethodLifecycles = (lifecycles) => lifecycles;
7
+ // Keep this exhaustive so every new Config method must declare its Studio lifecycle.
8
+ const configMethodLifecycles = validateConfigMethodLifecycles(studio_shared_1.configMethodLifecycles);
9
+ const getConfigMethodsWithLifecycle = (lifecycle) => {
10
+ return new Set(Object.entries(configMethodLifecycles)
11
+ .filter(([, value]) => value === lifecycle)
12
+ .map(([methodName]) => methodName));
13
+ };
14
+ const runtimeConfigMethods = getConfigMethodsWithLifecycle('runtime');
15
+ const reloadConfigMethods = getConfigMethodsWithLifecycle('reload');
16
+ const ignoredAstProperties = new Set([
17
+ 'comments',
18
+ 'end',
19
+ 'errors',
20
+ 'extra',
21
+ 'loc',
22
+ 'start',
23
+ ]);
24
+ const getStaticPropertyName = (node) => {
25
+ var _a;
26
+ if (!node || typeof node !== 'object') {
27
+ return null;
28
+ }
29
+ const candidate = node;
30
+ if (candidate.type === 'Identifier') {
31
+ return (_a = candidate.name) !== null && _a !== void 0 ? _a : null;
32
+ }
33
+ if (candidate.type === 'StringLiteral') {
34
+ return typeof candidate.value === 'string' ? candidate.value : null;
35
+ }
36
+ return null;
37
+ };
38
+ const getConfigMethodName = (node) => {
39
+ if (!node || typeof node !== 'object') {
40
+ return null;
41
+ }
42
+ const callExpression = node;
43
+ if (callExpression.type !== 'CallExpression' ||
44
+ !callExpression.callee ||
45
+ typeof callExpression.callee !== 'object') {
46
+ return null;
47
+ }
48
+ const callee = callExpression.callee;
49
+ if (callee.type !== 'MemberExpression') {
50
+ return null;
51
+ }
52
+ const methodName = getStaticPropertyName(callee.property);
53
+ if (!methodName || !callee.object || typeof callee.object !== 'object') {
54
+ return null;
55
+ }
56
+ const configObject = callee.object;
57
+ if ((configObject.type === 'Identifier' && configObject.name === 'Config') ||
58
+ (configObject.type === 'MemberExpression' &&
59
+ getStaticPropertyName(configObject.property) === 'Config')) {
60
+ return methodName;
61
+ }
62
+ return null;
63
+ };
64
+ const isConfigRequire = (node) => {
65
+ var _a;
66
+ if (!node || typeof node !== 'object') {
67
+ return false;
68
+ }
69
+ const declarator = node;
70
+ if (declarator.type !== 'VariableDeclarator' ||
71
+ !declarator.init ||
72
+ typeof declarator.init !== 'object') {
73
+ return false;
74
+ }
75
+ const init = declarator.init;
76
+ if (init.type !== 'CallExpression' ||
77
+ !init.callee ||
78
+ typeof init.callee !== 'object' ||
79
+ init.callee.type !== 'Identifier' ||
80
+ init.callee.name !== 'require' ||
81
+ ((_a = init.arguments) === null || _a === void 0 ? void 0 : _a.length) !== 1) {
82
+ return false;
83
+ }
84
+ const source = init.arguments[0];
85
+ return ((source === null || source === void 0 ? void 0 : source.type) === 'StringLiteral' && source.value === '@remotion/cli/config');
86
+ };
87
+ const makeConfigFingerprint = ({ code, ignoredConfigMethods, }) => {
88
+ const ast = (0, parser_1.parse)(code, { sourceType: 'unambiguous' });
89
+ const omit = Symbol('omit');
90
+ const normalize = (value) => {
91
+ var _a;
92
+ if (Array.isArray(value)) {
93
+ return value
94
+ .map(normalize)
95
+ .filter((normalizedValue) => normalizedValue !== omit);
96
+ }
97
+ if (!value || typeof value !== 'object') {
98
+ return value;
99
+ }
100
+ const node = value;
101
+ const expressionConfigMethodName = getConfigMethodName(node.expression);
102
+ if (node.type === 'ExpressionStatement' &&
103
+ expressionConfigMethodName &&
104
+ ignoredConfigMethods.has(expressionConfigMethodName)) {
105
+ return omit;
106
+ }
107
+ if (node.type === 'VariableDeclaration' &&
108
+ ((_a = node.declarations) === null || _a === void 0 ? void 0 : _a.length) &&
109
+ node.declarations.every(isConfigRequire)) {
110
+ return omit;
111
+ }
112
+ const configMethodName = getConfigMethodName(value);
113
+ if (configMethodName && ignoredConfigMethods.has(configMethodName)) {
114
+ return { type: 'IgnoredConfigCall' };
115
+ }
116
+ return Object.fromEntries(Object.entries(value)
117
+ .filter(([key]) => !ignoredAstProperties.has(key))
118
+ .map(([key, child]) => [key, normalize(child)]));
119
+ };
120
+ return JSON.stringify(normalize(ast));
121
+ };
122
+ const makeConfigFileFingerprints = (code) => {
123
+ return {
124
+ reload: makeConfigFingerprint({
125
+ code,
126
+ ignoredConfigMethods: runtimeConfigMethods,
127
+ }),
128
+ restart: makeConfigFingerprint({
129
+ code,
130
+ ignoredConfigMethods: new Set([
131
+ ...runtimeConfigMethods,
132
+ ...reloadConfigMethods,
133
+ ]),
134
+ }),
135
+ };
136
+ };
137
+ exports.makeConfigFileFingerprints = makeConfigFileFingerprints;
138
+ const classifyConfigFileChange = ({ currentCode, startupFingerprints, }) => {
139
+ const currentFingerprints = (0, exports.makeConfigFileFingerprints)(currentCode);
140
+ if (currentFingerprints.restart !== startupFingerprints.restart) {
141
+ return 'restart';
142
+ }
143
+ if (currentFingerprints.reload !== startupFingerprints.reload) {
144
+ return 'reload';
145
+ }
146
+ return 'runtime';
147
+ };
148
+ exports.classifyConfigFileChange = classifyConfigFileChange;
@@ -1,5 +1,17 @@
1
1
  export declare const getLoadedConfigFile: () => string | null;
2
+ export declare const getLoadedConfigFileCode: () => string | null;
2
3
  export declare const loadConfig: (remotionRoot: string) => Promise<string | null>;
3
- export declare const reloadConfig: ({ resetConfigOptions, }: {
4
+ type ReloadConfigResult<T> = {
5
+ type: 'success';
6
+ value: T;
7
+ } | {
8
+ type: 'error';
9
+ errorMessage: string;
10
+ } | {
11
+ type: 'no-config';
12
+ };
13
+ export declare const reloadConfig: <T>({ resetConfigOptions, getConfigSnapshot, }: {
4
14
  resetConfigOptions: () => void;
5
- }) => Promise<boolean>;
15
+ getConfigSnapshot: (configFileCode: string) => T | Promise<T>;
16
+ }) => Promise<ReloadConfigResult<T>>;
17
+ export {};
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.reloadConfig = exports.loadConfig = exports.getLoadedConfigFile = void 0;
6
+ exports.reloadConfig = exports.loadConfig = exports.getLoadedConfigFileCode = exports.getLoadedConfigFile = void 0;
7
7
  const node_fs_1 = require("node:fs");
8
8
  const node_path_1 = __importDefault(require("node:path"));
9
9
  const client_1 = require("@remotion/renderer/client");
@@ -20,6 +20,11 @@ const getLoadedConfigFile = () => {
20
20
  return (_a = loadedConfigFile === null || loadedConfigFile === void 0 ? void 0 : loadedConfigFile.resolved) !== null && _a !== void 0 ? _a : null;
21
21
  };
22
22
  exports.getLoadedConfigFile = getLoadedConfigFile;
23
+ const getLoadedConfigFileCode = () => {
24
+ var _a;
25
+ return (_a = loadedConfigFile === null || loadedConfigFile === void 0 ? void 0 : loadedConfigFile.code) !== null && _a !== void 0 ? _a : null;
26
+ };
27
+ exports.getLoadedConfigFileCode = getLoadedConfigFileCode;
23
28
  const warnAboutBundlerOverride = () => {
24
29
  const useRspack = rspackOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
25
30
  const hasWebpackOverride = config_1.ConfigInternals.getWebpackOverrideFn() !==
@@ -79,9 +84,12 @@ const loadConfig = async (remotionRoot) => {
79
84
  return null;
80
85
  };
81
86
  exports.loadConfig = loadConfig;
82
- const reloadConfig = async ({ resetConfigOptions, }) => {
87
+ const logConfigReloadError = (errorMessage) => {
88
+ log_1.Log.error({ indent: false, logLevel: 'error' }, 'Could not reload the Remotion config. Keeping the previous configuration.', errorMessage);
89
+ };
90
+ const reloadConfig = async ({ resetConfigOptions, getConfigSnapshot, }) => {
83
91
  if (!loadedConfigFile) {
84
- return false;
92
+ return { type: 'no-config' };
85
93
  }
86
94
  const previousConfigFile = loadedConfigFile;
87
95
  let nextConfigFile;
@@ -89,21 +97,24 @@ const reloadConfig = async ({ resetConfigOptions, }) => {
89
97
  nextConfigFile = await (0, load_config_1.prepareConfigFile)(previousConfigFile.remotionRoot, previousConfigFile.resolved, previousConfigFile.resolved.endsWith('.js'));
90
98
  }
91
99
  catch (error) {
92
- log_1.Log.error({ indent: false, logLevel: 'error' }, 'Could not reload the Remotion config. Keeping the previous configuration.', error instanceof Error ? error.message : String(error));
93
- return false;
100
+ const errorMessage = error instanceof Error ? error.message : String(error);
101
+ logConfigReloadError(errorMessage);
102
+ return { type: 'error', errorMessage };
94
103
  }
95
104
  resetConfigOptions();
96
105
  try {
97
106
  (0, load_config_1.executeConfigFile)(nextConfigFile);
98
- loadedConfigFile = nextConfigFile;
107
+ const configSnapshot = await getConfigSnapshot(nextConfigFile.code);
99
108
  warnAboutBundlerOverride();
100
- return true;
109
+ loadedConfigFile = nextConfigFile;
110
+ return { type: 'success', value: configSnapshot };
101
111
  }
102
112
  catch (error) {
103
113
  resetConfigOptions();
104
114
  (0, load_config_1.executeConfigFile)(previousConfigFile);
105
- log_1.Log.error({ indent: false, logLevel: 'error' }, 'Could not reload the Remotion config. Keeping the previous configuration.', error instanceof Error ? error.message : String(error));
106
- return false;
115
+ const errorMessage = error instanceof Error ? error.message : String(error);
116
+ logConfigReloadError(errorMessage);
117
+ return { type: 'error', errorMessage };
107
118
  }
108
119
  };
109
120
  exports.reloadConfig = reloadConfig;
@@ -351,6 +351,21 @@ declare const benchmarkConcurrenciesOption: {
351
351
  };
352
352
  setConfig: (value: boolean) => void;
353
353
  id: "dark-mode";
354
+ }, defaultCodingAgentOption: {
355
+ name: string;
356
+ cliFlag: "coding-agent";
357
+ description: () => import("react/jsx-runtime").JSX.Element;
358
+ ssrName: null;
359
+ docLink: string;
360
+ type: "claude-code" | "codex" | "copilot" | "cursor" | null;
361
+ getValue: ({ commandLine }: {
362
+ commandLine: Record<string, unknown>;
363
+ }) => {
364
+ value: "claude-code" | "codex" | "copilot" | "cursor" | null;
365
+ source: string;
366
+ };
367
+ setConfig(value: "claude-code" | "codex" | "copilot" | "cursor" | null): void;
368
+ id: "coding-agent";
354
369
  }, defaultEditorOption: {
355
370
  name: string;
356
371
  cliFlag: "editor";
@@ -1190,6 +1205,7 @@ export type CommandLineOptions = {
1190
1205
  [envFileOption.cliFlag]: TypeOfOption<typeof envFileOption>;
1191
1206
  [ignoreCertificateErrorsOption.cliFlag]: TypeOfOption<typeof ignoreCertificateErrorsOption> | null;
1192
1207
  [darkModeOption.cliFlag]: TypeOfOption<typeof darkModeOption> | null;
1208
+ [defaultCodingAgentOption.cliFlag]: TypeOfOption<typeof defaultCodingAgentOption>;
1193
1209
  [defaultEditorOption.cliFlag]: TypeOfOption<typeof defaultEditorOption>;
1194
1210
  [disableWebSecurityOption.cliFlag]: TypeOfOption<typeof disableWebSecurityOption> | null;
1195
1211
  [everyNthFrameOption.cliFlag]: TypeOfOption<typeof everyNthFrameOption>;
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.quietFlagProvided = exports.parsedCli = exports.BooleanFlags = void 0;
7
7
  const client_1 = require("@remotion/renderer/client");
8
8
  const minimist_1 = __importDefault(require("minimist"));
9
- const { benchmarkConcurrenciesOption, beepOnFinishOption, colorSpaceOption, concurrencyOption, disallowParallelEncodingOption, offthreadVideoCacheSizeInBytesOption, encodingBufferSizeOption, encodingMaxRateOption, deleteAfterOption, folderExpiryOption, enableMultiprocessOnLinuxOption, numberOfGifLoopsOption, x264Option, enforceAudioOption, jpegQualityOption, audioBitrateOption, videoBitrateOption, audioCodecOption, publicPathOption, audioLatencyHintOption, darkModeOption, defaultEditorOption, publicLicenseKeyOption, forceNewStudioOption, numberOfSharedAudioTagsOption, ipv4Option, pixelFormatOption, browserExecutableOption, everyNthFrameOption, proResProfileOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, outDirOption, packageManagerOption, webpackPollOption, keyboardShortcutsOption, interactivityOption, imageSequencePatternOption, scaleOption, overwriteOption, crfOption, logLevelOption, videoCodecOption, stillFrameOption, imageSequenceOption, versionFlagOption, bundleCacheOption, envFileOption, glOption, gopSizeOption, runsOption, reproOption, mutedOption, headlessOption, disableGitSourceOption, delayRenderTimeoutInMillisecondsOption, framesOption, forSeamlessAacConcatenationOption, isProductionOption, noOpenOption, portOption, propsOption, configOption, browserOption, sampleRateOption, previewSampleRateOption, rspackOption, skipSkillsOption, } = client_1.BrowserSafeApis.options;
9
+ const { benchmarkConcurrenciesOption, beepOnFinishOption, colorSpaceOption, concurrencyOption, disallowParallelEncodingOption, offthreadVideoCacheSizeInBytesOption, encodingBufferSizeOption, encodingMaxRateOption, deleteAfterOption, folderExpiryOption, enableMultiprocessOnLinuxOption, numberOfGifLoopsOption, x264Option, enforceAudioOption, jpegQualityOption, audioBitrateOption, videoBitrateOption, audioCodecOption, publicPathOption, audioLatencyHintOption, darkModeOption, defaultCodingAgentOption, defaultEditorOption, publicLicenseKeyOption, forceNewStudioOption, numberOfSharedAudioTagsOption, ipv4Option, pixelFormatOption, browserExecutableOption, everyNthFrameOption, proResProfileOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, outDirOption, packageManagerOption, webpackPollOption, keyboardShortcutsOption, interactivityOption, imageSequencePatternOption, scaleOption, overwriteOption, crfOption, logLevelOption, videoCodecOption, stillFrameOption, imageSequenceOption, versionFlagOption, bundleCacheOption, envFileOption, glOption, gopSizeOption, runsOption, reproOption, mutedOption, headlessOption, disableGitSourceOption, delayRenderTimeoutInMillisecondsOption, framesOption, forSeamlessAacConcatenationOption, isProductionOption, noOpenOption, portOption, propsOption, configOption, browserOption, sampleRateOption, previewSampleRateOption, rspackOption, skipSkillsOption, } = client_1.BrowserSafeApis.options;
10
10
  exports.BooleanFlags = [
11
11
  overwriteOption.cliFlag,
12
12
  imageSequenceOption.cliFlag,
@@ -1,7 +1,7 @@
1
1
  import type { BundlerOverrideFn, RspackOverrideFn, WebpackOverrideFn } from '@remotion/bundler';
2
2
  import type { BrowserExecutable, CancelSignal, ChromiumOptions, Crf, FfmpegOverrideFn, FrameRange, NumberOfGifLoops } from '@remotion/renderer';
3
3
  import type { JobProgressCallback } from '@remotion/studio-server';
4
- export declare const renderVideoFlow: ({ remotionRoot, fullEntryPoint, indent, logLevel, browserExecutable, browser, chromiumOptions, scale, shouldOutputImageSequence, publicDir, envVariables, puppeteerTimeout, port, height, width, fps, durationInFrames, remainingArgs, compositionIdFromUi, entryPointReason, overwrite, quiet, concurrency, frameRange, selectedFrames, everyNthFrame, outputLocationFromUI, jpegQuality, onProgress, addCleanupCallback, cancelSignal, crf, gopSize, uiCodec, uiImageFormat, ffmpegOverride, audioBitrate, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, videoBitrate, encodingMaxRate, encodingBufferSize, numberOfGifLoops, audioCodec, serializedInputPropsWithCustomSchema, disallowParallelEncoding, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, colorSpace, repro, binariesDirectory, forSeamlessAacConcatenation, separateAudioTo, publicPath, metadata, hardwareAcceleration, chromeMode, audioLatencyHint, imageSequencePattern, mediaCacheSizeInBytes, rspack, askAIEnabled, keyboardShortcutsEnabled, shouldCache, sampleRate, bundlerOverride, rspackOverride, webpackOverride, }: {
4
+ export declare const renderVideoFlow: ({ remotionRoot, fullEntryPoint, indent, logLevel, browserExecutable, browser, chromiumOptions, scale, shouldOutputImageSequence, publicDir, envVariables, puppeteerTimeout, port, height, width, fps, durationInFrames, remainingArgs, compositionIdFromUi, entryPointReason, overwrite, quiet, concurrency, frameRange, selectedFrames, everyNthFrame, outputLocationFromUI, jpegQuality, onProgress, addCleanupCallback, cancelSignal, crf, gopSize, uiCodec, uiImageFormat, ffmpegOverride, audioBitrate, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, videoBitrate, encodingMaxRate, encodingBufferSize, numberOfGifLoops, audioCodec, serializedInputPropsWithCustomSchema, disallowParallelEncoding, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, colorSpace, repro, binariesDirectory, forSeamlessAacConcatenation, separateAudioTo, publicPath, metadata, hardwareAcceleration, chromeMode, audioLatencyHint, imageSequencePattern, mediaCacheSizeInBytes, rspack, askAIEnabled, keyboardShortcutsEnabled, shouldCache, sampleRate, bundlerOverride, rspackOverride, webpackOverride, licenseKey, }: {
5
5
  remotionRoot: string;
6
6
  fullEntryPoint: string;
7
7
  entryPointReason: string;
@@ -73,4 +73,5 @@ export declare const renderVideoFlow: ({ remotionRoot, fullEntryPoint, indent, l
73
73
  bundlerOverride: BundlerOverrideFn | null;
74
74
  rspackOverride: RspackOverrideFn | null;
75
75
  webpackOverride: WebpackOverrideFn | null;
76
+ licenseKey: string | null;
76
77
  }) => Promise<void>;
@@ -61,7 +61,7 @@ const should_use_non_overlaying_logger_1 = require("../should-use-non-overlaying
61
61
  const truthy_1 = require("../truthy");
62
62
  const user_passed_output_location_1 = require("../user-passed-output-location");
63
63
  const add_log_to_aggregate_progress_1 = require("./add-log-to-aggregate-progress");
64
- const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel, browserExecutable, browser, chromiumOptions, scale, shouldOutputImageSequence, publicDir, envVariables, puppeteerTimeout, port, height, width, fps, durationInFrames, remainingArgs, compositionIdFromUi, entryPointReason, overwrite, quiet, concurrency, frameRange, selectedFrames, everyNthFrame, outputLocationFromUI, jpegQuality, onProgress, addCleanupCallback, cancelSignal, crf, gopSize, uiCodec, uiImageFormat, ffmpegOverride, audioBitrate, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, videoBitrate, encodingMaxRate, encodingBufferSize, numberOfGifLoops, audioCodec, serializedInputPropsWithCustomSchema, disallowParallelEncoding, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, colorSpace, repro, binariesDirectory, forSeamlessAacConcatenation, separateAudioTo, publicPath, metadata, hardwareAcceleration, chromeMode, audioLatencyHint, imageSequencePattern, mediaCacheSizeInBytes, rspack, askAIEnabled, keyboardShortcutsEnabled, shouldCache, sampleRate, bundlerOverride, rspackOverride, webpackOverride, }) => {
64
+ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel, browserExecutable, browser, chromiumOptions, scale, shouldOutputImageSequence, publicDir, envVariables, puppeteerTimeout, port, height, width, fps, durationInFrames, remainingArgs, compositionIdFromUi, entryPointReason, overwrite, quiet, concurrency, frameRange, selectedFrames, everyNthFrame, outputLocationFromUI, jpegQuality, onProgress, addCleanupCallback, cancelSignal, crf, gopSize, uiCodec, uiImageFormat, ffmpegOverride, audioBitrate, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, videoBitrate, encodingMaxRate, encodingBufferSize, numberOfGifLoops, audioCodec, serializedInputPropsWithCustomSchema, disallowParallelEncoding, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, colorSpace, repro, binariesDirectory, forSeamlessAacConcatenation, separateAudioTo, publicPath, metadata, hardwareAcceleration, chromeMode, audioLatencyHint, imageSequencePattern, mediaCacheSizeInBytes, rspack, askAIEnabled, keyboardShortcutsEnabled, shouldCache, sampleRate, bundlerOverride, rspackOverride, webpackOverride, licenseKey, }) => {
65
65
  var _a;
66
66
  renderer_1.RenderInternals.validateConcurrency({
67
67
  value: concurrency,
@@ -533,7 +533,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
533
533
  chromeMode,
534
534
  mediaCacheSizeInBytes,
535
535
  onLog,
536
- licenseKey: null,
536
+ licenseKey,
537
537
  isProduction: null,
538
538
  sampleRate: resolvedSampleRate,
539
539
  });
@@ -1,7 +1,7 @@
1
1
  import type { BundlerOverrideFn, RspackOverrideFn, WebpackOverrideFn } from '@remotion/bundler';
2
2
  import type { BrowserExecutable, CancelSignal, ChromiumOptions } from '@remotion/renderer';
3
3
  import type { JobProgressCallback } from '@remotion/studio-server';
4
- export declare const renderStillFlow: ({ remotionRoot, fullEntryPoint, entryPointReason, remainingArgs, browser, browserExecutable, chromiumOptions, envVariables, height, width, fps, durationInFrames, serializedInputPropsWithCustomSchema, overwrite, port, publicDir, puppeteerTimeout, jpegQuality, scale, stillFrame, compositionIdFromUi, imageFormatFromUi, logLevel, onProgress, indent, addCleanupCallback, cancelSignal, outputLocationFromUi, offthreadVideoCacheSizeInBytes, binariesDirectory, publicPath, chromeMode, offthreadVideoThreads, audioLatencyHint, mediaCacheSizeInBytes, rspack, askAIEnabled, keyboardShortcutsEnabled, shouldCache, bundlerOverride, rspackOverride, webpackOverride, }: {
4
+ export declare const renderStillFlow: ({ remotionRoot, fullEntryPoint, entryPointReason, remainingArgs, browser, browserExecutable, chromiumOptions, envVariables, height, width, fps, durationInFrames, serializedInputPropsWithCustomSchema, overwrite, port, publicDir, puppeteerTimeout, jpegQuality, scale, stillFrame, compositionIdFromUi, imageFormatFromUi, logLevel, onProgress, indent, addCleanupCallback, cancelSignal, outputLocationFromUi, offthreadVideoCacheSizeInBytes, binariesDirectory, publicPath, chromeMode, offthreadVideoThreads, audioLatencyHint, mediaCacheSizeInBytes, rspack, askAIEnabled, keyboardShortcutsEnabled, shouldCache, bundlerOverride, rspackOverride, webpackOverride, licenseKey, }: {
5
5
  remotionRoot: string;
6
6
  fullEntryPoint: string;
7
7
  entryPointReason: string;
@@ -44,4 +44,5 @@ export declare const renderStillFlow: ({ remotionRoot, fullEntryPoint, entryPoin
44
44
  bundlerOverride: BundlerOverrideFn | null;
45
45
  rspackOverride: RspackOverrideFn | null;
46
46
  webpackOverride: WebpackOverrideFn | null;
47
+ licenseKey: string | null;
47
48
  }) => Promise<void>;
@@ -28,7 +28,7 @@ const should_use_non_overlaying_logger_1 = require("../should-use-non-overlaying
28
28
  const truthy_1 = require("../truthy");
29
29
  const user_passed_output_location_1 = require("../user-passed-output-location");
30
30
  const add_log_to_aggregate_progress_1 = require("./add-log-to-aggregate-progress");
31
- const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason, remainingArgs, browser, browserExecutable, chromiumOptions, envVariables, height, width, fps, durationInFrames, serializedInputPropsWithCustomSchema, overwrite, port, publicDir, puppeteerTimeout, jpegQuality, scale, stillFrame, compositionIdFromUi, imageFormatFromUi, logLevel, onProgress, indent, addCleanupCallback, cancelSignal, outputLocationFromUi, offthreadVideoCacheSizeInBytes, binariesDirectory, publicPath, chromeMode, offthreadVideoThreads, audioLatencyHint, mediaCacheSizeInBytes, rspack, askAIEnabled, keyboardShortcutsEnabled, shouldCache, bundlerOverride, rspackOverride, webpackOverride, }) => {
31
+ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason, remainingArgs, browser, browserExecutable, chromiumOptions, envVariables, height, width, fps, durationInFrames, serializedInputPropsWithCustomSchema, overwrite, port, publicDir, puppeteerTimeout, jpegQuality, scale, stillFrame, compositionIdFromUi, imageFormatFromUi, logLevel, onProgress, indent, addCleanupCallback, cancelSignal, outputLocationFromUi, offthreadVideoCacheSizeInBytes, binariesDirectory, publicPath, chromeMode, offthreadVideoThreads, audioLatencyHint, mediaCacheSizeInBytes, rspack, askAIEnabled, keyboardShortcutsEnabled, shouldCache, bundlerOverride, rspackOverride, webpackOverride, licenseKey, }) => {
32
32
  const isVerbose = renderer_1.RenderInternals.isEqualOrBelowLogLevel(logLevel, 'verbose');
33
33
  log_1.Log.verbose({ indent, logLevel }, chalk_1.chalk.gray(`Entry point = ${fullEntryPoint} (${entryPointReason})`));
34
34
  const aggregate = (0, progress_types_1.initialAggregateRenderProgress)();
@@ -284,7 +284,7 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
284
284
  printToConsole: true,
285
285
  });
286
286
  },
287
- licenseKey: null,
287
+ licenseKey,
288
288
  isProduction: null,
289
289
  });
290
290
  aggregate.rendering = {
@@ -64,6 +64,7 @@ const processStill = async ({ job, remotionRoot, entryPoint, onProgress, addClea
64
64
  bundlerOverride: fixedConfig.bundlerOverride,
65
65
  rspackOverride: fixedConfig.rspackOverride,
66
66
  webpackOverride: fixedConfig.webpackOverride,
67
+ licenseKey: job.licenseKey,
67
68
  });
68
69
  };
69
70
  exports.processStill = processStill;
@@ -103,6 +103,7 @@ const processVideoJob = async ({ job, remotionRoot, entryPoint, onProgress, addC
103
103
  bundlerOverride: fixedConfig.bundlerOverride,
104
104
  rspackOverride: fixedConfig.rspackOverride,
105
105
  webpackOverride: fixedConfig.webpackOverride,
106
+ licenseKey: job.type === 'video' ? job.licenseKey : null,
106
107
  });
107
108
  };
108
109
  exports.processVideoJob = processVideoJob;
package/dist/render.js CHANGED
@@ -11,7 +11,7 @@ const get_cli_options_1 = require("./get-cli-options");
11
11
  const log_1 = require("./log");
12
12
  const parsed_cli_1 = require("./parsed-cli");
13
13
  const render_1 = require("./render-flows/render");
14
- const { x264Option, audioBitrateOption, offthreadVideoCacheSizeInBytesOption, scaleOption, crfOption, gopSizeOption, jpegQualityOption, videoBitrateOption, enforceAudioOption, mutedOption, colorSpaceOption, disallowParallelEncodingOption, enableMultiprocessOnLinuxOption, glOption, numberOfGifLoopsOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, delayRenderTimeoutInMillisecondsOption, headlessOption, overwriteOption, binariesDirectoryOption, forSeamlessAacConcatenationOption, separateAudioOption, audioCodecOption, publicPathOption, publicDirOption, metadataOption, hardwareAccelerationOption, chromeModeOption, offthreadVideoThreadsOption, audioLatencyHintOption, imageSequencePatternOption, mediaCacheSizeInBytesOption, darkModeOption, askAIOption, keyboardShortcutsOption, rspackOption, browserExecutableOption, everyNthFrameOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, concurrencyOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, bundleCacheOption, sampleRateOption, stillFrameOption, } = client_1.BrowserSafeApis.options;
14
+ const { x264Option, audioBitrateOption, offthreadVideoCacheSizeInBytesOption, scaleOption, crfOption, gopSizeOption, jpegQualityOption, videoBitrateOption, enforceAudioOption, mutedOption, colorSpaceOption, disallowParallelEncodingOption, enableMultiprocessOnLinuxOption, glOption, numberOfGifLoopsOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, delayRenderTimeoutInMillisecondsOption, headlessOption, overwriteOption, binariesDirectoryOption, forSeamlessAacConcatenationOption, separateAudioOption, audioCodecOption, publicPathOption, publicDirOption, metadataOption, hardwareAccelerationOption, chromeModeOption, offthreadVideoThreadsOption, audioLatencyHintOption, imageSequencePatternOption, mediaCacheSizeInBytesOption, darkModeOption, askAIOption, keyboardShortcutsOption, rspackOption, browserExecutableOption, everyNthFrameOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, concurrencyOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, bundleCacheOption, sampleRateOption, stillFrameOption, publicLicenseKeyOption, } = client_1.BrowserSafeApis.options;
15
15
  const render = async (remotionRoot, args, logLevel) => {
16
16
  const { file, remainingArgs, reason: entryPointReason, } = (0, entry_point_1.findEntryPoint)({ args, remotionRoot, logLevel, allowDirectory: true });
17
17
  if (!file) {
@@ -238,6 +238,7 @@ const render = async (remotionRoot, args, logLevel) => {
238
238
  bundlerOverride: null,
239
239
  rspackOverride: null,
240
240
  webpackOverride: null,
241
+ licenseKey: publicLicenseKeyOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value,
241
242
  });
242
243
  };
243
244
  exports.render = render;
package/dist/still.js CHANGED
@@ -11,7 +11,7 @@ const get_cli_options_1 = require("./get-cli-options");
11
11
  const log_1 = require("./log");
12
12
  const parsed_cli_1 = require("./parsed-cli");
13
13
  const still_1 = require("./render-flows/still");
14
- const { offthreadVideoCacheSizeInBytesOption, scaleOption, jpegQualityOption, enableMultiprocessOnLinuxOption, glOption, delayRenderTimeoutInMillisecondsOption, headlessOption, overwriteOption, binariesDirectoryOption, publicPathOption, publicDirOption, chromeModeOption, offthreadVideoThreadsOption, audioLatencyHintOption, mediaCacheSizeInBytesOption, darkModeOption, askAIOption, keyboardShortcutsOption, rspackOption, browserExecutableOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, bundleCacheOption, framesOption, } = client_1.BrowserSafeApis.options;
14
+ const { offthreadVideoCacheSizeInBytesOption, scaleOption, jpegQualityOption, enableMultiprocessOnLinuxOption, glOption, delayRenderTimeoutInMillisecondsOption, headlessOption, overwriteOption, binariesDirectoryOption, publicPathOption, publicDirOption, chromeModeOption, offthreadVideoThreadsOption, audioLatencyHintOption, mediaCacheSizeInBytesOption, darkModeOption, askAIOption, keyboardShortcutsOption, rspackOption, browserExecutableOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, bundleCacheOption, framesOption, publicLicenseKeyOption, } = client_1.BrowserSafeApis.options;
15
15
  const still = async (remotionRoot, args, logLevel) => {
16
16
  const { file, remainingArgs, reason: entryPointReason, } = (0, entry_point_1.findEntryPoint)({ args, remotionRoot, logLevel, allowDirectory: true });
17
17
  if (!file) {
@@ -158,6 +158,7 @@ const still = async (remotionRoot, args, logLevel) => {
158
158
  bundlerOverride: null,
159
159
  rspackOverride: null,
160
160
  webpackOverride: null,
161
+ licenseKey: publicLicenseKeyOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value,
161
162
  });
162
163
  };
163
164
  exports.still = still;
package/dist/studio.js CHANGED
@@ -3,8 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.studioCommand = void 0;
4
4
  const client_1 = require("@remotion/renderer/client");
5
5
  const studio_server_1 = require("@remotion/studio-server");
6
+ const studio_shared_1 = require("@remotion/studio-shared");
6
7
  const chalk_1 = require("./chalk");
7
8
  const config_1 = require("./config");
9
+ const config_file_change_1 = require("./config-file-change");
8
10
  const convert_entry_point_to_serve_url_1 = require("./convert-entry-point-to-serve-url");
9
11
  const entry_point_1 = require("./entry-point");
10
12
  const get_config_file_name_1 = require("./get-config-file-name");
@@ -15,7 +17,7 @@ const get_render_defaults_1 = require("./get-render-defaults");
15
17
  const log_1 = require("./log");
16
18
  const parsed_cli_1 = require("./parsed-cli");
17
19
  const queue_1 = require("./render-queue/queue");
18
- const { binariesDirectoryOption, publicDirOption, disableGitSourceOption, enableCrossSiteIsolationOption, askAIOption, interactivityOption, keyboardShortcutsOption, forceNewStudioOption, numberOfSharedAudioTagsOption, audioLatencyHintOption, ipv4Option, rspackOption, webpackPollOption, noOpenOption, portOption, browserOption, previewSampleRateOption, defaultEditorOption, } = client_1.BrowserSafeApis.options;
20
+ const { binariesDirectoryOption, publicDirOption, disableGitSourceOption, enableCrossSiteIsolationOption, askAIOption, interactivityOption, keyboardShortcutsOption, forceNewStudioOption, numberOfSharedAudioTagsOption, audioLatencyHintOption, ipv4Option, rspackOption, webpackPollOption, noOpenOption, portOption, browserOption, previewSampleRateOption, defaultCodingAgentOption, defaultEditorOption, publicLicenseKeyOption, } = client_1.BrowserSafeApis.options;
19
21
  const studioCommand = async (remotionRoot, args, logLevel) => {
20
22
  var _a, _b, _c;
21
23
  const { file, reason } = (0, entry_point_1.findEntryPoint)({
@@ -35,36 +37,6 @@ const studioCommand = async (remotionRoot, args, logLevel) => {
35
37
  const fullEntryPath = (0, convert_entry_point_to_serve_url_1.convertEntryPointToServeUrl)(file);
36
38
  studio_server_1.StudioServerInternals.setFileWatcherRegistry(studio_server_1.StudioServerInternals.createFileWatcherRegistry());
37
39
  const configFile = (0, get_config_file_name_1.getLoadedConfigFile)();
38
- if (configFile) {
39
- let isReloadingConfig = false;
40
- studio_server_1.StudioServerInternals.installFileWatcher({
41
- file: configFile,
42
- existenceOnly: false,
43
- onChange: async () => {
44
- if (isReloadingConfig) {
45
- return;
46
- }
47
- isReloadingConfig = true;
48
- try {
49
- const configWasReloaded = await (0, get_config_file_name_1.reloadConfig)({
50
- resetConfigOptions: config_1.ConfigInternals.resetConfigOptions,
51
- });
52
- if (!configWasReloaded) {
53
- return;
54
- }
55
- log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.blue('Config file changed. Reloading Studio'));
56
- studio_server_1.StudioServerInternals.waitForLiveEventsListener().then((listener) => {
57
- listener.sendEventToClient({
58
- type: 'config-file-changed',
59
- });
60
- });
61
- }
62
- finally {
63
- isReloadingConfig = false;
64
- }
65
- },
66
- });
67
- }
68
40
  let inputProps = (0, get_input_props_1.getInputProps)((newProps) => {
69
41
  studio_server_1.StudioServerInternals.waitForLiveEventsListener().then((listener) => {
70
42
  inputProps = newProps;
@@ -102,23 +74,111 @@ const studioCommand = async (remotionRoot, args, logLevel) => {
102
74
  const rspackOverride = config_1.ConfigInternals.getRspackOverrideFn();
103
75
  const webpackOverride = config_1.ConfigInternals.getWebpackOverrideFn();
104
76
  log_1.Log.verbose({ indent: false, logLevel }, `Using ${useRspack ? 'Rspack' : 'Webpack'} bundler.`);
105
- const getStudioRuntimeConfig = () => ({
106
- maxTimelineTracks: config_1.ConfigInternals.getMaxTimelineTracks(),
107
- askAIEnabled: askAIOption.getValue({
108
- commandLine: parsed_cli_1.parsedCli,
109
- }).value,
110
- interactivityEnabled: interactivityOption.getValue({
77
+ const getStudioRuntimeConfig = () => {
78
+ const configuredEditor = defaultEditorOption.getValue({
111
79
  commandLine: parsed_cli_1.parsedCli,
112
- }).value,
113
- keyboardShortcutsEnabled: keyboardShortcutsOption.getValue({
114
- commandLine: parsed_cli_1.parsedCli,
115
- }).value,
116
- bufferStateDelayInMilliseconds: config_1.ConfigInternals.getBufferStateDelayInMilliseconds(),
117
- });
80
+ }).value;
81
+ return {
82
+ maxTimelineTracks: config_1.ConfigInternals.getMaxTimelineTracks(),
83
+ askAIEnabled: askAIOption.getValue({
84
+ commandLine: parsed_cli_1.parsedCli,
85
+ }).value,
86
+ interactivityEnabled: interactivityOption.getValue({
87
+ commandLine: parsed_cli_1.parsedCli,
88
+ }).value,
89
+ keyboardShortcutsEnabled: keyboardShortcutsOption.getValue({
90
+ commandLine: parsed_cli_1.parsedCli,
91
+ }).value,
92
+ bufferStateDelayInMilliseconds: config_1.ConfigInternals.getBufferStateDelayInMilliseconds(),
93
+ defaultCodingAgent: defaultCodingAgentOption.getValue({
94
+ commandLine: parsed_cli_1.parsedCli,
95
+ }).value,
96
+ defaultEditor: typeof configuredEditor === 'object' ? 'custom' : configuredEditor,
97
+ publicLicenseKey: publicLicenseKeyOption.getValue({
98
+ commandLine: parsed_cli_1.parsedCli,
99
+ }).value,
100
+ };
101
+ };
118
102
  const getNumberOfAudioTags = () => numberOfSharedAudioTagsOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
119
103
  const getAudioLatencyHint = () => audioLatencyHintOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
120
104
  const getPreviewSampleRate = () => previewSampleRateOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
105
+ const getDefaultCodingAgent = () => defaultCodingAgentOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
121
106
  const getDefaultEditor = () => defaultEditorOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
107
+ const startupConfigCode = (0, get_config_file_name_1.getLoadedConfigFileCode)();
108
+ if (configFile && startupConfigCode) {
109
+ let isReloadingConfig = false;
110
+ let startupConfigFingerprints = null;
111
+ const sendConfigFileReloadError = (errorMessage) => {
112
+ studio_server_1.StudioServerInternals.waitForLiveEventsListener().then((listener) => {
113
+ listener.sendEventToClient({
114
+ type: 'config-file-reload-failed',
115
+ errorMessage,
116
+ });
117
+ });
118
+ };
119
+ studio_server_1.StudioServerInternals.installFileWatcher({
120
+ file: configFile,
121
+ existenceOnly: false,
122
+ onChange: async (event) => {
123
+ if (isReloadingConfig) {
124
+ return;
125
+ }
126
+ isReloadingConfig = true;
127
+ try {
128
+ const reloadResult = await (0, get_config_file_name_1.reloadConfig)({
129
+ resetConfigOptions: config_1.ConfigInternals.resetConfigOptions,
130
+ getConfigSnapshot: async (currentConfigCode) => {
131
+ startupConfigFingerprints !== null && startupConfigFingerprints !== void 0 ? startupConfigFingerprints : (startupConfigFingerprints = (0, config_file_change_1.makeConfigFileFingerprints)(startupConfigCode));
132
+ const configFileChangeType = (0, config_file_change_1.classifyConfigFileChange)({
133
+ currentCode: currentConfigCode,
134
+ startupFingerprints: startupConfigFingerprints,
135
+ });
136
+ return {
137
+ changeType: configFileChangeType,
138
+ renderDefaults: (0, get_render_defaults_1.getRenderDefaults)(logLevel),
139
+ studioRuntimeConfig: getStudioRuntimeConfig(),
140
+ editorName: await studio_server_1.StudioServerInternals.getEditorName({
141
+ getDefaultEditor,
142
+ logLevel,
143
+ }),
144
+ };
145
+ },
146
+ });
147
+ if (reloadResult.type === 'no-config') {
148
+ return;
149
+ }
150
+ if (reloadResult.type === 'error') {
151
+ sendConfigFileReloadError(reloadResult.errorMessage);
152
+ return;
153
+ }
154
+ const { changeType, renderDefaults, studioRuntimeConfig, editorName } = reloadResult.value;
155
+ const message = (0, studio_shared_1.getConfigFileChangeMessage)(changeType);
156
+ log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.blue(message));
157
+ studio_server_1.StudioServerInternals.waitForLiveEventsListener().then((listener) => {
158
+ var _a;
159
+ listener.sendEventToClient({
160
+ type: 'config-file-changed',
161
+ changeType,
162
+ originatorClientId: event.type === 'deleted'
163
+ ? null
164
+ : ((_a = event.originatorClientId) !== null && _a !== void 0 ? _a : null),
165
+ renderDefaults,
166
+ studioRuntimeConfig,
167
+ editorName,
168
+ });
169
+ });
170
+ }
171
+ catch (error) {
172
+ const errorMessage = error instanceof Error ? error.message : String(error);
173
+ log_1.Log.error({ indent: false, logLevel: 'error' }, errorMessage);
174
+ sendConfigFileReloadError(errorMessage);
175
+ }
176
+ finally {
177
+ isReloadingConfig = false;
178
+ }
179
+ },
180
+ });
181
+ }
122
182
  const result = await studio_server_1.StudioServerInternals.startStudio({
123
183
  previewEntry: require.resolve('@remotion/studio/previewEntry'),
124
184
  browserArgs: parsed_cli_1.parsedCli['browser-args'],
@@ -158,6 +218,7 @@ const studioCommand = async (remotionRoot, args, logLevel) => {
158
218
  forceIPv4: ipv4Option.getValue({ commandLine: parsed_cli_1.parsedCli }).value,
159
219
  getAudioLatencyHint,
160
220
  getPreviewSampleRate,
221
+ getDefaultCodingAgent,
161
222
  getDefaultEditor,
162
223
  enableCrossSiteIsolation,
163
224
  forceNew: forceNewStudioOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value,
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.505",
6
+ "version": "4.0.507",
7
7
  "description": "Control Remotion features using the `npx remotion` command",
8
8
  "main": "dist/index.js",
9
9
  "bin": {
@@ -36,18 +36,19 @@
36
36
  "author": "Jonny Burger <jonny@remotion.dev>",
37
37
  "license": "SEE LICENSE IN LICENSE.md",
38
38
  "dependencies": {
39
- "@remotion/bundler": "4.0.505",
40
- "@remotion/media-utils": "4.0.505",
41
- "@remotion/player": "4.0.505",
42
- "@remotion/renderer": "4.0.505",
43
- "@remotion/studio-shared": "4.0.505",
44
- "@remotion/studio-server": "4.0.505",
45
- "@remotion/studio": "4.0.505",
39
+ "@babel/parser": "7.24.1",
40
+ "@remotion/bundler": "4.0.507",
41
+ "@remotion/media-utils": "4.0.507",
42
+ "@remotion/player": "4.0.507",
43
+ "@remotion/renderer": "4.0.507",
44
+ "@remotion/studio-shared": "4.0.507",
45
+ "@remotion/studio-server": "4.0.507",
46
+ "@remotion/studio": "4.0.507",
46
47
  "dotenv": "17.3.1",
47
48
  "minimist": "1.2.6",
48
49
  "prompts": "2.4.2",
49
50
  "semver": "7.5.3",
50
- "remotion": "4.0.505"
51
+ "remotion": "4.0.507"
51
52
  },
52
53
  "peerDependencies": {
53
54
  "react": ">=16.8.0",
@@ -59,14 +60,14 @@
59
60
  "@types/prettier": "2.7.2",
60
61
  "@types/semver": "7.5.3",
61
62
  "@types/node": "20.12.14",
62
- "@remotion/zod-types": "4.0.505",
63
- "@remotion/tailwind-v4": "4.0.505",
64
- "@remotion/enable-scss": "4.0.505",
65
- "@remotion/skia": "4.0.505",
63
+ "@remotion/zod-types": "4.0.507",
64
+ "@remotion/tailwind-v4": "4.0.507",
65
+ "@remotion/enable-scss": "4.0.507",
66
+ "@remotion/skia": "4.0.507",
66
67
  "react": "19.2.3",
67
68
  "react-dom": "19.2.3",
68
69
  "zod": "4.4.3",
69
- "@remotion/eslint-config-internal": "4.0.505",
70
+ "@remotion/eslint-config-internal": "4.0.507",
70
71
  "eslint": "9.19.0",
71
72
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
72
73
  },
@@ -1,4 +0,0 @@
1
- export declare const getVideoImageFormat: ({ codec, uiImageFormat, }: {
2
- codec: import("@remotion/renderer").CodecOrUndefined;
3
- uiImageFormat: "jpeg" | "none" | "png" | null;
4
- }) => "jpeg" | "none" | "png";
@@ -1,36 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getVideoImageFormat = void 0;
4
- const client_1 = require("@remotion/renderer/client");
5
- const pure_1 = require("@remotion/renderer/pure");
6
- const parsed_cli_1 = require("./parsed-cli");
7
- const getVideoImageFormat = ({ codec, uiImageFormat, }) => {
8
- if (uiImageFormat !== null) {
9
- return uiImageFormat;
10
- }
11
- const configured = client_1.BrowserSafeApis.options.videoImageFormatOption.getValue({
12
- commandLine: parsed_cli_1.parsedCli,
13
- }).value;
14
- if (configured !== null) {
15
- return configured;
16
- }
17
- if (pure_1.NoReactAPIs.isAudioCodec(codec)) {
18
- return 'none';
19
- }
20
- if (codec === 'h264' ||
21
- codec === 'h264-mkv' ||
22
- codec === 'h264-ts' ||
23
- codec === 'h265' ||
24
- codec === 'av1' ||
25
- codec === 'vp8' ||
26
- codec === 'vp9' ||
27
- codec === 'prores' ||
28
- codec === 'gif') {
29
- return 'jpeg';
30
- }
31
- if (codec === undefined) {
32
- return 'png';
33
- }
34
- throw new Error('Unrecognized codec ' + codec);
35
- };
36
- exports.getVideoImageFormat = getVideoImageFormat;