pecunia-root 0.0.9 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/rolldown_runtime.mjs +8 -0
- package/dist/adapters/drizzle-adapter/index.mjs +4 -1
- package/dist/adapters/drizzle-adapter/index.mjs.map +1 -1
- package/dist/adapters/mongodb-adapter/index.mjs +12 -11
- package/dist/adapters/mongodb-adapter/index.mjs.map +1 -1
- package/dist/db/migrations/index.mjs +0 -6
- package/dist/db/migrations/index.mjs.map +1 -1
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/code-points-data.mjs +14 -0
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/code-points-data.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/index.mjs +54 -0
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/memory-code-points.mjs +36 -0
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/memory-code-points.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/node.mjs +27 -0
- package/dist/node_modules/.pnpm/@mongodb-js_saslprep@1.4.4/node_modules/@mongodb-js/saslprep/dist/node.mjs.map +1 -0
- package/dist/node_modules/.pnpm/bson@6.10.4/node_modules/bson/lib/bson.mjs +3728 -0
- package/dist/node_modules/.pnpm/bson@6.10.4/node_modules/bson/lib/bson.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/column-builder.mjs +108 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/column-builder.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/column.mjs +55 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/column.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/entity.mjs +18 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/entity.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/pg-core/columns/common.mjs +183 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/pg-core/columns/common.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/pg-core/columns/enum.mjs +35 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/pg-core/columns/enum.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/pg-core/foreign-keys.mjs +68 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/pg-core/foreign-keys.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/pg-core/unique-constraint.mjs +56 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/pg-core/unique-constraint.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/pg-core/utils/array.mjs +65 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/pg-core/utils/array.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/sql/expressions/conditions.mjs +69 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/sql/expressions/conditions.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/sql/expressions/select.mjs +13 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/sql/expressions/select.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/sql/functions/aggregate.mjs +10 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/sql/functions/aggregate.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/sql/sql.mjs +366 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/sql/sql.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/subquery.mjs +22 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/subquery.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/table.mjs +62 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/table.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/table.utils.mjs +6 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/table.utils.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/tracing-utils.mjs +8 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/tracing-utils.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/tracing.mjs +8 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/tracing.mjs.map +1 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/view-common.mjs +6 -0
- package/dist/node_modules/.pnpm/drizzle-orm@0.41.0_@prisma_client@5.22.0_prisma@5.22.0__@types_better-sqlite3@7.6.13_@t_b8c798d02fdf3681c336f03696200539/node_modules/drizzle-orm/view-common.mjs.map +1 -0
- package/dist/node_modules/.pnpm/memory-pager@1.5.0/node_modules/memory-pager/index.mjs +137 -0
- package/dist/node_modules/.pnpm/memory-pager@1.5.0/node_modules/memory-pager/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/index.mjs +211 -0
- package/dist/node_modules/.pnpm/mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/redact.mjs +95 -0
- package/dist/node_modules/.pnpm/mongodb-connection-string-url@3.0.2/node_modules/mongodb-connection-string-url/lib/redact.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/admin.mjs +158 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/admin.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bson.mjs +195 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bson.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/common.mjs +710 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/common.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/ordered.mjs +53 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/ordered.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/unordered.mjs +63 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/bulk/unordered.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/change_stream.mjs +368 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/change_stream.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/auto_encrypter.mjs +234 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/auto_encrypter.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/client_encryption.mjs +545 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/client_encryption.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/crypto_callbacks.mjs +83 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/crypto_callbacks.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/errors.mjs +146 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/errors.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/mongocryptd_manager.mjs +58 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/mongocryptd_manager.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/aws.mjs +30 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/aws.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/azure.mjs +135 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/azure.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/gcp.mjs +25 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/gcp.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/index.mjs +47 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/providers/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/state_machine.mjs +362 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/client-side-encryption/state_machine.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/auth_provider.mjs +58 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/auth_provider.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/aws_temporary_credentials.mjs +123 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/aws_temporary_credentials.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/gssapi.mjs +128 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/gssapi.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongo_credentials.mjs +133 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongo_credentials.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_aws.mjs +126 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_aws.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/automated_callback_workflow.mjs +79 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/automated_callback_workflow.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_machine_workflow.mjs +65 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_machine_workflow.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_workflow.mjs +127 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_workflow.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/command_builders.mjs +47 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/command_builders.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/gcp_machine_workflow.mjs +44 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/gcp_machine_workflow.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/human_callback_workflow.mjs +101 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/human_callback_workflow.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/k8s_machine_workflow.mjs +33 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/k8s_machine_workflow.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_cache.mjs +53 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_cache.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_machine_workflow.mjs +29 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_machine_workflow.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc.mjs +83 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/mongodb_oidc.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/plain.mjs +36 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/plain.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/providers.mjs +32 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/providers.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/scram.mjs +206 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/scram.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/x509.mjs +45 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/auth/x509.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/command_monitoring_events.mjs +213 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/command_monitoring_events.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/commands.mjs +411 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/commands.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connect.mjs +288 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connect.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection.mjs +423 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool.mjs +483 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool_events.mjs +207 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/connection_pool_events.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/errors.mjs +116 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/errors.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/handshake/client_metadata.mjs +183 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/handshake/client_metadata.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/metrics.mjs +55 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/metrics.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/stream_description.mjs +60 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/stream_description.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/compression.mjs +139 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/compression.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/constants.mjs +28 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/constants.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_data.mjs +117 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_data.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_demand/document.mjs +182 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/on_demand/document.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/responses.mjs +304 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/responses.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/shared.mjs +34 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cmap/wire_protocol/shared.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/collection.mjs +739 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/collection.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/connection_string.mjs +805 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/connection_string.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/constants.mjs +174 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/constants.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/abstract_cursor.mjs +726 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/abstract_cursor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/aggregation_cursor.mjs +172 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/aggregation_cursor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/change_stream_cursor.mjs +103 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/change_stream_cursor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/client_bulk_write_cursor.mjs +66 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/client_bulk_write_cursor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/explainable_cursor.mjs +41 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/explainable_cursor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/find_cursor.mjs +365 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/find_cursor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_collections_cursor.mjs +50 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_collections_cursor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_indexes_cursor.mjs +48 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_indexes_cursor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_search_indexes_cursor.mjs +23 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/list_search_indexes_cursor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/run_command_cursor.mjs +106 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/cursor/run_command_cursor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/db.mjs +428 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/db.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/deps.mjs +124 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/deps.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/encrypter.mjs +95 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/encrypter.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/error.mjs +1305 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/error.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/explain.mjs +59 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/explain.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/download.mjs +250 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/download.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/index.mjs +170 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/upload.mjs +315 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/upload.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/index.mjs +925 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client.mjs +520 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client_auth_providers.mjs +90 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_client_auth_providers.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_logger.mjs +582 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_logger.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_types.mjs +64 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/mongo_types.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/aggregate.mjs +86 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/aggregate.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/client_bulk_write.mjs +60 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/client_bulk_write.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/command_builder.mjs +264 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/command_builder.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/executor.mjs +109 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/executor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/results_merger.mjs +172 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/client_bulk_write/results_merger.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/command.mjs +68 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/command.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/count.mjs +53 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/count.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/create_collection.mjs +123 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/create_collection.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/delete.mjs +119 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/delete.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/distinct.mjs +65 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/distinct.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/drop.mjs +97 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/drop.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/estimated_document_count.mjs +47 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/estimated_document_count.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/execute_operation.mjs +188 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/execute_operation.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find.mjs +103 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find_and_modify.mjs +136 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/find_and_modify.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/get_more.mjs +61 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/get_more.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/indexes.mjs +179 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/indexes.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/insert.mjs +77 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/insert.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/kill_cursors.mjs +48 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/kill_cursors.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_collections.mjs +60 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_collections.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_databases.mjs +43 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/list_databases.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/operation.mjs +105 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/operation.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/profiling_level.mjs +50 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/profiling_level.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/remove_user.mjs +39 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/remove_user.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/rename.mjs +49 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/rename.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/run_command.mjs +58 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/run_command.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/create.mjs +46 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/create.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/drop.mjs +48 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/drop.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/update.mjs +46 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/search_indexes/update.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/set_profiling_level.mjs +67 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/set_profiling_level.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/stats.mjs +37 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/stats.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/update.mjs +171 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/update.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/validate_collection.mjs +45 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/operations/validate_collection.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_concern.mjs +71 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_concern.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_preference.mjs +165 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/read_preference.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/resource_management.mjs +62 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/resource_management.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/common.mjs +51 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/common.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/events.mjs +156 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/events.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/monitor.mjs +477 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/monitor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server.mjs +315 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_description.mjs +157 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_description.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection.mjs +184 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection_events.mjs +96 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/server_selection_events.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/srv_polling.mjs +107 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/srv_polling.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology.mjs +540 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology_description.mjs +298 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sdam/topology_description.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sessions.mjs +623 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sessions.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sort.mjs +91 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/sort.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/timeout.mjs +254 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/timeout.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/transactions.mjs +138 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/transactions.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/utils.mjs +993 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/utils.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/write_concern.mjs +81 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/write_concern.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/package.mjs +171 -0
- package/dist/node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/package.mjs.map +1 -0
- package/dist/node_modules/.pnpm/punycode@2.3.1/node_modules/punycode/punycode.mjs +295 -0
- package/dist/node_modules/.pnpm/punycode@2.3.1/node_modules/punycode/punycode.mjs.map +1 -0
- package/dist/node_modules/.pnpm/sparse-bitfield@3.0.3/node_modules/sparse-bitfield/index.mjs +81 -0
- package/dist/node_modules/.pnpm/sparse-bitfield@3.0.3/node_modules/sparse-bitfield/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/index.mjs +206 -0
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/mappingTable.mjs +33590 -0
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/mappingTable.mjs.map +1 -0
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/regexes.mjs +37 -0
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/regexes.mjs.map +1 -0
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/statusMapping.mjs +18 -0
- package/dist/node_modules/.pnpm/tr46@5.1.1/node_modules/tr46/lib/statusMapping.mjs.map +1 -0
- package/dist/node_modules/.pnpm/webidl-conversions@7.0.0/node_modules/webidl-conversions/lib/index.mjs +252 -0
- package/dist/node_modules/.pnpm/webidl-conversions@7.0.0/node_modules/webidl-conversions/lib/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/index.mjs +41 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/Function.mjs +41 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/Function.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL-impl.mjs +173 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL-impl.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL.mjs +334 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URL.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams-impl.mjs +90 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams-impl.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams.mjs +356 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/URLSearchParams.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/encoding.mjs +23 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/encoding.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/infra.mjs +29 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/infra.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/percent-encoding.mjs +140 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/percent-encoding.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/url-state-machine.mjs +831 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/url-state-machine.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/urlencoded.mjs +77 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/urlencoded.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/utils.mjs +147 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/lib/utils.mjs.map +1 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/webidl2js-wrapper.mjs +17 -0
- package/dist/node_modules/.pnpm/whatwg-url@14.2.0/node_modules/whatwg-url/webidl2js-wrapper.mjs.map +1 -0
- package/package.json +2 -40
|
@@ -0,0 +1,170 @@
|
|
|
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_mongo_types } from "../mongo_types.mjs";
|
|
7
|
+
import { require_download } from "./download.mjs";
|
|
8
|
+
import { require_upload } from "./upload.mjs";
|
|
9
|
+
|
|
10
|
+
//#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/index.js
|
|
11
|
+
var require_gridfs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.GridFSBucket = void 0;
|
|
14
|
+
const error_1 = require_error();
|
|
15
|
+
const mongo_types_1 = require_mongo_types();
|
|
16
|
+
const timeout_1 = require_timeout();
|
|
17
|
+
const utils_1 = require_utils();
|
|
18
|
+
const write_concern_1 = require_write_concern();
|
|
19
|
+
const download_1 = require_download();
|
|
20
|
+
const upload_1 = require_upload();
|
|
21
|
+
const DEFAULT_GRIDFS_BUCKET_OPTIONS = {
|
|
22
|
+
bucketName: "fs",
|
|
23
|
+
chunkSizeBytes: 255 * 1024
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Constructor for a streaming GridFS interface
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
var GridFSBucket = class extends mongo_types_1.TypedEventEmitter {
|
|
30
|
+
constructor(db, options) {
|
|
31
|
+
super();
|
|
32
|
+
this.on("error", utils_1.noop);
|
|
33
|
+
this.setMaxListeners(0);
|
|
34
|
+
const privateOptions = (0, utils_1.resolveOptions)(db, {
|
|
35
|
+
...DEFAULT_GRIDFS_BUCKET_OPTIONS,
|
|
36
|
+
...options,
|
|
37
|
+
writeConcern: write_concern_1.WriteConcern.fromOptions(options)
|
|
38
|
+
});
|
|
39
|
+
this.s = {
|
|
40
|
+
db,
|
|
41
|
+
options: privateOptions,
|
|
42
|
+
_chunksCollection: db.collection(privateOptions.bucketName + ".chunks"),
|
|
43
|
+
_filesCollection: db.collection(privateOptions.bucketName + ".files"),
|
|
44
|
+
checkedIndexes: false,
|
|
45
|
+
calledOpenUploadStream: false
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Returns a writable stream (GridFSBucketWriteStream) for writing
|
|
50
|
+
* buffers to GridFS. The stream's 'id' property contains the resulting
|
|
51
|
+
* file's id.
|
|
52
|
+
*
|
|
53
|
+
* @param filename - The value of the 'filename' key in the files doc
|
|
54
|
+
* @param options - Optional settings.
|
|
55
|
+
*/
|
|
56
|
+
openUploadStream(filename, options) {
|
|
57
|
+
return new upload_1.GridFSBucketWriteStream(this, filename, {
|
|
58
|
+
timeoutMS: this.s.options.timeoutMS,
|
|
59
|
+
...options
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Returns a writable stream (GridFSBucketWriteStream) for writing
|
|
64
|
+
* buffers to GridFS for a custom file id. The stream's 'id' property contains the resulting
|
|
65
|
+
* file's id.
|
|
66
|
+
*/
|
|
67
|
+
openUploadStreamWithId(id, filename, options) {
|
|
68
|
+
return new upload_1.GridFSBucketWriteStream(this, filename, {
|
|
69
|
+
timeoutMS: this.s.options.timeoutMS,
|
|
70
|
+
...options,
|
|
71
|
+
id
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/** Returns a readable stream (GridFSBucketReadStream) for streaming file data from GridFS. */
|
|
75
|
+
openDownloadStream(id, options) {
|
|
76
|
+
return new download_1.GridFSBucketReadStream(this.s._chunksCollection, this.s._filesCollection, this.s.options.readPreference, { _id: id }, {
|
|
77
|
+
timeoutMS: this.s.options.timeoutMS,
|
|
78
|
+
...options
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Deletes a file with the given id
|
|
83
|
+
*
|
|
84
|
+
* @param id - The id of the file doc
|
|
85
|
+
*/
|
|
86
|
+
async delete(id, options) {
|
|
87
|
+
const { timeoutMS } = (0, utils_1.resolveOptions)(this.s.db, options);
|
|
88
|
+
let timeoutContext = void 0;
|
|
89
|
+
if (timeoutMS) timeoutContext = new timeout_1.CSOTTimeoutContext({
|
|
90
|
+
timeoutMS,
|
|
91
|
+
serverSelectionTimeoutMS: this.s.db.client.s.options.serverSelectionTimeoutMS
|
|
92
|
+
});
|
|
93
|
+
const { deletedCount } = await this.s._filesCollection.deleteOne({ _id: id }, { timeoutMS: timeoutContext?.remainingTimeMS });
|
|
94
|
+
const remainingTimeMS = timeoutContext?.remainingTimeMS;
|
|
95
|
+
if (remainingTimeMS != null && remainingTimeMS <= 0) throw new error_1.MongoOperationTimeoutError(`Timed out after ${timeoutMS}ms`);
|
|
96
|
+
await this.s._chunksCollection.deleteMany({ files_id: id }, { timeoutMS: remainingTimeMS });
|
|
97
|
+
if (deletedCount === 0) throw new error_1.MongoRuntimeError(`File not found for id ${id}`);
|
|
98
|
+
}
|
|
99
|
+
/** Convenience wrapper around find on the files collection */
|
|
100
|
+
find(filter = {}, options = {}) {
|
|
101
|
+
return this.s._filesCollection.find(filter, options);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Returns a readable stream (GridFSBucketReadStream) for streaming the
|
|
105
|
+
* file with the given name from GridFS. If there are multiple files with
|
|
106
|
+
* the same name, this will stream the most recent file with the given name
|
|
107
|
+
* (as determined by the `uploadDate` field). You can set the `revision`
|
|
108
|
+
* option to change this behavior.
|
|
109
|
+
*/
|
|
110
|
+
openDownloadStreamByName(filename, options) {
|
|
111
|
+
let sort = { uploadDate: -1 };
|
|
112
|
+
let skip = void 0;
|
|
113
|
+
if (options && options.revision != null) if (options.revision >= 0) {
|
|
114
|
+
sort = { uploadDate: 1 };
|
|
115
|
+
skip = options.revision;
|
|
116
|
+
} else skip = -options.revision - 1;
|
|
117
|
+
return new download_1.GridFSBucketReadStream(this.s._chunksCollection, this.s._filesCollection, this.s.options.readPreference, { filename }, {
|
|
118
|
+
timeoutMS: this.s.options.timeoutMS,
|
|
119
|
+
...options,
|
|
120
|
+
sort,
|
|
121
|
+
skip
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Renames the file with the given _id to the given string
|
|
126
|
+
*
|
|
127
|
+
* @param id - the id of the file to rename
|
|
128
|
+
* @param filename - new name for the file
|
|
129
|
+
*/
|
|
130
|
+
async rename(id, filename, options) {
|
|
131
|
+
const filter = { _id: id };
|
|
132
|
+
const update = { $set: { filename } };
|
|
133
|
+
const { matchedCount } = await this.s._filesCollection.updateOne(filter, update, options);
|
|
134
|
+
if (matchedCount === 0) throw new error_1.MongoRuntimeError(`File with id ${id} not found`);
|
|
135
|
+
}
|
|
136
|
+
/** Removes this bucket's files collection, followed by its chunks collection. */
|
|
137
|
+
async drop(options) {
|
|
138
|
+
const { timeoutMS } = (0, utils_1.resolveOptions)(this.s.db, options);
|
|
139
|
+
let timeoutContext = void 0;
|
|
140
|
+
if (timeoutMS) timeoutContext = new timeout_1.CSOTTimeoutContext({
|
|
141
|
+
timeoutMS,
|
|
142
|
+
serverSelectionTimeoutMS: this.s.db.client.s.options.serverSelectionTimeoutMS
|
|
143
|
+
});
|
|
144
|
+
if (timeoutContext) {
|
|
145
|
+
await this.s._filesCollection.drop({ timeoutMS: timeoutContext.remainingTimeMS });
|
|
146
|
+
const remainingTimeMS = timeoutContext.getRemainingTimeMSOrThrow(`Timed out after ${timeoutMS}ms`);
|
|
147
|
+
await this.s._chunksCollection.drop({ timeoutMS: remainingTimeMS });
|
|
148
|
+
} else {
|
|
149
|
+
await this.s._filesCollection.drop();
|
|
150
|
+
await this.s._chunksCollection.drop();
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
exports.GridFSBucket = GridFSBucket;
|
|
155
|
+
/**
|
|
156
|
+
* When the first call to openUploadStream is made, the upload stream will
|
|
157
|
+
* check to see if it needs to create the proper indexes on the chunks and
|
|
158
|
+
* files collections. This event is fired either when 1) it determines that
|
|
159
|
+
* no index creation is necessary, 2) when it successfully creates the
|
|
160
|
+
* necessary indexes.
|
|
161
|
+
* @event
|
|
162
|
+
*/
|
|
163
|
+
GridFSBucket.INDEX = "index";
|
|
164
|
+
}));
|
|
165
|
+
|
|
166
|
+
//#endregion
|
|
167
|
+
export default require_gridfs();
|
|
168
|
+
|
|
169
|
+
export { require_gridfs };
|
|
170
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/index.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GridFSBucket = void 0;\nconst error_1 = require(\"../error\");\nconst mongo_types_1 = require(\"../mongo_types\");\nconst timeout_1 = require(\"../timeout\");\nconst utils_1 = require(\"../utils\");\nconst write_concern_1 = require(\"../write_concern\");\nconst download_1 = require(\"./download\");\nconst upload_1 = require(\"./upload\");\nconst DEFAULT_GRIDFS_BUCKET_OPTIONS = {\n bucketName: 'fs',\n chunkSizeBytes: 255 * 1024\n};\n/**\n * Constructor for a streaming GridFS interface\n * @public\n */\nclass GridFSBucket extends mongo_types_1.TypedEventEmitter {\n constructor(db, options) {\n super();\n this.on('error', utils_1.noop);\n this.setMaxListeners(0);\n const privateOptions = (0, utils_1.resolveOptions)(db, {\n ...DEFAULT_GRIDFS_BUCKET_OPTIONS,\n ...options,\n writeConcern: write_concern_1.WriteConcern.fromOptions(options)\n });\n this.s = {\n db,\n options: privateOptions,\n _chunksCollection: db.collection(privateOptions.bucketName + '.chunks'),\n _filesCollection: db.collection(privateOptions.bucketName + '.files'),\n checkedIndexes: false,\n calledOpenUploadStream: false\n };\n }\n /**\n * Returns a writable stream (GridFSBucketWriteStream) for writing\n * buffers to GridFS. The stream's 'id' property contains the resulting\n * file's id.\n *\n * @param filename - The value of the 'filename' key in the files doc\n * @param options - Optional settings.\n */\n openUploadStream(filename, options) {\n return new upload_1.GridFSBucketWriteStream(this, filename, {\n timeoutMS: this.s.options.timeoutMS,\n ...options\n });\n }\n /**\n * Returns a writable stream (GridFSBucketWriteStream) for writing\n * buffers to GridFS for a custom file id. The stream's 'id' property contains the resulting\n * file's id.\n */\n openUploadStreamWithId(id, filename, options) {\n return new upload_1.GridFSBucketWriteStream(this, filename, {\n timeoutMS: this.s.options.timeoutMS,\n ...options,\n id\n });\n }\n /** Returns a readable stream (GridFSBucketReadStream) for streaming file data from GridFS. */\n openDownloadStream(id, options) {\n return new download_1.GridFSBucketReadStream(this.s._chunksCollection, this.s._filesCollection, this.s.options.readPreference, { _id: id }, { timeoutMS: this.s.options.timeoutMS, ...options });\n }\n /**\n * Deletes a file with the given id\n *\n * @param id - The id of the file doc\n */\n async delete(id, options) {\n const { timeoutMS } = (0, utils_1.resolveOptions)(this.s.db, options);\n let timeoutContext = undefined;\n if (timeoutMS) {\n timeoutContext = new timeout_1.CSOTTimeoutContext({\n timeoutMS,\n serverSelectionTimeoutMS: this.s.db.client.s.options.serverSelectionTimeoutMS\n });\n }\n const { deletedCount } = await this.s._filesCollection.deleteOne({ _id: id }, { timeoutMS: timeoutContext?.remainingTimeMS });\n const remainingTimeMS = timeoutContext?.remainingTimeMS;\n if (remainingTimeMS != null && remainingTimeMS <= 0)\n throw new error_1.MongoOperationTimeoutError(`Timed out after ${timeoutMS}ms`);\n // Delete orphaned chunks before returning FileNotFound\n await this.s._chunksCollection.deleteMany({ files_id: id }, { timeoutMS: remainingTimeMS });\n if (deletedCount === 0) {\n // TODO(NODE-3483): Replace with more appropriate error\n // Consider creating new error MongoGridFSFileNotFoundError\n throw new error_1.MongoRuntimeError(`File not found for id ${id}`);\n }\n }\n /** Convenience wrapper around find on the files collection */\n find(filter = {}, options = {}) {\n return this.s._filesCollection.find(filter, options);\n }\n /**\n * Returns a readable stream (GridFSBucketReadStream) for streaming the\n * file with the given name from GridFS. If there are multiple files with\n * the same name, this will stream the most recent file with the given name\n * (as determined by the `uploadDate` field). You can set the `revision`\n * option to change this behavior.\n */\n openDownloadStreamByName(filename, options) {\n let sort = { uploadDate: -1 };\n let skip = undefined;\n if (options && options.revision != null) {\n if (options.revision >= 0) {\n sort = { uploadDate: 1 };\n skip = options.revision;\n }\n else {\n skip = -options.revision - 1;\n }\n }\n return new download_1.GridFSBucketReadStream(this.s._chunksCollection, this.s._filesCollection, this.s.options.readPreference, { filename }, { timeoutMS: this.s.options.timeoutMS, ...options, sort, skip });\n }\n /**\n * Renames the file with the given _id to the given string\n *\n * @param id - the id of the file to rename\n * @param filename - new name for the file\n */\n async rename(id, filename, options) {\n const filter = { _id: id };\n const update = { $set: { filename } };\n const { matchedCount } = await this.s._filesCollection.updateOne(filter, update, options);\n if (matchedCount === 0) {\n throw new error_1.MongoRuntimeError(`File with id ${id} not found`);\n }\n }\n /** Removes this bucket's files collection, followed by its chunks collection. */\n async drop(options) {\n const { timeoutMS } = (0, utils_1.resolveOptions)(this.s.db, options);\n let timeoutContext = undefined;\n if (timeoutMS) {\n timeoutContext = new timeout_1.CSOTTimeoutContext({\n timeoutMS,\n serverSelectionTimeoutMS: this.s.db.client.s.options.serverSelectionTimeoutMS\n });\n }\n if (timeoutContext) {\n await this.s._filesCollection.drop({ timeoutMS: timeoutContext.remainingTimeMS });\n const remainingTimeMS = timeoutContext.getRemainingTimeMSOrThrow(`Timed out after ${timeoutMS}ms`);\n await this.s._chunksCollection.drop({ timeoutMS: remainingTimeMS });\n }\n else {\n await this.s._filesCollection.drop();\n await this.s._chunksCollection.drop();\n }\n }\n}\nexports.GridFSBucket = GridFSBucket;\n/**\n * When the first call to openUploadStream is made, the upload stream will\n * check to see if it needs to create the proper indexes on the chunks and\n * files collections. This event is fired either when 1) it determines that\n * no index creation is necessary, 2) when it successfully creates the\n * necessary indexes.\n * @event\n */\nGridFSBucket.INDEX = 'index';\n//# sourceMappingURL=index.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;AACA,QAAO,eAAe,SAAS,cAAc,EAAE,OAAO,MAAM,CAAC;AAC7D,SAAQ,eAAe,KAAK;CAC5B,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM,gCAAgC;EAClC,YAAY;EACZ,gBAAgB,MAAM;EACzB;;;;;CAKD,IAAM,eAAN,cAA2B,cAAc,kBAAkB;EACvD,YAAY,IAAI,SAAS;AACrB,UAAO;AACP,QAAK,GAAG,SAAS,QAAQ,KAAK;AAC9B,QAAK,gBAAgB,EAAE;GACvB,MAAM,kBAAkB,GAAG,QAAQ,gBAAgB,IAAI;IACnD,GAAG;IACH,GAAG;IACH,cAAc,gBAAgB,aAAa,YAAY,QAAQ;IAClE,CAAC;AACF,QAAK,IAAI;IACL;IACA,SAAS;IACT,mBAAmB,GAAG,WAAW,eAAe,aAAa,UAA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W,iBAAiB,CAAC;UAElE;AACD,UAAM,KAAK,EAAE,iBAAiB,MAAM;AACpC,UAAM,KAAK,EAAE,kBAAkB,MAAM;;;;AAIjD,SAAQ,eAAe;;;;;;;;;AASvB,cAAa,QAAQ"}
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import { __commonJSMin, __require } from "../../../../../../../_virtual/rolldown_runtime.mjs";
|
|
2
|
+
import { require_bson } from "../bson.mjs";
|
|
3
|
+
import { require_error } from "../error.mjs";
|
|
4
|
+
import { require_write_concern } from "../write_concern.mjs";
|
|
5
|
+
import { require_utils } from "../utils.mjs";
|
|
6
|
+
import { require_timeout } from "../timeout.mjs";
|
|
7
|
+
import { require_abstract_cursor } from "../cursor/abstract_cursor.mjs";
|
|
8
|
+
|
|
9
|
+
//#region ../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/upload.js
|
|
10
|
+
var require_upload = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.GridFSBucketWriteStream = void 0;
|
|
13
|
+
const stream_1 = __require("stream");
|
|
14
|
+
const bson_1 = require_bson();
|
|
15
|
+
const abstract_cursor_1 = require_abstract_cursor();
|
|
16
|
+
const error_1 = require_error();
|
|
17
|
+
const timeout_1 = require_timeout();
|
|
18
|
+
const utils_1 = require_utils();
|
|
19
|
+
const write_concern_1 = require_write_concern();
|
|
20
|
+
/**
|
|
21
|
+
* A writable stream that enables you to write buffers to GridFS.
|
|
22
|
+
*
|
|
23
|
+
* Do not instantiate this class directly. Use `openUploadStream()` instead.
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
var GridFSBucketWriteStream = class extends stream_1.Writable {
|
|
27
|
+
/**
|
|
28
|
+
* @param bucket - Handle for this stream's corresponding bucket
|
|
29
|
+
* @param filename - The value of the 'filename' key in the files doc
|
|
30
|
+
* @param options - Optional settings.
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
constructor(bucket, filename, options) {
|
|
34
|
+
super();
|
|
35
|
+
/**
|
|
36
|
+
* The document containing information about the inserted file.
|
|
37
|
+
* This property is defined _after_ the finish event has been emitted.
|
|
38
|
+
* It will remain `null` if an error occurs.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* fs.createReadStream('file.txt')
|
|
43
|
+
* .pipe(bucket.openUploadStream('file.txt'))
|
|
44
|
+
* .on('finish', function () {
|
|
45
|
+
* console.log(this.gridFSFile)
|
|
46
|
+
* })
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
this.gridFSFile = null;
|
|
50
|
+
options = options ?? {};
|
|
51
|
+
this.bucket = bucket;
|
|
52
|
+
this.chunks = bucket.s._chunksCollection;
|
|
53
|
+
this.filename = filename;
|
|
54
|
+
this.files = bucket.s._filesCollection;
|
|
55
|
+
this.options = options;
|
|
56
|
+
this.writeConcern = write_concern_1.WriteConcern.fromOptions(options) || bucket.s.options.writeConcern;
|
|
57
|
+
this.done = false;
|
|
58
|
+
this.id = options.id ? options.id : new bson_1.ObjectId();
|
|
59
|
+
this.chunkSizeBytes = options.chunkSizeBytes || this.bucket.s.options.chunkSizeBytes;
|
|
60
|
+
this.bufToStore = Buffer.alloc(this.chunkSizeBytes);
|
|
61
|
+
this.length = 0;
|
|
62
|
+
this.n = 0;
|
|
63
|
+
this.pos = 0;
|
|
64
|
+
this.state = {
|
|
65
|
+
streamEnd: false,
|
|
66
|
+
outstandingRequests: 0,
|
|
67
|
+
errored: false,
|
|
68
|
+
aborted: false
|
|
69
|
+
};
|
|
70
|
+
if (options.timeoutMS != null) this.timeoutContext = new timeout_1.CSOTTimeoutContext({
|
|
71
|
+
timeoutMS: options.timeoutMS,
|
|
72
|
+
serverSelectionTimeoutMS: (0, utils_1.resolveTimeoutOptions)(this.bucket.s.db.client, {}).serverSelectionTimeoutMS
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* @internal
|
|
77
|
+
*
|
|
78
|
+
* The stream is considered constructed when the indexes are done being created
|
|
79
|
+
*/
|
|
80
|
+
_construct(callback) {
|
|
81
|
+
if (!this.bucket.s.calledOpenUploadStream) {
|
|
82
|
+
this.bucket.s.calledOpenUploadStream = true;
|
|
83
|
+
checkIndexes(this).then(() => {
|
|
84
|
+
this.bucket.s.checkedIndexes = true;
|
|
85
|
+
this.bucket.emit("index");
|
|
86
|
+
callback();
|
|
87
|
+
}, (error) => {
|
|
88
|
+
if (error instanceof error_1.MongoOperationTimeoutError) return handleError(this, error, callback);
|
|
89
|
+
(0, utils_1.squashError)(error);
|
|
90
|
+
callback();
|
|
91
|
+
});
|
|
92
|
+
} else return process.nextTick(callback);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* @internal
|
|
96
|
+
* Write a buffer to the stream.
|
|
97
|
+
*
|
|
98
|
+
* @param chunk - Buffer to write
|
|
99
|
+
* @param encoding - Optional encoding for the buffer
|
|
100
|
+
* @param callback - Function to call when the chunk was added to the buffer, or if the entire chunk was persisted to MongoDB if this chunk caused a flush.
|
|
101
|
+
*/
|
|
102
|
+
_write(chunk, encoding, callback) {
|
|
103
|
+
doWrite(this, chunk, encoding, callback);
|
|
104
|
+
}
|
|
105
|
+
/** @internal */
|
|
106
|
+
_final(callback) {
|
|
107
|
+
if (this.state.streamEnd) return process.nextTick(callback);
|
|
108
|
+
this.state.streamEnd = true;
|
|
109
|
+
writeRemnant(this, callback);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Places this write stream into an aborted state (all future writes fail)
|
|
113
|
+
* and deletes all chunks that have already been written.
|
|
114
|
+
*/
|
|
115
|
+
async abort() {
|
|
116
|
+
if (this.state.streamEnd) throw new error_1.MongoAPIError("Cannot abort a stream that has already completed");
|
|
117
|
+
if (this.state.aborted) throw new error_1.MongoAPIError("Cannot call abort() on a stream twice");
|
|
118
|
+
this.state.aborted = true;
|
|
119
|
+
const remainingTimeMS = this.timeoutContext?.getRemainingTimeMSOrThrow(`Upload timed out after ${this.timeoutContext?.timeoutMS}ms`);
|
|
120
|
+
await this.chunks.deleteMany({ files_id: this.id }, { timeoutMS: remainingTimeMS });
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
exports.GridFSBucketWriteStream = GridFSBucketWriteStream;
|
|
124
|
+
function handleError(stream, error, callback) {
|
|
125
|
+
if (stream.state.errored) {
|
|
126
|
+
process.nextTick(callback);
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
stream.state.errored = true;
|
|
130
|
+
process.nextTick(callback, error);
|
|
131
|
+
}
|
|
132
|
+
function createChunkDoc(filesId, n, data) {
|
|
133
|
+
return {
|
|
134
|
+
_id: new bson_1.ObjectId(),
|
|
135
|
+
files_id: filesId,
|
|
136
|
+
n,
|
|
137
|
+
data
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
async function checkChunksIndex(stream) {
|
|
141
|
+
const index = {
|
|
142
|
+
files_id: 1,
|
|
143
|
+
n: 1
|
|
144
|
+
};
|
|
145
|
+
let remainingTimeMS;
|
|
146
|
+
remainingTimeMS = stream.timeoutContext?.getRemainingTimeMSOrThrow(`Upload timed out after ${stream.timeoutContext?.timeoutMS}ms`);
|
|
147
|
+
let indexes;
|
|
148
|
+
try {
|
|
149
|
+
indexes = await stream.chunks.listIndexes({
|
|
150
|
+
timeoutMode: remainingTimeMS != null ? abstract_cursor_1.CursorTimeoutMode.LIFETIME : void 0,
|
|
151
|
+
timeoutMS: remainingTimeMS
|
|
152
|
+
}).toArray();
|
|
153
|
+
} catch (error) {
|
|
154
|
+
if (error instanceof error_1.MongoError && error.code === error_1.MONGODB_ERROR_CODES.NamespaceNotFound) indexes = [];
|
|
155
|
+
else throw error;
|
|
156
|
+
}
|
|
157
|
+
if (!!!indexes.find((index$1) => {
|
|
158
|
+
if (Object.keys(index$1.key).length === 2 && index$1.key.files_id === 1 && index$1.key.n === 1) return true;
|
|
159
|
+
return false;
|
|
160
|
+
})) {
|
|
161
|
+
remainingTimeMS = stream.timeoutContext?.getRemainingTimeMSOrThrow(`Upload timed out after ${stream.timeoutContext?.timeoutMS}ms`);
|
|
162
|
+
await stream.chunks.createIndex(index, {
|
|
163
|
+
...stream.writeConcern,
|
|
164
|
+
background: true,
|
|
165
|
+
unique: true,
|
|
166
|
+
timeoutMS: remainingTimeMS
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
function checkDone(stream, callback) {
|
|
171
|
+
if (stream.done) return process.nextTick(callback);
|
|
172
|
+
if (stream.state.streamEnd && stream.state.outstandingRequests === 0 && !stream.state.errored) {
|
|
173
|
+
stream.done = true;
|
|
174
|
+
const gridFSFile = createFilesDoc(stream.id, stream.length, stream.chunkSizeBytes, stream.filename, stream.options.contentType, stream.options.aliases, stream.options.metadata);
|
|
175
|
+
if (isAborted(stream, callback)) return;
|
|
176
|
+
const remainingTimeMS = stream.timeoutContext?.remainingTimeMS;
|
|
177
|
+
if (remainingTimeMS != null && remainingTimeMS <= 0) return handleError(stream, new error_1.MongoOperationTimeoutError(`Upload timed out after ${stream.timeoutContext?.timeoutMS}ms`), callback);
|
|
178
|
+
stream.files.insertOne(gridFSFile, {
|
|
179
|
+
writeConcern: stream.writeConcern,
|
|
180
|
+
timeoutMS: remainingTimeMS
|
|
181
|
+
}).then(() => {
|
|
182
|
+
stream.gridFSFile = gridFSFile;
|
|
183
|
+
callback();
|
|
184
|
+
}, (error) => {
|
|
185
|
+
return handleError(stream, error, callback);
|
|
186
|
+
});
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
process.nextTick(callback);
|
|
190
|
+
}
|
|
191
|
+
async function checkIndexes(stream) {
|
|
192
|
+
let remainingTimeMS = stream.timeoutContext?.getRemainingTimeMSOrThrow(`Upload timed out after ${stream.timeoutContext?.timeoutMS}ms`);
|
|
193
|
+
if (await stream.files.findOne({}, {
|
|
194
|
+
projection: { _id: 1 },
|
|
195
|
+
timeoutMS: remainingTimeMS
|
|
196
|
+
}) != null) return;
|
|
197
|
+
const index = {
|
|
198
|
+
filename: 1,
|
|
199
|
+
uploadDate: 1
|
|
200
|
+
};
|
|
201
|
+
let indexes;
|
|
202
|
+
remainingTimeMS = stream.timeoutContext?.getRemainingTimeMSOrThrow(`Upload timed out after ${stream.timeoutContext?.timeoutMS}ms`);
|
|
203
|
+
const listIndexesOptions = {
|
|
204
|
+
timeoutMode: remainingTimeMS != null ? abstract_cursor_1.CursorTimeoutMode.LIFETIME : void 0,
|
|
205
|
+
timeoutMS: remainingTimeMS
|
|
206
|
+
};
|
|
207
|
+
try {
|
|
208
|
+
indexes = await stream.files.listIndexes(listIndexesOptions).toArray();
|
|
209
|
+
} catch (error) {
|
|
210
|
+
if (error instanceof error_1.MongoError && error.code === error_1.MONGODB_ERROR_CODES.NamespaceNotFound) indexes = [];
|
|
211
|
+
else throw error;
|
|
212
|
+
}
|
|
213
|
+
if (!!!indexes.find((index$1) => {
|
|
214
|
+
if (Object.keys(index$1.key).length === 2 && index$1.key.filename === 1 && index$1.key.uploadDate === 1) return true;
|
|
215
|
+
return false;
|
|
216
|
+
})) {
|
|
217
|
+
remainingTimeMS = stream.timeoutContext?.getRemainingTimeMSOrThrow(`Upload timed out after ${stream.timeoutContext?.timeoutMS}ms`);
|
|
218
|
+
await stream.files.createIndex(index, {
|
|
219
|
+
background: false,
|
|
220
|
+
timeoutMS: remainingTimeMS
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
await checkChunksIndex(stream);
|
|
224
|
+
}
|
|
225
|
+
function createFilesDoc(_id, length, chunkSize, filename, contentType, aliases, metadata) {
|
|
226
|
+
const ret = {
|
|
227
|
+
_id,
|
|
228
|
+
length,
|
|
229
|
+
chunkSize,
|
|
230
|
+
uploadDate: /* @__PURE__ */ new Date(),
|
|
231
|
+
filename
|
|
232
|
+
};
|
|
233
|
+
if (contentType) ret.contentType = contentType;
|
|
234
|
+
if (aliases) ret.aliases = aliases;
|
|
235
|
+
if (metadata) ret.metadata = metadata;
|
|
236
|
+
return ret;
|
|
237
|
+
}
|
|
238
|
+
function doWrite(stream, chunk, encoding, callback) {
|
|
239
|
+
if (isAborted(stream, callback)) return;
|
|
240
|
+
const inputBuf = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk, encoding);
|
|
241
|
+
stream.length += inputBuf.length;
|
|
242
|
+
if (stream.pos + inputBuf.length < stream.chunkSizeBytes) {
|
|
243
|
+
inputBuf.copy(stream.bufToStore, stream.pos);
|
|
244
|
+
stream.pos += inputBuf.length;
|
|
245
|
+
process.nextTick(callback);
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
let inputBufRemaining = inputBuf.length;
|
|
249
|
+
let spaceRemaining = stream.chunkSizeBytes - stream.pos;
|
|
250
|
+
let numToCopy = Math.min(spaceRemaining, inputBuf.length);
|
|
251
|
+
let outstandingRequests = 0;
|
|
252
|
+
while (inputBufRemaining > 0) {
|
|
253
|
+
const inputBufPos = inputBuf.length - inputBufRemaining;
|
|
254
|
+
inputBuf.copy(stream.bufToStore, stream.pos, inputBufPos, inputBufPos + numToCopy);
|
|
255
|
+
stream.pos += numToCopy;
|
|
256
|
+
spaceRemaining -= numToCopy;
|
|
257
|
+
let doc;
|
|
258
|
+
if (spaceRemaining === 0) {
|
|
259
|
+
doc = createChunkDoc(stream.id, stream.n, Buffer.from(stream.bufToStore));
|
|
260
|
+
const remainingTimeMS = stream.timeoutContext?.remainingTimeMS;
|
|
261
|
+
if (remainingTimeMS != null && remainingTimeMS <= 0) return handleError(stream, new error_1.MongoOperationTimeoutError(`Upload timed out after ${stream.timeoutContext?.timeoutMS}ms`), callback);
|
|
262
|
+
++stream.state.outstandingRequests;
|
|
263
|
+
++outstandingRequests;
|
|
264
|
+
if (isAborted(stream, callback)) return;
|
|
265
|
+
stream.chunks.insertOne(doc, {
|
|
266
|
+
writeConcern: stream.writeConcern,
|
|
267
|
+
timeoutMS: remainingTimeMS
|
|
268
|
+
}).then(() => {
|
|
269
|
+
--stream.state.outstandingRequests;
|
|
270
|
+
--outstandingRequests;
|
|
271
|
+
if (!outstandingRequests) checkDone(stream, callback);
|
|
272
|
+
}, (error) => {
|
|
273
|
+
return handleError(stream, error, callback);
|
|
274
|
+
});
|
|
275
|
+
spaceRemaining = stream.chunkSizeBytes;
|
|
276
|
+
stream.pos = 0;
|
|
277
|
+
++stream.n;
|
|
278
|
+
}
|
|
279
|
+
inputBufRemaining -= numToCopy;
|
|
280
|
+
numToCopy = Math.min(spaceRemaining, inputBufRemaining);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
function writeRemnant(stream, callback) {
|
|
284
|
+
if (stream.pos === 0) return checkDone(stream, callback);
|
|
285
|
+
const remnant = Buffer.alloc(stream.pos);
|
|
286
|
+
stream.bufToStore.copy(remnant, 0, 0, stream.pos);
|
|
287
|
+
const doc = createChunkDoc(stream.id, stream.n, remnant);
|
|
288
|
+
if (isAborted(stream, callback)) return;
|
|
289
|
+
const remainingTimeMS = stream.timeoutContext?.remainingTimeMS;
|
|
290
|
+
if (remainingTimeMS != null && remainingTimeMS <= 0) return handleError(stream, new error_1.MongoOperationTimeoutError(`Upload timed out after ${stream.timeoutContext?.timeoutMS}ms`), callback);
|
|
291
|
+
++stream.state.outstandingRequests;
|
|
292
|
+
stream.chunks.insertOne(doc, {
|
|
293
|
+
writeConcern: stream.writeConcern,
|
|
294
|
+
timeoutMS: remainingTimeMS
|
|
295
|
+
}).then(() => {
|
|
296
|
+
--stream.state.outstandingRequests;
|
|
297
|
+
checkDone(stream, callback);
|
|
298
|
+
}, (error) => {
|
|
299
|
+
return handleError(stream, error, callback);
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
function isAborted(stream, callback) {
|
|
303
|
+
if (stream.state.aborted) {
|
|
304
|
+
process.nextTick(callback, new error_1.MongoAPIError("Stream has been aborted"));
|
|
305
|
+
return true;
|
|
306
|
+
}
|
|
307
|
+
return false;
|
|
308
|
+
}
|
|
309
|
+
}));
|
|
310
|
+
|
|
311
|
+
//#endregion
|
|
312
|
+
export default require_upload();
|
|
313
|
+
|
|
314
|
+
export { require_upload };
|
|
315
|
+
//# sourceMappingURL=upload.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload.mjs","names":["index"],"sources":["../../../../../../../../../../node_modules/.pnpm/mongodb@6.21.0/node_modules/mongodb/lib/gridfs/upload.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GridFSBucketWriteStream = void 0;\nconst stream_1 = require(\"stream\");\nconst bson_1 = require(\"../bson\");\nconst abstract_cursor_1 = require(\"../cursor/abstract_cursor\");\nconst error_1 = require(\"../error\");\nconst timeout_1 = require(\"../timeout\");\nconst utils_1 = require(\"../utils\");\nconst write_concern_1 = require(\"./../write_concern\");\n/**\n * A writable stream that enables you to write buffers to GridFS.\n *\n * Do not instantiate this class directly. Use `openUploadStream()` instead.\n * @public\n */\nclass GridFSBucketWriteStream extends stream_1.Writable {\n /**\n * @param bucket - Handle for this stream's corresponding bucket\n * @param filename - The value of the 'filename' key in the files doc\n * @param options - Optional settings.\n * @internal\n */\n constructor(bucket, filename, options) {\n super();\n /**\n * The document containing information about the inserted file.\n * This property is defined _after_ the finish event has been emitted.\n * It will remain `null` if an error occurs.\n *\n * @example\n * ```ts\n * fs.createReadStream('file.txt')\n * .pipe(bucket.openUploadStream('file.txt'))\n * .on('finish', function () {\n * console.log(this.gridFSFile)\n * })\n * ```\n */\n this.gridFSFile = null;\n options = options ?? {};\n this.bucket = bucket;\n this.chunks = bucket.s._chunksCollection;\n this.filename = filename;\n this.files = bucket.s._filesCollection;\n this.options = options;\n this.writeConcern = write_concern_1.WriteConcern.fromOptions(options) || bucket.s.options.writeConcern;\n // Signals the write is all done\n this.done = false;\n this.id = options.id ? options.id : new bson_1.ObjectId();\n // properly inherit the default chunksize from parent\n this.chunkSizeBytes = options.chunkSizeBytes || this.bucket.s.options.chunkSizeBytes;\n this.bufToStore = Buffer.alloc(this.chunkSizeBytes);\n this.length = 0;\n this.n = 0;\n this.pos = 0;\n this.state = {\n streamEnd: false,\n outstandingRequests: 0,\n errored: false,\n aborted: false\n };\n if (options.timeoutMS != null)\n this.timeoutContext = new timeout_1.CSOTTimeoutContext({\n timeoutMS: options.timeoutMS,\n serverSelectionTimeoutMS: (0, utils_1.resolveTimeoutOptions)(this.bucket.s.db.client, {})\n .serverSelectionTimeoutMS\n });\n }\n /**\n * @internal\n *\n * The stream is considered constructed when the indexes are done being created\n */\n _construct(callback) {\n if (!this.bucket.s.calledOpenUploadStream) {\n this.bucket.s.calledOpenUploadStream = true;\n checkIndexes(this).then(() => {\n this.bucket.s.checkedIndexes = true;\n this.bucket.emit('index');\n callback();\n }, error => {\n if (error instanceof error_1.MongoOperationTimeoutError) {\n return handleError(this, error, callback);\n }\n (0, utils_1.squashError)(error);\n callback();\n });\n }\n else {\n return process.nextTick(callback);\n }\n }\n /**\n * @internal\n * Write a buffer to the stream.\n *\n * @param chunk - Buffer to write\n * @param encoding - Optional encoding for the buffer\n * @param callback - Function to call when the chunk was added to the buffer, or if the entire chunk was persisted to MongoDB if this chunk caused a flush.\n */\n _write(chunk, encoding, callback) {\n doWrite(this, chunk, encoding, callback);\n }\n /** @internal */\n _final(callback) {\n if (this.state.streamEnd) {\n return process.nextTick(callback);\n }\n this.state.streamEnd = true;\n writeRemnant(this, callback);\n }\n /**\n * Places this write stream into an aborted state (all future writes fail)\n * and deletes all chunks that have already been written.\n */\n async abort() {\n if (this.state.streamEnd) {\n // TODO(NODE-3485): Replace with MongoGridFSStreamClosed\n throw new error_1.MongoAPIError('Cannot abort a stream that has already completed');\n }\n if (this.state.aborted) {\n // TODO(NODE-3485): Replace with MongoGridFSStreamClosed\n throw new error_1.MongoAPIError('Cannot call abort() on a stream twice');\n }\n this.state.aborted = true;\n const remainingTimeMS = this.timeoutContext?.getRemainingTimeMSOrThrow(`Upload timed out after ${this.timeoutContext?.timeoutMS}ms`);\n await this.chunks.deleteMany({ files_id: this.id }, { timeoutMS: remainingTimeMS });\n }\n}\nexports.GridFSBucketWriteStream = GridFSBucketWriteStream;\nfunction handleError(stream, error, callback) {\n if (stream.state.errored) {\n process.nextTick(callback);\n return;\n }\n stream.state.errored = true;\n process.nextTick(callback, error);\n}\nfunction createChunkDoc(filesId, n, data) {\n return {\n _id: new bson_1.ObjectId(),\n files_id: filesId,\n n,\n data\n };\n}\nasync function checkChunksIndex(stream) {\n const index = { files_id: 1, n: 1 };\n let remainingTimeMS;\n remainingTimeMS = stream.timeoutContext?.getRemainingTimeMSOrThrow(`Upload timed out after ${stream.timeoutContext?.timeoutMS}ms`);\n let indexes;\n try {\n indexes = await stream.chunks\n .listIndexes({\n timeoutMode: remainingTimeMS != null ? abstract_cursor_1.CursorTimeoutMode.LIFETIME : undefined,\n timeoutMS: remainingTimeMS\n })\n .toArray();\n }\n catch (error) {\n if (error instanceof error_1.MongoError && error.code === error_1.MONGODB_ERROR_CODES.NamespaceNotFound) {\n indexes = [];\n }\n else {\n throw error;\n }\n }\n const hasChunksIndex = !!indexes.find(index => {\n const keys = Object.keys(index.key);\n if (keys.length === 2 && index.key.files_id === 1 && index.key.n === 1) {\n return true;\n }\n return false;\n });\n if (!hasChunksIndex) {\n remainingTimeMS = stream.timeoutContext?.getRemainingTimeMSOrThrow(`Upload timed out after ${stream.timeoutContext?.timeoutMS}ms`);\n await stream.chunks.createIndex(index, {\n ...stream.writeConcern,\n background: true,\n unique: true,\n timeoutMS: remainingTimeMS\n });\n }\n}\nfunction checkDone(stream, callback) {\n if (stream.done) {\n return process.nextTick(callback);\n }\n if (stream.state.streamEnd && stream.state.outstandingRequests === 0 && !stream.state.errored) {\n // Set done so we do not trigger duplicate createFilesDoc\n stream.done = true;\n // Create a new files doc\n const gridFSFile = createFilesDoc(stream.id, stream.length, stream.chunkSizeBytes, stream.filename, stream.options.contentType, stream.options.aliases, stream.options.metadata);\n if (isAborted(stream, callback)) {\n return;\n }\n const remainingTimeMS = stream.timeoutContext?.remainingTimeMS;\n if (remainingTimeMS != null && remainingTimeMS <= 0) {\n return handleError(stream, new error_1.MongoOperationTimeoutError(`Upload timed out after ${stream.timeoutContext?.timeoutMS}ms`), callback);\n }\n stream.files\n .insertOne(gridFSFile, { writeConcern: stream.writeConcern, timeoutMS: remainingTimeMS })\n .then(() => {\n stream.gridFSFile = gridFSFile;\n callback();\n }, error => {\n return handleError(stream, error, callback);\n });\n return;\n }\n process.nextTick(callback);\n}\nasync function checkIndexes(stream) {\n let remainingTimeMS = stream.timeoutContext?.getRemainingTimeMSOrThrow(`Upload timed out after ${stream.timeoutContext?.timeoutMS}ms`);\n const doc = await stream.files.findOne({}, {\n projection: { _id: 1 },\n timeoutMS: remainingTimeMS\n });\n if (doc != null) {\n // If at least one document exists assume the collection has the required index\n return;\n }\n const index = { filename: 1, uploadDate: 1 };\n let indexes;\n remainingTimeMS = stream.timeoutContext?.getRemainingTimeMSOrThrow(`Upload timed out after ${stream.timeoutContext?.timeoutMS}ms`);\n const listIndexesOptions = {\n timeoutMode: remainingTimeMS != null ? abstract_cursor_1.CursorTimeoutMode.LIFETIME : undefined,\n timeoutMS: remainingTimeMS\n };\n try {\n indexes = await stream.files.listIndexes(listIndexesOptions).toArray();\n }\n catch (error) {\n if (error instanceof error_1.MongoError && error.code === error_1.MONGODB_ERROR_CODES.NamespaceNotFound) {\n indexes = [];\n }\n else {\n throw error;\n }\n }\n const hasFileIndex = !!indexes.find(index => {\n const keys = Object.keys(index.key);\n if (keys.length === 2 && index.key.filename === 1 && index.key.uploadDate === 1) {\n return true;\n }\n return false;\n });\n if (!hasFileIndex) {\n remainingTimeMS = stream.timeoutContext?.getRemainingTimeMSOrThrow(`Upload timed out after ${stream.timeoutContext?.timeoutMS}ms`);\n await stream.files.createIndex(index, { background: false, timeoutMS: remainingTimeMS });\n }\n await checkChunksIndex(stream);\n}\nfunction createFilesDoc(_id, length, chunkSize, filename, contentType, aliases, metadata) {\n const ret = {\n _id,\n length,\n chunkSize,\n uploadDate: new Date(),\n filename\n };\n if (contentType) {\n ret.contentType = contentType;\n }\n if (aliases) {\n ret.aliases = aliases;\n }\n if (metadata) {\n ret.metadata = metadata;\n }\n return ret;\n}\nfunction doWrite(stream, chunk, encoding, callback) {\n if (isAborted(stream, callback)) {\n return;\n }\n const inputBuf = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk, encoding);\n stream.length += inputBuf.length;\n // Input is small enough to fit in our buffer\n if (stream.pos + inputBuf.length < stream.chunkSizeBytes) {\n inputBuf.copy(stream.bufToStore, stream.pos);\n stream.pos += inputBuf.length;\n process.nextTick(callback);\n return;\n }\n // Otherwise, buffer is too big for current chunk, so we need to flush\n // to MongoDB.\n let inputBufRemaining = inputBuf.length;\n let spaceRemaining = stream.chunkSizeBytes - stream.pos;\n let numToCopy = Math.min(spaceRemaining, inputBuf.length);\n let outstandingRequests = 0;\n while (inputBufRemaining > 0) {\n const inputBufPos = inputBuf.length - inputBufRemaining;\n inputBuf.copy(stream.bufToStore, stream.pos, inputBufPos, inputBufPos + numToCopy);\n stream.pos += numToCopy;\n spaceRemaining -= numToCopy;\n let doc;\n if (spaceRemaining === 0) {\n doc = createChunkDoc(stream.id, stream.n, Buffer.from(stream.bufToStore));\n const remainingTimeMS = stream.timeoutContext?.remainingTimeMS;\n if (remainingTimeMS != null && remainingTimeMS <= 0) {\n return handleError(stream, new error_1.MongoOperationTimeoutError(`Upload timed out after ${stream.timeoutContext?.timeoutMS}ms`), callback);\n }\n ++stream.state.outstandingRequests;\n ++outstandingRequests;\n if (isAborted(stream, callback)) {\n return;\n }\n stream.chunks\n .insertOne(doc, { writeConcern: stream.writeConcern, timeoutMS: remainingTimeMS })\n .then(() => {\n --stream.state.outstandingRequests;\n --outstandingRequests;\n if (!outstandingRequests) {\n checkDone(stream, callback);\n }\n }, error => {\n return handleError(stream, error, callback);\n });\n spaceRemaining = stream.chunkSizeBytes;\n stream.pos = 0;\n ++stream.n;\n }\n inputBufRemaining -= numToCopy;\n numToCopy = Math.min(spaceRemaining, inputBufRemaining);\n }\n}\nfunction writeRemnant(stream, callback) {\n // Buffer is empty, so don't bother to insert\n if (stream.pos === 0) {\n return checkDone(stream, callback);\n }\n // Create a new buffer to make sure the buffer isn't bigger than it needs\n // to be.\n const remnant = Buffer.alloc(stream.pos);\n stream.bufToStore.copy(remnant, 0, 0, stream.pos);\n const doc = createChunkDoc(stream.id, stream.n, remnant);\n // If the stream was aborted, do not write remnant\n if (isAborted(stream, callback)) {\n return;\n }\n const remainingTimeMS = stream.timeoutContext?.remainingTimeMS;\n if (remainingTimeMS != null && remainingTimeMS <= 0) {\n return handleError(stream, new error_1.MongoOperationTimeoutError(`Upload timed out after ${stream.timeoutContext?.timeoutMS}ms`), callback);\n }\n ++stream.state.outstandingRequests;\n stream.chunks\n .insertOne(doc, { writeConcern: stream.writeConcern, timeoutMS: remainingTimeMS })\n .then(() => {\n --stream.state.outstandingRequests;\n checkDone(stream, callback);\n }, error => {\n return handleError(stream, error, callback);\n });\n}\nfunction isAborted(stream, callback) {\n if (stream.state.aborted) {\n process.nextTick(callback, new error_1.MongoAPIError('Stream has been aborted'));\n return true;\n }\n return false;\n}\n//# sourceMappingURL=upload.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;AACA,QAAO,eAAe,SAAS,cAAc,EAAE,OAAO,MAAM,CAAC;AAC7D,SAAQ,0BAA0B,KAAK;CACvC,MAAM,qBAAmB,SAAS;CAClC,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;;;;;;;CAON,IAAM,0BAAN,cAAsC,SAAS,SAAS;;;;;;;EAOpD,YAAY,QAAQ,UAAU,SAAS;AACnC,UAAO;;;;;;;;;;;;;;;AAeP,QAAK,aAAa;AAClB,aAAU,WAAW,EAAE;AACvB,QAAK,SAAS;AACd,QAAK,SAAS,OAAO,EAAE;AACvB,QAAK,WAAW;AAChB,QAAK,QAAQ,OAAO,EA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