@remotion/bundler 3.3.44 → 3.3.51
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 -1
- package/dist/bundle.js +38 -1
- package/dist/homepage/homepage.js +6 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +1 -1
- package/dist/types.d.ts +3 -0
- package/dist/types.js +2 -0
- package/dist/webpack-config.d.ts +1 -1
- package/package.json +3 -3
package/dist/bundle.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { WebpackOverrideFn } from 'remotion';
|
|
2
1
|
import webpack from 'webpack';
|
|
2
|
+
import type { WebpackOverrideFn } from './types';
|
|
3
3
|
export declare type LegacyBundleOptions = {
|
|
4
4
|
webpackOverride?: WebpackOverrideFn;
|
|
5
5
|
outDir?: string;
|
|
@@ -20,6 +20,7 @@ export declare const getConfig: ({ entryPoint, outDir, resolvedRemotionRoot, onP
|
|
|
20
20
|
export declare type BundleOptions = {
|
|
21
21
|
entryPoint: string;
|
|
22
22
|
onProgress?: (progress: number) => void;
|
|
23
|
+
ignoreRegisterRootWarning?: boolean;
|
|
23
24
|
} & LegacyBundleOptions;
|
|
24
25
|
declare type Arguments = [options: BundleOptions] | [
|
|
25
26
|
entryPoint: string,
|
package/dist/bundle.js
CHANGED
|
@@ -1,10 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
27
|
};
|
|
5
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
29
|
exports.bundle = exports.getConfig = void 0;
|
|
7
|
-
const fs_1 =
|
|
30
|
+
const fs_1 = __importStar(require("fs"));
|
|
8
31
|
const os_1 = __importDefault(require("os"));
|
|
9
32
|
const path_1 = __importDefault(require("path"));
|
|
10
33
|
const util_1 = require("util");
|
|
@@ -86,11 +109,25 @@ const findClosestPackageJsonFolder = (currentDir) => {
|
|
|
86
109
|
}
|
|
87
110
|
return null;
|
|
88
111
|
};
|
|
112
|
+
const validateEntryPoint = async (entryPoint) => {
|
|
113
|
+
const contents = await fs_1.promises.readFile(entryPoint, 'utf8');
|
|
114
|
+
if (!contents.includes('registerRoot')) {
|
|
115
|
+
throw new Error([
|
|
116
|
+
`You passed ${entryPoint} as your entry point, but this file does not contain "registerRoot".`,
|
|
117
|
+
'You should use the file that calls registerRoot() as the entry point.',
|
|
118
|
+
'To ignore this error, pass "ignoreRegisterRootWarning" to bundle().',
|
|
119
|
+
'This error cannot be ignored on the CLI.',
|
|
120
|
+
].join(' '));
|
|
121
|
+
}
|
|
122
|
+
};
|
|
89
123
|
async function bundle(...args) {
|
|
90
124
|
var _a, _b, _c, _d;
|
|
91
125
|
const actualArgs = convertArgumentsIntoOptions(args);
|
|
92
126
|
const entryPoint = path_1.default.resolve(process.cwd(), actualArgs.entryPoint);
|
|
93
127
|
const resolvedRemotionRoot = (_b = (_a = actualArgs === null || actualArgs === void 0 ? void 0 : actualArgs.rootDir) !== null && _a !== void 0 ? _a : findClosestPackageJsonFolder(entryPoint)) !== null && _b !== void 0 ? _b : process.cwd();
|
|
128
|
+
if (!actualArgs.ignoreRegisterRootWarning) {
|
|
129
|
+
await validateEntryPoint(entryPoint);
|
|
130
|
+
}
|
|
94
131
|
const outDir = await prepareOutDir((_c = actualArgs === null || actualArgs === void 0 ? void 0 : actualArgs.outDir) !== null && _c !== void 0 ? _c : null);
|
|
95
132
|
// The config might use an override which might use
|
|
96
133
|
// `process.cwd()`. The context should always be the Remotion root.
|
|
@@ -26,10 +26,14 @@ const pre = {
|
|
|
26
26
|
const AvailableCompositions = () => {
|
|
27
27
|
const [comps, setComps] = (0, react_1.useState)(null);
|
|
28
28
|
(0, react_1.useEffect)(() => {
|
|
29
|
+
if ((0, bundle_mode_1.getBundleMode)().type !== 'evaluation') {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
29
32
|
let timeout = null;
|
|
30
33
|
const check = () => {
|
|
31
34
|
if (window.ready === true) {
|
|
32
|
-
|
|
35
|
+
const newComps = window.getStaticCompositions();
|
|
36
|
+
setComps(newComps);
|
|
33
37
|
}
|
|
34
38
|
else {
|
|
35
39
|
timeout = setTimeout(check, 250);
|
|
@@ -50,7 +54,7 @@ const AvailableCompositions = () => {
|
|
|
50
54
|
return ((0, jsx_runtime_1.jsx)("button", { type: "button", onClick: showComps, children: "Click here to see a list of available compositions." }));
|
|
51
55
|
}
|
|
52
56
|
return ((0, jsx_runtime_1.jsxs)("div", { children: [comps === null ? (0, jsx_runtime_1.jsx)("p", { children: "Loading compositions..." }) : null, (0, jsx_runtime_1.jsx)("ul", { children: comps === null
|
|
53
|
-
?
|
|
57
|
+
? []
|
|
54
58
|
: comps.map((c) => {
|
|
55
59
|
return (0, jsx_runtime_1.jsx)("li", { children: c.id }, c.id);
|
|
56
60
|
}) })] }));
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { WebpackOverrideFn } from './types';
|
|
1
2
|
import esbuild = require('esbuild');
|
|
2
3
|
import webpack = require('webpack');
|
|
3
4
|
export declare const BundlerInternals: {
|
|
@@ -7,7 +8,7 @@ export declare const BundlerInternals: {
|
|
|
7
8
|
userDefinedComponent: string;
|
|
8
9
|
outDir: string;
|
|
9
10
|
environment: "development" | "production";
|
|
10
|
-
webpackOverride:
|
|
11
|
+
webpackOverride: WebpackOverrideFn;
|
|
11
12
|
onProgress?: ((f: number) => void) | undefined;
|
|
12
13
|
enableCaching?: boolean | undefined;
|
|
13
14
|
envVariables: Record<string, string>;
|
|
@@ -48,5 +49,10 @@ export declare const BundlerInternals: {
|
|
|
48
49
|
}) => import("remotion").StaticFile[];
|
|
49
50
|
};
|
|
50
51
|
export { bundle, BundleOptions, LegacyBundleOptions } from './bundle';
|
|
52
|
+
export { WebpackConfiguration, WebpackOverrideFn } from './types';
|
|
51
53
|
export { webpack };
|
|
52
|
-
|
|
54
|
+
declare global {
|
|
55
|
+
interface RemotionBundlingOptions {
|
|
56
|
+
readonly overrideWebpackConfig: (f: WebpackOverrideFn) => void;
|
|
57
|
+
}
|
|
58
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.webpack = exports.bundle = exports.BundlerInternals = void 0;
|
|
4
4
|
const bundle_1 = require("./bundle");
|
|
5
5
|
const index_html_1 = require("./index-html");
|
|
6
|
+
const read_recursively_1 = require("./read-recursively");
|
|
6
7
|
const webpack_cache_1 = require("./webpack-cache");
|
|
7
8
|
const webpack_config_1 = require("./webpack-config");
|
|
8
9
|
const esbuild = require("esbuild");
|
|
9
10
|
const webpack = require("webpack");
|
|
10
11
|
exports.webpack = webpack;
|
|
11
|
-
const read_recursively_1 = require("./read-recursively");
|
|
12
12
|
exports.BundlerInternals = {
|
|
13
13
|
esbuild,
|
|
14
14
|
webpackConfig: webpack_config_1.webpackConfig,
|
package/dist/types.d.ts
ADDED
package/dist/types.js
ADDED
package/dist/webpack-config.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { WebpackConfiguration, WebpackOverrideFn } from '
|
|
1
|
+
import type { WebpackConfiguration, WebpackOverrideFn } from './types';
|
|
2
2
|
export declare const webpackConfig: ({ entry, userDefinedComponent, outDir, environment, webpackOverride, onProgress, enableCaching, envVariables, maxTimelineTracks, entryPoints, remotionRoot, keyboardShortcutsEnabled, poll, }: {
|
|
3
3
|
entry: string;
|
|
4
4
|
userDefinedComponent: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/bundler",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.51",
|
|
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.16.12",
|
|
28
28
|
"react-refresh": "0.9.0",
|
|
29
|
-
"remotion": "3.3.
|
|
29
|
+
"remotion": "3.3.51",
|
|
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": "be64134aece51abd6c63e644702517c868d6c8d0"
|
|
68
68
|
}
|