diff --git a/experimental/puppeteer-firefox/lib/BrowserFetcher.js b/experimental/puppeteer-firefox/lib/BrowserFetcher.js index c7d1250e..a74e1c20 100644 --- a/experimental/puppeteer-firefox/lib/BrowserFetcher.js +++ b/experimental/puppeteer-firefox/lib/BrowserFetcher.js @@ -27,20 +27,20 @@ const ProxyAgent = require('https-proxy-agent'); // @ts-ignore const getProxyForUrl = require('proxy-from-env').getProxyForUrl; -const DEFAULT_DOWNLOAD_HOST = 'https://storage.googleapis.com'; - const downloadURLs = { chromium: { + host: 'https://storage.googleapis.com', linux: '%s/chromium-browser-snapshots/Linux_x64/%s/%s.zip', mac: '%s/chromium-browser-snapshots/Mac/%s/%s.zip', win32: '%s/chromium-browser-snapshots/Win/%s/%s.zip', win64: '%s/chromium-browser-snapshots/Win_x64/%s/%s.zip', }, firefox: { - linux: '%s/juggler-builds/%s/%s.zip', - mac: '%s/juggler-builds/%s/%s.zip', - win32: '%s/juggler-builds/%s/%s.zip', - win64: '%s/juggler-builds/%s/%s.zip', + host: 'https://github.com/puppeteer/juggler/releases', + linux: '%s/download/%s/%s.zip', + mac: '%s/download/%s/%s.zip', + win32: '%s/download/%s/%s.zip', + win64: '%s/download/%s/%s.zip', }, }; @@ -79,7 +79,8 @@ function archiveName(product, platform, revision) { * @return {string} */ function downloadURL(product, platform, host, revision) { - return util.format(downloadURLs[product][platform], host, revision, archiveName(product, platform, revision)); + const url = util.format(downloadURLs[product][platform], host, revision, archiveName(product, platform, revision)); + return url; } const readdirAsync = helper.promisify(fs.readdir.bind(fs)); @@ -103,7 +104,7 @@ class BrowserFetcher { this._product = (options.product || 'chromium').toLowerCase(); assert(this._product === 'chromium' || this._product === 'firefox', `Unkown product: "${options.product}"`); this._downloadsFolder = options.path || path.join(projectRoot, '.local-browser'); - this._downloadHost = options.host || DEFAULT_DOWNLOAD_HOST; + this._downloadHost = options.host || downloadURLs[this._product].host; this._platform = options.platform || ''; if (!this._platform) { const platform = os.platform(); diff --git a/experimental/puppeteer-firefox/package.json b/experimental/puppeteer-firefox/package.json index 18ba314f..10c12451 100644 --- a/experimental/puppeteer-firefox/package.json +++ b/experimental/puppeteer-firefox/package.json @@ -9,7 +9,7 @@ "node": ">=8.9.4" }, "puppeteer": { - "firefox_revision": "765beffcf39dc68cb2005b2b5343e283e26df7a3" + "firefox_revision": "v0.0.1" }, "scripts": { "install": "node install.js",