@mongosh/shell-api 3.22.0 → 3.24.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mongosh/shell-api",
3
- "version": "3.22.0",
3
+ "version": "3.24.0",
4
4
  "description": "MongoDB Shell API Classes Package",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -53,11 +53,12 @@
53
53
  "dependencies": {
54
54
  "@babel/core": "^7.26.10",
55
55
  "@babel/types": "^7.26.10",
56
- "@mongosh/arg-parser": "^3.18.0",
56
+ "@mongosh/arg-parser": "^3.20.0",
57
57
  "@mongosh/errors": "2.4.4",
58
- "@mongosh/history": "2.4.8",
59
- "@mongosh/i18n": "^2.15.4",
60
- "@mongosh/service-provider-core": "3.5.0",
58
+ "@mongosh/history": "2.4.9",
59
+ "@mongosh/i18n": "^2.17.0",
60
+ "@mongosh/service-provider-core": "3.6.1",
61
+ "@mongosh/shell-bson": "1.0.2",
61
62
  "mongodb-redact": "^1.1.5",
62
63
  "mongodb-schema": "^12.6.2"
63
64
  },
@@ -75,5 +76,5 @@
75
76
  "prettier": "^2.8.8",
76
77
  "semver": "^7.5.3"
77
78
  },
78
- "gitHead": "e019a30c3021026ff8db296171d7d7f68cdac05e"
79
+ "gitHead": "d6e3e2e3df785683c7a1c6b3a30765ea75c603fc"
79
80
  }
@@ -1,40 +0,0 @@
1
- import Help from './help';
2
- import type { BinaryType, Document } from '@mongosh/service-provider-core';
3
- import { bson as BSON } from '@mongosh/service-provider-core';
4
- type LongWithoutAccidentallyExposedMethods = Omit<typeof BSON.Long, 'fromExtendedJSON'>;
5
- interface ShellBsonBase {
6
- DBRef: (namespace: string, oid: any, db?: string, fields?: Document) => typeof BSON.DBRef.prototype;
7
- bsonsize: (object: any) => number;
8
- MaxKey: () => typeof BSON.MaxKey.prototype;
9
- MinKey: () => typeof BSON.MinKey.prototype;
10
- ObjectId: (id?: string | number | typeof BSON.ObjectId.prototype | Buffer) => typeof BSON.ObjectId.prototype;
11
- Timestamp: (t?: number | typeof BSON.Long.prototype | {
12
- t: number;
13
- i: number;
14
- }, i?: number) => typeof BSON.Timestamp.prototype;
15
- Code: (c?: string | Function, s?: any) => typeof BSON.Code.prototype;
16
- NumberDecimal: (s?: string) => typeof BSON.Decimal128.prototype;
17
- NumberInt: (v?: string) => typeof BSON.Int32.prototype;
18
- NumberLong: (s?: string | number) => typeof BSON.Long.prototype;
19
- ISODate: (input?: string) => Date;
20
- BinData: (subtype: number, b64string: string) => BinaryType;
21
- HexData: (subtype: number, hexstr: string) => BinaryType;
22
- UUID: (hexstr?: string) => BinaryType;
23
- MD5: (hexstr: string) => BinaryType;
24
- Decimal128: typeof BSON.Decimal128;
25
- BSONSymbol: typeof BSON.BSONSymbol;
26
- Int32: typeof BSON.Int32;
27
- Long: LongWithoutAccidentallyExposedMethods;
28
- Binary: typeof BSON.Binary;
29
- Double: typeof BSON.Double;
30
- EJSON: typeof BSON.EJSON;
31
- BSONRegExp: typeof BSON.BSONRegExp;
32
- }
33
- type WithHelp<T> = {
34
- [prop in keyof T]: T[prop] & {
35
- help?: () => Help;
36
- };
37
- };
38
- export type ShellBson = WithHelp<ShellBsonBase>;
39
- export default function constructShellBson(bson: typeof BSON, printWarning: (msg: string) => void): ShellBson;
40
- export {};
package/lib/shell-bson.js DELETED
@@ -1,233 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.default = constructShellBson;
7
- const enums_1 = require("./enums");
8
- const help_1 = __importDefault(require("./help"));
9
- const service_provider_core_1 = require("@mongosh/service-provider-core");
10
- const errors_1 = require("@mongosh/errors");
11
- const helpers_1 = require("./helpers");
12
- const crypto_1 = require("crypto");
13
- function constructHelp(className) {
14
- const classHelpKeyPrefix = `shell-api.classes.${className}.help`;
15
- const classHelp = {
16
- help: `${classHelpKeyPrefix}.description`,
17
- example: `${classHelpKeyPrefix}.example`,
18
- docs: `${classHelpKeyPrefix}.link`,
19
- attr: [],
20
- };
21
- return new help_1.default(classHelp);
22
- }
23
- function constructShellBson(bson, printWarning) {
24
- const bsonNames = [
25
- 'Binary',
26
- 'Code',
27
- 'DBRef',
28
- 'Decimal128',
29
- 'Double',
30
- 'Int32',
31
- 'Long',
32
- 'MaxKey',
33
- 'MinKey',
34
- 'ObjectId',
35
- 'Timestamp',
36
- 'BSONSymbol',
37
- 'BSONRegExp',
38
- ];
39
- if (bson === undefined) {
40
- bson = service_provider_core_1.bson;
41
- }
42
- const helps = {};
43
- bsonNames.forEach((className) => {
44
- if (!(className in bson)) {
45
- throw new errors_1.MongoshInternalError(`${className} does not exist in provided BSON package.`);
46
- }
47
- const proto = bson[className].prototype;
48
- proto.serverVersions = enums_1.ALL_SERVER_VERSIONS;
49
- proto.platforms = enums_1.ALL_PLATFORMS;
50
- proto.topologies = enums_1.ALL_TOPOLOGIES;
51
- const help = constructHelp(className);
52
- helps[className] = help;
53
- proto.help = () => help;
54
- Object.setPrototypeOf(proto.help, help);
55
- });
56
- bson.BSONSymbol.prototype.serverVersions = [
57
- enums_1.ServerVersions.earliest,
58
- '1.6.0',
59
- ];
60
- bson.BSONSymbol.prototype.deprecated = true;
61
- const bsonPkg = {
62
- DBRef: (0, helpers_1.assignAll)(function DBRef(namespace, oid, db, fields) {
63
- (0, helpers_1.assertArgsDefinedType)([namespace, oid, db], ['string', true, [undefined, 'string'], [undefined, 'object']], 'DBRef');
64
- return new bson.DBRef(namespace, oid, db, fields);
65
- }, (0, helpers_1.pickWithExactKeyMatch)(bson.DBRef, ['prototype'])),
66
- bsonsize: function bsonsize(object) {
67
- (0, helpers_1.assertArgsDefinedType)([object], ['object'], 'bsonsize');
68
- return bson.calculateObjectSize(object);
69
- },
70
- MaxKey: (0, helpers_1.assignAll)(function MaxKey() {
71
- return new bson.MaxKey();
72
- }, (0, helpers_1.pickWithExactKeyMatch)(bson.MaxKey, ['prototype']), { toBSON: () => new bson.MaxKey() }),
73
- MinKey: (0, helpers_1.assignAll)(function MinKey() {
74
- return new bson.MinKey();
75
- }, (0, helpers_1.pickWithExactKeyMatch)(bson.MinKey, ['prototype']), { toBSON: () => new bson.MinKey() }),
76
- ObjectId: (0, helpers_1.assignAll)(function ObjectId(id) {
77
- (0, helpers_1.assertArgsDefinedType)([id], [[undefined, 'string', 'number', 'object']], 'ObjectId');
78
- return new bson.ObjectId(id);
79
- }, (0, helpers_1.pickWithExactKeyMatch)(bson.ObjectId, ['prototype', 'cacheHexString', 'generate', 'createFromTime', 'createFromHexString', 'createFromBase64', 'isValid'])),
80
- Timestamp: (0, helpers_1.assignAll)(function Timestamp(t, i) {
81
- (0, helpers_1.assertArgsDefinedType)([t, i], [
82
- ['number', 'object', undefined],
83
- [undefined, 'number'],
84
- ], 'Timestamp');
85
- if (typeof t === 'object' && t !== null && 't' in t && 'i' in t) {
86
- return new bson.Timestamp(t);
87
- }
88
- else if (i !== undefined || typeof t === 'number') {
89
- return new bson.Timestamp({ t: t, i: i !== null && i !== void 0 ? i : 0 });
90
- }
91
- return new bson.Timestamp(t);
92
- }, (0, helpers_1.pickWithExactKeyMatch)(bson.Timestamp, ['prototype', 'fromInt', 'fromNumber', 'fromBits', 'fromString', 'MAX_VALUE'])),
93
- Code: (0, helpers_1.assignAll)(function Code(c = '', s) {
94
- (0, helpers_1.assertArgsDefinedType)([c, s], [
95
- [undefined, 'string', 'function'],
96
- [undefined, 'object'],
97
- ], 'Code');
98
- return new bson.Code(c, s);
99
- }, (0, helpers_1.pickWithExactKeyMatch)(bson.Code, ['prototype'])),
100
- NumberDecimal: (0, helpers_1.assignAll)(function NumberDecimal(s = '0') {
101
- (0, helpers_1.assertArgsDefinedType)([s], [['string', 'number', 'bson:Long', 'bson:Int32', 'bson:Decimal128']], 'NumberDecimal');
102
- if (typeof s === 'number') {
103
- printWarning('NumberDecimal: specifying a number as argument is deprecated and may lead to loss of precision, pass a string instead');
104
- }
105
- return bson.Decimal128.fromString(`${s}`);
106
- }, { prototype: bson.Decimal128.prototype }),
107
- NumberInt: (0, helpers_1.assignAll)(function NumberInt(v = '0') {
108
- v !== null && v !== void 0 ? v : (v = '0');
109
- (0, helpers_1.assertArgsDefinedType)([v], [['string', 'number', 'bson:Long', 'bson:Int32']], 'NumberInt');
110
- return new bson.Int32(parseInt(`${v}`, 10));
111
- }, { prototype: bson.Int32.prototype }),
112
- NumberLong: (0, helpers_1.assignAll)(function NumberLong(s = '0') {
113
- s !== null && s !== void 0 ? s : (s = '0');
114
- (0, helpers_1.assertArgsDefinedType)([s], [['string', 'number', 'bson:Long', 'bson:Int32']], 'NumberLong');
115
- if (typeof s === 'number') {
116
- printWarning('NumberLong: specifying a number as argument is deprecated and may lead to loss of precision, pass a string instead');
117
- return bson.Long.fromNumber(s);
118
- }
119
- return bson.Long.fromString(`${s}`);
120
- }, { prototype: bson.Long.prototype }),
121
- ISODate: function ISODate(input) {
122
- if (input === undefined)
123
- return new Date();
124
- if (typeof input !== 'string')
125
- return new Date(input);
126
- const isoDateRegex = /^(?<Y>\d{4})-?(?<M>\d{2})-?(?<D>\d{2})([T ](?<h>\d{2})(:?(?<m>\d{2})(:?((?<s>\d{2})(\.(?<ms>\d+))?))?)?(?<tz>Z|([+-])(\d{2}):?(\d{2})?)?)?$/;
127
- const match = isoDateRegex.exec(input);
128
- if (match !== null && match.groups !== undefined) {
129
- const { Y, M, D, h, m, s, ms, tz } = match.groups;
130
- const normalized = `${Y}-${M}-${D}T${h || '00'}:${m || '00'}:${s || '00'}.${ms || '000'}${tz || 'Z'}`;
131
- const date = new Date(normalized);
132
- if (date.getTime() >= -62167219200000 &&
133
- date.getTime() <= 253402300799999) {
134
- return date;
135
- }
136
- }
137
- throw new errors_1.MongoshInvalidInputError(`${JSON.stringify(input)} is not a valid ISODate`, errors_1.CommonErrors.InvalidArgument);
138
- },
139
- BinData: (0, helpers_1.assignAll)(function BinData(subtype, b64string) {
140
- (0, helpers_1.assertArgsDefinedType)([subtype, b64string], ['number', 'string'], 'BinData');
141
- const buffer = Buffer.from(b64string, 'base64');
142
- return new bson.Binary(buffer, subtype);
143
- }, { prototype: bson.Binary.prototype }),
144
- HexData: (0, helpers_1.assignAll)(function HexData(subtype, hexstr) {
145
- (0, helpers_1.assertArgsDefinedType)([subtype, hexstr], ['number', 'string'], 'HexData');
146
- const buffer = Buffer.from(hexstr, 'hex');
147
- return new bson.Binary(buffer, subtype);
148
- }, { prototype: bson.Binary.prototype }),
149
- UUID: (0, helpers_1.assignAll)(function UUID(hexstr) {
150
- if (hexstr === undefined) {
151
- const uuid = (0, crypto_1.randomBytes)(16);
152
- uuid[6] = (uuid[6] & 0x0f) | 0x40;
153
- uuid[8] = (uuid[8] & 0x3f) | 0x80;
154
- hexstr = uuid.toString('hex');
155
- }
156
- (0, helpers_1.assertArgsDefinedType)([hexstr], ['string'], 'UUID');
157
- const buffer = Buffer.from(hexstr.replace(/-/g, ''), 'hex');
158
- return new bson.Binary(buffer, bson.Binary.SUBTYPE_UUID);
159
- }, { prototype: bson.Binary.prototype }),
160
- MD5: (0, helpers_1.assignAll)(function MD5(hexstr) {
161
- (0, helpers_1.assertArgsDefinedType)([hexstr], ['string'], 'MD5');
162
- const buffer = Buffer.from(hexstr, 'hex');
163
- return new bson.Binary(buffer, bson.Binary.SUBTYPE_MD5);
164
- }, { prototype: bson.Binary.prototype }),
165
- Decimal128: (0, helpers_1.assignAll)((0, helpers_1.functionCtorWithoutProps)(bson.Decimal128), (0, helpers_1.pickWithExactKeyMatch)(bson.Decimal128, [
166
- 'prototype',
167
- 'fromString',
168
- 'fromStringWithRounding',
169
- ])),
170
- BSONSymbol: (0, helpers_1.assignAll)((0, helpers_1.functionCtorWithoutProps)(bson.BSONSymbol), (0, helpers_1.pickWithExactKeyMatch)(bson.BSONSymbol, ['prototype'])),
171
- Int32: (0, helpers_1.assignAll)((0, helpers_1.functionCtorWithoutProps)(bson.Int32), (0, helpers_1.pickWithExactKeyMatch)(bson.Int32, ['prototype', 'fromString'])),
172
- Long: (0, helpers_1.assignAll)((0, helpers_1.functionCtorWithoutProps)(bson.Long), (0, helpers_1.pickWithExactKeyMatch)(bson.Long, [
173
- 'prototype',
174
- 'fromValue',
175
- 'isLong',
176
- 'fromBytesBE',
177
- 'fromBytesLE',
178
- 'fromBytes',
179
- 'fromString',
180
- 'fromStringStrict',
181
- 'fromBigInt',
182
- 'fromNumber',
183
- 'fromInt',
184
- 'fromBits',
185
- 'MIN_VALUE',
186
- 'MAX_VALUE',
187
- 'NEG_ONE',
188
- 'UONE',
189
- 'ONE',
190
- 'UZERO',
191
- 'ZERO',
192
- 'MAX_UNSIGNED_VALUE',
193
- 'TWO_PWR_24',
194
- ])),
195
- Binary: (0, helpers_1.assignAll)((0, helpers_1.functionCtorWithoutProps)(bson.Binary), (0, helpers_1.pickWithExactKeyMatch)(bson.Binary, [
196
- 'prototype',
197
- 'createFromBase64',
198
- 'createFromHexString',
199
- 'fromInt8Array',
200
- 'fromFloat32Array',
201
- 'fromPackedBits',
202
- 'fromBits',
203
- 'BUFFER_SIZE',
204
- 'SUBTYPE_DEFAULT',
205
- 'SUBTYPE_FUNCTION',
206
- 'SUBTYPE_BYTE_ARRAY',
207
- 'SUBTYPE_UUID_OLD',
208
- 'SUBTYPE_UUID',
209
- 'SUBTYPE_MD5',
210
- 'SUBTYPE_ENCRYPTED',
211
- 'SUBTYPE_COLUMN',
212
- 'SUBTYPE_SENSITIVE',
213
- 'SUBTYPE_VECTOR',
214
- 'SUBTYPE_USER_DEFINED',
215
- 'VECTOR_TYPE',
216
- ])),
217
- Double: (0, helpers_1.assignAll)((0, helpers_1.functionCtorWithoutProps)(bson.Double), (0, helpers_1.pickWithExactKeyMatch)(bson.Double, ['prototype', 'fromString'])),
218
- BSONRegExp: (0, helpers_1.assignAll)((0, helpers_1.functionCtorWithoutProps)(bson.BSONRegExp), (0, helpers_1.pickWithExactKeyMatch)(bson.BSONRegExp, ['prototype', 'parseOptions'])),
219
- EJSON: (0, helpers_1.pickWithExactKeyMatch)(bson.EJSON, [
220
- 'parse',
221
- 'serialize',
222
- 'stringify',
223
- 'deserialize',
224
- ]),
225
- };
226
- for (const className of Object.keys(bsonPkg)) {
227
- const help = helps[className] || constructHelp(className);
228
- bsonPkg[className].help = () => help;
229
- Object.setPrototypeOf(bsonPkg[className].help, help);
230
- }
231
- return bsonPkg;
232
- }
233
- //# sourceMappingURL=shell-bson.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shell-bson.js","sourceRoot":"","sources":["../src/shell-bson.ts"],"names":[],"mappings":";;;;;AAmFA,qCAiWC;AApbD,mCAKiB;AACjB,kDAA0B;AAE1B,0EAA8D;AAC9D,4CAIyB;AACzB,uCAKmB;AACnB,mCAAqC;AAErC,SAAS,aAAa,CAAC,SAAiB;IACtC,MAAM,kBAAkB,GAAG,qBAAqB,SAAS,OAAO,CAAC;IACjE,MAAM,SAAS,GAAG;QAChB,IAAI,EAAE,GAAG,kBAAkB,cAAc;QACzC,OAAO,EAAE,GAAG,kBAAkB,UAAU;QACxC,IAAI,EAAE,GAAG,kBAAkB,OAAO;QAClC,IAAI,EAAE,EAAE;KACT,CAAC;IACF,OAAO,IAAI,cAAI,CAAC,SAAS,CAAC,CAAC;AAC7B,CAAC;AAoDD,SAAwB,kBAAkB,CACxC,IAAiB,EACjB,YAAmC;IAEnC,MAAM,SAAS,GAAG;QAChB,QAAQ;QACR,MAAM;QACN,OAAO;QACP,YAAY;QACZ,QAAQ;QACR,OAAO;QACP,MAAM;QACN,QAAQ;QACR,QAAQ;QACR,UAAU;QACV,WAAW;QACX,YAAY;QACZ,YAAY;KACJ,CAAC;IAGX,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,IAAI,GAAG,4BAAI,CAAC;IACd,CAAC;IACD,MAAM,KAAK,GAAQ,EAAE,CAAC;IACtB,SAAS,CAAC,OAA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