@mongosh/shell-api 2.1.1 → 2.1.4
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/AUTHORS +1 -0
- package/lib/abstract-cursor.js +176 -132
- package/lib/abstract-cursor.js.map +1 -1
- package/lib/aggregate-or-find-cursor.js +102 -51
- package/lib/aggregate-or-find-cursor.js.map +1 -1
- package/lib/aggregation-cursor.js +59 -13
- package/lib/aggregation-cursor.js.map +1 -1
- package/lib/bulk.js +248 -197
- package/lib/bulk.js.map +1 -1
- package/lib/change-stream-cursor.js +145 -101
- package/lib/change-stream-cursor.js.map +1 -1
- package/lib/collection.d.ts +2 -1
- package/lib/collection.js +1185 -1245
- package/lib/collection.js.map +1 -1
- package/lib/cursor.js +238 -203
- package/lib/cursor.js.map +1 -1
- package/lib/database.js +1189 -1206
- package/lib/database.js.map +1 -1
- package/lib/dbquery.js +68 -22
- package/lib/dbquery.js.map +1 -1
- package/lib/decorators.d.ts +39 -13
- package/lib/decorators.js +34 -34
- package/lib/decorators.js.map +1 -1
- package/lib/explainable-cursor.js +66 -20
- package/lib/explainable-cursor.js.map +1 -1
- package/lib/explainable.js +214 -179
- package/lib/explainable.js.map +1 -1
- package/lib/field-level-encryption.js +286 -235
- package/lib/field-level-encryption.js.map +1 -1
- package/lib/helpers.d.ts +9 -1
- package/lib/helpers.js +24 -17
- package/lib/helpers.js.map +1 -1
- package/lib/interruptor.js.map +1 -1
- package/lib/log-entry.js.map +1 -1
- package/lib/mongo-errors.js +3 -1
- package/lib/mongo-errors.js.map +1 -1
- package/lib/mongo.js +581 -547
- package/lib/mongo.js.map +1 -1
- package/lib/plan-cache.js +108 -64
- package/lib/plan-cache.js.map +1 -1
- package/lib/replica-set.js +290 -277
- package/lib/replica-set.js.map +1 -1
- package/lib/result.js +228 -91
- package/lib/result.js.map +1 -1
- package/lib/run-command-cursor.js +59 -13
- package/lib/run-command-cursor.js.map +1 -1
- package/lib/session.js +123 -76
- package/lib/session.js.map +1 -1
- package/lib/shard.js +507 -514
- package/lib/shard.js.map +1 -1
- package/lib/shell-api.js +313 -268
- package/lib/shell-api.js.map +1 -1
- package/lib/shell-bson.js.map +1 -1
- package/lib/shell-instance-state.js.map +1 -1
- package/lib/stream-processor.js +139 -92
- package/lib/stream-processor.js.map +1 -1
- package/lib/streams.js +158 -110
- package/lib/streams.js.map +1 -1
- package/package.json +10 -10
|
@@ -1,9 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
3
|
+
var useValue = arguments.length > 2;
|
|
4
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
5
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
6
|
+
}
|
|
7
|
+
return useValue ? value : void 0;
|
|
8
|
+
};
|
|
9
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
10
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
11
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
12
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
13
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
14
|
+
var _, done = false;
|
|
15
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
16
|
+
var context = {};
|
|
17
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
18
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
19
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
20
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
21
|
+
if (kind === "accessor") {
|
|
22
|
+
if (result === void 0) continue;
|
|
23
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
24
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
25
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
26
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
27
|
+
}
|
|
28
|
+
else if (_ = accept(result)) {
|
|
29
|
+
if (kind === "field") initializers.unshift(_);
|
|
30
|
+
else descriptor[key] = _;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
34
|
+
done = true;
|
|
35
|
+
};
|
|
36
|
+
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
|
|
37
|
+
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
38
|
+
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
7
39
|
};
|
|
8
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
41
|
const decorators_1 = require("./decorators");
|
|
@@ -11,105 +43,117 @@ const result_1 = require("./result");
|
|
|
11
43
|
const enums_1 = require("./enums");
|
|
12
44
|
const errors_1 = require("@mongosh/errors");
|
|
13
45
|
const helpers_1 = require("./helpers");
|
|
14
|
-
let ChangeStreamCursor =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
46
|
+
let ChangeStreamCursor = (() => {
|
|
47
|
+
let _classDecorators = [decorators_1.shellApiClassDefault];
|
|
48
|
+
let _classDescriptor;
|
|
49
|
+
let _classExtraInitializers = [];
|
|
50
|
+
let _classThis;
|
|
51
|
+
let _classSuper = decorators_1.ShellApiWithMongoClass;
|
|
52
|
+
let _instanceExtraInitializers = [];
|
|
53
|
+
let _close_decorators;
|
|
54
|
+
let _hasNext_decorators;
|
|
55
|
+
let _tryNext_decorators;
|
|
56
|
+
let _itcount_decorators;
|
|
57
|
+
let _next_decorators;
|
|
58
|
+
let _pretty_decorators;
|
|
59
|
+
var ChangeStreamCursor = _classThis = class extends _classSuper {
|
|
60
|
+
constructor(cursor, on, mongo) {
|
|
61
|
+
super();
|
|
62
|
+
this._mongo = (__runInitializers(this, _instanceExtraInitializers), void 0);
|
|
63
|
+
this._currentIterationResult = null;
|
|
64
|
+
this._cursor = cursor;
|
|
65
|
+
this._on = on;
|
|
66
|
+
this._mongo = mongo;
|
|
25
67
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
async close() {
|
|
33
|
-
await this._cursor.close();
|
|
34
|
-
}
|
|
35
|
-
async hasNext() {
|
|
36
|
-
await this._instanceState.printWarning('If there are no documents in the batch, hasNext will block. Use tryNext if you want to check if there ' +
|
|
37
|
-
'are any documents without waiting.');
|
|
38
|
-
return this._cursor.hasNext();
|
|
39
|
-
}
|
|
40
|
-
async tryNext() {
|
|
41
|
-
if (this._cursor.closed) {
|
|
42
|
-
throw new errors_1.MongoshRuntimeError('Cannot call tryNext on closed cursor');
|
|
68
|
+
async _it() {
|
|
69
|
+
if (this._cursor.closed) {
|
|
70
|
+
throw new errors_1.MongoshRuntimeError('ChangeStreamCursor is closed');
|
|
71
|
+
}
|
|
72
|
+
const result = (this._currentIterationResult = new result_1.CursorIterationResult());
|
|
73
|
+
return (0, helpers_1.iterate)(result, this, await this._mongo._displayBatchSize());
|
|
43
74
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
get [Symbol.for('@@mongosh.syntheticAsyncIterable')]() {
|
|
47
|
-
return true;
|
|
48
|
-
}
|
|
49
|
-
async *[Symbol.asyncIterator]() {
|
|
50
|
-
let doc;
|
|
51
|
-
while ((doc = await this.tryNext()) !== null) {
|
|
52
|
-
yield doc;
|
|
75
|
+
[enums_1.asPrintable]() {
|
|
76
|
+
return `ChangeStreamCursor on ${this._on}`;
|
|
53
77
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
return this._cursor.closed;
|
|
57
|
-
}
|
|
58
|
-
isExhausted() {
|
|
59
|
-
throw new errors_1.MongoshInvalidInputError('isExhausted is not implemented for ChangeStreams because after closing a cursor, the remaining documents in the batch are no longer accessible. If you want to see if the cursor is closed use isClosed. If you want to see if there are documents left in the batch, use tryNext.');
|
|
60
|
-
}
|
|
61
|
-
async itcount() {
|
|
62
|
-
let count = 0;
|
|
63
|
-
while (await this.tryNext()) {
|
|
64
|
-
count++;
|
|
78
|
+
async close() {
|
|
79
|
+
await this._cursor.close();
|
|
65
80
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
81
|
+
async hasNext() {
|
|
82
|
+
await this._instanceState.printWarning('If there are no documents in the batch, hasNext will block. Use tryNext if you want to check if there ' +
|
|
83
|
+
'are any documents without waiting.');
|
|
84
|
+
return this._cursor.hasNext();
|
|
85
|
+
}
|
|
86
|
+
async tryNext() {
|
|
87
|
+
if (this._cursor.closed) {
|
|
88
|
+
throw new errors_1.MongoshRuntimeError('Cannot call tryNext on closed cursor');
|
|
89
|
+
}
|
|
90
|
+
return this._cursor.tryNext();
|
|
91
|
+
}
|
|
92
|
+
get [(_close_decorators = [decorators_1.returnsPromise], _hasNext_decorators = [decorators_1.returnsPromise, decorators_1.deprecated], _tryNext_decorators = [decorators_1.returnsPromise], Symbol.for('@@mongosh.syntheticAsyncIterable'))]() {
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
async *[Symbol.asyncIterator]() {
|
|
96
|
+
let doc;
|
|
97
|
+
while ((doc = await this.tryNext()) !== null) {
|
|
98
|
+
yield doc;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
isClosed() {
|
|
102
|
+
return this._cursor.closed;
|
|
103
|
+
}
|
|
104
|
+
isExhausted() {
|
|
105
|
+
throw new errors_1.MongoshInvalidInputError('isExhausted is not implemented for ChangeStreams because after closing a cursor, the remaining documents in the batch are no longer accessible. If you want to see if the cursor is closed use isClosed. If you want to see if there are documents left in the batch, use tryNext.');
|
|
106
|
+
}
|
|
107
|
+
async itcount() {
|
|
108
|
+
let count = 0;
|
|
109
|
+
while (await this.tryNext()) {
|
|
110
|
+
count++;
|
|
111
|
+
}
|
|
112
|
+
return count;
|
|
113
|
+
}
|
|
114
|
+
async next() {
|
|
115
|
+
await this._instanceState.printWarning('If there are no documents in the batch, next will block. Use tryNext if you want to check if there are ' +
|
|
116
|
+
'any documents without waiting.');
|
|
117
|
+
return this._cursor.next();
|
|
118
|
+
}
|
|
119
|
+
getResumeToken() {
|
|
120
|
+
return this._cursor.resumeToken;
|
|
121
|
+
}
|
|
122
|
+
map() {
|
|
123
|
+
throw new errors_1.MongoshUnimplementedError('Cannot call map on a change stream cursor');
|
|
124
|
+
}
|
|
125
|
+
forEach() {
|
|
126
|
+
throw new errors_1.MongoshUnimplementedError('Cannot call forEach on a change stream cursor');
|
|
127
|
+
}
|
|
128
|
+
toArray() {
|
|
129
|
+
throw new errors_1.MongoshUnimplementedError('Cannot call toArray on a change stream cursor');
|
|
130
|
+
}
|
|
131
|
+
objsLeftInBatch() {
|
|
132
|
+
throw new errors_1.MongoshUnimplementedError('Cannot call objsLeftInBatch on a change stream cursor');
|
|
133
|
+
}
|
|
134
|
+
pretty() {
|
|
135
|
+
return this;
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
__setFunctionName(_classThis, "ChangeStreamCursor");
|
|
139
|
+
(() => {
|
|
140
|
+
var _a;
|
|
141
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create((_a = _classSuper[Symbol.metadata]) !== null && _a !== void 0 ? _a : null) : void 0;
|
|
142
|
+
_itcount_decorators = [decorators_1.returnsPromise];
|
|
143
|
+
_next_decorators = [decorators_1.returnsPromise];
|
|
144
|
+
_pretty_decorators = [(0, decorators_1.returnType)('ChangeStreamCursor')];
|
|
145
|
+
__esDecorate(_classThis, null, _close_decorators, { kind: "method", name: "close", static: false, private: false, access: { has: obj => "close" in obj, get: obj => obj.close }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
146
|
+
__esDecorate(_classThis, null, _hasNext_decorators, { kind: "method", name: "hasNext", static: false, private: false, access: { has: obj => "hasNext" in obj, get: obj => obj.hasNext }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
147
|
+
__esDecorate(_classThis, null, _tryNext_decorators, { kind: "method", name: "tryNext", static: false, private: false, access: { has: obj => "tryNext" in obj, get: obj => obj.tryNext }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
148
|
+
__esDecorate(_classThis, null, _itcount_decorators, { kind: "method", name: "itcount", static: false, private: false, access: { has: obj => "itcount" in obj, get: obj => obj.itcount }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
149
|
+
__esDecorate(_classThis, null, _next_decorators, { kind: "method", name: "next", static: false, private: false, access: { has: obj => "next" in obj, get: obj => obj.next }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
150
|
+
__esDecorate(_classThis, null, _pretty_decorators, { kind: "method", name: "pretty", static: false, private: false, access: { has: obj => "pretty" in obj, get: obj => obj.pretty }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
151
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
152
|
+
ChangeStreamCursor = _classThis = _classDescriptor.value;
|
|
153
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
154
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
155
|
+
})();
|
|
156
|
+
return ChangeStreamCursor = _classThis;
|
|
157
|
+
})();
|
|
114
158
|
exports.default = ChangeStreamCursor;
|
|
115
159
|
//# sourceMappingURL=change-stream-cursor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"change-stream-cursor.js","sourceRoot":"","sources":["../src/change-stream-cursor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"change-stream-cursor.js","sourceRoot":"","sources":["../src/change-stream-cursor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAMsB;AAMtB,qCAAiD;AACjD,mCAAsC;AACtC,4CAIyB;AACzB,uCAAoC;;4BAGnC,iCAAoB;;;;sBAC2B,mCAAsB;;;;;;;;+CAA9B,SAAQ,WAAsB;QAMpE,YAAY,MAA8B,EAAE,EAAU,EAAE,KAAY;YAClE,KAAK,EAAE,CAAC;YANV,WAAM,iEAAQ;YAEd,4BAAuB,GAAiC,IAAI,CAAC;YAK3D,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;YACtB,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;YACd,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACtB,CAAC;QAED,KAAK,CAAC,GAAG;YACP,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.d.ts
CHANGED
|
@@ -96,9 +96,10 @@ export default class Collection extends ShellApiWithMongoClass {
|
|
|
96
96
|
configureQueryAnalyzer(options: Document): Promise<Document>;
|
|
97
97
|
checkMetadataConsistency(options?: CheckMetadataConsistencyOptions): Promise<RunCommandCursor>;
|
|
98
98
|
getSearchIndexes(indexName?: string | Document, options?: Document): Promise<Document[]>;
|
|
99
|
-
createSearchIndex(indexName?: string | Document, definition?: Document): Promise<string>;
|
|
99
|
+
createSearchIndex(indexName?: string | Document, type?: 'search' | 'vectorSearch' | Document, definition?: Document): Promise<string>;
|
|
100
100
|
createSearchIndexes(specs: {
|
|
101
101
|
name: string;
|
|
102
|
+
type?: 'search' | 'vectorSearch';
|
|
102
103
|
definition: Document;
|
|
103
104
|
}[]): Promise<string[]>;
|
|
104
105
|
dropSearchIndex(indexName: string): Promise<void>;
|