@remotion/studio 4.0.81 → 4.0.83
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/.turbo/turbo-build.log +1 -1
- package/dist/components/NewComposition/RemInput.d.ts +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodArrayEditor.js +1 -1
- package/dist/helpers/checkerboard-background.d.ts +1 -1
- package/dist/helpers/colors.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/package.json +7 -7
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/command.d.ts +0 -2
- package/dist/command.js +0 -157
- package/dist/components/Timeline/TimelineEyeToggler.d.ts +0 -0
- package/dist/components/Timeline/TimelineEyeToggler.js +0 -1
- package/dist/components/Timeline/timeline-state-reducer.d.ts +0 -19
- package/dist/components/Timeline/timeline-state-reducer.js +0 -47
- package/dist/preview-server/can-update-default-props.d.ts +0 -1
- package/dist/preview-server/can-update-default-props.js +0 -9
- package/dist/preview-server/routes.d.ts +0 -20
- package/dist/preview-server/routes.js +0 -277
- package/dist/preview-server/update-default-props.d.ts +0 -3
- package/dist/preview-server/update-default-props.js +0 -34
- package/dist/render-queue/copy-still-to-clipboard.d.ts +0 -1
- package/dist/render-queue/copy-still-to-clipboard.js +0 -8
- package/dist/render-queue/get-default-video-contexts.d.ts +0 -14
- package/dist/render-queue/get-default-video-contexts.js +0 -29
- package/dist/render-queue/job.d.ts +0 -191
- package/dist/render-queue/job.js +0 -2
- package/dist/render-queue/make-retry-payload.d.ts +0 -2
- package/dist/render-queue/make-retry-payload.js +0 -136
- package/dist/render-queue/open-directory-in-finder.d.ts +0 -1
- package/dist/render-queue/open-directory-in-finder.js +0 -49
- package/dist/render-queue/process-still.d.ts +0 -8
- package/dist/render-queue/process-still.js +0 -49
- package/dist/render-queue/process-video.d.ts +0 -10
- package/dist/render-queue/process-video.js +0 -70
- package/dist/render-queue/queue.d.ts +0 -11
- package/dist/render-queue/queue.js +0 -221
- package/dist/symbolications.d.ts +0 -1
- package/dist/symbolications.js +0 -11
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.cancelJob = exports.removeJob = exports.addJob = exports.getRenderQueue = void 0;
|
|
7
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
8
|
-
const chalk_1 = require("../../chalk");
|
|
9
|
-
const config_1 = require("../../config");
|
|
10
|
-
const file_watcher_1 = require("../../file-watcher");
|
|
11
|
-
const log_1 = require("../../log");
|
|
12
|
-
const print_error_1 = require("../../print-error");
|
|
13
|
-
const progress_types_1 = require("../../progress-types");
|
|
14
|
-
const live_events_1 = require("../live-events");
|
|
15
|
-
const process_still_1 = require("./process-still");
|
|
16
|
-
const process_video_1 = require("./process-video");
|
|
17
|
-
let jobQueue = [];
|
|
18
|
-
const updateJob = (id, updater) => {
|
|
19
|
-
jobQueue = jobQueue.map((j) => {
|
|
20
|
-
if (id === j.id) {
|
|
21
|
-
return updater(j);
|
|
22
|
-
}
|
|
23
|
-
return j;
|
|
24
|
-
});
|
|
25
|
-
notifyClientsOfJobUpdate();
|
|
26
|
-
};
|
|
27
|
-
const getRenderQueue = () => {
|
|
28
|
-
return jobQueue.map((j) => {
|
|
29
|
-
const { cleanup, ...rest } = j;
|
|
30
|
-
return rest;
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
exports.getRenderQueue = getRenderQueue;
|
|
34
|
-
const notifyClientsOfJobUpdate = () => {
|
|
35
|
-
(0, live_events_1.waitForLiveEventsListener)().then((listener) => {
|
|
36
|
-
listener.sendEventToClient({
|
|
37
|
-
type: 'render-queue-updated',
|
|
38
|
-
queue: (0, exports.getRenderQueue)(),
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
const processJob = async ({ job, remotionRoot, entryPoint, onProgress, addCleanupCallback, logLevel, }) => {
|
|
43
|
-
if (job.type === 'still') {
|
|
44
|
-
await (0, process_still_1.processStill)({
|
|
45
|
-
job,
|
|
46
|
-
remotionRoot,
|
|
47
|
-
entryPoint,
|
|
48
|
-
onProgress,
|
|
49
|
-
addCleanupCallback,
|
|
50
|
-
});
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
if (job.type === 'video' || job.type === 'sequence') {
|
|
54
|
-
await (0, process_video_1.processVideoJob)({
|
|
55
|
-
job,
|
|
56
|
-
remotionRoot,
|
|
57
|
-
entryPoint,
|
|
58
|
-
onProgress,
|
|
59
|
-
addCleanupCallback,
|
|
60
|
-
logLevel,
|
|
61
|
-
});
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
throw new Error(`Unknown job ${JSON.stringify(job)}`);
|
|
65
|
-
};
|
|
66
|
-
const addJob = ({ job, entryPoint, remotionRoot, logLevel, }) => {
|
|
67
|
-
jobQueue.push(job);
|
|
68
|
-
processJobIfPossible({ entryPoint, remotionRoot, logLevel });
|
|
69
|
-
notifyClientsOfJobUpdate();
|
|
70
|
-
};
|
|
71
|
-
exports.addJob = addJob;
|
|
72
|
-
const removeJob = (jobId) => {
|
|
73
|
-
jobQueue = jobQueue.filter((job) => {
|
|
74
|
-
if (job.id === jobId) {
|
|
75
|
-
job.cleanup.forEach((c) => {
|
|
76
|
-
c();
|
|
77
|
-
});
|
|
78
|
-
return false;
|
|
79
|
-
}
|
|
80
|
-
return true;
|
|
81
|
-
});
|
|
82
|
-
notifyClientsOfJobUpdate();
|
|
83
|
-
};
|
|
84
|
-
exports.removeJob = removeJob;
|
|
85
|
-
const cancelJob = (jobId) => {
|
|
86
|
-
for (const job of jobQueue) {
|
|
87
|
-
if (job.id === jobId) {
|
|
88
|
-
if (job.status !== 'running') {
|
|
89
|
-
throw new Error('Job is not running');
|
|
90
|
-
}
|
|
91
|
-
job.cancelToken.cancel();
|
|
92
|
-
break;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
exports.cancelJob = cancelJob;
|
|
97
|
-
const processJobIfPossible = async ({ remotionRoot, entryPoint, logLevel, }) => {
|
|
98
|
-
const runningJob = jobQueue.find((q) => {
|
|
99
|
-
return q.status === 'running';
|
|
100
|
-
});
|
|
101
|
-
if (runningJob) {
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
const nextJob = jobQueue.find((q) => {
|
|
105
|
-
return q.status === 'idle';
|
|
106
|
-
});
|
|
107
|
-
if (!nextJob) {
|
|
108
|
-
return;
|
|
109
|
-
}
|
|
110
|
-
const jobCleanups = [];
|
|
111
|
-
try {
|
|
112
|
-
updateJob(nextJob.id, (job) => {
|
|
113
|
-
return {
|
|
114
|
-
...job,
|
|
115
|
-
status: 'running',
|
|
116
|
-
progress: {
|
|
117
|
-
value: 0,
|
|
118
|
-
message: 'Starting job...',
|
|
119
|
-
...(0, progress_types_1.initialAggregateRenderProgress)(),
|
|
120
|
-
},
|
|
121
|
-
};
|
|
122
|
-
});
|
|
123
|
-
const startTime = Date.now();
|
|
124
|
-
log_1.Log.info(chalk_1.chalk.gray('╭─ Starting render '));
|
|
125
|
-
let lastProgress = null;
|
|
126
|
-
await processJob({
|
|
127
|
-
job: nextJob,
|
|
128
|
-
entryPoint,
|
|
129
|
-
remotionRoot,
|
|
130
|
-
onProgress: (progress) => {
|
|
131
|
-
updateJob(nextJob.id, (job) => {
|
|
132
|
-
lastProgress = progress;
|
|
133
|
-
// Ignore late callbacks of progress updates after cancelling
|
|
134
|
-
if (job.status === 'failed' || job.status === 'done') {
|
|
135
|
-
return job;
|
|
136
|
-
}
|
|
137
|
-
if (job.type === 'still') {
|
|
138
|
-
return {
|
|
139
|
-
...job,
|
|
140
|
-
status: 'running',
|
|
141
|
-
progress,
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
if (job.type === 'video') {
|
|
145
|
-
return {
|
|
146
|
-
...job,
|
|
147
|
-
status: 'running',
|
|
148
|
-
progress,
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
if (job.type === 'sequence') {
|
|
152
|
-
return {
|
|
153
|
-
...job,
|
|
154
|
-
status: 'running',
|
|
155
|
-
progress,
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
throw new Error('Unknown job type');
|
|
159
|
-
});
|
|
160
|
-
},
|
|
161
|
-
addCleanupCallback: (cleanup) => {
|
|
162
|
-
jobCleanups.push(cleanup);
|
|
163
|
-
},
|
|
164
|
-
logLevel,
|
|
165
|
-
});
|
|
166
|
-
log_1.Log.info(chalk_1.chalk.gray('╰─ Done in ' + (Date.now() - startTime) + 'ms.'));
|
|
167
|
-
const { unwatch } = (0, file_watcher_1.installFileWatcher)({
|
|
168
|
-
file: node_path_1.default.resolve(remotionRoot, nextJob.outName),
|
|
169
|
-
onChange: (type) => {
|
|
170
|
-
if (type === 'created') {
|
|
171
|
-
updateJob(nextJob.id, (job) => ({
|
|
172
|
-
...job,
|
|
173
|
-
deletedOutputLocation: false,
|
|
174
|
-
}));
|
|
175
|
-
}
|
|
176
|
-
if (type === 'deleted') {
|
|
177
|
-
updateJob(nextJob.id, (job) => ({
|
|
178
|
-
...job,
|
|
179
|
-
deletedOutputLocation: true,
|
|
180
|
-
}));
|
|
181
|
-
}
|
|
182
|
-
},
|
|
183
|
-
});
|
|
184
|
-
updateJob(nextJob.id, (job) => {
|
|
185
|
-
if (!lastProgress) {
|
|
186
|
-
throw new Error('expected progress');
|
|
187
|
-
}
|
|
188
|
-
return {
|
|
189
|
-
...job,
|
|
190
|
-
status: 'done',
|
|
191
|
-
cleanup: [...job.cleanup, unwatch],
|
|
192
|
-
progress: { message: 'Done', value: 1, ...lastProgress },
|
|
193
|
-
};
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
catch (err) {
|
|
197
|
-
log_1.Log.error(chalk_1.chalk.gray('╰─ '), chalk_1.chalk.red('Failed to render'));
|
|
198
|
-
updateJob(nextJob.id, (job) => {
|
|
199
|
-
return {
|
|
200
|
-
...job,
|
|
201
|
-
status: 'failed',
|
|
202
|
-
error: {
|
|
203
|
-
message: err.message,
|
|
204
|
-
stack: err.stack,
|
|
205
|
-
},
|
|
206
|
-
};
|
|
207
|
-
});
|
|
208
|
-
await (0, print_error_1.printError)(err, config_1.ConfigInternals.Logging.getLogLevel());
|
|
209
|
-
(0, live_events_1.waitForLiveEventsListener)().then((listener) => {
|
|
210
|
-
listener.sendEventToClient({
|
|
211
|
-
type: 'render-job-failed',
|
|
212
|
-
compositionId: nextJob.compositionId,
|
|
213
|
-
error: err,
|
|
214
|
-
});
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
finally {
|
|
218
|
-
await Promise.all(jobCleanups.map((c) => c()));
|
|
219
|
-
}
|
|
220
|
-
processJobIfPossible({ remotionRoot, entryPoint, logLevel });
|
|
221
|
-
};
|
package/dist/symbolications.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const symbolicateSequenceStackToSource: (stack: string | null) => Promise<null | undefined>;
|
package/dist/symbolications.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.symbolicateSequenceStackToSource = void 0;
|
|
4
|
-
const symbolicateSequenceStackToSource = async (stack) => {
|
|
5
|
-
if (!stack) {
|
|
6
|
-
return null;
|
|
7
|
-
}
|
|
8
|
-
// const a = await getStackFrames(stack, 3);
|
|
9
|
-
// console.log(a, stack);
|
|
10
|
-
};
|
|
11
|
-
exports.symbolicateSequenceStackToSource = symbolicateSequenceStackToSource;
|