@depup/mongodb 7.1.0-depup.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/LICENSE.md +201 -0
- package/README.md +33 -0
- package/etc/prepare.js +12 -0
- package/lib/admin.js +136 -0
- package/lib/admin.js.map +1 -0
- package/lib/bson.js +85 -0
- package/lib/bson.js.map +1 -0
- package/lib/bulk/common.js +835 -0
- package/lib/bulk/common.js.map +1 -0
- package/lib/bulk/ordered.js +67 -0
- package/lib/bulk/ordered.js.map +1 -0
- package/lib/bulk/unordered.js +92 -0
- package/lib/bulk/unordered.js.map +1 -0
- package/lib/change_stream.js +513 -0
- package/lib/change_stream.js.map +1 -0
- package/lib/client-side-encryption/auto_encrypter.js +272 -0
- package/lib/client-side-encryption/auto_encrypter.js.map +1 -0
- package/lib/client-side-encryption/client_encryption.js +609 -0
- package/lib/client-side-encryption/client_encryption.js.map +1 -0
- package/lib/client-side-encryption/errors.js +138 -0
- package/lib/client-side-encryption/errors.js.map +1 -0
- package/lib/client-side-encryption/mongocryptd_manager.js +85 -0
- package/lib/client-side-encryption/mongocryptd_manager.js.map +1 -0
- package/lib/client-side-encryption/providers/aws.js +23 -0
- package/lib/client-side-encryption/providers/aws.js.map +1 -0
- package/lib/client-side-encryption/providers/azure.js +132 -0
- package/lib/client-side-encryption/providers/azure.js.map +1 -0
- package/lib/client-side-encryption/providers/gcp.js +16 -0
- package/lib/client-side-encryption/providers/gcp.js.map +1 -0
- package/lib/client-side-encryption/providers/index.js +43 -0
- package/lib/client-side-encryption/providers/index.js.map +1 -0
- package/lib/client-side-encryption/state_machine.js +427 -0
- package/lib/client-side-encryption/state_machine.js.map +1 -0
- package/lib/cmap/auth/auth_provider.js +51 -0
- package/lib/cmap/auth/auth_provider.js.map +1 -0
- package/lib/cmap/auth/aws4.js +161 -0
- package/lib/cmap/auth/aws4.js.map +1 -0
- package/lib/cmap/auth/aws_temporary_credentials.js +103 -0
- package/lib/cmap/auth/aws_temporary_credentials.js.map +1 -0
- package/lib/cmap/auth/gssapi.js +155 -0
- package/lib/cmap/auth/gssapi.js.map +1 -0
- package/lib/cmap/auth/mongo_credentials.js +169 -0
- package/lib/cmap/auth/mongo_credentials.js.map +1 -0
- package/lib/cmap/auth/mongodb_aws.js +128 -0
- package/lib/cmap/auth/mongodb_aws.js.map +1 -0
- package/lib/cmap/auth/mongodb_oidc/automated_callback_workflow.js +84 -0
- package/lib/cmap/auth/mongodb_oidc/automated_callback_workflow.js.map +1 -0
- package/lib/cmap/auth/mongodb_oidc/azure_machine_workflow.js +62 -0
- package/lib/cmap/auth/mongodb_oidc/azure_machine_workflow.js.map +1 -0
- package/lib/cmap/auth/mongodb_oidc/callback_workflow.js +141 -0
- package/lib/cmap/auth/mongodb_oidc/callback_workflow.js.map +1 -0
- package/lib/cmap/auth/mongodb_oidc/command_builders.js +44 -0
- package/lib/cmap/auth/mongodb_oidc/command_builders.js.map +1 -0
- package/lib/cmap/auth/mongodb_oidc/gcp_machine_workflow.js +39 -0
- package/lib/cmap/auth/mongodb_oidc/gcp_machine_workflow.js.map +1 -0
- package/lib/cmap/auth/mongodb_oidc/human_callback_workflow.js +122 -0
- package/lib/cmap/auth/mongodb_oidc/human_callback_workflow.js.map +1 -0
- package/lib/cmap/auth/mongodb_oidc/k8s_machine_workflow.js +32 -0
- package/lib/cmap/auth/mongodb_oidc/k8s_machine_workflow.js.map +1 -0
- package/lib/cmap/auth/mongodb_oidc/token_cache.js +52 -0
- package/lib/cmap/auth/mongodb_oidc/token_cache.js.map +1 -0
- package/lib/cmap/auth/mongodb_oidc/token_machine_workflow.js +23 -0
- package/lib/cmap/auth/mongodb_oidc/token_machine_workflow.js.map +1 -0
- package/lib/cmap/auth/mongodb_oidc.js +73 -0
- package/lib/cmap/auth/mongodb_oidc.js.map +1 -0
- package/lib/cmap/auth/plain.js +26 -0
- package/lib/cmap/auth/plain.js.map +1 -0
- package/lib/cmap/auth/providers.js +22 -0
- package/lib/cmap/auth/providers.js.map +1 -0
- package/lib/cmap/auth/scram.js +254 -0
- package/lib/cmap/auth/scram.js.map +1 -0
- package/lib/cmap/auth/x509.js +36 -0
- package/lib/cmap/auth/x509.js.map +1 -0
- package/lib/cmap/command_monitoring_events.js +223 -0
- package/lib/cmap/command_monitoring_events.js.map +1 -0
- package/lib/cmap/commands.js +535 -0
- package/lib/cmap/commands.js.map +1 -0
- package/lib/cmap/connect.js +381 -0
- package/lib/cmap/connect.js.map +1 -0
- package/lib/cmap/connection.js +571 -0
- package/lib/cmap/connection.js.map +1 -0
- package/lib/cmap/connection_pool.js +558 -0
- package/lib/cmap/connection_pool.js.map +1 -0
- package/lib/cmap/connection_pool_events.js +190 -0
- package/lib/cmap/connection_pool_events.js.map +1 -0
- package/lib/cmap/errors.js +108 -0
- package/lib/cmap/errors.js.map +1 -0
- package/lib/cmap/handshake/client_metadata.js +242 -0
- package/lib/cmap/handshake/client_metadata.js.map +1 -0
- package/lib/cmap/metrics.js +62 -0
- package/lib/cmap/metrics.js.map +1 -0
- package/lib/cmap/stream_description.js +70 -0
- package/lib/cmap/stream_description.js.map +1 -0
- package/lib/cmap/wire_protocol/compression.js +178 -0
- package/lib/cmap/wire_protocol/compression.js.map +1 -0
- package/lib/cmap/wire_protocol/constants.js +21 -0
- package/lib/cmap/wire_protocol/constants.js.map +1 -0
- package/lib/cmap/wire_protocol/on_data.js +111 -0
- package/lib/cmap/wire_protocol/on_data.js.map +1 -0
- package/lib/cmap/wire_protocol/on_demand/document.js +222 -0
- package/lib/cmap/wire_protocol/on_demand/document.js.map +1 -0
- package/lib/cmap/wire_protocol/responses.js +315 -0
- package/lib/cmap/wire_protocol/responses.js.map +1 -0
- package/lib/cmap/wire_protocol/shared.js +35 -0
- package/lib/cmap/wire_protocol/shared.js.map +1 -0
- package/lib/collection.js +751 -0
- package/lib/collection.js.map +1 -0
- package/lib/connection_string.js +1090 -0
- package/lib/connection_string.js.map +1 -0
- package/lib/constants.js +170 -0
- package/lib/constants.js.map +1 -0
- package/lib/cursor/abstract_cursor.js +924 -0
- package/lib/cursor/abstract_cursor.js.map +1 -0
- package/lib/cursor/aggregation_cursor.js +164 -0
- package/lib/cursor/aggregation_cursor.js.map +1 -0
- package/lib/cursor/change_stream_cursor.js +104 -0
- package/lib/cursor/change_stream_cursor.js.map +1 -0
- package/lib/cursor/client_bulk_write_cursor.js +52 -0
- package/lib/cursor/client_bulk_write_cursor.js.map +1 -0
- package/lib/cursor/explainable_cursor.js +36 -0
- package/lib/cursor/explainable_cursor.js.map +1 -0
- package/lib/cursor/find_cursor.js +399 -0
- package/lib/cursor/find_cursor.js.map +1 -0
- package/lib/cursor/list_collections_cursor.js +34 -0
- package/lib/cursor/list_collections_cursor.js.map +1 -0
- package/lib/cursor/list_indexes_cursor.js +32 -0
- package/lib/cursor/list_indexes_cursor.js.map +1 -0
- package/lib/cursor/list_search_indexes_cursor.js +14 -0
- package/lib/cursor/list_search_indexes_cursor.js.map +1 -0
- package/lib/cursor/run_command_cursor.js +94 -0
- package/lib/cursor/run_command_cursor.js.map +1 -0
- package/lib/db.js +419 -0
- package/lib/db.js.map +1 -0
- package/lib/deps.js +112 -0
- package/lib/deps.js.map +1 -0
- package/lib/encrypter.js +106 -0
- package/lib/encrypter.js.map +1 -0
- package/lib/error.js +1380 -0
- package/lib/error.js.map +1 -0
- package/lib/explain.js +59 -0
- package/lib/explain.js.map +1 -0
- package/lib/gridfs/download.js +305 -0
- package/lib/gridfs/download.js.map +1 -0
- package/lib/gridfs/index.js +164 -0
- package/lib/gridfs/index.js.map +1 -0
- package/lib/gridfs/upload.js +358 -0
- package/lib/gridfs/upload.js.map +1 -0
- package/lib/index.js +193 -0
- package/lib/index.js.map +1 -0
- package/lib/mongo_client.js +557 -0
- package/lib/mongo_client.js.map +1 -0
- package/lib/mongo_client_auth_providers.js +80 -0
- package/lib/mongo_client_auth_providers.js.map +1 -0
- package/lib/mongo_logger.js +655 -0
- package/lib/mongo_logger.js.map +1 -0
- package/lib/mongo_types.js +56 -0
- package/lib/mongo_types.js.map +1 -0
- package/lib/operations/aggregate.js +90 -0
- package/lib/operations/aggregate.js.map +1 -0
- package/lib/operations/client_bulk_write/client_bulk_write.js +51 -0
- package/lib/operations/client_bulk_write/client_bulk_write.js.map +1 -0
- package/lib/operations/client_bulk_write/command_builder.js +340 -0
- package/lib/operations/client_bulk_write/command_builder.js.map +1 -0
- package/lib/operations/client_bulk_write/common.js +3 -0
- package/lib/operations/client_bulk_write/common.js.map +1 -0
- package/lib/operations/client_bulk_write/executor.js +120 -0
- package/lib/operations/client_bulk_write/executor.js.map +1 -0
- package/lib/operations/client_bulk_write/results_merger.js +204 -0
- package/lib/operations/client_bulk_write/results_merger.js.map +1 -0
- package/lib/operations/command.js +83 -0
- package/lib/operations/command.js.map +1 -0
- package/lib/operations/count.js +45 -0
- package/lib/operations/count.js.map +1 -0
- package/lib/operations/create_collection.js +109 -0
- package/lib/operations/create_collection.js.map +1 -0
- package/lib/operations/delete.js +125 -0
- package/lib/operations/delete.js.map +1 -0
- package/lib/operations/distinct.js +61 -0
- package/lib/operations/distinct.js.map +1 -0
- package/lib/operations/drop.js +93 -0
- package/lib/operations/drop.js.map +1 -0
- package/lib/operations/end_sessions.js +34 -0
- package/lib/operations/end_sessions.js.map +1 -0
- package/lib/operations/estimated_document_count.js +41 -0
- package/lib/operations/estimated_document_count.js.map +1 -0
- package/lib/operations/execute_operation.js +239 -0
- package/lib/operations/execute_operation.js.map +1 -0
- package/lib/operations/find.js +148 -0
- package/lib/operations/find.js.map +1 -0
- package/lib/operations/find_and_modify.js +158 -0
- package/lib/operations/find_and_modify.js.map +1 -0
- package/lib/operations/get_more.js +62 -0
- package/lib/operations/get_more.js.map +1 -0
- package/lib/operations/indexes.js +186 -0
- package/lib/operations/indexes.js.map +1 -0
- package/lib/operations/insert.js +70 -0
- package/lib/operations/insert.js.map +1 -0
- package/lib/operations/kill_cursors.js +43 -0
- package/lib/operations/kill_cursors.js.map +1 -0
- package/lib/operations/list_collections.js +53 -0
- package/lib/operations/list_collections.js.map +1 -0
- package/lib/operations/list_databases.js +40 -0
- package/lib/operations/list_databases.js.map +1 -0
- package/lib/operations/operation.js +102 -0
- package/lib/operations/operation.js.map +1 -0
- package/lib/operations/profiling_level.js +43 -0
- package/lib/operations/profiling_level.js.map +1 -0
- package/lib/operations/remove_user.js +27 -0
- package/lib/operations/remove_user.js.map +1 -0
- package/lib/operations/rename.js +38 -0
- package/lib/operations/rename.js.map +1 -0
- package/lib/operations/run_command.js +47 -0
- package/lib/operations/run_command.js.map +1 -0
- package/lib/operations/search_indexes/create.js +33 -0
- package/lib/operations/search_indexes/create.js.map +1 -0
- package/lib/operations/search_indexes/drop.js +43 -0
- package/lib/operations/search_indexes/drop.js.map +1 -0
- package/lib/operations/search_indexes/update.js +35 -0
- package/lib/operations/search_indexes/update.js.map +1 -0
- package/lib/operations/set_profiling_level.js +53 -0
- package/lib/operations/set_profiling_level.js.map +1 -0
- package/lib/operations/stats.js +27 -0
- package/lib/operations/stats.js.map +1 -0
- package/lib/operations/update.js +188 -0
- package/lib/operations/update.js.map +1 -0
- package/lib/operations/validate_collection.js +37 -0
- package/lib/operations/validate_collection.js.map +1 -0
- package/lib/read_concern.js +73 -0
- package/lib/read_concern.js.map +1 -0
- package/lib/read_preference.js +191 -0
- package/lib/read_preference.js.map +1 -0
- package/lib/sdam/common.js +49 -0
- package/lib/sdam/common.js.map +1 -0
- package/lib/sdam/events.js +146 -0
- package/lib/sdam/events.js.map +1 -0
- package/lib/sdam/monitor.js +544 -0
- package/lib/sdam/monitor.js.map +1 -0
- package/lib/sdam/server.js +404 -0
- package/lib/sdam/server.js.map +1 -0
- package/lib/sdam/server_description.js +204 -0
- package/lib/sdam/server_description.js.map +1 -0
- package/lib/sdam/server_selection.js +294 -0
- package/lib/sdam/server_selection.js.map +1 -0
- package/lib/sdam/server_selection_events.js +85 -0
- package/lib/sdam/server_selection_events.js.map +1 -0
- package/lib/sdam/srv_polling.js +108 -0
- package/lib/sdam/srv_polling.js.map +1 -0
- package/lib/sdam/topology.js +652 -0
- package/lib/sdam/topology.js.map +1 -0
- package/lib/sdam/topology_description.js +383 -0
- package/lib/sdam/topology_description.js.map +1 -0
- package/lib/sessions.js +892 -0
- package/lib/sessions.js.map +1 -0
- package/lib/sort.js +103 -0
- package/lib/sort.js.map +1 -0
- package/lib/timeout.js +296 -0
- package/lib/timeout.js.map +1 -0
- package/lib/transactions.js +135 -0
- package/lib/transactions.js.map +1 -0
- package/lib/utils.js +1163 -0
- package/lib/utils.js.map +1 -0
- package/lib/write_concern.js +100 -0
- package/lib/write_concern.js.map +1 -0
- package/mongodb.d.ts +9018 -0
- package/package.json +197 -0
- package/src/admin.ts +173 -0
- package/src/bson.ts +149 -0
- package/src/bulk/common.ts +1251 -0
- package/src/bulk/ordered.ts +83 -0
- package/src/bulk/unordered.ts +115 -0
- package/src/change_stream.ts +1160 -0
- package/src/client-side-encryption/auto_encrypter.ts +469 -0
- package/src/client-side-encryption/client_encryption.ts +1150 -0
- package/src/client-side-encryption/errors.ts +144 -0
- package/src/client-side-encryption/mongocryptd_manager.ts +100 -0
- package/src/client-side-encryption/providers/aws.ts +33 -0
- package/src/client-side-encryption/providers/azure.ts +181 -0
- package/src/client-side-encryption/providers/gcp.ts +16 -0
- package/src/client-side-encryption/providers/index.ts +207 -0
- package/src/client-side-encryption/state_machine.ts +651 -0
- package/src/cmap/auth/auth_provider.ts +77 -0
- package/src/cmap/auth/aws4.ts +207 -0
- package/src/cmap/auth/aws_temporary_credentials.ts +129 -0
- package/src/cmap/auth/gssapi.ts +203 -0
- package/src/cmap/auth/mongo_credentials.ts +292 -0
- package/src/cmap/auth/mongodb_aws.ts +179 -0
- package/src/cmap/auth/mongodb_oidc/automated_callback_workflow.ts +88 -0
- package/src/cmap/auth/mongodb_oidc/azure_machine_workflow.ts +73 -0
- package/src/cmap/auth/mongodb_oidc/callback_workflow.ts +188 -0
- package/src/cmap/auth/mongodb_oidc/command_builders.ts +53 -0
- package/src/cmap/auth/mongodb_oidc/gcp_machine_workflow.ts +46 -0
- package/src/cmap/auth/mongodb_oidc/human_callback_workflow.ts +141 -0
- package/src/cmap/auth/mongodb_oidc/k8s_machine_workflow.ts +31 -0
- package/src/cmap/auth/mongodb_oidc/token_cache.ts +62 -0
- package/src/cmap/auth/mongodb_oidc/token_machine_workflow.ts +22 -0
- package/src/cmap/auth/mongodb_oidc.ts +185 -0
- package/src/cmap/auth/plain.ts +25 -0
- package/src/cmap/auth/providers.ts +22 -0
- package/src/cmap/auth/scram.ts +344 -0
- package/src/cmap/auth/x509.ts +43 -0
- package/src/cmap/command_monitoring_events.ts +316 -0
- package/src/cmap/commands.ts +788 -0
- package/src/cmap/connect.ts +518 -0
- package/src/cmap/connection.ts +931 -0
- package/src/cmap/connection_pool.ts +831 -0
- package/src/cmap/connection_pool_events.ts +300 -0
- package/src/cmap/errors.ts +119 -0
- package/src/cmap/handshake/client_metadata.ts +353 -0
- package/src/cmap/metrics.ts +58 -0
- package/src/cmap/stream_description.ts +96 -0
- package/src/cmap/wire_protocol/compression.ts +211 -0
- package/src/cmap/wire_protocol/constants.ts +17 -0
- package/src/cmap/wire_protocol/on_data.ts +139 -0
- package/src/cmap/wire_protocol/on_demand/document.ts +358 -0
- package/src/cmap/wire_protocol/responses.ts +393 -0
- package/src/cmap/wire_protocol/shared.ts +48 -0
- package/src/collection.ts +1314 -0
- package/src/connection_string.ts +1297 -0
- package/src/constants.ts +176 -0
- package/src/cursor/abstract_cursor.ts +1247 -0
- package/src/cursor/aggregation_cursor.ts +245 -0
- package/src/cursor/change_stream_cursor.ts +171 -0
- package/src/cursor/client_bulk_write_cursor.ts +83 -0
- package/src/cursor/explainable_cursor.ts +51 -0
- package/src/cursor/find_cursor.ts +497 -0
- package/src/cursor/list_collections_cursor.ts +50 -0
- package/src/cursor/list_indexes_cursor.ts +37 -0
- package/src/cursor/list_search_indexes_cursor.ts +20 -0
- package/src/cursor/run_command_cursor.ts +178 -0
- package/src/db.ts +621 -0
- package/src/deps.ts +227 -0
- package/src/encrypter.ts +127 -0
- package/src/error.ts +1567 -0
- package/src/explain.ts +124 -0
- package/src/gridfs/download.ts +483 -0
- package/src/gridfs/index.ts +264 -0
- package/src/gridfs/upload.ts +537 -0
- package/src/index.ts +633 -0
- package/src/mongo_client.ts +1155 -0
- package/src/mongo_client_auth_providers.ts +87 -0
- package/src/mongo_logger.ts +1081 -0
- package/src/mongo_types.ts +678 -0
- package/src/operations/aggregate.ts +153 -0
- package/src/operations/client_bulk_write/client_bulk_write.ts +72 -0
- package/src/operations/client_bulk_write/command_builder.ts +487 -0
- package/src/operations/client_bulk_write/common.ts +276 -0
- package/src/operations/client_bulk_write/executor.ts +149 -0
- package/src/operations/client_bulk_write/results_merger.ts +260 -0
- package/src/operations/command.ts +171 -0
- package/src/operations/count.ts +74 -0
- package/src/operations/create_collection.ts +218 -0
- package/src/operations/delete.ts +183 -0
- package/src/operations/distinct.ts +92 -0
- package/src/operations/drop.ts +130 -0
- package/src/operations/end_sessions.ts +44 -0
- package/src/operations/estimated_document_count.ts +61 -0
- package/src/operations/execute_operation.ts +319 -0
- package/src/operations/find.ts +254 -0
- package/src/operations/find_and_modify.ts +319 -0
- package/src/operations/get_more.ts +108 -0
- package/src/operations/indexes.ts +418 -0
- package/src/operations/insert.ts +108 -0
- package/src/operations/kill_cursors.ts +64 -0
- package/src/operations/list_collections.ts +108 -0
- package/src/operations/list_databases.ts +68 -0
- package/src/operations/operation.ts +181 -0
- package/src/operations/profiling_level.ts +46 -0
- package/src/operations/remove_user.ts +36 -0
- package/src/operations/rename.ts +60 -0
- package/src/operations/run_command.ts +79 -0
- package/src/operations/search_indexes/create.ts +56 -0
- package/src/operations/search_indexes/drop.ts +58 -0
- package/src/operations/search_indexes/update.ts +45 -0
- package/src/operations/set_profiling_level.ts +74 -0
- package/src/operations/stats.ts +37 -0
- package/src/operations/update.ts +318 -0
- package/src/operations/validate_collection.ts +50 -0
- package/src/read_concern.ts +88 -0
- package/src/read_preference.ts +256 -0
- package/src/sdam/common.ts +74 -0
- package/src/sdam/events.ts +219 -0
- package/src/sdam/monitor.ts +771 -0
- package/src/sdam/server.ts +595 -0
- package/src/sdam/server_description.ts +297 -0
- package/src/sdam/server_selection.ts +415 -0
- package/src/sdam/server_selection_events.ts +142 -0
- package/src/sdam/srv_polling.ts +146 -0
- package/src/sdam/topology.ts +1100 -0
- package/src/sdam/topology_description.ts +548 -0
- package/src/sessions.ts +1244 -0
- package/src/sort.ts +141 -0
- package/src/timeout.ts +405 -0
- package/src/transactions.ts +181 -0
- package/src/utils.ts +1434 -0
- package/src/write_concern.ts +183 -0
- package/tsconfig.json +46 -0
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GridFSBucketWriteStream = void 0;
|
|
4
|
+
const stream_1 = require("stream");
|
|
5
|
+
const bson_1 = require("../bson");
|
|
6
|
+
const abstract_cursor_1 = require("../cursor/abstract_cursor");
|
|
7
|
+
const error_1 = require("../error");
|
|
8
|
+
const timeout_1 = require("../timeout");
|
|
9
|
+
const utils_1 = require("../utils");
|
|
10
|
+
const write_concern_1 = require("./../write_concern");
|
|
11
|
+
/**
|
|
12
|
+
* A writable stream that enables you to write buffers to GridFS.
|
|
13
|
+
*
|
|
14
|
+
* Do not instantiate this class directly. Use `openUploadStream()` instead.
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
class GridFSBucketWriteStream extends stream_1.Writable {
|
|
18
|
+
/**
|
|
19
|
+
* @param bucket - Handle for this stream's corresponding bucket
|
|
20
|
+
* @param filename - The value of the 'filename' key in the files doc
|
|
21
|
+
* @param options - Optional settings.
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
constructor(bucket, filename, options) {
|
|
25
|
+
super();
|
|
26
|
+
/**
|
|
27
|
+
* The document containing information about the inserted file.
|
|
28
|
+
* This property is defined _after_ the finish event has been emitted.
|
|
29
|
+
* It will remain `null` if an error occurs.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* fs.createReadStream('file.txt')
|
|
34
|
+
* .pipe(bucket.openUploadStream('file.txt'))
|
|
35
|
+
* .on('finish', function () {
|
|
36
|
+
* console.log(this.gridFSFile)
|
|
37
|
+
* })
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
this.gridFSFile = null;
|
|
41
|
+
options = options ?? {};
|
|
42
|
+
this.bucket = bucket;
|
|
43
|
+
this.chunks = bucket.s._chunksCollection;
|
|
44
|
+
this.filename = filename;
|
|
45
|
+
this.files = bucket.s._filesCollection;
|
|
46
|
+
this.options = options;
|
|
47
|
+
this.writeConcern = write_concern_1.WriteConcern.fromOptions(options) || bucket.s.options.writeConcern;
|
|
48
|
+
// Signals the write is all done
|
|
49
|
+
this.done = false;
|
|
50
|
+
this.id = options.id ? options.id : new bson_1.ObjectId();
|
|
51
|
+
// properly inherit the default chunksize from parent
|
|
52
|
+
this.chunkSizeBytes = options.chunkSizeBytes || this.bucket.s.options.chunkSizeBytes;
|
|
53
|
+
this.bufToStore = Buffer.alloc(this.chunkSizeBytes);
|
|
54
|
+
this.length = 0;
|
|
55
|
+
this.n = 0;
|
|
56
|
+
this.pos = 0;
|
|
57
|
+
this.state = {
|
|
58
|
+
streamEnd: false,
|
|
59
|
+
outstandingRequests: 0,
|
|
60
|
+
errored: false,
|
|
61
|
+
aborted: false
|
|
62
|
+
};
|
|
63
|
+
if (options.timeoutMS != null)
|
|
64
|
+
this.timeoutContext = new timeout_1.CSOTTimeoutContext({
|
|
65
|
+
timeoutMS: options.timeoutMS,
|
|
66
|
+
serverSelectionTimeoutMS: (0, utils_1.resolveTimeoutOptions)(this.bucket.s.db.client, {})
|
|
67
|
+
.serverSelectionTimeoutMS
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* @internal
|
|
72
|
+
*
|
|
73
|
+
* The stream is considered constructed when the indexes are done being created
|
|
74
|
+
*/
|
|
75
|
+
_construct(callback) {
|
|
76
|
+
if (!this.bucket.s.calledOpenUploadStream) {
|
|
77
|
+
this.bucket.s.calledOpenUploadStream = true;
|
|
78
|
+
checkIndexes(this).then(() => {
|
|
79
|
+
this.bucket.s.checkedIndexes = true;
|
|
80
|
+
this.bucket.emit('index');
|
|
81
|
+
callback();
|
|
82
|
+
}, error => {
|
|
83
|
+
if (error instanceof error_1.MongoOperationTimeoutError) {
|
|
84
|
+
return handleError(this, error, callback);
|
|
85
|
+
}
|
|
86
|
+
(0, utils_1.squashError)(error);
|
|
87
|
+
callback();
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
return queueMicrotask(callback);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* @internal
|
|
96
|
+
* Write a buffer to the stream.
|
|
97
|
+
*
|
|
98
|
+
* @param chunk - Buffer to write
|
|
99
|
+
* @param encoding - Optional encoding for the buffer
|
|
100
|
+
* @param callback - Function to call when the chunk was added to the buffer, or if the entire chunk was persisted to MongoDB if this chunk caused a flush.
|
|
101
|
+
*/
|
|
102
|
+
_write(chunk, encoding, callback) {
|
|
103
|
+
doWrite(this, chunk, encoding, callback);
|
|
104
|
+
}
|
|
105
|
+
/** @internal */
|
|
106
|
+
_final(callback) {
|
|
107
|
+
if (this.state.streamEnd) {
|
|
108
|
+
return queueMicrotask(callback);
|
|
109
|
+
}
|
|
110
|
+
this.state.streamEnd = true;
|
|
111
|
+
writeRemnant(this, callback);
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Places this write stream into an aborted state (all future writes fail)
|
|
115
|
+
* and deletes all chunks that have already been written.
|
|
116
|
+
*/
|
|
117
|
+
async abort() {
|
|
118
|
+
if (this.state.streamEnd) {
|
|
119
|
+
// TODO(NODE-3485): Replace with MongoGridFSStreamClosed
|
|
120
|
+
throw new error_1.MongoAPIError('Cannot abort a stream that has already completed');
|
|
121
|
+
}
|
|
122
|
+
if (this.state.aborted) {
|
|
123
|
+
// TODO(NODE-3485): Replace with MongoGridFSStreamClosed
|
|
124
|
+
throw new error_1.MongoAPIError('Cannot call abort() on a stream twice');
|
|
125
|
+
}
|
|
126
|
+
this.state.aborted = true;
|
|
127
|
+
const remainingTimeMS = this.timeoutContext?.getRemainingTimeMSOrThrow(`Upload timed out after ${this.timeoutContext?.timeoutMS}ms`);
|
|
128
|
+
await this.chunks.deleteMany({ files_id: this.id }, { timeoutMS: remainingTimeMS });
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
exports.GridFSBucketWriteStream = GridFSBucketWriteStream;
|
|
132
|
+
function handleError(stream, error, callback) {
|
|
133
|
+
if (stream.state.errored) {
|
|
134
|
+
queueMicrotask(callback);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
stream.state.errored = true;
|
|
138
|
+
queueMicrotask(() => callback(error));
|
|
139
|
+
}
|
|
140
|
+
function createChunkDoc(filesId, n, data) {
|
|
141
|
+
return {
|
|
142
|
+
_id: new bson_1.ObjectId(),
|
|
143
|
+
files_id: filesId,
|
|
144
|
+
n,
|
|
145
|
+
data
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
async function checkChunksIndex(stream) {
|
|
149
|
+
const index = { files_id: 1, n: 1 };
|
|
150
|
+
let remainingTimeMS;
|
|
151
|
+
remainingTimeMS = stream.timeoutContext?.getRemainingTimeMSOrThrow(`Upload timed out after ${stream.timeoutContext?.timeoutMS}ms`);
|
|
152
|
+
let indexes;
|
|
153
|
+
try {
|
|
154
|
+
indexes = await stream.chunks
|
|
155
|
+
.listIndexes({
|
|
156
|
+
timeoutMode: remainingTimeMS != null ? abstract_cursor_1.CursorTimeoutMode.LIFETIME : undefined,
|
|
157
|
+
timeoutMS: remainingTimeMS
|
|
158
|
+
})
|
|
159
|
+
.toArray();
|
|
160
|
+
}
|
|
161
|
+
catch (error) {
|
|
162
|
+
if (error instanceof error_1.MongoError && error.code === error_1.MONGODB_ERROR_CODES.NamespaceNotFound) {
|
|
163
|
+
indexes = [];
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
throw error;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
const hasChunksIndex = !!indexes.find(index => {
|
|
170
|
+
const keys = Object.keys(index.key);
|
|
171
|
+
if (keys.length === 2 && index.key.files_id === 1 && index.key.n === 1) {
|
|
172
|
+
return true;
|
|
173
|
+
}
|
|
174
|
+
return false;
|
|
175
|
+
});
|
|
176
|
+
if (!hasChunksIndex) {
|
|
177
|
+
remainingTimeMS = stream.timeoutContext?.getRemainingTimeMSOrThrow(`Upload timed out after ${stream.timeoutContext?.timeoutMS}ms`);
|
|
178
|
+
await stream.chunks.createIndex(index, {
|
|
179
|
+
...stream.writeConcern,
|
|
180
|
+
background: true,
|
|
181
|
+
unique: true,
|
|
182
|
+
timeoutMS: remainingTimeMS
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
function checkDone(stream, callback) {
|
|
187
|
+
if (stream.done) {
|
|
188
|
+
return queueMicrotask(callback);
|
|
189
|
+
}
|
|
190
|
+
if (stream.state.streamEnd && stream.state.outstandingRequests === 0 && !stream.state.errored) {
|
|
191
|
+
// Set done so we do not trigger duplicate createFilesDoc
|
|
192
|
+
stream.done = true;
|
|
193
|
+
// Create a new files doc
|
|
194
|
+
const gridFSFile = createFilesDoc(stream.id, stream.length, stream.chunkSizeBytes, stream.filename, stream.options.metadata);
|
|
195
|
+
if (isAborted(stream, callback)) {
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
const remainingTimeMS = stream.timeoutContext?.remainingTimeMS;
|
|
199
|
+
if (remainingTimeMS != null && remainingTimeMS <= 0) {
|
|
200
|
+
return handleError(stream, new error_1.MongoOperationTimeoutError(`Upload timed out after ${stream.timeoutContext?.timeoutMS}ms`), callback);
|
|
201
|
+
}
|
|
202
|
+
stream.files
|
|
203
|
+
.insertOne(gridFSFile, { writeConcern: stream.writeConcern, timeoutMS: remainingTimeMS })
|
|
204
|
+
.then(() => {
|
|
205
|
+
stream.gridFSFile = gridFSFile;
|
|
206
|
+
callback();
|
|
207
|
+
}, error => {
|
|
208
|
+
return handleError(stream, error, callback);
|
|
209
|
+
});
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
queueMicrotask(callback);
|
|
213
|
+
}
|
|
214
|
+
async function checkIndexes(stream) {
|
|
215
|
+
let remainingTimeMS = stream.timeoutContext?.getRemainingTimeMSOrThrow(`Upload timed out after ${stream.timeoutContext?.timeoutMS}ms`);
|
|
216
|
+
const doc = await stream.files.findOne({}, {
|
|
217
|
+
projection: { _id: 1 },
|
|
218
|
+
timeoutMS: remainingTimeMS
|
|
219
|
+
});
|
|
220
|
+
if (doc != null) {
|
|
221
|
+
// If at least one document exists assume the collection has the required index
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
const index = { filename: 1, uploadDate: 1 };
|
|
225
|
+
let indexes;
|
|
226
|
+
remainingTimeMS = stream.timeoutContext?.getRemainingTimeMSOrThrow(`Upload timed out after ${stream.timeoutContext?.timeoutMS}ms`);
|
|
227
|
+
const listIndexesOptions = {
|
|
228
|
+
timeoutMode: remainingTimeMS != null ? abstract_cursor_1.CursorTimeoutMode.LIFETIME : undefined,
|
|
229
|
+
timeoutMS: remainingTimeMS
|
|
230
|
+
};
|
|
231
|
+
try {
|
|
232
|
+
indexes = await stream.files.listIndexes(listIndexesOptions).toArray();
|
|
233
|
+
}
|
|
234
|
+
catch (error) {
|
|
235
|
+
if (error instanceof error_1.MongoError && error.code === error_1.MONGODB_ERROR_CODES.NamespaceNotFound) {
|
|
236
|
+
indexes = [];
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
throw error;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
const hasFileIndex = !!indexes.find(index => {
|
|
243
|
+
const keys = Object.keys(index.key);
|
|
244
|
+
if (keys.length === 2 && index.key.filename === 1 && index.key.uploadDate === 1) {
|
|
245
|
+
return true;
|
|
246
|
+
}
|
|
247
|
+
return false;
|
|
248
|
+
});
|
|
249
|
+
if (!hasFileIndex) {
|
|
250
|
+
remainingTimeMS = stream.timeoutContext?.getRemainingTimeMSOrThrow(`Upload timed out after ${stream.timeoutContext?.timeoutMS}ms`);
|
|
251
|
+
await stream.files.createIndex(index, { background: false, timeoutMS: remainingTimeMS });
|
|
252
|
+
}
|
|
253
|
+
await checkChunksIndex(stream);
|
|
254
|
+
}
|
|
255
|
+
function createFilesDoc(_id, length, chunkSize, filename, metadata) {
|
|
256
|
+
const ret = {
|
|
257
|
+
_id,
|
|
258
|
+
length,
|
|
259
|
+
chunkSize,
|
|
260
|
+
uploadDate: new Date(),
|
|
261
|
+
filename
|
|
262
|
+
};
|
|
263
|
+
if (metadata) {
|
|
264
|
+
ret.metadata = metadata;
|
|
265
|
+
}
|
|
266
|
+
return ret;
|
|
267
|
+
}
|
|
268
|
+
function doWrite(stream, chunk, encoding, callback) {
|
|
269
|
+
if (isAborted(stream, callback)) {
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
const inputBuf = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk, encoding);
|
|
273
|
+
stream.length += inputBuf.length;
|
|
274
|
+
// Input is small enough to fit in our buffer
|
|
275
|
+
if (stream.pos + inputBuf.length < stream.chunkSizeBytes) {
|
|
276
|
+
inputBuf.copy(stream.bufToStore, stream.pos);
|
|
277
|
+
stream.pos += inputBuf.length;
|
|
278
|
+
queueMicrotask(callback);
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
// Otherwise, buffer is too big for current chunk, so we need to flush
|
|
282
|
+
// to MongoDB.
|
|
283
|
+
let inputBufRemaining = inputBuf.length;
|
|
284
|
+
let spaceRemaining = stream.chunkSizeBytes - stream.pos;
|
|
285
|
+
let numToCopy = Math.min(spaceRemaining, inputBuf.length);
|
|
286
|
+
let outstandingRequests = 0;
|
|
287
|
+
while (inputBufRemaining > 0) {
|
|
288
|
+
const inputBufPos = inputBuf.length - inputBufRemaining;
|
|
289
|
+
inputBuf.copy(stream.bufToStore, stream.pos, inputBufPos, inputBufPos + numToCopy);
|
|
290
|
+
stream.pos += numToCopy;
|
|
291
|
+
spaceRemaining -= numToCopy;
|
|
292
|
+
let doc;
|
|
293
|
+
if (spaceRemaining === 0) {
|
|
294
|
+
doc = createChunkDoc(stream.id, stream.n, Buffer.from(stream.bufToStore));
|
|
295
|
+
const remainingTimeMS = stream.timeoutContext?.remainingTimeMS;
|
|
296
|
+
if (remainingTimeMS != null && remainingTimeMS <= 0) {
|
|
297
|
+
return handleError(stream, new error_1.MongoOperationTimeoutError(`Upload timed out after ${stream.timeoutContext?.timeoutMS}ms`), callback);
|
|
298
|
+
}
|
|
299
|
+
++stream.state.outstandingRequests;
|
|
300
|
+
++outstandingRequests;
|
|
301
|
+
if (isAborted(stream, callback)) {
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
stream.chunks
|
|
305
|
+
.insertOne(doc, { writeConcern: stream.writeConcern, timeoutMS: remainingTimeMS })
|
|
306
|
+
.then(() => {
|
|
307
|
+
--stream.state.outstandingRequests;
|
|
308
|
+
--outstandingRequests;
|
|
309
|
+
if (!outstandingRequests) {
|
|
310
|
+
checkDone(stream, callback);
|
|
311
|
+
}
|
|
312
|
+
}, error => {
|
|
313
|
+
return handleError(stream, error, callback);
|
|
314
|
+
});
|
|
315
|
+
spaceRemaining = stream.chunkSizeBytes;
|
|
316
|
+
stream.pos = 0;
|
|
317
|
+
++stream.n;
|
|
318
|
+
}
|
|
319
|
+
inputBufRemaining -= numToCopy;
|
|
320
|
+
numToCopy = Math.min(spaceRemaining, inputBufRemaining);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
function writeRemnant(stream, callback) {
|
|
324
|
+
// Buffer is empty, so don't bother to insert
|
|
325
|
+
if (stream.pos === 0) {
|
|
326
|
+
return checkDone(stream, callback);
|
|
327
|
+
}
|
|
328
|
+
// Create a new buffer to make sure the buffer isn't bigger than it needs
|
|
329
|
+
// to be.
|
|
330
|
+
const remnant = Buffer.alloc(stream.pos);
|
|
331
|
+
stream.bufToStore.copy(remnant, 0, 0, stream.pos);
|
|
332
|
+
const doc = createChunkDoc(stream.id, stream.n, remnant);
|
|
333
|
+
// If the stream was aborted, do not write remnant
|
|
334
|
+
if (isAborted(stream, callback)) {
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
const remainingTimeMS = stream.timeoutContext?.remainingTimeMS;
|
|
338
|
+
if (remainingTimeMS != null && remainingTimeMS <= 0) {
|
|
339
|
+
return handleError(stream, new error_1.MongoOperationTimeoutError(`Upload timed out after ${stream.timeoutContext?.timeoutMS}ms`), callback);
|
|
340
|
+
}
|
|
341
|
+
++stream.state.outstandingRequests;
|
|
342
|
+
stream.chunks
|
|
343
|
+
.insertOne(doc, { writeConcern: stream.writeConcern, timeoutMS: remainingTimeMS })
|
|
344
|
+
.then(() => {
|
|
345
|
+
--stream.state.outstandingRequests;
|
|
346
|
+
checkDone(stream, callback);
|
|
347
|
+
}, error => {
|
|
348
|
+
return handleError(stream, error, callback);
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
function isAborted(stream, callback) {
|
|
352
|
+
if (stream.state.aborted) {
|
|
353
|
+
queueMicrotask(() => callback(new error_1.MongoAPIError('Stream has been aborted')));
|
|
354
|
+
return true;
|
|
355
|
+
}
|
|
356
|
+
return false;
|
|
357
|
+
}
|
|
358
|
+
//# sourceMappingURL=upload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload.js","sourceRoot":"","sources":["../../src/gridfs/upload.ts"],"names":[],"mappings":";;;AAAA,mCAAkC;AAElC,kCAAkD;AAElD,+DAA8D;AAC9D,oCAKkB;AAClB,wCAAgD;AAChD,oCAA6E;AAE7E,sDAAkD;AA2BlD;;;;;GAKG;AACH,MAAa,uBAAwB,SAAQ,iBAAQ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AAM,CAAC,KAAK,CAAC,mBAAmB,CAAC;IACnC,MAAM,CAAC,MAAM;SACV,SAAS,CAAC,GAAG,EAAE,EAAE,YAAY,EAAE,MAAM,CAAC,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;SACjF,IAAI,CACH,GAAG,EAAE;QACH,EAAE,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC;QACnC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC9B,CAAC,EACD,KAAK,CAAC,EAAE;QACN,OAAO,WAAW,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC9C,CAAC,CACF,CAAC;AACN,CAAC;AAED,SAAS,SAAS,CAAC,MAA+B,EAAE,QAAwB;IAC1E,IAAI,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;QACzB,cAAc,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,qBAAa,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC;QAC7E,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MongoRuntimeError = exports.MongoParseError = exports.MongoOperationTimeoutError = exports.MongoOIDCError = exports.MongoNotConnectedError = exports.MongoNetworkTimeoutError = exports.MongoNetworkError = exports.MongoMissingDependencyError = exports.MongoMissingCredentialsError = exports.MongoKerberosError = exports.MongoInvalidArgumentError = exports.MongoGridFSStreamError = exports.MongoGridFSChunkError = exports.MongoGCPError = exports.MongoExpiredSessionError = exports.MongoError = exports.MongoDriverError = exports.MongoDecompressionError = exports.MongoCursorInUseError = exports.MongoCursorExhaustedError = exports.MongoCompatibilityError = exports.MongoClientClosedError = exports.MongoClientBulkWriteExecutionError = exports.MongoClientBulkWriteError = exports.MongoClientBulkWriteCursorError = exports.MongoChangeStreamError = exports.MongoBatchReExecutionError = exports.MongoAzureError = exports.MongoAWSError = exports.MongoAPIError = exports.ExplainableCursor = exports.ChangeStreamCursor = exports.ClientEncryption = exports.MongoBulkWriteError = exports.UUID = exports.Timestamp = exports.ObjectId = exports.MinKey = exports.MaxKey = exports.Long = exports.Int32 = exports.Double = exports.Decimal128 = exports.DBRef = exports.Code = exports.BSONType = exports.BSONSymbol = exports.BSONRegExp = exports.Binary = exports.BSON = void 0;
|
|
4
|
+
exports.CommandStartedEvent = exports.CommandFailedEvent = exports.WriteConcern = exports.ReadPreference = exports.ReadConcern = exports.TopologyType = exports.ServerType = exports.ReadPreferenceMode = exports.ReadConcernLevel = exports.ProfilingLevel = exports.ReturnDocument = exports.SeverityLevel = exports.MongoLoggableComponent = exports.ServerApiVersion = exports.ExplainVerbosity = exports.MongoErrorLabel = exports.CursorTimeoutMode = exports.CURSOR_FLAGS = exports.Compressor = exports.AuthMechanism = exports.GSSAPICanonicalizationValue = exports.AutoEncryptionLoggerLevel = exports.BatchType = exports.UnorderedBulkOperation = exports.OrderedBulkOperation = exports.MongoClient = exports.ListIndexesCursor = exports.ListCollectionsCursor = exports.GridFSBucketWriteStream = exports.GridFSBucketReadStream = exports.GridFSBucket = exports.FindCursor = exports.Db = exports.Collection = exports.ClientSession = exports.ChangeStream = exports.CancellationToken = exports.AggregationCursor = exports.Admin = exports.AbstractCursor = exports.MongoWriteConcernError = exports.MongoUnexpectedServerResponseError = exports.MongoTransactionError = exports.MongoTopologyClosedError = exports.MongoTailableCursorError = exports.MongoSystemError = exports.MongoStalePrimaryError = exports.MongoServerSelectionError = exports.MongoServerError = exports.MongoServerClosedError = void 0;
|
|
5
|
+
exports.MongoClientAuthProviders = exports.MongoCryptKMSRequestNetworkTimeoutError = exports.MongoCryptInvalidArgumentError = exports.MongoCryptError = exports.MongoCryptCreateEncryptedCollectionError = exports.MongoCryptCreateDataKeyError = exports.MongoCryptAzureKMSRequestError = exports.SrvPollingEvent = exports.WaitingForSuitableServerEvent = exports.ServerSelectionSucceededEvent = exports.ServerSelectionStartedEvent = exports.ServerSelectionFailedEvent = exports.ServerSelectionEvent = exports.TopologyOpeningEvent = exports.TopologyDescriptionChangedEvent = exports.TopologyClosedEvent = exports.ServerOpeningEvent = exports.ServerHeartbeatSucceededEvent = exports.ServerHeartbeatStartedEvent = exports.ServerHeartbeatFailedEvent = exports.ServerDescriptionChangedEvent = exports.ServerClosedEvent = exports.ConnectionReadyEvent = exports.ConnectionPoolReadyEvent = exports.ConnectionPoolMonitoringEvent = exports.ConnectionPoolCreatedEvent = exports.ConnectionPoolClosedEvent = exports.ConnectionPoolClearedEvent = exports.ConnectionCreatedEvent = exports.ConnectionClosedEvent = exports.ConnectionCheckOutStartedEvent = exports.ConnectionCheckOutFailedEvent = exports.ConnectionCheckedOutEvent = exports.ConnectionCheckedInEvent = exports.CommandSucceededEvent = void 0;
|
|
6
|
+
const admin_1 = require("./admin");
|
|
7
|
+
Object.defineProperty(exports, "Admin", { enumerable: true, get: function () { return admin_1.Admin; } });
|
|
8
|
+
const ordered_1 = require("./bulk/ordered");
|
|
9
|
+
Object.defineProperty(exports, "OrderedBulkOperation", { enumerable: true, get: function () { return ordered_1.OrderedBulkOperation; } });
|
|
10
|
+
const unordered_1 = require("./bulk/unordered");
|
|
11
|
+
Object.defineProperty(exports, "UnorderedBulkOperation", { enumerable: true, get: function () { return unordered_1.UnorderedBulkOperation; } });
|
|
12
|
+
const change_stream_1 = require("./change_stream");
|
|
13
|
+
Object.defineProperty(exports, "ChangeStream", { enumerable: true, get: function () { return change_stream_1.ChangeStream; } });
|
|
14
|
+
const collection_1 = require("./collection");
|
|
15
|
+
Object.defineProperty(exports, "Collection", { enumerable: true, get: function () { return collection_1.Collection; } });
|
|
16
|
+
const abstract_cursor_1 = require("./cursor/abstract_cursor");
|
|
17
|
+
Object.defineProperty(exports, "AbstractCursor", { enumerable: true, get: function () { return abstract_cursor_1.AbstractCursor; } });
|
|
18
|
+
const aggregation_cursor_1 = require("./cursor/aggregation_cursor");
|
|
19
|
+
Object.defineProperty(exports, "AggregationCursor", { enumerable: true, get: function () { return aggregation_cursor_1.AggregationCursor; } });
|
|
20
|
+
const find_cursor_1 = require("./cursor/find_cursor");
|
|
21
|
+
Object.defineProperty(exports, "FindCursor", { enumerable: true, get: function () { return find_cursor_1.FindCursor; } });
|
|
22
|
+
const list_collections_cursor_1 = require("./cursor/list_collections_cursor");
|
|
23
|
+
Object.defineProperty(exports, "ListCollectionsCursor", { enumerable: true, get: function () { return list_collections_cursor_1.ListCollectionsCursor; } });
|
|
24
|
+
const list_indexes_cursor_1 = require("./cursor/list_indexes_cursor");
|
|
25
|
+
Object.defineProperty(exports, "ListIndexesCursor", { enumerable: true, get: function () { return list_indexes_cursor_1.ListIndexesCursor; } });
|
|
26
|
+
const db_1 = require("./db");
|
|
27
|
+
Object.defineProperty(exports, "Db", { enumerable: true, get: function () { return db_1.Db; } });
|
|
28
|
+
const gridfs_1 = require("./gridfs");
|
|
29
|
+
Object.defineProperty(exports, "GridFSBucket", { enumerable: true, get: function () { return gridfs_1.GridFSBucket; } });
|
|
30
|
+
const download_1 = require("./gridfs/download");
|
|
31
|
+
Object.defineProperty(exports, "GridFSBucketReadStream", { enumerable: true, get: function () { return download_1.GridFSBucketReadStream; } });
|
|
32
|
+
const upload_1 = require("./gridfs/upload");
|
|
33
|
+
Object.defineProperty(exports, "GridFSBucketWriteStream", { enumerable: true, get: function () { return upload_1.GridFSBucketWriteStream; } });
|
|
34
|
+
const mongo_client_1 = require("./mongo_client");
|
|
35
|
+
Object.defineProperty(exports, "MongoClient", { enumerable: true, get: function () { return mongo_client_1.MongoClient; } });
|
|
36
|
+
const mongo_types_1 = require("./mongo_types");
|
|
37
|
+
Object.defineProperty(exports, "CancellationToken", { enumerable: true, get: function () { return mongo_types_1.CancellationToken; } });
|
|
38
|
+
const sessions_1 = require("./sessions");
|
|
39
|
+
Object.defineProperty(exports, "ClientSession", { enumerable: true, get: function () { return sessions_1.ClientSession; } });
|
|
40
|
+
/** @public */
|
|
41
|
+
var bson_1 = require("./bson");
|
|
42
|
+
Object.defineProperty(exports, "BSON", { enumerable: true, get: function () { return bson_1.BSON; } });
|
|
43
|
+
var bson_2 = require("./bson");
|
|
44
|
+
Object.defineProperty(exports, "Binary", { enumerable: true, get: function () { return bson_2.Binary; } });
|
|
45
|
+
Object.defineProperty(exports, "BSONRegExp", { enumerable: true, get: function () { return bson_2.BSONRegExp; } });
|
|
46
|
+
Object.defineProperty(exports, "BSONSymbol", { enumerable: true, get: function () { return bson_2.BSONSymbol; } });
|
|
47
|
+
Object.defineProperty(exports, "BSONType", { enumerable: true, get: function () { return bson_2.BSONType; } });
|
|
48
|
+
Object.defineProperty(exports, "Code", { enumerable: true, get: function () { return bson_2.Code; } });
|
|
49
|
+
Object.defineProperty(exports, "DBRef", { enumerable: true, get: function () { return bson_2.DBRef; } });
|
|
50
|
+
Object.defineProperty(exports, "Decimal128", { enumerable: true, get: function () { return bson_2.Decimal128; } });
|
|
51
|
+
Object.defineProperty(exports, "Double", { enumerable: true, get: function () { return bson_2.Double; } });
|
|
52
|
+
Object.defineProperty(exports, "Int32", { enumerable: true, get: function () { return bson_2.Int32; } });
|
|
53
|
+
Object.defineProperty(exports, "Long", { enumerable: true, get: function () { return bson_2.Long; } });
|
|
54
|
+
Object.defineProperty(exports, "MaxKey", { enumerable: true, get: function () { return bson_2.MaxKey; } });
|
|
55
|
+
Object.defineProperty(exports, "MinKey", { enumerable: true, get: function () { return bson_2.MinKey; } });
|
|
56
|
+
Object.defineProperty(exports, "ObjectId", { enumerable: true, get: function () { return bson_2.ObjectId; } });
|
|
57
|
+
Object.defineProperty(exports, "Timestamp", { enumerable: true, get: function () { return bson_2.Timestamp; } });
|
|
58
|
+
Object.defineProperty(exports, "UUID", { enumerable: true, get: function () { return bson_2.UUID; } });
|
|
59
|
+
var common_1 = require("./bulk/common");
|
|
60
|
+
Object.defineProperty(exports, "MongoBulkWriteError", { enumerable: true, get: function () { return common_1.MongoBulkWriteError; } });
|
|
61
|
+
var client_encryption_1 = require("./client-side-encryption/client_encryption");
|
|
62
|
+
Object.defineProperty(exports, "ClientEncryption", { enumerable: true, get: function () { return client_encryption_1.ClientEncryption; } });
|
|
63
|
+
var change_stream_cursor_1 = require("./cursor/change_stream_cursor");
|
|
64
|
+
Object.defineProperty(exports, "ChangeStreamCursor", { enumerable: true, get: function () { return change_stream_cursor_1.ChangeStreamCursor; } });
|
|
65
|
+
var explainable_cursor_1 = require("./cursor/explainable_cursor");
|
|
66
|
+
Object.defineProperty(exports, "ExplainableCursor", { enumerable: true, get: function () { return explainable_cursor_1.ExplainableCursor; } });
|
|
67
|
+
var error_1 = require("./error");
|
|
68
|
+
Object.defineProperty(exports, "MongoAPIError", { enumerable: true, get: function () { return error_1.MongoAPIError; } });
|
|
69
|
+
Object.defineProperty(exports, "MongoAWSError", { enumerable: true, get: function () { return error_1.MongoAWSError; } });
|
|
70
|
+
Object.defineProperty(exports, "MongoAzureError", { enumerable: true, get: function () { return error_1.MongoAzureError; } });
|
|
71
|
+
Object.defineProperty(exports, "MongoBatchReExecutionError", { enumerable: true, get: function () { return error_1.MongoBatchReExecutionError; } });
|
|
72
|
+
Object.defineProperty(exports, "MongoChangeStreamError", { enumerable: true, get: function () { return error_1.MongoChangeStreamError; } });
|
|
73
|
+
Object.defineProperty(exports, "MongoClientBulkWriteCursorError", { enumerable: true, get: function () { return error_1.MongoClientBulkWriteCursorError; } });
|
|
74
|
+
Object.defineProperty(exports, "MongoClientBulkWriteError", { enumerable: true, get: function () { return error_1.MongoClientBulkWriteError; } });
|
|
75
|
+
Object.defineProperty(exports, "MongoClientBulkWriteExecutionError", { enumerable: true, get: function () { return error_1.MongoClientBulkWriteExecutionError; } });
|
|
76
|
+
Object.defineProperty(exports, "MongoClientClosedError", { enumerable: true, get: function () { return error_1.MongoClientClosedError; } });
|
|
77
|
+
Object.defineProperty(exports, "MongoCompatibilityError", { enumerable: true, get: function () { return error_1.MongoCompatibilityError; } });
|
|
78
|
+
Object.defineProperty(exports, "MongoCursorExhaustedError", { enumerable: true, get: function () { return error_1.MongoCursorExhaustedError; } });
|
|
79
|
+
Object.defineProperty(exports, "MongoCursorInUseError", { enumerable: true, get: function () { return error_1.MongoCursorInUseError; } });
|
|
80
|
+
Object.defineProperty(exports, "MongoDecompressionError", { enumerable: true, get: function () { return error_1.MongoDecompressionError; } });
|
|
81
|
+
Object.defineProperty(exports, "MongoDriverError", { enumerable: true, get: function () { return error_1.MongoDriverError; } });
|
|
82
|
+
Object.defineProperty(exports, "MongoError", { enumerable: true, get: function () { return error_1.MongoError; } });
|
|
83
|
+
Object.defineProperty(exports, "MongoExpiredSessionError", { enumerable: true, get: function () { return error_1.MongoExpiredSessionError; } });
|
|
84
|
+
Object.defineProperty(exports, "MongoGCPError", { enumerable: true, get: function () { return error_1.MongoGCPError; } });
|
|
85
|
+
Object.defineProperty(exports, "MongoGridFSChunkError", { enumerable: true, get: function () { return error_1.MongoGridFSChunkError; } });
|
|
86
|
+
Object.defineProperty(exports, "MongoGridFSStreamError", { enumerable: true, get: function () { return error_1.MongoGridFSStreamError; } });
|
|
87
|
+
Object.defineProperty(exports, "MongoInvalidArgumentError", { enumerable: true, get: function () { return error_1.MongoInvalidArgumentError; } });
|
|
88
|
+
Object.defineProperty(exports, "MongoKerberosError", { enumerable: true, get: function () { return error_1.MongoKerberosError; } });
|
|
89
|
+
Object.defineProperty(exports, "MongoMissingCredentialsError", { enumerable: true, get: function () { return error_1.MongoMissingCredentialsError; } });
|
|
90
|
+
Object.defineProperty(exports, "MongoMissingDependencyError", { enumerable: true, get: function () { return error_1.MongoMissingDependencyError; } });
|
|
91
|
+
Object.defineProperty(exports, "MongoNetworkError", { enumerable: true, get: function () { return error_1.MongoNetworkError; } });
|
|
92
|
+
Object.defineProperty(exports, "MongoNetworkTimeoutError", { enumerable: true, get: function () { return error_1.MongoNetworkTimeoutError; } });
|
|
93
|
+
Object.defineProperty(exports, "MongoNotConnectedError", { enumerable: true, get: function () { return error_1.MongoNotConnectedError; } });
|
|
94
|
+
Object.defineProperty(exports, "MongoOIDCError", { enumerable: true, get: function () { return error_1.MongoOIDCError; } });
|
|
95
|
+
Object.defineProperty(exports, "MongoOperationTimeoutError", { enumerable: true, get: function () { return error_1.MongoOperationTimeoutError; } });
|
|
96
|
+
Object.defineProperty(exports, "MongoParseError", { enumerable: true, get: function () { return error_1.MongoParseError; } });
|
|
97
|
+
Object.defineProperty(exports, "MongoRuntimeError", { enumerable: true, get: function () { return error_1.MongoRuntimeError; } });
|
|
98
|
+
Object.defineProperty(exports, "MongoServerClosedError", { enumerable: true, get: function () { return error_1.MongoServerClosedError; } });
|
|
99
|
+
Object.defineProperty(exports, "MongoServerError", { enumerable: true, get: function () { return error_1.MongoServerError; } });
|
|
100
|
+
Object.defineProperty(exports, "MongoServerSelectionError", { enumerable: true, get: function () { return error_1.MongoServerSelectionError; } });
|
|
101
|
+
Object.defineProperty(exports, "MongoStalePrimaryError", { enumerable: true, get: function () { return error_1.MongoStalePrimaryError; } });
|
|
102
|
+
Object.defineProperty(exports, "MongoSystemError", { enumerable: true, get: function () { return error_1.MongoSystemError; } });
|
|
103
|
+
Object.defineProperty(exports, "MongoTailableCursorError", { enumerable: true, get: function () { return error_1.MongoTailableCursorError; } });
|
|
104
|
+
Object.defineProperty(exports, "MongoTopologyClosedError", { enumerable: true, get: function () { return error_1.MongoTopologyClosedError; } });
|
|
105
|
+
Object.defineProperty(exports, "MongoTransactionError", { enumerable: true, get: function () { return error_1.MongoTransactionError; } });
|
|
106
|
+
Object.defineProperty(exports, "MongoUnexpectedServerResponseError", { enumerable: true, get: function () { return error_1.MongoUnexpectedServerResponseError; } });
|
|
107
|
+
Object.defineProperty(exports, "MongoWriteConcernError", { enumerable: true, get: function () { return error_1.MongoWriteConcernError; } });
|
|
108
|
+
// enums
|
|
109
|
+
var common_2 = require("./bulk/common");
|
|
110
|
+
Object.defineProperty(exports, "BatchType", { enumerable: true, get: function () { return common_2.BatchType; } });
|
|
111
|
+
var auto_encrypter_1 = require("./client-side-encryption/auto_encrypter");
|
|
112
|
+
Object.defineProperty(exports, "AutoEncryptionLoggerLevel", { enumerable: true, get: function () { return auto_encrypter_1.AutoEncryptionLoggerLevel; } });
|
|
113
|
+
var gssapi_1 = require("./cmap/auth/gssapi");
|
|
114
|
+
Object.defineProperty(exports, "GSSAPICanonicalizationValue", { enumerable: true, get: function () { return gssapi_1.GSSAPICanonicalizationValue; } });
|
|
115
|
+
var providers_1 = require("./cmap/auth/providers");
|
|
116
|
+
Object.defineProperty(exports, "AuthMechanism", { enumerable: true, get: function () { return providers_1.AuthMechanism; } });
|
|
117
|
+
var compression_1 = require("./cmap/wire_protocol/compression");
|
|
118
|
+
Object.defineProperty(exports, "Compressor", { enumerable: true, get: function () { return compression_1.Compressor; } });
|
|
119
|
+
var abstract_cursor_2 = require("./cursor/abstract_cursor");
|
|
120
|
+
Object.defineProperty(exports, "CURSOR_FLAGS", { enumerable: true, get: function () { return abstract_cursor_2.CURSOR_FLAGS; } });
|
|
121
|
+
Object.defineProperty(exports, "CursorTimeoutMode", { enumerable: true, get: function () { return abstract_cursor_2.CursorTimeoutMode; } });
|
|
122
|
+
var error_2 = require("./error");
|
|
123
|
+
Object.defineProperty(exports, "MongoErrorLabel", { enumerable: true, get: function () { return error_2.MongoErrorLabel; } });
|
|
124
|
+
var explain_1 = require("./explain");
|
|
125
|
+
Object.defineProperty(exports, "ExplainVerbosity", { enumerable: true, get: function () { return explain_1.ExplainVerbosity; } });
|
|
126
|
+
var mongo_client_2 = require("./mongo_client");
|
|
127
|
+
Object.defineProperty(exports, "ServerApiVersion", { enumerable: true, get: function () { return mongo_client_2.ServerApiVersion; } });
|
|
128
|
+
var mongo_logger_1 = require("./mongo_logger");
|
|
129
|
+
Object.defineProperty(exports, "MongoLoggableComponent", { enumerable: true, get: function () { return mongo_logger_1.MongoLoggableComponent; } });
|
|
130
|
+
Object.defineProperty(exports, "SeverityLevel", { enumerable: true, get: function () { return mongo_logger_1.SeverityLevel; } });
|
|
131
|
+
var find_and_modify_1 = require("./operations/find_and_modify");
|
|
132
|
+
Object.defineProperty(exports, "ReturnDocument", { enumerable: true, get: function () { return find_and_modify_1.ReturnDocument; } });
|
|
133
|
+
var set_profiling_level_1 = require("./operations/set_profiling_level");
|
|
134
|
+
Object.defineProperty(exports, "ProfilingLevel", { enumerable: true, get: function () { return set_profiling_level_1.ProfilingLevel; } });
|
|
135
|
+
var read_concern_1 = require("./read_concern");
|
|
136
|
+
Object.defineProperty(exports, "ReadConcernLevel", { enumerable: true, get: function () { return read_concern_1.ReadConcernLevel; } });
|
|
137
|
+
var read_preference_1 = require("./read_preference");
|
|
138
|
+
Object.defineProperty(exports, "ReadPreferenceMode", { enumerable: true, get: function () { return read_preference_1.ReadPreferenceMode; } });
|
|
139
|
+
var common_3 = require("./sdam/common");
|
|
140
|
+
Object.defineProperty(exports, "ServerType", { enumerable: true, get: function () { return common_3.ServerType; } });
|
|
141
|
+
Object.defineProperty(exports, "TopologyType", { enumerable: true, get: function () { return common_3.TopologyType; } });
|
|
142
|
+
var read_concern_2 = require("./read_concern");
|
|
143
|
+
Object.defineProperty(exports, "ReadConcern", { enumerable: true, get: function () { return read_concern_2.ReadConcern; } });
|
|
144
|
+
var read_preference_2 = require("./read_preference");
|
|
145
|
+
Object.defineProperty(exports, "ReadPreference", { enumerable: true, get: function () { return read_preference_2.ReadPreference; } });
|
|
146
|
+
var write_concern_1 = require("./write_concern");
|
|
147
|
+
Object.defineProperty(exports, "WriteConcern", { enumerable: true, get: function () { return write_concern_1.WriteConcern; } });
|
|
148
|
+
// events
|
|
149
|
+
var command_monitoring_events_1 = require("./cmap/command_monitoring_events");
|
|
150
|
+
Object.defineProperty(exports, "CommandFailedEvent", { enumerable: true, get: function () { return command_monitoring_events_1.CommandFailedEvent; } });
|
|
151
|
+
Object.defineProperty(exports, "CommandStartedEvent", { enumerable: true, get: function () { return command_monitoring_events_1.CommandStartedEvent; } });
|
|
152
|
+
Object.defineProperty(exports, "CommandSucceededEvent", { enumerable: true, get: function () { return command_monitoring_events_1.CommandSucceededEvent; } });
|
|
153
|
+
var connection_pool_events_1 = require("./cmap/connection_pool_events");
|
|
154
|
+
Object.defineProperty(exports, "ConnectionCheckedInEvent", { enumerable: true, get: function () { return connection_pool_events_1.ConnectionCheckedInEvent; } });
|
|
155
|
+
Object.defineProperty(exports, "ConnectionCheckedOutEvent", { enumerable: true, get: function () { return connection_pool_events_1.ConnectionCheckedOutEvent; } });
|
|
156
|
+
Object.defineProperty(exports, "ConnectionCheckOutFailedEvent", { enumerable: true, get: function () { return connection_pool_events_1.ConnectionCheckOutFailedEvent; } });
|
|
157
|
+
Object.defineProperty(exports, "ConnectionCheckOutStartedEvent", { enumerable: true, get: function () { return connection_pool_events_1.ConnectionCheckOutStartedEvent; } });
|
|
158
|
+
Object.defineProperty(exports, "ConnectionClosedEvent", { enumerable: true, get: function () { return connection_pool_events_1.ConnectionClosedEvent; } });
|
|
159
|
+
Object.defineProperty(exports, "ConnectionCreatedEvent", { enumerable: true, get: function () { return connection_pool_events_1.ConnectionCreatedEvent; } });
|
|
160
|
+
Object.defineProperty(exports, "ConnectionPoolClearedEvent", { enumerable: true, get: function () { return connection_pool_events_1.ConnectionPoolClearedEvent; } });
|
|
161
|
+
Object.defineProperty(exports, "ConnectionPoolClosedEvent", { enumerable: true, get: function () { return connection_pool_events_1.ConnectionPoolClosedEvent; } });
|
|
162
|
+
Object.defineProperty(exports, "ConnectionPoolCreatedEvent", { enumerable: true, get: function () { return connection_pool_events_1.ConnectionPoolCreatedEvent; } });
|
|
163
|
+
Object.defineProperty(exports, "ConnectionPoolMonitoringEvent", { enumerable: true, get: function () { return connection_pool_events_1.ConnectionPoolMonitoringEvent; } });
|
|
164
|
+
Object.defineProperty(exports, "ConnectionPoolReadyEvent", { enumerable: true, get: function () { return connection_pool_events_1.ConnectionPoolReadyEvent; } });
|
|
165
|
+
Object.defineProperty(exports, "ConnectionReadyEvent", { enumerable: true, get: function () { return connection_pool_events_1.ConnectionReadyEvent; } });
|
|
166
|
+
var events_1 = require("./sdam/events");
|
|
167
|
+
Object.defineProperty(exports, "ServerClosedEvent", { enumerable: true, get: function () { return events_1.ServerClosedEvent; } });
|
|
168
|
+
Object.defineProperty(exports, "ServerDescriptionChangedEvent", { enumerable: true, get: function () { return events_1.ServerDescriptionChangedEvent; } });
|
|
169
|
+
Object.defineProperty(exports, "ServerHeartbeatFailedEvent", { enumerable: true, get: function () { return events_1.ServerHeartbeatFailedEvent; } });
|
|
170
|
+
Object.defineProperty(exports, "ServerHeartbeatStartedEvent", { enumerable: true, get: function () { return events_1.ServerHeartbeatStartedEvent; } });
|
|
171
|
+
Object.defineProperty(exports, "ServerHeartbeatSucceededEvent", { enumerable: true, get: function () { return events_1.ServerHeartbeatSucceededEvent; } });
|
|
172
|
+
Object.defineProperty(exports, "ServerOpeningEvent", { enumerable: true, get: function () { return events_1.ServerOpeningEvent; } });
|
|
173
|
+
Object.defineProperty(exports, "TopologyClosedEvent", { enumerable: true, get: function () { return events_1.TopologyClosedEvent; } });
|
|
174
|
+
Object.defineProperty(exports, "TopologyDescriptionChangedEvent", { enumerable: true, get: function () { return events_1.TopologyDescriptionChangedEvent; } });
|
|
175
|
+
Object.defineProperty(exports, "TopologyOpeningEvent", { enumerable: true, get: function () { return events_1.TopologyOpeningEvent; } });
|
|
176
|
+
var server_selection_events_1 = require("./sdam/server_selection_events");
|
|
177
|
+
Object.defineProperty(exports, "ServerSelectionEvent", { enumerable: true, get: function () { return server_selection_events_1.ServerSelectionEvent; } });
|
|
178
|
+
Object.defineProperty(exports, "ServerSelectionFailedEvent", { enumerable: true, get: function () { return server_selection_events_1.ServerSelectionFailedEvent; } });
|
|
179
|
+
Object.defineProperty(exports, "ServerSelectionStartedEvent", { enumerable: true, get: function () { return server_selection_events_1.ServerSelectionStartedEvent; } });
|
|
180
|
+
Object.defineProperty(exports, "ServerSelectionSucceededEvent", { enumerable: true, get: function () { return server_selection_events_1.ServerSelectionSucceededEvent; } });
|
|
181
|
+
Object.defineProperty(exports, "WaitingForSuitableServerEvent", { enumerable: true, get: function () { return server_selection_events_1.WaitingForSuitableServerEvent; } });
|
|
182
|
+
var srv_polling_1 = require("./sdam/srv_polling");
|
|
183
|
+
Object.defineProperty(exports, "SrvPollingEvent", { enumerable: true, get: function () { return srv_polling_1.SrvPollingEvent; } });
|
|
184
|
+
var errors_1 = require("./client-side-encryption/errors");
|
|
185
|
+
Object.defineProperty(exports, "MongoCryptAzureKMSRequestError", { enumerable: true, get: function () { return errors_1.MongoCryptAzureKMSRequestError; } });
|
|
186
|
+
Object.defineProperty(exports, "MongoCryptCreateDataKeyError", { enumerable: true, get: function () { return errors_1.MongoCryptCreateDataKeyError; } });
|
|
187
|
+
Object.defineProperty(exports, "MongoCryptCreateEncryptedCollectionError", { enumerable: true, get: function () { return errors_1.MongoCryptCreateEncryptedCollectionError; } });
|
|
188
|
+
Object.defineProperty(exports, "MongoCryptError", { enumerable: true, get: function () { return errors_1.MongoCryptError; } });
|
|
189
|
+
Object.defineProperty(exports, "MongoCryptInvalidArgumentError", { enumerable: true, get: function () { return errors_1.MongoCryptInvalidArgumentError; } });
|
|
190
|
+
Object.defineProperty(exports, "MongoCryptKMSRequestNetworkTimeoutError", { enumerable: true, get: function () { return errors_1.MongoCryptKMSRequestNetworkTimeoutError; } });
|
|
191
|
+
var mongo_client_auth_providers_1 = require("./mongo_client_auth_providers");
|
|
192
|
+
Object.defineProperty(exports, "MongoClientAuthProviders", { enumerable: true, get: function () { return mongo_client_auth_providers_1.MongoClientAuthProviders; } });
|
|
193
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,mCAAgC;AA4F9B,sFA5FO,aAAK,OA4FP;AA3FP,4CAAsD;AAyGp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