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 +0,0 @@
1
- {"version":3,"file":"abstract_cursor.mjs","names":["error"],"sources":["../../../../../../../../../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/abstract_cursor.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CursorTimeoutContext = exports.AbstractCursor = exports.CursorTimeoutMode = exports.CURSOR_FLAGS = void 0;\nconst stream_1 = require(\"stream\");\nconst bson_1 = require(\"../bson\");\nconst error_1 = require(\"../error\");\nconst mongo_types_1 = require(\"../mongo_types\");\nconst execute_operation_1 = require(\"../operations/execute_operation\");\nconst get_more_1 = require(\"../operations/get_more\");\nconst kill_cursors_1 = require(\"../operations/kill_cursors\");\nconst read_concern_1 = require(\"../read_concern\");\nconst read_preference_1 = require(\"../read_preference\");\nconst resource_management_1 = require(\"../resource_management\");\nconst sessions_1 = require(\"../sessions\");\nconst timeout_1 = require(\"../timeout\");\nconst utils_1 = require(\"../utils\");\n/** @public */\nexports.CURSOR_FLAGS = [\n 'tailable',\n 'oplogReplay',\n 'noCursorTimeout',\n 'awaitData',\n 'exhaust',\n 'partial'\n];\nfunction removeActiveCursor() {\n this.client.s.activeCursors.delete(this);\n}\n/**\n * @public\n * @experimental\n * Specifies how `timeoutMS` is applied to the cursor. Can be either `'cursorLifeTime'` or `'iteration'`\n * When set to `'iteration'`, the deadline specified by `timeoutMS` applies to each call of\n * `cursor.next()`.\n * When set to `'cursorLifetime'`, the deadline applies to the life of the entire cursor.\n *\n * Depending on the type of cursor being used, this option has different default values.\n * For non-tailable cursors, this value defaults to `'cursorLifetime'`\n * For tailable cursors, this value defaults to `'iteration'` since tailable cursors, by\n * definition can have an arbitrarily long lifetime.\n *\n * @example\n * ```ts\n * const cursor = collection.find({}, {timeoutMS: 100, timeoutMode: 'iteration'});\n * for await (const doc of cursor) {\n * // process doc\n * // This will throw a timeout error if any of the iterator's `next()` calls takes more than 100ms, but\n * // will continue to iterate successfully otherwise, regardless of the number of batches.\n * }\n * ```\n *\n * @example\n * ```ts\n * const cursor = collection.find({}, { timeoutMS: 1000, timeoutMode: 'cursorLifetime' });\n * const docs = await cursor.toArray(); // This entire line will throw a timeout error if all batches are not fetched and returned within 1000ms.\n * ```\n */\nexports.CursorTimeoutMode = Object.freeze({\n ITERATION: 'iteration',\n LIFETIME: 'cursorLifetime'\n});\n/** @public */\nclass AbstractCursor extends mongo_types_1.TypedEventEmitter {\n /** @internal */\n constructor(client, namespace, options = {}) {\n super();\n /** @internal */\n this.documents = null;\n /** @internal */\n this.hasEmittedClose = false;\n this.on('error', utils_1.noop);\n if (!client.s.isMongoClient) {\n throw new error_1.MongoRuntimeError('Cursor must be constructed with MongoClient');\n }\n this.cursorClient = client;\n this.cursorNamespace = namespace;\n this.cursorId = null;\n this.initialized = false;\n this.isClosed = false;\n this.isKilled = false;\n this.cursorOptions = {\n readPreference: options.readPreference && options.readPreference instanceof read_preference_1.ReadPreference\n ? options.readPreference\n : read_preference_1.ReadPreference.primary,\n ...(0, bson_1.pluckBSONSerializeOptions)(options),\n timeoutMS: options?.timeoutContext?.csotEnabled()\n ? options.timeoutContext.timeoutMS\n : options.timeoutMS,\n tailable: options.tailable,\n awaitData: options.awaitData\n };\n if (this.cursorOptions.timeoutMS != null) {\n if (options.timeoutMode == null) {\n if (options.tailable) {\n if (options.awaitData) {\n if (options.maxAwaitTimeMS != null &&\n options.maxAwaitTimeMS >= this.cursorOptions.timeoutMS)\n throw new error_1.MongoInvalidArgumentError('Cannot specify maxAwaitTimeMS >= timeoutMS for a tailable awaitData cursor');\n }\n this.cursorOptions.timeoutMode = exports.CursorTimeoutMode.ITERATION;\n }\n else {\n this.cursorOptions.timeoutMode = exports.CursorTimeoutMode.LIFETIME;\n }\n }\n else {\n if (options.tailable && options.timeoutMode === exports.CursorTimeoutMode.LIFETIME) {\n throw new error_1.MongoInvalidArgumentError(\"Cannot set tailable cursor's timeoutMode to LIFETIME\");\n }\n this.cursorOptions.timeoutMode = options.timeoutMode;\n }\n }\n else {\n if (options.timeoutMode != null)\n throw new error_1.MongoInvalidArgumentError('Cannot set timeoutMode without setting timeoutMS');\n }\n // Set for initial command\n this.cursorOptions.omitMaxTimeMS =\n this.cursorOptions.timeoutMS != null &&\n ((this.cursorOptions.timeoutMode === exports.CursorTimeoutMode.ITERATION &&\n !this.cursorOptions.tailable) ||\n (this.cursorOptions.tailable && !this.cursorOptions.awaitData));\n const readConcern = read_concern_1.ReadConcern.fromOptions(options);\n if (readConcern) {\n this.cursorOptions.readConcern = readConcern;\n }\n if (typeof options.batchSize === 'number') {\n this.cursorOptions.batchSize = options.batchSize;\n }\n // we check for undefined specifically here to allow falsy values\n // eslint-disable-next-line no-restricted-syntax\n if (options.comment !== undefined) {\n this.cursorOptions.comment = options.comment;\n }\n if (typeof options.maxTimeMS === 'number') {\n this.cursorOptions.maxTimeMS = options.maxTimeMS;\n }\n if (typeof options.maxAwaitTimeMS === 'number') {\n this.cursorOptions.maxAwaitTimeMS = options.maxAwaitTimeMS;\n }\n this.cursorSession = options.session ?? null;\n this.deserializationOptions = {\n ...this.cursorOptions,\n validation: {\n utf8: options?.enableUtf8Validation === false ? false : true\n }\n };\n this.timeoutContext = options.timeoutContext;\n this.signal = options.signal;\n this.abortListener = (0, utils_1.addAbortListener)(this.signal, () => void this.close().then(undefined, utils_1.squashError));\n this.trackCursor();\n }\n /**\n * The cursor has no id until it receives a response from the initial cursor creating command.\n *\n * It is non-zero for as long as the database has an open cursor.\n *\n * The initiating command may receive a zero id if the entire result is in the `firstBatch`.\n */\n get id() {\n return this.cursorId ?? undefined;\n }\n /** @internal */\n get isDead() {\n return (this.cursorId?.isZero() ?? false) || this.isClosed || this.isKilled;\n }\n /** @internal */\n get client() {\n return this.cursorClient;\n }\n /** @internal */\n get server() {\n return this.selectedServer;\n }\n get namespace() {\n return this.cursorNamespace;\n }\n get readPreference() {\n return this.cursorOptions.readPreference;\n }\n get readConcern() {\n return this.cursorOptions.readConcern;\n }\n /** @internal */\n get session() {\n return this.cursorSession;\n }\n set session(clientSession) {\n this.cursorSession = clientSession;\n }\n /**\n * The cursor is closed and all remaining locally buffered documents have been iterated.\n */\n get closed() {\n return this.isClosed && (this.documents?.length ?? 0) === 0;\n }\n /**\n * A `killCursors` command was attempted on this cursor.\n * This is performed if the cursor id is non zero.\n */\n get killed() {\n return this.isKilled;\n }\n get loadBalanced() {\n return !!this.cursorClient.topology?.loadBalanced;\n }\n /** @internal */\n async asyncDispose() {\n await this.close();\n }\n /** Adds cursor to client's tracking so it will be closed by MongoClient.close() */\n trackCursor() {\n this.cursorClient.s.activeCursors.add(this);\n if (!this.listeners('close').includes(removeActiveCursor)) {\n this.once('close', removeActiveCursor);\n }\n }\n /** Returns current buffered documents length */\n bufferedCount() {\n return this.documents?.length ?? 0;\n }\n /** Returns current buffered documents */\n readBufferedDocuments(number) {\n const bufferedDocs = [];\n const documentsToRead = Math.min(number ?? this.documents?.length ?? 0, this.documents?.length ?? 0);\n for (let count = 0; count < documentsToRead; count++) {\n const document = this.documents?.shift(this.deserializationOptions);\n if (document != null) {\n bufferedDocs.push(document);\n }\n }\n return bufferedDocs;\n }\n async *[Symbol.asyncIterator]() {\n this.signal?.throwIfAborted();\n if (this.closed) {\n return;\n }\n try {\n while (true) {\n if (this.isKilled) {\n return;\n }\n if (this.closed) {\n return;\n }\n if (this.cursorId != null && this.isDead && (this.documents?.length ?? 0) === 0) {\n return;\n }\n const document = await this.next();\n // eslint-disable-next-line no-restricted-syntax\n if (document === null) {\n return;\n }\n yield document;\n this.signal?.throwIfAborted();\n }\n }\n finally {\n // Only close the cursor if it has not already been closed. This finally clause handles\n // the case when a user would break out of a for await of loop early.\n if (!this.isClosed) {\n try {\n await this.close();\n }\n catch (error) {\n (0, utils_1.squashError)(error);\n }\n }\n }\n }\n stream(options) {\n const readable = new ReadableCursorStream(this);\n const abortListener = (0, utils_1.addAbortListener)(this.signal, function () {\n readable.destroy(this.reason);\n });\n readable.once('end', () => {\n abortListener?.[utils_1.kDispose]();\n });\n if (options?.transform) {\n const transform = options.transform;\n const transformedStream = readable.pipe(new stream_1.Transform({\n objectMode: true,\n highWaterMark: 1,\n transform(chunk, _, callback) {\n try {\n const transformed = transform(chunk);\n callback(undefined, transformed);\n }\n catch (err) {\n callback(err);\n }\n }\n }));\n // Bubble errors to transformed stream, because otherwise no way\n // to handle this error.\n readable.on('error', err => transformedStream.emit('error', err));\n return transformedStream;\n }\n return readable;\n }\n async hasNext() {\n this.signal?.throwIfAborted();\n if (this.cursorId === bson_1.Long.ZERO) {\n return false;\n }\n if (this.cursorOptions.timeoutMode === exports.CursorTimeoutMode.ITERATION && this.cursorId != null) {\n this.timeoutContext?.refresh();\n }\n try {\n do {\n if ((this.documents?.length ?? 0) !== 0) {\n return true;\n }\n await this.fetchBatch();\n } while (!this.isDead || (this.documents?.length ?? 0) !== 0);\n }\n finally {\n if (this.cursorOptions.timeoutMode === exports.CursorTimeoutMode.ITERATION) {\n this.timeoutContext?.clear();\n }\n }\n return false;\n }\n /** Get the next available document from the cursor, returns null if no more documents are available. */\n async next() {\n this.signal?.throwIfAborted();\n if (this.cursorId === bson_1.Long.ZERO) {\n throw new error_1.MongoCursorExhaustedError();\n }\n if (this.cursorOptions.timeoutMode === exports.CursorTimeoutMode.ITERATION && this.cursorId != null) {\n this.timeoutContext?.refresh();\n }\n try {\n do {\n const doc = this.documents?.shift(this.deserializationOptions);\n if (doc != null) {\n if (this.transform != null)\n return await this.transformDocument(doc);\n return doc;\n }\n await this.fetchBatch();\n } while (!this.isDead || (this.documents?.length ?? 0) !== 0);\n }\n finally {\n if (this.cursorOptions.timeoutMode === exports.CursorTimeoutMode.ITERATION) {\n this.timeoutContext?.clear();\n }\n }\n return null;\n }\n /**\n * Try to get the next available document from the cursor or `null` if an empty batch is returned\n */\n async tryNext() {\n this.signal?.throwIfAborted();\n if (this.cursorId === bson_1.Long.ZERO) {\n throw new error_1.MongoCursorExhaustedError();\n }\n if (this.cursorOptions.timeoutMode === exports.CursorTimeoutMode.ITERATION && this.cursorId != null) {\n this.timeoutContext?.refresh();\n }\n try {\n let doc = this.documents?.shift(this.deserializationOptions);\n if (doc != null) {\n if (this.transform != null)\n return await this.transformDocument(doc);\n return doc;\n }\n await this.fetchBatch();\n doc = this.documents?.shift(this.deserializationOptions);\n if (doc != null) {\n if (this.transform != null)\n return await this.transformDocument(doc);\n return doc;\n }\n }\n finally {\n if (this.cursorOptions.timeoutMode === exports.CursorTimeoutMode.ITERATION) {\n this.timeoutContext?.clear();\n }\n }\n return null;\n }\n /**\n * Iterates over all the documents for this cursor using the iterator, callback pattern.\n *\n * If the iterator returns `false`, iteration will stop.\n *\n * @param iterator - The iteration callback.\n * @deprecated - Will be removed in a future release. Use for await...of instead.\n */\n async forEach(iterator) {\n this.signal?.throwIfAborted();\n if (typeof iterator !== 'function') {\n throw new error_1.MongoInvalidArgumentError('Argument \"iterator\" must be a function');\n }\n for await (const document of this) {\n const result = iterator(document);\n if (result === false) {\n break;\n }\n }\n }\n /**\n * Frees any client-side resources used by the cursor.\n */\n async close(options) {\n await this.cleanup(options?.timeoutMS);\n }\n /**\n * Returns an array of documents. The caller is responsible for making sure that there\n * is enough memory to store the results. Note that the array only contains partial\n * results when this cursor had been previously accessed. In that case,\n * cursor.rewind() can be used to reset the cursor.\n */\n async toArray() {\n this.signal?.throwIfAborted();\n const array = [];\n // at the end of the loop (since readBufferedDocuments is called) the buffer will be empty\n // then, the 'await of' syntax will run a getMore call\n for await (const document of this) {\n array.push(document);\n const docs = this.readBufferedDocuments();\n if (this.transform != null) {\n for (const doc of docs) {\n array.push(await this.transformDocument(doc));\n }\n }\n else {\n array.push(...docs);\n }\n }\n return array;\n }\n /**\n * Add a cursor flag to the cursor\n *\n * @param flag - The flag to set, must be one of following ['tailable', 'oplogReplay', 'noCursorTimeout', 'awaitData', 'partial' -.\n * @param value - The flag boolean value.\n */\n addCursorFlag(flag, value) {\n this.throwIfInitialized();\n if (!exports.CURSOR_FLAGS.includes(flag)) {\n throw new error_1.MongoInvalidArgumentError(`Flag ${flag} is not one of ${exports.CURSOR_FLAGS}`);\n }\n if (typeof value !== 'boolean') {\n throw new error_1.MongoInvalidArgumentError(`Flag ${flag} must be a boolean value`);\n }\n this.cursorOptions[flag] = value;\n return this;\n }\n /**\n * Map all documents using the provided function\n * If there is a transform set on the cursor, that will be called first and the result passed to\n * this function's transform.\n *\n * @remarks\n *\n * **Note** Cursors use `null` internally to indicate that there are no more documents in the cursor. Providing a mapping\n * function that maps values to `null` will result in the cursor closing itself before it has finished iterating\n * all documents. This will **not** result in a memory leak, just surprising behavior. For example:\n *\n * ```typescript\n * const cursor = collection.find({});\n * cursor.map(() => null);\n *\n * const documents = await cursor.toArray();\n * // documents is always [], regardless of how many documents are in the collection.\n * ```\n *\n * Other falsey values are allowed:\n *\n * ```typescript\n * const cursor = collection.find({});\n * cursor.map(() => '');\n *\n * const documents = await cursor.toArray();\n * // documents is now an array of empty strings\n * ```\n *\n * **Note for Typescript Users:** adding a transform changes the return type of the iteration of this cursor,\n * it **does not** return a new instance of a cursor. This means when calling map,\n * you should always assign the result to a new variable in order to get a correctly typed cursor variable.\n * Take note of the following example:\n *\n * @example\n * ```typescript\n * const cursor: FindCursor<Document> = coll.find();\n * const mappedCursor: FindCursor<number> = cursor.map(doc => Object.keys(doc).length);\n * const keyCounts: number[] = await mappedCursor.toArray(); // cursor.toArray() still returns Document[]\n * ```\n * @param transform - The mapping transformation method.\n */\n map(transform) {\n this.throwIfInitialized();\n const oldTransform = this.transform;\n if (oldTransform) {\n this.transform = doc => {\n return transform(oldTransform(doc));\n };\n }\n else {\n this.transform = transform;\n }\n return this;\n }\n /**\n * Set the ReadPreference for the cursor.\n *\n * @param readPreference - The new read preference for the cursor.\n */\n withReadPreference(readPreference) {\n this.throwIfInitialized();\n if (readPreference instanceof read_preference_1.ReadPreference) {\n this.cursorOptions.readPreference = readPreference;\n }\n else if (typeof readPreference === 'string') {\n this.cursorOptions.readPreference = read_preference_1.ReadPreference.fromString(readPreference);\n }\n else {\n throw new error_1.MongoInvalidArgumentError(`Invalid read preference: ${readPreference}`);\n }\n return this;\n }\n /**\n * Set the ReadPreference for the cursor.\n *\n * @param readPreference - The new read preference for the cursor.\n */\n withReadConcern(readConcern) {\n this.throwIfInitialized();\n const resolvedReadConcern = read_concern_1.ReadConcern.fromOptions({ readConcern });\n if (resolvedReadConcern) {\n this.cursorOptions.readConcern = resolvedReadConcern;\n }\n return this;\n }\n /**\n * Set a maxTimeMS on the cursor query, allowing for hard timeout limits on queries (Only supported on MongoDB 2.6 or higher)\n *\n * @param value - Number of milliseconds to wait before aborting the query.\n */\n maxTimeMS(value) {\n this.throwIfInitialized();\n if (typeof value !== 'number') {\n throw new error_1.MongoInvalidArgumentError('Argument for maxTimeMS must be a number');\n }\n this.cursorOptions.maxTimeMS = value;\n return this;\n }\n /**\n * Set the batch size for the cursor.\n *\n * @param value - The number of documents to return per batch. See {@link https://www.mongodb.com/docs/manual/reference/command/find/|find command documentation}.\n */\n batchSize(value) {\n this.throwIfInitialized();\n if (this.cursorOptions.tailable) {\n throw new error_1.MongoTailableCursorError('Tailable cursor does not support batchSize');\n }\n if (typeof value !== 'number') {\n throw new error_1.MongoInvalidArgumentError('Operation \"batchSize\" requires an integer');\n }\n this.cursorOptions.batchSize = value;\n return this;\n }\n /**\n * Rewind this cursor to its uninitialized state. Any options that are present on the cursor will\n * remain in effect. Iterating this cursor will cause new queries to be sent to the server, even\n * if the resultant data has already been retrieved by this cursor.\n */\n rewind() {\n if (this.timeoutContext && this.timeoutContext.owner !== this) {\n throw new error_1.MongoAPIError(`Cannot rewind cursor that does not own its timeout context.`);\n }\n if (!this.initialized) {\n return;\n }\n this.cursorId = null;\n this.documents?.clear();\n this.timeoutContext?.clear();\n this.timeoutContext = undefined;\n this.isClosed = false;\n this.isKilled = false;\n this.initialized = false;\n this.hasEmittedClose = false;\n this.trackCursor();\n // We only want to end this session if we created it, and it hasn't ended yet\n if (this.cursorSession?.explicit === false) {\n if (!this.cursorSession.hasEnded) {\n this.cursorSession.endSession().then(undefined, utils_1.squashError);\n }\n this.cursorSession = null;\n }\n }\n /** @internal */\n async getMore(batchSize) {\n if (this.cursorId == null) {\n throw new error_1.MongoRuntimeError('Unexpected null cursor id. A cursor creating command should have set this');\n }\n if (this.selectedServer == null) {\n throw new error_1.MongoRuntimeError('Unexpected null selectedServer. A cursor creating command should have set this');\n }\n if (this.cursorSession == null) {\n throw new error_1.MongoRuntimeError('Unexpected null session. A cursor creating command should have set this');\n }\n const getMoreOptions = {\n ...this.cursorOptions,\n session: this.cursorSession,\n batchSize\n };\n const getMoreOperation = new get_more_1.GetMoreOperation(this.cursorNamespace, this.cursorId, this.selectedServer, getMoreOptions);\n return await (0, execute_operation_1.executeOperation)(this.cursorClient, getMoreOperation, this.timeoutContext);\n }\n /**\n * @internal\n *\n * This function is exposed for the unified test runner's createChangeStream\n * operation. We cannot refactor to use the abstract _initialize method without\n * a significant refactor.\n */\n async cursorInit() {\n if (this.cursorOptions.timeoutMS != null) {\n this.timeoutContext ??= new CursorTimeoutContext(timeout_1.TimeoutContext.create({\n serverSelectionTimeoutMS: this.client.s.options.serverSelectionTimeoutMS,\n timeoutMS: this.cursorOptions.timeoutMS\n }), this);\n }\n try {\n this.cursorSession ??= this.cursorClient.startSession({ owner: this, explicit: false });\n const state = await this._initialize(this.cursorSession);\n // Set omitMaxTimeMS to the value needed for subsequent getMore calls\n this.cursorOptions.omitMaxTimeMS = this.cursorOptions.timeoutMS != null;\n const response = state.response;\n this.selectedServer = state.server;\n this.cursorId = response.id;\n this.cursorNamespace = response.ns ?? this.namespace;\n this.documents = response;\n this.initialized = true; // the cursor is now initialized, even if it is dead\n }\n catch (error) {\n // the cursor is now initialized, even if an error occurred\n this.initialized = true;\n await this.cleanup(undefined, error);\n throw error;\n }\n if (this.isDead) {\n await this.cleanup();\n }\n return;\n }\n /** @internal Attempt to obtain more documents */\n async fetchBatch() {\n if (this.isClosed) {\n return;\n }\n if (this.isDead) {\n // if the cursor is dead, we clean it up\n // cleanupCursor should never throw, but if it does it indicates a bug in the driver\n // and we should surface the error\n await this.cleanup();\n return;\n }\n if (this.cursorId == null) {\n await this.cursorInit();\n // If the cursor died or returned documents, return\n if ((this.documents?.length ?? 0) !== 0 || this.isDead)\n return;\n // Otherwise, run a getMore\n }\n // otherwise need to call getMore\n const batchSize = this.cursorOptions.batchSize || 1000;\n try {\n const response = await this.getMore(batchSize);\n this.cursorId = response.id;\n this.documents = response;\n }\n catch (error) {\n try {\n await this.cleanup(undefined, error);\n }\n catch (cleanupError) {\n // `cleanupCursor` should never throw, squash and throw the original error\n (0, utils_1.squashError)(cleanupError);\n }\n throw error;\n }\n if (this.isDead) {\n // If we successfully received a response from a cursor BUT the cursor indicates that it is exhausted,\n // we intentionally clean up the cursor to release its session back into the pool before the cursor\n // is iterated. This prevents a cursor that is exhausted on the server from holding\n // onto a session indefinitely until the AbstractCursor is iterated.\n //\n // cleanupCursorAsync should never throw, but if it does it indicates a bug in the driver\n // and we should surface the error\n await this.cleanup();\n }\n }\n /** @internal */\n async cleanup(timeoutMS, error) {\n this.abortListener?.[utils_1.kDispose]();\n this.isClosed = true;\n const timeoutContextForKillCursors = () => {\n if (timeoutMS != null) {\n this.timeoutContext?.clear();\n return new CursorTimeoutContext(timeout_1.TimeoutContext.create({\n serverSelectionTimeoutMS: this.client.s.options.serverSelectionTimeoutMS,\n timeoutMS\n }), this);\n }\n else {\n return this.timeoutContext?.refreshed();\n }\n };\n const withEmitClose = async (fn) => {\n try {\n await fn();\n }\n finally {\n this.emitClose();\n }\n };\n const close = async () => {\n // if no session has been defined on the cursor, the cursor was never initialized\n // or the cursor was re-wound and never re-iterated. In either case, we\n // 1. do not need to end the session (there is no session after all)\n // 2. do not need to kill the cursor server-side\n const session = this.cursorSession;\n if (!session)\n return;\n try {\n if (!this.isKilled &&\n this.cursorId &&\n !this.cursorId.isZero() &&\n this.cursorNamespace &&\n this.selectedServer &&\n !session.hasEnded) {\n this.isKilled = true;\n const cursorId = this.cursorId;\n this.cursorId = bson_1.Long.ZERO;\n await (0, execute_operation_1.executeOperation)(this.cursorClient, new kill_cursors_1.KillCursorsOperation(cursorId, this.cursorNamespace, this.selectedServer, {\n session\n }), timeoutContextForKillCursors());\n }\n }\n catch (error) {\n (0, utils_1.squashError)(error);\n }\n finally {\n if (session.owner === this) {\n await session.endSession({ error });\n }\n if (!session.inTransaction()) {\n (0, sessions_1.maybeClearPinnedConnection)(session, { error });\n }\n }\n };\n await withEmitClose(close);\n }\n /** @internal */\n emitClose() {\n try {\n if (!this.hasEmittedClose && ((this.documents?.length ?? 0) === 0 || this.isClosed)) {\n // @ts-expect-error: CursorEvents is generic so Parameters<CursorEvents[\"close\"]> may not be assignable to `[]`. Not sure how to require extenders do not add parameters.\n this.emit('close');\n }\n }\n finally {\n this.hasEmittedClose = true;\n }\n }\n /** @internal */\n async transformDocument(document) {\n if (this.transform == null)\n return document;\n try {\n const transformedDocument = this.transform(document);\n // eslint-disable-next-line no-restricted-syntax\n if (transformedDocument === null) {\n const TRANSFORM_TO_NULL_ERROR = 'Cursor returned a `null` document, but the cursor is not exhausted. Mapping documents to `null` is not supported in the cursor transform.';\n throw new error_1.MongoAPIError(TRANSFORM_TO_NULL_ERROR);\n }\n return transformedDocument;\n }\n catch (transformError) {\n try {\n await this.close();\n }\n catch (closeError) {\n (0, utils_1.squashError)(closeError);\n }\n throw transformError;\n }\n }\n /** @internal */\n throwIfInitialized() {\n if (this.initialized)\n throw new error_1.MongoCursorInUseError();\n }\n}\nexports.AbstractCursor = AbstractCursor;\n/** @event */\nAbstractCursor.CLOSE = 'close';\nclass ReadableCursorStream extends stream_1.Readable {\n constructor(cursor) {\n super({\n objectMode: true,\n autoDestroy: false,\n highWaterMark: 1\n });\n this._readInProgress = false;\n this._cursor = cursor;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _read(size) {\n if (!this._readInProgress) {\n this._readInProgress = true;\n this._readNext();\n }\n }\n _destroy(error, callback) {\n this._cursor.close().then(() => callback(error), closeError => callback(closeError));\n }\n _readNext() {\n if (this._cursor.id === bson_1.Long.ZERO) {\n this.push(null);\n return;\n }\n this._cursor\n .next()\n .then(\n // result from next()\n result => {\n if (result == null) {\n this.push(null);\n }\n else if (this.destroyed) {\n this._cursor.close().then(undefined, utils_1.squashError);\n }\n else {\n if (this.push(result)) {\n return this._readNext();\n }\n this._readInProgress = false;\n }\n }, \n // error from next()\n err => {\n // NOTE: This is questionable, but we have a test backing the behavior. It seems the\n // desired behavior is that a stream ends cleanly when a user explicitly closes\n // a client during iteration. Alternatively, we could do the \"right\" thing and\n // propagate the error message by removing this special case.\n if (err.message.match(/server is closed/)) {\n this._cursor.close().then(undefined, utils_1.squashError);\n return this.push(null);\n }\n // NOTE: This is also perhaps questionable. The rationale here is that these errors tend\n // to be \"operation was interrupted\", where a cursor has been closed but there is an\n // active getMore in-flight. This used to check if the cursor was killed but once\n // that changed to happen in cleanup legitimate errors would not destroy the\n // stream. There are change streams test specifically test these cases.\n if (err.message.match(/operation was interrupted/)) {\n return this.push(null);\n }\n // NOTE: The two above checks on the message of the error will cause a null to be pushed\n // to the stream, thus closing the stream before the destroy call happens. This means\n // that either of those error messages on a change stream will not get a proper\n // 'error' event to be emitted (the error passed to destroy). Change stream resumability\n // relies on that error event to be emitted to create its new cursor and thus was not\n // working on 4.4 servers because the error emitted on failover was \"interrupted at\n // shutdown\" while on 5.0+ it is \"The server is in quiesce mode and will shut down\".\n // See NODE-4475.\n return this.destroy(err);\n })\n // if either of the above handlers throw\n .catch(error => {\n this._readInProgress = false;\n this.destroy(error);\n });\n }\n}\n(0, resource_management_1.configureResourceManagement)(AbstractCursor.prototype);\n/**\n * @internal\n * The cursor timeout context is a wrapper around a timeout context\n * that keeps track of the \"owner\" of the cursor. For timeout contexts\n * instantiated inside a cursor, the owner will be the cursor.\n *\n * All timeout behavior is exactly the same as the wrapped timeout context's.\n */\nclass CursorTimeoutContext extends timeout_1.TimeoutContext {\n constructor(timeoutContext, owner) {\n super();\n this.timeoutContext = timeoutContext;\n this.owner = owner;\n }\n get serverSelectionTimeout() {\n return this.timeoutContext.serverSelectionTimeout;\n }\n get connectionCheckoutTimeout() {\n return this.timeoutContext.connectionCheckoutTimeout;\n }\n get clearServerSelectionTimeout() {\n return this.timeoutContext.clearServerSelectionTimeout;\n }\n get timeoutForSocketWrite() {\n return this.timeoutContext.timeoutForSocketWrite;\n }\n get timeoutForSocketRead() {\n return this.timeoutContext.timeoutForSocketRead;\n }\n csotEnabled() {\n return this.timeoutContext.csotEnabled();\n }\n refresh() {\n if (typeof this.owner !== 'symbol')\n return this.timeoutContext.refresh();\n }\n clear() {\n if (typeof this.owner !== 'symbol')\n return this.timeoutContext.clear();\n }\n get maxTimeMS() {\n return this.timeoutContext.maxTimeMS;\n }\n get timeoutMS() {\n return this.timeoutContext.csotEnabled() ? this.timeoutContext.timeoutMS : null;\n }\n refreshed() {\n return new CursorTimeoutContext(this.timeoutContext.refreshed(), this.owner);\n }\n addMaxTimeMSToCommand(command, options) {\n this.timeoutContext.addMaxTimeMSToCommand(command, options);\n }\n getSocketTimeoutMS() {\n return this.timeoutContext.getSocketTimeoutMS();\n }\n}\nexports.CursorTimeoutContext = CursorTimeoutContext;\n//# sourceMappingURL=abstract_cursor.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;AACA,QAAO,eAAe,SAAS,cAAc,EAAE,OAAO,MAAM,CAAC;AAC7D,SAAQ,uBAAuB,QAAQ,iBAAiB,QAAQ,oBAAoB,QAAQ,eAAe,KAAK;CAChH,MAAM,qBAAmB,SAAS;CAClC,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;;AAEN,SAAQ,eAAe;EACnB;EACA;EACA;EACA;EACA;EACA;EACH;CACD,SAAS,qBAAqB;AAC1B,OAAK,OAAO,EAAE,cAAc,OAAO,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+B5C,SAAQ,oBAAoB,OAAO,OAAO;EACtC,WAAW;EACX,UAAU;EACb,CAAC;;CAEF,IAAM,iBAAN,cAA6B,cAAc,kBAAkB;;EAEz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gBAAgB,OAAO;AAC/B,UAAO;AACP,QAAK,iBAAiB;AACtB,QAAK,QAAQ;;EAEjB,IAAI,yBAAyB;AACzB,UAAO,KAAK,eAAe;;EAE/B,IAAI,4BAA4B;AAC5B,UAAO,KAAK,eAAe;;EAE/B,IAAI,8BAA8B;AAC9B,UAAO,KAAK,eAAe;;EAE/B,IAAI,wBAAwB;AACxB,UAAO,KAAK,eAAe;;EAE/B,IAAI,uBAAuB;AACvB,UAAO,KAAK,eAAe;;EAE/B,cAAc;AACV,UAAO,KAAK,eAAe,aAAa;;EAE5C,UAAU;AACN,OAAI,OAAO,KAAK,UAAU,SACtB,QAAO,KAAK,eAAe,SAAS;;EAE5C,QAAQ;AACJ,OAAI,OAAO,KAAK,UAAU,SACtB,QAAO,KAAK,eAAe,OAAO;;EAE1C,IAAI,YAAY;AACZ,UAAO,KAAK,eAAe;;EAE/B,IAAI,YAAY;AACZ,UAAO,KAAK,eAAe,aAAa,GAAG,KAAK,eAAe,YAAY;;EAE/E,YAAY;AACR,UAAO,IAAI,qBAAqB,KAAK,eAAe,WAAW,EAAE,KAAK,MAAM;;EAEhF,sBAAsB,SAAS,SAAS;AACpC,QAAK,eAAe,sBAAsB,SAAS,QAAQ;;EAE/D,qBAAqB;AACjB,UAAO,KAAK,eAAe,oBAAoB;;;AAGvD,SAAQ,uBAAuB"}
@@ -1,172 +0,0 @@
1
- import { __commonJSMin } from "../../../../../../../_virtual/rolldown_runtime.mjs";
2
- import { require_error } from "../error.mjs";
3
- import { require_utils } from "../utils.mjs";
4
- import { require_explain } from "../explain.mjs";
5
- import { require_aggregate } from "../operations/aggregate.mjs";
6
- import { require_execute_operation } from "../operations/execute_operation.mjs";
7
- import { require_abstract_cursor } from "./abstract_cursor.mjs";
8
- import { require_explainable_cursor } from "./explainable_cursor.mjs";
9
-
10
- //#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/aggregation_cursor.js
11
- var require_aggregation_cursor = /* @__PURE__ */ __commonJSMin(((exports) => {
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.AggregationCursor = void 0;
14
- const error_1 = require_error();
15
- const explain_1 = require_explain();
16
- const aggregate_1 = require_aggregate();
17
- const execute_operation_1 = require_execute_operation();
18
- const utils_1 = require_utils();
19
- const abstract_cursor_1 = require_abstract_cursor();
20
- const explainable_cursor_1 = require_explainable_cursor();
21
- /**
22
- * The **AggregationCursor** class is an internal class that embodies an aggregation cursor on MongoDB
23
- * allowing for iteration over the results returned from the underlying query. It supports
24
- * one by one document iteration, conversion to an array or can be iterated as a Node 4.X
25
- * or higher stream
26
- * @public
27
- */
28
- var AggregationCursor = class AggregationCursor extends explainable_cursor_1.ExplainableCursor {
29
- /** @internal */
30
- constructor(client, namespace, pipeline = [], options = {}) {
31
- super(client, namespace, options);
32
- this.pipeline = pipeline;
33
- this.aggregateOptions = options;
34
- const lastStage = this.pipeline[this.pipeline.length - 1];
35
- if (this.cursorOptions.timeoutMS != null && this.cursorOptions.timeoutMode === abstract_cursor_1.CursorTimeoutMode.ITERATION && (lastStage?.$merge != null || lastStage?.$out != null)) throw new error_1.MongoAPIError("Cannot use $out or $merge stage with ITERATION timeoutMode");
36
- }
37
- clone() {
38
- const clonedOptions = (0, utils_1.mergeOptions)({}, this.aggregateOptions);
39
- delete clonedOptions.session;
40
- return new AggregationCursor(this.client, this.namespace, this.pipeline, { ...clonedOptions });
41
- }
42
- map(transform) {
43
- return super.map(transform);
44
- }
45
- /** @internal */
46
- async _initialize(session) {
47
- const options = {
48
- ...this.aggregateOptions,
49
- ...this.cursorOptions,
50
- session,
51
- signal: this.signal
52
- };
53
- if (options.explain) try {
54
- (0, explain_1.validateExplainTimeoutOptions)(options, explain_1.Explain.fromOptions(options));
55
- } catch {
56
- throw new error_1.MongoAPIError("timeoutMS cannot be used with explain when explain is specified in aggregateOptions");
57
- }
58
- const aggregateOperation = new aggregate_1.AggregateOperation(this.namespace, this.pipeline, options);
59
- const response = await (0, execute_operation_1.executeOperation)(this.client, aggregateOperation, this.timeoutContext);
60
- return {
61
- server: aggregateOperation.server,
62
- session,
63
- response
64
- };
65
- }
66
- async explain(verbosity, options) {
67
- const { explain, timeout } = this.resolveExplainTimeoutOptions(verbosity, options);
68
- return (await (0, execute_operation_1.executeOperation)(this.client, new aggregate_1.AggregateOperation(this.namespace, this.pipeline, {
69
- ...this.aggregateOptions,
70
- ...this.cursorOptions,
71
- ...timeout,
72
- explain: explain ?? true
73
- }))).shift(this.deserializationOptions);
74
- }
75
- addStage(stage) {
76
- this.throwIfInitialized();
77
- if (this.cursorOptions.timeoutMS != null && this.cursorOptions.timeoutMode === abstract_cursor_1.CursorTimeoutMode.ITERATION && (stage.$out != null || stage.$merge != null)) throw new error_1.MongoAPIError("Cannot use $out or $merge stage with ITERATION timeoutMode");
78
- this.pipeline.push(stage);
79
- return this;
80
- }
81
- group($group) {
82
- return this.addStage({ $group });
83
- }
84
- /** Add a limit stage to the aggregation pipeline */
85
- limit($limit) {
86
- return this.addStage({ $limit });
87
- }
88
- /** Add a match stage to the aggregation pipeline */
89
- match($match) {
90
- return this.addStage({ $match });
91
- }
92
- /** Add an out stage to the aggregation pipeline */
93
- out($out) {
94
- return this.addStage({ $out });
95
- }
96
- /**
97
- * Add a project stage to the aggregation pipeline
98
- *
99
- * @remarks
100
- * In order to strictly type this function you must provide an interface
101
- * that represents the effect of your projection on the result documents.
102
- *
103
- * By default chaining a projection to your cursor changes the returned type to the generic {@link Document} type.
104
- * You should specify a parameterized type to have assertions on your final results.
105
- *
106
- * @example
107
- * ```typescript
108
- * // Best way
109
- * const docs: AggregationCursor<{ a: number }> = cursor.project<{ a: number }>({ _id: 0, a: true });
110
- * // Flexible way
111
- * const docs: AggregationCursor<Document> = cursor.project({ _id: 0, a: true });
112
- * ```
113
- *
114
- * @remarks
115
- * In order to strictly type this function you must provide an interface
116
- * that represents the effect of your projection on the result documents.
117
- *
118
- * **Note for Typescript Users:** adding a transform changes the return type of the iteration of this cursor,
119
- * it **does not** return a new instance of a cursor. This means when calling project,
120
- * you should always assign the result to a new variable in order to get a correctly typed cursor variable.
121
- * Take note of the following example:
122
- *
123
- * @example
124
- * ```typescript
125
- * const cursor: AggregationCursor<{ a: number; b: string }> = coll.aggregate([]);
126
- * const projectCursor = cursor.project<{ a: number }>({ _id: 0, a: true });
127
- * const aPropOnlyArray: {a: number}[] = await projectCursor.toArray();
128
- *
129
- * // or always use chaining and save the final cursor
130
- *
131
- * const cursor = coll.aggregate().project<{ a: string }>({
132
- * _id: 0,
133
- * a: { $convert: { input: '$a', to: 'string' }
134
- * }});
135
- * ```
136
- */
137
- project($project) {
138
- return this.addStage({ $project });
139
- }
140
- /** Add a lookup stage to the aggregation pipeline */
141
- lookup($lookup) {
142
- return this.addStage({ $lookup });
143
- }
144
- /** Add a redact stage to the aggregation pipeline */
145
- redact($redact) {
146
- return this.addStage({ $redact });
147
- }
148
- /** Add a skip stage to the aggregation pipeline */
149
- skip($skip) {
150
- return this.addStage({ $skip });
151
- }
152
- /** Add a sort stage to the aggregation pipeline */
153
- sort($sort) {
154
- return this.addStage({ $sort });
155
- }
156
- /** Add a unwind stage to the aggregation pipeline */
157
- unwind($unwind) {
158
- return this.addStage({ $unwind });
159
- }
160
- /** Add a geoNear stage to the aggregation pipeline */
161
- geoNear($geoNear) {
162
- return this.addStage({ $geoNear });
163
- }
164
- };
165
- exports.AggregationCursor = AggregationCursor;
166
- }));
167
-
168
- //#endregion
169
- export default require_aggregation_cursor();
170
-
171
- export { require_aggregation_cursor };
172
- //# sourceMappingURL=aggregation_cursor.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"aggregation_cursor.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/aggregation_cursor.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AggregationCursor = void 0;\nconst error_1 = require(\"../error\");\nconst explain_1 = require(\"../explain\");\nconst aggregate_1 = require(\"../operations/aggregate\");\nconst execute_operation_1 = require(\"../operations/execute_operation\");\nconst utils_1 = require(\"../utils\");\nconst abstract_cursor_1 = require(\"./abstract_cursor\");\nconst explainable_cursor_1 = require(\"./explainable_cursor\");\n/**\n * The **AggregationCursor** class is an internal class that embodies an aggregation cursor on MongoDB\n * allowing for iteration over the results returned from the underlying query. It supports\n * one by one document iteration, conversion to an array or can be iterated as a Node 4.X\n * or higher stream\n * @public\n */\nclass AggregationCursor extends explainable_cursor_1.ExplainableCursor {\n /** @internal */\n constructor(client, namespace, pipeline = [], options = {}) {\n super(client, namespace, options);\n this.pipeline = pipeline;\n this.aggregateOptions = options;\n const lastStage = this.pipeline[this.pipeline.length - 1];\n if (this.cursorOptions.timeoutMS != null &&\n this.cursorOptions.timeoutMode === abstract_cursor_1.CursorTimeoutMode.ITERATION &&\n (lastStage?.$merge != null || lastStage?.$out != null))\n throw new error_1.MongoAPIError('Cannot use $out or $merge stage with ITERATION timeoutMode');\n }\n clone() {\n const clonedOptions = (0, utils_1.mergeOptions)({}, this.aggregateOptions);\n delete clonedOptions.session;\n return new AggregationCursor(this.client, this.namespace, this.pipeline, {\n ...clonedOptions\n });\n }\n map(transform) {\n return super.map(transform);\n }\n /** @internal */\n async _initialize(session) {\n const options = {\n ...this.aggregateOptions,\n ...this.cursorOptions,\n session,\n signal: this.signal\n };\n if (options.explain) {\n try {\n (0, explain_1.validateExplainTimeoutOptions)(options, explain_1.Explain.fromOptions(options));\n }\n catch {\n throw new error_1.MongoAPIError('timeoutMS cannot be used with explain when explain is specified in aggregateOptions');\n }\n }\n const aggregateOperation = new aggregate_1.AggregateOperation(this.namespace, this.pipeline, options);\n const response = await (0, execute_operation_1.executeOperation)(this.client, aggregateOperation, this.timeoutContext);\n return { server: aggregateOperation.server, session, response };\n }\n async explain(verbosity, options) {\n const { explain, timeout } = this.resolveExplainTimeoutOptions(verbosity, options);\n return (await (0, execute_operation_1.executeOperation)(this.client, new aggregate_1.AggregateOperation(this.namespace, this.pipeline, {\n ...this.aggregateOptions, // NOTE: order matters here, we may need to refine this\n ...this.cursorOptions,\n ...timeout,\n explain: explain ?? true\n }))).shift(this.deserializationOptions);\n }\n addStage(stage) {\n this.throwIfInitialized();\n if (this.cursorOptions.timeoutMS != null &&\n this.cursorOptions.timeoutMode === abstract_cursor_1.CursorTimeoutMode.ITERATION &&\n (stage.$out != null || stage.$merge != null)) {\n throw new error_1.MongoAPIError('Cannot use $out or $merge stage with ITERATION timeoutMode');\n }\n this.pipeline.push(stage);\n return this;\n }\n group($group) {\n return this.addStage({ $group });\n }\n /** Add a limit stage to the aggregation pipeline */\n limit($limit) {\n return this.addStage({ $limit });\n }\n /** Add a match stage to the aggregation pipeline */\n match($match) {\n return this.addStage({ $match });\n }\n /** Add an out stage to the aggregation pipeline */\n out($out) {\n return this.addStage({ $out });\n }\n /**\n * Add a project stage to the aggregation pipeline\n *\n * @remarks\n * In order to strictly type this function you must provide an interface\n * that represents the effect of your projection on the result documents.\n *\n * By default chaining a projection to your cursor changes the returned type to the generic {@link Document} type.\n * You should specify a parameterized type to have assertions on your final results.\n *\n * @example\n * ```typescript\n * // Best way\n * const docs: AggregationCursor<{ a: number }> = cursor.project<{ a: number }>({ _id: 0, a: true });\n * // Flexible way\n * const docs: AggregationCursor<Document> = cursor.project({ _id: 0, a: true });\n * ```\n *\n * @remarks\n * In order to strictly type this function you must provide an interface\n * that represents the effect of your projection on the result documents.\n *\n * **Note for Typescript Users:** adding a transform changes the return type of the iteration of this cursor,\n * it **does not** return a new instance of a cursor. This means when calling project,\n * you should always assign the result to a new variable in order to get a correctly typed cursor variable.\n * Take note of the following example:\n *\n * @example\n * ```typescript\n * const cursor: AggregationCursor<{ a: number; b: string }> = coll.aggregate([]);\n * const projectCursor = cursor.project<{ a: number }>({ _id: 0, a: true });\n * const aPropOnlyArray: {a: number}[] = await projectCursor.toArray();\n *\n * // or always use chaining and save the final cursor\n *\n * const cursor = coll.aggregate().project<{ a: string }>({\n * _id: 0,\n * a: { $convert: { input: '$a', to: 'string' }\n * }});\n * ```\n */\n project($project) {\n return this.addStage({ $project });\n }\n /** Add a lookup stage to the aggregation pipeline */\n lookup($lookup) {\n return this.addStage({ $lookup });\n }\n /** Add a redact stage to the aggregation pipeline */\n redact($redact) {\n return this.addStage({ $redact });\n }\n /** Add a skip stage to the aggregation pipeline */\n skip($skip) {\n return this.addStage({ $skip });\n }\n /** Add a sort stage to the aggregation pipeline */\n sort($sort) {\n return this.addStage({ $sort });\n }\n /** Add a unwind stage to the aggregation pipeline */\n unwind($unwind) {\n return this.addStage({ $unwind });\n }\n /** Add a geoNear stage to the aggregation pipeline */\n geoNear($geoNear) {\n return this.addStage({ $geoNear });\n }\n}\nexports.AggregationCursor = AggregationCursor;\n//# sourceMappingURL=aggregation_cursor.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;AACA,QAAO,eAAe,SAAS,cAAc,EAAE,OAAO,MAAM,CAAC;AAC7D,SAAQ,oBAAoB,KAAK;CACjC,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;;;;;;;;CAQN,IAAM,oBAAN,MAAM,0BAA0B,qBAAqB,kBAAkB;;EAEnE,YAAY,QAAQ,WAAW,WAAW,EAAE,EAAE,UAAU,EAAE,EAAE;AACxD,SAAM,QAAQ,WAAW,QAAQ;AACjC,QAAK,WAAW;AAChB,QAAK,mBAAmB;GACxB,MAAM,YAAY,KAAK,SAAS,KAAK,SAAS,SAAS;AACvD,OAAI,KAAK,cAAc,aAAa,QAChC,KAAK,cAAc,gBAAgB,kBAAkB,kBAAkB,cACtE,WAAW,UAAU,QAAQ,WAAW,QAAQ,MACjD,OAAM,IAAI,QAAQ,cAAc,6DAA6D;;EAErG,QAAQ;GACJ,MAAM,iBAAiB,GAAG,QAAQ,cAAc,EAAE,EAAE,KAAK,iBAAiB;AAC1E,UAAO,cAAc;AACrB,UAAO,IAAI,kBAAkB,KAAK,QAAQ,KAAK,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AQ;AACV,UAAO,KAAK,SAAS,EAAE,QAAQ,CAAC;;;EAGpC,IAAI,MAAM;AACN,UAAO,KAAK,SAAS,EAAE,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2ClC,QAAQ,UAAU;AACd,UAAO,KAAK,SAAS,EAAE,UAAU,CAAC;;;EAGtC,OAAO,SAAS;AACZ,UAAO,KAAK,SAAS,EAAE,SAAS,CAAC;;;EAGrC,OAAO,SAAS;AACZ,UAAO,KAAK,SAAS,EAAE,SAAS,CAAC;;;EAGrC,KAAK,OAAO;AACR,UAAO,KAAK,SAAS,EAAE,OAAO,CAAC;;;EAGnC,KAAK,OAAO;AACR,UAAO,KAAK,SAAS,EAAE,OAAO,CAAC;;;EAGnC,OAAO,SAAS;AACZ,UAAO,KAAK,SAAS,EAAE,SAAS,CAAC;;;EAGrC,QAAQ,UAAU;AACd,UAAO,KAAK,SAAS,EAAE,UAAU,CAAC;;;AAG1C,SAAQ,oBAAoB"}
@@ -1,103 +0,0 @@
1
- import { __commonJSMin } from "../../../../../../../_virtual/rolldown_runtime.mjs";
2
- import { require_constants } from "../constants.mjs";
3
- import { require_utils } from "../utils.mjs";
4
- import { require_aggregate } from "../operations/aggregate.mjs";
5
- import { require_execute_operation } from "../operations/execute_operation.mjs";
6
- import { require_abstract_cursor } from "./abstract_cursor.mjs";
7
- import { require_change_stream } from "../change_stream.mjs";
8
-
9
- //#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/change_stream_cursor.js
10
- var require_change_stream_cursor = /* @__PURE__ */ __commonJSMin(((exports) => {
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.ChangeStreamCursor = void 0;
13
- const change_stream_1 = require_change_stream();
14
- const constants_1 = require_constants();
15
- const aggregate_1 = require_aggregate();
16
- const execute_operation_1 = require_execute_operation();
17
- const utils_1 = require_utils();
18
- const abstract_cursor_1 = require_abstract_cursor();
19
- /** @internal */
20
- var ChangeStreamCursor = class ChangeStreamCursor extends abstract_cursor_1.AbstractCursor {
21
- constructor(client, namespace, pipeline = [], options = {}) {
22
- super(client, namespace, {
23
- ...options,
24
- tailable: true,
25
- awaitData: true
26
- });
27
- this.pipeline = pipeline;
28
- this.changeStreamCursorOptions = options;
29
- this._resumeToken = null;
30
- this.startAtOperationTime = options.startAtOperationTime ?? null;
31
- if (options.startAfter) this.resumeToken = options.startAfter;
32
- else if (options.resumeAfter) this.resumeToken = options.resumeAfter;
33
- }
34
- set resumeToken(token) {
35
- this._resumeToken = token;
36
- this.emit(change_stream_1.ChangeStream.RESUME_TOKEN_CHANGED, token);
37
- }
38
- get resumeToken() {
39
- return this._resumeToken;
40
- }
41
- get resumeOptions() {
42
- const options = { ...this.changeStreamCursorOptions };
43
- for (const key of [
44
- "resumeAfter",
45
- "startAfter",
46
- "startAtOperationTime"
47
- ]) delete options[key];
48
- if (this.resumeToken != null) if (this.changeStreamCursorOptions.startAfter && !this.hasReceived) options.startAfter = this.resumeToken;
49
- else options.resumeAfter = this.resumeToken;
50
- else if (this.startAtOperationTime != null) options.startAtOperationTime = this.startAtOperationTime;
51
- return options;
52
- }
53
- cacheResumeToken(resumeToken) {
54
- if (this.bufferedCount() === 0 && this.postBatchResumeToken) this.resumeToken = this.postBatchResumeToken;
55
- else this.resumeToken = resumeToken;
56
- this.hasReceived = true;
57
- }
58
- _processBatch(response) {
59
- const { postBatchResumeToken } = response;
60
- if (postBatchResumeToken) {
61
- this.postBatchResumeToken = postBatchResumeToken;
62
- if (response.batchSize === 0) this.resumeToken = postBatchResumeToken;
63
- }
64
- }
65
- clone() {
66
- return new ChangeStreamCursor(this.client, this.namespace, this.pipeline, { ...this.cursorOptions });
67
- }
68
- async _initialize(session) {
69
- const aggregateOperation = new aggregate_1.AggregateOperation(this.namespace, this.pipeline, {
70
- ...this.cursorOptions,
71
- ...this.changeStreamCursorOptions,
72
- session
73
- });
74
- const response = await (0, execute_operation_1.executeOperation)(session.client, aggregateOperation, this.timeoutContext);
75
- const server = aggregateOperation.server;
76
- this.maxWireVersion = (0, utils_1.maxWireVersion)(server);
77
- if (this.startAtOperationTime == null && this.changeStreamCursorOptions.resumeAfter == null && this.changeStreamCursorOptions.startAfter == null) this.startAtOperationTime = response.operationTime;
78
- this._processBatch(response);
79
- this.emit(constants_1.INIT, response);
80
- this.emit(constants_1.RESPONSE);
81
- return {
82
- server,
83
- session,
84
- response
85
- };
86
- }
87
- async getMore(batchSize) {
88
- const response = await super.getMore(batchSize);
89
- this.maxWireVersion = (0, utils_1.maxWireVersion)(this.server);
90
- this._processBatch(response);
91
- this.emit(change_stream_1.ChangeStream.MORE, response);
92
- this.emit(change_stream_1.ChangeStream.RESPONSE);
93
- return response;
94
- }
95
- };
96
- exports.ChangeStreamCursor = ChangeStreamCursor;
97
- }));
98
-
99
- //#endregion
100
- export default require_change_stream_cursor();
101
-
102
- export { require_change_stream_cursor };
103
- //# sourceMappingURL=change_stream_cursor.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"change_stream_cursor.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/change_stream_cursor.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ChangeStreamCursor = void 0;\nconst change_stream_1 = require(\"../change_stream\");\nconst constants_1 = require(\"../constants\");\nconst aggregate_1 = require(\"../operations/aggregate\");\nconst execute_operation_1 = require(\"../operations/execute_operation\");\nconst utils_1 = require(\"../utils\");\nconst abstract_cursor_1 = require(\"./abstract_cursor\");\n/** @internal */\nclass ChangeStreamCursor extends abstract_cursor_1.AbstractCursor {\n constructor(client, namespace, pipeline = [], options = {}) {\n super(client, namespace, { ...options, tailable: true, awaitData: true });\n this.pipeline = pipeline;\n this.changeStreamCursorOptions = options;\n this._resumeToken = null;\n this.startAtOperationTime = options.startAtOperationTime ?? null;\n if (options.startAfter) {\n this.resumeToken = options.startAfter;\n }\n else if (options.resumeAfter) {\n this.resumeToken = options.resumeAfter;\n }\n }\n set resumeToken(token) {\n this._resumeToken = token;\n this.emit(change_stream_1.ChangeStream.RESUME_TOKEN_CHANGED, token);\n }\n get resumeToken() {\n return this._resumeToken;\n }\n get resumeOptions() {\n const options = {\n ...this.changeStreamCursorOptions\n };\n for (const key of ['resumeAfter', 'startAfter', 'startAtOperationTime']) {\n delete options[key];\n }\n if (this.resumeToken != null) {\n if (this.changeStreamCursorOptions.startAfter && !this.hasReceived) {\n options.startAfter = this.resumeToken;\n }\n else {\n options.resumeAfter = this.resumeToken;\n }\n }\n else if (this.startAtOperationTime != null) {\n options.startAtOperationTime = this.startAtOperationTime;\n }\n return options;\n }\n cacheResumeToken(resumeToken) {\n if (this.bufferedCount() === 0 && this.postBatchResumeToken) {\n this.resumeToken = this.postBatchResumeToken;\n }\n else {\n this.resumeToken = resumeToken;\n }\n this.hasReceived = true;\n }\n _processBatch(response) {\n const { postBatchResumeToken } = response;\n if (postBatchResumeToken) {\n this.postBatchResumeToken = postBatchResumeToken;\n if (response.batchSize === 0) {\n this.resumeToken = postBatchResumeToken;\n }\n }\n }\n clone() {\n return new ChangeStreamCursor(this.client, this.namespace, this.pipeline, {\n ...this.cursorOptions\n });\n }\n async _initialize(session) {\n const aggregateOperation = new aggregate_1.AggregateOperation(this.namespace, this.pipeline, {\n ...this.cursorOptions,\n ...this.changeStreamCursorOptions,\n session\n });\n const response = await (0, execute_operation_1.executeOperation)(session.client, aggregateOperation, this.timeoutContext);\n const server = aggregateOperation.server;\n this.maxWireVersion = (0, utils_1.maxWireVersion)(server);\n if (this.startAtOperationTime == null &&\n this.changeStreamCursorOptions.resumeAfter == null &&\n this.changeStreamCursorOptions.startAfter == null) {\n this.startAtOperationTime = response.operationTime;\n }\n this._processBatch(response);\n this.emit(constants_1.INIT, response);\n this.emit(constants_1.RESPONSE);\n return { server, session, response };\n }\n async getMore(batchSize) {\n const response = await super.getMore(batchSize);\n this.maxWireVersion = (0, utils_1.maxWireVersion)(this.server);\n this._processBatch(response);\n this.emit(change_stream_1.ChangeStream.MORE, response);\n this.emit(change_stream_1.ChangeStream.RESPONSE);\n return response;\n }\n}\nexports.ChangeStreamCursor = ChangeStreamCursor;\n//# sourceMappingURL=change_stream_cursor.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;AACA,QAAO,eAAe,SAAS,cAAc,EAAE,OAAO,MAAM,CAAC;AAC7D,SAAQ,qBAAqB,KAAK;CAClC,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;;CAEN,IAAM,qBAAN,MAAM,2BAA2B,kBAAkB,eAAe;EAC9D,YAAY,QAAQ,WAAW,WAAW,EAAE,EAAE,UAAU,EAAE,EAAE;AACxD,SAAM,QAAQ,WAAW;IAAE,GAAG;IAAS,UAAU;IAAM,WAAW;IAAM,CAAC;AACzE,QAAK,WAAW;AAChB,QAAK,4BAA4B;AACjC,QAAK,eAAe;AACpB,QAAK,uBAAuB,QAAQ,wBAAwB;AAC5D,OAAI,QAAQ,WACR,MAAK,cAAc,QAAQ;YAEtB,QAAQ,YACb,MAAK,cAAc,QAAQ;;EAGnC,IAAI,YAAY,OAAO;AACnB,QAAK,eAAe;AACpB,QAAK,KAAK,gBAAgB,aAAa,sBAAsB,MAAM;;EAEvE,IAAI,cAAc;AACd,UAAO,KAAK;;EAEhB,IAAI,gBAAgB;GAChB,MAAM,UAAU,EACZ,GAAG,KAAK,2BACX;AACD,QAAK,MAAM,OAAO;IAAC;IAAe;IAAc;IAAuB,CACnE,QAAO,QAAQ;AAEnB,OAAI,KAAK,eAAe,KACpB,KAAI,KAAK,0BAA0B,cAAc,CAAC,KAAK,YACnD,SAAQ,aAAa,KAAK;OAG1B,SAAQ,cAAc,KAAK;YAG1B,KAAK,wBAAwB,KAClC,SAAQ,uBAAuB,KAAK;AAExC,UAAO;;EAEX,iBAAiB,aAAa;AAC1B,OAAI,KAAK,eAAe,KAAK,KAAK,KAAK,qBACnC,MAAK,cAAc,KAAK;OAGxB,MAAK,cAAc;AAEvB,QAAK,cAAc;;EAEvB,cAAc,UAAU;GACpB,MAAM,EAAE,yBAAyB;AACjC,OAAI,sBAAsB;AACtB,SAAK,uBAAuB;AAC5B,QAAI,SAAS,cAAc,EACvB,MAAK,cAAc;;;EAI/B,QAAQ;AACJ,UAAO,IAAI,mBAAmB,KAAK,QAAQ,KAAK,WAAW,KAAK,UAAU,EACtE,GAAG,KAAK,eACX,CAAC;;EAEN,MAAM,YAAY,SAAS;GACvB,MAAM,qBAAqB,IAAI,YAAY,mBAAmB,KAAK,WAAW,KAAK,UAAU;IACzF,GAAG,KAAK;IACR,GAAG,KAAK;IACR;IACH,CAAC;GACF,MAAM,WAAW,OAAO,GAAG,oBAAoB,kBAAkB,QAAQ,QAAQ,oBAAoB,KAAK,eAAe;GACzH,MAAM,SAAS,mBAAmB;AAClC,QAAK,kBAAkB,GAAG,QAAQ,gBAAgB,OAAO;AACzD,OAAI,KAAK,wBAAwB,QAC7B,KAAK,0BAA0B,eAAe,QAC9C,KAAK,0BAA0B,cAAc,KAC7C,MAAK,uBAAuB,SAAS;AAEzC,QAAK,cAAc,SAAS;AAC5B,QAAK,KAAK,YAAY,MAAM,SAAS;AACrC,QAAK,KAAK,YAAY,SAAS;AAC/B,UAAO;IAAE;IAAQ;IAAS;IAAU;;EAExC,MAAM,QAAQ,WAAW;GACrB,MAAM,WAAW,MAAM,MAAM,QAAQ,UAAU;AAC/C,QAAK,kBAAkB,GAAG,QAAQ,gBAAgB,KAAK,OAAO;AAC9D,QAAK,cAAc,SAAS;AAC5B,QAAK,KAAK,gBAAgB,aAAa,MAAM,SAAS;AACtD,QAAK,KAAK,gBAAgB,aAAa,SAAS;AAChD,UAAO;;;AAGf,SAAQ,qBAAqB"}
@@ -1,66 +0,0 @@
1
- import { __commonJSMin } from "../../../../../../../_virtual/rolldown_runtime.mjs";
2
- import { require_utils } from "../utils.mjs";
3
- import { require_execute_operation } from "../operations/execute_operation.mjs";
4
- import { require_client_bulk_write } from "../operations/client_bulk_write/client_bulk_write.mjs";
5
- import { require_abstract_cursor } from "./abstract_cursor.mjs";
6
-
7
- //#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/client_bulk_write_cursor.js
8
- var require_client_bulk_write_cursor = /* @__PURE__ */ __commonJSMin(((exports) => {
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.ClientBulkWriteCursor = void 0;
11
- const client_bulk_write_1 = require_client_bulk_write();
12
- const execute_operation_1 = require_execute_operation();
13
- const utils_1 = require_utils();
14
- const abstract_cursor_1 = require_abstract_cursor();
15
- /**
16
- * This is the cursor that handles client bulk write operations. Note this is never
17
- * exposed directly to the user and is always immediately exhausted.
18
- * @internal
19
- */
20
- var ClientBulkWriteCursor = class ClientBulkWriteCursor extends abstract_cursor_1.AbstractCursor {
21
- /** @internal */
22
- constructor(client, commandBuilder, options = {}) {
23
- super(client, new utils_1.MongoDBNamespace("admin", "$cmd"), options);
24
- this.commandBuilder = commandBuilder;
25
- this.clientBulkWriteOptions = options;
26
- }
27
- /**
28
- * We need a way to get the top level cursor response fields for
29
- * generating the bulk write result, so we expose this here.
30
- */
31
- get response() {
32
- if (this.cursorResponse) return this.cursorResponse;
33
- return null;
34
- }
35
- get operations() {
36
- return this.commandBuilder.lastOperations;
37
- }
38
- clone() {
39
- const clonedOptions = (0, utils_1.mergeOptions)({}, this.clientBulkWriteOptions);
40
- delete clonedOptions.session;
41
- return new ClientBulkWriteCursor(this.client, this.commandBuilder, { ...clonedOptions });
42
- }
43
- /** @internal */
44
- async _initialize(session) {
45
- const clientBulkWriteOperation = new client_bulk_write_1.ClientBulkWriteOperation(this.commandBuilder, {
46
- ...this.clientBulkWriteOptions,
47
- ...this.cursorOptions,
48
- session
49
- });
50
- const response = await (0, execute_operation_1.executeOperation)(this.client, clientBulkWriteOperation, this.timeoutContext);
51
- this.cursorResponse = response;
52
- return {
53
- server: clientBulkWriteOperation.server,
54
- session,
55
- response
56
- };
57
- }
58
- };
59
- exports.ClientBulkWriteCursor = ClientBulkWriteCursor;
60
- }));
61
-
62
- //#endregion
63
- export default require_client_bulk_write_cursor();
64
-
65
- export { require_client_bulk_write_cursor };
66
- //# sourceMappingURL=client_bulk_write_cursor.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client_bulk_write_cursor.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/client_bulk_write_cursor.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ClientBulkWriteCursor = void 0;\nconst client_bulk_write_1 = require(\"../operations/client_bulk_write/client_bulk_write\");\nconst execute_operation_1 = require(\"../operations/execute_operation\");\nconst utils_1 = require(\"../utils\");\nconst abstract_cursor_1 = require(\"./abstract_cursor\");\n/**\n * This is the cursor that handles client bulk write operations. Note this is never\n * exposed directly to the user and is always immediately exhausted.\n * @internal\n */\nclass ClientBulkWriteCursor extends abstract_cursor_1.AbstractCursor {\n /** @internal */\n constructor(client, commandBuilder, options = {}) {\n super(client, new utils_1.MongoDBNamespace('admin', '$cmd'), options);\n this.commandBuilder = commandBuilder;\n this.clientBulkWriteOptions = options;\n }\n /**\n * We need a way to get the top level cursor response fields for\n * generating the bulk write result, so we expose this here.\n */\n get response() {\n if (this.cursorResponse)\n return this.cursorResponse;\n return null;\n }\n get operations() {\n return this.commandBuilder.lastOperations;\n }\n clone() {\n const clonedOptions = (0, utils_1.mergeOptions)({}, this.clientBulkWriteOptions);\n delete clonedOptions.session;\n return new ClientBulkWriteCursor(this.client, this.commandBuilder, {\n ...clonedOptions\n });\n }\n /** @internal */\n async _initialize(session) {\n const clientBulkWriteOperation = new client_bulk_write_1.ClientBulkWriteOperation(this.commandBuilder, {\n ...this.clientBulkWriteOptions,\n ...this.cursorOptions,\n session\n });\n const response = await (0, execute_operation_1.executeOperation)(this.client, clientBulkWriteOperation, this.timeoutContext);\n this.cursorResponse = response;\n return { server: clientBulkWriteOperation.server, session, response };\n }\n}\nexports.ClientBulkWriteCursor = ClientBulkWriteCursor;\n//# sourceMappingURL=client_bulk_write_cursor.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;AACA,QAAO,eAAe,SAAS,cAAc,EAAE,OAAO,MAAM,CAAC;AAC7D,SAAQ,wBAAwB,KAAK;CACrC,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;;;;;;CAMN,IAAM,wBAAN,MAAM,8BAA8B,kBAAkB,eAAe;;EAEjE,YAAY,QAAQ,gBAAgB,UAAU,EAAE,EAAE;AAC9C,SAAM,QAAQ,IAAI,QAAQ,iBAAiB,SAAS,OAAO,EAAE,QAAQ;AACrE,QAAK,iBAAiB;AACtB,QAAK,yBAAyB;;;;;;EAMlC,IAAI,WAAW;AACX,OAAI,KAAK,eACL,QAAO,KAAK;AAChB,UAAO;;EAEX,IAAI,aAAa;AACb,UAAO,KAAK,eAAe;;EAE/B,QAAQ;GACJ,MAAM,iBAAiB,GAAG,QAAQ,cAAc,EAAE,EAAE,KAAK,uBAAuB;AAChF,UAAO,cAAc;AACrB,UAAO,IAAI,sBAAsB,KAAK,QAAQ,KAAK,gBAAgB,EAC/D,GAAG,eACN,CAAC;;;EAGN,MAAM,YAAY,SAAS;GACvB,MAAM,2BAA2B,IAAI,oBAAoB,yBAAyB,KAAK,gBAAgB;IACnG,GAAG,KAAK;IACR,GAAG,KAAK;IACR;IACH,CAAC;GACF,MAAM,WAAW,OAAO,GAAG,oBAAoB,kBAAkB,KAAK,QAAQ,0BAA0B,KAAK,eAAe;AAC5H,QAAK,iBAAiB;AACtB,UAAO;IAAE,QAAQ,yBAAyB;IAAQ;IAAS;IAAU;;;AAG7E,SAAQ,wBAAwB"}
@@ -1,41 +0,0 @@
1
- import { __commonJSMin } from "../../../../../../../_virtual/rolldown_runtime.mjs";
2
- import { require_abstract_cursor } from "./abstract_cursor.mjs";
3
-
4
- //#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/explainable_cursor.js
5
- var require_explainable_cursor = /* @__PURE__ */ __commonJSMin(((exports) => {
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.ExplainableCursor = void 0;
8
- const abstract_cursor_1 = require_abstract_cursor();
9
- /**
10
- * @public
11
- *
12
- * A base class for any cursors that have `explain()` methods.
13
- */
14
- var ExplainableCursor = class extends abstract_cursor_1.AbstractCursor {
15
- resolveExplainTimeoutOptions(verbosity, options) {
16
- let explain;
17
- let timeout;
18
- if (verbosity == null && options == null) {
19
- explain = void 0;
20
- timeout = void 0;
21
- } else if (verbosity != null && options == null) {
22
- explain = typeof verbosity !== "object" ? verbosity : "verbosity" in verbosity ? verbosity : void 0;
23
- timeout = typeof verbosity === "object" && "timeoutMS" in verbosity ? verbosity : void 0;
24
- } else {
25
- explain = verbosity;
26
- timeout = options;
27
- }
28
- return {
29
- timeout,
30
- explain
31
- };
32
- }
33
- };
34
- exports.ExplainableCursor = ExplainableCursor;
35
- }));
36
-
37
- //#endregion
38
- export default require_explainable_cursor();
39
-
40
- export { require_explainable_cursor };
41
- //# sourceMappingURL=explainable_cursor.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"explainable_cursor.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/explainable_cursor.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ExplainableCursor = void 0;\nconst abstract_cursor_1 = require(\"./abstract_cursor\");\n/**\n * @public\n *\n * A base class for any cursors that have `explain()` methods.\n */\nclass ExplainableCursor extends abstract_cursor_1.AbstractCursor {\n resolveExplainTimeoutOptions(verbosity, options) {\n let explain;\n let timeout;\n if (verbosity == null && options == null) {\n explain = undefined;\n timeout = undefined;\n }\n else if (verbosity != null && options == null) {\n explain =\n typeof verbosity !== 'object'\n ? verbosity\n : 'verbosity' in verbosity\n ? verbosity\n : undefined;\n timeout = typeof verbosity === 'object' && 'timeoutMS' in verbosity ? verbosity : undefined;\n }\n else {\n // @ts-expect-error TS isn't smart enough to determine that if both options are provided, the first is explain options\n explain = verbosity;\n timeout = options;\n }\n return { timeout, explain };\n }\n}\nexports.ExplainableCursor = ExplainableCursor;\n//# sourceMappingURL=explainable_cursor.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;AACA,QAAO,eAAe,SAAS,cAAc,EAAE,OAAO,MAAM,CAAC;AAC7D,SAAQ,oBAAoB,KAAK;CACjC,MAAM;;;;;;CAMN,IAAM,oBAAN,cAAgC,kBAAkB,eAAe;EAC7D,6BAA6B,WAAW,SAAS;GAC7C,IAAI;GACJ,IAAI;AACJ,OAAI,aAAa,QAAQ,WAAW,MAAM;AACtC,cAAU;AACV,cAAU;cAEL,aAAa,QAAQ,WAAW,MAAM;AAC3C,cACI,OAAO,cAAc,WACf,YACA,eAAe,YACX,YACA;AACd,cAAU,OAAO,cAAc,YAAY,eAAe,YAAY,YAAY;UAEjF;AAED,cAAU;AACV,cAAU;;AAEd,UAAO;IAAE;IAAS;IAAS;;;AAGnC,SAAQ,oBAAoB"}