@google-cloud/run
Advanced tools
Comparing version 0.1.1 to 0.2.0
@@ -37,3 +37,3 @@ /// <reference types="node" /> | ||
* The options accepted by the constructor are described in detail | ||
* in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). | ||
* in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). | ||
* The common options are: | ||
@@ -61,7 +61,6 @@ * @param {object} [options.credentials] - Credentials object. | ||
* Follows the structure of {@link gapicConfig}. | ||
* @param {boolean} [options.fallback] - Use HTTP fallback mode. | ||
* In fallback mode, a special browser-compatible transport implementation is used | ||
* instead of gRPC transport. In browser context (if the `window` object is defined) | ||
* the fallback mode is enabled automatically; set `options.fallback` to `false` | ||
* if you need to override this behavior. | ||
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. | ||
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC. | ||
* For more information, please check the | ||
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. | ||
*/ | ||
@@ -68,0 +67,0 @@ constructor(opts?: ClientOptions); |
@@ -43,3 +43,3 @@ "use strict"; | ||
* The options accepted by the constructor are described in detail | ||
* in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). | ||
* in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). | ||
* The common options are: | ||
@@ -67,7 +67,6 @@ * @param {object} [options.credentials] - Credentials object. | ||
* Follows the structure of {@link gapicConfig}. | ||
* @param {boolean} [options.fallback] - Use HTTP fallback mode. | ||
* In fallback mode, a special browser-compatible transport implementation is used | ||
* instead of gRPC transport. In browser context (if the `window` object is defined) | ||
* the fallback mode is enabled automatically; set `options.fallback` to `false` | ||
* if you need to override this behavior. | ||
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. | ||
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC. | ||
* For more information, please check the | ||
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. | ||
*/ | ||
@@ -150,7 +149,25 @@ constructor(opts) { | ||
// rather than holding a request open. | ||
this.operationsClient = this._gaxModule | ||
.lro({ | ||
const lroOptions = { | ||
auth: this.auth, | ||
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, | ||
}) | ||
}; | ||
if (opts.fallback === 'rest') { | ||
lroOptions.protoJson = protoFilesRoot; | ||
lroOptions.httpRules = [ | ||
{ | ||
selector: 'google.longrunning.Operations.DeleteOperation', | ||
delete: '/v2/{name=projects/*/locations/*/operations/*}', | ||
}, | ||
{ | ||
selector: 'google.longrunning.Operations.GetOperation', | ||
get: '/v2/{name=projects/*/locations/*/operations/*}', | ||
}, | ||
{ | ||
selector: 'google.longrunning.Operations.ListOperations', | ||
get: '/v2/{name=projects/*/locations/*}/operations', | ||
}, | ||
]; | ||
} | ||
this.operationsClient = this._gaxModule | ||
.lro(lroOptions) | ||
.operationsClient(opts); | ||
@@ -157,0 +174,0 @@ const deleteRevisionResponse = protoFilesRoot.lookup('.google.cloud.run.v2.Revision'); |
@@ -37,3 +37,3 @@ /// <reference types="node" /> | ||
* The options accepted by the constructor are described in detail | ||
* in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). | ||
* in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). | ||
* The common options are: | ||
@@ -61,7 +61,6 @@ * @param {object} [options.credentials] - Credentials object. | ||
* Follows the structure of {@link gapicConfig}. | ||
* @param {boolean} [options.fallback] - Use HTTP fallback mode. | ||
* In fallback mode, a special browser-compatible transport implementation is used | ||
* instead of gRPC transport. In browser context (if the `window` object is defined) | ||
* the fallback mode is enabled automatically; set `options.fallback` to `false` | ||
* if you need to override this behavior. | ||
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. | ||
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC. | ||
* For more information, please check the | ||
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. | ||
*/ | ||
@@ -68,0 +67,0 @@ constructor(opts?: ClientOptions); |
@@ -43,3 +43,3 @@ "use strict"; | ||
* The options accepted by the constructor are described in detail | ||
* in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). | ||
* in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). | ||
* The common options are: | ||
@@ -67,7 +67,6 @@ * @param {object} [options.credentials] - Credentials object. | ||
* Follows the structure of {@link gapicConfig}. | ||
* @param {boolean} [options.fallback] - Use HTTP fallback mode. | ||
* In fallback mode, a special browser-compatible transport implementation is used | ||
* instead of gRPC transport. In browser context (if the `window` object is defined) | ||
* the fallback mode is enabled automatically; set `options.fallback` to `false` | ||
* if you need to override this behavior. | ||
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. | ||
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC. | ||
* For more information, please check the | ||
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. | ||
*/ | ||
@@ -149,7 +148,25 @@ constructor(opts) { | ||
// rather than holding a request open. | ||
this.operationsClient = this._gaxModule | ||
.lro({ | ||
const lroOptions = { | ||
auth: this.auth, | ||
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, | ||
}) | ||
}; | ||
if (opts.fallback === 'rest') { | ||
lroOptions.protoJson = protoFilesRoot; | ||
lroOptions.httpRules = [ | ||
{ | ||
selector: 'google.longrunning.Operations.DeleteOperation', | ||
delete: '/v2/{name=projects/*/locations/*/operations/*}', | ||
}, | ||
{ | ||
selector: 'google.longrunning.Operations.GetOperation', | ||
get: '/v2/{name=projects/*/locations/*/operations/*}', | ||
}, | ||
{ | ||
selector: 'google.longrunning.Operations.ListOperations', | ||
get: '/v2/{name=projects/*/locations/*}/operations', | ||
}, | ||
]; | ||
} | ||
this.operationsClient = this._gaxModule | ||
.lro(lroOptions) | ||
.operationsClient(opts); | ||
@@ -398,2 +415,3 @@ const createServiceResponse = protoFilesRoot.lookup('.google.cloud.run.v2.Service'); | ||
updateService(request, optionsOrCallback, callback) { | ||
var _a, _b, _c; | ||
request = request || {}; | ||
@@ -412,7 +430,6 @@ let options; | ||
const routingParameter = {}; | ||
const reqService = request.service || {}; | ||
if (typeof reqService.name !== 'undefined' && | ||
RegExp('projects/[^/]+/locations/(?<location>[^/]+)(?:/.*)?').test(reqService.name)) { | ||
if (typeof ((_a = request.service) === null || _a === void 0 ? void 0 : _a.name) !== 'undefined' && | ||
RegExp('projects/[^/]+/locations/(?<location>[^/]+)(?:/.*)?').test((_b = request.service) === null || _b === void 0 ? void 0 : _b.name)) { | ||
Object.assign(routingParameter, { | ||
location: reqService.name.match(RegExp('(?<location>[^/]+)'))[0], | ||
location: (_c = request.service) === null || _c === void 0 ? void 0 : _c.name.match(RegExp('(?<location>[^/]+)'))[0], | ||
}); | ||
@@ -419,0 +436,0 @@ } |
# Changelog | ||
## [0.2.0](https://github.com/googleapis/nodejs-run/compare/v0.1.1...v0.2.0) (2022-07-04) | ||
### Features | ||
* support regapic LRO ([2d5a647](https://github.com/googleapis/nodejs-run/commit/2d5a647625f1ecd020f36e6e5e09c92a4f47f304)) | ||
## [0.1.1](https://github.com/googleapis/nodejs-run/compare/v0.1.0...v0.1.1) (2022-06-02) | ||
@@ -4,0 +11,0 @@ |
{ | ||
"name": "@google-cloud/run", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"description": "Cloud Run Admin API", | ||
@@ -48,6 +48,6 @@ "repository": "googleapis/nodejs-run", | ||
"jsdoc": "^3.5.5", | ||
"jsdoc-fresh": "^1.0.1", | ||
"jsdoc-region-tag": "^1.0.2", | ||
"jsdoc-fresh": "^2.0.0", | ||
"jsdoc-region-tag": "^2.0.0", | ||
"linkinator": "^3.1.0", | ||
"mocha": "^9.2.2", | ||
"mocha": "^10.0.0", | ||
"null-loader": "^4.0.0", | ||
@@ -54,0 +54,0 @@ "pack-n-play": "^1.0.0-2", |
Sorry, the diff of this file is not supported yet
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
2428893
40521