@remotion/bundler 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/bundle.d.ts +2 -0
- package/dist/bundle.js +19 -1
- package/dist/copy-dir.d.ts +8 -1
- package/dist/copy-dir.js +19 -3
- package/package.json +3 -3
package/dist/bundle.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export declare type LegacyBundleOptions = {
|
|
|
7
7
|
publicPath?: string;
|
|
8
8
|
rootDir?: string;
|
|
9
9
|
publicDir?: string | null;
|
|
10
|
+
onPublicDirCopyProgress?: (bytes: number) => void;
|
|
11
|
+
onSymlinkDetected?: (path: string) => void;
|
|
10
12
|
};
|
|
11
13
|
export declare const getConfig: ({ entryPoint, outDir, resolvedRemotionRoot, onProgress, options, }: {
|
|
12
14
|
outDir: string;
|
package/dist/bundle.js
CHANGED
|
@@ -125,8 +125,26 @@ async function bundle(...args) {
|
|
|
125
125
|
? path_1.default.resolve(resolvedRemotionRoot, options.publicDir)
|
|
126
126
|
: path_1.default.join(resolvedRemotionRoot, 'public');
|
|
127
127
|
const to = path_1.default.join(outDir, 'public');
|
|
128
|
+
let symlinkWarningShown = false;
|
|
129
|
+
const showSymlinkWarning = (ent, src) => {
|
|
130
|
+
if (symlinkWarningShown) {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
const absolutePath = path_1.default.join(src, ent.name);
|
|
134
|
+
if (options.onSymlinkDetected) {
|
|
135
|
+
options.onSymlinkDetected(absolutePath);
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
symlinkWarningShown = true;
|
|
139
|
+
console.warn(`\nFound a symbolic link in the public folder (${absolutePath}). The symlink will be forwarded into the bundle.`);
|
|
140
|
+
};
|
|
128
141
|
if (fs_1.default.existsSync(from)) {
|
|
129
|
-
await (0, copy_dir_1.copyDir)(
|
|
142
|
+
await (0, copy_dir_1.copyDir)({
|
|
143
|
+
src: from,
|
|
144
|
+
dest: to,
|
|
145
|
+
onSymlinkDetected: showSymlinkWarning,
|
|
146
|
+
onProgress: (prog) => { var _a; return (_a = options.onPublicDirCopyProgress) === null || _a === void 0 ? void 0 : _a.call(options, prog); },
|
|
147
|
+
});
|
|
130
148
|
}
|
|
131
149
|
const html = (0, index_html_1.indexHtml)({
|
|
132
150
|
staticHash,
|
package/dist/copy-dir.d.ts
CHANGED
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import fs from 'fs';
|
|
3
|
+
export declare function copyDir({ src, dest, onSymlinkDetected, onProgress, }: {
|
|
4
|
+
src: string;
|
|
5
|
+
dest: string;
|
|
6
|
+
onSymlinkDetected: (entry: fs.Dirent, dir: string) => void;
|
|
7
|
+
onProgress: (bytes: number) => void;
|
|
8
|
+
}): Promise<void>;
|
package/dist/copy-dir.js
CHANGED
|
@@ -6,17 +6,33 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.copyDir = void 0;
|
|
7
7
|
const fs_1 = __importDefault(require("fs"));
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
|
-
async function copyDir(src, dest) {
|
|
9
|
+
async function copyDir({ src, dest, onSymlinkDetected, onProgress, }) {
|
|
10
10
|
await fs_1.default.promises.mkdir(dest, { recursive: true });
|
|
11
11
|
const entries = await fs_1.default.promises.readdir(src, { withFileTypes: true });
|
|
12
|
+
let copied = 0;
|
|
12
13
|
for (const entry of entries) {
|
|
13
14
|
const srcPath = path_1.default.join(src, entry.name);
|
|
14
15
|
const destPath = path_1.default.join(dest, entry.name);
|
|
15
16
|
if (entry.isDirectory()) {
|
|
16
|
-
await copyDir(
|
|
17
|
+
await copyDir({
|
|
18
|
+
src: srcPath,
|
|
19
|
+
dest: destPath,
|
|
20
|
+
onSymlinkDetected,
|
|
21
|
+
onProgress,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
else if (entry.isSymbolicLink()) {
|
|
25
|
+
const realpath = await fs_1.default.promises.realpath(srcPath);
|
|
26
|
+
onSymlinkDetected(entry, src);
|
|
27
|
+
await fs_1.default.promises.symlink(realpath, destPath);
|
|
17
28
|
}
|
|
18
29
|
else {
|
|
19
|
-
await
|
|
30
|
+
const [, { size }] = await Promise.all([
|
|
31
|
+
fs_1.default.promises.copyFile(srcPath, destPath),
|
|
32
|
+
fs_1.default.promises.stat(srcPath),
|
|
33
|
+
]);
|
|
34
|
+
copied += size;
|
|
35
|
+
onProgress(copied);
|
|
20
36
|
}
|
|
21
37
|
}
|
|
22
38
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/bundler",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.3",
|
|
4
4
|
"description": "Bundler for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"css-loader": "5.2.7",
|
|
27
27
|
"esbuild": "0.15.13",
|
|
28
28
|
"react-refresh": "0.9.0",
|
|
29
|
-
"remotion": "3.3.
|
|
29
|
+
"remotion": "3.3.3",
|
|
30
30
|
"style-loader": "2.0.0",
|
|
31
31
|
"webpack": "5.74.0"
|
|
32
32
|
},
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "27db3bbb7b8bd67aa3767e55c5c8f21a8d9fa16b"
|
|
68
68
|
}
|