@mongosh/service-provider-core 3.7.0 → 5.0.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/lib/readable.d.ts +6 -5
- package/lib/writable.d.ts +3 -2
- package/package.json +9 -11
- package/src/readable.ts +6 -5
- package/src/writable.ts +3 -2
- package/.depcheckrc +0 -11
package/lib/readable.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Abortable } from 'events';
|
|
1
2
|
import type { Document, AggregateOptions, CountOptions, CountDocumentsOptions, DistinctOptions, EstimatedDocumentCountOptions, FindOptions, ListCollectionsOptions, ListIndexesOptions, DbOptions, ReadPreferenceFromOptions, ReadPreferenceLike, TopologyType, ServerType } from './all-transport-types';
|
|
2
3
|
import type { ChangeStreamOptions } from './all-transport-types';
|
|
3
4
|
import type { ServiceProviderAggregationCursor, ServiceProviderChangeStream, ServiceProviderFindCursor } from './cursors';
|
|
@@ -11,16 +12,16 @@ export interface TopologyDescription {
|
|
|
11
12
|
servers?: Map<string, ServerDescription>;
|
|
12
13
|
}
|
|
13
14
|
export default interface Readable {
|
|
14
|
-
aggregate(database: string, collection: string, pipeline: Document[], options?: AggregateOptions, dbOptions?: DbOptions): ServiceProviderAggregationCursor;
|
|
15
|
-
aggregateDb(database: string, pipeline: Document[], options?: AggregateOptions, dbOptions?: DbOptions): ServiceProviderAggregationCursor;
|
|
15
|
+
aggregate(database: string, collection: string, pipeline: Document[], options?: AggregateOptions & Abortable, dbOptions?: DbOptions): ServiceProviderAggregationCursor;
|
|
16
|
+
aggregateDb(database: string, pipeline: Document[], options?: AggregateOptions & Abortable, dbOptions?: DbOptions): ServiceProviderAggregationCursor;
|
|
16
17
|
count(db: string, coll: string, query?: Document, options?: CountOptions, dbOptions?: DbOptions): Promise<number>;
|
|
17
|
-
countDocuments(database: string, collection: string, filter?: Document, options?: CountDocumentsOptions, dbOptions?: DbOptions): Promise<number>;
|
|
18
|
+
countDocuments(database: string, collection: string, filter?: Document, options?: CountDocumentsOptions & Abortable, dbOptions?: DbOptions): Promise<number>;
|
|
18
19
|
distinct(database: string, collection: string, fieldName: string, filter?: Document, options?: DistinctOptions, dbOptions?: DbOptions): Promise<Document>;
|
|
19
20
|
estimatedDocumentCount(database: string, collection: string, options?: EstimatedDocumentCountOptions, dbOptions?: DbOptions): Promise<number>;
|
|
20
|
-
find(database: string, collection: string, filter?: Document, options?: FindOptions, dbOptions?: DbOptions): ServiceProviderFindCursor;
|
|
21
|
+
find(database: string, collection: string, filter?: Document, options?: FindOptions & Abortable, dbOptions?: DbOptions): ServiceProviderFindCursor;
|
|
21
22
|
getTopologyDescription(): TopologyDescription | undefined;
|
|
22
23
|
getIndexes(database: string, collection: string, options: ListIndexesOptions, dbOptions?: DbOptions): Promise<Document[]>;
|
|
23
|
-
listCollections(database: string, filter?: Document, options?: ListCollectionsOptions, dbOptions?: DbOptions): Promise<Document[]>;
|
|
24
|
+
listCollections(database: string, filter?: Document, options?: ListCollectionsOptions & Abortable, dbOptions?: DbOptions): Promise<Document[]>;
|
|
24
25
|
readPreferenceFromOptions(options?: Omit<ReadPreferenceFromOptions, 'session'>): ReadPreferenceLike | undefined;
|
|
25
26
|
watch(pipeline: Document[], options: ChangeStreamOptions, dbOptions?: DbOptions, db?: string, coll?: string): ServiceProviderChangeStream;
|
|
26
27
|
getSearchIndexes(database: string, collection: string, indexName?: string, options?: Document, dbOptions?: DbOptions): Promise<Document[]>;
|
package/lib/writable.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import type { Abortable } from 'events';
|
|
1
2
|
import type { RunCursorCommandOptions } from 'mongodb';
|
|
2
3
|
import type { Document, InsertOneOptions, InsertOneResult, Collection, RenameOptions, FindOneAndDeleteOptions, FindOneAndReplaceOptions, FindOneAndUpdateOptions, BulkWriteOptions, AnyBulkWriteOperation, AnyClientBulkWriteModel, ClientBulkWriteResult, ClientBulkWriteOptions, DeleteOptions, DeleteResult, InsertManyResult, ReplaceOptions, UpdateResult, UpdateOptions, DropDatabaseOptions, CreateIndexesOptions, DropCollectionOptions, BulkWriteResult, RunCommandOptions, DbOptions, OrderedBulkOperation, UnorderedBulkOperation, SearchIndexDescription } from './all-transport-types';
|
|
3
4
|
import type { ServiceProviderRunCommandCursor } from './cursors';
|
|
4
5
|
export default interface Writable {
|
|
5
|
-
runCommand(db: string, spec: Document, options: RunCommandOptions, dbOptions?: DbOptions): Promise<Document>;
|
|
6
|
-
runCommandWithCheck(db: string, spec: Document, options: RunCommandOptions, dbOptions?: DbOptions): Promise<Document>;
|
|
6
|
+
runCommand(db: string, spec: Document, options: RunCommandOptions & Abortable, dbOptions?: DbOptions): Promise<Document>;
|
|
7
|
+
runCommandWithCheck(db: string, spec: Document, options: RunCommandOptions & Abortable, dbOptions?: DbOptions): Promise<Document>;
|
|
7
8
|
runCursorCommand(db: string, spec: Document, options: RunCursorCommandOptions, dbOptions?: DbOptions): ServiceProviderRunCommandCursor;
|
|
8
9
|
dropDatabase(database: string, options: DropDatabaseOptions, dbOptions?: DbOptions): Promise<Document>;
|
|
9
10
|
bulkWrite(database: string, collection: string, requests: AnyBulkWriteOperation[], options: BulkWriteOptions, dbOptions?: DbOptions): Promise<BulkWriteResult>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mongosh/service-provider-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "MongoDB Shell Core Service Provider Package",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -20,8 +20,7 @@
|
|
|
20
20
|
"test-ci-coverage": "nyc --no-clean --cwd ../.. --reporter=none npm run test-ci",
|
|
21
21
|
"eslint": "eslint",
|
|
22
22
|
"lint": "npm run eslint . && npm run prettier -- --check .",
|
|
23
|
-
"check": "npm run lint
|
|
24
|
-
"depcheck": "depcheck",
|
|
23
|
+
"check": "npm run lint",
|
|
25
24
|
"prettier": "prettier",
|
|
26
25
|
"reformat": "npm run prettier -- --write . && npm run eslint -- --fix"
|
|
27
26
|
},
|
|
@@ -36,20 +35,19 @@
|
|
|
36
35
|
"unitTestsOnly": true
|
|
37
36
|
},
|
|
38
37
|
"dependencies": {
|
|
39
|
-
"@mongosh/errors": "2.4.
|
|
40
|
-
"@mongosh/shell-bson": "
|
|
41
|
-
"bson": "^
|
|
42
|
-
"mongodb": "^
|
|
43
|
-
"mongodb-build-info": "^1.
|
|
44
|
-
"mongodb-connection-string-url": "^
|
|
38
|
+
"@mongosh/errors": "2.4.6",
|
|
39
|
+
"@mongosh/shell-bson": "3.0.0",
|
|
40
|
+
"bson": "^7.2.0",
|
|
41
|
+
"mongodb": "^7.1.0",
|
|
42
|
+
"mongodb-build-info": "^1.9.5",
|
|
43
|
+
"mongodb-connection-string-url": "^7.0.1"
|
|
45
44
|
},
|
|
46
45
|
"devDependencies": {
|
|
47
46
|
"@mongodb-js/eslint-config-mongosh": "^1.0.0",
|
|
48
47
|
"@mongodb-js/prettier-config-devtools": "^1.0.1",
|
|
49
48
|
"@mongodb-js/tsconfig-mongosh": "^1.0.0",
|
|
50
|
-
"depcheck": "^1.4.7",
|
|
51
49
|
"eslint": "^7.25.0",
|
|
52
50
|
"prettier": "^2.8.8"
|
|
53
51
|
},
|
|
54
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "1ae76759bb28ace817059c00cfefa6055aec35c4"
|
|
55
53
|
}
|
package/src/readable.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Abortable } from 'events';
|
|
1
2
|
import type {
|
|
2
3
|
Document,
|
|
3
4
|
AggregateOptions,
|
|
@@ -51,7 +52,7 @@ export default interface Readable {
|
|
|
51
52
|
database: string,
|
|
52
53
|
collection: string,
|
|
53
54
|
pipeline: Document[],
|
|
54
|
-
options?: AggregateOptions,
|
|
55
|
+
options?: AggregateOptions & Abortable,
|
|
55
56
|
dbOptions?: DbOptions
|
|
56
57
|
): ServiceProviderAggregationCursor;
|
|
57
58
|
|
|
@@ -68,7 +69,7 @@ export default interface Readable {
|
|
|
68
69
|
aggregateDb(
|
|
69
70
|
database: string,
|
|
70
71
|
pipeline: Document[],
|
|
71
|
-
options?: AggregateOptions,
|
|
72
|
+
options?: AggregateOptions & Abortable,
|
|
72
73
|
dbOptions?: DbOptions
|
|
73
74
|
): ServiceProviderAggregationCursor;
|
|
74
75
|
|
|
@@ -109,7 +110,7 @@ export default interface Readable {
|
|
|
109
110
|
database: string,
|
|
110
111
|
collection: string,
|
|
111
112
|
filter?: Document,
|
|
112
|
-
options?: CountDocumentsOptions,
|
|
113
|
+
options?: CountDocumentsOptions & Abortable,
|
|
113
114
|
dbOptions?: DbOptions
|
|
114
115
|
): Promise<number>;
|
|
115
116
|
|
|
@@ -166,7 +167,7 @@ export default interface Readable {
|
|
|
166
167
|
database: string,
|
|
167
168
|
collection: string,
|
|
168
169
|
filter?: Document,
|
|
169
|
-
options?: FindOptions,
|
|
170
|
+
options?: FindOptions & Abortable,
|
|
170
171
|
dbOptions?: DbOptions
|
|
171
172
|
): ServiceProviderFindCursor;
|
|
172
173
|
|
|
@@ -206,7 +207,7 @@ export default interface Readable {
|
|
|
206
207
|
listCollections(
|
|
207
208
|
database: string,
|
|
208
209
|
filter?: Document,
|
|
209
|
-
options?: ListCollectionsOptions,
|
|
210
|
+
options?: ListCollectionsOptions & Abortable,
|
|
210
211
|
dbOptions?: DbOptions
|
|
211
212
|
): Promise<Document[]>;
|
|
212
213
|
|
package/src/writable.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Abortable } from 'events';
|
|
1
2
|
import type { RunCursorCommandOptions } from 'mongodb';
|
|
2
3
|
import type {
|
|
3
4
|
Document,
|
|
@@ -45,7 +46,7 @@ export default interface Writable {
|
|
|
45
46
|
runCommand(
|
|
46
47
|
db: string,
|
|
47
48
|
spec: Document,
|
|
48
|
-
options: RunCommandOptions,
|
|
49
|
+
options: RunCommandOptions & Abortable,
|
|
49
50
|
dbOptions?: DbOptions
|
|
50
51
|
): Promise<Document>;
|
|
51
52
|
|
|
@@ -59,7 +60,7 @@ export default interface Writable {
|
|
|
59
60
|
runCommandWithCheck(
|
|
60
61
|
db: string,
|
|
61
62
|
spec: Document,
|
|
62
|
-
options: RunCommandOptions,
|
|
63
|
+
options: RunCommandOptions & Abortable,
|
|
63
64
|
dbOptions?: DbOptions
|
|
64
65
|
): Promise<Document>;
|
|
65
66
|
|
package/.depcheckrc
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
ignores:
|
|
2
|
-
- '@mongodb-js/eslint-config-mongosh'
|
|
3
|
-
- '@mongodb-js/tsconfig-mongosh'
|
|
4
|
-
- '@mongodb-js/prettier-config-devtools'
|
|
5
|
-
- '@typescript-eslint/parser'
|
|
6
|
-
- '@typescript-eslint/eslint-plugin'
|
|
7
|
-
- chai
|
|
8
|
-
- eslint-plugin-mocha
|
|
9
|
-
- eslint-config-mongodb-js
|
|
10
|
-
ignore-patterns:
|
|
11
|
-
- .eslintrc.js
|