pecunia-root 0.1.1 → 0.1.3
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/context/index.mjs +1 -1
- package/dist/context/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,710 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../../_virtual/rolldown_runtime.mjs";
|
|
2
|
-
import { require_bson } from "../bson.mjs";
|
|
3
|
-
import { require_error } from "../error.mjs";
|
|
4
|
-
import { require_write_concern } from "../write_concern.mjs";
|
|
5
|
-
import { require_utils } from "../utils.mjs";
|
|
6
|
-
import { require_timeout } from "../timeout.mjs";
|
|
7
|
-
import { require_execute_operation } from "../operations/execute_operation.mjs";
|
|
8
|
-
import { require_delete } from "../operations/delete.mjs";
|
|
9
|
-
import { require_insert } from "../operations/insert.mjs";
|
|
10
|
-
import { require_update } from "../operations/update.mjs";
|
|
11
|
-
|
|
12
|
-
//#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/common.js
|
|
13
|
-
var require_common = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.BulkOperationBase = exports.FindOperators = exports.MongoBulkWriteError = exports.WriteError = exports.WriteConcernError = exports.BulkWriteResult = exports.Batch = exports.BatchType = void 0;
|
|
16
|
-
exports.mergeBatchResults = mergeBatchResults;
|
|
17
|
-
const bson_1 = require_bson();
|
|
18
|
-
const error_1 = require_error();
|
|
19
|
-
const delete_1 = require_delete();
|
|
20
|
-
const execute_operation_1 = require_execute_operation();
|
|
21
|
-
const insert_1 = require_insert();
|
|
22
|
-
const update_1 = require_update();
|
|
23
|
-
const timeout_1 = require_timeout();
|
|
24
|
-
const utils_1 = require_utils();
|
|
25
|
-
const write_concern_1 = require_write_concern();
|
|
26
|
-
/** @public */
|
|
27
|
-
exports.BatchType = Object.freeze({
|
|
28
|
-
INSERT: 1,
|
|
29
|
-
UPDATE: 2,
|
|
30
|
-
DELETE: 3
|
|
31
|
-
});
|
|
32
|
-
/**
|
|
33
|
-
* Keeps the state of a unordered batch so we can rewrite the results
|
|
34
|
-
* correctly after command execution
|
|
35
|
-
*
|
|
36
|
-
* @public
|
|
37
|
-
*/
|
|
38
|
-
var Batch = class {
|
|
39
|
-
constructor(batchType, originalZeroIndex) {
|
|
40
|
-
this.originalZeroIndex = originalZeroIndex;
|
|
41
|
-
this.currentIndex = 0;
|
|
42
|
-
this.originalIndexes = [];
|
|
43
|
-
this.batchType = batchType;
|
|
44
|
-
this.operations = [];
|
|
45
|
-
this.size = 0;
|
|
46
|
-
this.sizeBytes = 0;
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
exports.Batch = Batch;
|
|
50
|
-
/**
|
|
51
|
-
* @public
|
|
52
|
-
* The result of a bulk write.
|
|
53
|
-
*/
|
|
54
|
-
var BulkWriteResult = class BulkWriteResult {
|
|
55
|
-
static generateIdMap(ids) {
|
|
56
|
-
const idMap = {};
|
|
57
|
-
for (const doc of ids) idMap[doc.index] = doc._id;
|
|
58
|
-
return idMap;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Create a new BulkWriteResult instance
|
|
62
|
-
* @internal
|
|
63
|
-
*/
|
|
64
|
-
constructor(bulkResult, isOrdered) {
|
|
65
|
-
this.result = bulkResult;
|
|
66
|
-
this.insertedCount = this.result.nInserted ?? 0;
|
|
67
|
-
this.matchedCount = this.result.nMatched ?? 0;
|
|
68
|
-
this.modifiedCount = this.result.nModified ?? 0;
|
|
69
|
-
this.deletedCount = this.result.nRemoved ?? 0;
|
|
70
|
-
this.upsertedCount = this.result.upserted.length ?? 0;
|
|
71
|
-
this.upsertedIds = BulkWriteResult.generateIdMap(this.result.upserted);
|
|
72
|
-
this.insertedIds = BulkWriteResult.generateIdMap(this.getSuccessfullyInsertedIds(bulkResult, isOrdered));
|
|
73
|
-
Object.defineProperty(this, "result", {
|
|
74
|
-
value: this.result,
|
|
75
|
-
enumerable: false
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
/** Evaluates to true if the bulk operation correctly executes */
|
|
79
|
-
get ok() {
|
|
80
|
-
return this.result.ok;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Returns document_ids that were actually inserted
|
|
84
|
-
* @internal
|
|
85
|
-
*/
|
|
86
|
-
getSuccessfullyInsertedIds(bulkResult, isOrdered) {
|
|
87
|
-
if (bulkResult.writeErrors.length === 0) return bulkResult.insertedIds;
|
|
88
|
-
if (isOrdered) return bulkResult.insertedIds.slice(0, bulkResult.writeErrors[0].index);
|
|
89
|
-
return bulkResult.insertedIds.filter(({ index }) => !bulkResult.writeErrors.some((writeError) => index === writeError.index));
|
|
90
|
-
}
|
|
91
|
-
/** Returns the upserted id at the given index */
|
|
92
|
-
getUpsertedIdAt(index) {
|
|
93
|
-
return this.result.upserted[index];
|
|
94
|
-
}
|
|
95
|
-
/** Returns raw internal result */
|
|
96
|
-
getRawResponse() {
|
|
97
|
-
return this.result;
|
|
98
|
-
}
|
|
99
|
-
/** Returns true if the bulk operation contains a write error */
|
|
100
|
-
hasWriteErrors() {
|
|
101
|
-
return this.result.writeErrors.length > 0;
|
|
102
|
-
}
|
|
103
|
-
/** Returns the number of write errors from the bulk operation */
|
|
104
|
-
getWriteErrorCount() {
|
|
105
|
-
return this.result.writeErrors.length;
|
|
106
|
-
}
|
|
107
|
-
/** Returns a specific write error object */
|
|
108
|
-
getWriteErrorAt(index) {
|
|
109
|
-
return index < this.result.writeErrors.length ? this.result.writeErrors[index] : void 0;
|
|
110
|
-
}
|
|
111
|
-
/** Retrieve all write errors */
|
|
112
|
-
getWriteErrors() {
|
|
113
|
-
return this.result.writeErrors;
|
|
114
|
-
}
|
|
115
|
-
/** Retrieve the write concern error if one exists */
|
|
116
|
-
getWriteConcernError() {
|
|
117
|
-
if (this.result.writeConcernErrors.length === 0) return;
|
|
118
|
-
else if (this.result.writeConcernErrors.length === 1) return this.result.writeConcernErrors[0];
|
|
119
|
-
else {
|
|
120
|
-
let errmsg = "";
|
|
121
|
-
for (let i = 0; i < this.result.writeConcernErrors.length; i++) {
|
|
122
|
-
const err = this.result.writeConcernErrors[i];
|
|
123
|
-
errmsg = errmsg + err.errmsg;
|
|
124
|
-
if (i === 0) errmsg = errmsg + " and ";
|
|
125
|
-
}
|
|
126
|
-
return new WriteConcernError({
|
|
127
|
-
errmsg,
|
|
128
|
-
code: error_1.MONGODB_ERROR_CODES.WriteConcernTimeout
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
toString() {
|
|
133
|
-
return `BulkWriteResult(${bson_1.EJSON.stringify(this.result)})`;
|
|
134
|
-
}
|
|
135
|
-
isOk() {
|
|
136
|
-
return this.result.ok === 1;
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
exports.BulkWriteResult = BulkWriteResult;
|
|
140
|
-
/**
|
|
141
|
-
* An error representing a failure by the server to apply the requested write concern to the bulk operation.
|
|
142
|
-
* @public
|
|
143
|
-
* @category Error
|
|
144
|
-
*/
|
|
145
|
-
var WriteConcernError = class {
|
|
146
|
-
constructor(error) {
|
|
147
|
-
this.serverError = error;
|
|
148
|
-
}
|
|
149
|
-
/** Write concern error code. */
|
|
150
|
-
get code() {
|
|
151
|
-
return this.serverError.code;
|
|
152
|
-
}
|
|
153
|
-
/** Write concern error message. */
|
|
154
|
-
get errmsg() {
|
|
155
|
-
return this.serverError.errmsg;
|
|
156
|
-
}
|
|
157
|
-
/** Write concern error info. */
|
|
158
|
-
get errInfo() {
|
|
159
|
-
return this.serverError.errInfo;
|
|
160
|
-
}
|
|
161
|
-
toJSON() {
|
|
162
|
-
return this.serverError;
|
|
163
|
-
}
|
|
164
|
-
toString() {
|
|
165
|
-
return `WriteConcernError(${this.errmsg})`;
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
exports.WriteConcernError = WriteConcernError;
|
|
169
|
-
/**
|
|
170
|
-
* An error that occurred during a BulkWrite on the server.
|
|
171
|
-
* @public
|
|
172
|
-
* @category Error
|
|
173
|
-
*/
|
|
174
|
-
var WriteError = class {
|
|
175
|
-
constructor(err) {
|
|
176
|
-
this.err = err;
|
|
177
|
-
}
|
|
178
|
-
/** WriteError code. */
|
|
179
|
-
get code() {
|
|
180
|
-
return this.err.code;
|
|
181
|
-
}
|
|
182
|
-
/** WriteError original bulk operation index. */
|
|
183
|
-
get index() {
|
|
184
|
-
return this.err.index;
|
|
185
|
-
}
|
|
186
|
-
/** WriteError message. */
|
|
187
|
-
get errmsg() {
|
|
188
|
-
return this.err.errmsg;
|
|
189
|
-
}
|
|
190
|
-
/** WriteError details. */
|
|
191
|
-
get errInfo() {
|
|
192
|
-
return this.err.errInfo;
|
|
193
|
-
}
|
|
194
|
-
/** Returns the underlying operation that caused the error */
|
|
195
|
-
getOperation() {
|
|
196
|
-
return this.err.op;
|
|
197
|
-
}
|
|
198
|
-
toJSON() {
|
|
199
|
-
return {
|
|
200
|
-
code: this.err.code,
|
|
201
|
-
index: this.err.index,
|
|
202
|
-
errmsg: this.err.errmsg,
|
|
203
|
-
op: this.err.op
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
toString() {
|
|
207
|
-
return `WriteError(${JSON.stringify(this.toJSON())})`;
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
exports.WriteError = WriteError;
|
|
211
|
-
/** Merges results into shared data structure */
|
|
212
|
-
function mergeBatchResults(batch, bulkResult, err, result) {
|
|
213
|
-
if (err) result = err;
|
|
214
|
-
else if (result && result.result) result = result.result;
|
|
215
|
-
if (result == null) return;
|
|
216
|
-
if (result.ok === 0 && bulkResult.ok === 1) {
|
|
217
|
-
bulkResult.ok = 0;
|
|
218
|
-
const writeError = {
|
|
219
|
-
index: 0,
|
|
220
|
-
code: result.code || 0,
|
|
221
|
-
errmsg: result.message,
|
|
222
|
-
errInfo: result.errInfo,
|
|
223
|
-
op: batch.operations[0]
|
|
224
|
-
};
|
|
225
|
-
bulkResult.writeErrors.push(new WriteError(writeError));
|
|
226
|
-
return;
|
|
227
|
-
} else if (result.ok === 0 && bulkResult.ok === 0) return;
|
|
228
|
-
if (isInsertBatch(batch) && result.n) bulkResult.nInserted = bulkResult.nInserted + result.n;
|
|
229
|
-
if (isDeleteBatch(batch) && result.n) bulkResult.nRemoved = bulkResult.nRemoved + result.n;
|
|
230
|
-
let nUpserted = 0;
|
|
231
|
-
if (Array.isArray(result.upserted)) {
|
|
232
|
-
nUpserted = result.upserted.length;
|
|
233
|
-
for (let i = 0; i < result.upserted.length; i++) bulkResult.upserted.push({
|
|
234
|
-
index: result.upserted[i].index + batch.originalZeroIndex,
|
|
235
|
-
_id: result.upserted[i]._id
|
|
236
|
-
});
|
|
237
|
-
} else if (result.upserted) {
|
|
238
|
-
nUpserted = 1;
|
|
239
|
-
bulkResult.upserted.push({
|
|
240
|
-
index: batch.originalZeroIndex,
|
|
241
|
-
_id: result.upserted
|
|
242
|
-
});
|
|
243
|
-
}
|
|
244
|
-
if (isUpdateBatch(batch) && result.n) {
|
|
245
|
-
const nModified = result.nModified;
|
|
246
|
-
bulkResult.nUpserted = bulkResult.nUpserted + nUpserted;
|
|
247
|
-
bulkResult.nMatched = bulkResult.nMatched + (result.n - nUpserted);
|
|
248
|
-
if (typeof nModified === "number") bulkResult.nModified = bulkResult.nModified + nModified;
|
|
249
|
-
else bulkResult.nModified = 0;
|
|
250
|
-
}
|
|
251
|
-
if (Array.isArray(result.writeErrors)) for (let i = 0; i < result.writeErrors.length; i++) {
|
|
252
|
-
const writeError = {
|
|
253
|
-
index: batch.originalIndexes[result.writeErrors[i].index],
|
|
254
|
-
code: result.writeErrors[i].code,
|
|
255
|
-
errmsg: result.writeErrors[i].errmsg,
|
|
256
|
-
errInfo: result.writeErrors[i].errInfo,
|
|
257
|
-
op: batch.operations[result.writeErrors[i].index]
|
|
258
|
-
};
|
|
259
|
-
bulkResult.writeErrors.push(new WriteError(writeError));
|
|
260
|
-
}
|
|
261
|
-
if (result.writeConcernError) bulkResult.writeConcernErrors.push(new WriteConcernError(result.writeConcernError));
|
|
262
|
-
}
|
|
263
|
-
async function executeCommands(bulkOperation, options) {
|
|
264
|
-
if (bulkOperation.s.batches.length === 0) return new BulkWriteResult(bulkOperation.s.bulkResult, bulkOperation.isOrdered);
|
|
265
|
-
for (const batch of bulkOperation.s.batches) {
|
|
266
|
-
const finalOptions = (0, utils_1.resolveOptions)(bulkOperation, {
|
|
267
|
-
...options,
|
|
268
|
-
ordered: bulkOperation.isOrdered
|
|
269
|
-
});
|
|
270
|
-
if (finalOptions.bypassDocumentValidation !== true) delete finalOptions.bypassDocumentValidation;
|
|
271
|
-
if (bulkOperation.s.bypassDocumentValidation === true) finalOptions.bypassDocumentValidation = true;
|
|
272
|
-
if (bulkOperation.s.checkKeys === false) finalOptions.checkKeys = false;
|
|
273
|
-
if (finalOptions.retryWrites) {
|
|
274
|
-
if (isUpdateBatch(batch)) finalOptions.retryWrites = finalOptions.retryWrites && !batch.operations.some((op) => op.multi);
|
|
275
|
-
if (isDeleteBatch(batch)) finalOptions.retryWrites = finalOptions.retryWrites && !batch.operations.some((op) => op.limit === 0);
|
|
276
|
-
}
|
|
277
|
-
const operation = isInsertBatch(batch) ? new insert_1.InsertOperation(bulkOperation.s.namespace, batch.operations, finalOptions) : isUpdateBatch(batch) ? new update_1.UpdateOperation(bulkOperation.s.namespace, batch.operations, finalOptions) : isDeleteBatch(batch) ? new delete_1.DeleteOperation(bulkOperation.s.namespace, batch.operations, finalOptions) : null;
|
|
278
|
-
if (operation == null) throw new error_1.MongoRuntimeError(`Unknown batchType: ${batch.batchType}`);
|
|
279
|
-
let thrownError = null;
|
|
280
|
-
let result;
|
|
281
|
-
try {
|
|
282
|
-
result = await (0, execute_operation_1.executeOperation)(bulkOperation.s.collection.client, operation, finalOptions.timeoutContext);
|
|
283
|
-
} catch (error) {
|
|
284
|
-
thrownError = error;
|
|
285
|
-
}
|
|
286
|
-
if (thrownError != null) if (thrownError instanceof error_1.MongoWriteConcernError) {
|
|
287
|
-
mergeBatchResults(batch, bulkOperation.s.bulkResult, thrownError, result);
|
|
288
|
-
const writeResult$2 = new BulkWriteResult(bulkOperation.s.bulkResult, bulkOperation.isOrdered);
|
|
289
|
-
throw new MongoBulkWriteError({
|
|
290
|
-
message: thrownError.result.writeConcernError.errmsg,
|
|
291
|
-
code: thrownError.result.writeConcernError.code
|
|
292
|
-
}, writeResult$2);
|
|
293
|
-
} else throw new MongoBulkWriteError(thrownError, new BulkWriteResult(bulkOperation.s.bulkResult, bulkOperation.isOrdered));
|
|
294
|
-
mergeBatchResults(batch, bulkOperation.s.bulkResult, thrownError, result);
|
|
295
|
-
const writeResult$1 = new BulkWriteResult(bulkOperation.s.bulkResult, bulkOperation.isOrdered);
|
|
296
|
-
bulkOperation.handleWriteError(writeResult$1);
|
|
297
|
-
}
|
|
298
|
-
bulkOperation.s.batches.length = 0;
|
|
299
|
-
const writeResult = new BulkWriteResult(bulkOperation.s.bulkResult, bulkOperation.isOrdered);
|
|
300
|
-
bulkOperation.handleWriteError(writeResult);
|
|
301
|
-
return writeResult;
|
|
302
|
-
}
|
|
303
|
-
/**
|
|
304
|
-
* An error indicating an unsuccessful Bulk Write
|
|
305
|
-
* @public
|
|
306
|
-
* @category Error
|
|
307
|
-
*/
|
|
308
|
-
var MongoBulkWriteError = class extends error_1.MongoServerError {
|
|
309
|
-
/**
|
|
310
|
-
* **Do not use this constructor!**
|
|
311
|
-
*
|
|
312
|
-
* Meant for internal use only.
|
|
313
|
-
*
|
|
314
|
-
* @remarks
|
|
315
|
-
* This class is only meant to be constructed within the driver. This constructor is
|
|
316
|
-
* not subject to semantic versioning compatibility guarantees and may change at any time.
|
|
317
|
-
*
|
|
318
|
-
* @public
|
|
319
|
-
**/
|
|
320
|
-
constructor(error, result) {
|
|
321
|
-
super(error);
|
|
322
|
-
this.writeErrors = [];
|
|
323
|
-
if (error instanceof WriteConcernError) this.err = error;
|
|
324
|
-
else if (!(error instanceof Error)) {
|
|
325
|
-
this.message = error.message;
|
|
326
|
-
this.code = error.code;
|
|
327
|
-
this.writeErrors = error.writeErrors ?? [];
|
|
328
|
-
}
|
|
329
|
-
this.result = result;
|
|
330
|
-
Object.assign(this, error);
|
|
331
|
-
}
|
|
332
|
-
get name() {
|
|
333
|
-
return "MongoBulkWriteError";
|
|
334
|
-
}
|
|
335
|
-
/** Number of documents inserted. */
|
|
336
|
-
get insertedCount() {
|
|
337
|
-
return this.result.insertedCount;
|
|
338
|
-
}
|
|
339
|
-
/** Number of documents matched for update. */
|
|
340
|
-
get matchedCount() {
|
|
341
|
-
return this.result.matchedCount;
|
|
342
|
-
}
|
|
343
|
-
/** Number of documents modified. */
|
|
344
|
-
get modifiedCount() {
|
|
345
|
-
return this.result.modifiedCount;
|
|
346
|
-
}
|
|
347
|
-
/** Number of documents deleted. */
|
|
348
|
-
get deletedCount() {
|
|
349
|
-
return this.result.deletedCount;
|
|
350
|
-
}
|
|
351
|
-
/** Number of documents upserted. */
|
|
352
|
-
get upsertedCount() {
|
|
353
|
-
return this.result.upsertedCount;
|
|
354
|
-
}
|
|
355
|
-
/** Inserted document generated Id's, hash key is the index of the originating operation */
|
|
356
|
-
get insertedIds() {
|
|
357
|
-
return this.result.insertedIds;
|
|
358
|
-
}
|
|
359
|
-
/** Upserted document generated Id's, hash key is the index of the originating operation */
|
|
360
|
-
get upsertedIds() {
|
|
361
|
-
return this.result.upsertedIds;
|
|
362
|
-
}
|
|
363
|
-
};
|
|
364
|
-
exports.MongoBulkWriteError = MongoBulkWriteError;
|
|
365
|
-
/**
|
|
366
|
-
* A builder object that is returned from {@link BulkOperationBase#find}.
|
|
367
|
-
* Is used to build a write operation that involves a query filter.
|
|
368
|
-
*
|
|
369
|
-
* @public
|
|
370
|
-
*/
|
|
371
|
-
var FindOperators = class {
|
|
372
|
-
/**
|
|
373
|
-
* Creates a new FindOperators object.
|
|
374
|
-
* @internal
|
|
375
|
-
*/
|
|
376
|
-
constructor(bulkOperation) {
|
|
377
|
-
this.bulkOperation = bulkOperation;
|
|
378
|
-
}
|
|
379
|
-
/** Add a multiple update operation to the bulk operation */
|
|
380
|
-
update(updateDocument) {
|
|
381
|
-
const currentOp = buildCurrentOp(this.bulkOperation);
|
|
382
|
-
return this.bulkOperation.addToOperationsList(exports.BatchType.UPDATE, (0, update_1.makeUpdateStatement)(currentOp.selector, updateDocument, {
|
|
383
|
-
...currentOp,
|
|
384
|
-
multi: true
|
|
385
|
-
}));
|
|
386
|
-
}
|
|
387
|
-
/** Add a single update operation to the bulk operation */
|
|
388
|
-
updateOne(updateDocument) {
|
|
389
|
-
if (!(0, utils_1.hasAtomicOperators)(updateDocument, this.bulkOperation.bsonOptions)) throw new error_1.MongoInvalidArgumentError("Update document requires atomic operators");
|
|
390
|
-
const currentOp = buildCurrentOp(this.bulkOperation);
|
|
391
|
-
return this.bulkOperation.addToOperationsList(exports.BatchType.UPDATE, (0, update_1.makeUpdateStatement)(currentOp.selector, updateDocument, {
|
|
392
|
-
...currentOp,
|
|
393
|
-
multi: false
|
|
394
|
-
}));
|
|
395
|
-
}
|
|
396
|
-
/** Add a replace one operation to the bulk operation */
|
|
397
|
-
replaceOne(replacement) {
|
|
398
|
-
if ((0, utils_1.hasAtomicOperators)(replacement)) throw new error_1.MongoInvalidArgumentError("Replacement document must not use atomic operators");
|
|
399
|
-
const currentOp = buildCurrentOp(this.bulkOperation);
|
|
400
|
-
return this.bulkOperation.addToOperationsList(exports.BatchType.UPDATE, (0, update_1.makeUpdateStatement)(currentOp.selector, replacement, {
|
|
401
|
-
...currentOp,
|
|
402
|
-
multi: false
|
|
403
|
-
}));
|
|
404
|
-
}
|
|
405
|
-
/** Add a delete one operation to the bulk operation */
|
|
406
|
-
deleteOne() {
|
|
407
|
-
const currentOp = buildCurrentOp(this.bulkOperation);
|
|
408
|
-
return this.bulkOperation.addToOperationsList(exports.BatchType.DELETE, (0, delete_1.makeDeleteStatement)(currentOp.selector, {
|
|
409
|
-
...currentOp,
|
|
410
|
-
limit: 1
|
|
411
|
-
}));
|
|
412
|
-
}
|
|
413
|
-
/** Add a delete many operation to the bulk operation */
|
|
414
|
-
delete() {
|
|
415
|
-
const currentOp = buildCurrentOp(this.bulkOperation);
|
|
416
|
-
return this.bulkOperation.addToOperationsList(exports.BatchType.DELETE, (0, delete_1.makeDeleteStatement)(currentOp.selector, {
|
|
417
|
-
...currentOp,
|
|
418
|
-
limit: 0
|
|
419
|
-
}));
|
|
420
|
-
}
|
|
421
|
-
/** Upsert modifier for update bulk operation, noting that this operation is an upsert. */
|
|
422
|
-
upsert() {
|
|
423
|
-
if (!this.bulkOperation.s.currentOp) this.bulkOperation.s.currentOp = {};
|
|
424
|
-
this.bulkOperation.s.currentOp.upsert = true;
|
|
425
|
-
return this;
|
|
426
|
-
}
|
|
427
|
-
/** Specifies the collation for the query condition. */
|
|
428
|
-
collation(collation) {
|
|
429
|
-
if (!this.bulkOperation.s.currentOp) this.bulkOperation.s.currentOp = {};
|
|
430
|
-
this.bulkOperation.s.currentOp.collation = collation;
|
|
431
|
-
return this;
|
|
432
|
-
}
|
|
433
|
-
/** Specifies arrayFilters for UpdateOne or UpdateMany bulk operations. */
|
|
434
|
-
arrayFilters(arrayFilters) {
|
|
435
|
-
if (!this.bulkOperation.s.currentOp) this.bulkOperation.s.currentOp = {};
|
|
436
|
-
this.bulkOperation.s.currentOp.arrayFilters = arrayFilters;
|
|
437
|
-
return this;
|
|
438
|
-
}
|
|
439
|
-
/** Specifies hint for the bulk operation. */
|
|
440
|
-
hint(hint) {
|
|
441
|
-
if (!this.bulkOperation.s.currentOp) this.bulkOperation.s.currentOp = {};
|
|
442
|
-
this.bulkOperation.s.currentOp.hint = hint;
|
|
443
|
-
return this;
|
|
444
|
-
}
|
|
445
|
-
};
|
|
446
|
-
exports.FindOperators = FindOperators;
|
|
447
|
-
/** @public */
|
|
448
|
-
var BulkOperationBase = class {
|
|
449
|
-
/**
|
|
450
|
-
* Create a new OrderedBulkOperation or UnorderedBulkOperation instance
|
|
451
|
-
* @internal
|
|
452
|
-
*/
|
|
453
|
-
constructor(collection, options, isOrdered) {
|
|
454
|
-
this.collection = collection;
|
|
455
|
-
this.isOrdered = isOrdered;
|
|
456
|
-
const topology = (0, utils_1.getTopology)(collection);
|
|
457
|
-
options = options == null ? {} : options;
|
|
458
|
-
const namespace = collection.s.namespace;
|
|
459
|
-
const executed = false;
|
|
460
|
-
const currentOp = void 0;
|
|
461
|
-
const hello = topology.lastHello();
|
|
462
|
-
const usingAutoEncryption = !!(topology.s.options && topology.s.options.autoEncrypter);
|
|
463
|
-
const maxBsonObjectSize = hello && hello.maxBsonObjectSize ? hello.maxBsonObjectSize : 1024 * 1024 * 16;
|
|
464
|
-
const maxBatchSizeBytes = usingAutoEncryption ? 1024 * 1024 * 2 : maxBsonObjectSize;
|
|
465
|
-
const maxWriteBatchSize = hello && hello.maxWriteBatchSize ? hello.maxWriteBatchSize : 1e3;
|
|
466
|
-
const maxKeySize = (maxWriteBatchSize - 1).toString(10).length + 2;
|
|
467
|
-
let finalOptions = Object.assign({}, options);
|
|
468
|
-
finalOptions = (0, utils_1.applyRetryableWrites)(finalOptions, collection.db);
|
|
469
|
-
this.s = {
|
|
470
|
-
bulkResult: {
|
|
471
|
-
ok: 1,
|
|
472
|
-
writeErrors: [],
|
|
473
|
-
writeConcernErrors: [],
|
|
474
|
-
insertedIds: [],
|
|
475
|
-
nInserted: 0,
|
|
476
|
-
nUpserted: 0,
|
|
477
|
-
nMatched: 0,
|
|
478
|
-
nModified: 0,
|
|
479
|
-
nRemoved: 0,
|
|
480
|
-
upserted: []
|
|
481
|
-
},
|
|
482
|
-
currentBatch: void 0,
|
|
483
|
-
currentIndex: 0,
|
|
484
|
-
currentBatchSize: 0,
|
|
485
|
-
currentBatchSizeBytes: 0,
|
|
486
|
-
currentInsertBatch: void 0,
|
|
487
|
-
currentUpdateBatch: void 0,
|
|
488
|
-
currentRemoveBatch: void 0,
|
|
489
|
-
batches: [],
|
|
490
|
-
writeConcern: write_concern_1.WriteConcern.fromOptions(options),
|
|
491
|
-
maxBsonObjectSize,
|
|
492
|
-
maxBatchSizeBytes,
|
|
493
|
-
maxWriteBatchSize,
|
|
494
|
-
maxKeySize,
|
|
495
|
-
namespace,
|
|
496
|
-
topology,
|
|
497
|
-
options: finalOptions,
|
|
498
|
-
bsonOptions: (0, bson_1.resolveBSONOptions)(options),
|
|
499
|
-
currentOp,
|
|
500
|
-
executed,
|
|
501
|
-
collection,
|
|
502
|
-
err: void 0,
|
|
503
|
-
checkKeys: typeof options.checkKeys === "boolean" ? options.checkKeys : false
|
|
504
|
-
};
|
|
505
|
-
if (options.bypassDocumentValidation === true) this.s.bypassDocumentValidation = true;
|
|
506
|
-
}
|
|
507
|
-
/**
|
|
508
|
-
* Add a single insert document to the bulk operation
|
|
509
|
-
*
|
|
510
|
-
* @example
|
|
511
|
-
* ```ts
|
|
512
|
-
* const bulkOp = collection.initializeOrderedBulkOp();
|
|
513
|
-
*
|
|
514
|
-
* // Adds three inserts to the bulkOp.
|
|
515
|
-
* bulkOp
|
|
516
|
-
* .insert({ a: 1 })
|
|
517
|
-
* .insert({ b: 2 })
|
|
518
|
-
* .insert({ c: 3 });
|
|
519
|
-
* await bulkOp.execute();
|
|
520
|
-
* ```
|
|
521
|
-
*/
|
|
522
|
-
insert(document) {
|
|
523
|
-
(0, utils_1.maybeAddIdToDocuments)(this.collection, document, { forceServerObjectId: this.shouldForceServerObjectId() });
|
|
524
|
-
return this.addToOperationsList(exports.BatchType.INSERT, document);
|
|
525
|
-
}
|
|
526
|
-
/**
|
|
527
|
-
* Builds a find operation for an update/updateOne/delete/deleteOne/replaceOne.
|
|
528
|
-
* Returns a builder object used to complete the definition of the operation.
|
|
529
|
-
*
|
|
530
|
-
* @example
|
|
531
|
-
* ```ts
|
|
532
|
-
* const bulkOp = collection.initializeOrderedBulkOp();
|
|
533
|
-
*
|
|
534
|
-
* // Add an updateOne to the bulkOp
|
|
535
|
-
* bulkOp.find({ a: 1 }).updateOne({ $set: { b: 2 } });
|
|
536
|
-
*
|
|
537
|
-
* // Add an updateMany to the bulkOp
|
|
538
|
-
* bulkOp.find({ c: 3 }).update({ $set: { d: 4 } });
|
|
539
|
-
*
|
|
540
|
-
* // Add an upsert
|
|
541
|
-
* bulkOp.find({ e: 5 }).upsert().updateOne({ $set: { f: 6 } });
|
|
542
|
-
*
|
|
543
|
-
* // Add a deletion
|
|
544
|
-
* bulkOp.find({ g: 7 }).deleteOne();
|
|
545
|
-
*
|
|
546
|
-
* // Add a multi deletion
|
|
547
|
-
* bulkOp.find({ h: 8 }).delete();
|
|
548
|
-
*
|
|
549
|
-
* // Add a replaceOne
|
|
550
|
-
* bulkOp.find({ i: 9 }).replaceOne({writeConcern: { j: 10 }});
|
|
551
|
-
*
|
|
552
|
-
* // Update using a pipeline (requires Mongodb 4.2 or higher)
|
|
553
|
-
* bulk.find({ k: 11, y: { $exists: true }, z: { $exists: true } }).updateOne([
|
|
554
|
-
* { $set: { total: { $sum: [ '$y', '$z' ] } } }
|
|
555
|
-
* ]);
|
|
556
|
-
*
|
|
557
|
-
* // All of the ops will now be executed
|
|
558
|
-
* await bulkOp.execute();
|
|
559
|
-
* ```
|
|
560
|
-
*/
|
|
561
|
-
find(selector) {
|
|
562
|
-
if (!selector) throw new error_1.MongoInvalidArgumentError("Bulk find operation must specify a selector");
|
|
563
|
-
this.s.currentOp = { selector };
|
|
564
|
-
return new FindOperators(this);
|
|
565
|
-
}
|
|
566
|
-
/** Specifies a raw operation to perform in the bulk write. */
|
|
567
|
-
raw(op) {
|
|
568
|
-
if (op == null || typeof op !== "object") throw new error_1.MongoInvalidArgumentError("Operation must be an object with an operation key");
|
|
569
|
-
if ("insertOne" in op) {
|
|
570
|
-
const forceServerObjectId = this.shouldForceServerObjectId();
|
|
571
|
-
const document = op.insertOne && op.insertOne.document == null ? op.insertOne : op.insertOne.document;
|
|
572
|
-
(0, utils_1.maybeAddIdToDocuments)(this.collection, document, { forceServerObjectId });
|
|
573
|
-
return this.addToOperationsList(exports.BatchType.INSERT, document);
|
|
574
|
-
}
|
|
575
|
-
if ("replaceOne" in op || "updateOne" in op || "updateMany" in op) {
|
|
576
|
-
if ("replaceOne" in op) {
|
|
577
|
-
if ("q" in op.replaceOne) throw new error_1.MongoInvalidArgumentError("Raw operations are not allowed");
|
|
578
|
-
const updateStatement = (0, update_1.makeUpdateStatement)(op.replaceOne.filter, op.replaceOne.replacement, {
|
|
579
|
-
...op.replaceOne,
|
|
580
|
-
multi: false
|
|
581
|
-
});
|
|
582
|
-
if ((0, utils_1.hasAtomicOperators)(updateStatement.u)) throw new error_1.MongoInvalidArgumentError("Replacement document must not use atomic operators");
|
|
583
|
-
return this.addToOperationsList(exports.BatchType.UPDATE, updateStatement);
|
|
584
|
-
}
|
|
585
|
-
if ("updateOne" in op) {
|
|
586
|
-
if ("q" in op.updateOne) throw new error_1.MongoInvalidArgumentError("Raw operations are not allowed");
|
|
587
|
-
const updateStatement = (0, update_1.makeUpdateStatement)(op.updateOne.filter, op.updateOne.update, {
|
|
588
|
-
...op.updateOne,
|
|
589
|
-
multi: false
|
|
590
|
-
});
|
|
591
|
-
if (!(0, utils_1.hasAtomicOperators)(updateStatement.u, this.bsonOptions)) throw new error_1.MongoInvalidArgumentError("Update document requires atomic operators");
|
|
592
|
-
return this.addToOperationsList(exports.BatchType.UPDATE, updateStatement);
|
|
593
|
-
}
|
|
594
|
-
if ("updateMany" in op) {
|
|
595
|
-
if ("q" in op.updateMany) throw new error_1.MongoInvalidArgumentError("Raw operations are not allowed");
|
|
596
|
-
const updateStatement = (0, update_1.makeUpdateStatement)(op.updateMany.filter, op.updateMany.update, {
|
|
597
|
-
...op.updateMany,
|
|
598
|
-
multi: true
|
|
599
|
-
});
|
|
600
|
-
if (!(0, utils_1.hasAtomicOperators)(updateStatement.u, this.bsonOptions)) throw new error_1.MongoInvalidArgumentError("Update document requires atomic operators");
|
|
601
|
-
return this.addToOperationsList(exports.BatchType.UPDATE, updateStatement);
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
if ("deleteOne" in op) {
|
|
605
|
-
if ("q" in op.deleteOne) throw new error_1.MongoInvalidArgumentError("Raw operations are not allowed");
|
|
606
|
-
return this.addToOperationsList(exports.BatchType.DELETE, (0, delete_1.makeDeleteStatement)(op.deleteOne.filter, {
|
|
607
|
-
...op.deleteOne,
|
|
608
|
-
limit: 1
|
|
609
|
-
}));
|
|
610
|
-
}
|
|
611
|
-
if ("deleteMany" in op) {
|
|
612
|
-
if ("q" in op.deleteMany) throw new error_1.MongoInvalidArgumentError("Raw operations are not allowed");
|
|
613
|
-
return this.addToOperationsList(exports.BatchType.DELETE, (0, delete_1.makeDeleteStatement)(op.deleteMany.filter, {
|
|
614
|
-
...op.deleteMany,
|
|
615
|
-
limit: 0
|
|
616
|
-
}));
|
|
617
|
-
}
|
|
618
|
-
throw new error_1.MongoInvalidArgumentError("bulkWrite only supports insertOne, updateOne, updateMany, deleteOne, deleteMany");
|
|
619
|
-
}
|
|
620
|
-
get length() {
|
|
621
|
-
return this.s.currentIndex;
|
|
622
|
-
}
|
|
623
|
-
get bsonOptions() {
|
|
624
|
-
return this.s.bsonOptions;
|
|
625
|
-
}
|
|
626
|
-
get writeConcern() {
|
|
627
|
-
return this.s.writeConcern;
|
|
628
|
-
}
|
|
629
|
-
get batches() {
|
|
630
|
-
const batches = [...this.s.batches];
|
|
631
|
-
if (this.isOrdered) {
|
|
632
|
-
if (this.s.currentBatch) batches.push(this.s.currentBatch);
|
|
633
|
-
} else {
|
|
634
|
-
if (this.s.currentInsertBatch) batches.push(this.s.currentInsertBatch);
|
|
635
|
-
if (this.s.currentUpdateBatch) batches.push(this.s.currentUpdateBatch);
|
|
636
|
-
if (this.s.currentRemoveBatch) batches.push(this.s.currentRemoveBatch);
|
|
637
|
-
}
|
|
638
|
-
return batches;
|
|
639
|
-
}
|
|
640
|
-
async execute(options = {}) {
|
|
641
|
-
if (this.s.executed) throw new error_1.MongoBatchReExecutionError();
|
|
642
|
-
const writeConcern = write_concern_1.WriteConcern.fromOptions(options);
|
|
643
|
-
if (writeConcern) this.s.writeConcern = writeConcern;
|
|
644
|
-
if (this.isOrdered) {
|
|
645
|
-
if (this.s.currentBatch) this.s.batches.push(this.s.currentBatch);
|
|
646
|
-
} else {
|
|
647
|
-
if (this.s.currentInsertBatch) this.s.batches.push(this.s.currentInsertBatch);
|
|
648
|
-
if (this.s.currentUpdateBatch) this.s.batches.push(this.s.currentUpdateBatch);
|
|
649
|
-
if (this.s.currentRemoveBatch) this.s.batches.push(this.s.currentRemoveBatch);
|
|
650
|
-
}
|
|
651
|
-
if (this.s.batches.length === 0) throw new error_1.MongoInvalidArgumentError("Invalid BulkOperation, Batch cannot be empty");
|
|
652
|
-
this.s.executed = true;
|
|
653
|
-
const finalOptions = (0, utils_1.resolveOptions)(this.collection, {
|
|
654
|
-
...this.s.options,
|
|
655
|
-
...options
|
|
656
|
-
});
|
|
657
|
-
finalOptions.timeoutContext ??= timeout_1.TimeoutContext.create({
|
|
658
|
-
session: finalOptions.session,
|
|
659
|
-
timeoutMS: finalOptions.timeoutMS,
|
|
660
|
-
serverSelectionTimeoutMS: this.collection.client.s.options.serverSelectionTimeoutMS,
|
|
661
|
-
waitQueueTimeoutMS: this.collection.client.s.options.waitQueueTimeoutMS
|
|
662
|
-
});
|
|
663
|
-
if (finalOptions.session == null) return await this.collection.client.withSession({ explicit: false }, async (session) => {
|
|
664
|
-
return await executeCommands(this, {
|
|
665
|
-
...finalOptions,
|
|
666
|
-
session
|
|
667
|
-
});
|
|
668
|
-
});
|
|
669
|
-
return await executeCommands(this, { ...finalOptions });
|
|
670
|
-
}
|
|
671
|
-
/**
|
|
672
|
-
* Handles the write error before executing commands
|
|
673
|
-
* @internal
|
|
674
|
-
*/
|
|
675
|
-
handleWriteError(writeResult) {
|
|
676
|
-
if (this.s.bulkResult.writeErrors.length > 0) throw new MongoBulkWriteError({
|
|
677
|
-
message: this.s.bulkResult.writeErrors[0].errmsg ? this.s.bulkResult.writeErrors[0].errmsg : "write operation failed",
|
|
678
|
-
code: this.s.bulkResult.writeErrors[0].code,
|
|
679
|
-
writeErrors: this.s.bulkResult.writeErrors
|
|
680
|
-
}, writeResult);
|
|
681
|
-
const writeConcernError = writeResult.getWriteConcernError();
|
|
682
|
-
if (writeConcernError) throw new MongoBulkWriteError(writeConcernError, writeResult);
|
|
683
|
-
}
|
|
684
|
-
shouldForceServerObjectId() {
|
|
685
|
-
return this.s.options.forceServerObjectId === true || this.s.collection.db.options?.forceServerObjectId === true;
|
|
686
|
-
}
|
|
687
|
-
};
|
|
688
|
-
exports.BulkOperationBase = BulkOperationBase;
|
|
689
|
-
function isInsertBatch(batch) {
|
|
690
|
-
return batch.batchType === exports.BatchType.INSERT;
|
|
691
|
-
}
|
|
692
|
-
function isUpdateBatch(batch) {
|
|
693
|
-
return batch.batchType === exports.BatchType.UPDATE;
|
|
694
|
-
}
|
|
695
|
-
function isDeleteBatch(batch) {
|
|
696
|
-
return batch.batchType === exports.BatchType.DELETE;
|
|
697
|
-
}
|
|
698
|
-
function buildCurrentOp(bulkOp) {
|
|
699
|
-
let { currentOp } = bulkOp.s;
|
|
700
|
-
bulkOp.s.currentOp = void 0;
|
|
701
|
-
if (!currentOp) currentOp = {};
|
|
702
|
-
return currentOp;
|
|
703
|
-
}
|
|
704
|
-
}));
|
|
705
|
-
|
|
706
|
-
//#endregion
|
|
707
|
-
export default require_common();
|
|
708
|
-
|
|
709
|
-
export { require_common };
|
|
710
|
-
//# sourceMappingURL=common.mjs.map
|