@remotion/cli 3.1.3 → 3.1.4
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/preview-server/error-overlay/react-overlay/utils/open-in-editor.d.ts +1 -1
- package/dist/preview-server/routes.js +2 -2
- package/dist/preview-server/start-server.js +1 -1
- package/dist/setup-cache.js +26 -10
- package/dist/upgrade.js +1 -0
- package/dist/versions.js +1 -0
- package/package.json +7 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const editorNames: readonly ["atom", "/Applications/Atom Beta.app/Contents/MacOS/Atom Beta", "brackets", "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl", "/Applications/Sublime Text Dev.app/Contents/SharedSupport/bin/subl", "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl", "code", "code-insiders", "vscodium", "/Applications/AppCode.app/Contents/MacOS/appcode", "/Applications/CLion.app/Contents/MacOS/clion", "/Applications/IntelliJ IDEA.app/Contents/MacOS/idea", "/Applications/PhpStorm.app/Contents/MacOS/phpstorm", "/Applications/PyCharm.app/Contents/MacOS/pycharm", "/Applications/PyCharm CE.app/Contents/MacOS/pycharm", "/Applications/RubyMine.app/Contents/MacOS/rubymine", "/Applications/WebStorm.app/Contents/MacOS/webstorm", "/Applications/GoLand.app/Contents/MacOS/goland", "/Applications/Rider.app/Contents/MacOS/rider", "mvim", "emacs", "gvim", "idea", "phpstorm", "pycharm", "rubymine", "sublime_text", "vim", "webstorm", "goland", "rider", "Brackets.exe", "Code.exe", "Code - Insiders.exe", "VSCodium.exe", "atom.exe", "sublime_text.exe", "notepad++.exe", "clion.exe", "clion64.exe", "idea.exe", "idea64.exe", "phpstorm.exe", "phpstorm64.exe", "pycharm.exe", "pycharm64.exe", "rubymine.exe", "rubymine64.exe", "webstorm.exe", "webstorm64.exe", "goland.exe", "goland64.exe", "rider.exe", "rider64.exe", "nano"];
|
|
2
|
-
export declare const getDisplayNameForEditor: (editor: Editor |
|
|
2
|
+
export declare const getDisplayNameForEditor: (editor: Editor | null) => string | null;
|
|
3
3
|
declare type Editor = typeof editorNames[number];
|
|
4
4
|
declare type ProcessAndCommand = {
|
|
5
5
|
process: string;
|
|
@@ -25,8 +25,8 @@ const static404 = (response) => {
|
|
|
25
25
|
response.end('The static/ prefix has been changed, this URL is no longer valid.');
|
|
26
26
|
};
|
|
27
27
|
const handleFallback = async (hash, _, response, getCurrentInputProps) => {
|
|
28
|
-
const edit = await editorGuess;
|
|
29
|
-
const displayName = (0, open_in_editor_1.getDisplayNameForEditor)(edit
|
|
28
|
+
const [edit] = await editorGuess;
|
|
29
|
+
const displayName = (0, open_in_editor_1.getDisplayNameForEditor)(edit ? edit.command : null);
|
|
30
30
|
response.setHeader('content-type', 'text/html');
|
|
31
31
|
response.writeHead(200);
|
|
32
32
|
response.end(bundler_1.BundlerInternals.indexHtml(hash, '/', displayName, getCurrentInputProps()));
|
|
@@ -19,7 +19,7 @@ const routes_1 = require("./routes");
|
|
|
19
19
|
const startServer = async (entry, userDefinedComponent, options) => {
|
|
20
20
|
var _a, _b, _c, _d;
|
|
21
21
|
const tmpDir = await fs_1.default.promises.mkdtemp(path_1.default.join(os_1.default.tmpdir(), 'react-motion-graphics'));
|
|
22
|
-
const config = bundler_1.BundlerInternals.webpackConfig({
|
|
22
|
+
const [, config] = bundler_1.BundlerInternals.webpackConfig({
|
|
23
23
|
entry,
|
|
24
24
|
userDefinedComponent,
|
|
25
25
|
outDir: tmpDir,
|
package/dist/setup-cache.js
CHANGED
|
@@ -9,10 +9,26 @@ const progress_bar_1 = require("./progress-bar");
|
|
|
9
9
|
const bundleOnCli = async ({ fullPath, steps, }) => {
|
|
10
10
|
var _a;
|
|
11
11
|
const shouldCache = remotion_1.Internals.getWebpackCaching();
|
|
12
|
-
const
|
|
13
|
-
|
|
12
|
+
const onProgress = (progress) => {
|
|
13
|
+
bundlingProgress.update((0, progress_bar_1.makeBundlingProgress)({
|
|
14
|
+
progress: progress / 100,
|
|
15
|
+
steps,
|
|
16
|
+
doneIn: null,
|
|
17
|
+
}));
|
|
18
|
+
};
|
|
19
|
+
const options = {
|
|
20
|
+
enableCaching: shouldCache,
|
|
21
|
+
webpackOverride: (_a = remotion_1.Internals.getWebpackOverrideFn()) !== null && _a !== void 0 ? _a : remotion_1.Internals.defaultOverrideFunction,
|
|
22
|
+
};
|
|
23
|
+
const [hash] = bundler_1.BundlerInternals.getConfig('', fullPath, onProgress, options);
|
|
24
|
+
const cacheExistedBefore = bundler_1.BundlerInternals.cacheExists('production', hash);
|
|
25
|
+
if (cacheExistedBefore !== 'does-not-exist' && !shouldCache) {
|
|
14
26
|
log_1.Log.info('🧹 Cache disabled but found. Deleting... ');
|
|
15
|
-
await bundler_1.BundlerInternals.clearCache(
|
|
27
|
+
await bundler_1.BundlerInternals.clearCache();
|
|
28
|
+
}
|
|
29
|
+
if (cacheExistedBefore === 'other-exists' && shouldCache) {
|
|
30
|
+
log_1.Log.info('🧹 Webpack config change detected. Clearing cache... ');
|
|
31
|
+
await bundler_1.BundlerInternals.clearCache();
|
|
16
32
|
}
|
|
17
33
|
const bundleStartTime = Date.now();
|
|
18
34
|
const bundlingProgress = (0, progress_bar_1.createOverwriteableCliOutput)((0, parse_command_line_1.quietFlagProvided)());
|
|
@@ -22,19 +38,19 @@ const bundleOnCli = async ({ fullPath, steps, }) => {
|
|
|
22
38
|
steps,
|
|
23
39
|
doneIn: null,
|
|
24
40
|
}));
|
|
25
|
-
},
|
|
26
|
-
enableCaching: shouldCache,
|
|
27
|
-
webpackOverride: (_a = remotion_1.Internals.getWebpackOverrideFn()) !== null && _a !== void 0 ? _a : remotion_1.Internals.defaultOverrideFunction,
|
|
28
|
-
});
|
|
41
|
+
}, options);
|
|
29
42
|
bundlingProgress.update((0, progress_bar_1.makeBundlingProgress)({
|
|
30
43
|
progress: 1,
|
|
31
44
|
steps,
|
|
32
45
|
doneIn: Date.now() - bundleStartTime,
|
|
33
46
|
}) + '\n');
|
|
34
47
|
log_1.Log.verbose('Bundled under', bundled);
|
|
35
|
-
const cacheExistedAfter = bundler_1.BundlerInternals.cacheExists('production');
|
|
36
|
-
if (cacheExistedAfter
|
|
37
|
-
|
|
48
|
+
const cacheExistedAfter = bundler_1.BundlerInternals.cacheExists('production', hash) === 'exists';
|
|
49
|
+
if (cacheExistedAfter) {
|
|
50
|
+
if (cacheExistedBefore === 'does-not-exist' ||
|
|
51
|
+
cacheExistedBefore === 'other-exists') {
|
|
52
|
+
log_1.Log.info('⚡️ Cached bundle. Subsequent renders will be faster.');
|
|
53
|
+
}
|
|
38
54
|
}
|
|
39
55
|
return bundled;
|
|
40
56
|
};
|
package/dist/upgrade.js
CHANGED
package/dist/versions.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cli",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.4",
|
|
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.4",
|
|
27
|
+
"@remotion/media-utils": "3.1.4",
|
|
28
|
+
"@remotion/player": "3.1.4",
|
|
29
|
+
"@remotion/renderer": "3.1.4",
|
|
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.4",
|
|
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": "cb662e72c635e5e70c5541d85e276ce2f4075099"
|
|
75
75
|
}
|