diff --git a/index.js b/index.js index 0030f33..156afdd 100755 --- a/index.js +++ b/index.js @@ -1,17 +1,15 @@ 'use strict'; -const {google} = require('googleapis'); -const pify = require('pify'); +const google = require('googleapis'); const output = require('./lib/output'); const {getOptions} = require('./lib/options-handler'); - -const {runpagespeed} = pify(google.pagespeedonline('v5').pagespeedapi); +const pagespeedonline = new google.pagespeedonline_v5.Pagespeedonline(); const psi = (url, options) => Promise.resolve().then(() => { if (!url) { throw new Error('URL required'); } - return runpagespeed(getOptions(url, options)); + return pagespeedonline.pagespeedapi.runpagespeed(getOptions(url, options)); }); module.exports = psi; diff --git a/package.json b/package.json index ca1d11f..1e702b0 100644 --- a/package.json +++ b/package.json @@ -34,10 +34,9 @@ ], "dependencies": { "chalk": "^2.4.2", - "googleapis": "^38.0.0", + "googleapis": "^47.0.0", "humanize-url": "^2.1.0", "meow": "^5.0.0", - "pify": "^4.0.0", "prepend-http": "^2.0.0", "pretty-ms": "^4.0.0", "sort-on": "^3.0.0",