Socket
Socket
Sign inDemoInstall

googleapis-common

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

googleapis-common - npm Package Compare versions

Comparing version 2.0.4 to 3.0.0

15

build/src/authplus.d.ts

@@ -1,2 +0,2 @@

import { Compute, GoogleAuth, JWT, OAuth2Client } from 'google-auth-library';
import { Compute, GoogleAuth, GoogleAuthOptions, JWT, OAuth2Client, ProjectIdCallback, UserRefreshClient } from 'google-auth-library';
export declare class AuthPlus extends GoogleAuth {

@@ -6,2 +6,15 @@ JWT: typeof JWT;

OAuth2: typeof OAuth2Client;
GoogleAuth: typeof GoogleAuth;
private _cachedAuth?;
/**
* Override getClient(), memoizing an instance of auth for
* subsequent calls to getProjectId().
*/
getClient(options?: GoogleAuthOptions): Promise<Compute | JWT | UserRefreshClient>;
/**
* Override getProjectId(), using the most recently configured
* auth instance when fetching projectId.
*/
getProjectId(): Promise<string>;
getProjectId(callback: ProjectIdCallback): void;
}

@@ -25,5 +25,27 @@ "use strict";

this.OAuth2 = google_auth_library_1.OAuth2Client;
// tslint:disable-next-line: variable-name
this.GoogleAuth = google_auth_library_1.GoogleAuth;
}
/**
* Override getClient(), memoizing an instance of auth for
* subsequent calls to getProjectId().
*/
async getClient(options) {
this._cachedAuth = new google_auth_library_1.GoogleAuth(options);
return this._cachedAuth.getClient();
}
getProjectId(callback) {
if (callback) {
return this._cachedAuth
? this._cachedAuth.getProjectId(callback)
: super.getProjectId(callback);
}
else {
return this._cachedAuth
? this._cachedAuth.getProjectId()
: super.getProjectId();
}
}
}
exports.AuthPlus = AuthPlus;
//# sourceMappingURL=authplus.js.map

@@ -7,2 +7,13 @@ # Changelog

## [3.0.0](https://www.github.com/googleapis/nodejs-googleapis-common/compare/v2.0.4...v3.0.0) (2019-07-24)
### ⚠ BREAKING CHANGES
* pulls in breaking API changes in google-auth-library. getProjectId() and getProjectId() have been modified to make the impact of these changes less noticeable on the legacy googleapis module (getClient() is idempotent, but getProjectId() will use the last configuration).
### Features
* expose GoogleAuth constructor on AuthPlus class ([#154](https://www.github.com/googleapis/nodejs-googleapis-common/issues/154)) ([7d7a961](https://www.github.com/googleapis/nodejs-googleapis-common/commit/7d7a961))
### [2.0.4](https://www.github.com/googleapis/nodejs-googleapis-common/compare/v2.0.3...v2.0.4) (2019-07-01)

@@ -9,0 +20,0 @@

4

package.json
{
"name": "googleapis-common",
"version": "2.0.4",
"version": "3.0.0",
"description": "A common tooling library used by the googleapis npm module. You probably don't want to use this directly.",

@@ -76,3 +76,3 @@ "repository": "googleapis/nodejs-googleapis-common",

"gaxios": "^2.0.1",
"google-auth-library": "^4.2.5",
"google-auth-library": "^5.1.0",
"qs": "^6.7.0",

@@ -79,0 +79,0 @@ "url-template": "^2.0.8",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc