couchbase 3.2.4 → 3.2.6
Sign up to get free protection for your applications and to get access to all the features.
- package/binding.gyp +5 -0
- package/deps/lcb/CMakeLists.txt +28 -6
- package/deps/lcb/README.markdown +5 -9
- package/deps/lcb/RELEASE_NOTES.markdown +80 -5
- package/deps/lcb/cmake/Modules/GetVersionInfo.cmake +1 -1
- package/deps/lcb/doc/Doxyfile +1 -1
- package/deps/lcb/doc/cbc.markdown +10 -0
- package/deps/lcb/gyp_config/common/libcouchbase/configuration.h +3 -3
- package/deps/lcb/include/libcouchbase/couchbase.h +52 -0
- package/deps/lcb/include/libcouchbase/error.h +5 -2
- package/deps/lcb/libcouchbase.gyp +7 -1
- package/deps/lcb/packaging/rpm/libcouchbase.spec.in +1 -1
- package/deps/lcb/plugins/io/iocp/iocp_iops.h +1 -1
- package/deps/lcb/plugins/io/iocp/iocp_loop.c +3 -3
- package/deps/lcb/plugins/io/iocp/iocp_util.c +2 -2
- package/deps/lcb/src/bucketconfig/bc_file.cc +29 -15
- package/deps/lcb/src/capi/cmd_counter.hh +12 -0
- package/deps/lcb/src/capi/cmd_exists.hh +12 -0
- package/deps/lcb/src/capi/cmd_get.hh +12 -0
- package/deps/lcb/src/capi/cmd_get_replica.hh +14 -1
- package/deps/lcb/src/capi/cmd_query.cc +13 -0
- package/deps/lcb/src/capi/cmd_query.hh +22 -14
- package/deps/lcb/src/capi/cmd_remove.hh +12 -0
- package/deps/lcb/src/capi/cmd_store.hh +12 -0
- package/deps/lcb/src/capi/cmd_subdoc.hh +12 -0
- package/deps/lcb/src/capi/cmd_touch.hh +12 -0
- package/deps/lcb/src/capi/cmd_unlock.hh +12 -0
- package/deps/lcb/src/capi/collection_qualifier.hh +4 -9
- package/deps/lcb/src/instance.cc +19 -0
- package/deps/lcb/src/internal.h +2 -1
- package/deps/lcb/src/mcserver/negotiate.cc +3 -0
- package/deps/lcb/src/n1ql/n1ql.cc +5 -1
- package/deps/lcb/src/n1ql/query_handle.cc +55 -30
- package/deps/lcb/src/n1ql/query_handle.hh +14 -2
- package/deps/lcb/src/operations/counter.cc +12 -0
- package/deps/lcb/src/operations/exists.cc +12 -0
- package/deps/lcb/src/operations/get.cc +12 -0
- package/deps/lcb/src/operations/get_replica.cc +18 -6
- package/deps/lcb/src/operations/ping.cc +2 -2
- package/deps/lcb/src/operations/remove.cc +12 -0
- package/deps/lcb/src/operations/store.cc +12 -0
- package/deps/lcb/src/operations/subdoc.cc +12 -0
- package/deps/lcb/src/operations/touch.cc +12 -0
- package/deps/lcb/src/operations/unlock.cc +12 -0
- package/deps/lcb/src/search/search_handle.cc +1 -2
- package/deps/lcb/src/settings.cc +1 -0
- package/deps/lcb/src/ssl/ssl_common.c +111 -22
- package/deps/lcb/src/utilities.cc +21 -0
- package/deps/lcb/src/utilities.h +3 -0
- package/deps/lcb/src/vbucket/vbucket.c +16 -7
- package/deps/lcb/tests/CMakeLists.txt +1 -1
- package/deps/lcb/tests/iotests/mock-environment.cc +13 -1
- package/deps/lcb/tests/iotests/mock-environment.h +3 -1
- package/deps/lcb/tests/iotests/serverparams.h +7 -2
- package/deps/lcb/tests/iotests/t_ratelimit.cc +739 -0
- package/deps/lcb/tests/iotests/testutil.cc +174 -0
- package/deps/lcb/tests/iotests/testutil.h +53 -0
- package/deps/lcb/tools/CMakeLists.txt +1 -1
- package/deps/lcb/tools/cbc-handlers.h +39 -0
- package/deps/lcb/tools/cbc-n1qlback.cc +1 -0
- package/deps/lcb/tools/cbc-pillowfight.cc +45 -35
- package/deps/lcb/tools/cbc.cc +31 -0
- package/deps/lcb/tools/docgen/docgen.h +11 -10
- package/dist/analyticsexecutor.js +2 -2
- package/dist/analyticsindexmanager.js +3 -3
- package/dist/binarycollection.d.ts +17 -0
- package/dist/binding.js +1 -1
- package/dist/bindingutilities.js +5 -1
- package/dist/bucketmanager.d.ts +1 -22
- package/dist/bucketmanager.js +5 -5
- package/dist/cluster.js +1 -1
- package/dist/collection.js +6 -6
- package/dist/collectionmanager.js +2 -2
- package/dist/connection.js +3 -3
- package/dist/connspec.js +5 -1
- package/dist/couchbase.js +5 -1
- package/dist/httpexecutor.d.ts +1 -0
- package/dist/httpexecutor.js +5 -1
- package/dist/logging.js +1 -1
- package/dist/queryexecutor.js +3 -3
- package/dist/searchindexmanager.js +1 -1
- package/dist/usermanager.js +2 -2
- package/dist/utilities.d.ts +1 -2
- package/dist/utilities.js +9 -2
- package/dist/viewexecutor.js +1 -1
- package/package.json +1 -1
- package/src/uv-plugin-all.cpp +1 -0
- package/dist/cas.d.ts +0 -0
- package/dist/cas.js +0 -1
@@ -801,7 +801,7 @@ class AnalyticsIndexManager {
|
|
801
801
|
method: httpexecutor_1.HttpMethod.Post,
|
802
802
|
path: linkData.httpPath,
|
803
803
|
contentType: 'application/x-www-form-urlencoded',
|
804
|
-
body: utilities_1.cbQsStringify({
|
804
|
+
body: (0, utilities_1.cbQsStringify)({
|
805
805
|
linkData,
|
806
806
|
httpPath: undefined,
|
807
807
|
}),
|
@@ -845,7 +845,7 @@ class AnalyticsIndexManager {
|
|
845
845
|
method: httpexecutor_1.HttpMethod.Put,
|
846
846
|
path: linkData.httpPath,
|
847
847
|
contentType: 'application/x-www-form-urlencoded',
|
848
|
-
body: utilities_1.cbQsStringify({
|
848
|
+
body: (0, utilities_1.cbQsStringify)({
|
849
849
|
linkData,
|
850
850
|
httpPath: undefined,
|
851
851
|
}),
|
@@ -904,7 +904,7 @@ class AnalyticsIndexManager {
|
|
904
904
|
method: httpexecutor_1.HttpMethod.Delete,
|
905
905
|
path: httpPath,
|
906
906
|
contentType: 'application/x-www-form-urlencoded',
|
907
|
-
body: utilities_1.cbQsStringify(httpParams),
|
907
|
+
body: (0, utilities_1.cbQsStringify)(httpParams),
|
908
908
|
parentSpan: parentSpan,
|
909
909
|
timeout: timeout,
|
910
910
|
});
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/// <reference types="node" />
|
2
2
|
import { Collection } from './collection';
|
3
3
|
import { CounterResult, MutationResult } from './crudoptypes';
|
4
|
+
import { DurabilityLevel } from './generaltypes';
|
4
5
|
import { RequestSpan } from './tracing';
|
5
6
|
import { NodeCallback } from './utilities';
|
6
7
|
/**
|
@@ -17,6 +18,10 @@ export interface IncrementOptions {
|
|
17
18
|
* The expiry time that should be set for the document, expressed in seconds.
|
18
19
|
*/
|
19
20
|
expiry?: number;
|
21
|
+
/**
|
22
|
+
* Specifies the level of synchronous durability for this operation.
|
23
|
+
*/
|
24
|
+
durabilityLevel?: DurabilityLevel;
|
20
25
|
/**
|
21
26
|
* The parent tracing span that this operation will be part of.
|
22
27
|
*/
|
@@ -40,6 +45,10 @@ export interface DecrementOptions {
|
|
40
45
|
* The expiry time that should be set for the document, expressed in seconds.
|
41
46
|
*/
|
42
47
|
expiry?: number;
|
48
|
+
/**
|
49
|
+
* Specifies the level of synchronous durability for this operation.
|
50
|
+
*/
|
51
|
+
durabilityLevel?: DurabilityLevel;
|
43
52
|
/**
|
44
53
|
* The parent tracing span that this operation will be part of.
|
45
54
|
*/
|
@@ -53,6 +62,10 @@ export interface DecrementOptions {
|
|
53
62
|
* @category Key-Value
|
54
63
|
*/
|
55
64
|
export interface AppendOptions {
|
65
|
+
/**
|
66
|
+
* Specifies the level of synchronous durability for this operation.
|
67
|
+
*/
|
68
|
+
durabilityLevel?: DurabilityLevel;
|
56
69
|
/**
|
57
70
|
* The parent tracing span that this operation will be part of.
|
58
71
|
*/
|
@@ -66,6 +79,10 @@ export interface AppendOptions {
|
|
66
79
|
* @category Key-Value
|
67
80
|
*/
|
68
81
|
export interface PrependOptions {
|
82
|
+
/**
|
83
|
+
* Specifies the level of synchronous durability for this operation.
|
84
|
+
*/
|
85
|
+
durabilityLevel?: DurabilityLevel;
|
69
86
|
/**
|
70
87
|
* The parent tracing span that this operation will be part of.
|
71
88
|
*/
|
package/dist/binding.js
CHANGED
@@ -67,5 +67,5 @@ var CppAnalyticsQueryRespFlags;
|
|
67
67
|
(function (CppAnalyticsQueryRespFlags) {
|
68
68
|
})(CppAnalyticsQueryRespFlags = exports.CppAnalyticsQueryRespFlags || (exports.CppAnalyticsQueryRespFlags = {}));
|
69
69
|
// Load it with require
|
70
|
-
const binding = bindings_1.default('couchbase_impl');
|
70
|
+
const binding = (0, bindings_1.default)('couchbase_impl');
|
71
71
|
exports.default = binding;
|
package/dist/bindingutilities.js
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
"use strict";
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
3
|
if (k2 === undefined) k2 = k;
|
4
|
-
Object.
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
5
9
|
}) : (function(o, m, k, k2) {
|
6
10
|
if (k2 === undefined) k2 = k;
|
7
11
|
o[k2] = m[k];
|
package/dist/bucketmanager.d.ts
CHANGED
@@ -283,26 +283,6 @@ export interface ICreateBucketSettings extends IBucketSettings {
|
|
283
283
|
*/
|
284
284
|
conflictResolutionType: ConflictResolutionType | string;
|
285
285
|
}
|
286
|
-
/**
|
287
|
-
* We intentionally do not export this class as it is never returned back
|
288
|
-
* to the user, but we still need the ability to translate to NS data.
|
289
|
-
*
|
290
|
-
* @internal
|
291
|
-
*/
|
292
|
-
declare class CreateBucketSettings extends BucketSettings implements ICreateBucketSettings {
|
293
|
-
/**
|
294
|
-
* Specifies the conflict resolution mode to use for XDCR of this bucket.
|
295
|
-
*/
|
296
|
-
conflictResolutionType: ConflictResolutionType;
|
297
|
-
/**
|
298
|
-
* @internal
|
299
|
-
*/
|
300
|
-
constructor(data: CreateBucketSettings);
|
301
|
-
/**
|
302
|
-
* @internal
|
303
|
-
*/
|
304
|
-
static _toNsData(data: ICreateBucketSettings): any;
|
305
|
-
}
|
306
286
|
/**
|
307
287
|
* @category Management
|
308
288
|
*/
|
@@ -401,7 +381,7 @@ export declare class BucketManager {
|
|
401
381
|
* @param options Optional parameters for this operation.
|
402
382
|
* @param callback A node-style callback to be invoked after execution.
|
403
383
|
*/
|
404
|
-
createBucket(settings:
|
384
|
+
createBucket(settings: ICreateBucketSettings, options?: CreateBucketOptions, callback?: NodeCallback<void>): Promise<void>;
|
405
385
|
/**
|
406
386
|
* Updates the settings for an existing bucket.
|
407
387
|
*
|
@@ -442,4 +422,3 @@ export declare class BucketManager {
|
|
442
422
|
*/
|
443
423
|
flushBucket(bucketName: string, options?: FlushBucketOptions, callback?: NodeCallback<void>): Promise<void>;
|
444
424
|
}
|
445
|
-
export {};
|
package/dist/bucketmanager.js
CHANGED
@@ -164,7 +164,7 @@ class BucketSettings {
|
|
164
164
|
* @deprecated Use {@link IBucketSettings.minimumDurabilityLevel} instead.
|
165
165
|
*/
|
166
166
|
get durabilityMinLevel() {
|
167
|
-
return utilities_1.duraLevelToNsServerStr(this.minimumDurabilityLevel);
|
167
|
+
return (0, utilities_1.duraLevelToNsServerStr)(this.minimumDurabilityLevel);
|
168
168
|
}
|
169
169
|
/**
|
170
170
|
* @internal
|
@@ -182,7 +182,7 @@ class BucketSettings {
|
|
182
182
|
maxTTL: data.maxTTL || data.maxExpiry,
|
183
183
|
compressionMode: data.compressionMode,
|
184
184
|
durabilityMinLevel: data.durabilityMinLevel ||
|
185
|
-
utilities_1.duraLevelToNsServerStr(data.minimumDurabilityLevel),
|
185
|
+
(0, utilities_1.duraLevelToNsServerStr)(data.minimumDurabilityLevel),
|
186
186
|
};
|
187
187
|
}
|
188
188
|
/**
|
@@ -200,7 +200,7 @@ class BucketSettings {
|
|
200
200
|
evictionPolicy: data.evictionPolicy,
|
201
201
|
maxExpiry: data.maxTTL,
|
202
202
|
compressionMode: data.compressionMode,
|
203
|
-
minimumDurabilityLevel: utilities_1.nsServerStrToDuraLevel(data.durabilityMinLevel),
|
203
|
+
minimumDurabilityLevel: (0, utilities_1.nsServerStrToDuraLevel)(data.durabilityMinLevel),
|
204
204
|
maxTTL: 0,
|
205
205
|
durabilityMinLevel: '',
|
206
206
|
ejectionMethod: '',
|
@@ -272,7 +272,7 @@ class BucketManager {
|
|
272
272
|
method: httpexecutor_1.HttpMethod.Post,
|
273
273
|
path: `/pools/default/buckets`,
|
274
274
|
contentType: 'application/x-www-form-urlencoded',
|
275
|
-
body: utilities_1.cbQsStringify(bucketData),
|
275
|
+
body: (0, utilities_1.cbQsStringify)(bucketData),
|
276
276
|
parentSpan: parentSpan,
|
277
277
|
timeout: timeout,
|
278
278
|
});
|
@@ -310,7 +310,7 @@ class BucketManager {
|
|
310
310
|
method: httpexecutor_1.HttpMethod.Post,
|
311
311
|
path: `/pools/default/buckets/${settings.name}`,
|
312
312
|
contentType: 'application/x-www-form-urlencoded',
|
313
|
-
body: utilities_1.cbQsStringify(bucketData),
|
313
|
+
body: (0, utilities_1.cbQsStringify)(bucketData),
|
314
314
|
parentSpan: parentSpan,
|
315
315
|
timeout: timeout,
|
316
316
|
});
|
package/dist/cluster.js
CHANGED
@@ -378,7 +378,7 @@ class Cluster {
|
|
378
378
|
conn = new connection_1.Connection(connOpts);
|
379
379
|
conn.connect((err) => {
|
380
380
|
if (err) {
|
381
|
-
logging_1.libLogger('failed to connect to bucket: %O', err);
|
381
|
+
(0, logging_1.libLogger)('failed to connect to bucket: %O', err);
|
382
382
|
conn.close(() => undefined);
|
383
383
|
}
|
384
384
|
});
|
package/dist/collection.js
CHANGED
@@ -278,7 +278,7 @@ class Collection {
|
|
278
278
|
options = {};
|
279
279
|
}
|
280
280
|
const cas = options.cas || null;
|
281
|
-
const cppDuraMode = bindingutilities_1.duraLevelToCppDuraMode(options.durabilityLevel);
|
281
|
+
const cppDuraMode = (0, bindingutilities_1.duraLevelToCppDuraMode)(options.durabilityLevel);
|
282
282
|
const persistTo = options.durabilityPersistTo;
|
283
283
|
const replicateTo = options.durabilityReplicateTo;
|
284
284
|
const parentSpan = options.parentSpan;
|
@@ -342,7 +342,7 @@ class Collection {
|
|
342
342
|
if (!options) {
|
343
343
|
options = {};
|
344
344
|
}
|
345
|
-
const cppDuraMode = bindingutilities_1.duraLevelToCppDuraMode(options.durabilityLevel);
|
345
|
+
const cppDuraMode = (0, bindingutilities_1.duraLevelToCppDuraMode)(options.durabilityLevel);
|
346
346
|
const persistTo = options.durabilityPersistTo;
|
347
347
|
const replicateTo = options.durabilityReplicateTo;
|
348
348
|
const parentSpan = options.parentSpan;
|
@@ -445,7 +445,7 @@ class Collection {
|
|
445
445
|
if (res && res.content) {
|
446
446
|
for (let i = 0; i < res.content.length; ++i) {
|
447
447
|
const itemRes = res.content[i];
|
448
|
-
itemRes.error = bindingutilities_1.translateCppError(itemRes.error);
|
448
|
+
itemRes.error = (0, bindingutilities_1.translateCppError)(itemRes.error);
|
449
449
|
if (itemRes.value && itemRes.value.length > 0) {
|
450
450
|
itemRes.value = JSON.parse(itemRes.value);
|
451
451
|
}
|
@@ -516,7 +516,7 @@ class Collection {
|
|
516
516
|
}
|
517
517
|
const expiry = options.preserveExpiry ? -1 : options.expiry;
|
518
518
|
const cas = options.cas;
|
519
|
-
const cppDuraMode = bindingutilities_1.duraLevelToCppDuraMode(options.durabilityLevel);
|
519
|
+
const cppDuraMode = (0, bindingutilities_1.duraLevelToCppDuraMode)(options.durabilityLevel);
|
520
520
|
const persistTo = options.durabilityPersistTo;
|
521
521
|
const replicateTo = options.durabilityReplicateTo;
|
522
522
|
const parentSpan = options.parentSpan;
|
@@ -619,7 +619,7 @@ class Collection {
|
|
619
619
|
}
|
620
620
|
const expiry = options.preserveExpiry ? -1 : options.expiry;
|
621
621
|
const cas = options.cas;
|
622
|
-
const cppDuraMode = bindingutilities_1.duraLevelToCppDuraMode(options.durabilityLevel);
|
622
|
+
const cppDuraMode = (0, bindingutilities_1.duraLevelToCppDuraMode)(options.durabilityLevel);
|
623
623
|
const persistTo = options.durabilityPersistTo;
|
624
624
|
const replicateTo = options.durabilityReplicateTo;
|
625
625
|
const transcoder = options.transcoder || this.transcoder;
|
@@ -647,7 +647,7 @@ class Collection {
|
|
647
647
|
}
|
648
648
|
const initial = options.initial;
|
649
649
|
const expiry = options.expiry;
|
650
|
-
const cppDuraMode = bindingutilities_1.duraLevelToCppDuraMode(options.durabilityLevel);
|
650
|
+
const cppDuraMode = (0, bindingutilities_1.duraLevelToCppDuraMode)(options.durabilityLevel);
|
651
651
|
const persistTo = options.durabilityPersistTo;
|
652
652
|
const replicateTo = options.durabilityReplicateTo;
|
653
653
|
const parentSpan = options.parentSpan;
|
@@ -158,7 +158,7 @@ class CollectionManager {
|
|
158
158
|
method: httpexecutor_1.HttpMethod.Post,
|
159
159
|
path: `/pools/default/buckets/${bucketName}/scopes/${collectionSpec.scopeName}/collections`,
|
160
160
|
contentType: 'application/x-www-form-urlencoded',
|
161
|
-
body: utilities_1.cbQsStringify(collectionData),
|
161
|
+
body: (0, utilities_1.cbQsStringify)(collectionData),
|
162
162
|
parentSpan: parentSpan,
|
163
163
|
timeout: timeout,
|
164
164
|
});
|
@@ -248,7 +248,7 @@ class CollectionManager {
|
|
248
248
|
method: httpexecutor_1.HttpMethod.Post,
|
249
249
|
path: `/pools/default/buckets/${bucketName}/scopes`,
|
250
250
|
contentType: 'application/x-www-form-urlencoded',
|
251
|
-
body: utilities_1.cbQsStringify({
|
251
|
+
body: (0, utilities_1.cbQsStringify)({
|
252
252
|
name: scopeName,
|
253
253
|
}),
|
254
254
|
parentSpan: parentSpan,
|
package/dist/connection.js
CHANGED
@@ -147,7 +147,7 @@ class Connection {
|
|
147
147
|
this._inst.connect((err) => {
|
148
148
|
if (err) {
|
149
149
|
this._closed = true;
|
150
|
-
this._closedErr = bindingutilities_1.translateCppError(err);
|
150
|
+
this._closedErr = (0, bindingutilities_1.translateCppError)(err);
|
151
151
|
callback(this._closedErr);
|
152
152
|
this._connectWaiters.forEach((waitFn) => waitFn());
|
153
153
|
this._connectWaiters = [];
|
@@ -162,7 +162,7 @@ class Connection {
|
|
162
162
|
selectBucket(bucketName, callback) {
|
163
163
|
this._inst.selectBucket(bucketName, (err) => {
|
164
164
|
if (err) {
|
165
|
-
return callback(bindingutilities_1.translateCppError(err));
|
165
|
+
return callback((0, bindingutilities_1.translateCppError)(err));
|
166
166
|
}
|
167
167
|
this._opened = true;
|
168
168
|
callback(null);
|
@@ -245,7 +245,7 @@ class Connection {
|
|
245
245
|
return callback(this._closedErr);
|
246
246
|
}
|
247
247
|
wrappedArgs.push((err, ...cbArgs) => {
|
248
|
-
const translatedErr = bindingutilities_1.translateCppError(err);
|
248
|
+
const translatedErr = (0, bindingutilities_1.translateCppError)(err);
|
249
249
|
callback.apply(undefined, [translatedErr, ...cbArgs]);
|
250
250
|
});
|
251
251
|
fn.apply(thisArg, wrappedArgs);
|
package/dist/connspec.js
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
"use strict";
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
3
|
if (k2 === undefined) k2 = k;
|
4
|
-
Object.
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
5
9
|
}) : (function(o, m, k, k2) {
|
6
10
|
if (k2 === undefined) k2 = k;
|
7
11
|
o[k2] = m[k];
|
package/dist/couchbase.js
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
"use strict";
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
3
|
if (k2 === undefined) k2 = k;
|
4
|
-
Object.
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
5
9
|
}) : (function(o, m, k, k2) {
|
6
10
|
if (k2 === undefined) k2 = k;
|
7
11
|
o[k2] = m[k];
|
package/dist/httpexecutor.d.ts
CHANGED
package/dist/httpexecutor.js
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
"use strict";
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
3
|
if (k2 === undefined) k2 = k;
|
4
|
-
Object.
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
5
9
|
}) : (function(o, m, k, k2) {
|
6
10
|
if (k2 === undefined) k2 = k;
|
7
11
|
o[k2] = m[k];
|
package/dist/logging.js
CHANGED
@@ -45,7 +45,7 @@ var LogSeverity;
|
|
45
45
|
/**
|
46
46
|
* @internal
|
47
47
|
*/
|
48
|
-
const libLogger = debug_1.default('couchnode');
|
48
|
+
const libLogger = (0, debug_1.default)('couchnode');
|
49
49
|
exports.libLogger = libLogger;
|
50
50
|
const lcbLogger = libLogger.extend('lcb');
|
51
51
|
const severityLoggers = {
|
package/dist/queryexecutor.js
CHANGED
@@ -52,7 +52,7 @@ class QueryExecutor {
|
|
52
52
|
queryObj.pipeline_cap = options.pipelineCap.toString();
|
53
53
|
}
|
54
54
|
if (options.scanWait) {
|
55
|
-
queryObj.scan_wait = utilities_1.msToGoDurationStr(options.scanWait);
|
55
|
+
queryObj.scan_wait = (0, utilities_1.msToGoDurationStr)(options.scanWait);
|
56
56
|
}
|
57
57
|
if (options.scanCap) {
|
58
58
|
queryObj.scan_cap = options.scanCap.toString();
|
@@ -115,8 +115,8 @@ class QueryExecutor {
|
|
115
115
|
if (metaData.metrics) {
|
116
116
|
const metricsData = metaData.metrics;
|
117
117
|
metrics = new querytypes_1.QueryMetrics({
|
118
|
-
elapsedTime: utilities_1.goDurationStrToMs(metricsData.elapsedTime) || 0,
|
119
|
-
executionTime: utilities_1.goDurationStrToMs(metricsData.executionTime) || 0,
|
118
|
+
elapsedTime: (0, utilities_1.goDurationStrToMs)(metricsData.elapsedTime) || 0,
|
119
|
+
executionTime: (0, utilities_1.goDurationStrToMs)(metricsData.executionTime) || 0,
|
120
120
|
sortCount: metricsData.sortCount || 0,
|
121
121
|
resultCount: metricsData.resultCount || 0,
|
122
122
|
resultSize: metricsData.resultSize || 0,
|
@@ -188,7 +188,7 @@ class SearchIndexManager {
|
|
188
188
|
if (res.statusCode !== 200) {
|
189
189
|
throw new Error('failed to get search indexed documents count');
|
190
190
|
}
|
191
|
-
return JSON.parse(res.body.toString());
|
191
|
+
return JSON.parse(res.body.toString()).count;
|
192
192
|
}, callback);
|
193
193
|
}
|
194
194
|
/**
|
package/dist/usermanager.js
CHANGED
@@ -406,7 +406,7 @@ class UserManager {
|
|
406
406
|
method: httpexecutor_1.HttpMethod.Put,
|
407
407
|
path: `/settings/rbac/users/${domainName}/${user.username}`,
|
408
408
|
contentType: 'application/x-www-form-urlencoded',
|
409
|
-
body: utilities_1.cbQsStringify(userData),
|
409
|
+
body: (0, utilities_1.cbQsStringify)(userData),
|
410
410
|
parentSpan: parentSpan,
|
411
411
|
timeout: timeout,
|
412
412
|
});
|
@@ -577,7 +577,7 @@ class UserManager {
|
|
577
577
|
method: httpexecutor_1.HttpMethod.Put,
|
578
578
|
path: `/settings/rbac/groups/${group.name}`,
|
579
579
|
contentType: 'application/x-www-form-urlencoded',
|
580
|
-
body: utilities_1.cbQsStringify(groupData),
|
580
|
+
body: (0, utilities_1.cbQsStringify)(groupData),
|
581
581
|
parentSpan: parentSpan,
|
582
582
|
timeout: timeout,
|
583
583
|
});
|
package/dist/utilities.d.ts
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
import { CppCas } from './binding';
|
2
1
|
import { DurabilityLevel } from './generaltypes';
|
3
2
|
/**
|
4
3
|
* CAS represents an opaque value which can be used to compare documents to
|
@@ -6,7 +5,7 @@ import { DurabilityLevel } from './generaltypes';
|
|
6
5
|
*
|
7
6
|
* @category Key-Value
|
8
7
|
*/
|
9
|
-
export declare type Cas =
|
8
|
+
export declare type Cas = any;
|
10
9
|
/**
|
11
10
|
* Reprents a node-style callback which receives an optional error or result.
|
12
11
|
*
|
package/dist/utilities.js
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
"use strict";
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
3
|
if (k2 === undefined) k2 = k;
|
4
|
-
Object.
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
5
9
|
}) : (function(o, m, k, k2) {
|
6
10
|
if (k2 === undefined) k2 = k;
|
7
11
|
o[k2] = m[k];
|
@@ -123,7 +127,7 @@ function goDurationStrToMs(str) {
|
|
123
127
|
if (str === undefined) {
|
124
128
|
return undefined;
|
125
129
|
}
|
126
|
-
const duration = parse_duration_1.default(str);
|
130
|
+
const duration = (0, parse_duration_1.default)(str);
|
127
131
|
if (duration === null) {
|
128
132
|
return undefined;
|
129
133
|
}
|
@@ -161,6 +165,9 @@ exports.duraLevelToNsServerStr = duraLevelToNsServerStr;
|
|
161
165
|
* @internal
|
162
166
|
*/
|
163
167
|
function nsServerStrToDuraLevel(level) {
|
168
|
+
if (level === undefined) {
|
169
|
+
return generaltypes_1.DurabilityLevel.None;
|
170
|
+
}
|
164
171
|
if (level === 'none') {
|
165
172
|
return generaltypes_1.DurabilityLevel.None;
|
166
173
|
}
|
package/dist/viewexecutor.js
CHANGED
@@ -98,7 +98,7 @@ class ViewExecutor {
|
|
98
98
|
queryOpts.startkey_docid = options.idRange.start;
|
99
99
|
queryOpts.endkey_docid = options.idRange.end;
|
100
100
|
}
|
101
|
-
const queryData = utilities_1.cbQsStringify(queryOpts, { boolAsString: true });
|
101
|
+
const queryData = (0, utilities_1.cbQsStringify)(queryOpts, { boolAsString: true });
|
102
102
|
const lcbTimeout = options.timeout ? options.timeout * 1000 : undefined;
|
103
103
|
const emitter = new streamablepromises_1.StreamableRowPromise((rows, meta) => {
|
104
104
|
return new viewtypes_1.ViewResult({
|
package/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"bugs":{"url":"http://www.couchbase.com/issues/browse/JSCBC"},"description":"The official Couchbase Node.js Client Library.","engines":{"node":">=10.0.0"},"homepage":"http://www.couchbase.com/communities/nodejs","keywords":["couchbase","libcouchbase","memcached","nosql","json","document"],"main":"dist/couchbase.js","types":"dist/couchbase.d.ts","license":"Apache-2.0","name":"couchbase","dependencies":{"bindings":"^1.5.0","debug":"^4.3.
|
1
|
+
{"bugs":{"url":"http://www.couchbase.com/issues/browse/JSCBC"},"description":"The official Couchbase Node.js Client Library.","engines":{"node":">=10.0.0"},"homepage":"http://www.couchbase.com/communities/nodejs","keywords":["couchbase","libcouchbase","memcached","nosql","json","document"],"main":"dist/couchbase.js","types":"dist/couchbase.d.ts","license":"Apache-2.0","name":"couchbase","dependencies":{"bindings":"^1.5.0","debug":"^4.3.4","nan":"^2.17.0","parse-duration":"^1.0.2","prebuild-install":"^7.1.1"},"devDependencies":{"@trivago/prettier-plugin-sort-imports":"^3.4.0","@tsconfig/node10":"^1.0.9","@types/bindings":"^1.5.1","@types/debug":"^4.1.7","@types/node":"^18.11.9","@typescript-eslint/eslint-plugin":"^5.42.0","@typescript-eslint/parser":"^5.42.0","chai":"^4.3.6","eslint":"^8.26.0","eslint-config-prettier":"^8.5.0","eslint-plugin-jsdoc":"^39.6.2","eslint-plugin-mocha":"^10.1.0","eslint-plugin-node":"^11.1.0","expose-gc":"^1.0.0","mocha":"^10.1.0","npm-check-updates":"^16.3.16","nyc":"^15.1.0","prebuild":"^11.0.4","prettier":"^2.7.1","segfault-handler":"^1.3.0","semver":"^7.3.8","ts-mocha":"^10.0.0","ts-node":"^10.9.1","typedoc":"^0.23.20","typescript":"^4.8.4","uuid":"^9.0.0"},"repository":{"type":"git","url":"http://github.com/couchbase/couchnode.git"},"version":"3.2.6","config":{"native":false},"scripts":{"install":"prebuild-install || node-gyp rebuild","build":"node-gyp build && tsc","rebuild":"node-gyp rebuild && tsc","prebuild":"prebuild --verbose --strip","prepare":"tsc","build-docs":"typedoc","test":"ts-mocha test/*.test.*","test-fast":"ts-mocha test/*.test.* -ig '(slow)'","cover":"nyc ts-mocha test/*.test.*","cover-fast":"nyc ts-mocha test/*.test.* -ig '(slow)'","lint":"eslint ./lib/ ./test/","check-deps":"ncu"}}
|
package/src/uv-plugin-all.cpp
CHANGED
package/dist/cas.d.ts
DELETED
File without changes
|
package/dist/cas.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";
|