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,288 +0,0 @@
1
- import { __commonJSMin, __require } from "../../../../../../../_virtual/rolldown_runtime.mjs";
2
- import { require_error } from "../error.mjs";
3
- import { require_constants } from "./wire_protocol/constants.mjs";
4
- import { require_constants as require_constants$1 } from "../constants.mjs";
5
- import { require_utils } from "../utils.mjs";
6
- import { require_deps } from "../deps.mjs";
7
- import { require_auth_provider } from "./auth/auth_provider.mjs";
8
- import { require_providers } from "./auth/providers.mjs";
9
- import { require_connection } from "./connection.mjs";
10
-
11
- //#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connect.js
12
- var require_connect = /* @__PURE__ */ __commonJSMin(((exports) => {
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.LEGAL_TCP_SOCKET_OPTIONS = exports.LEGAL_TLS_SOCKET_OPTIONS = void 0;
15
- exports.connect = connect;
16
- exports.makeConnection = makeConnection;
17
- exports.performInitialHandshake = performInitialHandshake;
18
- exports.prepareHandshakeDocument = prepareHandshakeDocument;
19
- exports.makeSocket = makeSocket;
20
- const net = __require("net");
21
- const tls = __require("tls");
22
- const constants_1 = require_constants$1();
23
- const deps_1 = require_deps();
24
- const error_1 = require_error();
25
- const utils_1 = require_utils();
26
- const auth_provider_1 = require_auth_provider();
27
- const providers_1 = require_providers();
28
- const connection_1 = require_connection();
29
- const constants_2 = require_constants();
30
- async function connect(options) {
31
- let connection = null;
32
- try {
33
- connection = makeConnection(options, await makeSocket(options));
34
- await performInitialHandshake(connection, options);
35
- return connection;
36
- } catch (error) {
37
- connection?.destroy();
38
- throw error;
39
- }
40
- }
41
- function makeConnection(options, socket) {
42
- let ConnectionType = options.connectionType ?? connection_1.Connection;
43
- if (options.autoEncrypter) ConnectionType = connection_1.CryptoConnection;
44
- return new ConnectionType(socket, options);
45
- }
46
- function checkSupportedServer(hello, options) {
47
- const maxWireVersion = Number(hello.maxWireVersion);
48
- const minWireVersion = Number(hello.minWireVersion);
49
- const serverVersionHighEnough = !Number.isNaN(maxWireVersion) && maxWireVersion >= constants_2.MIN_SUPPORTED_WIRE_VERSION;
50
- const serverVersionLowEnough = !Number.isNaN(minWireVersion) && minWireVersion <= constants_2.MAX_SUPPORTED_WIRE_VERSION;
51
- if (serverVersionHighEnough) {
52
- if (serverVersionLowEnough) return null;
53
- const message$1 = `Server at ${options.hostAddress} reports minimum wire version ${JSON.stringify(hello.minWireVersion)}, but this version of the Node.js Driver requires at most ${constants_2.MAX_SUPPORTED_WIRE_VERSION} (MongoDB ${constants_2.MAX_SUPPORTED_SERVER_VERSION})`;
54
- return new error_1.MongoCompatibilityError(message$1);
55
- }
56
- const message = `Server at ${options.hostAddress} reports maximum wire version ${JSON.stringify(hello.maxWireVersion) ?? 0}, but this version of the Node.js Driver requires at least ${constants_2.MIN_SUPPORTED_WIRE_VERSION} (MongoDB ${constants_2.MIN_SUPPORTED_SERVER_VERSION})`;
57
- return new error_1.MongoCompatibilityError(message);
58
- }
59
- async function performInitialHandshake(conn, options) {
60
- const credentials = options.credentials;
61
- if (credentials) {
62
- if (!(credentials.mechanism === providers_1.AuthMechanism.MONGODB_DEFAULT) && !options.authProviders.getOrCreateProvider(credentials.mechanism, credentials.mechanismProperties)) throw new error_1.MongoInvalidArgumentError(`AuthMechanism '${credentials.mechanism}' not supported`);
63
- }
64
- const authContext = new auth_provider_1.AuthContext(conn, credentials, options);
65
- conn.authContext = authContext;
66
- const handshakeDoc = await prepareHandshakeDocument(authContext);
67
- const handshakeOptions = {
68
- ...options,
69
- raw: false
70
- };
71
- if (typeof options.connectTimeoutMS === "number") handshakeOptions.socketTimeoutMS = options.connectTimeoutMS;
72
- const start = (/* @__PURE__ */ new Date()).getTime();
73
- const response = await executeHandshake(handshakeDoc, handshakeOptions);
74
- if (!("isWritablePrimary" in response)) response.isWritablePrimary = response[constants_1.LEGACY_HELLO_COMMAND];
75
- if (response.helloOk) conn.helloOk = true;
76
- const supportedServerErr = checkSupportedServer(response, options);
77
- if (supportedServerErr) throw supportedServerErr;
78
- if (options.loadBalanced) {
79
- if (!response.serviceId) throw new error_1.MongoCompatibilityError("Driver attempted to initialize in load balancing mode, but the server does not support this mode.");
80
- }
81
- conn.hello = response;
82
- conn.lastHelloMS = (/* @__PURE__ */ new Date()).getTime() - start;
83
- if (!response.arbiterOnly && credentials) {
84
- authContext.response = response;
85
- const resolvedCredentials = credentials.resolveAuthMechanism(response);
86
- const provider = options.authProviders.getOrCreateProvider(resolvedCredentials.mechanism, resolvedCredentials.mechanismProperties);
87
- if (!provider) throw new error_1.MongoInvalidArgumentError(`No AuthProvider for ${resolvedCredentials.mechanism} defined.`);
88
- try {
89
- await provider.auth(authContext);
90
- } catch (error) {
91
- if (error instanceof error_1.MongoError) {
92
- error.addErrorLabel(error_1.MongoErrorLabel.HandshakeError);
93
- if ((0, error_1.needsRetryableWriteLabel)(error, response.maxWireVersion, conn.description.type)) error.addErrorLabel(error_1.MongoErrorLabel.RetryableWriteError);
94
- }
95
- throw error;
96
- }
97
- }
98
- conn.established = true;
99
- async function executeHandshake(handshakeDoc$1, handshakeOptions$1) {
100
- try {
101
- return await conn.command((0, utils_1.ns)("admin.$cmd"), handshakeDoc$1, handshakeOptions$1);
102
- } catch (error) {
103
- if (error instanceof error_1.MongoError) error.addErrorLabel(error_1.MongoErrorLabel.HandshakeError);
104
- throw error;
105
- }
106
- }
107
- }
108
- /**
109
- * @internal
110
- *
111
- * This function is only exposed for testing purposes.
112
- */
113
- async function prepareHandshakeDocument(authContext) {
114
- const options = authContext.options;
115
- const compressors = options.compressors ? options.compressors : [];
116
- const { serverApi } = authContext.connection;
117
- const clientMetadata = await options.extendedMetadata;
118
- const handshakeDoc = {
119
- [serverApi?.version || options.loadBalanced === true ? "hello" : constants_1.LEGACY_HELLO_COMMAND]: 1,
120
- helloOk: true,
121
- client: clientMetadata,
122
- compression: compressors
123
- };
124
- if (options.loadBalanced === true) handshakeDoc.loadBalanced = true;
125
- const credentials = authContext.credentials;
126
- if (credentials) {
127
- if (credentials.mechanism === providers_1.AuthMechanism.MONGODB_DEFAULT && credentials.username) {
128
- handshakeDoc.saslSupportedMechs = `${credentials.source}.${credentials.username}`;
129
- const provider$1 = authContext.options.authProviders.getOrCreateProvider(providers_1.AuthMechanism.MONGODB_SCRAM_SHA256, credentials.mechanismProperties);
130
- if (!provider$1) throw new error_1.MongoInvalidArgumentError(`No AuthProvider for ${providers_1.AuthMechanism.MONGODB_SCRAM_SHA256} defined.`);
131
- return await provider$1.prepare(handshakeDoc, authContext);
132
- }
133
- const provider = authContext.options.authProviders.getOrCreateProvider(credentials.mechanism, credentials.mechanismProperties);
134
- if (!provider) throw new error_1.MongoInvalidArgumentError(`No AuthProvider for ${credentials.mechanism} defined.`);
135
- return await provider.prepare(handshakeDoc, authContext);
136
- }
137
- return handshakeDoc;
138
- }
139
- /** @public */
140
- exports.LEGAL_TLS_SOCKET_OPTIONS = [
141
- "allowPartialTrustChain",
142
- "ALPNProtocols",
143
- "ca",
144
- "cert",
145
- "checkServerIdentity",
146
- "ciphers",
147
- "crl",
148
- "ecdhCurve",
149
- "key",
150
- "minDHSize",
151
- "passphrase",
152
- "pfx",
153
- "rejectUnauthorized",
154
- "secureContext",
155
- "secureProtocol",
156
- "servername",
157
- "session"
158
- ];
159
- /** @public */
160
- exports.LEGAL_TCP_SOCKET_OPTIONS = [
161
- "autoSelectFamily",
162
- "autoSelectFamilyAttemptTimeout",
163
- "keepAliveInitialDelay",
164
- "family",
165
- "hints",
166
- "localAddress",
167
- "localPort",
168
- "lookup"
169
- ];
170
- function parseConnectOptions(options) {
171
- const hostAddress = options.hostAddress;
172
- if (!hostAddress) throw new error_1.MongoInvalidArgumentError("Option \"hostAddress\" is required");
173
- const result = {};
174
- for (const name of exports.LEGAL_TCP_SOCKET_OPTIONS) if (options[name] != null) result[name] = options[name];
175
- result.keepAliveInitialDelay ??= 12e4;
176
- result.keepAlive = true;
177
- result.noDelay = options.noDelay ?? true;
178
- if (typeof hostAddress.socketPath === "string") {
179
- result.path = hostAddress.socketPath;
180
- return result;
181
- } else if (typeof hostAddress.host === "string") {
182
- result.host = hostAddress.host;
183
- result.port = hostAddress.port;
184
- return result;
185
- } else throw new error_1.MongoRuntimeError(`Unexpected HostAddress ${JSON.stringify(hostAddress)}`);
186
- }
187
- function parseSslOptions(options) {
188
- const result = parseConnectOptions(options);
189
- for (const name of exports.LEGAL_TLS_SOCKET_OPTIONS) if (options[name] != null) result[name] = options[name];
190
- if (options.existingSocket) result.socket = options.existingSocket;
191
- if (result.servername == null && result.host && !net.isIP(result.host)) result.servername = result.host;
192
- return result;
193
- }
194
- async function makeSocket(options) {
195
- const useTLS = options.tls ?? false;
196
- const connectTimeoutMS = options.connectTimeoutMS ?? 3e4;
197
- const existingSocket = options.existingSocket;
198
- let socket;
199
- if (options.proxyHost != null) return await makeSocks5Connection({
200
- ...options,
201
- connectTimeoutMS
202
- });
203
- if (useTLS) {
204
- const tlsSocket = tls.connect(parseSslOptions(options));
205
- if (typeof tlsSocket.disableRenegotiation === "function") tlsSocket.disableRenegotiation();
206
- socket = tlsSocket;
207
- } else if (existingSocket) socket = existingSocket;
208
- else socket = net.createConnection(parseConnectOptions(options));
209
- socket.setTimeout(connectTimeoutMS);
210
- let cancellationHandler = null;
211
- const { promise: connectedSocket, resolve, reject } = (0, utils_1.promiseWithResolvers)();
212
- if (existingSocket) resolve(socket);
213
- else {
214
- const start = performance.now();
215
- const connectEvent = useTLS ? "secureConnect" : "connect";
216
- socket.once(connectEvent, () => resolve(socket)).once("error", (cause) => reject(new error_1.MongoNetworkError(error_1.MongoError.buildErrorMessage(cause), { cause }))).once("timeout", () => {
217
- reject(new error_1.MongoNetworkTimeoutError(`Socket '${connectEvent}' timed out after ${performance.now() - start | 0}ms (connectTimeoutMS: ${connectTimeoutMS})`));
218
- }).once("close", () => reject(new error_1.MongoNetworkError(`Socket closed after ${performance.now() - start | 0} during connection establishment`)));
219
- if (options.cancellationToken != null) {
220
- cancellationHandler = () => reject(new error_1.MongoNetworkError(`Socket connection establishment was cancelled after ${performance.now() - start | 0}`));
221
- options.cancellationToken.once("cancel", cancellationHandler);
222
- }
223
- }
224
- try {
225
- socket = await connectedSocket;
226
- return socket;
227
- } catch (error) {
228
- socket.destroy();
229
- throw error;
230
- } finally {
231
- socket.setTimeout(0);
232
- if (cancellationHandler != null) options.cancellationToken?.removeListener("cancel", cancellationHandler);
233
- }
234
- }
235
- let socks = null;
236
- function loadSocks() {
237
- if (socks == null) {
238
- const socksImport = (0, deps_1.getSocks)();
239
- if ("kModuleError" in socksImport) throw socksImport.kModuleError;
240
- socks = socksImport;
241
- }
242
- return socks;
243
- }
244
- async function makeSocks5Connection(options) {
245
- const hostAddress = utils_1.HostAddress.fromHostPort(options.proxyHost ?? "", options.proxyPort ?? 1080);
246
- const rawSocket = await makeSocket({
247
- ...options,
248
- hostAddress,
249
- tls: false,
250
- proxyHost: void 0
251
- });
252
- const destination = parseConnectOptions(options);
253
- if (typeof destination.host !== "string" || typeof destination.port !== "number") throw new error_1.MongoInvalidArgumentError("Can only make Socks5 connections to TCP hosts");
254
- socks ??= loadSocks();
255
- let existingSocket;
256
- try {
257
- existingSocket = (await socks.SocksClient.createConnection({
258
- existing_socket: rawSocket,
259
- timeout: options.connectTimeoutMS,
260
- command: "connect",
261
- destination: {
262
- host: destination.host,
263
- port: destination.port
264
- },
265
- proxy: {
266
- host: "iLoveJavaScript",
267
- port: 0,
268
- type: 5,
269
- userId: options.proxyUsername || void 0,
270
- password: options.proxyPassword || void 0
271
- }
272
- })).socket;
273
- } catch (cause) {
274
- throw new error_1.MongoNetworkError(error_1.MongoError.buildErrorMessage(cause), { cause });
275
- }
276
- return await makeSocket({
277
- ...options,
278
- existingSocket,
279
- proxyHost: void 0
280
- });
281
- }
282
- }));
283
-
284
- //#endregion
285
- export default require_connect();
286
-
287
- export { require_connect };
288
- //# sourceMappingURL=connect.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"connect.mjs","names":["message","handshakeDoc","handshakeOptions","provider"],"sources":["../../../../../../../../../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connect.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LEGAL_TCP_SOCKET_OPTIONS = exports.LEGAL_TLS_SOCKET_OPTIONS = void 0;\nexports.connect = connect;\nexports.makeConnection = makeConnection;\nexports.performInitialHandshake = performInitialHandshake;\nexports.prepareHandshakeDocument = prepareHandshakeDocument;\nexports.makeSocket = makeSocket;\nconst net = require(\"net\");\nconst tls = require(\"tls\");\nconst constants_1 = require(\"../constants\");\nconst deps_1 = require(\"../deps\");\nconst error_1 = require(\"../error\");\nconst utils_1 = require(\"../utils\");\nconst auth_provider_1 = require(\"./auth/auth_provider\");\nconst providers_1 = require(\"./auth/providers\");\nconst connection_1 = require(\"./connection\");\nconst constants_2 = require(\"./wire_protocol/constants\");\nasync function connect(options) {\n let connection = null;\n try {\n const socket = await makeSocket(options);\n connection = makeConnection(options, socket);\n await performInitialHandshake(connection, options);\n return connection;\n }\n catch (error) {\n connection?.destroy();\n throw error;\n }\n}\nfunction makeConnection(options, socket) {\n let ConnectionType = options.connectionType ?? connection_1.Connection;\n if (options.autoEncrypter) {\n ConnectionType = connection_1.CryptoConnection;\n }\n return new ConnectionType(socket, options);\n}\nfunction checkSupportedServer(hello, options) {\n const maxWireVersion = Number(hello.maxWireVersion);\n const minWireVersion = Number(hello.minWireVersion);\n const serverVersionHighEnough = !Number.isNaN(maxWireVersion) && maxWireVersion >= constants_2.MIN_SUPPORTED_WIRE_VERSION;\n const serverVersionLowEnough = !Number.isNaN(minWireVersion) && minWireVersion <= constants_2.MAX_SUPPORTED_WIRE_VERSION;\n if (serverVersionHighEnough) {\n if (serverVersionLowEnough) {\n return null;\n }\n const message = `Server at ${options.hostAddress} reports minimum wire version ${JSON.stringify(hello.minWireVersion)}, but this version of the Node.js Driver requires at most ${constants_2.MAX_SUPPORTED_WIRE_VERSION} (MongoDB ${constants_2.MAX_SUPPORTED_SERVER_VERSION})`;\n return new error_1.MongoCompatibilityError(message);\n }\n const message = `Server at ${options.hostAddress} reports maximum wire version ${JSON.stringify(hello.maxWireVersion) ?? 0}, but this version of the Node.js Driver requires at least ${constants_2.MIN_SUPPORTED_WIRE_VERSION} (MongoDB ${constants_2.MIN_SUPPORTED_SERVER_VERSION})`;\n return new error_1.MongoCompatibilityError(message);\n}\nasync function performInitialHandshake(conn, options) {\n const credentials = options.credentials;\n if (credentials) {\n if (!(credentials.mechanism === providers_1.AuthMechanism.MONGODB_DEFAULT) &&\n !options.authProviders.getOrCreateProvider(credentials.mechanism, credentials.mechanismProperties)) {\n throw new error_1.MongoInvalidArgumentError(`AuthMechanism '${credentials.mechanism}' not supported`);\n }\n }\n const authContext = new auth_provider_1.AuthContext(conn, credentials, options);\n conn.authContext = authContext;\n const handshakeDoc = await prepareHandshakeDocument(authContext);\n // @ts-expect-error: TODO(NODE-5141): The options need to be filtered properly, Connection options differ from Command options\n const handshakeOptions = { ...options, raw: false };\n if (typeof options.connectTimeoutMS === 'number') {\n // The handshake technically is a monitoring check, so its socket timeout should be connectTimeoutMS\n handshakeOptions.socketTimeoutMS = options.connectTimeoutMS;\n }\n const start = new Date().getTime();\n const response = await executeHandshake(handshakeDoc, handshakeOptions);\n if (!('isWritablePrimary' in response)) {\n // Provide hello-style response document.\n response.isWritablePrimary = response[constants_1.LEGACY_HELLO_COMMAND];\n }\n if (response.helloOk) {\n conn.helloOk = true;\n }\n const supportedServerErr = checkSupportedServer(response, options);\n if (supportedServerErr) {\n throw supportedServerErr;\n }\n if (options.loadBalanced) {\n if (!response.serviceId) {\n throw new error_1.MongoCompatibilityError('Driver attempted to initialize in load balancing mode, ' +\n 'but the server does not support this mode.');\n }\n }\n // NOTE: This is metadata attached to the connection while porting away from\n // handshake being done in the `Server` class. Likely, it should be\n // relocated, or at very least restructured.\n conn.hello = response;\n conn.lastHelloMS = new Date().getTime() - start;\n if (!response.arbiterOnly && credentials) {\n // store the response on auth context\n authContext.response = response;\n const resolvedCredentials = credentials.resolveAuthMechanism(response);\n const provider = options.authProviders.getOrCreateProvider(resolvedCredentials.mechanism, resolvedCredentials.mechanismProperties);\n if (!provider) {\n throw new error_1.MongoInvalidArgumentError(`No AuthProvider for ${resolvedCredentials.mechanism} defined.`);\n }\n try {\n await provider.auth(authContext);\n }\n catch (error) {\n if (error instanceof error_1.MongoError) {\n error.addErrorLabel(error_1.MongoErrorLabel.HandshakeError);\n if ((0, error_1.needsRetryableWriteLabel)(error, response.maxWireVersion, conn.description.type)) {\n error.addErrorLabel(error_1.MongoErrorLabel.RetryableWriteError);\n }\n }\n throw error;\n }\n }\n // Connection establishment is socket creation (tcp handshake, tls handshake, MongoDB handshake (saslStart, saslContinue))\n // Once connection is established, command logging can log events (if enabled)\n conn.established = true;\n async function executeHandshake(handshakeDoc, handshakeOptions) {\n try {\n const handshakeResponse = await conn.command((0, utils_1.ns)('admin.$cmd'), handshakeDoc, handshakeOptions);\n return handshakeResponse;\n }\n catch (error) {\n if (error instanceof error_1.MongoError) {\n error.addErrorLabel(error_1.MongoErrorLabel.HandshakeError);\n }\n throw error;\n }\n }\n}\n/**\n * @internal\n *\n * This function is only exposed for testing purposes.\n */\nasync function prepareHandshakeDocument(authContext) {\n const options = authContext.options;\n const compressors = options.compressors ? options.compressors : [];\n const { serverApi } = authContext.connection;\n const clientMetadata = await options.extendedMetadata;\n const handshakeDoc = {\n [serverApi?.version || options.loadBalanced === true ? 'hello' : constants_1.LEGACY_HELLO_COMMAND]: 1,\n helloOk: true,\n client: clientMetadata,\n compression: compressors\n };\n if (options.loadBalanced === true) {\n handshakeDoc.loadBalanced = true;\n }\n const credentials = authContext.credentials;\n if (credentials) {\n if (credentials.mechanism === providers_1.AuthMechanism.MONGODB_DEFAULT && credentials.username) {\n handshakeDoc.saslSupportedMechs = `${credentials.source}.${credentials.username}`;\n const provider = authContext.options.authProviders.getOrCreateProvider(providers_1.AuthMechanism.MONGODB_SCRAM_SHA256, credentials.mechanismProperties);\n if (!provider) {\n // This auth mechanism is always present.\n throw new error_1.MongoInvalidArgumentError(`No AuthProvider for ${providers_1.AuthMechanism.MONGODB_SCRAM_SHA256} defined.`);\n }\n return await provider.prepare(handshakeDoc, authContext);\n }\n const provider = authContext.options.authProviders.getOrCreateProvider(credentials.mechanism, credentials.mechanismProperties);\n if (!provider) {\n throw new error_1.MongoInvalidArgumentError(`No AuthProvider for ${credentials.mechanism} defined.`);\n }\n return await provider.prepare(handshakeDoc, authContext);\n }\n return handshakeDoc;\n}\n/** @public */\nexports.LEGAL_TLS_SOCKET_OPTIONS = [\n 'allowPartialTrustChain',\n 'ALPNProtocols',\n 'ca',\n 'cert',\n 'checkServerIdentity',\n 'ciphers',\n 'crl',\n 'ecdhCurve',\n 'key',\n 'minDHSize',\n 'passphrase',\n 'pfx',\n 'rejectUnauthorized',\n 'secureContext',\n 'secureProtocol',\n 'servername',\n 'session'\n];\n/** @public */\nexports.LEGAL_TCP_SOCKET_OPTIONS = [\n 'autoSelectFamily',\n 'autoSelectFamilyAttemptTimeout',\n 'keepAliveInitialDelay',\n 'family',\n 'hints',\n 'localAddress',\n 'localPort',\n 'lookup'\n];\nfunction parseConnectOptions(options) {\n const hostAddress = options.hostAddress;\n if (!hostAddress)\n throw new error_1.MongoInvalidArgumentError('Option \"hostAddress\" is required');\n const result = {};\n for (const name of exports.LEGAL_TCP_SOCKET_OPTIONS) {\n if (options[name] != null) {\n result[name] = options[name];\n }\n }\n result.keepAliveInitialDelay ??= 120000;\n result.keepAlive = true;\n result.noDelay = options.noDelay ?? true;\n if (typeof hostAddress.socketPath === 'string') {\n result.path = hostAddress.socketPath;\n return result;\n }\n else if (typeof hostAddress.host === 'string') {\n result.host = hostAddress.host;\n result.port = hostAddress.port;\n return result;\n }\n else {\n // This should never happen since we set up HostAddresses\n // But if we don't throw here the socket could hang until timeout\n // TODO(NODE-3483)\n throw new error_1.MongoRuntimeError(`Unexpected HostAddress ${JSON.stringify(hostAddress)}`);\n }\n}\nfunction parseSslOptions(options) {\n const result = parseConnectOptions(options);\n // Merge in valid SSL options\n for (const name of exports.LEGAL_TLS_SOCKET_OPTIONS) {\n if (options[name] != null) {\n result[name] = options[name];\n }\n }\n if (options.existingSocket) {\n result.socket = options.existingSocket;\n }\n // Set default sni servername to be the same as host\n if (result.servername == null && result.host && !net.isIP(result.host)) {\n result.servername = result.host;\n }\n return result;\n}\nasync function makeSocket(options) {\n const useTLS = options.tls ?? false;\n const connectTimeoutMS = options.connectTimeoutMS ?? 30000;\n const existingSocket = options.existingSocket;\n let socket;\n if (options.proxyHost != null) {\n // Currently, only Socks5 is supported.\n return await makeSocks5Connection({\n ...options,\n connectTimeoutMS // Should always be present for Socks5\n });\n }\n if (useTLS) {\n const tlsSocket = tls.connect(parseSslOptions(options));\n if (typeof tlsSocket.disableRenegotiation === 'function') {\n tlsSocket.disableRenegotiation();\n }\n socket = tlsSocket;\n }\n else if (existingSocket) {\n // In the TLS case, parseSslOptions() sets options.socket to existingSocket,\n // so we only need to handle the non-TLS case here (where existingSocket\n // gives us all we need out of the box).\n socket = existingSocket;\n }\n else {\n socket = net.createConnection(parseConnectOptions(options));\n }\n socket.setTimeout(connectTimeoutMS);\n let cancellationHandler = null;\n const { promise: connectedSocket, resolve, reject } = (0, utils_1.promiseWithResolvers)();\n if (existingSocket) {\n resolve(socket);\n }\n else {\n const start = performance.now();\n const connectEvent = useTLS ? 'secureConnect' : 'connect';\n socket\n .once(connectEvent, () => resolve(socket))\n .once('error', cause => reject(new error_1.MongoNetworkError(error_1.MongoError.buildErrorMessage(cause), { cause })))\n .once('timeout', () => {\n reject(new error_1.MongoNetworkTimeoutError(`Socket '${connectEvent}' timed out after ${(performance.now() - start) | 0}ms (connectTimeoutMS: ${connectTimeoutMS})`));\n })\n .once('close', () => reject(new error_1.MongoNetworkError(`Socket closed after ${(performance.now() - start) | 0} during connection establishment`)));\n if (options.cancellationToken != null) {\n cancellationHandler = () => reject(new error_1.MongoNetworkError(`Socket connection establishment was cancelled after ${(performance.now() - start) | 0}`));\n options.cancellationToken.once('cancel', cancellationHandler);\n }\n }\n try {\n socket = await connectedSocket;\n return socket;\n }\n catch (error) {\n socket.destroy();\n throw error;\n }\n finally {\n socket.setTimeout(0);\n if (cancellationHandler != null) {\n options.cancellationToken?.removeListener('cancel', cancellationHandler);\n }\n }\n}\nlet socks = null;\nfunction loadSocks() {\n if (socks == null) {\n const socksImport = (0, deps_1.getSocks)();\n if ('kModuleError' in socksImport) {\n throw socksImport.kModuleError;\n }\n socks = socksImport;\n }\n return socks;\n}\nasync function makeSocks5Connection(options) {\n const hostAddress = utils_1.HostAddress.fromHostPort(options.proxyHost ?? '', // proxyHost is guaranteed to set here\n options.proxyPort ?? 1080);\n // First, connect to the proxy server itself:\n const rawSocket = await makeSocket({\n ...options,\n hostAddress,\n tls: false,\n proxyHost: undefined\n });\n const destination = parseConnectOptions(options);\n if (typeof destination.host !== 'string' || typeof destination.port !== 'number') {\n throw new error_1.MongoInvalidArgumentError('Can only make Socks5 connections to TCP hosts');\n }\n socks ??= loadSocks();\n let existingSocket;\n try {\n // Then, establish the Socks5 proxy connection:\n const connection = await socks.SocksClient.createConnection({\n existing_socket: rawSocket,\n timeout: options.connectTimeoutMS,\n command: 'connect',\n destination: {\n host: destination.host,\n port: destination.port\n },\n proxy: {\n // host and port are ignored because we pass existing_socket\n host: 'iLoveJavaScript',\n port: 0,\n type: 5,\n userId: options.proxyUsername || undefined,\n password: options.proxyPassword || undefined\n }\n });\n existingSocket = connection.socket;\n }\n catch (cause) {\n throw new error_1.MongoNetworkError(error_1.MongoError.buildErrorMessage(cause), { cause });\n }\n // Finally, now treat the resulting duplex stream as the\n // socket over which we send and receive wire protocol messages:\n return await makeSocket({ ...options, existingSocket, proxyHost: undefined });\n}\n//# sourceMappingURL=connect.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;AACA,QAAO,eAAe,SAAS,cAAc,EAAE,OAAO,MAAM,CAAC;AAC7D,SAAQ,2BAA2B,QAAQ,2BAA2B,KAAK;AAC3E,SAAQ,UAAU;AAClB,SAAQ,iBAAiB;AACzB,SAAQ,0BAA0B;AAClC,SAAQ,2BAA2B;AACnC,SAAQ,aAAa;CACrB,MAAM,gBAAc,MAAM;CAC1B,MAAM,gBAAc,MAAM;CAC1B,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;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