@mongosh/service-provider-core 1.6.1 → 1.7.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/AUTHORS +1 -0
- package/lib/all-transport-types.d.ts +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js.map +1 -1
- package/lib/map-reduce-options.d.ts +22 -0
- package/lib/map-reduce-options.js +3 -0
- package/lib/map-reduce-options.js.map +1 -0
- package/package.json +9 -8
- package/src/all-transport-types.ts +0 -2
- package/src/index.ts +2 -0
- package/src/map-reduce-options.ts +30 -0
package/AUTHORS
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export type { AggregateOptions, AggregationCursor, AnyBulkWriteOperation, Batch,
|
|
1
|
+
export type { AggregateOptions, AggregationCursor, AnyBulkWriteOperation, Batch, BulkWriteOptions, BulkWriteResult, ChangeStream, ChangeStreamOptions, ClientSession, CloseOptions, CollationOptions, CollStatsOptions, Collection, CommandOperationOptions, CountDocumentsOptions, CountOptions, CreateCollectionOptions, CreateIndexesOptions, ClientSessionOptions, ClusterTime, FindCursor, CursorFlag, Db, DbOptions, DeleteOptions, DeleteResult, DistinctOptions, Document, DropCollectionOptions, DropDatabaseOptions, EstimatedDocumentCountOptions, ExplainOptions, ExplainVerbosityLike, FindOneAndDeleteOptions, FindOneAndUpdateOptions, FindOneAndReplaceOptions, FindOperators, FindOptions, HedgeOptions, IndexDescription, InsertManyResult, InsertOneOptions, InsertOneResult, ListCollectionsOptions, ListDatabasesOptions, ListIndexesOptions, MongoClientOptions, OrderedBulkOperation, ReadConcern, ReadConcernLike, ReadConcernLevel, ReadPreference, ReadPreferenceLike, ReadPreferenceFromOptions, ReadPreferenceMode, RenameOptions, ReplaceOptions, ResumeToken, RunCommandOptions, ServerSessionId, TagSet, TransactionOptions, UpdateOptions, UpdateResult, UnorderedBulkOperation, WriteConcern, ObjectId as ObjectIdType, Timestamp as TimestampType, Binary as BinaryType, TopologyDescription, TopologyType, ServerType, AutoEncryptionOptions, ServerApi, ServerApiVersion, MongoClient } from 'mongodb';
|
package/lib/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { bsonStringifiers } from './printable-bson';
|
|
|
8
8
|
import ShellAuthOptions from './shell-auth-options';
|
|
9
9
|
export * from './all-transport-types';
|
|
10
10
|
export * from './all-fle-types';
|
|
11
|
+
export { MapReduceOptions, FinalizeFunction } from './map-reduce-options';
|
|
11
12
|
declare const bson: {
|
|
12
13
|
ObjectId: typeof ObjectId;
|
|
13
14
|
DBRef: typeof DBRef;
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAA0E;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAA0E;AAsDxE,oGAtDwB,sCAAmB,OAsDxB;AArDrB,kEAA6D;AAkD3D,yBAlDK,sBAAc,CAkDL;AAhDhB,MAAM,UAAU,GAAG,MAAM,CAAC;AAkDxB,gCAAU;AAjDZ,+BAiBc;AACd,qDAAoD;AAkClD,iGAlCO,iCAAgB,OAkCP;AAhClB,wDAAsC;AACtC,kDAAgC;AAIhC,MAAM,IAAI,GAAG;IACX,QAAQ,EAAR,eAAQ;IACR,KAAK,EAAL,YAAK;IACL,MAAM,EAAN,aAAM;IACN,MAAM,EAAN,aAAM;IACN,SAAS,EAAT,gBAAS;IACT,UAAU,EAAV,iBAAU;IACV,IAAI,EAAJ,WAAI;IACJ,UAAU,EAAV,iBAAU;IACV,KAAK,EAAL,YAAK;IACL,IAAI,EAAJ,WAAI;IACJ,MAAM,EAAN,aAAM;IACN,GAAG,EAAH,UAAG;IACH,mBAAmB,EAAnB,0BAAmB;IACnB,MAAM,EAAN,aAAM;IACN,KAAK,EAAL,YAAK;IACL,UAAU,EAAV,iBAAU;CACX,CAAC;AASA,oBAAI"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { CommandOperationOptions, Document, ObjectId, Sort } from 'mongodb';
|
|
2
|
+
export declare type FinalizeFunction<TKey = ObjectId, TValue = Document> = (key: TKey, reducedValue: TValue) => TValue;
|
|
3
|
+
export interface MapReduceOptions<TKey = ObjectId, TValue = Document> extends CommandOperationOptions {
|
|
4
|
+
out?: 'inline' | {
|
|
5
|
+
inline: 1;
|
|
6
|
+
} | {
|
|
7
|
+
replace: string;
|
|
8
|
+
} | {
|
|
9
|
+
merge: string;
|
|
10
|
+
} | {
|
|
11
|
+
reduce: string;
|
|
12
|
+
};
|
|
13
|
+
query?: Document;
|
|
14
|
+
sort?: Sort;
|
|
15
|
+
limit?: number;
|
|
16
|
+
keeptemp?: boolean;
|
|
17
|
+
finalize?: FinalizeFunction<TKey, TValue> | string;
|
|
18
|
+
scope?: Document;
|
|
19
|
+
jsMode?: boolean;
|
|
20
|
+
verbose?: boolean;
|
|
21
|
+
bypassDocumentValidation?: boolean;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"map-reduce-options.js","sourceRoot":"","sources":["../src/map-reduce-options.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mongosh/service-provider-core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "MongoDB Shell Core Service Provider Package",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -37,14 +37,15 @@
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"mongodb
|
|
44
|
-
"mongodb-
|
|
40
|
+
"@aws-sdk/credential-providers": "^3.262.0",
|
|
41
|
+
"@mongosh/errors": "1.7.0",
|
|
42
|
+
"bson": "^4.7.2",
|
|
43
|
+
"mongodb": "^4.13.0",
|
|
44
|
+
"mongodb-build-info": "^1.5.0",
|
|
45
|
+
"mongodb-client-encryption": "^2.4.0"
|
|
45
46
|
},
|
|
46
47
|
"optionalDependencies": {
|
|
47
|
-
"mongodb-client-encryption": "^2.
|
|
48
|
+
"mongodb-client-encryption": "^2.4.0"
|
|
48
49
|
},
|
|
49
50
|
"dependency-check": {
|
|
50
51
|
"entries": [
|
|
@@ -57,5 +58,5 @@
|
|
|
57
58
|
"encoding"
|
|
58
59
|
]
|
|
59
60
|
},
|
|
60
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "a2605fcf349a050c7a9081016a431b036b4c5ec3"
|
|
61
62
|
}
|
|
@@ -3,7 +3,6 @@ export type {
|
|
|
3
3
|
AggregationCursor,
|
|
4
4
|
AnyBulkWriteOperation,
|
|
5
5
|
Batch,
|
|
6
|
-
BulkResult,
|
|
7
6
|
BulkWriteOptions,
|
|
8
7
|
BulkWriteResult,
|
|
9
8
|
ChangeStream,
|
|
@@ -46,7 +45,6 @@ export type {
|
|
|
46
45
|
ListCollectionsOptions,
|
|
47
46
|
ListDatabasesOptions,
|
|
48
47
|
ListIndexesOptions,
|
|
49
|
-
MapReduceOptions,
|
|
50
48
|
MongoClientOptions,
|
|
51
49
|
OrderedBulkOperation,
|
|
52
50
|
ReadConcern,
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { CommandOperationOptions, Document, ObjectId, Sort } from 'mongodb';
|
|
2
|
+
|
|
3
|
+
export type FinalizeFunction<TKey = ObjectId, TValue = Document> = (
|
|
4
|
+
key: TKey,
|
|
5
|
+
reducedValue: TValue
|
|
6
|
+
) => TValue;
|
|
7
|
+
|
|
8
|
+
export interface MapReduceOptions<TKey = ObjectId, TValue = Document>
|
|
9
|
+
extends CommandOperationOptions {
|
|
10
|
+
/** Sets the output target for the map reduce job. */
|
|
11
|
+
out?: 'inline' | { inline: 1 } | { replace: string } | { merge: string } | { reduce: string };
|
|
12
|
+
/** Query filter object. */
|
|
13
|
+
query?: Document;
|
|
14
|
+
/** Sorts the input objects using this key. Useful for optimization, like sorting by the emit key for fewer reduces. */
|
|
15
|
+
sort?: Sort;
|
|
16
|
+
/** Number of objects to return from collection. */
|
|
17
|
+
limit?: number;
|
|
18
|
+
/** Keep temporary data. */
|
|
19
|
+
keeptemp?: boolean;
|
|
20
|
+
/** Finalize function. */
|
|
21
|
+
finalize?: FinalizeFunction<TKey, TValue> | string;
|
|
22
|
+
/** Can pass in variables that can be access from map/reduce/finalize. */
|
|
23
|
+
scope?: Document;
|
|
24
|
+
/** It is possible to make the execution stay in JS. Provided in MongoDB \> 2.0.X. */
|
|
25
|
+
jsMode?: boolean;
|
|
26
|
+
/** Provide statistics on job execution time. */
|
|
27
|
+
verbose?: boolean;
|
|
28
|
+
/** Allow driver to bypass schema validation in MongoDB 3.2 or higher. */
|
|
29
|
+
bypassDocumentValidation?: boolean;
|
|
30
|
+
}
|