pecunia-root 0.1.0 → 0.1.1

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 (358) hide show
  1. package/dist/_virtual/rolldown_runtime.mjs +8 -0
  2. package/dist/adapters/drizzle-adapter/index.mjs +4 -1
  3. package/dist/adapters/drizzle-adapter/index.mjs.map +1 -1
  4. package/dist/adapters/mongodb-adapter/index.mjs +12 -11
  5. package/dist/adapters/mongodb-adapter/index.mjs.map +1 -1
  6. package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/code-points-data.mjs +14 -0
  7. package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/code-points-data.mjs.map +1 -0
  8. package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/index.mjs +54 -0
  9. package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/index.mjs.map +1 -0
  10. package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/memory-code-points.mjs +36 -0
  11. package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/memory-code-points.mjs.map +1 -0
  12. package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/node.mjs +27 -0
  13. package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/node.mjs.map +1 -0
  14. package/dist/node_modules/.pnpm/bson@6.10.4/node_modules/bson/lib/bson.mjs +3728 -0
  15. package/dist/node_modules/.pnpm/bson@6.10.4/node_modules/bson/lib/bson.mjs.map +1 -0
  16. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/column-builder.mjs +108 -0
  17. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/column-builder.mjs.map +1 -0
  18. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/column.mjs +55 -0
  19. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/column.mjs.map +1 -0
  20. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/entity.mjs +18 -0
  21. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/entity.mjs.map +1 -0
  22. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/pg-core/columns/common.mjs +183 -0
  23. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/pg-core/columns/common.mjs.map +1 -0
  24. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/pg-core/columns/enum.mjs +35 -0
  25. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/pg-core/columns/enum.mjs.map +1 -0
  26. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/pg-core/foreign-keys.mjs +68 -0
  27. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/pg-core/foreign-keys.mjs.map +1 -0
  28. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/pg-core/unique-constraint.mjs +56 -0
  29. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/pg-core/unique-constraint.mjs.map +1 -0
  30. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/pg-core/utils/array.mjs +65 -0
  31. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/pg-core/utils/array.mjs.map +1 -0
  32. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/sql/expressions/conditions.mjs +69 -0
  33. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/sql/expressions/conditions.mjs.map +1 -0
  34. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/sql/expressions/select.mjs +13 -0
  35. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/sql/expressions/select.mjs.map +1 -0
  36. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/sql/functions/aggregate.mjs +10 -0
  37. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/sql/functions/aggregate.mjs.map +1 -0
  38. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/sql/sql.mjs +366 -0
  39. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/sql/sql.mjs.map +1 -0
  40. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/subquery.mjs +22 -0
  41. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/subquery.mjs.map +1 -0
  42. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/table.mjs +62 -0
  43. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/table.mjs.map +1 -0
  44. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/table.utils.mjs +6 -0
  45. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/table.utils.mjs.map +1 -0
  46. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/tracing-utils.mjs +8 -0
  47. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/tracing-utils.mjs.map +1 -0
  48. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/tracing.mjs +8 -0
  49. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/tracing.mjs.map +1 -0
  50. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/view-common.mjs +6 -0
  51. package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/view-common.mjs.map +1 -0
  52. package/dist/node_modules/.pnpm/memory-pager@1.5.0/node_modules/memory-pager/index.mjs +137 -0
  53. package/dist/node_modules/.pnpm/memory-pager@1.5.0/node_modules/memory-pager/index.mjs.map +1 -0
  54. package/dist/node_modules/.pnpm/mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/index.mjs +211 -0
  55. package/dist/node_modules/.pnpm/mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/index.mjs.map +1 -0
  56. package/dist/node_modules/.pnpm/mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/redact.mjs +95 -0
  57. package/dist/node_modules/.pnpm/mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/redact.mjs.map +1 -0
  58. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/admin.mjs +158 -0
  59. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/admin.mjs.map +1 -0
  60. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bson.mjs +195 -0
  61. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bson.mjs.map +1 -0
  62. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/common.mjs +710 -0
  63. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/common.mjs.map +1 -0
  64. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/ordered.mjs +53 -0
  65. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/ordered.mjs.map +1 -0
  66. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/unordered.mjs +63 -0
  67. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/unordered.mjs.map +1 -0
  68. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/change_stream.mjs +368 -0
  69. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/change_stream.mjs.map +1 -0
  70. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/auto_encrypter.mjs +234 -0
  71. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/auto_encrypter.mjs.map +1 -0
  72. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/client_encryption.mjs +545 -0
  73. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/client_encryption.mjs.map +1 -0
  74. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/crypto_callbacks.mjs +83 -0
  75. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/crypto_callbacks.mjs.map +1 -0
  76. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/errors.mjs +146 -0
  77. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/errors.mjs.map +1 -0
  78. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/mongocryptd_manager.mjs +58 -0
  79. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/mongocryptd_manager.mjs.map +1 -0
  80. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/aws.mjs +30 -0
  81. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/aws.mjs.map +1 -0
  82. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/azure.mjs +135 -0
  83. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/azure.mjs.map +1 -0
  84. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/gcp.mjs +25 -0
  85. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/gcp.mjs.map +1 -0
  86. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/index.mjs +47 -0
  87. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/index.mjs.map +1 -0
  88. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/state_machine.mjs +362 -0
  89. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/state_machine.mjs.map +1 -0
  90. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/auth_provider.mjs +58 -0
  91. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/auth_provider.mjs.map +1 -0
  92. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/aws_temporary_credentials.mjs +123 -0
  93. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/aws_temporary_credentials.mjs.map +1 -0
  94. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/gssapi.mjs +128 -0
  95. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/gssapi.mjs.map +1 -0
  96. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongo_credentials.mjs +133 -0
  97. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongo_credentials.mjs.map +1 -0
  98. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_aws.mjs +126 -0
  99. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_aws.mjs.map +1 -0
  100. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/automated_callback_workflow.mjs +79 -0
  101. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/automated_callback_workflow.mjs.map +1 -0
  102. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_machine_workflow.mjs +65 -0
  103. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_machine_workflow.mjs.map +1 -0
  104. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_workflow.mjs +127 -0
  105. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_workflow.mjs.map +1 -0
  106. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/command_builders.mjs +47 -0
  107. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/command_builders.mjs.map +1 -0
  108. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/gcp_machine_workflow.mjs +44 -0
  109. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/gcp_machine_workflow.mjs.map +1 -0
  110. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/human_callback_workflow.mjs +101 -0
  111. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/human_callback_workflow.mjs.map +1 -0
  112. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/k8s_machine_workflow.mjs +33 -0
  113. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/k8s_machine_workflow.mjs.map +1 -0
  114. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_cache.mjs +53 -0
  115. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_cache.mjs.map +1 -0
  116. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_machine_workflow.mjs +29 -0
  117. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_machine_workflow.mjs.map +1 -0
  118. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc.mjs +83 -0
  119. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc.mjs.map +1 -0
  120. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/plain.mjs +36 -0
  121. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/plain.mjs.map +1 -0
  122. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/providers.mjs +32 -0
  123. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/providers.mjs.map +1 -0
  124. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/scram.mjs +206 -0
  125. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/scram.mjs.map +1 -0
  126. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/x509.mjs +45 -0
  127. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/x509.mjs.map +1 -0
  128. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/command_monitoring_events.mjs +213 -0
  129. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/command_monitoring_events.mjs.map +1 -0
  130. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/commands.mjs +411 -0
  131. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/commands.mjs.map +1 -0
  132. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connect.mjs +288 -0
  133. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connect.mjs.map +1 -0
  134. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection.mjs +423 -0
  135. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection.mjs.map +1 -0
  136. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool.mjs +483 -0
  137. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool.mjs.map +1 -0
  138. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool_events.mjs +207 -0
  139. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool_events.mjs.map +1 -0
  140. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/errors.mjs +116 -0
  141. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/errors.mjs.map +1 -0
  142. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/handshake/client_metadata.mjs +183 -0
  143. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/handshake/client_metadata.mjs.map +1 -0
  144. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/metrics.mjs +55 -0
  145. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/metrics.mjs.map +1 -0
  146. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/stream_description.mjs +60 -0
  147. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/stream_description.mjs.map +1 -0
  148. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/compression.mjs +139 -0
  149. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/compression.mjs.map +1 -0
  150. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/constants.mjs +28 -0
  151. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/constants.mjs.map +1 -0
  152. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_data.mjs +117 -0
  153. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_data.mjs.map +1 -0
  154. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_demand/document.mjs +182 -0
  155. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_demand/document.mjs.map +1 -0
  156. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/responses.mjs +304 -0
  157. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/responses.mjs.map +1 -0
  158. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/shared.mjs +34 -0
  159. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/shared.mjs.map +1 -0
  160. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/collection.mjs +739 -0
  161. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/collection.mjs.map +1 -0
  162. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/connection_string.mjs +805 -0
  163. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/connection_string.mjs.map +1 -0
  164. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/constants.mjs +174 -0
  165. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/constants.mjs.map +1 -0
  166. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/abstract_cursor.mjs +726 -0
  167. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/abstract_cursor.mjs.map +1 -0
  168. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/aggregation_cursor.mjs +172 -0
  169. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/aggregation_cursor.mjs.map +1 -0
  170. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/change_stream_cursor.mjs +103 -0
  171. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/change_stream_cursor.mjs.map +1 -0
  172. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/client_bulk_write_cursor.mjs +66 -0
  173. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/client_bulk_write_cursor.mjs.map +1 -0
  174. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/explainable_cursor.mjs +41 -0
  175. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/explainable_cursor.mjs.map +1 -0
  176. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/find_cursor.mjs +365 -0
  177. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/find_cursor.mjs.map +1 -0
  178. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_collections_cursor.mjs +50 -0
  179. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_collections_cursor.mjs.map +1 -0
  180. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_indexes_cursor.mjs +48 -0
  181. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_indexes_cursor.mjs.map +1 -0
  182. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_search_indexes_cursor.mjs +23 -0
  183. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_search_indexes_cursor.mjs.map +1 -0
  184. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/run_command_cursor.mjs +106 -0
  185. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/run_command_cursor.mjs.map +1 -0
  186. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/db.mjs +428 -0
  187. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/db.mjs.map +1 -0
  188. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/deps.mjs +124 -0
  189. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/deps.mjs.map +1 -0
  190. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/encrypter.mjs +95 -0
  191. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/encrypter.mjs.map +1 -0
  192. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/error.mjs +1305 -0
  193. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/error.mjs.map +1 -0
  194. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/explain.mjs +59 -0
  195. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/explain.mjs.map +1 -0
  196. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/download.mjs +250 -0
  197. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/download.mjs.map +1 -0
  198. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/index.mjs +170 -0
  199. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/index.mjs.map +1 -0
  200. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/upload.mjs +315 -0
  201. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/upload.mjs.map +1 -0
  202. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/index.mjs +925 -0
  203. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/index.mjs.map +1 -0
  204. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client.mjs +520 -0
  205. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client.mjs.map +1 -0
  206. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client_auth_providers.mjs +90 -0
  207. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client_auth_providers.mjs.map +1 -0
  208. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_logger.mjs +582 -0
  209. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_logger.mjs.map +1 -0
  210. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_types.mjs +64 -0
  211. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_types.mjs.map +1 -0
  212. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/aggregate.mjs +86 -0
  213. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/aggregate.mjs.map +1 -0
  214. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/client_bulk_write.mjs +60 -0
  215. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/client_bulk_write.mjs.map +1 -0
  216. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/command_builder.mjs +264 -0
  217. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/command_builder.mjs.map +1 -0
  218. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/executor.mjs +109 -0
  219. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/executor.mjs.map +1 -0
  220. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/results_merger.mjs +172 -0
  221. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/results_merger.mjs.map +1 -0
  222. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/command.mjs +68 -0
  223. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/command.mjs.map +1 -0
  224. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/count.mjs +53 -0
  225. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/count.mjs.map +1 -0
  226. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/create_collection.mjs +123 -0
  227. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/create_collection.mjs.map +1 -0
  228. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/delete.mjs +119 -0
  229. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/delete.mjs.map +1 -0
  230. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/distinct.mjs +65 -0
  231. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/distinct.mjs.map +1 -0
  232. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/drop.mjs +97 -0
  233. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/drop.mjs.map +1 -0
  234. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/estimated_document_count.mjs +47 -0
  235. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/estimated_document_count.mjs.map +1 -0
  236. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/execute_operation.mjs +188 -0
  237. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/execute_operation.mjs.map +1 -0
  238. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find.mjs +103 -0
  239. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find.mjs.map +1 -0
  240. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find_and_modify.mjs +136 -0
  241. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find_and_modify.mjs.map +1 -0
  242. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/get_more.mjs +61 -0
  243. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/get_more.mjs.map +1 -0
  244. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/indexes.mjs +179 -0
  245. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/indexes.mjs.map +1 -0
  246. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/insert.mjs +77 -0
  247. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/insert.mjs.map +1 -0
  248. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/kill_cursors.mjs +48 -0
  249. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/kill_cursors.mjs.map +1 -0
  250. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_collections.mjs +60 -0
  251. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_collections.mjs.map +1 -0
  252. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_databases.mjs +43 -0
  253. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_databases.mjs.map +1 -0
  254. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/operation.mjs +105 -0
  255. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/operation.mjs.map +1 -0
  256. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/profiling_level.mjs +50 -0
  257. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/profiling_level.mjs.map +1 -0
  258. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/remove_user.mjs +39 -0
  259. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/remove_user.mjs.map +1 -0
  260. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/rename.mjs +49 -0
  261. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/rename.mjs.map +1 -0
  262. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/run_command.mjs +58 -0
  263. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/run_command.mjs.map +1 -0
  264. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/create.mjs +46 -0
  265. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/create.mjs.map +1 -0
  266. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/drop.mjs +48 -0
  267. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/drop.mjs.map +1 -0
  268. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/update.mjs +46 -0
  269. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/update.mjs.map +1 -0
  270. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/set_profiling_level.mjs +67 -0
  271. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/set_profiling_level.mjs.map +1 -0
  272. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/stats.mjs +37 -0
  273. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/stats.mjs.map +1 -0
  274. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/update.mjs +171 -0
  275. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/update.mjs.map +1 -0
  276. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/validate_collection.mjs +45 -0
  277. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/validate_collection.mjs.map +1 -0
  278. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_concern.mjs +71 -0
  279. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_concern.mjs.map +1 -0
  280. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_preference.mjs +165 -0
  281. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_preference.mjs.map +1 -0
  282. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/resource_management.mjs +62 -0
  283. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/resource_management.mjs.map +1 -0
  284. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/common.mjs +51 -0
  285. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/common.mjs.map +1 -0
  286. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/events.mjs +156 -0
  287. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/events.mjs.map +1 -0
  288. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/monitor.mjs +477 -0
  289. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/monitor.mjs.map +1 -0
  290. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server.mjs +315 -0
  291. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server.mjs.map +1 -0
  292. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_description.mjs +157 -0
  293. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_description.mjs.map +1 -0
  294. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection.mjs +184 -0
  295. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection.mjs.map +1 -0
  296. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection_events.mjs +96 -0
  297. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection_events.mjs.map +1 -0
  298. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/srv_polling.mjs +107 -0
  299. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/srv_polling.mjs.map +1 -0
  300. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology.mjs +540 -0
  301. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology.mjs.map +1 -0
  302. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology_description.mjs +298 -0
  303. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology_description.mjs.map +1 -0
  304. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sessions.mjs +623 -0
  305. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sessions.mjs.map +1 -0
  306. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sort.mjs +91 -0
  307. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sort.mjs.map +1 -0
  308. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/timeout.mjs +254 -0
  309. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/timeout.mjs.map +1 -0
  310. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/transactions.mjs +138 -0
  311. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/transactions.mjs.map +1 -0
  312. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/utils.mjs +993 -0
  313. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/utils.mjs.map +1 -0
  314. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/write_concern.mjs +81 -0
  315. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/write_concern.mjs.map +1 -0
  316. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/package.mjs +171 -0
  317. package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/package.mjs.map +1 -0
  318. package/dist/node_modules/.pnpm/punycode@2.3.1/node_modules/punycode/punycode.mjs +295 -0
  319. package/dist/node_modules/.pnpm/punycode@2.3.1/node_modules/punycode/punycode.mjs.map +1 -0
  320. package/dist/node_modules/.pnpm/sparse-bitfield@3.0.3/node_modules/sparse-bitfield/index.mjs +81 -0
  321. package/dist/node_modules/.pnpm/sparse-bitfield@3.0.3/node_modules/sparse-bitfield/index.mjs.map +1 -0
  322. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/index.mjs +206 -0
  323. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/index.mjs.map +1 -0
  324. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/mappingTable.mjs +33590 -0
  325. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/mappingTable.mjs.map +1 -0
  326. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/regexes.mjs +37 -0
  327. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/regexes.mjs.map +1 -0
  328. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/statusMapping.mjs +18 -0
  329. package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/statusMapping.mjs.map +1 -0
  330. package/dist/node_modules/.pnpm/webidl-conversions@7.0.0/node_modules/webidl-conversions/lib/index.mjs +252 -0
  331. package/dist/node_modules/.pnpm/webidl-conversions@7.0.0/node_modules/webidl-conversions/lib/index.mjs.map +1 -0
  332. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/index.mjs +41 -0
  333. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/index.mjs.map +1 -0
  334. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/Function.mjs +41 -0
  335. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/Function.mjs.map +1 -0
  336. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL-impl.mjs +173 -0
  337. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL-impl.mjs.map +1 -0
  338. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL.mjs +334 -0
  339. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL.mjs.map +1 -0
  340. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams-impl.mjs +90 -0
  341. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams-impl.mjs.map +1 -0
  342. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams.mjs +356 -0
  343. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams.mjs.map +1 -0
  344. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/encoding.mjs +23 -0
  345. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/encoding.mjs.map +1 -0
  346. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/infra.mjs +29 -0
  347. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/infra.mjs.map +1 -0
  348. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/percent-encoding.mjs +140 -0
  349. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/percent-encoding.mjs.map +1 -0
  350. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/url-state-machine.mjs +831 -0
  351. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/url-state-machine.mjs.map +1 -0
  352. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/urlencoded.mjs +77 -0
  353. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/urlencoded.mjs.map +1 -0
  354. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/utils.mjs +147 -0
  355. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/utils.mjs.map +1 -0
  356. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/webidl2js-wrapper.mjs +17 -0
  357. package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/webidl2js-wrapper.mjs.map +1 -0
  358. package/package.json +1 -39
@@ -0,0 +1,304 @@
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_document } from "./on_demand/document.mjs";
5
+ import { require_utils } from "../../utils.mjs";
6
+
7
+ //#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/responses.js
8
+ var require_responses = /* @__PURE__ */ __commonJSMin(((exports) => {
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.ClientBulkWriteCursorResponse = exports.ExplainedCursorResponse = exports.CursorResponse = exports.MongoDBResponse = void 0;
11
+ exports.isErrorResponse = isErrorResponse;
12
+ const bson_1 = require_bson();
13
+ const error_1 = require_error();
14
+ const utils_1 = require_utils();
15
+ const document_1 = require_document();
16
+ const BSONElementOffset = {
17
+ type: 0,
18
+ nameOffset: 1,
19
+ nameLength: 2,
20
+ offset: 3,
21
+ length: 4
22
+ };
23
+ /**
24
+ * Accepts a BSON payload and checks for na "ok: 0" element.
25
+ * This utility is intended to prevent calling response class constructors
26
+ * that expect the result to be a success and demand certain properties to exist.
27
+ *
28
+ * For example, a cursor response always expects a cursor embedded document.
29
+ * In order to write the class such that the properties reflect that assertion (non-null)
30
+ * we cannot invoke the subclass constructor if the BSON represents an error.
31
+ *
32
+ * @param bytes - BSON document returned from the server
33
+ */
34
+ function isErrorResponse(bson, elements) {
35
+ for (let eIdx = 0; eIdx < elements.length; eIdx++) {
36
+ const element = elements[eIdx];
37
+ if (element[BSONElementOffset.nameLength] === 2) {
38
+ const nameOffset = element[BSONElementOffset.nameOffset];
39
+ if (bson[nameOffset] === 111 && bson[nameOffset + 1] === 107) {
40
+ const valueOffset = element[BSONElementOffset.offset];
41
+ const valueLength = element[BSONElementOffset.length];
42
+ for (let i = valueOffset; i < valueOffset + valueLength; i++) if (bson[i] !== 0) return false;
43
+ return true;
44
+ }
45
+ }
46
+ }
47
+ return true;
48
+ }
49
+ /** @internal */
50
+ var MongoDBResponse = class MongoDBResponse extends document_1.OnDemandDocument {
51
+ get(name, as, required) {
52
+ try {
53
+ return super.get(name, as, required);
54
+ } catch (cause) {
55
+ throw new error_1.MongoUnexpectedServerResponseError(cause.message, { cause });
56
+ }
57
+ }
58
+ static is(value) {
59
+ return value instanceof MongoDBResponse;
60
+ }
61
+ static make(bson) {
62
+ const elements = (0, bson_1.parseToElementsToArray)(bson, 0);
63
+ return isErrorResponse(bson, elements) ? new MongoDBResponse(bson, 0, false, elements) : new this(bson, 0, false, elements);
64
+ }
65
+ /**
66
+ * Returns true iff:
67
+ * - ok is 0 and the top-level code === 50
68
+ * - ok is 1 and the writeErrors array contains a code === 50
69
+ * - ok is 1 and the writeConcern object contains a code === 50
70
+ */
71
+ get isMaxTimeExpiredError() {
72
+ if (this.ok === 0 && this.code === error_1.MONGODB_ERROR_CODES.MaxTimeMSExpired) return true;
73
+ if (this.ok === 0) return false;
74
+ if (this.get("writeConcernError", bson_1.BSONType.object)?.getNumber("code") === error_1.MONGODB_ERROR_CODES.MaxTimeMSExpired) return true;
75
+ const writeErrors = this.get("writeErrors", bson_1.BSONType.array);
76
+ if (writeErrors?.size()) {
77
+ for (let i = 0; i < writeErrors.size(); i++) if (writeErrors.get(i, bson_1.BSONType.object)?.getNumber("code") === error_1.MONGODB_ERROR_CODES.MaxTimeMSExpired) return true;
78
+ }
79
+ return false;
80
+ }
81
+ /**
82
+ * Drivers can safely assume that the `recoveryToken` field is always a BSON document but drivers MUST NOT modify the
83
+ * contents of the document.
84
+ */
85
+ get recoveryToken() {
86
+ return this.get("recoveryToken", bson_1.BSONType.object)?.toObject({
87
+ promoteValues: false,
88
+ promoteLongs: false,
89
+ promoteBuffers: false,
90
+ validation: { utf8: true }
91
+ }) ?? null;
92
+ }
93
+ /**
94
+ * The server creates a cursor in response to a snapshot find/aggregate command and reports atClusterTime within the cursor field in the response.
95
+ * For the distinct command the server adds a top-level atClusterTime field to the response.
96
+ * The atClusterTime field represents the timestamp of the read and is guaranteed to be majority committed.
97
+ */
98
+ get atClusterTime() {
99
+ return this.get("cursor", bson_1.BSONType.object)?.get("atClusterTime", bson_1.BSONType.timestamp) ?? this.get("atClusterTime", bson_1.BSONType.timestamp);
100
+ }
101
+ get operationTime() {
102
+ return this.get("operationTime", bson_1.BSONType.timestamp);
103
+ }
104
+ /** Normalizes whatever BSON value is "ok" to a JS number 1 or 0. */
105
+ get ok() {
106
+ return this.getNumber("ok") ? 1 : 0;
107
+ }
108
+ get $err() {
109
+ return this.get("$err", bson_1.BSONType.string);
110
+ }
111
+ get errmsg() {
112
+ return this.get("errmsg", bson_1.BSONType.string);
113
+ }
114
+ get code() {
115
+ return this.getNumber("code");
116
+ }
117
+ get $clusterTime() {
118
+ if (!("clusterTime" in this)) {
119
+ const clusterTimeDoc = this.get("$clusterTime", bson_1.BSONType.object);
120
+ if (clusterTimeDoc == null) {
121
+ this.clusterTime = null;
122
+ return null;
123
+ }
124
+ this.clusterTime = {
125
+ clusterTime: clusterTimeDoc.get("clusterTime", bson_1.BSONType.timestamp, true),
126
+ signature: clusterTimeDoc.get("signature", bson_1.BSONType.object)?.toObject()
127
+ };
128
+ }
129
+ return this.clusterTime ?? null;
130
+ }
131
+ toObject(options) {
132
+ const exactBSONOptions = {
133
+ ...(0, bson_1.pluckBSONSerializeOptions)(options ?? {}),
134
+ validation: (0, bson_1.parseUtf8ValidationOption)(options)
135
+ };
136
+ return super.toObject(exactBSONOptions);
137
+ }
138
+ };
139
+ exports.MongoDBResponse = MongoDBResponse;
140
+ MongoDBResponse.empty = new MongoDBResponse(new Uint8Array([
141
+ 13,
142
+ 0,
143
+ 0,
144
+ 0,
145
+ 16,
146
+ 111,
147
+ 107,
148
+ 0,
149
+ 1,
150
+ 0,
151
+ 0,
152
+ 0,
153
+ 0
154
+ ]));
155
+ /** @internal */
156
+ var CursorResponse = class CursorResponse extends MongoDBResponse {
157
+ constructor() {
158
+ super(...arguments);
159
+ this._batch = null;
160
+ this.iterated = 0;
161
+ this._encryptedBatch = null;
162
+ }
163
+ /**
164
+ * This supports a feature of the FindCursor.
165
+ * It is an optimization to avoid an extra getMore when the limit has been reached
166
+ */
167
+ static get emptyGetMore() {
168
+ return new CursorResponse((0, bson_1.serialize)({
169
+ ok: 1,
170
+ cursor: {
171
+ id: 0n,
172
+ nextBatch: []
173
+ }
174
+ }));
175
+ }
176
+ static is(value) {
177
+ return value instanceof CursorResponse || value === CursorResponse.emptyGetMore;
178
+ }
179
+ get cursor() {
180
+ return this.get("cursor", bson_1.BSONType.object, true);
181
+ }
182
+ get id() {
183
+ try {
184
+ return bson_1.Long.fromBigInt(this.cursor.get("id", bson_1.BSONType.long, true));
185
+ } catch (cause) {
186
+ throw new error_1.MongoUnexpectedServerResponseError(cause.message, { cause });
187
+ }
188
+ }
189
+ get ns() {
190
+ const namespace = this.cursor.get("ns", bson_1.BSONType.string);
191
+ if (namespace != null) return (0, utils_1.ns)(namespace);
192
+ return null;
193
+ }
194
+ get length() {
195
+ return Math.max(this.batchSize - this.iterated, 0);
196
+ }
197
+ get encryptedBatch() {
198
+ if (this.encryptedResponse == null) return null;
199
+ if (this._encryptedBatch != null) return this._encryptedBatch;
200
+ const cursor = this.encryptedResponse?.get("cursor", bson_1.BSONType.object);
201
+ if (cursor?.has("firstBatch")) this._encryptedBatch = cursor.get("firstBatch", bson_1.BSONType.array, true);
202
+ else if (cursor?.has("nextBatch")) this._encryptedBatch = cursor.get("nextBatch", bson_1.BSONType.array, true);
203
+ else throw new error_1.MongoUnexpectedServerResponseError("Cursor document did not contain a batch");
204
+ return this._encryptedBatch;
205
+ }
206
+ get batch() {
207
+ if (this._batch != null) return this._batch;
208
+ const cursor = this.cursor;
209
+ if (cursor.has("firstBatch")) this._batch = cursor.get("firstBatch", bson_1.BSONType.array, true);
210
+ else if (cursor.has("nextBatch")) this._batch = cursor.get("nextBatch", bson_1.BSONType.array, true);
211
+ else throw new error_1.MongoUnexpectedServerResponseError("Cursor document did not contain a batch");
212
+ return this._batch;
213
+ }
214
+ get batchSize() {
215
+ return this.batch?.size();
216
+ }
217
+ get postBatchResumeToken() {
218
+ return this.cursor.get("postBatchResumeToken", bson_1.BSONType.object)?.toObject({
219
+ promoteValues: false,
220
+ promoteLongs: false,
221
+ promoteBuffers: false,
222
+ validation: { utf8: true }
223
+ }) ?? null;
224
+ }
225
+ shift(options) {
226
+ if (this.iterated >= this.batchSize) return null;
227
+ const result = this.batch.get(this.iterated, bson_1.BSONType.object, true) ?? null;
228
+ const encryptedResult = this.encryptedBatch?.get(this.iterated, bson_1.BSONType.object, true) ?? null;
229
+ this.iterated += 1;
230
+ if (options?.raw) return result.toBytes();
231
+ else {
232
+ const object = result.toObject(options);
233
+ if (encryptedResult) (0, utils_1.decorateDecryptionResult)(object, encryptedResult.toObject(options), true);
234
+ return object;
235
+ }
236
+ }
237
+ clear() {
238
+ this.iterated = this.batchSize;
239
+ }
240
+ };
241
+ exports.CursorResponse = CursorResponse;
242
+ /**
243
+ * Explain responses have nothing to do with cursor responses
244
+ * This class serves to temporarily avoid refactoring how cursors handle
245
+ * explain responses which is to detect that the response is not cursor-like and return the explain
246
+ * result as the "first and only" document in the "batch" and end the "cursor"
247
+ */
248
+ var ExplainedCursorResponse = class extends CursorResponse {
249
+ constructor() {
250
+ super(...arguments);
251
+ this.isExplain = true;
252
+ this._length = 1;
253
+ }
254
+ get id() {
255
+ return bson_1.Long.fromBigInt(0n);
256
+ }
257
+ get batchSize() {
258
+ return 0;
259
+ }
260
+ get ns() {
261
+ return null;
262
+ }
263
+ get length() {
264
+ return this._length;
265
+ }
266
+ shift(options) {
267
+ if (this._length === 0) return null;
268
+ this._length -= 1;
269
+ return this.toObject(options);
270
+ }
271
+ };
272
+ exports.ExplainedCursorResponse = ExplainedCursorResponse;
273
+ /**
274
+ * Client bulk writes have some extra metadata at the top level that needs to be
275
+ * included in the result returned to the user.
276
+ */
277
+ var ClientBulkWriteCursorResponse = class extends CursorResponse {
278
+ get insertedCount() {
279
+ return this.get("nInserted", bson_1.BSONType.int, true);
280
+ }
281
+ get upsertedCount() {
282
+ return this.get("nUpserted", bson_1.BSONType.int, true);
283
+ }
284
+ get matchedCount() {
285
+ return this.get("nMatched", bson_1.BSONType.int, true);
286
+ }
287
+ get modifiedCount() {
288
+ return this.get("nModified", bson_1.BSONType.int, true);
289
+ }
290
+ get deletedCount() {
291
+ return this.get("nDeleted", bson_1.BSONType.int, true);
292
+ }
293
+ get writeConcernError() {
294
+ return this.get("writeConcernError", bson_1.BSONType.object, false);
295
+ }
296
+ };
297
+ exports.ClientBulkWriteCursorResponse = ClientBulkWriteCursorResponse;
298
+ }));
299
+
300
+ //#endregion
301
+ export default require_responses();
302
+
303
+ export { require_responses };
304
+ //# sourceMappingURL=responses.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"responses.mjs","names":[],"sources":["../../../../../../../../../../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/responses.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ClientBulkWriteCursorResponse = exports.ExplainedCursorResponse = exports.CursorResponse = exports.MongoDBResponse = void 0;\nexports.isErrorResponse = isErrorResponse;\nconst bson_1 = require(\"../../bson\");\nconst error_1 = require(\"../../error\");\nconst utils_1 = require(\"../../utils\");\nconst document_1 = require(\"./on_demand/document\");\nconst BSONElementOffset = {\n type: 0,\n nameOffset: 1,\n nameLength: 2,\n offset: 3,\n length: 4\n};\n/**\n * Accepts a BSON payload and checks for na \"ok: 0\" element.\n * This utility is intended to prevent calling response class constructors\n * that expect the result to be a success and demand certain properties to exist.\n *\n * For example, a cursor response always expects a cursor embedded document.\n * In order to write the class such that the properties reflect that assertion (non-null)\n * we cannot invoke the subclass constructor if the BSON represents an error.\n *\n * @param bytes - BSON document returned from the server\n */\nfunction isErrorResponse(bson, elements) {\n for (let eIdx = 0; eIdx < elements.length; eIdx++) {\n const element = elements[eIdx];\n if (element[BSONElementOffset.nameLength] === 2) {\n const nameOffset = element[BSONElementOffset.nameOffset];\n // 111 == \"o\", 107 == \"k\"\n if (bson[nameOffset] === 111 && bson[nameOffset + 1] === 107) {\n const valueOffset = element[BSONElementOffset.offset];\n const valueLength = element[BSONElementOffset.length];\n // If any byte in the length of the ok number (works for any type) is non zero,\n // then it is considered \"ok: 1\"\n for (let i = valueOffset; i < valueOffset + valueLength; i++) {\n if (bson[i] !== 0x00)\n return false;\n }\n return true;\n }\n }\n }\n return true;\n}\n/** @internal */\nclass MongoDBResponse extends document_1.OnDemandDocument {\n get(name, as, required) {\n try {\n return super.get(name, as, required);\n }\n catch (cause) {\n throw new error_1.MongoUnexpectedServerResponseError(cause.message, { cause });\n }\n }\n static is(value) {\n return value instanceof MongoDBResponse;\n }\n static make(bson) {\n const elements = (0, bson_1.parseToElementsToArray)(bson, 0);\n const isError = isErrorResponse(bson, elements);\n return isError\n ? new MongoDBResponse(bson, 0, false, elements)\n : new this(bson, 0, false, elements);\n }\n /**\n * Returns true iff:\n * - ok is 0 and the top-level code === 50\n * - ok is 1 and the writeErrors array contains a code === 50\n * - ok is 1 and the writeConcern object contains a code === 50\n */\n get isMaxTimeExpiredError() {\n // {ok: 0, code: 50 ... }\n const isTopLevel = this.ok === 0 && this.code === error_1.MONGODB_ERROR_CODES.MaxTimeMSExpired;\n if (isTopLevel)\n return true;\n if (this.ok === 0)\n return false;\n // {ok: 1, writeConcernError: {code: 50 ... }}\n const isWriteConcern = this.get('writeConcernError', bson_1.BSONType.object)?.getNumber('code') ===\n error_1.MONGODB_ERROR_CODES.MaxTimeMSExpired;\n if (isWriteConcern)\n return true;\n const writeErrors = this.get('writeErrors', bson_1.BSONType.array);\n if (writeErrors?.size()) {\n for (let i = 0; i < writeErrors.size(); i++) {\n const isWriteError = writeErrors.get(i, bson_1.BSONType.object)?.getNumber('code') ===\n error_1.MONGODB_ERROR_CODES.MaxTimeMSExpired;\n // {ok: 1, writeErrors: [{code: 50 ... }]}\n if (isWriteError)\n return true;\n }\n }\n return false;\n }\n /**\n * Drivers can safely assume that the `recoveryToken` field is always a BSON document but drivers MUST NOT modify the\n * contents of the document.\n */\n get recoveryToken() {\n return (this.get('recoveryToken', bson_1.BSONType.object)?.toObject({\n promoteValues: false,\n promoteLongs: false,\n promoteBuffers: false,\n validation: { utf8: true }\n }) ?? null);\n }\n /**\n * The server creates a cursor in response to a snapshot find/aggregate command and reports atClusterTime within the cursor field in the response.\n * For the distinct command the server adds a top-level atClusterTime field to the response.\n * The atClusterTime field represents the timestamp of the read and is guaranteed to be majority committed.\n */\n get atClusterTime() {\n return (this.get('cursor', bson_1.BSONType.object)?.get('atClusterTime', bson_1.BSONType.timestamp) ??\n this.get('atClusterTime', bson_1.BSONType.timestamp));\n }\n get operationTime() {\n return this.get('operationTime', bson_1.BSONType.timestamp);\n }\n /** Normalizes whatever BSON value is \"ok\" to a JS number 1 or 0. */\n get ok() {\n return this.getNumber('ok') ? 1 : 0;\n }\n get $err() {\n return this.get('$err', bson_1.BSONType.string);\n }\n get errmsg() {\n return this.get('errmsg', bson_1.BSONType.string);\n }\n get code() {\n return this.getNumber('code');\n }\n get $clusterTime() {\n if (!('clusterTime' in this)) {\n const clusterTimeDoc = this.get('$clusterTime', bson_1.BSONType.object);\n if (clusterTimeDoc == null) {\n this.clusterTime = null;\n return null;\n }\n const clusterTime = clusterTimeDoc.get('clusterTime', bson_1.BSONType.timestamp, true);\n const signature = clusterTimeDoc.get('signature', bson_1.BSONType.object)?.toObject();\n // @ts-expect-error: `signature` is incorrectly typed. It is public API.\n this.clusterTime = { clusterTime, signature };\n }\n return this.clusterTime ?? null;\n }\n toObject(options) {\n const exactBSONOptions = {\n ...(0, bson_1.pluckBSONSerializeOptions)(options ?? {}),\n validation: (0, bson_1.parseUtf8ValidationOption)(options)\n };\n return super.toObject(exactBSONOptions);\n }\n}\nexports.MongoDBResponse = MongoDBResponse;\n// {ok:1}\nMongoDBResponse.empty = new MongoDBResponse(new Uint8Array([13, 0, 0, 0, 16, 111, 107, 0, 1, 0, 0, 0, 0]));\n/** @internal */\nclass CursorResponse extends MongoDBResponse {\n constructor() {\n super(...arguments);\n this._batch = null;\n this.iterated = 0;\n this._encryptedBatch = null;\n }\n /**\n * This supports a feature of the FindCursor.\n * It is an optimization to avoid an extra getMore when the limit has been reached\n */\n static get emptyGetMore() {\n return new CursorResponse((0, bson_1.serialize)({ ok: 1, cursor: { id: 0n, nextBatch: [] } }));\n }\n static is(value) {\n return value instanceof CursorResponse || value === CursorResponse.emptyGetMore;\n }\n get cursor() {\n return this.get('cursor', bson_1.BSONType.object, true);\n }\n get id() {\n try {\n return bson_1.Long.fromBigInt(this.cursor.get('id', bson_1.BSONType.long, true));\n }\n catch (cause) {\n throw new error_1.MongoUnexpectedServerResponseError(cause.message, { cause });\n }\n }\n get ns() {\n const namespace = this.cursor.get('ns', bson_1.BSONType.string);\n if (namespace != null)\n return (0, utils_1.ns)(namespace);\n return null;\n }\n get length() {\n return Math.max(this.batchSize - this.iterated, 0);\n }\n get encryptedBatch() {\n if (this.encryptedResponse == null)\n return null;\n if (this._encryptedBatch != null)\n return this._encryptedBatch;\n const cursor = this.encryptedResponse?.get('cursor', bson_1.BSONType.object);\n if (cursor?.has('firstBatch'))\n this._encryptedBatch = cursor.get('firstBatch', bson_1.BSONType.array, true);\n else if (cursor?.has('nextBatch'))\n this._encryptedBatch = cursor.get('nextBatch', bson_1.BSONType.array, true);\n else\n throw new error_1.MongoUnexpectedServerResponseError('Cursor document did not contain a batch');\n return this._encryptedBatch;\n }\n get batch() {\n if (this._batch != null)\n return this._batch;\n const cursor = this.cursor;\n if (cursor.has('firstBatch'))\n this._batch = cursor.get('firstBatch', bson_1.BSONType.array, true);\n else if (cursor.has('nextBatch'))\n this._batch = cursor.get('nextBatch', bson_1.BSONType.array, true);\n else\n throw new error_1.MongoUnexpectedServerResponseError('Cursor document did not contain a batch');\n return this._batch;\n }\n get batchSize() {\n return this.batch?.size();\n }\n get postBatchResumeToken() {\n return (this.cursor.get('postBatchResumeToken', bson_1.BSONType.object)?.toObject({\n promoteValues: false,\n promoteLongs: false,\n promoteBuffers: false,\n validation: { utf8: true }\n }) ?? null);\n }\n shift(options) {\n if (this.iterated >= this.batchSize) {\n return null;\n }\n const result = this.batch.get(this.iterated, bson_1.BSONType.object, true) ?? null;\n const encryptedResult = this.encryptedBatch?.get(this.iterated, bson_1.BSONType.object, true) ?? null;\n this.iterated += 1;\n if (options?.raw) {\n return result.toBytes();\n }\n else {\n const object = result.toObject(options);\n if (encryptedResult) {\n (0, utils_1.decorateDecryptionResult)(object, encryptedResult.toObject(options), true);\n }\n return object;\n }\n }\n clear() {\n this.iterated = this.batchSize;\n }\n}\nexports.CursorResponse = CursorResponse;\n/**\n * Explain responses have nothing to do with cursor responses\n * This class serves to temporarily avoid refactoring how cursors handle\n * explain responses which is to detect that the response is not cursor-like and return the explain\n * result as the \"first and only\" document in the \"batch\" and end the \"cursor\"\n */\nclass ExplainedCursorResponse extends CursorResponse {\n constructor() {\n super(...arguments);\n this.isExplain = true;\n this._length = 1;\n }\n get id() {\n return bson_1.Long.fromBigInt(0n);\n }\n get batchSize() {\n return 0;\n }\n get ns() {\n return null;\n }\n get length() {\n return this._length;\n }\n shift(options) {\n if (this._length === 0)\n return null;\n this._length -= 1;\n return this.toObject(options);\n }\n}\nexports.ExplainedCursorResponse = ExplainedCursorResponse;\n/**\n * Client bulk writes have some extra metadata at the top level that needs to be\n * included in the result returned to the user.\n */\nclass ClientBulkWriteCursorResponse extends CursorResponse {\n get insertedCount() {\n return this.get('nInserted', bson_1.BSONType.int, true);\n }\n get upsertedCount() {\n return this.get('nUpserted', bson_1.BSONType.int, true);\n }\n get matchedCount() {\n return this.get('nMatched', bson_1.BSONType.int, true);\n }\n get modifiedCount() {\n return this.get('nModified', bson_1.BSONType.int, true);\n }\n get deletedCount() {\n return this.get('nDeleted', bson_1.BSONType.int, true);\n }\n get writeConcernError() {\n return this.get('writeConcernError', bson_1.BSONType.object, false);\n }\n}\nexports.ClientBulkWriteCursorResponse = ClientBulkWriteCursorResponse;\n//# sourceMappingURL=responses.js.map"],"x_google_ignoreList":[0],"mappings":"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"}
@@ -0,0 +1,34 @@
1
+ import { __commonJSMin } from "../../../../../../../../_virtual/rolldown_runtime.mjs";
2
+ import { require_error } from "../../error.mjs";
3
+ import { require_read_preference } from "../../read_preference.mjs";
4
+ import { require_common } from "../../sdam/common.mjs";
5
+ import { require_topology_description } from "../../sdam/topology_description.mjs";
6
+
7
+ //#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/shared.js
8
+ var require_shared = /* @__PURE__ */ __commonJSMin(((exports) => {
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.getReadPreference = getReadPreference;
11
+ exports.isSharded = isSharded;
12
+ const error_1 = require_error();
13
+ const read_preference_1 = require_read_preference();
14
+ const common_1 = require_common();
15
+ const topology_description_1 = require_topology_description();
16
+ function getReadPreference(options) {
17
+ let readPreference = options?.readPreference ?? read_preference_1.ReadPreference.primary;
18
+ if (typeof readPreference === "string") readPreference = read_preference_1.ReadPreference.fromString(readPreference);
19
+ if (!(readPreference instanceof read_preference_1.ReadPreference)) throw new error_1.MongoInvalidArgumentError("Option \"readPreference\" must be a ReadPreference instance");
20
+ return readPreference;
21
+ }
22
+ function isSharded(topologyOrServer) {
23
+ if (topologyOrServer == null) return false;
24
+ if (topologyOrServer.description && topologyOrServer.description.type === common_1.ServerType.Mongos) return true;
25
+ if (topologyOrServer.description && topologyOrServer.description instanceof topology_description_1.TopologyDescription) return Array.from(topologyOrServer.description.servers.values()).some((server) => server.type === common_1.ServerType.Mongos);
26
+ return false;
27
+ }
28
+ }));
29
+
30
+ //#endregion
31
+ export default require_shared();
32
+
33
+ export { require_shared };
34
+ //# sourceMappingURL=shared.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.mjs","names":[],"sources":["../../../../../../../../../../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/shared.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getReadPreference = getReadPreference;\nexports.isSharded = isSharded;\nconst error_1 = require(\"../../error\");\nconst read_preference_1 = require(\"../../read_preference\");\nconst common_1 = require(\"../../sdam/common\");\nconst topology_description_1 = require(\"../../sdam/topology_description\");\nfunction getReadPreference(options) {\n // Default to command version of the readPreference.\n let readPreference = options?.readPreference ?? read_preference_1.ReadPreference.primary;\n if (typeof readPreference === 'string') {\n readPreference = read_preference_1.ReadPreference.fromString(readPreference);\n }\n if (!(readPreference instanceof read_preference_1.ReadPreference)) {\n throw new error_1.MongoInvalidArgumentError('Option \"readPreference\" must be a ReadPreference instance');\n }\n return readPreference;\n}\nfunction isSharded(topologyOrServer) {\n if (topologyOrServer == null) {\n return false;\n }\n if (topologyOrServer.description && topologyOrServer.description.type === common_1.ServerType.Mongos) {\n return true;\n }\n // NOTE: This is incredibly inefficient, and should be removed once command construction\n // happens based on `Server` not `Topology`.\n if (topologyOrServer.description && topologyOrServer.description instanceof topology_description_1.TopologyDescription) {\n const servers = Array.from(topologyOrServer.description.servers.values());\n return servers.some((server) => server.type === common_1.ServerType.Mongos);\n }\n return false;\n}\n//# sourceMappingURL=shared.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;AACA,QAAO,eAAe,SAAS,cAAc,EAAE,OAAO,MAAM,CAAC;AAC7D,SAAQ,oBAAoB;AAC5B,SAAQ,YAAY;CACpB,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,SAAS,kBAAkB,SAAS;EAEhC,IAAI,iBAAiB,SAAS,kBAAkB,kBAAkB,eAAe;AACjF,MAAI,OAAO,mBAAmB,SAC1B,kBAAiB,kBAAkB,eAAe,WAAW,eAAe;AAEhF,MAAI,EAAE,0BAA0B,kBAAkB,gBAC9C,OAAM,IAAI,QAAQ,0BAA0B,8DAA4D;AAE5G,SAAO;;CAEX,SAAS,UAAU,kBAAkB;AACjC,MAAI,oBAAoB,KACpB,QAAO;AAEX,MAAI,iBAAiB,eAAe,iBAAiB,YAAY,SAAS,SAAS,WAAW,OAC1F,QAAO;AAIX,MAAI,iBAAiB,eAAe,iBAAiB,uBAAuB,uBAAuB,oBAE/F,QADgB,MAAM,KAAK,iBAAiB,YAAY,QAAQ,QAAQ,CAAC,CAC1D,MAAM,WAAW,OAAO,SAAS,SAAS,WAAW,OAAO;AAE/E,SAAO"}