pecunia-root 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (326) 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/index.d.mts +1 -2
  5. package/dist/index.mjs +1 -2
  6. package/package.json +2 -16
  7. package/dist/_virtual/rolldown_runtime.mjs +0 -8
  8. package/dist/adapters/mongodb-adapter/index.d.mts +0 -35
  9. package/dist/adapters/mongodb-adapter/index.mjs +0 -314
  10. package/dist/adapters/mongodb-adapter/index.mjs.map +0 -1
  11. package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/code-points-data.mjs +0 -14
  12. package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/code-points-data.mjs.map +0 -1
  13. package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/index.mjs +0 -54
  14. package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/index.mjs.map +0 -1
  15. package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/memory-code-points.mjs +0 -36
  16. package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/memory-code-points.mjs.map +0 -1
  17. package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/node.mjs +0 -27
  18. package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/node.mjs.map +0 -1
  19. package/dist/node_modules/.pnpm/bson@6.10.4/node_modules/bson/lib/bson.mjs +0 -3728
  20. package/dist/node_modules/.pnpm/bson@6.10.4/node_modules/bson/lib/bson.mjs.map +0 -1
  21. package/dist/node_modules/.pnpm/memory-pager@1.5.0/node_modules/memory-pager/index.mjs +0 -137
  22. package/dist/node_modules/.pnpm/memory-pager@1.5.0/node_modules/memory-pager/index.mjs.map +0 -1
  23. package/dist/node_modules/.pnpm/mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/index.mjs +0 -211
  24. package/dist/node_modules/.pnpm/mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/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/redact.mjs +0 -95
  26. package/dist/node_modules/.pnpm/mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/redact.mjs.map +0 -1
  27. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/admin.mjs +0 -158
  28. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/admin.mjs.map +0 -1
  29. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bson.mjs +0 -195
  30. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bson.mjs.map +0 -1
  31. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/common.mjs +0 -710
  32. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/common.mjs.map +0 -1
  33. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/ordered.mjs +0 -53
  34. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/ordered.mjs.map +0 -1
  35. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/unordered.mjs +0 -63
  36. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/unordered.mjs.map +0 -1
  37. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/change_stream.mjs +0 -368
  38. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/change_stream.mjs.map +0 -1
  39. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/auto_encrypter.mjs +0 -234
  40. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/auto_encrypter.mjs.map +0 -1
  41. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/client_encryption.mjs +0 -545
  42. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/client_encryption.mjs.map +0 -1
  43. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/crypto_callbacks.mjs +0 -83
  44. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/crypto_callbacks.mjs.map +0 -1
  45. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/errors.mjs +0 -146
  46. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/errors.mjs.map +0 -1
  47. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/mongocryptd_manager.mjs +0 -58
  48. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/mongocryptd_manager.mjs.map +0 -1
  49. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/aws.mjs +0 -30
  50. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/aws.mjs.map +0 -1
  51. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/azure.mjs +0 -135
  52. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/azure.mjs.map +0 -1
  53. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/gcp.mjs +0 -25
  54. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/gcp.mjs.map +0 -1
  55. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/index.mjs +0 -47
  56. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/index.mjs.map +0 -1
  57. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/state_machine.mjs +0 -362
  58. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/state_machine.mjs.map +0 -1
  59. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/auth_provider.mjs +0 -58
  60. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/auth_provider.mjs.map +0 -1
  61. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/aws_temporary_credentials.mjs +0 -123
  62. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/aws_temporary_credentials.mjs.map +0 -1
  63. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/gssapi.mjs +0 -128
  64. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/gssapi.mjs.map +0 -1
  65. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongo_credentials.mjs +0 -133
  66. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongo_credentials.mjs.map +0 -1
  67. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_aws.mjs +0 -126
  68. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_aws.mjs.map +0 -1
  69. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/automated_callback_workflow.mjs +0 -79
  70. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/automated_callback_workflow.mjs.map +0 -1
  71. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_machine_workflow.mjs +0 -65
  72. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_machine_workflow.mjs.map +0 -1
  73. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_workflow.mjs +0 -127
  74. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_workflow.mjs.map +0 -1
  75. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/command_builders.mjs +0 -47
  76. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/command_builders.mjs.map +0 -1
  77. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/gcp_machine_workflow.mjs +0 -44
  78. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/gcp_machine_workflow.mjs.map +0 -1
  79. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/human_callback_workflow.mjs +0 -101
  80. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/human_callback_workflow.mjs.map +0 -1
  81. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/k8s_machine_workflow.mjs +0 -33
  82. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/k8s_machine_workflow.mjs.map +0 -1
  83. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_cache.mjs +0 -53
  84. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_cache.mjs.map +0 -1
  85. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_machine_workflow.mjs +0 -29
  86. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_machine_workflow.mjs.map +0 -1
  87. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc.mjs +0 -83
  88. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc.mjs.map +0 -1
  89. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/plain.mjs +0 -36
  90. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/plain.mjs.map +0 -1
  91. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/providers.mjs +0 -32
  92. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/providers.mjs.map +0 -1
  93. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/scram.mjs +0 -206
  94. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/scram.mjs.map +0 -1
  95. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/x509.mjs +0 -45
  96. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/x509.mjs.map +0 -1
  97. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/command_monitoring_events.mjs +0 -213
  98. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/command_monitoring_events.mjs.map +0 -1
  99. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/commands.mjs +0 -411
  100. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/commands.mjs.map +0 -1
  101. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connect.mjs +0 -288
  102. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connect.mjs.map +0 -1
  103. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection.mjs +0 -423
  104. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection.mjs.map +0 -1
  105. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool.mjs +0 -483
  106. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool.mjs.map +0 -1
  107. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool_events.mjs +0 -207
  108. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool_events.mjs.map +0 -1
  109. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/errors.mjs +0 -116
  110. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/errors.mjs.map +0 -1
  111. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/handshake/client_metadata.mjs +0 -183
  112. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/handshake/client_metadata.mjs.map +0 -1
  113. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/metrics.mjs +0 -55
  114. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/metrics.mjs.map +0 -1
  115. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/stream_description.mjs +0 -60
  116. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/stream_description.mjs.map +0 -1
  117. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/compression.mjs +0 -139
  118. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/compression.mjs.map +0 -1
  119. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/constants.mjs +0 -28
  120. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/constants.mjs.map +0 -1
  121. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_data.mjs +0 -117
  122. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_data.mjs.map +0 -1
  123. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_demand/document.mjs +0 -182
  124. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_demand/document.mjs.map +0 -1
  125. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/responses.mjs +0 -304
  126. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/responses.mjs.map +0 -1
  127. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/shared.mjs +0 -34
  128. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/shared.mjs.map +0 -1
  129. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/collection.mjs +0 -739
  130. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/collection.mjs.map +0 -1
  131. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/connection_string.mjs +0 -805
  132. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/connection_string.mjs.map +0 -1
  133. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/constants.mjs +0 -174
  134. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/constants.mjs.map +0 -1
  135. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/abstract_cursor.mjs +0 -726
  136. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/abstract_cursor.mjs.map +0 -1
  137. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/aggregation_cursor.mjs +0 -172
  138. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/aggregation_cursor.mjs.map +0 -1
  139. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/change_stream_cursor.mjs +0 -103
  140. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/change_stream_cursor.mjs.map +0 -1
  141. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/client_bulk_write_cursor.mjs +0 -66
  142. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/client_bulk_write_cursor.mjs.map +0 -1
  143. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/explainable_cursor.mjs +0 -41
  144. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/explainable_cursor.mjs.map +0 -1
  145. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/find_cursor.mjs +0 -365
  146. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/find_cursor.mjs.map +0 -1
  147. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_collections_cursor.mjs +0 -50
  148. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_collections_cursor.mjs.map +0 -1
  149. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_indexes_cursor.mjs +0 -48
  150. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_indexes_cursor.mjs.map +0 -1
  151. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_search_indexes_cursor.mjs +0 -23
  152. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_search_indexes_cursor.mjs.map +0 -1
  153. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/run_command_cursor.mjs +0 -106
  154. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/run_command_cursor.mjs.map +0 -1
  155. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/db.mjs +0 -428
  156. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/db.mjs.map +0 -1
  157. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/deps.mjs +0 -124
  158. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/deps.mjs.map +0 -1
  159. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/encrypter.mjs +0 -95
  160. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/encrypter.mjs.map +0 -1
  161. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/error.mjs +0 -1305
  162. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/error.mjs.map +0 -1
  163. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/explain.mjs +0 -59
  164. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/explain.mjs.map +0 -1
  165. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/download.mjs +0 -250
  166. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/download.mjs.map +0 -1
  167. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/index.mjs +0 -170
  168. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/index.mjs.map +0 -1
  169. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/upload.mjs +0 -315
  170. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/upload.mjs.map +0 -1
  171. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/index.mjs +0 -925
  172. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/index.mjs.map +0 -1
  173. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client.mjs +0 -520
  174. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client.mjs.map +0 -1
  175. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client_auth_providers.mjs +0 -90
  176. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client_auth_providers.mjs.map +0 -1
  177. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_logger.mjs +0 -582
  178. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_logger.mjs.map +0 -1
  179. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_types.mjs +0 -64
  180. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_types.mjs.map +0 -1
  181. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/aggregate.mjs +0 -86
  182. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/aggregate.mjs.map +0 -1
  183. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/client_bulk_write.mjs +0 -60
  184. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/client_bulk_write.mjs.map +0 -1
  185. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/command_builder.mjs +0 -264
  186. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/command_builder.mjs.map +0 -1
  187. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/executor.mjs +0 -109
  188. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/executor.mjs.map +0 -1
  189. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/results_merger.mjs +0 -172
  190. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/results_merger.mjs.map +0 -1
  191. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/command.mjs +0 -68
  192. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/command.mjs.map +0 -1
  193. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/count.mjs +0 -53
  194. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/count.mjs.map +0 -1
  195. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/create_collection.mjs +0 -123
  196. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/create_collection.mjs.map +0 -1
  197. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/delete.mjs +0 -119
  198. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/delete.mjs.map +0 -1
  199. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/distinct.mjs +0 -65
  200. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/distinct.mjs.map +0 -1
  201. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/drop.mjs +0 -97
  202. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/drop.mjs.map +0 -1
  203. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/estimated_document_count.mjs +0 -47
  204. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/estimated_document_count.mjs.map +0 -1
  205. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/execute_operation.mjs +0 -188
  206. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/execute_operation.mjs.map +0 -1
  207. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find.mjs +0 -103
  208. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find.mjs.map +0 -1
  209. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find_and_modify.mjs +0 -136
  210. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find_and_modify.mjs.map +0 -1
  211. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/get_more.mjs +0 -61
  212. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/get_more.mjs.map +0 -1
  213. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/indexes.mjs +0 -179
  214. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/indexes.mjs.map +0 -1
  215. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/insert.mjs +0 -77
  216. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/insert.mjs.map +0 -1
  217. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/kill_cursors.mjs +0 -48
  218. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/kill_cursors.mjs.map +0 -1
  219. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_collections.mjs +0 -60
  220. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_collections.mjs.map +0 -1
  221. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_databases.mjs +0 -43
  222. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_databases.mjs.map +0 -1
  223. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/operation.mjs +0 -105
  224. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/operation.mjs.map +0 -1
  225. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/profiling_level.mjs +0 -50
  226. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/profiling_level.mjs.map +0 -1
  227. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/remove_user.mjs +0 -39
  228. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/remove_user.mjs.map +0 -1
  229. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/rename.mjs +0 -49
  230. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/rename.mjs.map +0 -1
  231. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/run_command.mjs +0 -58
  232. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/run_command.mjs.map +0 -1
  233. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/create.mjs +0 -46
  234. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/create.mjs.map +0 -1
  235. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/drop.mjs +0 -48
  236. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/drop.mjs.map +0 -1
  237. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/update.mjs +0 -46
  238. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/update.mjs.map +0 -1
  239. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/set_profiling_level.mjs +0 -67
  240. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/set_profiling_level.mjs.map +0 -1
  241. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/stats.mjs +0 -37
  242. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/stats.mjs.map +0 -1
  243. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/update.mjs +0 -171
  244. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/update.mjs.map +0 -1
  245. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/validate_collection.mjs +0 -45
  246. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/validate_collection.mjs.map +0 -1
  247. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_concern.mjs +0 -71
  248. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_concern.mjs.map +0 -1
  249. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_preference.mjs +0 -165
  250. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_preference.mjs.map +0 -1
  251. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/resource_management.mjs +0 -62
  252. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/resource_management.mjs.map +0 -1
  253. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/common.mjs +0 -51
  254. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/common.mjs.map +0 -1
  255. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/events.mjs +0 -156
  256. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/events.mjs.map +0 -1
  257. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/monitor.mjs +0 -477
  258. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/monitor.mjs.map +0 -1
  259. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server.mjs +0 -315
  260. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server.mjs.map +0 -1
  261. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_description.mjs +0 -157
  262. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_description.mjs.map +0 -1
  263. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection.mjs +0 -184
  264. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection.mjs.map +0 -1
  265. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection_events.mjs +0 -96
  266. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection_events.mjs.map +0 -1
  267. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/srv_polling.mjs +0 -107
  268. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/srv_polling.mjs.map +0 -1
  269. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology.mjs +0 -540
  270. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology.mjs.map +0 -1
  271. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology_description.mjs +0 -298
  272. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology_description.mjs.map +0 -1
  273. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sessions.mjs +0 -623
  274. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sessions.mjs.map +0 -1
  275. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sort.mjs +0 -91
  276. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sort.mjs.map +0 -1
  277. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/timeout.mjs +0 -254
  278. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/timeout.mjs.map +0 -1
  279. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/transactions.mjs +0 -138
  280. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/transactions.mjs.map +0 -1
  281. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/utils.mjs +0 -993
  282. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/utils.mjs.map +0 -1
  283. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/write_concern.mjs +0 -81
  284. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/write_concern.mjs.map +0 -1
  285. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/package.mjs +0 -171
  286. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/package.mjs.map +0 -1
  287. package/dist/node_modules/.pnpm/punycode@2.3.1/node_modules/punycode/punycode.mjs +0 -295
  288. package/dist/node_modules/.pnpm/punycode@2.3.1/node_modules/punycode/punycode.mjs.map +0 -1
  289. package/dist/node_modules/.pnpm/sparse-bitfield@3.0.3/node_modules/sparse-bitfield/index.mjs +0 -81
  290. package/dist/node_modules/.pnpm/sparse-bitfield@3.0.3/node_modules/sparse-bitfield/index.mjs.map +0 -1
  291. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/index.mjs +0 -206
  292. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/index.mjs.map +0 -1
  293. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/mappingTable.mjs +0 -33590
  294. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/mappingTable.mjs.map +0 -1
  295. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/regexes.mjs +0 -37
  296. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/regexes.mjs.map +0 -1
  297. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/statusMapping.mjs +0 -18
  298. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/statusMapping.mjs.map +0 -1
  299. package/dist/node_modules/.pnpm/webidl-conversions@7.0.0/node_modules/webidl-conversions/lib/index.mjs +0 -252
  300. package/dist/node_modules/.pnpm/webidl-conversions@7.0.0/node_modules/webidl-conversions/lib/index.mjs.map +0 -1
  301. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/index.mjs +0 -41
  302. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/index.mjs.map +0 -1
  303. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/Function.mjs +0 -41
  304. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/Function.mjs.map +0 -1
  305. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL-impl.mjs +0 -173
  306. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL-impl.mjs.map +0 -1
  307. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL.mjs +0 -334
  308. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL.mjs.map +0 -1
  309. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams-impl.mjs +0 -90
  310. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams-impl.mjs.map +0 -1
  311. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams.mjs +0 -356
  312. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams.mjs.map +0 -1
  313. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/encoding.mjs +0 -23
  314. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/encoding.mjs.map +0 -1
  315. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/infra.mjs +0 -29
  316. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/infra.mjs.map +0 -1
  317. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/percent-encoding.mjs +0 -140
  318. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/percent-encoding.mjs.map +0 -1
  319. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/url-state-machine.mjs +0 -831
  320. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/url-state-machine.mjs.map +0 -1
  321. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/urlencoded.mjs +0 -77
  322. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/urlencoded.mjs.map +0 -1
  323. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/utils.mjs +0 -147
  324. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/utils.mjs.map +0 -1
  325. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/webidl2js-wrapper.mjs +0 -17
  326. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/webidl2js-wrapper.mjs.map +0 -1
@@ -1,726 +0,0 @@
1
- import { __commonJSMin, __require } 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_utils } from "../utils.mjs";
7
- import { require_timeout } from "../timeout.mjs";
8
- import { require_execute_operation } from "../operations/execute_operation.mjs";
9
- import { require_mongo_types } from "../mongo_types.mjs";
10
- import { require_get_more } from "../operations/get_more.mjs";
11
- import { require_kill_cursors } from "../operations/kill_cursors.mjs";
12
- import { require_sessions } from "../sessions.mjs";
13
- import { require_resource_management } from "../resource_management.mjs";
14
-
15
- //#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/abstract_cursor.js
16
- var require_abstract_cursor = /* @__PURE__ */ __commonJSMin(((exports) => {
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.CursorTimeoutContext = exports.AbstractCursor = exports.CursorTimeoutMode = exports.CURSOR_FLAGS = void 0;
19
- const stream_1 = __require("stream");
20
- const bson_1 = require_bson();
21
- const error_1 = require_error();
22
- const mongo_types_1 = require_mongo_types();
23
- const execute_operation_1 = require_execute_operation();
24
- const get_more_1 = require_get_more();
25
- const kill_cursors_1 = require_kill_cursors();
26
- const read_concern_1 = require_read_concern();
27
- const read_preference_1 = require_read_preference();
28
- const resource_management_1 = require_resource_management();
29
- const sessions_1 = require_sessions();
30
- const timeout_1 = require_timeout();
31
- const utils_1 = require_utils();
32
- /** @public */
33
- exports.CURSOR_FLAGS = [
34
- "tailable",
35
- "oplogReplay",
36
- "noCursorTimeout",
37
- "awaitData",
38
- "exhaust",
39
- "partial"
40
- ];
41
- function removeActiveCursor() {
42
- this.client.s.activeCursors.delete(this);
43
- }
44
- /**
45
- * @public
46
- * @experimental
47
- * Specifies how `timeoutMS` is applied to the cursor. Can be either `'cursorLifeTime'` or `'iteration'`
48
- * When set to `'iteration'`, the deadline specified by `timeoutMS` applies to each call of
49
- * `cursor.next()`.
50
- * When set to `'cursorLifetime'`, the deadline applies to the life of the entire cursor.
51
- *
52
- * Depending on the type of cursor being used, this option has different default values.
53
- * For non-tailable cursors, this value defaults to `'cursorLifetime'`
54
- * For tailable cursors, this value defaults to `'iteration'` since tailable cursors, by
55
- * definition can have an arbitrarily long lifetime.
56
- *
57
- * @example
58
- * ```ts
59
- * const cursor = collection.find({}, {timeoutMS: 100, timeoutMode: 'iteration'});
60
- * for await (const doc of cursor) {
61
- * // process doc
62
- * // This will throw a timeout error if any of the iterator's `next()` calls takes more than 100ms, but
63
- * // will continue to iterate successfully otherwise, regardless of the number of batches.
64
- * }
65
- * ```
66
- *
67
- * @example
68
- * ```ts
69
- * const cursor = collection.find({}, { timeoutMS: 1000, timeoutMode: 'cursorLifetime' });
70
- * const docs = await cursor.toArray(); // This entire line will throw a timeout error if all batches are not fetched and returned within 1000ms.
71
- * ```
72
- */
73
- exports.CursorTimeoutMode = Object.freeze({
74
- ITERATION: "iteration",
75
- LIFETIME: "cursorLifetime"
76
- });
77
- /** @public */
78
- var AbstractCursor = class extends mongo_types_1.TypedEventEmitter {
79
- /** @internal */
80
- constructor(client, namespace, options = {}) {
81
- super();
82
- /** @internal */
83
- this.documents = null;
84
- /** @internal */
85
- this.hasEmittedClose = false;
86
- this.on("error", utils_1.noop);
87
- if (!client.s.isMongoClient) throw new error_1.MongoRuntimeError("Cursor must be constructed with MongoClient");
88
- this.cursorClient = client;
89
- this.cursorNamespace = namespace;
90
- this.cursorId = null;
91
- this.initialized = false;
92
- this.isClosed = false;
93
- this.isKilled = false;
94
- this.cursorOptions = {
95
- readPreference: options.readPreference && options.readPreference instanceof read_preference_1.ReadPreference ? options.readPreference : read_preference_1.ReadPreference.primary,
96
- ...(0, bson_1.pluckBSONSerializeOptions)(options),
97
- timeoutMS: options?.timeoutContext?.csotEnabled() ? options.timeoutContext.timeoutMS : options.timeoutMS,
98
- tailable: options.tailable,
99
- awaitData: options.awaitData
100
- };
101
- if (this.cursorOptions.timeoutMS != null) if (options.timeoutMode == null) if (options.tailable) {
102
- if (options.awaitData) {
103
- if (options.maxAwaitTimeMS != null && options.maxAwaitTimeMS >= this.cursorOptions.timeoutMS) throw new error_1.MongoInvalidArgumentError("Cannot specify maxAwaitTimeMS >= timeoutMS for a tailable awaitData cursor");
104
- }
105
- this.cursorOptions.timeoutMode = exports.CursorTimeoutMode.ITERATION;
106
- } else this.cursorOptions.timeoutMode = exports.CursorTimeoutMode.LIFETIME;
107
- else {
108
- if (options.tailable && options.timeoutMode === exports.CursorTimeoutMode.LIFETIME) throw new error_1.MongoInvalidArgumentError("Cannot set tailable cursor's timeoutMode to LIFETIME");
109
- this.cursorOptions.timeoutMode = options.timeoutMode;
110
- }
111
- else if (options.timeoutMode != null) throw new error_1.MongoInvalidArgumentError("Cannot set timeoutMode without setting timeoutMS");
112
- this.cursorOptions.omitMaxTimeMS = this.cursorOptions.timeoutMS != null && (this.cursorOptions.timeoutMode === exports.CursorTimeoutMode.ITERATION && !this.cursorOptions.tailable || this.cursorOptions.tailable && !this.cursorOptions.awaitData);
113
- const readConcern = read_concern_1.ReadConcern.fromOptions(options);
114
- if (readConcern) this.cursorOptions.readConcern = readConcern;
115
- if (typeof options.batchSize === "number") this.cursorOptions.batchSize = options.batchSize;
116
- if (options.comment !== void 0) this.cursorOptions.comment = options.comment;
117
- if (typeof options.maxTimeMS === "number") this.cursorOptions.maxTimeMS = options.maxTimeMS;
118
- if (typeof options.maxAwaitTimeMS === "number") this.cursorOptions.maxAwaitTimeMS = options.maxAwaitTimeMS;
119
- this.cursorSession = options.session ?? null;
120
- this.deserializationOptions = {
121
- ...this.cursorOptions,
122
- validation: { utf8: options?.enableUtf8Validation === false ? false : true }
123
- };
124
- this.timeoutContext = options.timeoutContext;
125
- this.signal = options.signal;
126
- this.abortListener = (0, utils_1.addAbortListener)(this.signal, () => void this.close().then(void 0, utils_1.squashError));
127
- this.trackCursor();
128
- }
129
- /**
130
- * The cursor has no id until it receives a response from the initial cursor creating command.
131
- *
132
- * It is non-zero for as long as the database has an open cursor.
133
- *
134
- * The initiating command may receive a zero id if the entire result is in the `firstBatch`.
135
- */
136
- get id() {
137
- return this.cursorId ?? void 0;
138
- }
139
- /** @internal */
140
- get isDead() {
141
- return (this.cursorId?.isZero() ?? false) || this.isClosed || this.isKilled;
142
- }
143
- /** @internal */
144
- get client() {
145
- return this.cursorClient;
146
- }
147
- /** @internal */
148
- get server() {
149
- return this.selectedServer;
150
- }
151
- get namespace() {
152
- return this.cursorNamespace;
153
- }
154
- get readPreference() {
155
- return this.cursorOptions.readPreference;
156
- }
157
- get readConcern() {
158
- return this.cursorOptions.readConcern;
159
- }
160
- /** @internal */
161
- get session() {
162
- return this.cursorSession;
163
- }
164
- set session(clientSession) {
165
- this.cursorSession = clientSession;
166
- }
167
- /**
168
- * The cursor is closed and all remaining locally buffered documents have been iterated.
169
- */
170
- get closed() {
171
- return this.isClosed && (this.documents?.length ?? 0) === 0;
172
- }
173
- /**
174
- * A `killCursors` command was attempted on this cursor.
175
- * This is performed if the cursor id is non zero.
176
- */
177
- get killed() {
178
- return this.isKilled;
179
- }
180
- get loadBalanced() {
181
- return !!this.cursorClient.topology?.loadBalanced;
182
- }
183
- /** @internal */
184
- async asyncDispose() {
185
- await this.close();
186
- }
187
- /** Adds cursor to client's tracking so it will be closed by MongoClient.close() */
188
- trackCursor() {
189
- this.cursorClient.s.activeCursors.add(this);
190
- if (!this.listeners("close").includes(removeActiveCursor)) this.once("close", removeActiveCursor);
191
- }
192
- /** Returns current buffered documents length */
193
- bufferedCount() {
194
- return this.documents?.length ?? 0;
195
- }
196
- /** Returns current buffered documents */
197
- readBufferedDocuments(number) {
198
- const bufferedDocs = [];
199
- const documentsToRead = Math.min(number ?? this.documents?.length ?? 0, this.documents?.length ?? 0);
200
- for (let count = 0; count < documentsToRead; count++) {
201
- const document = this.documents?.shift(this.deserializationOptions);
202
- if (document != null) bufferedDocs.push(document);
203
- }
204
- return bufferedDocs;
205
- }
206
- async *[Symbol.asyncIterator]() {
207
- this.signal?.throwIfAborted();
208
- if (this.closed) return;
209
- try {
210
- while (true) {
211
- if (this.isKilled) return;
212
- if (this.closed) return;
213
- if (this.cursorId != null && this.isDead && (this.documents?.length ?? 0) === 0) return;
214
- const document = await this.next();
215
- if (document === null) return;
216
- yield document;
217
- this.signal?.throwIfAborted();
218
- }
219
- } finally {
220
- if (!this.isClosed) try {
221
- await this.close();
222
- } catch (error) {
223
- (0, utils_1.squashError)(error);
224
- }
225
- }
226
- }
227
- stream(options) {
228
- const readable = new ReadableCursorStream(this);
229
- const abortListener = (0, utils_1.addAbortListener)(this.signal, function() {
230
- readable.destroy(this.reason);
231
- });
232
- readable.once("end", () => {
233
- abortListener?.[utils_1.kDispose]();
234
- });
235
- if (options?.transform) {
236
- const transform = options.transform;
237
- const transformedStream = readable.pipe(new stream_1.Transform({
238
- objectMode: true,
239
- highWaterMark: 1,
240
- transform(chunk, _, callback) {
241
- try {
242
- callback(void 0, transform(chunk));
243
- } catch (err) {
244
- callback(err);
245
- }
246
- }
247
- }));
248
- readable.on("error", (err) => transformedStream.emit("error", err));
249
- return transformedStream;
250
- }
251
- return readable;
252
- }
253
- async hasNext() {
254
- this.signal?.throwIfAborted();
255
- if (this.cursorId === bson_1.Long.ZERO) return false;
256
- if (this.cursorOptions.timeoutMode === exports.CursorTimeoutMode.ITERATION && this.cursorId != null) this.timeoutContext?.refresh();
257
- try {
258
- do {
259
- if ((this.documents?.length ?? 0) !== 0) return true;
260
- await this.fetchBatch();
261
- } while (!this.isDead || (this.documents?.length ?? 0) !== 0);
262
- } finally {
263
- if (this.cursorOptions.timeoutMode === exports.CursorTimeoutMode.ITERATION) this.timeoutContext?.clear();
264
- }
265
- return false;
266
- }
267
- /** Get the next available document from the cursor, returns null if no more documents are available. */
268
- async next() {
269
- this.signal?.throwIfAborted();
270
- if (this.cursorId === bson_1.Long.ZERO) throw new error_1.MongoCursorExhaustedError();
271
- if (this.cursorOptions.timeoutMode === exports.CursorTimeoutMode.ITERATION && this.cursorId != null) this.timeoutContext?.refresh();
272
- try {
273
- do {
274
- const doc = this.documents?.shift(this.deserializationOptions);
275
- if (doc != null) {
276
- if (this.transform != null) return await this.transformDocument(doc);
277
- return doc;
278
- }
279
- await this.fetchBatch();
280
- } while (!this.isDead || (this.documents?.length ?? 0) !== 0);
281
- } finally {
282
- if (this.cursorOptions.timeoutMode === exports.CursorTimeoutMode.ITERATION) this.timeoutContext?.clear();
283
- }
284
- return null;
285
- }
286
- /**
287
- * Try to get the next available document from the cursor or `null` if an empty batch is returned
288
- */
289
- async tryNext() {
290
- this.signal?.throwIfAborted();
291
- if (this.cursorId === bson_1.Long.ZERO) throw new error_1.MongoCursorExhaustedError();
292
- if (this.cursorOptions.timeoutMode === exports.CursorTimeoutMode.ITERATION && this.cursorId != null) this.timeoutContext?.refresh();
293
- try {
294
- let doc = this.documents?.shift(this.deserializationOptions);
295
- if (doc != null) {
296
- if (this.transform != null) return await this.transformDocument(doc);
297
- return doc;
298
- }
299
- await this.fetchBatch();
300
- doc = this.documents?.shift(this.deserializationOptions);
301
- if (doc != null) {
302
- if (this.transform != null) return await this.transformDocument(doc);
303
- return doc;
304
- }
305
- } finally {
306
- if (this.cursorOptions.timeoutMode === exports.CursorTimeoutMode.ITERATION) this.timeoutContext?.clear();
307
- }
308
- return null;
309
- }
310
- /**
311
- * Iterates over all the documents for this cursor using the iterator, callback pattern.
312
- *
313
- * If the iterator returns `false`, iteration will stop.
314
- *
315
- * @param iterator - The iteration callback.
316
- * @deprecated - Will be removed in a future release. Use for await...of instead.
317
- */
318
- async forEach(iterator) {
319
- this.signal?.throwIfAborted();
320
- if (typeof iterator !== "function") throw new error_1.MongoInvalidArgumentError("Argument \"iterator\" must be a function");
321
- for await (const document of this) if (iterator(document) === false) break;
322
- }
323
- /**
324
- * Frees any client-side resources used by the cursor.
325
- */
326
- async close(options) {
327
- await this.cleanup(options?.timeoutMS);
328
- }
329
- /**
330
- * Returns an array of documents. The caller is responsible for making sure that there
331
- * is enough memory to store the results. Note that the array only contains partial
332
- * results when this cursor had been previously accessed. In that case,
333
- * cursor.rewind() can be used to reset the cursor.
334
- */
335
- async toArray() {
336
- this.signal?.throwIfAborted();
337
- const array = [];
338
- for await (const document of this) {
339
- array.push(document);
340
- const docs = this.readBufferedDocuments();
341
- if (this.transform != null) for (const doc of docs) array.push(await this.transformDocument(doc));
342
- else array.push(...docs);
343
- }
344
- return array;
345
- }
346
- /**
347
- * Add a cursor flag to the cursor
348
- *
349
- * @param flag - The flag to set, must be one of following ['tailable', 'oplogReplay', 'noCursorTimeout', 'awaitData', 'partial' -.
350
- * @param value - The flag boolean value.
351
- */
352
- addCursorFlag(flag, value) {
353
- this.throwIfInitialized();
354
- if (!exports.CURSOR_FLAGS.includes(flag)) throw new error_1.MongoInvalidArgumentError(`Flag ${flag} is not one of ${exports.CURSOR_FLAGS}`);
355
- if (typeof value !== "boolean") throw new error_1.MongoInvalidArgumentError(`Flag ${flag} must be a boolean value`);
356
- this.cursorOptions[flag] = value;
357
- return this;
358
- }
359
- /**
360
- * Map all documents using the provided function
361
- * If there is a transform set on the cursor, that will be called first and the result passed to
362
- * this function's transform.
363
- *
364
- * @remarks
365
- *
366
- * **Note** Cursors use `null` internally to indicate that there are no more documents in the cursor. Providing a mapping
367
- * function that maps values to `null` will result in the cursor closing itself before it has finished iterating
368
- * all documents. This will **not** result in a memory leak, just surprising behavior. For example:
369
- *
370
- * ```typescript
371
- * const cursor = collection.find({});
372
- * cursor.map(() => null);
373
- *
374
- * const documents = await cursor.toArray();
375
- * // documents is always [], regardless of how many documents are in the collection.
376
- * ```
377
- *
378
- * Other falsey values are allowed:
379
- *
380
- * ```typescript
381
- * const cursor = collection.find({});
382
- * cursor.map(() => '');
383
- *
384
- * const documents = await cursor.toArray();
385
- * // documents is now an array of empty strings
386
- * ```
387
- *
388
- * **Note for Typescript Users:** adding a transform changes the return type of the iteration of this cursor,
389
- * it **does not** return a new instance of a cursor. This means when calling map,
390
- * you should always assign the result to a new variable in order to get a correctly typed cursor variable.
391
- * Take note of the following example:
392
- *
393
- * @example
394
- * ```typescript
395
- * const cursor: FindCursor<Document> = coll.find();
396
- * const mappedCursor: FindCursor<number> = cursor.map(doc => Object.keys(doc).length);
397
- * const keyCounts: number[] = await mappedCursor.toArray(); // cursor.toArray() still returns Document[]
398
- * ```
399
- * @param transform - The mapping transformation method.
400
- */
401
- map(transform) {
402
- this.throwIfInitialized();
403
- const oldTransform = this.transform;
404
- if (oldTransform) this.transform = (doc) => {
405
- return transform(oldTransform(doc));
406
- };
407
- else this.transform = transform;
408
- return this;
409
- }
410
- /**
411
- * Set the ReadPreference for the cursor.
412
- *
413
- * @param readPreference - The new read preference for the cursor.
414
- */
415
- withReadPreference(readPreference) {
416
- this.throwIfInitialized();
417
- if (readPreference instanceof read_preference_1.ReadPreference) this.cursorOptions.readPreference = readPreference;
418
- else if (typeof readPreference === "string") this.cursorOptions.readPreference = read_preference_1.ReadPreference.fromString(readPreference);
419
- else throw new error_1.MongoInvalidArgumentError(`Invalid read preference: ${readPreference}`);
420
- return this;
421
- }
422
- /**
423
- * Set the ReadPreference for the cursor.
424
- *
425
- * @param readPreference - The new read preference for the cursor.
426
- */
427
- withReadConcern(readConcern) {
428
- this.throwIfInitialized();
429
- const resolvedReadConcern = read_concern_1.ReadConcern.fromOptions({ readConcern });
430
- if (resolvedReadConcern) this.cursorOptions.readConcern = resolvedReadConcern;
431
- return this;
432
- }
433
- /**
434
- * Set a maxTimeMS on the cursor query, allowing for hard timeout limits on queries (Only supported on MongoDB 2.6 or higher)
435
- *
436
- * @param value - Number of milliseconds to wait before aborting the query.
437
- */
438
- maxTimeMS(value) {
439
- this.throwIfInitialized();
440
- if (typeof value !== "number") throw new error_1.MongoInvalidArgumentError("Argument for maxTimeMS must be a number");
441
- this.cursorOptions.maxTimeMS = value;
442
- return this;
443
- }
444
- /**
445
- * Set the batch size for the cursor.
446
- *
447
- * @param value - The number of documents to return per batch. See {@link https://www.mongodb.com/docs/manual/reference/command/find/|find command documentation}.
448
- */
449
- batchSize(value) {
450
- this.throwIfInitialized();
451
- if (this.cursorOptions.tailable) throw new error_1.MongoTailableCursorError("Tailable cursor does not support batchSize");
452
- if (typeof value !== "number") throw new error_1.MongoInvalidArgumentError("Operation \"batchSize\" requires an integer");
453
- this.cursorOptions.batchSize = value;
454
- return this;
455
- }
456
- /**
457
- * Rewind this cursor to its uninitialized state. Any options that are present on the cursor will
458
- * remain in effect. Iterating this cursor will cause new queries to be sent to the server, even
459
- * if the resultant data has already been retrieved by this cursor.
460
- */
461
- rewind() {
462
- if (this.timeoutContext && this.timeoutContext.owner !== this) throw new error_1.MongoAPIError(`Cannot rewind cursor that does not own its timeout context.`);
463
- if (!this.initialized) return;
464
- this.cursorId = null;
465
- this.documents?.clear();
466
- this.timeoutContext?.clear();
467
- this.timeoutContext = void 0;
468
- this.isClosed = false;
469
- this.isKilled = false;
470
- this.initialized = false;
471
- this.hasEmittedClose = false;
472
- this.trackCursor();
473
- if (this.cursorSession?.explicit === false) {
474
- if (!this.cursorSession.hasEnded) this.cursorSession.endSession().then(void 0, utils_1.squashError);
475
- this.cursorSession = null;
476
- }
477
- }
478
- /** @internal */
479
- async getMore(batchSize) {
480
- if (this.cursorId == null) throw new error_1.MongoRuntimeError("Unexpected null cursor id. A cursor creating command should have set this");
481
- if (this.selectedServer == null) throw new error_1.MongoRuntimeError("Unexpected null selectedServer. A cursor creating command should have set this");
482
- if (this.cursorSession == null) throw new error_1.MongoRuntimeError("Unexpected null session. A cursor creating command should have set this");
483
- const getMoreOptions = {
484
- ...this.cursorOptions,
485
- session: this.cursorSession,
486
- batchSize
487
- };
488
- const getMoreOperation = new get_more_1.GetMoreOperation(this.cursorNamespace, this.cursorId, this.selectedServer, getMoreOptions);
489
- return await (0, execute_operation_1.executeOperation)(this.cursorClient, getMoreOperation, this.timeoutContext);
490
- }
491
- /**
492
- * @internal
493
- *
494
- * This function is exposed for the unified test runner's createChangeStream
495
- * operation. We cannot refactor to use the abstract _initialize method without
496
- * a significant refactor.
497
- */
498
- async cursorInit() {
499
- if (this.cursorOptions.timeoutMS != null) this.timeoutContext ??= new CursorTimeoutContext(timeout_1.TimeoutContext.create({
500
- serverSelectionTimeoutMS: this.client.s.options.serverSelectionTimeoutMS,
501
- timeoutMS: this.cursorOptions.timeoutMS
502
- }), this);
503
- try {
504
- this.cursorSession ??= this.cursorClient.startSession({
505
- owner: this,
506
- explicit: false
507
- });
508
- const state = await this._initialize(this.cursorSession);
509
- this.cursorOptions.omitMaxTimeMS = this.cursorOptions.timeoutMS != null;
510
- const response = state.response;
511
- this.selectedServer = state.server;
512
- this.cursorId = response.id;
513
- this.cursorNamespace = response.ns ?? this.namespace;
514
- this.documents = response;
515
- this.initialized = true;
516
- } catch (error) {
517
- this.initialized = true;
518
- await this.cleanup(void 0, error);
519
- throw error;
520
- }
521
- if (this.isDead) await this.cleanup();
522
- }
523
- /** @internal Attempt to obtain more documents */
524
- async fetchBatch() {
525
- if (this.isClosed) return;
526
- if (this.isDead) {
527
- await this.cleanup();
528
- return;
529
- }
530
- if (this.cursorId == null) {
531
- await this.cursorInit();
532
- if ((this.documents?.length ?? 0) !== 0 || this.isDead) return;
533
- }
534
- const batchSize = this.cursorOptions.batchSize || 1e3;
535
- try {
536
- const response = await this.getMore(batchSize);
537
- this.cursorId = response.id;
538
- this.documents = response;
539
- } catch (error) {
540
- try {
541
- await this.cleanup(void 0, error);
542
- } catch (cleanupError) {
543
- (0, utils_1.squashError)(cleanupError);
544
- }
545
- throw error;
546
- }
547
- if (this.isDead) await this.cleanup();
548
- }
549
- /** @internal */
550
- async cleanup(timeoutMS, error) {
551
- this.abortListener?.[utils_1.kDispose]();
552
- this.isClosed = true;
553
- const timeoutContextForKillCursors = () => {
554
- if (timeoutMS != null) {
555
- this.timeoutContext?.clear();
556
- return new CursorTimeoutContext(timeout_1.TimeoutContext.create({
557
- serverSelectionTimeoutMS: this.client.s.options.serverSelectionTimeoutMS,
558
- timeoutMS
559
- }), this);
560
- } else return this.timeoutContext?.refreshed();
561
- };
562
- const withEmitClose = async (fn) => {
563
- try {
564
- await fn();
565
- } finally {
566
- this.emitClose();
567
- }
568
- };
569
- const close = async () => {
570
- const session = this.cursorSession;
571
- if (!session) return;
572
- try {
573
- if (!this.isKilled && this.cursorId && !this.cursorId.isZero() && this.cursorNamespace && this.selectedServer && !session.hasEnded) {
574
- this.isKilled = true;
575
- const cursorId = this.cursorId;
576
- this.cursorId = bson_1.Long.ZERO;
577
- await (0, execute_operation_1.executeOperation)(this.cursorClient, new kill_cursors_1.KillCursorsOperation(cursorId, this.cursorNamespace, this.selectedServer, { session }), timeoutContextForKillCursors());
578
- }
579
- } catch (error$1) {
580
- (0, utils_1.squashError)(error$1);
581
- } finally {
582
- if (session.owner === this) await session.endSession({ error });
583
- if (!session.inTransaction()) (0, sessions_1.maybeClearPinnedConnection)(session, { error });
584
- }
585
- };
586
- await withEmitClose(close);
587
- }
588
- /** @internal */
589
- emitClose() {
590
- try {
591
- if (!this.hasEmittedClose && ((this.documents?.length ?? 0) === 0 || this.isClosed)) this.emit("close");
592
- } finally {
593
- this.hasEmittedClose = true;
594
- }
595
- }
596
- /** @internal */
597
- async transformDocument(document) {
598
- if (this.transform == null) return document;
599
- try {
600
- const transformedDocument = this.transform(document);
601
- if (transformedDocument === null) throw new error_1.MongoAPIError("Cursor returned a `null` document, but the cursor is not exhausted. Mapping documents to `null` is not supported in the cursor transform.");
602
- return transformedDocument;
603
- } catch (transformError) {
604
- try {
605
- await this.close();
606
- } catch (closeError) {
607
- (0, utils_1.squashError)(closeError);
608
- }
609
- throw transformError;
610
- }
611
- }
612
- /** @internal */
613
- throwIfInitialized() {
614
- if (this.initialized) throw new error_1.MongoCursorInUseError();
615
- }
616
- };
617
- exports.AbstractCursor = AbstractCursor;
618
- /** @event */
619
- AbstractCursor.CLOSE = "close";
620
- var ReadableCursorStream = class extends stream_1.Readable {
621
- constructor(cursor) {
622
- super({
623
- objectMode: true,
624
- autoDestroy: false,
625
- highWaterMark: 1
626
- });
627
- this._readInProgress = false;
628
- this._cursor = cursor;
629
- }
630
- _read(size) {
631
- if (!this._readInProgress) {
632
- this._readInProgress = true;
633
- this._readNext();
634
- }
635
- }
636
- _destroy(error, callback) {
637
- this._cursor.close().then(() => callback(error), (closeError) => callback(closeError));
638
- }
639
- _readNext() {
640
- if (this._cursor.id === bson_1.Long.ZERO) {
641
- this.push(null);
642
- return;
643
- }
644
- this._cursor.next().then((result) => {
645
- if (result == null) this.push(null);
646
- else if (this.destroyed) this._cursor.close().then(void 0, utils_1.squashError);
647
- else {
648
- if (this.push(result)) return this._readNext();
649
- this._readInProgress = false;
650
- }
651
- }, (err) => {
652
- if (err.message.match(/server is closed/)) {
653
- this._cursor.close().then(void 0, utils_1.squashError);
654
- return this.push(null);
655
- }
656
- if (err.message.match(/operation was interrupted/)) return this.push(null);
657
- return this.destroy(err);
658
- }).catch((error) => {
659
- this._readInProgress = false;
660
- this.destroy(error);
661
- });
662
- }
663
- };
664
- (0, resource_management_1.configureResourceManagement)(AbstractCursor.prototype);
665
- /**
666
- * @internal
667
- * The cursor timeout context is a wrapper around a timeout context
668
- * that keeps track of the "owner" of the cursor. For timeout contexts
669
- * instantiated inside a cursor, the owner will be the cursor.
670
- *
671
- * All timeout behavior is exactly the same as the wrapped timeout context's.
672
- */
673
- var CursorTimeoutContext = class CursorTimeoutContext extends timeout_1.TimeoutContext {
674
- constructor(timeoutContext, owner) {
675
- super();
676
- this.timeoutContext = timeoutContext;
677
- this.owner = owner;
678
- }
679
- get serverSelectionTimeout() {
680
- return this.timeoutContext.serverSelectionTimeout;
681
- }
682
- get connectionCheckoutTimeout() {
683
- return this.timeoutContext.connectionCheckoutTimeout;
684
- }
685
- get clearServerSelectionTimeout() {
686
- return this.timeoutContext.clearServerSelectionTimeout;
687
- }
688
- get timeoutForSocketWrite() {
689
- return this.timeoutContext.timeoutForSocketWrite;
690
- }
691
- get timeoutForSocketRead() {
692
- return this.timeoutContext.timeoutForSocketRead;
693
- }
694
- csotEnabled() {
695
- return this.timeoutContext.csotEnabled();
696
- }
697
- refresh() {
698
- if (typeof this.owner !== "symbol") return this.timeoutContext.refresh();
699
- }
700
- clear() {
701
- if (typeof this.owner !== "symbol") return this.timeoutContext.clear();
702
- }
703
- get maxTimeMS() {
704
- return this.timeoutContext.maxTimeMS;
705
- }
706
- get timeoutMS() {
707
- return this.timeoutContext.csotEnabled() ? this.timeoutContext.timeoutMS : null;
708
- }
709
- refreshed() {
710
- return new CursorTimeoutContext(this.timeoutContext.refreshed(), this.owner);
711
- }
712
- addMaxTimeMSToCommand(command, options) {
713
- this.timeoutContext.addMaxTimeMSToCommand(command, options);
714
- }
715
- getSocketTimeoutMS() {
716
- return this.timeoutContext.getSocketTimeoutMS();
717
- }
718
- };
719
- exports.CursorTimeoutContext = CursorTimeoutContext;
720
- }));
721
-
722
- //#endregion
723
- export default require_abstract_cursor();
724
-
725
- export { require_abstract_cursor };
726
- //# sourceMappingURL=abstract_cursor.mjs.map