@mongosh/shell-api 2.1.0 → 2.1.3

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.
Files changed (57) hide show
  1. package/lib/abstract-cursor.js +176 -132
  2. package/lib/abstract-cursor.js.map +1 -1
  3. package/lib/aggregate-or-find-cursor.js +102 -51
  4. package/lib/aggregate-or-find-cursor.js.map +1 -1
  5. package/lib/aggregation-cursor.js +59 -13
  6. package/lib/aggregation-cursor.js.map +1 -1
  7. package/lib/bulk.js +248 -197
  8. package/lib/bulk.js.map +1 -1
  9. package/lib/change-stream-cursor.js +145 -101
  10. package/lib/change-stream-cursor.js.map +1 -1
  11. package/lib/collection.d.ts +2 -1
  12. package/lib/collection.js +1185 -1245
  13. package/lib/collection.js.map +1 -1
  14. package/lib/cursor.js +238 -203
  15. package/lib/cursor.js.map +1 -1
  16. package/lib/database.js +1180 -1206
  17. package/lib/database.js.map +1 -1
  18. package/lib/dbquery.js +68 -22
  19. package/lib/dbquery.js.map +1 -1
  20. package/lib/decorators.d.ts +39 -13
  21. package/lib/decorators.js +34 -34
  22. package/lib/decorators.js.map +1 -1
  23. package/lib/explainable-cursor.js +66 -20
  24. package/lib/explainable-cursor.js.map +1 -1
  25. package/lib/explainable.js +214 -179
  26. package/lib/explainable.js.map +1 -1
  27. package/lib/field-level-encryption.js +286 -235
  28. package/lib/field-level-encryption.js.map +1 -1
  29. package/lib/helpers.js.map +1 -1
  30. package/lib/interruptor.js.map +1 -1
  31. package/lib/log-entry.js.map +1 -1
  32. package/lib/mongo-errors.js.map +1 -1
  33. package/lib/mongo.d.ts +1 -1
  34. package/lib/mongo.js +582 -547
  35. package/lib/mongo.js.map +1 -1
  36. package/lib/plan-cache.js +108 -64
  37. package/lib/plan-cache.js.map +1 -1
  38. package/lib/replica-set.js +290 -277
  39. package/lib/replica-set.js.map +1 -1
  40. package/lib/result.js +228 -91
  41. package/lib/result.js.map +1 -1
  42. package/lib/run-command-cursor.js +59 -13
  43. package/lib/run-command-cursor.js.map +1 -1
  44. package/lib/session.js +123 -76
  45. package/lib/session.js.map +1 -1
  46. package/lib/shard.js +507 -514
  47. package/lib/shard.js.map +1 -1
  48. package/lib/shell-api.d.ts +1 -0
  49. package/lib/shell-api.js +313 -260
  50. package/lib/shell-api.js.map +1 -1
  51. package/lib/shell-bson.js.map +1 -1
  52. package/lib/shell-instance-state.js.map +1 -1
  53. package/lib/stream-processor.js +139 -92
  54. package/lib/stream-processor.js.map +1 -1
  55. package/lib/streams.js +158 -110
  56. package/lib/streams.js.map +1 -1
  57. package/package.json +8 -8
@@ -1,9 +1,41 @@
1
1
  "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
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 = class ChangeStreamCursor extends decorators_1.ShellApiWithMongoClass {
15
- constructor(cursor, on, mongo) {
16
- super();
17
- this._currentIterationResult = null;
18
- this._cursor = cursor;
19
- this._on = on;
20
- this._mongo = mongo;
21
- }
22
- async _it() {
23
- if (this._cursor.closed) {
24
- throw new errors_1.MongoshRuntimeError('ChangeStreamCursor is closed');
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
- const result = (this._currentIterationResult = new result_1.CursorIterationResult());
27
- return (0, helpers_1.iterate)(result, this, await this._mongo._displayBatchSize());
28
- }
29
- [enums_1.asPrintable]() {
30
- return `ChangeStreamCursor on ${this._on}`;
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
- return this._cursor.tryNext();
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
- isClosed() {
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
- return count;
67
- }
68
- async next() {
69
- 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 ' +
70
- 'any documents without waiting.');
71
- return this._cursor.next();
72
- }
73
- getResumeToken() {
74
- return this._cursor.resumeToken;
75
- }
76
- map() {
77
- throw new errors_1.MongoshUnimplementedError('Cannot call map on a change stream cursor');
78
- }
79
- forEach() {
80
- throw new errors_1.MongoshUnimplementedError('Cannot call forEach on a change stream cursor');
81
- }
82
- toArray() {
83
- throw new errors_1.MongoshUnimplementedError('Cannot call toArray on a change stream cursor');
84
- }
85
- objsLeftInBatch() {
86
- throw new errors_1.MongoshUnimplementedError('Cannot call objsLeftInBatch on a change stream cursor');
87
- }
88
- pretty() {
89
- return this;
90
- }
91
- };
92
- __decorate([
93
- decorators_1.returnsPromise
94
- ], ChangeStreamCursor.prototype, "close", null);
95
- __decorate([
96
- decorators_1.returnsPromise,
97
- decorators_1.deprecated
98
- ], ChangeStreamCursor.prototype, "hasNext", null);
99
- __decorate([
100
- decorators_1.returnsPromise
101
- ], ChangeStreamCursor.prototype, "tryNext", null);
102
- __decorate([
103
- decorators_1.returnsPromise
104
- ], ChangeStreamCursor.prototype, "itcount", null);
105
- __decorate([
106
- decorators_1.returnsPromise
107
- ], ChangeStreamCursor.prototype, "next", null);
108
- __decorate([
109
- (0, decorators_1.returnType)('ChangeStreamCursor')
110
- ], ChangeStreamCursor.prototype, "pretty", null);
111
- ChangeStreamCursor = __decorate([
112
- decorators_1.shellApiClassDefault
113
- ], ChangeStreamCursor);
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":";;;;;;;;AAAA,6CAMsB;AAMtB,qCAAiD;AACjD,mCAAsC;AACtC,4CAIyB;AACzB,uCAAoC;AAIrB,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,mCAAsB;IAMpE,YAAY,MAA8B,EAAE,EAAU,EAAE,KAAY;QAClE,KAAK,EAAE,CAAC;QAJV,4BAAuB,GAAiC,IAAI,CAAC;QAK3D,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;QACd,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IAED,KAAK,CAAC,GAAG;QACP,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;YACvB,MAAM,IAAI,4BAAmB,CAAC,8BAA8B,CAAC,CAAC;SAC/D;QACD,MAAM,MAAM,GAAG,CAAC,IAAI,CAAC,uBAAuB,GAAG,IAAI,8BAAqB,EAAE,CAAC,CAAC;QAC5E,OAAO,IAAA,iBAAO,EAAC,MAAM,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE,CAAC,CAAC;IACtE,CAAC;IAKD,CAAC,mBAAW,CAAC;QACX,OAAO,yBAAyB,IAAI,CAAC,GAAG,EAAE,CAAC;IAC7C,CAAC;IAGK,AAAN,KAAK,CAAC,KAAK;QACT,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IAC7B,CAAC;IAIK,AAAN,KAAK,CAAC,OAAO;QACX,MAAM,IAAI,CAAC,cAAc,CAAC,YAAY,CACpC,wGAAwG;YACtG,oCAAoC,CACvC,CAAC;QACF,OAAO,IAAI,CAAC,OAAO,CAA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,CAAC,OAAO;YACX,IAAI,KAAK,GAAG,CAAC,CAAC;YACd,OAAO,MAAM,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC;gBAC5B,KAAK,EAAE,CAAC;YACV,CAAC;YACD,OAAO,KAAK,CAAC;QACf,CAAC;QAGD,KAAK,CAAC,IAAI;YACR,MAAM,IAAI,CAAC,cAAc,CAAC,YAAY,CACpC,yGAAyG;gBACvG,gCAAgC,CACnC,CAAC;YACF,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QAC7B,CAAC;QAED,cAAc;YACZ,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC;QAClC,CAAC;QAED,GAAG;YACD,MAAM,IAAI,kCAAyB,CACjC,2CAA2C,CAC5C,CAAC;QACJ,CAAC;QACD,OAAO;YACL,MAAM,IAAI,kCAAyB,CACjC,+CAA+C,CAChD,CAAC;QACJ,CAAC;QACD,OAAO;YACL,MAAM,IAAI,kCAAyB,CACjC,+CAA+C,CAChD,CAAC;QACJ,CAAC;QACD,eAAe;YACb,MAAM,IAAI,kCAAyB,CACjC,uDAAuD,CACxD,CAAC;QACJ,CAAC;QAGD,MAAM;YACJ,OAAO,IAAI,CAAC;QACd,CAAC;;;;;;+BA9CA,2BAAc;4BASd,2BAAc;8BAkCd,IAAA,uBAAU,EAAC,oBAAoB,CAAC;QAtFjC,wKAAM,KAAK,6DAEV;QAID,8KAAM,OAAO,6DAMZ;QAGD,8KAAM,OAAO,6DAKZ;QAwBD,8KAAM,OAAO,6DAMZ;QAGD,qKAAM,IAAI,6DAMT;QA4BD,2KAAA,MAAM,6DAEL;QAtHH,6KAuHC;;;QAvHoB,uDAAkB"}
@@ -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>;