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,127 +0,0 @@
1
- import { __commonJSMin, __require } from "../../../../../../../../../_virtual/rolldown_runtime.mjs";
2
- import { require_error } from "../../../error.mjs";
3
- import { require_utils } from "../../../utils.mjs";
4
- import { require_command_builders } from "./command_builders.mjs";
5
-
6
- //#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_workflow.js
7
- var require_callback_workflow = /* @__PURE__ */ __commonJSMin(((exports) => {
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.CallbackWorkflow = exports.AUTOMATED_TIMEOUT_MS = exports.HUMAN_TIMEOUT_MS = void 0;
10
- const promises_1 = __require("timers/promises");
11
- const error_1 = require_error();
12
- const utils_1 = require_utils();
13
- const command_builders_1 = require_command_builders();
14
- /** 5 minutes in milliseconds */
15
- exports.HUMAN_TIMEOUT_MS = 3e5;
16
- /** 1 minute in milliseconds */
17
- exports.AUTOMATED_TIMEOUT_MS = 6e4;
18
- /** Properties allowed on results of callbacks. */
19
- const RESULT_PROPERTIES = [
20
- "accessToken",
21
- "expiresInSeconds",
22
- "refreshToken"
23
- ];
24
- /** Error message when the callback result is invalid. */
25
- const CALLBACK_RESULT_ERROR = "User provided OIDC callbacks must return a valid object with an accessToken.";
26
- /** The time to throttle callback calls. */
27
- const THROTTLE_MS = 100;
28
- /**
29
- * OIDC implementation of a callback based workflow.
30
- * @internal
31
- */
32
- var CallbackWorkflow = class {
33
- /**
34
- * Instantiate the callback workflow.
35
- */
36
- constructor(cache, callback) {
37
- this.cache = cache;
38
- this.callback = this.withLock(callback);
39
- this.lastExecutionTime = Date.now() - THROTTLE_MS;
40
- }
41
- /**
42
- * Get the document to add for speculative authentication. This also needs
43
- * to add a db field from the credentials source.
44
- */
45
- async speculativeAuth(connection, credentials) {
46
- if (this.cache.hasAccessToken) {
47
- const accessToken = this.cache.getAccessToken();
48
- connection.accessToken = accessToken;
49
- const document = (0, command_builders_1.finishCommandDocument)(accessToken);
50
- document.db = credentials.source;
51
- return { speculativeAuthenticate: document };
52
- }
53
- return {};
54
- }
55
- /**
56
- * Reauthenticate the callback workflow. For this we invalidated the access token
57
- * in the cache and run the authentication steps again. No initial handshake needs
58
- * to be sent.
59
- */
60
- async reauthenticate(connection, credentials) {
61
- if (this.cache.hasAccessToken) if (connection.accessToken === this.cache.getAccessToken()) {
62
- this.cache.removeAccessToken();
63
- delete connection.accessToken;
64
- } else connection.accessToken = this.cache.getAccessToken();
65
- await this.execute(connection, credentials);
66
- }
67
- /**
68
- * Starts the callback authentication process. If there is a speculative
69
- * authentication document from the initial handshake, then we will use that
70
- * value to get the issuer, otherwise we will send the saslStart command.
71
- */
72
- async startAuthentication(connection, credentials, response) {
73
- let result;
74
- if (response?.speculativeAuthenticate) result = response.speculativeAuthenticate;
75
- else result = await connection.command((0, utils_1.ns)(credentials.source), (0, command_builders_1.startCommandDocument)(credentials), void 0);
76
- return result;
77
- }
78
- /**
79
- * Finishes the callback authentication process.
80
- */
81
- async finishAuthentication(connection, credentials, token, conversationId) {
82
- await connection.command((0, utils_1.ns)(credentials.source), (0, command_builders_1.finishCommandDocument)(token, conversationId), void 0);
83
- }
84
- /**
85
- * Executes the callback and validates the output.
86
- */
87
- async executeAndValidateCallback(params) {
88
- const result = await this.callback(params);
89
- if (isCallbackResultInvalid(result)) throw new error_1.MongoMissingCredentialsError(CALLBACK_RESULT_ERROR);
90
- return result;
91
- }
92
- /**
93
- * Ensure the callback is only executed one at a time and throttles the calls
94
- * to every 100ms.
95
- */
96
- withLock(callback) {
97
- let lock = Promise.resolve();
98
- return async (params) => {
99
- await lock;
100
- lock = lock.catch(() => null).then(async () => {
101
- const difference = Date.now() - this.lastExecutionTime;
102
- if (difference <= THROTTLE_MS) await (0, promises_1.setTimeout)(THROTTLE_MS - difference, { signal: params.timeoutContext });
103
- this.lastExecutionTime = Date.now();
104
- return await callback(params);
105
- });
106
- return await lock;
107
- };
108
- }
109
- };
110
- exports.CallbackWorkflow = CallbackWorkflow;
111
- /**
112
- * Determines if a result returned from a request or refresh callback
113
- * function is invalid. This means the result is nullish, doesn't contain
114
- * the accessToken required field, and does not contain extra fields.
115
- */
116
- function isCallbackResultInvalid(tokenResult) {
117
- if (tokenResult == null || typeof tokenResult !== "object") return true;
118
- if (!("accessToken" in tokenResult)) return true;
119
- return !Object.getOwnPropertyNames(tokenResult).every((prop) => RESULT_PROPERTIES.includes(prop));
120
- }
121
- }));
122
-
123
- //#endregion
124
- export default require_callback_workflow();
125
-
126
- export { require_callback_workflow };
127
- //# sourceMappingURL=callback_workflow.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"callback_workflow.mjs","names":[],"sources":["../../../../../../../../../../../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_workflow.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CallbackWorkflow = exports.AUTOMATED_TIMEOUT_MS = exports.HUMAN_TIMEOUT_MS = void 0;\nconst promises_1 = require(\"timers/promises\");\nconst error_1 = require(\"../../../error\");\nconst utils_1 = require(\"../../../utils\");\nconst command_builders_1 = require(\"./command_builders\");\n/** 5 minutes in milliseconds */\nexports.HUMAN_TIMEOUT_MS = 300000;\n/** 1 minute in milliseconds */\nexports.AUTOMATED_TIMEOUT_MS = 60000;\n/** Properties allowed on results of callbacks. */\nconst RESULT_PROPERTIES = ['accessToken', 'expiresInSeconds', 'refreshToken'];\n/** Error message when the callback result is invalid. */\nconst CALLBACK_RESULT_ERROR = 'User provided OIDC callbacks must return a valid object with an accessToken.';\n/** The time to throttle callback calls. */\nconst THROTTLE_MS = 100;\n/**\n * OIDC implementation of a callback based workflow.\n * @internal\n */\nclass CallbackWorkflow {\n /**\n * Instantiate the callback workflow.\n */\n constructor(cache, callback) {\n this.cache = cache;\n this.callback = this.withLock(callback);\n this.lastExecutionTime = Date.now() - THROTTLE_MS;\n }\n /**\n * Get the document to add for speculative authentication. This also needs\n * to add a db field from the credentials source.\n */\n async speculativeAuth(connection, credentials) {\n // Check if the Client Cache has an access token.\n // If it does, cache the access token in the Connection Cache and send a JwtStepRequest\n // with the cached access token in the speculative authentication SASL payload.\n if (this.cache.hasAccessToken) {\n const accessToken = this.cache.getAccessToken();\n connection.accessToken = accessToken;\n const document = (0, command_builders_1.finishCommandDocument)(accessToken);\n document.db = credentials.source;\n return { speculativeAuthenticate: document };\n }\n return {};\n }\n /**\n * Reauthenticate the callback workflow. For this we invalidated the access token\n * in the cache and run the authentication steps again. No initial handshake needs\n * to be sent.\n */\n async reauthenticate(connection, credentials) {\n if (this.cache.hasAccessToken) {\n // Reauthentication implies the token has expired.\n if (connection.accessToken === this.cache.getAccessToken()) {\n // If connection's access token is the same as the cache's, remove\n // the token from the cache and connection.\n this.cache.removeAccessToken();\n delete connection.accessToken;\n }\n else {\n // If the connection's access token is different from the cache's, set\n // the cache's token on the connection and do not remove from the\n // cache.\n connection.accessToken = this.cache.getAccessToken();\n }\n }\n await this.execute(connection, credentials);\n }\n /**\n * Starts the callback authentication process. If there is a speculative\n * authentication document from the initial handshake, then we will use that\n * value to get the issuer, otherwise we will send the saslStart command.\n */\n async startAuthentication(connection, credentials, response) {\n let result;\n if (response?.speculativeAuthenticate) {\n result = response.speculativeAuthenticate;\n }\n else {\n result = await connection.command((0, utils_1.ns)(credentials.source), (0, command_builders_1.startCommandDocument)(credentials), undefined);\n }\n return result;\n }\n /**\n * Finishes the callback authentication process.\n */\n async finishAuthentication(connection, credentials, token, conversationId) {\n await connection.command((0, utils_1.ns)(credentials.source), (0, command_builders_1.finishCommandDocument)(token, conversationId), undefined);\n }\n /**\n * Executes the callback and validates the output.\n */\n async executeAndValidateCallback(params) {\n const result = await this.callback(params);\n // Validate that the result returned by the callback is acceptable. If it is not\n // we must clear the token result from the cache.\n if (isCallbackResultInvalid(result)) {\n throw new error_1.MongoMissingCredentialsError(CALLBACK_RESULT_ERROR);\n }\n return result;\n }\n /**\n * Ensure the callback is only executed one at a time and throttles the calls\n * to every 100ms.\n */\n withLock(callback) {\n let lock = Promise.resolve();\n return async (params) => {\n // We do this to ensure that we would never return the result of the\n // previous lock, only the current callback's value would get returned.\n await lock;\n lock = lock\n .catch(() => null)\n .then(async () => {\n const difference = Date.now() - this.lastExecutionTime;\n if (difference <= THROTTLE_MS) {\n await (0, promises_1.setTimeout)(THROTTLE_MS - difference, { signal: params.timeoutContext });\n }\n this.lastExecutionTime = Date.now();\n return await callback(params);\n });\n return await lock;\n };\n }\n}\nexports.CallbackWorkflow = CallbackWorkflow;\n/**\n * Determines if a result returned from a request or refresh callback\n * function is invalid. This means the result is nullish, doesn't contain\n * the accessToken required field, and does not contain extra fields.\n */\nfunction isCallbackResultInvalid(tokenResult) {\n if (tokenResult == null || typeof tokenResult !== 'object')\n return true;\n if (!('accessToken' in tokenResult))\n return true;\n return !Object.getOwnPropertyNames(tokenResult).every(prop => RESULT_PROPERTIES.includes(prop));\n}\n//# sourceMappingURL=callback_workflow.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;AACA,QAAO,eAAe,SAAS,cAAc,EAAE,OAAO,MAAM,CAAC;AAC7D,SAAQ,mBAAmB,QAAQ,uBAAuB,QAAQ,mBAAmB,KAAK;CAC1F,MAAM,uBAAqB,kBAAkB;CAC7C,MAAM;CACN,MAAM;CACN,MAAM;;AAEN,SAAQ,mBAAmB;;AAE3B,SAAQ,uBAAuB;;CAE/B,MAAM,oBAAoB;EAAC;EAAe;EAAoB;EAAe;;CAE7E,MAAM,wBAAwB;;CAE9B,MAAM,cAAc;;;;;CAKpB,IAAM,mBAAN,MAAuB;;;;EAInB,YAAY,OAAO,UAAU;AACzB,QAAK,QAAQ;AACb,QAAK,WAAW,KAAK,SAAS,SAAS;AACvC,QAAK,oBAAoB,KAAK,KAAK,GAAG;;;;;;EAM1C,MAAM,gBAAgB,YAAY,aAAa;AAI3C,OAAI,KAAK,MAAM,gBAAgB;IAC3B,MAAM,cAAc,KAAK,MAAM,gBAAgB;AAC/C,eAAW,cAAc;IACzB,MAAM,YAAY,GAAG,mBAAmB,uBAAuB,YAAY;AAC3E,aAAS,KAAK,YAAY;AAC1B,WAAO,EAAE,yBAAyB,UAAU;;AAEhD,UAAO,EAAE;;;;;;;EAOb,MAAM,eAAe,YAAY,aAAa;AAC1C,OAAI,KAAK,MAAM,eAEX,KAAI,WAAW,gBAAgB,KAAK,MAAM,gBAAgB,EAAE;AAGxD,SAAK,MAAM,mBAAmB;AAC9B,WAAO,WAAW;SAMlB,YAAW,cAAc,KAAK,MAAM,gBAAgB;AAG5D,SAAM,KAAK,QAAQ,YAAY,YAAY;;;;;;;EAO/C,MAAM,oBAAoB,YAAY,aAAa,UAAU;GACzD,IAAI;AACJ,OAAI,UAAU,wBACV,UAAS,SAAS;OAGlB,UAAS,MAAM,WAAW,SAAS,GAAG,QAAQ,IAAI,YAAY,OAAO,GAAG,GAAG,mBAAmB,sBAAsB,YAAY,EAAE,OAAU;AAEhJ,UAAO;;;;;EAKX,MAAM,qBAAqB,YAAY,aAAa,OAAO,gBAAgB;AACvE,SAAM,WAAW,SAAS,GAAG,QAAQ,IAAI,YAAY,OAAO,GAAG,GAAG,mBAAmB,uBAAuB,OAAO,eAAe,EAAE,OAAU;;;;;EAKlJ,MAAM,2BAA2B,QAAQ;GACrC,MAAM,SAAS,MAAM,KAAK,SAAS,OAAO;AAG1C,OAAI,wBAAwB,OAAO,CAC/B,OAAM,IAAI,QAAQ,6BAA6B,sBAAsB;AAEzE,UAAO;;;;;;EAMX,SAAS,UAAU;GACf,IAAI,OAAO,QAAQ,SAAS;AAC5B,UAAO,OAAO,WAAW;AAGrB,UAAM;AACN,WAAO,KACF,YAAY,KAAK,CACjB,KAAK,YAAY;KAClB,MAAM,aAAa,KAAK,KAAK,GAAG,KAAK;AACrC,SAAI,cAAc,YACd,QAAO,GAAG,WAAW,YAAY,cAAc,YAAY,EAAE,QAAQ,OAAO,gBAAgB,CAAC;AAEjG,UAAK,oBAAoB,KAAK,KAAK;AACnC,YAAO,MAAM,SAAS,OAAO;MAC/B;AACF,WAAO,MAAM;;;;AAIzB,SAAQ,mBAAmB;;;;;;CAM3B,SAAS,wBAAwB,aAAa;AAC1C,MAAI,eAAe,QAAQ,OAAO,gBAAgB,SAC9C,QAAO;AACX,MAAI,EAAE,iBAAiB,aACnB,QAAO;AACX,SAAO,CAAC,OAAO,oBAAoB,YAAY,CAAC,OAAM,SAAQ,kBAAkB,SAAS,KAAK,CAAC"}
@@ -1,47 +0,0 @@
1
- import { __commonJSMin } from "../../../../../../../../../_virtual/rolldown_runtime.mjs";
2
- import { require_bson } from "../../../bson.mjs";
3
- import { require_providers } from "../providers.mjs";
4
-
5
- //#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/command_builders.js
6
- var require_command_builders = /* @__PURE__ */ __commonJSMin(((exports) => {
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.finishCommandDocument = finishCommandDocument;
9
- exports.startCommandDocument = startCommandDocument;
10
- const bson_1 = require_bson();
11
- const providers_1 = require_providers();
12
- /**
13
- * Generate the finishing command document for authentication. Will be a
14
- * saslStart or saslContinue depending on the presence of a conversation id.
15
- */
16
- function finishCommandDocument(token, conversationId) {
17
- if (conversationId != null) return {
18
- saslContinue: 1,
19
- conversationId,
20
- payload: new bson_1.Binary(bson_1.BSON.serialize({ jwt: token }))
21
- };
22
- return {
23
- saslStart: 1,
24
- mechanism: providers_1.AuthMechanism.MONGODB_OIDC,
25
- payload: new bson_1.Binary(bson_1.BSON.serialize({ jwt: token }))
26
- };
27
- }
28
- /**
29
- * Generate the saslStart command document.
30
- */
31
- function startCommandDocument(credentials) {
32
- const payload = {};
33
- if (credentials.username) payload.n = credentials.username;
34
- return {
35
- saslStart: 1,
36
- autoAuthorize: 1,
37
- mechanism: providers_1.AuthMechanism.MONGODB_OIDC,
38
- payload: new bson_1.Binary(bson_1.BSON.serialize(payload))
39
- };
40
- }
41
- }));
42
-
43
- //#endregion
44
- export default require_command_builders();
45
-
46
- export { require_command_builders };
47
- //# sourceMappingURL=command_builders.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"command_builders.mjs","names":[],"sources":["../../../../../../../../../../../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/command_builders.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.finishCommandDocument = finishCommandDocument;\nexports.startCommandDocument = startCommandDocument;\nconst bson_1 = require(\"../../../bson\");\nconst providers_1 = require(\"../providers\");\n/**\n * Generate the finishing command document for authentication. Will be a\n * saslStart or saslContinue depending on the presence of a conversation id.\n */\nfunction finishCommandDocument(token, conversationId) {\n if (conversationId != null) {\n return {\n saslContinue: 1,\n conversationId: conversationId,\n payload: new bson_1.Binary(bson_1.BSON.serialize({ jwt: token }))\n };\n }\n // saslContinue requires a conversationId in the command to be valid so in this\n // case the server allows \"step two\" to actually be a saslStart with the token\n // as the jwt since the use of the cached value has no correlating conversating\n // on the particular connection.\n return {\n saslStart: 1,\n mechanism: providers_1.AuthMechanism.MONGODB_OIDC,\n payload: new bson_1.Binary(bson_1.BSON.serialize({ jwt: token }))\n };\n}\n/**\n * Generate the saslStart command document.\n */\nfunction startCommandDocument(credentials) {\n const payload = {};\n if (credentials.username) {\n payload.n = credentials.username;\n }\n return {\n saslStart: 1,\n autoAuthorize: 1,\n mechanism: providers_1.AuthMechanism.MONGODB_OIDC,\n payload: new bson_1.Binary(bson_1.BSON.serialize(payload))\n };\n}\n//# sourceMappingURL=command_builders.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;AACA,QAAO,eAAe,SAAS,cAAc,EAAE,OAAO,MAAM,CAAC;AAC7D,SAAQ,wBAAwB;AAChC,SAAQ,uBAAuB;CAC/B,MAAM;CACN,MAAM;;;;;CAKN,SAAS,sBAAsB,OAAO,gBAAgB;AAClD,MAAI,kBAAkB,KAClB,QAAO;GACH,cAAc;GACE;GAChB,SAAS,IAAI,OAAO,OAAO,OAAO,KAAK,UAAU,EAAE,KAAK,OAAO,CAAC,CAAC;GACpE;AAML,SAAO;GACH,WAAW;GACX,WAAW,YAAY,cAAc;GACrC,SAAS,IAAI,OAAO,OAAO,OAAO,KAAK,UAAU,EAAE,KAAK,OAAO,CAAC,CAAC;GACpE;;;;;CAKL,SAAS,qBAAqB,aAAa;EACvC,MAAM,UAAU,EAAE;AAClB,MAAI,YAAY,SACZ,SAAQ,IAAI,YAAY;AAE5B,SAAO;GACH,WAAW;GACX,eAAe;GACf,WAAW,YAAY,cAAc;GACrC,SAAS,IAAI,OAAO,OAAO,OAAO,KAAK,UAAU,QAAQ,CAAC;GAC7D"}
@@ -1,44 +0,0 @@
1
- import { __commonJSMin } from "../../../../../../../../../_virtual/rolldown_runtime.mjs";
2
- import { require_error } from "../../../error.mjs";
3
- import { require_utils } from "../../../utils.mjs";
4
-
5
- //#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/gcp_machine_workflow.js
6
- var require_gcp_machine_workflow = /* @__PURE__ */ __commonJSMin(((exports) => {
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.callback = void 0;
9
- const error_1 = require_error();
10
- const utils_1 = require_utils();
11
- /** GCP base URL. */
12
- const GCP_BASE_URL = "http://metadata/computeMetadata/v1/instance/service-accounts/default/identity";
13
- /** GCP request headers. */
14
- const GCP_HEADERS = Object.freeze({ "Metadata-Flavor": "Google" });
15
- /** Error for when the token audience is missing in the environment. */
16
- const TOKEN_RESOURCE_MISSING_ERROR = "TOKEN_RESOURCE must be set in the auth mechanism properties when ENVIRONMENT is gcp.";
17
- /**
18
- * The callback function to be used in the automated callback workflow.
19
- * @param params - The OIDC callback parameters.
20
- * @returns The OIDC response.
21
- */
22
- const callback = async (params) => {
23
- const tokenAudience = params.tokenAudience;
24
- if (!tokenAudience) throw new error_1.MongoGCPError(TOKEN_RESOURCE_MISSING_ERROR);
25
- return await getGcpTokenData(tokenAudience);
26
- };
27
- exports.callback = callback;
28
- /**
29
- * Hit the GCP endpoint to get the token data.
30
- */
31
- async function getGcpTokenData(tokenAudience) {
32
- const url = new URL(GCP_BASE_URL);
33
- url.searchParams.append("audience", tokenAudience);
34
- const response = await (0, utils_1.get)(url, { headers: GCP_HEADERS });
35
- if (response.status !== 200) throw new error_1.MongoGCPError(`Status code ${response.status} returned from the GCP endpoint. Response body: ${response.body}`);
36
- return { accessToken: response.body };
37
- }
38
- }));
39
-
40
- //#endregion
41
- export default require_gcp_machine_workflow();
42
-
43
- export { require_gcp_machine_workflow };
44
- //# sourceMappingURL=gcp_machine_workflow.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"gcp_machine_workflow.mjs","names":[],"sources":["../../../../../../../../../../../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/gcp_machine_workflow.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.callback = void 0;\nconst error_1 = require(\"../../../error\");\nconst utils_1 = require(\"../../../utils\");\n/** GCP base URL. */\nconst GCP_BASE_URL = 'http://metadata/computeMetadata/v1/instance/service-accounts/default/identity';\n/** GCP request headers. */\nconst GCP_HEADERS = Object.freeze({ 'Metadata-Flavor': 'Google' });\n/** Error for when the token audience is missing in the environment. */\nconst TOKEN_RESOURCE_MISSING_ERROR = 'TOKEN_RESOURCE must be set in the auth mechanism properties when ENVIRONMENT is gcp.';\n/**\n * The callback function to be used in the automated callback workflow.\n * @param params - The OIDC callback parameters.\n * @returns The OIDC response.\n */\nconst callback = async (params) => {\n const tokenAudience = params.tokenAudience;\n if (!tokenAudience) {\n throw new error_1.MongoGCPError(TOKEN_RESOURCE_MISSING_ERROR);\n }\n return await getGcpTokenData(tokenAudience);\n};\nexports.callback = callback;\n/**\n * Hit the GCP endpoint to get the token data.\n */\nasync function getGcpTokenData(tokenAudience) {\n const url = new URL(GCP_BASE_URL);\n url.searchParams.append('audience', tokenAudience);\n const response = await (0, utils_1.get)(url, {\n headers: GCP_HEADERS\n });\n if (response.status !== 200) {\n throw new error_1.MongoGCPError(`Status code ${response.status} returned from the GCP endpoint. Response body: ${response.body}`);\n }\n return { accessToken: response.body };\n}\n//# sourceMappingURL=gcp_machine_workflow.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;AACA,QAAO,eAAe,SAAS,cAAc,EAAE,OAAO,MAAM,CAAC;AAC7D,SAAQ,WAAW,KAAK;CACxB,MAAM;CACN,MAAM;;CAEN,MAAM,eAAe;;CAErB,MAAM,cAAc,OAAO,OAAO,EAAE,mBAAmB,UAAU,CAAC;;CAElE,MAAM,+BAA+B;;;;;;CAMrC,MAAM,WAAW,OAAO,WAAW;EAC/B,MAAM,gBAAgB,OAAO;AAC7B,MAAI,CAAC,cACD,OAAM,IAAI,QAAQ,cAAc,6BAA6B;AAEjE,SAAO,MAAM,gBAAgB,cAAc;;AAE/C,SAAQ,WAAW;;;;CAInB,eAAe,gBAAgB,eAAe;EAC1C,MAAM,MAAM,IAAI,IAAI,aAAa;AACjC,MAAI,aAAa,OAAO,YAAY,cAAc;EAClD,MAAM,WAAW,OAAO,GAAG,QAAQ,KAAK,KAAK,EACzC,SAAS,aACZ,CAAC;AACF,MAAI,SAAS,WAAW,IACpB,OAAM,IAAI,QAAQ,cAAc,eAAe,SAAS,OAAO,kDAAkD,SAAS,OAAO;AAErI,SAAO,EAAE,aAAa,SAAS,MAAM"}
@@ -1,101 +0,0 @@
1
- import { __commonJSMin } from "../../../../../../../../../_virtual/rolldown_runtime.mjs";
2
- import { require_bson } from "../../../bson.mjs";
3
- import { require_error } from "../../../error.mjs";
4
- import { require_timeout } from "../../../timeout.mjs";
5
- import { require_callback_workflow } from "./callback_workflow.mjs";
6
- import { require_mongodb_oidc } from "../mongodb_oidc.mjs";
7
-
8
- //#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/human_callback_workflow.js
9
- var require_human_callback_workflow = /* @__PURE__ */ __commonJSMin(((exports) => {
10
- Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.HumanCallbackWorkflow = void 0;
12
- const bson_1 = require_bson();
13
- const error_1 = require_error();
14
- const timeout_1 = require_timeout();
15
- const mongodb_oidc_1 = require_mongodb_oidc();
16
- const callback_workflow_1 = require_callback_workflow();
17
- /**
18
- * Class implementing behaviour for the non human callback workflow.
19
- * @internal
20
- */
21
- var HumanCallbackWorkflow = class extends callback_workflow_1.CallbackWorkflow {
22
- /**
23
- * Instantiate the human callback workflow.
24
- */
25
- constructor(cache, callback) {
26
- super(cache, callback);
27
- }
28
- /**
29
- * Execute the OIDC human callback workflow.
30
- */
31
- async execute(connection, credentials) {
32
- if (this.cache.hasAccessToken) {
33
- const token = this.cache.getAccessToken();
34
- connection.accessToken = token;
35
- try {
36
- return await this.finishAuthentication(connection, credentials, token);
37
- } catch (error) {
38
- if (error instanceof error_1.MongoError && error.code === error_1.MONGODB_ERROR_CODES.AuthenticationFailed) {
39
- this.cache.removeAccessToken();
40
- delete connection.accessToken;
41
- return await this.execute(connection, credentials);
42
- } else throw error;
43
- }
44
- }
45
- if (this.cache.hasRefreshToken) {
46
- const refreshToken = this.cache.getRefreshToken();
47
- const result = await this.fetchAccessToken(this.cache.getIdpInfo(), credentials, refreshToken);
48
- this.cache.put(result);
49
- connection.accessToken = result.accessToken;
50
- try {
51
- return await this.finishAuthentication(connection, credentials, result.accessToken);
52
- } catch (error) {
53
- if (error instanceof error_1.MongoError && error.code === error_1.MONGODB_ERROR_CODES.AuthenticationFailed) {
54
- this.cache.removeRefreshToken();
55
- delete connection.accessToken;
56
- return await this.execute(connection, credentials);
57
- } else throw error;
58
- }
59
- }
60
- const startResponse = await this.startAuthentication(connection, credentials);
61
- const conversationId = startResponse.conversationId;
62
- const idpInfo = bson_1.BSON.deserialize(startResponse.payload.buffer);
63
- const callbackResponse = await this.fetchAccessToken(idpInfo, credentials);
64
- this.cache.put(callbackResponse, idpInfo);
65
- connection.accessToken = callbackResponse.accessToken;
66
- return await this.finishAuthentication(connection, credentials, callbackResponse.accessToken, conversationId);
67
- }
68
- /**
69
- * Fetches an access token using the callback.
70
- */
71
- async fetchAccessToken(idpInfo, credentials, refreshToken) {
72
- const controller = new AbortController();
73
- const params = {
74
- timeoutContext: controller.signal,
75
- version: mongodb_oidc_1.OIDC_VERSION,
76
- idpInfo
77
- };
78
- if (credentials.username) params.username = credentials.username;
79
- if (refreshToken) params.refreshToken = refreshToken;
80
- const timeout = timeout_1.Timeout.expires(callback_workflow_1.HUMAN_TIMEOUT_MS);
81
- try {
82
- return await Promise.race([this.executeAndValidateCallback(params), timeout]);
83
- } catch (error) {
84
- if (timeout_1.TimeoutError.is(error)) {
85
- controller.abort();
86
- throw new error_1.MongoOIDCError(`OIDC callback timed out after ${callback_workflow_1.HUMAN_TIMEOUT_MS}ms.`);
87
- }
88
- throw error;
89
- } finally {
90
- timeout.clear();
91
- }
92
- }
93
- };
94
- exports.HumanCallbackWorkflow = HumanCallbackWorkflow;
95
- }));
96
-
97
- //#endregion
98
- export default require_human_callback_workflow();
99
-
100
- export { require_human_callback_workflow };
101
- //# sourceMappingURL=human_callback_workflow.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"human_callback_workflow.mjs","names":[],"sources":["../../../../../../../../../../../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/human_callback_workflow.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HumanCallbackWorkflow = void 0;\nconst bson_1 = require(\"../../../bson\");\nconst error_1 = require(\"../../../error\");\nconst timeout_1 = require(\"../../../timeout\");\nconst mongodb_oidc_1 = require(\"../mongodb_oidc\");\nconst callback_workflow_1 = require(\"./callback_workflow\");\n/**\n * Class implementing behaviour for the non human callback workflow.\n * @internal\n */\nclass HumanCallbackWorkflow extends callback_workflow_1.CallbackWorkflow {\n /**\n * Instantiate the human callback workflow.\n */\n constructor(cache, callback) {\n super(cache, callback);\n }\n /**\n * Execute the OIDC human callback workflow.\n */\n async execute(connection, credentials) {\n // Check if the Client Cache has an access token.\n // If it does, cache the access token in the Connection Cache and perform a One-Step SASL conversation\n // using the access token. If the server returns an Authentication error (18),\n // invalidate the access token token from the Client Cache, clear the Connection Cache,\n // and restart the authentication flow. Raise any other errors to the user. On success, exit the algorithm.\n if (this.cache.hasAccessToken) {\n const token = this.cache.getAccessToken();\n connection.accessToken = token;\n try {\n return await this.finishAuthentication(connection, credentials, token);\n }\n catch (error) {\n if (error instanceof error_1.MongoError &&\n error.code === error_1.MONGODB_ERROR_CODES.AuthenticationFailed) {\n this.cache.removeAccessToken();\n delete connection.accessToken;\n return await this.execute(connection, credentials);\n }\n else {\n throw error;\n }\n }\n }\n // Check if the Client Cache has a refresh token.\n // If it does, call the OIDC Human Callback with the cached refresh token and IdpInfo to get a\n // new access token. Cache the new access token in the Client Cache and Connection Cache.\n // Perform a One-Step SASL conversation using the new access token. If the the server returns\n // an Authentication error (18), clear the refresh token, invalidate the access token from the\n // Client Cache, clear the Connection Cache, and restart the authentication flow. Raise any other\n // errors to the user. On success, exit the algorithm.\n if (this.cache.hasRefreshToken) {\n const refreshToken = this.cache.getRefreshToken();\n const result = await this.fetchAccessToken(this.cache.getIdpInfo(), credentials, refreshToken);\n this.cache.put(result);\n connection.accessToken = result.accessToken;\n try {\n return await this.finishAuthentication(connection, credentials, result.accessToken);\n }\n catch (error) {\n if (error instanceof error_1.MongoError &&\n error.code === error_1.MONGODB_ERROR_CODES.AuthenticationFailed) {\n this.cache.removeRefreshToken();\n delete connection.accessToken;\n return await this.execute(connection, credentials);\n }\n else {\n throw error;\n }\n }\n }\n // Start a new Two-Step SASL conversation.\n // Run a PrincipalStepRequest to get the IdpInfo.\n // Call the OIDC Human Callback with the new IdpInfo to get a new access token and optional refresh\n // token. Drivers MUST NOT pass a cached refresh token to the callback when performing\n // a new Two-Step conversation. Cache the new IdpInfo and refresh token in the Client Cache and the\n // new access token in the Client Cache and Connection Cache.\n // Attempt to authenticate using a JwtStepRequest with the new access token. Raise any errors to the user.\n const startResponse = await this.startAuthentication(connection, credentials);\n const conversationId = startResponse.conversationId;\n const idpInfo = bson_1.BSON.deserialize(startResponse.payload.buffer);\n const callbackResponse = await this.fetchAccessToken(idpInfo, credentials);\n this.cache.put(callbackResponse, idpInfo);\n connection.accessToken = callbackResponse.accessToken;\n return await this.finishAuthentication(connection, credentials, callbackResponse.accessToken, conversationId);\n }\n /**\n * Fetches an access token using the callback.\n */\n async fetchAccessToken(idpInfo, credentials, refreshToken) {\n const controller = new AbortController();\n const params = {\n timeoutContext: controller.signal,\n version: mongodb_oidc_1.OIDC_VERSION,\n idpInfo: idpInfo\n };\n if (credentials.username) {\n params.username = credentials.username;\n }\n if (refreshToken) {\n params.refreshToken = refreshToken;\n }\n const timeout = timeout_1.Timeout.expires(callback_workflow_1.HUMAN_TIMEOUT_MS);\n try {\n return await Promise.race([this.executeAndValidateCallback(params), timeout]);\n }\n catch (error) {\n if (timeout_1.TimeoutError.is(error)) {\n controller.abort();\n throw new error_1.MongoOIDCError(`OIDC callback timed out after ${callback_workflow_1.HUMAN_TIMEOUT_MS}ms.`);\n }\n throw error;\n }\n finally {\n timeout.clear();\n }\n }\n}\nexports.HumanCallbackWorkflow = HumanCallbackWorkflow;\n//# sourceMappingURL=human_callback_workflow.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;AACA,QAAO,eAAe,SAAS,cAAc,EAAE,OAAO,MAAM,CAAC;AAC7D,SAAQ,wBAAwB,KAAK;CACrC,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;;;;;CAKN,IAAM,wBAAN,cAAoC,oBAAoB,iBAAiB;;;;EAIrE,YAAY,OAAO,UAAU;AACzB,SAAM,OAAO,SAAS;;;;;EAK1B,MAAM,QAAQ,YAAY,aAAa;AAMnC,OAAI,KAAK,MAAM,gBAAgB;IAC3B,MAAM,QAAQ,KAAK,MAAM,gBAAgB;AACzC,eAAW,cAAc;AACzB,QAAI;AACA,YAAO,MAAM,KAAK,qBAAqB,YAAY,aAAa,MAAM;aAEnE,OAAO;AACV,SAAI,iBAAiB,QAAQ,cACzB,MAAM,SAAS,QAAQ,oBAAoB,sBAAsB;AACjE,WAAK,MAAM,mBAAmB;AAC9B,aAAO,WAAW;AAClB,aAAO,MAAM,KAAK,QAAQ,YAAY,YAAY;WAGlD,OAAM;;;AAWlB,OAAI,KAAK,MAAM,iBAAiB;IAC5B,MAAM,eAAe,KAAK,MAAM,iBAAiB;IACjD,MAAM,SAAS,MAAM,KAAK,iBAAiB,KAAK,MAAM,YAAY,EAAE,aAAa,aAAa;AAC9F,SAAK,MAAM,IAAI,OAAO;AACtB,eAAW,cAAc,OAAO;AAChC,QAAI;AACA,YAAO,MAAM,KAAK,qBAAqB,YAAY,aAAa,OAAO,YAAY;aAEhF,OAAO;AACV,SAAI,iBAAiB,QAAQ,cACzB,MAAM,SAAS,QAAQ,oBAAoB,sBAAsB;AACjE,WAAK,MAAM,oBAAoB;AAC/B,aAAO,WAAW;AAClB,aAAO,MAAM,KAAK,QAAQ,YAAY,YAAY;WAGlD,OAAM;;;GAWlB,MAAM,gBAAgB,MAAM,KAAK,oBAAoB,YAAY,YAAY;GAC7E,MAAM,iBAAiB,cAAc;GACrC,MAAM,UAAU,OAAO,KAAK,YAAY,cAAc,QAAQ,OAAO;GACrE,MAAM,mBAAmB,MAAM,KAAK,iBAAiB,SAAS,YAAY;AAC1E,QAAK,MAAM,IAAI,kBAAkB,QAAQ;AACzC,cAAW,cAAc,iBAAiB;AAC1C,UAAO,MAAM,KAAK,qBAAqB,YAAY,aAAa,iBAAiB,aAAa,eAAe;;;;;EAKjH,MAAM,iBAAiB,SAAS,aAAa,cAAc;GACvD,MAAM,aAAa,IAAI,iBAAiB;GACxC,MAAM,SAAS;IACX,gBAAgB,WAAW;IAC3B,SAAS,eAAe;IACf;IACZ;AACD,OAAI,YAAY,SACZ,QAAO,WAAW,YAAY;AAElC,OAAI,aACA,QAAO,eAAe;GAE1B,MAAM,UAAU,UAAU,QAAQ,QAAQ,oBAAoB,iBAAiB;AAC/E,OAAI;AACA,WAAO,MAAM,QAAQ,KAAK,CAAC,KAAK,2BAA2B,OAAO,EAAE,QAAQ,CAAC;YAE1E,OAAO;AACV,QAAI,UAAU,aAAa,GAAG,MAAM,EAAE;AAClC,gBAAW,OAAO;AAClB,WAAM,IAAI,QAAQ,eAAe,iCAAiC,oBAAoB,iBAAiB,KAAK;;AAEhH,UAAM;aAEF;AACJ,YAAQ,OAAO;;;;AAI3B,SAAQ,wBAAwB"}
@@ -1,33 +0,0 @@
1
- import { __commonJSMin, __require } from "../../../../../../../../../_virtual/rolldown_runtime.mjs";
2
-
3
- //#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/k8s_machine_workflow.js
4
- var require_k8s_machine_workflow = /* @__PURE__ */ __commonJSMin(((exports) => {
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.callback = void 0;
7
- const promises_1 = __require("fs/promises");
8
- /** The fallback file name */
9
- const FALLBACK_FILENAME = "/var/run/secrets/kubernetes.io/serviceaccount/token";
10
- /** The azure environment variable for the file name. */
11
- const AZURE_FILENAME = "AZURE_FEDERATED_TOKEN_FILE";
12
- /** The AWS environment variable for the file name. */
13
- const AWS_FILENAME = "AWS_WEB_IDENTITY_TOKEN_FILE";
14
- /**
15
- * The callback function to be used in the automated callback workflow.
16
- * @param params - The OIDC callback parameters.
17
- * @returns The OIDC response.
18
- */
19
- const callback = async () => {
20
- let filename;
21
- if (process.env[AZURE_FILENAME]) filename = process.env[AZURE_FILENAME];
22
- else if (process.env[AWS_FILENAME]) filename = process.env[AWS_FILENAME];
23
- else filename = FALLBACK_FILENAME;
24
- return { accessToken: await (0, promises_1.readFile)(filename, "utf8") };
25
- };
26
- exports.callback = callback;
27
- }));
28
-
29
- //#endregion
30
- export default require_k8s_machine_workflow();
31
-
32
- export { require_k8s_machine_workflow };
33
- //# sourceMappingURL=k8s_machine_workflow.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"k8s_machine_workflow.mjs","names":[],"sources":["../../../../../../../../../../../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/k8s_machine_workflow.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.callback = void 0;\nconst promises_1 = require(\"fs/promises\");\n/** The fallback file name */\nconst FALLBACK_FILENAME = '/var/run/secrets/kubernetes.io/serviceaccount/token';\n/** The azure environment variable for the file name. */\nconst AZURE_FILENAME = 'AZURE_FEDERATED_TOKEN_FILE';\n/** The AWS environment variable for the file name. */\nconst AWS_FILENAME = 'AWS_WEB_IDENTITY_TOKEN_FILE';\n/**\n * The callback function to be used in the automated callback workflow.\n * @param params - The OIDC callback parameters.\n * @returns The OIDC response.\n */\nconst callback = async () => {\n let filename;\n if (process.env[AZURE_FILENAME]) {\n filename = process.env[AZURE_FILENAME];\n }\n else if (process.env[AWS_FILENAME]) {\n filename = process.env[AWS_FILENAME];\n }\n else {\n filename = FALLBACK_FILENAME;\n }\n const token = await (0, promises_1.readFile)(filename, 'utf8');\n return { accessToken: token };\n};\nexports.callback = callback;\n//# sourceMappingURL=k8s_machine_workflow.js.map"],"x_google_ignoreList":[0],"mappings":";;;;AACA,QAAO,eAAe,SAAS,cAAc,EAAE,OAAO,MAAM,CAAC;AAC7D,SAAQ,WAAW,KAAK;CACxB,MAAM,uBAAqB,cAAc;;CAEzC,MAAM,oBAAoB;;CAE1B,MAAM,iBAAiB;;CAEvB,MAAM,eAAe;;;;;;CAMrB,MAAM,WAAW,YAAY;EACzB,IAAI;AACJ,MAAI,QAAQ,IAAI,gBACZ,YAAW,QAAQ,IAAI;WAElB,QAAQ,IAAI,cACjB,YAAW,QAAQ,IAAI;MAGvB,YAAW;AAGf,SAAO,EAAE,aADK,OAAO,GAAG,WAAW,UAAU,UAAU,OAAO,EACjC;;AAEjC,SAAQ,WAAW"}
@@ -1,53 +0,0 @@
1
- import { __commonJSMin } from "../../../../../../../../../_virtual/rolldown_runtime.mjs";
2
- import { require_error } from "../../../error.mjs";
3
-
4
- //#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_cache.js
5
- var require_token_cache = /* @__PURE__ */ __commonJSMin(((exports) => {
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.TokenCache = void 0;
8
- const error_1 = require_error();
9
- var MongoOIDCError = class extends error_1.MongoDriverError {};
10
- /** @internal */
11
- var TokenCache = class {
12
- get hasAccessToken() {
13
- return !!this.accessToken;
14
- }
15
- get hasRefreshToken() {
16
- return !!this.refreshToken;
17
- }
18
- get hasIdpInfo() {
19
- return !!this.idpInfo;
20
- }
21
- getAccessToken() {
22
- if (!this.accessToken) throw new MongoOIDCError("Attempted to get an access token when none exists.");
23
- return this.accessToken;
24
- }
25
- getRefreshToken() {
26
- if (!this.refreshToken) throw new MongoOIDCError("Attempted to get a refresh token when none exists.");
27
- return this.refreshToken;
28
- }
29
- getIdpInfo() {
30
- if (!this.idpInfo) throw new MongoOIDCError("Attempted to get IDP information when none exists.");
31
- return this.idpInfo;
32
- }
33
- put(response, idpInfo) {
34
- this.accessToken = response.accessToken;
35
- this.refreshToken = response.refreshToken;
36
- this.expiresInSeconds = response.expiresInSeconds;
37
- if (idpInfo) this.idpInfo = idpInfo;
38
- }
39
- removeAccessToken() {
40
- this.accessToken = void 0;
41
- }
42
- removeRefreshToken() {
43
- this.refreshToken = void 0;
44
- }
45
- };
46
- exports.TokenCache = TokenCache;
47
- }));
48
-
49
- //#endregion
50
- export default require_token_cache();
51
-
52
- export { require_token_cache };
53
- //# sourceMappingURL=token_cache.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"token_cache.mjs","names":[],"sources":["../../../../../../../../../../../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_cache.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TokenCache = void 0;\nconst error_1 = require(\"../../../error\");\nclass MongoOIDCError extends error_1.MongoDriverError {\n}\n/** @internal */\nclass TokenCache {\n get hasAccessToken() {\n return !!this.accessToken;\n }\n get hasRefreshToken() {\n return !!this.refreshToken;\n }\n get hasIdpInfo() {\n return !!this.idpInfo;\n }\n getAccessToken() {\n if (!this.accessToken) {\n throw new MongoOIDCError('Attempted to get an access token when none exists.');\n }\n return this.accessToken;\n }\n getRefreshToken() {\n if (!this.refreshToken) {\n throw new MongoOIDCError('Attempted to get a refresh token when none exists.');\n }\n return this.refreshToken;\n }\n getIdpInfo() {\n if (!this.idpInfo) {\n throw new MongoOIDCError('Attempted to get IDP information when none exists.');\n }\n return this.idpInfo;\n }\n put(response, idpInfo) {\n this.accessToken = response.accessToken;\n this.refreshToken = response.refreshToken;\n this.expiresInSeconds = response.expiresInSeconds;\n if (idpInfo) {\n this.idpInfo = idpInfo;\n }\n }\n removeAccessToken() {\n this.accessToken = undefined;\n }\n removeRefreshToken() {\n this.refreshToken = undefined;\n }\n}\nexports.TokenCache = TokenCache;\n//# sourceMappingURL=token_cache.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;AACA,QAAO,eAAe,SAAS,cAAc,EAAE,OAAO,MAAM,CAAC;AAC7D,SAAQ,aAAa,KAAK;CAC1B,MAAM;CACN,IAAM,iBAAN,cAA6B,QAAQ,iBAAiB;;CAGtD,IAAM,aAAN,MAAiB;EACb,IAAI,iBAAiB;AACjB,UAAO,CAAC,CAAC,KAAK;;EAElB,IAAI,kBAAkB;AAClB,UAAO,CAAC,CAAC,KAAK;;EAElB,IAAI,aAAa;AACb,UAAO,CAAC,CAAC,KAAK;;EAElB,iBAAiB;AACb,OAAI,CAAC,KAAK,YACN,OAAM,IAAI,eAAe,qDAAqD;AAElF,UAAO,KAAK;;EAEhB,kBAAkB;AACd,OAAI,CAAC,KAAK,aACN,OAAM,IAAI,eAAe,qDAAqD;AAElF,UAAO,KAAK;;EAEhB,aAAa;AACT,OAAI,CAAC,KAAK,QACN,OAAM,IAAI,eAAe,qDAAqD;AAElF,UAAO,KAAK;;EAEhB,IAAI,UAAU,SAAS;AACnB,QAAK,cAAc,SAAS;AAC5B,QAAK,eAAe,SAAS;AAC7B,QAAK,mBAAmB,SAAS;AACjC,OAAI,QACA,MAAK,UAAU;;EAGvB,oBAAoB;AAChB,QAAK,cAAc;;EAEvB,qBAAqB;AACjB,QAAK,eAAe;;;AAG5B,SAAQ,aAAa"}
@@ -1,29 +0,0 @@
1
- import { __commonJSMin, __require } from "../../../../../../../../../_virtual/rolldown_runtime.mjs";
2
- import { require_error } from "../../../error.mjs";
3
-
4
- //#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_machine_workflow.js
5
- var require_token_machine_workflow = /* @__PURE__ */ __commonJSMin(((exports) => {
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.callback = void 0;
8
- const fs = __require("fs");
9
- const error_1 = require_error();
10
- /** Error for when the token is missing in the environment. */
11
- const TOKEN_MISSING_ERROR = "OIDC_TOKEN_FILE must be set in the environment.";
12
- /**
13
- * The callback function to be used in the automated callback workflow.
14
- * @param params - The OIDC callback parameters.
15
- * @returns The OIDC response.
16
- */
17
- const callback = async () => {
18
- const tokenFile = process.env.OIDC_TOKEN_FILE;
19
- if (!tokenFile) throw new error_1.MongoAWSError(TOKEN_MISSING_ERROR);
20
- return { accessToken: await fs.promises.readFile(tokenFile, "utf8") };
21
- };
22
- exports.callback = callback;
23
- }));
24
-
25
- //#endregion
26
- export default require_token_machine_workflow();
27
-
28
- export { require_token_machine_workflow };
29
- //# sourceMappingURL=token_machine_workflow.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"token_machine_workflow.mjs","names":[],"sources":["../../../../../../../../../../../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_machine_workflow.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.callback = void 0;\nconst fs = require(\"fs\");\nconst error_1 = require(\"../../../error\");\n/** Error for when the token is missing in the environment. */\nconst TOKEN_MISSING_ERROR = 'OIDC_TOKEN_FILE must be set in the environment.';\n/**\n * The callback function to be used in the automated callback workflow.\n * @param params - The OIDC callback parameters.\n * @returns The OIDC response.\n */\nconst callback = async () => {\n const tokenFile = process.env.OIDC_TOKEN_FILE;\n if (!tokenFile) {\n throw new error_1.MongoAWSError(TOKEN_MISSING_ERROR);\n }\n const token = await fs.promises.readFile(tokenFile, 'utf8');\n return { accessToken: token };\n};\nexports.callback = callback;\n//# sourceMappingURL=token_machine_workflow.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;AACA,QAAO,eAAe,SAAS,cAAc,EAAE,OAAO,MAAM,CAAC;AAC7D,SAAQ,WAAW,KAAK;CACxB,MAAM,eAAa,KAAK;CACxB,MAAM;;CAEN,MAAM,sBAAsB;;;;;;CAM5B,MAAM,WAAW,YAAY;EACzB,MAAM,YAAY,QAAQ,IAAI;AAC9B,MAAI,CAAC,UACD,OAAM,IAAI,QAAQ,cAAc,oBAAoB;AAGxD,SAAO,EAAE,aADK,MAAM,GAAG,SAAS,SAAS,WAAW,OAAO,EAC9B;;AAEjC,SAAQ,WAAW"}
@@ -1,83 +0,0 @@
1
- import { __commonJSMin } from "../../../../../../../../_virtual/rolldown_runtime.mjs";
2
- import { require_error } from "../../error.mjs";
3
- import { require_auth_provider } from "./auth_provider.mjs";
4
- import { require_automated_callback_workflow } from "./mongodb_oidc/automated_callback_workflow.mjs";
5
- import { require_azure_machine_workflow } from "./mongodb_oidc/azure_machine_workflow.mjs";
6
- import { require_gcp_machine_workflow } from "./mongodb_oidc/gcp_machine_workflow.mjs";
7
- import { require_k8s_machine_workflow } from "./mongodb_oidc/k8s_machine_workflow.mjs";
8
- import { require_token_cache } from "./mongodb_oidc/token_cache.mjs";
9
- import { require_token_machine_workflow } from "./mongodb_oidc/token_machine_workflow.mjs";
10
-
11
- //#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc.js
12
- var require_mongodb_oidc = /* @__PURE__ */ __commonJSMin(((exports) => {
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.MongoDBOIDC = exports.OIDC_WORKFLOWS = exports.OIDC_VERSION = void 0;
15
- const error_1 = require_error();
16
- const auth_provider_1 = require_auth_provider();
17
- const automated_callback_workflow_1 = require_automated_callback_workflow();
18
- const azure_machine_workflow_1 = require_azure_machine_workflow();
19
- const gcp_machine_workflow_1 = require_gcp_machine_workflow();
20
- const k8s_machine_workflow_1 = require_k8s_machine_workflow();
21
- const token_cache_1 = require_token_cache();
22
- const token_machine_workflow_1 = require_token_machine_workflow();
23
- /** Error when credentials are missing. */
24
- const MISSING_CREDENTIALS_ERROR = "AuthContext must provide credentials.";
25
- /** The current version of OIDC implementation. */
26
- exports.OIDC_VERSION = 1;
27
- /** @internal */
28
- exports.OIDC_WORKFLOWS = /* @__PURE__ */ new Map();
29
- exports.OIDC_WORKFLOWS.set("test", () => new automated_callback_workflow_1.AutomatedCallbackWorkflow(new token_cache_1.TokenCache(), token_machine_workflow_1.callback));
30
- exports.OIDC_WORKFLOWS.set("azure", () => new automated_callback_workflow_1.AutomatedCallbackWorkflow(new token_cache_1.TokenCache(), azure_machine_workflow_1.callback));
31
- exports.OIDC_WORKFLOWS.set("gcp", () => new automated_callback_workflow_1.AutomatedCallbackWorkflow(new token_cache_1.TokenCache(), gcp_machine_workflow_1.callback));
32
- exports.OIDC_WORKFLOWS.set("k8s", () => new automated_callback_workflow_1.AutomatedCallbackWorkflow(new token_cache_1.TokenCache(), k8s_machine_workflow_1.callback));
33
- /**
34
- * OIDC auth provider.
35
- */
36
- var MongoDBOIDC = class extends auth_provider_1.AuthProvider {
37
- /**
38
- * Instantiate the auth provider.
39
- */
40
- constructor(workflow) {
41
- super();
42
- if (!workflow) throw new error_1.MongoInvalidArgumentError("No workflow provided to the OIDC auth provider.");
43
- this.workflow = workflow;
44
- }
45
- /**
46
- * Authenticate using OIDC
47
- */
48
- async auth(authContext) {
49
- const { connection, reauthenticating, response } = authContext;
50
- if (response?.speculativeAuthenticate?.done && !reauthenticating) return;
51
- const credentials = getCredentials(authContext);
52
- if (reauthenticating) await this.workflow.reauthenticate(connection, credentials);
53
- else await this.workflow.execute(connection, credentials, response);
54
- }
55
- /**
56
- * Add the speculative auth for the initial handshake.
57
- */
58
- async prepare(handshakeDoc, authContext) {
59
- const { connection } = authContext;
60
- const credentials = getCredentials(authContext);
61
- const result = await this.workflow.speculativeAuth(connection, credentials);
62
- return {
63
- ...handshakeDoc,
64
- ...result
65
- };
66
- }
67
- };
68
- exports.MongoDBOIDC = MongoDBOIDC;
69
- /**
70
- * Get credentials from the auth context, throwing if they do not exist.
71
- */
72
- function getCredentials(authContext) {
73
- const { credentials } = authContext;
74
- if (!credentials) throw new error_1.MongoMissingCredentialsError(MISSING_CREDENTIALS_ERROR);
75
- return credentials;
76
- }
77
- }));
78
-
79
- //#endregion
80
- export default require_mongodb_oidc();
81
-
82
- export { require_mongodb_oidc };
83
- //# sourceMappingURL=mongodb_oidc.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mongodb_oidc.mjs","names":[],"sources":["../../../../../../../../../../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MongoDBOIDC = exports.OIDC_WORKFLOWS = exports.OIDC_VERSION = void 0;\nconst error_1 = require(\"../../error\");\nconst auth_provider_1 = require(\"./auth_provider\");\nconst automated_callback_workflow_1 = require(\"./mongodb_oidc/automated_callback_workflow\");\nconst azure_machine_workflow_1 = require(\"./mongodb_oidc/azure_machine_workflow\");\nconst gcp_machine_workflow_1 = require(\"./mongodb_oidc/gcp_machine_workflow\");\nconst k8s_machine_workflow_1 = require(\"./mongodb_oidc/k8s_machine_workflow\");\nconst token_cache_1 = require(\"./mongodb_oidc/token_cache\");\nconst token_machine_workflow_1 = require(\"./mongodb_oidc/token_machine_workflow\");\n/** Error when credentials are missing. */\nconst MISSING_CREDENTIALS_ERROR = 'AuthContext must provide credentials.';\n/** The current version of OIDC implementation. */\nexports.OIDC_VERSION = 1;\n/** @internal */\nexports.OIDC_WORKFLOWS = new Map();\nexports.OIDC_WORKFLOWS.set('test', () => new automated_callback_workflow_1.AutomatedCallbackWorkflow(new token_cache_1.TokenCache(), token_machine_workflow_1.callback));\nexports.OIDC_WORKFLOWS.set('azure', () => new automated_callback_workflow_1.AutomatedCallbackWorkflow(new token_cache_1.TokenCache(), azure_machine_workflow_1.callback));\nexports.OIDC_WORKFLOWS.set('gcp', () => new automated_callback_workflow_1.AutomatedCallbackWorkflow(new token_cache_1.TokenCache(), gcp_machine_workflow_1.callback));\nexports.OIDC_WORKFLOWS.set('k8s', () => new automated_callback_workflow_1.AutomatedCallbackWorkflow(new token_cache_1.TokenCache(), k8s_machine_workflow_1.callback));\n/**\n * OIDC auth provider.\n */\nclass MongoDBOIDC extends auth_provider_1.AuthProvider {\n /**\n * Instantiate the auth provider.\n */\n constructor(workflow) {\n super();\n if (!workflow) {\n throw new error_1.MongoInvalidArgumentError('No workflow provided to the OIDC auth provider.');\n }\n this.workflow = workflow;\n }\n /**\n * Authenticate using OIDC\n */\n async auth(authContext) {\n const { connection, reauthenticating, response } = authContext;\n if (response?.speculativeAuthenticate?.done && !reauthenticating) {\n return;\n }\n const credentials = getCredentials(authContext);\n if (reauthenticating) {\n await this.workflow.reauthenticate(connection, credentials);\n }\n else {\n await this.workflow.execute(connection, credentials, response);\n }\n }\n /**\n * Add the speculative auth for the initial handshake.\n */\n async prepare(handshakeDoc, authContext) {\n const { connection } = authContext;\n const credentials = getCredentials(authContext);\n const result = await this.workflow.speculativeAuth(connection, credentials);\n return { ...handshakeDoc, ...result };\n }\n}\nexports.MongoDBOIDC = MongoDBOIDC;\n/**\n * Get credentials from the auth context, throwing if they do not exist.\n */\nfunction getCredentials(authContext) {\n const { credentials } = authContext;\n if (!credentials) {\n throw new error_1.MongoMissingCredentialsError(MISSING_CREDENTIALS_ERROR);\n }\n return credentials;\n}\n//# sourceMappingURL=mongodb_oidc.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;AACA,QAAO,eAAe,SAAS,cAAc,EAAE,OAAO,MAAM,CAAC;AAC7D,SAAQ,cAAc,QAAQ,iBAAiB,QAAQ,eAAe,KAAK;CAC3E,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;;CAEN,MAAM,4BAA4B;;AAElC,SAAQ,eAAe;;AAEvB,SAAQ,iCAAiB,IAAI,KAAK;AAClC,SAAQ,eAAe,IAAI,cAAc,IAAI,8BAA8B,0BAA0B,IAAI,cAAc,YAAY,EAAE,yBAAyB,SAAS,CAAC;AACxK,SAAQ,eAAe,IAAI,eAAe,IAAI,8BAA8B,0BAA0B,IAAI,cAAc,YAAY,EAAE,yBAAyB,SAAS,CAAC;AACzK,SAAQ,eAAe,IAAI,aAAa,IAAI,8BAA8B,0BAA0B,IAAI,cAAc,YAAY,EAAE,uBAAuB,SAAS,CAAC;AACrK,SAAQ,eAAe,IAAI,aAAa,IAAI,8BAA8B,0BAA0B,IAAI,cAAc,YAAY,EAAE,uBAAuB,SAAS,CAAC;;;;CAIrK,IAAM,cAAN,cAA0B,gBAAgB,aAAa;;;;EAInD,YAAY,UAAU;AAClB,UAAO;AACP,OAAI,CAAC,SACD,OAAM,IAAI,QAAQ,0BAA0B,kDAAkD;AAElG,QAAK,WAAW;;;;;EAKpB,MAAM,KAAK,aAAa;GACpB,MAAM,EAAE,YAAY,kBAAkB,aAAa;AACnD,OAAI,UAAU,yBAAyB,QAAQ,CAAC,iBAC5C;GAEJ,MAAM,cAAc,eAAe,YAAY;AAC/C,OAAI,iBACA,OAAM,KAAK,SAAS,eAAe,YAAY,YAAY;OAG3D,OAAM,KAAK,SAAS,QAAQ,YAAY,aAAa,SAAS;;;;;EAMtE,MAAM,QAAQ,cAAc,aAAa;GACrC,MAAM,EAAE,eAAe;GACvB,MAAM,cAAc,eAAe,YAAY;GAC/C,MAAM,SAAS,MAAM,KAAK,SAAS,gBAAgB,YAAY,YAAY;AAC3E,UAAO;IAAE,GAAG;IAAc,GAAG;IAAQ;;;AAG7C,SAAQ,cAAc;;;;CAItB,SAAS,eAAe,aAAa;EACjC,MAAM,EAAE,gBAAgB;AACxB,MAAI,CAAC,YACD,OAAM,IAAI,QAAQ,6BAA6B,0BAA0B;AAE7E,SAAO"}