@remotion/bundler 4.0.110 → 4.0.112

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 CHANGED
@@ -11,10 +11,12 @@ export type LegacyBundleOptions = {
11
11
  onPublicDirCopyProgress?: (bytes: number) => void;
12
12
  onSymlinkDetected?: (path: string) => void;
13
13
  };
14
- export declare const getConfig: ({ entryPoint, outDir, resolvedRemotionRoot, onProgress, options, }: {
14
+ export declare const getConfig: ({ entryPoint, outDir, resolvedRemotionRoot, onProgress, options, bufferStateDelayInMilliseconds, maxTimelineTracks, }: {
15
15
  outDir: string;
16
16
  entryPoint: string;
17
17
  resolvedRemotionRoot: string;
18
+ bufferStateDelayInMilliseconds: number | null;
19
+ maxTimelineTracks: number | null;
18
20
  onProgress?: ((progress: number) => void) | undefined;
19
21
  options?: LegacyBundleOptions | undefined;
20
22
  }) => [string, webpack.Configuration];
@@ -24,6 +26,8 @@ export type BundleOptions = {
24
26
  ignoreRegisterRootWarning?: boolean;
25
27
  onDirectoryCreated?: (dir: string) => void;
26
28
  gitSource?: GitSource | null;
29
+ maxTimelineTracks?: number;
30
+ bufferStateDelayInMilliseconds?: number;
27
31
  } & LegacyBundleOptions;
28
32
  type Arguments = [options: BundleOptions] | [
29
33
  entryPoint: string,
package/dist/bundle.js CHANGED
@@ -58,7 +58,7 @@ const trimTrailingSlash = (p) => {
58
58
  }
59
59
  return p;
60
60
  };
61
- const getConfig = ({ entryPoint, outDir, resolvedRemotionRoot, onProgress, options, }) => {
61
+ const getConfig = ({ entryPoint, outDir, resolvedRemotionRoot, onProgress, options, bufferStateDelayInMilliseconds, maxTimelineTracks, }) => {
62
62
  var _a, _b;
63
63
  const entry = node_path_1.default.resolve(__dirname, '..', './renderEntry.tsx');
64
64
  return (0, webpack_config_1.webpackConfig)({
@@ -69,9 +69,10 @@ const getConfig = ({ entryPoint, outDir, resolvedRemotionRoot, onProgress, optio
69
69
  webpackOverride: (_a = options === null || options === void 0 ? void 0 : options.webpackOverride) !== null && _a !== void 0 ? _a : ((f) => f),
70
70
  onProgress,
71
71
  enableCaching: (_b = options === null || options === void 0 ? void 0 : options.enableCaching) !== null && _b !== void 0 ? _b : true,
72
- maxTimelineTracks: 90,
72
+ maxTimelineTracks,
73
73
  remotionRoot: resolvedRemotionRoot,
74
74
  keyboardShortcutsEnabled: true,
75
+ bufferStateDelayInMilliseconds,
75
76
  poll: null,
76
77
  });
77
78
  };
@@ -127,7 +128,7 @@ const validateEntryPoint = async (entryPoint) => {
127
128
  * @see [Documentation](https://www.remotion.dev/docs/bundle)
128
129
  */
129
130
  async function bundle(...args) {
130
- var _a, _b, _c, _d, _e, _f, _g;
131
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
131
132
  const actualArgs = convertArgumentsIntoOptions(args);
132
133
  const entryPoint = node_path_1.default.resolve(process.cwd(), actualArgs.entryPoint);
133
134
  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();
@@ -150,6 +151,8 @@ async function bundle(...args) {
150
151
  resolvedRemotionRoot,
151
152
  onProgress,
152
153
  options,
154
+ bufferStateDelayInMilliseconds: (_e = actualArgs.bufferStateDelayInMilliseconds) !== null && _e !== void 0 ? _e : studio_shared_1.DEFAULT_BUFFER_STATE_DELAY_IN_MILLISECONDS,
155
+ maxTimelineTracks: (_f = actualArgs.maxTimelineTracks) !== null && _f !== void 0 ? _f : studio_shared_1.DEFAULT_TIMELINE_TRACKS,
153
156
  });
154
157
  const output = await promisified([config]);
155
158
  if (node_worker_threads_1.isMainThread) {
@@ -162,7 +165,7 @@ async function bundle(...args) {
162
165
  if (errors !== undefined && errors.length > 0) {
163
166
  throw new Error(errors[0].message + '\n' + errors[0].details);
164
167
  }
165
- const baseDir = (_e = actualArgs === null || actualArgs === void 0 ? void 0 : actualArgs.publicPath) !== null && _e !== void 0 ? _e : '/';
168
+ const baseDir = (_g = actualArgs === null || actualArgs === void 0 ? void 0 : actualArgs.publicPath) !== null && _g !== void 0 ? _g : '/';
166
169
  const staticHash = '/' +
167
170
  [trimTrailingSlash(trimLeadingSlash(baseDir)), 'public']
168
171
  .filter(Boolean)
@@ -218,9 +221,9 @@ async function bundle(...args) {
218
221
  title: 'Remotion Bundle',
219
222
  renderDefaults: undefined,
220
223
  publicFolderExists: `${baseDir + (baseDir.endsWith('/') ? '' : '/')}public`,
221
- gitSource: (_f = actualArgs.gitSource) !== null && _f !== void 0 ? _f : null,
224
+ gitSource: (_h = actualArgs.gitSource) !== null && _h !== void 0 ? _h : null,
222
225
  projectName: (0, studio_shared_1.getProjectName)({
223
- gitSource: (_g = actualArgs.gitSource) !== null && _g !== void 0 ? _g : null,
226
+ gitSource: (_j = actualArgs.gitSource) !== null && _j !== void 0 ? _j : null,
224
227
  resolvedRemotionRoot,
225
228
  basename: node_path_1.default.basename,
226
229
  }),
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, maxTimelineTracks, remotionRoot, keyboardShortcutsEnabled, poll, }: {
5
+ webpackConfig: ({ entry, userDefinedComponent, outDir, environment, webpackOverride, onProgress, enableCaching, maxTimelineTracks, remotionRoot, keyboardShortcutsEnabled, bufferStateDelayInMilliseconds, poll, }: {
6
6
  entry: string;
7
7
  userDefinedComponent: string;
8
8
  outDir: string | null;
@@ -10,8 +10,9 @@ export declare const BundlerInternals: {
10
10
  webpackOverride: import("./webpack-config").WebpackOverrideFn;
11
11
  onProgress?: ((f: number) => void) | undefined;
12
12
  enableCaching?: boolean | undefined;
13
- maxTimelineTracks: number;
13
+ maxTimelineTracks: number | null;
14
14
  keyboardShortcutsEnabled: boolean;
15
+ bufferStateDelayInMilliseconds: number | null;
15
16
  remotionRoot: string;
16
17
  poll: number | null;
17
18
  }) => [string, webpack.Configuration];
@@ -35,10 +36,12 @@ export declare const BundlerInternals: {
35
36
  }) => string;
36
37
  cacheExists: (remotionRoot: string, environment: "development" | "production", hash: string) => "exists" | "other-exists" | "does-not-exist";
37
38
  clearCache: (remotionRoot: string, env: "development" | "production") => Promise<void>;
38
- getConfig: ({ entryPoint, outDir, resolvedRemotionRoot, onProgress, options, }: {
39
+ getConfig: ({ entryPoint, outDir, resolvedRemotionRoot, onProgress, options, bufferStateDelayInMilliseconds, maxTimelineTracks, }: {
39
40
  outDir: string;
40
41
  entryPoint: string;
41
42
  resolvedRemotionRoot: string;
43
+ bufferStateDelayInMilliseconds: number | null;
44
+ maxTimelineTracks: number | null;
42
45
  onProgress?: ((progress: number) => void) | undefined;
43
46
  options?: import("./bundle").LegacyBundleOptions | undefined;
44
47
  }) => [string, webpack.Configuration];
@@ -1,7 +1,7 @@
1
1
  import type { Configuration } from 'webpack';
2
2
  export type WebpackConfiguration = Configuration;
3
3
  export type WebpackOverrideFn = (currentConfiguration: WebpackConfiguration) => WebpackConfiguration;
4
- export declare const webpackConfig: ({ entry, userDefinedComponent, outDir, environment, webpackOverride, onProgress, enableCaching, maxTimelineTracks, remotionRoot, keyboardShortcutsEnabled, poll, }: {
4
+ export declare const webpackConfig: ({ entry, userDefinedComponent, outDir, environment, webpackOverride, onProgress, enableCaching, maxTimelineTracks, remotionRoot, keyboardShortcutsEnabled, bufferStateDelayInMilliseconds, poll, }: {
5
5
  entry: string;
6
6
  userDefinedComponent: string;
7
7
  outDir: string | null;
@@ -9,8 +9,9 @@ export declare const webpackConfig: ({ entry, userDefinedComponent, outDir, envi
9
9
  webpackOverride: WebpackOverrideFn;
10
10
  onProgress?: ((f: number) => void) | undefined;
11
11
  enableCaching?: boolean | undefined;
12
- maxTimelineTracks: number;
12
+ maxTimelineTracks: number | null;
13
13
  keyboardShortcutsEnabled: boolean;
14
+ bufferStateDelayInMilliseconds: number | null;
14
15
  remotionRoot: string;
15
16
  poll: number | null;
16
17
  }) => [string, WebpackConfiguration];
@@ -52,12 +52,13 @@ const esbuildLoaderOptions = {
52
52
  function truthy(value) {
53
53
  return Boolean(value);
54
54
  }
55
- const webpackConfig = ({ entry, userDefinedComponent, outDir, environment, webpackOverride = (f) => f, onProgress, enableCaching = true, maxTimelineTracks, remotionRoot, keyboardShortcutsEnabled, poll, }) => {
55
+ const webpackConfig = ({ entry, userDefinedComponent, outDir, environment, webpackOverride = (f) => f, onProgress, enableCaching = true, maxTimelineTracks, remotionRoot, keyboardShortcutsEnabled, bufferStateDelayInMilliseconds, poll, }) => {
56
56
  let lastProgress = 0;
57
57
  const isBun = typeof Bun !== 'undefined';
58
58
  const define = new webpack_1.default.DefinePlugin({
59
59
  'process.env.MAX_TIMELINE_TRACKS': maxTimelineTracks,
60
60
  'process.env.KEYBOARD_SHORTCUTS_ENABLED': keyboardShortcutsEnabled,
61
+ 'process.env.BUFFER_STATE_DELAY_IN_MILLISECONDS': bufferStateDelayInMilliseconds,
61
62
  });
62
63
  const conf = webpackOverride({
63
64
  optimization: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/bundler",
3
- "version": "4.0.110",
3
+ "version": "4.0.112",
4
4
  "description": "Bundler for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -25,9 +25,9 @@
25
25
  "style-loader": "2.0.0",
26
26
  "source-map": "0.7.3",
27
27
  "webpack": "5.83.1",
28
- "remotion": "4.0.110",
29
- "@remotion/studio": "4.0.110",
30
- "@remotion/studio-shared": "4.0.110"
28
+ "remotion": "4.0.112",
29
+ "@remotion/studio": "4.0.112",
30
+ "@remotion/studio-shared": "4.0.112"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "react": ">=16.8.0",