pecunia-root 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/rolldown_runtime.mjs +8 -0
- package/dist/adapters/drizzle-adapter/index.mjs +4 -1
- package/dist/adapters/drizzle-adapter/index.mjs.map +1 -1
- package/dist/adapters/mongodb-adapter/index.mjs +12 -11
- package/dist/adapters/mongodb-adapter/index.mjs.map +1 -1
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/code-points-data.mjs +14 -0
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/code-points-data.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/index.mjs +54 -0
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/memory-code-points.mjs +36 -0
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/memory-code-points.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/node.mjs +27 -0
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/node.mjs.map +1 -0
- package/dist/node_modules/.pnpm/bson@6.10.4/node_modules/bson/lib/bson.mjs +3728 -0
- package/dist/node_modules/.pnpm/bson@6.10.4/node_modules/bson/lib/bson.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/column-builder.mjs +108 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/column-builder.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/column.mjs +55 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/column.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/entity.mjs +18 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/entity.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/pg-core/columns/common.mjs +183 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/pg-core/columns/common.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/pg-core/columns/enum.mjs +35 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/pg-core/columns/enum.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/pg-core/foreign-keys.mjs +68 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/pg-core/foreign-keys.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/pg-core/unique-constraint.mjs +56 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/pg-core/unique-constraint.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/pg-core/utils/array.mjs +65 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/pg-core/utils/array.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/sql/expressions/conditions.mjs +69 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/sql/expressions/conditions.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/sql/expressions/select.mjs +13 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/sql/expressions/select.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/sql/functions/aggregate.mjs +10 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/sql/functions/aggregate.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/sql/sql.mjs +366 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/sql/sql.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/subquery.mjs +22 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/subquery.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/table.mjs +62 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/table.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/table.utils.mjs +6 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/table.utils.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/tracing-utils.mjs +8 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/tracing-utils.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/tracing.mjs +8 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/tracing.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/view-common.mjs +6 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/view-common.mjs.map +1 -0
- package/dist/node_modules/.pnpm/memory-pager@1.5.0/node_modules/memory-pager/index.mjs +137 -0
- package/dist/node_modules/.pnpm/memory-pager@1.5.0/node_modules/memory-pager/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/index.mjs +211 -0
- package/dist/node_modules/.pnpm/mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/redact.mjs +95 -0
- package/dist/node_modules/.pnpm/mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/redact.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/admin.mjs +158 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/admin.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bson.mjs +195 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bson.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/common.mjs +710 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/common.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/ordered.mjs +53 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/ordered.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/unordered.mjs +63 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/unordered.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/change_stream.mjs +368 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/change_stream.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/auto_encrypter.mjs +234 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/auto_encrypter.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/client_encryption.mjs +545 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/client_encryption.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/crypto_callbacks.mjs +83 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/crypto_callbacks.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/errors.mjs +146 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/errors.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/mongocryptd_manager.mjs +58 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/mongocryptd_manager.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/aws.mjs +30 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/aws.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/azure.mjs +135 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/azure.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/gcp.mjs +25 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/gcp.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/index.mjs +47 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/state_machine.mjs +362 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/state_machine.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/auth_provider.mjs +58 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/auth_provider.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/aws_temporary_credentials.mjs +123 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/aws_temporary_credentials.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/gssapi.mjs +128 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/gssapi.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongo_credentials.mjs +133 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongo_credentials.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_aws.mjs +126 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_aws.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/automated_callback_workflow.mjs +79 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/automated_callback_workflow.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_machine_workflow.mjs +65 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_machine_workflow.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_workflow.mjs +127 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_workflow.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/command_builders.mjs +47 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/command_builders.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/gcp_machine_workflow.mjs +44 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/gcp_machine_workflow.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/human_callback_workflow.mjs +101 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/human_callback_workflow.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/k8s_machine_workflow.mjs +33 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/k8s_machine_workflow.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_cache.mjs +53 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_cache.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_machine_workflow.mjs +29 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_machine_workflow.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc.mjs +83 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/plain.mjs +36 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/plain.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/providers.mjs +32 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/providers.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/scram.mjs +206 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/scram.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/x509.mjs +45 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/x509.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/command_monitoring_events.mjs +213 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/command_monitoring_events.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/commands.mjs +411 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/commands.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connect.mjs +288 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connect.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection.mjs +423 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool.mjs +483 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool_events.mjs +207 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool_events.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/errors.mjs +116 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/errors.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/handshake/client_metadata.mjs +183 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/handshake/client_metadata.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/metrics.mjs +55 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/metrics.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/stream_description.mjs +60 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/stream_description.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/compression.mjs +139 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/compression.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/constants.mjs +28 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/constants.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_data.mjs +117 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_data.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_demand/document.mjs +182 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_demand/document.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/responses.mjs +304 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/responses.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/shared.mjs +34 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/shared.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/collection.mjs +739 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/collection.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/connection_string.mjs +805 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/connection_string.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/constants.mjs +174 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/constants.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/abstract_cursor.mjs +726 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/abstract_cursor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/aggregation_cursor.mjs +172 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/aggregation_cursor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/change_stream_cursor.mjs +103 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/change_stream_cursor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/client_bulk_write_cursor.mjs +66 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/client_bulk_write_cursor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/explainable_cursor.mjs +41 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/explainable_cursor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/find_cursor.mjs +365 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/find_cursor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_collections_cursor.mjs +50 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_collections_cursor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_indexes_cursor.mjs +48 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_indexes_cursor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_search_indexes_cursor.mjs +23 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_search_indexes_cursor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/run_command_cursor.mjs +106 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/run_command_cursor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/db.mjs +428 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/db.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/deps.mjs +124 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/deps.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/encrypter.mjs +95 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/encrypter.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/error.mjs +1305 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/error.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/explain.mjs +59 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/explain.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/download.mjs +250 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/download.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/index.mjs +170 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/upload.mjs +315 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/upload.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/index.mjs +925 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client.mjs +520 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client_auth_providers.mjs +90 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client_auth_providers.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_logger.mjs +582 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_logger.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_types.mjs +64 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_types.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/aggregate.mjs +86 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/aggregate.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/client_bulk_write.mjs +60 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/client_bulk_write.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/command_builder.mjs +264 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/command_builder.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/executor.mjs +109 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/executor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/results_merger.mjs +172 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/results_merger.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/command.mjs +68 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/command.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/count.mjs +53 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/count.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/create_collection.mjs +123 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/create_collection.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/delete.mjs +119 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/delete.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/distinct.mjs +65 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/distinct.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/drop.mjs +97 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/drop.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/estimated_document_count.mjs +47 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/estimated_document_count.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/execute_operation.mjs +188 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/execute_operation.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find.mjs +103 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find_and_modify.mjs +136 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find_and_modify.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/get_more.mjs +61 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/get_more.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/indexes.mjs +179 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/indexes.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/insert.mjs +77 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/insert.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/kill_cursors.mjs +48 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/kill_cursors.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_collections.mjs +60 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_collections.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_databases.mjs +43 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_databases.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/operation.mjs +105 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/operation.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/profiling_level.mjs +50 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/profiling_level.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/remove_user.mjs +39 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/remove_user.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/rename.mjs +49 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/rename.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/run_command.mjs +58 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/run_command.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/create.mjs +46 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/create.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/drop.mjs +48 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/drop.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/update.mjs +46 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/update.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/set_profiling_level.mjs +67 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/set_profiling_level.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/stats.mjs +37 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/stats.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/update.mjs +171 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/update.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/validate_collection.mjs +45 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/validate_collection.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_concern.mjs +71 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_concern.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_preference.mjs +165 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_preference.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/resource_management.mjs +62 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/resource_management.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/common.mjs +51 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/common.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/events.mjs +156 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/events.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/monitor.mjs +477 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/monitor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server.mjs +315 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_description.mjs +157 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_description.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection.mjs +184 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection_events.mjs +96 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection_events.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/srv_polling.mjs +107 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/srv_polling.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology.mjs +540 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology_description.mjs +298 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology_description.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sessions.mjs +623 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sessions.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sort.mjs +91 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sort.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/timeout.mjs +254 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/timeout.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/transactions.mjs +138 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/transactions.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/utils.mjs +993 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/utils.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/write_concern.mjs +81 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/write_concern.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/package.mjs +171 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/package.mjs.map +1 -0
- package/dist/node_modules/.pnpm/punycode@2.3.1/node_modules/punycode/punycode.mjs +295 -0
- package/dist/node_modules/.pnpm/punycode@2.3.1/node_modules/punycode/punycode.mjs.map +1 -0
- package/dist/node_modules/.pnpm/sparse-bitfield@3.0.3/node_modules/sparse-bitfield/index.mjs +81 -0
- package/dist/node_modules/.pnpm/sparse-bitfield@3.0.3/node_modules/sparse-bitfield/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/index.mjs +206 -0
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/mappingTable.mjs +33590 -0
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/mappingTable.mjs.map +1 -0
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/regexes.mjs +37 -0
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/regexes.mjs.map +1 -0
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/statusMapping.mjs +18 -0
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/statusMapping.mjs.map +1 -0
- package/dist/node_modules/.pnpm/webidl-conversions@7.0.0/node_modules/webidl-conversions/lib/index.mjs +252 -0
- package/dist/node_modules/.pnpm/webidl-conversions@7.0.0/node_modules/webidl-conversions/lib/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/index.mjs +41 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/Function.mjs +41 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/Function.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL-impl.mjs +173 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL-impl.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL.mjs +334 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams-impl.mjs +90 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams-impl.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams.mjs +356 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/encoding.mjs +23 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/encoding.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/infra.mjs +29 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/infra.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/percent-encoding.mjs +140 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/percent-encoding.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/url-state-machine.mjs +831 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/url-state-machine.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/urlencoded.mjs +77 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/urlencoded.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/utils.mjs +147 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/utils.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/webidl2js-wrapper.mjs +17 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/webidl2js-wrapper.mjs.map +1 -0
- package/package.json +1 -39
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { __commonJSMin, __require } from "../../../../../../_virtual/rolldown_runtime.mjs";
|
|
2
|
+
import { require_utils } from "./utils.mjs";
|
|
3
|
+
import { require_mongo_logger } from "./mongo_logger.mjs";
|
|
4
|
+
|
|
5
|
+
//#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_types.js
|
|
6
|
+
var require_mongo_types = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.CancellationToken = exports.TypedEventEmitter = void 0;
|
|
9
|
+
const events_1 = __require("events");
|
|
10
|
+
const mongo_logger_1 = require_mongo_logger();
|
|
11
|
+
const utils_1 = require_utils();
|
|
12
|
+
/**
|
|
13
|
+
* Typescript type safe event emitter
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
var TypedEventEmitter = class extends events_1.EventEmitter {
|
|
17
|
+
/** @internal */
|
|
18
|
+
emitAndLog(event, ...args) {
|
|
19
|
+
this.emit(event, ...args);
|
|
20
|
+
if (this.component) this.mongoLogger?.debug(this.component, args[0]);
|
|
21
|
+
}
|
|
22
|
+
/** @internal */
|
|
23
|
+
emitAndLogHeartbeat(event, topologyId, serverConnectionId, ...args) {
|
|
24
|
+
this.emit(event, ...args);
|
|
25
|
+
if (this.component) {
|
|
26
|
+
const loggableHeartbeatEvent = {
|
|
27
|
+
topologyId,
|
|
28
|
+
serverConnectionId: serverConnectionId ?? null,
|
|
29
|
+
...args[0]
|
|
30
|
+
};
|
|
31
|
+
this.mongoLogger?.debug(this.component, loggableHeartbeatEvent);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/** @internal */
|
|
35
|
+
emitAndLogCommand(monitorCommands, event, databaseName, connectionEstablished, ...args) {
|
|
36
|
+
if (monitorCommands) this.emit(event, ...args);
|
|
37
|
+
if (connectionEstablished) {
|
|
38
|
+
const loggableCommandEvent = {
|
|
39
|
+
databaseName,
|
|
40
|
+
...args[0]
|
|
41
|
+
};
|
|
42
|
+
this.mongoLogger?.debug(mongo_logger_1.MongoLoggableComponent.COMMAND, loggableCommandEvent);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
exports.TypedEventEmitter = TypedEventEmitter;
|
|
47
|
+
/**
|
|
48
|
+
* @public
|
|
49
|
+
* @deprecated Will be removed in favor of `AbortSignal` in the next major release.
|
|
50
|
+
*/
|
|
51
|
+
var CancellationToken = class extends TypedEventEmitter {
|
|
52
|
+
constructor(...args) {
|
|
53
|
+
super(...args);
|
|
54
|
+
this.on("error", utils_1.noop);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
exports.CancellationToken = CancellationToken;
|
|
58
|
+
}));
|
|
59
|
+
|
|
60
|
+
//#endregion
|
|
61
|
+
export default require_mongo_types();
|
|
62
|
+
|
|
63
|
+
export { require_mongo_types };
|
|
64
|
+
//# sourceMappingURL=mongo_types.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mongo_types.mjs","names":[],"sources":["../../../../../../../../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_types.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CancellationToken = exports.TypedEventEmitter = void 0;\nconst events_1 = require(\"events\");\nconst mongo_logger_1 = require(\"./mongo_logger\");\nconst utils_1 = require(\"./utils\");\n/**\n * Typescript type safe event emitter\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging\nclass TypedEventEmitter extends events_1.EventEmitter {\n /** @internal */\n emitAndLog(event, ...args) {\n this.emit(event, ...args);\n if (this.component)\n this.mongoLogger?.debug(this.component, args[0]);\n }\n /** @internal */\n emitAndLogHeartbeat(event, topologyId, serverConnectionId, ...args) {\n this.emit(event, ...args);\n if (this.component) {\n const loggableHeartbeatEvent = {\n topologyId: topologyId,\n serverConnectionId: serverConnectionId ?? null,\n ...args[0]\n };\n this.mongoLogger?.debug(this.component, loggableHeartbeatEvent);\n }\n }\n /** @internal */\n emitAndLogCommand(monitorCommands, event, databaseName, connectionEstablished, ...args) {\n if (monitorCommands) {\n this.emit(event, ...args);\n }\n if (connectionEstablished) {\n const loggableCommandEvent = {\n databaseName: databaseName,\n ...args[0]\n };\n this.mongoLogger?.debug(mongo_logger_1.MongoLoggableComponent.COMMAND, loggableCommandEvent);\n }\n }\n}\nexports.TypedEventEmitter = TypedEventEmitter;\n/**\n * @public\n * @deprecated Will be removed in favor of `AbortSignal` in the next major release.\n */\nclass CancellationToken extends TypedEventEmitter {\n constructor(...args) {\n super(...args);\n this.on('error', utils_1.noop);\n }\n}\nexports.CancellationToken = CancellationToken;\n//# sourceMappingURL=mongo_types.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;AACA,QAAO,eAAe,SAAS,cAAc,EAAE,OAAO,MAAM,CAAC;AAC7D,SAAQ,oBAAoB,QAAQ,oBAAoB,KAAK;CAC7D,MAAM,qBAAmB,SAAS;CAClC,MAAM;CACN,MAAM;;;;;CAMN,IAAM,oBAAN,cAAgC,SAAS,aAAa;;EAElD,WAAW,OAAO,GAAG,MAAM;AACvB,QAAK,KAAK,OAAO,GAAG,KAAK;AACzB,OAAI,KAAK,UACL,MAAK,aAAa,MAAM,KAAK,WAAW,KAAK,GAAG;;;EAGxD,oBAAoB,OAAO,YAAY,oBAAoB,GAAG,MAAM;AAChE,QAAK,KAAK,OAAO,GAAG,KAAK;AACzB,OAAI,KAAK,WAAW;IAChB,MAAM,yBAAyB;KACf;KACZ,oBAAoB,sBAAsB;KAC1C,GAAG,KAAK;KACX;AACD,SAAK,aAAa,MAAM,KAAK,WAAW,uBAAuB;;;;EAIvE,kBAAkB,iBAAiB,OAAO,cAAc,uBAAuB,GAAG,MAAM;AACpF,OAAI,gBACA,MAAK,KAAK,OAAO,GAAG,KAAK;AAE7B,OAAI,uBAAuB;IACvB,MAAM,uBAAuB;KACX;KACd,GAAG,KAAK;KACX;AACD,SAAK,aAAa,MAAM,eAAe,uBAAuB,SAAS,qBAAqB;;;;AAIxG,SAAQ,oBAAoB;;;;;CAK5B,IAAM,oBAAN,cAAgC,kBAAkB;EAC9C,YAAY,GAAG,MAAM;AACjB,SAAM,GAAG,KAAK;AACd,QAAK,GAAG,SAAS,QAAQ,KAAK;;;AAGtC,SAAQ,oBAAoB"}
|
package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/aggregate.mjs
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../../../../../../_virtual/rolldown_runtime.mjs";
|
|
2
|
+
import { require_error } from "../error.mjs";
|
|
3
|
+
import { require_responses } from "../cmap/wire_protocol/responses.mjs";
|
|
4
|
+
import { require_write_concern } from "../write_concern.mjs";
|
|
5
|
+
import { require_operation } from "./operation.mjs";
|
|
6
|
+
import { require_command } from "./command.mjs";
|
|
7
|
+
|
|
8
|
+
//#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/aggregate.js
|
|
9
|
+
var require_aggregate = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.AggregateOperation = exports.DB_AGGREGATE_COLLECTION = void 0;
|
|
12
|
+
const responses_1 = require_responses();
|
|
13
|
+
const error_1 = require_error();
|
|
14
|
+
const write_concern_1 = require_write_concern();
|
|
15
|
+
const command_1 = require_command();
|
|
16
|
+
const operation_1 = require_operation();
|
|
17
|
+
/** @internal */
|
|
18
|
+
exports.DB_AGGREGATE_COLLECTION = 1;
|
|
19
|
+
/** @internal */
|
|
20
|
+
var AggregateOperation = class extends command_1.CommandOperation {
|
|
21
|
+
constructor(ns, pipeline, options) {
|
|
22
|
+
super(void 0, {
|
|
23
|
+
...options,
|
|
24
|
+
dbName: ns.db
|
|
25
|
+
});
|
|
26
|
+
this.SERVER_COMMAND_RESPONSE_TYPE = responses_1.CursorResponse;
|
|
27
|
+
this.options = { ...options };
|
|
28
|
+
this.target = ns.collection || exports.DB_AGGREGATE_COLLECTION;
|
|
29
|
+
this.pipeline = pipeline;
|
|
30
|
+
this.hasWriteStage = false;
|
|
31
|
+
if (typeof options?.out === "string") {
|
|
32
|
+
this.pipeline = this.pipeline.concat({ $out: options.out });
|
|
33
|
+
this.hasWriteStage = true;
|
|
34
|
+
} else if (pipeline.length > 0) {
|
|
35
|
+
const finalStage = pipeline[pipeline.length - 1];
|
|
36
|
+
if (finalStage.$out || finalStage.$merge) this.hasWriteStage = true;
|
|
37
|
+
}
|
|
38
|
+
if (!this.hasWriteStage) delete this.options.writeConcern;
|
|
39
|
+
if (this.explain && this.writeConcern) throw new error_1.MongoInvalidArgumentError("Option \"explain\" cannot be used on an aggregate call with writeConcern");
|
|
40
|
+
if (options?.cursor != null && typeof options.cursor !== "object") throw new error_1.MongoInvalidArgumentError("Cursor options must be an object");
|
|
41
|
+
this.SERVER_COMMAND_RESPONSE_TYPE = this.explain ? responses_1.ExplainedCursorResponse : responses_1.CursorResponse;
|
|
42
|
+
}
|
|
43
|
+
get commandName() {
|
|
44
|
+
return "aggregate";
|
|
45
|
+
}
|
|
46
|
+
get canRetryRead() {
|
|
47
|
+
return !this.hasWriteStage;
|
|
48
|
+
}
|
|
49
|
+
addToPipeline(stage) {
|
|
50
|
+
this.pipeline.push(stage);
|
|
51
|
+
}
|
|
52
|
+
buildCommandDocument() {
|
|
53
|
+
const options = this.options;
|
|
54
|
+
const command = {
|
|
55
|
+
aggregate: this.target,
|
|
56
|
+
pipeline: this.pipeline
|
|
57
|
+
};
|
|
58
|
+
if (this.hasWriteStage && this.writeConcern) write_concern_1.WriteConcern.apply(command, this.writeConcern);
|
|
59
|
+
if (options.bypassDocumentValidation === true) command.bypassDocumentValidation = options.bypassDocumentValidation;
|
|
60
|
+
if (typeof options.allowDiskUse === "boolean") command.allowDiskUse = options.allowDiskUse;
|
|
61
|
+
if (options.hint) command.hint = options.hint;
|
|
62
|
+
if (options.let) command.let = options.let;
|
|
63
|
+
if (options.comment !== void 0) command.comment = options.comment;
|
|
64
|
+
command.cursor = options.cursor || {};
|
|
65
|
+
if (options.batchSize && !this.hasWriteStage) command.cursor.batchSize = options.batchSize;
|
|
66
|
+
return command;
|
|
67
|
+
}
|
|
68
|
+
handleOk(response) {
|
|
69
|
+
return response;
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
exports.AggregateOperation = AggregateOperation;
|
|
73
|
+
(0, operation_1.defineAspects)(AggregateOperation, [
|
|
74
|
+
operation_1.Aspect.READ_OPERATION,
|
|
75
|
+
operation_1.Aspect.RETRYABLE,
|
|
76
|
+
operation_1.Aspect.EXPLAINABLE,
|
|
77
|
+
operation_1.Aspect.CURSOR_CREATING,
|
|
78
|
+
operation_1.Aspect.SUPPORTS_RAW_DATA
|
|
79
|
+
]);
|
|
80
|
+
}));
|
|
81
|
+
|
|
82
|
+
//#endregion
|
|
83
|
+
export default require_aggregate();
|
|
84
|
+
|
|
85
|
+
export { require_aggregate };
|
|
86
|
+
//# sourceMappingURL=aggregate.mjs.map
|
package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/aggregate.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aggregate.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/aggregate.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AggregateOperation = exports.DB_AGGREGATE_COLLECTION = void 0;\nconst responses_1 = require(\"../cmap/wire_protocol/responses\");\nconst error_1 = require(\"../error\");\nconst write_concern_1 = require(\"../write_concern\");\nconst command_1 = require(\"./command\");\nconst operation_1 = require(\"./operation\");\n/** @internal */\nexports.DB_AGGREGATE_COLLECTION = 1;\n/** @internal */\nclass AggregateOperation extends command_1.CommandOperation {\n constructor(ns, pipeline, options) {\n super(undefined, { ...options, dbName: ns.db });\n this.SERVER_COMMAND_RESPONSE_TYPE = responses_1.CursorResponse;\n this.options = { ...options };\n // Covers when ns.collection is null, undefined or the empty string, use DB_AGGREGATE_COLLECTION\n this.target = ns.collection || exports.DB_AGGREGATE_COLLECTION;\n this.pipeline = pipeline;\n // determine if we have a write stage, override read preference if so\n this.hasWriteStage = false;\n if (typeof options?.out === 'string') {\n this.pipeline = this.pipeline.concat({ $out: options.out });\n this.hasWriteStage = true;\n }\n else if (pipeline.length > 0) {\n const finalStage = pipeline[pipeline.length - 1];\n if (finalStage.$out || finalStage.$merge) {\n this.hasWriteStage = true;\n }\n }\n if (!this.hasWriteStage) {\n delete this.options.writeConcern;\n }\n if (this.explain && this.writeConcern) {\n throw new error_1.MongoInvalidArgumentError('Option \"explain\" cannot be used on an aggregate call with writeConcern');\n }\n if (options?.cursor != null && typeof options.cursor !== 'object') {\n throw new error_1.MongoInvalidArgumentError('Cursor options must be an object');\n }\n this.SERVER_COMMAND_RESPONSE_TYPE = this.explain ? responses_1.ExplainedCursorResponse : responses_1.CursorResponse;\n }\n get commandName() {\n return 'aggregate';\n }\n get canRetryRead() {\n return !this.hasWriteStage;\n }\n addToPipeline(stage) {\n this.pipeline.push(stage);\n }\n buildCommandDocument() {\n const options = this.options;\n const command = { aggregate: this.target, pipeline: this.pipeline };\n if (this.hasWriteStage && this.writeConcern) {\n write_concern_1.WriteConcern.apply(command, this.writeConcern);\n }\n if (options.bypassDocumentValidation === true) {\n command.bypassDocumentValidation = options.bypassDocumentValidation;\n }\n if (typeof options.allowDiskUse === 'boolean') {\n command.allowDiskUse = options.allowDiskUse;\n }\n if (options.hint) {\n command.hint = options.hint;\n }\n if (options.let) {\n command.let = options.let;\n }\n // we check for undefined specifically here to allow falsy values\n // eslint-disable-next-line no-restricted-syntax\n if (options.comment !== undefined) {\n command.comment = options.comment;\n }\n command.cursor = options.cursor || {};\n if (options.batchSize && !this.hasWriteStage) {\n command.cursor.batchSize = options.batchSize;\n }\n return command;\n }\n handleOk(response) {\n return response;\n }\n}\nexports.AggregateOperation = AggregateOperation;\n(0, operation_1.defineAspects)(AggregateOperation, [\n operation_1.Aspect.READ_OPERATION,\n operation_1.Aspect.RETRYABLE,\n operation_1.Aspect.EXPLAINABLE,\n operation_1.Aspect.CURSOR_CREATING,\n operation_1.Aspect.SUPPORTS_RAW_DATA\n]);\n//# sourceMappingURL=aggregate.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;AACA,QAAO,eAAe,SAAS,cAAc,EAAE,OAAO,MAAM,CAAC;AAC7D,SAAQ,qBAAqB,QAAQ,0BAA0B,KAAK;CACpE,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;;AAEN,SAAQ,0BAA0B;;CAElC,IAAM,qBAAN,cAAiC,UAAU,iBAAiB;EACxD,YAAY,IAAI,UAAU,SAAS;AAC/B,SAAM,QAAW;IAAE,GAAG;IAAS,QAAQ,GAAG;IAAI,CAAC;AAC/C,QAAK,+BAA+B,YAAY;AAChD,QAAK,UAAU,EAAE,GAAG,SAAS;AAE7B,QAAK,SAAS,GAAG,cAAc,QAAQ;AACvC,QAAK,WAAW;AAEhB,QAAK,gBAAgB;AACrB,OAAI,OAAO,SAAS,QAAQ,UAAU;AAClC,SAAK,WAAW,KAAK,SAAS,OAAO,EAAE,MAAM,QAAQ,KAAK,CAAC;AAC3D,SAAK,gBAAgB;cAEhB,SAAS,SAAS,GAAG;IAC1B,MAAM,aAAa,SAAS,SAAS,SAAS;AAC9C,QAAI,WAAW,QAAQ,WAAW,OAC9B,MAAK,gBAAgB;;AAG7B,OAAI,CAAC,KAAK,cACN,QAAO,KAAK,QAAQ;AAExB,OAAI,KAAK,WAAW,KAAK,aACrB,OAAM,IAAI,QAAQ,0BAA0B,2EAAyE;AAEzH,OAAI,SAAS,UAAU,QAAQ,OAAO,QAAQ,WAAW,SACrD,OAAM,IAAI,QAAQ,0BAA0B,mCAAmC;AAEnF,QAAK,+BAA+B,KAAK,UAAU,YAAY,0BAA0B,YAAY;;EAEzG,IAAI,cAAc;AACd,UAAO;;EAEX,IAAI,eAAe;AACf,UAAO,CAAC,KAAK;;EAEjB,cAAc,OAAO;AACjB,QAAK,SAAS,KAAK,MAAM;;EAE7B,uBAAuB;GACnB,MAAM,UAAU,KAAK;GACrB,MAAM,UAAU;IAAE,WAAW,KAAK;IAAQ,UAAU,KAAK;IAAU;AACnE,OAAI,KAAK,iBAAiB,KAAK,aAC3B,iBAAgB,aAAa,MAAM,SAAS,KAAK,aAAa;AAElE,OAAI,QAAQ,6BAA6B,KACrC,SAAQ,2BAA2B,QAAQ;AAE/C,OAAI,OAAO,QAAQ,iBAAiB,UAChC,SAAQ,eAAe,QAAQ;AAEnC,OAAI,QAAQ,KACR,SAAQ,OAAO,QAAQ;AAE3B,OAAI,QAAQ,IACR,SAAQ,MAAM,QAAQ;AAI1B,OAAI,QAAQ,YAAY,OACpB,SAAQ,UAAU,QAAQ;AAE9B,WAAQ,SAAS,QAAQ,UAAU,EAAE;AACrC,OAAI,QAAQ,aAAa,CAAC,KAAK,cAC3B,SAAQ,OAAO,YAAY,QAAQ;AAEvC,UAAO;;EAEX,SAAS,UAAU;AACf,UAAO;;;AAGf,SAAQ,qBAAqB;AAC7B,EAAC,GAAG,YAAY,eAAe,oBAAoB;EAC/C,YAAY,OAAO;EACnB,YAAY,OAAO;EACnB,YAAY,OAAO;EACnB,YAAY,OAAO;EACnB,YAAY,OAAO;EACtB,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../../../../../../../_virtual/rolldown_runtime.mjs";
|
|
2
|
+
import { require_responses } from "../../cmap/wire_protocol/responses.mjs";
|
|
3
|
+
import { require_utils } from "../../utils.mjs";
|
|
4
|
+
import { require_operation } from "../operation.mjs";
|
|
5
|
+
import { require_command } from "../command.mjs";
|
|
6
|
+
|
|
7
|
+
//#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/client_bulk_write.js
|
|
8
|
+
var require_client_bulk_write = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.ClientBulkWriteOperation = void 0;
|
|
11
|
+
const responses_1 = require_responses();
|
|
12
|
+
const utils_1 = require_utils();
|
|
13
|
+
const command_1 = require_command();
|
|
14
|
+
const operation_1 = require_operation();
|
|
15
|
+
/**
|
|
16
|
+
* Executes a single client bulk write operation within a potential batch.
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
var ClientBulkWriteOperation = class extends command_1.CommandOperation {
|
|
20
|
+
get commandName() {
|
|
21
|
+
return "bulkWrite";
|
|
22
|
+
}
|
|
23
|
+
constructor(commandBuilder, options) {
|
|
24
|
+
super(void 0, options);
|
|
25
|
+
this.SERVER_COMMAND_RESPONSE_TYPE = responses_1.ClientBulkWriteCursorResponse;
|
|
26
|
+
this.commandBuilder = commandBuilder;
|
|
27
|
+
this.options = options;
|
|
28
|
+
this.ns = new utils_1.MongoDBNamespace("admin", "$cmd");
|
|
29
|
+
}
|
|
30
|
+
resetBatch() {
|
|
31
|
+
return this.commandBuilder.resetBatch();
|
|
32
|
+
}
|
|
33
|
+
get canRetryWrite() {
|
|
34
|
+
return this.commandBuilder.isBatchRetryable;
|
|
35
|
+
}
|
|
36
|
+
handleOk(response) {
|
|
37
|
+
return response;
|
|
38
|
+
}
|
|
39
|
+
buildCommandDocument(connection, _session) {
|
|
40
|
+
const command = this.commandBuilder.buildBatch(connection.description.maxMessageSizeBytes, connection.description.maxWriteBatchSize, connection.description.maxBsonObjectSize);
|
|
41
|
+
if (!this.canRetryWrite) this.options.willRetryWrite = false;
|
|
42
|
+
return command;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
exports.ClientBulkWriteOperation = ClientBulkWriteOperation;
|
|
46
|
+
(0, operation_1.defineAspects)(ClientBulkWriteOperation, [
|
|
47
|
+
operation_1.Aspect.WRITE_OPERATION,
|
|
48
|
+
operation_1.Aspect.SKIP_COLLATION,
|
|
49
|
+
operation_1.Aspect.CURSOR_CREATING,
|
|
50
|
+
operation_1.Aspect.RETRYABLE,
|
|
51
|
+
operation_1.Aspect.COMMAND_BATCHING,
|
|
52
|
+
operation_1.Aspect.SUPPORTS_RAW_DATA
|
|
53
|
+
]);
|
|
54
|
+
}));
|
|
55
|
+
|
|
56
|
+
//#endregion
|
|
57
|
+
export default require_client_bulk_write();
|
|
58
|
+
|
|
59
|
+
export { require_client_bulk_write };
|
|
60
|
+
//# sourceMappingURL=client_bulk_write.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client_bulk_write.mjs","names":[],"sources":["../../../../../../../../../../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/client_bulk_write.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ClientBulkWriteOperation = void 0;\nconst responses_1 = require(\"../../cmap/wire_protocol/responses\");\nconst utils_1 = require(\"../../utils\");\nconst command_1 = require(\"../command\");\nconst operation_1 = require(\"../operation\");\n/**\n * Executes a single client bulk write operation within a potential batch.\n * @internal\n */\nclass ClientBulkWriteOperation extends command_1.CommandOperation {\n get commandName() {\n return 'bulkWrite';\n }\n constructor(commandBuilder, options) {\n super(undefined, options);\n this.SERVER_COMMAND_RESPONSE_TYPE = responses_1.ClientBulkWriteCursorResponse;\n this.commandBuilder = commandBuilder;\n this.options = options;\n this.ns = new utils_1.MongoDBNamespace('admin', '$cmd');\n }\n resetBatch() {\n return this.commandBuilder.resetBatch();\n }\n get canRetryWrite() {\n return this.commandBuilder.isBatchRetryable;\n }\n handleOk(response) {\n return response;\n }\n buildCommandDocument(connection, _session) {\n const command = this.commandBuilder.buildBatch(connection.description.maxMessageSizeBytes, connection.description.maxWriteBatchSize, connection.description.maxBsonObjectSize);\n // Check _after_ the batch is built if we cannot retry it and override the option.\n if (!this.canRetryWrite) {\n this.options.willRetryWrite = false;\n }\n return command;\n }\n}\nexports.ClientBulkWriteOperation = ClientBulkWriteOperation;\n// Skipping the collation as it goes on the individual ops.\n(0, operation_1.defineAspects)(ClientBulkWriteOperation, [\n operation_1.Aspect.WRITE_OPERATION,\n operation_1.Aspect.SKIP_COLLATION,\n operation_1.Aspect.CURSOR_CREATING,\n operation_1.Aspect.RETRYABLE,\n operation_1.Aspect.COMMAND_BATCHING,\n operation_1.Aspect.SUPPORTS_RAW_DATA\n]);\n//# sourceMappingURL=client_bulk_write.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;AACA,QAAO,eAAe,SAAS,cAAc,EAAE,OAAO,MAAM,CAAC;AAC7D,SAAQ,2BAA2B,KAAK;CACxC,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;;;;;CAKN,IAAM,2BAAN,cAAuC,UAAU,iBAAiB;EAC9D,IAAI,cAAc;AACd,UAAO;;EAEX,YAAY,gBAAgB,SAAS;AACjC,SAAM,QAAW,QAAQ;AACzB,QAAK,+BAA+B,YAAY;AAChD,QAAK,iBAAiB;AACtB,QAAK,UAAU;AACf,QAAK,KAAK,IAAI,QAAQ,iBAAiB,SAAS,OAAO;;EAE3D,aAAa;AACT,UAAO,KAAK,eAAe,YAAY;;EAE3C,IAAI,gBAAgB;AAChB,UAAO,KAAK,eAAe;;EAE/B,SAAS,UAAU;AACf,UAAO;;EAEX,qBAAqB,YAAY,UAAU;GACvC,MAAM,UAAU,KAAK,eAAe,WAAW,WAAW,YAAY,qBAAqB,WAAW,YAAY,mBAAmB,WAAW,YAAY,kBAAkB;AAE9K,OAAI,CAAC,KAAK,cACN,MAAK,QAAQ,iBAAiB;AAElC,UAAO;;;AAGf,SAAQ,2BAA2B;AAEnC,EAAC,GAAG,YAAY,eAAe,0BAA0B;EACrD,YAAY,OAAO;EACnB,YAAY,OAAO;EACnB,YAAY,OAAO;EACnB,YAAY,OAAO;EACnB,YAAY,OAAO;EACnB,YAAY,OAAO;EACtB,CAAC"}
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../../../../../../../_virtual/rolldown_runtime.mjs";
|
|
2
|
+
import { require_bson } from "../../bson.mjs";
|
|
3
|
+
import { require_error } from "../../error.mjs";
|
|
4
|
+
import { require_utils } from "../../utils.mjs";
|
|
5
|
+
import { require_sort } from "../../sort.mjs";
|
|
6
|
+
import { require_commands } from "../../cmap/commands.mjs";
|
|
7
|
+
|
|
8
|
+
//#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/command_builder.js
|
|
9
|
+
var require_command_builder = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.buildReplaceOneOperation = exports.buildUpdateManyOperation = exports.buildUpdateOneOperation = exports.buildDeleteManyOperation = exports.buildDeleteOneOperation = exports.buildInsertOneOperation = exports.ClientBulkWriteCommandBuilder = void 0;
|
|
12
|
+
exports.buildOperation = buildOperation;
|
|
13
|
+
const bson_1 = require_bson();
|
|
14
|
+
const commands_1 = require_commands();
|
|
15
|
+
const error_1 = require_error();
|
|
16
|
+
const sort_1 = require_sort();
|
|
17
|
+
const utils_1 = require_utils();
|
|
18
|
+
/**
|
|
19
|
+
* The bytes overhead for the extra fields added post command generation.
|
|
20
|
+
*/
|
|
21
|
+
const MESSAGE_OVERHEAD_BYTES = 1e3;
|
|
22
|
+
/** @internal */
|
|
23
|
+
var ClientBulkWriteCommandBuilder = class {
|
|
24
|
+
/**
|
|
25
|
+
* Create the command builder.
|
|
26
|
+
* @param models - The client write models.
|
|
27
|
+
*/
|
|
28
|
+
constructor(models, options, pkFactory) {
|
|
29
|
+
this.models = models;
|
|
30
|
+
this.options = options;
|
|
31
|
+
this.pkFactory = pkFactory ?? utils_1.DEFAULT_PK_FACTORY;
|
|
32
|
+
this.currentModelIndex = 0;
|
|
33
|
+
this.previousModelIndex = 0;
|
|
34
|
+
this.lastOperations = [];
|
|
35
|
+
this.isBatchRetryable = true;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Gets the errorsOnly value for the command, which is the inverse of the
|
|
39
|
+
* user provided verboseResults option. Defaults to true.
|
|
40
|
+
*/
|
|
41
|
+
get errorsOnly() {
|
|
42
|
+
if ("verboseResults" in this.options) return !this.options.verboseResults;
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Determines if there is another batch to process.
|
|
47
|
+
* @returns True if not all batches have been built.
|
|
48
|
+
*/
|
|
49
|
+
hasNextBatch() {
|
|
50
|
+
return this.currentModelIndex < this.models.length;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* When we need to retry a command we need to set the current
|
|
54
|
+
* model index back to its previous value.
|
|
55
|
+
*/
|
|
56
|
+
resetBatch() {
|
|
57
|
+
this.currentModelIndex = this.previousModelIndex;
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Build a single batch of a client bulk write command.
|
|
62
|
+
* @param maxMessageSizeBytes - The max message size in bytes.
|
|
63
|
+
* @param maxWriteBatchSize - The max write batch size.
|
|
64
|
+
* @returns The client bulk write command.
|
|
65
|
+
*/
|
|
66
|
+
buildBatch(maxMessageSizeBytes, maxWriteBatchSize, maxBsonObjectSize) {
|
|
67
|
+
this.isBatchRetryable = true;
|
|
68
|
+
let commandLength = 0;
|
|
69
|
+
let currentNamespaceIndex = 0;
|
|
70
|
+
const command = this.baseCommand();
|
|
71
|
+
const namespaces = /* @__PURE__ */ new Map();
|
|
72
|
+
this.previousModelIndex = this.currentModelIndex;
|
|
73
|
+
while (this.currentModelIndex < this.models.length) {
|
|
74
|
+
const model = this.models[this.currentModelIndex];
|
|
75
|
+
const ns = model.namespace;
|
|
76
|
+
const nsIndex = namespaces.get(ns);
|
|
77
|
+
if (model.name === "deleteMany" || model.name === "updateMany") this.isBatchRetryable = false;
|
|
78
|
+
if (nsIndex != null) {
|
|
79
|
+
const operation = buildOperation(model, nsIndex, this.pkFactory, this.options);
|
|
80
|
+
let operationBuffer;
|
|
81
|
+
try {
|
|
82
|
+
operationBuffer = bson_1.BSON.serialize(operation);
|
|
83
|
+
} catch (cause) {
|
|
84
|
+
throw new error_1.MongoInvalidArgumentError(`Could not serialize operation to BSON`, { cause });
|
|
85
|
+
}
|
|
86
|
+
validateBufferSize("ops", operationBuffer, maxBsonObjectSize);
|
|
87
|
+
if (commandLength + operationBuffer.length < maxMessageSizeBytes && command.ops.documents.length < maxWriteBatchSize) {
|
|
88
|
+
commandLength = MESSAGE_OVERHEAD_BYTES + command.ops.push(operation, operationBuffer);
|
|
89
|
+
this.currentModelIndex++;
|
|
90
|
+
} else break;
|
|
91
|
+
} else {
|
|
92
|
+
namespaces.set(ns, currentNamespaceIndex);
|
|
93
|
+
const nsInfo = { ns };
|
|
94
|
+
const operation = buildOperation(model, currentNamespaceIndex, this.pkFactory, this.options);
|
|
95
|
+
let nsInfoBuffer;
|
|
96
|
+
let operationBuffer;
|
|
97
|
+
try {
|
|
98
|
+
nsInfoBuffer = bson_1.BSON.serialize(nsInfo);
|
|
99
|
+
operationBuffer = bson_1.BSON.serialize(operation);
|
|
100
|
+
} catch (cause) {
|
|
101
|
+
throw new error_1.MongoInvalidArgumentError(`Could not serialize ns info to BSON`, { cause });
|
|
102
|
+
}
|
|
103
|
+
validateBufferSize("nsInfo", nsInfoBuffer, maxBsonObjectSize);
|
|
104
|
+
validateBufferSize("ops", operationBuffer, maxBsonObjectSize);
|
|
105
|
+
if (commandLength + nsInfoBuffer.length + operationBuffer.length < maxMessageSizeBytes && command.ops.documents.length < maxWriteBatchSize) {
|
|
106
|
+
commandLength = MESSAGE_OVERHEAD_BYTES + command.nsInfo.push(nsInfo, nsInfoBuffer) + command.ops.push(operation, operationBuffer);
|
|
107
|
+
currentNamespaceIndex++;
|
|
108
|
+
this.currentModelIndex++;
|
|
109
|
+
} else break;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
this.lastOperations = command.ops.documents;
|
|
113
|
+
return command;
|
|
114
|
+
}
|
|
115
|
+
baseCommand() {
|
|
116
|
+
const command = {
|
|
117
|
+
bulkWrite: 1,
|
|
118
|
+
errorsOnly: this.errorsOnly,
|
|
119
|
+
ordered: this.options.ordered ?? true,
|
|
120
|
+
ops: new commands_1.DocumentSequence("ops"),
|
|
121
|
+
nsInfo: new commands_1.DocumentSequence("nsInfo")
|
|
122
|
+
};
|
|
123
|
+
if (this.options.bypassDocumentValidation != null) command.bypassDocumentValidation = this.options.bypassDocumentValidation;
|
|
124
|
+
if (this.options.let) command.let = this.options.let;
|
|
125
|
+
if (this.options.comment !== void 0) command.comment = this.options.comment;
|
|
126
|
+
return command;
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
exports.ClientBulkWriteCommandBuilder = ClientBulkWriteCommandBuilder;
|
|
130
|
+
function validateBufferSize(name, buffer, maxBsonObjectSize) {
|
|
131
|
+
if (buffer.length > maxBsonObjectSize) throw new error_1.MongoInvalidArgumentError(`Client bulk write operation ${name} of length ${buffer.length} exceeds the max bson object size of ${maxBsonObjectSize}`);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Build the insert one operation.
|
|
135
|
+
* @param model - The insert one model.
|
|
136
|
+
* @param index - The namespace index.
|
|
137
|
+
* @returns the operation.
|
|
138
|
+
*/
|
|
139
|
+
const buildInsertOneOperation = (model, index, pkFactory) => {
|
|
140
|
+
const document = {
|
|
141
|
+
insert: index,
|
|
142
|
+
document: model.document
|
|
143
|
+
};
|
|
144
|
+
document.document._id = model.document._id ?? pkFactory.createPk();
|
|
145
|
+
return document;
|
|
146
|
+
};
|
|
147
|
+
exports.buildInsertOneOperation = buildInsertOneOperation;
|
|
148
|
+
/**
|
|
149
|
+
* Build the delete one operation.
|
|
150
|
+
* @param model - The insert many model.
|
|
151
|
+
* @param index - The namespace index.
|
|
152
|
+
* @returns the operation.
|
|
153
|
+
*/
|
|
154
|
+
const buildDeleteOneOperation = (model, index) => {
|
|
155
|
+
return createDeleteOperation(model, index, false);
|
|
156
|
+
};
|
|
157
|
+
exports.buildDeleteOneOperation = buildDeleteOneOperation;
|
|
158
|
+
/**
|
|
159
|
+
* Build the delete many operation.
|
|
160
|
+
* @param model - The delete many model.
|
|
161
|
+
* @param index - The namespace index.
|
|
162
|
+
* @returns the operation.
|
|
163
|
+
*/
|
|
164
|
+
const buildDeleteManyOperation = (model, index) => {
|
|
165
|
+
return createDeleteOperation(model, index, true);
|
|
166
|
+
};
|
|
167
|
+
exports.buildDeleteManyOperation = buildDeleteManyOperation;
|
|
168
|
+
/**
|
|
169
|
+
* Creates a delete operation based on the parameters.
|
|
170
|
+
*/
|
|
171
|
+
function createDeleteOperation(model, index, multi) {
|
|
172
|
+
const document = {
|
|
173
|
+
delete: index,
|
|
174
|
+
multi,
|
|
175
|
+
filter: model.filter
|
|
176
|
+
};
|
|
177
|
+
if (model.hint) document.hint = model.hint;
|
|
178
|
+
if (model.collation) document.collation = model.collation;
|
|
179
|
+
return document;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Build the update one operation.
|
|
183
|
+
* @param model - The update one model.
|
|
184
|
+
* @param index - The namespace index.
|
|
185
|
+
* @returns the operation.
|
|
186
|
+
*/
|
|
187
|
+
const buildUpdateOneOperation = (model, index, options) => {
|
|
188
|
+
return createUpdateOperation(model, index, false, options);
|
|
189
|
+
};
|
|
190
|
+
exports.buildUpdateOneOperation = buildUpdateOneOperation;
|
|
191
|
+
/**
|
|
192
|
+
* Build the update many operation.
|
|
193
|
+
* @param model - The update many model.
|
|
194
|
+
* @param index - The namespace index.
|
|
195
|
+
* @returns the operation.
|
|
196
|
+
*/
|
|
197
|
+
const buildUpdateManyOperation = (model, index, options) => {
|
|
198
|
+
return createUpdateOperation(model, index, true, options);
|
|
199
|
+
};
|
|
200
|
+
exports.buildUpdateManyOperation = buildUpdateManyOperation;
|
|
201
|
+
/**
|
|
202
|
+
* Validate the update document.
|
|
203
|
+
* @param update - The update document.
|
|
204
|
+
*/
|
|
205
|
+
function validateUpdate(update, options) {
|
|
206
|
+
if (!(0, utils_1.hasAtomicOperators)(update, options)) throw new error_1.MongoAPIError("Client bulk write update models must only contain atomic modifiers (start with $) and must not be empty.");
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Creates a delete operation based on the parameters.
|
|
210
|
+
*/
|
|
211
|
+
function createUpdateOperation(model, index, multi, options) {
|
|
212
|
+
validateUpdate(model.update, options);
|
|
213
|
+
const document = {
|
|
214
|
+
update: index,
|
|
215
|
+
multi,
|
|
216
|
+
filter: model.filter,
|
|
217
|
+
updateMods: model.update
|
|
218
|
+
};
|
|
219
|
+
if (model.hint) document.hint = model.hint;
|
|
220
|
+
if (model.upsert) document.upsert = model.upsert;
|
|
221
|
+
if (model.arrayFilters) document.arrayFilters = model.arrayFilters;
|
|
222
|
+
if (model.collation) document.collation = model.collation;
|
|
223
|
+
if (!multi && "sort" in model && model.sort != null) document.sort = (0, sort_1.formatSort)(model.sort);
|
|
224
|
+
return document;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Build the replace one operation.
|
|
228
|
+
* @param model - The replace one model.
|
|
229
|
+
* @param index - The namespace index.
|
|
230
|
+
* @returns the operation.
|
|
231
|
+
*/
|
|
232
|
+
const buildReplaceOneOperation = (model, index) => {
|
|
233
|
+
if ((0, utils_1.hasAtomicOperators)(model.replacement)) throw new error_1.MongoAPIError("Client bulk write replace models must not contain atomic modifiers (start with $) and must not be empty.");
|
|
234
|
+
const document = {
|
|
235
|
+
update: index,
|
|
236
|
+
multi: false,
|
|
237
|
+
filter: model.filter,
|
|
238
|
+
updateMods: model.replacement
|
|
239
|
+
};
|
|
240
|
+
if (model.hint) document.hint = model.hint;
|
|
241
|
+
if (model.upsert) document.upsert = model.upsert;
|
|
242
|
+
if (model.collation) document.collation = model.collation;
|
|
243
|
+
if (model.sort != null) document.sort = (0, sort_1.formatSort)(model.sort);
|
|
244
|
+
return document;
|
|
245
|
+
};
|
|
246
|
+
exports.buildReplaceOneOperation = buildReplaceOneOperation;
|
|
247
|
+
/** @internal */
|
|
248
|
+
function buildOperation(model, index, pkFactory, options) {
|
|
249
|
+
switch (model.name) {
|
|
250
|
+
case "insertOne": return (0, exports.buildInsertOneOperation)(model, index, pkFactory);
|
|
251
|
+
case "deleteOne": return (0, exports.buildDeleteOneOperation)(model, index);
|
|
252
|
+
case "deleteMany": return (0, exports.buildDeleteManyOperation)(model, index);
|
|
253
|
+
case "updateOne": return (0, exports.buildUpdateOneOperation)(model, index, options);
|
|
254
|
+
case "updateMany": return (0, exports.buildUpdateManyOperation)(model, index, options);
|
|
255
|
+
case "replaceOne": return (0, exports.buildReplaceOneOperation)(model, index);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}));
|
|
259
|
+
|
|
260
|
+
//#endregion
|
|
261
|
+
export default require_command_builder();
|
|
262
|
+
|
|
263
|
+
export { require_command_builder };
|
|
264
|
+
//# sourceMappingURL=command_builder.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command_builder.mjs","names":[],"sources":["../../../../../../../../../../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/command_builder.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.buildReplaceOneOperation = exports.buildUpdateManyOperation = exports.buildUpdateOneOperation = exports.buildDeleteManyOperation = exports.buildDeleteOneOperation = exports.buildInsertOneOperation = exports.ClientBulkWriteCommandBuilder = void 0;\nexports.buildOperation = buildOperation;\nconst bson_1 = require(\"../../bson\");\nconst commands_1 = require(\"../../cmap/commands\");\nconst error_1 = require(\"../../error\");\nconst sort_1 = require(\"../../sort\");\nconst utils_1 = require(\"../../utils\");\n/**\n * The bytes overhead for the extra fields added post command generation.\n */\nconst MESSAGE_OVERHEAD_BYTES = 1000;\n/** @internal */\nclass ClientBulkWriteCommandBuilder {\n /**\n * Create the command builder.\n * @param models - The client write models.\n */\n constructor(models, options, pkFactory) {\n this.models = models;\n this.options = options;\n this.pkFactory = pkFactory ?? utils_1.DEFAULT_PK_FACTORY;\n this.currentModelIndex = 0;\n this.previousModelIndex = 0;\n this.lastOperations = [];\n this.isBatchRetryable = true;\n }\n /**\n * Gets the errorsOnly value for the command, which is the inverse of the\n * user provided verboseResults option. Defaults to true.\n */\n get errorsOnly() {\n if ('verboseResults' in this.options) {\n return !this.options.verboseResults;\n }\n return true;\n }\n /**\n * Determines if there is another batch to process.\n * @returns True if not all batches have been built.\n */\n hasNextBatch() {\n return this.currentModelIndex < this.models.length;\n }\n /**\n * When we need to retry a command we need to set the current\n * model index back to its previous value.\n */\n resetBatch() {\n this.currentModelIndex = this.previousModelIndex;\n return true;\n }\n /**\n * Build a single batch of a client bulk write command.\n * @param maxMessageSizeBytes - The max message size in bytes.\n * @param maxWriteBatchSize - The max write batch size.\n * @returns The client bulk write command.\n */\n buildBatch(maxMessageSizeBytes, maxWriteBatchSize, maxBsonObjectSize) {\n // We start by assuming the batch has no multi-updates, so it is retryable\n // until we find them.\n this.isBatchRetryable = true;\n let commandLength = 0;\n let currentNamespaceIndex = 0;\n const command = this.baseCommand();\n const namespaces = new Map();\n // In the case of retries we need to mark where we started this batch.\n this.previousModelIndex = this.currentModelIndex;\n while (this.currentModelIndex < this.models.length) {\n const model = this.models[this.currentModelIndex];\n const ns = model.namespace;\n const nsIndex = namespaces.get(ns);\n // Multi updates are not retryable.\n if (model.name === 'deleteMany' || model.name === 'updateMany') {\n this.isBatchRetryable = false;\n }\n if (nsIndex != null) {\n // Build the operation and serialize it to get the bytes buffer.\n const operation = buildOperation(model, nsIndex, this.pkFactory, this.options);\n let operationBuffer;\n try {\n operationBuffer = bson_1.BSON.serialize(operation);\n }\n catch (cause) {\n throw new error_1.MongoInvalidArgumentError(`Could not serialize operation to BSON`, { cause });\n }\n validateBufferSize('ops', operationBuffer, maxBsonObjectSize);\n // Check if the operation buffer can fit in the command. If it can,\n // then add the operation to the document sequence and increment the\n // current length as long as the ops don't exceed the maxWriteBatchSize.\n if (commandLength + operationBuffer.length < maxMessageSizeBytes &&\n command.ops.documents.length < maxWriteBatchSize) {\n // Pushing to the ops document sequence returns the total byte length of the document sequence.\n commandLength = MESSAGE_OVERHEAD_BYTES + command.ops.push(operation, operationBuffer);\n // Increment the builder's current model index.\n this.currentModelIndex++;\n }\n else {\n // The operation cannot fit in the current command and will need to\n // go in the next batch. Exit the loop.\n break;\n }\n }\n else {\n // The namespace is not already in the nsInfo so we will set it in the map, and\n // construct our nsInfo and ops documents and buffers.\n namespaces.set(ns, currentNamespaceIndex);\n const nsInfo = { ns: ns };\n const operation = buildOperation(model, currentNamespaceIndex, this.pkFactory, this.options);\n let nsInfoBuffer;\n let operationBuffer;\n try {\n nsInfoBuffer = bson_1.BSON.serialize(nsInfo);\n operationBuffer = bson_1.BSON.serialize(operation);\n }\n catch (cause) {\n throw new error_1.MongoInvalidArgumentError(`Could not serialize ns info to BSON`, { cause });\n }\n validateBufferSize('nsInfo', nsInfoBuffer, maxBsonObjectSize);\n validateBufferSize('ops', operationBuffer, maxBsonObjectSize);\n // Check if the operation and nsInfo buffers can fit in the command. If they\n // can, then add the operation and nsInfo to their respective document\n // sequences and increment the current length as long as the ops don't exceed\n // the maxWriteBatchSize.\n if (commandLength + nsInfoBuffer.length + operationBuffer.length < maxMessageSizeBytes &&\n command.ops.documents.length < maxWriteBatchSize) {\n // Pushing to the ops document sequence returns the total byte length of the document sequence.\n commandLength =\n MESSAGE_OVERHEAD_BYTES +\n command.nsInfo.push(nsInfo, nsInfoBuffer) +\n command.ops.push(operation, operationBuffer);\n // We've added a new namespace, increment the namespace index.\n currentNamespaceIndex++;\n // Increment the builder's current model index.\n this.currentModelIndex++;\n }\n else {\n // The operation cannot fit in the current command and will need to\n // go in the next batch. Exit the loop.\n break;\n }\n }\n }\n // Set the last operations and return the command.\n this.lastOperations = command.ops.documents;\n return command;\n }\n baseCommand() {\n const command = {\n bulkWrite: 1,\n errorsOnly: this.errorsOnly,\n ordered: this.options.ordered ?? true,\n ops: new commands_1.DocumentSequence('ops'),\n nsInfo: new commands_1.DocumentSequence('nsInfo')\n };\n // Add bypassDocumentValidation if it was present in the options.\n if (this.options.bypassDocumentValidation != null) {\n command.bypassDocumentValidation = this.options.bypassDocumentValidation;\n }\n // Add let if it was present in the options.\n if (this.options.let) {\n command.let = this.options.let;\n }\n // we check for undefined specifically here to allow falsy values\n // eslint-disable-next-line no-restricted-syntax\n if (this.options.comment !== undefined) {\n command.comment = this.options.comment;\n }\n return command;\n }\n}\nexports.ClientBulkWriteCommandBuilder = ClientBulkWriteCommandBuilder;\nfunction validateBufferSize(name, buffer, maxBsonObjectSize) {\n if (buffer.length > maxBsonObjectSize) {\n throw new error_1.MongoInvalidArgumentError(`Client bulk write operation ${name} of length ${buffer.length} exceeds the max bson object size of ${maxBsonObjectSize}`);\n }\n}\n/**\n * Build the insert one operation.\n * @param model - The insert one model.\n * @param index - The namespace index.\n * @returns the operation.\n */\nconst buildInsertOneOperation = (model, index, pkFactory) => {\n const document = {\n insert: index,\n document: model.document\n };\n document.document._id = model.document._id ?? pkFactory.createPk();\n return document;\n};\nexports.buildInsertOneOperation = buildInsertOneOperation;\n/**\n * Build the delete one operation.\n * @param model - The insert many model.\n * @param index - The namespace index.\n * @returns the operation.\n */\nconst buildDeleteOneOperation = (model, index) => {\n return createDeleteOperation(model, index, false);\n};\nexports.buildDeleteOneOperation = buildDeleteOneOperation;\n/**\n * Build the delete many operation.\n * @param model - The delete many model.\n * @param index - The namespace index.\n * @returns the operation.\n */\nconst buildDeleteManyOperation = (model, index) => {\n return createDeleteOperation(model, index, true);\n};\nexports.buildDeleteManyOperation = buildDeleteManyOperation;\n/**\n * Creates a delete operation based on the parameters.\n */\nfunction createDeleteOperation(model, index, multi) {\n const document = {\n delete: index,\n multi: multi,\n filter: model.filter\n };\n if (model.hint) {\n document.hint = model.hint;\n }\n if (model.collation) {\n document.collation = model.collation;\n }\n return document;\n}\n/**\n * Build the update one operation.\n * @param model - The update one model.\n * @param index - The namespace index.\n * @returns the operation.\n */\nconst buildUpdateOneOperation = (model, index, options) => {\n return createUpdateOperation(model, index, false, options);\n};\nexports.buildUpdateOneOperation = buildUpdateOneOperation;\n/**\n * Build the update many operation.\n * @param model - The update many model.\n * @param index - The namespace index.\n * @returns the operation.\n */\nconst buildUpdateManyOperation = (model, index, options) => {\n return createUpdateOperation(model, index, true, options);\n};\nexports.buildUpdateManyOperation = buildUpdateManyOperation;\n/**\n * Validate the update document.\n * @param update - The update document.\n */\nfunction validateUpdate(update, options) {\n if (!(0, utils_1.hasAtomicOperators)(update, options)) {\n throw new error_1.MongoAPIError('Client bulk write update models must only contain atomic modifiers (start with $) and must not be empty.');\n }\n}\n/**\n * Creates a delete operation based on the parameters.\n */\nfunction createUpdateOperation(model, index, multi, options) {\n // Update documents provided in UpdateOne and UpdateMany write models are\n // required only to contain atomic modifiers (i.e. keys that start with \"$\").\n // Drivers MUST throw an error if an update document is empty or if the\n // document's first key does not start with \"$\".\n validateUpdate(model.update, options);\n const document = {\n update: index,\n multi: multi,\n filter: model.filter,\n updateMods: model.update\n };\n if (model.hint) {\n document.hint = model.hint;\n }\n if (model.upsert) {\n document.upsert = model.upsert;\n }\n if (model.arrayFilters) {\n document.arrayFilters = model.arrayFilters;\n }\n if (model.collation) {\n document.collation = model.collation;\n }\n if (!multi && 'sort' in model && model.sort != null) {\n document.sort = (0, sort_1.formatSort)(model.sort);\n }\n return document;\n}\n/**\n * Build the replace one operation.\n * @param model - The replace one model.\n * @param index - The namespace index.\n * @returns the operation.\n */\nconst buildReplaceOneOperation = (model, index) => {\n if ((0, utils_1.hasAtomicOperators)(model.replacement)) {\n throw new error_1.MongoAPIError('Client bulk write replace models must not contain atomic modifiers (start with $) and must not be empty.');\n }\n const document = {\n update: index,\n multi: false,\n filter: model.filter,\n updateMods: model.replacement\n };\n if (model.hint) {\n document.hint = model.hint;\n }\n if (model.upsert) {\n document.upsert = model.upsert;\n }\n if (model.collation) {\n document.collation = model.collation;\n }\n if (model.sort != null) {\n document.sort = (0, sort_1.formatSort)(model.sort);\n }\n return document;\n};\nexports.buildReplaceOneOperation = buildReplaceOneOperation;\n/** @internal */\nfunction buildOperation(model, index, pkFactory, options) {\n switch (model.name) {\n case 'insertOne':\n return (0, exports.buildInsertOneOperation)(model, index, pkFactory);\n case 'deleteOne':\n return (0, exports.buildDeleteOneOperation)(model, index);\n case 'deleteMany':\n return (0, exports.buildDeleteManyOperation)(model, index);\n case 'updateOne':\n return (0, exports.buildUpdateOneOperation)(model, index, options);\n case 'updateMany':\n return (0, exports.buildUpdateManyOperation)(model, index, options);\n case 'replaceOne':\n return (0, exports.buildReplaceOneOperation)(model, index);\n }\n}\n//# sourceMappingURL=command_builder.js.map"],"x_google_ignoreList":[0],"mappings":"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"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../../../../../../../_virtual/rolldown_runtime.mjs";
|
|
2
|
+
import { require_error } from "../../error.mjs";
|
|
3
|
+
import { require_write_concern } from "../../write_concern.mjs";
|
|
4
|
+
import { require_utils } from "../../utils.mjs";
|
|
5
|
+
import { require_timeout } from "../../timeout.mjs";
|
|
6
|
+
import { require_execute_operation } from "../execute_operation.mjs";
|
|
7
|
+
import { require_client_bulk_write } from "./client_bulk_write.mjs";
|
|
8
|
+
import { require_client_bulk_write_cursor } from "../../cursor/client_bulk_write_cursor.mjs";
|
|
9
|
+
import { require_command_builder } from "./command_builder.mjs";
|
|
10
|
+
import { require_results_merger } from "./results_merger.mjs";
|
|
11
|
+
import { require_abstract_cursor } from "../../cursor/abstract_cursor.mjs";
|
|
12
|
+
|
|
13
|
+
//#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/executor.js
|
|
14
|
+
var require_executor = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ClientBulkWriteExecutor = void 0;
|
|
17
|
+
const abstract_cursor_1 = require_abstract_cursor();
|
|
18
|
+
const client_bulk_write_cursor_1 = require_client_bulk_write_cursor();
|
|
19
|
+
const error_1 = require_error();
|
|
20
|
+
const timeout_1 = require_timeout();
|
|
21
|
+
const utils_1 = require_utils();
|
|
22
|
+
const write_concern_1 = require_write_concern();
|
|
23
|
+
const execute_operation_1 = require_execute_operation();
|
|
24
|
+
const client_bulk_write_1 = require_client_bulk_write();
|
|
25
|
+
const command_builder_1 = require_command_builder();
|
|
26
|
+
const results_merger_1 = require_results_merger();
|
|
27
|
+
/**
|
|
28
|
+
* Responsible for executing a client bulk write.
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
var ClientBulkWriteExecutor = class {
|
|
32
|
+
/**
|
|
33
|
+
* Instantiate the executor.
|
|
34
|
+
* @param client - The mongo client.
|
|
35
|
+
* @param operations - The user supplied bulk write models.
|
|
36
|
+
* @param options - The bulk write options.
|
|
37
|
+
*/
|
|
38
|
+
constructor(client, operations, options) {
|
|
39
|
+
if (operations.length === 0) throw new error_1.MongoClientBulkWriteExecutionError("No client bulk write models were provided.");
|
|
40
|
+
this.client = client;
|
|
41
|
+
this.operations = operations;
|
|
42
|
+
this.options = {
|
|
43
|
+
ordered: true,
|
|
44
|
+
bypassDocumentValidation: false,
|
|
45
|
+
verboseResults: false,
|
|
46
|
+
...options
|
|
47
|
+
};
|
|
48
|
+
if (!this.options.writeConcern) this.options.writeConcern = write_concern_1.WriteConcern.fromOptions(this.client.s.options);
|
|
49
|
+
if (this.options.writeConcern?.w === 0) {
|
|
50
|
+
if (this.options.verboseResults) throw new error_1.MongoInvalidArgumentError("Cannot request unacknowledged write concern and verbose results");
|
|
51
|
+
if (this.options.ordered) throw new error_1.MongoInvalidArgumentError("Cannot request unacknowledged write concern and ordered writes");
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Execute the client bulk write. Will split commands into batches and exhaust the cursors
|
|
56
|
+
* for each, then merge the results into one.
|
|
57
|
+
* @returns The result.
|
|
58
|
+
*/
|
|
59
|
+
async execute() {
|
|
60
|
+
const pkFactory = this.client.s.options.pkFactory;
|
|
61
|
+
const commandBuilder = new command_builder_1.ClientBulkWriteCommandBuilder(this.operations, this.options, pkFactory);
|
|
62
|
+
const resolvedOptions = (0, utils_1.resolveTimeoutOptions)(this.client, this.options);
|
|
63
|
+
const context = timeout_1.TimeoutContext.create(resolvedOptions);
|
|
64
|
+
if (this.options.writeConcern?.w === 0) {
|
|
65
|
+
while (commandBuilder.hasNextBatch()) {
|
|
66
|
+
const operation = new client_bulk_write_1.ClientBulkWriteOperation(commandBuilder, this.options);
|
|
67
|
+
await (0, execute_operation_1.executeOperation)(this.client, operation, context);
|
|
68
|
+
}
|
|
69
|
+
return results_merger_1.ClientBulkWriteResultsMerger.unacknowledged();
|
|
70
|
+
} else {
|
|
71
|
+
const resultsMerger = new results_merger_1.ClientBulkWriteResultsMerger(this.options);
|
|
72
|
+
while (commandBuilder.hasNextBatch()) {
|
|
73
|
+
const cursorContext = new abstract_cursor_1.CursorTimeoutContext(context, Symbol());
|
|
74
|
+
const options = {
|
|
75
|
+
...this.options,
|
|
76
|
+
timeoutContext: cursorContext,
|
|
77
|
+
...resolvedOptions.timeoutMS != null && { timeoutMode: abstract_cursor_1.CursorTimeoutMode.LIFETIME }
|
|
78
|
+
};
|
|
79
|
+
const cursor = new client_bulk_write_cursor_1.ClientBulkWriteCursor(this.client, commandBuilder, options);
|
|
80
|
+
try {
|
|
81
|
+
await resultsMerger.merge(cursor);
|
|
82
|
+
} catch (error) {
|
|
83
|
+
if (error instanceof error_1.MongoServerError && !(error instanceof error_1.MongoClientBulkWriteError)) {
|
|
84
|
+
const bulkWriteError = new error_1.MongoClientBulkWriteError({ message: "Mongo client bulk write encountered an error during execution" });
|
|
85
|
+
bulkWriteError.cause = error;
|
|
86
|
+
bulkWriteError.partialResult = resultsMerger.bulkWriteResult;
|
|
87
|
+
throw bulkWriteError;
|
|
88
|
+
} else throw error;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
if (resultsMerger.writeConcernErrors.length > 0 || resultsMerger.writeErrors.size > 0) {
|
|
92
|
+
const error = new error_1.MongoClientBulkWriteError({ message: "Mongo client bulk write encountered errors during execution." });
|
|
93
|
+
error.writeConcernErrors = resultsMerger.writeConcernErrors;
|
|
94
|
+
error.writeErrors = resultsMerger.writeErrors;
|
|
95
|
+
error.partialResult = resultsMerger.bulkWriteResult;
|
|
96
|
+
throw error;
|
|
97
|
+
}
|
|
98
|
+
return resultsMerger.bulkWriteResult;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
exports.ClientBulkWriteExecutor = ClientBulkWriteExecutor;
|
|
103
|
+
}));
|
|
104
|
+
|
|
105
|
+
//#endregion
|
|
106
|
+
export default require_executor();
|
|
107
|
+
|
|
108
|
+
export { require_executor };
|
|
109
|
+
//# sourceMappingURL=executor.mjs.map
|