@remotion/renderer 4.1.0-alpha10 → 4.1.0-alpha11

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/client.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  export declare const BrowserSafeApis: {
2
- getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif">(codec: T, audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => import("./file-extensions").FileExtension;
2
+ getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">(codec: T, audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => import("./file-extensions").FileExtension;
3
3
  validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
4
4
  validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
5
- getDefaultCrfForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif") => number;
6
- getValidCrfRanges: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif") => [number, number];
7
- isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif" | undefined) => boolean;
5
+ getDefaultCrfForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => number;
6
+ getValidCrfRanges: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => [number, number];
7
+ isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | undefined) => boolean;
8
8
  proResProfileOptions: readonly ["4444-xq", "4444", "hq", "standard", "light", "proxy"];
9
9
  validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
10
10
  DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
@@ -73,10 +73,10 @@ export declare const BrowserSafeApis: {
73
73
  };
74
74
  };
75
75
  };
76
- prores: {
76
+ mp3: {
77
77
  default: import("./file-extensions").FileExtension;
78
78
  forAudioCodec: {
79
- aac: {
79
+ mp3: {
80
80
  possible: import("./file-extensions").FileExtension[];
81
81
  default: import("./file-extensions").FileExtension;
82
82
  };
@@ -86,10 +86,10 @@ export declare const BrowserSafeApis: {
86
86
  };
87
87
  };
88
88
  };
89
- mp3: {
89
+ aac: {
90
90
  default: import("./file-extensions").FileExtension;
91
91
  forAudioCodec: {
92
- mp3: {
92
+ aac: {
93
93
  possible: import("./file-extensions").FileExtension[];
94
94
  default: import("./file-extensions").FileExtension;
95
95
  };
@@ -99,22 +99,22 @@ export declare const BrowserSafeApis: {
99
99
  };
100
100
  };
101
101
  };
102
- aac: {
102
+ wav: {
103
103
  default: import("./file-extensions").FileExtension;
104
104
  forAudioCodec: {
105
- aac: {
106
- possible: import("./file-extensions").FileExtension[];
107
- default: import("./file-extensions").FileExtension;
108
- };
109
105
  "pcm-16": {
110
106
  possible: import("./file-extensions").FileExtension[];
111
107
  default: import("./file-extensions").FileExtension;
112
108
  };
113
109
  };
114
110
  };
115
- wav: {
111
+ prores: {
116
112
  default: import("./file-extensions").FileExtension;
117
113
  forAudioCodec: {
114
+ aac: {
115
+ possible: import("./file-extensions").FileExtension[];
116
+ default: import("./file-extensions").FileExtension;
117
+ };
118
118
  "pcm-16": {
119
119
  possible: import("./file-extensions").FileExtension[];
120
120
  default: import("./file-extensions").FileExtension;
@@ -152,10 +152,6 @@ export declare const BrowserSafeApis: {
152
152
  compressed: "pcm-16" | "opus" | null;
153
153
  lossless: "pcm-16" | "opus" | null;
154
154
  };
155
- prores: {
156
- compressed: "aac" | "pcm-16" | null;
157
- lossless: "aac" | "pcm-16" | null;
158
- };
159
155
  mp3: {
160
156
  compressed: "mp3" | "pcm-16" | null;
161
157
  lossless: "mp3" | "pcm-16" | null;
@@ -168,6 +164,10 @@ export declare const BrowserSafeApis: {
168
164
  compressed: "pcm-16" | null;
169
165
  lossless: "pcm-16" | null;
170
166
  };
167
+ prores: {
168
+ compressed: "aac" | "pcm-16" | null;
169
+ lossless: "aac" | "pcm-16" | null;
170
+ };
171
171
  "h264-mkv": {
172
172
  compressed: "pcm-16" | null;
173
173
  lossless: "pcm-16" | null;
@@ -177,8 +177,8 @@ export declare const BrowserSafeApis: {
177
177
  lossless: null;
178
178
  };
179
179
  };
180
- defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif">;
181
- validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
180
+ defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">;
181
+ validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
182
182
  codec: T_1;
183
183
  audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
184
184
  extension: string;
@@ -194,6 +194,6 @@ export declare const BrowserSafeApis: {
194
194
  muteOption: import(".").RemotionOption;
195
195
  videoCodecOption: import(".").RemotionOption;
196
196
  };
197
- codecSupportsCrf: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif") => boolean;
198
- codecSupportsVideoBitrate: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif") => boolean;
197
+ codecSupportsCrf: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
198
+ codecSupportsVideoBitrate: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
199
199
  };
@@ -7,6 +7,7 @@ const node_path_1 = require("node:path");
7
7
  const audio_codec_1 = require("./audio-codec");
8
8
  const call_ffmpeg_1 = require("./call-ffmpeg");
9
9
  const is_audio_codec_1 = require("./is-audio-codec");
10
+ const logger_1 = require("./logger");
10
11
  const parse_ffmpeg_progress_1 = require("./parse-ffmpeg-progress");
11
12
  const truthy_1 = require("./truthy");
12
13
  const combineVideos = async (options) => {
@@ -49,7 +50,10 @@ const combineVideos = async (options) => {
49
50
  (_a = task.stderr) === null || _a === void 0 ? void 0 : _a.on('data', (data) => {
50
51
  if (onProgress) {
51
52
  const parsed = (0, parse_ffmpeg_progress_1.parseFfmpegProgress)(data.toString('utf8'));
52
- if (parsed !== undefined) {
53
+ if (parsed === undefined) {
54
+ logger_1.Log.verbose(data.toString('utf8'));
55
+ }
56
+ else {
53
57
  onProgress(parsed);
54
58
  }
55
59
  }
@@ -16,9 +16,10 @@ const get_executable_path_1 = require("./get-executable-path");
16
16
  const make_nonce_1 = require("./make-nonce");
17
17
  const getIdealMaximumFrameCacheItems = () => {
18
18
  const freeMemory = node_os_1.default.freemem();
19
- // Assuming 1 frame is approximately 6MB
19
+ // Assuming 1 frame is approximately 24MB
20
+ // (4K video)
20
21
  // Assuming only half the available memory should be used
21
- const max = Math.floor(freeMemory / (1024 * 1024 * 6));
22
+ const max = Math.floor(freeMemory / (1024 * 1024 * 24));
22
23
  // Never store more than 2000 frames
23
24
  // But 60 is needed even if it's going to swap
24
25
  return Math.max(60, Math.min(max, 2000));
@@ -145,7 +146,7 @@ const startCompositor = (type, payload, logLevel, indent) => {
145
146
  });
146
147
  let resolve = null;
147
148
  let reject = null;
148
- child.on('close', (code) => {
149
+ child.on('close', (code, signal) => {
149
150
  const waitersToKill = Array.from(waiters.values());
150
151
  if (code === 0) {
151
152
  runningStatus = { type: 'quit-without-error' };
@@ -156,9 +157,12 @@ const startCompositor = (type, payload, logLevel, indent) => {
156
157
  waiters.clear();
157
158
  }
158
159
  else {
159
- const errorMessage = Buffer.concat(stderrChunks).toString('utf-8');
160
+ const errorMessage = Buffer.concat(stderrChunks).toString('utf-8') +
161
+ outputBuffer.toString('utf-8');
160
162
  runningStatus = { type: 'quit-with-error', error: errorMessage };
161
- const error = new Error(`Compositor panicked with code ${code}: ${errorMessage}`);
163
+ const error = code === null
164
+ ? new Error(`Compositor exited with signal ${signal}`)
165
+ : new Error(`Compositor panicked with code ${code}: ${errorMessage}`);
162
166
  for (const waiter of waitersToKill) {
163
167
  waiter.reject(error);
164
168
  }
@@ -1,6 +1,6 @@
1
1
  import type { AudioCodec } from './audio-codec';
2
2
  import type { Codec } from './codec';
3
3
  import type { FileExtension } from './file-extensions';
4
- export declare const getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif">(codec: T, audioCodec: AudioCodec | null) => FileExtension;
5
- export declare const makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif")[]>;
4
+ export declare const getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">(codec: T, audioCodec: AudioCodec | null) => FileExtension;
5
+ export declare const makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif")[]>;
6
6
  export declare const defaultCodecsForFileExtension: Record<FileExtension, Codec>;
package/dist/index.d.ts CHANGED
@@ -54,9 +54,9 @@ export declare const RenderInternals: {
54
54
  width: number;
55
55
  height: number;
56
56
  scale: number;
57
- codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif";
57
+ codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
58
58
  }) => void;
59
- getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif">(codec: T, audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => import("./file-extensions").FileExtension;
59
+ getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">(codec: T, audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => import("./file-extensions").FileExtension;
60
60
  tmpDir: (str: string) => string;
61
61
  deleteDirectory: (directory: string) => void;
62
62
  isServeUrl: (potentialUrl: string) => boolean;
@@ -106,7 +106,7 @@ export declare const RenderInternals: {
106
106
  };
107
107
  registerErrorSymbolicationLock: () => number;
108
108
  unlockErrorSymbolicationLock: (id: number) => void;
109
- canUseParallelEncoding: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif") => boolean;
109
+ canUseParallelEncoding: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
110
110
  mimeContentType: typeof mimeContentType;
111
111
  mimeLookup: typeof mimeLookup;
112
112
  validateConcurrency: (value: unknown, setting: string) => void;
@@ -119,8 +119,8 @@ export declare const RenderInternals: {
119
119
  DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
120
120
  validateJpegQuality: (q: number | undefined) => void;
121
121
  DEFAULT_TIMEOUT: number;
122
- DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif";
123
- isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif" | undefined) => boolean;
122
+ DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
123
+ isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | undefined) => boolean;
124
124
  logLevels: readonly ["verbose", "info", "warn", "error"];
125
125
  isEqualOrBelowLogLevel: (currentLevel: "verbose" | "info" | "warn" | "error", level: "verbose" | "info" | "warn" | "error") => boolean;
126
126
  isValidLogLevel: (level: string) => boolean;
@@ -137,7 +137,7 @@ export declare const RenderInternals: {
137
137
  output: string;
138
138
  onProgress: (p: number) => void;
139
139
  numberOfFrames: number;
140
- codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif";
140
+ codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
141
141
  fps: number;
142
142
  numberOfGifLoops: number | null;
143
143
  audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
@@ -145,7 +145,7 @@ export declare const RenderInternals: {
145
145
  getMinConcurrency: () => number;
146
146
  getMaxConcurrency: () => any;
147
147
  getDefaultAudioCodec: ({ codec, preferLossless, }: {
148
- codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif";
148
+ codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
149
149
  preferLossless: boolean;
150
150
  }) => "mp3" | "aac" | "pcm-16" | "opus" | null;
151
151
  validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
@@ -202,10 +202,10 @@ export declare const RenderInternals: {
202
202
  };
203
203
  };
204
204
  };
205
- prores: {
205
+ mp3: {
206
206
  default: import("./file-extensions").FileExtension;
207
207
  forAudioCodec: {
208
- aac: {
208
+ mp3: {
209
209
  possible: import("./file-extensions").FileExtension[];
210
210
  default: import("./file-extensions").FileExtension;
211
211
  };
@@ -215,10 +215,10 @@ export declare const RenderInternals: {
215
215
  };
216
216
  };
217
217
  };
218
- mp3: {
218
+ aac: {
219
219
  default: import("./file-extensions").FileExtension;
220
220
  forAudioCodec: {
221
- mp3: {
221
+ aac: {
222
222
  possible: import("./file-extensions").FileExtension[];
223
223
  default: import("./file-extensions").FileExtension;
224
224
  };
@@ -228,22 +228,22 @@ export declare const RenderInternals: {
228
228
  };
229
229
  };
230
230
  };
231
- aac: {
231
+ wav: {
232
232
  default: import("./file-extensions").FileExtension;
233
233
  forAudioCodec: {
234
- aac: {
235
- possible: import("./file-extensions").FileExtension[];
236
- default: import("./file-extensions").FileExtension;
237
- };
238
234
  "pcm-16": {
239
235
  possible: import("./file-extensions").FileExtension[];
240
236
  default: import("./file-extensions").FileExtension;
241
237
  };
242
238
  };
243
239
  };
244
- wav: {
240
+ prores: {
245
241
  default: import("./file-extensions").FileExtension;
246
242
  forAudioCodec: {
243
+ aac: {
244
+ possible: import("./file-extensions").FileExtension[];
245
+ default: import("./file-extensions").FileExtension;
246
+ };
247
247
  "pcm-16": {
248
248
  possible: import("./file-extensions").FileExtension[];
249
249
  default: import("./file-extensions").FileExtension;
@@ -276,8 +276,8 @@ export declare const RenderInternals: {
276
276
  readonly vp9: readonly ["opus", "pcm-16"];
277
277
  readonly wav: readonly ["pcm-16"];
278
278
  };
279
- makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif")[]>;
280
- defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif">;
279
+ makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif")[]>;
280
+ defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">;
281
281
  getExecutablePath: (type: "compositor" | "ffmpeg" | "ffprobe" | "ffmpeg-cwd") => string;
282
282
  callFf: (bin: "ffmpeg" | "ffprobe", args: (string | null)[], options?: execa.Options<string> | undefined) => execa.ExecaChildProcess<string>;
283
283
  dynamicLibraryPathOptions: () => {
@@ -295,7 +295,7 @@ export declare const RenderInternals: {
295
295
  validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
296
296
  validVideoImageFormats: readonly ["png", "jpeg", "none"];
297
297
  DEFAULT_STILL_IMAGE_FORMAT: "png" | "jpeg" | "pdf" | "webp";
298
- DEFAULT_VIDEO_IMAGE_FORMAT: "png" | "jpeg" | "none";
298
+ DEFAULT_VIDEO_IMAGE_FORMAT: "none" | "png" | "jpeg";
299
299
  DEFAULT_JPEG_QUALITY: number;
300
300
  chalk: {
301
301
  enabled: () => boolean;
@@ -38,8 +38,17 @@ const startOffthreadVideoServer = ({ downloadMap, concurrency, logLevel, indent,
38
38
  }, logLevel, indent);
39
39
  return {
40
40
  close: () => {
41
- compositor.finishCommands();
42
- return compositor.waitForDone();
41
+ // Note: This is being used as a promise:
42
+ // .close().then()
43
+ // but if finishCommands() fails, it acts like a sync function,
44
+ // therefore we have to catch an error and put a promise rejection
45
+ try {
46
+ compositor.finishCommands();
47
+ return compositor.waitForDone();
48
+ }
49
+ catch (err) {
50
+ return Promise.reject(err);
51
+ }
43
52
  },
44
53
  listener: (req, response) => {
45
54
  if (!req.url) {
@@ -44,7 +44,13 @@ const getSourceMap = (filePath, fileContents, type) => {
44
44
  throw new Error('Sorry, non-base64 inline source-map encoding is not supported.');
45
45
  }
46
46
  const converted = window.atob(sm.substring(match2[0].length));
47
- return Promise.resolve(new source_map_1.SourceMapConsumer(JSON.parse(converted)));
47
+ try {
48
+ const sourceMapConsumer = new source_map_1.SourceMapConsumer(JSON.parse(converted));
49
+ return Promise.resolve(sourceMapConsumer);
50
+ }
51
+ catch (_a) {
52
+ return Promise.resolve(null);
53
+ }
48
54
  }
49
55
  if (type === 'local') {
50
56
  // Find adjacent file: bundle.js -> bundle.js.map
@@ -1,5 +1,5 @@
1
1
  import type { AudioCodec } from './audio-codec';
2
- export declare const validateOutputFilename: <T extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
2
+ export declare const validateOutputFilename: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
3
3
  codec: T;
4
4
  audioCodec: AudioCodec | null;
5
5
  extension: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/renderer",
3
- "version": "4.1.0-alpha10",
3
+ "version": "4.1.0-alpha11",
4
4
  "description": "Renderer for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -18,7 +18,7 @@
18
18
  "extract-zip": "2.0.1",
19
19
  "source-map": "^0.8.0-beta.0",
20
20
  "ws": "8.7.0",
21
- "remotion": "4.1.0-alpha10"
21
+ "remotion": "4.1.0-alpha11"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "react": ">=16.8.0",
@@ -42,13 +42,13 @@
42
42
  "zod": "^3.21.4"
43
43
  },
44
44
  "optionalDependencies": {
45
- "@remotion/compositor-darwin-arm64": "4.1.0-alpha10",
46
- "@remotion/compositor-darwin-x64": "4.1.0-alpha10",
47
- "@remotion/compositor-linux-arm64-gnu": "4.1.0-alpha10",
48
- "@remotion/compositor-linux-x64-gnu": "4.1.0-alpha10",
49
- "@remotion/compositor-linux-arm64-musl": "4.1.0-alpha10",
50
- "@remotion/compositor-linux-x64-musl": "4.1.0-alpha10",
51
- "@remotion/compositor-win32-x64-msvc": "4.1.0-alpha10"
45
+ "@remotion/compositor-darwin-arm64": "4.1.0-alpha11",
46
+ "@remotion/compositor-darwin-x64": "4.1.0-alpha11",
47
+ "@remotion/compositor-linux-arm64-gnu": "4.1.0-alpha11",
48
+ "@remotion/compositor-linux-arm64-musl": "4.1.0-alpha11",
49
+ "@remotion/compositor-linux-x64-gnu": "4.1.0-alpha11",
50
+ "@remotion/compositor-linux-x64-musl": "4.1.0-alpha11",
51
+ "@remotion/compositor-win32-x64-msvc": "4.1.0-alpha11"
52
52
  },
53
53
  "keywords": [
54
54
  "remotion",
@@ -1,6 +0,0 @@
1
- import type { SerializedJSONWithCustomFields } from 'remotion';
2
- export declare const serializeJSONWithDate: ({ data, indent, staticBase, }: {
3
- data: Record<string, unknown>;
4
- indent: number | undefined;
5
- staticBase: string | null;
6
- }) => SerializedJSONWithCustomFields;
@@ -1,36 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.serializeJSONWithDate = void 0;
4
- // Keep in sync with /packages/core/src/input-props-serialization.ts
5
- const DATE_TOKEN = 'remotion-date:';
6
- const FILE_TOKEN = 'remotion-file:';
7
- const serializeJSONWithDate = ({ data, indent, staticBase, }) => {
8
- let customDateUsed = false;
9
- let customFileUsed = false;
10
- let mapUsed = false;
11
- let setUsed = false;
12
- const serializedString = JSON.stringify(data, function (key, value) {
13
- const item = this[key];
14
- if (item instanceof Date) {
15
- customDateUsed = true;
16
- return `${DATE_TOKEN}${item.toISOString()}`;
17
- }
18
- if (item instanceof Map) {
19
- mapUsed = true;
20
- return value;
21
- }
22
- if (item instanceof Set) {
23
- setUsed = true;
24
- return value;
25
- }
26
- if (typeof item === 'string' &&
27
- staticBase !== null &&
28
- item.startsWith(staticBase)) {
29
- customFileUsed = true;
30
- return `${FILE_TOKEN}${item.replace(staticBase + '/', '')}`;
31
- }
32
- return value;
33
- }, indent);
34
- return { serializedString, customDateUsed, customFileUsed, mapUsed, setUsed };
35
- };
36
- exports.serializeJSONWithDate = serializeJSONWithDate;