@remotion/studio-server 4.0.133 → 4.0.135

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.
@@ -8,17 +8,17 @@ const can_update_default_props_1 = require("./can-update-default-props");
8
8
  const updateDefaultPropsHandler = async ({ input: { compositionId, defaultProps, enumPaths }, remotionRoot }) => {
9
9
  try {
10
10
  const projectInfo = await (0, project_info_1.getProjectInfo)(remotionRoot);
11
- if (!projectInfo.videoFile) {
11
+ if (!projectInfo.rootFile) {
12
12
  throw new Error('Cannot find root file in project');
13
13
  }
14
- (0, can_update_default_props_1.checkIfTypeScriptFile)(projectInfo.videoFile);
14
+ (0, can_update_default_props_1.checkIfTypeScriptFile)(projectInfo.rootFile);
15
15
  const updated = await (0, update_default_props_1.updateDefaultProps)({
16
16
  compositionId,
17
- input: (0, node_fs_1.readFileSync)(projectInfo.videoFile, 'utf-8'),
17
+ input: (0, node_fs_1.readFileSync)(projectInfo.rootFile, 'utf-8'),
18
18
  newDefaultProps: JSON.parse(defaultProps),
19
19
  enumPaths,
20
20
  });
21
- (0, node_fs_1.writeFileSync)(projectInfo.videoFile, updated);
21
+ (0, node_fs_1.writeFileSync)(projectInfo.rootFile, updated);
22
22
  return {
23
23
  success: true,
24
24
  };
package/dist/routes.js CHANGED
@@ -36,7 +36,6 @@ const api_routes_1 = require("./preview-server/api-routes");
36
36
  const get_package_manager_1 = require("./preview-server/get-package-manager");
37
37
  const handler_1 = require("./preview-server/handler");
38
38
  const parse_body_1 = require("./preview-server/parse-body");
39
- const project_info_1 = require("./preview-server/project-info");
40
39
  const public_folder_1 = require("./preview-server/public-folder");
41
40
  const serve_static_1 = require("./preview-server/serve-static");
42
41
  const editorGuess = (0, open_in_editor_1.guessEditor)();
@@ -78,12 +77,6 @@ const handleFallback = async ({ remotionRoot, hash, response, getCurrentInputPro
78
77
  }),
79
78
  }));
80
79
  };
81
- const handleProjectInfo = async (remotionRoot, _, response) => {
82
- const data = await (0, project_info_1.getProjectInfo)(remotionRoot);
83
- response.setHeader('content-type', 'application/json');
84
- response.writeHead(200);
85
- response.end(JSON.stringify(data));
86
- };
87
80
  const handleFileSource = async ({ method, remotionRoot, search, response, }) => {
88
81
  if (method === 'OPTIONS') {
89
82
  response.writeHead(200);
@@ -197,9 +190,6 @@ const handleWasm = (_, response) => {
197
190
  };
198
191
  const handleRoutes = ({ staticHash, staticHashPrefix, outputHash, outputHashPrefix, request, response, liveEventsServer, getCurrentInputProps, getEnvVariables, remotionRoot, entryPoint, publicDir, logLevel, getRenderQueue, getRenderDefaults, numberOfAudioTags, queueMethods: methods, gitSource, binariesDirectory, }) => {
199
192
  const url = new URL(request.url, 'http://localhost');
200
- if (url.pathname === '/api/project-info') {
201
- return handleProjectInfo(remotionRoot, request, response);
202
- }
203
193
  if (url.pathname === '/api/file-source') {
204
194
  return handleFileSource({
205
195
  remotionRoot,
@@ -6,11 +6,11 @@ const live_events_1 = require("./preview-server/live-events");
6
6
  const project_info_1 = require("./preview-server/project-info");
7
7
  const watchRootFile = async (remotionRoot) => {
8
8
  const rootFile = await (0, project_info_1.getProjectInfo)(remotionRoot);
9
- if (!rootFile.videoFile) {
9
+ if (!rootFile.rootFile) {
10
10
  return;
11
11
  }
12
12
  (0, file_watcher_1.installFileWatcher)({
13
- file: rootFile.videoFile,
13
+ file: rootFile.rootFile,
14
14
  onChange: () => {
15
15
  // Don't care if changed, added or deleted - should trigger a refetch in the frontend all the time
16
16
  (0, live_events_1.waitForLiveEventsListener)().then((listener) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/studio-server",
3
- "version": "4.0.133",
3
+ "version": "4.0.135",
4
4
  "description": "Remotion Editor",
5
5
  "main": "dist",
6
6
  "sideEffects": false,
@@ -17,20 +17,23 @@
17
17
  "access": "public"
18
18
  },
19
19
  "dependencies": {
20
+ "@babel/parser": "7.24.1",
20
21
  "semver": "7.5.3",
22
+ "recast": "0.23.6",
21
23
  "memfs": "3.4.3",
22
24
  "source-map": "0.7.3",
23
25
  "open": "^8.4.2",
24
- "remotion": "4.0.133",
25
- "@remotion/bundler": "4.0.133",
26
- "@remotion/studio-shared": "4.0.133",
27
- "@remotion/renderer": "4.0.133"
26
+ "remotion": "4.0.135",
27
+ "@remotion/bundler": "4.0.135",
28
+ "@remotion/studio-shared": "4.0.135",
29
+ "@remotion/renderer": "4.0.135"
28
30
  },
29
31
  "devDependencies": {
30
32
  "react": "18.2.0",
31
33
  "@jonny/eslint-config": "3.0.276",
32
34
  "@types/node": "18.14.6",
33
35
  "@types/react": "18.2.48",
36
+ "@babel/types": "7.24.0",
34
37
  "eslint": "8.42.0",
35
38
  "eslint-plugin-10x": "1.5.2",
36
39
  "eslint-plugin-react": "7.32.2",