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

@google-cloud/profiler

Package Overview
Dependencies
Maintainers
5
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@google-cloud/profiler - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1-alpha.0

20

out/src/profiler.js

@@ -52,6 +52,10 @@ "use strict";

/**
* @return the message of the response body, if that field exists. Otherwise,
* returns the response status message.
* @return the error's message, if present. Otherwise returns the
* message of the response body, if that field exists, or the response status
* message.
*/
function getResponseErrorMessage(response) {
function getResponseErrorMessage(response, err) {
if (err && err.message) {
return err.message;
}
// tslint:disable-next-line: no-any

@@ -68,3 +72,3 @@ const body = response.body;

*/
function getServerResponseBackoff(response) {
function getServerResponseBackoff(response, err) {
// The response currently does not have field containing the server-specified

@@ -75,3 +79,3 @@ // backoff. As a workaround, response body's message is parsed to get the

// body.error.details.
const message = getResponseErrorMessage(response);
const message = getResponseErrorMessage(response, err);
if (message) {

@@ -187,4 +191,4 @@ return parseBackoffDuration(message);

if (response && isErrorResponseStatusCode(response.statusCode)) {
const message = getResponseErrorMessage(response);
const delayMillis = getServerResponseBackoff(response);
const message = getResponseErrorMessage(response, err);
const delayMillis = getServerResponseBackoff(response, err);
if (delayMillis) {

@@ -390,3 +394,3 @@ throw new BackoffResponseError(message, delayMillis);

try {
const res = yield this.request(options);
const [, res] = yield this.request(options);
if (isErrorResponseStatusCode(res.statusCode)) {

@@ -393,0 +397,0 @@ let message = res.statusCode;

24

package.json
{
"name": "@google-cloud/profiler",
"version": "1.0.0",
"version": "1.0.1-alpha.0",
"description": "Adds support for Stackdriver Profiler to Node.js applications",

@@ -9,3 +9,3 @@ "repository": "googleapis/cloud-profiler-nodejs",

"scripts": {
"install": "node-pre-gyp install --build-from-source",
"install": "node-pre-gyp install --fallback-to-build",
"test": "nyc mocha out/test/test-*.js",

@@ -27,3 +27,5 @@ "system-test": "nyc --no-clean mocha out/system-test/test-*.js --timeout=60000",

"proto:profiler": "mkdir -p proto && pbjs -t static-module -w commonjs -o proto/profiler.js third_party/googleapis/google/devtools/cloudprofiler/v2/profiler.proto && pbts -o proto/profiler.d.ts proto/profiler.js",
"license-check": "jsgl --local ."
"license-check": "jsgl --local .",
"docs-test": "linkinator docs -r --skip www.googleapis.com",
"predocs-test": "npm run docs"
},

@@ -35,3 +37,3 @@ "author": {

"dependencies": {
"@google-cloud/common": "^0.27.0",
"@google-cloud/common": "^0.31.0",
"@types/console-log-level": "^1.4.0",

@@ -44,5 +46,5 @@ "@types/semver": "^5.5.0",

"findit2": "^2.2.3",
"gcp-metadata": "^0.9.0",
"gcp-metadata": "^1.0.0",
"lodash.pickby": "^4.6.0",
"nan": "^2.12.0",
"nan": "^2.12.1",
"node-pre-gyp": "^0.12.0",

@@ -71,3 +73,3 @@ "p-limit": "^2.0.0",

"@types/sinon": "^7.0.3",
"@types/tmp": "0.0.33",
"@types/tmp": "0.0.34",
"codecov": "^3.0.0",

@@ -78,3 +80,3 @@ "deep-copy": "^1.4.2",

"js-green-licenses": "^0.5.0",
"mocha": "^5.0.0",
"mocha": "^6.0.0",
"nock": "^10.0.0",

@@ -86,3 +88,4 @@ "nyc": "^13.0.0",

"ts-mockito": "^2.2.5",
"typescript": "~3.2.0"
"typescript": "~3.3.0",
"linkinator": "^1.1.2"
},

@@ -112,5 +115,6 @@ "files": [

"module_path": "./build/{node_abi}-{platform}-{arch}-{libc}",
"host": "https://storage.googleapis.com/cloud-profiler-e2e/cprof-e2e-artifacts/nodejs/release",
"host": "https://storage.googleapis.com/cloud-profiler/nodejs/release",
"remote_path": "v{version}",
"package_name": "{node_abi}-{platform}-{arch}-{libc}.tar.gz"
}
}

@@ -224,3 +224,3 @@ # Google Cloud Profiler

[Application Default Credentials][app-default-credentials]. This is the
reccomended method.
recommended method.
1. [Create a new JSON service account key][service-account].

@@ -227,0 +227,0 @@ 2. Copy the key somewhere your application can access it. Be sure not

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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