@google-cloud/spanner 7.6.0 → 7.7.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 +13 -0
- 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 +29 -5
- package/build/protos/protos.d.ts +280 -40
- package/build/protos/protos.js +738 -89
- package/build/protos/protos.json +72 -5
- package/build/src/database.d.ts +7 -1
- package/build/src/database.js +14 -2
- package/build/src/v1/database_admin_client.js +10 -7
- package/build/src/v1/instance_admin_client.js +10 -7
- package/build/src/v1/spanner_client.js +10 -7
- package/build/src/v1/spanner_executor_proxy_client.js +10 -7
- package/package.json +2 -2
package/build/protos/protos.json
CHANGED
|
@@ -1118,9 +1118,21 @@
|
|
|
1118
1118
|
1001,
|
|
1119
1119
|
1001
|
|
1120
1120
|
],
|
|
1121
|
+
[
|
|
1122
|
+
1002,
|
|
1123
|
+
1002
|
|
1124
|
+
],
|
|
1125
|
+
[
|
|
1126
|
+
9990,
|
|
1127
|
+
9990
|
|
1128
|
+
],
|
|
1121
1129
|
[
|
|
1122
1130
|
9995,
|
|
1123
1131
|
9999
|
|
1132
|
+
],
|
|
1133
|
+
[
|
|
1134
|
+
10000,
|
|
1135
|
+
10000
|
|
1124
1136
|
]
|
|
1125
1137
|
],
|
|
1126
1138
|
"reserved": [
|
|
@@ -3193,6 +3205,13 @@
|
|
|
3193
3205
|
}
|
|
3194
3206
|
}
|
|
3195
3207
|
},
|
|
3208
|
+
"FulfillmentPeriod": {
|
|
3209
|
+
"values": {
|
|
3210
|
+
"FULFILLMENT_PERIOD_UNSPECIFIED": 0,
|
|
3211
|
+
"FULFILLMENT_PERIOD_NORMAL": 1,
|
|
3212
|
+
"FULFILLMENT_PERIOD_EXTENDED": 2
|
|
3213
|
+
}
|
|
3214
|
+
},
|
|
3196
3215
|
"InstanceAdmin": {
|
|
3197
3216
|
"options": {
|
|
3198
3217
|
"(google.api.default_host)": "spanner.googleapis.com",
|
|
@@ -4186,6 +4205,10 @@
|
|
|
4186
4205
|
"endTime": {
|
|
4187
4206
|
"type": "google.protobuf.Timestamp",
|
|
4188
4207
|
"id": 4
|
|
4208
|
+
},
|
|
4209
|
+
"expectedFulfillmentPeriod": {
|
|
4210
|
+
"type": "FulfillmentPeriod",
|
|
4211
|
+
"id": 5
|
|
4189
4212
|
}
|
|
4190
4213
|
}
|
|
4191
4214
|
},
|
|
@@ -4206,6 +4229,10 @@
|
|
|
4206
4229
|
"endTime": {
|
|
4207
4230
|
"type": "google.protobuf.Timestamp",
|
|
4208
4231
|
"id": 4
|
|
4232
|
+
},
|
|
4233
|
+
"expectedFulfillmentPeriod": {
|
|
4234
|
+
"type": "FulfillmentPeriod",
|
|
4235
|
+
"id": 5
|
|
4209
4236
|
}
|
|
4210
4237
|
}
|
|
4211
4238
|
},
|
|
@@ -4633,6 +4660,10 @@
|
|
|
4633
4660
|
"type": "string",
|
|
4634
4661
|
"id": 1
|
|
4635
4662
|
},
|
|
4663
|
+
"spannerOptions": {
|
|
4664
|
+
"type": "SpannerOptions",
|
|
4665
|
+
"id": 2
|
|
4666
|
+
},
|
|
4636
4667
|
"start": {
|
|
4637
4668
|
"type": "StartTransactionAction",
|
|
4638
4669
|
"id": 10
|
|
@@ -5253,7 +5284,7 @@
|
|
|
5253
5284
|
"listCloudBackupOperations",
|
|
5254
5285
|
"getOperation",
|
|
5255
5286
|
"cancelOperation",
|
|
5256
|
-
"
|
|
5287
|
+
"changeQuorumCloudDatabase"
|
|
5257
5288
|
]
|
|
5258
5289
|
}
|
|
5259
5290
|
},
|
|
@@ -5366,8 +5397,8 @@
|
|
|
5366
5397
|
"type": "CancelOperationAction",
|
|
5367
5398
|
"id": 26
|
|
5368
5399
|
},
|
|
5369
|
-
"
|
|
5370
|
-
"type": "
|
|
5400
|
+
"changeQuorumCloudDatabase": {
|
|
5401
|
+
"type": "ChangeQuorumCloudDatabaseAction",
|
|
5371
5402
|
"id": 28
|
|
5372
5403
|
}
|
|
5373
5404
|
}
|
|
@@ -5746,7 +5777,7 @@
|
|
|
5746
5777
|
}
|
|
5747
5778
|
}
|
|
5748
5779
|
},
|
|
5749
|
-
"
|
|
5780
|
+
"ChangeQuorumCloudDatabaseAction": {
|
|
5750
5781
|
"oneofs": {
|
|
5751
5782
|
"_databaseUri": {
|
|
5752
5783
|
"oneof": [
|
|
@@ -5892,6 +5923,10 @@
|
|
|
5892
5923
|
"databaseId": {
|
|
5893
5924
|
"type": "string",
|
|
5894
5925
|
"id": 5
|
|
5926
|
+
},
|
|
5927
|
+
"encryptionConfig": {
|
|
5928
|
+
"type": "google.spanner.admin.database.v1.EncryptionConfig",
|
|
5929
|
+
"id": 7
|
|
5895
5930
|
}
|
|
5896
5931
|
}
|
|
5897
5932
|
},
|
|
@@ -5949,6 +5984,10 @@
|
|
|
5949
5984
|
"options": {
|
|
5950
5985
|
"proto3_optional": true
|
|
5951
5986
|
}
|
|
5987
|
+
},
|
|
5988
|
+
"encryptionConfig": {
|
|
5989
|
+
"type": "google.spanner.admin.database.v1.EncryptionConfig",
|
|
5990
|
+
"id": 7
|
|
5952
5991
|
}
|
|
5953
5992
|
}
|
|
5954
5993
|
},
|
|
@@ -6774,6 +6813,22 @@
|
|
|
6774
6813
|
"id": 1
|
|
6775
6814
|
}
|
|
6776
6815
|
}
|
|
6816
|
+
},
|
|
6817
|
+
"SpannerOptions": {
|
|
6818
|
+
"fields": {
|
|
6819
|
+
"sessionPoolOptions": {
|
|
6820
|
+
"type": "SessionPoolOptions",
|
|
6821
|
+
"id": 1
|
|
6822
|
+
}
|
|
6823
|
+
}
|
|
6824
|
+
},
|
|
6825
|
+
"SessionPoolOptions": {
|
|
6826
|
+
"fields": {
|
|
6827
|
+
"useMultiplexed": {
|
|
6828
|
+
"type": "bool",
|
|
6829
|
+
"id": 1
|
|
6830
|
+
}
|
|
6831
|
+
}
|
|
6777
6832
|
}
|
|
6778
6833
|
}
|
|
6779
6834
|
}
|
|
@@ -8367,7 +8422,10 @@
|
|
|
8367
8422
|
"rule": "repeated",
|
|
8368
8423
|
"type": "google.api.FieldBehavior",
|
|
8369
8424
|
"id": 1052,
|
|
8370
|
-
"extend": "google.protobuf.FieldOptions"
|
|
8425
|
+
"extend": "google.protobuf.FieldOptions",
|
|
8426
|
+
"options": {
|
|
8427
|
+
"packed": false
|
|
8428
|
+
}
|
|
8371
8429
|
},
|
|
8372
8430
|
"FieldBehavior": {
|
|
8373
8431
|
"values": {
|
|
@@ -8562,6 +8620,11 @@
|
|
|
8562
8620
|
"id": 1050,
|
|
8563
8621
|
"extend": "google.protobuf.ServiceOptions"
|
|
8564
8622
|
},
|
|
8623
|
+
"apiVersion": {
|
|
8624
|
+
"type": "string",
|
|
8625
|
+
"id": 525000001,
|
|
8626
|
+
"extend": "google.protobuf.ServiceOptions"
|
|
8627
|
+
},
|
|
8565
8628
|
"CommonLanguageSettings": {
|
|
8566
8629
|
"fields": {
|
|
8567
8630
|
"referenceDocsUri": {
|
|
@@ -8670,6 +8733,10 @@
|
|
|
8670
8733
|
"protoReferenceDocumentationUri": {
|
|
8671
8734
|
"type": "string",
|
|
8672
8735
|
"id": 110
|
|
8736
|
+
},
|
|
8737
|
+
"restReferenceDocumentationUri": {
|
|
8738
|
+
"type": "string",
|
|
8739
|
+
"id": 111
|
|
8673
8740
|
}
|
|
8674
8741
|
}
|
|
8675
8742
|
},
|
package/build/src/database.d.ts
CHANGED
|
@@ -106,6 +106,12 @@ export interface GetIamPolicyOptions {
|
|
|
106
106
|
requestedPolicyVersion?: number | null;
|
|
107
107
|
gaxOptions?: CallOptions;
|
|
108
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* @typedef {object} GetTransactionOptions
|
|
111
|
+
* * @property {boolean} [optimisticLock] The optimistic lock a
|
|
112
|
+
* {@link Transaction} should use while running.
|
|
113
|
+
*/
|
|
114
|
+
export type GetTransactionOptions = Omit<RunTransactionOptions, 'timeout'>;
|
|
109
115
|
export type CreateSessionCallback = ResourceCallback<Session, spannerClient.spanner.v1.ISession>;
|
|
110
116
|
export interface BatchCreateSessionsOptions extends CreateSessionOptions {
|
|
111
117
|
count: number;
|
|
@@ -1140,7 +1146,7 @@ declare class Database extends common.GrpcServiceObject {
|
|
|
1140
1146
|
* });
|
|
1141
1147
|
* ```
|
|
1142
1148
|
*/
|
|
1143
|
-
getTransaction(): Promise<[Transaction]>;
|
|
1149
|
+
getTransaction(optionsOrCallback?: GetTransactionOptions): Promise<[Transaction]>;
|
|
1144
1150
|
getTransaction(callback: GetTransactionCallback): void;
|
|
1145
1151
|
/**
|
|
1146
1152
|
* Query object for listing database operations.
|
package/build/src/database.js
CHANGED
|
@@ -617,12 +617,24 @@ class Database extends common.GrpcServiceObject {
|
|
|
617
617
|
});
|
|
618
618
|
});
|
|
619
619
|
}
|
|
620
|
-
getTransaction(callback) {
|
|
620
|
+
getTransaction(optionsOrCallback, callback) {
|
|
621
|
+
const cb = typeof optionsOrCallback === 'function'
|
|
622
|
+
? optionsOrCallback
|
|
623
|
+
: callback;
|
|
624
|
+
const options = typeof optionsOrCallback === 'object' && optionsOrCallback
|
|
625
|
+
? optionsOrCallback
|
|
626
|
+
: {};
|
|
621
627
|
this.pool_.getSession((err, session, transaction) => {
|
|
628
|
+
if (options.requestOptions) {
|
|
629
|
+
transaction.requestOptions = Object.assign(transaction.requestOptions || {}, options.requestOptions);
|
|
630
|
+
}
|
|
631
|
+
if (options.optimisticLock) {
|
|
632
|
+
transaction.useOptimisticLock();
|
|
633
|
+
}
|
|
622
634
|
if (!err) {
|
|
623
635
|
this._releaseOnEnd(session, transaction);
|
|
624
636
|
}
|
|
625
|
-
|
|
637
|
+
cb(err, transaction);
|
|
626
638
|
});
|
|
627
639
|
}
|
|
628
640
|
async getOperations(optionsOrCallback) {
|
|
@@ -78,7 +78,7 @@ class DatabaseAdminClient {
|
|
|
78
78
|
* ```
|
|
79
79
|
*/
|
|
80
80
|
constructor(opts, gaxInstance) {
|
|
81
|
-
var _a, _b, _c, _d;
|
|
81
|
+
var _a, _b, _c, _d, _e;
|
|
82
82
|
this._terminated = false;
|
|
83
83
|
this.descriptors = {
|
|
84
84
|
page: {},
|
|
@@ -93,14 +93,17 @@ class DatabaseAdminClient {
|
|
|
93
93
|
(opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== (opts === null || opts === void 0 ? void 0 : opts.universeDomain)) {
|
|
94
94
|
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
|
95
95
|
}
|
|
96
|
+
const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
|
|
97
|
+
? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
|
|
98
|
+
: undefined;
|
|
96
99
|
this._universeDomain =
|
|
97
|
-
(_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';
|
|
100
|
+
(_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';
|
|
98
101
|
this._servicePath = 'spanner.' + this._universeDomain;
|
|
99
102
|
const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || this._servicePath;
|
|
100
103
|
this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
|
|
101
104
|
const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
|
|
102
|
-
const clientConfig = (
|
|
103
|
-
const fallback = (
|
|
105
|
+
const clientConfig = (_d = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _d !== void 0 ? _d : {};
|
|
106
|
+
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');
|
|
104
107
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
|
105
108
|
// Request numeric enum values if REST transport is used.
|
|
106
109
|
opts.numericEnums = true;
|
|
@@ -130,7 +133,7 @@ class DatabaseAdminClient {
|
|
|
130
133
|
}
|
|
131
134
|
// Determine the client header string.
|
|
132
135
|
const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
|
|
133
|
-
if (typeof process
|
|
136
|
+
if (typeof process === 'object' && 'versions' in process) {
|
|
134
137
|
clientHeader.push(`gl-node/${process.versions.node}`);
|
|
135
138
|
}
|
|
136
139
|
else {
|
|
@@ -324,7 +327,7 @@ class DatabaseAdminClient {
|
|
|
324
327
|
* @returns {string} The DNS address for this service.
|
|
325
328
|
*/
|
|
326
329
|
static get servicePath() {
|
|
327
|
-
if (typeof process
|
|
330
|
+
if (typeof process === 'object' &&
|
|
328
331
|
typeof process.emitWarning === 'function') {
|
|
329
332
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
330
333
|
}
|
|
@@ -336,7 +339,7 @@ class DatabaseAdminClient {
|
|
|
336
339
|
* @returns {string} The DNS address for this service.
|
|
337
340
|
*/
|
|
338
341
|
static get apiEndpoint() {
|
|
339
|
-
if (typeof process
|
|
342
|
+
if (typeof process === 'object' &&
|
|
340
343
|
typeof process.emitWarning === 'function') {
|
|
341
344
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
342
345
|
}
|
|
@@ -92,7 +92,7 @@ class InstanceAdminClient {
|
|
|
92
92
|
* ```
|
|
93
93
|
*/
|
|
94
94
|
constructor(opts, gaxInstance) {
|
|
95
|
-
var _a, _b, _c, _d;
|
|
95
|
+
var _a, _b, _c, _d, _e;
|
|
96
96
|
this._terminated = false;
|
|
97
97
|
this.descriptors = {
|
|
98
98
|
page: {},
|
|
@@ -107,14 +107,17 @@ class InstanceAdminClient {
|
|
|
107
107
|
(opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== (opts === null || opts === void 0 ? void 0 : opts.universeDomain)) {
|
|
108
108
|
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
|
109
109
|
}
|
|
110
|
+
const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
|
|
111
|
+
? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
|
|
112
|
+
: undefined;
|
|
110
113
|
this._universeDomain =
|
|
111
|
-
(_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';
|
|
114
|
+
(_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';
|
|
112
115
|
this._servicePath = 'spanner.' + this._universeDomain;
|
|
113
116
|
const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || this._servicePath;
|
|
114
117
|
this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
|
|
115
118
|
const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
|
|
116
|
-
const clientConfig = (
|
|
117
|
-
const fallback = (
|
|
119
|
+
const clientConfig = (_d = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _d !== void 0 ? _d : {};
|
|
120
|
+
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');
|
|
118
121
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
|
119
122
|
// Request numeric enum values if REST transport is used.
|
|
120
123
|
opts.numericEnums = true;
|
|
@@ -144,7 +147,7 @@ class InstanceAdminClient {
|
|
|
144
147
|
}
|
|
145
148
|
// Determine the client header string.
|
|
146
149
|
const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
|
|
147
|
-
if (typeof process
|
|
150
|
+
if (typeof process === 'object' && 'versions' in process) {
|
|
148
151
|
clientHeader.push(`gl-node/${process.versions.node}`);
|
|
149
152
|
}
|
|
150
153
|
else {
|
|
@@ -323,7 +326,7 @@ class InstanceAdminClient {
|
|
|
323
326
|
* @returns {string} The DNS address for this service.
|
|
324
327
|
*/
|
|
325
328
|
static get servicePath() {
|
|
326
|
-
if (typeof process
|
|
329
|
+
if (typeof process === 'object' &&
|
|
327
330
|
typeof process.emitWarning === 'function') {
|
|
328
331
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
329
332
|
}
|
|
@@ -335,7 +338,7 @@ class InstanceAdminClient {
|
|
|
335
338
|
* @returns {string} The DNS address for this service.
|
|
336
339
|
*/
|
|
337
340
|
static get apiEndpoint() {
|
|
338
|
-
if (typeof process
|
|
341
|
+
if (typeof process === 'object' &&
|
|
339
342
|
typeof process.emitWarning === 'function') {
|
|
340
343
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
341
344
|
}
|
|
@@ -76,7 +76,7 @@ class SpannerClient {
|
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
78
|
constructor(opts, gaxInstance) {
|
|
79
|
-
var _a, _b, _c, _d;
|
|
79
|
+
var _a, _b, _c, _d, _e;
|
|
80
80
|
this._terminated = false;
|
|
81
81
|
this.descriptors = {
|
|
82
82
|
page: {},
|
|
@@ -91,14 +91,17 @@ class SpannerClient {
|
|
|
91
91
|
(opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== (opts === null || opts === void 0 ? void 0 : opts.universeDomain)) {
|
|
92
92
|
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
|
93
93
|
}
|
|
94
|
+
const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
|
|
95
|
+
? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
|
|
96
|
+
: undefined;
|
|
94
97
|
this._universeDomain =
|
|
95
|
-
(_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';
|
|
98
|
+
(_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';
|
|
96
99
|
this._servicePath = 'spanner.' + this._universeDomain;
|
|
97
100
|
const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || this._servicePath;
|
|
98
101
|
this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
|
|
99
102
|
const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
|
|
100
|
-
const clientConfig = (
|
|
101
|
-
const fallback = (
|
|
103
|
+
const clientConfig = (_d = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _d !== void 0 ? _d : {};
|
|
104
|
+
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');
|
|
102
105
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
|
103
106
|
// Request numeric enum values if REST transport is used.
|
|
104
107
|
opts.numericEnums = true;
|
|
@@ -128,7 +131,7 @@ class SpannerClient {
|
|
|
128
131
|
}
|
|
129
132
|
// Determine the client header string.
|
|
130
133
|
const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
|
|
131
|
-
if (typeof process
|
|
134
|
+
if (typeof process === 'object' && 'versions' in process) {
|
|
132
135
|
clientHeader.push(`gl-node/${process.versions.node}`);
|
|
133
136
|
}
|
|
134
137
|
else {
|
|
@@ -250,7 +253,7 @@ class SpannerClient {
|
|
|
250
253
|
* @returns {string} The DNS address for this service.
|
|
251
254
|
*/
|
|
252
255
|
static get servicePath() {
|
|
253
|
-
if (typeof process
|
|
256
|
+
if (typeof process === 'object' &&
|
|
254
257
|
typeof process.emitWarning === 'function') {
|
|
255
258
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
256
259
|
}
|
|
@@ -262,7 +265,7 @@ class SpannerClient {
|
|
|
262
265
|
* @returns {string} The DNS address for this service.
|
|
263
266
|
*/
|
|
264
267
|
static get apiEndpoint() {
|
|
265
|
-
if (typeof process
|
|
268
|
+
if (typeof process === 'object' &&
|
|
266
269
|
typeof process.emitWarning === 'function') {
|
|
267
270
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
268
271
|
}
|
|
@@ -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.7.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Google Inc.",
|
|
7
7
|
"engines": {
|
|
@@ -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.2",
|
|
70
70
|
"grpc-gcp": "^1.0.0",
|
|
71
71
|
"is": "^3.2.1",
|
|
72
72
|
"lodash.snakecase": "^4.1.1",
|