@remotion/bundler 4.0.0-alpha.217 → 4.0.0-alpha4

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
@@ -1,5 +1,5 @@
1
+ import type { WebpackOverrideFn } from 'remotion';
1
2
  import webpack from 'webpack';
2
- import type { WebpackOverrideFn } from './webpack-config';
3
3
  export declare type LegacyBundleOptions = {
4
4
  webpackOverride?: WebpackOverrideFn;
5
5
  outDir?: string;
@@ -21,7 +21,6 @@ export declare type BundleOptions = {
21
21
  entryPoint: string;
22
22
  onProgress?: (progress: number) => void;
23
23
  ignoreRegisterRootWarning?: boolean;
24
- onDirectoryCreated?: (dir: string) => void;
25
24
  } & LegacyBundleOptions;
26
25
  declare type Arguments = [options: BundleOptions] | [
27
26
  entryPoint: string,
package/dist/bundle.js CHANGED
@@ -68,7 +68,7 @@ const getConfig = ({ entryPoint, outDir, resolvedRemotionRoot, onProgress, optio
68
68
  webpackOverride: (_a = options === null || options === void 0 ? void 0 : options.webpackOverride) !== null && _a !== void 0 ? _a : ((f) => f),
69
69
  onProgress,
70
70
  enableCaching: (_b = options === null || options === void 0 ? void 0 : options.enableCaching) !== null && _b !== void 0 ? _b : true,
71
- maxTimelineTracks: 90,
71
+ maxTimelineTracks: 15,
72
72
  // For production, the variables are set dynamically
73
73
  envVariables: {},
74
74
  entryPoints: [],
@@ -125,7 +125,7 @@ const validateEntryPoint = async (entryPoint) => {
125
125
  * @see [Documentation](https://www.remotion.dev/docs/bundle)
126
126
  */
127
127
  async function bundle(...args) {
128
- var _a, _b, _c, _d, _e;
128
+ var _a, _b, _c, _d;
129
129
  const actualArgs = convertArgumentsIntoOptions(args);
130
130
  const entryPoint = path_1.default.resolve(process.cwd(), actualArgs.entryPoint);
131
131
  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();
@@ -133,7 +133,6 @@ async function bundle(...args) {
133
133
  await validateEntryPoint(entryPoint);
134
134
  }
135
135
  const outDir = await prepareOutDir((_c = actualArgs === null || actualArgs === void 0 ? void 0 : actualArgs.outDir) !== null && _c !== void 0 ? _c : null);
136
- (_d = actualArgs.onDirectoryCreated) === null || _d === void 0 ? void 0 : _d.call(actualArgs, outDir);
137
136
  // The config might use an override which might use
138
137
  // `process.cwd()`. The context should always be the Remotion root.
139
138
  // This is not supported in worker threads (used for tests)
@@ -160,7 +159,7 @@ async function bundle(...args) {
160
159
  if (errors !== undefined && errors.length > 0) {
161
160
  throw new Error(errors[0].message + '\n' + errors[0].details);
162
161
  }
163
- const baseDir = (_e = actualArgs === null || actualArgs === void 0 ? void 0 : actualArgs.publicPath) !== null && _e !== void 0 ? _e : '/';
162
+ const baseDir = (_d = actualArgs === null || actualArgs === void 0 ? void 0 : actualArgs.publicPath) !== null && _d !== void 0 ? _d : '/';
164
163
  const staticHash = '/' +
165
164
  [trimTrailingSlash(trimLeadingSlash(baseDir)), 'public']
166
165
  .filter(Boolean)
@@ -188,7 +187,6 @@ async function bundle(...args) {
188
187
  dest: to,
189
188
  onSymlinkDetected: showSymlinkWarning,
190
189
  onProgress: (prog) => { var _a; return (_a = options.onPublicDirCopyProgress) === null || _a === void 0 ? void 0 : _a.call(options, prog); },
191
- copied: 0,
192
190
  });
193
191
  }
194
192
  const html = (0, index_html_1.indexHtml)({
@@ -198,7 +196,6 @@ async function bundle(...args) {
198
196
  inputProps: null,
199
197
  remotionRoot: resolvedRemotionRoot,
200
198
  previewServerCommand: null,
201
- renderQueue: null,
202
199
  numberOfAudioTags: 0,
203
200
  publicFiles: (0, read_recursively_1.readRecursively)({
204
201
  folder: '.',
@@ -208,7 +205,6 @@ async function bundle(...args) {
208
205
  }),
209
206
  includeFavicon: false,
210
207
  title: 'Remotion Bundle',
211
- renderDefaults: undefined,
212
208
  });
213
209
  fs_1.default.writeFileSync(path_1.default.join(outDir, 'index.html'), html);
214
210
  return outDir;
@@ -1,9 +1,8 @@
1
1
  /// <reference types="node" />
2
2
  import fs from 'fs';
3
- export declare function copyDir({ src, dest, onSymlinkDetected, onProgress, copied, }: {
3
+ export declare function copyDir({ src, dest, onSymlinkDetected, onProgress, }: {
4
4
  src: string;
5
5
  dest: string;
6
6
  onSymlinkDetected: (entry: fs.Dirent, dir: string) => void;
7
7
  onProgress: (bytes: number) => void;
8
- copied: number;
9
8
  }): Promise<void>;
package/dist/copy-dir.js CHANGED
@@ -6,9 +6,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.copyDir = void 0;
7
7
  const fs_1 = __importDefault(require("fs"));
8
8
  const path_1 = __importDefault(require("path"));
9
- async function copyDir({ src, dest, onSymlinkDetected, onProgress, copied = 0, }) {
9
+ async function copyDir({ src, dest, onSymlinkDetected, onProgress, }) {
10
10
  await fs_1.default.promises.mkdir(dest, { recursive: true });
11
11
  const entries = await fs_1.default.promises.readdir(src, { withFileTypes: true });
12
+ let copied = 0;
12
13
  for (const entry of entries) {
13
14
  const srcPath = path_1.default.join(src, entry.name);
14
15
  const destPath = path_1.default.join(dest, entry.name);
@@ -18,7 +19,6 @@ async function copyDir({ src, dest, onSymlinkDetected, onProgress, copied = 0, }
18
19
  dest: destPath,
19
20
  onSymlinkDetected,
20
21
  onProgress,
21
- copied,
22
22
  });
23
23
  }
24
24
  else if (entry.isSymbolicLink()) {
@@ -1,35 +1,5 @@
1
1
  import type { StaticFile } from 'remotion';
2
- export declare type RenderDefaults = {
3
- jpegQuality: number;
4
- scale: number;
5
- logLevel: string;
6
- codec: string;
7
- concurrency: number;
8
- minConcurrency: number;
9
- muted: boolean;
10
- maxConcurrency: number;
11
- stillImageFormat: 'png' | 'jpeg' | 'webp' | 'pdf';
12
- videoImageFormat: 'png' | 'jpeg' | 'none';
13
- audioCodec: string | null;
14
- enforceAudioTrack: boolean;
15
- proResProfile: string;
16
- pixelFormat: string;
17
- audioBitrate: string | null;
18
- videoBitrate: string | null;
19
- everyNthFrame: number;
20
- numberOfGifLoops: number | null;
21
- delayRenderTimeout: number;
22
- disableWebSecurity: boolean;
23
- openGlRenderer: string | null;
24
- ignoreCertificateErrors: boolean;
25
- headless: boolean;
26
- };
27
- declare global {
28
- interface Window {
29
- remotion_renderDefaults: RenderDefaults | undefined;
30
- }
31
- }
32
- export declare const indexHtml: ({ baseDir, editorName, inputProps, envVariables, staticHash, remotionRoot, previewServerCommand, renderQueue, numberOfAudioTags, publicFiles, includeFavicon, title, renderDefaults, }: {
2
+ export declare const indexHtml: ({ baseDir, editorName, inputProps, envVariables, staticHash, remotionRoot, previewServerCommand, numberOfAudioTags, publicFiles, includeFavicon, title, }: {
33
3
  staticHash: string;
34
4
  baseDir: string;
35
5
  editorName: string | null;
@@ -37,10 +7,8 @@ export declare const indexHtml: ({ baseDir, editorName, inputProps, envVariables
37
7
  envVariables?: Record<string, string> | undefined;
38
8
  remotionRoot: string;
39
9
  previewServerCommand: string | null;
40
- renderQueue: unknown | null;
41
10
  numberOfAudioTags: number;
42
11
  publicFiles: StaticFile[];
43
12
  includeFavicon: boolean;
44
13
  title: string;
45
- renderDefaults: RenderDefaults | undefined;
46
14
  }) => string;
@@ -5,7 +5,7 @@ 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, renderQueue, numberOfAudioTags, publicFiles, includeFavicon, title, renderDefaults, }) => `
8
+ const indexHtml = ({ baseDir, editorName, inputProps, envVariables, staticHash, remotionRoot, previewServerCommand, numberOfAudioTags, publicFiles, includeFavicon, title, }) => `
9
9
  <!DOCTYPE html>
10
10
  <html lang="en">
11
11
  <head>
@@ -26,16 +26,11 @@ ${includeFavicon
26
26
  ? `<script>window.remotion_editorName = "${editorName}";</script>`
27
27
  : '<script>window.remotion_editorName = null;</script>'}
28
28
  <script>window.remotion_projectName = ${JSON.stringify(path_1.default.basename(remotionRoot))};</script>
29
- <script>window.remotion_renderDefaults = ${JSON.stringify(renderDefaults)};</script>
30
29
  <script>window.remotion_cwd = ${JSON.stringify(remotionRoot)};</script>
31
30
  <script>window.remotion_previewServerCommand = ${previewServerCommand ? JSON.stringify(previewServerCommand) : 'null'};</script>
32
31
  ${inputProps
33
32
  ? `<script>window.remotion_inputProps = ${JSON.stringify(JSON.stringify(inputProps))};</script>
34
33
  `
35
- : ''}
36
- ${renderQueue
37
- ? `<script>window.remotion_initialRenderQueue = ${JSON.stringify(renderQueue)};</script>
38
- `
39
34
  : ''}
40
35
  ${envVariables
41
36
  ? `<script> window.process = {
package/dist/index.d.ts CHANGED
@@ -7,7 +7,7 @@ export declare const BundlerInternals: {
7
7
  userDefinedComponent: string;
8
8
  outDir: string | null;
9
9
  environment: "development" | "production";
10
- webpackOverride: import("./webpack-config").WebpackOverrideFn;
10
+ webpackOverride: import("remotion").WebpackOverrideFn;
11
11
  onProgress?: ((f: number) => void) | undefined;
12
12
  enableCaching?: boolean | undefined;
13
13
  envVariables: Record<string, string>;
@@ -17,7 +17,7 @@ export declare const BundlerInternals: {
17
17
  remotionRoot: string;
18
18
  poll: number | null;
19
19
  }) => [string, webpack.Configuration];
20
- indexHtml: ({ baseDir, editorName, inputProps, envVariables, staticHash, remotionRoot, previewServerCommand, renderQueue, numberOfAudioTags, publicFiles, includeFavicon, title, renderDefaults, }: {
20
+ indexHtml: ({ baseDir, editorName, inputProps, envVariables, staticHash, remotionRoot, previewServerCommand, numberOfAudioTags, publicFiles, includeFavicon, title, }: {
21
21
  staticHash: string;
22
22
  baseDir: string;
23
23
  editorName: string | null;
@@ -25,12 +25,10 @@ export declare const BundlerInternals: {
25
25
  envVariables?: Record<string, string> | undefined;
26
26
  remotionRoot: string;
27
27
  previewServerCommand: string | null;
28
- renderQueue: unknown;
29
28
  numberOfAudioTags: number;
30
29
  publicFiles: import("remotion").StaticFile[];
31
30
  includeFavicon: boolean;
32
31
  title: string;
33
- renderDefaults: import("./index-html").RenderDefaults | undefined;
34
32
  }) => string;
35
33
  cacheExists: (remotionRoot: string, environment: "development" | "production", hash: string) => "exists" | "other-exists" | "does-not-exist";
36
34
  clearCache: (remotionRoot: string) => Promise<void>;
@@ -49,6 +47,6 @@ export declare const BundlerInternals: {
49
47
  limit: number;
50
48
  }) => import("remotion").StaticFile[];
51
49
  };
50
+ export { WebpackConfiguration, WebpackOverrideFn } from 'remotion';
52
51
  export { bundle, BundleOptions, LegacyBundleOptions } from './bundle';
53
- export { WebpackConfiguration, WebpackOverrideFn } from './webpack-config';
54
52
  export { webpack };
@@ -16,54 +16,4 @@ remotion_1.Internals.CSSUtils.injectCSS(`
16
16
  font-size: 15px;
17
17
  line-height: 1.25;
18
18
  }
19
-
20
- .__remotion-info-button-container code {
21
- font-family: monospace;
22
- font-size: 14px;
23
- color: #0584f2
24
- }
25
-
26
- .__remotion-vertical-scrollbar::-webkit-scrollbar {
27
- width: 6px;
28
- }
29
- .__remotion-vertical-scrollbar::-webkit-scrollbar-thumb {
30
- background-color: rgba(0, 0, 0, 0.0);
31
- }
32
- .__remotion-vertical-scrollbar:hover::-webkit-scrollbar-thumb {
33
- background-color: rgba(0, 0, 0, 0.6);
34
- }
35
- .__remotion-vertical-scrollbar:hover::-webkit-scrollbar-thumb:hover {
36
- background-color: rgba(0, 0, 0, 1);
37
- }
38
-
39
- .__remotion-horizontal-scrollbar::-webkit-scrollbar {
40
- height: 6px;
41
- }
42
- .__remotion-horizontal-scrollbar::-webkit-scrollbar-thumb {
43
- background-color: rgba(0, 0, 0, 0.0);
44
- }
45
- .__remotion-horizontal-scrollbar:hover::-webkit-scrollbar-thumb {
46
- background-color: rgba(0, 0, 0, 0.6);
47
- }
48
- .__remotion-horizontal-scrollbar:hover::-webkit-scrollbar-thumb:hover {
49
- background-color: rgba(0, 0, 0, 1);
50
- }
51
-
52
- .__remotion-timeline-slider {
53
- appearance: none;
54
- width: 100px;
55
- border-radius: 3px;
56
- height: 6px;
57
- background-color: rgba(255, 255, 255, 0.1);
58
- accent-color: #ffffff;
59
- }
60
-
61
- .__remotion-timeline-slider::-moz-range-thumb {
62
- width: 14px;
63
- height: 14px;
64
- border-radius: 50%;
65
- background-color: #ffffff;
66
- appearance: none;
67
- }
68
-
69
19
  `);
@@ -40,7 +40,8 @@ const remotionCacheLocation = (remotionRoot, environment, hash) => {
40
40
  return path_1.default.join(getWebpackCacheDir(remotionRoot), (0, exports.getWebpackCacheName)(environment, hash));
41
41
  };
42
42
  const clearCache = (remotionRoot) => {
43
- return fs_1.default.promises.rm(getWebpackCacheDir(remotionRoot), {
43
+ var _a;
44
+ return ((_a = fs_1.default.promises.rm) !== null && _a !== void 0 ? _a : fs_1.default.promises.rmdir)(getWebpackCacheDir(remotionRoot), {
44
45
  recursive: true,
45
46
  });
46
47
  };
@@ -1,6 +1,4 @@
1
- import type { Configuration } from 'webpack';
2
- export declare type WebpackConfiguration = Configuration;
3
- export declare type WebpackOverrideFn = (currentConfiguration: WebpackConfiguration) => WebpackConfiguration;
1
+ import type { WebpackConfiguration, WebpackOverrideFn } from 'remotion';
4
2
  export declare const webpackConfig: ({ entry, userDefinedComponent, outDir, environment, webpackOverride, onProgress, enableCaching, envVariables, maxTimelineTracks, entryPoints, remotionRoot, keyboardShortcutsEnabled, poll, }: {
5
3
  entry: string;
6
4
  userDefinedComponent: string;
package/package.json CHANGED
@@ -1,67 +1,66 @@
1
1
  {
2
- "name": "@remotion/bundler",
3
- "version": "4.0.0-alpha.217+27eff7599",
4
- "description": "Bundler for Remotion",
5
- "main": "dist/index.js",
6
- "sideEffects": false,
7
- "repository": {
8
- "url": "https://github.com/remotion-dev/remotion"
9
- },
10
- "bugs": {
11
- "url": "https://github.com/remotion-dev/remotion/issues"
12
- },
13
- "scripts": {
14
- "lint": "eslint src --ext ts,tsx",
15
- "build": "tsc -d",
16
- "watch": "tsc -w",
17
- "test": "vitest --run"
18
- },
19
- "files": [
20
- "dist",
21
- "react-shim.js"
22
- ],
23
- "author": "Jonny Burger <jonny@remotion.dev>",
24
- "license": "SEE LICENSE IN LICENSE.md",
25
- "dependencies": {
26
- "css-loader": "5.2.7",
27
- "esbuild": "0.16.12",
28
- "react-refresh": "0.9.0",
29
- "remotion": "4.0.0-alpha.217+27eff7599",
30
- "style-loader": "2.0.0",
31
- "webpack": "5.76.1"
32
- },
33
- "peerDependencies": {
34
- "react": ">=16.8.0",
35
- "react-dom": ">=16.8.0"
36
- },
37
- "devDependencies": {
38
- "@jonny/eslint-config": "3.0.266",
39
- "@types/node": "^16.7.5",
40
- "@types/react": "18.0.26",
41
- "@types/react-dom": "18.0.10",
42
- "@typescript-eslint/eslint-plugin": "5.18.0",
43
- "@typescript-eslint/parser": "5.18.0",
44
- "eslint": "8.25.0",
45
- "eslint-plugin-10x": "1.5.2",
46
- "eslint-plugin-react": "7.29.4",
47
- "eslint-plugin-react-hooks": "4.4.0",
48
- "prettier": "^2.7.1",
49
- "prettier-plugin-organize-imports": "^2.3.4",
50
- "react": "^18.0.0",
51
- "react-dom": "^18.0.0",
52
- "typescript": "^4.7.0",
53
- "vitest": "0.24.3"
54
- },
55
- "keywords": [
56
- "remotion",
57
- "ffmpeg",
58
- "video",
59
- "react",
60
- "webpack",
61
- "player"
62
- ],
63
- "publishConfig": {
64
- "access": "public"
65
- },
66
- "gitHead": "27eff759935b19b666e29f4f46dd5bdd6214e188"
67
- }
2
+ "name": "@remotion/bundler",
3
+ "version": "4.0.0-alpha4",
4
+ "description": "Bundler for Remotion",
5
+ "main": "dist/index.js",
6
+ "sideEffects": false,
7
+ "repository": {
8
+ "url": "https://github.com/remotion-dev/remotion"
9
+ },
10
+ "bugs": {
11
+ "url": "https://github.com/remotion-dev/remotion/issues"
12
+ },
13
+ "files": [
14
+ "dist",
15
+ "react-shim.js"
16
+ ],
17
+ "author": "Jonny Burger <jonny@remotion.dev>",
18
+ "license": "SEE LICENSE IN LICENSE.md",
19
+ "dependencies": {
20
+ "css-loader": "5.2.7",
21
+ "esbuild": "0.16.12",
22
+ "react-refresh": "0.9.0",
23
+ "remotion": "4.0.0-alpha4",
24
+ "style-loader": "2.0.0",
25
+ "webpack": "5.76.1"
26
+ },
27
+ "peerDependencies": {
28
+ "react": ">=16.8.0",
29
+ "react-dom": ">=16.8.0"
30
+ },
31
+ "devDependencies": {
32
+ "@jonny/eslint-config": "3.0.266",
33
+ "@types/node": "^16.7.5",
34
+ "@types/react": "18.0.26",
35
+ "@types/react-dom": "18.0.10",
36
+ "@typescript-eslint/eslint-plugin": "5.18.0",
37
+ "@typescript-eslint/parser": "5.18.0",
38
+ "eslint": "8.25.0",
39
+ "eslint-plugin-10x": "1.5.2",
40
+ "eslint-plugin-react": "7.29.4",
41
+ "eslint-plugin-react-hooks": "4.4.0",
42
+ "prettier": "^2.7.1",
43
+ "prettier-plugin-organize-imports": "^2.3.4",
44
+ "react": "^18.0.0",
45
+ "react-dom": "^18.0.0",
46
+ "typescript": "^4.7.0",
47
+ "vitest": "0.24.3"
48
+ },
49
+ "keywords": [
50
+ "remotion",
51
+ "ffmpeg",
52
+ "video",
53
+ "react",
54
+ "webpack",
55
+ "player"
56
+ ],
57
+ "publishConfig": {
58
+ "access": "public"
59
+ },
60
+ "scripts": {
61
+ "lint": "eslint src --ext ts,tsx",
62
+ "build": "tsc -d",
63
+ "watch": "tsc -w",
64
+ "test": "vitest --run"
65
+ }
66
+ }