Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@google-cloud/spanner

Package Overview
Dependencies
Maintainers
1
Versions
126
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@google-cloud/spanner - npm Package Compare versions

Comparing version 6.0.0 to 6.1.0

2

build/src/codec.d.ts

@@ -49,3 +49,3 @@ import { Big } from 'big.js';

* Returns the date in ISO date format.
* `YYYY-[M]M-[D]D`
* `YYYY-MM-DD`
*

@@ -52,0 +52,0 @@ * @returns {string}

@@ -70,3 +70,3 @@ "use strict";

* Returns the date in ISO date format.
* `YYYY-[M]M-[D]D`
* `YYYY-MM-DD`
*

@@ -76,12 +76,6 @@ * @returns {string}

toJSON() {
const year = this.getFullYear();
let month = (this.getMonth() + 1).toString();
let date = this.getDate().toString();
if (month.length === 1) {
month = `0${month}`;
}
if (date.length === 1) {
date = `0${date}`;
}
return `${year}-${month}-${date}`;
const year = this.getFullYear().toString();
const month = (this.getMonth() + 1).toString();
const date = this.getDate().toString();
return `${year.padStart(4, '0')}-${month.padStart(2, '0')}-${date.padStart(2, '0')}`;
}

@@ -88,0 +82,0 @@ }

@@ -57,3 +57,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:

@@ -81,7 +81,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}.
*/

@@ -443,3 +442,3 @@ constructor(opts?: ClientOptions);

* Authorization requires `spanner.instances.update` permission on
* resource {@link google.spanner.admin.instance.v1.Instance.name|name}.
* the resource {@link google.spanner.admin.instance.v1.Instance.name|name}.
*

@@ -446,0 +445,0 @@ * @param {Object} request

@@ -63,3 +63,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:

@@ -87,7 +87,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}.
*/

@@ -169,7 +168,41 @@ 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.GetOperation',
get: '/v1/{name=projects/*/instances/*/databases/*/operations/*}',
additional_bindings: [
{ get: '/v1/{name=projects/*/instances/*/operations/*}' },
],
},
{
selector: 'google.longrunning.Operations.ListOperations',
get: '/v1/{name=projects/*/instances/*/databases/*/operations}',
additional_bindings: [
{ get: '/v1/{name=projects/*/instances/*/operations}' },
],
},
{
selector: 'google.longrunning.Operations.CancelOperation',
post: '/v1/{name=projects/*/instances/*/databases/*/operations/*}:cancel',
additional_bindings: [
{ post: '/v1/{name=projects/*/instances/*/operations/*}:cancel' },
],
},
{
selector: 'google.longrunning.Operations.DeleteOperation',
delete: '/v1/{name=projects/*/instances/*/databases/*/operations/*}',
additional_bindings: [
{ delete: '/v1/{name=projects/*/instances/*/operations/*}' },
],
},
];
}
this.operationsClient = this._gaxModule
.lro(lroOptions)
.operationsClient(opts);

@@ -176,0 +209,0 @@ const createInstanceResponse = protoFilesRoot.lookup('.google.spanner.admin.instance.v1.Instance');

@@ -47,3 +47,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:

@@ -71,7 +71,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}.
*/

@@ -78,0 +77,0 @@ constructor(opts) {

{
"name": "@google-cloud/spanner",
"description": "Cloud Spanner Client Library for Node.js",
"version": "6.0.0",
"version": "6.1.0",
"license": "Apache-2.0",

@@ -56,3 +56,3 @@ "author": "Google Inc.",

"@google-cloud/projectify": "^2.0.0",
"@google-cloud/promisify": "^2.0.0",
"@google-cloud/promisify": "^3.0.0",
"@types/big.js": "^6.0.0",

@@ -114,3 +114,3 @@ "@types/stack-trace": "0.0.29",

"stats-lite": "^2.1.1",
"teeny-request": "^7.0.0",
"teeny-request": "^8.0.0",
"time-span": "^4.0.0",

@@ -117,0 +117,0 @@ "tmp": "^0.2.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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 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 too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc