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,288 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin, __require } from "../../../../../../../_virtual/rolldown_runtime.mjs";
|
|
2
|
-
import { require_error } from "../error.mjs";
|
|
3
|
-
import { require_constants } from "./wire_protocol/constants.mjs";
|
|
4
|
-
import { require_constants as require_constants$1 } from "../constants.mjs";
|
|
5
|
-
import { require_utils } from "../utils.mjs";
|
|
6
|
-
import { require_deps } from "../deps.mjs";
|
|
7
|
-
import { require_auth_provider } from "./auth/auth_provider.mjs";
|
|
8
|
-
import { require_providers } from "./auth/providers.mjs";
|
|
9
|
-
import { require_connection } from "./connection.mjs";
|
|
10
|
-
|
|
11
|
-
//#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connect.js
|
|
12
|
-
var require_connect = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.LEGAL_TCP_SOCKET_OPTIONS = exports.LEGAL_TLS_SOCKET_OPTIONS = void 0;
|
|
15
|
-
exports.connect = connect;
|
|
16
|
-
exports.makeConnection = makeConnection;
|
|
17
|
-
exports.performInitialHandshake = performInitialHandshake;
|
|
18
|
-
exports.prepareHandshakeDocument = prepareHandshakeDocument;
|
|
19
|
-
exports.makeSocket = makeSocket;
|
|
20
|
-
const net = __require("net");
|
|
21
|
-
const tls = __require("tls");
|
|
22
|
-
const constants_1 = require_constants$1();
|
|
23
|
-
const deps_1 = require_deps();
|
|
24
|
-
const error_1 = require_error();
|
|
25
|
-
const utils_1 = require_utils();
|
|
26
|
-
const auth_provider_1 = require_auth_provider();
|
|
27
|
-
const providers_1 = require_providers();
|
|
28
|
-
const connection_1 = require_connection();
|
|
29
|
-
const constants_2 = require_constants();
|
|
30
|
-
async function connect(options) {
|
|
31
|
-
let connection = null;
|
|
32
|
-
try {
|
|
33
|
-
connection = makeConnection(options, await makeSocket(options));
|
|
34
|
-
await performInitialHandshake(connection, options);
|
|
35
|
-
return connection;
|
|
36
|
-
} catch (error) {
|
|
37
|
-
connection?.destroy();
|
|
38
|
-
throw error;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
function makeConnection(options, socket) {
|
|
42
|
-
let ConnectionType = options.connectionType ?? connection_1.Connection;
|
|
43
|
-
if (options.autoEncrypter) ConnectionType = connection_1.CryptoConnection;
|
|
44
|
-
return new ConnectionType(socket, options);
|
|
45
|
-
}
|
|
46
|
-
function checkSupportedServer(hello, options) {
|
|
47
|
-
const maxWireVersion = Number(hello.maxWireVersion);
|
|
48
|
-
const minWireVersion = Number(hello.minWireVersion);
|
|
49
|
-
const serverVersionHighEnough = !Number.isNaN(maxWireVersion) && maxWireVersion >= constants_2.MIN_SUPPORTED_WIRE_VERSION;
|
|
50
|
-
const serverVersionLowEnough = !Number.isNaN(minWireVersion) && minWireVersion <= constants_2.MAX_SUPPORTED_WIRE_VERSION;
|
|
51
|
-
if (serverVersionHighEnough) {
|
|
52
|
-
if (serverVersionLowEnough) return null;
|
|
53
|
-
const message$1 = `Server at ${options.hostAddress} reports minimum wire version ${JSON.stringify(hello.minWireVersion)}, but this version of the Node.js Driver requires at most ${constants_2.MAX_SUPPORTED_WIRE_VERSION} (MongoDB ${constants_2.MAX_SUPPORTED_SERVER_VERSION})`;
|
|
54
|
-
return new error_1.MongoCompatibilityError(message$1);
|
|
55
|
-
}
|
|
56
|
-
const message = `Server at ${options.hostAddress} reports maximum wire version ${JSON.stringify(hello.maxWireVersion) ?? 0}, but this version of the Node.js Driver requires at least ${constants_2.MIN_SUPPORTED_WIRE_VERSION} (MongoDB ${constants_2.MIN_SUPPORTED_SERVER_VERSION})`;
|
|
57
|
-
return new error_1.MongoCompatibilityError(message);
|
|
58
|
-
}
|
|
59
|
-
async function performInitialHandshake(conn, options) {
|
|
60
|
-
const credentials = options.credentials;
|
|
61
|
-
if (credentials) {
|
|
62
|
-
if (!(credentials.mechanism === providers_1.AuthMechanism.MONGODB_DEFAULT) && !options.authProviders.getOrCreateProvider(credentials.mechanism, credentials.mechanismProperties)) throw new error_1.MongoInvalidArgumentError(`AuthMechanism '${credentials.mechanism}' not supported`);
|
|
63
|
-
}
|
|
64
|
-
const authContext = new auth_provider_1.AuthContext(conn, credentials, options);
|
|
65
|
-
conn.authContext = authContext;
|
|
66
|
-
const handshakeDoc = await prepareHandshakeDocument(authContext);
|
|
67
|
-
const handshakeOptions = {
|
|
68
|
-
...options,
|
|
69
|
-
raw: false
|
|
70
|
-
};
|
|
71
|
-
if (typeof options.connectTimeoutMS === "number") handshakeOptions.socketTimeoutMS = options.connectTimeoutMS;
|
|
72
|
-
const start = (/* @__PURE__ */ new Date()).getTime();
|
|
73
|
-
const response = await executeHandshake(handshakeDoc, handshakeOptions);
|
|
74
|
-
if (!("isWritablePrimary" in response)) response.isWritablePrimary = response[constants_1.LEGACY_HELLO_COMMAND];
|
|
75
|
-
if (response.helloOk) conn.helloOk = true;
|
|
76
|
-
const supportedServerErr = checkSupportedServer(response, options);
|
|
77
|
-
if (supportedServerErr) throw supportedServerErr;
|
|
78
|
-
if (options.loadBalanced) {
|
|
79
|
-
if (!response.serviceId) throw new error_1.MongoCompatibilityError("Driver attempted to initialize in load balancing mode, but the server does not support this mode.");
|
|
80
|
-
}
|
|
81
|
-
conn.hello = response;
|
|
82
|
-
conn.lastHelloMS = (/* @__PURE__ */ new Date()).getTime() - start;
|
|
83
|
-
if (!response.arbiterOnly && credentials) {
|
|
84
|
-
authContext.response = response;
|
|
85
|
-
const resolvedCredentials = credentials.resolveAuthMechanism(response);
|
|
86
|
-
const provider = options.authProviders.getOrCreateProvider(resolvedCredentials.mechanism, resolvedCredentials.mechanismProperties);
|
|
87
|
-
if (!provider) throw new error_1.MongoInvalidArgumentError(`No AuthProvider for ${resolvedCredentials.mechanism} defined.`);
|
|
88
|
-
try {
|
|
89
|
-
await provider.auth(authContext);
|
|
90
|
-
} catch (error) {
|
|
91
|
-
if (error instanceof error_1.MongoError) {
|
|
92
|
-
error.addErrorLabel(error_1.MongoErrorLabel.HandshakeError);
|
|
93
|
-
if ((0, error_1.needsRetryableWriteLabel)(error, response.maxWireVersion, conn.description.type)) error.addErrorLabel(error_1.MongoErrorLabel.RetryableWriteError);
|
|
94
|
-
}
|
|
95
|
-
throw error;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
conn.established = true;
|
|
99
|
-
async function executeHandshake(handshakeDoc$1, handshakeOptions$1) {
|
|
100
|
-
try {
|
|
101
|
-
return await conn.command((0, utils_1.ns)("admin.$cmd"), handshakeDoc$1, handshakeOptions$1);
|
|
102
|
-
} catch (error) {
|
|
103
|
-
if (error instanceof error_1.MongoError) error.addErrorLabel(error_1.MongoErrorLabel.HandshakeError);
|
|
104
|
-
throw error;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* @internal
|
|
110
|
-
*
|
|
111
|
-
* This function is only exposed for testing purposes.
|
|
112
|
-
*/
|
|
113
|
-
async function prepareHandshakeDocument(authContext) {
|
|
114
|
-
const options = authContext.options;
|
|
115
|
-
const compressors = options.compressors ? options.compressors : [];
|
|
116
|
-
const { serverApi } = authContext.connection;
|
|
117
|
-
const clientMetadata = await options.extendedMetadata;
|
|
118
|
-
const handshakeDoc = {
|
|
119
|
-
[serverApi?.version || options.loadBalanced === true ? "hello" : constants_1.LEGACY_HELLO_COMMAND]: 1,
|
|
120
|
-
helloOk: true,
|
|
121
|
-
client: clientMetadata,
|
|
122
|
-
compression: compressors
|
|
123
|
-
};
|
|
124
|
-
if (options.loadBalanced === true) handshakeDoc.loadBalanced = true;
|
|
125
|
-
const credentials = authContext.credentials;
|
|
126
|
-
if (credentials) {
|
|
127
|
-
if (credentials.mechanism === providers_1.AuthMechanism.MONGODB_DEFAULT && credentials.username) {
|
|
128
|
-
handshakeDoc.saslSupportedMechs = `${credentials.source}.${credentials.username}`;
|
|
129
|
-
const provider$1 = authContext.options.authProviders.getOrCreateProvider(providers_1.AuthMechanism.MONGODB_SCRAM_SHA256, credentials.mechanismProperties);
|
|
130
|
-
if (!provider$1) throw new error_1.MongoInvalidArgumentError(`No AuthProvider for ${providers_1.AuthMechanism.MONGODB_SCRAM_SHA256} defined.`);
|
|
131
|
-
return await provider$1.prepare(handshakeDoc, authContext);
|
|
132
|
-
}
|
|
133
|
-
const provider = authContext.options.authProviders.getOrCreateProvider(credentials.mechanism, credentials.mechanismProperties);
|
|
134
|
-
if (!provider) throw new error_1.MongoInvalidArgumentError(`No AuthProvider for ${credentials.mechanism} defined.`);
|
|
135
|
-
return await provider.prepare(handshakeDoc, authContext);
|
|
136
|
-
}
|
|
137
|
-
return handshakeDoc;
|
|
138
|
-
}
|
|
139
|
-
/** @public */
|
|
140
|
-
exports.LEGAL_TLS_SOCKET_OPTIONS = [
|
|
141
|
-
"allowPartialTrustChain",
|
|
142
|
-
"ALPNProtocols",
|
|
143
|
-
"ca",
|
|
144
|
-
"cert",
|
|
145
|
-
"checkServerIdentity",
|
|
146
|
-
"ciphers",
|
|
147
|
-
"crl",
|
|
148
|
-
"ecdhCurve",
|
|
149
|
-
"key",
|
|
150
|
-
"minDHSize",
|
|
151
|
-
"passphrase",
|
|
152
|
-
"pfx",
|
|
153
|
-
"rejectUnauthorized",
|
|
154
|
-
"secureContext",
|
|
155
|
-
"secureProtocol",
|
|
156
|
-
"servername",
|
|
157
|
-
"session"
|
|
158
|
-
];
|
|
159
|
-
/** @public */
|
|
160
|
-
exports.LEGAL_TCP_SOCKET_OPTIONS = [
|
|
161
|
-
"autoSelectFamily",
|
|
162
|
-
"autoSelectFamilyAttemptTimeout",
|
|
163
|
-
"keepAliveInitialDelay",
|
|
164
|
-
"family",
|
|
165
|
-
"hints",
|
|
166
|
-
"localAddress",
|
|
167
|
-
"localPort",
|
|
168
|
-
"lookup"
|
|
169
|
-
];
|
|
170
|
-
function parseConnectOptions(options) {
|
|
171
|
-
const hostAddress = options.hostAddress;
|
|
172
|
-
if (!hostAddress) throw new error_1.MongoInvalidArgumentError("Option \"hostAddress\" is required");
|
|
173
|
-
const result = {};
|
|
174
|
-
for (const name of exports.LEGAL_TCP_SOCKET_OPTIONS) if (options[name] != null) result[name] = options[name];
|
|
175
|
-
result.keepAliveInitialDelay ??= 12e4;
|
|
176
|
-
result.keepAlive = true;
|
|
177
|
-
result.noDelay = options.noDelay ?? true;
|
|
178
|
-
if (typeof hostAddress.socketPath === "string") {
|
|
179
|
-
result.path = hostAddress.socketPath;
|
|
180
|
-
return result;
|
|
181
|
-
} else if (typeof hostAddress.host === "string") {
|
|
182
|
-
result.host = hostAddress.host;
|
|
183
|
-
result.port = hostAddress.port;
|
|
184
|
-
return result;
|
|
185
|
-
} else throw new error_1.MongoRuntimeError(`Unexpected HostAddress ${JSON.stringify(hostAddress)}`);
|
|
186
|
-
}
|
|
187
|
-
function parseSslOptions(options) {
|
|
188
|
-
const result = parseConnectOptions(options);
|
|
189
|
-
for (const name of exports.LEGAL_TLS_SOCKET_OPTIONS) if (options[name] != null) result[name] = options[name];
|
|
190
|
-
if (options.existingSocket) result.socket = options.existingSocket;
|
|
191
|
-
if (result.servername == null && result.host && !net.isIP(result.host)) result.servername = result.host;
|
|
192
|
-
return result;
|
|
193
|
-
}
|
|
194
|
-
async function makeSocket(options) {
|
|
195
|
-
const useTLS = options.tls ?? false;
|
|
196
|
-
const connectTimeoutMS = options.connectTimeoutMS ?? 3e4;
|
|
197
|
-
const existingSocket = options.existingSocket;
|
|
198
|
-
let socket;
|
|
199
|
-
if (options.proxyHost != null) return await makeSocks5Connection({
|
|
200
|
-
...options,
|
|
201
|
-
connectTimeoutMS
|
|
202
|
-
});
|
|
203
|
-
if (useTLS) {
|
|
204
|
-
const tlsSocket = tls.connect(parseSslOptions(options));
|
|
205
|
-
if (typeof tlsSocket.disableRenegotiation === "function") tlsSocket.disableRenegotiation();
|
|
206
|
-
socket = tlsSocket;
|
|
207
|
-
} else if (existingSocket) socket = existingSocket;
|
|
208
|
-
else socket = net.createConnection(parseConnectOptions(options));
|
|
209
|
-
socket.setTimeout(connectTimeoutMS);
|
|
210
|
-
let cancellationHandler = null;
|
|
211
|
-
const { promise: connectedSocket, resolve, reject } = (0, utils_1.promiseWithResolvers)();
|
|
212
|
-
if (existingSocket) resolve(socket);
|
|
213
|
-
else {
|
|
214
|
-
const start = performance.now();
|
|
215
|
-
const connectEvent = useTLS ? "secureConnect" : "connect";
|
|
216
|
-
socket.once(connectEvent, () => resolve(socket)).once("error", (cause) => reject(new error_1.MongoNetworkError(error_1.MongoError.buildErrorMessage(cause), { cause }))).once("timeout", () => {
|
|
217
|
-
reject(new error_1.MongoNetworkTimeoutError(`Socket '${connectEvent}' timed out after ${performance.now() - start | 0}ms (connectTimeoutMS: ${connectTimeoutMS})`));
|
|
218
|
-
}).once("close", () => reject(new error_1.MongoNetworkError(`Socket closed after ${performance.now() - start | 0} during connection establishment`)));
|
|
219
|
-
if (options.cancellationToken != null) {
|
|
220
|
-
cancellationHandler = () => reject(new error_1.MongoNetworkError(`Socket connection establishment was cancelled after ${performance.now() - start | 0}`));
|
|
221
|
-
options.cancellationToken.once("cancel", cancellationHandler);
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
try {
|
|
225
|
-
socket = await connectedSocket;
|
|
226
|
-
return socket;
|
|
227
|
-
} catch (error) {
|
|
228
|
-
socket.destroy();
|
|
229
|
-
throw error;
|
|
230
|
-
} finally {
|
|
231
|
-
socket.setTimeout(0);
|
|
232
|
-
if (cancellationHandler != null) options.cancellationToken?.removeListener("cancel", cancellationHandler);
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
let socks = null;
|
|
236
|
-
function loadSocks() {
|
|
237
|
-
if (socks == null) {
|
|
238
|
-
const socksImport = (0, deps_1.getSocks)();
|
|
239
|
-
if ("kModuleError" in socksImport) throw socksImport.kModuleError;
|
|
240
|
-
socks = socksImport;
|
|
241
|
-
}
|
|
242
|
-
return socks;
|
|
243
|
-
}
|
|
244
|
-
async function makeSocks5Connection(options) {
|
|
245
|
-
const hostAddress = utils_1.HostAddress.fromHostPort(options.proxyHost ?? "", options.proxyPort ?? 1080);
|
|
246
|
-
const rawSocket = await makeSocket({
|
|
247
|
-
...options,
|
|
248
|
-
hostAddress,
|
|
249
|
-
tls: false,
|
|
250
|
-
proxyHost: void 0
|
|
251
|
-
});
|
|
252
|
-
const destination = parseConnectOptions(options);
|
|
253
|
-
if (typeof destination.host !== "string" || typeof destination.port !== "number") throw new error_1.MongoInvalidArgumentError("Can only make Socks5 connections to TCP hosts");
|
|
254
|
-
socks ??= loadSocks();
|
|
255
|
-
let existingSocket;
|
|
256
|
-
try {
|
|
257
|
-
existingSocket = (await socks.SocksClient.createConnection({
|
|
258
|
-
existing_socket: rawSocket,
|
|
259
|
-
timeout: options.connectTimeoutMS,
|
|
260
|
-
command: "connect",
|
|
261
|
-
destination: {
|
|
262
|
-
host: destination.host,
|
|
263
|
-
port: destination.port
|
|
264
|
-
},
|
|
265
|
-
proxy: {
|
|
266
|
-
host: "iLoveJavaScript",
|
|
267
|
-
port: 0,
|
|
268
|
-
type: 5,
|
|
269
|
-
userId: options.proxyUsername || void 0,
|
|
270
|
-
password: options.proxyPassword || void 0
|
|
271
|
-
}
|
|
272
|
-
})).socket;
|
|
273
|
-
} catch (cause) {
|
|
274
|
-
throw new error_1.MongoNetworkError(error_1.MongoError.buildErrorMessage(cause), { cause });
|
|
275
|
-
}
|
|
276
|
-
return await makeSocket({
|
|
277
|
-
...options,
|
|
278
|
-
existingSocket,
|
|
279
|
-
proxyHost: void 0
|
|
280
|
-
});
|
|
281
|
-
}
|
|
282
|
-
}));
|
|
283
|
-
|
|
284
|
-
//#endregion
|
|
285
|
-
export default require_connect();
|
|
286
|
-
|
|
287
|
-
export { require_connect };
|
|
288
|
-
//# sourceMappingURL=connect.mjs.map
|
package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connect.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connect.mjs","names":["message","handshakeDoc","handshakeOptions","provider"],"sources":["../../../../../../../../../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connect.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LEGAL_TCP_SOCKET_OPTIONS = exports.LEGAL_TLS_SOCKET_OPTIONS = void 0;\nexports.connect = connect;\nexports.makeConnection = makeConnection;\nexports.performInitialHandshake = performInitialHandshake;\nexports.prepareHandshakeDocument = prepareHandshakeDocument;\nexports.makeSocket = makeSocket;\nconst net = require(\"net\");\nconst tls = require(\"tls\");\nconst constants_1 = require(\"../constants\");\nconst deps_1 = require(\"../deps\");\nconst error_1 = require(\"../error\");\nconst utils_1 = require(\"../utils\");\nconst auth_provider_1 = require(\"./auth/auth_provider\");\nconst providers_1 = require(\"./auth/providers\");\nconst connection_1 = require(\"./connection\");\nconst constants_2 = require(\"./wire_protocol/constants\");\nasync function connect(options) {\n let connection = null;\n try {\n const socket = await makeSocket(options);\n connection = makeConnection(options, socket);\n await performInitialHandshake(connection, options);\n return connection;\n }\n catch (error) {\n connection?.destroy();\n throw error;\n }\n}\nfunction makeConnection(options, socket) {\n let ConnectionType = options.connectionType ?? connection_1.Connection;\n if (options.autoEncrypter) {\n ConnectionType = connection_1.CryptoConnection;\n }\n return new ConnectionType(socket, options);\n}\nfunction checkSupportedServer(hello, options) {\n const maxWireVersion = Number(hello.maxWireVersion);\n const minWireVersion = Number(hello.minWireVersion);\n const serverVersionHighEnough = !Number.isNaN(maxWireVersion) && maxWireVersion >= constants_2.MIN_SUPPORTED_WIRE_VERSION;\n const serverVersionLowEnough = !Number.isNaN(minWireVersion) && minWireVersion <= constants_2.MAX_SUPPORTED_WIRE_VERSION;\n if (serverVersionHighEnough) {\n if (serverVersionLowEnough) {\n return null;\n }\n const message = `Server at ${options.hostAddress} reports minimum wire version ${JSON.stringify(hello.minWireVersion)}, but this version of the Node.js Driver requires at most ${constants_2.MAX_SUPPORTED_WIRE_VERSION} (MongoDB ${constants_2.MAX_SUPPORTED_SERVER_VERSION})`;\n return new error_1.MongoCompatibilityError(message);\n }\n const message = `Server at ${options.hostAddress} reports maximum wire version ${JSON.stringify(hello.maxWireVersion) ?? 0}, but this version of the Node.js Driver requires at least ${constants_2.MIN_SUPPORTED_WIRE_VERSION} (MongoDB ${constants_2.MIN_SUPPORTED_SERVER_VERSION})`;\n return new error_1.MongoCompatibilityError(message);\n}\nasync function performInitialHandshake(conn, options) {\n const credentials = options.credentials;\n if (credentials) {\n if (!(credentials.mechanism === providers_1.AuthMechanism.MONGODB_DEFAULT) &&\n !options.authProviders.getOrCreateProvider(credentials.mechanism, credentials.mechanismProperties)) {\n throw new error_1.MongoInvalidArgumentError(`AuthMechanism '${credentials.mechanism}' not supported`);\n }\n }\n const authContext = new auth_provider_1.AuthContext(conn, credentials, options);\n conn.authContext = authContext;\n const handshakeDoc = await prepareHandshakeDocument(authContext);\n // @ts-expect-error: TODO(NODE-5141): The options need to be filtered properly, Connection options differ from Command options\n const handshakeOptions = { ...options, raw: false };\n if (typeof options.connectTimeoutMS === 'number') {\n // The handshake technically is a monitoring check, so its socket timeout should be connectTimeoutMS\n handshakeOptions.socketTimeoutMS = options.connectTimeoutMS;\n }\n const start = new Date().getTime();\n const response = await executeHandshake(handshakeDoc, handshakeOptions);\n if (!('isWritablePrimary' in response)) {\n // Provide hello-style response document.\n response.isWritablePrimary = response[constants_1.LEGACY_HELLO_COMMAND];\n }\n if (response.helloOk) {\n conn.helloOk = true;\n }\n const supportedServerErr = checkSupportedServer(response, options);\n if (supportedServerErr) {\n throw supportedServerErr;\n }\n if (options.loadBalanced) {\n if (!response.serviceId) {\n throw new error_1.MongoCompatibilityError('Driver attempted to initialize in load balancing mode, ' +\n 'but the server does not support this mode.');\n }\n }\n // NOTE: This is metadata attached to the connection while porting away from\n // handshake being done in the `Server` class. Likely, it should be\n // relocated, or at very least restructured.\n conn.hello = response;\n conn.lastHelloMS = new Date().getTime() - start;\n if (!response.arbiterOnly && credentials) {\n // store the response on auth context\n authContext.response = response;\n const resolvedCredentials = credentials.resolveAuthMechanism(response);\n const provider = options.authProviders.getOrCreateProvider(resolvedCredentials.mechanism, resolvedCredentials.mechanismProperties);\n if (!provider) {\n throw new error_1.MongoInvalidArgumentError(`No AuthProvider for ${resolvedCredentials.mechanism} defined.`);\n }\n try {\n await provider.auth(authContext);\n }\n catch (error) {\n if (error instanceof error_1.MongoError) {\n error.addErrorLabel(error_1.MongoErrorLabel.HandshakeError);\n if ((0, error_1.needsRetryableWriteLabel)(error, response.maxWireVersion, conn.description.type)) {\n error.addErrorLabel(error_1.MongoErrorLabel.RetryableWriteError);\n }\n }\n throw error;\n }\n }\n // Connection establishment is socket creation (tcp handshake, tls handshake, MongoDB handshake (saslStart, saslContinue))\n // Once connection is established, command logging can log events (if enabled)\n conn.established = true;\n async function executeHandshake(handshakeDoc, handshakeOptions) {\n try {\n const handshakeResponse = await conn.command((0, utils_1.ns)('admin.$cmd'), handshakeDoc, handshakeOptions);\n return handshakeResponse;\n }\n catch (error) {\n if (error instanceof error_1.MongoError) {\n error.addErrorLabel(error_1.MongoErrorLabel.HandshakeError);\n }\n throw error;\n }\n }\n}\n/**\n * @internal\n *\n * This function is only exposed for testing purposes.\n */\nasync function prepareHandshakeDocument(authContext) {\n const options = authContext.options;\n const compressors = options.compressors ? options.compressors : [];\n const { serverApi } = authContext.connection;\n const clientMetadata = await options.extendedMetadata;\n const handshakeDoc = {\n [serverApi?.version || options.loadBalanced === true ? 'hello' : constants_1.LEGACY_HELLO_COMMAND]: 1,\n helloOk: true,\n client: clientMetadata,\n compression: compressors\n };\n if (options.loadBalanced === true) {\n handshakeDoc.loadBalanced = true;\n }\n const credentials = authContext.credentials;\n if (credentials) {\n if (credentials.mechanism === providers_1.AuthMechanism.MONGODB_DEFAULT && credentials.username) {\n handshakeDoc.saslSupportedMechs = `${credentials.source}.${credentials.username}`;\n const provider = authContext.options.authProviders.getOrCreateProvider(providers_1.AuthMechanism.MONGODB_SCRAM_SHA256, credentials.mechanismProperties);\n if (!provider) {\n // This auth mechanism is always present.\n throw new error_1.MongoInvalidArgumentError(`No AuthProvider for ${providers_1.AuthMechanism.MONGODB_SCRAM_SHA256} defined.`);\n }\n return await provider.prepare(handshakeDoc, authContext);\n }\n const provider = authContext.options.authProviders.getOrCreateProvider(credentials.mechanism, credentials.mechanismProperties);\n if (!provider) {\n throw new error_1.MongoInvalidArgumentError(`No AuthProvider for ${credentials.mechanism} defined.`);\n }\n return await provider.prepare(handshakeDoc, authContext);\n }\n return handshakeDoc;\n}\n/** @public */\nexports.LEGAL_TLS_SOCKET_OPTIONS = [\n 'allowPartialTrustChain',\n 'ALPNProtocols',\n 'ca',\n 'cert',\n 'checkServerIdentity',\n 'ciphers',\n 'crl',\n 'ecdhCurve',\n 'key',\n 'minDHSize',\n 'passphrase',\n 'pfx',\n 'rejectUnauthorized',\n 'secureContext',\n 'secureProtocol',\n 'servername',\n 'session'\n];\n/** @public */\nexports.LEGAL_TCP_SOCKET_OPTIONS = [\n 'autoSelectFamily',\n 'autoSelectFamilyAttemptTimeout',\n 'keepAliveInitialDelay',\n 'family',\n 'hints',\n 'localAddress',\n 'localPort',\n 'lookup'\n];\nfunction parseConnectOptions(options) {\n const hostAddress = options.hostAddress;\n if (!hostAddress)\n throw new error_1.MongoInvalidArgumentError('Option \"hostAddress\" is required');\n const result = {};\n for (const name of exports.LEGAL_TCP_SOCKET_OPTIONS) {\n if (options[name] != null) {\n result[name] = options[name];\n }\n }\n result.keepAliveInitialDelay ??= 120000;\n result.keepAlive = true;\n result.noDelay = options.noDelay ?? true;\n if (typeof hostAddress.socketPath === 'string') {\n result.path = hostAddress.socketPath;\n return result;\n }\n else if (typeof hostAddress.host === 'string') {\n result.host = hostAddress.host;\n result.port = hostAddress.port;\n return result;\n }\n else {\n // This should never happen since we set up HostAddresses\n // But if we don't throw here the socket could hang until timeout\n // TODO(NODE-3483)\n throw new error_1.MongoRuntimeError(`Unexpected HostAddress ${JSON.stringify(hostAddress)}`);\n }\n}\nfunction parseSslOptions(options) {\n const result = parseConnectOptions(options);\n // Merge in valid SSL options\n for (const name of exports.LEGAL_TLS_SOCKET_OPTIONS) {\n if (options[name] != null) {\n result[name] = options[name];\n }\n }\n if (options.existingSocket) {\n result.socket = options.existingSocket;\n }\n // Set default sni servername to be the same as host\n if (result.servername == null && result.host && !net.isIP(result.host)) {\n result.servername = result.host;\n }\n return result;\n}\nasync function makeSocket(options) {\n const useTLS = options.tls ?? false;\n const connectTimeoutMS = options.connectTimeoutMS ?? 30000;\n const existingSocket = options.existingSocket;\n let socket;\n if (options.proxyHost != null) {\n // Currently, only Socks5 is supported.\n return await makeSocks5Connection({\n ...options,\n connectTimeoutMS // Should always be present for Socks5\n });\n }\n if (useTLS) {\n const tlsSocket = tls.connect(parseSslOptions(options));\n if (typeof tlsSocket.disableRenegotiation === 'function') {\n tlsSocket.disableRenegotiation();\n }\n socket = tlsSocket;\n }\n else if (existingSocket) {\n // In the TLS case, parseSslOptions() sets options.socket to existingSocket,\n // so we only need to handle the non-TLS case here (where existingSocket\n // gives us all we need out of the box).\n socket = existingSocket;\n }\n else {\n socket = net.createConnection(parseConnectOptions(options));\n }\n socket.setTimeout(connectTimeoutMS);\n let cancellationHandler = null;\n const { promise: connectedSocket, resolve, reject } = (0, utils_1.promiseWithResolvers)();\n if (existingSocket) {\n resolve(socket);\n }\n else {\n const start = performance.now();\n const connectEvent = useTLS ? 'secureConnect' : 'connect';\n socket\n .once(connectEvent, () => resolve(socket))\n .once('error', cause => reject(new error_1.MongoNetworkError(error_1.MongoError.buildErrorMessage(cause), { cause })))\n .once('timeout', () => {\n reject(new error_1.MongoNetworkTimeoutError(`Socket '${connectEvent}' timed out after ${(performance.now() - start) | 0}ms (connectTimeoutMS: ${connectTimeoutMS})`));\n })\n .once('close', () => reject(new error_1.MongoNetworkError(`Socket closed after ${(performance.now() - start) | 0} during connection establishment`)));\n if (options.cancellationToken != null) {\n cancellationHandler = () => reject(new error_1.MongoNetworkError(`Socket connection establishment was cancelled after ${(performance.now() - start) | 0}`));\n options.cancellationToken.once('cancel', cancellationHandler);\n }\n }\n try {\n socket = await connectedSocket;\n return socket;\n }\n catch (error) {\n socket.destroy();\n throw error;\n }\n finally {\n socket.setTimeout(0);\n if (cancellationHandler != null) {\n options.cancellationToken?.removeListener('cancel', cancellationHandler);\n }\n }\n}\nlet socks = null;\nfunction loadSocks() {\n if (socks == null) {\n const socksImport = (0, deps_1.getSocks)();\n if ('kModuleError' in socksImport) {\n throw socksImport.kModuleError;\n }\n socks = socksImport;\n }\n return socks;\n}\nasync function makeSocks5Connection(options) {\n const hostAddress = utils_1.HostAddress.fromHostPort(options.proxyHost ?? '', // proxyHost is guaranteed to set here\n options.proxyPort ?? 1080);\n // First, connect to the proxy server itself:\n const rawSocket = await makeSocket({\n ...options,\n hostAddress,\n tls: false,\n proxyHost: undefined\n });\n const destination = parseConnectOptions(options);\n if (typeof destination.host !== 'string' || typeof destination.port !== 'number') {\n throw new error_1.MongoInvalidArgumentError('Can only make Socks5 connections to TCP hosts');\n }\n socks ??= loadSocks();\n let existingSocket;\n try {\n // Then, establish the Socks5 proxy connection:\n const connection = await socks.SocksClient.createConnection({\n existing_socket: rawSocket,\n timeout: options.connectTimeoutMS,\n command: 'connect',\n destination: {\n host: destination.host,\n port: destination.port\n },\n proxy: {\n // host and port are ignored because we pass existing_socket\n host: 'iLoveJavaScript',\n port: 0,\n type: 5,\n userId: options.proxyUsername || undefined,\n password: options.proxyPassword || undefined\n }\n });\n existingSocket = connection.socket;\n }\n catch (cause) {\n throw new error_1.MongoNetworkError(error_1.MongoError.buildErrorMessage(cause), { cause });\n }\n // Finally, now treat the resulting duplex stream as the\n // socket over which we send and receive wire protocol messages:\n return await makeSocket({ ...options, existingSocket, proxyHost: undefined });\n}\n//# sourceMappingURL=connect.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;AACA,QAAO,eAAe,SAAS,cAAc,EAAE,OAAO,MAAM,CAAC;AAC7D,SAAQ,2BAA2B,QAAQ,2BAA2B,KAAK;AAC3E,SAAQ,UAAU;AAClB,SAAQ,iBAAiB;AACzB,SAAQ,0BAA0B;AAClC,SAAQ,2BAA2B;AACnC,SAAQ,aAAa;CACrB,MAAM,gBAAc,MAAM;CAC1B,MAAM,gBAAc,MAAM;CAC1B,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,eAAe,QAAQ,SAAS;EAC5B,IAAI,aAAa;AACjB,MAAI;AAEA,gBAAa,eAAe,SADb,MAAM,WAAW,QAAQ,CACI;AAC5C,SAAM,wBAAwB,YAAY,QAAQ;AAClD,UAAO;WAEJ,OAAO;AACV,eAAY,SAAS;AACrB,SAAM;;;CAGd,SAAS,eAAe,SAAS,QAAQ;EACrC,IAAI,iBAAiB,QAAQ,kBAAkB,aAAa;AAC5D,MAAI,QAAQ,cACR,kBAAiB,aAAa;AAElC,SAAO,IAAI,eAAe,QAAQ,QAAQ;;CAE9C,SAAS,qBAAqB,OAAO,SAAS;EAC1C,MAAM,iBAAiB,OAAO,MAAM,eAAe;EACnD,MAAM,iBAAiB,OAAO,MAAM,eAAe;EACnD,MAAM,0BAA0B,CAAC,OAAO,MAAM,eAAe,IAAI,kBAAkB,YAAY;EAC/F,MAAM,yBAAyB,CAAC,OAAO,MAAM,eAAe,IAAI,kBAAkB,YAAY;AAC9F,MAAI,yBAAyB;AACzB,OAAI,uBACA,QAAO;GAEX,MAAMA,YAAU,aAAa,QAAQ,YAAY,gCAAgC,KAAK,UAAU,MAAM,eAAe,CAAC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