@remotion/cli 4.0.428 → 4.0.430

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/README.md CHANGED
@@ -1,18 +1,18 @@
1
1
  # @remotion/cli
2
-
2
+
3
3
  Control Remotion features using the `npx remotion` command
4
-
4
+
5
5
  [![NPM Downloads](https://img.shields.io/npm/dm/@remotion/cli.svg?style=flat&color=black&label=Downloads)](https://npmcharts.com/compare/@remotion/cli?minimal=true)
6
-
6
+
7
7
  ## Installation
8
-
8
+
9
9
  ```bash
10
10
  npm install @remotion/cli --save-exact
11
11
  ```
12
-
12
+
13
13
  When installing a Remotion package, make sure to align the version of all `remotion` and `@remotion/*` packages to the same version.
14
14
  Remove the `^` character from the version number to use the exact version.
15
-
15
+
16
16
  ## Usage
17
-
17
+
18
18
  See the [documentation](https://www.remotion.dev/docs/cli) for more information.
package/dist/add.js CHANGED
@@ -4,10 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.addCommand = void 0;
7
- const renderer_1 = require("@remotion/renderer");
8
- const studio_server_1 = require("@remotion/studio-server");
9
7
  const node_child_process_1 = require("node:child_process");
10
8
  const node_fs_1 = __importDefault(require("node:fs"));
9
+ const renderer_1 = require("@remotion/renderer");
10
+ const studio_server_1 = require("@remotion/studio-server");
11
11
  const chalk_1 = require("./chalk");
12
12
  const extra_packages_1 = require("./extra-packages");
13
13
  const list_of_remotion_packages_1 = require("./list-of-remotion-packages");
package/dist/benchmark.js CHANGED
@@ -22,8 +22,11 @@ const should_use_non_overlaying_logger_1 = require("./should-use-non-overlaying-
22
22
  const show_compositions_picker_1 = require("./show-compositions-picker");
23
23
  const truthy_1 = require("./truthy");
24
24
  const { audioBitrateOption, x264Option, offthreadVideoCacheSizeInBytesOption, scaleOption, crfOption, jpegQualityOption, videoBitrateOption, enforceAudioOption, mutedOption, videoCodecOption, colorSpaceOption, disallowParallelEncodingOption, enableMultiprocessOnLinuxOption, glOption, numberOfGifLoopsOption, encodingMaxRateOption, encodingBufferSizeOption, delayRenderTimeoutInMillisecondsOption, headlessOption, overwriteOption, binariesDirectoryOption, forSeamlessAacConcatenationOption, publicPathOption, publicDirOption, metadataOption, hardwareAccelerationOption, chromeModeOption, offthreadVideoThreadsOption, mediaCacheSizeInBytesOption, darkModeOption, askAIOption, experimentalClientSideRenderingOption, experimentalVisualModeOption, keyboardShortcutsOption, rspackOption, pixelFormatOption, browserExecutableOption, everyNthFrameOption, proResProfileOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, concurrencyOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, bundleCacheOption, runsOption, } = client_1.BrowserSafeApis.options;
25
+ const { benchmarkConcurrenciesOption } = client_1.BrowserSafeApis.options;
25
26
  const getValidConcurrency = (cliConcurrency) => {
26
- const { concurrencies } = parsed_cli_1.parsedCli;
27
+ const concurrencies = benchmarkConcurrenciesOption.getValue({
28
+ commandLine: parsed_cli_1.parsedCli,
29
+ }).value;
27
30
  if (!concurrencies) {
28
31
  return [renderer_1.RenderInternals.resolveConcurrency(cliConcurrency)];
29
32
  }
package/dist/bundle.js CHANGED
@@ -4,11 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.bundleCommand = void 0;
7
+ const fs_1 = require("fs");
8
+ const path_1 = __importDefault(require("path"));
7
9
  const bundler_1 = require("@remotion/bundler");
8
10
  const client_1 = require("@remotion/renderer/client");
9
11
  const studio_server_1 = require("@remotion/studio-server");
10
- const fs_1 = require("fs");
11
- const path_1 = __importDefault(require("path"));
12
12
  const chalk_1 = require("./chalk");
13
13
  const entry_point_1 = require("./entry-point");
14
14
  const get_github_repository_1 = require("./get-github-repository");
@@ -0,0 +1,36 @@
1
+ export declare const isCatalogProtocol: (version: string) => boolean;
2
+ export declare const findVersionSpecifier: (depsWithVersions: {
3
+ dependencies: Record<string, string>;
4
+ devDependencies: Record<string, string>;
5
+ optionalDependencies: Record<string, string>;
6
+ peerDependencies: Record<string, string>;
7
+ }, pkg: string) => string | null;
8
+ export declare const findWorkspaceRoot: (startDir: string) => string | null;
9
+ type CatalogSource = {
10
+ type: 'package-json';
11
+ filePath: string;
12
+ catalogKey: 'workspaces' | 'root';
13
+ } | {
14
+ type: 'pnpm-workspace';
15
+ filePath: string;
16
+ };
17
+ export declare const findCatalogSource: (workspaceRoot: string) => CatalogSource | null;
18
+ export declare const getCatalogEntries: (workspaceRoot: string) => Record<string, string>;
19
+ export declare const parsePnpmWorkspaceCatalog: (content: string) => Record<string, string>;
20
+ export declare const updateCatalogEntryInPackageJson: ({ filePath, catalogKey, pkg, newVersion, }: {
21
+ filePath: string;
22
+ catalogKey: "root" | "workspaces";
23
+ pkg: string;
24
+ newVersion: string;
25
+ }) => boolean;
26
+ export declare const updateCatalogEntryInPnpmWorkspace: ({ filePath, pkg, newVersion, }: {
27
+ filePath: string;
28
+ pkg: string;
29
+ newVersion: string;
30
+ }) => boolean;
31
+ export declare const updateCatalogEntry: ({ workspaceRoot, pkg, newVersion, }: {
32
+ workspaceRoot: string;
33
+ pkg: string;
34
+ newVersion: string;
35
+ }) => boolean;
36
+ export {};
@@ -0,0 +1,191 @@
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.updateCatalogEntry = exports.updateCatalogEntryInPnpmWorkspace = exports.updateCatalogEntryInPackageJson = exports.parsePnpmWorkspaceCatalog = exports.getCatalogEntries = exports.findCatalogSource = exports.findWorkspaceRoot = exports.findVersionSpecifier = exports.isCatalogProtocol = void 0;
7
+ const node_fs_1 = __importDefault(require("node:fs"));
8
+ const node_path_1 = __importDefault(require("node:path"));
9
+ const WORKSPACE_ROOT_SEARCH_LIMIT = 5;
10
+ const isCatalogProtocol = (version) => {
11
+ return version.startsWith('catalog:');
12
+ };
13
+ exports.isCatalogProtocol = isCatalogProtocol;
14
+ const findVersionSpecifier = (depsWithVersions, pkg) => {
15
+ var _a, _b, _c, _d;
16
+ return ((_d = (_c = (_b = (_a = depsWithVersions.dependencies[pkg]) !== null && _a !== void 0 ? _a : depsWithVersions.devDependencies[pkg]) !== null && _b !== void 0 ? _b : depsWithVersions.optionalDependencies[pkg]) !== null && _c !== void 0 ? _c : depsWithVersions.peerDependencies[pkg]) !== null && _d !== void 0 ? _d : null);
17
+ };
18
+ exports.findVersionSpecifier = findVersionSpecifier;
19
+ const findWorkspaceRoot = (startDir) => {
20
+ let currentDir = node_path_1.default.resolve(startDir);
21
+ for (let i = 0; i < WORKSPACE_ROOT_SEARCH_LIMIT; i++) {
22
+ const packageJsonPath = node_path_1.default.join(currentDir, 'package.json');
23
+ if (node_fs_1.default.existsSync(packageJsonPath)) {
24
+ try {
25
+ const packageJson = JSON.parse(node_fs_1.default.readFileSync(packageJsonPath, 'utf-8'));
26
+ if (packageJson.workspaces) {
27
+ return currentDir;
28
+ }
29
+ }
30
+ catch (_a) { }
31
+ }
32
+ const pnpmWorkspacePath = node_path_1.default.join(currentDir, 'pnpm-workspace.yaml');
33
+ if (node_fs_1.default.existsSync(pnpmWorkspacePath)) {
34
+ return currentDir;
35
+ }
36
+ const parentDir = node_path_1.default.dirname(currentDir);
37
+ if (parentDir === currentDir) {
38
+ return null;
39
+ }
40
+ currentDir = parentDir;
41
+ }
42
+ return null;
43
+ };
44
+ exports.findWorkspaceRoot = findWorkspaceRoot;
45
+ const findCatalogSource = (workspaceRoot) => {
46
+ const packageJsonPath = node_path_1.default.join(workspaceRoot, 'package.json');
47
+ if (node_fs_1.default.existsSync(packageJsonPath)) {
48
+ try {
49
+ const packageJson = JSON.parse(node_fs_1.default.readFileSync(packageJsonPath, 'utf-8'));
50
+ if (packageJson.workspaces &&
51
+ typeof packageJson.workspaces === 'object' &&
52
+ !Array.isArray(packageJson.workspaces) &&
53
+ packageJson.workspaces.catalog) {
54
+ return {
55
+ type: 'package-json',
56
+ filePath: packageJsonPath,
57
+ catalogKey: 'workspaces',
58
+ };
59
+ }
60
+ if (packageJson.catalog) {
61
+ return {
62
+ type: 'package-json',
63
+ filePath: packageJsonPath,
64
+ catalogKey: 'root',
65
+ };
66
+ }
67
+ }
68
+ catch (_a) { }
69
+ }
70
+ const pnpmWorkspacePath = node_path_1.default.join(workspaceRoot, 'pnpm-workspace.yaml');
71
+ if (node_fs_1.default.existsSync(pnpmWorkspacePath)) {
72
+ const content = node_fs_1.default.readFileSync(pnpmWorkspacePath, 'utf-8');
73
+ if (/^catalog:/m.test(content)) {
74
+ return { type: 'pnpm-workspace', filePath: pnpmWorkspacePath };
75
+ }
76
+ }
77
+ return null;
78
+ };
79
+ exports.findCatalogSource = findCatalogSource;
80
+ const getCatalogEntries = (workspaceRoot) => {
81
+ var _a, _b;
82
+ const source = (0, exports.findCatalogSource)(workspaceRoot);
83
+ if (!source) {
84
+ return {};
85
+ }
86
+ if (source.type === 'package-json') {
87
+ const packageJson = JSON.parse(node_fs_1.default.readFileSync(source.filePath, 'utf-8'));
88
+ if (source.catalogKey === 'workspaces') {
89
+ return ((_a = packageJson.workspaces.catalog) !== null && _a !== void 0 ? _a : {});
90
+ }
91
+ return ((_b = packageJson.catalog) !== null && _b !== void 0 ? _b : {});
92
+ }
93
+ return (0, exports.parsePnpmWorkspaceCatalog)(node_fs_1.default.readFileSync(source.filePath, 'utf-8'));
94
+ };
95
+ exports.getCatalogEntries = getCatalogEntries;
96
+ const parsePnpmWorkspaceCatalog = (content) => {
97
+ const lines = content.split('\n');
98
+ const catalog = {};
99
+ let inCatalogSection = false;
100
+ for (const line of lines) {
101
+ if (/^catalog:\s*$/.test(line)) {
102
+ inCatalogSection = true;
103
+ continue;
104
+ }
105
+ if (inCatalogSection && /^\S/.test(line) && line.trim() !== '') {
106
+ inCatalogSection = false;
107
+ continue;
108
+ }
109
+ if (inCatalogSection && line.trim() !== '') {
110
+ const match = line.match(/^\s+(['"]?)([^'":\s]+)\1:\s*['"]?([^'"#\s]+)['"]?/);
111
+ if (match && match[2] && match[3]) {
112
+ catalog[match[2]] = match[3];
113
+ }
114
+ }
115
+ }
116
+ return catalog;
117
+ };
118
+ exports.parsePnpmWorkspaceCatalog = parsePnpmWorkspaceCatalog;
119
+ const updateCatalogEntryInPackageJson = ({ filePath, catalogKey, pkg, newVersion, }) => {
120
+ var _a;
121
+ const content = node_fs_1.default.readFileSync(filePath, 'utf-8');
122
+ const packageJson = JSON.parse(content);
123
+ const catalog = catalogKey === 'workspaces'
124
+ ? (_a = packageJson.workspaces) === null || _a === void 0 ? void 0 : _a.catalog
125
+ : packageJson.catalog;
126
+ if (!catalog || !(pkg in catalog)) {
127
+ return false;
128
+ }
129
+ catalog[pkg] = newVersion;
130
+ const indentMatch = content.match(/^(\s+)"/m);
131
+ const indent = indentMatch ? indentMatch[1] : '\t';
132
+ node_fs_1.default.writeFileSync(filePath, JSON.stringify(packageJson, null, indent) + '\n');
133
+ return true;
134
+ };
135
+ exports.updateCatalogEntryInPackageJson = updateCatalogEntryInPackageJson;
136
+ const updateCatalogEntryInPnpmWorkspace = ({ filePath, pkg, newVersion, }) => {
137
+ var _a, _b, _c;
138
+ const content = node_fs_1.default.readFileSync(filePath, 'utf-8');
139
+ const lines = content.split('\n');
140
+ let inCatalogSection = false;
141
+ let updated = false;
142
+ for (let i = 0; i < lines.length; i++) {
143
+ const line = lines[i];
144
+ if (/^catalog:\s*$/.test(line)) {
145
+ inCatalogSection = true;
146
+ continue;
147
+ }
148
+ if (inCatalogSection && /^\S/.test(line) && line.trim() !== '') {
149
+ inCatalogSection = false;
150
+ continue;
151
+ }
152
+ if (inCatalogSection) {
153
+ const escapedPkg = pkg.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
154
+ const lineRegex = new RegExp(`^(\\s+(?:['"]?)${escapedPkg}(?:['"]?):\\s*)(['"]?)([^'"#\\s]+)\\2(.*)$`);
155
+ const match = line.match(lineRegex);
156
+ if (match) {
157
+ const prefix = (_a = match[1]) !== null && _a !== void 0 ? _a : '';
158
+ const quote = (_b = match[2]) !== null && _b !== void 0 ? _b : '';
159
+ const suffix = (_c = match[4]) !== null && _c !== void 0 ? _c : '';
160
+ lines[i] = `${prefix}${quote}${newVersion}${quote}${suffix}`;
161
+ updated = true;
162
+ break;
163
+ }
164
+ }
165
+ }
166
+ if (updated) {
167
+ node_fs_1.default.writeFileSync(filePath, lines.join('\n'));
168
+ }
169
+ return updated;
170
+ };
171
+ exports.updateCatalogEntryInPnpmWorkspace = updateCatalogEntryInPnpmWorkspace;
172
+ const updateCatalogEntry = ({ workspaceRoot, pkg, newVersion, }) => {
173
+ const source = (0, exports.findCatalogSource)(workspaceRoot);
174
+ if (!source) {
175
+ return false;
176
+ }
177
+ if (source.type === 'package-json') {
178
+ return (0, exports.updateCatalogEntryInPackageJson)({
179
+ filePath: source.filePath,
180
+ catalogKey: source.catalogKey,
181
+ pkg,
182
+ newVersion,
183
+ });
184
+ }
185
+ return (0, exports.updateCatalogEntryInPnpmWorkspace)({
186
+ filePath: source.filePath,
187
+ pkg,
188
+ newVersion,
189
+ });
190
+ };
191
+ exports.updateCatalogEntry = updateCatalogEntry;
@@ -0,0 +1,4 @@
1
+ export declare const setStillImageFormat: (format: "jpeg" | "pdf" | "png" | "webp") => void;
2
+ export declare const setVideoImageFormat: (format: "jpeg" | "none" | "png") => void;
3
+ export declare const getUserPreferredStillImageFormat: () => "jpeg" | "pdf" | "png" | "webp" | undefined;
4
+ export declare const getUserPreferredVideoImageFormat: () => "jpeg" | "none" | "png" | undefined;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getUserPreferredVideoImageFormat = exports.getUserPreferredStillImageFormat = exports.setVideoImageFormat = exports.setStillImageFormat = void 0;
4
+ const renderer_1 = require("@remotion/renderer");
5
+ const truthy_1 = require("../truthy");
6
+ let currentStillImageFormat;
7
+ let currentVideoImageFormat;
8
+ const setStillImageFormat = (format) => {
9
+ if (typeof format === 'undefined') {
10
+ currentStillImageFormat = undefined;
11
+ return;
12
+ }
13
+ if (!renderer_1.RenderInternals.validStillImageFormats.includes(format)) {
14
+ throw new TypeError([
15
+ `Value ${format} is not valid as an image format.`,
16
+ // @ts-expect-error
17
+ format === 'jpg' ? 'Did you mean "jpeg"?' : null,
18
+ ]
19
+ .filter(truthy_1.truthy)
20
+ .join(' '));
21
+ }
22
+ currentStillImageFormat = format;
23
+ };
24
+ exports.setStillImageFormat = setStillImageFormat;
25
+ const setVideoImageFormat = (format) => {
26
+ if (typeof format === 'undefined') {
27
+ currentVideoImageFormat = undefined;
28
+ return;
29
+ }
30
+ if (!renderer_1.RenderInternals.validVideoImageFormats.includes(format)) {
31
+ throw new TypeError([
32
+ `Value ${format} is not valid as a video image format.`,
33
+ // @ts-expect-error
34
+ format === 'jpg' ? 'Did you mean "jpeg"?' : null,
35
+ ]
36
+ .filter(truthy_1.truthy)
37
+ .join(' '));
38
+ }
39
+ currentVideoImageFormat = format;
40
+ };
41
+ exports.setVideoImageFormat = setVideoImageFormat;
42
+ const getUserPreferredStillImageFormat = () => {
43
+ return currentStillImageFormat;
44
+ };
45
+ exports.getUserPreferredStillImageFormat = getUserPreferredStillImageFormat;
46
+ const getUserPreferredVideoImageFormat = () => {
47
+ return currentVideoImageFormat;
48
+ };
49
+ exports.getUserPreferredVideoImageFormat = getUserPreferredVideoImageFormat;
@@ -411,6 +411,12 @@ type FlatConfig = RemotionConfigObject & RemotionBundlingOptions & {
411
411
  * Default: 3
412
412
  */
413
413
  setBenchmarkRuns: (runs: number) => void;
414
+ /**
415
+ * Set which concurrency values should be used during a benchmark.
416
+ * Pass a comma-separated string of numbers, e.g. "1,4,8".
417
+ * Default: null (uses the --concurrency value)
418
+ */
419
+ setBenchmarkConcurrencies: (concurrencies: string | null) => void;
414
420
  /**
415
421
  * @deprecated 'The config format has changed. Change `Config.Bundling.*()` calls to `Config.*()` in your config file.'
416
422
  */
@@ -1,26 +1,26 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ConfigInternals = exports.Config = void 0;
4
- const browser_1 = require("./browser");
5
- const concurrency_1 = require("./concurrency");
6
- const env_file_1 = require("./env-file");
7
- const image_sequence_1 = require("./image-sequence");
8
- const output_location_1 = require("./output-location");
9
- const override_webpack_1 = require("./override-webpack");
10
- const preview_server_1 = require("./preview-server");
11
- const still_frame_1 = require("./still-frame");
12
- const webpack_caching_1 = require("./webpack-caching");
13
4
  const client_1 = require("@remotion/renderer/client");
14
5
  const studio_server_1 = require("@remotion/studio-server");
6
+ const browser_1 = require("./browser");
15
7
  const buffer_state_delay_in_milliseconds_1 = require("./buffer-state-delay-in-milliseconds");
8
+ const concurrency_1 = require("./concurrency");
16
9
  const entry_point_1 = require("./entry-point");
10
+ const env_file_1 = require("./env-file");
17
11
  const ffmpeg_override_1 = require("./ffmpeg-override");
12
+ const image_sequence_1 = require("./image-sequence");
18
13
  const metadata_1 = require("./metadata");
14
+ const output_location_1 = require("./output-location");
19
15
  const output_location_2 = require("./output-location");
16
+ const override_webpack_1 = require("./override-webpack");
20
17
  const override_webpack_2 = require("./override-webpack");
18
+ const preview_server_1 = require("./preview-server");
21
19
  const preview_server_2 = require("./preview-server");
20
+ const still_frame_1 = require("./still-frame");
21
+ const webpack_caching_1 = require("./webpack-caching");
22
22
  const webpack_poll_1 = require("./webpack-poll");
23
- const { concurrencyOption, 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, framesOption, forSeamlessAacConcatenationOption, audioCodecOption, publicPathOption, hardwareAccelerationOption, audioLatencyHintOption, enableCrossSiteIsolationOption, imageSequencePatternOption, darkModeOption, askAIOption, publicLicenseKeyOption, experimentalClientSideRenderingOption, experimentalVisualModeOption, 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, } = client_1.BrowserSafeApis.options;
23
+ const { benchmarkConcurrenciesOption, concurrencyOption, 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, framesOption, forSeamlessAacConcatenationOption, audioCodecOption, publicPathOption, hardwareAccelerationOption, audioLatencyHintOption, enableCrossSiteIsolationOption, imageSequencePatternOption, darkModeOption, askAIOption, publicLicenseKeyOption, experimentalClientSideRenderingOption, experimentalVisualModeOption, 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, } = client_1.BrowserSafeApis.options;
24
24
  exports.Config = {
25
25
  get Bundling() {
26
26
  throw new Error('The config format has changed. Change `Config.Bundling.*()` calls to `Config.*()` in your config file.');
@@ -126,6 +126,7 @@ exports.Config = {
126
126
  setIPv4: ipv4Option.setConfig,
127
127
  setBundleOutDir: outDirOption.setConfig,
128
128
  setBenchmarkRuns: runsOption.setConfig,
129
+ setBenchmarkConcurrencies: benchmarkConcurrenciesOption.setConfig,
129
130
  };
130
131
  exports.ConfigInternals = {
131
132
  getBrowser: browser_1.getBrowser,
@@ -0,0 +1,2 @@
1
+ export declare const getNumberOfSharedAudioTags: () => number;
2
+ export declare const setNumberOfSharedAudioTags: (audioTags: number) => void;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setNumberOfSharedAudioTags = exports.getNumberOfSharedAudioTags = void 0;
4
+ let numberOfSharedAudioTags = 0;
5
+ const getNumberOfSharedAudioTags = () => {
6
+ return numberOfSharedAudioTags;
7
+ };
8
+ exports.getNumberOfSharedAudioTags = getNumberOfSharedAudioTags;
9
+ const setNumberOfSharedAudioTags = (audioTags) => {
10
+ numberOfSharedAudioTags = audioTags;
11
+ };
12
+ exports.setNumberOfSharedAudioTags = setNumberOfSharedAudioTags;
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.convertEntryPointToServeUrl = void 0;
7
- const renderer_1 = require("@remotion/renderer");
8
7
  const node_path_1 = __importDefault(require("node:path"));
8
+ const renderer_1 = require("@remotion/renderer");
9
9
  const convertEntryPointToServeUrl = (entryPoint) => {
10
10
  const fullPath = renderer_1.RenderInternals.isServeUrl(entryPoint)
11
11
  ? entryPoint
@@ -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;
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.findEntryPoint = void 0;
7
- const renderer_1 = require("@remotion/renderer");
8
7
  const node_fs_1 = require("node:fs");
9
8
  const node_path_1 = __importDefault(require("node:path"));
9
+ const renderer_1 = require("@remotion/renderer");
10
10
  const config_1 = require("./config");
11
11
  const log_1 = require("./log");
12
12
  const candidates = [
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EXTRA_PACKAGES_DOCS = exports.EXTRA_PACKAGES = void 0;
4
4
  exports.EXTRA_PACKAGES = {
5
- mediabunny: '1.34.4',
6
- '@mediabunny/ac3': '1.34.4',
5
+ mediabunny: '1.35.1',
6
+ '@mediabunny/ac3': '1.35.1',
7
7
  zod: '4.3.6',
8
8
  };
9
9
  exports.EXTRA_PACKAGES_DOCS = {
package/dist/ffmpeg.js CHANGED
@@ -4,10 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ffprobeCommand = exports.ffmpegCommand = exports.dynamicLibEnv = void 0;
7
- const renderer_1 = require("@remotion/renderer");
8
- const client_1 = require("@remotion/renderer/client");
9
7
  const node_child_process_1 = require("node:child_process");
10
8
  const node_path_1 = __importDefault(require("node:path"));
9
+ const renderer_1 = require("@remotion/renderer");
10
+ const client_1 = require("@remotion/renderer/client");
11
11
  const parsed_cli_1 = require("./parsed-cli");
12
12
  const dynamicLibEnv = (indent, logLevel, binariesDirectory) => {
13
13
  const lib = node_path_1.default.dirname(renderer_1.RenderInternals.getExecutablePath({
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getCliOptions = exports.getAndValidateAbsoluteOutputFile = void 0;
7
- const client_1 = require("@remotion/renderer/client");
8
7
  const node_fs_1 = __importDefault(require("node:fs"));
9
8
  const node_path_1 = __importDefault(require("node:path"));
9
+ const client_1 = require("@remotion/renderer/client");
10
10
  const config_1 = require("./config");
11
11
  const get_env_1 = require("./get-env");
12
12
  const get_input_props_1 = require("./get-input-props");
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.loadConfig = void 0;
7
- const client_1 = require("@remotion/renderer/client");
8
7
  const node_fs_1 = require("node:fs");
9
8
  const node_path_1 = __importDefault(require("node:path"));
9
+ const client_1 = require("@remotion/renderer/client");
10
10
  const load_config_1 = require("./load-config");
11
11
  const log_1 = require("./log");
12
12
  const parsed_cli_1 = require("./parsed-cli");
package/dist/get-env.js CHANGED
@@ -37,12 +37,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.getEnvironmentVariables = void 0;
40
+ const node_fs_1 = __importStar(require("node:fs"));
41
+ const node_path_1 = __importDefault(require("node:path"));
40
42
  const renderer_1 = require("@remotion/renderer");
41
43
  const client_1 = require("@remotion/renderer/client");
42
44
  const studio_server_1 = require("@remotion/studio-server");
43
45
  const dotenv_1 = __importDefault(require("dotenv"));
44
- const node_fs_1 = __importStar(require("node:fs"));
45
- const node_path_1 = __importDefault(require("node:path"));
46
46
  const chalk_1 = require("./chalk");
47
47
  const make_link_1 = require("./hyperlinks/make-link");
48
48
  const log_1 = require("./log");
@@ -4,10 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getGitSource = exports.getGifRef = exports.normalizeGitRemoteUrl = exports.getGitRemoteOrigin = exports.getGitConfig = void 0;
7
- const bundler_1 = require("@remotion/bundler");
8
7
  const child_process_1 = require("child_process");
9
8
  const fs_1 = require("fs");
10
9
  const path_1 = __importDefault(require("path"));
10
+ const bundler_1 = require("@remotion/bundler");
11
11
  const log_1 = require("./log");
12
12
  const getGitRemotes = (lines) => {
13
13
  const sections = [];
@@ -4,10 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getInputProps = void 0;
7
- const client_1 = require("@remotion/renderer/client");
8
7
  const node_fs_1 = __importDefault(require("node:fs"));
9
8
  const node_os_1 = __importDefault(require("node:os"));
10
9
  const node_path_1 = __importDefault(require("node:path"));
10
+ const client_1 = require("@remotion/renderer/client");
11
11
  const log_1 = require("./log");
12
12
  const parsed_cli_1 = require("./parsed-cli");
13
13
  const { propsOption } = client_1.BrowserSafeApis.options;
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.initializeCli = void 0;
7
- const client_1 = require("@remotion/renderer/client");
8
7
  const path_1 = __importDefault(require("path"));
8
+ const client_1 = require("@remotion/renderer/client");
9
9
  const get_config_file_name_1 = require("./get-config-file-name");
10
10
  const make_link_1 = require("./hyperlinks/make-link");
11
11
  const log_1 = require("./log");
@@ -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;
@@ -88,4 +88,5 @@ exports.listOfRemotionPackages = [
88
88
  '@remotion/design',
89
89
  '@remotion/light-leaks',
90
90
  '@remotion/vercel',
91
+ '@remotion/sfx',
91
92
  ];
@@ -4,10 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.loadConfigFile = void 0;
7
- const bundler_1 = require("@remotion/bundler");
8
7
  const node_fs_1 = __importDefault(require("node:fs"));
9
8
  const node_path_1 = __importDefault(require("node:path"));
10
9
  const node_worker_threads_1 = require("node:worker_threads");
10
+ const bundler_1 = require("@remotion/bundler");
11
11
  const log_1 = require("./log");
12
12
  const loadConfigFile = async (remotionRoot, configFileName, isJavascript) => {
13
13
  const resolved = node_path_1.default.resolve(remotionRoot, configFileName);
@@ -1,6 +1,24 @@
1
1
  import type { AudioCodec, StillImageFormat, VideoImageFormat } from '@remotion/renderer';
2
2
  import type { TypeOfOption } from '@remotion/renderer/client';
3
- declare const beepOnFinishOption: {
3
+ declare const benchmarkConcurrenciesOption: {
4
+ name: string;
5
+ cliFlag: "concurrencies";
6
+ description: () => import("react/jsx-runtime").JSX.Element;
7
+ ssrName: null;
8
+ docLink: string;
9
+ type: string | null;
10
+ getValue: ({ commandLine }: {
11
+ commandLine: Record<string, unknown>;
12
+ }) => {
13
+ value: string;
14
+ source: string;
15
+ } | {
16
+ value: null;
17
+ source: string;
18
+ };
19
+ setConfig: (value: string | null) => void;
20
+ id: "concurrencies";
21
+ }, beepOnFinishOption: {
4
22
  name: string;
5
23
  cliFlag: "beep-on-finish";
6
24
  description: () => import("react/jsx-runtime").JSX.Element;
@@ -933,6 +951,21 @@ declare const beepOnFinishOption: {
933
951
  };
934
952
  setConfig: (value: boolean) => void;
935
953
  id: "disable-headless";
954
+ }, delayRenderTimeoutInMillisecondsOption: {
955
+ name: string;
956
+ cliFlag: "timeout";
957
+ description: () => import("react/jsx-runtime").JSX.Element;
958
+ ssrName: "timeoutInMilliseconds";
959
+ docLink: string;
960
+ type: number;
961
+ getValue: ({ commandLine }: {
962
+ commandLine: Record<string, unknown>;
963
+ }) => {
964
+ source: string;
965
+ value: number;
966
+ };
967
+ setConfig: (value: number) => void;
968
+ id: "timeout";
936
969
  }, framesOption: {
937
970
  name: string;
938
971
  cliFlag: "frames";
@@ -1060,7 +1093,7 @@ export type CommandLineOptions = {
1060
1093
  [versionFlagOption.cliFlag]: TypeOfOption<typeof versionFlagOption>;
1061
1094
  [videoCodecOption.cliFlag]: TypeOfOption<typeof videoCodecOption>;
1062
1095
  [concurrencyOption.cliFlag]: TypeOfOption<typeof concurrencyOption>;
1063
- timeout: number;
1096
+ [delayRenderTimeoutInMillisecondsOption.cliFlag]: TypeOfOption<typeof delayRenderTimeoutInMillisecondsOption>;
1064
1097
  [configOption.cliFlag]: TypeOfOption<typeof configOption>;
1065
1098
  ['public-dir']: string;
1066
1099
  [audioBitrateOption.cliFlag]: TypeOfOption<typeof audioBitrateOption>;
@@ -1070,7 +1103,6 @@ export type CommandLineOptions = {
1070
1103
  [audioCodecOption.cliFlag]: AudioCodec;
1071
1104
  [publicPathOption.cliFlag]: string;
1072
1105
  [crfOption.cliFlag]: TypeOfOption<typeof crfOption>;
1073
- force: boolean;
1074
1106
  output: string | undefined;
1075
1107
  [overwriteOption.cliFlag]: TypeOfOption<typeof overwriteOption>;
1076
1108
  png: boolean;
@@ -1096,7 +1128,7 @@ export type CommandLineOptions = {
1096
1128
  [overrideFpsOption.cliFlag]: TypeOfOption<typeof overrideFpsOption>;
1097
1129
  [overrideDurationOption.cliFlag]: TypeOfOption<typeof overrideDurationOption>;
1098
1130
  [runsOption.cliFlag]: TypeOfOption<typeof runsOption>;
1099
- concurrencies: string;
1131
+ [benchmarkConcurrenciesOption.cliFlag]: TypeOfOption<typeof benchmarkConcurrenciesOption>;
1100
1132
  [enforceAudioOption.cliFlag]: TypeOfOption<typeof enforceAudioOption>;
1101
1133
  [glOption.cliFlag]: TypeOfOption<typeof glOption>;
1102
1134
  [packageManagerOption.cliFlag]: TypeOfOption<typeof packageManagerOption>;
@@ -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 { beepOnFinishOption, colorSpaceOption, concurrencyOption, disallowParallelEncodingOption, offthreadVideoCacheSizeInBytesOption, encodingBufferSizeOption, encodingMaxRateOption, deleteAfterOption, folderExpiryOption, enableMultiprocessOnLinuxOption, numberOfGifLoopsOption, x264Option, enforceAudioOption, jpegQualityOption, audioBitrateOption, videoBitrateOption, audioCodecOption, publicPathOption, audioLatencyHintOption, darkModeOption, publicLicenseKeyOption, forceNewStudioOption, numberOfSharedAudioTagsOption, ipv4Option, pixelFormatOption, browserExecutableOption, everyNthFrameOption, proResProfileOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, outDirOption, packageManagerOption, webpackPollOption, keyboardShortcutsOption, experimentalClientSideRenderingOption, experimentalVisualModeOption, imageSequencePatternOption, scaleOption, overwriteOption, crfOption, logLevelOption, videoCodecOption, stillFrameOption, imageSequenceOption, versionFlagOption, bundleCacheOption, envFileOption, glOption, runsOption, reproOption, mutedOption, headlessOption, disableGitSourceOption, framesOption, forSeamlessAacConcatenationOption, isProductionOption, noOpenOption, portOption, propsOption, configOption, browserOption, } = 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, publicLicenseKeyOption, forceNewStudioOption, numberOfSharedAudioTagsOption, ipv4Option, pixelFormatOption, browserExecutableOption, everyNthFrameOption, proResProfileOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, outDirOption, packageManagerOption, webpackPollOption, keyboardShortcutsOption, experimentalClientSideRenderingOption, experimentalVisualModeOption, imageSequencePatternOption, scaleOption, overwriteOption, crfOption, logLevelOption, videoCodecOption, stillFrameOption, imageSequenceOption, versionFlagOption, bundleCacheOption, envFileOption, glOption, runsOption, reproOption, mutedOption, headlessOption, disableGitSourceOption, delayRenderTimeoutInMillisecondsOption, framesOption, forSeamlessAacConcatenationOption, isProductionOption, noOpenOption, portOption, propsOption, configOption, browserOption, } = client_1.BrowserSafeApis.options;
10
10
  exports.BooleanFlags = [
11
11
  overwriteOption.cliFlag,
12
12
  imageSequenceOption.cliFlag,
@@ -37,12 +37,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.renderVideoFlow = void 0;
40
- const renderer_1 = require("@remotion/renderer");
41
- const client_1 = require("@remotion/renderer/client");
42
- const studio_shared_1 = require("@remotion/studio-shared");
43
40
  const node_fs_1 = __importStar(require("node:fs"));
44
41
  const node_os_1 = __importDefault(require("node:os"));
45
42
  const node_path_1 = __importDefault(require("node:path"));
43
+ const renderer_1 = require("@remotion/renderer");
44
+ const client_1 = require("@remotion/renderer/client");
45
+ const studio_shared_1 = require("@remotion/studio-shared");
46
46
  const no_react_1 = require("remotion/no-react");
47
47
  const browser_download_bar_1 = require("../browser-download-bar");
48
48
  const chalk_1 = require("../chalk");
@@ -5,10 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  };
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.renderStillFlow = void 0;
8
- const renderer_1 = require("@remotion/renderer");
9
- const client_1 = require("@remotion/renderer/client");
10
8
  const node_fs_1 = require("node:fs");
11
9
  const node_path_1 = __importDefault(require("node:path"));
10
+ const renderer_1 = require("@remotion/renderer");
11
+ const client_1 = require("@remotion/renderer/client");
12
12
  const no_react_1 = require("remotion/no-react");
13
13
  const browser_download_bar_1 = require("../browser-download-bar");
14
14
  const chalk_1 = require("../chalk");
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.cancelJob = exports.removeJob = exports.addJob = exports.getRenderQueue = void 0;
7
- const studio_server_1 = require("@remotion/studio-server");
8
7
  const node_path_1 = __importDefault(require("node:path"));
8
+ const studio_server_1 = require("@remotion/studio-server");
9
9
  const chalk_1 = require("../chalk");
10
10
  const log_1 = require("../log");
11
11
  const print_error_1 = require("../print-error");
@@ -4,10 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.bundleOnCli = exports.bundleOnCliOrTakeServeUrl = void 0;
7
- const bundler_1 = require("@remotion/bundler");
8
- const renderer_1 = require("@remotion/renderer");
9
7
  const fs_1 = require("fs");
10
8
  const path_1 = __importDefault(require("path"));
9
+ const bundler_1 = require("@remotion/bundler");
10
+ const renderer_1 = require("@remotion/renderer");
11
11
  const config_1 = require("./config");
12
12
  const get_render_defaults_1 = require("./get-render-defaults");
13
13
  const log_1 = require("./log");
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.showMultiCompositionsPicker = exports.showSingleCompositionsPicker = void 0;
4
- const composition_prompts_1 = require("./composition-prompts");
5
4
  const chalk_1 = require("./chalk");
5
+ const composition_prompts_1 = require("./composition-prompts");
6
6
  const showSingleCompositionsPicker = async (validCompositions, logLevel) => {
7
7
  const selectedComposition = (await (0, composition_prompts_1.selectAsync)({
8
8
  message: 'Select composition:',
package/dist/upgrade.js CHANGED
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.upgradeCommand = void 0;
4
+ const node_child_process_1 = require("node:child_process");
4
5
  const renderer_1 = require("@remotion/renderer");
5
6
  const studio_server_1 = require("@remotion/studio-server");
6
- const node_child_process_1 = require("node:child_process");
7
+ const catalog_utils_1 = require("./catalog-utils");
7
8
  const chalk_1 = require("./chalk");
8
9
  const extra_packages_1 = require("./extra-packages");
9
10
  const list_of_remotion_packages_1 = require("./list-of-remotion-packages");
@@ -26,7 +27,8 @@ const getExtraPackageVersionsForRemotionVersion = (remotionVersion) => {
26
27
  }
27
28
  };
28
29
  const upgradeCommand = async ({ remotionRoot, packageManager, version, logLevel, args, }) => {
29
- const { dependencies, devDependencies, optionalDependencies, peerDependencies, } = studio_server_1.StudioServerInternals.getInstalledDependencies(remotionRoot);
30
+ var _a;
31
+ const depsWithVersions = studio_server_1.StudioServerInternals.getInstalledDependenciesWithVersions(remotionRoot);
30
32
  let targetVersion;
31
33
  if (version) {
32
34
  targetVersion = version;
@@ -48,32 +50,89 @@ const upgradeCommand = async ({ remotionRoot, packageManager, version, logLevel,
48
50
  .join(', ')}). Install dependencies using your favorite manager!`);
49
51
  }
50
52
  const allDeps = [
51
- ...dependencies,
52
- ...devDependencies,
53
- ...optionalDependencies,
54
- ...peerDependencies,
53
+ ...Object.keys(depsWithVersions.dependencies),
54
+ ...Object.keys(depsWithVersions.devDependencies),
55
+ ...Object.keys(depsWithVersions.optionalDependencies),
56
+ ...Object.keys(depsWithVersions.peerDependencies),
55
57
  ];
56
58
  const remotionToUpgrade = list_of_remotion_packages_1.listOfRemotionPackages.filter((u) => allDeps.includes(u));
57
- // Check if extra packages (zod, mediabunny) are installed
58
59
  const installedExtraPackages = Object.keys(extra_packages_1.EXTRA_PACKAGES).filter((pkg) => allDeps.includes(pkg));
59
- // Get the correct versions for extra packages for this Remotion version
60
60
  const extraPackageVersions = getExtraPackageVersionsForRemotionVersion(targetVersion);
61
- // Build the list of packages to upgrade
62
- const packagesWithVersions = [
63
- ...remotionToUpgrade.map((pkg) => `${pkg}@${targetVersion}`),
64
- ...installedExtraPackages.map((pkg) => `${pkg}@${extraPackageVersions[pkg]}`),
65
- ];
66
61
  if (installedExtraPackages.length > 0) {
67
62
  log_1.Log.info({ indent: false, logLevel }, `Also upgrading extra packages: ${installedExtraPackages.map((pkg) => `${pkg}@${extraPackageVersions[pkg]}`).join(', ')}`);
68
63
  }
69
- const command = studio_server_1.StudioServerInternals.getInstallCommand({
70
- manager: manager.manager,
71
- packages: packagesWithVersions,
72
- version: '',
73
- additionalArgs: args,
74
- });
75
- log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.gray(`$ ${manager.manager} ${command.join(' ')}`));
76
- const task = (0, node_child_process_1.spawn)(manager.manager, command, {
64
+ const allPackagesToUpgrade = [
65
+ ...remotionToUpgrade,
66
+ ...installedExtraPackages,
67
+ ];
68
+ const normalPackages = [];
69
+ const catalogPackages = [];
70
+ for (const pkg of allPackagesToUpgrade) {
71
+ const versionSpec = (0, catalog_utils_1.findVersionSpecifier)(depsWithVersions, pkg);
72
+ const targetVersionForPkg = (_a = extraPackageVersions[pkg]) !== null && _a !== void 0 ? _a : targetVersion;
73
+ if (versionSpec && (0, catalog_utils_1.isCatalogProtocol)(versionSpec)) {
74
+ catalogPackages.push({ pkg, version: targetVersionForPkg });
75
+ }
76
+ else {
77
+ normalPackages.push({ pkg, version: targetVersionForPkg });
78
+ }
79
+ }
80
+ if (catalogPackages.length > 0) {
81
+ const workspaceRoot = (0, catalog_utils_1.findWorkspaceRoot)(remotionRoot);
82
+ if (workspaceRoot) {
83
+ const updatedCatalogEntries = [];
84
+ for (const { pkg, version: pkgVersion } of catalogPackages) {
85
+ const didUpdate = (0, catalog_utils_1.updateCatalogEntry)({
86
+ workspaceRoot,
87
+ pkg,
88
+ newVersion: pkgVersion,
89
+ });
90
+ if (didUpdate) {
91
+ updatedCatalogEntries.push(`${pkg}@${pkgVersion}`);
92
+ }
93
+ else {
94
+ normalPackages.push({ pkg, version: pkgVersion });
95
+ }
96
+ }
97
+ if (updatedCatalogEntries.length > 0) {
98
+ log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.green(`Updated catalog entries: ${updatedCatalogEntries.join(', ')}`));
99
+ }
100
+ }
101
+ else {
102
+ for (const catalogPkg of catalogPackages) {
103
+ normalPackages.push(catalogPkg);
104
+ }
105
+ }
106
+ }
107
+ const packagesWithVersions = normalPackages.map(({ pkg, version: pkgVersion }) => `${pkg}@${pkgVersion}`);
108
+ if (packagesWithVersions.length > 0) {
109
+ const command = studio_server_1.StudioServerInternals.getInstallCommand({
110
+ manager: manager.manager,
111
+ packages: packagesWithVersions,
112
+ version: '',
113
+ additionalArgs: args,
114
+ });
115
+ log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.gray(`$ ${manager.manager} ${command.join(' ')}`));
116
+ await runPackageManagerCommand({
117
+ manager: manager.manager,
118
+ command,
119
+ logLevel,
120
+ });
121
+ }
122
+ if (catalogPackages.length > 0 && packagesWithVersions.length === 0) {
123
+ log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.gray(`$ ${manager.manager} install`));
124
+ await runPackageManagerCommand({
125
+ manager: manager.manager,
126
+ command: ['install'],
127
+ logLevel,
128
+ });
129
+ }
130
+ log_1.Log.info({ indent: false, logLevel }, '⏫ Remotion has been upgraded!');
131
+ log_1.Log.info({ indent: false, logLevel }, 'https://remotion.dev/changelog');
132
+ };
133
+ exports.upgradeCommand = upgradeCommand;
134
+ const runPackageManagerCommand = async ({ manager, command, logLevel, }) => {
135
+ const task = (0, node_child_process_1.spawn)(manager, command, {
77
136
  env: {
78
137
  ...process.env,
79
138
  ADBLOCK: '1',
@@ -96,7 +155,4 @@ const upgradeCommand = async ({ remotionRoot, packageManager, version, logLevel,
96
155
  }
97
156
  });
98
157
  });
99
- log_1.Log.info({ indent: false, logLevel }, '⏫ Remotion has been upgraded!');
100
- log_1.Log.info({ indent: false, logLevel }, 'https://remotion.dev/changelog');
101
158
  };
102
- exports.upgradeCommand = upgradeCommand;
package/dist/versions.js CHANGED
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.versionsCommand = exports.validateVersionsBeforeCommand = exports.VERSIONS_COMMAND = void 0;
7
- const renderer_1 = require("@remotion/renderer");
8
7
  const node_fs_1 = __importDefault(require("node:fs"));
9
8
  const node_path_1 = __importDefault(require("node:path"));
9
+ const renderer_1 = require("@remotion/renderer");
10
10
  const chalk_1 = require("./chalk");
11
11
  const extra_packages_1 = require("./extra-packages");
12
12
  const list_of_remotion_packages_1 = require("./list-of-remotion-packages");
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.428",
6
+ "version": "4.0.430",
7
7
  "description": "Control Remotion features using the `npx remotion` command",
8
8
  "main": "dist/index.js",
9
9
  "sideEffects": false,
@@ -13,7 +13,8 @@
13
13
  "remotiond": "remotiond-cli.js"
14
14
  },
15
15
  "scripts": {
16
- "formatting": "prettier src --check",
16
+ "formatting": "oxfmt src --check",
17
+ "format": "oxfmt src",
17
18
  "lint": "eslint src",
18
19
  "test": "bun test src",
19
20
  "make": "tsgo -d"
@@ -36,17 +37,17 @@
36
37
  "author": "Jonny Burger <jonny@remotion.dev>",
37
38
  "license": "SEE LICENSE IN LICENSE.md",
38
39
  "dependencies": {
39
- "@remotion/bundler": "4.0.428",
40
- "@remotion/media-utils": "4.0.428",
41
- "@remotion/player": "4.0.428",
42
- "@remotion/renderer": "4.0.428",
43
- "@remotion/studio-shared": "4.0.428",
44
- "@remotion/studio-server": "4.0.428",
45
- "@remotion/studio": "4.0.428",
40
+ "@remotion/bundler": "4.0.429",
41
+ "@remotion/media-utils": "4.0.429",
42
+ "@remotion/player": "4.0.429",
43
+ "@remotion/renderer": "4.0.429",
44
+ "@remotion/studio-shared": "4.0.429",
45
+ "@remotion/studio-server": "4.0.429",
46
+ "@remotion/studio": "4.0.429",
46
47
  "dotenv": "17.3.1",
47
48
  "minimist": "1.2.6",
48
49
  "prompts": "2.4.2",
49
- "remotion": "4.0.428"
50
+ "remotion": "4.0.429"
50
51
  },
51
52
  "peerDependencies": {
52
53
  "react": ">=16.8.0",
@@ -57,14 +58,14 @@
57
58
  "@types/prompts": "^2.4.1",
58
59
  "@types/prettier": "^2.7.2",
59
60
  "@types/node": "20.12.14",
60
- "@remotion/zod-types": "4.0.428",
61
- "@remotion/tailwind-v4": "4.0.428",
62
- "@remotion/enable-scss": "4.0.428",
63
- "@remotion/skia": "4.0.428",
61
+ "@remotion/zod-types": "4.0.429",
62
+ "@remotion/tailwind-v4": "4.0.429",
63
+ "@remotion/enable-scss": "4.0.429",
64
+ "@remotion/skia": "4.0.429",
64
65
  "react": "19.2.3",
65
66
  "react-dom": "19.2.3",
66
67
  "zod": "4.3.6",
67
- "@remotion/eslint-config-internal": "4.0.428",
68
+ "@remotion/eslint-config-internal": "4.0.429",
68
69
  "eslint": "9.19.0",
69
70
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
70
71
  },