@remotion/studio-server 4.0.497 → 4.0.499
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/index.d.ts +4 -6
- package/dist/preview-server/api-routes.js +4 -0
- package/dist/preview-server/api-types.d.ts +1 -0
- package/dist/preview-server/handler.d.ts +2 -1
- package/dist/preview-server/handler.js +2 -1
- package/dist/preview-server/routes/batch-update-keyframe-settings.d.ts +7 -0
- package/dist/preview-server/routes/batch-update-keyframe-settings.js +187 -0
- package/dist/preview-server/routes/insert-element.js +5 -5
- package/dist/preview-server/routes/insert-jsx-element.js +5 -4
- package/dist/preview-server/routes/update-public-license.d.ts +7 -0
- package/dist/preview-server/routes/update-public-license.js +93 -0
- package/dist/preview-server/start-server.d.ts +4 -6
- package/dist/preview-server/start-server.js +4 -6
- package/dist/routes.d.ts +2 -1
- package/dist/routes.js +9 -8
- package/dist/start-studio.d.ts +5 -7
- package/dist/start-studio.js +4 -6
- package/package.json +7 -6
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { ApiRoutes, CopyStillToClipboardRequest, getDefaultOutLocation, OpenInFi
|
|
|
2
2
|
export type { AggregateRenderProgress, BundlingState, CopyingState, DownloadProgress, HotMiddlewareOptions, JobProgressCallback, ModuleMap, PackageManager, ProjectInfo, RenderingProgressInput, RenderJob, RenderJobWithCleanup, RequiredChromiumOptions, StitchingProgressInput, UiOpenGlOptions, } from '@remotion/studio-shared';
|
|
3
3
|
import { AnsiDiff } from './ansi-diff';
|
|
4
4
|
export declare const StudioServerInternals: {
|
|
5
|
-
startStudio: ({ browserArgs, browserFlag, shouldOpenBrowser, fullEntryPath, logLevel, getCurrentInputProps, getEnvVariables, desiredPort,
|
|
5
|
+
startStudio: ({ browserArgs, browserFlag, shouldOpenBrowser, fullEntryPath, logLevel, getCurrentInputProps, getEnvVariables, desiredPort, remotionRoot, relativePublicDir, bundlerOverride, rspackOverride, webpackOverride, poll, getRenderDefaults, getRenderQueue, getNumberOfAudioTags, queueMethods, previewEntry, gitSource, binariesDirectory, forceIPv4, getAudioLatencyHint, getPreviewSampleRate, enableCrossSiteIsolation, forceNew, rspack, getStudioRuntimeConfig, configFile, }: {
|
|
6
6
|
browserArgs: string;
|
|
7
7
|
browserFlag: string;
|
|
8
8
|
logLevel: "error" | "info" | "trace" | "verbose" | "warn";
|
|
@@ -11,11 +11,10 @@ export declare const StudioServerInternals: {
|
|
|
11
11
|
getCurrentInputProps: () => object;
|
|
12
12
|
getEnvVariables: () => Record<string, string>;
|
|
13
13
|
desiredPort: number | null;
|
|
14
|
-
maxTimelineTracks: number | null;
|
|
15
|
-
bufferStateDelayInMilliseconds: number | null;
|
|
16
14
|
remotionRoot: string;
|
|
17
|
-
keyboardShortcutsEnabled: boolean;
|
|
18
15
|
relativePublicDir: string | null;
|
|
16
|
+
bundlerOverride: import("@remotion/bundler").BundlerOverrideFn;
|
|
17
|
+
rspackOverride: import("@remotion/bundler").RspackOverrideFn;
|
|
19
18
|
webpackOverride: import("@remotion/bundler").WebpackOverrideFn;
|
|
20
19
|
poll: number | null;
|
|
21
20
|
getRenderDefaults: () => import("@remotion/studio-shared").RenderDefaults;
|
|
@@ -29,11 +28,10 @@ export declare const StudioServerInternals: {
|
|
|
29
28
|
gitSource: import("@remotion/studio-shared").GitSource | null;
|
|
30
29
|
binariesDirectory: string | null;
|
|
31
30
|
forceIPv4: boolean;
|
|
32
|
-
askAIEnabled: boolean;
|
|
33
|
-
interactivityEnabled: boolean;
|
|
34
31
|
forceNew: boolean;
|
|
35
32
|
rspack: boolean;
|
|
36
33
|
getStudioRuntimeConfig: () => import("@remotion/studio-shared").StudioRuntimeConfig;
|
|
34
|
+
configFile: string | null;
|
|
37
35
|
}) => Promise<import("./start-studio").StartStudioResult>;
|
|
38
36
|
getRemotionVersion: () => any;
|
|
39
37
|
waitForLiveEventsListener: () => Promise<import("./preview-server/live-events").LiveEventsServer>;
|
|
@@ -8,6 +8,7 @@ const add_render_1 = require("./routes/add-render");
|
|
|
8
8
|
const add_sequence_keyframe_1 = require("./routes/add-sequence-keyframe");
|
|
9
9
|
const apply_codemod_1 = require("./routes/apply-codemod");
|
|
10
10
|
const apply_visual_control_change_1 = require("./routes/apply-visual-control-change");
|
|
11
|
+
const batch_update_keyframe_settings_1 = require("./routes/batch-update-keyframe-settings");
|
|
11
12
|
const cancel_render_1 = require("./routes/cancel-render");
|
|
12
13
|
const composition_component_info_1 = require("./routes/composition-component-info");
|
|
13
14
|
const convert_figma_clipboard_to_svg_1 = require("./routes/convert-figma-clipboard-to-svg");
|
|
@@ -49,6 +50,7 @@ const update_available_1 = require("./routes/update-available");
|
|
|
49
50
|
const update_default_props_1 = require("./routes/update-default-props");
|
|
50
51
|
const update_effect_keyframe_settings_1 = require("./routes/update-effect-keyframe-settings");
|
|
51
52
|
const update_element_install_target_1 = require("./routes/update-element-install-target");
|
|
53
|
+
const update_public_license_1 = require("./routes/update-public-license");
|
|
52
54
|
const update_sequence_keyframe_settings_1 = require("./routes/update-sequence-keyframe-settings");
|
|
53
55
|
exports.allApiRoutes = {
|
|
54
56
|
'/api/composition-component-info': composition_component_info_1.compositionComponentInfoHandler,
|
|
@@ -82,6 +84,7 @@ exports.allApiRoutes = {
|
|
|
82
84
|
'/api/add-keyframes': add_keyframes_1.addKeyframesHandler,
|
|
83
85
|
'/api/update-sequence-keyframe-settings': update_sequence_keyframe_settings_1.updateSequenceKeyframeSettingsHandler,
|
|
84
86
|
'/api/update-effect-keyframe-settings': update_effect_keyframe_settings_1.updateEffectKeyframeSettingsHandler,
|
|
87
|
+
'/api/batch-update-keyframe-settings': batch_update_keyframe_settings_1.batchUpdateKeyframeSettingsHandler,
|
|
85
88
|
'/api/delete-effect': delete_effect_1.deleteEffectHandler,
|
|
86
89
|
'/api/paste-effects': paste_effects_1.pasteEffectsHandler,
|
|
87
90
|
'/api/delete-jsx-node': delete_jsx_node_1.deleteJsxNodeHandler,
|
|
@@ -92,6 +95,7 @@ exports.allApiRoutes = {
|
|
|
92
95
|
'/api/delete-static-file': delete_static_file_1.deleteStaticFileHandler,
|
|
93
96
|
'/api/rename-static-file': rename_static_file_1.renameStaticFileHandler,
|
|
94
97
|
'/api/restart-studio': restart_studio_1.handleRestartStudio,
|
|
98
|
+
'/api/update-public-license': update_public_license_1.updatePublicLicenseHandler,
|
|
95
99
|
'/api/install-package': install_dependency_1.handleInstallPackage,
|
|
96
100
|
'/api/insert-jsx-element': insert_jsx_element_1.insertJsxElementHandler,
|
|
97
101
|
'/api/insert-element': insert_element_1.insertElementHandler,
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
2
|
import type { ApiHandler, QueueMethods } from './api-types';
|
|
3
|
-
export declare const handleRequest: <Req, Res>({ remotionRoot, request, response, entryPoint, handler, logLevel, methods, binariesDirectory, publicDir, }: {
|
|
3
|
+
export declare const handleRequest: <Req, Res>({ remotionRoot, request, response, entryPoint, handler, logLevel, methods, binariesDirectory, publicDir, configFile, }: {
|
|
4
4
|
remotionRoot: string;
|
|
5
5
|
publicDir: string;
|
|
6
6
|
request: IncomingMessage;
|
|
7
7
|
response: ServerResponse<IncomingMessage>;
|
|
8
8
|
entryPoint: string;
|
|
9
9
|
binariesDirectory: string | null;
|
|
10
|
+
configFile: string | null;
|
|
10
11
|
handler: ApiHandler<Req, Res>;
|
|
11
12
|
logLevel: "error" | "info" | "trace" | "verbose" | "warn";
|
|
12
13
|
methods: QueueMethods;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.handleRequest = void 0;
|
|
4
4
|
const parse_body_1 = require("./parse-body");
|
|
5
5
|
const validate_same_origin_1 = require("./validate-same-origin");
|
|
6
|
-
const handleRequest = async ({ remotionRoot, request, response, entryPoint, handler, logLevel, methods, binariesDirectory, publicDir, }) => {
|
|
6
|
+
const handleRequest = async ({ remotionRoot, request, response, entryPoint, handler, logLevel, methods, binariesDirectory, publicDir, configFile, }) => {
|
|
7
7
|
if (request.method === 'OPTIONS') {
|
|
8
8
|
response.statusCode = 200;
|
|
9
9
|
response.end();
|
|
@@ -24,6 +24,7 @@ const handleRequest = async ({ remotionRoot, request, response, entryPoint, hand
|
|
|
24
24
|
methods,
|
|
25
25
|
binariesDirectory,
|
|
26
26
|
publicDir,
|
|
27
|
+
configFile,
|
|
27
28
|
});
|
|
28
29
|
response.end(JSON.stringify({
|
|
29
30
|
success: true,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BatchUpdateKeyframeSettingsRequest, BatchUpdateKeyframeSettingsResponse } from '@remotion/studio-shared';
|
|
2
|
+
import type { ApiHandler } from '../api-types';
|
|
3
|
+
export declare const batchUpdateKeyframeSettings: ({ sequenceKeyframes, effectKeyframes, clientId, remotionRoot, logLevel, }: BatchUpdateKeyframeSettingsRequest & {
|
|
4
|
+
remotionRoot: string;
|
|
5
|
+
logLevel: "error" | "info" | "trace" | "verbose" | "warn";
|
|
6
|
+
}) => Promise<void>;
|
|
7
|
+
export declare const batchUpdateKeyframeSettingsHandler: ApiHandler<BatchUpdateKeyframeSettingsRequest, BatchUpdateKeyframeSettingsResponse>;
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.batchUpdateKeyframeSettingsHandler = exports.batchUpdateKeyframeSettings = void 0;
|
|
4
|
+
const node_fs_1 = require("node:fs");
|
|
5
|
+
const renderer_1 = require("@remotion/renderer");
|
|
6
|
+
const update_keyframes_1 = require("../../codemods/update-keyframes/update-keyframes");
|
|
7
|
+
const file_watcher_1 = require("../../file-watcher");
|
|
8
|
+
const resolve_file_inside_project_1 = require("../../helpers/resolve-file-inside-project");
|
|
9
|
+
const undo_stack_1 = require("../undo-stack");
|
|
10
|
+
const watch_ignore_next_change_1 = require("../watch-ignore-next-change");
|
|
11
|
+
const log_effect_update_1 = require("./log-updates/log-effect-update");
|
|
12
|
+
const log_update_1 = require("./log-updates/log-update");
|
|
13
|
+
const source_file_write_queue_1 = require("./source-file-write-queue");
|
|
14
|
+
const groupBy = (items, getKey) => {
|
|
15
|
+
var _a;
|
|
16
|
+
const groups = new Map();
|
|
17
|
+
for (const item of items) {
|
|
18
|
+
const key = getKey(item);
|
|
19
|
+
const group = (_a = groups.get(key)) !== null && _a !== void 0 ? _a : [];
|
|
20
|
+
group.push(item);
|
|
21
|
+
groups.set(key, group);
|
|
22
|
+
}
|
|
23
|
+
return [...groups.values()];
|
|
24
|
+
};
|
|
25
|
+
const toOperation = (settings) => settings.type === 'settings'
|
|
26
|
+
? {
|
|
27
|
+
type: 'settings',
|
|
28
|
+
clamping: settings.clamping,
|
|
29
|
+
posterize: settings.posterize,
|
|
30
|
+
output: settings.output,
|
|
31
|
+
}
|
|
32
|
+
: {
|
|
33
|
+
type: 'easing',
|
|
34
|
+
segmentIndex: settings.segmentIndex,
|
|
35
|
+
easing: settings.easing,
|
|
36
|
+
};
|
|
37
|
+
const batchUpdateKeyframeSettings = async ({ sequenceKeyframes, effectKeyframes, clientId, remotionRoot, logLevel, }) => {
|
|
38
|
+
var _a, _b;
|
|
39
|
+
const totalUpdates = sequenceKeyframes.length + effectKeyframes.length;
|
|
40
|
+
if (totalUpdates === 0) {
|
|
41
|
+
throw new Error('No keyframe settings updates were specified');
|
|
42
|
+
}
|
|
43
|
+
const fileGroups = new Map();
|
|
44
|
+
for (const update of sequenceKeyframes) {
|
|
45
|
+
const { absolutePath, fileRelativeToRoot } = (0, resolve_file_inside_project_1.resolveFileInsideProject)({
|
|
46
|
+
remotionRoot,
|
|
47
|
+
fileName: update.fileName,
|
|
48
|
+
action: 'modify',
|
|
49
|
+
});
|
|
50
|
+
const group = (_a = fileGroups.get(absolutePath)) !== null && _a !== void 0 ? _a : {
|
|
51
|
+
sequenceKeyframes: [],
|
|
52
|
+
effectKeyframes: [],
|
|
53
|
+
};
|
|
54
|
+
group.sequenceKeyframes.push({ ...update, fileRelativeToRoot });
|
|
55
|
+
fileGroups.set(absolutePath, group);
|
|
56
|
+
}
|
|
57
|
+
for (const update of effectKeyframes) {
|
|
58
|
+
const { absolutePath, fileRelativeToRoot } = (0, resolve_file_inside_project_1.resolveFileInsideProject)({
|
|
59
|
+
remotionRoot,
|
|
60
|
+
fileName: update.fileName,
|
|
61
|
+
action: 'modify',
|
|
62
|
+
});
|
|
63
|
+
const group = (_b = fileGroups.get(absolutePath)) !== null && _b !== void 0 ? _b : {
|
|
64
|
+
sequenceKeyframes: [],
|
|
65
|
+
effectKeyframes: [],
|
|
66
|
+
};
|
|
67
|
+
group.effectKeyframes.push({ ...update, fileRelativeToRoot });
|
|
68
|
+
fileGroups.set(absolutePath, group);
|
|
69
|
+
}
|
|
70
|
+
const snapshots = [];
|
|
71
|
+
const sequenceLogs = [];
|
|
72
|
+
const effectLogs = [];
|
|
73
|
+
for (const [absolutePath, group] of fileGroups) {
|
|
74
|
+
const fileContents = (0, node_fs_1.readFileSync)(absolutePath, 'utf-8');
|
|
75
|
+
let output = fileContents;
|
|
76
|
+
let firstLogLine = Number.POSITIVE_INFINITY;
|
|
77
|
+
for (const updates of groupBy(group.sequenceKeyframes, (update) => JSON.stringify(update.nodePath.nodePath))) {
|
|
78
|
+
const firstUpdate = updates[0];
|
|
79
|
+
const result = await (0, update_keyframes_1.updateSequenceKeyframes)({
|
|
80
|
+
input: output,
|
|
81
|
+
nodePath: firstUpdate.nodePath.nodePath,
|
|
82
|
+
schema: firstUpdate.schema,
|
|
83
|
+
videoConfigValues: firstUpdate.nodePath.videoConfigValues,
|
|
84
|
+
updates: updates.map((update) => ({
|
|
85
|
+
key: update.key,
|
|
86
|
+
operation: toOperation(update.settings),
|
|
87
|
+
})),
|
|
88
|
+
});
|
|
89
|
+
output = result.output;
|
|
90
|
+
firstLogLine = Math.min(firstLogLine, result.logLine);
|
|
91
|
+
for (const [index, update] of updates.entries()) {
|
|
92
|
+
sequenceLogs.push({
|
|
93
|
+
fileRelativeToRoot: update.fileRelativeToRoot,
|
|
94
|
+
line: result.logLine,
|
|
95
|
+
key: update.key,
|
|
96
|
+
oldValueString: result.oldValueStrings[index],
|
|
97
|
+
newValueString: result.newValueStrings[index],
|
|
98
|
+
formatted: result.formatted,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
for (const updates of groupBy(group.effectKeyframes, (update) => `${JSON.stringify(update.sequenceNodePath.nodePath)}:${update.effectIndex}`)) {
|
|
103
|
+
const firstUpdate = updates[0];
|
|
104
|
+
const result = await (0, update_keyframes_1.updateEffectKeyframes)({
|
|
105
|
+
input: output,
|
|
106
|
+
sequenceNodePath: firstUpdate.sequenceNodePath.nodePath,
|
|
107
|
+
effectIndex: firstUpdate.effectIndex,
|
|
108
|
+
schema: firstUpdate.schema,
|
|
109
|
+
videoConfigValues: firstUpdate.sequenceNodePath.videoConfigValues,
|
|
110
|
+
updates: updates.map((update) => ({
|
|
111
|
+
key: update.key,
|
|
112
|
+
operation: toOperation(update.settings),
|
|
113
|
+
})),
|
|
114
|
+
});
|
|
115
|
+
output = result.output;
|
|
116
|
+
firstLogLine = Math.min(firstLogLine, result.logLine);
|
|
117
|
+
for (const [index, update] of updates.entries()) {
|
|
118
|
+
effectLogs.push({
|
|
119
|
+
fileRelativeToRoot: update.fileRelativeToRoot,
|
|
120
|
+
line: result.logLine,
|
|
121
|
+
effectName: result.effectCallee,
|
|
122
|
+
propKey: update.key,
|
|
123
|
+
oldValueString: result.oldValueStrings[index],
|
|
124
|
+
newValueString: result.newValueStrings[index],
|
|
125
|
+
formatted: result.formatted,
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
snapshots.push({
|
|
130
|
+
filePath: absolutePath,
|
|
131
|
+
oldContents: fileContents,
|
|
132
|
+
newContents: output,
|
|
133
|
+
logLine: Number.isFinite(firstLogLine) ? firstLogLine : 1,
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
(0, undo_stack_1.pushTransactionToUndoStack)({
|
|
137
|
+
snapshots,
|
|
138
|
+
logLevel,
|
|
139
|
+
remotionRoot,
|
|
140
|
+
description: totalUpdates === 1
|
|
141
|
+
? {
|
|
142
|
+
undoMessage: '↩️ Keyframe settings reverted',
|
|
143
|
+
redoMessage: '↪️ Keyframe settings updated',
|
|
144
|
+
}
|
|
145
|
+
: {
|
|
146
|
+
undoMessage: `↩️ ${totalUpdates} keyframe settings reverted`,
|
|
147
|
+
redoMessage: `↪️ ${totalUpdates} keyframe settings updated`,
|
|
148
|
+
},
|
|
149
|
+
entryType: sequenceKeyframes.length > 0 ? 'sequence-props' : 'effect-props',
|
|
150
|
+
suppressHmrOnFileRestore: true,
|
|
151
|
+
});
|
|
152
|
+
for (const snapshot of snapshots) {
|
|
153
|
+
(0, undo_stack_1.suppressUndoStackInvalidation)(snapshot.filePath);
|
|
154
|
+
(0, watch_ignore_next_change_1.suppressBundlerUpdateForFile)(snapshot.filePath);
|
|
155
|
+
(0, file_watcher_1.writeFileAndNotifyFileWatchers)(snapshot.filePath, snapshot.newContents, clientId);
|
|
156
|
+
}
|
|
157
|
+
for (const log of sequenceLogs) {
|
|
158
|
+
(0, log_update_1.logUpdate)({
|
|
159
|
+
...log,
|
|
160
|
+
defaultValueString: null,
|
|
161
|
+
logLevel,
|
|
162
|
+
removedProps: [],
|
|
163
|
+
addedProps: [],
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
for (const log of effectLogs) {
|
|
167
|
+
(0, log_effect_update_1.logEffectUpdate)({
|
|
168
|
+
...log,
|
|
169
|
+
defaultValueString: null,
|
|
170
|
+
logLevel,
|
|
171
|
+
removedProps: [],
|
|
172
|
+
addedProps: [],
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
(0, undo_stack_1.printUndoHint)(logLevel);
|
|
176
|
+
};
|
|
177
|
+
exports.batchUpdateKeyframeSettings = batchUpdateKeyframeSettings;
|
|
178
|
+
const batchUpdateKeyframeSettingsHandler = ({ input, remotionRoot, logLevel }) => (0, source_file_write_queue_1.withSourceFileWriteQueue)(async () => {
|
|
179
|
+
renderer_1.RenderInternals.Log.trace({ indent: false, logLevel }, `[batch-update-keyframe-settings] Received ${input.sequenceKeyframes.length + input.effectKeyframes.length} update(s)`);
|
|
180
|
+
await (0, exports.batchUpdateKeyframeSettings)({
|
|
181
|
+
...input,
|
|
182
|
+
remotionRoot,
|
|
183
|
+
logLevel,
|
|
184
|
+
});
|
|
185
|
+
return { success: true };
|
|
186
|
+
});
|
|
187
|
+
exports.batchUpdateKeyframeSettingsHandler = batchUpdateKeyframeSettingsHandler;
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.insertElementHandler = void 0;
|
|
7
7
|
const node_fs_1 = require("node:fs");
|
|
8
8
|
const node_path_1 = __importDefault(require("node:path"));
|
|
9
|
+
const drag_and_drop_1 = require("@remotion/drag-and-drop");
|
|
9
10
|
const renderer_1 = require("@remotion/renderer");
|
|
10
|
-
const studio_shared_1 = require("@remotion/studio-shared");
|
|
11
11
|
const file_watcher_1 = require("../../file-watcher");
|
|
12
12
|
const resolve_composition_component_1 = require("../../helpers/resolve-composition-component");
|
|
13
13
|
const format_log_file_location_1 = require("../format-log-file-location");
|
|
@@ -56,7 +56,7 @@ const validateDimensions = (dimensions) => {
|
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
58
|
const validateElement = (element) => {
|
|
59
|
-
if (
|
|
59
|
+
if (drag_and_drop_1.DragAndDropInternals.makeElementFileNameFromSlug(element.slug) === null) {
|
|
60
60
|
throw new Error('Element slug must produce a safe lowercase .tsx file name');
|
|
61
61
|
}
|
|
62
62
|
if (typeof element.sourceCode !== 'string' ||
|
|
@@ -64,7 +64,7 @@ const validateElement = (element) => {
|
|
|
64
64
|
element.sourceCode.length > 200000) {
|
|
65
65
|
throw new Error('Unsupported Element source code');
|
|
66
66
|
}
|
|
67
|
-
if (
|
|
67
|
+
if (drag_and_drop_1.DragAndDropInternals.getElementComponentNameFromSourceCode(element.sourceCode) === null) {
|
|
68
68
|
throw new Error('Element source must export exactly one named component');
|
|
69
69
|
}
|
|
70
70
|
validateDimensions(element.dimensions);
|
|
@@ -77,7 +77,7 @@ const insertElementHandler = ({ input: { compositionFile, compositionId, element
|
|
|
77
77
|
(!Number.isInteger(from) || !Number.isFinite(from) || from < 0)) {
|
|
78
78
|
throw new Error('from must be a non-negative integer');
|
|
79
79
|
}
|
|
80
|
-
const componentName =
|
|
80
|
+
const componentName = drag_and_drop_1.DragAndDropInternals.getElementComponentNameFromSourceCode(element.sourceCode);
|
|
81
81
|
if (componentName === null) {
|
|
82
82
|
throw new Error('Element source must export exactly one named component');
|
|
83
83
|
}
|
|
@@ -90,7 +90,7 @@ const insertElementHandler = ({ input: { compositionFile, compositionId, element
|
|
|
90
90
|
if (!location.canAddSequence) {
|
|
91
91
|
throw new Error('Cannot insert Element into this composition component');
|
|
92
92
|
}
|
|
93
|
-
const derivedElementFileName =
|
|
93
|
+
const derivedElementFileName = drag_and_drop_1.DragAndDropInternals.makeElementFileNameFromSlug(element.slug);
|
|
94
94
|
if (derivedElementFileName === null) {
|
|
95
95
|
throw new Error('Element slug must produce a safe lowercase .tsx file name');
|
|
96
96
|
}
|
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.insertJsxElementHandler = void 0;
|
|
7
7
|
const node_path_1 = __importDefault(require("node:path"));
|
|
8
|
+
const drag_and_drop_1 = require("@remotion/drag-and-drop");
|
|
8
9
|
const renderer_1 = require("@remotion/renderer");
|
|
9
10
|
const studio_shared_1 = require("@remotion/studio-shared");
|
|
10
11
|
const file_watcher_1 = require("../../file-watcher");
|
|
@@ -78,16 +79,16 @@ const validateElement = (element, remotionRoot) => {
|
|
|
78
79
|
return;
|
|
79
80
|
}
|
|
80
81
|
if (element.type === 'component') {
|
|
81
|
-
if (!
|
|
82
|
+
if (!drag_and_drop_1.DragAndDropInternals.isComponentIdentifier(element.componentName)) {
|
|
82
83
|
throw new Error('Unsupported component name');
|
|
83
84
|
}
|
|
84
|
-
if (!
|
|
85
|
+
if (!drag_and_drop_1.DragAndDropInternals.isComponentIdentifier(element.importName)) {
|
|
85
86
|
throw new Error('Unsupported component import name');
|
|
86
87
|
}
|
|
87
|
-
if (!
|
|
88
|
+
if (!drag_and_drop_1.DragAndDropInternals.isComponentImportPath(element.importPath)) {
|
|
88
89
|
throw new Error('Unsupported component import path');
|
|
89
90
|
}
|
|
90
|
-
if (!
|
|
91
|
+
if (!drag_and_drop_1.DragAndDropInternals.areComponentProps(element.props)) {
|
|
91
92
|
throw new Error('Unsupported component props');
|
|
92
93
|
}
|
|
93
94
|
return;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { UpdatePublicLicenseRequest, UpdatePublicLicenseResponse } from '@remotion/studio-shared';
|
|
2
|
+
import type { ApiHandler } from '../api-types';
|
|
3
|
+
export declare const updatePublicLicenseInConfig: ({ configContents, publicLicenseKey, }: {
|
|
4
|
+
configContents: string;
|
|
5
|
+
publicLicenseKey: string;
|
|
6
|
+
}) => string;
|
|
7
|
+
export declare const updatePublicLicenseHandler: ApiHandler<UpdatePublicLicenseRequest, UpdatePublicLicenseResponse>;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.updatePublicLicenseHandler = exports.updatePublicLicenseInConfig = void 0;
|
|
37
|
+
const node_fs_1 = require("node:fs");
|
|
38
|
+
const recast = __importStar(require("recast"));
|
|
39
|
+
const parse_ast_1 = require("../../codemods/parse-ast");
|
|
40
|
+
const file_watcher_1 = require("../../file-watcher");
|
|
41
|
+
const updatePublicLicenseInConfig = ({ configContents, publicLicenseKey, }) => {
|
|
42
|
+
const ast = (0, parse_ast_1.parseAst)(configContents);
|
|
43
|
+
recast.types.visit(ast.program, {
|
|
44
|
+
visitExpressionStatement(path) {
|
|
45
|
+
const { expression } = path.node;
|
|
46
|
+
if (expression.type === 'CallExpression' &&
|
|
47
|
+
expression.callee.type === 'MemberExpression' &&
|
|
48
|
+
!expression.callee.computed &&
|
|
49
|
+
expression.callee.object.type === 'Identifier' &&
|
|
50
|
+
expression.callee.object.name === 'Config' &&
|
|
51
|
+
expression.callee.property.type === 'Identifier' &&
|
|
52
|
+
expression.callee.property.name === 'setPublicLicenseKey') {
|
|
53
|
+
path.prune();
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
this.traverse(path);
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
const configWithoutExistingCalls = recast.print(ast, {
|
|
60
|
+
lineTerminator: '\n',
|
|
61
|
+
}).code;
|
|
62
|
+
const separator = configWithoutExistingCalls.endsWith('\n') ? '' : '\n';
|
|
63
|
+
const escapedPublicLicenseKey = publicLicenseKey
|
|
64
|
+
.replaceAll('\\', '\\\\')
|
|
65
|
+
.replaceAll("'", "\\'")
|
|
66
|
+
.replaceAll('\r', '\\r')
|
|
67
|
+
.replaceAll('\n', '\\n')
|
|
68
|
+
.replaceAll('\u2028', '\\u2028')
|
|
69
|
+
.replaceAll('\u2029', '\\u2029');
|
|
70
|
+
return `${configWithoutExistingCalls}${separator}Config.setPublicLicenseKey('${escapedPublicLicenseKey}');\n`;
|
|
71
|
+
};
|
|
72
|
+
exports.updatePublicLicenseInConfig = updatePublicLicenseInConfig;
|
|
73
|
+
const updatePublicLicenseHandler = ({ input, configFile }) => {
|
|
74
|
+
if (configFile === null || configFile === undefined) {
|
|
75
|
+
return Promise.resolve({
|
|
76
|
+
success: false,
|
|
77
|
+
reason: 'No Remotion config file was loaded.',
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
if (input.publicLicenseKey.length === 0) {
|
|
81
|
+
return Promise.resolve({
|
|
82
|
+
success: false,
|
|
83
|
+
reason: 'The public license key must not be empty.',
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
const configContents = (0, node_fs_1.readFileSync)(configFile, 'utf8');
|
|
87
|
+
(0, file_watcher_1.writeFileAndNotifyFileWatchers)(configFile, (0, exports.updatePublicLicenseInConfig)({
|
|
88
|
+
configContents,
|
|
89
|
+
publicLicenseKey: input.publicLicenseKey,
|
|
90
|
+
}), undefined);
|
|
91
|
+
return Promise.resolve({ success: true });
|
|
92
|
+
};
|
|
93
|
+
exports.updatePublicLicenseHandler = updatePublicLicenseHandler;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { WebpackOverrideFn } from '@remotion/bundler';
|
|
1
|
+
import type { BundlerOverrideFn, RspackOverrideFn, WebpackOverrideFn } from '@remotion/bundler';
|
|
2
2
|
import type { GitSource, RenderDefaults, RenderJob, StudioRuntimeConfig } from '@remotion/studio-shared';
|
|
3
3
|
import type { QueueMethods } from './api-types';
|
|
4
4
|
import type { LiveEventsServer } from './live-events';
|
|
@@ -14,14 +14,13 @@ export type StartServerResult = {
|
|
|
14
14
|
export declare const startServer: (options: {
|
|
15
15
|
entry: string;
|
|
16
16
|
userDefinedComponent: string;
|
|
17
|
+
bundlerOverride: BundlerOverrideFn;
|
|
18
|
+
rspackOverride: RspackOverrideFn;
|
|
17
19
|
webpackOverride: WebpackOverrideFn;
|
|
18
20
|
getCurrentInputProps: () => object;
|
|
19
21
|
getEnvVariables: () => Record<string, string>;
|
|
20
22
|
port: number | null;
|
|
21
|
-
maxTimelineTracks: number | null;
|
|
22
|
-
bufferStateDelayInMilliseconds: number | null;
|
|
23
23
|
remotionRoot: string;
|
|
24
|
-
keyboardShortcutsEnabled: boolean;
|
|
25
24
|
publicDir: string;
|
|
26
25
|
poll: number | null;
|
|
27
26
|
staticHash: string;
|
|
@@ -39,9 +38,8 @@ export declare const startServer: (options: {
|
|
|
39
38
|
getAudioLatencyHint: () => AudioContextLatencyCategory | null;
|
|
40
39
|
getPreviewSampleRate: () => number | null;
|
|
41
40
|
enableCrossSiteIsolation: boolean;
|
|
42
|
-
askAIEnabled: boolean;
|
|
43
|
-
interactivityEnabled: boolean;
|
|
44
41
|
forceNew: boolean;
|
|
45
42
|
rspack: boolean;
|
|
46
43
|
getStudioRuntimeConfig: () => StudioRuntimeConfig;
|
|
44
|
+
configFile: string | null;
|
|
47
45
|
}) => Promise<StartServerResult>;
|
|
@@ -16,7 +16,7 @@ const node_path_cache_1 = require("./node-path-cache");
|
|
|
16
16
|
const undo_stack_1 = require("./undo-stack");
|
|
17
17
|
const watch_ignore_next_change_1 = require("./watch-ignore-next-change");
|
|
18
18
|
const startServer = async (options) => {
|
|
19
|
-
var _a, _b
|
|
19
|
+
var _a, _b;
|
|
20
20
|
const desiredPort = (_b = (_a = options === null || options === void 0 ? void 0 : options.port) !== null && _a !== void 0 ? _a : (process.env.PORT ? Number(process.env.PORT) : undefined)) !== null && _b !== void 0 ? _b : undefined;
|
|
21
21
|
const portConfig = renderer_1.RenderInternals.getPortConfig(options.forceIPv4);
|
|
22
22
|
const onPortUnavailable = options.forceNew
|
|
@@ -37,14 +37,11 @@ const startServer = async (options) => {
|
|
|
37
37
|
userDefinedComponent: options.userDefinedComponent,
|
|
38
38
|
outDir: null,
|
|
39
39
|
environment: 'development',
|
|
40
|
+
bundlerOverride: options.bundlerOverride,
|
|
41
|
+
rspackOverride: options.rspackOverride,
|
|
40
42
|
webpackOverride: options === null || options === void 0 ? void 0 : options.webpackOverride,
|
|
41
|
-
maxTimelineTracks: (_c = options === null || options === void 0 ? void 0 : options.maxTimelineTracks) !== null && _c !== void 0 ? _c : null,
|
|
42
43
|
remotionRoot: options.remotionRoot,
|
|
43
|
-
keyboardShortcutsEnabled: options.keyboardShortcutsEnabled,
|
|
44
44
|
poll: options.poll,
|
|
45
|
-
bufferStateDelayInMilliseconds: options.bufferStateDelayInMilliseconds,
|
|
46
|
-
askAIEnabled: options.askAIEnabled,
|
|
47
|
-
interactivityEnabled: options.interactivityEnabled,
|
|
48
45
|
extraPlugins: [watchIgnorePlugin],
|
|
49
46
|
};
|
|
50
47
|
let compiler;
|
|
@@ -105,6 +102,7 @@ const startServer = async (options) => {
|
|
|
105
102
|
getPreviewSampleRate: options.getPreviewSampleRate,
|
|
106
103
|
enableCrossSiteIsolation: options.enableCrossSiteIsolation,
|
|
107
104
|
getStudioRuntimeConfig: options.getStudioRuntimeConfig,
|
|
105
|
+
configFile: options.configFile,
|
|
108
106
|
});
|
|
109
107
|
})
|
|
110
108
|
.catch((err) => {
|
package/dist/routes.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
|
2
2
|
import type { GitSource, RenderDefaults, RenderJob, StudioRuntimeConfig } from '@remotion/studio-shared';
|
|
3
3
|
import type { QueueMethods } from './preview-server/api-types';
|
|
4
4
|
import type { LiveEventsServer } from './preview-server/live-events';
|
|
5
|
-
export declare const handleRoutes: ({ staticHash, staticHashPrefix, outputHash, outputHashPrefix, request, response, liveEventsServer, getCurrentInputProps, getEnvVariables, remotionRoot, entryPoint, publicDir, logLevel, getRenderQueue, getRenderDefaults, getNumberOfAudioTags, queueMethods: methods, gitSource, binariesDirectory, getAudioLatencyHint, getPreviewSampleRate, enableCrossSiteIsolation, getStudioRuntimeConfig, }: {
|
|
5
|
+
export declare const handleRoutes: ({ staticHash, staticHashPrefix, outputHash, outputHashPrefix, request, response, liveEventsServer, getCurrentInputProps, getEnvVariables, remotionRoot, entryPoint, publicDir, logLevel, getRenderQueue, getRenderDefaults, getNumberOfAudioTags, queueMethods: methods, gitSource, binariesDirectory, getAudioLatencyHint, getPreviewSampleRate, enableCrossSiteIsolation, getStudioRuntimeConfig, configFile, }: {
|
|
6
6
|
staticHash: string;
|
|
7
7
|
staticHashPrefix: string;
|
|
8
8
|
outputHash: string;
|
|
@@ -26,4 +26,5 @@ export declare const handleRoutes: ({ staticHash, staticHashPrefix, outputHash,
|
|
|
26
26
|
getPreviewSampleRate: () => number | null;
|
|
27
27
|
enableCrossSiteIsolation: boolean;
|
|
28
28
|
getStudioRuntimeConfig: () => StudioRuntimeConfig;
|
|
29
|
+
configFile: string | null;
|
|
29
30
|
}) => Promise<void>;
|
package/dist/routes.js
CHANGED
|
@@ -39,6 +39,7 @@ const node_fs_1 = require("node:fs");
|
|
|
39
39
|
const node_path_1 = __importStar(require("node:path"));
|
|
40
40
|
const node_url_1 = require("node:url");
|
|
41
41
|
const bundler_1 = require("@remotion/bundler");
|
|
42
|
+
const drag_and_drop_1 = require("@remotion/drag-and-drop");
|
|
42
43
|
const renderer_1 = require("@remotion/renderer");
|
|
43
44
|
const studio_shared_1 = require("@remotion/studio-shared");
|
|
44
45
|
const better_opn_1 = require("./better-opn");
|
|
@@ -165,12 +166,11 @@ const handleRequestElementInstall = async ({ liveEventsServer, request, response
|
|
|
165
166
|
response.setHeader('Content-Type', 'application/json');
|
|
166
167
|
try {
|
|
167
168
|
const body = await (0, parse_body_1.parseRequestBody)(request);
|
|
168
|
-
const
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
if (parsed === null) {
|
|
169
|
+
const { mimeType, payload } = body;
|
|
170
|
+
const parsed = typeof mimeType === 'string' && typeof payload === 'string'
|
|
171
|
+
? drag_and_drop_1.DragAndDropInternals.parseDragData({ mimeType, payload })
|
|
172
|
+
: null;
|
|
173
|
+
if ((parsed === null || parsed === void 0 ? void 0 : parsed.type) !== 'element') {
|
|
174
174
|
response.writeHead(400);
|
|
175
175
|
response.end(JSON.stringify({ success: false, reason: 'Invalid Element payload' }));
|
|
176
176
|
return;
|
|
@@ -201,7 +201,7 @@ const handleRequestElementInstall = async ({ liveEventsServer, request, response
|
|
|
201
201
|
createdAt: Date.now(),
|
|
202
202
|
compositionFile: target.compositionFile,
|
|
203
203
|
compositionId: target.compositionId,
|
|
204
|
-
element: parsed.element,
|
|
204
|
+
element: parsed.data.element,
|
|
205
205
|
position: null,
|
|
206
206
|
};
|
|
207
207
|
const delivered = liveEventsServer.sendEventToClientId(target.clientId, {
|
|
@@ -394,7 +394,7 @@ const handleBeep = (_, response) => {
|
|
|
394
394
|
readStream.pipe(response);
|
|
395
395
|
return Promise.resolve();
|
|
396
396
|
};
|
|
397
|
-
const handleRoutes = ({ staticHash, staticHashPrefix, outputHash, outputHashPrefix, request, response, liveEventsServer, getCurrentInputProps, getEnvVariables, remotionRoot, entryPoint, publicDir, logLevel, getRenderQueue, getRenderDefaults, getNumberOfAudioTags, queueMethods: methods, gitSource, binariesDirectory, getAudioLatencyHint, getPreviewSampleRate, enableCrossSiteIsolation, getStudioRuntimeConfig, }) => {
|
|
397
|
+
const handleRoutes = ({ staticHash, staticHashPrefix, outputHash, outputHashPrefix, request, response, liveEventsServer, getCurrentInputProps, getEnvVariables, remotionRoot, entryPoint, publicDir, logLevel, getRenderQueue, getRenderDefaults, getNumberOfAudioTags, queueMethods: methods, gitSource, binariesDirectory, getAudioLatencyHint, getPreviewSampleRate, enableCrossSiteIsolation, getStudioRuntimeConfig, configFile, }) => {
|
|
398
398
|
const url = new URL(request.url, 'http://localhost');
|
|
399
399
|
if (url.pathname === '/api/file-source') {
|
|
400
400
|
return handleFileSource({
|
|
@@ -453,6 +453,7 @@ const handleRoutes = ({ staticHash, staticHashPrefix, outputHash, outputHashPref
|
|
|
453
453
|
methods,
|
|
454
454
|
binariesDirectory,
|
|
455
455
|
publicDir,
|
|
456
|
+
configFile,
|
|
456
457
|
});
|
|
457
458
|
}
|
|
458
459
|
}
|
package/dist/start-studio.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { WebpackOverrideFn } from '@remotion/bundler';
|
|
1
|
+
import type { BundlerOverrideFn, RspackOverrideFn, WebpackOverrideFn } from '@remotion/bundler';
|
|
2
2
|
import type { GitSource, RenderDefaults, RenderJob, StudioRuntimeConfig } from '@remotion/studio-shared';
|
|
3
3
|
import type { QueueMethods } from './preview-server/api-types';
|
|
4
4
|
export type StartStudioResult = {
|
|
@@ -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,
|
|
9
|
+
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, getPreviewSampleRate, enableCrossSiteIsolation, forceNew, rspack, getStudioRuntimeConfig, configFile, }: {
|
|
10
10
|
browserArgs: string;
|
|
11
11
|
browserFlag: string;
|
|
12
12
|
logLevel: "error" | "info" | "trace" | "verbose" | "warn";
|
|
@@ -15,11 +15,10 @@ export declare const startStudio: ({ browserArgs, browserFlag, shouldOpenBrowser
|
|
|
15
15
|
getCurrentInputProps: () => object;
|
|
16
16
|
getEnvVariables: () => Record<string, string>;
|
|
17
17
|
desiredPort: number | null;
|
|
18
|
-
maxTimelineTracks: number | null;
|
|
19
|
-
bufferStateDelayInMilliseconds: number | null;
|
|
20
18
|
remotionRoot: string;
|
|
21
|
-
keyboardShortcutsEnabled: boolean;
|
|
22
19
|
relativePublicDir: string | null;
|
|
20
|
+
bundlerOverride: BundlerOverrideFn;
|
|
21
|
+
rspackOverride: RspackOverrideFn;
|
|
23
22
|
webpackOverride: WebpackOverrideFn;
|
|
24
23
|
poll: number | null;
|
|
25
24
|
getRenderDefaults: () => RenderDefaults;
|
|
@@ -33,9 +32,8 @@ export declare const startStudio: ({ browserArgs, browserFlag, shouldOpenBrowser
|
|
|
33
32
|
gitSource: GitSource | null;
|
|
34
33
|
binariesDirectory: string | null;
|
|
35
34
|
forceIPv4: boolean;
|
|
36
|
-
askAIEnabled: boolean;
|
|
37
|
-
interactivityEnabled: boolean;
|
|
38
35
|
forceNew: boolean;
|
|
39
36
|
rspack: boolean;
|
|
40
37
|
getStudioRuntimeConfig: () => StudioRuntimeConfig;
|
|
38
|
+
configFile: string | null;
|
|
41
39
|
}) => Promise<StartStudioResult>;
|
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,
|
|
22
|
+
const startStudio = async ({ browserArgs, browserFlag, shouldOpenBrowser, fullEntryPath, logLevel, getCurrentInputProps, getEnvVariables, desiredPort, remotionRoot, relativePublicDir, bundlerOverride, rspackOverride, webpackOverride, poll, getRenderDefaults, getRenderQueue, getNumberOfAudioTags, queueMethods, previewEntry, gitSource, binariesDirectory, forceIPv4, getAudioLatencyHint, getPreviewSampleRate, enableCrossSiteIsolation, forceNew, rspack, getStudioRuntimeConfig, configFile, }) => {
|
|
23
23
|
try {
|
|
24
24
|
if (typeof Bun === 'undefined') {
|
|
25
25
|
process.title = 'node (npx remotion studio)';
|
|
@@ -69,10 +69,10 @@ const startStudio = async ({ browserArgs, browserFlag, shouldOpenBrowser, fullEn
|
|
|
69
69
|
getCurrentInputProps,
|
|
70
70
|
getEnvVariables,
|
|
71
71
|
port: desiredPort,
|
|
72
|
-
maxTimelineTracks,
|
|
73
72
|
remotionRoot,
|
|
74
|
-
keyboardShortcutsEnabled,
|
|
75
73
|
publicDir,
|
|
74
|
+
bundlerOverride,
|
|
75
|
+
rspackOverride,
|
|
76
76
|
webpackOverride,
|
|
77
77
|
poll,
|
|
78
78
|
staticHash,
|
|
@@ -85,17 +85,15 @@ const startStudio = async ({ browserArgs, browserFlag, shouldOpenBrowser, fullEn
|
|
|
85
85
|
getNumberOfAudioTags,
|
|
86
86
|
queueMethods,
|
|
87
87
|
gitSource,
|
|
88
|
-
bufferStateDelayInMilliseconds,
|
|
89
88
|
binariesDirectory,
|
|
90
89
|
forceIPv4,
|
|
91
90
|
getAudioLatencyHint,
|
|
92
91
|
getPreviewSampleRate,
|
|
93
92
|
enableCrossSiteIsolation,
|
|
94
|
-
askAIEnabled,
|
|
95
|
-
interactivityEnabled,
|
|
96
93
|
forceNew,
|
|
97
94
|
rspack,
|
|
98
95
|
getStudioRuntimeConfig,
|
|
96
|
+
configFile,
|
|
99
97
|
});
|
|
100
98
|
if (result.type === 'already-running') {
|
|
101
99
|
renderer_1.RenderInternals.Log.info({ indent: false, logLevel }, `Already running on port ${result.port}.`);
|
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.499",
|
|
7
7
|
"description": "Run a Remotion Studio with a server backend",
|
|
8
8
|
"main": "dist",
|
|
9
9
|
"scripts": {
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"access": "public"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
+
"@remotion/drag-and-drop": "4.0.499",
|
|
26
27
|
"@babel/types": "7.24.0",
|
|
27
28
|
"@babel/parser": "7.24.1",
|
|
28
29
|
"@svgr/core": "8.1.0",
|
|
@@ -30,11 +31,11 @@
|
|
|
30
31
|
"kiwi-schema": "0.5.0",
|
|
31
32
|
"semver": "7.5.3",
|
|
32
33
|
"prettier": "3.8.1",
|
|
33
|
-
"remotion": "4.0.
|
|
34
|
+
"remotion": "4.0.499",
|
|
34
35
|
"recast": "0.23.11",
|
|
35
|
-
"@remotion/bundler": "4.0.
|
|
36
|
-
"@remotion/renderer": "4.0.
|
|
37
|
-
"@remotion/studio-shared": "4.0.
|
|
36
|
+
"@remotion/bundler": "4.0.499",
|
|
37
|
+
"@remotion/renderer": "4.0.499",
|
|
38
|
+
"@remotion/studio-shared": "4.0.499",
|
|
38
39
|
"memfs": "3.4.3",
|
|
39
40
|
"open": "8.4.2"
|
|
40
41
|
},
|
|
@@ -42,7 +43,7 @@
|
|
|
42
43
|
"ast-types": "0.16.1",
|
|
43
44
|
"react": "19.2.3",
|
|
44
45
|
"@types/semver": "7.5.3",
|
|
45
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
46
|
+
"@remotion/eslint-config-internal": "4.0.499",
|
|
46
47
|
"eslint": "9.19.0",
|
|
47
48
|
"@types/node": "20.12.14",
|
|
48
49
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|