couchbase 3.2.2 → 3.2.5
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 +1 -1
- package/deps/lcb/CONTRIBUTING.md +1 -1
- package/deps/lcb/README.markdown +2 -2
- package/deps/lcb/RELEASE_NOTES.markdown +84 -17
- package/deps/lcb/cmake/Modules/GetVersionInfo.cmake +1 -1
- package/deps/lcb/contrib/cbsasl/src/scram-sha/scram_utils.cc +22 -26
- package/deps/lcb/contrib/lcb-jsoncpp/lcb-jsoncpp.cpp +20 -6
- package/deps/lcb/doc/Doxyfile +1 -1
- package/deps/lcb/example/minimal/query.c +9 -7
- package/deps/lcb/gyp_config/common/libcouchbase/configuration.h +3 -3
- package/deps/lcb/gyp_config/linux/arm64/config.h +243 -0
- package/deps/lcb/include/libcouchbase/couchbase.h +55 -1
- package/deps/lcb/include/libcouchbase/error.h +6 -1
- package/deps/lcb/include/libcouchbase/ixmgmt.h +15 -10
- package/deps/lcb/include/libcouchbase/tracing.h +2 -2
- package/deps/lcb/include/memcached/protocol_binary.h +21 -0
- package/deps/lcb/libcouchbase.gyp +353 -349
- package/deps/lcb/packaging/deb/control +1 -1
- package/deps/lcb/src/analytics/analytics_handle.cc +7 -5
- package/deps/lcb/src/analytics/analytics_handle.hh +28 -0
- package/deps/lcb/src/capi/cmd_counter.hh +18 -0
- package/deps/lcb/src/capi/cmd_exists.hh +18 -0
- package/deps/lcb/src/capi/cmd_get.hh +17 -0
- package/deps/lcb/src/capi/cmd_get_replica.hh +20 -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 +18 -0
- package/deps/lcb/src/capi/cmd_search.hh +6 -0
- package/deps/lcb/src/capi/cmd_store.hh +28 -21
- package/deps/lcb/src/capi/cmd_subdoc.hh +30 -0
- package/deps/lcb/src/capi/cmd_touch.hh +18 -0
- package/deps/lcb/src/capi/cmd_unlock.hh +18 -0
- package/deps/lcb/src/capi/cmd_view.hh +6 -0
- package/deps/lcb/src/capi/collection_qualifier.hh +6 -8
- package/deps/lcb/src/cntl.cc +42 -8
- package/deps/lcb/src/dns-srv.cc +5 -3
- package/deps/lcb/src/errmap.cc +5 -9
- package/deps/lcb/src/errmap.h +7 -3
- package/deps/lcb/src/handler.cc +24 -18
- package/deps/lcb/src/internal.h +2 -1
- package/deps/lcb/src/lcbio/ctx.cc +4 -2
- package/deps/lcb/src/mcserver/mcserver.cc +8 -5
- package/deps/lcb/src/mcserver/negotiate.cc +42 -17
- package/deps/lcb/src/n1ql/ixmgmt.cc +1 -2
- package/deps/lcb/src/n1ql/n1ql.cc +5 -1
- package/deps/lcb/src/n1ql/query_handle.cc +80 -44
- package/deps/lcb/src/n1ql/query_handle.hh +41 -3
- package/deps/lcb/src/operations/counter.cc +13 -1
- package/deps/lcb/src/operations/exists.cc +14 -2
- package/deps/lcb/src/operations/get.cc +14 -2
- package/deps/lcb/src/operations/get_replica.cc +18 -6
- package/deps/lcb/src/operations/observe.cc +1 -1
- package/deps/lcb/src/operations/remove.cc +13 -1
- package/deps/lcb/src/operations/store.cc +13 -1
- package/deps/lcb/src/operations/subdoc.cc +13 -2
- package/deps/lcb/src/operations/touch.cc +14 -2
- package/deps/lcb/src/operations/unlock.cc +14 -2
- package/deps/lcb/src/search/search_handle.cc +26 -8
- package/deps/lcb/src/search/search_handle.hh +29 -0
- package/deps/lcb/src/ssl/ssl_common.c +7 -8
- package/deps/lcb/src/tracing/span.cc +43 -10
- package/deps/lcb/src/tracing/tracing-internal.h +105 -93
- package/deps/lcb/src/utilities.cc +21 -0
- package/deps/lcb/src/utilities.h +3 -0
- package/deps/lcb/src/views/view_handle.cc +13 -5
- package/deps/lcb/src/views/view_handle.hh +29 -0
- package/deps/lcb/tests/CMakeLists.txt +21 -0
- package/deps/lcb/tests/basic/t_ctlcodes.cc +24 -3
- package/deps/lcb/tests/basic/t_jsparse.cc +8 -0
- package/deps/lcb/tests/iotests/mock-environment.cc +25 -1
- package/deps/lcb/tests/iotests/mock-environment.h +49 -1
- package/deps/lcb/tests/iotests/mock-unit-test.cc +96 -5
- package/deps/lcb/tests/iotests/mock-unit-test.h +32 -0
- package/deps/lcb/tests/iotests/serverparams.h +7 -2
- package/deps/lcb/tests/iotests/t_collections.cc +1 -1
- package/deps/lcb/tests/iotests/t_confmon.cc +4 -2
- package/deps/lcb/tests/iotests/t_get.cc +14 -4
- package/deps/lcb/tests/iotests/t_n1ql.cc +17 -1
- package/deps/lcb/tests/iotests/t_ratelimit.cc +729 -0
- package/deps/lcb/tests/iotests/t_views.cc +1 -0
- package/deps/lcb/tests/iotests/testutil.cc +342 -0
- package/deps/lcb/tests/iotests/testutil.h +164 -0
- package/deps/lcb/tests/mocksupport/procutil.c +32 -28
- package/deps/lcb/tests/mocksupport/server.c +0 -1
- package/deps/lcb/tools/cbc.cc +7 -0
- package/dist/analyticsexecutor.js +2 -2
- package/dist/analyticsindexmanager.js +512 -524
- package/dist/binarycollection.d.ts +17 -0
- package/dist/binding.d.ts +2 -0
- package/dist/binding.js +1 -1
- package/dist/bindingutilities.js +9 -1
- package/dist/bucketmanager.d.ts +32 -23
- package/dist/bucketmanager.js +197 -189
- package/dist/cluster.js +37 -36
- package/dist/collection.js +17 -23
- package/dist/collectionmanager.js +181 -200
- package/dist/connection.js +6 -3
- package/dist/connspec.js +5 -1
- package/dist/couchbase.js +7 -14
- package/dist/datastructures.js +239 -310
- package/dist/diagnosticsexecutor.js +70 -85
- package/dist/errors.d.ts +18 -0
- package/dist/errors.js +26 -2
- package/dist/eventingfunctionmanager.js +267 -294
- package/dist/httpexecutor.js +31 -38
- package/dist/logging.js +1 -1
- package/dist/queryexecutor.js +3 -3
- package/dist/queryindexmanager.js +236 -263
- package/dist/scope.js +8 -2
- package/dist/searchexecutor.js +3 -0
- package/dist/searchindexmanager.js +240 -271
- package/dist/searchquery.d.ts +17 -0
- package/dist/searchquery.js +22 -1
- package/dist/searchtypes.d.ts +7 -2
- package/dist/searchtypes.js +2 -2
- package/dist/usermanager.js +250 -263
- package/dist/utilities.d.ts +3 -2
- package/dist/utilities.js +16 -4
- package/dist/viewexecutor.js +1 -1
- package/dist/viewindexmanager.js +131 -150
- package/package.json +1 -1
- package/src/connection.cpp +2 -0
- package/src/constants.cpp +2 -0
- package/src/instance.cpp +8 -1
- package/src/instance.h +1 -0
- package/src/uv-plugin-all.cpp +1 -0
- package/dist/cas.d.ts +0 -0
- package/dist/cas.js +0 -1
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];
|
@@ -18,15 +22,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
18
22
|
__setModuleDefault(result, mod);
|
19
23
|
return result;
|
20
24
|
};
|
21
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
22
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
23
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
24
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
25
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
26
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
27
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
28
|
-
});
|
29
|
-
};
|
30
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
31
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
32
27
|
};
|
@@ -127,35 +122,33 @@ class HttpExecutor {
|
|
127
122
|
});
|
128
123
|
return emitter;
|
129
124
|
}
|
130
|
-
request(options) {
|
131
|
-
return
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
headers[headerName] += ',' + headerValue;
|
148
|
-
}
|
149
|
-
else {
|
150
|
-
headers[headerName] = headerValue;
|
151
|
-
}
|
125
|
+
async request(options) {
|
126
|
+
return new Promise((resolve, reject) => {
|
127
|
+
const emitter = this.streamRequest(options);
|
128
|
+
emitter.on('error', (err) => {
|
129
|
+
reject(err);
|
130
|
+
});
|
131
|
+
let dataCache = Buffer.allocUnsafe(0);
|
132
|
+
emitter.on('data', (data) => {
|
133
|
+
dataCache = Buffer.concat([dataCache, data]);
|
134
|
+
});
|
135
|
+
emitter.on('end', (meta) => {
|
136
|
+
const headers = {};
|
137
|
+
for (let i = 0; i < meta.headers.length; i += 2) {
|
138
|
+
const headerName = meta.headers[i + 0];
|
139
|
+
const headerValue = meta.headers[i + 1];
|
140
|
+
if (headers[headerName]) {
|
141
|
+
headers[headerName] += ',' + headerValue;
|
152
142
|
}
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
143
|
+
else {
|
144
|
+
headers[headerName] = headerValue;
|
145
|
+
}
|
146
|
+
}
|
147
|
+
resolve({
|
148
|
+
requestOptions: options,
|
149
|
+
statusCode: meta.statusCode,
|
150
|
+
headers: headers,
|
151
|
+
body: dataCache,
|
159
152
|
});
|
160
153
|
});
|
161
154
|
});
|
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,
|