@remotion/studio-server 4.0.537 → 4.0.538
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/ansi-diff.js +3 -19
- package/dist/better-opn/index.d.ts +4 -2
- package/dist/codemods/effect-param-expression.d.ts +2 -2
- package/dist/codemods/get-node-path-remappings.d.ts +1 -12
- package/dist/codemods/get-node-path-remappings.js +1 -51
- package/dist/codemods/paste-effects.d.ts +2 -15
- package/dist/codemods/update-effect-props/update-effect-props.d.ts +2 -2
- package/dist/codemods/update-keyframes/update-keyframes.d.ts +3 -3
- package/dist/codemods/update-nested-prop.d.ts +1 -1
- package/dist/detect-outdated-remotion-skills.d.ts +3 -3
- package/dist/figma/figma-to-svg.d.ts +1 -1
- package/dist/file-watcher.d.ts +1 -1
- package/dist/helpers/coding-agent-registry.d.ts +3 -3
- package/dist/helpers/css-shorthand-properties.d.ts +8 -7
- package/dist/helpers/custom-editor.d.ts +2 -2
- package/dist/helpers/editor-registry.d.ts +2 -2
- package/dist/helpers/get-ast-node-path.d.ts +2 -1
- package/dist/helpers/import-agnostic-node-path.js +22 -13
- package/dist/helpers/open-in-app.d.ts +3 -3
- package/dist/helpers/open-in-editor.d.ts +2 -2
- package/dist/helpers/package-manager-spawn-options.d.ts +1 -1
- package/dist/helpers/read-source-file.d.ts +4 -0
- package/dist/helpers/read-source-file.js +14 -0
- package/dist/helpers/recently-used-apps.d.ts +2 -2
- package/dist/helpers/resolve-composition-component.d.ts +2 -2
- package/dist/helpers/resolve-editor.d.ts +3 -3
- package/dist/helpers/terminal-artwork.d.ts +4 -4
- package/dist/helpers/video-config-values.d.ts +4 -0
- package/dist/helpers/video-config-values.js +11 -3
- package/dist/index.d.ts +39 -100
- package/dist/index.js +1 -1
- package/dist/maybe-open-browser.d.ts +2 -1
- package/dist/preview-server/api-types.d.ts +1 -1
- package/dist/preview-server/dev-middleware/index.d.ts +2 -1
- package/dist/preview-server/dev-middleware/middleware.d.ts +1 -1
- package/dist/preview-server/dev-middleware/middleware.js +14 -17
- package/dist/preview-server/element-install-state.d.ts +1 -1
- package/dist/preview-server/get-package-manager.d.ts +3 -2
- package/dist/preview-server/handler.d.ts +4 -4
- package/dist/preview-server/hmr-timing.d.ts +2 -1
- package/dist/preview-server/hot-middleware/index.d.ts +2 -1
- package/dist/preview-server/jsx-component-identity.d.ts +4 -3
- package/dist/preview-server/live-events.d.ts +3 -2
- package/dist/preview-server/public-folder.js +11 -2
- package/dist/preview-server/routes/add-keyframes.d.ts +2 -1
- package/dist/preview-server/routes/app-icon.d.ts +1 -1
- package/dist/preview-server/routes/apply-visual-control-change.js +1 -4
- package/dist/preview-server/routes/batch-update-keyframe-settings.d.ts +2 -1
- package/dist/preview-server/routes/can-update-default-props.d.ts +2 -1
- package/dist/preview-server/routes/can-update-effect-props.d.ts +2 -6
- package/dist/preview-server/routes/can-update-sequence-props.d.ts +17 -13
- package/dist/preview-server/routes/can-update-sequence-props.js +21 -25
- package/dist/preview-server/routes/delete-keyframes.d.ts +4 -6
- package/dist/preview-server/routes/delete-keyframes.js +4 -66
- package/dist/preview-server/routes/element-install-plan.d.ts +3 -3
- package/dist/preview-server/routes/find-in-file.d.ts +2 -9
- package/dist/preview-server/routes/insert-element.js +1 -4
- package/dist/preview-server/routes/install-dependency.d.ts +2 -14
- package/dist/preview-server/routes/log-updates/log-effect-update.d.ts +2 -1
- package/dist/preview-server/routes/log-updates/log-update.d.ts +3 -2
- package/dist/preview-server/routes/move-keyframes.d.ts +2 -1
- package/dist/preview-server/routes/open-in-editor.d.ts +2 -2
- package/dist/preview-server/routes/remotion-skills-info.d.ts +1 -1
- package/dist/preview-server/routes/save-multiple-effect-props.js +25 -8
- package/dist/preview-server/routes/save-sequence-props.d.ts +2 -2
- package/dist/preview-server/routes/source-file-write-queue.d.ts +3 -2
- package/dist/preview-server/routes/subscribe-to-sequence-props.js +55 -34
- package/dist/preview-server/sequence-node-path-mutation.d.ts +2 -6
- package/dist/preview-server/sequence-props-watchers.d.ts +7 -5
- package/dist/preview-server/sequence-props-watchers.js +7 -2
- package/dist/preview-server/serve-static.d.ts +1 -1
- package/dist/preview-server/serve-static.js +18 -1
- package/dist/preview-server/start-server.d.ts +3 -3
- package/dist/preview-server/studio-protocol/handle-discovery.d.ts +1 -1
- package/dist/preview-server/studio-protocol/handle-element-library.d.ts +1 -1
- package/dist/preview-server/studio-protocol/handle-install.d.ts +1 -1
- package/dist/preview-server/studio-protocol/handle-license-key.d.ts +1 -1
- package/dist/preview-server/studio-protocol/origin-policy.d.ts +2 -2
- package/dist/preview-server/studio-protocol/protocol-response.d.ts +1 -1
- package/dist/preview-server/undo-stack.d.ts +3 -3
- package/dist/preview-server/undo-stack.js +9 -0
- package/dist/preview-server/update-available.d.ts +3 -2
- package/dist/remotion-skill-names.d.ts +1 -1
- package/dist/routes.d.ts +4 -4
- package/dist/server-ready.d.ts +2 -1
- package/dist/start-studio.d.ts +3 -3
- package/dist/studio-shortcuts.d.ts +3 -3
- package/package.json +10 -10
|
@@ -1,51 +1,72 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.subscribeToSequenceProps = void 0;
|
|
7
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
4
8
|
const sequence_props_watchers_1 = require("../sequence-props-watchers");
|
|
5
9
|
const can_update_sequence_props_1 = require("./can-update-sequence-props");
|
|
6
10
|
const subscribeToSequenceProps = ({ input, remotionRoot, logLevel }) => {
|
|
7
11
|
var _a;
|
|
8
|
-
|
|
12
|
+
// Source contents are shared only within this synchronous subscription batch.
|
|
13
|
+
const fileContentsCache = new Map();
|
|
14
|
+
const requestsByFile = new Map();
|
|
9
15
|
for (const [index, request] of input.requests.entries()) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
unresolved.push({ index, line: request.line, column: request.column });
|
|
15
|
-
unresolvedByFile.set(request.fileName, unresolved);
|
|
16
|
+
const absolutePath = node_path_1.default.resolve(remotionRoot, request.fileName);
|
|
17
|
+
const indexes = (_a = requestsByFile.get(absolutePath)) !== null && _a !== void 0 ? _a : [];
|
|
18
|
+
indexes.push(index);
|
|
19
|
+
requestsByFile.set(absolutePath, indexes);
|
|
16
20
|
}
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
const results = [];
|
|
22
|
+
// Finish each file before moving on so large batches do not evict and
|
|
23
|
+
// repeatedly parse the same source snapshot from the bounded AST cache.
|
|
24
|
+
for (const indexes of requestsByFile.values()) {
|
|
25
|
+
const unresolved = indexes
|
|
26
|
+
.filter((index) => input.requests[index].nodePath === null)
|
|
27
|
+
.map((index) => ({
|
|
28
|
+
index,
|
|
29
|
+
line: input.requests[index].line,
|
|
30
|
+
column: input.requests[index].column,
|
|
31
|
+
}));
|
|
32
|
+
const resolvedNodePaths = new Map();
|
|
33
|
+
if (unresolved.length > 0) {
|
|
34
|
+
try {
|
|
35
|
+
const nodePaths = (0, can_update_sequence_props_1.resolveSequencePropsNodePathsFromFilename)({
|
|
36
|
+
fileName: input.requests[indexes[0]].fileName,
|
|
37
|
+
targets: unresolved,
|
|
38
|
+
remotionRoot,
|
|
39
|
+
fileContentsCache,
|
|
40
|
+
});
|
|
41
|
+
for (const [index, nodePath] of nodePaths.entries()) {
|
|
42
|
+
if (nodePath) {
|
|
43
|
+
resolvedNodePaths.set(unresolved[index].index, nodePath);
|
|
44
|
+
}
|
|
28
45
|
}
|
|
29
46
|
}
|
|
47
|
+
catch (_b) {
|
|
48
|
+
// Let each subscription produce its usual not-found response.
|
|
49
|
+
}
|
|
30
50
|
}
|
|
31
|
-
|
|
32
|
-
|
|
51
|
+
for (const index of indexes) {
|
|
52
|
+
const { fileName, line, column, nodePath, componentIdentity, keys, assetKeys, effects, clientId, } = input.requests[index];
|
|
53
|
+
results[index] = (0, sequence_props_watchers_1.subscribeToSequencePropsWatchers)({
|
|
54
|
+
fileName,
|
|
55
|
+
line,
|
|
56
|
+
column,
|
|
57
|
+
nodePath,
|
|
58
|
+
resolvedNodePath: resolvedNodePaths.get(index),
|
|
59
|
+
componentIdentity,
|
|
60
|
+
keys,
|
|
61
|
+
assetKeys,
|
|
62
|
+
effects,
|
|
63
|
+
remotionRoot,
|
|
64
|
+
clientId,
|
|
65
|
+
logLevel,
|
|
66
|
+
fileContentsCache,
|
|
67
|
+
});
|
|
33
68
|
}
|
|
34
69
|
}
|
|
35
|
-
const results = input.requests.map(({ fileName, line, column, nodePath, componentIdentity, keys, assetKeys, effects, clientId, }, index) => (0, sequence_props_watchers_1.subscribeToSequencePropsWatchers)({
|
|
36
|
-
fileName,
|
|
37
|
-
line,
|
|
38
|
-
column,
|
|
39
|
-
nodePath,
|
|
40
|
-
resolvedNodePath: resolvedNodePaths.get(index),
|
|
41
|
-
componentIdentity,
|
|
42
|
-
keys,
|
|
43
|
-
assetKeys,
|
|
44
|
-
effects,
|
|
45
|
-
remotionRoot,
|
|
46
|
-
clientId,
|
|
47
|
-
logLevel,
|
|
48
|
-
}));
|
|
49
70
|
return Promise.resolve({ results });
|
|
50
71
|
};
|
|
51
72
|
exports.subscribeToSequenceProps = subscribeToSequenceProps;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import type { SequenceNodePathMutation, SequenceNodePathRemapping } from '@remotion/studio-shared';
|
|
2
|
-
export declare const broadcastSequenceNodePathMutation: (files: {
|
|
2
|
+
export declare const broadcastSequenceNodePathMutation: (files: Array<{
|
|
3
3
|
absolutePath: string;
|
|
4
4
|
remappings: SequenceNodePathRemapping[];
|
|
5
|
-
}
|
|
6
|
-
compositionId: string;
|
|
7
|
-
absolutePath: string;
|
|
8
|
-
nodePath: import("remotion").SequenceNodePath;
|
|
9
|
-
} | null) => SequenceNodePathMutation;
|
|
5
|
+
}>, timelineSelection: SequenceNodePathMutation['timelineSelection']) => SequenceNodePathMutation;
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
+
import type { LogLevel } from '@remotion/renderer';
|
|
1
2
|
import { type SubscribeToSequencePropsResponse } from '@remotion/studio-shared';
|
|
2
|
-
import type { SequenceNodePath } from 'remotion';
|
|
3
|
-
export declare const subscribeToSequencePropsWatchers: ({ fileName, line, column, nodePath: preferredNodePath, resolvedNodePath, componentIdentity, keys, assetKeys, effects, remotionRoot, clientId, logLevel, }: {
|
|
3
|
+
import type { JsxComponentIdentity, SequenceNodePath } from 'remotion';
|
|
4
|
+
export declare const subscribeToSequencePropsWatchers: ({ fileName, line, column, nodePath: preferredNodePath, resolvedNodePath, componentIdentity, keys, assetKeys, effects, remotionRoot, clientId, logLevel, fileContentsCache, }: {
|
|
4
5
|
fileName: string;
|
|
5
6
|
line: number;
|
|
6
7
|
column: number;
|
|
7
8
|
nodePath: SequenceNodePath | null;
|
|
8
|
-
resolvedNodePath?: SequenceNodePath | null
|
|
9
|
-
componentIdentity:
|
|
9
|
+
resolvedNodePath?: SequenceNodePath | null;
|
|
10
|
+
componentIdentity: JsxComponentIdentity | null;
|
|
10
11
|
keys: string[];
|
|
11
12
|
assetKeys: string[];
|
|
12
13
|
effects: string[][];
|
|
13
14
|
remotionRoot: string;
|
|
14
15
|
clientId: string;
|
|
15
|
-
logLevel:
|
|
16
|
+
logLevel: LogLevel;
|
|
17
|
+
fileContentsCache: Map<string, string> | null;
|
|
16
18
|
}) => SubscribeToSequencePropsResponse;
|
|
17
19
|
export declare const unsubscribeFromSequencePropsWatchers: ({ fileName, nodePath, remotionRoot, clientId, sequenceKeys, assetKeys, effectKeys, }: {
|
|
18
20
|
fileName: string;
|
|
@@ -15,7 +15,7 @@ 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
17
|
const getWatcherKey = (nodePath, assetKeys) => `${(0, studio_shared_1.stringifySequenceSubscriptionKey)(nodePath)}:${assetKeys.join('\0')}`;
|
|
18
|
-
const getSequencePropsStatus = ({ fileName, line, column, preferredNodePath, resolvedNodePath, componentIdentity, keys, assetKeys, effects, remotionRoot, logLevel, }) => {
|
|
18
|
+
const getSequencePropsStatus = ({ fileName, line, column, preferredNodePath, resolvedNodePath, componentIdentity, keys, assetKeys, effects, remotionRoot, logLevel, fileContentsCache, }) => {
|
|
19
19
|
if (preferredNodePath) {
|
|
20
20
|
try {
|
|
21
21
|
const fromNodePath = (0, can_update_sequence_props_1.computeSequencePropsStatus)({
|
|
@@ -26,6 +26,7 @@ const getSequencePropsStatus = ({ fileName, line, column, preferredNodePath, res
|
|
|
26
26
|
assetKeys,
|
|
27
27
|
effects,
|
|
28
28
|
remotionRoot,
|
|
29
|
+
fileContentsCache,
|
|
29
30
|
});
|
|
30
31
|
return {
|
|
31
32
|
status: fromNodePath,
|
|
@@ -59,6 +60,7 @@ const getSequencePropsStatus = ({ fileName, line, column, preferredNodePath, res
|
|
|
59
60
|
assetKeys,
|
|
60
61
|
effects,
|
|
61
62
|
remotionRoot,
|
|
63
|
+
fileContentsCache,
|
|
62
64
|
});
|
|
63
65
|
}
|
|
64
66
|
catch (error) {
|
|
@@ -94,6 +96,7 @@ const getSequencePropsStatus = ({ fileName, line, column, preferredNodePath, res
|
|
|
94
96
|
assetKeys,
|
|
95
97
|
effects,
|
|
96
98
|
remotionRoot,
|
|
99
|
+
fileContentsCache,
|
|
97
100
|
}),
|
|
98
101
|
nodePath: {
|
|
99
102
|
absolutePath: node_path_1.default.resolve(remotionRoot, fileName),
|
|
@@ -122,10 +125,11 @@ const getSequencePropsStatus = ({ fileName, line, column, preferredNodePath, res
|
|
|
122
125
|
effects,
|
|
123
126
|
remotionRoot,
|
|
124
127
|
logLevel,
|
|
128
|
+
fileContentsCache,
|
|
125
129
|
});
|
|
126
130
|
return status;
|
|
127
131
|
};
|
|
128
|
-
const subscribeToSequencePropsWatchers = ({ fileName, line, column, nodePath: preferredNodePath, resolvedNodePath = null, componentIdentity, keys, assetKeys, effects, remotionRoot, clientId, logLevel, }) => {
|
|
132
|
+
const subscribeToSequencePropsWatchers = ({ fileName, line, column, nodePath: preferredNodePath, resolvedNodePath = null, componentIdentity, keys, assetKeys, effects, remotionRoot, clientId, logLevel, fileContentsCache, }) => {
|
|
129
133
|
var _a;
|
|
130
134
|
const initialResult = getSequencePropsStatus({
|
|
131
135
|
fileName,
|
|
@@ -139,6 +143,7 @@ const subscribeToSequencePropsWatchers = ({ fileName, line, column, nodePath: pr
|
|
|
139
143
|
effects,
|
|
140
144
|
remotionRoot,
|
|
141
145
|
logLevel,
|
|
146
|
+
fileContentsCache,
|
|
142
147
|
});
|
|
143
148
|
if (!initialResult.success) {
|
|
144
149
|
return initialResult;
|
|
@@ -10,7 +10,7 @@ export declare const serveStatic: ({ root, path, req, res, allowOutsidePublicFol
|
|
|
10
10
|
root: string;
|
|
11
11
|
path: string;
|
|
12
12
|
req: IncomingMessage;
|
|
13
|
-
res: ServerResponse
|
|
13
|
+
res: ServerResponse;
|
|
14
14
|
allowOutsidePublicFolder: boolean;
|
|
15
15
|
allowRemotionConvertCors: boolean;
|
|
16
16
|
}) => Promise<void>;
|
|
@@ -82,12 +82,22 @@ const serveStatic = async function ({ root, path, req, res, allowOutsidePublicFo
|
|
|
82
82
|
res.end();
|
|
83
83
|
return;
|
|
84
84
|
}
|
|
85
|
+
if (res.destroyed) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
85
88
|
const hasRange = req.headers.range && lstat.size;
|
|
86
89
|
if (!hasRange) {
|
|
87
|
-
const readStream = (0, node_fs_1.createReadStream)(path);
|
|
88
90
|
res.setHeader('content-type', renderer_1.RenderInternals.mimeLookup(path) || 'application/octet-stream');
|
|
89
91
|
res.setHeader('content-length', lstat.size);
|
|
90
92
|
res.writeHead(200);
|
|
93
|
+
if (req.method === 'HEAD') {
|
|
94
|
+
res.end();
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
const readStream = (0, node_fs_1.createReadStream)(path);
|
|
98
|
+
res.once('close', () => {
|
|
99
|
+
readStream.destroy();
|
|
100
|
+
});
|
|
91
101
|
readStream.pipe(res);
|
|
92
102
|
return;
|
|
93
103
|
}
|
|
@@ -101,10 +111,17 @@ const serveStatic = async function ({ root, path, req, res, allowOutsidePublicFo
|
|
|
101
111
|
}));
|
|
102
112
|
res.setHeader('content-length', end - start + 1);
|
|
103
113
|
res.writeHead(206);
|
|
114
|
+
if (req.method === 'HEAD') {
|
|
115
|
+
res.end();
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
104
118
|
const readStream = (0, node_fs_1.createReadStream)(path, {
|
|
105
119
|
start,
|
|
106
120
|
end,
|
|
107
121
|
});
|
|
122
|
+
res.once('close', () => {
|
|
123
|
+
readStream.destroy();
|
|
124
|
+
});
|
|
108
125
|
readStream.pipe(res);
|
|
109
126
|
return;
|
|
110
127
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BundlerOverrideFn, RspackOverrideFn, WebpackOverrideFn } from '@remotion/bundler';
|
|
2
|
-
import type { DefaultEditor } from '@remotion/renderer';
|
|
2
|
+
import type { DefaultCodingAgent, DefaultEditor, LogLevel } from '@remotion/renderer';
|
|
3
3
|
import type { GitSource, RenderDefaults, RenderJob, StudioRuntimeConfig } from '@remotion/studio-shared';
|
|
4
4
|
import type { QueueMethods } from './api-types';
|
|
5
5
|
import type { LiveEventsServer } from './live-events';
|
|
@@ -28,7 +28,7 @@ export declare const startServer: (options: {
|
|
|
28
28
|
staticHashPrefix: string;
|
|
29
29
|
outputHash: string;
|
|
30
30
|
outputHashPrefix: string;
|
|
31
|
-
logLevel:
|
|
31
|
+
logLevel: LogLevel;
|
|
32
32
|
getRenderQueue: () => RenderJob[];
|
|
33
33
|
getRenderDefaults: () => RenderDefaults;
|
|
34
34
|
getNumberOfAudioTags: () => number;
|
|
@@ -43,7 +43,7 @@ export declare const startServer: (options: {
|
|
|
43
43
|
forceNew: boolean;
|
|
44
44
|
rspack: boolean;
|
|
45
45
|
getStudioRuntimeConfig: () => StudioRuntimeConfig;
|
|
46
|
-
getDefaultCodingAgent: () =>
|
|
46
|
+
getDefaultCodingAgent: () => DefaultCodingAgent | null;
|
|
47
47
|
getDefaultEditor: () => DefaultEditor | null;
|
|
48
48
|
configFile: string | null;
|
|
49
49
|
}) => Promise<StartServerResult>;
|
|
@@ -7,5 +7,5 @@ export declare const handleStudioProtocolDiscovery: ({ gitSource, liveEventsServ
|
|
|
7
7
|
readonly liveEventsServer: LiveEventsServer;
|
|
8
8
|
readonly remotionRoot: string;
|
|
9
9
|
readonly request: IncomingMessage;
|
|
10
|
-
readonly response: ServerResponse
|
|
10
|
+
readonly response: ServerResponse;
|
|
11
11
|
}) => Promise<void>;
|
|
@@ -6,6 +6,6 @@ export declare const handleStudioProtocolElementLibrary: ({ configFile, focusStu
|
|
|
6
6
|
readonly focusStudioTab: FocusStudioTab;
|
|
7
7
|
readonly liveEventsServer: LiveEventsServer;
|
|
8
8
|
readonly request: IncomingMessage;
|
|
9
|
-
readonly response: ServerResponse
|
|
9
|
+
readonly response: ServerResponse;
|
|
10
10
|
}) => Promise<void>;
|
|
11
11
|
export {};
|
|
@@ -5,6 +5,6 @@ export declare const handleStudioProtocolInstall: ({ focusStudioTab, liveEventsS
|
|
|
5
5
|
readonly focusStudioTab: FocusStudioTab;
|
|
6
6
|
readonly liveEventsServer: LiveEventsServer;
|
|
7
7
|
readonly request: IncomingMessage;
|
|
8
|
-
readonly response: ServerResponse
|
|
8
|
+
readonly response: ServerResponse;
|
|
9
9
|
}) => Promise<void>;
|
|
10
10
|
export {};
|
|
@@ -6,6 +6,6 @@ export declare const handleStudioProtocolLicenseKey: ({ configFile, focusStudioT
|
|
|
6
6
|
readonly focusStudioTab: FocusStudioTab;
|
|
7
7
|
readonly liveEventsServer: LiveEventsServer;
|
|
8
8
|
readonly request: IncomingMessage;
|
|
9
|
-
readonly response: ServerResponse
|
|
9
|
+
readonly response: ServerResponse;
|
|
10
10
|
}) => Promise<void>;
|
|
11
11
|
export {};
|
|
@@ -2,9 +2,9 @@ import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
|
2
2
|
export declare const getAllowedStudioProtocolOrigin: (request: IncomingMessage) => string | null;
|
|
3
3
|
export declare const setStudioProtocolCorsHeaders: ({ request, response, }: {
|
|
4
4
|
readonly request: IncomingMessage;
|
|
5
|
-
readonly response: ServerResponse
|
|
5
|
+
readonly response: ServerResponse;
|
|
6
6
|
}) => void;
|
|
7
7
|
export declare const handleStudioProtocolOptions: ({ request, response, }: {
|
|
8
8
|
readonly request: IncomingMessage;
|
|
9
|
-
readonly response: ServerResponse
|
|
9
|
+
readonly response: ServerResponse;
|
|
10
10
|
}) => Promise<void>;
|
|
@@ -2,6 +2,6 @@ import type { ServerResponse } from 'node:http';
|
|
|
2
2
|
export declare const writeStudioProtocolError: ({ code, message, response, status, }: {
|
|
3
3
|
readonly code: string;
|
|
4
4
|
readonly message: string;
|
|
5
|
-
readonly response: ServerResponse
|
|
5
|
+
readonly response: ServerResponse;
|
|
6
6
|
readonly status: number;
|
|
7
7
|
}) => void;
|
|
@@ -24,7 +24,7 @@ type UndoEntry = {
|
|
|
24
24
|
entryType: UndoEntryType;
|
|
25
25
|
undoRedoNavigation: UndoRedoNavigation | null;
|
|
26
26
|
};
|
|
27
|
-
export declare function pushToUndoStack({ filePath, oldContents, newContents, logLevel, remotionRoot, logLine, description, entryType, suppressHmrOnFileRestore, nodePathRemappings }: {
|
|
27
|
+
export declare function pushToUndoStack({ filePath, oldContents, newContents, logLevel, remotionRoot, logLine, description, entryType, suppressHmrOnFileRestore, nodePathRemappings, }: {
|
|
28
28
|
filePath: string;
|
|
29
29
|
oldContents: string;
|
|
30
30
|
newContents: string | null;
|
|
@@ -36,7 +36,7 @@ export declare function pushToUndoStack({ filePath, oldContents, newContents, lo
|
|
|
36
36
|
suppressHmrOnFileRestore: boolean;
|
|
37
37
|
nodePathRemappings: SequenceNodePathRemapping[] | null;
|
|
38
38
|
}): void;
|
|
39
|
-
export declare function pushTransactionToUndoStack({ snapshots, logLevel, remotionRoot, description, entryType, suppressHmrOnFileRestore, undoRedoNavigation }: {
|
|
39
|
+
export declare function pushTransactionToUndoStack({ snapshots, logLevel, remotionRoot, description, entryType, suppressHmrOnFileRestore, undoRedoNavigation, }: {
|
|
40
40
|
snapshots: Array<{
|
|
41
41
|
filePath: string;
|
|
42
42
|
oldContents: string | null;
|
|
@@ -52,7 +52,7 @@ export declare function pushTransactionToUndoStack({ snapshots, logLevel, remoti
|
|
|
52
52
|
undoRedoNavigation: UndoRedoNavigation | null;
|
|
53
53
|
}): void;
|
|
54
54
|
export declare function printUndoHint(logLevel: LogLevel): void;
|
|
55
|
-
export declare function pushToRedoStack({ filePath, oldContents, newContents, logLine, description, entryType, suppressHmrOnFileRestore }: {
|
|
55
|
+
export declare function pushToRedoStack({ filePath, oldContents, newContents, logLine, description, entryType, suppressHmrOnFileRestore, }: {
|
|
56
56
|
filePath: string;
|
|
57
57
|
oldContents: string;
|
|
58
58
|
newContents: string | null;
|
|
@@ -89,10 +89,14 @@ function pushTransactionToUndoStack({ snapshots, logLevel, remotionRoot, descrip
|
|
|
89
89
|
undoRedoNavigation,
|
|
90
90
|
});
|
|
91
91
|
undoStack.push(entry);
|
|
92
|
+
const discardedEntries = undoStack.length > MAX_ENTRIES || redoStack.length > 0;
|
|
92
93
|
if (undoStack.length > MAX_ENTRIES) {
|
|
93
94
|
undoStack.shift();
|
|
94
95
|
}
|
|
95
96
|
redoStack.length = 0;
|
|
97
|
+
if (discardedEntries) {
|
|
98
|
+
cleanupWatchers();
|
|
99
|
+
}
|
|
96
100
|
renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel }, renderer_1.RenderInternals.chalk.gray(`Undo stack: added entry for ${entry.filePath} (${undoStack.length} items)`));
|
|
97
101
|
for (const filePath of getEntryFilePaths(entry)) {
|
|
98
102
|
ensureWatching(filePath);
|
|
@@ -125,6 +129,7 @@ function pushToRedoStack({ filePath, oldContents, newContents, logLine, descript
|
|
|
125
129
|
redoStack.push(entry);
|
|
126
130
|
if (redoStack.length > MAX_ENTRIES) {
|
|
127
131
|
redoStack.shift();
|
|
132
|
+
cleanupWatchers();
|
|
128
133
|
}
|
|
129
134
|
renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel: storedLogLevel }, renderer_1.RenderInternals.chalk.gray(`Redo stack: added entry for ${entry.filePath} (${redoStack.length} items)`));
|
|
130
135
|
for (const watchedFilePath of getEntryFilePaths(entry)) {
|
|
@@ -202,6 +207,7 @@ function cleanupWatchers() {
|
|
|
202
207
|
if (!filesInStacks.has(filePath)) {
|
|
203
208
|
watcher.unwatch();
|
|
204
209
|
watchers.delete(filePath);
|
|
210
|
+
suppressedWrites.delete(filePath);
|
|
205
211
|
}
|
|
206
212
|
}
|
|
207
213
|
}
|
|
@@ -257,6 +263,7 @@ function popUndo() {
|
|
|
257
263
|
}));
|
|
258
264
|
if (redoStack.length > MAX_ENTRIES) {
|
|
259
265
|
redoStack.shift();
|
|
266
|
+
cleanupWatchers();
|
|
260
267
|
}
|
|
261
268
|
const files = entry.snapshots.flatMap((snapshot) => {
|
|
262
269
|
if (snapshot.nodePathRemappings === null) {
|
|
@@ -328,6 +335,7 @@ function popRedo() {
|
|
|
328
335
|
const snapshotsWithNewContents = [];
|
|
329
336
|
for (const snapshot of entry.snapshots) {
|
|
330
337
|
if (snapshot.newContents === null) {
|
|
338
|
+
cleanupWatchers();
|
|
331
339
|
return { success: false, reason: 'Redo entry is incomplete' };
|
|
332
340
|
}
|
|
333
341
|
snapshotsWithNewContents.push({
|
|
@@ -344,6 +352,7 @@ function popRedo() {
|
|
|
344
352
|
}));
|
|
345
353
|
if (undoStack.length > MAX_ENTRIES) {
|
|
346
354
|
undoStack.shift();
|
|
355
|
+
cleanupWatchers();
|
|
347
356
|
}
|
|
348
357
|
const files = snapshotsWithNewContents.flatMap((snapshot) => {
|
|
349
358
|
if (snapshot.nodePathRemappings === null) {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import type { LogLevel } from '@remotion/renderer';
|
|
1
2
|
import type { UpdateAvailableResponse } from '@remotion/studio-shared';
|
|
2
3
|
export declare const isUpdateAvailable: ({ remotionRoot, currentVersion, logLevel, getLatestVersion, }: {
|
|
3
4
|
remotionRoot: string;
|
|
4
5
|
currentVersion: string;
|
|
5
|
-
logLevel:
|
|
6
|
+
logLevel: LogLevel;
|
|
6
7
|
getLatestVersion: (() => Promise<string>) | null;
|
|
7
8
|
}) => Promise<UpdateAvailableResponse>;
|
|
8
9
|
export declare const getRemotionVersion: () => any;
|
|
9
|
-
export declare const isUpdateAvailableWithTimeout: (remotionRoot: string, logLevel:
|
|
10
|
+
export declare const isUpdateAvailableWithTimeout: (remotionRoot: string, logLevel: LogLevel) => Promise<UpdateAvailableResponse>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const remotionSkillNames: readonly [
|
|
1
|
+
export declare const remotionSkillNames: readonly ['remotion-best-practices', 'remotion-captions', 'remotion-create', 'remotion-docs', 'remotion-interactivity', 'remotion-maps', 'remotion-markup', 'remotion-multimedia', 'remotion-render', 'remotion-saas', 'remotion-studio', 'remotion-upgrade'];
|
|
2
2
|
export type RemotionSkillName = (typeof remotionSkillNames)[number];
|
package/dist/routes.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
|
-
import type { DefaultEditor } from '@remotion/renderer';
|
|
2
|
+
import type { DefaultCodingAgent, DefaultEditor, LogLevel } from '@remotion/renderer';
|
|
3
3
|
import type { GitSource, RenderDefaults, RenderJob, StudioRuntimeConfig } from '@remotion/studio-shared';
|
|
4
4
|
import type { QueueMethods } from './preview-server/api-types';
|
|
5
5
|
import type { LiveEventsServer } from './preview-server/live-events';
|
|
@@ -9,14 +9,14 @@ export declare const handleRoutes: ({ staticHash, staticHashPrefix, outputHash,
|
|
|
9
9
|
outputHash: string;
|
|
10
10
|
outputHashPrefix: string;
|
|
11
11
|
request: IncomingMessage;
|
|
12
|
-
response: ServerResponse
|
|
12
|
+
response: ServerResponse;
|
|
13
13
|
liveEventsServer: LiveEventsServer;
|
|
14
14
|
getCurrentInputProps: () => object;
|
|
15
15
|
getEnvVariables: () => Record<string, string>;
|
|
16
16
|
remotionRoot: string;
|
|
17
17
|
entryPoint: string;
|
|
18
18
|
publicDir: string;
|
|
19
|
-
logLevel:
|
|
19
|
+
logLevel: LogLevel;
|
|
20
20
|
getRenderQueue: () => RenderJob[];
|
|
21
21
|
getRenderDefaults: () => RenderDefaults;
|
|
22
22
|
getNumberOfAudioTags: () => number;
|
|
@@ -28,7 +28,7 @@ export declare const handleRoutes: ({ staticHash, staticHashPrefix, outputHash,
|
|
|
28
28
|
getPreviewSampleRate: () => number | null;
|
|
29
29
|
enableCrossSiteIsolation: boolean;
|
|
30
30
|
getStudioRuntimeConfig: () => StudioRuntimeConfig;
|
|
31
|
-
getDefaultCodingAgent: () =>
|
|
31
|
+
getDefaultCodingAgent: () => DefaultCodingAgent | null;
|
|
32
32
|
getDefaultEditor: () => DefaultEditor | null;
|
|
33
33
|
configFile: string | null;
|
|
34
34
|
invalidateBundle: () => Promise<void>;
|
package/dist/server-ready.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import type { LogLevel } from '@remotion/renderer';
|
|
1
2
|
export declare const setServerReadyComment: (newMessage: string) => void;
|
|
2
|
-
export declare const printServerReadyComment: (prefix: string, logLevel:
|
|
3
|
+
export declare const printServerReadyComment: (prefix: string, logLevel: LogLevel) => void;
|
package/dist/start-studio.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BundlerOverrideFn, RspackOverrideFn, WebpackOverrideFn } from '@remotion/bundler';
|
|
2
|
-
import type { DefaultEditor } from '@remotion/renderer';
|
|
2
|
+
import type { DefaultCodingAgent, DefaultEditor, LogLevel } from '@remotion/renderer';
|
|
3
3
|
import type { GitSource, RenderDefaults, RenderJob, StudioRuntimeConfig } from '@remotion/studio-shared';
|
|
4
4
|
import type { QueueMethods } from './preview-server/api-types';
|
|
5
5
|
export type StartStudioResult = {
|
|
@@ -13,7 +13,7 @@ export type StartStudioResult = {
|
|
|
13
13
|
export declare const startStudio: ({ browserArgs, browserFlag, shouldOpenBrowser, fullEntryPath, logLevel, getCurrentInputProps, getEnvVariables, desiredPort, remotionRoot, relativePublicDir, bundlerOverride, rspackOverride, webpackOverride, poll, getRenderDefaults, getRenderQueue, getNumberOfAudioTags, queueMethods, previewEntry, gitSource, binariesDirectory, forceIPv4, getAudioLatencyHint, getExperimentalKeepAudioContextAlive, getPreviewSampleRate, enableCrossSiteIsolation, forceNew, rspack, getStudioRuntimeConfig, getDefaultCodingAgent, getDefaultEditor, configFile, }: {
|
|
14
14
|
browserArgs: string;
|
|
15
15
|
browserFlag: string;
|
|
16
|
-
logLevel:
|
|
16
|
+
logLevel: LogLevel;
|
|
17
17
|
shouldOpenBrowser: boolean;
|
|
18
18
|
fullEntryPath: string;
|
|
19
19
|
getCurrentInputProps: () => object;
|
|
@@ -40,7 +40,7 @@ export declare const startStudio: ({ browserArgs, browserFlag, shouldOpenBrowser
|
|
|
40
40
|
forceNew: boolean;
|
|
41
41
|
rspack: boolean;
|
|
42
42
|
getStudioRuntimeConfig: () => StudioRuntimeConfig;
|
|
43
|
-
getDefaultCodingAgent: () =>
|
|
43
|
+
getDefaultCodingAgent: () => DefaultCodingAgent | null;
|
|
44
44
|
getDefaultEditor: () => DefaultEditor | null;
|
|
45
45
|
configFile: string | null;
|
|
46
46
|
}) => Promise<StartStudioResult>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { DefaultEditor } from '@remotion/renderer';
|
|
1
|
+
import type { DefaultCodingAgent, DefaultEditor, LogLevel } from '@remotion/renderer';
|
|
2
2
|
export declare const registerStudioShortcuts: ({ browserArgs, browserFlag, url, logLevel, remotionRoot, getDefaultEditor, getDefaultCodingAgent, }: {
|
|
3
3
|
browserArgs: string;
|
|
4
4
|
browserFlag: string;
|
|
5
5
|
url: string;
|
|
6
|
-
logLevel:
|
|
6
|
+
logLevel: LogLevel;
|
|
7
7
|
remotionRoot: string;
|
|
8
8
|
getDefaultEditor: () => DefaultEditor | null;
|
|
9
|
-
getDefaultCodingAgent: () =>
|
|
9
|
+
getDefaultCodingAgent: () => DefaultCodingAgent | null;
|
|
10
10
|
}) => {
|
|
11
11
|
registered: boolean;
|
|
12
12
|
cleanup: () => void;
|
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.538",
|
|
7
7
|
"description": "Run a Remotion Studio with a server backend",
|
|
8
8
|
"main": "dist",
|
|
9
9
|
"scripts": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"test": "bun test src",
|
|
12
12
|
"formatting": "oxfmt src --check",
|
|
13
13
|
"format": "oxfmt src",
|
|
14
|
-
"make": "
|
|
14
|
+
"make": "tsc -d"
|
|
15
15
|
},
|
|
16
16
|
"author": "Jonny Burger <jonny@remotion.dev>",
|
|
17
17
|
"contributors": [],
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"access": "public"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@remotion/studio-protocol": "4.0.
|
|
26
|
+
"@remotion/studio-protocol": "4.0.538",
|
|
27
27
|
"@babel/types": "7.24.0",
|
|
28
28
|
"@babel/parser": "7.24.1",
|
|
29
29
|
"@svgr/core": "8.1.0",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"kiwi-schema": "0.5.0",
|
|
32
32
|
"semver": "7.5.3",
|
|
33
33
|
"zod": "4.5.4",
|
|
34
|
-
"remotion": "4.0.
|
|
34
|
+
"remotion": "4.0.538",
|
|
35
35
|
"recast": "0.23.21",
|
|
36
|
-
"@remotion/bundler": "4.0.
|
|
37
|
-
"@remotion/renderer": "4.0.
|
|
38
|
-
"@remotion/codemods": "4.0.
|
|
39
|
-
"@remotion/studio-shared": "4.0.
|
|
36
|
+
"@remotion/bundler": "4.0.538",
|
|
37
|
+
"@remotion/renderer": "4.0.538",
|
|
38
|
+
"@remotion/codemods": "4.0.538",
|
|
39
|
+
"@remotion/studio-shared": "4.0.538",
|
|
40
40
|
"memfs": "3.4.3",
|
|
41
41
|
"open": "8.4.2"
|
|
42
42
|
},
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"ast-types": "0.16.1",
|
|
45
45
|
"react": "19.2.3",
|
|
46
46
|
"@types/semver": "7.5.3",
|
|
47
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
47
|
+
"@remotion/eslint-config-internal": "4.0.538",
|
|
48
48
|
"eslint": "9.19.0",
|
|
49
49
|
"prettier": "3.8.1",
|
|
50
50
|
"@types/node": "20.12.14",
|
|
51
|
-
"
|
|
51
|
+
"typescript": "7.1.0-beta"
|
|
52
52
|
},
|
|
53
53
|
"exports": {
|
|
54
54
|
".": "./dist/index.js",
|