@remotion/bundler 4.0.14 → 4.0.15
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/bundle.js +1 -1
- package/dist/copy-dir.d.ts +3 -3
- package/dist/copy-dir.js +8 -7
- package/package.json +2 -2
package/dist/bundle.js
CHANGED
|
@@ -186,7 +186,7 @@ async function bundle(...args) {
|
|
|
186
186
|
dest: to,
|
|
187
187
|
onSymlinkDetected: showSymlinkWarning,
|
|
188
188
|
onProgress: (prog) => { var _a; return (_a = options.onPublicDirCopyProgress) === null || _a === void 0 ? void 0 : _a.call(options, prog); },
|
|
189
|
-
|
|
189
|
+
copiedBytes: 0,
|
|
190
190
|
lastReportedProgress: 0,
|
|
191
191
|
});
|
|
192
192
|
}
|
package/dist/copy-dir.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import fs from 'node:fs';
|
|
3
|
-
export declare function copyDir({ src, dest, onSymlinkDetected, onProgress,
|
|
3
|
+
export declare function copyDir({ src, dest, onSymlinkDetected, onProgress, copiedBytes, lastReportedProgress, }: {
|
|
4
4
|
src: string;
|
|
5
5
|
dest: string;
|
|
6
6
|
onSymlinkDetected: (entry: fs.Dirent, dir: string) => void;
|
|
7
7
|
onProgress: (bytes: number) => void;
|
|
8
|
-
|
|
8
|
+
copiedBytes: number;
|
|
9
9
|
lastReportedProgress: number;
|
|
10
|
-
}): Promise<
|
|
10
|
+
}): Promise<number>;
|
package/dist/copy-dir.js
CHANGED
|
@@ -6,19 +6,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.copyDir = void 0;
|
|
7
7
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
8
8
|
const node_path_1 = __importDefault(require("node:path"));
|
|
9
|
-
async function copyDir({ src, dest, onSymlinkDetected, onProgress,
|
|
9
|
+
async function copyDir({ src, dest, onSymlinkDetected, onProgress, copiedBytes = 0, lastReportedProgress = 0, }) {
|
|
10
10
|
await node_fs_1.default.promises.mkdir(dest, { recursive: true });
|
|
11
11
|
const entries = await node_fs_1.default.promises.readdir(src, { withFileTypes: true });
|
|
12
12
|
for (const entry of entries) {
|
|
13
13
|
const srcPath = node_path_1.default.join(src, entry.name);
|
|
14
14
|
const destPath = node_path_1.default.join(dest, entry.name);
|
|
15
15
|
if (entry.isDirectory()) {
|
|
16
|
-
await copyDir({
|
|
16
|
+
copiedBytes = await copyDir({
|
|
17
17
|
src: srcPath,
|
|
18
18
|
dest: destPath,
|
|
19
19
|
onSymlinkDetected,
|
|
20
20
|
onProgress,
|
|
21
|
-
|
|
21
|
+
copiedBytes,
|
|
22
22
|
lastReportedProgress,
|
|
23
23
|
});
|
|
24
24
|
}
|
|
@@ -32,12 +32,13 @@ async function copyDir({ src, dest, onSymlinkDetected, onProgress, copied = 0, l
|
|
|
32
32
|
node_fs_1.default.promises.copyFile(srcPath, destPath),
|
|
33
33
|
node_fs_1.default.promises.stat(srcPath),
|
|
34
34
|
]);
|
|
35
|
-
|
|
36
|
-
if (
|
|
37
|
-
onProgress(
|
|
38
|
-
lastReportedProgress =
|
|
35
|
+
copiedBytes += size;
|
|
36
|
+
if (copiedBytes - lastReportedProgress > 1024 * 1024 * 10) {
|
|
37
|
+
onProgress(copiedBytes);
|
|
38
|
+
lastReportedProgress = copiedBytes;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
+
return copiedBytes;
|
|
42
43
|
}
|
|
43
44
|
exports.copyDir = copyDir;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/bundler",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.15",
|
|
4
4
|
"description": "Bundler for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"react-refresh": "0.9.0",
|
|
23
23
|
"style-loader": "2.0.0",
|
|
24
24
|
"webpack": "5.83.1",
|
|
25
|
-
"remotion": "4.0.
|
|
25
|
+
"remotion": "4.0.15"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"react": ">=16.8.0",
|