@remotion/bundler 3.3.9 → 3.3.11

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 CHANGED
@@ -50,6 +50,7 @@ const getConfig = ({ entryPoint, outDir, resolvedRemotionRoot, onProgress, optio
50
50
  entryPoints: [],
51
51
  remotionRoot: resolvedRemotionRoot,
52
52
  keyboardShortcutsEnabled: false,
53
+ poll: null,
53
54
  });
54
55
  };
55
56
  exports.getConfig = getConfig;
@@ -154,6 +155,8 @@ async function bundle(...args) {
154
155
  remotionRoot: resolvedRemotionRoot,
155
156
  previewServerCommand: null,
156
157
  numberOfAudioTags: 0,
158
+ includeFavicon: false,
159
+ title: 'Remotion Bundle',
157
160
  });
158
161
  fs_1.default.writeFileSync(path_1.default.join(outDir, 'index.html'), html);
159
162
  return outDir;
@@ -1,4 +1,4 @@
1
- export declare const indexHtml: ({ baseDir, editorName, inputProps, envVariables, staticHash, remotionRoot, previewServerCommand, numberOfAudioTags, }: {
1
+ export declare const indexHtml: ({ baseDir, editorName, inputProps, envVariables, staticHash, remotionRoot, previewServerCommand, numberOfAudioTags, includeFavicon, title, }: {
2
2
  staticHash: string;
3
3
  baseDir: string;
4
4
  editorName: string | null;
@@ -7,4 +7,6 @@ export declare const indexHtml: ({ baseDir, editorName, inputProps, envVariables
7
7
  remotionRoot: string;
8
8
  previewServerCommand: string | null;
9
9
  numberOfAudioTags: number;
10
+ includeFavicon: boolean;
11
+ title: string;
10
12
  }) => string;
@@ -5,15 +5,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.indexHtml = void 0;
7
7
  const path_1 = __importDefault(require("path"));
8
- const indexHtml = ({ baseDir, editorName, inputProps, envVariables, staticHash, remotionRoot, previewServerCommand, numberOfAudioTags, }) => `
8
+ const indexHtml = ({ baseDir, editorName, inputProps, envVariables, staticHash, remotionRoot, previewServerCommand, numberOfAudioTags, includeFavicon, title, }) => `
9
9
  <!DOCTYPE html>
10
10
  <html lang="en">
11
11
  <head>
12
12
  <meta charset="UTF-8" />
13
13
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
14
14
  <link rel="preconnect" href="https://fonts.gstatic.com" />
15
- <link rel="icon" type="image/png" href="/remotion.png" />
16
- <title>Remotion Preview</title>
15
+ ${includeFavicon
16
+ ? ` <link rel="icon" type="image/png" href="/remotion.png" />\n`
17
+ : ''}
18
+ <title>${title}</title>
17
19
  </head>
18
20
  <body>
19
21
  <script>window.remotion_numberOfAudioTags = ${numberOfAudioTags};</script>
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import esbuild = require('esbuild');
2
2
  import webpack = require('webpack');
3
3
  export declare const BundlerInternals: {
4
4
  esbuild: typeof esbuild;
5
- webpackConfig: ({ entry, userDefinedComponent, outDir, environment, webpackOverride, onProgress, enableCaching, envVariables, maxTimelineTracks, entryPoints, remotionRoot, keyboardShortcutsEnabled, }: {
5
+ webpackConfig: ({ entry, userDefinedComponent, outDir, environment, webpackOverride, onProgress, enableCaching, envVariables, maxTimelineTracks, entryPoints, remotionRoot, keyboardShortcutsEnabled, poll, }: {
6
6
  entry: string;
7
7
  userDefinedComponent: string;
8
8
  outDir: string;
@@ -15,8 +15,9 @@ export declare const BundlerInternals: {
15
15
  keyboardShortcutsEnabled: boolean;
16
16
  entryPoints: string[];
17
17
  remotionRoot: string;
18
+ poll: number | null;
18
19
  }) => [string, webpack.Configuration];
19
- indexHtml: ({ baseDir, editorName, inputProps, envVariables, staticHash, remotionRoot, previewServerCommand, numberOfAudioTags, }: {
20
+ indexHtml: ({ baseDir, editorName, inputProps, envVariables, staticHash, remotionRoot, previewServerCommand, numberOfAudioTags, includeFavicon, title, }: {
20
21
  staticHash: string;
21
22
  baseDir: string;
22
23
  editorName: string | null;
@@ -25,6 +26,8 @@ export declare const BundlerInternals: {
25
26
  remotionRoot: string;
26
27
  previewServerCommand: string | null;
27
28
  numberOfAudioTags: number;
29
+ includeFavicon: boolean;
30
+ title: string;
28
31
  }) => string;
29
32
  cacheExists: (remotionRoot: string, environment: "development" | "production", hash: string) => "exists" | "other-exists" | "does-not-exist";
30
33
  clearCache: (remotionRoot: string) => Promise<void>;
@@ -1,5 +1,5 @@
1
1
  import type { WebpackConfiguration, WebpackOverrideFn } from 'remotion';
2
- export declare const webpackConfig: ({ entry, userDefinedComponent, outDir, environment, webpackOverride, onProgress, enableCaching, envVariables, maxTimelineTracks, entryPoints, remotionRoot, keyboardShortcutsEnabled, }: {
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;
5
5
  outDir: string;
@@ -12,4 +12,5 @@ export declare const webpackConfig: ({ entry, userDefinedComponent, outDir, envi
12
12
  keyboardShortcutsEnabled: boolean;
13
13
  entryPoints: string[];
14
14
  remotionRoot: string;
15
+ poll: number | null;
15
16
  }) => [string, WebpackConfiguration];
@@ -51,7 +51,7 @@ const esbuildLoaderOptions = {
51
51
  function truthy(value) {
52
52
  return Boolean(value);
53
53
  }
54
- const webpackConfig = ({ entry, userDefinedComponent, outDir, environment, webpackOverride = (f) => f, onProgress, enableCaching = true, envVariables, maxTimelineTracks, entryPoints, remotionRoot, keyboardShortcutsEnabled, }) => {
54
+ const webpackConfig = ({ entry, userDefinedComponent, outDir, environment, webpackOverride = (f) => f, onProgress, enableCaching = true, envVariables, maxTimelineTracks, entryPoints, remotionRoot, keyboardShortcutsEnabled, poll, }) => {
55
55
  const conf = webpackOverride({
56
56
  optimization: {
57
57
  minimize: false,
@@ -64,12 +64,11 @@ const webpackConfig = ({ entry, userDefinedComponent, outDir, environment, webpa
64
64
  },
65
65
  },
66
66
  watchOptions: {
67
+ poll: poll !== null && poll !== void 0 ? poll : undefined,
67
68
  aggregateTimeout: 0,
68
69
  ignored: ['**/.git/**', '**/node_modules/**'],
69
70
  },
70
- devtool: environment === 'development'
71
- ? 'cheap-module-source-map'
72
- : 'cheap-module-source-map',
71
+ devtool: 'cheap-module-source-map',
73
72
  entry: [
74
73
  // Fast Refresh must come first,
75
74
  // because setup-environment imports ReactDOM.
@@ -109,7 +108,7 @@ const webpackConfig = ({ entry, userDefinedComponent, outDir, environment, webpa
109
108
  assetModuleFilename: environment === 'development' ? '[path][name][ext]' : '[hash][ext]',
110
109
  },
111
110
  resolve: {
112
- extensions: ['.ts', '.tsx', '.js', '.jsx'],
111
+ extensions: ['.ts', '.tsx', '.web.js', '.js', '.jsx'],
113
112
  alias: {
114
113
  // Only one version of react
115
114
  'react/jsx-runtime': require.resolve('react/jsx-runtime'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/bundler",
3
- "version": "3.3.9",
3
+ "version": "3.3.11",
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.9",
29
+ "remotion": "3.3.11",
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": "86269c98522cb7ea280f8283fa6c57885b971b3b"
67
+ "gitHead": "08404196c439c2bf1f06bbb7a99a6fd84d5158e1"
68
68
  }
@@ -1 +0,0 @@
1
- export declare const getEtagOfFile: (filePath: string) => Promise<string>;
package/dist/get-etag.js DELETED
@@ -1,24 +0,0 @@
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.getEtagOfFile = void 0;
7
- const fs_1 = __importDefault(require("fs"));
8
- const crypto_1 = __importDefault(require("crypto"));
9
- const chunk = 1024 * 1024 * 5; // 5MB
10
- const md5 = (data) => crypto_1.default.createHash('md5').update(data).digest('hex');
11
- const getEtagOfFile = async (filePath) => {
12
- const stream = await fs_1.default.promises.readFile(filePath);
13
- if (stream.length <= chunk) {
14
- return md5(stream);
15
- }
16
- const md5Chunks = [];
17
- const chunksNumber = Math.ceil(stream.length / chunk);
18
- for (let i = 0; i < chunksNumber; i++) {
19
- const chunkStream = stream.slice(i * chunk, (i + 1) * chunk);
20
- md5Chunks.push(md5(chunkStream));
21
- }
22
- return `${md5(Buffer.from(md5Chunks.join(''), 'hex'))}-${chunksNumber}`;
23
- };
24
- exports.getEtagOfFile = getEtagOfFile;
@@ -1,6 +0,0 @@
1
- import type { StaticFile } from 'remotion';
2
- export declare const readRecursively: ({ folder, output, startPath, }: {
3
- folder: string;
4
- startPath: string;
5
- output?: StaticFile[] | undefined;
6
- }) => StaticFile[];
@@ -1,64 +0,0 @@
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
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.readRecursively = void 0;
30
- const fs_1 = __importStar(require("fs"));
31
- const path_1 = __importDefault(require("path"));
32
- const readRecursively = ({ folder, output = [], startPath, }) => {
33
- const absFolder = path_1.default.join(startPath, folder);
34
- const files = fs_1.default.readdirSync(absFolder);
35
- for (const file of files) {
36
- if (file.startsWith('.DS_Store')) {
37
- continue;
38
- }
39
- const stat = (0, fs_1.statSync)(path_1.default.join(absFolder, file));
40
- if (stat.isDirectory()) {
41
- (0, exports.readRecursively)({ startPath, folder: path_1.default.join(folder, file), output });
42
- }
43
- else if (stat.isFile()) {
44
- output.push({
45
- path: path_1.default.join(folder, file),
46
- lastModified: Math.floor(stat.mtimeMs),
47
- sizeInBytes: stat.size,
48
- });
49
- }
50
- else if (stat.isSymbolicLink()) {
51
- const realpath = fs_1.default.realpathSync(path_1.default.join(folder, file));
52
- const realStat = fs_1.default.statSync(realpath);
53
- if (realStat.isFile()) {
54
- output.push({
55
- path: realpath,
56
- lastModified: Math.floor(realStat.mtimeMs),
57
- sizeInBytes: realStat.size,
58
- });
59
- }
60
- }
61
- }
62
- return output.sort((a, b) => a.path.localeCompare(b.path));
63
- };
64
- exports.readRecursively = readRecursively;