@remotion/renderer 4.0.0-alpha.217 → 4.0.0-alpha4
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/README.md +18 -12
- package/dist/assets/get-audio-channels.d.ts +2 -1
- package/dist/assets/get-audio-channels.js +9 -5
- package/dist/assets/get-video-stream-duration.d.ts +5 -2
- package/dist/assets/get-video-stream-duration.js +12 -6
- package/dist/audio-codec.d.ts +3 -4
- package/dist/audio-codec.js +9 -3
- package/dist/browser/BrowserFetcher.d.ts +16 -63
- package/dist/browser/BrowserFetcher.js +126 -213
- package/dist/browser/BrowserRunner.js +2 -8
- package/dist/browser/FrameManager.js +3 -2
- package/dist/browser/LaunchOptions.d.ts +0 -1
- package/dist/browser/Launcher.js +3 -9
- package/dist/browser/PuppeteerNode.d.ts +0 -3
- package/dist/browser/PuppeteerNode.js +0 -5
- package/dist/browser/create-browser-fetcher.js +34 -48
- package/dist/browser/devtools-commands.d.ts +1 -5
- package/dist/browser/devtools-types.d.ts +0 -78
- package/dist/check-apple-silicon.js +45 -2
- package/dist/client.d.ts +5 -29
- package/dist/client.js +1 -26
- package/dist/codec-supports-media.d.ts +1 -1
- package/dist/codec-supports-media.js +1 -1
- package/dist/combine-videos.d.ts +3 -0
- package/dist/combine-videos.js +9 -5
- package/dist/compositor/compose.js +2 -3
- package/dist/compositor/get-executable-path.d.ts +1 -1
- package/dist/compositor/get-executable-path.js +8 -15
- package/dist/create-ffmpeg-complex-filter.d.ts +4 -1
- package/dist/create-ffmpeg-complex-filter.js +4 -2
- package/dist/create-ffmpeg-merge-filter.d.ts +5 -2
- package/dist/create-ffmpeg-merge-filter.js +10 -2
- package/dist/create-silent-audio.d.ts +4 -1
- package/dist/create-silent-audio.js +7 -3
- package/dist/delete-directory.js +16 -16
- package/dist/ensure-presentation-timestamp.d.ts +9 -2
- package/dist/ensure-presentation-timestamp.js +13 -5
- package/dist/extract-frame-from-video.d.ts +3 -0
- package/dist/extract-frame-from-video.js +29 -7
- package/dist/file-extensions.d.ts +12 -1
- package/dist/file-extensions.js +13 -1
- package/dist/get-can-extract-frames-fast.d.ts +4 -1
- package/dist/get-can-extract-frames-fast.js +12 -1
- package/dist/get-compositions.d.ts +5 -2
- package/dist/get-compositions.js +11 -6
- package/dist/get-frame-of-video-slow.d.ts +4 -1
- package/dist/get-frame-of-video-slow.js +11 -3
- package/dist/get-frame-padded-index.d.ts +1 -2
- package/dist/get-local-browser-executable.js +3 -12
- package/dist/get-video-info.d.ts +5 -2
- package/dist/get-video-info.js +12 -6
- package/dist/guess-extension-for-media.d.ts +3 -1
- package/dist/guess-extension-for-media.js +8 -4
- package/dist/image-format.d.ts +6 -12
- package/dist/image-format.js +13 -16
- package/dist/index.d.ts +25 -36
- package/dist/index.js +15 -17
- package/dist/last-frame-from-video-cache.d.ts +4 -0
- package/dist/last-frame-from-video-cache.js +1 -0
- package/dist/merge-audio-track.d.ts +2 -0
- package/dist/merge-audio-track.js +10 -3
- package/dist/offthread-video-server.d.ts +4 -1
- package/dist/offthread-video-server.js +3 -1
- package/dist/open-browser.d.ts +0 -1
- package/dist/open-browser.js +6 -7
- package/dist/perf.d.ts +1 -1
- package/dist/perf.js +7 -9
- package/dist/prepare-server.d.ts +4 -1
- package/dist/prepare-server.js +5 -1
- package/dist/preprocess-audio-track.d.ts +4 -0
- package/dist/preprocess-audio-track.js +8 -4
- package/dist/prespawn-ffmpeg.d.ts +9 -6
- package/dist/prespawn-ffmpeg.js +12 -7
- package/dist/prestitcher-memory-usage.d.ts +4 -0
- package/dist/prestitcher-memory-usage.js +3 -2
- package/dist/prores-profile.d.ts +2 -1
- package/dist/prores-profile.js +4 -4
- package/dist/provide-screenshot.d.ts +4 -4
- package/dist/provide-screenshot.js +2 -2
- package/dist/puppeteer-screenshot.d.ts +2 -3
- package/dist/puppeteer-screenshot.js +32 -9
- package/dist/render-frames.d.ts +25 -12
- package/dist/render-frames.js +40 -27
- package/dist/render-media.d.ts +18 -16
- package/dist/render-media.js +43 -31
- package/dist/render-still.d.ts +8 -9
- package/dist/render-still.js +13 -12
- package/dist/screenshot-dom-element.d.ts +4 -4
- package/dist/screenshot-dom-element.js +3 -6
- package/dist/screenshot-task.d.ts +2 -2
- package/dist/screenshot-task.js +23 -38
- package/dist/serve-handler/index.js +4 -6
- package/dist/serve-static.d.ts +3 -0
- package/dist/serve-static.js +3 -3
- package/dist/stitch-frames-to-video.d.ts +11 -2
- package/dist/stitch-frames-to-video.js +33 -24
- package/dist/take-frame-and-compose.d.ts +4 -4
- package/dist/take-frame-and-compose.js +6 -12
- package/dist/tmp-dir.js +2 -1
- package/dist/try-to-extract-frame-of-video-fast.d.ts +4 -1
- package/dist/try-to-extract-frame-of-video-fast.js +7 -3
- package/dist/validate-concurrency.d.ts +0 -2
- package/dist/validate-concurrency.js +5 -11
- package/dist/validate-puppeteer-timeout.js +0 -1
- package/package.json +68 -71
- package/dist/browser/is-target-closed-err.d.ts +0 -1
- package/dist/browser/is-target-closed-err.js +0 -9
- package/dist/call-ffmpeg.d.ts +0 -17
- package/dist/call-ffmpeg.js +0 -34
- package/dist/compositor/compositor.d.ts +0 -15
- package/dist/compositor/compositor.js +0 -193
- package/dist/compositor/make-nonce.d.ts +0 -1
- package/dist/compositor/make-nonce.js +0 -8
- package/dist/jpeg-quality.d.ts +0 -1
- package/dist/jpeg-quality.js +0 -21
- package/dist/options/audio-bitrate.d.ts +0 -2
- package/dist/options/audio-bitrate.js +0 -11
- package/dist/options/crf.d.ts +0 -2
- package/dist/options/crf.js +0 -11
- package/dist/options/enforce-audio.d.ts +0 -2
- package/dist/options/enforce-audio.js +0 -11
- package/dist/options/jpeg-quality.d.ts +0 -2
- package/dist/options/jpeg-quality.js +0 -11
- package/dist/options/mute.d.ts +0 -2
- package/dist/options/mute.js +0 -11
- package/dist/options/option.d.ts +0 -8
- package/dist/options/option.js +0 -2
- package/dist/options/scale.d.ts +0 -2
- package/dist/options/scale.js +0 -11
- package/dist/options/video-bitrate.d.ts +0 -2
- package/dist/options/video-bitrate.js +0 -11
- package/dist/options/video-codec.d.ts +0 -2
- package/dist/options/video-codec.js +0 -11
- package/ffmpeg/SOURCE.md +0 -1
- package/ffmpeg/linux-arm-musl.gz +0 -0
- package/ffmpeg/linux-arm.gz +0 -0
- package/ffmpeg/linux-x64-musl.gz +0 -0
- package/ffmpeg/linux-x64.gz +0 -0
- package/ffmpeg/macos-arm.gz +0 -0
- package/ffmpeg/macos-x64.gz +0 -0
- package/ffmpeg/windows.gz +0 -0
- package/install-toolchain.mjs +0 -42
package/README.md
CHANGED
|
@@ -12,30 +12,36 @@ First, install Cargo, if you don't have it, or upgrade to a version that support
|
|
|
12
12
|
curl https://sh.rustup.rs -sSf | sh
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Second, install components that allow for cross-compilation:
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
```sh
|
|
18
|
+
sh install_platforms.sh
|
|
19
|
+
```
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
Third, install linkers for cross compilation:
|
|
20
22
|
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
+
```sh
|
|
24
|
+
brew install MaterializeInc/crosstools/x86_64-unknown-linux-gnu
|
|
25
|
+
brew install MaterializeInc/crosstools/aarch64-unknown-linux-gnu
|
|
26
|
+
brew install messense/macos-cross-toolchains/x86_64-unknown-linux-musl
|
|
27
|
+
brew install messense/macos-cross-toolchains/aarch64-unknown-linux-musl
|
|
28
|
+
brew install mingw-w64
|
|
23
29
|
```
|
|
24
30
|
|
|
25
|
-
|
|
31
|
+
> This will take a few minutes.
|
|
26
32
|
|
|
27
|
-
|
|
33
|
+
## Building
|
|
28
34
|
|
|
29
|
-
To build the Rust
|
|
35
|
+
To build the Rust parts for your operating system, run:
|
|
30
36
|
|
|
31
|
-
```
|
|
32
|
-
node
|
|
37
|
+
```
|
|
38
|
+
node build.mjs
|
|
33
39
|
```
|
|
34
40
|
|
|
35
|
-
|
|
41
|
+
To build the Rust binaries for all supported platforms, run:
|
|
36
42
|
|
|
37
43
|
```
|
|
38
|
-
|
|
44
|
+
node build.mjs --all
|
|
39
45
|
```
|
|
40
46
|
|
|
41
47
|
The resulting artifacts should be checked into Git.
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import type { FfmpegExecutable } from '../ffmpeg-executable';
|
|
1
2
|
import type { AudioChannelsAndDurationResultCache, DownloadMap } from './download-map';
|
|
2
|
-
export declare const getAudioChannelsAndDuration: (downloadMap: DownloadMap, src: string) => Promise<AudioChannelsAndDurationResultCache>;
|
|
3
|
+
export declare const getAudioChannelsAndDuration: (downloadMap: DownloadMap, src: string, ffprobeExecutable: FfmpegExecutable, remotionRoot: string) => Promise<AudioChannelsAndDurationResultCache>;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.getAudioChannelsAndDuration = void 0;
|
|
4
|
-
const
|
|
7
|
+
const execa_1 = __importDefault(require("execa"));
|
|
8
|
+
const ffmpeg_flags_1 = require("../ffmpeg-flags");
|
|
5
9
|
const p_limit_1 = require("../p-limit");
|
|
6
10
|
const limit = (0, p_limit_1.pLimit)(1);
|
|
7
|
-
async function getAudioChannelsAndDurationUnlimited(downloadMap, src) {
|
|
11
|
+
async function getAudioChannelsAndDurationUnlimited(downloadMap, src, ffprobeExecutable, remotionRoot) {
|
|
8
12
|
if (downloadMap.durationOfAssetCache[src]) {
|
|
9
13
|
return downloadMap.durationOfAssetCache[src];
|
|
10
14
|
}
|
|
@@ -16,7 +20,7 @@ async function getAudioChannelsAndDurationUnlimited(downloadMap, src) {
|
|
|
16
20
|
]
|
|
17
21
|
.reduce((acc, val) => acc.concat(val), [])
|
|
18
22
|
.filter(Boolean);
|
|
19
|
-
const task = await (0,
|
|
23
|
+
const task = await (0, execa_1.default)(await (0, ffmpeg_flags_1.getExecutableBinary)(ffprobeExecutable, remotionRoot, 'ffprobe'), args);
|
|
20
24
|
const channels = task.stdout.match(/channels=([0-9]+)/);
|
|
21
25
|
const duration = task.stdout.match(/duration=([0-9.]+)/);
|
|
22
26
|
const result = {
|
|
@@ -26,7 +30,7 @@ async function getAudioChannelsAndDurationUnlimited(downloadMap, src) {
|
|
|
26
30
|
downloadMap.durationOfAssetCache[src] = result;
|
|
27
31
|
return result;
|
|
28
32
|
}
|
|
29
|
-
const getAudioChannelsAndDuration = (downloadMap, src) => {
|
|
30
|
-
return limit(() => getAudioChannelsAndDurationUnlimited(downloadMap, src));
|
|
33
|
+
const getAudioChannelsAndDuration = (downloadMap, src, ffprobeExecutable, remotionRoot) => {
|
|
34
|
+
return limit(() => getAudioChannelsAndDurationUnlimited(downloadMap, src, ffprobeExecutable, remotionRoot));
|
|
31
35
|
};
|
|
32
36
|
exports.getAudioChannelsAndDuration = getAudioChannelsAndDuration;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import type { FfmpegExecutable } from '../ffmpeg-executable';
|
|
1
2
|
import type { DownloadMap, VideoDurationResult } from './download-map';
|
|
2
3
|
export declare const parseVideoStreamDuration: (stdout: string) => VideoDurationResult;
|
|
3
|
-
export declare function getVideoStreamDurationwithoutCache({ src }: {
|
|
4
|
+
export declare function getVideoStreamDurationwithoutCache({ src, ffprobeExecutable, remotionRoot, }: {
|
|
4
5
|
src: string;
|
|
6
|
+
ffprobeExecutable: FfmpegExecutable;
|
|
7
|
+
remotionRoot: string;
|
|
5
8
|
}): Promise<VideoDurationResult>;
|
|
6
|
-
export declare const getVideoStreamDuration: (downloadMap: DownloadMap, src: string) => Promise<VideoDurationResult>;
|
|
9
|
+
export declare const getVideoStreamDuration: (downloadMap: DownloadMap, src: string, ffprobeExecutable: FfmpegExecutable, remotionRoot: string) => Promise<VideoDurationResult>;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.getVideoStreamDuration = exports.getVideoStreamDurationwithoutCache = exports.parseVideoStreamDuration = void 0;
|
|
4
|
-
const
|
|
7
|
+
const execa_1 = __importDefault(require("execa"));
|
|
8
|
+
const ffmpeg_flags_1 = require("../ffmpeg-flags");
|
|
5
9
|
const p_limit_1 = require("../p-limit");
|
|
6
10
|
const limit = (0, p_limit_1.pLimit)(1);
|
|
7
11
|
const parseAlternativeDuration = (stdout) => {
|
|
@@ -35,7 +39,7 @@ const parseVideoStreamDuration = (stdout) => {
|
|
|
35
39
|
return result;
|
|
36
40
|
};
|
|
37
41
|
exports.parseVideoStreamDuration = parseVideoStreamDuration;
|
|
38
|
-
async function getVideoStreamDurationwithoutCache({ src }) {
|
|
42
|
+
async function getVideoStreamDurationwithoutCache({ src, ffprobeExecutable, remotionRoot, }) {
|
|
39
43
|
const args = [
|
|
40
44
|
['-v', 'error'],
|
|
41
45
|
['-select_streams', 'v:0'],
|
|
@@ -44,22 +48,24 @@ async function getVideoStreamDurationwithoutCache({ src }) {
|
|
|
44
48
|
]
|
|
45
49
|
.reduce((acc, val) => acc.concat(val), [])
|
|
46
50
|
.filter(Boolean);
|
|
47
|
-
const task = await (0,
|
|
51
|
+
const task = await (0, execa_1.default)(await (0, ffmpeg_flags_1.getExecutableBinary)(ffprobeExecutable, remotionRoot, 'ffprobe'), args);
|
|
48
52
|
const result = (0, exports.parseVideoStreamDuration)(task.stdout);
|
|
49
53
|
return result;
|
|
50
54
|
}
|
|
51
55
|
exports.getVideoStreamDurationwithoutCache = getVideoStreamDurationwithoutCache;
|
|
52
|
-
async function getVideoStreamDurationUnlimited(downloadMap, src) {
|
|
56
|
+
async function getVideoStreamDurationUnlimited(downloadMap, src, ffprobeExecutable, remotionRoot) {
|
|
53
57
|
if (downloadMap.videoDurationResultCache[src]) {
|
|
54
58
|
return downloadMap.videoDurationResultCache[src];
|
|
55
59
|
}
|
|
56
60
|
const result = await getVideoStreamDurationwithoutCache({
|
|
57
61
|
src,
|
|
62
|
+
ffprobeExecutable,
|
|
63
|
+
remotionRoot,
|
|
58
64
|
});
|
|
59
65
|
downloadMap.videoDurationResultCache[src] = result;
|
|
60
66
|
return result;
|
|
61
67
|
}
|
|
62
|
-
const getVideoStreamDuration = (downloadMap, src) => {
|
|
63
|
-
return limit(() => getVideoStreamDurationUnlimited(downloadMap, src));
|
|
68
|
+
const getVideoStreamDuration = (downloadMap, src, ffprobeExecutable, remotionRoot) => {
|
|
69
|
+
return limit(() => getVideoStreamDurationUnlimited(downloadMap, src, ffprobeExecutable, remotionRoot));
|
|
64
70
|
};
|
|
65
71
|
exports.getVideoStreamDuration = getVideoStreamDuration;
|
package/dist/audio-codec.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare const supportedAudioCodecs: {
|
|
|
5
5
|
readonly h264: readonly ["aac", "pcm-16"];
|
|
6
6
|
readonly 'h264-mkv': readonly ["pcm-16"];
|
|
7
7
|
readonly aac: readonly ["aac", "pcm-16"];
|
|
8
|
-
readonly gif:
|
|
8
|
+
readonly gif: readonly [];
|
|
9
9
|
readonly h265: readonly ["aac", "pcm-16"];
|
|
10
10
|
readonly mp3: readonly ["mp3", "pcm-16"];
|
|
11
11
|
readonly prores: readonly ["aac", "pcm-16"];
|
|
@@ -13,8 +13,8 @@ export declare const supportedAudioCodecs: {
|
|
|
13
13
|
readonly vp9: readonly ["opus", "pcm-16"];
|
|
14
14
|
readonly wav: readonly ["pcm-16"];
|
|
15
15
|
};
|
|
16
|
-
declare const audioCodecNames: readonly ["pcm_s16le", "aac", "libmp3lame", "libopus"];
|
|
17
|
-
declare type FfmpegAudioCodecName = typeof audioCodecNames[number];
|
|
16
|
+
export declare const audioCodecNames: readonly ["pcm_s16le", "aac", "libmp3lame", "libopus"];
|
|
17
|
+
export declare type FfmpegAudioCodecName = typeof audioCodecNames[number];
|
|
18
18
|
export declare const mapAudioCodecToFfmpegAudioCodecName: (audioCodec: AudioCodec) => FfmpegAudioCodecName;
|
|
19
19
|
export declare const defaultAudioCodecs: {
|
|
20
20
|
[key in Codec]: {
|
|
@@ -25,4 +25,3 @@ export declare const getDefaultAudioCodec: ({ codec, preferLossless, }: {
|
|
|
25
25
|
codec: Codec;
|
|
26
26
|
preferLossless: boolean;
|
|
27
27
|
}) => AudioCodec | null;
|
|
28
|
-
export {};
|
package/dist/audio-codec.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDefaultAudioCodec = exports.defaultAudioCodecs = exports.mapAudioCodecToFfmpegAudioCodecName = exports.supportedAudioCodecs = exports.validAudioCodecs = void 0;
|
|
3
|
+
exports.getDefaultAudioCodec = exports.defaultAudioCodecs = exports.mapAudioCodecToFfmpegAudioCodecName = exports.audioCodecNames = exports.supportedAudioCodecs = exports.validAudioCodecs = void 0;
|
|
4
4
|
exports.validAudioCodecs = ['pcm-16', 'aac', 'mp3', 'opus'];
|
|
5
5
|
exports.supportedAudioCodecs = {
|
|
6
6
|
h264: ['aac', 'pcm-16'],
|
|
@@ -18,7 +18,12 @@ const _satisfies = exports.supportedAudioCodecs;
|
|
|
18
18
|
if (_satisfies) {
|
|
19
19
|
// Just for type checking
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
exports.audioCodecNames = [
|
|
22
|
+
'pcm_s16le',
|
|
23
|
+
'aac',
|
|
24
|
+
'libmp3lame',
|
|
25
|
+
'libopus',
|
|
26
|
+
];
|
|
22
27
|
const mapAudioCodecToFfmpegAudioCodecName = (audioCodec) => {
|
|
23
28
|
if (audioCodec === 'aac') {
|
|
24
29
|
return 'aac';
|
|
@@ -62,7 +67,8 @@ exports.defaultAudioCodecs = {
|
|
|
62
67
|
},
|
|
63
68
|
prores: {
|
|
64
69
|
lossless: 'pcm-16',
|
|
65
|
-
|
|
70
|
+
// V4.0: Make pcm the default
|
|
71
|
+
compressed: 'aac',
|
|
66
72
|
},
|
|
67
73
|
vp8: {
|
|
68
74
|
lossless: 'pcm-16',
|
|
@@ -15,11 +15,6 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type { Product } from './Product';
|
|
17
17
|
declare type Platform = 'linux' | 'mac' | 'mac_arm' | 'win32' | 'win64';
|
|
18
|
-
export interface BrowserFetcherOptions {
|
|
19
|
-
platform: Platform | null;
|
|
20
|
-
product: Product;
|
|
21
|
-
path: string | null;
|
|
22
|
-
}
|
|
23
18
|
interface BrowserFetcherRevisionInfo {
|
|
24
19
|
folderPath: string;
|
|
25
20
|
executablePath: string;
|
|
@@ -28,62 +23,20 @@ interface BrowserFetcherRevisionInfo {
|
|
|
28
23
|
revision: string;
|
|
29
24
|
product: string;
|
|
30
25
|
}
|
|
31
|
-
export declare
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
platform
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
host(): string;
|
|
48
|
-
/**
|
|
49
|
-
* Initiates a HEAD request to check if the revision is available.
|
|
50
|
-
* @remarks
|
|
51
|
-
* This method is affected by the current `product`.
|
|
52
|
-
* @param revision - The revision to check availability for.
|
|
53
|
-
* @returns A promise that resolves to `true` if the revision could be downloaded
|
|
54
|
-
* from the host.
|
|
55
|
-
*/
|
|
56
|
-
canDownload(revision: string): Promise<boolean>;
|
|
57
|
-
/**
|
|
58
|
-
* Initiates a GET request to download the revision from the host.
|
|
59
|
-
* @remarks
|
|
60
|
-
* This method is affected by the current `product`.
|
|
61
|
-
* @param revision - The revision to download.
|
|
62
|
-
* @param progressCallback - A function that will be called with two arguments:
|
|
63
|
-
* How many bytes have been downloaded and the total number of bytes of the download.
|
|
64
|
-
* @returns A promise with revision information when the revision is downloaded
|
|
65
|
-
* and extracted.
|
|
66
|
-
*/
|
|
67
|
-
download(revision: string, progressCallback?: (x: number, y: number) => void): Promise<BrowserFetcherRevisionInfo | undefined>;
|
|
68
|
-
/**
|
|
69
|
-
* @remarks
|
|
70
|
-
* This method is affected by the current `product`.
|
|
71
|
-
* @returns A promise with a list of all revision strings (for the current `product`)
|
|
72
|
-
* available locally on disk.
|
|
73
|
-
*/
|
|
74
|
-
localRevisions(): Promise<string[]>;
|
|
75
|
-
/**
|
|
76
|
-
* @remarks
|
|
77
|
-
* This method is affected by the current `product`.
|
|
78
|
-
* @param revision - A revision to remove for the current `product`.
|
|
79
|
-
* @returns A promise that resolves when the revision has been removes or
|
|
80
|
-
* throws if the revision has not been downloaded.
|
|
81
|
-
*/
|
|
82
|
-
remove(revision: string): Promise<void>;
|
|
83
|
-
/**
|
|
84
|
-
* @param revision - The revision to get info for.
|
|
85
|
-
* @returns The revision info for the given revision.
|
|
86
|
-
*/
|
|
87
|
-
revisionInfo(revision: string): BrowserFetcherRevisionInfo;
|
|
88
|
-
}
|
|
26
|
+
export declare const getPlatform: (product: Product) => Platform;
|
|
27
|
+
export declare const getDownloadsFolder: (product: Product) => string;
|
|
28
|
+
export declare const getDownloadHost: (product: Product) => "https://storage.googleapis.com" | "https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central";
|
|
29
|
+
export declare const download: ({ revision, progressCallback, product, platform, downloadHost, downloadsFolder, }: {
|
|
30
|
+
revision: string;
|
|
31
|
+
progressCallback: (x: number, y: number) => void;
|
|
32
|
+
product: Product;
|
|
33
|
+
platform: Platform;
|
|
34
|
+
downloadHost: string;
|
|
35
|
+
downloadsFolder: string;
|
|
36
|
+
}) => Promise<BrowserFetcherRevisionInfo | undefined>;
|
|
37
|
+
export declare const localRevisions: (downloadsFolder: string, product: Product, platform: Platform) => Promise<string[]>;
|
|
38
|
+
export declare const removeBrowser: (revision: string, folderPath: string) => Promise<void>;
|
|
39
|
+
export declare const getFolderPath: (revision: string, downloadsFolder: string, platform: Platform) => string;
|
|
40
|
+
export declare const getRevisionInfo: (revision: string, product: Product) => BrowserFetcherRevisionInfo;
|
|
41
|
+
export declare function _downloadFile(url: string, destinationPath: string, progressCallback: (x: number, y: number) => void): Promise<number>;
|
|
89
42
|
export {};
|