@remotion/cli 4.0.44 → 4.0.45

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 (52) hide show
  1. package/dist/config/presets-profile.d.ts +3 -0
  2. package/dist/config/presets-profile.js +12 -0
  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/CurrentCompositionSideEffects.js +4 -0
  8. package/dist/editor/components/DownloadButton.d.ts +0 -0
  9. package/dist/editor/components/DownloadButton.js +1 -0
  10. package/dist/editor/components/EditorContent.js +3 -1
  11. package/dist/editor/components/FilePreview.d.ts +2 -1
  12. package/dist/editor/components/FilePreview.js +10 -3
  13. package/dist/editor/components/InitialCompositionLoader.js +9 -2
  14. package/dist/editor/components/LoopToggle.js +0 -7
  15. package/dist/editor/components/MuteToggle.js +0 -7
  16. package/dist/editor/components/PlayPause.js +0 -4
  17. package/dist/editor/components/Preview.d.ts +3 -2
  18. package/dist/editor/components/Preview.js +13 -72
  19. package/dist/editor/components/PreviewToolbar.js +4 -1
  20. package/dist/editor/components/RenderPreview.d.ts +2 -0
  21. package/dist/editor/components/RenderPreview.js +4 -3
  22. package/dist/editor/components/RenderQueue/RenderQueueCopyToClipboard.js +3 -2
  23. package/dist/editor/components/RenderQueue/RenderQueueItem.d.ts +1 -0
  24. package/dist/editor/components/RenderQueue/RenderQueueItem.js +55 -2
  25. package/dist/editor/components/RenderQueue/RenderQueueItemCancelButton.js +2 -1
  26. package/dist/editor/components/RenderQueue/RenderQueueItemStatus.js +35 -4
  27. package/dist/editor/components/RenderQueue/RenderQueueOpenInFolder.js +3 -2
  28. package/dist/editor/components/RenderQueue/RenderQueueOutputName.js +3 -11
  29. package/dist/editor/components/RenderQueue/RenderQueueRemoveItem.js +2 -1
  30. package/dist/editor/components/RenderQueue/RenderQueueRepeat.js +2 -1
  31. package/dist/editor/components/RenderQueue/index.js +16 -1
  32. package/dist/editor/components/SizeSelector.js +15 -6
  33. package/dist/editor/components/StaticFilePreview.d.ts +2 -0
  34. package/dist/editor/components/StaticFilePreview.js +2 -10
  35. package/dist/editor/components/TimelineInOutToggle.js +0 -6
  36. package/dist/editor/components/ZoomPersistor.js +9 -3
  37. package/dist/editor/components/layout.d.ts +2 -1
  38. package/dist/editor/components/layout.js +2 -2
  39. package/dist/editor/helpers/get-asset-metadata.d.ts +11 -0
  40. package/dist/editor/helpers/get-asset-metadata.js +64 -0
  41. package/dist/editor/helpers/is-current-selected-still.d.ts +1 -0
  42. package/dist/editor/helpers/is-current-selected-still.js +14 -1
  43. package/dist/handle-common-errors.d.ts +2 -0
  44. package/dist/handle-common-errors.js +60 -0
  45. package/dist/preview-server/routes.d.ts +5 -3
  46. package/dist/preview-server/routes.js +52 -8
  47. package/dist/preview-server/serve-static.d.ts +6 -1
  48. package/dist/preview-server/serve-static.js +1 -4
  49. package/dist/preview-server/start-server.d.ts +4 -2
  50. package/dist/preview-server/start-server.js +4 -2
  51. package/dist/studio.js +9 -4
  52. package/package.json +8 -8
@@ -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.45",
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/bundler": "4.0.45",
39
+ "@remotion/media-utils": "4.0.45",
40
+ "@remotion/renderer": "4.0.45",
41
+ "@remotion/player": "4.0.45",
42
+ "remotion": "4.0.45"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "react": ">=16.8.0",
@@ -65,8 +65,8 @@
65
65
  "react-dom": "^18.0.0",
66
66
  "vitest": "0.31.1",
67
67
  "zod": "^3.21.4",
68
- "@remotion/zod-types": "4.0.44",
69
- "@remotion/tailwind": "4.0.44"
68
+ "@remotion/zod-types": "4.0.45",
69
+ "@remotion/tailwind": "4.0.45"
70
70
  },
71
71
  "keywords": [
72
72
  "remotion",