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.
- 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/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 +1 -39
package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection.mjs
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
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 "./common.mjs";
|
|
5
|
+
|
|
6
|
+
//#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection.js
|
|
7
|
+
var require_server_selection = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.MIN_SECONDARY_WRITE_WIRE_VERSION = void 0;
|
|
10
|
+
exports.writableServerSelector = writableServerSelector;
|
|
11
|
+
exports.sameServerSelector = sameServerSelector;
|
|
12
|
+
exports.secondaryWritableServerSelector = secondaryWritableServerSelector;
|
|
13
|
+
exports.readPreferenceServerSelector = readPreferenceServerSelector;
|
|
14
|
+
const error_1 = require_error();
|
|
15
|
+
const read_preference_1 = require_read_preference();
|
|
16
|
+
const common_1 = require_common();
|
|
17
|
+
const IDLE_WRITE_PERIOD = 1e4;
|
|
18
|
+
const SMALLEST_MAX_STALENESS_SECONDS = 90;
|
|
19
|
+
exports.MIN_SECONDARY_WRITE_WIRE_VERSION = 13;
|
|
20
|
+
/**
|
|
21
|
+
* Returns a server selector that selects for writable servers
|
|
22
|
+
*/
|
|
23
|
+
function writableServerSelector() {
|
|
24
|
+
return function writableServer(topologyDescription, servers) {
|
|
25
|
+
return latencyWindowReducer(topologyDescription, servers.filter((s) => s.isWritable));
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The purpose of this selector is to select the same server, only
|
|
30
|
+
* if it is in a state that it can have commands sent to it.
|
|
31
|
+
*/
|
|
32
|
+
function sameServerSelector(description) {
|
|
33
|
+
return function sameServerSelector(topologyDescription, servers) {
|
|
34
|
+
if (!description) return [];
|
|
35
|
+
return servers.filter((sd) => {
|
|
36
|
+
return sd.address === description.address && sd.type !== common_1.ServerType.Unknown;
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Returns a server selector that uses a read preference to select a
|
|
42
|
+
* server potentially for a write on a secondary.
|
|
43
|
+
*/
|
|
44
|
+
function secondaryWritableServerSelector(wireVersion, readPreference) {
|
|
45
|
+
if (!readPreference || !wireVersion || wireVersion && wireVersion < exports.MIN_SECONDARY_WRITE_WIRE_VERSION) return readPreferenceServerSelector(read_preference_1.ReadPreference.primary);
|
|
46
|
+
return readPreferenceServerSelector(readPreference);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Reduces the passed in array of servers by the rules of the "Max Staleness" specification
|
|
50
|
+
* found here:
|
|
51
|
+
*
|
|
52
|
+
* @see https://github.com/mongodb/specifications/blob/master/source/max-staleness/max-staleness.md
|
|
53
|
+
*
|
|
54
|
+
* @param readPreference - The read preference providing max staleness guidance
|
|
55
|
+
* @param topologyDescription - The topology description
|
|
56
|
+
* @param servers - The list of server descriptions to be reduced
|
|
57
|
+
* @returns The list of servers that satisfy the requirements of max staleness
|
|
58
|
+
*/
|
|
59
|
+
function maxStalenessReducer(readPreference, topologyDescription, servers) {
|
|
60
|
+
if (readPreference.maxStalenessSeconds == null || readPreference.maxStalenessSeconds < 0) return servers;
|
|
61
|
+
const maxStaleness = readPreference.maxStalenessSeconds;
|
|
62
|
+
const maxStalenessVariance = (topologyDescription.heartbeatFrequencyMS + IDLE_WRITE_PERIOD) / 1e3;
|
|
63
|
+
if (maxStaleness < maxStalenessVariance) throw new error_1.MongoInvalidArgumentError(`Option "maxStalenessSeconds" must be at least ${maxStalenessVariance} seconds`);
|
|
64
|
+
if (maxStaleness < SMALLEST_MAX_STALENESS_SECONDS) throw new error_1.MongoInvalidArgumentError(`Option "maxStalenessSeconds" must be at least ${SMALLEST_MAX_STALENESS_SECONDS} seconds`);
|
|
65
|
+
if (topologyDescription.type === common_1.TopologyType.ReplicaSetWithPrimary) {
|
|
66
|
+
const primary = Array.from(topologyDescription.servers.values()).filter(primaryFilter)[0];
|
|
67
|
+
return servers.reduce((result, server) => {
|
|
68
|
+
if ((server.lastUpdateTime - server.lastWriteDate - (primary.lastUpdateTime - primary.lastWriteDate) + topologyDescription.heartbeatFrequencyMS) / 1e3 <= (readPreference.maxStalenessSeconds ?? 0)) result.push(server);
|
|
69
|
+
return result;
|
|
70
|
+
}, []);
|
|
71
|
+
}
|
|
72
|
+
if (topologyDescription.type === common_1.TopologyType.ReplicaSetNoPrimary) {
|
|
73
|
+
if (servers.length === 0) return servers;
|
|
74
|
+
const sMax = servers.reduce((max, s) => s.lastWriteDate > max.lastWriteDate ? s : max);
|
|
75
|
+
return servers.reduce((result, server) => {
|
|
76
|
+
if ((sMax.lastWriteDate - server.lastWriteDate + topologyDescription.heartbeatFrequencyMS) / 1e3 <= (readPreference.maxStalenessSeconds ?? 0)) result.push(server);
|
|
77
|
+
return result;
|
|
78
|
+
}, []);
|
|
79
|
+
}
|
|
80
|
+
return servers;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Determines whether a server's tags match a given set of tags
|
|
84
|
+
*
|
|
85
|
+
* @param tagSet - The requested tag set to match
|
|
86
|
+
* @param serverTags - The server's tags
|
|
87
|
+
*/
|
|
88
|
+
function tagSetMatch(tagSet, serverTags) {
|
|
89
|
+
const keys = Object.keys(tagSet);
|
|
90
|
+
const serverTagKeys = Object.keys(serverTags);
|
|
91
|
+
for (let i = 0; i < keys.length; ++i) {
|
|
92
|
+
const key = keys[i];
|
|
93
|
+
if (serverTagKeys.indexOf(key) === -1 || serverTags[key] !== tagSet[key]) return false;
|
|
94
|
+
}
|
|
95
|
+
return true;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Reduces a set of server descriptions based on tags requested by the read preference
|
|
99
|
+
*
|
|
100
|
+
* @param readPreference - The read preference providing the requested tags
|
|
101
|
+
* @param servers - The list of server descriptions to reduce
|
|
102
|
+
* @returns The list of servers matching the requested tags
|
|
103
|
+
*/
|
|
104
|
+
function tagSetReducer(readPreference, servers) {
|
|
105
|
+
if (readPreference.tags == null || Array.isArray(readPreference.tags) && readPreference.tags.length === 0) return servers;
|
|
106
|
+
for (let i = 0; i < readPreference.tags.length; ++i) {
|
|
107
|
+
const tagSet = readPreference.tags[i];
|
|
108
|
+
const serversMatchingTagset = servers.reduce((matched, server) => {
|
|
109
|
+
if (tagSetMatch(tagSet, server.tags)) matched.push(server);
|
|
110
|
+
return matched;
|
|
111
|
+
}, []);
|
|
112
|
+
if (serversMatchingTagset.length) return serversMatchingTagset;
|
|
113
|
+
}
|
|
114
|
+
return [];
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Reduces a list of servers to ensure they fall within an acceptable latency window. This is
|
|
118
|
+
* further specified in the "Server Selection" specification, found here:
|
|
119
|
+
*
|
|
120
|
+
* @see https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.md
|
|
121
|
+
*
|
|
122
|
+
* @param topologyDescription - The topology description
|
|
123
|
+
* @param servers - The list of servers to reduce
|
|
124
|
+
* @returns The servers which fall within an acceptable latency window
|
|
125
|
+
*/
|
|
126
|
+
function latencyWindowReducer(topologyDescription, servers) {
|
|
127
|
+
const low = servers.reduce((min, server) => Math.min(server.roundTripTime, min), Infinity);
|
|
128
|
+
const high = low + topologyDescription.localThresholdMS;
|
|
129
|
+
return servers.reduce((result, server) => {
|
|
130
|
+
if (server.roundTripTime <= high && server.roundTripTime >= low) result.push(server);
|
|
131
|
+
return result;
|
|
132
|
+
}, []);
|
|
133
|
+
}
|
|
134
|
+
function primaryFilter(server) {
|
|
135
|
+
return server.type === common_1.ServerType.RSPrimary;
|
|
136
|
+
}
|
|
137
|
+
function secondaryFilter(server) {
|
|
138
|
+
return server.type === common_1.ServerType.RSSecondary;
|
|
139
|
+
}
|
|
140
|
+
function nearestFilter(server) {
|
|
141
|
+
return server.type === common_1.ServerType.RSSecondary || server.type === common_1.ServerType.RSPrimary;
|
|
142
|
+
}
|
|
143
|
+
function knownFilter(server) {
|
|
144
|
+
return server.type !== common_1.ServerType.Unknown;
|
|
145
|
+
}
|
|
146
|
+
function loadBalancerFilter(server) {
|
|
147
|
+
return server.type === common_1.ServerType.LoadBalancer;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Returns a function which selects servers based on a provided read preference
|
|
151
|
+
*
|
|
152
|
+
* @param readPreference - The read preference to select with
|
|
153
|
+
*/
|
|
154
|
+
function readPreferenceServerSelector(readPreference) {
|
|
155
|
+
if (!readPreference.isValid()) throw new error_1.MongoInvalidArgumentError("Invalid read preference specified");
|
|
156
|
+
return function readPreferenceServers(topologyDescription, servers, deprioritized = []) {
|
|
157
|
+
if (topologyDescription.type === common_1.TopologyType.LoadBalanced) return servers.filter(loadBalancerFilter);
|
|
158
|
+
if (topologyDescription.type === common_1.TopologyType.Unknown) return [];
|
|
159
|
+
if (topologyDescription.type === common_1.TopologyType.Single) return latencyWindowReducer(topologyDescription, servers.filter(knownFilter));
|
|
160
|
+
if (topologyDescription.type === common_1.TopologyType.Sharded) {
|
|
161
|
+
const filtered = servers.filter((server) => {
|
|
162
|
+
return !deprioritized.includes(server);
|
|
163
|
+
});
|
|
164
|
+
return latencyWindowReducer(topologyDescription, (filtered.length > 0 ? filtered : deprioritized).filter(knownFilter));
|
|
165
|
+
}
|
|
166
|
+
const mode = readPreference.mode;
|
|
167
|
+
if (mode === read_preference_1.ReadPreference.PRIMARY) return servers.filter(primaryFilter);
|
|
168
|
+
if (mode === read_preference_1.ReadPreference.PRIMARY_PREFERRED) {
|
|
169
|
+
const result = servers.filter(primaryFilter);
|
|
170
|
+
if (result.length) return result;
|
|
171
|
+
}
|
|
172
|
+
const filter = mode === read_preference_1.ReadPreference.NEAREST ? nearestFilter : secondaryFilter;
|
|
173
|
+
const selectedServers = latencyWindowReducer(topologyDescription, tagSetReducer(readPreference, maxStalenessReducer(readPreference, topologyDescription, servers.filter(filter))));
|
|
174
|
+
if (mode === read_preference_1.ReadPreference.SECONDARY_PREFERRED && selectedServers.length === 0) return servers.filter(primaryFilter);
|
|
175
|
+
return selectedServers;
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
}));
|
|
179
|
+
|
|
180
|
+
//#endregion
|
|
181
|
+
export default require_server_selection();
|
|
182
|
+
|
|
183
|
+
export { require_server_selection };
|
|
184
|
+
//# sourceMappingURL=server_selection.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server_selection.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MIN_SECONDARY_WRITE_WIRE_VERSION = void 0;\nexports.writableServerSelector = writableServerSelector;\nexports.sameServerSelector = sameServerSelector;\nexports.secondaryWritableServerSelector = secondaryWritableServerSelector;\nexports.readPreferenceServerSelector = readPreferenceServerSelector;\nconst error_1 = require(\"../error\");\nconst read_preference_1 = require(\"../read_preference\");\nconst common_1 = require(\"./common\");\n// max staleness constants\nconst IDLE_WRITE_PERIOD = 10000;\nconst SMALLEST_MAX_STALENESS_SECONDS = 90;\n// Minimum version to try writes on secondaries.\nexports.MIN_SECONDARY_WRITE_WIRE_VERSION = 13;\n/**\n * Returns a server selector that selects for writable servers\n */\nfunction writableServerSelector() {\n return function writableServer(topologyDescription, servers) {\n return latencyWindowReducer(topologyDescription, servers.filter((s) => s.isWritable));\n };\n}\n/**\n * The purpose of this selector is to select the same server, only\n * if it is in a state that it can have commands sent to it.\n */\nfunction sameServerSelector(description) {\n return function sameServerSelector(topologyDescription, servers) {\n if (!description)\n return [];\n // Filter the servers to match the provided description only if\n // the type is not unknown.\n return servers.filter(sd => {\n return sd.address === description.address && sd.type !== common_1.ServerType.Unknown;\n });\n };\n}\n/**\n * Returns a server selector that uses a read preference to select a\n * server potentially for a write on a secondary.\n */\nfunction secondaryWritableServerSelector(wireVersion, readPreference) {\n // If server version < 5.0, read preference always primary.\n // If server version >= 5.0...\n // - If read preference is supplied, use that.\n // - If no read preference is supplied, use primary.\n if (!readPreference ||\n !wireVersion ||\n (wireVersion && wireVersion < exports.MIN_SECONDARY_WRITE_WIRE_VERSION)) {\n return readPreferenceServerSelector(read_preference_1.ReadPreference.primary);\n }\n return readPreferenceServerSelector(readPreference);\n}\n/**\n * Reduces the passed in array of servers by the rules of the \"Max Staleness\" specification\n * found here:\n *\n * @see https://github.com/mongodb/specifications/blob/master/source/max-staleness/max-staleness.md\n *\n * @param readPreference - The read preference providing max staleness guidance\n * @param topologyDescription - The topology description\n * @param servers - The list of server descriptions to be reduced\n * @returns The list of servers that satisfy the requirements of max staleness\n */\nfunction maxStalenessReducer(readPreference, topologyDescription, servers) {\n if (readPreference.maxStalenessSeconds == null || readPreference.maxStalenessSeconds < 0) {\n return servers;\n }\n const maxStaleness = readPreference.maxStalenessSeconds;\n const maxStalenessVariance = (topologyDescription.heartbeatFrequencyMS + IDLE_WRITE_PERIOD) / 1000;\n if (maxStaleness < maxStalenessVariance) {\n throw new error_1.MongoInvalidArgumentError(`Option \"maxStalenessSeconds\" must be at least ${maxStalenessVariance} seconds`);\n }\n if (maxStaleness < SMALLEST_MAX_STALENESS_SECONDS) {\n throw new error_1.MongoInvalidArgumentError(`Option \"maxStalenessSeconds\" must be at least ${SMALLEST_MAX_STALENESS_SECONDS} seconds`);\n }\n if (topologyDescription.type === common_1.TopologyType.ReplicaSetWithPrimary) {\n const primary = Array.from(topologyDescription.servers.values()).filter(primaryFilter)[0];\n return servers.reduce((result, server) => {\n const stalenessMS = server.lastUpdateTime -\n server.lastWriteDate -\n (primary.lastUpdateTime - primary.lastWriteDate) +\n topologyDescription.heartbeatFrequencyMS;\n const staleness = stalenessMS / 1000;\n const maxStalenessSeconds = readPreference.maxStalenessSeconds ?? 0;\n if (staleness <= maxStalenessSeconds) {\n result.push(server);\n }\n return result;\n }, []);\n }\n if (topologyDescription.type === common_1.TopologyType.ReplicaSetNoPrimary) {\n if (servers.length === 0) {\n return servers;\n }\n const sMax = servers.reduce((max, s) => s.lastWriteDate > max.lastWriteDate ? s : max);\n return servers.reduce((result, server) => {\n const stalenessMS = sMax.lastWriteDate - server.lastWriteDate + topologyDescription.heartbeatFrequencyMS;\n const staleness = stalenessMS / 1000;\n const maxStalenessSeconds = readPreference.maxStalenessSeconds ?? 0;\n if (staleness <= maxStalenessSeconds) {\n result.push(server);\n }\n return result;\n }, []);\n }\n return servers;\n}\n/**\n * Determines whether a server's tags match a given set of tags\n *\n * @param tagSet - The requested tag set to match\n * @param serverTags - The server's tags\n */\nfunction tagSetMatch(tagSet, serverTags) {\n const keys = Object.keys(tagSet);\n const serverTagKeys = Object.keys(serverTags);\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i];\n if (serverTagKeys.indexOf(key) === -1 || serverTags[key] !== tagSet[key]) {\n return false;\n }\n }\n return true;\n}\n/**\n * Reduces a set of server descriptions based on tags requested by the read preference\n *\n * @param readPreference - The read preference providing the requested tags\n * @param servers - The list of server descriptions to reduce\n * @returns The list of servers matching the requested tags\n */\nfunction tagSetReducer(readPreference, servers) {\n if (readPreference.tags == null ||\n (Array.isArray(readPreference.tags) && readPreference.tags.length === 0)) {\n return servers;\n }\n for (let i = 0; i < readPreference.tags.length; ++i) {\n const tagSet = readPreference.tags[i];\n const serversMatchingTagset = servers.reduce((matched, server) => {\n if (tagSetMatch(tagSet, server.tags))\n matched.push(server);\n return matched;\n }, []);\n if (serversMatchingTagset.length) {\n return serversMatchingTagset;\n }\n }\n return [];\n}\n/**\n * Reduces a list of servers to ensure they fall within an acceptable latency window. This is\n * further specified in the \"Server Selection\" specification, found here:\n *\n * @see https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.md\n *\n * @param topologyDescription - The topology description\n * @param servers - The list of servers to reduce\n * @returns The servers which fall within an acceptable latency window\n */\nfunction latencyWindowReducer(topologyDescription, servers) {\n const low = servers.reduce((min, server) => Math.min(server.roundTripTime, min), Infinity);\n const high = low + topologyDescription.localThresholdMS;\n return servers.reduce((result, server) => {\n if (server.roundTripTime <= high && server.roundTripTime >= low)\n result.push(server);\n return result;\n }, []);\n}\n// filters\nfunction primaryFilter(server) {\n return server.type === common_1.ServerType.RSPrimary;\n}\nfunction secondaryFilter(server) {\n return server.type === common_1.ServerType.RSSecondary;\n}\nfunction nearestFilter(server) {\n return server.type === common_1.ServerType.RSSecondary || server.type === common_1.ServerType.RSPrimary;\n}\nfunction knownFilter(server) {\n return server.type !== common_1.ServerType.Unknown;\n}\nfunction loadBalancerFilter(server) {\n return server.type === common_1.ServerType.LoadBalancer;\n}\n/**\n * Returns a function which selects servers based on a provided read preference\n *\n * @param readPreference - The read preference to select with\n */\nfunction readPreferenceServerSelector(readPreference) {\n if (!readPreference.isValid()) {\n throw new error_1.MongoInvalidArgumentError('Invalid read preference specified');\n }\n return function readPreferenceServers(topologyDescription, servers, deprioritized = []) {\n if (topologyDescription.type === common_1.TopologyType.LoadBalanced) {\n return servers.filter(loadBalancerFilter);\n }\n if (topologyDescription.type === common_1.TopologyType.Unknown) {\n return [];\n }\n if (topologyDescription.type === common_1.TopologyType.Single) {\n return latencyWindowReducer(topologyDescription, servers.filter(knownFilter));\n }\n if (topologyDescription.type === common_1.TopologyType.Sharded) {\n const filtered = servers.filter(server => {\n return !deprioritized.includes(server);\n });\n const selectable = filtered.length > 0 ? filtered : deprioritized;\n return latencyWindowReducer(topologyDescription, selectable.filter(knownFilter));\n }\n const mode = readPreference.mode;\n if (mode === read_preference_1.ReadPreference.PRIMARY) {\n return servers.filter(primaryFilter);\n }\n if (mode === read_preference_1.ReadPreference.PRIMARY_PREFERRED) {\n const result = servers.filter(primaryFilter);\n if (result.length) {\n return result;\n }\n }\n const filter = mode === read_preference_1.ReadPreference.NEAREST ? nearestFilter : secondaryFilter;\n const selectedServers = latencyWindowReducer(topologyDescription, tagSetReducer(readPreference, maxStalenessReducer(readPreference, topologyDescription, servers.filter(filter))));\n if (mode === read_preference_1.ReadPreference.SECONDARY_PREFERRED && selectedServers.length === 0) {\n return servers.filter(primaryFilter);\n }\n return selectedServers;\n };\n}\n//# sourceMappingURL=server_selection.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;AACA,QAAO,eAAe,SAAS,cAAc,EAAE,OAAO,MAAM,CAAC;AAC7D,SAAQ,mCAAmC,KAAK;AAChD,SAAQ,yBAAyB;AACjC,SAAQ,qBAAqB;AAC7B,SAAQ,kCAAkC;AAC1C,SAAQ,+BAA+B;CACvC,MAAM;CACN,MAAM;CACN,MAAM;CAEN,MAAM,oBAAoB;CAC1B,MAAM,iCAAiC;AAEvC,SAAQ,mCAAmC;;;;CAI3C,SAAS,yBAAyB;AAC9B,SAAO,SAAS,eAAe,qBAAqB,SAAS;AACzD,UAAO,qBAAqB,qBAAqB,QAAQ,QAAQ,MAAM,EAAE,WAAW,CAAC;;;;;;;CAO7F,SAAS,mBAAmB,aAAa;AACrC,SAAO,SAAS,mBAAmB,qBAAqB,SAAS;AAC7D,OAAI,CAAC,YACD,QAAO,EAAE;AAGb,UAAO,QAAQ,QAAO,OAAM;AACxB,WAAO,GAAG,YAAY,YAAY,WAAW,GAAG,SAAS,SAAS,WAAW;KAC/E;;;;;;;CAOV,SAAS,gCAAgC,aAAa,gBAAgB;AAKlE,MAAI,CAAC,kBACD,CAAC,eACA,eAAe,cAAc,QAAQ,iCACtC,QAAO,6BAA6B,kBAAkB,eAAe,QAAQ;AAEjF,SAAO,6BAA6B,eAAe;;;;;;;;;;;;;CAavD,SAAS,oBAAoB,gBAAgB,qBAAqB,SAAS;AACvE,MAAI,eAAe,uBAAuB,QAAQ,eAAe,sBAAsB,EACnF,QAAO;EAEX,MAAM,eAAe,eAAe;EACpC,MAAM,wBAAwB,oBAAoB,uBAAuB,qBAAqB;AAC9F,MAAI,eAAe,qBACf,OAAM,IAAI,QAAQ,0BAA0B,iDAAiD,qBAAqB,UAAU;AAEhI,MAAI,eAAe,+BACf,OAAM,IAAI,QAAQ,0BAA0B,iDAAiD,+BAA+B,UAAU;AAE1I,MAAI,oBAAoB,SAAS,SAAS,aAAa,uBAAuB;GAC1E,MAAM,UAAU,MAAM,KAAK,oBAAoB,QAAQ,QAAQ,CAAC,CAAC,OAAO,cAAc,CAAC;AACvF,UAAO,QAAQ,QAAQ,QAAQ,WAAW;AAOtC,SANoB,OAAO,iBACvB,OAAO,iBACN,QAAQ,iBAAiB,QAAQ,iBAClC,oBAAoB,wBACQ,QACJ,eAAe,uBAAuB,GAE9D,QAAO,KAAK,OAAO;AAEvB,WAAO;MACR,EAAE,CAAC;;AAEV,MAAI,oBAAoB,SAAS,SAAS,aAAa,qBAAqB;AACxE,OAAI,QAAQ,WAAW,EACnB,QAAO;GAEX,MAAM,OAAO,QAAQ,QAAQ,KAAK,MAAM,EAAE,gBAAgB,IAAI,gBAAgB,IAAI,IAAI;AACtF,UAAO,QAAQ,QAAQ,QAAQ,WAAW;AAItC,SAHoB,KAAK,gBAAgB,OAAO,gBAAgB,oBAAoB,wBACpD,QACJ,eAAe,uBAAuB,GAE9D,QAAO,KAAK,OAAO;AAEvB,WAAO;MACR,EAAE,CAAC;;AAEV,SAAO;;;;;;;;CAQX,SAAS,YAAY,QAAQ,YAAY;EACrC,MAAM,OAAO,OAAO,KAAK,OAAO;EAChC,MAAM,gBAAgB,OAAO,KAAK,WAAW;AAC7C,OAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,EAAE,GAAG;GAClC,MAAM,MAAM,KAAK;AACjB,OAAI,cAAc,QAAQ,IAAI,KAAK,MAAM,WAAW,SAAS,OAAO,KAChE,QAAO;;AAGf,SAAO;;;;;;;;;CASX,SAAS,cAAc,gBAAgB,SAAS;AAC5C,MAAI,eAAe,QAAQ,QACtB,MAAM,QAAQ,eAAe,KAAK,IAAI,eAAe,KAAK,WAAW,EACtE,QAAO;AAEX,OAAK,IAAI,IAAI,GAAG,IAAI,eAAe,KAAK,QAAQ,EAAE,GAAG;GACjD,MAAM,SAAS,eAAe,KAAK;GACnC,MAAM,wBAAwB,QAAQ,QAAQ,SAAS,WAAW;AAC9D,QAAI,YAAY,QAAQ,OAAO,KAAK,CAChC,SAAQ,KAAK,OAAO;AACxB,WAAO;MACR,EAAE,CAAC;AACN,OAAI,sBAAsB,OACtB,QAAO;;AAGf,SAAO,EAAE;;;;;;;;;;;;CAYb,SAAS,qBAAqB,qBAAqB,SAAS;EACxD,MAAM,MAAM,QAAQ,QAAQ,KAAK,WAAW,KAAK,IAAI,OAAO,eAAe,IAAI,EAAE,SAAS;EAC1F,MAAM,OAAO,MAAM,oBAAoB;AACvC,SAAO,QAAQ,QAAQ,QAAQ,WAAW;AACtC,OAAI,OAAO,iBAAiB,QAAQ,OAAO,iBAAiB,IACxD,QAAO,KAAK,OAAO;AACvB,UAAO;KACR,EAAE,CAAC;;CAGV,SAAS,cAAc,QAAQ;AAC3B,SAAO,OAAO,SAAS,SAAS,WAAW;;CAE/C,SAAS,gBAAgB,QAAQ;AAC7B,SAAO,OAAO,SAAS,SAAS,WAAW;;CAE/C,SAAS,cAAc,QAAQ;AAC3B,SAAO,OAAO,SAAS,SAAS,WAAW,eAAe,OAAO,SAAS,SAAS,WAAW;;CAElG,SAAS,YAAY,QAAQ;AACzB,SAAO,OAAO,SAAS,SAAS,WAAW;;CAE/C,SAAS,mBAAmB,QAAQ;AAChC,SAAO,OAAO,SAAS,SAAS,WAAW;;;;;;;CAO/C,SAAS,6BAA6B,gBAAgB;AAClD,MAAI,CAAC,eAAe,SAAS,CACzB,OAAM,IAAI,QAAQ,0BAA0B,oCAAoC;AAEpF,SAAO,SAAS,sBAAsB,qBAAqB,SAAS,gBAAgB,EAAE,EAAE;AACpF,OAAI,oBAAoB,SAAS,SAAS,aAAa,aACnD,QAAO,QAAQ,OAAO,mBAAmB;AAE7C,OAAI,oBAAoB,SAAS,SAAS,aAAa,QACnD,QAAO,EAAE;AAEb,OAAI,oBAAoB,SAAS,SAAS,aAAa,OACnD,QAAO,qBAAqB,qBAAqB,QAAQ,OAAO,YAAY,CAAC;AAEjF,OAAI,oBAAoB,SAAS,SAAS,aAAa,SAAS;IAC5D,MAAM,WAAW,QAAQ,QAAO,WAAU;AACtC,YAAO,CAAC,cAAc,SAAS,OAAO;MACxC;AAEF,WAAO,qBAAqB,sBADT,SAAS,SAAS,IAAI,WAAW,eACQ,OAAO,YAAY,CAAC;;GAEpF,MAAM,OAAO,eAAe;AAC5B,OAAI,SAAS,kBAAkB,eAAe,QAC1C,QAAO,QAAQ,OAAO,cAAc;AAExC,OAAI,SAAS,kBAAkB,eAAe,mBAAmB;IAC7D,MAAM,SAAS,QAAQ,OAAO,cAAc;AAC5C,QAAI,OAAO,OACP,QAAO;;GAGf,MAAM,SAAS,SAAS,kBAAkB,eAAe,UAAU,gBAAgB;GACnF,MAAM,kBAAkB,qBAAqB,qBAAqB,cAAc,gBAAgB,oBAAoB,gBAAgB,qBAAqB,QAAQ,OAAO,OAAO,CAAC,CAAC,CAAC;AAClL,OAAI,SAAS,kBAAkB,eAAe,uBAAuB,gBAAgB,WAAW,EAC5F,QAAO,QAAQ,OAAO,cAAc;AAExC,UAAO"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../../../../../../_virtual/rolldown_runtime.mjs";
|
|
2
|
+
import { require_constants } from "../constants.mjs";
|
|
3
|
+
import { require_utils } from "../utils.mjs";
|
|
4
|
+
|
|
5
|
+
//#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection_events.js
|
|
6
|
+
var require_server_selection_events = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.WaitingForSuitableServerEvent = exports.ServerSelectionSucceededEvent = exports.ServerSelectionFailedEvent = exports.ServerSelectionStartedEvent = exports.ServerSelectionEvent = void 0;
|
|
9
|
+
const utils_1 = require_utils();
|
|
10
|
+
const constants_1 = require_constants();
|
|
11
|
+
/**
|
|
12
|
+
* The base export class for all logs published from server selection
|
|
13
|
+
* @internal
|
|
14
|
+
* @category Log Type
|
|
15
|
+
*/
|
|
16
|
+
var ServerSelectionEvent = class {
|
|
17
|
+
/** @internal */
|
|
18
|
+
constructor(selector, topologyDescription, operation) {
|
|
19
|
+
this.selector = selector;
|
|
20
|
+
this.operation = operation;
|
|
21
|
+
this.topologyDescription = topologyDescription;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.ServerSelectionEvent = ServerSelectionEvent;
|
|
25
|
+
/**
|
|
26
|
+
* An event published when server selection starts
|
|
27
|
+
* @internal
|
|
28
|
+
* @category Event
|
|
29
|
+
*/
|
|
30
|
+
var ServerSelectionStartedEvent = class extends ServerSelectionEvent {
|
|
31
|
+
/** @internal */
|
|
32
|
+
constructor(selector, topologyDescription, operation) {
|
|
33
|
+
super(selector, topologyDescription, operation);
|
|
34
|
+
/** @internal */
|
|
35
|
+
this.name = constants_1.SERVER_SELECTION_STARTED;
|
|
36
|
+
this.message = "Server selection started";
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
exports.ServerSelectionStartedEvent = ServerSelectionStartedEvent;
|
|
40
|
+
/**
|
|
41
|
+
* An event published when a server selection fails
|
|
42
|
+
* @internal
|
|
43
|
+
* @category Event
|
|
44
|
+
*/
|
|
45
|
+
var ServerSelectionFailedEvent = class extends ServerSelectionEvent {
|
|
46
|
+
/** @internal */
|
|
47
|
+
constructor(selector, topologyDescription, error, operation) {
|
|
48
|
+
super(selector, topologyDescription, operation);
|
|
49
|
+
/** @internal */
|
|
50
|
+
this.name = constants_1.SERVER_SELECTION_FAILED;
|
|
51
|
+
this.message = "Server selection failed";
|
|
52
|
+
this.failure = error;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
exports.ServerSelectionFailedEvent = ServerSelectionFailedEvent;
|
|
56
|
+
/**
|
|
57
|
+
* An event published when server selection succeeds
|
|
58
|
+
* @internal
|
|
59
|
+
* @category Event
|
|
60
|
+
*/
|
|
61
|
+
var ServerSelectionSucceededEvent = class extends ServerSelectionEvent {
|
|
62
|
+
/** @internal */
|
|
63
|
+
constructor(selector, topologyDescription, address, operation) {
|
|
64
|
+
super(selector, topologyDescription, operation);
|
|
65
|
+
/** @internal */
|
|
66
|
+
this.name = constants_1.SERVER_SELECTION_SUCCEEDED;
|
|
67
|
+
this.message = "Server selection succeeded";
|
|
68
|
+
const { host, port } = utils_1.HostAddress.fromString(address).toHostPort();
|
|
69
|
+
this.serverHost = host;
|
|
70
|
+
this.serverPort = port;
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
exports.ServerSelectionSucceededEvent = ServerSelectionSucceededEvent;
|
|
74
|
+
/**
|
|
75
|
+
* An event published when server selection is waiting for a suitable server to become available
|
|
76
|
+
* @internal
|
|
77
|
+
* @category Event
|
|
78
|
+
*/
|
|
79
|
+
var WaitingForSuitableServerEvent = class extends ServerSelectionEvent {
|
|
80
|
+
/** @internal */
|
|
81
|
+
constructor(selector, topologyDescription, remainingTimeMS, operation) {
|
|
82
|
+
super(selector, topologyDescription, operation);
|
|
83
|
+
/** @internal */
|
|
84
|
+
this.name = constants_1.WAITING_FOR_SUITABLE_SERVER;
|
|
85
|
+
this.message = "Waiting for suitable server to become available";
|
|
86
|
+
this.remainingTimeMS = remainingTimeMS;
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
exports.WaitingForSuitableServerEvent = WaitingForSuitableServerEvent;
|
|
90
|
+
}));
|
|
91
|
+
|
|
92
|
+
//#endregion
|
|
93
|
+
export default require_server_selection_events();
|
|
94
|
+
|
|
95
|
+
export { require_server_selection_events };
|
|
96
|
+
//# sourceMappingURL=server_selection_events.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server_selection_events.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection_events.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WaitingForSuitableServerEvent = exports.ServerSelectionSucceededEvent = exports.ServerSelectionFailedEvent = exports.ServerSelectionStartedEvent = exports.ServerSelectionEvent = void 0;\nconst utils_1 = require(\".././utils\");\nconst constants_1 = require(\"../constants\");\n/**\n * The base export class for all logs published from server selection\n * @internal\n * @category Log Type\n */\nclass ServerSelectionEvent {\n /** @internal */\n constructor(selector, topologyDescription, operation) {\n this.selector = selector;\n this.operation = operation;\n this.topologyDescription = topologyDescription;\n }\n}\nexports.ServerSelectionEvent = ServerSelectionEvent;\n/**\n * An event published when server selection starts\n * @internal\n * @category Event\n */\nclass ServerSelectionStartedEvent extends ServerSelectionEvent {\n /** @internal */\n constructor(selector, topologyDescription, operation) {\n super(selector, topologyDescription, operation);\n /** @internal */\n this.name = constants_1.SERVER_SELECTION_STARTED;\n this.message = 'Server selection started';\n }\n}\nexports.ServerSelectionStartedEvent = ServerSelectionStartedEvent;\n/**\n * An event published when a server selection fails\n * @internal\n * @category Event\n */\nclass ServerSelectionFailedEvent extends ServerSelectionEvent {\n /** @internal */\n constructor(selector, topologyDescription, error, operation) {\n super(selector, topologyDescription, operation);\n /** @internal */\n this.name = constants_1.SERVER_SELECTION_FAILED;\n this.message = 'Server selection failed';\n this.failure = error;\n }\n}\nexports.ServerSelectionFailedEvent = ServerSelectionFailedEvent;\n/**\n * An event published when server selection succeeds\n * @internal\n * @category Event\n */\nclass ServerSelectionSucceededEvent extends ServerSelectionEvent {\n /** @internal */\n constructor(selector, topologyDescription, address, operation) {\n super(selector, topologyDescription, operation);\n /** @internal */\n this.name = constants_1.SERVER_SELECTION_SUCCEEDED;\n this.message = 'Server selection succeeded';\n const { host, port } = utils_1.HostAddress.fromString(address).toHostPort();\n this.serverHost = host;\n this.serverPort = port;\n }\n}\nexports.ServerSelectionSucceededEvent = ServerSelectionSucceededEvent;\n/**\n * An event published when server selection is waiting for a suitable server to become available\n * @internal\n * @category Event\n */\nclass WaitingForSuitableServerEvent extends ServerSelectionEvent {\n /** @internal */\n constructor(selector, topologyDescription, remainingTimeMS, operation) {\n super(selector, topologyDescription, operation);\n /** @internal */\n this.name = constants_1.WAITING_FOR_SUITABLE_SERVER;\n this.message = 'Waiting for suitable server to become available';\n this.remainingTimeMS = remainingTimeMS;\n }\n}\nexports.WaitingForSuitableServerEvent = WaitingForSuitableServerEvent;\n//# sourceMappingURL=server_selection_events.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;AACA,QAAO,eAAe,SAAS,cAAc,EAAE,OAAO,MAAM,CAAC;AAC7D,SAAQ,gCAAgC,QAAQ,gCAAgC,QAAQ,6BAA6B,QAAQ,8BAA8B,QAAQ,uBAAuB,KAAK;CAC/L,MAAM;CACN,MAAM;;;;;;CAMN,IAAM,uBAAN,MAA2B;;EAEvB,YAAY,UAAU,qBAAqB,WAAW;AAClD,QAAK,WAAW;AAChB,QAAK,YAAY;AACjB,QAAK,sBAAsB;;;AAGnC,SAAQ,uBAAuB;;;;;;CAM/B,IAAM,8BAAN,cAA0C,qBAAqB;;EAE3D,YAAY,UAAU,qBAAqB,WAAW;AAClD,SAAM,UAAU,qBAAqB,UAAU;;AAE/C,QAAK,OAAO,YAAY;AACxB,QAAK,UAAU;;;AAGvB,SAAQ,8BAA8B;;;;;;CAMtC,IAAM,6BAAN,cAAyC,qBAAqB;;EAE1D,YAAY,UAAU,qBAAqB,OAAO,WAAW;AACzD,SAAM,UAAU,qBAAqB,UAAU;;AAE/C,QAAK,OAAO,YAAY;AACxB,QAAK,UAAU;AACf,QAAK,UAAU;;;AAGvB,SAAQ,6BAA6B;;;;;;CAMrC,IAAM,gCAAN,cAA4C,qBAAqB;;EAE7D,YAAY,UAAU,qBAAqB,SAAS,WAAW;AAC3D,SAAM,UAAU,qBAAqB,UAAU;;AAE/C,QAAK,OAAO,YAAY;AACxB,QAAK,UAAU;GACf,MAAM,EAAE,MAAM,SAAS,QAAQ,YAAY,WAAW,QAAQ,CAAC,YAAY;AAC3E,QAAK,aAAa;AAClB,QAAK,aAAa;;;AAG1B,SAAQ,gCAAgC;;;;;;CAMxC,IAAM,gCAAN,cAA4C,qBAAqB;;EAE7D,YAAY,UAAU,qBAAqB,iBAAiB,WAAW;AACnE,SAAM,UAAU,qBAAqB,UAAU;;AAE/C,QAAK,OAAO,YAAY;AACxB,QAAK,UAAU;AACf,QAAK,kBAAkB;;;AAG/B,SAAQ,gCAAgC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { __commonJSMin, __require } from "../../../../../../../_virtual/rolldown_runtime.mjs";
|
|
2
|
+
import { require_error } from "../error.mjs";
|
|
3
|
+
import { require_utils } from "../utils.mjs";
|
|
4
|
+
import { require_mongo_types } from "../mongo_types.mjs";
|
|
5
|
+
|
|
6
|
+
//#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/srv_polling.js
|
|
7
|
+
var require_srv_polling = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.SrvPoller = exports.SrvPollingEvent = void 0;
|
|
10
|
+
const dns = __require("dns");
|
|
11
|
+
const timers_1 = __require("timers");
|
|
12
|
+
const error_1 = require_error();
|
|
13
|
+
const mongo_types_1 = require_mongo_types();
|
|
14
|
+
const utils_1 = require_utils();
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
* @category Event
|
|
18
|
+
*/
|
|
19
|
+
var SrvPollingEvent = class {
|
|
20
|
+
constructor(srvRecords) {
|
|
21
|
+
this.srvRecords = srvRecords;
|
|
22
|
+
}
|
|
23
|
+
hostnames() {
|
|
24
|
+
return new Set(this.srvRecords.map((r) => utils_1.HostAddress.fromSrvRecord(r).toString()));
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
exports.SrvPollingEvent = SrvPollingEvent;
|
|
28
|
+
/** @internal */
|
|
29
|
+
var SrvPoller = class SrvPoller extends mongo_types_1.TypedEventEmitter {
|
|
30
|
+
constructor(options) {
|
|
31
|
+
super();
|
|
32
|
+
this.on("error", utils_1.noop);
|
|
33
|
+
if (!options || !options.srvHost) throw new error_1.MongoRuntimeError("Options for SrvPoller must exist and include srvHost");
|
|
34
|
+
this.srvHost = options.srvHost;
|
|
35
|
+
this.srvMaxHosts = options.srvMaxHosts ?? 0;
|
|
36
|
+
this.srvServiceName = options.srvServiceName ?? "mongodb";
|
|
37
|
+
this.rescanSrvIntervalMS = 6e4;
|
|
38
|
+
this.heartbeatFrequencyMS = options.heartbeatFrequencyMS ?? 1e4;
|
|
39
|
+
this.haMode = false;
|
|
40
|
+
this.generation = 0;
|
|
41
|
+
this._timeout = void 0;
|
|
42
|
+
}
|
|
43
|
+
get srvAddress() {
|
|
44
|
+
return `_${this.srvServiceName}._tcp.${this.srvHost}`;
|
|
45
|
+
}
|
|
46
|
+
get intervalMS() {
|
|
47
|
+
return this.haMode ? this.heartbeatFrequencyMS : this.rescanSrvIntervalMS;
|
|
48
|
+
}
|
|
49
|
+
start() {
|
|
50
|
+
if (!this._timeout) this.schedule();
|
|
51
|
+
}
|
|
52
|
+
stop() {
|
|
53
|
+
if (this._timeout) {
|
|
54
|
+
(0, timers_1.clearTimeout)(this._timeout);
|
|
55
|
+
this.generation += 1;
|
|
56
|
+
this._timeout = void 0;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
schedule() {
|
|
60
|
+
if (this._timeout) (0, timers_1.clearTimeout)(this._timeout);
|
|
61
|
+
this._timeout = (0, timers_1.setTimeout)(() => {
|
|
62
|
+
this._poll().then(void 0, utils_1.squashError);
|
|
63
|
+
}, this.intervalMS);
|
|
64
|
+
}
|
|
65
|
+
success(srvRecords) {
|
|
66
|
+
this.haMode = false;
|
|
67
|
+
this.schedule();
|
|
68
|
+
this.emit(SrvPoller.SRV_RECORD_DISCOVERY, new SrvPollingEvent(srvRecords));
|
|
69
|
+
}
|
|
70
|
+
failure() {
|
|
71
|
+
this.haMode = true;
|
|
72
|
+
this.schedule();
|
|
73
|
+
}
|
|
74
|
+
async _poll() {
|
|
75
|
+
const generation = this.generation;
|
|
76
|
+
let srvRecords;
|
|
77
|
+
try {
|
|
78
|
+
srvRecords = await dns.promises.resolveSrv(this.srvAddress);
|
|
79
|
+
} catch {
|
|
80
|
+
this.failure();
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if (generation !== this.generation) return;
|
|
84
|
+
const finalAddresses = [];
|
|
85
|
+
for (const record of srvRecords) try {
|
|
86
|
+
(0, utils_1.checkParentDomainMatch)(record.name, this.srvHost);
|
|
87
|
+
finalAddresses.push(record);
|
|
88
|
+
} catch (error) {
|
|
89
|
+
(0, utils_1.squashError)(error);
|
|
90
|
+
}
|
|
91
|
+
if (!finalAddresses.length) {
|
|
92
|
+
this.failure();
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
this.success(finalAddresses);
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
exports.SrvPoller = SrvPoller;
|
|
99
|
+
/** @event */
|
|
100
|
+
SrvPoller.SRV_RECORD_DISCOVERY = "srvRecordDiscovery";
|
|
101
|
+
}));
|
|
102
|
+
|
|
103
|
+
//#endregion
|
|
104
|
+
export default require_srv_polling();
|
|
105
|
+
|
|
106
|
+
export { require_srv_polling };
|
|
107
|
+
//# sourceMappingURL=srv_polling.mjs.map
|
package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/srv_polling.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"srv_polling.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/srv_polling.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SrvPoller = exports.SrvPollingEvent = void 0;\nconst dns = require(\"dns\");\nconst timers_1 = require(\"timers\");\nconst error_1 = require(\"../error\");\nconst mongo_types_1 = require(\"../mongo_types\");\nconst utils_1 = require(\"../utils\");\n/**\n * @internal\n * @category Event\n */\nclass SrvPollingEvent {\n constructor(srvRecords) {\n this.srvRecords = srvRecords;\n }\n hostnames() {\n return new Set(this.srvRecords.map(r => utils_1.HostAddress.fromSrvRecord(r).toString()));\n }\n}\nexports.SrvPollingEvent = SrvPollingEvent;\n/** @internal */\nclass SrvPoller extends mongo_types_1.TypedEventEmitter {\n constructor(options) {\n super();\n this.on('error', utils_1.noop);\n if (!options || !options.srvHost) {\n throw new error_1.MongoRuntimeError('Options for SrvPoller must exist and include srvHost');\n }\n this.srvHost = options.srvHost;\n this.srvMaxHosts = options.srvMaxHosts ?? 0;\n this.srvServiceName = options.srvServiceName ?? 'mongodb';\n this.rescanSrvIntervalMS = 60000;\n this.heartbeatFrequencyMS = options.heartbeatFrequencyMS ?? 10000;\n this.haMode = false;\n this.generation = 0;\n this._timeout = undefined;\n }\n get srvAddress() {\n return `_${this.srvServiceName}._tcp.${this.srvHost}`;\n }\n get intervalMS() {\n return this.haMode ? this.heartbeatFrequencyMS : this.rescanSrvIntervalMS;\n }\n start() {\n if (!this._timeout) {\n this.schedule();\n }\n }\n stop() {\n if (this._timeout) {\n (0, timers_1.clearTimeout)(this._timeout);\n this.generation += 1;\n this._timeout = undefined;\n }\n }\n // TODO(NODE-4994): implement new logging logic for SrvPoller failures\n schedule() {\n if (this._timeout) {\n (0, timers_1.clearTimeout)(this._timeout);\n }\n this._timeout = (0, timers_1.setTimeout)(() => {\n this._poll().then(undefined, utils_1.squashError);\n }, this.intervalMS);\n }\n success(srvRecords) {\n this.haMode = false;\n this.schedule();\n this.emit(SrvPoller.SRV_RECORD_DISCOVERY, new SrvPollingEvent(srvRecords));\n }\n failure() {\n this.haMode = true;\n this.schedule();\n }\n async _poll() {\n const generation = this.generation;\n let srvRecords;\n try {\n srvRecords = await dns.promises.resolveSrv(this.srvAddress);\n }\n catch {\n this.failure();\n return;\n }\n if (generation !== this.generation) {\n return;\n }\n const finalAddresses = [];\n for (const record of srvRecords) {\n try {\n (0, utils_1.checkParentDomainMatch)(record.name, this.srvHost);\n finalAddresses.push(record);\n }\n catch (error) {\n (0, utils_1.squashError)(error);\n }\n }\n if (!finalAddresses.length) {\n this.failure();\n return;\n }\n this.success(finalAddresses);\n }\n}\nexports.SrvPoller = SrvPoller;\n/** @event */\nSrvPoller.SRV_RECORD_DISCOVERY = 'srvRecordDiscovery';\n//# sourceMappingURL=srv_polling.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;AACA,QAAO,eAAe,SAAS,cAAc,EAAE,OAAO,MAAM,CAAC;AAC7D,SAAQ,YAAY,QAAQ,kBAAkB,KAAK;CACnD,MAAM,gBAAc,MAAM;CAC1B,MAAM,qBAAmB,SAAS;CAClC,MAAM;CACN,MAAM;CACN,MAAM;;;;;CAKN,IAAM,kBAAN,MAAsB;EAClB,YAAY,YAAY;AACpB,QAAK,aAAa;;EAEtB,YAAY;AACR,UAAO,IAAI,IAAI,KAAK,WAAW,KAAI,MAAK,QAAQ,YAAY,cAAc,EAAE,CAAC,UAAU,CAAC,CAAC;;;AAGjG,SAAQ,kBAAkB;;CAE1B,IAAM,YAAN,MAAM,kBAAkB,cAAc,kBAAkB;EACpD,YAAY,SAAS;AACjB,UAAO;AACP,QAAK,GAAG,SAAS,QAAQ,KAAK;AAC9B,OAAI,CAAC,WAAW,CAAC,QAAQ,QACrB,OAAM,IAAI,QAAQ,kBAAkB,uDAAuD;AAE/F,QAAK,UAAU,QAAQ;AACvB,QAAK,cAAc,QAAQ,eAAe;AAC1C,QAAK,iBAAiB,QAAQ,kBAAkB;AAChD,QAAK,sBAAsB;AAC3B,QAAK,uBAAuB,QAAQ,wBAAwB;AAC5D,QAAK,SAAS;AACd,QAAK,aAAa;AAClB,QAAK,WAAW;;EAEpB,IAAI,aAAa;AACb,UAAO,IAAI,KAAK,eAAe,QAAQ,KAAK;;EAEhD,IAAI,aAAa;AACb,UAAO,KAAK,SAAS,KAAK,uBAAuB,KAAK;;EAE1D,QAAQ;AACJ,OAAI,CAAC,KAAK,SACN,MAAK,UAAU;;EAGvB,OAAO;AACH,OAAI,KAAK,UAAU;AACf,KAAC,GAAG,SAAS,cAAc,KAAK,SAAS;AACzC,SAAK,cAAc;AACnB,SAAK,WAAW;;;EAIxB,WAAW;AACP,OAAI,KAAK,SACL,EAAC,GAAG,SAAS,cAAc,KAAK,SAAS;AAE7C,QAAK,YAAY,GAAG,SAAS,kBAAkB;AAC3C,SAAK,OAAO,CAAC,KAAK,QAAW,QAAQ,YAAY;MAClD,KAAK,WAAW;;EAEvB,QAAQ,YAAY;AAChB,QAAK,SAAS;AACd,QAAK,UAAU;AACf,QAAK,KAAK,UAAU,sBAAsB,IAAI,gBAAgB,WAAW,CAAC;;EAE9E,UAAU;AACN,QAAK,SAAS;AACd,QAAK,UAAU;;EAEnB,MAAM,QAAQ;GACV,MAAM,aAAa,KAAK;GACxB,IAAI;AACJ,OAAI;AACA,iBAAa,MAAM,IAAI,SAAS,WAAW,KAAK,WAAW;WAEzD;AACF,SAAK,SAAS;AACd;;AAEJ,OAAI,eAAe,KAAK,WACpB;GAEJ,MAAM,iBAAiB,EAAE;AACzB,QAAK,MAAM,UAAU,WACjB,KAAI;AACA,KAAC,GAAG,QAAQ,wBAAwB,OAAO,MAAM,KAAK,QAAQ;AAC9D,mBAAe,KAAK,OAAO;YAExB,OAAO;AACV,KAAC,GAAG,QAAQ,aAAa,MAAM;;AAGvC,OAAI,CAAC,eAAe,QAAQ;AACxB,SAAK,SAAS;AACd;;AAEJ,QAAK,QAAQ,eAAe;;;AAGpC,SAAQ,YAAY;;AAEpB,WAAU,uBAAuB"}
|