@google-cloud/spanner 7.6.0 → 7.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/README.md +4 -0
- package/build/protos/google/spanner/admin/database/v1/backup.proto +190 -109
- package/build/protos/google/spanner/admin/database/v1/common.proto +30 -10
- package/build/protos/google/spanner/admin/database/v1/spanner_database_admin.proto +166 -100
- package/build/protos/google/spanner/admin/instance/v1/common.proto +15 -1
- package/build/protos/google/spanner/admin/instance/v1/spanner_instance_admin.proto +6 -0
- package/build/protos/google/spanner/executor/v1/cloud_executor.proto +30 -6
- package/build/protos/google/spanner/v1/commit_response.proto +1 -1
- package/build/protos/google/spanner/v1/keys.proto +1 -1
- package/build/protos/google/spanner/v1/mutation.proto +1 -1
- package/build/protos/google/spanner/v1/query_plan.proto +1 -1
- package/build/protos/google/spanner/v1/result_set.proto +1 -1
- package/build/protos/google/spanner/v1/spanner.proto +1 -1
- package/build/protos/google/spanner/v1/transaction.proto +1 -1
- package/build/protos/google/spanner/v1/type.proto +1 -1
- package/build/protos/protos.d.ts +310 -40
- package/build/protos/protos.js +942 -89
- package/build/protos/protos.json +115 -5
- package/build/src/codec.d.ts +56 -1
- package/build/src/codec.js +109 -4
- package/build/src/database.d.ts +41 -5
- package/build/src/database.js +37 -2
- package/build/src/index.d.ts +50 -1
- package/build/src/index.js +53 -0
- package/build/src/partial-result-stream.d.ts +41 -0
- package/build/src/partial-result-stream.js +6 -1
- package/build/src/table.d.ts +1 -0
- package/build/src/table.js +36 -2
- package/build/src/transaction-runner.d.ts +1 -0
- package/build/src/transaction-runner.js +3 -0
- package/build/src/transaction.d.ts +55 -0
- package/build/src/transaction.js +28 -2
- package/build/src/v1/database_admin_client.d.ts +175 -126
- package/build/src/v1/database_admin_client.js +95 -64
- package/build/src/v1/instance_admin_client.js +10 -7
- package/build/src/v1/spanner_client.js +10 -7
- package/build/src/v1/spanner_client_config.json +15 -14
- package/build/src/v1/spanner_executor_proxy_client.js +10 -7
- package/package.json +3 -3
|
@@ -73,7 +73,7 @@ class SpannerExecutorProxyClient {
|
|
|
73
73
|
* ```
|
|
74
74
|
*/
|
|
75
75
|
constructor(opts, gaxInstance) {
|
|
76
|
-
var _a, _b, _c, _d;
|
|
76
|
+
var _a, _b, _c, _d, _e;
|
|
77
77
|
this._terminated = false;
|
|
78
78
|
this.descriptors = {
|
|
79
79
|
page: {},
|
|
@@ -88,14 +88,17 @@ class SpannerExecutorProxyClient {
|
|
|
88
88
|
(opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== (opts === null || opts === void 0 ? void 0 : opts.universeDomain)) {
|
|
89
89
|
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
|
90
90
|
}
|
|
91
|
+
const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
|
|
92
|
+
? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
|
|
93
|
+
: undefined;
|
|
91
94
|
this._universeDomain =
|
|
92
|
-
(_b = (_a = opts === null || opts === void 0 ? void 0 : opts.universeDomain) !== null && _a !== void 0 ? _a : opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== null && _b !== void 0 ? _b : 'googleapis.com';
|
|
95
|
+
(_c = (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.universeDomain) !== null && _a !== void 0 ? _a : opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== null && _b !== void 0 ? _b : universeDomainEnvVar) !== null && _c !== void 0 ? _c : 'googleapis.com';
|
|
93
96
|
this._servicePath = 'spanner-cloud-executor.' + this._universeDomain;
|
|
94
97
|
const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || this._servicePath;
|
|
95
98
|
this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
|
|
96
99
|
const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
|
|
97
|
-
const clientConfig = (
|
|
98
|
-
const fallback = (
|
|
100
|
+
const clientConfig = (_d = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _d !== void 0 ? _d : {};
|
|
101
|
+
const fallback = (_e = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _e !== void 0 ? _e : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
|
|
99
102
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
|
100
103
|
// If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case.
|
|
101
104
|
if (servicePath !== this._servicePath && !('scopes' in opts)) {
|
|
@@ -123,7 +126,7 @@ class SpannerExecutorProxyClient {
|
|
|
123
126
|
}
|
|
124
127
|
// Determine the client header string.
|
|
125
128
|
const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
|
|
126
|
-
if (typeof process
|
|
129
|
+
if (typeof process === 'object' && 'versions' in process) {
|
|
127
130
|
clientHeader.push(`gl-node/${process.versions.node}`);
|
|
128
131
|
}
|
|
129
132
|
else {
|
|
@@ -221,7 +224,7 @@ class SpannerExecutorProxyClient {
|
|
|
221
224
|
* @returns {string} The DNS address for this service.
|
|
222
225
|
*/
|
|
223
226
|
static get servicePath() {
|
|
224
|
-
if (typeof process
|
|
227
|
+
if (typeof process === 'object' &&
|
|
225
228
|
typeof process.emitWarning === 'function') {
|
|
226
229
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
227
230
|
}
|
|
@@ -233,7 +236,7 @@ class SpannerExecutorProxyClient {
|
|
|
233
236
|
* @returns {string} The DNS address for this service.
|
|
234
237
|
*/
|
|
235
238
|
static get apiEndpoint() {
|
|
236
|
-
if (typeof process
|
|
239
|
+
if (typeof process === 'object' &&
|
|
237
240
|
typeof process.emitWarning === 'function') {
|
|
238
241
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
239
242
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@google-cloud/spanner",
|
|
3
3
|
"description": "Cloud Spanner Client Library for Node.js",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.8.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Google Inc.",
|
|
7
7
|
"engines": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"ycsb": "node ./benchmark/ycsb.js run -P ./benchmark/workloada -p table=usertable -p cloudspanner.instance=ycsb-instance -p operationcount=100 -p cloudspanner.database=ycsb",
|
|
39
39
|
"fix": "gts fix",
|
|
40
40
|
"clean": "gts clean",
|
|
41
|
-
"compile": "tsc -p . && cp -r protos build",
|
|
41
|
+
"compile": "tsc -p . && cp -r protos build && cp -r test/data build/test",
|
|
42
42
|
"prepare": "npm run compile-protos && npm run compile",
|
|
43
43
|
"pretest": "npm run compile",
|
|
44
44
|
"presystem-test": "npm run compile",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"events-intercept": "^2.0.0",
|
|
67
67
|
"extend": "^3.0.2",
|
|
68
68
|
"google-auth-library": "^9.0.0",
|
|
69
|
-
"google-gax": "4.3.
|
|
69
|
+
"google-gax": "4.3.3",
|
|
70
70
|
"grpc-gcp": "^1.0.0",
|
|
71
71
|
"is": "^3.2.1",
|
|
72
72
|
"lodash.snakecase": "^4.1.1",
|