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,545 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../../../../../../_virtual/rolldown_runtime.mjs";
|
|
2
|
+
import { require_bson } from "../bson.mjs";
|
|
3
|
+
import { require_utils } from "../utils.mjs";
|
|
4
|
+
import { require_timeout } from "../timeout.mjs";
|
|
5
|
+
import { require_deps } from "../deps.mjs";
|
|
6
|
+
import { require_crypto_callbacks } from "./crypto_callbacks.mjs";
|
|
7
|
+
import { require_errors } from "./errors.mjs";
|
|
8
|
+
import { require_providers } from "./providers/index.mjs";
|
|
9
|
+
import { require_state_machine } from "./state_machine.mjs";
|
|
10
|
+
|
|
11
|
+
//#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/client_encryption.js
|
|
12
|
+
var require_client_encryption = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.ClientEncryption = void 0;
|
|
15
|
+
exports.autoSelectSocketOptions = autoSelectSocketOptions;
|
|
16
|
+
const bson_1 = require_bson();
|
|
17
|
+
const deps_1 = require_deps();
|
|
18
|
+
const timeout_1 = require_timeout();
|
|
19
|
+
const utils_1 = require_utils();
|
|
20
|
+
const cryptoCallbacks = require_crypto_callbacks();
|
|
21
|
+
const errors_1 = require_errors();
|
|
22
|
+
const index_1 = require_providers();
|
|
23
|
+
const state_machine_1 = require_state_machine();
|
|
24
|
+
/**
|
|
25
|
+
* @public
|
|
26
|
+
* The public interface for explicit in-use encryption
|
|
27
|
+
*/
|
|
28
|
+
var ClientEncryption = class ClientEncryption {
|
|
29
|
+
/** @internal */
|
|
30
|
+
static getMongoCrypt() {
|
|
31
|
+
const encryption = (0, deps_1.getMongoDBClientEncryption)();
|
|
32
|
+
if ("kModuleError" in encryption) throw encryption.kModuleError;
|
|
33
|
+
return encryption.MongoCrypt;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Create a new encryption instance
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* new ClientEncryption(mongoClient, {
|
|
41
|
+
* keyVaultNamespace: 'client.encryption',
|
|
42
|
+
* kmsProviders: {
|
|
43
|
+
* local: {
|
|
44
|
+
* key: masterKey // The master key used for encryption/decryption. A 96-byte long Buffer
|
|
45
|
+
* }
|
|
46
|
+
* }
|
|
47
|
+
* });
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* new ClientEncryption(mongoClient, {
|
|
53
|
+
* keyVaultNamespace: 'client.encryption',
|
|
54
|
+
* kmsProviders: {
|
|
55
|
+
* aws: {
|
|
56
|
+
* accessKeyId: AWS_ACCESS_KEY,
|
|
57
|
+
* secretAccessKey: AWS_SECRET_KEY
|
|
58
|
+
* }
|
|
59
|
+
* }
|
|
60
|
+
* });
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
constructor(client, options) {
|
|
64
|
+
this._client = client;
|
|
65
|
+
this._proxyOptions = options.proxyOptions ?? {};
|
|
66
|
+
this._tlsOptions = options.tlsOptions ?? {};
|
|
67
|
+
this._kmsProviders = options.kmsProviders || {};
|
|
68
|
+
const { timeoutMS } = (0, utils_1.resolveTimeoutOptions)(client, options);
|
|
69
|
+
this._timeoutMS = timeoutMS;
|
|
70
|
+
this._credentialProviders = options.credentialProviders;
|
|
71
|
+
if (options.credentialProviders?.aws && !(0, index_1.isEmptyCredentials)("aws", this._kmsProviders)) throw new errors_1.MongoCryptInvalidArgumentError("Can only provide a custom AWS credential provider when the state machine is configured for automatic AWS credential fetching");
|
|
72
|
+
if (options.keyVaultNamespace == null) throw new errors_1.MongoCryptInvalidArgumentError("Missing required option `keyVaultNamespace`");
|
|
73
|
+
const mongoCryptOptions = {
|
|
74
|
+
...options,
|
|
75
|
+
cryptoCallbacks,
|
|
76
|
+
kmsProviders: !Buffer.isBuffer(this._kmsProviders) ? (0, bson_1.serialize)(this._kmsProviders) : this._kmsProviders
|
|
77
|
+
};
|
|
78
|
+
this._keyVaultNamespace = options.keyVaultNamespace;
|
|
79
|
+
this._keyVaultClient = options.keyVaultClient || client;
|
|
80
|
+
this._mongoCrypt = new (ClientEncryption.getMongoCrypt())(mongoCryptOptions);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Creates a data key used for explicit encryption and inserts it into the key vault namespace
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```ts
|
|
87
|
+
* // Using async/await to create a local key
|
|
88
|
+
* const dataKeyId = await clientEncryption.createDataKey('local');
|
|
89
|
+
* ```
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* ```ts
|
|
93
|
+
* // Using async/await to create an aws key
|
|
94
|
+
* const dataKeyId = await clientEncryption.createDataKey('aws', {
|
|
95
|
+
* masterKey: {
|
|
96
|
+
* region: 'us-east-1',
|
|
97
|
+
* key: 'xxxxxxxxxxxxxx' // CMK ARN here
|
|
98
|
+
* }
|
|
99
|
+
* });
|
|
100
|
+
* ```
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```ts
|
|
104
|
+
* // Using async/await to create an aws key with a keyAltName
|
|
105
|
+
* const dataKeyId = await clientEncryption.createDataKey('aws', {
|
|
106
|
+
* masterKey: {
|
|
107
|
+
* region: 'us-east-1',
|
|
108
|
+
* key: 'xxxxxxxxxxxxxx' // CMK ARN here
|
|
109
|
+
* },
|
|
110
|
+
* keyAltNames: [ 'mySpecialKey' ]
|
|
111
|
+
* });
|
|
112
|
+
* ```
|
|
113
|
+
*/
|
|
114
|
+
async createDataKey(provider, options = {}) {
|
|
115
|
+
if (options.keyAltNames && !Array.isArray(options.keyAltNames)) throw new errors_1.MongoCryptInvalidArgumentError(`Option "keyAltNames" must be an array of strings, but was of type ${typeof options.keyAltNames}.`);
|
|
116
|
+
let keyAltNames = void 0;
|
|
117
|
+
if (options.keyAltNames && options.keyAltNames.length > 0) keyAltNames = options.keyAltNames.map((keyAltName, i) => {
|
|
118
|
+
if (typeof keyAltName !== "string") throw new errors_1.MongoCryptInvalidArgumentError(`Option "keyAltNames" must be an array of strings, but item at index ${i} was of type ${typeof keyAltName}`);
|
|
119
|
+
return (0, bson_1.serialize)({ keyAltName });
|
|
120
|
+
});
|
|
121
|
+
let keyMaterial = void 0;
|
|
122
|
+
if (options.keyMaterial) keyMaterial = (0, bson_1.serialize)({ keyMaterial: options.keyMaterial });
|
|
123
|
+
const dataKeyBson = (0, bson_1.serialize)({
|
|
124
|
+
provider,
|
|
125
|
+
...options.masterKey
|
|
126
|
+
});
|
|
127
|
+
const context = this._mongoCrypt.makeDataKeyContext(dataKeyBson, {
|
|
128
|
+
keyAltNames,
|
|
129
|
+
keyMaterial
|
|
130
|
+
});
|
|
131
|
+
const stateMachine = new state_machine_1.StateMachine({
|
|
132
|
+
proxyOptions: this._proxyOptions,
|
|
133
|
+
tlsOptions: this._tlsOptions,
|
|
134
|
+
socketOptions: autoSelectSocketOptions(this._client.s.options)
|
|
135
|
+
});
|
|
136
|
+
const timeoutContext = options?.timeoutContext ?? timeout_1.TimeoutContext.create((0, utils_1.resolveTimeoutOptions)(this._client, { timeoutMS: this._timeoutMS }));
|
|
137
|
+
const dataKey = (0, bson_1.deserialize)(await stateMachine.execute(this, context, { timeoutContext }));
|
|
138
|
+
const { db: dbName, collection: collectionName } = utils_1.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);
|
|
139
|
+
const { insertedId } = await this._keyVaultClient.db(dbName).collection(collectionName).insertOne(dataKey, {
|
|
140
|
+
writeConcern: { w: "majority" },
|
|
141
|
+
timeoutMS: timeoutContext?.csotEnabled() ? timeoutContext?.getRemainingTimeMSOrThrow() : void 0
|
|
142
|
+
});
|
|
143
|
+
return insertedId;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Searches the keyvault for any data keys matching the provided filter. If there are matches, rewrapManyDataKey then attempts to re-wrap the data keys using the provided options.
|
|
147
|
+
*
|
|
148
|
+
* If no matches are found, then no bulk write is performed.
|
|
149
|
+
*
|
|
150
|
+
* @example
|
|
151
|
+
* ```ts
|
|
152
|
+
* // rewrapping all data data keys (using a filter that matches all documents)
|
|
153
|
+
* const filter = {};
|
|
154
|
+
*
|
|
155
|
+
* const result = await clientEncryption.rewrapManyDataKey(filter);
|
|
156
|
+
* if (result.bulkWriteResult != null) {
|
|
157
|
+
* // keys were re-wrapped, results will be available in the bulkWrite object.
|
|
158
|
+
* }
|
|
159
|
+
* ```
|
|
160
|
+
*
|
|
161
|
+
* @example
|
|
162
|
+
* ```ts
|
|
163
|
+
* // attempting to rewrap all data keys with no matches
|
|
164
|
+
* const filter = { _id: new Binary() } // assume _id matches no documents in the database
|
|
165
|
+
* const result = await clientEncryption.rewrapManyDataKey(filter);
|
|
166
|
+
*
|
|
167
|
+
* if (result.bulkWriteResult == null) {
|
|
168
|
+
* // no keys matched, `bulkWriteResult` does not exist on the result object
|
|
169
|
+
* }
|
|
170
|
+
* ```
|
|
171
|
+
*/
|
|
172
|
+
async rewrapManyDataKey(filter, options) {
|
|
173
|
+
let keyEncryptionKeyBson = void 0;
|
|
174
|
+
if (options) {
|
|
175
|
+
const keyEncryptionKey = Object.assign({ provider: options.provider }, options.masterKey);
|
|
176
|
+
keyEncryptionKeyBson = (0, bson_1.serialize)(keyEncryptionKey);
|
|
177
|
+
}
|
|
178
|
+
const filterBson = (0, bson_1.serialize)(filter);
|
|
179
|
+
const context = this._mongoCrypt.makeRewrapManyDataKeyContext(filterBson, keyEncryptionKeyBson);
|
|
180
|
+
const stateMachine = new state_machine_1.StateMachine({
|
|
181
|
+
proxyOptions: this._proxyOptions,
|
|
182
|
+
tlsOptions: this._tlsOptions,
|
|
183
|
+
socketOptions: autoSelectSocketOptions(this._client.s.options)
|
|
184
|
+
});
|
|
185
|
+
const timeoutContext = timeout_1.TimeoutContext.create((0, utils_1.resolveTimeoutOptions)(this._client, { timeoutMS: this._timeoutMS }));
|
|
186
|
+
const { v: dataKeys } = (0, bson_1.deserialize)(await stateMachine.execute(this, context, { timeoutContext }));
|
|
187
|
+
if (dataKeys.length === 0) return {};
|
|
188
|
+
const { db: dbName, collection: collectionName } = utils_1.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);
|
|
189
|
+
const replacements = dataKeys.map((key) => ({ updateOne: {
|
|
190
|
+
filter: { _id: key._id },
|
|
191
|
+
update: {
|
|
192
|
+
$set: {
|
|
193
|
+
masterKey: key.masterKey,
|
|
194
|
+
keyMaterial: key.keyMaterial
|
|
195
|
+
},
|
|
196
|
+
$currentDate: { updateDate: true }
|
|
197
|
+
}
|
|
198
|
+
} }));
|
|
199
|
+
return { bulkWriteResult: await this._keyVaultClient.db(dbName).collection(collectionName).bulkWrite(replacements, {
|
|
200
|
+
writeConcern: { w: "majority" },
|
|
201
|
+
timeoutMS: timeoutContext.csotEnabled() ? timeoutContext?.remainingTimeMS : void 0
|
|
202
|
+
}) };
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Deletes the key with the provided id from the keyvault, if it exists.
|
|
206
|
+
*
|
|
207
|
+
* @example
|
|
208
|
+
* ```ts
|
|
209
|
+
* // delete a key by _id
|
|
210
|
+
* const id = new Binary(); // id is a bson binary subtype 4 object
|
|
211
|
+
* const { deletedCount } = await clientEncryption.deleteKey(id);
|
|
212
|
+
*
|
|
213
|
+
* if (deletedCount != null && deletedCount > 0) {
|
|
214
|
+
* // successful deletion
|
|
215
|
+
* }
|
|
216
|
+
* ```
|
|
217
|
+
*
|
|
218
|
+
*/
|
|
219
|
+
async deleteKey(_id) {
|
|
220
|
+
const { db: dbName, collection: collectionName } = utils_1.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);
|
|
221
|
+
return await this._keyVaultClient.db(dbName).collection(collectionName).deleteOne({ _id }, {
|
|
222
|
+
writeConcern: { w: "majority" },
|
|
223
|
+
timeoutMS: this._timeoutMS
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Finds all the keys currently stored in the keyvault.
|
|
228
|
+
*
|
|
229
|
+
* This method will not throw.
|
|
230
|
+
*
|
|
231
|
+
* @returns a FindCursor over all keys in the keyvault.
|
|
232
|
+
* @example
|
|
233
|
+
* ```ts
|
|
234
|
+
* // fetching all keys
|
|
235
|
+
* const keys = await clientEncryption.getKeys().toArray();
|
|
236
|
+
* ```
|
|
237
|
+
*/
|
|
238
|
+
getKeys() {
|
|
239
|
+
const { db: dbName, collection: collectionName } = utils_1.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);
|
|
240
|
+
return this._keyVaultClient.db(dbName).collection(collectionName).find({}, {
|
|
241
|
+
readConcern: { level: "majority" },
|
|
242
|
+
timeoutMS: this._timeoutMS
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Finds a key in the keyvault with the specified _id.
|
|
247
|
+
*
|
|
248
|
+
* Returns a promise that either resolves to a {@link DataKey} if a document matches the key or null if no documents
|
|
249
|
+
* match the id. The promise rejects with an error if an error is thrown.
|
|
250
|
+
* @example
|
|
251
|
+
* ```ts
|
|
252
|
+
* // getting a key by id
|
|
253
|
+
* const id = new Binary(); // id is a bson binary subtype 4 object
|
|
254
|
+
* const key = await clientEncryption.getKey(id);
|
|
255
|
+
* if (!key) {
|
|
256
|
+
* // key is null if there was no matching key
|
|
257
|
+
* }
|
|
258
|
+
* ```
|
|
259
|
+
*/
|
|
260
|
+
async getKey(_id) {
|
|
261
|
+
const { db: dbName, collection: collectionName } = utils_1.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);
|
|
262
|
+
return await this._keyVaultClient.db(dbName).collection(collectionName).findOne({ _id }, {
|
|
263
|
+
readConcern: { level: "majority" },
|
|
264
|
+
timeoutMS: this._timeoutMS
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Finds a key in the keyvault which has the specified keyAltName.
|
|
269
|
+
*
|
|
270
|
+
* @param keyAltName - a keyAltName to search for a key
|
|
271
|
+
* @returns Returns a promise that either resolves to a {@link DataKey} if a document matches the key or null if no documents
|
|
272
|
+
* match the keyAltName. The promise rejects with an error if an error is thrown.
|
|
273
|
+
* @example
|
|
274
|
+
* ```ts
|
|
275
|
+
* // get a key by alt name
|
|
276
|
+
* const keyAltName = 'keyAltName';
|
|
277
|
+
* const key = await clientEncryption.getKeyByAltName(keyAltName);
|
|
278
|
+
* if (!key) {
|
|
279
|
+
* // key is null if there is no matching key
|
|
280
|
+
* }
|
|
281
|
+
* ```
|
|
282
|
+
*/
|
|
283
|
+
async getKeyByAltName(keyAltName) {
|
|
284
|
+
const { db: dbName, collection: collectionName } = utils_1.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);
|
|
285
|
+
return await this._keyVaultClient.db(dbName).collection(collectionName).findOne({ keyAltNames: keyAltName }, {
|
|
286
|
+
readConcern: { level: "majority" },
|
|
287
|
+
timeoutMS: this._timeoutMS
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Adds a keyAltName to a key identified by the provided _id.
|
|
292
|
+
*
|
|
293
|
+
* This method resolves to/returns the *old* key value (prior to adding the new altKeyName).
|
|
294
|
+
*
|
|
295
|
+
* @param _id - The id of the document to update.
|
|
296
|
+
* @param keyAltName - a keyAltName to search for a key
|
|
297
|
+
* @returns Returns a promise that either resolves to a {@link DataKey} if a document matches the key or null if no documents
|
|
298
|
+
* match the id. The promise rejects with an error if an error is thrown.
|
|
299
|
+
* @example
|
|
300
|
+
* ```ts
|
|
301
|
+
* // adding an keyAltName to a data key
|
|
302
|
+
* const id = new Binary(); // id is a bson binary subtype 4 object
|
|
303
|
+
* const keyAltName = 'keyAltName';
|
|
304
|
+
* const oldKey = await clientEncryption.addKeyAltName(id, keyAltName);
|
|
305
|
+
* if (!oldKey) {
|
|
306
|
+
* // null is returned if there is no matching document with an id matching the supplied id
|
|
307
|
+
* }
|
|
308
|
+
* ```
|
|
309
|
+
*/
|
|
310
|
+
async addKeyAltName(_id, keyAltName) {
|
|
311
|
+
const { db: dbName, collection: collectionName } = utils_1.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);
|
|
312
|
+
return await this._keyVaultClient.db(dbName).collection(collectionName).findOneAndUpdate({ _id }, { $addToSet: { keyAltNames: keyAltName } }, {
|
|
313
|
+
writeConcern: { w: "majority" },
|
|
314
|
+
returnDocument: "before",
|
|
315
|
+
timeoutMS: this._timeoutMS
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Adds a keyAltName to a key identified by the provided _id.
|
|
320
|
+
*
|
|
321
|
+
* This method resolves to/returns the *old* key value (prior to removing the new altKeyName).
|
|
322
|
+
*
|
|
323
|
+
* If the removed keyAltName is the last keyAltName for that key, the `altKeyNames` property is unset from the document.
|
|
324
|
+
*
|
|
325
|
+
* @param _id - The id of the document to update.
|
|
326
|
+
* @param keyAltName - a keyAltName to search for a key
|
|
327
|
+
* @returns Returns a promise that either resolves to a {@link DataKey} if a document matches the key or null if no documents
|
|
328
|
+
* match the id. The promise rejects with an error if an error is thrown.
|
|
329
|
+
* @example
|
|
330
|
+
* ```ts
|
|
331
|
+
* // removing a key alt name from a data key
|
|
332
|
+
* const id = new Binary(); // id is a bson binary subtype 4 object
|
|
333
|
+
* const keyAltName = 'keyAltName';
|
|
334
|
+
* const oldKey = await clientEncryption.removeKeyAltName(id, keyAltName);
|
|
335
|
+
*
|
|
336
|
+
* if (!oldKey) {
|
|
337
|
+
* // null is returned if there is no matching document with an id matching the supplied id
|
|
338
|
+
* }
|
|
339
|
+
* ```
|
|
340
|
+
*/
|
|
341
|
+
async removeKeyAltName(_id, keyAltName) {
|
|
342
|
+
const { db: dbName, collection: collectionName } = utils_1.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);
|
|
343
|
+
const pipeline = [{ $set: { keyAltNames: { $cond: [
|
|
344
|
+
{ $eq: ["$keyAltNames", [keyAltName]] },
|
|
345
|
+
"$$REMOVE",
|
|
346
|
+
{ $filter: {
|
|
347
|
+
input: "$keyAltNames",
|
|
348
|
+
cond: { $ne: ["$$this", keyAltName] }
|
|
349
|
+
} }
|
|
350
|
+
] } } }];
|
|
351
|
+
return await this._keyVaultClient.db(dbName).collection(collectionName).findOneAndUpdate({ _id }, pipeline, {
|
|
352
|
+
writeConcern: { w: "majority" },
|
|
353
|
+
returnDocument: "before",
|
|
354
|
+
timeoutMS: this._timeoutMS
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* A convenience method for creating an encrypted collection.
|
|
359
|
+
* This method will create data keys for any encryptedFields that do not have a `keyId` defined
|
|
360
|
+
* and then create a new collection with the full set of encryptedFields.
|
|
361
|
+
*
|
|
362
|
+
* @param db - A Node.js driver Db object with which to create the collection
|
|
363
|
+
* @param name - The name of the collection to be created
|
|
364
|
+
* @param options - Options for createDataKey and for createCollection
|
|
365
|
+
* @returns created collection and generated encryptedFields
|
|
366
|
+
* @throws MongoCryptCreateDataKeyError - If part way through the process a createDataKey invocation fails, an error will be rejected that has the partial `encryptedFields` that were created.
|
|
367
|
+
* @throws MongoCryptCreateEncryptedCollectionError - If creating the collection fails, an error will be rejected that has the entire `encryptedFields` that were created.
|
|
368
|
+
*/
|
|
369
|
+
async createEncryptedCollection(db, name, options) {
|
|
370
|
+
const { provider, masterKey, createCollectionOptions: { encryptedFields: { ...encryptedFields }, ...createCollectionOptions } } = options;
|
|
371
|
+
const timeoutContext = this._timeoutMS != null ? timeout_1.TimeoutContext.create((0, utils_1.resolveTimeoutOptions)(this._client, { timeoutMS: this._timeoutMS })) : void 0;
|
|
372
|
+
if (Array.isArray(encryptedFields.fields)) {
|
|
373
|
+
const createDataKeyPromises = encryptedFields.fields.map(async (field) => field == null || typeof field !== "object" || field.keyId != null ? field : {
|
|
374
|
+
...field,
|
|
375
|
+
keyId: await this.createDataKey(provider, {
|
|
376
|
+
masterKey,
|
|
377
|
+
timeoutContext: timeoutContext?.csotEnabled() ? timeoutContext?.clone() : void 0
|
|
378
|
+
})
|
|
379
|
+
});
|
|
380
|
+
const createDataKeyResolutions = await Promise.allSettled(createDataKeyPromises);
|
|
381
|
+
encryptedFields.fields = createDataKeyResolutions.map((resolution, index) => resolution.status === "fulfilled" ? resolution.value : encryptedFields.fields[index]);
|
|
382
|
+
const rejection = createDataKeyResolutions.find((result) => result.status === "rejected");
|
|
383
|
+
if (rejection != null) throw new errors_1.MongoCryptCreateDataKeyError(encryptedFields, { cause: rejection.reason });
|
|
384
|
+
}
|
|
385
|
+
try {
|
|
386
|
+
return {
|
|
387
|
+
collection: await db.createCollection(name, {
|
|
388
|
+
...createCollectionOptions,
|
|
389
|
+
encryptedFields,
|
|
390
|
+
timeoutMS: timeoutContext?.csotEnabled() ? timeoutContext?.getRemainingTimeMSOrThrow() : void 0
|
|
391
|
+
}),
|
|
392
|
+
encryptedFields
|
|
393
|
+
};
|
|
394
|
+
} catch (cause) {
|
|
395
|
+
throw new errors_1.MongoCryptCreateEncryptedCollectionError(encryptedFields, { cause });
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* Explicitly encrypt a provided value. Note that either `options.keyId` or `options.keyAltName` must
|
|
400
|
+
* be specified. Specifying both `options.keyId` and `options.keyAltName` is considered an error.
|
|
401
|
+
*
|
|
402
|
+
* @param value - The value that you wish to serialize. Must be of a type that can be serialized into BSON
|
|
403
|
+
* @param options -
|
|
404
|
+
* @returns a Promise that either resolves with the encrypted value, or rejects with an error.
|
|
405
|
+
*
|
|
406
|
+
* @example
|
|
407
|
+
* ```ts
|
|
408
|
+
* // Encryption with async/await api
|
|
409
|
+
* async function encryptMyData(value) {
|
|
410
|
+
* const keyId = await clientEncryption.createDataKey('local');
|
|
411
|
+
* return clientEncryption.encrypt(value, { keyId, algorithm: 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic' });
|
|
412
|
+
* }
|
|
413
|
+
* ```
|
|
414
|
+
*
|
|
415
|
+
* @example
|
|
416
|
+
* ```ts
|
|
417
|
+
* // Encryption using a keyAltName
|
|
418
|
+
* async function encryptMyData(value) {
|
|
419
|
+
* await clientEncryption.createDataKey('local', { keyAltNames: 'mySpecialKey' });
|
|
420
|
+
* return clientEncryption.encrypt(value, { keyAltName: 'mySpecialKey', algorithm: 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic' });
|
|
421
|
+
* }
|
|
422
|
+
* ```
|
|
423
|
+
*/
|
|
424
|
+
async encrypt(value, options) {
|
|
425
|
+
return await this._encrypt(value, false, options);
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* Encrypts a Match Expression or Aggregate Expression to query a range index.
|
|
429
|
+
*
|
|
430
|
+
* Only supported when queryType is "range" and algorithm is "Range".
|
|
431
|
+
*
|
|
432
|
+
* @param expression - a BSON document of one of the following forms:
|
|
433
|
+
* 1. A Match Expression of this form:
|
|
434
|
+
* `{$and: [{<field>: {$gt: <value1>}}, {<field>: {$lt: <value2> }}]}`
|
|
435
|
+
* 2. An Aggregate Expression of this form:
|
|
436
|
+
* `{$and: [{$gt: [<fieldpath>, <value1>]}, {$lt: [<fieldpath>, <value2>]}]}`
|
|
437
|
+
*
|
|
438
|
+
* `$gt` may also be `$gte`. `$lt` may also be `$lte`.
|
|
439
|
+
*
|
|
440
|
+
* @param options -
|
|
441
|
+
* @returns Returns a Promise that either resolves with the encrypted value or rejects with an error.
|
|
442
|
+
*/
|
|
443
|
+
async encryptExpression(expression, options) {
|
|
444
|
+
return await this._encrypt(expression, true, options);
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* Explicitly decrypt a provided encrypted value
|
|
448
|
+
*
|
|
449
|
+
* @param value - An encrypted value
|
|
450
|
+
* @returns a Promise that either resolves with the decrypted value, or rejects with an error
|
|
451
|
+
*
|
|
452
|
+
* @example
|
|
453
|
+
* ```ts
|
|
454
|
+
* // Decrypting value with async/await API
|
|
455
|
+
* async function decryptMyValue(value) {
|
|
456
|
+
* return clientEncryption.decrypt(value);
|
|
457
|
+
* }
|
|
458
|
+
* ```
|
|
459
|
+
*/
|
|
460
|
+
async decrypt(value) {
|
|
461
|
+
const valueBuffer = (0, bson_1.serialize)({ v: value });
|
|
462
|
+
const context = this._mongoCrypt.makeExplicitDecryptionContext(valueBuffer);
|
|
463
|
+
const stateMachine = new state_machine_1.StateMachine({
|
|
464
|
+
proxyOptions: this._proxyOptions,
|
|
465
|
+
tlsOptions: this._tlsOptions,
|
|
466
|
+
socketOptions: autoSelectSocketOptions(this._client.s.options)
|
|
467
|
+
});
|
|
468
|
+
const timeoutContext = this._timeoutMS != null ? timeout_1.TimeoutContext.create((0, utils_1.resolveTimeoutOptions)(this._client, { timeoutMS: this._timeoutMS })) : void 0;
|
|
469
|
+
const { v } = (0, bson_1.deserialize)(await stateMachine.execute(this, context, { timeoutContext }));
|
|
470
|
+
return v;
|
|
471
|
+
}
|
|
472
|
+
/**
|
|
473
|
+
* @internal
|
|
474
|
+
* Ask the user for KMS credentials.
|
|
475
|
+
*
|
|
476
|
+
* This returns anything that looks like the kmsProviders original input
|
|
477
|
+
* option. It can be empty, and any provider specified here will override
|
|
478
|
+
* the original ones.
|
|
479
|
+
*/
|
|
480
|
+
async askForKMSCredentials() {
|
|
481
|
+
return await (0, index_1.refreshKMSCredentials)(this._kmsProviders, this._credentialProviders);
|
|
482
|
+
}
|
|
483
|
+
static get libmongocryptVersion() {
|
|
484
|
+
return ClientEncryption.getMongoCrypt().libmongocryptVersion;
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* @internal
|
|
488
|
+
* A helper that perform explicit encryption of values and expressions.
|
|
489
|
+
* Explicitly encrypt a provided value. Note that either `options.keyId` or `options.keyAltName` must
|
|
490
|
+
* be specified. Specifying both `options.keyId` and `options.keyAltName` is considered an error.
|
|
491
|
+
*
|
|
492
|
+
* @param value - The value that you wish to encrypt. Must be of a type that can be serialized into BSON
|
|
493
|
+
* @param expressionMode - a boolean that indicates whether or not to encrypt the value as an expression
|
|
494
|
+
* @param options - options to pass to encrypt
|
|
495
|
+
* @returns the raw result of the call to stateMachine.execute(). When expressionMode is set to true, the return
|
|
496
|
+
* value will be a bson document. When false, the value will be a BSON Binary.
|
|
497
|
+
*
|
|
498
|
+
*/
|
|
499
|
+
async _encrypt(value, expressionMode, options) {
|
|
500
|
+
const { algorithm, keyId, keyAltName, contentionFactor, queryType, rangeOptions, textOptions } = options;
|
|
501
|
+
const contextOptions = {
|
|
502
|
+
expressionMode,
|
|
503
|
+
algorithm
|
|
504
|
+
};
|
|
505
|
+
if (keyId) contextOptions.keyId = keyId.buffer;
|
|
506
|
+
if (keyAltName) {
|
|
507
|
+
if (keyId) throw new errors_1.MongoCryptInvalidArgumentError(`"options" cannot contain both "keyId" and "keyAltName"`);
|
|
508
|
+
if (typeof keyAltName !== "string") throw new errors_1.MongoCryptInvalidArgumentError(`"options.keyAltName" must be of type string, but was of type ${typeof keyAltName}`);
|
|
509
|
+
contextOptions.keyAltName = (0, bson_1.serialize)({ keyAltName });
|
|
510
|
+
}
|
|
511
|
+
if (typeof contentionFactor === "number" || typeof contentionFactor === "bigint") contextOptions.contentionFactor = contentionFactor;
|
|
512
|
+
if (typeof queryType === "string") contextOptions.queryType = queryType;
|
|
513
|
+
if (typeof rangeOptions === "object") contextOptions.rangeOptions = (0, bson_1.serialize)(rangeOptions);
|
|
514
|
+
if (typeof textOptions === "object") contextOptions.textOptions = (0, bson_1.serialize)(textOptions);
|
|
515
|
+
const valueBuffer = (0, bson_1.serialize)({ v: value });
|
|
516
|
+
const stateMachine = new state_machine_1.StateMachine({
|
|
517
|
+
proxyOptions: this._proxyOptions,
|
|
518
|
+
tlsOptions: this._tlsOptions,
|
|
519
|
+
socketOptions: autoSelectSocketOptions(this._client.s.options)
|
|
520
|
+
});
|
|
521
|
+
const context = this._mongoCrypt.makeExplicitEncryptionContext(valueBuffer, contextOptions);
|
|
522
|
+
const timeoutContext = this._timeoutMS != null ? timeout_1.TimeoutContext.create((0, utils_1.resolveTimeoutOptions)(this._client, { timeoutMS: this._timeoutMS })) : void 0;
|
|
523
|
+
const { v } = (0, bson_1.deserialize)(await stateMachine.execute(this, context, { timeoutContext }));
|
|
524
|
+
return v;
|
|
525
|
+
}
|
|
526
|
+
};
|
|
527
|
+
exports.ClientEncryption = ClientEncryption;
|
|
528
|
+
/**
|
|
529
|
+
* Get the socket options from the client.
|
|
530
|
+
* @param baseOptions - The mongo client options.
|
|
531
|
+
* @returns ClientEncryptionSocketOptions
|
|
532
|
+
*/
|
|
533
|
+
function autoSelectSocketOptions(baseOptions) {
|
|
534
|
+
const options = { autoSelectFamily: true };
|
|
535
|
+
if ("autoSelectFamily" in baseOptions) options.autoSelectFamily = baseOptions.autoSelectFamily;
|
|
536
|
+
if ("autoSelectFamilyAttemptTimeout" in baseOptions) options.autoSelectFamilyAttemptTimeout = baseOptions.autoSelectFamilyAttemptTimeout;
|
|
537
|
+
return options;
|
|
538
|
+
}
|
|
539
|
+
}));
|
|
540
|
+
|
|
541
|
+
//#endregion
|
|
542
|
+
export default require_client_encryption();
|
|
543
|
+
|
|
544
|
+
export { require_client_encryption };
|
|
545
|
+
//# sourceMappingURL=client_encryption.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client_encryption.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/client_encryption.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ClientEncryption = void 0;\nexports.autoSelectSocketOptions = autoSelectSocketOptions;\nconst bson_1 = require(\"../bson\");\nconst deps_1 = require(\"../deps\");\nconst timeout_1 = require(\"../timeout\");\nconst utils_1 = require(\"../utils\");\nconst cryptoCallbacks = require(\"./crypto_callbacks\");\nconst errors_1 = require(\"./errors\");\nconst index_1 = require(\"./providers/index\");\nconst state_machine_1 = require(\"./state_machine\");\n/**\n * @public\n * The public interface for explicit in-use encryption\n */\nclass ClientEncryption {\n /** @internal */\n static getMongoCrypt() {\n const encryption = (0, deps_1.getMongoDBClientEncryption)();\n if ('kModuleError' in encryption) {\n throw encryption.kModuleError;\n }\n return encryption.MongoCrypt;\n }\n /**\n * Create a new encryption instance\n *\n * @example\n * ```ts\n * new ClientEncryption(mongoClient, {\n * keyVaultNamespace: 'client.encryption',\n * kmsProviders: {\n * local: {\n * key: masterKey // The master key used for encryption/decryption. A 96-byte long Buffer\n * }\n * }\n * });\n * ```\n *\n * @example\n * ```ts\n * new ClientEncryption(mongoClient, {\n * keyVaultNamespace: 'client.encryption',\n * kmsProviders: {\n * aws: {\n * accessKeyId: AWS_ACCESS_KEY,\n * secretAccessKey: AWS_SECRET_KEY\n * }\n * }\n * });\n * ```\n */\n constructor(client, options) {\n this._client = client;\n this._proxyOptions = options.proxyOptions ?? {};\n this._tlsOptions = options.tlsOptions ?? {};\n this._kmsProviders = options.kmsProviders || {};\n const { timeoutMS } = (0, utils_1.resolveTimeoutOptions)(client, options);\n this._timeoutMS = timeoutMS;\n this._credentialProviders = options.credentialProviders;\n if (options.credentialProviders?.aws && !(0, index_1.isEmptyCredentials)('aws', this._kmsProviders)) {\n throw new errors_1.MongoCryptInvalidArgumentError('Can only provide a custom AWS credential provider when the state machine is configured for automatic AWS credential fetching');\n }\n if (options.keyVaultNamespace == null) {\n throw new errors_1.MongoCryptInvalidArgumentError('Missing required option `keyVaultNamespace`');\n }\n const mongoCryptOptions = {\n ...options,\n cryptoCallbacks,\n kmsProviders: !Buffer.isBuffer(this._kmsProviders)\n ? (0, bson_1.serialize)(this._kmsProviders)\n : this._kmsProviders\n };\n this._keyVaultNamespace = options.keyVaultNamespace;\n this._keyVaultClient = options.keyVaultClient || client;\n const MongoCrypt = ClientEncryption.getMongoCrypt();\n this._mongoCrypt = new MongoCrypt(mongoCryptOptions);\n }\n /**\n * Creates a data key used for explicit encryption and inserts it into the key vault namespace\n *\n * @example\n * ```ts\n * // Using async/await to create a local key\n * const dataKeyId = await clientEncryption.createDataKey('local');\n * ```\n *\n * @example\n * ```ts\n * // Using async/await to create an aws key\n * const dataKeyId = await clientEncryption.createDataKey('aws', {\n * masterKey: {\n * region: 'us-east-1',\n * key: 'xxxxxxxxxxxxxx' // CMK ARN here\n * }\n * });\n * ```\n *\n * @example\n * ```ts\n * // Using async/await to create an aws key with a keyAltName\n * const dataKeyId = await clientEncryption.createDataKey('aws', {\n * masterKey: {\n * region: 'us-east-1',\n * key: 'xxxxxxxxxxxxxx' // CMK ARN here\n * },\n * keyAltNames: [ 'mySpecialKey' ]\n * });\n * ```\n */\n async createDataKey(provider, options = {}) {\n if (options.keyAltNames && !Array.isArray(options.keyAltNames)) {\n throw new errors_1.MongoCryptInvalidArgumentError(`Option \"keyAltNames\" must be an array of strings, but was of type ${typeof options.keyAltNames}.`);\n }\n let keyAltNames = undefined;\n if (options.keyAltNames && options.keyAltNames.length > 0) {\n keyAltNames = options.keyAltNames.map((keyAltName, i) => {\n if (typeof keyAltName !== 'string') {\n throw new errors_1.MongoCryptInvalidArgumentError(`Option \"keyAltNames\" must be an array of strings, but item at index ${i} was of type ${typeof keyAltName}`);\n }\n return (0, bson_1.serialize)({ keyAltName });\n });\n }\n let keyMaterial = undefined;\n if (options.keyMaterial) {\n keyMaterial = (0, bson_1.serialize)({ keyMaterial: options.keyMaterial });\n }\n const dataKeyBson = (0, bson_1.serialize)({\n provider,\n ...options.masterKey\n });\n const context = this._mongoCrypt.makeDataKeyContext(dataKeyBson, {\n keyAltNames,\n keyMaterial\n });\n const stateMachine = new state_machine_1.StateMachine({\n proxyOptions: this._proxyOptions,\n tlsOptions: this._tlsOptions,\n socketOptions: autoSelectSocketOptions(this._client.s.options)\n });\n const timeoutContext = options?.timeoutContext ??\n timeout_1.TimeoutContext.create((0, utils_1.resolveTimeoutOptions)(this._client, { timeoutMS: this._timeoutMS }));\n const dataKey = (0, bson_1.deserialize)(await stateMachine.execute(this, context, { timeoutContext }));\n const { db: dbName, collection: collectionName } = utils_1.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);\n const { insertedId } = await this._keyVaultClient\n .db(dbName)\n .collection(collectionName)\n .insertOne(dataKey, {\n writeConcern: { w: 'majority' },\n timeoutMS: timeoutContext?.csotEnabled()\n ? timeoutContext?.getRemainingTimeMSOrThrow()\n : undefined\n });\n return insertedId;\n }\n /**\n * Searches the keyvault for any data keys matching the provided filter. If there are matches, rewrapManyDataKey then attempts to re-wrap the data keys using the provided options.\n *\n * If no matches are found, then no bulk write is performed.\n *\n * @example\n * ```ts\n * // rewrapping all data data keys (using a filter that matches all documents)\n * const filter = {};\n *\n * const result = await clientEncryption.rewrapManyDataKey(filter);\n * if (result.bulkWriteResult != null) {\n * // keys were re-wrapped, results will be available in the bulkWrite object.\n * }\n * ```\n *\n * @example\n * ```ts\n * // attempting to rewrap all data keys with no matches\n * const filter = { _id: new Binary() } // assume _id matches no documents in the database\n * const result = await clientEncryption.rewrapManyDataKey(filter);\n *\n * if (result.bulkWriteResult == null) {\n * // no keys matched, `bulkWriteResult` does not exist on the result object\n * }\n * ```\n */\n async rewrapManyDataKey(filter, options) {\n let keyEncryptionKeyBson = undefined;\n if (options) {\n const keyEncryptionKey = Object.assign({ provider: options.provider }, options.masterKey);\n keyEncryptionKeyBson = (0, bson_1.serialize)(keyEncryptionKey);\n }\n const filterBson = (0, bson_1.serialize)(filter);\n const context = this._mongoCrypt.makeRewrapManyDataKeyContext(filterBson, keyEncryptionKeyBson);\n const stateMachine = new state_machine_1.StateMachine({\n proxyOptions: this._proxyOptions,\n tlsOptions: this._tlsOptions,\n socketOptions: autoSelectSocketOptions(this._client.s.options)\n });\n const timeoutContext = timeout_1.TimeoutContext.create((0, utils_1.resolveTimeoutOptions)(this._client, { timeoutMS: this._timeoutMS }));\n const { v: dataKeys } = (0, bson_1.deserialize)(await stateMachine.execute(this, context, { timeoutContext }));\n if (dataKeys.length === 0) {\n return {};\n }\n const { db: dbName, collection: collectionName } = utils_1.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);\n const replacements = dataKeys.map((key) => ({\n updateOne: {\n filter: { _id: key._id },\n update: {\n $set: {\n masterKey: key.masterKey,\n keyMaterial: key.keyMaterial\n },\n $currentDate: {\n updateDate: true\n }\n }\n }\n }));\n const result = await this._keyVaultClient\n .db(dbName)\n .collection(collectionName)\n .bulkWrite(replacements, {\n writeConcern: { w: 'majority' },\n timeoutMS: timeoutContext.csotEnabled() ? timeoutContext?.remainingTimeMS : undefined\n });\n return { bulkWriteResult: result };\n }\n /**\n * Deletes the key with the provided id from the keyvault, if it exists.\n *\n * @example\n * ```ts\n * // delete a key by _id\n * const id = new Binary(); // id is a bson binary subtype 4 object\n * const { deletedCount } = await clientEncryption.deleteKey(id);\n *\n * if (deletedCount != null && deletedCount > 0) {\n * // successful deletion\n * }\n * ```\n *\n */\n async deleteKey(_id) {\n const { db: dbName, collection: collectionName } = utils_1.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);\n return await this._keyVaultClient\n .db(dbName)\n .collection(collectionName)\n .deleteOne({ _id }, { writeConcern: { w: 'majority' }, timeoutMS: this._timeoutMS });\n }\n /**\n * Finds all the keys currently stored in the keyvault.\n *\n * This method will not throw.\n *\n * @returns a FindCursor over all keys in the keyvault.\n * @example\n * ```ts\n * // fetching all keys\n * const keys = await clientEncryption.getKeys().toArray();\n * ```\n */\n getKeys() {\n const { db: dbName, collection: collectionName } = utils_1.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);\n return this._keyVaultClient\n .db(dbName)\n .collection(collectionName)\n .find({}, { readConcern: { level: 'majority' }, timeoutMS: this._timeoutMS });\n }\n /**\n * Finds a key in the keyvault with the specified _id.\n *\n * Returns a promise that either resolves to a {@link DataKey} if a document matches the key or null if no documents\n * match the id. The promise rejects with an error if an error is thrown.\n * @example\n * ```ts\n * // getting a key by id\n * const id = new Binary(); // id is a bson binary subtype 4 object\n * const key = await clientEncryption.getKey(id);\n * if (!key) {\n * // key is null if there was no matching key\n * }\n * ```\n */\n async getKey(_id) {\n const { db: dbName, collection: collectionName } = utils_1.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);\n return await this._keyVaultClient\n .db(dbName)\n .collection(collectionName)\n .findOne({ _id }, { readConcern: { level: 'majority' }, timeoutMS: this._timeoutMS });\n }\n /**\n * Finds a key in the keyvault which has the specified keyAltName.\n *\n * @param keyAltName - a keyAltName to search for a key\n * @returns Returns a promise that either resolves to a {@link DataKey} if a document matches the key or null if no documents\n * match the keyAltName. The promise rejects with an error if an error is thrown.\n * @example\n * ```ts\n * // get a key by alt name\n * const keyAltName = 'keyAltName';\n * const key = await clientEncryption.getKeyByAltName(keyAltName);\n * if (!key) {\n * // key is null if there is no matching key\n * }\n * ```\n */\n async getKeyByAltName(keyAltName) {\n const { db: dbName, collection: collectionName } = utils_1.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);\n return await this._keyVaultClient\n .db(dbName)\n .collection(collectionName)\n .findOne({ keyAltNames: keyAltName }, { readConcern: { level: 'majority' }, timeoutMS: this._timeoutMS });\n }\n /**\n * Adds a keyAltName to a key identified by the provided _id.\n *\n * This method resolves to/returns the *old* key value (prior to adding the new altKeyName).\n *\n * @param _id - The id of the document to update.\n * @param keyAltName - a keyAltName to search for a key\n * @returns Returns a promise that either resolves to a {@link DataKey} if a document matches the key or null if no documents\n * match the id. The promise rejects with an error if an error is thrown.\n * @example\n * ```ts\n * // adding an keyAltName to a data key\n * const id = new Binary(); // id is a bson binary subtype 4 object\n * const keyAltName = 'keyAltName';\n * const oldKey = await clientEncryption.addKeyAltName(id, keyAltName);\n * if (!oldKey) {\n * // null is returned if there is no matching document with an id matching the supplied id\n * }\n * ```\n */\n async addKeyAltName(_id, keyAltName) {\n const { db: dbName, collection: collectionName } = utils_1.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);\n const value = await this._keyVaultClient\n .db(dbName)\n .collection(collectionName)\n .findOneAndUpdate({ _id }, { $addToSet: { keyAltNames: keyAltName } }, { writeConcern: { w: 'majority' }, returnDocument: 'before', timeoutMS: this._timeoutMS });\n return value;\n }\n /**\n * Adds a keyAltName to a key identified by the provided _id.\n *\n * This method resolves to/returns the *old* key value (prior to removing the new altKeyName).\n *\n * If the removed keyAltName is the last keyAltName for that key, the `altKeyNames` property is unset from the document.\n *\n * @param _id - The id of the document to update.\n * @param keyAltName - a keyAltName to search for a key\n * @returns Returns a promise that either resolves to a {@link DataKey} if a document matches the key or null if no documents\n * match the id. The promise rejects with an error if an error is thrown.\n * @example\n * ```ts\n * // removing a key alt name from a data key\n * const id = new Binary(); // id is a bson binary subtype 4 object\n * const keyAltName = 'keyAltName';\n * const oldKey = await clientEncryption.removeKeyAltName(id, keyAltName);\n *\n * if (!oldKey) {\n * // null is returned if there is no matching document with an id matching the supplied id\n * }\n * ```\n */\n async removeKeyAltName(_id, keyAltName) {\n const { db: dbName, collection: collectionName } = utils_1.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);\n const pipeline = [\n {\n $set: {\n keyAltNames: {\n $cond: [\n {\n $eq: ['$keyAltNames', [keyAltName]]\n },\n '$$REMOVE',\n {\n $filter: {\n input: '$keyAltNames',\n cond: {\n $ne: ['$$this', keyAltName]\n }\n }\n }\n ]\n }\n }\n }\n ];\n const value = await this._keyVaultClient\n .db(dbName)\n .collection(collectionName)\n .findOneAndUpdate({ _id }, pipeline, {\n writeConcern: { w: 'majority' },\n returnDocument: 'before',\n timeoutMS: this._timeoutMS\n });\n return value;\n }\n /**\n * A convenience method for creating an encrypted collection.\n * This method will create data keys for any encryptedFields that do not have a `keyId` defined\n * and then create a new collection with the full set of encryptedFields.\n *\n * @param db - A Node.js driver Db object with which to create the collection\n * @param name - The name of the collection to be created\n * @param options - Options for createDataKey and for createCollection\n * @returns created collection and generated encryptedFields\n * @throws MongoCryptCreateDataKeyError - If part way through the process a createDataKey invocation fails, an error will be rejected that has the partial `encryptedFields` that were created.\n * @throws MongoCryptCreateEncryptedCollectionError - If creating the collection fails, an error will be rejected that has the entire `encryptedFields` that were created.\n */\n async createEncryptedCollection(db, name, options) {\n const { provider, masterKey, createCollectionOptions: { encryptedFields: { ...encryptedFields }, ...createCollectionOptions } } = options;\n const timeoutContext = this._timeoutMS != null\n ? timeout_1.TimeoutContext.create((0, utils_1.resolveTimeoutOptions)(this._client, { timeoutMS: this._timeoutMS }))\n : undefined;\n if (Array.isArray(encryptedFields.fields)) {\n const createDataKeyPromises = encryptedFields.fields.map(async (field) => field == null || typeof field !== 'object' || field.keyId != null\n ? field\n : {\n ...field,\n keyId: await this.createDataKey(provider, {\n masterKey,\n // clone the timeoutContext\n // in order to avoid sharing the same timeout for server selection and connection checkout across different concurrent operations\n timeoutContext: timeoutContext?.csotEnabled() ? timeoutContext?.clone() : undefined\n })\n });\n const createDataKeyResolutions = await Promise.allSettled(createDataKeyPromises);\n encryptedFields.fields = createDataKeyResolutions.map((resolution, index) => resolution.status === 'fulfilled' ? resolution.value : encryptedFields.fields[index]);\n const rejection = createDataKeyResolutions.find((result) => result.status === 'rejected');\n if (rejection != null) {\n throw new errors_1.MongoCryptCreateDataKeyError(encryptedFields, { cause: rejection.reason });\n }\n }\n try {\n const collection = await db.createCollection(name, {\n ...createCollectionOptions,\n encryptedFields,\n timeoutMS: timeoutContext?.csotEnabled()\n ? timeoutContext?.getRemainingTimeMSOrThrow()\n : undefined\n });\n return { collection, encryptedFields };\n }\n catch (cause) {\n throw new errors_1.MongoCryptCreateEncryptedCollectionError(encryptedFields, { cause });\n }\n }\n /**\n * Explicitly encrypt a provided value. Note that either `options.keyId` or `options.keyAltName` must\n * be specified. Specifying both `options.keyId` and `options.keyAltName` is considered an error.\n *\n * @param value - The value that you wish to serialize. Must be of a type that can be serialized into BSON\n * @param options -\n * @returns a Promise that either resolves with the encrypted value, or rejects with an error.\n *\n * @example\n * ```ts\n * // Encryption with async/await api\n * async function encryptMyData(value) {\n * const keyId = await clientEncryption.createDataKey('local');\n * return clientEncryption.encrypt(value, { keyId, algorithm: 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic' });\n * }\n * ```\n *\n * @example\n * ```ts\n * // Encryption using a keyAltName\n * async function encryptMyData(value) {\n * await clientEncryption.createDataKey('local', { keyAltNames: 'mySpecialKey' });\n * return clientEncryption.encrypt(value, { keyAltName: 'mySpecialKey', algorithm: 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic' });\n * }\n * ```\n */\n async encrypt(value, options) {\n return await this._encrypt(value, false, options);\n }\n /**\n * Encrypts a Match Expression or Aggregate Expression to query a range index.\n *\n * Only supported when queryType is \"range\" and algorithm is \"Range\".\n *\n * @param expression - a BSON document of one of the following forms:\n * 1. A Match Expression of this form:\n * `{$and: [{<field>: {$gt: <value1>}}, {<field>: {$lt: <value2> }}]}`\n * 2. An Aggregate Expression of this form:\n * `{$and: [{$gt: [<fieldpath>, <value1>]}, {$lt: [<fieldpath>, <value2>]}]}`\n *\n * `$gt` may also be `$gte`. `$lt` may also be `$lte`.\n *\n * @param options -\n * @returns Returns a Promise that either resolves with the encrypted value or rejects with an error.\n */\n async encryptExpression(expression, options) {\n return await this._encrypt(expression, true, options);\n }\n /**\n * Explicitly decrypt a provided encrypted value\n *\n * @param value - An encrypted value\n * @returns a Promise that either resolves with the decrypted value, or rejects with an error\n *\n * @example\n * ```ts\n * // Decrypting value with async/await API\n * async function decryptMyValue(value) {\n * return clientEncryption.decrypt(value);\n * }\n * ```\n */\n async decrypt(value) {\n const valueBuffer = (0, bson_1.serialize)({ v: value });\n const context = this._mongoCrypt.makeExplicitDecryptionContext(valueBuffer);\n const stateMachine = new state_machine_1.StateMachine({\n proxyOptions: this._proxyOptions,\n tlsOptions: this._tlsOptions,\n socketOptions: autoSelectSocketOptions(this._client.s.options)\n });\n const timeoutContext = this._timeoutMS != null\n ? timeout_1.TimeoutContext.create((0, utils_1.resolveTimeoutOptions)(this._client, { timeoutMS: this._timeoutMS }))\n : undefined;\n const { v } = (0, bson_1.deserialize)(await stateMachine.execute(this, context, { timeoutContext }));\n return v;\n }\n /**\n * @internal\n * Ask the user for KMS credentials.\n *\n * This returns anything that looks like the kmsProviders original input\n * option. It can be empty, and any provider specified here will override\n * the original ones.\n */\n async askForKMSCredentials() {\n return await (0, index_1.refreshKMSCredentials)(this._kmsProviders, this._credentialProviders);\n }\n static get libmongocryptVersion() {\n return ClientEncryption.getMongoCrypt().libmongocryptVersion;\n }\n /**\n * @internal\n * A helper that perform explicit encryption of values and expressions.\n * Explicitly encrypt a provided value. Note that either `options.keyId` or `options.keyAltName` must\n * be specified. Specifying both `options.keyId` and `options.keyAltName` is considered an error.\n *\n * @param value - The value that you wish to encrypt. Must be of a type that can be serialized into BSON\n * @param expressionMode - a boolean that indicates whether or not to encrypt the value as an expression\n * @param options - options to pass to encrypt\n * @returns the raw result of the call to stateMachine.execute(). When expressionMode is set to true, the return\n * value will be a bson document. When false, the value will be a BSON Binary.\n *\n */\n async _encrypt(value, expressionMode, options) {\n const { algorithm, keyId, keyAltName, contentionFactor, queryType, rangeOptions, textOptions } = options;\n const contextOptions = {\n expressionMode,\n algorithm\n };\n if (keyId) {\n contextOptions.keyId = keyId.buffer;\n }\n if (keyAltName) {\n if (keyId) {\n throw new errors_1.MongoCryptInvalidArgumentError(`\"options\" cannot contain both \"keyId\" and \"keyAltName\"`);\n }\n if (typeof keyAltName !== 'string') {\n throw new errors_1.MongoCryptInvalidArgumentError(`\"options.keyAltName\" must be of type string, but was of type ${typeof keyAltName}`);\n }\n contextOptions.keyAltName = (0, bson_1.serialize)({ keyAltName });\n }\n if (typeof contentionFactor === 'number' || typeof contentionFactor === 'bigint') {\n contextOptions.contentionFactor = contentionFactor;\n }\n if (typeof queryType === 'string') {\n contextOptions.queryType = queryType;\n }\n if (typeof rangeOptions === 'object') {\n contextOptions.rangeOptions = (0, bson_1.serialize)(rangeOptions);\n }\n if (typeof textOptions === 'object') {\n contextOptions.textOptions = (0, bson_1.serialize)(textOptions);\n }\n const valueBuffer = (0, bson_1.serialize)({ v: value });\n const stateMachine = new state_machine_1.StateMachine({\n proxyOptions: this._proxyOptions,\n tlsOptions: this._tlsOptions,\n socketOptions: autoSelectSocketOptions(this._client.s.options)\n });\n const context = this._mongoCrypt.makeExplicitEncryptionContext(valueBuffer, contextOptions);\n const timeoutContext = this._timeoutMS != null\n ? timeout_1.TimeoutContext.create((0, utils_1.resolveTimeoutOptions)(this._client, { timeoutMS: this._timeoutMS }))\n : undefined;\n const { v } = (0, bson_1.deserialize)(await stateMachine.execute(this, context, { timeoutContext }));\n return v;\n }\n}\nexports.ClientEncryption = ClientEncryption;\n/**\n * Get the socket options from the client.\n * @param baseOptions - The mongo client options.\n * @returns ClientEncryptionSocketOptions\n */\nfunction autoSelectSocketOptions(baseOptions) {\n const options = { autoSelectFamily: true };\n if ('autoSelectFamily' in baseOptions) {\n options.autoSelectFamily = baseOptions.autoSelectFamily;\n }\n if ('autoSelectFamilyAttemptTimeout' in baseOptions) {\n options.autoSelectFamilyAttemptTimeout = baseOptions.autoSelectFamilyAttemptTimeout;\n }\n return options;\n}\n//# sourceMappingURL=client_encryption.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;AACA,QAAO,eAAe,S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