@remotion/cli 4.0.44 → 4.0.46

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.
Files changed (57) hide show
  1. package/dist/config/index.d.ts +1 -1
  2. package/dist/config/log.d.ts +1 -1
  3. package/dist/editor/components/Canvas.js +10 -28
  4. package/dist/editor/components/CanvasOrLoading.js +1 -1
  5. package/dist/editor/components/CheckboardToggle.js +0 -5
  6. package/dist/editor/components/CompositionSelectorItem.js +1 -7
  7. package/dist/editor/components/CurrentComposition.d.ts +0 -1
  8. package/dist/editor/components/CurrentCompositionSideEffects.js +4 -0
  9. package/dist/editor/components/EditorContent.js +3 -1
  10. package/dist/editor/components/FilePreview.d.ts +2 -1
  11. package/dist/editor/components/FilePreview.js +10 -3
  12. package/dist/editor/components/InitialCompositionLoader.js +9 -2
  13. package/dist/editor/components/LoopToggle.js +0 -7
  14. package/dist/editor/components/MuteToggle.js +0 -7
  15. package/dist/editor/components/NewComposition/RemInput.d.ts +2 -2
  16. package/dist/editor/components/NewComposition/RemInputTypeColor.d.ts +1 -1
  17. package/dist/editor/components/PlayPause.js +0 -4
  18. package/dist/editor/components/Preview.d.ts +3 -2
  19. package/dist/editor/components/Preview.js +13 -72
  20. package/dist/editor/components/PreviewToolbar.js +4 -1
  21. package/dist/editor/components/RenderPreview.d.ts +2 -0
  22. package/dist/editor/components/RenderPreview.js +4 -3
  23. package/dist/editor/components/RenderQueue/RenderQueueCopyToClipboard.js +3 -2
  24. package/dist/editor/components/RenderQueue/RenderQueueItem.d.ts +1 -0
  25. package/dist/editor/components/RenderQueue/RenderQueueItem.js +55 -2
  26. package/dist/editor/components/RenderQueue/RenderQueueItemCancelButton.js +2 -1
  27. package/dist/editor/components/RenderQueue/RenderQueueItemStatus.js +35 -4
  28. package/dist/editor/components/RenderQueue/RenderQueueOpenInFolder.js +3 -2
  29. package/dist/editor/components/RenderQueue/RenderQueueOutputName.js +3 -11
  30. package/dist/editor/components/RenderQueue/RenderQueueRemoveItem.js +2 -1
  31. package/dist/editor/components/RenderQueue/RenderQueueRepeat.js +2 -1
  32. package/dist/editor/components/RenderQueue/index.js +16 -1
  33. package/dist/editor/components/SizeSelector.js +15 -6
  34. package/dist/editor/components/StaticFilePreview.d.ts +2 -0
  35. package/dist/editor/components/StaticFilePreview.js +2 -10
  36. package/dist/editor/components/TimelineInOutToggle.js +0 -6
  37. package/dist/editor/components/UpdateCheck.d.ts +0 -1
  38. package/dist/editor/components/ZoomPersistor.js +9 -3
  39. package/dist/editor/components/layout.d.ts +2 -1
  40. package/dist/editor/components/layout.js +2 -2
  41. package/dist/editor/helpers/colors.d.ts +1 -1
  42. package/dist/editor/helpers/get-asset-metadata.d.ts +11 -0
  43. package/dist/editor/helpers/get-asset-metadata.js +64 -0
  44. package/dist/editor/helpers/is-current-selected-still.d.ts +1 -0
  45. package/dist/editor/helpers/is-current-selected-still.js +14 -1
  46. package/dist/editor/helpers/render-modal-sections.d.ts +0 -1
  47. package/dist/get-cli-options.d.ts +2 -2
  48. package/dist/index.d.ts +10 -10
  49. package/dist/log.d.ts +4 -4
  50. package/dist/preview-server/routes.d.ts +5 -4
  51. package/dist/preview-server/routes.js +52 -8
  52. package/dist/preview-server/serve-static.d.ts +6 -1
  53. package/dist/preview-server/serve-static.js +1 -4
  54. package/dist/preview-server/start-server.d.ts +4 -2
  55. package/dist/preview-server/start-server.js +4 -2
  56. package/dist/studio.js +9 -4
  57. package/package.json +9 -9
package/dist/index.d.ts CHANGED
@@ -63,24 +63,24 @@ export declare const CliInternals: {
63
63
  verbose: (message?: any, ...optionalParams: any[]) => void;
64
64
  verboseAdvanced: (options: {
65
65
  indent: boolean;
66
- logLevel: "verbose" | "info" | "warn" | "error";
66
+ logLevel: "error" | "verbose" | "info" | "warn";
67
67
  } & {
68
68
  tag?: string | undefined;
69
69
  }, message?: any, ...optionalParams: any[]) => void;
70
70
  info: (message?: any, ...optionalParams: any[]) => void;
71
71
  infoAdvanced: (options: {
72
72
  indent: boolean;
73
- logLevel: "verbose" | "info" | "warn" | "error";
73
+ logLevel: "error" | "verbose" | "info" | "warn";
74
74
  }, message?: any, ...optionalParams: any[]) => void;
75
75
  warn: (message?: any, ...optionalParams: any[]) => void;
76
76
  warnAdvanced: (options: {
77
77
  indent: boolean;
78
- logLevel: "verbose" | "info" | "warn" | "error";
78
+ logLevel: "error" | "verbose" | "info" | "warn";
79
79
  }, message?: any, ...optionalParams: any[]) => void;
80
80
  error: (message?: any, ...optionalParams: any[]) => void;
81
81
  errorAdvanced: (options: {
82
82
  indent: boolean;
83
- logLevel: "verbose" | "info" | "warn" | "error";
83
+ logLevel: "error" | "verbose" | "info" | "warn";
84
84
  } & {
85
85
  tag?: string | undefined;
86
86
  }, message?: any, ...optionalParams: any[]) => void;
@@ -100,13 +100,13 @@ export declare const CliInternals: {
100
100
  browser: "chrome";
101
101
  crf: import("@remotion/renderer").Crf | null;
102
102
  pixelFormat: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
103
- proResProfile: "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | undefined;
103
+ proResProfile: "light" | "4444-xq" | "4444" | "hq" | "standard" | "proxy" | undefined;
104
104
  x264Preset: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | undefined;
105
105
  everyNthFrame: number;
106
106
  numberOfGifLoops: import("./config/number-of-gif-loops").Loop;
107
107
  stillFrame: number;
108
108
  browserExecutable: import("@remotion/renderer").BrowserExecutable;
109
- logLevel: "verbose" | "info" | "warn" | "error";
109
+ logLevel: "error" | "verbose" | "info" | "warn";
110
110
  scale: number;
111
111
  chromiumOptions: import("@remotion/renderer").ChromiumOptions;
112
112
  overwrite: boolean;
@@ -132,7 +132,7 @@ export declare const CliInternals: {
132
132
  "browser-executable": import("@remotion/renderer").BrowserExecutable;
133
133
  "pixel-format": "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
134
134
  "image-format": "none" | "png" | "jpeg" | "pdf" | "webp";
135
- "prores-profile": "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy";
135
+ "prores-profile": "light" | "4444-xq" | "4444" | "hq" | "standard" | "proxy";
136
136
  "x264-preset": "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo";
137
137
  "bundle-cache": string;
138
138
  "env-file": string;
@@ -190,7 +190,7 @@ export declare const CliInternals: {
190
190
  } & {
191
191
  _: string[];
192
192
  };
193
- printError: (err: Error, logLevel: "verbose" | "info" | "warn" | "error") => Promise<void>;
193
+ printError: (err: Error, logLevel: "error" | "verbose" | "info" | "warn") => Promise<void>;
194
194
  formatBytes: (number: number, options?: Intl.NumberFormatOptions & {
195
195
  locale: string;
196
196
  bits?: boolean | undefined;
@@ -232,7 +232,7 @@ export declare const CliInternals: {
232
232
  };
233
233
  listOfRemotionPackages: string[];
234
234
  shouldUseNonOverlayingLogger: ({ logLevel, }: {
235
- logLevel: "verbose" | "info" | "warn" | "error";
235
+ logLevel: "error" | "verbose" | "info" | "warn";
236
236
  }) => boolean;
237
237
  getCompositionWithDimensionOverride: ({ height, width, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent, serializedInputPropsWithCustomSchema, logLevel, server, offthreadVideoCacheSizeInBytes, }: {
238
238
  height: number | null;
@@ -247,7 +247,7 @@ export declare const CliInternals: {
247
247
  browserExecutable: import("@remotion/renderer").BrowserExecutable;
248
248
  serveUrlOrWebpackUrl: string;
249
249
  indent: boolean;
250
- logLevel: "verbose" | "info" | "warn" | "error";
250
+ logLevel: "error" | "verbose" | "info" | "warn";
251
251
  serializedInputPropsWithCustomSchema: string;
252
252
  server: import("@remotion/renderer").RemotionServer;
253
253
  offthreadVideoCacheSizeInBytes: number | null;
package/dist/log.d.ts CHANGED
@@ -2,24 +2,24 @@ export declare const Log: {
2
2
  verbose: (message?: any, ...optionalParams: any[]) => void;
3
3
  verboseAdvanced: (options: {
4
4
  indent: boolean;
5
- logLevel: "verbose" | "info" | "warn" | "error";
5
+ logLevel: "error" | "verbose" | "info" | "warn";
6
6
  } & {
7
7
  tag?: string | undefined;
8
8
  }, message?: any, ...optionalParams: any[]) => void;
9
9
  info: (message?: any, ...optionalParams: any[]) => void;
10
10
  infoAdvanced: (options: {
11
11
  indent: boolean;
12
- logLevel: "verbose" | "info" | "warn" | "error";
12
+ logLevel: "error" | "verbose" | "info" | "warn";
13
13
  }, message?: any, ...optionalParams: any[]) => void;
14
14
  warn: (message?: any, ...optionalParams: any[]) => void;
15
15
  warnAdvanced: (options: {
16
16
  indent: boolean;
17
- logLevel: "verbose" | "info" | "warn" | "error";
17
+ logLevel: "error" | "verbose" | "info" | "warn";
18
18
  }, message?: any, ...optionalParams: any[]) => void;
19
19
  error: (message?: any, ...optionalParams: any[]) => void;
20
20
  errorAdvanced: (options: {
21
21
  indent: boolean;
22
- logLevel: "verbose" | "info" | "warn" | "error";
22
+ logLevel: "error" | "verbose" | "info" | "warn";
23
23
  } & {
24
24
  tag?: string | undefined;
25
25
  }, message?: any, ...optionalParams: any[]) => void;
@@ -1,9 +1,10 @@
1
- /// <reference types="node" />
2
1
  import type { IncomingMessage, ServerResponse } from 'node:http';
3
2
  import type { LiveEventsServer } from './live-events';
4
- export declare const handleRoutes: ({ hash, hashPrefix, request, response, liveEventsServer, getCurrentInputProps, getEnvVariables, remotionRoot, entryPoint, publicDir, }: {
5
- hash: string;
6
- hashPrefix: string;
3
+ export declare const handleRoutes: ({ staticHash, staticHashPrefix, outputHash, outputHashPrefix, request, response, liveEventsServer, getCurrentInputProps, getEnvVariables, remotionRoot, entryPoint, publicDir, }: {
4
+ staticHash: string;
5
+ staticHashPrefix: string;
6
+ outputHash: string;
7
+ outputHashPrefix: string;
7
8
  request: IncomingMessage;
8
9
  response: ServerResponse;
9
10
  liveEventsServer: LiveEventsServer;
@@ -1,13 +1,33 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
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;
4
24
  };
5
25
  Object.defineProperty(exports, "__esModule", { value: true });
6
26
  exports.handleRoutes = void 0;
7
27
  const bundler_1 = require("@remotion/bundler");
8
28
  const renderer_1 = require("@remotion/renderer");
9
29
  const node_fs_1 = require("node:fs");
10
- const node_path_1 = __importDefault(require("node:path"));
30
+ const node_path_1 = __importStar(require("node:path"));
11
31
  const node_url_1 = require("node:url");
12
32
  const config_1 = require("../config");
13
33
  const number_of_shared_audio_tags_1 = require("../config/number-of-shared-audio-tags");
@@ -27,6 +47,10 @@ const static404 = (response) => {
27
47
  response.writeHead(404);
28
48
  response.end('The static/ prefix has been changed, this URL is no longer valid.');
29
49
  };
50
+ const output404 = (response) => {
51
+ response.writeHead(404);
52
+ response.end('The outputs/ prefix has been changed, this URL is no longer valid.');
53
+ };
30
54
  const handleFallback = async ({ remotionRoot, hash, response, getCurrentInputProps, getEnvVariables, publicDir, }) => {
31
55
  var _a, _b, _c;
32
56
  const [edit] = await editorGuess;
@@ -176,7 +200,7 @@ const handleFavicon = (_, response) => {
176
200
  const readStream = (0, node_fs_1.createReadStream)(filePath);
177
201
  readStream.pipe(response);
178
202
  };
179
- const handleRoutes = ({ hash, hashPrefix, request, response, liveEventsServer, getCurrentInputProps, getEnvVariables, remotionRoot, entryPoint, publicDir, }) => {
203
+ const handleRoutes = ({ staticHash, staticHashPrefix, outputHash, outputHashPrefix, request, response, liveEventsServer, getCurrentInputProps, getEnvVariables, remotionRoot, entryPoint, publicDir, }) => {
180
204
  const url = new URL(request.url, 'http://localhost');
181
205
  if (url.pathname === '/api/project-info') {
182
206
  return handleProjectInfo(remotionRoot, request, response);
@@ -209,15 +233,35 @@ const handleRoutes = ({ hash, hashPrefix, request, response, liveEventsServer, g
209
233
  if (url.pathname === '/events') {
210
234
  return liveEventsServer.router(request, response);
211
235
  }
212
- if (url.pathname.startsWith(hash)) {
213
- return (0, serve_static_1.serveStatic)(publicDir, hash, request, response);
236
+ if (url.pathname.startsWith(staticHash)) {
237
+ const filename = new URL(request.url, 'http://localhost').pathname.replace(new RegExp(`^${staticHash}`), '');
238
+ const filePath = (0, node_path_1.join)(publicDir, decodeURIComponent(filename));
239
+ return (0, serve_static_1.serveStatic)({
240
+ root: publicDir,
241
+ path: filePath,
242
+ req: request,
243
+ res: response,
244
+ });
214
245
  }
215
- if (url.pathname.startsWith(hashPrefix)) {
246
+ if (url.pathname.startsWith(staticHashPrefix)) {
216
247
  return static404(response);
217
248
  }
249
+ if (url.pathname.startsWith(outputHash)) {
250
+ const filename = new URL(request.url, 'http://localhost').pathname.replace(new RegExp(`^${outputHash}`), '');
251
+ const filePath = (0, node_path_1.join)(remotionRoot, decodeURIComponent(filename));
252
+ return (0, serve_static_1.serveStatic)({
253
+ root: remotionRoot,
254
+ path: filePath,
255
+ req: request,
256
+ res: response,
257
+ });
258
+ }
259
+ if (url.pathname.startsWith(outputHashPrefix)) {
260
+ return output404(response);
261
+ }
218
262
  return handleFallback({
219
263
  remotionRoot,
220
- hash,
264
+ hash: staticHash,
221
265
  response,
222
266
  getCurrentInputProps,
223
267
  getEnvVariables,
@@ -6,4 +6,9 @@
6
6
  * MIT Licensed
7
7
  */
8
8
  import type { IncomingMessage, ServerResponse } from 'node:http';
9
- export declare const serveStatic: (root: string, hash: string, req: IncomingMessage, res: ServerResponse) => Promise<void>;
9
+ export declare const serveStatic: ({ root, path, req, res, }: {
10
+ root: string;
11
+ path: string;
12
+ req: IncomingMessage;
13
+ res: ServerResponse;
14
+ }) => Promise<void>;
@@ -10,10 +10,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.serveStatic = void 0;
11
11
  const renderer_1 = require("@remotion/renderer");
12
12
  const node_fs_1 = require("node:fs");
13
- const node_path_1 = require("node:path");
14
13
  const middleware_1 = require("./dev-middleware/middleware");
15
14
  const range_parser_1 = require("./dev-middleware/range-parser");
16
- const serveStatic = async function (root, hash, req, res) {
15
+ const serveStatic = async function ({ root, path, req, res, }) {
17
16
  if (req.method !== 'GET' && req.method !== 'HEAD') {
18
17
  // method not allowed
19
18
  res.statusCode = 405;
@@ -22,8 +21,6 @@ const serveStatic = async function (root, hash, req, res) {
22
21
  res.end();
23
22
  return;
24
23
  }
25
- const filename = new URL(req.url, 'http://localhost').pathname.replace(new RegExp(`^${hash}`), '');
26
- const path = (0, node_path_1.join)(root, decodeURIComponent(filename));
27
24
  if (!renderer_1.RenderInternals.isPathInside(path, root)) {
28
25
  res.writeHead(500);
29
26
  res.write('Not allowed to read');
@@ -13,8 +13,10 @@ export declare const startServer: (options: {
13
13
  publicDir: string;
14
14
  userPassedPublicDir: string | null;
15
15
  poll: number | null;
16
- hash: string;
17
- hashPrefix: string;
16
+ staticHash: string;
17
+ staticHashPrefix: string;
18
+ outputHash: string;
19
+ outputHashPrefix: string;
18
20
  }) => Promise<{
19
21
  port: number;
20
22
  liveEventsServer: LiveEventsServer;
@@ -50,8 +50,10 @@ const startServer = async (options) => {
50
50
  })
51
51
  .then(() => {
52
52
  (0, routes_1.handleRoutes)({
53
- hash: options.hash,
54
- hashPrefix: options.hashPrefix,
53
+ staticHash: options.staticHash,
54
+ staticHashPrefix: options.staticHashPrefix,
55
+ outputHash: options.outputHash,
56
+ outputHashPrefix: options.outputHashPrefix,
55
57
  request: request,
56
58
  response,
57
59
  liveEventsServer,
package/dist/studio.js CHANGED
@@ -86,8 +86,11 @@ const studioCommand = async (remotionRoot, args) => {
86
86
  userPassedPublicDir: config_1.ConfigInternals.getPublicDir(),
87
87
  remotionRoot,
88
88
  });
89
- const hashPrefix = '/static-';
90
- const staticHash = `${hashPrefix}${node_crypto_1.default.randomBytes(6).toString('hex')}`;
89
+ const hash = node_crypto_1.default.randomBytes(6).toString('hex');
90
+ const outputHashPrefix = '/outputs-';
91
+ const outputHash = `${outputHashPrefix}${hash}`;
92
+ const staticHashPrefix = '/static-';
93
+ const staticHash = `${staticHashPrefix}${hash}`;
91
94
  (0, public_folder_1.initPublicFolderWatch)({
92
95
  publicDir,
93
96
  remotionRoot,
@@ -121,8 +124,10 @@ const studioCommand = async (remotionRoot, args) => {
121
124
  webpackOverride: config_1.ConfigInternals.getWebpackOverrideFn(),
122
125
  poll: config_1.ConfigInternals.getWebpackPolling(),
123
126
  userPassedPublicDir: config_1.ConfigInternals.getPublicDir(),
124
- hash: staticHash,
125
- hashPrefix,
127
+ staticHash,
128
+ staticHashPrefix,
129
+ outputHash,
130
+ outputHashPrefix,
126
131
  });
127
132
  (0, live_events_1.setLiveEventsListener)(liveEventsServer);
128
133
  const networkAddress = (0, get_network_address_1.getNetworkAddress)();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/cli",
3
- "version": "4.0.44",
3
+ "version": "4.0.46",
4
4
  "description": "CLI for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -35,11 +35,11 @@
35
35
  "prompts": "2.4.1",
36
36
  "semver": "7.5.3",
37
37
  "source-map": "0.6.1",
38
- "@remotion/bundler": "4.0.44",
39
- "@remotion/media-utils": "4.0.44",
40
- "@remotion/player": "4.0.44",
41
- "@remotion/renderer": "4.0.44",
42
- "remotion": "4.0.44"
38
+ "@remotion/player": "4.0.46",
39
+ "@remotion/media-utils": "4.0.46",
40
+ "@remotion/renderer": "4.0.46",
41
+ "@remotion/bundler": "4.0.46",
42
+ "remotion": "4.0.46"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "react": ">=16.8.0",
@@ -64,9 +64,9 @@
64
64
  "react": "^18.0.0",
65
65
  "react-dom": "^18.0.0",
66
66
  "vitest": "0.31.1",
67
- "zod": "^3.21.4",
68
- "@remotion/zod-types": "4.0.44",
69
- "@remotion/tailwind": "4.0.44"
67
+ "zod": "^3.22.3",
68
+ "@remotion/zod-types": "4.0.46",
69
+ "@remotion/tailwind": "4.0.46"
70
70
  },
71
71
  "keywords": [
72
72
  "remotion",