Socket
Socket
Sign inDemoInstall

@google-cloud/common

Package Overview
Dependencies
Maintainers
1
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@google-cloud/common - npm Package Compare versions

Comparing version 2.0.5 to 2.1.0

2

build/src/service-object.d.ts

@@ -18,3 +18,3 @@ /*!

import { EventEmitter } from 'events';
import * as r from 'request';
import * as r from 'teeny-request';
import { ApiError, BodyResponseCallback, DecorateRequestOptions } from './util';

@@ -21,0 +21,0 @@ export declare type RequestResponse = [Metadata, r.Response];

@@ -17,3 +17,3 @@ /*!

import { GoogleAuth, GoogleAuthOptions } from 'google-auth-library';
import * as r from 'request';
import * as r from 'teeny-request';
import { Interceptor } from './service-object';

@@ -50,2 +50,3 @@ import { BodyResponseCallback, DecorateRequestOptions, MakeAuthenticatedRequest, PackageJson } from './util';

token?: string;
timeout?: number;
}

@@ -64,2 +65,3 @@ export declare class Service {

readonly apiEndpoint: string;
timeout: number;
/**

@@ -66,0 +68,0 @@ * Service is a base class, meant to be inherited from by a "service," like

@@ -44,2 +44,3 @@ "use strict";

this.apiEndpoint = config.apiEndpoint;
this.timeout = options.timeout;
this.globalInterceptors = arrify(options.interceptors_);

@@ -86,3 +87,3 @@ this.interceptors = [];

request_(reqOpts, callback) {
reqOpts = extend(true, {}, reqOpts);
reqOpts = extend(true, {}, reqOpts, { timeout: this.timeout });
const isAbsoluteUrl = reqOpts.uri.indexOf('http') === 0;

@@ -89,0 +90,0 @@ const uriComponents = [this.baseUrl];

@@ -18,4 +18,4 @@ /**

import { GoogleAuth, GoogleAuthOptions } from 'google-auth-library';
import { CredentialBody } from 'google-auth-library/build/src/auth/credentials';
import * as r from 'request';
import { CredentialBody } from 'google-auth-library';
import * as r from 'teeny-request';
import { Duplex, DuplexOptions, Readable, Writable } from 'stream';

@@ -22,0 +22,0 @@ import { Interceptor } from './service-object';

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

## [2.1.0](https://www.github.com/googleapis/nodejs-common/compare/v2.0.5...v2.1.0) (2019-08-05)
### Bug Fixes
* **deps:** upgrade to the latest version of teeny-request ([#448](https://www.github.com/googleapis/nodejs-common/issues/448)) ([bb76f07](https://www.github.com/googleapis/nodejs-common/commit/bb76f07))
### Features
* adds timeout to options and use it in reqOpts ([#455](https://www.github.com/googleapis/nodejs-common/issues/455)) ([90a6097](https://www.github.com/googleapis/nodejs-common/commit/90a6097))
### [2.0.5](https://www.github.com/googleapis/nodejs-common/compare/v2.0.4...v2.0.5) (2019-07-29)

@@ -9,0 +21,0 @@

{
"name": "@google-cloud/common",
"description": "Common components for Cloud APIs Node.js Client Libraries",
"version": "2.0.5",
"version": "2.1.0",
"license": "Apache-2.0",

@@ -36,3 +36,2 @@ "author": "Google Inc.",

"@google-cloud/promisify": "^1.0.0",
"@types/request": "^2.48.1",
"arrify": "^2.0.0",

@@ -44,3 +43,3 @@ "duplexify": "^3.6.0",

"retry-request": "^4.0.0",
"teeny-request": "^4.0.0"
"teeny-request": "^5.1.1"
},

@@ -57,2 +56,3 @@ "devDependencies": {

"@types/proxyquire": "^1.3.28",
"@types/request": "^2.48.1",
"@types/sinon": "^7.0.10",

@@ -59,0 +59,0 @@ "@types/tmp": "0.1.0",

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