@google-cloud/org-policy
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -23,3 +23,3 @@ "use strict"; | ||
const gax = require("google-gax"); | ||
const path = require("path"); | ||
const jsonProtos = require("../../protos/protos.json"); | ||
/** | ||
@@ -138,9 +138,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 | ||
@@ -296,5 +290,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({ | ||
name: request.name || '', | ||
}); | ||
options.otherArgs.headers['x-goog-request-params'] = | ||
gax.routingHeader.fromParams({ | ||
name: request.name || '', | ||
}); | ||
this.initialize(); | ||
@@ -338,5 +333,6 @@ return this.innerApiCalls.getPolicy(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(); | ||
@@ -387,5 +383,6 @@ return this.innerApiCalls.getEffectivePolicy(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(); | ||
@@ -432,5 +429,6 @@ return this.innerApiCalls.createPolicy(request, options, callback); | ||
options.otherArgs.headers = options.otherArgs.headers || {}; | ||
options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ | ||
'policy.name': request.policy.name || '', | ||
}); | ||
options.otherArgs.headers['x-goog-request-params'] = | ||
gax.routingHeader.fromParams({ | ||
'policy.name': request.policy.name || '', | ||
}); | ||
this.initialize(); | ||
@@ -473,5 +471,6 @@ return this.innerApiCalls.updatePolicy(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(); | ||
@@ -525,5 +524,6 @@ return this.innerApiCalls.deletePolicy(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(); | ||
@@ -567,5 +567,6 @@ return this.innerApiCalls.listConstraints(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); | ||
@@ -616,5 +617,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 || {}; | ||
@@ -671,5 +673,6 @@ const callSettings = new gax.CallSettings(options); | ||
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(); | ||
@@ -714,5 +717,6 @@ return this.innerApiCalls.listPolicies(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); | ||
@@ -764,5 +768,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 || {}; | ||
@@ -769,0 +774,0 @@ const callSettings = new gax.CallSettings(options); |
# Changelog | ||
### [1.0.1](https://www.github.com/googleapis/nodejs-org-policy/compare/v1.0.0...v1.0.1) (2021-05-12) | ||
### Bug Fixes | ||
* **deps:** require google-gax v2.12.0 ([#22](https://www.github.com/googleapis/nodejs-org-policy/issues/22)) ([6cedadc](https://www.github.com/googleapis/nodejs-org-policy/commit/6cedadc06a04f7ab6fe0f9c0610ad4caef9be2d6)) | ||
* use require() to load JSON protos ([#25](https://www.github.com/googleapis/nodejs-org-policy/issues/25)) ([56ff04c](https://www.github.com/googleapis/nodejs-org-policy/commit/56ff04c79de8be8a6d7554732b5e92d37a08440c)) | ||
## 1.0.0 (2021-02-24) | ||
@@ -4,0 +12,0 @@ |
{ | ||
"name": "@google-cloud/org-policy", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Org policy client for Node.js", | ||
@@ -42,3 +42,3 @@ "repository": "googleapis/nodejs-org-policy", | ||
"dependencies": { | ||
"google-gax": "^2.9.2" | ||
"google-gax": "^2.12.0" | ||
}, | ||
@@ -48,3 +48,3 @@ "devDependencies": { | ||
"@types/node": "^14.14.10", | ||
"@types/sinon": "^9.0.9", | ||
"@types/sinon": "^10.0.0", | ||
"c8": "^7.3.5", | ||
@@ -59,4 +59,4 @@ "gts": "^3.0.3", | ||
"pack-n-play": "^1.0.0-2", | ||
"sinon": "^9.2.1", | ||
"ts-loader": "^8.0.11", | ||
"sinon": "^10.0.0", | ||
"ts-loader": "^9.0.0", | ||
"typescript": "^4.1.2", | ||
@@ -63,0 +63,0 @@ "webpack": "^5.9.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 not supported yet
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
1345034
22426
Updatedgoogle-gax@^2.12.0