@remotion/studio-server 4.0.489 → 4.0.491
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/better-opn/index.d.ts +4 -0
- package/dist/better-opn/index.js +152 -31
- package/dist/codemods/effect-param-expression.js +3 -0
- package/dist/codemods/paste-effects.d.ts +2 -1
- package/dist/codemods/paste-effects.js +33 -6
- package/dist/codemods/update-keyframes/update-keyframes.d.ts +10 -5
- package/dist/codemods/update-keyframes/update-keyframes.js +126 -46
- package/dist/codemods/update-nested-prop.d.ts +3 -2
- package/dist/codemods/update-nested-prop.js +17 -4
- package/dist/codemods/update-sequence-props/update-sequence-props.d.ts +6 -3
- package/dist/codemods/update-sequence-props/update-sequence-props.js +51 -10
- package/dist/helpers/get-installed-installable-packages.js +4 -12
- package/dist/helpers/resolve-composition-component.js +1 -0
- package/dist/helpers/video-config-numeric-expression.d.ts +12 -0
- package/dist/helpers/video-config-numeric-expression.js +152 -0
- package/dist/helpers/video-config-values.d.ts +7 -0
- package/dist/helpers/video-config-values.js +84 -0
- package/dist/index.d.ts +1 -2
- package/dist/preview-server/element-install-state.d.ts +1 -0
- package/dist/preview-server/routes/add-effect-keyframe.js +6 -0
- package/dist/preview-server/routes/add-keyframes.js +2 -0
- package/dist/preview-server/routes/add-sequence-keyframe.js +2 -0
- package/dist/preview-server/routes/apply-codemod.d.ts +1 -0
- package/dist/preview-server/routes/apply-codemod.js +62 -13
- package/dist/preview-server/routes/can-update-effect-props.d.ts +8 -4
- package/dist/preview-server/routes/can-update-effect-props.js +26 -5
- package/dist/preview-server/routes/can-update-sequence-props.d.ts +9 -5
- package/dist/preview-server/routes/can-update-sequence-props.js +99 -30
- package/dist/preview-server/routes/delete-keyframes.js +8 -0
- package/dist/preview-server/routes/install-dependency.d.ts +1 -0
- package/dist/preview-server/routes/install-dependency.js +17 -15
- package/dist/preview-server/routes/move-keyframes.js +2 -0
- package/dist/preview-server/routes/paste-effects.js +2 -1
- package/dist/preview-server/routes/save-effect-props.js +5 -0
- package/dist/preview-server/routes/save-sequence-props.js +4 -0
- package/dist/preview-server/routes/subscribe-to-sequence-props.js +2 -1
- package/dist/preview-server/routes/unsubscribe-from-sequence-props.js +1 -0
- package/dist/preview-server/routes/update-effect-keyframe-settings.js +7 -0
- package/dist/preview-server/routes/update-element-install-target.js +15 -1
- package/dist/preview-server/routes/update-sequence-keyframe-settings.js +3 -0
- package/dist/preview-server/sequence-props-watchers.d.ts +5 -3
- package/dist/preview-server/sequence-props-watchers.js +14 -5
- package/dist/preview-server/start-server.d.ts +0 -1
- package/dist/preview-server/start-server.js +0 -1
- package/dist/routes.js +2 -0
- package/dist/start-studio.d.ts +1 -2
- package/dist/start-studio.js +1 -2
- package/package.json +6 -6
|
@@ -5,7 +5,7 @@ const element_install_state_1 = require("../element-install-state");
|
|
|
5
5
|
const isFiniteTimestamp = (value) => {
|
|
6
6
|
return value === null || (Number.isFinite(value) && value > 0);
|
|
7
7
|
};
|
|
8
|
-
const updateElementInstallTargetHandler = ({ input }) => {
|
|
8
|
+
const updateElementInstallTargetHandler = ({ input, request }) => {
|
|
9
9
|
if (typeof input.clientId !== 'string' || input.clientId.length === 0) {
|
|
10
10
|
throw new Error('Invalid client ID');
|
|
11
11
|
}
|
|
@@ -22,6 +22,20 @@ const updateElementInstallTargetHandler = ({ input }) => {
|
|
|
22
22
|
if (input.compositionId !== null && typeof input.compositionId !== 'string') {
|
|
23
23
|
throw new Error('Invalid composition ID');
|
|
24
24
|
}
|
|
25
|
+
if (typeof input.studioUrl !== 'string') {
|
|
26
|
+
throw new Error('Invalid Studio URL');
|
|
27
|
+
}
|
|
28
|
+
let studioUrl;
|
|
29
|
+
try {
|
|
30
|
+
studioUrl = new URL(input.studioUrl);
|
|
31
|
+
}
|
|
32
|
+
catch (_a) {
|
|
33
|
+
throw new Error('Invalid Studio URL');
|
|
34
|
+
}
|
|
35
|
+
if (typeof request.headers.origin !== 'string' ||
|
|
36
|
+
studioUrl.origin !== request.headers.origin) {
|
|
37
|
+
throw new Error('Studio URL must match the request origin');
|
|
38
|
+
}
|
|
25
39
|
(0, element_install_state_1.updateElementInstallTarget)(input);
|
|
26
40
|
return Promise.resolve({});
|
|
27
41
|
};
|
|
@@ -24,6 +24,7 @@ const updateSequenceKeyframeSettingsHandler = ({ input: { fileName, nodePath, ke
|
|
|
24
24
|
input: fileContents,
|
|
25
25
|
nodePath: nodePath.nodePath,
|
|
26
26
|
schema,
|
|
27
|
+
videoConfigValues: nodePath.videoConfigValues,
|
|
27
28
|
updates: [
|
|
28
29
|
{
|
|
29
30
|
key,
|
|
@@ -32,6 +33,7 @@ const updateSequenceKeyframeSettingsHandler = ({ input: { fileName, nodePath, ke
|
|
|
32
33
|
type: 'settings',
|
|
33
34
|
clamping: settings.clamping,
|
|
34
35
|
posterize: settings.posterize,
|
|
36
|
+
output: settings.output,
|
|
35
37
|
}
|
|
36
38
|
: {
|
|
37
39
|
type: 'easing',
|
|
@@ -79,6 +81,7 @@ const updateSequenceKeyframeSettingsHandler = ({ input: { fileName, nodePath, ke
|
|
|
79
81
|
nodePath: updatedNodePath,
|
|
80
82
|
componentIdentity: null,
|
|
81
83
|
effects: [],
|
|
84
|
+
videoConfigValues: nodePath.videoConfigValues,
|
|
82
85
|
});
|
|
83
86
|
const updatedSubscriptionKey = { ...nodePath, nodePath: updatedNodePath };
|
|
84
87
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type SubscribeToSequencePropsResponse } from '@remotion/studio-shared';
|
|
2
|
-
import type { SequenceNodePath } from 'remotion';
|
|
3
|
-
export declare const subscribeToSequencePropsWatchers: ({ fileName, line, column, nodePath: preferredNodePath, componentIdentity, keys, effects, remotionRoot, clientId, logLevel, }: {
|
|
2
|
+
import type { SequenceNodePath, VideoConfigValues } from 'remotion';
|
|
3
|
+
export declare const subscribeToSequencePropsWatchers: ({ fileName, line, column, nodePath: preferredNodePath, componentIdentity, keys, effects, remotionRoot, clientId, logLevel, videoConfigValues, }: {
|
|
4
4
|
fileName: string;
|
|
5
5
|
line: number;
|
|
6
6
|
column: number;
|
|
@@ -11,13 +11,15 @@ export declare const subscribeToSequencePropsWatchers: ({ fileName, line, column
|
|
|
11
11
|
remotionRoot: string;
|
|
12
12
|
clientId: string;
|
|
13
13
|
logLevel: "error" | "info" | "trace" | "verbose" | "warn";
|
|
14
|
+
videoConfigValues: VideoConfigValues;
|
|
14
15
|
}) => SubscribeToSequencePropsResponse;
|
|
15
|
-
export declare const unsubscribeFromSequencePropsWatchers: ({ fileName, nodePath, remotionRoot, clientId, sequenceKeys, effectKeys, }: {
|
|
16
|
+
export declare const unsubscribeFromSequencePropsWatchers: ({ fileName, nodePath, remotionRoot, clientId, sequenceKeys, effectKeys, videoConfigValues, }: {
|
|
16
17
|
fileName: string;
|
|
17
18
|
nodePath: SequenceNodePath;
|
|
18
19
|
remotionRoot: string;
|
|
19
20
|
clientId: string;
|
|
20
21
|
sequenceKeys: string[];
|
|
21
22
|
effectKeys: string[][];
|
|
23
|
+
videoConfigValues: VideoConfigValues | null;
|
|
22
24
|
}) => void;
|
|
23
25
|
export declare const unsubscribeClientSequencePropsWatchers: (clientId: string) => void;
|
|
@@ -14,7 +14,8 @@ const live_events_1 = require("./live-events");
|
|
|
14
14
|
const node_path_cache_1 = require("./node-path-cache");
|
|
15
15
|
const can_update_sequence_props_1 = require("./routes/can-update-sequence-props");
|
|
16
16
|
const sequencePropsWatchers = {};
|
|
17
|
-
const
|
|
17
|
+
const getWatcherKey = (nodePath) => `${(0, studio_shared_1.stringifySequenceSubscriptionKey)(nodePath)}:${JSON.stringify(nodePath.videoConfigValues)}`;
|
|
18
|
+
const getSequencePropsStatus = ({ fileName, line, column, preferredNodePath, componentIdentity, keys, effects, remotionRoot, logLevel, videoConfigValues, }) => {
|
|
18
19
|
if (preferredNodePath) {
|
|
19
20
|
try {
|
|
20
21
|
const fromNodePath = (0, can_update_sequence_props_1.computeSequencePropsStatus)({
|
|
@@ -24,6 +25,7 @@ const getSequencePropsStatus = ({ fileName, line, column, preferredNodePath, com
|
|
|
24
25
|
keys,
|
|
25
26
|
effects,
|
|
26
27
|
remotionRoot,
|
|
28
|
+
videoConfigValues,
|
|
27
29
|
});
|
|
28
30
|
return {
|
|
29
31
|
status: fromNodePath,
|
|
@@ -32,6 +34,7 @@ const getSequencePropsStatus = ({ fileName, line, column, preferredNodePath, com
|
|
|
32
34
|
nodePath: preferredNodePath,
|
|
33
35
|
sequenceKeys: keys,
|
|
34
36
|
effectKeys: effects,
|
|
37
|
+
videoConfigValues,
|
|
35
38
|
},
|
|
36
39
|
success: true,
|
|
37
40
|
};
|
|
@@ -55,6 +58,7 @@ const getSequencePropsStatus = ({ fileName, line, column, preferredNodePath, com
|
|
|
55
58
|
keys,
|
|
56
59
|
effects,
|
|
57
60
|
remotionRoot,
|
|
61
|
+
videoConfigValues,
|
|
58
62
|
});
|
|
59
63
|
}
|
|
60
64
|
catch (error) {
|
|
@@ -73,6 +77,7 @@ const getSequencePropsStatus = ({ fileName, line, column, preferredNodePath, com
|
|
|
73
77
|
nodePath: cachedNodePath,
|
|
74
78
|
sequenceKeys: keys,
|
|
75
79
|
effectKeys: effects,
|
|
80
|
+
videoConfigValues,
|
|
76
81
|
},
|
|
77
82
|
success: true,
|
|
78
83
|
};
|
|
@@ -86,10 +91,11 @@ const getSequencePropsStatus = ({ fileName, line, column, preferredNodePath, com
|
|
|
86
91
|
effects,
|
|
87
92
|
remotionRoot,
|
|
88
93
|
logLevel,
|
|
94
|
+
videoConfigValues,
|
|
89
95
|
});
|
|
90
96
|
return status;
|
|
91
97
|
};
|
|
92
|
-
const subscribeToSequencePropsWatchers = ({ fileName, line, column, nodePath: preferredNodePath, componentIdentity, keys, effects, remotionRoot, clientId, logLevel, }) => {
|
|
98
|
+
const subscribeToSequencePropsWatchers = ({ fileName, line, column, nodePath: preferredNodePath, componentIdentity, keys, effects, remotionRoot, clientId, logLevel, videoConfigValues, }) => {
|
|
93
99
|
var _a;
|
|
94
100
|
const initialResult = getSequencePropsStatus({
|
|
95
101
|
fileName,
|
|
@@ -101,6 +107,7 @@ const subscribeToSequencePropsWatchers = ({ fileName, line, column, nodePath: pr
|
|
|
101
107
|
effects,
|
|
102
108
|
remotionRoot,
|
|
103
109
|
logLevel,
|
|
110
|
+
videoConfigValues,
|
|
104
111
|
});
|
|
105
112
|
if (!initialResult.success) {
|
|
106
113
|
return initialResult;
|
|
@@ -109,7 +116,7 @@ const subscribeToSequencePropsWatchers = ({ fileName, line, column, nodePath: pr
|
|
|
109
116
|
// Cache the resolved nodePath for future lookups with stale source maps
|
|
110
117
|
(0, node_path_cache_1.setCachedNodePath)(fileName, line, column, initialResult.nodePath.nodePath);
|
|
111
118
|
const { nodePath } = initialResult;
|
|
112
|
-
const watcherKey = (
|
|
119
|
+
const watcherKey = getWatcherKey(nodePath);
|
|
113
120
|
// If a watcher already exists for this key, just bump the ref count
|
|
114
121
|
if ((_a = sequencePropsWatchers[clientId]) === null || _a === void 0 ? void 0 : _a[watcherKey]) {
|
|
115
122
|
sequencePropsWatchers[clientId][watcherKey].refCount++;
|
|
@@ -132,6 +139,7 @@ const subscribeToSequencePropsWatchers = ({ fileName, line, column, nodePath: pr
|
|
|
132
139
|
componentIdentity,
|
|
133
140
|
keys,
|
|
134
141
|
effects,
|
|
142
|
+
videoConfigValues,
|
|
135
143
|
});
|
|
136
144
|
const previousEffectChain = result.effects.map((effect) => effect.canUpdate && effect.callee);
|
|
137
145
|
const newEffectChain = initialResult.success &&
|
|
@@ -173,13 +181,14 @@ const subscribeToSequencePropsWatchers = ({ fileName, line, column, nodePath: pr
|
|
|
173
181
|
return initialResult;
|
|
174
182
|
};
|
|
175
183
|
exports.subscribeToSequencePropsWatchers = subscribeToSequencePropsWatchers;
|
|
176
|
-
const unsubscribeFromSequencePropsWatchers = ({ fileName, nodePath, remotionRoot, clientId, sequenceKeys, effectKeys, }) => {
|
|
184
|
+
const unsubscribeFromSequencePropsWatchers = ({ fileName, nodePath, remotionRoot, clientId, sequenceKeys, effectKeys, videoConfigValues, }) => {
|
|
177
185
|
const absolutePath = node_path_1.default.resolve(remotionRoot, fileName);
|
|
178
|
-
const watcherKey = (
|
|
186
|
+
const watcherKey = getWatcherKey({
|
|
179
187
|
absolutePath,
|
|
180
188
|
nodePath,
|
|
181
189
|
sequenceKeys,
|
|
182
190
|
effectKeys,
|
|
191
|
+
videoConfigValues,
|
|
183
192
|
});
|
|
184
193
|
if (!sequencePropsWatchers[clientId] ||
|
|
185
194
|
!sequencePropsWatchers[clientId][watcherKey]) {
|
|
@@ -22,7 +22,6 @@ export declare const startServer: (options: {
|
|
|
22
22
|
bufferStateDelayInMilliseconds: number | null;
|
|
23
23
|
remotionRoot: string;
|
|
24
24
|
keyboardShortcutsEnabled: boolean;
|
|
25
|
-
experimentalClientSideRenderingEnabled: boolean;
|
|
26
25
|
publicDir: string;
|
|
27
26
|
poll: number | null;
|
|
28
27
|
staticHash: string;
|
|
@@ -41,7 +41,6 @@ const startServer = async (options) => {
|
|
|
41
41
|
maxTimelineTracks: (_c = options === null || options === void 0 ? void 0 : options.maxTimelineTracks) !== null && _c !== void 0 ? _c : null,
|
|
42
42
|
remotionRoot: options.remotionRoot,
|
|
43
43
|
keyboardShortcutsEnabled: options.keyboardShortcutsEnabled,
|
|
44
|
-
experimentalClientSideRenderingEnabled: options.experimentalClientSideRenderingEnabled,
|
|
45
44
|
poll: options.poll,
|
|
46
45
|
bufferStateDelayInMilliseconds: options.bufferStateDelayInMilliseconds,
|
|
47
46
|
askAIEnabled: options.askAIEnabled,
|
package/dist/routes.js
CHANGED
|
@@ -41,6 +41,7 @@ const node_url_1 = require("node:url");
|
|
|
41
41
|
const bundler_1 = require("@remotion/bundler");
|
|
42
42
|
const renderer_1 = require("@remotion/renderer");
|
|
43
43
|
const studio_shared_1 = require("@remotion/studio-shared");
|
|
44
|
+
const better_opn_1 = require("./better-opn");
|
|
44
45
|
const client_render_queue_1 = require("./client-render-queue");
|
|
45
46
|
const get_file_source_1 = require("./helpers/get-file-source");
|
|
46
47
|
const get_installed_installable_packages_1 = require("./helpers/get-installed-installable-packages");
|
|
@@ -215,6 +216,7 @@ const handleRequestElementInstall = async ({ liveEventsServer, request, response
|
|
|
215
216
|
}));
|
|
216
217
|
return;
|
|
217
218
|
}
|
|
219
|
+
(0, better_opn_1.focusBrowserTab)({ url: target.studioUrl }).catch(() => undefined);
|
|
218
220
|
response.writeHead(200);
|
|
219
221
|
response.end(JSON.stringify({ success: true, status: 'sent' }));
|
|
220
222
|
}
|
package/dist/start-studio.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export type StartStudioResult = {
|
|
|
6
6
|
} | {
|
|
7
7
|
type: 'already-running';
|
|
8
8
|
};
|
|
9
|
-
export declare const startStudio: ({ browserArgs, browserFlag, shouldOpenBrowser, fullEntryPath, logLevel, getCurrentInputProps, getEnvVariables, desiredPort, maxTimelineTracks, remotionRoot, keyboardShortcutsEnabled,
|
|
9
|
+
export declare const startStudio: ({ browserArgs, browserFlag, shouldOpenBrowser, fullEntryPath, logLevel, getCurrentInputProps, getEnvVariables, desiredPort, maxTimelineTracks, remotionRoot, keyboardShortcutsEnabled, relativePublicDir, webpackOverride, poll, getRenderDefaults, getRenderQueue, numberOfAudioTags, queueMethods, previewEntry, gitSource, bufferStateDelayInMilliseconds, binariesDirectory, forceIPv4, audioLatencyHint, previewSampleRate, enableCrossSiteIsolation, askAIEnabled, interactivityEnabled, forceNew, rspack, getStudioRuntimeConfig, }: {
|
|
10
10
|
browserArgs: string;
|
|
11
11
|
browserFlag: string;
|
|
12
12
|
logLevel: "error" | "info" | "trace" | "verbose" | "warn";
|
|
@@ -19,7 +19,6 @@ export declare const startStudio: ({ browserArgs, browserFlag, shouldOpenBrowser
|
|
|
19
19
|
bufferStateDelayInMilliseconds: number | null;
|
|
20
20
|
remotionRoot: string;
|
|
21
21
|
keyboardShortcutsEnabled: boolean;
|
|
22
|
-
experimentalClientSideRenderingEnabled: boolean;
|
|
23
22
|
relativePublicDir: string | null;
|
|
24
23
|
webpackOverride: WebpackOverrideFn;
|
|
25
24
|
poll: number | null;
|
package/dist/start-studio.js
CHANGED
|
@@ -19,7 +19,7 @@ const public_folder_1 = require("./preview-server/public-folder");
|
|
|
19
19
|
const start_server_1 = require("./preview-server/start-server");
|
|
20
20
|
const server_ready_1 = require("./server-ready");
|
|
21
21
|
const watch_root_file_1 = require("./watch-root-file");
|
|
22
|
-
const startStudio = async ({ browserArgs, browserFlag, shouldOpenBrowser, fullEntryPath, logLevel, getCurrentInputProps, getEnvVariables, desiredPort, maxTimelineTracks, remotionRoot, keyboardShortcutsEnabled,
|
|
22
|
+
const startStudio = async ({ browserArgs, browserFlag, shouldOpenBrowser, fullEntryPath, logLevel, getCurrentInputProps, getEnvVariables, desiredPort, maxTimelineTracks, remotionRoot, keyboardShortcutsEnabled, relativePublicDir, webpackOverride, poll, getRenderDefaults, getRenderQueue, numberOfAudioTags, queueMethods, previewEntry, gitSource, bufferStateDelayInMilliseconds, binariesDirectory, forceIPv4, audioLatencyHint, previewSampleRate, enableCrossSiteIsolation, askAIEnabled, interactivityEnabled, forceNew, rspack, getStudioRuntimeConfig, }) => {
|
|
23
23
|
try {
|
|
24
24
|
if (typeof Bun === 'undefined') {
|
|
25
25
|
process.title = 'node (npx remotion studio)';
|
|
@@ -72,7 +72,6 @@ const startStudio = async ({ browserArgs, browserFlag, shouldOpenBrowser, fullEn
|
|
|
72
72
|
maxTimelineTracks,
|
|
73
73
|
remotionRoot,
|
|
74
74
|
keyboardShortcutsEnabled,
|
|
75
|
-
experimentalClientSideRenderingEnabled,
|
|
76
75
|
publicDir,
|
|
77
76
|
webpackOverride,
|
|
78
77
|
poll,
|
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.
|
|
6
|
+
"version": "4.0.491",
|
|
7
7
|
"description": "Run a Remotion Studio with a server backend",
|
|
8
8
|
"main": "dist",
|
|
9
9
|
"scripts": {
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"@babel/parser": "7.24.1",
|
|
28
28
|
"semver": "7.5.3",
|
|
29
29
|
"prettier": "3.8.1",
|
|
30
|
-
"remotion": "4.0.
|
|
30
|
+
"remotion": "4.0.491",
|
|
31
31
|
"recast": "0.23.11",
|
|
32
|
-
"@remotion/bundler": "4.0.
|
|
33
|
-
"@remotion/renderer": "4.0.
|
|
34
|
-
"@remotion/studio-shared": "4.0.
|
|
32
|
+
"@remotion/bundler": "4.0.491",
|
|
33
|
+
"@remotion/renderer": "4.0.491",
|
|
34
|
+
"@remotion/studio-shared": "4.0.491",
|
|
35
35
|
"memfs": "3.4.3",
|
|
36
36
|
"open": "8.4.2"
|
|
37
37
|
},
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"ast-types": "0.16.1",
|
|
40
40
|
"react": "19.2.3",
|
|
41
41
|
"@types/semver": "7.5.3",
|
|
42
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
42
|
+
"@remotion/eslint-config-internal": "4.0.491",
|
|
43
43
|
"eslint": "9.19.0",
|
|
44
44
|
"@types/node": "20.12.14",
|
|
45
45
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|