pecunia-root 0.0.9 → 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.
- package/dist/_virtual/rolldown_runtime.mjs +8 -0
- package/dist/adapters/drizzle-adapter/index.mjs +4 -1
- package/dist/adapters/drizzle-adapter/index.mjs.map +1 -1
- package/dist/adapters/mongodb-adapter/index.mjs +12 -11
- package/dist/adapters/mongodb-adapter/index.mjs.map +1 -1
- package/dist/db/migrations/index.mjs +0 -6
- package/dist/db/migrations/index.mjs.map +1 -1
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/code-points-data.mjs +14 -0
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/code-points-data.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/index.mjs +54 -0
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/memory-code-points.mjs +36 -0
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/memory-code-points.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/node.mjs +27 -0
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/node.mjs.map +1 -0
- package/dist/node_modules/.pnpm/bson@6.10.4/node_modules/bson/lib/bson.mjs +3728 -0
- package/dist/node_modules/.pnpm/bson@6.10.4/node_modules/bson/lib/bson.mjs.map +1 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/dist/node_modules/.pnpm/memory-pager@1.5.0/node_modules/memory-pager/index.mjs +137 -0
- package/dist/node_modules/.pnpm/memory-pager@1.5.0/node_modules/memory-pager/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/index.mjs +211 -0
- package/dist/node_modules/.pnpm/mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/redact.mjs +95 -0
- package/dist/node_modules/.pnpm/mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/redact.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/admin.mjs +158 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/admin.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bson.mjs +195 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bson.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/common.mjs +710 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/common.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/ordered.mjs +53 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/ordered.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/unordered.mjs +63 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/unordered.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/change_stream.mjs +368 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/change_stream.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/auto_encrypter.mjs +234 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/auto_encrypter.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/client_encryption.mjs +545 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/client_encryption.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/crypto_callbacks.mjs +83 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/crypto_callbacks.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/errors.mjs +146 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/errors.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/mongocryptd_manager.mjs +58 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/mongocryptd_manager.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/aws.mjs +30 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/aws.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/azure.mjs +135 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/azure.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/gcp.mjs +25 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/gcp.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/index.mjs +47 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/state_machine.mjs +362 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/state_machine.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/auth_provider.mjs +58 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/auth_provider.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/aws_temporary_credentials.mjs +123 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/aws_temporary_credentials.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/gssapi.mjs +128 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/gssapi.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongo_credentials.mjs +133 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongo_credentials.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_aws.mjs +126 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_aws.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/automated_callback_workflow.mjs +79 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/automated_callback_workflow.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_machine_workflow.mjs +65 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_machine_workflow.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_workflow.mjs +127 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_workflow.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/command_builders.mjs +47 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/command_builders.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/gcp_machine_workflow.mjs +44 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/gcp_machine_workflow.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/human_callback_workflow.mjs +101 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/human_callback_workflow.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/k8s_machine_workflow.mjs +33 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/k8s_machine_workflow.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_cache.mjs +53 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_cache.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_machine_workflow.mjs +29 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_machine_workflow.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc.mjs +83 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/plain.mjs +36 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/plain.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/providers.mjs +32 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/providers.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/scram.mjs +206 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/scram.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/x509.mjs +45 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/x509.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/command_monitoring_events.mjs +213 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/command_monitoring_events.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/commands.mjs +411 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/commands.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connect.mjs +288 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connect.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection.mjs +423 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool.mjs +483 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool_events.mjs +207 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool_events.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/errors.mjs +116 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/errors.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/handshake/client_metadata.mjs +183 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/handshake/client_metadata.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/metrics.mjs +55 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/metrics.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/stream_description.mjs +60 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/stream_description.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/compression.mjs +139 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/compression.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/constants.mjs +28 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/constants.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_data.mjs +117 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_data.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_demand/document.mjs +182 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_demand/document.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/responses.mjs +304 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/responses.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/shared.mjs +34 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/shared.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/collection.mjs +739 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/collection.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/connection_string.mjs +805 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/connection_string.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/constants.mjs +174 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/constants.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/abstract_cursor.mjs +726 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/abstract_cursor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/aggregation_cursor.mjs +172 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/aggregation_cursor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/change_stream_cursor.mjs +103 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/change_stream_cursor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/client_bulk_write_cursor.mjs +66 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/client_bulk_write_cursor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/explainable_cursor.mjs +41 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/explainable_cursor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/find_cursor.mjs +365 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/find_cursor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_collections_cursor.mjs +50 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_collections_cursor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_indexes_cursor.mjs +48 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_indexes_cursor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_search_indexes_cursor.mjs +23 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_search_indexes_cursor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/run_command_cursor.mjs +106 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/run_command_cursor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/db.mjs +428 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/db.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/deps.mjs +124 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/deps.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/encrypter.mjs +95 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/encrypter.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/error.mjs +1305 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/error.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/explain.mjs +59 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/explain.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/download.mjs +250 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/download.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/index.mjs +170 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/upload.mjs +315 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/upload.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/index.mjs +925 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client.mjs +520 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client_auth_providers.mjs +90 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client_auth_providers.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_logger.mjs +582 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_logger.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_types.mjs +64 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_types.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/aggregate.mjs +86 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/aggregate.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/client_bulk_write.mjs +60 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/client_bulk_write.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/command_builder.mjs +264 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/command_builder.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/executor.mjs +109 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/executor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/results_merger.mjs +172 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/results_merger.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/command.mjs +68 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/command.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/count.mjs +53 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/count.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/create_collection.mjs +123 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/create_collection.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/delete.mjs +119 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/delete.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/distinct.mjs +65 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/distinct.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/drop.mjs +97 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/drop.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/estimated_document_count.mjs +47 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/estimated_document_count.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/execute_operation.mjs +188 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/execute_operation.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find.mjs +103 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find_and_modify.mjs +136 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find_and_modify.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/get_more.mjs +61 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/get_more.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/indexes.mjs +179 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/indexes.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/insert.mjs +77 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/insert.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/kill_cursors.mjs +48 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/kill_cursors.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_collections.mjs +60 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_collections.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_databases.mjs +43 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_databases.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/operation.mjs +105 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/operation.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/profiling_level.mjs +50 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/profiling_level.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/remove_user.mjs +39 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/remove_user.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/rename.mjs +49 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/rename.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/run_command.mjs +58 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/run_command.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/create.mjs +46 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/create.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/drop.mjs +48 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/drop.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/update.mjs +46 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/update.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/set_profiling_level.mjs +67 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/set_profiling_level.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/stats.mjs +37 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/stats.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/update.mjs +171 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/update.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/validate_collection.mjs +45 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/validate_collection.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_concern.mjs +71 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_concern.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_preference.mjs +165 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_preference.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/resource_management.mjs +62 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/resource_management.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/common.mjs +51 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/common.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/events.mjs +156 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/events.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/monitor.mjs +477 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/monitor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server.mjs +315 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_description.mjs +157 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_description.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection.mjs +184 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection_events.mjs +96 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection_events.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/srv_polling.mjs +107 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/srv_polling.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology.mjs +540 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology_description.mjs +298 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology_description.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sessions.mjs +623 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sessions.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sort.mjs +91 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sort.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/timeout.mjs +254 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/timeout.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/transactions.mjs +138 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/transactions.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/utils.mjs +993 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/utils.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/write_concern.mjs +81 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/write_concern.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/package.mjs +171 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/package.mjs.map +1 -0
- package/dist/node_modules/.pnpm/punycode@2.3.1/node_modules/punycode/punycode.mjs +295 -0
- package/dist/node_modules/.pnpm/punycode@2.3.1/node_modules/punycode/punycode.mjs.map +1 -0
- package/dist/node_modules/.pnpm/sparse-bitfield@3.0.3/node_modules/sparse-bitfield/index.mjs +81 -0
- package/dist/node_modules/.pnpm/sparse-bitfield@3.0.3/node_modules/sparse-bitfield/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/index.mjs +206 -0
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/mappingTable.mjs +33590 -0
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/mappingTable.mjs.map +1 -0
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/regexes.mjs +37 -0
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/regexes.mjs.map +1 -0
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/statusMapping.mjs +18 -0
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/statusMapping.mjs.map +1 -0
- package/dist/node_modules/.pnpm/webidl-conversions@7.0.0/node_modules/webidl-conversions/lib/index.mjs +252 -0
- package/dist/node_modules/.pnpm/webidl-conversions@7.0.0/node_modules/webidl-conversions/lib/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/index.mjs +41 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/Function.mjs +41 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/Function.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL-impl.mjs +173 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL-impl.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL.mjs +334 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams-impl.mjs +90 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams-impl.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams.mjs +356 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/encoding.mjs +23 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/encoding.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/infra.mjs +29 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/infra.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/percent-encoding.mjs +140 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/percent-encoding.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/url-state-machine.mjs +831 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/url-state-machine.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/urlencoded.mjs +77 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/urlencoded.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/utils.mjs +147 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/utils.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/webidl2js-wrapper.mjs +17 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/webidl2js-wrapper.mjs.map +1 -0
- package/package.json +2 -40
|
@@ -0,0 +1,805 @@
|
|
|
1
|
+
import { __commonJSMin, __require } from "../../../../../../_virtual/rolldown_runtime.mjs";
|
|
2
|
+
import { require_error } from "./error.mjs";
|
|
3
|
+
import { require_read_preference } from "./read_preference.mjs";
|
|
4
|
+
import { require_read_concern } from "./read_concern.mjs";
|
|
5
|
+
import { require_write_concern } from "./write_concern.mjs";
|
|
6
|
+
import { require_utils } from "./utils.mjs";
|
|
7
|
+
import { require_mongo_logger } from "./mongo_logger.mjs";
|
|
8
|
+
import { require_providers } from "./cmap/auth/providers.mjs";
|
|
9
|
+
import { require_mongo_credentials } from "./cmap/auth/mongo_credentials.mjs";
|
|
10
|
+
import { require_lib } from "../../../../mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/index.mjs";
|
|
11
|
+
import { require_compression } from "./cmap/wire_protocol/compression.mjs";
|
|
12
|
+
import { require_encrypter } from "./encrypter.mjs";
|
|
13
|
+
import { require_monitor } from "./sdam/monitor.mjs";
|
|
14
|
+
import { require_mongo_client } from "./mongo_client.mjs";
|
|
15
|
+
|
|
16
|
+
//#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/connection_string.js
|
|
17
|
+
var require_connection_string = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.DEFAULT_OPTIONS = exports.OPTIONS = void 0;
|
|
20
|
+
exports.resolveSRVRecord = resolveSRVRecord;
|
|
21
|
+
exports.parseOptions = parseOptions;
|
|
22
|
+
const dns = __require("dns");
|
|
23
|
+
const mongodb_connection_string_url_1 = require_lib();
|
|
24
|
+
const url_1 = __require("url");
|
|
25
|
+
const mongo_credentials_1 = require_mongo_credentials();
|
|
26
|
+
const providers_1 = require_providers();
|
|
27
|
+
const compression_1 = require_compression();
|
|
28
|
+
const encrypter_1 = require_encrypter();
|
|
29
|
+
const error_1 = require_error();
|
|
30
|
+
const mongo_client_1 = require_mongo_client();
|
|
31
|
+
const mongo_logger_1 = require_mongo_logger();
|
|
32
|
+
const read_concern_1 = require_read_concern();
|
|
33
|
+
const read_preference_1 = require_read_preference();
|
|
34
|
+
const monitor_1 = require_monitor();
|
|
35
|
+
const utils_1 = require_utils();
|
|
36
|
+
const write_concern_1 = require_write_concern();
|
|
37
|
+
const VALID_TXT_RECORDS = [
|
|
38
|
+
"authSource",
|
|
39
|
+
"replicaSet",
|
|
40
|
+
"loadBalanced"
|
|
41
|
+
];
|
|
42
|
+
const LB_SINGLE_HOST_ERROR = "loadBalanced option only supported with a single host in the URI";
|
|
43
|
+
const LB_REPLICA_SET_ERROR = "loadBalanced option not supported with a replicaSet option";
|
|
44
|
+
const LB_DIRECT_CONNECTION_ERROR = "loadBalanced option not supported when directConnection is provided";
|
|
45
|
+
function retryDNSTimeoutFor(api) {
|
|
46
|
+
return async function dnsReqRetryTimeout(lookupAddress) {
|
|
47
|
+
try {
|
|
48
|
+
return await dns.promises[api](lookupAddress);
|
|
49
|
+
} catch (firstDNSError) {
|
|
50
|
+
if (firstDNSError.code === dns.TIMEOUT) return await dns.promises[api](lookupAddress);
|
|
51
|
+
else throw firstDNSError;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
const resolveSrv = retryDNSTimeoutFor("resolveSrv");
|
|
56
|
+
const resolveTxt = retryDNSTimeoutFor("resolveTxt");
|
|
57
|
+
/**
|
|
58
|
+
* Lookup a `mongodb+srv` connection string, combine the parts and reparse it as a normal
|
|
59
|
+
* connection string.
|
|
60
|
+
*
|
|
61
|
+
* @param uri - The connection string to parse
|
|
62
|
+
* @param options - Optional user provided connection string options
|
|
63
|
+
*/
|
|
64
|
+
async function resolveSRVRecord(options) {
|
|
65
|
+
if (typeof options.srvHost !== "string") throw new error_1.MongoAPIError("Option \"srvHost\" must not be empty");
|
|
66
|
+
const lookupAddress = options.srvHost;
|
|
67
|
+
const txtResolutionPromise = resolveTxt(lookupAddress);
|
|
68
|
+
txtResolutionPromise.then(void 0, utils_1.squashError);
|
|
69
|
+
const addresses = await resolveSrv(`_${options.srvServiceName}._tcp.${lookupAddress}`);
|
|
70
|
+
if (addresses.length === 0) throw new error_1.MongoAPIError("No addresses found at host");
|
|
71
|
+
for (const { name } of addresses) (0, utils_1.checkParentDomainMatch)(name, lookupAddress);
|
|
72
|
+
const hostAddresses = addresses.map((r) => utils_1.HostAddress.fromString(`${r.name}:${r.port ?? 27017}`));
|
|
73
|
+
validateLoadBalancedOptions(hostAddresses, options, true);
|
|
74
|
+
let record;
|
|
75
|
+
try {
|
|
76
|
+
record = await txtResolutionPromise;
|
|
77
|
+
} catch (error) {
|
|
78
|
+
if (error.code !== "ENODATA" && error.code !== "ENOTFOUND") throw error;
|
|
79
|
+
return hostAddresses;
|
|
80
|
+
}
|
|
81
|
+
if (record.length > 1) throw new error_1.MongoParseError("Multiple text records not allowed");
|
|
82
|
+
const txtRecordOptions = new url_1.URLSearchParams(record[0].join(""));
|
|
83
|
+
if ([...txtRecordOptions.keys()].some((key) => !VALID_TXT_RECORDS.includes(key))) throw new error_1.MongoParseError(`Text record may only set any of: ${VALID_TXT_RECORDS.join(", ")}`);
|
|
84
|
+
if (VALID_TXT_RECORDS.some((option) => txtRecordOptions.get(option) === "")) throw new error_1.MongoParseError("Cannot have empty URI params in DNS TXT Record");
|
|
85
|
+
const source = txtRecordOptions.get("authSource") ?? void 0;
|
|
86
|
+
const replicaSet = txtRecordOptions.get("replicaSet") ?? void 0;
|
|
87
|
+
const loadBalanced = txtRecordOptions.get("loadBalanced") ?? void 0;
|
|
88
|
+
if (!options.userSpecifiedAuthSource && source && options.credentials && !providers_1.AUTH_MECHS_AUTH_SRC_EXTERNAL.has(options.credentials.mechanism)) options.credentials = mongo_credentials_1.MongoCredentials.merge(options.credentials, { source });
|
|
89
|
+
if (!options.userSpecifiedReplicaSet && replicaSet) options.replicaSet = replicaSet;
|
|
90
|
+
if (loadBalanced === "true") options.loadBalanced = true;
|
|
91
|
+
if (options.replicaSet && options.srvMaxHosts > 0) throw new error_1.MongoParseError("Cannot combine replicaSet option with srvMaxHosts");
|
|
92
|
+
validateLoadBalancedOptions(hostAddresses, options, true);
|
|
93
|
+
return hostAddresses;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Checks if TLS options are valid
|
|
97
|
+
*
|
|
98
|
+
* @param allOptions - All options provided by user or included in default options map
|
|
99
|
+
* @throws MongoAPIError if TLS options are invalid
|
|
100
|
+
*/
|
|
101
|
+
function checkTLSOptions(allOptions) {
|
|
102
|
+
if (!allOptions) return;
|
|
103
|
+
const check = (a, b) => {
|
|
104
|
+
if (allOptions.has(a) && allOptions.has(b)) throw new error_1.MongoAPIError(`The '${a}' option cannot be used with the '${b}' option`);
|
|
105
|
+
};
|
|
106
|
+
check("tlsInsecure", "tlsAllowInvalidCertificates");
|
|
107
|
+
check("tlsInsecure", "tlsAllowInvalidHostnames");
|
|
108
|
+
}
|
|
109
|
+
function getBoolean(name, value) {
|
|
110
|
+
if (typeof value === "boolean") return value;
|
|
111
|
+
switch (value) {
|
|
112
|
+
case "true": return true;
|
|
113
|
+
case "false": return false;
|
|
114
|
+
default: throw new error_1.MongoParseError(`${name} must be either "true" or "false"`);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
function getIntFromOptions(name, value) {
|
|
118
|
+
const parsedInt = (0, utils_1.parseInteger)(value);
|
|
119
|
+
if (parsedInt != null) return parsedInt;
|
|
120
|
+
throw new error_1.MongoParseError(`Expected ${name} to be stringified int value, got: ${value}`);
|
|
121
|
+
}
|
|
122
|
+
function getUIntFromOptions(name, value) {
|
|
123
|
+
const parsedValue = getIntFromOptions(name, value);
|
|
124
|
+
if (parsedValue < 0) throw new error_1.MongoParseError(`${name} can only be a positive int value, got: ${value}`);
|
|
125
|
+
return parsedValue;
|
|
126
|
+
}
|
|
127
|
+
function* entriesFromString(value) {
|
|
128
|
+
if (value === "") return;
|
|
129
|
+
const keyValuePairs = value.split(",");
|
|
130
|
+
for (const keyValue of keyValuePairs) {
|
|
131
|
+
const [key, value$1] = keyValue.split(/:(.*)/);
|
|
132
|
+
if (value$1 == null) throw new error_1.MongoParseError("Cannot have undefined values in key value pairs");
|
|
133
|
+
yield [key, value$1];
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
var CaseInsensitiveMap = class extends Map {
|
|
137
|
+
constructor(entries = []) {
|
|
138
|
+
super(entries.map(([k, v]) => [k.toLowerCase(), v]));
|
|
139
|
+
}
|
|
140
|
+
has(k) {
|
|
141
|
+
return super.has(k.toLowerCase());
|
|
142
|
+
}
|
|
143
|
+
get(k) {
|
|
144
|
+
return super.get(k.toLowerCase());
|
|
145
|
+
}
|
|
146
|
+
set(k, v) {
|
|
147
|
+
return super.set(k.toLowerCase(), v);
|
|
148
|
+
}
|
|
149
|
+
delete(k) {
|
|
150
|
+
return super.delete(k.toLowerCase());
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
function parseOptions(uri, mongoClient = void 0, options = {}) {
|
|
154
|
+
if (mongoClient != null && !(mongoClient instanceof mongo_client_1.MongoClient)) {
|
|
155
|
+
options = mongoClient;
|
|
156
|
+
mongoClient = void 0;
|
|
157
|
+
}
|
|
158
|
+
if (options.useBigInt64 && typeof options.promoteLongs === "boolean" && !options.promoteLongs) throw new error_1.MongoAPIError("Must request either bigint or Long for int64 deserialization");
|
|
159
|
+
if (options.useBigInt64 && typeof options.promoteValues === "boolean" && !options.promoteValues) throw new error_1.MongoAPIError("Must request either bigint or Long for int64 deserialization");
|
|
160
|
+
const url = new mongodb_connection_string_url_1.default(uri);
|
|
161
|
+
const { hosts, isSRV } = url;
|
|
162
|
+
const mongoOptions = Object.create(null);
|
|
163
|
+
mongoOptions.hosts = isSRV ? [] : hosts.map(utils_1.HostAddress.fromString);
|
|
164
|
+
const urlOptions = new CaseInsensitiveMap();
|
|
165
|
+
if (url.pathname !== "/" && url.pathname !== "") {
|
|
166
|
+
const dbName = decodeURIComponent(url.pathname[0] === "/" ? url.pathname.slice(1) : url.pathname);
|
|
167
|
+
if (dbName) urlOptions.set("dbName", [dbName]);
|
|
168
|
+
}
|
|
169
|
+
if (url.username !== "") {
|
|
170
|
+
const auth = { username: decodeURIComponent(url.username) };
|
|
171
|
+
if (typeof url.password === "string") auth.password = decodeURIComponent(url.password);
|
|
172
|
+
urlOptions.set("auth", [auth]);
|
|
173
|
+
}
|
|
174
|
+
for (const key of url.searchParams.keys()) {
|
|
175
|
+
const values = url.searchParams.getAll(key);
|
|
176
|
+
const isReadPreferenceTags = /readPreferenceTags/i.test(key);
|
|
177
|
+
if (!isReadPreferenceTags && values.length > 1) throw new error_1.MongoInvalidArgumentError(`URI option "${key}" cannot appear more than once in the connection string`);
|
|
178
|
+
if (!isReadPreferenceTags && values.includes("")) throw new error_1.MongoAPIError(`URI option "${key}" cannot be specified with no value`);
|
|
179
|
+
if (!urlOptions.has(key)) urlOptions.set(key, values);
|
|
180
|
+
}
|
|
181
|
+
const objectOptions = new CaseInsensitiveMap(Object.entries(options).filter(([, v]) => v != null));
|
|
182
|
+
if (urlOptions.has("serverApi")) throw new error_1.MongoParseError("URI cannot contain `serverApi`, it can only be passed to the client");
|
|
183
|
+
const uriMechanismProperties = urlOptions.get("authMechanismProperties");
|
|
184
|
+
if (uriMechanismProperties) {
|
|
185
|
+
for (const property of uriMechanismProperties) if (/(^|,)ALLOWED_HOSTS:/.test(property)) throw new error_1.MongoParseError("Auth mechanism property ALLOWED_HOSTS is not allowed in the connection string.");
|
|
186
|
+
}
|
|
187
|
+
if (objectOptions.has("loadBalanced")) throw new error_1.MongoParseError("loadBalanced is only a valid option in the URI");
|
|
188
|
+
const allProvidedOptions = new CaseInsensitiveMap();
|
|
189
|
+
const allProvidedKeys = new Set([...urlOptions.keys(), ...objectOptions.keys()]);
|
|
190
|
+
for (const key of allProvidedKeys) {
|
|
191
|
+
const values = [];
|
|
192
|
+
const objectOptionValue = objectOptions.get(key);
|
|
193
|
+
if (objectOptionValue != null) values.push(objectOptionValue);
|
|
194
|
+
const urlValues = urlOptions.get(key) ?? [];
|
|
195
|
+
values.push(...urlValues);
|
|
196
|
+
allProvidedOptions.set(key, values);
|
|
197
|
+
}
|
|
198
|
+
if (allProvidedOptions.has("tls") || allProvidedOptions.has("ssl")) {
|
|
199
|
+
const tlsAndSslOpts = (allProvidedOptions.get("tls") || []).concat(allProvidedOptions.get("ssl") || []).map(getBoolean.bind(null, "tls/ssl"));
|
|
200
|
+
if (new Set(tlsAndSslOpts).size !== 1) throw new error_1.MongoParseError("All values of tls/ssl must be the same.");
|
|
201
|
+
}
|
|
202
|
+
checkTLSOptions(allProvidedOptions);
|
|
203
|
+
const unsupportedOptions = (0, utils_1.setDifference)(allProvidedKeys, Array.from(Object.keys(exports.OPTIONS)).map((s) => s.toLowerCase()));
|
|
204
|
+
if (unsupportedOptions.size !== 0) {
|
|
205
|
+
const optionWord = unsupportedOptions.size > 1 ? "options" : "option";
|
|
206
|
+
const isOrAre = unsupportedOptions.size > 1 ? "are" : "is";
|
|
207
|
+
throw new error_1.MongoParseError(`${optionWord} ${Array.from(unsupportedOptions).join(", ")} ${isOrAre} not supported`);
|
|
208
|
+
}
|
|
209
|
+
for (const [key, descriptor] of Object.entries(exports.OPTIONS)) {
|
|
210
|
+
const values = allProvidedOptions.get(key);
|
|
211
|
+
if (!values || values.length === 0) {
|
|
212
|
+
if (exports.DEFAULT_OPTIONS.has(key)) setOption(mongoOptions, key, descriptor, [exports.DEFAULT_OPTIONS.get(key)]);
|
|
213
|
+
} else {
|
|
214
|
+
const { deprecated } = descriptor;
|
|
215
|
+
if (deprecated) {
|
|
216
|
+
const deprecatedMsg = typeof deprecated === "string" ? `: ${deprecated}` : "";
|
|
217
|
+
(0, utils_1.emitWarning)(`${key} is a deprecated option${deprecatedMsg}`);
|
|
218
|
+
}
|
|
219
|
+
setOption(mongoOptions, key, descriptor, values);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
if (mongoOptions.credentials) {
|
|
223
|
+
const isGssapi = mongoOptions.credentials.mechanism === providers_1.AuthMechanism.MONGODB_GSSAPI;
|
|
224
|
+
const isX509 = mongoOptions.credentials.mechanism === providers_1.AuthMechanism.MONGODB_X509;
|
|
225
|
+
const isAws = mongoOptions.credentials.mechanism === providers_1.AuthMechanism.MONGODB_AWS;
|
|
226
|
+
const isOidc = mongoOptions.credentials.mechanism === providers_1.AuthMechanism.MONGODB_OIDC;
|
|
227
|
+
if ((isGssapi || isX509) && allProvidedOptions.has("authSource") && mongoOptions.credentials.source !== "$external") throw new error_1.MongoParseError(`authMechanism ${mongoOptions.credentials.mechanism} requires an authSource of '$external'`);
|
|
228
|
+
if (!(isGssapi || isX509 || isAws || isOidc) && mongoOptions.dbName && !allProvidedOptions.has("authSource")) mongoOptions.credentials = mongo_credentials_1.MongoCredentials.merge(mongoOptions.credentials, { source: mongoOptions.dbName });
|
|
229
|
+
if (isAws && mongoOptions.credentials.username && !mongoOptions.credentials.password) throw new error_1.MongoMissingCredentialsError(`When using ${mongoOptions.credentials.mechanism} password must be set when a username is specified`);
|
|
230
|
+
mongoOptions.credentials.validate();
|
|
231
|
+
if (mongoOptions.credentials.password === "" && mongoOptions.credentials.username === "" && mongoOptions.credentials.mechanism === providers_1.AuthMechanism.MONGODB_DEFAULT && Object.keys(mongoOptions.credentials.mechanismProperties).length === 0) delete mongoOptions.credentials;
|
|
232
|
+
}
|
|
233
|
+
if (!mongoOptions.dbName) mongoOptions.dbName = "test";
|
|
234
|
+
validateLoadBalancedOptions(hosts, mongoOptions, isSRV);
|
|
235
|
+
if (mongoClient && mongoOptions.autoEncryption) {
|
|
236
|
+
encrypter_1.Encrypter.checkForMongoCrypt();
|
|
237
|
+
mongoOptions.encrypter = new encrypter_1.Encrypter(mongoClient, uri, options);
|
|
238
|
+
mongoOptions.autoEncrypter = mongoOptions.encrypter.autoEncrypter;
|
|
239
|
+
}
|
|
240
|
+
mongoOptions.userSpecifiedAuthSource = objectOptions.has("authSource") || urlOptions.has("authSource");
|
|
241
|
+
mongoOptions.userSpecifiedReplicaSet = objectOptions.has("replicaSet") || urlOptions.has("replicaSet");
|
|
242
|
+
if (isSRV) {
|
|
243
|
+
mongoOptions.srvHost = hosts[0];
|
|
244
|
+
if (mongoOptions.directConnection) throw new error_1.MongoAPIError("SRV URI does not support directConnection");
|
|
245
|
+
if (mongoOptions.srvMaxHosts > 0 && typeof mongoOptions.replicaSet === "string") throw new error_1.MongoParseError("Cannot use srvMaxHosts option with replicaSet");
|
|
246
|
+
const noUserSpecifiedTLS = !objectOptions.has("tls") && !urlOptions.has("tls");
|
|
247
|
+
const noUserSpecifiedSSL = !objectOptions.has("ssl") && !urlOptions.has("ssl");
|
|
248
|
+
if (noUserSpecifiedTLS && noUserSpecifiedSSL) mongoOptions.tls = true;
|
|
249
|
+
} else if (urlOptions.has("srvMaxHosts") || objectOptions.has("srvMaxHosts") || urlOptions.has("srvServiceName") || objectOptions.has("srvServiceName")) throw new error_1.MongoParseError("Cannot use srvMaxHosts or srvServiceName with a non-srv connection string");
|
|
250
|
+
if (mongoOptions.directConnection && mongoOptions.hosts.length !== 1) throw new error_1.MongoParseError("directConnection option requires exactly one host");
|
|
251
|
+
if (!mongoOptions.proxyHost && (mongoOptions.proxyPort || mongoOptions.proxyUsername || mongoOptions.proxyPassword)) throw new error_1.MongoParseError("Must specify proxyHost if other proxy options are passed");
|
|
252
|
+
if (mongoOptions.proxyUsername && !mongoOptions.proxyPassword || !mongoOptions.proxyUsername && mongoOptions.proxyPassword) throw new error_1.MongoParseError("Can only specify both of proxy username/password or neither");
|
|
253
|
+
if ([
|
|
254
|
+
"proxyHost",
|
|
255
|
+
"proxyPort",
|
|
256
|
+
"proxyUsername",
|
|
257
|
+
"proxyPassword"
|
|
258
|
+
].map((key) => urlOptions.get(key) ?? []).some((options$1) => options$1.length > 1)) throw new error_1.MongoParseError("Proxy options cannot be specified multiple times in the connection string");
|
|
259
|
+
mongoOptions.mongoLoggerOptions = mongo_logger_1.MongoLogger.resolveOptions({
|
|
260
|
+
MONGODB_LOG_COMMAND: process.env.MONGODB_LOG_COMMAND,
|
|
261
|
+
MONGODB_LOG_TOPOLOGY: process.env.MONGODB_LOG_TOPOLOGY,
|
|
262
|
+
MONGODB_LOG_SERVER_SELECTION: process.env.MONGODB_LOG_SERVER_SELECTION,
|
|
263
|
+
MONGODB_LOG_CONNECTION: process.env.MONGODB_LOG_CONNECTION,
|
|
264
|
+
MONGODB_LOG_CLIENT: process.env.MONGODB_LOG_CLIENT,
|
|
265
|
+
MONGODB_LOG_ALL: process.env.MONGODB_LOG_ALL,
|
|
266
|
+
MONGODB_LOG_MAX_DOCUMENT_LENGTH: process.env.MONGODB_LOG_MAX_DOCUMENT_LENGTH,
|
|
267
|
+
MONGODB_LOG_PATH: process.env.MONGODB_LOG_PATH
|
|
268
|
+
}, {
|
|
269
|
+
mongodbLogPath: mongoOptions.mongodbLogPath,
|
|
270
|
+
mongodbLogComponentSeverities: mongoOptions.mongodbLogComponentSeverities,
|
|
271
|
+
mongodbLogMaxDocumentLength: mongoOptions.mongodbLogMaxDocumentLength
|
|
272
|
+
});
|
|
273
|
+
return mongoOptions;
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* #### Throws if LB mode is true:
|
|
277
|
+
* - hosts contains more than one host
|
|
278
|
+
* - there is a replicaSet name set
|
|
279
|
+
* - directConnection is set
|
|
280
|
+
* - if srvMaxHosts is used when an srv connection string is passed in
|
|
281
|
+
*
|
|
282
|
+
* @throws MongoParseError
|
|
283
|
+
*/
|
|
284
|
+
function validateLoadBalancedOptions(hosts, mongoOptions, isSrv) {
|
|
285
|
+
if (mongoOptions.loadBalanced) {
|
|
286
|
+
if (hosts.length > 1) throw new error_1.MongoParseError(LB_SINGLE_HOST_ERROR);
|
|
287
|
+
if (mongoOptions.replicaSet) throw new error_1.MongoParseError(LB_REPLICA_SET_ERROR);
|
|
288
|
+
if (mongoOptions.directConnection) throw new error_1.MongoParseError(LB_DIRECT_CONNECTION_ERROR);
|
|
289
|
+
if (isSrv && mongoOptions.srvMaxHosts > 0) throw new error_1.MongoParseError("Cannot limit srv hosts with loadBalanced enabled");
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
function setOption(mongoOptions, key, descriptor, values) {
|
|
293
|
+
const { target, type, transform } = descriptor;
|
|
294
|
+
const name = target ?? key;
|
|
295
|
+
switch (type) {
|
|
296
|
+
case "boolean":
|
|
297
|
+
mongoOptions[name] = getBoolean(name, values[0]);
|
|
298
|
+
break;
|
|
299
|
+
case "int":
|
|
300
|
+
mongoOptions[name] = getIntFromOptions(name, values[0]);
|
|
301
|
+
break;
|
|
302
|
+
case "uint":
|
|
303
|
+
mongoOptions[name] = getUIntFromOptions(name, values[0]);
|
|
304
|
+
break;
|
|
305
|
+
case "string":
|
|
306
|
+
if (values[0] == null) break;
|
|
307
|
+
mongoOptions[name] = String(values[0]);
|
|
308
|
+
break;
|
|
309
|
+
case "record":
|
|
310
|
+
if (!(0, utils_1.isRecord)(values[0])) throw new error_1.MongoParseError(`${name} must be an object`);
|
|
311
|
+
mongoOptions[name] = values[0];
|
|
312
|
+
break;
|
|
313
|
+
case "any":
|
|
314
|
+
mongoOptions[name] = values[0];
|
|
315
|
+
break;
|
|
316
|
+
default:
|
|
317
|
+
if (!transform) throw new error_1.MongoParseError("Descriptors missing a type must define a transform");
|
|
318
|
+
mongoOptions[name] = transform({
|
|
319
|
+
name,
|
|
320
|
+
options: mongoOptions,
|
|
321
|
+
values
|
|
322
|
+
});
|
|
323
|
+
break;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
exports.OPTIONS = {
|
|
327
|
+
appName: { type: "string" },
|
|
328
|
+
auth: {
|
|
329
|
+
target: "credentials",
|
|
330
|
+
transform({ name, options, values: [value] }) {
|
|
331
|
+
if (!(0, utils_1.isRecord)(value, ["username", "password"])) throw new error_1.MongoParseError(`${name} must be an object with 'username' and 'password' properties`);
|
|
332
|
+
return mongo_credentials_1.MongoCredentials.merge(options.credentials, {
|
|
333
|
+
username: value.username,
|
|
334
|
+
password: value.password
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
authMechanism: {
|
|
339
|
+
target: "credentials",
|
|
340
|
+
transform({ options, values: [value] }) {
|
|
341
|
+
const mechanisms = Object.values(providers_1.AuthMechanism);
|
|
342
|
+
const [mechanism] = mechanisms.filter((m) => m.match(RegExp(String.raw`\b${value}\b`, "i")));
|
|
343
|
+
if (!mechanism) throw new error_1.MongoParseError(`authMechanism one of ${mechanisms}, got ${value}`);
|
|
344
|
+
let source = options.credentials?.source;
|
|
345
|
+
if (mechanism === providers_1.AuthMechanism.MONGODB_PLAIN || providers_1.AUTH_MECHS_AUTH_SRC_EXTERNAL.has(mechanism)) source = "$external";
|
|
346
|
+
let password = options.credentials?.password;
|
|
347
|
+
if (mechanism === providers_1.AuthMechanism.MONGODB_X509 && password === "") password = void 0;
|
|
348
|
+
return mongo_credentials_1.MongoCredentials.merge(options.credentials, {
|
|
349
|
+
mechanism,
|
|
350
|
+
source,
|
|
351
|
+
password
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
authMechanismProperties: {
|
|
356
|
+
target: "credentials",
|
|
357
|
+
transform({ options, values }) {
|
|
358
|
+
let mechanismProperties = Object.create(null);
|
|
359
|
+
for (const optionValue of values) if (typeof optionValue === "string") for (const [key, value] of entriesFromString(optionValue)) try {
|
|
360
|
+
mechanismProperties[key] = getBoolean(key, value);
|
|
361
|
+
} catch {
|
|
362
|
+
mechanismProperties[key] = value;
|
|
363
|
+
}
|
|
364
|
+
else {
|
|
365
|
+
if (!(0, utils_1.isRecord)(optionValue)) throw new error_1.MongoParseError("AuthMechanismProperties must be an object");
|
|
366
|
+
mechanismProperties = { ...optionValue };
|
|
367
|
+
}
|
|
368
|
+
return mongo_credentials_1.MongoCredentials.merge(options.credentials, { mechanismProperties });
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
authSource: {
|
|
372
|
+
target: "credentials",
|
|
373
|
+
transform({ options, values: [value] }) {
|
|
374
|
+
const source = String(value);
|
|
375
|
+
return mongo_credentials_1.MongoCredentials.merge(options.credentials, { source });
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
autoEncryption: { type: "record" },
|
|
379
|
+
autoSelectFamily: {
|
|
380
|
+
type: "boolean",
|
|
381
|
+
default: true
|
|
382
|
+
},
|
|
383
|
+
autoSelectFamilyAttemptTimeout: { type: "uint" },
|
|
384
|
+
bsonRegExp: { type: "boolean" },
|
|
385
|
+
serverApi: {
|
|
386
|
+
target: "serverApi",
|
|
387
|
+
transform({ values: [version] }) {
|
|
388
|
+
const serverApiToValidate = typeof version === "string" ? { version } : version;
|
|
389
|
+
const versionToValidate = serverApiToValidate && serverApiToValidate.version;
|
|
390
|
+
if (!versionToValidate) throw new error_1.MongoParseError(`Invalid \`serverApi\` property; must specify a version from the following enum: ["${Object.values(mongo_client_1.ServerApiVersion).join("\", \"")}"]`);
|
|
391
|
+
if (!Object.values(mongo_client_1.ServerApiVersion).some((v) => v === versionToValidate)) throw new error_1.MongoParseError(`Invalid server API version=${versionToValidate}; must be in the following enum: ["${Object.values(mongo_client_1.ServerApiVersion).join("\", \"")}"]`);
|
|
392
|
+
return serverApiToValidate;
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
checkKeys: { type: "boolean" },
|
|
396
|
+
compressors: {
|
|
397
|
+
default: "none",
|
|
398
|
+
target: "compressors",
|
|
399
|
+
transform({ values }) {
|
|
400
|
+
const compressionList = /* @__PURE__ */ new Set();
|
|
401
|
+
for (const compVal of values) {
|
|
402
|
+
const compValArray = typeof compVal === "string" ? compVal.split(",") : compVal;
|
|
403
|
+
if (!Array.isArray(compValArray)) throw new error_1.MongoInvalidArgumentError("compressors must be an array or a comma-delimited list of strings");
|
|
404
|
+
for (const c of compValArray) if (Object.keys(compression_1.Compressor).includes(String(c))) compressionList.add(String(c));
|
|
405
|
+
else throw new error_1.MongoInvalidArgumentError(`${c} is not a valid compression mechanism. Must be one of: ${Object.keys(compression_1.Compressor)}.`);
|
|
406
|
+
}
|
|
407
|
+
return [...compressionList];
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
connectTimeoutMS: {
|
|
411
|
+
default: 3e4,
|
|
412
|
+
type: "uint"
|
|
413
|
+
},
|
|
414
|
+
dbName: { type: "string" },
|
|
415
|
+
directConnection: {
|
|
416
|
+
default: false,
|
|
417
|
+
type: "boolean"
|
|
418
|
+
},
|
|
419
|
+
driverInfo: {
|
|
420
|
+
default: {},
|
|
421
|
+
type: "record"
|
|
422
|
+
},
|
|
423
|
+
enableUtf8Validation: {
|
|
424
|
+
type: "boolean",
|
|
425
|
+
default: true
|
|
426
|
+
},
|
|
427
|
+
family: { transform({ name, values: [value] }) {
|
|
428
|
+
const transformValue = getIntFromOptions(name, value);
|
|
429
|
+
if (transformValue === 4 || transformValue === 6) return transformValue;
|
|
430
|
+
throw new error_1.MongoParseError(`Option 'family' must be 4 or 6 got ${transformValue}.`);
|
|
431
|
+
} },
|
|
432
|
+
fieldsAsRaw: { type: "record" },
|
|
433
|
+
forceServerObjectId: {
|
|
434
|
+
default: false,
|
|
435
|
+
type: "boolean"
|
|
436
|
+
},
|
|
437
|
+
fsync: {
|
|
438
|
+
deprecated: "Please use journal instead",
|
|
439
|
+
target: "writeConcern",
|
|
440
|
+
transform({ name, options, values: [value] }) {
|
|
441
|
+
const wc = write_concern_1.WriteConcern.fromOptions({ writeConcern: {
|
|
442
|
+
...options.writeConcern,
|
|
443
|
+
fsync: getBoolean(name, value)
|
|
444
|
+
} });
|
|
445
|
+
if (!wc) throw new error_1.MongoParseError(`Unable to make a writeConcern from fsync=${value}`);
|
|
446
|
+
return wc;
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
heartbeatFrequencyMS: {
|
|
450
|
+
default: 1e4,
|
|
451
|
+
type: "uint"
|
|
452
|
+
},
|
|
453
|
+
ignoreUndefined: { type: "boolean" },
|
|
454
|
+
j: {
|
|
455
|
+
deprecated: "Please use journal instead",
|
|
456
|
+
target: "writeConcern",
|
|
457
|
+
transform({ name, options, values: [value] }) {
|
|
458
|
+
const wc = write_concern_1.WriteConcern.fromOptions({ writeConcern: {
|
|
459
|
+
...options.writeConcern,
|
|
460
|
+
journal: getBoolean(name, value)
|
|
461
|
+
} });
|
|
462
|
+
if (!wc) throw new error_1.MongoParseError(`Unable to make a writeConcern from journal=${value}`);
|
|
463
|
+
return wc;
|
|
464
|
+
}
|
|
465
|
+
},
|
|
466
|
+
journal: {
|
|
467
|
+
target: "writeConcern",
|
|
468
|
+
transform({ name, options, values: [value] }) {
|
|
469
|
+
const wc = write_concern_1.WriteConcern.fromOptions({ writeConcern: {
|
|
470
|
+
...options.writeConcern,
|
|
471
|
+
journal: getBoolean(name, value)
|
|
472
|
+
} });
|
|
473
|
+
if (!wc) throw new error_1.MongoParseError(`Unable to make a writeConcern from journal=${value}`);
|
|
474
|
+
return wc;
|
|
475
|
+
}
|
|
476
|
+
},
|
|
477
|
+
loadBalanced: {
|
|
478
|
+
default: false,
|
|
479
|
+
type: "boolean"
|
|
480
|
+
},
|
|
481
|
+
localThresholdMS: {
|
|
482
|
+
default: 15,
|
|
483
|
+
type: "uint"
|
|
484
|
+
},
|
|
485
|
+
maxConnecting: {
|
|
486
|
+
default: 2,
|
|
487
|
+
transform({ name, values: [value] }) {
|
|
488
|
+
const maxConnecting = getUIntFromOptions(name, value);
|
|
489
|
+
if (maxConnecting === 0) throw new error_1.MongoInvalidArgumentError("maxConnecting must be > 0 if specified");
|
|
490
|
+
return maxConnecting;
|
|
491
|
+
}
|
|
492
|
+
},
|
|
493
|
+
maxIdleTimeMS: {
|
|
494
|
+
default: 0,
|
|
495
|
+
type: "uint"
|
|
496
|
+
},
|
|
497
|
+
maxPoolSize: {
|
|
498
|
+
default: 100,
|
|
499
|
+
type: "uint"
|
|
500
|
+
},
|
|
501
|
+
maxStalenessSeconds: {
|
|
502
|
+
target: "readPreference",
|
|
503
|
+
transform({ name, options, values: [value] }) {
|
|
504
|
+
const maxStalenessSeconds = getUIntFromOptions(name, value);
|
|
505
|
+
if (options.readPreference) return read_preference_1.ReadPreference.fromOptions({ readPreference: {
|
|
506
|
+
...options.readPreference,
|
|
507
|
+
maxStalenessSeconds
|
|
508
|
+
} });
|
|
509
|
+
else return new read_preference_1.ReadPreference("secondary", void 0, { maxStalenessSeconds });
|
|
510
|
+
}
|
|
511
|
+
},
|
|
512
|
+
minInternalBufferSize: { type: "uint" },
|
|
513
|
+
minPoolSize: {
|
|
514
|
+
default: 0,
|
|
515
|
+
type: "uint"
|
|
516
|
+
},
|
|
517
|
+
minHeartbeatFrequencyMS: {
|
|
518
|
+
default: 500,
|
|
519
|
+
type: "uint"
|
|
520
|
+
},
|
|
521
|
+
monitorCommands: {
|
|
522
|
+
default: false,
|
|
523
|
+
type: "boolean"
|
|
524
|
+
},
|
|
525
|
+
name: {
|
|
526
|
+
target: "driverInfo",
|
|
527
|
+
transform({ values: [value], options }) {
|
|
528
|
+
return {
|
|
529
|
+
...options.driverInfo,
|
|
530
|
+
name: String(value)
|
|
531
|
+
};
|
|
532
|
+
}
|
|
533
|
+
},
|
|
534
|
+
noDelay: {
|
|
535
|
+
default: true,
|
|
536
|
+
type: "boolean"
|
|
537
|
+
},
|
|
538
|
+
pkFactory: {
|
|
539
|
+
default: utils_1.DEFAULT_PK_FACTORY,
|
|
540
|
+
transform({ values: [value] }) {
|
|
541
|
+
if ((0, utils_1.isRecord)(value, ["createPk"]) && typeof value.createPk === "function") return value;
|
|
542
|
+
throw new error_1.MongoParseError(`Option pkFactory must be an object with a createPk function, got ${value}`);
|
|
543
|
+
}
|
|
544
|
+
},
|
|
545
|
+
promoteBuffers: { type: "boolean" },
|
|
546
|
+
promoteLongs: { type: "boolean" },
|
|
547
|
+
promoteValues: { type: "boolean" },
|
|
548
|
+
useBigInt64: { type: "boolean" },
|
|
549
|
+
proxyHost: { type: "string" },
|
|
550
|
+
proxyPassword: { type: "string" },
|
|
551
|
+
proxyPort: { type: "uint" },
|
|
552
|
+
proxyUsername: { type: "string" },
|
|
553
|
+
raw: {
|
|
554
|
+
default: false,
|
|
555
|
+
type: "boolean"
|
|
556
|
+
},
|
|
557
|
+
readConcern: { transform({ values: [value], options }) {
|
|
558
|
+
if (value instanceof read_concern_1.ReadConcern || (0, utils_1.isRecord)(value, ["level"])) return read_concern_1.ReadConcern.fromOptions({
|
|
559
|
+
...options.readConcern,
|
|
560
|
+
...value
|
|
561
|
+
});
|
|
562
|
+
throw new error_1.MongoParseError(`ReadConcern must be an object, got ${JSON.stringify(value)}`);
|
|
563
|
+
} },
|
|
564
|
+
readConcernLevel: {
|
|
565
|
+
target: "readConcern",
|
|
566
|
+
transform({ values: [level], options }) {
|
|
567
|
+
return read_concern_1.ReadConcern.fromOptions({
|
|
568
|
+
...options.readConcern,
|
|
569
|
+
level
|
|
570
|
+
});
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
readPreference: {
|
|
574
|
+
default: read_preference_1.ReadPreference.primary,
|
|
575
|
+
transform({ values: [value], options }) {
|
|
576
|
+
if (value instanceof read_preference_1.ReadPreference) return read_preference_1.ReadPreference.fromOptions({
|
|
577
|
+
readPreference: {
|
|
578
|
+
...options.readPreference,
|
|
579
|
+
...value
|
|
580
|
+
},
|
|
581
|
+
...value
|
|
582
|
+
});
|
|
583
|
+
if ((0, utils_1.isRecord)(value, ["mode"])) {
|
|
584
|
+
const rp = read_preference_1.ReadPreference.fromOptions({
|
|
585
|
+
readPreference: {
|
|
586
|
+
...options.readPreference,
|
|
587
|
+
...value
|
|
588
|
+
},
|
|
589
|
+
...value
|
|
590
|
+
});
|
|
591
|
+
if (rp) return rp;
|
|
592
|
+
else throw new error_1.MongoParseError(`Cannot make read preference from ${JSON.stringify(value)}`);
|
|
593
|
+
}
|
|
594
|
+
if (typeof value === "string") {
|
|
595
|
+
const rpOpts = {
|
|
596
|
+
hedge: options.readPreference?.hedge,
|
|
597
|
+
maxStalenessSeconds: options.readPreference?.maxStalenessSeconds
|
|
598
|
+
};
|
|
599
|
+
return new read_preference_1.ReadPreference(value, options.readPreference?.tags, rpOpts);
|
|
600
|
+
}
|
|
601
|
+
throw new error_1.MongoParseError(`Unknown ReadPreference value: ${value}`);
|
|
602
|
+
}
|
|
603
|
+
},
|
|
604
|
+
readPreferenceTags: {
|
|
605
|
+
target: "readPreference",
|
|
606
|
+
transform({ values, options }) {
|
|
607
|
+
const tags = Array.isArray(values[0]) ? values[0] : values;
|
|
608
|
+
const readPreferenceTags = [];
|
|
609
|
+
for (const tag of tags) {
|
|
610
|
+
const readPreferenceTag = Object.create(null);
|
|
611
|
+
if (typeof tag === "string") for (const [k, v] of entriesFromString(tag)) readPreferenceTag[k] = v;
|
|
612
|
+
if ((0, utils_1.isRecord)(tag)) for (const [k, v] of Object.entries(tag)) readPreferenceTag[k] = v;
|
|
613
|
+
readPreferenceTags.push(readPreferenceTag);
|
|
614
|
+
}
|
|
615
|
+
return read_preference_1.ReadPreference.fromOptions({
|
|
616
|
+
readPreference: options.readPreference,
|
|
617
|
+
readPreferenceTags
|
|
618
|
+
});
|
|
619
|
+
}
|
|
620
|
+
},
|
|
621
|
+
replicaSet: { type: "string" },
|
|
622
|
+
retryReads: {
|
|
623
|
+
default: true,
|
|
624
|
+
type: "boolean"
|
|
625
|
+
},
|
|
626
|
+
retryWrites: {
|
|
627
|
+
default: true,
|
|
628
|
+
type: "boolean"
|
|
629
|
+
},
|
|
630
|
+
serializeFunctions: { type: "boolean" },
|
|
631
|
+
serverMonitoringMode: {
|
|
632
|
+
default: "auto",
|
|
633
|
+
transform({ values: [value] }) {
|
|
634
|
+
if (!Object.values(monitor_1.ServerMonitoringMode).includes(value)) throw new error_1.MongoParseError("serverMonitoringMode must be one of `auto`, `poll`, or `stream`");
|
|
635
|
+
return value;
|
|
636
|
+
}
|
|
637
|
+
},
|
|
638
|
+
serverSelectionTimeoutMS: {
|
|
639
|
+
default: 3e4,
|
|
640
|
+
type: "uint"
|
|
641
|
+
},
|
|
642
|
+
servername: { type: "string" },
|
|
643
|
+
socketTimeoutMS: {
|
|
644
|
+
default: 0,
|
|
645
|
+
type: "uint"
|
|
646
|
+
},
|
|
647
|
+
srvMaxHosts: {
|
|
648
|
+
type: "uint",
|
|
649
|
+
default: 0
|
|
650
|
+
},
|
|
651
|
+
srvServiceName: {
|
|
652
|
+
type: "string",
|
|
653
|
+
default: "mongodb"
|
|
654
|
+
},
|
|
655
|
+
ssl: {
|
|
656
|
+
target: "tls",
|
|
657
|
+
type: "boolean"
|
|
658
|
+
},
|
|
659
|
+
timeoutMS: { type: "uint" },
|
|
660
|
+
tls: { type: "boolean" },
|
|
661
|
+
tlsAllowInvalidCertificates: {
|
|
662
|
+
target: "rejectUnauthorized",
|
|
663
|
+
transform({ name, values: [value] }) {
|
|
664
|
+
return !getBoolean(name, value);
|
|
665
|
+
}
|
|
666
|
+
},
|
|
667
|
+
tlsAllowInvalidHostnames: {
|
|
668
|
+
target: "checkServerIdentity",
|
|
669
|
+
transform({ name, values: [value] }) {
|
|
670
|
+
return getBoolean(name, value) ? () => void 0 : void 0;
|
|
671
|
+
}
|
|
672
|
+
},
|
|
673
|
+
tlsCAFile: { type: "string" },
|
|
674
|
+
tlsCRLFile: { type: "string" },
|
|
675
|
+
tlsCertificateKeyFile: { type: "string" },
|
|
676
|
+
tlsCertificateKeyFilePassword: {
|
|
677
|
+
target: "passphrase",
|
|
678
|
+
type: "any"
|
|
679
|
+
},
|
|
680
|
+
tlsInsecure: { transform({ name, options, values: [value] }) {
|
|
681
|
+
const tlsInsecure = getBoolean(name, value);
|
|
682
|
+
if (tlsInsecure) {
|
|
683
|
+
options.checkServerIdentity = () => void 0;
|
|
684
|
+
options.rejectUnauthorized = false;
|
|
685
|
+
} else {
|
|
686
|
+
options.checkServerIdentity = options.tlsAllowInvalidHostnames ? () => void 0 : void 0;
|
|
687
|
+
options.rejectUnauthorized = options.tlsAllowInvalidCertificates ? false : true;
|
|
688
|
+
}
|
|
689
|
+
return tlsInsecure;
|
|
690
|
+
} },
|
|
691
|
+
w: {
|
|
692
|
+
target: "writeConcern",
|
|
693
|
+
transform({ values: [value], options }) {
|
|
694
|
+
return write_concern_1.WriteConcern.fromOptions({ writeConcern: {
|
|
695
|
+
...options.writeConcern,
|
|
696
|
+
w: value
|
|
697
|
+
} });
|
|
698
|
+
}
|
|
699
|
+
},
|
|
700
|
+
waitQueueTimeoutMS: {
|
|
701
|
+
default: 0,
|
|
702
|
+
type: "uint"
|
|
703
|
+
},
|
|
704
|
+
writeConcern: {
|
|
705
|
+
target: "writeConcern",
|
|
706
|
+
transform({ values: [value], options }) {
|
|
707
|
+
if ((0, utils_1.isRecord)(value) || value instanceof write_concern_1.WriteConcern) return write_concern_1.WriteConcern.fromOptions({ writeConcern: {
|
|
708
|
+
...options.writeConcern,
|
|
709
|
+
...value
|
|
710
|
+
} });
|
|
711
|
+
else if (value === "majority" || typeof value === "number") return write_concern_1.WriteConcern.fromOptions({ writeConcern: {
|
|
712
|
+
...options.writeConcern,
|
|
713
|
+
w: value
|
|
714
|
+
} });
|
|
715
|
+
throw new error_1.MongoParseError(`Invalid WriteConcern cannot parse: ${JSON.stringify(value)}`);
|
|
716
|
+
}
|
|
717
|
+
},
|
|
718
|
+
wtimeout: {
|
|
719
|
+
deprecated: "Please use wtimeoutMS instead",
|
|
720
|
+
target: "writeConcern",
|
|
721
|
+
transform({ values: [value], options }) {
|
|
722
|
+
const wc = write_concern_1.WriteConcern.fromOptions({ writeConcern: {
|
|
723
|
+
...options.writeConcern,
|
|
724
|
+
wtimeout: getUIntFromOptions("wtimeout", value)
|
|
725
|
+
} });
|
|
726
|
+
if (wc) return wc;
|
|
727
|
+
throw new error_1.MongoParseError(`Cannot make WriteConcern from wtimeout`);
|
|
728
|
+
}
|
|
729
|
+
},
|
|
730
|
+
wtimeoutMS: {
|
|
731
|
+
target: "writeConcern",
|
|
732
|
+
transform({ values: [value], options }) {
|
|
733
|
+
const wc = write_concern_1.WriteConcern.fromOptions({ writeConcern: {
|
|
734
|
+
...options.writeConcern,
|
|
735
|
+
wtimeoutMS: getUIntFromOptions("wtimeoutMS", value)
|
|
736
|
+
} });
|
|
737
|
+
if (wc) return wc;
|
|
738
|
+
throw new error_1.MongoParseError(`Cannot make WriteConcern from wtimeout`);
|
|
739
|
+
}
|
|
740
|
+
},
|
|
741
|
+
zlibCompressionLevel: {
|
|
742
|
+
default: 0,
|
|
743
|
+
type: "int"
|
|
744
|
+
},
|
|
745
|
+
mongodbLogPath: { transform({ values: [value] }) {
|
|
746
|
+
if (!(typeof value === "string" && ["stderr", "stdout"].includes(value) || value && typeof value === "object" && "write" in value && typeof value.write === "function")) throw new error_1.MongoAPIError(`Option 'mongodbLogPath' must be of type 'stderr' | 'stdout' | MongoDBLogWritable`);
|
|
747
|
+
return value;
|
|
748
|
+
} },
|
|
749
|
+
mongodbLogComponentSeverities: { transform({ values: [value] }) {
|
|
750
|
+
if (typeof value !== "object" || !value) throw new error_1.MongoAPIError(`Option 'mongodbLogComponentSeverities' must be a non-null object`);
|
|
751
|
+
for (const [k, v] of Object.entries(value)) {
|
|
752
|
+
if (typeof v !== "string" || typeof k !== "string") throw new error_1.MongoAPIError(`User input for option 'mongodbLogComponentSeverities' object cannot include a non-string key or value`);
|
|
753
|
+
if (!Object.values(mongo_logger_1.MongoLoggableComponent).some((val) => val === k) && k !== "default") throw new error_1.MongoAPIError(`User input for option 'mongodbLogComponentSeverities' contains invalid key: ${k}`);
|
|
754
|
+
if (!Object.values(mongo_logger_1.SeverityLevel).some((val) => val === v)) throw new error_1.MongoAPIError(`Option 'mongodbLogComponentSeverities' does not support ${v} as a value for ${k}`);
|
|
755
|
+
}
|
|
756
|
+
return value;
|
|
757
|
+
} },
|
|
758
|
+
mongodbLogMaxDocumentLength: { type: "uint" },
|
|
759
|
+
connectionType: { type: "any" },
|
|
760
|
+
srvPoller: { type: "any" },
|
|
761
|
+
allowPartialTrustChain: { type: "any" },
|
|
762
|
+
minDHSize: { type: "any" },
|
|
763
|
+
pskCallback: { type: "any" },
|
|
764
|
+
secureContext: { type: "any" },
|
|
765
|
+
enableTrace: { type: "any" },
|
|
766
|
+
requestCert: { type: "any" },
|
|
767
|
+
rejectUnauthorized: { type: "any" },
|
|
768
|
+
checkServerIdentity: { type: "any" },
|
|
769
|
+
keepAliveInitialDelay: { type: "any" },
|
|
770
|
+
ALPNProtocols: { type: "any" },
|
|
771
|
+
SNICallback: { type: "any" },
|
|
772
|
+
session: { type: "any" },
|
|
773
|
+
requestOCSP: { type: "any" },
|
|
774
|
+
localAddress: { type: "any" },
|
|
775
|
+
localPort: { type: "any" },
|
|
776
|
+
hints: { type: "any" },
|
|
777
|
+
lookup: { type: "any" },
|
|
778
|
+
ca: { type: "any" },
|
|
779
|
+
cert: { type: "any" },
|
|
780
|
+
ciphers: { type: "any" },
|
|
781
|
+
crl: { type: "any" },
|
|
782
|
+
ecdhCurve: { type: "any" },
|
|
783
|
+
key: { type: "any" },
|
|
784
|
+
passphrase: { type: "any" },
|
|
785
|
+
pfx: { type: "any" },
|
|
786
|
+
secureProtocol: { type: "any" },
|
|
787
|
+
index: { type: "any" },
|
|
788
|
+
useNewUrlParser: {
|
|
789
|
+
type: "boolean",
|
|
790
|
+
deprecated: "useNewUrlParser has no effect since Node.js Driver version 4.0.0 and will be removed in the next major version"
|
|
791
|
+
},
|
|
792
|
+
useUnifiedTopology: {
|
|
793
|
+
type: "boolean",
|
|
794
|
+
deprecated: "useUnifiedTopology has no effect since Node.js Driver version 4.0.0 and will be removed in the next major version"
|
|
795
|
+
},
|
|
796
|
+
__skipPingOnConnect: { type: "boolean" }
|
|
797
|
+
};
|
|
798
|
+
exports.DEFAULT_OPTIONS = new CaseInsensitiveMap(Object.entries(exports.OPTIONS).filter(([, descriptor]) => descriptor.default != null).map(([k, d]) => [k, d.default]));
|
|
799
|
+
}));
|
|
800
|
+
|
|
801
|
+
//#endregion
|
|
802
|
+
export default require_connection_string();
|
|
803
|
+
|
|
804
|
+
export { require_connection_string };
|
|
805
|
+
//# sourceMappingURL=connection_string.mjs.map
|