@remotion/cli 4.0.88 → 4.0.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/benchmark.js +2 -0
- package/dist/bundle.d.ts +2 -0
- package/dist/bundle.js +112 -0
- package/dist/cloudrun-command.js +3 -3
- package/dist/compositions.js +3 -0
- package/dist/config/index.js +3 -3
- package/dist/download-progress.d.ts +1 -1
- package/dist/download-progress.js +2 -2
- package/dist/entry-point.d.ts +3 -1
- package/dist/get-composition-id.js +2 -2
- package/dist/get-env.js +2 -2
- package/dist/get-render-defaults.d.ts +1 -1
- package/dist/index.d.ts +8 -7
- package/dist/index.js +9 -5
- package/dist/lambda-command.js +3 -3
- package/dist/list-of-remotion-packages.js +3 -0
- package/dist/make-on-download.d.ts +1 -1
- package/dist/make-on-download.js +2 -2
- package/dist/parse-command-line.d.ts +10 -9
- package/dist/print-help.js +6 -2
- package/dist/progress-bar.d.ts +1 -1
- package/dist/progress-bar.js +3 -3
- package/dist/progress-types.d.ts +1 -1
- package/dist/render-flows/render.d.ts +1 -1
- package/dist/render-flows/render.js +2 -0
- package/dist/render-flows/still.d.ts +1 -1
- package/dist/render-flows/still.js +2 -0
- package/dist/render-queue/process-still.d.ts +1 -1
- package/dist/render-queue/process-video.d.ts +1 -1
- package/dist/render-queue/queue.d.ts +1 -1
- package/dist/render-queue/queue.js +4 -4
- package/dist/setup-cache.d.ts +21 -2
- package/dist/setup-cache.js +9 -6
- package/dist/studio.js +5 -4
- package/dist/upgrade.js +4 -4
- package/dist/user-passed-output-location.js +2 -2
- package/dist/yes-or-no.d.ts +4 -0
- package/dist/yes-or-no.js +44 -0
- package/package.json +12 -11
package/dist/benchmark.js
CHANGED
|
@@ -125,6 +125,8 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
|
|
|
125
125
|
(0, cleanup_before_quit_1.registerCleanupJob)(() => renderer_1.RenderInternals.deleteDirectory(dir));
|
|
126
126
|
},
|
|
127
127
|
quietProgress: false,
|
|
128
|
+
quietFlag: (0, parse_command_line_1.quietFlagProvided)(),
|
|
129
|
+
outDir: null,
|
|
128
130
|
});
|
|
129
131
|
(0, cleanup_before_quit_1.registerCleanupJob)(() => cleanupBundle());
|
|
130
132
|
const puppeteerInstance = await browserInstance;
|
package/dist/bundle.d.ts
ADDED
package/dist/bundle.js
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
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.bundleCommand = void 0;
|
|
7
|
+
const bundler_1 = require("@remotion/bundler");
|
|
8
|
+
const studio_server_1 = require("@remotion/studio-server");
|
|
9
|
+
const fs_1 = require("fs");
|
|
10
|
+
const path_1 = __importDefault(require("path"));
|
|
11
|
+
const chalk_1 = require("./chalk");
|
|
12
|
+
const entry_point_1 = require("./entry-point");
|
|
13
|
+
const get_cli_options_1 = require("./get-cli-options");
|
|
14
|
+
const log_1 = require("./log");
|
|
15
|
+
const parse_command_line_1 = require("./parse-command-line");
|
|
16
|
+
const setup_cache_1 = require("./setup-cache");
|
|
17
|
+
const should_use_non_overlaying_logger_1 = require("./should-use-non-overlaying-logger");
|
|
18
|
+
const yes_or_no_1 = require("./yes-or-no");
|
|
19
|
+
const bundleCommand = async (remotionRoot, args, logLevel) => {
|
|
20
|
+
const { file, reason } = (0, entry_point_1.findEntryPoint)(args, remotionRoot, logLevel);
|
|
21
|
+
const explicitlyPassed = args[0];
|
|
22
|
+
if (explicitlyPassed &&
|
|
23
|
+
reason !== 'argument passed' &&
|
|
24
|
+
reason !== 'argument passed - found in cwd' &&
|
|
25
|
+
reason !== 'argument passed - found in root') {
|
|
26
|
+
log_1.Log.error(`Entry point was specified as ${chalk_1.chalk.bold(explicitlyPassed)}, but it was not found.`);
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|
|
29
|
+
const updatesDontOverwrite = (0, should_use_non_overlaying_logger_1.shouldUseNonOverlayingLogger)({ logLevel });
|
|
30
|
+
if (!file) {
|
|
31
|
+
log_1.Log.error('No entry point found.');
|
|
32
|
+
log_1.Log.error('Pass another argument to the command specifying the entry point.');
|
|
33
|
+
log_1.Log.error('See: https://www.remotion.dev/docs/terminology#entry-point');
|
|
34
|
+
process.exit(1);
|
|
35
|
+
}
|
|
36
|
+
const { publicDir } = await (0, get_cli_options_1.getCliOptions)({
|
|
37
|
+
isLambda: false,
|
|
38
|
+
type: 'get-compositions',
|
|
39
|
+
remotionRoot,
|
|
40
|
+
logLevel,
|
|
41
|
+
});
|
|
42
|
+
const outputPath = parse_command_line_1.parsedCli['out-dir']
|
|
43
|
+
? path_1.default.resolve(process.cwd(), parse_command_line_1.parsedCli['out-dir'])
|
|
44
|
+
: path_1.default.join(remotionRoot, 'build');
|
|
45
|
+
const gitignoreFolder = bundler_1.BundlerInternals.findClosestFolderWithFile(outputPath, '.gitignore');
|
|
46
|
+
const existed = (0, fs_1.existsSync)(outputPath);
|
|
47
|
+
if (existed) {
|
|
48
|
+
const existsIndexHtml = (0, fs_1.existsSync)(path_1.default.join(outputPath, 'index.html'));
|
|
49
|
+
const isEmpty = (0, fs_1.readdirSync)(outputPath).length === 0;
|
|
50
|
+
if (!existsIndexHtml && !isEmpty) {
|
|
51
|
+
log_1.Log.error(`The folder at ${outputPath} already exists, and needs to be deleted before a new bundle can be created.`);
|
|
52
|
+
log_1.Log.error('However, it does not look like the folder was created by `npx remotion bundle` (no index.html).');
|
|
53
|
+
log_1.Log.error('Aborting to prevent accidental data loss.');
|
|
54
|
+
process.exit(1);
|
|
55
|
+
}
|
|
56
|
+
(0, fs_1.rmSync)(outputPath, { recursive: true });
|
|
57
|
+
}
|
|
58
|
+
const output = await (0, setup_cache_1.bundleOnCli)({
|
|
59
|
+
fullPath: file,
|
|
60
|
+
logLevel,
|
|
61
|
+
onDirectoryCreated: () => { },
|
|
62
|
+
bundlingStep: 0,
|
|
63
|
+
indent: false,
|
|
64
|
+
quietProgress: updatesDontOverwrite,
|
|
65
|
+
publicDir,
|
|
66
|
+
steps: 1,
|
|
67
|
+
remotionRoot,
|
|
68
|
+
onProgressCallback: ({ bundling, copying }) => {
|
|
69
|
+
// Handle floating point inaccuracies
|
|
70
|
+
if (bundling.progress < 0.99999) {
|
|
71
|
+
if (updatesDontOverwrite) {
|
|
72
|
+
log_1.Log.info(`Bundling ${Math.round(bundling.progress * 100)}%`);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
if (copying.doneIn === null) {
|
|
76
|
+
if (updatesDontOverwrite) {
|
|
77
|
+
return `Copying public dir ${studio_server_1.StudioServerInternals.formatBytes(copying.bytes)}`;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
quietFlag: (0, parse_command_line_1.quietFlagProvided)(),
|
|
82
|
+
outDir: outputPath,
|
|
83
|
+
});
|
|
84
|
+
log_1.Log.infoAdvanced({ indent: false, logLevel }, chalk_1.chalk.blue(`${existed ? '○' : '+'} ${output}`));
|
|
85
|
+
if (!gitignoreFolder) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
// Non-interactive terminal
|
|
89
|
+
if (!process.stdout.isTTY) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
const gitignorePath = path_1.default.join(gitignoreFolder, '.gitignore');
|
|
93
|
+
const gitIgnoreContents = (0, fs_1.readFileSync)(gitignorePath, 'utf-8');
|
|
94
|
+
const relativePathToGitIgnore = path_1.default.relative(gitignoreFolder, outputPath);
|
|
95
|
+
const isInGitIgnore = gitIgnoreContents
|
|
96
|
+
.split('\n')
|
|
97
|
+
.includes(relativePathToGitIgnore);
|
|
98
|
+
if (isInGitIgnore) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const answer = await (0, yes_or_no_1.yesOrNo)({
|
|
102
|
+
defaultValue: true,
|
|
103
|
+
question: `Recommended: Add ${chalk_1.chalk.bold(relativePathToGitIgnore)} to your ${chalk_1.chalk.bold('.gitignore')} file? (Y/n)`,
|
|
104
|
+
});
|
|
105
|
+
if (!answer) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
const newGitIgnoreContents = gitIgnoreContents + '\n' + relativePathToGitIgnore;
|
|
109
|
+
(0, fs_1.writeFileSync)(gitignorePath, newGitIgnoreContents);
|
|
110
|
+
log_1.Log.infoAdvanced({ indent: false, logLevel }, chalk_1.chalk.blue(`Added to .gitignore!`));
|
|
111
|
+
};
|
|
112
|
+
exports.bundleCommand = bundleCommand;
|
package/dist/cloudrun-command.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.cloudrunCommand = void 0;
|
|
4
|
-
const
|
|
4
|
+
const studio_server_1 = require("@remotion/studio-server");
|
|
5
5
|
const log_1 = require("./log");
|
|
6
6
|
const cloudrunCommand = async (remotionRoot, args, logLevel) => {
|
|
7
7
|
try {
|
|
@@ -13,13 +13,13 @@ const cloudrunCommand = async (remotionRoot, args, logLevel) => {
|
|
|
13
13
|
process.exit(0);
|
|
14
14
|
}
|
|
15
15
|
catch (err) {
|
|
16
|
-
const manager =
|
|
16
|
+
const manager = studio_server_1.StudioServerInternals.getPackageManager(remotionRoot, undefined);
|
|
17
17
|
const installCommand = manager === 'unknown' ? 'npm i' : manager.installCommand;
|
|
18
18
|
log_1.Log.error(err);
|
|
19
19
|
log_1.Log.error('Remotion Cloud Run is not installed.');
|
|
20
20
|
log_1.Log.infoAdvanced({ indent: false, logLevel }, '');
|
|
21
21
|
log_1.Log.infoAdvanced({ indent: false, logLevel }, 'You can install it using:');
|
|
22
|
-
log_1.Log.infoAdvanced({ indent: false, logLevel }, `${installCommand} @remotion/cloudrun@${
|
|
22
|
+
log_1.Log.infoAdvanced({ indent: false, logLevel }, `${installCommand} @remotion/cloudrun@${studio_server_1.StudioServerInternals.getRemotionVersion()}`);
|
|
23
23
|
process.exit(1);
|
|
24
24
|
}
|
|
25
25
|
};
|
package/dist/compositions.js
CHANGED
|
@@ -8,6 +8,7 @@ const preview_server_1 = require("./config/preview-server");
|
|
|
8
8
|
const entry_point_1 = require("./entry-point");
|
|
9
9
|
const get_cli_options_1 = require("./get-cli-options");
|
|
10
10
|
const log_1 = require("./log");
|
|
11
|
+
const parse_command_line_1 = require("./parse-command-line");
|
|
11
12
|
const print_compositions_1 = require("./print-compositions");
|
|
12
13
|
const setup_cache_1 = require("./setup-cache");
|
|
13
14
|
const listCompositionsCommand = async (remotionRoot, args, logLevel) => {
|
|
@@ -38,6 +39,8 @@ const listCompositionsCommand = async (remotionRoot, args, logLevel) => {
|
|
|
38
39
|
(0, cleanup_before_quit_1.registerCleanupJob)(() => renderer_1.RenderInternals.deleteDirectory(dir));
|
|
39
40
|
},
|
|
40
41
|
quietProgress: false,
|
|
42
|
+
quietFlag: (0, parse_command_line_1.quietFlagProvided)(),
|
|
43
|
+
outDir: null,
|
|
41
44
|
});
|
|
42
45
|
(0, cleanup_before_quit_1.registerCleanupJob)(() => cleanupBundle());
|
|
43
46
|
const compositions = await renderer_1.RenderInternals.internalGetCompositions({
|
package/dist/config/index.js
CHANGED
|
@@ -48,7 +48,7 @@ const still_frame_1 = require("./still-frame");
|
|
|
48
48
|
const timeout_1 = require("./timeout");
|
|
49
49
|
const webpack_caching_1 = require("./webpack-caching");
|
|
50
50
|
const x264_preset_1 = require("./x264-preset");
|
|
51
|
-
const
|
|
51
|
+
const studio_server_1 = require("@remotion/studio-server");
|
|
52
52
|
const audio_codec_1 = require("./audio-codec");
|
|
53
53
|
const beep_on_finish_1 = require("./beep-on-finish");
|
|
54
54
|
const bitrate_1 = require("./bitrate");
|
|
@@ -108,7 +108,7 @@ exports.Config = {
|
|
|
108
108
|
get Puppeteer() {
|
|
109
109
|
throw new Error('The config format has changed. Change `Config.Puppeteer.*()` calls to `Config.*()` in your config file.');
|
|
110
110
|
},
|
|
111
|
-
setMaxTimelineTracks:
|
|
111
|
+
setMaxTimelineTracks: studio_server_1.StudioServerInternals.setMaxTimelineTracks,
|
|
112
112
|
setKeyboardShortcutsEnabled: keyboard_shortcuts_1.setKeyboardShortcutsEnabled,
|
|
113
113
|
setNumberOfSharedAudioTags: number_of_shared_audio_tags_1.setNumberOfSharedAudioTags,
|
|
114
114
|
setWebpackPollingInMilliseconds: webpack_poll_1.setWebpackPollingInMilliseconds,
|
|
@@ -205,7 +205,7 @@ exports.ConfigInternals = {
|
|
|
205
205
|
Logging,
|
|
206
206
|
setFrameRangeFromCli: frame_range_1.setFrameRangeFromCli,
|
|
207
207
|
setStillFrame: still_frame_1.setStillFrame,
|
|
208
|
-
getMaxTimelineTracks:
|
|
208
|
+
getMaxTimelineTracks: studio_server_1.StudioServerInternals.getMaxTimelineTracks,
|
|
209
209
|
defaultOverrideFunction: override_webpack_1.defaultOverrideFunction,
|
|
210
210
|
setMuted: muted_1.setMuted,
|
|
211
211
|
getMuted: muted_1.getMuted,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { DownloadProgress } from '@remotion/studio';
|
|
1
|
+
import type { DownloadProgress } from '@remotion/studio-server';
|
|
2
2
|
export declare const getFileSizeDownloadBar: (downloaded: number) => string;
|
|
3
3
|
export declare const makeMultiDownloadProgress: (progresses: DownloadProgress[]) => string | null;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.makeMultiDownloadProgress = exports.getFileSizeDownloadBar = void 0;
|
|
4
|
-
const
|
|
4
|
+
const studio_server_1 = require("@remotion/studio-server");
|
|
5
5
|
const make_progress_bar_1 = require("./make-progress-bar");
|
|
6
6
|
const truthy_1 = require("./truthy");
|
|
7
7
|
const getFileSizeDownloadBar = (downloaded) => {
|
|
8
8
|
const desiredLength = (0, make_progress_bar_1.makeProgressBar)(0).length;
|
|
9
|
-
return `[${
|
|
9
|
+
return `[${studio_server_1.StudioServerInternals.formatBytes(downloaded).padEnd(desiredLength - 2, ' ')}]`;
|
|
10
10
|
};
|
|
11
11
|
exports.getFileSizeDownloadBar = getFileSizeDownloadBar;
|
|
12
12
|
const makeMultiDownloadProgress = (progresses) => {
|
package/dist/entry-point.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { LogLevel } from '@remotion/renderer';
|
|
2
|
+
type FoundReason = 'argument passed - found in cwd' | 'argument passed - found in root' | 'argument passed' | 'config file' | 'common paths' | 'none found';
|
|
2
3
|
export declare const findEntryPoint: (args: string[], remotionRoot: string, logLevel: LogLevel) => {
|
|
3
4
|
file: string | null;
|
|
4
5
|
remainingArgs: string[];
|
|
5
|
-
reason:
|
|
6
|
+
reason: FoundReason;
|
|
6
7
|
};
|
|
8
|
+
export {};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getCompositionId = void 0;
|
|
4
4
|
const renderer_1 = require("@remotion/renderer");
|
|
5
|
-
const
|
|
5
|
+
const studio_server_1 = require("@remotion/studio-server");
|
|
6
6
|
const log_1 = require("./log");
|
|
7
7
|
const show_compositions_picker_1 = require("./show-compositions-picker");
|
|
8
8
|
const getCompName = ({ cliArgs, compositionIdFromUi, }) => {
|
|
@@ -42,7 +42,7 @@ const getCompositionId = async ({ args, compositionIdFromUi, serializedInputProp
|
|
|
42
42
|
log_1.Log.warn({
|
|
43
43
|
indent,
|
|
44
44
|
logLevel,
|
|
45
|
-
}, `The props of your composition are large (${
|
|
45
|
+
}, `The props of your composition are large (${studio_server_1.StudioServerInternals.formatBytes(propsSize)}). This may cause slowdown.`);
|
|
46
46
|
}
|
|
47
47
|
if (!config) {
|
|
48
48
|
throw new Error(`Cannot find composition with ID "${compName}"`);
|
package/dist/get-env.js
CHANGED
|
@@ -28,7 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.getEnvironmentVariables = void 0;
|
|
30
30
|
const renderer_1 = require("@remotion/renderer");
|
|
31
|
-
const
|
|
31
|
+
const studio_server_1 = require("@remotion/studio-server");
|
|
32
32
|
const dotenv_1 = __importDefault(require("dotenv"));
|
|
33
33
|
const node_fs_1 = __importStar(require("node:fs"));
|
|
34
34
|
const node_path_1 = __importDefault(require("node:path"));
|
|
@@ -52,7 +52,7 @@ const watchEnvFile = ({ processEnv, envFile, onUpdate, logLevel, }) => {
|
|
|
52
52
|
...dotenv_1.default.parse(file),
|
|
53
53
|
});
|
|
54
54
|
};
|
|
55
|
-
const { unwatch } =
|
|
55
|
+
const { unwatch } = studio_server_1.StudioServerInternals.installFileWatcher({
|
|
56
56
|
file: envFile,
|
|
57
57
|
onChange: async (type) => {
|
|
58
58
|
try {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { RenderDefaults } from '@remotion/
|
|
1
|
+
import type { RenderDefaults } from '@remotion/studio';
|
|
2
2
|
export declare const getRenderDefaults: () => RenderDefaults;
|
package/dist/index.d.ts
CHANGED
|
@@ -113,6 +113,12 @@ export declare const CliInternals: {
|
|
|
113
113
|
repro: boolean;
|
|
114
114
|
}>;
|
|
115
115
|
loadConfig: (remotionRoot: string) => Promise<string | null>;
|
|
116
|
+
formatBytes: (number: number, options?: (Intl.NumberFormatOptions & {
|
|
117
|
+
locale: string;
|
|
118
|
+
bits?: boolean | undefined;
|
|
119
|
+
binary?: boolean | undefined;
|
|
120
|
+
signed: boolean;
|
|
121
|
+
}) | undefined) => string;
|
|
116
122
|
initializeCli: (remotionRoot: string) => Promise<"verbose" | "info" | "warn" | "error">;
|
|
117
123
|
BooleanFlags: string[];
|
|
118
124
|
quietFlagProvided: () => boolean;
|
|
@@ -169,6 +175,7 @@ export declare const CliInternals: {
|
|
|
169
175
|
browser: string;
|
|
170
176
|
"browser-args": string;
|
|
171
177
|
"user-agent": string;
|
|
178
|
+
"out-dir": string;
|
|
172
179
|
repro: boolean;
|
|
173
180
|
"number-of-gif-loops": number;
|
|
174
181
|
"offthreadvideo-cache-size-in-bytes": number | null;
|
|
@@ -183,12 +190,6 @@ export declare const CliInternals: {
|
|
|
183
190
|
_: string[];
|
|
184
191
|
};
|
|
185
192
|
printError: (err: Error, logLevel: "verbose" | "info" | "warn" | "error") => Promise<void>;
|
|
186
|
-
formatBytes: (number: number, options?: (Intl.NumberFormatOptions & {
|
|
187
|
-
locale: string;
|
|
188
|
-
bits?: boolean | undefined;
|
|
189
|
-
binary?: boolean | undefined;
|
|
190
|
-
signed: boolean;
|
|
191
|
-
}) | undefined) => string;
|
|
192
193
|
getFileSizeDownloadBar: (downloaded: number) => string;
|
|
193
194
|
determineFinalStillImageFormat: ({ downloadName, outName, configImageFormat, cliFlag, isLambda, fromUi, }: {
|
|
194
195
|
downloadName: string | null;
|
|
@@ -205,7 +206,7 @@ export declare const CliInternals: {
|
|
|
205
206
|
findEntryPoint: (args: string[], remotionRoot: string, logLevel: "verbose" | "info" | "warn" | "error") => {
|
|
206
207
|
file: string | null;
|
|
207
208
|
remainingArgs: string[];
|
|
208
|
-
reason:
|
|
209
|
+
reason: "argument passed - found in cwd" | "argument passed - found in root" | "argument passed" | "config file" | "common paths" | "none found";
|
|
209
210
|
};
|
|
210
211
|
getVideoImageFormat: ({ codec, uiImageFormat, }: {
|
|
211
212
|
codec: import("@remotion/renderer").CodecOrUndefined;
|
package/dist/index.js
CHANGED
|
@@ -5,9 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.CliInternals = exports.cli = void 0;
|
|
7
7
|
const renderer_1 = require("@remotion/renderer");
|
|
8
|
-
const studio_1 = require("@remotion/studio");
|
|
9
8
|
const minimist_1 = __importDefault(require("minimist"));
|
|
10
9
|
const benchmark_1 = require("./benchmark");
|
|
10
|
+
const bundle_1 = require("./bundle");
|
|
11
11
|
const chalk_1 = require("./chalk");
|
|
12
12
|
const cleanup_before_quit_1 = require("./cleanup-before-quit");
|
|
13
13
|
const cloudrun_command_1 = require("./cloudrun-command");
|
|
@@ -36,7 +36,7 @@ const progress_bar_1 = require("./progress-bar");
|
|
|
36
36
|
const render_1 = require("./render");
|
|
37
37
|
const should_use_non_overlaying_logger_1 = require("./should-use-non-overlaying-logger");
|
|
38
38
|
const still_1 = require("./still");
|
|
39
|
-
const
|
|
39
|
+
const studio_1 = require("./studio");
|
|
40
40
|
const upgrade_1 = require("./upgrade");
|
|
41
41
|
const versions_1 = require("./versions");
|
|
42
42
|
const cli = async () => {
|
|
@@ -69,11 +69,14 @@ const cli = async () => {
|
|
|
69
69
|
const logLevel = await (0, initialize_cli_1.initializeCli)(remotionRoot);
|
|
70
70
|
(0, cleanup_before_quit_1.handleCtrlC)({ indent: false, logLevel });
|
|
71
71
|
try {
|
|
72
|
-
if (command === '
|
|
72
|
+
if (command === 'bundle') {
|
|
73
|
+
await (0, bundle_1.bundleCommand)(remotionRoot, args, logLevel);
|
|
74
|
+
}
|
|
75
|
+
else if (command === 'compositions') {
|
|
73
76
|
await (0, compositions_1.listCompositionsCommand)(remotionRoot, args, logLevel);
|
|
74
77
|
}
|
|
75
78
|
else if (isStudio) {
|
|
76
|
-
await (0,
|
|
79
|
+
await (0, studio_1.studioCommand)(remotionRoot, args, logLevel);
|
|
77
80
|
}
|
|
78
81
|
else if (command === 'lambda') {
|
|
79
82
|
await (0, lambda_command_1.lambdaCommand)(remotionRoot, args, logLevel);
|
|
@@ -129,6 +132,7 @@ const cli = async () => {
|
|
|
129
132
|
}
|
|
130
133
|
};
|
|
131
134
|
exports.cli = cli;
|
|
135
|
+
const studio_server_1 = require("@remotion/studio-server");
|
|
132
136
|
exports.CliInternals = {
|
|
133
137
|
createOverwriteableCliOutput: progress_bar_1.createOverwriteableCliOutput,
|
|
134
138
|
chalk: chalk_1.chalk,
|
|
@@ -136,12 +140,12 @@ exports.CliInternals = {
|
|
|
136
140
|
Log: log_1.Log,
|
|
137
141
|
getCliOptions: get_cli_options_1.getCliOptions,
|
|
138
142
|
loadConfig: get_config_file_name_1.loadConfig,
|
|
143
|
+
formatBytes: studio_server_1.StudioServerInternals.formatBytes,
|
|
139
144
|
initializeCli: initialize_cli_1.initializeCli,
|
|
140
145
|
BooleanFlags: parse_command_line_1.BooleanFlags,
|
|
141
146
|
quietFlagProvided: parse_command_line_1.quietFlagProvided,
|
|
142
147
|
parsedCli: parse_command_line_1.parsedCli,
|
|
143
148
|
printError: print_error_1.printError,
|
|
144
|
-
formatBytes: studio_1.StudioInternals.formatBytes,
|
|
145
149
|
getFileSizeDownloadBar: download_progress_1.getFileSizeDownloadBar,
|
|
146
150
|
determineFinalStillImageFormat: determine_image_format_1.determineFinalStillImageFormat,
|
|
147
151
|
minimist: minimist_1.default,
|
package/dist/lambda-command.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.lambdaCommand = void 0;
|
|
4
|
-
const
|
|
4
|
+
const studio_server_1 = require("@remotion/studio-server");
|
|
5
5
|
const log_1 = require("./log");
|
|
6
6
|
const lambdaCommand = async (remotionRoot, args, logLevel) => {
|
|
7
7
|
try {
|
|
@@ -13,13 +13,13 @@ const lambdaCommand = async (remotionRoot, args, logLevel) => {
|
|
|
13
13
|
process.exit(0);
|
|
14
14
|
}
|
|
15
15
|
catch (err) {
|
|
16
|
-
const manager =
|
|
16
|
+
const manager = studio_server_1.StudioServerInternals.getPackageManager(remotionRoot, undefined);
|
|
17
17
|
const installCommand = manager === 'unknown' ? 'npm i' : manager.installCommand;
|
|
18
18
|
log_1.Log.error(err);
|
|
19
19
|
log_1.Log.error('Remotion Lambda is not installed.');
|
|
20
20
|
log_1.Log.info('');
|
|
21
21
|
log_1.Log.info('You can install it using:');
|
|
22
|
-
log_1.Log.info(`${installCommand} @remotion/lambda@${
|
|
22
|
+
log_1.Log.info(`${installCommand} @remotion/lambda@${studio_server_1.StudioServerInternals.getRemotionVersion()}`);
|
|
23
23
|
process.exit(1);
|
|
24
24
|
}
|
|
25
25
|
};
|
|
@@ -26,8 +26,11 @@ exports.listOfRemotionPackages = [
|
|
|
26
26
|
'@remotion/gif',
|
|
27
27
|
'@remotion/shapes',
|
|
28
28
|
'@remotion/studio',
|
|
29
|
+
'@remotion/studio-server',
|
|
30
|
+
'@remotion/studio-shared',
|
|
29
31
|
'@remotion/zod-types',
|
|
30
32
|
'@remotion/tailwind',
|
|
31
33
|
'@remotion/transitions',
|
|
34
|
+
'@remotion/animation-utils',
|
|
32
35
|
'remotion',
|
|
33
36
|
];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LogLevel, RenderMediaOnDownload } from '@remotion/renderer';
|
|
2
|
-
import type { DownloadProgress } from '@remotion/studio';
|
|
2
|
+
import type { DownloadProgress } from '@remotion/studio-server';
|
|
3
3
|
export declare const makeOnDownload: ({ indent, logLevel, updatesDontOverwrite, downloads, updateRenderProgress, isUsingParallelEncoding, }: {
|
|
4
4
|
indent: boolean;
|
|
5
5
|
logLevel: LogLevel;
|
package/dist/make-on-download.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.makeOnDownload = void 0;
|
|
4
|
-
const
|
|
4
|
+
const studio_server_1 = require("@remotion/studio-server");
|
|
5
5
|
const log_1 = require("./log");
|
|
6
6
|
const makeOnDownload = ({ indent, logLevel, updatesDontOverwrite, downloads, updateRenderProgress, isUsingParallelEncoding, }) => {
|
|
7
7
|
return (src) => {
|
|
@@ -32,7 +32,7 @@ const makeOnDownload = ({ indent, logLevel, updatesDontOverwrite, downloads, upd
|
|
|
32
32
|
lastUpdate = Date.now();
|
|
33
33
|
log_1.Log.verbose({ indent, logLevel }, `Download [${nextDownloadIndex}]:`, percent
|
|
34
34
|
? `${(percent * 100).toFixed(1)}%`
|
|
35
|
-
:
|
|
35
|
+
: studio_server_1.StudioServerInternals.formatBytes(downloaded));
|
|
36
36
|
updateRenderProgress({
|
|
37
37
|
newline: false,
|
|
38
38
|
printToConsole: !updatesDontOverwrite,
|
|
@@ -2,63 +2,63 @@ import type { AudioCodec, BrowserExecutable, Codec, OpenGlRenderer, PixelFormat,
|
|
|
2
2
|
declare const beepOnFinishOption: {
|
|
3
3
|
name: string;
|
|
4
4
|
cliFlag: "beep-on-finish";
|
|
5
|
-
description: () => JSX.Element;
|
|
5
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
ssrName: null;
|
|
7
7
|
docLink: string;
|
|
8
8
|
type: boolean;
|
|
9
9
|
}, colorSpaceOption: {
|
|
10
10
|
name: string;
|
|
11
11
|
cliFlag: "color-space";
|
|
12
|
-
description: () => JSX.Element;
|
|
12
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
docLink: string;
|
|
14
14
|
ssrName: string;
|
|
15
15
|
type: "default" | "bt709" | "bt2020-ncl";
|
|
16
16
|
}, offthreadVideoCacheSizeInBytes: {
|
|
17
17
|
name: string;
|
|
18
18
|
cliFlag: "offthreadvideo-cache-size-in-bytes";
|
|
19
|
-
description: () => JSX.Element;
|
|
19
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
ssrName: "offthreadVideoCacheSizeInBytes";
|
|
21
21
|
docLink: string;
|
|
22
22
|
type: number | null;
|
|
23
23
|
}, encodingBufferSizeOption: {
|
|
24
24
|
name: string;
|
|
25
25
|
cliFlag: "buffer-size";
|
|
26
|
-
description: () => JSX.Element;
|
|
26
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
27
27
|
ssrName: "encodingBufferSize";
|
|
28
28
|
docLink: string;
|
|
29
29
|
type: string | null;
|
|
30
30
|
}, encodingMaxRateOption: {
|
|
31
31
|
name: string;
|
|
32
32
|
cliFlag: "max-rate";
|
|
33
|
-
description: () => JSX.Element;
|
|
33
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
34
34
|
ssrName: "encodingMaxRate";
|
|
35
35
|
docLink: string;
|
|
36
36
|
type: string | null;
|
|
37
37
|
}, deleteAfterOption: {
|
|
38
38
|
name: string;
|
|
39
39
|
cliFlag: "delete-after";
|
|
40
|
-
description: () => JSX.Element;
|
|
40
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
41
41
|
ssrName: "deleteAfter";
|
|
42
42
|
docLink: string;
|
|
43
43
|
type: string | null;
|
|
44
44
|
}, folderExpiryOption: {
|
|
45
45
|
name: string;
|
|
46
46
|
cliFlag: "enable-folder-expiry";
|
|
47
|
-
description: () => JSX.Element;
|
|
47
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
48
48
|
ssrName: "enableFolderExpiry";
|
|
49
49
|
docLink: string;
|
|
50
50
|
type: boolean | null;
|
|
51
51
|
}, enableMultiprocessOnLinuxOption: {
|
|
52
52
|
name: string;
|
|
53
53
|
cliFlag: "enable-multiprocess-on-linux";
|
|
54
|
-
description: () => JSX.Element;
|
|
54
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
55
55
|
ssrName: string;
|
|
56
56
|
docLink: string;
|
|
57
57
|
type: boolean;
|
|
58
58
|
}, numberOfGifLoopsOption: {
|
|
59
59
|
name: string;
|
|
60
60
|
cliFlag: "number-of-gif-loops";
|
|
61
|
-
description: () => JSX.Element;
|
|
61
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
62
62
|
ssrName: "numberOfGifLoops";
|
|
63
63
|
docLink: string;
|
|
64
64
|
type: number | null;
|
|
@@ -122,6 +122,7 @@ type CommandLineOptions = {
|
|
|
122
122
|
['browser']: string;
|
|
123
123
|
['browser-args']: string;
|
|
124
124
|
['user-agent']: string;
|
|
125
|
+
['out-dir']: string;
|
|
125
126
|
[deleteAfterOption.cliFlag]: string | undefined;
|
|
126
127
|
[folderExpiryOption.cliFlag]: boolean | undefined;
|
|
127
128
|
[enableMultiprocessOnLinuxOption.cliFlag]: boolean;
|
package/dist/print-help.js
CHANGED
|
@@ -8,10 +8,10 @@ const versions_1 = require("./versions");
|
|
|
8
8
|
const packagejson = require('../package.json');
|
|
9
9
|
const printHelp = () => {
|
|
10
10
|
log_1.Log.info(`@remotion/cli ${packagejson.version}`);
|
|
11
|
-
log_1.Log.info(`© ${new Date().getFullYear()}
|
|
11
|
+
log_1.Log.info(`© ${new Date().getFullYear()} Remotion AG`);
|
|
12
12
|
log_1.Log.info();
|
|
13
13
|
log_1.Log.info('Available commands:');
|
|
14
|
-
log_1.Log.info(
|
|
14
|
+
log_1.Log.info();
|
|
15
15
|
log_1.Log.info(chalk_1.chalk.blue('remotion studio') + chalk_1.chalk.gray(' <entry-point.ts>'));
|
|
16
16
|
log_1.Log.info('Start the Remotion studio.');
|
|
17
17
|
log_1.Log.info(chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/studio'));
|
|
@@ -26,6 +26,10 @@ const printHelp = () => {
|
|
|
26
26
|
log_1.Log.info('Render a still frame and save it as an image.');
|
|
27
27
|
log_1.Log.info(chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/still'));
|
|
28
28
|
log_1.Log.info();
|
|
29
|
+
log_1.Log.info(chalk_1.chalk.blue('remotion bundle') + chalk_1.chalk.gray(' <entry-point.ts>'));
|
|
30
|
+
log_1.Log.info('Create a Remotion bundle to be deployed to the web.');
|
|
31
|
+
log_1.Log.info(chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/bundle'));
|
|
32
|
+
log_1.Log.info();
|
|
29
33
|
log_1.Log.info(chalk_1.chalk.blue('remotion compositions') + chalk_1.chalk.gray(' <index-file.ts>'));
|
|
30
34
|
log_1.Log.info('Prints the available compositions.');
|
|
31
35
|
log_1.Log.info(chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/compositions'));
|
package/dist/progress-bar.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CancelSignal } from '@remotion/renderer';
|
|
2
|
-
import type { AggregateRenderProgress, BundlingState, CopyingState } from '@remotion/studio';
|
|
2
|
+
import type { AggregateRenderProgress, BundlingState, CopyingState } from '@remotion/studio-server';
|
|
3
3
|
export type OverwriteableCliOutput = {
|
|
4
4
|
update: (up: string, newline: boolean) => boolean;
|
|
5
5
|
};
|
package/dist/progress-bar.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.makeRenderingAndStitchingProgress = exports.makeBundlingAndCopyProgress = exports.createOverwriteableCliOutput = void 0;
|
|
4
4
|
const renderer_1 = require("@remotion/renderer");
|
|
5
|
-
const
|
|
5
|
+
const studio_server_1 = require("@remotion/studio-server");
|
|
6
6
|
const chalk_1 = require("./chalk");
|
|
7
7
|
const download_progress_1 = require("./download-progress");
|
|
8
8
|
const make_progress_bar_1 = require("./make-progress-bar");
|
|
@@ -33,7 +33,7 @@ const createOverwriteableCliOutput = (options) => {
|
|
|
33
33
|
},
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
const diff = new
|
|
36
|
+
const diff = new studio_server_1.StudioServerInternals.AnsiDiff();
|
|
37
37
|
(_a = options.cancelSignal) === null || _a === void 0 ? void 0 : _a.call(options, () => {
|
|
38
38
|
process.stdout.write(diff.finish());
|
|
39
39
|
});
|
|
@@ -172,7 +172,7 @@ const getGuiProgressSubtitle = (progress) => {
|
|
|
172
172
|
return `Bundling ${Math.round(progress.bundling.progress * 100)}%`;
|
|
173
173
|
}
|
|
174
174
|
if (progress.copyingState.doneIn === null) {
|
|
175
|
-
return `Copying public dir ${
|
|
175
|
+
return `Copying public dir ${studio_server_1.StudioServerInternals.formatBytes(progress.copyingState.bytes)}`;
|
|
176
176
|
}
|
|
177
177
|
if (!progress.rendering) {
|
|
178
178
|
return `Getting compositions`;
|
package/dist/progress-types.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { AggregateRenderProgress } from '@remotion/studio';
|
|
1
|
+
import type { AggregateRenderProgress } from '@remotion/studio-server';
|
|
2
2
|
export declare const initialAggregateRenderProgress: () => AggregateRenderProgress;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AudioCodec, Browser, BrowserExecutable, CancelSignal, ChromiumOptions, Codec, ColorSpace, Crf, FfmpegOverrideFn, FrameRange, LogLevel, PixelFormat, ProResProfile, VideoImageFormat, X264Preset } from '@remotion/renderer';
|
|
2
|
-
import type { JobProgressCallback } from '@remotion/studio';
|
|
2
|
+
import type { JobProgressCallback } from '@remotion/studio-server';
|
|
3
3
|
import type { Loop } from '../config/number-of-gif-loops';
|
|
4
4
|
export declare const renderVideoFlow: ({ remotionRoot, fullEntryPoint, indent, logLevel, browserExecutable, browser, chromiumOptions, scale, shouldOutputImageSequence, publicDir, envVariables, puppeteerTimeout, port, height, width, remainingArgs, compositionIdFromUi, entryPointReason, overwrite, quiet, concurrency, frameRange, everyNthFrame, outputLocationFromUI, jpegQuality, onProgress, addCleanupCallback, cancelSignal, crf, uiCodec, uiImageFormat, ffmpegOverride, audioBitrate, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, videoBitrate, encodingMaxRate, encodingBufferSize, numberOfGifLoops, audioCodec, serializedInputPropsWithCustomSchema, disallowParallelEncoding, offthreadVideoCacheSizeInBytes, colorSpace, repro, }: {
|
|
5
5
|
remotionRoot: string;
|
|
@@ -118,6 +118,8 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
118
118
|
addCleanupCallback(() => renderer_1.RenderInternals.deleteDirectory(dir));
|
|
119
119
|
},
|
|
120
120
|
quietProgress: updatesDontOverwrite,
|
|
121
|
+
quietFlag: (0, parse_command_line_1.quietFlagProvided)(),
|
|
122
|
+
outDir: null,
|
|
121
123
|
});
|
|
122
124
|
addCleanupCallback(() => cleanupBundle());
|
|
123
125
|
const onDownload = (0, make_on_download_1.makeOnDownload)({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Browser, BrowserExecutable, CancelSignal, ChromiumOptions, LogLevel, StillImageFormat } from '@remotion/renderer';
|
|
2
|
-
import type { JobProgressCallback } from '@remotion/studio';
|
|
2
|
+
import type { JobProgressCallback } from '@remotion/studio-server';
|
|
3
3
|
export declare const renderStillFlow: ({ remotionRoot, fullEntryPoint, entryPointReason, remainingArgs, browser, browserExecutable, chromiumOptions, envVariables, height, serializedInputPropsWithCustomSchema, overwrite, port, publicDir, puppeteerTimeout, jpegQuality, scale, stillFrame, width, compositionIdFromUi, imageFormatFromUi, logLevel, onProgress, indent, addCleanupCallback, cancelSignal, outputLocationFromUi, offthreadVideoCacheSizeInBytes, }: {
|
|
4
4
|
remotionRoot: string;
|
|
5
5
|
fullEntryPoint: string;
|
|
@@ -82,6 +82,8 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
82
82
|
});
|
|
83
83
|
},
|
|
84
84
|
quietProgress: updatesDontOverwrite,
|
|
85
|
+
quietFlag: (0, parse_command_line_1.quietFlagProvided)(),
|
|
86
|
+
outDir: null,
|
|
85
87
|
});
|
|
86
88
|
const server = await renderer_1.RenderInternals.prepareServer({
|
|
87
89
|
concurrency: 1,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JobProgressCallback, RenderJob } from '@remotion/studio';
|
|
1
|
+
import type { JobProgressCallback, RenderJob } from '@remotion/studio-server';
|
|
2
2
|
export declare const processStill: ({ job, remotionRoot, entryPoint, onProgress, addCleanupCallback, }: {
|
|
3
3
|
job: RenderJob;
|
|
4
4
|
remotionRoot: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LogLevel } from '@remotion/renderer';
|
|
2
|
-
import type { JobProgressCallback, RenderJob } from '@remotion/studio';
|
|
2
|
+
import type { JobProgressCallback, RenderJob } from '@remotion/studio-server';
|
|
3
3
|
export declare const processVideoJob: ({ job, remotionRoot, entryPoint, onProgress, addCleanupCallback, logLevel, }: {
|
|
4
4
|
job: RenderJob;
|
|
5
5
|
remotionRoot: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LogLevel } from '@remotion/renderer';
|
|
2
|
-
import type { RenderJob, RenderJobWithCleanup } from '@remotion/studio';
|
|
2
|
+
import type { RenderJob, RenderJobWithCleanup } from '@remotion/studio-server';
|
|
3
3
|
export declare const getRenderQueue: () => RenderJob[];
|
|
4
4
|
export declare const addJob: ({ job, entryPoint, remotionRoot, logLevel, }: {
|
|
5
5
|
job: RenderJobWithCleanup;
|
|
@@ -4,7 +4,7 @@ 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
|
|
7
|
+
const studio_server_1 = require("@remotion/studio-server");
|
|
8
8
|
const node_path_1 = __importDefault(require("node:path"));
|
|
9
9
|
const chalk_1 = require("../chalk");
|
|
10
10
|
const config_1 = require("../config");
|
|
@@ -31,7 +31,7 @@ const getRenderQueue = () => {
|
|
|
31
31
|
};
|
|
32
32
|
exports.getRenderQueue = getRenderQueue;
|
|
33
33
|
const notifyClientsOfJobUpdate = () => {
|
|
34
|
-
|
|
34
|
+
studio_server_1.StudioServerInternals.waitForLiveEventsListener().then((listener) => {
|
|
35
35
|
listener.sendEventToClient({
|
|
36
36
|
type: 'render-queue-updated',
|
|
37
37
|
queue: (0, exports.getRenderQueue)(),
|
|
@@ -163,7 +163,7 @@ const processJobIfPossible = async ({ remotionRoot, entryPoint, logLevel, }) =>
|
|
|
163
163
|
logLevel,
|
|
164
164
|
});
|
|
165
165
|
log_1.Log.info(chalk_1.chalk.gray('╰─ Done in ' + (Date.now() - startTime) + 'ms.'));
|
|
166
|
-
const { unwatch } =
|
|
166
|
+
const { unwatch } = studio_server_1.StudioServerInternals.installFileWatcher({
|
|
167
167
|
file: node_path_1.default.resolve(remotionRoot, nextJob.outName),
|
|
168
168
|
onChange: (type) => {
|
|
169
169
|
if (type === 'created') {
|
|
@@ -205,7 +205,7 @@ const processJobIfPossible = async ({ remotionRoot, entryPoint, logLevel, }) =>
|
|
|
205
205
|
};
|
|
206
206
|
});
|
|
207
207
|
await (0, print_error_1.printError)(err, config_1.ConfigInternals.Logging.getLogLevel());
|
|
208
|
-
|
|
208
|
+
studio_server_1.StudioServerInternals.waitForLiveEventsListener().then((listener) => {
|
|
209
209
|
listener.sendEventToClient({
|
|
210
210
|
type: 'render-job-failed',
|
|
211
211
|
compositionId: nextJob.compositionId,
|
package/dist/setup-cache.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { LogLevel } from '@remotion/renderer';
|
|
2
|
-
import type { BundlingState, CopyingState } from '@remotion/studio';
|
|
3
|
-
export declare const bundleOnCliOrTakeServeUrl: ({ fullPath, remotionRoot, publicDir, onProgress, indentOutput, logLevel, bundlingStep, steps, onDirectoryCreated, quietProgress, }: {
|
|
2
|
+
import type { BundlingState, CopyingState } from '@remotion/studio-server';
|
|
3
|
+
export declare const bundleOnCliOrTakeServeUrl: ({ fullPath, remotionRoot, publicDir, onProgress, indentOutput, logLevel, bundlingStep, steps, onDirectoryCreated, quietProgress, quietFlag, outDir, }: {
|
|
4
4
|
fullPath: string;
|
|
5
5
|
remotionRoot: string;
|
|
6
6
|
publicDir: string | null;
|
|
@@ -14,7 +14,26 @@ export declare const bundleOnCliOrTakeServeUrl: ({ fullPath, remotionRoot, publi
|
|
|
14
14
|
steps: number;
|
|
15
15
|
onDirectoryCreated: (path: string) => void;
|
|
16
16
|
quietProgress: boolean;
|
|
17
|
+
quietFlag: boolean;
|
|
18
|
+
outDir: string | null;
|
|
17
19
|
}) => Promise<{
|
|
18
20
|
urlOrBundle: string;
|
|
19
21
|
cleanup: () => void;
|
|
20
22
|
}>;
|
|
23
|
+
export declare const bundleOnCli: ({ fullPath, remotionRoot, publicDir, onProgressCallback, indent, logLevel, bundlingStep, steps, onDirectoryCreated, quietProgress, quietFlag, outDir, }: {
|
|
24
|
+
fullPath: string;
|
|
25
|
+
remotionRoot: string;
|
|
26
|
+
publicDir: string | null;
|
|
27
|
+
onProgressCallback: (params: {
|
|
28
|
+
bundling: BundlingState;
|
|
29
|
+
copying: CopyingState;
|
|
30
|
+
}) => void;
|
|
31
|
+
indent: boolean;
|
|
32
|
+
logLevel: LogLevel;
|
|
33
|
+
bundlingStep: number;
|
|
34
|
+
steps: number;
|
|
35
|
+
onDirectoryCreated: (path: string) => void;
|
|
36
|
+
quietProgress: boolean;
|
|
37
|
+
quietFlag: boolean;
|
|
38
|
+
outDir: string | null;
|
|
39
|
+
}) => Promise<string>;
|
package/dist/setup-cache.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.bundleOnCliOrTakeServeUrl = void 0;
|
|
3
|
+
exports.bundleOnCli = exports.bundleOnCliOrTakeServeUrl = void 0;
|
|
4
4
|
const bundler_1 = require("@remotion/bundler");
|
|
5
5
|
const renderer_1 = require("@remotion/renderer");
|
|
6
6
|
const config_1 = require("./config");
|
|
7
7
|
const log_1 = require("./log");
|
|
8
|
-
const parse_command_line_1 = require("./parse-command-line");
|
|
9
8
|
const progress_bar_1 = require("./progress-bar");
|
|
10
9
|
const should_use_non_overlaying_logger_1 = require("./should-use-non-overlaying-logger");
|
|
11
|
-
const bundleOnCliOrTakeServeUrl = async ({ fullPath, remotionRoot, publicDir, onProgress, indentOutput, logLevel, bundlingStep, steps, onDirectoryCreated, quietProgress, }) => {
|
|
10
|
+
const bundleOnCliOrTakeServeUrl = async ({ fullPath, remotionRoot, publicDir, onProgress, indentOutput, logLevel, bundlingStep, steps, onDirectoryCreated, quietProgress, quietFlag, outDir, }) => {
|
|
12
11
|
if (renderer_1.RenderInternals.isServeUrl(fullPath)) {
|
|
13
12
|
onProgress({
|
|
14
13
|
bundling: {
|
|
@@ -25,7 +24,7 @@ const bundleOnCliOrTakeServeUrl = async ({ fullPath, remotionRoot, publicDir, on
|
|
|
25
24
|
cleanup: () => Promise.resolve(undefined),
|
|
26
25
|
};
|
|
27
26
|
}
|
|
28
|
-
const bundled = await bundleOnCli({
|
|
27
|
+
const bundled = await (0, exports.bundleOnCli)({
|
|
29
28
|
fullPath,
|
|
30
29
|
remotionRoot,
|
|
31
30
|
publicDir,
|
|
@@ -36,6 +35,8 @@ const bundleOnCliOrTakeServeUrl = async ({ fullPath, remotionRoot, publicDir, on
|
|
|
36
35
|
steps,
|
|
37
36
|
onDirectoryCreated,
|
|
38
37
|
quietProgress,
|
|
38
|
+
quietFlag,
|
|
39
|
+
outDir,
|
|
39
40
|
});
|
|
40
41
|
return {
|
|
41
42
|
urlOrBundle: bundled,
|
|
@@ -43,7 +44,7 @@ const bundleOnCliOrTakeServeUrl = async ({ fullPath, remotionRoot, publicDir, on
|
|
|
43
44
|
};
|
|
44
45
|
};
|
|
45
46
|
exports.bundleOnCliOrTakeServeUrl = bundleOnCliOrTakeServeUrl;
|
|
46
|
-
const bundleOnCli = async ({ fullPath, remotionRoot, publicDir, onProgressCallback, indent, logLevel, bundlingStep, steps, onDirectoryCreated, quietProgress, }) => {
|
|
47
|
+
const bundleOnCli = async ({ fullPath, remotionRoot, publicDir, onProgressCallback, indent, logLevel, bundlingStep, steps, onDirectoryCreated, quietProgress, quietFlag, outDir, }) => {
|
|
47
48
|
var _a;
|
|
48
49
|
const shouldCache = config_1.ConfigInternals.getWebpackCaching();
|
|
49
50
|
const symlinkState = {
|
|
@@ -112,7 +113,7 @@ const bundleOnCli = async ({ fullPath, remotionRoot, publicDir, onProgressCallba
|
|
|
112
113
|
}
|
|
113
114
|
const bundleStartTime = Date.now();
|
|
114
115
|
const bundlingProgress = (0, progress_bar_1.createOverwriteableCliOutput)({
|
|
115
|
-
quiet: quietProgress ||
|
|
116
|
+
quiet: quietProgress || quietFlag,
|
|
116
117
|
cancelSignal: null,
|
|
117
118
|
updatesDontOverwrite: (0, should_use_non_overlaying_logger_1.shouldUseNonOverlayingLogger)({ logLevel }),
|
|
118
119
|
indent,
|
|
@@ -131,6 +132,7 @@ const bundleOnCli = async ({ fullPath, remotionRoot, publicDir, onProgressCallba
|
|
|
131
132
|
updateProgress(false);
|
|
132
133
|
},
|
|
133
134
|
onDirectoryCreated,
|
|
135
|
+
outDir: outDir !== null && outDir !== void 0 ? outDir : undefined,
|
|
134
136
|
...options,
|
|
135
137
|
});
|
|
136
138
|
bundlingState = {
|
|
@@ -154,3 +156,4 @@ const bundleOnCli = async ({ fullPath, remotionRoot, publicDir, onProgressCallba
|
|
|
154
156
|
}
|
|
155
157
|
return bundled;
|
|
156
158
|
};
|
|
159
|
+
exports.bundleOnCli = bundleOnCli;
|
package/dist/studio.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.studioCommand = void 0;
|
|
4
|
-
const
|
|
4
|
+
const studio_server_1 = require("@remotion/studio-server");
|
|
5
5
|
const config_1 = require("./config");
|
|
6
6
|
const number_of_shared_audio_tags_1 = require("./config/number-of-shared-audio-tags");
|
|
7
7
|
const convert_entry_point_to_serve_url_1 = require("./convert-entry-point-to-serve-url");
|
|
@@ -35,7 +35,7 @@ const studioCommand = async (remotionRoot, args, logLevel) => {
|
|
|
35
35
|
const desiredPort = getPort();
|
|
36
36
|
const fullEntryPath = (0, convert_entry_point_to_serve_url_1.convertEntryPointToServeUrl)(file);
|
|
37
37
|
let inputProps = (0, get_input_props_1.getInputProps)((newProps) => {
|
|
38
|
-
|
|
38
|
+
studio_server_1.StudioServerInternals.waitForLiveEventsListener().then((listener) => {
|
|
39
39
|
inputProps = newProps;
|
|
40
40
|
listener.sendEventToClient({
|
|
41
41
|
type: 'new-input-props',
|
|
@@ -44,7 +44,7 @@ const studioCommand = async (remotionRoot, args, logLevel) => {
|
|
|
44
44
|
});
|
|
45
45
|
}, logLevel);
|
|
46
46
|
let envVariables = (0, get_env_1.getEnvironmentVariables)((newEnvVariables) => {
|
|
47
|
-
|
|
47
|
+
studio_server_1.StudioServerInternals.waitForLiveEventsListener().then((listener) => {
|
|
48
48
|
envVariables = newEnvVariables;
|
|
49
49
|
listener.sendEventToClient({
|
|
50
50
|
type: 'new-env-variables',
|
|
@@ -54,7 +54,8 @@ const studioCommand = async (remotionRoot, args, logLevel) => {
|
|
|
54
54
|
}, logLevel);
|
|
55
55
|
const maxTimelineTracks = config_1.ConfigInternals.getMaxTimelineTracks();
|
|
56
56
|
const keyboardShortcutsEnabled = config_1.ConfigInternals.getKeyboardShortcutsEnabled();
|
|
57
|
-
await
|
|
57
|
+
await studio_server_1.StudioServerInternals.startStudio({
|
|
58
|
+
previewEntry: require.resolve('@remotion/studio/entry'),
|
|
58
59
|
browserArgs: parse_command_line_1.parsedCli['browser-args'],
|
|
59
60
|
browserFlag: parse_command_line_1.parsedCli.browser,
|
|
60
61
|
logLevel,
|
package/dist/upgrade.js
CHANGED
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.upgrade = void 0;
|
|
7
7
|
const renderer_1 = require("@remotion/renderer");
|
|
8
|
-
const
|
|
8
|
+
const studio_server_1 = require("@remotion/studio-server");
|
|
9
9
|
const node_path_1 = __importDefault(require("node:path"));
|
|
10
10
|
const config_1 = require("./config");
|
|
11
11
|
const list_of_remotion_packages_1 = require("./list-of-remotion-packages");
|
|
@@ -34,12 +34,12 @@ const upgrade = async (remotionRoot, packageManager, version) => {
|
|
|
34
34
|
log_1.Log.info('Upgrading to specified version: ' + version);
|
|
35
35
|
}
|
|
36
36
|
else {
|
|
37
|
-
targetVersion = await
|
|
37
|
+
targetVersion = await studio_server_1.StudioServerInternals.getLatestRemotionVersion();
|
|
38
38
|
log_1.Log.info('Newest Remotion version is', targetVersion);
|
|
39
39
|
}
|
|
40
|
-
const manager =
|
|
40
|
+
const manager = studio_server_1.StudioServerInternals.getPackageManager(remotionRoot, packageManager);
|
|
41
41
|
if (manager === 'unknown') {
|
|
42
|
-
throw new Error(`No lockfile was found in your project (one of ${
|
|
42
|
+
throw new Error(`No lockfile was found in your project (one of ${studio_server_1.StudioServerInternals.lockFilePaths
|
|
43
43
|
.map((p) => p.path)
|
|
44
44
|
.join(', ')}). Install dependencies using your favorite manager!`);
|
|
45
45
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getOutputLocation = exports.getUserPassedOutputLocation = void 0;
|
|
4
|
-
const
|
|
4
|
+
const studio_server_1 = require("@remotion/studio-server");
|
|
5
5
|
const config_1 = require("./config");
|
|
6
6
|
const parse_command_line_1 = require("./parse-command-line");
|
|
7
7
|
const getUserPassedOutputLocation = (args, uiPassedOutName) => {
|
|
@@ -16,7 +16,7 @@ const getOutputLocation = ({ compositionId, defaultExtension, args, type, output
|
|
|
16
16
|
typeof parse_command_line_1.parsedCli.output !== 'undefined') {
|
|
17
17
|
throw new Error('Both an output flag (--output) and an output location as a positional argument were passed. Please choose only one of the ways.');
|
|
18
18
|
}
|
|
19
|
-
return ((_a = (0, exports.getUserPassedOutputLocation)(args, outputLocationFromUi)) !== null && _a !== void 0 ? _a :
|
|
19
|
+
return ((_a = (0, exports.getUserPassedOutputLocation)(args, outputLocationFromUi)) !== null && _a !== void 0 ? _a : (0, studio_server_1.getDefaultOutLocation)({
|
|
20
20
|
compositionName: compositionId,
|
|
21
21
|
defaultExtension,
|
|
22
22
|
type,
|
|
@@ -0,0 +1,44 @@
|
|
|
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.yesOrNo = void 0;
|
|
7
|
+
const readline_1 = __importDefault(require("readline"));
|
|
8
|
+
const options = {
|
|
9
|
+
yes: ['yes', 'y'],
|
|
10
|
+
no: ['no', 'n'],
|
|
11
|
+
};
|
|
12
|
+
function defaultInvalidHandler({ yesValues, noValues, }) {
|
|
13
|
+
process.stdout.write('\nInvalid Response.\n');
|
|
14
|
+
process.stdout.write('Answer either yes : (' + yesValues.join(', ') + ') \n');
|
|
15
|
+
process.stdout.write('Or no: (' + noValues.join(', ') + ') \n\n');
|
|
16
|
+
}
|
|
17
|
+
const yesOrNo = ({ question, defaultValue, }) => {
|
|
18
|
+
const invalid = defaultInvalidHandler;
|
|
19
|
+
const yesValues = options.yes.map((v) => v.toLowerCase());
|
|
20
|
+
const noValues = options.no.map((v) => v.toLowerCase());
|
|
21
|
+
const rl = readline_1.default.createInterface({
|
|
22
|
+
input: process.stdin,
|
|
23
|
+
output: process.stdout,
|
|
24
|
+
});
|
|
25
|
+
return new Promise((resolve) => {
|
|
26
|
+
rl.question(question + ' ', async (answer) => {
|
|
27
|
+
rl.close();
|
|
28
|
+
const cleaned = answer.trim().toLowerCase();
|
|
29
|
+
if (cleaned === '' && defaultValue !== null)
|
|
30
|
+
return resolve(defaultValue);
|
|
31
|
+
if (yesValues.indexOf(cleaned) >= 0)
|
|
32
|
+
return resolve(true);
|
|
33
|
+
if (noValues.indexOf(cleaned) >= 0)
|
|
34
|
+
return resolve(false);
|
|
35
|
+
invalid({ question, yesValues, noValues });
|
|
36
|
+
const result = await (0, exports.yesOrNo)({
|
|
37
|
+
question,
|
|
38
|
+
defaultValue,
|
|
39
|
+
});
|
|
40
|
+
resolve(result);
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
exports.yesOrNo = yesOrNo;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.91",
|
|
4
4
|
"description": "CLI for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -31,12 +31,13 @@
|
|
|
31
31
|
"dotenv": "9.0.2",
|
|
32
32
|
"minimist": "1.2.6",
|
|
33
33
|
"prompts": "2.4.2",
|
|
34
|
-
"@remotion/bundler": "4.0.
|
|
35
|
-
"@remotion/
|
|
36
|
-
"@remotion/renderer": "4.0.
|
|
37
|
-
"remotion": "4.0.
|
|
38
|
-
"@remotion/studio": "4.0.
|
|
39
|
-
"@remotion/
|
|
34
|
+
"@remotion/bundler": "4.0.91",
|
|
35
|
+
"@remotion/player": "4.0.91",
|
|
36
|
+
"@remotion/renderer": "4.0.91",
|
|
37
|
+
"@remotion/media-utils": "4.0.91",
|
|
38
|
+
"@remotion/studio-server": "4.0.91",
|
|
39
|
+
"@remotion/studio": "4.0.91",
|
|
40
|
+
"remotion": "4.0.91"
|
|
40
41
|
},
|
|
41
42
|
"peerDependencies": {
|
|
42
43
|
"react": ">=16.8.0",
|
|
@@ -48,9 +49,9 @@
|
|
|
48
49
|
"bun-types": "0.8.0",
|
|
49
50
|
"@types/node": "18.14.6",
|
|
50
51
|
"@types/prompts": "^2.4.1",
|
|
51
|
-
"@types/react": "18.
|
|
52
|
+
"@types/react": "18.2.48",
|
|
52
53
|
"@types/prettier": "^2.7.2",
|
|
53
|
-
"@types/react-dom": "18.
|
|
54
|
+
"@types/react-dom": "18.2.18",
|
|
54
55
|
"eslint": "8.42.0",
|
|
55
56
|
"eslint-plugin-10x": "1.5.2",
|
|
56
57
|
"eslint-plugin-react": "7.32.2",
|
|
@@ -61,8 +62,8 @@
|
|
|
61
62
|
"react-dom": "18.2.0",
|
|
62
63
|
"vitest": "0.31.1",
|
|
63
64
|
"zod": "^3.22.3",
|
|
64
|
-
"@remotion/
|
|
65
|
-
"@remotion/
|
|
65
|
+
"@remotion/tailwind": "4.0.91",
|
|
66
|
+
"@remotion/zod-types": "4.0.91"
|
|
66
67
|
},
|
|
67
68
|
"keywords": [
|
|
68
69
|
"remotion",
|