Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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 3.1.1 to 3.2.0

15

build/src/apirequest.d.ts

@@ -1,16 +0,1 @@

/**
* Copyright 2016 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { GaxiosPromise } from 'gaxios';

@@ -17,0 +2,0 @@ import { APIRequestParams, BodyResponseCallback } from './api';

61

build/src/apirequest.js
"use strict";
/**
* Copyright 2016 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2016 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });

@@ -52,3 +50,2 @@ const google_auth_library_1 = require("google-auth-library");

async function createAPIRequestAsync(parameters) {
let params = parameters.params;
const options = Object.assign({}, parameters.options);

@@ -58,3 +55,3 @@ // Create a new params object so it can no longer be modified from outside

// overriden per-request
const topOptions = parameters.context.google &&
const globalParams = parameters.context.google &&
parameters.context.google._options &&

@@ -64,7 +61,24 @@ parameters.context.google._options.params

: {};
params = Object.assign({}, // New base object
topOptions, // Global params
parameters.context._options.params, // Per-client params
params // API call params
const clientParams = parameters.context &&
parameters.context._options &&
parameters.context._options.params
? parameters.context._options.params
: {};
const params = Object.assign({}, // New base object
globalParams, // Global params
clientParams, // Per-client params
parameters.params // API call params
);
// Check for user specified user agents at all levels of config
const userAgentGlobal = parameters.context.google &&
parameters.context.google._options &&
parameters.context.google._options.userAgentDirectives
? parameters.context.google._options.userAgentDirectives
: [];
const userAgentClient = parameters.context &&
parameters.context._options &&
parameters.context._options.userAgentDirectives
? parameters.context._options.userAgentDirectives
: [];
const userAgentDirectives = Object.assign([], userAgentGlobal, userAgentClient, parameters.options.userAgentDirectives) || [];
const media = params.media || {};

@@ -214,4 +228,3 @@ /**

options.headers['Accept-Encoding'] = 'gzip';
const directives = options.userAgentDirectives || [];
directives.push({
userAgentDirectives.push({
product: 'google-api-nodejs-client',

@@ -221,3 +234,3 @@ version: pkg.version,

});
const userAgent = directives
const userAgent = userAgentDirectives
.map(d => {

@@ -224,0 +237,0 @@ let line = `${d.product}/${d.version}`;

@@ -1,16 +0,1 @@

/**
* Copyright 2019 Google LLC. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export declare function isBrowser(): boolean;
"use strict";
/**
* Copyright 2019 Google LLC. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });

@@ -18,0 +16,0 @@ function isBrowser() {

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

## [3.2.0](https://www.github.com/googleapis/nodejs-googleapis-common/compare/v3.1.1...v3.2.0) (2019-12-05)
### Features
* **deps:** auth adds support for additional headers ([#195](https://www.github.com/googleapis/nodejs-googleapis-common/issues/195)) ([1e21283](https://www.github.com/googleapis/nodejs-googleapis-common/commit/1e212838695a6dab9d432e73ca7b014845929f50))
### Bug Fixes
* **deps:** pin TypeScript below 3.7.0 ([1a796e7](https://www.github.com/googleapis/nodejs-googleapis-common/commit/1a796e7d1fd98f2f3c0a38a78fc4f8845b416505))
* **docs:** add jsdoc-region-tag plugin ([#185](https://www.github.com/googleapis/nodejs-googleapis-common/issues/185)) ([eddca9f](https://www.github.com/googleapis/nodejs-googleapis-common/commit/eddca9f48a8f7024ae507f7bbce8ceb18adc8f52))
* include user agent for global and service level options ([#193](https://www.github.com/googleapis/nodejs-googleapis-common/issues/193)) ([c878f9c](https://www.github.com/googleapis/nodejs-googleapis-common/commit/c878f9cad06f932d8849e7db44ca9b0cea4900e3))
### [3.1.1](https://www.github.com/googleapis/nodejs-googleapis-common/compare/v3.1.0...v3.1.1) (2019-10-08)

@@ -9,0 +23,0 @@

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

@@ -66,6 +66,6 @@ "repository": "googleapis/nodejs-googleapis-common",

"nyc": "^14.1.1",
"puppeteer": "^1.18.1",
"puppeteer": "^2.0.0",
"source-map-support": "^0.5.12",
"ts-loader": "^6.0.4",
"typescript": "~3.6.0",
"typescript": "3.6.4",
"webpack": "^4.35.0",

@@ -77,3 +77,3 @@ "webpack-cli": "^3.3.5"

"gaxios": "^2.0.1",
"google-auth-library": "^5.2.0",
"google-auth-library": "^5.6.1",
"qs": "^6.7.0",

@@ -80,0 +80,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