@google-cloud/projectify
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -17,12 +17,2 @@ "use strict"; | ||
*/ | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
return function (d, b) { | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -41,7 +31,8 @@ /** | ||
if (Array.isArray(value)) { | ||
value = value.map(function (v) { return replaceProjectIdToken(v, projectId); }); | ||
value = value.map(v => replaceProjectIdToken(v, projectId)); | ||
} | ||
if (value !== null && typeof value === 'object' && | ||
!(value instanceof Buffer) && | ||
typeof value.hasOwnProperty === 'function') { | ||
for (var opt in value) { | ||
for (const opt in value) { | ||
if (value.hasOwnProperty(opt)) { | ||
@@ -65,12 +56,11 @@ value[opt] = replaceProjectIdToken(value[opt], projectId); | ||
*/ | ||
var MissingProjectIdError = /** @class */ (function (_super) { | ||
__extends(MissingProjectIdError, _super); | ||
function MissingProjectIdError() { | ||
var _this = _super !== null && _super.apply(this, arguments) || this; | ||
_this.message = "Sorry, we cannot connect to Cloud Services without a project\n ID. You may specify one with an environment variable named\n \"GOOGLE_CLOUD_PROJECT\".".replace(/ +/g, ' '); | ||
return _this; | ||
class MissingProjectIdError extends Error { | ||
constructor() { | ||
super(...arguments); | ||
this.message = `Sorry, we cannot connect to Cloud Services without a project | ||
ID. You may specify one with an environment variable named | ||
"GOOGLE_CLOUD_PROJECT".`.replace(/ +/g, ' '); | ||
} | ||
return MissingProjectIdError; | ||
}(Error)); | ||
} | ||
exports.MissingProjectIdError = MissingProjectIdError; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@google-cloud/projectify", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "A simple utility for replacing the projectid token in objects.", | ||
"main": "build/src/index.js", | ||
"types": "build/src/index.d.ts", | ||
"repository": "googleapis/nodejs-projectify", | ||
"scripts": { | ||
@@ -11,3 +12,3 @@ "test-only": "nyc mocha build/test", | ||
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json", | ||
"check": "gts check", | ||
"lint": "gts check", | ||
"clean": "gts clean", | ||
@@ -18,7 +19,12 @@ "compile": "tsc -p .", | ||
"pretest": "npm run compile", | ||
"posttest": "npm run check" | ||
"posttest": "npm run lint", | ||
"docs": "echo no docs 👻", | ||
"presystem-test": "npm run compile", | ||
"samples-test": "cd samples/ && npm link ../ && npm test && cd ../", | ||
"system-test": "mocha build/system-test" | ||
}, | ||
"keywords": [], | ||
"files": [ | ||
"build/src" | ||
"build/src", | ||
"!build/src/**/*.map" | ||
], | ||
@@ -31,8 +37,9 @@ "author": "Google Inc.", | ||
"codecov": "^3.0.4", | ||
"gts": "^0.7.1", | ||
"gts": "^0.8.0", | ||
"hard-rejection": "^1.0.0", | ||
"intelli-espower-loader": "^1.0.1", | ||
"mocha": "^5.2.0", | ||
"nyc": "^12.0.2", | ||
"nyc": "^13.0.0", | ||
"source-map-support": "^0.5.6", | ||
"typescript": "^2.9.0" | ||
"typescript": "^3.0.0" | ||
}, | ||
@@ -39,0 +46,0 @@ "nyc": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
20140
0
10
93