@remotion/studio-server 4.0.537 → 4.0.539
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/canvas-capture/generate-canvas-capture-composition.d.ts +14 -0
- package/dist/canvas-capture/generate-canvas-capture-composition.js +239 -0
- package/dist/codemods/add-effect.d.ts +1 -0
- package/dist/codemods/add-effect.js +8 -0
- package/dist/codemods/apply-codemod-to-file.d.ts +7 -0
- package/dist/codemods/apply-codemod-to-file.js +171 -0
- package/dist/codemods/apply-visual-control.d.ts +8 -0
- package/dist/codemods/apply-visual-control.js +89 -0
- package/dist/codemods/delete-effect.d.ts +1 -0
- package/dist/codemods/delete-effect.js +6 -0
- package/dist/codemods/delete-jsx-node.d.ts +22 -0
- package/dist/codemods/delete-jsx-node.js +17 -0
- package/dist/codemods/delete-jsx-nodes.d.ts +13 -0
- package/dist/codemods/delete-jsx-nodes.js +10 -0
- package/dist/codemods/duplicate-composition.d.ts +2 -0
- package/dist/codemods/duplicate-composition.js +64 -0
- package/dist/codemods/duplicate-effect.d.ts +1 -0
- package/dist/codemods/duplicate-effect.js +6 -0
- package/dist/codemods/duplicate-jsx-node.d.ts +25 -0
- package/dist/codemods/duplicate-jsx-node.js +26 -0
- package/dist/codemods/effect-param-expression.d.ts +2 -2
- package/dist/codemods/format-file-content.d.ts +7 -0
- package/dist/codemods/format-file-content.js +80 -0
- package/dist/codemods/format-inline-content.d.ts +18 -0
- package/dist/codemods/format-inline-content.js +78 -0
- package/dist/codemods/get-node-path-remappings.d.ts +1 -12
- package/dist/codemods/get-node-path-remappings.js +1 -51
- package/dist/codemods/insert-video-layers.d.ts +11 -0
- package/dist/codemods/insert-video-layers.js +5 -0
- package/dist/codemods/paste-effects.d.ts +2 -15
- package/dist/codemods/recast-mods.d.ts +13 -0
- package/dist/codemods/recast-mods.js +902 -0
- package/dist/codemods/reorder-effect.d.ts +1 -0
- package/dist/codemods/reorder-effect.js +5 -0
- package/dist/codemods/reorder-sequence.d.ts +1 -0
- package/dist/codemods/reorder-sequence.js +5 -0
- package/dist/codemods/simple-diff.d.ts +5 -0
- package/dist/codemods/simple-diff.js +39 -0
- package/dist/codemods/split-jsx-sequence.d.ts +27 -0
- package/dist/codemods/split-jsx-sequence.js +19 -0
- package/dist/codemods/split-video-from-audio.d.ts +1 -0
- package/dist/codemods/split-video-from-audio.js +5 -0
- package/dist/codemods/update-default-props.d.ts +1 -0
- package/dist/codemods/update-default-props.js +6 -0
- package/dist/codemods/update-effect-props/update-effect-props.d.ts +2 -2
- package/dist/codemods/update-inline-caption-patches.d.ts +1 -0
- package/dist/codemods/update-inline-caption-patches.js +5 -0
- package/dist/codemods/update-keyframes/ensure-imports-and-frame-hook.d.ts +1 -0
- package/dist/codemods/update-keyframes/ensure-imports-and-frame-hook.js +7 -0
- 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/open-browser-shortcut.d.ts +9 -0
- package/dist/open-browser-shortcut.js +121 -0
- 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/hot-middleware/types.d.ts +2 -0
- package/dist/preview-server/hot-middleware/types.js +2 -0
- 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-codemod.d.ts +4 -0
- package/dist/preview-server/routes/apply-codemod.js +272 -0
- 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-jsx-node.d.ts +3 -0
- package/dist/preview-server/routes/delete-jsx-node.js +126 -0
- package/dist/preview-server/routes/delete-jsx-nodes.d.ts +3 -0
- package/dist/preview-server/routes/delete-jsx-nodes.js +137 -0
- 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/duplicate-jsx-node.d.ts +3 -0
- package/dist/preview-server/routes/duplicate-jsx-node.js +118 -0
- 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/insert-jsx-element.d.ts +3 -0
- package/dist/preview-server/routes/insert-jsx-element.js +231 -0
- package/dist/preview-server/routes/insert-video-layers.d.ts +3 -0
- package/dist/preview-server/routes/insert-video-layers.js +68 -0
- 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/split-jsx-sequence.d.ts +3 -0
- package/dist/preview-server/routes/split-jsx-sequence.js +117 -0
- package/dist/preview-server/routes/subscribe-to-sequence-props.js +55 -34
- package/dist/preview-server/routes/update-public-license.d.ts +11 -0
- package/dist/preview-server/routes/update-public-license.js +97 -0
- package/dist/preview-server/routes/wrap-jsx-node.d.ts +3 -0
- package/dist/preview-server/routes/wrap-jsx-node.js +97 -0
- 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/preview-server/validate-same-origin.js +2 -1
- 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
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.splitJsxSequenceHandler = void 0;
|
|
4
|
+
const node_fs_1 = require("node:fs");
|
|
5
|
+
const codemods_1 = require("@remotion/codemods");
|
|
6
|
+
const renderer_1 = require("@remotion/renderer");
|
|
7
|
+
const file_watcher_1 = require("../../file-watcher");
|
|
8
|
+
const resolve_file_inside_project_1 = require("../../helpers/resolve-file-inside-project");
|
|
9
|
+
const format_log_file_location_1 = require("../format-log-file-location");
|
|
10
|
+
const sequence_node_path_mutation_1 = require("../sequence-node-path-mutation");
|
|
11
|
+
const undo_stack_1 = require("../undo-stack");
|
|
12
|
+
const source_file_write_queue_1 = require("./source-file-write-queue");
|
|
13
|
+
const splitJsxSequenceHandler = ({ input: { sequences }, remotionRoot, logLevel }) => (0, source_file_write_queue_1.withSourceFileWriteQueue)(async () => {
|
|
14
|
+
var _a;
|
|
15
|
+
try {
|
|
16
|
+
if (sequences.length === 0) {
|
|
17
|
+
throw new Error('No JSX sequences were specified for splitting');
|
|
18
|
+
}
|
|
19
|
+
renderer_1.RenderInternals.Log.trace({ indent: false, logLevel }, `[split-jsx-sequence] Received request to split ${sequences.length} JSX sequence${sequences.length === 1 ? '' : 's'}`);
|
|
20
|
+
const sequencesByFileName = new Map();
|
|
21
|
+
for (const sequence of sequences) {
|
|
22
|
+
const fileSequences = (_a = sequencesByFileName.get(sequence.fileName)) !== null && _a !== void 0 ? _a : [];
|
|
23
|
+
fileSequences.push(sequence);
|
|
24
|
+
sequencesByFileName.set(sequence.fileName, fileSequences);
|
|
25
|
+
}
|
|
26
|
+
const updates = await Promise.all([...sequencesByFileName].map(async ([fileName, fileSequences]) => {
|
|
27
|
+
var _a;
|
|
28
|
+
var _b;
|
|
29
|
+
const { absolutePath, fileRelativeToRoot } = (0, resolve_file_inside_project_1.resolveFileInsideProject)({
|
|
30
|
+
remotionRoot,
|
|
31
|
+
fileName,
|
|
32
|
+
action: 'modify',
|
|
33
|
+
});
|
|
34
|
+
const fileContents = (0, node_fs_1.readFileSync)(absolutePath, 'utf-8');
|
|
35
|
+
const result = await (0, codemods_1.splitSequences)({
|
|
36
|
+
project: {
|
|
37
|
+
files: { [absolutePath]: fileContents },
|
|
38
|
+
rootDir: remotionRoot,
|
|
39
|
+
},
|
|
40
|
+
splits: fileSequences.map(({ nodePath, sequenceKeys, splitFrame }) => ({
|
|
41
|
+
node: { filePath: absolutePath, nodePath },
|
|
42
|
+
sequenceKeys,
|
|
43
|
+
frame: splitFrame,
|
|
44
|
+
})),
|
|
45
|
+
});
|
|
46
|
+
const output = (_b = (_a = result.changes[0]) === null || _a === void 0 ? void 0 : _a.nextContents) !== null && _b !== void 0 ? _b : fileContents;
|
|
47
|
+
const { nodeLabels, logLines } = result.editDetails[0];
|
|
48
|
+
const nodePathRemappings = result.nodePathRemappings.map(({ oldNodePath, newNodePath }) => ({ oldNodePath, newNodePath }));
|
|
49
|
+
return {
|
|
50
|
+
absolutePath,
|
|
51
|
+
fileContents,
|
|
52
|
+
fileRelativeToRoot,
|
|
53
|
+
logLine: Math.min(...logLines),
|
|
54
|
+
nodeLabels,
|
|
55
|
+
nodePathRemappings,
|
|
56
|
+
output,
|
|
57
|
+
};
|
|
58
|
+
}));
|
|
59
|
+
const nodePathMutation = (0, sequence_node_path_mutation_1.broadcastSequenceNodePathMutation)(updates.map((update) => ({
|
|
60
|
+
absolutePath: update.absolutePath,
|
|
61
|
+
remappings: update.nodePathRemappings,
|
|
62
|
+
})), null);
|
|
63
|
+
const splitDescription = sequences.length === 1
|
|
64
|
+
? updates[0].nodeLabels[0]
|
|
65
|
+
: `${sequences.length} JSX sequences`;
|
|
66
|
+
(0, undo_stack_1.pushTransactionToUndoStack)({
|
|
67
|
+
snapshots: updates.map((update) => ({
|
|
68
|
+
filePath: update.absolutePath,
|
|
69
|
+
oldContents: update.fileContents,
|
|
70
|
+
newContents: null,
|
|
71
|
+
logLine: update.logLine,
|
|
72
|
+
nodePathRemappings: update.nodePathRemappings,
|
|
73
|
+
})),
|
|
74
|
+
logLevel,
|
|
75
|
+
remotionRoot,
|
|
76
|
+
description: {
|
|
77
|
+
undoMessage: `↩️ Split of ${splitDescription}`,
|
|
78
|
+
redoMessage: `↪️ Split of ${splitDescription}`,
|
|
79
|
+
},
|
|
80
|
+
entryType: 'split-jsx-sequence',
|
|
81
|
+
suppressHmrOnFileRestore: false,
|
|
82
|
+
undoRedoNavigation: null,
|
|
83
|
+
});
|
|
84
|
+
for (const update of updates) {
|
|
85
|
+
(0, undo_stack_1.suppressUndoStackInvalidation)(update.absolutePath);
|
|
86
|
+
(0, file_watcher_1.writeFileAndNotifyFileWatchers)({
|
|
87
|
+
file: update.absolutePath,
|
|
88
|
+
content: update.output,
|
|
89
|
+
originatorClientId: undefined,
|
|
90
|
+
metadata: { skipSequencePropsUpdate: true },
|
|
91
|
+
});
|
|
92
|
+
const locationLabel = (0, format_log_file_location_1.formatLogFileLocation)({
|
|
93
|
+
remotionRoot,
|
|
94
|
+
absolutePath: update.absolutePath,
|
|
95
|
+
line: update.logLine,
|
|
96
|
+
});
|
|
97
|
+
const fileDescription = update.nodeLabels.length === 1
|
|
98
|
+
? update.nodeLabels[0]
|
|
99
|
+
: `${update.nodeLabels.length} JSX sequences`;
|
|
100
|
+
renderer_1.RenderInternals.Log.info({ indent: false, logLevel }, `${(0, source_file_write_queue_1.getCodemodTimingPrefix)(logLevel)}${renderer_1.RenderInternals.chalk.blueBright(`${locationLabel}`)} Split ${fileDescription}`);
|
|
101
|
+
renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel }, `[split-jsx-sequence] Wrote ${update.fileRelativeToRoot}`);
|
|
102
|
+
}
|
|
103
|
+
(0, undo_stack_1.printUndoHint)(logLevel);
|
|
104
|
+
return {
|
|
105
|
+
success: true,
|
|
106
|
+
nodePathMutation,
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
catch (err) {
|
|
110
|
+
return {
|
|
111
|
+
success: false,
|
|
112
|
+
reason: err.message,
|
|
113
|
+
stack: err.stack,
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
exports.splitJsxSequenceHandler = splitJsxSequenceHandler;
|
|
@@ -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;
|
|
@@ -0,0 +1,11 @@
|
|
|
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 setPublicLicenseKeyInConfigFile: ({ configFile, publicLicenseKey, }: {
|
|
8
|
+
readonly configFile: string;
|
|
9
|
+
readonly publicLicenseKey: string;
|
|
10
|
+
}) => void;
|
|
11
|
+
export declare const updatePublicLicenseHandler: ApiHandler<UpdatePublicLicenseRequest, UpdatePublicLicenseResponse>;
|
|
@@ -0,0 +1,97 @@
|
|
|
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.setPublicLicenseKeyInConfigFile = 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 setPublicLicenseKeyInConfigFile = ({ configFile, publicLicenseKey, }) => {
|
|
74
|
+
const configContents = (0, node_fs_1.readFileSync)(configFile, 'utf8');
|
|
75
|
+
(0, file_watcher_1.writeFileAndNotifyFileWatchers)(configFile, (0, exports.updatePublicLicenseInConfig)({ configContents, publicLicenseKey }), undefined);
|
|
76
|
+
};
|
|
77
|
+
exports.setPublicLicenseKeyInConfigFile = setPublicLicenseKeyInConfigFile;
|
|
78
|
+
const updatePublicLicenseHandler = ({ input, configFile }) => {
|
|
79
|
+
if (configFile === null || configFile === undefined) {
|
|
80
|
+
return Promise.resolve({
|
|
81
|
+
success: false,
|
|
82
|
+
reason: 'No Remotion config file was loaded.',
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
if (input.publicLicenseKey.length === 0) {
|
|
86
|
+
return Promise.resolve({
|
|
87
|
+
success: false,
|
|
88
|
+
reason: 'The public license key must not be empty.',
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
(0, exports.setPublicLicenseKeyInConfigFile)({
|
|
92
|
+
configFile,
|
|
93
|
+
publicLicenseKey: input.publicLicenseKey,
|
|
94
|
+
});
|
|
95
|
+
return Promise.resolve({ success: true });
|
|
96
|
+
};
|
|
97
|
+
exports.updatePublicLicenseHandler = updatePublicLicenseHandler;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.wrapJsxNodeHandler = void 0;
|
|
4
|
+
const node_fs_1 = require("node:fs");
|
|
5
|
+
const codemods_1 = require("@remotion/codemods");
|
|
6
|
+
const renderer_1 = require("@remotion/renderer");
|
|
7
|
+
const file_watcher_1 = require("../../file-watcher");
|
|
8
|
+
const resolve_file_inside_project_1 = require("../../helpers/resolve-file-inside-project");
|
|
9
|
+
const format_log_file_location_1 = require("../format-log-file-location");
|
|
10
|
+
const sequence_node_path_mutation_1 = require("../sequence-node-path-mutation");
|
|
11
|
+
const undo_stack_1 = require("../undo-stack");
|
|
12
|
+
const source_file_write_queue_1 = require("./source-file-write-queue");
|
|
13
|
+
const wrapJsxNodeHandler = ({ input: { fileName, nodePath, wrapper, width, height }, remotionRoot, logLevel, }) => {
|
|
14
|
+
return (0, source_file_write_queue_1.withSourceFileWriteQueue)(() => {
|
|
15
|
+
var _a;
|
|
16
|
+
try {
|
|
17
|
+
const { absolutePath, fileRelativeToRoot } = (0, resolve_file_inside_project_1.resolveFileInsideProject)({
|
|
18
|
+
remotionRoot,
|
|
19
|
+
fileName,
|
|
20
|
+
action: 'modify',
|
|
21
|
+
});
|
|
22
|
+
const fileContents = (0, node_fs_1.readFileSync)(absolutePath, 'utf-8');
|
|
23
|
+
const eligibility = (0, codemods_1.canWrapJsxNode)({ input: fileContents, nodePath });
|
|
24
|
+
if (wrapper === null) {
|
|
25
|
+
return Promise.resolve({
|
|
26
|
+
success: true,
|
|
27
|
+
...eligibility,
|
|
28
|
+
nodePathMutation: null,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
if (!eligibility.canWrap ||
|
|
32
|
+
(wrapper === 'HtmlInCanvas' && !eligibility.canWrapHtmlInCanvas)) {
|
|
33
|
+
throw new Error('This JSX element cannot be wrapped');
|
|
34
|
+
}
|
|
35
|
+
const result = (0, codemods_1.wrapJsxNode)({
|
|
36
|
+
project: { files: { [absolutePath]: fileContents }, rootDir: remotionRoot },
|
|
37
|
+
node: { filePath: absolutePath, nodePath },
|
|
38
|
+
wrapper,
|
|
39
|
+
width: width !== null && width !== void 0 ? width : 0,
|
|
40
|
+
height: height !== null && height !== void 0 ? height : 0,
|
|
41
|
+
});
|
|
42
|
+
const change = result.changes.find(({ filePath }) => filePath === absolutePath);
|
|
43
|
+
if ((change === null || change === void 0 ? void 0 : change.previousContents) !== fileContents ||
|
|
44
|
+
change.nextContents === null) {
|
|
45
|
+
throw new Error('Could not wrap JSX node');
|
|
46
|
+
}
|
|
47
|
+
const output = change.nextContents;
|
|
48
|
+
const remappings = result.nodePathRemappings.map(({ oldNodePath, newNodePath }) => ({ oldNodePath, newNodePath }));
|
|
49
|
+
const nodePathMutation = (0, sequence_node_path_mutation_1.broadcastSequenceNodePathMutation)([{ absolutePath, remappings }], null);
|
|
50
|
+
const line = result.logLine;
|
|
51
|
+
(0, undo_stack_1.pushTransactionToUndoStack)({
|
|
52
|
+
snapshots: [
|
|
53
|
+
{
|
|
54
|
+
filePath: absolutePath,
|
|
55
|
+
oldContents: fileContents,
|
|
56
|
+
newContents: null,
|
|
57
|
+
logLine: line,
|
|
58
|
+
nodePathRemappings: remappings,
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
logLevel,
|
|
62
|
+
remotionRoot,
|
|
63
|
+
description: {
|
|
64
|
+
undoMessage: `↩️ Wrapping in ${wrapper}`,
|
|
65
|
+
redoMessage: `↪️ Wrapping in ${wrapper}`,
|
|
66
|
+
},
|
|
67
|
+
entryType: 'wrap-jsx-node',
|
|
68
|
+
suppressHmrOnFileRestore: false,
|
|
69
|
+
undoRedoNavigation: null,
|
|
70
|
+
});
|
|
71
|
+
(0, undo_stack_1.suppressUndoStackInvalidation)(absolutePath);
|
|
72
|
+
(0, file_watcher_1.writeFileAndNotifyFileWatchers)({
|
|
73
|
+
file: absolutePath,
|
|
74
|
+
content: output,
|
|
75
|
+
originatorClientId: undefined,
|
|
76
|
+
metadata: { skipSequencePropsUpdate: true },
|
|
77
|
+
});
|
|
78
|
+
const locationLabel = (0, format_log_file_location_1.formatLogFileLocation)({
|
|
79
|
+
remotionRoot,
|
|
80
|
+
absolutePath,
|
|
81
|
+
line,
|
|
82
|
+
});
|
|
83
|
+
renderer_1.RenderInternals.Log.info({ indent: false, logLevel }, `${(0, source_file_write_queue_1.getCodemodTimingPrefix)(logLevel)}${renderer_1.RenderInternals.chalk.blueBright(locationLabel)} Wrapped JSX in <${wrapper}>`);
|
|
84
|
+
renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel }, `[wrap-jsx-node] Wrote ${fileRelativeToRoot}`);
|
|
85
|
+
(0, undo_stack_1.printUndoHint)(logLevel);
|
|
86
|
+
return Promise.resolve({ success: true, ...eligibility, nodePathMutation });
|
|
87
|
+
}
|
|
88
|
+
catch (err) {
|
|
89
|
+
return Promise.resolve({
|
|
90
|
+
success: false,
|
|
91
|
+
reason: err.message,
|
|
92
|
+
stack: (_a = err.stack) !== null && _a !== void 0 ? _a : '',
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
exports.wrapJsxNodeHandler = wrapJsxNodeHandler;
|
|
@@ -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>;
|