@remotion/renderer 4.0.255 → 4.0.256
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/browser/Browser.d.ts +23 -6
- package/dist/browser/Browser.js +22 -12
- package/dist/browser/BrowserConnector.d.ts +19 -0
- package/dist/browser/BrowserConnector.js +17 -0
- package/dist/browser/BrowserPage.d.ts +5 -2
- package/dist/browser/BrowserPage.js +4 -2
- package/dist/browser/Launcher.js +1 -1
- package/dist/browser/PuppeteerNode.d.ts +30 -0
- package/dist/browser/PuppeteerNode.js +52 -0
- package/dist/browser/Target.d.ts +7 -1
- package/dist/browser/Target.js +6 -1
- package/dist/browser/mitt/index.js +3 -3
- package/dist/browser/node.d.ts +2 -0
- package/dist/browser/node.js +5 -0
- package/dist/browser-instances.js +1 -1
- package/dist/can-use-parallel-encoding.d.ts +1 -0
- package/dist/can-use-parallel-encoding.js +9 -1
- package/dist/client.d.ts +2 -2
- package/dist/copy-to-clipboard.d.ts +2 -0
- package/dist/copy-to-clipboard.js +18 -0
- package/dist/cycle-browser-tabs.d.ts +6 -1
- package/dist/cycle-browser-tabs.js +2 -2
- package/dist/example-videos.d.ts +34 -0
- package/dist/example-videos.js +43 -0
- package/dist/get-browser-instance.d.ts +2 -1
- package/dist/get-browser-instance.js +14 -4
- package/dist/get-codec-name.d.ts +1 -1
- package/dist/get-compositions.js +1 -0
- package/dist/get-local-browser.d.ts +1 -0
- package/dist/get-local-browser.js +19 -0
- package/dist/index.d.ts +3 -3
- package/dist/make-page.d.ts +27 -0
- package/dist/make-page.js +71 -0
- package/dist/next-frame-to-render.d.ts +10 -0
- package/dist/next-frame-to-render.js +35 -0
- package/dist/open-browser.js +3 -3
- package/dist/options/gl.d.ts +1 -1
- package/dist/options/index.d.ts +2 -2
- package/dist/options/metadata.d.ts +1 -1
- package/dist/options/webhook-custom-data.d.ts +1 -1
- package/dist/pool.d.ts +7 -6
- package/dist/render-frame-and-retry-target-close.d.ts +50 -0
- package/dist/render-frame-and-retry-target-close.js +165 -0
- package/dist/render-frame-with-option-to-reject.d.ts +43 -0
- package/dist/render-frame-with-option-to-reject.js +136 -0
- package/dist/render-frame.d.ts +43 -0
- package/dist/render-frame.js +46 -0
- package/dist/render-frames.js +86 -312
- package/dist/render-partitions.d.ts +7 -0
- package/dist/render-partitions.js +50 -0
- package/dist/render-still.js +7 -2
- package/dist/replace-browser.js +1 -1
- package/dist/select-composition.js +1 -0
- package/dist/take-frame-and-compose.d.ts +22 -0
- package/dist/take-frame-and-compose.js +100 -0
- package/dist/test-gpu.js +1 -0
- package/ensure-browser.mjs +458 -514
- package/package.json +12 -12
package/ensure-browser.mjs
CHANGED
|
@@ -18,24 +18,8 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
18
18
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
19
19
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
20
20
|
|
|
21
|
-
//
|
|
21
|
+
// /Users/jonathanburger/remotion/node_modules/.pnpm/debug@4.3.4/node_modules/ms/index.js
|
|
22
22
|
var require_ms = __commonJS((exports, module) => {
|
|
23
|
-
var s = 1000;
|
|
24
|
-
var m = s * 60;
|
|
25
|
-
var h = m * 60;
|
|
26
|
-
var d = h * 24;
|
|
27
|
-
var w = d * 7;
|
|
28
|
-
var y = d * 365.25;
|
|
29
|
-
module.exports = function(val, options) {
|
|
30
|
-
options = options || {};
|
|
31
|
-
var type = typeof val;
|
|
32
|
-
if (type === "string" && val.length > 0) {
|
|
33
|
-
return parse(val);
|
|
34
|
-
} else if (type === "number" && isFinite(val)) {
|
|
35
|
-
return options.long ? fmtLong(val) : fmtShort(val);
|
|
36
|
-
}
|
|
37
|
-
throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val));
|
|
38
|
-
};
|
|
39
23
|
function parse(str) {
|
|
40
24
|
str = String(str);
|
|
41
25
|
if (str.length > 100) {
|
|
@@ -126,6 +110,22 @@ var require_ms = __commonJS((exports, module) => {
|
|
|
126
110
|
var isPlural = msAbs >= n * 1.5;
|
|
127
111
|
return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
|
|
128
112
|
}
|
|
113
|
+
var s = 1000;
|
|
114
|
+
var m = s * 60;
|
|
115
|
+
var h = m * 60;
|
|
116
|
+
var d = h * 24;
|
|
117
|
+
var w = d * 7;
|
|
118
|
+
var y = d * 365.25;
|
|
119
|
+
module.exports = function(val, options) {
|
|
120
|
+
options = options || {};
|
|
121
|
+
var type = typeof val;
|
|
122
|
+
if (type === "string" && val.length > 0) {
|
|
123
|
+
return parse(val);
|
|
124
|
+
} else if (type === "number" && isFinite(val)) {
|
|
125
|
+
return options.long ? fmtLong(val) : fmtShort(val);
|
|
126
|
+
}
|
|
127
|
+
throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val));
|
|
128
|
+
};
|
|
129
129
|
});
|
|
130
130
|
|
|
131
131
|
// ../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js
|
|
@@ -291,6 +291,62 @@ var require_common = __commonJS((exports, module) => {
|
|
|
291
291
|
|
|
292
292
|
// ../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js
|
|
293
293
|
var require_browser = __commonJS((exports, module) => {
|
|
294
|
+
function useColors() {
|
|
295
|
+
if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
|
|
296
|
+
return true;
|
|
297
|
+
}
|
|
298
|
+
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
299
|
+
return false;
|
|
300
|
+
}
|
|
301
|
+
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
302
|
+
}
|
|
303
|
+
function formatArgs(args) {
|
|
304
|
+
args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
|
|
305
|
+
if (!this.useColors) {
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
const c = "color: " + this.color;
|
|
309
|
+
args.splice(1, 0, c, "color: inherit");
|
|
310
|
+
let index = 0;
|
|
311
|
+
let lastC = 0;
|
|
312
|
+
args[0].replace(/%[a-zA-Z%]/g, (match) => {
|
|
313
|
+
if (match === "%%") {
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
index++;
|
|
317
|
+
if (match === "%c") {
|
|
318
|
+
lastC = index;
|
|
319
|
+
}
|
|
320
|
+
});
|
|
321
|
+
args.splice(lastC, 0, c);
|
|
322
|
+
}
|
|
323
|
+
function save(namespaces) {
|
|
324
|
+
try {
|
|
325
|
+
if (namespaces) {
|
|
326
|
+
exports.storage.setItem("debug", namespaces);
|
|
327
|
+
} else {
|
|
328
|
+
exports.storage.removeItem("debug");
|
|
329
|
+
}
|
|
330
|
+
} catch (error) {
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
function load() {
|
|
334
|
+
let r;
|
|
335
|
+
try {
|
|
336
|
+
r = exports.storage.getItem("debug");
|
|
337
|
+
} catch (error) {
|
|
338
|
+
}
|
|
339
|
+
if (!r && typeof process !== "undefined" && "env" in process) {
|
|
340
|
+
r = process.env.DEBUG;
|
|
341
|
+
}
|
|
342
|
+
return r;
|
|
343
|
+
}
|
|
344
|
+
function localstorage() {
|
|
345
|
+
try {
|
|
346
|
+
return localStorage;
|
|
347
|
+
} catch (error) {
|
|
348
|
+
}
|
|
349
|
+
}
|
|
294
350
|
exports.formatArgs = formatArgs;
|
|
295
351
|
exports.save = save;
|
|
296
352
|
exports.load = load;
|
|
@@ -383,64 +439,8 @@ var require_browser = __commonJS((exports, module) => {
|
|
|
383
439
|
"#FFCC00",
|
|
384
440
|
"#FFCC33"
|
|
385
441
|
];
|
|
386
|
-
function useColors() {
|
|
387
|
-
if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
|
|
388
|
-
return true;
|
|
389
|
-
}
|
|
390
|
-
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
391
|
-
return false;
|
|
392
|
-
}
|
|
393
|
-
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
394
|
-
}
|
|
395
|
-
function formatArgs(args) {
|
|
396
|
-
args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
|
|
397
|
-
if (!this.useColors) {
|
|
398
|
-
return;
|
|
399
|
-
}
|
|
400
|
-
const c = "color: " + this.color;
|
|
401
|
-
args.splice(1, 0, c, "color: inherit");
|
|
402
|
-
let index = 0;
|
|
403
|
-
let lastC = 0;
|
|
404
|
-
args[0].replace(/%[a-zA-Z%]/g, (match) => {
|
|
405
|
-
if (match === "%%") {
|
|
406
|
-
return;
|
|
407
|
-
}
|
|
408
|
-
index++;
|
|
409
|
-
if (match === "%c") {
|
|
410
|
-
lastC = index;
|
|
411
|
-
}
|
|
412
|
-
});
|
|
413
|
-
args.splice(lastC, 0, c);
|
|
414
|
-
}
|
|
415
442
|
exports.log = console.debug || console.log || (() => {
|
|
416
443
|
});
|
|
417
|
-
function save(namespaces) {
|
|
418
|
-
try {
|
|
419
|
-
if (namespaces) {
|
|
420
|
-
exports.storage.setItem("debug", namespaces);
|
|
421
|
-
} else {
|
|
422
|
-
exports.storage.removeItem("debug");
|
|
423
|
-
}
|
|
424
|
-
} catch (error) {
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
function load() {
|
|
428
|
-
let r;
|
|
429
|
-
try {
|
|
430
|
-
r = exports.storage.getItem("debug");
|
|
431
|
-
} catch (error) {
|
|
432
|
-
}
|
|
433
|
-
if (!r && typeof process !== "undefined" && "env" in process) {
|
|
434
|
-
r = process.env.DEBUG;
|
|
435
|
-
}
|
|
436
|
-
return r;
|
|
437
|
-
}
|
|
438
|
-
function localstorage() {
|
|
439
|
-
try {
|
|
440
|
-
return localStorage;
|
|
441
|
-
} catch (error) {
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
444
|
module.exports = require_common()(exports);
|
|
445
445
|
var { formatters } = module.exports;
|
|
446
446
|
formatters.j = function(v) {
|
|
@@ -452,7 +452,7 @@ var require_browser = __commonJS((exports, module) => {
|
|
|
452
452
|
};
|
|
453
453
|
});
|
|
454
454
|
|
|
455
|
-
//
|
|
455
|
+
// /Users/jonathanburger/remotion/node_modules/.pnpm/supports-color@7.2.0/node_modules/has-flag/index.js
|
|
456
456
|
var require_has_flag = __commonJS((exports, module) => {
|
|
457
457
|
module.exports = (flag, argv = process.argv) => {
|
|
458
458
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
@@ -462,27 +462,8 @@ var require_has_flag = __commonJS((exports, module) => {
|
|
|
462
462
|
};
|
|
463
463
|
});
|
|
464
464
|
|
|
465
|
-
//
|
|
465
|
+
// /Users/jonathanburger/remotion/node_modules/.pnpm/node_modules/supports-color/index.js
|
|
466
466
|
var require_supports_color = __commonJS((exports, module) => {
|
|
467
|
-
var os = __require("os");
|
|
468
|
-
var tty = __require("tty");
|
|
469
|
-
var hasFlag = require_has_flag();
|
|
470
|
-
var { env } = process;
|
|
471
|
-
var forceColor;
|
|
472
|
-
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
473
|
-
forceColor = 0;
|
|
474
|
-
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
475
|
-
forceColor = 1;
|
|
476
|
-
}
|
|
477
|
-
if ("FORCE_COLOR" in env) {
|
|
478
|
-
if (env.FORCE_COLOR === "true") {
|
|
479
|
-
forceColor = 1;
|
|
480
|
-
} else if (env.FORCE_COLOR === "false") {
|
|
481
|
-
forceColor = 0;
|
|
482
|
-
} else {
|
|
483
|
-
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
467
|
function translateLevel(level) {
|
|
487
468
|
if (level === 0) {
|
|
488
469
|
return false;
|
|
@@ -554,6 +535,25 @@ var require_supports_color = __commonJS((exports, module) => {
|
|
|
554
535
|
const level = supportsColor(stream, stream && stream.isTTY);
|
|
555
536
|
return translateLevel(level);
|
|
556
537
|
}
|
|
538
|
+
var os = __require("os");
|
|
539
|
+
var tty = __require("tty");
|
|
540
|
+
var hasFlag = require_has_flag();
|
|
541
|
+
var { env } = process;
|
|
542
|
+
var forceColor;
|
|
543
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
544
|
+
forceColor = 0;
|
|
545
|
+
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
546
|
+
forceColor = 1;
|
|
547
|
+
}
|
|
548
|
+
if ("FORCE_COLOR" in env) {
|
|
549
|
+
if (env.FORCE_COLOR === "true") {
|
|
550
|
+
forceColor = 1;
|
|
551
|
+
} else if (env.FORCE_COLOR === "false") {
|
|
552
|
+
forceColor = 0;
|
|
553
|
+
} else {
|
|
554
|
+
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
557
|
module.exports = {
|
|
558
558
|
supportsColor: getSupportLevel,
|
|
559
559
|
stdout: translateLevel(supportsColor(true, tty.isatty(1))),
|
|
@@ -563,6 +563,47 @@ var require_supports_color = __commonJS((exports, module) => {
|
|
|
563
563
|
|
|
564
564
|
// ../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js
|
|
565
565
|
var require_node = __commonJS((exports, module) => {
|
|
566
|
+
function useColors() {
|
|
567
|
+
return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
|
|
568
|
+
}
|
|
569
|
+
function formatArgs(args) {
|
|
570
|
+
const { namespace: name, useColors: useColors2 } = this;
|
|
571
|
+
if (useColors2) {
|
|
572
|
+
const c = this.color;
|
|
573
|
+
const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
|
|
574
|
+
const prefix = ` ${colorCode};1m${name} \x1B[0m`;
|
|
575
|
+
args[0] = prefix + args[0].split("\n").join("\n" + prefix);
|
|
576
|
+
args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m");
|
|
577
|
+
} else {
|
|
578
|
+
args[0] = getDate() + name + " " + args[0];
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
function getDate() {
|
|
582
|
+
if (exports.inspectOpts.hideDate) {
|
|
583
|
+
return "";
|
|
584
|
+
}
|
|
585
|
+
return new Date().toISOString() + " ";
|
|
586
|
+
}
|
|
587
|
+
function log(...args) {
|
|
588
|
+
return process.stderr.write(util.format(...args) + "\n");
|
|
589
|
+
}
|
|
590
|
+
function save(namespaces) {
|
|
591
|
+
if (namespaces) {
|
|
592
|
+
process.env.DEBUG = namespaces;
|
|
593
|
+
} else {
|
|
594
|
+
delete process.env.DEBUG;
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
function load() {
|
|
598
|
+
return process.env.DEBUG;
|
|
599
|
+
}
|
|
600
|
+
function init(debug) {
|
|
601
|
+
debug.inspectOpts = {};
|
|
602
|
+
const keys = Object.keys(exports.inspectOpts);
|
|
603
|
+
for (let i = 0;i < keys.length; i++) {
|
|
604
|
+
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
|
|
605
|
+
}
|
|
606
|
+
}
|
|
566
607
|
var tty = __require("tty");
|
|
567
608
|
var util = __require("util");
|
|
568
609
|
exports.init = init;
|
|
@@ -677,56 +718,11 @@ var require_node = __commonJS((exports, module) => {
|
|
|
677
718
|
obj[prop] = val;
|
|
678
719
|
return obj;
|
|
679
720
|
}, {});
|
|
680
|
-
function useColors() {
|
|
681
|
-
return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
|
|
682
|
-
}
|
|
683
|
-
function formatArgs(args) {
|
|
684
|
-
const { namespace: name, useColors: useColors2 } = this;
|
|
685
|
-
if (useColors2) {
|
|
686
|
-
const c = this.color;
|
|
687
|
-
const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
|
|
688
|
-
const prefix = ` ${colorCode};1m${name} \x1B[0m`;
|
|
689
|
-
args[0] = prefix + args[0].split(`
|
|
690
|
-
`).join(`
|
|
691
|
-
` + prefix);
|
|
692
|
-
args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m");
|
|
693
|
-
} else {
|
|
694
|
-
args[0] = getDate() + name + " " + args[0];
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
|
-
function getDate() {
|
|
698
|
-
if (exports.inspectOpts.hideDate) {
|
|
699
|
-
return "";
|
|
700
|
-
}
|
|
701
|
-
return new Date().toISOString() + " ";
|
|
702
|
-
}
|
|
703
|
-
function log(...args) {
|
|
704
|
-
return process.stderr.write(util.format(...args) + `
|
|
705
|
-
`);
|
|
706
|
-
}
|
|
707
|
-
function save(namespaces) {
|
|
708
|
-
if (namespaces) {
|
|
709
|
-
process.env.DEBUG = namespaces;
|
|
710
|
-
} else {
|
|
711
|
-
delete process.env.DEBUG;
|
|
712
|
-
}
|
|
713
|
-
}
|
|
714
|
-
function load() {
|
|
715
|
-
return process.env.DEBUG;
|
|
716
|
-
}
|
|
717
|
-
function init(debug) {
|
|
718
|
-
debug.inspectOpts = {};
|
|
719
|
-
const keys = Object.keys(exports.inspectOpts);
|
|
720
|
-
for (let i = 0;i < keys.length; i++) {
|
|
721
|
-
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
721
|
module.exports = require_common()(exports);
|
|
725
722
|
var { formatters } = module.exports;
|
|
726
723
|
formatters.o = function(v) {
|
|
727
724
|
this.inspectOpts.colors = this.useColors;
|
|
728
|
-
return util.inspect(v, this.inspectOpts).split(
|
|
729
|
-
`).map((str) => str.trim()).join(" ");
|
|
725
|
+
return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
|
|
730
726
|
};
|
|
731
727
|
formatters.O = function(v) {
|
|
732
728
|
this.inspectOpts.colors = this.useColors;
|
|
@@ -734,7 +730,7 @@ var require_node = __commonJS((exports, module) => {
|
|
|
734
730
|
};
|
|
735
731
|
});
|
|
736
732
|
|
|
737
|
-
//
|
|
733
|
+
// /Users/jonathanburger/remotion/node_modules/.pnpm/extract-zip@2.0.1/node_modules/debug/src/index.js
|
|
738
734
|
var require_src = __commonJS((exports, module) => {
|
|
739
735
|
if (typeof process === "undefined" || process.type === "renderer" || false || process.__nwjs) {
|
|
740
736
|
module.exports = require_browser();
|
|
@@ -743,9 +739,8 @@ var require_src = __commonJS((exports, module) => {
|
|
|
743
739
|
}
|
|
744
740
|
});
|
|
745
741
|
|
|
746
|
-
//
|
|
742
|
+
// /Users/jonathanburger/remotion/node_modules/.pnpm/once@1.4.0/node_modules/wrappy/wrappy.js
|
|
747
743
|
var require_wrappy = __commonJS((exports, module) => {
|
|
748
|
-
module.exports = wrappy;
|
|
749
744
|
function wrappy(fn, cb) {
|
|
750
745
|
if (fn && cb)
|
|
751
746
|
return wrappy(fn)(cb);
|
|
@@ -759,38 +754,22 @@ var require_wrappy = __commonJS((exports, module) => {
|
|
|
759
754
|
var args = new Array(arguments.length);
|
|
760
755
|
for (var i = 0;i < args.length; i++) {
|
|
761
756
|
args[i] = arguments[i];
|
|
762
|
-
}
|
|
763
|
-
var ret = fn.apply(this, args);
|
|
764
|
-
var cb2 = args[args.length - 1];
|
|
765
|
-
if (typeof ret === "function" && ret !== cb2) {
|
|
766
|
-
Object.keys(cb2).forEach(function(k) {
|
|
767
|
-
ret[k] = cb2[k];
|
|
768
|
-
});
|
|
769
|
-
}
|
|
770
|
-
return ret;
|
|
771
|
-
}
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
module.exports = wrappy(once);
|
|
779
|
-
module.exports.strict = wrappy(onceStrict);
|
|
780
|
-
once.proto = once(function() {
|
|
781
|
-
Object.defineProperty(Function.prototype, "once", {
|
|
782
|
-
value: function() {
|
|
783
|
-
return once(this);
|
|
784
|
-
},
|
|
785
|
-
configurable: true
|
|
786
|
-
});
|
|
787
|
-
Object.defineProperty(Function.prototype, "onceStrict", {
|
|
788
|
-
value: function() {
|
|
789
|
-
return onceStrict(this);
|
|
790
|
-
},
|
|
791
|
-
configurable: true
|
|
792
|
-
});
|
|
793
|
-
});
|
|
757
|
+
}
|
|
758
|
+
var ret = fn.apply(this, args);
|
|
759
|
+
var cb2 = args[args.length - 1];
|
|
760
|
+
if (typeof ret === "function" && ret !== cb2) {
|
|
761
|
+
Object.keys(cb2).forEach(function(k) {
|
|
762
|
+
ret[k] = cb2[k];
|
|
763
|
+
});
|
|
764
|
+
}
|
|
765
|
+
return ret;
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
module.exports = wrappy;
|
|
769
|
+
});
|
|
770
|
+
|
|
771
|
+
// /Users/jonathanburger/remotion/node_modules/.pnpm/pump@3.0.0/node_modules/once/once.js
|
|
772
|
+
var require_once = __commonJS((exports, module) => {
|
|
794
773
|
function once(fn) {
|
|
795
774
|
var f = function() {
|
|
796
775
|
if (f.called)
|
|
@@ -813,9 +792,26 @@ var require_once = __commonJS((exports, module) => {
|
|
|
813
792
|
f.called = false;
|
|
814
793
|
return f;
|
|
815
794
|
}
|
|
795
|
+
var wrappy = require_wrappy();
|
|
796
|
+
module.exports = wrappy(once);
|
|
797
|
+
module.exports.strict = wrappy(onceStrict);
|
|
798
|
+
once.proto = once(function() {
|
|
799
|
+
Object.defineProperty(Function.prototype, "once", {
|
|
800
|
+
value: function() {
|
|
801
|
+
return once(this);
|
|
802
|
+
},
|
|
803
|
+
configurable: true
|
|
804
|
+
});
|
|
805
|
+
Object.defineProperty(Function.prototype, "onceStrict", {
|
|
806
|
+
value: function() {
|
|
807
|
+
return onceStrict(this);
|
|
808
|
+
},
|
|
809
|
+
configurable: true
|
|
810
|
+
});
|
|
811
|
+
});
|
|
816
812
|
});
|
|
817
813
|
|
|
818
|
-
//
|
|
814
|
+
// /Users/jonathanburger/remotion/node_modules/.pnpm/pump@3.0.0/node_modules/end-of-stream/index.js
|
|
819
815
|
var require_end_of_stream = __commonJS((exports, module) => {
|
|
820
816
|
var once = require_once();
|
|
821
817
|
var noop = function() {
|
|
@@ -908,7 +904,7 @@ var require_end_of_stream = __commonJS((exports, module) => {
|
|
|
908
904
|
module.exports = eos;
|
|
909
905
|
});
|
|
910
906
|
|
|
911
|
-
//
|
|
907
|
+
// /Users/jonathanburger/remotion/node_modules/.pnpm/get-stream@5.2.0/node_modules/pump/index.js
|
|
912
908
|
var require_pump = __commonJS((exports, module) => {
|
|
913
909
|
var once = require_once();
|
|
914
910
|
var eos = require_end_of_stream();
|
|
@@ -1032,18 +1028,8 @@ var require_buffer_stream = __commonJS((exports, module) => {
|
|
|
1032
1028
|
};
|
|
1033
1029
|
});
|
|
1034
1030
|
|
|
1035
|
-
//
|
|
1031
|
+
// /Users/jonathanburger/remotion/node_modules/.pnpm/extract-zip@2.0.1/node_modules/get-stream/index.js
|
|
1036
1032
|
var require_get_stream = __commonJS((exports, module) => {
|
|
1037
|
-
var { constants: BufferConstants } = __require("buffer");
|
|
1038
|
-
var pump = require_pump();
|
|
1039
|
-
var bufferStream = require_buffer_stream();
|
|
1040
|
-
|
|
1041
|
-
class MaxBufferError extends Error {
|
|
1042
|
-
constructor() {
|
|
1043
|
-
super("maxBuffer exceeded");
|
|
1044
|
-
this.name = "MaxBufferError";
|
|
1045
|
-
}
|
|
1046
|
-
}
|
|
1047
1033
|
async function getStream(inputStream, options) {
|
|
1048
1034
|
if (!inputStream) {
|
|
1049
1035
|
return Promise.reject(new Error("Expected a stream"));
|
|
@@ -1076,6 +1062,16 @@ var require_get_stream = __commonJS((exports, module) => {
|
|
|
1076
1062
|
});
|
|
1077
1063
|
return stream.getBufferedValue();
|
|
1078
1064
|
}
|
|
1065
|
+
var { constants: BufferConstants } = __require("buffer");
|
|
1066
|
+
var pump = require_pump();
|
|
1067
|
+
var bufferStream = require_buffer_stream();
|
|
1068
|
+
|
|
1069
|
+
class MaxBufferError extends Error {
|
|
1070
|
+
constructor() {
|
|
1071
|
+
super("maxBuffer exceeded");
|
|
1072
|
+
this.name = "MaxBufferError";
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1079
1075
|
module.exports = getStream;
|
|
1080
1076
|
module.exports.default = getStream;
|
|
1081
1077
|
module.exports.buffer = (stream, options) => getStream(stream, { ...options, encoding: "buffer" });
|
|
@@ -1083,9 +1079,8 @@ var require_get_stream = __commonJS((exports, module) => {
|
|
|
1083
1079
|
module.exports.MaxBufferError = MaxBufferError;
|
|
1084
1080
|
});
|
|
1085
1081
|
|
|
1086
|
-
//
|
|
1082
|
+
// /Users/jonathanburger/remotion/node_modules/.pnpm/fd-slicer@1.1.0/node_modules/pend/index.js
|
|
1087
1083
|
var require_pend = __commonJS((exports, module) => {
|
|
1088
|
-
module.exports = Pend;
|
|
1089
1084
|
function Pend() {
|
|
1090
1085
|
this.pending = 0;
|
|
1091
1086
|
this.max = Infinity;
|
|
@@ -1093,23 +1088,6 @@ var require_pend = __commonJS((exports, module) => {
|
|
|
1093
1088
|
this.waiting = [];
|
|
1094
1089
|
this.error = null;
|
|
1095
1090
|
}
|
|
1096
|
-
Pend.prototype.go = function(fn) {
|
|
1097
|
-
if (this.pending < this.max) {
|
|
1098
|
-
pendGo(this, fn);
|
|
1099
|
-
} else {
|
|
1100
|
-
this.waiting.push(fn);
|
|
1101
|
-
}
|
|
1102
|
-
};
|
|
1103
|
-
Pend.prototype.wait = function(cb) {
|
|
1104
|
-
if (this.pending === 0) {
|
|
1105
|
-
cb(this.error);
|
|
1106
|
-
} else {
|
|
1107
|
-
this.listeners.push(cb);
|
|
1108
|
-
}
|
|
1109
|
-
};
|
|
1110
|
-
Pend.prototype.hold = function() {
|
|
1111
|
-
return pendHold(this);
|
|
1112
|
-
};
|
|
1113
1091
|
function pendHold(self) {
|
|
1114
1092
|
self.pending += 1;
|
|
1115
1093
|
var called = false;
|
|
@@ -1135,10 +1113,72 @@ var require_pend = __commonJS((exports, module) => {
|
|
|
1135
1113
|
function pendGo(self, fn) {
|
|
1136
1114
|
fn(pendHold(self));
|
|
1137
1115
|
}
|
|
1116
|
+
module.exports = Pend;
|
|
1117
|
+
Pend.prototype.go = function(fn) {
|
|
1118
|
+
if (this.pending < this.max) {
|
|
1119
|
+
pendGo(this, fn);
|
|
1120
|
+
} else {
|
|
1121
|
+
this.waiting.push(fn);
|
|
1122
|
+
}
|
|
1123
|
+
};
|
|
1124
|
+
Pend.prototype.wait = function(cb) {
|
|
1125
|
+
if (this.pending === 0) {
|
|
1126
|
+
cb(this.error);
|
|
1127
|
+
} else {
|
|
1128
|
+
this.listeners.push(cb);
|
|
1129
|
+
}
|
|
1130
|
+
};
|
|
1131
|
+
Pend.prototype.hold = function() {
|
|
1132
|
+
return pendHold(this);
|
|
1133
|
+
};
|
|
1138
1134
|
});
|
|
1139
1135
|
|
|
1140
|
-
//
|
|
1136
|
+
// /Users/jonathanburger/remotion/node_modules/.pnpm/yauzl@2.10.0/node_modules/fd-slicer/index.js
|
|
1141
1137
|
var require_fd_slicer = __commonJS((exports) => {
|
|
1138
|
+
function FdSlicer(fd, options) {
|
|
1139
|
+
options = options || {};
|
|
1140
|
+
EventEmitter.call(this);
|
|
1141
|
+
this.fd = fd;
|
|
1142
|
+
this.pend = new Pend;
|
|
1143
|
+
this.pend.max = 1;
|
|
1144
|
+
this.refCount = 0;
|
|
1145
|
+
this.autoClose = !!options.autoClose;
|
|
1146
|
+
}
|
|
1147
|
+
function ReadStream(context, options) {
|
|
1148
|
+
options = options || {};
|
|
1149
|
+
Readable.call(this, options);
|
|
1150
|
+
this.context = context;
|
|
1151
|
+
this.context.ref();
|
|
1152
|
+
this.start = options.start || 0;
|
|
1153
|
+
this.endOffset = options.end;
|
|
1154
|
+
this.pos = this.start;
|
|
1155
|
+
this.destroyed = false;
|
|
1156
|
+
}
|
|
1157
|
+
function WriteStream(context, options) {
|
|
1158
|
+
options = options || {};
|
|
1159
|
+
Writable.call(this, options);
|
|
1160
|
+
this.context = context;
|
|
1161
|
+
this.context.ref();
|
|
1162
|
+
this.start = options.start || 0;
|
|
1163
|
+
this.endOffset = options.end == null ? Infinity : +options.end;
|
|
1164
|
+
this.bytesWritten = 0;
|
|
1165
|
+
this.pos = this.start;
|
|
1166
|
+
this.destroyed = false;
|
|
1167
|
+
this.on("finish", this.destroy.bind(this));
|
|
1168
|
+
}
|
|
1169
|
+
function BufferSlicer(buffer, options) {
|
|
1170
|
+
EventEmitter.call(this);
|
|
1171
|
+
options = options || {};
|
|
1172
|
+
this.refCount = 0;
|
|
1173
|
+
this.buffer = buffer;
|
|
1174
|
+
this.maxChunkSize = options.maxChunkSize || Number.MAX_SAFE_INTEGER;
|
|
1175
|
+
}
|
|
1176
|
+
function createFromBuffer(buffer, options) {
|
|
1177
|
+
return new BufferSlicer(buffer, options);
|
|
1178
|
+
}
|
|
1179
|
+
function createFromFd(fd, options) {
|
|
1180
|
+
return new FdSlicer(fd, options);
|
|
1181
|
+
}
|
|
1142
1182
|
var fs = __require("fs");
|
|
1143
1183
|
var util = __require("util");
|
|
1144
1184
|
var stream = __require("stream");
|
|
@@ -1152,15 +1192,6 @@ var require_fd_slicer = __commonJS((exports) => {
|
|
|
1152
1192
|
exports.BufferSlicer = BufferSlicer;
|
|
1153
1193
|
exports.FdSlicer = FdSlicer;
|
|
1154
1194
|
util.inherits(FdSlicer, EventEmitter);
|
|
1155
|
-
function FdSlicer(fd, options) {
|
|
1156
|
-
options = options || {};
|
|
1157
|
-
EventEmitter.call(this);
|
|
1158
|
-
this.fd = fd;
|
|
1159
|
-
this.pend = new Pend;
|
|
1160
|
-
this.pend.max = 1;
|
|
1161
|
-
this.refCount = 0;
|
|
1162
|
-
this.autoClose = !!options.autoClose;
|
|
1163
|
-
}
|
|
1164
1195
|
FdSlicer.prototype.read = function(buffer, offset, length, position, callback) {
|
|
1165
1196
|
var self = this;
|
|
1166
1197
|
self.pend.go(function(cb) {
|
|
@@ -1207,16 +1238,6 @@ var require_fd_slicer = __commonJS((exports) => {
|
|
|
1207
1238
|
}
|
|
1208
1239
|
};
|
|
1209
1240
|
util.inherits(ReadStream, Readable);
|
|
1210
|
-
function ReadStream(context, options) {
|
|
1211
|
-
options = options || {};
|
|
1212
|
-
Readable.call(this, options);
|
|
1213
|
-
this.context = context;
|
|
1214
|
-
this.context.ref();
|
|
1215
|
-
this.start = options.start || 0;
|
|
1216
|
-
this.endOffset = options.end;
|
|
1217
|
-
this.pos = this.start;
|
|
1218
|
-
this.destroyed = false;
|
|
1219
|
-
}
|
|
1220
1241
|
ReadStream.prototype._read = function(n) {
|
|
1221
1242
|
var self = this;
|
|
1222
1243
|
if (self.destroyed)
|
|
@@ -1259,18 +1280,6 @@ var require_fd_slicer = __commonJS((exports) => {
|
|
|
1259
1280
|
this.context.unref();
|
|
1260
1281
|
};
|
|
1261
1282
|
util.inherits(WriteStream, Writable);
|
|
1262
|
-
function WriteStream(context, options) {
|
|
1263
|
-
options = options || {};
|
|
1264
|
-
Writable.call(this, options);
|
|
1265
|
-
this.context = context;
|
|
1266
|
-
this.context.ref();
|
|
1267
|
-
this.start = options.start || 0;
|
|
1268
|
-
this.endOffset = options.end == null ? Infinity : +options.end;
|
|
1269
|
-
this.bytesWritten = 0;
|
|
1270
|
-
this.pos = this.start;
|
|
1271
|
-
this.destroyed = false;
|
|
1272
|
-
this.on("finish", this.destroy.bind(this));
|
|
1273
|
-
}
|
|
1274
1283
|
WriteStream.prototype._write = function(buffer, encoding, callback) {
|
|
1275
1284
|
var self = this;
|
|
1276
1285
|
if (self.destroyed)
|
|
@@ -1307,13 +1316,6 @@ var require_fd_slicer = __commonJS((exports) => {
|
|
|
1307
1316
|
this.context.unref();
|
|
1308
1317
|
};
|
|
1309
1318
|
util.inherits(BufferSlicer, EventEmitter);
|
|
1310
|
-
function BufferSlicer(buffer, options) {
|
|
1311
|
-
EventEmitter.call(this);
|
|
1312
|
-
options = options || {};
|
|
1313
|
-
this.refCount = 0;
|
|
1314
|
-
this.buffer = buffer;
|
|
1315
|
-
this.maxChunkSize = options.maxChunkSize || Number.MAX_SAFE_INTEGER;
|
|
1316
|
-
}
|
|
1317
1319
|
BufferSlicer.prototype.read = function(buffer, offset, length, position, callback) {
|
|
1318
1320
|
var end = position + length;
|
|
1319
1321
|
var delta = end - this.buffer.length;
|
|
@@ -1395,16 +1397,42 @@ var require_fd_slicer = __commonJS((exports) => {
|
|
|
1395
1397
|
throw new Error("invalid unref");
|
|
1396
1398
|
}
|
|
1397
1399
|
};
|
|
1398
|
-
function createFromBuffer(buffer, options) {
|
|
1399
|
-
return new BufferSlicer(buffer, options);
|
|
1400
|
-
}
|
|
1401
|
-
function createFromFd(fd, options) {
|
|
1402
|
-
return new FdSlicer(fd, options);
|
|
1403
|
-
}
|
|
1404
1400
|
});
|
|
1405
1401
|
|
|
1406
|
-
//
|
|
1402
|
+
// /Users/jonathanburger/remotion/node_modules/.pnpm/yauzl@2.10.0/node_modules/buffer-crc32/index.js
|
|
1407
1403
|
var require_buffer_crc32 = __commonJS((exports, module) => {
|
|
1404
|
+
function ensureBuffer(input) {
|
|
1405
|
+
if (Buffer2.isBuffer(input)) {
|
|
1406
|
+
return input;
|
|
1407
|
+
}
|
|
1408
|
+
var hasNewBufferAPI = typeof Buffer2.alloc === "function" && typeof Buffer2.from === "function";
|
|
1409
|
+
if (typeof input === "number") {
|
|
1410
|
+
return hasNewBufferAPI ? Buffer2.alloc(input) : new Buffer2(input);
|
|
1411
|
+
} else if (typeof input === "string") {
|
|
1412
|
+
return hasNewBufferAPI ? Buffer2.from(input) : new Buffer2(input);
|
|
1413
|
+
} else {
|
|
1414
|
+
throw new Error("input must be buffer, number, or string, received " + typeof input);
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
function bufferizeInt(num) {
|
|
1418
|
+
var tmp = ensureBuffer(4);
|
|
1419
|
+
tmp.writeInt32BE(num, 0);
|
|
1420
|
+
return tmp;
|
|
1421
|
+
}
|
|
1422
|
+
function _crc32(buf, previous) {
|
|
1423
|
+
buf = ensureBuffer(buf);
|
|
1424
|
+
if (Buffer2.isBuffer(previous)) {
|
|
1425
|
+
previous = previous.readUInt32BE(0);
|
|
1426
|
+
}
|
|
1427
|
+
var crc = ~~previous ^ -1;
|
|
1428
|
+
for (var n = 0;n < buf.length; n++) {
|
|
1429
|
+
crc = CRC_TABLE[(crc ^ buf[n]) & 255] ^ crc >>> 8;
|
|
1430
|
+
}
|
|
1431
|
+
return crc ^ -1;
|
|
1432
|
+
}
|
|
1433
|
+
function crc32() {
|
|
1434
|
+
return bufferizeInt(_crc32.apply(null, arguments));
|
|
1435
|
+
}
|
|
1408
1436
|
var Buffer2 = __require("buffer").Buffer;
|
|
1409
1437
|
var CRC_TABLE = [
|
|
1410
1438
|
0,
|
|
@@ -1650,54 +1678,22 @@ var require_buffer_crc32 = __commonJS((exports, module) => {
|
|
|
1650
1678
|
3183342108,
|
|
1651
1679
|
3401237130,
|
|
1652
1680
|
1404277552,
|
|
1653
|
-
615818150,
|
|
1654
|
-
3134207493,
|
|
1655
|
-
3453421203,
|
|
1656
|
-
1423857449,
|
|
1657
|
-
601450431,
|
|
1658
|
-
3009837614,
|
|
1659
|
-
3294710456,
|
|
1660
|
-
1567103746,
|
|
1661
|
-
711928724,
|
|
1662
|
-
3020668471,
|
|
1663
|
-
3272380065,
|
|
1664
|
-
1510334235,
|
|
1665
|
-
755167117
|
|
1666
|
-
];
|
|
1667
|
-
if (typeof Int32Array !== "undefined") {
|
|
1668
|
-
CRC_TABLE = new Int32Array(CRC_TABLE);
|
|
1669
|
-
}
|
|
1670
|
-
function ensureBuffer(input) {
|
|
1671
|
-
if (Buffer2.isBuffer(input)) {
|
|
1672
|
-
return input;
|
|
1673
|
-
}
|
|
1674
|
-
var hasNewBufferAPI = typeof Buffer2.alloc === "function" && typeof Buffer2.from === "function";
|
|
1675
|
-
if (typeof input === "number") {
|
|
1676
|
-
return hasNewBufferAPI ? Buffer2.alloc(input) : new Buffer2(input);
|
|
1677
|
-
} else if (typeof input === "string") {
|
|
1678
|
-
return hasNewBufferAPI ? Buffer2.from(input) : new Buffer2(input);
|
|
1679
|
-
} else {
|
|
1680
|
-
throw new Error("input must be buffer, number, or string, received " + typeof input);
|
|
1681
|
-
}
|
|
1682
|
-
}
|
|
1683
|
-
function bufferizeInt(num) {
|
|
1684
|
-
var tmp = ensureBuffer(4);
|
|
1685
|
-
tmp.writeInt32BE(num, 0);
|
|
1686
|
-
return tmp;
|
|
1687
|
-
}
|
|
1688
|
-
function _crc32(buf, previous) {
|
|
1689
|
-
buf = ensureBuffer(buf);
|
|
1690
|
-
if (Buffer2.isBuffer(previous)) {
|
|
1691
|
-
previous = previous.readUInt32BE(0);
|
|
1692
|
-
}
|
|
1693
|
-
var crc = ~~previous ^ -1;
|
|
1694
|
-
for (var n = 0;n < buf.length; n++) {
|
|
1695
|
-
crc = CRC_TABLE[(crc ^ buf[n]) & 255] ^ crc >>> 8;
|
|
1696
|
-
}
|
|
1697
|
-
return crc ^ -1;
|
|
1698
|
-
}
|
|
1699
|
-
function crc32() {
|
|
1700
|
-
return bufferizeInt(_crc32.apply(null, arguments));
|
|
1681
|
+
615818150,
|
|
1682
|
+
3134207493,
|
|
1683
|
+
3453421203,
|
|
1684
|
+
1423857449,
|
|
1685
|
+
601450431,
|
|
1686
|
+
3009837614,
|
|
1687
|
+
3294710456,
|
|
1688
|
+
1567103746,
|
|
1689
|
+
711928724,
|
|
1690
|
+
3020668471,
|
|
1691
|
+
3272380065,
|
|
1692
|
+
1510334235,
|
|
1693
|
+
755167117
|
|
1694
|
+
];
|
|
1695
|
+
if (typeof Int32Array !== "undefined") {
|
|
1696
|
+
CRC_TABLE = new Int32Array(CRC_TABLE);
|
|
1701
1697
|
}
|
|
1702
1698
|
crc32.signed = function() {
|
|
1703
1699
|
return _crc32.apply(null, arguments);
|
|
@@ -1708,26 +1704,8 @@ var require_buffer_crc32 = __commonJS((exports, module) => {
|
|
|
1708
1704
|
module.exports = crc32;
|
|
1709
1705
|
});
|
|
1710
1706
|
|
|
1711
|
-
//
|
|
1707
|
+
// /Users/jonathanburger/remotion/node_modules/.pnpm/extract-zip@2.0.1/node_modules/yauzl/index.js
|
|
1712
1708
|
var require_yauzl = __commonJS((exports) => {
|
|
1713
|
-
var fs = __require("fs");
|
|
1714
|
-
var zlib = __require("zlib");
|
|
1715
|
-
var fd_slicer = require_fd_slicer();
|
|
1716
|
-
var crc32 = require_buffer_crc32();
|
|
1717
|
-
var util = __require("util");
|
|
1718
|
-
var EventEmitter = __require("events").EventEmitter;
|
|
1719
|
-
var Transform = __require("stream").Transform;
|
|
1720
|
-
var PassThrough = __require("stream").PassThrough;
|
|
1721
|
-
var Writable = __require("stream").Writable;
|
|
1722
|
-
exports.open = open;
|
|
1723
|
-
exports.fromFd = fromFd;
|
|
1724
|
-
exports.fromBuffer = fromBuffer;
|
|
1725
|
-
exports.fromRandomAccessReader = fromRandomAccessReader;
|
|
1726
|
-
exports.dosDateTimeToDate = dosDateTimeToDate;
|
|
1727
|
-
exports.validateFileName = validateFileName;
|
|
1728
|
-
exports.ZipFile = ZipFile;
|
|
1729
|
-
exports.Entry = Entry;
|
|
1730
|
-
exports.RandomAccessReader = RandomAccessReader;
|
|
1731
1709
|
function open(path, options, callback) {
|
|
1732
1710
|
if (typeof options === "function") {
|
|
1733
1711
|
callback = options;
|
|
@@ -1881,7 +1859,6 @@ var require_yauzl = __commonJS((exports) => {
|
|
|
1881
1859
|
callback(new Error("end of central directory record signature not found"));
|
|
1882
1860
|
});
|
|
1883
1861
|
}
|
|
1884
|
-
util.inherits(ZipFile, EventEmitter);
|
|
1885
1862
|
function ZipFile(reader, centralDirectoryOffset, fileSize, entryCount, comment, autoClose, lazyEntries, decodeStrings, validateEntrySizes, strictFileNames) {
|
|
1886
1863
|
var self = this;
|
|
1887
1864
|
EventEmitter.call(self);
|
|
@@ -1907,12 +1884,6 @@ var require_yauzl = __commonJS((exports) => {
|
|
|
1907
1884
|
if (!self.lazyEntries)
|
|
1908
1885
|
self._readEntry();
|
|
1909
1886
|
}
|
|
1910
|
-
ZipFile.prototype.close = function() {
|
|
1911
|
-
if (!this.isOpen)
|
|
1912
|
-
return;
|
|
1913
|
-
this.isOpen = false;
|
|
1914
|
-
this.reader.unref();
|
|
1915
|
-
};
|
|
1916
1887
|
function emitErrorAndAutoClose(self, err) {
|
|
1917
1888
|
if (self.autoClose)
|
|
1918
1889
|
self.close();
|
|
@@ -1924,6 +1895,105 @@ var require_yauzl = __commonJS((exports) => {
|
|
|
1924
1895
|
self.emittedError = true;
|
|
1925
1896
|
self.emit("error", err);
|
|
1926
1897
|
}
|
|
1898
|
+
function Entry() {
|
|
1899
|
+
}
|
|
1900
|
+
function dosDateTimeToDate(date, time) {
|
|
1901
|
+
var day = date & 31;
|
|
1902
|
+
var month = (date >> 5 & 15) - 1;
|
|
1903
|
+
var year = (date >> 9 & 127) + 1980;
|
|
1904
|
+
var millisecond = 0;
|
|
1905
|
+
var second = (time & 31) * 2;
|
|
1906
|
+
var minute = time >> 5 & 63;
|
|
1907
|
+
var hour = time >> 11 & 31;
|
|
1908
|
+
return new Date(year, month, day, hour, minute, second, millisecond);
|
|
1909
|
+
}
|
|
1910
|
+
function validateFileName(fileName) {
|
|
1911
|
+
if (fileName.indexOf("\\") !== -1) {
|
|
1912
|
+
return "invalid characters in fileName: " + fileName;
|
|
1913
|
+
}
|
|
1914
|
+
if (/^[a-zA-Z]:/.test(fileName) || /^\//.test(fileName)) {
|
|
1915
|
+
return "absolute path: " + fileName;
|
|
1916
|
+
}
|
|
1917
|
+
if (fileName.split("/").indexOf("..") !== -1) {
|
|
1918
|
+
return "invalid relative path: " + fileName;
|
|
1919
|
+
}
|
|
1920
|
+
return null;
|
|
1921
|
+
}
|
|
1922
|
+
function readAndAssertNoEof(reader, buffer, offset, length, position, callback) {
|
|
1923
|
+
if (length === 0) {
|
|
1924
|
+
return setImmediate(function() {
|
|
1925
|
+
callback(null, newBuffer(0));
|
|
1926
|
+
});
|
|
1927
|
+
}
|
|
1928
|
+
reader.read(buffer, offset, length, position, function(err, bytesRead) {
|
|
1929
|
+
if (err)
|
|
1930
|
+
return callback(err);
|
|
1931
|
+
if (bytesRead < length) {
|
|
1932
|
+
return callback(new Error("unexpected EOF"));
|
|
1933
|
+
}
|
|
1934
|
+
callback();
|
|
1935
|
+
});
|
|
1936
|
+
}
|
|
1937
|
+
function AssertByteCountStream(byteCount) {
|
|
1938
|
+
Transform.call(this);
|
|
1939
|
+
this.actualByteCount = 0;
|
|
1940
|
+
this.expectedByteCount = byteCount;
|
|
1941
|
+
}
|
|
1942
|
+
function RandomAccessReader() {
|
|
1943
|
+
EventEmitter.call(this);
|
|
1944
|
+
this.refCount = 0;
|
|
1945
|
+
}
|
|
1946
|
+
function RefUnrefFilter(context) {
|
|
1947
|
+
PassThrough.call(this);
|
|
1948
|
+
this.context = context;
|
|
1949
|
+
this.context.ref();
|
|
1950
|
+
this.unreffedYet = false;
|
|
1951
|
+
}
|
|
1952
|
+
function decodeBuffer(buffer, start, end, isUtf8) {
|
|
1953
|
+
if (isUtf8) {
|
|
1954
|
+
return buffer.toString("utf8", start, end);
|
|
1955
|
+
} else {
|
|
1956
|
+
var result = "";
|
|
1957
|
+
for (var i = start;i < end; i++) {
|
|
1958
|
+
result += cp437[buffer[i]];
|
|
1959
|
+
}
|
|
1960
|
+
return result;
|
|
1961
|
+
}
|
|
1962
|
+
}
|
|
1963
|
+
function readUInt64LE(buffer, offset) {
|
|
1964
|
+
var lower32 = buffer.readUInt32LE(offset);
|
|
1965
|
+
var upper32 = buffer.readUInt32LE(offset + 4);
|
|
1966
|
+
return upper32 * 4294967296 + lower32;
|
|
1967
|
+
}
|
|
1968
|
+
function defaultCallback(err) {
|
|
1969
|
+
if (err)
|
|
1970
|
+
throw err;
|
|
1971
|
+
}
|
|
1972
|
+
var fs = __require("fs");
|
|
1973
|
+
var zlib = __require("zlib");
|
|
1974
|
+
var fd_slicer = require_fd_slicer();
|
|
1975
|
+
var crc32 = require_buffer_crc32();
|
|
1976
|
+
var util = __require("util");
|
|
1977
|
+
var EventEmitter = __require("events").EventEmitter;
|
|
1978
|
+
var Transform = __require("stream").Transform;
|
|
1979
|
+
var PassThrough = __require("stream").PassThrough;
|
|
1980
|
+
var Writable = __require("stream").Writable;
|
|
1981
|
+
exports.open = open;
|
|
1982
|
+
exports.fromFd = fromFd;
|
|
1983
|
+
exports.fromBuffer = fromBuffer;
|
|
1984
|
+
exports.fromRandomAccessReader = fromRandomAccessReader;
|
|
1985
|
+
exports.dosDateTimeToDate = dosDateTimeToDate;
|
|
1986
|
+
exports.validateFileName = validateFileName;
|
|
1987
|
+
exports.ZipFile = ZipFile;
|
|
1988
|
+
exports.Entry = Entry;
|
|
1989
|
+
exports.RandomAccessReader = RandomAccessReader;
|
|
1990
|
+
util.inherits(ZipFile, EventEmitter);
|
|
1991
|
+
ZipFile.prototype.close = function() {
|
|
1992
|
+
if (!this.isOpen)
|
|
1993
|
+
return;
|
|
1994
|
+
this.isOpen = false;
|
|
1995
|
+
this.reader.unref();
|
|
1996
|
+
};
|
|
1927
1997
|
ZipFile.prototype.readEntry = function() {
|
|
1928
1998
|
if (!this.lazyEntries)
|
|
1929
1999
|
throw new Error("readEntry() called without lazyEntries:true");
|
|
@@ -2207,8 +2277,6 @@ var require_yauzl = __commonJS((exports) => {
|
|
|
2207
2277
|
}
|
|
2208
2278
|
});
|
|
2209
2279
|
};
|
|
2210
|
-
function Entry() {
|
|
2211
|
-
}
|
|
2212
2280
|
Entry.prototype.getLastModDate = function() {
|
|
2213
2281
|
return dosDateTimeToDate(this.lastModFileDate, this.lastModFileTime);
|
|
2214
2282
|
};
|
|
@@ -2218,49 +2286,7 @@ var require_yauzl = __commonJS((exports) => {
|
|
|
2218
2286
|
Entry.prototype.isCompressed = function() {
|
|
2219
2287
|
return this.compressionMethod === 8;
|
|
2220
2288
|
};
|
|
2221
|
-
function dosDateTimeToDate(date, time) {
|
|
2222
|
-
var day = date & 31;
|
|
2223
|
-
var month = (date >> 5 & 15) - 1;
|
|
2224
|
-
var year = (date >> 9 & 127) + 1980;
|
|
2225
|
-
var millisecond = 0;
|
|
2226
|
-
var second = (time & 31) * 2;
|
|
2227
|
-
var minute = time >> 5 & 63;
|
|
2228
|
-
var hour = time >> 11 & 31;
|
|
2229
|
-
return new Date(year, month, day, hour, minute, second, millisecond);
|
|
2230
|
-
}
|
|
2231
|
-
function validateFileName(fileName) {
|
|
2232
|
-
if (fileName.indexOf("\\") !== -1) {
|
|
2233
|
-
return "invalid characters in fileName: " + fileName;
|
|
2234
|
-
}
|
|
2235
|
-
if (/^[a-zA-Z]:/.test(fileName) || /^\//.test(fileName)) {
|
|
2236
|
-
return "absolute path: " + fileName;
|
|
2237
|
-
}
|
|
2238
|
-
if (fileName.split("/").indexOf("..") !== -1) {
|
|
2239
|
-
return "invalid relative path: " + fileName;
|
|
2240
|
-
}
|
|
2241
|
-
return null;
|
|
2242
|
-
}
|
|
2243
|
-
function readAndAssertNoEof(reader, buffer, offset, length, position, callback) {
|
|
2244
|
-
if (length === 0) {
|
|
2245
|
-
return setImmediate(function() {
|
|
2246
|
-
callback(null, newBuffer(0));
|
|
2247
|
-
});
|
|
2248
|
-
}
|
|
2249
|
-
reader.read(buffer, offset, length, position, function(err, bytesRead) {
|
|
2250
|
-
if (err)
|
|
2251
|
-
return callback(err);
|
|
2252
|
-
if (bytesRead < length) {
|
|
2253
|
-
return callback(new Error("unexpected EOF"));
|
|
2254
|
-
}
|
|
2255
|
-
callback();
|
|
2256
|
-
});
|
|
2257
|
-
}
|
|
2258
2289
|
util.inherits(AssertByteCountStream, Transform);
|
|
2259
|
-
function AssertByteCountStream(byteCount) {
|
|
2260
|
-
Transform.call(this);
|
|
2261
|
-
this.actualByteCount = 0;
|
|
2262
|
-
this.expectedByteCount = byteCount;
|
|
2263
|
-
}
|
|
2264
2290
|
AssertByteCountStream.prototype._transform = function(chunk, encoding, cb) {
|
|
2265
2291
|
this.actualByteCount += chunk.length;
|
|
2266
2292
|
if (this.actualByteCount > this.expectedByteCount) {
|
|
@@ -2277,10 +2303,6 @@ var require_yauzl = __commonJS((exports) => {
|
|
|
2277
2303
|
cb();
|
|
2278
2304
|
};
|
|
2279
2305
|
util.inherits(RandomAccessReader, EventEmitter);
|
|
2280
|
-
function RandomAccessReader() {
|
|
2281
|
-
EventEmitter.call(this);
|
|
2282
|
-
this.refCount = 0;
|
|
2283
|
-
}
|
|
2284
2306
|
RandomAccessReader.prototype.ref = function() {
|
|
2285
2307
|
this.refCount += 1;
|
|
2286
2308
|
};
|
|
@@ -2358,12 +2380,6 @@ var require_yauzl = __commonJS((exports) => {
|
|
|
2358
2380
|
setImmediate(callback);
|
|
2359
2381
|
};
|
|
2360
2382
|
util.inherits(RefUnrefFilter, PassThrough);
|
|
2361
|
-
function RefUnrefFilter(context) {
|
|
2362
|
-
PassThrough.call(this);
|
|
2363
|
-
this.context = context;
|
|
2364
|
-
this.context.ref();
|
|
2365
|
-
this.unreffedYet = false;
|
|
2366
|
-
}
|
|
2367
2383
|
RefUnrefFilter.prototype._flush = function(cb) {
|
|
2368
2384
|
this.unref();
|
|
2369
2385
|
cb();
|
|
@@ -2374,23 +2390,7 @@ var require_yauzl = __commonJS((exports) => {
|
|
|
2374
2390
|
this.unreffedYet = true;
|
|
2375
2391
|
this.context.unref();
|
|
2376
2392
|
};
|
|
2377
|
-
var cp437 = "\
|
|
2378
|
-
function decodeBuffer(buffer, start, end, isUtf8) {
|
|
2379
|
-
if (isUtf8) {
|
|
2380
|
-
return buffer.toString("utf8", start, end);
|
|
2381
|
-
} else {
|
|
2382
|
-
var result = "";
|
|
2383
|
-
for (var i = start;i < end; i++) {
|
|
2384
|
-
result += cp437[buffer[i]];
|
|
2385
|
-
}
|
|
2386
|
-
return result;
|
|
2387
|
-
}
|
|
2388
|
-
}
|
|
2389
|
-
function readUInt64LE(buffer, offset) {
|
|
2390
|
-
var lower32 = buffer.readUInt32LE(offset);
|
|
2391
|
-
var upper32 = buffer.readUInt32LE(offset + 4);
|
|
2392
|
-
return upper32 * 4294967296 + lower32;
|
|
2393
|
-
}
|
|
2393
|
+
var cp437 = "\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0";
|
|
2394
2394
|
var newBuffer;
|
|
2395
2395
|
if (typeof Buffer.allocUnsafe === "function") {
|
|
2396
2396
|
newBuffer = function(len) {
|
|
@@ -2401,13 +2401,9 @@ var require_yauzl = __commonJS((exports) => {
|
|
|
2401
2401
|
return new Buffer(len);
|
|
2402
2402
|
};
|
|
2403
2403
|
}
|
|
2404
|
-
function defaultCallback(err) {
|
|
2405
|
-
if (err)
|
|
2406
|
-
throw err;
|
|
2407
|
-
}
|
|
2408
2404
|
});
|
|
2409
2405
|
|
|
2410
|
-
//
|
|
2406
|
+
// /Users/jonathanburger/remotion/packages/renderer/node_modules/extract-zip/index.js
|
|
2411
2407
|
var require_extract_zip = __commonJS((exports, module) => {
|
|
2412
2408
|
var debug = require_src()("extract-zip");
|
|
2413
2409
|
var { createWriteStream, promises: fs } = __require("fs");
|
|
@@ -2545,7 +2541,7 @@ var require_extract_zip = __commonJS((exports, module) => {
|
|
|
2545
2541
|
});
|
|
2546
2542
|
|
|
2547
2543
|
// src/ensure-browser.ts
|
|
2548
|
-
import
|
|
2544
|
+
import fs5 from "fs";
|
|
2549
2545
|
|
|
2550
2546
|
// src/browser/BrowserFetcher.ts
|
|
2551
2547
|
var import_extract_zip = __toESM(require_extract_zip(), 1);
|
|
@@ -2603,7 +2599,7 @@ var chalk = (() => {
|
|
|
2603
2599
|
if (input.includes(close))
|
|
2604
2600
|
input = input.replace(regex, close + open);
|
|
2605
2601
|
const output = open + input + close;
|
|
2606
|
-
return newline ? output.replace(/\r*\n/g, `${close}
|
|
2602
|
+
return newline ? output.replace(/\r*\n/g, `${close}\$&${open}`) : output;
|
|
2607
2603
|
};
|
|
2608
2604
|
return st;
|
|
2609
2605
|
};
|
|
@@ -2618,8 +2614,7 @@ var chalk = (() => {
|
|
|
2618
2614
|
if (colors.visible === false)
|
|
2619
2615
|
return "";
|
|
2620
2616
|
let str = String(input);
|
|
2621
|
-
const nl = str.includes(
|
|
2622
|
-
`);
|
|
2617
|
+
const nl = str.includes("\n");
|
|
2623
2618
|
let n = stack.length;
|
|
2624
2619
|
while (n-- > 0)
|
|
2625
2620
|
str = wrap(colors.styles[stack[n]], str, nl);
|
|
@@ -2710,7 +2705,7 @@ var chalk = (() => {
|
|
|
2710
2705
|
})();
|
|
2711
2706
|
|
|
2712
2707
|
// src/log-level.ts
|
|
2713
|
-
var logLevels = ["
|
|
2708
|
+
var logLevels = ["verbose", "info", "warn", "error"];
|
|
2714
2709
|
var getNumberForLogLevel = (level) => {
|
|
2715
2710
|
return logLevels.indexOf(level);
|
|
2716
2711
|
};
|
|
@@ -2740,31 +2735,14 @@ function truthy(value) {
|
|
|
2740
2735
|
}
|
|
2741
2736
|
|
|
2742
2737
|
// src/logger.ts
|
|
2743
|
-
var INDENT_TOKEN = chalk.gray("
|
|
2738
|
+
var INDENT_TOKEN = chalk.gray("\u2502");
|
|
2744
2739
|
var verboseTag = (str) => {
|
|
2745
2740
|
return isColorSupported() ? chalk.bgBlack(` ${str} `) : `[${str}]`;
|
|
2746
2741
|
};
|
|
2747
2742
|
var Log = {
|
|
2748
|
-
trace: (options, ...args) => {
|
|
2749
|
-
writeInRepro("trace", ...args);
|
|
2750
|
-
if (isEqualOrBelowLogLevel(options.logLevel, "trace")) {
|
|
2751
|
-
if (args.length === 0) {
|
|
2752
|
-
return process.stdout.write(`
|
|
2753
|
-
`);
|
|
2754
|
-
}
|
|
2755
|
-
return console.log(...[
|
|
2756
|
-
options.indent ? INDENT_TOKEN : null,
|
|
2757
|
-
options.tag ? verboseTag(options.tag) : null
|
|
2758
|
-
].filter(truthy).concat(args.map((a) => chalk.gray(a))));
|
|
2759
|
-
}
|
|
2760
|
-
},
|
|
2761
2743
|
verbose: (options, ...args) => {
|
|
2762
2744
|
writeInRepro("verbose", ...args);
|
|
2763
2745
|
if (isEqualOrBelowLogLevel(options.logLevel, "verbose")) {
|
|
2764
|
-
if (args.length === 0) {
|
|
2765
|
-
return process.stdout.write(`
|
|
2766
|
-
`);
|
|
2767
|
-
}
|
|
2768
2746
|
return console.log(...[
|
|
2769
2747
|
options.indent ? INDENT_TOKEN : null,
|
|
2770
2748
|
options.tag ? verboseTag(options.tag) : null
|
|
@@ -2774,30 +2752,18 @@ var Log = {
|
|
|
2774
2752
|
info: (options, ...args) => {
|
|
2775
2753
|
writeInRepro("info", ...args);
|
|
2776
2754
|
if (isEqualOrBelowLogLevel(options.logLevel, "info")) {
|
|
2777
|
-
|
|
2778
|
-
return process.stdout.write(`
|
|
2779
|
-
`);
|
|
2780
|
-
}
|
|
2781
|
-
return console.log(...[options.indent ? INDENT_TOKEN : null].filter(truthy).concat(args ?? []));
|
|
2755
|
+
return console.log(...[options.indent ? INDENT_TOKEN : null].filter(truthy).concat(args));
|
|
2782
2756
|
}
|
|
2783
2757
|
},
|
|
2784
2758
|
warn: (options, ...args) => {
|
|
2785
2759
|
writeInRepro("warn", ...args);
|
|
2786
2760
|
if (isEqualOrBelowLogLevel(options.logLevel, "warn")) {
|
|
2787
|
-
if (args.length === 0) {
|
|
2788
|
-
return process.stdout.write(`
|
|
2789
|
-
`);
|
|
2790
|
-
}
|
|
2791
2761
|
return console.warn(...[options.indent ? chalk.yellow(INDENT_TOKEN) : null].filter(truthy).concat(args.map((a) => chalk.yellow(a))));
|
|
2792
2762
|
}
|
|
2793
2763
|
},
|
|
2794
2764
|
error: (options, ...args) => {
|
|
2795
2765
|
writeInRepro("error", ...args);
|
|
2796
2766
|
if (isEqualOrBelowLogLevel(options.logLevel, "error")) {
|
|
2797
|
-
if (args.length === 0) {
|
|
2798
|
-
return process.stdout.write(`
|
|
2799
|
-
`);
|
|
2800
|
-
}
|
|
2801
2767
|
return console.error(...[
|
|
2802
2768
|
options.indent ? INDENT_TOKEN : null,
|
|
2803
2769
|
options.tag ? verboseTag(options.tag) : null
|
|
@@ -2858,8 +2824,7 @@ var readFile = async (url, redirectsSoFar = 0) => {
|
|
|
2858
2824
|
body ? `---` : null,
|
|
2859
2825
|
body ? body : null,
|
|
2860
2826
|
body ? `---` : null
|
|
2861
|
-
].filter(truthy).join(
|
|
2862
|
-
`));
|
|
2827
|
+
].filter(truthy).join("\n"));
|
|
2863
2828
|
}
|
|
2864
2829
|
return file;
|
|
2865
2830
|
};
|
|
@@ -3064,26 +3029,15 @@ var getDownloadsCacheDir = () => {
|
|
|
3064
3029
|
};
|
|
3065
3030
|
|
|
3066
3031
|
// src/browser/BrowserFetcher.ts
|
|
3067
|
-
var TESTED_VERSION = "123.0.6312.86";
|
|
3068
|
-
var PLAYWRIGHT_VERSION = "1105";
|
|
3069
3032
|
function getChromeDownloadUrl({
|
|
3070
3033
|
platform: platform2,
|
|
3071
|
-
version
|
|
3072
|
-
chromeMode
|
|
3034
|
+
version
|
|
3073
3035
|
}) {
|
|
3074
3036
|
if (platform2 === "linux-arm64") {
|
|
3075
|
-
if (chromeMode === "chrome-for-testing") {
|
|
3076
|
-
throw new Error(`chromeMode: 'chrome-for-testing' is not supported on platform linux-arm64`);
|
|
3077
|
-
}
|
|
3078
3037
|
return `https://playwright.azureedge.net/builds/chromium/${version ?? PLAYWRIGHT_VERSION}/chromium-linux-arm64.zip`;
|
|
3079
3038
|
}
|
|
3080
|
-
|
|
3081
|
-
return `https://storage.googleapis.com/chrome-for-testing-public/${version ?? TESTED_VERSION}/${platform2}/chrome-headless-shell-${platform2}.zip`;
|
|
3082
|
-
}
|
|
3083
|
-
return `https://storage.googleapis.com/chrome-for-testing-public/${version ?? TESTED_VERSION}/${platform2}/chrome-${platform2}.zip`;
|
|
3039
|
+
return `https://storage.googleapis.com/chrome-for-testing-public/${version ?? TESTED_VERSION}/${platform2}/chrome-headless-shell-${platform2}.zip`;
|
|
3084
3040
|
}
|
|
3085
|
-
var mkdirAsync = fs3.promises.mkdir;
|
|
3086
|
-
var unlinkAsync = promisify(fs3.unlink.bind(fs3));
|
|
3087
3041
|
function existsAsync(filePath) {
|
|
3088
3042
|
return new Promise((resolve2) => {
|
|
3089
3043
|
fs3.access(filePath, (err) => {
|
|
@@ -3091,6 +3045,10 @@ function existsAsync(filePath) {
|
|
|
3091
3045
|
});
|
|
3092
3046
|
});
|
|
3093
3047
|
}
|
|
3048
|
+
var TESTED_VERSION = "123.0.6312.86";
|
|
3049
|
+
var PLAYWRIGHT_VERSION = "1105";
|
|
3050
|
+
var mkdirAsync = fs3.promises.mkdir;
|
|
3051
|
+
var unlinkAsync = promisify(fs3.unlink.bind(fs3));
|
|
3094
3052
|
var getPlatform = () => {
|
|
3095
3053
|
const platform2 = os.platform();
|
|
3096
3054
|
switch (platform2) {
|
|
@@ -3104,28 +3062,27 @@ var getPlatform = () => {
|
|
|
3104
3062
|
throw new Error("Unsupported platform: " + platform2);
|
|
3105
3063
|
}
|
|
3106
3064
|
};
|
|
3107
|
-
var
|
|
3108
|
-
|
|
3065
|
+
var destination = "chrome-headless-shell";
|
|
3066
|
+
var getDownloadsFolder = () => {
|
|
3109
3067
|
return path3.join(getDownloadsCacheDir(), destination);
|
|
3110
3068
|
};
|
|
3111
3069
|
var downloadBrowser = async ({
|
|
3112
3070
|
logLevel,
|
|
3113
3071
|
indent,
|
|
3114
3072
|
onProgress,
|
|
3115
|
-
version
|
|
3116
|
-
chromeMode
|
|
3073
|
+
version
|
|
3117
3074
|
}) => {
|
|
3118
3075
|
const platform2 = getPlatform();
|
|
3119
|
-
const downloadURL = getChromeDownloadUrl({ platform: platform2, version
|
|
3076
|
+
const downloadURL = getChromeDownloadUrl({ platform: platform2, version });
|
|
3120
3077
|
const fileName = downloadURL.split("/").pop();
|
|
3121
3078
|
if (!fileName) {
|
|
3122
3079
|
throw new Error(`A malformed download URL was found: ${downloadURL}.`);
|
|
3123
3080
|
}
|
|
3124
|
-
const downloadsFolder = getDownloadsFolder(
|
|
3081
|
+
const downloadsFolder = getDownloadsFolder();
|
|
3125
3082
|
const archivePath = path3.join(downloadsFolder, fileName);
|
|
3126
3083
|
const outputPath = getFolderPath(downloadsFolder, platform2);
|
|
3127
3084
|
if (await existsAsync(outputPath)) {
|
|
3128
|
-
return getRevisionInfo(
|
|
3085
|
+
return getRevisionInfo();
|
|
3129
3086
|
}
|
|
3130
3087
|
if (!await existsAsync(downloadsFolder)) {
|
|
3131
3088
|
await mkdirAsync(downloadsFolder, {
|
|
@@ -3135,8 +3092,7 @@ var downloadBrowser = async ({
|
|
|
3135
3092
|
if (os.platform() !== "darwin" && os.platform() !== "linux" && os.arch() === "arm64") {
|
|
3136
3093
|
throw new Error([
|
|
3137
3094
|
"Chrome Headless Shell is not available for Windows for arm64 architecture."
|
|
3138
|
-
].join(
|
|
3139
|
-
`));
|
|
3095
|
+
].join("\n"));
|
|
3140
3096
|
}
|
|
3141
3097
|
try {
|
|
3142
3098
|
await downloadFile({
|
|
@@ -3165,47 +3121,30 @@ var downloadBrowser = async ({
|
|
|
3165
3121
|
if (fs3.existsSync(chromeLinuxFolder)) {
|
|
3166
3122
|
fs3.renameSync(chromeLinuxFolder, path3.join(outputPath, "chrome-headless-shell-linux-arm64"));
|
|
3167
3123
|
}
|
|
3168
|
-
} catch (err) {
|
|
3169
|
-
return Promise.reject(err);
|
|
3170
3124
|
} finally {
|
|
3171
3125
|
if (await existsAsync(archivePath)) {
|
|
3172
3126
|
await unlinkAsync(archivePath);
|
|
3173
3127
|
}
|
|
3174
3128
|
}
|
|
3175
|
-
const revisionInfo = getRevisionInfo(
|
|
3129
|
+
const revisionInfo = getRevisionInfo();
|
|
3176
3130
|
makeFileExecutableIfItIsNot(revisionInfo.executablePath);
|
|
3177
3131
|
return revisionInfo;
|
|
3178
3132
|
};
|
|
3179
3133
|
var getFolderPath = (downloadsFolder, platform2) => {
|
|
3180
3134
|
return path3.resolve(downloadsFolder, platform2);
|
|
3181
3135
|
};
|
|
3182
|
-
var getExecutablePath = (
|
|
3183
|
-
const downloadsFolder = getDownloadsFolder(
|
|
3136
|
+
var getExecutablePath = () => {
|
|
3137
|
+
const downloadsFolder = getDownloadsFolder();
|
|
3184
3138
|
const platform2 = getPlatform();
|
|
3185
3139
|
const folderPath = getFolderPath(downloadsFolder, platform2);
|
|
3186
|
-
|
|
3187
|
-
if (platform2 === "mac-arm64" || platform2 === "mac-x64") {
|
|
3188
|
-
return path3.join(folderPath, `chrome-${platform2}`, "Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing");
|
|
3189
|
-
}
|
|
3190
|
-
if (platform2 === "win64") {
|
|
3191
|
-
return path3.join(folderPath, "chrome-win64", "chrome.exe");
|
|
3192
|
-
}
|
|
3193
|
-
if (platform2 === "linux64" || platform2 === "linux-arm64") {
|
|
3194
|
-
return path3.join(folderPath, "chrome-linux64", "chrome");
|
|
3195
|
-
}
|
|
3196
|
-
throw new Error("unsupported platform" + platform2);
|
|
3197
|
-
}
|
|
3198
|
-
if (chromeMode === "headless-shell") {
|
|
3199
|
-
return path3.join(folderPath, `chrome-headless-shell-${platform2}`, platform2 === "win64" ? "chrome-headless-shell.exe" : "chrome-headless-shell");
|
|
3200
|
-
}
|
|
3201
|
-
throw new Error("unsupported chrome mode" + chromeMode);
|
|
3140
|
+
return path3.join(folderPath, `chrome-headless-shell-${platform2}`, platform2 === "win64" ? "chrome-headless-shell.exe" : "chrome-headless-shell");
|
|
3202
3141
|
};
|
|
3203
|
-
var getRevisionInfo = (
|
|
3204
|
-
const executablePath = getExecutablePath(
|
|
3205
|
-
const downloadsFolder = getDownloadsFolder(
|
|
3142
|
+
var getRevisionInfo = () => {
|
|
3143
|
+
const executablePath = getExecutablePath();
|
|
3144
|
+
const downloadsFolder = getDownloadsFolder();
|
|
3206
3145
|
const platform2 = getPlatform();
|
|
3207
3146
|
const folderPath = getFolderPath(downloadsFolder, platform2);
|
|
3208
|
-
const url = getChromeDownloadUrl({ platform: platform2, version: null
|
|
3147
|
+
const url = getChromeDownloadUrl({ platform: platform2, version: null });
|
|
3209
3148
|
const local = fs3.existsSync(folderPath);
|
|
3210
3149
|
return {
|
|
3211
3150
|
executablePath,
|
|
@@ -3226,62 +3165,68 @@ var defaultBrowserDownloadProgress = ({
|
|
|
3226
3165
|
indent,
|
|
3227
3166
|
logLevel,
|
|
3228
3167
|
api
|
|
3229
|
-
}) => (
|
|
3230
|
-
|
|
3231
|
-
Log.info({ indent, logLevel }, "Downloading Chrome for Testing https://www.remotion.dev/chrome-for-testing");
|
|
3232
|
-
} else {
|
|
3233
|
-
Log.info({ indent, logLevel }, "Downloading Chrome Headless Shell https://www.remotion.dev/chrome-headless-shell");
|
|
3234
|
-
}
|
|
3168
|
+
}) => () => {
|
|
3169
|
+
Log.info({ indent, logLevel }, "Downloading Chrome Headless Shell https://www.remotion.dev/docs/miscellaneous/chrome-headless-shell");
|
|
3235
3170
|
Log.info({ indent, logLevel }, `Customize this behavior by adding a onBrowserDownload function to ${api}.`);
|
|
3236
3171
|
let lastProgress = 0;
|
|
3237
3172
|
return {
|
|
3238
3173
|
onProgress: (progress) => {
|
|
3239
3174
|
if (progress.downloadedBytes > lastProgress + 1e7 || progress.percent === 1) {
|
|
3240
3175
|
lastProgress = progress.downloadedBytes;
|
|
3241
|
-
|
|
3242
|
-
Log.info({ indent, logLevel }, `Downloading Chrome for Testing - ${toMegabytes(progress.downloadedBytes)}/${toMegabytes(progress.totalSizeInBytes)}`);
|
|
3243
|
-
} else {
|
|
3244
|
-
Log.info({ indent, logLevel }, `Downloading Chrome Headless Shell - ${toMegabytes(progress.downloadedBytes)}/${toMegabytes(progress.totalSizeInBytes)}`);
|
|
3245
|
-
}
|
|
3176
|
+
Log.info({ indent, logLevel }, `Downloading Chrome Headless Shell - ${toMegabytes(progress.downloadedBytes)}/${toMegabytes(progress.totalSizeInBytes)}`);
|
|
3246
3177
|
}
|
|
3247
3178
|
},
|
|
3248
3179
|
version: null
|
|
3249
3180
|
};
|
|
3250
3181
|
};
|
|
3251
3182
|
|
|
3183
|
+
// src/get-local-browser.ts
|
|
3184
|
+
import fs4 from "fs";
|
|
3185
|
+
var getSearchPathsForProduct = () => {
|
|
3186
|
+
return [];
|
|
3187
|
+
};
|
|
3188
|
+
var getLocalBrowser = () => {
|
|
3189
|
+
for (const p of getSearchPathsForProduct()) {
|
|
3190
|
+
if (fs4.existsSync(p)) {
|
|
3191
|
+
return p;
|
|
3192
|
+
}
|
|
3193
|
+
}
|
|
3194
|
+
return null;
|
|
3195
|
+
};
|
|
3196
|
+
|
|
3252
3197
|
// src/ensure-browser.ts
|
|
3253
3198
|
var currentEnsureBrowserOperation = Promise.resolve();
|
|
3254
3199
|
var internalEnsureBrowserUncapped = async ({
|
|
3255
3200
|
indent,
|
|
3256
3201
|
logLevel,
|
|
3257
3202
|
browserExecutable,
|
|
3258
|
-
onBrowserDownload
|
|
3259
|
-
chromeMode
|
|
3203
|
+
onBrowserDownload
|
|
3260
3204
|
}) => {
|
|
3261
|
-
const status = getBrowserStatus(
|
|
3205
|
+
const status = getBrowserStatus(browserExecutable);
|
|
3262
3206
|
if (status.type === "no-browser") {
|
|
3263
|
-
const { onProgress, version } = onBrowserDownload(
|
|
3264
|
-
await downloadBrowser({ indent, logLevel, onProgress, version
|
|
3207
|
+
const { onProgress, version } = onBrowserDownload();
|
|
3208
|
+
await downloadBrowser({ indent, logLevel, onProgress, version });
|
|
3265
3209
|
}
|
|
3266
|
-
const newStatus = getBrowserStatus(
|
|
3210
|
+
const newStatus = getBrowserStatus(browserExecutable);
|
|
3267
3211
|
return newStatus;
|
|
3268
3212
|
};
|
|
3269
3213
|
var internalEnsureBrowser = (options) => {
|
|
3270
3214
|
currentEnsureBrowserOperation = currentEnsureBrowserOperation.then(() => internalEnsureBrowserUncapped(options));
|
|
3271
3215
|
return currentEnsureBrowserOperation;
|
|
3272
3216
|
};
|
|
3273
|
-
var getBrowserStatus = ({
|
|
3274
|
-
browserExecutable,
|
|
3275
|
-
chromeMode
|
|
3276
|
-
}) => {
|
|
3217
|
+
var getBrowserStatus = (browserExecutable) => {
|
|
3277
3218
|
if (browserExecutable) {
|
|
3278
|
-
if (!
|
|
3219
|
+
if (!fs5.existsSync(browserExecutable)) {
|
|
3279
3220
|
throw new Error(`"browserExecutable" was specified as '${browserExecutable}' but the path doesn't exist. Pass "null" for "browserExecutable" to download a browser automatically.`);
|
|
3280
3221
|
}
|
|
3281
3222
|
return { path: browserExecutable, type: "user-defined-path" };
|
|
3282
3223
|
}
|
|
3283
|
-
const
|
|
3284
|
-
if (
|
|
3224
|
+
const localBrowser = getLocalBrowser();
|
|
3225
|
+
if (localBrowser !== null) {
|
|
3226
|
+
return { path: localBrowser, type: "local-browser" };
|
|
3227
|
+
}
|
|
3228
|
+
const revision = getRevisionInfo();
|
|
3229
|
+
if (revision.local && fs5.existsSync(revision.executablePath)) {
|
|
3285
3230
|
return { path: revision.executablePath, type: "local-puppeteer-browser" };
|
|
3286
3231
|
}
|
|
3287
3232
|
return { type: "no-browser" };
|
|
@@ -3297,8 +3242,7 @@ var ensureBrowser = (options) => {
|
|
|
3297
3242
|
api: "ensureBrowser()",
|
|
3298
3243
|
indent: false,
|
|
3299
3244
|
logLevel
|
|
3300
|
-
})
|
|
3301
|
-
chromeMode: options?.chromeMode ?? "headless-shell"
|
|
3245
|
+
})
|
|
3302
3246
|
});
|
|
3303
3247
|
};
|
|
3304
3248
|
export {
|