pecunia-root 0.1.1 → 0.1.2
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/dist/adapters/prisma-adapter/index.d.mts +1 -1
- package/dist/adapters/prisma-adapter/index.mjs +1 -1
- package/dist/adapters/prisma-adapter/index.mjs.map +1 -1
- package/dist/index.d.mts +1 -2
- package/dist/index.mjs +1 -2
- package/package.json +2 -16
- package/dist/_virtual/rolldown_runtime.mjs +0 -8
- package/dist/adapters/mongodb-adapter/index.d.mts +0 -35
- package/dist/adapters/mongodb-adapter/index.mjs +0 -314
- package/dist/adapters/mongodb-adapter/index.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/code-points-data.mjs +0 -14
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/code-points-data.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/index.mjs +0 -54
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/index.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/memory-code-points.mjs +0 -36
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/memory-code-points.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/node.mjs +0 -27
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/node.mjs.map +0 -1
- package/dist/node_modules/.pnpm/bson@6.10.4/node_modules/bson/lib/bson.mjs +0 -3728
- package/dist/node_modules/.pnpm/bson@6.10.4/node_modules/bson/lib/bson.mjs.map +0 -1
- package/dist/node_modules/.pnpm/memory-pager@1.5.0/node_modules/memory-pager/index.mjs +0 -137
- package/dist/node_modules/.pnpm/memory-pager@1.5.0/node_modules/memory-pager/index.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/index.mjs +0 -211
- package/dist/node_modules/.pnpm/mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/index.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/redact.mjs +0 -95
- package/dist/node_modules/.pnpm/mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/redact.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/admin.mjs +0 -158
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/admin.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bson.mjs +0 -195
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bson.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/common.mjs +0 -710
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/common.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/ordered.mjs +0 -53
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/ordered.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/unordered.mjs +0 -63
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/unordered.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/change_stream.mjs +0 -368
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/change_stream.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/auto_encrypter.mjs +0 -234
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/auto_encrypter.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/client_encryption.mjs +0 -545
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/client_encryption.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/crypto_callbacks.mjs +0 -83
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/crypto_callbacks.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/errors.mjs +0 -146
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/errors.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/mongocryptd_manager.mjs +0 -58
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/mongocryptd_manager.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/aws.mjs +0 -30
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/aws.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/azure.mjs +0 -135
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/azure.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/gcp.mjs +0 -25
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/gcp.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/index.mjs +0 -47
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/index.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/state_machine.mjs +0 -362
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/state_machine.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/auth_provider.mjs +0 -58
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/auth_provider.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/aws_temporary_credentials.mjs +0 -123
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/aws_temporary_credentials.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/gssapi.mjs +0 -128
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/gssapi.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongo_credentials.mjs +0 -133
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongo_credentials.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_aws.mjs +0 -126
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_aws.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/automated_callback_workflow.mjs +0 -79
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/automated_callback_workflow.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_machine_workflow.mjs +0 -65
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_machine_workflow.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_workflow.mjs +0 -127
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_workflow.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/command_builders.mjs +0 -47
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/command_builders.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/gcp_machine_workflow.mjs +0 -44
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/gcp_machine_workflow.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/human_callback_workflow.mjs +0 -101
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/human_callback_workflow.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/k8s_machine_workflow.mjs +0 -33
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/k8s_machine_workflow.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_cache.mjs +0 -53
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_cache.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_machine_workflow.mjs +0 -29
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_machine_workflow.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc.mjs +0 -83
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/plain.mjs +0 -36
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/plain.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/providers.mjs +0 -32
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/providers.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/scram.mjs +0 -206
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/scram.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/x509.mjs +0 -45
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/x509.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/command_monitoring_events.mjs +0 -213
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/command_monitoring_events.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/commands.mjs +0 -411
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/commands.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connect.mjs +0 -288
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connect.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection.mjs +0 -423
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool.mjs +0 -483
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool_events.mjs +0 -207
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool_events.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/errors.mjs +0 -116
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/errors.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/handshake/client_metadata.mjs +0 -183
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/handshake/client_metadata.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/metrics.mjs +0 -55
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/metrics.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/stream_description.mjs +0 -60
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/stream_description.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/compression.mjs +0 -139
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/compression.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/constants.mjs +0 -28
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/constants.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_data.mjs +0 -117
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_data.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_demand/document.mjs +0 -182
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_demand/document.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/responses.mjs +0 -304
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/responses.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/shared.mjs +0 -34
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/shared.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/collection.mjs +0 -739
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/collection.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/connection_string.mjs +0 -805
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/connection_string.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/constants.mjs +0 -174
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/constants.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/abstract_cursor.mjs +0 -726
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/abstract_cursor.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/aggregation_cursor.mjs +0 -172
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/aggregation_cursor.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/change_stream_cursor.mjs +0 -103
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/change_stream_cursor.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/client_bulk_write_cursor.mjs +0 -66
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/client_bulk_write_cursor.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/explainable_cursor.mjs +0 -41
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/explainable_cursor.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/find_cursor.mjs +0 -365
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/find_cursor.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_collections_cursor.mjs +0 -50
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_collections_cursor.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_indexes_cursor.mjs +0 -48
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_indexes_cursor.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_search_indexes_cursor.mjs +0 -23
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_search_indexes_cursor.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/run_command_cursor.mjs +0 -106
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/run_command_cursor.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/db.mjs +0 -428
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/db.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/deps.mjs +0 -124
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/deps.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/encrypter.mjs +0 -95
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/encrypter.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/error.mjs +0 -1305
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/error.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/explain.mjs +0 -59
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/explain.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/download.mjs +0 -250
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/download.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/index.mjs +0 -170
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/index.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/upload.mjs +0 -315
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/upload.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/index.mjs +0 -925
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/index.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client.mjs +0 -520
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client_auth_providers.mjs +0 -90
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client_auth_providers.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_logger.mjs +0 -582
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_logger.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_types.mjs +0 -64
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_types.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/aggregate.mjs +0 -86
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/aggregate.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/client_bulk_write.mjs +0 -60
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/client_bulk_write.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/command_builder.mjs +0 -264
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/command_builder.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/executor.mjs +0 -109
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/executor.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/results_merger.mjs +0 -172
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/results_merger.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/command.mjs +0 -68
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/command.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/count.mjs +0 -53
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/count.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/create_collection.mjs +0 -123
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/create_collection.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/delete.mjs +0 -119
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/delete.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/distinct.mjs +0 -65
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/distinct.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/drop.mjs +0 -97
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/drop.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/estimated_document_count.mjs +0 -47
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/estimated_document_count.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/execute_operation.mjs +0 -188
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/execute_operation.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find.mjs +0 -103
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find_and_modify.mjs +0 -136
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find_and_modify.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/get_more.mjs +0 -61
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/get_more.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/indexes.mjs +0 -179
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/indexes.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/insert.mjs +0 -77
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/insert.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/kill_cursors.mjs +0 -48
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/kill_cursors.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_collections.mjs +0 -60
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_collections.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_databases.mjs +0 -43
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_databases.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/operation.mjs +0 -105
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/operation.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/profiling_level.mjs +0 -50
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/profiling_level.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/remove_user.mjs +0 -39
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/remove_user.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/rename.mjs +0 -49
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/rename.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/run_command.mjs +0 -58
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/run_command.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/create.mjs +0 -46
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/create.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/drop.mjs +0 -48
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/drop.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/update.mjs +0 -46
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/update.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/set_profiling_level.mjs +0 -67
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/set_profiling_level.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/stats.mjs +0 -37
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/stats.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/update.mjs +0 -171
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/update.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/validate_collection.mjs +0 -45
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/validate_collection.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_concern.mjs +0 -71
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_concern.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_preference.mjs +0 -165
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_preference.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/resource_management.mjs +0 -62
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/resource_management.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/common.mjs +0 -51
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/common.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/events.mjs +0 -156
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/events.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/monitor.mjs +0 -477
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/monitor.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server.mjs +0 -315
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_description.mjs +0 -157
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_description.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection.mjs +0 -184
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection_events.mjs +0 -96
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection_events.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/srv_polling.mjs +0 -107
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/srv_polling.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology.mjs +0 -540
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology_description.mjs +0 -298
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology_description.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sessions.mjs +0 -623
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sessions.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sort.mjs +0 -91
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sort.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/timeout.mjs +0 -254
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/timeout.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/transactions.mjs +0 -138
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/transactions.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/utils.mjs +0 -993
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/utils.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/write_concern.mjs +0 -81
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/write_concern.mjs.map +0 -1
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/package.mjs +0 -171
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/package.mjs.map +0 -1
- package/dist/node_modules/.pnpm/punycode@2.3.1/node_modules/punycode/punycode.mjs +0 -295
- package/dist/node_modules/.pnpm/punycode@2.3.1/node_modules/punycode/punycode.mjs.map +0 -1
- package/dist/node_modules/.pnpm/sparse-bitfield@3.0.3/node_modules/sparse-bitfield/index.mjs +0 -81
- package/dist/node_modules/.pnpm/sparse-bitfield@3.0.3/node_modules/sparse-bitfield/index.mjs.map +0 -1
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/index.mjs +0 -206
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/index.mjs.map +0 -1
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/mappingTable.mjs +0 -33590
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/mappingTable.mjs.map +0 -1
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/regexes.mjs +0 -37
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/regexes.mjs.map +0 -1
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/statusMapping.mjs +0 -18
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/statusMapping.mjs.map +0 -1
- package/dist/node_modules/.pnpm/webidl-conversions@7.0.0/node_modules/webidl-conversions/lib/index.mjs +0 -252
- package/dist/node_modules/.pnpm/webidl-conversions@7.0.0/node_modules/webidl-conversions/lib/index.mjs.map +0 -1
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/index.mjs +0 -41
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/index.mjs.map +0 -1
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/Function.mjs +0 -41
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/Function.mjs.map +0 -1
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL-impl.mjs +0 -173
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL-impl.mjs.map +0 -1
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL.mjs +0 -334
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL.mjs.map +0 -1
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams-impl.mjs +0 -90
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams-impl.mjs.map +0 -1
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams.mjs +0 -356
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams.mjs.map +0 -1
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/encoding.mjs +0 -23
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/encoding.mjs.map +0 -1
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/infra.mjs +0 -29
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/infra.mjs.map +0 -1
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/percent-encoding.mjs +0 -140
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/percent-encoding.mjs.map +0 -1
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/url-state-machine.mjs +0 -831
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/url-state-machine.mjs.map +0 -1
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/urlencoded.mjs +0 -77
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/urlencoded.mjs.map +0 -1
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/utils.mjs +0 -147
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/utils.mjs.map +0 -1
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/webidl2js-wrapper.mjs +0 -17
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/webidl2js-wrapper.mjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error.mjs","names":[],"sources":["../../../../../../../../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/error.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MongoWriteConcernError = exports.MongoServerSelectionError = exports.MongoSystemError = exports.MongoMissingDependencyError = exports.MongoMissingCredentialsError = exports.MongoCompatibilityError = exports.MongoInvalidArgumentError = exports.MongoParseError = exports.MongoNetworkTimeoutError = exports.MongoNetworkError = exports.MongoClientClosedError = exports.MongoTopologyClosedError = exports.MongoCursorExhaustedError = exports.MongoServerClosedError = exports.MongoCursorInUseError = exports.MongoOperationTimeoutError = exports.MongoUnexpectedServerResponseError = exports.MongoGridFSChunkError = exports.MongoGridFSStreamError = exports.MongoTailableCursorError = exports.MongoChangeStreamError = exports.MongoClientBulkWriteExecutionError = exports.MongoClientBulkWriteCursorError = exports.MongoClientBulkWriteError = exports.MongoGCPError = exports.MongoAzureError = exports.MongoOIDCError = exports.MongoAWSError = exports.MongoKerberosError = exports.MongoExpiredSessionError = exports.MongoTransactionError = exports.MongoNotConnectedError = exports.MongoDecompressionError = exports.MongoBatchReExecutionError = exports.MongoStalePrimaryError = exports.MongoRuntimeError = exports.MongoAPIError = exports.MongoDriverError = exports.MongoServerError = exports.MongoError = exports.MongoErrorLabel = exports.GET_MORE_RESUMABLE_CODES = exports.MONGODB_ERROR_CODES = exports.NODE_IS_RECOVERING_ERROR_MESSAGE = exports.LEGACY_NOT_PRIMARY_OR_SECONDARY_ERROR_MESSAGE = exports.LEGACY_NOT_WRITABLE_PRIMARY_ERROR_MESSAGE = void 0;\nexports.needsRetryableWriteLabel = needsRetryableWriteLabel;\nexports.isRetryableWriteError = isRetryableWriteError;\nexports.isRetryableReadError = isRetryableReadError;\nexports.isNodeShuttingDownError = isNodeShuttingDownError;\nexports.isSDAMUnrecoverableError = isSDAMUnrecoverableError;\nexports.isNetworkTimeoutError = isNetworkTimeoutError;\nexports.isResumableError = isResumableError;\n/**\n * @internal\n * The legacy error message from the server that indicates the node is not a writable primary\n * https://github.com/mongodb/specifications/blob/921232976f9913cf17415b5ef937ee772e45e6ae/source/server-discovery-and-monitoring/server-discovery-and-monitoring.md#not-writable-primary-and-node-is-recovering\n */\nexports.LEGACY_NOT_WRITABLE_PRIMARY_ERROR_MESSAGE = new RegExp('not master', 'i');\n/**\n * @internal\n * The legacy error message from the server that indicates the node is not a primary or secondary\n * https://github.com/mongodb/specifications/blob/921232976f9913cf17415b5ef937ee772e45e6ae/source/server-discovery-and-monitoring/server-discovery-and-monitoring.md#not-writable-primary-and-node-is-recovering\n */\nexports.LEGACY_NOT_PRIMARY_OR_SECONDARY_ERROR_MESSAGE = new RegExp('not master or secondary', 'i');\n/**\n * @internal\n * The error message from the server that indicates the node is recovering\n * https://github.com/mongodb/specifications/blob/921232976f9913cf17415b5ef937ee772e45e6ae/source/server-discovery-and-monitoring/server-discovery-and-monitoring.md#not-writable-primary-and-node-is-recovering\n */\nexports.NODE_IS_RECOVERING_ERROR_MESSAGE = new RegExp('node is recovering', 'i');\n/** @internal MongoDB Error Codes */\nexports.MONGODB_ERROR_CODES = Object.freeze({\n HostUnreachable: 6,\n HostNotFound: 7,\n AuthenticationFailed: 18,\n NetworkTimeout: 89,\n ShutdownInProgress: 91,\n PrimarySteppedDown: 189,\n ExceededTimeLimit: 262,\n SocketException: 9001,\n NotWritablePrimary: 10107,\n InterruptedAtShutdown: 11600,\n InterruptedDueToReplStateChange: 11602,\n NotPrimaryNoSecondaryOk: 13435,\n NotPrimaryOrSecondary: 13436,\n StaleShardVersion: 63,\n StaleEpoch: 150,\n StaleConfig: 13388,\n RetryChangeStream: 234,\n FailedToSatisfyReadPreference: 133,\n CursorNotFound: 43,\n LegacyNotPrimary: 10058,\n // WriteConcernTimeout is WriteConcernFailed on pre-8.1 servers\n WriteConcernTimeout: 64,\n NamespaceNotFound: 26,\n IllegalOperation: 20,\n MaxTimeMSExpired: 50,\n UnknownReplWriteConcern: 79,\n UnsatisfiableWriteConcern: 100,\n Reauthenticate: 391,\n ReadConcernMajorityNotAvailableYet: 134\n});\n// From spec https://github.com/mongodb/specifications/blob/921232976f9913cf17415b5ef937ee772e45e6ae/source/change-streams/change-streams.md#resumable-error\nexports.GET_MORE_RESUMABLE_CODES = new Set([\n exports.MONGODB_ERROR_CODES.HostUnreachable,\n exports.MONGODB_ERROR_CODES.HostNotFound,\n exports.MONGODB_ERROR_CODES.NetworkTimeout,\n exports.MONGODB_ERROR_CODES.ShutdownInProgress,\n exports.MONGODB_ERROR_CODES.PrimarySteppedDown,\n exports.MONGODB_ERROR_CODES.ExceededTimeLimit,\n exports.MONGODB_ERROR_CODES.SocketException,\n exports.MONGODB_ERROR_CODES.NotWritablePrimary,\n exports.MONGODB_ERROR_CODES.InterruptedAtShutdown,\n exports.MONGODB_ERROR_CODES.InterruptedDueToReplStateChange,\n exports.MONGODB_ERROR_CODES.NotPrimaryNoSecondaryOk,\n exports.MONGODB_ERROR_CODES.NotPrimaryOrSecondary,\n exports.MONGODB_ERROR_CODES.StaleShardVersion,\n exports.MONGODB_ERROR_CODES.StaleEpoch,\n exports.MONGODB_ERROR_CODES.StaleConfig,\n exports.MONGODB_ERROR_CODES.RetryChangeStream,\n exports.MONGODB_ERROR_CODES.FailedToSatisfyReadPreference,\n exports.MONGODB_ERROR_CODES.CursorNotFound\n]);\n/** @public */\nexports.MongoErrorLabel = Object.freeze({\n RetryableWriteError: 'RetryableWriteError',\n TransientTransactionError: 'TransientTransactionError',\n UnknownTransactionCommitResult: 'UnknownTransactionCommitResult',\n ResumableChangeStreamError: 'ResumableChangeStreamError',\n HandshakeError: 'HandshakeError',\n ResetPool: 'ResetPool',\n PoolRequstedRetry: 'PoolRequstedRetry',\n InterruptInUseConnections: 'InterruptInUseConnections',\n NoWritesPerformed: 'NoWritesPerformed'\n});\nfunction isAggregateError(e) {\n return e != null && typeof e === 'object' && 'errors' in e && Array.isArray(e.errors);\n}\n/**\n * @public\n * @category Error\n *\n * @privateRemarks\n * mongodb-client-encryption has a dependency on this error, it uses the constructor with a string argument\n */\nclass MongoError extends Error {\n get errorLabels() {\n return Array.from(this.errorLabelSet);\n }\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message, options) {\n super(message, options);\n /** @internal */\n this.errorLabelSet = new Set();\n }\n /** @internal */\n static buildErrorMessage(e) {\n if (typeof e === 'string') {\n return e;\n }\n if (isAggregateError(e) && e.message.length === 0) {\n return e.errors.length === 0\n ? 'AggregateError has an empty errors array. Please check the `cause` property for more information.'\n : e.errors.map(({ message }) => message).join(', ');\n }\n return e != null && typeof e === 'object' && 'message' in e && typeof e.message === 'string'\n ? e.message\n : 'empty error message';\n }\n get name() {\n return 'MongoError';\n }\n /** Legacy name for server error responses */\n get errmsg() {\n return this.message;\n }\n /**\n * Checks the error to see if it has an error label\n *\n * @param label - The error label to check for\n * @returns returns true if the error has the provided error label\n */\n hasErrorLabel(label) {\n return this.errorLabelSet.has(label);\n }\n addErrorLabel(label) {\n this.errorLabelSet.add(label);\n }\n}\nexports.MongoError = MongoError;\n/**\n * An error coming from the mongo server\n *\n * @public\n * @category Error\n */\nclass MongoServerError extends MongoError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message) {\n super(message.message || message.errmsg || message.$err || 'n/a');\n if (message.errorLabels) {\n for (const label of message.errorLabels)\n this.addErrorLabel(label);\n }\n this.errorResponse = message;\n for (const name in message) {\n if (name !== 'errorLabels' &&\n name !== 'errmsg' &&\n name !== 'message' &&\n name !== 'errorResponse') {\n this[name] = message[name];\n }\n }\n }\n get name() {\n return 'MongoServerError';\n }\n}\nexports.MongoServerError = MongoServerError;\n/**\n * An error generated by the driver\n *\n * @public\n * @category Error\n */\nclass MongoDriverError extends MongoError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message, options) {\n super(message, options);\n }\n get name() {\n return 'MongoDriverError';\n }\n}\nexports.MongoDriverError = MongoDriverError;\n/**\n * An error generated when the driver API is used incorrectly\n *\n * @privateRemarks\n * Should **never** be directly instantiated\n *\n * @public\n * @category Error\n */\nclass MongoAPIError extends MongoDriverError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message, options) {\n super(message, options);\n }\n get name() {\n return 'MongoAPIError';\n }\n}\nexports.MongoAPIError = MongoAPIError;\n/**\n * An error generated when the driver encounters unexpected input\n * or reaches an unexpected/invalid internal state.\n *\n * @privateRemarks\n * Should **never** be directly instantiated.\n *\n * @public\n * @category Error\n */\nclass MongoRuntimeError extends MongoDriverError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message, options) {\n super(message, options);\n }\n get name() {\n return 'MongoRuntimeError';\n }\n}\nexports.MongoRuntimeError = MongoRuntimeError;\n/**\n * An error generated when a primary server is marked stale, never directly thrown\n *\n * @public\n * @category Error\n */\nclass MongoStalePrimaryError extends MongoRuntimeError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message, options) {\n super(message, options);\n }\n get name() {\n return 'MongoStalePrimaryError';\n }\n}\nexports.MongoStalePrimaryError = MongoStalePrimaryError;\n/**\n * An error generated when a batch command is re-executed after one of the commands in the batch\n * has failed\n *\n * @public\n * @category Error\n */\nclass MongoBatchReExecutionError extends MongoAPIError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message = 'This batch has already been executed, create new batch to execute') {\n super(message);\n }\n get name() {\n return 'MongoBatchReExecutionError';\n }\n}\nexports.MongoBatchReExecutionError = MongoBatchReExecutionError;\n/**\n * An error generated when the driver fails to decompress\n * data received from the server.\n *\n * @public\n * @category Error\n */\nclass MongoDecompressionError extends MongoRuntimeError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message) {\n super(message);\n }\n get name() {\n return 'MongoDecompressionError';\n }\n}\nexports.MongoDecompressionError = MongoDecompressionError;\n/**\n * An error thrown when the user attempts to operate on a database or collection through a MongoClient\n * that has not yet successfully called the \"connect\" method\n *\n * @public\n * @category Error\n */\nclass MongoNotConnectedError extends MongoAPIError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message) {\n super(message);\n }\n get name() {\n return 'MongoNotConnectedError';\n }\n}\nexports.MongoNotConnectedError = MongoNotConnectedError;\n/**\n * An error generated when the user makes a mistake in the usage of transactions.\n * (e.g. attempting to commit a transaction with a readPreference other than primary)\n *\n * @public\n * @category Error\n */\nclass MongoTransactionError extends MongoAPIError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message) {\n super(message);\n }\n get name() {\n return 'MongoTransactionError';\n }\n}\nexports.MongoTransactionError = MongoTransactionError;\n/**\n * An error generated when the user attempts to operate\n * on a session that has expired or has been closed.\n *\n * @public\n * @category Error\n */\nclass MongoExpiredSessionError extends MongoAPIError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message = 'Cannot use a session that has ended') {\n super(message);\n }\n get name() {\n return 'MongoExpiredSessionError';\n }\n}\nexports.MongoExpiredSessionError = MongoExpiredSessionError;\n/**\n * A error generated when the user attempts to authenticate\n * via Kerberos, but fails to connect to the Kerberos client.\n *\n * @public\n * @category Error\n */\nclass MongoKerberosError extends MongoRuntimeError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message) {\n super(message);\n }\n get name() {\n return 'MongoKerberosError';\n }\n}\nexports.MongoKerberosError = MongoKerberosError;\n/**\n * A error generated when the user attempts to authenticate\n * via AWS, but fails\n *\n * @public\n * @category Error\n */\nclass MongoAWSError extends MongoRuntimeError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message, options) {\n super(message, options);\n }\n get name() {\n return 'MongoAWSError';\n }\n}\nexports.MongoAWSError = MongoAWSError;\n/**\n * A error generated when the user attempts to authenticate\n * via OIDC callbacks, but fails.\n *\n * @public\n * @category Error\n */\nclass MongoOIDCError extends MongoRuntimeError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message) {\n super(message);\n }\n get name() {\n return 'MongoOIDCError';\n }\n}\nexports.MongoOIDCError = MongoOIDCError;\n/**\n * A error generated when the user attempts to authenticate\n * via Azure, but fails.\n *\n * @public\n * @category Error\n */\nclass MongoAzureError extends MongoOIDCError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message) {\n super(message);\n }\n get name() {\n return 'MongoAzureError';\n }\n}\nexports.MongoAzureError = MongoAzureError;\n/**\n * A error generated when the user attempts to authenticate\n * via GCP, but fails.\n *\n * @public\n * @category Error\n */\nclass MongoGCPError extends MongoOIDCError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message) {\n super(message);\n }\n get name() {\n return 'MongoGCPError';\n }\n}\nexports.MongoGCPError = MongoGCPError;\n/**\n * An error indicating that an error occurred when executing the bulk write.\n *\n * @public\n * @category Error\n */\nclass MongoClientBulkWriteError extends MongoServerError {\n /**\n * Initialize the client bulk write error.\n * @param message - The error message.\n */\n constructor(message) {\n super(message);\n this.writeConcernErrors = [];\n this.writeErrors = new Map();\n }\n get name() {\n return 'MongoClientBulkWriteError';\n }\n}\nexports.MongoClientBulkWriteError = MongoClientBulkWriteError;\n/**\n * An error indicating that an error occurred when processing bulk write results.\n *\n * @public\n * @category Error\n */\nclass MongoClientBulkWriteCursorError extends MongoRuntimeError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message) {\n super(message);\n }\n get name() {\n return 'MongoClientBulkWriteCursorError';\n }\n}\nexports.MongoClientBulkWriteCursorError = MongoClientBulkWriteCursorError;\n/**\n * An error indicating that an error occurred on the client when executing a client bulk write.\n *\n * @public\n * @category Error\n */\nclass MongoClientBulkWriteExecutionError extends MongoRuntimeError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message) {\n super(message);\n }\n get name() {\n return 'MongoClientBulkWriteExecutionError';\n }\n}\nexports.MongoClientBulkWriteExecutionError = MongoClientBulkWriteExecutionError;\n/**\n * An error generated when a ChangeStream operation fails to execute.\n *\n * @public\n * @category Error\n */\nclass MongoChangeStreamError extends MongoRuntimeError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message) {\n super(message);\n }\n get name() {\n return 'MongoChangeStreamError';\n }\n}\nexports.MongoChangeStreamError = MongoChangeStreamError;\n/**\n * An error thrown when the user calls a function or method not supported on a tailable cursor\n *\n * @public\n * @category Error\n */\nclass MongoTailableCursorError extends MongoAPIError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message = 'Tailable cursor does not support this operation') {\n super(message);\n }\n get name() {\n return 'MongoTailableCursorError';\n }\n}\nexports.MongoTailableCursorError = MongoTailableCursorError;\n/** An error generated when a GridFSStream operation fails to execute.\n *\n * @public\n * @category Error\n */\nclass MongoGridFSStreamError extends MongoRuntimeError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message) {\n super(message);\n }\n get name() {\n return 'MongoGridFSStreamError';\n }\n}\nexports.MongoGridFSStreamError = MongoGridFSStreamError;\n/**\n * An error generated when a malformed or invalid chunk is\n * encountered when reading from a GridFSStream.\n *\n * @public\n * @category Error\n */\nclass MongoGridFSChunkError extends MongoRuntimeError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message) {\n super(message);\n }\n get name() {\n return 'MongoGridFSChunkError';\n }\n}\nexports.MongoGridFSChunkError = MongoGridFSChunkError;\n/**\n * An error generated when a **parsable** unexpected response comes from the server.\n * This is generally an error where the driver in a state expecting a certain behavior to occur in\n * the next message from MongoDB but it receives something else.\n * This error **does not** represent an issue with wire message formatting.\n *\n * #### Example\n * When an operation fails, it is the driver's job to retry it. It must perform serverSelection\n * again to make sure that it attempts the operation against a server in a good state. If server\n * selection returns a server that does not support retryable operations, this error is used.\n * This scenario is unlikely as retryable support would also have been determined on the first attempt\n * but it is possible the state change could report a selectable server that does not support retries.\n *\n * @public\n * @category Error\n */\nclass MongoUnexpectedServerResponseError extends MongoRuntimeError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message, options) {\n super(message, options);\n }\n get name() {\n return 'MongoUnexpectedServerResponseError';\n }\n}\nexports.MongoUnexpectedServerResponseError = MongoUnexpectedServerResponseError;\n/**\n * @public\n * @category Error\n *\n * The `MongoOperationTimeoutError` class represents an error that occurs when an operation could not be completed within the specified `timeoutMS`.\n * It is generated by the driver in support of the \"client side operation timeout\" feature so inherits from `MongoDriverError`.\n * When `timeoutMS` is enabled `MongoServerError`s relating to `MaxTimeExpired` errors will be converted to `MongoOperationTimeoutError`\n *\n * @example\n * ```ts\n * try {\n * await blogs.insertOne(blogPost, { timeoutMS: 60_000 })\n * } catch (error) {\n * if (error instanceof MongoOperationTimeoutError) {\n * console.log(`Oh no! writer's block!`, error);\n * }\n * }\n * ```\n */\nclass MongoOperationTimeoutError extends MongoDriverError {\n get name() {\n return 'MongoOperationTimeoutError';\n }\n}\nexports.MongoOperationTimeoutError = MongoOperationTimeoutError;\n/**\n * An error thrown when the user attempts to add options to a cursor that has already been\n * initialized\n *\n * @public\n * @category Error\n */\nclass MongoCursorInUseError extends MongoAPIError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message = 'Cursor is already initialized') {\n super(message);\n }\n get name() {\n return 'MongoCursorInUseError';\n }\n}\nexports.MongoCursorInUseError = MongoCursorInUseError;\n/**\n * An error generated when an attempt is made to operate\n * on a closed/closing server.\n *\n * @public\n * @category Error\n */\nclass MongoServerClosedError extends MongoAPIError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message = 'Server is closed') {\n super(message);\n }\n get name() {\n return 'MongoServerClosedError';\n }\n}\nexports.MongoServerClosedError = MongoServerClosedError;\n/**\n * An error thrown when an attempt is made to read from a cursor that has been exhausted\n *\n * @public\n * @category Error\n */\nclass MongoCursorExhaustedError extends MongoAPIError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message) {\n super(message || 'Cursor is exhausted');\n }\n get name() {\n return 'MongoCursorExhaustedError';\n }\n}\nexports.MongoCursorExhaustedError = MongoCursorExhaustedError;\n/**\n * An error generated when an attempt is made to operate on a\n * dropped, or otherwise unavailable, database.\n *\n * @public\n * @category Error\n */\nclass MongoTopologyClosedError extends MongoAPIError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message = 'Topology is closed') {\n super(message);\n }\n get name() {\n return 'MongoTopologyClosedError';\n }\n}\nexports.MongoTopologyClosedError = MongoTopologyClosedError;\n/**\n * An error generated when the MongoClient is closed and async\n * operations are interrupted.\n *\n * @public\n * @category Error\n */\nclass MongoClientClosedError extends MongoAPIError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor() {\n super('Operation interrupted because client was closed');\n }\n get name() {\n return 'MongoClientClosedError';\n }\n}\nexports.MongoClientClosedError = MongoClientClosedError;\n/**\n * An error indicating an issue with the network, including TCP errors and timeouts.\n * @public\n * @category Error\n */\nclass MongoNetworkError extends MongoError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message, options) {\n super(message, { cause: options?.cause });\n this.beforeHandshake = !!options?.beforeHandshake;\n }\n get name() {\n return 'MongoNetworkError';\n }\n}\nexports.MongoNetworkError = MongoNetworkError;\n/**\n * An error indicating a network timeout occurred\n * @public\n * @category Error\n *\n * @privateRemarks\n * mongodb-client-encryption has a dependency on this error with an instanceof check\n */\nclass MongoNetworkTimeoutError extends MongoNetworkError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message, options) {\n super(message, options);\n }\n get name() {\n return 'MongoNetworkTimeoutError';\n }\n}\nexports.MongoNetworkTimeoutError = MongoNetworkTimeoutError;\n/**\n * An error used when attempting to parse a value (like a connection string)\n * @public\n * @category Error\n */\nclass MongoParseError extends MongoDriverError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message) {\n super(message);\n }\n get name() {\n return 'MongoParseError';\n }\n}\nexports.MongoParseError = MongoParseError;\n/**\n * An error generated when the user supplies malformed or unexpected arguments\n * or when a required argument or field is not provided.\n *\n *\n * @public\n * @category Error\n */\nclass MongoInvalidArgumentError extends MongoAPIError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message, options) {\n super(message, options);\n }\n get name() {\n return 'MongoInvalidArgumentError';\n }\n}\nexports.MongoInvalidArgumentError = MongoInvalidArgumentError;\n/**\n * An error generated when a feature that is not enabled or allowed for the current server\n * configuration is used\n *\n *\n * @public\n * @category Error\n */\nclass MongoCompatibilityError extends MongoAPIError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message) {\n super(message);\n }\n get name() {\n return 'MongoCompatibilityError';\n }\n}\nexports.MongoCompatibilityError = MongoCompatibilityError;\n/**\n * An error generated when the user fails to provide authentication credentials before attempting\n * to connect to a mongo server instance.\n *\n *\n * @public\n * @category Error\n */\nclass MongoMissingCredentialsError extends MongoAPIError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message) {\n super(message);\n }\n get name() {\n return 'MongoMissingCredentialsError';\n }\n}\nexports.MongoMissingCredentialsError = MongoMissingCredentialsError;\n/**\n * An error generated when a required module or dependency is not present in the local environment\n *\n * @public\n * @category Error\n */\nclass MongoMissingDependencyError extends MongoAPIError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message, options) {\n super(message, options);\n this.dependencyName = options.dependencyName;\n }\n get name() {\n return 'MongoMissingDependencyError';\n }\n}\nexports.MongoMissingDependencyError = MongoMissingDependencyError;\n/**\n * An error signifying a general system issue\n * @public\n * @category Error\n */\nclass MongoSystemError extends MongoError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message, reason) {\n if (reason && reason.error) {\n super(MongoError.buildErrorMessage(reason.error.message || reason.error), {\n cause: reason.error\n });\n }\n else {\n super(message);\n }\n if (reason) {\n this.reason = reason;\n }\n this.code = reason.error?.code;\n }\n get name() {\n return 'MongoSystemError';\n }\n}\nexports.MongoSystemError = MongoSystemError;\n/**\n * An error signifying a client-side server selection error\n * @public\n * @category Error\n */\nclass MongoServerSelectionError extends MongoSystemError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(message, reason) {\n super(message, reason);\n }\n get name() {\n return 'MongoServerSelectionError';\n }\n}\nexports.MongoServerSelectionError = MongoServerSelectionError;\n/**\n * An error thrown when the server reports a writeConcernError\n * @public\n * @category Error\n */\nclass MongoWriteConcernError extends MongoServerError {\n /**\n * **Do not use this constructor!**\n *\n * Meant for internal use only.\n *\n * @remarks\n * This class is only meant to be constructed within the driver. This constructor is\n * not subject to semantic versioning compatibility guarantees and may change at any time.\n *\n * @public\n **/\n constructor(result) {\n super({ ...result.writeConcernError, ...result });\n this.errInfo = result.writeConcernError.errInfo;\n this.result = result;\n }\n get name() {\n return 'MongoWriteConcernError';\n }\n}\nexports.MongoWriteConcernError = MongoWriteConcernError;\n// https://github.com/mongodb/specifications/blob/master/source/retryable-reads/retryable-reads.md#retryable-error\nconst RETRYABLE_READ_ERROR_CODES = new Set([\n exports.MONGODB_ERROR_CODES.HostUnreachable,\n exports.MONGODB_ERROR_CODES.HostNotFound,\n exports.MONGODB_ERROR_CODES.NetworkTimeout,\n exports.MONGODB_ERROR_CODES.ShutdownInProgress,\n exports.MONGODB_ERROR_CODES.PrimarySteppedDown,\n exports.MONGODB_ERROR_CODES.SocketException,\n exports.MONGODB_ERROR_CODES.NotWritablePrimary,\n exports.MONGODB_ERROR_CODES.InterruptedAtShutdown,\n exports.MONGODB_ERROR_CODES.InterruptedDueToReplStateChange,\n exports.MONGODB_ERROR_CODES.NotPrimaryNoSecondaryOk,\n exports.MONGODB_ERROR_CODES.NotPrimaryOrSecondary,\n exports.MONGODB_ERROR_CODES.ExceededTimeLimit,\n exports.MONGODB_ERROR_CODES.ReadConcernMajorityNotAvailableYet\n]);\n// see: https://github.com/mongodb/specifications/blob/master/source/retryable-writes/retryable-writes.md#terms\nconst RETRYABLE_WRITE_ERROR_CODES = RETRYABLE_READ_ERROR_CODES;\nfunction needsRetryableWriteLabel(error, maxWireVersion, serverType) {\n // pre-4.4 server, then the driver adds an error label for every valid case\n // execute operation will only inspect the label, code/message logic is handled here\n if (error instanceof MongoNetworkError) {\n return true;\n }\n if (error instanceof MongoError) {\n if ((maxWireVersion >= 9 || isRetryableWriteError(error)) &&\n !error.hasErrorLabel(exports.MongoErrorLabel.HandshakeError)) {\n // If we already have the error label no need to add it again. 4.4+ servers add the label.\n // In the case where we have a handshake error, need to fall down to the logic checking\n // the codes.\n return false;\n }\n }\n if (error instanceof MongoWriteConcernError) {\n if (serverType === 'Mongos' && maxWireVersion < 9) {\n // use original top-level code from server response\n return RETRYABLE_WRITE_ERROR_CODES.has(error.result.code ?? 0);\n }\n const code = error.result.writeConcernError.code ?? Number(error.code);\n return RETRYABLE_WRITE_ERROR_CODES.has(Number.isNaN(code) ? 0 : code);\n }\n if (error instanceof MongoError) {\n return RETRYABLE_WRITE_ERROR_CODES.has(Number(error.code));\n }\n const isNotWritablePrimaryError = exports.LEGACY_NOT_WRITABLE_PRIMARY_ERROR_MESSAGE.test(error.message);\n if (isNotWritablePrimaryError) {\n return true;\n }\n const isNodeIsRecoveringError = exports.NODE_IS_RECOVERING_ERROR_MESSAGE.test(error.message);\n if (isNodeIsRecoveringError) {\n return true;\n }\n return false;\n}\nfunction isRetryableWriteError(error) {\n return (error.hasErrorLabel(exports.MongoErrorLabel.RetryableWriteError) ||\n error.hasErrorLabel(exports.MongoErrorLabel.PoolRequstedRetry));\n}\n/** Determines whether an error is something the driver should attempt to retry */\nfunction isRetryableReadError(error) {\n const hasRetryableErrorCode = typeof error.code === 'number' ? RETRYABLE_READ_ERROR_CODES.has(error.code) : false;\n if (hasRetryableErrorCode) {\n return true;\n }\n if (error instanceof MongoNetworkError) {\n return true;\n }\n const isNotWritablePrimaryError = exports.LEGACY_NOT_WRITABLE_PRIMARY_ERROR_MESSAGE.test(error.message);\n if (isNotWritablePrimaryError) {\n return true;\n }\n const isNodeIsRecoveringError = exports.NODE_IS_RECOVERING_ERROR_MESSAGE.test(error.message);\n if (isNodeIsRecoveringError) {\n return true;\n }\n return false;\n}\nconst SDAM_RECOVERING_CODES = new Set([\n exports.MONGODB_ERROR_CODES.ShutdownInProgress,\n exports.MONGODB_ERROR_CODES.PrimarySteppedDown,\n exports.MONGODB_ERROR_CODES.InterruptedAtShutdown,\n exports.MONGODB_ERROR_CODES.InterruptedDueToReplStateChange,\n exports.MONGODB_ERROR_CODES.NotPrimaryOrSecondary\n]);\nconst SDAM_NOT_PRIMARY_CODES = new Set([\n exports.MONGODB_ERROR_CODES.NotWritablePrimary,\n exports.MONGODB_ERROR_CODES.NotPrimaryNoSecondaryOk,\n exports.MONGODB_ERROR_CODES.LegacyNotPrimary\n]);\nconst SDAM_NODE_SHUTTING_DOWN_ERROR_CODES = new Set([\n exports.MONGODB_ERROR_CODES.InterruptedAtShutdown,\n exports.MONGODB_ERROR_CODES.ShutdownInProgress\n]);\nfunction isRecoveringError(err) {\n if (typeof err.code === 'number') {\n // If any error code exists, we ignore the error.message\n return SDAM_RECOVERING_CODES.has(err.code);\n }\n return (exports.LEGACY_NOT_PRIMARY_OR_SECONDARY_ERROR_MESSAGE.test(err.message) ||\n exports.NODE_IS_RECOVERING_ERROR_MESSAGE.test(err.message));\n}\nfunction isNotWritablePrimaryError(err) {\n if (typeof err.code === 'number') {\n // If any error code exists, we ignore the error.message\n return SDAM_NOT_PRIMARY_CODES.has(err.code);\n }\n if (isRecoveringError(err)) {\n return false;\n }\n return exports.LEGACY_NOT_WRITABLE_PRIMARY_ERROR_MESSAGE.test(err.message);\n}\nfunction isNodeShuttingDownError(err) {\n return !!(typeof err.code === 'number' && SDAM_NODE_SHUTTING_DOWN_ERROR_CODES.has(err.code));\n}\n/**\n * Determines whether SDAM can recover from a given error. If it cannot\n * then the pool will be cleared, and server state will completely reset\n * locally.\n *\n * @see https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.md#not-writable-primary-and-node-is-recovering\n */\nfunction isSDAMUnrecoverableError(error) {\n // NOTE: null check is here for a strictly pre-CMAP world, a timeout or\n // close event are considered unrecoverable\n if (error instanceof MongoParseError || error == null) {\n return true;\n }\n return isRecoveringError(error) || isNotWritablePrimaryError(error);\n}\nfunction isNetworkTimeoutError(err) {\n return !!(err instanceof MongoNetworkError && err.message.match(/timed out/));\n}\nfunction isResumableError(error, wireVersion) {\n if (error == null || !(error instanceof MongoError)) {\n return false;\n }\n if (error instanceof MongoNetworkError) {\n return true;\n }\n if (error instanceof MongoServerSelectionError) {\n return true;\n }\n if (wireVersion != null && wireVersion >= 9) {\n // DRIVERS-1308: For 4.4 drivers running against 4.4 servers, drivers will add a special case to treat the CursorNotFound error code as resumable\n if (error.code === exports.MONGODB_ERROR_CODES.CursorNotFound) {\n return true;\n }\n return error.hasErrorLabel(exports.MongoErrorLabel.ResumableChangeStreamError);\n }\n if (typeof error.code === 'number') {\n return exports.GET_MORE_RESUMABLE_CODES.has(error.code);\n }\n return false;\n}\n//# sourceMappingURL=error.js.map"],"x_google_ignoreList":[0],"mappings":";;;;AACA,QAAO,eAAe,SAAS,cAAc,EAAE,OAAO,MAAM,CAAC;AAC7D,SAAQ,yBAAyB,QAAQ,4BAA4B,QAAQ,mBAAmB,QAAQ,8BAA8B,QAAQ,+BAA+B,QAAQ,0BAA0B,QAAQ,4BAA4B,QAAQ,kBAAkB,QAAQ,2BAA2B,QAAQ,oBAAoB,QAAQ,yBAAyB,QAAQ,2BAA2B,QAAQ,4BAA4B,QAAQ,yBAAyB,QAAQ,wBAAwB,QAAQ,6BAA6B,QAAQ,qCAAqC,QAAQ,wBAAwB,QAAQ,yBAAyB,QAAQ,2BAA2B,QAAQ,yBAAyB,QAAQ,qCAAqC,QAAQ,kCAAkC,QAAQ,4BAA4B,QAAQ,gBAAgB,QAAQ,kBAAkB,QAAQ,iBAAiB,QAAQ,gBAAgB,QAAQ,qBAAqB,QAAQ,2BAA2B,QAAQ,wBAAwB,QAAQ,yBAAyB,QAAQ,0BAA0B,QAAQ,6BAA6B,QAAQ,yBAAyB,QAAQ,oBA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AI,CACtB,QAAO;AAEX,SAAO,QAAQ,0CAA0C,KAAK,IAAI,QAAQ;;CAE9E,SAAS,wBAAwB,KAAK;AAClC,SAAO,CAAC,EAAE,OAAO,IAAI,SAAS,YAAY,oCAAoC,IAAI,IAAI,KAAK;;;;;;;;;CAS/F,SAAS,yBAAyB,OAAO;AAGrC,MAAI,iBAAiB,mBAAmB,SAAS,KAC7C,QAAO;AAEX,SAAO,kBAAkB,MAAM,IAAI,0BAA0B,MAAM;;CAEvE,SAAS,sBAAsB,KAAK;AAChC,SAAO,CAAC,EAAE,eAAe,qBAAqB,IAAI,QAAQ,MAAM,YAAY;;CAEhF,SAAS,iBAAiB,OAAO,aAAa;AAC1C,MAAI,SAAS,QAAQ,EAAE,iBAAiB,YACpC,QAAO;AAEX,MAAI,iBAAiB,kBACjB,QAAO;AAEX,MAAI,iBAAiB,0BACjB,QAAO;AAEX,MAAI,eAAe,QAAQ,eAAe,GAAG;AAEzC,OAAI,MAAM,SAAS,QAAQ,oBAAoB,eAC3C,QAAO;AAEX,UAAO,MAAM,cAAc,QAAQ,gBAAgB,2BAA2B;;AAElF,MAAI,OAAO,MAAM,SAAS,SACtB,QAAO,QAAQ,yBAAyB,IAAI,MAAM,KAAK;AAE3D,SAAO"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../_virtual/rolldown_runtime.mjs";
|
|
2
|
-
import { require_error } from "./error.mjs";
|
|
3
|
-
|
|
4
|
-
//#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/explain.js
|
|
5
|
-
var require_explain = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.Explain = exports.ExplainVerbosity = void 0;
|
|
8
|
-
exports.validateExplainTimeoutOptions = validateExplainTimeoutOptions;
|
|
9
|
-
exports.decorateWithExplain = decorateWithExplain;
|
|
10
|
-
const error_1 = require_error();
|
|
11
|
-
/** @public */
|
|
12
|
-
exports.ExplainVerbosity = Object.freeze({
|
|
13
|
-
queryPlanner: "queryPlanner",
|
|
14
|
-
queryPlannerExtended: "queryPlannerExtended",
|
|
15
|
-
executionStats: "executionStats",
|
|
16
|
-
allPlansExecution: "allPlansExecution"
|
|
17
|
-
});
|
|
18
|
-
/** @internal */
|
|
19
|
-
var Explain = class Explain {
|
|
20
|
-
constructor(verbosity, maxTimeMS) {
|
|
21
|
-
if (typeof verbosity === "boolean") this.verbosity = verbosity ? exports.ExplainVerbosity.allPlansExecution : exports.ExplainVerbosity.queryPlanner;
|
|
22
|
-
else this.verbosity = verbosity;
|
|
23
|
-
this.maxTimeMS = maxTimeMS;
|
|
24
|
-
}
|
|
25
|
-
static fromOptions({ explain } = {}) {
|
|
26
|
-
if (explain == null) return;
|
|
27
|
-
if (typeof explain === "boolean" || typeof explain === "string") return new Explain(explain);
|
|
28
|
-
const { verbosity, maxTimeMS } = explain;
|
|
29
|
-
return new Explain(verbosity, maxTimeMS);
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
exports.Explain = Explain;
|
|
33
|
-
function validateExplainTimeoutOptions(options, explain) {
|
|
34
|
-
const { maxTimeMS, timeoutMS } = options;
|
|
35
|
-
if (timeoutMS != null && (maxTimeMS != null || explain?.maxTimeMS != null)) throw new error_1.MongoAPIError("Cannot use maxTimeMS with timeoutMS for explain commands.");
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Applies an explain to a given command.
|
|
39
|
-
* @internal
|
|
40
|
-
*
|
|
41
|
-
* @param command - the command on which to apply the explain
|
|
42
|
-
* @param options - the options containing the explain verbosity
|
|
43
|
-
*/
|
|
44
|
-
function decorateWithExplain(command, explain) {
|
|
45
|
-
const { verbosity, maxTimeMS } = explain;
|
|
46
|
-
const baseCommand = {
|
|
47
|
-
explain: command,
|
|
48
|
-
verbosity
|
|
49
|
-
};
|
|
50
|
-
if (typeof maxTimeMS === "number") baseCommand.maxTimeMS = maxTimeMS;
|
|
51
|
-
return baseCommand;
|
|
52
|
-
}
|
|
53
|
-
}));
|
|
54
|
-
|
|
55
|
-
//#endregion
|
|
56
|
-
export default require_explain();
|
|
57
|
-
|
|
58
|
-
export { require_explain };
|
|
59
|
-
//# sourceMappingURL=explain.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"explain.mjs","names":[],"sources":["../../../../../../../../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/explain.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Explain = exports.ExplainVerbosity = void 0;\nexports.validateExplainTimeoutOptions = validateExplainTimeoutOptions;\nexports.decorateWithExplain = decorateWithExplain;\nconst error_1 = require(\"./error\");\n/** @public */\nexports.ExplainVerbosity = Object.freeze({\n queryPlanner: 'queryPlanner',\n queryPlannerExtended: 'queryPlannerExtended',\n executionStats: 'executionStats',\n allPlansExecution: 'allPlansExecution'\n});\n/** @internal */\nclass Explain {\n constructor(verbosity, maxTimeMS) {\n if (typeof verbosity === 'boolean') {\n this.verbosity = verbosity\n ? exports.ExplainVerbosity.allPlansExecution\n : exports.ExplainVerbosity.queryPlanner;\n }\n else {\n this.verbosity = verbosity;\n }\n this.maxTimeMS = maxTimeMS;\n }\n static fromOptions({ explain } = {}) {\n if (explain == null)\n return;\n if (typeof explain === 'boolean' || typeof explain === 'string') {\n return new Explain(explain);\n }\n const { verbosity, maxTimeMS } = explain;\n return new Explain(verbosity, maxTimeMS);\n }\n}\nexports.Explain = Explain;\nfunction validateExplainTimeoutOptions(options, explain) {\n const { maxTimeMS, timeoutMS } = options;\n if (timeoutMS != null && (maxTimeMS != null || explain?.maxTimeMS != null)) {\n throw new error_1.MongoAPIError('Cannot use maxTimeMS with timeoutMS for explain commands.');\n }\n}\n/**\n * Applies an explain to a given command.\n * @internal\n *\n * @param command - the command on which to apply the explain\n * @param options - the options containing the explain verbosity\n */\nfunction decorateWithExplain(command, explain) {\n const { verbosity, maxTimeMS } = explain;\n const baseCommand = { explain: command, verbosity };\n if (typeof maxTimeMS === 'number') {\n baseCommand.maxTimeMS = maxTimeMS;\n }\n return baseCommand;\n}\n//# sourceMappingURL=explain.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;AACA,QAAO,eAAe,SAAS,cAAc,EAAE,OAAO,MAAM,CAAC;AAC7D,SAAQ,UAAU,QAAQ,mBAAmB,KAAK;AAClD,SAAQ,gCAAgC;AACxC,SAAQ,sBAAsB;CAC9B,MAAM;;AAEN,SAAQ,mBAAmB,OAAO,OAAO;EACrC,cAAc;EACd,sBAAsB;EACtB,gBAAgB;EAChB,mBAAmB;EACtB,CAAC;;CAEF,IAAM,UAAN,MAAM,QAAQ;EACV,YAAY,WAAW,WAAW;AAC9B,OAAI,OAAO,cAAc,UACrB,MAAK,YAAY,YACX,QAAQ,iBAAiB,oBACzB,QAAQ,iBAAiB;OAG/B,MAAK,YAAY;AAErB,QAAK,YAAY;;EAErB,OAAO,YAAY,EAAE,YAAY,EAAE,EAAE;AACjC,OAAI,WAAW,KACX;AACJ,OAAI,OAAO,YAAY,aAAa,OAAO,YAAY,SACnD,QAAO,IAAI,QAAQ,QAAQ;GAE/B,MAAM,EAAE,WAAW,cAAc;AACjC,UAAO,IAAI,QAAQ,WAAW,UAAU;;;AAGhD,SAAQ,UAAU;CAClB,SAAS,8BAA8B,SAAS,SAAS;EACrD,MAAM,EAAE,WAAW,cAAc;AACjC,MAAI,aAAa,SAAS,aAAa,QAAQ,SAAS,aAAa,MACjE,OAAM,IAAI,QAAQ,cAAc,4DAA4D;;;;;;;;;CAUpG,SAAS,oBAAoB,SAAS,SAAS;EAC3C,MAAM,EAAE,WAAW,cAAc;EACjC,MAAM,cAAc;GAAE,SAAS;GAAS;GAAW;AACnD,MAAI,OAAO,cAAc,SACrB,aAAY,YAAY;AAE5B,SAAO"}
|
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin, __require } from "../../../../../../../_virtual/rolldown_runtime.mjs";
|
|
2
|
-
import { require_error } from "../error.mjs";
|
|
3
|
-
import { require_timeout } from "../timeout.mjs";
|
|
4
|
-
import { require_abstract_cursor } from "../cursor/abstract_cursor.mjs";
|
|
5
|
-
|
|
6
|
-
//#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/download.js
|
|
7
|
-
var require_download = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.GridFSBucketReadStream = void 0;
|
|
10
|
-
const stream_1 = __require("stream");
|
|
11
|
-
const abstract_cursor_1 = require_abstract_cursor();
|
|
12
|
-
const error_1 = require_error();
|
|
13
|
-
const timeout_1 = require_timeout();
|
|
14
|
-
/**
|
|
15
|
-
* A readable stream that enables you to read buffers from GridFS.
|
|
16
|
-
*
|
|
17
|
-
* Do not instantiate this class directly. Use `openDownloadStream()` instead.
|
|
18
|
-
* @public
|
|
19
|
-
*/
|
|
20
|
-
var GridFSBucketReadStream = class extends stream_1.Readable {
|
|
21
|
-
/**
|
|
22
|
-
* @param chunks - Handle for chunks collection
|
|
23
|
-
* @param files - Handle for files collection
|
|
24
|
-
* @param readPreference - The read preference to use
|
|
25
|
-
* @param filter - The filter to use to find the file document
|
|
26
|
-
* @internal
|
|
27
|
-
*/
|
|
28
|
-
constructor(chunks, files, readPreference, filter, options) {
|
|
29
|
-
super({ emitClose: true });
|
|
30
|
-
this.s = {
|
|
31
|
-
bytesToTrim: 0,
|
|
32
|
-
bytesToSkip: 0,
|
|
33
|
-
bytesRead: 0,
|
|
34
|
-
chunks,
|
|
35
|
-
expected: 0,
|
|
36
|
-
files,
|
|
37
|
-
filter,
|
|
38
|
-
init: false,
|
|
39
|
-
expectedEnd: 0,
|
|
40
|
-
options: {
|
|
41
|
-
start: 0,
|
|
42
|
-
end: 0,
|
|
43
|
-
...options
|
|
44
|
-
},
|
|
45
|
-
readPreference,
|
|
46
|
-
timeoutContext: options?.timeoutMS != null ? new timeout_1.CSOTTimeoutContext({
|
|
47
|
-
timeoutMS: options.timeoutMS,
|
|
48
|
-
serverSelectionTimeoutMS: 0
|
|
49
|
-
}) : void 0
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Reads from the cursor and pushes to the stream.
|
|
54
|
-
* Private Impl, do not call directly
|
|
55
|
-
* @internal
|
|
56
|
-
*/
|
|
57
|
-
_read() {
|
|
58
|
-
if (this.destroyed) return;
|
|
59
|
-
waitForFile(this, () => doRead(this));
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Sets the 0-based offset in bytes to start streaming from. Throws
|
|
63
|
-
* an error if this stream has entered flowing mode
|
|
64
|
-
* (e.g. if you've already called `on('data')`)
|
|
65
|
-
*
|
|
66
|
-
* @param start - 0-based offset in bytes to start streaming from
|
|
67
|
-
*/
|
|
68
|
-
start(start = 0) {
|
|
69
|
-
throwIfInitialized(this);
|
|
70
|
-
this.s.options.start = start;
|
|
71
|
-
return this;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Sets the 0-based offset in bytes to start streaming from. Throws
|
|
75
|
-
* an error if this stream has entered flowing mode
|
|
76
|
-
* (e.g. if you've already called `on('data')`)
|
|
77
|
-
*
|
|
78
|
-
* @param end - Offset in bytes to stop reading at
|
|
79
|
-
*/
|
|
80
|
-
end(end = 0) {
|
|
81
|
-
throwIfInitialized(this);
|
|
82
|
-
this.s.options.end = end;
|
|
83
|
-
return this;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Marks this stream as aborted (will never push another `data` event)
|
|
87
|
-
* and kills the underlying cursor. Will emit the 'end' event, and then
|
|
88
|
-
* the 'close' event once the cursor is successfully killed.
|
|
89
|
-
*/
|
|
90
|
-
async abort() {
|
|
91
|
-
this.push(null);
|
|
92
|
-
this.destroy();
|
|
93
|
-
const remainingTimeMS = this.s.timeoutContext?.getRemainingTimeMSOrThrow();
|
|
94
|
-
await this.s.cursor?.close({ timeoutMS: remainingTimeMS });
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
exports.GridFSBucketReadStream = GridFSBucketReadStream;
|
|
98
|
-
/**
|
|
99
|
-
* Fires when the stream loaded the file document corresponding to the provided id.
|
|
100
|
-
* @event
|
|
101
|
-
*/
|
|
102
|
-
GridFSBucketReadStream.FILE = "file";
|
|
103
|
-
function throwIfInitialized(stream) {
|
|
104
|
-
if (stream.s.init) throw new error_1.MongoGridFSStreamError("Options cannot be changed after the stream is initialized");
|
|
105
|
-
}
|
|
106
|
-
function doRead(stream) {
|
|
107
|
-
if (stream.destroyed) return;
|
|
108
|
-
if (!stream.s.cursor) return;
|
|
109
|
-
if (!stream.s.file) return;
|
|
110
|
-
const handleReadResult = (doc) => {
|
|
111
|
-
if (stream.destroyed) return;
|
|
112
|
-
if (!doc) {
|
|
113
|
-
stream.push(null);
|
|
114
|
-
stream.s.cursor?.close().then(void 0, (error) => stream.destroy(error));
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
if (!stream.s.file) return;
|
|
118
|
-
const bytesRemaining = stream.s.file.length - stream.s.bytesRead;
|
|
119
|
-
const expectedN = stream.s.expected++;
|
|
120
|
-
const expectedLength = Math.min(stream.s.file.chunkSize, bytesRemaining);
|
|
121
|
-
if (doc.n > expectedN) return stream.destroy(new error_1.MongoGridFSChunkError(`ChunkIsMissing: Got unexpected n: ${doc.n}, expected: ${expectedN}`));
|
|
122
|
-
if (doc.n < expectedN) return stream.destroy(new error_1.MongoGridFSChunkError(`ExtraChunk: Got unexpected n: ${doc.n}, expected: ${expectedN}`));
|
|
123
|
-
let buf = Buffer.isBuffer(doc.data) ? doc.data : doc.data.buffer;
|
|
124
|
-
if (buf.byteLength !== expectedLength) {
|
|
125
|
-
if (bytesRemaining <= 0) return stream.destroy(new error_1.MongoGridFSChunkError(`ExtraChunk: Got unexpected n: ${doc.n}, expected file length ${stream.s.file.length} bytes but already read ${stream.s.bytesRead} bytes`));
|
|
126
|
-
return stream.destroy(new error_1.MongoGridFSChunkError(`ChunkIsWrongSize: Got unexpected length: ${buf.byteLength}, expected: ${expectedLength}`));
|
|
127
|
-
}
|
|
128
|
-
stream.s.bytesRead += buf.byteLength;
|
|
129
|
-
if (buf.byteLength === 0) return stream.push(null);
|
|
130
|
-
let sliceStart = null;
|
|
131
|
-
let sliceEnd = null;
|
|
132
|
-
if (stream.s.bytesToSkip != null) {
|
|
133
|
-
sliceStart = stream.s.bytesToSkip;
|
|
134
|
-
stream.s.bytesToSkip = 0;
|
|
135
|
-
}
|
|
136
|
-
const atEndOfStream = expectedN === stream.s.expectedEnd - 1;
|
|
137
|
-
const bytesLeftToRead = stream.s.options.end - stream.s.bytesToSkip;
|
|
138
|
-
if (atEndOfStream && stream.s.bytesToTrim != null) sliceEnd = stream.s.file.chunkSize - stream.s.bytesToTrim;
|
|
139
|
-
else if (stream.s.options.end && bytesLeftToRead < doc.data.byteLength) sliceEnd = bytesLeftToRead;
|
|
140
|
-
if (sliceStart != null || sliceEnd != null) buf = buf.slice(sliceStart || 0, sliceEnd || buf.byteLength);
|
|
141
|
-
stream.push(buf);
|
|
142
|
-
};
|
|
143
|
-
stream.s.cursor.next().then(handleReadResult, (error) => {
|
|
144
|
-
if (stream.destroyed) return;
|
|
145
|
-
stream.destroy(error);
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
function init(stream) {
|
|
149
|
-
const findOneOptions = {};
|
|
150
|
-
if (stream.s.readPreference) findOneOptions.readPreference = stream.s.readPreference;
|
|
151
|
-
if (stream.s.options && stream.s.options.sort) findOneOptions.sort = stream.s.options.sort;
|
|
152
|
-
if (stream.s.options && stream.s.options.skip) findOneOptions.skip = stream.s.options.skip;
|
|
153
|
-
const handleReadResult = (doc) => {
|
|
154
|
-
if (stream.destroyed) return;
|
|
155
|
-
if (!doc) {
|
|
156
|
-
const errmsg = `FileNotFound: file ${stream.s.filter._id ? stream.s.filter._id.toString() : stream.s.filter.filename} was not found`;
|
|
157
|
-
const err = new error_1.MongoRuntimeError(errmsg);
|
|
158
|
-
err.code = "ENOENT";
|
|
159
|
-
return stream.destroy(err);
|
|
160
|
-
}
|
|
161
|
-
if (doc.length <= 0) {
|
|
162
|
-
stream.push(null);
|
|
163
|
-
return;
|
|
164
|
-
}
|
|
165
|
-
if (stream.destroyed) {
|
|
166
|
-
stream.destroy();
|
|
167
|
-
return;
|
|
168
|
-
}
|
|
169
|
-
try {
|
|
170
|
-
stream.s.bytesToSkip = handleStartOption(stream, doc, stream.s.options);
|
|
171
|
-
} catch (error) {
|
|
172
|
-
return stream.destroy(error);
|
|
173
|
-
}
|
|
174
|
-
const filter = { files_id: doc._id };
|
|
175
|
-
if (stream.s.options && stream.s.options.start != null) {
|
|
176
|
-
const skip = Math.floor(stream.s.options.start / doc.chunkSize);
|
|
177
|
-
if (skip > 0) filter["n"] = { $gte: skip };
|
|
178
|
-
}
|
|
179
|
-
let remainingTimeMS$1;
|
|
180
|
-
try {
|
|
181
|
-
remainingTimeMS$1 = stream.s.timeoutContext?.getRemainingTimeMSOrThrow(`Download timed out after ${stream.s.timeoutContext?.timeoutMS}ms`);
|
|
182
|
-
} catch (error) {
|
|
183
|
-
return stream.destroy(error);
|
|
184
|
-
}
|
|
185
|
-
stream.s.cursor = stream.s.chunks.find(filter, {
|
|
186
|
-
timeoutMode: stream.s.options.timeoutMS != null ? abstract_cursor_1.CursorTimeoutMode.LIFETIME : void 0,
|
|
187
|
-
timeoutMS: remainingTimeMS$1
|
|
188
|
-
}).sort({ n: 1 });
|
|
189
|
-
if (stream.s.readPreference) stream.s.cursor.withReadPreference(stream.s.readPreference);
|
|
190
|
-
stream.s.expectedEnd = Math.ceil(doc.length / doc.chunkSize);
|
|
191
|
-
stream.s.file = doc;
|
|
192
|
-
try {
|
|
193
|
-
stream.s.bytesToTrim = handleEndOption(stream, doc, stream.s.cursor, stream.s.options);
|
|
194
|
-
} catch (error) {
|
|
195
|
-
return stream.destroy(error);
|
|
196
|
-
}
|
|
197
|
-
stream.emit(GridFSBucketReadStream.FILE, doc);
|
|
198
|
-
};
|
|
199
|
-
let remainingTimeMS;
|
|
200
|
-
try {
|
|
201
|
-
remainingTimeMS = stream.s.timeoutContext?.getRemainingTimeMSOrThrow(`Download timed out after ${stream.s.timeoutContext?.timeoutMS}ms`);
|
|
202
|
-
} catch (error) {
|
|
203
|
-
if (!stream.destroyed) stream.destroy(error);
|
|
204
|
-
return;
|
|
205
|
-
}
|
|
206
|
-
findOneOptions.timeoutMS = remainingTimeMS;
|
|
207
|
-
stream.s.files.findOne(stream.s.filter, findOneOptions).then(handleReadResult, (error) => {
|
|
208
|
-
if (stream.destroyed) return;
|
|
209
|
-
stream.destroy(error);
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
function waitForFile(stream, callback) {
|
|
213
|
-
if (stream.s.file) return callback();
|
|
214
|
-
if (!stream.s.init) {
|
|
215
|
-
init(stream);
|
|
216
|
-
stream.s.init = true;
|
|
217
|
-
}
|
|
218
|
-
stream.once("file", () => {
|
|
219
|
-
callback();
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
function handleStartOption(stream, doc, options) {
|
|
223
|
-
if (options && options.start != null) {
|
|
224
|
-
if (options.start > doc.length) throw new error_1.MongoInvalidArgumentError(`Stream start (${options.start}) must not be more than the length of the file (${doc.length})`);
|
|
225
|
-
if (options.start < 0) throw new error_1.MongoInvalidArgumentError(`Stream start (${options.start}) must not be negative`);
|
|
226
|
-
if (options.end != null && options.end < options.start) throw new error_1.MongoInvalidArgumentError(`Stream start (${options.start}) must not be greater than stream end (${options.end})`);
|
|
227
|
-
stream.s.bytesRead = Math.floor(options.start / doc.chunkSize) * doc.chunkSize;
|
|
228
|
-
stream.s.expected = Math.floor(options.start / doc.chunkSize);
|
|
229
|
-
return options.start - stream.s.bytesRead;
|
|
230
|
-
}
|
|
231
|
-
throw new error_1.MongoInvalidArgumentError("Start option must be defined");
|
|
232
|
-
}
|
|
233
|
-
function handleEndOption(stream, doc, cursor, options) {
|
|
234
|
-
if (options && options.end != null) {
|
|
235
|
-
if (options.end > doc.length) throw new error_1.MongoInvalidArgumentError(`Stream end (${options.end}) must not be more than the length of the file (${doc.length})`);
|
|
236
|
-
if (options.start == null || options.start < 0) throw new error_1.MongoInvalidArgumentError(`Stream end (${options.end}) must not be negative`);
|
|
237
|
-
const start = options.start != null ? Math.floor(options.start / doc.chunkSize) : 0;
|
|
238
|
-
cursor.limit(Math.ceil(options.end / doc.chunkSize) - start);
|
|
239
|
-
stream.s.expectedEnd = Math.ceil(options.end / doc.chunkSize);
|
|
240
|
-
return Math.ceil(options.end / doc.chunkSize) * doc.chunkSize - options.end;
|
|
241
|
-
}
|
|
242
|
-
throw new error_1.MongoInvalidArgumentError("End option must be defined");
|
|
243
|
-
}
|
|
244
|
-
}));
|
|
245
|
-
|
|
246
|
-
//#endregion
|
|
247
|
-
export default require_download();
|
|
248
|
-
|
|
249
|
-
export { require_download };
|
|
250
|
-
//# sourceMappingURL=download.mjs.map
|
package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/download.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"download.mjs","names":["remainingTimeMS"],"sources":["../../../../../../../../../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/download.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GridFSBucketReadStream = void 0;\nconst stream_1 = require(\"stream\");\nconst abstract_cursor_1 = require(\"../cursor/abstract_cursor\");\nconst error_1 = require(\"../error\");\nconst timeout_1 = require(\"../timeout\");\n/**\n * A readable stream that enables you to read buffers from GridFS.\n *\n * Do not instantiate this class directly. Use `openDownloadStream()` instead.\n * @public\n */\nclass GridFSBucketReadStream extends stream_1.Readable {\n /**\n * @param chunks - Handle for chunks collection\n * @param files - Handle for files collection\n * @param readPreference - The read preference to use\n * @param filter - The filter to use to find the file document\n * @internal\n */\n constructor(chunks, files, readPreference, filter, options) {\n super({ emitClose: true });\n this.s = {\n bytesToTrim: 0,\n bytesToSkip: 0,\n bytesRead: 0,\n chunks,\n expected: 0,\n files,\n filter,\n init: false,\n expectedEnd: 0,\n options: {\n start: 0,\n end: 0,\n ...options\n },\n readPreference,\n timeoutContext: options?.timeoutMS != null\n ? new timeout_1.CSOTTimeoutContext({ timeoutMS: options.timeoutMS, serverSelectionTimeoutMS: 0 })\n : undefined\n };\n }\n /**\n * Reads from the cursor and pushes to the stream.\n * Private Impl, do not call directly\n * @internal\n */\n _read() {\n if (this.destroyed)\n return;\n waitForFile(this, () => doRead(this));\n }\n /**\n * Sets the 0-based offset in bytes to start streaming from. Throws\n * an error if this stream has entered flowing mode\n * (e.g. if you've already called `on('data')`)\n *\n * @param start - 0-based offset in bytes to start streaming from\n */\n start(start = 0) {\n throwIfInitialized(this);\n this.s.options.start = start;\n return this;\n }\n /**\n * Sets the 0-based offset in bytes to start streaming from. Throws\n * an error if this stream has entered flowing mode\n * (e.g. if you've already called `on('data')`)\n *\n * @param end - Offset in bytes to stop reading at\n */\n end(end = 0) {\n throwIfInitialized(this);\n this.s.options.end = end;\n return this;\n }\n /**\n * Marks this stream as aborted (will never push another `data` event)\n * and kills the underlying cursor. Will emit the 'end' event, and then\n * the 'close' event once the cursor is successfully killed.\n */\n async abort() {\n this.push(null);\n this.destroy();\n const remainingTimeMS = this.s.timeoutContext?.getRemainingTimeMSOrThrow();\n await this.s.cursor?.close({ timeoutMS: remainingTimeMS });\n }\n}\nexports.GridFSBucketReadStream = GridFSBucketReadStream;\n/**\n * Fires when the stream loaded the file document corresponding to the provided id.\n * @event\n */\nGridFSBucketReadStream.FILE = 'file';\nfunction throwIfInitialized(stream) {\n if (stream.s.init) {\n throw new error_1.MongoGridFSStreamError('Options cannot be changed after the stream is initialized');\n }\n}\nfunction doRead(stream) {\n if (stream.destroyed)\n return;\n if (!stream.s.cursor)\n return;\n if (!stream.s.file)\n return;\n const handleReadResult = (doc) => {\n if (stream.destroyed)\n return;\n if (!doc) {\n stream.push(null);\n stream.s.cursor?.close().then(undefined, error => stream.destroy(error));\n return;\n }\n if (!stream.s.file)\n return;\n const bytesRemaining = stream.s.file.length - stream.s.bytesRead;\n const expectedN = stream.s.expected++;\n const expectedLength = Math.min(stream.s.file.chunkSize, bytesRemaining);\n if (doc.n > expectedN) {\n return stream.destroy(new error_1.MongoGridFSChunkError(`ChunkIsMissing: Got unexpected n: ${doc.n}, expected: ${expectedN}`));\n }\n if (doc.n < expectedN) {\n return stream.destroy(new error_1.MongoGridFSChunkError(`ExtraChunk: Got unexpected n: ${doc.n}, expected: ${expectedN}`));\n }\n let buf = Buffer.isBuffer(doc.data) ? doc.data : doc.data.buffer;\n if (buf.byteLength !== expectedLength) {\n if (bytesRemaining <= 0) {\n return stream.destroy(new error_1.MongoGridFSChunkError(`ExtraChunk: Got unexpected n: ${doc.n}, expected file length ${stream.s.file.length} bytes but already read ${stream.s.bytesRead} bytes`));\n }\n return stream.destroy(new error_1.MongoGridFSChunkError(`ChunkIsWrongSize: Got unexpected length: ${buf.byteLength}, expected: ${expectedLength}`));\n }\n stream.s.bytesRead += buf.byteLength;\n if (buf.byteLength === 0) {\n return stream.push(null);\n }\n let sliceStart = null;\n let sliceEnd = null;\n if (stream.s.bytesToSkip != null) {\n sliceStart = stream.s.bytesToSkip;\n stream.s.bytesToSkip = 0;\n }\n const atEndOfStream = expectedN === stream.s.expectedEnd - 1;\n const bytesLeftToRead = stream.s.options.end - stream.s.bytesToSkip;\n if (atEndOfStream && stream.s.bytesToTrim != null) {\n sliceEnd = stream.s.file.chunkSize - stream.s.bytesToTrim;\n }\n else if (stream.s.options.end && bytesLeftToRead < doc.data.byteLength) {\n sliceEnd = bytesLeftToRead;\n }\n if (sliceStart != null || sliceEnd != null) {\n buf = buf.slice(sliceStart || 0, sliceEnd || buf.byteLength);\n }\n stream.push(buf);\n return;\n };\n stream.s.cursor.next().then(handleReadResult, error => {\n if (stream.destroyed)\n return;\n stream.destroy(error);\n });\n}\nfunction init(stream) {\n const findOneOptions = {};\n if (stream.s.readPreference) {\n findOneOptions.readPreference = stream.s.readPreference;\n }\n if (stream.s.options && stream.s.options.sort) {\n findOneOptions.sort = stream.s.options.sort;\n }\n if (stream.s.options && stream.s.options.skip) {\n findOneOptions.skip = stream.s.options.skip;\n }\n const handleReadResult = (doc) => {\n if (stream.destroyed)\n return;\n if (!doc) {\n const identifier = stream.s.filter._id\n ? stream.s.filter._id.toString()\n : stream.s.filter.filename;\n const errmsg = `FileNotFound: file ${identifier} was not found`;\n // TODO(NODE-3483)\n const err = new error_1.MongoRuntimeError(errmsg);\n err.code = 'ENOENT'; // TODO: NODE-3338 set property as part of constructor\n return stream.destroy(err);\n }\n // If document is empty, kill the stream immediately and don't\n // execute any reads\n if (doc.length <= 0) {\n stream.push(null);\n return;\n }\n if (stream.destroyed) {\n // If user destroys the stream before we have a cursor, wait\n // until the query is done to say we're 'closed' because we can't\n // cancel a query.\n stream.destroy();\n return;\n }\n try {\n stream.s.bytesToSkip = handleStartOption(stream, doc, stream.s.options);\n }\n catch (error) {\n return stream.destroy(error);\n }\n const filter = { files_id: doc._id };\n // Currently (MongoDB 3.4.4) skip function does not support the index,\n // it needs to retrieve all the documents first and then skip them. (CS-25811)\n // As work around we use $gte on the \"n\" field.\n if (stream.s.options && stream.s.options.start != null) {\n const skip = Math.floor(stream.s.options.start / doc.chunkSize);\n if (skip > 0) {\n filter['n'] = { $gte: skip };\n }\n }\n let remainingTimeMS;\n try {\n remainingTimeMS = stream.s.timeoutContext?.getRemainingTimeMSOrThrow(`Download timed out after ${stream.s.timeoutContext?.timeoutMS}ms`);\n }\n catch (error) {\n return stream.destroy(error);\n }\n stream.s.cursor = stream.s.chunks\n .find(filter, {\n timeoutMode: stream.s.options.timeoutMS != null ? abstract_cursor_1.CursorTimeoutMode.LIFETIME : undefined,\n timeoutMS: remainingTimeMS\n })\n .sort({ n: 1 });\n if (stream.s.readPreference) {\n stream.s.cursor.withReadPreference(stream.s.readPreference);\n }\n stream.s.expectedEnd = Math.ceil(doc.length / doc.chunkSize);\n stream.s.file = doc;\n try {\n stream.s.bytesToTrim = handleEndOption(stream, doc, stream.s.cursor, stream.s.options);\n }\n catch (error) {\n return stream.destroy(error);\n }\n stream.emit(GridFSBucketReadStream.FILE, doc);\n return;\n };\n let remainingTimeMS;\n try {\n remainingTimeMS = stream.s.timeoutContext?.getRemainingTimeMSOrThrow(`Download timed out after ${stream.s.timeoutContext?.timeoutMS}ms`);\n }\n catch (error) {\n if (!stream.destroyed)\n stream.destroy(error);\n return;\n }\n findOneOptions.timeoutMS = remainingTimeMS;\n stream.s.files.findOne(stream.s.filter, findOneOptions).then(handleReadResult, error => {\n if (stream.destroyed)\n return;\n stream.destroy(error);\n });\n}\nfunction waitForFile(stream, callback) {\n if (stream.s.file) {\n return callback();\n }\n if (!stream.s.init) {\n init(stream);\n stream.s.init = true;\n }\n stream.once('file', () => {\n callback();\n });\n}\nfunction handleStartOption(stream, doc, options) {\n if (options && options.start != null) {\n if (options.start > doc.length) {\n throw new error_1.MongoInvalidArgumentError(`Stream start (${options.start}) must not be more than the length of the file (${doc.length})`);\n }\n if (options.start < 0) {\n throw new error_1.MongoInvalidArgumentError(`Stream start (${options.start}) must not be negative`);\n }\n if (options.end != null && options.end < options.start) {\n throw new error_1.MongoInvalidArgumentError(`Stream start (${options.start}) must not be greater than stream end (${options.end})`);\n }\n stream.s.bytesRead = Math.floor(options.start / doc.chunkSize) * doc.chunkSize;\n stream.s.expected = Math.floor(options.start / doc.chunkSize);\n return options.start - stream.s.bytesRead;\n }\n throw new error_1.MongoInvalidArgumentError('Start option must be defined');\n}\nfunction handleEndOption(stream, doc, cursor, options) {\n if (options && options.end != null) {\n if (options.end > doc.length) {\n throw new error_1.MongoInvalidArgumentError(`Stream end (${options.end}) must not be more than the length of the file (${doc.length})`);\n }\n if (options.start == null || options.start < 0) {\n throw new error_1.MongoInvalidArgumentError(`Stream end (${options.end}) must not be negative`);\n }\n const start = options.start != null ? Math.floor(options.start / doc.chunkSize) : 0;\n cursor.limit(Math.ceil(options.end / doc.chunkSize) - start);\n stream.s.expectedEnd = Math.ceil(options.end / doc.chunkSize);\n return Math.ceil(options.end / doc.chunkSize) * doc.chunkSize - options.end;\n }\n throw new error_1.MongoInvalidArgumentError('End option must be defined');\n}\n//# sourceMappingURL=download.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;AACA,QAAO,eAAe,SAAS,cAAc,EAAE,OAAO,MAAM,CAAC;AAC7D,SAAQ,yBAAyB,KAAK;CACtC,MAAM,qBAAmB,SAAS;CAClC,MAAM;CACN,MAAM;CACN,MAAM;;;;;;;CAON,IAAM,yBAAN,cAAqC,SAAS,SAAS;;;;;;;;EAQnD,YAAY,QAAQ,OAAO,gBAAgB,QAAQ,SAAS;AACxD,SAAM,EAAE,WAAW,MAAM,CAAC;AAC1B,QAAK,IAAI;IACL,aAAa;IACb,aAAa;IACb,WAAW;IACX;IACA,UAAU;IACV;IACA;IACA,MAAM;IACN,aAAa;IACb,SAAS;KACL,OAAO;KACP,KAAK;KACL,GAAG;KACN;IACD;IACA,gBAAgB,SAAS,aAAa,OAChC,IAAI,UAAU,mBAAmB;KAAE,WAAW,QAAQ;KAAW,0BAA0B;KAAG,CAAC,GAC/F;IACT;;;;;;;EAOL,QAAQ;AACJ,OAAI,KAAK,UACL;AACJ,eAAY,YAAY,OAAO,KAAK,CAAC;;;;;;;;;EASzC,MAAM,QAAQ,GAAG;AACb,sBAAmB,KAAK;AACxB,QAAK,EAAE,QAAQ,QAAQ;AACvB,UAAO;;;;;;;;;EASX,IAAI,MAAM,GAAG;AACT,sBAAmB,KAAK;AACxB,QAAK,EAAE,QAAQ,MAAM;AACrB,UAAO;;;;;;;EAOX,MAAM,QAAQ;AACV,QAAK,KAAK,KAAK;AACf,QAAK,SAAS;GACd,MAAM,kBAAkB,KAAK,EAAE,gBAAgB,2BAA2B;AAC1E,SAAM,KAAK,EAAE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