@qp-mongosh/service-provider-core 0.0.0-dev.0 → 0.0.0-dev.12
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/bulk-write-result.d.ts +16 -0
- package/lib/bulk-write-result.js +3 -0
- package/lib/bulk-write-result.js.map +1 -0
- package/lib/command-options.d.ts +4 -0
- package/lib/command-options.js +3 -0
- package/lib/command-options.js.map +1 -0
- package/lib/cursor.d.ts +34 -0
- package/lib/cursor.js +3 -0
- package/lib/cursor.js.map +1 -0
- package/lib/database-options.d.ts +8 -0
- package/lib/database-options.js +3 -0
- package/lib/database-options.js.map +1 -0
- package/lib/document.d.ts +3 -0
- package/lib/document.js +3 -0
- package/lib/document.js.map +1 -0
- package/lib/fast-failure-connect.d.ts +1 -0
- package/lib/fast-failure-connect.js +15 -0
- package/lib/fast-failure-connect.js.map +1 -0
- package/lib/read-concern.d.ts +3 -0
- package/lib/read-concern.js +3 -0
- package/lib/read-concern.js.map +1 -0
- package/lib/read-preference.d.ts +4 -0
- package/lib/read-preference.js +3 -0
- package/lib/read-preference.js.map +1 -0
- package/lib/result.d.ts +2 -0
- package/lib/result.js +3 -0
- package/lib/result.js.map +1 -0
- package/lib/write-concern.d.ts +5 -0
- package/lib/write-concern.js +3 -0
- package/lib/write-concern.js.map +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export default interface BulkWriteResult {
|
|
2
|
+
result: {
|
|
3
|
+
ok: number;
|
|
4
|
+
};
|
|
5
|
+
insertedCount: number;
|
|
6
|
+
matchedCount: number;
|
|
7
|
+
modifiedCount: number;
|
|
8
|
+
deletedCount: number;
|
|
9
|
+
upsertedCount: number;
|
|
10
|
+
upsertedIds: {
|
|
11
|
+
[index: number]: any;
|
|
12
|
+
};
|
|
13
|
+
insertedIds: {
|
|
14
|
+
[index: number]: any;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bulk-write-result.js","sourceRoot":"","sources":["../src/bulk-write-result.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-options.js","sourceRoot":"","sources":["../src/command-options.ts"],"names":[],"mappings":""}
|
package/lib/cursor.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import Document from './document';
|
|
2
|
+
export default interface Cursor {
|
|
3
|
+
addOption(option: number): Cursor;
|
|
4
|
+
allowPartialResults(): Cursor;
|
|
5
|
+
batchSize(size: number): Cursor;
|
|
6
|
+
close(options: Document): Promise<void>;
|
|
7
|
+
clone(): Cursor;
|
|
8
|
+
isClosed(): boolean;
|
|
9
|
+
collation(spec: Document): Cursor;
|
|
10
|
+
comment(cmt: string): Cursor;
|
|
11
|
+
count(): Promise<number>;
|
|
12
|
+
forEach(f: any): Promise<void>;
|
|
13
|
+
hasNext(): Promise<boolean>;
|
|
14
|
+
hint(index: string): Cursor;
|
|
15
|
+
isExhausted(): Promise<boolean>;
|
|
16
|
+
itcount(): Promise<number>;
|
|
17
|
+
limit(value: number): Cursor;
|
|
18
|
+
map(f: any): Cursor;
|
|
19
|
+
max(indexBounds: Document): Cursor;
|
|
20
|
+
maxTimeMS(value: number): Cursor;
|
|
21
|
+
min(indexBounds: Document): Cursor;
|
|
22
|
+
next(): Promise<any>;
|
|
23
|
+
noCursorTimeout(): Cursor;
|
|
24
|
+
oplogReplay(): Cursor;
|
|
25
|
+
projection(spec: Document): Cursor;
|
|
26
|
+
returnKey(enabled: boolean): Cursor;
|
|
27
|
+
size(): Promise<number>;
|
|
28
|
+
skip(value: number): Cursor;
|
|
29
|
+
sort(spec: Document): Cursor;
|
|
30
|
+
tailable(): Cursor;
|
|
31
|
+
readPref(mode: string, tagSet?: Document[]): Cursor;
|
|
32
|
+
toArray(): Promise<Document[]>;
|
|
33
|
+
explain(verbosity: string): Promise<any>;
|
|
34
|
+
}
|
package/lib/cursor.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor.js","sourceRoot":"","sources":["../src/cursor.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import WriteConcern from './write-concern';
|
|
2
|
+
import ReadConcern from './read-concern';
|
|
3
|
+
import ReadPreference from './read-preference';
|
|
4
|
+
export default interface DatabaseOptions extends WriteConcern {
|
|
5
|
+
returnNonCachedInstance?: boolean;
|
|
6
|
+
readConcern?: ReadConcern;
|
|
7
|
+
readPreference?: ReadPreference;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"database-options.js","sourceRoot":"","sources":["../src/database-options.ts"],"names":[],"mappings":""}
|
package/lib/document.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document.js","sourceRoot":"","sources":["../src/document.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isFastFailureConnectionError(error: Error): boolean;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isFastFailureConnectionError = void 0;
|
|
4
|
+
function isFastFailureConnectionError(error) {
|
|
5
|
+
switch (error.name) {
|
|
6
|
+
case 'MongoNetworkError':
|
|
7
|
+
return /\b(ECONNREFUSED|ENOTFOUND|ENETUNREACH)\b/.test(error.message);
|
|
8
|
+
case 'MongoError':
|
|
9
|
+
return /The apiVersion parameter is required/.test(error.message);
|
|
10
|
+
default:
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.isFastFailureConnectionError = isFastFailureConnectionError;
|
|
15
|
+
//# sourceMappingURL=fast-failure-connect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fast-failure-connect.js","sourceRoot":"","sources":["../src/fast-failure-connect.ts"],"names":[],"mappings":";;;AAGA,SAAgB,4BAA4B,CAAC,KAAY;IACvD,QAAQ,KAAK,CAAC,IAAI,EAAE;QAClB,KAAK,mBAAmB;YACtB,OAAO,0CAA0C,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACxE,KAAK,YAAY;YACf,OAAO,sCAAsC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACpE;YACE,OAAO,KAAK,CAAC;KAChB;AACH,CAAC;AATD,oEASC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-concern.js","sourceRoot":"","sources":["../src/read-concern.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-preference.js","sourceRoot":"","sources":["../src/read-preference.ts"],"names":[],"mappings":""}
|
package/lib/result.d.ts
ADDED
package/lib/result.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"result.js","sourceRoot":"","sources":["../src/result.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write-concern.js","sourceRoot":"","sources":["../src/write-concern.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qp-mongosh/service-provider-core",
|
|
3
|
-
"version": "0.0.0-dev.
|
|
3
|
+
"version": "0.0.0-dev.12",
|
|
4
4
|
"description": "MongoDB Shell Core Service Provider Package",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"unitTestsOnly": true
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@qp-mongosh/errors": "0.0.0-dev.
|
|
34
|
-
"@qp-mongosh/i18n": "0.0.0-dev.
|
|
33
|
+
"@qp-mongosh/errors": "0.0.0-dev.12",
|
|
34
|
+
"@qp-mongosh/i18n": "0.0.0-dev.12",
|
|
35
35
|
"bson": "^4.6.1",
|
|
36
|
-
"qp-mongodb": "0.0.0-dev.
|
|
36
|
+
"qp-mongodb": "0.0.0-dev.12",
|
|
37
37
|
"mongodb-build-info": "^1.2.0",
|
|
38
38
|
"mongodb-connection-string-url": "^2.3.2"
|
|
39
39
|
},
|