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.
Files changed (328) hide show
  1. package/dist/adapters/prisma-adapter/index.d.mts +1 -1
  2. package/dist/adapters/prisma-adapter/index.mjs +1 -1
  3. package/dist/adapters/prisma-adapter/index.mjs.map +1 -1
  4. package/dist/context/index.mjs +1 -1
  5. package/dist/context/index.mjs.map +1 -1
  6. package/dist/index.d.mts +1 -2
  7. package/dist/index.mjs +1 -2
  8. package/package.json +2 -16
  9. package/dist/_virtual/rolldown_runtime.mjs +0 -8
  10. package/dist/adapters/mongodb-adapter/index.d.mts +0 -35
  11. package/dist/adapters/mongodb-adapter/index.mjs +0 -314
  12. package/dist/adapters/mongodb-adapter/index.mjs.map +0 -1
  13. package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/code-points-data.mjs +0 -14
  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
  15. package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/index.mjs +0 -54
  16. package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/index.mjs.map +0 -1
  17. package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/memory-code-points.mjs +0 -36
  18. package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/memory-code-points.mjs.map +0 -1
  19. package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/node.mjs +0 -27
  20. package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/node.mjs.map +0 -1
  21. package/dist/node_modules/.pnpm/bson@6.10.4/node_modules/bson/lib/bson.mjs +0 -3728
  22. package/dist/node_modules/.pnpm/bson@6.10.4/node_modules/bson/lib/bson.mjs.map +0 -1
  23. package/dist/node_modules/.pnpm/memory-pager@1.5.0/node_modules/memory-pager/index.mjs +0 -137
  24. package/dist/node_modules/.pnpm/memory-pager@1.5.0/node_modules/memory-pager/index.mjs.map +0 -1
  25. package/dist/node_modules/.pnpm/mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/index.mjs +0 -211
  26. package/dist/node_modules/.pnpm/mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/index.mjs.map +0 -1
  27. package/dist/node_modules/.pnpm/mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/redact.mjs +0 -95
  28. package/dist/node_modules/.pnpm/mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/redact.mjs.map +0 -1
  29. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/admin.mjs +0 -158
  30. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/admin.mjs.map +0 -1
  31. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bson.mjs +0 -195
  32. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bson.mjs.map +0 -1
  33. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/common.mjs +0 -710
  34. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/common.mjs.map +0 -1
  35. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/ordered.mjs +0 -53
  36. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/ordered.mjs.map +0 -1
  37. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/unordered.mjs +0 -63
  38. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/unordered.mjs.map +0 -1
  39. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/change_stream.mjs +0 -368
  40. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/change_stream.mjs.map +0 -1
  41. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/auto_encrypter.mjs +0 -234
  42. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/auto_encrypter.mjs.map +0 -1
  43. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/client_encryption.mjs +0 -545
  44. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/client_encryption.mjs.map +0 -1
  45. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/crypto_callbacks.mjs +0 -83
  46. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/crypto_callbacks.mjs.map +0 -1
  47. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/errors.mjs +0 -146
  48. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/errors.mjs.map +0 -1
  49. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/mongocryptd_manager.mjs +0 -58
  50. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/mongocryptd_manager.mjs.map +0 -1
  51. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/aws.mjs +0 -30
  52. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/aws.mjs.map +0 -1
  53. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/azure.mjs +0 -135
  54. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/azure.mjs.map +0 -1
  55. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/gcp.mjs +0 -25
  56. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/gcp.mjs.map +0 -1
  57. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/index.mjs +0 -47
  58. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/index.mjs.map +0 -1
  59. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/state_machine.mjs +0 -362
  60. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/state_machine.mjs.map +0 -1
  61. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/auth_provider.mjs +0 -58
  62. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/auth_provider.mjs.map +0 -1
  63. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/aws_temporary_credentials.mjs +0 -123
  64. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/aws_temporary_credentials.mjs.map +0 -1
  65. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/gssapi.mjs +0 -128
  66. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/gssapi.mjs.map +0 -1
  67. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongo_credentials.mjs +0 -133
  68. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongo_credentials.mjs.map +0 -1
  69. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_aws.mjs +0 -126
  70. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_aws.mjs.map +0 -1
  71. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/automated_callback_workflow.mjs +0 -79
  72. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/automated_callback_workflow.mjs.map +0 -1
  73. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_machine_workflow.mjs +0 -65
  74. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_machine_workflow.mjs.map +0 -1
  75. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_workflow.mjs +0 -127
  76. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_workflow.mjs.map +0 -1
  77. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/command_builders.mjs +0 -47
  78. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/command_builders.mjs.map +0 -1
  79. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/gcp_machine_workflow.mjs +0 -44
  80. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/gcp_machine_workflow.mjs.map +0 -1
  81. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/human_callback_workflow.mjs +0 -101
  82. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/human_callback_workflow.mjs.map +0 -1
  83. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/k8s_machine_workflow.mjs +0 -33
  84. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/k8s_machine_workflow.mjs.map +0 -1
  85. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_cache.mjs +0 -53
  86. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_cache.mjs.map +0 -1
  87. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_machine_workflow.mjs +0 -29
  88. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_machine_workflow.mjs.map +0 -1
  89. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc.mjs +0 -83
  90. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc.mjs.map +0 -1
  91. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/plain.mjs +0 -36
  92. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/plain.mjs.map +0 -1
  93. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/providers.mjs +0 -32
  94. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/providers.mjs.map +0 -1
  95. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/scram.mjs +0 -206
  96. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/scram.mjs.map +0 -1
  97. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/x509.mjs +0 -45
  98. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/x509.mjs.map +0 -1
  99. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/command_monitoring_events.mjs +0 -213
  100. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/command_monitoring_events.mjs.map +0 -1
  101. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/commands.mjs +0 -411
  102. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/commands.mjs.map +0 -1
  103. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connect.mjs +0 -288
  104. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connect.mjs.map +0 -1
  105. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection.mjs +0 -423
  106. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection.mjs.map +0 -1
  107. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool.mjs +0 -483
  108. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool.mjs.map +0 -1
  109. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool_events.mjs +0 -207
  110. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool_events.mjs.map +0 -1
  111. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/errors.mjs +0 -116
  112. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/errors.mjs.map +0 -1
  113. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/handshake/client_metadata.mjs +0 -183
  114. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/handshake/client_metadata.mjs.map +0 -1
  115. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/metrics.mjs +0 -55
  116. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/metrics.mjs.map +0 -1
  117. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/stream_description.mjs +0 -60
  118. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/stream_description.mjs.map +0 -1
  119. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/compression.mjs +0 -139
  120. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/compression.mjs.map +0 -1
  121. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/constants.mjs +0 -28
  122. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/constants.mjs.map +0 -1
  123. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_data.mjs +0 -117
  124. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_data.mjs.map +0 -1
  125. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_demand/document.mjs +0 -182
  126. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_demand/document.mjs.map +0 -1
  127. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/responses.mjs +0 -304
  128. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/responses.mjs.map +0 -1
  129. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/shared.mjs +0 -34
  130. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/shared.mjs.map +0 -1
  131. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/collection.mjs +0 -739
  132. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/collection.mjs.map +0 -1
  133. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/connection_string.mjs +0 -805
  134. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/connection_string.mjs.map +0 -1
  135. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/constants.mjs +0 -174
  136. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/constants.mjs.map +0 -1
  137. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/abstract_cursor.mjs +0 -726
  138. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/abstract_cursor.mjs.map +0 -1
  139. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/aggregation_cursor.mjs +0 -172
  140. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/aggregation_cursor.mjs.map +0 -1
  141. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/change_stream_cursor.mjs +0 -103
  142. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/change_stream_cursor.mjs.map +0 -1
  143. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/client_bulk_write_cursor.mjs +0 -66
  144. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/client_bulk_write_cursor.mjs.map +0 -1
  145. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/explainable_cursor.mjs +0 -41
  146. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/explainable_cursor.mjs.map +0 -1
  147. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/find_cursor.mjs +0 -365
  148. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/find_cursor.mjs.map +0 -1
  149. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_collections_cursor.mjs +0 -50
  150. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_collections_cursor.mjs.map +0 -1
  151. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_indexes_cursor.mjs +0 -48
  152. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_indexes_cursor.mjs.map +0 -1
  153. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_search_indexes_cursor.mjs +0 -23
  154. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_search_indexes_cursor.mjs.map +0 -1
  155. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/run_command_cursor.mjs +0 -106
  156. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/run_command_cursor.mjs.map +0 -1
  157. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/db.mjs +0 -428
  158. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/db.mjs.map +0 -1
  159. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/deps.mjs +0 -124
  160. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/deps.mjs.map +0 -1
  161. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/encrypter.mjs +0 -95
  162. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/encrypter.mjs.map +0 -1
  163. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/error.mjs +0 -1305
  164. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/error.mjs.map +0 -1
  165. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/explain.mjs +0 -59
  166. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/explain.mjs.map +0 -1
  167. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/download.mjs +0 -250
  168. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/download.mjs.map +0 -1
  169. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/index.mjs +0 -170
  170. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/index.mjs.map +0 -1
  171. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/upload.mjs +0 -315
  172. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/upload.mjs.map +0 -1
  173. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/index.mjs +0 -925
  174. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/index.mjs.map +0 -1
  175. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client.mjs +0 -520
  176. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client.mjs.map +0 -1
  177. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client_auth_providers.mjs +0 -90
  178. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client_auth_providers.mjs.map +0 -1
  179. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_logger.mjs +0 -582
  180. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_logger.mjs.map +0 -1
  181. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_types.mjs +0 -64
  182. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_types.mjs.map +0 -1
  183. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/aggregate.mjs +0 -86
  184. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/aggregate.mjs.map +0 -1
  185. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/client_bulk_write.mjs +0 -60
  186. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/client_bulk_write.mjs.map +0 -1
  187. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/command_builder.mjs +0 -264
  188. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/command_builder.mjs.map +0 -1
  189. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/executor.mjs +0 -109
  190. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/executor.mjs.map +0 -1
  191. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/results_merger.mjs +0 -172
  192. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/results_merger.mjs.map +0 -1
  193. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/command.mjs +0 -68
  194. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/command.mjs.map +0 -1
  195. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/count.mjs +0 -53
  196. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/count.mjs.map +0 -1
  197. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/create_collection.mjs +0 -123
  198. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/create_collection.mjs.map +0 -1
  199. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/delete.mjs +0 -119
  200. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/delete.mjs.map +0 -1
  201. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/distinct.mjs +0 -65
  202. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/distinct.mjs.map +0 -1
  203. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/drop.mjs +0 -97
  204. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/drop.mjs.map +0 -1
  205. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/estimated_document_count.mjs +0 -47
  206. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/estimated_document_count.mjs.map +0 -1
  207. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/execute_operation.mjs +0 -188
  208. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/execute_operation.mjs.map +0 -1
  209. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find.mjs +0 -103
  210. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find.mjs.map +0 -1
  211. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find_and_modify.mjs +0 -136
  212. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find_and_modify.mjs.map +0 -1
  213. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/get_more.mjs +0 -61
  214. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/get_more.mjs.map +0 -1
  215. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/indexes.mjs +0 -179
  216. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/indexes.mjs.map +0 -1
  217. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/insert.mjs +0 -77
  218. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/insert.mjs.map +0 -1
  219. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/kill_cursors.mjs +0 -48
  220. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/kill_cursors.mjs.map +0 -1
  221. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_collections.mjs +0 -60
  222. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_collections.mjs.map +0 -1
  223. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_databases.mjs +0 -43
  224. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_databases.mjs.map +0 -1
  225. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/operation.mjs +0 -105
  226. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/operation.mjs.map +0 -1
  227. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/profiling_level.mjs +0 -50
  228. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/profiling_level.mjs.map +0 -1
  229. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/remove_user.mjs +0 -39
  230. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/remove_user.mjs.map +0 -1
  231. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/rename.mjs +0 -49
  232. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/rename.mjs.map +0 -1
  233. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/run_command.mjs +0 -58
  234. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/run_command.mjs.map +0 -1
  235. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/create.mjs +0 -46
  236. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/create.mjs.map +0 -1
  237. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/drop.mjs +0 -48
  238. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/drop.mjs.map +0 -1
  239. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/update.mjs +0 -46
  240. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/update.mjs.map +0 -1
  241. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/set_profiling_level.mjs +0 -67
  242. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/set_profiling_level.mjs.map +0 -1
  243. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/stats.mjs +0 -37
  244. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/stats.mjs.map +0 -1
  245. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/update.mjs +0 -171
  246. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/update.mjs.map +0 -1
  247. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/validate_collection.mjs +0 -45
  248. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/validate_collection.mjs.map +0 -1
  249. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_concern.mjs +0 -71
  250. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_concern.mjs.map +0 -1
  251. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_preference.mjs +0 -165
  252. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_preference.mjs.map +0 -1
  253. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/resource_management.mjs +0 -62
  254. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/resource_management.mjs.map +0 -1
  255. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/common.mjs +0 -51
  256. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/common.mjs.map +0 -1
  257. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/events.mjs +0 -156
  258. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/events.mjs.map +0 -1
  259. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/monitor.mjs +0 -477
  260. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/monitor.mjs.map +0 -1
  261. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server.mjs +0 -315
  262. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server.mjs.map +0 -1
  263. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_description.mjs +0 -157
  264. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_description.mjs.map +0 -1
  265. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection.mjs +0 -184
  266. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection.mjs.map +0 -1
  267. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection_events.mjs +0 -96
  268. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection_events.mjs.map +0 -1
  269. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/srv_polling.mjs +0 -107
  270. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/srv_polling.mjs.map +0 -1
  271. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology.mjs +0 -540
  272. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology.mjs.map +0 -1
  273. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology_description.mjs +0 -298
  274. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology_description.mjs.map +0 -1
  275. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sessions.mjs +0 -623
  276. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sessions.mjs.map +0 -1
  277. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sort.mjs +0 -91
  278. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sort.mjs.map +0 -1
  279. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/timeout.mjs +0 -254
  280. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/timeout.mjs.map +0 -1
  281. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/transactions.mjs +0 -138
  282. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/transactions.mjs.map +0 -1
  283. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/utils.mjs +0 -993
  284. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/utils.mjs.map +0 -1
  285. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/write_concern.mjs +0 -81
  286. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/write_concern.mjs.map +0 -1
  287. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/package.mjs +0 -171
  288. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/package.mjs.map +0 -1
  289. package/dist/node_modules/.pnpm/punycode@2.3.1/node_modules/punycode/punycode.mjs +0 -295
  290. package/dist/node_modules/.pnpm/punycode@2.3.1/node_modules/punycode/punycode.mjs.map +0 -1
  291. package/dist/node_modules/.pnpm/sparse-bitfield@3.0.3/node_modules/sparse-bitfield/index.mjs +0 -81
  292. package/dist/node_modules/.pnpm/sparse-bitfield@3.0.3/node_modules/sparse-bitfield/index.mjs.map +0 -1
  293. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/index.mjs +0 -206
  294. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/index.mjs.map +0 -1
  295. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/mappingTable.mjs +0 -33590
  296. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/mappingTable.mjs.map +0 -1
  297. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/regexes.mjs +0 -37
  298. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/regexes.mjs.map +0 -1
  299. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/statusMapping.mjs +0 -18
  300. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/statusMapping.mjs.map +0 -1
  301. package/dist/node_modules/.pnpm/webidl-conversions@7.0.0/node_modules/webidl-conversions/lib/index.mjs +0 -252
  302. package/dist/node_modules/.pnpm/webidl-conversions@7.0.0/node_modules/webidl-conversions/lib/index.mjs.map +0 -1
  303. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/index.mjs +0 -41
  304. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/index.mjs.map +0 -1
  305. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/Function.mjs +0 -41
  306. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/Function.mjs.map +0 -1
  307. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL-impl.mjs +0 -173
  308. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL-impl.mjs.map +0 -1
  309. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL.mjs +0 -334
  310. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL.mjs.map +0 -1
  311. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams-impl.mjs +0 -90
  312. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams-impl.mjs.map +0 -1
  313. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams.mjs +0 -356
  314. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams.mjs.map +0 -1
  315. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/encoding.mjs +0 -23
  316. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/encoding.mjs.map +0 -1
  317. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/infra.mjs +0 -29
  318. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/infra.mjs.map +0 -1
  319. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/percent-encoding.mjs +0 -140
  320. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/percent-encoding.mjs.map +0 -1
  321. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/url-state-machine.mjs +0 -831
  322. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/url-state-machine.mjs.map +0 -1
  323. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/urlencoded.mjs +0 -77
  324. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/urlencoded.mjs.map +0 -1
  325. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/utils.mjs +0 -147
  326. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/utils.mjs.map +0 -1
  327. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/webidl2js-wrapper.mjs +0 -17
  328. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/webidl2js-wrapper.mjs.map +0 -1
@@ -1,739 +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_read_preference } from "./read_preference.mjs";
5
- import { require_read_concern } from "./read_concern.mjs";
6
- import { require_write_concern } from "./write_concern.mjs";
7
- import { require_utils } from "./utils.mjs";
8
- import { require_execute_operation } from "./operations/execute_operation.mjs";
9
- import { require_delete } from "./operations/delete.mjs";
10
- import { require_insert } from "./operations/insert.mjs";
11
- import { require_update } from "./operations/update.mjs";
12
- import { require_ordered } from "./bulk/ordered.mjs";
13
- import { require_unordered } from "./bulk/unordered.mjs";
14
- import { require_indexes } from "./operations/indexes.mjs";
15
- import { require_rename } from "./operations/rename.mjs";
16
- import { require_aggregation_cursor } from "./cursor/aggregation_cursor.mjs";
17
- import { require_count } from "./operations/count.mjs";
18
- import { require_find_cursor } from "./cursor/find_cursor.mjs";
19
- import { require_list_indexes_cursor } from "./cursor/list_indexes_cursor.mjs";
20
- import { require_list_search_indexes_cursor } from "./cursor/list_search_indexes_cursor.mjs";
21
- import { require_distinct } from "./operations/distinct.mjs";
22
- import { require_estimated_document_count } from "./operations/estimated_document_count.mjs";
23
- import { require_find_and_modify } from "./operations/find_and_modify.mjs";
24
- import { require_create } from "./operations/search_indexes/create.mjs";
25
- import { require_drop } from "./operations/search_indexes/drop.mjs";
26
- import { require_update as require_update$1 } from "./operations/search_indexes/update.mjs";
27
- import { require_change_stream } from "./change_stream.mjs";
28
-
29
- //#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/collection.js
30
- var require_collection = /* @__PURE__ */ __commonJSMin(((exports) => {
31
- Object.defineProperty(exports, "__esModule", { value: true });
32
- exports.Collection = void 0;
33
- const bson_1 = require_bson();
34
- const ordered_1 = require_ordered();
35
- const unordered_1 = require_unordered();
36
- const change_stream_1 = require_change_stream();
37
- const aggregation_cursor_1 = require_aggregation_cursor();
38
- const find_cursor_1 = require_find_cursor();
39
- const list_indexes_cursor_1 = require_list_indexes_cursor();
40
- const list_search_indexes_cursor_1 = require_list_search_indexes_cursor();
41
- const error_1 = require_error();
42
- const count_1 = require_count();
43
- const delete_1 = require_delete();
44
- const distinct_1 = require_distinct();
45
- const estimated_document_count_1 = require_estimated_document_count();
46
- const execute_operation_1 = require_execute_operation();
47
- const find_and_modify_1 = require_find_and_modify();
48
- const indexes_1 = require_indexes();
49
- const insert_1 = require_insert();
50
- const rename_1 = require_rename();
51
- const create_1 = require_create();
52
- const drop_1 = require_drop();
53
- const update_1 = require_update$1();
54
- const update_2 = require_update();
55
- const read_concern_1 = require_read_concern();
56
- const read_preference_1 = require_read_preference();
57
- const utils_1 = require_utils();
58
- const write_concern_1 = require_write_concern();
59
- /**
60
- * The **Collection** class is an internal class that embodies a MongoDB collection
61
- * allowing for insert/find/update/delete and other command operation on that MongoDB collection.
62
- *
63
- * **COLLECTION Cannot directly be instantiated**
64
- * @public
65
- *
66
- * @example
67
- * ```ts
68
- * import { MongoClient } from 'mongodb';
69
- *
70
- * interface Pet {
71
- * name: string;
72
- * kind: 'dog' | 'cat' | 'fish';
73
- * }
74
- *
75
- * const client = new MongoClient('mongodb://localhost:27017');
76
- * const pets = client.db().collection<Pet>('pets');
77
- *
78
- * const petCursor = pets.find();
79
- *
80
- * for await (const pet of petCursor) {
81
- * console.log(`${pet.name} is a ${pet.kind}!`);
82
- * }
83
- * ```
84
- */
85
- var Collection = class {
86
- /**
87
- * Create a new Collection instance
88
- * @internal
89
- */
90
- constructor(db, name, options) {
91
- this.db = db;
92
- this.s = {
93
- db,
94
- options,
95
- namespace: new utils_1.MongoDBCollectionNamespace(db.databaseName, name),
96
- pkFactory: db.options?.pkFactory ?? utils_1.DEFAULT_PK_FACTORY,
97
- readPreference: read_preference_1.ReadPreference.fromOptions(options),
98
- bsonOptions: (0, bson_1.resolveBSONOptions)(options, db),
99
- readConcern: read_concern_1.ReadConcern.fromOptions(options),
100
- writeConcern: write_concern_1.WriteConcern.fromOptions(options)
101
- };
102
- this.client = db.client;
103
- }
104
- /**
105
- * The name of the database this collection belongs to
106
- */
107
- get dbName() {
108
- return this.s.namespace.db;
109
- }
110
- /**
111
- * The name of this collection
112
- */
113
- get collectionName() {
114
- return this.s.namespace.collection;
115
- }
116
- /**
117
- * The namespace of this collection, in the format `${this.dbName}.${this.collectionName}`
118
- */
119
- get namespace() {
120
- return this.fullNamespace.toString();
121
- }
122
- /**
123
- * @internal
124
- *
125
- * The `MongoDBNamespace` for the collection.
126
- */
127
- get fullNamespace() {
128
- return this.s.namespace;
129
- }
130
- /**
131
- * The current readConcern of the collection. If not explicitly defined for
132
- * this collection, will be inherited from the parent DB
133
- */
134
- get readConcern() {
135
- if (this.s.readConcern == null) return this.db.readConcern;
136
- return this.s.readConcern;
137
- }
138
- /**
139
- * The current readPreference of the collection. If not explicitly defined for
140
- * this collection, will be inherited from the parent DB
141
- */
142
- get readPreference() {
143
- if (this.s.readPreference == null) return this.db.readPreference;
144
- return this.s.readPreference;
145
- }
146
- get bsonOptions() {
147
- return this.s.bsonOptions;
148
- }
149
- /**
150
- * The current writeConcern of the collection. If not explicitly defined for
151
- * this collection, will be inherited from the parent DB
152
- */
153
- get writeConcern() {
154
- if (this.s.writeConcern == null) return this.db.writeConcern;
155
- return this.s.writeConcern;
156
- }
157
- /** The current index hint for the collection */
158
- get hint() {
159
- return this.s.collectionHint;
160
- }
161
- set hint(v) {
162
- this.s.collectionHint = (0, utils_1.normalizeHintField)(v);
163
- }
164
- get timeoutMS() {
165
- return this.s.options.timeoutMS;
166
- }
167
- /**
168
- * Inserts a single document into MongoDB. If documents passed in do not contain the **_id** field,
169
- * one will be added to each of the documents missing it by the driver, mutating the document. This behavior
170
- * can be overridden by setting the **forceServerObjectId** flag.
171
- *
172
- * @param doc - The document to insert
173
- * @param options - Optional settings for the command
174
- */
175
- async insertOne(doc, options) {
176
- return await (0, execute_operation_1.executeOperation)(this.client, new insert_1.InsertOneOperation(this, doc, (0, utils_1.resolveOptions)(this, options)));
177
- }
178
- /**
179
- * Inserts an array of documents into MongoDB. If documents passed in do not contain the **_id** field,
180
- * one will be added to each of the documents missing it by the driver, mutating the document. This behavior
181
- * can be overridden by setting the **forceServerObjectId** flag.
182
- *
183
- * @param docs - The documents to insert
184
- * @param options - Optional settings for the command
185
- */
186
- async insertMany(docs, options) {
187
- if (!Array.isArray(docs)) throw new error_1.MongoInvalidArgumentError("Argument \"docs\" must be an array of documents");
188
- options = (0, utils_1.resolveOptions)(this, options ?? {});
189
- const acknowledged = write_concern_1.WriteConcern.fromOptions(options)?.w !== 0;
190
- try {
191
- const res = await this.bulkWrite(docs.map((doc) => ({ insertOne: { document: doc } })), options);
192
- return {
193
- acknowledged,
194
- insertedCount: res.insertedCount,
195
- insertedIds: res.insertedIds
196
- };
197
- } catch (err) {
198
- if (err && err.message === "Operation must be an object with an operation key") throw new error_1.MongoInvalidArgumentError("Collection.insertMany() cannot be called with an array that has null/undefined values");
199
- throw err;
200
- }
201
- }
202
- /**
203
- * Perform a bulkWrite operation without a fluent API
204
- *
205
- * Legal operation types are
206
- * - `insertOne`
207
- * - `replaceOne`
208
- * - `updateOne`
209
- * - `updateMany`
210
- * - `deleteOne`
211
- * - `deleteMany`
212
- *
213
- * If documents passed in do not contain the **_id** field,
214
- * one will be added to each of the documents missing it by the driver, mutating the document. This behavior
215
- * can be overridden by setting the **forceServerObjectId** flag.
216
- *
217
- * @param operations - Bulk operations to perform
218
- * @param options - Optional settings for the command
219
- * @throws MongoDriverError if operations is not an array
220
- */
221
- async bulkWrite(operations, options) {
222
- if (!Array.isArray(operations)) throw new error_1.MongoInvalidArgumentError("Argument \"operations\" must be an array of documents");
223
- options = (0, utils_1.resolveOptions)(this, options ?? {});
224
- if (!(this.client.topology != null)) await (0, execute_operation_1.autoConnect)(this.client);
225
- const bulk = options.ordered === false ? this.initializeUnorderedBulkOp(options) : this.initializeOrderedBulkOp(options);
226
- for (const operation of operations) bulk.raw(operation);
227
- return await bulk.execute({ ...options });
228
- }
229
- /**
230
- * Update a single document in a collection
231
- *
232
- * The value of `update` can be either:
233
- * - UpdateFilter<TSchema> - A document that contains update operator expressions,
234
- * - Document[] - an aggregation pipeline.
235
- *
236
- * @param filter - The filter used to select the document to update
237
- * @param update - The modifications to apply
238
- * @param options - Optional settings for the command
239
- */
240
- async updateOne(filter, update, options) {
241
- return await (0, execute_operation_1.executeOperation)(this.client, new update_2.UpdateOneOperation(this.s.namespace, filter, update, (0, utils_1.resolveOptions)(this, options)));
242
- }
243
- /**
244
- * Replace a document in a collection with another document
245
- *
246
- * @param filter - The filter used to select the document to replace
247
- * @param replacement - The Document that replaces the matching document
248
- * @param options - Optional settings for the command
249
- */
250
- async replaceOne(filter, replacement, options) {
251
- return await (0, execute_operation_1.executeOperation)(this.client, new update_2.ReplaceOneOperation(this.s.namespace, filter, replacement, (0, utils_1.resolveOptions)(this, options)));
252
- }
253
- /**
254
- * Update multiple documents in a collection
255
- *
256
- * The value of `update` can be either:
257
- * - UpdateFilter<TSchema> - A document that contains update operator expressions,
258
- * - Document[] - an aggregation pipeline.
259
- *
260
- * @param filter - The filter used to select the document to update
261
- * @param update - The modifications to apply
262
- * @param options - Optional settings for the command
263
- */
264
- async updateMany(filter, update, options) {
265
- return await (0, execute_operation_1.executeOperation)(this.client, new update_2.UpdateManyOperation(this.s.namespace, filter, update, (0, utils_1.resolveOptions)(this, options)));
266
- }
267
- /**
268
- * Delete a document from a collection
269
- *
270
- * @param filter - The filter used to select the document to remove
271
- * @param options - Optional settings for the command
272
- */
273
- async deleteOne(filter = {}, options = {}) {
274
- return await (0, execute_operation_1.executeOperation)(this.client, new delete_1.DeleteOneOperation(this.s.namespace, filter, (0, utils_1.resolveOptions)(this, options)));
275
- }
276
- /**
277
- * Delete multiple documents from a collection
278
- *
279
- * @param filter - The filter used to select the documents to remove
280
- * @param options - Optional settings for the command
281
- */
282
- async deleteMany(filter = {}, options = {}) {
283
- return await (0, execute_operation_1.executeOperation)(this.client, new delete_1.DeleteManyOperation(this.s.namespace, filter, (0, utils_1.resolveOptions)(this, options)));
284
- }
285
- /**
286
- * Rename the collection.
287
- *
288
- * @remarks
289
- * This operation does not inherit options from the Db or MongoClient.
290
- *
291
- * @param newName - New name of of the collection.
292
- * @param options - Optional settings for the command
293
- */
294
- async rename(newName, options) {
295
- return await (0, execute_operation_1.executeOperation)(this.client, new rename_1.RenameOperation(this, newName, (0, utils_1.resolveOptions)(void 0, {
296
- ...options,
297
- readPreference: read_preference_1.ReadPreference.PRIMARY
298
- })));
299
- }
300
- /**
301
- * Drop the collection from the database, removing it permanently. New accesses will create a new collection.
302
- *
303
- * @param options - Optional settings for the command
304
- */
305
- async drop(options) {
306
- return await this.db.dropCollection(this.collectionName, options);
307
- }
308
- async findOne(filter = {}, options = {}) {
309
- const { batchSize: _batchSize, noCursorTimeout: _noCursorTimeout, ...opts } = options;
310
- opts.singleBatch = true;
311
- const cursor = this.find(filter, opts).limit(1);
312
- const result = await cursor.next();
313
- await cursor.close();
314
- return result;
315
- }
316
- find(filter = {}, options = {}) {
317
- return new find_cursor_1.FindCursor(this.client, this.s.namespace, filter, (0, utils_1.resolveOptions)(this, options));
318
- }
319
- /**
320
- * Returns the options of the collection.
321
- *
322
- * @param options - Optional settings for the command
323
- */
324
- async options(options) {
325
- options = (0, utils_1.resolveOptions)(this, options);
326
- const [collection] = await this.db.listCollections({ name: this.collectionName }, {
327
- ...options,
328
- nameOnly: false
329
- }).toArray();
330
- if (collection == null || collection.options == null) throw new error_1.MongoAPIError(`collection ${this.namespace} not found`);
331
- return collection.options;
332
- }
333
- /**
334
- * Returns if the collection is a capped collection
335
- *
336
- * @param options - Optional settings for the command
337
- */
338
- async isCapped(options) {
339
- const { capped } = await this.options(options);
340
- return Boolean(capped);
341
- }
342
- /**
343
- * Creates an index on the db and collection collection.
344
- *
345
- * @param indexSpec - The field name or index specification to create an index for
346
- * @param options - Optional settings for the command
347
- *
348
- * @example
349
- * ```ts
350
- * const collection = client.db('foo').collection('bar');
351
- *
352
- * await collection.createIndex({ a: 1, b: -1 });
353
- *
354
- * // Alternate syntax for { c: 1, d: -1 } that ensures order of indexes
355
- * await collection.createIndex([ [c, 1], [d, -1] ]);
356
- *
357
- * // Equivalent to { e: 1 }
358
- * await collection.createIndex('e');
359
- *
360
- * // Equivalent to { f: 1, g: 1 }
361
- * await collection.createIndex(['f', 'g'])
362
- *
363
- * // Equivalent to { h: 1, i: -1 }
364
- * await collection.createIndex([ { h: 1 }, { i: -1 } ]);
365
- *
366
- * // Equivalent to { j: 1, k: -1, l: 2d }
367
- * await collection.createIndex(['j', ['k', -1], { l: '2d' }])
368
- * ```
369
- */
370
- async createIndex(indexSpec, options) {
371
- return (await (0, execute_operation_1.executeOperation)(this.client, indexes_1.CreateIndexesOperation.fromIndexSpecification(this, this.collectionName, indexSpec, (0, utils_1.resolveOptions)(this, options))))[0];
372
- }
373
- /**
374
- * Creates multiple indexes in the collection, this method is only supported for
375
- * MongoDB 2.6 or higher. Earlier version of MongoDB will throw a command not supported
376
- * error.
377
- *
378
- * **Note**: Unlike {@link Collection#createIndex| createIndex}, this function takes in raw index specifications.
379
- * Index specifications are defined {@link https://www.mongodb.com/docs/manual/reference/command/createIndexes/| here}.
380
- *
381
- * @param indexSpecs - An array of index specifications to be created
382
- * @param options - Optional settings for the command
383
- *
384
- * @example
385
- * ```ts
386
- * const collection = client.db('foo').collection('bar');
387
- * await collection.createIndexes([
388
- * // Simple index on field fizz
389
- * {
390
- * key: { fizz: 1 },
391
- * }
392
- * // wildcard index
393
- * {
394
- * key: { '$**': 1 }
395
- * },
396
- * // named index on darmok and jalad
397
- * {
398
- * key: { darmok: 1, jalad: -1 }
399
- * name: 'tanagra'
400
- * }
401
- * ]);
402
- * ```
403
- */
404
- async createIndexes(indexSpecs, options) {
405
- return await (0, execute_operation_1.executeOperation)(this.client, indexes_1.CreateIndexesOperation.fromIndexDescriptionArray(this, this.collectionName, indexSpecs, (0, utils_1.resolveOptions)(this, {
406
- ...options,
407
- maxTimeMS: void 0
408
- })));
409
- }
410
- /**
411
- * Drops an index from this collection.
412
- *
413
- * @param indexName - Name of the index to drop.
414
- * @param options - Optional settings for the command
415
- */
416
- async dropIndex(indexName, options) {
417
- return await (0, execute_operation_1.executeOperation)(this.client, new indexes_1.DropIndexOperation(this, indexName, {
418
- ...(0, utils_1.resolveOptions)(this, options),
419
- readPreference: read_preference_1.ReadPreference.primary
420
- }));
421
- }
422
- /**
423
- * Drops all indexes from this collection.
424
- *
425
- * @param options - Optional settings for the command
426
- */
427
- async dropIndexes(options) {
428
- try {
429
- await (0, execute_operation_1.executeOperation)(this.client, new indexes_1.DropIndexOperation(this, "*", (0, utils_1.resolveOptions)(this, options)));
430
- return true;
431
- } catch (error) {
432
- if (error instanceof error_1.MongoOperationTimeoutError) throw error;
433
- return false;
434
- }
435
- }
436
- /**
437
- * Get the list of all indexes information for the collection.
438
- *
439
- * @param options - Optional settings for the command
440
- */
441
- listIndexes(options) {
442
- return new list_indexes_cursor_1.ListIndexesCursor(this, (0, utils_1.resolveOptions)(this, options));
443
- }
444
- /**
445
- * Checks if one or more indexes exist on the collection, fails on first non-existing index
446
- *
447
- * @param indexes - One or more index names to check.
448
- * @param options - Optional settings for the command
449
- */
450
- async indexExists(indexes, options) {
451
- const indexNames = Array.isArray(indexes) ? indexes : [indexes];
452
- const allIndexes = new Set(await this.listIndexes(options).map(({ name }) => name).toArray());
453
- return indexNames.every((name) => allIndexes.has(name));
454
- }
455
- async indexInformation(options) {
456
- return await this.indexes({
457
- ...options,
458
- full: options?.full ?? false
459
- });
460
- }
461
- /**
462
- * Gets an estimate of the count of documents in a collection using collection metadata.
463
- * This will always run a count command on all server versions.
464
- *
465
- * due to an oversight in versions 5.0.0-5.0.8 of MongoDB, the count command,
466
- * which estimatedDocumentCount uses in its implementation, was not included in v1 of
467
- * the Stable API, and so users of the Stable API with estimatedDocumentCount are
468
- * recommended to upgrade their server version to 5.0.9+ or set apiStrict: false to avoid
469
- * encountering errors.
470
- *
471
- * @see {@link https://www.mongodb.com/docs/manual/reference/command/count/#behavior|Count: Behavior}
472
- * @param options - Optional settings for the command
473
- */
474
- async estimatedDocumentCount(options) {
475
- return await (0, execute_operation_1.executeOperation)(this.client, new estimated_document_count_1.EstimatedDocumentCountOperation(this, (0, utils_1.resolveOptions)(this, options)));
476
- }
477
- /**
478
- * Gets the number of documents matching the filter.
479
- * For a fast count of the total documents in a collection see {@link Collection#estimatedDocumentCount| estimatedDocumentCount}.
480
- *
481
- * Due to countDocuments using the $match aggregation pipeline stage, certain query operators cannot be used in countDocuments. This includes the $where and $near query operators, among others. Details can be found in the documentation for the $match aggregation pipeline stage.
482
- *
483
- * **Note**: When migrating from {@link Collection#count| count} to {@link Collection#countDocuments| countDocuments}
484
- * the following query operators must be replaced:
485
- *
486
- * | Operator | Replacement |
487
- * | -------- | ----------- |
488
- * | `$where` | [`$expr`][1] |
489
- * | `$near` | [`$geoWithin`][2] with [`$center`][3] |
490
- * | `$nearSphere` | [`$geoWithin`][2] with [`$centerSphere`][4] |
491
- *
492
- * [1]: https://www.mongodb.com/docs/manual/reference/operator/query/expr/
493
- * [2]: https://www.mongodb.com/docs/manual/reference/operator/query/geoWithin/
494
- * [3]: https://www.mongodb.com/docs/manual/reference/operator/query/center/#op._S_center
495
- * [4]: https://www.mongodb.com/docs/manual/reference/operator/query/centerSphere/#op._S_centerSphere
496
- *
497
- * @param filter - The filter for the count
498
- * @param options - Optional settings for the command
499
- *
500
- * @see https://www.mongodb.com/docs/manual/reference/operator/query/expr/
501
- * @see https://www.mongodb.com/docs/manual/reference/operator/query/geoWithin/
502
- * @see https://www.mongodb.com/docs/manual/reference/operator/query/center/#op._S_center
503
- * @see https://www.mongodb.com/docs/manual/reference/operator/query/centerSphere/#op._S_centerSphere
504
- */
505
- async countDocuments(filter = {}, options = {}) {
506
- const pipeline = [];
507
- pipeline.push({ $match: filter });
508
- if (typeof options.skip === "number") pipeline.push({ $skip: options.skip });
509
- if (typeof options.limit === "number") pipeline.push({ $limit: options.limit });
510
- pipeline.push({ $group: {
511
- _id: 1,
512
- n: { $sum: 1 }
513
- } });
514
- const cursor = this.aggregate(pipeline, options);
515
- const doc = await cursor.next();
516
- await cursor.close();
517
- return doc?.n ?? 0;
518
- }
519
- async distinct(key, filter = {}, options = {}) {
520
- return await (0, execute_operation_1.executeOperation)(this.client, new distinct_1.DistinctOperation(this, key, filter, (0, utils_1.resolveOptions)(this, options)));
521
- }
522
- async indexes(options) {
523
- const indexes = await this.listIndexes(options).toArray();
524
- if (options?.full ?? true) return indexes;
525
- return Object.fromEntries(indexes.map(({ name, key }) => [name, Object.entries(key)]));
526
- }
527
- async findOneAndDelete(filter, options) {
528
- return await (0, execute_operation_1.executeOperation)(this.client, new find_and_modify_1.FindOneAndDeleteOperation(this, filter, (0, utils_1.resolveOptions)(this, options)));
529
- }
530
- async findOneAndReplace(filter, replacement, options) {
531
- return await (0, execute_operation_1.executeOperation)(this.client, new find_and_modify_1.FindOneAndReplaceOperation(this, filter, replacement, (0, utils_1.resolveOptions)(this, options)));
532
- }
533
- async findOneAndUpdate(filter, update, options) {
534
- return await (0, execute_operation_1.executeOperation)(this.client, new find_and_modify_1.FindOneAndUpdateOperation(this, filter, update, (0, utils_1.resolveOptions)(this, options)));
535
- }
536
- /**
537
- * Execute an aggregation framework pipeline against the collection, needs MongoDB \>= 2.2
538
- *
539
- * @param pipeline - An array of aggregation pipelines to execute
540
- * @param options - Optional settings for the command
541
- */
542
- aggregate(pipeline = [], options) {
543
- if (!Array.isArray(pipeline)) throw new error_1.MongoInvalidArgumentError("Argument \"pipeline\" must be an array of aggregation stages");
544
- return new aggregation_cursor_1.AggregationCursor(this.client, this.s.namespace, pipeline, (0, utils_1.resolveOptions)(this, options));
545
- }
546
- /**
547
- * Create a new Change Stream, watching for new changes (insertions, updates, replacements, deletions, and invalidations) in this collection.
548
- *
549
- * @remarks
550
- * watch() accepts two generic arguments for distinct use cases:
551
- * - The first is to override the schema that may be defined for this specific collection
552
- * - The second is to override the shape of the change stream document entirely, if it is not provided the type will default to ChangeStreamDocument of the first argument
553
- * @example
554
- * By just providing the first argument I can type the change to be `ChangeStreamDocument<{ _id: number }>`
555
- * ```ts
556
- * collection.watch<{ _id: number }>()
557
- * .on('change', change => console.log(change._id.toFixed(4)));
558
- * ```
559
- *
560
- * @example
561
- * Passing a second argument provides a way to reflect the type changes caused by an advanced pipeline.
562
- * Here, we are using a pipeline to have MongoDB filter for insert changes only and add a comment.
563
- * No need start from scratch on the ChangeStreamInsertDocument type!
564
- * By using an intersection we can save time and ensure defaults remain the same type!
565
- * ```ts
566
- * collection
567
- * .watch<Schema, ChangeStreamInsertDocument<Schema> & { comment: string }>([
568
- * { $addFields: { comment: 'big changes' } },
569
- * { $match: { operationType: 'insert' } }
570
- * ])
571
- * .on('change', change => {
572
- * change.comment.startsWith('big');
573
- * change.operationType === 'insert';
574
- * // No need to narrow in code because the generics did that for us!
575
- * expectType<Schema>(change.fullDocument);
576
- * });
577
- * ```
578
- *
579
- * @remarks
580
- * When `timeoutMS` is configured for a change stream, it will have different behaviour depending
581
- * on whether the change stream is in iterator mode or emitter mode. In both cases, a change
582
- * stream will time out if it does not receive a change event within `timeoutMS` of the last change
583
- * event.
584
- *
585
- * Note that if a change stream is consistently timing out when watching a collection, database or
586
- * client that is being changed, then this may be due to the server timing out before it can finish
587
- * processing the existing oplog. To address this, restart the change stream with a higher
588
- * `timeoutMS`.
589
- *
590
- * If the change stream times out the initial aggregate operation to establish the change stream on
591
- * the server, then the client will close the change stream. If the getMore calls to the server
592
- * time out, then the change stream will be left open, but will throw a MongoOperationTimeoutError
593
- * when in iterator mode and emit an error event that returns a MongoOperationTimeoutError in
594
- * emitter mode.
595
- *
596
- * To determine whether or not the change stream is still open following a timeout, check the
597
- * {@link ChangeStream.closed} getter.
598
- *
599
- * @example
600
- * In iterator mode, if a next() call throws a timeout error, it will attempt to resume the change stream.
601
- * The next call can just be retried after this succeeds.
602
- * ```ts
603
- * const changeStream = collection.watch([], { timeoutMS: 100 });
604
- * try {
605
- * await changeStream.next();
606
- * } catch (e) {
607
- * if (e instanceof MongoOperationTimeoutError && !changeStream.closed) {
608
- * await changeStream.next();
609
- * }
610
- * throw e;
611
- * }
612
- * ```
613
- *
614
- * @example
615
- * In emitter mode, if the change stream goes `timeoutMS` without emitting a change event, it will
616
- * emit an error event that returns a MongoOperationTimeoutError, but will not close the change
617
- * stream unless the resume attempt fails. There is no need to re-establish change listeners as
618
- * this will automatically continue emitting change events once the resume attempt completes.
619
- *
620
- * ```ts
621
- * const changeStream = collection.watch([], { timeoutMS: 100 });
622
- * changeStream.on('change', console.log);
623
- * changeStream.on('error', e => {
624
- * if (e instanceof MongoOperationTimeoutError && !changeStream.closed) {
625
- * // do nothing
626
- * } else {
627
- * changeStream.close();
628
- * }
629
- * });
630
- * ```
631
- *
632
- * @param pipeline - An array of {@link https://www.mongodb.com/docs/manual/reference/operator/aggregation-pipeline/|aggregation pipeline stages} through which to pass change stream documents. This allows for filtering (using $match) and manipulating the change stream documents.
633
- * @param options - Optional settings for the command
634
- * @typeParam TLocal - Type of the data being detected by the change stream
635
- * @typeParam TChange - Type of the whole change stream document emitted
636
- */
637
- watch(pipeline = [], options = {}) {
638
- if (!Array.isArray(pipeline)) {
639
- options = pipeline;
640
- pipeline = [];
641
- }
642
- return new change_stream_1.ChangeStream(this, pipeline, (0, utils_1.resolveOptions)(this, options));
643
- }
644
- /**
645
- * Initiate an Out of order batch write operation. All operations will be buffered into insert/update/remove commands executed out of order.
646
- *
647
- * @throws MongoNotConnectedError
648
- * @remarks
649
- * **NOTE:** MongoClient must be connected prior to calling this method due to a known limitation in this legacy implementation.
650
- * However, `collection.bulkWrite()` provides an equivalent API that does not require prior connecting.
651
- */
652
- initializeUnorderedBulkOp(options) {
653
- return new unordered_1.UnorderedBulkOperation(this, (0, utils_1.resolveOptions)(this, options));
654
- }
655
- /**
656
- * Initiate an In order bulk write operation. Operations will be serially executed in the order they are added, creating a new operation for each switch in types.
657
- *
658
- * @throws MongoNotConnectedError
659
- * @remarks
660
- * **NOTE:** MongoClient must be connected prior to calling this method due to a known limitation in this legacy implementation.
661
- * However, `collection.bulkWrite()` provides an equivalent API that does not require prior connecting.
662
- */
663
- initializeOrderedBulkOp(options) {
664
- return new ordered_1.OrderedBulkOperation(this, (0, utils_1.resolveOptions)(this, options));
665
- }
666
- /**
667
- * An estimated count of matching documents in the db to a filter.
668
- *
669
- * **NOTE:** This method has been deprecated, since it does not provide an accurate count of the documents
670
- * in a collection. To obtain an accurate count of documents in the collection, use {@link Collection#countDocuments| countDocuments}.
671
- * To obtain an estimated count of all documents in the collection, use {@link Collection#estimatedDocumentCount| estimatedDocumentCount}.
672
- *
673
- * @deprecated use {@link Collection#countDocuments| countDocuments} or {@link Collection#estimatedDocumentCount| estimatedDocumentCount} instead
674
- *
675
- * @param filter - The filter for the count.
676
- * @param options - Optional settings for the command
677
- */
678
- async count(filter = {}, options = {}) {
679
- return await (0, execute_operation_1.executeOperation)(this.client, new count_1.CountOperation(this.fullNamespace, filter, (0, utils_1.resolveOptions)(this, options)));
680
- }
681
- listSearchIndexes(indexNameOrOptions, options) {
682
- options = typeof indexNameOrOptions === "object" ? indexNameOrOptions : options == null ? {} : options;
683
- const indexName = indexNameOrOptions == null ? null : typeof indexNameOrOptions === "object" ? null : indexNameOrOptions;
684
- return new list_search_indexes_cursor_1.ListSearchIndexesCursor(this, indexName, options);
685
- }
686
- /**
687
- * Creates a single search index for the collection.
688
- *
689
- * @param description - The index description for the new search index.
690
- * @returns A promise that resolves to the name of the new search index.
691
- *
692
- * @remarks Only available when used against a 7.0+ Atlas cluster.
693
- */
694
- async createSearchIndex(description) {
695
- const [index] = await this.createSearchIndexes([description]);
696
- return index;
697
- }
698
- /**
699
- * Creates multiple search indexes for the current collection.
700
- *
701
- * @param descriptions - An array of `SearchIndexDescription`s for the new search indexes.
702
- * @returns A promise that resolves to an array of the newly created search index names.
703
- *
704
- * @remarks Only available when used against a 7.0+ Atlas cluster.
705
- * @returns
706
- */
707
- async createSearchIndexes(descriptions) {
708
- return await (0, execute_operation_1.executeOperation)(this.client, new create_1.CreateSearchIndexesOperation(this, descriptions));
709
- }
710
- /**
711
- * Deletes a search index by index name.
712
- *
713
- * @param name - The name of the search index to be deleted.
714
- *
715
- * @remarks Only available when used against a 7.0+ Atlas cluster.
716
- */
717
- async dropSearchIndex(name) {
718
- return await (0, execute_operation_1.executeOperation)(this.client, new drop_1.DropSearchIndexOperation(this, name));
719
- }
720
- /**
721
- * Updates a search index by replacing the existing index definition with the provided definition.
722
- *
723
- * @param name - The name of the search index to update.
724
- * @param definition - The new search index definition.
725
- *
726
- * @remarks Only available when used against a 7.0+ Atlas cluster.
727
- */
728
- async updateSearchIndex(name, definition) {
729
- return await (0, execute_operation_1.executeOperation)(this.client, new update_1.UpdateSearchIndexOperation(this, name, definition));
730
- }
731
- };
732
- exports.Collection = Collection;
733
- }));
734
-
735
- //#endregion
736
- export default require_collection();
737
-
738
- export { require_collection };
739
- //# sourceMappingURL=collection.mjs.map