@remotion/cli 3.1.6 → 3.1.7
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/code-frame.js +3 -3
- package/dist/compositions.d.ts +1 -1
- package/dist/compositions.js +9 -3
- package/dist/config/browser-executable.d.ts +3 -0
- package/dist/config/browser-executable.js +12 -0
- package/dist/config/browser.d.ts +3 -0
- package/dist/config/browser.js +18 -0
- package/dist/config/chromium-flags.d.ts +9 -0
- package/dist/config/chromium-flags.js +33 -0
- package/dist/config/codec.d.ts +7 -0
- package/dist/config/codec.js +40 -0
- package/dist/config/concurrency.d.ts +3 -0
- package/dist/config/concurrency.js +12 -0
- package/dist/config/crf.d.ts +4 -0
- package/dist/config/crf.js +23 -0
- package/dist/config/env-file.d.ts +2 -0
- package/dist/config/env-file.js +10 -0
- package/dist/config/every-nth-frame.d.ts +3 -0
- package/dist/config/every-nth-frame.js +20 -0
- package/dist/config/ffmpeg-executable.d.ts +5 -0
- package/dist/config/ffmpeg-executable.js +21 -0
- package/dist/config/frame-range.d.ts +4 -0
- package/dist/config/frame-range.js +35 -0
- package/dist/config/image-format.d.ts +3 -0
- package/dist/config/image-format.js +20 -0
- package/dist/config/image-sequence.d.ts +3 -0
- package/dist/config/image-sequence.js +15 -0
- package/dist/config/index.d.ts +43 -0
- package/dist/config/index.js +162 -0
- package/dist/config/log.d.ts +3 -0
- package/dist/config/log.js +12 -0
- package/dist/config/max-timeline-tracks.d.ts +2 -0
- package/dist/config/max-timeline-tracks.js +24 -0
- package/dist/config/number-of-gif-loops.d.ts +4 -0
- package/dist/config/number-of-gif-loops.js +21 -0
- package/dist/config/output-location.d.ts +2 -0
- package/dist/config/output-location.js +16 -0
- package/dist/config/override-webpack.d.ts +5 -0
- package/dist/config/override-webpack.js +14 -0
- package/dist/config/overwrite.d.ts +2 -0
- package/dist/config/overwrite.js +14 -0
- package/dist/config/pixel-format.d.ts +3 -0
- package/dist/config/pixel-format.js +16 -0
- package/dist/config/preview-server.d.ts +2 -0
- package/dist/config/preview-server.js +20 -0
- package/dist/config/prores-profile.d.ts +3 -0
- package/dist/config/prores-profile.js +12 -0
- package/dist/config/quality.d.ts +2 -0
- package/dist/config/quality.js +17 -0
- package/dist/config/scale.d.ts +3 -0
- package/dist/config/scale.js +15 -0
- package/dist/config/still-frame.d.ts +2 -0
- package/dist/config/still-frame.js +12 -0
- package/dist/config/timeout.d.ts +2 -0
- package/dist/config/timeout.js +17 -0
- package/dist/config/webpack-caching.d.ts +3 -0
- package/dist/config/webpack-caching.js +16 -0
- package/dist/editor/components/CompositionSelectorItem.d.ts +1 -1
- package/dist/editor/components/CompositionSelectorItem.js +2 -1
- package/dist/editor/components/Editor.js +2 -1
- package/dist/editor/components/InitialCompositionLoader.d.ts +1 -1
- package/dist/editor/components/InitialCompositionLoader.js +17 -4
- package/dist/editor/components/PlayPause.js +4 -0
- package/dist/editor/components/Timeline/TimelineDragHandler.js +3 -2
- package/dist/editor/components/Timeline/TimelineInOutPointer.js +2 -1
- package/dist/editor/components/Timeline/TimelineListItem.js +1 -0
- package/dist/editor/components/TimelineInOutToggle.js +3 -2
- package/dist/editor/state/in-out.d.ts +12 -0
- package/dist/editor/state/in-out.js +23 -0
- package/dist/find-closest-package-json.d.ts +2 -0
- package/dist/find-closest-package-json.js +35 -0
- package/dist/get-cli-options.d.ts +4 -5
- package/dist/get-cli-options.js +35 -32
- package/dist/get-config-file-name.d.ts +1 -1
- package/dist/get-config-file-name.js +9 -6
- package/dist/get-env.js +6 -4
- package/dist/get-filename.d.ts +1 -1
- package/dist/get-final-output-codec.d.ts +6 -0
- package/dist/get-final-output-codec.js +63 -0
- package/dist/image-formats.d.ts +3 -3
- package/dist/image-formats.js +4 -3
- package/dist/index.d.ts +10 -8
- package/dist/index.js +17 -9
- package/dist/initialize-render-cli.d.ts +1 -1
- package/dist/initialize-render-cli.js +8 -3
- package/dist/lambda-command.d.ts +1 -1
- package/dist/lambda-command.js +4 -4
- package/dist/load-config.d.ts +1 -1
- package/dist/load-config.js +16 -5
- package/dist/log.js +7 -6
- package/dist/parse-command-line.d.ts +1 -1
- package/dist/parse-command-line.js +31 -30
- package/dist/preview-server/error-overlay/react-overlay/effects/map-error-to-react-stack.js +2 -2
- package/dist/preview-server/error-overlay/react-overlay/utils/get-file-source.d.ts +1 -1
- package/dist/preview-server/error-overlay/react-overlay/utils/get-file-source.js +3 -3
- package/dist/preview-server/get-package-manager.d.ts +1 -1
- package/dist/preview-server/get-package-manager.js +2 -2
- package/dist/preview-server/project-info.d.ts +1 -1
- package/dist/preview-server/project-info.js +3 -3
- package/dist/preview-server/routes.d.ts +2 -1
- package/dist/preview-server/routes.js +28 -17
- package/dist/preview-server/start-server.d.ts +1 -0
- package/dist/preview-server/start-server.js +4 -2
- package/dist/preview-server/update-available.d.ts +1 -1
- package/dist/preview-server/update-available.js +8 -5
- package/dist/preview.d.ts +1 -1
- package/dist/preview.js +5 -4
- package/dist/previewEntry.js +1 -0
- package/dist/progress-bar.d.ts +1 -2
- package/dist/progress-bar.js +5 -4
- package/dist/render.d.ts +1 -1
- package/dist/render.js +17 -10
- package/dist/setup-cache.d.ts +2 -1
- package/dist/setup-cache.js +16 -9
- package/dist/still.d.ts +1 -1
- package/dist/still.js +15 -10
- package/dist/truthy.d.ts +3 -0
- package/dist/truthy.js +7 -0
- package/dist/upgrade.d.ts +1 -1
- package/dist/upgrade.js +5 -10
- package/dist/user-passed-output-location.js +2 -2
- package/dist/versions.d.ts +2 -2
- package/dist/versions.js +13 -12
- package/dist/webpack-cache.d.ts +2 -2
- package/dist/webpack-cache.js +10 -10
- package/package.json +7 -7
package/dist/setup-cache.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { RenderStep } from './step';
|
|
2
|
-
export declare const bundleOnCli: ({ fullPath, steps, }: {
|
|
2
|
+
export declare const bundleOnCli: ({ fullPath, steps, remotionRoot, }: {
|
|
3
3
|
fullPath: string;
|
|
4
4
|
steps: RenderStep[];
|
|
5
|
+
remotionRoot: string;
|
|
5
6
|
}) => Promise<string>;
|
package/dist/setup-cache.js
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.bundleOnCli = void 0;
|
|
4
4
|
const bundler_1 = require("@remotion/bundler");
|
|
5
|
-
const
|
|
5
|
+
const config_1 = require("./config");
|
|
6
6
|
const log_1 = require("./log");
|
|
7
7
|
const parse_command_line_1 = require("./parse-command-line");
|
|
8
8
|
const progress_bar_1 = require("./progress-bar");
|
|
9
|
-
const bundleOnCli = async ({ fullPath, steps, }) => {
|
|
9
|
+
const bundleOnCli = async ({ fullPath, steps, remotionRoot, }) => {
|
|
10
10
|
var _a;
|
|
11
|
-
const shouldCache =
|
|
11
|
+
const shouldCache = config_1.ConfigInternals.getWebpackCaching();
|
|
12
12
|
const onProgress = (progress) => {
|
|
13
13
|
bundlingProgress.update((0, progress_bar_1.makeBundlingProgress)({
|
|
14
14
|
progress: progress / 100,
|
|
@@ -18,17 +18,24 @@ const bundleOnCli = async ({ fullPath, steps, }) => {
|
|
|
18
18
|
};
|
|
19
19
|
const options = {
|
|
20
20
|
enableCaching: shouldCache,
|
|
21
|
-
webpackOverride: (_a =
|
|
21
|
+
webpackOverride: (_a = config_1.ConfigInternals.getWebpackOverrideFn()) !== null && _a !== void 0 ? _a : ((f) => f),
|
|
22
|
+
rootDir: remotionRoot,
|
|
22
23
|
};
|
|
23
|
-
const [hash] = bundler_1.BundlerInternals.getConfig(
|
|
24
|
-
|
|
24
|
+
const [hash] = bundler_1.BundlerInternals.getConfig({
|
|
25
|
+
outDir: '',
|
|
26
|
+
entryPoint: fullPath,
|
|
27
|
+
onProgressUpdate: onProgress,
|
|
28
|
+
options,
|
|
29
|
+
resolvedRemotionRoot: remotionRoot,
|
|
30
|
+
});
|
|
31
|
+
const cacheExistedBefore = bundler_1.BundlerInternals.cacheExists(remotionRoot, 'production', hash);
|
|
25
32
|
if (cacheExistedBefore !== 'does-not-exist' && !shouldCache) {
|
|
26
33
|
log_1.Log.info('🧹 Cache disabled but found. Deleting... ');
|
|
27
|
-
await bundler_1.BundlerInternals.clearCache();
|
|
34
|
+
await bundler_1.BundlerInternals.clearCache(remotionRoot);
|
|
28
35
|
}
|
|
29
36
|
if (cacheExistedBefore === 'other-exists' && shouldCache) {
|
|
30
37
|
log_1.Log.info('🧹 Webpack config change detected. Clearing cache... ');
|
|
31
|
-
await bundler_1.BundlerInternals.clearCache();
|
|
38
|
+
await bundler_1.BundlerInternals.clearCache(remotionRoot);
|
|
32
39
|
}
|
|
33
40
|
const bundleStartTime = Date.now();
|
|
34
41
|
const bundlingProgress = (0, progress_bar_1.createOverwriteableCliOutput)((0, parse_command_line_1.quietFlagProvided)());
|
|
@@ -45,7 +52,7 @@ const bundleOnCli = async ({ fullPath, steps, }) => {
|
|
|
45
52
|
doneIn: Date.now() - bundleStartTime,
|
|
46
53
|
}) + '\n');
|
|
47
54
|
log_1.Log.verbose('Bundled under', bundled);
|
|
48
|
-
const cacheExistedAfter = bundler_1.BundlerInternals.cacheExists('production', hash) === 'exists';
|
|
55
|
+
const cacheExistedAfter = bundler_1.BundlerInternals.cacheExists(remotionRoot, 'production', hash) === 'exists';
|
|
49
56
|
if (cacheExistedAfter) {
|
|
50
57
|
if (cacheExistedBefore === 'does-not-exist' ||
|
|
51
58
|
cacheExistedBefore === 'other-exists') {
|
package/dist/still.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const still: () => Promise<void>;
|
|
1
|
+
export declare const still: (remotionRoot: string) => Promise<void>;
|
package/dist/still.js
CHANGED
|
@@ -7,8 +7,8 @@ exports.still = void 0;
|
|
|
7
7
|
const renderer_1 = require("@remotion/renderer");
|
|
8
8
|
const fs_1 = require("fs");
|
|
9
9
|
const path_1 = __importDefault(require("path"));
|
|
10
|
-
const remotion_1 = require("remotion");
|
|
11
10
|
const chalk_1 = require("./chalk");
|
|
11
|
+
const config_1 = require("./config");
|
|
12
12
|
const get_cli_options_1 = require("./get-cli-options");
|
|
13
13
|
const get_composition_id_1 = require("./get-composition-id");
|
|
14
14
|
const initialize_render_cli_1 = require("./initialize-render-cli");
|
|
@@ -16,23 +16,24 @@ const log_1 = require("./log");
|
|
|
16
16
|
const parse_command_line_1 = require("./parse-command-line");
|
|
17
17
|
const progress_bar_1 = require("./progress-bar");
|
|
18
18
|
const setup_cache_1 = require("./setup-cache");
|
|
19
|
+
const truthy_1 = require("./truthy");
|
|
19
20
|
const user_passed_output_location_1 = require("./user-passed-output-location");
|
|
20
|
-
const still = async () => {
|
|
21
|
+
const still = async (remotionRoot) => {
|
|
21
22
|
const startTime = Date.now();
|
|
22
23
|
const file = parse_command_line_1.parsedCli._[1];
|
|
23
24
|
const fullPath = renderer_1.RenderInternals.isServeUrl(file)
|
|
24
25
|
? file
|
|
25
26
|
: path_1.default.join(process.cwd(), file);
|
|
26
|
-
await (0, initialize_render_cli_1.initializeRenderCli)('still');
|
|
27
|
+
await (0, initialize_render_cli_1.initializeRenderCli)(remotionRoot, 'still');
|
|
27
28
|
const userPassedOutput = (0, user_passed_output_location_1.getUserPassedOutputLocation)();
|
|
28
29
|
if ((userPassedOutput === null || userPassedOutput === void 0 ? void 0 : userPassedOutput.endsWith('.jpeg')) ||
|
|
29
30
|
(userPassedOutput === null || userPassedOutput === void 0 ? void 0 : userPassedOutput.endsWith('.jpg'))) {
|
|
30
31
|
log_1.Log.verbose('Output file has a JPEG extension, setting the image format to JPEG.');
|
|
31
|
-
|
|
32
|
+
config_1.Config.Rendering.setImageFormat('jpeg');
|
|
32
33
|
}
|
|
33
34
|
if (userPassedOutput === null || userPassedOutput === void 0 ? void 0 : userPassedOutput.endsWith('.png')) {
|
|
34
35
|
log_1.Log.verbose('Output file has a PNG extension, setting the image format to PNG.');
|
|
35
|
-
|
|
36
|
+
config_1.Config.Rendering.setImageFormat('png');
|
|
36
37
|
}
|
|
37
38
|
const { inputProps, envVariables, quality, browser, imageFormat, stillFrame, browserExecutable, chromiumOptions, scale, ffmpegExecutable, ffprobeExecutable, overwrite, puppeteerTimeout, port, } = await (0, get_cli_options_1.getCliOptions)({
|
|
38
39
|
isLambda: false,
|
|
@@ -61,7 +62,7 @@ const still = async () => {
|
|
|
61
62
|
const browserInstance = (0, renderer_1.openBrowser)(browser, {
|
|
62
63
|
browserExecutable,
|
|
63
64
|
chromiumOptions,
|
|
64
|
-
shouldDumpIo:
|
|
65
|
+
shouldDumpIo: renderer_1.RenderInternals.isEqualOrBelowLogLevel(config_1.ConfigInternals.Logging.getLogLevel(), 'verbose'),
|
|
65
66
|
forceDeviceScaleFactor: scale,
|
|
66
67
|
});
|
|
67
68
|
(0, fs_1.mkdirSync)(path_1.default.join(absoluteOutputLocation, '..'), {
|
|
@@ -70,11 +71,12 @@ const still = async () => {
|
|
|
70
71
|
const steps = [
|
|
71
72
|
renderer_1.RenderInternals.isServeUrl(fullPath) ? null : 'bundling',
|
|
72
73
|
'rendering',
|
|
73
|
-
].filter(
|
|
74
|
+
].filter(truthy_1.truthy);
|
|
74
75
|
const urlOrBundle = renderer_1.RenderInternals.isServeUrl(fullPath)
|
|
75
76
|
? Promise.resolve(fullPath)
|
|
76
|
-
: await (0, setup_cache_1.bundleOnCli)({ fullPath, steps });
|
|
77
|
+
: await (0, setup_cache_1.bundleOnCli)({ fullPath, remotionRoot, steps });
|
|
77
78
|
const puppeteerInstance = await browserInstance;
|
|
79
|
+
const downloadMap = renderer_1.RenderInternals.makeDownloadMap();
|
|
78
80
|
const comps = await (0, renderer_1.getCompositions)(await urlOrBundle, {
|
|
79
81
|
inputProps,
|
|
80
82
|
puppeteerInstance,
|
|
@@ -85,6 +87,7 @@ const still = async () => {
|
|
|
85
87
|
browserExecutable,
|
|
86
88
|
ffmpegExecutable,
|
|
87
89
|
ffprobeExecutable,
|
|
90
|
+
downloadMap,
|
|
88
91
|
});
|
|
89
92
|
const composition = comps.find((c) => c.id === compositionId);
|
|
90
93
|
if (!composition) {
|
|
@@ -131,17 +134,19 @@ const still = async () => {
|
|
|
131
134
|
output: absoluteOutputLocation,
|
|
132
135
|
serveUrl: await urlOrBundle,
|
|
133
136
|
quality,
|
|
134
|
-
dumpBrowserLogs:
|
|
137
|
+
dumpBrowserLogs: renderer_1.RenderInternals.isEqualOrBelowLogLevel(config_1.ConfigInternals.Logging.getLogLevel(), 'verbose'),
|
|
135
138
|
envVariables,
|
|
136
139
|
imageFormat,
|
|
137
140
|
inputProps,
|
|
138
141
|
chromiumOptions,
|
|
139
|
-
timeoutInMilliseconds:
|
|
142
|
+
timeoutInMilliseconds: config_1.ConfigInternals.getCurrentPuppeteerTimeout(),
|
|
140
143
|
scale,
|
|
141
144
|
ffmpegExecutable,
|
|
142
145
|
browserExecutable,
|
|
143
146
|
overwrite,
|
|
144
147
|
onDownload,
|
|
148
|
+
port,
|
|
149
|
+
downloadMap,
|
|
145
150
|
});
|
|
146
151
|
frames = 1;
|
|
147
152
|
updateProgress();
|
package/dist/truthy.d.ts
ADDED
package/dist/truthy.js
ADDED
package/dist/upgrade.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const upgrade: () => Promise<void>;
|
|
1
|
+
export declare const upgrade: (remotionRoot: string) => Promise<void>;
|
package/dist/upgrade.js
CHANGED
|
@@ -5,9 +5,8 @@ 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 fs_1 = __importDefault(require("fs"));
|
|
9
8
|
const path_1 = __importDefault(require("path"));
|
|
10
|
-
const
|
|
9
|
+
const config_1 = require("./config");
|
|
11
10
|
const get_latest_remotion_version_1 = require("./get-latest-remotion-version");
|
|
12
11
|
const log_1 = require("./log");
|
|
13
12
|
const get_package_manager_1 = require("./preview-server/get-package-manager");
|
|
@@ -20,17 +19,13 @@ const getUpgradeCommand = ({ manager, packages, version, }) => {
|
|
|
20
19
|
};
|
|
21
20
|
return commands[manager];
|
|
22
21
|
};
|
|
23
|
-
const upgrade = async () => {
|
|
22
|
+
const upgrade = async (remotionRoot) => {
|
|
24
23
|
var _a;
|
|
25
|
-
const packageJsonFilePath = path_1.default.join(
|
|
26
|
-
if (!fs_1.default.existsSync(packageJsonFilePath)) {
|
|
27
|
-
log_1.Log.error('Could not upgrade because no package.json could be found in your project.');
|
|
28
|
-
process.exit(1);
|
|
29
|
-
}
|
|
24
|
+
const packageJsonFilePath = path_1.default.join(remotionRoot, 'package.json');
|
|
30
25
|
const packageJson = require(packageJsonFilePath);
|
|
31
26
|
const dependencies = Object.keys(packageJson.dependencies);
|
|
32
27
|
const latestRemotionVersion = await (0, get_latest_remotion_version_1.getLatestRemotionVersion)();
|
|
33
|
-
const manager = (0, get_package_manager_1.getPackageManager)();
|
|
28
|
+
const manager = (0, get_package_manager_1.getPackageManager)(remotionRoot);
|
|
34
29
|
if (manager === 'unknown') {
|
|
35
30
|
throw new Error(`No lockfile was found in your project (one of ${get_package_manager_1.lockFilePaths
|
|
36
31
|
.map((p) => p.path)
|
|
@@ -57,7 +52,7 @@ const upgrade = async () => {
|
|
|
57
52
|
}), {
|
|
58
53
|
stdio: 'inherit',
|
|
59
54
|
});
|
|
60
|
-
if (
|
|
55
|
+
if (renderer_1.RenderInternals.isEqualOrBelowLogLevel(config_1.ConfigInternals.Logging.getLogLevel(), 'info')) {
|
|
61
56
|
(_a = prom.stdout) === null || _a === void 0 ? void 0 : _a.pipe(process.stdout);
|
|
62
57
|
}
|
|
63
58
|
await prom;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getOutputLocation = exports.getUserPassedOutputLocation = void 0;
|
|
4
|
-
const
|
|
4
|
+
const config_1 = require("./config");
|
|
5
5
|
const parse_command_line_1 = require("./parse-command-line");
|
|
6
6
|
const getUserPassedOutputLocation = () => {
|
|
7
7
|
const filename = parse_command_line_1.parsedCli._[3]
|
|
8
8
|
? parse_command_line_1.parsedCli._[3]
|
|
9
|
-
:
|
|
9
|
+
: config_1.ConfigInternals.getOutputLocation();
|
|
10
10
|
return filename;
|
|
11
11
|
};
|
|
12
12
|
exports.getUserPassedOutputLocation = getUserPassedOutputLocation;
|
package/dist/versions.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const VERSIONS_COMMAND = "versions";
|
|
2
|
-
export declare const validateVersionsBeforeCommand: () => Promise<void>;
|
|
3
|
-
export declare const versionsCommand: () => Promise<void>;
|
|
2
|
+
export declare const validateVersionsBeforeCommand: (remotionRoot: string) => Promise<void>;
|
|
3
|
+
export declare const versionsCommand: (remotionRoot: string) => Promise<void>;
|
package/dist/versions.js
CHANGED
|
@@ -4,8 +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");
|
|
7
8
|
const fs_1 = __importDefault(require("fs"));
|
|
8
|
-
const
|
|
9
|
+
const config_1 = require("./config");
|
|
9
10
|
const log_1 = require("./log");
|
|
10
11
|
const parse_command_line_1 = require("./parse-command-line");
|
|
11
12
|
const resolve_from_1 = require("./resolve-from");
|
|
@@ -23,9 +24,9 @@ const packages = [
|
|
|
23
24
|
'@remotion/gif',
|
|
24
25
|
'remotion',
|
|
25
26
|
];
|
|
26
|
-
const getVersion = async (p) => {
|
|
27
|
+
const getVersion = async (remotionRoot, p) => {
|
|
27
28
|
try {
|
|
28
|
-
const remotionPkgJson = (0, resolve_from_1.resolveFrom)(
|
|
29
|
+
const remotionPkgJson = (0, resolve_from_1.resolveFrom)(remotionRoot, `${p}/package.json`);
|
|
29
30
|
const file = await fs_1.default.promises.readFile(remotionPkgJson, 'utf-8');
|
|
30
31
|
const packageJson = JSON.parse(file);
|
|
31
32
|
return packageJson.version;
|
|
@@ -44,12 +45,12 @@ const groupBy = (vals) => {
|
|
|
44
45
|
}
|
|
45
46
|
return groups;
|
|
46
47
|
};
|
|
47
|
-
const getAllVersions = async () => {
|
|
48
|
-
return (await Promise.all(packages.map(async (p) => [p, await getVersion(p)]))).filter(([, version]) => version);
|
|
48
|
+
const getAllVersions = async (remotionRoot) => {
|
|
49
|
+
return (await Promise.all(packages.map(async (p) => [p, await getVersion(remotionRoot, p)]))).filter(([, version]) => version);
|
|
49
50
|
};
|
|
50
51
|
exports.VERSIONS_COMMAND = 'versions';
|
|
51
|
-
const validateVersionsBeforeCommand = async () => {
|
|
52
|
-
const versions = await getAllVersions();
|
|
52
|
+
const validateVersionsBeforeCommand = async (remotionRoot) => {
|
|
53
|
+
const versions = await getAllVersions(remotionRoot);
|
|
53
54
|
const grouped = groupBy(versions);
|
|
54
55
|
const installedVersions = Object.keys(grouped);
|
|
55
56
|
if (installedVersions.length === 1) {
|
|
@@ -72,16 +73,16 @@ const validateVersionsBeforeCommand = async () => {
|
|
|
72
73
|
log_1.Log.warn('To resolve:');
|
|
73
74
|
log_1.Log.warn('- Make sure your package.json has all Remotion packages pointing to the same version.');
|
|
74
75
|
log_1.Log.warn('- Remove the `^` character in front of a version to pin a package.');
|
|
75
|
-
if (!
|
|
76
|
+
if (!renderer_1.RenderInternals.isEqualOrBelowLogLevel(config_1.ConfigInternals.Logging.getLogLevel(), 'verbose')) {
|
|
76
77
|
log_1.Log.warn('- Run `npx remotion versions --log=verbose` to see the path of the modules resolved.');
|
|
77
78
|
}
|
|
78
79
|
log_1.Log.warn('-------------');
|
|
79
80
|
log_1.Log.info();
|
|
80
81
|
};
|
|
81
82
|
exports.validateVersionsBeforeCommand = validateVersionsBeforeCommand;
|
|
82
|
-
const versionsCommand = async () => {
|
|
83
|
+
const versionsCommand = async (remotionRoot) => {
|
|
83
84
|
(0, parse_command_line_1.parseCommandLine)('versions');
|
|
84
|
-
const versions = await getAllVersions();
|
|
85
|
+
const versions = await getAllVersions(remotionRoot);
|
|
85
86
|
const grouped = groupBy(versions);
|
|
86
87
|
const installedVersions = Object.keys(grouped);
|
|
87
88
|
log_1.Log.info(`Node.JS = ${process.version}, OS = ${process.platform}`);
|
|
@@ -90,7 +91,7 @@ const versionsCommand = async () => {
|
|
|
90
91
|
log_1.Log.info(`On version: ${version}`);
|
|
91
92
|
for (const pkg of grouped[version]) {
|
|
92
93
|
log_1.Log.info(`- ${pkg}`);
|
|
93
|
-
log_1.Log.verbose(` ${(0, resolve_from_1.resolveFrom)(
|
|
94
|
+
log_1.Log.verbose(` ${(0, resolve_from_1.resolveFrom)(remotionRoot, `${pkg}/package.json`)}`);
|
|
94
95
|
}
|
|
95
96
|
log_1.Log.info();
|
|
96
97
|
}
|
|
@@ -101,7 +102,7 @@ const versionsCommand = async () => {
|
|
|
101
102
|
log_1.Log.error('Version mismatch: Not all Remotion packages have the same version.');
|
|
102
103
|
log_1.Log.info('- Make sure your package.json has all Remotion packages pointing to the same version.');
|
|
103
104
|
log_1.Log.info('- Remove the `^` character in front of a version to pin a package.');
|
|
104
|
-
if (!
|
|
105
|
+
if (!renderer_1.RenderInternals.isEqualOrBelowLogLevel(config_1.ConfigInternals.Logging.getLogLevel(), 'verbose')) {
|
|
105
106
|
log_1.Log.info('- Rerun this command with --log=verbose to see the path of the modules resolved.');
|
|
106
107
|
}
|
|
107
108
|
process.exit(1);
|
package/dist/webpack-cache.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ declare global {
|
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
-
export declare const clearCache: (environment: Environment, inputProps: object | null) => Promise<void>;
|
|
9
|
+
export declare const clearCache: (remotionRoot: string, environment: Environment, inputProps: object | null) => Promise<void>;
|
|
10
10
|
export declare const getWebpackCacheName: (environment: Environment, inputProps: object | null) => string;
|
|
11
|
-
export declare const cacheExists: (environment: Environment, inputProps: object | null) => boolean;
|
|
11
|
+
export declare const cacheExists: (remotionRoot: string, environment: Environment, inputProps: object | null) => boolean;
|
|
12
12
|
export {};
|
package/dist/webpack-cache.js
CHANGED
|
@@ -6,12 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.cacheExists = exports.getWebpackCacheName = exports.clearCache = void 0;
|
|
7
7
|
const fs_1 = __importDefault(require("fs"));
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
|
+
// eslint-disable-next-line no-restricted-imports
|
|
9
10
|
const remotion_1 = require("remotion");
|
|
10
11
|
// Inlined from https://github.com/webpack/webpack/blob/4c2ee7a4ddb8db2362ca83b6c4190523387ba7ee/lib/config/defaults.js#L265
|
|
11
12
|
// An algorithm to determine where Webpack will cache the depencies
|
|
12
|
-
const getWebpackCacheDir = () => {
|
|
13
|
-
|
|
14
|
-
let dir = cwd;
|
|
13
|
+
const getWebpackCacheDir = (remotionRoot) => {
|
|
14
|
+
let dir = remotionRoot;
|
|
15
15
|
for (;;) {
|
|
16
16
|
try {
|
|
17
17
|
if (fs_1.default.statSync(path_1.default.join(dir, 'package.json')).isFile()) {
|
|
@@ -28,7 +28,7 @@ const getWebpackCacheDir = () => {
|
|
|
28
28
|
dir = parent;
|
|
29
29
|
}
|
|
30
30
|
if (!dir) {
|
|
31
|
-
return path_1.default.resolve(
|
|
31
|
+
return path_1.default.resolve(remotionRoot, '.cache/webpack');
|
|
32
32
|
}
|
|
33
33
|
if (process.versions.pnp === '1') {
|
|
34
34
|
return path_1.default.resolve(dir, '.pnp/.cache/webpack');
|
|
@@ -38,12 +38,12 @@ const getWebpackCacheDir = () => {
|
|
|
38
38
|
}
|
|
39
39
|
return path_1.default.resolve(dir, 'node_modules/.cache/webpack');
|
|
40
40
|
};
|
|
41
|
-
const remotionCacheLocation = (environment, inputProps) => {
|
|
42
|
-
return path_1.default.join(getWebpackCacheDir(), (0, exports.getWebpackCacheName)(environment, inputProps));
|
|
41
|
+
const remotionCacheLocation = (remotionRoot, environment, inputProps) => {
|
|
42
|
+
return path_1.default.join(getWebpackCacheDir(remotionRoot), (0, exports.getWebpackCacheName)(environment, inputProps));
|
|
43
43
|
};
|
|
44
|
-
const clearCache = (environment, inputProps) => {
|
|
44
|
+
const clearCache = (remotionRoot, environment, inputProps) => {
|
|
45
45
|
var _a;
|
|
46
|
-
return ((_a = fs_1.default.promises.rm) !== null && _a !== void 0 ? _a : fs_1.default.promises.rmdir)(remotionCacheLocation(environment, inputProps), {
|
|
46
|
+
return ((_a = fs_1.default.promises.rm) !== null && _a !== void 0 ? _a : fs_1.default.promises.rmdir)(remotionCacheLocation(remotionRoot, environment, inputProps), {
|
|
47
47
|
recursive: true,
|
|
48
48
|
});
|
|
49
49
|
};
|
|
@@ -60,7 +60,7 @@ const getWebpackCacheName = (environment, inputProps) => {
|
|
|
60
60
|
return `remotion-v3-${environment}`;
|
|
61
61
|
};
|
|
62
62
|
exports.getWebpackCacheName = getWebpackCacheName;
|
|
63
|
-
const cacheExists = (environment, inputProps) => {
|
|
64
|
-
return fs_1.default.existsSync(remotionCacheLocation(environment, inputProps));
|
|
63
|
+
const cacheExists = (remotionRoot, environment, inputProps) => {
|
|
64
|
+
return fs_1.default.existsSync(remotionCacheLocation(remotionRoot, environment, inputProps));
|
|
65
65
|
};
|
|
66
66
|
exports.cacheExists = cacheExists;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cli",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.7",
|
|
4
4
|
"description": "CLI for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -23,15 +23,15 @@
|
|
|
23
23
|
"author": "Jonny Burger <jonny@remotion.dev>",
|
|
24
24
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@remotion/bundler": "3.1.
|
|
27
|
-
"@remotion/media-utils": "3.1.
|
|
28
|
-
"@remotion/player": "3.1.
|
|
29
|
-
"@remotion/renderer": "3.1.
|
|
26
|
+
"@remotion/bundler": "3.1.7",
|
|
27
|
+
"@remotion/media-utils": "3.1.7",
|
|
28
|
+
"@remotion/player": "3.1.7",
|
|
29
|
+
"@remotion/renderer": "3.1.7",
|
|
30
30
|
"better-opn": "2.1.1",
|
|
31
31
|
"dotenv": "9.0.2",
|
|
32
32
|
"memfs": "3.4.3",
|
|
33
33
|
"minimist": "1.2.6",
|
|
34
|
-
"remotion": "3.1.
|
|
34
|
+
"remotion": "3.1.7",
|
|
35
35
|
"semver": "7.3.5",
|
|
36
36
|
"source-map": "0.6.1",
|
|
37
37
|
"vitest": "^0.18.0"
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "599379fef6043a7125d1979766f915580ec1cf77"
|
|
75
75
|
}
|