@remotion/bundler 4.0.0-fastlambda.8 → 4.0.0-lambda.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 +7 -0
- package/dist/bundle.js +77 -0
- package/dist/dev-middleware/compatible-api.d.ts +1 -0
- package/dist/dev-middleware/is-color-supported.js +5 -1
- package/dist/dev-middleware/range-parser.d.ts +1 -1
- package/dist/error-overlay/react-overlay/utils/open-in-editor.js +5 -1
- package/dist/error-overlay/remotion-overlay/AskOnDiscord.js +1 -1
- package/dist/error-overlay/remotion-overlay/Button.js +1 -1
- package/dist/error-overlay/remotion-overlay/CodeFrame.js +2 -2
- package/dist/error-overlay/remotion-overlay/DismissButton.js +1 -1
- package/dist/error-overlay/remotion-overlay/ErrorDisplay.js +2 -2
- package/dist/error-overlay/remotion-overlay/ErrorLoader.js +4 -4
- package/dist/error-overlay/remotion-overlay/ErrorTitle.js +1 -1
- package/dist/error-overlay/remotion-overlay/OpenInEditor.js +1 -1
- package/dist/error-overlay/remotion-overlay/Overlay.js +1 -1
- package/dist/error-overlay/remotion-overlay/SearchGitHubIssues.js +1 -1
- package/dist/error-overlay/remotion-overlay/StackFrame.js +2 -2
- package/dist/error-overlay/remotion-overlay/Symbolicating.js +1 -1
- package/dist/error-overlay/remotion-overlay/carets.d.ts +0 -1
- package/dist/error-overlay/remotion-overlay/carets.js +2 -2
- package/dist/error-overlay/remotion-overlay/index.js +2 -2
- package/dist/get-port.js +20 -23
- package/dist/homepage/homepage.d.ts +0 -1
- package/dist/homepage/homepage.js +5 -6
- package/dist/hot-middleware/process-update.js +2 -2
- package/dist/index-html.d.ts +1 -0
- package/dist/index-html.js +40 -0
- package/dist/index.d.ts +18 -19
- package/dist/index.js +10 -16
- package/dist/json-parser.d.ts +7 -0
- package/dist/json-parser.js +177 -0
- package/dist/p-limit.d.ts +1 -0
- package/dist/p-limit.js +57 -0
- package/dist/read.d.ts +6 -0
- package/dist/read.js +183 -0
- package/dist/renderEntry.js +51 -38
- package/dist/routes.d.ts +8 -0
- package/dist/routes.js +122 -0
- package/dist/serve-static.d.ts +26 -0
- package/dist/serve-static.js +72 -0
- package/dist/setup-environment.js +0 -1
- package/dist/start-server-pure.d.ts +8 -0
- package/dist/start-server-pure.js +68 -0
- package/dist/start-server.d.ts +6 -6
- package/dist/start-server.js +4 -4
- package/dist/static-server.d.ts +0 -0
- package/dist/static-server.js +1 -0
- package/dist/webpack-config.d.ts +2 -1
- package/dist/webpack-config.js +11 -21
- package/package.json +4 -18
- package/web/favicon.png +0 -0
package/dist/routes.js
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.handleRoutes = exports.handleFavicon = exports.handleOpenInEditor = exports.handleFileSource = exports.handleProjectInfo = exports.handleFallback = exports.handleUpdate = void 0;
|
|
7
|
+
const fs_1 = require("fs");
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
const url_1 = require("url");
|
|
10
|
+
const get_file_source_1 = require("./error-overlay/react-overlay/utils/get-file-source");
|
|
11
|
+
const open_in_editor_1 = require("./error-overlay/react-overlay/utils/open-in-editor");
|
|
12
|
+
const project_info_1 = require("./project-info");
|
|
13
|
+
const static_preview_1 = require("./static-preview");
|
|
14
|
+
const update_available_1 = require("./update-available");
|
|
15
|
+
const handleUpdate = async (_, response) => {
|
|
16
|
+
const data = await (0, update_available_1.isUpdateAvailableWithTimeout)();
|
|
17
|
+
response.setHeader('content-type', 'application/json');
|
|
18
|
+
response.writeHead(200);
|
|
19
|
+
response.end(JSON.stringify(data));
|
|
20
|
+
};
|
|
21
|
+
exports.handleUpdate = handleUpdate;
|
|
22
|
+
const editorGuess = (0, open_in_editor_1.guessEditor)();
|
|
23
|
+
const handleFallback = async (hash, _, response) => {
|
|
24
|
+
const edit = await editorGuess;
|
|
25
|
+
const displayName = (0, open_in_editor_1.getDisplayNameForEditor)(edit[0]);
|
|
26
|
+
response.setHeader('content-type', 'text/html');
|
|
27
|
+
response.writeHead(200);
|
|
28
|
+
response.end((0, static_preview_1.indexHtml)(hash, '/', displayName));
|
|
29
|
+
};
|
|
30
|
+
exports.handleFallback = handleFallback;
|
|
31
|
+
const handleProjectInfo = async (_, response) => {
|
|
32
|
+
const data = await (0, project_info_1.getProjectInfo)();
|
|
33
|
+
response.setHeader('content-type', 'application/json');
|
|
34
|
+
response.writeHead(200);
|
|
35
|
+
response.end(JSON.stringify(data));
|
|
36
|
+
};
|
|
37
|
+
exports.handleProjectInfo = handleProjectInfo;
|
|
38
|
+
const handleFileSource = async (search, _, response) => {
|
|
39
|
+
if (!search.startsWith('?')) {
|
|
40
|
+
throw new Error('query must start with ?');
|
|
41
|
+
}
|
|
42
|
+
const query = new url_1.URLSearchParams(search);
|
|
43
|
+
const f = query.get('f');
|
|
44
|
+
if (typeof f !== 'string') {
|
|
45
|
+
throw new Error('must pass `f` parameter');
|
|
46
|
+
}
|
|
47
|
+
const data = await (0, get_file_source_1.getFileSource)(decodeURIComponent(f));
|
|
48
|
+
response.writeHead(200);
|
|
49
|
+
response.write(data);
|
|
50
|
+
return response.end();
|
|
51
|
+
};
|
|
52
|
+
exports.handleFileSource = handleFileSource;
|
|
53
|
+
const handleOpenInEditor = async (req, res) => {
|
|
54
|
+
try {
|
|
55
|
+
const b = await new Promise((_resolve) => {
|
|
56
|
+
let data = '';
|
|
57
|
+
req.on('data', (chunk) => {
|
|
58
|
+
data += chunk;
|
|
59
|
+
});
|
|
60
|
+
req.on('end', () => {
|
|
61
|
+
_resolve(data.toString());
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
const body = JSON.parse(b);
|
|
65
|
+
if (!('stack' in body)) {
|
|
66
|
+
throw new TypeError('Need to pass stack');
|
|
67
|
+
}
|
|
68
|
+
const stack = body.stack;
|
|
69
|
+
const guess = await editorGuess;
|
|
70
|
+
const didOpen = await (0, open_in_editor_1.launchEditor)({
|
|
71
|
+
colNumber: stack.originalColumnNumber,
|
|
72
|
+
editor: guess[0],
|
|
73
|
+
fileName: path_1.default.resolve(process.cwd(), stack.originalFileName),
|
|
74
|
+
lineNumber: stack.originalLineNumber,
|
|
75
|
+
vsCodeNewWindow: false,
|
|
76
|
+
});
|
|
77
|
+
res.setHeader('content-type', 'application/json');
|
|
78
|
+
res.writeHead(200);
|
|
79
|
+
res.end(JSON.stringify({
|
|
80
|
+
success: didOpen,
|
|
81
|
+
}));
|
|
82
|
+
}
|
|
83
|
+
catch (err) {
|
|
84
|
+
res.setHeader('content-type', 'application/json');
|
|
85
|
+
res.writeHead(200);
|
|
86
|
+
res.end(JSON.stringify({
|
|
87
|
+
success: false,
|
|
88
|
+
}));
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
exports.handleOpenInEditor = handleOpenInEditor;
|
|
92
|
+
const handleFavicon = (_, response) => {
|
|
93
|
+
const filePath = path_1.default.join(__dirname, '..', 'web', 'favicon.png');
|
|
94
|
+
const stat = (0, fs_1.statSync)(filePath);
|
|
95
|
+
response.writeHead(200, {
|
|
96
|
+
'Content-Type': 'image/png',
|
|
97
|
+
'Content-Length': stat.size,
|
|
98
|
+
});
|
|
99
|
+
const readStream = (0, fs_1.createReadStream)(filePath);
|
|
100
|
+
readStream.pipe(response);
|
|
101
|
+
};
|
|
102
|
+
exports.handleFavicon = handleFavicon;
|
|
103
|
+
const handleRoutes = (hash, request, response) => {
|
|
104
|
+
const url = new URL(request.url, 'http://localhost');
|
|
105
|
+
if (url.pathname === '/api/update') {
|
|
106
|
+
return (0, exports.handleUpdate)(request, response);
|
|
107
|
+
}
|
|
108
|
+
if (url.pathname === '/api/project-info') {
|
|
109
|
+
return (0, exports.handleProjectInfo)(request, response);
|
|
110
|
+
}
|
|
111
|
+
if (url.pathname === '/api/file-source') {
|
|
112
|
+
return (0, exports.handleFileSource)(url.search, request, response);
|
|
113
|
+
}
|
|
114
|
+
if (url.pathname === '/api/open-in-editor') {
|
|
115
|
+
return (0, exports.handleOpenInEditor)(request, response);
|
|
116
|
+
}
|
|
117
|
+
if (url.pathname === '/remotion.png') {
|
|
118
|
+
return (0, exports.handleFavicon)(request, response);
|
|
119
|
+
}
|
|
120
|
+
return (0, exports.handleFallback)(hash, request, response);
|
|
121
|
+
};
|
|
122
|
+
exports.handleRoutes = handleRoutes;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* serve-static
|
|
3
|
+
* Copyright(c) 2010 Sencha Inc.
|
|
4
|
+
* Copyright(c) 2011 TJ Holowaychuk
|
|
5
|
+
* Copyright(c) 2014-2016 Douglas Christopher Wilson
|
|
6
|
+
* MIT Licensed
|
|
7
|
+
*/
|
|
8
|
+
import { IncomingMessage, ServerResponse } from 'http';
|
|
9
|
+
/**
|
|
10
|
+
* @param {string} root
|
|
11
|
+
* @param {object} [options]
|
|
12
|
+
* @return {function}
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
export declare const serveStatic: (root: string, options: {
|
|
16
|
+
cacheControl: true;
|
|
17
|
+
dotfiles: 'allow';
|
|
18
|
+
etag: true;
|
|
19
|
+
extensions: false;
|
|
20
|
+
fallthrough: false;
|
|
21
|
+
immutable: false;
|
|
22
|
+
index: false;
|
|
23
|
+
lastModified: true;
|
|
24
|
+
maxAge: 0;
|
|
25
|
+
redirect: true;
|
|
26
|
+
}) => (req: IncomingMessage, res: ServerResponse) => void;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* serve-static
|
|
4
|
+
* Copyright(c) 2010 Sencha Inc.
|
|
5
|
+
* Copyright(c) 2011 TJ Holowaychuk
|
|
6
|
+
* Copyright(c) 2014-2016 Douglas Christopher Wilson
|
|
7
|
+
* MIT Licensed
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.serveStatic = void 0;
|
|
11
|
+
const path_1 = require("path");
|
|
12
|
+
const send = require('send');
|
|
13
|
+
/**
|
|
14
|
+
* @param {string} root
|
|
15
|
+
* @param {object} [options]
|
|
16
|
+
* @return {function}
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
const serveStatic = (root, options) => {
|
|
20
|
+
if (!root) {
|
|
21
|
+
throw new TypeError('root path required');
|
|
22
|
+
}
|
|
23
|
+
if (typeof root !== 'string') {
|
|
24
|
+
throw new TypeError('root path must be a string');
|
|
25
|
+
}
|
|
26
|
+
// copy options object
|
|
27
|
+
const opts = Object.create(options || null);
|
|
28
|
+
// headers listener
|
|
29
|
+
const { setHeaders } = opts;
|
|
30
|
+
if (setHeaders && typeof setHeaders !== 'function') {
|
|
31
|
+
throw new TypeError('option setHeaders must be function');
|
|
32
|
+
}
|
|
33
|
+
// setup options for send
|
|
34
|
+
opts.maxage = opts.maxage || opts.maxAge || 0;
|
|
35
|
+
opts.root = (0, path_1.resolve)(root);
|
|
36
|
+
return function (req, res) {
|
|
37
|
+
if (req.method !== 'GET' && req.method !== 'HEAD') {
|
|
38
|
+
// method not allowed
|
|
39
|
+
res.statusCode = 405;
|
|
40
|
+
res.setHeader('Allow', 'GET, HEAD');
|
|
41
|
+
res.setHeader('Content-Length', '0');
|
|
42
|
+
res.end();
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
let path = new URL(req.url, 'http://localhost').pathname;
|
|
46
|
+
// make sure redirect occurs at mount
|
|
47
|
+
if (path === '/' && path.substr(-1) !== '/') {
|
|
48
|
+
path = '';
|
|
49
|
+
}
|
|
50
|
+
// create send stream
|
|
51
|
+
const stream = send(req, path, opts);
|
|
52
|
+
// add directory handler
|
|
53
|
+
stream.on('directory', () => {
|
|
54
|
+
res.writeHead(500);
|
|
55
|
+
res.write('Is a directory');
|
|
56
|
+
res.end();
|
|
57
|
+
});
|
|
58
|
+
// add headers listener
|
|
59
|
+
if (setHeaders) {
|
|
60
|
+
stream.on('headers', setHeaders);
|
|
61
|
+
}
|
|
62
|
+
// forward errors
|
|
63
|
+
stream.on('error', (err) => {
|
|
64
|
+
res.writeHead(500);
|
|
65
|
+
res.write(err.toString());
|
|
66
|
+
res.end();
|
|
67
|
+
});
|
|
68
|
+
// pipe
|
|
69
|
+
stream.pipe(res);
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
exports.serveStatic = serveStatic;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const remotion_1 = require("remotion");
|
|
4
4
|
remotion_1.Internals.setupEnvVariables();
|
|
5
|
-
remotion_1.Internals.setupInitialFrame();
|
|
6
5
|
remotion_1.Internals.setupPuppeteerTimeout();
|
|
7
6
|
remotion_1.Internals.CSSUtils.injectCSS(`
|
|
8
7
|
.css-reset * {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { WebpackOverrideFn } from 'remotion';
|
|
2
|
+
export declare const startServerPure: (entry: string, userDefinedComponent: string, options?: {
|
|
3
|
+
webpackOverride?: WebpackOverrideFn;
|
|
4
|
+
inputProps?: object;
|
|
5
|
+
envVariables?: Record<string, string>;
|
|
6
|
+
port: number | null;
|
|
7
|
+
maxTimelineTracks?: number;
|
|
8
|
+
}) => Promise<number>;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.startServerPure = void 0;
|
|
7
|
+
const crypto_1 = __importDefault(require("crypto"));
|
|
8
|
+
const fs_1 = __importDefault(require("fs"));
|
|
9
|
+
const http_1 = __importDefault(require("http"));
|
|
10
|
+
const os_1 = __importDefault(require("os"));
|
|
11
|
+
const path_1 = __importDefault(require("path"));
|
|
12
|
+
const remotion_1 = require("remotion");
|
|
13
|
+
const webpack_1 = __importDefault(require("webpack"));
|
|
14
|
+
const dev_middleware_1 = require("./dev-middleware");
|
|
15
|
+
const get_port_1 = require("./get-port");
|
|
16
|
+
const hot_middleware_1 = require("./hot-middleware");
|
|
17
|
+
const routes_1 = require("./routes");
|
|
18
|
+
const webpack_config_1 = require("./webpack-config");
|
|
19
|
+
const startServerPure = async (entry, userDefinedComponent, options) => {
|
|
20
|
+
var _a, _b, _c, _d, _e;
|
|
21
|
+
const tmpDir = await fs_1.default.promises.mkdtemp(path_1.default.join(os_1.default.tmpdir(), 'react-motion-graphics'));
|
|
22
|
+
const config = (0, webpack_config_1.webpackConfig)({
|
|
23
|
+
entry,
|
|
24
|
+
userDefinedComponent,
|
|
25
|
+
outDir: tmpDir,
|
|
26
|
+
environment: 'development',
|
|
27
|
+
webpackOverride: (_a = options === null || options === void 0 ? void 0 : options.webpackOverride) !== null && _a !== void 0 ? _a : remotion_1.Internals.getWebpackOverrideFn(),
|
|
28
|
+
inputProps: (_b = options === null || options === void 0 ? void 0 : options.inputProps) !== null && _b !== void 0 ? _b : {},
|
|
29
|
+
envVariables: (_c = options === null || options === void 0 ? void 0 : options.envVariables) !== null && _c !== void 0 ? _c : {},
|
|
30
|
+
maxTimelineTracks: (_d = options === null || options === void 0 ? void 0 : options.maxTimelineTracks) !== null && _d !== void 0 ? _d : 15,
|
|
31
|
+
});
|
|
32
|
+
const compiler = (0, webpack_1.default)(config);
|
|
33
|
+
const hash = `/static-${crypto_1.default.randomBytes(6).toString('hex')}`;
|
|
34
|
+
/**
|
|
35
|
+
* TODO: Put static server
|
|
36
|
+
*/
|
|
37
|
+
const wdmMiddleware = (0, dev_middleware_1.wdm)(compiler);
|
|
38
|
+
const whm = (0, hot_middleware_1.webpackHotMiddleware)(compiler);
|
|
39
|
+
const server = http_1.default.createServer((request, response) => {
|
|
40
|
+
new Promise((resolve) => {
|
|
41
|
+
wdmMiddleware(request, response, () => {
|
|
42
|
+
resolve();
|
|
43
|
+
});
|
|
44
|
+
})
|
|
45
|
+
.then(() => {
|
|
46
|
+
return new Promise((resolve) => {
|
|
47
|
+
whm(request, response, () => {
|
|
48
|
+
resolve();
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
})
|
|
52
|
+
.then(() => {
|
|
53
|
+
(0, routes_1.handleRoutes)(hash, request, response);
|
|
54
|
+
})
|
|
55
|
+
.catch((err) => {
|
|
56
|
+
response.setHeader('content-type', 'application/json');
|
|
57
|
+
response.writeHead(500);
|
|
58
|
+
response.end(JSON.stringify({
|
|
59
|
+
err: err.message,
|
|
60
|
+
}));
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
const desiredPort = (_e = options === null || options === void 0 ? void 0 : options.port) !== null && _e !== void 0 ? _e : undefined;
|
|
64
|
+
const port = await (0, get_port_1.getDesiredPort)(desiredPort, 3000, 3100);
|
|
65
|
+
server.listen(port);
|
|
66
|
+
return port;
|
|
67
|
+
};
|
|
68
|
+
exports.startServerPure = startServerPure;
|
package/dist/start-server.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { WebpackOverrideFn } from 'remotion';
|
|
2
2
|
export declare const startServer: (entry: string, userDefinedComponent: string, options?: {
|
|
3
|
-
webpackOverride?: WebpackOverrideFn
|
|
4
|
-
inputProps?: object
|
|
5
|
-
envVariables?: Record<string, string
|
|
6
|
-
port
|
|
7
|
-
maxTimelineTracks?: number
|
|
8
|
-
}
|
|
3
|
+
webpackOverride?: WebpackOverrideFn;
|
|
4
|
+
inputProps?: object;
|
|
5
|
+
envVariables?: Record<string, string>;
|
|
6
|
+
port: number | null;
|
|
7
|
+
maxTimelineTracks?: number;
|
|
8
|
+
}) => Promise<number>;
|
package/dist/start-server.js
CHANGED
|
@@ -51,7 +51,7 @@ const startServer = async (entry, userDefinedComponent, options) => {
|
|
|
51
51
|
}));
|
|
52
52
|
app.use((0, dev_middleware_1.wdm)(compiler));
|
|
53
53
|
app.use((0, hot_middleware_1.webpackHotMiddleware)(compiler));
|
|
54
|
-
app.get('/api/update', (
|
|
54
|
+
app.get('/api/update', (_req, res) => {
|
|
55
55
|
(0, update_available_1.isUpdateAvailableWithTimeout)()
|
|
56
56
|
.then((data) => {
|
|
57
57
|
res.json(data);
|
|
@@ -62,7 +62,7 @@ const startServer = async (entry, userDefinedComponent, options) => {
|
|
|
62
62
|
});
|
|
63
63
|
});
|
|
64
64
|
});
|
|
65
|
-
app.get('/api/project-info', (
|
|
65
|
+
app.get('/api/project-info', (_req, res) => {
|
|
66
66
|
(0, project_info_1.getProjectInfo)()
|
|
67
67
|
.then((data) => {
|
|
68
68
|
res.json(data);
|
|
@@ -115,7 +115,7 @@ const startServer = async (entry, userDefinedComponent, options) => {
|
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
117
|
});
|
|
118
|
-
app.use('favicon.png', (
|
|
118
|
+
app.use('favicon.png', (_req, res) => {
|
|
119
119
|
res.sendFile(path_1.default.join(__dirname, '..', 'web', 'favicon.png'));
|
|
120
120
|
});
|
|
121
121
|
const edit = await editorGuess;
|
|
@@ -124,7 +124,7 @@ const startServer = async (entry, userDefinedComponent, options) => {
|
|
|
124
124
|
res.set('content-type', 'text/html');
|
|
125
125
|
res.end((0, static_preview_1.indexHtml)(hash, '/', displayName));
|
|
126
126
|
});
|
|
127
|
-
const desiredPort = (_e = options === null || options === void 0 ? void 0 : options.port) !== null && _e !== void 0 ? _e :
|
|
127
|
+
const desiredPort = (_e = options === null || options === void 0 ? void 0 : options.port) !== null && _e !== void 0 ? _e : undefined;
|
|
128
128
|
const port = await (0, get_port_1.getDesiredPort)(desiredPort, 3000, 3100);
|
|
129
129
|
app.listen(port);
|
|
130
130
|
return port;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/dist/webpack-config.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WebpackConfiguration, WebpackOverrideFn } from 'remotion';
|
|
2
|
-
export declare const webpackConfig: ({ entry, userDefinedComponent, outDir, environment, webpackOverride, onProgressUpdate, enableCaching, inputProps, envVariables, maxTimelineTracks, }: {
|
|
2
|
+
export declare const webpackConfig: ({ entry, userDefinedComponent, outDir, environment, webpackOverride, onProgressUpdate, enableCaching, inputProps, envVariables, maxTimelineTracks, entryPoints, }: {
|
|
3
3
|
entry: string;
|
|
4
4
|
userDefinedComponent: string;
|
|
5
5
|
outDir: string;
|
|
@@ -10,4 +10,5 @@ export declare const webpackConfig: ({ entry, userDefinedComponent, outDir, envi
|
|
|
10
10
|
inputProps: object;
|
|
11
11
|
envVariables: Record<string, string>;
|
|
12
12
|
maxTimelineTracks: number;
|
|
13
|
+
entryPoints: string[];
|
|
13
14
|
}) => WebpackConfiguration;
|
package/dist/webpack-config.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
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);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -23,7 +27,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
23
27
|
};
|
|
24
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
29
|
exports.webpackConfig = void 0;
|
|
26
|
-
const path_1 = __importDefault(require("path"));
|
|
27
30
|
const react_dom_1 = __importDefault(require("react-dom"));
|
|
28
31
|
const remotion_1 = require("remotion");
|
|
29
32
|
const webpack_1 = __importStar(require("webpack"));
|
|
@@ -46,7 +49,7 @@ const esbuildLoaderOptions = {
|
|
|
46
49
|
function truthy(value) {
|
|
47
50
|
return Boolean(value);
|
|
48
51
|
}
|
|
49
|
-
const webpackConfig = ({ entry, userDefinedComponent, outDir, environment, webpackOverride = (f) => f, onProgressUpdate, enableCaching = remotion_1.Internals.DEFAULT_WEBPACK_CACHE_ENABLED, inputProps, envVariables, maxTimelineTracks, }) => {
|
|
52
|
+
const webpackConfig = ({ entry, userDefinedComponent, outDir, environment, webpackOverride = (f) => f, onProgressUpdate, enableCaching = remotion_1.Internals.DEFAULT_WEBPACK_CACHE_ENABLED, inputProps, envVariables, maxTimelineTracks, entryPoints, }) => {
|
|
50
53
|
return webpackOverride({
|
|
51
54
|
optimization: {
|
|
52
55
|
minimize: false,
|
|
@@ -72,16 +75,14 @@ const webpackConfig = ({ entry, userDefinedComponent, outDir, environment, webpa
|
|
|
72
75
|
? 'cheap-module-source-map'
|
|
73
76
|
: 'cheap-module-source-map',
|
|
74
77
|
entry: [
|
|
75
|
-
|
|
76
|
-
environment
|
|
77
|
-
|
|
78
|
-
: null,
|
|
78
|
+
// Fast Refresh must come first,
|
|
79
|
+
// because setup-environment imports ReactDOM.
|
|
80
|
+
// If React DOM is imported before Fast Refresh, Fast Refresh does not work
|
|
79
81
|
environment === 'development'
|
|
80
82
|
? require.resolve('./fast-refresh/runtime.js')
|
|
81
83
|
: null,
|
|
82
|
-
environment
|
|
83
|
-
|
|
84
|
-
: null,
|
|
84
|
+
require.resolve('./setup-environment'),
|
|
85
|
+
...entryPoints,
|
|
85
86
|
userDefinedComponent,
|
|
86
87
|
require.resolve('../react-shim.js'),
|
|
87
88
|
entry,
|
|
@@ -112,11 +113,6 @@ const webpackConfig = ({ entry, userDefinedComponent, outDir, environment, webpa
|
|
|
112
113
|
devtoolModuleFilenameTemplate: '[resource-path]',
|
|
113
114
|
assetModuleFilename: environment === 'development' ? '[path][name][ext]' : '[hash][ext]',
|
|
114
115
|
},
|
|
115
|
-
devServer: {
|
|
116
|
-
contentBase: path_1.default.resolve(__dirname, '..', 'web'),
|
|
117
|
-
historyApiFallback: true,
|
|
118
|
-
hot: true,
|
|
119
|
-
},
|
|
120
116
|
resolve: {
|
|
121
117
|
extensions: ['.ts', '.tsx', '.js', '.jsx'],
|
|
122
118
|
alias: {
|
|
@@ -175,14 +171,8 @@ const webpackConfig = ({ entry, userDefinedComponent, outDir, environment, webpa
|
|
|
175
171
|
: null,
|
|
176
172
|
].filter(truthy),
|
|
177
173
|
},
|
|
178
|
-
{
|
|
179
|
-
test: /\.js$/,
|
|
180
|
-
enforce: 'pre',
|
|
181
|
-
use: [require.resolve('source-map-loader')],
|
|
182
|
-
},
|
|
183
174
|
],
|
|
184
175
|
},
|
|
185
|
-
ignoreWarnings: [/Failed to parse source map/],
|
|
186
176
|
});
|
|
187
177
|
};
|
|
188
178
|
exports.webpackConfig = webpackConfig;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/bundler",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-lambda.3+32da0b782",
|
|
4
4
|
"description": "Bundler for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
14
|
"lint": "eslint src --ext ts,tsx",
|
|
15
|
-
"test": "jest",
|
|
16
15
|
"build": "tsc -d",
|
|
17
16
|
"watch": "tsc -w"
|
|
18
17
|
},
|
|
@@ -26,15 +25,8 @@
|
|
|
26
25
|
"dependencies": {
|
|
27
26
|
"css-loader": "5.2.7",
|
|
28
27
|
"esbuild": "0.14.19",
|
|
29
|
-
"execa": "5.1.1",
|
|
30
|
-
"express": "4.17.1",
|
|
31
|
-
"memfs": "3.4.0",
|
|
32
|
-
"mime-types": "2.1.34",
|
|
33
28
|
"react-refresh": "0.9.0",
|
|
34
|
-
"remotion": "4.0.0-
|
|
35
|
-
"semver": "7.3.4",
|
|
36
|
-
"source-map": "0.6.1",
|
|
37
|
-
"source-map-loader": "3.0.0",
|
|
29
|
+
"remotion": "4.0.0-lambda.3+32da0b782",
|
|
38
30
|
"style-loader": "2.0.0",
|
|
39
31
|
"webpack": "5.72.0"
|
|
40
32
|
},
|
|
@@ -44,13 +36,9 @@
|
|
|
44
36
|
},
|
|
45
37
|
"devDependencies": {
|
|
46
38
|
"@jonny/eslint-config": "3.0.259",
|
|
47
|
-
"@types/express": "^4.17.7",
|
|
48
|
-
"@types/jest": "^27.4.0",
|
|
49
|
-
"@types/mime-types": "^2.1.1",
|
|
50
39
|
"@types/node": "^16.7.5",
|
|
51
40
|
"@types/react": "18.0.1",
|
|
52
41
|
"@types/react-dom": "18.0.0",
|
|
53
|
-
"@types/semver": "^7.3.4",
|
|
54
42
|
"@types/webpack-env": "^1.16.0",
|
|
55
43
|
"@typescript-eslint/eslint-plugin": "5.18.0",
|
|
56
44
|
"@typescript-eslint/parser": "5.18.0",
|
|
@@ -58,13 +46,11 @@
|
|
|
58
46
|
"eslint-plugin-10x": "1.5.2",
|
|
59
47
|
"eslint-plugin-react": "7.29.4",
|
|
60
48
|
"eslint-plugin-react-hooks": "4.4.0",
|
|
61
|
-
"jest": "^27.2.4",
|
|
62
49
|
"prettier": "^2.0.5",
|
|
63
50
|
"prettier-plugin-organize-imports": "^2.3.4",
|
|
64
51
|
"react": "^18.0.0",
|
|
65
52
|
"react-dom": "^18.0.0",
|
|
66
|
-
"
|
|
67
|
-
"typescript": "^4.5.5"
|
|
53
|
+
"typescript": "^4.7.0"
|
|
68
54
|
},
|
|
69
55
|
"keywords": [
|
|
70
56
|
"remotion",
|
|
@@ -77,5 +63,5 @@
|
|
|
77
63
|
"publishConfig": {
|
|
78
64
|
"access": "public"
|
|
79
65
|
},
|
|
80
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "32da0b782094e5eac82cdc1b1469a80bb763b392"
|
|
81
67
|
}
|
package/web/favicon.png
DELETED
|
Binary file
|