@google-cloud/recaptcha-enterprise
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -23,3 +23,3 @@ "use strict"; | ||
const gax = require("google-gax"); | ||
const path = require("path"); | ||
const jsonProtos = require("../../protos/protos.json"); | ||
/** | ||
@@ -120,9 +120,3 @@ * Client JSON configuration object, loaded from | ||
// Load the applicable protos. | ||
// For Node.js, pass the path to JSON proto file. | ||
// For browsers, pass the JSON content. | ||
const nodejsProtoPath = path.join(__dirname, '..', '..', 'protos', 'protos.json'); | ||
this._protos = this._gaxGrpc.loadProto(opts.fallback | ||
? // eslint-disable-next-line @typescript-eslint/no-var-requires | ||
require('../../protos/protos.json') | ||
: nodejsProtoPath); | ||
this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); | ||
// This API contains "path templates"; forward-slash-separated | ||
@@ -273,5 +267,6 @@ // identifiers to uniquely identify resources within the API. | ||
options.otherArgs.headers = options.otherArgs.headers || {}; | ||
options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ | ||
parent: request.parent || '', | ||
}); | ||
options.otherArgs.headers['x-goog-request-params'] = | ||
gax.routingHeader.fromParams({ | ||
parent: request.parent || '', | ||
}); | ||
this.initialize(); | ||
@@ -314,5 +309,6 @@ return this.innerApiCalls.createAssessment(request, options, callback); | ||
options.otherArgs.headers = options.otherArgs.headers || {}; | ||
options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ | ||
name: request.name || '', | ||
}); | ||
options.otherArgs.headers['x-goog-request-params'] = | ||
gax.routingHeader.fromParams({ | ||
name: request.name || '', | ||
}); | ||
this.initialize(); | ||
@@ -354,5 +350,6 @@ return this.innerApiCalls.annotateAssessment(request, options, callback); | ||
options.otherArgs.headers = options.otherArgs.headers || {}; | ||
options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ | ||
parent: request.parent || '', | ||
}); | ||
options.otherArgs.headers['x-goog-request-params'] = | ||
gax.routingHeader.fromParams({ | ||
parent: request.parent || '', | ||
}); | ||
this.initialize(); | ||
@@ -392,5 +389,6 @@ return this.innerApiCalls.createKey(request, options, callback); | ||
options.otherArgs.headers = options.otherArgs.headers || {}; | ||
options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ | ||
name: request.name || '', | ||
}); | ||
options.otherArgs.headers['x-goog-request-params'] = | ||
gax.routingHeader.fromParams({ | ||
name: request.name || '', | ||
}); | ||
this.initialize(); | ||
@@ -432,5 +430,6 @@ return this.innerApiCalls.getKey(request, options, callback); | ||
options.otherArgs.headers = options.otherArgs.headers || {}; | ||
options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ | ||
'key.name': request.key.name || '', | ||
}); | ||
options.otherArgs.headers['x-goog-request-params'] = | ||
gax.routingHeader.fromParams({ | ||
'key.name': request.key.name || '', | ||
}); | ||
this.initialize(); | ||
@@ -470,5 +469,6 @@ return this.innerApiCalls.updateKey(request, options, callback); | ||
options.otherArgs.headers = options.otherArgs.headers || {}; | ||
options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ | ||
name: request.name || '', | ||
}); | ||
options.otherArgs.headers['x-goog-request-params'] = | ||
gax.routingHeader.fromParams({ | ||
name: request.name || '', | ||
}); | ||
this.initialize(); | ||
@@ -517,5 +517,6 @@ return this.innerApiCalls.deleteKey(request, options, callback); | ||
options.otherArgs.headers = options.otherArgs.headers || {}; | ||
options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ | ||
parent: request.parent || '', | ||
}); | ||
options.otherArgs.headers['x-goog-request-params'] = | ||
gax.routingHeader.fromParams({ | ||
parent: request.parent || '', | ||
}); | ||
this.initialize(); | ||
@@ -554,5 +555,6 @@ return this.innerApiCalls.listKeys(request, options, callback); | ||
options.otherArgs.headers = options.otherArgs.headers || {}; | ||
options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ | ||
parent: request.parent || '', | ||
}); | ||
options.otherArgs.headers['x-goog-request-params'] = | ||
gax.routingHeader.fromParams({ | ||
parent: request.parent || '', | ||
}); | ||
const callSettings = new gax.CallSettings(options); | ||
@@ -598,5 +600,6 @@ this.initialize(); | ||
options.otherArgs.headers = options.otherArgs.headers || {}; | ||
options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ | ||
parent: request.parent || '', | ||
}); | ||
options.otherArgs.headers['x-goog-request-params'] = | ||
gax.routingHeader.fromParams({ | ||
parent: request.parent || '', | ||
}); | ||
options = options || {}; | ||
@@ -603,0 +606,0 @@ const callSettings = new gax.CallSettings(options); |
@@ -23,3 +23,3 @@ "use strict"; | ||
const gax = require("google-gax"); | ||
const path = require("path"); | ||
const jsonProtos = require("../../protos/protos.json"); | ||
/** | ||
@@ -120,9 +120,3 @@ * Client JSON configuration object, loaded from | ||
// Load the applicable protos. | ||
// For Node.js, pass the path to JSON proto file. | ||
// For browsers, pass the JSON content. | ||
const nodejsProtoPath = path.join(__dirname, '..', '..', 'protos', 'protos.json'); | ||
this._protos = this._gaxGrpc.loadProto(opts.fallback | ||
? // eslint-disable-next-line @typescript-eslint/no-var-requires | ||
require('../../protos/protos.json') | ||
: nodejsProtoPath); | ||
this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); | ||
// This API contains "path templates"; forward-slash-separated | ||
@@ -273,5 +267,6 @@ // identifiers to uniquely identify resources within the API. | ||
options.otherArgs.headers = options.otherArgs.headers || {}; | ||
options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ | ||
parent: request.parent || '', | ||
}); | ||
options.otherArgs.headers['x-goog-request-params'] = | ||
gax.routingHeader.fromParams({ | ||
parent: request.parent || '', | ||
}); | ||
this.initialize(); | ||
@@ -314,5 +309,6 @@ return this.innerApiCalls.createAssessment(request, options, callback); | ||
options.otherArgs.headers = options.otherArgs.headers || {}; | ||
options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ | ||
name: request.name || '', | ||
}); | ||
options.otherArgs.headers['x-goog-request-params'] = | ||
gax.routingHeader.fromParams({ | ||
name: request.name || '', | ||
}); | ||
this.initialize(); | ||
@@ -354,5 +350,6 @@ return this.innerApiCalls.annotateAssessment(request, options, callback); | ||
options.otherArgs.headers = options.otherArgs.headers || {}; | ||
options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ | ||
parent: request.parent || '', | ||
}); | ||
options.otherArgs.headers['x-goog-request-params'] = | ||
gax.routingHeader.fromParams({ | ||
parent: request.parent || '', | ||
}); | ||
this.initialize(); | ||
@@ -392,5 +389,6 @@ return this.innerApiCalls.createKey(request, options, callback); | ||
options.otherArgs.headers = options.otherArgs.headers || {}; | ||
options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ | ||
name: request.name || '', | ||
}); | ||
options.otherArgs.headers['x-goog-request-params'] = | ||
gax.routingHeader.fromParams({ | ||
name: request.name || '', | ||
}); | ||
this.initialize(); | ||
@@ -432,5 +430,6 @@ return this.innerApiCalls.getKey(request, options, callback); | ||
options.otherArgs.headers = options.otherArgs.headers || {}; | ||
options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ | ||
'key.name': request.key.name || '', | ||
}); | ||
options.otherArgs.headers['x-goog-request-params'] = | ||
gax.routingHeader.fromParams({ | ||
'key.name': request.key.name || '', | ||
}); | ||
this.initialize(); | ||
@@ -470,5 +469,6 @@ return this.innerApiCalls.updateKey(request, options, callback); | ||
options.otherArgs.headers = options.otherArgs.headers || {}; | ||
options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ | ||
name: request.name || '', | ||
}); | ||
options.otherArgs.headers['x-goog-request-params'] = | ||
gax.routingHeader.fromParams({ | ||
name: request.name || '', | ||
}); | ||
this.initialize(); | ||
@@ -517,5 +517,6 @@ return this.innerApiCalls.deleteKey(request, options, callback); | ||
options.otherArgs.headers = options.otherArgs.headers || {}; | ||
options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ | ||
parent: request.parent || '', | ||
}); | ||
options.otherArgs.headers['x-goog-request-params'] = | ||
gax.routingHeader.fromParams({ | ||
parent: request.parent || '', | ||
}); | ||
this.initialize(); | ||
@@ -554,5 +555,6 @@ return this.innerApiCalls.listKeys(request, options, callback); | ||
options.otherArgs.headers = options.otherArgs.headers || {}; | ||
options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ | ||
parent: request.parent || '', | ||
}); | ||
options.otherArgs.headers['x-goog-request-params'] = | ||
gax.routingHeader.fromParams({ | ||
parent: request.parent || '', | ||
}); | ||
const callSettings = new gax.CallSettings(options); | ||
@@ -598,5 +600,6 @@ this.initialize(); | ||
options.otherArgs.headers = options.otherArgs.headers || {}; | ||
options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ | ||
parent: request.parent || '', | ||
}); | ||
options.otherArgs.headers['x-goog-request-params'] = | ||
gax.routingHeader.fromParams({ | ||
parent: request.parent || '', | ||
}); | ||
options = options || {}; | ||
@@ -603,0 +606,0 @@ const callSettings = new gax.CallSettings(options); |
@@ -7,2 +7,10 @@ # Changelog | ||
### [2.1.1](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v2.1.0...v2.1.1) (2021-05-12) | ||
### Bug Fixes | ||
* **deps:** require google-gax v2.12.0 ([#270](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/270)) ([ab16a25](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/ab16a254b7da037039a51277495e65bbc983f1c7)) | ||
* use require() to load JSON protos ([#273](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/273)) ([fdbc0fe](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/fdbc0fe7d12c1f70f3f592028c30c455a1526ee2)) | ||
## [2.1.0](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v2.0.3...v2.1.0) (2021-01-07) | ||
@@ -9,0 +17,0 @@ |
{ | ||
"repository": "googleapis/nodejs-recaptcha-enterprise", | ||
"name": "@google-cloud/recaptcha-enterprise", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"author": "Google LLC", | ||
@@ -28,3 +28,3 @@ "description": "reCAPTCHA Enterprise API client for Node.js", | ||
"dependencies": { | ||
"google-gax": "^2.9.2" | ||
"google-gax": "^2.12.0" | ||
}, | ||
@@ -34,3 +34,3 @@ "devDependencies": { | ||
"@types/node": "^12.0.0", | ||
"@types/sinon": "^9.0.0", | ||
"@types/sinon": "^10.0.0", | ||
"c8": "^7.0.0", | ||
@@ -45,4 +45,4 @@ "gts": "^2.0.0", | ||
"pack-n-play": "^1.0.0-2", | ||
"sinon": "^9.0.1", | ||
"ts-loader": "^8.0.0", | ||
"sinon": "^10.0.0", | ||
"ts-loader": "^9.0.0", | ||
"typescript": "^3.8.3", | ||
@@ -49,0 +49,0 @@ "webpack": "^5.0.0", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1814653
29236
Updatedgoogle-gax@^2.12.0