@remotion/studio-server 4.0.516 → 4.0.517

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.
@@ -1,11 +1,9 @@
1
1
  import { deleteJsxElementAtPath, findJsxElementPathForDeletion, getJsxElementTagLabel } from '@remotion/studio-codemods';
2
2
  import type { SequenceNodePath } from 'remotion';
3
3
  export { deleteJsxElementAtPath, findJsxElementPathForDeletion, getJsxElementTagLabel, };
4
- export declare const deleteJsxNodes: ({ input, nodePaths, onFormatFile, prettierConfigOverride, }: {
4
+ export declare const deleteJsxNodes: ({ input, nodePaths, }: {
5
5
  input: string;
6
6
  nodePaths: SequenceNodePath[];
7
- onFormatFile: ((stage: "complete" | "start") => void) | null;
8
- prettierConfigOverride?: Record<string, unknown> | null | undefined;
9
7
  }) => Promise<{
10
8
  output: string;
11
9
  formatted: boolean;
@@ -16,10 +14,9 @@ export declare const deleteJsxNodes: ({ input, nodePaths, onFormatFile, prettier
16
14
  newNodePath: SequenceNodePath | null;
17
15
  }[];
18
16
  }>;
19
- export declare const deleteJsxNode: ({ input, nodePath, prettierConfigOverride, }: {
17
+ export declare const deleteJsxNode: ({ input, nodePath, }: {
20
18
  input: string;
21
19
  nodePath: SequenceNodePath;
22
- prettierConfigOverride?: Record<string, unknown> | null | undefined;
23
20
  }) => Promise<{
24
21
  output: string;
25
22
  formatted: boolean;
@@ -5,29 +5,13 @@ const studio_codemods_1 = require("@remotion/studio-codemods");
5
5
  Object.defineProperty(exports, "deleteJsxElementAtPath", { enumerable: true, get: function () { return studio_codemods_1.deleteJsxElementAtPath; } });
6
6
  Object.defineProperty(exports, "findJsxElementPathForDeletion", { enumerable: true, get: function () { return studio_codemods_1.findJsxElementPathForDeletion; } });
7
7
  Object.defineProperty(exports, "getJsxElementTagLabel", { enumerable: true, get: function () { return studio_codemods_1.getJsxElementTagLabel; } });
8
- const format_file_content_1 = require("./format-file-content");
9
- const deleteJsxNodes = ({ input, nodePaths, onFormatFile, prettierConfigOverride, }) => (0, studio_codemods_1.deleteJsxNodes)({
8
+ const deleteJsxNodes = ({ input, nodePaths, }) => (0, studio_codemods_1.deleteJsxNodes)({
10
9
  input,
11
10
  nodePaths,
12
- formatFile: async ({ contents, prettierConfigOverride: override }) => {
13
- onFormatFile === null || onFormatFile === void 0 ? void 0 : onFormatFile('start');
14
- const result = await (0, format_file_content_1.formatFileContent)({
15
- input: contents,
16
- prettierConfigOverride: override,
17
- });
18
- onFormatFile === null || onFormatFile === void 0 ? void 0 : onFormatFile('complete');
19
- return result;
20
- },
21
- prettierConfigOverride,
22
11
  });
23
12
  exports.deleteJsxNodes = deleteJsxNodes;
24
- const deleteJsxNode = ({ input, nodePath, prettierConfigOverride, }) => (0, studio_codemods_1.deleteJsxNode)({
13
+ const deleteJsxNode = ({ input, nodePath, }) => (0, studio_codemods_1.deleteJsxNode)({
25
14
  input,
26
15
  nodePath,
27
- formatFile: ({ contents, prettierConfigOverride: override }) => (0, format_file_content_1.formatFileContent)({
28
- input: contents,
29
- prettierConfigOverride: override,
30
- }),
31
- prettierConfigOverride,
32
16
  });
33
17
  exports.deleteJsxNode = deleteJsxNode;
@@ -44,10 +44,10 @@ const getStatusForSkillsDirectory = ({ currentVersion, scope, skillsDirectory, }
44
44
  }
45
45
  const outdatedSkillNames = remotion_skill_names_1.remotionSkillNames.filter((skillName) => {
46
46
  const skill = installedSkills.get(skillName);
47
- return (!(skill === null || skill === void 0 ? void 0 : skill.installed) ||
48
- skill.version === null ||
49
- semver_1.default.valid(skill.version) === null ||
50
- semver_1.default.lt(skill.version, currentVersion));
47
+ return ((skill === null || skill === void 0 ? void 0 : skill.installed) &&
48
+ (skill.version === null ||
49
+ semver_1.default.valid(skill.version) === null ||
50
+ semver_1.default.lt(skill.version, currentVersion)));
51
51
  });
52
52
  if (outdatedSkillNames.length > 0) {
53
53
  return { type: 'outdated', scope, skillsDirectory, outdatedSkillNames };
@@ -10,7 +10,6 @@ const format_log_file_location_1 = require("../format-log-file-location");
10
10
  const hmr_timing_1 = require("../hmr-timing");
11
11
  const sequence_node_path_mutation_1 = require("../sequence-node-path-mutation");
12
12
  const undo_stack_1 = require("../undo-stack");
13
- const log_update_1 = require("./log-updates/log-update");
14
13
  const source_file_write_queue_1 = require("./source-file-write-queue");
15
14
  const getDeletedNodeDescription = (nodeLabels) => {
16
15
  if (nodeLabels.length === 1) {
@@ -44,23 +43,15 @@ const deleteJsxNodeHandler = ({ input: { nodes }, remotionRoot, logLevel }) => {
44
43
  action: 'modify',
45
44
  });
46
45
  const fileContents = (0, node_fs_1.readFileSync)(absolutePath, 'utf-8');
47
- const { output, formatted, nodeLabels, logLines, nodePathRemappings } = await (0, delete_jsx_node_1.deleteJsxNodes)({
46
+ const { output, nodeLabels, logLines, nodePathRemappings } = await (0, delete_jsx_node_1.deleteJsxNodes)({
48
47
  input: fileContents,
49
48
  nodePaths: fileItems.map((item) => item.nodePath),
50
- onFormatFile: (stage) => {
51
- (0, hmr_timing_1.logHmrTiming)({
52
- detail: `file=${fileRelativeToRoot}`,
53
- logLevel,
54
- stage: `source-file-format-${stage}`,
55
- });
56
- },
57
49
  });
58
50
  return {
59
51
  absolutePath,
60
52
  fileRelativeToRoot,
61
53
  fileContents,
62
54
  output,
63
- formatted,
64
55
  nodeLabels,
65
56
  nodePathRemappings,
66
57
  logLine: Math.min(...logLines),
@@ -116,10 +107,7 @@ const deleteJsxNodeHandler = ({ input: { nodes }, remotionRoot, logLevel }) => {
116
107
  line: update.logLine,
117
108
  });
118
109
  renderer_1.RenderInternals.Log.info({ indent: false, logLevel }, `${(0, source_file_write_queue_1.getCodemodTimingPrefix)(logLevel)}${renderer_1.RenderInternals.chalk.blueBright(`${locationLabel}`)} Deleted ${deletedNodeDescription}`);
119
- if (!update.formatted) {
120
- (0, log_update_1.warnAboutPrettierOnce)(logLevel);
121
- }
122
- renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel }, `[delete-jsx-node] Wrote ${update.fileRelativeToRoot}${update.formatted ? ' (formatted)' : ''}`);
110
+ renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel }, `[delete-jsx-node] Wrote ${update.fileRelativeToRoot}`);
123
111
  }
124
112
  (0, undo_stack_1.printUndoHint)(logLevel);
125
113
  return {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/studio-server"
4
4
  },
5
5
  "name": "@remotion/studio-server",
6
- "version": "4.0.516",
6
+ "version": "4.0.517",
7
7
  "description": "Run a Remotion Studio with a server backend",
8
8
  "main": "dist",
9
9
  "scripts": {
@@ -23,7 +23,7 @@
23
23
  "access": "public"
24
24
  },
25
25
  "dependencies": {
26
- "@remotion/studio-protocol": "4.0.516",
26
+ "@remotion/studio-protocol": "4.0.517",
27
27
  "@babel/types": "7.24.0",
28
28
  "@babel/parser": "7.24.1",
29
29
  "@svgr/core": "8.1.0",
@@ -32,12 +32,12 @@
32
32
  "semver": "7.5.3",
33
33
  "zod": "4.4.3",
34
34
  "prettier": "3.8.1",
35
- "remotion": "4.0.516",
35
+ "remotion": "4.0.517",
36
36
  "recast": "0.23.21",
37
- "@remotion/bundler": "4.0.516",
38
- "@remotion/renderer": "4.0.516",
39
- "@remotion/studio-codemods": "4.0.516",
40
- "@remotion/studio-shared": "4.0.516",
37
+ "@remotion/bundler": "4.0.517",
38
+ "@remotion/renderer": "4.0.517",
39
+ "@remotion/studio-codemods": "4.0.517",
40
+ "@remotion/studio-shared": "4.0.517",
41
41
  "memfs": "3.4.3",
42
42
  "open": "8.4.2"
43
43
  },
@@ -45,7 +45,7 @@
45
45
  "ast-types": "0.16.1",
46
46
  "react": "19.2.3",
47
47
  "@types/semver": "7.5.3",
48
- "@remotion/eslint-config-internal": "4.0.516",
48
+ "@remotion/eslint-config-internal": "4.0.517",
49
49
  "eslint": "9.19.0",
50
50
  "@types/node": "20.12.14",
51
51
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
@@ -1,3 +0,0 @@
1
- import type { DeleteEffectKeyframeRequest, DeleteEffectKeyframeResponse } from '@remotion/studio-shared';
2
- import type { ApiHandler } from '../api-types';
3
- export declare const deleteEffectKeyframeHandler: ApiHandler<DeleteEffectKeyframeRequest, DeleteEffectKeyframeResponse>;
@@ -1,89 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deleteEffectKeyframeHandler = void 0;
4
- const node_fs_1 = require("node:fs");
5
- const renderer_1 = require("@remotion/renderer");
6
- const studio_shared_1 = require("@remotion/studio-shared");
7
- const parse_ast_1 = require("../../codemods/parse-ast");
8
- const update_keyframes_1 = require("../../codemods/update-keyframes/update-keyframes");
9
- const file_watcher_1 = require("../../file-watcher");
10
- const resolve_file_inside_project_1 = require("../../helpers/resolve-file-inside-project");
11
- const undo_stack_1 = require("../undo-stack");
12
- const watch_ignore_next_change_1 = require("../watch-ignore-next-change");
13
- const can_update_effect_props_1 = require("./can-update-effect-props");
14
- const can_update_sequence_props_1 = require("./can-update-sequence-props");
15
- const log_effect_update_1 = require("./log-updates/log-effect-update");
16
- const save_props_mutex_1 = require("./save-props-mutex");
17
- const deleteEffectKeyframeHandler = ({ input: { fileName, sequenceNodePath, effectIndex, key, frame, schema, clientId, }, remotionRoot, logLevel, }) => (0, save_props_mutex_1.withSavePropsLock)(async () => {
18
- renderer_1.RenderInternals.Log.trace({ indent: false, logLevel }, `[delete-effect-keyframe] Received request for fileName="${fileName}" effectIndex=${effectIndex} key="${key}" frame=${frame}`);
19
- const { absolutePath, fileRelativeToRoot } = (0, resolve_file_inside_project_1.resolveFileInsideProject)({
20
- remotionRoot,
21
- fileName,
22
- action: 'modify',
23
- });
24
- const fileContents = (0, node_fs_1.readFileSync)(absolutePath, 'utf-8');
25
- const { output, oldValueStrings, newValueStrings, formatted, logLine, effectCallee, } = await (0, update_keyframes_1.updateEffectKeyframes)({
26
- input: fileContents,
27
- sequenceNodePath: sequenceNodePath.nodePath,
28
- effectIndex,
29
- updates: [
30
- {
31
- key,
32
- operation: {
33
- type: 'remove',
34
- frame,
35
- },
36
- },
37
- ],
38
- });
39
- const oldValueString = oldValueStrings[0];
40
- const newValueString = newValueStrings[0];
41
- const undoPropChange = `${key} keyframe restored at frame ${frame}`;
42
- const redoPropChange = `${key} keyframe deleted at frame ${frame}`;
43
- (0, undo_stack_1.pushToUndoStack)({
44
- filePath: absolutePath,
45
- oldContents: fileContents,
46
- newContents: null,
47
- logLevel,
48
- remotionRoot,
49
- logLine,
50
- description: {
51
- undoMessage: `↩️ ${undoPropChange}`,
52
- redoMessage: `↪️ ${redoPropChange}`,
53
- },
54
- entryType: 'effect-props',
55
- suppressHmrOnFileRestore: true,
56
- });
57
- (0, undo_stack_1.suppressUndoStackInvalidation)(absolutePath);
58
- (0, watch_ignore_next_change_1.suppressBundlerUpdateForFile)(absolutePath);
59
- (0, file_watcher_1.writeFileAndNotifyFileWatchers)(absolutePath, output, clientId);
60
- (0, log_effect_update_1.logEffectUpdate)({
61
- fileRelativeToRoot,
62
- line: logLine,
63
- effectName: effectCallee,
64
- propKey: key,
65
- oldValueString,
66
- newValueString,
67
- defaultValueString: null,
68
- formatted,
69
- logLevel,
70
- removedProps: [],
71
- addedProps: [],
72
- });
73
- (0, undo_stack_1.printUndoHint)(logLevel);
74
- const ast = (0, parse_ast_1.parseAst)((0, node_fs_1.readFileSync)(absolutePath, 'utf-8'));
75
- const jsx = (0, can_update_sequence_props_1.findJsxElementAtNodePath)(ast, sequenceNodePath.nodePath);
76
- if (!jsx) {
77
- return {
78
- canUpdate: false,
79
- effectIndex,
80
- reason: 'not-found',
81
- };
82
- }
83
- return (0, can_update_effect_props_1.computeEffectPropStatus)({
84
- jsx,
85
- effectIndex,
86
- keys: (0, studio_shared_1.getAllSchemaKeys)(schema),
87
- });
88
- });
89
- exports.deleteEffectKeyframeHandler = deleteEffectKeyframeHandler;
@@ -1,3 +0,0 @@
1
- import type { DeleteSequenceKeyframeRequest, DeleteSequenceKeyframeResponse } from '@remotion/studio-shared';
2
- import type { ApiHandler } from '../api-types';
3
- export declare const deleteSequenceKeyframeHandler: ApiHandler<DeleteSequenceKeyframeRequest, DeleteSequenceKeyframeResponse>;
@@ -1,82 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deleteSequenceKeyframeHandler = void 0;
4
- const node_fs_1 = require("node:fs");
5
- const renderer_1 = require("@remotion/renderer");
6
- const studio_shared_1 = require("@remotion/studio-shared");
7
- const update_keyframes_1 = require("../../codemods/update-keyframes/update-keyframes");
8
- const file_watcher_1 = require("../../file-watcher");
9
- const resolve_file_inside_project_1 = require("../../helpers/resolve-file-inside-project");
10
- const undo_stack_1 = require("../undo-stack");
11
- const watch_ignore_next_change_1 = require("../watch-ignore-next-change");
12
- const can_update_sequence_props_1 = require("./can-update-sequence-props");
13
- const log_update_1 = require("./log-updates/log-update");
14
- const save_props_mutex_1 = require("./save-props-mutex");
15
- const deleteSequenceKeyframeHandler = ({ input: { fileName, nodePath, key, frame, schema, clientId }, remotionRoot, logLevel, }) => (0, save_props_mutex_1.withSavePropsLock)(async () => {
16
- renderer_1.RenderInternals.Log.trace({ indent: false, logLevel }, `[delete-sequence-keyframe] Received request for fileName="${fileName}" key="${key}" frame=${frame}`);
17
- const { absolutePath, fileRelativeToRoot } = (0, resolve_file_inside_project_1.resolveFileInsideProject)({
18
- remotionRoot,
19
- fileName,
20
- action: 'modify',
21
- });
22
- const fileContents = (0, node_fs_1.readFileSync)(absolutePath, 'utf-8');
23
- const { output, oldValueStrings, newValueStrings, formatted, logLine } = await (0, update_keyframes_1.updateSequenceKeyframes)({
24
- input: fileContents,
25
- nodePath: nodePath.nodePath,
26
- updates: [
27
- {
28
- key,
29
- operation: {
30
- type: 'remove',
31
- frame,
32
- },
33
- },
34
- ],
35
- });
36
- const oldValueString = oldValueStrings[0];
37
- const newValueString = newValueStrings[0];
38
- const undoPropChange = `${key} keyframe restored at frame ${frame}`;
39
- const redoPropChange = `${key} keyframe deleted at frame ${frame}`;
40
- (0, undo_stack_1.pushToUndoStack)({
41
- filePath: absolutePath,
42
- oldContents: fileContents,
43
- newContents: null,
44
- logLevel,
45
- remotionRoot,
46
- logLine,
47
- description: {
48
- undoMessage: `↩️ ${undoPropChange}`,
49
- redoMessage: `↪️ ${redoPropChange}`,
50
- },
51
- entryType: 'sequence-props',
52
- suppressHmrOnFileRestore: true,
53
- });
54
- (0, undo_stack_1.suppressUndoStackInvalidation)(absolutePath);
55
- (0, watch_ignore_next_change_1.suppressBundlerUpdateForFile)(absolutePath);
56
- (0, file_watcher_1.writeFileAndNotifyFileWatchers)(absolutePath, output, clientId);
57
- (0, log_update_1.logUpdate)({
58
- fileRelativeToRoot,
59
- line: logLine,
60
- key,
61
- oldValueString,
62
- newValueString,
63
- defaultValueString: null,
64
- formatted,
65
- logLevel,
66
- removedProps: [],
67
- addedProps: [],
68
- });
69
- (0, undo_stack_1.printUndoHint)(logLevel);
70
- const status = (0, can_update_sequence_props_1.computeSequencePropsStatusFromContent)({
71
- fileContents: output,
72
- keys: (0, studio_shared_1.getAllSchemaKeys)(schema),
73
- nodePath: nodePath.nodePath,
74
- effects: [],
75
- });
76
- return {
77
- canUpdate: true,
78
- props: status.props,
79
- results: [{ fileName, nodePath, props: status.props }],
80
- };
81
- });
82
- exports.deleteSequenceKeyframeHandler = deleteSequenceKeyframeHandler;
@@ -1 +0,0 @@
1
- export declare const withSavePropsLock: <T>(fn: () => Promise<T>) => Promise<T>;
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.withSavePropsLock = void 0;
4
- let chain = Promise.resolve();
5
- const withSavePropsLock = (fn) => {
6
- const run = () => fn();
7
- const next = chain.then(run, run);
8
- chain = next.then(() => undefined, () => undefined);
9
- return next;
10
- };
11
- exports.withSavePropsLock = withSavePropsLock;