@qp-mongosh/service-provider-core 0.0.0-dev.5 → 0.0.0-dev.7
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/.eslintignore +2 -2
- package/.eslintrc.js +1 -1
- package/AUTHORS +11 -11
- package/LICENSE +200 -200
- package/lib/admin.d.ts +28 -28
- package/lib/admin.js +2 -2
- package/lib/all-fle-types.d.ts +2 -2
- package/lib/all-fle-types.js +2 -2
- package/lib/all-transport-types.d.ts +1 -1
- package/lib/all-transport-types.js +2 -2
- 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/cli-options.d.ts +43 -43
- package/lib/cli-options.js +2 -2
- package/lib/closable.d.ts +4 -4
- package/lib/closable.js +2 -2
- 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/connect-info.d.ts +19 -19
- package/lib/connect-info.js +34 -34
- 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/index.d.ts +31 -31
- package/lib/index.js +55 -55
- package/lib/platform.d.ts +6 -6
- package/lib/platform.js +10 -10
- package/lib/printable-bson.d.ts +3 -3
- package/lib/printable-bson.js +81 -81
- 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/readable.d.ts +18 -18
- package/lib/readable.js +2 -2
- package/lib/result.d.ts +2 -0
- package/lib/result.js +3 -0
- package/lib/result.js.map +1 -0
- package/lib/service-provider.d.ts +11 -11
- package/lib/service-provider.js +18 -18
- package/lib/shell-auth-options.d.ts +7 -7
- package/lib/shell-auth-options.js +2 -2
- package/lib/textencoder-polyfill.d.ts +2 -2
- package/lib/textencoder-polyfill.js +21 -21
- package/lib/uri-generator.d.ts +8 -8
- package/lib/uri-generator.js +175 -175
- package/lib/writable.d.ts +22 -22
- package/lib/writable.js +2 -2
- 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 +54 -54
- package/src/admin.ts +119 -119
- package/src/all-fle-types.ts +17 -17
- package/src/all-transport-types.ts +80 -80
- package/src/cli-options.ts +49 -49
- package/src/closable.ts +14 -14
- package/src/connect-info.spec.ts +192 -192
- package/src/connect-info.ts +57 -57
- package/src/index.ts +62 -62
- package/src/platform.ts +6 -6
- package/src/printable-bson.spec.ts +75 -75
- package/src/printable-bson.ts +103 -103
- package/src/readable.ts +242 -242
- package/src/service-provider.ts +23 -23
- package/src/shell-auth-options.ts +7 -7
- package/src/textencoder-polyfill.spec.ts +11 -11
- package/src/textencoder-polyfill.ts +30 -30
- package/src/uri-generator.spec.ts +481 -481
- package/src/uri-generator.ts +265 -265
- package/src/writable.ts +367 -367
- package/tsconfig.json +12 -12
- package/tsconfig.lint.json +8 -8
package/lib/cli-options.d.ts
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
export default interface CliOptions {
|
|
2
|
-
connectionSpecifier?: string;
|
|
3
|
-
fileNames?: string[];
|
|
4
|
-
apiDeprecationErrors?: boolean;
|
|
5
|
-
apiStrict?: boolean;
|
|
6
|
-
apiVersion?: string;
|
|
7
|
-
authenticationDatabase?: string;
|
|
8
|
-
authenticationMechanism?: string;
|
|
9
|
-
awsAccessKeyId?: string;
|
|
10
|
-
awsIamSessionToken?: string;
|
|
11
|
-
awsSecretAccessKey?: string;
|
|
12
|
-
awsSessionToken?: string;
|
|
13
|
-
db?: string;
|
|
14
|
-
eval?: string;
|
|
15
|
-
gssapiServiceName?: string;
|
|
16
|
-
sspiHostnameCanonicalization?: string;
|
|
17
|
-
sspiRealmOverride?: string;
|
|
18
|
-
help?: boolean;
|
|
19
|
-
host?: string;
|
|
20
|
-
ipv6?: boolean;
|
|
21
|
-
keyVaultNamespace?: string;
|
|
22
|
-
kmsURL?: string;
|
|
23
|
-
nodb?: boolean;
|
|
24
|
-
norc?: boolean;
|
|
25
|
-
password?: string;
|
|
26
|
-
port?: string;
|
|
27
|
-
quiet?: boolean;
|
|
28
|
-
retryWrites?: boolean;
|
|
29
|
-
shell?: boolean;
|
|
30
|
-
tls?: boolean;
|
|
31
|
-
tlsAllowInvalidCertificates?: boolean;
|
|
32
|
-
tlsAllowInvalidHostnames?: boolean;
|
|
33
|
-
tlsCAFile?: string;
|
|
34
|
-
tlsCertificateKeyFile?: string;
|
|
35
|
-
tlsCertificateKeyFilePassword?: string;
|
|
36
|
-
tlsCertificateSelector?: string;
|
|
37
|
-
tlsCRLFile?: string;
|
|
38
|
-
tlsDisabledProtocols?: boolean;
|
|
39
|
-
tlsFIPSMode?: boolean;
|
|
40
|
-
username?: string;
|
|
41
|
-
verbose?: boolean;
|
|
42
|
-
version?: boolean;
|
|
43
|
-
}
|
|
1
|
+
export default interface CliOptions {
|
|
2
|
+
connectionSpecifier?: string;
|
|
3
|
+
fileNames?: string[];
|
|
4
|
+
apiDeprecationErrors?: boolean;
|
|
5
|
+
apiStrict?: boolean;
|
|
6
|
+
apiVersion?: string;
|
|
7
|
+
authenticationDatabase?: string;
|
|
8
|
+
authenticationMechanism?: string;
|
|
9
|
+
awsAccessKeyId?: string;
|
|
10
|
+
awsIamSessionToken?: string;
|
|
11
|
+
awsSecretAccessKey?: string;
|
|
12
|
+
awsSessionToken?: string;
|
|
13
|
+
db?: string;
|
|
14
|
+
eval?: string;
|
|
15
|
+
gssapiServiceName?: string;
|
|
16
|
+
sspiHostnameCanonicalization?: string;
|
|
17
|
+
sspiRealmOverride?: string;
|
|
18
|
+
help?: boolean;
|
|
19
|
+
host?: string;
|
|
20
|
+
ipv6?: boolean;
|
|
21
|
+
keyVaultNamespace?: string;
|
|
22
|
+
kmsURL?: string;
|
|
23
|
+
nodb?: boolean;
|
|
24
|
+
norc?: boolean;
|
|
25
|
+
password?: string;
|
|
26
|
+
port?: string;
|
|
27
|
+
quiet?: boolean;
|
|
28
|
+
retryWrites?: boolean;
|
|
29
|
+
shell?: boolean;
|
|
30
|
+
tls?: boolean;
|
|
31
|
+
tlsAllowInvalidCertificates?: boolean;
|
|
32
|
+
tlsAllowInvalidHostnames?: boolean;
|
|
33
|
+
tlsCAFile?: string;
|
|
34
|
+
tlsCertificateKeyFile?: string;
|
|
35
|
+
tlsCertificateKeyFilePassword?: string;
|
|
36
|
+
tlsCertificateSelector?: string;
|
|
37
|
+
tlsCRLFile?: string;
|
|
38
|
+
tlsDisabledProtocols?: boolean;
|
|
39
|
+
tlsFIPSMode?: boolean;
|
|
40
|
+
username?: string;
|
|
41
|
+
verbose?: boolean;
|
|
42
|
+
version?: boolean;
|
|
43
|
+
}
|
package/lib/cli-options.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=cli-options.js.map
|
package/lib/closable.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export default interface Closable {
|
|
2
|
-
close(force: boolean): Promise<void>;
|
|
3
|
-
suspend(): Promise<() => Promise<void>>;
|
|
4
|
-
}
|
|
1
|
+
export default interface Closable {
|
|
2
|
+
close(force: boolean): Promise<void>;
|
|
3
|
+
suspend(): Promise<() => Promise<void>>;
|
|
4
|
+
}
|
package/lib/closable.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=closable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-options.js","sourceRoot":"","sources":["../src/command-options.ts"],"names":[],"mappings":""}
|
package/lib/connect-info.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export interface ConnectInfo {
|
|
2
|
-
is_atlas: boolean;
|
|
3
|
-
is_localhost: boolean;
|
|
4
|
-
is_do: boolean;
|
|
5
|
-
server_version: string;
|
|
6
|
-
mongosh_version: string;
|
|
7
|
-
server_os?: string;
|
|
8
|
-
server_arch?: string;
|
|
9
|
-
is_enterprise: boolean;
|
|
10
|
-
auth_type?: string;
|
|
11
|
-
is_data_lake: boolean;
|
|
12
|
-
dl_version?: string;
|
|
13
|
-
atlas_version?: string;
|
|
14
|
-
is_genuine: boolean;
|
|
15
|
-
non_genuine_server_name: string;
|
|
16
|
-
node_version: string;
|
|
17
|
-
uri: string;
|
|
18
|
-
}
|
|
19
|
-
export default function getConnectInfo(uri: string, mongoshVersion: string, buildInfo: any, cmdLineOpts: any, atlasVersion: any, topology: any): ConnectInfo;
|
|
1
|
+
export interface ConnectInfo {
|
|
2
|
+
is_atlas: boolean;
|
|
3
|
+
is_localhost: boolean;
|
|
4
|
+
is_do: boolean;
|
|
5
|
+
server_version: string;
|
|
6
|
+
mongosh_version: string;
|
|
7
|
+
server_os?: string;
|
|
8
|
+
server_arch?: string;
|
|
9
|
+
is_enterprise: boolean;
|
|
10
|
+
auth_type?: string;
|
|
11
|
+
is_data_lake: boolean;
|
|
12
|
+
dl_version?: string;
|
|
13
|
+
atlas_version?: string;
|
|
14
|
+
is_genuine: boolean;
|
|
15
|
+
non_genuine_server_name: string;
|
|
16
|
+
node_version: string;
|
|
17
|
+
uri: string;
|
|
18
|
+
}
|
|
19
|
+
export default function getConnectInfo(uri: string, mongoshVersion: string, buildInfo: any, cmdLineOpts: any, atlasVersion: any, topology: any): ConnectInfo;
|
package/lib/connect-info.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
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
|
-
const mongodb_build_info_1 = __importDefault(require("mongodb-build-info"));
|
|
7
|
-
function getConnectInfo(uri, mongoshVersion, buildInfo, cmdLineOpts, atlasVersion, topology) {
|
|
8
|
-
var _a;
|
|
9
|
-
buildInfo !== null && buildInfo !== void 0 ? buildInfo : (buildInfo = {});
|
|
10
|
-
const { isGenuine: is_genuine, serverName: non_genuine_server_name } = mongodb_build_info_1.default.getGenuineMongoDB(buildInfo, cmdLineOpts);
|
|
11
|
-
const { isDataLake: is_data_lake, dlVersion: dl_version } = mongodb_build_info_1.default.getDataLake(buildInfo);
|
|
12
|
-
const auth_type = topology.s.credentials
|
|
13
|
-
? topology.s.credentials.mechanism : null;
|
|
14
|
-
const { serverOs: server_os, serverArch: server_arch } = mongodb_build_info_1.default.getBuildEnv(buildInfo);
|
|
15
|
-
return {
|
|
16
|
-
is_atlas: !!(atlasVersion === null || atlasVersion === void 0 ? void 0 : atlasVersion.atlasVersion) || mongodb_build_info_1.default.isAtlas(uri),
|
|
17
|
-
is_localhost: mongodb_build_info_1.default.isLocalhost(uri),
|
|
18
|
-
is_do: mongodb_build_info_1.default.isDigitalOcean(uri),
|
|
19
|
-
server_version: buildInfo.version,
|
|
20
|
-
node_version: process.version,
|
|
21
|
-
mongosh_version: mongoshVersion,
|
|
22
|
-
server_os,
|
|
23
|
-
uri,
|
|
24
|
-
server_arch,
|
|
25
|
-
is_enterprise: mongodb_build_info_1.default.isEnterprise(buildInfo),
|
|
26
|
-
auth_type,
|
|
27
|
-
is_data_lake,
|
|
28
|
-
dl_version,
|
|
29
|
-
atlas_version: (_a = atlasVersion === null || atlasVersion === void 0 ? void 0 : atlasVersion.atlasVersion) !== null && _a !== void 0 ? _a : null,
|
|
30
|
-
is_genuine,
|
|
31
|
-
non_genuine_server_name
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
exports.default = getConnectInfo;
|
|
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
|
+
const mongodb_build_info_1 = __importDefault(require("mongodb-build-info"));
|
|
7
|
+
function getConnectInfo(uri, mongoshVersion, buildInfo, cmdLineOpts, atlasVersion, topology) {
|
|
8
|
+
var _a;
|
|
9
|
+
buildInfo !== null && buildInfo !== void 0 ? buildInfo : (buildInfo = {});
|
|
10
|
+
const { isGenuine: is_genuine, serverName: non_genuine_server_name } = mongodb_build_info_1.default.getGenuineMongoDB(buildInfo, cmdLineOpts);
|
|
11
|
+
const { isDataLake: is_data_lake, dlVersion: dl_version } = mongodb_build_info_1.default.getDataLake(buildInfo);
|
|
12
|
+
const auth_type = topology.s.credentials
|
|
13
|
+
? topology.s.credentials.mechanism : null;
|
|
14
|
+
const { serverOs: server_os, serverArch: server_arch } = mongodb_build_info_1.default.getBuildEnv(buildInfo);
|
|
15
|
+
return {
|
|
16
|
+
is_atlas: !!(atlasVersion === null || atlasVersion === void 0 ? void 0 : atlasVersion.atlasVersion) || mongodb_build_info_1.default.isAtlas(uri),
|
|
17
|
+
is_localhost: mongodb_build_info_1.default.isLocalhost(uri),
|
|
18
|
+
is_do: mongodb_build_info_1.default.isDigitalOcean(uri),
|
|
19
|
+
server_version: buildInfo.version,
|
|
20
|
+
node_version: process.version,
|
|
21
|
+
mongosh_version: mongoshVersion,
|
|
22
|
+
server_os,
|
|
23
|
+
uri,
|
|
24
|
+
server_arch,
|
|
25
|
+
is_enterprise: mongodb_build_info_1.default.isEnterprise(buildInfo),
|
|
26
|
+
auth_type,
|
|
27
|
+
is_data_lake,
|
|
28
|
+
dl_version,
|
|
29
|
+
atlas_version: (_a = atlasVersion === null || atlasVersion === void 0 ? void 0 : atlasVersion.atlasVersion) !== null && _a !== void 0 ? _a : null,
|
|
30
|
+
is_genuine,
|
|
31
|
+
non_genuine_server_name
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
exports.default = getConnectInfo;
|
|
35
35
|
//# sourceMappingURL=connect-info.js.map
|
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"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import './textencoder-polyfill';
|
|
2
|
-
import ServiceProvider, { ServiceProviderCore } from './service-provider';
|
|
3
|
-
import getConnectInfo, { ConnectInfo } from './connect-info';
|
|
4
|
-
import { ReplPlatform } from './platform';
|
|
5
|
-
import CliOptions from './cli-options';
|
|
6
|
-
import generateUri from './uri-generator';
|
|
7
|
-
declare const DEFAULT_DB = "test";
|
|
8
|
-
import { ObjectId, DBRef, MaxKey, MinKey, Timestamp, BSONSymbol, Code, Decimal128, Int32, Long, Binary, calculateObjectSize, Double, EJSON, BSONRegExp } from 'bson';
|
|
9
|
-
import { bsonStringifiers } from './printable-bson';
|
|
10
|
-
import ShellAuthOptions from './shell-auth-options';
|
|
11
|
-
export * from './all-transport-types';
|
|
12
|
-
export * from './all-fle-types';
|
|
13
|
-
declare const bson: {
|
|
14
|
-
ObjectId: typeof ObjectId;
|
|
15
|
-
DBRef: typeof DBRef;
|
|
16
|
-
MaxKey: typeof MaxKey;
|
|
17
|
-
MinKey: typeof MinKey;
|
|
18
|
-
Timestamp: typeof Timestamp;
|
|
19
|
-
BSONSymbol: typeof BSONSymbol;
|
|
20
|
-
Code: typeof Code;
|
|
21
|
-
Decimal128: typeof Decimal128;
|
|
22
|
-
Int32: typeof Int32;
|
|
23
|
-
Long: typeof Long;
|
|
24
|
-
Binary: typeof Binary;
|
|
25
|
-
Map: MapConstructor;
|
|
26
|
-
calculateObjectSize: typeof calculateObjectSize;
|
|
27
|
-
Double: typeof Double;
|
|
28
|
-
EJSON: typeof EJSON;
|
|
29
|
-
BSONRegExp: typeof BSONRegExp;
|
|
30
|
-
};
|
|
31
|
-
export { ServiceProvider, ShellAuthOptions, getConnectInfo, ReplPlatform, CliOptions, generateUri, DEFAULT_DB, ServiceProviderCore, bson, bsonStringifiers, ConnectInfo };
|
|
1
|
+
import './textencoder-polyfill';
|
|
2
|
+
import ServiceProvider, { ServiceProviderCore } from './service-provider';
|
|
3
|
+
import getConnectInfo, { ConnectInfo } from './connect-info';
|
|
4
|
+
import { ReplPlatform } from './platform';
|
|
5
|
+
import CliOptions from './cli-options';
|
|
6
|
+
import generateUri from './uri-generator';
|
|
7
|
+
declare const DEFAULT_DB = "test";
|
|
8
|
+
import { ObjectId, DBRef, MaxKey, MinKey, Timestamp, BSONSymbol, Code, Decimal128, Int32, Long, Binary, calculateObjectSize, Double, EJSON, BSONRegExp } from 'bson';
|
|
9
|
+
import { bsonStringifiers } from './printable-bson';
|
|
10
|
+
import ShellAuthOptions from './shell-auth-options';
|
|
11
|
+
export * from './all-transport-types';
|
|
12
|
+
export * from './all-fle-types';
|
|
13
|
+
declare const bson: {
|
|
14
|
+
ObjectId: typeof ObjectId;
|
|
15
|
+
DBRef: typeof DBRef;
|
|
16
|
+
MaxKey: typeof MaxKey;
|
|
17
|
+
MinKey: typeof MinKey;
|
|
18
|
+
Timestamp: typeof Timestamp;
|
|
19
|
+
BSONSymbol: typeof BSONSymbol;
|
|
20
|
+
Code: typeof Code;
|
|
21
|
+
Decimal128: typeof Decimal128;
|
|
22
|
+
Int32: typeof Int32;
|
|
23
|
+
Long: typeof Long;
|
|
24
|
+
Binary: typeof Binary;
|
|
25
|
+
Map: MapConstructor;
|
|
26
|
+
calculateObjectSize: typeof calculateObjectSize;
|
|
27
|
+
Double: typeof Double;
|
|
28
|
+
EJSON: typeof EJSON;
|
|
29
|
+
BSONRegExp: typeof BSONRegExp;
|
|
30
|
+
};
|
|
31
|
+
export { ServiceProvider, ShellAuthOptions, getConnectInfo, ReplPlatform, CliOptions, generateUri, DEFAULT_DB, ServiceProviderCore, bson, bsonStringifiers, ConnectInfo };
|
package/lib/index.js
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
-
};
|
|
19
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.bsonStringifiers = exports.bson = exports.ServiceProviderCore = exports.DEFAULT_DB = exports.generateUri = exports.ReplPlatform = exports.getConnectInfo = void 0;
|
|
21
|
-
require("./textencoder-polyfill");
|
|
22
|
-
const service_provider_1 = require("./service-provider");
|
|
23
|
-
Object.defineProperty(exports, "ServiceProviderCore", { enumerable: true, get: function () { return service_provider_1.ServiceProviderCore; } });
|
|
24
|
-
const connect_info_1 = __importDefault(require("./connect-info"));
|
|
25
|
-
exports.getConnectInfo = connect_info_1.default;
|
|
26
|
-
const platform_1 = require("./platform");
|
|
27
|
-
Object.defineProperty(exports, "ReplPlatform", { enumerable: true, get: function () { return platform_1.ReplPlatform; } });
|
|
28
|
-
const uri_generator_1 = __importDefault(require("./uri-generator"));
|
|
29
|
-
exports.generateUri = uri_generator_1.default;
|
|
30
|
-
const DEFAULT_DB = 'test';
|
|
31
|
-
exports.DEFAULT_DB = DEFAULT_DB;
|
|
32
|
-
const bson_1 = require("bson");
|
|
33
|
-
const printable_bson_1 = require("./printable-bson");
|
|
34
|
-
Object.defineProperty(exports, "bsonStringifiers", { enumerable: true, get: function () { return printable_bson_1.bsonStringifiers; } });
|
|
35
|
-
__exportStar(require("./all-transport-types"), exports);
|
|
36
|
-
__exportStar(require("./all-fle-types"), exports);
|
|
37
|
-
const bson = {
|
|
38
|
-
ObjectId: bson_1.ObjectId,
|
|
39
|
-
DBRef: bson_1.DBRef,
|
|
40
|
-
MaxKey: bson_1.MaxKey,
|
|
41
|
-
MinKey: bson_1.MinKey,
|
|
42
|
-
Timestamp: bson_1.Timestamp,
|
|
43
|
-
BSONSymbol: bson_1.BSONSymbol,
|
|
44
|
-
Code: bson_1.Code,
|
|
45
|
-
Decimal128: bson_1.Decimal128,
|
|
46
|
-
Int32: bson_1.Int32,
|
|
47
|
-
Long: bson_1.Long,
|
|
48
|
-
Binary: bson_1.Binary,
|
|
49
|
-
Map: bson_1.Map,
|
|
50
|
-
calculateObjectSize: bson_1.calculateObjectSize,
|
|
51
|
-
Double: bson_1.Double,
|
|
52
|
-
EJSON: bson_1.EJSON,
|
|
53
|
-
BSONRegExp: bson_1.BSONRegExp
|
|
54
|
-
};
|
|
55
|
-
exports.bson = bson;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.bsonStringifiers = exports.bson = exports.ServiceProviderCore = exports.DEFAULT_DB = exports.generateUri = exports.ReplPlatform = exports.getConnectInfo = void 0;
|
|
21
|
+
require("./textencoder-polyfill");
|
|
22
|
+
const service_provider_1 = require("./service-provider");
|
|
23
|
+
Object.defineProperty(exports, "ServiceProviderCore", { enumerable: true, get: function () { return service_provider_1.ServiceProviderCore; } });
|
|
24
|
+
const connect_info_1 = __importDefault(require("./connect-info"));
|
|
25
|
+
exports.getConnectInfo = connect_info_1.default;
|
|
26
|
+
const platform_1 = require("./platform");
|
|
27
|
+
Object.defineProperty(exports, "ReplPlatform", { enumerable: true, get: function () { return platform_1.ReplPlatform; } });
|
|
28
|
+
const uri_generator_1 = __importDefault(require("./uri-generator"));
|
|
29
|
+
exports.generateUri = uri_generator_1.default;
|
|
30
|
+
const DEFAULT_DB = 'test';
|
|
31
|
+
exports.DEFAULT_DB = DEFAULT_DB;
|
|
32
|
+
const bson_1 = require("bson");
|
|
33
|
+
const printable_bson_1 = require("./printable-bson");
|
|
34
|
+
Object.defineProperty(exports, "bsonStringifiers", { enumerable: true, get: function () { return printable_bson_1.bsonStringifiers; } });
|
|
35
|
+
__exportStar(require("./all-transport-types"), exports);
|
|
36
|
+
__exportStar(require("./all-fle-types"), exports);
|
|
37
|
+
const bson = {
|
|
38
|
+
ObjectId: bson_1.ObjectId,
|
|
39
|
+
DBRef: bson_1.DBRef,
|
|
40
|
+
MaxKey: bson_1.MaxKey,
|
|
41
|
+
MinKey: bson_1.MinKey,
|
|
42
|
+
Timestamp: bson_1.Timestamp,
|
|
43
|
+
BSONSymbol: bson_1.BSONSymbol,
|
|
44
|
+
Code: bson_1.Code,
|
|
45
|
+
Decimal128: bson_1.Decimal128,
|
|
46
|
+
Int32: bson_1.Int32,
|
|
47
|
+
Long: bson_1.Long,
|
|
48
|
+
Binary: bson_1.Binary,
|
|
49
|
+
Map: bson_1.Map,
|
|
50
|
+
calculateObjectSize: bson_1.calculateObjectSize,
|
|
51
|
+
Double: bson_1.Double,
|
|
52
|
+
EJSON: bson_1.EJSON,
|
|
53
|
+
BSONRegExp: bson_1.BSONRegExp
|
|
54
|
+
};
|
|
55
|
+
exports.bson = bson;
|
|
56
56
|
//# sourceMappingURL=index.js.map
|
package/lib/platform.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare enum ReplPlatform {
|
|
2
|
-
Compass = 0,
|
|
3
|
-
Browser = 1,
|
|
4
|
-
CLI = 2,
|
|
5
|
-
JavaShell = 3
|
|
6
|
-
}
|
|
1
|
+
export declare enum ReplPlatform {
|
|
2
|
+
Compass = 0,
|
|
3
|
+
Browser = 1,
|
|
4
|
+
CLI = 2,
|
|
5
|
+
JavaShell = 3
|
|
6
|
+
}
|
package/lib/platform.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ReplPlatform = void 0;
|
|
4
|
-
var ReplPlatform;
|
|
5
|
-
(function (ReplPlatform) {
|
|
6
|
-
ReplPlatform[ReplPlatform["Compass"] = 0] = "Compass";
|
|
7
|
-
ReplPlatform[ReplPlatform["Browser"] = 1] = "Browser";
|
|
8
|
-
ReplPlatform[ReplPlatform["CLI"] = 2] = "CLI";
|
|
9
|
-
ReplPlatform[ReplPlatform["JavaShell"] = 3] = "JavaShell";
|
|
10
|
-
})(ReplPlatform = exports.ReplPlatform || (exports.ReplPlatform = {}));
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReplPlatform = void 0;
|
|
4
|
+
var ReplPlatform;
|
|
5
|
+
(function (ReplPlatform) {
|
|
6
|
+
ReplPlatform[ReplPlatform["Compass"] = 0] = "Compass";
|
|
7
|
+
ReplPlatform[ReplPlatform["Browser"] = 1] = "Browser";
|
|
8
|
+
ReplPlatform[ReplPlatform["CLI"] = 2] = "CLI";
|
|
9
|
+
ReplPlatform[ReplPlatform["JavaShell"] = 3] = "JavaShell";
|
|
10
|
+
})(ReplPlatform = exports.ReplPlatform || (exports.ReplPlatform = {}));
|
|
11
11
|
//# sourceMappingURL=platform.js.map
|
package/lib/printable-bson.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { bson as BSON } from './index';
|
|
2
|
-
export declare const bsonStringifiers: Record<string, (this: any, depth: any, options: any) => string>;
|
|
3
|
-
export default function (bson?: typeof BSON): void;
|
|
1
|
+
import { bson as BSON } from './index';
|
|
2
|
+
export declare const bsonStringifiers: Record<string, (this: any, depth: any, options: any) => string>;
|
|
3
|
+
export default function (bson?: typeof BSON): void;
|