@remotion/cli 3.3.2 → 3.3.3
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/progress-bar.d.ts +13 -1
- package/dist/progress-bar.js +41 -2
- package/dist/setup-cache.js +52 -5
- package/package.json +7 -7
package/dist/progress-bar.d.ts
CHANGED
|
@@ -6,10 +6,22 @@ export declare const createProgressBar: (quiet: boolean) => {
|
|
|
6
6
|
export declare const createOverwriteableCliOutput: (quiet: boolean) => {
|
|
7
7
|
update: (up: string) => boolean;
|
|
8
8
|
};
|
|
9
|
-
export declare
|
|
9
|
+
export declare type CopyingState = {
|
|
10
|
+
bytes: number;
|
|
11
|
+
doneIn: number | null;
|
|
12
|
+
};
|
|
13
|
+
export declare type BundlingState = {
|
|
10
14
|
progress: number;
|
|
11
15
|
steps: RenderStep[];
|
|
12
16
|
doneIn: number | null;
|
|
17
|
+
};
|
|
18
|
+
export declare type SymbolicLinksState = {
|
|
19
|
+
symlinks: string[];
|
|
20
|
+
};
|
|
21
|
+
export declare const makeBundlingAndCopyProgress: ({ bundling, copying, symLinks, }: {
|
|
22
|
+
bundling: BundlingState;
|
|
23
|
+
copying: CopyingState;
|
|
24
|
+
symLinks: SymbolicLinksState;
|
|
13
25
|
}) => string;
|
|
14
26
|
declare type RenderingProgressInput = {
|
|
15
27
|
frames: number;
|
package/dist/progress-bar.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeRenderingAndStitchingProgress = exports.makeStitchingProgress = exports.makeRenderingProgress = exports.
|
|
3
|
+
exports.makeRenderingAndStitchingProgress = exports.makeStitchingProgress = exports.makeRenderingProgress = exports.makeBundlingAndCopyProgress = exports.createOverwriteableCliOutput = exports.createProgressBar = void 0;
|
|
4
4
|
const renderer_1 = require("@remotion/renderer");
|
|
5
5
|
const ansi_diff_1 = require("./ansi/ansi-diff");
|
|
6
6
|
const chalk_1 = require("./chalk");
|
|
@@ -37,7 +37,46 @@ const makeBundlingProgress = ({ progress, steps, doneIn, }) => [
|
|
|
37
37
|
]
|
|
38
38
|
.filter(truthy_1.truthy)
|
|
39
39
|
.join(' ');
|
|
40
|
-
|
|
40
|
+
const makeCopyingProgress = (options) => {
|
|
41
|
+
// Don't show copy progress lower than 200MB
|
|
42
|
+
if (options.bytes < 1000 * 1000 * 200) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
return [
|
|
46
|
+
' +',
|
|
47
|
+
options.doneIn ? (0, make_progress_bar_1.makeProgressBar)(1) : (0, download_progress_1.getFileSizeDownloadBar)(options.bytes),
|
|
48
|
+
'Copying public dir',
|
|
49
|
+
options.doneIn === null ? null : chalk_1.chalk.gray(`${options.doneIn}ms`),
|
|
50
|
+
]
|
|
51
|
+
.filter(truthy_1.truthy)
|
|
52
|
+
.join(' ');
|
|
53
|
+
};
|
|
54
|
+
const makeSymlinkProgress = (options) => {
|
|
55
|
+
if (options.symlinks.length === 0) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
if (options.symlinks.length === 1) {
|
|
59
|
+
return [
|
|
60
|
+
chalk_1.chalk.gray(` Found a symbolic link in the public folder:`),
|
|
61
|
+
chalk_1.chalk.gray(' ' + options.symlinks[0]),
|
|
62
|
+
chalk_1.chalk.gray(' The symlink will be forwarded in to the bundle.'),
|
|
63
|
+
].join('\n');
|
|
64
|
+
}
|
|
65
|
+
return [
|
|
66
|
+
chalk_1.chalk.gray(` Found ${options.symlinks.length} symbolic links in the public folder.`),
|
|
67
|
+
chalk_1.chalk.gray(' The symlinks will be forwarded in to the bundle.'),
|
|
68
|
+
].join('\n');
|
|
69
|
+
};
|
|
70
|
+
const makeBundlingAndCopyProgress = ({ bundling, copying, symLinks, }) => {
|
|
71
|
+
return [
|
|
72
|
+
makeBundlingProgress(bundling),
|
|
73
|
+
makeCopyingProgress(copying),
|
|
74
|
+
makeSymlinkProgress(symLinks),
|
|
75
|
+
]
|
|
76
|
+
.filter(truthy_1.truthy)
|
|
77
|
+
.join('\n');
|
|
78
|
+
};
|
|
79
|
+
exports.makeBundlingAndCopyProgress = makeBundlingAndCopyProgress;
|
|
41
80
|
const makeRenderingProgress = ({ frames, totalFrames, steps, concurrency, doneIn, }) => {
|
|
42
81
|
const progress = frames / totalFrames;
|
|
43
82
|
return [
|
package/dist/setup-cache.js
CHANGED
|
@@ -24,18 +24,54 @@ exports.bundleOnCliOrTakeServeUrl = bundleOnCliOrTakeServeUrl;
|
|
|
24
24
|
const bundleOnCli = async ({ fullPath, steps, remotionRoot, publicDir, }) => {
|
|
25
25
|
var _a;
|
|
26
26
|
const shouldCache = config_1.ConfigInternals.getWebpackCaching();
|
|
27
|
+
const symlinkState = {
|
|
28
|
+
symlinks: [],
|
|
29
|
+
};
|
|
27
30
|
const onProgress = (progress) => {
|
|
28
|
-
|
|
31
|
+
bundlingState = {
|
|
29
32
|
progress: progress / 100,
|
|
30
33
|
steps,
|
|
31
34
|
doneIn: null,
|
|
35
|
+
};
|
|
36
|
+
bundlingProgress.update((0, progress_bar_1.makeBundlingAndCopyProgress)({
|
|
37
|
+
bundling: bundlingState,
|
|
38
|
+
copying: copyingState,
|
|
39
|
+
symLinks: symlinkState,
|
|
32
40
|
}));
|
|
33
41
|
};
|
|
42
|
+
let copyingState = {
|
|
43
|
+
bytes: 0,
|
|
44
|
+
doneIn: null,
|
|
45
|
+
};
|
|
46
|
+
let copyStart = null;
|
|
47
|
+
const updateProgress = (newline) => {
|
|
48
|
+
bundlingProgress.update((0, progress_bar_1.makeBundlingAndCopyProgress)({
|
|
49
|
+
bundling: bundlingState,
|
|
50
|
+
copying: copyingState,
|
|
51
|
+
symLinks: symlinkState,
|
|
52
|
+
}) + (newline ? '\n' : ''));
|
|
53
|
+
};
|
|
54
|
+
const onPublicDirCopyProgress = (bytes) => {
|
|
55
|
+
if (copyStart === null) {
|
|
56
|
+
copyStart = Date.now();
|
|
57
|
+
}
|
|
58
|
+
copyingState = {
|
|
59
|
+
bytes,
|
|
60
|
+
doneIn: null,
|
|
61
|
+
};
|
|
62
|
+
updateProgress(false);
|
|
63
|
+
};
|
|
64
|
+
const onSymlinkDetected = (absPath) => {
|
|
65
|
+
symlinkState.symlinks.push(absPath);
|
|
66
|
+
updateProgress(false);
|
|
67
|
+
};
|
|
34
68
|
const options = {
|
|
35
69
|
enableCaching: shouldCache,
|
|
36
70
|
webpackOverride: (_a = config_1.ConfigInternals.getWebpackOverrideFn()) !== null && _a !== void 0 ? _a : ((f) => f),
|
|
37
71
|
rootDir: remotionRoot,
|
|
38
72
|
publicDir,
|
|
73
|
+
onPublicDirCopyProgress,
|
|
74
|
+
onSymlinkDetected,
|
|
39
75
|
};
|
|
40
76
|
const [hash] = bundler_1.BundlerInternals.getConfig({
|
|
41
77
|
outDir: '',
|
|
@@ -55,22 +91,33 @@ const bundleOnCli = async ({ fullPath, steps, remotionRoot, publicDir, }) => {
|
|
|
55
91
|
}
|
|
56
92
|
const bundleStartTime = Date.now();
|
|
57
93
|
const bundlingProgress = (0, progress_bar_1.createOverwriteableCliOutput)((0, parse_command_line_1.quietFlagProvided)());
|
|
94
|
+
let bundlingState = {
|
|
95
|
+
progress: 0,
|
|
96
|
+
steps,
|
|
97
|
+
doneIn: null,
|
|
98
|
+
};
|
|
58
99
|
const bundled = await (0, bundler_1.bundle)({
|
|
59
100
|
entryPoint: fullPath,
|
|
60
101
|
onProgress: (progress) => {
|
|
61
|
-
|
|
102
|
+
bundlingState = {
|
|
62
103
|
progress: progress / 100,
|
|
63
104
|
steps,
|
|
64
105
|
doneIn: null,
|
|
65
|
-
}
|
|
106
|
+
};
|
|
107
|
+
updateProgress(false);
|
|
66
108
|
},
|
|
67
109
|
...options,
|
|
68
110
|
});
|
|
69
|
-
|
|
111
|
+
bundlingState = {
|
|
70
112
|
progress: 1,
|
|
71
113
|
steps,
|
|
72
114
|
doneIn: Date.now() - bundleStartTime,
|
|
73
|
-
}
|
|
115
|
+
};
|
|
116
|
+
copyingState = {
|
|
117
|
+
...copyingState,
|
|
118
|
+
doneIn: copyStart ? Date.now() - copyStart : null,
|
|
119
|
+
};
|
|
120
|
+
updateProgress(true);
|
|
74
121
|
log_1.Log.verbose('Bundled under', bundled);
|
|
75
122
|
const cacheExistedAfter = bundler_1.BundlerInternals.cacheExists(remotionRoot, 'production', hash) === 'exists';
|
|
76
123
|
if (cacheExistedAfter) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cli",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.3",
|
|
4
4
|
"description": "CLI for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -22,16 +22,16 @@
|
|
|
22
22
|
"author": "Jonny Burger <jonny@remotion.dev>",
|
|
23
23
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@remotion/bundler": "3.3.
|
|
26
|
-
"@remotion/media-utils": "3.3.
|
|
27
|
-
"@remotion/player": "3.3.
|
|
28
|
-
"@remotion/renderer": "3.3.
|
|
25
|
+
"@remotion/bundler": "3.3.3",
|
|
26
|
+
"@remotion/media-utils": "3.3.3",
|
|
27
|
+
"@remotion/player": "3.3.3",
|
|
28
|
+
"@remotion/renderer": "3.3.3",
|
|
29
29
|
"better-opn": "2.1.1",
|
|
30
30
|
"dotenv": "9.0.2",
|
|
31
31
|
"memfs": "3.4.3",
|
|
32
32
|
"minimist": "1.2.6",
|
|
33
33
|
"prompts": "2.4.1",
|
|
34
|
-
"remotion": "3.3.
|
|
34
|
+
"remotion": "3.3.3",
|
|
35
35
|
"semver": "7.3.5",
|
|
36
36
|
"source-map": "0.6.1"
|
|
37
37
|
},
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"publishConfig": {
|
|
73
73
|
"access": "public"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "27db3bbb7b8bd67aa3767e55c5c8f21a8d9fa16b"
|
|
76
76
|
}
|