ueberdb2 4.1.34 → 4.1.36
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/dist/index.js +1474 -521
- package/package.json +17 -23
package/dist/index.js
CHANGED
|
@@ -92,7 +92,7 @@ var require$$1__namespace = /*#__PURE__*/_interopNamespaceDefault(require$$1$a);
|
|
|
92
92
|
* All Features can be disabled or configured. The Wrapper provides default settings that can be
|
|
93
93
|
* overwriden by the driver and by the module user.
|
|
94
94
|
*/
|
|
95
|
-
const util
|
|
95
|
+
const util$11 = require('util');
|
|
96
96
|
/**
|
|
97
97
|
* Cache with Least Recently Used eviction policy.
|
|
98
98
|
*/
|
|
@@ -185,7 +185,7 @@ const defaultSettings = {
|
|
|
185
185
|
// use utf8mb4 as default
|
|
186
186
|
charset: 'utf8mb4',
|
|
187
187
|
};
|
|
188
|
-
const Database$
|
|
188
|
+
const Database$h = class Database {
|
|
189
189
|
/**
|
|
190
190
|
* @param wrappedDB The Database that should be wrapped
|
|
191
191
|
* @param settings (optional) The settings that should be applied to the wrapper
|
|
@@ -202,7 +202,7 @@ const Database$g = class Database {
|
|
|
202
202
|
const f = wrappedDB[fn];
|
|
203
203
|
if (typeof f !== 'function')
|
|
204
204
|
continue;
|
|
205
|
-
this.wrappedDB[fn] = util
|
|
205
|
+
this.wrappedDB[fn] = util$11.promisify(f.bind(wrappedDB));
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
this.logger = logger;
|
|
@@ -825,7 +825,7 @@ var errors$B = {};
|
|
|
825
825
|
* See the License for the specific language governing permissions and
|
|
826
826
|
* limitations under the License.
|
|
827
827
|
*/
|
|
828
|
-
const util$
|
|
828
|
+
const util$10 = require$$0$5;
|
|
829
829
|
/**
|
|
830
830
|
* Contains the error classes exposed by the driver.
|
|
831
831
|
* @module errors
|
|
@@ -844,7 +844,7 @@ function DriverError (message) {
|
|
|
844
844
|
this.message = message;
|
|
845
845
|
}
|
|
846
846
|
|
|
847
|
-
util$
|
|
847
|
+
util$10.inherits(DriverError, Error);
|
|
848
848
|
|
|
849
849
|
/**
|
|
850
850
|
* Represents an error when a query cannot be performed because no host is available or could be reached by the driver.
|
|
@@ -862,13 +862,13 @@ function NoHostAvailableError(innerErrors, message) {
|
|
|
862
862
|
const hostList = Object.keys(innerErrors);
|
|
863
863
|
if (hostList.length > 0) {
|
|
864
864
|
const host = hostList[0];
|
|
865
|
-
this.message += util$
|
|
865
|
+
this.message += util$10.format(' First host tried, %s: %s. See innerErrors.', host, innerErrors[host]);
|
|
866
866
|
}
|
|
867
867
|
}
|
|
868
868
|
}
|
|
869
869
|
}
|
|
870
870
|
|
|
871
|
-
util$
|
|
871
|
+
util$10.inherits(NoHostAvailableError, DriverError);
|
|
872
872
|
|
|
873
873
|
/**
|
|
874
874
|
* Represents an error message from the server
|
|
@@ -886,7 +886,7 @@ function ResponseError$1(code, message) {
|
|
|
886
886
|
this.info = 'Represents an error message from the server';
|
|
887
887
|
}
|
|
888
888
|
|
|
889
|
-
util$
|
|
889
|
+
util$10.inherits(ResponseError$1, DriverError);
|
|
890
890
|
|
|
891
891
|
/**
|
|
892
892
|
* Represents a bug inside the driver or in a Cassandra host.
|
|
@@ -898,7 +898,7 @@ function DriverInternalError(message) {
|
|
|
898
898
|
this.info = 'Represents a bug inside the driver or in a Cassandra host.';
|
|
899
899
|
}
|
|
900
900
|
|
|
901
|
-
util$
|
|
901
|
+
util$10.inherits(DriverInternalError, DriverError);
|
|
902
902
|
|
|
903
903
|
/**
|
|
904
904
|
* Represents an error when trying to authenticate with auth-enabled host
|
|
@@ -910,7 +910,7 @@ function AuthenticationError$1(message) {
|
|
|
910
910
|
this.info = 'Represents an authentication error from the driver or from a Cassandra node.';
|
|
911
911
|
}
|
|
912
912
|
|
|
913
|
-
util$
|
|
913
|
+
util$10.inherits(AuthenticationError$1, DriverError);
|
|
914
914
|
|
|
915
915
|
/**
|
|
916
916
|
* Represents an error that is raised when one of the arguments provided to a method is not valid
|
|
@@ -922,7 +922,7 @@ function ArgumentError(message) {
|
|
|
922
922
|
this.info = 'Represents an error that is raised when one of the arguments provided to a method is not valid.';
|
|
923
923
|
}
|
|
924
924
|
|
|
925
|
-
util$
|
|
925
|
+
util$10.inherits(ArgumentError, DriverError);
|
|
926
926
|
|
|
927
927
|
/**
|
|
928
928
|
* Represents a client-side error that is raised when the client didn't hear back from the server within
|
|
@@ -943,7 +943,7 @@ function OperationTimedOutError(message, host) {
|
|
|
943
943
|
this.host = host;
|
|
944
944
|
}
|
|
945
945
|
|
|
946
|
-
util$
|
|
946
|
+
util$10.inherits(OperationTimedOutError, DriverError);
|
|
947
947
|
|
|
948
948
|
/**
|
|
949
949
|
* Represents an error that is raised when a feature is not supported in the driver or in the current Cassandra version.
|
|
@@ -955,7 +955,7 @@ function NotSupportedError(message) {
|
|
|
955
955
|
this.info = 'Represents a feature that is not supported in the driver or in the Cassandra version.';
|
|
956
956
|
}
|
|
957
957
|
|
|
958
|
-
util$
|
|
958
|
+
util$10.inherits(NotSupportedError, DriverError);
|
|
959
959
|
|
|
960
960
|
/**
|
|
961
961
|
* Represents a client-side error indicating that all connections to a certain host have reached
|
|
@@ -966,14 +966,14 @@ util$_.inherits(NotSupportedError, DriverError);
|
|
|
966
966
|
* @constructor
|
|
967
967
|
*/
|
|
968
968
|
function BusyConnectionError(address, maxRequestsPerConnection, connectionLength) {
|
|
969
|
-
const message = util$
|
|
969
|
+
const message = util$10.format('All connections to host %s are busy, %d requests are in-flight on %s',
|
|
970
970
|
address, maxRequestsPerConnection, connectionLength === 1 ? 'a single connection': 'each connection');
|
|
971
971
|
DriverError.call(this, message, this.constructor);
|
|
972
972
|
this.info = 'Represents a client-side error indicating that all connections to a certain host have reached ' +
|
|
973
973
|
'the maximum amount of in-flight requests supported (pooling.maxRequestsPerConnection)';
|
|
974
974
|
}
|
|
975
975
|
|
|
976
|
-
util$
|
|
976
|
+
util$10.inherits(BusyConnectionError, DriverError);
|
|
977
977
|
|
|
978
978
|
errors$B.ArgumentError = ArgumentError;
|
|
979
979
|
errors$B.AuthenticationError = AuthenticationError$1;
|
|
@@ -1177,7 +1177,7 @@ var promiseUtils$e = {
|
|
|
1177
1177
|
* limitations under the License.
|
|
1178
1178
|
*/
|
|
1179
1179
|
|
|
1180
|
-
const util
|
|
1180
|
+
const util$$ = require$$0$5;
|
|
1181
1181
|
const net$6 = require$$0$6;
|
|
1182
1182
|
const { EventEmitter: EventEmitter$d } = require$$0$7;
|
|
1183
1183
|
|
|
@@ -1236,7 +1236,7 @@ function allocBufferFillDeprecated(size) {
|
|
|
1236
1236
|
|
|
1237
1237
|
function allocBufferFromStringDeprecated(text, encoding) {
|
|
1238
1238
|
if (typeof text !== 'string') {
|
|
1239
|
-
throw new TypeError('Expected string, obtained ' + util
|
|
1239
|
+
throw new TypeError('Expected string, obtained ' + util$$.inspect(text));
|
|
1240
1240
|
}
|
|
1241
1241
|
// eslint-disable-next-line
|
|
1242
1242
|
return new Buffer(text, encoding);
|
|
@@ -1244,7 +1244,7 @@ function allocBufferFromStringDeprecated(text, encoding) {
|
|
|
1244
1244
|
|
|
1245
1245
|
function allocBufferFromArrayDeprecated(arr) {
|
|
1246
1246
|
if (!Array.isArray(arr)) {
|
|
1247
|
-
throw new TypeError('Expected Array, obtained ' + util
|
|
1247
|
+
throw new TypeError('Expected Array, obtained ' + util$$.inspect(arr));
|
|
1248
1248
|
}
|
|
1249
1249
|
// eslint-disable-next-line
|
|
1250
1250
|
return new Buffer(arr);
|
|
@@ -1375,7 +1375,7 @@ function deepExtend(target) {
|
|
|
1375
1375
|
targetType === 'number' ||
|
|
1376
1376
|
targetType === 'string' ||
|
|
1377
1377
|
Array.isArray(targetProp) ||
|
|
1378
|
-
util
|
|
1378
|
+
util$$.isDate(targetProp) ||
|
|
1379
1379
|
targetProp.constructor.name !== 'Object') {
|
|
1380
1380
|
target[prop] = source[prop];
|
|
1381
1381
|
}
|
|
@@ -1498,7 +1498,7 @@ function insertSorted(arr, item, compareFunc) {
|
|
|
1498
1498
|
*/
|
|
1499
1499
|
function validateFn(fn, name) {
|
|
1500
1500
|
if (typeof fn !== 'function') {
|
|
1501
|
-
throw new errors$A.ArgumentError(util
|
|
1501
|
+
throw new errors$A.ArgumentError(util$$.format('%s is not a function', name || 'callback'));
|
|
1502
1502
|
}
|
|
1503
1503
|
return fn;
|
|
1504
1504
|
}
|
|
@@ -1523,7 +1523,7 @@ function adaptNamedParamsPrepared(params, columns) {
|
|
|
1523
1523
|
const name = columns[i].name;
|
|
1524
1524
|
// eslint-disable-next-line no-prototype-builtins
|
|
1525
1525
|
if (!params.hasOwnProperty(name)) {
|
|
1526
|
-
throw new errors$A.ArgumentError(util
|
|
1526
|
+
throw new errors$A.ArgumentError(util$$.format('Parameter "%s" not defined', name));
|
|
1527
1527
|
}
|
|
1528
1528
|
paramsArray[i] = params[name];
|
|
1529
1529
|
}
|
|
@@ -1737,7 +1737,7 @@ class AddressResolver {
|
|
|
1737
1737
|
throw new Error('nameOrIp and dns lib must be provided as part of the options');
|
|
1738
1738
|
}
|
|
1739
1739
|
|
|
1740
|
-
this._resolve4 = util
|
|
1740
|
+
this._resolve4 = util$$.promisify(options.dns.resolve4);
|
|
1741
1741
|
this._nameOrIp = options.nameOrIp;
|
|
1742
1742
|
this._isIp = net$6.isIP(options.nameOrIp);
|
|
1743
1743
|
this._index = 0;
|
|
@@ -2262,7 +2262,7 @@ utils$11.HashSet = HashSet;
|
|
|
2262
2262
|
* limitations under the License.
|
|
2263
2263
|
*/
|
|
2264
2264
|
const dns$4 = require$$0$8;
|
|
2265
|
-
const util$
|
|
2265
|
+
const util$_ = require$$0$5;
|
|
2266
2266
|
const utils$10 = utils$11;
|
|
2267
2267
|
/** @module policies/addressResolution */
|
|
2268
2268
|
/**
|
|
@@ -2329,7 +2329,7 @@ function EC2MultiRegionTranslator() {
|
|
|
2329
2329
|
|
|
2330
2330
|
}
|
|
2331
2331
|
|
|
2332
|
-
util$
|
|
2332
|
+
util$_.inherits(EC2MultiRegionTranslator, AddressTranslator);
|
|
2333
2333
|
|
|
2334
2334
|
/**
|
|
2335
2335
|
* Addresses in the same EC2 region are translated to private IPs and addresses in
|
|
@@ -3642,7 +3642,7 @@ var uuid = Uuid$1;
|
|
|
3642
3642
|
* See the License for the specific language governing permissions and
|
|
3643
3643
|
* limitations under the License.
|
|
3644
3644
|
*/
|
|
3645
|
-
const util$
|
|
3645
|
+
const util$Z = require$$0$5;
|
|
3646
3646
|
const crypto$8 = require$$0$9;
|
|
3647
3647
|
const Long$5 = LongExports;
|
|
3648
3648
|
|
|
@@ -3722,7 +3722,7 @@ function TimeUuid(value, ticks, nodeId, clockId) {
|
|
|
3722
3722
|
Uuid.call(this, buffer);
|
|
3723
3723
|
}
|
|
3724
3724
|
|
|
3725
|
-
util$
|
|
3725
|
+
util$Z.inherits(TimeUuid, Uuid);
|
|
3726
3726
|
|
|
3727
3727
|
/**
|
|
3728
3728
|
* Generates a TimeUuid instance based on the Date provided using random node and clock values.
|
|
@@ -9404,7 +9404,7 @@ var reconnection = {};
|
|
|
9404
9404
|
* See the License for the specific language governing permissions and
|
|
9405
9405
|
* limitations under the License.
|
|
9406
9406
|
*/
|
|
9407
|
-
const util$
|
|
9407
|
+
const util$Y = require$$0$5;
|
|
9408
9408
|
|
|
9409
9409
|
/** @module policies/reconnection */
|
|
9410
9410
|
/**
|
|
@@ -9439,7 +9439,7 @@ function ConstantReconnectionPolicy(delay) {
|
|
|
9439
9439
|
this.delay = delay;
|
|
9440
9440
|
}
|
|
9441
9441
|
|
|
9442
|
-
util$
|
|
9442
|
+
util$Y.inherits(ConstantReconnectionPolicy, ReconnectionPolicy);
|
|
9443
9443
|
|
|
9444
9444
|
/**
|
|
9445
9445
|
* A new reconnection schedule that returns the same next delay value
|
|
@@ -9480,7 +9480,7 @@ function ExponentialReconnectionPolicy(baseDelay, maxDelay, startWithNoDelay) {
|
|
|
9480
9480
|
this.startWithNoDelay = startWithNoDelay;
|
|
9481
9481
|
}
|
|
9482
9482
|
|
|
9483
|
-
util$
|
|
9483
|
+
util$Y.inherits(ExponentialReconnectionPolicy, ReconnectionPolicy);
|
|
9484
9484
|
|
|
9485
9485
|
/**
|
|
9486
9486
|
* A new schedule that uses an exponentially growing delay between reconnection attempts.
|
|
@@ -9563,7 +9563,7 @@ var retry$3 = {};
|
|
|
9563
9563
|
* See the License for the specific language governing permissions and
|
|
9564
9564
|
* limitations under the License.
|
|
9565
9565
|
*/
|
|
9566
|
-
const util$
|
|
9566
|
+
const util$X = require$$0$5;
|
|
9567
9567
|
|
|
9568
9568
|
|
|
9569
9569
|
/** @module policies/retry */
|
|
@@ -9722,7 +9722,7 @@ function IdempotenceAwareRetryPolicy(childPolicy) {
|
|
|
9722
9722
|
this._childPolicy = childPolicy || new RetryPolicy();
|
|
9723
9723
|
}
|
|
9724
9724
|
|
|
9725
|
-
util$
|
|
9725
|
+
util$X.inherits(IdempotenceAwareRetryPolicy, RetryPolicy);
|
|
9726
9726
|
|
|
9727
9727
|
IdempotenceAwareRetryPolicy.prototype.onReadTimeout = function (info, consistency, received, blockFor, isDataPresent) {
|
|
9728
9728
|
return this._childPolicy.onReadTimeout(info, consistency, received, blockFor, isDataPresent);
|
|
@@ -9769,7 +9769,7 @@ function FallthroughRetryPolicy() {
|
|
|
9769
9769
|
|
|
9770
9770
|
}
|
|
9771
9771
|
|
|
9772
|
-
util$
|
|
9772
|
+
util$X.inherits(FallthroughRetryPolicy, RetryPolicy);
|
|
9773
9773
|
|
|
9774
9774
|
/**
|
|
9775
9775
|
* Implementation of RetryPolicy method that returns [rethrow]{@link module:policies/retry~Retry#rethrowResult()}.
|
|
@@ -9842,7 +9842,7 @@ var speculativeExecution = {};
|
|
|
9842
9842
|
* limitations under the License.
|
|
9843
9843
|
*/
|
|
9844
9844
|
|
|
9845
|
-
const util$
|
|
9845
|
+
const util$W = require$$0$5;
|
|
9846
9846
|
const errors$z = errors$B;
|
|
9847
9847
|
|
|
9848
9848
|
/** @module policies/speculativeExecution */
|
|
@@ -9911,7 +9911,7 @@ function NoSpeculativeExecutionPolicy() {
|
|
|
9911
9911
|
};
|
|
9912
9912
|
}
|
|
9913
9913
|
|
|
9914
|
-
util$
|
|
9914
|
+
util$W.inherits(NoSpeculativeExecutionPolicy, SpeculativeExecutionPolicy);
|
|
9915
9915
|
|
|
9916
9916
|
NoSpeculativeExecutionPolicy.prototype.newPlan = function () {
|
|
9917
9917
|
return this._plan;
|
|
@@ -9940,7 +9940,7 @@ function ConstantSpeculativeExecutionPolicy(delay, maxSpeculativeExecutions) {
|
|
|
9940
9940
|
this._maxSpeculativeExecutions = maxSpeculativeExecutions;
|
|
9941
9941
|
}
|
|
9942
9942
|
|
|
9943
|
-
util$
|
|
9943
|
+
util$W.inherits(ConstantSpeculativeExecutionPolicy, SpeculativeExecutionPolicy);
|
|
9944
9944
|
|
|
9945
9945
|
ConstantSpeculativeExecutionPolicy.prototype.newPlan = function () {
|
|
9946
9946
|
let executions = 0;
|
|
@@ -11081,7 +11081,7 @@ provider$1.Authenticator = Authenticator$4;
|
|
|
11081
11081
|
* See the License for the specific language governing permissions and
|
|
11082
11082
|
* limitations under the License.
|
|
11083
11083
|
*/
|
|
11084
|
-
const util$
|
|
11084
|
+
const util$V = require$$0$5;
|
|
11085
11085
|
|
|
11086
11086
|
const provider = provider$1;
|
|
11087
11087
|
const utils$Y = utils$11;
|
|
@@ -11106,7 +11106,7 @@ function PlainTextAuthProvider$1(username, password) {
|
|
|
11106
11106
|
this.password = password;
|
|
11107
11107
|
}
|
|
11108
11108
|
|
|
11109
|
-
util$
|
|
11109
|
+
util$V.inherits(PlainTextAuthProvider$1, AuthProvider$5);
|
|
11110
11110
|
|
|
11111
11111
|
/**
|
|
11112
11112
|
* Returns a new [Authenticator]{@link module:auth~Authenticator} instance to be used for plain text authentication.
|
|
@@ -11125,7 +11125,7 @@ function PlainTextAuthenticator$2(username, password) {
|
|
|
11125
11125
|
this.password = password;
|
|
11126
11126
|
}
|
|
11127
11127
|
|
|
11128
|
-
util$
|
|
11128
|
+
util$V.inherits(PlainTextAuthenticator$2, Authenticator$3);
|
|
11129
11129
|
|
|
11130
11130
|
PlainTextAuthenticator$2.prototype.initialResponse = function (callback) {
|
|
11131
11131
|
const initialToken = Buffer.concat([
|
|
@@ -11162,7 +11162,7 @@ var plainTextAuthProvider = {
|
|
|
11162
11162
|
* See the License for the specific language governing permissions and
|
|
11163
11163
|
* limitations under the License.
|
|
11164
11164
|
*/
|
|
11165
|
-
const util$
|
|
11165
|
+
const util$U = require$$0$5;
|
|
11166
11166
|
const { Authenticator: Authenticator$2 } = provider$1;
|
|
11167
11167
|
|
|
11168
11168
|
const dseAuthenticatorName = 'com.datastax.bdp.cassandra.auth.DseAuthenticator';
|
|
@@ -11179,7 +11179,7 @@ function BaseDseAuthenticator$2(authenticatorName) {
|
|
|
11179
11179
|
this.authenticatorName = authenticatorName;
|
|
11180
11180
|
}
|
|
11181
11181
|
|
|
11182
|
-
util$
|
|
11182
|
+
util$U.inherits(BaseDseAuthenticator$2, Authenticator$2);
|
|
11183
11183
|
|
|
11184
11184
|
/**
|
|
11185
11185
|
* Return a Buffer containing the required SASL mechanism.
|
|
@@ -11239,7 +11239,7 @@ var baseDseAuthenticator = BaseDseAuthenticator$2;
|
|
|
11239
11239
|
* limitations under the License.
|
|
11240
11240
|
*/
|
|
11241
11241
|
|
|
11242
|
-
const util$
|
|
11242
|
+
const util$T = require$$0$5;
|
|
11243
11243
|
const utils$X = utils$11;
|
|
11244
11244
|
|
|
11245
11245
|
/**
|
|
@@ -11315,7 +11315,7 @@ class StandardGssClient extends GssapiClient$1 {
|
|
|
11315
11315
|
if (this.host) {
|
|
11316
11316
|
//For the principal "dse/cassandra1.datastax.com@DATASTAX.COM"
|
|
11317
11317
|
//the expected uri is: "dse@cassandra1.datastax.com"
|
|
11318
|
-
uri = util$
|
|
11318
|
+
uri = util$T.format("%s@%s", this.service, this.host);
|
|
11319
11319
|
}
|
|
11320
11320
|
const options = {
|
|
11321
11321
|
gssFlags: this.kerberos.GSS_C_MUTUAL_FLAG //authenticate itself flag
|
|
@@ -11392,7 +11392,7 @@ var gssapiClient = GssapiClient$1;
|
|
|
11392
11392
|
* See the License for the specific language governing permissions and
|
|
11393
11393
|
* limitations under the License.
|
|
11394
11394
|
*/
|
|
11395
|
-
const util$
|
|
11395
|
+
const util$S = require$$0$5;
|
|
11396
11396
|
const { AuthProvider: AuthProvider$4 } = provider$1;
|
|
11397
11397
|
const BaseDseAuthenticator$1 = baseDseAuthenticator;
|
|
11398
11398
|
const GssapiClient = gssapiClient;
|
|
@@ -11450,7 +11450,7 @@ function DseGssapiAuthProvider$1(gssOptions) {
|
|
|
11450
11450
|
this.hostNameResolver = gssOptions.hostNameResolver || DseGssapiAuthProvider$1.lookupServiceResolver;
|
|
11451
11451
|
}
|
|
11452
11452
|
|
|
11453
|
-
util$
|
|
11453
|
+
util$S.inherits(DseGssapiAuthProvider$1, AuthProvider$4);
|
|
11454
11454
|
|
|
11455
11455
|
/**
|
|
11456
11456
|
* Returns an Authenticator instance to be used by the driver when connecting to a host.
|
|
@@ -11540,7 +11540,7 @@ function GssapiAuthenticator(kerberosModule, address, authenticatorName, authori
|
|
|
11540
11540
|
}
|
|
11541
11541
|
|
|
11542
11542
|
//noinspection JSCheckFunctionSignatures
|
|
11543
|
-
util$
|
|
11543
|
+
util$S.inherits(GssapiAuthenticator, BaseDseAuthenticator$1);
|
|
11544
11544
|
|
|
11545
11545
|
GssapiAuthenticator.prototype.getMechanism = function () {
|
|
11546
11546
|
return mechanism$1;
|
|
@@ -11623,7 +11623,7 @@ var dseGssapiAuthProvider = DseGssapiAuthProvider$1;
|
|
|
11623
11623
|
* See the License for the specific language governing permissions and
|
|
11624
11624
|
* limitations under the License.
|
|
11625
11625
|
*/
|
|
11626
|
-
const util$
|
|
11626
|
+
const util$R = require$$0$5;
|
|
11627
11627
|
const { AuthProvider: AuthProvider$3 } = provider$1;
|
|
11628
11628
|
const BaseDseAuthenticator = baseDseAuthenticator;
|
|
11629
11629
|
const utils$V = utils$11;
|
|
@@ -11660,7 +11660,7 @@ function DsePlainTextAuthProvider$2(username, password, authorizationId) {
|
|
|
11660
11660
|
this.authorizationId = authorizationId;
|
|
11661
11661
|
}
|
|
11662
11662
|
|
|
11663
|
-
util$
|
|
11663
|
+
util$R.inherits(DsePlainTextAuthProvider$2, AuthProvider$3);
|
|
11664
11664
|
|
|
11665
11665
|
/**
|
|
11666
11666
|
* Returns an Authenticator instance to be used by the driver when connecting to a host.
|
|
@@ -11689,7 +11689,7 @@ function PlainTextAuthenticator$1(authenticatorName, authenticatorId, password,
|
|
|
11689
11689
|
this.authorizationId = utils$V.allocBufferFromString(authorizationId || '');
|
|
11690
11690
|
}
|
|
11691
11691
|
|
|
11692
|
-
util$
|
|
11692
|
+
util$R.inherits(PlainTextAuthenticator$1, BaseDseAuthenticator);
|
|
11693
11693
|
|
|
11694
11694
|
/** @override */
|
|
11695
11695
|
PlainTextAuthenticator$1.prototype.getMechanism = function () {
|
|
@@ -13475,7 +13475,7 @@ var require$$17 = {
|
|
|
13475
13475
|
* See the License for the specific language governing permissions and
|
|
13476
13476
|
* limitations under the License.
|
|
13477
13477
|
*/
|
|
13478
|
-
const util$
|
|
13478
|
+
const util$Q = require$$0$5;
|
|
13479
13479
|
|
|
13480
13480
|
const { FrameWriter } = writers;
|
|
13481
13481
|
const types$z = requireTypes$1();
|
|
@@ -13886,7 +13886,7 @@ class BatchRequest extends Request$2 {
|
|
|
13886
13886
|
//v3: <type><n><query_1>...<query_n><consistency><flags>[<serial_consistency>][<timestamp>]
|
|
13887
13887
|
//dseV1+: similar to v3/v4, flags is an int instead of a byte
|
|
13888
13888
|
if (!this.queries || !(this.queries.length > 0)) {
|
|
13889
|
-
throw new TypeError(util$
|
|
13889
|
+
throw new TypeError(util$Q.format('Invalid queries provided %s', this.queries));
|
|
13890
13890
|
}
|
|
13891
13891
|
const frameWriter = new FrameWriter(types$z.opcodes.batch);
|
|
13892
13892
|
let headerFlags = this.options.isQueryTracing() ? types$z.frameFlags.tracing : 0;
|
|
@@ -13966,7 +13966,7 @@ function CancelRequest(operationId) {
|
|
|
13966
13966
|
this.operationId = operationId;
|
|
13967
13967
|
}
|
|
13968
13968
|
|
|
13969
|
-
util$
|
|
13969
|
+
util$Q.inherits(CancelRequest, Request$2);
|
|
13970
13970
|
|
|
13971
13971
|
CancelRequest.prototype.write = function (encoder, streamId) {
|
|
13972
13972
|
const frameWriter = new FrameWriter(types$z.opcodes.cancel);
|
|
@@ -14018,7 +14018,7 @@ requests$7.options = options$1;
|
|
|
14018
14018
|
* limitations under the License.
|
|
14019
14019
|
*/
|
|
14020
14020
|
|
|
14021
|
-
const util$
|
|
14021
|
+
const util$P = require$$0$5;
|
|
14022
14022
|
const errors$v = errors$B;
|
|
14023
14023
|
|
|
14024
14024
|
/**
|
|
@@ -14085,7 +14085,7 @@ let ClientState$1 = class ClientState {
|
|
|
14085
14085
|
* Returns the string representation of the instance.
|
|
14086
14086
|
*/
|
|
14087
14087
|
toString() {
|
|
14088
|
-
return util$
|
|
14088
|
+
return util$P.format('{"hosts": %j, "openConnections": %j, "inFlightQueries": %j}',
|
|
14089
14089
|
this._hosts.map(function (h) { return h.address; }), this._openConnections, this._inFlightQueries);
|
|
14090
14090
|
}
|
|
14091
14091
|
|
|
@@ -14464,7 +14464,7 @@ var token$3 = {};
|
|
|
14464
14464
|
*/
|
|
14465
14465
|
|
|
14466
14466
|
const types$y = requireTypes$1();
|
|
14467
|
-
const util$
|
|
14467
|
+
const util$O = require$$0$5;
|
|
14468
14468
|
|
|
14469
14469
|
const _Murmur3TokenType = types$y.dataTypes.getByName('bigint');
|
|
14470
14470
|
const _RandomTokenType = types$y.dataTypes.getByName('varint');
|
|
@@ -14600,7 +14600,7 @@ let TokenRange$1 = class TokenRange {
|
|
|
14600
14600
|
*/
|
|
14601
14601
|
splitEvenly(numberOfSplits) {
|
|
14602
14602
|
if (numberOfSplits < 1) {
|
|
14603
|
-
throw new Error(util$
|
|
14603
|
+
throw new Error(util$O.format("numberOfSplits (%d) must be greater than 0.", numberOfSplits));
|
|
14604
14604
|
}
|
|
14605
14605
|
if (this.isEmpty()) {
|
|
14606
14606
|
throw new Error("Can't split empty range " + this.toString());
|
|
@@ -14720,7 +14720,7 @@ let TokenRange$1 = class TokenRange {
|
|
|
14720
14720
|
}
|
|
14721
14721
|
|
|
14722
14722
|
toString() {
|
|
14723
|
-
return util$
|
|
14723
|
+
return util$O.format(']%s, %s]',
|
|
14724
14724
|
this.start.toString(),
|
|
14725
14725
|
this.end.toString()
|
|
14726
14726
|
);
|
|
@@ -15454,7 +15454,7 @@ var geometry = Geometry$4;
|
|
|
15454
15454
|
* See the License for the specific language governing permissions and
|
|
15455
15455
|
* limitations under the License.
|
|
15456
15456
|
*/
|
|
15457
|
-
const util$
|
|
15457
|
+
const util$N = require$$0$5;
|
|
15458
15458
|
const utils$P = utils$11;
|
|
15459
15459
|
const Geometry$3 = geometry;
|
|
15460
15460
|
|
|
@@ -15490,7 +15490,7 @@ function Point$5(x, y) {
|
|
|
15490
15490
|
}
|
|
15491
15491
|
|
|
15492
15492
|
//noinspection JSCheckFunctionSignatures
|
|
15493
|
-
util$
|
|
15493
|
+
util$N.inherits(Point$5, Geometry$3);
|
|
15494
15494
|
|
|
15495
15495
|
/**
|
|
15496
15496
|
* Creates a {@link Point} instance from
|
|
@@ -15557,7 +15557,7 @@ Point$5.prototype.equals = function (other) {
|
|
|
15557
15557
|
* @returns {String}
|
|
15558
15558
|
*/
|
|
15559
15559
|
Point$5.prototype.toString = function () {
|
|
15560
|
-
return util$
|
|
15560
|
+
return util$N.format('POINT (%d %d)', this.x, this.y);
|
|
15561
15561
|
};
|
|
15562
15562
|
|
|
15563
15563
|
Point$5.prototype.useBESerialization = function () {
|
|
@@ -15588,7 +15588,7 @@ var point = Point$5;
|
|
|
15588
15588
|
* See the License for the specific language governing permissions and
|
|
15589
15589
|
* limitations under the License.
|
|
15590
15590
|
*/
|
|
15591
|
-
const util$
|
|
15591
|
+
const util$M = require$$0$5;
|
|
15592
15592
|
const utils$O = utils$11;
|
|
15593
15593
|
const Geometry$2 = geometry;
|
|
15594
15594
|
const Point$4 = point;
|
|
@@ -15621,7 +15621,7 @@ function LineString$3(point) {
|
|
|
15621
15621
|
}
|
|
15622
15622
|
|
|
15623
15623
|
//noinspection JSCheckFunctionSignatures
|
|
15624
|
-
util$
|
|
15624
|
+
util$M.inherits(LineString$3, Geometry$2);
|
|
15625
15625
|
|
|
15626
15626
|
/**
|
|
15627
15627
|
* Creates a {@link LineString} instance from
|
|
@@ -15643,7 +15643,7 @@ LineString$3.fromBuffer = function (buffer) {
|
|
|
15643
15643
|
const length = Geometry$2.readInt32(buffer, endianness, offset);
|
|
15644
15644
|
offset += 4;
|
|
15645
15645
|
if (buffer.length !== offset + length * 16) {
|
|
15646
|
-
throw new TypeError(util$
|
|
15646
|
+
throw new TypeError(util$M.format('Length of the buffer does not match %d !== %d', buffer.length, offset + length * 8));
|
|
15647
15647
|
}
|
|
15648
15648
|
const points = new Array(length);
|
|
15649
15649
|
for (let i = 0; i < length; i++) {
|
|
@@ -15785,7 +15785,7 @@ var lineString = LineString$3;
|
|
|
15785
15785
|
* See the License for the specific language governing permissions and
|
|
15786
15786
|
* limitations under the License.
|
|
15787
15787
|
*/
|
|
15788
|
-
const util$
|
|
15788
|
+
const util$L = require$$0$5;
|
|
15789
15789
|
const utils$N = utils$11;
|
|
15790
15790
|
const Geometry$1 = geometry;
|
|
15791
15791
|
const Point$3 = point;
|
|
@@ -15819,7 +15819,7 @@ function Polygon$2(ringPoints) {
|
|
|
15819
15819
|
}
|
|
15820
15820
|
|
|
15821
15821
|
//noinspection JSCheckFunctionSignatures
|
|
15822
|
-
util$
|
|
15822
|
+
util$L.inherits(Polygon$2, Geometry$1);
|
|
15823
15823
|
|
|
15824
15824
|
/**
|
|
15825
15825
|
* Creates a {@link Polygon} instance from
|
|
@@ -15845,7 +15845,7 @@ Polygon$2.fromBuffer = function (buffer) {
|
|
|
15845
15845
|
const pointsLength = Geometry$1.readInt32(buffer, endianness, offset);
|
|
15846
15846
|
offset += 4;
|
|
15847
15847
|
if (buffer.length < offset + pointsLength * 16) {
|
|
15848
|
-
throw new TypeError(util$
|
|
15848
|
+
throw new TypeError(util$L.format('Length of the buffer does not match'));
|
|
15849
15849
|
}
|
|
15850
15850
|
const ring = new Array(pointsLength);
|
|
15851
15851
|
for (let i = 0; i < pointsLength; i++) {
|
|
@@ -16054,7 +16054,7 @@ geometry$1.Polygon = polygon;
|
|
|
16054
16054
|
* See the License for the specific language governing permissions and
|
|
16055
16055
|
* limitations under the License.
|
|
16056
16056
|
*/
|
|
16057
|
-
const util$
|
|
16057
|
+
const util$K = require$$0$5;
|
|
16058
16058
|
|
|
16059
16059
|
const types$x = requireTypes$1();
|
|
16060
16060
|
const dataTypes$4 = types$x.dataTypes;
|
|
@@ -16434,12 +16434,12 @@ function defineInstanceMembers() {
|
|
|
16434
16434
|
value = parseFloat(value);
|
|
16435
16435
|
|
|
16436
16436
|
if (Number.isNaN(value)) {
|
|
16437
|
-
throw new TypeError(`Expected string representation of a number, obtained ${util$
|
|
16437
|
+
throw new TypeError(`Expected string representation of a number, obtained ${util$K.inspect(value)}`);
|
|
16438
16438
|
}
|
|
16439
16439
|
}
|
|
16440
16440
|
|
|
16441
16441
|
if (typeof value !== 'number') {
|
|
16442
|
-
throw new TypeError('Expected Number, obtained ' + util$
|
|
16442
|
+
throw new TypeError('Expected Number, obtained ' + util$K.inspect(value));
|
|
16443
16443
|
}
|
|
16444
16444
|
|
|
16445
16445
|
const buf = utils$M.allocBufferUnsafe(4);
|
|
@@ -16453,12 +16453,12 @@ function defineInstanceMembers() {
|
|
|
16453
16453
|
value = parseFloat(value);
|
|
16454
16454
|
|
|
16455
16455
|
if (Number.isNaN(value)) {
|
|
16456
|
-
throw new TypeError(`Expected string representation of a number, obtained ${util$
|
|
16456
|
+
throw new TypeError(`Expected string representation of a number, obtained ${util$K.inspect(value)}`);
|
|
16457
16457
|
}
|
|
16458
16458
|
}
|
|
16459
16459
|
|
|
16460
16460
|
if (typeof value !== 'number') {
|
|
16461
|
-
throw new TypeError('Expected Number, obtained ' + util$
|
|
16461
|
+
throw new TypeError('Expected Number, obtained ' + util$K.inspect(value));
|
|
16462
16462
|
}
|
|
16463
16463
|
|
|
16464
16464
|
const buf = utils$M.allocBufferUnsafe(8);
|
|
@@ -16508,7 +16508,7 @@ function defineInstanceMembers() {
|
|
|
16508
16508
|
throw new TypeError('LocalDate could not be parsed ' + err);
|
|
16509
16509
|
}
|
|
16510
16510
|
if (!(value instanceof types$x.LocalDate)) {
|
|
16511
|
-
throw new TypeError('Expected Date/String/LocalDate, obtained ' + util$
|
|
16511
|
+
throw new TypeError('Expected Date/String/LocalDate, obtained ' + util$K.inspect(originalValue));
|
|
16512
16512
|
}
|
|
16513
16513
|
return value.toBuffer();
|
|
16514
16514
|
};
|
|
@@ -16530,7 +16530,7 @@ function defineInstanceMembers() {
|
|
|
16530
16530
|
throw new TypeError('LocalTime could not be parsed ' + err);
|
|
16531
16531
|
}
|
|
16532
16532
|
if (!(value instanceof types$x.LocalTime)) {
|
|
16533
|
-
throw new TypeError('Expected String/LocalTime, obtained ' + util$
|
|
16533
|
+
throw new TypeError('Expected String/LocalTime, obtained ' + util$K.inspect(originalValue));
|
|
16534
16534
|
}
|
|
16535
16535
|
return value.toBuffer();
|
|
16536
16536
|
};
|
|
@@ -16549,7 +16549,7 @@ function defineInstanceMembers() {
|
|
|
16549
16549
|
} else if (value instanceof types$x.Uuid) {
|
|
16550
16550
|
value = value.getBuffer();
|
|
16551
16551
|
} else {
|
|
16552
|
-
throw new TypeError('Not a valid Uuid, expected Uuid/String/Buffer, obtained ' + util$
|
|
16552
|
+
throw new TypeError('Not a valid Uuid, expected Uuid/String/Buffer, obtained ' + util$K.inspect(value));
|
|
16553
16553
|
}
|
|
16554
16554
|
|
|
16555
16555
|
return value;
|
|
@@ -16567,7 +16567,7 @@ function defineInstanceMembers() {
|
|
|
16567
16567
|
value = value.getBuffer();
|
|
16568
16568
|
}
|
|
16569
16569
|
if (!(value instanceof Buffer)) {
|
|
16570
|
-
throw new TypeError('Not a valid Inet, expected InetAddress/Buffer, obtained ' + util$
|
|
16570
|
+
throw new TypeError('Not a valid Inet, expected InetAddress/Buffer, obtained ' + util$K.inspect(value));
|
|
16571
16571
|
}
|
|
16572
16572
|
return value;
|
|
16573
16573
|
};
|
|
@@ -16592,7 +16592,7 @@ function defineInstanceMembers() {
|
|
|
16592
16592
|
}
|
|
16593
16593
|
|
|
16594
16594
|
if (buf === null) {
|
|
16595
|
-
throw new TypeError('Not a valid bigint, expected Long/Number/String/Buffer, obtained ' + util$
|
|
16595
|
+
throw new TypeError('Not a valid bigint, expected Long/Number/String/Buffer, obtained ' + util$K.inspect(value));
|
|
16596
16596
|
}
|
|
16597
16597
|
|
|
16598
16598
|
return buf;
|
|
@@ -16607,7 +16607,7 @@ function defineInstanceMembers() {
|
|
|
16607
16607
|
// eslint-disable-next-line valid-typeof
|
|
16608
16608
|
if (typeof value !== 'bigint') {
|
|
16609
16609
|
// Only BigInt values are supported
|
|
16610
|
-
throw new TypeError('Not a valid BigInt value, obtained ' + util$
|
|
16610
|
+
throw new TypeError('Not a valid BigInt value, obtained ' + util$K.inspect(value));
|
|
16611
16611
|
}
|
|
16612
16612
|
|
|
16613
16613
|
const buffer = utils$M.allocBufferUnsafe(8);
|
|
@@ -16640,7 +16640,7 @@ function defineInstanceMembers() {
|
|
|
16640
16640
|
buf = Integer$1.toBuffer(value);
|
|
16641
16641
|
}
|
|
16642
16642
|
if (buf === null) {
|
|
16643
|
-
throw new TypeError('Not a valid varint, expected Integer/Number/String/Buffer, obtained ' + util$
|
|
16643
|
+
throw new TypeError('Not a valid varint, expected Integer/Number/String/Buffer, obtained ' + util$K.inspect(value));
|
|
16644
16644
|
}
|
|
16645
16645
|
return buf;
|
|
16646
16646
|
};
|
|
@@ -16653,7 +16653,7 @@ function defineInstanceMembers() {
|
|
|
16653
16653
|
|
|
16654
16654
|
// eslint-disable-next-line valid-typeof
|
|
16655
16655
|
if (typeof value !== 'bigint') {
|
|
16656
|
-
throw new TypeError('Not a valid varint, expected BigInt, obtained ' + util$
|
|
16656
|
+
throw new TypeError('Not a valid varint, expected BigInt, obtained ' + util$K.inspect(value));
|
|
16657
16657
|
}
|
|
16658
16658
|
|
|
16659
16659
|
if (value === bigInt0) {
|
|
@@ -16712,14 +16712,14 @@ function defineInstanceMembers() {
|
|
|
16712
16712
|
if (value instanceof BigDecimal) {
|
|
16713
16713
|
buf = BigDecimal.toBuffer(value);
|
|
16714
16714
|
} else {
|
|
16715
|
-
throw new TypeError('Not a valid varint, expected BigDecimal/Number/String/Buffer, obtained ' + util$
|
|
16715
|
+
throw new TypeError('Not a valid varint, expected BigDecimal/Number/String/Buffer, obtained ' + util$K.inspect(value));
|
|
16716
16716
|
}
|
|
16717
16717
|
|
|
16718
16718
|
return buf;
|
|
16719
16719
|
};
|
|
16720
16720
|
this.encodeString = function (value, encoding) {
|
|
16721
16721
|
if (typeof value !== 'string') {
|
|
16722
|
-
throw new TypeError('Not a valid text value, expected String obtained ' + util$
|
|
16722
|
+
throw new TypeError('Not a valid text value, expected String obtained ' + util$K.inspect(value));
|
|
16723
16723
|
}
|
|
16724
16724
|
return utils$M.allocBufferFromString(value, encoding);
|
|
16725
16725
|
};
|
|
@@ -16731,7 +16731,7 @@ function defineInstanceMembers() {
|
|
|
16731
16731
|
};
|
|
16732
16732
|
this.encodeBlob = function (value) {
|
|
16733
16733
|
if (!(value instanceof Buffer)) {
|
|
16734
|
-
throw new TypeError('Not a valid blob, expected Buffer obtained ' + util$
|
|
16734
|
+
throw new TypeError('Not a valid blob, expected Buffer obtained ' + util$K.inspect(value));
|
|
16735
16735
|
}
|
|
16736
16736
|
return value;
|
|
16737
16737
|
};
|
|
@@ -16756,7 +16756,7 @@ function defineInstanceMembers() {
|
|
|
16756
16756
|
*/
|
|
16757
16757
|
this.encodeInt = function (value) {
|
|
16758
16758
|
if (isNaN(value)) {
|
|
16759
|
-
throw new TypeError('Expected Number, obtained ' + util$
|
|
16759
|
+
throw new TypeError('Expected Number, obtained ' + util$K.inspect(value));
|
|
16760
16760
|
}
|
|
16761
16761
|
const buf = utils$M.allocBufferUnsafe(4);
|
|
16762
16762
|
buf.writeInt32BE(value, 0);
|
|
@@ -16768,7 +16768,7 @@ function defineInstanceMembers() {
|
|
|
16768
16768
|
*/
|
|
16769
16769
|
this.encodeSmallint = function (value) {
|
|
16770
16770
|
if (isNaN(value)) {
|
|
16771
|
-
throw new TypeError('Expected Number, obtained ' + util$
|
|
16771
|
+
throw new TypeError('Expected Number, obtained ' + util$K.inspect(value));
|
|
16772
16772
|
}
|
|
16773
16773
|
const buf = utils$M.allocBufferUnsafe(2);
|
|
16774
16774
|
buf.writeInt16BE(value, 0);
|
|
@@ -16780,7 +16780,7 @@ function defineInstanceMembers() {
|
|
|
16780
16780
|
*/
|
|
16781
16781
|
this.encodeTinyint = function (value) {
|
|
16782
16782
|
if (isNaN(value)) {
|
|
16783
|
-
throw new TypeError('Expected Number, obtained ' + util$
|
|
16783
|
+
throw new TypeError('Expected Number, obtained ' + util$K.inspect(value));
|
|
16784
16784
|
}
|
|
16785
16785
|
const buf = utils$M.allocBufferUnsafe(1);
|
|
16786
16786
|
buf.writeInt8(value, 0);
|
|
@@ -16788,7 +16788,7 @@ function defineInstanceMembers() {
|
|
|
16788
16788
|
};
|
|
16789
16789
|
this.encodeList = function (value, subtype) {
|
|
16790
16790
|
if (!Array.isArray(value)) {
|
|
16791
|
-
throw new TypeError('Not a valid list value, expected Array obtained ' + util$
|
|
16791
|
+
throw new TypeError('Not a valid list value, expected Array obtained ' + util$K.inspect(value));
|
|
16792
16792
|
}
|
|
16793
16793
|
if (value.length === 0) {
|
|
16794
16794
|
return null;
|
|
@@ -16970,7 +16970,7 @@ function defineInstanceMembers() {
|
|
|
16970
16970
|
return;
|
|
16971
16971
|
}
|
|
16972
16972
|
|
|
16973
|
-
throw new TypeError(`Unexpected routingKey '${util$
|
|
16973
|
+
throw new TypeError(`Unexpected routingKey '${util$K.inspect(userRoutingKey)}' provided. ` +
|
|
16974
16974
|
`Expected Buffer, Array<Buffer>, Token, or TokenRange.`);
|
|
16975
16975
|
}
|
|
16976
16976
|
|
|
@@ -17598,7 +17598,7 @@ Encoder$2.prototype.encode = function (value, typeInfo) {
|
|
|
17598
17598
|
//Lets guess
|
|
17599
17599
|
type = Encoder$2.guessDataType(value);
|
|
17600
17600
|
if (!type) {
|
|
17601
|
-
throw new TypeError('Target data type could not be guessed, you should use prepared statements for accurate type mapping. Value: ' + util$
|
|
17601
|
+
throw new TypeError('Target data type could not be guessed, you should use prepared statements for accurate type mapping. Value: ' + util$K.inspect(value));
|
|
17602
17602
|
}
|
|
17603
17603
|
}
|
|
17604
17604
|
|
|
@@ -17777,7 +17777,7 @@ function decodeDuration(bytes) {
|
|
|
17777
17777
|
|
|
17778
17778
|
function encodeDuration(value) {
|
|
17779
17779
|
if (!(value instanceof types$x.Duration)) {
|
|
17780
|
-
throw new TypeError('Not a valid duration, expected Duration/Buffer obtained ' + util$
|
|
17780
|
+
throw new TypeError('Not a valid duration, expected Duration/Buffer obtained ' + util$K.inspect(value));
|
|
17781
17781
|
}
|
|
17782
17782
|
return value.toBuffer();
|
|
17783
17783
|
}
|
|
@@ -17922,7 +17922,7 @@ var streams$2 = {};
|
|
|
17922
17922
|
* limitations under the License.
|
|
17923
17923
|
*/
|
|
17924
17924
|
|
|
17925
|
-
const util$
|
|
17925
|
+
const util$J = require$$0$5;
|
|
17926
17926
|
const utils$L = utils$11;
|
|
17927
17927
|
const types$w = requireTypes$1();
|
|
17928
17928
|
const errors$u = errors$B;
|
|
@@ -18299,7 +18299,7 @@ let FrameReader$1 = class FrameReader {
|
|
|
18299
18299
|
err.consistencies = this.readShort();
|
|
18300
18300
|
err.required = this.readInt();
|
|
18301
18301
|
err.alive = this.readInt();
|
|
18302
|
-
err.message = util$
|
|
18302
|
+
err.message = util$J.format(_unavailableMessage, types$w.consistencyToString[err.consistencies], err.required, err.alive);
|
|
18303
18303
|
break;
|
|
18304
18304
|
case types$w.responseErrorCodes.readTimeout:
|
|
18305
18305
|
case types$w.responseErrorCodes.readFailure:
|
|
@@ -18319,7 +18319,7 @@ let FrameReader$1 = class FrameReader {
|
|
|
18319
18319
|
if (code === types$w.responseErrorCodes.readTimeout) {
|
|
18320
18320
|
let details;
|
|
18321
18321
|
if (err.received < err.blockFor) {
|
|
18322
|
-
details = util$
|
|
18322
|
+
details = util$J.format('%d replica(s) responded over %d required', err.received, err.blockFor);
|
|
18323
18323
|
}
|
|
18324
18324
|
else if (!err.isDataPresent) {
|
|
18325
18325
|
details = 'the replica queried for the data didn\'t respond';
|
|
@@ -18327,10 +18327,10 @@ let FrameReader$1 = class FrameReader {
|
|
|
18327
18327
|
else {
|
|
18328
18328
|
details = 'timeout while waiting for repair of inconsistent replica';
|
|
18329
18329
|
}
|
|
18330
|
-
err.message = util$
|
|
18330
|
+
err.message = util$J.format(_readTimeoutMessage, types$w.consistencyToString[err.consistencies], details);
|
|
18331
18331
|
}
|
|
18332
18332
|
else {
|
|
18333
|
-
err.message = util$
|
|
18333
|
+
err.message = util$J.format(_readFailureMessage, types$w.consistencyToString[err.consistencies], err.blockFor, err.received, err.failures);
|
|
18334
18334
|
}
|
|
18335
18335
|
break;
|
|
18336
18336
|
case types$w.responseErrorCodes.writeTimeout:
|
|
@@ -18350,10 +18350,10 @@ let FrameReader$1 = class FrameReader {
|
|
|
18350
18350
|
err.writeType = this.readString();
|
|
18351
18351
|
if (code === types$w.responseErrorCodes.writeTimeout) {
|
|
18352
18352
|
const template = err.writeType === 'BATCH_LOG' ? _writeTimeoutBatchLogMessage : _writeTimeoutQueryMessage;
|
|
18353
|
-
err.message = util$
|
|
18353
|
+
err.message = util$J.format(template, types$w.consistencyToString[err.consistencies], err.received, err.blockFor);
|
|
18354
18354
|
}
|
|
18355
18355
|
else {
|
|
18356
|
-
err.message = util$
|
|
18356
|
+
err.message = util$J.format(_writeFailureMessage, types$w.consistencyToString[err.consistencies], err.blockFor, err.received, err.failures);
|
|
18357
18357
|
}
|
|
18358
18358
|
break;
|
|
18359
18359
|
case types$w.responseErrorCodes.unprepared:
|
|
@@ -18463,7 +18463,7 @@ var readers = { FrameReader: FrameReader$1 };
|
|
|
18463
18463
|
* limitations under the License.
|
|
18464
18464
|
*/
|
|
18465
18465
|
|
|
18466
|
-
const util$
|
|
18466
|
+
const util$I = require$$0$5;
|
|
18467
18467
|
const { Transform, Writable: Writable$1 } = require$$0$a;
|
|
18468
18468
|
|
|
18469
18469
|
const types$v = requireTypes$1();
|
|
@@ -18486,7 +18486,7 @@ function Protocol (options) {
|
|
|
18486
18486
|
this.headerSize = 0;
|
|
18487
18487
|
}
|
|
18488
18488
|
|
|
18489
|
-
util$
|
|
18489
|
+
util$I.inherits(Protocol, Transform);
|
|
18490
18490
|
|
|
18491
18491
|
Protocol.prototype._transform = function (chunk, encoding, callback) {
|
|
18492
18492
|
let error = null;
|
|
@@ -18589,7 +18589,7 @@ function Parser$2 (streamOptions, encoder) {
|
|
|
18589
18589
|
this.encoder = encoder;
|
|
18590
18590
|
}
|
|
18591
18591
|
|
|
18592
|
-
util$
|
|
18592
|
+
util$I.inherits(Parser$2, Transform);
|
|
18593
18593
|
|
|
18594
18594
|
Parser$2.prototype._transform = function (item, encoding, callback) {
|
|
18595
18595
|
const frameInfo = this.frameState(item);
|
|
@@ -18960,7 +18960,7 @@ function ResultEmitter(options) {
|
|
|
18960
18960
|
this.rowBuffer = {};
|
|
18961
18961
|
}
|
|
18962
18962
|
|
|
18963
|
-
util$
|
|
18963
|
+
util$I.inherits(ResultEmitter, Writable$1);
|
|
18964
18964
|
|
|
18965
18965
|
ResultEmitter.prototype._write = function (item, encoding, callback) {
|
|
18966
18966
|
let error = null;
|
|
@@ -19244,7 +19244,7 @@ var streamIdStack = StreamIdStack$1;
|
|
|
19244
19244
|
* limitations under the License.
|
|
19245
19245
|
*/
|
|
19246
19246
|
|
|
19247
|
-
const util$
|
|
19247
|
+
const util$H = require$$0$5;
|
|
19248
19248
|
const utils$J = utils$11;
|
|
19249
19249
|
const errors$s = errors$B;
|
|
19250
19250
|
const requests$6 = requests$7;
|
|
@@ -19332,7 +19332,7 @@ let OperationState$1 = class OperationState {
|
|
|
19332
19332
|
const self = this;
|
|
19333
19333
|
this._timeout = setTimeout(function requestTimedOut() {
|
|
19334
19334
|
onTimeout();
|
|
19335
|
-
const message = util$
|
|
19335
|
+
const message = util$H.format('The host %s did not reply before timeout %d ms', address, millis);
|
|
19336
19336
|
self._markAsTimedOut(new errors$s.OperationTimedOutError(message, address), onResponse);
|
|
19337
19337
|
}, millis);
|
|
19338
19338
|
}
|
|
@@ -19409,7 +19409,7 @@ var operationState = OperationState$1;
|
|
|
19409
19409
|
*/
|
|
19410
19410
|
|
|
19411
19411
|
const events$c = require$$0$7;
|
|
19412
|
-
const util$
|
|
19412
|
+
const util$G = require$$0$5;
|
|
19413
19413
|
const tls$2 = require$$1$3;
|
|
19414
19414
|
const net$5 = require$$0$6;
|
|
19415
19415
|
|
|
@@ -19513,10 +19513,10 @@ let Connection$5 = class Connection extends events$c.EventEmitter {
|
|
|
19513
19513
|
*/
|
|
19514
19514
|
this.isSocketOpen = false;
|
|
19515
19515
|
|
|
19516
|
-
this.send = util$
|
|
19517
|
-
this.closeAsync = util$
|
|
19518
|
-
this.openAsync = util$
|
|
19519
|
-
this.prepareOnceAsync = util$
|
|
19516
|
+
this.send = util$G.promisify(this.sendStream);
|
|
19517
|
+
this.closeAsync = util$G.promisify(this.close);
|
|
19518
|
+
this.openAsync = util$G.promisify(this.open);
|
|
19519
|
+
this.prepareOnceAsync = util$G.promisify(this.prepareOnce);
|
|
19520
19520
|
}
|
|
19521
19521
|
|
|
19522
19522
|
/**
|
|
@@ -19837,7 +19837,7 @@ let Connection$5 = class Connection extends events$c.EventEmitter {
|
|
|
19837
19837
|
});
|
|
19838
19838
|
}
|
|
19839
19839
|
|
|
19840
|
-
callback(new errors$r.DriverInternalError('Unexpected response from Cassandra: ' + util$
|
|
19840
|
+
callback(new errors$r.DriverInternalError('Unexpected response from Cassandra: ' + util$G.inspect(result)));
|
|
19841
19841
|
});
|
|
19842
19842
|
}
|
|
19843
19843
|
|
|
@@ -20196,7 +20196,7 @@ var connection$5 = Connection$5;
|
|
|
20196
20196
|
* See the License for the specific language governing permissions and
|
|
20197
20197
|
* limitations under the License.
|
|
20198
20198
|
*/
|
|
20199
|
-
const util$
|
|
20199
|
+
const util$F = require$$0$5;
|
|
20200
20200
|
const events$b = require$$0$7;
|
|
20201
20201
|
|
|
20202
20202
|
const Connection$4 = connection$5;
|
|
@@ -20584,7 +20584,7 @@ let HostConnectionPool$1 = class HostConnectionPool extends events$b.EventEmitte
|
|
|
20584
20584
|
const connections = this.connections;
|
|
20585
20585
|
this.connections = utils$H.emptyArray;
|
|
20586
20586
|
let closedConnections = 0;
|
|
20587
|
-
this.log('info', util$
|
|
20587
|
+
this.log('info', util$F.format('Draining and closing %d connections to %s', connections.length, this._address));
|
|
20588
20588
|
let wasClosed = false;
|
|
20589
20589
|
// eslint-disable-next-line prefer-const
|
|
20590
20590
|
let checkShutdownTimeout;
|
|
@@ -20687,7 +20687,7 @@ let HostConnectionPool$1 = class HostConnectionPool extends events$b.EventEmitte
|
|
|
20687
20687
|
return;
|
|
20688
20688
|
}
|
|
20689
20689
|
|
|
20690
|
-
this.log('info', util$
|
|
20690
|
+
this.log('info', util$F.format('Closing %d connections to %s', connections.length, this._address));
|
|
20691
20691
|
|
|
20692
20692
|
await Promise.all(connections.map(c => c.closeAsync()));
|
|
20693
20693
|
}
|
|
@@ -22260,7 +22260,7 @@ var schemaParser = {};
|
|
|
22260
22260
|
* See the License for the specific language governing permissions and
|
|
22261
22261
|
* limitations under the License.
|
|
22262
22262
|
*/
|
|
22263
|
-
const util$
|
|
22263
|
+
const util$E = require$$0$5;
|
|
22264
22264
|
const events$9 = require$$0$7;
|
|
22265
22265
|
/**
|
|
22266
22266
|
* Creates a new instance of DataCollection
|
|
@@ -22414,7 +22414,7 @@ function DataCollection$2(name) {
|
|
|
22414
22414
|
this.nodesync = null;
|
|
22415
22415
|
}
|
|
22416
22416
|
|
|
22417
|
-
util$
|
|
22417
|
+
util$E.inherits(DataCollection$2, events$9.EventEmitter);
|
|
22418
22418
|
|
|
22419
22419
|
var dataCollection = DataCollection$2;
|
|
22420
22420
|
|
|
@@ -22434,7 +22434,7 @@ var dataCollection = DataCollection$2;
|
|
|
22434
22434
|
* limitations under the License.
|
|
22435
22435
|
*/
|
|
22436
22436
|
|
|
22437
|
-
const util$
|
|
22437
|
+
const util$D = require$$0$5;
|
|
22438
22438
|
const DataCollection$1 = dataCollection;
|
|
22439
22439
|
/**
|
|
22440
22440
|
* Creates a new instance of TableMetadata
|
|
@@ -22491,7 +22491,7 @@ function TableMetadata$1(name) {
|
|
|
22491
22491
|
this.virtual = false;
|
|
22492
22492
|
}
|
|
22493
22493
|
|
|
22494
|
-
util$
|
|
22494
|
+
util$D.inherits(TableMetadata$1, DataCollection$1);
|
|
22495
22495
|
|
|
22496
22496
|
var tableMetadata = TableMetadata$1;
|
|
22497
22497
|
|
|
@@ -22571,7 +22571,7 @@ function Aggregate$1() {
|
|
|
22571
22571
|
this.deterministic = null;
|
|
22572
22572
|
}
|
|
22573
22573
|
|
|
22574
|
-
var aggregate$
|
|
22574
|
+
var aggregate$2 = Aggregate$1;
|
|
22575
22575
|
|
|
22576
22576
|
/*
|
|
22577
22577
|
* Copyright DataStax, Inc.
|
|
@@ -22685,7 +22685,7 @@ var schemaFunction = SchemaFunction$1;
|
|
|
22685
22685
|
* See the License for the specific language governing permissions and
|
|
22686
22686
|
* limitations under the License.
|
|
22687
22687
|
*/
|
|
22688
|
-
const util$
|
|
22688
|
+
const util$C = require$$0$5;
|
|
22689
22689
|
const utils$D = utils$11;
|
|
22690
22690
|
const types$p = requireTypes$1();
|
|
22691
22691
|
|
|
@@ -22787,14 +22787,14 @@ Index$1.fromColumnRows = function (columnRows, columnsByName) {
|
|
|
22787
22787
|
let target;
|
|
22788
22788
|
const options = JSON.parse(row['index_options']);
|
|
22789
22789
|
if (options !== null && options['index_keys'] !== undefined) {
|
|
22790
|
-
target = util$
|
|
22790
|
+
target = util$C.format("keys(%s)", c.name);
|
|
22791
22791
|
}
|
|
22792
22792
|
else if (options !== null && options['index_keys_and_values'] !== undefined) {
|
|
22793
|
-
target = util$
|
|
22793
|
+
target = util$C.format("entries(%s)", c.name);
|
|
22794
22794
|
}
|
|
22795
22795
|
else if (c.type.options.frozen && (c.type.code === types$p.dataTypes.map || c.type.code === types$p.dataTypes.list ||
|
|
22796
22796
|
c.type.code === types$p.dataTypes.set)) {
|
|
22797
|
-
target = util$
|
|
22797
|
+
target = util$C.format("full(%s)", c.name);
|
|
22798
22798
|
}
|
|
22799
22799
|
else {
|
|
22800
22800
|
target = c.name;
|
|
@@ -22834,7 +22834,7 @@ var schemaIndex = Index$1;
|
|
|
22834
22834
|
* See the License for the specific language governing permissions and
|
|
22835
22835
|
* limitations under the License.
|
|
22836
22836
|
*/
|
|
22837
|
-
const util$
|
|
22837
|
+
const util$B = require$$0$5;
|
|
22838
22838
|
const DataCollection = dataCollection;
|
|
22839
22839
|
/**
|
|
22840
22840
|
* Creates a new MaterializedView.
|
|
@@ -22863,7 +22863,7 @@ function MaterializedView$1(name) {
|
|
|
22863
22863
|
this.includeAllColumns = false;
|
|
22864
22864
|
}
|
|
22865
22865
|
|
|
22866
|
-
util$
|
|
22866
|
+
util$B.inherits(MaterializedView$1, DataCollection);
|
|
22867
22867
|
|
|
22868
22868
|
var materializedView = MaterializedView$1;
|
|
22869
22869
|
|
|
@@ -22882,18 +22882,18 @@ var materializedView = MaterializedView$1;
|
|
|
22882
22882
|
* See the License for the specific language governing permissions and
|
|
22883
22883
|
* limitations under the License.
|
|
22884
22884
|
*/
|
|
22885
|
-
const util$
|
|
22885
|
+
const util$A = require$$0$5;
|
|
22886
22886
|
const events$8 = require$$0$7;
|
|
22887
22887
|
const types$o = requireTypes$1();
|
|
22888
22888
|
const utils$C = utils$11;
|
|
22889
22889
|
const errors$o = errors$B;
|
|
22890
22890
|
const promiseUtils$7 = promiseUtils$e;
|
|
22891
22891
|
const TableMetadata = tableMetadata;
|
|
22892
|
-
const Aggregate = aggregate$
|
|
22892
|
+
const Aggregate = aggregate$2;
|
|
22893
22893
|
const SchemaFunction = schemaFunction;
|
|
22894
22894
|
const Index = schemaIndex;
|
|
22895
22895
|
const MaterializedView = materializedView;
|
|
22896
|
-
const { format } = util$
|
|
22896
|
+
const { format } = util$A;
|
|
22897
22897
|
|
|
22898
22898
|
/**
|
|
22899
22899
|
* @module metadata/schemaParser
|
|
@@ -23013,11 +23013,11 @@ class SchemaParser {
|
|
|
23013
23013
|
let indexRows;
|
|
23014
23014
|
let virtualTable = virtual;
|
|
23015
23015
|
const selectTable = virtualTable ? _selectVirtualTable : this.selectTable;
|
|
23016
|
-
const query = util$
|
|
23016
|
+
const query = util$A.format(selectTable, keyspaceName, name);
|
|
23017
23017
|
let tableRow = await this._getFirstRow(query);
|
|
23018
23018
|
// if we weren't sure if table was virtual or not, query virtual schema.
|
|
23019
23019
|
if (!tableRow && this.supportsVirtual && virtualTable === undefined) {
|
|
23020
|
-
const query = util$
|
|
23020
|
+
const query = util$A.format(_selectVirtualTable, keyspaceName, name);
|
|
23021
23021
|
try {
|
|
23022
23022
|
tableRow = await this._getFirstRow(query);
|
|
23023
23023
|
}
|
|
@@ -23037,9 +23037,9 @@ class SchemaParser {
|
|
|
23037
23037
|
return null;
|
|
23038
23038
|
}
|
|
23039
23039
|
const selectColumns = virtualTable ? _selectVirtualColumns : this.selectColumns;
|
|
23040
|
-
const columnRows = await this._getRows(util$
|
|
23040
|
+
const columnRows = await this._getRows(util$A.format(selectColumns, keyspaceName, name));
|
|
23041
23041
|
if (this.selectIndexes && !virtualTable) {
|
|
23042
|
-
indexRows = await this._getRows(util$
|
|
23042
|
+
indexRows = await this._getRows(util$A.format(this.selectIndexes, keyspaceName, name));
|
|
23043
23043
|
}
|
|
23044
23044
|
await this._parseTableOrView(tableInfo, tableRow, columnRows, indexRows, virtualTable);
|
|
23045
23045
|
tableInfo.loaded = true;
|
|
@@ -24060,7 +24060,7 @@ schemaParser.isDoneForToken = isDoneForToken;
|
|
|
24060
24060
|
*/
|
|
24061
24061
|
|
|
24062
24062
|
const events$7 = require$$0$7;
|
|
24063
|
-
const util$
|
|
24063
|
+
const util$z = require$$0$5;
|
|
24064
24064
|
|
|
24065
24065
|
/**
|
|
24066
24066
|
* Module containing classes and fields related to metadata.
|
|
@@ -24262,7 +24262,7 @@ let Metadata$1 = class Metadata {
|
|
|
24262
24262
|
if (!this.initialized) {
|
|
24263
24263
|
throw this._uninitializedError();
|
|
24264
24264
|
}
|
|
24265
|
-
this.log('info', util$
|
|
24265
|
+
this.log('info', util$z.format('Retrieving keyspace %s metadata', name));
|
|
24266
24266
|
try {
|
|
24267
24267
|
const ksInfo = await this._schemaParser.getKeyspace(name);
|
|
24268
24268
|
if (!ksInfo) {
|
|
@@ -24434,7 +24434,7 @@ let Metadata$1 = class Metadata {
|
|
|
24434
24434
|
if (Array.isArray(components)) {
|
|
24435
24435
|
return this.tokenizer.hash(Buffer.concat(components));
|
|
24436
24436
|
}
|
|
24437
|
-
else if (util$
|
|
24437
|
+
else if (util$z.isString(components)) {
|
|
24438
24438
|
return this.tokenizer.parse(components);
|
|
24439
24439
|
}
|
|
24440
24440
|
return this.tokenizer.hash(components);
|
|
@@ -24805,8 +24805,8 @@ let Metadata$1 = class Metadata {
|
|
|
24805
24805
|
const info = ExecutionOptions$1.empty();
|
|
24806
24806
|
info.getConsistency = () => consistency;
|
|
24807
24807
|
|
|
24808
|
-
const sessionRequest = new requests$4.QueryRequest(util$
|
|
24809
|
-
const eventsRequest = new requests$4.QueryRequest(util$
|
|
24808
|
+
const sessionRequest = new requests$4.QueryRequest(util$z.format(_selectTraceSession, traceId), null, info);
|
|
24809
|
+
const eventsRequest = new requests$4.QueryRequest(util$z.format(_selectTraceEvents, traceId), null, info);
|
|
24810
24810
|
|
|
24811
24811
|
while (!trace && (attempts++ < _traceMaxAttemps)) {
|
|
24812
24812
|
const sessionResponse = await this.controlConnection.query(sessionRequest);
|
|
@@ -25082,7 +25082,7 @@ var metadata = Metadata$1;
|
|
|
25082
25082
|
* limitations under the License.
|
|
25083
25083
|
*/
|
|
25084
25084
|
|
|
25085
|
-
const util$
|
|
25085
|
+
const util$y = require$$0$5;
|
|
25086
25086
|
const utils$A = utils$11;
|
|
25087
25087
|
const promiseUtils$5 = promiseUtils$e;
|
|
25088
25088
|
|
|
@@ -25126,7 +25126,7 @@ let EventDebouncer$1 = class EventDebouncer {
|
|
|
25126
25126
|
}
|
|
25127
25127
|
if (this._queue.callbacks.length === _queueOverflowThreshold) {
|
|
25128
25128
|
// warn once
|
|
25129
|
-
this._logger('warn', util$
|
|
25129
|
+
this._logger('warn', util$y.format('Event debouncer queue exceeded %d events', _queueOverflowThreshold));
|
|
25130
25130
|
}
|
|
25131
25131
|
this._queue.callbacks.push(event.callback);
|
|
25132
25132
|
if (this._queue.mainEvent) {
|
|
@@ -25246,7 +25246,7 @@ var eventDebouncer = EventDebouncer$1;
|
|
|
25246
25246
|
* limitations under the License.
|
|
25247
25247
|
*/
|
|
25248
25248
|
const events$6 = require$$0$7;
|
|
25249
|
-
const util$
|
|
25249
|
+
const util$x = require$$0$5;
|
|
25250
25250
|
const net$4 = require$$0$6;
|
|
25251
25251
|
const dns$2 = require$$0$8;
|
|
25252
25252
|
|
|
@@ -25259,7 +25259,7 @@ const requests$3 = requests$7;
|
|
|
25259
25259
|
const utils$z = utils$11;
|
|
25260
25260
|
const types$m = requireTypes$1();
|
|
25261
25261
|
const promiseUtils$4 = promiseUtils$e;
|
|
25262
|
-
const f$4 = util$
|
|
25262
|
+
const f$4 = util$x.format;
|
|
25263
25263
|
|
|
25264
25264
|
const selectPeers = "SELECT * FROM system.peers";
|
|
25265
25265
|
const selectLocal = "SELECT * FROM system.local WHERE key='local'";
|
|
@@ -26131,9 +26131,9 @@ let ControlConnection$1 = class ControlConnection extends events$6.EventEmitter
|
|
|
26131
26131
|
*/
|
|
26132
26132
|
async _resolveAll(name) {
|
|
26133
26133
|
const addresses = [];
|
|
26134
|
-
const resolve4 = util$
|
|
26135
|
-
const resolve6 = util$
|
|
26136
|
-
const lookup = util$
|
|
26134
|
+
const resolve4 = util$x.promisify(dns$2.resolve4);
|
|
26135
|
+
const resolve6 = util$x.promisify(dns$2.resolve6);
|
|
26136
|
+
const lookup = util$x.promisify(dns$2.lookup);
|
|
26137
26137
|
|
|
26138
26138
|
// Ignore errors for resolve calls
|
|
26139
26139
|
const ipv4Promise = resolve4(name).catch(() => {}).then(r => r || utils$z.emptyArray);
|
|
@@ -26815,7 +26815,7 @@ var requestExecution = RequestExecution$1;
|
|
|
26815
26815
|
* See the License for the specific language governing permissions and
|
|
26816
26816
|
* limitations under the License.
|
|
26817
26817
|
*/
|
|
26818
|
-
const util$
|
|
26818
|
+
const util$w = require$$0$5;
|
|
26819
26819
|
|
|
26820
26820
|
const errors$k = errors$B;
|
|
26821
26821
|
const types$k = requireTypes$1();
|
|
@@ -27059,7 +27059,7 @@ let RequestHandler$1 = class RequestHandler {
|
|
|
27059
27059
|
if (result.info.warnings) {
|
|
27060
27060
|
// Log the warnings from the response
|
|
27061
27061
|
result.info.warnings.forEach(function (message, i, warnings) {
|
|
27062
|
-
this.log('warning', util$
|
|
27062
|
+
this.log('warning', util$w.format(
|
|
27063
27063
|
'Received warning (%d of %d) "%s" for "%s"',
|
|
27064
27064
|
i + 1,
|
|
27065
27065
|
warnings.length,
|
|
@@ -27128,8 +27128,8 @@ var requestHandler = RequestHandler$1;
|
|
|
27128
27128
|
*/
|
|
27129
27129
|
|
|
27130
27130
|
const os$2 = os$3;
|
|
27131
|
-
const path$
|
|
27132
|
-
const fs$
|
|
27131
|
+
const path$3 = require$$1$4;
|
|
27132
|
+
const fs$a = require$$0$b;
|
|
27133
27133
|
const utils$w = utils$11;
|
|
27134
27134
|
const promiseUtils$1 = promiseUtils$e;
|
|
27135
27135
|
const types$j = requireTypes$1();
|
|
@@ -27417,7 +27417,7 @@ let InsightsClient$1 = class InsightsClient {
|
|
|
27417
27417
|
let readPromise = Promise.resolve();
|
|
27418
27418
|
|
|
27419
27419
|
if (require.main && require.main.filename) {
|
|
27420
|
-
const packageInfoPath = path$
|
|
27420
|
+
const packageInfoPath = path$3.dirname(require.main.filename);
|
|
27421
27421
|
readPromise = this._readPackageInfoFile(packageInfoPath);
|
|
27422
27422
|
}
|
|
27423
27423
|
|
|
@@ -27452,7 +27452,7 @@ let InsightsClient$1 = class InsightsClient {
|
|
|
27452
27452
|
*/
|
|
27453
27453
|
_readPackageInfoFile(packageInfoPath) {
|
|
27454
27454
|
return new Promise(resolve => {
|
|
27455
|
-
fs$
|
|
27455
|
+
fs$a.readFile(path$3.join(packageInfoPath, 'package.json'), 'utf8', (err, data) => {
|
|
27456
27456
|
// Swallow error
|
|
27457
27457
|
resolve(data);
|
|
27458
27458
|
});
|
|
@@ -27602,7 +27602,7 @@ function setExecutionProfileItem(output, profile, defaultProfile, prop, valueGet
|
|
|
27602
27602
|
}
|
|
27603
27603
|
}
|
|
27604
27604
|
|
|
27605
|
-
var util$
|
|
27605
|
+
var util$v = {exports: {}};
|
|
27606
27606
|
|
|
27607
27607
|
var fileSystem = {};
|
|
27608
27608
|
|
|
@@ -28045,10 +28045,10 @@ Utils$5.readBigUInt64LE = function (/*Buffer*/ buffer, /*int*/ index) {
|
|
|
28045
28045
|
Utils$5.isWin = isWin; // Do we have windows system
|
|
28046
28046
|
Utils$5.crcTable = crcTable;
|
|
28047
28047
|
|
|
28048
|
-
const fs$
|
|
28048
|
+
const fs$9 = fileSystem.require();
|
|
28049
28049
|
const pth$1 = require$$1$4;
|
|
28050
28050
|
|
|
28051
|
-
fs$
|
|
28051
|
+
fs$9.existsSync = fs$9.existsSync || pth$1.existsSync;
|
|
28052
28052
|
|
|
28053
28053
|
var fattr = function (/*String*/ path) {
|
|
28054
28054
|
var _path = path || "",
|
|
@@ -28066,8 +28066,8 @@ var fattr = function (/*String*/ path) {
|
|
|
28066
28066
|
};
|
|
28067
28067
|
}
|
|
28068
28068
|
|
|
28069
|
-
if (_path && fs$
|
|
28070
|
-
_stat = fs$
|
|
28069
|
+
if (_path && fs$9.existsSync(_path)) {
|
|
28070
|
+
_stat = fs$9.statSync(_path);
|
|
28071
28071
|
_obj.directory = _stat.isDirectory();
|
|
28072
28072
|
_obj.mtime = _stat.mtime;
|
|
28073
28073
|
_obj.atime = _stat.atime;
|
|
@@ -28125,12 +28125,12 @@ var fattr = function (/*String*/ path) {
|
|
|
28125
28125
|
};
|
|
28126
28126
|
};
|
|
28127
28127
|
|
|
28128
|
-
util$
|
|
28129
|
-
util$
|
|
28130
|
-
util$
|
|
28131
|
-
util$
|
|
28128
|
+
util$v.exports = utils$v;
|
|
28129
|
+
util$v.exports.Constants = constants$9;
|
|
28130
|
+
util$v.exports.Errors = errors$j;
|
|
28131
|
+
util$v.exports.FileAttr = fattr;
|
|
28132
28132
|
|
|
28133
|
-
var utilExports = util$
|
|
28133
|
+
var utilExports = util$v.exports;
|
|
28134
28134
|
|
|
28135
28135
|
var headers$1 = {};
|
|
28136
28136
|
|
|
@@ -30366,8 +30366,8 @@ var admZip = function (/**String*/ input, /** object */ options) {
|
|
|
30366
30366
|
*/
|
|
30367
30367
|
|
|
30368
30368
|
const https$4 = https$5;
|
|
30369
|
-
const fs$
|
|
30370
|
-
const util$
|
|
30369
|
+
const fs$8 = require$$0$b;
|
|
30370
|
+
const util$u = require$$0$5;
|
|
30371
30371
|
const AdmZip = admZip;
|
|
30372
30372
|
const { URL: URL$6 } = require$$2$2;
|
|
30373
30373
|
|
|
@@ -30376,7 +30376,7 @@ const utils$u = utils$11;
|
|
|
30376
30376
|
const { DsePlainTextAuthProvider, NoAuthProvider } = auth;
|
|
30377
30377
|
|
|
30378
30378
|
// Use the callback-based method fs.readFile() instead of fs.promises as we have to support Node.js 8+
|
|
30379
|
-
const readFile$2 = util$
|
|
30379
|
+
const readFile$2 = util$u.promisify(fs$8.readFile);
|
|
30380
30380
|
|
|
30381
30381
|
/**
|
|
30382
30382
|
* When the user sets the cloud options, it uses the secure bundle or endpoint to access the metadata service and
|
|
@@ -30549,7 +30549,7 @@ function getMetadataServiceInfo(cloudOptions, callback) {
|
|
|
30549
30549
|
req.setTimeout(cloudOptions.clientOptions.socketOptions.connectTimeout, () => req.abort());
|
|
30550
30550
|
}
|
|
30551
30551
|
|
|
30552
|
-
const getMetadataServiceInfoAsync = util$
|
|
30552
|
+
const getMetadataServiceInfoAsync = util$u.promisify(getMetadataServiceInfo);
|
|
30553
30553
|
|
|
30554
30554
|
/**
|
|
30555
30555
|
* Returns an Error that wraps the inner error obtained while fetching metadata information.
|
|
@@ -30923,7 +30923,7 @@ function asTimestamp$1(value) { return new GraphTypeWrapper$3(value, dataTypes$3
|
|
|
30923
30923
|
*/
|
|
30924
30924
|
function asUdt$1(value, udtInfo) { return new UdtGraphWrapper$3(value, udtInfo); }
|
|
30925
30925
|
|
|
30926
|
-
var wrappers = { asInt: asInt$1, asDouble: asDouble$1, asFloat: asFloat$1, asTimestamp: asTimestamp$1, asUdt: asUdt$1, UdtGraphWrapper: UdtGraphWrapper$3, GraphTypeWrapper: GraphTypeWrapper$3 };
|
|
30926
|
+
var wrappers$2 = { asInt: asInt$1, asDouble: asDouble$1, asFloat: asFloat$1, asTimestamp: asTimestamp$1, asUdt: asUdt$1, UdtGraphWrapper: UdtGraphWrapper$3, GraphTypeWrapper: GraphTypeWrapper$3 };
|
|
30927
30927
|
|
|
30928
30928
|
/*
|
|
30929
30929
|
* Copyright DataStax, Inc.
|
|
@@ -30941,7 +30941,7 @@ var wrappers = { asInt: asInt$1, asDouble: asDouble$1, asFloat: asFloat$1, asTim
|
|
|
30941
30941
|
* limitations under the License.
|
|
30942
30942
|
*/
|
|
30943
30943
|
|
|
30944
|
-
const { GraphTypeWrapper: GraphTypeWrapper$2, UdtGraphWrapper: UdtGraphWrapper$2 } = wrappers;
|
|
30944
|
+
const { GraphTypeWrapper: GraphTypeWrapper$2, UdtGraphWrapper: UdtGraphWrapper$2 } = wrappers$2;
|
|
30945
30945
|
const types$h = requireTypes$1();
|
|
30946
30946
|
const Encoder = encoder$1;
|
|
30947
30947
|
const { dataTypes: dataTypes$2 } = types$h;
|
|
@@ -31039,7 +31039,7 @@ var complexTypeHelper = { getTypeDefinitionByValue: getTypeDefinitionByValue$1,
|
|
|
31039
31039
|
* limitations under the License.
|
|
31040
31040
|
*/
|
|
31041
31041
|
|
|
31042
|
-
const util$
|
|
31042
|
+
const util$t = require$$0$5;
|
|
31043
31043
|
|
|
31044
31044
|
/**
|
|
31045
31045
|
* @classdesc
|
|
@@ -31081,7 +31081,7 @@ function Vertex$1(id, label, properties) {
|
|
|
31081
31081
|
this.properties = properties;
|
|
31082
31082
|
}
|
|
31083
31083
|
|
|
31084
|
-
util$
|
|
31084
|
+
util$t.inherits(Vertex$1, Element$1);
|
|
31085
31085
|
|
|
31086
31086
|
/**
|
|
31087
31087
|
* @classdesc
|
|
@@ -31132,7 +31132,7 @@ function Edge$2(id, outV, outVLabel, label, inV, inVLabel, properties) {
|
|
|
31132
31132
|
})(this);
|
|
31133
31133
|
}
|
|
31134
31134
|
|
|
31135
|
-
util$
|
|
31135
|
+
util$t.inherits(Edge$2, Element$1);
|
|
31136
31136
|
|
|
31137
31137
|
/**
|
|
31138
31138
|
* @classdesc
|
|
@@ -31152,7 +31152,7 @@ function VertexProperty$1(id, label, value, properties) {
|
|
|
31152
31152
|
this.properties = properties;
|
|
31153
31153
|
}
|
|
31154
31154
|
|
|
31155
|
-
util$
|
|
31155
|
+
util$t.inherits(VertexProperty$1, Element$1);
|
|
31156
31156
|
|
|
31157
31157
|
/**
|
|
31158
31158
|
* @classdesc
|
|
@@ -31210,7 +31210,7 @@ const utils$s = utils$11;
|
|
|
31210
31210
|
const { getTypeDefinitionByValue, getUdtTypeDefinitionByValue } = complexTypeHelper;
|
|
31211
31211
|
const { Point: Point$1, Polygon, LineString } = geometry$1;
|
|
31212
31212
|
const { Edge: Edge$1 } = structure;
|
|
31213
|
-
const { GraphTypeWrapper: GraphTypeWrapper$1, UdtGraphWrapper: UdtGraphWrapper$1 } = wrappers;
|
|
31213
|
+
const { GraphTypeWrapper: GraphTypeWrapper$1, UdtGraphWrapper: UdtGraphWrapper$1 } = wrappers$2;
|
|
31214
31214
|
const { Tuple, dataTypes: dataTypes$1 } = types$g;
|
|
31215
31215
|
|
|
31216
31216
|
const typeKey$1 = '@type';
|
|
@@ -31574,7 +31574,7 @@ var customTypeSerializers = getCustomSerializers;
|
|
|
31574
31574
|
|
|
31575
31575
|
const GraphResultSet$1 = resultSet;
|
|
31576
31576
|
const getCustomTypeSerializers$1 = customTypeSerializers;
|
|
31577
|
-
const { asInt, asDouble, asFloat, asTimestamp, asUdt, UdtGraphWrapper, GraphTypeWrapper} = wrappers;
|
|
31577
|
+
const { asInt, asDouble, asFloat, asTimestamp, asUdt, UdtGraphWrapper, GraphTypeWrapper} = wrappers$2;
|
|
31578
31578
|
const { Edge, Element, Path, Property, Vertex, VertexProperty } = structure;
|
|
31579
31579
|
|
|
31580
31580
|
class EnumValue {
|
|
@@ -32390,7 +32390,7 @@ var graphSerializer = {
|
|
|
32390
32390
|
* See the License for the specific language governing permissions and
|
|
32391
32391
|
* limitations under the License.
|
|
32392
32392
|
*/
|
|
32393
|
-
const util$
|
|
32393
|
+
const util$s = require$$0$5;
|
|
32394
32394
|
const types$f = requireTypes$1();
|
|
32395
32395
|
const utils$q = utils$11;
|
|
32396
32396
|
const { DefaultExecutionOptions: DefaultExecutionOptions$1, proxyExecuteKey } = executionOptions;
|
|
@@ -32561,7 +32561,7 @@ function getConsistencyName(consistency) {
|
|
|
32561
32561
|
loadConsistencyNames();
|
|
32562
32562
|
const name = consistencyNames[consistency];
|
|
32563
32563
|
if (!name) {
|
|
32564
|
-
throw new Error(util$
|
|
32564
|
+
throw new Error(util$s.format(
|
|
32565
32565
|
'Consistency %s not found, use values defined as properties in types.consistencies object', consistency
|
|
32566
32566
|
));
|
|
32567
32567
|
}
|
|
@@ -33005,7 +33005,7 @@ var graphExecutor = GraphExecutor$1;
|
|
|
33005
33005
|
*/
|
|
33006
33006
|
|
|
33007
33007
|
const events$5 = require$$0$7;
|
|
33008
|
-
const util$
|
|
33008
|
+
const util$r = require$$0$5;
|
|
33009
33009
|
|
|
33010
33010
|
const utils$o = utils$11;
|
|
33011
33011
|
const errors$h = errors$B;
|
|
@@ -33426,7 +33426,7 @@ function Client$5(options) {
|
|
|
33426
33426
|
this._graphExecutor = new GraphExecutor(this, options, this._execute);
|
|
33427
33427
|
}
|
|
33428
33428
|
|
|
33429
|
-
util$
|
|
33429
|
+
util$r.inherits(Client$5, events$5.EventEmitter);
|
|
33430
33430
|
|
|
33431
33431
|
/**
|
|
33432
33432
|
* Emitted when a new host is added to the cluster.
|
|
@@ -33495,7 +33495,7 @@ Client$5.prototype._connect = async function () {
|
|
|
33495
33495
|
}
|
|
33496
33496
|
|
|
33497
33497
|
this.connecting = true;
|
|
33498
|
-
this.log('info', util$
|
|
33498
|
+
this.log('info', util$r.format("Connecting to cluster using '%s' version %s", description$9, version$c));
|
|
33499
33499
|
|
|
33500
33500
|
try {
|
|
33501
33501
|
await cloud.init(this.options);
|
|
@@ -34155,7 +34155,7 @@ Client$5.prototype._setRoutingInfo = async function (execOptions, params, meta)
|
|
|
34155
34155
|
meta.partitionKeys = execOptions.getRoutingIndexes();
|
|
34156
34156
|
encoder.setRoutingKeyFromMeta(meta, params, execOptions);
|
|
34157
34157
|
} catch (err) {
|
|
34158
|
-
this.log('warning', util$
|
|
34158
|
+
this.log('warning', util$r.format('Table %s.%s metadata could not be retrieved', meta.keyspace, meta.table));
|
|
34159
34159
|
}
|
|
34160
34160
|
};
|
|
34161
34161
|
|
|
@@ -35872,9 +35872,9 @@ var resultMapper = ResultMapper$2;
|
|
|
35872
35872
|
* limitations under the License.
|
|
35873
35873
|
*/
|
|
35874
35874
|
|
|
35875
|
-
const util$
|
|
35875
|
+
const util$q = require$$0$5;
|
|
35876
35876
|
const utils$m = utils$11;
|
|
35877
|
-
const inspectMethod = util$
|
|
35877
|
+
const inspectMethod = util$q.inspect.custom || 'inspect';
|
|
35878
35878
|
|
|
35879
35879
|
/**
|
|
35880
35880
|
* Represents the result of an execution as an iterable of objects in the Mapper.
|
|
@@ -37823,7 +37823,7 @@ requirePolicies();
|
|
|
37823
37823
|
* See the License for the specific language governing permissions and
|
|
37824
37824
|
* limitations under the License.
|
|
37825
37825
|
*/
|
|
37826
|
-
const Database$
|
|
37826
|
+
const Database$g = class Cassandra_db extends AbstractDatabase {
|
|
37827
37827
|
client;
|
|
37828
37828
|
pool;
|
|
37829
37829
|
/**
|
|
@@ -39101,7 +39101,7 @@ function arrObjKeys(obj, inspect) {
|
|
|
39101
39101
|
|
|
39102
39102
|
var GetIntrinsic$c = getIntrinsic;
|
|
39103
39103
|
var callBound$3 = callBound$4;
|
|
39104
|
-
var inspect$
|
|
39104
|
+
var inspect$2 = objectInspect;
|
|
39105
39105
|
|
|
39106
39106
|
var $TypeError$6 = GetIntrinsic$c('%TypeError%');
|
|
39107
39107
|
var $WeakMap = GetIntrinsic$c('%WeakMap%', true);
|
|
@@ -39161,7 +39161,7 @@ var sideChannel = function getSideChannel() {
|
|
|
39161
39161
|
var channel = {
|
|
39162
39162
|
assert: function (key) {
|
|
39163
39163
|
if (!channel.has(key)) {
|
|
39164
|
-
throw new $TypeError$6('Side channel does not contain ' + inspect$
|
|
39164
|
+
throw new $TypeError$6('Side channel does not contain ' + inspect$2(key));
|
|
39165
39165
|
}
|
|
39166
39166
|
},
|
|
39167
39167
|
get: function (key) { // eslint-disable-line consistent-return
|
|
@@ -40081,14 +40081,14 @@ var stringify$2 = stringify_1;
|
|
|
40081
40081
|
var parse$e = parse$f;
|
|
40082
40082
|
var formats = formats$3;
|
|
40083
40083
|
|
|
40084
|
-
var lib$
|
|
40084
|
+
var lib$b = {
|
|
40085
40085
|
formats: formats,
|
|
40086
40086
|
parse: parse$e,
|
|
40087
40087
|
stringify: stringify$2
|
|
40088
40088
|
};
|
|
40089
40089
|
|
|
40090
40090
|
var Stream$5 = require$$0$a.Stream;
|
|
40091
|
-
var util$
|
|
40091
|
+
var util$p = require$$0$5;
|
|
40092
40092
|
|
|
40093
40093
|
var delayed_stream = DelayedStream$1;
|
|
40094
40094
|
function DelayedStream$1() {
|
|
@@ -40101,7 +40101,7 @@ function DelayedStream$1() {
|
|
|
40101
40101
|
this._released = false;
|
|
40102
40102
|
this._bufferedEvents = [];
|
|
40103
40103
|
}
|
|
40104
|
-
util$
|
|
40104
|
+
util$p.inherits(DelayedStream$1, Stream$5);
|
|
40105
40105
|
|
|
40106
40106
|
DelayedStream$1.create = function(source, options) {
|
|
40107
40107
|
var delayedStream = new this();
|
|
@@ -40195,7 +40195,7 @@ DelayedStream$1.prototype._checkIfMaxDataSizeExceeded = function() {
|
|
|
40195
40195
|
this.emit('error', new Error(message));
|
|
40196
40196
|
};
|
|
40197
40197
|
|
|
40198
|
-
var util$
|
|
40198
|
+
var util$o = require$$0$5;
|
|
40199
40199
|
var Stream$4 = require$$0$a.Stream;
|
|
40200
40200
|
var DelayedStream = delayed_stream;
|
|
40201
40201
|
|
|
@@ -40213,7 +40213,7 @@ function CombinedStream$1() {
|
|
|
40213
40213
|
this._insideLoop = false;
|
|
40214
40214
|
this._pendingNext = false;
|
|
40215
40215
|
}
|
|
40216
|
-
util$
|
|
40216
|
+
util$o.inherits(CombinedStream$1, Stream$4);
|
|
40217
40217
|
|
|
40218
40218
|
CombinedStream$1.create = function(options) {
|
|
40219
40219
|
var combinedStream = new this();
|
|
@@ -51709,12 +51709,12 @@ var populate$1 = function(dst, src) {
|
|
|
51709
51709
|
};
|
|
51710
51710
|
|
|
51711
51711
|
var CombinedStream = combined_stream;
|
|
51712
|
-
var util$
|
|
51713
|
-
var path$
|
|
51712
|
+
var util$n = require$$0$5;
|
|
51713
|
+
var path$2 = require$$1$4;
|
|
51714
51714
|
var http$3 = http$4;
|
|
51715
51715
|
var https$3 = https$5;
|
|
51716
51716
|
var parseUrl$2 = require$$2$2.parse;
|
|
51717
|
-
var fs$
|
|
51717
|
+
var fs$7 = require$$0$b;
|
|
51718
51718
|
var Stream$3 = require$$0$a.Stream;
|
|
51719
51719
|
var mime = mimeTypes;
|
|
51720
51720
|
var asynckit = asynckit$1;
|
|
@@ -51724,7 +51724,7 @@ var populate = populate$1;
|
|
|
51724
51724
|
var form_data = FormData$2;
|
|
51725
51725
|
|
|
51726
51726
|
// make it a Stream
|
|
51727
|
-
util$
|
|
51727
|
+
util$n.inherits(FormData$2, CombinedStream);
|
|
51728
51728
|
|
|
51729
51729
|
/**
|
|
51730
51730
|
* Create readable "multipart/form-data" streams.
|
|
@@ -51771,7 +51771,7 @@ FormData$2.prototype.append = function(field, value, options) {
|
|
|
51771
51771
|
}
|
|
51772
51772
|
|
|
51773
51773
|
// https://github.com/felixge/node-form-data/issues/38
|
|
51774
|
-
if (util$
|
|
51774
|
+
if (util$n.isArray(value)) {
|
|
51775
51775
|
// Please convert your array into string
|
|
51776
51776
|
// the way web server expects it
|
|
51777
51777
|
this._error(new Error('Arrays are not supported.'));
|
|
@@ -51843,7 +51843,7 @@ FormData$2.prototype._lengthRetriever = function(value, callback) {
|
|
|
51843
51843
|
// not that fast snoopy
|
|
51844
51844
|
} else {
|
|
51845
51845
|
// still need to fetch file size from fs
|
|
51846
|
-
fs$
|
|
51846
|
+
fs$7.stat(value.path, function(err, stat) {
|
|
51847
51847
|
|
|
51848
51848
|
var fileSize;
|
|
51849
51849
|
|
|
@@ -51933,15 +51933,15 @@ FormData$2.prototype._getContentDisposition = function(value, options) {
|
|
|
51933
51933
|
|
|
51934
51934
|
if (typeof options.filepath === 'string') {
|
|
51935
51935
|
// custom filepath for relative paths
|
|
51936
|
-
filename = path$
|
|
51936
|
+
filename = path$2.normalize(options.filepath).replace(/\\/g, '/');
|
|
51937
51937
|
} else if (options.filename || value.name || value.path) {
|
|
51938
51938
|
// custom filename take precedence
|
|
51939
51939
|
// formidable and the browser add a name property
|
|
51940
51940
|
// fs- and request- streams have path property
|
|
51941
|
-
filename = path$
|
|
51941
|
+
filename = path$2.basename(options.filename || value.name || value.path);
|
|
51942
51942
|
} else if (value.readable && value.hasOwnProperty('httpVersion')) {
|
|
51943
51943
|
// or try http response
|
|
51944
|
-
filename = path$
|
|
51944
|
+
filename = path$2.basename(value.client._httpMessage.path || '');
|
|
51945
51945
|
}
|
|
51946
51946
|
|
|
51947
51947
|
if (filename) {
|
|
@@ -54156,7 +54156,7 @@ const url = require$$2$2;
|
|
|
54156
54156
|
const proxyFromEnv = proxyFromEnv$1;
|
|
54157
54157
|
const http$1 = http$4;
|
|
54158
54158
|
const https$1 = https$5;
|
|
54159
|
-
const util$
|
|
54159
|
+
const util$m = require$$0$5;
|
|
54160
54160
|
const followRedirects = followRedirectsExports;
|
|
54161
54161
|
const zlib = require$$0$c;
|
|
54162
54162
|
const stream$4 = require$$0$a;
|
|
@@ -54168,7 +54168,7 @@ const FormData__default = /*#__PURE__*/_interopDefaultLegacy(FormData$1);
|
|
|
54168
54168
|
const url__default = /*#__PURE__*/_interopDefaultLegacy(url);
|
|
54169
54169
|
const http__default = /*#__PURE__*/_interopDefaultLegacy(http$1);
|
|
54170
54170
|
const https__default = /*#__PURE__*/_interopDefaultLegacy(https$1);
|
|
54171
|
-
const util__default = /*#__PURE__*/_interopDefaultLegacy(util$
|
|
54171
|
+
const util__default = /*#__PURE__*/_interopDefaultLegacy(util$m);
|
|
54172
54172
|
const followRedirects__default = /*#__PURE__*/_interopDefaultLegacy(followRedirects);
|
|
54173
54173
|
const zlib__default = /*#__PURE__*/_interopDefaultLegacy(zlib);
|
|
54174
54174
|
const stream__default = /*#__PURE__*/_interopDefaultLegacy(stream$4);
|
|
@@ -56451,7 +56451,7 @@ const readBlob$1 = readBlob;
|
|
|
56451
56451
|
|
|
56452
56452
|
const BOUNDARY_ALPHABET = utils$f.ALPHABET.ALPHA_DIGIT + '-_';
|
|
56453
56453
|
|
|
56454
|
-
const textEncoder = new util$
|
|
56454
|
+
const textEncoder = new util$m.TextEncoder();
|
|
56455
56455
|
|
|
56456
56456
|
const CRLF$2 = '\r\n';
|
|
56457
56457
|
const CRLF_BYTES = textEncoder.encode(CRLF$2);
|
|
@@ -59027,7 +59027,7 @@ var multipart$1 = MultiPartFactory;
|
|
|
59027
59027
|
const http = http$4;
|
|
59028
59028
|
const https = https$5;
|
|
59029
59029
|
const assert = require$$0$e;
|
|
59030
|
-
const querystring = lib$
|
|
59030
|
+
const querystring = lib$b;
|
|
59031
59031
|
const axios = axios_1;
|
|
59032
59032
|
const stream = require$$0$a;
|
|
59033
59033
|
const pkg = require$$7$1;
|
|
@@ -60323,7 +60323,7 @@ var nano = /*@__PURE__*/getDefaultExportFromCjs(nanoExports);
|
|
|
60323
60323
|
* See the License for the specific language governing permissions and
|
|
60324
60324
|
* limitations under the License.
|
|
60325
60325
|
*/
|
|
60326
|
-
const Database$
|
|
60326
|
+
const Database$f = class Couch_db extends AbstractDatabase {
|
|
60327
60327
|
agent;
|
|
60328
60328
|
db;
|
|
60329
60329
|
constructor(settings) {
|
|
@@ -60706,7 +60706,7 @@ var Dirty = /*@__PURE__*/getDefaultExportFromCjs(dirty);
|
|
|
60706
60706
|
* See https://github.com/ether/etherpad-lite/pull/3984
|
|
60707
60707
|
*
|
|
60708
60708
|
*/
|
|
60709
|
-
const Database$
|
|
60709
|
+
const Database$e = class Database extends AbstractDatabase {
|
|
60710
60710
|
db;
|
|
60711
60711
|
constructor(settings) {
|
|
60712
60712
|
super();
|
|
@@ -60754,7 +60754,7 @@ const Database$d = class Database extends AbstractDatabase {
|
|
|
60754
60754
|
}
|
|
60755
60755
|
};
|
|
60756
60756
|
|
|
60757
|
-
const Database$
|
|
60757
|
+
const Database$d = class Database extends AbstractDatabase {
|
|
60758
60758
|
db;
|
|
60759
60759
|
constructor(settings) {
|
|
60760
60760
|
super();
|
|
@@ -63714,11 +63714,11 @@ function requireErrors$3 () {
|
|
|
63714
63714
|
return errors$c;
|
|
63715
63715
|
}
|
|
63716
63716
|
|
|
63717
|
-
var util$
|
|
63717
|
+
var util$l;
|
|
63718
63718
|
var hasRequiredUtil$9;
|
|
63719
63719
|
|
|
63720
63720
|
function requireUtil$9 () {
|
|
63721
|
-
if (hasRequiredUtil$9) return util$
|
|
63721
|
+
if (hasRequiredUtil$9) return util$l;
|
|
63722
63722
|
hasRequiredUtil$9 = 1;
|
|
63723
63723
|
|
|
63724
63724
|
const assert = require$$0$e;
|
|
@@ -64161,7 +64161,7 @@ function requireUtil$9 () {
|
|
|
64161
64161
|
const kEnumerableProperty = Object.create(null);
|
|
64162
64162
|
kEnumerableProperty.enumerable = true;
|
|
64163
64163
|
|
|
64164
|
-
util$
|
|
64164
|
+
util$l = {
|
|
64165
64165
|
kEnumerableProperty,
|
|
64166
64166
|
nop,
|
|
64167
64167
|
isDisturbed,
|
|
@@ -64194,7 +64194,7 @@ function requireUtil$9 () {
|
|
|
64194
64194
|
nodeMinor,
|
|
64195
64195
|
nodeHasAutoSelectFamily: nodeMajor > 18 || (nodeMajor === 18 && nodeMinor >= 13)
|
|
64196
64196
|
};
|
|
64197
|
-
return util$
|
|
64197
|
+
return util$l;
|
|
64198
64198
|
}
|
|
64199
64199
|
|
|
64200
64200
|
var timers$1;
|
|
@@ -66200,11 +66200,11 @@ function requireUrlencoded$1 () {
|
|
|
66200
66200
|
return urlencoded$1;
|
|
66201
66201
|
}
|
|
66202
66202
|
|
|
66203
|
-
var lib$
|
|
66203
|
+
var lib$a;
|
|
66204
66204
|
var hasRequiredLib$3;
|
|
66205
66205
|
|
|
66206
66206
|
function requireLib$3 () {
|
|
66207
|
-
if (hasRequiredLib$3) return lib$
|
|
66207
|
+
if (hasRequiredLib$3) return lib$a;
|
|
66208
66208
|
hasRequiredLib$3 = 1;
|
|
66209
66209
|
|
|
66210
66210
|
const { parseContentType } = requireUtils$2();
|
|
@@ -66250,7 +66250,7 @@ function requireLib$3 () {
|
|
|
66250
66250
|
requireUrlencoded$1(),
|
|
66251
66251
|
].filter(function(typemod) { return typeof typemod.detect === 'function'; });
|
|
66252
66252
|
|
|
66253
|
-
lib$
|
|
66253
|
+
lib$a = (cfg) => {
|
|
66254
66254
|
if (typeof cfg !== 'object' || cfg === null)
|
|
66255
66255
|
cfg = {};
|
|
66256
66256
|
|
|
@@ -66262,7 +66262,7 @@ function requireLib$3 () {
|
|
|
66262
66262
|
|
|
66263
66263
|
return getInstance(cfg);
|
|
66264
66264
|
};
|
|
66265
|
-
return lib$
|
|
66265
|
+
return lib$a;
|
|
66266
66266
|
}
|
|
66267
66267
|
|
|
66268
66268
|
var constants$8;
|
|
@@ -66465,11 +66465,11 @@ function requireGlobal$1 () {
|
|
|
66465
66465
|
return global$2;
|
|
66466
66466
|
}
|
|
66467
66467
|
|
|
66468
|
-
var util$
|
|
66468
|
+
var util$k;
|
|
66469
66469
|
var hasRequiredUtil$8;
|
|
66470
66470
|
|
|
66471
66471
|
function requireUtil$8 () {
|
|
66472
|
-
if (hasRequiredUtil$8) return util$
|
|
66472
|
+
if (hasRequiredUtil$8) return util$k;
|
|
66473
66473
|
hasRequiredUtil$8 = 1;
|
|
66474
66474
|
|
|
66475
66475
|
const { redirectStatus, badPorts, referrerPolicy: referrerPolicyTokens } = requireConstants$4();
|
|
@@ -67457,7 +67457,7 @@ function requireUtil$8 () {
|
|
|
67457
67457
|
*/
|
|
67458
67458
|
const hasOwn = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key));
|
|
67459
67459
|
|
|
67460
|
-
util$
|
|
67460
|
+
util$k = {
|
|
67461
67461
|
isAborted,
|
|
67462
67462
|
isCancelled,
|
|
67463
67463
|
createDeferredPromise,
|
|
@@ -67502,7 +67502,7 @@ function requireUtil$8 () {
|
|
|
67502
67502
|
urlIsHttpHttpsScheme,
|
|
67503
67503
|
readAllBytes
|
|
67504
67504
|
};
|
|
67505
|
-
return util$
|
|
67505
|
+
return util$k;
|
|
67506
67506
|
}
|
|
67507
67507
|
|
|
67508
67508
|
var symbols$3;
|
|
@@ -74393,11 +74393,11 @@ function requireReadable$1 () {
|
|
|
74393
74393
|
return readable$2;
|
|
74394
74394
|
}
|
|
74395
74395
|
|
|
74396
|
-
var util$
|
|
74396
|
+
var util$j;
|
|
74397
74397
|
var hasRequiredUtil$7;
|
|
74398
74398
|
|
|
74399
74399
|
function requireUtil$7 () {
|
|
74400
|
-
if (hasRequiredUtil$7) return util$
|
|
74400
|
+
if (hasRequiredUtil$7) return util$j;
|
|
74401
74401
|
hasRequiredUtil$7 = 1;
|
|
74402
74402
|
const assert = require$$0$e;
|
|
74403
74403
|
const {
|
|
@@ -74444,8 +74444,8 @@ function requireUtil$7 () {
|
|
|
74444
74444
|
process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers));
|
|
74445
74445
|
}
|
|
74446
74446
|
|
|
74447
|
-
util$
|
|
74448
|
-
return util$
|
|
74447
|
+
util$j = { getResolveErrorBodyCallback };
|
|
74448
|
+
return util$j;
|
|
74449
74449
|
}
|
|
74450
74450
|
|
|
74451
74451
|
var abortSignal$1;
|
|
@@ -81244,11 +81244,11 @@ function requireEncoding () {
|
|
|
81244
81244
|
return encoding$1;
|
|
81245
81245
|
}
|
|
81246
81246
|
|
|
81247
|
-
var util$
|
|
81247
|
+
var util$i;
|
|
81248
81248
|
var hasRequiredUtil$6;
|
|
81249
81249
|
|
|
81250
81250
|
function requireUtil$6 () {
|
|
81251
|
-
if (hasRequiredUtil$6) return util$
|
|
81251
|
+
if (hasRequiredUtil$6) return util$i;
|
|
81252
81252
|
hasRequiredUtil$6 = 1;
|
|
81253
81253
|
|
|
81254
81254
|
const {
|
|
@@ -81636,12 +81636,12 @@ function requireUtil$6 () {
|
|
|
81636
81636
|
}, new Uint8Array(size))
|
|
81637
81637
|
}
|
|
81638
81638
|
|
|
81639
|
-
util$
|
|
81639
|
+
util$i = {
|
|
81640
81640
|
staticPropertyDescriptors,
|
|
81641
81641
|
readOperation,
|
|
81642
81642
|
fireAProgressEvent
|
|
81643
81643
|
};
|
|
81644
|
-
return util$
|
|
81644
|
+
return util$i;
|
|
81645
81645
|
}
|
|
81646
81646
|
|
|
81647
81647
|
var filereader;
|
|
@@ -82009,11 +82009,11 @@ function requireSymbols$1 () {
|
|
|
82009
82009
|
return symbols$1;
|
|
82010
82010
|
}
|
|
82011
82011
|
|
|
82012
|
-
var util$
|
|
82012
|
+
var util$h;
|
|
82013
82013
|
var hasRequiredUtil$5;
|
|
82014
82014
|
|
|
82015
82015
|
function requireUtil$5 () {
|
|
82016
|
-
if (hasRequiredUtil$5) return util$
|
|
82016
|
+
if (hasRequiredUtil$5) return util$h;
|
|
82017
82017
|
hasRequiredUtil$5 = 1;
|
|
82018
82018
|
|
|
82019
82019
|
const assert = require$$0$e;
|
|
@@ -82059,11 +82059,11 @@ function requireUtil$5 () {
|
|
|
82059
82059
|
return values
|
|
82060
82060
|
}
|
|
82061
82061
|
|
|
82062
|
-
util$
|
|
82062
|
+
util$h = {
|
|
82063
82063
|
urlEquals,
|
|
82064
82064
|
fieldValues
|
|
82065
82065
|
};
|
|
82066
|
-
return util$
|
|
82066
|
+
return util$h;
|
|
82067
82067
|
}
|
|
82068
82068
|
|
|
82069
82069
|
var cache$1;
|
|
@@ -83088,11 +83088,11 @@ function requireConstants$2 () {
|
|
|
83088
83088
|
return constants$6;
|
|
83089
83089
|
}
|
|
83090
83090
|
|
|
83091
|
-
var util$
|
|
83091
|
+
var util$g;
|
|
83092
83092
|
var hasRequiredUtil$4;
|
|
83093
83093
|
|
|
83094
83094
|
function requireUtil$4 () {
|
|
83095
|
-
if (hasRequiredUtil$4) return util$
|
|
83095
|
+
if (hasRequiredUtil$4) return util$g;
|
|
83096
83096
|
hasRequiredUtil$4 = 1;
|
|
83097
83097
|
|
|
83098
83098
|
const assert = require$$0$e;
|
|
@@ -83379,12 +83379,12 @@ function requireUtil$4 () {
|
|
|
83379
83379
|
return headersList
|
|
83380
83380
|
}
|
|
83381
83381
|
|
|
83382
|
-
util$
|
|
83382
|
+
util$g = {
|
|
83383
83383
|
isCTLExcludingHtab,
|
|
83384
83384
|
stringify,
|
|
83385
83385
|
getHeadersList
|
|
83386
83386
|
};
|
|
83387
|
-
return util$
|
|
83387
|
+
return util$g;
|
|
83388
83388
|
}
|
|
83389
83389
|
|
|
83390
83390
|
var parse$d;
|
|
@@ -84294,11 +84294,11 @@ function requireEvents () {
|
|
|
84294
84294
|
return events$3;
|
|
84295
84295
|
}
|
|
84296
84296
|
|
|
84297
|
-
var util$
|
|
84297
|
+
var util$f;
|
|
84298
84298
|
var hasRequiredUtil$3;
|
|
84299
84299
|
|
|
84300
84300
|
function requireUtil$3 () {
|
|
84301
|
-
if (hasRequiredUtil$3) return util$
|
|
84301
|
+
if (hasRequiredUtil$3) return util$f;
|
|
84302
84302
|
hasRequiredUtil$3 = 1;
|
|
84303
84303
|
|
|
84304
84304
|
const { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = requireSymbols();
|
|
@@ -84489,7 +84489,7 @@ function requireUtil$3 () {
|
|
|
84489
84489
|
}
|
|
84490
84490
|
}
|
|
84491
84491
|
|
|
84492
|
-
util$
|
|
84492
|
+
util$f = {
|
|
84493
84493
|
isEstablished,
|
|
84494
84494
|
isClosing,
|
|
84495
84495
|
isClosed,
|
|
@@ -84499,7 +84499,7 @@ function requireUtil$3 () {
|
|
|
84499
84499
|
failWebsocketConnection,
|
|
84500
84500
|
websocketMessageReceived
|
|
84501
84501
|
};
|
|
84502
|
-
return util$
|
|
84502
|
+
return util$f;
|
|
84503
84503
|
}
|
|
84504
84504
|
|
|
84505
84505
|
var connection$3;
|
|
@@ -102425,7 +102425,7 @@ const migrateToSchema2 = async (client, v1BaseIndex, v2Index, logger) => {
|
|
|
102425
102425
|
await Promise.all([...scrollIds.values()].map((scrollId) => client.clearScroll({ scroll_id: scrollId })));
|
|
102426
102426
|
}
|
|
102427
102427
|
};
|
|
102428
|
-
const Database$
|
|
102428
|
+
const Database$c = class Database extends AbstractDatabase {
|
|
102429
102429
|
_client;
|
|
102430
102430
|
_index;
|
|
102431
102431
|
_indexClean;
|
|
@@ -102584,7 +102584,7 @@ const Database$b = class Database extends AbstractDatabase {
|
|
|
102584
102584
|
}
|
|
102585
102585
|
};
|
|
102586
102586
|
|
|
102587
|
-
const Database$
|
|
102587
|
+
const Database$b = class MemoryDB extends AbstractDatabase {
|
|
102588
102588
|
_data;
|
|
102589
102589
|
constructor(settings) {
|
|
102590
102590
|
super();
|
|
@@ -102616,7 +102616,7 @@ const Database$a = class MemoryDB extends AbstractDatabase {
|
|
|
102616
102616
|
}
|
|
102617
102617
|
};
|
|
102618
102618
|
|
|
102619
|
-
const Database$
|
|
102619
|
+
const Database$a = class Database extends require$$0$7.EventEmitter {
|
|
102620
102620
|
settings;
|
|
102621
102621
|
mock;
|
|
102622
102622
|
constructor(settings) {
|
|
@@ -102652,7 +102652,7 @@ const Database$9 = class Database extends require$$0$7.EventEmitter {
|
|
|
102652
102652
|
}
|
|
102653
102653
|
};
|
|
102654
102654
|
|
|
102655
|
-
var lib$
|
|
102655
|
+
var lib$9 = {};
|
|
102656
102656
|
|
|
102657
102657
|
var admin = {};
|
|
102658
102658
|
|
|
@@ -106589,7 +106589,7 @@ function setInternalBufferSize(size) {
|
|
|
106589
106589
|
buffer$2 = ByteUtils.allocate(size);
|
|
106590
106590
|
}
|
|
106591
106591
|
}
|
|
106592
|
-
function serialize$
|
|
106592
|
+
function serialize$3(object, options = {}) {
|
|
106593
106593
|
const checkKeys = typeof options.checkKeys === 'boolean' ? options.checkKeys : false;
|
|
106594
106594
|
const serializeFunctions = typeof options.serializeFunctions === 'boolean' ? options.serializeFunctions : false;
|
|
106595
106595
|
const ignoreUndefined = typeof options.ignoreUndefined === 'boolean' ? options.ignoreUndefined : true;
|
|
@@ -106661,7 +106661,7 @@ var bson = /*#__PURE__*/Object.freeze({
|
|
|
106661
106661
|
calculateObjectSize: calculateObjectSize,
|
|
106662
106662
|
deserialize: deserialize,
|
|
106663
106663
|
deserializeStream: deserializeStream,
|
|
106664
|
-
serialize: serialize$
|
|
106664
|
+
serialize: serialize$3,
|
|
106665
106665
|
serializeWithBufferAndIndex: serializeWithBufferAndIndex,
|
|
106666
106666
|
setInternalBufferSize: setInternalBufferSize
|
|
106667
106667
|
});
|
|
@@ -106690,7 +106690,7 @@ bson$1.UUID = UUID;
|
|
|
106690
106690
|
bson$1.calculateObjectSize = calculateObjectSize;
|
|
106691
106691
|
bson$1.deserialize = deserialize;
|
|
106692
106692
|
bson$1.deserializeStream = deserializeStream;
|
|
106693
|
-
bson$1.serialize = serialize$
|
|
106693
|
+
bson$1.serialize = serialize$3;
|
|
106694
106694
|
bson$1.serializeWithBufferAndIndex = serializeWithBufferAndIndex;
|
|
106695
106695
|
bson$1.setInternalBufferSize = setInternalBufferSize;
|
|
106696
106696
|
|
|
@@ -111899,7 +111899,7 @@ var collection = {};
|
|
|
111899
111899
|
|
|
111900
111900
|
var aggregation_cursor = {};
|
|
111901
111901
|
|
|
111902
|
-
var aggregate = {};
|
|
111902
|
+
var aggregate$1 = {};
|
|
111903
111903
|
|
|
111904
111904
|
(function (exports) {
|
|
111905
111905
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -111993,7 +111993,7 @@ var aggregate = {};
|
|
|
111993
111993
|
operation_1.Aspect.CURSOR_CREATING
|
|
111994
111994
|
]);
|
|
111995
111995
|
|
|
111996
|
-
} (aggregate));
|
|
111996
|
+
} (aggregate$1));
|
|
111997
111997
|
|
|
111998
111998
|
var abstract_cursor = {};
|
|
111999
111999
|
|
|
@@ -114361,7 +114361,7 @@ sessions.updateSessionFromResponse = updateSessionFromResponse;
|
|
|
114361
114361
|
|
|
114362
114362
|
Object.defineProperty(aggregation_cursor, "__esModule", { value: true });
|
|
114363
114363
|
aggregation_cursor.AggregationCursor = void 0;
|
|
114364
|
-
const aggregate_1$1 = aggregate;
|
|
114364
|
+
const aggregate_1$1 = aggregate$1;
|
|
114365
114365
|
const execute_operation_1$4 = execute_operation;
|
|
114366
114366
|
const utils_1$o = utils$c;
|
|
114367
114367
|
const abstract_cursor_1$4 = abstract_cursor;
|
|
@@ -115498,7 +115498,7 @@ var count_documents = {};
|
|
|
115498
115498
|
|
|
115499
115499
|
Object.defineProperty(count_documents, "__esModule", { value: true });
|
|
115500
115500
|
count_documents.CountDocumentsOperation = void 0;
|
|
115501
|
-
const aggregate_1 = aggregate;
|
|
115501
|
+
const aggregate_1 = aggregate$1;
|
|
115502
115502
|
/** @internal */
|
|
115503
115503
|
class CountDocumentsOperation extends aggregate_1.AggregateOperation {
|
|
115504
115504
|
constructor(collection, query, options) {
|
|
@@ -116659,7 +116659,7 @@ function requireChange_stream_cursor () {
|
|
|
116659
116659
|
change_stream_cursor.ChangeStreamCursor = void 0;
|
|
116660
116660
|
const change_stream_1 = requireChange_stream();
|
|
116661
116661
|
const constants_1 = constants$3;
|
|
116662
|
-
const aggregate_1 = aggregate;
|
|
116662
|
+
const aggregate_1 = aggregate$1;
|
|
116663
116663
|
const execute_operation_1 = execute_operation;
|
|
116664
116664
|
const utils_1 = utils$c;
|
|
116665
116665
|
const abstract_cursor_1 = abstract_cursor;
|
|
@@ -119474,7 +119474,7 @@ const substring = (input, start, stop, reverse) => {
|
|
|
119474
119474
|
|
|
119475
119475
|
const uriEncode = (value) => encodeURIComponent(value).replace(/[!*'()]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`);
|
|
119476
119476
|
|
|
119477
|
-
var lib$
|
|
119477
|
+
var lib$8 = /*#__PURE__*/Object.freeze({
|
|
119478
119478
|
__proto__: null,
|
|
119479
119479
|
aws: index$1,
|
|
119480
119480
|
booleanEquals: booleanEquals,
|
|
@@ -119547,7 +119547,7 @@ const evaluateExpression = (obj, keyName, options) => {
|
|
|
119547
119547
|
|
|
119548
119548
|
const callFunction = ({ fn, argv }, options) => {
|
|
119549
119549
|
const evaluatedArgs = argv.map((arg) => ["boolean", "number"].includes(typeof arg) ? arg : evaluateExpression(arg, "arg", options));
|
|
119550
|
-
return fn.split(".").reduce((acc, key) => acc[key], lib$
|
|
119550
|
+
return fn.split(".").reduce((acc, key) => acc[key], lib$8)(...evaluatedArgs);
|
|
119551
119551
|
};
|
|
119552
119552
|
|
|
119553
119553
|
const evaluateCondition = ({ assign, ...fnArgs }, options) => {
|
|
@@ -122096,7 +122096,7 @@ const AssumeRoleWithWebIdentityResponseFilterSensitiveLog = (obj) => ({
|
|
|
122096
122096
|
|
|
122097
122097
|
var validator$2 = {};
|
|
122098
122098
|
|
|
122099
|
-
var util$
|
|
122099
|
+
var util$e = {};
|
|
122100
122100
|
|
|
122101
122101
|
(function (exports) {
|
|
122102
122102
|
|
|
@@ -122170,9 +122170,9 @@ var util$c = {};
|
|
|
122170
122170
|
exports.isName = isName;
|
|
122171
122171
|
exports.getAllMatches = getAllMatches;
|
|
122172
122172
|
exports.nameRegexp = nameRegexp;
|
|
122173
|
-
} (util$
|
|
122173
|
+
} (util$e));
|
|
122174
122174
|
|
|
122175
|
-
const util$
|
|
122175
|
+
const util$d = util$e;
|
|
122176
122176
|
|
|
122177
122177
|
const defaultOptions$2 = {
|
|
122178
122178
|
allowBooleanAttributes: false, //A tag can have attributes without any value
|
|
@@ -122487,7 +122487,7 @@ function validateAttributeString(attrStr, options) {
|
|
|
122487
122487
|
|
|
122488
122488
|
//if(attrStr.trim().length === 0) return true; //empty string
|
|
122489
122489
|
|
|
122490
|
-
const matches = util$
|
|
122490
|
+
const matches = util$d.getAllMatches(attrStr, validAttrStrRegxp);
|
|
122491
122491
|
const attrNames = {};
|
|
122492
122492
|
|
|
122493
122493
|
for (let i = 0; i < matches.length; i++) {
|
|
@@ -122565,13 +122565,13 @@ function getErrorObject(code, message, lineNumber) {
|
|
|
122565
122565
|
}
|
|
122566
122566
|
|
|
122567
122567
|
function validateAttrName(attrName) {
|
|
122568
|
-
return util$
|
|
122568
|
+
return util$d.isName(attrName);
|
|
122569
122569
|
}
|
|
122570
122570
|
|
|
122571
122571
|
// const startsWithXML = /^xml/i;
|
|
122572
122572
|
|
|
122573
122573
|
function validateTagName(tagname) {
|
|
122574
|
-
return util$
|
|
122574
|
+
return util$d.isName(tagname) /* && !tagname.match(startsWithXML) */;
|
|
122575
122575
|
}
|
|
122576
122576
|
|
|
122577
122577
|
//this function returns the line number for the character at the given index
|
|
@@ -122663,7 +122663,7 @@ class XmlNode{
|
|
|
122663
122663
|
|
|
122664
122664
|
var xmlNode$1 = XmlNode;
|
|
122665
122665
|
|
|
122666
|
-
const util$
|
|
122666
|
+
const util$c = util$e;
|
|
122667
122667
|
|
|
122668
122668
|
//TODO: handle comments
|
|
122669
122669
|
function readDocType$1(xmlData, i){
|
|
@@ -122808,7 +122808,7 @@ function isNotation(xmlData, i){
|
|
|
122808
122808
|
}
|
|
122809
122809
|
|
|
122810
122810
|
function validateEntityName(name){
|
|
122811
|
-
if (util$
|
|
122811
|
+
if (util$c.isName(name))
|
|
122812
122812
|
return name;
|
|
122813
122813
|
else
|
|
122814
122814
|
throw new Error(`Invalid entity name ${name}`);
|
|
@@ -122943,13 +122943,13 @@ var strnum = toNumber$1;
|
|
|
122943
122943
|
|
|
122944
122944
|
///@ts-check
|
|
122945
122945
|
|
|
122946
|
-
const util$
|
|
122946
|
+
const util$b = util$e;
|
|
122947
122947
|
const xmlNode = xmlNode$1;
|
|
122948
122948
|
const readDocType = DocTypeReader;
|
|
122949
122949
|
const toNumber = strnum;
|
|
122950
122950
|
|
|
122951
122951
|
'<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)'
|
|
122952
|
-
.replace(/NAME/g, util$
|
|
122952
|
+
.replace(/NAME/g, util$b.nameRegexp);
|
|
122953
122953
|
|
|
122954
122954
|
//const tagsRegx = new RegExp("<(\\/?[\\w:\\-\._]+)([^>]*)>(\\s*"+cdataRegx+")*([^<]+)?","g");
|
|
122955
122955
|
//const tagsRegx = new RegExp("<(\\/?)((\\w*:)?([\\w:\\-\._]+))([^>]*)>([^<]*)("+cdataRegx+"([^<]*))*([^<]+)?","g");
|
|
@@ -123068,7 +123068,7 @@ function buildAttributesMap(attrStr, jPath, tagName) {
|
|
|
123068
123068
|
// attrStr = attrStr.replace(/\r?\n/g, ' ');
|
|
123069
123069
|
//attrStr = attrStr || attrStr.trim();
|
|
123070
123070
|
|
|
123071
|
-
const matches = util$
|
|
123071
|
+
const matches = util$b.getAllMatches(attrStr, attrsRegx);
|
|
123072
123072
|
const len = matches.length; //don't make it inline
|
|
123073
123073
|
const attrs = {};
|
|
123074
123074
|
for (let i = 0; i < len; i++) {
|
|
@@ -123514,7 +123514,7 @@ function parseValue(val, shouldParse, options) {
|
|
|
123514
123514
|
else if(newval === 'false' ) return false;
|
|
123515
123515
|
else return toNumber(val, options);
|
|
123516
123516
|
} else {
|
|
123517
|
-
if (util$
|
|
123517
|
+
if (util$b.isExist(val)) {
|
|
123518
123518
|
return val;
|
|
123519
123519
|
} else {
|
|
123520
123520
|
return '';
|
|
@@ -129872,15 +129872,15 @@ function requireConstants () {
|
|
|
129872
129872
|
|
|
129873
129873
|
var helpers = {};
|
|
129874
129874
|
|
|
129875
|
-
var util$
|
|
129875
|
+
var util$a = {};
|
|
129876
129876
|
|
|
129877
129877
|
var hasRequiredUtil$2;
|
|
129878
129878
|
|
|
129879
129879
|
function requireUtil$2 () {
|
|
129880
|
-
if (hasRequiredUtil$2) return util$
|
|
129880
|
+
if (hasRequiredUtil$2) return util$a;
|
|
129881
129881
|
hasRequiredUtil$2 = 1;
|
|
129882
|
-
Object.defineProperty(util$
|
|
129883
|
-
util$
|
|
129882
|
+
Object.defineProperty(util$a, "__esModule", { value: true });
|
|
129883
|
+
util$a.shuffleArray = util$a.SocksClientError = void 0;
|
|
129884
129884
|
/**
|
|
129885
129885
|
* Error wrapper for SocksClient
|
|
129886
129886
|
*/
|
|
@@ -129890,7 +129890,7 @@ function requireUtil$2 () {
|
|
|
129890
129890
|
this.options = options;
|
|
129891
129891
|
}
|
|
129892
129892
|
}
|
|
129893
|
-
util$
|
|
129893
|
+
util$a.SocksClientError = SocksClientError;
|
|
129894
129894
|
/**
|
|
129895
129895
|
* Shuffles a given array.
|
|
129896
129896
|
* @param array The array to shuffle.
|
|
@@ -129901,9 +129901,9 @@ function requireUtil$2 () {
|
|
|
129901
129901
|
[array[i], array[j]] = [array[j], array[i]];
|
|
129902
129902
|
}
|
|
129903
129903
|
}
|
|
129904
|
-
util$
|
|
129904
|
+
util$a.shuffleArray = shuffleArray;
|
|
129905
129905
|
|
|
129906
|
-
return util$
|
|
129906
|
+
return util$a;
|
|
129907
129907
|
}
|
|
129908
129908
|
|
|
129909
129909
|
var hasRequiredHelpers;
|
|
@@ -131448,7 +131448,7 @@ var providers$1 = {};
|
|
|
131448
131448
|
|
|
131449
131449
|
var connection_string = {};
|
|
131450
131450
|
|
|
131451
|
-
var lib$
|
|
131451
|
+
var lib$7 = {};
|
|
131452
131452
|
|
|
131453
131453
|
var whatwgUrl = {};
|
|
131454
131454
|
|
|
@@ -131456,7 +131456,7 @@ var webidl2jsWrapper = {};
|
|
|
131456
131456
|
|
|
131457
131457
|
var URL$3 = {};
|
|
131458
131458
|
|
|
131459
|
-
var lib$
|
|
131459
|
+
var lib$6 = {};
|
|
131460
131460
|
|
|
131461
131461
|
(function (exports) {
|
|
131462
131462
|
|
|
@@ -131908,7 +131908,7 @@ var lib$5 = {};
|
|
|
131908
131908
|
};
|
|
131909
131909
|
|
|
131910
131910
|
exports.DOMTimeStamp = exports["unsigned long long"];
|
|
131911
|
-
} (lib$
|
|
131911
|
+
} (lib$6));
|
|
131912
131912
|
|
|
131913
131913
|
var utils$a = {exports: {}};
|
|
131914
131914
|
|
|
@@ -181084,7 +181084,7 @@ var URLSearchParams$3 = {};
|
|
|
181084
181084
|
|
|
181085
181085
|
var _Function = {};
|
|
181086
181086
|
|
|
181087
|
-
const conversions = lib$
|
|
181087
|
+
const conversions = lib$6;
|
|
181088
181088
|
const utils$9 = utilsExports$1;
|
|
181089
181089
|
|
|
181090
181090
|
_Function.convert = (globalObject, value, { context = "The provided value" } = {}) => {
|
|
@@ -181266,7 +181266,7 @@ function requireURLSearchParamsImpl () {
|
|
|
181266
181266
|
|
|
181267
181267
|
(function (exports) {
|
|
181268
181268
|
|
|
181269
|
-
const conversions = lib$
|
|
181269
|
+
const conversions = lib$6;
|
|
181270
181270
|
const utils = utilsExports$1;
|
|
181271
181271
|
|
|
181272
181272
|
const Function = _Function;
|
|
@@ -181956,7 +181956,7 @@ function requireURLImpl () {
|
|
|
181956
181956
|
|
|
181957
181957
|
(function (exports) {
|
|
181958
181958
|
|
|
181959
|
-
const conversions = lib$
|
|
181959
|
+
const conversions = lib$6;
|
|
181960
181960
|
const utils = utilsExports$1;
|
|
181961
181961
|
|
|
181962
181962
|
const implSymbol = utils.implSymbol;
|
|
@@ -182528,7 +182528,7 @@ function requireRedact () {
|
|
|
182528
182528
|
var hasRequiredLib$2;
|
|
182529
182529
|
|
|
182530
182530
|
function requireLib$2 () {
|
|
182531
|
-
if (hasRequiredLib$2) return lib$
|
|
182531
|
+
if (hasRequiredLib$2) return lib$7;
|
|
182532
182532
|
hasRequiredLib$2 = 1;
|
|
182533
182533
|
(function (exports) {
|
|
182534
182534
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -182742,8 +182742,8 @@ function requireLib$2 () {
|
|
|
182742
182742
|
exports.CommaAndColonSeparatedRecord = CommaAndColonSeparatedRecord;
|
|
182743
182743
|
exports.default = ConnectionString;
|
|
182744
182744
|
|
|
182745
|
-
} (lib$
|
|
182746
|
-
return lib$
|
|
182745
|
+
} (lib$7));
|
|
182746
|
+
return lib$7;
|
|
182747
182747
|
}
|
|
182748
182748
|
|
|
182749
182749
|
var client_metadata = {};
|
|
@@ -183772,7 +183772,7 @@ var state_machine = {};
|
|
|
183772
183772
|
|
|
183773
183773
|
Object.defineProperty(state_machine, "__esModule", { value: true });
|
|
183774
183774
|
state_machine.StateMachine = void 0;
|
|
183775
|
-
const fs$
|
|
183775
|
+
const fs$6 = require$$0$j;
|
|
183776
183776
|
const net$3 = require$$0$6;
|
|
183777
183777
|
const tls$1 = require$$1$3;
|
|
183778
183778
|
const bson_1$6 = bson$2;
|
|
@@ -184065,11 +184065,11 @@ class StateMachine {
|
|
|
184065
184065
|
*/
|
|
184066
184066
|
async setTlsOptions(tlsOptions, options) {
|
|
184067
184067
|
if (tlsOptions.tlsCertificateKeyFile) {
|
|
184068
|
-
const cert = await fs$
|
|
184068
|
+
const cert = await fs$6.readFile(tlsOptions.tlsCertificateKeyFile);
|
|
184069
184069
|
options.cert = options.key = cert;
|
|
184070
184070
|
}
|
|
184071
184071
|
if (tlsOptions.tlsCAFile) {
|
|
184072
|
-
options.ca = await fs$
|
|
184072
|
+
options.ca = await fs$6.readFile(tlsOptions.tlsCAFile);
|
|
184073
184073
|
}
|
|
184074
184074
|
if (tlsOptions.tlsCertificateKeyFilePassword) {
|
|
184075
184075
|
options.passphrase = tlsOptions.tlsCertificateKeyFilePassword;
|
|
@@ -187827,7 +187827,7 @@ service_workflow.commandDocument = commandDocument;
|
|
|
187827
187827
|
|
|
187828
187828
|
Object.defineProperty(aws_service_workflow, "__esModule", { value: true });
|
|
187829
187829
|
aws_service_workflow.AwsServiceWorkflow = void 0;
|
|
187830
|
-
const fs$
|
|
187830
|
+
const fs$5 = require$$0$b;
|
|
187831
187831
|
const error_1$b = error$3;
|
|
187832
187832
|
const service_workflow_1$1 = service_workflow;
|
|
187833
187833
|
/** Error for when the token is missing in the environment. */
|
|
@@ -187849,7 +187849,7 @@ class AwsServiceWorkflow extends service_workflow_1$1.ServiceWorkflow {
|
|
|
187849
187849
|
if (!tokenFile) {
|
|
187850
187850
|
throw new error_1$b.MongoAWSError(TOKEN_MISSING_ERROR);
|
|
187851
187851
|
}
|
|
187852
|
-
return fs$
|
|
187852
|
+
return fs$5.promises.readFile(tokenFile, 'utf8');
|
|
187853
187853
|
}
|
|
187854
187854
|
}
|
|
187855
187855
|
aws_service_workflow.AwsServiceWorkflow = AwsServiceWorkflow;
|
|
@@ -194213,7 +194213,7 @@ client_encryption.ClientEncryption = ClientEncryption;
|
|
|
194213
194213
|
Object.defineProperty(exports, "MongoCryptInvalidArgumentError", { enumerable: true, get: function () { return errors_1.MongoCryptInvalidArgumentError; } });
|
|
194214
194214
|
Object.defineProperty(exports, "MongoCryptKMSRequestNetworkTimeoutError", { enumerable: true, get: function () { return errors_1.MongoCryptKMSRequestNetworkTimeoutError; } });
|
|
194215
194215
|
|
|
194216
|
-
} (lib$
|
|
194216
|
+
} (lib$9));
|
|
194217
194217
|
|
|
194218
194218
|
/**
|
|
194219
194219
|
* 2020 Sylchauf
|
|
@@ -194230,7 +194230,7 @@ client_encryption.ClientEncryption = ClientEncryption;
|
|
|
194230
194230
|
* See the License for the specific language governing permissions and
|
|
194231
194231
|
* limitations under the License.
|
|
194232
194232
|
*/
|
|
194233
|
-
const Database$
|
|
194233
|
+
const Database$9 = class Database extends AbstractDatabase {
|
|
194234
194234
|
interval;
|
|
194235
194235
|
database;
|
|
194236
194236
|
client;
|
|
@@ -194260,7 +194260,7 @@ const Database$8 = class Database extends AbstractDatabase {
|
|
|
194260
194260
|
}, 10000);
|
|
194261
194261
|
}
|
|
194262
194262
|
init(callback) {
|
|
194263
|
-
lib$
|
|
194263
|
+
lib$9.MongoClient.connect(this.settings.url).then((v) => {
|
|
194264
194264
|
this.client = v;
|
|
194265
194265
|
this.database = v.db(this.settings.database);
|
|
194266
194266
|
this.collection = this.database.collection(this.settings.collection);
|
|
@@ -200292,7 +200292,7 @@ var tedious$1 = {exports: {}};
|
|
|
200292
200292
|
|
|
200293
200293
|
var base = {exports: {}};
|
|
200294
200294
|
|
|
200295
|
-
var lib$
|
|
200295
|
+
var lib$5 = {};
|
|
200296
200296
|
|
|
200297
200297
|
var connectionString = {};
|
|
200298
200298
|
|
|
@@ -200803,7 +200803,7 @@ builder.buildConnectionString = buildConnectionString;
|
|
|
200803
200803
|
exports.parseSqlConnectionString = sql_connection_string_1.default;
|
|
200804
200804
|
__exportStar(builder, exports);
|
|
200805
200805
|
|
|
200806
|
-
} (lib$
|
|
200806
|
+
} (lib$5));
|
|
200807
200807
|
|
|
200808
200808
|
var tarn$1 = {exports: {}};
|
|
200809
200809
|
|
|
@@ -201986,12 +201986,12 @@ Table$1.parseName = function parseName (name) {
|
|
|
201986
201986
|
}
|
|
201987
201987
|
};
|
|
201988
201988
|
|
|
201989
|
-
var table = Table$1;
|
|
201989
|
+
var table$1 = Table$1;
|
|
201990
201990
|
|
|
201991
201991
|
(function (module) {
|
|
201992
201992
|
|
|
201993
201993
|
const TYPES = datatypesExports.TYPES;
|
|
201994
|
-
const Table = table;
|
|
201994
|
+
const Table = table$1;
|
|
201995
201995
|
|
|
201996
201996
|
let PromiseLibrary = Promise;
|
|
201997
201997
|
const driver = {};
|
|
@@ -202413,7 +202413,7 @@ var error$2 = {
|
|
|
202413
202413
|
|
|
202414
202414
|
const { EventEmitter: EventEmitter$8 } = require$$0$7;
|
|
202415
202415
|
const debug$e = requireSrc()('mssql:base');
|
|
202416
|
-
const { parseSqlConnectionString } = lib$
|
|
202416
|
+
const { parseSqlConnectionString } = lib$5;
|
|
202417
202417
|
const tarn = tarnExports;
|
|
202418
202418
|
const { IDS: IDS$6 } = utils$6;
|
|
202419
202419
|
const ConnectionError$3 = connectionError;
|
|
@@ -204483,17 +204483,17 @@ let Transaction$2 = class Transaction extends EventEmitter$5 {
|
|
|
204483
204483
|
*/
|
|
204484
204484
|
Transaction$2.defaultIsolationLevel = ISOLATION_LEVEL$1.READ_COMMITTED;
|
|
204485
204485
|
|
|
204486
|
-
var transaction$
|
|
204486
|
+
var transaction$3 = Transaction$2;
|
|
204487
204487
|
|
|
204488
204488
|
(function (module) {
|
|
204489
204489
|
|
|
204490
204490
|
const ConnectionPool = connectionPool$1;
|
|
204491
204491
|
const PreparedStatement = preparedStatement;
|
|
204492
204492
|
const Request = request$2;
|
|
204493
|
-
const Transaction = transaction$
|
|
204493
|
+
const Transaction = transaction$3;
|
|
204494
204494
|
const { ConnectionError, TransactionError, RequestError, PreparedStatementError, MSSQLError } = error$2;
|
|
204495
204495
|
const shared = sharedExports;
|
|
204496
|
-
const Table = table;
|
|
204496
|
+
const Table = table$1;
|
|
204497
204497
|
const ISOLATION_LEVEL = isolationlevel;
|
|
204498
204498
|
const { TYPES } = datatypesExports;
|
|
204499
204499
|
const { connect, close, on, off, removeListener, query, batch } = globalConnectionExports;
|
|
@@ -214853,7 +214853,7 @@ var safeBufferExports = safeBuffer$2.exports;
|
|
|
214853
214853
|
|
|
214854
214854
|
var Buffer$9 = safeBufferExports.Buffer;
|
|
214855
214855
|
var Stream$2 = require$$0$a;
|
|
214856
|
-
var util$
|
|
214856
|
+
var util$9 = require$$0$5;
|
|
214857
214857
|
|
|
214858
214858
|
function DataStream$2(data) {
|
|
214859
214859
|
this.buffer = null;
|
|
@@ -214888,7 +214888,7 @@ function DataStream$2(data) {
|
|
|
214888
214888
|
|
|
214889
214889
|
throw new TypeError('Unexpected data type ('+ typeof data + ')');
|
|
214890
214890
|
}
|
|
214891
|
-
util$
|
|
214891
|
+
util$9.inherits(DataStream$2, Stream$2);
|
|
214892
214892
|
|
|
214893
214893
|
DataStream$2.prototype.write = function write(data) {
|
|
214894
214894
|
this.buffer = Buffer$9.concat([this.buffer, Buffer$9.from(data)]);
|
|
@@ -215159,7 +215159,7 @@ var bufferEqual = bufferEqualConstantTime;
|
|
|
215159
215159
|
var Buffer$6 = safeBufferExports.Buffer;
|
|
215160
215160
|
var crypto$3 = require$$0$9;
|
|
215161
215161
|
var formatEcdsa = ecdsaSigFormatter;
|
|
215162
|
-
var util$
|
|
215162
|
+
var util$8 = require$$0$5;
|
|
215163
215163
|
|
|
215164
215164
|
var MSG_INVALID_ALGORITHM = '"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".';
|
|
215165
215165
|
var MSG_INVALID_SECRET = 'secret must be a string or buffer';
|
|
@@ -215266,7 +215266,7 @@ function toBase64(base64url) {
|
|
|
215266
215266
|
|
|
215267
215267
|
function typeError(template) {
|
|
215268
215268
|
var args = [].slice.call(arguments, 1);
|
|
215269
|
-
var errMsg = util$
|
|
215269
|
+
var errMsg = util$8.format.bind(util$8, template).apply(null, args);
|
|
215270
215270
|
return new TypeError(errMsg);
|
|
215271
215271
|
}
|
|
215272
215272
|
|
|
@@ -215425,7 +215425,7 @@ var DataStream$1 = dataStream;
|
|
|
215425
215425
|
var jwa$1 = jwa$2;
|
|
215426
215426
|
var Stream$1 = require$$0$a;
|
|
215427
215427
|
var toString$1 = tostring;
|
|
215428
|
-
var util$
|
|
215428
|
+
var util$7 = require$$0$5;
|
|
215429
215429
|
|
|
215430
215430
|
function base64url(string, encoding) {
|
|
215431
215431
|
return Buffer$4
|
|
@@ -215440,7 +215440,7 @@ function jwsSecuredInput(header, payload, encoding) {
|
|
|
215440
215440
|
encoding = encoding || 'utf8';
|
|
215441
215441
|
var encodedHeader = base64url(toString$1(header), 'binary');
|
|
215442
215442
|
var encodedPayload = base64url(toString$1(payload), encoding);
|
|
215443
|
-
return util$
|
|
215443
|
+
return util$7.format('%s.%s', encodedHeader, encodedPayload);
|
|
215444
215444
|
}
|
|
215445
215445
|
|
|
215446
215446
|
function jwsSign(opts) {
|
|
@@ -215451,7 +215451,7 @@ function jwsSign(opts) {
|
|
|
215451
215451
|
var algo = jwa$1(header.alg);
|
|
215452
215452
|
var securedInput = jwsSecuredInput(header, payload, encoding);
|
|
215453
215453
|
var signature = algo.sign(securedInput, secretOrKey);
|
|
215454
|
-
return util$
|
|
215454
|
+
return util$7.format('%s.%s', securedInput, signature);
|
|
215455
215455
|
}
|
|
215456
215456
|
|
|
215457
215457
|
function SignStream$1(opts) {
|
|
@@ -215472,7 +215472,7 @@ function SignStream$1(opts) {
|
|
|
215472
215472
|
this.sign();
|
|
215473
215473
|
}.bind(this));
|
|
215474
215474
|
}
|
|
215475
|
-
util$
|
|
215475
|
+
util$7.inherits(SignStream$1, Stream$1);
|
|
215476
215476
|
|
|
215477
215477
|
SignStream$1.prototype.sign = function sign() {
|
|
215478
215478
|
try {
|
|
@@ -215505,7 +215505,7 @@ var DataStream = dataStream;
|
|
|
215505
215505
|
var jwa = jwa$2;
|
|
215506
215506
|
var Stream = require$$0$a;
|
|
215507
215507
|
var toString = tostring;
|
|
215508
|
-
var util$
|
|
215508
|
+
var util$6 = require$$0$5;
|
|
215509
215509
|
var JWS_REGEX = /^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;
|
|
215510
215510
|
|
|
215511
215511
|
function isObject$1(thing) {
|
|
@@ -215597,7 +215597,7 @@ function VerifyStream$1(opts) {
|
|
|
215597
215597
|
this.verify();
|
|
215598
215598
|
}.bind(this));
|
|
215599
215599
|
}
|
|
215600
|
-
util$
|
|
215600
|
+
util$6.inherits(VerifyStream$1, Stream);
|
|
215601
215601
|
VerifyStream$1.prototype.verify = function verify() {
|
|
215602
215602
|
try {
|
|
215603
215603
|
var valid = jwsVerify(this.signature.buffer, this.algorithm, this.key.buffer);
|
|
@@ -246880,13 +246880,13 @@ class ClientAssertionCredential {
|
|
|
246880
246880
|
|
|
246881
246881
|
var isWsl$2 = {exports: {}};
|
|
246882
246882
|
|
|
246883
|
-
const fs$
|
|
246883
|
+
const fs$4 = require$$0$b;
|
|
246884
246884
|
|
|
246885
246885
|
let isDocker$3;
|
|
246886
246886
|
|
|
246887
246887
|
function hasDockerEnv$1() {
|
|
246888
246888
|
try {
|
|
246889
|
-
fs$
|
|
246889
|
+
fs$4.statSync('/.dockerenv');
|
|
246890
246890
|
return true;
|
|
246891
246891
|
} catch (_) {
|
|
246892
246892
|
return false;
|
|
@@ -246895,7 +246895,7 @@ function hasDockerEnv$1() {
|
|
|
246895
246895
|
|
|
246896
246896
|
function hasDockerCGroup$1() {
|
|
246897
246897
|
try {
|
|
246898
|
-
return fs$
|
|
246898
|
+
return fs$4.readFileSync('/proc/self/cgroup', 'utf8').includes('docker');
|
|
246899
246899
|
} catch (_) {
|
|
246900
246900
|
return false;
|
|
246901
246901
|
}
|
|
@@ -246910,7 +246910,7 @@ var isDocker_1$1 = () => {
|
|
|
246910
246910
|
};
|
|
246911
246911
|
|
|
246912
246912
|
const os = os$3;
|
|
246913
|
-
const fs$
|
|
246913
|
+
const fs$3 = require$$0$b;
|
|
246914
246914
|
const isDocker$2 = isDocker_1$1;
|
|
246915
246915
|
|
|
246916
246916
|
const isWsl$1 = () => {
|
|
@@ -246927,7 +246927,7 @@ const isWsl$1 = () => {
|
|
|
246927
246927
|
}
|
|
246928
246928
|
|
|
246929
246929
|
try {
|
|
246930
|
-
return fs$
|
|
246930
|
+
return fs$3.readFileSync('/proc/version', 'utf8').toLowerCase().includes('microsoft') ?
|
|
246931
246931
|
!isDocker$2() : false;
|
|
246932
246932
|
} catch (_) {
|
|
246933
246933
|
return false;
|
|
@@ -246942,13 +246942,13 @@ if (process.env.__IS_WSL_TEST__) {
|
|
|
246942
246942
|
|
|
246943
246943
|
var isWslExports = isWsl$2.exports;
|
|
246944
246944
|
|
|
246945
|
-
const fs$
|
|
246945
|
+
const fs$2 = require$$0$b;
|
|
246946
246946
|
|
|
246947
246947
|
let isDocker$1;
|
|
246948
246948
|
|
|
246949
246949
|
function hasDockerEnv() {
|
|
246950
246950
|
try {
|
|
246951
|
-
fs$
|
|
246951
|
+
fs$2.statSync('/.dockerenv');
|
|
246952
246952
|
return true;
|
|
246953
246953
|
} catch (_) {
|
|
246954
246954
|
return false;
|
|
@@ -246957,7 +246957,7 @@ function hasDockerEnv() {
|
|
|
246957
246957
|
|
|
246958
246958
|
function hasDockerCGroup() {
|
|
246959
246959
|
try {
|
|
246960
|
-
return fs$
|
|
246960
|
+
return fs$2.readFileSync('/proc/self/cgroup', 'utf8').includes('docker');
|
|
246961
246961
|
} catch (_) {
|
|
246962
246962
|
return false;
|
|
246963
246963
|
}
|
|
@@ -246990,22 +246990,22 @@ var defineLazyProp = (object, propertyName, fn) => {
|
|
|
246990
246990
|
return object;
|
|
246991
246991
|
};
|
|
246992
246992
|
|
|
246993
|
-
const path = require$$1$4;
|
|
246993
|
+
const path$1 = require$$1$4;
|
|
246994
246994
|
const childProcess = require$$1$a;
|
|
246995
|
-
const {promises: fs, constants: fsConstants} = require$$0$b;
|
|
246995
|
+
const {promises: fs$1, constants: fsConstants} = require$$0$b;
|
|
246996
246996
|
const isWsl = isWslExports;
|
|
246997
246997
|
const isDocker = isDocker_1;
|
|
246998
246998
|
const defineLazyProperty = defineLazyProp;
|
|
246999
246999
|
|
|
247000
247000
|
// Path to included `xdg-open`.
|
|
247001
|
-
const localXdgOpenPath = path.join(__dirname, 'xdg-open');
|
|
247001
|
+
const localXdgOpenPath = path$1.join(__dirname, 'xdg-open');
|
|
247002
247002
|
|
|
247003
247003
|
const {platform, arch} = process;
|
|
247004
247004
|
|
|
247005
247005
|
// Podman detection
|
|
247006
247006
|
const hasContainerEnv = () => {
|
|
247007
247007
|
try {
|
|
247008
|
-
fs.statSync('/run/.containerenv');
|
|
247008
|
+
fs$1.statSync('/run/.containerenv');
|
|
247009
247009
|
return true;
|
|
247010
247010
|
} catch {
|
|
247011
247011
|
return false;
|
|
@@ -247044,7 +247044,7 @@ const getWslDrivesMountPoint = (() => {
|
|
|
247044
247044
|
|
|
247045
247045
|
let isConfigFileExists = false;
|
|
247046
247046
|
try {
|
|
247047
|
-
await fs.access(configFilePath, fsConstants.F_OK);
|
|
247047
|
+
await fs$1.access(configFilePath, fsConstants.F_OK);
|
|
247048
247048
|
isConfigFileExists = true;
|
|
247049
247049
|
} catch {}
|
|
247050
247050
|
|
|
@@ -247052,7 +247052,7 @@ const getWslDrivesMountPoint = (() => {
|
|
|
247052
247052
|
return defaultMountPoint;
|
|
247053
247053
|
}
|
|
247054
247054
|
|
|
247055
|
-
const configContent = await fs.readFile(configFilePath, {encoding: 'utf8'});
|
|
247055
|
+
const configContent = await fs$1.readFile(configFilePath, {encoding: 'utf8'});
|
|
247056
247056
|
const configMountPoint = /(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(configContent);
|
|
247057
247057
|
|
|
247058
247058
|
if (!configMountPoint) {
|
|
@@ -247184,7 +247184,7 @@ const baseOpen = async options => {
|
|
|
247184
247184
|
// Check if local `xdg-open` exists and is executable.
|
|
247185
247185
|
let exeLocalXdgOpen = false;
|
|
247186
247186
|
try {
|
|
247187
|
-
await fs.access(localXdgOpenPath, fsConstants.X_OK);
|
|
247187
|
+
await fs$1.access(localXdgOpenPath, fsConstants.X_OK);
|
|
247188
247188
|
exeLocalXdgOpen = true;
|
|
247189
247189
|
} catch {}
|
|
247190
247190
|
|
|
@@ -267594,7 +267594,7 @@ var imageExports = image.exports;
|
|
|
267594
267594
|
|
|
267595
267595
|
var text = {exports: {}};
|
|
267596
267596
|
|
|
267597
|
-
var lib$
|
|
267597
|
+
var lib$4 = {exports: {}};
|
|
267598
267598
|
|
|
267599
267599
|
/* eslint-disable node/no-deprecated-api */
|
|
267600
267600
|
|
|
@@ -278887,9 +278887,9 @@ function requireStreams () {
|
|
|
278887
278887
|
throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it.");
|
|
278888
278888
|
};
|
|
278889
278889
|
}
|
|
278890
|
-
} (lib$
|
|
278890
|
+
} (lib$4));
|
|
278891
278891
|
|
|
278892
|
-
var libExports$
|
|
278892
|
+
var libExports$3 = lib$4.exports;
|
|
278893
278893
|
|
|
278894
278894
|
(function (module, exports) {
|
|
278895
278895
|
|
|
@@ -278898,7 +278898,7 @@ var libExports$2 = lib$3.exports;
|
|
|
278898
278898
|
});
|
|
278899
278899
|
exports.default = void 0;
|
|
278900
278900
|
|
|
278901
|
-
var _iconvLite = _interopRequireDefault(libExports$
|
|
278901
|
+
var _iconvLite = _interopRequireDefault(libExports$3);
|
|
278902
278902
|
|
|
278903
278903
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
278904
278904
|
|
|
@@ -279317,7 +279317,7 @@ var varchar = {exports: {}};
|
|
|
279317
279317
|
});
|
|
279318
279318
|
exports.default = void 0;
|
|
279319
279319
|
|
|
279320
|
-
var _iconvLite = _interopRequireDefault(libExports$
|
|
279320
|
+
var _iconvLite = _interopRequireDefault(libExports$3);
|
|
279321
279321
|
|
|
279322
279322
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
279323
279323
|
|
|
@@ -279543,7 +279543,7 @@ var char = {exports: {}};
|
|
|
279543
279543
|
});
|
|
279544
279544
|
exports.default = void 0;
|
|
279545
279545
|
|
|
279546
|
-
var _iconvLite = _interopRequireDefault(libExports$
|
|
279546
|
+
var _iconvLite = _interopRequireDefault(libExports$3);
|
|
279547
279547
|
|
|
279548
279548
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
279549
279549
|
|
|
@@ -282103,7 +282103,7 @@ var valueParser = {exports: {}};
|
|
|
282103
282103
|
|
|
282104
282104
|
var _dataType = dataType;
|
|
282105
282105
|
|
|
282106
|
-
var _iconvLite = _interopRequireDefault(libExports$
|
|
282106
|
+
var _iconvLite = _interopRequireDefault(libExports$3);
|
|
282107
282107
|
|
|
282108
282108
|
var _sprintfJs = sprintf;
|
|
282109
282109
|
|
|
@@ -283572,14 +283572,14 @@ let Parser$1 = class Parser extends _events.EventEmitter {
|
|
|
283572
283572
|
|
|
283573
283573
|
tokenStreamParser.Parser = Parser$1;
|
|
283574
283574
|
|
|
283575
|
-
var transaction$
|
|
283575
|
+
var transaction$2 = {};
|
|
283576
283576
|
|
|
283577
|
-
Object.defineProperty(transaction$
|
|
283577
|
+
Object.defineProperty(transaction$2, "__esModule", {
|
|
283578
283578
|
value: true
|
|
283579
283579
|
});
|
|
283580
|
-
transaction$
|
|
283581
|
-
transaction$
|
|
283582
|
-
transaction$
|
|
283580
|
+
transaction$2.Transaction = transaction$2.OPERATION_TYPE = transaction$2.ISOLATION_LEVEL = void 0;
|
|
283581
|
+
transaction$2.assertValidIsolationLevel = assertValidIsolationLevel;
|
|
283582
|
+
transaction$2.isolationLevelByValue = void 0;
|
|
283583
283583
|
|
|
283584
283584
|
var _writableTrackingBuffer = _interopRequireDefault$2(writableTrackingBufferExports);
|
|
283585
283585
|
|
|
@@ -283599,7 +283599,7 @@ const OPERATION_TYPE = {
|
|
|
283599
283599
|
TM_ROLLBACK_XACT: 0x08,
|
|
283600
283600
|
TM_SAVE_XACT: 0x09
|
|
283601
283601
|
};
|
|
283602
|
-
transaction$
|
|
283602
|
+
transaction$2.OPERATION_TYPE = OPERATION_TYPE;
|
|
283603
283603
|
const ISOLATION_LEVEL = {
|
|
283604
283604
|
NO_CHANGE: 0x00,
|
|
283605
283605
|
READ_UNCOMMITTED: 0x01,
|
|
@@ -283608,9 +283608,9 @@ const ISOLATION_LEVEL = {
|
|
|
283608
283608
|
SERIALIZABLE: 0x04,
|
|
283609
283609
|
SNAPSHOT: 0x05
|
|
283610
283610
|
};
|
|
283611
|
-
transaction$
|
|
283611
|
+
transaction$2.ISOLATION_LEVEL = ISOLATION_LEVEL;
|
|
283612
283612
|
const isolationLevelByValue = {};
|
|
283613
|
-
transaction$
|
|
283613
|
+
transaction$2.isolationLevelByValue = isolationLevelByValue;
|
|
283614
283614
|
|
|
283615
283615
|
for (const name in ISOLATION_LEVEL) {
|
|
283616
283616
|
const value = ISOLATION_LEVEL[name];
|
|
@@ -283737,7 +283737,7 @@ let Transaction$1 = class Transaction {
|
|
|
283737
283737
|
|
|
283738
283738
|
};
|
|
283739
283739
|
|
|
283740
|
-
transaction$
|
|
283740
|
+
transaction$2.Transaction = Transaction$1;
|
|
283741
283741
|
|
|
283742
283742
|
var connector = {};
|
|
283743
283743
|
|
|
@@ -285394,7 +285394,7 @@ var GetV = requireGetV();
|
|
|
285394
285394
|
var IsCallable = requireIsCallable();
|
|
285395
285395
|
var IsPropertyKey = requireIsPropertyKey();
|
|
285396
285396
|
|
|
285397
|
-
var inspect = objectInspect;
|
|
285397
|
+
var inspect$1 = objectInspect;
|
|
285398
285398
|
|
|
285399
285399
|
// https://262.ecma-international.org/6.0/#sec-getmethod
|
|
285400
285400
|
|
|
@@ -285414,7 +285414,7 @@ var GetMethod$1 = function GetMethod(O, P) {
|
|
|
285414
285414
|
|
|
285415
285415
|
// 7.3.9.5
|
|
285416
285416
|
if (!IsCallable(func)) {
|
|
285417
|
-
throw new $TypeError$1(inspect(P) + ' is not a function: ' + inspect(func));
|
|
285417
|
+
throw new $TypeError$1(inspect$1(P) + ' is not a function: ' + inspect$1(func));
|
|
285418
285418
|
}
|
|
285419
285419
|
|
|
285420
285420
|
// 7.3.9.6
|
|
@@ -287184,7 +287184,7 @@ handler.AttentionTokenHandler = AttentionTokenHandler;
|
|
|
287184
287184
|
|
|
287185
287185
|
var _tokenStreamParser = tokenStreamParser;
|
|
287186
287186
|
|
|
287187
|
-
var _transaction = transaction$
|
|
287187
|
+
var _transaction = transaction$2;
|
|
287188
287188
|
|
|
287189
287189
|
var _errors = errors$7;
|
|
287190
287190
|
|
|
@@ -290110,7 +290110,7 @@ var connectionExports = connection$1.exports;
|
|
|
290110
290110
|
|
|
290111
290111
|
var _dataType = dataType;
|
|
290112
290112
|
|
|
290113
|
-
var _transaction = transaction$
|
|
290113
|
+
var _transaction = transaction$2;
|
|
290114
290114
|
|
|
290115
290115
|
var _tdsVersions = tdsVersions;
|
|
290116
290116
|
|
|
@@ -290268,7 +290268,7 @@ class ConnectionPool extends BaseConnectionPool {
|
|
|
290268
290268
|
var connectionPool = ConnectionPool;
|
|
290269
290269
|
|
|
290270
290270
|
const debug$1 = requireSrc()('mssql:tedi');
|
|
290271
|
-
const BaseTransaction = transaction$
|
|
290271
|
+
const BaseTransaction = transaction$3;
|
|
290272
290272
|
const { IDS: IDS$1 } = utils$6;
|
|
290273
290273
|
const TransactionError = transactionError;
|
|
290274
290274
|
|
|
@@ -290362,7 +290362,7 @@ class Transaction extends BaseTransaction {
|
|
|
290362
290362
|
}
|
|
290363
290363
|
}
|
|
290364
290364
|
|
|
290365
|
-
var transaction = Transaction;
|
|
290365
|
+
var transaction$1 = Transaction;
|
|
290366
290366
|
|
|
290367
290367
|
var udt = {};
|
|
290368
290368
|
|
|
@@ -290691,7 +290691,7 @@ const BaseRequest = request$2;
|
|
|
290691
290691
|
const RequestError = requestError;
|
|
290692
290692
|
const { IDS, objectHasProperty } = utils$6;
|
|
290693
290693
|
const { TYPES, DECLARATIONS, declare, cast } = datatypesExports;
|
|
290694
|
-
const Table = table;
|
|
290694
|
+
const Table = table$1;
|
|
290695
290695
|
const { PARSERS: UDT } = udt;
|
|
290696
290696
|
const { valueHandler } = sharedExports;
|
|
290697
290697
|
|
|
@@ -291690,7 +291690,7 @@ var request = Request;
|
|
|
291690
291690
|
|
|
291691
291691
|
const base = baseExports;
|
|
291692
291692
|
const ConnectionPool = connectionPool;
|
|
291693
|
-
const Transaction = transaction;
|
|
291693
|
+
const Transaction = transaction$1;
|
|
291694
291694
|
const Request = request;
|
|
291695
291695
|
|
|
291696
291696
|
module.exports = Object.assign({
|
|
@@ -291749,7 +291749,7 @@ var mssql$1 = /*@__PURE__*/getDefaultExportFromCjs(mssql);
|
|
|
291749
291749
|
* Note: This requires MS SQL Server >= 2008 due to the usage of the MERGE statement
|
|
291750
291750
|
*
|
|
291751
291751
|
*/
|
|
291752
|
-
const Database$
|
|
291752
|
+
const Database$8 = class MSSQL extends AbstractDatabase {
|
|
291753
291753
|
db;
|
|
291754
291754
|
constructor(settings) {
|
|
291755
291755
|
super();
|
|
@@ -301753,12 +301753,12 @@ function requireStream () {
|
|
|
301753
301753
|
return stream$1;
|
|
301754
301754
|
}
|
|
301755
301755
|
|
|
301756
|
-
var util$
|
|
301756
|
+
var util$5 = {};
|
|
301757
301757
|
|
|
301758
301758
|
var hasRequiredUtil$1;
|
|
301759
301759
|
|
|
301760
301760
|
function requireUtil$1 () {
|
|
301761
|
-
if (hasRequiredUtil$1) return util$
|
|
301761
|
+
if (hasRequiredUtil$1) return util$5;
|
|
301762
301762
|
hasRequiredUtil$1 = 1;
|
|
301763
301763
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
301764
301764
|
//
|
|
@@ -301790,67 +301790,67 @@ function requireUtil$1 () {
|
|
|
301790
301790
|
}
|
|
301791
301791
|
return objectToString(arg) === '[object Array]';
|
|
301792
301792
|
}
|
|
301793
|
-
util$
|
|
301793
|
+
util$5.isArray = isArray;
|
|
301794
301794
|
|
|
301795
301795
|
function isBoolean(arg) {
|
|
301796
301796
|
return typeof arg === 'boolean';
|
|
301797
301797
|
}
|
|
301798
|
-
util$
|
|
301798
|
+
util$5.isBoolean = isBoolean;
|
|
301799
301799
|
|
|
301800
301800
|
function isNull(arg) {
|
|
301801
301801
|
return arg === null;
|
|
301802
301802
|
}
|
|
301803
|
-
util$
|
|
301803
|
+
util$5.isNull = isNull;
|
|
301804
301804
|
|
|
301805
301805
|
function isNullOrUndefined(arg) {
|
|
301806
301806
|
return arg == null;
|
|
301807
301807
|
}
|
|
301808
|
-
util$
|
|
301808
|
+
util$5.isNullOrUndefined = isNullOrUndefined;
|
|
301809
301809
|
|
|
301810
301810
|
function isNumber(arg) {
|
|
301811
301811
|
return typeof arg === 'number';
|
|
301812
301812
|
}
|
|
301813
|
-
util$
|
|
301813
|
+
util$5.isNumber = isNumber;
|
|
301814
301814
|
|
|
301815
301815
|
function isString(arg) {
|
|
301816
301816
|
return typeof arg === 'string';
|
|
301817
301817
|
}
|
|
301818
|
-
util$
|
|
301818
|
+
util$5.isString = isString;
|
|
301819
301819
|
|
|
301820
301820
|
function isSymbol(arg) {
|
|
301821
301821
|
return typeof arg === 'symbol';
|
|
301822
301822
|
}
|
|
301823
|
-
util$
|
|
301823
|
+
util$5.isSymbol = isSymbol;
|
|
301824
301824
|
|
|
301825
301825
|
function isUndefined(arg) {
|
|
301826
301826
|
return arg === void 0;
|
|
301827
301827
|
}
|
|
301828
|
-
util$
|
|
301828
|
+
util$5.isUndefined = isUndefined;
|
|
301829
301829
|
|
|
301830
301830
|
function isRegExp(re) {
|
|
301831
301831
|
return objectToString(re) === '[object RegExp]';
|
|
301832
301832
|
}
|
|
301833
|
-
util$
|
|
301833
|
+
util$5.isRegExp = isRegExp;
|
|
301834
301834
|
|
|
301835
301835
|
function isObject(arg) {
|
|
301836
301836
|
return typeof arg === 'object' && arg !== null;
|
|
301837
301837
|
}
|
|
301838
|
-
util$
|
|
301838
|
+
util$5.isObject = isObject;
|
|
301839
301839
|
|
|
301840
301840
|
function isDate(d) {
|
|
301841
301841
|
return objectToString(d) === '[object Date]';
|
|
301842
301842
|
}
|
|
301843
|
-
util$
|
|
301843
|
+
util$5.isDate = isDate;
|
|
301844
301844
|
|
|
301845
301845
|
function isError(e) {
|
|
301846
301846
|
return (objectToString(e) === '[object Error]' || e instanceof Error);
|
|
301847
301847
|
}
|
|
301848
|
-
util$
|
|
301848
|
+
util$5.isError = isError;
|
|
301849
301849
|
|
|
301850
301850
|
function isFunction(arg) {
|
|
301851
301851
|
return typeof arg === 'function';
|
|
301852
301852
|
}
|
|
301853
|
-
util$
|
|
301853
|
+
util$5.isFunction = isFunction;
|
|
301854
301854
|
|
|
301855
301855
|
function isPrimitive(arg) {
|
|
301856
301856
|
return arg === null ||
|
|
@@ -301860,14 +301860,14 @@ function requireUtil$1 () {
|
|
|
301860
301860
|
typeof arg === 'symbol' || // ES6 symbol
|
|
301861
301861
|
typeof arg === 'undefined';
|
|
301862
301862
|
}
|
|
301863
|
-
util$
|
|
301863
|
+
util$5.isPrimitive = isPrimitive;
|
|
301864
301864
|
|
|
301865
|
-
util$
|
|
301865
|
+
util$5.isBuffer = require$$0$f.Buffer.isBuffer;
|
|
301866
301866
|
|
|
301867
301867
|
function objectToString(o) {
|
|
301868
301868
|
return Object.prototype.toString.call(o);
|
|
301869
301869
|
}
|
|
301870
|
-
return util$
|
|
301870
|
+
return util$5;
|
|
301871
301871
|
}
|
|
301872
301872
|
|
|
301873
301873
|
var BufferList = {exports: {}};
|
|
@@ -306967,7 +306967,7 @@ var mysqlExports = requireMysql();
|
|
|
306967
306967
|
* See the License for the specific language governing permissions and
|
|
306968
306968
|
* limitations under the License.
|
|
306969
306969
|
*/
|
|
306970
|
-
const Database$
|
|
306970
|
+
const Database$7 = class Database extends AbstractDatabase {
|
|
306971
306971
|
_mysqlSettings;
|
|
306972
306972
|
_pool;
|
|
306973
306973
|
constructor(settings) {
|
|
@@ -307110,7 +307110,7 @@ const Database$6 = class Database extends AbstractDatabase {
|
|
|
307110
307110
|
}
|
|
307111
307111
|
};
|
|
307112
307112
|
|
|
307113
|
-
var lib$
|
|
307113
|
+
var lib$3 = {exports: {}};
|
|
307114
307114
|
|
|
307115
307115
|
var defaults$3 = {exports: {}};
|
|
307116
307116
|
|
|
@@ -309988,7 +309988,7 @@ const flushBuffer$1 = codeOnlyBuffer(72 /* flush */);
|
|
|
309988
309988
|
const syncBuffer$1 = codeOnlyBuffer(83 /* sync */);
|
|
309989
309989
|
const endBuffer$1 = codeOnlyBuffer(88 /* end */);
|
|
309990
309990
|
const copyDoneBuffer = codeOnlyBuffer(99 /* copyDone */);
|
|
309991
|
-
const serialize$
|
|
309991
|
+
const serialize$2 = {
|
|
309992
309992
|
startup,
|
|
309993
309993
|
password,
|
|
309994
309994
|
requestSsl,
|
|
@@ -310008,7 +310008,7 @@ const serialize$1 = {
|
|
|
310008
310008
|
copyFail,
|
|
310009
310009
|
cancel: cancel$1,
|
|
310010
310010
|
};
|
|
310011
|
-
serializer.serialize = serialize$
|
|
310011
|
+
serializer.serialize = serialize$2;
|
|
310012
310012
|
|
|
310013
310013
|
var parser = {};
|
|
310014
310014
|
|
|
@@ -310432,12 +310432,12 @@ stream.getSecureStream = function getSecureStream(options) {
|
|
|
310432
310432
|
|
|
310433
310433
|
var EventEmitter$3 = require$$0$7.EventEmitter;
|
|
310434
310434
|
|
|
310435
|
-
const { parse, serialize } = dist$7;
|
|
310435
|
+
const { parse, serialize: serialize$1 } = dist$7;
|
|
310436
310436
|
const { getStream, getSecureStream } = stream;
|
|
310437
310437
|
|
|
310438
|
-
const flushBuffer = serialize.flush();
|
|
310439
|
-
const syncBuffer = serialize.sync();
|
|
310440
|
-
const endBuffer = serialize.end();
|
|
310438
|
+
const flushBuffer = serialize$1.flush();
|
|
310439
|
+
const syncBuffer = serialize$1.sync();
|
|
310440
|
+
const endBuffer = serialize$1.end();
|
|
310441
310441
|
|
|
310442
310442
|
// TODO(bmc) support binary mode at some point
|
|
310443
310443
|
let Connection$1 = class Connection extends EventEmitter$3 {
|
|
@@ -310548,27 +310548,27 @@ let Connection$1 = class Connection extends EventEmitter$3 {
|
|
|
310548
310548
|
}
|
|
310549
310549
|
|
|
310550
310550
|
requestSsl() {
|
|
310551
|
-
this.stream.write(serialize.requestSsl());
|
|
310551
|
+
this.stream.write(serialize$1.requestSsl());
|
|
310552
310552
|
}
|
|
310553
310553
|
|
|
310554
310554
|
startup(config) {
|
|
310555
|
-
this.stream.write(serialize.startup(config));
|
|
310555
|
+
this.stream.write(serialize$1.startup(config));
|
|
310556
310556
|
}
|
|
310557
310557
|
|
|
310558
310558
|
cancel(processID, secretKey) {
|
|
310559
|
-
this._send(serialize.cancel(processID, secretKey));
|
|
310559
|
+
this._send(serialize$1.cancel(processID, secretKey));
|
|
310560
310560
|
}
|
|
310561
310561
|
|
|
310562
310562
|
password(password) {
|
|
310563
|
-
this._send(serialize.password(password));
|
|
310563
|
+
this._send(serialize$1.password(password));
|
|
310564
310564
|
}
|
|
310565
310565
|
|
|
310566
310566
|
sendSASLInitialResponseMessage(mechanism, initialResponse) {
|
|
310567
|
-
this._send(serialize.sendSASLInitialResponseMessage(mechanism, initialResponse));
|
|
310567
|
+
this._send(serialize$1.sendSASLInitialResponseMessage(mechanism, initialResponse));
|
|
310568
310568
|
}
|
|
310569
310569
|
|
|
310570
310570
|
sendSCRAMClientFinalMessage(additionalData) {
|
|
310571
|
-
this._send(serialize.sendSCRAMClientFinalMessage(additionalData));
|
|
310571
|
+
this._send(serialize$1.sendSCRAMClientFinalMessage(additionalData));
|
|
310572
310572
|
}
|
|
310573
310573
|
|
|
310574
310574
|
_send(buffer) {
|
|
@@ -310579,22 +310579,22 @@ let Connection$1 = class Connection extends EventEmitter$3 {
|
|
|
310579
310579
|
}
|
|
310580
310580
|
|
|
310581
310581
|
query(text) {
|
|
310582
|
-
this._send(serialize.query(text));
|
|
310582
|
+
this._send(serialize$1.query(text));
|
|
310583
310583
|
}
|
|
310584
310584
|
|
|
310585
310585
|
// send parse message
|
|
310586
310586
|
parse(query) {
|
|
310587
|
-
this._send(serialize.parse(query));
|
|
310587
|
+
this._send(serialize$1.parse(query));
|
|
310588
310588
|
}
|
|
310589
310589
|
|
|
310590
310590
|
// send bind message
|
|
310591
310591
|
bind(config) {
|
|
310592
|
-
this._send(serialize.bind(config));
|
|
310592
|
+
this._send(serialize$1.bind(config));
|
|
310593
310593
|
}
|
|
310594
310594
|
|
|
310595
310595
|
// send execute message
|
|
310596
310596
|
execute(config) {
|
|
310597
|
-
this._send(serialize.execute(config));
|
|
310597
|
+
this._send(serialize$1.execute(config));
|
|
310598
310598
|
}
|
|
310599
310599
|
|
|
310600
310600
|
flush() {
|
|
@@ -310629,29 +310629,29 @@ let Connection$1 = class Connection extends EventEmitter$3 {
|
|
|
310629
310629
|
}
|
|
310630
310630
|
|
|
310631
310631
|
close(msg) {
|
|
310632
|
-
this._send(serialize.close(msg));
|
|
310632
|
+
this._send(serialize$1.close(msg));
|
|
310633
310633
|
}
|
|
310634
310634
|
|
|
310635
310635
|
describe(msg) {
|
|
310636
|
-
this._send(serialize.describe(msg));
|
|
310636
|
+
this._send(serialize$1.describe(msg));
|
|
310637
310637
|
}
|
|
310638
310638
|
|
|
310639
310639
|
sendCopyFromChunk(chunk) {
|
|
310640
|
-
this._send(serialize.copyData(chunk));
|
|
310640
|
+
this._send(serialize$1.copyData(chunk));
|
|
310641
310641
|
}
|
|
310642
310642
|
|
|
310643
310643
|
endCopyFrom() {
|
|
310644
|
-
this._send(serialize.copyDone());
|
|
310644
|
+
this._send(serialize$1.copyDone());
|
|
310645
310645
|
}
|
|
310646
310646
|
|
|
310647
310647
|
sendCopyFail(msg) {
|
|
310648
|
-
this._send(serialize.copyFail(msg));
|
|
310648
|
+
this._send(serialize$1.copyFail(msg));
|
|
310649
310649
|
}
|
|
310650
310650
|
};
|
|
310651
310651
|
|
|
310652
310652
|
var connection = Connection$1;
|
|
310653
310653
|
|
|
310654
|
-
var lib$
|
|
310654
|
+
var lib$2 = {exports: {}};
|
|
310655
310655
|
|
|
310656
310656
|
var helper = {exports: {}};
|
|
310657
310657
|
|
|
@@ -311047,7 +311047,7 @@ function requireHelper () {
|
|
|
311047
311047
|
var hasRequiredLib$1;
|
|
311048
311048
|
|
|
311049
311049
|
function requireLib$1 () {
|
|
311050
|
-
if (hasRequiredLib$1) return lib$
|
|
311050
|
+
if (hasRequiredLib$1) return lib$2.exports;
|
|
311051
311051
|
hasRequiredLib$1 = 1;
|
|
311052
311052
|
|
|
311053
311053
|
var fs = require$$0$b
|
|
@@ -311055,7 +311055,7 @@ function requireLib$1 () {
|
|
|
311055
311055
|
;
|
|
311056
311056
|
|
|
311057
311057
|
|
|
311058
|
-
lib$
|
|
311058
|
+
lib$2.exports = function(connInfo, cb) {
|
|
311059
311059
|
var file = helper.getFileName();
|
|
311060
311060
|
|
|
311061
311061
|
fs.stat(file, function(err, stat){
|
|
@@ -311069,8 +311069,8 @@ function requireLib$1 () {
|
|
|
311069
311069
|
});
|
|
311070
311070
|
};
|
|
311071
311071
|
|
|
311072
|
-
lib$
|
|
311073
|
-
return lib$
|
|
311072
|
+
lib$2.exports.warnTo = helper.warnTo;
|
|
311073
|
+
return lib$2.exports;
|
|
311074
311074
|
}
|
|
311075
311075
|
|
|
311076
311076
|
var EventEmitter$2 = require$$0$7.EventEmitter;
|
|
@@ -312681,7 +312681,7 @@ function requireNative () {
|
|
|
312681
312681
|
var hasRequiredLib;
|
|
312682
312682
|
|
|
312683
312683
|
function requireLib () {
|
|
312684
|
-
if (hasRequiredLib) return lib$
|
|
312684
|
+
if (hasRequiredLib) return lib$3.exports;
|
|
312685
312685
|
hasRequiredLib = 1;
|
|
312686
312686
|
(function (module) {
|
|
312687
312687
|
|
|
@@ -312741,11 +312741,11 @@ function requireLib () {
|
|
|
312741
312741
|
},
|
|
312742
312742
|
});
|
|
312743
312743
|
}
|
|
312744
|
-
} (lib$
|
|
312745
|
-
return lib$
|
|
312744
|
+
} (lib$3));
|
|
312745
|
+
return lib$3.exports;
|
|
312746
312746
|
}
|
|
312747
312747
|
|
|
312748
|
-
var libExports$
|
|
312748
|
+
var libExports$2 = requireLib();
|
|
312749
312749
|
|
|
312750
312750
|
/**
|
|
312751
312751
|
* 2011 Peter 'Pita' Martischka
|
|
@@ -312762,7 +312762,7 @@ var libExports$1 = requireLib();
|
|
|
312762
312762
|
* See the License for the specific language governing permissions and
|
|
312763
312763
|
* limitations under the License.
|
|
312764
312764
|
*/
|
|
312765
|
-
const Database$
|
|
312765
|
+
const Database$6 = class Database extends AbstractDatabase {
|
|
312766
312766
|
db;
|
|
312767
312767
|
upsertStatement;
|
|
312768
312768
|
constructor(settings) {
|
|
@@ -312777,7 +312777,7 @@ const Database$5 = class Database extends AbstractDatabase {
|
|
|
312777
312777
|
this.settings.max = this.settings.max || 20;
|
|
312778
312778
|
this.settings.min = this.settings.min || 4;
|
|
312779
312779
|
this.settings.idleTimeoutMillis = this.settings.idleTimeoutMillis || 1000;
|
|
312780
|
-
this.db = new libExports$
|
|
312780
|
+
this.db = new libExports$2.Pool(this.settings);
|
|
312781
312781
|
}
|
|
312782
312782
|
init(callback) {
|
|
312783
312783
|
const testTableExists = "SELECT 1 as exists FROM pg_tables WHERE tablename = 'store'";
|
|
@@ -312926,7 +312926,7 @@ const Database$5 = class Database extends AbstractDatabase {
|
|
|
312926
312926
|
}
|
|
312927
312927
|
};
|
|
312928
312928
|
|
|
312929
|
-
const Database$
|
|
312929
|
+
const Database$5 = class PostgresDB extends Database$6 {
|
|
312930
312930
|
constructor(settings) {
|
|
312931
312931
|
console.warn('ueberdb: The postgrespool database driver is deprecated ' +
|
|
312932
312932
|
'and will be removed in a future version. Use postgres instead.');
|
|
@@ -323124,7 +323124,7 @@ var cluster = {};
|
|
|
323124
323124
|
|
|
323125
323125
|
var clusterSlots = {};
|
|
323126
323126
|
|
|
323127
|
-
var lib = {exports: {}};
|
|
323127
|
+
var lib$1 = {exports: {}};
|
|
323128
323128
|
|
|
323129
323129
|
/*
|
|
323130
323130
|
* Copyright 2001-2010 Georges Menie (www.menie.org)
|
|
@@ -323248,7 +323248,7 @@ var toUTF8Array = function toUTF8Array(str) {
|
|
|
323248
323248
|
* @param str
|
|
323249
323249
|
* @returns {number}
|
|
323250
323250
|
*/
|
|
323251
|
-
var generate = lib.exports = function generate(str) {
|
|
323251
|
+
var generate = lib$1.exports = function generate(str) {
|
|
323252
323252
|
var char;
|
|
323253
323253
|
var i = 0;
|
|
323254
323254
|
var start = -1;
|
|
@@ -323281,7 +323281,7 @@ var generate = lib.exports = function generate(str) {
|
|
|
323281
323281
|
* @param keys
|
|
323282
323282
|
* @returns {number}
|
|
323283
323283
|
*/
|
|
323284
|
-
lib.exports.generateMulti = function generateMulti(keys) {
|
|
323284
|
+
lib$1.exports.generateMulti = function generateMulti(keys) {
|
|
323285
323285
|
var i = 1;
|
|
323286
323286
|
var len = keys.length;
|
|
323287
323287
|
var base = generate(keys[0]);
|
|
@@ -323293,7 +323293,7 @@ lib.exports.generateMulti = function generateMulti(keys) {
|
|
|
323293
323293
|
return base;
|
|
323294
323294
|
};
|
|
323295
323295
|
|
|
323296
|
-
var libExports = lib.exports;
|
|
323296
|
+
var libExports$1 = lib$1.exports;
|
|
323297
323297
|
|
|
323298
323298
|
var __classPrivateFieldGet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
323299
323299
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
@@ -323315,7 +323315,7 @@ const pub_sub_1 = pubSub;
|
|
|
323315
323315
|
// We need to use 'require', because it's not possible with Typescript to import
|
|
323316
323316
|
// function that are exported as 'module.exports = function`, without esModuleInterop
|
|
323317
323317
|
// set to true.
|
|
323318
|
-
const calculateSlot = libExports;
|
|
323318
|
+
const calculateSlot = libExports$1;
|
|
323319
323319
|
class RedisClusterSlots {
|
|
323320
323320
|
get isOpen() {
|
|
323321
323321
|
return __classPrivateFieldGet$1(this, _RedisClusterSlots_isOpen, "f");
|
|
@@ -328394,7 +328394,7 @@ function requireCommands () {
|
|
|
328394
328394
|
* See the License for the specific language governing permissions and
|
|
328395
328395
|
* limitations under the License.
|
|
328396
328396
|
*/
|
|
328397
|
-
const Database$
|
|
328397
|
+
const Database$4 = class RedisDB extends AbstractDatabase {
|
|
328398
328398
|
_client;
|
|
328399
328399
|
constructor(settings) {
|
|
328400
328400
|
super();
|
|
@@ -328497,7 +328497,7 @@ var rethinkdb$1 = {exports: {}};
|
|
|
328497
328497
|
|
|
328498
328498
|
var net$1 = {exports: {}};
|
|
328499
328499
|
|
|
328500
|
-
var util$
|
|
328500
|
+
var util$4 = {};
|
|
328501
328501
|
|
|
328502
328502
|
// Generated by CoffeeScript 1.10.0
|
|
328503
328503
|
var ReqlAuthError, ReqlAvailabilityError, ReqlCompileError, ReqlDriverCompileError, ReqlDriverError, ReqlError, ReqlInternalError, ReqlNonExistenceError, ReqlOpFailedError, ReqlOpIndeterminateError, ReqlPermissionError, ReqlQueryLogicError, ReqlQueryPrinter, ReqlResourceLimitError, ReqlRuntimeError, ReqlServerCompileError, ReqlTimeoutError, ReqlUserError,
|
|
@@ -329135,7 +329135,7 @@ plural = function(number) {
|
|
|
329135
329135
|
}
|
|
329136
329136
|
};
|
|
329137
329137
|
|
|
329138
|
-
util$
|
|
329138
|
+
util$4.ar = function(fun) {
|
|
329139
329139
|
return function() {
|
|
329140
329140
|
var args;
|
|
329141
329141
|
args = 1 <= arguments.length ? slice$1.call(arguments, 0) : [];
|
|
@@ -329146,7 +329146,7 @@ util$2.ar = function(fun) {
|
|
|
329146
329146
|
};
|
|
329147
329147
|
};
|
|
329148
329148
|
|
|
329149
|
-
util$
|
|
329149
|
+
util$4.varar = function(min, max, fun) {
|
|
329150
329150
|
return function() {
|
|
329151
329151
|
var args;
|
|
329152
329152
|
args = 1 <= arguments.length ? slice$1.call(arguments, 0) : [];
|
|
@@ -329163,7 +329163,7 @@ util$2.varar = function(min, max, fun) {
|
|
|
329163
329163
|
};
|
|
329164
329164
|
};
|
|
329165
329165
|
|
|
329166
|
-
util$
|
|
329166
|
+
util$4.aropt = function(fun) {
|
|
329167
329167
|
return function() {
|
|
329168
329168
|
var args, expectedPosArgs, numPosArgs, perhapsOptDict;
|
|
329169
329169
|
args = 1 <= arguments.length ? slice$1.call(arguments, 0) : [];
|
|
@@ -329184,7 +329184,7 @@ util$2.aropt = function(fun) {
|
|
|
329184
329184
|
};
|
|
329185
329185
|
};
|
|
329186
329186
|
|
|
329187
|
-
util$
|
|
329187
|
+
util$4.toArrayBuffer = function(node_buffer) {
|
|
329188
329188
|
var arr, i, j, len, value;
|
|
329189
329189
|
arr = new Uint8Array(new ArrayBuffer(node_buffer.length));
|
|
329190
329190
|
for (i = j = 0, len = node_buffer.length; j < len; i = ++j) {
|
|
@@ -329194,7 +329194,7 @@ util$2.toArrayBuffer = function(node_buffer) {
|
|
|
329194
329194
|
return arr.buffer;
|
|
329195
329195
|
};
|
|
329196
329196
|
|
|
329197
|
-
util$
|
|
329197
|
+
util$4.fromCamelCase = function(token) {
|
|
329198
329198
|
return token.replace(/[A-Z]/g, (function(_this) {
|
|
329199
329199
|
return function(match) {
|
|
329200
329200
|
return "_" + match.toLowerCase();
|
|
@@ -329202,7 +329202,7 @@ util$2.fromCamelCase = function(token) {
|
|
|
329202
329202
|
})());
|
|
329203
329203
|
};
|
|
329204
329204
|
|
|
329205
|
-
util$
|
|
329205
|
+
util$4.toCamelCase = function(token) {
|
|
329206
329206
|
return token.replace(/_[a-z]/g, (function(_this) {
|
|
329207
329207
|
return function(match) {
|
|
329208
329208
|
return match[1].toUpperCase();
|
|
@@ -329320,15 +329320,15 @@ errorClass = (function(_this) {
|
|
|
329320
329320
|
};
|
|
329321
329321
|
})();
|
|
329322
329322
|
|
|
329323
|
-
util$
|
|
329323
|
+
util$4.recursivelyConvertPseudotype = recursivelyConvertPseudotype;
|
|
329324
329324
|
|
|
329325
|
-
util$
|
|
329325
|
+
util$4.mkAtom = mkAtom;
|
|
329326
329326
|
|
|
329327
|
-
util$
|
|
329327
|
+
util$4.mkSeq = mkSeq;
|
|
329328
329328
|
|
|
329329
|
-
util$
|
|
329329
|
+
util$4.mkErr = mkErr$1;
|
|
329330
329330
|
|
|
329331
|
-
util$
|
|
329331
|
+
util$4.errorClass = errorClass;
|
|
329332
329332
|
|
|
329333
329333
|
var cursor = {};
|
|
329334
329334
|
|
|
@@ -329423,11 +329423,11 @@ function requireEs5 () {
|
|
|
329423
329423
|
return es5.exports;
|
|
329424
329424
|
}
|
|
329425
329425
|
|
|
329426
|
-
var util$
|
|
329426
|
+
var util$3;
|
|
329427
329427
|
var hasRequiredUtil;
|
|
329428
329428
|
|
|
329429
329429
|
function requireUtil () {
|
|
329430
|
-
if (hasRequiredUtil) return util$
|
|
329430
|
+
if (hasRequiredUtil) return util$3;
|
|
329431
329431
|
hasRequiredUtil = 1;
|
|
329432
329432
|
var es5 = requireEs5();
|
|
329433
329433
|
var canEvaluate = typeof navigator == "undefined";
|
|
@@ -329742,8 +329742,8 @@ function requireUtil () {
|
|
|
329742
329742
|
if (ret.isNode) ret.toFastProperties(process);
|
|
329743
329743
|
|
|
329744
329744
|
try {throw new Error(); } catch (e) {ret.lastLineError = e;}
|
|
329745
|
-
util$
|
|
329746
|
-
return util$
|
|
329745
|
+
util$3 = ret;
|
|
329746
|
+
return util$3;
|
|
329747
329747
|
}
|
|
329748
329748
|
|
|
329749
329749
|
var async = {exports: {}};
|
|
@@ -334408,7 +334408,7 @@ bluebird.noConflict = noConflict;
|
|
|
334408
334408
|
var bluebird_1 = bluebird;
|
|
334409
334409
|
|
|
334410
334410
|
// Generated by CoffeeScript 1.10.0
|
|
334411
|
-
var ArrayResult, AtomFeed, Cursor, EventEmitter, Feed, IterableResult, OrderByLimitFeed, Promise$1, ar, error$1, mkErr, protoResponseType, setImmediate$1, util, varar,
|
|
334411
|
+
var ArrayResult, AtomFeed, Cursor, EventEmitter, Feed, IterableResult, OrderByLimitFeed, Promise$1, ar, error$1, mkErr, protoResponseType, setImmediate$1, util$2, varar,
|
|
334412
334412
|
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
|
|
334413
334413
|
slice = [].slice,
|
|
334414
334414
|
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
|
@@ -334416,7 +334416,7 @@ var ArrayResult, AtomFeed, Cursor, EventEmitter, Feed, IterableResult, OrderByLi
|
|
|
334416
334416
|
|
|
334417
334417
|
error$1 = errors$1;
|
|
334418
334418
|
|
|
334419
|
-
util = util$
|
|
334419
|
+
util$2 = util$4;
|
|
334420
334420
|
|
|
334421
334421
|
protoResponseType = protoDef.Response.ResponseType;
|
|
334422
334422
|
|
|
@@ -334424,13 +334424,13 @@ Promise$1 = bluebird_1;
|
|
|
334424
334424
|
|
|
334425
334425
|
EventEmitter = require$$0$7.EventEmitter;
|
|
334426
334426
|
|
|
334427
|
-
ar = util.ar;
|
|
334427
|
+
ar = util$2.ar;
|
|
334428
334428
|
|
|
334429
|
-
varar = util.varar;
|
|
334429
|
+
varar = util$2.varar;
|
|
334430
334430
|
|
|
334431
|
-
util.aropt;
|
|
334431
|
+
util$2.aropt;
|
|
334432
334432
|
|
|
334433
|
-
mkErr = util.mkErr;
|
|
334433
|
+
mkErr = util$2.mkErr;
|
|
334434
334434
|
|
|
334435
334435
|
if (typeof setImmediate$1 === "undefined" || setImmediate$1 === null) {
|
|
334436
334436
|
setImmediate$1 = function(cb) {
|
|
@@ -334481,7 +334481,7 @@ IterableResult = (function() {
|
|
|
334481
334481
|
this._closeCb(mkErr(error$1.ReqlClientError, response, this._root));
|
|
334482
334482
|
break;
|
|
334483
334483
|
case protoResponseType.RUNTIME_ERROR:
|
|
334484
|
-
this._closeCb(mkErr(util.errorClass(response.e), response, this._root));
|
|
334484
|
+
this._closeCb(mkErr(util$2.errorClass(response.e), response, this._root));
|
|
334485
334485
|
break;
|
|
334486
334486
|
default:
|
|
334487
334487
|
this._closeCb();
|
|
@@ -334516,7 +334516,7 @@ IterableResult = (function() {
|
|
|
334516
334516
|
IterableResult.prototype._handleRow = function() {
|
|
334517
334517
|
var cb, response, row;
|
|
334518
334518
|
response = this._responses[0];
|
|
334519
|
-
row = util.recursivelyConvertPseudotype(response.r[this._responseIndex], this._opts);
|
|
334519
|
+
row = util$2.recursivelyConvertPseudotype(response.r[this._responseIndex], this._opts);
|
|
334520
334520
|
cb = this._getCallback();
|
|
334521
334521
|
this._responseIndex += 1;
|
|
334522
334522
|
if (this._responseIndex === response.r.length) {
|
|
@@ -334574,7 +334574,7 @@ IterableResult = (function() {
|
|
|
334574
334574
|
case protoResponseType.RUNTIME_ERROR:
|
|
334575
334575
|
this._responses.shift();
|
|
334576
334576
|
cb = this._getCallback();
|
|
334577
|
-
errType = util.errorClass(response.e);
|
|
334577
|
+
errType = util$2.errorClass(response.e);
|
|
334578
334578
|
cb(mkErr(errType, response, this._root));
|
|
334579
334579
|
break;
|
|
334580
334580
|
default:
|
|
@@ -335139,7 +335139,7 @@ function requireAst () {
|
|
|
335139
335139
|
hasProp = {}.hasOwnProperty,
|
|
335140
335140
|
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
|
335141
335141
|
|
|
335142
|
-
util = util$
|
|
335142
|
+
util = util$4;
|
|
335143
335143
|
|
|
335144
335144
|
err = errors$1;
|
|
335145
335145
|
|
|
@@ -340403,7 +340403,7 @@ function requireNet () {
|
|
|
340403
340403
|
|
|
340404
340404
|
events = require$$0$7;
|
|
340405
340405
|
|
|
340406
|
-
util = util$
|
|
340406
|
+
util = util$4;
|
|
340407
340407
|
|
|
340408
340408
|
err = errors$1;
|
|
340409
340409
|
|
|
@@ -341412,7 +341412,7 @@ var r = /*@__PURE__*/getDefaultExportFromCjs(rethinkdbExports);
|
|
|
341412
341412
|
* See the License for the specific language governing permissions and
|
|
341413
341413
|
* limitations under the License.
|
|
341414
341414
|
*/
|
|
341415
|
-
const Database$
|
|
341415
|
+
const Database$3 = class Database extends AbstractDatabase {
|
|
341416
341416
|
host;
|
|
341417
341417
|
db;
|
|
341418
341418
|
port;
|
|
@@ -341511,30 +341511,1002 @@ const Database$2 = class Database extends AbstractDatabase {
|
|
|
341511
341511
|
}
|
|
341512
341512
|
};
|
|
341513
341513
|
|
|
341514
|
-
|
|
341515
|
-
|
|
341516
|
-
|
|
341517
|
-
|
|
341518
|
-
|
|
341519
|
-
|
|
341520
|
-
|
|
341521
|
-
|
|
341522
|
-
|
|
341523
|
-
|
|
341524
|
-
|
|
341525
|
-
|
|
341526
|
-
|
|
341527
|
-
|
|
341528
|
-
|
|
341529
|
-
|
|
341530
|
-
|
|
341531
|
-
|
|
341532
|
-
|
|
341533
|
-
|
|
341534
|
-
|
|
341535
|
-
|
|
341536
|
-
|
|
341537
|
-
}
|
|
341514
|
+
var lib = {exports: {}};
|
|
341515
|
+
|
|
341516
|
+
var util$1 = {};
|
|
341517
|
+
|
|
341518
|
+
util$1.getBooleanOption = (options, key) => {
|
|
341519
|
+
let value = false;
|
|
341520
|
+
if (key in options && typeof (value = options[key]) !== 'boolean') {
|
|
341521
|
+
throw new TypeError(`Expected the "${key}" option to be a boolean`);
|
|
341522
|
+
}
|
|
341523
|
+
return value;
|
|
341524
|
+
};
|
|
341525
|
+
|
|
341526
|
+
util$1.cppdb = Symbol();
|
|
341527
|
+
util$1.inspect = Symbol.for('nodejs.util.inspect.custom');
|
|
341528
|
+
|
|
341529
|
+
const descriptor = { value: 'SqliteError', writable: true, enumerable: false, configurable: true };
|
|
341530
|
+
|
|
341531
|
+
function SqliteError$1(message, code) {
|
|
341532
|
+
if (new.target !== SqliteError$1) {
|
|
341533
|
+
return new SqliteError$1(message, code);
|
|
341534
|
+
}
|
|
341535
|
+
if (typeof code !== 'string') {
|
|
341536
|
+
throw new TypeError('Expected second argument to be a string');
|
|
341537
|
+
}
|
|
341538
|
+
Error.call(this, message);
|
|
341539
|
+
descriptor.value = '' + message;
|
|
341540
|
+
Object.defineProperty(this, 'message', descriptor);
|
|
341541
|
+
Error.captureStackTrace(this, SqliteError$1);
|
|
341542
|
+
this.code = code;
|
|
341543
|
+
}
|
|
341544
|
+
Object.setPrototypeOf(SqliteError$1, Error);
|
|
341545
|
+
Object.setPrototypeOf(SqliteError$1.prototype, Error.prototype);
|
|
341546
|
+
Object.defineProperty(SqliteError$1.prototype, 'name', descriptor);
|
|
341547
|
+
var sqliteError = SqliteError$1;
|
|
341548
|
+
|
|
341549
|
+
var bindings = {exports: {}};
|
|
341550
|
+
|
|
341551
|
+
var fileUriToPath_1;
|
|
341552
|
+
var hasRequiredFileUriToPath;
|
|
341553
|
+
|
|
341554
|
+
function requireFileUriToPath () {
|
|
341555
|
+
if (hasRequiredFileUriToPath) return fileUriToPath_1;
|
|
341556
|
+
hasRequiredFileUriToPath = 1;
|
|
341557
|
+
/**
|
|
341558
|
+
* Module dependencies.
|
|
341559
|
+
*/
|
|
341560
|
+
|
|
341561
|
+
var sep = require$$1$4.sep || '/';
|
|
341562
|
+
|
|
341563
|
+
/**
|
|
341564
|
+
* Module exports.
|
|
341565
|
+
*/
|
|
341566
|
+
|
|
341567
|
+
fileUriToPath_1 = fileUriToPath;
|
|
341568
|
+
|
|
341569
|
+
/**
|
|
341570
|
+
* File URI to Path function.
|
|
341571
|
+
*
|
|
341572
|
+
* @param {String} uri
|
|
341573
|
+
* @return {String} path
|
|
341574
|
+
* @api public
|
|
341575
|
+
*/
|
|
341576
|
+
|
|
341577
|
+
function fileUriToPath (uri) {
|
|
341578
|
+
if ('string' != typeof uri ||
|
|
341579
|
+
uri.length <= 7 ||
|
|
341580
|
+
'file://' != uri.substring(0, 7)) {
|
|
341581
|
+
throw new TypeError('must pass in a file:// URI to convert to a file path');
|
|
341582
|
+
}
|
|
341583
|
+
|
|
341584
|
+
var rest = decodeURI(uri.substring(7));
|
|
341585
|
+
var firstSlash = rest.indexOf('/');
|
|
341586
|
+
var host = rest.substring(0, firstSlash);
|
|
341587
|
+
var path = rest.substring(firstSlash + 1);
|
|
341588
|
+
|
|
341589
|
+
// 2. Scheme Definition
|
|
341590
|
+
// As a special case, <host> can be the string "localhost" or the empty
|
|
341591
|
+
// string; this is interpreted as "the machine from which the URL is
|
|
341592
|
+
// being interpreted".
|
|
341593
|
+
if ('localhost' == host) host = '';
|
|
341594
|
+
|
|
341595
|
+
if (host) {
|
|
341596
|
+
host = sep + sep + host;
|
|
341597
|
+
}
|
|
341598
|
+
|
|
341599
|
+
// 3.2 Drives, drive letters, mount points, file system root
|
|
341600
|
+
// Drive letters are mapped into the top of a file URI in various ways,
|
|
341601
|
+
// depending on the implementation; some applications substitute
|
|
341602
|
+
// vertical bar ("|") for the colon after the drive letter, yielding
|
|
341603
|
+
// "file:///c|/tmp/test.txt". In some cases, the colon is left
|
|
341604
|
+
// unchanged, as in "file:///c:/tmp/test.txt". In other cases, the
|
|
341605
|
+
// colon is simply omitted, as in "file:///c/tmp/test.txt".
|
|
341606
|
+
path = path.replace(/^(.+)\|/, '$1:');
|
|
341607
|
+
|
|
341608
|
+
// for Windows, we need to invert the path separators from what a URI uses
|
|
341609
|
+
if (sep == '\\') {
|
|
341610
|
+
path = path.replace(/\//g, '\\');
|
|
341611
|
+
}
|
|
341612
|
+
|
|
341613
|
+
if (/^.+\:/.test(path)) ; else {
|
|
341614
|
+
// unix path…
|
|
341615
|
+
path = sep + path;
|
|
341616
|
+
}
|
|
341617
|
+
|
|
341618
|
+
return host + path;
|
|
341619
|
+
}
|
|
341620
|
+
return fileUriToPath_1;
|
|
341621
|
+
}
|
|
341622
|
+
|
|
341623
|
+
/**
|
|
341624
|
+
* Module dependencies.
|
|
341625
|
+
*/
|
|
341626
|
+
|
|
341627
|
+
var hasRequiredBindings;
|
|
341628
|
+
|
|
341629
|
+
function requireBindings () {
|
|
341630
|
+
if (hasRequiredBindings) return bindings.exports;
|
|
341631
|
+
hasRequiredBindings = 1;
|
|
341632
|
+
(function (module, exports) {
|
|
341633
|
+
var fs = require$$0$b,
|
|
341634
|
+
path = require$$1$4,
|
|
341635
|
+
fileURLToPath = requireFileUriToPath(),
|
|
341636
|
+
join = path.join,
|
|
341637
|
+
dirname = path.dirname,
|
|
341638
|
+
exists =
|
|
341639
|
+
(fs.accessSync &&
|
|
341640
|
+
function(path) {
|
|
341641
|
+
try {
|
|
341642
|
+
fs.accessSync(path);
|
|
341643
|
+
} catch (e) {
|
|
341644
|
+
return false;
|
|
341645
|
+
}
|
|
341646
|
+
return true;
|
|
341647
|
+
}) ||
|
|
341648
|
+
fs.existsSync ||
|
|
341649
|
+
path.existsSync,
|
|
341650
|
+
defaults = {
|
|
341651
|
+
arrow: process.env.NODE_BINDINGS_ARROW || ' → ',
|
|
341652
|
+
compiled: process.env.NODE_BINDINGS_COMPILED_DIR || 'compiled',
|
|
341653
|
+
platform: process.platform,
|
|
341654
|
+
arch: process.arch,
|
|
341655
|
+
nodePreGyp:
|
|
341656
|
+
'node-v' +
|
|
341657
|
+
process.versions.modules +
|
|
341658
|
+
'-' +
|
|
341659
|
+
process.platform +
|
|
341660
|
+
'-' +
|
|
341661
|
+
process.arch,
|
|
341662
|
+
version: process.versions.node,
|
|
341663
|
+
bindings: 'bindings.node',
|
|
341664
|
+
try: [
|
|
341665
|
+
// node-gyp's linked version in the "build" dir
|
|
341666
|
+
['module_root', 'build', 'bindings'],
|
|
341667
|
+
// node-waf and gyp_addon (a.k.a node-gyp)
|
|
341668
|
+
['module_root', 'build', 'Debug', 'bindings'],
|
|
341669
|
+
['module_root', 'build', 'Release', 'bindings'],
|
|
341670
|
+
// Debug files, for development (legacy behavior, remove for node v0.9)
|
|
341671
|
+
['module_root', 'out', 'Debug', 'bindings'],
|
|
341672
|
+
['module_root', 'Debug', 'bindings'],
|
|
341673
|
+
// Release files, but manually compiled (legacy behavior, remove for node v0.9)
|
|
341674
|
+
['module_root', 'out', 'Release', 'bindings'],
|
|
341675
|
+
['module_root', 'Release', 'bindings'],
|
|
341676
|
+
// Legacy from node-waf, node <= 0.4.x
|
|
341677
|
+
['module_root', 'build', 'default', 'bindings'],
|
|
341678
|
+
// Production "Release" buildtype binary (meh...)
|
|
341679
|
+
['module_root', 'compiled', 'version', 'platform', 'arch', 'bindings'],
|
|
341680
|
+
// node-qbs builds
|
|
341681
|
+
['module_root', 'addon-build', 'release', 'install-root', 'bindings'],
|
|
341682
|
+
['module_root', 'addon-build', 'debug', 'install-root', 'bindings'],
|
|
341683
|
+
['module_root', 'addon-build', 'default', 'install-root', 'bindings'],
|
|
341684
|
+
// node-pre-gyp path ./lib/binding/{node_abi}-{platform}-{arch}
|
|
341685
|
+
['module_root', 'lib', 'binding', 'nodePreGyp', 'bindings']
|
|
341686
|
+
]
|
|
341687
|
+
};
|
|
341688
|
+
|
|
341689
|
+
/**
|
|
341690
|
+
* The main `bindings()` function loads the compiled bindings for a given module.
|
|
341691
|
+
* It uses V8's Error API to determine the parent filename that this function is
|
|
341692
|
+
* being invoked from, which is then used to find the root directory.
|
|
341693
|
+
*/
|
|
341694
|
+
|
|
341695
|
+
function bindings(opts) {
|
|
341696
|
+
// Argument surgery
|
|
341697
|
+
if (typeof opts == 'string') {
|
|
341698
|
+
opts = { bindings: opts };
|
|
341699
|
+
} else if (!opts) {
|
|
341700
|
+
opts = {};
|
|
341701
|
+
}
|
|
341702
|
+
|
|
341703
|
+
// maps `defaults` onto `opts` object
|
|
341704
|
+
Object.keys(defaults).map(function(i) {
|
|
341705
|
+
if (!(i in opts)) opts[i] = defaults[i];
|
|
341706
|
+
});
|
|
341707
|
+
|
|
341708
|
+
// Get the module root
|
|
341709
|
+
if (!opts.module_root) {
|
|
341710
|
+
opts.module_root = exports.getRoot(exports.getFileName());
|
|
341711
|
+
}
|
|
341712
|
+
|
|
341713
|
+
// Ensure the given bindings name ends with .node
|
|
341714
|
+
if (path.extname(opts.bindings) != '.node') {
|
|
341715
|
+
opts.bindings += '.node';
|
|
341716
|
+
}
|
|
341717
|
+
|
|
341718
|
+
// https://github.com/webpack/webpack/issues/4175#issuecomment-342931035
|
|
341719
|
+
var requireFunc =
|
|
341720
|
+
typeof __webpack_require__ === 'function'
|
|
341721
|
+
? __non_webpack_require__
|
|
341722
|
+
: commonjsRequire;
|
|
341723
|
+
|
|
341724
|
+
var tries = [],
|
|
341725
|
+
i = 0,
|
|
341726
|
+
l = opts.try.length,
|
|
341727
|
+
n,
|
|
341728
|
+
b,
|
|
341729
|
+
err;
|
|
341730
|
+
|
|
341731
|
+
for (; i < l; i++) {
|
|
341732
|
+
n = join.apply(
|
|
341733
|
+
null,
|
|
341734
|
+
opts.try[i].map(function(p) {
|
|
341735
|
+
return opts[p] || p;
|
|
341736
|
+
})
|
|
341737
|
+
);
|
|
341738
|
+
tries.push(n);
|
|
341739
|
+
try {
|
|
341740
|
+
b = opts.path ? requireFunc.resolve(n) : requireFunc(n);
|
|
341741
|
+
if (!opts.path) {
|
|
341742
|
+
b.path = n;
|
|
341743
|
+
}
|
|
341744
|
+
return b;
|
|
341745
|
+
} catch (e) {
|
|
341746
|
+
if (e.code !== 'MODULE_NOT_FOUND' &&
|
|
341747
|
+
e.code !== 'QUALIFIED_PATH_RESOLUTION_FAILED' &&
|
|
341748
|
+
!/not find/i.test(e.message)) {
|
|
341749
|
+
throw e;
|
|
341750
|
+
}
|
|
341751
|
+
}
|
|
341752
|
+
}
|
|
341753
|
+
|
|
341754
|
+
err = new Error(
|
|
341755
|
+
'Could not locate the bindings file. Tried:\n' +
|
|
341756
|
+
tries
|
|
341757
|
+
.map(function(a) {
|
|
341758
|
+
return opts.arrow + a;
|
|
341759
|
+
})
|
|
341760
|
+
.join('\n')
|
|
341761
|
+
);
|
|
341762
|
+
err.tries = tries;
|
|
341763
|
+
throw err;
|
|
341764
|
+
}
|
|
341765
|
+
module.exports = exports = bindings;
|
|
341766
|
+
|
|
341767
|
+
/**
|
|
341768
|
+
* Gets the filename of the JavaScript file that invokes this function.
|
|
341769
|
+
* Used to help find the root directory of a module.
|
|
341770
|
+
* Optionally accepts an filename argument to skip when searching for the invoking filename
|
|
341771
|
+
*/
|
|
341772
|
+
|
|
341773
|
+
exports.getFileName = function getFileName(calling_file) {
|
|
341774
|
+
var origPST = Error.prepareStackTrace,
|
|
341775
|
+
origSTL = Error.stackTraceLimit,
|
|
341776
|
+
dummy = {},
|
|
341777
|
+
fileName;
|
|
341778
|
+
|
|
341779
|
+
Error.stackTraceLimit = 10;
|
|
341780
|
+
|
|
341781
|
+
Error.prepareStackTrace = function(e, st) {
|
|
341782
|
+
for (var i = 0, l = st.length; i < l; i++) {
|
|
341783
|
+
fileName = st[i].getFileName();
|
|
341784
|
+
if (fileName !== __filename) {
|
|
341785
|
+
if (calling_file) {
|
|
341786
|
+
if (fileName !== calling_file) {
|
|
341787
|
+
return;
|
|
341788
|
+
}
|
|
341789
|
+
} else {
|
|
341790
|
+
return;
|
|
341791
|
+
}
|
|
341792
|
+
}
|
|
341793
|
+
}
|
|
341794
|
+
};
|
|
341795
|
+
|
|
341796
|
+
// run the 'prepareStackTrace' function above
|
|
341797
|
+
Error.captureStackTrace(dummy);
|
|
341798
|
+
dummy.stack;
|
|
341799
|
+
|
|
341800
|
+
// cleanup
|
|
341801
|
+
Error.prepareStackTrace = origPST;
|
|
341802
|
+
Error.stackTraceLimit = origSTL;
|
|
341803
|
+
|
|
341804
|
+
// handle filename that starts with "file://"
|
|
341805
|
+
var fileSchema = 'file://';
|
|
341806
|
+
if (fileName.indexOf(fileSchema) === 0) {
|
|
341807
|
+
fileName = fileURLToPath(fileName);
|
|
341808
|
+
}
|
|
341809
|
+
|
|
341810
|
+
return fileName;
|
|
341811
|
+
};
|
|
341812
|
+
|
|
341813
|
+
/**
|
|
341814
|
+
* Gets the root directory of a module, given an arbitrary filename
|
|
341815
|
+
* somewhere in the module tree. The "root directory" is the directory
|
|
341816
|
+
* containing the `package.json` file.
|
|
341817
|
+
*
|
|
341818
|
+
* In: /home/nate/node-native-module/lib/index.js
|
|
341819
|
+
* Out: /home/nate/node-native-module
|
|
341820
|
+
*/
|
|
341821
|
+
|
|
341822
|
+
exports.getRoot = function getRoot(file) {
|
|
341823
|
+
var dir = dirname(file),
|
|
341824
|
+
prev;
|
|
341825
|
+
while (true) {
|
|
341826
|
+
if (dir === '.') {
|
|
341827
|
+
// Avoids an infinite loop in rare cases, like the REPL
|
|
341828
|
+
dir = process.cwd();
|
|
341829
|
+
}
|
|
341830
|
+
if (
|
|
341831
|
+
exists(join(dir, 'package.json')) ||
|
|
341832
|
+
exists(join(dir, 'node_modules'))
|
|
341833
|
+
) {
|
|
341834
|
+
// Found the 'package.json' file or 'node_modules' dir; we're done
|
|
341835
|
+
return dir;
|
|
341836
|
+
}
|
|
341837
|
+
if (prev === dir) {
|
|
341838
|
+
// Got to the top
|
|
341839
|
+
throw new Error(
|
|
341840
|
+
'Could not find module root given file: "' +
|
|
341841
|
+
file +
|
|
341842
|
+
'". Do you have a `package.json` file? '
|
|
341843
|
+
);
|
|
341844
|
+
}
|
|
341845
|
+
// Try the parent dir next
|
|
341846
|
+
prev = dir;
|
|
341847
|
+
dir = join(dir, '..');
|
|
341848
|
+
}
|
|
341849
|
+
};
|
|
341850
|
+
} (bindings, bindings.exports));
|
|
341851
|
+
return bindings.exports;
|
|
341852
|
+
}
|
|
341853
|
+
|
|
341854
|
+
var wrappers$1 = {};
|
|
341855
|
+
|
|
341856
|
+
var hasRequiredWrappers;
|
|
341857
|
+
|
|
341858
|
+
function requireWrappers () {
|
|
341859
|
+
if (hasRequiredWrappers) return wrappers$1;
|
|
341860
|
+
hasRequiredWrappers = 1;
|
|
341861
|
+
const { cppdb } = util$1;
|
|
341862
|
+
|
|
341863
|
+
wrappers$1.prepare = function prepare(sql) {
|
|
341864
|
+
return this[cppdb].prepare(sql, this, false);
|
|
341865
|
+
};
|
|
341866
|
+
|
|
341867
|
+
wrappers$1.exec = function exec(sql) {
|
|
341868
|
+
this[cppdb].exec(sql);
|
|
341869
|
+
return this;
|
|
341870
|
+
};
|
|
341871
|
+
|
|
341872
|
+
wrappers$1.close = function close() {
|
|
341873
|
+
this[cppdb].close();
|
|
341874
|
+
return this;
|
|
341875
|
+
};
|
|
341876
|
+
|
|
341877
|
+
wrappers$1.loadExtension = function loadExtension(...args) {
|
|
341878
|
+
this[cppdb].loadExtension(...args);
|
|
341879
|
+
return this;
|
|
341880
|
+
};
|
|
341881
|
+
|
|
341882
|
+
wrappers$1.defaultSafeIntegers = function defaultSafeIntegers(...args) {
|
|
341883
|
+
this[cppdb].defaultSafeIntegers(...args);
|
|
341884
|
+
return this;
|
|
341885
|
+
};
|
|
341886
|
+
|
|
341887
|
+
wrappers$1.unsafeMode = function unsafeMode(...args) {
|
|
341888
|
+
this[cppdb].unsafeMode(...args);
|
|
341889
|
+
return this;
|
|
341890
|
+
};
|
|
341891
|
+
|
|
341892
|
+
wrappers$1.getters = {
|
|
341893
|
+
name: {
|
|
341894
|
+
get: function name() { return this[cppdb].name; },
|
|
341895
|
+
enumerable: true,
|
|
341896
|
+
},
|
|
341897
|
+
open: {
|
|
341898
|
+
get: function open() { return this[cppdb].open; },
|
|
341899
|
+
enumerable: true,
|
|
341900
|
+
},
|
|
341901
|
+
inTransaction: {
|
|
341902
|
+
get: function inTransaction() { return this[cppdb].inTransaction; },
|
|
341903
|
+
enumerable: true,
|
|
341904
|
+
},
|
|
341905
|
+
readonly: {
|
|
341906
|
+
get: function readonly() { return this[cppdb].readonly; },
|
|
341907
|
+
enumerable: true,
|
|
341908
|
+
},
|
|
341909
|
+
memory: {
|
|
341910
|
+
get: function memory() { return this[cppdb].memory; },
|
|
341911
|
+
enumerable: true,
|
|
341912
|
+
},
|
|
341913
|
+
};
|
|
341914
|
+
return wrappers$1;
|
|
341915
|
+
}
|
|
341916
|
+
|
|
341917
|
+
var transaction;
|
|
341918
|
+
var hasRequiredTransaction;
|
|
341919
|
+
|
|
341920
|
+
function requireTransaction () {
|
|
341921
|
+
if (hasRequiredTransaction) return transaction;
|
|
341922
|
+
hasRequiredTransaction = 1;
|
|
341923
|
+
const { cppdb } = util$1;
|
|
341924
|
+
const controllers = new WeakMap();
|
|
341925
|
+
|
|
341926
|
+
transaction = function transaction(fn) {
|
|
341927
|
+
if (typeof fn !== 'function') throw new TypeError('Expected first argument to be a function');
|
|
341928
|
+
|
|
341929
|
+
const db = this[cppdb];
|
|
341930
|
+
const controller = getController(db, this);
|
|
341931
|
+
const { apply } = Function.prototype;
|
|
341932
|
+
|
|
341933
|
+
// Each version of the transaction function has these same properties
|
|
341934
|
+
const properties = {
|
|
341935
|
+
default: { value: wrapTransaction(apply, fn, db, controller.default) },
|
|
341936
|
+
deferred: { value: wrapTransaction(apply, fn, db, controller.deferred) },
|
|
341937
|
+
immediate: { value: wrapTransaction(apply, fn, db, controller.immediate) },
|
|
341938
|
+
exclusive: { value: wrapTransaction(apply, fn, db, controller.exclusive) },
|
|
341939
|
+
database: { value: this, enumerable: true },
|
|
341940
|
+
};
|
|
341941
|
+
|
|
341942
|
+
Object.defineProperties(properties.default.value, properties);
|
|
341943
|
+
Object.defineProperties(properties.deferred.value, properties);
|
|
341944
|
+
Object.defineProperties(properties.immediate.value, properties);
|
|
341945
|
+
Object.defineProperties(properties.exclusive.value, properties);
|
|
341946
|
+
|
|
341947
|
+
// Return the default version of the transaction function
|
|
341948
|
+
return properties.default.value;
|
|
341949
|
+
};
|
|
341950
|
+
|
|
341951
|
+
// Return the database's cached transaction controller, or create a new one
|
|
341952
|
+
const getController = (db, self) => {
|
|
341953
|
+
let controller = controllers.get(db);
|
|
341954
|
+
if (!controller) {
|
|
341955
|
+
const shared = {
|
|
341956
|
+
commit: db.prepare('COMMIT', self, false),
|
|
341957
|
+
rollback: db.prepare('ROLLBACK', self, false),
|
|
341958
|
+
savepoint: db.prepare('SAVEPOINT `\t_bs3.\t`', self, false),
|
|
341959
|
+
release: db.prepare('RELEASE `\t_bs3.\t`', self, false),
|
|
341960
|
+
rollbackTo: db.prepare('ROLLBACK TO `\t_bs3.\t`', self, false),
|
|
341961
|
+
};
|
|
341962
|
+
controllers.set(db, controller = {
|
|
341963
|
+
default: Object.assign({ begin: db.prepare('BEGIN', self, false) }, shared),
|
|
341964
|
+
deferred: Object.assign({ begin: db.prepare('BEGIN DEFERRED', self, false) }, shared),
|
|
341965
|
+
immediate: Object.assign({ begin: db.prepare('BEGIN IMMEDIATE', self, false) }, shared),
|
|
341966
|
+
exclusive: Object.assign({ begin: db.prepare('BEGIN EXCLUSIVE', self, false) }, shared),
|
|
341967
|
+
});
|
|
341968
|
+
}
|
|
341969
|
+
return controller;
|
|
341970
|
+
};
|
|
341971
|
+
|
|
341972
|
+
// Return a new transaction function by wrapping the given function
|
|
341973
|
+
const wrapTransaction = (apply, fn, db, { begin, commit, rollback, savepoint, release, rollbackTo }) => function sqliteTransaction() {
|
|
341974
|
+
let before, after, undo;
|
|
341975
|
+
if (db.inTransaction) {
|
|
341976
|
+
before = savepoint;
|
|
341977
|
+
after = release;
|
|
341978
|
+
undo = rollbackTo;
|
|
341979
|
+
} else {
|
|
341980
|
+
before = begin;
|
|
341981
|
+
after = commit;
|
|
341982
|
+
undo = rollback;
|
|
341983
|
+
}
|
|
341984
|
+
before.run();
|
|
341985
|
+
try {
|
|
341986
|
+
const result = apply.call(fn, this, arguments);
|
|
341987
|
+
after.run();
|
|
341988
|
+
return result;
|
|
341989
|
+
} catch (ex) {
|
|
341990
|
+
if (db.inTransaction) {
|
|
341991
|
+
undo.run();
|
|
341992
|
+
if (undo !== rollback) after.run();
|
|
341993
|
+
}
|
|
341994
|
+
throw ex;
|
|
341995
|
+
}
|
|
341996
|
+
};
|
|
341997
|
+
return transaction;
|
|
341998
|
+
}
|
|
341999
|
+
|
|
342000
|
+
var pragma;
|
|
342001
|
+
var hasRequiredPragma;
|
|
342002
|
+
|
|
342003
|
+
function requirePragma () {
|
|
342004
|
+
if (hasRequiredPragma) return pragma;
|
|
342005
|
+
hasRequiredPragma = 1;
|
|
342006
|
+
const { getBooleanOption, cppdb } = util$1;
|
|
342007
|
+
|
|
342008
|
+
pragma = function pragma(source, options) {
|
|
342009
|
+
if (options == null) options = {};
|
|
342010
|
+
if (typeof source !== 'string') throw new TypeError('Expected first argument to be a string');
|
|
342011
|
+
if (typeof options !== 'object') throw new TypeError('Expected second argument to be an options object');
|
|
342012
|
+
const simple = getBooleanOption(options, 'simple');
|
|
342013
|
+
|
|
342014
|
+
const stmt = this[cppdb].prepare(`PRAGMA ${source}`, this, true);
|
|
342015
|
+
return simple ? stmt.pluck().get() : stmt.all();
|
|
342016
|
+
};
|
|
342017
|
+
return pragma;
|
|
342018
|
+
}
|
|
342019
|
+
|
|
342020
|
+
var backup;
|
|
342021
|
+
var hasRequiredBackup;
|
|
342022
|
+
|
|
342023
|
+
function requireBackup () {
|
|
342024
|
+
if (hasRequiredBackup) return backup;
|
|
342025
|
+
hasRequiredBackup = 1;
|
|
342026
|
+
const fs = require$$0$b;
|
|
342027
|
+
const path = require$$1$4;
|
|
342028
|
+
const { promisify } = require$$0$5;
|
|
342029
|
+
const { cppdb } = util$1;
|
|
342030
|
+
const fsAccess = promisify(fs.access);
|
|
342031
|
+
|
|
342032
|
+
backup = async function backup(filename, options) {
|
|
342033
|
+
if (options == null) options = {};
|
|
342034
|
+
|
|
342035
|
+
// Validate arguments
|
|
342036
|
+
if (typeof filename !== 'string') throw new TypeError('Expected first argument to be a string');
|
|
342037
|
+
if (typeof options !== 'object') throw new TypeError('Expected second argument to be an options object');
|
|
342038
|
+
|
|
342039
|
+
// Interpret options
|
|
342040
|
+
filename = filename.trim();
|
|
342041
|
+
const attachedName = 'attached' in options ? options.attached : 'main';
|
|
342042
|
+
const handler = 'progress' in options ? options.progress : null;
|
|
342043
|
+
|
|
342044
|
+
// Validate interpreted options
|
|
342045
|
+
if (!filename) throw new TypeError('Backup filename cannot be an empty string');
|
|
342046
|
+
if (filename === ':memory:') throw new TypeError('Invalid backup filename ":memory:"');
|
|
342047
|
+
if (typeof attachedName !== 'string') throw new TypeError('Expected the "attached" option to be a string');
|
|
342048
|
+
if (!attachedName) throw new TypeError('The "attached" option cannot be an empty string');
|
|
342049
|
+
if (handler != null && typeof handler !== 'function') throw new TypeError('Expected the "progress" option to be a function');
|
|
342050
|
+
|
|
342051
|
+
// Make sure the specified directory exists
|
|
342052
|
+
await fsAccess(path.dirname(filename)).catch(() => {
|
|
342053
|
+
throw new TypeError('Cannot save backup because the directory does not exist');
|
|
342054
|
+
});
|
|
342055
|
+
|
|
342056
|
+
const isNewFile = await fsAccess(filename).then(() => false, () => true);
|
|
342057
|
+
return runBackup(this[cppdb].backup(this, attachedName, filename, isNewFile), handler || null);
|
|
342058
|
+
};
|
|
342059
|
+
|
|
342060
|
+
const runBackup = (backup, handler) => {
|
|
342061
|
+
let rate = 0;
|
|
342062
|
+
let useDefault = true;
|
|
342063
|
+
|
|
342064
|
+
return new Promise((resolve, reject) => {
|
|
342065
|
+
setImmediate(function step() {
|
|
342066
|
+
try {
|
|
342067
|
+
const progress = backup.transfer(rate);
|
|
342068
|
+
if (!progress.remainingPages) {
|
|
342069
|
+
backup.close();
|
|
342070
|
+
resolve(progress);
|
|
342071
|
+
return;
|
|
342072
|
+
}
|
|
342073
|
+
if (useDefault) {
|
|
342074
|
+
useDefault = false;
|
|
342075
|
+
rate = 100;
|
|
342076
|
+
}
|
|
342077
|
+
if (handler) {
|
|
342078
|
+
const ret = handler(progress);
|
|
342079
|
+
if (ret !== undefined) {
|
|
342080
|
+
if (typeof ret === 'number' && ret === ret) rate = Math.max(0, Math.min(0x7fffffff, Math.round(ret)));
|
|
342081
|
+
else throw new TypeError('Expected progress callback to return a number or undefined');
|
|
342082
|
+
}
|
|
342083
|
+
}
|
|
342084
|
+
setImmediate(step);
|
|
342085
|
+
} catch (err) {
|
|
342086
|
+
backup.close();
|
|
342087
|
+
reject(err);
|
|
342088
|
+
}
|
|
342089
|
+
});
|
|
342090
|
+
});
|
|
342091
|
+
};
|
|
342092
|
+
return backup;
|
|
342093
|
+
}
|
|
342094
|
+
|
|
342095
|
+
var serialize;
|
|
342096
|
+
var hasRequiredSerialize;
|
|
342097
|
+
|
|
342098
|
+
function requireSerialize () {
|
|
342099
|
+
if (hasRequiredSerialize) return serialize;
|
|
342100
|
+
hasRequiredSerialize = 1;
|
|
342101
|
+
const { cppdb } = util$1;
|
|
342102
|
+
|
|
342103
|
+
serialize = function serialize(options) {
|
|
342104
|
+
if (options == null) options = {};
|
|
342105
|
+
|
|
342106
|
+
// Validate arguments
|
|
342107
|
+
if (typeof options !== 'object') throw new TypeError('Expected first argument to be an options object');
|
|
342108
|
+
|
|
342109
|
+
// Interpret and validate options
|
|
342110
|
+
const attachedName = 'attached' in options ? options.attached : 'main';
|
|
342111
|
+
if (typeof attachedName !== 'string') throw new TypeError('Expected the "attached" option to be a string');
|
|
342112
|
+
if (!attachedName) throw new TypeError('The "attached" option cannot be an empty string');
|
|
342113
|
+
|
|
342114
|
+
return this[cppdb].serialize(attachedName);
|
|
342115
|
+
};
|
|
342116
|
+
return serialize;
|
|
342117
|
+
}
|
|
342118
|
+
|
|
342119
|
+
var _function;
|
|
342120
|
+
var hasRequired_function;
|
|
342121
|
+
|
|
342122
|
+
function require_function () {
|
|
342123
|
+
if (hasRequired_function) return _function;
|
|
342124
|
+
hasRequired_function = 1;
|
|
342125
|
+
const { getBooleanOption, cppdb } = util$1;
|
|
342126
|
+
|
|
342127
|
+
_function = function defineFunction(name, options, fn) {
|
|
342128
|
+
// Apply defaults
|
|
342129
|
+
if (options == null) options = {};
|
|
342130
|
+
if (typeof options === 'function') { fn = options; options = {}; }
|
|
342131
|
+
|
|
342132
|
+
// Validate arguments
|
|
342133
|
+
if (typeof name !== 'string') throw new TypeError('Expected first argument to be a string');
|
|
342134
|
+
if (typeof fn !== 'function') throw new TypeError('Expected last argument to be a function');
|
|
342135
|
+
if (typeof options !== 'object') throw new TypeError('Expected second argument to be an options object');
|
|
342136
|
+
if (!name) throw new TypeError('User-defined function name cannot be an empty string');
|
|
342137
|
+
|
|
342138
|
+
// Interpret options
|
|
342139
|
+
const safeIntegers = 'safeIntegers' in options ? +getBooleanOption(options, 'safeIntegers') : 2;
|
|
342140
|
+
const deterministic = getBooleanOption(options, 'deterministic');
|
|
342141
|
+
const directOnly = getBooleanOption(options, 'directOnly');
|
|
342142
|
+
const varargs = getBooleanOption(options, 'varargs');
|
|
342143
|
+
let argCount = -1;
|
|
342144
|
+
|
|
342145
|
+
// Determine argument count
|
|
342146
|
+
if (!varargs) {
|
|
342147
|
+
argCount = fn.length;
|
|
342148
|
+
if (!Number.isInteger(argCount) || argCount < 0) throw new TypeError('Expected function.length to be a positive integer');
|
|
342149
|
+
if (argCount > 100) throw new RangeError('User-defined functions cannot have more than 100 arguments');
|
|
342150
|
+
}
|
|
342151
|
+
|
|
342152
|
+
this[cppdb].function(fn, name, argCount, safeIntegers, deterministic, directOnly);
|
|
342153
|
+
return this;
|
|
342154
|
+
};
|
|
342155
|
+
return _function;
|
|
342156
|
+
}
|
|
342157
|
+
|
|
342158
|
+
var aggregate;
|
|
342159
|
+
var hasRequiredAggregate;
|
|
342160
|
+
|
|
342161
|
+
function requireAggregate () {
|
|
342162
|
+
if (hasRequiredAggregate) return aggregate;
|
|
342163
|
+
hasRequiredAggregate = 1;
|
|
342164
|
+
const { getBooleanOption, cppdb } = util$1;
|
|
342165
|
+
|
|
342166
|
+
aggregate = function defineAggregate(name, options) {
|
|
342167
|
+
// Validate arguments
|
|
342168
|
+
if (typeof name !== 'string') throw new TypeError('Expected first argument to be a string');
|
|
342169
|
+
if (typeof options !== 'object' || options === null) throw new TypeError('Expected second argument to be an options object');
|
|
342170
|
+
if (!name) throw new TypeError('User-defined function name cannot be an empty string');
|
|
342171
|
+
|
|
342172
|
+
// Interpret options
|
|
342173
|
+
const start = 'start' in options ? options.start : null;
|
|
342174
|
+
const step = getFunctionOption(options, 'step', true);
|
|
342175
|
+
const inverse = getFunctionOption(options, 'inverse', false);
|
|
342176
|
+
const result = getFunctionOption(options, 'result', false);
|
|
342177
|
+
const safeIntegers = 'safeIntegers' in options ? +getBooleanOption(options, 'safeIntegers') : 2;
|
|
342178
|
+
const deterministic = getBooleanOption(options, 'deterministic');
|
|
342179
|
+
const directOnly = getBooleanOption(options, 'directOnly');
|
|
342180
|
+
const varargs = getBooleanOption(options, 'varargs');
|
|
342181
|
+
let argCount = -1;
|
|
342182
|
+
|
|
342183
|
+
// Determine argument count
|
|
342184
|
+
if (!varargs) {
|
|
342185
|
+
argCount = Math.max(getLength(step), inverse ? getLength(inverse) : 0);
|
|
342186
|
+
if (argCount > 0) argCount -= 1;
|
|
342187
|
+
if (argCount > 100) throw new RangeError('User-defined functions cannot have more than 100 arguments');
|
|
342188
|
+
}
|
|
342189
|
+
|
|
342190
|
+
this[cppdb].aggregate(start, step, inverse, result, name, argCount, safeIntegers, deterministic, directOnly);
|
|
342191
|
+
return this;
|
|
342192
|
+
};
|
|
342193
|
+
|
|
342194
|
+
const getFunctionOption = (options, key, required) => {
|
|
342195
|
+
const value = key in options ? options[key] : null;
|
|
342196
|
+
if (typeof value === 'function') return value;
|
|
342197
|
+
if (value != null) throw new TypeError(`Expected the "${key}" option to be a function`);
|
|
342198
|
+
if (required) throw new TypeError(`Missing required option "${key}"`);
|
|
342199
|
+
return null;
|
|
342200
|
+
};
|
|
342201
|
+
|
|
342202
|
+
const getLength = ({ length }) => {
|
|
342203
|
+
if (Number.isInteger(length) && length >= 0) return length;
|
|
342204
|
+
throw new TypeError('Expected function.length to be a positive integer');
|
|
342205
|
+
};
|
|
342206
|
+
return aggregate;
|
|
342207
|
+
}
|
|
342208
|
+
|
|
342209
|
+
var table;
|
|
342210
|
+
var hasRequiredTable;
|
|
342211
|
+
|
|
342212
|
+
function requireTable () {
|
|
342213
|
+
if (hasRequiredTable) return table;
|
|
342214
|
+
hasRequiredTable = 1;
|
|
342215
|
+
const { cppdb } = util$1;
|
|
342216
|
+
|
|
342217
|
+
table = function defineTable(name, factory) {
|
|
342218
|
+
// Validate arguments
|
|
342219
|
+
if (typeof name !== 'string') throw new TypeError('Expected first argument to be a string');
|
|
342220
|
+
if (!name) throw new TypeError('Virtual table module name cannot be an empty string');
|
|
342221
|
+
|
|
342222
|
+
// Determine whether the module is eponymous-only or not
|
|
342223
|
+
let eponymous = false;
|
|
342224
|
+
if (typeof factory === 'object' && factory !== null) {
|
|
342225
|
+
eponymous = true;
|
|
342226
|
+
factory = defer(parseTableDefinition(factory, 'used', name));
|
|
342227
|
+
} else {
|
|
342228
|
+
if (typeof factory !== 'function') throw new TypeError('Expected second argument to be a function or a table definition object');
|
|
342229
|
+
factory = wrapFactory(factory);
|
|
342230
|
+
}
|
|
342231
|
+
|
|
342232
|
+
this[cppdb].table(factory, name, eponymous);
|
|
342233
|
+
return this;
|
|
342234
|
+
};
|
|
342235
|
+
|
|
342236
|
+
function wrapFactory(factory) {
|
|
342237
|
+
return function virtualTableFactory(moduleName, databaseName, tableName, ...args) {
|
|
342238
|
+
const thisObject = {
|
|
342239
|
+
module: moduleName,
|
|
342240
|
+
database: databaseName,
|
|
342241
|
+
table: tableName,
|
|
342242
|
+
};
|
|
342243
|
+
|
|
342244
|
+
// Generate a new table definition by invoking the factory
|
|
342245
|
+
const def = apply.call(factory, thisObject, args);
|
|
342246
|
+
if (typeof def !== 'object' || def === null) {
|
|
342247
|
+
throw new TypeError(`Virtual table module "${moduleName}" did not return a table definition object`);
|
|
342248
|
+
}
|
|
342249
|
+
|
|
342250
|
+
return parseTableDefinition(def, 'returned', moduleName);
|
|
342251
|
+
};
|
|
342252
|
+
}
|
|
342253
|
+
|
|
342254
|
+
function parseTableDefinition(def, verb, moduleName) {
|
|
342255
|
+
// Validate required properties
|
|
342256
|
+
if (!hasOwnProperty.call(def, 'rows')) {
|
|
342257
|
+
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition without a "rows" property`);
|
|
342258
|
+
}
|
|
342259
|
+
if (!hasOwnProperty.call(def, 'columns')) {
|
|
342260
|
+
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition without a "columns" property`);
|
|
342261
|
+
}
|
|
342262
|
+
|
|
342263
|
+
// Validate "rows" property
|
|
342264
|
+
const rows = def.rows;
|
|
342265
|
+
if (typeof rows !== 'function' || Object.getPrototypeOf(rows) !== GeneratorFunctionPrototype) {
|
|
342266
|
+
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with an invalid "rows" property (should be a generator function)`);
|
|
342267
|
+
}
|
|
342268
|
+
|
|
342269
|
+
// Validate "columns" property
|
|
342270
|
+
let columns = def.columns;
|
|
342271
|
+
if (!Array.isArray(columns) || !(columns = [...columns]).every(x => typeof x === 'string')) {
|
|
342272
|
+
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with an invalid "columns" property (should be an array of strings)`);
|
|
342273
|
+
}
|
|
342274
|
+
if (columns.length !== new Set(columns).size) {
|
|
342275
|
+
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with duplicate column names`);
|
|
342276
|
+
}
|
|
342277
|
+
if (!columns.length) {
|
|
342278
|
+
throw new RangeError(`Virtual table module "${moduleName}" ${verb} a table definition with zero columns`);
|
|
342279
|
+
}
|
|
342280
|
+
|
|
342281
|
+
// Validate "parameters" property
|
|
342282
|
+
let parameters;
|
|
342283
|
+
if (hasOwnProperty.call(def, 'parameters')) {
|
|
342284
|
+
parameters = def.parameters;
|
|
342285
|
+
if (!Array.isArray(parameters) || !(parameters = [...parameters]).every(x => typeof x === 'string')) {
|
|
342286
|
+
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with an invalid "parameters" property (should be an array of strings)`);
|
|
342287
|
+
}
|
|
342288
|
+
} else {
|
|
342289
|
+
parameters = inferParameters(rows);
|
|
342290
|
+
}
|
|
342291
|
+
if (parameters.length !== new Set(parameters).size) {
|
|
342292
|
+
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with duplicate parameter names`);
|
|
342293
|
+
}
|
|
342294
|
+
if (parameters.length > 32) {
|
|
342295
|
+
throw new RangeError(`Virtual table module "${moduleName}" ${verb} a table definition with more than the maximum number of 32 parameters`);
|
|
342296
|
+
}
|
|
342297
|
+
for (const parameter of parameters) {
|
|
342298
|
+
if (columns.includes(parameter)) {
|
|
342299
|
+
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with column "${parameter}" which was ambiguously defined as both a column and parameter`);
|
|
342300
|
+
}
|
|
342301
|
+
}
|
|
342302
|
+
|
|
342303
|
+
// Validate "safeIntegers" option
|
|
342304
|
+
let safeIntegers = 2;
|
|
342305
|
+
if (hasOwnProperty.call(def, 'safeIntegers')) {
|
|
342306
|
+
const bool = def.safeIntegers;
|
|
342307
|
+
if (typeof bool !== 'boolean') {
|
|
342308
|
+
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with an invalid "safeIntegers" property (should be a boolean)`);
|
|
342309
|
+
}
|
|
342310
|
+
safeIntegers = +bool;
|
|
342311
|
+
}
|
|
342312
|
+
|
|
342313
|
+
// Validate "directOnly" option
|
|
342314
|
+
let directOnly = false;
|
|
342315
|
+
if (hasOwnProperty.call(def, 'directOnly')) {
|
|
342316
|
+
directOnly = def.directOnly;
|
|
342317
|
+
if (typeof directOnly !== 'boolean') {
|
|
342318
|
+
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with an invalid "directOnly" property (should be a boolean)`);
|
|
342319
|
+
}
|
|
342320
|
+
}
|
|
342321
|
+
|
|
342322
|
+
// Generate SQL for the virtual table definition
|
|
342323
|
+
const columnDefinitions = [
|
|
342324
|
+
...parameters.map(identifier).map(str => `${str} HIDDEN`),
|
|
342325
|
+
...columns.map(identifier),
|
|
342326
|
+
];
|
|
342327
|
+
return [
|
|
342328
|
+
`CREATE TABLE x(${columnDefinitions.join(', ')});`,
|
|
342329
|
+
wrapGenerator(rows, new Map(columns.map((x, i) => [x, parameters.length + i])), moduleName),
|
|
342330
|
+
parameters,
|
|
342331
|
+
safeIntegers,
|
|
342332
|
+
directOnly,
|
|
342333
|
+
];
|
|
342334
|
+
}
|
|
342335
|
+
|
|
342336
|
+
function wrapGenerator(generator, columnMap, moduleName) {
|
|
342337
|
+
return function* virtualTable(...args) {
|
|
342338
|
+
/*
|
|
342339
|
+
We must defensively clone any buffers in the arguments, because
|
|
342340
|
+
otherwise the generator could mutate one of them, which would cause
|
|
342341
|
+
us to return incorrect values for hidden columns, potentially
|
|
342342
|
+
corrupting the database.
|
|
342343
|
+
*/
|
|
342344
|
+
const output = args.map(x => Buffer.isBuffer(x) ? Buffer.from(x) : x);
|
|
342345
|
+
for (let i = 0; i < columnMap.size; ++i) {
|
|
342346
|
+
output.push(null); // Fill with nulls to prevent gaps in array (v8 optimization)
|
|
342347
|
+
}
|
|
342348
|
+
for (const row of generator(...args)) {
|
|
342349
|
+
if (Array.isArray(row)) {
|
|
342350
|
+
extractRowArray(row, output, columnMap.size, moduleName);
|
|
342351
|
+
yield output;
|
|
342352
|
+
} else if (typeof row === 'object' && row !== null) {
|
|
342353
|
+
extractRowObject(row, output, columnMap, moduleName);
|
|
342354
|
+
yield output;
|
|
342355
|
+
} else {
|
|
342356
|
+
throw new TypeError(`Virtual table module "${moduleName}" yielded something that isn't a valid row object`);
|
|
342357
|
+
}
|
|
342358
|
+
}
|
|
342359
|
+
};
|
|
342360
|
+
}
|
|
342361
|
+
|
|
342362
|
+
function extractRowArray(row, output, columnCount, moduleName) {
|
|
342363
|
+
if (row.length !== columnCount) {
|
|
342364
|
+
throw new TypeError(`Virtual table module "${moduleName}" yielded a row with an incorrect number of columns`);
|
|
342365
|
+
}
|
|
342366
|
+
const offset = output.length - columnCount;
|
|
342367
|
+
for (let i = 0; i < columnCount; ++i) {
|
|
342368
|
+
output[i + offset] = row[i];
|
|
342369
|
+
}
|
|
342370
|
+
}
|
|
342371
|
+
|
|
342372
|
+
function extractRowObject(row, output, columnMap, moduleName) {
|
|
342373
|
+
let count = 0;
|
|
342374
|
+
for (const key of Object.keys(row)) {
|
|
342375
|
+
const index = columnMap.get(key);
|
|
342376
|
+
if (index === undefined) {
|
|
342377
|
+
throw new TypeError(`Virtual table module "${moduleName}" yielded a row with an undeclared column "${key}"`);
|
|
342378
|
+
}
|
|
342379
|
+
output[index] = row[key];
|
|
342380
|
+
count += 1;
|
|
342381
|
+
}
|
|
342382
|
+
if (count !== columnMap.size) {
|
|
342383
|
+
throw new TypeError(`Virtual table module "${moduleName}" yielded a row with missing columns`);
|
|
342384
|
+
}
|
|
342385
|
+
}
|
|
342386
|
+
|
|
342387
|
+
function inferParameters({ length }) {
|
|
342388
|
+
if (!Number.isInteger(length) || length < 0) {
|
|
342389
|
+
throw new TypeError('Expected function.length to be a positive integer');
|
|
342390
|
+
}
|
|
342391
|
+
const params = [];
|
|
342392
|
+
for (let i = 0; i < length; ++i) {
|
|
342393
|
+
params.push(`$${i + 1}`);
|
|
342394
|
+
}
|
|
342395
|
+
return params;
|
|
342396
|
+
}
|
|
342397
|
+
|
|
342398
|
+
const { hasOwnProperty } = Object.prototype;
|
|
342399
|
+
const { apply } = Function.prototype;
|
|
342400
|
+
const GeneratorFunctionPrototype = Object.getPrototypeOf(function*(){});
|
|
342401
|
+
const identifier = str => `"${str.replace(/"/g, '""')}"`;
|
|
342402
|
+
const defer = x => () => x;
|
|
342403
|
+
return table;
|
|
342404
|
+
}
|
|
342405
|
+
|
|
342406
|
+
var inspect;
|
|
342407
|
+
var hasRequiredInspect;
|
|
342408
|
+
|
|
342409
|
+
function requireInspect () {
|
|
342410
|
+
if (hasRequiredInspect) return inspect;
|
|
342411
|
+
hasRequiredInspect = 1;
|
|
342412
|
+
const DatabaseInspection = function Database() {};
|
|
342413
|
+
|
|
342414
|
+
inspect = function inspect(depth, opts) {
|
|
342415
|
+
return Object.assign(new DatabaseInspection(), this);
|
|
342416
|
+
};
|
|
342417
|
+
return inspect;
|
|
342418
|
+
}
|
|
342419
|
+
|
|
342420
|
+
const fs = require$$0$b;
|
|
342421
|
+
const path = require$$1$4;
|
|
342422
|
+
const util = util$1;
|
|
342423
|
+
const SqliteError = sqliteError;
|
|
342424
|
+
|
|
342425
|
+
let DEFAULT_ADDON;
|
|
342426
|
+
|
|
342427
|
+
function Database$2(filenameGiven, options) {
|
|
342428
|
+
if (new.target == null) {
|
|
342429
|
+
return new Database$2(filenameGiven, options);
|
|
342430
|
+
}
|
|
342431
|
+
|
|
342432
|
+
// Apply defaults
|
|
342433
|
+
let buffer;
|
|
342434
|
+
if (Buffer.isBuffer(filenameGiven)) {
|
|
342435
|
+
buffer = filenameGiven;
|
|
342436
|
+
filenameGiven = ':memory:';
|
|
342437
|
+
}
|
|
342438
|
+
if (filenameGiven == null) filenameGiven = '';
|
|
342439
|
+
if (options == null) options = {};
|
|
342440
|
+
|
|
342441
|
+
// Validate arguments
|
|
342442
|
+
if (typeof filenameGiven !== 'string') throw new TypeError('Expected first argument to be a string');
|
|
342443
|
+
if (typeof options !== 'object') throw new TypeError('Expected second argument to be an options object');
|
|
342444
|
+
if ('readOnly' in options) throw new TypeError('Misspelled option "readOnly" should be "readonly"');
|
|
342445
|
+
if ('memory' in options) throw new TypeError('Option "memory" was removed in v7.0.0 (use ":memory:" filename instead)');
|
|
342446
|
+
|
|
342447
|
+
// Interpret options
|
|
342448
|
+
const filename = filenameGiven.trim();
|
|
342449
|
+
const anonymous = filename === '' || filename === ':memory:';
|
|
342450
|
+
const readonly = util.getBooleanOption(options, 'readonly');
|
|
342451
|
+
const fileMustExist = util.getBooleanOption(options, 'fileMustExist');
|
|
342452
|
+
const timeout = 'timeout' in options ? options.timeout : 5000;
|
|
342453
|
+
const verbose = 'verbose' in options ? options.verbose : null;
|
|
342454
|
+
const nativeBindingPath = 'nativeBinding' in options ? options.nativeBinding : null;
|
|
342455
|
+
|
|
342456
|
+
// Validate interpreted options
|
|
342457
|
+
if (readonly && anonymous && !buffer) throw new TypeError('In-memory/temporary databases cannot be readonly');
|
|
342458
|
+
if (!Number.isInteger(timeout) || timeout < 0) throw new TypeError('Expected the "timeout" option to be a positive integer');
|
|
342459
|
+
if (timeout > 0x7fffffff) throw new RangeError('Option "timeout" cannot be greater than 2147483647');
|
|
342460
|
+
if (verbose != null && typeof verbose !== 'function') throw new TypeError('Expected the "verbose" option to be a function');
|
|
342461
|
+
if (nativeBindingPath != null && typeof nativeBindingPath !== 'string') throw new TypeError('Expected the "nativeBinding" option to be a string');
|
|
342462
|
+
|
|
342463
|
+
// Load the native addon
|
|
342464
|
+
let addon;
|
|
342465
|
+
if (nativeBindingPath == null) {
|
|
342466
|
+
addon = DEFAULT_ADDON || (DEFAULT_ADDON = requireBindings()('better_sqlite3.node'));
|
|
342467
|
+
} else {
|
|
342468
|
+
addon = commonjsRequire(path.resolve(nativeBindingPath).replace(/(\.node)?$/, '.node'));
|
|
342469
|
+
}
|
|
342470
|
+
if (!addon.isInitialized) {
|
|
342471
|
+
addon.setErrorConstructor(SqliteError);
|
|
342472
|
+
addon.isInitialized = true;
|
|
342473
|
+
}
|
|
342474
|
+
|
|
342475
|
+
// Make sure the specified directory exists
|
|
342476
|
+
if (!anonymous && !fs.existsSync(path.dirname(filename))) {
|
|
342477
|
+
throw new TypeError('Cannot open database because the directory does not exist');
|
|
342478
|
+
}
|
|
342479
|
+
|
|
342480
|
+
Object.defineProperties(this, {
|
|
342481
|
+
[util.cppdb]: { value: new addon.Database(filename, filenameGiven, anonymous, readonly, fileMustExist, timeout, verbose || null, buffer || null) },
|
|
342482
|
+
...wrappers.getters,
|
|
342483
|
+
});
|
|
342484
|
+
}
|
|
342485
|
+
|
|
342486
|
+
const wrappers = requireWrappers();
|
|
342487
|
+
Database$2.prototype.prepare = wrappers.prepare;
|
|
342488
|
+
Database$2.prototype.transaction = requireTransaction();
|
|
342489
|
+
Database$2.prototype.pragma = requirePragma();
|
|
342490
|
+
Database$2.prototype.backup = requireBackup();
|
|
342491
|
+
Database$2.prototype.serialize = requireSerialize();
|
|
342492
|
+
Database$2.prototype.function = require_function();
|
|
342493
|
+
Database$2.prototype.aggregate = requireAggregate();
|
|
342494
|
+
Database$2.prototype.table = requireTable();
|
|
342495
|
+
Database$2.prototype.loadExtension = wrappers.loadExtension;
|
|
342496
|
+
Database$2.prototype.exec = wrappers.exec;
|
|
342497
|
+
Database$2.prototype.close = wrappers.close;
|
|
342498
|
+
Database$2.prototype.defaultSafeIntegers = wrappers.defaultSafeIntegers;
|
|
342499
|
+
Database$2.prototype.unsafeMode = wrappers.unsafeMode;
|
|
342500
|
+
Database$2.prototype[util.inspect] = requireInspect();
|
|
342501
|
+
|
|
342502
|
+
var database = Database$2;
|
|
342503
|
+
|
|
342504
|
+
lib.exports = database;
|
|
342505
|
+
lib.exports.SqliteError = sqliteError;
|
|
342506
|
+
|
|
342507
|
+
var libExports = lib.exports;
|
|
342508
|
+
var SQDatabase = /*@__PURE__*/getDefaultExportFromCjs(libExports);
|
|
342509
|
+
|
|
341538
342510
|
const escape$1 = (val) => `'${val.replace(/'/g, "''")}'`;
|
|
341539
342511
|
const Database$1 = class SQLiteDB extends AbstractDatabase {
|
|
341540
342512
|
db;
|
|
@@ -341558,37 +342530,22 @@ const Database$1 = class SQLiteDB extends AbstractDatabase {
|
|
|
341558
342530
|
}
|
|
341559
342531
|
}
|
|
341560
342532
|
init(callback) {
|
|
341561
|
-
|
|
341562
|
-
|
|
341563
|
-
|
|
341564
|
-
// @ts-ignore
|
|
341565
|
-
})(callback);
|
|
342533
|
+
this.db = new SQDatabase(this.settings.filename);
|
|
342534
|
+
this._query('CREATE TABLE IF NOT EXISTS store (key TEXT PRIMARY KEY, value TEXT)');
|
|
342535
|
+
callback();
|
|
341566
342536
|
}
|
|
341567
342537
|
async _query(sql, params = []) {
|
|
341568
342538
|
// It is unclear how util.promisify() deals with variadic functions, so it is not used here.
|
|
341569
|
-
|
|
341570
|
-
|
|
341571
|
-
|
|
341572
|
-
|
|
341573
|
-
|
|
341574
|
-
|
|
341575
|
-
this.db && this.db.all(sql, params, (err, rows) => {
|
|
341576
|
-
if (err != null)
|
|
341577
|
-
return reject(err);
|
|
341578
|
-
resolve(rows);
|
|
341579
|
-
});
|
|
341580
|
-
});
|
|
341581
|
-
}
|
|
341582
|
-
// Temporary callbackified version of _query. This will be removed once all database objects are
|
|
341583
|
-
// asyncified.
|
|
341584
|
-
_queryCb(sql, params, callback) {
|
|
341585
|
-
// It is unclear how util.callbackify() handles optional parameters, so it is not used here.
|
|
341586
|
-
const p = this._query(sql, params);
|
|
341587
|
-
if (callback)
|
|
341588
|
-
p.then((rows) => callback(null, rows), (err) => callback(err || new Error(err)));
|
|
342539
|
+
// According to sqlite3's documentation, .run() method (and maybe .all() and .get(); the
|
|
342540
|
+
// documentation is unclear) might call the callback multiple times. That's OK -- ECMAScript
|
|
342541
|
+
// guarantees that it is safe to call a Promise executor's resolve and reject functions
|
|
342542
|
+
// multiple times. The subsequent calls are ignored, except Node.js's 'process' object emits a
|
|
342543
|
+
// 'multipleResolves' event to aid in debugging.
|
|
342544
|
+
return this.db.prepare(sql).run(params);
|
|
341589
342545
|
}
|
|
341590
342546
|
get(key, callback) {
|
|
341591
|
-
this.
|
|
342547
|
+
const res = this.db.prepare('SELECT value FROM store WHERE key = ?').get(key);
|
|
342548
|
+
callback(null, res ? res.value : null);
|
|
341592
342549
|
}
|
|
341593
342550
|
findKeys(key, notKey, callback) {
|
|
341594
342551
|
let query = 'SELECT key FROM store WHERE key LIKE ?';
|
|
@@ -341602,44 +342559,40 @@ const Database$1 = class SQLiteDB extends AbstractDatabase {
|
|
|
341602
342559
|
query += ' AND key NOT LIKE ?';
|
|
341603
342560
|
params.push(notKey);
|
|
341604
342561
|
}
|
|
341605
|
-
this.
|
|
341606
|
-
|
|
341607
|
-
if (!err && Object.keys(results).length > 0) {
|
|
341608
|
-
results.forEach((val) => {
|
|
341609
|
-
value.push(val.key);
|
|
341610
|
-
});
|
|
341611
|
-
}
|
|
341612
|
-
callback(err, value);
|
|
341613
|
-
});
|
|
342562
|
+
const res = this.db.prepare(query).all(params).map((row) => row.key);
|
|
342563
|
+
callback(null, res);
|
|
341614
342564
|
}
|
|
341615
342565
|
set(key, value, callback) {
|
|
341616
|
-
this.
|
|
342566
|
+
const res = this.db.prepare('REPLACE INTO store VALUES (?,?)').run(key, value);
|
|
342567
|
+
res.changes === 0 ? callback(null, null) : callback(null, res.lastInsertRowid);
|
|
341617
342568
|
}
|
|
341618
342569
|
remove(key, callback) {
|
|
341619
|
-
this.
|
|
342570
|
+
this.db.prepare('DELETE FROM store WHERE key = ?').run(key);
|
|
342571
|
+
callback(null, null);
|
|
341620
342572
|
}
|
|
341621
|
-
|
|
341622
|
-
let
|
|
341623
|
-
|
|
341624
|
-
|
|
341625
|
-
sql += `REPLACE INTO store VALUES (${escape$1(bulk[i].key)}, ${escape$1(bulk[i].value)});\n`;
|
|
341626
|
-
}
|
|
341627
|
-
else if (bulk[i].type === 'remove') {
|
|
341628
|
-
sql += `DELETE FROM store WHERE key = ${escape$1(bulk[i].key)};\n`;
|
|
341629
|
-
}
|
|
342573
|
+
handleBulk(bulk) {
|
|
342574
|
+
let statement = '';
|
|
342575
|
+
if (bulk.type === 'set') {
|
|
342576
|
+
statement = `REPLACE INTO store VALUES (${escape$1(bulk.key)}, ${escape$1(bulk.value)});`;
|
|
341630
342577
|
}
|
|
341631
|
-
|
|
341632
|
-
|
|
341633
|
-
|
|
341634
|
-
|
|
341635
|
-
|
|
341636
|
-
|
|
341637
|
-
|
|
342578
|
+
else if (bulk.type === 'remove') {
|
|
342579
|
+
statement = `DELETE FROM store WHERE key = ${escape$1(bulk.key)};\n`;
|
|
342580
|
+
}
|
|
342581
|
+
return statement;
|
|
342582
|
+
}
|
|
342583
|
+
doBulk(bulk, callback) {
|
|
342584
|
+
const transaction = this.db.transaction((bulk) => {
|
|
342585
|
+
bulk.forEach(b => {
|
|
342586
|
+
let sql = this.handleBulk(b);
|
|
342587
|
+
this.db.prepare(sql).run();
|
|
342588
|
+
});
|
|
341638
342589
|
});
|
|
342590
|
+
transaction(bulk);
|
|
342591
|
+
callback();
|
|
341639
342592
|
}
|
|
341640
342593
|
close(callback) {
|
|
341641
342594
|
callback();
|
|
341642
|
-
this.db
|
|
342595
|
+
this.db.close();
|
|
341643
342596
|
}
|
|
341644
342597
|
};
|
|
341645
342598
|
|
|
@@ -341656,7 +342609,7 @@ const cbDb = {
|
|
|
341656
342609
|
const fns = ['close', 'findKeys', 'flush', 'get', 'getSub', 'init', 'remove', 'set', 'setSub'];
|
|
341657
342610
|
for (const fn of fns) {
|
|
341658
342611
|
// @ts-ignore
|
|
341659
|
-
cbDb[fn] = require$$0$5.callbackify(Database$
|
|
342612
|
+
cbDb[fn] = require$$0$5.callbackify(Database$h.prototype[fn]);
|
|
341660
342613
|
}
|
|
341661
342614
|
const makeDoneCallback = (callback, deprecated) => (err) => {
|
|
341662
342615
|
if (callback)
|
|
@@ -341701,7 +342654,7 @@ const Database = class {
|
|
|
341701
342654
|
async init(callback = null) {
|
|
341702
342655
|
const db = this.initDB();
|
|
341703
342656
|
db.logger = this.logger;
|
|
341704
|
-
this.db = new Database$
|
|
342657
|
+
this.db = new Database$h(db, this.wrapperSettings, this.logger);
|
|
341705
342658
|
this.metrics = this.db.metrics;
|
|
341706
342659
|
if (callback != null) {
|
|
341707
342660
|
return cbDb.init.call(this.db);
|
|
@@ -341711,35 +342664,35 @@ const Database = class {
|
|
|
341711
342664
|
initDB() {
|
|
341712
342665
|
switch (this.type) {
|
|
341713
342666
|
case 'mysql':
|
|
341714
|
-
return new Database$
|
|
342667
|
+
return new Database$7(this.dbSettings);
|
|
341715
342668
|
case 'postgres':
|
|
341716
|
-
return new Database$
|
|
342669
|
+
return new Database$6(this.dbSettings);
|
|
341717
342670
|
case 'sqlite':
|
|
341718
342671
|
return new Database$1(this.dbSettings);
|
|
341719
342672
|
case 'mongodb':
|
|
341720
|
-
return new Database$
|
|
342673
|
+
return new Database$9(this.dbSettings);
|
|
341721
342674
|
case 'redis':
|
|
341722
|
-
return new Database$
|
|
342675
|
+
return new Database$4(this.dbSettings);
|
|
341723
342676
|
case 'cassandra':
|
|
341724
|
-
return new Database$
|
|
342677
|
+
return new Database$g(this.dbSettings);
|
|
341725
342678
|
case 'dirty':
|
|
341726
|
-
return new Database$
|
|
342679
|
+
return new Database$e(this.dbSettings);
|
|
341727
342680
|
case 'dirtygit':
|
|
341728
|
-
return new Database$
|
|
342681
|
+
return new Database$d(this.dbSettings);
|
|
341729
342682
|
case 'elasticsearch':
|
|
341730
|
-
return new Database$
|
|
342683
|
+
return new Database$c(this.dbSettings);
|
|
341731
342684
|
case 'memory':
|
|
341732
|
-
return new Database$
|
|
342685
|
+
return new Database$b(this.dbSettings);
|
|
341733
342686
|
case 'mock':
|
|
341734
|
-
return new Database$
|
|
342687
|
+
return new Database$a(this.dbSettings);
|
|
341735
342688
|
case 'mssql':
|
|
341736
|
-
return new Database$
|
|
342689
|
+
return new Database$8(this.dbSettings);
|
|
341737
342690
|
case 'postgrespool':
|
|
341738
|
-
return new Database$
|
|
342691
|
+
return new Database$5(this.dbSettings);
|
|
341739
342692
|
case 'rethink':
|
|
341740
|
-
return new Database$
|
|
342693
|
+
return new Database$3(this.dbSettings);
|
|
341741
342694
|
case 'couch':
|
|
341742
|
-
return new Database$
|
|
342695
|
+
return new Database$f(this.dbSettings);
|
|
341743
342696
|
default:
|
|
341744
342697
|
throw new Error('Invalid database type');
|
|
341745
342698
|
}
|