@google-cloud/common
Advanced tools
Comparing version 0.2.0 to 0.3.0
{ | ||
"name": "@google-cloud/common", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"author": "Google Inc.", | ||
@@ -39,3 +39,3 @@ "description": "Common components for Google Cloud APIs Node.js Client Libraries", | ||
], | ||
"repository": "googlecloudplatform/gcloud-node", | ||
"repository": "googlecloudplatform/google-cloud-node", | ||
"dependencies": { | ||
@@ -55,2 +55,3 @@ "array-uniq": "^1.0.2", | ||
"methmeth": "^1.0.0", | ||
"modelo": "^4.2.0", | ||
"request": "^2.70.0", | ||
@@ -57,0 +58,0 @@ "retry-request": "^1.3.0", |
@@ -151,3 +151,3 @@ /*! | ||
// any calls to that library from going through. | ||
// Reference: https://github.com/GoogleCloudPlatform/gcloud-node/pull/1137#issuecomment-193315047 | ||
// Reference: https://github.com/GoogleCloudPlatform/google-cloud-node/pull/1137#issuecomment-193315047 | ||
return global.GCLOUD_SANDBOX_ENV; | ||
@@ -177,8 +177,14 @@ } | ||
for (var protoServiceName in protoServices) { | ||
var protoService = this.loadProtoFile_( | ||
protoServices[protoServiceName], config); | ||
var self = this; | ||
this.protos[protoServiceName] = protoService; | ||
} | ||
Object.keys(protoServices).forEach(function(name) { | ||
var protoConfig = protoServices[name]; | ||
var service = self.loadProtoFile_(protoConfig, config); | ||
self.protos[name] = service; | ||
if (protoConfig.baseUrl) { | ||
service.baseUrl = protoConfig.baseUrl; | ||
} | ||
}); | ||
} | ||
@@ -336,3 +342,3 @@ | ||
// | ||
// https://github.com/GoogleCloudPlatform/gcloud-node/pull/1444#discussion_r71812636 | ||
// https://github.com/GoogleCloudPlatform/google-cloud-node/pull/1444#discussion_r71812636 | ||
var grcpStatus = GrpcService.decorateStatus_({ code: 0 }); | ||
@@ -683,3 +689,3 @@ | ||
return service[apiVersion]; | ||
return service[apiVersion] || service; | ||
}; | ||
@@ -708,3 +714,3 @@ | ||
service = new proto[protoOpts.service]( | ||
this.baseUrl, | ||
proto.baseUrl || this.baseUrl, | ||
this.grpcCredentials | ||
@@ -711,0 +717,0 @@ ); |
@@ -18,2 +18,8 @@ /*! | ||
/** | ||
* @type {module:common/grpcOperation} | ||
* @private | ||
*/ | ||
exports.GrpcOperation = require('./grpc-operation.js'); | ||
/** | ||
* @type {module:common/grpcService} | ||
@@ -20,0 +26,0 @@ * @private |
@@ -55,3 +55,3 @@ /** | ||
].join(' '), { | ||
baseUrl: 'https://googlecloudplatform.github.io/gcloud-node/#', | ||
baseUrl: 'https://googlecloudplatform.github.io/google-cloud-node/#', | ||
path: '/docs/guides/authentication' | ||
@@ -603,1 +603,27 @@ }); | ||
util.createLimiter = createLimiter; | ||
function isCustomType(unknown, module) { | ||
function getConstructorName(obj) { | ||
return obj.constructor && obj.constructor.name.toLowerCase(); | ||
} | ||
var moduleNameParts = module.split('/'); | ||
var parentModuleName = moduleNameParts[0] && moduleNameParts[0].toLowerCase(); | ||
var subModuleName = moduleNameParts[1] && moduleNameParts[1].toLowerCase(); | ||
if (subModuleName && getConstructorName(unknown) !== subModuleName) { | ||
return false; | ||
} | ||
var walkingModule = unknown; | ||
do { | ||
if (getConstructorName(walkingModule) === parentModuleName) { | ||
return true; | ||
} | ||
} while ((walkingModule = walkingModule.parent)); | ||
return false; | ||
} | ||
util.isCustomType = isCustomType; |
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
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
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
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
78487
12
2032
20
+ Addedmodelo@^4.2.0
+ Addedmodelo@4.2.3(transitive)