pecunia-root 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (326) hide show
  1. package/dist/adapters/prisma-adapter/index.d.mts +1 -1
  2. package/dist/adapters/prisma-adapter/index.mjs +1 -1
  3. package/dist/adapters/prisma-adapter/index.mjs.map +1 -1
  4. package/dist/index.d.mts +1 -2
  5. package/dist/index.mjs +1 -2
  6. package/package.json +2 -16
  7. package/dist/_virtual/rolldown_runtime.mjs +0 -8
  8. package/dist/adapters/mongodb-adapter/index.d.mts +0 -35
  9. package/dist/adapters/mongodb-adapter/index.mjs +0 -314
  10. package/dist/adapters/mongodb-adapter/index.mjs.map +0 -1
  11. package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/code-points-data.mjs +0 -14
  12. package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/code-points-data.mjs.map +0 -1
  13. package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/index.mjs +0 -54
  14. package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/index.mjs.map +0 -1
  15. package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/memory-code-points.mjs +0 -36
  16. package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/memory-code-points.mjs.map +0 -1
  17. package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/node.mjs +0 -27
  18. package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/node.mjs.map +0 -1
  19. package/dist/node_modules/.pnpm/bson@6.10.4/node_modules/bson/lib/bson.mjs +0 -3728
  20. package/dist/node_modules/.pnpm/bson@6.10.4/node_modules/bson/lib/bson.mjs.map +0 -1
  21. package/dist/node_modules/.pnpm/memory-pager@1.5.0/node_modules/memory-pager/index.mjs +0 -137
  22. package/dist/node_modules/.pnpm/memory-pager@1.5.0/node_modules/memory-pager/index.mjs.map +0 -1
  23. package/dist/node_modules/.pnpm/mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/index.mjs +0 -211
  24. package/dist/node_modules/.pnpm/mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/index.mjs.map +0 -1
  25. package/dist/node_modules/.pnpm/mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/redact.mjs +0 -95
  26. package/dist/node_modules/.pnpm/mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/redact.mjs.map +0 -1
  27. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/admin.mjs +0 -158
  28. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/admin.mjs.map +0 -1
  29. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bson.mjs +0 -195
  30. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bson.mjs.map +0 -1
  31. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/common.mjs +0 -710
  32. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/common.mjs.map +0 -1
  33. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/ordered.mjs +0 -53
  34. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/ordered.mjs.map +0 -1
  35. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/unordered.mjs +0 -63
  36. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/unordered.mjs.map +0 -1
  37. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/change_stream.mjs +0 -368
  38. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/change_stream.mjs.map +0 -1
  39. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/auto_encrypter.mjs +0 -234
  40. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/auto_encrypter.mjs.map +0 -1
  41. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/client_encryption.mjs +0 -545
  42. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/client_encryption.mjs.map +0 -1
  43. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/crypto_callbacks.mjs +0 -83
  44. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/crypto_callbacks.mjs.map +0 -1
  45. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/errors.mjs +0 -146
  46. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/errors.mjs.map +0 -1
  47. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/mongocryptd_manager.mjs +0 -58
  48. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/mongocryptd_manager.mjs.map +0 -1
  49. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/aws.mjs +0 -30
  50. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/aws.mjs.map +0 -1
  51. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/azure.mjs +0 -135
  52. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/azure.mjs.map +0 -1
  53. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/gcp.mjs +0 -25
  54. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/gcp.mjs.map +0 -1
  55. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/index.mjs +0 -47
  56. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/index.mjs.map +0 -1
  57. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/state_machine.mjs +0 -362
  58. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/state_machine.mjs.map +0 -1
  59. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/auth_provider.mjs +0 -58
  60. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/auth_provider.mjs.map +0 -1
  61. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/aws_temporary_credentials.mjs +0 -123
  62. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/aws_temporary_credentials.mjs.map +0 -1
  63. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/gssapi.mjs +0 -128
  64. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/gssapi.mjs.map +0 -1
  65. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongo_credentials.mjs +0 -133
  66. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongo_credentials.mjs.map +0 -1
  67. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_aws.mjs +0 -126
  68. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_aws.mjs.map +0 -1
  69. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/automated_callback_workflow.mjs +0 -79
  70. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/automated_callback_workflow.mjs.map +0 -1
  71. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_machine_workflow.mjs +0 -65
  72. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_machine_workflow.mjs.map +0 -1
  73. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_workflow.mjs +0 -127
  74. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_workflow.mjs.map +0 -1
  75. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/command_builders.mjs +0 -47
  76. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/command_builders.mjs.map +0 -1
  77. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/gcp_machine_workflow.mjs +0 -44
  78. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/gcp_machine_workflow.mjs.map +0 -1
  79. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/human_callback_workflow.mjs +0 -101
  80. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/human_callback_workflow.mjs.map +0 -1
  81. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/k8s_machine_workflow.mjs +0 -33
  82. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/k8s_machine_workflow.mjs.map +0 -1
  83. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_cache.mjs +0 -53
  84. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_cache.mjs.map +0 -1
  85. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_machine_workflow.mjs +0 -29
  86. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_machine_workflow.mjs.map +0 -1
  87. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc.mjs +0 -83
  88. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc.mjs.map +0 -1
  89. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/plain.mjs +0 -36
  90. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/plain.mjs.map +0 -1
  91. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/providers.mjs +0 -32
  92. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/providers.mjs.map +0 -1
  93. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/scram.mjs +0 -206
  94. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/scram.mjs.map +0 -1
  95. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/x509.mjs +0 -45
  96. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/x509.mjs.map +0 -1
  97. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/command_monitoring_events.mjs +0 -213
  98. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/command_monitoring_events.mjs.map +0 -1
  99. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/commands.mjs +0 -411
  100. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/commands.mjs.map +0 -1
  101. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connect.mjs +0 -288
  102. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connect.mjs.map +0 -1
  103. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection.mjs +0 -423
  104. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection.mjs.map +0 -1
  105. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool.mjs +0 -483
  106. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool.mjs.map +0 -1
  107. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool_events.mjs +0 -207
  108. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool_events.mjs.map +0 -1
  109. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/errors.mjs +0 -116
  110. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/errors.mjs.map +0 -1
  111. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/handshake/client_metadata.mjs +0 -183
  112. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/handshake/client_metadata.mjs.map +0 -1
  113. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/metrics.mjs +0 -55
  114. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/metrics.mjs.map +0 -1
  115. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/stream_description.mjs +0 -60
  116. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/stream_description.mjs.map +0 -1
  117. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/compression.mjs +0 -139
  118. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/compression.mjs.map +0 -1
  119. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/constants.mjs +0 -28
  120. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/constants.mjs.map +0 -1
  121. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_data.mjs +0 -117
  122. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_data.mjs.map +0 -1
  123. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_demand/document.mjs +0 -182
  124. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_demand/document.mjs.map +0 -1
  125. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/responses.mjs +0 -304
  126. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/responses.mjs.map +0 -1
  127. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/shared.mjs +0 -34
  128. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/shared.mjs.map +0 -1
  129. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/collection.mjs +0 -739
  130. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/collection.mjs.map +0 -1
  131. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/connection_string.mjs +0 -805
  132. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/connection_string.mjs.map +0 -1
  133. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/constants.mjs +0 -174
  134. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/constants.mjs.map +0 -1
  135. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/abstract_cursor.mjs +0 -726
  136. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/abstract_cursor.mjs.map +0 -1
  137. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/aggregation_cursor.mjs +0 -172
  138. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/aggregation_cursor.mjs.map +0 -1
  139. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/change_stream_cursor.mjs +0 -103
  140. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/change_stream_cursor.mjs.map +0 -1
  141. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/client_bulk_write_cursor.mjs +0 -66
  142. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/client_bulk_write_cursor.mjs.map +0 -1
  143. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/explainable_cursor.mjs +0 -41
  144. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/explainable_cursor.mjs.map +0 -1
  145. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/find_cursor.mjs +0 -365
  146. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/find_cursor.mjs.map +0 -1
  147. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_collections_cursor.mjs +0 -50
  148. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_collections_cursor.mjs.map +0 -1
  149. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_indexes_cursor.mjs +0 -48
  150. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_indexes_cursor.mjs.map +0 -1
  151. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_search_indexes_cursor.mjs +0 -23
  152. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_search_indexes_cursor.mjs.map +0 -1
  153. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/run_command_cursor.mjs +0 -106
  154. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/run_command_cursor.mjs.map +0 -1
  155. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/db.mjs +0 -428
  156. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/db.mjs.map +0 -1
  157. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/deps.mjs +0 -124
  158. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/deps.mjs.map +0 -1
  159. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/encrypter.mjs +0 -95
  160. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/encrypter.mjs.map +0 -1
  161. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/error.mjs +0 -1305
  162. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/error.mjs.map +0 -1
  163. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/explain.mjs +0 -59
  164. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/explain.mjs.map +0 -1
  165. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/download.mjs +0 -250
  166. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/download.mjs.map +0 -1
  167. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/index.mjs +0 -170
  168. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/index.mjs.map +0 -1
  169. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/upload.mjs +0 -315
  170. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/upload.mjs.map +0 -1
  171. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/index.mjs +0 -925
  172. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/index.mjs.map +0 -1
  173. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client.mjs +0 -520
  174. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client.mjs.map +0 -1
  175. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client_auth_providers.mjs +0 -90
  176. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client_auth_providers.mjs.map +0 -1
  177. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_logger.mjs +0 -582
  178. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_logger.mjs.map +0 -1
  179. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_types.mjs +0 -64
  180. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_types.mjs.map +0 -1
  181. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/aggregate.mjs +0 -86
  182. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/aggregate.mjs.map +0 -1
  183. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/client_bulk_write.mjs +0 -60
  184. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/client_bulk_write.mjs.map +0 -1
  185. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/command_builder.mjs +0 -264
  186. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/command_builder.mjs.map +0 -1
  187. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/executor.mjs +0 -109
  188. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/executor.mjs.map +0 -1
  189. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/results_merger.mjs +0 -172
  190. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/results_merger.mjs.map +0 -1
  191. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/command.mjs +0 -68
  192. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/command.mjs.map +0 -1
  193. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/count.mjs +0 -53
  194. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/count.mjs.map +0 -1
  195. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/create_collection.mjs +0 -123
  196. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/create_collection.mjs.map +0 -1
  197. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/delete.mjs +0 -119
  198. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/delete.mjs.map +0 -1
  199. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/distinct.mjs +0 -65
  200. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/distinct.mjs.map +0 -1
  201. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/drop.mjs +0 -97
  202. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/drop.mjs.map +0 -1
  203. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/estimated_document_count.mjs +0 -47
  204. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/estimated_document_count.mjs.map +0 -1
  205. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/execute_operation.mjs +0 -188
  206. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/execute_operation.mjs.map +0 -1
  207. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find.mjs +0 -103
  208. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find.mjs.map +0 -1
  209. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find_and_modify.mjs +0 -136
  210. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find_and_modify.mjs.map +0 -1
  211. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/get_more.mjs +0 -61
  212. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/get_more.mjs.map +0 -1
  213. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/indexes.mjs +0 -179
  214. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/indexes.mjs.map +0 -1
  215. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/insert.mjs +0 -77
  216. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/insert.mjs.map +0 -1
  217. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/kill_cursors.mjs +0 -48
  218. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/kill_cursors.mjs.map +0 -1
  219. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_collections.mjs +0 -60
  220. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_collections.mjs.map +0 -1
  221. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_databases.mjs +0 -43
  222. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_databases.mjs.map +0 -1
  223. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/operation.mjs +0 -105
  224. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/operation.mjs.map +0 -1
  225. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/profiling_level.mjs +0 -50
  226. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/profiling_level.mjs.map +0 -1
  227. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/remove_user.mjs +0 -39
  228. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/remove_user.mjs.map +0 -1
  229. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/rename.mjs +0 -49
  230. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/rename.mjs.map +0 -1
  231. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/run_command.mjs +0 -58
  232. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/run_command.mjs.map +0 -1
  233. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/create.mjs +0 -46
  234. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/create.mjs.map +0 -1
  235. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/drop.mjs +0 -48
  236. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/drop.mjs.map +0 -1
  237. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/update.mjs +0 -46
  238. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/update.mjs.map +0 -1
  239. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/set_profiling_level.mjs +0 -67
  240. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/set_profiling_level.mjs.map +0 -1
  241. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/stats.mjs +0 -37
  242. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/stats.mjs.map +0 -1
  243. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/update.mjs +0 -171
  244. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/update.mjs.map +0 -1
  245. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/validate_collection.mjs +0 -45
  246. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/validate_collection.mjs.map +0 -1
  247. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_concern.mjs +0 -71
  248. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_concern.mjs.map +0 -1
  249. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_preference.mjs +0 -165
  250. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_preference.mjs.map +0 -1
  251. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/resource_management.mjs +0 -62
  252. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/resource_management.mjs.map +0 -1
  253. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/common.mjs +0 -51
  254. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/common.mjs.map +0 -1
  255. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/events.mjs +0 -156
  256. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/events.mjs.map +0 -1
  257. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/monitor.mjs +0 -477
  258. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/monitor.mjs.map +0 -1
  259. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server.mjs +0 -315
  260. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server.mjs.map +0 -1
  261. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_description.mjs +0 -157
  262. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_description.mjs.map +0 -1
  263. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection.mjs +0 -184
  264. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection.mjs.map +0 -1
  265. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection_events.mjs +0 -96
  266. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection_events.mjs.map +0 -1
  267. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/srv_polling.mjs +0 -107
  268. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/srv_polling.mjs.map +0 -1
  269. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology.mjs +0 -540
  270. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology.mjs.map +0 -1
  271. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology_description.mjs +0 -298
  272. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology_description.mjs.map +0 -1
  273. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sessions.mjs +0 -623
  274. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sessions.mjs.map +0 -1
  275. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sort.mjs +0 -91
  276. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sort.mjs.map +0 -1
  277. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/timeout.mjs +0 -254
  278. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/timeout.mjs.map +0 -1
  279. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/transactions.mjs +0 -138
  280. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/transactions.mjs.map +0 -1
  281. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/utils.mjs +0 -993
  282. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/utils.mjs.map +0 -1
  283. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/write_concern.mjs +0 -81
  284. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/write_concern.mjs.map +0 -1
  285. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/package.mjs +0 -171
  286. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/package.mjs.map +0 -1
  287. package/dist/node_modules/.pnpm/punycode@2.3.1/node_modules/punycode/punycode.mjs +0 -295
  288. package/dist/node_modules/.pnpm/punycode@2.3.1/node_modules/punycode/punycode.mjs.map +0 -1
  289. package/dist/node_modules/.pnpm/sparse-bitfield@3.0.3/node_modules/sparse-bitfield/index.mjs +0 -81
  290. package/dist/node_modules/.pnpm/sparse-bitfield@3.0.3/node_modules/sparse-bitfield/index.mjs.map +0 -1
  291. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/index.mjs +0 -206
  292. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/index.mjs.map +0 -1
  293. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/mappingTable.mjs +0 -33590
  294. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/mappingTable.mjs.map +0 -1
  295. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/regexes.mjs +0 -37
  296. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/regexes.mjs.map +0 -1
  297. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/statusMapping.mjs +0 -18
  298. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/statusMapping.mjs.map +0 -1
  299. package/dist/node_modules/.pnpm/webidl-conversions@7.0.0/node_modules/webidl-conversions/lib/index.mjs +0 -252
  300. package/dist/node_modules/.pnpm/webidl-conversions@7.0.0/node_modules/webidl-conversions/lib/index.mjs.map +0 -1
  301. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/index.mjs +0 -41
  302. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/index.mjs.map +0 -1
  303. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/Function.mjs +0 -41
  304. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/Function.mjs.map +0 -1
  305. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL-impl.mjs +0 -173
  306. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL-impl.mjs.map +0 -1
  307. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL.mjs +0 -334
  308. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL.mjs.map +0 -1
  309. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams-impl.mjs +0 -90
  310. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams-impl.mjs.map +0 -1
  311. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams.mjs +0 -356
  312. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams.mjs.map +0 -1
  313. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/encoding.mjs +0 -23
  314. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/encoding.mjs.map +0 -1
  315. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/infra.mjs +0 -29
  316. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/infra.mjs.map +0 -1
  317. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/percent-encoding.mjs +0 -140
  318. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/percent-encoding.mjs.map +0 -1
  319. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/url-state-machine.mjs +0 -831
  320. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/url-state-machine.mjs.map +0 -1
  321. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/urlencoded.mjs +0 -77
  322. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/urlencoded.mjs.map +0 -1
  323. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/utils.mjs +0 -147
  324. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/utils.mjs.map +0 -1
  325. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/webidl2js-wrapper.mjs +0 -17
  326. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/webidl2js-wrapper.mjs.map +0 -1
@@ -1,993 +0,0 @@
1
- import { __commonJSMin, __require } from "../../../../../../_virtual/rolldown_runtime.mjs";
2
- import { require_bson } from "./bson.mjs";
3
- import { require_error } from "./error.mjs";
4
- import { require_read_preference } from "./read_preference.mjs";
5
- import { require_common } from "./sdam/common.mjs";
6
- import { require_constants } from "./cmap/wire_protocol/constants.mjs";
7
- import { require_constants as require_constants$1 } from "./constants.mjs";
8
- import { require_read_concern } from "./read_concern.mjs";
9
- import { require_write_concern } from "./write_concern.mjs";
10
-
11
- //#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/utils.js
12
- var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.kDispose = exports.randomBytes = exports.COSMOS_DB_MSG = exports.DOCUMENT_DB_MSG = exports.COSMOS_DB_CHECK = exports.DOCUMENT_DB_CHECK = exports.MONGODB_WARNING_CODE = exports.DEFAULT_PK_FACTORY = exports.HostAddress = exports.BufferPool = exports.List = exports.MongoDBCollectionNamespace = exports.MongoDBNamespace = exports.ByteUtils = void 0;
15
- exports.isUint8Array = isUint8Array;
16
- exports.hostMatchesWildcards = hostMatchesWildcards;
17
- exports.normalizeHintField = normalizeHintField;
18
- exports.isObject = isObject;
19
- exports.mergeOptions = mergeOptions;
20
- exports.filterOptions = filterOptions;
21
- exports.applyRetryableWrites = applyRetryableWrites;
22
- exports.isPromiseLike = isPromiseLike;
23
- exports.decorateWithCollation = decorateWithCollation;
24
- exports.decorateWithReadConcern = decorateWithReadConcern;
25
- exports.getTopology = getTopology;
26
- exports.ns = ns;
27
- exports.makeCounter = makeCounter;
28
- exports.uuidV4 = uuidV4;
29
- exports.maxWireVersion = maxWireVersion;
30
- exports.arrayStrictEqual = arrayStrictEqual;
31
- exports.errorStrictEqual = errorStrictEqual;
32
- exports.makeStateMachine = makeStateMachine;
33
- exports.now = now;
34
- exports.calculateDurationInMs = calculateDurationInMs;
35
- exports.hasAtomicOperators = hasAtomicOperators;
36
- exports.resolveTimeoutOptions = resolveTimeoutOptions;
37
- exports.resolveOptions = resolveOptions;
38
- exports.isSuperset = isSuperset;
39
- exports.isHello = isHello;
40
- exports.setDifference = setDifference;
41
- exports.isRecord = isRecord;
42
- exports.emitWarning = emitWarning;
43
- exports.emitWarningOnce = emitWarningOnce;
44
- exports.enumToString = enumToString;
45
- exports.supportsRetryableWrites = supportsRetryableWrites;
46
- exports.shuffle = shuffle;
47
- exports.commandSupportsReadConcern = commandSupportsReadConcern;
48
- exports.compareObjectId = compareObjectId;
49
- exports.parseInteger = parseInteger;
50
- exports.parseUnsignedInteger = parseUnsignedInteger;
51
- exports.checkParentDomainMatch = checkParentDomainMatch;
52
- exports.get = get;
53
- exports.request = request;
54
- exports.isHostMatch = isHostMatch;
55
- exports.promiseWithResolvers = promiseWithResolvers;
56
- exports.squashError = squashError;
57
- exports.once = once;
58
- exports.maybeAddIdToDocuments = maybeAddIdToDocuments;
59
- exports.fileIsAccessible = fileIsAccessible;
60
- exports.csotMin = csotMin;
61
- exports.noop = noop;
62
- exports.decorateDecryptionResult = decorateDecryptionResult;
63
- exports.addAbortListener = addAbortListener;
64
- exports.abortable = abortable;
65
- const crypto = __require("crypto");
66
- const fs_1 = __require("fs");
67
- const http = __require("http");
68
- const timers_1 = __require("timers");
69
- const url = __require("url");
70
- const url_1 = __require("url");
71
- const util_1 = __require("util");
72
- const bson_1 = require_bson();
73
- const constants_1 = require_constants();
74
- const constants_2 = require_constants$1();
75
- const error_1 = require_error();
76
- const read_concern_1 = require_read_concern();
77
- const read_preference_1 = require_read_preference();
78
- const common_1 = require_common();
79
- const write_concern_1 = require_write_concern();
80
- exports.ByteUtils = {
81
- toLocalBufferType(buffer) {
82
- return Buffer.isBuffer(buffer) ? buffer : Buffer.from(buffer.buffer, buffer.byteOffset, buffer.byteLength);
83
- },
84
- equals(seqA, seqB) {
85
- return exports.ByteUtils.toLocalBufferType(seqA).equals(seqB);
86
- },
87
- compare(seqA, seqB) {
88
- return exports.ByteUtils.toLocalBufferType(seqA).compare(seqB);
89
- },
90
- toBase64(uint8array) {
91
- return exports.ByteUtils.toLocalBufferType(uint8array).toString("base64");
92
- }
93
- };
94
- /**
95
- * Returns true if value is a Uint8Array or a Buffer
96
- * @param value - any value that may be a Uint8Array
97
- */
98
- function isUint8Array(value) {
99
- return value != null && typeof value === "object" && Symbol.toStringTag in value && value[Symbol.toStringTag] === "Uint8Array";
100
- }
101
- /**
102
- * Determines if a connection's address matches a user provided list
103
- * of domain wildcards.
104
- */
105
- function hostMatchesWildcards(host, wildcards) {
106
- for (const wildcard of wildcards) if (host === wildcard || wildcard.startsWith("*.") && host?.endsWith(wildcard.substring(2, wildcard.length)) || wildcard.startsWith("*/") && host?.endsWith(wildcard.substring(2, wildcard.length))) return true;
107
- return false;
108
- }
109
- /**
110
- * Ensure Hint field is in a shape we expect:
111
- * - object of index names mapping to 1 or -1
112
- * - just an index name
113
- * @internal
114
- */
115
- function normalizeHintField(hint) {
116
- let finalHint = void 0;
117
- if (typeof hint === "string") finalHint = hint;
118
- else if (Array.isArray(hint)) {
119
- finalHint = {};
120
- hint.forEach((param) => {
121
- finalHint[param] = 1;
122
- });
123
- } else if (hint != null && typeof hint === "object") {
124
- finalHint = {};
125
- for (const name in hint) finalHint[name] = hint[name];
126
- }
127
- return finalHint;
128
- }
129
- const TO_STRING = (object) => Object.prototype.toString.call(object);
130
- /**
131
- * Checks if arg is an Object:
132
- * - **NOTE**: the check is based on the `[Symbol.toStringTag]() === 'Object'`
133
- * @internal
134
- */
135
- function isObject(arg) {
136
- return "[object Object]" === TO_STRING(arg);
137
- }
138
- /** @internal */
139
- function mergeOptions(target, source) {
140
- return {
141
- ...target,
142
- ...source
143
- };
144
- }
145
- /** @internal */
146
- function filterOptions(options, names) {
147
- const filterOptions = {};
148
- for (const name in options) if (names.includes(name)) filterOptions[name] = options[name];
149
- return filterOptions;
150
- }
151
- /**
152
- * Applies retryWrites: true to a command if retryWrites is set on the command's database.
153
- * @internal
154
- *
155
- * @param target - The target command to which we will apply retryWrites.
156
- * @param db - The database from which we can inherit a retryWrites value.
157
- */
158
- function applyRetryableWrites(target, db) {
159
- if (db && db.s.options?.retryWrites) target.retryWrites = true;
160
- return target;
161
- }
162
- /**
163
- * Applies a write concern to a command based on well defined inheritance rules, optionally
164
- * detecting support for the write concern in the first place.
165
- * @internal
166
- *
167
- * @param target - the target command we will be applying the write concern to
168
- * @param sources - sources where we can inherit default write concerns from
169
- * @param options - optional settings passed into a command for write concern overrides
170
- */
171
- /**
172
- * Checks if a given value is a Promise
173
- *
174
- * @typeParam T - The resolution type of the possible promise
175
- * @param value - An object that could be a promise
176
- * @returns true if the provided value is a Promise
177
- */
178
- function isPromiseLike(value) {
179
- return value != null && typeof value === "object" && "then" in value && typeof value.then === "function";
180
- }
181
- /**
182
- * Applies collation to a given command.
183
- * @internal
184
- *
185
- * @param command - the command on which to apply collation
186
- * @param target - target of command
187
- * @param options - options containing collation settings
188
- */
189
- function decorateWithCollation(command, options) {
190
- if (options.collation && typeof options.collation === "object") command.collation = options.collation;
191
- }
192
- /**
193
- * Applies a read concern to a given command.
194
- * @internal
195
- *
196
- * @param command - the command on which to apply the read concern
197
- * @param coll - the parent collection of the operation calling this method
198
- */
199
- function decorateWithReadConcern(command, coll, options) {
200
- if (options && options.session && options.session.inTransaction()) return;
201
- const readConcern = Object.assign({}, command.readConcern || {});
202
- if (coll.s.readConcern) Object.assign(readConcern, coll.s.readConcern);
203
- if (Object.keys(readConcern).length > 0) Object.assign(command, { readConcern });
204
- }
205
- /**
206
- * A helper function to get the topology from a given provider. Throws
207
- * if the topology cannot be found.
208
- * @throws MongoNotConnectedError
209
- * @internal
210
- */
211
- function getTopology(provider) {
212
- if ("topology" in provider && provider.topology) return provider.topology;
213
- else if ("client" in provider && provider.client.topology) return provider.client.topology;
214
- throw new error_1.MongoNotConnectedError("MongoClient must be connected to perform this operation");
215
- }
216
- /** @internal */
217
- function ns(ns) {
218
- return MongoDBNamespace.fromString(ns);
219
- }
220
- /** @public */
221
- var MongoDBNamespace = class MongoDBNamespace {
222
- /**
223
- * Create a namespace object
224
- *
225
- * @param db - database name
226
- * @param collection - collection name
227
- */
228
- constructor(db, collection) {
229
- this.db = db;
230
- this.collection = collection === "" ? void 0 : collection;
231
- }
232
- toString() {
233
- return this.collection ? `${this.db}.${this.collection}` : this.db;
234
- }
235
- withCollection(collection) {
236
- return new MongoDBCollectionNamespace(this.db, collection);
237
- }
238
- static fromString(namespace) {
239
- if (typeof namespace !== "string" || namespace === "") throw new error_1.MongoRuntimeError(`Cannot parse namespace from "${namespace}"`);
240
- const [db, ...collectionParts] = namespace.split(".");
241
- const collection = collectionParts.join(".");
242
- return new MongoDBNamespace(db, collection === "" ? void 0 : collection);
243
- }
244
- };
245
- exports.MongoDBNamespace = MongoDBNamespace;
246
- /**
247
- * @public
248
- *
249
- * A class representing a collection's namespace. This class enforces (through Typescript) that
250
- * the `collection` portion of the namespace is defined and should only be
251
- * used in scenarios where this can be guaranteed.
252
- */
253
- var MongoDBCollectionNamespace = class extends MongoDBNamespace {
254
- constructor(db, collection) {
255
- super(db, collection);
256
- this.collection = collection;
257
- }
258
- static fromString(namespace) {
259
- return super.fromString(namespace);
260
- }
261
- };
262
- exports.MongoDBCollectionNamespace = MongoDBCollectionNamespace;
263
- /** @internal */
264
- function* makeCounter(seed = 0) {
265
- let count = seed;
266
- while (true) {
267
- const newCount = count;
268
- count += 1;
269
- yield newCount;
270
- }
271
- }
272
- /**
273
- * Synchronously Generate a UUIDv4
274
- * @internal
275
- */
276
- function uuidV4() {
277
- const result = crypto.randomBytes(16);
278
- result[6] = result[6] & 15 | 64;
279
- result[8] = result[8] & 63 | 128;
280
- return result;
281
- }
282
- /**
283
- * A helper function for determining `maxWireVersion` between legacy and new topology instances
284
- * @internal
285
- */
286
- function maxWireVersion(handshakeAware) {
287
- if (handshakeAware) {
288
- if (handshakeAware.hello) return handshakeAware.hello.maxWireVersion;
289
- if (handshakeAware.serverApi?.version) return constants_1.MAX_SUPPORTED_WIRE_VERSION;
290
- if (handshakeAware.loadBalanced) return constants_1.MAX_SUPPORTED_WIRE_VERSION;
291
- if ("lastHello" in handshakeAware && typeof handshakeAware.lastHello === "function") {
292
- const lastHello = handshakeAware.lastHello();
293
- if (lastHello) return lastHello.maxWireVersion;
294
- }
295
- if (handshakeAware.description && "maxWireVersion" in handshakeAware.description && handshakeAware.description.maxWireVersion != null) return handshakeAware.description.maxWireVersion;
296
- }
297
- return 0;
298
- }
299
- /** @internal */
300
- function arrayStrictEqual(arr, arr2) {
301
- if (!Array.isArray(arr) || !Array.isArray(arr2)) return false;
302
- return arr.length === arr2.length && arr.every((elt, idx) => elt === arr2[idx]);
303
- }
304
- /** @internal */
305
- function errorStrictEqual(lhs, rhs) {
306
- if (lhs === rhs) return true;
307
- if (!lhs || !rhs) return lhs === rhs;
308
- if (lhs == null && rhs != null || lhs != null && rhs == null) return false;
309
- if (lhs.constructor.name !== rhs.constructor.name) return false;
310
- if (lhs.message !== rhs.message) return false;
311
- return true;
312
- }
313
- /** @internal */
314
- function makeStateMachine(stateTable) {
315
- return function stateTransition(target, newState) {
316
- const legalStates = stateTable[target.s.state];
317
- if (legalStates && legalStates.indexOf(newState) < 0) throw new error_1.MongoRuntimeError(`illegal state transition from [${target.s.state}] => [${newState}], allowed: [${legalStates}]`);
318
- target.emit("stateChanged", target.s.state, newState);
319
- target.s.state = newState;
320
- };
321
- }
322
- /** @internal */
323
- function now() {
324
- const hrtime = process.hrtime();
325
- return Math.floor(hrtime[0] * 1e3 + hrtime[1] / 1e6);
326
- }
327
- /** @internal */
328
- function calculateDurationInMs(started) {
329
- if (typeof started !== "number") return -1;
330
- const elapsed = now() - started;
331
- return elapsed < 0 ? 0 : elapsed;
332
- }
333
- /** @internal */
334
- function hasAtomicOperators(doc, options) {
335
- if (Array.isArray(doc)) {
336
- for (const document of doc) if (hasAtomicOperators(document)) return true;
337
- return false;
338
- }
339
- const keys = Object.keys(doc);
340
- if (options?.ignoreUndefined) {
341
- let allUndefined = true;
342
- for (const key of keys) if (doc[key] !== void 0) {
343
- allUndefined = false;
344
- break;
345
- }
346
- if (allUndefined) throw new error_1.MongoInvalidArgumentError("Update operations require that all atomic operators have defined values, but none were provided.");
347
- }
348
- return keys.length > 0 && keys[0][0] === "$";
349
- }
350
- function resolveTimeoutOptions(client, options) {
351
- const { socketTimeoutMS, serverSelectionTimeoutMS, waitQueueTimeoutMS, timeoutMS } = client.s.options;
352
- return {
353
- socketTimeoutMS,
354
- serverSelectionTimeoutMS,
355
- waitQueueTimeoutMS,
356
- timeoutMS,
357
- ...options
358
- };
359
- }
360
- /**
361
- * Merge inherited properties from parent into options, prioritizing values from options,
362
- * then values from parent.
363
- *
364
- * @param parent - An optional owning class of the operation being run. ex. Db/Collection/MongoClient.
365
- * @param options - The options passed to the operation method.
366
- *
367
- * @internal
368
- */
369
- function resolveOptions(parent, options) {
370
- const result = Object.assign({}, options, (0, bson_1.resolveBSONOptions)(options, parent));
371
- const timeoutMS = options?.timeoutMS ?? parent?.timeoutMS;
372
- const session = options?.session;
373
- if (!session?.inTransaction()) {
374
- const readConcern = read_concern_1.ReadConcern.fromOptions(options) ?? parent?.readConcern;
375
- if (readConcern) result.readConcern = readConcern;
376
- let writeConcern = write_concern_1.WriteConcern.fromOptions(options) ?? parent?.writeConcern;
377
- if (writeConcern) {
378
- if (timeoutMS != null) writeConcern = write_concern_1.WriteConcern.fromOptions({ writeConcern: {
379
- ...writeConcern,
380
- wtimeout: void 0,
381
- wtimeoutMS: void 0
382
- } });
383
- result.writeConcern = writeConcern;
384
- }
385
- }
386
- result.timeoutMS = timeoutMS;
387
- const readPreference = read_preference_1.ReadPreference.fromOptions(options) ?? parent?.readPreference;
388
- if (readPreference) result.readPreference = readPreference;
389
- if (session?.explicit && session?.timeoutContext != null && options?.timeoutMS != null) throw new error_1.MongoInvalidArgumentError("An operation cannot be given a timeoutMS setting when inside a withTransaction call that has a timeoutMS setting");
390
- return result;
391
- }
392
- function isSuperset(set, subset) {
393
- set = Array.isArray(set) ? new Set(set) : set;
394
- subset = Array.isArray(subset) ? new Set(subset) : subset;
395
- for (const elem of subset) if (!set.has(elem)) return false;
396
- return true;
397
- }
398
- /**
399
- * Checks if the document is a Hello request
400
- * @internal
401
- */
402
- function isHello(doc) {
403
- return doc[constants_2.LEGACY_HELLO_COMMAND] || doc.hello ? true : false;
404
- }
405
- /** Returns the items that are uniquely in setA */
406
- function setDifference(setA, setB) {
407
- const difference = new Set(setA);
408
- for (const elem of setB) difference.delete(elem);
409
- return difference;
410
- }
411
- const HAS_OWN = (object, prop) => Object.prototype.hasOwnProperty.call(object, prop);
412
- function isRecord(value, requiredKeys = void 0) {
413
- if (!isObject(value)) return false;
414
- const ctor = value.constructor;
415
- if (ctor && ctor.prototype) {
416
- if (!isObject(ctor.prototype)) return false;
417
- if (!HAS_OWN(ctor.prototype, "isPrototypeOf")) return false;
418
- }
419
- if (requiredKeys) return isSuperset(Object.keys(value), requiredKeys);
420
- return true;
421
- }
422
- /**
423
- * A sequential list of items in a circularly linked list
424
- * @remarks
425
- * The head node is special, it is always defined and has a value of null.
426
- * It is never "included" in the list, in that, it is not returned by pop/shift or yielded by the iterator.
427
- * The circular linkage and always defined head node are to reduce checks for null next/prev references to zero.
428
- * New nodes are declared as object literals with keys always in the same order: next, prev, value.
429
- * @internal
430
- */
431
- var List = class {
432
- get length() {
433
- return this.count;
434
- }
435
- get [Symbol.toStringTag]() {
436
- return "List";
437
- }
438
- constructor() {
439
- this.count = 0;
440
- this.head = {
441
- next: null,
442
- prev: null,
443
- value: null
444
- };
445
- this.head.next = this.head;
446
- this.head.prev = this.head;
447
- }
448
- toArray() {
449
- return Array.from(this);
450
- }
451
- toString() {
452
- return `head <=> ${this.toArray().join(" <=> ")} <=> head`;
453
- }
454
- *[Symbol.iterator]() {
455
- for (const node of this.nodes()) yield node.value;
456
- }
457
- *nodes() {
458
- let ptr = this.head.next;
459
- while (ptr !== this.head) {
460
- const { next } = ptr;
461
- yield ptr;
462
- ptr = next;
463
- }
464
- }
465
- /** Insert at end of list */
466
- push(value) {
467
- this.count += 1;
468
- const newNode = {
469
- next: this.head,
470
- prev: this.head.prev,
471
- value
472
- };
473
- this.head.prev.next = newNode;
474
- this.head.prev = newNode;
475
- }
476
- /** Inserts every item inside an iterable instead of the iterable itself */
477
- pushMany(iterable) {
478
- for (const value of iterable) this.push(value);
479
- }
480
- /** Insert at front of list */
481
- unshift(value) {
482
- this.count += 1;
483
- const newNode = {
484
- next: this.head.next,
485
- prev: this.head,
486
- value
487
- };
488
- this.head.next.prev = newNode;
489
- this.head.next = newNode;
490
- }
491
- remove(node) {
492
- if (node === this.head || this.length === 0) return null;
493
- this.count -= 1;
494
- const prevNode = node.prev;
495
- const nextNode = node.next;
496
- prevNode.next = nextNode;
497
- nextNode.prev = prevNode;
498
- return node.value;
499
- }
500
- /** Removes the first node at the front of the list */
501
- shift() {
502
- return this.remove(this.head.next);
503
- }
504
- /** Removes the last node at the end of the list */
505
- pop() {
506
- return this.remove(this.head.prev);
507
- }
508
- /** Iterates through the list and removes nodes where filter returns true */
509
- prune(filter) {
510
- for (const node of this.nodes()) if (filter(node.value)) this.remove(node);
511
- }
512
- clear() {
513
- this.count = 0;
514
- this.head.next = this.head;
515
- this.head.prev = this.head;
516
- }
517
- /** Returns the first item in the list, does not remove */
518
- first() {
519
- return this.head.next.value;
520
- }
521
- /** Returns the last item in the list, does not remove */
522
- last() {
523
- return this.head.prev.value;
524
- }
525
- };
526
- exports.List = List;
527
- /**
528
- * A pool of Buffers which allow you to read them as if they were one
529
- * @internal
530
- */
531
- var BufferPool = class {
532
- constructor() {
533
- this.buffers = new List();
534
- this.totalByteLength = 0;
535
- }
536
- get length() {
537
- return this.totalByteLength;
538
- }
539
- /** Adds a buffer to the internal buffer pool list */
540
- append(buffer) {
541
- this.buffers.push(buffer);
542
- this.totalByteLength += buffer.length;
543
- }
544
- /**
545
- * If BufferPool contains 4 bytes or more construct an int32 from the leading bytes,
546
- * otherwise return null. Size can be negative, caller should error check.
547
- */
548
- getInt32() {
549
- if (this.totalByteLength < 4) return null;
550
- const firstBuffer = this.buffers.first();
551
- if (firstBuffer != null && firstBuffer.byteLength >= 4) return firstBuffer.readInt32LE(0);
552
- const top4Bytes = this.read(4);
553
- const value = top4Bytes.readInt32LE(0);
554
- this.totalByteLength += 4;
555
- this.buffers.unshift(top4Bytes);
556
- return value;
557
- }
558
- /** Reads the requested number of bytes, optionally consuming them */
559
- read(size) {
560
- if (typeof size !== "number" || size < 0) throw new error_1.MongoInvalidArgumentError("Argument \"size\" must be a non-negative number");
561
- if (size > this.totalByteLength) return Buffer.alloc(0);
562
- const result = Buffer.allocUnsafe(size);
563
- for (let bytesRead = 0; bytesRead < size;) {
564
- const buffer = this.buffers.shift();
565
- if (buffer == null) break;
566
- const bytesRemaining = size - bytesRead;
567
- const bytesReadable = Math.min(bytesRemaining, buffer.byteLength);
568
- const bytes = buffer.subarray(0, bytesReadable);
569
- result.set(bytes, bytesRead);
570
- bytesRead += bytesReadable;
571
- this.totalByteLength -= bytesReadable;
572
- if (bytesReadable < buffer.byteLength) this.buffers.unshift(buffer.subarray(bytesReadable));
573
- }
574
- return result;
575
- }
576
- };
577
- exports.BufferPool = BufferPool;
578
- /** @public */
579
- var HostAddress = class HostAddress {
580
- constructor(hostString) {
581
- this.host = void 0;
582
- this.port = void 0;
583
- this.socketPath = void 0;
584
- this.isIPv6 = false;
585
- const escapedHost = hostString.split(" ").join("%20");
586
- if (escapedHost.endsWith(".sock")) {
587
- this.socketPath = decodeURIComponent(escapedHost);
588
- return;
589
- }
590
- const urlString = `iLoveJS://${escapedHost}`;
591
- let url$1;
592
- try {
593
- url$1 = new url_1.URL(urlString);
594
- } catch (urlError) {
595
- const runtimeError = new error_1.MongoRuntimeError(`Unable to parse ${escapedHost} with URL`);
596
- runtimeError.cause = urlError;
597
- throw runtimeError;
598
- }
599
- const hostname = url$1.hostname;
600
- const port = url$1.port;
601
- let normalized = decodeURIComponent(hostname).toLowerCase();
602
- if (normalized.startsWith("[") && normalized.endsWith("]")) {
603
- this.isIPv6 = true;
604
- normalized = normalized.substring(1, hostname.length - 1);
605
- }
606
- this.host = normalized.toLowerCase();
607
- if (typeof port === "number") this.port = port;
608
- else if (typeof port === "string" && port !== "") this.port = Number.parseInt(port, 10);
609
- else this.port = 27017;
610
- if (this.port === 0) throw new error_1.MongoParseError("Invalid port (zero) with hostname");
611
- Object.freeze(this);
612
- }
613
- [Symbol.for("nodejs.util.inspect.custom")]() {
614
- return this.inspect();
615
- }
616
- inspect() {
617
- return `new HostAddress('${this.toString()}')`;
618
- }
619
- toString() {
620
- if (typeof this.host === "string") {
621
- if (this.isIPv6) return `[${this.host}]:${this.port}`;
622
- return `${this.host}:${this.port}`;
623
- }
624
- return `${this.socketPath}`;
625
- }
626
- static fromString(s) {
627
- return new HostAddress(s);
628
- }
629
- static fromHostPort(host, port) {
630
- if (host.includes(":")) host = `[${host}]`;
631
- return HostAddress.fromString(`${host}:${port}`);
632
- }
633
- static fromSrvRecord({ name, port }) {
634
- return HostAddress.fromHostPort(name, port);
635
- }
636
- toHostPort() {
637
- if (this.socketPath) return {
638
- host: this.socketPath,
639
- port: 0
640
- };
641
- return {
642
- host: this.host ?? "",
643
- port: this.port ?? 0
644
- };
645
- }
646
- };
647
- exports.HostAddress = HostAddress;
648
- exports.DEFAULT_PK_FACTORY = { createPk() {
649
- return new bson_1.ObjectId();
650
- } };
651
- /**
652
- * When the driver used emitWarning the code will be equal to this.
653
- * @public
654
- *
655
- * @example
656
- * ```ts
657
- * process.on('warning', (warning) => {
658
- * if (warning.code === MONGODB_WARNING_CODE) console.error('Ah an important warning! :)')
659
- * })
660
- * ```
661
- */
662
- exports.MONGODB_WARNING_CODE = "MONGODB DRIVER";
663
- /** @internal */
664
- function emitWarning(message) {
665
- return process.emitWarning(message, { code: exports.MONGODB_WARNING_CODE });
666
- }
667
- const emittedWarnings = /* @__PURE__ */ new Set();
668
- /**
669
- * Will emit a warning once for the duration of the application.
670
- * Uses the message to identify if it has already been emitted
671
- * so using string interpolation can cause multiple emits
672
- * @internal
673
- */
674
- function emitWarningOnce(message) {
675
- if (!emittedWarnings.has(message)) {
676
- emittedWarnings.add(message);
677
- return emitWarning(message);
678
- }
679
- }
680
- /**
681
- * Takes a JS object and joins the values into a string separated by ', '
682
- */
683
- function enumToString(en) {
684
- return Object.values(en).join(", ");
685
- }
686
- /**
687
- * Determine if a server supports retryable writes.
688
- *
689
- * @internal
690
- */
691
- function supportsRetryableWrites(server) {
692
- if (!server) return false;
693
- if (server.loadBalanced) return true;
694
- if (server.description.logicalSessionTimeoutMinutes != null) {
695
- if (server.description.type !== common_1.ServerType.Standalone) return true;
696
- }
697
- return false;
698
- }
699
- /**
700
- * Fisher–Yates Shuffle
701
- *
702
- * Reference: https://bost.ocks.org/mike/shuffle/
703
- * @param sequence - items to be shuffled
704
- * @param limit - Defaults to `0`. If nonzero shuffle will slice the randomized array e.g, `.slice(0, limit)` otherwise will return the entire randomized array.
705
- */
706
- function shuffle(sequence, limit = 0) {
707
- const items = Array.from(sequence);
708
- if (limit > items.length) throw new error_1.MongoRuntimeError("Limit must be less than the number of items");
709
- let remainingItemsToShuffle = items.length;
710
- const lowerBound = limit % items.length === 0 ? 1 : items.length - limit;
711
- while (remainingItemsToShuffle > lowerBound) {
712
- const randomIndex = Math.floor(Math.random() * remainingItemsToShuffle);
713
- remainingItemsToShuffle -= 1;
714
- const swapHold = items[remainingItemsToShuffle];
715
- items[remainingItemsToShuffle] = items[randomIndex];
716
- items[randomIndex] = swapHold;
717
- }
718
- return limit % items.length === 0 ? items : items.slice(lowerBound);
719
- }
720
- /**
721
- * TODO(NODE-4936): read concern eligibility for commands should be codified in command construction
722
- * @internal
723
- * @see https://github.com/mongodb/specifications/blob/master/source/read-write-concern/read-write-concern.md#read-concern
724
- */
725
- function commandSupportsReadConcern(command) {
726
- if (command.aggregate || command.count || command.distinct || command.find || command.geoNear) return true;
727
- return false;
728
- }
729
- /**
730
- * Compare objectIds. `null` is always less
731
- * - `+1 = oid1 is greater than oid2`
732
- * - `-1 = oid1 is less than oid2`
733
- * - `+0 = oid1 is equal oid2`
734
- */
735
- function compareObjectId(oid1, oid2) {
736
- if (oid1 == null && oid2 == null) return 0;
737
- if (oid1 == null) return -1;
738
- if (oid2 == null) return 1;
739
- return exports.ByteUtils.compare(oid1.id, oid2.id);
740
- }
741
- function parseInteger(value) {
742
- if (typeof value === "number") return Math.trunc(value);
743
- const parsedValue = Number.parseInt(String(value), 10);
744
- return Number.isNaN(parsedValue) ? null : parsedValue;
745
- }
746
- function parseUnsignedInteger(value) {
747
- const parsedInt = parseInteger(value);
748
- return parsedInt != null && parsedInt >= 0 ? parsedInt : null;
749
- }
750
- /**
751
- * This function throws a MongoAPIError in the event that either of the following is true:
752
- * * If the provided address domain does not match the provided parent domain
753
- * * If the parent domain contains less than three `.` separated parts and the provided address does not contain at least one more domain level than its parent
754
- *
755
- * If a DNS server were to become compromised SRV records would still need to
756
- * advertise addresses that are under the same domain as the srvHost.
757
- *
758
- * @param address - The address to check against a domain
759
- * @param srvHost - The domain to check the provided address against
760
- * @returns void
761
- */
762
- function checkParentDomainMatch(address, srvHost) {
763
- const normalizedAddress = address.endsWith(".") ? address.slice(0, address.length - 1) : address;
764
- const normalizedSrvHost = srvHost.endsWith(".") ? srvHost.slice(0, srvHost.length - 1) : srvHost;
765
- const allCharacterBeforeFirstDot = /^.*?\./;
766
- const srvIsLessThanThreeParts = normalizedSrvHost.split(".").length < 3;
767
- const addressDomain = `.${normalizedAddress.replace(allCharacterBeforeFirstDot, "")}`;
768
- let srvHostDomain = srvIsLessThanThreeParts ? normalizedSrvHost : `.${normalizedSrvHost.replace(allCharacterBeforeFirstDot, "")}`;
769
- if (!srvHostDomain.startsWith(".")) srvHostDomain = "." + srvHostDomain;
770
- if (srvIsLessThanThreeParts && normalizedAddress.split(".").length <= normalizedSrvHost.split(".").length) throw new error_1.MongoAPIError("Server record does not have at least one more domain level than parent URI");
771
- if (!addressDomain.endsWith(srvHostDomain)) throw new error_1.MongoAPIError("Server record does not share hostname with parent URI");
772
- }
773
- /**
774
- * Perform a get request that returns status and body.
775
- * @internal
776
- */
777
- function get(url$1, options = {}) {
778
- return new Promise((resolve, reject) => {
779
- let timeoutId;
780
- const request = http.get(url$1, options, (response) => {
781
- response.setEncoding("utf8");
782
- let body = "";
783
- response.on("data", (chunk) => body += chunk);
784
- response.on("end", () => {
785
- (0, timers_1.clearTimeout)(timeoutId);
786
- resolve({
787
- status: response.statusCode,
788
- body
789
- });
790
- });
791
- }).on("error", (error) => {
792
- (0, timers_1.clearTimeout)(timeoutId);
793
- reject(error);
794
- }).end();
795
- timeoutId = (0, timers_1.setTimeout)(() => {
796
- request.destroy(new error_1.MongoNetworkTimeoutError(`request timed out after 10 seconds`));
797
- }, 1e4);
798
- });
799
- }
800
- async function request(uri, options = {}) {
801
- return await new Promise((resolve, reject) => {
802
- const requestOptions = {
803
- method: "GET",
804
- timeout: 1e4,
805
- json: true,
806
- ...url.parse(uri),
807
- ...options
808
- };
809
- const req = http.request(requestOptions, (res) => {
810
- res.setEncoding("utf8");
811
- let data = "";
812
- res.on("data", (d) => {
813
- data += d;
814
- });
815
- res.once("end", () => {
816
- if (options.json === false) {
817
- resolve(data);
818
- return;
819
- }
820
- try {
821
- resolve(JSON.parse(data));
822
- } catch {
823
- reject(new error_1.MongoRuntimeError(`Invalid JSON response: "${data}"`));
824
- }
825
- });
826
- });
827
- req.once("timeout", () => req.destroy(new error_1.MongoNetworkTimeoutError(`Network request to ${uri} timed out after ${options.timeout} ms`)));
828
- req.once("error", (error) => reject(error));
829
- req.end();
830
- });
831
- }
832
- /** @internal */
833
- exports.DOCUMENT_DB_CHECK = /(\.docdb\.amazonaws\.com$)|(\.docdb-elastic\.amazonaws\.com$)/;
834
- /** @internal */
835
- exports.COSMOS_DB_CHECK = /\.cosmos\.azure\.com$/;
836
- /** @internal */
837
- exports.DOCUMENT_DB_MSG = "You appear to be connected to a DocumentDB cluster. For more information regarding feature compatibility and support please visit https://www.mongodb.com/supportability/documentdb";
838
- /** @internal */
839
- exports.COSMOS_DB_MSG = "You appear to be connected to a CosmosDB cluster. For more information regarding feature compatibility and support please visit https://www.mongodb.com/supportability/cosmosdb";
840
- /** @internal */
841
- function isHostMatch(match, host) {
842
- return host && match.test(host.toLowerCase()) ? true : false;
843
- }
844
- function promiseWithResolvers() {
845
- let resolve;
846
- let reject;
847
- return {
848
- promise: new Promise(function withResolversExecutor(promiseResolve, promiseReject) {
849
- resolve = promiseResolve;
850
- reject = promiseReject;
851
- }),
852
- resolve,
853
- reject
854
- };
855
- }
856
- /**
857
- * A noop function intended for use in preventing unhandled rejections.
858
- *
859
- * @example
860
- * ```js
861
- * const promise = myAsyncTask();
862
- * // eslint-disable-next-line github/no-then
863
- * promise.then(undefined, squashError);
864
- * ```
865
- */
866
- function squashError(_error) {}
867
- exports.randomBytes = (0, util_1.promisify)(crypto.randomBytes);
868
- /**
869
- * Replicates the events.once helper.
870
- *
871
- * Removes unused signal logic and It **only** supports 0 or 1 argument events.
872
- *
873
- * @param ee - An event emitter that may emit `ev`
874
- * @param name - An event name to wait for
875
- */
876
- async function once(ee, name, options) {
877
- options?.signal?.throwIfAborted();
878
- const { promise, resolve, reject } = promiseWithResolvers();
879
- const onEvent = (data) => resolve(data);
880
- const onError = (error) => reject(error);
881
- const abortListener = addAbortListener(options?.signal, function() {
882
- reject(this.reason);
883
- });
884
- ee.once(name, onEvent).once("error", onError);
885
- try {
886
- return await promise;
887
- } finally {
888
- ee.off(name, onEvent);
889
- ee.off("error", onError);
890
- abortListener?.[exports.kDispose]();
891
- }
892
- }
893
- function maybeAddIdToDocuments(collection, document, options) {
894
- if (options.forceServerObjectId ?? collection.db.options?.forceServerObjectId ?? false) return document;
895
- if (document._id == null) document._id = collection.s.pkFactory.createPk();
896
- return document;
897
- }
898
- async function fileIsAccessible(fileName, mode) {
899
- try {
900
- await fs_1.promises.access(fileName, mode);
901
- return true;
902
- } catch {
903
- return false;
904
- }
905
- }
906
- function csotMin(duration1, duration2) {
907
- if (duration1 === 0) return duration2;
908
- if (duration2 === 0) return duration1;
909
- return Math.min(duration1, duration2);
910
- }
911
- function noop() {}
912
- /**
913
- * Recurse through the (identically-shaped) `decrypted` and `original`
914
- * objects and attach a `decryptedKeys` property on each sub-object that
915
- * contained encrypted fields. Because we only call this on BSON responses,
916
- * we do not need to worry about circular references.
917
- *
918
- * @internal
919
- */
920
- function decorateDecryptionResult(decrypted, original, isTopLevelDecorateCall = true) {
921
- if (isTopLevelDecorateCall) {
922
- if (Buffer.isBuffer(original)) original = (0, bson_1.deserialize)(original);
923
- if (Buffer.isBuffer(decrypted)) throw new error_1.MongoRuntimeError("Expected result of decryption to be deserialized BSON object");
924
- }
925
- if (!decrypted || typeof decrypted !== "object") return;
926
- for (const k of Object.keys(decrypted)) {
927
- const originalValue = original[k];
928
- if (originalValue && originalValue._bsontype === "Binary" && originalValue.sub_type === 6) {
929
- if (!decrypted[constants_2.kDecoratedKeys]) Object.defineProperty(decrypted, constants_2.kDecoratedKeys, {
930
- value: [],
931
- configurable: true,
932
- enumerable: false,
933
- writable: false
934
- });
935
- decrypted[constants_2.kDecoratedKeys].push(k);
936
- continue;
937
- }
938
- decorateDecryptionResult(decrypted[k], originalValue, false);
939
- }
940
- }
941
- /** @internal */
942
- exports.kDispose = Symbol.dispose ?? Symbol("dispose");
943
- /**
944
- * A utility that helps with writing listener code idiomatically
945
- *
946
- * @example
947
- * ```js
948
- * using listener = addAbortListener(signal, function () {
949
- * console.log('aborted', this.reason);
950
- * });
951
- * ```
952
- *
953
- * @param signal - if exists adds an abort listener
954
- * @param listener - the listener to be added to signal
955
- * @returns A disposable that will remove the abort listener
956
- */
957
- function addAbortListener(signal, listener) {
958
- if (signal == null) return;
959
- signal.addEventListener("abort", listener, { once: true });
960
- return { [exports.kDispose]: () => signal.removeEventListener("abort", listener) };
961
- }
962
- /**
963
- * Takes a promise and races it with a promise wrapping the abort event of the optionally provided signal.
964
- * The given promise is _always_ ordered before the signal's abort promise.
965
- * When given an already rejected promise and an already aborted signal, the promise's rejection takes precedence.
966
- *
967
- * Any asynchronous processing in `promise` will continue even after the abort signal has fired,
968
- * but control will be returned to the caller
969
- *
970
- * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/race
971
- *
972
- * @param promise - A promise to discard if the signal aborts
973
- * @param options - An options object carrying an optional signal
974
- */
975
- async function abortable(promise, { signal }) {
976
- if (signal == null) return await promise;
977
- const { promise: aborted, reject } = promiseWithResolvers();
978
- const abortListener = signal.aborted ? reject(signal.reason) : addAbortListener(signal, function() {
979
- reject(this.reason);
980
- });
981
- try {
982
- return await Promise.race([promise, aborted]);
983
- } finally {
984
- abortListener?.[exports.kDispose]();
985
- }
986
- }
987
- }));
988
-
989
- //#endregion
990
- export default require_utils();
991
-
992
- export { require_utils };
993
- //# sourceMappingURL=utils.mjs.map