@remotion/bundler 3.3.59 → 3.3.60
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.
|
@@ -127,10 +127,10 @@ function scheduleUpdate() {
|
|
|
127
127
|
}
|
|
128
128
|
};
|
|
129
129
|
// Only trigger refresh if the webpack HMR state is idle
|
|
130
|
-
if (((_a =
|
|
130
|
+
if (((_a = __webpack_module__.hot) === null || _a === void 0 ? void 0 : _a.status()) === 'idle') {
|
|
131
131
|
return;
|
|
132
132
|
}
|
|
133
|
-
(_b =
|
|
133
|
+
(_b = __webpack_module__.hot) === null || _b === void 0 ? void 0 : _b.addStatusHandler((status) => {
|
|
134
134
|
if (status === 'idle') {
|
|
135
135
|
execute();
|
|
136
136
|
}
|
|
@@ -31,5 +31,99 @@
|
|
|
31
31
|
* SOFTWARE.
|
|
32
32
|
*/
|
|
33
33
|
import type { LoaderDefinition } from 'webpack';
|
|
34
|
+
declare global {
|
|
35
|
+
const __webpack_hash__: unknown;
|
|
36
|
+
interface HotNotifierInfo {
|
|
37
|
+
type: 'self-declined' | 'declined' | 'unaccepted' | 'accepted' | 'disposed' | 'accept-errored' | 'self-accept-errored' | 'self-accept-error-handler-errored';
|
|
38
|
+
/**
|
|
39
|
+
* The module in question.
|
|
40
|
+
*/
|
|
41
|
+
moduleId: number;
|
|
42
|
+
/**
|
|
43
|
+
* For errors: the module id owning the accept handler.
|
|
44
|
+
*/
|
|
45
|
+
dependencyId?: number | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* For declined/accepted/unaccepted: the chain from where the update was propagated.
|
|
48
|
+
*/
|
|
49
|
+
chain?: number[] | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* For declined: the module id of the declining parent
|
|
52
|
+
*/
|
|
53
|
+
parentId?: number | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* For accepted: the modules that are outdated and will be disposed
|
|
56
|
+
*/
|
|
57
|
+
outdatedModules?: number[] | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* For accepted: The location of accept handlers that will handle the update
|
|
60
|
+
*/
|
|
61
|
+
outdatedDependencies?: {
|
|
62
|
+
[dependencyId: number]: number[];
|
|
63
|
+
} | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* For errors: the thrown error
|
|
66
|
+
*/
|
|
67
|
+
error?: Error | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* For self-accept-error-handler-errored: the error thrown by the module
|
|
70
|
+
* before the error handler tried to handle it.
|
|
71
|
+
*/
|
|
72
|
+
originalError?: Error | undefined;
|
|
73
|
+
}
|
|
74
|
+
interface AcceptOptions {
|
|
75
|
+
/**
|
|
76
|
+
* If true the update process continues even if some modules are not accepted (and would bubble to the entry point).
|
|
77
|
+
*/
|
|
78
|
+
ignoreUnaccepted?: boolean | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* Ignore changes made to declined modules.
|
|
81
|
+
*/
|
|
82
|
+
ignoreDeclined?: boolean | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Ignore errors throw in accept handlers, error handlers and while reevaluating module.
|
|
85
|
+
*/
|
|
86
|
+
ignoreErrored?: boolean | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* Notifier for declined modules.
|
|
89
|
+
*/
|
|
90
|
+
onDeclined?: ((info: HotNotifierInfo) => void) | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* Notifier for unaccepted modules.
|
|
93
|
+
*/
|
|
94
|
+
onUnaccepted?: ((info: HotNotifierInfo) => void) | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* Notifier for accepted modules.
|
|
97
|
+
*/
|
|
98
|
+
onAccepted?: ((info: HotNotifierInfo) => void) | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* Notifier for disposed modules.
|
|
101
|
+
*/
|
|
102
|
+
onDisposed?: ((info: HotNotifierInfo) => void) | undefined;
|
|
103
|
+
/**
|
|
104
|
+
* Notifier for errors.
|
|
105
|
+
*/
|
|
106
|
+
onErrored?: ((info: HotNotifierInfo) => void) | undefined;
|
|
107
|
+
/**
|
|
108
|
+
* Indicates that apply() is automatically called by check function
|
|
109
|
+
*/
|
|
110
|
+
autoApply?: boolean | undefined;
|
|
111
|
+
}
|
|
112
|
+
const __webpack_module__: {
|
|
113
|
+
id: string;
|
|
114
|
+
exports: unknown;
|
|
115
|
+
hot: {
|
|
116
|
+
accept: () => void;
|
|
117
|
+
dispose: (onDispose: (data: Record<string, unknown>) => void) => void;
|
|
118
|
+
invalidate: () => void;
|
|
119
|
+
data?: Record<string, unknown>;
|
|
120
|
+
addStatusHandler(callback: (status: string) => void): void;
|
|
121
|
+
status(): string;
|
|
122
|
+
apply(options?: AcceptOptions): Promise<ModuleId[]>;
|
|
123
|
+
check(autoApply?: boolean): Promise<null | ModuleId[]>;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
type ModuleId = string | number;
|
|
127
|
+
}
|
|
34
128
|
declare const ReactRefreshLoader: LoaderDefinition;
|
|
35
129
|
export default ReactRefreshLoader;
|
|
@@ -12,34 +12,29 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
// This function gets unwrapped into global scope, which is why we don't invert
|
|
13
13
|
// if-blocks. Also, you cannot use `return`.
|
|
14
14
|
function RefreshModuleRuntime() {
|
|
15
|
+
var _a, _b;
|
|
15
16
|
// Legacy CSS implementations will `eval` browser code in a Node.js context
|
|
16
17
|
// to extract CSS. For backwards compatibility, we need to check we're in a
|
|
17
18
|
// browser context before continuing.
|
|
18
19
|
if (typeof self !== 'undefined' &&
|
|
19
20
|
// AMP / No-JS mode does not inject these helpers:
|
|
20
21
|
'$RefreshHelpers$' in self) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const currentExports = module.__proto__.exports;
|
|
24
|
-
let prevExports = null;
|
|
25
|
-
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
|
26
|
-
if (module.hot && module.hot.data && module.hot.data.prevExports) {
|
|
27
|
-
prevExports = module.hot.data.prevExports;
|
|
28
|
-
}
|
|
22
|
+
const currentExports = __webpack_module__.exports;
|
|
23
|
+
const prevExports = (_b = (_a = __webpack_module__.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;
|
|
29
24
|
// This cannot happen in MainTemplate because the exports mismatch between
|
|
30
25
|
// templating and execution.
|
|
31
|
-
self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports,
|
|
26
|
+
self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, __webpack_module__.id);
|
|
32
27
|
// A module can be accepted automatically based on its exports, e.g. when
|
|
33
28
|
// it is a Refresh Boundary.
|
|
34
29
|
if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {
|
|
35
30
|
// Save the previous exports on update so we can compare the boundary
|
|
36
31
|
// signatures.
|
|
37
|
-
|
|
32
|
+
__webpack_module__.hot.dispose((data) => {
|
|
38
33
|
data.prevExports = currentExports;
|
|
39
34
|
});
|
|
40
35
|
// Unconditionally accept an update to this module, we'll check if it's
|
|
41
36
|
// still a Refresh Boundary later.
|
|
42
|
-
|
|
37
|
+
__webpack_module__.hot.accept();
|
|
43
38
|
// This field is set when the previous version of this module was a
|
|
44
39
|
// Refresh Boundary, letting us know we need to check for invalidation or
|
|
45
40
|
// enqueue an update.
|
|
@@ -52,8 +47,7 @@ function RefreshModuleRuntime() {
|
|
|
52
47
|
// re-render. Similarly, if you convert a class component to a
|
|
53
48
|
// function, we want to invalidate the boundary.
|
|
54
49
|
if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {
|
|
55
|
-
|
|
56
|
-
module.hot.invalidate();
|
|
50
|
+
__webpack_module__.hot.invalidate();
|
|
57
51
|
}
|
|
58
52
|
else {
|
|
59
53
|
self.$RefreshHelpers$.scheduleUpdate();
|
|
@@ -67,8 +61,7 @@ function RefreshModuleRuntime() {
|
|
|
67
61
|
// because we already accepted this update (accidental side effect).
|
|
68
62
|
const isNoLongerABoundary = prevExports !== null;
|
|
69
63
|
if (isNoLongerABoundary) {
|
|
70
|
-
|
|
71
|
-
module.hot.invalidate();
|
|
64
|
+
__webpack_module__.hot.invalidate();
|
|
72
65
|
}
|
|
73
66
|
}
|
|
74
67
|
}
|
|
@@ -59,8 +59,31 @@ const AvailableCompositions = () => {
|
|
|
59
59
|
return (0, jsx_runtime_1.jsx)("li", { children: c.id }, c.id);
|
|
60
60
|
}) })] }));
|
|
61
61
|
};
|
|
62
|
+
const TestCORS = () => {
|
|
63
|
+
const [serveUrl, setServeUrl] = (0, react_1.useState)('');
|
|
64
|
+
const [result, setResult] = (0, react_1.useState)('');
|
|
65
|
+
const handleServeUrl = (0, react_1.useCallback)((e) => {
|
|
66
|
+
setServeUrl(e.target.value);
|
|
67
|
+
}, []);
|
|
68
|
+
const isCORSWorking = (0, react_1.useCallback)(async (e) => {
|
|
69
|
+
e.preventDefault();
|
|
70
|
+
try {
|
|
71
|
+
const response = await fetch(serveUrl, { mode: 'cors' });
|
|
72
|
+
if (response.ok) {
|
|
73
|
+
setResult(`CORS is enabled on this URL: ${serveUrl}`);
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
setResult('URL does not support CORS - See DevTools console for more details');
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
catch (error) {
|
|
80
|
+
setResult('URL does not support CORS - See DevTools console for more details');
|
|
81
|
+
}
|
|
82
|
+
}, [serveUrl]);
|
|
83
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("p", { children: ["Quickly test if a URL is supported being loaded on origin", ' ', (0, jsx_runtime_1.jsx)("code", { children: window.location.origin }), ". Enter the URL of an asset below."] }), result ? (0, jsx_runtime_1.jsx)("p", { className: "result", children: result }) : null, (0, jsx_runtime_1.jsxs)("form", { onSubmit: isCORSWorking, children: [(0, jsx_runtime_1.jsx)("label", { htmlFor: "serveurl", children: (0, jsx_runtime_1.jsx)("input", { placeholder: "Enter URL", type: "text", name: "serveurl", value: serveUrl, onChange: handleServeUrl }) }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("button", { type: "submit", children: "Test CORS" })] })] }));
|
|
84
|
+
};
|
|
62
85
|
const Homepage = () => {
|
|
63
86
|
const url = window.location.origin + window.location.pathname;
|
|
64
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)("h1", { children: "Remotion Bundle" }), "This is a website which contains a bundled Remotion video. You can render videos based on this URL.", (0, jsx_runtime_1.jsx)("h2", { children: "Available compositions" }), (0, jsx_runtime_1.jsx)(AvailableCompositions, {}), (0, jsx_runtime_1.jsx)("h2", { children: "How to render" }), "Locally: ", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)("div", { style: pre, children: ["npx remotion render ", url, " ", '<comp-name> <output-location>'] }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), "With Remotion Lambda: ", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)("div", { style: pre, children: ["npx remotion lambda render ", url, " ", '<comp-name>'] }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)("p", { children: ["You can also render still images, and use the Node.JS APIs", ' ', (0, jsx_runtime_1.jsx)("code", { children: "getCompositions()" }), ", ", (0, jsx_runtime_1.jsx)("code", { children: "renderMedia()" }), ",", ' ', (0, jsx_runtime_1.jsx)("code", { children: "renderMediaOnLambda()" }), ", ", (0, jsx_runtime_1.jsx)("code", { children: "renderStill()" }), " and", ' ', (0, jsx_runtime_1.jsx)("code", { children: "renderStillOnLambda()" }), " with this URL."] }), (0, jsx_runtime_1.jsxs)("p", { children: ["Visit", ' ', (0, jsx_runtime_1.jsx)("a", { href: "https://remotion.dev/docs", target: "_blank", children: "remotion.dev/docs" }), ' ', "to read the documentation."] })] }));
|
|
87
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)("h1", { children: "Remotion Bundle" }), "This is a website which contains a bundled Remotion video. You can render videos based on this URL.", (0, jsx_runtime_1.jsx)("h2", { children: "Available compositions" }), (0, jsx_runtime_1.jsx)(AvailableCompositions, {}), (0, jsx_runtime_1.jsx)("h2", { children: "How to render" }), "Locally: ", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)("div", { style: pre, children: ["npx remotion render ", url, " ", '<comp-name> <output-location>'] }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), "With Remotion Lambda: ", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)("div", { style: pre, children: ["npx remotion lambda render ", url, " ", '<comp-name>'] }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)("p", { children: ["You can also render still images, and use the Node.JS APIs", ' ', (0, jsx_runtime_1.jsx)("code", { children: "getCompositions()" }), ", ", (0, jsx_runtime_1.jsx)("code", { children: "renderMedia()" }), ",", ' ', (0, jsx_runtime_1.jsx)("code", { children: "renderMediaOnLambda()" }), ", ", (0, jsx_runtime_1.jsx)("code", { children: "renderStill()" }), " and", ' ', (0, jsx_runtime_1.jsx)("code", { children: "renderStillOnLambda()" }), " with this URL."] }), (0, jsx_runtime_1.jsxs)("p", { children: ["Visit", ' ', (0, jsx_runtime_1.jsx)("a", { href: "https://remotion.dev/docs", target: "_blank", children: "remotion.dev/docs" }), ' ', "to read the documentation."] }), (0, jsx_runtime_1.jsx)("h2", { children: "CORS testing tool" }), (0, jsx_runtime_1.jsx)(TestCORS, {}), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {})] }));
|
|
65
88
|
};
|
|
66
89
|
exports.Homepage = Homepage;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/bundler",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.60",
|
|
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.60",
|
|
30
30
|
"style-loader": "2.0.0",
|
|
31
31
|
"webpack": "5.74.0"
|
|
32
32
|
},
|
|
@@ -39,7 +39,6 @@
|
|
|
39
39
|
"@types/node": "^16.7.5",
|
|
40
40
|
"@types/react": "18.0.26",
|
|
41
41
|
"@types/react-dom": "18.0.10",
|
|
42
|
-
"@types/webpack-env": "^1.16.0",
|
|
43
42
|
"@typescript-eslint/eslint-plugin": "5.18.0",
|
|
44
43
|
"@typescript-eslint/parser": "5.18.0",
|
|
45
44
|
"eslint": "8.25.0",
|
|
@@ -64,5 +63,5 @@
|
|
|
64
63
|
"publishConfig": {
|
|
65
64
|
"access": "public"
|
|
66
65
|
},
|
|
67
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "60797b0861ef1017cec53ba656214cbc10db011b"
|
|
68
67
|
}
|