From 118be7223c23ebbdd14e719ea4de3100fdb9dad2 Mon Sep 17 00:00:00 2001 From: donutegg <123068288+donutegg@users.noreply.github.com> Date: Sat, 12 Aug 2023 19:44:34 +0100 Subject: [PATCH 1/2] chore(deps): update dependency env-paths to v3 --- .buildkite/publish/docker-compose.yml | 2 +- .buildkite/publish/publish.yml | 2 +- .buildkite/test/run.sh | 4 +- .github/renovate.json | 44 +- .github/workflows/test-template.yml | 41 +- README.md | 15 +- docker/README.md | 21 +- docker/docker-compose.arm64.yml | 11 + docker/docker-compose.yml | 6 +- .../plugins/fill-plugin/fillers/process.ts | 12 +- package.json | 22 +- packages/cli/README.md | 9 +- packages/cli/package.json | 12 +- packages/cli/src/Studio.ts | 17 +- packages/client/README.md | 2 +- packages/client/extension.d.ts | 1 - packages/client/extension.js | 3 - .../helpers/functional-test/run-tests.ts | 16 +- packages/client/package.json | 36 +- packages/client/scripts/default-index.d.ts | 53 +- packages/client/scripts/default-index.js | 10 - .../errors/client-version-error/test.ts | 2 +- .../integration/errors/multi-schema/test.ts | 4 +- .../integration/happy/distinct/test.ts | 18 +- .../__snapshots__/test.ts.snap | 5074 +++++++---------- .../__snapshots__/test.ts.snap | 4620 ++++++--------- .../src/__tests__/types/distinct/test.ts | 8 - .../client/src/generation/TSClient/Args.ts | 21 +- .../client/src/generation/TSClient/Count.ts | 11 +- .../client/src/generation/TSClient/Input.ts | 9 +- .../client/src/generation/TSClient/Model.ts | 172 +- .../client/src/generation/TSClient/Output.ts | 60 +- .../client/src/generation/TSClient/Payload.ts | 117 + .../src/generation/TSClient/PrismaClient.ts | 247 +- .../src/generation/TSClient/SelectInclude.ts | 33 +- .../client/src/generation/TSClient/common.ts | 51 +- .../client/src/generation/TSClient/helpers.ts | 13 +- .../generation/TSClient/utils/ifExtensions.ts | 9 + .../src/generation/ts-builders/Export.ts | 11 - .../src/generation/ts-builders/NamedType.ts | 8 + .../src/generation/ts-builders/ObjectType.ts | 7 - .../generation/ts-builders/PrimitiveType.ts | 1 - .../src/generation/ts-builders/helpers.ts | 14 - .../src/generation/ts-builders/index.ts | 1 - packages/client/src/generation/utils.ts | 44 +- .../src/generation/utils/buildDirname.ts | 5 +- packages/client/src/runtime/DataLoader.ts | 4 - packages/client/src/runtime/RequestHandler.ts | 113 +- .../compositeProxy/createCompositeProxy.ts | 10 +- .../core/compositeProxy/removeProperties.ts | 2 +- .../core/engines/binary/BinaryEngine.ts | 2 +- .../core/engines/common/types/JsonProtocol.ts | 2 +- .../core/engines/library/LibraryEngine.ts | 2 +- .../core/errorRendering/applyUnionError.ts | 143 - .../applyValidationError.test.ts | 67 +- .../errorRendering/applyValidationError.ts | 70 +- .../errors/PrismaClientInitializationError.ts | 2 - .../errors/PrismaClientKnownRequestError.ts | 3 +- .../core/errors/PrismaClientRustPanicError.ts | 3 +- .../src/runtime/core/extensions/$extends.ts | 77 +- .../core/extensions/MergedExtensionsList.ts | 43 +- .../core/extensions/applyQueryExtensions.ts | 74 +- .../core/extensions/getExtensionContext.ts | 7 +- .../src/runtime/core/model/applyModel.ts | 3 +- .../model/applyModelsAndClientExtensions.ts | 2 +- .../protocol/json/JsonProtocolEncoder.test.ts | 94 - .../core/protocol/json/JsonProtocolEncoder.ts | 2 +- .../core/protocol/json/serialize.test.ts | 3 +- .../runtime/core/protocol/json/serialize.ts | 2 +- .../client/src/runtime/core/public/index.ts | 9 - .../src/runtime/core/public/validator.ts | 18 - .../runtime/core/raw-query/RawQueryArgs.ts | 2 +- .../core/raw-query/rawCommandArgsMapper.ts | 3 - .../core/raw-query/rawQueryArgsMapper.ts | 172 +- .../core/request/createPrismaPromise.ts | 85 +- .../src/runtime/core/types/Extensions.ts | 231 +- .../src/runtime/core/types/GetResult.ts | 119 +- .../client/src/runtime/core/types/Payload.ts | 3 - .../client/src/runtime/core/types/Public.ts | 2 +- .../client/src/runtime/core/types/Utils.ts | 98 +- .../client/src/runtime/core/types/index.ts | 7 +- .../client/src/runtime/getPrismaClient.ts | 159 +- packages/client/src/runtime/index-browser.ts | 4 - packages/client/src/runtime/index.ts | 12 +- .../client/src/runtime/itxClientDenyList.ts | 5 - packages/client/src/runtime/query.ts | 2 +- .../client/src/runtime/utils/deepCloneArgs.ts | 82 - .../runtime/utils/mssqlPreparedStatement.ts | 6 +- .../e2e/bundler-detection-error/tests/main.ts | 20 + .../publish-extensions/_steps.ts | 7 +- .../publish-extensions}/package.json | 2 +- .../publish-extensions/prisma/schema.prisma | 0 .../publish-extensions/readme.md | 2 +- .../simple-ext/package.json | 6 +- .../simple-ext/src/index.ts | 2 +- .../simple-ext/tsconfig.json | 0 .../publish-extensions/src/index.ts} | 12 +- .../publish-extensions}/tsconfig.json | 0 .../tests/e2e/default-version/_steps.ts | 17 - .../tests/e2e/default-version/package.json | 13 - .../tests/e2e/default-version/pnpm-lock.yaml | 36 - .../tests/e2e/default-version/readme.md | 3 - .../tests/e2e/default-version/tests/main.ts | 6 - .../tests/e2e/default-version/tsconfig.json | 4 - .../readme.md | 2 +- packages/client/tests/e2e/example/_steps.ts | 2 +- .../client/tests/e2e/example/package.json | 1 - .../tests/e2e/example/prisma/schema.prisma | 1 + .../client/tests/e2e/example/tsconfig.json | 2 +- .../19866-ts-composite-declaration/_steps.ts | 19 - .../pnpm-lock.yaml | 55 - .../prisma/schema.prisma | 35 - .../19866-ts-composite-declaration/readme.md | 3 - .../src/index.ts | 7 - .../tsconfig.json | 9 - .../issues/studio-1128-spawn-enoent/_steps.ts | 32 - .../studio-1128-spawn-enoent/package.json | 10 - .../prisma/schema.prisma | 13 - .../issues/studio-1128-spawn-enoent/readme.md | 3 - packages/client/tests/e2e/jest.config.js | 1 - .../tests/vercel-auto-generate.ts | 2 +- .../tests/e2e/publish-extensions/package.json | 15 - .../e2e/publish-extensions/pnpm-lock.yaml | 386 -- .../simple-ext/pnpm-lock.yaml | 48 - .../e2e/publish-extensions/tsconfig.json | 4 - .../functional/_utils/setupFilesAfterEnv.ts | 15 +- .../functional/_utils/setupTestSuiteEnv.ts | 2 +- .../functional/_utils/setupTestSuiteMatrix.ts | 14 - .../client/tests/functional/batching/tests.ts | 11 - .../tests/functional/blog-update/tests.ts | 8 +- .../composites/selection/_matrix.ts | 9 - .../composites/selection/prisma/_schema.ts | 36 - .../functional/composites/selection/tests.ts | 109 - .../functional/decimal/precision/tests.ts | 2 - .../functional/default-selection/_matrix.ts | 2 - .../default-selection/prisma/_schema.ts | 3 +- .../extensions/__snapshots__/itx.ts.snap | 121 - .../tests/functional/extensions/_matrix.ts | 24 - .../functional/extensions/defineExtension.ts | 667 --- .../disabled}/_matrix.ts | 0 .../disabled}/prisma/_schema.ts | 2 - .../functional/extensions/disabled/tests.ts | 16 + .../enabled/__snapshots__/itx.ts.snap | 121 + .../{ => enabled}/__snapshots__/tx.ts.snap | 36 +- .../enabled}/_matrix.ts | 0 .../extensions/{ => enabled}/client.ts | 102 +- .../extensions/enabled/defineExtension.ts | 400 ++ .../extensions/{ => enabled}/extends.ts | 5 - .../extensions/{ => enabled}/itx.ts | 131 +- .../extensions/{ => enabled}/model.ts | 30 +- .../{ => enabled}/prisma/_schema.ts | 2 +- .../{pdp.ts => enabled/query-accelerate.ts} | 130 +- .../extensions/{ => enabled}/query.ts | 187 +- .../extensions/{ => enabled}/result.ts | 33 +- .../functional/extensions/{ => enabled}/tx.ts | 28 - .../filter-count-relations/prisma/_schema.ts | 1 + .../11740-transaction-stored-query/tests.ts | 4 +- .../tests.ts | 6 +- .../tests/functional/issues/15044/tests.ts | 4 +- .../tests/functional/issues/15176/tests.ts | 2 +- .../15644-middleware-arg-types/_matrix.ts | 3 - .../15644-middleware-arg-types/tests.ts | 60 +- .../17405-extensions-casing/prisma/_schema.ts | 20 - .../issues/17405-extensions-casing/tests.ts | 24 - .../prisma/_schema.ts | 21 - .../17948-tx-client-extensions/tests.ts | 38 - .../issues/18276-batch-order/_matrix.ts | 21 - .../18276-batch-order/prisma/_schema.ts | 20 - .../issues/18276-batch-order/tests.ts | 77 - .../18854-extensions-db-null/_matrix.ts | 15 - .../issues/18854-extensions-db-null/tests.ts | 33 - .../client/tests/functional/logging/tests.ts | 6 +- .../functional/methods/create-many/tests.ts | 14 +- .../methods/upsert/native-atomic/tests.ts | 14 +- .../functional/methods/upsert/simple/tests.ts | 4 +- .../functional/middleware-raw-args/_matrix.ts | 21 - .../middleware-raw-args/prisma/_schema.ts | 20 - .../functional/middleware-raw-args/tests.ts | 66 - .../tests/functional/multi-schema/tests.ts | 4 +- .../order-by-null/prisma/_schema.ts | 1 + .../query-validation/prisma/_schema.ts | 21 +- .../functional/query-validation/tests.ts | 465 +- .../tests_m-to-n-MongoDB.ts | 2 +- .../tests.ts | 2 +- .../tests/functional/validator/_matrix.ts | 9 - .../functional/validator/prisma/_schema.ts | 19 - .../tests/functional/validator/tests.ts | 180 - .../client/tests/functional/views/tests.ts | 8 +- packages/debug/package.json | 4 +- packages/engines/README.md | 2 +- packages/engines/package.json | 8 +- packages/engines/src/index.ts | 2 - packages/fetch-engine/package.json | 12 +- .../src/__tests__/binaryTarget/.gitkeep | 0 .../src/__tests__/checksum/.gitkeep | 0 .../src/__tests__/download.test.ts | 1193 ++-- packages/fetch-engine/src/download.ts | 16 +- packages/fetch-engine/src/downloadZip.ts | 65 +- packages/fetch-engine/src/getProxyAgent.ts | 12 +- packages/generator-helper/package.json | 6 +- packages/get-platform/package.json | 6 +- .../src/__tests__/getPlatform.test.ts | 2 +- packages/get-platform/src/getPlatform.ts | 2 +- packages/get-platform/src/platforms.ts | 4 - packages/instrumentation/README.md | 2 +- packages/instrumentation/package.json | 6 +- packages/integration-tests/package.json | 12 +- .../integration/sqlite/__database.ts | 2 +- packages/internals/package.json | 10 +- .../__snapshots__/getDmmf.test.ts.snap | 460 +- .../auto-installation/getPackageCmd.ts | 2 +- .../auto-installation/runPackageCmd.ts | 2 +- .../check-dependencies/isYarnUsed.ts | 2 +- .../prisma-client-js/prismaClientResolver.ts | 6 +- packages/internals/src/index.ts | 2 +- packages/internals/src/utils/max.test.ts | 23 - packages/internals/src/utils/max.ts | 28 - packages/internals/src/utils/maxBy.test.ts | 10 + packages/internals/src/utils/maxBy.ts | 16 + packages/migrate/README.md | 2 - packages/migrate/package.json | 15 +- .../src/utils/getSchemaPathAndPrint.ts | 2 +- .../package.json | 2 +- packages/ni/.gitignore | 85 + packages/ni/LICENSE | 21 + packages/ni/README.md | 5 + packages/ni/helpers/build.ts | 10 + packages/ni/package.json | 53 + packages/ni/src/agents.ts | 102 + packages/ni/src/commands/index.ts | 1 + packages/ni/src/commands/na.ts | 4 + packages/ni/src/commands/nci.ts | 7 + packages/ni/src/commands/ni.ts | 4 + packages/ni/src/commands/nlx.ts | 4 + packages/ni/src/commands/nr.ts | 95 + packages/ni/src/commands/nu.ts | 4 + packages/ni/src/commands/nun.ts | 4 + packages/ni/src/config.ts | 57 + packages/ni/src/detect.ts | 75 + packages/ni/src/fs.ts | 24 + packages/ni/src/index.ts | 6 + packages/ni/src/parse.ts | 84 + packages/ni/src/runner.ts | 109 + packages/ni/src/storage.ts | 31 + packages/ni/src/utils.ts | 91 + packages/ni/tsconfig.build.json | 7 + packages/ni/tsconfig.json | 3 + packages/react-prisma/package.json | 10 +- ...ch@2.6.11.patch => node-fetch@2.6.7.patch} | 10 +- pnpm-lock.yaml | 3791 ++++++++---- scripts/ci/publish.ts | 4 +- tsconfig.build.bundle.json | 1 + 252 files changed, 10144 insertions(+), 13375 deletions(-) create mode 100644 docker/docker-compose.arm64.yml delete mode 100644 packages/client/extension.d.ts delete mode 100644 packages/client/extension.js create mode 100644 packages/client/src/generation/TSClient/Payload.ts create mode 100644 packages/client/src/generation/TSClient/utils/ifExtensions.ts delete mode 100644 packages/client/src/generation/ts-builders/helpers.ts delete mode 100644 packages/client/src/runtime/core/errorRendering/applyUnionError.ts delete mode 100644 packages/client/src/runtime/core/protocol/json/JsonProtocolEncoder.test.ts delete mode 100644 packages/client/src/runtime/core/public/index.ts delete mode 100644 packages/client/src/runtime/core/public/validator.ts delete mode 100644 packages/client/src/runtime/core/raw-query/rawCommandArgsMapper.ts delete mode 100644 packages/client/src/runtime/itxClientDenyList.ts delete mode 100644 packages/client/src/runtime/utils/deepCloneArgs.ts rename packages/client/tests/e2e/{ => community}/publish-extensions/_steps.ts (75%) rename packages/client/tests/e2e/{issues/19866-ts-composite-declaration => community/publish-extensions}/package.json (82%) rename packages/client/tests/e2e/{ => community}/publish-extensions/prisma/schema.prisma (100%) rename packages/client/tests/e2e/{ => community}/publish-extensions/readme.md (68%) rename packages/client/tests/e2e/{ => community}/publish-extensions/simple-ext/package.json (59%) rename packages/client/tests/e2e/{ => community}/publish-extensions/simple-ext/src/index.ts (80%) rename packages/client/tests/e2e/{ => community}/publish-extensions/simple-ext/tsconfig.json (100%) rename packages/client/tests/e2e/{publish-extensions/tests/main.ts => community/publish-extensions/src/index.ts} (52%) rename packages/client/tests/e2e/{issues/studio-1128-spawn-enoent => community/publish-extensions}/tsconfig.json (100%) delete mode 100644 packages/client/tests/e2e/default-version/_steps.ts delete mode 100644 packages/client/tests/e2e/default-version/package.json delete mode 100644 packages/client/tests/e2e/default-version/pnpm-lock.yaml delete mode 100644 packages/client/tests/e2e/default-version/readme.md delete mode 100644 packages/client/tests/e2e/default-version/tests/main.ts delete mode 100644 packages/client/tests/e2e/default-version/tsconfig.json delete mode 100644 packages/client/tests/e2e/issues/19866-ts-composite-declaration/_steps.ts delete mode 100644 packages/client/tests/e2e/issues/19866-ts-composite-declaration/pnpm-lock.yaml delete mode 100644 packages/client/tests/e2e/issues/19866-ts-composite-declaration/prisma/schema.prisma delete mode 100644 packages/client/tests/e2e/issues/19866-ts-composite-declaration/readme.md delete mode 100644 packages/client/tests/e2e/issues/19866-ts-composite-declaration/src/index.ts delete mode 100644 packages/client/tests/e2e/issues/19866-ts-composite-declaration/tsconfig.json delete mode 100644 packages/client/tests/e2e/issues/studio-1128-spawn-enoent/_steps.ts delete mode 100644 packages/client/tests/e2e/issues/studio-1128-spawn-enoent/package.json delete mode 100644 packages/client/tests/e2e/issues/studio-1128-spawn-enoent/prisma/schema.prisma delete mode 100644 packages/client/tests/e2e/issues/studio-1128-spawn-enoent/readme.md delete mode 100644 packages/client/tests/e2e/publish-extensions/package.json delete mode 100644 packages/client/tests/e2e/publish-extensions/pnpm-lock.yaml delete mode 100644 packages/client/tests/e2e/publish-extensions/simple-ext/pnpm-lock.yaml delete mode 100644 packages/client/tests/e2e/publish-extensions/tsconfig.json delete mode 100644 packages/client/tests/functional/composites/selection/_matrix.ts delete mode 100644 packages/client/tests/functional/composites/selection/prisma/_schema.ts delete mode 100644 packages/client/tests/functional/composites/selection/tests.ts delete mode 100644 packages/client/tests/functional/extensions/__snapshots__/itx.ts.snap delete mode 100644 packages/client/tests/functional/extensions/_matrix.ts delete mode 100644 packages/client/tests/functional/extensions/defineExtension.ts rename packages/client/tests/functional/{issues/17405-extensions-casing => extensions/disabled}/_matrix.ts (100%) rename packages/client/tests/functional/{issues/18854-extensions-db-null => extensions/disabled}/prisma/_schema.ts (87%) create mode 100644 packages/client/tests/functional/extensions/disabled/tests.ts create mode 100644 packages/client/tests/functional/extensions/enabled/__snapshots__/itx.ts.snap rename packages/client/tests/functional/extensions/{ => enabled}/__snapshots__/tx.ts.snap (52%) rename packages/client/tests/functional/{issues/17948-tx-client-extensions => extensions/enabled}/_matrix.ts (100%) rename packages/client/tests/functional/extensions/{ => enabled}/client.ts (66%) create mode 100644 packages/client/tests/functional/extensions/enabled/defineExtension.ts rename packages/client/tests/functional/extensions/{ => enabled}/extends.ts (82%) rename packages/client/tests/functional/extensions/{ => enabled}/itx.ts (57%) rename packages/client/tests/functional/extensions/{ => enabled}/model.ts (96%) rename packages/client/tests/functional/extensions/{ => enabled}/prisma/_schema.ts (88%) rename packages/client/tests/functional/extensions/{pdp.ts => enabled/query-accelerate.ts} (50%) rename packages/client/tests/functional/extensions/{ => enabled}/query.ts (82%) rename packages/client/tests/functional/extensions/{ => enabled}/result.ts (83%) rename packages/client/tests/functional/extensions/{ => enabled}/tx.ts (83%) delete mode 100644 packages/client/tests/functional/issues/17405-extensions-casing/prisma/_schema.ts delete mode 100644 packages/client/tests/functional/issues/17405-extensions-casing/tests.ts delete mode 100644 packages/client/tests/functional/issues/17948-tx-client-extensions/prisma/_schema.ts delete mode 100644 packages/client/tests/functional/issues/17948-tx-client-extensions/tests.ts delete mode 100644 packages/client/tests/functional/issues/18276-batch-order/_matrix.ts delete mode 100644 packages/client/tests/functional/issues/18276-batch-order/prisma/_schema.ts delete mode 100644 packages/client/tests/functional/issues/18276-batch-order/tests.ts delete mode 100644 packages/client/tests/functional/issues/18854-extensions-db-null/_matrix.ts delete mode 100644 packages/client/tests/functional/issues/18854-extensions-db-null/tests.ts delete mode 100644 packages/client/tests/functional/middleware-raw-args/_matrix.ts delete mode 100644 packages/client/tests/functional/middleware-raw-args/prisma/_schema.ts delete mode 100644 packages/client/tests/functional/middleware-raw-args/tests.ts delete mode 100644 packages/client/tests/functional/validator/_matrix.ts delete mode 100644 packages/client/tests/functional/validator/prisma/_schema.ts delete mode 100644 packages/client/tests/functional/validator/tests.ts delete mode 100644 packages/fetch-engine/src/__tests__/binaryTarget/.gitkeep delete mode 100644 packages/fetch-engine/src/__tests__/checksum/.gitkeep delete mode 100644 packages/internals/src/utils/max.test.ts delete mode 100644 packages/internals/src/utils/max.ts create mode 100644 packages/internals/src/utils/maxBy.test.ts create mode 100644 packages/internals/src/utils/maxBy.ts create mode 100644 packages/ni/.gitignore create mode 100644 packages/ni/LICENSE create mode 100644 packages/ni/README.md create mode 100644 packages/ni/helpers/build.ts create mode 100644 packages/ni/package.json create mode 100644 packages/ni/src/agents.ts create mode 100644 packages/ni/src/commands/index.ts create mode 100644 packages/ni/src/commands/na.ts create mode 100644 packages/ni/src/commands/nci.ts create mode 100644 packages/ni/src/commands/ni.ts create mode 100644 packages/ni/src/commands/nlx.ts create mode 100644 packages/ni/src/commands/nr.ts create mode 100644 packages/ni/src/commands/nu.ts create mode 100644 packages/ni/src/commands/nun.ts create mode 100644 packages/ni/src/config.ts create mode 100644 packages/ni/src/detect.ts create mode 100644 packages/ni/src/fs.ts create mode 100644 packages/ni/src/index.ts create mode 100644 packages/ni/src/parse.ts create mode 100644 packages/ni/src/runner.ts create mode 100644 packages/ni/src/storage.ts create mode 100644 packages/ni/src/utils.ts create mode 100644 packages/ni/tsconfig.build.json create mode 100644 packages/ni/tsconfig.json rename patches/{node-fetch@2.6.11.patch => node-fetch@2.6.7.patch} (89%) diff --git a/.buildkite/publish/docker-compose.yml b/.buildkite/publish/docker-compose.yml index e5d1b7f539b8..b8c0a645512e 100644 --- a/.buildkite/publish/docker-compose.yml +++ b/.buildkite/publish/docker-compose.yml @@ -132,7 +132,7 @@ services: - '3307:3306' vitess-8: - image: vitess/vttestserver:mysql80@sha256:d7486215316e352aecc6f34d4a3024017d79377e2a09545a7990b6aa4ea8d6a2 + image: vitess/vttestserver:mysql80@sha256:4b7776e90f6315b104e9f0d579ef3a27b269081ebcf4053d184f2e855c7a63ed restart: unless-stopped ports: - 33807:33807 diff --git a/.buildkite/publish/publish.yml b/.buildkite/publish/publish.yml index 802650aa7c7d..16cbba789bec 100644 --- a/.buildkite/publish/publish.yml +++ b/.buildkite/publish/publish.yml @@ -2,7 +2,7 @@ steps: - label: ':llama: Publish' timeout_in_minutes: 45 plugins: - - docker-compose#v4.13.0: + - docker-compose#v4.12.0: config: .buildkite/publish/docker-compose.yml run: app - wait diff --git a/.buildkite/test/run.sh b/.buildkite/test/run.sh index c588fa246e4f..022f2a03957d 100755 --- a/.buildkite/test/run.sh +++ b/.buildkite/test/run.sh @@ -48,10 +48,10 @@ pnpm run setup echo "~~~ @prisma/client test:functional" echo "Start testing..." -pnpm run --filter "@prisma/client" test:functional --silent +pnpm run --filter "@prisma/client" test:functional echo "~~~ Test all packages" -pnpm run test +pnpm run test echo "~~~ @prisma/client test:memory" # Client memory test suite Note: we run it last as DB is not isolated and will diff --git a/.github/renovate.json b/.github/renovate.json index 470ddc6b8c7a..8b2b6e714d94 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -39,46 +39,6 @@ "excludePackageNames": ["checkpoint-client"], "schedule": ["before 7am on Wednesday"] }, - { - "groupName": "ESM devDependencies & dependencies (patch & minor)", - "depTypeList": ["dependencies", "devDependencies"], - "updateTypes": ["patch", "minor"], - "matchPackageNames": [ - "get-port", - "is-obj", - "is-regexp", - "mongo", - "p-reduce", - "postgres", - "sort-keys", - "node.js", - "@sindresorhus/slugify", - "cli-truncate", - "escape-string-regexp", - "execa", - "find-up", - "get-stdin", - "globby", - "has-yarn", - "indent-string", - "log-update", - "new-github-issue-url", - "node-fetch", - "ora", - "p-map", - "p-retry", - "pkg-up", - "read-pkg-up", - "replace-string", - "string-width", - "strip-ansi", - "strip-indent", - "temp-write", - "tempy", - "terminal-link" - ], - "schedule": ["before 7am on Wednesday"] - }, { "groupName": "ESM devDependencies & dependencies (major)", "depTypeList": ["dependencies", "devDependencies"], @@ -150,8 +110,8 @@ "schedule": ["before 7am on Wednesday"] }, { - "groupName": "npm-packlist", - "packageNames": ["npm-packlist"], + "groupName": "sqlite-async", + "packageNames": ["sqlite-async"], "schedule": ["before 7am on Wednesday"] }, { diff --git a/.github/workflows/test-template.yml b/.github/workflows/test-template.yml index d3ab547d6ae7..a50f4f6e1a4a 100644 --- a/.github/workflows/test-template.yml +++ b/.github/workflows/test-template.yml @@ -35,7 +35,7 @@ on: required: false BUILDPULSE_SECRET_ACCESS_KEY: required: false - # Docker Hub credentials must be passed to avoid rate limiting when using Buildjet runners + # Docker Hub credentials must be passed to avoid rate limiting # But they are not required, so forks can run the workflow without defining them DOCKERHUB_USERNAME: required: false @@ -157,8 +157,7 @@ jobs: env: DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} - # Login to Docker Hub is only needed for buildjet runners - if: "${{ startsWith(inputs.ubuntuRunner, 'buildjet') && env.DOCKERHUB_USERNAME != '' && env.DOCKERHUB_TOKEN != '' }}" + if: "${{ env.DOCKERHUB_USERNAME != '' && env.DOCKERHUB_TOKEN != '' }}" with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} @@ -175,7 +174,7 @@ jobs: run: | echo "PRISMA_ENGINE_PROTOCOL=${{ matrix.engineProtocol }}" >> $GITHUB_ENV - - run: docker compose -f docker/docker-compose.yml up --detach postgres postgres_isolated mysql mysql_isolated mssql mongo cockroachdb vitess-8 + - run: docker-compose -f docker/docker-compose.yml up --detach postgres postgres_isolated mysql mysql_isolated mssql mongo cockroachdb vitess-8 - uses: pnpm/action-setup@v2.2.4 with: @@ -189,11 +188,11 @@ jobs: - run: bash .github/workflows/scripts/setup.sh # Run the functional test suite - - run: pnpm run test:functional --silent --shard ${{ matrix.shard }} + - run: pnpm run test:functional --shard ${{ matrix.shard }} if: ${{ contains(inputs.jobsToRun, '-all-') || contains(inputs.jobsToRun, '-client-') }} working-directory: packages/client # And run all the other tests (except the types tests) - - run: pnpm run test-notypes --silent --shard ${{ matrix.shard }} + - run: pnpm run test-notypes --shard ${{ matrix.shard }} if: ${{ contains(inputs.jobsToRun, '-all-') || contains(inputs.jobsToRun, '-client-') }} working-directory: packages/client @@ -252,7 +251,7 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - run: docker compose -f docker/docker-compose.yml up --detach postgres mysql mssql mongo cockroachdb vitess-8 + - run: docker-compose -f docker/docker-compose.yml up --detach postgres mysql mssql mongo cockroachdb vitess-8 - uses: pnpm/action-setup@v2.2.4 with: @@ -269,7 +268,7 @@ jobs: SKIP_GIT: true GITHUB_CONTEXT: ${{ toJson(github) }} - - run: pnpm run test:functional --silent --data-proxy --shard ${{ matrix.shard }} + - run: pnpm run test:functional --data-proxy --shard ${{ matrix.shard }} working-directory: packages/client env: CI: true @@ -286,7 +285,7 @@ jobs: JEST_JUNIT_UNIQUE_OUTPUT_NAME: true PRISMA_ENGINE_PROTOCOL: '${{ matrix.engineProtocol }}' - - run: pnpm run test:functional --silent --data-proxy --edge-client --shard ${{ matrix.shard }} + - run: pnpm run test:functional --data-proxy --edge-client --shard ${{ matrix.shard }} working-directory: packages/client env: CI: true @@ -355,7 +354,7 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - run: docker compose -f docker/docker-compose.yml up --detach postgres # mysql mysql_isolated mssql mongo cockroachdb + - run: docker-compose -f docker/docker-compose.yml up --detach postgres # mysql mysql_isolated mssql mongo cockroachdb - uses: pnpm/action-setup@v2.2.4 with: @@ -462,7 +461,7 @@ jobs: - uses: actions/checkout@v3 # Not currently needed, but we might need it in the future - - run: docker compose -f docker/docker-compose.yml up --detach postgres mysql mssql mongo cockroachdb vitess-8 + - run: docker-compose -f docker/docker-compose.yml up --detach postgres mysql mssql mongo cockroachdb vitess-8 - uses: pnpm/action-setup@v2.2.4 with: @@ -535,7 +534,7 @@ jobs: echo "RELATION_MODE=${{ matrix.relationMode }}" if [ ! -z "${{ matrix.relationMode }}" ]; then echo "RELATION_MODE=${{ matrix.relationMode }}" >> $GITHUB_ENV; fi - - run: docker compose -f docker/docker-compose.yml up --detach postgres mysql mssql mongo cockroachdb vitess-8 + - run: docker-compose -f docker/docker-compose.yml up --detach postgres mysql mssql mongo cockroachdb vitess-8 - uses: pnpm/action-setup@v2.2.4 with: @@ -554,21 +553,21 @@ jobs: # shouldn't take more than 15 minutes - name: 1 to 1 - run: pnpm run test:functional:code --silent --relation-mode-tests-only relationMode-in-separate-gh-action/tests_1-to-1.ts + run: pnpm run test:functional:code --relation-mode-tests-only relationMode-in-separate-gh-action/tests_1-to-1.ts working-directory: packages/client # shouldn't take more than 15 minutes - name: 1 to n - run: pnpm run test:functional:code --silent --relation-mode-tests-only relationMode-in-separate-gh-action/tests_1-to-n.ts + run: pnpm run test:functional:code --relation-mode-tests-only relationMode-in-separate-gh-action/tests_1-to-n.ts working-directory: packages/client # shouldn't take more than 15 minutes - name: m to n (SQL databases) - run: pnpm run test:functional:code --silent --relation-mode-tests-only relationMode-in-separate-gh-action/tests_m-to-n.ts + run: pnpm run test:functional:code --relation-mode-tests-only relationMode-in-separate-gh-action/tests_m-to-n.ts working-directory: packages/client - name: m to n (MongoDB) - run: pnpm run test:functional:code --silent --relation-mode-tests-only relationMode-in-separate-gh-action/tests_m-to-n-MongoDB.ts + run: pnpm run test:functional:code --relation-mode-tests-only relationMode-in-separate-gh-action/tests_m-to-n-MongoDB.ts working-directory: packages/client - name: Upload test results to BuildPulse for flaky test detection @@ -672,7 +671,7 @@ jobs: run: | echo "PRISMA_CLIENT_ENGINE_TYPE=${{ matrix.queryEngine }}" >> $GITHUB_ENV - - run: docker compose -f docker/docker-compose.yml up --detach postgres mysql mariadb mssql + - run: docker-compose -f docker/docker-compose.yml up --detach postgres mysql mariadb mssql - uses: pnpm/action-setup@v2.2.4 with: @@ -739,7 +738,7 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - run: docker compose -f docker/docker-compose.yml up --detach postgres mysql mssql + - run: docker-compose -f docker/docker-compose.yml up --detach postgres mysql mssql - name: Set CLI Engine Type run: | @@ -811,7 +810,7 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - run: docker compose -f docker/docker-compose.yml up --detach postgres mysql mssql mongodb_migrate mongodb_migrate_seed cockroachdb + - run: docker-compose -f docker/docker-compose.yml up --detach postgres mysql mssql mongodb_migrate mongodb_migrate_seed cockroachdb - name: Set CLI Engine Type run: | @@ -1106,7 +1105,7 @@ jobs: GITHUB_CONTEXT: ${{ toJson(github) }} - name: Test packages/client - run: pnpm run test:functional:code --silent --shard ${{matrix.shard}} + run: pnpm run test:functional:code --shard ${{matrix.shard}} working-directory: packages/client env: CI: true @@ -1217,7 +1216,7 @@ jobs: - name: Test packages/client (old suite) if: ${{ contains(inputs.jobsToRun, '-all-') || contains(inputs.jobsToRun, '-client-') }} - run: pnpm run test-notypes --silent --testTimeout=40000 + run: pnpm run test-notypes --testTimeout=40000 working-directory: packages/client env: CI: true diff --git a/README.md b/README.md index d4d151f15aed..28174ee0361a 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,6 @@ - Discord

Quickstart @@ -21,9 +20,9 @@   •   Slack   •   - Discord -   •   Twitter +   •   + Prisma 1

@@ -38,6 +37,8 @@ Prisma is a **next-generation ORM** that consists of these tools: Prisma Client can be used in _any_ Node.js or TypeScript backend application (including serverless applications and microservices). This can be a [REST API](https://www.prisma.io/docs/understand-prisma/prisma-in-your-stack/rest), a [GraphQL API](https://www.prisma.io/docs/understand-prisma/prisma-in-your-stack/graphql), a gRPC API, or anything else that needs a database. +> **Are you looking for Prisma 1? The Prisma 1 repository has been renamed to [`prisma/prisma1`](https://github.com/prisma/prisma1)**. + ## Getting started The fastest way to get started with Prisma is by following the [**Quickstart (5 min)**](https://www.prisma.io/docs/getting-started/quickstart-typescript). @@ -47,7 +48,7 @@ The Quickstart is based on a preconfigured SQLite database. You can also get sta - [Add Prisma to an existing project](https://www.prisma.io/docs/getting-started/setup-prisma/add-to-existing-project-typescript-postgres) - [Set up a new project with Prisma from scratch](https://www.prisma.io/docs/getting-started/setup-prisma/start-from-scratch-typescript-postgres) -## How Prisma works +## How does Prisma work This section provides a high-level overview of how Prisma works and its most important technical components. For a more thorough introduction, visit the [Prisma documentation](https://www.prisma.io/docs/). @@ -127,7 +128,7 @@ npm install @prisma/client Note that the installation of this package invokes the `prisma generate` command which reads your Prisma schema and _generates_ the Prisma Client code. The code will be located in `node_modules/.prisma/client`, which is exported by `node_modules/@prisma/client/index.d.ts`. -After you change your data model, you'll need to manually re-generate Prisma Client to ensure the code inside `node_modules/.prisma/client` gets updated: +After you change your data model, you'll need to manually re-generate Prisma Client to ensure the code inside `node_modules/.prisma/client` get updated: ``` npx prisma generate @@ -157,7 +158,7 @@ const { PrismaClient } = require('@prisma/client') const prisma = new PrismaClient() ``` -Now you can start sending queries via the generated Prisma Client API, here are a few sample queries. Note that all Prisma Client queries return _plain old JavaScript objects_. +Now you can start sending queries via the generated Prisma Client API, here are few sample queries. Note that all Prisma Client queries return _plain old JavaScript objects_. Learn more about the available operations in the [Prisma Client docs](https://www.prisma.io/docs/concepts/components/prisma-client) or watch this [demo video](https://www.youtube.com/watch?v=LggrE5kJ75I&list=PLn2e1F9Rfr6k9PnR_figWOcSHgc_erDr5&index=4) (2 min). @@ -219,7 +220,7 @@ Note that when using TypeScript, the result of this query will be _statically ty ## Community -Prisma has a large and supportive [community](https://www.prisma.io/community) of enthusiastic application developers. You can join us on [Slack](https://slack.prisma.io), [Discord](https://pris.ly/discord), and here on [GitHub](https://github.com/prisma/prisma/discussions). +Prisma has a large and supportive [community](https://www.prisma.io/community) of enthusiastic application developers. You can join us on [Slack](https://slack.prisma.io) and here on [GitHub](https://github.com/prisma/prisma/discussions). ## Security diff --git a/docker/README.md b/docker/README.md index 2d7ede6a8268..7a88018d9a6f 100644 --- a/docker/README.md +++ b/docker/README.md @@ -8,7 +8,7 @@ cd docker See [the Docker Compose configurations for our tests databases locally and also used by GitHub Actions in CI](./docker-compose.yml). -## Using `docker compose` for databases +## Using docker-compose for databases This is only intended to be run in a development environment where ports 3306 / default for MySQL - 5432 / default for PostgreSQL and 4306 custom port - MariaDB are free and not used. @@ -19,9 +19,10 @@ ports: - '3307:3306' # only change the first number ``` -## Customizing images (optional) +## Apple M1 and other ARM64 CPUs -Docker images can be overridden by creating a `docker-compose.override.yml`. +Docker images for MySQL and Microsoft SQL Server only support x86_64 CPUs. +Copy or link `docker-compose.arm64.yml` to `docker-compose.override.yml` to use ARMv8-compatible drop-in replacements (MariaDB and Azure SQL Edge) instead. > By default, Compose reads two files, a `docker-compose.yml` and an optional `docker-compose.override.yml` file. By convention, the `docker-compose.yml` contains your base configuration. The override file, as its name implies, can contain configuration overrides for existing services or entirely new services. > @@ -34,29 +35,29 @@ Docker images can be overridden by creating a `docker-compose.override.yml`. In detached/background mode using `-d` (recommended) ```sh -docker compose up -d +docker-compose up -d # Or start only one service -docker compose up -d mysql +docker-compose up -d mysql # To see logs -docker compose logs -f mysql +docker-compose logs -f mysql ``` In attached mode, the logs will be streamed in the terminal: ```sh -docker compose up +docker-compose up # Or start only one service -docker compose up mysql +docker-compose up mysql ``` ### Stop ```sh -docker compose down +docker-compose down ``` ### Delete all ```sh -docker compose down -v --rmi all --remove-orphans +docker-compose down -v --rmi all --remove-orphans ``` diff --git a/docker/docker-compose.arm64.yml b/docker/docker-compose.arm64.yml new file mode 100644 index 000000000000..283ee3f8792b --- /dev/null +++ b/docker/docker-compose.arm64.yml @@ -0,0 +1,11 @@ +version: '3.7' + +services: + mssql: + image: mcr.microsoft.com/azure-sql-edge:latest + restart: unless-stopped + environment: + - ACCEPT_EULA=Y + - MSSQL_SA_PASSWORD=Pr1sm4_Pr1sm4 + ports: + - '1433:1433' diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index d51d9fede389..9fe8f3e459bd 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -1,6 +1,4 @@ -version: '3.8' - -name: prisma-prisma +version: '3.7' # For connection urls to the following instances, see # https://github.com/prisma/prisma/blob/main/TESTING.md#environment-variables @@ -35,7 +33,7 @@ services: # Planetscale # From https://github.com/prisma/prisma-engines/blob/976a00ae3c30ab9507fa742986c9c6f5327ba10f/docker-compose.yml vitess-8: - image: vitess/vttestserver:mysql80@sha256:d7486215316e352aecc6f34d4a3024017d79377e2a09545a7990b6aa4ea8d6a2 + image: vitess/vttestserver:mysql80@sha256:4b7776e90f6315b104e9f0d579ef3a27b269081ebcf4053d184f2e855c7a63ed restart: unless-stopped ports: - 33807:33807 diff --git a/helpers/compile/plugins/fill-plugin/fillers/process.ts b/helpers/compile/plugins/fill-plugin/fillers/process.ts index d19274f1aba1..9f010720a06d 100644 --- a/helpers/compile/plugins/fill-plugin/fillers/process.ts +++ b/helpers/compile/plugins/fill-plugin/fillers/process.ts @@ -2,6 +2,8 @@ function noop(v: T) { return () => v as T } +const tickPromise = Promise.resolve() + function getProcess() { return process } @@ -92,9 +94,13 @@ export const process: NodeJS.Process = { rss: 0, }), nextTick: (fn: Function, ...args: unknown[]) => { - setTimeout(() => { - fn(...args) - }, 0) + tickPromise + .then(() => fn(...args)) + .catch((e) => { + setTimeout(() => { + throw e + }, 0) + }) }, off: noop(getProcess()), on: noop(getProcess()), diff --git a/package.json b/package.json index 0dfe91a74574..c62b55442732 100644 --- a/package.json +++ b/package.json @@ -28,34 +28,34 @@ "prepare": "is-ci || husky install" }, "devDependencies": { - "@microsoft/api-extractor": "7.36.0", + "@microsoft/api-extractor": "7.35.0", "@sindresorhus/slugify": "1.1.2", "@slack/webhook": "6.1.0", "@types/benchmark": "2.1.2", "@types/fs-extra": "9.0.13", "@types/graphviz": "0.0.35", - "@types/node": "18.16.16", + "@types/node": "18.16.14", "@types/node-fetch": "2.6.4", "@types/redis": "2.8.32", "@types/resolve": "1.20.2", - "@typescript-eslint/eslint-plugin": "5.59.11", - "@typescript-eslint/parser": "5.59.11", + "@typescript-eslint/eslint-plugin": "5.59.6", + "@typescript-eslint/parser": "5.59.6", "arg": "5.0.2", "batching-toposort": "1.2.0", "buffer": "6.0.3", "chokidar": "3.5.3", "esbuild": "0.15.13", "esbuild-register": "3.3.3", - "eslint": "8.43.0", + "eslint": "8.41.0", "eslint-config-prettier": "8.8.0", "eslint-plugin-eslint-comments": "3.2.0", "eslint-plugin-import": "2.27.5", - "eslint-plugin-jest": "27.2.2", + "eslint-plugin-jest": "27.2.1", "eslint-plugin-prettier": "4.2.1", "eslint-plugin-simple-import-sort": "10.0.0", "eventemitter3": "5.0.1", "execa": "5.1.1", - "fs-extra": "11.1.1", + "fs-extra": "11.1.0", "globby": "11.1.0", "graphviz-mit": "0.0.9", "husky": "8.0.3", @@ -68,15 +68,15 @@ "p-reduce": "2.1.0", "p-retry": "4.6.2", "path-browserify": "1.0.1", - "prettier": "2.8.8", + "prettier": "2.8.3", "redis": "3.1.2", "redis-lock": "0.1.4", "regenerator-runtime": "0.13.11", - "resolve": "1.22.2", + "resolve": "1.22.1", "safe-buffer": "5.2.1", "semver": "7.5.1", "spdx-exceptions": "2.3.0", - "spdx-license-ids": "3.0.13", + "spdx-license-ids": "3.0.12", "staged-git-files": "1.3.0", "ts-node": "10.9.1", "ts-toolbelt": "9.6.0", @@ -92,7 +92,7 @@ } }, "patchedDependencies": { - "node-fetch@2.6.11": "patches/node-fetch@2.6.11.patch" + "node-fetch@2.6.7": "patches/node-fetch@2.6.7.patch" } }, "lint-staged": { diff --git a/packages/cli/README.md b/packages/cli/README.md index 1ba9f21b0b36..993bbdfac507 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -4,7 +4,6 @@ - Discord

Quickstart @@ -19,9 +18,9 @@   •   Slack   •   - Discord -   •   Twitter +   •   + Prisma 1

@@ -36,6 +35,8 @@ Prisma is a **next-generation ORM** that consists of these tools: Prisma Client can be used in _any_ Node.js or TypeScript backend application (including serverless applications and microservices). This can be a [REST API](https://www.prisma.io/docs/understand-prisma/prisma-in-your-stack/rest), a [GraphQL API](https://www.prisma.io/docs/understand-prisma/prisma-in-your-stack/graphql) a gRPC API, or anything else that needs a database. +> **Are you looking for Prisma 1? The Prisma 1 repository has been renamed to [`prisma/prisma1`](https://github.com/prisma/prisma1)**. + ## Getting started The fastest way to get started with Prisma is by following the [**Quickstart (5 min)**](https://www.prisma.io/docs/getting-started/quickstart-typescript). @@ -47,7 +48,7 @@ The Quickstart is based on a preconfigured SQLite database. You can also get sta ## Community -Prisma has a large and supportive [community](https://www.prisma.io/community) of enthusiastic application developers. You can join us on [Slack](https://slack.prisma.io), [Discord](https://pris.ly/discord), and here on [GitHub](https://github.com/prisma/prisma/discussions). +Prisma has a large and supportive [community](https://www.prisma.io/community) of enthusiastic application developers. You can join us on [Slack](https://slack.prisma.io) and here on [GitHub](https://github.com/prisma/prisma/discussions). ## Security diff --git a/packages/cli/package.json b/packages/cli/package.json index 3dfdc1fc11db..d99a7789e8f8 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -67,22 +67,22 @@ "@prisma/get-platform": "workspace:*", "@prisma/internals": "workspace:*", "@prisma/migrate": "workspace:*", - "@prisma/studio": "0.487.0", - "@prisma/studio-server": "0.487.0", - "@swc/core": "1.3.64", + "@prisma/studio": "0.484.0", + "@prisma/studio-server": "0.484.0", + "@swc/core": "1.3.32", "@swc/jest": "0.2.26", "@types/debug": "4.1.8", "@types/fs-extra": "9.0.13", - "@types/jest": "29.5.2", + "@types/jest": "29.5.1", "@types/rimraf": "3.0.2", - "checkpoint-client": "1.1.24", + "checkpoint-client": "1.1.23", "debug": "4.3.4", "dotenv": "16.0.3", "esbuild": "0.15.13", "execa": "5.1.1", "fast-deep-equal": "3.1.3", "fast-glob": "3.2.12", - "fs-extra": "11.1.1", + "fs-extra": "11.1.0", "fs-jetpack": "5.1.0", "get-port": "5.1.1", "global-dirs": "3.0.1", diff --git a/packages/cli/src/Studio.ts b/packages/cli/src/Studio.ts index 657923725355..9d2466220f77 100644 --- a/packages/cli/src/Studio.ts +++ b/packages/cli/src/Studio.ts @@ -1,4 +1,3 @@ -import Debug from '@prisma/debug' import { enginesVersion } from '@prisma/engines' import { arg, checkUnsupportedDataProxy, Command, format, HelpError, isError, loadEnvFile } from '@prisma/internals' import { getSchemaPathAndPrint } from '@prisma/migrate' @@ -8,8 +7,6 @@ import { bold, dim, red } from 'kleur/colors' import open from 'open' import path from 'path' -const debug = Debug('prisma:studio') - const packageJson = require('../package.json') // eslint-disable-line @typescript-eslint/no-var-requires export class Studio implements Command { @@ -114,24 +111,12 @@ ${bold('Examples')} const serverUrl = `http://localhost:${port}` if (!browser || browser.toLowerCase() !== 'none') { try { - const subprocess = await open(serverUrl, { + await open(serverUrl, { app: browser, url: true, }) - - subprocess.on('spawn', () => { - // We match on this string in debug logs in tests - debug(`requested to open the url ${serverUrl}`) - }) - - subprocess.on('error', (e) => { - debug(e) - // We match on this string in debug logs in tests - debug(`failed to open the url ${serverUrl} in browser`) - }) } catch (e) { // Ignore any errors that occur when trying to open the browser, since they should not halt the process - debug(e) } } diff --git a/packages/client/README.md b/packages/client/README.md index c6dd00bcb50f..60942f8059cb 100644 --- a/packages/client/README.md +++ b/packages/client/README.md @@ -1,4 +1,4 @@ -# Prisma Client · [![npm version](https://img.shields.io/npm/v/@prisma/client.svg?style=flat)](https://www.npmjs.com/package/@prisma/client) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/prisma/prisma/blob/main/CONTRIBUTING.md) [![GitHub license](https://img.shields.io/badge/license-Apache%202-blue)](https://github.com/prisma/prisma/blob/main/LICENSE) [![Slack](https://img.shields.io/badge/chat-on%20slack-blue.svg)](https://slack.prisma.io/) [![Discord](https://img.shields.io/discord/937751382725886062?label=Discord)](https://pris.ly/discord) +# Prisma Client · [![npm version](https://img.shields.io/npm/v/@prisma/client.svg?style=flat)](https://www.npmjs.com/package/@prisma/client) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/prisma/prisma/blob/main/CONTRIBUTING.md) [![GitHub license](https://img.shields.io/badge/license-Apache%202-blue)](https://github.com/prisma/prisma/blob/main/LICENSE) [![Slack](https://img.shields.io/badge/chat-on%20slack-blue.svg)](https://slack.prisma.io/) Prisma Client JS is an **auto-generated query builder** that enables **type-safe** database access and **reduces boilerplate**. You can use it as an alternative to traditional ORMs such as Sequelize, TypeORM or SQL query builders like knex.js. diff --git a/packages/client/extension.d.ts b/packages/client/extension.d.ts deleted file mode 100644 index 28e396835378..000000000000 --- a/packages/client/extension.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './scripts/default-index' diff --git a/packages/client/extension.js b/packages/client/extension.js deleted file mode 100644 index 610323bff009..000000000000 --- a/packages/client/extension.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - ...require('./scripts/default-index'), -} diff --git a/packages/client/helpers/functional-test/run-tests.ts b/packages/client/helpers/functional-test/run-tests.ts index 81af98b5d6dc..a1fb888a7b18 100644 --- a/packages/client/helpers/functional-test/run-tests.ts +++ b/packages/client/helpers/functional-test/run-tests.ts @@ -18,8 +18,6 @@ const args = arg( '--no-types': Boolean, // Only typecheck, don't run the code tests '--types-only': Boolean, - // Generates all the clients to run the type tests - '--generate-only': Boolean, // Restrict the list of providers '--provider': [String], '-p': '--provider', @@ -49,15 +47,13 @@ const args = arg( '--changedFilesWithAncestor': Boolean, // Passes the same flag to Jest to shard tests between multiple machines '--shard': String, - // Passes the same flag to Jest to silence the output - '--silent': Boolean, }, true, true, ) async function main(): Promise { - let jestCli = new JestCli(['--config', 'tests/functional/jest.config.js']) + let jestCli = new JestCli(['--silent', '--config', 'tests/functional/jest.config.js']) let miniProxyProcess: ExecaChildProcess | undefined if (args['--provider']) { @@ -125,9 +121,6 @@ async function main(): Promise { if (args['--shard']) { jestArgs.push('--shard', args['--shard']) } - if (args['--silent']) { - jestArgs.push('--silent') - } const codeTestCli = jestCli.withArgs(jestArgs) try { @@ -137,12 +130,7 @@ async function main(): Promise { snapshotUpdate.withEnv({ UPDATE_SNAPSHOTS: 'external' }).run() } else { if (!args['--types-only']) { - codeTestCli - .withArgs(['--', args['_']]) - .withEnv({ - TEST_GENERATE_ONLY: args['--generate-only'] ? 'true' : 'false', - }) - .run() + codeTestCli.withArgs(['--']).withArgs(args['_']).run() } if (!args['--no-types']) { diff --git a/packages/client/package.json b/packages/client/package.json index 5a9776c9f047..68977023ad3b 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -43,7 +43,7 @@ "test:memory": "node -r esbuild-register helpers/memory-tests.ts", "test:functional:code": "node -r esbuild-register helpers/functional-test/run-tests.ts --no-types", "test:functional:types": "node -r esbuild-register helpers/functional-test/run-tests.ts --types-only", - "test-notypes": "jest --testPathIgnorePatterns src/__tests__/types/types.test.ts", + "test-notypes": "jest --silent --testPathIgnorePatterns src/__tests__/types/types.test.ts", "generate": "node scripts/postinstall.js", "postinstall": "node scripts/postinstall.js", "prepublishOnly": "pnpm run build", @@ -59,14 +59,12 @@ "edge.d.ts", "index.js", "index.d.ts", - "index-browser.js", - "extension.js", - "extension.d.ts" + "index-browser.js" ], "devDependencies": { "@codspeed/benchmark.js-plugin": "1.1.0", - "@faker-js/faker": "8.0.2", - "@fast-check/jest": "1.7.0", + "@faker-js/faker": "8.0.1", + "@fast-check/jest": "1.6.2", "@jest/create-cache-key-function": "29.5.0", "@jest/globals": "29.5.0", "@jest/test-sequencer": "29.5.0", @@ -86,27 +84,27 @@ "@prisma/migrate": "workspace:*", "@prisma/mini-proxy": "0.7.0", "@swc-node/register": "1.6.5", - "@swc/core": "1.3.64", + "@swc/core": "1.3.32", "@swc/jest": "0.2.26", "@timsuchanek/copy": "1.4.5", "@types/debug": "4.1.8", "@types/fs-extra": "9.0.13", - "@types/jest": "29.5.2", + "@types/jest": "29.5.1", "@types/js-levenshtein": "1.1.1", "@types/mssql": "8.1.2", - "@types/node": "18.16.16", - "@types/pg": "8.10.2", + "@types/node": "18.16.14", + "@types/pg": "8.10.1", "@types/yeoman-generator": "5.2.11", "arg": "5.0.2", "benchmark": "2.1.4", "ci-info": "3.8.0", "decimal.js": "10.4.3", - "env-paths": "2.2.1", + "env-paths": "3.0.0", "esbuild": "0.15.13", "execa": "5.1.1", - "expect-type": "0.16.0", + "expect-type": "0.15.0", "flat-map-polyfill": "0.3.8", - "fs-extra": "11.1.1", + "fs-extra": "11.1.0", "get-own-enumerable-property-symbols": "3.0.2", "get-stream": "6.0.1", "globby": "11.1.0", @@ -121,8 +119,8 @@ "kleur": "4.1.5", "klona": "2.0.6", "lz-string": "1.5.0", - "mariadb": "3.2.0", - "memfs": "3.5.3", + "mariadb": "3.0.2", + "memfs": "3.5.1", "mssql": "9.1.1", "new-github-issue-url": "0.2.1", "node-fetch": "2.6.11", @@ -130,9 +128,9 @@ "pg": "8.9.0", "pkg-up": "3.1.0", "pluralize": "8.0.0", - "resolve": "1.22.2", + "resolve": "1.22.1", "rimraf": "3.0.2", - "simple-statistics": "7.8.3", + "simple-statistics": "7.8.2", "sort-keys": "4.2.0", "source-map-support": "0.5.21", "sql-template-tag": "5.0.3", @@ -143,7 +141,7 @@ "ts-pattern": "4.3.0", "tsd": "0.28.1", "typescript": "4.9.5", - "undici": "5.22.1", + "undici": "5.22.0", "yeoman-generator": "5.9.0", "yo": "4.3.1", "zx": "7.2.2" @@ -157,7 +155,7 @@ } }, "dependencies": { - "@prisma/engines-version": "4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309" + "@prisma/engines-version": "4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944" }, "sideEffects": false } diff --git a/packages/client/scripts/default-index.d.ts b/packages/client/scripts/default-index.d.ts index 401067791826..051b7ae2585d 100644 --- a/packages/client/scripts/default-index.d.ts +++ b/packages/client/scripts/default-index.d.ts @@ -1,5 +1,3 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ - import * as runtime from '@prisma/client/runtime' /** @@ -34,33 +32,20 @@ export declare const PrismaClient: any */ export declare type PrismaClient = any -export declare class PrismaClientExtends< +export declare type PrismaClientExtends< ExtArgs extends runtime.Types.Extensions.Args = runtime.Types.Extensions.DefaultArgs, -> { +> = { $extends: { extArgs: ExtArgs } & (< - Q extends runtime.Types.Extensions.UserArgs['query'] = {}, R extends runtime.Types.Extensions.UserArgs['result'] = {}, M extends runtime.Types.Extensions.UserArgs['model'] = {}, + Q extends runtime.Types.Extensions.UserArgs['query'] = {}, C extends runtime.Types.Extensions.UserArgs['client'] = {}, - Args extends runtime.Types.Extensions.Args = runtime.Types.Extensions.InternalArgs, + Args extends runtime.Types.Extensions.Args = runtime.Types.Extensions.InternalArgs, >( args: | ((client: PrismaClientExtends) => { $extends: { extArgs: Args } }) - | { name?: string } - | { result?: R & runtime.Types.Extensions.UserArgs['result'] } - | { model?: M & runtime.Types.Extensions.UserArgs['model'] } - | { query?: Q & runtime.Types.Extensions.UserArgs['query'] } - | { client?: C & runtime.Types.Extensions.UserArgs['client'] }, - ) => PrismaClientExtends & Args['client']) - - $transaction( - fn: (prisma: Omit) => Promise, - options?: { maxWait?: number; timeout?: number; isolationLevel?: string }, - ): Promise - $transaction

[]>( - arg: [...P], - options?: { isolationLevel?: string }, - ): Promise> + | { name?: string; result?: R; model?: M; query?: Q; client?: C }, + ) => PrismaClientExtends) } export declare const dmmf: any @@ -80,31 +65,23 @@ export namespace Prisma { export type TransactionClient = any export function defineExtension< - Q extends runtime.Types.Extensions.UserArgs['query'] = {}, R extends runtime.Types.Extensions.UserArgs['result'] = {}, M extends runtime.Types.Extensions.UserArgs['model'] = {}, + Q extends runtime.Types.Extensions.UserArgs['query'] = {}, C extends runtime.Types.Extensions.UserArgs['client'] = {}, - Args extends runtime.Types.Extensions.Args = runtime.Types.Extensions.InternalArgs, + Args extends runtime.Types.Extensions.Args = runtime.Types.Extensions.InternalArgs, >( args: | ((client: PrismaClientExtends) => { $extends: { extArgs: Args } }) - | { name?: string } - | { result?: R & runtime.Types.Extensions.UserArgs['result'] } - | { model?: M & runtime.Types.Extensions.UserArgs['model'] } - | { query?: Q & runtime.Types.Extensions.UserArgs['query'] } - | { client?: C & runtime.Types.Extensions.UserArgs['client'] }, + | { name?: string; result?: R; model?: M; query?: Q; client?: C }, ): (client: any) => PrismaClientExtends export type Extension = runtime.Types.Extensions.UserArgs + // eslint-disable-next-line @typescript-eslint/no-unused-vars export import getExtensionContext = runtime.Extensions.getExtensionContext - export import Args = runtime.Types.Public.Args - export import Payload = runtime.Types.Public.Payload - export import Result = runtime.Types.Public.Result - export import Exact = runtime.Types.Public.Exact - export import PrismaPromise = runtime.Types.Public.PrismaPromise - - export const prismaVersion: { - client: string - engine: string - } + export type Args = runtime.Types.Public.Args & {} + export type Payload = runtime.Types.Public.Payload & {} + export type Result = runtime.Types.Public.Result & {} + export type Exact = runtime.Types.Public.Exact & {} + export type PrismaPromise = runtime.Types.Public.PrismaPromise & {} } diff --git a/packages/client/scripts/default-index.js b/packages/client/scripts/default-index.js index 6a3af0b7fad1..c7144c094b16 100644 --- a/packages/client/scripts/default-index.js +++ b/packages/client/scripts/default-index.js @@ -1,5 +1,3 @@ -const path = require('path') - class PrismaClient { constructor() { throw new Error( @@ -26,13 +24,5 @@ module.exports = { Prisma: { defineExtension, getExtensionContext, - get prismaVersion() { - const atPrismaClientDir = path.dirname(require.resolve('@prisma/client/package.json')) - const enginesVersionDir = require.resolve('@prisma/engines-version', { paths: [atPrismaClientDir] }) - const { version: client } = require('@prisma/client/package.json') - const { enginesVersion: engine } = require(enginesVersionDir) - - return { client, engine } - }, }, } diff --git a/packages/client/src/__tests__/integration/errors/client-version-error/test.ts b/packages/client/src/__tests__/integration/errors/client-version-error/test.ts index 260a4f56bd75..9f8699b0b69a 100644 --- a/packages/client/src/__tests__/integration/errors/client-version-error/test.ts +++ b/packages/client/src/__tests__/integration/errors/client-version-error/test.ts @@ -30,7 +30,7 @@ testIf(getQueryEngineProtocol() !== 'json')('client-version-error', async () => cursor?: UserWhereUniqueInput take?: Int skip?: Int - distinct?: UserScalarFieldEnum | List + distinct?: List } diff --git a/packages/client/src/__tests__/integration/errors/multi-schema/test.ts b/packages/client/src/__tests__/integration/errors/multi-schema/test.ts index f0ced6054543..7ebc47957a0c 100644 --- a/packages/client/src/__tests__/integration/errors/multi-schema/test.ts +++ b/packages/client/src/__tests__/integration/errors/multi-schema/test.ts @@ -10,9 +10,9 @@ let prisma: PrismaClient const baseUri = process.env.TEST_POSTGRES_URI const email = faker.internet.email() -const title = faker.person.jobTitle() +const title = faker.name.jobTitle() const newEmail = faker.internet.email() -const newTitle = faker.person.jobTitle() +const newTitle = faker.name.jobTitle() describe('multischema', () => { beforeAll(async () => { diff --git a/packages/client/src/__tests__/integration/happy/distinct/test.ts b/packages/client/src/__tests__/integration/happy/distinct/test.ts index 2ebe10244016..272688578b1a 100644 --- a/packages/client/src/__tests__/integration/happy/distinct/test.ts +++ b/packages/client/src/__tests__/integration/happy/distinct/test.ts @@ -4,25 +4,17 @@ test('distinct', async () => { const PrismaClient = await getTestClient() const prisma = new PrismaClient() - const resultId = await prisma.user.findMany({ + let result = await prisma.user.findMany({ distinct: ['id'], // distinct on id has no effect, as it's distinct anyway }) - expect(resultId.length).toBe(10) - const resultName = await prisma.user.findMany({ - distinct: ['name'], - }) - expect(resultName.length).toBe(1) + expect(result.length).toBe(10) - const resultIdShortcut = await prisma.user.findMany({ - distinct: 'id', // distinct on id has no effect, as it's distinct anyway + result = await prisma.user.findMany({ + distinct: ['name'], }) - expect(resultIdShortcut.length).toBe(10) - const resultNameShortcut = await prisma.user.findMany({ - distinct: 'name', - }) - expect(resultNameShortcut.length).toBe(1) + expect(result.length).toBe(1) await prisma.$disconnect() }) diff --git a/packages/client/src/__tests__/integration/happy/exhaustive-schema-mongo/__snapshots__/test.ts.snap b/packages/client/src/__tests__/integration/happy/exhaustive-schema-mongo/__snapshots__/test.ts.snap index 558267a9b6ed..f4a30ca2871c 100644 --- a/packages/client/src/__tests__/integration/happy/exhaustive-schema-mongo/__snapshots__/test.ts.snap +++ b/packages/client/src/__tests__/integration/happy/exhaustive-schema-mongo/__snapshots__/test.ts.snap @@ -7,8 +7,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); const { Decimal, objectEnumValues, - makeStrictEnum, - Public, + makeStrictEnum } = require('@prisma/client/runtime/index-browser') @@ -70,19 +69,8 @@ Prisma.raw = () => { throw new Error(\`raw is unable to be run in the browser. In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`, )} -Prisma.validator = Public.validator +Prisma.validator = () => (val) => val -/** -* Extensions -*/ -Prisma.getExtensionContext = () => { - throw new Error(\`Extensions.getExtensionContext is unable to be run in the browser. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`, -)} -Prisma.defineExtension = () => { - throw new Error(\`Extensions.defineExtension is unable to be run in the browser. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`, -)} /** * Shorthand utilities for JSON filtering @@ -101,31 +89,46 @@ Prisma.NullTypes = { * Enums */ -exports.Prisma.PostScalarFieldEnum = { +exports.Prisma.AScalarFieldEnum = { id: 'id', - createdAt: 'createdAt', - title: 'title', - content: 'content', - published: 'published', - authorId: 'authorId' + email: 'email', + name: 'name', + int: 'int', + sInt: 'sInt', + bInt: 'bInt' }; -exports.Prisma.UserScalarFieldEnum = { +exports.Prisma.BScalarFieldEnum = { id: 'id', - email: 'email', - int: 'int', - optionalInt: 'optionalInt', float: 'float', - optionalFloat: 'optionalFloat', - string: 'string', - optionalString: 'optionalString', + dFloat: 'dFloat' +}; + +exports.Prisma.CScalarFieldEnum = { + id: 'id', + char: 'char', + vChar: 'vChar', + text: 'text', + bit: 'bit', + vBit: 'vBit', + uuid: 'uuid' +}; + +exports.Prisma.DScalarFieldEnum = { + id: 'id', + bool: 'bool', + byteA: 'byteA', + xml: 'xml', json: 'json', - optionalJson: 'optionalJson', - enum: 'enum', - optionalEnum: 'optionalEnum', - boolean: 'boolean', - optionalBoolean: 'optionalBoolean', - embedHolderId: 'embedHolderId' + jsonb: 'jsonb', + list: 'list' +}; + +exports.Prisma.EScalarFieldEnum = { + id: 'id', + date: 'date', + time: 'time', + ts: 'ts' }; exports.Prisma.EmbedHolderScalarFieldEnum = { @@ -152,9 +155,9 @@ exports.Prisma.MScalarFieldEnum = { optionalBoolean: 'optionalBoolean' }; -exports.Prisma.NScalarFieldEnum = { +exports.Prisma.ManyRequiredScalarFieldEnum = { id: 'id', - m_ids: 'm_ids', + oneOptionalId: 'oneOptionalId', int: 'int', optionalInt: 'optionalInt', float: 'float', @@ -169,8 +172,9 @@ exports.Prisma.NScalarFieldEnum = { optionalBoolean: 'optionalBoolean' }; -exports.Prisma.OneOptionalScalarFieldEnum = { +exports.Prisma.NScalarFieldEnum = { id: 'id', + m_ids: 'm_ids', int: 'int', optionalInt: 'optionalInt', float: 'float', @@ -185,9 +189,8 @@ exports.Prisma.OneOptionalScalarFieldEnum = { optionalBoolean: 'optionalBoolean' }; -exports.Prisma.ManyRequiredScalarFieldEnum = { +exports.Prisma.OneOptionalScalarFieldEnum = { id: 'id', - oneOptionalId: 'oneOptionalId', int: 'int', optionalInt: 'optionalInt', float: 'float', @@ -235,46 +238,18 @@ exports.Prisma.OptionalSide2ScalarFieldEnum = { optionalBoolean: 'optionalBoolean' }; -exports.Prisma.AScalarFieldEnum = { - id: 'id', - email: 'email', - name: 'name', - int: 'int', - sInt: 'sInt', - bInt: 'bInt' -}; - -exports.Prisma.BScalarFieldEnum = { - id: 'id', - float: 'float', - dFloat: 'dFloat' -}; - -exports.Prisma.CScalarFieldEnum = { - id: 'id', - char: 'char', - vChar: 'vChar', - text: 'text', - bit: 'bit', - vBit: 'vBit', - uuid: 'uuid' -}; - -exports.Prisma.DScalarFieldEnum = { +exports.Prisma.PostScalarFieldEnum = { id: 'id', - bool: 'bool', - byteA: 'byteA', - xml: 'xml', - json: 'json', - jsonb: 'jsonb', - list: 'list' + createdAt: 'createdAt', + title: 'title', + content: 'content', + published: 'published', + authorId: 'authorId' }; -exports.Prisma.EScalarFieldEnum = { - id: 'id', - date: 'date', - time: 'time', - ts: 'ts' +exports.Prisma.QueryMode = { + default: 'default', + insensitive: 'insensitive' }; exports.Prisma.SortOrder = { @@ -282,9 +257,22 @@ exports.Prisma.SortOrder = { desc: 'desc' }; -exports.Prisma.QueryMode = { - default: 'default', - insensitive: 'insensitive' +exports.Prisma.UserScalarFieldEnum = { + id: 'id', + email: 'email', + int: 'int', + optionalInt: 'optionalInt', + float: 'float', + optionalFloat: 'optionalFloat', + string: 'string', + optionalString: 'optionalString', + json: 'json', + optionalJson: 'optionalJson', + enum: 'enum', + optionalEnum: 'optionalEnum', + boolean: 'boolean', + optionalBoolean: 'optionalBoolean', + embedHolderId: 'embedHolderId' }; exports.ABeautifulEnum = { A: 'A', @@ -333,378 +321,277 @@ exports[`exhaustive-schema: generatedTypeScript 1`] = ` **/ import * as runtime from '@prisma/client/runtime/{RUNTIME_FILE}'; -import $Types = runtime.Types // general types -import $Public = runtime.Types.Public -import $Utils = runtime.Types.Utils -import $Extensions = runtime.Types.Extensions - -export type PrismaPromise = $Public.PrismaPromise +type UnwrapPromise

= P extends Promise ? R : P +type UnwrapTuple = { + [K in keyof Tuple]: K extends \`\${number}\` ? Tuple[K] extends Prisma.PrismaPromise ? X : UnwrapPromise : UnwrapPromise +}; +export type PrismaPromise = runtime.Types.Public.PrismaPromise -export type EmbedPayload = { - objects: {} - scalars: { - text: string - boolean: boolean - scalarList: number[] - } - composites: { - embedEmbedList: EmbedEmbedPayload[] - requiredEmbedEmbed: EmbedEmbedPayload - optionalEmbedEmbed: EmbedEmbedPayload | null - } -} /** * Model Embed * */ -export type Embed = runtime.Types.DefaultSelection -export type EmbedEmbedPayload = { - objects: {} - scalars: { - text: string - boolean: boolean - } - composites: {} +export type Embed = { + text: string + boolean: boolean + embedEmbedList: EmbedEmbed[] + requiredEmbedEmbed: EmbedEmbed + optionalEmbedEmbed: EmbedEmbed | null + scalarList: number[] } /** * Model EmbedEmbed * */ -export type EmbedEmbed = runtime.Types.DefaultSelection -export type PostPayload = { - objects: { - author: UserPayload - } - scalars: $Extensions.GetResult<{ - id: string - createdAt: Date - title: string - content: string | null - published: boolean - authorId: string - }, ExtArgs["result"]["post"]> - composites: {} +export type EmbedEmbed = { + text: string + boolean: boolean } /** * Model Post * */ -export type Post = runtime.Types.DefaultSelection -export type UserPayload = { - objects: { - posts: PostPayload[] - embedHolder: EmbedHolderPayload - } - scalars: $Extensions.GetResult<{ - id: string - email: string - int: number - optionalInt: number | null - float: number - optionalFloat: number | null - string: string - optionalString: string | null - json: Prisma.JsonValue - optionalJson: Prisma.JsonValue | null - enum: ABeautifulEnum - optionalEnum: ABeautifulEnum | null - boolean: boolean - optionalBoolean: boolean | null - embedHolderId: string - }, ExtArgs["result"]["user"]> - composites: {} +export type Post = { + id: string + createdAt: Date + title: string + content: string | null + published: boolean + authorId: string } /** * Model User * */ -export type User = runtime.Types.DefaultSelection -export type EmbedHolderPayload = { - objects: { - User: UserPayload[] - } - scalars: $Extensions.GetResult<{ - id: string - time: Date - text: string - boolean: boolean - }, ExtArgs["result"]["embedHolder"]> - composites: { - embedList: EmbedPayload[] - requiredEmbed: EmbedPayload - optionalEmbed: EmbedPayload | null - } +export type User = { + id: string + email: string + int: number + optionalInt: number | null + float: number + optionalFloat: number | null + string: string + optionalString: string | null + json: Prisma.JsonValue + optionalJson: Prisma.JsonValue | null + enum: ABeautifulEnum + optionalEnum: ABeautifulEnum | null + boolean: boolean + optionalBoolean: boolean | null + embedHolderId: string } /** * Model EmbedHolder * */ -export type EmbedHolder = runtime.Types.DefaultSelection -export type MPayload = { - objects: { - n: NPayload[] - } - scalars: $Extensions.GetResult<{ - id: string - n_ids: string[] - int: number - optionalInt: number | null - float: number - optionalFloat: number | null - string: string - optionalString: string | null - json: Prisma.JsonValue - optionalJson: Prisma.JsonValue | null - enum: ABeautifulEnum - optionalEnum: ABeautifulEnum | null - boolean: boolean - optionalBoolean: boolean | null - }, ExtArgs["result"]["m"]> - composites: {} +export type EmbedHolder = { + id: string + time: Date + text: string + boolean: boolean + embedList: Embed[] + requiredEmbed: Embed + optionalEmbed: Embed | null } /** * Model M * */ -export type M = runtime.Types.DefaultSelection -export type NPayload = { - objects: { - m: MPayload[] - } - scalars: $Extensions.GetResult<{ - id: string - m_ids: string[] - int: number - optionalInt: number | null - float: number - optionalFloat: number | null - string: string - optionalString: string | null - json: Prisma.JsonValue - optionalJson: Prisma.JsonValue | null - enum: ABeautifulEnum - optionalEnum: ABeautifulEnum | null - boolean: boolean - optionalBoolean: boolean | null - }, ExtArgs["result"]["n"]> - composites: {} +export type M = { + id: string + n_ids: string[] + int: number + optionalInt: number | null + float: number + optionalFloat: number | null + string: string + optionalString: string | null + json: Prisma.JsonValue + optionalJson: Prisma.JsonValue | null + enum: ABeautifulEnum + optionalEnum: ABeautifulEnum | null + boolean: boolean + optionalBoolean: boolean | null } /** * Model N * */ -export type N = runtime.Types.DefaultSelection -export type OneOptionalPayload = { - objects: { - many: ManyRequiredPayload[] - } - scalars: $Extensions.GetResult<{ - id: string - int: number - optionalInt: number | null - float: number - optionalFloat: number | null - string: string - optionalString: string | null - json: Prisma.JsonValue - optionalJson: Prisma.JsonValue | null - enum: ABeautifulEnum - optionalEnum: ABeautifulEnum | null - boolean: boolean - optionalBoolean: boolean | null - }, ExtArgs["result"]["oneOptional"]> - composites: {} +export type N = { + id: string + m_ids: string[] + int: number + optionalInt: number | null + float: number + optionalFloat: number | null + string: string + optionalString: string | null + json: Prisma.JsonValue + optionalJson: Prisma.JsonValue | null + enum: ABeautifulEnum + optionalEnum: ABeautifulEnum | null + boolean: boolean + optionalBoolean: boolean | null } /** * Model OneOptional * */ -export type OneOptional = runtime.Types.DefaultSelection -export type ManyRequiredPayload = { - objects: { - one: OneOptionalPayload | null - } - scalars: $Extensions.GetResult<{ - id: string - oneOptionalId: string | null - int: number - optionalInt: number | null - float: number - optionalFloat: number | null - string: string - optionalString: string | null - json: Prisma.JsonValue - optionalJson: Prisma.JsonValue | null - enum: ABeautifulEnum - optionalEnum: ABeautifulEnum | null - boolean: boolean - optionalBoolean: boolean | null - }, ExtArgs["result"]["manyRequired"]> - composites: {} +export type OneOptional = { + id: string + int: number + optionalInt: number | null + float: number + optionalFloat: number | null + string: string + optionalString: string | null + json: Prisma.JsonValue + optionalJson: Prisma.JsonValue | null + enum: ABeautifulEnum + optionalEnum: ABeautifulEnum | null + boolean: boolean + optionalBoolean: boolean | null } /** * Model ManyRequired * */ -export type ManyRequired = runtime.Types.DefaultSelection -export type OptionalSide1Payload = { - objects: { - opti: OptionalSide2Payload | null - } - scalars: $Extensions.GetResult<{ - id: string - optionalSide2Id: string | null - int: number - optionalInt: number | null - float: number - optionalFloat: number | null - string: string - optionalString: string | null - json: Prisma.JsonValue - optionalJson: Prisma.JsonValue | null - enum: ABeautifulEnum - optionalEnum: ABeautifulEnum | null - boolean: boolean - optionalBoolean: boolean | null - }, ExtArgs["result"]["optionalSide1"]> - composites: {} +export type ManyRequired = { + id: string + oneOptionalId: string | null + int: number + optionalInt: number | null + float: number + optionalFloat: number | null + string: string + optionalString: string | null + json: Prisma.JsonValue + optionalJson: Prisma.JsonValue | null + enum: ABeautifulEnum + optionalEnum: ABeautifulEnum | null + boolean: boolean + optionalBoolean: boolean | null } /** * Model OptionalSide1 * */ -export type OptionalSide1 = runtime.Types.DefaultSelection -export type OptionalSide2Payload = { - objects: { - opti: OptionalSide1Payload | null - } - scalars: $Extensions.GetResult<{ - id: string - int: number - optionalInt: number | null - float: number - optionalFloat: number | null - string: string - optionalString: string | null - json: Prisma.JsonValue - optionalJson: Prisma.JsonValue | null - enum: ABeautifulEnum - optionalEnum: ABeautifulEnum | null - boolean: boolean - optionalBoolean: boolean | null - }, ExtArgs["result"]["optionalSide2"]> - composites: {} +export type OptionalSide1 = { + id: string + optionalSide2Id: string | null + int: number + optionalInt: number | null + float: number + optionalFloat: number | null + string: string + optionalString: string | null + json: Prisma.JsonValue + optionalJson: Prisma.JsonValue | null + enum: ABeautifulEnum + optionalEnum: ABeautifulEnum | null + boolean: boolean + optionalBoolean: boolean | null } /** * Model OptionalSide2 * */ -export type OptionalSide2 = runtime.Types.DefaultSelection -export type APayload = { - objects: {} - scalars: $Extensions.GetResult<{ - /** - * field comment 1 - */ - id: string - email: string - name: string | null - /** - * field comment 2 - */ - int: number - sInt: number - bInt: bigint - }, ExtArgs["result"]["a"]> - composites: {} +export type OptionalSide2 = { + id: string + int: number + optionalInt: number | null + float: number + optionalFloat: number | null + string: string + optionalString: string | null + json: Prisma.JsonValue + optionalJson: Prisma.JsonValue | null + enum: ABeautifulEnum + optionalEnum: ABeautifulEnum | null + boolean: boolean + optionalBoolean: boolean | null } /** * Model A * model comment */ -export type A = runtime.Types.DefaultSelection -export type BPayload = { - objects: {} - scalars: $Extensions.GetResult<{ - id: string - float: number - dFloat: number - }, ExtArgs["result"]["b"]> - composites: {} +export type A = { + /** + * field comment 1 + */ + id: string + email: string + name: string | null + /** + * field comment 2 + */ + int: number + sInt: number + bInt: bigint } /** * Model B * */ -export type B = runtime.Types.DefaultSelection -export type CPayload = { - objects: {} - scalars: $Extensions.GetResult<{ - id: string - char: string - vChar: string - text: string - bit: string - vBit: string - uuid: string - }, ExtArgs["result"]["c"]> - composites: {} +export type B = { + id: string + float: number + dFloat: number } /** * Model C * */ -export type C = runtime.Types.DefaultSelection -export type DPayload = { - objects: {} - scalars: $Extensions.GetResult<{ - id: string - bool: boolean - byteA: Buffer - xml: string - json: Prisma.JsonValue - jsonb: Prisma.JsonValue - list: number[] - }, ExtArgs["result"]["d"]> - composites: {} +export type C = { + id: string + char: string + vChar: string + text: string + bit: string + vBit: string + uuid: string } /** * Model D * */ -export type D = runtime.Types.DefaultSelection -export type EPayload = { - objects: {} - scalars: $Extensions.GetResult<{ - id: string - date: Date - time: Date - ts: Date - }, ExtArgs["result"]["e"]> - composites: {} +export type D = { + id: string + bool: boolean + byteA: Buffer + xml: string + json: Prisma.JsonValue + jsonb: Prisma.JsonValue + list: number[] } /** * Model E * */ -export type E = runtime.Types.DefaultSelection +export type E = { + id: string + date: Date + time: Date + ts: Date +} + /** * Enums @@ -738,11 +625,8 @@ export class PrismaClient< U = 'log' extends keyof T ? T['log'] extends Array ? Prisma.GetEvents : never : never, GlobalReject extends Prisma.RejectOnNotFound | Prisma.RejectPerOperation | false | undefined = 'rejectOnNotFound' extends keyof T ? T['rejectOnNotFound'] - : false, - ExtArgs extends $Extensions.Args = $Extensions.DefaultArgs -> { - [K: symbol]: { types: Prisma.TypeMap['other'] } - + : false + > { /** * ## Prisma Client ʲˢ * @@ -773,8 +657,6 @@ export class PrismaClient< /** * Add a middleware - * @deprecated since 4.16.0. For new code, prefer client extensions instead. - * @see https://pris.ly/d/extensions */ $use(cb: Prisma.Middleware): void @@ -791,9 +673,9 @@ export class PrismaClient< * * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions). */ - $transaction

[]>(arg: [...P]): Promise> + $transaction

[]>(arg: [...P]): Promise> - $transaction(fn: (prisma: Omit) => Promise, options?: { maxWait?: number, timeout?: number }): Promise + $transaction(fn: (prisma: Omit) => Promise, options?: { maxWait?: number, timeout?: number }): Promise /** * Executes a raw MongoDB command and returns the result of it. @@ -810,8 +692,6 @@ export class PrismaClient< */ $runCommandRaw(command: Prisma.InputJsonObject): Prisma.PrismaPromise - $extends: $Extensions.ExtendsHook<'extends', Prisma.TypeMapCb, ExtArgs> - /** * \`prisma.post\`: Exposes CRUD operations for the **Post** model. * Example usage: @@ -820,7 +700,7 @@ export class PrismaClient< * const posts = await prisma.post.findMany() * \`\`\` */ - get post(): Prisma.PostDelegate; + get post(): Prisma.PostDelegate; /** * \`prisma.user\`: Exposes CRUD operations for the **User** model. @@ -830,7 +710,7 @@ export class PrismaClient< * const users = await prisma.user.findMany() * \`\`\` */ - get user(): Prisma.UserDelegate; + get user(): Prisma.UserDelegate; /** * \`prisma.embedHolder\`: Exposes CRUD operations for the **EmbedHolder** model. @@ -840,7 +720,7 @@ export class PrismaClient< * const embedHolders = await prisma.embedHolder.findMany() * \`\`\` */ - get embedHolder(): Prisma.EmbedHolderDelegate; + get embedHolder(): Prisma.EmbedHolderDelegate; /** * \`prisma.m\`: Exposes CRUD operations for the **M** model. @@ -850,7 +730,7 @@ export class PrismaClient< * const ms = await prisma.m.findMany() * \`\`\` */ - get m(): Prisma.MDelegate; + get m(): Prisma.MDelegate; /** * \`prisma.n\`: Exposes CRUD operations for the **N** model. @@ -860,7 +740,7 @@ export class PrismaClient< * const ns = await prisma.n.findMany() * \`\`\` */ - get n(): Prisma.NDelegate; + get n(): Prisma.NDelegate; /** * \`prisma.oneOptional\`: Exposes CRUD operations for the **OneOptional** model. @@ -870,7 +750,7 @@ export class PrismaClient< * const oneOptionals = await prisma.oneOptional.findMany() * \`\`\` */ - get oneOptional(): Prisma.OneOptionalDelegate; + get oneOptional(): Prisma.OneOptionalDelegate; /** * \`prisma.manyRequired\`: Exposes CRUD operations for the **ManyRequired** model. @@ -880,7 +760,7 @@ export class PrismaClient< * const manyRequireds = await prisma.manyRequired.findMany() * \`\`\` */ - get manyRequired(): Prisma.ManyRequiredDelegate; + get manyRequired(): Prisma.ManyRequiredDelegate; /** * \`prisma.optionalSide1\`: Exposes CRUD operations for the **OptionalSide1** model. @@ -890,7 +770,7 @@ export class PrismaClient< * const optionalSide1s = await prisma.optionalSide1.findMany() * \`\`\` */ - get optionalSide1(): Prisma.OptionalSide1Delegate; + get optionalSide1(): Prisma.OptionalSide1Delegate; /** * \`prisma.optionalSide2\`: Exposes CRUD operations for the **OptionalSide2** model. @@ -900,7 +780,7 @@ export class PrismaClient< * const optionalSide2s = await prisma.optionalSide2.findMany() * \`\`\` */ - get optionalSide2(): Prisma.OptionalSide2Delegate; + get optionalSide2(): Prisma.OptionalSide2Delegate; /** * \`prisma.a\`: Exposes CRUD operations for the **A** model. @@ -910,7 +790,7 @@ export class PrismaClient< * const as = await prisma.a.findMany() * \`\`\` */ - get a(): Prisma.ADelegate; + get a(): Prisma.ADelegate; /** * \`prisma.b\`: Exposes CRUD operations for the **B** model. @@ -920,7 +800,7 @@ export class PrismaClient< * const bs = await prisma.b.findMany() * \`\`\` */ - get b(): Prisma.BDelegate; + get b(): Prisma.BDelegate; /** * \`prisma.c\`: Exposes CRUD operations for the **C** model. @@ -930,7 +810,7 @@ export class PrismaClient< * const cs = await prisma.c.findMany() * \`\`\` */ - get c(): Prisma.CDelegate; + get c(): Prisma.CDelegate; /** * \`prisma.d\`: Exposes CRUD operations for the **D** model. @@ -940,7 +820,7 @@ export class PrismaClient< * const ds = await prisma.d.findMany() * \`\`\` */ - get d(): Prisma.DDelegate; + get d(): Prisma.DDelegate; /** * \`prisma.e\`: Exposes CRUD operations for the **E** model. @@ -950,18 +830,13 @@ export class PrismaClient< * const es = await prisma.e.findMany() * \`\`\` */ - get e(): Prisma.EDelegate; + get e(): Prisma.EDelegate; } export namespace Prisma { export import DMMF = runtime.DMMF - export type PrismaPromise = $Public.PrismaPromise - - /** - * Validator - */ - export import validator = runtime.Public.validator + export type PrismaPromise = runtime.Types.Public.PrismaPromise /** * Prisma Errors @@ -997,15 +872,6 @@ export namespace Prisma { export type MetricHistogram = runtime.MetricHistogram export type MetricHistogramBucket = runtime.MetricHistogramBucket - /** - * Extensions - */ - export type Extension = $Extensions.UserArgs - export import getExtensionContext = runtime.Extensions.getExtensionContext - export type Args = $Public.Args - export type Payload = $Public.Payload - export type Result = $Public.Result - export type Exact = $Public.Exact /** * Prisma Client JS version: local @@ -1377,7 +1243,7 @@ export namespace Prisma { export const type: unique symbol; - + export function validator(): (select: runtime.Types.Utils.LegacyExact) => S; /** * Used by group by @@ -1457,1246 +1323,6 @@ export namespace Prisma { db?: Datasource } - - interface TypeMapCb extends $Utils.Fn<{extArgs: $Extensions.Args}, $Utils.Record> { - returns: Prisma.TypeMap - } - - export type TypeMap = { - meta: { - modelProps: 'post' | 'user' | 'embedHolder' | 'm' | 'n' | 'oneOptional' | 'manyRequired' | 'optionalSide1' | 'optionalSide2' | 'a' | 'b' | 'c' | 'd' | 'e' - txIsolationLevel: never - }, - model: { - Post: { - findUnique: { - args: Prisma.PostFindUniqueArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - findUniqueOrThrow: { - args: Prisma.PostFindUniqueOrThrowArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - findFirst: { - args: Prisma.PostFindFirstArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - findFirstOrThrow: { - args: Prisma.PostFindFirstOrThrowArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - findMany: { - args: Prisma.PostFindManyArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - create: { - args: Prisma.PostCreateArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - createMany: { - args: Prisma.PostCreateManyArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - delete: { - args: Prisma.PostDeleteArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - update: { - args: Prisma.PostUpdateArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - deleteMany: { - args: Prisma.PostDeleteManyArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - updateMany: { - args: Prisma.PostUpdateManyArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - upsert: { - args: Prisma.PostUpsertArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - aggregate: { - args: Prisma.PostAggregateArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - groupBy: { - args: Prisma.PostGroupByArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - findRaw: { - args: Prisma.PostFindRawArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - aggregateRaw: { - args: Prisma.PostAggregateRawArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - count: { - args: Prisma.PostCountArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - } - User: { - findUnique: { - args: Prisma.UserFindUniqueArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - findUniqueOrThrow: { - args: Prisma.UserFindUniqueOrThrowArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - findFirst: { - args: Prisma.UserFindFirstArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - findFirstOrThrow: { - args: Prisma.UserFindFirstOrThrowArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - findMany: { - args: Prisma.UserFindManyArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - create: { - args: Prisma.UserCreateArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - createMany: { - args: Prisma.UserCreateManyArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - delete: { - args: Prisma.UserDeleteArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - update: { - args: Prisma.UserUpdateArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - deleteMany: { - args: Prisma.UserDeleteManyArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - updateMany: { - args: Prisma.UserUpdateManyArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - upsert: { - args: Prisma.UserUpsertArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - aggregate: { - args: Prisma.UserAggregateArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - groupBy: { - args: Prisma.UserGroupByArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - findRaw: { - args: Prisma.UserFindRawArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - aggregateRaw: { - args: Prisma.UserAggregateRawArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - count: { - args: Prisma.UserCountArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - } - EmbedHolder: { - findUnique: { - args: Prisma.EmbedHolderFindUniqueArgs, - result: $Utils.OptionalFlat - payload: EmbedHolderPayload - } - findUniqueOrThrow: { - args: Prisma.EmbedHolderFindUniqueOrThrowArgs, - result: $Utils.OptionalFlat - payload: EmbedHolderPayload - } - findFirst: { - args: Prisma.EmbedHolderFindFirstArgs, - result: $Utils.OptionalFlat - payload: EmbedHolderPayload - } - findFirstOrThrow: { - args: Prisma.EmbedHolderFindFirstOrThrowArgs, - result: $Utils.OptionalFlat - payload: EmbedHolderPayload - } - findMany: { - args: Prisma.EmbedHolderFindManyArgs, - result: $Utils.OptionalFlat - payload: EmbedHolderPayload - } - create: { - args: Prisma.EmbedHolderCreateArgs, - result: $Utils.OptionalFlat - payload: EmbedHolderPayload - } - createMany: { - args: Prisma.EmbedHolderCreateManyArgs, - result: $Utils.OptionalFlat - payload: EmbedHolderPayload - } - delete: { - args: Prisma.EmbedHolderDeleteArgs, - result: $Utils.OptionalFlat - payload: EmbedHolderPayload - } - update: { - args: Prisma.EmbedHolderUpdateArgs, - result: $Utils.OptionalFlat - payload: EmbedHolderPayload - } - deleteMany: { - args: Prisma.EmbedHolderDeleteManyArgs, - result: $Utils.OptionalFlat - payload: EmbedHolderPayload - } - updateMany: { - args: Prisma.EmbedHolderUpdateManyArgs, - result: $Utils.OptionalFlat - payload: EmbedHolderPayload - } - upsert: { - args: Prisma.EmbedHolderUpsertArgs, - result: $Utils.OptionalFlat - payload: EmbedHolderPayload - } - aggregate: { - args: Prisma.EmbedHolderAggregateArgs, - result: $Utils.OptionalFlat - payload: EmbedHolderPayload - } - groupBy: { - args: Prisma.EmbedHolderGroupByArgs, - result: $Utils.OptionalFlat - payload: EmbedHolderPayload - } - findRaw: { - args: Prisma.EmbedHolderFindRawArgs, - result: $Utils.OptionalFlat - payload: EmbedHolderPayload - } - aggregateRaw: { - args: Prisma.EmbedHolderAggregateRawArgs, - result: $Utils.OptionalFlat - payload: EmbedHolderPayload - } - count: { - args: Prisma.EmbedHolderCountArgs, - result: $Utils.OptionalFlat - payload: EmbedHolderPayload - } - } - M: { - findUnique: { - args: Prisma.MFindUniqueArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - findUniqueOrThrow: { - args: Prisma.MFindUniqueOrThrowArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - findFirst: { - args: Prisma.MFindFirstArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - findFirstOrThrow: { - args: Prisma.MFindFirstOrThrowArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - findMany: { - args: Prisma.MFindManyArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - create: { - args: Prisma.MCreateArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - createMany: { - args: Prisma.MCreateManyArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - delete: { - args: Prisma.MDeleteArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - update: { - args: Prisma.MUpdateArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - deleteMany: { - args: Prisma.MDeleteManyArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - updateMany: { - args: Prisma.MUpdateManyArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - upsert: { - args: Prisma.MUpsertArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - aggregate: { - args: Prisma.MAggregateArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - groupBy: { - args: Prisma.MGroupByArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - findRaw: { - args: Prisma.MFindRawArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - aggregateRaw: { - args: Prisma.MAggregateRawArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - count: { - args: Prisma.MCountArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - } - N: { - findUnique: { - args: Prisma.NFindUniqueArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - findUniqueOrThrow: { - args: Prisma.NFindUniqueOrThrowArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - findFirst: { - args: Prisma.NFindFirstArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - findFirstOrThrow: { - args: Prisma.NFindFirstOrThrowArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - findMany: { - args: Prisma.NFindManyArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - create: { - args: Prisma.NCreateArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - createMany: { - args: Prisma.NCreateManyArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - delete: { - args: Prisma.NDeleteArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - update: { - args: Prisma.NUpdateArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - deleteMany: { - args: Prisma.NDeleteManyArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - updateMany: { - args: Prisma.NUpdateManyArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - upsert: { - args: Prisma.NUpsertArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - aggregate: { - args: Prisma.NAggregateArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - groupBy: { - args: Prisma.NGroupByArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - findRaw: { - args: Prisma.NFindRawArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - aggregateRaw: { - args: Prisma.NAggregateRawArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - count: { - args: Prisma.NCountArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - } - OneOptional: { - findUnique: { - args: Prisma.OneOptionalFindUniqueArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - findUniqueOrThrow: { - args: Prisma.OneOptionalFindUniqueOrThrowArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - findFirst: { - args: Prisma.OneOptionalFindFirstArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - findFirstOrThrow: { - args: Prisma.OneOptionalFindFirstOrThrowArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - findMany: { - args: Prisma.OneOptionalFindManyArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - create: { - args: Prisma.OneOptionalCreateArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - createMany: { - args: Prisma.OneOptionalCreateManyArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - delete: { - args: Prisma.OneOptionalDeleteArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - update: { - args: Prisma.OneOptionalUpdateArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - deleteMany: { - args: Prisma.OneOptionalDeleteManyArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - updateMany: { - args: Prisma.OneOptionalUpdateManyArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - upsert: { - args: Prisma.OneOptionalUpsertArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - aggregate: { - args: Prisma.OneOptionalAggregateArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - groupBy: { - args: Prisma.OneOptionalGroupByArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - findRaw: { - args: Prisma.OneOptionalFindRawArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - aggregateRaw: { - args: Prisma.OneOptionalAggregateRawArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - count: { - args: Prisma.OneOptionalCountArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - } - ManyRequired: { - findUnique: { - args: Prisma.ManyRequiredFindUniqueArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - findUniqueOrThrow: { - args: Prisma.ManyRequiredFindUniqueOrThrowArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - findFirst: { - args: Prisma.ManyRequiredFindFirstArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - findFirstOrThrow: { - args: Prisma.ManyRequiredFindFirstOrThrowArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - findMany: { - args: Prisma.ManyRequiredFindManyArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - create: { - args: Prisma.ManyRequiredCreateArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - createMany: { - args: Prisma.ManyRequiredCreateManyArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - delete: { - args: Prisma.ManyRequiredDeleteArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - update: { - args: Prisma.ManyRequiredUpdateArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - deleteMany: { - args: Prisma.ManyRequiredDeleteManyArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - updateMany: { - args: Prisma.ManyRequiredUpdateManyArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - upsert: { - args: Prisma.ManyRequiredUpsertArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - aggregate: { - args: Prisma.ManyRequiredAggregateArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - groupBy: { - args: Prisma.ManyRequiredGroupByArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - findRaw: { - args: Prisma.ManyRequiredFindRawArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - aggregateRaw: { - args: Prisma.ManyRequiredAggregateRawArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - count: { - args: Prisma.ManyRequiredCountArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - } - OptionalSide1: { - findUnique: { - args: Prisma.OptionalSide1FindUniqueArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - findUniqueOrThrow: { - args: Prisma.OptionalSide1FindUniqueOrThrowArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - findFirst: { - args: Prisma.OptionalSide1FindFirstArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - findFirstOrThrow: { - args: Prisma.OptionalSide1FindFirstOrThrowArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - findMany: { - args: Prisma.OptionalSide1FindManyArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - create: { - args: Prisma.OptionalSide1CreateArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - createMany: { - args: Prisma.OptionalSide1CreateManyArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - delete: { - args: Prisma.OptionalSide1DeleteArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - update: { - args: Prisma.OptionalSide1UpdateArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - deleteMany: { - args: Prisma.OptionalSide1DeleteManyArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - updateMany: { - args: Prisma.OptionalSide1UpdateManyArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - upsert: { - args: Prisma.OptionalSide1UpsertArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - aggregate: { - args: Prisma.OptionalSide1AggregateArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - groupBy: { - args: Prisma.OptionalSide1GroupByArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - findRaw: { - args: Prisma.OptionalSide1FindRawArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - aggregateRaw: { - args: Prisma.OptionalSide1AggregateRawArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - count: { - args: Prisma.OptionalSide1CountArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - } - OptionalSide2: { - findUnique: { - args: Prisma.OptionalSide2FindUniqueArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - findUniqueOrThrow: { - args: Prisma.OptionalSide2FindUniqueOrThrowArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - findFirst: { - args: Prisma.OptionalSide2FindFirstArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - findFirstOrThrow: { - args: Prisma.OptionalSide2FindFirstOrThrowArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - findMany: { - args: Prisma.OptionalSide2FindManyArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - create: { - args: Prisma.OptionalSide2CreateArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - createMany: { - args: Prisma.OptionalSide2CreateManyArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - delete: { - args: Prisma.OptionalSide2DeleteArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - update: { - args: Prisma.OptionalSide2UpdateArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - deleteMany: { - args: Prisma.OptionalSide2DeleteManyArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - updateMany: { - args: Prisma.OptionalSide2UpdateManyArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - upsert: { - args: Prisma.OptionalSide2UpsertArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - aggregate: { - args: Prisma.OptionalSide2AggregateArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - groupBy: { - args: Prisma.OptionalSide2GroupByArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - findRaw: { - args: Prisma.OptionalSide2FindRawArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - aggregateRaw: { - args: Prisma.OptionalSide2AggregateRawArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - count: { - args: Prisma.OptionalSide2CountArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - } - A: { - findUnique: { - args: Prisma.AFindUniqueArgs, - result: $Utils.OptionalFlat - payload: APayload - } - findUniqueOrThrow: { - args: Prisma.AFindUniqueOrThrowArgs, - result: $Utils.OptionalFlat - payload: APayload - } - findFirst: { - args: Prisma.AFindFirstArgs, - result: $Utils.OptionalFlat - payload: APayload - } - findFirstOrThrow: { - args: Prisma.AFindFirstOrThrowArgs, - result: $Utils.OptionalFlat - payload: APayload - } - findMany: { - args: Prisma.AFindManyArgs, - result: $Utils.OptionalFlat - payload: APayload - } - create: { - args: Prisma.ACreateArgs, - result: $Utils.OptionalFlat - payload: APayload - } - createMany: { - args: Prisma.ACreateManyArgs, - result: $Utils.OptionalFlat - payload: APayload - } - delete: { - args: Prisma.ADeleteArgs, - result: $Utils.OptionalFlat - payload: APayload - } - update: { - args: Prisma.AUpdateArgs, - result: $Utils.OptionalFlat - payload: APayload - } - deleteMany: { - args: Prisma.ADeleteManyArgs, - result: $Utils.OptionalFlat - payload: APayload - } - updateMany: { - args: Prisma.AUpdateManyArgs, - result: $Utils.OptionalFlat - payload: APayload - } - upsert: { - args: Prisma.AUpsertArgs, - result: $Utils.OptionalFlat - payload: APayload - } - aggregate: { - args: Prisma.AAggregateArgs, - result: $Utils.OptionalFlat - payload: APayload - } - groupBy: { - args: Prisma.AGroupByArgs, - result: $Utils.OptionalFlat - payload: APayload - } - findRaw: { - args: Prisma.AFindRawArgs, - result: $Utils.OptionalFlat - payload: APayload - } - aggregateRaw: { - args: Prisma.AAggregateRawArgs, - result: $Utils.OptionalFlat - payload: APayload - } - count: { - args: Prisma.ACountArgs, - result: $Utils.OptionalFlat - payload: APayload - } - } - B: { - findUnique: { - args: Prisma.BFindUniqueArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - findUniqueOrThrow: { - args: Prisma.BFindUniqueOrThrowArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - findFirst: { - args: Prisma.BFindFirstArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - findFirstOrThrow: { - args: Prisma.BFindFirstOrThrowArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - findMany: { - args: Prisma.BFindManyArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - create: { - args: Prisma.BCreateArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - createMany: { - args: Prisma.BCreateManyArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - delete: { - args: Prisma.BDeleteArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - update: { - args: Prisma.BUpdateArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - deleteMany: { - args: Prisma.BDeleteManyArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - updateMany: { - args: Prisma.BUpdateManyArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - upsert: { - args: Prisma.BUpsertArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - aggregate: { - args: Prisma.BAggregateArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - groupBy: { - args: Prisma.BGroupByArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - findRaw: { - args: Prisma.BFindRawArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - aggregateRaw: { - args: Prisma.BAggregateRawArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - count: { - args: Prisma.BCountArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - } - C: { - findUnique: { - args: Prisma.CFindUniqueArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - findUniqueOrThrow: { - args: Prisma.CFindUniqueOrThrowArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - findFirst: { - args: Prisma.CFindFirstArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - findFirstOrThrow: { - args: Prisma.CFindFirstOrThrowArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - findMany: { - args: Prisma.CFindManyArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - create: { - args: Prisma.CCreateArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - createMany: { - args: Prisma.CCreateManyArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - delete: { - args: Prisma.CDeleteArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - update: { - args: Prisma.CUpdateArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - deleteMany: { - args: Prisma.CDeleteManyArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - updateMany: { - args: Prisma.CUpdateManyArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - upsert: { - args: Prisma.CUpsertArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - aggregate: { - args: Prisma.CAggregateArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - groupBy: { - args: Prisma.CGroupByArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - findRaw: { - args: Prisma.CFindRawArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - aggregateRaw: { - args: Prisma.CAggregateRawArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - count: { - args: Prisma.CCountArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - } - D: { - findUnique: { - args: Prisma.DFindUniqueArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - findUniqueOrThrow: { - args: Prisma.DFindUniqueOrThrowArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - findFirst: { - args: Prisma.DFindFirstArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - findFirstOrThrow: { - args: Prisma.DFindFirstOrThrowArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - findMany: { - args: Prisma.DFindManyArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - create: { - args: Prisma.DCreateArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - createMany: { - args: Prisma.DCreateManyArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - delete: { - args: Prisma.DDeleteArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - update: { - args: Prisma.DUpdateArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - deleteMany: { - args: Prisma.DDeleteManyArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - updateMany: { - args: Prisma.DUpdateManyArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - upsert: { - args: Prisma.DUpsertArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - aggregate: { - args: Prisma.DAggregateArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - groupBy: { - args: Prisma.DGroupByArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - findRaw: { - args: Prisma.DFindRawArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - aggregateRaw: { - args: Prisma.DAggregateRawArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - count: { - args: Prisma.DCountArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - } - E: { - findUnique: { - args: Prisma.EFindUniqueArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - findUniqueOrThrow: { - args: Prisma.EFindUniqueOrThrowArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - findFirst: { - args: Prisma.EFindFirstArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - findFirstOrThrow: { - args: Prisma.EFindFirstOrThrowArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - findMany: { - args: Prisma.EFindManyArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - create: { - args: Prisma.ECreateArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - createMany: { - args: Prisma.ECreateManyArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - delete: { - args: Prisma.EDeleteArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - update: { - args: Prisma.EUpdateArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - deleteMany: { - args: Prisma.EDeleteManyArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - updateMany: { - args: Prisma.EUpdateManyArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - upsert: { - args: Prisma.EUpsertArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - aggregate: { - args: Prisma.EAggregateArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - groupBy: { - args: Prisma.EGroupByArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - findRaw: { - args: Prisma.EFindRawArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - aggregateRaw: { - args: Prisma.EAggregateRawArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - count: { - args: Prisma.ECountArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - } - } - } & { - other: { - $runCommandRaw: { - args: Prisma.InputJsonObject, - result: Prisma.JsonObject - payload: any - } - } - } - export const defineExtension: $Extensions.ExtendsHook<'define', Prisma.TypeMapCb, $Extensions.DefaultArgs> export type DefaultPrismaClient = PrismaClient export type RejectOnNotFound = boolean | ((error: Error) => Error) export type RejectPerModel = { [P in ModelName]?: RejectOnNotFound } @@ -2837,7 +1463,7 @@ export namespace Prisma { /** * \`PrismaClient\` proxy available in interactive transactions. */ - export type TransactionClient = Omit + export type TransactionClient = Omit export type Datasource = { url?: string @@ -2857,28 +1483,36 @@ export namespace Prisma { posts: number } - export type UserCountOutputTypeSelect = { - posts?: boolean | UserCountOutputTypeCountPostsArgs + export type UserCountOutputTypeSelect = { + posts?: boolean } + export type UserCountOutputTypeGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? UserCountOutputType : + S extends undefined ? never : + S extends { include: any } & (UserCountOutputTypeArgs) + ? UserCountOutputType + : S extends { select: any } & (UserCountOutputTypeArgs) + ? { + [P in TruthyKeys]: + P extends keyof UserCountOutputType ? UserCountOutputType[P] : never + } + : UserCountOutputType + + + + // Custom InputTypes /** * UserCountOutputType without action */ - export type UserCountOutputTypeArgs = { + export type UserCountOutputTypeArgs = { /** * Select specific fields to fetch from the UserCountOutputType */ - select?: UserCountOutputTypeSelect | null - } - - - /** - * UserCountOutputType without action - */ - export type UserCountOutputTypeCountPostsArgs = { - where?: PostWhereInput + select?: UserCountOutputTypeSelect | null } @@ -2892,28 +1526,36 @@ export namespace Prisma { User: number } - export type EmbedHolderCountOutputTypeSelect = { - User?: boolean | EmbedHolderCountOutputTypeCountUserArgs + export type EmbedHolderCountOutputTypeSelect = { + User?: boolean } + export type EmbedHolderCountOutputTypeGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? EmbedHolderCountOutputType : + S extends undefined ? never : + S extends { include: any } & (EmbedHolderCountOutputTypeArgs) + ? EmbedHolderCountOutputType + : S extends { select: any } & (EmbedHolderCountOutputTypeArgs) + ? { + [P in TruthyKeys]: + P extends keyof EmbedHolderCountOutputType ? EmbedHolderCountOutputType[P] : never + } + : EmbedHolderCountOutputType + + + + // Custom InputTypes /** * EmbedHolderCountOutputType without action */ - export type EmbedHolderCountOutputTypeArgs = { + export type EmbedHolderCountOutputTypeArgs = { /** * Select specific fields to fetch from the EmbedHolderCountOutputType */ - select?: EmbedHolderCountOutputTypeSelect | null - } - - - /** - * EmbedHolderCountOutputType without action - */ - export type EmbedHolderCountOutputTypeCountUserArgs = { - where?: UserWhereInput + select?: EmbedHolderCountOutputTypeSelect | null } @@ -2927,28 +1569,36 @@ export namespace Prisma { n: number } - export type MCountOutputTypeSelect = { - n?: boolean | MCountOutputTypeCountNArgs + export type MCountOutputTypeSelect = { + n?: boolean } + export type MCountOutputTypeGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? MCountOutputType : + S extends undefined ? never : + S extends { include: any } & (MCountOutputTypeArgs) + ? MCountOutputType + : S extends { select: any } & (MCountOutputTypeArgs) + ? { + [P in TruthyKeys]: + P extends keyof MCountOutputType ? MCountOutputType[P] : never + } + : MCountOutputType + + + + // Custom InputTypes /** * MCountOutputType without action */ - export type MCountOutputTypeArgs = { + export type MCountOutputTypeArgs = { /** * Select specific fields to fetch from the MCountOutputType */ - select?: MCountOutputTypeSelect | null - } - - - /** - * MCountOutputType without action - */ - export type MCountOutputTypeCountNArgs = { - where?: NWhereInput + select?: MCountOutputTypeSelect | null } @@ -2962,28 +1612,36 @@ export namespace Prisma { m: number } - export type NCountOutputTypeSelect = { - m?: boolean | NCountOutputTypeCountMArgs - } + export type NCountOutputTypeSelect = { + m?: boolean + } + + export type NCountOutputTypeGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? NCountOutputType : + S extends undefined ? never : + S extends { include: any } & (NCountOutputTypeArgs) + ? NCountOutputType + : S extends { select: any } & (NCountOutputTypeArgs) + ? { + [P in TruthyKeys]: + P extends keyof NCountOutputType ? NCountOutputType[P] : never + } + : NCountOutputType + + + // Custom InputTypes /** * NCountOutputType without action */ - export type NCountOutputTypeArgs = { + export type NCountOutputTypeArgs = { /** * Select specific fields to fetch from the NCountOutputType */ - select?: NCountOutputTypeSelect | null - } - - - /** - * NCountOutputType without action - */ - export type NCountOutputTypeCountMArgs = { - where?: MWhereInput + select?: NCountOutputTypeSelect | null } @@ -2997,28 +1655,36 @@ export namespace Prisma { many: number } - export type OneOptionalCountOutputTypeSelect = { - many?: boolean | OneOptionalCountOutputTypeCountManyArgs + export type OneOptionalCountOutputTypeSelect = { + many?: boolean } + export type OneOptionalCountOutputTypeGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? OneOptionalCountOutputType : + S extends undefined ? never : + S extends { include: any } & (OneOptionalCountOutputTypeArgs) + ? OneOptionalCountOutputType + : S extends { select: any } & (OneOptionalCountOutputTypeArgs) + ? { + [P in TruthyKeys]: + P extends keyof OneOptionalCountOutputType ? OneOptionalCountOutputType[P] : never + } + : OneOptionalCountOutputType + + + + // Custom InputTypes /** * OneOptionalCountOutputType without action */ - export type OneOptionalCountOutputTypeArgs = { + export type OneOptionalCountOutputTypeArgs = { /** * Select specific fields to fetch from the OneOptionalCountOutputType */ - select?: OneOptionalCountOutputTypeSelect | null - } - - - /** - * OneOptionalCountOutputType without action - */ - export type OneOptionalCountOutputTypeCountManyArgs = { - where?: ManyRequiredWhereInput + select?: OneOptionalCountOutputTypeSelect | null } @@ -3035,27 +1701,94 @@ export namespace Prisma { - export type EmbedSelect = $Extensions.GetSelect<{ + export type EmbedSelect = { text?: boolean boolean?: boolean - embedEmbedList?: boolean | EmbedEmbedArgs - requiredEmbedEmbed?: boolean | EmbedEmbedArgs - optionalEmbedEmbed?: boolean | EmbedEmbedArgs + embedEmbedList?: boolean | EmbedEmbedArgs + requiredEmbedEmbed?: boolean | EmbedEmbedArgs + optionalEmbedEmbed?: boolean | EmbedEmbedArgs scalarList?: boolean - }, ExtArgs["result"]["embed"]> + } + + + export type EmbedInclude = {} + + export type EmbedGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? Embed : + S extends undefined ? never : + S extends { include: any } & (EmbedArgs) + ? Embed + : S extends { select: any } & (EmbedArgs) + ? { + [P in TruthyKeys]: + P extends 'embedEmbedList' ? Array < EmbedEmbedGetPayload> : + P extends 'requiredEmbedEmbed' ? EmbedEmbedGetPayload : + P extends 'optionalEmbedEmbed' ? EmbedEmbedGetPayload | null : P extends keyof Embed ? Embed[P] : never + } + : Embed + + + + export interface EmbedDelegate { + + + + + + - export type EmbedSelectScalar = { - text?: boolean - boolean?: boolean - scalarList?: boolean } - export type EmbedInclude = {} + /** + * The delegate class that acts as a "Promise-like" for Embed. + * Why is this prefixed with \`Prisma__\`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export class Prisma__EmbedClient implements Prisma.PrismaPromise { + private readonly _dmmf; + private readonly _queryType; + private readonly _rootField; + private readonly _clientMethod; + private readonly _args; + private readonly _dataPath; + private readonly _errorFormat; + private readonly _measurePerformance?; + private _isList; + private _callsite; + private _requestPromise?; + readonly [Symbol.toStringTag]: 'PrismaPromise'; + constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); + embedEmbedList(args?: Subset): Prisma.PrismaPromise>| Null>; - type EmbedGetPayload = $Types.GetResult + requiredEmbedEmbed(args?: Subset): Prisma__EmbedEmbedClient | Null>; + optionalEmbedEmbed(args?: Subset): Prisma__EmbedEmbedClient | Null>; + private get _document(); + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): Promise; + } @@ -3064,15 +1797,15 @@ export namespace Prisma { /** * Embed without action */ - export type EmbedArgs = { + export type EmbedArgs = { /** * Select specific fields to fetch from the Embed */ - select?: EmbedSelect | null + select?: EmbedSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: EmbedInclude | null + include?: EmbedInclude | null } @@ -3085,20 +1818,81 @@ export namespace Prisma { - export type EmbedEmbedSelect = $Extensions.GetSelect<{ - text?: boolean - boolean?: boolean - }, ExtArgs["result"]["embedEmbed"]> - - export type EmbedEmbedSelectScalar = { + export type EmbedEmbedSelect = { text?: boolean boolean?: boolean } - type EmbedEmbedGetPayload = $Types.GetResult + export type EmbedEmbedGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? EmbedEmbed : + S extends undefined ? never : + S extends { include: any } & (EmbedEmbedArgs) + ? EmbedEmbed + : S extends { select: any } & (EmbedEmbedArgs) + ? { + [P in TruthyKeys]: + P extends keyof EmbedEmbed ? EmbedEmbed[P] : never + } + : EmbedEmbed + + + + export interface EmbedEmbedDelegate { + + + + + + + + } + + /** + * The delegate class that acts as a "Promise-like" for EmbedEmbed. + * Why is this prefixed with \`Prisma__\`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export class Prisma__EmbedEmbedClient implements Prisma.PrismaPromise { + private readonly _dmmf; + private readonly _queryType; + private readonly _rootField; + private readonly _clientMethod; + private readonly _args; + private readonly _dataPath; + private readonly _errorFormat; + private readonly _measurePerformance?; + private _isList; + private _callsite; + private _requestPromise?; + readonly [Symbol.toStringTag]: 'PrismaPromise'; + constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); + private get _document(); + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): Promise; + } @@ -3107,11 +1901,11 @@ export namespace Prisma { /** * EmbedEmbed without action */ - export type EmbedEmbedArgs = { + export type EmbedEmbedArgs = { /** * Select specific fields to fetch from the EmbedEmbed */ - select?: EmbedEmbedSelect | null + select?: EmbedEmbedSelect | null } @@ -3184,7 +1978,7 @@ export namespace Prisma { _all?: true } - export type PostAggregateArgs = { + export type PostAggregateArgs = { /** * Filter which Post to aggregate. */ @@ -3244,7 +2038,7 @@ export namespace Prisma { - export type PostGroupByArgs = { + export type PostGroupByArgs = { where?: PostWhereInput orderBy?: Enumerable by: PostScalarFieldEnum[] @@ -3283,39 +2077,45 @@ export namespace Prisma { > - export type PostSelect = $Extensions.GetSelect<{ - id?: boolean - createdAt?: boolean - title?: boolean - content?: boolean - published?: boolean - authorId?: boolean - author?: boolean | UserArgs - }, ExtArgs["result"]["post"]> - - export type PostSelectScalar = { + export type PostSelect = { id?: boolean createdAt?: boolean title?: boolean content?: boolean published?: boolean authorId?: boolean + author?: boolean | UserArgs } - export type PostInclude = { - author?: boolean | UserArgs + + export type PostInclude = { + author?: boolean | UserArgs } + export type PostGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? Post : + S extends undefined ? never : + S extends { include: any } & (PostArgs | PostFindManyArgs) + ? Post & { + [P in TruthyKeys]: + P extends 'author' ? UserGetPayload : never + } + : S extends { select: any } & (PostArgs | PostFindManyArgs) + ? { + [P in TruthyKeys]: + P extends 'author' ? UserGetPayload : P extends keyof Post ? Post[P] : never + } + : Post - type PostGetPayload = $Types.GetResult - type PostCountArgs = + type PostCountArgs = Omit & { select?: PostCountAggregateInputType | true } - export interface PostDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Post'], meta: { name: 'Post' } } + export interface PostDelegate { + /** * Find zero or one Post that matches the filter. * @param {PostFindUniqueArgs} args - Arguments to find a Post @@ -3327,9 +2127,9 @@ export namespace Prisma { * } * }) **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__PostClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__PostClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + findUnique( + args: SelectSubset + ): HasReject extends True ? Prisma__PostClient> : Prisma__PostClient | null, null> /** * Find one Post that matches the filter or throw an error with \`error.code='P2025'\` @@ -3343,9 +2143,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__PostClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow( + args?: SelectSubset + ): Prisma__PostClient> /** * Find the first Post that matches the filter. @@ -3360,9 +2160,9 @@ export namespace Prisma { * } * }) **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__PostClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__PostClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + findFirst( + args?: SelectSubset + ): HasReject extends True ? Prisma__PostClient> : Prisma__PostClient | null, null> /** * Find the first Post that matches the filter or @@ -3378,9 +2178,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__PostClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow( + args?: SelectSubset + ): Prisma__PostClient> /** * Find zero or more Posts that matches the filter. @@ -3398,9 +2198,9 @@ export namespace Prisma { * const postWithIdOnly = await prisma.post.findMany({ select: { id: true } }) * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany( + args?: SelectSubset + ): Prisma.PrismaPromise>> /** * Create a Post. @@ -3414,9 +2214,9 @@ export namespace Prisma { * }) * **/ - create>( - args: SelectSubset> - ): Prisma__PostClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create( + args: SelectSubset + ): Prisma__PostClient> /** * Create many Posts. @@ -3430,8 +2230,8 @@ export namespace Prisma { * }) * **/ - createMany>( - args?: SelectSubset> + createMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -3446,9 +2246,9 @@ export namespace Prisma { * }) * **/ - delete>( - args: SelectSubset> - ): Prisma__PostClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete( + args: SelectSubset + ): Prisma__PostClient> /** * Update one Post. @@ -3465,9 +2265,9 @@ export namespace Prisma { * }) * **/ - update>( - args: SelectSubset> - ): Prisma__PostClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update( + args: SelectSubset + ): Prisma__PostClient> /** * Delete zero or more Posts. @@ -3481,8 +2281,8 @@ export namespace Prisma { * }) * **/ - deleteMany>( - args?: SelectSubset> + deleteMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -3502,8 +2302,8 @@ export namespace Prisma { * }) * **/ - updateMany>( - args: SelectSubset> + updateMany( + args: SelectSubset ): Prisma.PrismaPromise /** @@ -3523,9 +2323,9 @@ export namespace Prisma { * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__PostClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert( + args: SelectSubset + ): Prisma__PostClient> /** * Find zero or more Posts that matches the filter. @@ -3570,7 +2370,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> + T extends _Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -3688,7 +2488,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__PostClient implements Prisma.PrismaPromise { + export class Prisma__PostClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -3703,7 +2503,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - author = {}>(args?: Subset>): Prisma__UserClient<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; + author(args?: Subset): Prisma__UserClient | Null>; private get _document(); /** @@ -3735,15 +2535,15 @@ export namespace Prisma { /** * Post base type for findUnique actions */ - export type PostFindUniqueArgsBase = { + export type PostFindUniqueArgsBase = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * Filter, which Post to fetch. */ @@ -3753,7 +2553,7 @@ export namespace Prisma { /** * Post findUnique */ - export interface PostFindUniqueArgs extends PostFindUniqueArgsBase { + export interface PostFindUniqueArgs extends PostFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -3765,15 +2565,15 @@ export namespace Prisma { /** * Post findUniqueOrThrow */ - export type PostFindUniqueOrThrowArgs = { + export type PostFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * Filter, which Post to fetch. */ @@ -3784,15 +2584,15 @@ export namespace Prisma { /** * Post base type for findFirst actions */ - export type PostFindFirstArgsBase = { + export type PostFindFirstArgsBase = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * Filter, which Post to fetch. */ @@ -3832,7 +2632,7 @@ export namespace Prisma { /** * Post findFirst */ - export interface PostFindFirstArgs extends PostFindFirstArgsBase { + export interface PostFindFirstArgs extends PostFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -3844,15 +2644,15 @@ export namespace Prisma { /** * Post findFirstOrThrow */ - export type PostFindFirstOrThrowArgs = { + export type PostFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * Filter, which Post to fetch. */ @@ -3893,15 +2693,15 @@ export namespace Prisma { /** * Post findMany */ - export type PostFindManyArgs = { + export type PostFindManyArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * Filter, which Posts to fetch. */ @@ -3937,15 +2737,15 @@ export namespace Prisma { /** * Post create */ - export type PostCreateArgs = { + export type PostCreateArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * The data needed to create a Post. */ @@ -3956,7 +2756,7 @@ export namespace Prisma { /** * Post createMany */ - export type PostCreateManyArgs = { + export type PostCreateManyArgs = { /** * The data used to create many Posts. */ @@ -3967,15 +2767,15 @@ export namespace Prisma { /** * Post update */ - export type PostUpdateArgs = { + export type PostUpdateArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * The data needed to update a Post. */ @@ -3990,7 +2790,7 @@ export namespace Prisma { /** * Post updateMany */ - export type PostUpdateManyArgs = { + export type PostUpdateManyArgs = { /** * The data used to update Posts. */ @@ -4005,15 +2805,15 @@ export namespace Prisma { /** * Post upsert */ - export type PostUpsertArgs = { + export type PostUpsertArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * The filter to search for the Post to update in case it exists. */ @@ -4032,15 +2832,15 @@ export namespace Prisma { /** * Post delete */ - export type PostDeleteArgs = { + export type PostDeleteArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * Filter which Post to delete. */ @@ -4051,7 +2851,7 @@ export namespace Prisma { /** * Post deleteMany */ - export type PostDeleteManyArgs = { + export type PostDeleteManyArgs = { /** * Filter which Posts to delete */ @@ -4062,7 +2862,7 @@ export namespace Prisma { /** * Post findRaw */ - export type PostFindRawArgs = { + export type PostFindRawArgs = { /** * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. \${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}. */ @@ -4077,7 +2877,7 @@ export namespace Prisma { /** * Post aggregateRaw */ - export type PostAggregateRawArgs = { + export type PostAggregateRawArgs = { /** * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. \${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}. */ @@ -4092,15 +2892,15 @@ export namespace Prisma { /** * Post without action */ - export type PostArgs = { + export type PostArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null } @@ -4249,7 +3049,7 @@ export namespace Prisma { _all?: true } - export type UserAggregateArgs = { + export type UserAggregateArgs = { /** * Filter which User to aggregate. */ @@ -4321,7 +3121,7 @@ export namespace Prisma { - export type UserGroupByArgs = { + export type UserGroupByArgs = { where?: UserWhereInput orderBy?: Enumerable by: UserScalarFieldEnum[] @@ -4373,28 +3173,7 @@ export namespace Prisma { > - export type UserSelect = $Extensions.GetSelect<{ - id?: boolean - email?: boolean - int?: boolean - optionalInt?: boolean - float?: boolean - optionalFloat?: boolean - string?: boolean - optionalString?: boolean - json?: boolean - optionalJson?: boolean - enum?: boolean - optionalEnum?: boolean - boolean?: boolean - optionalBoolean?: boolean - embedHolderId?: boolean - posts?: boolean | User$postsArgs - embedHolder?: boolean | EmbedHolderArgs - _count?: boolean | UserCountOutputTypeArgs - }, ExtArgs["result"]["user"]> - - export type UserSelectScalar = { + export type UserSelect = { id?: boolean email?: boolean int?: boolean @@ -4410,24 +3189,46 @@ export namespace Prisma { boolean?: boolean optionalBoolean?: boolean embedHolderId?: boolean - } - - export type UserInclude = { - posts?: boolean | User$postsArgs - embedHolder?: boolean | EmbedHolderArgs - _count?: boolean | UserCountOutputTypeArgs - } - + posts?: boolean | User$postsArgs + embedHolder?: boolean | EmbedHolderArgs + _count?: boolean | UserCountOutputTypeArgs + } + + + export type UserInclude = { + posts?: boolean | User$postsArgs + embedHolder?: boolean | EmbedHolderArgs + _count?: boolean | UserCountOutputTypeArgs + } + + export type UserGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? User : + S extends undefined ? never : + S extends { include: any } & (UserArgs | UserFindManyArgs) + ? User & { + [P in TruthyKeys]: + P extends 'posts' ? Array < PostGetPayload> : + P extends 'embedHolder' ? EmbedHolderGetPayload : + P extends '_count' ? UserCountOutputTypeGetPayload : never + } + : S extends { select: any } & (UserArgs | UserFindManyArgs) + ? { + [P in TruthyKeys]: + P extends 'posts' ? Array < PostGetPayload> : + P extends 'embedHolder' ? EmbedHolderGetPayload : + P extends '_count' ? UserCountOutputTypeGetPayload : P extends keyof User ? User[P] : never + } + : User - type UserGetPayload = $Types.GetResult - type UserCountArgs = + type UserCountArgs = Omit & { select?: UserCountAggregateInputType | true } - export interface UserDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['User'], meta: { name: 'User' } } + export interface UserDelegate { + /** * Find zero or one User that matches the filter. * @param {UserFindUniqueArgs} args - Arguments to find a User @@ -4439,9 +3240,9 @@ export namespace Prisma { * } * }) **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__UserClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__UserClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + findUnique( + args: SelectSubset + ): HasReject extends True ? Prisma__UserClient> : Prisma__UserClient | null, null> /** * Find one User that matches the filter or throw an error with \`error.code='P2025'\` @@ -4455,9 +3256,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__UserClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow( + args?: SelectSubset + ): Prisma__UserClient> /** * Find the first User that matches the filter. @@ -4472,9 +3273,9 @@ export namespace Prisma { * } * }) **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__UserClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__UserClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + findFirst( + args?: SelectSubset + ): HasReject extends True ? Prisma__UserClient> : Prisma__UserClient | null, null> /** * Find the first User that matches the filter or @@ -4490,9 +3291,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__UserClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow( + args?: SelectSubset + ): Prisma__UserClient> /** * Find zero or more Users that matches the filter. @@ -4510,9 +3311,9 @@ export namespace Prisma { * const userWithIdOnly = await prisma.user.findMany({ select: { id: true } }) * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany( + args?: SelectSubset + ): Prisma.PrismaPromise>> /** * Create a User. @@ -4526,9 +3327,9 @@ export namespace Prisma { * }) * **/ - create>( - args: SelectSubset> - ): Prisma__UserClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create( + args: SelectSubset + ): Prisma__UserClient> /** * Create many Users. @@ -4542,8 +3343,8 @@ export namespace Prisma { * }) * **/ - createMany>( - args?: SelectSubset> + createMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -4558,9 +3359,9 @@ export namespace Prisma { * }) * **/ - delete>( - args: SelectSubset> - ): Prisma__UserClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete( + args: SelectSubset + ): Prisma__UserClient> /** * Update one User. @@ -4577,9 +3378,9 @@ export namespace Prisma { * }) * **/ - update>( - args: SelectSubset> - ): Prisma__UserClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update( + args: SelectSubset + ): Prisma__UserClient> /** * Delete zero or more Users. @@ -4593,8 +3394,8 @@ export namespace Prisma { * }) * **/ - deleteMany>( - args?: SelectSubset> + deleteMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -4614,8 +3415,8 @@ export namespace Prisma { * }) * **/ - updateMany>( - args: SelectSubset> + updateMany( + args: SelectSubset ): Prisma.PrismaPromise /** @@ -4635,9 +3436,9 @@ export namespace Prisma { * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__UserClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert( + args: SelectSubset + ): Prisma__UserClient> /** * Find zero or more Users that matches the filter. @@ -4682,7 +3483,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> + T extends _Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -4800,7 +3601,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__UserClient implements Prisma.PrismaPromise { + export class Prisma__UserClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -4815,9 +3616,9 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - posts = {}>(args?: Subset>): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>| Null>; + posts(args?: Subset): Prisma.PrismaPromise>| Null>; - embedHolder = {}>(args?: Subset>): Prisma__EmbedHolderClient<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; + embedHolder(args?: Subset): Prisma__EmbedHolderClient | Null>; private get _document(); /** @@ -4849,15 +3650,15 @@ export namespace Prisma { /** * User base type for findUnique actions */ - export type UserFindUniqueArgsBase = { + export type UserFindUniqueArgsBase = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * Filter, which User to fetch. */ @@ -4867,7 +3668,7 @@ export namespace Prisma { /** * User findUnique */ - export interface UserFindUniqueArgs extends UserFindUniqueArgsBase { + export interface UserFindUniqueArgs extends UserFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -4879,15 +3680,15 @@ export namespace Prisma { /** * User findUniqueOrThrow */ - export type UserFindUniqueOrThrowArgs = { + export type UserFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * Filter, which User to fetch. */ @@ -4898,15 +3699,15 @@ export namespace Prisma { /** * User base type for findFirst actions */ - export type UserFindFirstArgsBase = { + export type UserFindFirstArgsBase = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * Filter, which User to fetch. */ @@ -4946,7 +3747,7 @@ export namespace Prisma { /** * User findFirst */ - export interface UserFindFirstArgs extends UserFindFirstArgsBase { + export interface UserFindFirstArgs extends UserFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -4958,15 +3759,15 @@ export namespace Prisma { /** * User findFirstOrThrow */ - export type UserFindFirstOrThrowArgs = { + export type UserFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * Filter, which User to fetch. */ @@ -5007,15 +3808,15 @@ export namespace Prisma { /** * User findMany */ - export type UserFindManyArgs = { + export type UserFindManyArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * Filter, which Users to fetch. */ @@ -5051,15 +3852,15 @@ export namespace Prisma { /** * User create */ - export type UserCreateArgs = { + export type UserCreateArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * The data needed to create a User. */ @@ -5070,7 +3871,7 @@ export namespace Prisma { /** * User createMany */ - export type UserCreateManyArgs = { + export type UserCreateManyArgs = { /** * The data used to create many Users. */ @@ -5081,15 +3882,15 @@ export namespace Prisma { /** * User update */ - export type UserUpdateArgs = { + export type UserUpdateArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * The data needed to update a User. */ @@ -5104,7 +3905,7 @@ export namespace Prisma { /** * User updateMany */ - export type UserUpdateManyArgs = { + export type UserUpdateManyArgs = { /** * The data used to update Users. */ @@ -5119,15 +3920,15 @@ export namespace Prisma { /** * User upsert */ - export type UserUpsertArgs = { + export type UserUpsertArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * The filter to search for the User to update in case it exists. */ @@ -5146,15 +3947,15 @@ export namespace Prisma { /** * User delete */ - export type UserDeleteArgs = { + export type UserDeleteArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * Filter which User to delete. */ @@ -5165,7 +3966,7 @@ export namespace Prisma { /** * User deleteMany */ - export type UserDeleteManyArgs = { + export type UserDeleteManyArgs = { /** * Filter which Users to delete */ @@ -5176,7 +3977,7 @@ export namespace Prisma { /** * User findRaw */ - export type UserFindRawArgs = { + export type UserFindRawArgs = { /** * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. \${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}. */ @@ -5191,7 +3992,7 @@ export namespace Prisma { /** * User aggregateRaw */ - export type UserAggregateRawArgs = { + export type UserAggregateRawArgs = { /** * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. \${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}. */ @@ -5206,15 +4007,15 @@ export namespace Prisma { /** * User.posts */ - export type User$postsArgs = { + export type User$postsArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null where?: PostWhereInput orderBy?: Enumerable cursor?: PostWhereUniqueInput @@ -5227,15 +4028,15 @@ export namespace Prisma { /** * User without action */ - export type UserArgs = { + export type UserArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null } @@ -5296,7 +4097,7 @@ export namespace Prisma { _all?: true } - export type EmbedHolderAggregateArgs = { + export type EmbedHolderAggregateArgs = { /** * Filter which EmbedHolder to aggregate. */ @@ -5356,7 +4157,7 @@ export namespace Prisma { - export type EmbedHolderGroupByArgs = { + export type EmbedHolderGroupByArgs = { where?: EmbedHolderWhereInput orderBy?: Enumerable by: EmbedHolderScalarFieldEnum[] @@ -5393,40 +4194,53 @@ export namespace Prisma { > - export type EmbedHolderSelect = $Extensions.GetSelect<{ - id?: boolean - time?: boolean - text?: boolean - boolean?: boolean - embedList?: boolean | EmbedArgs - requiredEmbed?: boolean | EmbedArgs - optionalEmbed?: boolean | EmbedArgs - User?: boolean | EmbedHolder$UserArgs - _count?: boolean | EmbedHolderCountOutputTypeArgs - }, ExtArgs["result"]["embedHolder"]> - - export type EmbedHolderSelectScalar = { + export type EmbedHolderSelect = { id?: boolean time?: boolean text?: boolean boolean?: boolean - } - - export type EmbedHolderInclude = { - User?: boolean | EmbedHolder$UserArgs - _count?: boolean | EmbedHolderCountOutputTypeArgs - } - + embedList?: boolean | EmbedArgs + requiredEmbed?: boolean | EmbedArgs + optionalEmbed?: boolean | EmbedArgs + User?: boolean | EmbedHolder$UserArgs + _count?: boolean | EmbedHolderCountOutputTypeArgs + } + + + export type EmbedHolderInclude = { + User?: boolean | EmbedHolder$UserArgs + _count?: boolean | EmbedHolderCountOutputTypeArgs + } + + export type EmbedHolderGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? EmbedHolder : + S extends undefined ? never : + S extends { include: any } & (EmbedHolderArgs | EmbedHolderFindManyArgs) + ? EmbedHolder & { + [P in TruthyKeys]: + P extends 'User' ? Array < UserGetPayload> : + P extends '_count' ? EmbedHolderCountOutputTypeGetPayload : never + } + : S extends { select: any } & (EmbedHolderArgs | EmbedHolderFindManyArgs) + ? { + [P in TruthyKeys]: + P extends 'embedList' ? Array < EmbedGetPayload> : + P extends 'requiredEmbed' ? EmbedGetPayload : + P extends 'optionalEmbed' ? EmbedGetPayload | null : + P extends 'User' ? Array < UserGetPayload> : + P extends '_count' ? EmbedHolderCountOutputTypeGetPayload : P extends keyof EmbedHolder ? EmbedHolder[P] : never + } + : EmbedHolder - type EmbedHolderGetPayload = $Types.GetResult - type EmbedHolderCountArgs = + type EmbedHolderCountArgs = Omit & { select?: EmbedHolderCountAggregateInputType | true } - export interface EmbedHolderDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['EmbedHolder'], meta: { name: 'EmbedHolder' } } + export interface EmbedHolderDelegate { + /** * Find zero or one EmbedHolder that matches the filter. * @param {EmbedHolderFindUniqueArgs} args - Arguments to find a EmbedHolder @@ -5438,9 +4252,9 @@ export namespace Prisma { * } * }) **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__EmbedHolderClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__EmbedHolderClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + findUnique( + args: SelectSubset + ): HasReject extends True ? Prisma__EmbedHolderClient> : Prisma__EmbedHolderClient | null, null> /** * Find one EmbedHolder that matches the filter or throw an error with \`error.code='P2025'\` @@ -5454,9 +4268,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__EmbedHolderClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow( + args?: SelectSubset + ): Prisma__EmbedHolderClient> /** * Find the first EmbedHolder that matches the filter. @@ -5471,9 +4285,9 @@ export namespace Prisma { * } * }) **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__EmbedHolderClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__EmbedHolderClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + findFirst( + args?: SelectSubset + ): HasReject extends True ? Prisma__EmbedHolderClient> : Prisma__EmbedHolderClient | null, null> /** * Find the first EmbedHolder that matches the filter or @@ -5489,9 +4303,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__EmbedHolderClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow( + args?: SelectSubset + ): Prisma__EmbedHolderClient> /** * Find zero or more EmbedHolders that matches the filter. @@ -5509,9 +4323,9 @@ export namespace Prisma { * const embedHolderWithIdOnly = await prisma.embedHolder.findMany({ select: { id: true } }) * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany( + args?: SelectSubset + ): Prisma.PrismaPromise>> /** * Create a EmbedHolder. @@ -5525,9 +4339,9 @@ export namespace Prisma { * }) * **/ - create>( - args: SelectSubset> - ): Prisma__EmbedHolderClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create( + args: SelectSubset + ): Prisma__EmbedHolderClient> /** * Create many EmbedHolders. @@ -5541,8 +4355,8 @@ export namespace Prisma { * }) * **/ - createMany>( - args?: SelectSubset> + createMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -5557,9 +4371,9 @@ export namespace Prisma { * }) * **/ - delete>( - args: SelectSubset> - ): Prisma__EmbedHolderClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete( + args: SelectSubset + ): Prisma__EmbedHolderClient> /** * Update one EmbedHolder. @@ -5576,9 +4390,9 @@ export namespace Prisma { * }) * **/ - update>( - args: SelectSubset> - ): Prisma__EmbedHolderClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update( + args: SelectSubset + ): Prisma__EmbedHolderClient> /** * Delete zero or more EmbedHolders. @@ -5592,8 +4406,8 @@ export namespace Prisma { * }) * **/ - deleteMany>( - args?: SelectSubset> + deleteMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -5613,8 +4427,8 @@ export namespace Prisma { * }) * **/ - updateMany>( - args: SelectSubset> + updateMany( + args: SelectSubset ): Prisma.PrismaPromise /** @@ -5634,9 +4448,9 @@ export namespace Prisma { * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__EmbedHolderClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert( + args: SelectSubset + ): Prisma__EmbedHolderClient> /** * Find zero or more EmbedHolders that matches the filter. @@ -5681,7 +4495,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> + T extends _Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -5799,7 +4613,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__EmbedHolderClient implements Prisma.PrismaPromise { + export class Prisma__EmbedHolderClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -5814,7 +4628,13 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - User = {}>(args?: Subset>): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>| Null>; + embedList(args?: Subset): Prisma.PrismaPromise>| Null>; + + requiredEmbed(args?: Subset): Prisma__EmbedClient | Null>; + + optionalEmbed(args?: Subset): Prisma__EmbedClient | Null>; + + User(args?: Subset): Prisma.PrismaPromise>| Null>; private get _document(); /** @@ -5846,15 +4666,15 @@ export namespace Prisma { /** * EmbedHolder base type for findUnique actions */ - export type EmbedHolderFindUniqueArgsBase = { + export type EmbedHolderFindUniqueArgsBase = { /** * Select specific fields to fetch from the EmbedHolder */ - select?: EmbedHolderSelect | null + select?: EmbedHolderSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: EmbedHolderInclude | null + include?: EmbedHolderInclude | null /** * Filter, which EmbedHolder to fetch. */ @@ -5864,7 +4684,7 @@ export namespace Prisma { /** * EmbedHolder findUnique */ - export interface EmbedHolderFindUniqueArgs extends EmbedHolderFindUniqueArgsBase { + export interface EmbedHolderFindUniqueArgs extends EmbedHolderFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -5876,15 +4696,15 @@ export namespace Prisma { /** * EmbedHolder findUniqueOrThrow */ - export type EmbedHolderFindUniqueOrThrowArgs = { + export type EmbedHolderFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the EmbedHolder */ - select?: EmbedHolderSelect | null + select?: EmbedHolderSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: EmbedHolderInclude | null + include?: EmbedHolderInclude | null /** * Filter, which EmbedHolder to fetch. */ @@ -5895,15 +4715,15 @@ export namespace Prisma { /** * EmbedHolder base type for findFirst actions */ - export type EmbedHolderFindFirstArgsBase = { + export type EmbedHolderFindFirstArgsBase = { /** * Select specific fields to fetch from the EmbedHolder */ - select?: EmbedHolderSelect | null + select?: EmbedHolderSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: EmbedHolderInclude | null + include?: EmbedHolderInclude | null /** * Filter, which EmbedHolder to fetch. */ @@ -5943,7 +4763,7 @@ export namespace Prisma { /** * EmbedHolder findFirst */ - export interface EmbedHolderFindFirstArgs extends EmbedHolderFindFirstArgsBase { + export interface EmbedHolderFindFirstArgs extends EmbedHolderFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -5955,15 +4775,15 @@ export namespace Prisma { /** * EmbedHolder findFirstOrThrow */ - export type EmbedHolderFindFirstOrThrowArgs = { + export type EmbedHolderFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the EmbedHolder */ - select?: EmbedHolderSelect | null + select?: EmbedHolderSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: EmbedHolderInclude | null + include?: EmbedHolderInclude | null /** * Filter, which EmbedHolder to fetch. */ @@ -6004,15 +4824,15 @@ export namespace Prisma { /** * EmbedHolder findMany */ - export type EmbedHolderFindManyArgs = { + export type EmbedHolderFindManyArgs = { /** * Select specific fields to fetch from the EmbedHolder */ - select?: EmbedHolderSelect | null + select?: EmbedHolderSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: EmbedHolderInclude | null + include?: EmbedHolderInclude | null /** * Filter, which EmbedHolders to fetch. */ @@ -6048,15 +4868,15 @@ export namespace Prisma { /** * EmbedHolder create */ - export type EmbedHolderCreateArgs = { + export type EmbedHolderCreateArgs = { /** * Select specific fields to fetch from the EmbedHolder */ - select?: EmbedHolderSelect | null + select?: EmbedHolderSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: EmbedHolderInclude | null + include?: EmbedHolderInclude | null /** * The data needed to create a EmbedHolder. */ @@ -6067,7 +4887,7 @@ export namespace Prisma { /** * EmbedHolder createMany */ - export type EmbedHolderCreateManyArgs = { + export type EmbedHolderCreateManyArgs = { /** * The data used to create many EmbedHolders. */ @@ -6078,15 +4898,15 @@ export namespace Prisma { /** * EmbedHolder update */ - export type EmbedHolderUpdateArgs = { + export type EmbedHolderUpdateArgs = { /** * Select specific fields to fetch from the EmbedHolder */ - select?: EmbedHolderSelect | null + select?: EmbedHolderSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: EmbedHolderInclude | null + include?: EmbedHolderInclude | null /** * The data needed to update a EmbedHolder. */ @@ -6101,7 +4921,7 @@ export namespace Prisma { /** * EmbedHolder updateMany */ - export type EmbedHolderUpdateManyArgs = { + export type EmbedHolderUpdateManyArgs = { /** * The data used to update EmbedHolders. */ @@ -6116,15 +4936,15 @@ export namespace Prisma { /** * EmbedHolder upsert */ - export type EmbedHolderUpsertArgs = { + export type EmbedHolderUpsertArgs = { /** * Select specific fields to fetch from the EmbedHolder */ - select?: EmbedHolderSelect | null + select?: EmbedHolderSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: EmbedHolderInclude | null + include?: EmbedHolderInclude | null /** * The filter to search for the EmbedHolder to update in case it exists. */ @@ -6143,15 +4963,15 @@ export namespace Prisma { /** * EmbedHolder delete */ - export type EmbedHolderDeleteArgs = { + export type EmbedHolderDeleteArgs = { /** * Select specific fields to fetch from the EmbedHolder */ - select?: EmbedHolderSelect | null + select?: EmbedHolderSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: EmbedHolderInclude | null + include?: EmbedHolderInclude | null /** * Filter which EmbedHolder to delete. */ @@ -6162,7 +4982,7 @@ export namespace Prisma { /** * EmbedHolder deleteMany */ - export type EmbedHolderDeleteManyArgs = { + export type EmbedHolderDeleteManyArgs = { /** * Filter which EmbedHolders to delete */ @@ -6173,7 +4993,7 @@ export namespace Prisma { /** * EmbedHolder findRaw */ - export type EmbedHolderFindRawArgs = { + export type EmbedHolderFindRawArgs = { /** * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. \${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}. */ @@ -6188,7 +5008,7 @@ export namespace Prisma { /** * EmbedHolder aggregateRaw */ - export type EmbedHolderAggregateRawArgs = { + export type EmbedHolderAggregateRawArgs = { /** * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. \${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}. */ @@ -6203,15 +5023,15 @@ export namespace Prisma { /** * EmbedHolder.User */ - export type EmbedHolder$UserArgs = { + export type EmbedHolder$UserArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null where?: UserWhereInput orderBy?: Enumerable cursor?: UserWhereUniqueInput @@ -6224,15 +5044,15 @@ export namespace Prisma { /** * EmbedHolder without action */ - export type EmbedHolderArgs = { + export type EmbedHolderArgs = { /** * Select specific fields to fetch from the EmbedHolder */ - select?: EmbedHolderSelect | null + select?: EmbedHolderSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: EmbedHolderInclude | null + include?: EmbedHolderInclude | null } @@ -6371,7 +5191,7 @@ export namespace Prisma { _all?: true } - export type MAggregateArgs = { + export type MAggregateArgs = { /** * Filter which M to aggregate. */ @@ -6443,7 +5263,7 @@ export namespace Prisma { - export type MGroupByArgs = { + export type MGroupByArgs = { where?: MWhereInput orderBy?: Enumerable by: MScalarFieldEnum[] @@ -6494,26 +5314,7 @@ export namespace Prisma { > - export type MSelect = $Extensions.GetSelect<{ - id?: boolean - n_ids?: boolean - int?: boolean - optionalInt?: boolean - float?: boolean - optionalFloat?: boolean - string?: boolean - optionalString?: boolean - json?: boolean - optionalJson?: boolean - enum?: boolean - optionalEnum?: boolean - boolean?: boolean - optionalBoolean?: boolean - n?: boolean | M$nArgs - _count?: boolean | MCountOutputTypeArgs - }, ExtArgs["result"]["m"]> - - export type MSelectScalar = { + export type MSelect = { id?: boolean n_ids?: boolean int?: boolean @@ -6528,23 +5329,42 @@ export namespace Prisma { optionalEnum?: boolean boolean?: boolean optionalBoolean?: boolean + n?: boolean | M$nArgs + _count?: boolean | MCountOutputTypeArgs } - export type MInclude = { - n?: boolean | M$nArgs - _count?: boolean | MCountOutputTypeArgs + + export type MInclude = { + n?: boolean | M$nArgs + _count?: boolean | MCountOutputTypeArgs } + export type MGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? M : + S extends undefined ? never : + S extends { include: any } & (MArgs | MFindManyArgs) + ? M & { + [P in TruthyKeys]: + P extends 'n' ? Array < NGetPayload> : + P extends '_count' ? MCountOutputTypeGetPayload : never + } + : S extends { select: any } & (MArgs | MFindManyArgs) + ? { + [P in TruthyKeys]: + P extends 'n' ? Array < NGetPayload> : + P extends '_count' ? MCountOutputTypeGetPayload : P extends keyof M ? M[P] : never + } + : M - type MGetPayload = $Types.GetResult - type MCountArgs = + type MCountArgs = Omit & { select?: MCountAggregateInputType | true } - export interface MDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['M'], meta: { name: 'M' } } + export interface MDelegate { + /** * Find zero or one M that matches the filter. * @param {MFindUniqueArgs} args - Arguments to find a M @@ -6556,9 +5376,9 @@ export namespace Prisma { * } * }) **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__MClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__MClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + findUnique( + args: SelectSubset + ): HasReject extends True ? Prisma__MClient> : Prisma__MClient | null, null> /** * Find one M that matches the filter or throw an error with \`error.code='P2025'\` @@ -6572,9 +5392,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__MClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow( + args?: SelectSubset + ): Prisma__MClient> /** * Find the first M that matches the filter. @@ -6589,9 +5409,9 @@ export namespace Prisma { * } * }) **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__MClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__MClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + findFirst( + args?: SelectSubset + ): HasReject extends True ? Prisma__MClient> : Prisma__MClient | null, null> /** * Find the first M that matches the filter or @@ -6607,9 +5427,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__MClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow( + args?: SelectSubset + ): Prisma__MClient> /** * Find zero or more Ms that matches the filter. @@ -6627,9 +5447,9 @@ export namespace Prisma { * const mWithIdOnly = await prisma.m.findMany({ select: { id: true } }) * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany( + args?: SelectSubset + ): Prisma.PrismaPromise>> /** * Create a M. @@ -6643,9 +5463,9 @@ export namespace Prisma { * }) * **/ - create>( - args: SelectSubset> - ): Prisma__MClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create( + args: SelectSubset + ): Prisma__MClient> /** * Create many Ms. @@ -6659,8 +5479,8 @@ export namespace Prisma { * }) * **/ - createMany>( - args?: SelectSubset> + createMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -6675,9 +5495,9 @@ export namespace Prisma { * }) * **/ - delete>( - args: SelectSubset> - ): Prisma__MClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete( + args: SelectSubset + ): Prisma__MClient> /** * Update one M. @@ -6694,9 +5514,9 @@ export namespace Prisma { * }) * **/ - update>( - args: SelectSubset> - ): Prisma__MClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update( + args: SelectSubset + ): Prisma__MClient> /** * Delete zero or more Ms. @@ -6710,8 +5530,8 @@ export namespace Prisma { * }) * **/ - deleteMany>( - args?: SelectSubset> + deleteMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -6731,8 +5551,8 @@ export namespace Prisma { * }) * **/ - updateMany>( - args: SelectSubset> + updateMany( + args: SelectSubset ): Prisma.PrismaPromise /** @@ -6752,9 +5572,9 @@ export namespace Prisma { * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__MClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert( + args: SelectSubset + ): Prisma__MClient> /** * Find zero or more Ms that matches the filter. @@ -6799,7 +5619,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> + T extends _Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -6917,7 +5737,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__MClient implements Prisma.PrismaPromise { + export class Prisma__MClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -6932,7 +5752,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - n = {}>(args?: Subset>): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>| Null>; + n(args?: Subset): Prisma.PrismaPromise>| Null>; private get _document(); /** @@ -6964,15 +5784,15 @@ export namespace Prisma { /** * M base type for findUnique actions */ - export type MFindUniqueArgsBase = { + export type MFindUniqueArgsBase = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * Filter, which M to fetch. */ @@ -6982,7 +5802,7 @@ export namespace Prisma { /** * M findUnique */ - export interface MFindUniqueArgs extends MFindUniqueArgsBase { + export interface MFindUniqueArgs extends MFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -6994,15 +5814,15 @@ export namespace Prisma { /** * M findUniqueOrThrow */ - export type MFindUniqueOrThrowArgs = { + export type MFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * Filter, which M to fetch. */ @@ -7013,15 +5833,15 @@ export namespace Prisma { /** * M base type for findFirst actions */ - export type MFindFirstArgsBase = { + export type MFindFirstArgsBase = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * Filter, which M to fetch. */ @@ -7061,7 +5881,7 @@ export namespace Prisma { /** * M findFirst */ - export interface MFindFirstArgs extends MFindFirstArgsBase { + export interface MFindFirstArgs extends MFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -7073,15 +5893,15 @@ export namespace Prisma { /** * M findFirstOrThrow */ - export type MFindFirstOrThrowArgs = { + export type MFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * Filter, which M to fetch. */ @@ -7122,15 +5942,15 @@ export namespace Prisma { /** * M findMany */ - export type MFindManyArgs = { + export type MFindManyArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * Filter, which MS to fetch. */ @@ -7166,15 +5986,15 @@ export namespace Prisma { /** * M create */ - export type MCreateArgs = { + export type MCreateArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * The data needed to create a M. */ @@ -7185,7 +6005,7 @@ export namespace Prisma { /** * M createMany */ - export type MCreateManyArgs = { + export type MCreateManyArgs = { /** * The data used to create many MS. */ @@ -7196,15 +6016,15 @@ export namespace Prisma { /** * M update */ - export type MUpdateArgs = { + export type MUpdateArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * The data needed to update a M. */ @@ -7219,7 +6039,7 @@ export namespace Prisma { /** * M updateMany */ - export type MUpdateManyArgs = { + export type MUpdateManyArgs = { /** * The data used to update MS. */ @@ -7234,15 +6054,15 @@ export namespace Prisma { /** * M upsert */ - export type MUpsertArgs = { + export type MUpsertArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * The filter to search for the M to update in case it exists. */ @@ -7261,15 +6081,15 @@ export namespace Prisma { /** * M delete */ - export type MDeleteArgs = { + export type MDeleteArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * Filter which M to delete. */ @@ -7280,7 +6100,7 @@ export namespace Prisma { /** * M deleteMany */ - export type MDeleteManyArgs = { + export type MDeleteManyArgs = { /** * Filter which MS to delete */ @@ -7291,7 +6111,7 @@ export namespace Prisma { /** * M findRaw */ - export type MFindRawArgs = { + export type MFindRawArgs = { /** * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. \${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}. */ @@ -7306,7 +6126,7 @@ export namespace Prisma { /** * M aggregateRaw */ - export type MAggregateRawArgs = { + export type MAggregateRawArgs = { /** * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. \${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}. */ @@ -7321,15 +6141,15 @@ export namespace Prisma { /** * M.n */ - export type M$nArgs = { + export type M$nArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null where?: NWhereInput orderBy?: Enumerable cursor?: NWhereUniqueInput @@ -7342,15 +6162,15 @@ export namespace Prisma { /** * M without action */ - export type MArgs = { + export type MArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null } @@ -7489,7 +6309,7 @@ export namespace Prisma { _all?: true } - export type NAggregateArgs = { + export type NAggregateArgs = { /** * Filter which N to aggregate. */ @@ -7561,7 +6381,7 @@ export namespace Prisma { - export type NGroupByArgs = { + export type NGroupByArgs = { where?: NWhereInput orderBy?: Enumerable by: NScalarFieldEnum[] @@ -7612,26 +6432,7 @@ export namespace Prisma { > - export type NSelect = $Extensions.GetSelect<{ - id?: boolean - m_ids?: boolean - int?: boolean - optionalInt?: boolean - float?: boolean - optionalFloat?: boolean - string?: boolean - optionalString?: boolean - json?: boolean - optionalJson?: boolean - enum?: boolean - optionalEnum?: boolean - boolean?: boolean - optionalBoolean?: boolean - m?: boolean | N$mArgs - _count?: boolean | NCountOutputTypeArgs - }, ExtArgs["result"]["n"]> - - export type NSelectScalar = { + export type NSelect = { id?: boolean m_ids?: boolean int?: boolean @@ -7646,23 +6447,42 @@ export namespace Prisma { optionalEnum?: boolean boolean?: boolean optionalBoolean?: boolean + m?: boolean | N$mArgs + _count?: boolean | NCountOutputTypeArgs } - export type NInclude = { - m?: boolean | N$mArgs - _count?: boolean | NCountOutputTypeArgs + + export type NInclude = { + m?: boolean | N$mArgs + _count?: boolean | NCountOutputTypeArgs } + export type NGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? N : + S extends undefined ? never : + S extends { include: any } & (NArgs | NFindManyArgs) + ? N & { + [P in TruthyKeys]: + P extends 'm' ? Array < MGetPayload> : + P extends '_count' ? NCountOutputTypeGetPayload : never + } + : S extends { select: any } & (NArgs | NFindManyArgs) + ? { + [P in TruthyKeys]: + P extends 'm' ? Array < MGetPayload> : + P extends '_count' ? NCountOutputTypeGetPayload : P extends keyof N ? N[P] : never + } + : N - type NGetPayload = $Types.GetResult - type NCountArgs = + type NCountArgs = Omit & { select?: NCountAggregateInputType | true } - export interface NDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['N'], meta: { name: 'N' } } + export interface NDelegate { + /** * Find zero or one N that matches the filter. * @param {NFindUniqueArgs} args - Arguments to find a N @@ -7674,9 +6494,9 @@ export namespace Prisma { * } * }) **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__NClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__NClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + findUnique( + args: SelectSubset + ): HasReject extends True ? Prisma__NClient> : Prisma__NClient | null, null> /** * Find one N that matches the filter or throw an error with \`error.code='P2025'\` @@ -7690,9 +6510,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__NClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow( + args?: SelectSubset + ): Prisma__NClient> /** * Find the first N that matches the filter. @@ -7707,9 +6527,9 @@ export namespace Prisma { * } * }) **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__NClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__NClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + findFirst( + args?: SelectSubset + ): HasReject extends True ? Prisma__NClient> : Prisma__NClient | null, null> /** * Find the first N that matches the filter or @@ -7725,9 +6545,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__NClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow( + args?: SelectSubset + ): Prisma__NClient> /** * Find zero or more Ns that matches the filter. @@ -7745,9 +6565,9 @@ export namespace Prisma { * const nWithIdOnly = await prisma.n.findMany({ select: { id: true } }) * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany( + args?: SelectSubset + ): Prisma.PrismaPromise>> /** * Create a N. @@ -7761,9 +6581,9 @@ export namespace Prisma { * }) * **/ - create>( - args: SelectSubset> - ): Prisma__NClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create( + args: SelectSubset + ): Prisma__NClient> /** * Create many Ns. @@ -7777,8 +6597,8 @@ export namespace Prisma { * }) * **/ - createMany>( - args?: SelectSubset> + createMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -7793,9 +6613,9 @@ export namespace Prisma { * }) * **/ - delete>( - args: SelectSubset> - ): Prisma__NClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete( + args: SelectSubset + ): Prisma__NClient> /** * Update one N. @@ -7812,9 +6632,9 @@ export namespace Prisma { * }) * **/ - update>( - args: SelectSubset> - ): Prisma__NClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update( + args: SelectSubset + ): Prisma__NClient> /** * Delete zero or more Ns. @@ -7828,8 +6648,8 @@ export namespace Prisma { * }) * **/ - deleteMany>( - args?: SelectSubset> + deleteMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -7849,8 +6669,8 @@ export namespace Prisma { * }) * **/ - updateMany>( - args: SelectSubset> + updateMany( + args: SelectSubset ): Prisma.PrismaPromise /** @@ -7870,9 +6690,9 @@ export namespace Prisma { * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__NClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert( + args: SelectSubset + ): Prisma__NClient> /** * Find zero or more Ns that matches the filter. @@ -7917,7 +6737,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> + T extends _Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -8035,7 +6855,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__NClient implements Prisma.PrismaPromise { + export class Prisma__NClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -8050,7 +6870,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - m = {}>(args?: Subset>): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>| Null>; + m(args?: Subset): Prisma.PrismaPromise>| Null>; private get _document(); /** @@ -8082,15 +6902,15 @@ export namespace Prisma { /** * N base type for findUnique actions */ - export type NFindUniqueArgsBase = { + export type NFindUniqueArgsBase = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * Filter, which N to fetch. */ @@ -8100,7 +6920,7 @@ export namespace Prisma { /** * N findUnique */ - export interface NFindUniqueArgs extends NFindUniqueArgsBase { + export interface NFindUniqueArgs extends NFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -8112,15 +6932,15 @@ export namespace Prisma { /** * N findUniqueOrThrow */ - export type NFindUniqueOrThrowArgs = { + export type NFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * Filter, which N to fetch. */ @@ -8131,15 +6951,15 @@ export namespace Prisma { /** * N base type for findFirst actions */ - export type NFindFirstArgsBase = { + export type NFindFirstArgsBase = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * Filter, which N to fetch. */ @@ -8179,7 +6999,7 @@ export namespace Prisma { /** * N findFirst */ - export interface NFindFirstArgs extends NFindFirstArgsBase { + export interface NFindFirstArgs extends NFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -8191,15 +7011,15 @@ export namespace Prisma { /** * N findFirstOrThrow */ - export type NFindFirstOrThrowArgs = { + export type NFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * Filter, which N to fetch. */ @@ -8240,15 +7060,15 @@ export namespace Prisma { /** * N findMany */ - export type NFindManyArgs = { + export type NFindManyArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * Filter, which NS to fetch. */ @@ -8284,15 +7104,15 @@ export namespace Prisma { /** * N create */ - export type NCreateArgs = { + export type NCreateArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * The data needed to create a N. */ @@ -8303,7 +7123,7 @@ export namespace Prisma { /** * N createMany */ - export type NCreateManyArgs = { + export type NCreateManyArgs = { /** * The data used to create many NS. */ @@ -8314,15 +7134,15 @@ export namespace Prisma { /** * N update */ - export type NUpdateArgs = { + export type NUpdateArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * The data needed to update a N. */ @@ -8337,7 +7157,7 @@ export namespace Prisma { /** * N updateMany */ - export type NUpdateManyArgs = { + export type NUpdateManyArgs = { /** * The data used to update NS. */ @@ -8352,15 +7172,15 @@ export namespace Prisma { /** * N upsert */ - export type NUpsertArgs = { + export type NUpsertArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * The filter to search for the N to update in case it exists. */ @@ -8379,15 +7199,15 @@ export namespace Prisma { /** * N delete */ - export type NDeleteArgs = { + export type NDeleteArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * Filter which N to delete. */ @@ -8398,7 +7218,7 @@ export namespace Prisma { /** * N deleteMany */ - export type NDeleteManyArgs = { + export type NDeleteManyArgs = { /** * Filter which NS to delete */ @@ -8409,7 +7229,7 @@ export namespace Prisma { /** * N findRaw */ - export type NFindRawArgs = { + export type NFindRawArgs = { /** * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. \${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}. */ @@ -8424,7 +7244,7 @@ export namespace Prisma { /** * N aggregateRaw */ - export type NAggregateRawArgs = { + export type NAggregateRawArgs = { /** * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. \${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}. */ @@ -8439,15 +7259,15 @@ export namespace Prisma { /** * N.m */ - export type N$mArgs = { + export type N$mArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null where?: MWhereInput orderBy?: Enumerable cursor?: MWhereUniqueInput @@ -8460,15 +7280,15 @@ export namespace Prisma { /** * N without action */ - export type NArgs = { + export type NArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null } @@ -8605,7 +7425,7 @@ export namespace Prisma { _all?: true } - export type OneOptionalAggregateArgs = { + export type OneOptionalAggregateArgs = { /** * Filter which OneOptional to aggregate. */ @@ -8677,7 +7497,7 @@ export namespace Prisma { - export type OneOptionalGroupByArgs = { + export type OneOptionalGroupByArgs = { where?: OneOptionalWhereInput orderBy?: Enumerable by: OneOptionalScalarFieldEnum[] @@ -8727,25 +7547,7 @@ export namespace Prisma { > - export type OneOptionalSelect = $Extensions.GetSelect<{ - id?: boolean - int?: boolean - optionalInt?: boolean - float?: boolean - optionalFloat?: boolean - string?: boolean - optionalString?: boolean - json?: boolean - optionalJson?: boolean - enum?: boolean - optionalEnum?: boolean - boolean?: boolean - optionalBoolean?: boolean - many?: boolean | OneOptional$manyArgs - _count?: boolean | OneOptionalCountOutputTypeArgs - }, ExtArgs["result"]["oneOptional"]> - - export type OneOptionalSelectScalar = { + export type OneOptionalSelect = { id?: boolean int?: boolean optionalInt?: boolean @@ -8759,23 +7561,42 @@ export namespace Prisma { optionalEnum?: boolean boolean?: boolean optionalBoolean?: boolean + many?: boolean | OneOptional$manyArgs + _count?: boolean | OneOptionalCountOutputTypeArgs } - export type OneOptionalInclude = { - many?: boolean | OneOptional$manyArgs - _count?: boolean | OneOptionalCountOutputTypeArgs + + export type OneOptionalInclude = { + many?: boolean | OneOptional$manyArgs + _count?: boolean | OneOptionalCountOutputTypeArgs } + export type OneOptionalGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? OneOptional : + S extends undefined ? never : + S extends { include: any } & (OneOptionalArgs | OneOptionalFindManyArgs) + ? OneOptional & { + [P in TruthyKeys]: + P extends 'many' ? Array < ManyRequiredGetPayload> : + P extends '_count' ? OneOptionalCountOutputTypeGetPayload : never + } + : S extends { select: any } & (OneOptionalArgs | OneOptionalFindManyArgs) + ? { + [P in TruthyKeys]: + P extends 'many' ? Array < ManyRequiredGetPayload> : + P extends '_count' ? OneOptionalCountOutputTypeGetPayload : P extends keyof OneOptional ? OneOptional[P] : never + } + : OneOptional - type OneOptionalGetPayload = $Types.GetResult - type OneOptionalCountArgs = + type OneOptionalCountArgs = Omit & { select?: OneOptionalCountAggregateInputType | true } - export interface OneOptionalDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['OneOptional'], meta: { name: 'OneOptional' } } + export interface OneOptionalDelegate { + /** * Find zero or one OneOptional that matches the filter. * @param {OneOptionalFindUniqueArgs} args - Arguments to find a OneOptional @@ -8787,9 +7608,9 @@ export namespace Prisma { * } * }) **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__OneOptionalClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__OneOptionalClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + findUnique( + args: SelectSubset + ): HasReject extends True ? Prisma__OneOptionalClient> : Prisma__OneOptionalClient | null, null> /** * Find one OneOptional that matches the filter or throw an error with \`error.code='P2025'\` @@ -8803,9 +7624,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__OneOptionalClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow( + args?: SelectSubset + ): Prisma__OneOptionalClient> /** * Find the first OneOptional that matches the filter. @@ -8820,9 +7641,9 @@ export namespace Prisma { * } * }) **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__OneOptionalClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__OneOptionalClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + findFirst( + args?: SelectSubset + ): HasReject extends True ? Prisma__OneOptionalClient> : Prisma__OneOptionalClient | null, null> /** * Find the first OneOptional that matches the filter or @@ -8838,9 +7659,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__OneOptionalClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow( + args?: SelectSubset + ): Prisma__OneOptionalClient> /** * Find zero or more OneOptionals that matches the filter. @@ -8858,9 +7679,9 @@ export namespace Prisma { * const oneOptionalWithIdOnly = await prisma.oneOptional.findMany({ select: { id: true } }) * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany( + args?: SelectSubset + ): Prisma.PrismaPromise>> /** * Create a OneOptional. @@ -8874,9 +7695,9 @@ export namespace Prisma { * }) * **/ - create>( - args: SelectSubset> - ): Prisma__OneOptionalClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create( + args: SelectSubset + ): Prisma__OneOptionalClient> /** * Create many OneOptionals. @@ -8890,8 +7711,8 @@ export namespace Prisma { * }) * **/ - createMany>( - args?: SelectSubset> + createMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -8906,9 +7727,9 @@ export namespace Prisma { * }) * **/ - delete>( - args: SelectSubset> - ): Prisma__OneOptionalClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete( + args: SelectSubset + ): Prisma__OneOptionalClient> /** * Update one OneOptional. @@ -8925,9 +7746,9 @@ export namespace Prisma { * }) * **/ - update>( - args: SelectSubset> - ): Prisma__OneOptionalClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update( + args: SelectSubset + ): Prisma__OneOptionalClient> /** * Delete zero or more OneOptionals. @@ -8941,8 +7762,8 @@ export namespace Prisma { * }) * **/ - deleteMany>( - args?: SelectSubset> + deleteMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -8962,8 +7783,8 @@ export namespace Prisma { * }) * **/ - updateMany>( - args: SelectSubset> + updateMany( + args: SelectSubset ): Prisma.PrismaPromise /** @@ -8983,9 +7804,9 @@ export namespace Prisma { * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__OneOptionalClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert( + args: SelectSubset + ): Prisma__OneOptionalClient> /** * Find zero or more OneOptionals that matches the filter. @@ -9030,7 +7851,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> + T extends _Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -9148,7 +7969,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__OneOptionalClient implements Prisma.PrismaPromise { + export class Prisma__OneOptionalClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -9163,7 +7984,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - many = {}>(args?: Subset>): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>| Null>; + many(args?: Subset): Prisma.PrismaPromise>| Null>; private get _document(); /** @@ -9195,15 +8016,15 @@ export namespace Prisma { /** * OneOptional base type for findUnique actions */ - export type OneOptionalFindUniqueArgsBase = { + export type OneOptionalFindUniqueArgsBase = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * Filter, which OneOptional to fetch. */ @@ -9213,7 +8034,7 @@ export namespace Prisma { /** * OneOptional findUnique */ - export interface OneOptionalFindUniqueArgs extends OneOptionalFindUniqueArgsBase { + export interface OneOptionalFindUniqueArgs extends OneOptionalFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -9225,15 +8046,15 @@ export namespace Prisma { /** * OneOptional findUniqueOrThrow */ - export type OneOptionalFindUniqueOrThrowArgs = { + export type OneOptionalFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * Filter, which OneOptional to fetch. */ @@ -9244,15 +8065,15 @@ export namespace Prisma { /** * OneOptional base type for findFirst actions */ - export type OneOptionalFindFirstArgsBase = { + export type OneOptionalFindFirstArgsBase = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * Filter, which OneOptional to fetch. */ @@ -9292,7 +8113,7 @@ export namespace Prisma { /** * OneOptional findFirst */ - export interface OneOptionalFindFirstArgs extends OneOptionalFindFirstArgsBase { + export interface OneOptionalFindFirstArgs extends OneOptionalFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -9304,15 +8125,15 @@ export namespace Prisma { /** * OneOptional findFirstOrThrow */ - export type OneOptionalFindFirstOrThrowArgs = { + export type OneOptionalFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * Filter, which OneOptional to fetch. */ @@ -9353,15 +8174,15 @@ export namespace Prisma { /** * OneOptional findMany */ - export type OneOptionalFindManyArgs = { + export type OneOptionalFindManyArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * Filter, which OneOptionals to fetch. */ @@ -9397,15 +8218,15 @@ export namespace Prisma { /** * OneOptional create */ - export type OneOptionalCreateArgs = { + export type OneOptionalCreateArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * The data needed to create a OneOptional. */ @@ -9416,7 +8237,7 @@ export namespace Prisma { /** * OneOptional createMany */ - export type OneOptionalCreateManyArgs = { + export type OneOptionalCreateManyArgs = { /** * The data used to create many OneOptionals. */ @@ -9427,15 +8248,15 @@ export namespace Prisma { /** * OneOptional update */ - export type OneOptionalUpdateArgs = { + export type OneOptionalUpdateArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * The data needed to update a OneOptional. */ @@ -9450,7 +8271,7 @@ export namespace Prisma { /** * OneOptional updateMany */ - export type OneOptionalUpdateManyArgs = { + export type OneOptionalUpdateManyArgs = { /** * The data used to update OneOptionals. */ @@ -9465,15 +8286,15 @@ export namespace Prisma { /** * OneOptional upsert */ - export type OneOptionalUpsertArgs = { + export type OneOptionalUpsertArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * The filter to search for the OneOptional to update in case it exists. */ @@ -9492,15 +8313,15 @@ export namespace Prisma { /** * OneOptional delete */ - export type OneOptionalDeleteArgs = { + export type OneOptionalDeleteArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * Filter which OneOptional to delete. */ @@ -9511,7 +8332,7 @@ export namespace Prisma { /** * OneOptional deleteMany */ - export type OneOptionalDeleteManyArgs = { + export type OneOptionalDeleteManyArgs = { /** * Filter which OneOptionals to delete */ @@ -9522,7 +8343,7 @@ export namespace Prisma { /** * OneOptional findRaw */ - export type OneOptionalFindRawArgs = { + export type OneOptionalFindRawArgs = { /** * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. \${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}. */ @@ -9537,7 +8358,7 @@ export namespace Prisma { /** * OneOptional aggregateRaw */ - export type OneOptionalAggregateRawArgs = { + export type OneOptionalAggregateRawArgs = { /** * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. \${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}. */ @@ -9552,15 +8373,15 @@ export namespace Prisma { /** * OneOptional.many */ - export type OneOptional$manyArgs = { + export type OneOptional$manyArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null where?: ManyRequiredWhereInput orderBy?: Enumerable cursor?: ManyRequiredWhereUniqueInput @@ -9573,15 +8394,15 @@ export namespace Prisma { /** * OneOptional without action */ - export type OneOptionalArgs = { + export type OneOptionalArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null } @@ -9724,7 +8545,7 @@ export namespace Prisma { _all?: true } - export type ManyRequiredAggregateArgs = { + export type ManyRequiredAggregateArgs = { /** * Filter which ManyRequired to aggregate. */ @@ -9796,7 +8617,7 @@ export namespace Prisma { - export type ManyRequiredGroupByArgs = { + export type ManyRequiredGroupByArgs = { where?: ManyRequiredWhereInput orderBy?: Enumerable by: ManyRequiredScalarFieldEnum[] @@ -9837,35 +8658,17 @@ export namespace Prisma { Array< PickArray & { - [P in ((keyof T) & (keyof ManyRequiredGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type ManyRequiredSelect = $Extensions.GetSelect<{ - id?: boolean - oneOptionalId?: boolean - int?: boolean - optionalInt?: boolean - float?: boolean - optionalFloat?: boolean - string?: boolean - optionalString?: boolean - json?: boolean - optionalJson?: boolean - enum?: boolean - optionalEnum?: boolean - boolean?: boolean - optionalBoolean?: boolean - one?: boolean | OneOptionalArgs - }, ExtArgs["result"]["manyRequired"]> + [P in ((keyof T) & (keyof ManyRequiredGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > - export type ManyRequiredSelectScalar = { + + export type ManyRequiredSelect = { id?: boolean oneOptionalId?: boolean int?: boolean @@ -9880,22 +8683,38 @@ export namespace Prisma { optionalEnum?: boolean boolean?: boolean optionalBoolean?: boolean + one?: boolean | OneOptionalArgs } - export type ManyRequiredInclude = { - one?: boolean | OneOptionalArgs + + export type ManyRequiredInclude = { + one?: boolean | OneOptionalArgs } + export type ManyRequiredGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? ManyRequired : + S extends undefined ? never : + S extends { include: any } & (ManyRequiredArgs | ManyRequiredFindManyArgs) + ? ManyRequired & { + [P in TruthyKeys]: + P extends 'one' ? OneOptionalGetPayload | null : never + } + : S extends { select: any } & (ManyRequiredArgs | ManyRequiredFindManyArgs) + ? { + [P in TruthyKeys]: + P extends 'one' ? OneOptionalGetPayload | null : P extends keyof ManyRequired ? ManyRequired[P] : never + } + : ManyRequired - type ManyRequiredGetPayload = $Types.GetResult - type ManyRequiredCountArgs = + type ManyRequiredCountArgs = Omit & { select?: ManyRequiredCountAggregateInputType | true } - export interface ManyRequiredDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['ManyRequired'], meta: { name: 'ManyRequired' } } + export interface ManyRequiredDelegate { + /** * Find zero or one ManyRequired that matches the filter. * @param {ManyRequiredFindUniqueArgs} args - Arguments to find a ManyRequired @@ -9907,9 +8726,9 @@ export namespace Prisma { * } * }) **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__ManyRequiredClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__ManyRequiredClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + findUnique( + args: SelectSubset + ): HasReject extends True ? Prisma__ManyRequiredClient> : Prisma__ManyRequiredClient | null, null> /** * Find one ManyRequired that matches the filter or throw an error with \`error.code='P2025'\` @@ -9923,9 +8742,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__ManyRequiredClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow( + args?: SelectSubset + ): Prisma__ManyRequiredClient> /** * Find the first ManyRequired that matches the filter. @@ -9940,9 +8759,9 @@ export namespace Prisma { * } * }) **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__ManyRequiredClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__ManyRequiredClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + findFirst( + args?: SelectSubset + ): HasReject extends True ? Prisma__ManyRequiredClient> : Prisma__ManyRequiredClient | null, null> /** * Find the first ManyRequired that matches the filter or @@ -9958,9 +8777,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__ManyRequiredClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow( + args?: SelectSubset + ): Prisma__ManyRequiredClient> /** * Find zero or more ManyRequireds that matches the filter. @@ -9978,9 +8797,9 @@ export namespace Prisma { * const manyRequiredWithIdOnly = await prisma.manyRequired.findMany({ select: { id: true } }) * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany( + args?: SelectSubset + ): Prisma.PrismaPromise>> /** * Create a ManyRequired. @@ -9994,9 +8813,9 @@ export namespace Prisma { * }) * **/ - create>( - args: SelectSubset> - ): Prisma__ManyRequiredClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create( + args: SelectSubset + ): Prisma__ManyRequiredClient> /** * Create many ManyRequireds. @@ -10010,8 +8829,8 @@ export namespace Prisma { * }) * **/ - createMany>( - args?: SelectSubset> + createMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -10026,9 +8845,9 @@ export namespace Prisma { * }) * **/ - delete>( - args: SelectSubset> - ): Prisma__ManyRequiredClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete( + args: SelectSubset + ): Prisma__ManyRequiredClient> /** * Update one ManyRequired. @@ -10045,9 +8864,9 @@ export namespace Prisma { * }) * **/ - update>( - args: SelectSubset> - ): Prisma__ManyRequiredClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update( + args: SelectSubset + ): Prisma__ManyRequiredClient> /** * Delete zero or more ManyRequireds. @@ -10061,8 +8880,8 @@ export namespace Prisma { * }) * **/ - deleteMany>( - args?: SelectSubset> + deleteMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -10082,8 +8901,8 @@ export namespace Prisma { * }) * **/ - updateMany>( - args: SelectSubset> + updateMany( + args: SelectSubset ): Prisma.PrismaPromise /** @@ -10103,9 +8922,9 @@ export namespace Prisma { * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__ManyRequiredClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert( + args: SelectSubset + ): Prisma__ManyRequiredClient> /** * Find zero or more ManyRequireds that matches the filter. @@ -10150,7 +8969,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> + T extends _Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -10268,7 +9087,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__ManyRequiredClient implements Prisma.PrismaPromise { + export class Prisma__ManyRequiredClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -10283,7 +9102,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - one = {}>(args?: Subset>): Prisma__OneOptionalClient<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; + one(args?: Subset): Prisma__OneOptionalClient | Null>; private get _document(); /** @@ -10315,15 +9134,15 @@ export namespace Prisma { /** * ManyRequired base type for findUnique actions */ - export type ManyRequiredFindUniqueArgsBase = { + export type ManyRequiredFindUniqueArgsBase = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * Filter, which ManyRequired to fetch. */ @@ -10333,7 +9152,7 @@ export namespace Prisma { /** * ManyRequired findUnique */ - export interface ManyRequiredFindUniqueArgs extends ManyRequiredFindUniqueArgsBase { + export interface ManyRequiredFindUniqueArgs extends ManyRequiredFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -10345,15 +9164,15 @@ export namespace Prisma { /** * ManyRequired findUniqueOrThrow */ - export type ManyRequiredFindUniqueOrThrowArgs = { + export type ManyRequiredFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * Filter, which ManyRequired to fetch. */ @@ -10364,15 +9183,15 @@ export namespace Prisma { /** * ManyRequired base type for findFirst actions */ - export type ManyRequiredFindFirstArgsBase = { + export type ManyRequiredFindFirstArgsBase = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * Filter, which ManyRequired to fetch. */ @@ -10412,7 +9231,7 @@ export namespace Prisma { /** * ManyRequired findFirst */ - export interface ManyRequiredFindFirstArgs extends ManyRequiredFindFirstArgsBase { + export interface ManyRequiredFindFirstArgs extends ManyRequiredFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -10424,15 +9243,15 @@ export namespace Prisma { /** * ManyRequired findFirstOrThrow */ - export type ManyRequiredFindFirstOrThrowArgs = { + export type ManyRequiredFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * Filter, which ManyRequired to fetch. */ @@ -10473,15 +9292,15 @@ export namespace Prisma { /** * ManyRequired findMany */ - export type ManyRequiredFindManyArgs = { + export type ManyRequiredFindManyArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * Filter, which ManyRequireds to fetch. */ @@ -10517,15 +9336,15 @@ export namespace Prisma { /** * ManyRequired create */ - export type ManyRequiredCreateArgs = { + export type ManyRequiredCreateArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * The data needed to create a ManyRequired. */ @@ -10536,7 +9355,7 @@ export namespace Prisma { /** * ManyRequired createMany */ - export type ManyRequiredCreateManyArgs = { + export type ManyRequiredCreateManyArgs = { /** * The data used to create many ManyRequireds. */ @@ -10547,15 +9366,15 @@ export namespace Prisma { /** * ManyRequired update */ - export type ManyRequiredUpdateArgs = { + export type ManyRequiredUpdateArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * The data needed to update a ManyRequired. */ @@ -10570,7 +9389,7 @@ export namespace Prisma { /** * ManyRequired updateMany */ - export type ManyRequiredUpdateManyArgs = { + export type ManyRequiredUpdateManyArgs = { /** * The data used to update ManyRequireds. */ @@ -10585,15 +9404,15 @@ export namespace Prisma { /** * ManyRequired upsert */ - export type ManyRequiredUpsertArgs = { + export type ManyRequiredUpsertArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * The filter to search for the ManyRequired to update in case it exists. */ @@ -10612,15 +9431,15 @@ export namespace Prisma { /** * ManyRequired delete */ - export type ManyRequiredDeleteArgs = { + export type ManyRequiredDeleteArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * Filter which ManyRequired to delete. */ @@ -10631,7 +9450,7 @@ export namespace Prisma { /** * ManyRequired deleteMany */ - export type ManyRequiredDeleteManyArgs = { + export type ManyRequiredDeleteManyArgs = { /** * Filter which ManyRequireds to delete */ @@ -10642,7 +9461,7 @@ export namespace Prisma { /** * ManyRequired findRaw */ - export type ManyRequiredFindRawArgs = { + export type ManyRequiredFindRawArgs = { /** * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. \${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}. */ @@ -10657,7 +9476,7 @@ export namespace Prisma { /** * ManyRequired aggregateRaw */ - export type ManyRequiredAggregateRawArgs = { + export type ManyRequiredAggregateRawArgs = { /** * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. \${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}. */ @@ -10672,15 +9491,15 @@ export namespace Prisma { /** * ManyRequired without action */ - export type ManyRequiredArgs = { + export type ManyRequiredArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null } @@ -10823,7 +9642,7 @@ export namespace Prisma { _all?: true } - export type OptionalSide1AggregateArgs = { + export type OptionalSide1AggregateArgs = { /** * Filter which OptionalSide1 to aggregate. */ @@ -10895,7 +9714,7 @@ export namespace Prisma { - export type OptionalSide1GroupByArgs = { + export type OptionalSide1GroupByArgs = { where?: OptionalSide1WhereInput orderBy?: Enumerable by: OptionalSide1ScalarFieldEnum[] @@ -10946,25 +9765,7 @@ export namespace Prisma { > - export type OptionalSide1Select = $Extensions.GetSelect<{ - id?: boolean - optionalSide2Id?: boolean - int?: boolean - optionalInt?: boolean - float?: boolean - optionalFloat?: boolean - string?: boolean - optionalString?: boolean - json?: boolean - optionalJson?: boolean - enum?: boolean - optionalEnum?: boolean - boolean?: boolean - optionalBoolean?: boolean - opti?: boolean | OptionalSide2Args - }, ExtArgs["result"]["optionalSide1"]> - - export type OptionalSide1SelectScalar = { + export type OptionalSide1Select = { id?: boolean optionalSide2Id?: boolean int?: boolean @@ -10979,22 +9780,38 @@ export namespace Prisma { optionalEnum?: boolean boolean?: boolean optionalBoolean?: boolean + opti?: boolean | OptionalSide2Args } - export type OptionalSide1Include = { - opti?: boolean | OptionalSide2Args + + export type OptionalSide1Include = { + opti?: boolean | OptionalSide2Args } + export type OptionalSide1GetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? OptionalSide1 : + S extends undefined ? never : + S extends { include: any } & (OptionalSide1Args | OptionalSide1FindManyArgs) + ? OptionalSide1 & { + [P in TruthyKeys]: + P extends 'opti' ? OptionalSide2GetPayload | null : never + } + : S extends { select: any } & (OptionalSide1Args | OptionalSide1FindManyArgs) + ? { + [P in TruthyKeys]: + P extends 'opti' ? OptionalSide2GetPayload | null : P extends keyof OptionalSide1 ? OptionalSide1[P] : never + } + : OptionalSide1 - type OptionalSide1GetPayload = $Types.GetResult - type OptionalSide1CountArgs = + type OptionalSide1CountArgs = Omit & { select?: OptionalSide1CountAggregateInputType | true } - export interface OptionalSide1Delegate { - [K: symbol]: { types: Prisma.TypeMap['model']['OptionalSide1'], meta: { name: 'OptionalSide1' } } + export interface OptionalSide1Delegate { + /** * Find zero or one OptionalSide1 that matches the filter. * @param {OptionalSide1FindUniqueArgs} args - Arguments to find a OptionalSide1 @@ -11006,9 +9823,9 @@ export namespace Prisma { * } * }) **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__OptionalSide1Client<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__OptionalSide1Client<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + findUnique( + args: SelectSubset + ): HasReject extends True ? Prisma__OptionalSide1Client> : Prisma__OptionalSide1Client | null, null> /** * Find one OptionalSide1 that matches the filter or throw an error with \`error.code='P2025'\` @@ -11022,9 +9839,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__OptionalSide1Client<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow( + args?: SelectSubset + ): Prisma__OptionalSide1Client> /** * Find the first OptionalSide1 that matches the filter. @@ -11039,9 +9856,9 @@ export namespace Prisma { * } * }) **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__OptionalSide1Client<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__OptionalSide1Client<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + findFirst( + args?: SelectSubset + ): HasReject extends True ? Prisma__OptionalSide1Client> : Prisma__OptionalSide1Client | null, null> /** * Find the first OptionalSide1 that matches the filter or @@ -11057,9 +9874,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__OptionalSide1Client<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow( + args?: SelectSubset + ): Prisma__OptionalSide1Client> /** * Find zero or more OptionalSide1s that matches the filter. @@ -11077,9 +9894,9 @@ export namespace Prisma { * const optionalSide1WithIdOnly = await prisma.optionalSide1.findMany({ select: { id: true } }) * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany( + args?: SelectSubset + ): Prisma.PrismaPromise>> /** * Create a OptionalSide1. @@ -11093,9 +9910,9 @@ export namespace Prisma { * }) * **/ - create>( - args: SelectSubset> - ): Prisma__OptionalSide1Client<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create( + args: SelectSubset + ): Prisma__OptionalSide1Client> /** * Create many OptionalSide1s. @@ -11109,8 +9926,8 @@ export namespace Prisma { * }) * **/ - createMany>( - args?: SelectSubset> + createMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -11125,9 +9942,9 @@ export namespace Prisma { * }) * **/ - delete>( - args: SelectSubset> - ): Prisma__OptionalSide1Client<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete( + args: SelectSubset + ): Prisma__OptionalSide1Client> /** * Update one OptionalSide1. @@ -11144,9 +9961,9 @@ export namespace Prisma { * }) * **/ - update>( - args: SelectSubset> - ): Prisma__OptionalSide1Client<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update( + args: SelectSubset + ): Prisma__OptionalSide1Client> /** * Delete zero or more OptionalSide1s. @@ -11160,8 +9977,8 @@ export namespace Prisma { * }) * **/ - deleteMany>( - args?: SelectSubset> + deleteMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -11181,8 +9998,8 @@ export namespace Prisma { * }) * **/ - updateMany>( - args: SelectSubset> + updateMany( + args: SelectSubset ): Prisma.PrismaPromise /** @@ -11202,9 +10019,9 @@ export namespace Prisma { * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__OptionalSide1Client<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert( + args: SelectSubset + ): Prisma__OptionalSide1Client> /** * Find zero or more OptionalSide1s that matches the filter. @@ -11249,7 +10066,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> + T extends _Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -11367,7 +10184,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__OptionalSide1Client implements Prisma.PrismaPromise { + export class Prisma__OptionalSide1Client implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -11382,7 +10199,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - opti = {}>(args?: Subset>): Prisma__OptionalSide2Client<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; + opti(args?: Subset): Prisma__OptionalSide2Client | Null>; private get _document(); /** @@ -11414,15 +10231,15 @@ export namespace Prisma { /** * OptionalSide1 base type for findUnique actions */ - export type OptionalSide1FindUniqueArgsBase = { + export type OptionalSide1FindUniqueArgsBase = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * Filter, which OptionalSide1 to fetch. */ @@ -11432,7 +10249,7 @@ export namespace Prisma { /** * OptionalSide1 findUnique */ - export interface OptionalSide1FindUniqueArgs extends OptionalSide1FindUniqueArgsBase { + export interface OptionalSide1FindUniqueArgs extends OptionalSide1FindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -11444,15 +10261,15 @@ export namespace Prisma { /** * OptionalSide1 findUniqueOrThrow */ - export type OptionalSide1FindUniqueOrThrowArgs = { + export type OptionalSide1FindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * Filter, which OptionalSide1 to fetch. */ @@ -11463,15 +10280,15 @@ export namespace Prisma { /** * OptionalSide1 base type for findFirst actions */ - export type OptionalSide1FindFirstArgsBase = { + export type OptionalSide1FindFirstArgsBase = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * Filter, which OptionalSide1 to fetch. */ @@ -11511,7 +10328,7 @@ export namespace Prisma { /** * OptionalSide1 findFirst */ - export interface OptionalSide1FindFirstArgs extends OptionalSide1FindFirstArgsBase { + export interface OptionalSide1FindFirstArgs extends OptionalSide1FindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -11523,15 +10340,15 @@ export namespace Prisma { /** * OptionalSide1 findFirstOrThrow */ - export type OptionalSide1FindFirstOrThrowArgs = { + export type OptionalSide1FindFirstOrThrowArgs = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * Filter, which OptionalSide1 to fetch. */ @@ -11572,15 +10389,15 @@ export namespace Prisma { /** * OptionalSide1 findMany */ - export type OptionalSide1FindManyArgs = { + export type OptionalSide1FindManyArgs = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * Filter, which OptionalSide1s to fetch. */ @@ -11616,15 +10433,15 @@ export namespace Prisma { /** * OptionalSide1 create */ - export type OptionalSide1CreateArgs = { + export type OptionalSide1CreateArgs = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * The data needed to create a OptionalSide1. */ @@ -11635,7 +10452,7 @@ export namespace Prisma { /** * OptionalSide1 createMany */ - export type OptionalSide1CreateManyArgs = { + export type OptionalSide1CreateManyArgs = { /** * The data used to create many OptionalSide1s. */ @@ -11646,15 +10463,15 @@ export namespace Prisma { /** * OptionalSide1 update */ - export type OptionalSide1UpdateArgs = { + export type OptionalSide1UpdateArgs = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * The data needed to update a OptionalSide1. */ @@ -11669,7 +10486,7 @@ export namespace Prisma { /** * OptionalSide1 updateMany */ - export type OptionalSide1UpdateManyArgs = { + export type OptionalSide1UpdateManyArgs = { /** * The data used to update OptionalSide1s. */ @@ -11684,15 +10501,15 @@ export namespace Prisma { /** * OptionalSide1 upsert */ - export type OptionalSide1UpsertArgs = { + export type OptionalSide1UpsertArgs = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * The filter to search for the OptionalSide1 to update in case it exists. */ @@ -11711,15 +10528,15 @@ export namespace Prisma { /** * OptionalSide1 delete */ - export type OptionalSide1DeleteArgs = { + export type OptionalSide1DeleteArgs = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * Filter which OptionalSide1 to delete. */ @@ -11730,7 +10547,7 @@ export namespace Prisma { /** * OptionalSide1 deleteMany */ - export type OptionalSide1DeleteManyArgs = { + export type OptionalSide1DeleteManyArgs = { /** * Filter which OptionalSide1s to delete */ @@ -11741,7 +10558,7 @@ export namespace Prisma { /** * OptionalSide1 findRaw */ - export type OptionalSide1FindRawArgs = { + export type OptionalSide1FindRawArgs = { /** * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. \${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}. */ @@ -11756,7 +10573,7 @@ export namespace Prisma { /** * OptionalSide1 aggregateRaw */ - export type OptionalSide1AggregateRawArgs = { + export type OptionalSide1AggregateRawArgs = { /** * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. \${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}. */ @@ -11771,15 +10588,15 @@ export namespace Prisma { /** * OptionalSide1 without action */ - export type OptionalSide1Args = { + export type OptionalSide1Args = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null } @@ -11916,7 +10733,7 @@ export namespace Prisma { _all?: true } - export type OptionalSide2AggregateArgs = { + export type OptionalSide2AggregateArgs = { /** * Filter which OptionalSide2 to aggregate. */ @@ -11988,7 +10805,7 @@ export namespace Prisma { - export type OptionalSide2GroupByArgs = { + export type OptionalSide2GroupByArgs = { where?: OptionalSide2WhereInput orderBy?: Enumerable by: OptionalSide2ScalarFieldEnum[] @@ -12038,24 +10855,7 @@ export namespace Prisma { > - export type OptionalSide2Select = $Extensions.GetSelect<{ - id?: boolean - int?: boolean - optionalInt?: boolean - float?: boolean - optionalFloat?: boolean - string?: boolean - optionalString?: boolean - json?: boolean - optionalJson?: boolean - enum?: boolean - optionalEnum?: boolean - boolean?: boolean - optionalBoolean?: boolean - opti?: boolean | OptionalSide1Args - }, ExtArgs["result"]["optionalSide2"]> - - export type OptionalSide2SelectScalar = { + export type OptionalSide2Select = { id?: boolean int?: boolean optionalInt?: boolean @@ -12069,22 +10869,38 @@ export namespace Prisma { optionalEnum?: boolean boolean?: boolean optionalBoolean?: boolean + opti?: boolean | OptionalSide1Args } - export type OptionalSide2Include = { - opti?: boolean | OptionalSide1Args + + export type OptionalSide2Include = { + opti?: boolean | OptionalSide1Args } + export type OptionalSide2GetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? OptionalSide2 : + S extends undefined ? never : + S extends { include: any } & (OptionalSide2Args | OptionalSide2FindManyArgs) + ? OptionalSide2 & { + [P in TruthyKeys]: + P extends 'opti' ? OptionalSide1GetPayload | null : never + } + : S extends { select: any } & (OptionalSide2Args | OptionalSide2FindManyArgs) + ? { + [P in TruthyKeys]: + P extends 'opti' ? OptionalSide1GetPayload | null : P extends keyof OptionalSide2 ? OptionalSide2[P] : never + } + : OptionalSide2 - type OptionalSide2GetPayload = $Types.GetResult - type OptionalSide2CountArgs = + type OptionalSide2CountArgs = Omit & { select?: OptionalSide2CountAggregateInputType | true } - export interface OptionalSide2Delegate { - [K: symbol]: { types: Prisma.TypeMap['model']['OptionalSide2'], meta: { name: 'OptionalSide2' } } + export interface OptionalSide2Delegate { + /** * Find zero or one OptionalSide2 that matches the filter. * @param {OptionalSide2FindUniqueArgs} args - Arguments to find a OptionalSide2 @@ -12096,9 +10912,9 @@ export namespace Prisma { * } * }) **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__OptionalSide2Client<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__OptionalSide2Client<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + findUnique( + args: SelectSubset + ): HasReject extends True ? Prisma__OptionalSide2Client> : Prisma__OptionalSide2Client | null, null> /** * Find one OptionalSide2 that matches the filter or throw an error with \`error.code='P2025'\` @@ -12112,9 +10928,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__OptionalSide2Client<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow( + args?: SelectSubset + ): Prisma__OptionalSide2Client> /** * Find the first OptionalSide2 that matches the filter. @@ -12129,9 +10945,9 @@ export namespace Prisma { * } * }) **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__OptionalSide2Client<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__OptionalSide2Client<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + findFirst( + args?: SelectSubset + ): HasReject extends True ? Prisma__OptionalSide2Client> : Prisma__OptionalSide2Client | null, null> /** * Find the first OptionalSide2 that matches the filter or @@ -12147,9 +10963,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__OptionalSide2Client<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow( + args?: SelectSubset + ): Prisma__OptionalSide2Client> /** * Find zero or more OptionalSide2s that matches the filter. @@ -12167,9 +10983,9 @@ export namespace Prisma { * const optionalSide2WithIdOnly = await prisma.optionalSide2.findMany({ select: { id: true } }) * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany( + args?: SelectSubset + ): Prisma.PrismaPromise>> /** * Create a OptionalSide2. @@ -12183,9 +10999,9 @@ export namespace Prisma { * }) * **/ - create>( - args: SelectSubset> - ): Prisma__OptionalSide2Client<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create( + args: SelectSubset + ): Prisma__OptionalSide2Client> /** * Create many OptionalSide2s. @@ -12199,8 +11015,8 @@ export namespace Prisma { * }) * **/ - createMany>( - args?: SelectSubset> + createMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -12215,9 +11031,9 @@ export namespace Prisma { * }) * **/ - delete>( - args: SelectSubset> - ): Prisma__OptionalSide2Client<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete( + args: SelectSubset + ): Prisma__OptionalSide2Client> /** * Update one OptionalSide2. @@ -12234,9 +11050,9 @@ export namespace Prisma { * }) * **/ - update>( - args: SelectSubset> - ): Prisma__OptionalSide2Client<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update( + args: SelectSubset + ): Prisma__OptionalSide2Client> /** * Delete zero or more OptionalSide2s. @@ -12250,8 +11066,8 @@ export namespace Prisma { * }) * **/ - deleteMany>( - args?: SelectSubset> + deleteMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -12271,8 +11087,8 @@ export namespace Prisma { * }) * **/ - updateMany>( - args: SelectSubset> + updateMany( + args: SelectSubset ): Prisma.PrismaPromise /** @@ -12292,9 +11108,9 @@ export namespace Prisma { * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__OptionalSide2Client<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert( + args: SelectSubset + ): Prisma__OptionalSide2Client> /** * Find zero or more OptionalSide2s that matches the filter. @@ -12339,7 +11155,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> + T extends _Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -12457,7 +11273,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__OptionalSide2Client implements Prisma.PrismaPromise { + export class Prisma__OptionalSide2Client implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -12472,7 +11288,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - opti = {}>(args?: Subset>): Prisma__OptionalSide1Client<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; + opti(args?: Subset): Prisma__OptionalSide1Client | Null>; private get _document(); /** @@ -12504,15 +11320,15 @@ export namespace Prisma { /** * OptionalSide2 base type for findUnique actions */ - export type OptionalSide2FindUniqueArgsBase = { + export type OptionalSide2FindUniqueArgsBase = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * Filter, which OptionalSide2 to fetch. */ @@ -12522,7 +11338,7 @@ export namespace Prisma { /** * OptionalSide2 findUnique */ - export interface OptionalSide2FindUniqueArgs extends OptionalSide2FindUniqueArgsBase { + export interface OptionalSide2FindUniqueArgs extends OptionalSide2FindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -12534,15 +11350,15 @@ export namespace Prisma { /** * OptionalSide2 findUniqueOrThrow */ - export type OptionalSide2FindUniqueOrThrowArgs = { + export type OptionalSide2FindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * Filter, which OptionalSide2 to fetch. */ @@ -12553,15 +11369,15 @@ export namespace Prisma { /** * OptionalSide2 base type for findFirst actions */ - export type OptionalSide2FindFirstArgsBase = { + export type OptionalSide2FindFirstArgsBase = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * Filter, which OptionalSide2 to fetch. */ @@ -12601,7 +11417,7 @@ export namespace Prisma { /** * OptionalSide2 findFirst */ - export interface OptionalSide2FindFirstArgs extends OptionalSide2FindFirstArgsBase { + export interface OptionalSide2FindFirstArgs extends OptionalSide2FindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -12613,15 +11429,15 @@ export namespace Prisma { /** * OptionalSide2 findFirstOrThrow */ - export type OptionalSide2FindFirstOrThrowArgs = { + export type OptionalSide2FindFirstOrThrowArgs = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * Filter, which OptionalSide2 to fetch. */ @@ -12662,15 +11478,15 @@ export namespace Prisma { /** * OptionalSide2 findMany */ - export type OptionalSide2FindManyArgs = { + export type OptionalSide2FindManyArgs = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * Filter, which OptionalSide2s to fetch. */ @@ -12706,15 +11522,15 @@ export namespace Prisma { /** * OptionalSide2 create */ - export type OptionalSide2CreateArgs = { + export type OptionalSide2CreateArgs = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * The data needed to create a OptionalSide2. */ @@ -12725,7 +11541,7 @@ export namespace Prisma { /** * OptionalSide2 createMany */ - export type OptionalSide2CreateManyArgs = { + export type OptionalSide2CreateManyArgs = { /** * The data used to create many OptionalSide2s. */ @@ -12736,15 +11552,15 @@ export namespace Prisma { /** * OptionalSide2 update */ - export type OptionalSide2UpdateArgs = { + export type OptionalSide2UpdateArgs = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * The data needed to update a OptionalSide2. */ @@ -12759,7 +11575,7 @@ export namespace Prisma { /** * OptionalSide2 updateMany */ - export type OptionalSide2UpdateManyArgs = { + export type OptionalSide2UpdateManyArgs = { /** * The data used to update OptionalSide2s. */ @@ -12774,15 +11590,15 @@ export namespace Prisma { /** * OptionalSide2 upsert */ - export type OptionalSide2UpsertArgs = { + export type OptionalSide2UpsertArgs = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * The filter to search for the OptionalSide2 to update in case it exists. */ @@ -12801,15 +11617,15 @@ export namespace Prisma { /** * OptionalSide2 delete */ - export type OptionalSide2DeleteArgs = { + export type OptionalSide2DeleteArgs = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * Filter which OptionalSide2 to delete. */ @@ -12820,7 +11636,7 @@ export namespace Prisma { /** * OptionalSide2 deleteMany */ - export type OptionalSide2DeleteManyArgs = { + export type OptionalSide2DeleteManyArgs = { /** * Filter which OptionalSide2s to delete */ @@ -12831,7 +11647,7 @@ export namespace Prisma { /** * OptionalSide2 findRaw */ - export type OptionalSide2FindRawArgs = { + export type OptionalSide2FindRawArgs = { /** * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. \${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}. */ @@ -12846,7 +11662,7 @@ export namespace Prisma { /** * OptionalSide2 aggregateRaw */ - export type OptionalSide2AggregateRawArgs = { + export type OptionalSide2AggregateRawArgs = { /** * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. \${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}. */ @@ -12861,15 +11677,15 @@ export namespace Prisma { /** * OptionalSide2 without action */ - export type OptionalSide2Args = { + export type OptionalSide2Args = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null } @@ -12968,7 +11784,7 @@ export namespace Prisma { _all?: true } - export type AAggregateArgs = { + export type AAggregateArgs = { /** * Filter which A to aggregate. */ @@ -13040,7 +11856,7 @@ export namespace Prisma { - export type AGroupByArgs = { + export type AGroupByArgs = { where?: AWhereInput orderBy?: Enumerable by: AScalarFieldEnum[] @@ -13083,16 +11899,7 @@ export namespace Prisma { > - export type ASelect = $Extensions.GetSelect<{ - id?: boolean - email?: boolean - name?: boolean - int?: boolean - sInt?: boolean - bInt?: boolean - }, ExtArgs["result"]["a"]> - - export type ASelectScalar = { + export type ASelect = { id?: boolean email?: boolean name?: boolean @@ -13102,15 +11909,27 @@ export namespace Prisma { } - type AGetPayload = $Types.GetResult + export type AGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? A : + S extends undefined ? never : + S extends { include: any } & (AArgs | AFindManyArgs) + ? A + : S extends { select: any } & (AArgs | AFindManyArgs) + ? { + [P in TruthyKeys]: + P extends keyof A ? A[P] : never + } + : A + - type ACountArgs = + type ACountArgs = Omit & { select?: ACountAggregateInputType | true } - export interface ADelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['A'], meta: { name: 'A' } } + export interface ADelegate { + /** * Find zero or one A that matches the filter. * @param {AFindUniqueArgs} args - Arguments to find a A @@ -13122,9 +11941,9 @@ export namespace Prisma { * } * }) **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__AClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__AClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + findUnique( + args: SelectSubset + ): HasReject extends True ? Prisma__AClient> : Prisma__AClient | null, null> /** * Find one A that matches the filter or throw an error with \`error.code='P2025'\` @@ -13138,9 +11957,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__AClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow( + args?: SelectSubset + ): Prisma__AClient> /** * Find the first A that matches the filter. @@ -13155,9 +11974,9 @@ export namespace Prisma { * } * }) **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__AClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__AClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + findFirst( + args?: SelectSubset + ): HasReject extends True ? Prisma__AClient> : Prisma__AClient | null, null> /** * Find the first A that matches the filter or @@ -13173,9 +11992,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__AClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow( + args?: SelectSubset + ): Prisma__AClient> /** * Find zero or more As that matches the filter. @@ -13193,9 +12012,9 @@ export namespace Prisma { * const aWithIdOnly = await prisma.a.findMany({ select: { id: true } }) * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany( + args?: SelectSubset + ): Prisma.PrismaPromise>> /** * Create a A. @@ -13209,9 +12028,9 @@ export namespace Prisma { * }) * **/ - create>( - args: SelectSubset> - ): Prisma__AClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create( + args: SelectSubset + ): Prisma__AClient> /** * Create many As. @@ -13225,8 +12044,8 @@ export namespace Prisma { * }) * **/ - createMany>( - args?: SelectSubset> + createMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -13241,9 +12060,9 @@ export namespace Prisma { * }) * **/ - delete>( - args: SelectSubset> - ): Prisma__AClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete( + args: SelectSubset + ): Prisma__AClient> /** * Update one A. @@ -13260,9 +12079,9 @@ export namespace Prisma { * }) * **/ - update>( - args: SelectSubset> - ): Prisma__AClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update( + args: SelectSubset + ): Prisma__AClient> /** * Delete zero or more As. @@ -13276,8 +12095,8 @@ export namespace Prisma { * }) * **/ - deleteMany>( - args?: SelectSubset> + deleteMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -13297,8 +12116,8 @@ export namespace Prisma { * }) * **/ - updateMany>( - args: SelectSubset> + updateMany( + args: SelectSubset ): Prisma.PrismaPromise /** @@ -13318,9 +12137,9 @@ export namespace Prisma { * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__AClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert( + args: SelectSubset + ): Prisma__AClient> /** * Find zero or more As that matches the filter. @@ -13365,7 +12184,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> + T extends _Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -13483,7 +12302,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__AClient implements Prisma.PrismaPromise { + export class Prisma__AClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -13529,11 +12348,11 @@ export namespace Prisma { /** * A base type for findUnique actions */ - export type AFindUniqueArgsBase = { + export type AFindUniqueArgsBase = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * Filter, which A to fetch. */ @@ -13543,7 +12362,7 @@ export namespace Prisma { /** * A findUnique */ - export interface AFindUniqueArgs extends AFindUniqueArgsBase { + export interface AFindUniqueArgs extends AFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -13555,11 +12374,11 @@ export namespace Prisma { /** * A findUniqueOrThrow */ - export type AFindUniqueOrThrowArgs = { + export type AFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * Filter, which A to fetch. */ @@ -13570,11 +12389,11 @@ export namespace Prisma { /** * A base type for findFirst actions */ - export type AFindFirstArgsBase = { + export type AFindFirstArgsBase = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * Filter, which A to fetch. */ @@ -13614,7 +12433,7 @@ export namespace Prisma { /** * A findFirst */ - export interface AFindFirstArgs extends AFindFirstArgsBase { + export interface AFindFirstArgs extends AFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -13626,11 +12445,11 @@ export namespace Prisma { /** * A findFirstOrThrow */ - export type AFindFirstOrThrowArgs = { + export type AFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * Filter, which A to fetch. */ @@ -13671,11 +12490,11 @@ export namespace Prisma { /** * A findMany */ - export type AFindManyArgs = { + export type AFindManyArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * Filter, which AS to fetch. */ @@ -13711,11 +12530,11 @@ export namespace Prisma { /** * A create */ - export type ACreateArgs = { + export type ACreateArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * The data needed to create a A. */ @@ -13726,7 +12545,7 @@ export namespace Prisma { /** * A createMany */ - export type ACreateManyArgs = { + export type ACreateManyArgs = { /** * The data used to create many AS. */ @@ -13737,11 +12556,11 @@ export namespace Prisma { /** * A update */ - export type AUpdateArgs = { + export type AUpdateArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * The data needed to update a A. */ @@ -13756,7 +12575,7 @@ export namespace Prisma { /** * A updateMany */ - export type AUpdateManyArgs = { + export type AUpdateManyArgs = { /** * The data used to update AS. */ @@ -13771,11 +12590,11 @@ export namespace Prisma { /** * A upsert */ - export type AUpsertArgs = { + export type AUpsertArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * The filter to search for the A to update in case it exists. */ @@ -13794,11 +12613,11 @@ export namespace Prisma { /** * A delete */ - export type ADeleteArgs = { + export type ADeleteArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * Filter which A to delete. */ @@ -13809,7 +12628,7 @@ export namespace Prisma { /** * A deleteMany */ - export type ADeleteManyArgs = { + export type ADeleteManyArgs = { /** * Filter which AS to delete */ @@ -13820,7 +12639,7 @@ export namespace Prisma { /** * A findRaw */ - export type AFindRawArgs = { + export type AFindRawArgs = { /** * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. \${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}. */ @@ -13835,7 +12654,7 @@ export namespace Prisma { /** * A aggregateRaw */ - export type AAggregateRawArgs = { + export type AAggregateRawArgs = { /** * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. \${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}. */ @@ -13850,11 +12669,11 @@ export namespace Prisma { /** * A without action */ - export type AArgs = { + export type AArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null } @@ -13931,7 +12750,7 @@ export namespace Prisma { _all?: true } - export type BAggregateArgs = { + export type BAggregateArgs = { /** * Filter which B to aggregate. */ @@ -14003,7 +12822,7 @@ export namespace Prisma { - export type BGroupByArgs = { + export type BGroupByArgs = { where?: BWhereInput orderBy?: Enumerable by: BScalarFieldEnum[] @@ -14043,28 +12862,34 @@ export namespace Prisma { > - export type BSelect = $Extensions.GetSelect<{ - id?: boolean - float?: boolean - dFloat?: boolean - }, ExtArgs["result"]["b"]> - - export type BSelectScalar = { + export type BSelect = { id?: boolean float?: boolean dFloat?: boolean } - type BGetPayload = $Types.GetResult + export type BGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? B : + S extends undefined ? never : + S extends { include: any } & (BArgs | BFindManyArgs) + ? B + : S extends { select: any } & (BArgs | BFindManyArgs) + ? { + [P in TruthyKeys]: + P extends keyof B ? B[P] : never + } + : B + - type BCountArgs = + type BCountArgs = Omit & { select?: BCountAggregateInputType | true } - export interface BDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['B'], meta: { name: 'B' } } + export interface BDelegate { + /** * Find zero or one B that matches the filter. * @param {BFindUniqueArgs} args - Arguments to find a B @@ -14076,9 +12901,9 @@ export namespace Prisma { * } * }) **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__BClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__BClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + findUnique( + args: SelectSubset + ): HasReject extends True ? Prisma__BClient> : Prisma__BClient | null, null> /** * Find one B that matches the filter or throw an error with \`error.code='P2025'\` @@ -14092,9 +12917,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__BClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow( + args?: SelectSubset + ): Prisma__BClient> /** * Find the first B that matches the filter. @@ -14109,9 +12934,9 @@ export namespace Prisma { * } * }) **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__BClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__BClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + findFirst( + args?: SelectSubset + ): HasReject extends True ? Prisma__BClient> : Prisma__BClient | null, null> /** * Find the first B that matches the filter or @@ -14127,9 +12952,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__BClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow( + args?: SelectSubset + ): Prisma__BClient> /** * Find zero or more Bs that matches the filter. @@ -14147,9 +12972,9 @@ export namespace Prisma { * const bWithIdOnly = await prisma.b.findMany({ select: { id: true } }) * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany( + args?: SelectSubset + ): Prisma.PrismaPromise>> /** * Create a B. @@ -14163,9 +12988,9 @@ export namespace Prisma { * }) * **/ - create>( - args: SelectSubset> - ): Prisma__BClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create( + args: SelectSubset + ): Prisma__BClient> /** * Create many Bs. @@ -14179,8 +13004,8 @@ export namespace Prisma { * }) * **/ - createMany>( - args?: SelectSubset> + createMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -14195,9 +13020,9 @@ export namespace Prisma { * }) * **/ - delete>( - args: SelectSubset> - ): Prisma__BClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete( + args: SelectSubset + ): Prisma__BClient> /** * Update one B. @@ -14214,9 +13039,9 @@ export namespace Prisma { * }) * **/ - update>( - args: SelectSubset> - ): Prisma__BClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update( + args: SelectSubset + ): Prisma__BClient> /** * Delete zero or more Bs. @@ -14230,8 +13055,8 @@ export namespace Prisma { * }) * **/ - deleteMany>( - args?: SelectSubset> + deleteMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -14251,8 +13076,8 @@ export namespace Prisma { * }) * **/ - updateMany>( - args: SelectSubset> + updateMany( + args: SelectSubset ): Prisma.PrismaPromise /** @@ -14272,9 +13097,9 @@ export namespace Prisma { * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__BClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert( + args: SelectSubset + ): Prisma__BClient> /** * Find zero or more Bs that matches the filter. @@ -14319,7 +13144,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> + T extends _Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -14437,7 +13262,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__BClient implements Prisma.PrismaPromise { + export class Prisma__BClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -14483,11 +13308,11 @@ export namespace Prisma { /** * B base type for findUnique actions */ - export type BFindUniqueArgsBase = { + export type BFindUniqueArgsBase = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * Filter, which B to fetch. */ @@ -14497,7 +13322,7 @@ export namespace Prisma { /** * B findUnique */ - export interface BFindUniqueArgs extends BFindUniqueArgsBase { + export interface BFindUniqueArgs extends BFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -14509,11 +13334,11 @@ export namespace Prisma { /** * B findUniqueOrThrow */ - export type BFindUniqueOrThrowArgs = { + export type BFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * Filter, which B to fetch. */ @@ -14524,11 +13349,11 @@ export namespace Prisma { /** * B base type for findFirst actions */ - export type BFindFirstArgsBase = { + export type BFindFirstArgsBase = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * Filter, which B to fetch. */ @@ -14568,7 +13393,7 @@ export namespace Prisma { /** * B findFirst */ - export interface BFindFirstArgs extends BFindFirstArgsBase { + export interface BFindFirstArgs extends BFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -14580,11 +13405,11 @@ export namespace Prisma { /** * B findFirstOrThrow */ - export type BFindFirstOrThrowArgs = { + export type BFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * Filter, which B to fetch. */ @@ -14625,11 +13450,11 @@ export namespace Prisma { /** * B findMany */ - export type BFindManyArgs = { + export type BFindManyArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * Filter, which BS to fetch. */ @@ -14665,11 +13490,11 @@ export namespace Prisma { /** * B create */ - export type BCreateArgs = { + export type BCreateArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * The data needed to create a B. */ @@ -14680,7 +13505,7 @@ export namespace Prisma { /** * B createMany */ - export type BCreateManyArgs = { + export type BCreateManyArgs = { /** * The data used to create many BS. */ @@ -14691,11 +13516,11 @@ export namespace Prisma { /** * B update */ - export type BUpdateArgs = { + export type BUpdateArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * The data needed to update a B. */ @@ -14710,7 +13535,7 @@ export namespace Prisma { /** * B updateMany */ - export type BUpdateManyArgs = { + export type BUpdateManyArgs = { /** * The data used to update BS. */ @@ -14725,11 +13550,11 @@ export namespace Prisma { /** * B upsert */ - export type BUpsertArgs = { + export type BUpsertArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * The filter to search for the B to update in case it exists. */ @@ -14748,11 +13573,11 @@ export namespace Prisma { /** * B delete */ - export type BDeleteArgs = { + export type BDeleteArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * Filter which B to delete. */ @@ -14763,7 +13588,7 @@ export namespace Prisma { /** * B deleteMany */ - export type BDeleteManyArgs = { + export type BDeleteManyArgs = { /** * Filter which BS to delete */ @@ -14774,7 +13599,7 @@ export namespace Prisma { /** * B findRaw */ - export type BFindRawArgs = { + export type BFindRawArgs = { /** * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. \${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}. */ @@ -14789,7 +13614,7 @@ export namespace Prisma { /** * B aggregateRaw */ - export type BAggregateRawArgs = { + export type BAggregateRawArgs = { /** * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. \${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}. */ @@ -14804,11 +13629,11 @@ export namespace Prisma { /** * B without action */ - export type BArgs = { + export type BArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null } @@ -14887,7 +13712,7 @@ export namespace Prisma { _all?: true } - export type CAggregateArgs = { + export type CAggregateArgs = { /** * Filter which C to aggregate. */ @@ -14947,7 +13772,7 @@ export namespace Prisma { - export type CGroupByArgs = { + export type CGroupByArgs = { where?: CWhereInput orderBy?: Enumerable by: CScalarFieldEnum[] @@ -14987,17 +13812,7 @@ export namespace Prisma { > - export type CSelect = $Extensions.GetSelect<{ - id?: boolean - char?: boolean - vChar?: boolean - text?: boolean - bit?: boolean - vBit?: boolean - uuid?: boolean - }, ExtArgs["result"]["c"]> - - export type CSelectScalar = { + export type CSelect = { id?: boolean char?: boolean vChar?: boolean @@ -15008,15 +13823,27 @@ export namespace Prisma { } - type CGetPayload = $Types.GetResult + export type CGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? C : + S extends undefined ? never : + S extends { include: any } & (CArgs | CFindManyArgs) + ? C + : S extends { select: any } & (CArgs | CFindManyArgs) + ? { + [P in TruthyKeys]: + P extends keyof C ? C[P] : never + } + : C + - type CCountArgs = + type CCountArgs = Omit & { select?: CCountAggregateInputType | true } - export interface CDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['C'], meta: { name: 'C' } } + export interface CDelegate { + /** * Find zero or one C that matches the filter. * @param {CFindUniqueArgs} args - Arguments to find a C @@ -15028,9 +13855,9 @@ export namespace Prisma { * } * }) **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__CClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__CClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + findUnique( + args: SelectSubset + ): HasReject extends True ? Prisma__CClient> : Prisma__CClient | null, null> /** * Find one C that matches the filter or throw an error with \`error.code='P2025'\` @@ -15044,9 +13871,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__CClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow( + args?: SelectSubset + ): Prisma__CClient> /** * Find the first C that matches the filter. @@ -15061,9 +13888,9 @@ export namespace Prisma { * } * }) **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__CClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__CClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + findFirst( + args?: SelectSubset + ): HasReject extends True ? Prisma__CClient> : Prisma__CClient | null, null> /** * Find the first C that matches the filter or @@ -15079,9 +13906,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__CClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow( + args?: SelectSubset + ): Prisma__CClient> /** * Find zero or more Cs that matches the filter. @@ -15099,9 +13926,9 @@ export namespace Prisma { * const cWithIdOnly = await prisma.c.findMany({ select: { id: true } }) * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany( + args?: SelectSubset + ): Prisma.PrismaPromise>> /** * Create a C. @@ -15115,9 +13942,9 @@ export namespace Prisma { * }) * **/ - create>( - args: SelectSubset> - ): Prisma__CClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create( + args: SelectSubset + ): Prisma__CClient> /** * Create many Cs. @@ -15131,8 +13958,8 @@ export namespace Prisma { * }) * **/ - createMany>( - args?: SelectSubset> + createMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -15147,9 +13974,9 @@ export namespace Prisma { * }) * **/ - delete>( - args: SelectSubset> - ): Prisma__CClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete( + args: SelectSubset + ): Prisma__CClient> /** * Update one C. @@ -15166,9 +13993,9 @@ export namespace Prisma { * }) * **/ - update>( - args: SelectSubset> - ): Prisma__CClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update( + args: SelectSubset + ): Prisma__CClient> /** * Delete zero or more Cs. @@ -15182,8 +14009,8 @@ export namespace Prisma { * }) * **/ - deleteMany>( - args?: SelectSubset> + deleteMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -15203,8 +14030,8 @@ export namespace Prisma { * }) * **/ - updateMany>( - args: SelectSubset> + updateMany( + args: SelectSubset ): Prisma.PrismaPromise /** @@ -15224,9 +14051,9 @@ export namespace Prisma { * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__CClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert( + args: SelectSubset + ): Prisma__CClient> /** * Find zero or more Cs that matches the filter. @@ -15271,7 +14098,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> + T extends _Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -15389,7 +14216,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__CClient implements Prisma.PrismaPromise { + export class Prisma__CClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -15435,11 +14262,11 @@ export namespace Prisma { /** * C base type for findUnique actions */ - export type CFindUniqueArgsBase = { + export type CFindUniqueArgsBase = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * Filter, which C to fetch. */ @@ -15449,7 +14276,7 @@ export namespace Prisma { /** * C findUnique */ - export interface CFindUniqueArgs extends CFindUniqueArgsBase { + export interface CFindUniqueArgs extends CFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -15461,11 +14288,11 @@ export namespace Prisma { /** * C findUniqueOrThrow */ - export type CFindUniqueOrThrowArgs = { + export type CFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * Filter, which C to fetch. */ @@ -15476,11 +14303,11 @@ export namespace Prisma { /** * C base type for findFirst actions */ - export type CFindFirstArgsBase = { + export type CFindFirstArgsBase = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * Filter, which C to fetch. */ @@ -15520,7 +14347,7 @@ export namespace Prisma { /** * C findFirst */ - export interface CFindFirstArgs extends CFindFirstArgsBase { + export interface CFindFirstArgs extends CFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -15532,11 +14359,11 @@ export namespace Prisma { /** * C findFirstOrThrow */ - export type CFindFirstOrThrowArgs = { + export type CFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * Filter, which C to fetch. */ @@ -15577,11 +14404,11 @@ export namespace Prisma { /** * C findMany */ - export type CFindManyArgs = { + export type CFindManyArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * Filter, which CS to fetch. */ @@ -15617,11 +14444,11 @@ export namespace Prisma { /** * C create */ - export type CCreateArgs = { + export type CCreateArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * The data needed to create a C. */ @@ -15632,7 +14459,7 @@ export namespace Prisma { /** * C createMany */ - export type CCreateManyArgs = { + export type CCreateManyArgs = { /** * The data used to create many CS. */ @@ -15643,11 +14470,11 @@ export namespace Prisma { /** * C update */ - export type CUpdateArgs = { + export type CUpdateArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * The data needed to update a C. */ @@ -15662,7 +14489,7 @@ export namespace Prisma { /** * C updateMany */ - export type CUpdateManyArgs = { + export type CUpdateManyArgs = { /** * The data used to update CS. */ @@ -15677,11 +14504,11 @@ export namespace Prisma { /** * C upsert */ - export type CUpsertArgs = { + export type CUpsertArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * The filter to search for the C to update in case it exists. */ @@ -15700,11 +14527,11 @@ export namespace Prisma { /** * C delete */ - export type CDeleteArgs = { + export type CDeleteArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * Filter which C to delete. */ @@ -15715,7 +14542,7 @@ export namespace Prisma { /** * C deleteMany */ - export type CDeleteManyArgs = { + export type CDeleteManyArgs = { /** * Filter which CS to delete */ @@ -15726,7 +14553,7 @@ export namespace Prisma { /** * C findRaw */ - export type CFindRawArgs = { + export type CFindRawArgs = { /** * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. \${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}. */ @@ -15741,7 +14568,7 @@ export namespace Prisma { /** * C aggregateRaw */ - export type CAggregateRawArgs = { + export type CAggregateRawArgs = { /** * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. \${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}. */ @@ -15756,11 +14583,11 @@ export namespace Prisma { /** * C without action */ - export type CArgs = { + export type CArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null } @@ -15845,7 +14672,7 @@ export namespace Prisma { _all?: true } - export type DAggregateArgs = { + export type DAggregateArgs = { /** * Filter which D to aggregate. */ @@ -15917,7 +14744,7 @@ export namespace Prisma { - export type DGroupByArgs = { + export type DGroupByArgs = { where?: DWhereInput orderBy?: Enumerable by: DScalarFieldEnum[] @@ -15961,17 +14788,7 @@ export namespace Prisma { > - export type DSelect = $Extensions.GetSelect<{ - id?: boolean - bool?: boolean - byteA?: boolean - xml?: boolean - json?: boolean - jsonb?: boolean - list?: boolean - }, ExtArgs["result"]["d"]> - - export type DSelectScalar = { + export type DSelect = { id?: boolean bool?: boolean byteA?: boolean @@ -15982,15 +14799,27 @@ export namespace Prisma { } - type DGetPayload = $Types.GetResult + export type DGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? D : + S extends undefined ? never : + S extends { include: any } & (DArgs | DFindManyArgs) + ? D + : S extends { select: any } & (DArgs | DFindManyArgs) + ? { + [P in TruthyKeys]: + P extends keyof D ? D[P] : never + } + : D + - type DCountArgs = + type DCountArgs = Omit & { select?: DCountAggregateInputType | true } - export interface DDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['D'], meta: { name: 'D' } } + export interface DDelegate { + /** * Find zero or one D that matches the filter. * @param {DFindUniqueArgs} args - Arguments to find a D @@ -16002,9 +14831,9 @@ export namespace Prisma { * } * }) **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__DClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__DClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + findUnique( + args: SelectSubset + ): HasReject extends True ? Prisma__DClient> : Prisma__DClient | null, null> /** * Find one D that matches the filter or throw an error with \`error.code='P2025'\` @@ -16018,9 +14847,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__DClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow( + args?: SelectSubset + ): Prisma__DClient> /** * Find the first D that matches the filter. @@ -16035,9 +14864,9 @@ export namespace Prisma { * } * }) **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__DClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__DClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + findFirst( + args?: SelectSubset + ): HasReject extends True ? Prisma__DClient> : Prisma__DClient | null, null> /** * Find the first D that matches the filter or @@ -16053,9 +14882,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__DClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow( + args?: SelectSubset + ): Prisma__DClient> /** * Find zero or more Ds that matches the filter. @@ -16073,9 +14902,9 @@ export namespace Prisma { * const dWithIdOnly = await prisma.d.findMany({ select: { id: true } }) * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany( + args?: SelectSubset + ): Prisma.PrismaPromise>> /** * Create a D. @@ -16089,9 +14918,9 @@ export namespace Prisma { * }) * **/ - create>( - args: SelectSubset> - ): Prisma__DClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create( + args: SelectSubset + ): Prisma__DClient> /** * Create many Ds. @@ -16105,8 +14934,8 @@ export namespace Prisma { * }) * **/ - createMany>( - args?: SelectSubset> + createMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -16121,9 +14950,9 @@ export namespace Prisma { * }) * **/ - delete>( - args: SelectSubset> - ): Prisma__DClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete( + args: SelectSubset + ): Prisma__DClient> /** * Update one D. @@ -16140,9 +14969,9 @@ export namespace Prisma { * }) * **/ - update>( - args: SelectSubset> - ): Prisma__DClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update( + args: SelectSubset + ): Prisma__DClient> /** * Delete zero or more Ds. @@ -16156,8 +14985,8 @@ export namespace Prisma { * }) * **/ - deleteMany>( - args?: SelectSubset> + deleteMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -16177,8 +15006,8 @@ export namespace Prisma { * }) * **/ - updateMany>( - args: SelectSubset> + updateMany( + args: SelectSubset ): Prisma.PrismaPromise /** @@ -16198,9 +15027,9 @@ export namespace Prisma { * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__DClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert( + args: SelectSubset + ): Prisma__DClient> /** * Find zero or more Ds that matches the filter. @@ -16245,7 +15074,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> + T extends _Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -16363,7 +15192,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__DClient implements Prisma.PrismaPromise { + export class Prisma__DClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -16409,11 +15238,11 @@ export namespace Prisma { /** * D base type for findUnique actions */ - export type DFindUniqueArgsBase = { + export type DFindUniqueArgsBase = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * Filter, which D to fetch. */ @@ -16423,7 +15252,7 @@ export namespace Prisma { /** * D findUnique */ - export interface DFindUniqueArgs extends DFindUniqueArgsBase { + export interface DFindUniqueArgs extends DFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -16435,11 +15264,11 @@ export namespace Prisma { /** * D findUniqueOrThrow */ - export type DFindUniqueOrThrowArgs = { + export type DFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * Filter, which D to fetch. */ @@ -16450,11 +15279,11 @@ export namespace Prisma { /** * D base type for findFirst actions */ - export type DFindFirstArgsBase = { + export type DFindFirstArgsBase = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * Filter, which D to fetch. */ @@ -16494,7 +15323,7 @@ export namespace Prisma { /** * D findFirst */ - export interface DFindFirstArgs extends DFindFirstArgsBase { + export interface DFindFirstArgs extends DFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -16506,11 +15335,11 @@ export namespace Prisma { /** * D findFirstOrThrow */ - export type DFindFirstOrThrowArgs = { + export type DFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * Filter, which D to fetch. */ @@ -16551,11 +15380,11 @@ export namespace Prisma { /** * D findMany */ - export type DFindManyArgs = { + export type DFindManyArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * Filter, which DS to fetch. */ @@ -16591,11 +15420,11 @@ export namespace Prisma { /** * D create */ - export type DCreateArgs = { + export type DCreateArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * The data needed to create a D. */ @@ -16606,7 +15435,7 @@ export namespace Prisma { /** * D createMany */ - export type DCreateManyArgs = { + export type DCreateManyArgs = { /** * The data used to create many DS. */ @@ -16617,11 +15446,11 @@ export namespace Prisma { /** * D update */ - export type DUpdateArgs = { + export type DUpdateArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * The data needed to update a D. */ @@ -16636,7 +15465,7 @@ export namespace Prisma { /** * D updateMany */ - export type DUpdateManyArgs = { + export type DUpdateManyArgs = { /** * The data used to update DS. */ @@ -16651,11 +15480,11 @@ export namespace Prisma { /** * D upsert */ - export type DUpsertArgs = { + export type DUpsertArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * The filter to search for the D to update in case it exists. */ @@ -16674,11 +15503,11 @@ export namespace Prisma { /** * D delete */ - export type DDeleteArgs = { + export type DDeleteArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * Filter which D to delete. */ @@ -16689,7 +15518,7 @@ export namespace Prisma { /** * D deleteMany */ - export type DDeleteManyArgs = { + export type DDeleteManyArgs = { /** * Filter which DS to delete */ @@ -16700,7 +15529,7 @@ export namespace Prisma { /** * D findRaw */ - export type DFindRawArgs = { + export type DFindRawArgs = { /** * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. \${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}. */ @@ -16715,7 +15544,7 @@ export namespace Prisma { /** * D aggregateRaw */ - export type DAggregateRawArgs = { + export type DAggregateRawArgs = { /** * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. \${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}. */ @@ -16730,11 +15559,11 @@ export namespace Prisma { /** * D without action */ - export type DArgs = { + export type DArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null } @@ -16795,7 +15624,7 @@ export namespace Prisma { _all?: true } - export type EAggregateArgs = { + export type EAggregateArgs = { /** * Filter which E to aggregate. */ @@ -16855,7 +15684,7 @@ export namespace Prisma { - export type EGroupByArgs = { + export type EGroupByArgs = { where?: EWhereInput orderBy?: Enumerable by: EScalarFieldEnum[] @@ -16892,14 +15721,7 @@ export namespace Prisma { > - export type ESelect = $Extensions.GetSelect<{ - id?: boolean - date?: boolean - time?: boolean - ts?: boolean - }, ExtArgs["result"]["e"]> - - export type ESelectScalar = { + export type ESelect = { id?: boolean date?: boolean time?: boolean @@ -16907,15 +15729,27 @@ export namespace Prisma { } - type EGetPayload = $Types.GetResult + export type EGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? E : + S extends undefined ? never : + S extends { include: any } & (EArgs | EFindManyArgs) + ? E + : S extends { select: any } & (EArgs | EFindManyArgs) + ? { + [P in TruthyKeys]: + P extends keyof E ? E[P] : never + } + : E + - type ECountArgs = + type ECountArgs = Omit & { select?: ECountAggregateInputType | true } - export interface EDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['E'], meta: { name: 'E' } } + export interface EDelegate { + /** * Find zero or one E that matches the filter. * @param {EFindUniqueArgs} args - Arguments to find a E @@ -16927,9 +15761,9 @@ export namespace Prisma { * } * }) **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__EClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__EClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + findUnique( + args: SelectSubset + ): HasReject extends True ? Prisma__EClient> : Prisma__EClient | null, null> /** * Find one E that matches the filter or throw an error with \`error.code='P2025'\` @@ -16943,9 +15777,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__EClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow( + args?: SelectSubset + ): Prisma__EClient> /** * Find the first E that matches the filter. @@ -16960,9 +15794,9 @@ export namespace Prisma { * } * }) **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__EClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__EClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + findFirst( + args?: SelectSubset + ): HasReject extends True ? Prisma__EClient> : Prisma__EClient | null, null> /** * Find the first E that matches the filter or @@ -16978,9 +15812,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__EClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow( + args?: SelectSubset + ): Prisma__EClient> /** * Find zero or more Es that matches the filter. @@ -16998,9 +15832,9 @@ export namespace Prisma { * const eWithIdOnly = await prisma.e.findMany({ select: { id: true } }) * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany( + args?: SelectSubset + ): Prisma.PrismaPromise>> /** * Create a E. @@ -17014,9 +15848,9 @@ export namespace Prisma { * }) * **/ - create>( - args: SelectSubset> - ): Prisma__EClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create( + args: SelectSubset + ): Prisma__EClient> /** * Create many Es. @@ -17030,8 +15864,8 @@ export namespace Prisma { * }) * **/ - createMany>( - args?: SelectSubset> + createMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -17046,9 +15880,9 @@ export namespace Prisma { * }) * **/ - delete>( - args: SelectSubset> - ): Prisma__EClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete( + args: SelectSubset + ): Prisma__EClient> /** * Update one E. @@ -17065,9 +15899,9 @@ export namespace Prisma { * }) * **/ - update>( - args: SelectSubset> - ): Prisma__EClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update( + args: SelectSubset + ): Prisma__EClient> /** * Delete zero or more Es. @@ -17081,8 +15915,8 @@ export namespace Prisma { * }) * **/ - deleteMany>( - args?: SelectSubset> + deleteMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -17102,8 +15936,8 @@ export namespace Prisma { * }) * **/ - updateMany>( - args: SelectSubset> + updateMany( + args: SelectSubset ): Prisma.PrismaPromise /** @@ -17123,9 +15957,9 @@ export namespace Prisma { * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__EClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert( + args: SelectSubset + ): Prisma__EClient> /** * Find zero or more Es that matches the filter. @@ -17170,7 +16004,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> + T extends _Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -17288,7 +16122,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__EClient implements Prisma.PrismaPromise { + export class Prisma__EClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -17334,11 +16168,11 @@ export namespace Prisma { /** * E base type for findUnique actions */ - export type EFindUniqueArgsBase = { + export type EFindUniqueArgsBase = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * Filter, which E to fetch. */ @@ -17348,7 +16182,7 @@ export namespace Prisma { /** * E findUnique */ - export interface EFindUniqueArgs extends EFindUniqueArgsBase { + export interface EFindUniqueArgs extends EFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -17360,11 +16194,11 @@ export namespace Prisma { /** * E findUniqueOrThrow */ - export type EFindUniqueOrThrowArgs = { + export type EFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * Filter, which E to fetch. */ @@ -17375,11 +16209,11 @@ export namespace Prisma { /** * E base type for findFirst actions */ - export type EFindFirstArgsBase = { + export type EFindFirstArgsBase = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * Filter, which E to fetch. */ @@ -17419,7 +16253,7 @@ export namespace Prisma { /** * E findFirst */ - export interface EFindFirstArgs extends EFindFirstArgsBase { + export interface EFindFirstArgs extends EFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -17431,11 +16265,11 @@ export namespace Prisma { /** * E findFirstOrThrow */ - export type EFindFirstOrThrowArgs = { + export type EFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * Filter, which E to fetch. */ @@ -17476,11 +16310,11 @@ export namespace Prisma { /** * E findMany */ - export type EFindManyArgs = { + export type EFindManyArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * Filter, which ES to fetch. */ @@ -17516,11 +16350,11 @@ export namespace Prisma { /** * E create */ - export type ECreateArgs = { + export type ECreateArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * The data needed to create a E. */ @@ -17531,7 +16365,7 @@ export namespace Prisma { /** * E createMany */ - export type ECreateManyArgs = { + export type ECreateManyArgs = { /** * The data used to create many ES. */ @@ -17542,11 +16376,11 @@ export namespace Prisma { /** * E update */ - export type EUpdateArgs = { + export type EUpdateArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * The data needed to update a E. */ @@ -17561,7 +16395,7 @@ export namespace Prisma { /** * E updateMany */ - export type EUpdateManyArgs = { + export type EUpdateManyArgs = { /** * The data used to update ES. */ @@ -17576,11 +16410,11 @@ export namespace Prisma { /** * E upsert */ - export type EUpsertArgs = { + export type EUpsertArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * The filter to search for the E to update in case it exists. */ @@ -17599,11 +16433,11 @@ export namespace Prisma { /** * E delete */ - export type EDeleteArgs = { + export type EDeleteArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * Filter which E to delete. */ @@ -17614,7 +16448,7 @@ export namespace Prisma { /** * E deleteMany */ - export type EDeleteManyArgs = { + export type EDeleteManyArgs = { /** * Filter which ES to delete */ @@ -17625,7 +16459,7 @@ export namespace Prisma { /** * E findRaw */ - export type EFindRawArgs = { + export type EFindRawArgs = { /** * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. \${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}. */ @@ -17640,7 +16474,7 @@ export namespace Prisma { /** * E aggregateRaw */ - export type EAggregateRawArgs = { + export type EAggregateRawArgs = { /** * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. \${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}. */ @@ -17655,11 +16489,11 @@ export namespace Prisma { /** * E without action */ - export type EArgs = { + export type EArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null } @@ -17668,37 +16502,61 @@ export namespace Prisma { * Enums */ - export const PostScalarFieldEnum: { + export const AScalarFieldEnum: { id: 'id', - createdAt: 'createdAt', - title: 'title', - content: 'content', - published: 'published', - authorId: 'authorId' + email: 'email', + name: 'name', + int: 'int', + sInt: 'sInt', + bInt: 'bInt' }; - export type PostScalarFieldEnum = (typeof PostScalarFieldEnum)[keyof typeof PostScalarFieldEnum] + export type AScalarFieldEnum = (typeof AScalarFieldEnum)[keyof typeof AScalarFieldEnum] - export const UserScalarFieldEnum: { + export const BScalarFieldEnum: { id: 'id', - email: 'email', - int: 'int', - optionalInt: 'optionalInt', float: 'float', - optionalFloat: 'optionalFloat', - string: 'string', - optionalString: 'optionalString', + dFloat: 'dFloat' + }; + + export type BScalarFieldEnum = (typeof BScalarFieldEnum)[keyof typeof BScalarFieldEnum] + + + export const CScalarFieldEnum: { + id: 'id', + char: 'char', + vChar: 'vChar', + text: 'text', + bit: 'bit', + vBit: 'vBit', + uuid: 'uuid' + }; + + export type CScalarFieldEnum = (typeof CScalarFieldEnum)[keyof typeof CScalarFieldEnum] + + + export const DScalarFieldEnum: { + id: 'id', + bool: 'bool', + byteA: 'byteA', + xml: 'xml', json: 'json', - optionalJson: 'optionalJson', - enum: 'enum', - optionalEnum: 'optionalEnum', - boolean: 'boolean', - optionalBoolean: 'optionalBoolean', - embedHolderId: 'embedHolderId' + jsonb: 'jsonb', + list: 'list' }; - export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum] + export type DScalarFieldEnum = (typeof DScalarFieldEnum)[keyof typeof DScalarFieldEnum] + + + export const EScalarFieldEnum: { + id: 'id', + date: 'date', + time: 'time', + ts: 'ts' + }; + + export type EScalarFieldEnum = (typeof EScalarFieldEnum)[keyof typeof EScalarFieldEnum] export const EmbedHolderScalarFieldEnum: { @@ -17731,9 +16589,9 @@ export namespace Prisma { export type MScalarFieldEnum = (typeof MScalarFieldEnum)[keyof typeof MScalarFieldEnum] - export const NScalarFieldEnum: { + export const ManyRequiredScalarFieldEnum: { id: 'id', - m_ids: 'm_ids', + oneOptionalId: 'oneOptionalId', int: 'int', optionalInt: 'optionalInt', float: 'float', @@ -17748,11 +16606,12 @@ export namespace Prisma { optionalBoolean: 'optionalBoolean' }; - export type NScalarFieldEnum = (typeof NScalarFieldEnum)[keyof typeof NScalarFieldEnum] + export type ManyRequiredScalarFieldEnum = (typeof ManyRequiredScalarFieldEnum)[keyof typeof ManyRequiredScalarFieldEnum] - export const OneOptionalScalarFieldEnum: { + export const NScalarFieldEnum: { id: 'id', + m_ids: 'm_ids', int: 'int', optionalInt: 'optionalInt', float: 'float', @@ -17767,12 +16626,11 @@ export namespace Prisma { optionalBoolean: 'optionalBoolean' }; - export type OneOptionalScalarFieldEnum = (typeof OneOptionalScalarFieldEnum)[keyof typeof OneOptionalScalarFieldEnum] + export type NScalarFieldEnum = (typeof NScalarFieldEnum)[keyof typeof NScalarFieldEnum] - export const ManyRequiredScalarFieldEnum: { + export const OneOptionalScalarFieldEnum: { id: 'id', - oneOptionalId: 'oneOptionalId', int: 'int', optionalInt: 'optionalInt', float: 'float', @@ -17787,7 +16645,7 @@ export namespace Prisma { optionalBoolean: 'optionalBoolean' }; - export type ManyRequiredScalarFieldEnum = (typeof ManyRequiredScalarFieldEnum)[keyof typeof ManyRequiredScalarFieldEnum] + export type OneOptionalScalarFieldEnum = (typeof OneOptionalScalarFieldEnum)[keyof typeof OneOptionalScalarFieldEnum] export const OptionalSide1ScalarFieldEnum: { @@ -17829,61 +16687,24 @@ export namespace Prisma { export type OptionalSide2ScalarFieldEnum = (typeof OptionalSide2ScalarFieldEnum)[keyof typeof OptionalSide2ScalarFieldEnum] - export const AScalarFieldEnum: { - id: 'id', - email: 'email', - name: 'name', - int: 'int', - sInt: 'sInt', - bInt: 'bInt' - }; - - export type AScalarFieldEnum = (typeof AScalarFieldEnum)[keyof typeof AScalarFieldEnum] - - - export const BScalarFieldEnum: { - id: 'id', - float: 'float', - dFloat: 'dFloat' - }; - - export type BScalarFieldEnum = (typeof BScalarFieldEnum)[keyof typeof BScalarFieldEnum] - - - export const CScalarFieldEnum: { - id: 'id', - char: 'char', - vChar: 'vChar', - text: 'text', - bit: 'bit', - vBit: 'vBit', - uuid: 'uuid' - }; - - export type CScalarFieldEnum = (typeof CScalarFieldEnum)[keyof typeof CScalarFieldEnum] - - - export const DScalarFieldEnum: { + export const PostScalarFieldEnum: { id: 'id', - bool: 'bool', - byteA: 'byteA', - xml: 'xml', - json: 'json', - jsonb: 'jsonb', - list: 'list' + createdAt: 'createdAt', + title: 'title', + content: 'content', + published: 'published', + authorId: 'authorId' }; - export type DScalarFieldEnum = (typeof DScalarFieldEnum)[keyof typeof DScalarFieldEnum] + export type PostScalarFieldEnum = (typeof PostScalarFieldEnum)[keyof typeof PostScalarFieldEnum] - export const EScalarFieldEnum: { - id: 'id', - date: 'date', - time: 'time', - ts: 'ts' + export const QueryMode: { + default: 'default', + insensitive: 'insensitive' }; - export type EScalarFieldEnum = (typeof EScalarFieldEnum)[keyof typeof EScalarFieldEnum] + export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] export const SortOrder: { @@ -17894,12 +16715,25 @@ export namespace Prisma { export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] - export const QueryMode: { - default: 'default', - insensitive: 'insensitive' + export const UserScalarFieldEnum: { + id: 'id', + email: 'email', + int: 'int', + optionalInt: 'optionalInt', + float: 'float', + optionalFloat: 'optionalFloat', + string: 'string', + optionalString: 'optionalString', + json: 'json', + optionalJson: 'optionalJson', + enum: 'enum', + optionalEnum: 'optionalEnum', + boolean: 'boolean', + optionalBoolean: 'optionalBoolean', + embedHolderId: 'embedHolderId' }; - export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] + export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum] /** @@ -20101,8 +18935,8 @@ export namespace Prisma { } export type UserRelationFilter = { - is?: UserWhereInput | null - isNot?: UserWhereInput | null + is?: UserWhereInput + isNot?: UserWhereInput } export type PostCountOrderByAggregateInput = { @@ -20288,8 +19122,8 @@ export namespace Prisma { } export type EmbedHolderRelationFilter = { - is?: EmbedHolderWhereInput | null - isNot?: EmbedHolderWhereInput | null + is?: EmbedHolderWhereInput + isNot?: EmbedHolderWhereInput } export type PostOrderByRelationAggregateInput = { diff --git a/packages/client/src/__tests__/integration/happy/exhaustive-schema/__snapshots__/test.ts.snap b/packages/client/src/__tests__/integration/happy/exhaustive-schema/__snapshots__/test.ts.snap index 1092fbdc7c9e..7df226adfdad 100644 --- a/packages/client/src/__tests__/integration/happy/exhaustive-schema/__snapshots__/test.ts.snap +++ b/packages/client/src/__tests__/integration/happy/exhaustive-schema/__snapshots__/test.ts.snap @@ -7,8 +7,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); const { Decimal, objectEnumValues, - makeStrictEnum, - Public, + makeStrictEnum } = require('@prisma/client/runtime/index-browser') @@ -70,19 +69,8 @@ Prisma.raw = () => { throw new Error(\`raw is unable to be run in the browser. In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`, )} -Prisma.validator = Public.validator +Prisma.validator = () => (val) => val -/** -* Extensions -*/ -Prisma.getExtensionContext = () => { - throw new Error(\`Extensions.getExtensionContext is unable to be run in the browser. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`, -)} -Prisma.defineExtension = () => { - throw new Error(\`Extensions.defineExtension is unable to be run in the browser. -In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`, -)} /** * Shorthand utilities for JSON filtering @@ -101,37 +89,61 @@ Prisma.NullTypes = { * Enums */ -exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ - ReadUncommitted: 'ReadUncommitted', - ReadCommitted: 'ReadCommitted', - RepeatableRead: 'RepeatableRead', - Serializable: 'Serializable' -}); - -exports.Prisma.PostScalarFieldEnum = { +exports.Prisma.AScalarFieldEnum = { id: 'id', - createdAt: 'createdAt', - title: 'title', - content: 'content', - published: 'published', - authorId: 'authorId' + email: 'email', + name: 'name', + int: 'int', + sInt: 'sInt', + bInt: 'bInt', + inc_int: 'inc_int', + inc_sInt: 'inc_sInt', + inc_bInt: 'inc_bInt' }; -exports.Prisma.UserScalarFieldEnum = { +exports.Prisma.BScalarFieldEnum = { id: 'id', - email: 'email', - int: 'int', - optionalInt: 'optionalInt', float: 'float', - optionalFloat: 'optionalFloat', - string: 'string', - optionalString: 'optionalString', + dFloat: 'dFloat', + decFloat: 'decFloat', + numFloat: 'numFloat' +}; + +exports.Prisma.CScalarFieldEnum = { + id: 'id', + char: 'char', + vChar: 'vChar', + text: 'text', + bit: 'bit', + vBit: 'vBit', + uuid: 'uuid' +}; + +exports.Prisma.DScalarFieldEnum = { + id: 'id', + bool: 'bool', + byteA: 'byteA', + xml: 'xml', json: 'json', - optionalJson: 'optionalJson', - enum: 'enum', - optionalEnum: 'optionalEnum', - boolean: 'boolean', - optionalBoolean: 'optionalBoolean' + jsonb: 'jsonb', + list: 'list' +}; + +exports.Prisma.EScalarFieldEnum = { + id: 'id', + date: 'date', + time: 'time', + ts: 'ts' +}; + +exports.Prisma.JsonNullValueFilter = { + DbNull: Prisma.DbNull, + JsonNull: Prisma.JsonNull, + AnyNull: Prisma.AnyNull +}; + +exports.Prisma.JsonNullValueInput = { + JsonNull: Prisma.JsonNull }; exports.Prisma.MScalarFieldEnum = { @@ -150,8 +162,9 @@ exports.Prisma.MScalarFieldEnum = { optionalBoolean: 'optionalBoolean' }; -exports.Prisma.NScalarFieldEnum = { +exports.Prisma.ManyRequiredScalarFieldEnum = { id: 'id', + oneOptionalId: 'oneOptionalId', int: 'int', optionalInt: 'optionalInt', float: 'float', @@ -166,7 +179,7 @@ exports.Prisma.NScalarFieldEnum = { optionalBoolean: 'optionalBoolean' }; -exports.Prisma.OneOptionalScalarFieldEnum = { +exports.Prisma.NScalarFieldEnum = { id: 'id', int: 'int', optionalInt: 'optionalInt', @@ -182,9 +195,13 @@ exports.Prisma.OneOptionalScalarFieldEnum = { optionalBoolean: 'optionalBoolean' }; -exports.Prisma.ManyRequiredScalarFieldEnum = { +exports.Prisma.NullableJsonNullValueInput = { + DbNull: Prisma.DbNull, + JsonNull: Prisma.JsonNull +}; + +exports.Prisma.OneOptionalScalarFieldEnum = { id: 'id', - oneOptionalId: 'oneOptionalId', int: 'int', optionalInt: 'optionalInt', float: 'float', @@ -232,51 +249,18 @@ exports.Prisma.OptionalSide2ScalarFieldEnum = { optionalBoolean: 'optionalBoolean' }; -exports.Prisma.AScalarFieldEnum = { - id: 'id', - email: 'email', - name: 'name', - int: 'int', - sInt: 'sInt', - bInt: 'bInt', - inc_int: 'inc_int', - inc_sInt: 'inc_sInt', - inc_bInt: 'inc_bInt' -}; - -exports.Prisma.BScalarFieldEnum = { - id: 'id', - float: 'float', - dFloat: 'dFloat', - decFloat: 'decFloat', - numFloat: 'numFloat' -}; - -exports.Prisma.CScalarFieldEnum = { - id: 'id', - char: 'char', - vChar: 'vChar', - text: 'text', - bit: 'bit', - vBit: 'vBit', - uuid: 'uuid' -}; - -exports.Prisma.DScalarFieldEnum = { +exports.Prisma.PostScalarFieldEnum = { id: 'id', - bool: 'bool', - byteA: 'byteA', - xml: 'xml', - json: 'json', - jsonb: 'jsonb', - list: 'list' + createdAt: 'createdAt', + title: 'title', + content: 'content', + published: 'published', + authorId: 'authorId' }; -exports.Prisma.EScalarFieldEnum = { - id: 'id', - date: 'date', - time: 'time', - ts: 'ts' +exports.Prisma.QueryMode = { + default: 'default', + insensitive: 'insensitive' }; exports.Prisma.SortOrder = { @@ -284,29 +268,28 @@ exports.Prisma.SortOrder = { desc: 'desc' }; -exports.Prisma.JsonNullValueInput = { - JsonNull: Prisma.JsonNull -}; - -exports.Prisma.NullableJsonNullValueInput = { - DbNull: Prisma.DbNull, - JsonNull: Prisma.JsonNull -}; - -exports.Prisma.QueryMode = { - default: 'default', - insensitive: 'insensitive' -}; - -exports.Prisma.NullsOrder = { - first: 'first', - last: 'last' -}; +exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' +}); -exports.Prisma.JsonNullValueFilter = { - DbNull: Prisma.DbNull, - JsonNull: Prisma.JsonNull, - AnyNull: Prisma.AnyNull +exports.Prisma.UserScalarFieldEnum = { + id: 'id', + email: 'email', + int: 'int', + optionalInt: 'optionalInt', + float: 'float', + optionalFloat: 'optionalFloat', + string: 'string', + optionalString: 'optionalString', + json: 'json', + optionalJson: 'optionalJson', + enum: 'enum', + optionalEnum: 'optionalEnum', + boolean: 'boolean', + optionalBoolean: 'optionalBoolean' }; exports.ABeautifulEnum = { A: 'A', @@ -354,324 +337,243 @@ exports[`exhaustive-schema: generatedTypeScript 1`] = ` **/ import * as runtime from '@prisma/client/runtime/{RUNTIME_FILE}'; -import $Types = runtime.Types // general types -import $Public = runtime.Types.Public -import $Utils = runtime.Types.Utils -import $Extensions = runtime.Types.Extensions - -export type PrismaPromise = $Public.PrismaPromise +type UnwrapPromise

= P extends Promise ? R : P +type UnwrapTuple = { + [K in keyof Tuple]: K extends \`\${number}\` ? Tuple[K] extends Prisma.PrismaPromise ? X : UnwrapPromise : UnwrapPromise +}; +export type PrismaPromise = runtime.Types.Public.PrismaPromise -export type PostPayload = { - objects: { - author: UserPayload - } - scalars: $Extensions.GetResult<{ - id: number - createdAt: Date - title: string - content: string | null - published: boolean - authorId: number - }, ExtArgs["result"]["post"]> - composites: {} -} /** * Model Post * */ -export type Post = runtime.Types.DefaultSelection -export type UserPayload = { - objects: { - posts: PostPayload[] - } - scalars: $Extensions.GetResult<{ - id: number - email: string - int: number - optionalInt: number | null - float: number - optionalFloat: number | null - string: string - optionalString: string | null - json: Prisma.JsonValue - optionalJson: Prisma.JsonValue | null - enum: ABeautifulEnum - optionalEnum: ABeautifulEnum | null - boolean: boolean - optionalBoolean: boolean | null - }, ExtArgs["result"]["user"]> - composites: {} +export type Post = { + id: number + createdAt: Date + title: string + content: string | null + published: boolean + authorId: number } /** * Model User * */ -export type User = runtime.Types.DefaultSelection -export type MPayload = { - objects: { - n: NPayload[] - } - scalars: $Extensions.GetResult<{ - id: number - int: number - optionalInt: number | null - float: number - optionalFloat: number | null - string: string - optionalString: string | null - json: Prisma.JsonValue - optionalJson: Prisma.JsonValue | null - enum: ABeautifulEnum - optionalEnum: ABeautifulEnum | null - boolean: boolean - optionalBoolean: boolean | null - }, ExtArgs["result"]["m"]> - composites: {} +export type User = { + id: number + email: string + int: number + optionalInt: number | null + float: number + optionalFloat: number | null + string: string + optionalString: string | null + json: Prisma.JsonValue + optionalJson: Prisma.JsonValue | null + enum: ABeautifulEnum + optionalEnum: ABeautifulEnum | null + boolean: boolean + optionalBoolean: boolean | null } /** * Model M * */ -export type M = runtime.Types.DefaultSelection -export type NPayload = { - objects: { - m: MPayload[] - } - scalars: $Extensions.GetResult<{ - id: number - int: number - optionalInt: number | null - float: number - optionalFloat: number | null - string: string - optionalString: string | null - json: Prisma.JsonValue - optionalJson: Prisma.JsonValue | null - enum: ABeautifulEnum - optionalEnum: ABeautifulEnum | null - boolean: boolean - optionalBoolean: boolean | null - }, ExtArgs["result"]["n"]> - composites: {} +export type M = { + id: number + int: number + optionalInt: number | null + float: number + optionalFloat: number | null + string: string + optionalString: string | null + json: Prisma.JsonValue + optionalJson: Prisma.JsonValue | null + enum: ABeautifulEnum + optionalEnum: ABeautifulEnum | null + boolean: boolean + optionalBoolean: boolean | null } /** * Model N * */ -export type N = runtime.Types.DefaultSelection -export type OneOptionalPayload = { - objects: { - many: ManyRequiredPayload[] - } - scalars: $Extensions.GetResult<{ - id: number - int: number - optionalInt: number | null - float: number - optionalFloat: number | null - string: string - optionalString: string | null - json: Prisma.JsonValue - optionalJson: Prisma.JsonValue | null - enum: ABeautifulEnum - optionalEnum: ABeautifulEnum | null - boolean: boolean - optionalBoolean: boolean | null - }, ExtArgs["result"]["oneOptional"]> - composites: {} +export type N = { + id: number + int: number + optionalInt: number | null + float: number + optionalFloat: number | null + string: string + optionalString: string | null + json: Prisma.JsonValue + optionalJson: Prisma.JsonValue | null + enum: ABeautifulEnum + optionalEnum: ABeautifulEnum | null + boolean: boolean + optionalBoolean: boolean | null } /** * Model OneOptional * */ -export type OneOptional = runtime.Types.DefaultSelection -export type ManyRequiredPayload = { - objects: { - one: OneOptionalPayload | null - } - scalars: $Extensions.GetResult<{ - id: number - oneOptionalId: number | null - int: number - optionalInt: number | null - float: number - optionalFloat: number | null - string: string - optionalString: string | null - json: Prisma.JsonValue - optionalJson: Prisma.JsonValue | null - enum: ABeautifulEnum - optionalEnum: ABeautifulEnum | null - boolean: boolean - optionalBoolean: boolean | null - }, ExtArgs["result"]["manyRequired"]> - composites: {} +export type OneOptional = { + id: number + int: number + optionalInt: number | null + float: number + optionalFloat: number | null + string: string + optionalString: string | null + json: Prisma.JsonValue + optionalJson: Prisma.JsonValue | null + enum: ABeautifulEnum + optionalEnum: ABeautifulEnum | null + boolean: boolean + optionalBoolean: boolean | null } /** * Model ManyRequired * */ -export type ManyRequired = runtime.Types.DefaultSelection -export type OptionalSide1Payload = { - objects: { - opti: OptionalSide2Payload | null - } - scalars: $Extensions.GetResult<{ - id: number - optionalSide2Id: number | null - int: number - optionalInt: number | null - float: number - optionalFloat: number | null - string: string - optionalString: string | null - json: Prisma.JsonValue - optionalJson: Prisma.JsonValue | null - enum: ABeautifulEnum - optionalEnum: ABeautifulEnum | null - boolean: boolean - optionalBoolean: boolean | null - }, ExtArgs["result"]["optionalSide1"]> - composites: {} +export type ManyRequired = { + id: number + oneOptionalId: number | null + int: number + optionalInt: number | null + float: number + optionalFloat: number | null + string: string + optionalString: string | null + json: Prisma.JsonValue + optionalJson: Prisma.JsonValue | null + enum: ABeautifulEnum + optionalEnum: ABeautifulEnum | null + boolean: boolean + optionalBoolean: boolean | null } /** * Model OptionalSide1 * */ -export type OptionalSide1 = runtime.Types.DefaultSelection -export type OptionalSide2Payload = { - objects: { - opti: OptionalSide1Payload | null - } - scalars: $Extensions.GetResult<{ - id: number - int: number - optionalInt: number | null - float: number - optionalFloat: number | null - string: string - optionalString: string | null - json: Prisma.JsonValue - optionalJson: Prisma.JsonValue | null - enum: ABeautifulEnum - optionalEnum: ABeautifulEnum | null - boolean: boolean - optionalBoolean: boolean | null - }, ExtArgs["result"]["optionalSide2"]> - composites: {} +export type OptionalSide1 = { + id: number + optionalSide2Id: number | null + int: number + optionalInt: number | null + float: number + optionalFloat: number | null + string: string + optionalString: string | null + json: Prisma.JsonValue + optionalJson: Prisma.JsonValue | null + enum: ABeautifulEnum + optionalEnum: ABeautifulEnum | null + boolean: boolean + optionalBoolean: boolean | null } /** * Model OptionalSide2 * */ -export type OptionalSide2 = runtime.Types.DefaultSelection -export type APayload = { - objects: {} - scalars: $Extensions.GetResult<{ - /** - * field comment 1 - */ - id: string - email: string - name: string | null - /** - * field comment 2 - */ - int: number - sInt: number - bInt: bigint - inc_int: number - inc_sInt: number - inc_bInt: bigint - }, ExtArgs["result"]["a"]> - composites: {} +export type OptionalSide2 = { + id: number + int: number + optionalInt: number | null + float: number + optionalFloat: number | null + string: string + optionalString: string | null + json: Prisma.JsonValue + optionalJson: Prisma.JsonValue | null + enum: ABeautifulEnum + optionalEnum: ABeautifulEnum | null + boolean: boolean + optionalBoolean: boolean | null } /** * Model A * model comment */ -export type A = runtime.Types.DefaultSelection -export type BPayload = { - objects: {} - scalars: $Extensions.GetResult<{ - id: string - float: number - dFloat: number - decFloat: Prisma.Decimal - numFloat: Prisma.Decimal - }, ExtArgs["result"]["b"]> - composites: {} +export type A = { + /** + * field comment 1 + */ + id: string + email: string + name: string | null + /** + * field comment 2 + */ + int: number + sInt: number + bInt: bigint + inc_int: number + inc_sInt: number + inc_bInt: bigint } /** * Model B * */ -export type B = runtime.Types.DefaultSelection -export type CPayload = { - objects: {} - scalars: $Extensions.GetResult<{ - id: string - char: string - vChar: string - text: string - bit: string - vBit: string - uuid: string - }, ExtArgs["result"]["c"]> - composites: {} +export type B = { + id: string + float: number + dFloat: number + decFloat: Prisma.Decimal + numFloat: Prisma.Decimal } /** * Model C * */ -export type C = runtime.Types.DefaultSelection -export type DPayload = { - objects: {} - scalars: $Extensions.GetResult<{ - id: string - bool: boolean - byteA: Buffer - xml: string - json: Prisma.JsonValue - jsonb: Prisma.JsonValue - list: number[] - }, ExtArgs["result"]["d"]> - composites: {} +export type C = { + id: string + char: string + vChar: string + text: string + bit: string + vBit: string + uuid: string } /** * Model D * */ -export type D = runtime.Types.DefaultSelection -export type EPayload = { - objects: {} - scalars: $Extensions.GetResult<{ - id: string - date: Date - time: Date - ts: Date - }, ExtArgs["result"]["e"]> - composites: {} +export type D = { + id: string + bool: boolean + byteA: Buffer + xml: string + json: Prisma.JsonValue + jsonb: Prisma.JsonValue + list: number[] } /** * Model E * */ -export type E = runtime.Types.DefaultSelection +export type E = { + id: string + date: Date + time: Date + ts: Date +} + /** * Enums @@ -705,11 +607,8 @@ export class PrismaClient< U = 'log' extends keyof T ? T['log'] extends Array ? Prisma.GetEvents : never : never, GlobalReject extends Prisma.RejectOnNotFound | Prisma.RejectPerOperation | false | undefined = 'rejectOnNotFound' extends keyof T ? T['rejectOnNotFound'] - : false, - ExtArgs extends $Extensions.Args = $Extensions.DefaultArgs -> { - [K: symbol]: { types: Prisma.TypeMap['other'] } - + : false + > { /** * ## Prisma Client ʲˢ * @@ -740,8 +639,6 @@ export class PrismaClient< /** * Add a middleware - * @deprecated since 4.16.0. For new code, prefer client extensions instead. - * @see https://pris.ly/d/extensions */ $use(cb: Prisma.Middleware): void @@ -804,12 +701,9 @@ export class PrismaClient< * * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions). */ - $transaction

[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): Promise> - - $transaction(fn: (prisma: Omit) => Promise, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): Promise + $transaction

[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): Promise> - - $extends: $Extensions.ExtendsHook<'extends', Prisma.TypeMapCb, ExtArgs> + $transaction(fn: (prisma: Omit) => Promise, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): Promise /** * \`prisma.post\`: Exposes CRUD operations for the **Post** model. @@ -819,7 +713,7 @@ export class PrismaClient< * const posts = await prisma.post.findMany() * \`\`\` */ - get post(): Prisma.PostDelegate; + get post(): Prisma.PostDelegate; /** * \`prisma.user\`: Exposes CRUD operations for the **User** model. @@ -829,7 +723,7 @@ export class PrismaClient< * const users = await prisma.user.findMany() * \`\`\` */ - get user(): Prisma.UserDelegate; + get user(): Prisma.UserDelegate; /** * \`prisma.m\`: Exposes CRUD operations for the **M** model. @@ -839,7 +733,7 @@ export class PrismaClient< * const ms = await prisma.m.findMany() * \`\`\` */ - get m(): Prisma.MDelegate; + get m(): Prisma.MDelegate; /** * \`prisma.n\`: Exposes CRUD operations for the **N** model. @@ -849,7 +743,7 @@ export class PrismaClient< * const ns = await prisma.n.findMany() * \`\`\` */ - get n(): Prisma.NDelegate; + get n(): Prisma.NDelegate; /** * \`prisma.oneOptional\`: Exposes CRUD operations for the **OneOptional** model. @@ -859,7 +753,7 @@ export class PrismaClient< * const oneOptionals = await prisma.oneOptional.findMany() * \`\`\` */ - get oneOptional(): Prisma.OneOptionalDelegate; + get oneOptional(): Prisma.OneOptionalDelegate; /** * \`prisma.manyRequired\`: Exposes CRUD operations for the **ManyRequired** model. @@ -869,7 +763,7 @@ export class PrismaClient< * const manyRequireds = await prisma.manyRequired.findMany() * \`\`\` */ - get manyRequired(): Prisma.ManyRequiredDelegate; + get manyRequired(): Prisma.ManyRequiredDelegate; /** * \`prisma.optionalSide1\`: Exposes CRUD operations for the **OptionalSide1** model. @@ -879,7 +773,7 @@ export class PrismaClient< * const optionalSide1s = await prisma.optionalSide1.findMany() * \`\`\` */ - get optionalSide1(): Prisma.OptionalSide1Delegate; + get optionalSide1(): Prisma.OptionalSide1Delegate; /** * \`prisma.optionalSide2\`: Exposes CRUD operations for the **OptionalSide2** model. @@ -889,7 +783,7 @@ export class PrismaClient< * const optionalSide2s = await prisma.optionalSide2.findMany() * \`\`\` */ - get optionalSide2(): Prisma.OptionalSide2Delegate; + get optionalSide2(): Prisma.OptionalSide2Delegate; /** * \`prisma.a\`: Exposes CRUD operations for the **A** model. @@ -899,7 +793,7 @@ export class PrismaClient< * const as = await prisma.a.findMany() * \`\`\` */ - get a(): Prisma.ADelegate; + get a(): Prisma.ADelegate; /** * \`prisma.b\`: Exposes CRUD operations for the **B** model. @@ -909,7 +803,7 @@ export class PrismaClient< * const bs = await prisma.b.findMany() * \`\`\` */ - get b(): Prisma.BDelegate; + get b(): Prisma.BDelegate; /** * \`prisma.c\`: Exposes CRUD operations for the **C** model. @@ -919,7 +813,7 @@ export class PrismaClient< * const cs = await prisma.c.findMany() * \`\`\` */ - get c(): Prisma.CDelegate; + get c(): Prisma.CDelegate; /** * \`prisma.d\`: Exposes CRUD operations for the **D** model. @@ -929,7 +823,7 @@ export class PrismaClient< * const ds = await prisma.d.findMany() * \`\`\` */ - get d(): Prisma.DDelegate; + get d(): Prisma.DDelegate; /** * \`prisma.e\`: Exposes CRUD operations for the **E** model. @@ -939,18 +833,13 @@ export class PrismaClient< * const es = await prisma.e.findMany() * \`\`\` */ - get e(): Prisma.EDelegate; + get e(): Prisma.EDelegate; } export namespace Prisma { export import DMMF = runtime.DMMF - export type PrismaPromise = $Public.PrismaPromise - - /** - * Validator - */ - export import validator = runtime.Public.validator + export type PrismaPromise = runtime.Types.Public.PrismaPromise /** * Prisma Errors @@ -986,15 +875,6 @@ export namespace Prisma { export type MetricHistogram = runtime.MetricHistogram export type MetricHistogramBucket = runtime.MetricHistogramBucket - /** - * Extensions - */ - export type Extension = $Extensions.UserArgs - export import getExtensionContext = runtime.Extensions.getExtensionContext - export type Args = $Public.Args - export type Payload = $Public.Payload - export type Result = $Public.Result - export type Exact = $Public.Exact /** * Prisma Client JS version: local @@ -1366,7 +1246,7 @@ export namespace Prisma { export const type: unique symbol; - + export function validator(): (select: runtime.Types.Utils.LegacyExact) => S; /** * Used by group by @@ -1445,1044 +1325,6 @@ export namespace Prisma { db?: Datasource } - - interface TypeMapCb extends $Utils.Fn<{extArgs: $Extensions.Args}, $Utils.Record> { - returns: Prisma.TypeMap - } - - export type TypeMap = { - meta: { - modelProps: 'post' | 'user' | 'm' | 'n' | 'oneOptional' | 'manyRequired' | 'optionalSide1' | 'optionalSide2' | 'a' | 'b' | 'c' | 'd' | 'e' - txIsolationLevel: Prisma.TransactionIsolationLevel - }, - model: { - Post: { - findUnique: { - args: Prisma.PostFindUniqueArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - findUniqueOrThrow: { - args: Prisma.PostFindUniqueOrThrowArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - findFirst: { - args: Prisma.PostFindFirstArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - findFirstOrThrow: { - args: Prisma.PostFindFirstOrThrowArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - findMany: { - args: Prisma.PostFindManyArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - create: { - args: Prisma.PostCreateArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - createMany: { - args: Prisma.PostCreateManyArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - delete: { - args: Prisma.PostDeleteArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - update: { - args: Prisma.PostUpdateArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - deleteMany: { - args: Prisma.PostDeleteManyArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - updateMany: { - args: Prisma.PostUpdateManyArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - upsert: { - args: Prisma.PostUpsertArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - aggregate: { - args: Prisma.PostAggregateArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - groupBy: { - args: Prisma.PostGroupByArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - count: { - args: Prisma.PostCountArgs, - result: $Utils.OptionalFlat - payload: PostPayload - } - } - User: { - findUnique: { - args: Prisma.UserFindUniqueArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - findUniqueOrThrow: { - args: Prisma.UserFindUniqueOrThrowArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - findFirst: { - args: Prisma.UserFindFirstArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - findFirstOrThrow: { - args: Prisma.UserFindFirstOrThrowArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - findMany: { - args: Prisma.UserFindManyArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - create: { - args: Prisma.UserCreateArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - createMany: { - args: Prisma.UserCreateManyArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - delete: { - args: Prisma.UserDeleteArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - update: { - args: Prisma.UserUpdateArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - deleteMany: { - args: Prisma.UserDeleteManyArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - updateMany: { - args: Prisma.UserUpdateManyArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - upsert: { - args: Prisma.UserUpsertArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - aggregate: { - args: Prisma.UserAggregateArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - groupBy: { - args: Prisma.UserGroupByArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - count: { - args: Prisma.UserCountArgs, - result: $Utils.OptionalFlat - payload: UserPayload - } - } - M: { - findUnique: { - args: Prisma.MFindUniqueArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - findUniqueOrThrow: { - args: Prisma.MFindUniqueOrThrowArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - findFirst: { - args: Prisma.MFindFirstArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - findFirstOrThrow: { - args: Prisma.MFindFirstOrThrowArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - findMany: { - args: Prisma.MFindManyArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - create: { - args: Prisma.MCreateArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - createMany: { - args: Prisma.MCreateManyArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - delete: { - args: Prisma.MDeleteArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - update: { - args: Prisma.MUpdateArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - deleteMany: { - args: Prisma.MDeleteManyArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - updateMany: { - args: Prisma.MUpdateManyArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - upsert: { - args: Prisma.MUpsertArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - aggregate: { - args: Prisma.MAggregateArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - groupBy: { - args: Prisma.MGroupByArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - count: { - args: Prisma.MCountArgs, - result: $Utils.OptionalFlat - payload: MPayload - } - } - N: { - findUnique: { - args: Prisma.NFindUniqueArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - findUniqueOrThrow: { - args: Prisma.NFindUniqueOrThrowArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - findFirst: { - args: Prisma.NFindFirstArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - findFirstOrThrow: { - args: Prisma.NFindFirstOrThrowArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - findMany: { - args: Prisma.NFindManyArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - create: { - args: Prisma.NCreateArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - createMany: { - args: Prisma.NCreateManyArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - delete: { - args: Prisma.NDeleteArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - update: { - args: Prisma.NUpdateArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - deleteMany: { - args: Prisma.NDeleteManyArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - updateMany: { - args: Prisma.NUpdateManyArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - upsert: { - args: Prisma.NUpsertArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - aggregate: { - args: Prisma.NAggregateArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - groupBy: { - args: Prisma.NGroupByArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - count: { - args: Prisma.NCountArgs, - result: $Utils.OptionalFlat - payload: NPayload - } - } - OneOptional: { - findUnique: { - args: Prisma.OneOptionalFindUniqueArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - findUniqueOrThrow: { - args: Prisma.OneOptionalFindUniqueOrThrowArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - findFirst: { - args: Prisma.OneOptionalFindFirstArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - findFirstOrThrow: { - args: Prisma.OneOptionalFindFirstOrThrowArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - findMany: { - args: Prisma.OneOptionalFindManyArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - create: { - args: Prisma.OneOptionalCreateArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - createMany: { - args: Prisma.OneOptionalCreateManyArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - delete: { - args: Prisma.OneOptionalDeleteArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - update: { - args: Prisma.OneOptionalUpdateArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - deleteMany: { - args: Prisma.OneOptionalDeleteManyArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - updateMany: { - args: Prisma.OneOptionalUpdateManyArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - upsert: { - args: Prisma.OneOptionalUpsertArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - aggregate: { - args: Prisma.OneOptionalAggregateArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - groupBy: { - args: Prisma.OneOptionalGroupByArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - count: { - args: Prisma.OneOptionalCountArgs, - result: $Utils.OptionalFlat - payload: OneOptionalPayload - } - } - ManyRequired: { - findUnique: { - args: Prisma.ManyRequiredFindUniqueArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - findUniqueOrThrow: { - args: Prisma.ManyRequiredFindUniqueOrThrowArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - findFirst: { - args: Prisma.ManyRequiredFindFirstArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - findFirstOrThrow: { - args: Prisma.ManyRequiredFindFirstOrThrowArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - findMany: { - args: Prisma.ManyRequiredFindManyArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - create: { - args: Prisma.ManyRequiredCreateArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - createMany: { - args: Prisma.ManyRequiredCreateManyArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - delete: { - args: Prisma.ManyRequiredDeleteArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - update: { - args: Prisma.ManyRequiredUpdateArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - deleteMany: { - args: Prisma.ManyRequiredDeleteManyArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - updateMany: { - args: Prisma.ManyRequiredUpdateManyArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - upsert: { - args: Prisma.ManyRequiredUpsertArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - aggregate: { - args: Prisma.ManyRequiredAggregateArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - groupBy: { - args: Prisma.ManyRequiredGroupByArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - count: { - args: Prisma.ManyRequiredCountArgs, - result: $Utils.OptionalFlat - payload: ManyRequiredPayload - } - } - OptionalSide1: { - findUnique: { - args: Prisma.OptionalSide1FindUniqueArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - findUniqueOrThrow: { - args: Prisma.OptionalSide1FindUniqueOrThrowArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - findFirst: { - args: Prisma.OptionalSide1FindFirstArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - findFirstOrThrow: { - args: Prisma.OptionalSide1FindFirstOrThrowArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - findMany: { - args: Prisma.OptionalSide1FindManyArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - create: { - args: Prisma.OptionalSide1CreateArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - createMany: { - args: Prisma.OptionalSide1CreateManyArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - delete: { - args: Prisma.OptionalSide1DeleteArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - update: { - args: Prisma.OptionalSide1UpdateArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - deleteMany: { - args: Prisma.OptionalSide1DeleteManyArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - updateMany: { - args: Prisma.OptionalSide1UpdateManyArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - upsert: { - args: Prisma.OptionalSide1UpsertArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - aggregate: { - args: Prisma.OptionalSide1AggregateArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - groupBy: { - args: Prisma.OptionalSide1GroupByArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - count: { - args: Prisma.OptionalSide1CountArgs, - result: $Utils.OptionalFlat - payload: OptionalSide1Payload - } - } - OptionalSide2: { - findUnique: { - args: Prisma.OptionalSide2FindUniqueArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - findUniqueOrThrow: { - args: Prisma.OptionalSide2FindUniqueOrThrowArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - findFirst: { - args: Prisma.OptionalSide2FindFirstArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - findFirstOrThrow: { - args: Prisma.OptionalSide2FindFirstOrThrowArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - findMany: { - args: Prisma.OptionalSide2FindManyArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - create: { - args: Prisma.OptionalSide2CreateArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - createMany: { - args: Prisma.OptionalSide2CreateManyArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - delete: { - args: Prisma.OptionalSide2DeleteArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - update: { - args: Prisma.OptionalSide2UpdateArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - deleteMany: { - args: Prisma.OptionalSide2DeleteManyArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - updateMany: { - args: Prisma.OptionalSide2UpdateManyArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - upsert: { - args: Prisma.OptionalSide2UpsertArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - aggregate: { - args: Prisma.OptionalSide2AggregateArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - groupBy: { - args: Prisma.OptionalSide2GroupByArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - count: { - args: Prisma.OptionalSide2CountArgs, - result: $Utils.OptionalFlat - payload: OptionalSide2Payload - } - } - A: { - findUnique: { - args: Prisma.AFindUniqueArgs, - result: $Utils.OptionalFlat - payload: APayload - } - findUniqueOrThrow: { - args: Prisma.AFindUniqueOrThrowArgs, - result: $Utils.OptionalFlat - payload: APayload - } - findFirst: { - args: Prisma.AFindFirstArgs, - result: $Utils.OptionalFlat - payload: APayload - } - findFirstOrThrow: { - args: Prisma.AFindFirstOrThrowArgs, - result: $Utils.OptionalFlat - payload: APayload - } - findMany: { - args: Prisma.AFindManyArgs, - result: $Utils.OptionalFlat - payload: APayload - } - create: { - args: Prisma.ACreateArgs, - result: $Utils.OptionalFlat - payload: APayload - } - createMany: { - args: Prisma.ACreateManyArgs, - result: $Utils.OptionalFlat - payload: APayload - } - delete: { - args: Prisma.ADeleteArgs, - result: $Utils.OptionalFlat - payload: APayload - } - update: { - args: Prisma.AUpdateArgs, - result: $Utils.OptionalFlat - payload: APayload - } - deleteMany: { - args: Prisma.ADeleteManyArgs, - result: $Utils.OptionalFlat - payload: APayload - } - updateMany: { - args: Prisma.AUpdateManyArgs, - result: $Utils.OptionalFlat - payload: APayload - } - upsert: { - args: Prisma.AUpsertArgs, - result: $Utils.OptionalFlat - payload: APayload - } - aggregate: { - args: Prisma.AAggregateArgs, - result: $Utils.OptionalFlat - payload: APayload - } - groupBy: { - args: Prisma.AGroupByArgs, - result: $Utils.OptionalFlat - payload: APayload - } - count: { - args: Prisma.ACountArgs, - result: $Utils.OptionalFlat - payload: APayload - } - } - B: { - findUnique: { - args: Prisma.BFindUniqueArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - findUniqueOrThrow: { - args: Prisma.BFindUniqueOrThrowArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - findFirst: { - args: Prisma.BFindFirstArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - findFirstOrThrow: { - args: Prisma.BFindFirstOrThrowArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - findMany: { - args: Prisma.BFindManyArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - create: { - args: Prisma.BCreateArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - createMany: { - args: Prisma.BCreateManyArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - delete: { - args: Prisma.BDeleteArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - update: { - args: Prisma.BUpdateArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - deleteMany: { - args: Prisma.BDeleteManyArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - updateMany: { - args: Prisma.BUpdateManyArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - upsert: { - args: Prisma.BUpsertArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - aggregate: { - args: Prisma.BAggregateArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - groupBy: { - args: Prisma.BGroupByArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - count: { - args: Prisma.BCountArgs, - result: $Utils.OptionalFlat - payload: BPayload - } - } - C: { - findUnique: { - args: Prisma.CFindUniqueArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - findUniqueOrThrow: { - args: Prisma.CFindUniqueOrThrowArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - findFirst: { - args: Prisma.CFindFirstArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - findFirstOrThrow: { - args: Prisma.CFindFirstOrThrowArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - findMany: { - args: Prisma.CFindManyArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - create: { - args: Prisma.CCreateArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - createMany: { - args: Prisma.CCreateManyArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - delete: { - args: Prisma.CDeleteArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - update: { - args: Prisma.CUpdateArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - deleteMany: { - args: Prisma.CDeleteManyArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - updateMany: { - args: Prisma.CUpdateManyArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - upsert: { - args: Prisma.CUpsertArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - aggregate: { - args: Prisma.CAggregateArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - groupBy: { - args: Prisma.CGroupByArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - count: { - args: Prisma.CCountArgs, - result: $Utils.OptionalFlat - payload: CPayload - } - } - D: { - findUnique: { - args: Prisma.DFindUniqueArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - findUniqueOrThrow: { - args: Prisma.DFindUniqueOrThrowArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - findFirst: { - args: Prisma.DFindFirstArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - findFirstOrThrow: { - args: Prisma.DFindFirstOrThrowArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - findMany: { - args: Prisma.DFindManyArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - create: { - args: Prisma.DCreateArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - createMany: { - args: Prisma.DCreateManyArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - delete: { - args: Prisma.DDeleteArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - update: { - args: Prisma.DUpdateArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - deleteMany: { - args: Prisma.DDeleteManyArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - updateMany: { - args: Prisma.DUpdateManyArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - upsert: { - args: Prisma.DUpsertArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - aggregate: { - args: Prisma.DAggregateArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - groupBy: { - args: Prisma.DGroupByArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - count: { - args: Prisma.DCountArgs, - result: $Utils.OptionalFlat - payload: DPayload - } - } - E: { - findUnique: { - args: Prisma.EFindUniqueArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - findUniqueOrThrow: { - args: Prisma.EFindUniqueOrThrowArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - findFirst: { - args: Prisma.EFindFirstArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - findFirstOrThrow: { - args: Prisma.EFindFirstOrThrowArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - findMany: { - args: Prisma.EFindManyArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - create: { - args: Prisma.ECreateArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - createMany: { - args: Prisma.ECreateManyArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - delete: { - args: Prisma.EDeleteArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - update: { - args: Prisma.EUpdateArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - deleteMany: { - args: Prisma.EDeleteManyArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - updateMany: { - args: Prisma.EUpdateManyArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - upsert: { - args: Prisma.EUpsertArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - aggregate: { - args: Prisma.EAggregateArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - groupBy: { - args: Prisma.EGroupByArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - count: { - args: Prisma.ECountArgs, - result: $Utils.OptionalFlat - payload: EPayload - } - } - } - } & { - other: { - $executeRawUnsafe: { - args: [query: string, ...values: any[]], - result: any - payload: any - } - $executeRaw: { - args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]], - result: any - payload: any - } - $queryRawUnsafe: { - args: [query: string, ...values: any[]], - result: any - payload: any - } - $queryRaw: { - args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]], - result: any - payload: any - } - } - } - export const defineExtension: $Extensions.ExtendsHook<'define', Prisma.TypeMapCb, $Extensions.DefaultArgs> export type DefaultPrismaClient = PrismaClient export type RejectOnNotFound = boolean | ((error: Error) => Error) export type RejectPerModel = { [P in ModelName]?: RejectOnNotFound } @@ -2623,7 +1465,7 @@ export namespace Prisma { /** * \`PrismaClient\` proxy available in interactive transactions. */ - export type TransactionClient = Omit + export type TransactionClient = Omit export type Datasource = { url?: string @@ -2643,28 +1485,36 @@ export namespace Prisma { posts: number } - export type UserCountOutputTypeSelect = { - posts?: boolean | UserCountOutputTypeCountPostsArgs + export type UserCountOutputTypeSelect = { + posts?: boolean } + export type UserCountOutputTypeGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? UserCountOutputType : + S extends undefined ? never : + S extends { include: any } & (UserCountOutputTypeArgs) + ? UserCountOutputType + : S extends { select: any } & (UserCountOutputTypeArgs) + ? { + [P in TruthyKeys]: + P extends keyof UserCountOutputType ? UserCountOutputType[P] : never + } + : UserCountOutputType + + + + // Custom InputTypes /** * UserCountOutputType without action */ - export type UserCountOutputTypeArgs = { + export type UserCountOutputTypeArgs = { /** * Select specific fields to fetch from the UserCountOutputType */ - select?: UserCountOutputTypeSelect | null - } - - - /** - * UserCountOutputType without action - */ - export type UserCountOutputTypeCountPostsArgs = { - where?: PostWhereInput + select?: UserCountOutputTypeSelect | null } @@ -2678,28 +1528,36 @@ export namespace Prisma { n: number } - export type MCountOutputTypeSelect = { - n?: boolean | MCountOutputTypeCountNArgs + export type MCountOutputTypeSelect = { + n?: boolean } + export type MCountOutputTypeGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? MCountOutputType : + S extends undefined ? never : + S extends { include: any } & (MCountOutputTypeArgs) + ? MCountOutputType + : S extends { select: any } & (MCountOutputTypeArgs) + ? { + [P in TruthyKeys]: + P extends keyof MCountOutputType ? MCountOutputType[P] : never + } + : MCountOutputType + + + + // Custom InputTypes /** * MCountOutputType without action */ - export type MCountOutputTypeArgs = { + export type MCountOutputTypeArgs = { /** * Select specific fields to fetch from the MCountOutputType */ - select?: MCountOutputTypeSelect | null - } - - - /** - * MCountOutputType without action - */ - export type MCountOutputTypeCountNArgs = { - where?: NWhereInput + select?: MCountOutputTypeSelect | null } @@ -2713,28 +1571,36 @@ export namespace Prisma { m: number } - export type NCountOutputTypeSelect = { - m?: boolean | NCountOutputTypeCountMArgs + export type NCountOutputTypeSelect = { + m?: boolean } + export type NCountOutputTypeGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? NCountOutputType : + S extends undefined ? never : + S extends { include: any } & (NCountOutputTypeArgs) + ? NCountOutputType + : S extends { select: any } & (NCountOutputTypeArgs) + ? { + [P in TruthyKeys]: + P extends keyof NCountOutputType ? NCountOutputType[P] : never + } + : NCountOutputType + + + + // Custom InputTypes /** * NCountOutputType without action */ - export type NCountOutputTypeArgs = { + export type NCountOutputTypeArgs = { /** * Select specific fields to fetch from the NCountOutputType */ - select?: NCountOutputTypeSelect | null - } - - - /** - * NCountOutputType without action - */ - export type NCountOutputTypeCountMArgs = { - where?: MWhereInput + select?: NCountOutputTypeSelect | null } @@ -2748,28 +1614,36 @@ export namespace Prisma { many: number } - export type OneOptionalCountOutputTypeSelect = { - many?: boolean | OneOptionalCountOutputTypeCountManyArgs + export type OneOptionalCountOutputTypeSelect = { + many?: boolean } - // Custom InputTypes + export type OneOptionalCountOutputTypeGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? OneOptionalCountOutputType : + S extends undefined ? never : + S extends { include: any } & (OneOptionalCountOutputTypeArgs) + ? OneOptionalCountOutputType + : S extends { select: any } & (OneOptionalCountOutputTypeArgs) + ? { + [P in TruthyKeys]: + P extends keyof OneOptionalCountOutputType ? OneOptionalCountOutputType[P] : never + } + : OneOptionalCountOutputType + - /** - * OneOptionalCountOutputType without action - */ - export type OneOptionalCountOutputTypeArgs = { - /** - * Select specific fields to fetch from the OneOptionalCountOutputType - */ - select?: OneOptionalCountOutputTypeSelect | null - } + // Custom InputTypes + /** * OneOptionalCountOutputType without action */ - export type OneOptionalCountOutputTypeCountManyArgs = { - where?: ManyRequiredWhereInput + export type OneOptionalCountOutputTypeArgs = { + /** + * Select specific fields to fetch from the OneOptionalCountOutputType + */ + select?: OneOptionalCountOutputTypeSelect | null } @@ -2868,7 +1742,7 @@ export namespace Prisma { _all?: true } - export type PostAggregateArgs = { + export type PostAggregateArgs = { /** * Filter which Post to aggregate. */ @@ -2940,7 +1814,7 @@ export namespace Prisma { - export type PostGroupByArgs = { + export type PostGroupByArgs = { where?: PostWhereInput orderBy?: Enumerable by: PostScalarFieldEnum[] @@ -2983,39 +1857,45 @@ export namespace Prisma { > - export type PostSelect = $Extensions.GetSelect<{ - id?: boolean - createdAt?: boolean - title?: boolean - content?: boolean - published?: boolean - authorId?: boolean - author?: boolean | UserArgs - }, ExtArgs["result"]["post"]> - - export type PostSelectScalar = { + export type PostSelect = { id?: boolean createdAt?: boolean title?: boolean content?: boolean published?: boolean authorId?: boolean + author?: boolean | UserArgs } - export type PostInclude = { - author?: boolean | UserArgs + + export type PostInclude = { + author?: boolean | UserArgs } + export type PostGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? Post : + S extends undefined ? never : + S extends { include: any } & (PostArgs | PostFindManyArgs) + ? Post & { + [P in TruthyKeys]: + P extends 'author' ? UserGetPayload : never + } + : S extends { select: any } & (PostArgs | PostFindManyArgs) + ? { + [P in TruthyKeys]: + P extends 'author' ? UserGetPayload : P extends keyof Post ? Post[P] : never + } + : Post - type PostGetPayload = $Types.GetResult - type PostCountArgs = + type PostCountArgs = Omit & { select?: PostCountAggregateInputType | true } - export interface PostDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Post'], meta: { name: 'Post' } } + export interface PostDelegate { + /** * Find zero or one Post that matches the filter. * @param {PostFindUniqueArgs} args - Arguments to find a Post @@ -3027,9 +1907,9 @@ export namespace Prisma { * } * }) **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__PostClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__PostClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + findUnique( + args: SelectSubset + ): HasReject extends True ? Prisma__PostClient> : Prisma__PostClient | null, null> /** * Find one Post that matches the filter or throw an error with \`error.code='P2025'\` @@ -3043,9 +1923,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__PostClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow( + args?: SelectSubset + ): Prisma__PostClient> /** * Find the first Post that matches the filter. @@ -3060,9 +1940,9 @@ export namespace Prisma { * } * }) **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__PostClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__PostClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + findFirst( + args?: SelectSubset + ): HasReject extends True ? Prisma__PostClient> : Prisma__PostClient | null, null> /** * Find the first Post that matches the filter or @@ -3078,9 +1958,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__PostClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow( + args?: SelectSubset + ): Prisma__PostClient> /** * Find zero or more Posts that matches the filter. @@ -3098,9 +1978,9 @@ export namespace Prisma { * const postWithIdOnly = await prisma.post.findMany({ select: { id: true } }) * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany( + args?: SelectSubset + ): Prisma.PrismaPromise>> /** * Create a Post. @@ -3114,9 +1994,9 @@ export namespace Prisma { * }) * **/ - create>( - args: SelectSubset> - ): Prisma__PostClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create( + args: SelectSubset + ): Prisma__PostClient> /** * Create many Posts. @@ -3130,8 +2010,8 @@ export namespace Prisma { * }) * **/ - createMany>( - args?: SelectSubset> + createMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -3146,9 +2026,9 @@ export namespace Prisma { * }) * **/ - delete>( - args: SelectSubset> - ): Prisma__PostClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete( + args: SelectSubset + ): Prisma__PostClient> /** * Update one Post. @@ -3165,9 +2045,9 @@ export namespace Prisma { * }) * **/ - update>( - args: SelectSubset> - ): Prisma__PostClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update( + args: SelectSubset + ): Prisma__PostClient> /** * Delete zero or more Posts. @@ -3181,8 +2061,8 @@ export namespace Prisma { * }) * **/ - deleteMany>( - args?: SelectSubset> + deleteMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -3202,8 +2082,8 @@ export namespace Prisma { * }) * **/ - updateMany>( - args: SelectSubset> + updateMany( + args: SelectSubset ): Prisma.PrismaPromise /** @@ -3223,9 +2103,9 @@ export namespace Prisma { * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__PostClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert( + args: SelectSubset + ): Prisma__PostClient> /** * Count the number of Posts. @@ -3243,7 +2123,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> + T extends _Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -3361,7 +2241,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__PostClient implements Prisma.PrismaPromise { + export class Prisma__PostClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -3376,7 +2256,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - author = {}>(args?: Subset>): Prisma__UserClient<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; + author(args?: Subset): Prisma__UserClient | Null>; private get _document(); /** @@ -3408,15 +2288,15 @@ export namespace Prisma { /** * Post base type for findUnique actions */ - export type PostFindUniqueArgsBase = { + export type PostFindUniqueArgsBase = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * Filter, which Post to fetch. */ @@ -3426,7 +2306,7 @@ export namespace Prisma { /** * Post findUnique */ - export interface PostFindUniqueArgs extends PostFindUniqueArgsBase { + export interface PostFindUniqueArgs extends PostFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -3438,15 +2318,15 @@ export namespace Prisma { /** * Post findUniqueOrThrow */ - export type PostFindUniqueOrThrowArgs = { + export type PostFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * Filter, which Post to fetch. */ @@ -3457,15 +2337,15 @@ export namespace Prisma { /** * Post base type for findFirst actions */ - export type PostFindFirstArgsBase = { + export type PostFindFirstArgsBase = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * Filter, which Post to fetch. */ @@ -3505,7 +2385,7 @@ export namespace Prisma { /** * Post findFirst */ - export interface PostFindFirstArgs extends PostFindFirstArgsBase { + export interface PostFindFirstArgs extends PostFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -3517,15 +2397,15 @@ export namespace Prisma { /** * Post findFirstOrThrow */ - export type PostFindFirstOrThrowArgs = { + export type PostFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * Filter, which Post to fetch. */ @@ -3566,15 +2446,15 @@ export namespace Prisma { /** * Post findMany */ - export type PostFindManyArgs = { + export type PostFindManyArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * Filter, which Posts to fetch. */ @@ -3610,15 +2490,15 @@ export namespace Prisma { /** * Post create */ - export type PostCreateArgs = { + export type PostCreateArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * The data needed to create a Post. */ @@ -3629,7 +2509,7 @@ export namespace Prisma { /** * Post createMany */ - export type PostCreateManyArgs = { + export type PostCreateManyArgs = { /** * The data used to create many Posts. */ @@ -3641,15 +2521,15 @@ export namespace Prisma { /** * Post update */ - export type PostUpdateArgs = { + export type PostUpdateArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * The data needed to update a Post. */ @@ -3664,7 +2544,7 @@ export namespace Prisma { /** * Post updateMany */ - export type PostUpdateManyArgs = { + export type PostUpdateManyArgs = { /** * The data used to update Posts. */ @@ -3679,15 +2559,15 @@ export namespace Prisma { /** * Post upsert */ - export type PostUpsertArgs = { + export type PostUpsertArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * The filter to search for the Post to update in case it exists. */ @@ -3706,15 +2586,15 @@ export namespace Prisma { /** * Post delete */ - export type PostDeleteArgs = { + export type PostDeleteArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * Filter which Post to delete. */ @@ -3725,7 +2605,7 @@ export namespace Prisma { /** * Post deleteMany */ - export type PostDeleteManyArgs = { + export type PostDeleteManyArgs = { /** * Filter which Posts to delete */ @@ -3736,15 +2616,15 @@ export namespace Prisma { /** * Post without action */ - export type PostArgs = { + export type PostArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null } @@ -3891,7 +2771,7 @@ export namespace Prisma { _all?: true } - export type UserAggregateArgs = { + export type UserAggregateArgs = { /** * Filter which User to aggregate. */ @@ -3963,7 +2843,7 @@ export namespace Prisma { - export type UserGroupByArgs = { + export type UserGroupByArgs = { where?: UserWhereInput orderBy?: Enumerable by: UserScalarFieldEnum[] @@ -4014,26 +2894,7 @@ export namespace Prisma { > - export type UserSelect = $Extensions.GetSelect<{ - id?: boolean - email?: boolean - int?: boolean - optionalInt?: boolean - float?: boolean - optionalFloat?: boolean - string?: boolean - optionalString?: boolean - json?: boolean - optionalJson?: boolean - enum?: boolean - optionalEnum?: boolean - boolean?: boolean - optionalBoolean?: boolean - posts?: boolean | User$postsArgs - _count?: boolean | UserCountOutputTypeArgs - }, ExtArgs["result"]["user"]> - - export type UserSelectScalar = { + export type UserSelect = { id?: boolean email?: boolean int?: boolean @@ -4048,23 +2909,42 @@ export namespace Prisma { optionalEnum?: boolean boolean?: boolean optionalBoolean?: boolean + posts?: boolean | User$postsArgs + _count?: boolean | UserCountOutputTypeArgs } - export type UserInclude = { - posts?: boolean | User$postsArgs - _count?: boolean | UserCountOutputTypeArgs + + export type UserInclude = { + posts?: boolean | User$postsArgs + _count?: boolean | UserCountOutputTypeArgs } + export type UserGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? User : + S extends undefined ? never : + S extends { include: any } & (UserArgs | UserFindManyArgs) + ? User & { + [P in TruthyKeys]: + P extends 'posts' ? Array < PostGetPayload> : + P extends '_count' ? UserCountOutputTypeGetPayload : never + } + : S extends { select: any } & (UserArgs | UserFindManyArgs) + ? { + [P in TruthyKeys]: + P extends 'posts' ? Array < PostGetPayload> : + P extends '_count' ? UserCountOutputTypeGetPayload : P extends keyof User ? User[P] : never + } + : User - type UserGetPayload = $Types.GetResult - type UserCountArgs = + type UserCountArgs = Omit & { select?: UserCountAggregateInputType | true } - export interface UserDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['User'], meta: { name: 'User' } } + export interface UserDelegate { + /** * Find zero or one User that matches the filter. * @param {UserFindUniqueArgs} args - Arguments to find a User @@ -4076,9 +2956,9 @@ export namespace Prisma { * } * }) **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__UserClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__UserClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + findUnique( + args: SelectSubset + ): HasReject extends True ? Prisma__UserClient> : Prisma__UserClient | null, null> /** * Find one User that matches the filter or throw an error with \`error.code='P2025'\` @@ -4092,9 +2972,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__UserClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow( + args?: SelectSubset + ): Prisma__UserClient> /** * Find the first User that matches the filter. @@ -4109,9 +2989,9 @@ export namespace Prisma { * } * }) **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__UserClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__UserClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + findFirst( + args?: SelectSubset + ): HasReject extends True ? Prisma__UserClient> : Prisma__UserClient | null, null> /** * Find the first User that matches the filter or @@ -4127,9 +3007,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__UserClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow( + args?: SelectSubset + ): Prisma__UserClient> /** * Find zero or more Users that matches the filter. @@ -4147,9 +3027,9 @@ export namespace Prisma { * const userWithIdOnly = await prisma.user.findMany({ select: { id: true } }) * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany( + args?: SelectSubset + ): Prisma.PrismaPromise>> /** * Create a User. @@ -4163,9 +3043,9 @@ export namespace Prisma { * }) * **/ - create>( - args: SelectSubset> - ): Prisma__UserClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create( + args: SelectSubset + ): Prisma__UserClient> /** * Create many Users. @@ -4179,8 +3059,8 @@ export namespace Prisma { * }) * **/ - createMany>( - args?: SelectSubset> + createMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -4195,9 +3075,9 @@ export namespace Prisma { * }) * **/ - delete>( - args: SelectSubset> - ): Prisma__UserClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete( + args: SelectSubset + ): Prisma__UserClient> /** * Update one User. @@ -4214,9 +3094,9 @@ export namespace Prisma { * }) * **/ - update>( - args: SelectSubset> - ): Prisma__UserClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update( + args: SelectSubset + ): Prisma__UserClient> /** * Delete zero or more Users. @@ -4230,8 +3110,8 @@ export namespace Prisma { * }) * **/ - deleteMany>( - args?: SelectSubset> + deleteMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -4251,8 +3131,8 @@ export namespace Prisma { * }) * **/ - updateMany>( - args: SelectSubset> + updateMany( + args: SelectSubset ): Prisma.PrismaPromise /** @@ -4272,9 +3152,9 @@ export namespace Prisma { * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__UserClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert( + args: SelectSubset + ): Prisma__UserClient> /** * Count the number of Users. @@ -4292,7 +3172,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> + T extends _Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -4410,7 +3290,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__UserClient implements Prisma.PrismaPromise { + export class Prisma__UserClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -4425,7 +3305,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - posts = {}>(args?: Subset>): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>| Null>; + posts(args?: Subset): Prisma.PrismaPromise>| Null>; private get _document(); /** @@ -4457,15 +3337,15 @@ export namespace Prisma { /** * User base type for findUnique actions */ - export type UserFindUniqueArgsBase = { + export type UserFindUniqueArgsBase = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * Filter, which User to fetch. */ @@ -4475,7 +3355,7 @@ export namespace Prisma { /** * User findUnique */ - export interface UserFindUniqueArgs extends UserFindUniqueArgsBase { + export interface UserFindUniqueArgs extends UserFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -4487,15 +3367,15 @@ export namespace Prisma { /** * User findUniqueOrThrow */ - export type UserFindUniqueOrThrowArgs = { + export type UserFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * Filter, which User to fetch. */ @@ -4506,15 +3386,15 @@ export namespace Prisma { /** * User base type for findFirst actions */ - export type UserFindFirstArgsBase = { + export type UserFindFirstArgsBase = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * Filter, which User to fetch. */ @@ -4554,7 +3434,7 @@ export namespace Prisma { /** * User findFirst */ - export interface UserFindFirstArgs extends UserFindFirstArgsBase { + export interface UserFindFirstArgs extends UserFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -4566,15 +3446,15 @@ export namespace Prisma { /** * User findFirstOrThrow */ - export type UserFindFirstOrThrowArgs = { + export type UserFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * Filter, which User to fetch. */ @@ -4615,15 +3495,15 @@ export namespace Prisma { /** * User findMany */ - export type UserFindManyArgs = { + export type UserFindManyArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * Filter, which Users to fetch. */ @@ -4659,15 +3539,15 @@ export namespace Prisma { /** * User create */ - export type UserCreateArgs = { + export type UserCreateArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * The data needed to create a User. */ @@ -4678,7 +3558,7 @@ export namespace Prisma { /** * User createMany */ - export type UserCreateManyArgs = { + export type UserCreateManyArgs = { /** * The data used to create many Users. */ @@ -4690,15 +3570,15 @@ export namespace Prisma { /** * User update */ - export type UserUpdateArgs = { + export type UserUpdateArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * The data needed to update a User. */ @@ -4713,7 +3593,7 @@ export namespace Prisma { /** * User updateMany */ - export type UserUpdateManyArgs = { + export type UserUpdateManyArgs = { /** * The data used to update Users. */ @@ -4728,15 +3608,15 @@ export namespace Prisma { /** * User upsert */ - export type UserUpsertArgs = { + export type UserUpsertArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * The filter to search for the User to update in case it exists. */ @@ -4755,15 +3635,15 @@ export namespace Prisma { /** * User delete */ - export type UserDeleteArgs = { + export type UserDeleteArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * Filter which User to delete. */ @@ -4774,7 +3654,7 @@ export namespace Prisma { /** * User deleteMany */ - export type UserDeleteManyArgs = { + export type UserDeleteManyArgs = { /** * Filter which Users to delete */ @@ -4785,15 +3665,15 @@ export namespace Prisma { /** * User.posts */ - export type User$postsArgs = { + export type User$postsArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null where?: PostWhereInput orderBy?: Enumerable cursor?: PostWhereUniqueInput @@ -4806,15 +3686,15 @@ export namespace Prisma { /** * User without action */ - export type UserArgs = { + export type UserArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null } @@ -4955,7 +3835,7 @@ export namespace Prisma { _all?: true } - export type MAggregateArgs = { + export type MAggregateArgs = { /** * Filter which M to aggregate. */ @@ -5027,7 +3907,7 @@ export namespace Prisma { - export type MGroupByArgs = { + export type MGroupByArgs = { where?: MWhereInput orderBy?: Enumerable by: MScalarFieldEnum[] @@ -5077,25 +3957,7 @@ export namespace Prisma { > - export type MSelect = $Extensions.GetSelect<{ - id?: boolean - int?: boolean - optionalInt?: boolean - float?: boolean - optionalFloat?: boolean - string?: boolean - optionalString?: boolean - json?: boolean - optionalJson?: boolean - enum?: boolean - optionalEnum?: boolean - boolean?: boolean - optionalBoolean?: boolean - n?: boolean | M$nArgs - _count?: boolean | MCountOutputTypeArgs - }, ExtArgs["result"]["m"]> - - export type MSelectScalar = { + export type MSelect = { id?: boolean int?: boolean optionalInt?: boolean @@ -5109,23 +3971,42 @@ export namespace Prisma { optionalEnum?: boolean boolean?: boolean optionalBoolean?: boolean + n?: boolean | M$nArgs + _count?: boolean | MCountOutputTypeArgs } - export type MInclude = { - n?: boolean | M$nArgs - _count?: boolean | MCountOutputTypeArgs + + export type MInclude = { + n?: boolean | M$nArgs + _count?: boolean | MCountOutputTypeArgs } + export type MGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? M : + S extends undefined ? never : + S extends { include: any } & (MArgs | MFindManyArgs) + ? M & { + [P in TruthyKeys]: + P extends 'n' ? Array < NGetPayload> : + P extends '_count' ? MCountOutputTypeGetPayload : never + } + : S extends { select: any } & (MArgs | MFindManyArgs) + ? { + [P in TruthyKeys]: + P extends 'n' ? Array < NGetPayload> : + P extends '_count' ? MCountOutputTypeGetPayload : P extends keyof M ? M[P] : never + } + : M - type MGetPayload = $Types.GetResult - type MCountArgs = + type MCountArgs = Omit & { select?: MCountAggregateInputType | true } - export interface MDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['M'], meta: { name: 'M' } } + export interface MDelegate { + /** * Find zero or one M that matches the filter. * @param {MFindUniqueArgs} args - Arguments to find a M @@ -5137,9 +4018,9 @@ export namespace Prisma { * } * }) **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__MClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__MClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + findUnique( + args: SelectSubset + ): HasReject extends True ? Prisma__MClient> : Prisma__MClient | null, null> /** * Find one M that matches the filter or throw an error with \`error.code='P2025'\` @@ -5153,9 +4034,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__MClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow( + args?: SelectSubset + ): Prisma__MClient> /** * Find the first M that matches the filter. @@ -5170,9 +4051,9 @@ export namespace Prisma { * } * }) **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__MClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__MClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + findFirst( + args?: SelectSubset + ): HasReject extends True ? Prisma__MClient> : Prisma__MClient | null, null> /** * Find the first M that matches the filter or @@ -5188,9 +4069,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__MClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow( + args?: SelectSubset + ): Prisma__MClient> /** * Find zero or more Ms that matches the filter. @@ -5208,9 +4089,9 @@ export namespace Prisma { * const mWithIdOnly = await prisma.m.findMany({ select: { id: true } }) * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany( + args?: SelectSubset + ): Prisma.PrismaPromise>> /** * Create a M. @@ -5224,9 +4105,9 @@ export namespace Prisma { * }) * **/ - create>( - args: SelectSubset> - ): Prisma__MClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create( + args: SelectSubset + ): Prisma__MClient> /** * Create many Ms. @@ -5240,8 +4121,8 @@ export namespace Prisma { * }) * **/ - createMany>( - args?: SelectSubset> + createMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -5256,9 +4137,9 @@ export namespace Prisma { * }) * **/ - delete>( - args: SelectSubset> - ): Prisma__MClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete( + args: SelectSubset + ): Prisma__MClient> /** * Update one M. @@ -5275,9 +4156,9 @@ export namespace Prisma { * }) * **/ - update>( - args: SelectSubset> - ): Prisma__MClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update( + args: SelectSubset + ): Prisma__MClient> /** * Delete zero or more Ms. @@ -5291,8 +4172,8 @@ export namespace Prisma { * }) * **/ - deleteMany>( - args?: SelectSubset> + deleteMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -5312,8 +4193,8 @@ export namespace Prisma { * }) * **/ - updateMany>( - args: SelectSubset> + updateMany( + args: SelectSubset ): Prisma.PrismaPromise /** @@ -5333,9 +4214,9 @@ export namespace Prisma { * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__MClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert( + args: SelectSubset + ): Prisma__MClient> /** * Count the number of Ms. @@ -5353,7 +4234,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> + T extends _Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -5471,7 +4352,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__MClient implements Prisma.PrismaPromise { + export class Prisma__MClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -5486,7 +4367,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - n = {}>(args?: Subset>): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>| Null>; + n(args?: Subset): Prisma.PrismaPromise>| Null>; private get _document(); /** @@ -5518,15 +4399,15 @@ export namespace Prisma { /** * M base type for findUnique actions */ - export type MFindUniqueArgsBase = { + export type MFindUniqueArgsBase = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * Filter, which M to fetch. */ @@ -5536,7 +4417,7 @@ export namespace Prisma { /** * M findUnique */ - export interface MFindUniqueArgs extends MFindUniqueArgsBase { + export interface MFindUniqueArgs extends MFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -5548,15 +4429,15 @@ export namespace Prisma { /** * M findUniqueOrThrow */ - export type MFindUniqueOrThrowArgs = { + export type MFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * Filter, which M to fetch. */ @@ -5567,15 +4448,15 @@ export namespace Prisma { /** * M base type for findFirst actions */ - export type MFindFirstArgsBase = { + export type MFindFirstArgsBase = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * Filter, which M to fetch. */ @@ -5615,7 +4496,7 @@ export namespace Prisma { /** * M findFirst */ - export interface MFindFirstArgs extends MFindFirstArgsBase { + export interface MFindFirstArgs extends MFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -5627,15 +4508,15 @@ export namespace Prisma { /** * M findFirstOrThrow */ - export type MFindFirstOrThrowArgs = { + export type MFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * Filter, which M to fetch. */ @@ -5676,15 +4557,15 @@ export namespace Prisma { /** * M findMany */ - export type MFindManyArgs = { + export type MFindManyArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * Filter, which MS to fetch. */ @@ -5720,15 +4601,15 @@ export namespace Prisma { /** * M create */ - export type MCreateArgs = { + export type MCreateArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * The data needed to create a M. */ @@ -5739,7 +4620,7 @@ export namespace Prisma { /** * M createMany */ - export type MCreateManyArgs = { + export type MCreateManyArgs = { /** * The data used to create many MS. */ @@ -5751,15 +4632,15 @@ export namespace Prisma { /** * M update */ - export type MUpdateArgs = { + export type MUpdateArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * The data needed to update a M. */ @@ -5774,7 +4655,7 @@ export namespace Prisma { /** * M updateMany */ - export type MUpdateManyArgs = { + export type MUpdateManyArgs = { /** * The data used to update MS. */ @@ -5789,15 +4670,15 @@ export namespace Prisma { /** * M upsert */ - export type MUpsertArgs = { + export type MUpsertArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * The filter to search for the M to update in case it exists. */ @@ -5816,15 +4697,15 @@ export namespace Prisma { /** * M delete */ - export type MDeleteArgs = { + export type MDeleteArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * Filter which M to delete. */ @@ -5835,7 +4716,7 @@ export namespace Prisma { /** * M deleteMany */ - export type MDeleteManyArgs = { + export type MDeleteManyArgs = { /** * Filter which MS to delete */ @@ -5846,15 +4727,15 @@ export namespace Prisma { /** * M.n */ - export type M$nArgs = { + export type M$nArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null where?: NWhereInput orderBy?: Enumerable cursor?: NWhereUniqueInput @@ -5867,15 +4748,15 @@ export namespace Prisma { /** * M without action */ - export type MArgs = { + export type MArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null } @@ -6016,7 +4897,7 @@ export namespace Prisma { _all?: true } - export type NAggregateArgs = { + export type NAggregateArgs = { /** * Filter which N to aggregate. */ @@ -6088,7 +4969,7 @@ export namespace Prisma { - export type NGroupByArgs = { + export type NGroupByArgs = { where?: NWhereInput orderBy?: Enumerable by: NScalarFieldEnum[] @@ -6138,25 +5019,7 @@ export namespace Prisma { > - export type NSelect = $Extensions.GetSelect<{ - id?: boolean - int?: boolean - optionalInt?: boolean - float?: boolean - optionalFloat?: boolean - string?: boolean - optionalString?: boolean - json?: boolean - optionalJson?: boolean - enum?: boolean - optionalEnum?: boolean - boolean?: boolean - optionalBoolean?: boolean - m?: boolean | N$mArgs - _count?: boolean | NCountOutputTypeArgs - }, ExtArgs["result"]["n"]> - - export type NSelectScalar = { + export type NSelect = { id?: boolean int?: boolean optionalInt?: boolean @@ -6170,23 +5033,42 @@ export namespace Prisma { optionalEnum?: boolean boolean?: boolean optionalBoolean?: boolean + m?: boolean | N$mArgs + _count?: boolean | NCountOutputTypeArgs } - export type NInclude = { - m?: boolean | N$mArgs - _count?: boolean | NCountOutputTypeArgs + + export type NInclude = { + m?: boolean | N$mArgs + _count?: boolean | NCountOutputTypeArgs } + export type NGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? N : + S extends undefined ? never : + S extends { include: any } & (NArgs | NFindManyArgs) + ? N & { + [P in TruthyKeys]: + P extends 'm' ? Array < MGetPayload> : + P extends '_count' ? NCountOutputTypeGetPayload : never + } + : S extends { select: any } & (NArgs | NFindManyArgs) + ? { + [P in TruthyKeys]: + P extends 'm' ? Array < MGetPayload> : + P extends '_count' ? NCountOutputTypeGetPayload : P extends keyof N ? N[P] : never + } + : N - type NGetPayload = $Types.GetResult - type NCountArgs = + type NCountArgs = Omit & { select?: NCountAggregateInputType | true } - export interface NDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['N'], meta: { name: 'N' } } + export interface NDelegate { + /** * Find zero or one N that matches the filter. * @param {NFindUniqueArgs} args - Arguments to find a N @@ -6198,9 +5080,9 @@ export namespace Prisma { * } * }) **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__NClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__NClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + findUnique( + args: SelectSubset + ): HasReject extends True ? Prisma__NClient> : Prisma__NClient | null, null> /** * Find one N that matches the filter or throw an error with \`error.code='P2025'\` @@ -6214,9 +5096,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__NClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow( + args?: SelectSubset + ): Prisma__NClient> /** * Find the first N that matches the filter. @@ -6231,9 +5113,9 @@ export namespace Prisma { * } * }) **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__NClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__NClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + findFirst( + args?: SelectSubset + ): HasReject extends True ? Prisma__NClient> : Prisma__NClient | null, null> /** * Find the first N that matches the filter or @@ -6249,9 +5131,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__NClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow( + args?: SelectSubset + ): Prisma__NClient> /** * Find zero or more Ns that matches the filter. @@ -6269,9 +5151,9 @@ export namespace Prisma { * const nWithIdOnly = await prisma.n.findMany({ select: { id: true } }) * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany( + args?: SelectSubset + ): Prisma.PrismaPromise>> /** * Create a N. @@ -6285,9 +5167,9 @@ export namespace Prisma { * }) * **/ - create>( - args: SelectSubset> - ): Prisma__NClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create( + args: SelectSubset + ): Prisma__NClient> /** * Create many Ns. @@ -6301,8 +5183,8 @@ export namespace Prisma { * }) * **/ - createMany>( - args?: SelectSubset> + createMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -6317,9 +5199,9 @@ export namespace Prisma { * }) * **/ - delete>( - args: SelectSubset> - ): Prisma__NClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete( + args: SelectSubset + ): Prisma__NClient> /** * Update one N. @@ -6336,9 +5218,9 @@ export namespace Prisma { * }) * **/ - update>( - args: SelectSubset> - ): Prisma__NClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update( + args: SelectSubset + ): Prisma__NClient> /** * Delete zero or more Ns. @@ -6352,8 +5234,8 @@ export namespace Prisma { * }) * **/ - deleteMany>( - args?: SelectSubset> + deleteMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -6373,8 +5255,8 @@ export namespace Prisma { * }) * **/ - updateMany>( - args: SelectSubset> + updateMany( + args: SelectSubset ): Prisma.PrismaPromise /** @@ -6394,9 +5276,9 @@ export namespace Prisma { * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__NClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert( + args: SelectSubset + ): Prisma__NClient> /** * Count the number of Ns. @@ -6414,7 +5296,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> + T extends _Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -6532,7 +5414,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__NClient implements Prisma.PrismaPromise { + export class Prisma__NClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -6547,7 +5429,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - m = {}>(args?: Subset>): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>| Null>; + m(args?: Subset): Prisma.PrismaPromise>| Null>; private get _document(); /** @@ -6579,15 +5461,15 @@ export namespace Prisma { /** * N base type for findUnique actions */ - export type NFindUniqueArgsBase = { + export type NFindUniqueArgsBase = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * Filter, which N to fetch. */ @@ -6597,7 +5479,7 @@ export namespace Prisma { /** * N findUnique */ - export interface NFindUniqueArgs extends NFindUniqueArgsBase { + export interface NFindUniqueArgs extends NFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -6609,15 +5491,15 @@ export namespace Prisma { /** * N findUniqueOrThrow */ - export type NFindUniqueOrThrowArgs = { + export type NFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * Filter, which N to fetch. */ @@ -6628,15 +5510,15 @@ export namespace Prisma { /** * N base type for findFirst actions */ - export type NFindFirstArgsBase = { + export type NFindFirstArgsBase = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * Filter, which N to fetch. */ @@ -6676,7 +5558,7 @@ export namespace Prisma { /** * N findFirst */ - export interface NFindFirstArgs extends NFindFirstArgsBase { + export interface NFindFirstArgs extends NFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -6688,15 +5570,15 @@ export namespace Prisma { /** * N findFirstOrThrow */ - export type NFindFirstOrThrowArgs = { + export type NFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * Filter, which N to fetch. */ @@ -6737,15 +5619,15 @@ export namespace Prisma { /** * N findMany */ - export type NFindManyArgs = { + export type NFindManyArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * Filter, which NS to fetch. */ @@ -6781,15 +5663,15 @@ export namespace Prisma { /** * N create */ - export type NCreateArgs = { + export type NCreateArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * The data needed to create a N. */ @@ -6800,7 +5682,7 @@ export namespace Prisma { /** * N createMany */ - export type NCreateManyArgs = { + export type NCreateManyArgs = { /** * The data used to create many NS. */ @@ -6812,15 +5694,15 @@ export namespace Prisma { /** * N update */ - export type NUpdateArgs = { + export type NUpdateArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * The data needed to update a N. */ @@ -6835,7 +5717,7 @@ export namespace Prisma { /** * N updateMany */ - export type NUpdateManyArgs = { + export type NUpdateManyArgs = { /** * The data used to update NS. */ @@ -6850,15 +5732,15 @@ export namespace Prisma { /** * N upsert */ - export type NUpsertArgs = { + export type NUpsertArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * The filter to search for the N to update in case it exists. */ @@ -6877,15 +5759,15 @@ export namespace Prisma { /** * N delete */ - export type NDeleteArgs = { + export type NDeleteArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * Filter which N to delete. */ @@ -6896,7 +5778,7 @@ export namespace Prisma { /** * N deleteMany */ - export type NDeleteManyArgs = { + export type NDeleteManyArgs = { /** * Filter which NS to delete */ @@ -6907,15 +5789,15 @@ export namespace Prisma { /** * N.m */ - export type N$mArgs = { + export type N$mArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null where?: MWhereInput orderBy?: Enumerable cursor?: MWhereUniqueInput @@ -6928,15 +5810,15 @@ export namespace Prisma { /** * N without action */ - export type NArgs = { + export type NArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null } @@ -7077,7 +5959,7 @@ export namespace Prisma { _all?: true } - export type OneOptionalAggregateArgs = { + export type OneOptionalAggregateArgs = { /** * Filter which OneOptional to aggregate. */ @@ -7149,7 +6031,7 @@ export namespace Prisma { - export type OneOptionalGroupByArgs = { + export type OneOptionalGroupByArgs = { where?: OneOptionalWhereInput orderBy?: Enumerable by: OneOptionalScalarFieldEnum[] @@ -7199,25 +6081,7 @@ export namespace Prisma { > - export type OneOptionalSelect = $Extensions.GetSelect<{ - id?: boolean - int?: boolean - optionalInt?: boolean - float?: boolean - optionalFloat?: boolean - string?: boolean - optionalString?: boolean - json?: boolean - optionalJson?: boolean - enum?: boolean - optionalEnum?: boolean - boolean?: boolean - optionalBoolean?: boolean - many?: boolean | OneOptional$manyArgs - _count?: boolean | OneOptionalCountOutputTypeArgs - }, ExtArgs["result"]["oneOptional"]> - - export type OneOptionalSelectScalar = { + export type OneOptionalSelect = { id?: boolean int?: boolean optionalInt?: boolean @@ -7231,23 +6095,42 @@ export namespace Prisma { optionalEnum?: boolean boolean?: boolean optionalBoolean?: boolean + many?: boolean | OneOptional$manyArgs + _count?: boolean | OneOptionalCountOutputTypeArgs } - export type OneOptionalInclude = { - many?: boolean | OneOptional$manyArgs - _count?: boolean | OneOptionalCountOutputTypeArgs + + export type OneOptionalInclude = { + many?: boolean | OneOptional$manyArgs + _count?: boolean | OneOptionalCountOutputTypeArgs } + export type OneOptionalGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? OneOptional : + S extends undefined ? never : + S extends { include: any } & (OneOptionalArgs | OneOptionalFindManyArgs) + ? OneOptional & { + [P in TruthyKeys]: + P extends 'many' ? Array < ManyRequiredGetPayload> : + P extends '_count' ? OneOptionalCountOutputTypeGetPayload : never + } + : S extends { select: any } & (OneOptionalArgs | OneOptionalFindManyArgs) + ? { + [P in TruthyKeys]: + P extends 'many' ? Array < ManyRequiredGetPayload> : + P extends '_count' ? OneOptionalCountOutputTypeGetPayload : P extends keyof OneOptional ? OneOptional[P] : never + } + : OneOptional - type OneOptionalGetPayload = $Types.GetResult - type OneOptionalCountArgs = + type OneOptionalCountArgs = Omit & { select?: OneOptionalCountAggregateInputType | true } - export interface OneOptionalDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['OneOptional'], meta: { name: 'OneOptional' } } + export interface OneOptionalDelegate { + /** * Find zero or one OneOptional that matches the filter. * @param {OneOptionalFindUniqueArgs} args - Arguments to find a OneOptional @@ -7259,9 +6142,9 @@ export namespace Prisma { * } * }) **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__OneOptionalClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__OneOptionalClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + findUnique( + args: SelectSubset + ): HasReject extends True ? Prisma__OneOptionalClient> : Prisma__OneOptionalClient | null, null> /** * Find one OneOptional that matches the filter or throw an error with \`error.code='P2025'\` @@ -7275,9 +6158,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__OneOptionalClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow( + args?: SelectSubset + ): Prisma__OneOptionalClient> /** * Find the first OneOptional that matches the filter. @@ -7292,9 +6175,9 @@ export namespace Prisma { * } * }) **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__OneOptionalClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__OneOptionalClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + findFirst( + args?: SelectSubset + ): HasReject extends True ? Prisma__OneOptionalClient> : Prisma__OneOptionalClient | null, null> /** * Find the first OneOptional that matches the filter or @@ -7310,9 +6193,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__OneOptionalClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow( + args?: SelectSubset + ): Prisma__OneOptionalClient> /** * Find zero or more OneOptionals that matches the filter. @@ -7330,9 +6213,9 @@ export namespace Prisma { * const oneOptionalWithIdOnly = await prisma.oneOptional.findMany({ select: { id: true } }) * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany( + args?: SelectSubset + ): Prisma.PrismaPromise>> /** * Create a OneOptional. @@ -7346,9 +6229,9 @@ export namespace Prisma { * }) * **/ - create>( - args: SelectSubset> - ): Prisma__OneOptionalClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create( + args: SelectSubset + ): Prisma__OneOptionalClient> /** * Create many OneOptionals. @@ -7362,8 +6245,8 @@ export namespace Prisma { * }) * **/ - createMany>( - args?: SelectSubset> + createMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -7378,9 +6261,9 @@ export namespace Prisma { * }) * **/ - delete>( - args: SelectSubset> - ): Prisma__OneOptionalClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete( + args: SelectSubset + ): Prisma__OneOptionalClient> /** * Update one OneOptional. @@ -7397,9 +6280,9 @@ export namespace Prisma { * }) * **/ - update>( - args: SelectSubset> - ): Prisma__OneOptionalClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update( + args: SelectSubset + ): Prisma__OneOptionalClient> /** * Delete zero or more OneOptionals. @@ -7413,8 +6296,8 @@ export namespace Prisma { * }) * **/ - deleteMany>( - args?: SelectSubset> + deleteMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -7434,8 +6317,8 @@ export namespace Prisma { * }) * **/ - updateMany>( - args: SelectSubset> + updateMany( + args: SelectSubset ): Prisma.PrismaPromise /** @@ -7455,9 +6338,9 @@ export namespace Prisma { * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__OneOptionalClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert( + args: SelectSubset + ): Prisma__OneOptionalClient> /** * Count the number of OneOptionals. @@ -7475,7 +6358,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> + T extends _Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -7593,7 +6476,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__OneOptionalClient implements Prisma.PrismaPromise { + export class Prisma__OneOptionalClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -7608,7 +6491,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - many = {}>(args?: Subset>): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>| Null>; + many(args?: Subset): Prisma.PrismaPromise>| Null>; private get _document(); /** @@ -7640,15 +6523,15 @@ export namespace Prisma { /** * OneOptional base type for findUnique actions */ - export type OneOptionalFindUniqueArgsBase = { + export type OneOptionalFindUniqueArgsBase = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * Filter, which OneOptional to fetch. */ @@ -7658,7 +6541,7 @@ export namespace Prisma { /** * OneOptional findUnique */ - export interface OneOptionalFindUniqueArgs extends OneOptionalFindUniqueArgsBase { + export interface OneOptionalFindUniqueArgs extends OneOptionalFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -7670,15 +6553,15 @@ export namespace Prisma { /** * OneOptional findUniqueOrThrow */ - export type OneOptionalFindUniqueOrThrowArgs = { + export type OneOptionalFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * Filter, which OneOptional to fetch. */ @@ -7689,15 +6572,15 @@ export namespace Prisma { /** * OneOptional base type for findFirst actions */ - export type OneOptionalFindFirstArgsBase = { + export type OneOptionalFindFirstArgsBase = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * Filter, which OneOptional to fetch. */ @@ -7737,7 +6620,7 @@ export namespace Prisma { /** * OneOptional findFirst */ - export interface OneOptionalFindFirstArgs extends OneOptionalFindFirstArgsBase { + export interface OneOptionalFindFirstArgs extends OneOptionalFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -7749,15 +6632,15 @@ export namespace Prisma { /** * OneOptional findFirstOrThrow */ - export type OneOptionalFindFirstOrThrowArgs = { + export type OneOptionalFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * Filter, which OneOptional to fetch. */ @@ -7798,15 +6681,15 @@ export namespace Prisma { /** * OneOptional findMany */ - export type OneOptionalFindManyArgs = { + export type OneOptionalFindManyArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * Filter, which OneOptionals to fetch. */ @@ -7842,15 +6725,15 @@ export namespace Prisma { /** * OneOptional create */ - export type OneOptionalCreateArgs = { + export type OneOptionalCreateArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * The data needed to create a OneOptional. */ @@ -7861,7 +6744,7 @@ export namespace Prisma { /** * OneOptional createMany */ - export type OneOptionalCreateManyArgs = { + export type OneOptionalCreateManyArgs = { /** * The data used to create many OneOptionals. */ @@ -7873,15 +6756,15 @@ export namespace Prisma { /** * OneOptional update */ - export type OneOptionalUpdateArgs = { + export type OneOptionalUpdateArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * The data needed to update a OneOptional. */ @@ -7896,7 +6779,7 @@ export namespace Prisma { /** * OneOptional updateMany */ - export type OneOptionalUpdateManyArgs = { + export type OneOptionalUpdateManyArgs = { /** * The data used to update OneOptionals. */ @@ -7911,15 +6794,15 @@ export namespace Prisma { /** * OneOptional upsert */ - export type OneOptionalUpsertArgs = { + export type OneOptionalUpsertArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * The filter to search for the OneOptional to update in case it exists. */ @@ -7938,15 +6821,15 @@ export namespace Prisma { /** * OneOptional delete */ - export type OneOptionalDeleteArgs = { + export type OneOptionalDeleteArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * Filter which OneOptional to delete. */ @@ -7957,7 +6840,7 @@ export namespace Prisma { /** * OneOptional deleteMany */ - export type OneOptionalDeleteManyArgs = { + export type OneOptionalDeleteManyArgs = { /** * Filter which OneOptionals to delete */ @@ -7968,15 +6851,15 @@ export namespace Prisma { /** * OneOptional.many */ - export type OneOptional$manyArgs = { + export type OneOptional$manyArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null where?: ManyRequiredWhereInput orderBy?: Enumerable cursor?: ManyRequiredWhereUniqueInput @@ -7989,15 +6872,15 @@ export namespace Prisma { /** * OneOptional without action */ - export type OneOptionalArgs = { + export type OneOptionalArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null } @@ -8148,7 +7031,7 @@ export namespace Prisma { _all?: true } - export type ManyRequiredAggregateArgs = { + export type ManyRequiredAggregateArgs = { /** * Filter which ManyRequired to aggregate. */ @@ -8220,7 +7103,7 @@ export namespace Prisma { - export type ManyRequiredGroupByArgs = { + export type ManyRequiredGroupByArgs = { where?: ManyRequiredWhereInput orderBy?: Enumerable by: ManyRequiredScalarFieldEnum[] @@ -8271,25 +7154,7 @@ export namespace Prisma { > - export type ManyRequiredSelect = $Extensions.GetSelect<{ - id?: boolean - oneOptionalId?: boolean - int?: boolean - optionalInt?: boolean - float?: boolean - optionalFloat?: boolean - string?: boolean - optionalString?: boolean - json?: boolean - optionalJson?: boolean - enum?: boolean - optionalEnum?: boolean - boolean?: boolean - optionalBoolean?: boolean - one?: boolean | OneOptionalArgs - }, ExtArgs["result"]["manyRequired"]> - - export type ManyRequiredSelectScalar = { + export type ManyRequiredSelect = { id?: boolean oneOptionalId?: boolean int?: boolean @@ -8304,22 +7169,38 @@ export namespace Prisma { optionalEnum?: boolean boolean?: boolean optionalBoolean?: boolean + one?: boolean | OneOptionalArgs } - export type ManyRequiredInclude = { - one?: boolean | OneOptionalArgs + + export type ManyRequiredInclude = { + one?: boolean | OneOptionalArgs } + export type ManyRequiredGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? ManyRequired : + S extends undefined ? never : + S extends { include: any } & (ManyRequiredArgs | ManyRequiredFindManyArgs) + ? ManyRequired & { + [P in TruthyKeys]: + P extends 'one' ? OneOptionalGetPayload | null : never + } + : S extends { select: any } & (ManyRequiredArgs | ManyRequiredFindManyArgs) + ? { + [P in TruthyKeys]: + P extends 'one' ? OneOptionalGetPayload | null : P extends keyof ManyRequired ? ManyRequired[P] : never + } + : ManyRequired - type ManyRequiredGetPayload = $Types.GetResult - type ManyRequiredCountArgs = + type ManyRequiredCountArgs = Omit & { select?: ManyRequiredCountAggregateInputType | true } - export interface ManyRequiredDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['ManyRequired'], meta: { name: 'ManyRequired' } } + export interface ManyRequiredDelegate { + /** * Find zero or one ManyRequired that matches the filter. * @param {ManyRequiredFindUniqueArgs} args - Arguments to find a ManyRequired @@ -8331,9 +7212,9 @@ export namespace Prisma { * } * }) **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__ManyRequiredClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__ManyRequiredClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + findUnique( + args: SelectSubset + ): HasReject extends True ? Prisma__ManyRequiredClient> : Prisma__ManyRequiredClient | null, null> /** * Find one ManyRequired that matches the filter or throw an error with \`error.code='P2025'\` @@ -8347,9 +7228,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__ManyRequiredClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow( + args?: SelectSubset + ): Prisma__ManyRequiredClient> /** * Find the first ManyRequired that matches the filter. @@ -8364,9 +7245,9 @@ export namespace Prisma { * } * }) **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__ManyRequiredClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__ManyRequiredClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + findFirst( + args?: SelectSubset + ): HasReject extends True ? Prisma__ManyRequiredClient> : Prisma__ManyRequiredClient | null, null> /** * Find the first ManyRequired that matches the filter or @@ -8382,9 +7263,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__ManyRequiredClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow( + args?: SelectSubset + ): Prisma__ManyRequiredClient> /** * Find zero or more ManyRequireds that matches the filter. @@ -8402,9 +7283,9 @@ export namespace Prisma { * const manyRequiredWithIdOnly = await prisma.manyRequired.findMany({ select: { id: true } }) * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany( + args?: SelectSubset + ): Prisma.PrismaPromise>> /** * Create a ManyRequired. @@ -8418,9 +7299,9 @@ export namespace Prisma { * }) * **/ - create>( - args: SelectSubset> - ): Prisma__ManyRequiredClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create( + args: SelectSubset + ): Prisma__ManyRequiredClient> /** * Create many ManyRequireds. @@ -8434,8 +7315,8 @@ export namespace Prisma { * }) * **/ - createMany>( - args?: SelectSubset> + createMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -8450,9 +7331,9 @@ export namespace Prisma { * }) * **/ - delete>( - args: SelectSubset> - ): Prisma__ManyRequiredClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete( + args: SelectSubset + ): Prisma__ManyRequiredClient> /** * Update one ManyRequired. @@ -8469,9 +7350,9 @@ export namespace Prisma { * }) * **/ - update>( - args: SelectSubset> - ): Prisma__ManyRequiredClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update( + args: SelectSubset + ): Prisma__ManyRequiredClient> /** * Delete zero or more ManyRequireds. @@ -8485,8 +7366,8 @@ export namespace Prisma { * }) * **/ - deleteMany>( - args?: SelectSubset> + deleteMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -8506,8 +7387,8 @@ export namespace Prisma { * }) * **/ - updateMany>( - args: SelectSubset> + updateMany( + args: SelectSubset ): Prisma.PrismaPromise /** @@ -8527,9 +7408,9 @@ export namespace Prisma { * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__ManyRequiredClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert( + args: SelectSubset + ): Prisma__ManyRequiredClient> /** * Count the number of ManyRequireds. @@ -8547,7 +7428,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> + T extends _Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -8665,7 +7546,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__ManyRequiredClient implements Prisma.PrismaPromise { + export class Prisma__ManyRequiredClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -8680,7 +7561,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - one = {}>(args?: Subset>): Prisma__OneOptionalClient<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; + one(args?: Subset): Prisma__OneOptionalClient | Null>; private get _document(); /** @@ -8712,15 +7593,15 @@ export namespace Prisma { /** * ManyRequired base type for findUnique actions */ - export type ManyRequiredFindUniqueArgsBase = { + export type ManyRequiredFindUniqueArgsBase = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * Filter, which ManyRequired to fetch. */ @@ -8730,7 +7611,7 @@ export namespace Prisma { /** * ManyRequired findUnique */ - export interface ManyRequiredFindUniqueArgs extends ManyRequiredFindUniqueArgsBase { + export interface ManyRequiredFindUniqueArgs extends ManyRequiredFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -8742,15 +7623,15 @@ export namespace Prisma { /** * ManyRequired findUniqueOrThrow */ - export type ManyRequiredFindUniqueOrThrowArgs = { + export type ManyRequiredFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * Filter, which ManyRequired to fetch. */ @@ -8761,15 +7642,15 @@ export namespace Prisma { /** * ManyRequired base type for findFirst actions */ - export type ManyRequiredFindFirstArgsBase = { + export type ManyRequiredFindFirstArgsBase = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * Filter, which ManyRequired to fetch. */ @@ -8809,7 +7690,7 @@ export namespace Prisma { /** * ManyRequired findFirst */ - export interface ManyRequiredFindFirstArgs extends ManyRequiredFindFirstArgsBase { + export interface ManyRequiredFindFirstArgs extends ManyRequiredFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -8821,15 +7702,15 @@ export namespace Prisma { /** * ManyRequired findFirstOrThrow */ - export type ManyRequiredFindFirstOrThrowArgs = { + export type ManyRequiredFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * Filter, which ManyRequired to fetch. */ @@ -8870,15 +7751,15 @@ export namespace Prisma { /** * ManyRequired findMany */ - export type ManyRequiredFindManyArgs = { + export type ManyRequiredFindManyArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * Filter, which ManyRequireds to fetch. */ @@ -8914,15 +7795,15 @@ export namespace Prisma { /** * ManyRequired create */ - export type ManyRequiredCreateArgs = { + export type ManyRequiredCreateArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * The data needed to create a ManyRequired. */ @@ -8933,7 +7814,7 @@ export namespace Prisma { /** * ManyRequired createMany */ - export type ManyRequiredCreateManyArgs = { + export type ManyRequiredCreateManyArgs = { /** * The data used to create many ManyRequireds. */ @@ -8945,15 +7826,15 @@ export namespace Prisma { /** * ManyRequired update */ - export type ManyRequiredUpdateArgs = { + export type ManyRequiredUpdateArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * The data needed to update a ManyRequired. */ @@ -8968,7 +7849,7 @@ export namespace Prisma { /** * ManyRequired updateMany */ - export type ManyRequiredUpdateManyArgs = { + export type ManyRequiredUpdateManyArgs = { /** * The data used to update ManyRequireds. */ @@ -8983,15 +7864,15 @@ export namespace Prisma { /** * ManyRequired upsert */ - export type ManyRequiredUpsertArgs = { + export type ManyRequiredUpsertArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * The filter to search for the ManyRequired to update in case it exists. */ @@ -9010,15 +7891,15 @@ export namespace Prisma { /** * ManyRequired delete */ - export type ManyRequiredDeleteArgs = { + export type ManyRequiredDeleteArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * Filter which ManyRequired to delete. */ @@ -9029,7 +7910,7 @@ export namespace Prisma { /** * ManyRequired deleteMany */ - export type ManyRequiredDeleteManyArgs = { + export type ManyRequiredDeleteManyArgs = { /** * Filter which ManyRequireds to delete */ @@ -9040,15 +7921,15 @@ export namespace Prisma { /** * ManyRequired without action */ - export type ManyRequiredArgs = { + export type ManyRequiredArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null } @@ -9199,7 +8080,7 @@ export namespace Prisma { _all?: true } - export type OptionalSide1AggregateArgs = { + export type OptionalSide1AggregateArgs = { /** * Filter which OptionalSide1 to aggregate. */ @@ -9271,7 +8152,7 @@ export namespace Prisma { - export type OptionalSide1GroupByArgs = { + export type OptionalSide1GroupByArgs = { where?: OptionalSide1WhereInput orderBy?: Enumerable by: OptionalSide1ScalarFieldEnum[] @@ -9322,25 +8203,7 @@ export namespace Prisma { > - export type OptionalSide1Select = $Extensions.GetSelect<{ - id?: boolean - optionalSide2Id?: boolean - int?: boolean - optionalInt?: boolean - float?: boolean - optionalFloat?: boolean - string?: boolean - optionalString?: boolean - json?: boolean - optionalJson?: boolean - enum?: boolean - optionalEnum?: boolean - boolean?: boolean - optionalBoolean?: boolean - opti?: boolean | OptionalSide2Args - }, ExtArgs["result"]["optionalSide1"]> - - export type OptionalSide1SelectScalar = { + export type OptionalSide1Select = { id?: boolean optionalSide2Id?: boolean int?: boolean @@ -9355,22 +8218,38 @@ export namespace Prisma { optionalEnum?: boolean boolean?: boolean optionalBoolean?: boolean + opti?: boolean | OptionalSide2Args } - export type OptionalSide1Include = { - opti?: boolean | OptionalSide2Args + + export type OptionalSide1Include = { + opti?: boolean | OptionalSide2Args } + export type OptionalSide1GetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? OptionalSide1 : + S extends undefined ? never : + S extends { include: any } & (OptionalSide1Args | OptionalSide1FindManyArgs) + ? OptionalSide1 & { + [P in TruthyKeys]: + P extends 'opti' ? OptionalSide2GetPayload | null : never + } + : S extends { select: any } & (OptionalSide1Args | OptionalSide1FindManyArgs) + ? { + [P in TruthyKeys]: + P extends 'opti' ? OptionalSide2GetPayload | null : P extends keyof OptionalSide1 ? OptionalSide1[P] : never + } + : OptionalSide1 - type OptionalSide1GetPayload = $Types.GetResult - type OptionalSide1CountArgs = + type OptionalSide1CountArgs = Omit & { select?: OptionalSide1CountAggregateInputType | true } - export interface OptionalSide1Delegate { - [K: symbol]: { types: Prisma.TypeMap['model']['OptionalSide1'], meta: { name: 'OptionalSide1' } } + export interface OptionalSide1Delegate { + /** * Find zero or one OptionalSide1 that matches the filter. * @param {OptionalSide1FindUniqueArgs} args - Arguments to find a OptionalSide1 @@ -9382,9 +8261,9 @@ export namespace Prisma { * } * }) **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__OptionalSide1Client<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__OptionalSide1Client<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + findUnique( + args: SelectSubset + ): HasReject extends True ? Prisma__OptionalSide1Client> : Prisma__OptionalSide1Client | null, null> /** * Find one OptionalSide1 that matches the filter or throw an error with \`error.code='P2025'\` @@ -9398,9 +8277,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__OptionalSide1Client<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow( + args?: SelectSubset + ): Prisma__OptionalSide1Client> /** * Find the first OptionalSide1 that matches the filter. @@ -9415,9 +8294,9 @@ export namespace Prisma { * } * }) **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__OptionalSide1Client<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__OptionalSide1Client<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + findFirst( + args?: SelectSubset + ): HasReject extends True ? Prisma__OptionalSide1Client> : Prisma__OptionalSide1Client | null, null> /** * Find the first OptionalSide1 that matches the filter or @@ -9433,9 +8312,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__OptionalSide1Client<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow( + args?: SelectSubset + ): Prisma__OptionalSide1Client> /** * Find zero or more OptionalSide1s that matches the filter. @@ -9453,9 +8332,9 @@ export namespace Prisma { * const optionalSide1WithIdOnly = await prisma.optionalSide1.findMany({ select: { id: true } }) * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany( + args?: SelectSubset + ): Prisma.PrismaPromise>> /** * Create a OptionalSide1. @@ -9469,9 +8348,9 @@ export namespace Prisma { * }) * **/ - create>( - args: SelectSubset> - ): Prisma__OptionalSide1Client<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create( + args: SelectSubset + ): Prisma__OptionalSide1Client> /** * Create many OptionalSide1s. @@ -9485,8 +8364,8 @@ export namespace Prisma { * }) * **/ - createMany>( - args?: SelectSubset> + createMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -9501,9 +8380,9 @@ export namespace Prisma { * }) * **/ - delete>( - args: SelectSubset> - ): Prisma__OptionalSide1Client<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete( + args: SelectSubset + ): Prisma__OptionalSide1Client> /** * Update one OptionalSide1. @@ -9520,9 +8399,9 @@ export namespace Prisma { * }) * **/ - update>( - args: SelectSubset> - ): Prisma__OptionalSide1Client<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update( + args: SelectSubset + ): Prisma__OptionalSide1Client> /** * Delete zero or more OptionalSide1s. @@ -9536,8 +8415,8 @@ export namespace Prisma { * }) * **/ - deleteMany>( - args?: SelectSubset> + deleteMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -9557,8 +8436,8 @@ export namespace Prisma { * }) * **/ - updateMany>( - args: SelectSubset> + updateMany( + args: SelectSubset ): Prisma.PrismaPromise /** @@ -9578,9 +8457,9 @@ export namespace Prisma { * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__OptionalSide1Client<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert( + args: SelectSubset + ): Prisma__OptionalSide1Client> /** * Count the number of OptionalSide1s. @@ -9598,7 +8477,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> + T extends _Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -9716,7 +8595,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__OptionalSide1Client implements Prisma.PrismaPromise { + export class Prisma__OptionalSide1Client implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -9731,7 +8610,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - opti = {}>(args?: Subset>): Prisma__OptionalSide2Client<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; + opti(args?: Subset): Prisma__OptionalSide2Client | Null>; private get _document(); /** @@ -9763,15 +8642,15 @@ export namespace Prisma { /** * OptionalSide1 base type for findUnique actions */ - export type OptionalSide1FindUniqueArgsBase = { + export type OptionalSide1FindUniqueArgsBase = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * Filter, which OptionalSide1 to fetch. */ @@ -9781,7 +8660,7 @@ export namespace Prisma { /** * OptionalSide1 findUnique */ - export interface OptionalSide1FindUniqueArgs extends OptionalSide1FindUniqueArgsBase { + export interface OptionalSide1FindUniqueArgs extends OptionalSide1FindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -9793,15 +8672,15 @@ export namespace Prisma { /** * OptionalSide1 findUniqueOrThrow */ - export type OptionalSide1FindUniqueOrThrowArgs = { + export type OptionalSide1FindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * Filter, which OptionalSide1 to fetch. */ @@ -9812,15 +8691,15 @@ export namespace Prisma { /** * OptionalSide1 base type for findFirst actions */ - export type OptionalSide1FindFirstArgsBase = { + export type OptionalSide1FindFirstArgsBase = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * Filter, which OptionalSide1 to fetch. */ @@ -9860,7 +8739,7 @@ export namespace Prisma { /** * OptionalSide1 findFirst */ - export interface OptionalSide1FindFirstArgs extends OptionalSide1FindFirstArgsBase { + export interface OptionalSide1FindFirstArgs extends OptionalSide1FindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -9872,15 +8751,15 @@ export namespace Prisma { /** * OptionalSide1 findFirstOrThrow */ - export type OptionalSide1FindFirstOrThrowArgs = { + export type OptionalSide1FindFirstOrThrowArgs = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * Filter, which OptionalSide1 to fetch. */ @@ -9921,15 +8800,15 @@ export namespace Prisma { /** * OptionalSide1 findMany */ - export type OptionalSide1FindManyArgs = { + export type OptionalSide1FindManyArgs = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * Filter, which OptionalSide1s to fetch. */ @@ -9965,15 +8844,15 @@ export namespace Prisma { /** * OptionalSide1 create */ - export type OptionalSide1CreateArgs = { + export type OptionalSide1CreateArgs = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * The data needed to create a OptionalSide1. */ @@ -9984,7 +8863,7 @@ export namespace Prisma { /** * OptionalSide1 createMany */ - export type OptionalSide1CreateManyArgs = { + export type OptionalSide1CreateManyArgs = { /** * The data used to create many OptionalSide1s. */ @@ -9996,15 +8875,15 @@ export namespace Prisma { /** * OptionalSide1 update */ - export type OptionalSide1UpdateArgs = { + export type OptionalSide1UpdateArgs = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * The data needed to update a OptionalSide1. */ @@ -10019,7 +8898,7 @@ export namespace Prisma { /** * OptionalSide1 updateMany */ - export type OptionalSide1UpdateManyArgs = { + export type OptionalSide1UpdateManyArgs = { /** * The data used to update OptionalSide1s. */ @@ -10034,15 +8913,15 @@ export namespace Prisma { /** * OptionalSide1 upsert */ - export type OptionalSide1UpsertArgs = { + export type OptionalSide1UpsertArgs = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * The filter to search for the OptionalSide1 to update in case it exists. */ @@ -10061,15 +8940,15 @@ export namespace Prisma { /** * OptionalSide1 delete */ - export type OptionalSide1DeleteArgs = { + export type OptionalSide1DeleteArgs = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * Filter which OptionalSide1 to delete. */ @@ -10080,7 +8959,7 @@ export namespace Prisma { /** * OptionalSide1 deleteMany */ - export type OptionalSide1DeleteManyArgs = { + export type OptionalSide1DeleteManyArgs = { /** * Filter which OptionalSide1s to delete */ @@ -10091,15 +8970,15 @@ export namespace Prisma { /** * OptionalSide1 without action */ - export type OptionalSide1Args = { + export type OptionalSide1Args = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null } @@ -10240,7 +9119,7 @@ export namespace Prisma { _all?: true } - export type OptionalSide2AggregateArgs = { + export type OptionalSide2AggregateArgs = { /** * Filter which OptionalSide2 to aggregate. */ @@ -10312,7 +9191,7 @@ export namespace Prisma { - export type OptionalSide2GroupByArgs = { + export type OptionalSide2GroupByArgs = { where?: OptionalSide2WhereInput orderBy?: Enumerable by: OptionalSide2ScalarFieldEnum[] @@ -10362,24 +9241,7 @@ export namespace Prisma { > - export type OptionalSide2Select = $Extensions.GetSelect<{ - id?: boolean - int?: boolean - optionalInt?: boolean - float?: boolean - optionalFloat?: boolean - string?: boolean - optionalString?: boolean - json?: boolean - optionalJson?: boolean - enum?: boolean - optionalEnum?: boolean - boolean?: boolean - optionalBoolean?: boolean - opti?: boolean | OptionalSide1Args - }, ExtArgs["result"]["optionalSide2"]> - - export type OptionalSide2SelectScalar = { + export type OptionalSide2Select = { id?: boolean int?: boolean optionalInt?: boolean @@ -10393,22 +9255,38 @@ export namespace Prisma { optionalEnum?: boolean boolean?: boolean optionalBoolean?: boolean + opti?: boolean | OptionalSide1Args } - export type OptionalSide2Include = { - opti?: boolean | OptionalSide1Args + + export type OptionalSide2Include = { + opti?: boolean | OptionalSide1Args } + export type OptionalSide2GetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? OptionalSide2 : + S extends undefined ? never : + S extends { include: any } & (OptionalSide2Args | OptionalSide2FindManyArgs) + ? OptionalSide2 & { + [P in TruthyKeys]: + P extends 'opti' ? OptionalSide1GetPayload | null : never + } + : S extends { select: any } & (OptionalSide2Args | OptionalSide2FindManyArgs) + ? { + [P in TruthyKeys]: + P extends 'opti' ? OptionalSide1GetPayload | null : P extends keyof OptionalSide2 ? OptionalSide2[P] : never + } + : OptionalSide2 - type OptionalSide2GetPayload = $Types.GetResult - type OptionalSide2CountArgs = + type OptionalSide2CountArgs = Omit & { select?: OptionalSide2CountAggregateInputType | true } - export interface OptionalSide2Delegate { - [K: symbol]: { types: Prisma.TypeMap['model']['OptionalSide2'], meta: { name: 'OptionalSide2' } } + export interface OptionalSide2Delegate { + /** * Find zero or one OptionalSide2 that matches the filter. * @param {OptionalSide2FindUniqueArgs} args - Arguments to find a OptionalSide2 @@ -10420,9 +9298,9 @@ export namespace Prisma { * } * }) **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__OptionalSide2Client<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__OptionalSide2Client<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + findUnique( + args: SelectSubset + ): HasReject extends True ? Prisma__OptionalSide2Client> : Prisma__OptionalSide2Client | null, null> /** * Find one OptionalSide2 that matches the filter or throw an error with \`error.code='P2025'\` @@ -10436,9 +9314,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__OptionalSide2Client<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow( + args?: SelectSubset + ): Prisma__OptionalSide2Client> /** * Find the first OptionalSide2 that matches the filter. @@ -10453,9 +9331,9 @@ export namespace Prisma { * } * }) **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__OptionalSide2Client<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__OptionalSide2Client<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + findFirst( + args?: SelectSubset + ): HasReject extends True ? Prisma__OptionalSide2Client> : Prisma__OptionalSide2Client | null, null> /** * Find the first OptionalSide2 that matches the filter or @@ -10471,9 +9349,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__OptionalSide2Client<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow( + args?: SelectSubset + ): Prisma__OptionalSide2Client> /** * Find zero or more OptionalSide2s that matches the filter. @@ -10491,9 +9369,9 @@ export namespace Prisma { * const optionalSide2WithIdOnly = await prisma.optionalSide2.findMany({ select: { id: true } }) * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany( + args?: SelectSubset + ): Prisma.PrismaPromise>> /** * Create a OptionalSide2. @@ -10507,9 +9385,9 @@ export namespace Prisma { * }) * **/ - create>( - args: SelectSubset> - ): Prisma__OptionalSide2Client<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create( + args: SelectSubset + ): Prisma__OptionalSide2Client> /** * Create many OptionalSide2s. @@ -10523,8 +9401,8 @@ export namespace Prisma { * }) * **/ - createMany>( - args?: SelectSubset> + createMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -10539,9 +9417,9 @@ export namespace Prisma { * }) * **/ - delete>( - args: SelectSubset> - ): Prisma__OptionalSide2Client<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete( + args: SelectSubset + ): Prisma__OptionalSide2Client> /** * Update one OptionalSide2. @@ -10558,9 +9436,9 @@ export namespace Prisma { * }) * **/ - update>( - args: SelectSubset> - ): Prisma__OptionalSide2Client<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update( + args: SelectSubset + ): Prisma__OptionalSide2Client> /** * Delete zero or more OptionalSide2s. @@ -10574,8 +9452,8 @@ export namespace Prisma { * }) * **/ - deleteMany>( - args?: SelectSubset> + deleteMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -10595,8 +9473,8 @@ export namespace Prisma { * }) * **/ - updateMany>( - args: SelectSubset> + updateMany( + args: SelectSubset ): Prisma.PrismaPromise /** @@ -10616,9 +9494,9 @@ export namespace Prisma { * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__OptionalSide2Client<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert( + args: SelectSubset + ): Prisma__OptionalSide2Client> /** * Count the number of OptionalSide2s. @@ -10636,7 +9514,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> + T extends _Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -10754,7 +9632,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__OptionalSide2Client implements Prisma.PrismaPromise { + export class Prisma__OptionalSide2Client implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -10769,7 +9647,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - opti = {}>(args?: Subset>): Prisma__OptionalSide1Client<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; + opti(args?: Subset): Prisma__OptionalSide1Client | Null>; private get _document(); /** @@ -10801,15 +9679,15 @@ export namespace Prisma { /** * OptionalSide2 base type for findUnique actions */ - export type OptionalSide2FindUniqueArgsBase = { + export type OptionalSide2FindUniqueArgsBase = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * Filter, which OptionalSide2 to fetch. */ @@ -10819,7 +9697,7 @@ export namespace Prisma { /** * OptionalSide2 findUnique */ - export interface OptionalSide2FindUniqueArgs extends OptionalSide2FindUniqueArgsBase { + export interface OptionalSide2FindUniqueArgs extends OptionalSide2FindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -10831,15 +9709,15 @@ export namespace Prisma { /** * OptionalSide2 findUniqueOrThrow */ - export type OptionalSide2FindUniqueOrThrowArgs = { + export type OptionalSide2FindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * Filter, which OptionalSide2 to fetch. */ @@ -10850,15 +9728,15 @@ export namespace Prisma { /** * OptionalSide2 base type for findFirst actions */ - export type OptionalSide2FindFirstArgsBase = { + export type OptionalSide2FindFirstArgsBase = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * Filter, which OptionalSide2 to fetch. */ @@ -10898,7 +9776,7 @@ export namespace Prisma { /** * OptionalSide2 findFirst */ - export interface OptionalSide2FindFirstArgs extends OptionalSide2FindFirstArgsBase { + export interface OptionalSide2FindFirstArgs extends OptionalSide2FindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -10910,15 +9788,15 @@ export namespace Prisma { /** * OptionalSide2 findFirstOrThrow */ - export type OptionalSide2FindFirstOrThrowArgs = { + export type OptionalSide2FindFirstOrThrowArgs = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * Filter, which OptionalSide2 to fetch. */ @@ -10959,15 +9837,15 @@ export namespace Prisma { /** * OptionalSide2 findMany */ - export type OptionalSide2FindManyArgs = { + export type OptionalSide2FindManyArgs = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * Filter, which OptionalSide2s to fetch. */ @@ -11003,15 +9881,15 @@ export namespace Prisma { /** * OptionalSide2 create */ - export type OptionalSide2CreateArgs = { + export type OptionalSide2CreateArgs = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * The data needed to create a OptionalSide2. */ @@ -11022,7 +9900,7 @@ export namespace Prisma { /** * OptionalSide2 createMany */ - export type OptionalSide2CreateManyArgs = { + export type OptionalSide2CreateManyArgs = { /** * The data used to create many OptionalSide2s. */ @@ -11034,15 +9912,15 @@ export namespace Prisma { /** * OptionalSide2 update */ - export type OptionalSide2UpdateArgs = { + export type OptionalSide2UpdateArgs = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * The data needed to update a OptionalSide2. */ @@ -11057,7 +9935,7 @@ export namespace Prisma { /** * OptionalSide2 updateMany */ - export type OptionalSide2UpdateManyArgs = { + export type OptionalSide2UpdateManyArgs = { /** * The data used to update OptionalSide2s. */ @@ -11072,15 +9950,15 @@ export namespace Prisma { /** * OptionalSide2 upsert */ - export type OptionalSide2UpsertArgs = { + export type OptionalSide2UpsertArgs = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * The filter to search for the OptionalSide2 to update in case it exists. */ @@ -11099,15 +9977,15 @@ export namespace Prisma { /** * OptionalSide2 delete */ - export type OptionalSide2DeleteArgs = { + export type OptionalSide2DeleteArgs = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * Filter which OptionalSide2 to delete. */ @@ -11118,7 +9996,7 @@ export namespace Prisma { /** * OptionalSide2 deleteMany */ - export type OptionalSide2DeleteManyArgs = { + export type OptionalSide2DeleteManyArgs = { /** * Filter which OptionalSide2s to delete */ @@ -11129,15 +10007,15 @@ export namespace Prisma { /** * OptionalSide2 without action */ - export type OptionalSide2Args = { + export type OptionalSide2Args = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null } @@ -11266,7 +10144,7 @@ export namespace Prisma { _all?: true } - export type AAggregateArgs = { + export type AAggregateArgs = { /** * Filter which A to aggregate. */ @@ -11338,7 +10216,7 @@ export namespace Prisma { - export type AGroupByArgs = { + export type AGroupByArgs = { where?: AWhereInput orderBy?: Enumerable by: AScalarFieldEnum[] @@ -11384,19 +10262,7 @@ export namespace Prisma { > - export type ASelect = $Extensions.GetSelect<{ - id?: boolean - email?: boolean - name?: boolean - int?: boolean - sInt?: boolean - bInt?: boolean - inc_int?: boolean - inc_sInt?: boolean - inc_bInt?: boolean - }, ExtArgs["result"]["a"]> - - export type ASelectScalar = { + export type ASelect = { id?: boolean email?: boolean name?: boolean @@ -11409,15 +10275,27 @@ export namespace Prisma { } - type AGetPayload = $Types.GetResult + export type AGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? A : + S extends undefined ? never : + S extends { include: any } & (AArgs | AFindManyArgs) + ? A + : S extends { select: any } & (AArgs | AFindManyArgs) + ? { + [P in TruthyKeys]: + P extends keyof A ? A[P] : never + } + : A + - type ACountArgs = + type ACountArgs = Omit & { select?: ACountAggregateInputType | true } - export interface ADelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['A'], meta: { name: 'A' } } + export interface ADelegate { + /** * Find zero or one A that matches the filter. * @param {AFindUniqueArgs} args - Arguments to find a A @@ -11429,9 +10307,9 @@ export namespace Prisma { * } * }) **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__AClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__AClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + findUnique( + args: SelectSubset + ): HasReject extends True ? Prisma__AClient> : Prisma__AClient | null, null> /** * Find one A that matches the filter or throw an error with \`error.code='P2025'\` @@ -11445,9 +10323,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__AClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow( + args?: SelectSubset + ): Prisma__AClient> /** * Find the first A that matches the filter. @@ -11462,9 +10340,9 @@ export namespace Prisma { * } * }) **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__AClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__AClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + findFirst( + args?: SelectSubset + ): HasReject extends True ? Prisma__AClient> : Prisma__AClient | null, null> /** * Find the first A that matches the filter or @@ -11480,9 +10358,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__AClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow( + args?: SelectSubset + ): Prisma__AClient> /** * Find zero or more As that matches the filter. @@ -11500,9 +10378,9 @@ export namespace Prisma { * const aWithIdOnly = await prisma.a.findMany({ select: { id: true } }) * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany( + args?: SelectSubset + ): Prisma.PrismaPromise>> /** * Create a A. @@ -11516,9 +10394,9 @@ export namespace Prisma { * }) * **/ - create>( - args: SelectSubset> - ): Prisma__AClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create( + args: SelectSubset + ): Prisma__AClient> /** * Create many As. @@ -11532,8 +10410,8 @@ export namespace Prisma { * }) * **/ - createMany>( - args?: SelectSubset> + createMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -11548,9 +10426,9 @@ export namespace Prisma { * }) * **/ - delete>( - args: SelectSubset> - ): Prisma__AClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete( + args: SelectSubset + ): Prisma__AClient> /** * Update one A. @@ -11567,9 +10445,9 @@ export namespace Prisma { * }) * **/ - update>( - args: SelectSubset> - ): Prisma__AClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update( + args: SelectSubset + ): Prisma__AClient> /** * Delete zero or more As. @@ -11583,8 +10461,8 @@ export namespace Prisma { * }) * **/ - deleteMany>( - args?: SelectSubset> + deleteMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -11604,8 +10482,8 @@ export namespace Prisma { * }) * **/ - updateMany>( - args: SelectSubset> + updateMany( + args: SelectSubset ): Prisma.PrismaPromise /** @@ -11625,9 +10503,9 @@ export namespace Prisma { * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__AClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert( + args: SelectSubset + ): Prisma__AClient> /** * Count the number of As. @@ -11645,7 +10523,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> + T extends _Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -11763,7 +10641,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__AClient implements Prisma.PrismaPromise { + export class Prisma__AClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -11809,11 +10687,11 @@ export namespace Prisma { /** * A base type for findUnique actions */ - export type AFindUniqueArgsBase = { + export type AFindUniqueArgsBase = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * Filter, which A to fetch. */ @@ -11823,7 +10701,7 @@ export namespace Prisma { /** * A findUnique */ - export interface AFindUniqueArgs extends AFindUniqueArgsBase { + export interface AFindUniqueArgs extends AFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -11835,11 +10713,11 @@ export namespace Prisma { /** * A findUniqueOrThrow */ - export type AFindUniqueOrThrowArgs = { + export type AFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * Filter, which A to fetch. */ @@ -11850,11 +10728,11 @@ export namespace Prisma { /** * A base type for findFirst actions */ - export type AFindFirstArgsBase = { + export type AFindFirstArgsBase = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * Filter, which A to fetch. */ @@ -11894,7 +10772,7 @@ export namespace Prisma { /** * A findFirst */ - export interface AFindFirstArgs extends AFindFirstArgsBase { + export interface AFindFirstArgs extends AFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -11906,11 +10784,11 @@ export namespace Prisma { /** * A findFirstOrThrow */ - export type AFindFirstOrThrowArgs = { + export type AFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * Filter, which A to fetch. */ @@ -11951,11 +10829,11 @@ export namespace Prisma { /** * A findMany */ - export type AFindManyArgs = { + export type AFindManyArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * Filter, which AS to fetch. */ @@ -11991,11 +10869,11 @@ export namespace Prisma { /** * A create */ - export type ACreateArgs = { + export type ACreateArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * The data needed to create a A. */ @@ -12006,7 +10884,7 @@ export namespace Prisma { /** * A createMany */ - export type ACreateManyArgs = { + export type ACreateManyArgs = { /** * The data used to create many AS. */ @@ -12018,11 +10896,11 @@ export namespace Prisma { /** * A update */ - export type AUpdateArgs = { + export type AUpdateArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * The data needed to update a A. */ @@ -12037,7 +10915,7 @@ export namespace Prisma { /** * A updateMany */ - export type AUpdateManyArgs = { + export type AUpdateManyArgs = { /** * The data used to update AS. */ @@ -12052,11 +10930,11 @@ export namespace Prisma { /** * A upsert */ - export type AUpsertArgs = { + export type AUpsertArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * The filter to search for the A to update in case it exists. */ @@ -12075,11 +10953,11 @@ export namespace Prisma { /** * A delete */ - export type ADeleteArgs = { + export type ADeleteArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * Filter which A to delete. */ @@ -12090,7 +10968,7 @@ export namespace Prisma { /** * A deleteMany */ - export type ADeleteManyArgs = { + export type ADeleteManyArgs = { /** * Filter which AS to delete */ @@ -12101,11 +10979,11 @@ export namespace Prisma { /** * A without action */ - export type AArgs = { + export type AArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null } @@ -12202,7 +11080,7 @@ export namespace Prisma { _all?: true } - export type BAggregateArgs = { + export type BAggregateArgs = { /** * Filter which B to aggregate. */ @@ -12274,7 +11152,7 @@ export namespace Prisma { - export type BGroupByArgs = { + export type BGroupByArgs = { where?: BWhereInput orderBy?: Enumerable by: BScalarFieldEnum[] @@ -12316,15 +11194,7 @@ export namespace Prisma { > - export type BSelect = $Extensions.GetSelect<{ - id?: boolean - float?: boolean - dFloat?: boolean - decFloat?: boolean - numFloat?: boolean - }, ExtArgs["result"]["b"]> - - export type BSelectScalar = { + export type BSelect = { id?: boolean float?: boolean dFloat?: boolean @@ -12333,15 +11203,27 @@ export namespace Prisma { } - type BGetPayload = $Types.GetResult + export type BGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? B : + S extends undefined ? never : + S extends { include: any } & (BArgs | BFindManyArgs) + ? B + : S extends { select: any } & (BArgs | BFindManyArgs) + ? { + [P in TruthyKeys]: + P extends keyof B ? B[P] : never + } + : B + - type BCountArgs = + type BCountArgs = Omit & { select?: BCountAggregateInputType | true } - export interface BDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['B'], meta: { name: 'B' } } + export interface BDelegate { + /** * Find zero or one B that matches the filter. * @param {BFindUniqueArgs} args - Arguments to find a B @@ -12353,9 +11235,9 @@ export namespace Prisma { * } * }) **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__BClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__BClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + findUnique( + args: SelectSubset + ): HasReject extends True ? Prisma__BClient> : Prisma__BClient | null, null> /** * Find one B that matches the filter or throw an error with \`error.code='P2025'\` @@ -12369,9 +11251,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__BClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow( + args?: SelectSubset + ): Prisma__BClient> /** * Find the first B that matches the filter. @@ -12386,9 +11268,9 @@ export namespace Prisma { * } * }) **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__BClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__BClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + findFirst( + args?: SelectSubset + ): HasReject extends True ? Prisma__BClient> : Prisma__BClient | null, null> /** * Find the first B that matches the filter or @@ -12404,9 +11286,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__BClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow( + args?: SelectSubset + ): Prisma__BClient> /** * Find zero or more Bs that matches the filter. @@ -12424,9 +11306,9 @@ export namespace Prisma { * const bWithIdOnly = await prisma.b.findMany({ select: { id: true } }) * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany( + args?: SelectSubset + ): Prisma.PrismaPromise>> /** * Create a B. @@ -12440,9 +11322,9 @@ export namespace Prisma { * }) * **/ - create>( - args: SelectSubset> - ): Prisma__BClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create( + args: SelectSubset + ): Prisma__BClient> /** * Create many Bs. @@ -12456,8 +11338,8 @@ export namespace Prisma { * }) * **/ - createMany>( - args?: SelectSubset> + createMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -12472,9 +11354,9 @@ export namespace Prisma { * }) * **/ - delete>( - args: SelectSubset> - ): Prisma__BClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete( + args: SelectSubset + ): Prisma__BClient> /** * Update one B. @@ -12491,9 +11373,9 @@ export namespace Prisma { * }) * **/ - update>( - args: SelectSubset> - ): Prisma__BClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update( + args: SelectSubset + ): Prisma__BClient> /** * Delete zero or more Bs. @@ -12507,8 +11389,8 @@ export namespace Prisma { * }) * **/ - deleteMany>( - args?: SelectSubset> + deleteMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -12528,8 +11410,8 @@ export namespace Prisma { * }) * **/ - updateMany>( - args: SelectSubset> + updateMany( + args: SelectSubset ): Prisma.PrismaPromise /** @@ -12549,9 +11431,9 @@ export namespace Prisma { * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__BClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert( + args: SelectSubset + ): Prisma__BClient> /** * Count the number of Bs. @@ -12569,7 +11451,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> + T extends _Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -12687,7 +11569,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__BClient implements Prisma.PrismaPromise { + export class Prisma__BClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -12733,11 +11615,11 @@ export namespace Prisma { /** * B base type for findUnique actions */ - export type BFindUniqueArgsBase = { + export type BFindUniqueArgsBase = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * Filter, which B to fetch. */ @@ -12747,7 +11629,7 @@ export namespace Prisma { /** * B findUnique */ - export interface BFindUniqueArgs extends BFindUniqueArgsBase { + export interface BFindUniqueArgs extends BFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -12759,11 +11641,11 @@ export namespace Prisma { /** * B findUniqueOrThrow */ - export type BFindUniqueOrThrowArgs = { + export type BFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * Filter, which B to fetch. */ @@ -12774,11 +11656,11 @@ export namespace Prisma { /** * B base type for findFirst actions */ - export type BFindFirstArgsBase = { + export type BFindFirstArgsBase = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * Filter, which B to fetch. */ @@ -12818,7 +11700,7 @@ export namespace Prisma { /** * B findFirst */ - export interface BFindFirstArgs extends BFindFirstArgsBase { + export interface BFindFirstArgs extends BFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -12830,11 +11712,11 @@ export namespace Prisma { /** * B findFirstOrThrow */ - export type BFindFirstOrThrowArgs = { + export type BFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * Filter, which B to fetch. */ @@ -12875,11 +11757,11 @@ export namespace Prisma { /** * B findMany */ - export type BFindManyArgs = { + export type BFindManyArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * Filter, which BS to fetch. */ @@ -12915,11 +11797,11 @@ export namespace Prisma { /** * B create */ - export type BCreateArgs = { + export type BCreateArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * The data needed to create a B. */ @@ -12930,7 +11812,7 @@ export namespace Prisma { /** * B createMany */ - export type BCreateManyArgs = { + export type BCreateManyArgs = { /** * The data used to create many BS. */ @@ -12942,11 +11824,11 @@ export namespace Prisma { /** * B update */ - export type BUpdateArgs = { + export type BUpdateArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * The data needed to update a B. */ @@ -12961,7 +11843,7 @@ export namespace Prisma { /** * B updateMany */ - export type BUpdateManyArgs = { + export type BUpdateManyArgs = { /** * The data used to update BS. */ @@ -12976,11 +11858,11 @@ export namespace Prisma { /** * B upsert */ - export type BUpsertArgs = { + export type BUpsertArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * The filter to search for the B to update in case it exists. */ @@ -12999,11 +11881,11 @@ export namespace Prisma { /** * B delete */ - export type BDeleteArgs = { + export type BDeleteArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * Filter which B to delete. */ @@ -13014,7 +11896,7 @@ export namespace Prisma { /** * B deleteMany */ - export type BDeleteManyArgs = { + export type BDeleteManyArgs = { /** * Filter which BS to delete */ @@ -13025,11 +11907,11 @@ export namespace Prisma { /** * B without action */ - export type BArgs = { + export type BArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null } @@ -13108,7 +11990,7 @@ export namespace Prisma { _all?: true } - export type CAggregateArgs = { + export type CAggregateArgs = { /** * Filter which C to aggregate. */ @@ -13168,7 +12050,7 @@ export namespace Prisma { - export type CGroupByArgs = { + export type CGroupByArgs = { where?: CWhereInput orderBy?: Enumerable by: CScalarFieldEnum[] @@ -13208,17 +12090,7 @@ export namespace Prisma { > - export type CSelect = $Extensions.GetSelect<{ - id?: boolean - char?: boolean - vChar?: boolean - text?: boolean - bit?: boolean - vBit?: boolean - uuid?: boolean - }, ExtArgs["result"]["c"]> - - export type CSelectScalar = { + export type CSelect = { id?: boolean char?: boolean vChar?: boolean @@ -13229,15 +12101,27 @@ export namespace Prisma { } - type CGetPayload = $Types.GetResult + export type CGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? C : + S extends undefined ? never : + S extends { include: any } & (CArgs | CFindManyArgs) + ? C + : S extends { select: any } & (CArgs | CFindManyArgs) + ? { + [P in TruthyKeys]: + P extends keyof C ? C[P] : never + } + : C + - type CCountArgs = + type CCountArgs = Omit & { select?: CCountAggregateInputType | true } - export interface CDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['C'], meta: { name: 'C' } } + export interface CDelegate { + /** * Find zero or one C that matches the filter. * @param {CFindUniqueArgs} args - Arguments to find a C @@ -13249,9 +12133,9 @@ export namespace Prisma { * } * }) **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__CClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__CClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + findUnique( + args: SelectSubset + ): HasReject extends True ? Prisma__CClient> : Prisma__CClient | null, null> /** * Find one C that matches the filter or throw an error with \`error.code='P2025'\` @@ -13265,9 +12149,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__CClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow( + args?: SelectSubset + ): Prisma__CClient> /** * Find the first C that matches the filter. @@ -13282,9 +12166,9 @@ export namespace Prisma { * } * }) **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__CClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__CClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + findFirst( + args?: SelectSubset + ): HasReject extends True ? Prisma__CClient> : Prisma__CClient | null, null> /** * Find the first C that matches the filter or @@ -13300,9 +12184,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__CClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow( + args?: SelectSubset + ): Prisma__CClient> /** * Find zero or more Cs that matches the filter. @@ -13320,9 +12204,9 @@ export namespace Prisma { * const cWithIdOnly = await prisma.c.findMany({ select: { id: true } }) * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany( + args?: SelectSubset + ): Prisma.PrismaPromise>> /** * Create a C. @@ -13336,9 +12220,9 @@ export namespace Prisma { * }) * **/ - create>( - args: SelectSubset> - ): Prisma__CClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create( + args: SelectSubset + ): Prisma__CClient> /** * Create many Cs. @@ -13352,8 +12236,8 @@ export namespace Prisma { * }) * **/ - createMany>( - args?: SelectSubset> + createMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -13368,9 +12252,9 @@ export namespace Prisma { * }) * **/ - delete>( - args: SelectSubset> - ): Prisma__CClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete( + args: SelectSubset + ): Prisma__CClient> /** * Update one C. @@ -13387,9 +12271,9 @@ export namespace Prisma { * }) * **/ - update>( - args: SelectSubset> - ): Prisma__CClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update( + args: SelectSubset + ): Prisma__CClient> /** * Delete zero or more Cs. @@ -13403,8 +12287,8 @@ export namespace Prisma { * }) * **/ - deleteMany>( - args?: SelectSubset> + deleteMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -13424,8 +12308,8 @@ export namespace Prisma { * }) * **/ - updateMany>( - args: SelectSubset> + updateMany( + args: SelectSubset ): Prisma.PrismaPromise /** @@ -13445,9 +12329,9 @@ export namespace Prisma { * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__CClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert( + args: SelectSubset + ): Prisma__CClient> /** * Count the number of Cs. @@ -13465,7 +12349,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> + T extends _Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -13583,7 +12467,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__CClient implements Prisma.PrismaPromise { + export class Prisma__CClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -13629,11 +12513,11 @@ export namespace Prisma { /** * C base type for findUnique actions */ - export type CFindUniqueArgsBase = { + export type CFindUniqueArgsBase = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * Filter, which C to fetch. */ @@ -13643,7 +12527,7 @@ export namespace Prisma { /** * C findUnique */ - export interface CFindUniqueArgs extends CFindUniqueArgsBase { + export interface CFindUniqueArgs extends CFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -13655,11 +12539,11 @@ export namespace Prisma { /** * C findUniqueOrThrow */ - export type CFindUniqueOrThrowArgs = { + export type CFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * Filter, which C to fetch. */ @@ -13670,11 +12554,11 @@ export namespace Prisma { /** * C base type for findFirst actions */ - export type CFindFirstArgsBase = { + export type CFindFirstArgsBase = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * Filter, which C to fetch. */ @@ -13714,7 +12598,7 @@ export namespace Prisma { /** * C findFirst */ - export interface CFindFirstArgs extends CFindFirstArgsBase { + export interface CFindFirstArgs extends CFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -13726,11 +12610,11 @@ export namespace Prisma { /** * C findFirstOrThrow */ - export type CFindFirstOrThrowArgs = { + export type CFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * Filter, which C to fetch. */ @@ -13771,11 +12655,11 @@ export namespace Prisma { /** * C findMany */ - export type CFindManyArgs = { + export type CFindManyArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * Filter, which CS to fetch. */ @@ -13811,11 +12695,11 @@ export namespace Prisma { /** * C create */ - export type CCreateArgs = { + export type CCreateArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * The data needed to create a C. */ @@ -13826,7 +12710,7 @@ export namespace Prisma { /** * C createMany */ - export type CCreateManyArgs = { + export type CCreateManyArgs = { /** * The data used to create many CS. */ @@ -13838,11 +12722,11 @@ export namespace Prisma { /** * C update */ - export type CUpdateArgs = { + export type CUpdateArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * The data needed to update a C. */ @@ -13857,7 +12741,7 @@ export namespace Prisma { /** * C updateMany */ - export type CUpdateManyArgs = { + export type CUpdateManyArgs = { /** * The data used to update CS. */ @@ -13872,11 +12756,11 @@ export namespace Prisma { /** * C upsert */ - export type CUpsertArgs = { + export type CUpsertArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * The filter to search for the C to update in case it exists. */ @@ -13895,11 +12779,11 @@ export namespace Prisma { /** * C delete */ - export type CDeleteArgs = { + export type CDeleteArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * Filter which C to delete. */ @@ -13910,7 +12794,7 @@ export namespace Prisma { /** * C deleteMany */ - export type CDeleteManyArgs = { + export type CDeleteManyArgs = { /** * Filter which CS to delete */ @@ -13921,11 +12805,11 @@ export namespace Prisma { /** * C without action */ - export type CArgs = { + export type CArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null } @@ -14010,7 +12894,7 @@ export namespace Prisma { _all?: true } - export type DAggregateArgs = { + export type DAggregateArgs = { /** * Filter which D to aggregate. */ @@ -14082,7 +12966,7 @@ export namespace Prisma { - export type DGroupByArgs = { + export type DGroupByArgs = { where?: DWhereInput orderBy?: Enumerable by: DScalarFieldEnum[] @@ -14126,17 +13010,7 @@ export namespace Prisma { > - export type DSelect = $Extensions.GetSelect<{ - id?: boolean - bool?: boolean - byteA?: boolean - xml?: boolean - json?: boolean - jsonb?: boolean - list?: boolean - }, ExtArgs["result"]["d"]> - - export type DSelectScalar = { + export type DSelect = { id?: boolean bool?: boolean byteA?: boolean @@ -14147,15 +13021,27 @@ export namespace Prisma { } - type DGetPayload = $Types.GetResult + export type DGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? D : + S extends undefined ? never : + S extends { include: any } & (DArgs | DFindManyArgs) + ? D + : S extends { select: any } & (DArgs | DFindManyArgs) + ? { + [P in TruthyKeys]: + P extends keyof D ? D[P] : never + } + : D + - type DCountArgs = + type DCountArgs = Omit & { select?: DCountAggregateInputType | true } - export interface DDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['D'], meta: { name: 'D' } } + export interface DDelegate { + /** * Find zero or one D that matches the filter. * @param {DFindUniqueArgs} args - Arguments to find a D @@ -14167,9 +13053,9 @@ export namespace Prisma { * } * }) **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__DClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__DClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + findUnique( + args: SelectSubset + ): HasReject extends True ? Prisma__DClient> : Prisma__DClient | null, null> /** * Find one D that matches the filter or throw an error with \`error.code='P2025'\` @@ -14183,9 +13069,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__DClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow( + args?: SelectSubset + ): Prisma__DClient> /** * Find the first D that matches the filter. @@ -14200,9 +13086,9 @@ export namespace Prisma { * } * }) **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__DClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__DClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + findFirst( + args?: SelectSubset + ): HasReject extends True ? Prisma__DClient> : Prisma__DClient | null, null> /** * Find the first D that matches the filter or @@ -14218,9 +13104,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__DClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow( + args?: SelectSubset + ): Prisma__DClient> /** * Find zero or more Ds that matches the filter. @@ -14238,9 +13124,9 @@ export namespace Prisma { * const dWithIdOnly = await prisma.d.findMany({ select: { id: true } }) * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany( + args?: SelectSubset + ): Prisma.PrismaPromise>> /** * Create a D. @@ -14254,9 +13140,9 @@ export namespace Prisma { * }) * **/ - create>( - args: SelectSubset> - ): Prisma__DClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create( + args: SelectSubset + ): Prisma__DClient> /** * Create many Ds. @@ -14270,8 +13156,8 @@ export namespace Prisma { * }) * **/ - createMany>( - args?: SelectSubset> + createMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -14286,9 +13172,9 @@ export namespace Prisma { * }) * **/ - delete>( - args: SelectSubset> - ): Prisma__DClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete( + args: SelectSubset + ): Prisma__DClient> /** * Update one D. @@ -14305,9 +13191,9 @@ export namespace Prisma { * }) * **/ - update>( - args: SelectSubset> - ): Prisma__DClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update( + args: SelectSubset + ): Prisma__DClient> /** * Delete zero or more Ds. @@ -14321,8 +13207,8 @@ export namespace Prisma { * }) * **/ - deleteMany>( - args?: SelectSubset> + deleteMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -14342,8 +13228,8 @@ export namespace Prisma { * }) * **/ - updateMany>( - args: SelectSubset> + updateMany( + args: SelectSubset ): Prisma.PrismaPromise /** @@ -14363,9 +13249,9 @@ export namespace Prisma { * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__DClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert( + args: SelectSubset + ): Prisma__DClient> /** * Count the number of Ds. @@ -14383,7 +13269,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> + T extends _Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -14501,7 +13387,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__DClient implements Prisma.PrismaPromise { + export class Prisma__DClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -14547,11 +13433,11 @@ export namespace Prisma { /** * D base type for findUnique actions */ - export type DFindUniqueArgsBase = { + export type DFindUniqueArgsBase = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * Filter, which D to fetch. */ @@ -14561,7 +13447,7 @@ export namespace Prisma { /** * D findUnique */ - export interface DFindUniqueArgs extends DFindUniqueArgsBase { + export interface DFindUniqueArgs extends DFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -14573,11 +13459,11 @@ export namespace Prisma { /** * D findUniqueOrThrow */ - export type DFindUniqueOrThrowArgs = { + export type DFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * Filter, which D to fetch. */ @@ -14588,11 +13474,11 @@ export namespace Prisma { /** * D base type for findFirst actions */ - export type DFindFirstArgsBase = { + export type DFindFirstArgsBase = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * Filter, which D to fetch. */ @@ -14632,7 +13518,7 @@ export namespace Prisma { /** * D findFirst */ - export interface DFindFirstArgs extends DFindFirstArgsBase { + export interface DFindFirstArgs extends DFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -14644,11 +13530,11 @@ export namespace Prisma { /** * D findFirstOrThrow */ - export type DFindFirstOrThrowArgs = { + export type DFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * Filter, which D to fetch. */ @@ -14689,11 +13575,11 @@ export namespace Prisma { /** * D findMany */ - export type DFindManyArgs = { + export type DFindManyArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * Filter, which DS to fetch. */ @@ -14729,11 +13615,11 @@ export namespace Prisma { /** * D create */ - export type DCreateArgs = { + export type DCreateArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * The data needed to create a D. */ @@ -14744,7 +13630,7 @@ export namespace Prisma { /** * D createMany */ - export type DCreateManyArgs = { + export type DCreateManyArgs = { /** * The data used to create many DS. */ @@ -14756,11 +13642,11 @@ export namespace Prisma { /** * D update */ - export type DUpdateArgs = { + export type DUpdateArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * The data needed to update a D. */ @@ -14775,7 +13661,7 @@ export namespace Prisma { /** * D updateMany */ - export type DUpdateManyArgs = { + export type DUpdateManyArgs = { /** * The data used to update DS. */ @@ -14790,11 +13676,11 @@ export namespace Prisma { /** * D upsert */ - export type DUpsertArgs = { + export type DUpsertArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * The filter to search for the D to update in case it exists. */ @@ -14813,11 +13699,11 @@ export namespace Prisma { /** * D delete */ - export type DDeleteArgs = { + export type DDeleteArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * Filter which D to delete. */ @@ -14828,7 +13714,7 @@ export namespace Prisma { /** * D deleteMany */ - export type DDeleteManyArgs = { + export type DDeleteManyArgs = { /** * Filter which DS to delete */ @@ -14839,11 +13725,11 @@ export namespace Prisma { /** * D without action */ - export type DArgs = { + export type DArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null } @@ -14904,7 +13790,7 @@ export namespace Prisma { _all?: true } - export type EAggregateArgs = { + export type EAggregateArgs = { /** * Filter which E to aggregate. */ @@ -14964,7 +13850,7 @@ export namespace Prisma { - export type EGroupByArgs = { + export type EGroupByArgs = { where?: EWhereInput orderBy?: Enumerable by: EScalarFieldEnum[] @@ -15001,14 +13887,7 @@ export namespace Prisma { > - export type ESelect = $Extensions.GetSelect<{ - id?: boolean - date?: boolean - time?: boolean - ts?: boolean - }, ExtArgs["result"]["e"]> - - export type ESelectScalar = { + export type ESelect = { id?: boolean date?: boolean time?: boolean @@ -15016,15 +13895,27 @@ export namespace Prisma { } - type EGetPayload = $Types.GetResult + export type EGetPayload = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? E : + S extends undefined ? never : + S extends { include: any } & (EArgs | EFindManyArgs) + ? E + : S extends { select: any } & (EArgs | EFindManyArgs) + ? { + [P in TruthyKeys]: + P extends keyof E ? E[P] : never + } + : E + - type ECountArgs = + type ECountArgs = Omit & { select?: ECountAggregateInputType | true } - export interface EDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['E'], meta: { name: 'E' } } + export interface EDelegate { + /** * Find zero or one E that matches the filter. * @param {EFindUniqueArgs} args - Arguments to find a E @@ -15036,9 +13927,9 @@ export namespace Prisma { * } * }) **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__EClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__EClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + findUnique( + args: SelectSubset + ): HasReject extends True ? Prisma__EClient> : Prisma__EClient | null, null> /** * Find one E that matches the filter or throw an error with \`error.code='P2025'\` @@ -15052,9 +13943,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__EClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow( + args?: SelectSubset + ): Prisma__EClient> /** * Find the first E that matches the filter. @@ -15069,9 +13960,9 @@ export namespace Prisma { * } * }) **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__EClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__EClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + findFirst( + args?: SelectSubset + ): HasReject extends True ? Prisma__EClient> : Prisma__EClient | null, null> /** * Find the first E that matches the filter or @@ -15087,9 +13978,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__EClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow( + args?: SelectSubset + ): Prisma__EClient> /** * Find zero or more Es that matches the filter. @@ -15107,9 +13998,9 @@ export namespace Prisma { * const eWithIdOnly = await prisma.e.findMany({ select: { id: true } }) * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany( + args?: SelectSubset + ): Prisma.PrismaPromise>> /** * Create a E. @@ -15123,9 +14014,9 @@ export namespace Prisma { * }) * **/ - create>( - args: SelectSubset> - ): Prisma__EClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create( + args: SelectSubset + ): Prisma__EClient> /** * Create many Es. @@ -15139,8 +14030,8 @@ export namespace Prisma { * }) * **/ - createMany>( - args?: SelectSubset> + createMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -15155,9 +14046,9 @@ export namespace Prisma { * }) * **/ - delete>( - args: SelectSubset> - ): Prisma__EClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete( + args: SelectSubset + ): Prisma__EClient> /** * Update one E. @@ -15174,9 +14065,9 @@ export namespace Prisma { * }) * **/ - update>( - args: SelectSubset> - ): Prisma__EClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update( + args: SelectSubset + ): Prisma__EClient> /** * Delete zero or more Es. @@ -15190,8 +14081,8 @@ export namespace Prisma { * }) * **/ - deleteMany>( - args?: SelectSubset> + deleteMany( + args?: SelectSubset ): Prisma.PrismaPromise /** @@ -15211,8 +14102,8 @@ export namespace Prisma { * }) * **/ - updateMany>( - args: SelectSubset> + updateMany( + args: SelectSubset ): Prisma.PrismaPromise /** @@ -15232,9 +14123,9 @@ export namespace Prisma { * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__EClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert( + args: SelectSubset + ): Prisma__EClient> /** * Count the number of Es. @@ -15252,7 +14143,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> + T extends _Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -15370,7 +14261,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__EClient implements Prisma.PrismaPromise { + export class Prisma__EClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -15416,11 +14307,11 @@ export namespace Prisma { /** * E base type for findUnique actions */ - export type EFindUniqueArgsBase = { + export type EFindUniqueArgsBase = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * Filter, which E to fetch. */ @@ -15430,7 +14321,7 @@ export namespace Prisma { /** * E findUnique */ - export interface EFindUniqueArgs extends EFindUniqueArgsBase { + export interface EFindUniqueArgs extends EFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -15442,11 +14333,11 @@ export namespace Prisma { /** * E findUniqueOrThrow */ - export type EFindUniqueOrThrowArgs = { + export type EFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * Filter, which E to fetch. */ @@ -15457,11 +14348,11 @@ export namespace Prisma { /** * E base type for findFirst actions */ - export type EFindFirstArgsBase = { + export type EFindFirstArgsBase = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * Filter, which E to fetch. */ @@ -15501,7 +14392,7 @@ export namespace Prisma { /** * E findFirst */ - export interface EFindFirstArgs extends EFindFirstArgsBase { + export interface EFindFirstArgs extends EFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -15513,11 +14404,11 @@ export namespace Prisma { /** * E findFirstOrThrow */ - export type EFindFirstOrThrowArgs = { + export type EFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * Filter, which E to fetch. */ @@ -15558,11 +14449,11 @@ export namespace Prisma { /** * E findMany */ - export type EFindManyArgs = { + export type EFindManyArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * Filter, which ES to fetch. */ @@ -15598,11 +14489,11 @@ export namespace Prisma { /** * E create */ - export type ECreateArgs = { + export type ECreateArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * The data needed to create a E. */ @@ -15613,7 +14504,7 @@ export namespace Prisma { /** * E createMany */ - export type ECreateManyArgs = { + export type ECreateManyArgs = { /** * The data used to create many ES. */ @@ -15625,11 +14516,11 @@ export namespace Prisma { /** * E update */ - export type EUpdateArgs = { + export type EUpdateArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * The data needed to update a E. */ @@ -15644,7 +14535,7 @@ export namespace Prisma { /** * E updateMany */ - export type EUpdateManyArgs = { + export type EUpdateManyArgs = { /** * The data used to update ES. */ @@ -15659,11 +14550,11 @@ export namespace Prisma { /** * E upsert */ - export type EUpsertArgs = { + export type EUpsertArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * The filter to search for the E to update in case it exists. */ @@ -15682,11 +14573,11 @@ export namespace Prisma { /** * E delete */ - export type EDeleteArgs = { + export type EDeleteArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * Filter which E to delete. */ @@ -15697,7 +14588,7 @@ export namespace Prisma { /** * E deleteMany */ - export type EDeleteManyArgs = { + export type EDeleteManyArgs = { /** * Filter which ES to delete */ @@ -15708,11 +14599,11 @@ export namespace Prisma { /** * E without action */ - export type EArgs = { + export type EArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null } @@ -15721,31 +14612,86 @@ export namespace Prisma { * Enums */ - export const TransactionIsolationLevel: { - ReadUncommitted: 'ReadUncommitted', - ReadCommitted: 'ReadCommitted', - RepeatableRead: 'RepeatableRead', - Serializable: 'Serializable' + export const AScalarFieldEnum: { + id: 'id', + email: 'email', + name: 'name', + int: 'int', + sInt: 'sInt', + bInt: 'bInt', + inc_int: 'inc_int', + inc_sInt: 'inc_sInt', + inc_bInt: 'inc_bInt' + }; + + export type AScalarFieldEnum = (typeof AScalarFieldEnum)[keyof typeof AScalarFieldEnum] + + + export const BScalarFieldEnum: { + id: 'id', + float: 'float', + dFloat: 'dFloat', + decFloat: 'decFloat', + numFloat: 'numFloat' + }; + + export type BScalarFieldEnum = (typeof BScalarFieldEnum)[keyof typeof BScalarFieldEnum] + + + export const CScalarFieldEnum: { + id: 'id', + char: 'char', + vChar: 'vChar', + text: 'text', + bit: 'bit', + vBit: 'vBit', + uuid: 'uuid' + }; + + export type CScalarFieldEnum = (typeof CScalarFieldEnum)[keyof typeof CScalarFieldEnum] + + + export const DScalarFieldEnum: { + id: 'id', + bool: 'bool', + byteA: 'byteA', + xml: 'xml', + json: 'json', + jsonb: 'jsonb', + list: 'list' + }; + + export type DScalarFieldEnum = (typeof DScalarFieldEnum)[keyof typeof DScalarFieldEnum] + + + export const EScalarFieldEnum: { + id: 'id', + date: 'date', + time: 'time', + ts: 'ts' + }; + + export type EScalarFieldEnum = (typeof EScalarFieldEnum)[keyof typeof EScalarFieldEnum] + + + export const JsonNullValueFilter: { + DbNull: typeof DbNull, + JsonNull: typeof JsonNull, + AnyNull: typeof AnyNull }; - export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] + export type JsonNullValueFilter = (typeof JsonNullValueFilter)[keyof typeof JsonNullValueFilter] - export const PostScalarFieldEnum: { - id: 'id', - createdAt: 'createdAt', - title: 'title', - content: 'content', - published: 'published', - authorId: 'authorId' + export const JsonNullValueInput: { + JsonNull: typeof JsonNull }; - export type PostScalarFieldEnum = (typeof PostScalarFieldEnum)[keyof typeof PostScalarFieldEnum] + export type JsonNullValueInput = (typeof JsonNullValueInput)[keyof typeof JsonNullValueInput] - export const UserScalarFieldEnum: { + export const MScalarFieldEnum: { id: 'id', - email: 'email', int: 'int', optionalInt: 'optionalInt', float: 'float', @@ -15760,11 +14706,12 @@ export namespace Prisma { optionalBoolean: 'optionalBoolean' }; - export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum] + export type MScalarFieldEnum = (typeof MScalarFieldEnum)[keyof typeof MScalarFieldEnum] - export const MScalarFieldEnum: { + export const ManyRequiredScalarFieldEnum: { id: 'id', + oneOptionalId: 'oneOptionalId', int: 'int', optionalInt: 'optionalInt', float: 'float', @@ -15779,7 +14726,7 @@ export namespace Prisma { optionalBoolean: 'optionalBoolean' }; - export type MScalarFieldEnum = (typeof MScalarFieldEnum)[keyof typeof MScalarFieldEnum] + export type ManyRequiredScalarFieldEnum = (typeof ManyRequiredScalarFieldEnum)[keyof typeof ManyRequiredScalarFieldEnum] export const NScalarFieldEnum: { @@ -15801,28 +14748,16 @@ export namespace Prisma { export type NScalarFieldEnum = (typeof NScalarFieldEnum)[keyof typeof NScalarFieldEnum] - export const OneOptionalScalarFieldEnum: { - id: 'id', - int: 'int', - optionalInt: 'optionalInt', - float: 'float', - optionalFloat: 'optionalFloat', - string: 'string', - optionalString: 'optionalString', - json: 'json', - optionalJson: 'optionalJson', - enum: 'enum', - optionalEnum: 'optionalEnum', - boolean: 'boolean', - optionalBoolean: 'optionalBoolean' + export const NullableJsonNullValueInput: { + DbNull: typeof DbNull, + JsonNull: typeof JsonNull }; - export type OneOptionalScalarFieldEnum = (typeof OneOptionalScalarFieldEnum)[keyof typeof OneOptionalScalarFieldEnum] + export type NullableJsonNullValueInput = (typeof NullableJsonNullValueInput)[keyof typeof NullableJsonNullValueInput] - export const ManyRequiredScalarFieldEnum: { + export const OneOptionalScalarFieldEnum: { id: 'id', - oneOptionalId: 'oneOptionalId', int: 'int', optionalInt: 'optionalInt', float: 'float', @@ -15837,7 +14772,7 @@ export namespace Prisma { optionalBoolean: 'optionalBoolean' }; - export type ManyRequiredScalarFieldEnum = (typeof ManyRequiredScalarFieldEnum)[keyof typeof ManyRequiredScalarFieldEnum] + export type OneOptionalScalarFieldEnum = (typeof OneOptionalScalarFieldEnum)[keyof typeof OneOptionalScalarFieldEnum] export const OptionalSide1ScalarFieldEnum: { @@ -15879,66 +14814,24 @@ export namespace Prisma { export type OptionalSide2ScalarFieldEnum = (typeof OptionalSide2ScalarFieldEnum)[keyof typeof OptionalSide2ScalarFieldEnum] - export const AScalarFieldEnum: { - id: 'id', - email: 'email', - name: 'name', - int: 'int', - sInt: 'sInt', - bInt: 'bInt', - inc_int: 'inc_int', - inc_sInt: 'inc_sInt', - inc_bInt: 'inc_bInt' - }; - - export type AScalarFieldEnum = (typeof AScalarFieldEnum)[keyof typeof AScalarFieldEnum] - - - export const BScalarFieldEnum: { - id: 'id', - float: 'float', - dFloat: 'dFloat', - decFloat: 'decFloat', - numFloat: 'numFloat' - }; - - export type BScalarFieldEnum = (typeof BScalarFieldEnum)[keyof typeof BScalarFieldEnum] - - - export const CScalarFieldEnum: { - id: 'id', - char: 'char', - vChar: 'vChar', - text: 'text', - bit: 'bit', - vBit: 'vBit', - uuid: 'uuid' - }; - - export type CScalarFieldEnum = (typeof CScalarFieldEnum)[keyof typeof CScalarFieldEnum] - - - export const DScalarFieldEnum: { + export const PostScalarFieldEnum: { id: 'id', - bool: 'bool', - byteA: 'byteA', - xml: 'xml', - json: 'json', - jsonb: 'jsonb', - list: 'list' + createdAt: 'createdAt', + title: 'title', + content: 'content', + published: 'published', + authorId: 'authorId' }; - export type DScalarFieldEnum = (typeof DScalarFieldEnum)[keyof typeof DScalarFieldEnum] + export type PostScalarFieldEnum = (typeof PostScalarFieldEnum)[keyof typeof PostScalarFieldEnum] - export const EScalarFieldEnum: { - id: 'id', - date: 'date', - time: 'time', - ts: 'ts' + export const QueryMode: { + default: 'default', + insensitive: 'insensitive' }; - export type EScalarFieldEnum = (typeof EScalarFieldEnum)[keyof typeof EScalarFieldEnum] + export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] export const SortOrder: { @@ -15949,44 +14842,34 @@ export namespace Prisma { export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] - export const JsonNullValueInput: { - JsonNull: typeof JsonNull - }; - - export type JsonNullValueInput = (typeof JsonNullValueInput)[keyof typeof JsonNullValueInput] - - - export const NullableJsonNullValueInput: { - DbNull: typeof DbNull, - JsonNull: typeof JsonNull - }; - - export type NullableJsonNullValueInput = (typeof NullableJsonNullValueInput)[keyof typeof NullableJsonNullValueInput] - - - export const QueryMode: { - default: 'default', - insensitive: 'insensitive' - }; - - export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] - - - export const NullsOrder: { - first: 'first', - last: 'last' + export const TransactionIsolationLevel: { + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' }; - export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] + export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] - export const JsonNullValueFilter: { - DbNull: typeof DbNull, - JsonNull: typeof JsonNull, - AnyNull: typeof AnyNull + export const UserScalarFieldEnum: { + id: 'id', + email: 'email', + int: 'int', + optionalInt: 'optionalInt', + float: 'float', + optionalFloat: 'optionalFloat', + string: 'string', + optionalString: 'optionalString', + json: 'json', + optionalJson: 'optionalJson', + enum: 'enum', + optionalEnum: 'optionalEnum', + boolean: 'boolean', + optionalBoolean: 'optionalBoolean' }; - export type JsonNullValueFilter = (typeof JsonNullValueFilter)[keyof typeof JsonNullValueFilter] + export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum] /** @@ -16011,7 +14894,7 @@ export namespace Prisma { id?: SortOrder createdAt?: SortOrder title?: SortOrder - content?: SortOrderInput | SortOrder + content?: SortOrder published?: SortOrder authorId?: SortOrder author?: UserOrderByWithRelationInput @@ -16025,7 +14908,7 @@ export namespace Prisma { id?: SortOrder createdAt?: SortOrder title?: SortOrder - content?: SortOrderInput | SortOrder + content?: SortOrder published?: SortOrder authorId?: SortOrder _count?: PostCountOrderByAggregateInput @@ -16072,17 +14955,17 @@ export namespace Prisma { id?: SortOrder email?: SortOrder int?: SortOrder - optionalInt?: SortOrderInput | SortOrder + optionalInt?: SortOrder float?: SortOrder - optionalFloat?: SortOrderInput | SortOrder + optionalFloat?: SortOrder string?: SortOrder - optionalString?: SortOrderInput | SortOrder + optionalString?: SortOrder json?: SortOrder - optionalJson?: SortOrderInput | SortOrder + optionalJson?: SortOrder enum?: SortOrder - optionalEnum?: SortOrderInput | SortOrder + optionalEnum?: SortOrder boolean?: SortOrder - optionalBoolean?: SortOrderInput | SortOrder + optionalBoolean?: SortOrder posts?: PostOrderByRelationAggregateInput } @@ -16095,17 +14978,17 @@ export namespace Prisma { id?: SortOrder email?: SortOrder int?: SortOrder - optionalInt?: SortOrderInput | SortOrder + optionalInt?: SortOrder float?: SortOrder - optionalFloat?: SortOrderInput | SortOrder + optionalFloat?: SortOrder string?: SortOrder - optionalString?: SortOrderInput | SortOrder + optionalString?: SortOrder json?: SortOrder - optionalJson?: SortOrderInput | SortOrder + optionalJson?: SortOrder enum?: SortOrder - optionalEnum?: SortOrderInput | SortOrder + optionalEnum?: SortOrder boolean?: SortOrder - optionalBoolean?: SortOrderInput | SortOrder + optionalBoolean?: SortOrder _count?: UserCountOrderByAggregateInput _avg?: UserAvgOrderByAggregateInput _max?: UserMaxOrderByAggregateInput @@ -16156,17 +15039,17 @@ export namespace Prisma { export type MOrderByWithRelationInput = { id?: SortOrder int?: SortOrder - optionalInt?: SortOrderInput | SortOrder + optionalInt?: SortOrder float?: SortOrder - optionalFloat?: SortOrderInput | SortOrder + optionalFloat?: SortOrder string?: SortOrder - optionalString?: SortOrderInput | SortOrder + optionalString?: SortOrder json?: SortOrder - optionalJson?: SortOrderInput | SortOrder + optionalJson?: SortOrder enum?: SortOrder - optionalEnum?: SortOrderInput | SortOrder + optionalEnum?: SortOrder boolean?: SortOrder - optionalBoolean?: SortOrderInput | SortOrder + optionalBoolean?: SortOrder n?: NOrderByRelationAggregateInput } @@ -16177,17 +15060,17 @@ export namespace Prisma { export type MOrderByWithAggregationInput = { id?: SortOrder int?: SortOrder - optionalInt?: SortOrderInput | SortOrder + optionalInt?: SortOrder float?: SortOrder - optionalFloat?: SortOrderInput | SortOrder + optionalFloat?: SortOrder string?: SortOrder - optionalString?: SortOrderInput | SortOrder + optionalString?: SortOrder json?: SortOrder - optionalJson?: SortOrderInput | SortOrder + optionalJson?: SortOrder enum?: SortOrder - optionalEnum?: SortOrderInput | SortOrder + optionalEnum?: SortOrder boolean?: SortOrder - optionalBoolean?: SortOrderInput | SortOrder + optionalBoolean?: SortOrder _count?: MCountOrderByAggregateInput _avg?: MAvgOrderByAggregateInput _max?: MMaxOrderByAggregateInput @@ -16237,17 +15120,17 @@ export namespace Prisma { export type NOrderByWithRelationInput = { id?: SortOrder int?: SortOrder - optionalInt?: SortOrderInput | SortOrder + optionalInt?: SortOrder float?: SortOrder - optionalFloat?: SortOrderInput | SortOrder + optionalFloat?: SortOrder string?: SortOrder - optionalString?: SortOrderInput | SortOrder + optionalString?: SortOrder json?: SortOrder - optionalJson?: SortOrderInput | SortOrder + optionalJson?: SortOrder enum?: SortOrder - optionalEnum?: SortOrderInput | SortOrder + optionalEnum?: SortOrder boolean?: SortOrder - optionalBoolean?: SortOrderInput | SortOrder + optionalBoolean?: SortOrder m?: MOrderByRelationAggregateInput } @@ -16258,17 +15141,17 @@ export namespace Prisma { export type NOrderByWithAggregationInput = { id?: SortOrder int?: SortOrder - optionalInt?: SortOrderInput | SortOrder + optionalInt?: SortOrder float?: SortOrder - optionalFloat?: SortOrderInput | SortOrder + optionalFloat?: SortOrder string?: SortOrder - optionalString?: SortOrderInput | SortOrder + optionalString?: SortOrder json?: SortOrder - optionalJson?: SortOrderInput | SortOrder + optionalJson?: SortOrder enum?: SortOrder - optionalEnum?: SortOrderInput | SortOrder + optionalEnum?: SortOrder boolean?: SortOrder - optionalBoolean?: SortOrderInput | SortOrder + optionalBoolean?: SortOrder _count?: NCountOrderByAggregateInput _avg?: NAvgOrderByAggregateInput _max?: NMaxOrderByAggregateInput @@ -16318,17 +15201,17 @@ export namespace Prisma { export type OneOptionalOrderByWithRelationInput = { id?: SortOrder int?: SortOrder - optionalInt?: SortOrderInput | SortOrder + optionalInt?: SortOrder float?: SortOrder - optionalFloat?: SortOrderInput | SortOrder + optionalFloat?: SortOrder string?: SortOrder - optionalString?: SortOrderInput | SortOrder + optionalString?: SortOrder json?: SortOrder - optionalJson?: SortOrderInput | SortOrder + optionalJson?: SortOrder enum?: SortOrder - optionalEnum?: SortOrderInput | SortOrder + optionalEnum?: SortOrder boolean?: SortOrder - optionalBoolean?: SortOrderInput | SortOrder + optionalBoolean?: SortOrder many?: ManyRequiredOrderByRelationAggregateInput } @@ -16339,17 +15222,17 @@ export namespace Prisma { export type OneOptionalOrderByWithAggregationInput = { id?: SortOrder int?: SortOrder - optionalInt?: SortOrderInput | SortOrder + optionalInt?: SortOrder float?: SortOrder - optionalFloat?: SortOrderInput | SortOrder + optionalFloat?: SortOrder string?: SortOrder - optionalString?: SortOrderInput | SortOrder + optionalString?: SortOrder json?: SortOrder - optionalJson?: SortOrderInput | SortOrder + optionalJson?: SortOrder enum?: SortOrder - optionalEnum?: SortOrderInput | SortOrder + optionalEnum?: SortOrder boolean?: SortOrder - optionalBoolean?: SortOrderInput | SortOrder + optionalBoolean?: SortOrder _count?: OneOptionalCountOrderByAggregateInput _avg?: OneOptionalAvgOrderByAggregateInput _max?: OneOptionalMaxOrderByAggregateInput @@ -16399,19 +15282,19 @@ export namespace Prisma { export type ManyRequiredOrderByWithRelationInput = { id?: SortOrder - oneOptionalId?: SortOrderInput | SortOrder + oneOptionalId?: SortOrder int?: SortOrder - optionalInt?: SortOrderInput | SortOrder + optionalInt?: SortOrder float?: SortOrder - optionalFloat?: SortOrderInput | SortOrder + optionalFloat?: SortOrder string?: SortOrder - optionalString?: SortOrderInput | SortOrder + optionalString?: SortOrder json?: SortOrder - optionalJson?: SortOrderInput | SortOrder + optionalJson?: SortOrder enum?: SortOrder - optionalEnum?: SortOrderInput | SortOrder + optionalEnum?: SortOrder boolean?: SortOrder - optionalBoolean?: SortOrderInput | SortOrder + optionalBoolean?: SortOrder one?: OneOptionalOrderByWithRelationInput } @@ -16421,19 +15304,19 @@ export namespace Prisma { export type ManyRequiredOrderByWithAggregationInput = { id?: SortOrder - oneOptionalId?: SortOrderInput | SortOrder + oneOptionalId?: SortOrder int?: SortOrder - optionalInt?: SortOrderInput | SortOrder + optionalInt?: SortOrder float?: SortOrder - optionalFloat?: SortOrderInput | SortOrder + optionalFloat?: SortOrder string?: SortOrder - optionalString?: SortOrderInput | SortOrder + optionalString?: SortOrder json?: SortOrder - optionalJson?: SortOrderInput | SortOrder + optionalJson?: SortOrder enum?: SortOrder - optionalEnum?: SortOrderInput | SortOrder + optionalEnum?: SortOrder boolean?: SortOrder - optionalBoolean?: SortOrderInput | SortOrder + optionalBoolean?: SortOrder _count?: ManyRequiredCountOrderByAggregateInput _avg?: ManyRequiredAvgOrderByAggregateInput _max?: ManyRequiredMaxOrderByAggregateInput @@ -16484,19 +15367,19 @@ export namespace Prisma { export type OptionalSide1OrderByWithRelationInput = { id?: SortOrder - optionalSide2Id?: SortOrderInput | SortOrder + optionalSide2Id?: SortOrder int?: SortOrder - optionalInt?: SortOrderInput | SortOrder + optionalInt?: SortOrder float?: SortOrder - optionalFloat?: SortOrderInput | SortOrder + optionalFloat?: SortOrder string?: SortOrder - optionalString?: SortOrderInput | SortOrder + optionalString?: SortOrder json?: SortOrder - optionalJson?: SortOrderInput | SortOrder + optionalJson?: SortOrder enum?: SortOrder - optionalEnum?: SortOrderInput | SortOrder + optionalEnum?: SortOrder boolean?: SortOrder - optionalBoolean?: SortOrderInput | SortOrder + optionalBoolean?: SortOrder opti?: OptionalSide2OrderByWithRelationInput } @@ -16507,19 +15390,19 @@ export namespace Prisma { export type OptionalSide1OrderByWithAggregationInput = { id?: SortOrder - optionalSide2Id?: SortOrderInput | SortOrder + optionalSide2Id?: SortOrder int?: SortOrder - optionalInt?: SortOrderInput | SortOrder + optionalInt?: SortOrder float?: SortOrder - optionalFloat?: SortOrderInput | SortOrder + optionalFloat?: SortOrder string?: SortOrder - optionalString?: SortOrderInput | SortOrder + optionalString?: SortOrder json?: SortOrder - optionalJson?: SortOrderInput | SortOrder + optionalJson?: SortOrder enum?: SortOrder - optionalEnum?: SortOrderInput | SortOrder + optionalEnum?: SortOrder boolean?: SortOrder - optionalBoolean?: SortOrderInput | SortOrder + optionalBoolean?: SortOrder _count?: OptionalSide1CountOrderByAggregateInput _avg?: OptionalSide1AvgOrderByAggregateInput _max?: OptionalSide1MaxOrderByAggregateInput @@ -16570,17 +15453,17 @@ export namespace Prisma { export type OptionalSide2OrderByWithRelationInput = { id?: SortOrder int?: SortOrder - optionalInt?: SortOrderInput | SortOrder + optionalInt?: SortOrder float?: SortOrder - optionalFloat?: SortOrderInput | SortOrder + optionalFloat?: SortOrder string?: SortOrder - optionalString?: SortOrderInput | SortOrder + optionalString?: SortOrder json?: SortOrder - optionalJson?: SortOrderInput | SortOrder + optionalJson?: SortOrder enum?: SortOrder - optionalEnum?: SortOrderInput | SortOrder + optionalEnum?: SortOrder boolean?: SortOrder - optionalBoolean?: SortOrderInput | SortOrder + optionalBoolean?: SortOrder opti?: OptionalSide1OrderByWithRelationInput } @@ -16591,17 +15474,17 @@ export namespace Prisma { export type OptionalSide2OrderByWithAggregationInput = { id?: SortOrder int?: SortOrder - optionalInt?: SortOrderInput | SortOrder + optionalInt?: SortOrder float?: SortOrder - optionalFloat?: SortOrderInput | SortOrder + optionalFloat?: SortOrder string?: SortOrder - optionalString?: SortOrderInput | SortOrder + optionalString?: SortOrder json?: SortOrder - optionalJson?: SortOrderInput | SortOrder + optionalJson?: SortOrder enum?: SortOrder - optionalEnum?: SortOrderInput | SortOrder + optionalEnum?: SortOrder boolean?: SortOrder - optionalBoolean?: SortOrderInput | SortOrder + optionalBoolean?: SortOrder _count?: OptionalSide2CountOrderByAggregateInput _avg?: OptionalSide2AvgOrderByAggregateInput _max?: OptionalSide2MaxOrderByAggregateInput @@ -16646,7 +15529,7 @@ export namespace Prisma { export type AOrderByWithRelationInput = { id?: SortOrder email?: SortOrder - name?: SortOrderInput | SortOrder + name?: SortOrder int?: SortOrder sInt?: SortOrder bInt?: SortOrder @@ -16663,7 +15546,7 @@ export namespace Prisma { export type AOrderByWithAggregationInput = { id?: SortOrder email?: SortOrder - name?: SortOrderInput | SortOrder + name?: SortOrder int?: SortOrder sInt?: SortOrder bInt?: SortOrder @@ -18136,13 +17019,8 @@ export namespace Prisma { } export type UserRelationFilter = { - is?: UserWhereInput | null - isNot?: UserWhereInput | null - } - - export type SortOrderInput = { - sort: SortOrder - nulls?: NullsOrder + is?: UserWhereInput + isNot?: UserWhereInput } export type PostCountOrderByAggregateInput = { diff --git a/packages/client/src/__tests__/types/distinct/test.ts b/packages/client/src/__tests__/types/distinct/test.ts index bb0bca85bd54..7e8c698199e2 100644 --- a/packages/client/src/__tests__/types/distinct/test.ts +++ b/packages/client/src/__tests__/types/distinct/test.ts @@ -13,14 +13,6 @@ async function main() { await prisma.user.findMany({ distinct: ['id', 'email', 'age', 'followerCount', 'name'], }) - - await prisma.user.findMany({ - distinct: 'id', - }) - - await prisma.user.findMany({ - distinct: 'email', - }) } main().catch((e) => { diff --git a/packages/client/src/generation/TSClient/Args.ts b/packages/client/src/generation/TSClient/Args.ts index 160a484955ce..e9b06f7c3710 100644 --- a/packages/client/src/generation/TSClient/Args.ts +++ b/packages/client/src/generation/TSClient/Args.ts @@ -7,6 +7,7 @@ import { TAB_SIZE } from './constants' import type { Generatable } from './Generatable' import { getArgFieldJSDoc } from './helpers' import { InputField } from './Input' +import { ifExtensions } from './utils/ifExtensions' export class ArgsType implements Generatable { private generatedName: string | null = null @@ -91,7 +92,10 @@ export class ArgsType implements Generatable { /** * ${this.getGeneratedComment()} */ -export type ${generatedName} = { +export type ${generatedName}${ifExtensions( + '', + '', + )} = { ${indent(argsToGenerate.map((arg) => new InputField(arg, false, this.genericsInfo).toTS()).join('\n'), TAB_SIZE)} } ` @@ -114,14 +118,20 @@ ${indent(argsToGenerate.map((arg) => new InputField(arg, false, this.genericsInf /** * ${name} base type for ${action} actions */ -export type ${baseTypeName} = { +export type ${baseTypeName}${ifExtensions( + '', + '', + )} = { ${indent(argsToGenerate.map((arg) => new InputField(arg, false, this.genericsInfo).toTS()).join('\n'), TAB_SIZE)} } /** * ${this.getGeneratedComment()} */ -export interface ${modelArgName} extends ${baseTypeName} { +export interface ${modelArgName}${ifExtensions( + '', + '', + )} extends ${baseTypeName}${ifExtensions('', '')} { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`${replacement}\` method instead @@ -156,7 +166,10 @@ export class MinimalArgsType implements Generatable { /** * ${name} ${action ? action : 'without action'} */ -export type ${this.generatedTypeName} = { +export type ${this.generatedTypeName}${ifExtensions( + '', + '', + )} = { ${indent( args .map((arg) => { diff --git a/packages/client/src/generation/TSClient/Count.ts b/packages/client/src/generation/TSClient/Count.ts index 05b98e55c6a9..24bf95a1564b 100644 --- a/packages/client/src/generation/TSClient/Count.ts +++ b/packages/client/src/generation/TSClient/Count.ts @@ -10,6 +10,8 @@ import { TAB_SIZE } from './constants' import type { Generatable } from './Generatable' import { TS } from './Generatable' import { OutputType } from './Output' +import { PayloadType } from './Payload' +import { ifExtensions } from './utils/ifExtensions' export class Count implements Generatable { constructor( @@ -51,7 +53,10 @@ export class Count implements Generatable { ${outputType.toTS()} -export type ${getSelectName(name)} = { +export type ${getSelectName(name)}${ifExtensions( + '', + '', + )} = { ${indent( type.fields .map((field) => { @@ -74,6 +79,10 @@ ${indent( )} } +${ifExtensions('', new PayloadType(outputType, this.dmmf, false).toTS())} + + + // Custom InputTypes ${this.argsTypes.map((gen) => TS(gen)).join('\n')} ` diff --git a/packages/client/src/generation/TSClient/Input.ts b/packages/client/src/generation/TSClient/Input.ts index 8451c20c5666..a6002491002d 100644 --- a/packages/client/src/generation/TSClient/Input.ts +++ b/packages/client/src/generation/TSClient/Input.ts @@ -7,6 +7,7 @@ import { GenericArgsInfo } from '../GenericsArgsInfo' import * as ts from '../ts-builders' import { TAB_SIZE } from './constants' import type { Generatable } from './Generatable' +import { ifExtensions } from './utils/ifExtensions' export class InputField implements Generatable { constructor( @@ -68,9 +69,11 @@ function buildSingleFieldType( type = namedInputType(t.type.name) } - if (type.name.endsWith('Select') || type.name.endsWith('Include')) { - type.addGenericArgument(ts.namedType('ExtArgs')) - } + ifExtensions(() => { + if (type.name.endsWith('Select') || type.name.endsWith('Include')) { + type.addGenericArgument(ts.namedType('ExtArgs')) + } + }, undefined) if (genericsInfo.needsGenericModelArg(t)) { if (source) { diff --git a/packages/client/src/generation/TSClient/Model.ts b/packages/client/src/generation/TSClient/Model.ts index bb1b7c584624..f19d8d3d9298 100644 --- a/packages/client/src/generation/TSClient/Model.ts +++ b/packages/client/src/generation/TSClient/Model.ts @@ -29,6 +29,7 @@ import { getSumAggregateName, Projection, } from '../utils' +import { buildComment } from '../utils/types/buildComment' import { InputField } from './../TSClient' import { ArgsType, MinimalArgsType } from './Args' import { TAB_SIZE } from './constants' @@ -37,15 +38,12 @@ import { TS } from './Generatable' import { getArgFieldJSDoc, getArgs, getGenericMethod, getMethodJSDoc, wrapComment } from './helpers' import { InputType } from './Input' import { ModelFieldRefs } from './ModelFieldRefs' -import { buildModelOutputProperty, OutputType } from './Output' +import { ModelOutputField, OutputType } from './Output' +import { PayloadType } from './Payload' import { SchemaOutputType } from './SchemaOutput' import { buildIncludeType, buildScalarSelectType, buildSelectType } from './SelectInclude' import { getModelActions } from './utils/getModelActions' - -const extArgsParam = ts - .genericParameter('ExtArgs') - .extends(ts.namedType('$Extensions.Args')) - .default(ts.namedType('$Extensions.DefaultArgs')) +import { ifExtensions } from './utils/ifExtensions' export class Model implements Generatable { protected outputType: OutputType @@ -121,7 +119,10 @@ export class Model implements Generatable { return ` -export type ${groupByArgsName} = { +export type ${groupByArgsName}${ifExtensions( + '', + '', + )} = { ${indent( groupByRootField.args .map((arg) => { @@ -237,7 +238,10 @@ ${ : '' } -export type ${aggregateArgsName} = { +export type ${aggregateArgsName}${ifExtensions( + '', + '', + )} = { ${indent( aggregateRootField.args .map((arg) => { @@ -272,64 +276,60 @@ export type ${getAggregateGetName(model.name)} { + return `export type ${ + model.name + }Payload = { +${indent( + `objects: { +${indent( + model.fields + .filter((f) => f.kind === 'object') + .map((field) => new ModelOutputField(this.dmmf, field, false).toTS()) + .join('\n'), + TAB_SIZE, +)} +}`, + TAB_SIZE, +)} +${indent( + `scalars: runtime.Types.Extensions.GetResult<{ +${indent( + model.fields + .filter((f) => f.kind === 'scalar' || f.kind === 'enum') + .map((field) => new ModelOutputField(this.dmmf, field, !this.dmmf.typeMap[field.type]).toTS()) + .join('\n'), + TAB_SIZE, +)} +}, ExtArgs['result']['${lowerCase(model.name)}']>`, + TAB_SIZE, +)} +} - const scalarsType = isComposite - ? scalars - : ts - .namedType('$Extensions.GetResult') - .addGenericArgument(scalars) - .addGenericArgument(ts.namedType('ExtArgs').subKey('result').subKey(lowerCase(model.name))) - - const payloadName = `${model.name}Payload` - const payloadTypeDeclaration = ts.typeDeclaration( - `${model.name}Payload`, - ts - .objectType() - .add(ts.property('objects', objects)) - .add(ts.property('scalars', scalarsType)) - .add(ts.property('composites', composites)), +${buildComment(docs)}export type ${model.name} = ${model.name}Payload['scalars'] +` + }, + () => { + return `${buildComment(docs)}export type ${model.name} = { +${indent( + model.fields + .filter((f) => (f.kind !== 'object' && f.kind !== 'unsupported') || this.dmmf.typeMap[f.type]) + .map((field) => new ModelOutputField(this.dmmf, field, !this.dmmf.typeMap[field.type]).toTS()) + .join('\n'), + TAB_SIZE, +)} +} +` + }, ) - - if (!isComposite) { - payloadTypeDeclaration.addGenericParameter(extArgsParam) - } - const payloadExport = ts.moduleExport(payloadTypeDeclaration) - - const modelTypeExport = ts - .moduleExport( - ts.typeDeclaration( - model.name, - ts.namedType(`runtime.Types.DefaultSelection`).addGenericArgument(ts.namedType(payloadName)), - ), - ) - .setDocComment(ts.docComment(docs)) - - return `${ts.stringify(payloadExport)}\n\n${ts.stringify(modelTypeExport)}` } public toTS(): string { const { model } = this - const isComposite = this.dmmf.typeMap[model.name] const hasRelationField = model.fields.some((f) => f.kind === 'object') const includeType = hasRelationField @@ -351,16 +351,20 @@ ${!this.dmmf.typeMap[model.name] ? this.getAggregationTypes() : ''} ${!this.dmmf.typeMap[model.name] ? this.getGroupByTypes() : ''} ${ts.stringify(buildSelectType({ modelName: this.model.name, fields: this.outputType.fields }))} -${ts.stringify(buildScalarSelectType({ modelName: this.model.name, fields: this.outputType.fields }), { - newLine: 'leading', -})} +${ifExtensions(() => { + return ts.stringify(buildScalarSelectType({ modelName: this.model.name, fields: this.outputType.fields }), { + newLine: 'leading', + }) +}, '')} ${includeType} +${ifExtensions( + `type ${model.name}GetPayload = runtime.Types.GetFindResult<${model.name}Payload, S>`, + new PayloadType(this.outputType, this.dmmf).toTS(), +)} -type ${model.name}GetPayload = $Types.GetResult<${ - model.name - }Payload, S> - -${isComposite ? '' : new ModelDelegate(this.outputType, this.dmmf, this.generator).toTS()} +${new ModelDelegate(this.outputType, this.dmmf, this.generator).toTS()} ${new ModelFieldRefs(this.generator, this.outputType).toTS()} @@ -412,15 +416,27 @@ export class ModelDelegate implements Generatable { return `\ ${ availableActions.includes(DMMF.ModelAction.aggregate) - ? `type ${countArgsName} = + ? `type ${countArgsName}${ifExtensions( + '', + '', + )} = Omit<${getModelArgName(name, DMMF.ModelAction.findMany)}, 'select' | 'include'> & { select?: ${getCountAggregateInputName(name)} | true } ` : '' } -export interface ${name}Delegate { -${indent(`[K: symbol]: { types: Prisma.TypeMap['model']['${name}'], meta: { name: '${name}' } }`, TAB_SIZE)} +export interface ${name}Delegate { +${ifExtensions( + `${indent( + `[K: symbol]: { types: Prisma.TypeMap['model']['${name}'], meta: { name: '${name}' } }`, + TAB_SIZE, + )}`, + '', +)} ${indent( nonAggregateActions .map( @@ -440,7 +456,7 @@ ${ count( args?: Subset, ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> + T extends _Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -532,7 +548,10 @@ ${fieldsProxy} * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ -export class Prisma__${name}Client implements Prisma.PrismaPromise { +export class Prisma__${name}Client implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -548,17 +567,14 @@ export class Prisma__${name}Client { - const fieldTypeName = (f.outputType.type as DMMF.OutputType).name - return f.outputType.location === 'outputObjectTypes' && !this.dmmf.typeMap[fieldTypeName] && f.name !== '_count' - }) + .filter((f) => f.outputType.location === 'outputObjectTypes' && f.name !== '_count') .map((f) => { const fieldTypeName = (f.outputType.type as DMMF.OutputType).name return ` -${f.name} = {}>(args?: Subset>): ${getReturnType({ +${f.name} = {}', + '= {}', + )}>(args?: Subset', '')}>): ${getReturnType({ name: fieldTypeName, actionName: f.outputType.isList ? DMMF.ModelAction.findMany : DMMF.ModelAction.findUnique, hideCondition: false, diff --git a/packages/client/src/generation/TSClient/Output.ts b/packages/client/src/generation/TSClient/Output.ts index ac7ba784a97b..74b9a6d0abf0 100644 --- a/packages/client/src/generation/TSClient/Output.ts +++ b/packages/client/src/generation/TSClient/Output.ts @@ -3,41 +3,45 @@ import indent from 'indent-string' import type { DMMFHelper } from '../../runtime/dmmf' import type { DMMF } from '../../runtime/dmmf-types' import { GraphQLScalarToJSTypeTable, isSchemaEnum, needsNamespace } from '../../runtime/utils/common' -import * as ts from '../ts-builders' +import { buildComment } from '../utils/types/buildComment' import { TAB_SIZE } from './constants' import type { Generatable } from './Generatable' import { wrapComment } from './helpers' +import { ifExtensions } from './utils/ifExtensions' -export function buildModelOutputProperty(field: DMMF.Field, dmmf: DMMFHelper, useNamespace = false) { - let fieldTypeName = GraphQLScalarToJSTypeTable[field.type] || field.type - if (Array.isArray(fieldTypeName)) { - fieldTypeName = fieldTypeName[0] - } - if (useNamespace && needsNamespace(field.type, dmmf)) { - fieldTypeName = `Prisma.${fieldTypeName}` - } - let fieldType: ts.TypeBuilder - if (field.kind === 'object') { - const payloadType = ts.namedType(`${fieldTypeName}Payload`) - if (!dmmf.typeMap[field.type]) { - // not a composite - payloadType.addGenericArgument(ts.namedType('ExtArgs')) +export class ModelOutputField implements Generatable { + constructor( + protected readonly dmmf: DMMFHelper, + protected readonly field: DMMF.Field, + protected readonly useNamespace = false, + ) {} + public toTS(): string { + const { field, useNamespace } = this + // ENUMTODO + let fieldType = GraphQLScalarToJSTypeTable[field.type] || field.type + if (Array.isArray(fieldType)) { + fieldType = fieldType[0] } - fieldType = payloadType - } else { - fieldType = ts.namedType(fieldTypeName) - } + const arrayStr = field.isList ? `[]` : '' + const nullableStr = !field.isRequired && !field.isList ? ' | null' : '' + const namespaceStr = useNamespace && needsNamespace(field.type, this.dmmf) ? `Prisma.` : '' - if (field.isList) { - fieldType = ts.array(fieldType) - } else if (!field.isRequired) { - fieldType = ts.unionType(fieldType).addVariant(ts.nullType) - } - const property = ts.property(field.name, fieldType) - if (field.documentation) { - property.setDocComment(ts.docComment(field.documentation)) + return ifExtensions( + () => { + if (field.kind === 'object') { + fieldType = `${fieldType}Payload` + return `${buildComment(field.documentation)}${ + field.name + }: ${namespaceStr}${fieldType}${arrayStr}${nullableStr}` + } + + return `${buildComment(field.documentation)}${field.name}: ${namespaceStr}${fieldType}${arrayStr}${nullableStr}` + }, + () => { + return `${buildComment(field.documentation)}${field.name}: ${namespaceStr}${fieldType}${arrayStr}${nullableStr}` + }, + ) } - return property } export class OutputField implements Generatable { diff --git a/packages/client/src/generation/TSClient/Payload.ts b/packages/client/src/generation/TSClient/Payload.ts new file mode 100644 index 000000000000..38d3a6196f63 --- /dev/null +++ b/packages/client/src/generation/TSClient/Payload.ts @@ -0,0 +1,117 @@ +import indent from 'indent-string' + +import { get } from '../../../../../helpers/blaze/get' +import { DMMFHelper } from '../../runtime/dmmf' +import { DMMF } from '../../runtime/dmmf-types' +import { lowerCase } from '../../runtime/utils/common' +import { getArgName, getModelArgName, getPayloadName, Projection } from '../utils' +import type { Generatable } from './Generatable' +import type { OutputType } from './Output' +import { ifExtensions } from './utils/ifExtensions' + +export class PayloadType implements Generatable { + constructor( + protected readonly type: OutputType, + protected readonly dmmf: DMMFHelper, + protected readonly findMany = true, + ) {} + + public toTS(): string { + const { type } = this + const { name } = type + + const argsName = getArgName(name) + + const include = this.renderRelations(Projection.include) + const select = this.renderRelations(Projection.select) + + const isModel = !this.dmmf.typeMap[name] + const findManyArg = + isModel && this.findMany ? ` | ${getModelArgName(name, DMMF.ModelAction.findMany)}${ifExtensions('', '')}` : '' + + return `\ +export type ${getPayloadName(name)}`, + '', + )}> = + S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : + S extends true ? ${ifExtensions(`_${name}`, name)} : + S extends undefined ? never : + S extends { include: any } & (${argsName}${findManyArg}) + ? ${ifExtensions(`_${name}`, name)} ${include.length > 0 ? ifExtensions(`& ${include}`, ` & ${include}`) : ''} + : S extends { select: any } & (${argsName}${findManyArg}) + ? ${select} + : ${ifExtensions(`_${name}`, name)} +` + } + private renderRelations(projection: Projection): string { + const { type } = this + + const relationsProjectionChoice = { + // For select, a "relation"" can be a model or a composite + [Projection.select]: () => { + return type.fields.filter((f) => { + return f.outputType.location === 'outputObjectTypes' + }) + }, + + // But for include, a "relation" can only be a model + [Projection.include]: () => { + const nonCompositeRelations = type.fields.filter((f) => { + return ( + f.outputType.location === 'outputObjectTypes' && + typeof f.outputType.type === 'object' && + !this.dmmf.typeMap[f.outputType.type.name] + ) + }) + + return nonCompositeRelations + }, + } + + const relations = get(relationsProjectionChoice, projection)() + + if (projection === Projection.include && relations.length === 0) return '' + + const typeName = ifExtensions(`_${type.name}`, type.name) + + const selectPrefix = projection === Projection.select ? ` P extends keyof ${typeName} ? ${typeName}[P] :` : '' + + return `{ + [P in TruthyKeys]: +${indent( + relations + .map( + (f) => + `P extends '${f.name}' ? ${this.wrapType( + f, + `${getPayloadName((f.outputType.type as DMMF.OutputType).name)}`, + )} :`, + ) + .join('\n'), + 6, +)} ${selectPrefix} never +} ` + } + private wrapType(field: DMMF.SchemaField, str: string): string { + const { outputType } = field + if (!field.isNullable && !outputType.isList) { + return str + } + if (outputType.isList) { + return `Array < ${str}> ` + } + if (str === 'Null') { + return 'null' + } + if (field.isNullable) { + str += ' | null' + } + return str + } +} diff --git a/packages/client/src/generation/TSClient/PrismaClient.ts b/packages/client/src/generation/TSClient/PrismaClient.ts index a1c38e8002ca..78656a30753d 100644 --- a/packages/client/src/generation/TSClient/PrismaClient.ts +++ b/packages/client/src/generation/TSClient/PrismaClient.ts @@ -12,6 +12,65 @@ import { TAB_SIZE } from './constants' import { Datasources } from './Datasources' import type { Generatable } from './Generatable' import { getModelActions } from './utils/getModelActions' +import { ifExtensions } from './utils/ifExtensions' + +function clientExtensionsResultDefinition(this: PrismaClientClass) { + const modelNames = Object.keys(this.dmmf.getModelMap()) + + const resultGenericParams = (modelName: string) => { + return `R_${modelName}_Needs extends Record>` + } + + const genericParams = [ + ...modelNames.flatMap(resultGenericParams), + `R extends runtime.Types.Extensions.UserArgs['result'] = {}`, + ].join(',\n ') + + const resultParam = (modelName: string) => { + return `${lowerCase(modelName)}?: { + [K in keyof R_${modelName}_Needs]: { + needs: R_${modelName}_Needs[K] + compute: (data: runtime.Types.GetResult<${modelName}Payload, { select: R_${modelName}_Needs[K] }, 'findUniqueOrThrow'>) => unknown + } + }` + } + + const params = `{ + $allModels?: Record unknown + }> + ${modelNames.map(resultParam).join('\n ')} + }` + + return { + genericParams, + params, + } +} + +function clientExtensionsModelDefinition(this: PrismaClientClass) { + const modelNames = Object.keys(this.dmmf.getModelMap()) + + const modelParam = (modelName: string) => { + return `${lowerCase( + modelName, + )}?: { [K: symbol]: { ctx: runtime.Types.Extensions.GetModel, ExtArgs['model']['${lowerCase( + modelName, + )}']> } }` + } + + const params = `{ + $allModels?: {} + ${modelNames.map(modelParam).join('\n ')} + }` + + return { + genericParams: `M extends runtime.Types.Extensions.UserArgs['model'] = {}`, + params, + } +} function clientTypeMapModelsDefinition(this: PrismaClientClass) { const modelNames = Object.keys(this.dmmf.getModelMap()) @@ -19,11 +78,6 @@ function clientTypeMapModelsDefinition(this: PrismaClientClass) { return `{ meta: { modelProps: ${modelNames.map((mn) => `'${lowerCase(mn)}'`).join(' | ')} - txIsolationLevel: ${ - this.dmmf.hasEnumInNamespace('TransactionIsolationLevel', 'prisma') - ? 'Prisma.TransactionIsolationLevel' - : 'never' - } }, model: {${modelNames.reduce((acc, modelName) => { const actions = getModelActions(this.dmmf, modelName) @@ -33,7 +87,7 @@ function clientTypeMapModelsDefinition(this: PrismaClientClass) { return `${acc} ${action}: { args: Prisma.${getModelArgName(modelName, action)}, - result: $Utils.OptionalFlat<${modelName}> + result: runtime.Types.Utils.OptionalFlat<${modelName}> payload: ${modelName}Payload }` }, '')} @@ -76,24 +130,139 @@ function clientTypeMapOthersDefinition(this: PrismaClientClass) { function clientTypeMapDefinition(this: PrismaClientClass) { const typeMap = `${clientTypeMapModelsDefinition.bind(this)()} & ${clientTypeMapOthersDefinition.bind(this)()}` - return ` -interface TypeMapCb extends $Utils.Fn<{extArgs: $Extensions.Args}, $Utils.Record> { - returns: Prisma.TypeMap + return `export type TypeMap = ${typeMap}` } -export type TypeMap = ${typeMap}` +function clientExtensionsQueryDefinition(this: PrismaClientClass) { + const modelNames = Object.keys(this.dmmf.getModelMap()) + const prismaNamespaceDefinitions = clientTypeMapDefinition.bind(this)() + + const queryCbDefinitionModel = (modelName: string, operationName: string) => { + const queryArgs = `runtime.Types.Extensions.ReadonlySelector['model'][${modelName}][${operationName}]['args']>` + const queryResult = `Prisma.TypeMap['model'][${modelName}][${operationName}]['result']` + const inputQueryBase = `model: ${modelName}, operation: ${operationName}, args: ${queryArgs}` + const inputQueryCbBase = `query: (args: ${queryArgs}) => Prisma.PrismaPromise<${queryResult}>` + const inputQuery = `{ ${inputQueryBase}, ${inputQueryCbBase} }` + + return `(args: ${inputQuery}) => Promise<${queryResult}>` + } + + const queryCbDefinitionOther = (operationName: string) => { + const queryArgs = `Prisma.TypeMap['other'][${operationName}]['args']` + const queryResult = `Prisma.TypeMap['other'][${operationName}]['result']` + const inputQueryBase = `operation: ${operationName}, args: ${queryArgs}` + const inputQueryCbBase = `query: (args: ${queryArgs}) => Prisma.PrismaPromise<${queryResult}>` + const inputQuery = `{ ${inputQueryBase}, ${inputQueryCbBase} }` + + return `(args: ${inputQuery}) => Promise<${queryResult}>` + } + + const allOperationsParam = (modelNames: string[], indent: string) => { + const modelName = modelNames.map((mn) => `'${mn}'`).join(' | ') + + return `{ + ${indent}$allOperations?: ${queryCbDefinitionModel(modelName, `keyof Prisma.TypeMap['model'][${modelName}]`)} + ${indent}}` + } + + const modelParam = (propName: string, modelNames: string[]) => { + const key = modelNames.map((mn) => `'${mn}'`).join(' | ') + + return `${propName}?: { + [K in keyof Prisma.TypeMap['model'][${key}]]?: ${queryCbDefinitionModel(key, `K`)} + } & ${allOperationsParam(modelNames, ' ')}` + } + + const allModelsParam = `{ + ${modelParam('$allModels', modelNames)} + }` + + const concreteModelParams = `{${modelNames.reduce((acc, modelName) => { + return `${acc} + ${modelParam(lowerCase(modelName), [modelName])}` + }, '')} + }` + + const concreteOtherParams = `{ + [K in keyof Prisma.TypeMap['other']]?: ${queryCbDefinitionOther(`K`)} + }` + + return { + genericParams: `Q extends runtime.Types.Extensions.UserArgs['query'] = {}`, + params: `${allModelsParam} & ${concreteModelParams} & ${concreteOtherParams}`, + prismaNamespaceDefinitions, + } +} + +function clientExtensionsClientDefinition(this: PrismaClientClass) { + return { + genericParams: `C extends runtime.Types.Extensions.UserArgs['client'] = {}`, + params: `{ [K: symbol]: { ctx: runtime.Types.Extensions.GetClient, ExtArgs['client']> } }`, + } +} + +function clientExtensionsHookDefinition(this: PrismaClientClass, name: '$extends' | 'defineExtension') { + const result = clientExtensionsResultDefinition.call(this) + const model = clientExtensionsModelDefinition.call(this) + const client = clientExtensionsClientDefinition.call(this) + const query = clientExtensionsQueryDefinition.call(this) + const genericParams = [result.genericParams, model.genericParams, query.genericParams, client.genericParams] + const genericVars = genericParams.map((gp) => gp.replace(/ extends .*/g, ',')) + + return { + signature: `${name === 'defineExtension' ? name : `${name}: { extArgs: ExtArgs } & (`}< + ${genericParams.join(',\n ')}, + Args extends runtime.Types.Extensions.Args = runtime.Types.Extensions.InternalArgs, ${ + name === 'defineExtension' + ? ` + ExtArgs extends runtime.Types.Extensions.Args = runtime.Types.Extensions.DefaultArgs,` + : '' + } + >(extension: ((client: ${ + name === 'defineExtension' ? 'Prisma.DefaultPrismaClient' : 'this' + }) => { $extends: { extArgs: Args } }) | Prisma.ExtensionArgs< + ExtArgs, + ${genericVars.join('\n ').slice(0, -1)} + >) ${name === 'defineExtension' ? ':' : '=>'} ${ + name === 'defineExtension' + ? '(client: any) => PrismaClient' + : `runtime.Types.Extensions.GetClient & Args['result'] + model: ExtArgs['model'] & Record & Args['model'] + client: ExtArgs['client'] & Args['client'], + query: {} + }>, ExtArgs['client'] & Args['client']>` + }${name === 'defineExtension' ? '' : ')'};`, + prismaNamespaceDefinitions: `${query.prismaNamespaceDefinitions} +export type ExtensionArgs< + ExtArgs extends runtime.Types.Extensions.Args, + ${genericParams.join(',\n ')} +> = { + name?: string, + result?: R & ${result.params} + model?: M & ${model.params} + query?: ${query.params} + client?: C & ${client.params} +}`, + } } function clientExtensionsDefinitions(this: PrismaClientClass) { - const typeMap = clientTypeMapDefinition.call(this) - const define = ` export const defineExtension: $Extensions.ExtendsHook<'define', Prisma.TypeMapCb, $Extensions.DefaultArgs>` - const extend = ` $extends: $Extensions.ExtendsHook<'extends', Prisma.TypeMapCb, ExtArgs>` + const define = clientExtensionsHookDefinition.bind(this)('defineExtension') + const extend = clientExtensionsHookDefinition.bind(this)('$extends') return { - prismaNamespaceDefinitions: ` -${typeMap} -${define}`, - prismaClientDefinitions: `${extend}`, + prismaNamespaceDefinitions: ifExtensions( + ` +export function ${define.signature} +${extend.prismaNamespaceDefinitions}`, + '', + ), + prismaClientDefinitions: ifExtensions( + ` ${extend.signature} +`, + '', + ), } } @@ -117,7 +286,7 @@ function batchingTransactionDefinition(this: PrismaClientClass) { ) .addGenericParameter(ts.genericParameter('P').extends(ts.array(ts.prismaPromise(ts.anyType)))) .addParameter(ts.parameter('arg', ts.arraySpread(ts.namedType('P')))) - .setReturnType(ts.promise(ts.namedType('runtime.Types.Utils.UnwrapTuple').addGenericArgument(ts.namedType('P')))) + .setReturnType(ts.promise(ts.namedType('UnwrapTuple').addGenericArgument(ts.namedType('P')))) if (this.dmmf.hasEnumInNamespace('TransactionIsolationLevel', 'prisma')) { const options = ts @@ -143,11 +312,23 @@ function interactiveTransactionDefinition(this: PrismaClientClass) { } const returnType = ts.promise(ts.namedType('R')) - const callbackType = ts .functionType() .addParameter( - ts.parameter('prisma', ts.omit(ts.namedType('PrismaClient'), ts.namedType('runtime.ITXClientDenyList'))), + ts.parameter( + 'prisma', + ts + .namedType('Omit') + .addGenericArgument(ts.namedType('this')) + .addGenericArgument( + ts + .unionType(ts.stringLiteral('$connect')) + .addVariant(ts.stringLiteral('$disconnect')) + .addVariant(ts.stringLiteral('$on')) + .addVariant(ts.stringLiteral('$transaction')) + .addVariant(ts.stringLiteral('$use')), + ), + ), ) .setReturnType(returnType) @@ -316,11 +497,18 @@ export class PrismaClient< U = 'log' extends keyof T ? T['log'] extends Array ? Prisma.GetEvents : never : never, GlobalReject extends Prisma.RejectOnNotFound | Prisma.RejectPerOperation | false | undefined = 'rejectOnNotFound' extends keyof T ? T['rejectOnNotFound'] - : false, - ExtArgs extends $Extensions.Args = $Extensions.DefaultArgs -> { - [K: symbol]: { types: Prisma.TypeMap['other'] } + : false${ifExtensions( + `, + ExtArgs extends runtime.Types.Extensions.Args = runtime.Types.Extensions.DefaultArgs`, + '', + )} + > {${ifExtensions( + ` + [K: symbol]: { types: Prisma.TypeMap['other'] } +`, + '', + )} ${indent(this.jsDoc, TAB_SIZE)} constructor(optionsArg ?: Prisma.Subset); @@ -338,8 +526,6 @@ export class PrismaClient< /** * Add a middleware - * @deprecated since 4.16.0. For new code, prefer client extensions instead. - * @see https://pris.ly/d/extensions */ $use(cb: Prisma.Middleware): void @@ -369,7 +555,12 @@ ${[ * const ${lowerCase(m.plural)} = await prisma.${methodName}.findMany() * \`\`\` */ -get ${methodName}(): Prisma.${m.model}Delegate;` +get ${methodName}(): ${ifExtensions( + `runtime.Types.Extensions.GetModel, ExtArgs['model']['${lowerCase(m.model)}']>`, + `Prisma.${m.model}Delegate`, + )};` }) .join('\n\n'), 2, @@ -519,7 +710,7 @@ export function getLogLevel(log: Array): LogLevel | un /** * \`PrismaClient\` proxy available in interactive transactions. */ -export type TransactionClient = Omit +export type TransactionClient = Omit ` } } diff --git a/packages/client/src/generation/TSClient/SelectInclude.ts b/packages/client/src/generation/TSClient/SelectInclude.ts index d08cfb01fe79..9bb85e3726cf 100644 --- a/packages/client/src/generation/TSClient/SelectInclude.ts +++ b/packages/client/src/generation/TSClient/SelectInclude.ts @@ -4,6 +4,7 @@ import { DMMFHelper } from '../../runtime/dmmf' import { lowerCase } from '../../runtime/utils/common' import * as ts from '../ts-builders' import { getFieldArgName, getIncludeName, getSelectName } from '../utils' +import { ifExtensions } from './utils/ifExtensions' type BuildIncludeTypeParams = { modelName: string @@ -13,8 +14,8 @@ type BuildIncludeTypeParams = { const extArgsParameter = ts .genericParameter('ExtArgs') - .extends(ts.namedType('$Extensions.Args')) - .default(ts.namedType('$Extensions.DefaultArgs')) + .extends(ts.namedType('runtime.Types.Extensions.Args')) + .default(ts.namedType('runtime.Types.Extensions.DefaultArgs')) export function buildIncludeType({ modelName, dmmf, fields }: BuildIncludeTypeParams) { const type = buildSelectOrIncludeObject(modelName, getIncludeFields(fields, dmmf)) @@ -28,11 +29,14 @@ type BuildSelectTypeParams = { export function buildSelectType({ modelName, fields }: BuildSelectTypeParams) { const objectType = buildSelectOrIncludeObject(modelName, fields) - const selectType = ts - .namedType('$Extensions.GetSelect') - .addGenericArgument(objectType) - .addGenericArgument(extArgsParameter.toArgument().subKey('result').subKey(lowerCase(modelName))) - + const selectType = ifExtensions( + () => + ts + .namedType('runtime.Types.Extensions.GetSelect') + .addGenericArgument(objectType) + .addGenericArgument(extArgsParameter.toArgument().subKey('result').subKey(lowerCase(modelName))), + () => objectType, + ) return buildExport(getSelectName(modelName), selectType) } @@ -53,8 +57,12 @@ function buildSelectOrIncludeObject(modelName: string, fields: DMMF.SchemaField[ if (field.outputType.location === 'outputObjectTypes') { const subSelectType = ts.namedType(getFieldArgName(field, modelName)) - subSelectType.addGenericArgument(extArgsParameter.toArgument()) - + ifExtensions( + () => { + subSelectType.addGenericArgument(extArgsParameter.toArgument()) + }, + () => {}, + ) fieldType.addVariant(subSelectType) } objectType.add(ts.property(field.name, fieldType).optional()) @@ -64,7 +72,12 @@ function buildSelectOrIncludeObject(modelName: string, fields: DMMF.SchemaField[ function buildExport(typeName: string, type: ts.TypeBuilder) { const declaration = ts.typeDeclaration(typeName, type) - return ts.moduleExport(declaration.addGenericParameter(extArgsParameter)) + return ts.moduleExport( + ifExtensions( + () => declaration.addGenericParameter(extArgsParameter), + () => declaration, + ), + ) } function getIncludeFields(fields: DMMF.SchemaField[], dmmf: DMMFHelper) { diff --git a/packages/client/src/generation/TSClient/common.ts b/packages/client/src/generation/TSClient/common.ts index b5e621bca038..7b26ed0cec80 100644 --- a/packages/client/src/generation/TSClient/common.ts +++ b/packages/client/src/generation/TSClient/common.ts @@ -2,6 +2,7 @@ import indent from 'indent-string' import { TAB_SIZE } from './constants' import type { TSClientOptions } from './TSClient' +import { ifExtensions } from './utils/ifExtensions' export const commonCodeJS = ({ runtimeDir, @@ -33,16 +34,14 @@ import { objectEnumValues, makeStrictEnum, Extensions, - defineDmmfProperty, - Public, + defineDmmfProperty } from '${runtimeDir}/edge-esm.js'` : browser ? ` const { Decimal, objectEnumValues, - makeStrictEnum, - Public, + makeStrictEnum } = require('${runtimeDir}/${runtimeName}') ` : ` @@ -66,7 +65,6 @@ const { Extensions, warnOnce, defineDmmfProperty, - Public, } = require('${runtimeDir}/${runtimeName}') ` } @@ -99,14 +97,18 @@ Prisma.sql = ${notSupportOnBrowser('sqltag', browser)} Prisma.empty = ${notSupportOnBrowser('empty', browser)} Prisma.join = ${notSupportOnBrowser('join', browser)} Prisma.raw = ${notSupportOnBrowser('raw', browser)} -Prisma.validator = Public.validator +Prisma.validator = () => (val) => val -/** +${ifExtensions( + `/** * Extensions */ Prisma.getExtensionContext = ${notSupportOnBrowser('Extensions.getExtensionContext', browser)} Prisma.defineExtension = ${notSupportOnBrowser('Extensions.defineExtension', browser)} +`, + '', +)} /** * Shorthand utilities for JSON filtering */ @@ -132,21 +134,16 @@ In case this error is unexpected for you, please report it in https://github.com export const commonCodeTS = ({ runtimeDir, runtimeName, clientVersion, engineVersion }: TSClientOptions) => ({ tsWithoutNamespace: () => `import * as runtime from '${runtimeDir}/${runtimeName}'; -import $Types = runtime.Types // general types -import $Public = runtime.Types.Public -import $Utils = runtime.Types.Utils -import $Extensions = runtime.Types.Extensions +type UnwrapPromise

= P extends Promise ? R : P +type UnwrapTuple = { + [K in keyof Tuple]: K extends \`\$\{number\}\` ? Tuple[K] extends Prisma.PrismaPromise ? X : UnwrapPromise : UnwrapPromise +}; -export type PrismaPromise = $Public.PrismaPromise +export type PrismaPromise = runtime.Types.Public.PrismaPromise `, ts: () => `export import DMMF = runtime.DMMF -export type PrismaPromise = $Public.PrismaPromise - -/** - * Validator - */ -export import validator = runtime.Public.validator +export type PrismaPromise = runtime.Types.Public.PrismaPromise /** * Prisma Errors @@ -182,16 +179,20 @@ export type Metric = runtime.Metric export type MetricHistogram = runtime.MetricHistogram export type MetricHistogramBucket = runtime.MetricHistogramBucket -/** +${ifExtensions( + `/** * Extensions */ -export type Extension = $Extensions.UserArgs +export type Extension = runtime.Types.Extensions.UserArgs export import getExtensionContext = runtime.Extensions.getExtensionContext -export type Args = $Public.Args -export type Payload = $Public.Payload -export type Result = $Public.Result -export type Exact = $Public.Exact +export type Args = runtime.Types.Public.Args +export type Payload = runtime.Types.Public.Payload +export type Result = runtime.Types.Public.Result +export type Exact = runtime.Types.Public.Exact +`, + '', +)} /** * Prisma Client JS version: ${clientVersion} * Query Engine version: ${engineVersion} @@ -532,7 +533,7 @@ type Cast = A extends B ? A : B; export const type: unique symbol; - +export function validator(): (select: runtime.Types.Utils.LegacyExact) => S; /** * Used by group by diff --git a/packages/client/src/generation/TSClient/helpers.ts b/packages/client/src/generation/TSClient/helpers.ts index d8719afccde6..5a0b71459077 100644 --- a/packages/client/src/generation/TSClient/helpers.ts +++ b/packages/client/src/generation/TSClient/helpers.ts @@ -5,6 +5,7 @@ import { capitalize, lowerCase } from '../../runtime/utils/common' import { getAggregateArgsName, getModelArgName } from '../utils' import type { JSDocMethodBodyCtx } from './jsdoc' import { JSDocs } from './jsdoc' +import { ifExtensions } from './utils/ifExtensions' export function getMethodJSDocBody(action: DMMF.ModelAction, mapping: DMMF.ModelMapping, model: DMMF.Model): string { const ctx: JSDocMethodBodyCtx = { @@ -35,17 +36,17 @@ export function getGenericMethod(name: string, actionName: DMMF.ModelAction) { return '' } if (actionName === 'findFirst' || actionName === 'findUnique') { - return `, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>` + return `', + '', + )}, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>` } const modelArgName = getModelArgName(name, actionName) if (!modelArgName) { console.log({ name, actionName }) } - return `>` + return `', '')}>` } export function getArgs(modelName: string, actionName: DMMF.ModelAction) { if (actionName === 'count') { @@ -66,7 +67,7 @@ export function getArgs(modelName: string, actionName: DMMF.ModelAction) { actionName === DMMF.ModelAction.findFirstOrThrow ? '?' : '' - }: SelectSubset>` + }: SelectSubset', '')}>` } export function wrapComment(str: string): string { return `/**\n${str diff --git a/packages/client/src/generation/TSClient/utils/ifExtensions.ts b/packages/client/src/generation/TSClient/utils/ifExtensions.ts new file mode 100644 index 000000000000..ec2bc82b7379 --- /dev/null +++ b/packages/client/src/generation/TSClient/utils/ifExtensions.ts @@ -0,0 +1,9 @@ +import { TSClient } from '../TSClient' + +export function ifExtensions(_case: R | (() => R), _default: R | (() => R)): R { + if (TSClient.enabledPreviewFeatures.includes('clientExtensions')) { + return typeof _case === 'function' ? (_case as any)() : _case + } + + return typeof _default === 'function' ? (_default as any)() : _default +} diff --git a/packages/client/src/generation/ts-builders/Export.ts b/packages/client/src/generation/ts-builders/Export.ts index 8b1e6ecdc15b..ef2794a6e046 100644 --- a/packages/client/src/generation/ts-builders/Export.ts +++ b/packages/client/src/generation/ts-builders/Export.ts @@ -1,21 +1,10 @@ import { AnyDeclarationBuilder } from './AnyDeclarationBuilder' import { BasicBuilder } from './BasicBuilder' -import { DocComment } from './DocComment' import { Writer } from './Writer' export class Export implements BasicBuilder { - private docComment?: DocComment constructor(private declaration: AnyDeclarationBuilder) {} - - setDocComment(docComment: DocComment): this { - this.docComment = docComment - return this - } - write(writer: Writer): void { - if (this.docComment) { - writer.write(this.docComment) - } writer.write('export ').write(this.declaration) } } diff --git a/packages/client/src/generation/ts-builders/NamedType.ts b/packages/client/src/generation/ts-builders/NamedType.ts index a4ceda180af6..208ddd971059 100644 --- a/packages/client/src/generation/ts-builders/NamedType.ts +++ b/packages/client/src/generation/ts-builders/NamedType.ts @@ -24,3 +24,11 @@ export class NamedType extends TypeBuilder { export function namedType(name: string): NamedType { return new NamedType(name) } + +export function promise(resultType: TypeBuilder): NamedType { + return new NamedType('Promise').addGenericArgument(resultType) +} + +export function prismaPromise(resultType: TypeBuilder): NamedType { + return new NamedType('Prisma.PrismaPromise').addGenericArgument(resultType) +} diff --git a/packages/client/src/generation/ts-builders/ObjectType.ts b/packages/client/src/generation/ts-builders/ObjectType.ts index 158b9ee73768..d3891f8460a9 100644 --- a/packages/client/src/generation/ts-builders/ObjectType.ts +++ b/packages/client/src/generation/ts-builders/ObjectType.ts @@ -16,13 +16,6 @@ export class ObjectType extends TypeBuilder { return this } - addMultiple(items: ObjectTypeItem[]): this { - for (const item of items) { - this.add(item) - } - return this - } - formatInline() { this.inline = true return this diff --git a/packages/client/src/generation/ts-builders/PrimitiveType.ts b/packages/client/src/generation/ts-builders/PrimitiveType.ts index e9839be37744..b34cf712d2a2 100644 --- a/packages/client/src/generation/ts-builders/PrimitiveType.ts +++ b/packages/client/src/generation/ts-builders/PrimitiveType.ts @@ -20,4 +20,3 @@ export const bigintType = new PrimitiveType('bigint') export const unknownType = new PrimitiveType('unknown') export const anyType = new PrimitiveType('any') export const voidType = new PrimitiveType('void') -export const thisType = new PrimitiveType('this') diff --git a/packages/client/src/generation/ts-builders/helpers.ts b/packages/client/src/generation/ts-builders/helpers.ts deleted file mode 100644 index 8ee8da36bf65..000000000000 --- a/packages/client/src/generation/ts-builders/helpers.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { NamedType, namedType } from './NamedType' -import { TypeBuilder } from './TypeBuilder' - -export function omit(type: TypeBuilder, keyType: TypeBuilder): NamedType { - return namedType('Omit').addGenericArgument(type).addGenericArgument(keyType) -} - -export function promise(resultType: TypeBuilder): NamedType { - return new NamedType('Promise').addGenericArgument(resultType) -} - -export function prismaPromise(resultType: TypeBuilder): NamedType { - return new NamedType('Prisma.PrismaPromise').addGenericArgument(resultType) -} diff --git a/packages/client/src/generation/ts-builders/index.ts b/packages/client/src/generation/ts-builders/index.ts index 61d5871826f5..dd77d6c28b98 100644 --- a/packages/client/src/generation/ts-builders/index.ts +++ b/packages/client/src/generation/ts-builders/index.ts @@ -5,7 +5,6 @@ export * from './DocComment' export * from './Export' export * from './FunctionType' export * from './GenericParameter' -export * from './helpers' export * from './Method' export * from './NamedType' export * from './ObjectType' diff --git a/packages/client/src/generation/utils.ts b/packages/client/src/generation/utils.ts index e1dacf87eb78..b29fedaa69ee 100644 --- a/packages/client/src/generation/utils.ts +++ b/packages/client/src/generation/utils.ts @@ -4,12 +4,25 @@ import path from 'path' import type { DMMFHelper } from '../runtime/dmmf' import { DMMF } from '../runtime/dmmf-types' +import { ifExtensions } from './TSClient/utils/ifExtensions' export enum Projection { select = 'select', include = 'include', } +export function getScalarsName(modelName: string): string { + return `${modelName}Scalars` +} + +export function getPayloadName(modelName: string): string { + return ifExtensions(`runtime.Types.GetResult`, `${modelName}GetPayload`) +} + +// export function getExtractName(modelName: string, projection: Projection) { +// return `Extract${modelName}${capitalize(projection)}` +// } + export function getSelectName(modelName: string): string { return `${modelName}Select` } @@ -127,7 +140,7 @@ export function getModelArgName(modelName: string, action?: DMMF.ModelAction): s case DMMF.ModelAction.deleteMany: return `${modelName}DeleteManyArgs` case DMMF.ModelAction.groupBy: - return getGroupByArgsName(modelName) + return `${modelName}GroupByArgs` case DMMF.ModelAction.aggregate: return getAggregateArgsName(modelName) case DMMF.ModelAction.count: @@ -244,39 +257,42 @@ export function getReturnType({ * Important: We handle findMany or isList special, as we don't want chaining from there */ if (isList || hideCondition) { + const listOpen = isList ? 'Array<' : '' + const listClose = isList ? '>' : '' const promiseOpen = renderPromise ? 'Prisma.PrismaPromise<' : '' const promiseClose = renderPromise ? '>' : '' - return `${promiseOpen}$Types.GetResult<${name}Payload, T, '${actionName}', never>${ - isChaining ? '| Null' : '' - }${promiseClose}` + return `${promiseOpen}${ifExtensions('', listOpen)}${getPayloadName(name)}<${ifExtensions( + `${name}Payload, T, '${actionName}'`, + 'T', + )}>${ifExtensions('', listClose)}${isChaining ? '| Null' : ''}${promiseClose}` } if (actionName === 'findFirstOrThrow' || actionName === 'findUniqueOrThrow') { return `Prisma__${name}Client<${getType( - `$Types.GetResult<${name}Payload, T, '${actionName}', never>`, + getPayloadName(name) + `<${ifExtensions(`${name}Payload, T, '${actionName}'`, 'T')}>`, isList, - )}, never, ExtArgs>` + )}${ifExtensions(', never, ExtArgs', '')}>` } if (actionName === 'findFirst' || actionName === 'findUnique') { if (isField) { return `Prisma__${name}Client<${getType( - `$Types.GetResult<${name}Payload, T, '${actionName}', never>`, + getPayloadName(name) + `<${ifExtensions(`${name}Payload, T, '${actionName}'`, 'T')}>`, isList, - )} | Null, never, ExtArgs>` + )} | Null${ifExtensions(', never, ExtArgs', '')}>` } return `HasReject extends True ? Prisma__${name}Client<${getType( - `$Types.GetResult<${name}Payload, T, '${actionName}', never>`, + getPayloadName(name) + `<${ifExtensions(`${name}Payload, T, '${actionName}'`, 'T')}>`, isList, - )}, never, ExtArgs> : Prisma__${name}Client<${getType( - `$Types.GetResult<${name}Payload, T, '${actionName}', never>`, + )}${ifExtensions(', never, ExtArgs', '')}> : Prisma__${name}Client<${getType( + getPayloadName(name) + `<${ifExtensions(`${name}Payload, T, '${actionName}'`, 'T')}>`, isList, - )} | null, null, ExtArgs>` + )} | null, null${ifExtensions(', ExtArgs', '')}>` } return `Prisma__${name}Client<${getType( - `$Types.GetResult<${name}Payload, T, '${actionName}', never>`, + getPayloadName(name) + `<${ifExtensions(`${name}Payload, T, '${actionName}'`, 'T')}>`, isList, - )}, never, ExtArgs>` + )}${ifExtensions(', never, ExtArgs', '')}>` } export function isQueryAction(action: DMMF.ModelAction, operation: 'query' | 'mutation'): boolean { diff --git a/packages/client/src/generation/utils/buildDirname.ts b/packages/client/src/generation/utils/buildDirname.ts index d805de3a35d6..611ca3521532 100644 --- a/packages/client/src/generation/utils/buildDirname.ts +++ b/packages/client/src/generation/utils/buildDirname.ts @@ -34,7 +34,10 @@ const fs = require('fs') config.dirname = __dirname if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) { - config.dirname = path.join(process.cwd(), ${JSON.stringify(pathToPosix(relativeOutdir))}) + warnOnce('bundled-warning-1', 'Your generated Prisma Client could not immediately find its \`schema.prisma\`, falling back to finding it via the current working directory.') + warnOnce('bundled-warning-2', 'We are interested in learning about your project setup. We\\'d appreciate if you could take the time to share some information with us.') + warnOnce('bundled-warning-3', 'Please help us by answering a few questions: https://pris.ly/bundler-investigation') +config.dirname = path.join(process.cwd(), ${JSON.stringify(pathToPosix(relativeOutdir))}) config.isBundled = true }` } diff --git a/packages/client/src/runtime/DataLoader.ts b/packages/client/src/runtime/DataLoader.ts index 57fe98638faa..33b728ddf70c 100644 --- a/packages/client/src/runtime/DataLoader.ts +++ b/packages/client/src/runtime/DataLoader.ts @@ -8,9 +8,6 @@ export type DataLoaderOptions = { singleLoader: (request: T) => Promise batchLoader: (request: T[]) => Promise batchBy: (request: T) => string | undefined - // Specifies the order in which requests in a batch would - // be sorted. See Array.prototype.sort callback - batchOrder: (requestA: T, requestB: T) => number } export class DataLoader { @@ -68,7 +65,6 @@ export class DataLoader { batch[0].reject(e) }) } else { - batch.sort((a, b) => this.options.batchOrder(a.request, b.request)) this.options .batchLoader(batch.map((j) => j.request)) .then((results) => { diff --git a/packages/client/src/runtime/RequestHandler.ts b/packages/client/src/runtime/RequestHandler.ts index e17231e8f1cb..5cb3bc5a6f37 100644 --- a/packages/client/src/runtime/RequestHandler.ts +++ b/packages/client/src/runtime/RequestHandler.ts @@ -16,17 +16,15 @@ import { PrismaClientRustPanicError, PrismaClientUnknownRequestError, } from '.' -import { QueryEngineResult } from './core/engines/common/types/QueryEngine' import { throwValidationException } from './core/errorRendering/throwValidationException' import { hasBatchIndex } from './core/errors/ErrorWithBatchIndex' -import { createApplyBatchExtensionsFunction } from './core/extensions/applyQueryExtensions' import { applyResultExtensions } from './core/extensions/applyResultExtensions' import { MergedExtensionsList } from './core/extensions/MergedExtensionsList' import { visitQueryResult } from './core/extensions/visitQueryResult' import { dmmfToJSModelName } from './core/model/utils/dmmfToJSModelName' import { ProtocolEncoder, ProtocolMessage } from './core/protocol/common' import { PrismaPromiseInteractiveTransaction, PrismaPromiseTransaction } from './core/request/PrismaPromise' -import { Action, JsArgs } from './core/types/JsApi' +import { JsArgs } from './core/types/JsApi' import { DataLoader } from './DataLoader' import type { Client, Unpacker } from './getPrismaClient' import { CallSite } from './utils/CallSite' @@ -37,7 +35,6 @@ const debug = Debug('prisma:client:request_handler') export type RequestParams = { modelName?: string - action: Action protocolMessage: ProtocolMessage protocolEncoder: ProtocolEncoder dataPath: string[] @@ -62,6 +59,15 @@ export type HandleErrorParams = { transaction?: PrismaPromiseTransaction } +export type Request = { + protocolMessage: ProtocolMessage + protocolEncoder: ProtocolEncoder + transaction?: PrismaPromiseTransaction + otelParentCtx?: Context + otelChildCtx?: Context + customDataProxyFetch?: (fetch: Fetch) => Fetch +} + type ApplyExtensionsParams = { result: object modelName: string @@ -71,15 +77,14 @@ type ApplyExtensionsParams = { export class RequestHandler { client: Client - dataloader: DataLoader + dataloader: DataLoader private logEmitter?: EventEmitter constructor(client: Client, logEmitter?: EventEmitter) { this.logEmitter = logEmitter this.client = client - this.dataloader = new DataLoader({ - batchLoader: createApplyBatchExtensionsFunction(async ({ requests, customDataProxyFetch }) => { + batchLoader: (requests) => { const { transaction, protocolEncoder, otelParentCtx } = requests[0] const queries = protocolEncoder.createBatch(requests.map((r) => r.protocolMessage)) const traceparent = this.client._tracingHelper.getTraceParent(otelParentCtx) @@ -89,39 +94,24 @@ export class RequestHandler { const containsWrite = requests.some((r) => r.protocolMessage.isWrite()) - const results = await this.client._engine.requestBatch(queries, { + return this.client._engine.requestBatch(queries, { traceparent, transaction: getTransactionOptions(transaction), containsWrite, - customDataProxyFetch, - }) - - return results.map((result, i) => { - if (result instanceof Error) { - return result - } - - try { - return this.mapQueryEngineResult(requests[i], result) - } catch (error) { - return error - } + customDataProxyFetch: requests[0].customDataProxyFetch, }) - }), - - singleLoader: async (request) => { + }, + singleLoader: (request) => { const interactiveTransaction = request.transaction?.kind === 'itx' ? getItxTransactionOptions(request.transaction) : undefined - const response = await this.client._engine.request(request.protocolMessage.toEngineQuery(), { + return this.client._engine.request(request.protocolMessage.toEngineQuery(), { traceparent: this.client._tracingHelper.getTraceParent(), interactiveTransaction, isWrite: request.protocolMessage.isWrite(), customDataProxyFetch: request.customDataProxyFetch, }) - return this.mapQueryEngineResult(request, response) }, - batchBy: (request) => { if (request.transaction?.id) { return `transaction-${request.transaction.id}` @@ -129,47 +119,54 @@ export class RequestHandler { return request.protocolMessage.getBatchId() }, - - batchOrder(requestA, requestB) { - if (requestA.transaction?.kind === 'batch' && requestB.transaction?.kind === 'batch') { - return requestA.transaction.index - requestB.transaction.index - } - return 0 - }, }) } - async request(params: RequestParams) { + async request({ + protocolMessage, + protocolEncoder, + dataPath = [], + callsite, + modelName, + rejectOnNotFound, + clientMethod, + args, + transaction, + unpacker, + extensions, + otelParentCtx, + otelChildCtx, + customDataProxyFetch, + }: RequestParams) { try { - const result = await this.dataloader.request(params) - throwIfNotFound(result, params.clientMethod, params.modelName, params.rejectOnNotFound) + const response = await this.dataloader.request({ + protocolMessage, + protocolEncoder, + transaction, + otelParentCtx, + otelChildCtx, + customDataProxyFetch, + }) + const data = response?.data + const elapsed = response?.elapsed + + /** + * Unpack + */ + let result = this.unpack(protocolMessage, data, dataPath, unpacker) + throwIfNotFound(result, clientMethod, modelName, rejectOnNotFound) + if (modelName) { + result = this.applyResultExtensions({ result, modelName, args, extensions }) + } + if (process.env.PRISMA_CLIENT_GET_TIME) { + return { data: result, elapsed } + } return result } catch (error) { - const { clientMethod, callsite, transaction, args } = params this.handleAndLogRequestError({ error, clientMethod, callsite, transaction, args }) } } - mapQueryEngineResult( - { protocolMessage, dataPath, unpacker, modelName, args, extensions }: RequestParams, - response: QueryEngineResult, - ) { - const data = response?.data - const elapsed = response?.elapsed - - /** - * Unpack - */ - let result = this.unpack(protocolMessage, data, dataPath, unpacker) - if (modelName) { - result = this.applyResultExtensions({ result, modelName, args, extensions }) - } - if (process.env.PRISMA_CLIENT_GET_TIME) { - return { data: result, elapsed } - } - return result - } - /** * Handles the error and logs it, logging the error is done synchronously waiting for the event * handlers to finish. diff --git a/packages/client/src/runtime/core/compositeProxy/createCompositeProxy.ts b/packages/client/src/runtime/core/compositeProxy/createCompositeProxy.ts index cbb47fdb0783..bb1cc88555f0 100644 --- a/packages/client/src/runtime/core/compositeProxy/createCompositeProxy.ts +++ b/packages/client/src/runtime/core/compositeProxy/createCompositeProxy.ts @@ -6,7 +6,7 @@ export interface CompositeProxyLayer + getKeys(): KeyType[] /** * Returns a value for a property for a given key (one of the keys, returned @@ -90,12 +90,6 @@ export function createCompositeProxy(target: T, layers: Compos }, getOwnPropertyDescriptor(target, prop) { - const original = Reflect.getOwnPropertyDescriptor(target, prop) - if (original && !original.configurable) { - // non-configurable properties can not change descriptors - return original - } - const layer = keysToLayerMap.get(prop) if (layer) { if (layer.getPropertyDescriptor) { @@ -107,7 +101,7 @@ export function createCompositeProxy(target: T, layers: Compos return defaultPropertyDescriptor } - return original + return Reflect.getOwnPropertyDescriptor(target, prop) }, defineProperty(target, property, attributes) { diff --git a/packages/client/src/runtime/core/compositeProxy/removeProperties.ts b/packages/client/src/runtime/core/compositeProxy/removeProperties.ts index 188841784f3b..2a847ce8f091 100644 --- a/packages/client/src/runtime/core/compositeProxy/removeProperties.ts +++ b/packages/client/src/runtime/core/compositeProxy/removeProperties.ts @@ -1,6 +1,6 @@ import { CompositeProxyLayer } from './createCompositeProxy' -export function removeProperties(keys: ReadonlyArray): CompositeProxyLayer { +export function removeProperties(keys: (string | symbol)[]): CompositeProxyLayer { return { getKeys() { return keys diff --git a/packages/client/src/runtime/core/engines/binary/BinaryEngine.ts b/packages/client/src/runtime/core/engines/binary/BinaryEngine.ts index 79d551e9bc98..eeb5f22d139d 100644 --- a/packages/client/src/runtime/core/engines/binary/BinaryEngine.ts +++ b/packages/client/src/runtime/core/engines/binary/BinaryEngine.ts @@ -209,7 +209,7 @@ You may have to run ${green('prisma generate')} for your changes to take effect. const runningEngines = engines.filter((e) => e.child) if (runningEngines.length === 10) { console.warn( - `${bold(yellow('warn(prisma-client)'))} This is the 10th instance of Prisma Client being started. Make sure this is intentional.`, + `${bold(yellow('warn(prisma-client)'))} There are already 10 instances of Prisma Client actively running.`, ) } } diff --git a/packages/client/src/runtime/core/engines/common/types/JsonProtocol.ts b/packages/client/src/runtime/core/engines/common/types/JsonProtocol.ts index e1ce243a1c00..bd491db289a3 100644 --- a/packages/client/src/runtime/core/engines/common/types/JsonProtocol.ts +++ b/packages/client/src/runtime/core/engines/common/types/JsonProtocol.ts @@ -57,7 +57,7 @@ export type DateTaggedValue = { $type: 'DateTime'; value: string } export type DecimalTaggedValue = { $type: 'Decimal'; value: string } export type BytesTaggedValue = { $type: 'Bytes'; value: string } export type BigIntTaggedValue = { $type: 'BigInt'; value: string } -export type FieldRefTaggedValue = { $type: 'FieldRef'; value: { _ref: string; _container: string } } +export type FieldRefTaggedValue = { $type: 'FieldRef'; value: { _ref: string } } export type EnumTaggedValue = { $type: 'Enum'; value: string } export type JsonTaggedValue = { $type: 'Json'; value: string } diff --git a/packages/client/src/runtime/core/engines/library/LibraryEngine.ts b/packages/client/src/runtime/core/engines/library/LibraryEngine.ts index eed61897a8ff..dcf627207a43 100644 --- a/packages/client/src/runtime/core/engines/library/LibraryEngine.ts +++ b/packages/client/src/runtime/core/engines/library/LibraryEngine.ts @@ -137,7 +137,7 @@ Please help us by answering a few questions: https://pris.ly/bundler-investigati private checkForTooManyEngines() { if (engineInstanceCount === 10) { - console.warn(`${yellow('warn(prisma-client)')} This is the 10th instance of Prisma Client being started. Make sure this is intentional.`) + console.warn(`${yellow('warn(prisma-client)')} There are already 10 instances of Prisma Client actively running.`) } } diff --git a/packages/client/src/runtime/core/errorRendering/applyUnionError.ts b/packages/client/src/runtime/core/errorRendering/applyUnionError.ts deleted file mode 100644 index 2f254daee3c8..000000000000 --- a/packages/client/src/runtime/core/errorRendering/applyUnionError.ts +++ /dev/null @@ -1,143 +0,0 @@ -import { maxWithComparator } from '@prisma/internals' - -import { EngineValidationError, InvalidArgumentTypeError, UnionError } from '../engines' -import { applyValidationError } from './applyValidationError' -import { ArgumentsRenderingTree } from './ArgumentsRenderingTree' - -type NonUnionError = Exclude - -/** - * When a particular field has multiple allowed types on the schema level - * and none of them match users input, engine returns special kind of error: UnionError. - * This error acts as a container for individual errors for each non-matching type. - * In that case, we need to make a guess which of the errors corresponds users intent the most. - * General algorithm of processing them is the following: - * - flatten all nested errors and get a single list of all possible errors - * - merge individual InvalidArgumentType errors at the same path - * - pick the best error based on combined argument and selection paths length and type of the error. - * - * For details of each step, see other comments in this file. - * @param error - * @param args - */ -export function applyUnionError(error: UnionError, args: ArgumentsRenderingTree) { - const allErrors = flattenUnionError(error) - const merged = mergeInvalidArgumentTypeErrors(allErrors) - const bestError = getBestScoringError(merged) - if (bestError) { - applyValidationError(bestError, args) - } else { - args.addErrorMessage(() => 'Unknown error') - } -} - -function flattenUnionError(error: UnionError): NonUnionError[] { - return error.errors.flatMap((error) => { - if (error.kind === 'Union') { - return flattenUnionError(error) - } - return [error] - }) -} - -/** - * Iterates over provided error list and merges all InvalidArgumentType - * with matching selectionPath and argumentPath into one. For example, - * if the list has an error, saying that `where.arg` does not match `Int` - * and another, saying that `where.arg` does not match IntFilter, resulting - * list will contain a single error for `where.arg` saying it does not - * match `Int | IntFilter` - * @param errorList - * @returns - */ -function mergeInvalidArgumentTypeErrors(errorList: NonUnionError[]) { - const invalidArgsError = new Map() - const result: NonUnionError[] = [] - - for (const error of errorList) { - if (error.kind !== 'InvalidArgumentType') { - result.push(error) - continue - } - - const key = `${error.selectionPath.join('.')}:${error.argumentPath.join('.')}` - const prevError = invalidArgsError.get(key) - if (!prevError) { - invalidArgsError.set(key, error) - } else { - invalidArgsError.set(key, { - ...error, - argument: { - ...error.argument, - typeNames: prevError.argument.typeNames.concat(error.argument.typeNames), - }, - }) - } - } - - result.push(...invalidArgsError.values()) - return result -} - -/** - * Function that attempts to pick the best error from the list - * by ranking them. In most cases, highest ranking error would be the one - * which has the longest combined "selectionPath" + "argumentPath". Justification - * for that is that type that made it deeper into validation tree before failing - * is probably closer to the one user actually wanted to do. - * - * However, if two errors are at the same depth level, we introduce additional ranking based - * on error type. See `getErrorTypeScore` function for details - * @param errors - * @returns - */ -function getBestScoringError(errors: NonUnionError[]) { - return maxWithComparator(errors, (errorA, errorB) => { - const aPathLength = getCombinedPathLength(errorA) - const bPathLength = getCombinedPathLength(errorB) - if (aPathLength !== bPathLength) { - return aPathLength - bPathLength - } - return getErrorTypeScore(errorA) - getErrorTypeScore(errorB) - }) -} - -function getCombinedPathLength(error: EngineValidationError) { - let score = 0 - if (Array.isArray(error['selectionPath'])) { - score += error['selectionPath'].length - } - - if (Array.isArray(error['argumentPath'])) { - score += error['argumentPath'].length - } - return score -} - -/** - * Function is invoked to determine most relevant error based on its type. - * Specific numbers returned from this function do not really matter, it's only - * important how they compare relatively to each other. - * - * Current logic is: - * - InvalidArgumentValue/ValueTooLarge is treated as the best possible error to display - * since when it is present we know that the field causing the error is defined on the schema - * and provided value has correct type, it's just that value violates some other constraint. - * - Next candidate is `InvalidArgumentType` error. We know the field user specified can exists in - * this spot, it's just that value provided has incorrect type. - * - All other engine-side errors follow. At that point it's difficult to say which of them is more relevant, - * so we treat them equally. We might adjust this logic in the future. - * @param error - * @returns - */ -function getErrorTypeScore(error: EngineValidationError): number { - switch (error.kind) { - case 'InvalidArgumentValue': - case 'ValueTooLarge': - return 20 - case 'InvalidArgumentType': - return 10 - default: - return 0 - } -} diff --git a/packages/client/src/runtime/core/errorRendering/applyValidationError.test.ts b/packages/client/src/runtime/core/errorRendering/applyValidationError.test.ts index 5034dee791ed..77e9b62ee3f1 100644 --- a/packages/client/src/runtime/core/errorRendering/applyValidationError.test.ts +++ b/packages/client/src/runtime/core/errorRendering/applyValidationError.test.ts @@ -2288,7 +2288,7 @@ describe('Union', () => { kind: 'InvalidArgumentType', selectionPath: [], argumentPath: ['where', 'email'], - argument: { name: 'email', typeNames: ['String'] }, + argument: { name: 'gt', typeNames: ['String'] }, inferredType: 'Int', }, @@ -2316,7 +2316,7 @@ describe('Union', () => { } } - Argument \`email\`: Invalid value provided. Expected String or StringFilter, provided Int. + Argument \`gt\`: Invalid value provided. Expected String or StringFilter, provided Int. ------------------------------------ @@ -2329,71 +2329,10 @@ describe('Union', () => { } } - Argument \`email\`: Invalid value provided. Expected String or StringFilter, provided Int. + Argument \`gt\`: Invalid value provided. Expected String or StringFilter, provided Int. `) }) - - test('same length path, different error types', () => { - expect( - renderError( - { - kind: 'Union', - errors: [ - { - kind: 'RequiredArgumentMissing', - selectionPath: [], - argumentPath: ['data', 'profile'], - inputTypes: [ - { - kind: 'object', - name: 'ProfileCreateInput', - fields: [{ name: 'create', typeNames: ['ProfileUniqueInput'], required: true }], - }, - ], - }, - - { - kind: 'InvalidArgumentType', - selectionPath: [], - argumentPath: ['data', 'email'], - argument: { name: 'email', typeNames: ['String'] }, - inferredType: 'Int', - }, - ], - }, - { - data: { email: 123 }, - }, - ), - ).toMatchInlineSnapshot(` - - Colorless: - - { - data: { - email: 123 - ~~~ - } - } - - Argument \`email\`: Invalid value provided. Expected String, provided Int. - - ------------------------------------ - - Colored: - - { - data: { - email: 123 - ~~~ - } - } - - Argument \`email\`: Invalid value provided. Expected String, provided Int. - - `) - }) }) describe('SomeFieldsMissing', () => { diff --git a/packages/client/src/runtime/core/errorRendering/applyValidationError.ts b/packages/client/src/runtime/core/errorRendering/applyValidationError.ts index f47bcc2640ce..7f6f01aa1b66 100644 --- a/packages/client/src/runtime/core/errorRendering/applyValidationError.ts +++ b/packages/client/src/runtime/core/errorRendering/applyValidationError.ts @@ -1,3 +1,4 @@ +import { maxBy } from '@prisma/internals' import levenshtein from 'js-levenshtein' import { @@ -10,13 +11,13 @@ import { RequiredArgumentMissingError, SomeFieldsMissingError, TooManyFieldsGivenError, + UnionError, UnknownArgumentError, UnknownInputFieldError, UnknownSelectionFieldError, ValueTooLargeError, } from '../engines' import { IncludeAndSelectError, IncludeOnScalarError, ValidationError } from '../types/ValidationError' -import { applyUnionError } from './applyUnionError' import { ArgumentsRenderingTree } from './ArgumentsRenderingTree' import { Colors } from './base' import { ObjectField } from './ObjectField' @@ -428,6 +429,73 @@ function applyTooManyFieldsGivenError(error: TooManyFieldsGivenError, args: Argu }) } +function applyUnionError(error: UnionError, args: ArgumentsRenderingTree) { + const bestError = getBestUnionError(error) + if (bestError) { + applyValidationError(bestError, args) + } else { + args.addErrorMessage(() => 'Unknown error') + } +} + +function getBestUnionError(error: UnionError) { + return tryMergingUnionError(error) ?? getLongestPathError(error) +} + +function tryMergingUnionError({ errors }: UnionError): InvalidArgumentTypeError | undefined { + if (errors.length === 0 || errors[0].kind !== 'InvalidArgumentType') { + return undefined + } + const result = { ...errors[0], argument: { ...errors[0].argument } } + for (let i = 1; i < errors.length; i++) { + const nextError = errors[i] + if (nextError.kind !== 'InvalidArgumentType') { + return undefined + } + + if (!isSamePath(nextError.selectionPath, result.selectionPath)) { + return undefined + } + + if (!isSamePath(nextError.argumentPath, result.argumentPath)) { + return undefined + } + + result.argument.typeNames = result.argument.typeNames.concat(nextError.argument.typeNames) + } + + return result +} + +function isSamePath(pathA: string[], pathB: string[]): boolean { + if (pathA.length !== pathB.length) { + return false + } + for (let i = 0; i < pathA.length; i++) { + if (pathA[i] !== pathB[i]) { + return false + } + } + return true +} + +function getLongestPathError(error: UnionError) { + return maxBy(error.errors, (error) => { + if (error.kind === 'Union') { + error = getBestUnionError(error) ?? error + } + let score = 0 + if (Array.isArray(error['selectionPath'])) { + score += error['selectionPath'].length + } + + if (Array.isArray(error['argumentPath'])) { + score += error['argumentPath'].length + } + return score + }) +} + function addSelectionSuggestions(selection: ObjectValue, outputType: OutputTypeDescription) { for (const field of outputType.fields) { if (!selection.hasField(field.name)) { diff --git a/packages/client/src/runtime/core/errors/PrismaClientInitializationError.ts b/packages/client/src/runtime/core/errors/PrismaClientInitializationError.ts index 8ec3e999d9b9..db7d9182c34d 100644 --- a/packages/client/src/runtime/core/errors/PrismaClientInitializationError.ts +++ b/packages/client/src/runtime/core/errors/PrismaClientInitializationError.ts @@ -7,8 +7,6 @@ export class PrismaClientInitializationError extends Error { constructor(message: string, clientVersion: string, errorCode?: string) { super(message) - this.name = "PrismaClientInitializationError" - this.clientVersion = clientVersion this.errorCode = errorCode Error.captureStackTrace(PrismaClientInitializationError) diff --git a/packages/client/src/runtime/core/errors/PrismaClientKnownRequestError.ts b/packages/client/src/runtime/core/errors/PrismaClientKnownRequestError.ts index c702df92c0b3..c4e2fab8de13 100644 --- a/packages/client/src/runtime/core/errors/PrismaClientKnownRequestError.ts +++ b/packages/client/src/runtime/core/errors/PrismaClientKnownRequestError.ts @@ -17,8 +17,7 @@ export class PrismaClientKnownRequestError extends Error implements ErrorWithBat constructor(message: string, { code, clientVersion, meta, batchRequestIdx }: KnownErrorParams) { super(message) - this.name = "PrismaClientKnownRequestError" - + this.code = code this.clientVersion = clientVersion this.meta = meta diff --git a/packages/client/src/runtime/core/errors/PrismaClientRustPanicError.ts b/packages/client/src/runtime/core/errors/PrismaClientRustPanicError.ts index 01978fd3ea55..4e7f1e346a29 100644 --- a/packages/client/src/runtime/core/errors/PrismaClientRustPanicError.ts +++ b/packages/client/src/runtime/core/errors/PrismaClientRustPanicError.ts @@ -5,8 +5,7 @@ export class PrismaClientRustPanicError extends Error { constructor(message: string, clientVersion: string) { super(message) - this.name = "PrismaClientRustPanicError" - + this.clientVersion = clientVersion } get [Symbol.toStringTag]() { diff --git a/packages/client/src/runtime/core/extensions/$extends.ts b/packages/client/src/runtime/core/extensions/$extends.ts index 1c0b909d7f45..961fc384edbd 100644 --- a/packages/client/src/runtime/core/extensions/$extends.ts +++ b/packages/client/src/runtime/core/extensions/$extends.ts @@ -1,15 +1,12 @@ import { Client } from '../../getPrismaClient' -import { RequestParams } from '../../RequestHandler' -import type { Fetch, IsolationLevel } from '../engines' +import { PrismaClientValidationError } from '../../query' import { applyModelsAndClientExtensions, - unApplyModelsAndClientExtensions, + unapplyModelsAndClientExtensions, } from '../model/applyModelsAndClientExtensions' -import { RawQueryArgs } from '../raw-query/RawQueryArgs' -import { JsArgs } from '../types/JsApi' -import { Optional } from '../types/Utils' +import { OptionalFlat } from '../types/Utils' -export type Args = Optional +export type Args = OptionalFlat export type RequiredArgs = NameArgs & ResultArgs & ModelArgs & ClientArgs & QueryOptions type NameArgs = { @@ -33,14 +30,14 @@ export type ResultFieldDefinition = { compute: ResultArgsFieldCompute } -export type ModelArgs = { +type ModelArgs = { model: { [ModelName in string]: ModelArg } } export type ModelArg = { - [MethodName in string]: unknown + [MethodName in string]: Function } type ClientArgs = { @@ -48,65 +45,25 @@ type ClientArgs = { } export type ClientArg = { - [MethodName in string]: unknown + [MethodName in string]: Function } type QueryOptionsCbArgs = { model?: string operation: string - args: JsArgs | RawQueryArgs - query: (args: JsArgs | RawQueryArgs) => Promise -} - -type ModelQueryOptionsCbArgs = { - model: string - operation: string - args: JsArgs - query: (args: JsArgs) => Promise -} - -type BatchQuery = { - model: string | undefined - operation: string - args: JsArgs | RawQueryArgs -} - -type BatchArgs = { - queries: BatchQuery[] - transaction?: { isolationLevel?: IsolationLevel } -} - -export type BatchInternalParams = { - requests: RequestParams[] - customDataProxyFetch?: CustomDataProxyFetch -} - -export type CustomDataProxyFetch = (fetch: Fetch) => Fetch - -type BatchQueryOptionsCbArgs = { - args: BatchArgs - // TODO: hide internalParams before making batch api public - query: (args: BatchArgs, __internalParams?: BatchInternalParams) => Promise - __internalParams: BatchInternalParams + args: object + query: (args: object) => Promise } export type QueryOptionsCb = (args: QueryOptionsCbArgs) => Promise -export type ModelQueryOptionsCb = (args: ModelQueryOptionsCbArgs) => Promise -export type BatchQueryOptionsCb = (args: BatchQueryOptionsCbArgs) => Promise type QueryOptions = { query: { [ModelName in string]: | { - [ModelAction in string]: ModelQueryOptionsCb + [ModelAction in string]: QueryOptionsCb } - | QueryOptionsCb // for all queries (eg. raw queries) - } -} - -export type QueryOptionsPrivate = QueryOptions & { - query?: { - $__internalBatch?: BatchQueryOptionsCb + | QueryOptionsCb // for "other" queries (eg. raw queries) } } @@ -115,20 +72,24 @@ export type QueryOptionsPrivate = QueryOptions & { * @param this */ export function $extends(this: Client, extension: Args | ((client: Client) => Client)): Client { + if (!this._hasPreviewFlag('clientExtensions')) { + throw new PrismaClientValidationError( + 'Extensions are not yet generally available, please add `clientExtensions` to the `previewFeatures` field in the `generator` block in the `schema.prisma` file.', + ) + } + if (typeof extension === 'function') { return extension(this) } // re-apply models to the extend client: they always capture specific instance // of the client and without re-application they would not see new extensions - const oldClient = unApplyModelsAndClientExtensions(this) + const oldClient = unapplyModelsAndClientExtensions(this) const newClient = Object.create(oldClient, { _extensions: { value: this._extensions.append(extension), }, - $use: { value: undefined }, - $on: { value: undefined }, - }) as Client + }) return applyModelsAndClientExtensions(newClient) } diff --git a/packages/client/src/runtime/core/extensions/MergedExtensionsList.ts b/packages/client/src/runtime/core/extensions/MergedExtensionsList.ts index 8f965ba97cee..f6d23be1da13 100644 --- a/packages/client/src/runtime/core/extensions/MergedExtensionsList.ts +++ b/packages/client/src/runtime/core/extensions/MergedExtensionsList.ts @@ -1,7 +1,7 @@ import { Cache } from '../../../generation/Cache' import { lazyProperty } from '../../../generation/lazyProperty' import { dmmfToJSModelName } from '../model/utils/dmmfToJSModelName' -import { Args, BatchQueryOptionsCb, ClientArg, ModelArg, QueryOptionsCb, QueryOptionsPrivate } from './$extends' +import { Args, ClientArg, ModelArg, QueryOptionsCb } from './$extends' import { ComputedFieldsMap, getComputedFields } from './resultUtils' class MergedExtensionsListNode { @@ -20,15 +20,6 @@ class MergedExtensionsListNode { } }) - private batchCallbacks = lazyProperty(() => { - const previous: BatchQueryOptionsCb[] = this.previous?.getAllBatchQueryCallbacks() ?? [] - const newCb = (this.extension as QueryOptionsPrivate).query?.$__internalBatch - if (!newCb) { - return previous - } - return previous.concat(newCb) - }) - constructor(public extension: Args, public previous?: MergedExtensionsListNode) {} getAllComputedFields(dmmfModelName: string): ComputedFieldsMap | undefined { @@ -56,13 +47,13 @@ class MergedExtensionsListNode { }) } - getAllQueryCallbacks(jsModelName: string | '$none', operation: string) { + getAllQueryCallbacks(jsModelName: string, operation: string) { return this.queryCallbacksCache.getOrCreate(`${jsModelName}:${operation}`, () => { const prevCbs = this.previous?.getAllQueryCallbacks(jsModelName, operation) ?? [] const newCbs: QueryOptionsCb[] = [] const query = this.extension.query - if (!query || !(query[jsModelName] || query['$allModels'] || query[operation] || query['$allOperations'])) { + if (!query || !(query[jsModelName] || query.$allModels || query[operation])) { return prevCbs } @@ -78,8 +69,7 @@ class MergedExtensionsListNode { } // when the extension isn't model-bound, apply it to all models - // '$none' is a special case for top-level operations without model - if (jsModelName !== '$none' && query['$allModels'] !== undefined) { + if (query['$allModels'] !== undefined) { if (query['$allModels'][operation] !== undefined) { newCbs.push(query['$allModels'][operation]) } @@ -95,28 +85,17 @@ class MergedExtensionsListNode { newCbs.push(query[operation] as QueryOptionsCb) } - // when the extension is not bound to a model & is any top-level operation - if (query['$allOperations'] !== undefined) { - newCbs.push(query['$allOperations'] as QueryOptionsCb) - } - return prevCbs.concat(newCbs) }) } - - getAllBatchQueryCallbacks() { - return this.batchCallbacks.get() - } } /** - * Class that holds the list of all extensions, applied to particular instance, - * as well as resolved versions of the components that need to apply on - * different levels. Main idea of this class: avoid re-resolving as much of the - * stuff as possible when new extensions are added while also delaying the - * resolve until the point it is actually needed. For example, computed fields - * of the model won't be resolved unless the model is actually queried. Neither - * adding extensions with `client` component only cause other components to + * Class that holds the list of all extensions, applied to particular instance, as well + * as resolved versions of the components that need to apply on different levels. Main idea + * of this class: avoid re-resolving as much of the stuff as possible when new extensions are added while also + * delaying the resolve until the point it is actually needed. For example, computed fields of the model won't be resolved unless + * the model is actually queried. Neither adding extensions with `client` component only cause other components to * recompute. */ export class MergedExtensionsList { @@ -153,8 +132,4 @@ export class MergedExtensionsList { getAllQueryCallbacks(jsModelName: string, operation: string) { return this.head?.getAllQueryCallbacks(jsModelName, operation) ?? [] } - - getAllBatchQueryCallbacks() { - return this.head?.getAllBatchQueryCallbacks() ?? [] - } } diff --git a/packages/client/src/runtime/core/extensions/applyQueryExtensions.ts b/packages/client/src/runtime/core/extensions/applyQueryExtensions.ts index 1903a552a82b..aa6906ea4130 100644 --- a/packages/client/src/runtime/core/extensions/applyQueryExtensions.ts +++ b/packages/client/src/runtime/core/extensions/applyQueryExtensions.ts @@ -1,7 +1,8 @@ +import { klona } from 'klona' + import { Client, InternalRequestParams } from '../../getPrismaClient' -import { RequestParams } from '../../RequestHandler' -import { deepCloneArgs } from '../../utils/deepCloneArgs' -import { BatchInternalParams, BatchQueryOptionsCb, CustomDataProxyFetch, QueryOptionsCb } from './$extends' +import { createPrismaPromise } from '../request/createPrismaPromise' +import { QueryOptionsCb } from './$extends' function iterateAndCallQueryCallbacks( client: Client, @@ -9,13 +10,13 @@ function iterateAndCallQueryCallbacks( queryCbs: QueryOptionsCb[], i = 0, ) { - return client._createPrismaPromise((transaction) => { + return createPrismaPromise((transaction) => { // we need to keep track of the previous customDataProxyFetch - const prevCustomFetch = params.customDataProxyFetch + const prevCustomFetch = params.customDataProxyFetch ?? ((f) => f) // allow query extensions to re-wrap in transactions // this will automatically discard the prev batch tx - if ('transaction' in params && transaction !== undefined) { + if (transaction !== undefined) { if (params.transaction?.kind === 'batch') { void params.transaction.lock.then() // discard } @@ -31,14 +32,14 @@ function iterateAndCallQueryCallbacks( return queryCbs[i]({ model: params.model, operation: params.model ? params.action : params.clientMethod, - args: deepCloneArgs(params.args ?? {}), + args: klona(params.args ?? {}), // @ts-expect-error because not part of public API __internalParams: params, query: (args, __internalParams = params) => { // we need to keep track of the current customDataProxyFetch // this is to cascade customDataProxyFetch like a middleware - const currCustomFetch = __internalParams.customDataProxyFetch - __internalParams.customDataProxyFetch = composeCustomDataProxyFetch(prevCustomFetch, currCustomFetch) + const currCustomFetch = __internalParams.customDataProxyFetch ?? ((f) => f) + __internalParams.customDataProxyFetch = (f) => prevCustomFetch(currCustomFetch(f)) __internalParams.args = args return iterateAndCallQueryCallbacks(client, __internalParams, queryCbs, i + 1) @@ -57,60 +58,7 @@ export function applyQueryExtensions(client: Client, params: InternalRequestPara } // get the cached query cbs for a given model and action - const cbs = client._extensions.getAllQueryCallbacks(jsModelName ?? '$none', operation) + const cbs = client._extensions.getAllQueryCallbacks(jsModelName ?? '*', operation) return iterateAndCallQueryCallbacks(client, params, cbs) } - -type BatchExecuteCallback = (params: BatchInternalParams) => Promise - -export function createApplyBatchExtensionsFunction(executeBatch: BatchExecuteCallback) { - return (requests: RequestParams[]) => { - const params = { requests } - const callbacks = requests[0].extensions.getAllBatchQueryCallbacks() - if (!callbacks.length) { - return executeBatch(params) - } - - return iterateAndCallBatchCallbacks(params, callbacks, 0, executeBatch) - } -} - -export function iterateAndCallBatchCallbacks( - params: BatchInternalParams, - callbacks: BatchQueryOptionsCb[], - i: number, - executeBatch: BatchExecuteCallback, -) { - if (i === callbacks.length) { - return executeBatch(params) - } - - const prevFetch = params.customDataProxyFetch - const transaction = params.requests[0].transaction - return callbacks[i]({ - args: { - queries: params.requests.map((request) => ({ - model: request.modelName, - operation: request.action, - args: request.args, - })), - transaction: transaction - ? { - isolationLevel: transaction.kind === 'batch' ? transaction.isolationLevel : undefined, - } - : undefined, - }, - __internalParams: params, - query(_args, __internalParams = params) { - const nextFetch = __internalParams.customDataProxyFetch - __internalParams.customDataProxyFetch = composeCustomDataProxyFetch(prevFetch, nextFetch) - return iterateAndCallBatchCallbacks(__internalParams, callbacks, i + 1, executeBatch) - }, - }) -} - -const noopFetch: CustomDataProxyFetch = (f) => f -function composeCustomDataProxyFetch(prevFetch = noopFetch, nextFetch = noopFetch): CustomDataProxyFetch { - return (f) => prevFetch(nextFetch(f)) -} diff --git a/packages/client/src/runtime/core/extensions/getExtensionContext.ts b/packages/client/src/runtime/core/extensions/getExtensionContext.ts index 6421d711e050..82bb0a9df1ca 100644 --- a/packages/client/src/runtime/core/extensions/getExtensionContext.ts +++ b/packages/client/src/runtime/core/extensions/getExtensionContext.ts @@ -8,9 +8,12 @@ /* eslint-disable prettier/prettier */ export type Context = T extends { [K: symbol]: { ctx: infer C } } - ? C & T & { name?: string } - : T & { name?: string } + ? C & { [K in Exclude & string]: T[K] } & ContextMeta + : T & ContextMeta +type ContextMeta = { name: string } +/* eslint-enable prettier/prettier */ + export function getExtensionContext(that: T) { return that as any as Context } diff --git a/packages/client/src/runtime/core/model/applyModel.ts b/packages/client/src/runtime/core/model/applyModel.ts index 7df54d9fba7a..fc6dfa6f14fc 100644 --- a/packages/client/src/runtime/core/model/applyModel.ts +++ b/packages/client/src/runtime/core/model/applyModel.ts @@ -10,6 +10,7 @@ import { CompositeProxyLayer, createCompositeProxy, } from '../compositeProxy' +import { createPrismaPromise } from '../request/createPrismaPromise' import type { PrismaPromise } from '../request/PrismaPromise' import type { UserArgs } from '../request/UserArgs' import { applyAggregates } from './applyAggregates' @@ -86,7 +87,7 @@ function modelActionsLayer(client: Client, dmmfModelName: string): CompositeProx const action = (paramOverrides: O.Optional) => (userArgs?: UserArgs) => { const callSite = getCallSite(client._errorFormat) // used for showing better errors - return client._createPrismaPromise((transaction) => { + return createPrismaPromise((transaction) => { const params: InternalRequestParams = { // data and its dataPath for nested results args: userArgs, diff --git a/packages/client/src/runtime/core/model/applyModelsAndClientExtensions.ts b/packages/client/src/runtime/core/model/applyModelsAndClientExtensions.ts index 60e8c7fda7cd..578c5920bdac 100644 --- a/packages/client/src/runtime/core/model/applyModelsAndClientExtensions.ts +++ b/packages/client/src/runtime/core/model/applyModelsAndClientExtensions.ts @@ -66,7 +66,7 @@ function modelsLayer(client: Client): CompositeProxyLayer { }) } -export function unApplyModelsAndClientExtensions(client: Client): Client { +export function unapplyModelsAndClientExtensions(client: Client): Client { if (client[rawClient]) { return client[rawClient] } diff --git a/packages/client/src/runtime/core/protocol/json/JsonProtocolEncoder.test.ts b/packages/client/src/runtime/core/protocol/json/JsonProtocolEncoder.test.ts deleted file mode 100644 index a3eec3624d4f..000000000000 --- a/packages/client/src/runtime/core/protocol/json/JsonProtocolEncoder.test.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { field, model, runtimeDataModel } from '../../../../testUtils/dataModelBuilder' -import { MergedExtensionsList } from '../../extensions/MergedExtensionsList' -import { JsonProtocolMessage } from './JsonProtocolEncoder' -import { serializeJsonQuery, SerializeParams } from './serialize' - -const User = model('User', [ - field('scalar', 'name', 'String'), - field('scalar', 'nickname', 'String'), - field('object', 'posts', 'Post', { - isList: true, - relationName: 'UserToPost', - }), -]) - -const Post = model('Post', [ - field('scalar', 'title', 'String'), - field('scalar', 'userId', 'String'), - field('scalar', 'published', 'Boolean'), - field('object', 'user', 'User', { - relationName: 'PostToUser', - }), - field('object', 'attachments', 'Attachment', { - relationName: 'PostToAttachment', - isList: true, - }), -]) - -const Attachment = model('Attachment', [ - field('scalar', 'fileName', 'String'), - field('scalar', 'postId', 'String'), - field('object', 'post', 'Post', { - relationName: 'AttachmentToPost', - }), -]) - -const datamodel = runtimeDataModel({ models: [User, Post, Attachment] }) - -type SimplifiedParams = Omit & { - extensions?: MergedExtensionsList -} - -function createMessage(params: SimplifiedParams) { - return new JsonProtocolMessage( - serializeJsonQuery({ - ...params, - runtimeDataModel: datamodel, - extensions: params.extensions ?? MergedExtensionsList.empty(), - clientMethod: 'foo', - errorFormat: 'colorless', - }), - ) -} - -test('getBatchId for findMany', () => { - expect( - createMessage({ - modelName: 'User', - action: 'findMany', - args: { - where: { - id: '123', - }, - }, - }).getBatchId(), - ).toBeUndefined() -}) - -test('getBatchId for findUnique', () => { - expect( - createMessage({ - modelName: 'User', - action: 'findUnique', - args: { - where: { - id: '123', - }, - }, - }).getBatchId(), - ).toMatchInlineSnapshot(`User((where (id)))($composites $scalars)`) -}) - -test('getBatchId for findUniqueOrThrow', () => { - expect( - createMessage({ - modelName: 'User', - action: 'findUniqueOrThrow', - args: { - where: { - id: '123', - }, - }, - }).getBatchId(), - ).toMatchInlineSnapshot(`User((where (id)))($composites $scalars)`) -}) diff --git a/packages/client/src/runtime/core/protocol/json/JsonProtocolEncoder.ts b/packages/client/src/runtime/core/protocol/json/JsonProtocolEncoder.ts index 523c5f683f1e..30e0ef0192a3 100644 --- a/packages/client/src/runtime/core/protocol/json/JsonProtocolEncoder.ts +++ b/packages/client/src/runtime/core/protocol/json/JsonProtocolEncoder.ts @@ -52,7 +52,7 @@ export class JsonProtocolMessage implements ProtocolMessage { return isWrite[this.query.action] } getBatchId(): string | undefined { - if (this.query.action !== 'findUnique' && this.query.action !== 'findUniqueOrThrow') { + if (this.query.action !== 'findUnique') { return undefined } const parts: string[] = [] diff --git a/packages/client/src/runtime/core/protocol/json/serialize.test.ts b/packages/client/src/runtime/core/protocol/json/serialize.test.ts index d18b1474ea8f..58df05d2b62b 100644 --- a/packages/client/src/runtime/core/protocol/json/serialize.test.ts +++ b/packages/client/src/runtime/core/protocol/json/serialize.test.ts @@ -492,8 +492,7 @@ test('args - FieldRef', () => { "name": { "$type": "FieldRef", "value": { - "_ref": "nickname", - "_container": "User" + "_ref": "nickname" } } } diff --git a/packages/client/src/runtime/core/protocol/json/serialize.ts b/packages/client/src/runtime/core/protocol/json/serialize.ts index da8f5f1733ad..e0eb08b52e0d 100644 --- a/packages/client/src/runtime/core/protocol/json/serialize.ts +++ b/packages/client/src/runtime/core/protocol/json/serialize.ts @@ -198,7 +198,7 @@ function serializeArgumentsValue( } if (isFieldRef(jsValue)) { - return { $type: 'FieldRef', value: { _ref: jsValue.name, _container: jsValue.modelName } } + return { $type: 'FieldRef', value: { _ref: jsValue.name } } } if (Array.isArray(jsValue)) { diff --git a/packages/client/src/runtime/core/public/index.ts b/packages/client/src/runtime/core/public/index.ts deleted file mode 100644 index c029456cbc2f..000000000000 --- a/packages/client/src/runtime/core/public/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { validator } from './validator' - -/* - * /!\ These exports are exposed to the user. Proceed with caution. - * - * TODO: Move more hardcoded utils from generation into here - */ - -export { validator } diff --git a/packages/client/src/runtime/core/public/validator.ts b/packages/client/src/runtime/core/public/validator.ts deleted file mode 100644 index d393c23b985c..000000000000 --- a/packages/client/src/runtime/core/public/validator.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Args, Operation } from '../types/Public' -import { Exact } from '../types/Utils' - -export function validator(): (select: Exact) => S -export function validator, O extends keyof C[M] & Operation>( - client: C, - model: M, - operation: O, -): (select: Exact>) => S -export function validator< - C, - M extends Exclude, - O extends keyof C[M] & Operation, - P extends keyof Args, ->(client: C, model: M, operation: O, prop: P): (select: Exact[P]>) => S -export function validator(..._args: any[]) { - return (args: any) => args -} diff --git a/packages/client/src/runtime/core/raw-query/RawQueryArgs.ts b/packages/client/src/runtime/core/raw-query/RawQueryArgs.ts index b9561a7104cc..e79b87625f4c 100644 --- a/packages/client/src/runtime/core/raw-query/RawQueryArgs.ts +++ b/packages/client/src/runtime/core/raw-query/RawQueryArgs.ts @@ -1,3 +1,3 @@ import { RawValue, Sql } from 'sql-template-tag' -export type RawQueryArgs = Sql | [query: string, ...values: RawValue[]] +export type RawQueryArgs = [query: string | TemplateStringsArray | Sql, ...values: RawValue[]] diff --git a/packages/client/src/runtime/core/raw-query/rawCommandArgsMapper.ts b/packages/client/src/runtime/core/raw-query/rawCommandArgsMapper.ts deleted file mode 100644 index eee73a40ffa1..000000000000 --- a/packages/client/src/runtime/core/raw-query/rawCommandArgsMapper.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const rawCommandArgsMapper = (command: object) => ({ - command, -}) diff --git a/packages/client/src/runtime/core/raw-query/rawQueryArgsMapper.ts b/packages/client/src/runtime/core/raw-query/rawQueryArgsMapper.ts index 065873a93b38..1c2d7bcc0980 100644 --- a/packages/client/src/runtime/core/raw-query/rawQueryArgsMapper.ts +++ b/packages/client/src/runtime/core/raw-query/rawQueryArgsMapper.ts @@ -1,7 +1,7 @@ import Debug from '@prisma/debug' -import { Sql } from 'sql-template-tag' +import { RawValue, Sql } from 'sql-template-tag' -import { MiddlewareArgsMapper } from '../../getPrismaClient' +import { Client } from '../../getPrismaClient' import { mssqlPreparedStatement } from '../../utils/mssqlPreparedStatement' import { serializeRawParameters } from '../../utils/serializeRawParameters' import { RawQueryArgs } from './RawQueryArgs' @@ -11,10 +11,14 @@ const ALTER_RE = /^(\s*alter\s)/i const debug = Debug('prisma:client') // TODO also check/disallow for CREATE, DROP -export function checkAlter(activeProvider: string, query: string, values: unknown[], invalidCall: string) { - if (activeProvider !== 'postgresql' && activeProvider !== 'cockroachdb') { - return - } +function checkAlter( + query: string, + values: RawValue[], + invalidCall: + | 'prisma.$executeRaw``' + | 'prisma.$executeRawUnsafe(, [...values])' + | 'prisma.$executeRaw(sql``)', +) { if (values.length > 0 && ALTER_RE.exec(query)) { // See https://github.com/prisma/prisma-client-js/issues/940 for more info throw new Error(`Running ALTER using ${invalidCall} is not supported @@ -28,86 +32,100 @@ More Information: https://pris.ly/d/execute-raw } } -export const rawQueryArgsMapper = (activeProvider: string, clientMethod: string) => (args: RawQueryArgs) => { - // TODO Clean up types - let queryString = '' - let parameters: { values: string; __prismaRawParameters__: true } | undefined +function isReadonlyArray(arg: any): arg is ReadonlyArray { + return Array.isArray(arg) +} - if (Array.isArray(args)) { - // If this was called as prisma.$executeRaw(, [...values]), assume it is a pre-prepared SQL statement, and forward it without any changes - const [query, ...values] = args - queryString = query - parameters = { - values: serializeRawParameters(values || []), - __prismaRawParameters__: true, - } - } else { - // If this was called as prisma.$executeRaw`` try to generate a SQL prepared statement - switch (activeProvider) { - case 'sqlite': - case 'mysql': { - queryString = args.sql - parameters = { - values: serializeRawParameters(args.values), - __prismaRawParameters__: true, - } - break +export const rawQueryArgsMapper = + (client: Client, clientMethod: string) => + ([query, ...values]: RawQueryArgs) => { + // TODO Clean up types + let queryString = '' + let parameters: { values: string; __prismaRawParameters__: true } | undefined + if (typeof query === 'string') { + // If this was called as prisma.$executeRaw(, [...values]), assume it is a pre-prepared SQL statement, and forward it without any changes + queryString = query + parameters = { + values: serializeRawParameters(values || []), + __prismaRawParameters__: true, + } + if (clientMethod.includes('executeRaw')) { + checkAlter(queryString, values, 'prisma.$executeRawUnsafe(, [...values])') } + } else if (isReadonlyArray(query)) { + // If this was called as prisma.$executeRaw``, try to generate a SQL prepared statement + switch (client._activeProvider) { + case 'sqlite': + case 'mysql': { + const queryInstance = new Sql(query, values) + + queryString = queryInstance.sql + parameters = { + values: serializeRawParameters(queryInstance.values), + __prismaRawParameters__: true, + } + break + } - case 'cockroachdb': - case 'postgresql': { - queryString = args.text + case 'cockroachdb': + case 'postgresql': { + const queryInstance = new Sql(query, values) - parameters = { - values: serializeRawParameters(args.values), - __prismaRawParameters__: true, + queryString = queryInstance.text + if (clientMethod.includes('executeRaw')) { + checkAlter(queryString, queryInstance.values, 'prisma.$executeRaw``') + } + + parameters = { + values: serializeRawParameters(queryInstance.values), + __prismaRawParameters__: true, + } + break } - break - } - case 'sqlserver': { - queryString = mssqlPreparedStatement(args) - parameters = { - values: serializeRawParameters(args.values), - __prismaRawParameters__: true, + case 'sqlserver': { + queryString = mssqlPreparedStatement(query) + parameters = { + values: serializeRawParameters(values), + __prismaRawParameters__: true, + } + break + } + default: { + throw new Error(`The ${client._activeProvider} provider does not support ${clientMethod}`) } - break } - default: { - throw new Error(`The ${activeProvider} provider does not support ${clientMethod}`) + } else { + // If this was called as prisma.$executeRaw(sql``), use prepared statements from sql-template-tag + switch (client._activeProvider) { + case 'sqlite': + case 'mysql': + queryString = query.sql + break + case 'cockroachdb': + case 'postgresql': + queryString = query.text + if (clientMethod.includes('executeRaw')) { + checkAlter(queryString, query.values, 'prisma.$executeRaw(sql``)') + } + break + case 'sqlserver': + queryString = mssqlPreparedStatement(query.strings) + break + default: + throw new Error(`The ${client._activeProvider} provider does not support ${clientMethod}`) + } + parameters = { + values: serializeRawParameters(query.values), + __prismaRawParameters__: true, } } - } - if (parameters?.values) { - debug(`prisma.${clientMethod}(${queryString}, ${parameters.values})`) - } else { - debug(`prisma.${clientMethod}(${queryString})`) - } - - return { query: queryString, parameters } -} - -type MiddlewareRawArgsTemplateString = [string[], ...unknown[]] -type MiddlewareRawArgsSql = [Sql] - -export const templateStringMiddlewareArgsMapper: MiddlewareArgsMapper = { - requestArgsToMiddlewareArgs(sql) { - return [sql.strings, ...sql.values] - }, - - middlewareArgsToRequestArgs(requestArgs) { - const [strings, ...values] = requestArgs - return new Sql(strings, values) - }, -} - -export const sqlMiddlewareArgsMapper: MiddlewareArgsMapper = { - requestArgsToMiddlewareArgs(sql) { - return [sql] - }, + if (parameters?.values) { + debug(`prisma.${clientMethod}(${queryString}, ${parameters.values})`) + } else { + debug(`prisma.${clientMethod}(${queryString})`) + } - middlewareArgsToRequestArgs(requestArgs) { - return requestArgs[0] - }, -} + return { query: queryString, parameters } + } diff --git a/packages/client/src/runtime/core/request/createPrismaPromise.ts b/packages/client/src/runtime/core/request/createPrismaPromise.ts index c482c538c518..6f72adc51b56 100644 --- a/packages/client/src/runtime/core/request/createPrismaPromise.ts +++ b/packages/client/src/runtime/core/request/createPrismaPromise.ts @@ -1,7 +1,5 @@ import type { PrismaPromise, PrismaPromiseTransaction } from './PrismaPromise' -export type PrismaPromiseCallback = (transaction?: PrismaPromiseTransaction) => PrismaPromise - /** * Creates a [[PrismaPromise]]. It is Prisma's implementation of `Promise` which * is essentially a proxy for `Promise`. All the transaction-compatible client @@ -11,55 +9,48 @@ export type PrismaPromiseCallback = (transaction?: PrismaPromiseTransaction) => * @see [[PrismaPromise]] * @returns */ -export type PrismaPromiseFactory = (callback: PrismaPromiseCallback) => PrismaPromise - -/** - * Creates a factory, that allows creating PrismaPromises, bound to a specific transactions - * @param transaction - * @returns - */ -export function createPrismaPromiseFactory(transaction?: PrismaPromiseTransaction): PrismaPromiseFactory { - return function createPrismaPromise(callback) { - let promise: PrismaPromise | undefined - const _callback = (callbackTransaction = transaction) => { - try { - // promises cannot be triggered twice after resolving - if (callbackTransaction === undefined || callbackTransaction?.kind === 'itx') { - return (promise ??= valueToPromise(callback(callbackTransaction))) - } - - // but for batch tx we can trigger them again & again - return valueToPromise(callback(callbackTransaction)) - } catch (error) { - // if the callback throws, then we reject the promise - // and that is because exceptions are not always async - return Promise.reject(error) as PrismaPromise +export function createPrismaPromise( + callback: (transaction?: PrismaPromiseTransaction) => PrismaPromise, +): PrismaPromise { + let promise: PrismaPromise | undefined + const _callback = (transaction?: PrismaPromiseTransaction) => { + try { + // promises cannot be triggered twice after resolving + if (transaction === undefined || transaction?.kind === 'itx') { + return (promise ??= valueToPromise(callback(transaction))) } - } - - return { - then(onFulfilled, onRejected) { - return _callback().then(onFulfilled, onRejected) - }, - catch(onRejected) { - return _callback().catch(onRejected) - }, - finally(onFinally) { - return _callback().finally(onFinally) - }, - requestTransaction(batchTransaction) { - const promise = _callback(batchTransaction) + // but for batch tx we can trigger them again & again + return valueToPromise(callback(transaction)) + } catch (error) { + // if the callback throws, then we reject the promise + // and that is because exceptions are not always async + return Promise.reject(error) as PrismaPromise + } + } - if (promise.requestTransaction) { - // we want to have support for nested promises - return promise.requestTransaction(batchTransaction) - } + return { + then(onFulfilled, onRejected, transaction?) { + return _callback(transaction).then(onFulfilled, onRejected, transaction) + }, + catch(onRejected, transaction?) { + return _callback(transaction).catch(onRejected, transaction) + }, + finally(onFinally, transaction?) { + return _callback(transaction).finally(onFinally, transaction) + }, + + requestTransaction(batchTransaction) { + const promise = _callback(batchTransaction) + + if (promise.requestTransaction) { + // we want to have support for nested promises + return promise.requestTransaction(batchTransaction) + } - return promise - }, - [Symbol.toStringTag]: 'PrismaPromise', - } + return promise + }, + [Symbol.toStringTag]: 'PrismaPromise', } } diff --git a/packages/client/src/runtime/core/types/Extensions.ts b/packages/client/src/runtime/core/types/Extensions.ts index 403e91885288..8c4e1f8b11f0 100644 --- a/packages/client/src/runtime/core/types/Extensions.ts +++ b/packages/client/src/runtime/core/types/Extensions.ts @@ -1,23 +1,17 @@ -import { Sql } from 'sql-template-tag' - -import { ITXClientDenyList } from '../../itxClientDenyList' import { RequiredArgs as UserArgs } from '../extensions/$extends' -import { GetFindResult, GetResult as GetOperationResult, Operation } from './GetResult' -import { Payload } from './Payload' -import { PrismaPromise } from './Public' -import { Call, ComputeDeep, Fn, Optional, Return, ToTuple, UnwrapTuple } from './Utils' +import { ReadonlyDeep } from './Utils' /* eslint-disable prettier/prettier */ export type InternalArgs< - Q = { [K in string]: { [K in string]: unknown } }, - R = { [K in string]: { [K in string]: unknown } }, - M = { [K in string]: { [K in string]: unknown } }, - C = { [K in string]: unknown }, + R extends UserArgs['result'] = UserArgs['result'], + M extends UserArgs['model'] = UserArgs['model'], + Q extends UserArgs['query'] = UserArgs['query'], + C extends UserArgs['client'] = UserArgs['client'], > = { result: { [K in keyof R]: { [P in keyof R[K]]: () => R[K][P] } }, - query: { [K in keyof Q]: { [P in keyof Q[K]]: () => Q[K][P] } }, model: { [K in keyof M]: { [P in keyof M[K]]: () => M[K][P] } }, + query: { [K in keyof Q]: { [P in keyof Q[K]]: () => Q[K][P] } }, client: { [K in keyof C]: () => C[K] }, } @@ -25,211 +19,24 @@ export type Args = InternalArgs export type DefaultArgs = InternalArgs<{}, {}, {}, {}> -export type GetResult, R extends Args['result'][string], KR extends keyof R = string extends keyof R ? never : keyof R> = - { [K in KR | keyof Base]: K extends KR ? R[K] extends (() => { compute: (...args: any) => infer C }) ? C : never : Base[K] } - -export type GetSelect, R extends Args['result'][string], KR extends keyof R = string extends keyof R ? never : keyof R> = - { [K in KR | keyof Base]?: K extends KR ? boolean : Base[K] } - -/** Query */ - -export type DynamicQueryExtensionArgs = { - [K in keyof Q_]: - K extends '$allOperations' - ? (args: { model?: string, operation: string, args: any, query: (args: any) => PrismaPromise }) => Promise - : K extends '$allModels' - ? { - [P in keyof Q_[K] | keyof TypeMap['model'][keyof TypeMap['model']] | '$allOperations']?: - P extends '$allOperations' - ? DynamicQueryExtensionCb - : P extends keyof TypeMap['model'][keyof TypeMap['model']] - ? DynamicQueryExtensionCb - : never - } - : K extends TypeMap['meta']['modelProps'] - ? { - [P in keyof Q_[K] | keyof TypeMap['model'][ModelKey] | '$allOperations']?: - P extends '$allOperations' - ? DynamicQueryExtensionCb, keyof TypeMap['model'][ModelKey]> - : P extends keyof TypeMap['model'][ModelKey] - ? DynamicQueryExtensionCb, P> - : never - } - : K extends keyof TypeMap['other'] - ? DynamicQueryExtensionCb<[TypeMap], 0 /* hack to maintain type arity */, 'other', K> - : never -} - -export type DynamicQueryExtensionCb = - >(args: A) => - Promise - -export type DynamicQueryExtensionCbArgs = - ( // we distribute over the union of models and operations to allow narrowing - _1 extends unknown ? _2 extends unknown ? { - args: DynamicQueryExtensionCbArgsArgs, - model: _0 extends 0 ? undefined : _1, - operation: _2, - } : never : never - ) & { // but we don't distribute for query so that the input types stay union - query: (args: DynamicQueryExtensionCbArgsArgs) => - PrismaPromise - } - -export type DynamicQueryExtensionCbArgsArgs = - _2 extends '$queryRaw' | '$executeRaw' - ? Sql // Override args type for raw queries - : TypeMap[_0][_1][_2]['args'] - -/** Result */ +export type GetResult, R extends Args['result'][string]> = + { [K in keyof R | keyof Base]: K extends keyof R ? ReturnType['compute']> : Base[K] } & unknown -export type DynamicResultExtensionArgs = { - [K in keyof R_]: { - [P in keyof R_[K]]?: { - needs?: DynamicResultExtensionNeeds, R_[K][P]> - compute(data: DynamicResultExtensionData, R_[K][P]>): any - } - } -} - -export type DynamicResultExtensionNeeds = { - [K in keyof S]: K extends keyof TypeMap['model'][M]['findFirstOrThrow']['payload']['scalars'] ? S[K] : never -} & { - [N in keyof TypeMap['model'][M]['findFirstOrThrow']['payload']['scalars']]?: boolean -} - -export type DynamicResultExtensionData = - GetFindResult - -/** Model */ - -export type DynamicModelExtensionArgs> = { - [K in keyof M_]: - K extends '$allModels' - ? & { [P in keyof M_[K]]?: unknown } - & { [K: symbol]: {} } - : K extends TypeMap['meta']['modelProps'] - ? & { [P in keyof M_[K]]?: unknown } - & { [K: symbol]: { ctx: DynamicModelExtensionThis, ExtArgs> & { name: ModelKey } } } - : never -} - -export type DynamicModelExtensionThis> = { - [P in keyof ExtArgs['model'][Uncapitalize]]: - Return][P]> -} & { - [P in Exclude]>]: - {} extends TypeMap['model'][M][P]['args'] // will match fully optional args - ? (args?: A) => - PrismaPromise> - : (args: A) => - PrismaPromise> -} & { - [K: symbol]: { types: TypeMap['model'][M] } -} +export type GetSelect, R extends Args['result'][string]> = + { [K in keyof R | keyof Base]?: K extends keyof R ? boolean : Base[K] } -/** Client */ +export type GetModel, M extends Args['model'][string]> = + { [K in keyof M | keyof Base]: K extends keyof M ? ReturnType : Base[K] } -export type DynamicClientExtensionArgs> = { - [P in keyof C_]: unknown -} & { - [K: symbol]: { ctx: Optional, ITXClientDenyList> } -} +export type GetClient, C extends Args['client']> = + Omit & { [K in keyof C]: ReturnType } -export type DynamicClientExtensionThis> = { - [P in keyof ExtArgs['client']]: Return -} & { - [P in Exclude]: - DynamicModelExtensionThis, ExtArgs> -} & { - [P in Exclude]: - > - (...args: ToTuple) => PrismaPromise +export type ReadonlySelector = T extends unknown ? { + readonly [K in keyof T as K extends 'include' | 'select' ? K : never]: ReadonlyDeep } & { - [P in Exclude]: - DynamicClientExtensionThisBuiltin[P] -} - -export type ClientBuiltInProp = '$connect' | '$disconnect' | '$transaction' | '$extends' -export type DynamicClientExtensionThisBuiltin> = { - $extends: ExtendsHook<'extends', TypeMapCb, ExtArgs> - $transaction

[]>(arg: [...P], options?: { isolationLevel?: TypeMap['meta']['txIsolationLevel'] }): Promise> - $transaction(fn: (client: Omit, ITXClientDenyList>) => Promise, options?: { maxWait?: number, timeout?: number, isolationLevel?: TypeMap['meta']['txIsolationLevel'] }): Promise - $disconnect(): Promise - $connect(): Promise -} - -/** $extends, defineExtension */ - -export interface ExtendsHook, TypeMap extends TypeMapDef = Call> { - extArgs: ExtArgs, - < - // X_ seeds the first fields for auto-completion and deals with dynamic inference - // X doesn't deal with dynamic inference but captures the final inferred input type - Q_ extends { [K in TypeMap['meta']['modelProps'] | '$allModels' | keyof TypeMap['other'] | '$allOperations']?: unknown }, - R_ extends { [K in TypeMap['meta']['modelProps'] | '$allModels']?: unknown }, R, - M_ extends { [K in TypeMap['meta']['modelProps'] | '$allModels']?: unknown }, M, - C_ extends { [K in string]?: unknown }, C, - Args extends InternalArgs = InternalArgs<{}, R, M, C>, - MergedArgs extends InternalArgs = MergeExtArgs - >(extension: - | ((client: DynamicClientExtensionThis) => { $extends: { extArgs: Args } }) - | { - name?: string - query?: DynamicQueryExtensionArgs - result?: DynamicResultExtensionArgs & R - model?: DynamicModelExtensionArgs & M - client?: DynamicClientExtensionArgs & C - } - ): { - 'extends': DynamicClientExtensionThis, TypeMapCb, MergedArgs> - 'define': (client: any) => { $extends: { extArgs: Args } } - }[Variant] -} - -export type MergeExtArgs, Args extends Record> = - ComputeDeep< - & ExtArgs - & Args - & AllModelsToStringIndex - & AllModelsToStringIndex - > - -export type AllModelsToStringIndex, K extends PropertyKey> = - Args extends { [P in K]: { $allModels: infer AllModels} } - ? { [P in K]: Record } - : {} - -/** Shared */ - -type TypeMapDef = Record /* DevTypeMapDef */ - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -type DevTypeMapDef = { - meta: { - modelProps: string - }, - model: { - [Model in PropertyKey]: { - [Operation in PropertyKey]: DevTypeMapFnDef - } - }, - other: { - [Operation in PropertyKey]: DevTypeMapFnDef - } -} - -type DevTypeMapFnDef = { - args: any - result: any - payload: Payload -} - -type TypeMapCbDef = Fn<{ extArgs: Args }, TypeMapDef> + [K in keyof T as K extends 'include' | 'select' ? never : K]: T[K] +} : never -type ModelKey = - M extends keyof TypeMap['model'] - ? M - : Capitalize +/* eslint-enable prettier/prettier */ export type { UserArgs } diff --git a/packages/client/src/runtime/core/types/GetResult.ts b/packages/client/src/runtime/core/types/GetResult.ts index 10662d37919d..c76475847783 100644 --- a/packages/client/src/runtime/core/types/GetResult.ts +++ b/packages/client/src/runtime/core/types/GetResult.ts @@ -1,9 +1,7 @@ /* eslint-disable prettier/prettier */ -import { Payload } from './Payload' -import { JsonObject } from './Utils' +import { Payload } from "./Payload" -// prettier-ignore export type Operation = // finds | 'findFirst' @@ -25,98 +23,73 @@ export type Operation = | 'aggregate' | 'count' | 'groupBy' -// raw sql | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' -// raw mongo -| 'findRaw' -| 'aggregateRaw' | '$runCommandRaw' +// raw mongo +// | 'findRaw' +// | 'runCommandRaw' type Count = { [K in keyof O]: Count } & {} -// prettier-ignore -export type GetFindResult

= - {} extends A ? DefaultSelection

: +export type GetFindResult

= A extends | { select: infer S } & Record | { include: infer S } & Record ? { [K in keyof S as S[K] extends false | undefined | null ? never : K]: - S[K] extends object - ? P extends SelectablePayloadFields - ? O extends Payload ? GetFindResult[] : never - : P extends SelectablePayloadFields - ? O extends Payload ? GetFindResult | SelectField & null : never - : K extends '_count' - ? Count> - : never - : P extends SelectablePayloadFields - ? O extends Payload ? DefaultSelection[] : never - : P extends SelectablePayloadFields - ? O extends Payload ? DefaultSelection | SelectField & null : never + S[K] extends true + ? P extends { objects: { [k in K]: (infer O)[] } } + ? O extends Payload ? O['scalars'][] : never + : P extends { objects: { [k in K]: (infer O) | null } } + ? O extends Payload ? O['scalars'] | P['objects'][K] & null : never : P extends { scalars: { [k in K]: infer O } } ? O : K extends '_count' ? Count : never - } & (A extends { include: any } & Record ? DefaultSelection

: unknown) - : DefaultSelection

- -type SelectablePayloadFields = - | { objects: { [k in K]: O } } - | { composites: { [k in K]: O } } - -// prettier-ignore -type SelectField

, K extends PropertyKey> = - P extends { objects: Record } - ? P['objects'][K] - : P extends { composites: Record } - ? P['composites'][K] - : never - -// prettier-ignore -export type DefaultSelection

= P extends Payload - ? P['scalars'] & UnwrapPayload - : P - -type UnwrapPayload

= { - [K in keyof P]: - P[K] extends Payload[] - ? UnwrapPayload - : P[K] extends Payload - ? P[K]['scalars'] & UnwrapPayload - : P[K] -} & unknown - -type GetCountResult = A extends { select: infer S } ? (S extends true ? number : Count) : number + : P extends { objects: { [k in K]: (infer O)[] } } + ? O extends Payload ? GetFindResult[] : never + : P extends { objects: { [k in K]: (infer O) | null } } + ? O extends Payload ? GetFindResult | P['objects'][K] & null : never + : K extends '_count' + ? Count> + : never + }& (A extends { include: any } & Record ? P['scalars'] : unknown) + : P['scalars'] -type Aggregate = '_count' | '_max' | '_min' | '_avg' | '_sum' +type GetCountResult = + A extends { select: infer S } + ? S extends true + ? number + : Count + : number -// prettier-ignore -type GetAggregateResult

= { +type Aggregate = '_count' | '_max' | '_min' | '_avg' | '_sum' +type GetAggregateResult = { [K in keyof A as K extends Aggregate ? K : never]: K extends '_count' - ? A[K] extends true ? number : Count - : { [J in keyof A[K] & string]: P['scalars'][J] | null } + ? A[K] extends true + ? number + : Count + : Count } type GetBatchResult = { count: number } -// prettier-ignore -type GetGroupByResult

= - A extends { by: string[] } - ? Array & { [K in A['by'][number]]: P['scalars'][K] }> +type GetGroupByResult = + P extends Payload + ? A extends { by: string[] } + ? Array & { [K in A['by'][number]]: P['scalars'][K] }> + : never : never -// TODO Null can be removed once rejectOnNotFound is removed -// prettier-ignore -export type GetResult

= { - findUnique: GetFindResult | Null, +export type GetResult

= { + findUnique: GetFindResult, findUniqueOrThrow: GetFindResult, - findFirst: GetFindResult | Null, + findFirst: GetFindResult, findFirstOrThrow: GetFindResult, findMany: GetFindResult[], create: GetFindResult, @@ -126,14 +99,12 @@ export type GetResult

= - T extends { [K: symbol]: { types: { [K in F]: { args: any } } } } + T extends { [K: symbol]: { types: { [K in F]: { args: any} } } } ? T[symbol]['types'][F]['args'] : never diff --git a/packages/client/src/runtime/core/types/Utils.ts b/packages/client/src/runtime/core/types/Utils.ts index 2d3133545960..0bcfd175205f 100644 --- a/packages/client/src/runtime/core/types/Utils.ts +++ b/packages/client/src/runtime/core/types/Utils.ts @@ -1,4 +1,4 @@ -import { PrismaPromise } from '../request/PrismaPromise' +/* eslint-disable prettier/prettier */ export type EmptyToUnknown = T @@ -6,6 +6,23 @@ export type NeverToUnknown = [T] extends [never] ? unknown : T export type PatchFlat = O1 & Omit +export type PatchDeep = { + [K in keyof O]: + K extends keyof O1 + ? K extends keyof O2 + ? O1[K] extends object + ? O2[K] extends object + ? O1[K] extends Function + ? O1[K] + : O2[K] extends Function + ? O1[K] + : PatchDeep + : O1[K] + : O1[K] + : O1[K] + : O2[K & keyof O2] +} + export type Omit = { [P in keyof T as P extends K ? never : P]: T[P] } @@ -14,9 +31,19 @@ export type Pick = { [P in keyof T as P extends K ? P : never]: T[P] } -export type ComputeDeep = T extends Function ? T : { [K in keyof T]: ComputeDeep } & unknown +/** + * Patches 3 objects on top of each other with minimal looping. + * This is a more efficient way of doing `PatchFlat>` + */ +export type PatchFlat3 = A & { + [K in Exclude]: K extends keyof B ? B[K] : C[K & keyof C] +} -export type Compute = T extends Function ? T : { [K in keyof T]: T[K] } & unknown +export type Compute = T extends Function + ? T + : { + [K in keyof T]: T[K] + } & unknown export type OptionalFlat = { [K in keyof T]?: T[K] @@ -28,71 +55,28 @@ export type ReadonlyDeep = { type Narrowable = string | number | bigint | boolean | [] -// prettier-ignore export type Narrow = { [K in keyof A]: A[K] extends Function ? A[K] : Narrow } | (A extends Narrowable ? A : never) -// prettier-ignore export type Exact = (W extends A ? { [K in keyof W]: K extends keyof A ? Exact : never } : W) | (A extends Narrowable ? A : never) export type Cast = A extends W ? A : W -type LegacyNarrowable = string | number | boolean | bigint -// prettier-ignore +type LegacyNarrowable = string | number | boolean | bigint; export type LegacyExact = W extends unknown ? A extends LegacyNarrowable ? Cast : Cast< - { [K in keyof A]: K extends keyof W ? LegacyExact : never }, - { [K in keyof W]: K extends keyof A ? LegacyExact : W[K] }> + {[K in keyof A]: K extends keyof W ? LegacyExact : never}, + {[K in keyof W]: K extends keyof A ? LegacyExact : W[K]}> : never; -export type JsonObject = { [Key in string]?: JsonValue } -export interface JsonArray extends Array {} -export type JsonValue = string | number | boolean | JsonObject | JsonArray | null - -export type Record = { - [P in T]: U -} - -type UnwrapPromise

= P extends Promise ? R : P - -export type UnwrapTuple = { - [K in keyof Tuple]: K extends `${number}` - ? Tuple[K] extends PrismaPromise - ? X - : UnwrapPromise - : UnwrapPromise -} - -export type Path = P extends [infer K, ...infer R] - ? K extends keyof O - ? Path - : Default - : O - -export interface Fn { - params: Params - returns: Returns -} - -export type Call = (F & { params: P })['returns'] - -export type RequiredKeys = { - [K in keyof O]-?: {} extends Pick ? never : K -}[keyof O] - -export type OptionalKeys = { - [K in keyof O]-?: {} extends Pick ? K : never -}[keyof O] - -export type Optional = { - [P in K & keyof O]?: O[P] -} & { - [P in Exclude]: O[P] -} - -export type Return = T extends (...args: any[]) => infer R ? R : T - -export type ToTuple = T extends any[] ? T : [T] +export type WrapPropsInFnDeep = { + [K in keyof T]: + T[K] extends Function + ? T[K] + : T[K] extends object + ? WrapPropsInFnDeep + : () => T[K] +} & {} diff --git a/packages/client/src/runtime/core/types/index.ts b/packages/client/src/runtime/core/types/index.ts index 44c737639e7e..f25c4ed6849c 100644 --- a/packages/client/src/runtime/core/types/index.ts +++ b/packages/client/src/runtime/core/types/index.ts @@ -1,15 +1,12 @@ import * as Extensions from './Extensions' -import { DefaultSelection, GetResult } from './GetResult' +import { GetFindResult, GetResult } from './GetResult' import { Payload } from './Payload' import * as Public from './Public' import * as Utils from './Utils' -/** Specific types */ export { Extensions } export { Utils } export { Public } - -/** General types */ export { type GetResult } +export { type GetFindResult } export { type Payload } -export { type DefaultSelection } diff --git a/packages/client/src/runtime/getPrismaClient.ts b/packages/client/src/runtime/getPrismaClient.ts index 4eed5d32f0de..a34c77c6855d 100644 --- a/packages/client/src/runtime/getPrismaClient.ts +++ b/packages/client/src/runtime/getPrismaClient.ts @@ -23,7 +23,6 @@ import { RawValue, Sql } from 'sql-template-tag' import { getPrismaClientDMMF } from '../generation/getDMMF' import type { InlineDatasources } from '../generation/utils/buildInlineDatasources' import { PrismaClientValidationError } from '.' -import { addProperty, createCompositeProxy, removeProperties } from './core/compositeProxy' import { BatchTransactionOptions, BinaryEngine, @@ -41,23 +40,14 @@ import { applyQueryExtensions } from './core/extensions/applyQueryExtensions' import { MergedExtensionsList } from './core/extensions/MergedExtensionsList' import { checkPlatformCaching } from './core/init/checkPlatformCaching' import { MetricsClient } from './core/metrics/MetricsClient' -import { - applyModelsAndClientExtensions, - unApplyModelsAndClientExtensions, -} from './core/model/applyModelsAndClientExtensions' +import { applyModelsAndClientExtensions } from './core/model/applyModelsAndClientExtensions' import { dmmfToJSModelName } from './core/model/utils/dmmfToJSModelName' import { ProtocolEncoder } from './core/protocol/common' import { GraphQLProtocolEncoder } from './core/protocol/graphql' import { JsonProtocolEncoder } from './core/protocol/json' -import { rawCommandArgsMapper } from './core/raw-query/rawCommandArgsMapper' import { RawQueryArgs } from './core/raw-query/RawQueryArgs' -import { - checkAlter, - rawQueryArgsMapper, - sqlMiddlewareArgsMapper, - templateStringMiddlewareArgsMapper, -} from './core/raw-query/rawQueryArgsMapper' -import { createPrismaPromiseFactory } from './core/request/createPrismaPromise' +import { rawQueryArgsMapper } from './core/raw-query/rawQueryArgsMapper' +import { createPrismaPromise } from './core/request/createPrismaPromise' import { PrismaPromise, PrismaPromiseInteractiveTransaction, @@ -67,10 +57,8 @@ import { UserArgs } from './core/request/UserArgs' import { dmmfToRuntimeDataModel, RuntimeDataModel } from './core/runtimeDataModel' import { getTracingHelper } from './core/tracing/TracingHelper' import { getLockCountPromise } from './core/transaction/utils/createLockCountPromise' -import { JsInputValue } from './core/types/JsApi' import { DMMFHelper } from './dmmf' import { getLogLevel } from './getLogLevel' -import { itxClientDenyList } from './itxClientDenyList' import { mergeBy } from './mergeBy' import type { QueryMiddleware, QueryMiddlewareParams } from './MiddlewareHandler' import { MiddlewareHandler } from './MiddlewareHandler' @@ -178,23 +166,10 @@ export type InternalRequestParams = { otelParentCtx?: Context /** Used to "desugar" a user input into an "expanded" one */ argsMapper?: (args?: UserArgs) => UserArgs - - /** Used to convert args for middleware and back */ - middlewareArgsMapper?: MiddlewareArgsMapper /** Used for Accelerate client extension via Data Proxy */ customDataProxyFetch?: (fetch: Fetch) => Fetch } & Omit -export type MiddlewareArgsMapper = { - requestArgsToMiddlewareArgs(requestArgs: RequestArgs): MiddlewareArgs - middlewareArgsToRequestArgs(middlewareArgs: MiddlewareArgs): RequestArgs -} - -const noopMiddlewareArgsMapper: MiddlewareArgsMapper = { - requestArgsToMiddlewareArgs: (param) => param, - middlewareArgsToRequestArgs: (param) => param, -} - /* Types for Logging */ export type LogLevel = 'info' | 'query' | 'warn' | 'error' export type LogDefinition = { @@ -358,7 +333,6 @@ export function getPrismaClient(config: GetPrismaClientConfig) { _rejectOnNotFound?: InstanceRejectOnNotFound _dataProxy: boolean _extensions: MergedExtensionsList - _createPrismaPromise = createPrismaPromiseFactory() constructor(optionsArg?: PrismaClientOptions) { checkPlatformCaching(config) @@ -624,17 +598,15 @@ export function getPrismaClient(config: GetPrismaClientConfig) { transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, - middlewareArgsMapper?: MiddlewareArgsMapper, ): Promise { return this._request({ action: 'executeRaw', args, transaction, clientMethod, - argsMapper: rawQueryArgsMapper(this._activeProvider, clientMethod), + argsMapper: rawQueryArgsMapper(this, clientMethod), callsite: getCallSite(this._errorFormat), dataPath: [], - middlewareArgsMapper, }) } @@ -647,16 +619,9 @@ export function getPrismaClient(config: GetPrismaClientConfig) { * @returns */ $executeRaw(query: TemplateStringsArray | Sql, ...values: any[]) { - return this._createPrismaPromise((transaction) => { + return createPrismaPromise((transaction) => { if ((query as TemplateStringsArray).raw !== undefined || (query as Sql).sql !== undefined) { - const [sql, argsMapper] = toSql(query, values) - checkAlter( - this._activeProvider, - sql.text, - sql.values, - Array.isArray(query) ? 'prisma.$executeRaw``' : 'prisma.$executeRaw(sql``)', - ) - return this.$executeRawInternal(transaction, '$executeRaw', sql, argsMapper) + return this.$executeRawInternal(transaction, '$executeRaw', [query, ...values]) } throw new PrismaClientValidationError(`\`$executeRaw\` is a tag function, please use it like the following: @@ -678,8 +643,7 @@ Or read our docs at https://www.prisma.io/docs/concepts/components/prisma-client * @returns */ $executeRawUnsafe(query: string, ...values: RawValue[]) { - return this._createPrismaPromise((transaction) => { - checkAlter(this._activeProvider, query, values, 'prisma.$executeRawUnsafe(, [...values])') + return createPrismaPromise((transaction) => { return this.$executeRawInternal(transaction, '$executeRawUnsafe', [query, ...values]) }) } @@ -690,20 +654,19 @@ Or read our docs at https://www.prisma.io/docs/concepts/components/prisma-client * @param command * @returns */ - $runCommandRaw(command: Record) { + $runCommandRaw(command: object) { if (config.activeProvider !== 'mongodb') { throw new PrismaClientValidationError( `The ${config.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`, ) } - return this._createPrismaPromise((transaction) => { + return createPrismaPromise((transaction) => { return this._request({ - args: command, + args: { command: command }, clientMethod: '$runCommandRaw', dataPath: [], action: 'runCommandRaw', - argsMapper: rawCommandArgsMapper, callsite: getCallSite(this._errorFormat), transaction: transaction, }) @@ -717,17 +680,15 @@ Or read our docs at https://www.prisma.io/docs/concepts/components/prisma-client transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, - middlewareArgsMapper?: MiddlewareArgsMapper, ) { return this._request({ action: 'queryRaw', args, transaction, clientMethod, - argsMapper: rawQueryArgsMapper(this._activeProvider, clientMethod), + argsMapper: rawQueryArgsMapper(this, clientMethod), callsite: getCallSite(this._errorFormat), dataPath: [], - middlewareArgsMapper, }).then(deserializeRawResults) } @@ -740,9 +701,9 @@ Or read our docs at https://www.prisma.io/docs/concepts/components/prisma-client * @returns */ $queryRaw(query: TemplateStringsArray | Sql, ...values: any[]) { - return this._createPrismaPromise((transaction) => { + return createPrismaPromise((transaction) => { if ((query as TemplateStringsArray).raw !== undefined || (query as Sql).sql !== undefined) { - return this.$queryRawInternal(transaction, '$queryRaw', ...toSql(query, values)) + return this.$queryRawInternal(transaction, '$queryRaw', [query, ...values]) } throw new PrismaClientValidationError(`\`$queryRaw\` is a tag function, please use it like the following: @@ -764,7 +725,7 @@ Or read our docs at https://www.prisma.io/docs/concepts/components/prisma-client * @returns */ $queryRawUnsafe(query: string, ...values: RawValue[]) { - return this._createPrismaPromise((transaction) => { + return createPrismaPromise((transaction) => { return this.$queryRawInternal(transaction, '$queryRawUnsafe', [query, ...values]) }) } @@ -819,8 +780,7 @@ Or read our docs at https://www.prisma.io/docs/concepts/components/prisma-client try { // execute user logic with a proxied the client const transaction = { kind: 'itx', ...info } as const - - result = await callback(this._createItxClient(transaction)) + result = await callback(transactionProxy(this, transaction)) // it went well, then we commit the transaction await this._engine.transaction('commit', headers, info) @@ -834,17 +794,6 @@ Or read our docs at https://www.prisma.io/docs/concepts/components/prisma-client return result } - _createItxClient(transaction: PrismaPromiseInteractiveTransaction) { - const rawClient = unApplyModelsAndClientExtensions(this) - return applyModelsAndClientExtensions( - createCompositeProxy(rawClient, [ - addProperty('_createPrismaPromise', () => createPrismaPromiseFactory(transaction)), - addProperty(TX_ID, () => transaction.id), - removeProperties(itxClientDenyList), - ]), - ) - } - /** * Execute queries within a transaction * @param input a callback or a query list @@ -876,11 +825,10 @@ Or read our docs at https://www.prisma.io/docs/concepts/components/prisma-client _request(internalParams: InternalRequestParams): Promise { // this is the otel context that is active at the callsite internalParams.otelParentCtx = this._tracingHelper.getActiveContext() - const middlewareArgsMapper = internalParams.middlewareArgsMapper ?? noopMiddlewareArgsMapper // make sure that we don't leak extra properties to users const params: QueryMiddlewareParams = { - args: middlewareArgsMapper.requestArgsToMiddlewareArgs(internalParams.args), + args: internalParams.args, dataPath: internalParams.dataPath, runInTransaction: Boolean(internalParams.transaction), action: internalParams.action, @@ -922,20 +870,17 @@ Or read our docs at https://www.prisma.io/docs/concepts/components/prisma-client // no middleware? then we just proceed with request execution // before we send the execution request, we use the changed params - const { runInTransaction, args, ...changedRequestParams } = changedMiddlewareParams + const { runInTransaction, ...changedRequestParams } = changedMiddlewareParams const requestParams = { ...internalParams, ...changedRequestParams, } - if (args) { - requestParams.args = middlewareArgsMapper.middlewareArgsToRequestArgs(args) - } - - // if middleware switched off `runInTransaction`, unset `transaction` - // property on request as well so it will be executed outside of the tx - if (internalParams.transaction !== undefined && runInTransaction === false) { - delete requestParams.transaction // client extensions check for this + // if middleware switched off `runInTransaction`, unset + // `transaction` property on request as well so it will be executed outside + // of transaction + if (!runInTransaction) { + requestParams.transaction = undefined } return applyQueryExtensions(this, requestParams) // also executes the query @@ -998,7 +943,7 @@ Or read our docs at https://www.prisma.io/docs/concepts/components/prisma-client debug(`Prisma Client call:`) debug( `prisma.${clientMethod}(${printJsonWithErrors({ - ast: args as object, + ast: args, keyPaths: [], valuePaths: [], missingItems: [], @@ -1017,7 +962,6 @@ Or read our docs at https://www.prisma.io/docs/concepts/components/prisma-client protocolMessage: message, protocolEncoder, modelName: model, - action, clientMethod, dataPath, rejectOnNotFound, @@ -1087,6 +1031,51 @@ Or read our docs at https://www.prisma.io/docs/concepts/components/prisma-client return PrismaClient } +const forbidden: Array = ['$connect', '$disconnect', '$on', '$transaction', '$use', '$extends'] + +/** + * Proxy that takes over the client promises to pass `txId` + * @param thing to be proxied + * @param transaction to be passed down to {@link RequestHandler} + * @returns + */ +function transactionProxy(thing: T, transaction: PrismaPromiseInteractiveTransaction): T { + // we only wrap within a proxy if it's possible: if it's an object + if (typeof thing !== 'object') return thing + + return new Proxy(thing as any as object, { + get: (target, prop) => { + // we don't want to allow any calls to our `forbidden` methods + if (forbidden.includes(prop as string)) return undefined + + if (prop === TX_ID) return transaction?.id // secret accessor to the txId + + // we override and handle every function call within the proxy + if (typeof target[prop] === 'function') { + return (...args: unknown[]) => { + // we hijack promise calls to pass txId to prisma promises + if (prop === 'then') return target[prop](args[0], args[1], transaction) + if (prop === 'catch') return target[prop](args[0], transaction) + if (prop === 'finally') return target[prop](args[0], transaction) + + // if it's not the end promise, result is also tx-proxied + return transactionProxy(target[prop](...args), transaction) + } + } + + // if it's an object prop, then we keep on making it proxied + return transactionProxy(target[prop], transaction) + }, + + has(target, prop) { + if (forbidden.includes(prop)) { + return false + } + return Reflect.has(target, prop) + }, + }) as any as T +} + const rejectOnNotFoundReplacements = { findUnique: 'findUniqueOrThrow', findFirst: 'findFirstOrThrow', @@ -1110,15 +1099,3 @@ function warnAboutRejectOnNotFound( ) } } - -function toSql(query: TemplateStringsArray | Sql, values: unknown[]): [Sql, MiddlewareArgsMapper] { - if (isTemplateStringArray(query)) { - return [new Sql(query, values), templateStringMiddlewareArgsMapper] - } - - return [query, sqlMiddlewareArgsMapper] -} - -function isTemplateStringArray(value: unknown): value is TemplateStringsArray { - return Array.isArray(value) && Array.isArray(value['raw']) -} diff --git a/packages/client/src/runtime/index-browser.ts b/packages/client/src/runtime/index-browser.ts index a706d532e4e7..e3c8bff2a65a 100644 --- a/packages/client/src/runtime/index-browser.ts +++ b/packages/client/src/runtime/index-browser.ts @@ -1,7 +1,3 @@ -import * as Public from './core/public' - export { objectEnumValues } from './object-enums' export { makeStrictEnum } from './strictEnum' export { default as Decimal } from 'decimal.js' - -export { Public } diff --git a/packages/client/src/runtime/index.ts b/packages/client/src/runtime/index.ts index e24b49d3e1f4..f9603b0686b0 100644 --- a/packages/client/src/runtime/index.ts +++ b/packages/client/src/runtime/index.ts @@ -1,8 +1,6 @@ import * as Extensions from './core/extensions' -import * as Public from './core/public' import * as Types from './core/types' import { Payload } from './core/types' -import type { PrismaPromise } from './core/types/Public' export { PrismaClientInitializationError } from './core/errors/PrismaClientInitializationError' export { PrismaClientKnownRequestError } from './core/errors/PrismaClientKnownRequestError' @@ -35,17 +33,11 @@ export { empty, join, raw, Sql, default as sqltag } from 'sql-template-tag' export { Types } export { Extensions } -export { Public } export { warnOnce } from '@prisma/internals' /** - * Payload, PrismaPromise and Extensions types are already exported via Types but tsc - * won't be able to trace them correctly back to runtime module and fail with either - * "... is using the type X but can not be named" or "The inferred type of this node exceeds the maximum length" error. + * Payload is already exported via Types but tsc will complain that it isn't reachable * The issue lies with the type bundler which does not add exports for dependent types * TODO: Maybe simply exporting all types in runtime will do the trick */ -export { type Payload, type PrismaPromise } - -export * from './core/types/Extensions' -export type { ITXClientDenyList } from './itxClientDenyList' +export { type Payload } diff --git a/packages/client/src/runtime/itxClientDenyList.ts b/packages/client/src/runtime/itxClientDenyList.ts deleted file mode 100644 index a16c3b4b4e91..000000000000 --- a/packages/client/src/runtime/itxClientDenyList.ts +++ /dev/null @@ -1,5 +0,0 @@ -const denylist = ['$connect', '$disconnect', '$on', '$transaction', '$use', '$extends'] as const - -export const itxClientDenyList = denylist as ReadonlyArray - -export type ITXClientDenyList = (typeof denylist)[number] diff --git a/packages/client/src/runtime/query.ts b/packages/client/src/runtime/query.ts index 2173e8850a4b..67ac89075c91 100644 --- a/packages/client/src/runtime/query.ts +++ b/packages/client/src/runtime/query.ts @@ -611,7 +611,7 @@ function stringify(value: any, inputType?: DMMF.SchemaArgInputType) { } if (value instanceof FieldRefImpl) { - return `{ _ref: ${JSON.stringify(value.name)}, _container: ${JSON.stringify(value.modelName)}}` + return `{ _ref: ${JSON.stringify(value.name)}}` } if (Object.prototype.toString.call(value) === '[object BigInt]') { diff --git a/packages/client/src/runtime/utils/deepCloneArgs.ts b/packages/client/src/runtime/utils/deepCloneArgs.ts deleted file mode 100644 index 484c9f9c1fe2..000000000000 --- a/packages/client/src/runtime/utils/deepCloneArgs.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { assertNever } from '@prisma/internals' -import Decimal from 'decimal.js' -import { Sql } from 'sql-template-tag' - -import { isFieldRef } from '../core/model/FieldRef' -import { RawQueryArgs } from '../core/raw-query/RawQueryArgs' -import { JsArgs, JsInputValue } from '../core/types/JsApi' -import { ObjectEnumValue } from '../object-enums' -import { isDate } from './date' -import { isDecimalJsLike } from './decimalJsLike' - -export function deepCloneArgs(args: JsArgs | RawQueryArgs): JsArgs | RawQueryArgs { - if (args instanceof Sql) { - return cloneSql(args) - } - - if (Array.isArray(args)) { - const clone: RawQueryArgs = [args[0]] - - for (let i = 1; i < args.length; i++) { - clone[i] = deepCloneValue(args[i] as JsInputValue) - } - - return clone - } - const clone: JsArgs = {} - for (const k in args) { - clone[k] = deepCloneValue(args[k]) - } - return clone -} - -function cloneSql(rawParam: Sql): Sql { - return new Sql(rawParam.strings, rawParam.values) -} - -// based on https://github.com/lukeed/klona/blob/v2.0.6/src/index.js -function deepCloneValue(x: JsInputValue): JsInputValue { - if (typeof x !== 'object' || x == null || x instanceof ObjectEnumValue || isFieldRef(x)) { - return x - } - - if (isDecimalJsLike(x)) { - return new Decimal(x.toFixed()) - } - - if (isDate(x)) { - return new Date(+x) - } - - if (ArrayBuffer.isView(x)) { - return x.slice(0) - } - - if (Array.isArray(x)) { - let k = x.length - let copy - for (copy = Array(k); k--; ) { - copy[k] = deepCloneValue(x[k]) - } - return copy - } - - if (typeof x === 'object') { - const copy = {} - for (const k in x) { - if (k === '__proto__') { - Object.defineProperty(copy, k, { - value: deepCloneValue(x[k]), - configurable: true, - enumerable: true, - writable: true, - }) - } else { - copy[k] = deepCloneValue(x[k]) - } - } - return copy - } - - assertNever(x, 'Unknown value') -} diff --git a/packages/client/src/runtime/utils/mssqlPreparedStatement.ts b/packages/client/src/runtime/utils/mssqlPreparedStatement.ts index a25c1dcfe3af..acded77fc553 100644 --- a/packages/client/src/runtime/utils/mssqlPreparedStatement.ts +++ b/packages/client/src/runtime/utils/mssqlPreparedStatement.ts @@ -1,6 +1,4 @@ -import type { Sql } from 'sql-template-tag' - // Generate something like: SELECT * FROM User WHERE name = @P1 AND email = @P2 ... -export const mssqlPreparedStatement = (sql: Sql) => { - return sql.strings.reduce((acc, str, idx) => `${acc}@P${idx}${str}`) +export const mssqlPreparedStatement = (template: ReadonlyArray | TemplateStringsArray) => { + return template.reduce((acc, str, idx) => `${acc}@P${idx}${str}`) } diff --git a/packages/client/tests/e2e/bundler-detection-error/tests/main.ts b/packages/client/tests/e2e/bundler-detection-error/tests/main.ts index ec25fb743753..fab2da36e023 100644 --- a/packages/client/tests/e2e/bundler-detection-error/tests/main.ts +++ b/packages/client/tests/e2e/bundler-detection-error/tests/main.ts @@ -6,6 +6,26 @@ afterEach(() => { consoleMock.mockClear() }) +test('importing the the bundled prisma client produces warning messages', () => { + require('../dist/index.js') + + expect(consoleMock.mock.calls[0]).toMatchInlineSnapshot(` +[ + "prisma:warn Your generated Prisma Client could not immediately find its \`schema.prisma\`, falling back to finding it via the current working directory.", +] +`) + expect(consoleMock.mock.calls[1]).toMatchInlineSnapshot(` +[ + "prisma:warn We are interested in learning about your project setup. We'd appreciate if you could take the time to share some information with us.", +] +`) + expect(consoleMock.mock.calls[2]).toMatchInlineSnapshot(` +[ + "prisma:warn Please help us by answering a few questions: https://pris.ly/bundler-investigation", +] +`) +}) + test('bundled prisma client will re-use the schema.prisma via cwd', async () => { const { somePrismaCall } = require('../dist/index.js') diff --git a/packages/client/tests/e2e/publish-extensions/_steps.ts b/packages/client/tests/e2e/community/publish-extensions/_steps.ts similarity index 75% rename from packages/client/tests/e2e/publish-extensions/_steps.ts rename to packages/client/tests/e2e/community/publish-extensions/_steps.ts index 277827ff5e4b..b8ea333ae8fd 100644 --- a/packages/client/tests/e2e/publish-extensions/_steps.ts +++ b/packages/client/tests/e2e/community/publish-extensions/_steps.ts @@ -1,6 +1,6 @@ import { $, cd } from 'zx' -import { executeSteps } from '../_utils/executeSteps' +import { executeSteps } from '../../_utils/executeSteps' void executeSteps({ setup: async () => { @@ -16,8 +16,9 @@ void executeSteps({ await $`pnpm exec prisma generate` }, test: async () => { - await $`pnpm exec tsc --noEmit` - await $`pnpm exec jest` + await $`pnpm exec prisma -v` + await $`ts-node src/index.ts` + await $`pnpm exec tsc` }, finish: async () => { await $`echo "done"` diff --git a/packages/client/tests/e2e/issues/19866-ts-composite-declaration/package.json b/packages/client/tests/e2e/community/publish-extensions/package.json similarity index 82% rename from packages/client/tests/e2e/issues/19866-ts-composite-declaration/package.json rename to packages/client/tests/e2e/community/publish-extensions/package.json index 259576408449..3ed5a46ffae4 100644 --- a/packages/client/tests/e2e/issues/19866-ts-composite-declaration/package.json +++ b/packages/client/tests/e2e/community/publish-extensions/package.json @@ -5,7 +5,7 @@ "scripts": {}, "dependencies": { "@prisma/client": "../../prisma-client-0.0.0.tgz", - "typescript": "4.9.4" + "simple-ext": "./simple-ext/simple-ext-0.0.0.tgz" }, "devDependencies": { "@types/node": "16.18.11", diff --git a/packages/client/tests/e2e/publish-extensions/prisma/schema.prisma b/packages/client/tests/e2e/community/publish-extensions/prisma/schema.prisma similarity index 100% rename from packages/client/tests/e2e/publish-extensions/prisma/schema.prisma rename to packages/client/tests/e2e/community/publish-extensions/prisma/schema.prisma diff --git a/packages/client/tests/e2e/publish-extensions/readme.md b/packages/client/tests/e2e/community/publish-extensions/readme.md similarity index 68% rename from packages/client/tests/e2e/publish-extensions/readme.md rename to packages/client/tests/e2e/community/publish-extensions/readme.md index 4aca85913b1d..3dac54176a43 100644 --- a/packages/client/tests/e2e/publish-extensions/readme.md +++ b/packages/client/tests/e2e/community/publish-extensions/readme.md @@ -2,4 +2,4 @@ Here we test that types still work even for published extensions. This test uses advanced type utilities since they are mostly needed for generic extensions. The -test isn't exhaustive because we have functional tests covering all the cases. +test isn't exhaustive because whe have functional tests covering all the cases. diff --git a/packages/client/tests/e2e/publish-extensions/simple-ext/package.json b/packages/client/tests/e2e/community/publish-extensions/simple-ext/package.json similarity index 59% rename from packages/client/tests/e2e/publish-extensions/simple-ext/package.json rename to packages/client/tests/e2e/community/publish-extensions/simple-ext/package.json index 7064ce7c9177..9350ab2b5280 100644 --- a/packages/client/tests/e2e/publish-extensions/simple-ext/package.json +++ b/packages/client/tests/e2e/community/publish-extensions/simple-ext/package.json @@ -7,11 +7,11 @@ "build": "tsc" }, "peerDependencies": { - "@prisma/client": "../../prisma-client-0.0.0.tgz" + "@prisma/client": "../../../prisma-client-0.0.0.tgz" }, "devDependencies": { - "@prisma/client": "../../prisma-client-0.0.0.tgz", - "prisma": "../../prisma-0.0.0.tgz", + "@prisma/client": "../../../prisma-client-0.0.0.tgz", + "prisma": "../../../prisma-0.0.0.tgz", "typescript": "4.9.4" } } diff --git a/packages/client/tests/e2e/publish-extensions/simple-ext/src/index.ts b/packages/client/tests/e2e/community/publish-extensions/simple-ext/src/index.ts similarity index 80% rename from packages/client/tests/e2e/publish-extensions/simple-ext/src/index.ts rename to packages/client/tests/e2e/community/publish-extensions/simple-ext/src/index.ts index 521b85be8611..098e61a22de7 100644 --- a/packages/client/tests/e2e/publish-extensions/simple-ext/src/index.ts +++ b/packages/client/tests/e2e/community/publish-extensions/simple-ext/src/index.ts @@ -1,4 +1,4 @@ -import { Prisma } from '@prisma/client/extension' +import { Prisma } from '@prisma/client/scripts/default-index' export const simpleExtension = Prisma.defineExtension({ model: { diff --git a/packages/client/tests/e2e/publish-extensions/simple-ext/tsconfig.json b/packages/client/tests/e2e/community/publish-extensions/simple-ext/tsconfig.json similarity index 100% rename from packages/client/tests/e2e/publish-extensions/simple-ext/tsconfig.json rename to packages/client/tests/e2e/community/publish-extensions/simple-ext/tsconfig.json diff --git a/packages/client/tests/e2e/publish-extensions/tests/main.ts b/packages/client/tests/e2e/community/publish-extensions/src/index.ts similarity index 52% rename from packages/client/tests/e2e/publish-extensions/tests/main.ts rename to packages/client/tests/e2e/community/publish-extensions/src/index.ts index 4776fcabc2c8..4efa34650b44 100644 --- a/packages/client/tests/e2e/publish-extensions/tests/main.ts +++ b/packages/client/tests/e2e/community/publish-extensions/src/index.ts @@ -1,13 +1,7 @@ import { PrismaClient } from '@prisma/client' -import { Prisma } from '@prisma/client/extension' import { simpleExtension } from 'simple-ext' -test('prisma versions', () => { - expect(Prisma.prismaVersion.client).toMatch(/^\d+\.\d+\.\d+/) - expect(Prisma.prismaVersion.engine).toMatch(/^[a-f0-9]{40}/) -}) - -test('simple extension', () => { +function main() { const prisma = new PrismaClient().$extends(simpleExtension) prisma.user.simpleCall({ @@ -17,4 +11,6 @@ test('simple extension', () => { nonExistentField: 2, }, }) -}) +} + +void main() diff --git a/packages/client/tests/e2e/issues/studio-1128-spawn-enoent/tsconfig.json b/packages/client/tests/e2e/community/publish-extensions/tsconfig.json similarity index 100% rename from packages/client/tests/e2e/issues/studio-1128-spawn-enoent/tsconfig.json rename to packages/client/tests/e2e/community/publish-extensions/tsconfig.json diff --git a/packages/client/tests/e2e/default-version/_steps.ts b/packages/client/tests/e2e/default-version/_steps.ts deleted file mode 100644 index 07e7d86ee27b..000000000000 --- a/packages/client/tests/e2e/default-version/_steps.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { $ } from 'zx' - -import { executeSteps } from '../_utils/executeSteps' - -void executeSteps({ - setup: async () => { - await $`pnpm install` - }, - test: async () => { - await $`pnpm exec tsc --noEmit` - await $`pnpm exec jest` - }, - finish: async () => { - await $`echo "done"` - }, - // keep: true, // keep docker open to debug it -}) diff --git a/packages/client/tests/e2e/default-version/package.json b/packages/client/tests/e2e/default-version/package.json deleted file mode 100644 index 4f239663bfe7..000000000000 --- a/packages/client/tests/e2e/default-version/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "private": true, - "version": "0.0.0", - "main": "index.js", - "scripts": {}, - "dependencies": { - "@prisma/client": "../prisma-client-0.0.0.tgz" - }, - "devDependencies": { - "@types/jest": "29.5.1", - "@types/node": "16.18.11" - } -} diff --git a/packages/client/tests/e2e/default-version/pnpm-lock.yaml b/packages/client/tests/e2e/default-version/pnpm-lock.yaml deleted file mode 100644 index c4cb58461df5..000000000000 --- a/packages/client/tests/e2e/default-version/pnpm-lock.yaml +++ /dev/null @@ -1,36 +0,0 @@ -lockfileVersion: '6.1' - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - -dependencies: - '@prisma/client': - specifier: ../prisma-client-0.0.0.tgz - version: file:../prisma-client-0.0.0.tgz - -devDependencies: - '@types/node': - specifier: 16.18.11 - version: 16.18.11 - -packages: - - /@types/node@16.18.11: - resolution: {integrity: sha512-3oJbGBUWuS6ahSnEq1eN2XrCyf4YsWI8OyCvo7c64zQJNplk3mO84t53o8lfTk+2ji59g5ycfc6qQ3fdHliHuA==} - dev: true - - file:../prisma-client-0.0.0.tgz: - resolution: {integrity: sha512-8p4k7ATSBVdUtgcw2mucWNOFe0xcDA2Btaui5h9nqAURo8OCH5Idfd+1KZzrL+Ip8jLqPHRzJjok3Juj6+dqgw==, tarball: file:../prisma-client-0.0.0.tgz} - name: '@prisma/client' - version: 0.0.0 - engines: {node: '>=14.17'} - requiresBuild: true - peerDependencies: - prisma: '*' - peerDependenciesMeta: - prisma: - optional: true - dev: false - bundledDependencies: - - '@prisma/engines-version' diff --git a/packages/client/tests/e2e/default-version/readme.md b/packages/client/tests/e2e/default-version/readme.md deleted file mode 100644 index 5742a0fb3e2b..000000000000 --- a/packages/client/tests/e2e/default-version/readme.md +++ /dev/null @@ -1,3 +0,0 @@ -# Readme - -Tests that both the client version and the engine can be accessed via the default client. diff --git a/packages/client/tests/e2e/default-version/tests/main.ts b/packages/client/tests/e2e/default-version/tests/main.ts deleted file mode 100644 index 370d72d82c21..000000000000 --- a/packages/client/tests/e2e/default-version/tests/main.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Prisma } from '@prisma/client' - -test('example', () => { - expect(Prisma.prismaVersion.client).toMatch(/^\d+\.\d+\.\d+/) - expect(Prisma.prismaVersion.engine).toMatch(/^[a-f0-9]{40}/) -}) diff --git a/packages/client/tests/e2e/default-version/tsconfig.json b/packages/client/tests/e2e/default-version/tsconfig.json deleted file mode 100644 index 1d0b21415338..000000000000 --- a/packages/client/tests/e2e/default-version/tsconfig.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "../tsconfig.base.json", - "exclude": ["_steps.ts"] -} diff --git a/packages/client/tests/e2e/engine-not-found-error/binary-targets-incorrectly-pinned/readme.md b/packages/client/tests/e2e/engine-not-found-error/binary-targets-incorrectly-pinned/readme.md index 89ecc6404399..4d50429af2fc 100644 --- a/packages/client/tests/e2e/engine-not-found-error/binary-targets-incorrectly-pinned/readme.md +++ b/packages/client/tests/e2e/engine-not-found-error/binary-targets-incorrectly-pinned/readme.md @@ -1,3 +1,3 @@ # Readme -Test that the engine not found error is thrown when the binary targets were pinned for different platforms. +Test that the engine not found error is thrown when the binary targets was pinned for different platforms. diff --git a/packages/client/tests/e2e/example/_steps.ts b/packages/client/tests/e2e/example/_steps.ts index 099f6779a8ce..240fc3292b58 100644 --- a/packages/client/tests/e2e/example/_steps.ts +++ b/packages/client/tests/e2e/example/_steps.ts @@ -11,8 +11,8 @@ void executeSteps({ test: async () => { await $`pnpm exec prisma -v` await $`ts-node src/index.ts` - await $`pnpm exec tsc --noEmit` await $`pnpm exec jest` + await $`pnpm exec tsc` }, finish: async () => { await $`echo "done"` diff --git a/packages/client/tests/e2e/example/package.json b/packages/client/tests/e2e/example/package.json index a110288ceacb..8bb012302c89 100644 --- a/packages/client/tests/e2e/example/package.json +++ b/packages/client/tests/e2e/example/package.json @@ -7,7 +7,6 @@ "@prisma/client": "../prisma-client-0.0.0.tgz" }, "devDependencies": { - "@types/jest": "29.5.1", "@types/node": "16.18.11", "prisma": "../prisma-0.0.0.tgz" } diff --git a/packages/client/tests/e2e/example/prisma/schema.prisma b/packages/client/tests/e2e/example/prisma/schema.prisma index 33ab340c83c6..0c148d5f3af8 100644 --- a/packages/client/tests/e2e/example/prisma/schema.prisma +++ b/packages/client/tests/e2e/example/prisma/schema.prisma @@ -3,6 +3,7 @@ generator client { provider = "prisma-client-js" + previewFeatures = ["clientExtensions"] } datasource db { diff --git a/packages/client/tests/e2e/example/tsconfig.json b/packages/client/tests/e2e/example/tsconfig.json index 1d0b21415338..6249bed01061 100644 --- a/packages/client/tests/e2e/example/tsconfig.json +++ b/packages/client/tests/e2e/example/tsconfig.json @@ -1,4 +1,4 @@ { "extends": "../tsconfig.base.json", - "exclude": ["_steps.ts"] + "include": ["src/*"] } diff --git a/packages/client/tests/e2e/issues/19866-ts-composite-declaration/_steps.ts b/packages/client/tests/e2e/issues/19866-ts-composite-declaration/_steps.ts deleted file mode 100644 index 86f879df0569..000000000000 --- a/packages/client/tests/e2e/issues/19866-ts-composite-declaration/_steps.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { $ } from 'zx' - -import { executeSteps } from '../../_utils/executeSteps' - -void executeSteps({ - setup: async () => { - await $`pnpm install` - await $`pnpm exec prisma generate` - }, - test: async () => { - await $`pnpm exec prisma -v` - await $`ts-node src/index.ts` - await $`pnpm exec tsc` - }, - finish: async () => { - await $`echo "done"` - }, - // keep: true, // keep docker open to debug it -}) diff --git a/packages/client/tests/e2e/issues/19866-ts-composite-declaration/pnpm-lock.yaml b/packages/client/tests/e2e/issues/19866-ts-composite-declaration/pnpm-lock.yaml deleted file mode 100644 index 8a276acac9bf..000000000000 --- a/packages/client/tests/e2e/issues/19866-ts-composite-declaration/pnpm-lock.yaml +++ /dev/null @@ -1,55 +0,0 @@ -lockfileVersion: 5.4 - -specifiers: - '@prisma/client': ../../prisma-client-0.0.0.tgz - '@types/node': 16.18.11 - prisma: ../../prisma-0.0.0.tgz - typescript: 4.9.4 - -dependencies: - '@prisma/client': file:../../prisma-client-0.0.0.tgz_prisma@0.0.0 - typescript: 4.9.4 - -devDependencies: - '@types/node': 16.18.11 - prisma: file:../../prisma-0.0.0.tgz - -packages: - - /@types/node/16.18.11: - resolution: {integrity: sha512-3oJbGBUWuS6ahSnEq1eN2XrCyf4YsWI8OyCvo7c64zQJNplk3mO84t53o8lfTk+2ji59g5ycfc6qQ3fdHliHuA==} - dev: true - - /typescript/4.9.4: - resolution: {integrity: sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==} - engines: {node: '>=4.2.0'} - hasBin: true - dev: false - - file:../../prisma-0.0.0.tgz: - resolution: {integrity: sha512-IISCAXh4BBqpF6/t0OUziAEFMiMb8RmvjXtLbzXzrzfrZdV09wAuPMKzlvgzr0dChG7JJVbijI7pTSN+gN/H6w==, tarball: file:../../prisma-0.0.0.tgz} - name: prisma - version: 0.0.0 - engines: {node: '>=14.17'} - hasBin: true - requiresBuild: true - bundledDependencies: - - '@prisma/engines' - - file:../../prisma-client-0.0.0.tgz_prisma@0.0.0: - resolution: {integrity: sha512-i8Mlm386PYyJjVZvQVJdenMzpQQx3549iozmk1uTRx4z2tJq9NPUnA89TvOwrgYM6r0zhHTIIcnLfsywo5bNGA==, tarball: file:../../prisma-client-0.0.0.tgz} - id: file:../../prisma-client-0.0.0.tgz - name: '@prisma/client' - version: 0.0.0 - engines: {node: '>=14.17'} - requiresBuild: true - peerDependencies: - prisma: '*' - peerDependenciesMeta: - prisma: - optional: true - dependencies: - prisma: file:../../prisma-0.0.0.tgz - dev: false - bundledDependencies: - - '@prisma/engines-version' diff --git a/packages/client/tests/e2e/issues/19866-ts-composite-declaration/prisma/schema.prisma b/packages/client/tests/e2e/issues/19866-ts-composite-declaration/prisma/schema.prisma deleted file mode 100644 index 33ab340c83c6..000000000000 --- a/packages/client/tests/e2e/issues/19866-ts-composite-declaration/prisma/schema.prisma +++ /dev/null @@ -1,35 +0,0 @@ -// This is your Prisma schema file, -// learn more about it in the docs: https://pris.ly/d/prisma-schema - -generator client { - provider = "prisma-client-js" -} - -datasource db { - provider = "sqlite" - url = "file:./db" -} - -model User { - id Int @id @default(autoincrement()) - email String @unique - name String? - posts Post[] - profile Profile? -} - -model Post { - id Int @id @default(autoincrement()) - title String - content String? - published Boolean @default(false) - author User @relation(fields: [authorId], references: [id]) - authorId Int -} - -model Profile { - id Int @id @default(autoincrement()) - bio String? - user User @relation(fields: [userId], references: [id]) - userId Int @unique -} diff --git a/packages/client/tests/e2e/issues/19866-ts-composite-declaration/readme.md b/packages/client/tests/e2e/issues/19866-ts-composite-declaration/readme.md deleted file mode 100644 index 06c09a215b79..000000000000 --- a/packages/client/tests/e2e/issues/19866-ts-composite-declaration/readme.md +++ /dev/null @@ -1,3 +0,0 @@ -# 19866-ts-composite-declaration - -Regression test for . diff --git a/packages/client/tests/e2e/issues/19866-ts-composite-declaration/src/index.ts b/packages/client/tests/e2e/issues/19866-ts-composite-declaration/src/index.ts deleted file mode 100644 index e0a36ca402b9..000000000000 --- a/packages/client/tests/e2e/issues/19866-ts-composite-declaration/src/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { PrismaClient } from '@prisma/client' - -export function getDbClient() { - const client = new PrismaClient().$extends({}) - - return client -} diff --git a/packages/client/tests/e2e/issues/19866-ts-composite-declaration/tsconfig.json b/packages/client/tests/e2e/issues/19866-ts-composite-declaration/tsconfig.json deleted file mode 100644 index 42a2d3b2f726..000000000000 --- a/packages/client/tests/e2e/issues/19866-ts-composite-declaration/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "declaration": true, - "declarationMap": true - }, - "exclude": ["_steps.ts"] -} diff --git a/packages/client/tests/e2e/issues/studio-1128-spawn-enoent/_steps.ts b/packages/client/tests/e2e/issues/studio-1128-spawn-enoent/_steps.ts deleted file mode 100644 index b3b1c570d1d2..000000000000 --- a/packages/client/tests/e2e/issues/studio-1128-spawn-enoent/_steps.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { $ } from 'zx' - -import { executeSteps } from '../../_utils/executeSteps' - -void executeSteps({ - setup: async () => { - await $`pnpm install` - await $`pnpm exec prisma db push --force-reset` - }, - - test: async () => { - process.env.DEBUG = 'prisma:studio' - const studio = $`pnpm exec prisma studio` - - for await (const output of studio.stderr) { - // Exit as soon as xdg-open subprocess in studio either spawns or reports failure to spawn - if ( - output.includes('requested to open the url http://localhost:5555') || - output.includes('failed to open the url http://localhost:5555 in browser') - ) { - await studio.nothrow().kill() - return - } - } - - await studio - }, - - finish: async () => { - await $`echo "done"` - }, -}) diff --git a/packages/client/tests/e2e/issues/studio-1128-spawn-enoent/package.json b/packages/client/tests/e2e/issues/studio-1128-spawn-enoent/package.json deleted file mode 100644 index 3209fbc47d27..000000000000 --- a/packages/client/tests/e2e/issues/studio-1128-spawn-enoent/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "private": true, - "version": "0.0.0", - "dependencies": { - "@prisma/client": "../../prisma-client-0.0.0.tgz" - }, - "devDependencies": { - "prisma": "../../prisma-0.0.0.tgz" - } -} diff --git a/packages/client/tests/e2e/issues/studio-1128-spawn-enoent/prisma/schema.prisma b/packages/client/tests/e2e/issues/studio-1128-spawn-enoent/prisma/schema.prisma deleted file mode 100644 index 0c24afbac80f..000000000000 --- a/packages/client/tests/e2e/issues/studio-1128-spawn-enoent/prisma/schema.prisma +++ /dev/null @@ -1,13 +0,0 @@ -generator client { - provider = "prisma-client-js" -} - -datasource db { - provider = "sqlite" - url = "file:./dev.db" -} - -model ModelA { - id Int @id @default(autoincrement()) - name String -} diff --git a/packages/client/tests/e2e/issues/studio-1128-spawn-enoent/readme.md b/packages/client/tests/e2e/issues/studio-1128-spawn-enoent/readme.md deleted file mode 100644 index c1eb49527ff4..000000000000 --- a/packages/client/tests/e2e/issues/studio-1128-spawn-enoent/readme.md +++ /dev/null @@ -1,3 +0,0 @@ -# studio-1128-spawn-enoent - -[Studio issue #1128](https://github.com/prisma/studio/issues/1128): `Error: spawn xdg-open ENOENT` when running `prisma studio`. diff --git a/packages/client/tests/e2e/jest.config.js b/packages/client/tests/e2e/jest.config.js index 514e5f5eae5e..9e954104a54d 100644 --- a/packages/client/tests/e2e/jest.config.js +++ b/packages/client/tests/e2e/jest.config.js @@ -4,7 +4,6 @@ module.exports = () => { const configCommon = { rootDir: process.cwd(), testMatch: ['/tests/*.ts'], - testPathIgnorePatterns: ['.*\\.d\\.ts'], transformIgnorePatterns: [], testTimeout: 60_000, } diff --git a/packages/client/tests/e2e/platform-caching-error/tests/vercel-auto-generate.ts b/packages/client/tests/e2e/platform-caching-error/tests/vercel-auto-generate.ts index f57374c228b6..94ff74382ba2 100644 --- a/packages/client/tests/e2e/platform-caching-error/tests/vercel-auto-generate.ts +++ b/packages/client/tests/e2e/platform-caching-error/tests/vercel-auto-generate.ts @@ -12,7 +12,7 @@ test('vercel env var + auto generate', () => { prisma.$connect() } catch (e) { expect(e).toMatchInlineSnapshot(` -[PrismaClientInitializationError: Prisma has detected that this project was built on Vercel, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. +[Error: Prisma has detected that this project was built on Vercel, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. Learn how: https://pris.ly/d/vercel-build] `) diff --git a/packages/client/tests/e2e/publish-extensions/package.json b/packages/client/tests/e2e/publish-extensions/package.json deleted file mode 100644 index ff61e10276e4..000000000000 --- a/packages/client/tests/e2e/publish-extensions/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "private": true, - "version": "0.0.0", - "main": "index.js", - "scripts": {}, - "dependencies": { - "@prisma/client": "../prisma-client-0.0.0.tgz", - "simple-ext": "./simple-ext/simple-ext-0.0.0.tgz" - }, - "devDependencies": { - "@types/jest": "29.5.1", - "@types/node": "16.18.11", - "prisma": "../prisma-0.0.0.tgz" - } -} diff --git a/packages/client/tests/e2e/publish-extensions/pnpm-lock.yaml b/packages/client/tests/e2e/publish-extensions/pnpm-lock.yaml deleted file mode 100644 index 7b75a80e3cfa..000000000000 --- a/packages/client/tests/e2e/publish-extensions/pnpm-lock.yaml +++ /dev/null @@ -1,386 +0,0 @@ -lockfileVersion: 5.4 - -specifiers: - '@prisma/client': ../prisma-client-0.0.0.tgz - '@types/jest': 29.5.1 - '@types/node': 16.18.11 - prisma: ../prisma-0.0.0.tgz - simple-ext: ./simple-ext/simple-ext-0.0.0.tgz - -dependencies: - '@prisma/client': file:../prisma-client-0.0.0.tgz_prisma@0.0.0 - simple-ext: file:simple-ext/simple-ext-0.0.0.tgz_@prisma+client@0.0.0 - -devDependencies: - '@types/jest': 29.5.1 - '@types/node': 16.18.11 - prisma: file:../prisma-0.0.0.tgz - -packages: - - /@babel/code-frame/7.22.5: - resolution: {integrity: sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/highlight': 7.22.5 - dev: true - - /@babel/helper-validator-identifier/7.22.5: - resolution: {integrity: sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==} - engines: {node: '>=6.9.0'} - dev: true - - /@babel/highlight/7.22.5: - resolution: {integrity: sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-validator-identifier': 7.22.5 - chalk: 2.4.2 - js-tokens: 4.0.0 - dev: true - - /@jest/expect-utils/29.5.0: - resolution: {integrity: sha512-fmKzsidoXQT2KwnrwE0SQq3uj8Z763vzR8LnLBwC2qYWEFpjX8daRsk6rHUM1QvNlEW/UJXNXm59ztmJJWs2Mg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - jest-get-type: 29.4.3 - dev: true - - /@jest/schemas/29.4.3: - resolution: {integrity: sha512-VLYKXQmtmuEz6IxJsrZwzG9NvtkQsWNnWMsKxqWNu3+CnfzJQhp0WDDKWLVV9hLKr0l3SLLFRqcYHjhtyuDVxg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@sinclair/typebox': 0.25.24 - dev: true - - /@jest/types/29.5.0: - resolution: {integrity: sha512-qbu7kN6czmVRc3xWFQcAN03RAUamgppVUdXrvl1Wr3jlNF93o9mJbGcDWrwGB6ht44u7efB1qCFgVQmca24Uog==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/schemas': 29.4.3 - '@types/istanbul-lib-coverage': 2.0.4 - '@types/istanbul-reports': 3.0.1 - '@types/node': 16.18.11 - '@types/yargs': 17.0.24 - chalk: 4.1.2 - dev: true - - /@sinclair/typebox/0.25.24: - resolution: {integrity: sha512-XJfwUVUKDHF5ugKwIcxEgc9k8b7HbznCp6eUfWgu710hMPNIO4aw4/zB5RogDQz8nd6gyCDpU9O/m6qYEWY6yQ==} - dev: true - - /@types/istanbul-lib-coverage/2.0.4: - resolution: {integrity: sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==} - dev: true - - /@types/istanbul-lib-report/3.0.0: - resolution: {integrity: sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==} - dependencies: - '@types/istanbul-lib-coverage': 2.0.4 - dev: true - - /@types/istanbul-reports/3.0.1: - resolution: {integrity: sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==} - dependencies: - '@types/istanbul-lib-report': 3.0.0 - dev: true - - /@types/jest/29.5.1: - resolution: {integrity: sha512-tEuVcHrpaixS36w7hpsfLBLpjtMRJUE09/MHXn923LOVojDwyC14cWcfc0rDs0VEfUyYmt/+iX1kxxp+gZMcaQ==} - dependencies: - expect: 29.5.0 - pretty-format: 29.5.0 - dev: true - - /@types/node/16.18.11: - resolution: {integrity: sha512-3oJbGBUWuS6ahSnEq1eN2XrCyf4YsWI8OyCvo7c64zQJNplk3mO84t53o8lfTk+2ji59g5ycfc6qQ3fdHliHuA==} - dev: true - - /@types/stack-utils/2.0.1: - resolution: {integrity: sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==} - dev: true - - /@types/yargs-parser/21.0.0: - resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==} - dev: true - - /@types/yargs/17.0.24: - resolution: {integrity: sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw==} - dependencies: - '@types/yargs-parser': 21.0.0 - dev: true - - /ansi-styles/3.2.1: - resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} - engines: {node: '>=4'} - dependencies: - color-convert: 1.9.3 - dev: true - - /ansi-styles/4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} - dependencies: - color-convert: 2.0.1 - dev: true - - /ansi-styles/5.2.0: - resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} - engines: {node: '>=10'} - dev: true - - /braces/3.0.2: - resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} - engines: {node: '>=8'} - dependencies: - fill-range: 7.0.1 - dev: true - - /chalk/2.4.2: - resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} - engines: {node: '>=4'} - dependencies: - ansi-styles: 3.2.1 - escape-string-regexp: 1.0.5 - supports-color: 5.5.0 - dev: true - - /chalk/4.1.2: - resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} - engines: {node: '>=10'} - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - dev: true - - /ci-info/3.8.0: - resolution: {integrity: sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==} - engines: {node: '>=8'} - dev: true - - /color-convert/1.9.3: - resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} - dependencies: - color-name: 1.1.3 - dev: true - - /color-convert/2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} - dependencies: - color-name: 1.1.4 - dev: true - - /color-name/1.1.3: - resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} - dev: true - - /color-name/1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - dev: true - - /diff-sequences/29.4.3: - resolution: {integrity: sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dev: true - - /escape-string-regexp/1.0.5: - resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} - engines: {node: '>=0.8.0'} - dev: true - - /escape-string-regexp/2.0.0: - resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} - engines: {node: '>=8'} - dev: true - - /expect/29.5.0: - resolution: {integrity: sha512-yM7xqUrCO2JdpFo4XpM82t+PJBFybdqoQuJLDGeDX2ij8NZzqRHyu3Hp188/JX7SWqud+7t4MUdvcgGBICMHZg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/expect-utils': 29.5.0 - jest-get-type: 29.4.3 - jest-matcher-utils: 29.5.0 - jest-message-util: 29.5.0 - jest-util: 29.5.0 - dev: true - - /fill-range/7.0.1: - resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} - engines: {node: '>=8'} - dependencies: - to-regex-range: 5.0.1 - dev: true - - /graceful-fs/4.2.11: - resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - dev: true - - /has-flag/3.0.0: - resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} - engines: {node: '>=4'} - dev: true - - /has-flag/4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} - dev: true - - /is-number/7.0.0: - resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} - engines: {node: '>=0.12.0'} - dev: true - - /jest-diff/29.5.0: - resolution: {integrity: sha512-LtxijLLZBduXnHSniy0WMdaHjmQnt3g5sa16W4p0HqukYTTsyTW3GD1q41TyGl5YFXj/5B2U6dlh5FM1LIMgxw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - chalk: 4.1.2 - diff-sequences: 29.4.3 - jest-get-type: 29.4.3 - pretty-format: 29.5.0 - dev: true - - /jest-get-type/29.4.3: - resolution: {integrity: sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dev: true - - /jest-matcher-utils/29.5.0: - resolution: {integrity: sha512-lecRtgm/rjIK0CQ7LPQwzCs2VwW6WAahA55YBuI+xqmhm7LAaxokSB8C97yJeYyT+HvQkH741StzpU41wohhWw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - chalk: 4.1.2 - jest-diff: 29.5.0 - jest-get-type: 29.4.3 - pretty-format: 29.5.0 - dev: true - - /jest-message-util/29.5.0: - resolution: {integrity: sha512-Kijeg9Dag6CKtIDA7O21zNTACqD5MD/8HfIV8pdD94vFyFuer52SigdC3IQMhab3vACxXMiFk+yMHNdbqtyTGA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@babel/code-frame': 7.22.5 - '@jest/types': 29.5.0 - '@types/stack-utils': 2.0.1 - chalk: 4.1.2 - graceful-fs: 4.2.11 - micromatch: 4.0.5 - pretty-format: 29.5.0 - slash: 3.0.0 - stack-utils: 2.0.6 - dev: true - - /jest-util/29.5.0: - resolution: {integrity: sha512-RYMgG/MTadOr5t8KdhejfvUU82MxsCu5MF6KuDUHl+NuwzUt+Sm6jJWxTJVrDR1j5M/gJVCPKQEpWXY+yIQ6lQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/types': 29.5.0 - '@types/node': 16.18.11 - chalk: 4.1.2 - ci-info: 3.8.0 - graceful-fs: 4.2.11 - picomatch: 2.3.1 - dev: true - - /js-tokens/4.0.0: - resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - dev: true - - /micromatch/4.0.5: - resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} - engines: {node: '>=8.6'} - dependencies: - braces: 3.0.2 - picomatch: 2.3.1 - dev: true - - /picomatch/2.3.1: - resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} - engines: {node: '>=8.6'} - dev: true - - /pretty-format/29.5.0: - resolution: {integrity: sha512-V2mGkI31qdttvTFX7Mt4efOqHXqJWMu4/r66Xh3Z3BwZaPfPJgp6/gbwoujRpPUtfEF6AUUWx3Jim3GCw5g/Qw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/schemas': 29.4.3 - ansi-styles: 5.2.0 - react-is: 18.2.0 - dev: true - - /react-is/18.2.0: - resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} - dev: true - - /slash/3.0.0: - resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} - engines: {node: '>=8'} - dev: true - - /stack-utils/2.0.6: - resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} - engines: {node: '>=10'} - dependencies: - escape-string-regexp: 2.0.0 - dev: true - - /supports-color/5.5.0: - resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} - engines: {node: '>=4'} - dependencies: - has-flag: 3.0.0 - dev: true - - /supports-color/7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} - dependencies: - has-flag: 4.0.0 - dev: true - - /to-regex-range/5.0.1: - resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} - engines: {node: '>=8.0'} - dependencies: - is-number: 7.0.0 - dev: true - - file:../prisma-0.0.0.tgz: - resolution: {integrity: sha512-rccAkx2WA0zv2oBeSomRmYdT5oGkE9rA2NvczAeFxUqfMENeP/ZFiHtccwaTcCcxSF+q8O+sX8Q9ksXCIcH5Vg==, tarball: file:../prisma-0.0.0.tgz} - name: prisma - version: 0.0.0 - engines: {node: '>=14.17'} - hasBin: true - requiresBuild: true - bundledDependencies: - - '@prisma/engines' - - file:../prisma-client-0.0.0.tgz_prisma@0.0.0: - resolution: {integrity: sha512-dEGflcYN9i1kSeDykFQL/hptz2yPkbE1gZ3RdB+zEs05ILRHiMQr6BMXQS6ZQxCF9cfrznEdic+wxtTDkqMF+w==, tarball: file:../prisma-client-0.0.0.tgz} - id: file:../prisma-client-0.0.0.tgz - name: '@prisma/client' - version: 0.0.0 - engines: {node: '>=14.17'} - requiresBuild: true - peerDependencies: - prisma: '*' - peerDependenciesMeta: - prisma: - optional: true - dependencies: - prisma: file:../prisma-0.0.0.tgz - dev: false - bundledDependencies: - - '@prisma/engines-version' - - file:simple-ext/simple-ext-0.0.0.tgz_@prisma+client@0.0.0: - resolution: {integrity: sha512-J4ecnPui8KwWoXEe5f7o0UTcuBtEbTWX24f7sO6U1ei1RMrKUFMSbixP0/KE9Jmbcu+C5pC74lxrxJ2VL7KUfw==, tarball: file:simple-ext/simple-ext-0.0.0.tgz} - id: file:simple-ext/simple-ext-0.0.0.tgz - name: simple-ext - version: 0.0.0 - peerDependencies: - '@prisma/client': ../../prisma-client-0.0.0.tgz - dependencies: - '@prisma/client': file:../prisma-client-0.0.0.tgz_prisma@0.0.0 - dev: false diff --git a/packages/client/tests/e2e/publish-extensions/simple-ext/pnpm-lock.yaml b/packages/client/tests/e2e/publish-extensions/simple-ext/pnpm-lock.yaml deleted file mode 100644 index d59c528985d7..000000000000 --- a/packages/client/tests/e2e/publish-extensions/simple-ext/pnpm-lock.yaml +++ /dev/null @@ -1,48 +0,0 @@ -lockfileVersion: 5.4 - -specifiers: - '@prisma/client': ../../prisma-client-0.0.0.tgz - prisma: ../../prisma-0.0.0.tgz - typescript: 4.9.4 - -devDependencies: - '@prisma/client': file:../../prisma-client-0.0.0.tgz_prisma@0.0.0 - prisma: file:../../prisma-0.0.0.tgz - typescript: 4.9.4 - -packages: - - /typescript/4.9.4: - resolution: {integrity: sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==} - engines: {node: '>=4.2.0'} - hasBin: true - dev: true - - file:../../prisma-0.0.0.tgz: - resolution: {integrity: sha512-rccAkx2WA0zv2oBeSomRmYdT5oGkE9rA2NvczAeFxUqfMENeP/ZFiHtccwaTcCcxSF+q8O+sX8Q9ksXCIcH5Vg==, tarball: file:../../prisma-0.0.0.tgz} - name: prisma - version: 0.0.0 - engines: {node: '>=14.17'} - hasBin: true - requiresBuild: true - dev: true - bundledDependencies: - - '@prisma/engines' - - file:../../prisma-client-0.0.0.tgz_prisma@0.0.0: - resolution: {integrity: sha512-dEGflcYN9i1kSeDykFQL/hptz2yPkbE1gZ3RdB+zEs05ILRHiMQr6BMXQS6ZQxCF9cfrznEdic+wxtTDkqMF+w==, tarball: file:../../prisma-client-0.0.0.tgz} - id: file:../../prisma-client-0.0.0.tgz - name: '@prisma/client' - version: 0.0.0 - engines: {node: '>=14.17'} - requiresBuild: true - peerDependencies: - prisma: '*' - peerDependenciesMeta: - prisma: - optional: true - dependencies: - prisma: file:../../prisma-0.0.0.tgz - dev: true - bundledDependencies: - - '@prisma/engines-version' diff --git a/packages/client/tests/e2e/publish-extensions/tsconfig.json b/packages/client/tests/e2e/publish-extensions/tsconfig.json deleted file mode 100644 index 1d0b21415338..000000000000 --- a/packages/client/tests/e2e/publish-extensions/tsconfig.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "../tsconfig.base.json", - "exclude": ["_steps.ts"] -} diff --git a/packages/client/tests/functional/_utils/setupFilesAfterEnv.ts b/packages/client/tests/functional/_utils/setupFilesAfterEnv.ts index 3932149bc6c0..c4b69f1e6b46 100644 --- a/packages/client/tests/functional/_utils/setupFilesAfterEnv.ts +++ b/packages/client/tests/functional/_utils/setupFilesAfterEnv.ts @@ -59,20 +59,7 @@ function testRepeat(n: number) { return getRepeatProxy(test) } -// allows to .skip.skip.skip... a test -const skip = new Proxy(it.skip, { - get(target, prop) { - if (prop === 'skip') return it.skip - return target[prop] - }, -}) - -globalThis.beforeAll = process.env.TEST_GENERATE_ONLY === 'true' ? () => {} : beforeAll -globalThis.afterAll = process.env.TEST_GENERATE_ONLY === 'true' ? () => {} : afterAll -globalThis.beforeEach = process.env.TEST_GENERATE_ONLY === 'true' ? () => {} : beforeEach -globalThis.afterEach = process.env.TEST_GENERATE_ONLY === 'true' ? () => {} : afterEach -globalThis.test = process.env.TEST_GENERATE_ONLY === 'true' ? skip : test -globalThis.testIf = (condition: boolean) => (condition && process.env.TEST_GENERATE_ONLY !== 'true' ? test : skip) +globalThis.testIf = (condition: boolean) => (condition ? test : test.skip) globalThis.describeIf = (condition: boolean) => (condition ? describe : describe.skip) globalThis.testRepeat = testRepeat diff --git a/packages/client/tests/functional/_utils/setupTestSuiteEnv.ts b/packages/client/tests/functional/_utils/setupTestSuiteEnv.ts index 02e2dd26b27e..4d255db3af45 100644 --- a/packages/client/tests/functional/_utils/setupTestSuiteEnv.ts +++ b/packages/client/tests/functional/_utils/setupTestSuiteEnv.ts @@ -208,7 +208,7 @@ export type DatasourceInfo = { export function setupTestSuiteDbURI(suiteConfig: Record, clientMeta: ClientMeta): DatasourceInfo { const provider = suiteConfig['provider'] as Providers const providerFlavor = suiteConfig['providerFlavor'] as ProviderFlavor | undefined - const dbId = `${faker.string.alphanumeric(5)}-${process.pid}-${Date.now()}` + const dbId = `${faker.random.alphaNumeric(5)}-${process.pid}-${Date.now()}` const { envVarName, newURI } = match(providerFlavor) .with(undefined, () => { diff --git a/packages/client/tests/functional/_utils/setupTestSuiteMatrix.ts b/packages/client/tests/functional/_utils/setupTestSuiteMatrix.ts index 1917a1782fe6..b0bc13dfe6bb 100644 --- a/packages/client/tests/functional/_utils/setupTestSuiteMatrix.ts +++ b/packages/client/tests/functional/_utils/setupTestSuiteMatrix.ts @@ -1,4 +1,3 @@ -import { afterAll, beforeAll, test } from '@jest/globals' import fs from 'fs-extra' import path from 'path' @@ -60,12 +59,6 @@ function setupTestSuiteMatrix( const suiteConfigs = getTestSuiteConfigs(suiteMeta) const testPlan = getTestSuitePlan(suiteMeta, suiteConfigs, clientMeta, options) - if (originalEnv.TEST_GENERATE_ONLY === 'true') { - options = options ?? {} - options.skipDefaultClientInstance = true - options.skipDb = true - } - checkMissingProviders({ suiteConfigs, suiteMeta, @@ -157,13 +150,6 @@ function setupTestSuiteMatrix( return setupTestSuiteDatabase(suiteMeta, suiteConfig, [], options?.alterStatementCallback) } - if (originalEnv.TEST_GENERATE_ONLY === 'true') { - // because we have our own custom `test` global call defined that reacts - // to this env var already, we import the original jest `test` and call - // it because we need to run at least one test to generate the client - test('generate only', () => {}) - } - tests(suiteConfig.matrixOptions, { ...suiteMeta, generatedFolder }, clientMeta, setupDatabase) }) } diff --git a/packages/client/tests/functional/batching/tests.ts b/packages/client/tests/functional/batching/tests.ts index 56690a852731..67f5e571edd4 100644 --- a/packages/client/tests/functional/batching/tests.ts +++ b/packages/client/tests/functional/batching/tests.ts @@ -39,17 +39,6 @@ testMatrix.setupTestSuite( }) }) - test('batches findUniqueOrThrow', async () => { - await Promise.allSettled([ - prisma.user.findUniqueOrThrow({ where: { id: id1 } }), - prisma.user.findUniqueOrThrow({ where: { id: id2 } }), - ]) - - await waitFor(() => { - expect(queriesExecuted).toBe(1) - }) - }) - test('does not batch different models', async () => { await Promise.all([ prisma.user.findUnique({ where: { id: id1 } }), diff --git a/packages/client/tests/functional/blog-update/tests.ts b/packages/client/tests/functional/blog-update/tests.ts index 1625f3f47575..a398a237b3b1 100644 --- a/packages/client/tests/functional/blog-update/tests.ts +++ b/packages/client/tests/functional/blog-update/tests.ts @@ -9,7 +9,7 @@ declare let prisma: PrismaClient testMatrix.setupTestSuite(() => { test('should create a user and update that field on that user', async () => { const email = faker.internet.email() - const name = faker.person.firstName() + const name = faker.name.firstName() const newEmail = faker.internet.email() await prisma.user.create({ @@ -42,7 +42,7 @@ testMatrix.setupTestSuite(() => { test('should create a user and post and connect them together', async () => { const email = faker.internet.email() - const name = faker.person.firstName() + const name = faker.name.firstName() const title = faker.lorem.slug() const published = true @@ -103,7 +103,7 @@ testMatrix.setupTestSuite(() => { test('should create a user and post and disconnect them', async () => { const email = faker.internet.email() - const name = faker.person.firstName() + const name = faker.name.firstName() const title = faker.lorem.slug() const published = true @@ -168,7 +168,7 @@ testMatrix.setupTestSuite(() => { test('should create a user with posts and a profile and update itself and nested connections setting fields to null', async () => { const someDate = new Date('2020-01-01T00:00:00.348Z') const email = faker.internet.email() - const name = faker.person.firstName() + const name = faker.name.firstName() const newEmail = faker.internet.email() const title = faker.lorem.slug() const content = faker.lorem.sentence() diff --git a/packages/client/tests/functional/composites/selection/_matrix.ts b/packages/client/tests/functional/composites/selection/_matrix.ts deleted file mode 100644 index 6ce62561f786..000000000000 --- a/packages/client/tests/functional/composites/selection/_matrix.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { defineMatrix } from '../../_utils/defineMatrix' - -export default defineMatrix(() => [ - [ - { - provider: 'mongodb', - }, - ], -]) diff --git a/packages/client/tests/functional/composites/selection/prisma/_schema.ts b/packages/client/tests/functional/composites/selection/prisma/_schema.ts deleted file mode 100644 index 39462cb3cea8..000000000000 --- a/packages/client/tests/functional/composites/selection/prisma/_schema.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { idForProvider } from '../../../_utils/idForProvider' -import testMatrix from '../_matrix' - -export default testMatrix.setupSchema(({ provider }) => { - return /* Prisma */ ` - generator client { - provider = "prisma-client-js" - } - - datasource db { - provider = "${provider}" - url = env("DATABASE_URI_${provider}") - } - - model User { - id ${idForProvider(provider)} - profile Profile - } - - type Profile { - name Name - alternateName Name? - url String - favoriteThings Thing[] - } - - type Name { - firstName String - lastName String - } - - type Thing { - name String - } - ` -}) diff --git a/packages/client/tests/functional/composites/selection/tests.ts b/packages/client/tests/functional/composites/selection/tests.ts deleted file mode 100644 index ac1d770dd52b..000000000000 --- a/packages/client/tests/functional/composites/selection/tests.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { expectTypeOf } from 'expect-type' - -import testMatrix from './_matrix' -// @ts-ignore -import { PrismaClient, Profile, User } from './node_modules/@prisma/client' - -declare let prisma: PrismaClient - -testMatrix.setupTestSuite( - () => { - beforeAll(async () => { - await prisma.user.create({ - data: { - profile: { - name: { - firstName: 'Horsey', - lastName: 'McHorseFace', - }, - url: 'https://horsey.example.com', - favoriteThings: [{ name: 'Horsing around at the speed of sound' }], - }, - }, - }) - }) - - test('composites are selected by default', async () => { - const user = await prisma.user.findFirstOrThrow() - expect(user).toHaveProperty('profile') - expect(user.profile).toHaveProperty('url') - expect(user.profile).toHaveProperty('name') - expect(user.profile).toHaveProperty('favoriteThings') - - expectTypeOf(user).toHaveProperty('profile') - expectTypeOf(user.profile).toHaveProperty('url') - expectTypeOf(user.profile).toHaveProperty('name') - expectTypeOf(user.profile.name).not.toBeNullable() - expectTypeOf(user.profile).toHaveProperty('alternateName') - expectTypeOf(user.profile.alternateName).toBeNullable() - expectTypeOf(user.profile).toHaveProperty('favoriteThings') - expectTypeOf(user.profile.favoriteThings).toMatchTypeOf>() - }) - - test('composites can be selected explicitly', async () => { - const user = await prisma.user.findFirstOrThrow({ - select: { - profile: true, - }, - }) - expect(user).toHaveProperty('profile') - expect(user.profile).toHaveProperty('url') - expect(user.profile).toHaveProperty('name') - expect(user.profile).toHaveProperty('favoriteThings') - - expectTypeOf(user).toHaveProperty('profile') - expectTypeOf(user.profile).toHaveProperty('url') - expectTypeOf(user.profile).toHaveProperty('name') - expectTypeOf(user.profile.name).not.toBeNullable() - expectTypeOf(user.profile).toHaveProperty('alternateName') - expectTypeOf(user.profile.alternateName).toBeNullable() - expectTypeOf(user.profile).toHaveProperty('favoriteThings') - expectTypeOf(user.profile.favoriteThings).toMatchTypeOf>() - }) - - test('composites can be selected explicitly on multiple nesting levels', async () => { - const user = await prisma.user.findFirstOrThrow({ - select: { - profile: { - select: { - favoriteThings: true, - name: { - select: { - firstName: true, - }, - }, - }, - }, - }, - }) - expect(user).toHaveProperty('profile') - expect(user.profile).not.toHaveProperty('url') - expect(user.profile).toHaveProperty('name') - expect(user.profile.name).toHaveProperty('firstName') - expect(user.profile.name).not.toHaveProperty('lastName') - - expectTypeOf(user).toHaveProperty('profile') - expectTypeOf(user.profile).not.toHaveProperty('url') - expectTypeOf(user.profile).toHaveProperty('name') - expectTypeOf(user.profile.name).toHaveProperty('firstName') - expectTypeOf(user.profile.name).not.toHaveProperty('lastName') - - expectTypeOf(user.profile).toHaveProperty('favoriteThings') - expectTypeOf(user.profile.favoriteThings).toMatchTypeOf>() - }) - - test('composites are included on default types', () => { - expectTypeOf().toHaveProperty('profile') - expectTypeOf().toHaveProperty('name') - expectTypeOf().toHaveProperty('alternateName') - expectTypeOf().toHaveProperty('favoriteThings') - expectTypeOf().toMatchTypeOf>() - }) - }, - { - optOut: { - from: ['sqlite', 'postgresql', 'mysql', 'cockroachdb', 'sqlserver'], - reason: 'composites are mongo-only feature', - }, - }, -) diff --git a/packages/client/tests/functional/decimal/precision/tests.ts b/packages/client/tests/functional/decimal/precision/tests.ts index aa0ecb0af398..dacaf72203db 100644 --- a/packages/client/tests/functional/decimal/precision/tests.ts +++ b/packages/client/tests/functional/decimal/precision/tests.ts @@ -44,8 +44,6 @@ testMatrix.setupTestSuite( 'decimals should not lose precision when written to db', [decimalArbitrary(Number(precision), Number(scale))], async (decimalString) => { - if (process.env.TEST_GENERATE_ONLY === 'true') return - const result = await prisma.testModel.create({ data: { decimal: new Prisma.Decimal(decimalString), diff --git a/packages/client/tests/functional/default-selection/_matrix.ts b/packages/client/tests/functional/default-selection/_matrix.ts index 7f7c55e1b9aa..8f43b12d20b0 100644 --- a/packages/client/tests/functional/default-selection/_matrix.ts +++ b/packages/client/tests/functional/default-selection/_matrix.ts @@ -21,6 +21,4 @@ export default defineMatrix(() => [ provider: 'sqlserver', }, ], - - [{ previewFeatures: '' }, { previewFeatures: '"clientExtensions"' }], ]) diff --git a/packages/client/tests/functional/default-selection/prisma/_schema.ts b/packages/client/tests/functional/default-selection/prisma/_schema.ts index 1ac4dcd1f89b..99d2fba43446 100644 --- a/packages/client/tests/functional/default-selection/prisma/_schema.ts +++ b/packages/client/tests/functional/default-selection/prisma/_schema.ts @@ -1,7 +1,7 @@ import { foreignKeyForProvider, idForProvider } from '../../_utils/idForProvider' import testMatrix from '../_matrix' -export default testMatrix.setupSchema(({ provider, previewFeatures }) => { +export default testMatrix.setupSchema(({ provider }) => { const fields: string[] = [] const declarations: string[] = [] @@ -35,7 +35,6 @@ export default testMatrix.setupSchema(({ provider, previewFeatures }) => { return /* Prisma */ ` generator client { provider = "prisma-client-js" - previewFeatures = [${previewFeatures}] } datasource db { diff --git a/packages/client/tests/functional/extensions/__snapshots__/itx.ts.snap b/packages/client/tests/functional/extensions/__snapshots__/itx.ts.snap deleted file mode 100644 index 0afe377bb820..000000000000 --- a/packages/client/tests/functional/extensions/__snapshots__/itx.ts.snap +++ /dev/null @@ -1,121 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`extensions.itx (provider=cockroachdb) extended client in itx can rollback via custom call 1`] = ` - -Invalid \`prisma.user.create()\` invocation: - - -Unique constraint failed on the fields: (\`email\`) -`; - -exports[`extensions.itx (provider=cockroachdb) extended client in itx can rollback via normal call 1`] = ` - -Invalid \`tx.user.create()\` invocation in -/client/tests/functional/extensions/itx.ts:0:0 - - XX }, - XX }) - XX -→ XX await tx.user.create( -Unique constraint failed on the fields: (\`email\`) -`; - -exports[`extensions.itx (provider=mongodb) extended client in itx can rollback via custom call 1`] = ` - -Invalid \`prisma.user.create()\` invocation: - - -Unique constraint failed on the constraint: \`User_email_key\` -`; - -exports[`extensions.itx (provider=mongodb) extended client in itx can rollback via normal call 1`] = ` - -Invalid \`tx.user.create()\` invocation in -/client/tests/functional/extensions/itx.ts:0:0 - - XX }, - XX }) - XX -→ XX await tx.user.create( -Unique constraint failed on the constraint: \`User_email_key\` -`; - -exports[`extensions.itx (provider=mysql) extended client in itx can rollback via custom call 1`] = ` - -Invalid \`prisma.user.create()\` invocation: - - -Unique constraint failed on the constraint: \`User_email_key\` -`; - -exports[`extensions.itx (provider=mysql) extended client in itx can rollback via normal call 1`] = ` - -Invalid \`tx.user.create()\` invocation in -/client/tests/functional/extensions/itx.ts:0:0 - - XX }, - XX }) - XX -→ XX await tx.user.create( -Unique constraint failed on the constraint: \`User_email_key\` -`; - -exports[`extensions.itx (provider=postgresql) extended client in itx can rollback via custom call 1`] = ` - -Invalid \`prisma.user.create()\` invocation: - - -Unique constraint failed on the fields: (\`email\`) -`; - -exports[`extensions.itx (provider=postgresql) extended client in itx can rollback via normal call 1`] = ` - -Invalid \`tx.user.create()\` invocation in -/client/tests/functional/extensions/itx.ts:0:0 - - XX }, - XX }) - XX -→ XX await tx.user.create( -Unique constraint failed on the fields: (\`email\`) -`; - -exports[`extensions.itx (provider=sqlite) extended client in itx can rollback via custom call 1`] = ` - -Invalid \`prisma.user.create()\` invocation: - - -Unique constraint failed on the fields: (\`email\`) -`; - -exports[`extensions.itx (provider=sqlite) extended client in itx can rollback via normal call 1`] = ` - -Invalid \`tx.user.create()\` invocation in -/client/tests/functional/extensions/itx.ts:0:0 - - XX }, - XX }) - XX -→ XX await tx.user.create( -Unique constraint failed on the fields: (\`email\`) -`; - -exports[`extensions.itx (provider=sqlserver) extended client in itx can rollback via custom call 1`] = ` - -Invalid \`prisma.user.create()\` invocation: - - -Unique constraint failed on the constraint: \`dbo.User\` -`; - -exports[`extensions.itx (provider=sqlserver) extended client in itx can rollback via normal call 1`] = ` - -Invalid \`tx.user.create()\` invocation in -/client/tests/functional/extensions/itx.ts:0:0 - - XX }, - XX }) - XX -→ XX await tx.user.create( -Unique constraint failed on the constraint: \`dbo.User\` -`; diff --git a/packages/client/tests/functional/extensions/_matrix.ts b/packages/client/tests/functional/extensions/_matrix.ts deleted file mode 100644 index 8f43b12d20b0..000000000000 --- a/packages/client/tests/functional/extensions/_matrix.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { defineMatrix } from '../_utils/defineMatrix' - -export default defineMatrix(() => [ - [ - { - provider: 'sqlite', - }, - { - provider: 'postgresql', - }, - { - provider: 'mysql', - }, - { - provider: 'mongodb', - }, - { - provider: 'cockroachdb', - }, - { - provider: 'sqlserver', - }, - ], -]) diff --git a/packages/client/tests/functional/extensions/defineExtension.ts b/packages/client/tests/functional/extensions/defineExtension.ts deleted file mode 100644 index e53c0ee7e130..000000000000 --- a/packages/client/tests/functional/extensions/defineExtension.ts +++ /dev/null @@ -1,667 +0,0 @@ -import { expectTypeOf } from 'expect-type' - -import { Prisma as PrismaDefault } from '../../../extension' -import testMatrix from './_matrix' -// @ts-ignore -import type { Prisma as PrismaNamespace, PrismaClient } from './node_modules/@prisma/client' - -declare let prisma: PrismaClient -declare let Prisma: typeof PrismaNamespace - -expectTypeOf>().toEqualTypeOf>() - -function clientExtensionCallback() { - return Prisma.defineExtension((client) => { - return client.$extends({ - client: { - $myMethod() {}, - }, - }) - }) -} - -function clientExtensionObject() { - return Prisma.defineExtension({ - client: { - $myMethod() {}, - }, - }) -} - -function modelExtensionCallback() { - return Prisma.defineExtension((client) => { - return client.$extends({ - model: { - user: { - myUserMethod() {}, - }, - }, - }) - }) -} - -function modelExtensionObject() { - return Prisma.defineExtension({ - model: { - user: { - myUserMethod() {}, - }, - }, - }) -} - -function resultExtensionCallback() { - return Prisma.defineExtension((client) => { - return client.$extends({ - result: { - user: { - computedField: { - needs: { id: true }, - compute: () => {}, - }, - }, - }, - }) - }) -} - -function resultExtensionObject() { - return Prisma.defineExtension({ - result: { - user: { - computedField: { - needs: { id: true }, - compute: () => {}, - }, - }, - }, - }) -} - -function clientExtensionCallbackViaDefault() { - return PrismaDefault.defineExtension((client) => { - return client.$extends({ - client: { - $myMethodViaDefault() {}, - }, - }) - }) -} - -function clientExtensionObjectViaDefault() { - return PrismaDefault.defineExtension({ - client: { - $myMethodViaDefault() {}, - }, - }) -} - -function modelExtensionCallbackViaDefault() { - return PrismaDefault.defineExtension((client) => { - return client.$extends({ - model: { - user: { - myUserMethodViaDefault() {}, - }, - }, - }) - }) -} - -function modelExtensionObjectViaDefault() { - return PrismaDefault.defineExtension({ - model: { - user: { - myUserMethodViaDefault() {}, - }, - }, - }) -} - -function modelGenericExtensionCallbackViaDefault() { - return PrismaDefault.defineExtension((client) => { - return client.$extends({ - model: { - $allModels: { - myGenericMethodViaDefault(this: T, _args: PrismaDefault.Exact>) { - // eslint-disable-next-line - const ctx = Prisma.getExtensionContext(this) // just for testing that it is exported - - return {} as { - // just for testing the types - args: A - payload: PrismaDefault.Payload - result: PrismaDefault.Result - } - }, - }, - }, - }) - }) -} - -function modelGenericExtensionObjectViaDefault() { - return PrismaDefault.defineExtension({ - model: { - $allModels: { - myGenericMethodViaDefault(this: T, _args: PrismaDefault.Exact>) { - // eslint-disable-next-line - const ctx = Prisma.getExtensionContext(this) // just for testing that it is exported - - return {} as { - // just for testing the types - args: A - payload: PrismaDefault.Payload - result: PrismaDefault.Result - } - }, - }, - }, - }) -} - -function clientGenericExtensionObjectViaDefault() { - return PrismaDefault.defineExtension({ - client: { - myGenericMethodViaDefault( - this: T, - ..._args: PrismaDefault.Exact]> - ) { - // eslint-disable-next-line - const ctx = Prisma.getExtensionContext(this) // just for testing that it is exported - - return {} as { - // just for testing the types - args: A - payload: PrismaDefault.Payload - result: PrismaDefault.Result - } - }, - }, - }) -} - -// this is just actually used for testing that the type work correctly -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function queryGenericExtensionObjectViaDefault() { - return PrismaDefault.defineExtension({ - query: { - // eslint-disable-next-line @typescript-eslint/require-await - async $queryRaw({ args, operation, query, model }) { - expectTypeOf(args).toMatchTypeOf() - expectTypeOf(args['select']).toMatchTypeOf() - expectTypeOf(operation).toEqualTypeOf() - expectTypeOf(query).toMatchTypeOf() - expectTypeOf(model).toEqualTypeOf() - }, - $allModels: { - // eslint-disable-next-line @typescript-eslint/require-await - async findFirst({ args, operation, query, model }) { - expectTypeOf(args).toMatchTypeOf() - expectTypeOf(operation).toEqualTypeOf() - expectTypeOf(query).toMatchTypeOf() - expectTypeOf(model).toEqualTypeOf() - }, - }, - }, - }) -} - -// this is just actually used for testing that the type work correctly -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function itxWithinGenericExtension() { - return PrismaDefault.defineExtension((client) => { - const xclient = client.$extends({ - client: { - helperMethod() {}, - }, - }) - - void xclient.$transaction((tx) => { - expectTypeOf(tx).toHaveProperty('helperMethod') - expectTypeOf(tx).not.toHaveProperty('$transaction') - expectTypeOf(tx).not.toHaveProperty('$extends') - return Promise.resolve() - }) - - return xclient - }) -} - -function resultExtensionCallbackViaDefault() { - return PrismaDefault.defineExtension((client) => { - return client.$extends({ - result: { - user: { - computedFieldViaDefault: { - needs: { id: true }, - compute: () => {}, - }, - }, - }, - }) - }) -} - -function resultExtensionObjectViaDefault() { - return PrismaDefault.defineExtension({ - result: { - user: { - computedFieldViaDefault: { - needs: { id: true }, - compute: () => {}, - }, - }, - }, - }) -} - -// extension that mirrors the types of all existing methods -function allResultsGenericExtensionObjectViaDefault() { - return PrismaDefault.defineExtension({ - client: { - _$executeRaw(this: T, _args: PrismaDefault.Exact>) { - return {} as PrismaDefault.Result - }, - _$executeRawUnsafe(this: T, _args: PrismaDefault.Exact>) { - return {} as PrismaDefault.Result - }, - _$queryRaw(this: T, _args: PrismaDefault.Exact>) { - return {} as PrismaDefault.Result - }, - _$queryRawUnsafe(this: T, _args: PrismaDefault.Exact>) { - return {} as PrismaDefault.Result - }, - _$runCommandRaw(this: T, _args: PrismaDefault.Exact>) { - return {} as PrismaDefault.Result - }, - }, - model: { - $allModels: { - _aggregate(this: T, _args: PrismaDefault.Exact>) { - return {} as PrismaDefault.Result - }, - _aggregateRaw(this: T, _args: PrismaDefault.Exact>) { - return {} as PrismaDefault.Result - }, - _count(this: T, _args: PrismaDefault.Exact>) { - return {} as PrismaDefault.Result - }, - _create(this: T, _args: PrismaDefault.Exact>) { - return {} as PrismaDefault.Result - }, - _createMany(this: T, _args: PrismaDefault.Exact>) { - return {} as PrismaDefault.Result - }, - _delete(this: T, _args: PrismaDefault.Exact>) { - return {} as PrismaDefault.Result - }, - _deleteMany(this: T, _args: PrismaDefault.Exact>) { - return {} as PrismaDefault.Result - }, - _findFirst(this: T, _args: PrismaDefault.Exact>) { - return {} as PrismaDefault.Result - }, - _findFirstOrThrow(this: T, _args: PrismaDefault.Exact>) { - return {} as PrismaDefault.Result - }, - _findMany(this: T, _args: PrismaDefault.Exact>) { - return {} as PrismaDefault.Result - }, - _findRaw(this: T, _args: PrismaDefault.Exact>) { - return {} as PrismaDefault.Result - }, - _findUnique(this: T, _args: PrismaDefault.Exact>) { - return {} as PrismaDefault.Result - }, - _findUniqueOrThrow(this: T, _args: PrismaDefault.Exact>) { - return {} as PrismaDefault.Result - }, - _groupBy(this: T, _args: PrismaDefault.Exact>) { - return {} as PrismaDefault.Result - }, - _update(this: T, _args: PrismaDefault.Exact>) { - return {} as PrismaDefault.Result - }, - _updateMany(this: T, _args: PrismaDefault.Exact>) { - return {} as PrismaDefault.Result - }, - _upsert(this: T, _args: PrismaDefault.Exact>) { - return {} as PrismaDefault.Result - }, - }, - }, - }) -} - -testMatrix.setupTestSuite(() => { - test('client - callback', () => { - const xprisma = prisma.$extends(clientExtensionCallback()) - const xprismaViaDefault = prisma.$extends(clientExtensionCallbackViaDefault()) - expectTypeOf(xprisma).toHaveProperty('$myMethod') - expectTypeOf(xprismaViaDefault).toHaveProperty('$myMethodViaDefault') - }) - - test('client - object', () => { - const xprisma = prisma.$extends(clientExtensionObject()) - const xprismaViaDefault = prisma.$extends(clientExtensionObjectViaDefault()) - expectTypeOf(xprisma).toHaveProperty('$myMethod') - expectTypeOf(xprismaViaDefault).toHaveProperty('$myMethodViaDefault') - }) - - test('model - callback', () => { - const xprisma = prisma.$extends(modelExtensionCallback()) - const xprismaViaDefault = prisma.$extends(modelExtensionCallbackViaDefault()) - expectTypeOf(xprisma.user).toHaveProperty('myUserMethod') - expectTypeOf(xprismaViaDefault.user).toHaveProperty('myUserMethodViaDefault') - }) - - test('model - object', () => { - const xprisma = prisma.$extends(modelExtensionObject()) - const xprismaViaDefault = prisma.$extends(modelExtensionObjectViaDefault()) - expectTypeOf(xprisma.user).toHaveProperty('myUserMethod') - expectTypeOf(xprismaViaDefault.user).toHaveProperty('myUserMethodViaDefault') - }) - - test('result - callback', async () => { - const xprisma = prisma.$extends(resultExtensionCallback()) - const xprismaViaDefault = prisma.$extends(resultExtensionCallbackViaDefault()) - const user = await xprisma.user.findFirst({}) - const userViaDefault = await xprismaViaDefault.user.findFirst({}) - expectTypeOf(user!).toHaveProperty('computedField') - expectTypeOf(userViaDefault!).toHaveProperty('computedFieldViaDefault') - }) - - test('result - object', async () => { - const xprisma = prisma.$extends(resultExtensionObject()) - const xprismaViaDefault = prisma.$extends(resultExtensionObjectViaDefault()) - const user = await xprisma.user.findFirst({}) - const userViaDefault = await xprismaViaDefault.user.findFirst({}) - expectTypeOf(user!).toHaveProperty('computedField') - expectTypeOf(userViaDefault!).toHaveProperty('computedFieldViaDefault') - }) - - test('chained', async () => { - const xprisma = prisma - .$extends(modelExtensionObject()) - .$extends(clientExtensionCallback()) - .$extends(resultExtensionCallback()) - .$extends(modelExtensionObjectViaDefault()) - .$extends(clientExtensionCallbackViaDefault()) - .$extends(resultExtensionCallbackViaDefault()) - - expectTypeOf(xprisma).toHaveProperty('$myMethod') - expectTypeOf(xprisma).toHaveProperty('$myMethodViaDefault') - expectTypeOf(xprisma.user).toHaveProperty('myUserMethod') - expectTypeOf(xprisma.user).toHaveProperty('myUserMethodViaDefault') - const user = await xprisma.user.findFirst({}) - expectTypeOf(user!).toHaveProperty('computedField') - expectTypeOf(user!).toHaveProperty('computedFieldViaDefault') - }) - - test('invalid', () => { - Prisma.defineExtension({ - // @ts-expect-error - notAComponent: {}, - }) - - Prisma.defineExtension({ - model: { - // @ts-expect-error - notAModel: { - myMethod() {}, - }, - }, - }) - - Prisma.defineExtension({ - result: { - // -@ts-expect-error TODO: this should be an error but somehow isn't showing up like eg. `model` - notAModel: { - field: { - needs: { id: true }, - compute: () => {}, - }, - }, - }, - }) - - Prisma.defineExtension({ - result: { - user: { - field: { - needs: { - // @ts-expect-error - notUserField: true, - }, - compute: () => {}, - }, - }, - }, - }) - - Prisma.defineExtension({ - result: { - user: { - field: { - needs: { - id: true, - }, - compute: (user) => { - // @ts-expect-error - return user.bad - }, - }, - }, - }, - }) - - Prisma.defineExtension({ - query: { - // @ts-expect-error - notAModel: { - findFirst() {}, - }, - }, - }) - - Prisma.defineExtension({ - query: { - user: { - // @ts-expect-error - notAnOperation() {}, - }, - }, - }) - }) - - // here we want to check that type utils also work via default - test('generic model - callback via default', () => { - const xprisma = prisma.$extends(modelGenericExtensionCallbackViaDefault()) - expectTypeOf(xprisma.user).toHaveProperty('myGenericMethodViaDefault') - - const data1 = xprisma.user.myGenericMethodViaDefault({ - select: { - email: true, - }, - }) - - const data2 = xprisma.user.myGenericMethodViaDefault({ - select: { - email: true as boolean, - }, - }) - - expectTypeOf<(typeof data1)['args']>().toEqualTypeOf<{ select: { email: true } }>() - expectTypeOf<(typeof data1)['payload']>().toMatchTypeOf() - expectTypeOf<(typeof data1)['payload']['scalars']>().toHaveProperty('email').toEqualTypeOf() - expectTypeOf<(typeof data1)['result'] & {}>().toHaveProperty('email').toEqualTypeOf() - - expectTypeOf<(typeof data2)['args']>().toEqualTypeOf<{ select: { email: boolean } }>() - expectTypeOf<(typeof data2)['payload']>().toMatchTypeOf() - expectTypeOf<(typeof data2)['payload']['scalars']>().toHaveProperty('email').toEqualTypeOf() - expectTypeOf<(typeof data2)['result'] & {}>().toHaveProperty('email').toEqualTypeOf() - }) - - // here we want to check that type utils also work via default - test('generic model - object via default', () => { - const xprisma = prisma.$extends(modelGenericExtensionObjectViaDefault()) - expectTypeOf(xprisma.user).toHaveProperty('myGenericMethodViaDefault') - - const data1 = xprisma.user.myGenericMethodViaDefault({ - select: { - email: true, - }, - }) - - const data2 = xprisma.user.myGenericMethodViaDefault({ - select: { - email: true as boolean, - }, - }) - - expectTypeOf<(typeof data1)['args']>().toEqualTypeOf<{ select: { email: true } }>() - expectTypeOf<(typeof data1)['payload']>().toMatchTypeOf() - expectTypeOf<(typeof data1)['payload']['scalars']>().toHaveProperty('email').toEqualTypeOf() - expectTypeOf<(typeof data1)['result'] & {}>().toHaveProperty('email').toEqualTypeOf() - - expectTypeOf<(typeof data2)['args']>().toEqualTypeOf<{ select: { email: boolean } }>() - expectTypeOf<(typeof data2)['payload']>().toMatchTypeOf() - expectTypeOf<(typeof data2)['payload']['scalars']>().toHaveProperty('email').toEqualTypeOf() - expectTypeOf<(typeof data2)['result'] & {}>().toHaveProperty('email').toEqualTypeOf() - }) - - // here we want to check that type utils also work via default - test('generic client - object via default', () => { - const xprisma = prisma.$extends(clientGenericExtensionObjectViaDefault()) - expectTypeOf(xprisma).toHaveProperty('myGenericMethodViaDefault') - - const data = xprisma.myGenericMethodViaDefault`SELECT * FROM User WHERE id = ${1}` - - expectTypeOf<(typeof data)['args']>().toEqualTypeOf<[TemplateStringsArray, number]>() - expectTypeOf<(typeof data)['payload']>().toEqualTypeOf() - expectTypeOf<(typeof data)['result']>().toEqualTypeOf() - }) - - // here we want to check that type utils are equivalent to real results - test('generic client - generic type utilities', () => { - ;async () => { - const xprisma = prisma.$extends(allResultsGenericExtensionObjectViaDefault()) - - const _aggregate = xprisma.user._aggregate({ _min: { id: true } }) - const aggregate = await xprisma.user.aggregate({ _min: { id: true } }) - expectTypeOf().toEqualTypeOf() - - const _count = xprisma.user._count({}) - const count = await xprisma.user.count({}) - expectTypeOf().toEqualTypeOf() - - const _create = xprisma.user._create({ data: { email: '', firstName: '', lastName: '' } }) - const create = await xprisma.user.create({ data: { email: '', firstName: '', lastName: '' } }) - expectTypeOf().toEqualTypeOf() - - // @ts-test-if: provider !== 'sqlite' - const _createMany = xprisma.user._createMany({ data: [{ email: '', firstName: '', lastName: '' }] }) - // @ts-test-if: provider !== 'sqlite' - const createMany = await xprisma.user.createMany({ data: [{ email: '', firstName: '', lastName: '' }] }) - // @ts-test-if: provider !== 'sqlite' - expectTypeOf().toEqualTypeOf() - - const _delete = xprisma.user._delete({ where: { id: '1' } }) - const deleted = await xprisma.user.delete({ where: { id: '1' } }) - expectTypeOf().toEqualTypeOf() - - const _deleteMany = xprisma.user._deleteMany({ where: { id: '1' } }) - const deleteMany = await xprisma.user.deleteMany({ where: { id: '1' } }) - expectTypeOf().toEqualTypeOf() - - const _findFirst = xprisma.user._findFirst({}) - const findFirst = await xprisma.user.findFirst({}) - expectTypeOf().toEqualTypeOf() - - const _findFirstOrThrow = xprisma.user._findFirstOrThrow({}) - const findFirstOrThrow = await xprisma.user.findFirstOrThrow({}) - expectTypeOf().toEqualTypeOf() - - const _findMany = xprisma.user._findMany({ include: { posts: true } }) - const findMany = await xprisma.user.findMany({ include: { posts: true } }) - expectTypeOf().toEqualTypeOf() - - const _findUnique = xprisma.user._findUnique({ where: { id: '1' } }) - const findUnique = await xprisma.user.findUnique({ where: { id: '1' } }) - expectTypeOf().toEqualTypeOf() - - const _findUniqueOrThrow = xprisma.user._findUniqueOrThrow({ where: { id: '1' } }) - const findUniqueOrThrow = await xprisma.user.findUniqueOrThrow({ where: { id: '1' } }) - expectTypeOf().toEqualTypeOf() - - const _groupBy = xprisma.user._groupBy({ by: ['id'] }) - const groupBy = await xprisma.user.groupBy({ by: ['id'] }) - expectTypeOf().toEqualTypeOf() - - const _update = xprisma.user._update({ where: { id: '1' }, data: { email: '' } }) - const update = await prisma.user.update({ where: { id: '1' }, data: { email: '' } }) - expectTypeOf().toEqualTypeOf() - - const _updateMany = xprisma.user._updateMany({ where: { id: '1' }, data: { email: '' } }) - const updateMany = await prisma.user.updateMany({ where: { id: '1' }, data: { email: '' } }) - expectTypeOf().toEqualTypeOf() - - const _upsert = xprisma.user._upsert({ - where: { id: '1' }, - create: { email: '', firstName: '', lastName: '' }, - update: { email: '' }, - }) - const upsert = await prisma.user.upsert({ - where: { id: '1' }, - create: { email: '', firstName: '', lastName: '' }, - update: { email: '' }, - }) - expectTypeOf().toEqualTypeOf() - - // @ts-test-if: provider === 'mongodb' - const _findRaw = xprisma.user._findRaw({}) - // @ts-test-if: provider === 'mongodb' - const findRaw = await prisma.user.findRaw({}) - // @ts-test-if: provider === 'mongodb' - expectTypeOf().toEqualTypeOf() - - // @ts-test-if: provider === 'mongodb' - const _aggregateRaw = xprisma.user._aggregateRaw({}) - // @ts-test-if: provider === 'mongodb' - const aggregateRaw = await prisma.user.aggregateRaw({}) - // @ts-test-if: provider === 'mongodb' - expectTypeOf().toEqualTypeOf() - - const _runCommandRaw = xprisma._$runCommandRaw({}) - // @ts-test-if: provider === 'mongodb' - const runCommandRaw = await prisma.$runCommandRaw({}) - // @ts-test-if: provider === 'mongodb' - expectTypeOf().toEqualTypeOf() - - const _executeRaw = xprisma._$executeRaw([]) - // @ts-test-if: provider !== 'mongodb' - const executeRaw = await prisma.$executeRaw([] as any as TemplateStringsArray) - // @ts-test-if: provider !== 'mongodb' - expectTypeOf().toEqualTypeOf() - - const _executeRawUnsafe = xprisma._$executeRawUnsafe('') - // @ts-test-if: provider !== 'mongodb' - const executeRawUnsafe = await prisma.$executeRawUnsafe('') - // @ts-test-if: provider !== 'mongodb' - expectTypeOf().toEqualTypeOf() - - const _queryRaw = xprisma._$queryRaw([]) - // @ts-test-if: provider !== 'mongodb' - const queryRaw = await prisma.$queryRaw([] as any as TemplateStringsArray) - // @ts-test-if: provider !== 'mongodb' - expectTypeOf().toEqualTypeOf() - - const _queryRawUnsafe = xprisma._$queryRawUnsafe('') - // @ts-test-if: provider !== 'mongodb' - const queryRawUnsafe = await prisma.$queryRawUnsafe('') - // @ts-test-if: provider !== 'mongodb' - expectTypeOf().toEqualTypeOf() - } - }) -}) diff --git a/packages/client/tests/functional/issues/17405-extensions-casing/_matrix.ts b/packages/client/tests/functional/extensions/disabled/_matrix.ts similarity index 100% rename from packages/client/tests/functional/issues/17405-extensions-casing/_matrix.ts rename to packages/client/tests/functional/extensions/disabled/_matrix.ts diff --git a/packages/client/tests/functional/issues/18854-extensions-db-null/prisma/_schema.ts b/packages/client/tests/functional/extensions/disabled/prisma/_schema.ts similarity index 87% rename from packages/client/tests/functional/issues/18854-extensions-db-null/prisma/_schema.ts rename to packages/client/tests/functional/extensions/disabled/prisma/_schema.ts index 752b28ff2250..c4ce3ca814a9 100644 --- a/packages/client/tests/functional/issues/18854-extensions-db-null/prisma/_schema.ts +++ b/packages/client/tests/functional/extensions/disabled/prisma/_schema.ts @@ -5,7 +5,6 @@ export default testMatrix.setupSchema(({ provider }) => { return /* Prisma */ ` generator client { provider = "prisma-client-js" - previewFeatures = ["clientExtensions"] } datasource db { @@ -15,7 +14,6 @@ export default testMatrix.setupSchema(({ provider }) => { model User { id ${idForProvider(provider)} - json Json? } ` }) diff --git a/packages/client/tests/functional/extensions/disabled/tests.ts b/packages/client/tests/functional/extensions/disabled/tests.ts new file mode 100644 index 000000000000..6c41224e1027 --- /dev/null +++ b/packages/client/tests/functional/extensions/disabled/tests.ts @@ -0,0 +1,16 @@ +import testMatrix from './_matrix' +// @ts-ignore +import type { PrismaClient } from './node_modules/@prisma/client' + +declare let prisma: PrismaClient + +testMatrix.setupTestSuite(() => { + test('attempt to use $extend causes compile and runtime error', () => { + expect(() => { + // @ts-expect-error + prisma.$extends({}) + }).toThrowErrorMatchingInlineSnapshot( + `Extensions are not yet generally available, please add \`clientExtensions\` to the \`previewFeatures\` field in the \`generator\` block in the \`schema.prisma\` file.`, + ) + }) +}) diff --git a/packages/client/tests/functional/extensions/enabled/__snapshots__/itx.ts.snap b/packages/client/tests/functional/extensions/enabled/__snapshots__/itx.ts.snap new file mode 100644 index 000000000000..08f2a8320960 --- /dev/null +++ b/packages/client/tests/functional/extensions/enabled/__snapshots__/itx.ts.snap @@ -0,0 +1,121 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`extensions.enabled.itx (provider=cockroachdb) extended client in itx can rollback via custom call 1`] = ` + +Invalid \`prisma.user.create()\` invocation: + + +Unique constraint failed on the fields: (\`email\`) +`; + +exports[`extensions.enabled.itx (provider=cockroachdb) extended client in itx can rollback via normal call 1`] = ` + +Invalid \`tx.user.create()\` invocation in +/client/tests/functional/extensions/enabled/itx.ts:0:0 + + XX }, + XX }) + XX +→ XX await tx.user.create( +Unique constraint failed on the fields: (\`email\`) +`; + +exports[`extensions.enabled.itx (provider=mongodb) extended client in itx can rollback via custom call 1`] = ` + +Invalid \`prisma.user.create()\` invocation: + + +Unique constraint failed on the constraint: \`User_email_key\` +`; + +exports[`extensions.enabled.itx (provider=mongodb) extended client in itx can rollback via normal call 1`] = ` + +Invalid \`tx.user.create()\` invocation in +/client/tests/functional/extensions/enabled/itx.ts:0:0 + + XX }, + XX }) + XX +→ XX await tx.user.create( +Unique constraint failed on the constraint: \`User_email_key\` +`; + +exports[`extensions.enabled.itx (provider=mysql) extended client in itx can rollback via custom call 1`] = ` + +Invalid \`prisma.user.create()\` invocation: + + +Unique constraint failed on the constraint: \`User_email_key\` +`; + +exports[`extensions.enabled.itx (provider=mysql) extended client in itx can rollback via normal call 1`] = ` + +Invalid \`tx.user.create()\` invocation in +/client/tests/functional/extensions/enabled/itx.ts:0:0 + + XX }, + XX }) + XX +→ XX await tx.user.create( +Unique constraint failed on the constraint: \`User_email_key\` +`; + +exports[`extensions.enabled.itx (provider=postgresql) extended client in itx can rollback via custom call 1`] = ` + +Invalid \`prisma.user.create()\` invocation: + + +Unique constraint failed on the fields: (\`email\`) +`; + +exports[`extensions.enabled.itx (provider=postgresql) extended client in itx can rollback via normal call 1`] = ` + +Invalid \`tx.user.create()\` invocation in +/client/tests/functional/extensions/enabled/itx.ts:0:0 + + XX }, + XX }) + XX +→ XX await tx.user.create( +Unique constraint failed on the fields: (\`email\`) +`; + +exports[`extensions.enabled.itx (provider=sqlite) extended client in itx can rollback via custom call 1`] = ` + +Invalid \`prisma.user.create()\` invocation: + + +Unique constraint failed on the fields: (\`email\`) +`; + +exports[`extensions.enabled.itx (provider=sqlite) extended client in itx can rollback via normal call 1`] = ` + +Invalid \`tx.user.create()\` invocation in +/client/tests/functional/extensions/enabled/itx.ts:0:0 + + XX }, + XX }) + XX +→ XX await tx.user.create( +Unique constraint failed on the fields: (\`email\`) +`; + +exports[`extensions.enabled.itx (provider=sqlserver) extended client in itx can rollback via custom call 1`] = ` + +Invalid \`prisma.user.create()\` invocation: + + +Unique constraint failed on the constraint: \`dbo.User\` +`; + +exports[`extensions.enabled.itx (provider=sqlserver) extended client in itx can rollback via normal call 1`] = ` + +Invalid \`tx.user.create()\` invocation in +/client/tests/functional/extensions/enabled/itx.ts:0:0 + + XX }, + XX }) + XX +→ XX await tx.user.create( +Unique constraint failed on the constraint: \`dbo.User\` +`; diff --git a/packages/client/tests/functional/extensions/__snapshots__/tx.ts.snap b/packages/client/tests/functional/extensions/enabled/__snapshots__/tx.ts.snap similarity index 52% rename from packages/client/tests/functional/extensions/__snapshots__/tx.ts.snap rename to packages/client/tests/functional/extensions/enabled/__snapshots__/tx.ts.snap index 0f749e9dbb0b..bd9bed338fc6 100644 --- a/packages/client/tests/functional/extensions/__snapshots__/tx.ts.snap +++ b/packages/client/tests/functional/extensions/enabled/__snapshots__/tx.ts.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`extensions.tx (provider=cockroachdb) extended client in tx can rollback via custom call 1`] = ` +exports[`extensions.enabled.tx (provider=cockroachdb) extended client in tx can rollback via custom call 1`] = ` Invalid \`prisma.user.create()\` invocation: @@ -8,10 +8,10 @@ Invalid \`prisma.user.create()\` invocation: Unique constraint failed on the fields: (\`email\`) `; -exports[`extensions.tx (provider=cockroachdb) extended client in tx can rollback via normal call 1`] = ` +exports[`extensions.enabled.tx (provider=cockroachdb) extended client in tx can rollback via normal call 1`] = ` Invalid \`xprisma.user.create()\` invocation in -/client/tests/functional/extensions/tx.ts:0:0 +/client/tests/functional/extensions/enabled/tx.ts:0:0 XX lastName: 'Smith', XX }, @@ -20,7 +20,7 @@ Invalid \`xprisma.user.create()\` invocation in Unique constraint failed on the fields: (\`email\`) `; -exports[`extensions.tx (provider=mongodb) extended client in tx can rollback via custom call 1`] = ` +exports[`extensions.enabled.tx (provider=mongodb) extended client in tx can rollback via custom call 1`] = ` Invalid \`prisma.user.create()\` invocation: @@ -28,10 +28,10 @@ Invalid \`prisma.user.create()\` invocation: Unique constraint failed on the constraint: \`User_email_key\` `; -exports[`extensions.tx (provider=mongodb) extended client in tx can rollback via normal call 1`] = ` +exports[`extensions.enabled.tx (provider=mongodb) extended client in tx can rollback via normal call 1`] = ` Invalid \`xprisma.user.create()\` invocation in -/client/tests/functional/extensions/tx.ts:0:0 +/client/tests/functional/extensions/enabled/tx.ts:0:0 XX lastName: 'Smith', XX }, @@ -40,7 +40,7 @@ Invalid \`xprisma.user.create()\` invocation in Unique constraint failed on the constraint: \`User_email_key\` `; -exports[`extensions.tx (provider=mysql) extended client in tx can rollback via custom call 1`] = ` +exports[`extensions.enabled.tx (provider=mysql) extended client in tx can rollback via custom call 1`] = ` Invalid \`prisma.user.create()\` invocation: @@ -48,10 +48,10 @@ Invalid \`prisma.user.create()\` invocation: Unique constraint failed on the constraint: \`User_email_key\` `; -exports[`extensions.tx (provider=mysql) extended client in tx can rollback via normal call 1`] = ` +exports[`extensions.enabled.tx (provider=mysql) extended client in tx can rollback via normal call 1`] = ` Invalid \`xprisma.user.create()\` invocation in -/client/tests/functional/extensions/tx.ts:0:0 +/client/tests/functional/extensions/enabled/tx.ts:0:0 XX lastName: 'Smith', XX }, @@ -60,7 +60,7 @@ Invalid \`xprisma.user.create()\` invocation in Unique constraint failed on the constraint: \`User_email_key\` `; -exports[`extensions.tx (provider=postgresql) extended client in tx can rollback via custom call 1`] = ` +exports[`extensions.enabled.tx (provider=postgresql) extended client in tx can rollback via custom call 1`] = ` Invalid \`prisma.user.create()\` invocation: @@ -68,10 +68,10 @@ Invalid \`prisma.user.create()\` invocation: Unique constraint failed on the fields: (\`email\`) `; -exports[`extensions.tx (provider=postgresql) extended client in tx can rollback via normal call 1`] = ` +exports[`extensions.enabled.tx (provider=postgresql) extended client in tx can rollback via normal call 1`] = ` Invalid \`xprisma.user.create()\` invocation in -/client/tests/functional/extensions/tx.ts:0:0 +/client/tests/functional/extensions/enabled/tx.ts:0:0 XX lastName: 'Smith', XX }, @@ -80,7 +80,7 @@ Invalid \`xprisma.user.create()\` invocation in Unique constraint failed on the fields: (\`email\`) `; -exports[`extensions.tx (provider=sqlite) extended client in tx can rollback via custom call 1`] = ` +exports[`extensions.enabled.tx (provider=sqlite) extended client in tx can rollback via custom call 1`] = ` Invalid \`prisma.user.create()\` invocation: @@ -88,10 +88,10 @@ Invalid \`prisma.user.create()\` invocation: Unique constraint failed on the fields: (\`email\`) `; -exports[`extensions.tx (provider=sqlite) extended client in tx can rollback via normal call 1`] = ` +exports[`extensions.enabled.tx (provider=sqlite) extended client in tx can rollback via normal call 1`] = ` Invalid \`xprisma.user.create()\` invocation in -/client/tests/functional/extensions/tx.ts:0:0 +/client/tests/functional/extensions/enabled/tx.ts:0:0 XX lastName: 'Smith', XX }, @@ -100,7 +100,7 @@ Invalid \`xprisma.user.create()\` invocation in Unique constraint failed on the fields: (\`email\`) `; -exports[`extensions.tx (provider=sqlserver) extended client in tx can rollback via custom call 1`] = ` +exports[`extensions.enabled.tx (provider=sqlserver) extended client in tx can rollback via custom call 1`] = ` Invalid \`prisma.user.create()\` invocation: @@ -108,10 +108,10 @@ Invalid \`prisma.user.create()\` invocation: Unique constraint failed on the constraint: \`dbo.User\` `; -exports[`extensions.tx (provider=sqlserver) extended client in tx can rollback via normal call 1`] = ` +exports[`extensions.enabled.tx (provider=sqlserver) extended client in tx can rollback via normal call 1`] = ` Invalid \`xprisma.user.create()\` invocation in -/client/tests/functional/extensions/tx.ts:0:0 +/client/tests/functional/extensions/enabled/tx.ts:0:0 XX lastName: 'Smith', XX }, diff --git a/packages/client/tests/functional/issues/17948-tx-client-extensions/_matrix.ts b/packages/client/tests/functional/extensions/enabled/_matrix.ts similarity index 100% rename from packages/client/tests/functional/issues/17948-tx-client-extensions/_matrix.ts rename to packages/client/tests/functional/extensions/enabled/_matrix.ts diff --git a/packages/client/tests/functional/extensions/client.ts b/packages/client/tests/functional/extensions/enabled/client.ts similarity index 66% rename from packages/client/tests/functional/extensions/client.ts rename to packages/client/tests/functional/extensions/enabled/client.ts index 741664c112c9..0842ed48611b 100644 --- a/packages/client/tests/functional/extensions/client.ts +++ b/packages/client/tests/functional/extensions/enabled/client.ts @@ -106,45 +106,21 @@ testMatrix.setupTestSuite(() => { expect(override).toHaveBeenCalled() }) - test('allows to override builtin methods', () => { + test('allows to override builtin methods', async () => { const transactionOverride = jest.fn() - const queryRawOverride = jest.fn() const xprisma = prisma.$extends({ - client: { - $transaction() { - transactionOverride() - - return undefined - }, - $queryRaw() { - queryRawOverride() - - return undefined - }, - }, + client: { $transaction: transactionOverride }, }) - const dataTransaction = xprisma.$transaction() - const dataQueryRaw = xprisma.$queryRaw() - - // @ts-expect-error - void xprisma.$transaction([]) - // @ts-expect-error - void xprisma.$queryRaw('') - - expect(dataTransaction).toBeUndefined() - expect(dataQueryRaw).toBeUndefined() - - expectTypeOf(dataTransaction).toEqualTypeOf() - expectTypeOf(dataQueryRaw).toEqualTypeOf() + await xprisma.$transaction() expect(transactionOverride).toHaveBeenCalled() - expect(queryRawOverride).toHaveBeenCalled() }) test('allows to call builtin methods from extensions', async () => { const xprisma = prisma.$extends({ client: { + // TODO: remove any once types are generated $myTransaction(this: any, ...args: any[]) { return this.$transaction(args) }, @@ -213,16 +189,13 @@ testMatrix.setupTestSuite(() => { expect(results).toEqual([]) }) - test('accepts property definition', () => { - const xprisma = prisma.$extends({ + test('only accepts methods', () => { + prisma.$extends({ client: { - property: 1, + // @ts-expect-error + badInput: 1, }, }) - - xprisma.property - expect(xprisma).toHaveProperty('property', 1) - expectTypeOf(xprisma).toHaveProperty('property').toEqualTypeOf() }) test('error in extension method', () => { @@ -275,64 +248,7 @@ testMatrix.setupTestSuite(() => { }, }) + // @ts-test-if: provider !== 'mongodb' xprisma.$executeRawCustom(Prisma.sql`SELECT * FROM User`, { extra: true }) }) - - test('raw queries can override their default output types', () => { - ;async () => { - const xprisma = prisma.$extends({}) - - const typeDataSql = await xprisma.$transaction([ - // @ts-test-if: provider !== 'mongodb' - xprisma.$executeRaw<1>(Prisma.sql`...`), - // @ts-test-if: provider !== 'mongodb' - xprisma.$executeRaw<2>`...`, - // @ts-test-if: provider !== 'mongodb' - xprisma.$executeRawUnsafe<3>('...'), - // @ts-test-if: provider !== 'mongodb' - xprisma.$queryRaw<4>(Prisma.sql`...`), - // @ts-test-if: provider !== 'mongodb' - xprisma.$queryRaw<5>`...`, - // @ts-test-if: provider !== 'mongodb' - xprisma.$queryRawUnsafe<6>('...'), - ]) - - // @ts-test-if: provider !== 'mongodb' - expectTypeOf(typeDataSql).toEqualTypeOf<[1, 2, 3, 4, 5, 6]>() - - const defaultDataSql = await xprisma.$transaction([ - // @ts-test-if: provider !== 'mongodb' - xprisma.$executeRaw(Prisma.sql`...`), - // @ts-test-if: provider !== 'mongodb' - xprisma.$executeRaw`...`, - // @ts-test-if: provider !== 'mongodb' - xprisma.$executeRawUnsafe('...'), - // @ts-test-if: provider !== 'mongodb' - xprisma.$queryRaw(Prisma.sql`...`), - // @ts-test-if: provider !== 'mongodb' - xprisma.$queryRaw`...`, - // @ts-test-if: provider !== 'mongodb' - xprisma.$queryRawUnsafe('...'), - ]) - - // @ts-test-if: provider !== 'mongodb' - expectTypeOf(defaultDataSql).toEqualTypeOf<[number, number, number, unknown, unknown, unknown]>() - - const typeDataMongo = await xprisma.$transaction([ - // @ts-test-if: provider === 'mongodb' - xprisma.$runCommandRaw<1>({ value: '...' }), - ]) - - // @ts-test-if: provider === 'mongodb' - expectTypeOf(typeDataMongo).toEqualTypeOf<[1]>() - - const defaultDataMongo = await xprisma.$transaction([ - // @ts-test-if: provider === 'mongodb' - xprisma.$runCommandRaw({ value: '...' }), - ]) - - // @ts-test-if: provider === 'mongodb' - expectTypeOf(defaultDataMongo).toEqualTypeOf<[PrismaNamespace.JsonObject]>() - } - }) }) diff --git a/packages/client/tests/functional/extensions/enabled/defineExtension.ts b/packages/client/tests/functional/extensions/enabled/defineExtension.ts new file mode 100644 index 000000000000..73a2d6bcdef1 --- /dev/null +++ b/packages/client/tests/functional/extensions/enabled/defineExtension.ts @@ -0,0 +1,400 @@ +import { expectTypeOf } from 'expect-type' + +import { Prisma as PrismaDefault } from '../../../../scripts/default-index' +import testMatrix from './_matrix' +// @ts-ignore +import type { Prisma as PrismaNamespace, PrismaClient } from './node_modules/@prisma/client' + +declare let prisma: PrismaClient +declare let Prisma: typeof PrismaNamespace + +expectTypeOf>().toEqualTypeOf>() + +function clientExtensionCallback() { + return Prisma.defineExtension((client) => { + return client.$extends({ + client: { + $myMethod() {}, + }, + }) + }) +} + +function clientExtensionObject() { + return Prisma.defineExtension({ + client: { + $myMethod() {}, + }, + }) +} + +function modelExtensionCallback() { + return Prisma.defineExtension((client) => { + return client.$extends({ + model: { + user: { + myUserMethod() {}, + }, + }, + }) + }) +} + +function modelExtensionObject() { + return Prisma.defineExtension({ + model: { + user: { + myUserMethod() {}, + }, + }, + }) +} + +function resultExtensionCallback() { + return Prisma.defineExtension((client) => { + return client.$extends({ + result: { + user: { + computedField: { + needs: { id: true }, + compute: () => {}, + }, + }, + }, + }) + }) +} + +function resultExtensionObject() { + return Prisma.defineExtension({ + result: { + user: { + computedField: { + needs: { id: true }, + compute: () => {}, + }, + }, + }, + }) +} + +function clientExtensionCallbackViaDefault() { + return PrismaDefault.defineExtension((client) => { + return client.$extends({ + client: { + $myMethodViaDefault() {}, + }, + }) + }) +} + +function clientExtensionObjectViaDefault() { + return PrismaDefault.defineExtension({ + client: { + $myMethodViaDefault() {}, + }, + }) +} + +function modelExtensionCallbackViaDefault() { + return PrismaDefault.defineExtension((client) => { + return client.$extends({ + model: { + user: { + myUserMethodViaDefault() {}, + }, + }, + }) + }) +} + +function modelExtensionObjectViaDefault() { + return PrismaDefault.defineExtension({ + model: { + user: { + myUserMethodViaDefault() {}, + }, + }, + }) +} + +function modelGenericExtensionCallbackViaDefault() { + return PrismaDefault.defineExtension((client) => { + return client.$extends({ + model: { + $allModels: { + myGenericMethodViaDefault(this: T, _args: PrismaDefault.Exact>) { + // eslint-disable-next-line + const ctx = Prisma.getExtensionContext(this) // just for testing that it is exported + + return {} as { + // just for testing the types + args: A + payload: PrismaDefault.Payload + result: PrismaDefault.Result + } + }, + }, + }, + }) + }) +} + +function modelGenericExtensionObjectViaDefault() { + return PrismaDefault.defineExtension({ + model: { + $allModels: { + myGenericMethodViaDefault(this: T, _args: PrismaDefault.Exact>) { + // eslint-disable-next-line + const ctx = Prisma.getExtensionContext(this) // just for testing that it is exported + + return {} as { + // just for testing the types + args: A + payload: PrismaDefault.Payload + result: PrismaDefault.Result + } + }, + }, + }, + }) +} + +function clientGenericExtensionObjectViaDefault() { + return PrismaDefault.defineExtension({ + client: { + myGenericMethodViaDefault( + this: T, + ..._args: PrismaDefault.Exact]> + ) { + // eslint-disable-next-line + const ctx = Prisma.getExtensionContext(this) // just for testing that it is exported + + return {} as { + // just for testing the types + args: A + payload: PrismaDefault.Payload + result: PrismaDefault.Result + } + }, + }, + }) +} + +function resultExtensionCallbackViaDefault() { + return PrismaDefault.defineExtension((client) => { + return client.$extends({ + result: { + user: { + computedFieldViaDefault: { + needs: { id: true }, + compute: () => {}, + }, + }, + }, + }) + }) +} + +function resultExtensionObjectViaDefault() { + return PrismaDefault.defineExtension({ + result: { + user: { + computedFieldViaDefault: { + needs: { id: true }, + compute: () => {}, + }, + }, + }, + }) +} + +testMatrix.setupTestSuite(() => { + test('client - callback', () => { + const xprisma = prisma.$extends(clientExtensionCallback()) + const xprismaViaDefault = prisma.$extends(clientExtensionCallbackViaDefault()) + expectTypeOf(xprisma).toHaveProperty('$myMethod') + expectTypeOf(xprismaViaDefault).toHaveProperty('$myMethodViaDefault') + }) + + test('client - object', () => { + const xprisma = prisma.$extends(clientExtensionObject()) + const xprismaViaDefault = prisma.$extends(clientExtensionObjectViaDefault()) + expectTypeOf(xprisma).toHaveProperty('$myMethod') + expectTypeOf(xprismaViaDefault).toHaveProperty('$myMethodViaDefault') + }) + + test('model - callback', () => { + const xprisma = prisma.$extends(modelExtensionCallback()) + const xprismaViaDefault = prisma.$extends(modelExtensionCallbackViaDefault()) + expectTypeOf(xprisma.user).toHaveProperty('myUserMethod') + expectTypeOf(xprismaViaDefault.user).toHaveProperty('myUserMethodViaDefault') + }) + + test('model - object', () => { + const xprisma = prisma.$extends(modelExtensionObject()) + const xprismaViaDefault = prisma.$extends(modelExtensionObjectViaDefault()) + expectTypeOf(xprisma.user).toHaveProperty('myUserMethod') + expectTypeOf(xprismaViaDefault.user).toHaveProperty('myUserMethodViaDefault') + }) + + test('result - callback', async () => { + const xprisma = prisma.$extends(resultExtensionCallback()) + const xprismaViaDefault = prisma.$extends(resultExtensionCallbackViaDefault()) + const user = await xprisma.user.findFirst({}) + const userViaDefault = await xprismaViaDefault.user.findFirst({}) + expectTypeOf(user!).toHaveProperty('computedField') + expectTypeOf(userViaDefault!).toHaveProperty('computedFieldViaDefault') + }) + + test('result - object', async () => { + const xprisma = prisma.$extends(resultExtensionObject()) + const xprismaViaDefault = prisma.$extends(resultExtensionObjectViaDefault()) + const user = await xprisma.user.findFirst({}) + const userViaDefault = await xprismaViaDefault.user.findFirst({}) + expectTypeOf(user!).toHaveProperty('computedField') + expectTypeOf(userViaDefault!).toHaveProperty('computedFieldViaDefault') + }) + + test('chained', async () => { + const xprisma = prisma + .$extends(modelExtensionObject()) + .$extends(clientExtensionCallback()) + .$extends(resultExtensionCallback()) + .$extends(modelExtensionObjectViaDefault()) + .$extends(clientExtensionCallbackViaDefault()) + .$extends(resultExtensionCallbackViaDefault()) + + expectTypeOf(xprisma).toHaveProperty('$myMethod') + expectTypeOf(xprisma).toHaveProperty('$myMethodViaDefault') + expectTypeOf(xprisma.user).toHaveProperty('myUserMethod') + expectTypeOf(xprisma.user).toHaveProperty('myUserMethodViaDefault') + const user = await xprisma.user.findFirst({}) + expectTypeOf(user!).toHaveProperty('computedField') + expectTypeOf(user!).toHaveProperty('computedFieldViaDefault') + }) + + test('invalid', () => { + Prisma.defineExtension({ + // @ts-expect-error + notAComponent: {}, + }) + + Prisma.defineExtension({ + model: { + // @ts-expect-error + notAModel: { + myMethod() {}, + }, + }, + }) + + Prisma.defineExtension({ + result: { + // -@ts-expect-error TODO: this should be an error but somehow isn't showing up like eg. `model` + notAModel: { + field: { + needs: { id: true }, + compute: () => {}, + }, + }, + }, + }) + + Prisma.defineExtension({ + result: { + user: { + field: { + needs: { + // @ts-expect-error + notUserField: true, + }, + compute: () => {}, + }, + }, + }, + }) + + Prisma.defineExtension({ + result: { + user: { + field: { + needs: { + id: true, + }, + compute: (user) => { + // @ts-expect-error + return user.bad + }, + }, + }, + }, + }) + + Prisma.defineExtension({ + query: { + // @ts-expect-error + notAModel: { + findFirst() {}, + }, + }, + }) + + Prisma.defineExtension({ + query: { + user: { + // @ts-expect-error + notAnOperation() {}, + }, + }, + }) + }) + + // here we want to check that type utils also work via default + test('generic model - callback via default', () => { + const xprisma = prisma.$extends(modelGenericExtensionCallbackViaDefault()) + expectTypeOf(xprisma.user).toHaveProperty('myGenericMethodViaDefault') + + const data = xprisma.user.myGenericMethodViaDefault({ + select: { + email: true, + }, + }) + + expectTypeOf<(typeof data)['args']>().toEqualTypeOf<{ select: { email: true } }>() + expectTypeOf<(typeof data)['payload']>().toMatchTypeOf() + expectTypeOf<(typeof data)['payload']['scalars']>().toHaveProperty('email').toEqualTypeOf() + expectTypeOf<(typeof data)['result']>().toHaveProperty('email').toEqualTypeOf() + }) + + // here we want to check that type utils also work via default + test('generic model - object via default', () => { + const xprisma = prisma.$extends(modelGenericExtensionObjectViaDefault()) + expectTypeOf(xprisma.user).toHaveProperty('myGenericMethodViaDefault') + + const data = xprisma.user.myGenericMethodViaDefault({ + select: { + email: true, + }, + }) + + expectTypeOf<(typeof data)['args']>().toEqualTypeOf<{ select: { email: true } }>() + expectTypeOf<(typeof data)['payload']>().toMatchTypeOf() + expectTypeOf<(typeof data)['payload']['scalars']>().toHaveProperty('email').toEqualTypeOf() + expectTypeOf<(typeof data)['result']>().toHaveProperty('email').toEqualTypeOf() + }) + + // here we want to check that type utils also work via default + test('generic client - object via default', () => { + const xprisma = prisma.$extends(clientGenericExtensionObjectViaDefault()) + expectTypeOf(xprisma).toHaveProperty('myGenericMethodViaDefault') + + const data = xprisma.myGenericMethodViaDefault`SELECT * FROM User WHERE id = ${1}` + + expectTypeOf<(typeof data)['args']>().toEqualTypeOf<[TemplateStringsArray, number]>() + // @ts-test-if: provider !== 'mongodb' + expectTypeOf<(typeof data)['payload']>().toEqualTypeOf() + // @ts-test-if: provider !== 'mongodb' + expectTypeOf<(typeof data)['result']>().toEqualTypeOf() + }) +}) diff --git a/packages/client/tests/functional/extensions/extends.ts b/packages/client/tests/functional/extensions/enabled/extends.ts similarity index 82% rename from packages/client/tests/functional/extensions/extends.ts rename to packages/client/tests/functional/extensions/enabled/extends.ts index 512d0bc09d57..b96b84cbd35b 100644 --- a/packages/client/tests/functional/extensions/extends.ts +++ b/packages/client/tests/functional/extensions/enabled/extends.ts @@ -12,11 +12,6 @@ testMatrix.setupTestSuite(() => { expect(xprisma).not.toBe(prisma) expectTypeOf(xprisma).not.toHaveProperty('$use') - expectTypeOf(xprisma).not.toHaveProperty('$on') - - expect(xprisma['$use']).toBeUndefined() - expect(xprisma['$on']).toBeUndefined() - expect(await xprisma.user.findMany()).toEqual([]) }) diff --git a/packages/client/tests/functional/extensions/itx.ts b/packages/client/tests/functional/extensions/enabled/itx.ts similarity index 57% rename from packages/client/tests/functional/extensions/itx.ts rename to packages/client/tests/functional/extensions/enabled/itx.ts index 2283ea6b7178..c7e95c51030f 100644 --- a/packages/client/tests/functional/extensions/itx.ts +++ b/packages/client/tests/functional/extensions/enabled/itx.ts @@ -3,14 +3,13 @@ import { expectTypeOf } from 'expect-type' import testMatrix from './_matrix' // @ts-ignore -import type { Prisma as PrismaNamespace, PrismaClient } from './node_modules/@prisma/client' +import type { PrismaClient } from './node_modules/@prisma/client' declare let prisma: PrismaClient -declare let Prisma: typeof PrismaNamespace const email = faker.internet.email() -testMatrix.setupTestSuite(({ provider }, _, clientMeta) => { +testMatrix.setupTestSuite((_0, _1, clientMeta) => { beforeEach(async () => { await prisma.post.deleteMany() await prisma.user.deleteMany() @@ -210,130 +209,4 @@ testMatrix.setupTestSuite(({ provider }, _, clientMeta) => { expect(users).toHaveLength(1) }) - - testIf(provider !== 'mongodb')('itx works with extended client + queryRawUnsafe', async () => { - const xprisma = prisma.$extends({}) - - await expect( - xprisma.$transaction((tx) => { - // @ts-test-if: provider !== 'mongodb' - return tx.$queryRawUnsafe('SELECT 1') - }), - ).resolves.not.toThrow() - }) - - test('middleware exclude from transaction also works with extended client', async () => { - const xprisma = prisma.$extends({}) - - prisma.$use((params, next) => { - return next({ ...params, runInTransaction: false }) - }) - - const usersBefore = await xprisma.user.findMany() - - await xprisma - .$transaction(async (prisma) => { - await prisma.user.create({ - data: { - email: 'jane@smith.com', - firstName: 'Jane', - lastName: 'Smith', - }, - }) - - await prisma.user.create({ - data: { - email: 'jane@smith.com', - firstName: 'Jane', - lastName: 'Smith', - }, - }) - }) - .catch(() => {}) - - const usersAfter = await xprisma.user.findMany() - - expect(usersAfter).toHaveLength(usersBefore.length + 1) - }) - - test('client component is available within itx callback', async () => { - const helper = jest.fn() - const xprisma = prisma.$extends({ - client: { - helper, - }, - }) - - await xprisma.$transaction((tx) => { - tx.helper() - return Promise.resolve() - }) - - expect(helper).toHaveBeenCalled() - }) - - test('methods from itx client denylist are optional within client extensions', async () => { - expect.assertions(12) - - const xprisma = prisma.$extends({ - client: { - testContextMethods(isTransaction: boolean) { - const ctx = Prisma.getExtensionContext(this) - - expectTypeOf(ctx.$connect).toEqualTypeOf() - expectTypeOf(ctx.$disconnect).toEqualTypeOf() - expectTypeOf(ctx.$transaction).toMatchTypeOf() - expectTypeOf(ctx.$extends).toEqualTypeOf() - expectTypeOf(ctx).not.toHaveProperty('$use') - expectTypeOf(ctx).not.toHaveProperty('$on') - - expect(ctx['$use']).toBeUndefined() - expect(ctx['$on']).toBeUndefined() - - if (isTransaction) { - expect(ctx.$connect).toBeUndefined() - expect(ctx.$disconnect).toBeUndefined() - expect(ctx.$transaction).toBeUndefined() - expect(ctx.$extends).toBeUndefined() - } else { - expect(ctx.$connect).toBeDefined() - expect(ctx.$disconnect).toBeDefined() - expect(ctx.$transaction).toBeDefined() - expect(ctx.$extends).toBeDefined() - } - }, - }, - model: { - user: { - helper() {}, - }, - }, - }) - - xprisma.testContextMethods(false) - - await xprisma.$transaction((tx) => { - tx.testContextMethods(true) - return Promise.resolve() - }) - }) - - test('isolation level is properly reflected in extended client', () => { - ;async () => { - const xprisma = prisma.$extends({}) - - // @ts-test-if: provider !== 'mongodb' - const data = await xprisma.$transaction( - () => { - return Promise.resolve(42) - }, - { - isolationLevel: 'Serializable', - }, - ) - - // @ts-test-if: provider !== 'mongodb' - expectTypeOf(data).toEqualTypeOf() - } - }) }) diff --git a/packages/client/tests/functional/extensions/model.ts b/packages/client/tests/functional/extensions/enabled/model.ts similarity index 96% rename from packages/client/tests/functional/extensions/model.ts rename to packages/client/tests/functional/extensions/enabled/model.ts index ed82a9b7aeee..09304a17c300 100644 --- a/packages/client/tests/functional/extensions/model.ts +++ b/packages/client/tests/functional/extensions/enabled/model.ts @@ -1,8 +1,8 @@ import { getQueryEngineProtocol } from '@prisma/internals' import { expectTypeOf } from 'expect-type' -import { waitFor } from '../_utils/tests/waitFor' -import { NewPrismaClient } from '../_utils/types' +import { waitFor } from '../../_utils/tests/waitFor' +import { NewPrismaClient } from '../../_utils/types' import testMatrix from './_matrix' // @ts-ignore import type { Prisma as PrismaNamespace, PrismaClient } from './node_modules/@prisma/client' @@ -127,26 +127,18 @@ testMatrix.setupTestSuite( expect(firstMethod).not.toHaveBeenCalled() }) - test('allows to override built-in methods', () => { + test('allows to override built-in methods', async () => { const extMethod = jest.fn() const xprisma = prisma.$extends({ model: { user: { - findFirst() { - extMethod() - - return undefined - }, + findFirst: extMethod, }, }, }) - const findFirstData = xprisma.user.findFirst() - // @ts-expect-error - void xprisma.user.findFirst({}) + await xprisma.user.findFirst({}) - expect(findFirstData).toBeUndefined() - expectTypeOf(findFirstData).toEqualTypeOf() expect(extMethod).toHaveBeenCalled() }) @@ -263,8 +255,8 @@ testMatrix.setupTestSuite( test('only accepts methods', () => { prisma.$extends({ - // TODO -@-ts-expect-error model: { + // @ts-expect-error badInput: 1, }, }) @@ -490,7 +482,7 @@ testMatrix.setupTestSuite( this: T, args: PrismaNamespace.Exact>>, ): A { - return args as any + return args as any as A }, }, }, @@ -671,7 +663,7 @@ testMatrix.setupTestSuite( }) const ctx = xprisma.user.myCustomCallA() - expectTypeOf(ctx).toHaveProperty('name').toEqualTypeOf<'User'>() + expectTypeOf(ctx).toHaveProperty('name').toEqualTypeOf() expectTypeOf(ctx).toHaveProperty('myCustomCallB').toEqualTypeOf<() => void>() expectTypeOf(ctx).toHaveProperty('update').toMatchTypeOf() }) @@ -693,7 +685,7 @@ testMatrix.setupTestSuite( }) const ctx = xprisma.user.myCustomCallA() - expectTypeOf(ctx).toHaveProperty('name').toEqualTypeOf() + expectTypeOf(ctx).toHaveProperty('name').toEqualTypeOf() expectTypeOf(ctx).toHaveProperty('myCustomCallB').toEqualTypeOf<() => void>() expectTypeOf(ctx).not.toHaveProperty('update') }) @@ -715,7 +707,7 @@ testMatrix.setupTestSuite( }) const ctx = xprisma.user.myCustomCallA() - expectTypeOf(ctx).toHaveProperty('name').toEqualTypeOf() + expectTypeOf(ctx).toHaveProperty('name').toEqualTypeOf() expectTypeOf(ctx).toHaveProperty('myCustomCallB').toEqualTypeOf<() => void>() expectTypeOf(ctx).toHaveProperty('update').toMatchTypeOf() }) @@ -737,7 +729,7 @@ testMatrix.setupTestSuite( }) const ctx = xprisma.user.myCustomCallA() - expectTypeOf(ctx).toHaveProperty('name').toEqualTypeOf() + expectTypeOf(ctx).toHaveProperty('name').toEqualTypeOf() expectTypeOf(ctx).toHaveProperty('myCustomCallB').toEqualTypeOf<() => void>() expectTypeOf(ctx).toHaveProperty('update').toMatchTypeOf() }) diff --git a/packages/client/tests/functional/extensions/prisma/_schema.ts b/packages/client/tests/functional/extensions/enabled/prisma/_schema.ts similarity index 88% rename from packages/client/tests/functional/extensions/prisma/_schema.ts rename to packages/client/tests/functional/extensions/enabled/prisma/_schema.ts index a17484e2da20..57e3cbd5747a 100644 --- a/packages/client/tests/functional/extensions/prisma/_schema.ts +++ b/packages/client/tests/functional/extensions/enabled/prisma/_schema.ts @@ -1,4 +1,4 @@ -import { foreignKeyForProvider, idForProvider } from '../../_utils/idForProvider' +import { foreignKeyForProvider, idForProvider } from '../../../_utils/idForProvider' import testMatrix from '../_matrix' export default testMatrix.setupSchema(({ provider }) => { diff --git a/packages/client/tests/functional/extensions/pdp.ts b/packages/client/tests/functional/extensions/enabled/query-accelerate.ts similarity index 50% rename from packages/client/tests/functional/extensions/pdp.ts rename to packages/client/tests/functional/extensions/enabled/query-accelerate.ts index ffff1086057a..0992f1fc383c 100644 --- a/packages/client/tests/functional/extensions/pdp.ts +++ b/packages/client/tests/functional/extensions/enabled/query-accelerate.ts @@ -3,10 +3,9 @@ import https from 'https' import testMatrix from './_matrix' // @ts-ignore -import type { Prisma as PrismaNamespace, PrismaClient } from './node_modules/@prisma/client' +import type { PrismaClient } from './node_modules/@prisma/client' -declare let prisma: PrismaClient -declare let Prisma: typeof PrismaNamespace +declare const prisma: PrismaClient /** * Tests for underlying query component features used by Prisma Accelerate @@ -14,29 +13,18 @@ declare let Prisma: typeof PrismaNamespace testMatrix.setupTestSuite(() => { let mockedRequest: jest.SpyInstance const originalRequest = https.request - const randomId1 = randomBytes(12).toString('hex') - const randomId2 = randomBytes(12).toString('hex') + const randomId = randomBytes(12).toString('hex') beforeAll(async () => { // this also warms up the dataproxy (schema upload) await prisma.user.create({ data: { - id: randomId1, + id: randomId, email: 'john@doe.io', firstName: 'John', lastName: 'Doe', }, }) - - // this also warms up the dataproxy (schema upload) - await prisma.user.create({ - data: { - id: randomId2, - email: 'max@mustermann.io', - firstName: 'Max', - lastName: 'Mustermann', - }, - }) }) beforeEach(() => { @@ -47,26 +35,6 @@ testMatrix.setupTestSuite(() => { https.request = originalRequest }) - test('_runtimeDataModel is available on the client instance and provides model info', () => { - const extension = Prisma.defineExtension((client) => { - return prisma.$extends({ - model: { - $allModels: { - subscribe() { - expect(client).toHaveProperty('_runtimeDataModel') - expect((client as any)._runtimeDataModel).toHaveProperty('models') - expect((client as any)._runtimeDataModel.models).toHaveProperty('User') - expect((client as any)._runtimeDataModel.models.User).toHaveProperty('fields') - }, - }, - }, - }) - }) - - prisma.$extends(extension).user.subscribe() - expect.hasAssertions() - }) - testIf(process.env.TEST_DATA_PROXY !== undefined)('changing http headers via custom fetch', async () => { const xprisma = prisma.$extends({ query: { @@ -100,9 +68,9 @@ testMatrix.setupTestSuite(() => { }, }) - const data = await xprisma.user.findUnique({ where: { id: randomId1 } }) + const data = await xprisma.user.findUnique({ where: { id: randomId } }) - expect(data).toHaveProperty('id', randomId1) + expect(data).toHaveProperty('id', randomId) expect(mockedRequest.mock.calls[0][1].headers).toHaveProperty('x-custom-header', 'hello') }) @@ -172,91 +140,9 @@ testMatrix.setupTestSuite(() => { }, }) - const data = await xprisma.user.findUnique({ where: { id: randomId1 } }).catch() - - expect(data).toHaveProperty('id', randomId1) - }, - ) - - testIf(process.env.TEST_DATA_PROXY !== undefined)( - 'allows to override customDataProxyFetch for the whole batch', - async () => { - const xprisma = prisma.$extends({ - query: { - // @ts-expect-error - async $__internalBatch({ query, args, __internalParams }) { - let cacheInfo: null | string = null - __internalParams.customDataProxyFetch = (fetch) => (url, args) => { - cacheInfo = 'hit!' - return fetch(url, args) - } - - const result = await query(args, __internalParams) - for (const item of result) { - if (item) { - item.cacheInfo = cacheInfo - } - } - return result - }, - }, - }) - - const [user1, user2] = await Promise.all([ - xprisma.user.findUnique({ where: { id: randomId1 } }), - xprisma.user.findUnique({ where: { id: randomId2 } }), - ]) + const data = await xprisma.user.findUnique({ where: { id: randomId } }).catch() - expect(user1).toHaveProperty('cacheInfo', 'hit!') - expect(user2).toHaveProperty('cacheInfo', 'hit!') + expect(data).toHaveProperty('id', randomId) }, ) - - testIf(process.env.TEST_DATA_PROXY !== undefined)('customDataProxyFetch for batches stacks', async () => { - expect.assertions(2) - const xprisma = prisma - .$extends({ - query: { - // @ts-expect-error - $__internalBatch({ query, args, __internalParams }) { - __internalParams.customDataProxyFetch = (fetch) => (url, args) => { - return fetch(url, { ...args, order: [1] }) - } - - return query(args, __internalParams) - }, - }, - }) - .$extends({ - query: { - // @ts-expect-error - $__internalBatch({ query, args, __internalParams }) { - __internalParams.customDataProxyFetch = (fetch) => (url, args) => { - expect(args.order).toEqual([1]) - return fetch(url, { ...args, order: [...args.order, 2] }) - } - - return query(args, __internalParams) - }, - }, - }) - .$extends({ - query: { - // @ts-expect-error - $__internalBatch({ query, args, __internalParams }) { - __internalParams.customDataProxyFetch = (fetch) => (url, args) => { - expect(args.order).toEqual([1, 2]) - return fetch(url, args) - } - - return query(args, __internalParams) - }, - }, - }) - - await Promise.all([ - xprisma.user.findUnique({ where: { id: randomId1 } }), - xprisma.user.findUnique({ where: { id: randomId2 } }), - ]) - }) }) diff --git a/packages/client/tests/functional/extensions/query.ts b/packages/client/tests/functional/extensions/enabled/query.ts similarity index 82% rename from packages/client/tests/functional/extensions/query.ts rename to packages/client/tests/functional/extensions/enabled/query.ts index af6819f53a4d..5f25719f8705 100644 --- a/packages/client/tests/functional/extensions/query.ts +++ b/packages/client/tests/functional/extensions/enabled/query.ts @@ -1,16 +1,14 @@ import { randomBytes } from 'crypto' import { expectTypeOf } from 'expect-type' -import { wait } from '../_utils/tests/wait' -import { waitFor } from '../_utils/tests/waitFor' -import { NewPrismaClient } from '../_utils/types' +import { wait } from '../../_utils/tests/wait' +import { waitFor } from '../../_utils/tests/waitFor' +import { NewPrismaClient } from '../../_utils/types' import testMatrix from './_matrix' // @ts-ignore import type { Prisma as PrismaNamespace, PrismaClient } from './node_modules/@prisma/client' let prisma: PrismaClient<{ log: [{ emit: 'event'; level: 'query' }] }> -declare let Prisma: typeof PrismaNamespace - declare const newPrismaClient: NewPrismaClient const randomId1 = randomBytes(12).toString('hex') @@ -46,7 +44,6 @@ testMatrix.setupTestSuite( const fnPost = jest.fn() const fnEmitter = jest.fn() - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument prisma.$on('query', fnEmitter) const xprisma = prisma.$extends({ @@ -54,9 +51,12 @@ testMatrix.setupTestSuite( user: { findFirst({ args, query, operation, model }) { if (args.select != undefined) { + // @ts-expect-error args.select.email = undefined } + // @ts-expect-error args.include = undefined + // @ts-expect-error args.select = undefined expectTypeOf(args).not.toBeAny expectTypeOf(query).toBeFunction() @@ -921,26 +921,22 @@ testMatrix.setupTestSuite( // @ts-test-if: provider !== 'mongodb' $queryRaw({ args, query, operation }) { expect(operation).toEqual('$queryRaw') - expect(args).toEqual(Prisma.sql`SELECT 2`) // @ts-test-if: provider !== 'mongodb' - expectTypeOf(args).toEqualTypeOf() + expectTypeOf(args).toEqualTypeOf<[query: TemplateStringsArray | PrismaNamespace.Sql, ...values: any[]]>() // @ts-test-if: provider !== 'mongodb' expectTypeOf(operation).toEqualTypeOf<'$queryRaw'>() fnUser(args) return query(args) }, - // @ts-test-if: provider !== 'mongodb' $executeRaw({ args, query, operation }) { expect(operation).toEqual('$executeRaw') - expect(args).toEqual(Prisma.sql`SELECT 1`) // @ts-test-if: provider !== 'mongodb' - expectTypeOf(args).toEqualTypeOf() + expectTypeOf(args).toEqualTypeOf<[query: TemplateStringsArray | PrismaNamespace.Sql, ...values: any[]]>() // @ts-test-if: provider !== 'mongodb' expectTypeOf(operation).toEqualTypeOf<'$executeRaw'>() fnUser(args) return query(args) }, - // @ts-test-if: provider !== 'mongodb' $queryRawUnsafe({ args, query, operation }) { expect(operation).toEqual('$queryRawUnsafe') // @ts-test-if: provider !== 'mongodb' @@ -950,7 +946,6 @@ testMatrix.setupTestSuite( fnUser(args) return query(args) }, - // @ts-test-if: provider !== 'mongodb' $executeRawUnsafe({ args, query, operation }) { expect(operation).toEqual('$executeRawUnsafe') // @ts-test-if: provider !== 'mongodb' @@ -984,177 +979,17 @@ testMatrix.setupTestSuite( await xprisma.$queryRawUnsafe(`SELECT 4`) await wait(() => expect(fnEmitter).toHaveBeenCalledTimes(4)) - expect(fnUser).toHaveBeenNthCalledWith(1, Prisma.sql`SELECT 1`) - expect(fnUser).toHaveBeenNthCalledWith(2, Prisma.sql`SELECT 2`) + expect(fnUser).toHaveBeenNthCalledWith(1, [[`SELECT 1`]]) + expect(fnUser).toHaveBeenNthCalledWith(2, [[`SELECT 2`]]) expect(fnUser).toHaveBeenNthCalledWith(3, [`SELECT 3`]) expect(fnUser).toHaveBeenNthCalledWith(4, [`SELECT 4`]) } else { // @ts-test-if: provider === 'mongodb' await xprisma.$runCommandRaw({ aggregate: 'User', pipeline: [], explain: false }) // await wait(() => expect(fnEmitter).toHaveBeenCalledTimes(1)) // not working - expect(fnUser).toHaveBeenNthCalledWith(1, { aggregate: 'User', pipeline: [], explain: false }) + // expect(fnUser).toHaveBeenNthCalledWith(1, { aggregate: 'User', pipeline: [], explain: false }) // broken } }) - - testIf(provider !== 'mongodb')('extending with $allModels.$allOperations and a top-level query', async () => { - const fnOperation = jest.fn() - const fnEmitter = jest.fn() - - prisma.$on('query', fnEmitter) - - const xprisma = prisma.$extends({ - query: { - // @ts-test-if: provider !== 'mongodb' - $queryRawUnsafe({ args, query, operation, model }: any) { - fnOperation({ args, operation, model }) - - return query(args) - }, - $allModels: { - $allOperations({ args, query, operation, model }) { - fnOperation({ args, operation, model }) - - return query(args) - }, - }, - }, - }) - - const rawQueryArgs = `SELECT 1` - const modelQueryArgs = { where: { id: randomId1 } } - - const cbArgsRaw = { args: [rawQueryArgs], operation: '$queryRawUnsafe', model: undefined } - const cbArgsUser = { args: modelQueryArgs, operation: 'findFirst', model: 'User' } - const cbArgsPost = { args: modelQueryArgs, operation: 'findFirst', model: 'Post' } - - // @ts-test-if: provider !== 'mongodb' - const dataRaw = await xprisma.$queryRawUnsafe(rawQueryArgs) - const dataUser = await xprisma.user.findFirst(modelQueryArgs) - const dataPost = await xprisma.post.findFirst(modelQueryArgs) - - expect(dataRaw).toBeTruthy() - expect(dataUser).toMatchInlineSnapshot(`null`) - expect(dataPost).toMatchInlineSnapshot(`null`) - expect(fnOperation).toHaveBeenCalledTimes(3) - expect(fnOperation).toHaveBeenNthCalledWith(1, cbArgsRaw) - expect(fnOperation).toHaveBeenNthCalledWith(2, cbArgsUser) - expect(fnOperation).toHaveBeenNthCalledWith(3, cbArgsPost) - await waitFor(() => expect(fnEmitter).toHaveBeenCalledTimes(3)) - }) - - test('extending with $allModels and another $allModels', async () => { - const fnModel = jest.fn() - const fnEmitter = jest.fn() - - prisma.$on('query', fnEmitter) - - const xprisma = prisma - .$extends({ - query: { - $allModels: { - findFirst({ args, query, model, operation }) { - fnModel({ args, operation, model }) - - return query(args) - }, - }, - }, - }) - .$extends({ - query: { - $allModels: { - findFirst({ args, query, operation, model }) { - fnModel({ args, operation, model }) - - return query(args) - }, - }, - }, - }) - - const args = { where: { id: randomId1 } } - const cbArgsUser = { args: args, operation: 'findFirst', model: 'User' } - - const dataUser = await xprisma.user.findFirst(args) - - expect(dataUser).toMatchInlineSnapshot(`null`) - expect(fnModel).toHaveBeenCalledTimes(2) - expect(fnModel).toHaveBeenNthCalledWith(1, cbArgsUser) - expect(fnModel).toHaveBeenNthCalledWith(2, cbArgsUser) - await waitFor(() => expect(fnEmitter).toHaveBeenCalledTimes(1)) - }) - - test('extending with top-level $allOperations', async () => { - const fnModel = jest.fn() - const fnEmitter = jest.fn() - - prisma.$on('query', fnEmitter) - - const xprisma = prisma.$extends({ - query: { - $allOperations({ args, query, operation, model }) { - fnModel({ args, operation, model }) - - return query(args) - }, - }, - }) - - const args = { where: { id: randomId1 } } - const cbArgsUser = { args: args, operation: 'findFirst', model: 'User' } - - const dataUser1 = await xprisma.user.findFirst(args) - - expect(dataUser1).toMatchInlineSnapshot(`null`) - expect(fnModel).toHaveBeenCalledTimes(1) - expect(fnModel).toHaveBeenNthCalledWith(1, cbArgsUser) - await waitFor(() => expect(fnEmitter).toHaveBeenCalledTimes(1)) - }) - - test('unions can be properly discriminated', () => { - prisma.$extends({ - query: { - $allModels: { - findFirst({ args, query, model }) { - ;() => { - if (model === 'User') { - args.select?.firstName - return query(args) - } - - if (model === 'Post') { - // @ts-expect-error - args.select?.firstName - return query(args) - } - - return undefined - } - - return query(args) - }, - $allOperations({ args, query, operation }) { - ;() => { - if (operation === 'findFirst') { - args.select?.id - return query(args) - } - - if (operation === 'groupBy') { - // @ts-expect-error - args.select?.id - return query(args) - } - - return undefined - } - - return query(args) - }, - }, - }, - }) - }) }, { skipDefaultClientInstance: true, diff --git a/packages/client/tests/functional/extensions/result.ts b/packages/client/tests/functional/extensions/enabled/result.ts similarity index 83% rename from packages/client/tests/functional/extensions/result.ts rename to packages/client/tests/functional/extensions/enabled/result.ts index 321bee6885e5..6bc769d03dd3 100644 --- a/packages/client/tests/functional/extensions/result.ts +++ b/packages/client/tests/functional/extensions/enabled/result.ts @@ -3,7 +3,7 @@ import { expectTypeOf } from 'expect-type' import testMatrix from './_matrix' // @ts-ignore -import type { PrismaClient, User } from './node_modules/@prisma/client' +import type { PrismaClient } from './node_modules/@prisma/client' declare let prisma: PrismaClient @@ -48,7 +48,6 @@ testMatrix.setupTestSuite(() => { const user = await xprisma.user.findFirst({}) expect(user?.fullName).toBe('John Smith') - expectTypeOf(user?.fullName).toEqualTypeOf() }) test('findFirst using $allModels', async () => { @@ -64,7 +63,6 @@ testMatrix.setupTestSuite(() => { const user = await xprisma.user.findFirst({}) expect(user?.computed).toBe(123) - expectTypeOf(user?.computed).toEqualTypeOf() }) test('findUnique', async () => { @@ -72,7 +70,6 @@ testMatrix.setupTestSuite(() => { const user = await xprisma.user.findUnique({ where: { email } }) expect(user?.fullName).toBe('John Smith') - expectTypeOf(user?.fullName).toEqualTypeOf() }) test('findMany', async () => { @@ -80,7 +77,6 @@ testMatrix.setupTestSuite(() => { const user = await xprisma.user.findMany({}) expect(user[0].fullName).toBe('John Smith') - expectTypeOf(user[0].fullName).toEqualTypeOf() }) test('create', async () => { @@ -94,7 +90,6 @@ testMatrix.setupTestSuite(() => { }, }) expect(user.fullName).toBe('Max Mustermann') - expectTypeOf(user.fullName).toEqualTypeOf() }) test('update', async () => { @@ -105,7 +100,6 @@ testMatrix.setupTestSuite(() => { }) expect(user.fullName).toBe('Jane Smith') - expectTypeOf(user.fullName).toEqualTypeOf() }) test('upsert - update', async () => { @@ -117,7 +111,6 @@ testMatrix.setupTestSuite(() => { }) expect(user.fullName).toBe('Jane Smith') - expectTypeOf(user.fullName).toEqualTypeOf() }) test('upsert - create', async () => { @@ -143,9 +136,6 @@ testMatrix.setupTestSuite(() => { expect(user?.fullName).toBe('John Smith') expect(user).not.toHaveProperty('firstName') expect(user).not.toHaveProperty('lastName') - expectTypeOf(user?.fullName).toEqualTypeOf() - expectTypeOf(user).not.toHaveProperty('firstName') - expectTypeOf(user).not.toHaveProperty('lastName') }) test('when using select and $allModels', async () => { @@ -167,7 +157,6 @@ testMatrix.setupTestSuite(() => { }, }) expect(user?.computed).toBe(123) - expectTypeOf(user?.computed).toEqualTypeOf() }) test('relationships: with include', async () => { @@ -175,7 +164,6 @@ testMatrix.setupTestSuite(() => { const post = await xprisma.post.findFirst({ include: { user: true } }) expect(post?.user.fullName).toBe('John Smith') - expectTypeOf(post?.user.fullName).toEqualTypeOf() }) test('relationships: with select', async () => { @@ -183,7 +171,6 @@ testMatrix.setupTestSuite(() => { const post = await xprisma.post.findFirst({ select: { user: true } }) expect(post?.user.fullName).toBe('John Smith') - expectTypeOf(post?.user.fullName).toEqualTypeOf() }) test('relationships: with deep select', async () => { @@ -191,7 +178,6 @@ testMatrix.setupTestSuite(() => { const post = await xprisma.post.findFirst({ select: { user: { select: { fullName: true } } } }) expect(post?.user.fullName).toBe('John Smith') - expectTypeOf(post?.user.fullName).toEqualTypeOf() }) test('relationships: mixed include and select', async () => { @@ -199,7 +185,6 @@ testMatrix.setupTestSuite(() => { const post = await xprisma.post.findFirst({ include: { user: { select: { fullName: true } } } }) expect(post?.user.fullName).toBe('John Smith') - expectTypeOf(post?.user.fullName).toEqualTypeOf() }) test('dependencies between computed fields', async () => { @@ -219,7 +204,6 @@ testMatrix.setupTestSuite(() => { const user = await xprisma.user.findFirst() expect(user?.loudName).toBe('JOHN SMITH') - expectTypeOf(user?.loudName).toEqualTypeOf() }) test('shadowing dependency', async () => { @@ -238,7 +222,6 @@ testMatrix.setupTestSuite(() => { const user = await xprisma.user.findFirst() expect(user?.firstName).toBe('JOHN') - expectTypeOf(user?.firstName).toEqualTypeOf() }) test('shadowing dependency multiple times', async () => { @@ -270,7 +253,6 @@ testMatrix.setupTestSuite(() => { const user = await xprisma.user.findFirst() expect(user?.firstName).toBe('JOHN!!!') - expectTypeOf(user?.firstName).toEqualTypeOf() }) test('empty extension does nothing', async () => { @@ -286,7 +268,6 @@ testMatrix.setupTestSuite(() => { const user = await xprisma.user.findFirst({}) expect(user?.fullName).toBe('John Smith') - expectTypeOf(user?.fullName).toEqualTypeOf() }) test('with null result', async () => { @@ -294,7 +275,6 @@ testMatrix.setupTestSuite(() => { const user = await xprisma.user.findUnique({ where: { email: 'nothere@example.com' } }) expect(user).toBeNull() - expectTypeOf(user).toBeNullable() }) test('error in computed field', async () => { @@ -314,7 +294,6 @@ testMatrix.setupTestSuite(() => { const user = await xprisma.user.findFirstOrThrow({}) expect(() => user.fullName).toThrowErrorMatchingInlineSnapshot(`oops!`) - expectTypeOf(() => user.fullName).toEqualTypeOf<() => never>() }) test('error in computed field with no name', async () => { @@ -333,7 +312,6 @@ testMatrix.setupTestSuite(() => { const user = await xprisma.user.findFirstOrThrow({}) expect(() => user.fullName).toThrowErrorMatchingInlineSnapshot(`oops!`) - expectTypeOf(() => user.fullName).toEqualTypeOf<() => never>() }) test('nested includes should include scalars and relations', async () => { @@ -371,13 +349,4 @@ testMatrix.setupTestSuite(() => { expectTypeOf(user.posts[0].user.posts[0].id).toEqualTypeOf() expectTypeOf(user.posts[0].user.posts[0]).not.toHaveProperty('user') }) - - test('when any type is passed as an input default selection type is returned', () => { - ;async () => { - const xprisma = prisma.$extends({}) - - const data = await xprisma.user.findFirstOrThrow({} as any) - expectTypeOf(data).toEqualTypeOf() - } - }) }) diff --git a/packages/client/tests/functional/extensions/tx.ts b/packages/client/tests/functional/extensions/enabled/tx.ts similarity index 83% rename from packages/client/tests/functional/extensions/tx.ts rename to packages/client/tests/functional/extensions/enabled/tx.ts index 390fdcf073b1..bb9d96e46f14 100644 --- a/packages/client/tests/functional/extensions/tx.ts +++ b/packages/client/tests/functional/extensions/enabled/tx.ts @@ -1,5 +1,4 @@ import { faker } from '@faker-js/faker' -import { expectTypeOf } from 'expect-type' import testMatrix from './_matrix' // @ts-ignore @@ -181,31 +180,4 @@ testMatrix.setupTestSuite((_0, _1, clientMeta) => { expect(users).toHaveLength(1) }) - - test('isolation level is properly reflected in extended client', () => { - ;async () => { - const xprisma = prisma.$extends({}) - - // @ts-test-if: provider !== 'mongodb' - const data = await xprisma.$transaction([xprisma.user.findFirst({ select: { id: true } })], { - isolationLevel: 'Serializable', - }) - - expectTypeOf(data).toEqualTypeOf<[{ id: string } | null]>() - } - }) - - test('type inference allows for destructuring the array', () => { - ;async () => { - const xprisma = prisma.$extends({}) - - const [data, count] = await xprisma.$transaction([ - xprisma.user.findFirst({ select: { id: true } }), - xprisma.user.count(), - ]) - - expectTypeOf(data).toEqualTypeOf<{ id: string } | null>() - expectTypeOf(count).toEqualTypeOf() - } - }) }) diff --git a/packages/client/tests/functional/filter-count-relations/prisma/_schema.ts b/packages/client/tests/functional/filter-count-relations/prisma/_schema.ts index 57b24610f199..59e6812b7a5a 100644 --- a/packages/client/tests/functional/filter-count-relations/prisma/_schema.ts +++ b/packages/client/tests/functional/filter-count-relations/prisma/_schema.ts @@ -25,6 +25,7 @@ export default testMatrix.setupSchema(({ provider }) => { return /* Prisma */ ` generator client { provider = "prisma-client-js" + previewFeatures = ["filteredRelationCount"] } datasource db { diff --git a/packages/client/tests/functional/issues/11740-transaction-stored-query/tests.ts b/packages/client/tests/functional/issues/11740-transaction-stored-query/tests.ts index 4dfe997ff1bb..7ffc1f236eea 100644 --- a/packages/client/tests/functional/issues/11740-transaction-stored-query/tests.ts +++ b/packages/client/tests/functional/issues/11740-transaction-stored-query/tests.ts @@ -27,8 +27,8 @@ testMatrix.setupTestSuite( const query = prisma.resource.create({ data: { email: 'john@prisma.io' } }) const fn = async () => { - await (query as any).requestTransaction({ kind: 'batch', lock: Promise.resolve() }) - await (query as any).requestTransaction({ kind: 'batch', lock: Promise.resolve() }) + await (query as any).requestTransaction({ kind: 'batch' }) + await (query as any).requestTransaction({ kind: 'batch' }) } await expect(fn()).rejects.toMatchPrismaErrorSnapshot() diff --git a/packages/client/tests/functional/issues/12862-errors-are-obfuscated-by-interactive-transactions/tests.ts b/packages/client/tests/functional/issues/12862-errors-are-obfuscated-by-interactive-transactions/tests.ts index 3044af023d0d..4ef90c2d4737 100644 --- a/packages/client/tests/functional/issues/12862-errors-are-obfuscated-by-interactive-transactions/tests.ts +++ b/packages/client/tests/functional/issues/12862-errors-are-obfuscated-by-interactive-transactions/tests.ts @@ -13,7 +13,7 @@ testMatrix.setupTestSuite( const user = await prisma.user.create({ data: { email: faker.internet.email(), - name: faker.person.firstName(), + name: faker.name.firstName(), }, }) @@ -32,7 +32,7 @@ testMatrix.setupTestSuite( const user = await prisma.user.create({ data: { email: faker.internet.email(), - name: faker.person.firstName(), + name: faker.name.firstName(), }, }) @@ -55,7 +55,7 @@ testMatrix.setupTestSuite( const user = await client.user.create({ data: { email: faker.internet.email(), - name: faker.person.firstName(), + name: faker.name.firstName(), }, }) diff --git a/packages/client/tests/functional/issues/15044/tests.ts b/packages/client/tests/functional/issues/15044/tests.ts index 030bdd822fbf..39d6dedb3e51 100644 --- a/packages/client/tests/functional/issues/15044/tests.ts +++ b/packages/client/tests/functional/issues/15044/tests.ts @@ -9,8 +9,8 @@ declare let prisma: PrismaClient // https://github.com/prisma/prisma/issues/15044 testMatrix.setupTestSuite(() => { test('should not throw error when using connect inside transaction', async () => { - const userName = faker.person.firstName() - const walletName = faker.person.firstName() + const userName = faker.name.firstName() + const walletName = faker.name.firstName() const result = await prisma.$transaction(async (tx) => { const user = await tx.user.create({ diff --git a/packages/client/tests/functional/issues/15176/tests.ts b/packages/client/tests/functional/issues/15176/tests.ts index 673c8fb30813..0742def86148 100644 --- a/packages/client/tests/functional/issues/15176/tests.ts +++ b/packages/client/tests/functional/issues/15176/tests.ts @@ -11,7 +11,7 @@ testMatrix.setupTestSuite(({ provider }) => { const getTime = (dt: Date): number => dt.getTime() test('should update both updatedAt fields on a model', async () => { - const id = provider === 'mongodb' ? faker.database.mongodbObjectId() : faker.string.alpha(10) + const id = provider === 'mongodb' ? faker.database.mongodbObjectId() : faker.random.alpha(10) const created = await prisma.testModel.create({ data: { diff --git a/packages/client/tests/functional/issues/15644-middleware-arg-types/_matrix.ts b/packages/client/tests/functional/issues/15644-middleware-arg-types/_matrix.ts index 762f277bd998..6a962230983f 100644 --- a/packages/client/tests/functional/issues/15644-middleware-arg-types/_matrix.ts +++ b/packages/client/tests/functional/issues/15644-middleware-arg-types/_matrix.ts @@ -5,8 +5,5 @@ export default defineMatrix(() => [ { provider: 'sqlite', }, - { - provider: 'mongodb', - }, ], ]) diff --git a/packages/client/tests/functional/issues/15644-middleware-arg-types/tests.ts b/packages/client/tests/functional/issues/15644-middleware-arg-types/tests.ts index cd8aad2d6878..422325d4a475 100644 --- a/packages/client/tests/functional/issues/15644-middleware-arg-types/tests.ts +++ b/packages/client/tests/functional/issues/15644-middleware-arg-types/tests.ts @@ -4,10 +4,8 @@ import type { PrismaClient } from './node_modules/@prisma/client' declare let prisma: PrismaClient -const id = '000000000000000000000000' - testMatrix.setupTestSuite( - ({ provider }) => { + () => { test('middleware with count', async () => { expect.assertions(1) prisma.$use((params, next) => { @@ -64,13 +62,13 @@ testMatrix.setupTestSuite( expect.assertions(1) prisma.$use((params, next) => { if (params.action === 'findUnique') { - expect(params.args).toStrictEqual({ where: { id } }) + expect(params.args).toStrictEqual({ where: { id: '0' } }) } return next(params) }) - await prisma.resource.findUnique({ where: { id } }) + await prisma.resource.findUnique({ where: { id: '0' } }) }) test('middleware with findFirstOrThrow', async () => { @@ -90,13 +88,13 @@ testMatrix.setupTestSuite( expect.assertions(1) prisma.$use((params, next) => { if (params.action === ('findUniqueOrThrow' as string)) { - expect(params.args).toStrictEqual({ where: { id } }) + expect(params.args).toStrictEqual({ where: { id: '0' } }) } return next(params) }) - await prisma.resource.findUniqueOrThrow({ where: { id } }).catch(() => {}) + await prisma.resource.findUniqueOrThrow({ where: { id: '0' } }).catch(() => {}) }) test('middleware with create', async () => { @@ -116,105 +114,83 @@ testMatrix.setupTestSuite( expect.assertions(1) prisma.$use((params, next) => { if (params.action === 'delete') { - expect(params.args).toStrictEqual({ where: { id } }) + expect(params.args).toStrictEqual({ where: { id: '0' } }) } return next(params) }) - await prisma.resource.delete({ where: { id } }).catch(() => {}) + await prisma.resource.delete({ where: { id: '0' } }).catch(() => {}) }) test('middleware with deleteMany', async () => { expect.assertions(1) prisma.$use((params, next) => { if (params.action === 'deleteMany') { - expect(params.args).toStrictEqual({ where: { id } }) + expect(params.args).toStrictEqual({ where: { id: '0' } }) } return next(params) }) - await prisma.resource.deleteMany({ where: { id } }) + await prisma.resource.deleteMany({ where: { id: '0' } }) }) test('middleware with findMany', async () => { expect.assertions(1) prisma.$use((params, next) => { if (params.action === 'findMany') { - expect(params.args).toStrictEqual({ where: { id } }) + expect(params.args).toStrictEqual({ where: { id: '0' } }) } return next(params) }) - await prisma.resource.findMany({ where: { id } }) + await prisma.resource.findMany({ where: { id: '0' } }) }) test('middleware with update', async () => { expect.assertions(1) prisma.$use((params, next) => { if (params.action === 'update') { - expect(params.args).toStrictEqual({ where: { id }, data: {} }) + expect(params.args).toStrictEqual({ where: { id: '0' }, data: {} }) } return next(params) }) - await prisma.resource.update({ where: { id }, data: {} }).catch(() => {}) + await prisma.resource.update({ where: { id: '0' }, data: {} }).catch(() => {}) }) test('middleware with updateMany', async () => { expect.assertions(1) prisma.$use((params, next) => { if (params.action === 'updateMany') { - expect(params.args).toStrictEqual({ where: { id }, data: {} }) + expect(params.args).toStrictEqual({ where: { id: '0' }, data: {} }) } return next(params) }) - await prisma.resource.updateMany({ where: { id }, data: {} }) + await prisma.resource.updateMany({ where: { id: '0' }, data: {} }) }) test('middleware with upsert', async () => { expect.assertions(1) prisma.$use((params, next) => { if (params.action === 'upsert') { - expect(params.args).toStrictEqual({ where: { id }, create: {}, update: {} }) + expect(params.args).toStrictEqual({ where: { id: '0' }, create: {}, update: {} }) } return next(params) }) - await prisma.resource.upsert({ where: { id }, create: {}, update: {} }) - }) - - testIf(provider === 'mongodb')('middleware with runCommandRaw', async () => { - expect.assertions(1) - prisma.$use((params, next) => { - if (params.action === 'runCommandRaw') { - expect(params.args).toStrictEqual({ - aggregate: 'Resource', - pipeline: [{ $match: { id } }, { $project: { _id: true } }], - explain: false, - }) - } - - return next(params) - }) - - // @ts-test-if: provider === 'mongodb' - await prisma.$runCommandRaw({ - aggregate: 'Resource', - pipeline: [{ $match: { id } }, { $project: { _id: true } }], - explain: false, - }) + await prisma.resource.upsert({ where: { id: '0' }, create: {}, update: {} }) }) }, { optOut: { - from: ['cockroachdb', 'mysql', 'postgresql', 'sqlserver'], + from: ['cockroachdb', 'mongodb', 'mysql', 'postgresql', 'sqlserver'], reason: 'Testing on a single provider is enough for testing this issue', }, }, diff --git a/packages/client/tests/functional/issues/17405-extensions-casing/prisma/_schema.ts b/packages/client/tests/functional/issues/17405-extensions-casing/prisma/_schema.ts deleted file mode 100644 index 392e8cf1d9a5..000000000000 --- a/packages/client/tests/functional/issues/17405-extensions-casing/prisma/_schema.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { idForProvider } from '../../../_utils/idForProvider' -import testMatrix from '../_matrix' - -export default testMatrix.setupSchema(({ provider }) => { - return /* Prisma */ ` - generator client { - provider = "prisma-client-js" - previewFeatures = ["clientExtensions"] - } - - datasource db { - provider = "${provider}" - url = env("DATABASE_URI_${provider}") - } - - model user { - id ${idForProvider(provider)} - } - ` -}) diff --git a/packages/client/tests/functional/issues/17405-extensions-casing/tests.ts b/packages/client/tests/functional/issues/17405-extensions-casing/tests.ts deleted file mode 100644 index 22ceeeb0270f..000000000000 --- a/packages/client/tests/functional/issues/17405-extensions-casing/tests.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { expectTypeOf } from 'expect-type' - -import testMatrix from './_matrix' -// @ts-ignore -import { Prisma as PrismaNamespace, PrismaClient } from './node_modules/@prisma/client' - -declare let prisma: PrismaClient - -testMatrix.setupTestSuite( - () => { - test('empty', () => { - expectTypeOf< - PrismaNamespace.TypeMap['model']['user']['groupBy']['args'] - >().toEqualTypeOf() - ;async () => { - await prisma.$extends({}).user.findFirst() - } - }) - }, - { - skipDb: true, - skipDefaultClientInstance: true, - }, -) diff --git a/packages/client/tests/functional/issues/17948-tx-client-extensions/prisma/_schema.ts b/packages/client/tests/functional/issues/17948-tx-client-extensions/prisma/_schema.ts deleted file mode 100644 index c20f92b03d53..000000000000 --- a/packages/client/tests/functional/issues/17948-tx-client-extensions/prisma/_schema.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { idForProvider } from '../../../_utils/idForProvider' -import testMatrix from '../_matrix' - -export default testMatrix.setupSchema(({ provider }) => { - return /* Prisma */ ` - generator client { - provider = "prisma-client-js" - previewFeatures = ["clientExtensions"] - } - - datasource db { - provider = "${provider}" - url = env("DATABASE_URI_${provider}") - } - - model User { - id ${idForProvider(provider)} - email String @unique - } - ` -}) diff --git a/packages/client/tests/functional/issues/17948-tx-client-extensions/tests.ts b/packages/client/tests/functional/issues/17948-tx-client-extensions/tests.ts deleted file mode 100644 index 62a677f00652..000000000000 --- a/packages/client/tests/functional/issues/17948-tx-client-extensions/tests.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { faker } from '@faker-js/faker' - -import testMatrix from './_matrix' -// @ts-ignore -import type { Prisma as PrismaNamespace, PrismaClient } from './node_modules/@prisma/client' - -declare let prisma: PrismaClient -declare let Prisma: typeof PrismaNamespace - -testMatrix.setupTestSuite(() => { - test('extension method is bound to transaction client within itx', async () => { - const email = faker.internet.email() - - const xprisma = prisma.$extends({ - model: { - user: { - async exists(email: string) { - const user = await Prisma.getExtensionContext(this).findFirst({ where: { email } }) - return user !== null - }, - }, - }, - client: { - foo() { - Prisma.getExtensionContext(this) - }, - }, - }) - - const existsWithinTransaction = await xprisma.$transaction(async (tx) => { - await tx.user.create({ data: { email } }) - const result = await tx.user.exists(email) - return result - }) - - expect(existsWithinTransaction).toBe(true) - }) -}) diff --git a/packages/client/tests/functional/issues/18276-batch-order/_matrix.ts b/packages/client/tests/functional/issues/18276-batch-order/_matrix.ts deleted file mode 100644 index 4f1f172b93f6..000000000000 --- a/packages/client/tests/functional/issues/18276-batch-order/_matrix.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { defineMatrix } from '../../_utils/defineMatrix' - -export default defineMatrix(() => [ - [ - { - provider: 'sqlite', - }, - { - provider: 'postgresql', - }, - { - provider: 'mysql', - }, - { - provider: 'cockroachdb', - }, - { - provider: 'sqlserver', - }, - ], -]) diff --git a/packages/client/tests/functional/issues/18276-batch-order/prisma/_schema.ts b/packages/client/tests/functional/issues/18276-batch-order/prisma/_schema.ts deleted file mode 100644 index 43984387c5cf..000000000000 --- a/packages/client/tests/functional/issues/18276-batch-order/prisma/_schema.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { idForProvider } from '../../../_utils/idForProvider' -import testMatrix from '../_matrix' - -export default testMatrix.setupSchema(({ provider }) => { - return /* Prisma */ ` - generator client { - provider = "prisma-client-js" - previewFeatures = ["clientExtensions"] - } - - datasource db { - provider = "${provider}" - url = env("DATABASE_URI_${provider}") - } - - model Test { - id ${idForProvider(provider)} - } - ` -}) diff --git a/packages/client/tests/functional/issues/18276-batch-order/tests.ts b/packages/client/tests/functional/issues/18276-batch-order/tests.ts deleted file mode 100644 index 3f23d7eef095..000000000000 --- a/packages/client/tests/functional/issues/18276-batch-order/tests.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { waitFor } from '../../_utils/tests/waitFor' -import { NewPrismaClient } from '../../_utils/types' -import testMatrix from './_matrix' -// @ts-ignore -import type { PrismaClient } from './node_modules/@prisma/client' - -declare const newPrismaClient: NewPrismaClient - -testMatrix.setupTestSuite( - () => { - test('executes batch queries in the right order when using extensions + middleware', async () => { - const prisma = newPrismaClient({ - log: [{ emit: 'event', level: 'query' }], - }) as PrismaClient<{ log: [{ level: 'query'; emit: 'event' }] }> - - const queries: string[] = [] - - prisma.$on('query', ({ query }) => queries.push(query)) - - prisma.$use(async (params, next) => { - await Promise.resolve() - return next(params) - }) - - const xprisma = prisma.$extends({ - query: { - async $queryRawUnsafe({ args, query }) { - const [, result] = await prisma.$transaction([ - prisma.$queryRawUnsafe('SELECT 1'), - query(args), - prisma.$queryRawUnsafe('SELECT 3'), - ]) - return result - }, - }, - }) - - await xprisma.$queryRawUnsafe('SELECT 2') - - await waitFor(() => - expect(queries).toEqual([expect.stringContaining('BEGIN'), 'SELECT 1', 'SELECT 2', 'SELECT 3', 'COMMIT']), - ) - }) - - test('executes batch in right order when using delayed middleware', async () => { - const prisma = newPrismaClient({ - log: [{ emit: 'event', level: 'query' }], - }) as PrismaClient<{ log: [{ level: 'query'; emit: 'event' }] }> - - const queries: string[] = [] - - prisma.$on('query', ({ query }) => queries.push(query)) - - prisma.$use(async (params, next) => { - await new Promise((r) => setTimeout(r, Math.random() * 1000)) - return next(params) - }) - - await prisma.$transaction([ - prisma.$queryRawUnsafe('SELECT 1'), - prisma.$queryRawUnsafe('SELECT 2'), - prisma.$queryRawUnsafe('SELECT 3'), - ]) - - await waitFor(() => - expect(queries).toEqual([expect.stringContaining('BEGIN'), 'SELECT 1', 'SELECT 2', 'SELECT 3', 'COMMIT']), - ) - }) - }, - { - skipDefaultClientInstance: true, - optOut: { - from: ['mongodb'], - reason: 'Test uses raw SQL queries', - }, - }, -) diff --git a/packages/client/tests/functional/issues/18854-extensions-db-null/_matrix.ts b/packages/client/tests/functional/issues/18854-extensions-db-null/_matrix.ts deleted file mode 100644 index 38333790840a..000000000000 --- a/packages/client/tests/functional/issues/18854-extensions-db-null/_matrix.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { defineMatrix } from '../../_utils/defineMatrix' - -export default defineMatrix(() => [ - [ - { - provider: 'postgresql', - }, - { - provider: 'mysql', - }, - { - provider: 'cockroachdb', - }, - ], -]) diff --git a/packages/client/tests/functional/issues/18854-extensions-db-null/tests.ts b/packages/client/tests/functional/issues/18854-extensions-db-null/tests.ts deleted file mode 100644 index 398a65d19549..000000000000 --- a/packages/client/tests/functional/issues/18854-extensions-db-null/tests.ts +++ /dev/null @@ -1,33 +0,0 @@ -import testMatrix from './_matrix' -// @ts-ignore -import type { Prisma as PrismaNamespace, PrismaClient } from './node_modules/@prisma/client' - -declare let prisma: PrismaClient -declare let Prisma: typeof PrismaNamespace - -testMatrix.setupTestSuite( - () => { - test('allows to use DbNull together with query extensions', async () => { - const xprisma = prisma.$extends({ - query: { - $allModels: { - $allOperations({ args, query }) { - return query(args) - }, - }, - }, - }) - - await expect(xprisma.user.create({ data: { json: Prisma.DbNull } })).resolves.not.toThrow() - }) - }, - { - optOut: { - from: ['sqlserver', 'sqlite', 'mongodb'], - reason: ` - sqlserver, sqlite - JSON column is not supported - mongodb - DbNull is not supported - `, - }, - }, -) diff --git a/packages/client/tests/functional/logging/tests.ts b/packages/client/tests/functional/logging/tests.ts index dec33f5b69c3..8db46f50a9e8 100644 --- a/packages/client/tests/functional/logging/tests.ts +++ b/packages/client/tests/functional/logging/tests.ts @@ -73,7 +73,7 @@ testMatrix.setupTestSuite((suiteConfig) => { }) await client.$transaction(async (tx) => { - const id = suiteConfig.provider === 'mongodb' ? faker.database.mongodbObjectId() : faker.string.numeric() + const id = suiteConfig.provider === 'mongodb' ? faker.database.mongodbObjectId() : faker.random.numeric() await tx.user.create({ data: { @@ -136,7 +136,7 @@ testMatrix.setupTestSuite((suiteConfig) => { }) await client.$transaction(async (tx) => { - const id = suiteConfig.provider === 'mongodb' ? faker.database.mongodbObjectId() : faker.string.numeric() + const id = suiteConfig.provider === 'mongodb' ? faker.database.mongodbObjectId() : faker.random.numeric() await Promise.all([ tx.user.findMany({ @@ -197,7 +197,7 @@ testMatrix.setupTestSuite((suiteConfig) => { }) }) - const id = suiteConfig.provider === 'mongodb' ? faker.database.mongodbObjectId() : faker.string.numeric() + const id = suiteConfig.provider === 'mongodb' ? faker.database.mongodbObjectId() : faker.random.numeric() const q1 = client.user.findMany({ where: { diff --git a/packages/client/tests/functional/methods/create-many/tests.ts b/packages/client/tests/functional/methods/create-many/tests.ts index 2b18f6dbdca3..fa0814acf23c 100644 --- a/packages/client/tests/functional/methods/create-many/tests.ts +++ b/packages/client/tests/functional/methods/create-many/tests.ts @@ -36,8 +36,8 @@ testMatrix.setupTestSuite( test('should create a single record with a single nested create', async () => { const email = faker.internet.email() - const name = faker.person.firstName() - const title = faker.person.firstName() + const name = faker.name.firstName() + const title = faker.name.firstName() const res = await prisma.user.create({ include: { @@ -64,11 +64,11 @@ testMatrix.setupTestSuite( test('should create a single record with many nested create', async () => { const email = faker.internet.email() - const name = faker.person.firstName() - const title1 = faker.person.firstName() - const title2 = faker.person.firstName() - const title3 = faker.person.firstName() - const title4 = faker.person.firstName() + const name = faker.name.firstName() + const title1 = faker.name.firstName() + const title2 = faker.name.firstName() + const title3 = faker.name.firstName() + const title4 = faker.name.firstName() const res = await prisma.user.create({ include: { diff --git a/packages/client/tests/functional/methods/upsert/native-atomic/tests.ts b/packages/client/tests/functional/methods/upsert/native-atomic/tests.ts index a1cec08546ee..c7b9e2d800de 100644 --- a/packages/client/tests/functional/methods/upsert/native-atomic/tests.ts +++ b/packages/client/tests/functional/methods/upsert/native-atomic/tests.ts @@ -65,9 +65,9 @@ testMatrix.setupTestSuite( }) test('should only use ON CONFLICT when update arguments do not have any nested queries', async () => { - const name = faker.person.firstName() - const title = faker.person.jobTitle() - const title2 = faker.person.jobTitle() + const name = faker.name.firstName() + const title = faker.name.jobTitle() + const title2 = faker.name.jobTitle() await client.user.create({ data: { @@ -188,7 +188,7 @@ testMatrix.setupTestSuite( }) test('should only use ON CONFLICT when there is only 1 unique field in the where clause', async () => { - const name = faker.person.firstName() + const name = faker.name.firstName() await expect(() => // This will fail @@ -227,7 +227,7 @@ testMatrix.setupTestSuite( }) test('should only use ON CONFLICT when the unique field defined in where clause has the same value as defined in the create arguments', async () => { - const name = faker.person.firstName() + const name = faker.name.firstName() const checker = new UpsertChecker(client) @@ -265,7 +265,7 @@ testMatrix.setupTestSuite( }) test('should perform an upsert using ON CONFLICT', async () => { - const name = faker.person.firstName() + const name = faker.name.firstName() const checker = new UpsertChecker(client) @@ -302,7 +302,7 @@ testMatrix.setupTestSuite( }) test('should perform an upsert using ON CONFLICT with id', async () => { - const name = faker.person.firstName() + const name = faker.name.firstName() const checker = new UpsertChecker(client) diff --git a/packages/client/tests/functional/methods/upsert/simple/tests.ts b/packages/client/tests/functional/methods/upsert/simple/tests.ts index d5cdd249e916..b9e86fd052f9 100644 --- a/packages/client/tests/functional/methods/upsert/simple/tests.ts +++ b/packages/client/tests/functional/methods/upsert/simple/tests.ts @@ -8,7 +8,7 @@ declare let prisma: PrismaClient testMatrix.setupTestSuite(() => { test('should create a record using upsert', async () => { - const name = faker.person.firstName() + const name = faker.name.firstName() await prisma.user.upsert({ where: { @@ -28,7 +28,7 @@ testMatrix.setupTestSuite(() => { }) test('should update a record using upsert', async () => { - const name = faker.person.firstName() + const name = faker.name.firstName() await prisma.user.create({ data: { diff --git a/packages/client/tests/functional/middleware-raw-args/_matrix.ts b/packages/client/tests/functional/middleware-raw-args/_matrix.ts deleted file mode 100644 index d48aae47e031..000000000000 --- a/packages/client/tests/functional/middleware-raw-args/_matrix.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { defineMatrix } from '../_utils/defineMatrix' - -export default defineMatrix(() => [ - [ - { - provider: 'sqlite', - }, - { - provider: 'postgresql', - }, - { - provider: 'mysql', - }, - { - provider: 'cockroachdb', - }, - { - provider: 'sqlserver', - }, - ], -]) diff --git a/packages/client/tests/functional/middleware-raw-args/prisma/_schema.ts b/packages/client/tests/functional/middleware-raw-args/prisma/_schema.ts deleted file mode 100644 index 70bca5fadd4b..000000000000 --- a/packages/client/tests/functional/middleware-raw-args/prisma/_schema.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { idForProvider } from '../../_utils/idForProvider' -import testMatrix from '../_matrix' - -export default testMatrix.setupSchema(({ provider }) => { - return /* Prisma */ ` - generator client { - provider = "prisma-client-js" - } - - datasource db { - provider = "${provider}" - url = env("DATABASE_URI_${provider}") - } - - model Entry { - id ${idForProvider(provider)} - name String - } - ` -}) diff --git a/packages/client/tests/functional/middleware-raw-args/tests.ts b/packages/client/tests/functional/middleware-raw-args/tests.ts deleted file mode 100644 index 4fd169ab4740..000000000000 --- a/packages/client/tests/functional/middleware-raw-args/tests.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { NewPrismaClient } from '../_utils/types' -import testMatrix from './_matrix' -// @ts-ignore -import type { Prisma as PrismaNamespace, PrismaClient } from './node_modules/@prisma/client' - -declare let newPrismaClient: NewPrismaClient -declare let Prisma: typeof PrismaNamespace - -testMatrix.setupTestSuite( - ({ provider }) => { - test('$queryRaw with template string', async () => { - expect.assertions(1) - const prisma = newPrismaClient() - prisma.$use(({ args }, next) => { - expect(args).toEqual([['SELECT ', ''], 1]) - - return next(args) - }) - - await prisma.$queryRaw`SELECT ${1}` - }) - - test('$queryRaw with Prisma.sql instance', async () => { - expect.assertions(1) - const prisma = newPrismaClient() - prisma.$use(({ args }, next) => { - expect(args).toEqual([Prisma.sql`SELECT ${1}`]) - return next(args) - }) - - await prisma.$queryRaw(Prisma.sql`SELECT ${1}`) - }) - - // $executeRaw for sqlite is not allowed to return results - testIf(provider !== 'sqlite')('$executeRaw with template string', async () => { - expect.assertions(1) - const prisma = newPrismaClient() - prisma.$use(({ args }, next) => { - expect(args).toEqual([['SELECT ', ''], 1]) - return next(args) - }) - - await prisma.$executeRaw`SELECT ${1}` - }) - - // $executeRaw for sqlite is not allowed to return results - testIf(provider !== 'sqlite')('$executeRaw with Prisma.sql instance', async () => { - expect.assertions(1) - const prisma = newPrismaClient() - prisma.$use(({ args }, next) => { - expect(args).toEqual([Prisma.sql`SELECT ${1}`]) - return next(args) - }) - - await prisma.$executeRaw(Prisma.sql`SELECT ${1}`) - }) - }, - - { - optOut: { - from: ['mongodb'], - reason: `test for SQL databases only`, - }, - skipDefaultClientInstance: true, - }, -) diff --git a/packages/client/tests/functional/multi-schema/tests.ts b/packages/client/tests/functional/multi-schema/tests.ts index 65819d8c964a..b9fcc8587194 100644 --- a/packages/client/tests/functional/multi-schema/tests.ts +++ b/packages/client/tests/functional/multi-schema/tests.ts @@ -9,10 +9,10 @@ declare let prisma: PrismaClient testMatrix.setupTestSuite( () => { const email = faker.internet.email() - const title = faker.person.jobTitle() + const title = faker.name.jobTitle() const newEmail = faker.internet.email() - const newTitle = faker.person.jobTitle() + const newTitle = faker.name.jobTitle() describe('multischema', () => { test('create', async () => { diff --git a/packages/client/tests/functional/order-by-null/prisma/_schema.ts b/packages/client/tests/functional/order-by-null/prisma/_schema.ts index 9605d5ae54e4..3a231e39d8f9 100644 --- a/packages/client/tests/functional/order-by-null/prisma/_schema.ts +++ b/packages/client/tests/functional/order-by-null/prisma/_schema.ts @@ -5,6 +5,7 @@ export default testMatrix.setupSchema(({ provider }) => { return /* Prisma */ ` generator client { provider = "prisma-client-js" + previewFeatures = ["orderByNulls"] } datasource db { diff --git a/packages/client/tests/functional/query-validation/prisma/_schema.ts b/packages/client/tests/functional/query-validation/prisma/_schema.ts index 5446f2662ca1..81e9c1fb6879 100644 --- a/packages/client/tests/functional/query-validation/prisma/_schema.ts +++ b/packages/client/tests/functional/query-validation/prisma/_schema.ts @@ -1,12 +1,11 @@ -import { foreignKeyForProvider, idForProvider } from '../../_utils/idForProvider' +import { idForProvider } from '../../_utils/idForProvider' import testMatrix from '../_matrix' export default testMatrix.setupSchema(({ provider, previewFeatures }) => { - const schemaFeatures = previewFeatures === '' ? '"fieldReference"' : `"fieldReference",${previewFeatures}` return /* Prisma */ ` generator client { provider = "prisma-client-js" - previewFeatures = [${schemaFeatures}] + previewFeatures = [${previewFeatures}] } datasource db { @@ -18,20 +17,8 @@ export default testMatrix.setupSchema(({ provider, previewFeatures }) => { id ${idForProvider(provider)} email String @unique name String - createdAt DateTime @default(now()) - published Boolean @default(false) - organizationId ${foreignKeyForProvider(provider)} @unique - organization Organization @relation(fields: [organizationId], references: [id]) - } - - model Organization { - id ${idForProvider(provider)} - user User? - } - - model Pet { - id ${idForProvider(provider)} - name String + createdAt DateTime + published Boolean } ` }) diff --git a/packages/client/tests/functional/query-validation/tests.ts b/packages/client/tests/functional/query-validation/tests.ts index 266479f8f6a9..69952ae0dd2d 100644 --- a/packages/client/tests/functional/query-validation/tests.ts +++ b/packages/client/tests/functional/query-validation/tests.ts @@ -10,9 +10,9 @@ testMatrix.setupTestSuite( ({ previewFeatures }) => { describeIf(getQueryEngineProtocol() === 'json')('json', () => { test('include and select are used at the same time', async () => { - // @ts-expect-error const result = prisma.user.findMany({ select: {}, + // @ts-expect-error include: {}, }) @@ -21,15 +21,15 @@ testMatrix.setupTestSuite( Invalid \`prisma.user.findMany()\` invocation in /client/tests/functional/query-validation/tests.ts:0:0 - XX describeIf(getQueryEngineProtocol() === 'json')('json', () => { - XX test('include and select are used at the same time', async () => { - XX // @ts-expect-error - → XX const result = prisma.user.findMany({ - select: {}, - ~~~~~~ - include: {} - ~~~~~~~ - }) + XX ({ previewFeatures }) => { + XX describeIf(getQueryEngineProtocol() === 'json')('json', () => { + XX test('include and select are used at the same time', async () => { + → XX const result = prisma.user.findMany({ + select: {}, + ~~~~~~ + include: {} + ~~~~~~~ + }) Please either use \`include\` or \`select\`, but not both at the same time. `) @@ -43,23 +43,22 @@ testMatrix.setupTestSuite( await expect(result).rejects.toMatchPrismaErrorInlineSnapshot(` - Invalid \`prisma.user.findMany()\` invocation in - /client/tests/functional/query-validation/tests.ts:0:0 - - XX }) - XX - XX test('include used on scalar field', async () => { - → XX const result = prisma.user.findMany({ - include: { - id: true, - ~~ - ? organization?: true - } - }) - - Invalid scalar field \`id\` for include statement on model User. Available options are listed in green. - Note that include statements only accept relation fields. - `) + Invalid \`prisma.user.findMany()\` invocation in + /client/tests/functional/query-validation/tests.ts:0:0 + + XX }) + XX + XX test('include used on scalar field', async () => { + → XX const result = prisma.user.findMany({ + include: { + id: true + ~~ + } + }) + + Invalid scalar field \`id\` for include statement on model User. Available options are listed in green. + Note that include statements only accept relation fields. + `) }) test('unknown selection field', async () => { @@ -72,28 +71,26 @@ testMatrix.setupTestSuite( await expect(result).rejects.toMatchPrismaErrorInlineSnapshot(` - Invalid \`prisma.user.findMany()\` invocation in - /client/tests/functional/query-validation/tests.ts:0:0 - - XX }) - XX - XX test('unknown selection field', async () => { - → XX const result = prisma.user.findMany({ - select: { - notThere: true, - ~~~~~~~~ - ? id?: true, - ? email?: true, - ? name?: true, - ? createdAt?: true, - ? published?: true, - ? organizationId?: true, - ? organization?: true - } - }) - - Unknown field \`notThere\` for select statement on model \`User\`. Available options are listed in green. - `) + Invalid \`prisma.user.findMany()\` invocation in + /client/tests/functional/query-validation/tests.ts:0:0 + + XX }) + XX + XX test('unknown selection field', async () => { + → XX const result = prisma.user.findMany({ + select: { + notThere: true, + ~~~~~~~~ + ? id?: true, + ? email?: true, + ? name?: true, + ? createdAt?: true, + ? published?: true + } + }) + + Unknown field \`notThere\` for select statement on model \`User\`. Available options are listed in green. + `) }) test('empty selection', async () => { @@ -106,20 +103,18 @@ testMatrix.setupTestSuite( Invalid \`prisma.user.findMany()\` invocation in /client/tests/functional/query-validation/tests.ts:0:0 - XX }) - XX - XX test('empty selection', async () => { + XX }) + XX + XX test('empty selection', async () => { → XX const result = prisma.user.findMany({ - select: { - ? id?: true, - ? email?: true, - ? name?: true, - ? createdAt?: true, - ? published?: true, - ? organizationId?: true, - ? organization?: true - } - }) + select: { + ? id?: true, + ? email?: true, + ? name?: true, + ? createdAt?: true, + ? published?: true + } + }) The \`select\` statement for type User must not be empty. Available options are listed in green. `) @@ -147,7 +142,7 @@ testMatrix.setupTestSuite( ? cursor?: UserWhereUniqueInput, ? take?: Int, ? skip?: Int, - ? distinct?: UserScalarFieldEnum | UserScalarFieldEnum[] + ? distinct?: UserScalarFieldEnum[] }) Unknown argument \`notAnArgument\`. Available options are listed in green. @@ -164,31 +159,29 @@ testMatrix.setupTestSuite( await expect(result).rejects.toMatchPrismaErrorInlineSnapshot(` - Invalid \`prisma.user.findMany()\` invocation in - /client/tests/functional/query-validation/tests.ts:0:0 + Invalid \`prisma.user.findMany()\` invocation in + /client/tests/functional/query-validation/tests.ts:0:0 - XX }) - XX - XX test('unknown object field', async () => { - → XX const result = prisma.user.findMany({ - where: { - notAValidField: 123, - ~~~~~~~~~~~~~~ - ? AND?: UserWhereInput | UserWhereInput[], - ? OR?: UserWhereInput[], - ? NOT?: UserWhereInput | UserWhereInput[], - ? id?: StringFilter | String, - ? email?: StringFilter | String, - ? name?: StringFilter | String, - ? createdAt?: DateTimeFilter | DateTime, - ? published?: BoolFilter | Boolean, - ? organizationId?: StringFilter | String, - ? organization?: OrganizationRelationFilter | OrganizationWhereInput - } - }) + XX }) + XX + XX test('unknown object field', async () => { + → XX const result = prisma.user.findMany({ + where: { + notAValidField: 123, + ~~~~~~~~~~~~~~ + ? AND?: UserWhereInput | UserWhereInput[], + ? OR?: UserWhereInput[], + ? NOT?: UserWhereInput | UserWhereInput[], + ? id?: StringFilter | String, + ? email?: StringFilter | String, + ? name?: StringFilter | String, + ? createdAt?: DateTimeFilter | DateTime, + ? published?: BoolFilter | Boolean + } + }) - Unknown argument \`notAValidField\`. Available options are listed in green. - `) + Unknown argument \`notAValidField\`. Available options are listed in green. + `) }) test('missing required argument: nested', async () => { @@ -197,20 +190,20 @@ testMatrix.setupTestSuite( await expect(result).rejects.toMatchPrismaErrorInlineSnapshot(` - Invalid \`prisma.user.create()\` invocation in - /client/tests/functional/query-validation/tests.ts:0:0 + Invalid \`prisma.user.create()\` invocation in + /client/tests/functional/query-validation/tests.ts:0:0 - XX - XX test('missing required argument: nested', async () => { - XX // @ts-expect-error - → XX const result = prisma.user.create({ - data: { - + email: String - } - }) + XX + XX test('missing required argument: nested', async () => { + XX // @ts-expect-error + → XX const result = prisma.user.create({ + data: { + + email: String + } + }) - Argument \`email\` is missing. - `) + Argument \`email\` is missing. + `) }) test('invalid argument type', async () => { @@ -223,42 +216,21 @@ testMatrix.setupTestSuite( await expect(result).rejects.toMatchPrismaErrorInlineSnapshot(` - Invalid \`prisma.user.findUnique()\` invocation in - /client/tests/functional/query-validation/tests.ts:0:0 - - XX }) - XX - XX test('invalid argument type', async () => { - → XX const result = prisma.user.findUnique({ - where: { - email: 123 - ~~~ - } - }) - - Argument \`email\`: Invalid value provided. Expected String, provided Int. - `) - }) - - test('invalid field ref', async () => { - const result = prisma.user.findFirst({ - where: { - // @ts-expect-error - name: { gt: prisma.pet.fields.name }, - }, - }) - - await expect(result).rejects.toMatchPrismaErrorInlineSnapshot(` + Invalid \`prisma.user.findUnique()\` invocation in + /client/tests/functional/query-validation/tests.ts:0:0 - Invalid \`prisma.user.findFirst()\` invocation in - /client/tests/functional/query-validation/tests.ts:0:0 + XX }) + XX + XX test('invalid argument type', async () => { + → XX const result = prisma.user.findUnique({ + where: { + email: 123 + ~~~ + } + }) - XX }) - XX - XX test('invalid field ref', async () => { - → XX const result = prisma.user.findFirst( - Input error. Expected a referenced scalar field of model User, but found a field of model Pet. - `) + Argument \`email\`: Invalid value provided. Expected String, provided Int. + `) }) test('union error', async () => { @@ -271,21 +243,21 @@ testMatrix.setupTestSuite( await expect(result).rejects.toMatchPrismaErrorInlineSnapshot(` - Invalid \`prisma.user.findMany()\` invocation in - /client/tests/functional/query-validation/tests.ts:0:0 + Invalid \`prisma.user.findMany()\` invocation in + /client/tests/functional/query-validation/tests.ts:0:0 - XX }) - XX - XX test('union error', async () => { - → XX const result = prisma.user.findMany({ - where: { - email: 123 - ~~~ - } - }) + XX }) + XX + XX test('union error', async () => { + → XX const result = prisma.user.findMany({ + where: { + email: 123 + ~~~ + } + }) - Argument \`email\`: Invalid value provided. Expected StringFilter or String, provided Int. - `) + Argument \`email\`: Invalid value provided. Expected StringFilter or String, provided Int. + `) }) test('union error: different paths', async () => { @@ -298,55 +270,23 @@ testMatrix.setupTestSuite( await expect(result).rejects.toMatchPrismaErrorInlineSnapshot(` - Invalid \`prisma.user.findMany()\` invocation in - /client/tests/functional/query-validation/tests.ts:0:0 - - XX }) - XX - XX test('union error: different paths', async () => { - → XX const result = prisma.user.findMany({ - where: { - email: { - gt: 123 - ~~~ - } - } - }) - - Argument \`gt\`: Invalid value provided. Expected String or StringFieldRefInput, provided Int. - `) - }) - - // https://github.com/prisma/prisma/issues/19707 - test('union error: invalid argument type vs required argument missing', async () => { - const result = prisma.user.create({ - data: { - name: 'Horsey McHorseface', - // @ts-expect-error - email: 123, - organizationId: 'a123456789012456789', - }, - }) + Invalid \`prisma.user.findMany()\` invocation in + /client/tests/functional/query-validation/tests.ts:0:0 - await expect(result).rejects.toMatchPrismaErrorInlineSnapshot(` + XX }) + XX + XX test('union error: different paths', async () => { + → XX const result = prisma.user.findMany({ + where: { + email: { + gt: 123 + ~~~ + } + } + }) - Invalid \`prisma.user.create()\` invocation in - /client/tests/functional/query-validation/tests.ts:0:0 - - XX - XX // https://github.com/prisma/prisma/issues/19707 - XX test('union error: invalid argument type vs required argument missing', async () => { - → XX const result = prisma.user.create({ - data: { - name: "Horsey McHorseface", - email: 123, - ~~~ - organizationId: "a123456789012456789" - } - }) - - Argument \`email\`: Invalid value provided. Expected String, provided Int. - `) + Argument \`gt\`: Invalid value provided. Expected String, provided Int. + `) }) test('invalid argument value', async () => { @@ -358,23 +298,23 @@ testMatrix.setupTestSuite( await expect(result).rejects.toMatchPrismaErrorInlineSnapshot(` - Invalid \`prisma.user.findMany()\` invocation in - /client/tests/functional/query-validation/tests.ts:0:0 - - XX }) - XX - XX test('invalid argument value', async () => { - → XX const result = prisma.user.findMany({ - where: { - createdAt: { - gt: "yesterday" - ~~~~~~~~~~~ - } - } - }) - - Invalid value for argument \`gt\`: input contains invalid characters. Expected ISO-8601 DateTime. - `) + Invalid \`prisma.user.findMany()\` invocation in + /client/tests/functional/query-validation/tests.ts:0:0 + + XX }) + XX + XX test('invalid argument value', async () => { + → XX const result = prisma.user.findMany({ + where: { + createdAt: { + gt: "yesterday" + ~~~~~~~~~~~ + } + } + }) + + Invalid value for argument \`gt\`: input contains invalid characters. Expected ISO-8601 DateTime. + `) }) testIf(previewFeatures === '')('missing required field', async () => { @@ -385,22 +325,21 @@ testMatrix.setupTestSuite( await expect(result).rejects.toMatchPrismaErrorInlineSnapshot(` - Invalid \`prisma.user.findUnique()\` invocation in - /client/tests/functional/query-validation/tests.ts:0:0 - - XX }) - XX - XX testIf(previewFeatures === '')('missing required field', async () => { - → XX const result = prisma.user.findUnique({ - where: { - ? id?: String, - ? email?: String, - ? organizationId?: String - } - }) - - Argument \`where\` of type UserWhereUniqueInput needs at least one argument. Available options are listed in green. - `) + Invalid \`prisma.user.findUnique()\` invocation in + /client/tests/functional/query-validation/tests.ts:0:0 + + XX }) + XX + XX testIf(previewFeatures === '')('missing required field', async () => { + → XX const result = prisma.user.findUnique({ + where: { + ? id?: String, + ? email?: String + } + }) + + Argument \`where\` of type UserWhereUniqueInput needs at least one argument. Available options are listed in green. + `) }) testIf(previewFeatures === '"extendedWhereUnique"')('missing one of the specific required fields', async () => { @@ -411,29 +350,27 @@ testMatrix.setupTestSuite( await expect(result).rejects.toMatchPrismaErrorInlineSnapshot(` - Invalid \`prisma.user.findUnique()\` invocation in - /client/tests/functional/query-validation/tests.ts:0:0 - - XX }) - XX - XX testIf(previewFeatures === '"extendedWhereUnique"')('missing one of the specific required fields', async () => { - → XX const result = prisma.user.findUnique({ - where: { - ? id?: String, - ? email?: String, - ? organizationId?: String, - ? AND?: UserWhereInput | UserWhereInput[], - ? OR?: UserWhereInput[], - ? NOT?: UserWhereInput | UserWhereInput[], - ? name?: StringFilter | String, - ? createdAt?: DateTimeFilter | DateTime, - ? published?: BoolFilter | Boolean, - ? organization?: OrganizationRelationFilter | OrganizationWhereInput - } - }) - - Argument \`where\` of type UserWhereUniqueInput needs at least one of \`id\`, \`email\` or \`organizationId\` arguments. Available options are listed in green. - `) + Invalid \`prisma.user.findUnique()\` invocation in + /client/tests/functional/query-validation/tests.ts:0:0 + + XX }) + XX + XX testIf(previewFeatures === '"extendedWhereUnique"')('missing one of the specific required fields', async () => { + → XX const result = prisma.user.findUnique({ + where: { + ? id?: String, + ? email?: String, + ? AND?: UserWhereInput | UserWhereInput[], + ? OR?: UserWhereInput[], + ? NOT?: UserWhereInput | UserWhereInput[], + ? name?: StringFilter | String, + ? createdAt?: DateTimeFilter | DateTime, + ? published?: BoolFilter | Boolean + } + }) + + Argument \`where\` of type UserWhereUniqueInput needs at least one of \`id\` or \`email\` arguments. Available options are listed in green. + `) }) testIf(previewFeatures === '')('too many fields', async () => { @@ -441,22 +378,22 @@ testMatrix.setupTestSuite( await expect(result).rejects.toMatchPrismaErrorInlineSnapshot(` - Invalid \`prisma.user.findUnique()\` invocation in - /client/tests/functional/query-validation/tests.ts:0:0 - - XX }) - XX - XX testIf(previewFeatures === '')('too many fields', async () => { - → XX const result = prisma.user.findUnique({ - where: { - id: "123", - email: "foo@bar.com" - } - ~~~~~~~~~~~~~~~~~~~~~~ - }) - - Argument \`where\` of type UserWhereUniqueInput needs exactly one argument, but you provided id and email. Please choose one. - `) + Invalid \`prisma.user.findUnique()\` invocation in + /client/tests/functional/query-validation/tests.ts:0:0 + + XX }) + XX + XX testIf(previewFeatures === '')('too many fields', async () => { + → XX const result = prisma.user.findUnique({ + where: { + id: "123", + email: "foo@bar.com" + } + ~~~~~~~~~~~~~~~~~~~~~~ + }) + + Argument \`where\` of type UserWhereUniqueInput needs exactly one argument, but you provided id and email. Please choose one. + `) }) }) }, diff --git a/packages/client/tests/functional/relationMode-m-n-mongodb-failing-with-at-map/tests_m-to-n-MongoDB.ts b/packages/client/tests/functional/relationMode-m-n-mongodb-failing-with-at-map/tests_m-to-n-MongoDB.ts index bbc14e9d4bc6..4f777cde9128 100644 --- a/packages/client/tests/functional/relationMode-m-n-mongodb-failing-with-at-map/tests_m-to-n-MongoDB.ts +++ b/packages/client/tests/functional/relationMode-m-n-mongodb-failing-with-at-map/tests_m-to-n-MongoDB.ts @@ -11,7 +11,7 @@ declare let prisma: import('@prisma/client').PrismaClient const describeIf = (condition: boolean) => (condition ? describe : describe.skip) // m:n relation (MongoDB database) -async function createXPostsWith2CategoriesMongoDB({ count, postModel }: { count: number; postModel: string }) { +async function createXPostsWith2CategoriesMongoDB({ count, postModel }) { const prismaPromises: any = [] for (let i = 0; i < count; i++) { diff --git a/packages/client/tests/functional/too-many-instances-of-prisma-client/tests.ts b/packages/client/tests/functional/too-many-instances-of-prisma-client/tests.ts index 1235feb6285b..2951655070a2 100644 --- a/packages/client/tests/functional/too-many-instances-of-prisma-client/tests.ts +++ b/packages/client/tests/functional/too-many-instances-of-prisma-client/tests.ts @@ -32,7 +32,7 @@ testMatrix.setupTestSuite( await client.$connect() } - expect(warnings.join('')).toContain('This is the 10th instance of Prisma Client being started. Make sure this is intentional.') + expect(warnings.join('')).toContain('There are already 10 instances of Prisma Client actively running') }, TIMEOUT, ) diff --git a/packages/client/tests/functional/validator/_matrix.ts b/packages/client/tests/functional/validator/_matrix.ts deleted file mode 100644 index 591c8ae01ec1..000000000000 --- a/packages/client/tests/functional/validator/_matrix.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { defineMatrix } from '../_utils/defineMatrix' - -export default defineMatrix(() => [ - [ - { - provider: 'postgresql', - }, - ], -]) diff --git a/packages/client/tests/functional/validator/prisma/_schema.ts b/packages/client/tests/functional/validator/prisma/_schema.ts deleted file mode 100644 index 6b7bf6280bde..000000000000 --- a/packages/client/tests/functional/validator/prisma/_schema.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { idForProvider } from '../../_utils/idForProvider' -import testMatrix from '../_matrix' - -export default testMatrix.setupSchema(({ provider }) => { - return /* Prisma */ ` - generator client { - provider = "prisma-client-js" - } - - datasource db { - provider = "${provider}" - url = env("DATABASE_URI_${provider}") - } - - model User { - id ${idForProvider(provider)} - } - ` -}) diff --git a/packages/client/tests/functional/validator/tests.ts b/packages/client/tests/functional/validator/tests.ts deleted file mode 100644 index 1c437c3c582f..000000000000 --- a/packages/client/tests/functional/validator/tests.ts +++ /dev/null @@ -1,180 +0,0 @@ -import { expectTypeOf } from 'expect-type' - -import testMatrix from './_matrix' -// @ts-ignore -import type { Prisma as PrismaNamespace, PrismaClient } from './node_modules/@prisma/client' - -declare let prisma: PrismaClient -declare let Prisma: typeof PrismaNamespace - -testMatrix.setupTestSuite( - () => { - test('validation via non-extended client', () => { - const data1 = Prisma.validator()({ - id: true, - }) - expectTypeOf(data1).toMatchTypeOf<{ id: true }>() - expect(data1).toEqual({ id: true }) - - Prisma.validator()({ - // @ts-expect-error - wrong: {}, - }) - - const data2 = Prisma.validator( - prisma, - 'user', - 'findFirst', - )({ - select: { id: true }, - }) - expectTypeOf(data2).toEqualTypeOf<{ select: { id: true } }>() - expect(data2).toEqual({ select: { id: true } }) - - Prisma.validator( - prisma, - 'user', - 'findFirst', - )({ - // @ts-expect-error - select: { wrong: {} }, - }) - - const data3 = Prisma.validator( - prisma, - 'user', - 'create', - 'data', - )({ - id: '1', - }) - expectTypeOf(data3).toEqualTypeOf<{ id: '1' }>() - expect(data3).toEqual({ id: '1' }) - - Prisma.validator( - prisma, - 'user', - 'create', - 'data', - )({ - // @ts-expect-error - wrong: {}, - }) - - const data4 = Prisma.validator( - prisma, - 'user', - 'create', - 'select', - )({ - id: true, - }) - expectTypeOf(data4).toEqualTypeOf<{ id: true }>() - expect(data4).toEqual({ id: true }) - - Prisma.validator( - prisma, - 'user', - 'create', - 'select', - )({ - // @ts-expect-error - wrong: {}, - }) - }) - - test('validation via extended client', () => { - const xprisma = prisma.$extends({ - result: { - user: { - prop: { - compute() { - return 1 - }, - needs: { id: true }, - }, - }, - }, - }) - - const data1 = Prisma.validator()({ - id: true, - }) - expectTypeOf(data1).toMatchTypeOf<{ id: true }>() - expect(data1).toEqual({ id: true }) - - Prisma.validator()({ - // @ts-expect-error - wrong: {}, - }) - - const data2 = Prisma.validator( - xprisma, - 'user', - 'findFirst', - )({ - select: { prop: true }, - }) - expectTypeOf(data2).toEqualTypeOf<{ select: { prop: true } }>() - expect(data2).toEqual({ select: { prop: true } }) - - Prisma.validator( - xprisma, - 'user', - 'findFirst', - )({ - // @ts-expect-error - select: { wrong: {} }, - }) - - const data3 = Prisma.validator( - xprisma, - 'user', - 'create', - 'data', - )({ - id: '1', - }) - expectTypeOf(data3).toEqualTypeOf<{ id: '1' }>() - expect(data3).toEqual({ id: '1' }) - - Prisma.validator( - xprisma, - 'user', - 'create', - 'data', - )({ - // @ts-expect-error - wrong: {}, - }) - - const data4 = Prisma.validator( - xprisma, - 'user', - 'create', - 'select', - )({ - id: true, - prop: true, - }) - expectTypeOf(data4).toEqualTypeOf<{ id: true; prop: true }>() - expect(data4).toEqual({ id: true, prop: true }) - - Prisma.validator( - xprisma, - 'user', - 'create', - 'select', - )({ - // @ts-expect-error - wrong: {}, - }) - }) - }, - { - optOut: { - from: ['sqlite', 'mysql', 'mongodb', 'cockroachdb', 'sqlserver'], - reason: 'This is mostly a type-level test, but we want to assert that queries still work with the validator.', - }, - }, -) diff --git a/packages/client/tests/functional/views/tests.ts b/packages/client/tests/functional/views/tests.ts index e090f89d4ee7..7a6975ca08be 100644 --- a/packages/client/tests/functional/views/tests.ts +++ b/packages/client/tests/functional/views/tests.ts @@ -9,14 +9,14 @@ declare let prisma: PrismaClient testMatrix.setupTestSuite( (suiteConfig) => { const fakeUser = { - id: suiteConfig.provider === 'mongodb' ? faker.database.mongodbObjectId() : faker.string.alphanumeric(5), + id: suiteConfig.provider === 'mongodb' ? faker.database.mongodbObjectId() : faker.random.alphaNumeric(5), email: faker.internet.email(), - name: faker.person.firstName(), + name: faker.name.firstName(), } const fakeProfile = { - id: suiteConfig.provider === 'mongodb' ? faker.database.mongodbObjectId() : faker.string.alphanumeric(5), - bio: faker.person.jobTitle(), + id: suiteConfig.provider === 'mongodb' ? faker.database.mongodbObjectId() : faker.random.alphaNumeric(5), + bio: faker.name.jobTitle(), } beforeAll(async () => { diff --git a/packages/debug/package.json b/packages/debug/package.json index 59c3eaa4dd01..3b2681dd861e 100644 --- a/packages/debug/package.json +++ b/packages/debug/package.json @@ -14,8 +14,8 @@ }, "bugs": "https://github.com/prisma/prisma/issues", "devDependencies": { - "@types/jest": "29.5.2", - "@types/node": "18.16.16", + "@types/jest": "29.5.1", + "@types/node": "18.16.14", "esbuild": "0.15.13", "jest": "29.5.0", "jest-junit": "16.0.0", diff --git a/packages/engines/README.md b/packages/engines/README.md index c0077a1ff8fb..4e2deaebb436 100644 --- a/packages/engines/README.md +++ b/packages/engines/README.md @@ -5,7 +5,7 @@ Its release cycle does not follow SemVer, which means we might release breaking The postinstall hook of this package downloads all Prisma engines available for the current platform, namely the Query Engine and the Migration Engine from the Prisma CDN. -The engines version to be downloaded is directly determined by the version of its `@prisma/engines-version` dependency. +The engines version to be downloaded are directly determined by the version of its `@prisma/engines-version` dependency. You should probably not use this package directly, but instead use one of these: diff --git a/packages/engines/package.json b/packages/engines/package.json index 8da4fc4d17d5..40946adfb62d 100644 --- a/packages/engines/package.json +++ b/packages/engines/package.json @@ -8,13 +8,13 @@ "author": "Tim Suchanek ", "devDependencies": { "@prisma/debug": "workspace:*", - "@prisma/engines-version": "4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309", + "@prisma/engines-version": "4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944", "@prisma/fetch-engine": "workspace:*", "@prisma/get-platform": "workspace:*", - "@swc/core": "1.3.64", + "@swc/core": "1.3.32", "@swc/jest": "0.2.26", - "@types/jest": "29.5.2", - "@types/node": "18.16.16", + "@types/jest": "29.5.1", + "@types/node": "18.16.14", "execa": "5.1.1", "jest": "29.5.0", "typescript": "4.9.5" diff --git a/packages/engines/src/index.ts b/packages/engines/src/index.ts index 46e6942908b6..dbf2bacda871 100644 --- a/packages/engines/src/index.ts +++ b/packages/engines/src/index.ts @@ -62,8 +62,6 @@ path.join(__dirname, '../query-engine-darwin-arm64') path.join(__dirname, '../query-engine-debian-openssl-1.0.x') path.join(__dirname, '../query-engine-debian-openssl-1.1.x') path.join(__dirname, '../query-engine-debian-openssl-3.0.x') -path.join(__dirname, '../query-engine-linux-static-x64') -path.join(__dirname, '../query-engine-linux-static-arm64') path.join(__dirname, '../query-engine-rhel-openssl-1.0.x') path.join(__dirname, '../query-engine-rhel-openssl-1.1.x') path.join(__dirname, '../query-engine-rhel-openssl-3.0.x') diff --git a/packages/fetch-engine/package.json b/packages/fetch-engine/package.json index ec4309a595ae..20fdfef8ec84 100644 --- a/packages/fetch-engine/package.json +++ b/packages/fetch-engine/package.json @@ -15,11 +15,11 @@ "bugs": "https://github.com/prisma/prisma/issues", "enginesOverride": {}, "devDependencies": { - "@prisma/engines-version": "4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309", - "@swc/core": "1.3.64", + "@prisma/engines-version": "4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944", + "@swc/core": "1.3.32", "@swc/jest": "0.2.26", - "@types/jest": "29.5.2", - "@types/node": "18.16.16", + "@types/jest": "29.5.1", + "@types/node": "18.16.14", "@types/node-fetch": "2.6.4", "@types/progress": "2.0.5", "del": "6.1.1", @@ -34,8 +34,8 @@ "find-cache-dir": "3.3.2", "fs-extra": "11.1.1", "hasha": "5.2.2", - "http-proxy-agent": "7.0.0", - "https-proxy-agent": "7.0.0", + "http-proxy-agent": "5.0.0", + "https-proxy-agent": "5.0.1", "kleur": "4.1.5", "node-fetch": "2.6.11", "p-filter": "2.1.0", diff --git a/packages/fetch-engine/src/__tests__/binaryTarget/.gitkeep b/packages/fetch-engine/src/__tests__/binaryTarget/.gitkeep deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/packages/fetch-engine/src/__tests__/checksum/.gitkeep b/packages/fetch-engine/src/__tests__/checksum/.gitkeep deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/packages/fetch-engine/src/__tests__/download.test.ts b/packages/fetch-engine/src/__tests__/download.test.ts index 699a0381b1b1..2d75ad61d751 100644 --- a/packages/fetch-engine/src/__tests__/download.test.ts +++ b/packages/fetch-engine/src/__tests__/download.test.ts @@ -1,9 +1,7 @@ import { enginesVersion } from '@prisma/engines-version' -import { getPlatform, Platform } from '@prisma/get-platform' +import { getPlatform } from '@prisma/get-platform' import del from 'del' import fs from 'fs' -import type { Response } from 'node-fetch' -import _mockFetch from 'node-fetch' import path from 'path' import stripAnsi from 'strip-ansi' @@ -11,15 +9,9 @@ import { cleanupCache } from '../cleanupCache' import { BinaryType, download, getBinaryName, getVersion } from '../download' import { getFiles } from './__utils__/getFiles' -const testIf = (condition: boolean) => (condition ? test : test.skip) - -jest.mock('node-fetch', () => jest.fn()) -const actualFetch: typeof import('node-fetch').default = jest.requireActual('node-fetch') -const mockFetch = _mockFetch as any as jest.Mock, Parameters> - const CURRENT_ENGINES_HASH = enginesVersion console.debug({ CURRENT_ENGINES_HASH }) -const FIXED_ENGINES_HASH = 'b20ead4d3ab9e78ac112966e242ded703f4a052c' +const FIXED_ENGINES_HASH = 'eac182fd33c63959a61946df56831625a9a39627' const dirname = process.platform === 'win32' ? __dirname.split(path.sep).join('/') : __dirname // Network can be slow, especially for macOS in CI. @@ -27,719 +19,542 @@ jest.setTimeout(300_000) jest.retryTimes(3) describe('download', () => { - const baseDirAll = path.posix.join(dirname, 'all') - const baseDirCorruption = path.posix.join(dirname, 'corruption') - const baseDirChecksum = path.posix.join(dirname, 'checksum') - const baseDirBinaryTarget = path.posix.join(dirname, 'binaryTarget') - let platform: Platform - beforeEach(async () => { - mockFetch.mockReset().mockImplementation(actualFetch) // completely clean up the cache and keep nothing await cleanupCache(0) - platform = await getPlatform() + // Make sure to not mix forward and backward slashes in the path + // or del glob pattern would not work on Windows + await del(path.posix.join(dirname, '/**/*engine*')) + }) + afterEach(() => { + delete process.env.PRISMA_QUERY_ENGINE_BINARY }) - describe('all engines', () => { - beforeEach(async () => { - // Make sure to not mix forward and backward slashes in the path - // or del glob pattern would not work on Windows - await del(path.posix.join(baseDirAll, '*engine*')) - await del(path.posix.join(baseDirCorruption, '*engine*')) + test('download all current engines', async () => { + const baseDir = path.posix.join(dirname, 'all') + + const platform = await getPlatform() + const queryEnginePath = path.join(baseDir, getBinaryName(BinaryType.QueryEngineBinary, platform)) + const migrationEnginePath = path.join(baseDir, getBinaryName(BinaryType.MigrationEngineBinary, platform)) + + await download({ + binaries: { + [BinaryType.QueryEngineLibrary]: baseDir, + [BinaryType.QueryEngineBinary]: baseDir, + [BinaryType.MigrationEngineBinary]: baseDir, + }, + binaryTargets: [ + 'darwin', + 'darwin-arm64', + 'debian-openssl-1.0.x', + 'debian-openssl-1.1.x', + 'debian-openssl-3.0.x', + 'linux-arm64-openssl-1.0.x', + 'linux-arm64-openssl-1.1.x', + 'linux-arm64-openssl-3.0.x', + 'rhel-openssl-1.0.x', + 'rhel-openssl-1.1.x', + 'rhel-openssl-3.0.x', + 'windows', + 'linux-musl', + 'linux-musl-openssl-3.0.x', + 'linux-musl-arm64-openssl-1.1.x', + 'linux-musl-arm64-openssl-3.0.x', + ], + version: CURRENT_ENGINES_HASH, }) - test('download all current engines', async () => { - const platform = await getPlatform() - const queryEnginePath = path.join(baseDirAll, getBinaryName(BinaryType.QueryEngineBinary, platform)) - const migrationEnginePath = path.join(baseDirAll, getBinaryName(BinaryType.MigrationEngineBinary, platform)) - - await download({ - binaries: { - [BinaryType.QueryEngineLibrary]: baseDirAll, - [BinaryType.QueryEngineBinary]: baseDirAll, - [BinaryType.MigrationEngineBinary]: baseDirAll, - }, - binaryTargets: [ - 'darwin', - 'darwin-arm64', - 'debian-openssl-1.0.x', - 'debian-openssl-1.1.x', - 'debian-openssl-3.0.x', - 'linux-arm64-openssl-1.0.x', - 'linux-arm64-openssl-1.1.x', - 'linux-arm64-openssl-3.0.x', - 'rhel-openssl-1.0.x', - 'rhel-openssl-1.1.x', - 'rhel-openssl-3.0.x', - 'windows', - 'linux-musl', - 'linux-musl-openssl-3.0.x', - 'linux-musl-arm64-openssl-1.1.x', - 'linux-musl-arm64-openssl-3.0.x', - ], - version: CURRENT_ENGINES_HASH, - }) - - await download({ - binaries: { - [BinaryType.QueryEngineBinary]: baseDirAll, - [BinaryType.MigrationEngineBinary]: baseDirAll, - }, - binaryTargets: ['linux-static-x64', 'linux-static-arm64'], - version: CURRENT_ENGINES_HASH, - }) - - const files = getFiles(baseDirAll).map((f) => f.name) - expect(files).toMatchInlineSnapshot(` - [ - ".gitkeep", - "libquery_engine-darwin-arm64.dylib.node", - "libquery_engine-darwin.dylib.node", - "libquery_engine-debian-openssl-1.0.x.so.node", - "libquery_engine-debian-openssl-1.1.x.so.node", - "libquery_engine-debian-openssl-3.0.x.so.node", - "libquery_engine-linux-arm64-openssl-1.0.x.so.node", - "libquery_engine-linux-arm64-openssl-1.1.x.so.node", - "libquery_engine-linux-arm64-openssl-3.0.x.so.node", - "libquery_engine-linux-musl-arm64-openssl-1.1.x.so.node", - "libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node", - "libquery_engine-linux-musl-openssl-3.0.x.so.node", - "libquery_engine-linux-musl.so.node", - "libquery_engine-rhel-openssl-1.0.x.so.node", - "libquery_engine-rhel-openssl-1.1.x.so.node", - "libquery_engine-rhel-openssl-3.0.x.so.node", - "migration-engine-darwin", - "migration-engine-darwin-arm64", - "migration-engine-debian-openssl-1.0.x", - "migration-engine-debian-openssl-1.1.x", - "migration-engine-debian-openssl-3.0.x", - "migration-engine-linux-arm64-openssl-1.0.x", - "migration-engine-linux-arm64-openssl-1.1.x", - "migration-engine-linux-arm64-openssl-3.0.x", - "migration-engine-linux-musl", - "migration-engine-linux-musl-arm64-openssl-1.1.x", - "migration-engine-linux-musl-arm64-openssl-3.0.x", - "migration-engine-linux-musl-openssl-3.0.x", - "migration-engine-linux-static-arm64", - "migration-engine-linux-static-x64", - "migration-engine-rhel-openssl-1.0.x", - "migration-engine-rhel-openssl-1.1.x", - "migration-engine-rhel-openssl-3.0.x", - "migration-engine-windows.exe", - "query-engine-darwin", - "query-engine-darwin-arm64", - "query-engine-debian-openssl-1.0.x", - "query-engine-debian-openssl-1.1.x", - "query-engine-debian-openssl-3.0.x", - "query-engine-linux-arm64-openssl-1.0.x", - "query-engine-linux-arm64-openssl-1.1.x", - "query-engine-linux-arm64-openssl-3.0.x", - "query-engine-linux-musl", - "query-engine-linux-musl-arm64-openssl-1.1.x", - "query-engine-linux-musl-arm64-openssl-3.0.x", - "query-engine-linux-musl-openssl-3.0.x", - "query-engine-linux-static-arm64", - "query-engine-linux-static-x64", - "query-engine-rhel-openssl-1.0.x", - "query-engine-rhel-openssl-1.1.x", - "query-engine-rhel-openssl-3.0.x", - "query-engine-windows.exe", - "query_engine-windows.dll.node", - ] - `) + const files = getFiles(baseDir).map((f) => f.name) + expect(files).toMatchInlineSnapshot(` + [ + ".gitkeep", + "libquery_engine-darwin-arm64.dylib.node", + "libquery_engine-darwin.dylib.node", + "libquery_engine-debian-openssl-1.0.x.so.node", + "libquery_engine-debian-openssl-1.1.x.so.node", + "libquery_engine-debian-openssl-3.0.x.so.node", + "libquery_engine-linux-arm64-openssl-1.0.x.so.node", + "libquery_engine-linux-arm64-openssl-1.1.x.so.node", + "libquery_engine-linux-arm64-openssl-3.0.x.so.node", + "libquery_engine-linux-musl-arm64-openssl-1.1.x.so.node", + "libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node", + "libquery_engine-linux-musl-openssl-3.0.x.so.node", + "libquery_engine-linux-musl.so.node", + "libquery_engine-rhel-openssl-1.0.x.so.node", + "libquery_engine-rhel-openssl-1.1.x.so.node", + "libquery_engine-rhel-openssl-3.0.x.so.node", + "migration-engine-darwin", + "migration-engine-darwin-arm64", + "migration-engine-debian-openssl-1.0.x", + "migration-engine-debian-openssl-1.1.x", + "migration-engine-debian-openssl-3.0.x", + "migration-engine-linux-arm64-openssl-1.0.x", + "migration-engine-linux-arm64-openssl-1.1.x", + "migration-engine-linux-arm64-openssl-3.0.x", + "migration-engine-linux-musl", + "migration-engine-linux-musl-arm64-openssl-1.1.x", + "migration-engine-linux-musl-arm64-openssl-3.0.x", + "migration-engine-linux-musl-openssl-3.0.x", + "migration-engine-rhel-openssl-1.0.x", + "migration-engine-rhel-openssl-1.1.x", + "migration-engine-rhel-openssl-3.0.x", + "migration-engine-windows.exe", + "query-engine-darwin", + "query-engine-darwin-arm64", + "query-engine-debian-openssl-1.0.x", + "query-engine-debian-openssl-1.1.x", + "query-engine-debian-openssl-3.0.x", + "query-engine-linux-arm64-openssl-1.0.x", + "query-engine-linux-arm64-openssl-1.1.x", + "query-engine-linux-arm64-openssl-3.0.x", + "query-engine-linux-musl", + "query-engine-linux-musl-arm64-openssl-1.1.x", + "query-engine-linux-musl-arm64-openssl-3.0.x", + "query-engine-linux-musl-openssl-3.0.x", + "query-engine-rhel-openssl-1.0.x", + "query-engine-rhel-openssl-1.1.x", + "query-engine-rhel-openssl-3.0.x", + "query-engine-windows.exe", + "query_engine-windows.dll.node", + ] + `) + + // Check that all engines hashes are the same + expect(await getVersion(queryEnginePath, BinaryType.QueryEngineBinary)).toContain(CURRENT_ENGINES_HASH) + expect(await getVersion(migrationEnginePath, BinaryType.MigrationEngineBinary)).toContain(CURRENT_ENGINES_HASH) + }) - // Check that all engines hashes are the same - expect(await getVersion(queryEnginePath, BinaryType.QueryEngineBinary)).toContain(CURRENT_ENGINES_HASH) - expect(await getVersion(migrationEnginePath, BinaryType.MigrationEngineBinary)).toContain(CURRENT_ENGINES_HASH) + test('download all binaries & cache them', async () => { + const baseDir = path.posix.join(dirname, 'all') + + const platform = await getPlatform() + const queryEnginePath = path.join(baseDir, getBinaryName(BinaryType.QueryEngineBinary, platform)) + const migrationEnginePath = path.join(baseDir, getBinaryName(BinaryType.MigrationEngineBinary, platform)) + + const before0 = Date.now() + await download({ + binaries: { + [BinaryType.QueryEngineLibrary]: baseDir, + [BinaryType.QueryEngineBinary]: baseDir, + [BinaryType.MigrationEngineBinary]: baseDir, + }, + binaryTargets: [ + 'darwin', + 'darwin-arm64', + 'debian-openssl-1.0.x', + 'debian-openssl-1.1.x', + 'debian-openssl-3.0.x', + 'linux-arm64-openssl-1.0.x', + 'linux-arm64-openssl-1.1.x', + 'linux-arm64-openssl-3.0.x', + 'rhel-openssl-1.0.x', + 'rhel-openssl-1.1.x', + 'rhel-openssl-3.0.x', + 'windows', + 'linux-musl', + 'linux-musl-openssl-3.0.x', + 'linux-musl-arm64-openssl-1.1.x', + 'linux-musl-arm64-openssl-3.0.x', + ], + version: FIXED_ENGINES_HASH, }) - - test('download all engines & cache them', async () => { - const queryEnginePath = path.join(baseDirAll, getBinaryName(BinaryType.QueryEngineBinary, platform)) - const migrationEnginePath = path.join(baseDirAll, getBinaryName(BinaryType.MigrationEngineBinary, platform)) - - const before0 = Date.now() - await download({ - binaries: { - [BinaryType.QueryEngineLibrary]: baseDirAll, - [BinaryType.QueryEngineBinary]: baseDirAll, - [BinaryType.MigrationEngineBinary]: baseDirAll, - }, - binaryTargets: [ - 'darwin', - 'darwin-arm64', - 'debian-openssl-1.0.x', - 'debian-openssl-1.1.x', - 'debian-openssl-3.0.x', - 'linux-arm64-openssl-1.0.x', - 'linux-arm64-openssl-1.1.x', - 'linux-arm64-openssl-3.0.x', - 'rhel-openssl-1.0.x', - 'rhel-openssl-1.1.x', - 'rhel-openssl-3.0.x', - 'windows', - 'linux-musl', - 'linux-musl-openssl-3.0.x', - 'linux-musl-arm64-openssl-1.1.x', - 'linux-musl-arm64-openssl-3.0.x', - ], - version: FIXED_ENGINES_HASH, - }) - - await download({ - binaries: { - [BinaryType.QueryEngineBinary]: baseDirAll, - [BinaryType.MigrationEngineBinary]: baseDirAll, - }, - binaryTargets: ['linux-static-x64', 'linux-static-arm64'], - version: FIXED_ENGINES_HASH, - }) - - const after0 = Date.now() - const timeInMsToDownloadAll = after0 - before0 - console.debug( - `1 - No Cache: first time, download everything. + const after0 = Date.now() + const timeInMsToDownloadAll = after0 - before0 + console.debug( + `1 - No Cache: first time, download everything. It took ${timeInMsToDownloadAll}ms to execute download() for all binaryTargets.`, - ) - - const files = getFiles(baseDirAll) - expect(files).toMatchInlineSnapshot(` - [ - { - "name": ".gitkeep", - "size": 0, - }, - { - "name": "libquery_engine-darwin-arm64.dylib.node", - "size": 14779048, - }, - { - "name": "libquery_engine-darwin.dylib.node", - "size": 15943376, - }, - { - "name": "libquery_engine-debian-openssl-1.0.x.so.node", - "size": 17137832, - }, - { - "name": "libquery_engine-debian-openssl-1.1.x.so.node", - "size": 14662888, - }, - { - "name": "libquery_engine-debian-openssl-3.0.x.so.node", - "size": 14662888, - }, - { - "name": "libquery_engine-linux-arm64-openssl-1.0.x.so.node", - "size": 14798608, - }, - { - "name": "libquery_engine-linux-arm64-openssl-1.1.x.so.node", - "size": 15522472, - }, - { - "name": "libquery_engine-linux-arm64-openssl-3.0.x.so.node", - "size": 16860488, - }, - { - "name": "libquery_engine-linux-musl-arm64-openssl-1.1.x.so.node", - "size": 15809376, - }, - { - "name": "libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node", - "size": 17229232, - }, - { - "name": "libquery_engine-linux-musl-openssl-3.0.x.so.node", - "size": 14654760, - }, - { - "name": "libquery_engine-linux-musl.so.node", - "size": 14511464, - }, - { - "name": "libquery_engine-rhel-openssl-1.0.x.so.node", - "size": 17137832, - }, - { - "name": "libquery_engine-rhel-openssl-1.1.x.so.node", - "size": 14662888, - }, - { - "name": "libquery_engine-rhel-openssl-3.0.x.so.node", - "size": 14662888, - }, - { - "name": "migration-engine-darwin", - "size": 21373456, - }, - { - "name": "migration-engine-darwin-arm64", - "size": 20102638, - }, - { - "name": "migration-engine-debian-openssl-1.0.x", - "size": 22144168, - }, - { - "name": "migration-engine-debian-openssl-1.1.x", - "size": 19440080, - }, - { - "name": "migration-engine-debian-openssl-3.0.x", - "size": 19441160, - }, - { - "name": "migration-engine-linux-arm64-openssl-1.0.x", - "size": 21458768, - }, - { - "name": "migration-engine-linux-arm64-openssl-1.1.x", - "size": 22211472, - }, - { - "name": "migration-engine-linux-arm64-openssl-3.0.x", - "size": 23883344, - }, - { - "name": "migration-engine-linux-musl", - "size": 19058352, - }, - { - "name": "migration-engine-linux-musl-arm64-openssl-1.1.x", - "size": 22553584, - }, - { - "name": "migration-engine-linux-musl-arm64-openssl-3.0.x", - "size": 24279432, - }, - { - "name": "migration-engine-linux-musl-openssl-3.0.x", - "size": 19348096, - }, - { - "name": "migration-engine-linux-static-arm64", - "size": 21218896, - }, - { - "name": "migration-engine-linux-static-x64", - "size": 22324992, - }, - { - "name": "migration-engine-rhel-openssl-1.0.x", - "size": 22144168, - }, - { - "name": "migration-engine-rhel-openssl-1.1.x", - "size": 19440080, - }, - { - "name": "migration-engine-rhel-openssl-3.0.x", - "size": 19441160, - }, - { - "name": "migration-engine-windows.exe", - "size": 15780864, - }, - { - "name": "query-engine-darwin", - "size": 17840936, - }, - { - "name": "query-engine-darwin-arm64", - "size": 16655984, - }, - { - "name": "query-engine-debian-openssl-1.0.x", - "size": 19287104, - }, - { - "name": "query-engine-debian-openssl-1.1.x", - "size": 16808072, - }, - { - "name": "query-engine-debian-openssl-3.0.x", - "size": 16808072, - }, - { - "name": "query-engine-linux-arm64-openssl-1.0.x", - "size": 16722600, - }, - { - "name": "query-engine-linux-arm64-openssl-1.1.x", - "size": 17462856, - }, - { - "name": "query-engine-linux-arm64-openssl-3.0.x", - "size": 18788592, - }, - { - "name": "query-engine-linux-musl", - "size": 16664640, - }, - { - "name": "query-engine-linux-musl-arm64-openssl-1.1.x", - "size": 17708728, - }, - { - "name": "query-engine-linux-musl-arm64-openssl-3.0.x", - "size": 19120392, - }, - { - "name": "query-engine-linux-musl-openssl-3.0.x", - "size": 16775312, - }, - { - "name": "query-engine-linux-static-arm64", - "size": 15984368, - }, - { - "name": "query-engine-linux-static-x64", - "size": 19274912, - }, - { - "name": "query-engine-rhel-openssl-1.0.x", - "size": 19287104, - }, - { - "name": "query-engine-rhel-openssl-1.1.x", - "size": 16808072, - }, - { - "name": "query-engine-rhel-openssl-3.0.x", - "size": 16808072, - }, - { - "name": "query-engine-windows.exe", - "size": 19483648, - }, - { - "name": "query_engine-windows.dll.node", - "size": 17259520, - }, - ] - `) - - expect(await getVersion(queryEnginePath, BinaryType.QueryEngineBinary)).toMatchInlineSnapshot( - `"query-engine b20ead4d3ab9e78ac112966e242ded703f4a052c"`, - ) - expect(await getVersion(migrationEnginePath, BinaryType.MigrationEngineBinary)).toMatchInlineSnapshot( - `"schema-engine-cli b20ead4d3ab9e78ac112966e242ded703f4a052c"`, - ) - - // - // Cache test 1 - // 1- We delete the artifacts locally but not from the cache folder - // 2- We measure how much time it takes to call download - // - - // Delete all artifacts - const deletedEngines = await del(path.posix.join(baseDirAll, '/*engine*')) - expect(deletedEngines.length).toBeGreaterThan(0) - - const before = Date.now() - await download({ - binaries: { - 'libquery-engine': baseDirAll, - 'query-engine': baseDirAll, - 'migration-engine': baseDirAll, - }, - binaryTargets: [ - 'darwin', - 'darwin-arm64', - 'debian-openssl-1.0.x', - 'debian-openssl-1.1.x', - 'debian-openssl-3.0.x', - 'linux-arm64-openssl-1.0.x', - 'linux-arm64-openssl-1.1.x', - 'linux-arm64-openssl-3.0.x', - 'rhel-openssl-1.0.x', - 'rhel-openssl-1.1.x', - 'rhel-openssl-3.0.x', - 'windows', - 'linux-musl', - 'linux-musl-openssl-3.0.x', - 'linux-musl-arm64-openssl-1.1.x', - 'linux-musl-arm64-openssl-3.0.x', - ], - version: FIXED_ENGINES_HASH, - }) - - await download({ - binaries: { - [BinaryType.QueryEngineBinary]: baseDirAll, - [BinaryType.MigrationEngineBinary]: baseDirAll, + ) + + const files = getFiles(baseDir) + expect(files).toMatchInlineSnapshot(` + [ + { + "name": ".gitkeep", + "size": 0, }, - binaryTargets: ['linux-static-x64', 'linux-static-arm64'], - version: FIXED_ENGINES_HASH, - }) - - const after = Date.now() - const timeInMsToDownloadAllFromCache1 = after - before - console.debug( - `2 - With cache1: We deleted the engines locally but not from the cache folder. -It took ${timeInMsToDownloadAllFromCache1}ms to execute download() for all binaryTargets.`, - ) - - // - // Cache test 1 - // 1- We keep all artifacts from previous download - // 2- We measure how much time it takes to call download - // - const before2 = Date.now() - await download({ - binaries: { - 'libquery-engine': baseDirAll, - 'query-engine': baseDirAll, - 'migration-engine': baseDirAll, - }, - binaryTargets: [ - 'darwin', - 'darwin-arm64', - 'debian-openssl-1.0.x', - 'debian-openssl-1.1.x', - 'debian-openssl-3.0.x', - 'linux-arm64-openssl-1.0.x', - 'linux-arm64-openssl-1.1.x', - 'linux-arm64-openssl-3.0.x', - 'rhel-openssl-1.0.x', - 'rhel-openssl-1.1.x', - 'rhel-openssl-3.0.x', - 'windows', - 'linux-musl', - 'linux-musl-openssl-3.0.x', - 'linux-musl-arm64-openssl-1.1.x', - 'linux-musl-arm64-openssl-3.0.x', - ], - version: FIXED_ENGINES_HASH, - }) - - await download({ - binaries: { - [BinaryType.QueryEngineBinary]: baseDirAll, - [BinaryType.MigrationEngineBinary]: baseDirAll, + { + "name": "libquery_engine-darwin-arm64.dylib.node", + "size": 14628824, }, - binaryTargets: ['linux-static-x64', 'linux-static-arm64'], - version: FIXED_ENGINES_HASH, - }) - - const after2 = Date.now() - const timeInMsToDownloadAllFromCache2 = after2 - before2 - console.debug( - `3 - With cache2: Engines were already present -It took ${timeInMsToDownloadAllFromCache2}ms to execute download() for all binaryTargets.`, - ) - - // This is a rather high number to avoid flakiness in CI - expect(timeInMsToDownloadAllFromCache1).toBeLessThan(100_000) - expect(timeInMsToDownloadAllFromCache2).toBeLessThan(100_000) - - // Using cache should be faster - expect(timeInMsToDownloadAllFromCache1).toBeLessThan(timeInMsToDownloadAll) - expect(timeInMsToDownloadAllFromCache2).toBeLessThan(timeInMsToDownloadAll) - }) - - test('auto heal corrupt engine binary', async () => { - const targetPath = path.join(baseDirCorruption, getBinaryName('query-engine', platform)) - if (fs.existsSync(targetPath)) { - try { - fs.unlinkSync(targetPath) - } catch (e) { - console.error(e) - } - } - - await download({ - binaries: { - 'query-engine': baseDirCorruption, + { + "name": "libquery_engine-darwin.dylib.node", + "size": 15859568, }, - version: CURRENT_ENGINES_HASH, - }) - - fs.writeFileSync(targetPath, 'incorrect-binary') - - // please heal it - await download({ - binaries: { - 'query-engine': baseDirCorruption, + { + "name": "libquery_engine-debian-openssl-1.0.x.so.node", + "size": 17573416, }, - version: CURRENT_ENGINES_HASH, - }) - - expect(fs.existsSync(targetPath)).toBe(true) - - expect(await getVersion(targetPath, BinaryType.QueryEngineBinary)).not.toBe(undefined) + { + "name": "libquery_engine-debian-openssl-1.1.x.so.node", + "size": 15085488, + }, + { + "name": "libquery_engine-debian-openssl-3.0.x.so.node", + "size": 15085488, + }, + { + "name": "libquery_engine-linux-arm64-openssl-1.0.x.so.node", + "size": 14626896, + }, + { + "name": "libquery_engine-linux-arm64-openssl-1.1.x.so.node", + "size": 15363048, + }, + { + "name": "libquery_engine-linux-arm64-openssl-3.0.x.so.node", + "size": 16701064, + }, + { + "name": "libquery_engine-linux-musl-arm64-openssl-1.1.x.so.node", + "size": 15637680, + }, + { + "name": "libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node", + "size": 17053440, + }, + { + "name": "libquery_engine-linux-musl-openssl-3.0.x.so.node", + "size": 14491240, + }, + { + "name": "libquery_engine-linux-musl.so.node", + "size": 14253768, + }, + { + "name": "libquery_engine-rhel-openssl-1.0.x.so.node", + "size": 16966120, + }, + { + "name": "libquery_engine-rhel-openssl-1.1.x.so.node", + "size": 14491176, + }, + { + "name": "libquery_engine-rhel-openssl-3.0.x.so.node", + "size": 14491176, + }, + { + "name": "migration-engine-darwin", + "size": 20612160, + }, + { + "name": "migration-engine-darwin-arm64", + "size": 19343790, + }, + { + "name": "migration-engine-debian-openssl-1.0.x", + "size": 23349992, + }, + { + "name": "migration-engine-debian-openssl-1.1.x", + "size": 20624928, + }, + { + "name": "migration-engine-debian-openssl-3.0.x", + "size": 20625584, + }, + { + "name": "migration-engine-linux-arm64-openssl-1.0.x", + "size": 20646448, + }, + { + "name": "migration-engine-linux-arm64-openssl-1.1.x", + "size": 21398992, + }, + { + "name": "migration-engine-linux-arm64-openssl-3.0.x", + "size": 23066416, + }, + { + "name": "migration-engine-linux-musl", + "size": 18296712, + }, + { + "name": "migration-engine-linux-musl-arm64-openssl-1.1.x", + "size": 21728944, + }, + { + "name": "migration-engine-linux-musl-arm64-openssl-3.0.x", + "size": 23458736, + }, + { + "name": "migration-engine-linux-musl-openssl-3.0.x", + "size": 18473608, + }, + { + "name": "migration-engine-rhel-openssl-1.0.x", + "size": 21289336, + }, + { + "name": "migration-engine-rhel-openssl-1.1.x", + "size": 18580240, + }, + { + "name": "migration-engine-rhel-openssl-3.0.x", + "size": 18589496, + }, + { + "name": "migration-engine-windows.exe", + "size": 14989312, + }, + { + "name": "query-engine-darwin", + "size": 17823816, + }, + { + "name": "query-engine-darwin-arm64", + "size": 16556192, + }, + { + "name": "query-engine-debian-openssl-1.0.x", + "size": 17525064, + }, + { + "name": "query-engine-debian-openssl-1.1.x", + "size": 17512712, + }, + { + "name": "query-engine-debian-openssl-3.0.x", + "size": 17512712, + }, + { + "name": "query-engine-linux-arm64-openssl-1.0.x", + "size": 16518944, + }, + { + "name": "query-engine-linux-arm64-openssl-1.1.x", + "size": 17360248, + }, + { + "name": "query-engine-linux-arm64-openssl-3.0.x", + "size": 18694176, + }, + { + "name": "query-engine-linux-musl", + "size": 16484312, + }, + { + "name": "query-engine-linux-musl-arm64-openssl-1.1.x", + "size": 17622504, + }, + { + "name": "query-engine-linux-musl-arm64-openssl-3.0.x", + "size": 19038264, + }, + { + "name": "query-engine-linux-musl-openssl-3.0.x", + "size": 16689072, + }, + { + "name": "query-engine-rhel-openssl-1.0.x", + "size": 16705464, + }, + { + "name": "query-engine-rhel-openssl-1.1.x", + "size": 16705464, + }, + { + "name": "query-engine-rhel-openssl-3.0.x", + "size": 16705464, + }, + { + "name": "query-engine-windows.exe", + "size": 19318272, + }, + { + "name": "query_engine-windows.dll.node", + "size": 16984064, + }, + ] + `) + + expect(await getVersion(queryEnginePath, BinaryType.QueryEngineBinary)).toMatchInlineSnapshot( + `"query-engine eac182fd33c63959a61946df56831625a9a39627"`, + ) + expect(await getVersion(migrationEnginePath, BinaryType.MigrationEngineBinary)).toMatchInlineSnapshot( + `"migration-engine-cli eac182fd33c63959a61946df56831625a9a39627"`, + ) + + // + // Cache test 1 + // 1- We delete the artifacts locally but not from the cache folder + // 2- We measure how much time it takes to call download + // + + // Delete all artifacts + const deletedEngines = await del(path.posix.join(baseDir, '/*engine*')) + expect(deletedEngines.length).toBeGreaterThan(0) + + const before = Date.now() + await download({ + binaries: { + 'libquery-engine': baseDir, + 'query-engine': baseDir, + 'migration-engine': baseDir, + }, + binaryTargets: [ + 'darwin', + 'darwin-arm64', + 'debian-openssl-1.0.x', + 'debian-openssl-1.1.x', + 'debian-openssl-3.0.x', + 'linux-arm64-openssl-1.0.x', + 'linux-arm64-openssl-1.1.x', + 'linux-arm64-openssl-3.0.x', + 'rhel-openssl-1.0.x', + 'rhel-openssl-1.1.x', + 'rhel-openssl-3.0.x', + 'windows', + 'linux-musl', + 'linux-musl-openssl-3.0.x', + 'linux-musl-arm64-openssl-1.1.x', + 'linux-musl-arm64-openssl-3.0.x', + ], + version: FIXED_ENGINES_HASH, }) - }) - - describe('binaryTarget', () => { - beforeEach(async () => { - // Make sure to not mix forward and backward slashes in the path - // or del glob pattern would not work on Windows - await del(path.posix.join(baseDirBinaryTarget, '*engine*')) + const after = Date.now() + const timeInMsToDownloadAllFromCache1 = after - before + console.debug( + `2 - With cache1: We deleted the engines locally but not from the cache folder. +It took ${timeInMsToDownloadAllFromCache1}ms to execute download() for all binaryTargets.`, + ) + + // + // Cache test 1 + // 1- We keep all artifacts from previous download + // 2- We measure how much time it takes to call download + // + const before2 = Date.now() + await download({ + binaries: { + 'libquery-engine': baseDir, + 'query-engine': baseDir, + 'migration-engine': baseDir, + }, + binaryTargets: [ + 'darwin', + 'darwin-arm64', + 'debian-openssl-1.0.x', + 'debian-openssl-1.1.x', + 'debian-openssl-3.0.x', + 'linux-arm64-openssl-1.0.x', + 'linux-arm64-openssl-1.1.x', + 'linux-arm64-openssl-3.0.x', + 'rhel-openssl-1.0.x', + 'rhel-openssl-1.1.x', + 'rhel-openssl-3.0.x', + 'windows', + 'linux-musl', + 'linux-musl-openssl-3.0.x', + 'linux-musl-arm64-openssl-1.1.x', + 'linux-musl-arm64-openssl-3.0.x', + ], + version: FIXED_ENGINES_HASH, }) + const after2 = Date.now() + const timeInMsToDownloadAllFromCache2 = after2 - before2 + console.debug( + `3 - With cache2: Engines were already present +It took ${timeInMsToDownloadAllFromCache2}ms to execute download() for all binaryTargets.`, + ) - afterEach(() => { - delete process.env.PRISMA_QUERY_ENGINE_BINARY - }) + // This is a rather high number to avoid flakiness in CI + expect(timeInMsToDownloadAllFromCache1).toBeLessThan(100_000) + expect(timeInMsToDownloadAllFromCache2).toBeLessThan(100_000) - test('handle nonexistent "binaryTarget"', async () => { - await expect( - download({ - binaries: { - 'query-engine': baseDirBinaryTarget, - }, - version: CURRENT_ENGINES_HASH, - binaryTargets: ['darwin', 'marvin'] as any, // eslint-disable-line @typescript-eslint/no-explicit-any - }), - ).rejects.toThrowErrorMatchingInlineSnapshot( - `"Unknown binaryTarget marvin and no custom engine files were provided"`, - ) - }) + // Using cache should be faster + expect(timeInMsToDownloadAllFromCache1).toBeLessThan(timeInMsToDownloadAll) + expect(timeInMsToDownloadAllFromCache2).toBeLessThan(timeInMsToDownloadAll) + }) - test('handle nonexistent "binaryTarget" with missing custom engine binary', async () => { - expect.assertions(1) - process.env.PRISMA_QUERY_ENGINE_BINARY = '../query-engine' + test('auto heal corrupt engine binary', async () => { + const platform = await getPlatform() + const baseDir = path.posix.join(dirname, 'corruption') + const targetPath = path.join(baseDir, getBinaryName('query-engine', platform)) + if (fs.existsSync(targetPath)) { try { - await download({ - binaries: { - 'query-engine': baseDirBinaryTarget, - }, - version: CURRENT_ENGINES_HASH, - binaryTargets: ['darwin', 'marvin'] as any, // eslint-disable-line @typescript-eslint/no-explicit-any - }) - } catch (err: any) { - expect(stripAnsi(err.message)).toMatchInlineSnapshot( - `"Env var PRISMA_QUERY_ENGINE_BINARY is provided but provided path ../query-engine can't be resolved."`, - ) + fs.unlinkSync(targetPath) + } catch (e) { + console.error(e) } - }) - - test('handle nonexistent "binaryTarget" with custom engine binary', async () => { - const e = await download({ - binaries: { - 'query-engine': baseDirBinaryTarget, - }, - version: CURRENT_ENGINES_HASH, - }) - const dummyPath = e['query-engine']![Object.keys(e['query-engine']!)[0]]! - const targetPath = path.join( - baseDirBinaryTarget, - // @ts-ignore - getBinaryName('query-engine', 'marvin'), - ) - fs.copyFileSync(dummyPath, targetPath) - process.env.PRISMA_QUERY_ENGINE_BINARY = targetPath + } - const testResult = await download({ - binaries: { - 'query-engine': baseDirBinaryTarget, - }, - version: CURRENT_ENGINES_HASH, - binaryTargets: ['marvin'] as any, // eslint-disable-line @typescript-eslint/no-explicit-any - }) - expect(testResult['query-engine']!['marvin']).toEqual(targetPath) + await download({ + binaries: { + 'query-engine': baseDir, + }, + version: FIXED_ENGINES_HASH, }) - }) - describe('env.PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING=1', () => { - beforeAll(() => { - process.env.PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING = '1' - }) + fs.writeFileSync(targetPath, 'incorrect-binary') - afterAll(() => { - delete process.env.PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING + // please heal it + await download({ + binaries: { + 'query-engine': baseDir, + }, + version: FIXED_ENGINES_HASH, }) - beforeEach(async () => { - // Make sure to not mix forward and backward slashes in the path - // or del glob pattern would not work on Windows - await del(path.posix.join(baseDirChecksum, '*engine*')) - }) + expect(fs.existsSync(targetPath)).toBe(true) - test('if checksum downloads and matches, does not throw', async () => { - const queryEnginePath = path.join(baseDirChecksum, getBinaryName(BinaryType.QueryEngineLibrary, platform)) + expect(await getVersion(targetPath, BinaryType.QueryEngineBinary)).not.toBe(undefined) + }) - await expect( - download({ - binaries: { - [BinaryType.QueryEngineLibrary]: baseDirChecksum, - }, - binaryTargets: [platform], - version: CURRENT_ENGINES_HASH, - }), - ).resolves.toStrictEqual({ - 'libquery-engine': { - [platform]: queryEnginePath, + test('handle nonexistent "binaryTarget"', async () => { + await expect( + download({ + binaries: { + 'query-engine': __dirname, }, - }) - - const files = getFiles(baseDirChecksum).map((f) => f.name) - expect(files.filter((name) => !name.startsWith('.'))).toEqual([path.basename(queryEnginePath)]) - expect(await getVersion(queryEnginePath, BinaryType.QueryEngineLibrary)).toContain(CURRENT_ENGINES_HASH) - }) - - // This tests is skipped on Windows because it errors out with - // EPERM: operation not permitted, unlink 'D:\a\prisma\prisma\packages\fetch-engine\src\__tests__\checksum\query_engine-windows.dll.node' - // TODO: Fix this test on Windows one day - testIf(process.platform !== 'win32')("if checksum downloads but doesn't match, throws", async () => { - mockFetch.mockImplementation((url, opts) => { - if (String(url).endsWith('.sha256')) { - return Promise.resolve({ - ok: true, - status: 200, - statusText: 'OK', - text: () => - Promise.resolve(`1deadbeef2deadbeef3deadbeef4deadbeef5deadbeef6deadbeef7deadbeef8 query-engine.gz\n`), - } as Response) - } - return actualFetch(url, opts) - }) - - await expect( - download({ - binaries: { - [BinaryType.QueryEngineLibrary]: baseDirChecksum, - }, - binaryTargets: [platform], - version: CURRENT_ENGINES_HASH, - }), - ).rejects.toThrow(/^sha256 checksum of .+ \(zipped\) should be .+ but is .+$/) - }) - - // This tests is skipped on Windows because it errors out with - // EPERM: operation not permitted, unlink 'D:\a\prisma\prisma\packages\fetch-engine\src\__tests__\checksum\query_engine-windows.dll.node' - // TODO: Fix this test on Windows one day - testIf(process.platform !== 'win32')('if checksum download fails, logs warning but does not throw', async () => { - mockFetch.mockImplementation((url, opts) => { - if (String(url).endsWith('.sha256')) { - return Promise.resolve({ - ok: false, - status: 404, - statusText: 'Not Found', - } as any as Response) - } - return actualFetch(url, opts) - }) - - const queryEnginePath = path.join(baseDirChecksum, getBinaryName(BinaryType.QueryEngineLibrary, platform)) + version: FIXED_ENGINES_HASH, + binaryTargets: ['darwin', 'marvin'] as any, // eslint-disable-line @typescript-eslint/no-explicit-any + }), + ).rejects.toThrowErrorMatchingInlineSnapshot( + `"Unknown binaryTarget marvin and no custom engine files were provided"`, + ) + }) - await expect( - download({ - binaries: { - [BinaryType.QueryEngineLibrary]: baseDirChecksum, - }, - binaryTargets: [platform], - version: CURRENT_ENGINES_HASH, - }), - ).resolves.toStrictEqual({ - 'libquery-engine': { - [platform]: queryEnginePath, + test('handle nonexistent "binaryTarget" with missing custom engine binary', async () => { + expect.assertions(1) + process.env.PRISMA_QUERY_ENGINE_BINARY = '../query-engine' + try { + await download({ + binaries: { + 'query-engine': __dirname, }, + version: FIXED_ENGINES_HASH, + binaryTargets: ['darwin', 'marvin'] as any, // eslint-disable-line @typescript-eslint/no-explicit-any }) + } catch (err: any) { + expect(stripAnsi(err.message)).toMatchInlineSnapshot( + `"Env var PRISMA_QUERY_ENGINE_BINARY is provided but provided path ../query-engine can't be resolved."`, + ) + } + }) - const files = getFiles(baseDirChecksum).map((f) => f.name) - expect(files.filter((name) => !name.startsWith('.'))).toEqual([path.basename(queryEnginePath)]) - expect(await getVersion(queryEnginePath, BinaryType.QueryEngineLibrary)).toContain(CURRENT_ENGINES_HASH) + test('handle nonexistent "binaryTarget" with custom engine binary', async () => { + const e = await download({ + binaries: { + 'query-engine': __dirname, + }, + version: FIXED_ENGINES_HASH, + }) + const dummyPath = e['query-engine']![Object.keys(e['query-engine']!)[0]]! + const targetPath = path.join( + __dirname, + // @ts-ignore + getBinaryName('query-engine', 'marvin'), + ) + fs.copyFileSync(dummyPath, targetPath) + process.env.PRISMA_QUERY_ENGINE_BINARY = targetPath + + const testResult = await download({ + binaries: { + 'query-engine': path.join(__dirname, 'all'), + }, + version: FIXED_ENGINES_HASH, + binaryTargets: ['marvin'] as any, // eslint-disable-line @typescript-eslint/no-explicit-any }) + expect(testResult['query-engine']!['marvin']).toEqual(targetPath) }) }) diff --git a/packages/fetch-engine/src/download.ts b/packages/fetch-engine/src/download.ts index 4b4ee60adbd7..729c2033718a 100644 --- a/packages/fetch-engine/src/download.ts +++ b/packages/fetch-engine/src/download.ts @@ -286,10 +286,6 @@ async function binaryNeedsToBeDownloaded( } else { return true } - } else if (process.env.PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING) { - // If the env var is truthy we do not error if the checksum file is missing - debug(`The checksum file: ${sha256FilePath} is missing but this was ignored as the PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING environment variable is truthy.`) - return false } else { return true } @@ -440,8 +436,8 @@ async function downloadBinary(options: DownloadBinaryOptions): Promise { async function saveFileToCache( job: BinaryDownloadJob, version: string, - sha256: string | null, - zippedSha256: string | null, + sha256: string, + zippedSha256: string, ): Promise { // always fail silent, as the cache is optional const cacheDir = await getCacheDir(channel, version, job.binaryTarget) @@ -455,12 +451,8 @@ async function saveFileToCache( try { await overwriteFile(job.targetFilePath, cachedTargetPath) - if (sha256 != null) { - await fs.promises.writeFile(cachedSha256Path, sha256) - } - if (zippedSha256 != null) { - await fs.promises.writeFile(cachedSha256ZippedPath, zippedSha256) - } + await fs.promises.writeFile(cachedSha256Path, sha256) + await fs.promises.writeFile(cachedSha256ZippedPath, zippedSha256) } catch (e) { debug(e) // let this fail silently - the CI system may have reached the file size limit diff --git a/packages/fetch-engine/src/downloadZip.ts b/packages/fetch-engine/src/downloadZip.ts index 884bb6a0fbfe..75ff8f9574af 100644 --- a/packages/fetch-engine/src/downloadZip.ts +++ b/packages/fetch-engine/src/downloadZip.ts @@ -17,41 +17,28 @@ const del = promisify(rimraf) export type DownloadResult = { lastModified: string - sha256: string | null - zippedSha256: string | null + sha256: string + zippedSha256: string } -async function fetchChecksum(url: string): Promise { - try { - const checksumUrl = `${url}.sha256` - const response = await fetch(checksumUrl, { - agent: getProxyAgent(url) as any, - }) - if (!response.ok) { - let errorMessage = `Failed to fetch sha256 checksum at ${checksumUrl}. ${response.status} ${response.statusText}` - if (!process.env.PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING) { - errorMessage += `\n\nIf you need to ignore this error (e.g. in an offline environment), set the PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING environment variable to a truthy value.\nExample: PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING=1` - } - throw new Error(errorMessage) - } - const body = await response.text() - // We get a string like this: - // "3c82ee6cd9fedaec18a5e7cd3fc41f8c6b3dd32575dc13443d96aab4bd018411 query-engine.gz\n" - // So we split it by whitespace and just get the hash, as that's what we're interested in - const [checksum] = body.split(/\s+/) - if (!/^[a-f0-9]{64}$/gi.test(checksum)) { - throw new Error(`Unable to parse checksum from ${checksumUrl} - response body: ${body}`) - } - return checksum - } catch (error) { - if (process.env.PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING) { - debug( - `fetchChecksum() failed and was ignored as the PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING environment variable is truthy.\nError: ${error}`, - ) - return null - } - throw error - } +async function fetchSha256(url: string): Promise<{ sha256: string; zippedSha256: string }> { + // We get a string like this: + // "3c82ee6cd9fedaec18a5e7cd3fc41f8c6b3dd32575dc13443d96aab4bd018411 query-engine.gz\n" + // So we split it by whitespace and just get the hash, as that's what we're interested in + const [zippedSha256, sha256] = [ + ( + await fetch(`${url}.sha256`, { + agent: getProxyAgent(url) as any, + }).then((res) => res.text()) + ).split(/\s+/)[0], + ( + await fetch(`${url.slice(0, url.length - 3)}.sha256`, { + agent: getProxyAgent(url.slice(0, url.length - 3)) as any, + }).then((res) => res.text()) + ).split(/\s+/)[0], + ] + + return { sha256, zippedSha256 } } export async function downloadZip( @@ -61,7 +48,7 @@ export async function downloadZip( ): Promise { const tmpDir = tempy.directory() const partial = path.join(tmpDir, 'partial') - const [zippedSha256, sha256] = await Promise.all([fetchChecksum(url), fetchChecksum(url.slice(0, url.length - 3))]) + const { sha256, zippedSha256 } = await fetchSha256(url) const result = await retry( async () => { try { @@ -110,14 +97,12 @@ export async function downloadZip( const hash = await hashPromise const zippedHash = await zippedHashPromise - if (zippedSha256 !== null && zippedSha256 !== zippedHash) { - return reject( - new Error(`sha256 checksum of ${url} (zipped) should be ${zippedSha256} but is ${zippedHash}`), - ) + if (zippedHash !== zippedSha256) { + throw new Error(`sha256 of ${url} (zipped) should be ${zippedSha256} but is ${zippedHash}`) } - if (sha256 !== null && sha256 !== hash) { - return reject(new Error(`sha256 checksum of ${url} (unzipped) should be ${sha256} but is ${hash}`)) + if (hash !== sha256) { + throw new Error(`sha256 of ${url} (unzipped) should be ${sha256} but is ${hash}`) } }) } finally { diff --git a/packages/fetch-engine/src/getProxyAgent.ts b/packages/fetch-engine/src/getProxyAgent.ts index b42e26e8ed63..81fb76b446fc 100644 --- a/packages/fetch-engine/src/getProxyAgent.ts +++ b/packages/fetch-engine/src/getProxyAgent.ts @@ -1,7 +1,7 @@ 'use strict' -import { HttpProxyAgent, HttpProxyAgentOptions } from 'http-proxy-agent' -import { HttpsProxyAgent, HttpsProxyAgentOptions } from 'https-proxy-agent' +import HttpProxyAgent from 'http-proxy-agent' +import HttpsProxyAgent from 'https-proxy-agent' import Url from 'url' // code from https://raw.githubusercontent.com/request/request/5ba8eb44da7cd639ca21070ea9be20d611b85f66/lib/getProxyFromURI.js @@ -81,7 +81,9 @@ function getProxyFromURI(uri): string | null { return null } -export function getProxyAgent(url: string): HttpProxyAgentOptions | HttpsProxyAgentOptions | undefined { +export function getProxyAgent( + url: string, +): HttpProxyAgent.HttpProxyAgent | HttpsProxyAgent.HttpsProxyAgent | undefined { const uri = Url.parse(url) const proxy = getProxyFromURI(uri) if (!proxy) { @@ -89,11 +91,11 @@ export function getProxyAgent(url: string): HttpProxyAgentOptions | Http } if (uri.protocol === 'http:') { - return new HttpProxyAgent(proxy) + return HttpProxyAgent(proxy) } if (uri.protocol === 'https:') { - return new HttpsProxyAgent(proxy) + return HttpsProxyAgent(proxy) } return undefined diff --git a/packages/generator-helper/package.json b/packages/generator-helper/package.json index 8cdcac9ccb8f..2a1b136912b9 100644 --- a/packages/generator-helper/package.json +++ b/packages/generator-helper/package.json @@ -28,10 +28,10 @@ }, "devDependencies": { "@swc-node/register": "1.6.5", - "@swc/core": "1.3.64", + "@swc/core": "1.3.32", "@swc/jest": "0.2.26", - "@types/jest": "29.5.2", - "@types/node": "18.16.16", + "@types/jest": "29.5.1", + "@types/node": "18.16.14", "esbuild": "0.15.13", "jest": "29.5.0", "jest-junit": "16.0.0", diff --git a/packages/get-platform/package.json b/packages/get-platform/package.json index 1eb51c215ee1..fb247c4da05b 100644 --- a/packages/get-platform/package.json +++ b/packages/get-platform/package.json @@ -15,10 +15,10 @@ "bugs": "https://github.com/prisma/prisma/issues", "devDependencies": { "@codspeed/benchmark.js-plugin": "1.1.0", - "@swc/core": "1.3.64", + "@swc/core": "1.3.32", "@swc/jest": "0.2.26", - "@types/jest": "29.5.2", - "@types/node": "18.16.16", + "@types/jest": "29.5.1", + "@types/node": "18.16.14", "benchmark": "2.1.4", "jest": "29.5.0", "jest-junit": "16.0.0", diff --git a/packages/get-platform/src/__tests__/getPlatform.test.ts b/packages/get-platform/src/__tests__/getPlatform.test.ts index 4353c6d2618e..9cec47f29317 100644 --- a/packages/get-platform/src/__tests__/getPlatform.test.ts +++ b/packages/get-platform/src/__tests__/getPlatform.test.ts @@ -128,7 +128,7 @@ describe('getPlatformInternal', () => { expect(ctx.mocked['console.log'].mock.calls.join('\n')).toMatchInlineSnapshot(``) expect(ctx.mocked['console.warn'].mock.calls.join('\n')).toMatchInlineSnapshot(` prisma:warn Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-1.1.x". - Please manually install OpenSSL via \`apt-get update -y && apt-get install -y openssl\` and try installing Prisma again. If you're running Prisma on Docker, add this command to your Dockerfile, or switch to an image that already has OpenSSL installed. + Please manually install OpenSSL via \`apt-get update -y && apt-get install -y openssl\` and try installing Prisma again. If you're running Prisma on Docker, you may also try to replace your base image with \`node:lts-slim\`, which already ships with OpenSSL installed. `) expect(ctx.mocked['console.error'].mock.calls.join('\n')).toMatchInlineSnapshot(``) }) diff --git a/packages/get-platform/src/getPlatform.ts b/packages/get-platform/src/getPlatform.ts index 1bc3d1e70261..3e81d88e2aa3 100644 --- a/packages/get-platform/src/getPlatform.ts +++ b/packages/get-platform/src/getPlatform.ts @@ -481,7 +481,7 @@ export function getPlatformInternal(args: GetOSResult): Platform { */ const additionalMessage = match({ familyDistro }) .with({ familyDistro: 'debian' }, () => { - return "Please manually install OpenSSL via `apt-get update -y && apt-get install -y openssl` and try installing Prisma again. If you're running Prisma on Docker, add this command to your Dockerfile, or switch to an image that already has OpenSSL installed." + return "Please manually install OpenSSL via `apt-get update -y && apt-get install -y openssl` and try installing Prisma again. If you're running Prisma on Docker, you may also try to replace your base image with `node:lts-slim`, which already ships with OpenSSL installed." }) .otherwise(() => { return 'Please manually install OpenSSL and try installing Prisma again.' diff --git a/packages/get-platform/src/platforms.ts b/packages/get-platform/src/platforms.ts index 518f8908eb50..0d62f5c90ee9 100644 --- a/packages/get-platform/src/platforms.ts +++ b/packages/get-platform/src/platforms.ts @@ -19,8 +19,6 @@ export type Platform = | 'linux-musl-arm64-openssl-1.1.x' | 'linux-musl-arm64-openssl-3.0.x' | 'linux-nixos' - | 'linux-static-x64' - | 'linux-static-arm64' | 'windows' | 'freebsd11' | 'freebsd12' @@ -49,8 +47,6 @@ export const platforms: Array = [ 'linux-musl-arm64-openssl-1.1.x', 'linux-musl-arm64-openssl-3.0.x', 'linux-nixos', - 'linux-static-x64', - 'linux-static-arm64', 'windows', 'freebsd11', 'freebsd12', diff --git a/packages/instrumentation/README.md b/packages/instrumentation/README.md index 84d35720e2f2..7fcd43fe86a1 100644 --- a/packages/instrumentation/README.md +++ b/packages/instrumentation/README.md @@ -1,6 +1,6 @@ # @prisma/instrumentation -[![npm version](https://img.shields.io/npm/v/@prisma/instrumentation.svg?style=flat)](https://www.npmjs.com/package/@prisma/instrumentation) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/prisma/prisma/blob/main/CONTRIBUTING.md) [![GitHub license](https://img.shields.io/badge/license-Apache%202-blue)](https://github.com/prisma/prisma/blob/main/LICENSE) [![Slack](https://img.shields.io/badge/chat-on%20slack-blue.svg)](https://slack.prisma.io/) [![Discord](https://img.shields.io/discord/937751382725886062?label=Discord)](https://pris.ly/discord) +[![npm version](https://img.shields.io/npm/v/@prisma/instrumentation.svg?style=flat)](https://www.npmjs.com/package/@prisma/instrumentation) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/prisma/prisma/blob/main/CONTRIBUTING.md) [![GitHub license](https://img.shields.io/badge/license-Apache%202-blue)](https://github.com/prisma/prisma/blob/main/LICENSE) [![Slack](https://img.shields.io/badge/chat-on%20slack-blue.svg)](https://slack.prisma.io/) [OTEL - OpenTelemetry](https://opentelemetry.io/) compliant instrumentation for Prisma Client. diff --git a/packages/instrumentation/package.json b/packages/instrumentation/package.json index 38dcbf149127..f89ac65b401d 100644 --- a/packages/instrumentation/package.json +++ b/packages/instrumentation/package.json @@ -14,9 +14,9 @@ "bugs": "https://github.com/prisma/prisma/issues", "devDependencies": { "@prisma/internals": "workspace:*", - "@swc/core": "1.3.64", - "@types/node": "18.16.16", - "@types/jest": "29.5.2", + "@swc/core": "1.3.32", + "@types/node": "18.16.14", + "@types/jest": "29.5.1", "jest": "29.5.0", "jest-junit": "16.0.0", "typescript": "4.9.5" diff --git a/packages/integration-tests/package.json b/packages/integration-tests/package.json index 1a8cb939ed57..8af06ce6088c 100644 --- a/packages/integration-tests/package.json +++ b/packages/integration-tests/package.json @@ -16,12 +16,12 @@ "@prisma/internals": "workspace:*", "@prisma/migrate": "workspace:*", "@sindresorhus/slugify": "1.1.2", - "@swc/core": "1.3.64", + "@swc/core": "1.3.32", "@swc/jest": "0.2.26", - "@types/jest": "29.5.2", + "@types/jest": "29.5.1", "@types/mssql": "8.1.2", - "@types/node": "18.16.16", - "@types/pg": "8.10.2", + "@types/node": "18.16.14", + "@types/pg": "8.10.1", "@types/sqlite3": "3.1.8", "decimal.js": "10.4.3", "esbuild": "0.15.13", @@ -29,10 +29,10 @@ "fs-jetpack": "5.1.0", "jest": "29.5.0", "jest-junit": "16.0.0", - "mariadb": "3.2.0", + "mariadb": "3.0.2", "mssql": "9.1.1", "pg": "8.9.0", - "sqlite-async": "1.2.0", + "sqlite-async": "1.1.3", "string-hash": "1.1.3", "strip-ansi": "6.0.1", "tempy": "1.0.1", diff --git a/packages/integration-tests/src/__tests__/integration/sqlite/__database.ts b/packages/integration-tests/src/__tests__/integration/sqlite/__database.ts index 11c7f1b31e41..9838d286a5e2 100644 --- a/packages/integration-tests/src/__tests__/integration/sqlite/__database.ts +++ b/packages/integration-tests/src/__tests__/integration/sqlite/__database.ts @@ -1,4 +1,4 @@ -import { Database } from 'sqlite-async' +import Database from 'sqlite-async' import type { Input } from '../../__helpers__/integrationTest' diff --git a/packages/internals/package.json b/packages/internals/package.json index f3c7f59e5c40..4654a48efa82 100644 --- a/packages/internals/package.json +++ b/packages/internals/package.json @@ -29,8 +29,8 @@ "devDependencies": { "@swc/core": "1.2.204", "@swc/jest": "0.2.26", - "@types/jest": "29.5.2", - "@types/node": "18.16.16", + "@types/jest": "29.5.1", + "@types/node": "18.16.14", "@types/resolve": "1.20.2", "esbuild": "0.15.13", "jest": "29.5.0", @@ -41,17 +41,17 @@ "yarn": "1.22.19" }, "dependencies": { - "@antfu/ni": "0.21.4", "@opentelemetry/api": "1.4.1", "@prisma/debug": "workspace:*", "@prisma/engines": "workspace:*", "@prisma/fetch-engine": "workspace:*", "@prisma/generator-helper": "workspace:*", "@prisma/get-platform": "workspace:*", - "@prisma/prisma-fmt-wasm": "4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309", + "@prisma/ni": "workspace:*", + "@prisma/prisma-fmt-wasm": "4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944", "archiver": "5.3.1", "arg": "5.0.2", - "checkpoint-client": "1.1.24", + "checkpoint-client": "1.1.23", "cli-truncate": "2.1.0", "dotenv": "16.0.3", "escape-string-regexp": "4.0.0", diff --git a/packages/internals/src/__tests__/engine-commands/__snapshots__/getDmmf.test.ts.snap b/packages/internals/src/__tests__/engine-commands/__snapshots__/getDmmf.test.ts.snap index e9250187fc05..5ab0391b3d4e 100644 --- a/packages/internals/src/__tests__/engine-commands/__snapshots__/getDmmf.test.ts.snap +++ b/packages/internals/src/__tests__/engine-commands/__snapshots__/getDmmf.test.ts.snap @@ -203,6 +203,20 @@ exports[`getDMMF success @@id model 1`] = ` "schema": { "enumTypes": { "prisma": [ + { + "name": "QueryMode", + "values": [ + "default", + "insensitive", + ], + }, + { + "name": "SortOrder", + "values": [ + "asc", + "desc", + ], + }, { "name": "TransactionIsolationLevel", "values": [ @@ -230,20 +244,6 @@ exports[`getDMMF success @@id model 1`] = ` "isAdmin", ], }, - { - "name": "SortOrder", - "values": [ - "asc", - "desc", - ], - }, - { - "name": "QueryMode", - "values": [ - "default", - "insensitive", - ], - }, ], }, "fieldRefTypes": {}, @@ -4718,12 +4718,6 @@ exports[`getDMMF success @@id model 1`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "User1ScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -4818,12 +4812,6 @@ exports[`getDMMF success @@id model 1`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "User1ScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -4918,12 +4906,6 @@ exports[`getDMMF success @@id model 1`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "User1ScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -5249,12 +5231,6 @@ exports[`getDMMF success @@id model 1`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "User2ScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -5349,12 +5325,6 @@ exports[`getDMMF success @@id model 1`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "User2ScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -5449,12 +5419,6 @@ exports[`getDMMF success @@id model 1`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "User2ScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -7155,33 +7119,33 @@ exports[`getDMMF success @@map model 2`] = ` "enumTypes": { "prisma": [ { - "name": "TransactionIsolationLevel", + "name": "QueryMode", "values": [ - "ReadUncommitted", - "ReadCommitted", - "RepeatableRead", - "Serializable", + "default", + "insensitive", ], }, { - "name": "UserScalarFieldEnum", + "name": "SortOrder", "values": [ - "id", - "email", + "asc", + "desc", ], }, { - "name": "SortOrder", + "name": "TransactionIsolationLevel", "values": [ - "asc", - "desc", + "ReadUncommitted", + "ReadCommitted", + "RepeatableRead", + "Serializable", ], }, { - "name": "QueryMode", + "name": "UserScalarFieldEnum", "values": [ - "default", - "insensitive", + "id", + "email", ], }, ], @@ -9637,12 +9601,6 @@ exports[`getDMMF success @@map model 2`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "UserScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -9737,12 +9695,6 @@ exports[`getDMMF success @@map model 2`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "UserScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -9837,12 +9789,6 @@ exports[`getDMMF success @@map model 2`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "UserScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -11132,15 +11078,6 @@ exports[`getDMMF success @@unique model 1`] = ` "schema": { "enumTypes": { "prisma": [ - { - "name": "TransactionIsolationLevel", - "values": [ - "ReadUncommitted", - "ReadCommitted", - "RepeatableRead", - "Serializable", - ], - }, { "name": "PostScalarFieldEnum", "values": [ @@ -11151,10 +11088,26 @@ exports[`getDMMF success @@unique model 1`] = ` ], }, { - "name": "UserScalarFieldEnum", + "name": "QueryMode", "values": [ - "id", - "email", + "default", + "insensitive", + ], + }, + { + "name": "SortOrder", + "values": [ + "asc", + "desc", + ], + }, + { + "name": "TransactionIsolationLevel", + "values": [ + "ReadUncommitted", + "ReadCommitted", + "RepeatableRead", + "Serializable", ], }, { @@ -11176,17 +11129,10 @@ exports[`getDMMF success @@unique model 1`] = ` ], }, { - "name": "SortOrder", - "values": [ - "asc", - "desc", - ], - }, - { - "name": "QueryMode", + "name": "UserScalarFieldEnum", "values": [ - "default", - "insensitive", + "id", + "email", ], }, ], @@ -15157,13 +15103,8 @@ exports[`getDMMF success @@unique model 1`] = ` "namespace": "prisma", "type": "UserWhereInput", }, - { - "isList": false, - "location": "scalar", - "type": "Null", - }, ], - "isNullable": true, + "isNullable": false, "isRequired": false, "name": "is", }, @@ -15175,13 +15116,8 @@ exports[`getDMMF success @@unique model 1`] = ` "namespace": "prisma", "type": "UserWhereInput", }, - { - "isList": false, - "location": "scalar", - "type": "Null", - }, ], - "isNullable": true, + "isNullable": false, "isRequired": false, "name": "isNot", }, @@ -19528,12 +19464,6 @@ exports[`getDMMF success @@unique model 1`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "PostScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -19736,12 +19666,6 @@ exports[`getDMMF success @@unique model 1`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "PostScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -19836,12 +19760,6 @@ exports[`getDMMF success @@unique model 1`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "PostScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -19936,12 +19854,6 @@ exports[`getDMMF success @@unique model 1`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "PostScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -20267,12 +20179,6 @@ exports[`getDMMF success @@unique model 1`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "UserScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -20367,12 +20273,6 @@ exports[`getDMMF success @@unique model 1`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "UserScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -20467,12 +20367,6 @@ exports[`getDMMF success @@unique model 1`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "UserScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -20798,12 +20692,6 @@ exports[`getDMMF success @@unique model 1`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "User1ScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -20898,12 +20786,6 @@ exports[`getDMMF success @@unique model 1`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "User1ScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -20998,12 +20880,6 @@ exports[`getDMMF success @@unique model 1`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "User1ScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -21329,12 +21205,6 @@ exports[`getDMMF success @@unique model 1`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "User2ScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -21429,12 +21299,6 @@ exports[`getDMMF success @@unique model 1`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "User2ScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -21529,12 +21393,6 @@ exports[`getDMMF success @@unique model 1`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "User2ScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -23798,21 +23656,7 @@ exports[`getDMMF success @@unique model 1`] = ` { "fields": [ { - "args": [ - { - "inputTypes": [ - { - "isList": false, - "location": "inputObjectTypes", - "namespace": "prisma", - "type": "PostWhereInput", - }, - ], - "isNullable": false, - "isRequired": false, - "name": "where", - }, - ], + "args": [], "isNullable": false, "name": "posts", "outputType": { @@ -24295,9 +24139,9 @@ exports[`getDMMF success @@unique model 1`] = ` } `; -exports[`getDMMF success big schema read via datamodel path 1`] = `142570400`; +exports[`getDMMF success big schema read via datamodel path 1`] = `141151322`; -exports[`getDMMF success chinook introspected schema 1`] = `922647`; +exports[`getDMMF success chinook introspected schema 1`] = `909334`; exports[`getDMMF success if a datamodel is provided, succeeds even when a non-existing datamodel path is given 2`] = ` { @@ -24416,7 +24260,7 @@ exports[`getDMMF success if a datamodel is provided, succeeds even when a non-ex } `; -exports[`getDMMF success odoo introspected schema 1`] = `134813289`; +exports[`getDMMF success odoo introspected schema 1`] = `134382395`; exports[`getDMMF success simple model, mongodb 1`] = ` { @@ -24549,17 +24393,17 @@ exports[`getDMMF success simple model, mongodb 2`] = ` ], }, { - "name": "SortOrder", + "name": "QueryMode", "values": [ - "asc", - "desc", + "default", + "insensitive", ], }, { - "name": "QueryMode", + "name": "SortOrder", "values": [ - "default", - "insensitive", + "asc", + "desc", ], }, ], @@ -26874,12 +26718,6 @@ exports[`getDMMF success simple model, mongodb 2`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "AScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -26974,12 +26812,6 @@ exports[`getDMMF success simple model, mongodb 2`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "AScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -27074,12 +26906,6 @@ exports[`getDMMF success simple model, mongodb 2`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "AScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -28092,15 +27918,6 @@ exports[`getDMMF success simple model, mysql 2`] = ` "schema": { "enumTypes": { "prisma": [ - { - "name": "TransactionIsolationLevel", - "values": [ - "ReadUncommitted", - "ReadCommitted", - "RepeatableRead", - "Serializable", - ], - }, { "name": "AScalarFieldEnum", "values": [ @@ -28115,6 +27932,15 @@ exports[`getDMMF success simple model, mysql 2`] = ` "desc", ], }, + { + "name": "TransactionIsolationLevel", + "values": [ + "ReadUncommitted", + "ReadCommitted", + "RepeatableRead", + "Serializable", + ], + }, ], }, "fieldRefTypes": {}, @@ -30542,12 +30368,6 @@ exports[`getDMMF success simple model, mysql 2`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "AScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -30642,12 +30462,6 @@ exports[`getDMMF success simple model, mysql 2`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "AScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -30742,12 +30556,6 @@ exports[`getDMMF success simple model, mysql 2`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "AScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -34012,12 +33820,6 @@ exports[`getDMMF success simple model, no datasource 2`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "AScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -34112,12 +33914,6 @@ exports[`getDMMF success simple model, no datasource 2`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "AScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -34212,12 +34008,6 @@ exports[`getDMMF success simple model, no datasource 2`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "AScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -35107,19 +34897,17 @@ exports[`getDMMF success simple model, postgresql 2`] = ` "enumTypes": { "prisma": [ { - "name": "TransactionIsolationLevel", + "name": "AScalarFieldEnum", "values": [ - "ReadUncommitted", - "ReadCommitted", - "RepeatableRead", - "Serializable", + "id", + "name", ], }, { - "name": "AScalarFieldEnum", + "name": "QueryMode", "values": [ - "id", - "name", + "default", + "insensitive", ], }, { @@ -35130,10 +34918,12 @@ exports[`getDMMF success simple model, postgresql 2`] = ` ], }, { - "name": "QueryMode", + "name": "TransactionIsolationLevel", "values": [ - "default", - "insensitive", + "ReadUncommitted", + "ReadCommitted", + "RepeatableRead", + "Serializable", ], }, ], @@ -37589,12 +37379,6 @@ exports[`getDMMF success simple model, postgresql 2`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "AScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -37689,12 +37473,6 @@ exports[`getDMMF success simple model, postgresql 2`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "AScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -37789,12 +37567,6 @@ exports[`getDMMF success simple model, postgresql 2`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "AScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -38796,16 +38568,6 @@ exports[`getDMMF success simple model, sql server 2`] = ` "schema": { "enumTypes": { "prisma": [ - { - "name": "TransactionIsolationLevel", - "values": [ - "ReadUncommitted", - "ReadCommitted", - "RepeatableRead", - "Serializable", - "Snapshot", - ], - }, { "name": "AScalarFieldEnum", "values": [ @@ -38820,6 +38582,16 @@ exports[`getDMMF success simple model, sql server 2`] = ` "desc", ], }, + { + "name": "TransactionIsolationLevel", + "values": [ + "ReadUncommitted", + "ReadCommitted", + "RepeatableRead", + "Serializable", + "Snapshot", + ], + }, ], }, "fieldRefTypes": {}, @@ -41247,12 +41019,6 @@ exports[`getDMMF success simple model, sql server 2`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "AScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -41347,12 +41113,6 @@ exports[`getDMMF success simple model, sql server 2`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "AScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -41447,12 +41207,6 @@ exports[`getDMMF success simple model, sql server 2`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "AScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -42441,12 +42195,6 @@ exports[`getDMMF success simple model, sqlite 2`] = ` "schema": { "enumTypes": { "prisma": [ - { - "name": "TransactionIsolationLevel", - "values": [ - "Serializable", - ], - }, { "name": "AScalarFieldEnum", "values": [ @@ -42461,6 +42209,12 @@ exports[`getDMMF success simple model, sqlite 2`] = ` "desc", ], }, + { + "name": "TransactionIsolationLevel", + "values": [ + "Serializable", + ], + }, ], }, "fieldRefTypes": {}, @@ -44855,12 +44609,6 @@ exports[`getDMMF success simple model, sqlite 2`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "AScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -44955,12 +44703,6 @@ exports[`getDMMF success simple model, sqlite 2`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "AScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", @@ -45055,12 +44797,6 @@ exports[`getDMMF success simple model, sqlite 2`] = ` }, { "inputTypes": [ - { - "isList": false, - "location": "enumTypes", - "namespace": "prisma", - "type": "AScalarFieldEnum", - }, { "isList": true, "location": "enumTypes", diff --git a/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.ts b/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.ts index 4d69c3282d59..f7a51405ecd1 100644 --- a/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.ts +++ b/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.ts @@ -1,4 +1,4 @@ -import { Command, detect, getCommand } from '@antfu/ni' +import { Command, detect, getCommand } from '@prisma/ni' /** * Get the command to run for the given package manager in the given directory. diff --git a/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.ts b/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.ts index 5be88a905e67..2506c9b45ff0 100644 --- a/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.ts +++ b/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.ts @@ -1,4 +1,4 @@ -import { Command } from '@antfu/ni' +import { Command } from '@prisma/ni' import execa from 'execa' import { getPackageCmd } from './getPackageCmd' diff --git a/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.ts b/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.ts index 84bab8925c9d..d49aa2707529 100644 --- a/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.ts +++ b/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.ts @@ -1,4 +1,4 @@ -import { detect } from '@antfu/ni' +import { detect } from '@prisma/ni' export async function isYarnUsed(baseDir: string): Promise { const packageManager = await detect({ cwd: baseDir, autoInstall: false }) diff --git a/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.ts b/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.ts index a8f17b40009c..b6e43a4500da 100644 --- a/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.ts +++ b/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.ts @@ -66,8 +66,8 @@ export async function prismaClientResolver(baseDir: string, version?: string) { `Could not resolve ${missingCli(`${bold('prisma')} and `)}${bold( '@prisma/client', )} in the current project. Please install ${hasCli('it')}${missingCli('them')} with ${missingCli( - `${bold(green(`${await getPackageCmd(baseDir, 'add', 'prisma', '-D')}`))} and `, - )}${bold(green(`${await getPackageCmd(baseDir, 'add', '@prisma/client')}`))}, and rerun ${bold( + `${bold(green(`${getPackageCmd(baseDir, 'add', 'prisma', '-D')}`))} and `, + )}${bold(green(`${getPackageCmd(baseDir, 'add', '@prisma/client')}`))}, and rerun ${bold( await getPackageCmd(baseDir, 'execute', 'prisma generate'), )} 🙏.`, ) @@ -86,7 +86,7 @@ export async function prismaClientResolver(baseDir: string, version?: string) { throw new Error( `Could not resolve @prisma/client despite the installation that we just tried. Please try to install it by hand with ${bold( - green(`${await getPackageCmd(baseDir, 'add', '@prisma/client')}`), + green(`${getPackageCmd(baseDir, 'add', '@prisma/client')}`), )} and rerun ${bold(await getPackageCmd(baseDir, 'execute', 'prisma generate'))} 🙏.`, ) } diff --git a/packages/internals/src/index.ts b/packages/internals/src/index.ts index 980c939e86f6..a8e9c93272f4 100644 --- a/packages/internals/src/index.ts +++ b/packages/internals/src/index.ts @@ -74,7 +74,7 @@ export { loadEnvFile } from './utils/loadEnvFile' export { mapObjectValues } from './utils/mapObjectValues' export { mapPreviewFeatures } from './utils/mapPreviewFeatures' export { maskSchema } from './utils/maskSchema' -export { maxBy, maxWithComparator } from './utils/max' +export { maxBy } from './utils/maxBy' export { missingGeneratorMessage } from './utils/missingGeneratorMessage' export { parseBinaryTargetsEnvValue, parseEnvValue } from './utils/parseEnvValue' export { pathToPosix } from './utils/path' diff --git a/packages/internals/src/utils/max.test.ts b/packages/internals/src/utils/max.test.ts deleted file mode 100644 index 877a42cd43e9..000000000000 --- a/packages/internals/src/utils/max.test.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { maxBy, maxWithComparator } from './max' - -describe('maxWithComparator', () => { - test('empty array', () => { - expect(maxWithComparator([], () => 0)).toBe(undefined) - }) - - test('with items', () => { - const items = [{ count: 1 }, { count: 10 }, { count: 5 }] - expect(maxWithComparator(items, (a, b) => a.count - b.count)).toBe(items[1]) - }) -}) - -describe('maxBy', () => { - test('empty array', () => { - expect(maxBy([], () => 1)).toBe(undefined) - }) - - test('with items', () => { - const items = [{ count: 1 }, { count: 10 }, { count: 5 }] - expect(maxBy(items, (item) => item.count)).toBe(items[1]) - }) -}) diff --git a/packages/internals/src/utils/max.ts b/packages/internals/src/utils/max.ts deleted file mode 100644 index e1372721784b..000000000000 --- a/packages/internals/src/utils/max.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Accepts an array and comparator function (similar to Array.prototype.sort) - * and returns max element of that array, ordered with that comparator. - * Functionally, equivalent of items.sort(comparator).at(-1), but performed non-destructively - * in O(n) - * @param items - * @param comparator callback specifying the relative order of two items. See `Array.prototype.sort` - * @returns - */ -export function maxWithComparator(items: T[], comparator: (a: T, b: T) => number): T | undefined { - if (items.length === 0) { - return undefined - } - let result = items[0] - - for (let i = 1; i < items.length; i++) { - const compareValue = comparator(result, items[i]) - // comparator returning negative number means that b>a - if (compareValue < 0) { - result = items[i] - } - } - return result -} - -export function maxBy(items: T[], callback: (item: T) => number): T | undefined { - return maxWithComparator(items, (a, b) => callback(a) - callback(b)) -} diff --git a/packages/internals/src/utils/maxBy.test.ts b/packages/internals/src/utils/maxBy.test.ts new file mode 100644 index 000000000000..70af950c2424 --- /dev/null +++ b/packages/internals/src/utils/maxBy.test.ts @@ -0,0 +1,10 @@ +import { maxBy } from './maxBy' + +test('empty array', () => { + expect(maxBy([], () => 1)).toBe(undefined) +}) + +test('with items', () => { + const items = [{ count: 1 }, { count: 10 }, { count: 5 }] + expect(maxBy(items, (item) => item.count)).toBe(items[1]) +}) diff --git a/packages/internals/src/utils/maxBy.ts b/packages/internals/src/utils/maxBy.ts new file mode 100644 index 000000000000..01c76bb72784 --- /dev/null +++ b/packages/internals/src/utils/maxBy.ts @@ -0,0 +1,16 @@ +export function maxBy(items: T[], callback: (item: T) => number): T | undefined { + if (items.length === 0) { + return undefined + } + let result = items[0] + let max = callback(items[0]) + + for (let i = 1; i < items.length; i++) { + const value = callback(items[i]) + if (value > max) { + max = value + result = items[i] + } + } + return result +} diff --git a/packages/migrate/README.md b/packages/migrate/README.md index d73f6e2b9c0e..cd6b09ccf8e8 100644 --- a/packages/migrate/README.md +++ b/packages/migrate/README.md @@ -17,8 +17,6 @@   •   Slack   •   - Discord -   •   Twitter diff --git a/packages/migrate/package.json b/packages/migrate/package.json index 170d8e16179d..ad836d1254f8 100644 --- a/packages/migrate/package.json +++ b/packages/migrate/package.json @@ -17,14 +17,14 @@ "version": "latest" }, "devDependencies": { - "@prisma/engines-version": "4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309", + "@prisma/engines-version": "4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944", "@prisma/generator-helper": "workspace:*", "@prisma/internals": "workspace:*", - "@swc/core": "1.3.64", + "@swc/core": "1.3.32", "@swc/jest": "0.2.26", - "@types/jest": "29.5.2", - "@types/node": "18.16.16", - "@types/pg": "8.10.2", + "@types/jest": "29.5.1", + "@types/node": "18.16.14", + "@types/pg": "8.10.1", "@types/prompts": "2.4.4", "@types/sqlite3": "3.1.8", "esbuild": "0.15.13", @@ -43,7 +43,6 @@ "@prisma/debug": "workspace:*", "@prisma/get-platform": "workspace:*", "@sindresorhus/slugify": "1.1.2", - "arg": "5.0.2", "execa": "5.1.1", "fp-ts": "2.16.0", "get-stdin": "8.0.0", @@ -51,8 +50,8 @@ "indent-string": "4.0.0", "kleur": "4.1.5", "log-update": "4.0.0", - "mariadb": "3.2.0", - "mongoose": "6.11.2", + "mariadb": "3.1.1", + "mongoose": "6.11.1", "mssql": "9.1.1", "ora": "5.4.1", "pg": "8.10.0", diff --git a/packages/migrate/src/utils/getSchemaPathAndPrint.ts b/packages/migrate/src/utils/getSchemaPathAndPrint.ts index 649eb38fed5c..dacddda3a147 100644 --- a/packages/migrate/src/utils/getSchemaPathAndPrint.ts +++ b/packages/migrate/src/utils/getSchemaPathAndPrint.ts @@ -21,7 +21,7 @@ export async function getSchemaPathAndPrint(schemaPathProvided?: string, postins if (!schemaPath) { // Special case for Generate command if (postinstallCwd) { - logger.warn(`We could not find your Prisma schema at \`prisma/schema.prisma\`. + logger.warn(`The postinstall script automatically ran \`prisma generate\` and did not find your \`prisma/schema.prisma\`. If you have a Prisma schema file in a custom path, you will need to run \`prisma generate --schema=./path/to/your/schema.prisma\` to generate Prisma Client. If you do not have a Prisma schema file yet, you can ignore this message.`) diff --git a/packages/nextjs-monorepo-workaround-plugin/package.json b/packages/nextjs-monorepo-workaround-plugin/package.json index 7dba220e7cf6..6c762407c549 100644 --- a/packages/nextjs-monorepo-workaround-plugin/package.json +++ b/packages/nextjs-monorepo-workaround-plugin/package.json @@ -21,6 +21,6 @@ "author": "Pierre-Antoine Mills", "license": "Apache-2.0", "devDependencies": { - "webpack": "5.87.0" + "webpack": "5.84.0" } } diff --git a/packages/ni/.gitignore b/packages/ni/.gitignore new file mode 100644 index 000000000000..6ce7699db887 --- /dev/null +++ b/packages/ni/.gitignore @@ -0,0 +1,85 @@ +# Created by .ignore support plugin (hsz.mobi) +### Node template +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + +# parcel-bundler cache (https://parceljs.org/) +.cache + +# next.js build output +.next + +# nuxt.js build output +.nuxt + +# Nuxt generate +dist + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless + +# IDE +.idea +_storage.json + +# System files +.DS_Store diff --git a/packages/ni/LICENSE b/packages/ni/LICENSE new file mode 100644 index 000000000000..8a0000bb9122 --- /dev/null +++ b/packages/ni/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Anthony Fu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/ni/README.md b/packages/ni/README.md new file mode 100644 index 000000000000..be6c78307544 --- /dev/null +++ b/packages/ni/README.md @@ -0,0 +1,5 @@ +# ni + +A port of `ni` while waiting for this PR to merge https://github.com/antfu/ni/pull/151 + +Warning: This is an internal package and will be deprecated once the PR is merged. diff --git a/packages/ni/helpers/build.ts b/packages/ni/helpers/build.ts new file mode 100644 index 000000000000..e375c8f69605 --- /dev/null +++ b/packages/ni/helpers/build.ts @@ -0,0 +1,10 @@ +import { BuildOptions, build } from '../../../helpers/compile/build' + +const defaultBuildConfig: BuildOptions = { + name: 'default', + bundle: true, + entryPoints: ['src/index.ts'], + outfile: 'dist/index', +} + +void build([defaultBuildConfig]) diff --git a/packages/ni/package.json b/packages/ni/package.json new file mode 100644 index 000000000000..d875cae5e729 --- /dev/null +++ b/packages/ni/package.json @@ -0,0 +1,53 @@ +{ + "name": "@prisma/ni", + "version": "0.0.0", + "description": "Use the right package manager", + "author": "Anthony Fu ", + "license": "MIT", + "homepage": "https://github.com/antfu/ni#readme", + "repository": { + "type": "git", + "url": "git+https://github.com/antfu/ni.git" + }, + "bugs": { + "url": "https://github.com/antfu/ni/issues" + }, + "main": "dist/index.js", + "types": "dist/index.d.ts", + "files": [ + "dist" + ], + "scripts": { + "dev": "DEV=true node -r esbuild-register helpers/build.ts", + "build": "node -r esbuild-register helpers/build.ts", + "prepublishOnly": "pnpm run build" + }, + "devDependencies": { + "@antfu/eslint-config": "0.39.1", + "@posva/prompts": "2.4.4", + "@types/fs-extra": "11.0.1", + "@types/ini": "1.3.31", + "@types/node": "18.16.14", + "@types/which": "3.0.0", + "bumpp": "9.1.0", + "eslint": "8.41.0", + "esno": "0.16.3", + "execa": "7.1.1", + "fast-glob": "3.2.12", + "find-up": "6.3.0", + "fs-extra": "11.1.1", + "fzf": "0.5.1", + "ini": "4.1.1", + "kleur": "4.1.5", + "rimraf": "4.4.1", + "terminal-link": "3.0.0", + "typescript": "4.9.5", + "unbuild": "1.2.0", + "vitest": "0.31.1", + "which": "3.0.0" + }, + "eslintConfig": { + "extends": "@antfu" + }, + "sideEffects": false +} diff --git a/packages/ni/src/agents.ts b/packages/ni/src/agents.ts new file mode 100644 index 000000000000..852b012c54d3 --- /dev/null +++ b/packages/ni/src/agents.ts @@ -0,0 +1,102 @@ +const npmRun = (agent: string) => (args: string[]) => { + if (args.length > 1) + return `${agent} run ${args[0]} -- ${args.slice(1).join(' ')}` + else return `${agent} run ${args[0]}` +} + +const yarn = { + 'agent': 'yarn {0}', + 'run': 'yarn run {0}', + 'install': 'yarn install {0}', + 'frozen': 'yarn install --frozen-lockfile', + 'global': 'yarn global add {0}', + 'add': 'yarn add {0}', + 'upgrade': 'yarn upgrade {0}', + 'upgrade-interactive': 'yarn upgrade-interactive {0}', + 'execute': 'npx {0}', + 'uninstall': 'yarn remove {0}', + 'global_uninstall': 'yarn global remove {0}', +} +const pnpm = { + 'agent': 'pnpm {0}', + 'run': 'pnpm run {0}', + 'install': 'pnpm i {0}', + 'frozen': 'pnpm i --frozen-lockfile', + 'global': 'pnpm add -g {0}', + 'add': 'pnpm add {0}', + 'upgrade': 'pnpm update {0}', + 'upgrade-interactive': 'pnpm update -i {0}', + 'execute': 'pnpm dlx {0}', + 'uninstall': 'pnpm remove {0}', + 'global_uninstall': 'pnpm remove --global {0}', +} +const bun = { + 'agent': 'bun {0}', + 'run': 'bun run {0}', + 'install': 'bun install {0}', + 'frozen': 'bun install --no-save', + 'global': 'bun add -g {0}', + 'add': 'bun add {0}', + 'upgrade': null, + 'upgrade-interactive': null, + 'execute': 'bunx {0}', + 'uninstall': 'bun remove {0}', + 'global_uninstall': 'bun remove -g {0}', +} + +export const AGENTS = { + 'npm': { + 'agent': 'npm {0}', + 'run': npmRun('npm'), + 'install': 'npm i {0}', + 'frozen': 'npm ci', + 'global': 'npm i -g {0}', + 'add': 'npm i {0}', + 'upgrade': 'npm update {0}', + 'upgrade-interactive': null, + 'execute': 'npx {0}', + 'uninstall': 'npm uninstall {0}', + 'global_uninstall': 'npm uninstall -g {0}', + }, + 'yarn': yarn, + 'yarn@berry': { + ...yarn, + 'frozen': 'yarn install --immutable', + 'upgrade': 'yarn up {0}', + 'upgrade-interactive': 'yarn up -i {0}', + 'execute': 'yarn dlx {0}', + // Yarn 2+ removed 'global', see https://github.com/yarnpkg/berry/issues/821 + 'global': 'npm i -g {0}', + 'global_uninstall': 'npm uninstall -g {0}', + }, + 'pnpm': pnpm, + // pnpm v6.x or below + 'pnpm@6': { + ...pnpm, + run: npmRun('pnpm'), + }, + 'bun': bun, +} + +export type Agent = keyof typeof AGENTS +export type Command = keyof typeof AGENTS.npm + +export const agents = Object.keys(AGENTS) as Agent[] + +// the order here matters, more specific one comes first +export const LOCKS: Record = { + 'bun.lockb': 'bun', + 'pnpm-lock.yaml': 'pnpm', + 'yarn.lock': 'yarn', + 'package-lock.json': 'npm', + 'npm-shrinkwrap.json': 'npm', +} + +export const INSTALL_PAGE: Record = { + 'bun': 'https://bun.sh', + 'pnpm': 'https://pnpm.io/installation', + 'pnpm@6': 'https://pnpm.io/6.x/installation', + 'yarn': 'https://classic.yarnpkg.com/en/docs/install', + 'yarn@berry': 'https://yarnpkg.com/getting-started/install', + 'npm': 'https://docs.npmjs.com/cli/v8/configuring-npm/install', +} diff --git a/packages/ni/src/commands/index.ts b/packages/ni/src/commands/index.ts new file mode 100644 index 000000000000..7389c0d1a557 --- /dev/null +++ b/packages/ni/src/commands/index.ts @@ -0,0 +1 @@ +export * from '../index' diff --git a/packages/ni/src/commands/na.ts b/packages/ni/src/commands/na.ts new file mode 100644 index 000000000000..60bb9547d934 --- /dev/null +++ b/packages/ni/src/commands/na.ts @@ -0,0 +1,4 @@ +import { parseNa } from '../parse' +import { runCli } from '../runner' + +runCli(parseNa) diff --git a/packages/ni/src/commands/nci.ts b/packages/ni/src/commands/nci.ts new file mode 100644 index 000000000000..2a5eea80c9c8 --- /dev/null +++ b/packages/ni/src/commands/nci.ts @@ -0,0 +1,7 @@ +import { parseNi } from '../parse' +import { runCli } from '../runner' + +runCli( + (agent, _, hasLock) => parseNi(agent, ['--frozen-if-present'], hasLock), + { autoInstall: true }, +) diff --git a/packages/ni/src/commands/ni.ts b/packages/ni/src/commands/ni.ts new file mode 100644 index 000000000000..2483fd4b6fed --- /dev/null +++ b/packages/ni/src/commands/ni.ts @@ -0,0 +1,4 @@ +import { parseNi } from '../parse' +import { runCli } from '../runner' + +runCli(parseNi) diff --git a/packages/ni/src/commands/nlx.ts b/packages/ni/src/commands/nlx.ts new file mode 100644 index 000000000000..4f0bdbf66205 --- /dev/null +++ b/packages/ni/src/commands/nlx.ts @@ -0,0 +1,4 @@ +import { parseNlx } from '../parse' +import { runCli } from '../runner' + +runCli(parseNlx) diff --git a/packages/ni/src/commands/nr.ts b/packages/ni/src/commands/nr.ts new file mode 100644 index 000000000000..636fe19389bd --- /dev/null +++ b/packages/ni/src/commands/nr.ts @@ -0,0 +1,95 @@ +import type { Choice } from '@posva/prompts' +import prompts from '@posva/prompts' +import c from 'kleur' +import { Fzf } from 'fzf' +import { dump, load } from '../storage' +import { parseNr } from '../parse' +import { getPackageJSON } from '../fs' +import { runCli } from '../runner' + +runCli(async (agent, args, ctx) => { + const storage = await load() + + if (args[0] === '-') { + if (!storage.lastRunCommand) { + if (!ctx?.programmatic) { + console.error('No last command found') + process.exit(1) + } + + throw new Error('No last command found') + } + args[0] = storage.lastRunCommand + } + + if (args.length === 0 && !ctx?.programmatic) { + // support https://www.npmjs.com/package/npm-scripts-info conventions + const pkg = getPackageJSON(ctx) + const scripts = pkg.scripts || {} + const scriptsInfo = pkg['scripts-info'] || {} + + const names = Object.entries(scripts) as [string, string][] + + if (!names.length) + return + + const raw = names + .filter(i => !i[0].startsWith('?')) + .map(([key, cmd]) => ({ + key, + cmd, + description: scriptsInfo[key] || scripts[`?${key}`] || cmd, + })) + + const terminalColumns = process.stdout?.columns || 80 + + function limitText(text: string, maxWidth: number) { + if (text.length <= maxWidth) + return text + return `${text.slice(0, maxWidth)}${c.dim('…')}` + } + const choices: Choice[] = raw + .map(({ key, description }) => ({ + title: key, + value: key, + description: limitText(description, terminalColumns - 15), + })) + + const fzf = new Fzf(raw, { + selector: item => `${item.key} ${item.description}`, + casing: 'case-insensitive', + }) + + if (storage.lastRunCommand) { + const last = choices.find(i => i.value === storage.lastRunCommand) + if (last) + choices.unshift(last) + } + + try { + const { fn } = await prompts({ + name: 'fn', + message: 'script to run', + type: 'autocomplete', + choices, + async suggest(input: string, choices: Choice[]) { + const results = fzf.find(input) + return results.map(r => choices.find(c => c.value === r.item.key)) + }, + }) + if (!fn) + return + args.push(fn) + } + catch (e) { + process.exit(1) + } + } + + if (storage.lastRunCommand !== args[0]) { + storage.lastRunCommand = args[0] + dump() + } + + return parseNr(agent, args) +}) diff --git a/packages/ni/src/commands/nu.ts b/packages/ni/src/commands/nu.ts new file mode 100644 index 000000000000..6d9f4e43f3f8 --- /dev/null +++ b/packages/ni/src/commands/nu.ts @@ -0,0 +1,4 @@ +import { parseNu } from '../parse' +import { runCli } from '../runner' + +runCli(parseNu) diff --git a/packages/ni/src/commands/nun.ts b/packages/ni/src/commands/nun.ts new file mode 100644 index 000000000000..204b7cb409cc --- /dev/null +++ b/packages/ni/src/commands/nun.ts @@ -0,0 +1,4 @@ +import { parseNun } from '../parse' +import { runCli } from '../runner' + +runCli(parseNun) diff --git a/packages/ni/src/config.ts b/packages/ni/src/config.ts new file mode 100644 index 000000000000..7dbbcee66004 --- /dev/null +++ b/packages/ni/src/config.ts @@ -0,0 +1,57 @@ +import fs from 'fs' +import path from 'path' +import ini from 'ini' +import { findUp } from 'find-up' +import type { Agent } from './agents' +import { LOCKS } from './agents' + +const customRcPath = process.env.NI_CONFIG_FILE + +const home = process.platform === 'win32' + ? process.env.USERPROFILE + : process.env.HOME + +const defaultRcPath = path.join(home || '~/', '.nirc') + +const rcPath = customRcPath || defaultRcPath + +interface Config { + defaultAgent: Agent | 'prompt' + globalAgent: Agent +} + +const defaultConfig: Config = { + defaultAgent: 'prompt', + globalAgent: 'npm', +} + +let config: Config | undefined + +export async function getConfig(): Promise { + if (!config) { + const result = await findUp('package.json') || '' + let packageManager = '' + if (result) + packageManager = JSON.parse(fs.readFileSync(result, 'utf8')).packageManager ?? '' + const [, agent, version] = packageManager.match(new RegExp(`^(${Object.values(LOCKS).join('|')})@(\d).*?$`)) || [] + if (agent) + config = Object.assign({}, defaultConfig, { defaultAgent: (agent === 'yarn' && parseInt(version) > 1) ? 'yarn@berry' : agent }) + else if (!fs.existsSync(rcPath)) + config = defaultConfig + else + config = Object.assign({}, defaultConfig, ini.parse(fs.readFileSync(rcPath, 'utf-8'))) + } + return config +} + +export async function getDefaultAgent(programmatic?: boolean) { + const { defaultAgent } = await getConfig() + if (defaultAgent === 'prompt' && (programmatic || process.env.CI)) + return 'npm' + return defaultAgent +} + +export async function getGlobalAgent() { + const { globalAgent } = await getConfig() + return globalAgent +} diff --git a/packages/ni/src/detect.ts b/packages/ni/src/detect.ts new file mode 100644 index 000000000000..066749f3e2d2 --- /dev/null +++ b/packages/ni/src/detect.ts @@ -0,0 +1,75 @@ +import fs from 'fs' +import path from 'path' +import { execaCommand } from 'execa' +import { findUp } from 'find-up' +import terminalLink from 'terminal-link' +import prompts from '@posva/prompts' +import type { Agent } from './agents' +import { AGENTS, INSTALL_PAGE, LOCKS } from './agents' +import { cmdExists } from './utils' + +export interface DetectOptions { + autoInstall?: boolean + programmatic?: boolean + cwd?: string +} + +export async function detect({ autoInstall, programmatic, cwd }: DetectOptions = {}) { + let agent: Agent | null = null + let version: string | null = null + + const lockPath = await findUp(Object.keys(LOCKS), { cwd }) + let packageJsonPath: string | undefined + + if (lockPath) + packageJsonPath = path.resolve(lockPath, '../package.json') + else + packageJsonPath = await findUp('package.json', { cwd }) + + // read `packageManager` field in package.json + if (packageJsonPath && fs.existsSync(packageJsonPath)) { + try { + const pkg = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')) + if (typeof pkg.packageManager === 'string') { + const [name, ver] = pkg.packageManager.split('@') + version = ver + if (name === 'yarn' && parseInt(ver) > 1) + agent = 'yarn@berry' + else if (name === 'pnpm' && parseInt(ver) < 7) + agent = 'pnpm@6' + else if (name in AGENTS) + agent = name + else if (!programmatic) + console.warn('[ni] Unknown packageManager:', pkg.packageManager) + } + } + catch {} + } + + // detect based on lock + if (!agent && lockPath) + agent = LOCKS[path.basename(lockPath)] + + // auto install + if (agent && !cmdExists(agent.split('@')[0]) && !programmatic) { + if (!autoInstall) { + console.warn(`[ni] Detected ${agent} but it doesn't seem to be installed.\n`) + + if (process.env.CI) + process.exit(1) + + const link = terminalLink(agent, INSTALL_PAGE[agent]) + const { tryInstall } = await prompts({ + name: 'tryInstall', + type: 'confirm', + message: `Would you like to globally install ${link}?`, + }) + if (!tryInstall) + process.exit(1) + } + + await execaCommand(`npm i -g ${agent}${version ? `@${version}` : ''}`, { stdio: 'inherit', cwd }) + } + + return agent +} diff --git a/packages/ni/src/fs.ts b/packages/ni/src/fs.ts new file mode 100644 index 000000000000..b53a2232f854 --- /dev/null +++ b/packages/ni/src/fs.ts @@ -0,0 +1,24 @@ +import { resolve } from 'path' +import fs from 'fs' +import type { RunnerContext } from './runner' + +export function getPackageJSON(ctx?: RunnerContext): any { + const cwd = ctx?.cwd ?? process.cwd() + const path = resolve(cwd, 'package.json') + + if (fs.existsSync(path)) { + try { + const raw = fs.readFileSync(path, 'utf-8') + const data = JSON.parse(raw) + return data + } + catch (e) { + if (!ctx?.programmatic) { + console.warn('Failed to parse package.json') + process.exit(1) + } + + throw e + } + } +} diff --git a/packages/ni/src/index.ts b/packages/ni/src/index.ts new file mode 100644 index 000000000000..7bbc4b91fef2 --- /dev/null +++ b/packages/ni/src/index.ts @@ -0,0 +1,6 @@ +export * from './agents' +export * from './config' +export * from './detect' +export * from './parse' +export * from './runner' +export * from './utils' diff --git a/packages/ni/src/parse.ts b/packages/ni/src/parse.ts new file mode 100644 index 000000000000..3ed51ca0b377 --- /dev/null +++ b/packages/ni/src/parse.ts @@ -0,0 +1,84 @@ +import type { Agent, Command } from './agents' +import { AGENTS } from './agents' +import { exclude } from './utils' +import type { Runner } from './runner' + +export class UnsupportedCommand extends Error { + constructor({ agent, command }: { agent: Agent; command: Command }) { + super(`Command "${command}" is not support by agent "${agent}"`) + } +} + +export function getCommand( + agent: Agent, + command: Command, + args: string[] = [], +) { + if (!(agent in AGENTS)) + throw new Error(`Unsupported agent "${agent}"`) + + const c = AGENTS[agent][command] + + if (typeof c === 'function') + return c(args) + + if (!c) + throw new UnsupportedCommand({ agent, command }) + + return c.replace('{0}', args.join(' ')).trim() +} + +export const parseNi = ((agent, args, ctx) => { + // bun use `-d` instead of `-D`, #90 + if (agent === 'bun') + args = args.map(i => i === '-D' ? '-d' : i) + + if (args.includes('-g')) + return getCommand(agent, 'global', exclude(args, '-g')) + + if (args.includes('--frozen-if-present')) { + args = exclude(args, '--frozen-if-present') + return getCommand(agent, ctx?.hasLock ? 'frozen' : 'install', args) + } + + if (args.includes('--frozen')) + return getCommand(agent, 'frozen', exclude(args, '--frozen')) + + if (args.length === 0 || args.every(i => i.startsWith('-'))) + return getCommand(agent, 'install', args) + + return getCommand(agent, 'add', args) +}) + +export const parseNr = ((agent, args) => { + if (args.length === 0) + args.push('start') + + if (args.includes('--if-present')) { + args = exclude(args, '--if-present') + args[0] = `--if-present ${args[0]}` + } + + return getCommand(agent, 'run', args) +}) + +export const parseNu = ((agent, args) => { + if (args.includes('-i')) + return getCommand(agent, 'upgrade-interactive', exclude(args, '-i')) + + return getCommand(agent, 'upgrade', args) +}) + +export const parseNun = ((agent, args) => { + if (args.includes('-g')) + return getCommand(agent, 'global_uninstall', exclude(args, '-g')) + return getCommand(agent, 'uninstall', args) +}) + +export const parseNlx = ((agent, args) => { + return getCommand(agent, 'execute', args) +}) + +export const parseNa = ((agent, args) => { + return getCommand(agent, 'agent', args) +}) diff --git a/packages/ni/src/runner.ts b/packages/ni/src/runner.ts new file mode 100644 index 000000000000..027c59ba311d --- /dev/null +++ b/packages/ni/src/runner.ts @@ -0,0 +1,109 @@ +/* eslint-disable no-console */ +import { resolve } from 'path' +import prompts from '@posva/prompts' +import { execaCommand } from 'execa' +import c from 'kleur' +import { version } from '../package.json' +import type { Agent } from './agents' +import { agents } from './agents' +import { getDefaultAgent, getGlobalAgent } from './config' +import type { DetectOptions } from './detect' +import { detect } from './detect' +import { getVoltaPrefix, remove } from './utils' +import { UnsupportedCommand } from './parse' + +const DEBUG_SIGN = '?' + +export interface RunnerContext { + programmatic?: boolean + hasLock?: boolean + cwd?: string +} + +export type Runner = (agent: Agent, args: string[], ctx?: RunnerContext) => Promise | string | undefined + +export async function runCli(fn: Runner, options: DetectOptions = {}) { + const args = process.argv.slice(2).filter(Boolean) + try { + await run(fn, args, options) + } + catch (error) { + if (error instanceof UnsupportedCommand && !options.programmatic) + console.log(c.red(`\u2717 ${error.message}`)) + + if (!options.programmatic) + process.exit(1) + + throw error + } +} + +export async function run(fn: Runner, args: string[], options: DetectOptions = {}) { + const debug = args.includes(DEBUG_SIGN) + if (debug) + remove(args, DEBUG_SIGN) + + let cwd = options.cwd ?? process.cwd() + let command + + if (args.length === 1 && (args[0] === '--version' || args[0] === '-v')) { + console.log(`@antfu/ni v${version}`) + return + } + + if (args.length === 1 && ['-h', '--help'].includes(args[0])) { + const dash = c.dim('-') + console.log(c.green(c.bold('@antfu/ni')) + c.dim(` use the right package manager v${version}\n`)) + console.log(`ni ${dash} install`) + console.log(`nr ${dash} run`) + console.log(`nlx ${dash} execute`) + console.log(`nu ${dash} upgrade`) + console.log(`nun ${dash} uninstall`) + console.log(`nci ${dash} clean install`) + console.log(`na ${dash} agent alias`) + console.log(c.yellow('\ncheck https://github.com/antfu/ni for more documentation.')) + return + } + + if (args[0] === '-C') { + cwd = resolve(cwd, args[1]) + args.splice(0, 2) + } + + const isGlobal = args.includes('-g') + if (isGlobal) { + command = await fn(await getGlobalAgent(), args) + } + else { + let agent = await detect({ ...options, cwd }) || await getDefaultAgent(options.programmatic) + if (agent === 'prompt') { + agent = (await prompts({ + name: 'agent', + type: 'select', + message: 'Choose the agent', + choices: agents.filter(i => !i.includes('@')).map(value => ({ title: value, value })), + })).agent + if (!agent) + return + } + command = await fn(agent as Agent, args, { + programmatic: options.programmatic, + hasLock: Boolean(agent), + cwd, + }) + } + + if (!command) + return + + const voltaPrefix = getVoltaPrefix() + if (voltaPrefix) + command = voltaPrefix.concat(' ').concat(command) + + if (debug) { + console.log(command) + return + } + + await execaCommand(command, { stdio: 'inherit', encoding: 'utf-8', cwd }) +} diff --git a/packages/ni/src/storage.ts b/packages/ni/src/storage.ts new file mode 100644 index 000000000000..f1203a27a7e7 --- /dev/null +++ b/packages/ni/src/storage.ts @@ -0,0 +1,31 @@ +import { existsSync, promises as fs } from 'fs' +import { resolve } from 'path' +import { CLI_TEMP_DIR, writeFileSafe } from './utils' + +export interface Storage { + lastRunCommand?: string +} + +let storage: Storage | undefined + +const storagePath = resolve(CLI_TEMP_DIR, '_storage.json') + +export async function load(fn?: (storage: Storage) => Promise | boolean) { + if (!storage) { + storage = existsSync(storagePath) + ? (JSON.parse(await fs.readFile(storagePath, 'utf-8') || '{}') || {}) + : {} + } + + if (fn) { + if (await fn(storage!)) + await dump() + } + + return storage! +} + +export async function dump() { + if (storage) + await writeFileSafe(storagePath, JSON.stringify(storage)) +} diff --git a/packages/ni/src/utils.ts b/packages/ni/src/utils.ts new file mode 100644 index 000000000000..dfce247c0756 --- /dev/null +++ b/packages/ni/src/utils.ts @@ -0,0 +1,91 @@ +import os from 'os' +import { dirname, join } from 'path' +import { existsSync, promises as fs } from 'fs' +import which from 'which' + +export const CLI_TEMP_DIR = join(os.tmpdir(), 'antfu-ni') + +export function remove(arr: T[], v: T) { + const index = arr.indexOf(v) + if (index >= 0) + arr.splice(index, 1) + + return arr +} + +export function exclude(arr: T[], v: T) { + return arr.slice().filter(item => item !== v) +} + +export function cmdExists(cmd: string) { + return which.sync(cmd, { nothrow: true }) !== null +} + +export function getVoltaPrefix(): string { + // https://blog.volta.sh/2020/11/25/command-spotlight-volta-run/ + const VOLTA_PREFIX = 'volta run' + const hasVoltaCommand = cmdExists('volta') + return hasVoltaCommand ? VOLTA_PREFIX : '' +} + +interface TempFile { + path: string + fd: fs.FileHandle + cleanup: () => void +} + +let counter = 0 + +async function openTemp(): Promise { + if (!existsSync(CLI_TEMP_DIR)) + await fs.mkdir(CLI_TEMP_DIR, { recursive: true }) + + const competitivePath = join(CLI_TEMP_DIR, `.${process.pid}.${counter}`) + counter++ + + return fs.open(competitivePath, 'wx') + .then(fd => ({ + fd, + path: competitivePath, + cleanup() { + fd.close().then(() => { + if (existsSync(competitivePath)) + fs.unlink(competitivePath) + }) + }, + })) + .catch((error: any) => { + if (error && error.code === 'EEXIST') + return openTemp() + + else + return undefined + }) +} + +/** + * Write file safely avoiding conflicts + */ +export async function writeFileSafe( + path: string, + data: string | Buffer = '', +): Promise { + const temp = await openTemp() + + if (temp) { + fs.writeFile(temp.path, data) + .then(() => { + const directory = dirname(path) + if (!existsSync(directory)) + fs.mkdir(directory, { recursive: true }) + + return fs.rename(temp.path, path) + .then(() => true) + .catch(() => false) + }) + .catch(() => false) + .finally(temp.cleanup) + } + + return false +} diff --git a/packages/ni/tsconfig.build.json b/packages/ni/tsconfig.build.json new file mode 100644 index 000000000000..1eae4ca25256 --- /dev/null +++ b/packages/ni/tsconfig.build.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.build.regular.json", + "compilerOptions": { + "outDir": "dist" + }, + "include": ["src"] +} diff --git a/packages/ni/tsconfig.json b/packages/ni/tsconfig.json new file mode 100644 index 000000000000..4082f16a5d91 --- /dev/null +++ b/packages/ni/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "../../tsconfig.json" +} diff --git a/packages/react-prisma/package.json b/packages/react-prisma/package.json index 44ae566d9088..f1ccbffa9b69 100644 --- a/packages/react-prisma/package.json +++ b/packages/react-prisma/package.json @@ -14,14 +14,14 @@ "homepage": "https://www.prisma.io", "devDependencies": { "@prisma/client": "workspace:*", - "@types/jest": "29.5.2", - "@types/node": "18.16.18", - "esbuild": "0.18.2", + "@types/jest": "29.5.1", + "@types/node": "18.16.14", + "esbuild": "0.17.19", "jest": "29.5.0", "jest-junit": "16.0.0", "react": "18.2.0", - "typescript": "5.1.3", - "@swc/core": "1.3.63", + "typescript": "5.0.4", + "@swc/core": "1.3.59", "@swc/jest": "0.2.26" }, "scripts": { diff --git a/patches/node-fetch@2.6.11.patch b/patches/node-fetch@2.6.7.patch similarity index 89% rename from patches/node-fetch@2.6.11.patch rename to patches/node-fetch@2.6.7.patch index e1733bf96fbf..8cc3202ab419 100644 --- a/patches/node-fetch@2.6.11.patch +++ b/patches/node-fetch@2.6.7.patch @@ -1,5 +1,5 @@ diff --git a/lib/index.es.js b/lib/index.es.js -index 79d717be9ae56d455f7f5c7890178bc4bb65da9c..2743edfd1347678bb4e27f986d4593466d9df68d 100644 +index 4852f7cbac354d002a601212332187487deb3afa..b334d377a01bf38afcbb1d608a267cad1c58286e 100644 --- a/lib/index.es.js +++ b/lib/index.es.js @@ -3,7 +3,6 @@ process.emitWarning("The .es.js file is deprecated. Use .mjs instead."); @@ -29,7 +29,7 @@ index 79d717be9ae56d455f7f5c7890178bc4bb65da9c..2743edfd1347678bb4e27f986d459346 // fix an issue where "PassThrough", "resolve" aren't a named export for node <10 const PassThrough$1 = Stream.PassThrough; diff --git a/lib/index.js b/lib/index.js -index 337d6e52e5fc62c26f1f46ac115505fa8e327b5c..fb6b624fa38ee57bc50d4fc5891cb98ff3439174 100644 +index e5b04f107f765db04265c7635d3ca1d86b146fb8..c444206f23a5ed50a3301378eb01eba80938c187 100644 --- a/lib/index.js +++ b/lib/index.js @@ -7,7 +7,6 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau @@ -59,7 +59,7 @@ index 337d6e52e5fc62c26f1f46ac115505fa8e327b5c..fb6b624fa38ee57bc50d4fc5891cb98f // fix an issue where "PassThrough", "resolve" aren't a named export for node <10 const PassThrough$1 = Stream.PassThrough; diff --git a/lib/index.mjs b/lib/index.mjs -index ace669fd0fee2f3a0e6ca0d34e46c60377da7c78..99c33037fff71127151906f87b004e379b4ffabf 100644 +index 49ee05ecf06d31a5168795ced5d795c93a0226e3..b5131e05dd9ee23302d5a07cf9e2900a6e8770cc 100644 --- a/lib/index.mjs +++ b/lib/index.mjs @@ -1,7 +1,6 @@ @@ -89,7 +89,7 @@ index ace669fd0fee2f3a0e6ca0d34e46c60377da7c78..99c33037fff71127151906f87b004e37 // fix an issue where "PassThrough", "resolve" aren't a named export for node <10 const PassThrough$1 = Stream.PassThrough; diff --git a/package.json b/package.json -index fd4f67c33f867df64014fea96f9fa275cb793967..ec340331b92165b3901106c6181e8449d94c3f4d 100644 +index 3c1bd8da725bc152ca655843769eaa1fb46369a3..71156daefc7d57130a27613aa584ec9b2610ea86 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,6 @@ @@ -98,5 +98,5 @@ index fd4f67c33f867df64014fea96f9fa275cb793967..ec340331b92165b3901106c6181e8449 "dependencies": { - "whatwg-url": "^5.0.0" }, - "peerDependencies": { + "peerDependencies": { "encoding": "^0.1.0" \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a04e945f1a48..1bbaba087363 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,42 +1,42 @@ lockfileVersion: 5.4 patchedDependencies: - node-fetch@2.6.11: - hash: oawau75ow7jz373yzwkw5fs4ry - path: patches/node-fetch@2.6.11.patch + node-fetch@2.6.7: + hash: 3wcp6bao3dfksocwsfev5pt7km + path: patches/node-fetch@2.6.7.patch importers: .: specifiers: - '@microsoft/api-extractor': 7.36.0 + '@microsoft/api-extractor': 7.35.0 '@sindresorhus/slugify': 1.1.2 '@slack/webhook': 6.1.0 '@types/benchmark': 2.1.2 '@types/fs-extra': 9.0.13 '@types/graphviz': 0.0.35 - '@types/node': 18.16.16 + '@types/node': 18.16.14 '@types/node-fetch': 2.6.4 '@types/redis': 2.8.32 '@types/resolve': 1.20.2 - '@typescript-eslint/eslint-plugin': 5.59.11 - '@typescript-eslint/parser': 5.59.11 + '@typescript-eslint/eslint-plugin': 5.59.6 + '@typescript-eslint/parser': 5.59.6 arg: 5.0.2 batching-toposort: 1.2.0 buffer: 6.0.3 chokidar: 3.5.3 esbuild: 0.15.13 esbuild-register: 3.3.3 - eslint: 8.43.0 + eslint: 8.41.0 eslint-config-prettier: 8.8.0 eslint-plugin-eslint-comments: 3.2.0 eslint-plugin-import: 2.27.5 - eslint-plugin-jest: 27.2.2 + eslint-plugin-jest: 27.2.1 eslint-plugin-prettier: 4.2.1 eslint-plugin-simple-import-sort: 10.0.0 eventemitter3: 5.0.1 execa: 5.1.1 - fs-extra: 11.1.1 + fs-extra: 11.1.0 globby: 11.1.0 graphviz-mit: 0.0.9 husky: 8.0.3 @@ -49,15 +49,15 @@ importers: p-reduce: 2.1.0 p-retry: 4.6.2 path-browserify: 1.0.1 - prettier: 2.8.8 + prettier: 2.8.3 redis: 3.1.2 redis-lock: 0.1.4 regenerator-runtime: 0.13.11 - resolve: 1.22.2 + resolve: 1.22.1 safe-buffer: 5.2.1 semver: 7.5.1 spdx-exceptions: 2.3.0 - spdx-license-ids: 3.0.13 + spdx-license-ids: 3.0.12 staged-git-files: 1.3.0 ts-node: 10.9.1 ts-toolbelt: 9.6.0 @@ -66,34 +66,34 @@ importers: util: 0.12.5 zx: 7.2.2 devDependencies: - '@microsoft/api-extractor': 7.36.0_@types+node@18.16.16 + '@microsoft/api-extractor': 7.35.0_@types+node@18.16.14 '@sindresorhus/slugify': 1.1.2 '@slack/webhook': 6.1.0 '@types/benchmark': 2.1.2 '@types/fs-extra': 9.0.13 '@types/graphviz': 0.0.35 - '@types/node': 18.16.16 + '@types/node': 18.16.14 '@types/node-fetch': 2.6.4 '@types/redis': 2.8.32 '@types/resolve': 1.20.2 - '@typescript-eslint/eslint-plugin': 5.59.11_jxhnufqfdxsaktvg4boo4kir6q - '@typescript-eslint/parser': 5.59.11_2jcgcerbs6bi4debdtwega5q6u + '@typescript-eslint/eslint-plugin': 5.59.6_4qbuxpmdupj46lq2zjlghng6yy + '@typescript-eslint/parser': 5.59.6_5ujgynla27k2qkzlnkldjwsutm arg: 5.0.2 batching-toposort: 1.2.0 buffer: 6.0.3 chokidar: 3.5.3 esbuild: 0.15.13 esbuild-register: 3.3.3_esbuild@0.15.13 - eslint: 8.43.0 - eslint-config-prettier: 8.8.0_eslint@8.43.0 - eslint-plugin-eslint-comments: 3.2.0_eslint@8.43.0 - eslint-plugin-import: 2.27.5_uxlzkvdl7bie3tsj7zcwvawrke - eslint-plugin-jest: 27.2.2_6bt7zv2nmlck33askoehiu6z5u - eslint-plugin-prettier: 4.2.1_zh6vkmzat4wtnmvmftdassiwyu - eslint-plugin-simple-import-sort: 10.0.0_eslint@8.43.0 + eslint: 8.41.0 + eslint-config-prettier: 8.8.0_eslint@8.41.0 + eslint-plugin-eslint-comments: 3.2.0_eslint@8.41.0 + eslint-plugin-import: 2.27.5_4axmhv5rl7cvu7f33ludfwxkcu + eslint-plugin-jest: 27.2.1_5ijt43grezcuiq4jmxee335ut4 + eslint-plugin-prettier: 4.2.1_5m322ea4tv353bxh5dkqp3d3i4 + eslint-plugin-simple-import-sort: 10.0.0_eslint@8.41.0 eventemitter3: 5.0.1 execa: 5.1.1 - fs-extra: 11.1.1 + fs-extra: 11.1.0 globby: 11.1.0 graphviz-mit: 0.0.9 husky: 8.0.3 @@ -101,22 +101,22 @@ importers: jest-junit: 16.0.0 kleur: 4.1.5 lint-staged: 13.2.2 - node-fetch: 2.6.11_oawau75ow7jz373yzwkw5fs4ry + node-fetch: 2.6.11 p-map: 4.0.0 p-reduce: 2.1.0 p-retry: 4.6.2 path-browserify: 1.0.1 - prettier: 2.8.8 + prettier: 2.8.3 redis: 3.1.2 redis-lock: 0.1.4 regenerator-runtime: 0.13.11 - resolve: 1.22.2 + resolve: 1.22.1 safe-buffer: 5.2.1 semver: 7.5.1 spdx-exceptions: 2.3.0 - spdx-license-ids: 3.0.13 + spdx-license-ids: 3.0.12 staged-git-files: 1.3.0 - ts-node: 10.9.1_gbfmtwj2t57hq5iibp7xw5qwjq + ts-node: 10.9.1_ja6kqa52slkljcytwd5yeactma ts-toolbelt: 9.6.0 tty-browserify: 0.0.1 typescript: 4.9.5 @@ -133,22 +133,22 @@ importers: '@prisma/get-platform': workspace:* '@prisma/internals': workspace:* '@prisma/migrate': workspace:* - '@prisma/studio': 0.487.0 - '@prisma/studio-server': 0.487.0 - '@swc/core': 1.3.64 + '@prisma/studio': 0.484.0 + '@prisma/studio-server': 0.484.0 + '@swc/core': 1.3.32 '@swc/jest': 0.2.26 '@types/debug': 4.1.8 '@types/fs-extra': 9.0.13 - '@types/jest': 29.5.2 + '@types/jest': 29.5.1 '@types/rimraf': 3.0.2 - checkpoint-client: 1.1.24 + checkpoint-client: 1.1.23 debug: 4.3.4 dotenv: 16.0.3 esbuild: 0.15.13 execa: 5.1.1 fast-deep-equal: 3.1.3 fast-glob: 3.2.12 - fs-extra: 11.1.1 + fs-extra: 11.1.0 fs-jetpack: 5.1.0 get-port: 5.1.1 global-dirs: 3.0.1 @@ -177,22 +177,22 @@ importers: '@prisma/get-platform': link:../get-platform '@prisma/internals': link:../internals '@prisma/migrate': link:../migrate - '@prisma/studio': 0.487.0 - '@prisma/studio-server': 0.487.0_af2arurw4njyhq5wa6w6rrkc54 - '@swc/core': 1.3.64 - '@swc/jest': 0.2.26_@swc+core@1.3.64 + '@prisma/studio': 0.484.0 + '@prisma/studio-server': 0.484.0_af2arurw4njyhq5wa6w6rrkc54 + '@swc/core': 1.3.32 + '@swc/jest': 0.2.26_@swc+core@1.3.32 '@types/debug': 4.1.8 '@types/fs-extra': 9.0.13 - '@types/jest': 29.5.2 + '@types/jest': 29.5.1 '@types/rimraf': 3.0.2 - checkpoint-client: 1.1.24 + checkpoint-client: 1.1.23 debug: 4.3.4 dotenv: 16.0.3 esbuild: 0.15.13 execa: 5.1.1 fast-deep-equal: 3.1.3 fast-glob: 3.2.12 - fs-extra: 11.1.1 + fs-extra: 11.1.0 fs-jetpack: 5.1.0 get-port: 5.1.1 global-dirs: 3.0.1 @@ -202,7 +202,7 @@ importers: kleur: 4.1.5 line-replace: 2.0.1 log-update: 4.0.0 - node-fetch: 2.6.11_oawau75ow7jz373yzwkw5fs4ry + node-fetch: 2.6.11 npm-packlist: 5.1.3 open: 7.4.2 pkg-up: 3.1.0 @@ -215,8 +215,8 @@ importers: packages/client: specifiers: '@codspeed/benchmark.js-plugin': 1.1.0 - '@faker-js/faker': 8.0.2 - '@fast-check/jest': 1.7.0 + '@faker-js/faker': 8.0.1 + '@fast-check/jest': 1.6.2 '@jest/create-cache-key-function': 29.5.0 '@jest/globals': 29.5.0 '@jest/test-sequencer': 29.5.0 @@ -228,7 +228,7 @@ importers: '@opentelemetry/semantic-conventions': 1.13.0 '@prisma/debug': workspace:* '@prisma/engines': workspace:* - '@prisma/engines-version': 4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309 + '@prisma/engines-version': 4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944 '@prisma/fetch-engine': workspace:* '@prisma/generator-helper': workspace:* '@prisma/get-platform': workspace:* @@ -237,27 +237,27 @@ importers: '@prisma/migrate': workspace:* '@prisma/mini-proxy': 0.7.0 '@swc-node/register': 1.6.5 - '@swc/core': 1.3.64 + '@swc/core': 1.3.32 '@swc/jest': 0.2.26 '@timsuchanek/copy': 1.4.5 '@types/debug': 4.1.8 '@types/fs-extra': 9.0.13 - '@types/jest': 29.5.2 + '@types/jest': 29.5.1 '@types/js-levenshtein': 1.1.1 '@types/mssql': 8.1.2 - '@types/node': 18.16.16 - '@types/pg': 8.10.2 + '@types/node': 18.16.14 + '@types/pg': 8.10.1 '@types/yeoman-generator': 5.2.11 arg: 5.0.2 benchmark: 2.1.4 ci-info: 3.8.0 decimal.js: 10.4.3 - env-paths: 2.2.1 + env-paths: 3.0.0 esbuild: 0.15.13 execa: 5.1.1 - expect-type: 0.16.0 + expect-type: 0.15.0 flat-map-polyfill: 0.3.8 - fs-extra: 11.1.1 + fs-extra: 11.1.0 get-own-enumerable-property-symbols: 3.0.2 get-stream: 6.0.1 globby: 11.1.0 @@ -272,8 +272,8 @@ importers: kleur: 4.1.5 klona: 2.0.6 lz-string: 1.5.0 - mariadb: 3.2.0 - memfs: 3.5.3 + mariadb: 3.0.2 + memfs: 3.5.1 mssql: 9.1.1 new-github-issue-url: 0.2.1 node-fetch: 2.6.11 @@ -281,9 +281,9 @@ importers: pg: 8.9.0 pkg-up: 3.1.0 pluralize: 8.0.0 - resolve: 1.22.2 + resolve: 1.22.1 rimraf: 3.0.2 - simple-statistics: 7.8.3 + simple-statistics: 7.8.2 sort-keys: 4.2.0 source-map-support: 0.5.21 sql-template-tag: 5.0.3 @@ -294,16 +294,16 @@ importers: ts-pattern: 4.3.0 tsd: 0.28.1 typescript: 4.9.5 - undici: 5.22.1 + undici: 5.22.0 yeoman-generator: 5.9.0 yo: 4.3.1 zx: 7.2.2 dependencies: - '@prisma/engines-version': 4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309 + '@prisma/engines-version': 4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944 devDependencies: '@codspeed/benchmark.js-plugin': 1.1.0_benchmark@2.1.4 - '@faker-js/faker': 8.0.2 - '@fast-check/jest': 1.7.0_@jest+globals@29.5.0 + '@faker-js/faker': 8.0.1 + '@fast-check/jest': 1.6.2_@jest+globals@29.5.0 '@jest/create-cache-key-function': 29.5.0 '@jest/globals': 29.5.0 '@jest/test-sequencer': 29.5.0 @@ -322,35 +322,35 @@ importers: '@prisma/internals': link:../internals '@prisma/migrate': link:../migrate '@prisma/mini-proxy': 0.7.0 - '@swc-node/register': 1.6.5_w2a3vrbasjgrtv5bvwiyhpfbku - '@swc/core': 1.3.64 - '@swc/jest': 0.2.26_@swc+core@1.3.64 + '@swc-node/register': 1.6.5_ofrkegp7wplvaewrpezjkk4xzm + '@swc/core': 1.3.32 + '@swc/jest': 0.2.26_@swc+core@1.3.32 '@timsuchanek/copy': 1.4.5 '@types/debug': 4.1.8 '@types/fs-extra': 9.0.13 - '@types/jest': 29.5.2 + '@types/jest': 29.5.1 '@types/js-levenshtein': 1.1.1 '@types/mssql': 8.1.2 - '@types/node': 18.16.16 - '@types/pg': 8.10.2 + '@types/node': 18.16.14 + '@types/pg': 8.10.1 '@types/yeoman-generator': 5.2.11 arg: 5.0.2 benchmark: 2.1.4 ci-info: 3.8.0 decimal.js: 10.4.3 - env-paths: 2.2.1 + env-paths: 3.0.0 esbuild: 0.15.13 execa: 5.1.1 - expect-type: 0.16.0 + expect-type: 0.15.0 flat-map-polyfill: 0.3.8 - fs-extra: 11.1.1 + fs-extra: 11.1.0 get-own-enumerable-property-symbols: 3.0.2 get-stream: 6.0.1 globby: 11.1.0 indent-string: 4.0.0 is-obj: 2.0.0 is-regexp: 2.1.0 - jest: 29.5.0_u3tjahz4lx2ow4rgesw7wigoy4 + jest: 29.5.0_daglcptrsglylliibnnp676h3i jest-junit: 16.0.0 jest-serializer-ansi-escapes: 2.0.1 jest-snapshot: 29.5.0 @@ -358,29 +358,29 @@ importers: kleur: 4.1.5 klona: 2.0.6 lz-string: 1.5.0 - mariadb: 3.2.0 - memfs: 3.5.3 + mariadb: 3.0.2 + memfs: 3.5.1 mssql: 9.1.1 new-github-issue-url: 0.2.1 - node-fetch: 2.6.11_oawau75ow7jz373yzwkw5fs4ry + node-fetch: 2.6.11 p-retry: 4.6.2 pg: 8.9.0 pkg-up: 3.1.0 pluralize: 8.0.0 - resolve: 1.22.2 + resolve: 1.22.1 rimraf: 3.0.2 - simple-statistics: 7.8.3 + simple-statistics: 7.8.2 sort-keys: 4.2.0 source-map-support: 0.5.21 sql-template-tag: 5.0.3 stacktrace-parser: 0.1.10 strip-ansi: 6.0.1 strip-indent: 3.0.0 - ts-node: 10.9.1_5cbqh36kzuqel5avofcbl5rwvu + ts-node: 10.9.1_gedhic2hxbm43qfqfkboxjwb3y ts-pattern: 4.3.0 tsd: 0.28.1 typescript: 4.9.5 - undici: 5.22.1 + undici: 5.22.0 yeoman-generator: 5.9.0 yo: 4.3.1 zx: 7.2.2 @@ -388,8 +388,8 @@ importers: packages/debug: specifiers: '@types/debug': 4.1.8 - '@types/jest': 29.5.2 - '@types/node': 18.16.16 + '@types/jest': 29.5.1 + '@types/node': 18.16.14 debug: 4.3.4 esbuild: 0.15.13 jest: 29.5.0 @@ -401,48 +401,48 @@ importers: debug: 4.3.4 strip-ansi: 6.0.1 devDependencies: - '@types/jest': 29.5.2 - '@types/node': 18.16.16 + '@types/jest': 29.5.1 + '@types/node': 18.16.14 esbuild: 0.15.13 - jest: 29.5.0_@types+node@18.16.16 + jest: 29.5.0_@types+node@18.16.14 jest-junit: 16.0.0 typescript: 4.9.5 packages/engines: specifiers: '@prisma/debug': workspace:* - '@prisma/engines-version': 4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309 + '@prisma/engines-version': 4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944 '@prisma/fetch-engine': workspace:* '@prisma/get-platform': workspace:* - '@swc/core': 1.3.64 + '@swc/core': 1.3.32 '@swc/jest': 0.2.26 - '@types/jest': 29.5.2 - '@types/node': 18.16.16 + '@types/jest': 29.5.1 + '@types/node': 18.16.14 execa: 5.1.1 jest: 29.5.0 typescript: 4.9.5 devDependencies: '@prisma/debug': link:../debug - '@prisma/engines-version': 4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309 + '@prisma/engines-version': 4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944 '@prisma/fetch-engine': link:../fetch-engine '@prisma/get-platform': link:../get-platform - '@swc/core': 1.3.64 - '@swc/jest': 0.2.26_@swc+core@1.3.64 - '@types/jest': 29.5.2 - '@types/node': 18.16.16 + '@swc/core': 1.3.32 + '@swc/jest': 0.2.26_@swc+core@1.3.32 + '@types/jest': 29.5.1 + '@types/node': 18.16.14 execa: 5.1.1 - jest: 29.5.0_@types+node@18.16.16 + jest: 29.5.0_@types+node@18.16.14 typescript: 4.9.5 packages/fetch-engine: specifiers: '@prisma/debug': workspace:* - '@prisma/engines-version': 4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309 + '@prisma/engines-version': 4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944 '@prisma/get-platform': workspace:* - '@swc/core': 1.3.64 + '@swc/core': 1.3.32 '@swc/jest': 0.2.26 - '@types/jest': 29.5.2 - '@types/node': 18.16.16 + '@types/jest': 29.5.1 + '@types/node': 18.16.14 '@types/node-fetch': 2.6.4 '@types/progress': 2.0.5 del: 6.1.1 @@ -450,8 +450,8 @@ importers: find-cache-dir: 3.3.2 fs-extra: 11.1.1 hasha: 5.2.2 - http-proxy-agent: 7.0.0 - https-proxy-agent: 7.0.0 + http-proxy-agent: 5.0.0 + https-proxy-agent: 5.0.1 jest: 29.5.0 kleur: 4.1.5 node-fetch: 2.6.11 @@ -471,10 +471,10 @@ importers: find-cache-dir: 3.3.2 fs-extra: 11.1.1 hasha: 5.2.2 - http-proxy-agent: 7.0.0 - https-proxy-agent: 7.0.0 + http-proxy-agent: 5.0.0 + https-proxy-agent: 5.0.1 kleur: 4.1.5 - node-fetch: 2.6.11_oawau75ow7jz373yzwkw5fs4ry + node-fetch: 2.6.11 p-filter: 2.1.0 p-map: 4.0.0 p-retry: 4.6.2 @@ -483,15 +483,15 @@ importers: temp-dir: 2.0.0 tempy: 1.0.1 devDependencies: - '@prisma/engines-version': 4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309 - '@swc/core': 1.3.64 - '@swc/jest': 0.2.26_@swc+core@1.3.64 - '@types/jest': 29.5.2 - '@types/node': 18.16.16 + '@prisma/engines-version': 4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944 + '@swc/core': 1.3.32 + '@swc/jest': 0.2.26_@swc+core@1.3.32 + '@types/jest': 29.5.1 + '@types/node': 18.16.14 '@types/node-fetch': 2.6.4 '@types/progress': 2.0.5 del: 6.1.1 - jest: 29.5.0_@types+node@18.16.16 + jest: 29.5.0_@types+node@18.16.14 strip-ansi: 6.0.1 typescript: 4.9.5 @@ -499,11 +499,11 @@ importers: specifiers: '@prisma/debug': workspace:* '@swc-node/register': 1.6.5 - '@swc/core': 1.3.64 + '@swc/core': 1.3.32 '@swc/jest': 0.2.26 '@types/cross-spawn': 6.0.2 - '@types/jest': 29.5.2 - '@types/node': 18.16.16 + '@types/jest': 29.5.1 + '@types/node': 18.16.14 cross-spawn: 7.0.3 esbuild: 0.15.13 jest: 29.5.0 @@ -517,25 +517,25 @@ importers: cross-spawn: 7.0.3 kleur: 4.1.5 devDependencies: - '@swc-node/register': 1.6.5_w2a3vrbasjgrtv5bvwiyhpfbku - '@swc/core': 1.3.64 - '@swc/jest': 0.2.26_@swc+core@1.3.64 - '@types/jest': 29.5.2 - '@types/node': 18.16.16 + '@swc-node/register': 1.6.5_ofrkegp7wplvaewrpezjkk4xzm + '@swc/core': 1.3.32 + '@swc/jest': 0.2.26_@swc+core@1.3.32 + '@types/jest': 29.5.1 + '@types/node': 18.16.14 esbuild: 0.15.13 - jest: 29.5.0_u3tjahz4lx2ow4rgesw7wigoy4 + jest: 29.5.0_daglcptrsglylliibnnp676h3i jest-junit: 16.0.0 - ts-node: 10.9.1_5cbqh36kzuqel5avofcbl5rwvu + ts-node: 10.9.1_gedhic2hxbm43qfqfkboxjwb3y typescript: 4.9.5 packages/get-platform: specifiers: '@codspeed/benchmark.js-plugin': 1.1.0 '@prisma/debug': workspace:* - '@swc/core': 1.3.64 + '@swc/core': 1.3.32 '@swc/jest': 0.2.26 - '@types/jest': 29.5.2 - '@types/node': 18.16.16 + '@types/jest': 29.5.1 + '@types/node': 18.16.14 benchmark: 2.1.4 escape-string-regexp: 4.0.0 execa: 5.1.1 @@ -562,12 +562,12 @@ importers: ts-pattern: 4.3.0 devDependencies: '@codspeed/benchmark.js-plugin': 1.1.0_benchmark@2.1.4 - '@swc/core': 1.3.64 - '@swc/jest': 0.2.26_@swc+core@1.3.64 - '@types/jest': 29.5.2 - '@types/node': 18.16.16 + '@swc/core': 1.3.32 + '@swc/jest': 0.2.26_@swc+core@1.3.32 + '@types/jest': 29.5.1 + '@types/node': 18.16.14 benchmark: 2.1.4 - jest: 29.5.0_@types+node@18.16.16 + jest: 29.5.0_@types+node@18.16.14 jest-junit: 16.0.0 typescript: 4.9.5 @@ -577,9 +577,9 @@ importers: '@opentelemetry/instrumentation': 0.39.1 '@opentelemetry/sdk-trace-base': 1.13.0 '@prisma/internals': workspace:* - '@swc/core': 1.3.64 - '@types/jest': 29.5.2 - '@types/node': 18.16.16 + '@swc/core': 1.3.32 + '@types/jest': 29.5.1 + '@types/node': 18.16.14 jest: 29.5.0 jest-junit: 16.0.0 typescript: 4.9.5 @@ -589,10 +589,10 @@ importers: '@opentelemetry/sdk-trace-base': 1.13.0_@opentelemetry+api@1.4.1 devDependencies: '@prisma/internals': link:../internals - '@swc/core': 1.3.64 - '@types/jest': 29.5.2 - '@types/node': 18.16.16 - jest: 29.5.0_@types+node@18.16.16 + '@swc/core': 1.3.32 + '@types/jest': 29.5.1 + '@types/node': 18.16.14 + jest: 29.5.0_@types+node@18.16.14 jest-junit: 16.0.0 typescript: 4.9.5 @@ -602,12 +602,12 @@ importers: '@prisma/internals': workspace:* '@prisma/migrate': workspace:* '@sindresorhus/slugify': 1.1.2 - '@swc/core': 1.3.64 + '@swc/core': 1.3.32 '@swc/jest': 0.2.26 - '@types/jest': 29.5.2 + '@types/jest': 29.5.1 '@types/mssql': 8.1.2 - '@types/node': 18.16.16 - '@types/pg': 8.10.2 + '@types/node': 18.16.14 + '@types/pg': 8.10.1 '@types/sqlite3': 3.1.8 decimal.js: 10.4.3 esbuild: 0.15.13 @@ -615,10 +615,10 @@ importers: fs-jetpack: 5.1.0 jest: 29.5.0 jest-junit: 16.0.0 - mariadb: 3.2.0 + mariadb: 3.0.2 mssql: 9.1.1 pg: 8.9.0 - sqlite-async: 1.2.0 + sqlite-async: 1.1.3 string-hash: 1.1.3 strip-ansi: 6.0.1 tempy: 1.0.1 @@ -630,48 +630,48 @@ importers: '@prisma/internals': link:../internals '@prisma/migrate': link:../migrate '@sindresorhus/slugify': 1.1.2 - '@swc/core': 1.3.64 - '@swc/jest': 0.2.26_@swc+core@1.3.64 - '@types/jest': 29.5.2 + '@swc/core': 1.3.32 + '@swc/jest': 0.2.26_@swc+core@1.3.32 + '@types/jest': 29.5.1 '@types/mssql': 8.1.2 - '@types/node': 18.16.16 - '@types/pg': 8.10.2 + '@types/node': 18.16.14 + '@types/pg': 8.10.1 '@types/sqlite3': 3.1.8 decimal.js: 10.4.3 esbuild: 0.15.13 execa: 5.1.1 fs-jetpack: 5.1.0 - jest: 29.5.0_u3tjahz4lx2ow4rgesw7wigoy4 + jest: 29.5.0_daglcptrsglylliibnnp676h3i jest-junit: 16.0.0 - mariadb: 3.2.0 + mariadb: 3.0.2 mssql: 9.1.1 pg: 8.9.0 - sqlite-async: 1.2.0 + sqlite-async: 1.1.3 string-hash: 1.1.3 strip-ansi: 6.0.1 tempy: 1.0.1 - ts-node: 10.9.1_5cbqh36kzuqel5avofcbl5rwvu + ts-node: 10.9.1_gedhic2hxbm43qfqfkboxjwb3y typescript: 4.9.5 verror: 1.10.1 packages/internals: specifiers: - '@antfu/ni': 0.21.4 '@opentelemetry/api': 1.4.1 '@prisma/debug': workspace:* '@prisma/engines': workspace:* '@prisma/fetch-engine': workspace:* '@prisma/generator-helper': workspace:* '@prisma/get-platform': workspace:* - '@prisma/prisma-fmt-wasm': 4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309 + '@prisma/ni': workspace:* + '@prisma/prisma-fmt-wasm': 4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944 '@swc/core': 1.2.204 '@swc/jest': 0.2.26 - '@types/jest': 29.5.2 - '@types/node': 18.16.16 + '@types/jest': 29.5.1 + '@types/node': 18.16.14 '@types/resolve': 1.20.2 archiver: 5.3.1 arg: 5.0.2 - checkpoint-client: 1.1.24 + checkpoint-client: 1.1.23 cli-truncate: 2.1.0 dotenv: 16.0.3 esbuild: 0.15.13 @@ -712,17 +712,17 @@ importers: typescript: 4.9.5 yarn: 1.22.19 dependencies: - '@antfu/ni': 0.21.4 '@opentelemetry/api': 1.4.1 '@prisma/debug': link:../debug '@prisma/engines': link:../engines '@prisma/fetch-engine': link:../fetch-engine '@prisma/generator-helper': link:../generator-helper '@prisma/get-platform': link:../get-platform - '@prisma/prisma-fmt-wasm': 4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309 + '@prisma/ni': link:../ni + '@prisma/prisma-fmt-wasm': 4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944 archiver: 5.3.1 arg: 5.0.2 - checkpoint-client: 1.1.24 + checkpoint-client: 1.1.23 cli-truncate: 2.1.0 dotenv: 16.0.3 escape-string-regexp: 4.0.0 @@ -738,7 +738,7 @@ importers: is-wsl: 2.2.0 kleur: 4.1.5 new-github-issue-url: 0.2.1 - node-fetch: 2.6.11_oawau75ow7jz373yzwkw5fs4ry + node-fetch: 2.6.11 npm-packlist: 5.1.3 open: 7.4.2 p-map: 4.0.0 @@ -758,33 +758,32 @@ importers: devDependencies: '@swc/core': 1.2.204 '@swc/jest': 0.2.26_@swc+core@1.2.204 - '@types/jest': 29.5.2 - '@types/node': 18.16.16 + '@types/jest': 29.5.1 + '@types/node': 18.16.14 '@types/resolve': 1.20.2 esbuild: 0.15.13 - jest: 29.5.0_u3tjahz4lx2ow4rgesw7wigoy4 + jest: 29.5.0_daglcptrsglylliibnnp676h3i jest-junit: 16.0.0 mock-stdin: 1.0.0 - ts-node: 10.9.1_l26xbtqzhteigi5cpzp2eyiyva + ts-node: 10.9.1_dpfsgaqzs6ay6fyiel2y4blik4 typescript: 4.9.5 yarn: 1.22.19 packages/migrate: specifiers: '@prisma/debug': workspace:* - '@prisma/engines-version': 4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309 + '@prisma/engines-version': 4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944 '@prisma/generator-helper': workspace:* '@prisma/get-platform': workspace:* '@prisma/internals': workspace:* '@sindresorhus/slugify': 1.1.2 - '@swc/core': 1.3.64 + '@swc/core': 1.3.32 '@swc/jest': 0.2.26 - '@types/jest': 29.5.2 - '@types/node': 18.16.16 - '@types/pg': 8.10.2 + '@types/jest': 29.5.1 + '@types/node': 18.16.14 + '@types/pg': 8.10.1 '@types/prompts': 2.4.4 '@types/sqlite3': 3.1.8 - arg: 5.0.2 esbuild: 0.15.13 execa: 5.1.1 fp-ts: 2.16.0 @@ -796,9 +795,9 @@ importers: jest-junit: 16.0.0 kleur: 4.1.5 log-update: 4.0.0 - mariadb: 3.2.0 + mariadb: 3.1.1 mock-stdin: 1.0.0 - mongoose: 6.11.2 + mongoose: 6.11.1 mssql: 9.1.1 ora: 5.4.1 pg: 8.10.0 @@ -813,7 +812,6 @@ importers: '@prisma/debug': link:../debug '@prisma/get-platform': link:../get-platform '@sindresorhus/slugify': 1.1.2 - arg: 5.0.2 execa: 5.1.1 fp-ts: 2.16.0 get-stdin: 8.0.0 @@ -821,8 +819,8 @@ importers: indent-string: 4.0.0 kleur: 4.1.5 log-update: 4.0.0 - mariadb: 3.2.0 - mongoose: 6.11.2 + mariadb: 3.1.1 + mongoose: 6.11.1 mssql: 9.1.1 ora: 5.4.1 pg: 8.10.0 @@ -832,19 +830,19 @@ importers: strip-indent: 3.0.0 ts-pattern: 4.3.0 devDependencies: - '@prisma/engines-version': 4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309 + '@prisma/engines-version': 4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944 '@prisma/generator-helper': link:../generator-helper '@prisma/internals': link:../internals - '@swc/core': 1.3.64 - '@swc/jest': 0.2.26_@swc+core@1.3.64 - '@types/jest': 29.5.2 - '@types/node': 18.16.16 - '@types/pg': 8.10.2 + '@swc/core': 1.3.32 + '@swc/jest': 0.2.26_@swc+core@1.3.32 + '@types/jest': 29.5.1 + '@types/node': 18.16.14 + '@types/pg': 8.10.1 '@types/prompts': 2.4.4 '@types/sqlite3': 3.1.8 esbuild: 0.15.13 fs-jetpack: 5.1.0 - jest: 29.5.0_@types+node@18.16.16 + jest: 29.5.0_@types+node@18.16.14 jest-junit: 16.0.0 mock-stdin: 1.0.0 tempy: 1.0.1 @@ -852,33 +850,81 @@ importers: packages/nextjs-monorepo-workaround-plugin: specifiers: - webpack: 5.87.0 + webpack: 5.84.0 + devDependencies: + webpack: 5.84.0 + + packages/ni: + specifiers: + '@antfu/eslint-config': 0.39.1 + '@posva/prompts': 2.4.4 + '@types/fs-extra': 11.0.1 + '@types/ini': 1.3.31 + '@types/node': 18.16.14 + '@types/which': 3.0.0 + bumpp: 9.1.0 + eslint: 8.41.0 + esno: 0.16.3 + execa: 7.1.1 + fast-glob: 3.2.12 + find-up: 6.3.0 + fs-extra: 11.1.1 + fzf: 0.5.1 + ini: 4.1.1 + kleur: 4.1.5 + rimraf: 4.4.1 + terminal-link: 3.0.0 + typescript: 4.9.5 + unbuild: 1.2.0 + vitest: 0.31.1 + which: 3.0.0 devDependencies: - webpack: 5.87.0 + '@antfu/eslint-config': 0.39.1_5ujgynla27k2qkzlnkldjwsutm + '@posva/prompts': 2.4.4 + '@types/fs-extra': 11.0.1 + '@types/ini': 1.3.31 + '@types/node': 18.16.14 + '@types/which': 3.0.0 + bumpp: 9.1.0 + eslint: 8.41.0 + esno: 0.16.3 + execa: 7.1.1 + fast-glob: 3.2.12 + find-up: 6.3.0 + fs-extra: 11.1.1 + fzf: 0.5.1 + ini: 4.1.1 + kleur: 4.1.5 + rimraf: 4.4.1 + terminal-link: 3.0.0 + typescript: 4.9.5 + unbuild: 1.2.0 + vitest: 0.31.1 + which: 3.0.0 packages/react-prisma: specifiers: '@prisma/client': workspace:* - '@swc/core': 1.3.63 + '@swc/core': 1.3.59 '@swc/jest': 0.2.26 - '@types/jest': 29.5.2 - '@types/node': 18.16.18 - esbuild: 0.18.2 + '@types/jest': 29.5.1 + '@types/node': 18.16.14 + esbuild: 0.17.19 jest: 29.5.0 jest-junit: 16.0.0 react: 18.2.0 - typescript: 5.1.3 + typescript: 5.0.4 devDependencies: '@prisma/client': link:../client - '@swc/core': 1.3.63 - '@swc/jest': 0.2.26_@swc+core@1.3.63 - '@types/jest': 29.5.2 - '@types/node': 18.16.18 - esbuild: 0.18.2 - jest: 29.5.0_@types+node@18.16.18 + '@swc/core': 1.3.59 + '@swc/jest': 0.2.26_@swc+core@1.3.59 + '@types/jest': 29.5.1 + '@types/node': 18.16.14 + esbuild: 0.17.19 + jest: 29.5.0_@types+node@18.16.14 jest-junit: 16.0.0 react: 18.2.0 - typescript: 5.1.3 + typescript: 5.0.4 packages: @@ -890,19 +936,101 @@ packages: '@jridgewell/trace-mapping': 0.3.17 dev: true - /@antfu/ni/0.21.4: - resolution: {integrity: sha512-O0Uv9LbLDSoEg26fnMDdDRiPwFJnQSoD4WnrflDwKCJm8Cx/0mV4cGxwBLXan5mGIrpK4Dd7vizf4rQm0QCEAA==} - hasBin: true - dev: false + /@antfu/eslint-config-basic/0.39.1_lmx5wrdtyncoutojgob5c3howi: + resolution: {integrity: sha512-6t1nTj/nuXxVj43ZhxWMIhgqXYfI7mhiwTOsVXj7lhmy5YbnU2X6szBLP1tP33tY3VA9cMQysdzxlO/TvYMluA==} + peerDependencies: + eslint: '>=7.4.0' + dependencies: + eslint: 8.41.0 + eslint-plugin-antfu: 0.39.1_5ujgynla27k2qkzlnkldjwsutm + eslint-plugin-eslint-comments: 3.2.0_eslint@8.41.0 + eslint-plugin-html: 7.1.0 + eslint-plugin-import: 2.27.5_4axmhv5rl7cvu7f33ludfwxkcu + eslint-plugin-jsonc: 2.7.0_eslint@8.41.0 + eslint-plugin-markdown: 3.0.0_eslint@8.41.0 + eslint-plugin-n: 15.7.0_eslint@8.41.0 + eslint-plugin-no-only-tests: 3.1.0 + eslint-plugin-promise: 6.1.1_eslint@8.41.0 + eslint-plugin-unicorn: 46.0.0_eslint@8.41.0 + eslint-plugin-unused-imports: 2.0.0_qrapr3bedi2gglhy4lhyjlil4u + eslint-plugin-yml: 1.5.0_eslint@8.41.0 + jsonc-eslint-parser: 2.2.0 + yaml-eslint-parser: 1.2.0 + transitivePeerDependencies: + - '@typescript-eslint/eslint-plugin' + - '@typescript-eslint/parser' + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + - typescript + dev: true - /@aws-crypto/crc32/3.0.0: - resolution: {integrity: sha512-IzSgsrxUcsrejQbPVilIKy16kAT52EwB6zSaI+M3xxIhKh5+aldEyvI+z6erM7TCLB2BJsFrtHjp6/4/sr+3dA==} + /@antfu/eslint-config-ts/0.39.1_5ujgynla27k2qkzlnkldjwsutm: + resolution: {integrity: sha512-sNBJWLVG8OfNgdY+HxKTXYAO+L0BglVdVJHz1SNHViKfl0bK5M65jES4KaDQ/fS0rsMbfU2HW+HEUljYFMOYeA==} + peerDependencies: + eslint: '>=7.4.0' + typescript: '>=3.9' + dependencies: + '@antfu/eslint-config-basic': 0.39.1_lmx5wrdtyncoutojgob5c3howi + '@typescript-eslint/eslint-plugin': 5.59.6_4qbuxpmdupj46lq2zjlghng6yy + '@typescript-eslint/parser': 5.59.6_5ujgynla27k2qkzlnkldjwsutm + eslint: 8.41.0 + eslint-plugin-jest: 27.2.1_5ijt43grezcuiq4jmxee335ut4 + typescript: 4.9.5 + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - jest + - supports-color + dev: true + + /@antfu/eslint-config-vue/0.39.1_lmx5wrdtyncoutojgob5c3howi: + resolution: {integrity: sha512-gxMlDy5xpP08XYWNuvmXD2amU+uIsasmyy8JuPA5OQDisVnL1QTnHbVU4TjsJFZMf8TTvJM5unwk2EUcQZ5inQ==} + peerDependencies: + eslint: '>=7.4.0' dependencies: - '@aws-crypto/util': 3.0.0 - '@aws-sdk/types': 3.347.0 - tslib: 1.14.1 - dev: false - optional: true + '@antfu/eslint-config-basic': 0.39.1_lmx5wrdtyncoutojgob5c3howi + '@antfu/eslint-config-ts': 0.39.1_5ujgynla27k2qkzlnkldjwsutm + eslint: 8.41.0 + eslint-plugin-vue: 9.11.0_eslint@8.41.0 + local-pkg: 0.4.3 + transitivePeerDependencies: + - '@typescript-eslint/eslint-plugin' + - '@typescript-eslint/parser' + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - jest + - supports-color + - typescript + dev: true + + /@antfu/eslint-config/0.39.1_5ujgynla27k2qkzlnkldjwsutm: + resolution: {integrity: sha512-FbGyYIxOYP35yp2aqoWhNBUi6deOAu14YJG4yVZQ+ibboXYT3k+9qXmStj+0AOnzFJE1aUQMSE96zhv5aC/3bg==} + peerDependencies: + eslint: '>=7.4.0' + dependencies: + '@antfu/eslint-config-vue': 0.39.1_lmx5wrdtyncoutojgob5c3howi + '@typescript-eslint/eslint-plugin': 5.59.6_4qbuxpmdupj46lq2zjlghng6yy + '@typescript-eslint/parser': 5.59.6_5ujgynla27k2qkzlnkldjwsutm + eslint: 8.41.0 + eslint-plugin-eslint-comments: 3.2.0_eslint@8.41.0 + eslint-plugin-html: 7.1.0 + eslint-plugin-import: 2.27.5_4axmhv5rl7cvu7f33ludfwxkcu + eslint-plugin-jsonc: 2.7.0_eslint@8.41.0 + eslint-plugin-n: 15.7.0_eslint@8.41.0 + eslint-plugin-promise: 6.1.1_eslint@8.41.0 + eslint-plugin-unicorn: 46.0.0_eslint@8.41.0 + eslint-plugin-vue: 9.11.0_eslint@8.41.0 + eslint-plugin-yml: 1.5.0_eslint@8.41.0 + jsonc-eslint-parser: 2.2.0 + yaml-eslint-parser: 1.2.0 + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - jest + - supports-color + - typescript + dev: true /@aws-crypto/ie11-detection/3.0.0: resolution: {integrity: sha512-341lBBkiY1DfDNKai/wXM3aujNBkXR7tq1URPQDL9wi3AUbI80NR74uF1TXHMm7po1AcnFk8iu2S2IeU/+/A+Q==} @@ -918,7 +1046,7 @@ packages: '@aws-crypto/sha256-js': 3.0.0 '@aws-crypto/supports-web-crypto': 3.0.0 '@aws-crypto/util': 3.0.0 - '@aws-sdk/types': 3.347.0 + '@aws-sdk/types': 3.338.0 '@aws-sdk/util-locate-window': 3.310.0 '@aws-sdk/util-utf8-browser': 3.259.0 tslib: 1.14.1 @@ -929,7 +1057,7 @@ packages: resolution: {integrity: sha512-PnNN7os0+yd1XvXAy23CFOmTbMaDxgxXtTKHybrJ39Y8kGzBATgBFibWJKH6BhytLI/Zyszs87xCOBNyBig6vQ==} dependencies: '@aws-crypto/util': 3.0.0 - '@aws-sdk/types': 3.347.0 + '@aws-sdk/types': 3.338.0 tslib: 1.14.1 dev: false optional: true @@ -944,375 +1072,365 @@ packages: /@aws-crypto/util/3.0.0: resolution: {integrity: sha512-2OJlpeJpCR48CC8r+uKVChzs9Iungj9wkZrl8Z041DWEWvyIHILYKCPNzJghKsivj+S3mLo6BVc7mBNzdxA46w==} dependencies: - '@aws-sdk/types': 3.347.0 + '@aws-sdk/types': 3.338.0 '@aws-sdk/util-utf8-browser': 3.259.0 tslib: 1.14.1 dev: false optional: true - /@aws-sdk/abort-controller/3.347.0: - resolution: {integrity: sha512-P/2qE6ntYEmYG4Ez535nJWZbXqgbkJx8CMz7ChEuEg3Gp3dvVYEKg+iEUEvlqQ2U5dWP5J3ehw5po9t86IsVPQ==} + /@aws-sdk/abort-controller/3.338.0: + resolution: {integrity: sha512-/yLI32+HwFNBRJ39jMXw+/cn3AnlCuJpQd7Ax4887g32Dgte5eyrfY8sJUOL6902BUmAq4oSRI5QeBXNplO0Xw==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.347.0 + '@aws-sdk/types': 3.338.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/client-cognito-identity/3.354.0: - resolution: {integrity: sha512-VYoPiup85Zn1uiqn6X7Kl1/5AsihyW0jOPpO5Xv39shRKFTLYWIgPxjg7k+dNPVAX62XrWoWNkGR6sB/JN9Qdg==} + /@aws-sdk/client-cognito-identity/3.338.0: + resolution: {integrity: sha512-1gu9gXJwrxGGGMlBzmM4d8mkNjD1M8tWo+vmT/Aq1EMBxGef3eN0k6SyeIruj2Jns3olC6pjTIU8zb3vVBkh5Q==} engines: {node: '>=14.0.0'} dependencies: '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 - '@aws-sdk/client-sts': 3.354.0 - '@aws-sdk/config-resolver': 3.354.0 - '@aws-sdk/credential-provider-node': 3.354.0 - '@aws-sdk/fetch-http-handler': 3.353.0 - '@aws-sdk/hash-node': 3.347.0 - '@aws-sdk/invalid-dependency': 3.347.0 - '@aws-sdk/middleware-content-length': 3.347.0 - '@aws-sdk/middleware-endpoint': 3.347.0 - '@aws-sdk/middleware-host-header': 3.347.0 - '@aws-sdk/middleware-logger': 3.347.0 - '@aws-sdk/middleware-recursion-detection': 3.347.0 - '@aws-sdk/middleware-retry': 3.354.0 - '@aws-sdk/middleware-serde': 3.347.0 - '@aws-sdk/middleware-signing': 3.354.0 - '@aws-sdk/middleware-stack': 3.347.0 - '@aws-sdk/middleware-user-agent': 3.352.0 - '@aws-sdk/node-config-provider': 3.354.0 - '@aws-sdk/node-http-handler': 3.350.0 - '@aws-sdk/smithy-client': 3.347.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/url-parser': 3.347.0 + '@aws-sdk/client-sts': 3.338.0 + '@aws-sdk/config-resolver': 3.338.0 + '@aws-sdk/credential-provider-node': 3.338.0 + '@aws-sdk/fetch-http-handler': 3.338.0 + '@aws-sdk/hash-node': 3.338.0 + '@aws-sdk/invalid-dependency': 3.338.0 + '@aws-sdk/middleware-content-length': 3.338.0 + '@aws-sdk/middleware-endpoint': 3.338.0 + '@aws-sdk/middleware-host-header': 3.338.0 + '@aws-sdk/middleware-logger': 3.338.0 + '@aws-sdk/middleware-recursion-detection': 3.338.0 + '@aws-sdk/middleware-retry': 3.338.0 + '@aws-sdk/middleware-serde': 3.338.0 + '@aws-sdk/middleware-signing': 3.338.0 + '@aws-sdk/middleware-stack': 3.338.0 + '@aws-sdk/middleware-user-agent': 3.338.0 + '@aws-sdk/node-config-provider': 3.338.0 + '@aws-sdk/node-http-handler': 3.338.0 + '@aws-sdk/smithy-client': 3.338.0 + '@aws-sdk/types': 3.338.0 + '@aws-sdk/url-parser': 3.338.0 '@aws-sdk/util-base64': 3.310.0 '@aws-sdk/util-body-length-browser': 3.310.0 '@aws-sdk/util-body-length-node': 3.310.0 - '@aws-sdk/util-defaults-mode-browser': 3.353.0 - '@aws-sdk/util-defaults-mode-node': 3.354.0 - '@aws-sdk/util-endpoints': 3.352.0 - '@aws-sdk/util-retry': 3.347.0 - '@aws-sdk/util-user-agent-browser': 3.347.0 - '@aws-sdk/util-user-agent-node': 3.354.0 + '@aws-sdk/util-defaults-mode-browser': 3.338.0 + '@aws-sdk/util-defaults-mode-node': 3.338.0 + '@aws-sdk/util-endpoints': 3.338.0 + '@aws-sdk/util-retry': 3.338.0 + '@aws-sdk/util-user-agent-browser': 3.338.0 + '@aws-sdk/util-user-agent-node': 3.338.0 '@aws-sdk/util-utf8': 3.310.0 - '@smithy/protocol-http': 1.1.0 - '@smithy/types': 1.1.0 + '@smithy/protocol-http': 1.0.1 + '@smithy/types': 1.0.0 tslib: 2.5.0 transitivePeerDependencies: - aws-crt dev: false optional: true - /@aws-sdk/client-sso-oidc/3.354.0: - resolution: {integrity: sha512-XZcg4s2zKb4S8ltluiw5yxpm974uZqzo2HTECt1lbzUJgVgLsMAh/nPJ1fLqg4jadT+rf8Lq2FEFqOM/vxWT8A==} + /@aws-sdk/client-sso-oidc/3.338.0: + resolution: {integrity: sha512-mny5Q3LWKTcMMFS8WxeOCTinl193z7vS3b+eQz09K4jb1Lq04Bpjw25cySgBnhMGZ7QHQiYBscNLyu/TfOKiHA==} engines: {node: '>=14.0.0'} dependencies: '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 - '@aws-sdk/config-resolver': 3.354.0 - '@aws-sdk/fetch-http-handler': 3.353.0 - '@aws-sdk/hash-node': 3.347.0 - '@aws-sdk/invalid-dependency': 3.347.0 - '@aws-sdk/middleware-content-length': 3.347.0 - '@aws-sdk/middleware-endpoint': 3.347.0 - '@aws-sdk/middleware-host-header': 3.347.0 - '@aws-sdk/middleware-logger': 3.347.0 - '@aws-sdk/middleware-recursion-detection': 3.347.0 - '@aws-sdk/middleware-retry': 3.354.0 - '@aws-sdk/middleware-serde': 3.347.0 - '@aws-sdk/middleware-stack': 3.347.0 - '@aws-sdk/middleware-user-agent': 3.352.0 - '@aws-sdk/node-config-provider': 3.354.0 - '@aws-sdk/node-http-handler': 3.350.0 - '@aws-sdk/smithy-client': 3.347.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/url-parser': 3.347.0 + '@aws-sdk/config-resolver': 3.338.0 + '@aws-sdk/fetch-http-handler': 3.338.0 + '@aws-sdk/hash-node': 3.338.0 + '@aws-sdk/invalid-dependency': 3.338.0 + '@aws-sdk/middleware-content-length': 3.338.0 + '@aws-sdk/middleware-endpoint': 3.338.0 + '@aws-sdk/middleware-host-header': 3.338.0 + '@aws-sdk/middleware-logger': 3.338.0 + '@aws-sdk/middleware-recursion-detection': 3.338.0 + '@aws-sdk/middleware-retry': 3.338.0 + '@aws-sdk/middleware-serde': 3.338.0 + '@aws-sdk/middleware-stack': 3.338.0 + '@aws-sdk/middleware-user-agent': 3.338.0 + '@aws-sdk/node-config-provider': 3.338.0 + '@aws-sdk/node-http-handler': 3.338.0 + '@aws-sdk/smithy-client': 3.338.0 + '@aws-sdk/types': 3.338.0 + '@aws-sdk/url-parser': 3.338.0 '@aws-sdk/util-base64': 3.310.0 '@aws-sdk/util-body-length-browser': 3.310.0 '@aws-sdk/util-body-length-node': 3.310.0 - '@aws-sdk/util-defaults-mode-browser': 3.353.0 - '@aws-sdk/util-defaults-mode-node': 3.354.0 - '@aws-sdk/util-endpoints': 3.352.0 - '@aws-sdk/util-retry': 3.347.0 - '@aws-sdk/util-user-agent-browser': 3.347.0 - '@aws-sdk/util-user-agent-node': 3.354.0 + '@aws-sdk/util-defaults-mode-browser': 3.338.0 + '@aws-sdk/util-defaults-mode-node': 3.338.0 + '@aws-sdk/util-endpoints': 3.338.0 + '@aws-sdk/util-retry': 3.338.0 + '@aws-sdk/util-user-agent-browser': 3.338.0 + '@aws-sdk/util-user-agent-node': 3.338.0 '@aws-sdk/util-utf8': 3.310.0 - '@smithy/protocol-http': 1.1.0 - '@smithy/types': 1.1.0 + '@smithy/protocol-http': 1.0.1 + '@smithy/types': 1.0.0 tslib: 2.5.0 transitivePeerDependencies: - aws-crt dev: false optional: true - /@aws-sdk/client-sso/3.354.0: - resolution: {integrity: sha512-4jmvjJYDaaPmm1n2TG4LYfTEnHLKcJmImgBqhgzhMgaypb4u/k1iw0INV2r/afYPL/FsrLFwc46RM3HYx3nc4A==} + /@aws-sdk/client-sso/3.338.0: + resolution: {integrity: sha512-EglKsGlVph65PuFPKq1nGlxsY99XM2xHJaB1uX0bQEC94qrmS/M4a5kno5tiUnTWO1K+K4JBQiOxdGJs0GUS+w==} engines: {node: '>=14.0.0'} dependencies: '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 - '@aws-sdk/config-resolver': 3.354.0 - '@aws-sdk/fetch-http-handler': 3.353.0 - '@aws-sdk/hash-node': 3.347.0 - '@aws-sdk/invalid-dependency': 3.347.0 - '@aws-sdk/middleware-content-length': 3.347.0 - '@aws-sdk/middleware-endpoint': 3.347.0 - '@aws-sdk/middleware-host-header': 3.347.0 - '@aws-sdk/middleware-logger': 3.347.0 - '@aws-sdk/middleware-recursion-detection': 3.347.0 - '@aws-sdk/middleware-retry': 3.354.0 - '@aws-sdk/middleware-serde': 3.347.0 - '@aws-sdk/middleware-stack': 3.347.0 - '@aws-sdk/middleware-user-agent': 3.352.0 - '@aws-sdk/node-config-provider': 3.354.0 - '@aws-sdk/node-http-handler': 3.350.0 - '@aws-sdk/smithy-client': 3.347.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/url-parser': 3.347.0 + '@aws-sdk/config-resolver': 3.338.0 + '@aws-sdk/fetch-http-handler': 3.338.0 + '@aws-sdk/hash-node': 3.338.0 + '@aws-sdk/invalid-dependency': 3.338.0 + '@aws-sdk/middleware-content-length': 3.338.0 + '@aws-sdk/middleware-endpoint': 3.338.0 + '@aws-sdk/middleware-host-header': 3.338.0 + '@aws-sdk/middleware-logger': 3.338.0 + '@aws-sdk/middleware-recursion-detection': 3.338.0 + '@aws-sdk/middleware-retry': 3.338.0 + '@aws-sdk/middleware-serde': 3.338.0 + '@aws-sdk/middleware-stack': 3.338.0 + '@aws-sdk/middleware-user-agent': 3.338.0 + '@aws-sdk/node-config-provider': 3.338.0 + '@aws-sdk/node-http-handler': 3.338.0 + '@aws-sdk/smithy-client': 3.338.0 + '@aws-sdk/types': 3.338.0 + '@aws-sdk/url-parser': 3.338.0 '@aws-sdk/util-base64': 3.310.0 '@aws-sdk/util-body-length-browser': 3.310.0 '@aws-sdk/util-body-length-node': 3.310.0 - '@aws-sdk/util-defaults-mode-browser': 3.353.0 - '@aws-sdk/util-defaults-mode-node': 3.354.0 - '@aws-sdk/util-endpoints': 3.352.0 - '@aws-sdk/util-retry': 3.347.0 - '@aws-sdk/util-user-agent-browser': 3.347.0 - '@aws-sdk/util-user-agent-node': 3.354.0 + '@aws-sdk/util-defaults-mode-browser': 3.338.0 + '@aws-sdk/util-defaults-mode-node': 3.338.0 + '@aws-sdk/util-endpoints': 3.338.0 + '@aws-sdk/util-retry': 3.338.0 + '@aws-sdk/util-user-agent-browser': 3.338.0 + '@aws-sdk/util-user-agent-node': 3.338.0 '@aws-sdk/util-utf8': 3.310.0 - '@smithy/protocol-http': 1.1.0 - '@smithy/types': 1.1.0 + '@smithy/protocol-http': 1.0.1 + '@smithy/types': 1.0.0 tslib: 2.5.0 transitivePeerDependencies: - aws-crt dev: false optional: true - /@aws-sdk/client-sts/3.354.0: - resolution: {integrity: sha512-l9Ar/C/3PNlToM1ukHVfBtp4plbRUxLMYY2DOTMI0nb3jzfcvETBcdEGCP51fX4uAfJ2vc4g5qBF/qXKX0LMWA==} + /@aws-sdk/client-sts/3.338.0: + resolution: {integrity: sha512-FBHy/G7BAPX0CdEeeGYpoAnKXVCSIIkESLU2wF6x880z+U2IqiL48Fzoa5qoLaLPQaK/30P7ytznkqm4vd1OFw==} engines: {node: '>=14.0.0'} dependencies: '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 - '@aws-sdk/config-resolver': 3.354.0 - '@aws-sdk/credential-provider-node': 3.354.0 - '@aws-sdk/fetch-http-handler': 3.353.0 - '@aws-sdk/hash-node': 3.347.0 - '@aws-sdk/invalid-dependency': 3.347.0 - '@aws-sdk/middleware-content-length': 3.347.0 - '@aws-sdk/middleware-endpoint': 3.347.0 - '@aws-sdk/middleware-host-header': 3.347.0 - '@aws-sdk/middleware-logger': 3.347.0 - '@aws-sdk/middleware-recursion-detection': 3.347.0 - '@aws-sdk/middleware-retry': 3.354.0 - '@aws-sdk/middleware-sdk-sts': 3.354.0 - '@aws-sdk/middleware-serde': 3.347.0 - '@aws-sdk/middleware-signing': 3.354.0 - '@aws-sdk/middleware-stack': 3.347.0 - '@aws-sdk/middleware-user-agent': 3.352.0 - '@aws-sdk/node-config-provider': 3.354.0 - '@aws-sdk/node-http-handler': 3.350.0 - '@aws-sdk/smithy-client': 3.347.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/url-parser': 3.347.0 + '@aws-sdk/config-resolver': 3.338.0 + '@aws-sdk/credential-provider-node': 3.338.0 + '@aws-sdk/fetch-http-handler': 3.338.0 + '@aws-sdk/hash-node': 3.338.0 + '@aws-sdk/invalid-dependency': 3.338.0 + '@aws-sdk/middleware-content-length': 3.338.0 + '@aws-sdk/middleware-endpoint': 3.338.0 + '@aws-sdk/middleware-host-header': 3.338.0 + '@aws-sdk/middleware-logger': 3.338.0 + '@aws-sdk/middleware-recursion-detection': 3.338.0 + '@aws-sdk/middleware-retry': 3.338.0 + '@aws-sdk/middleware-sdk-sts': 3.338.0 + '@aws-sdk/middleware-serde': 3.338.0 + '@aws-sdk/middleware-signing': 3.338.0 + '@aws-sdk/middleware-stack': 3.338.0 + '@aws-sdk/middleware-user-agent': 3.338.0 + '@aws-sdk/node-config-provider': 3.338.0 + '@aws-sdk/node-http-handler': 3.338.0 + '@aws-sdk/smithy-client': 3.338.0 + '@aws-sdk/types': 3.338.0 + '@aws-sdk/url-parser': 3.338.0 '@aws-sdk/util-base64': 3.310.0 '@aws-sdk/util-body-length-browser': 3.310.0 '@aws-sdk/util-body-length-node': 3.310.0 - '@aws-sdk/util-defaults-mode-browser': 3.353.0 - '@aws-sdk/util-defaults-mode-node': 3.354.0 - '@aws-sdk/util-endpoints': 3.352.0 - '@aws-sdk/util-retry': 3.347.0 - '@aws-sdk/util-user-agent-browser': 3.347.0 - '@aws-sdk/util-user-agent-node': 3.354.0 + '@aws-sdk/util-defaults-mode-browser': 3.338.0 + '@aws-sdk/util-defaults-mode-node': 3.338.0 + '@aws-sdk/util-endpoints': 3.338.0 + '@aws-sdk/util-retry': 3.338.0 + '@aws-sdk/util-user-agent-browser': 3.338.0 + '@aws-sdk/util-user-agent-node': 3.338.0 '@aws-sdk/util-utf8': 3.310.0 - '@smithy/protocol-http': 1.1.0 - '@smithy/types': 1.1.0 - fast-xml-parser: 4.2.4 + '@smithy/protocol-http': 1.0.1 + '@smithy/types': 1.0.0 + fast-xml-parser: 4.1.2 tslib: 2.5.0 transitivePeerDependencies: - aws-crt dev: false optional: true - /@aws-sdk/config-resolver/3.354.0: - resolution: {integrity: sha512-K4XWie8yJPT8bpYVX54VJMQhiJRTw8PrjEs9QrKqvwoCcZ3G4qEt40tIu33XksuokXxk8rrVH5d7odOPBsAtdg==} + /@aws-sdk/config-resolver/3.338.0: + resolution: {integrity: sha512-rB9WUaMfTB74Hd2mOiyPFR7Q1viT+w6SaDSR9SA1P8EeIg5H13FNdIKb736Z8/6QJhDj7whdyk1CTGV+DmXOOg==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.347.0 + '@aws-sdk/types': 3.338.0 '@aws-sdk/util-config-provider': 3.310.0 - '@aws-sdk/util-middleware': 3.347.0 + '@aws-sdk/util-middleware': 3.338.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/credential-provider-cognito-identity/3.354.0: - resolution: {integrity: sha512-Q5UcqASJWqwD4AXpfv4Zpw5tUV/fzbhnEC9TzyB39zXcu4Qd0cQgVQOOq9FX1GbtLNOzkPnbvHsbv2PdEaNM4A==} + /@aws-sdk/credential-provider-cognito-identity/3.338.0: + resolution: {integrity: sha512-kKkBt1qCKx+HspbMq7kd5Yz3jWRW5N1Tegs4cGbTFJH9qMJTyQMoS9GNRcFfzgNEA9sfpHxeTnBbwBw6Ca4S9g==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/client-cognito-identity': 3.354.0 - '@aws-sdk/property-provider': 3.353.0 - '@aws-sdk/types': 3.347.0 + '@aws-sdk/client-cognito-identity': 3.338.0 + '@aws-sdk/property-provider': 3.338.0 + '@aws-sdk/types': 3.338.0 tslib: 2.5.0 transitivePeerDependencies: - aws-crt dev: false optional: true - /@aws-sdk/credential-provider-env/3.353.0: - resolution: {integrity: sha512-Y4VsNS8O1FAD5J7S5itOhnOghQ5LIXlZ44t35nF8cbcF+JPvY3ToKzYpjYN1jM7DXKqU4shtqgYpzSqxlvEgKQ==} + /@aws-sdk/credential-provider-env/3.338.0: + resolution: {integrity: sha512-j14vApy80tpk87C3x3uBf1caQsuR8RdQ8iOW830H/AOhsa88XaZIB/NQSX7exaIKZa2RU0Vv2wIlGAA8ko7J6g==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/property-provider': 3.353.0 - '@aws-sdk/types': 3.347.0 + '@aws-sdk/property-provider': 3.338.0 + '@aws-sdk/types': 3.338.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/credential-provider-imds/3.354.0: - resolution: {integrity: sha512-AB+PuDd1jX6qgz+JYvIyOn8Kz9/lQ60KuY1TFb7g3S8zURw+DSeMJNR1jzEsorWICTzhxXmyasHVMa4Eo4Uq+Q==} + /@aws-sdk/credential-provider-imds/3.338.0: + resolution: {integrity: sha512-qsqeywYfJevg5pgUUUBmm7pK1bckVrl091PZB2IliFdQVnDvI5GFLf4B0oZqjaLAzPG1gVtxRvqIve+tnP/+xA==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/node-config-provider': 3.354.0 - '@aws-sdk/property-provider': 3.353.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/url-parser': 3.347.0 + '@aws-sdk/node-config-provider': 3.338.0 + '@aws-sdk/property-provider': 3.338.0 + '@aws-sdk/types': 3.338.0 + '@aws-sdk/url-parser': 3.338.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/credential-provider-ini/3.354.0: - resolution: {integrity: sha512-bn2ifrRsxWpxzwXa25jRdUECQ1dC+NB3YlRYnGdIaIQLF559N2jnfCabYzqyfKI++WU7aQeMofPe2PxVGlbv9Q==} + /@aws-sdk/credential-provider-ini/3.338.0: + resolution: {integrity: sha512-UhgYgymT9sJiRm0peqP5EvtR4dXiS2Q2AuFgDUjBvDz8JaZlqafsIS4cfyGwTHV/xY6cdiMu5rCTe8hTyXsukQ==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/credential-provider-env': 3.353.0 - '@aws-sdk/credential-provider-imds': 3.354.0 - '@aws-sdk/credential-provider-process': 3.354.0 - '@aws-sdk/credential-provider-sso': 3.354.0 - '@aws-sdk/credential-provider-web-identity': 3.354.0 - '@aws-sdk/property-provider': 3.353.0 - '@aws-sdk/shared-ini-file-loader': 3.354.0 - '@aws-sdk/types': 3.347.0 + '@aws-sdk/credential-provider-env': 3.338.0 + '@aws-sdk/credential-provider-imds': 3.338.0 + '@aws-sdk/credential-provider-process': 3.338.0 + '@aws-sdk/credential-provider-sso': 3.338.0 + '@aws-sdk/credential-provider-web-identity': 3.338.0 + '@aws-sdk/property-provider': 3.338.0 + '@aws-sdk/shared-ini-file-loader': 3.338.0 + '@aws-sdk/types': 3.338.0 tslib: 2.5.0 transitivePeerDependencies: - aws-crt dev: false optional: true - /@aws-sdk/credential-provider-node/3.354.0: - resolution: {integrity: sha512-ltKiRtHfqDaCcrb44DIoSHQ9MposFl/aDtNdu5OdQv/2Q1r7M/r2fQdq9DHOrxeQQjaUH4C6k6fGTsxALTHyNA==} + /@aws-sdk/credential-provider-node/3.338.0: + resolution: {integrity: sha512-nZjaMRxJqX0EXMV9LA5IbRQI1pDGGZiPYX2KDfZ1Y9Gc1Y/vIZhHKOHGb1uKMAonlR076CsXlev4/tjC8SGGuw==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/credential-provider-env': 3.353.0 - '@aws-sdk/credential-provider-imds': 3.354.0 - '@aws-sdk/credential-provider-ini': 3.354.0 - '@aws-sdk/credential-provider-process': 3.354.0 - '@aws-sdk/credential-provider-sso': 3.354.0 - '@aws-sdk/credential-provider-web-identity': 3.354.0 - '@aws-sdk/property-provider': 3.353.0 - '@aws-sdk/shared-ini-file-loader': 3.354.0 - '@aws-sdk/types': 3.347.0 + '@aws-sdk/credential-provider-env': 3.338.0 + '@aws-sdk/credential-provider-imds': 3.338.0 + '@aws-sdk/credential-provider-ini': 3.338.0 + '@aws-sdk/credential-provider-process': 3.338.0 + '@aws-sdk/credential-provider-sso': 3.338.0 + '@aws-sdk/credential-provider-web-identity': 3.338.0 + '@aws-sdk/property-provider': 3.338.0 + '@aws-sdk/shared-ini-file-loader': 3.338.0 + '@aws-sdk/types': 3.338.0 tslib: 2.5.0 transitivePeerDependencies: - aws-crt dev: false optional: true - /@aws-sdk/credential-provider-process/3.354.0: - resolution: {integrity: sha512-AxpASm+tS8V1PY4PLfG9dtqa96lzBJ3niTQb+RAm4uYCddW7gxNDkGB+jSCzVdUPVa3xA2ITBS/ka3C5yM8YWg==} + /@aws-sdk/credential-provider-process/3.338.0: + resolution: {integrity: sha512-5I1EgJxFFEg8xel2kInMpkdBKajUut0hR2fBajqCmK7Pflu8s0I2NKDots9a3YJagNrFJq38+EzoDcUvRrd2dg==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/property-provider': 3.353.0 - '@aws-sdk/shared-ini-file-loader': 3.354.0 - '@aws-sdk/types': 3.347.0 + '@aws-sdk/property-provider': 3.338.0 + '@aws-sdk/shared-ini-file-loader': 3.338.0 + '@aws-sdk/types': 3.338.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/credential-provider-sso/3.354.0: - resolution: {integrity: sha512-ihiaUxh8V/nQgTOgQZxWQcbckXhM+J6Wdc4F0z9soi48iSOqzRpzPw5E14wSZScEZjNY/gKEDz8gCt8WkT/G0w==} + /@aws-sdk/credential-provider-sso/3.338.0: + resolution: {integrity: sha512-fpzYHK17iF/uFkrm4cLg/utDVKSBTWNjAiNlE3GF6CaixBCwc0QBLKHk2nG4d1ZZeMVCbIUMS7eoqfR0LYc/yw==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/client-sso': 3.354.0 - '@aws-sdk/property-provider': 3.353.0 - '@aws-sdk/shared-ini-file-loader': 3.354.0 - '@aws-sdk/token-providers': 3.354.0 - '@aws-sdk/types': 3.347.0 + '@aws-sdk/client-sso': 3.338.0 + '@aws-sdk/property-provider': 3.338.0 + '@aws-sdk/shared-ini-file-loader': 3.338.0 + '@aws-sdk/token-providers': 3.338.0 + '@aws-sdk/types': 3.338.0 tslib: 2.5.0 transitivePeerDependencies: - aws-crt dev: false optional: true - /@aws-sdk/credential-provider-web-identity/3.354.0: - resolution: {integrity: sha512-scx9mAf4m3Hc3uMX2Vh8GciEcC/5GqeDI8qc0zBj+UF/5c/GtihZA4WoCV3Sg3jMPDUKY81DiFCtcKHhtUqKfg==} + /@aws-sdk/credential-provider-web-identity/3.338.0: + resolution: {integrity: sha512-kjT/P18jM1icwjYwr8wfY//T8lv2s81ms7OC7vgiSqckmQOxpVkdsep9d44ymSUXwopmotFP7M9gGnEHS6HwAA==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/property-provider': 3.353.0 - '@aws-sdk/types': 3.347.0 + '@aws-sdk/property-provider': 3.338.0 + '@aws-sdk/types': 3.338.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/credential-providers/3.354.0: - resolution: {integrity: sha512-GjkSKGWL+lbEVAYGRvE2kdKn8lnhLEBB98yKMz6k9VhqVBrMPZVGTFTlNNtPRZ7IfnnmgLnk6IHtue9xgaycfg==} + /@aws-sdk/credential-providers/3.338.0: + resolution: {integrity: sha512-QQkWsR3fyq3N5eTvyKLgk1IO45SEM5+zIDqGqchG74AAhAzTHpiVZ3AOBZckaIAXKyHU3Fgy3gt/u+fdXC4xyw==} engines: {node: '>=14.0.0'} requiresBuild: true dependencies: - '@aws-sdk/client-cognito-identity': 3.354.0 - '@aws-sdk/client-sso': 3.354.0 - '@aws-sdk/client-sts': 3.354.0 - '@aws-sdk/credential-provider-cognito-identity': 3.354.0 - '@aws-sdk/credential-provider-env': 3.353.0 - '@aws-sdk/credential-provider-imds': 3.354.0 - '@aws-sdk/credential-provider-ini': 3.354.0 - '@aws-sdk/credential-provider-node': 3.354.0 - '@aws-sdk/credential-provider-process': 3.354.0 - '@aws-sdk/credential-provider-sso': 3.354.0 - '@aws-sdk/credential-provider-web-identity': 3.354.0 - '@aws-sdk/property-provider': 3.353.0 - '@aws-sdk/types': 3.347.0 + '@aws-sdk/client-cognito-identity': 3.338.0 + '@aws-sdk/client-sso': 3.338.0 + '@aws-sdk/client-sts': 3.338.0 + '@aws-sdk/credential-provider-cognito-identity': 3.338.0 + '@aws-sdk/credential-provider-env': 3.338.0 + '@aws-sdk/credential-provider-imds': 3.338.0 + '@aws-sdk/credential-provider-ini': 3.338.0 + '@aws-sdk/credential-provider-node': 3.338.0 + '@aws-sdk/credential-provider-process': 3.338.0 + '@aws-sdk/credential-provider-sso': 3.338.0 + '@aws-sdk/credential-provider-web-identity': 3.338.0 + '@aws-sdk/property-provider': 3.338.0 + '@aws-sdk/types': 3.338.0 tslib: 2.5.0 transitivePeerDependencies: - aws-crt dev: false optional: true - /@aws-sdk/eventstream-codec/3.347.0: - resolution: {integrity: sha512-61q+SyspjsaQ4sdgjizMyRgVph2CiW4aAtfpoH69EJFJfTxTR/OqnZ9Jx/3YiYi0ksrvDenJddYodfWWJqD8/w==} + /@aws-sdk/fetch-http-handler/3.338.0: + resolution: {integrity: sha512-NOIQmeSa51J2nFAzl99IjxwQkq27cdNJzF59jQWzpUCGbxXfMD4WWy2NHubabSFuJ4FJU2eyoQHUNUFc6/uxXA==} dependencies: - '@aws-crypto/crc32': 3.0.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/util-hex-encoding': 3.310.0 - tslib: 2.5.0 - dev: false - optional: true - - /@aws-sdk/fetch-http-handler/3.353.0: - resolution: {integrity: sha512-8ic2+4E6jzfDevd++QS1rOR05QFkAhEFbi5Ja3/Zzp7TkWIS8wv5wwMATjNkbbdsXYuB5Lhl/OsjfZmIv5aqRw==} - dependencies: - '@aws-sdk/protocol-http': 3.347.0 - '@aws-sdk/querystring-builder': 3.347.0 - '@aws-sdk/types': 3.347.0 + '@aws-sdk/protocol-http': 3.338.0 + '@aws-sdk/querystring-builder': 3.338.0 + '@aws-sdk/types': 3.338.0 '@aws-sdk/util-base64': 3.310.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/hash-node/3.347.0: - resolution: {integrity: sha512-96+ml/4EaUaVpzBdOLGOxdoXOjkPgkoJp/0i1fxOJEvl8wdAQSwc3IugVK9wZkCxy2DlENtgOe6DfIOhfffm/g==} + /@aws-sdk/hash-node/3.338.0: + resolution: {integrity: sha512-udveX3ZRO1oUbyBTQH0LJ8Ika7uk0pHuXrqapdi66GGRJB50IhmOg372zUEwZjDB7DZYXfGTCuAj2OoEalgpBA==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.347.0 + '@aws-sdk/types': 3.338.0 '@aws-sdk/util-buffer-from': 3.310.0 '@aws-sdk/util-utf8': 3.310.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/invalid-dependency/3.347.0: - resolution: {integrity: sha512-8imQcwLwqZ/wTJXZqzXT9pGLIksTRckhGLZaXT60tiBOPKuerTsus2L59UstLs5LP8TKaVZKFFSsjRIn9dQdmQ==} + /@aws-sdk/invalid-dependency/3.338.0: + resolution: {integrity: sha512-m6r1fTTGSl0V6l8Z+Ii4Ei8VFpDmu0AT6A59ZhJaMZgxf925ywuCPydyDW9ZqTLE0e7CgxhEHEsH1+HzpVuHTw==} dependencies: - '@aws-sdk/types': 3.347.0 + '@aws-sdk/types': 3.338.0 tslib: 2.5.0 dev: false optional: true @@ -1325,249 +1443,248 @@ packages: dev: false optional: true - /@aws-sdk/middleware-content-length/3.347.0: - resolution: {integrity: sha512-i4qtWTDImMaDUtwKQPbaZpXsReiwiBomM1cWymCU4bhz81HL01oIxOxOBuiM+3NlDoCSPr3KI6txZSz/8cqXCQ==} + /@aws-sdk/middleware-content-length/3.338.0: + resolution: {integrity: sha512-m2C+yJaNmbA3ocBp/7ImUUuimymV5JsFdV7yAibpbYMX22g3q83nieOF9x0I66J0+h+/bcriz/T1ZJAPANLz/g==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/protocol-http': 3.347.0 - '@aws-sdk/types': 3.347.0 + '@aws-sdk/protocol-http': 3.338.0 + '@aws-sdk/types': 3.338.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/middleware-endpoint/3.347.0: - resolution: {integrity: sha512-unF0c6dMaUL1ffU+37Ugty43DgMnzPWXr/Jup/8GbK5fzzWT5NQq6dj9KHPubMbWeEjQbmczvhv25JuJdK8gNQ==} + /@aws-sdk/middleware-endpoint/3.338.0: + resolution: {integrity: sha512-bzL9Q8lFidg2NTjGVGDKI6yPG/XiPS+VIAMHJeihQmcv1alIy+N3IL4bEN15Fg+cwaGm+P3BevcLIHmcCOVb4w==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/middleware-serde': 3.347.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/url-parser': 3.347.0 - '@aws-sdk/util-middleware': 3.347.0 + '@aws-sdk/middleware-serde': 3.338.0 + '@aws-sdk/types': 3.338.0 + '@aws-sdk/url-parser': 3.338.0 + '@aws-sdk/util-middleware': 3.338.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/middleware-host-header/3.347.0: - resolution: {integrity: sha512-kpKmR9OvMlnReqp5sKcJkozbj1wmlblbVSbnQAIkzeQj2xD5dnVR3Nn2ogQKxSmU1Fv7dEroBtrruJ1o3fY38A==} + /@aws-sdk/middleware-host-header/3.338.0: + resolution: {integrity: sha512-k3C7oppkrqeKrAJt9XIl45SdELtnph9BF0QypjyRfT5MNEDnMMsQkc6xy3ZMqG5dWQq6B2l8C+JL7pOvkSQP3w==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/protocol-http': 3.347.0 - '@aws-sdk/types': 3.347.0 + '@aws-sdk/protocol-http': 3.338.0 + '@aws-sdk/types': 3.338.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/middleware-logger/3.347.0: - resolution: {integrity: sha512-NYC+Id5UCkVn+3P1t/YtmHt75uED06vwaKyxDy0UmB2K66PZLVtwWbLpVWrhbroaw1bvUHYcRyQ9NIfnVcXQjA==} + /@aws-sdk/middleware-logger/3.338.0: + resolution: {integrity: sha512-btj9U0Xovq/UAu3Ur4lAfF7Q3DvvwJ/0UUWsI6GgSzzqSOFgKCz7hCP2GZIT8aXEA5hJOpBOEMkNMjWPNa91Hg==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.347.0 + '@aws-sdk/types': 3.338.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/middleware-recursion-detection/3.347.0: - resolution: {integrity: sha512-qfnSvkFKCAMjMHR31NdsT0gv5Sq/ZHTUD4yQsSLpbVQ6iYAS834lrzXt41iyEHt57Y514uG7F/Xfvude3u4icQ==} + /@aws-sdk/middleware-recursion-detection/3.338.0: + resolution: {integrity: sha512-fu5KwiHHSqC8KTQH6xdJ9+dua4gQcXSFLE5fVsergqd0uVdsmhiI+IDfW6QNwF/lmCqnoKDkpeasuB98eG2tow==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/protocol-http': 3.347.0 - '@aws-sdk/types': 3.347.0 + '@aws-sdk/protocol-http': 3.338.0 + '@aws-sdk/types': 3.338.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/middleware-retry/3.354.0: - resolution: {integrity: sha512-dnG5Nd/mobbhcWCM71DQWI9+f6b6fDSzALXftFIP/8lsXKRcWDSQuYjrnVST2wZzk/QmdF8TnVD0C1xL14K6CQ==} + /@aws-sdk/middleware-retry/3.338.0: + resolution: {integrity: sha512-nw1oPFkB7TdDG4Vlz2Td47ft/2Gmx1bA18QfE9K1mMWZ4nnoAL8xnHbowlTfHo62+BbFCAPu53PzDUCncBL0iw==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/protocol-http': 3.347.0 - '@aws-sdk/service-error-classification': 3.347.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/util-middleware': 3.347.0 - '@aws-sdk/util-retry': 3.347.0 + '@aws-sdk/protocol-http': 3.338.0 + '@aws-sdk/service-error-classification': 3.338.0 + '@aws-sdk/types': 3.338.0 + '@aws-sdk/util-middleware': 3.338.0 + '@aws-sdk/util-retry': 3.338.0 tslib: 2.5.0 uuid: 8.3.2 dev: false optional: true - /@aws-sdk/middleware-sdk-sts/3.354.0: - resolution: {integrity: sha512-L6vyAwYrdcOoB4YgCqNJNr+ZZtLHEF2Ym3CTfmFm2srXHqHuRB+mBu0NLV/grz77znIArK1H1ZL/ZaH2I5hclA==} + /@aws-sdk/middleware-sdk-sts/3.338.0: + resolution: {integrity: sha512-aZ8eFVaot8oYQri1wOesrA3gLizeAHtlA/ELlqxoGDJtO011J4/hTHTn0iJGbktaCvc1L3TF6mgOsgXpudYqMg==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/middleware-signing': 3.354.0 - '@aws-sdk/types': 3.347.0 + '@aws-sdk/middleware-signing': 3.338.0 + '@aws-sdk/types': 3.338.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/middleware-serde/3.347.0: - resolution: {integrity: sha512-x5Foi7jRbVJXDu9bHfyCbhYDH5pKK+31MmsSJ3k8rY8keXLBxm2XEEg/AIoV9/TUF9EeVvZ7F1/RmMpJnWQsEg==} + /@aws-sdk/middleware-serde/3.338.0: + resolution: {integrity: sha512-AabRLrE6sk9tqQlQ7z3kn4gTHNN7Anjk/AM0ZEu96WcWjedcpgM1vVpKTBE7vjnxcTRNq0CEM3GLtQqaZ7/HjQ==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.347.0 + '@aws-sdk/types': 3.338.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/middleware-signing/3.354.0: - resolution: {integrity: sha512-Dd+vIhJL0VqqKWqlTKlKC5jkCaEIk73ZEXNfv44XbsI25a0vXbatHp1M8jB/cgkJC/Mri1TX9dmckP/C0FDEwA==} + /@aws-sdk/middleware-signing/3.338.0: + resolution: {integrity: sha512-AprhhShMF75mOx80SABujLwrU/w2uHQIvWd6aF3BsE5JRI3uQZRqspfjFCaK52HNLQPj3sCQUw1GeiZJ8GyWCw==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/property-provider': 3.353.0 - '@aws-sdk/protocol-http': 3.347.0 - '@aws-sdk/signature-v4': 3.354.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/util-middleware': 3.347.0 + '@aws-sdk/property-provider': 3.338.0 + '@aws-sdk/protocol-http': 3.338.0 + '@aws-sdk/signature-v4': 3.338.0 + '@aws-sdk/types': 3.338.0 + '@aws-sdk/util-middleware': 3.338.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/middleware-stack/3.347.0: - resolution: {integrity: sha512-Izidg4rqtYMcKuvn2UzgEpPLSmyd8ub9+LQ2oIzG3mpIzCBITq7wp40jN1iNkMg+X6KEnX9vdMJIYZsPYMCYuQ==} + /@aws-sdk/middleware-stack/3.338.0: + resolution: {integrity: sha512-9zXyiklX9AK9ZIXuIPzWzz2vevBEcnBs9UNIxiHl4NBZ8d8oyTvaES1PtFuwL6f7ANSZ9EGVQ2rdTTnMNxMI1A==} engines: {node: '>=14.0.0'} dependencies: tslib: 2.5.0 dev: false optional: true - /@aws-sdk/middleware-user-agent/3.352.0: - resolution: {integrity: sha512-QGqblMTsVDqeomy22KPm9LUW8PHZXBA2Hjk9Hcw8U1uFS8IKYJrewInG3ae2+9FAcTyug4LFWDf8CRr9YH2B3Q==} + /@aws-sdk/middleware-user-agent/3.338.0: + resolution: {integrity: sha512-DMqODOsDMFMPcDw2Ya6a0i34AhaBDRpp3vJ+FK3zPxUIsv6iHA+XqEcXLOxROLLoydoyxus7k2U+EWibLZrFbQ==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/protocol-http': 3.347.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/util-endpoints': 3.352.0 + '@aws-sdk/protocol-http': 3.338.0 + '@aws-sdk/types': 3.338.0 + '@aws-sdk/util-endpoints': 3.338.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/node-config-provider/3.354.0: - resolution: {integrity: sha512-pF1ZGWWvmwbrloNHYF3EDqCb9hq5wfZwDqAwAPhWkYnUYKkR7E7MZVuTwUDU48io8k6Z5pM52l/54w8e8aedTw==} + /@aws-sdk/node-config-provider/3.338.0: + resolution: {integrity: sha512-YO7yWg3ipnUI5u6D+Zn2NUpjj5krwc8zNWeY79ULVIp9g7faqGX3xMSjeRSrpZ83s5jg1dOm/+bB0gw7mCrRCw==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/property-provider': 3.353.0 - '@aws-sdk/shared-ini-file-loader': 3.354.0 - '@aws-sdk/types': 3.347.0 + '@aws-sdk/property-provider': 3.338.0 + '@aws-sdk/shared-ini-file-loader': 3.338.0 + '@aws-sdk/types': 3.338.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/node-http-handler/3.350.0: - resolution: {integrity: sha512-oD96GAlmpzYilCdC8wwyURM5lNfNHZCjm/kxBkQulHKa2kRbIrnD9GfDqdCkWA5cTpjh1NzGLT4D6e6UFDjt9w==} + /@aws-sdk/node-http-handler/3.338.0: + resolution: {integrity: sha512-V1BLzCruiv45tJ0vXjiamY8LncIsUFsXYJGDupomFYhWRN8L1MUB9f2vdKn5X3wXn/yKrluwTmNaryrIqd9akA==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/abort-controller': 3.347.0 - '@aws-sdk/protocol-http': 3.347.0 - '@aws-sdk/querystring-builder': 3.347.0 - '@aws-sdk/types': 3.347.0 + '@aws-sdk/abort-controller': 3.338.0 + '@aws-sdk/protocol-http': 3.338.0 + '@aws-sdk/querystring-builder': 3.338.0 + '@aws-sdk/types': 3.338.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/property-provider/3.353.0: - resolution: {integrity: sha512-Iu6J59hncaew7eBKroTcLjZ8cgrom0IWyZZ09rsow3rZDHVtw7LQSrUyuqsSbKGY9eRtL7Wa6ZtYHnXFiAE2kg==} + /@aws-sdk/property-provider/3.338.0: + resolution: {integrity: sha512-mC+ZJ738ipif6ZkH59gcipozYj1FOfpXr9pGVCA2hJGLDdaBwI2Jfpb2qCqbsTNtoCjBuIy+sQHGmUHyclgYHg==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.347.0 + '@aws-sdk/types': 3.338.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/protocol-http/3.347.0: - resolution: {integrity: sha512-2YdBhc02Wvy03YjhGwUxF0UQgrPWEy8Iq75pfS42N+/0B/+eWX1aQgfjFxIpLg7YSjT5eKtYOQGlYd4MFTgj9g==} + /@aws-sdk/protocol-http/3.338.0: + resolution: {integrity: sha512-JX03Q2gshdzOWtA/07kdpk0hqeOrOfwuF8TB97g66VCcIopYQkCeNH1zzkWu+RsGxfSlzQ7up+ZM6sclYXyB1A==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.347.0 + '@aws-sdk/types': 3.338.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/querystring-builder/3.347.0: - resolution: {integrity: sha512-phtKTe6FXoV02MoPkIVV6owXI8Mwr5IBN3bPoxhcPvJG2AjEmnetSIrhb8kwc4oNhlwfZwH6Jo5ARW/VEWbZtg==} + /@aws-sdk/querystring-builder/3.338.0: + resolution: {integrity: sha512-IB3YhO93Htwt2SxJx4VWsN57Rt1KEsvZ6PbneO4bcS96E04BlfBujYMZ+QxEM3EJxorhpkwbI2QnI12IjD8FhA==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.347.0 + '@aws-sdk/types': 3.338.0 '@aws-sdk/util-uri-escape': 3.310.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/querystring-parser/3.347.0: - resolution: {integrity: sha512-5VXOhfZz78T2W7SuXf2avfjKglx1VZgZgp9Zfhrt/Rq+MTu2D+PZc5zmJHhYigD7x83jLSLogpuInQpFMA9LgA==} + /@aws-sdk/querystring-parser/3.338.0: + resolution: {integrity: sha512-vtI8Gqx4yj0BZlWonRMgLz68sHt5H48HN+ClnY+fDDB/8KLnCuwZ3TGKmYIbYbshL9wjJz0A9aLzuC6nPQ5JKw==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.347.0 + '@aws-sdk/types': 3.338.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/service-error-classification/3.347.0: - resolution: {integrity: sha512-xZ3MqSY81Oy2gh5g0fCtooAbahqh9VhsF8vcKjVX8+XPbGC8y+kej82+MsMg4gYL8gRFB9u4hgYbNgIS6JTAvg==} + /@aws-sdk/service-error-classification/3.338.0: + resolution: {integrity: sha512-BJFr2mx/N3NbycGTlMMGRBc0tGcHXHEbMPy1H2RbejzL23zh27MchaL1WAK9SvwVMKS29hSDbhkuVR2ABRjerA==} engines: {node: '>=14.0.0'} dev: false optional: true - /@aws-sdk/shared-ini-file-loader/3.354.0: - resolution: {integrity: sha512-UL9loGEsdzpHBu/PtlwUvkl/yRdmWXkySp22jUaeeRtBhiGAnyeYhxJLIt+u+UkX7Mwz+810SaZJqA9ptOXNAg==} + /@aws-sdk/shared-ini-file-loader/3.338.0: + resolution: {integrity: sha512-MA1Sp97LFlOXcUaXgo47j86IsPRWYq1V/JqR+uu0zofZw4Xlt7Y6F+mmnDHvuuMy6R2ltzjXSwgrrW3k0bxFPA==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.347.0 + '@aws-sdk/types': 3.338.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/signature-v4/3.354.0: - resolution: {integrity: sha512-bDp43P5NkwwznpZqmsr78DuyqNcjtS4mriuajb8XPhFNo8DrMXUrdrKJ+5aNABW7YG8uK8PSKBpq88ado692/w==} + /@aws-sdk/signature-v4/3.338.0: + resolution: {integrity: sha512-EwKTe/8Iwab/v0eo27w7DRYlqp9wEZEhuRfOMwTikUVH6iuTnW6AXjcIUfcRYBRbx2zqnRSiMAZkjN6ZFYm0bQ==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/eventstream-codec': 3.347.0 '@aws-sdk/is-array-buffer': 3.310.0 - '@aws-sdk/types': 3.347.0 + '@aws-sdk/types': 3.338.0 '@aws-sdk/util-hex-encoding': 3.310.0 - '@aws-sdk/util-middleware': 3.347.0 + '@aws-sdk/util-middleware': 3.338.0 '@aws-sdk/util-uri-escape': 3.310.0 '@aws-sdk/util-utf8': 3.310.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/smithy-client/3.347.0: - resolution: {integrity: sha512-PaGTDsJLGK0sTjA6YdYQzILRlPRN3uVFyqeBUkfltXssvUzkm8z2t1lz2H4VyJLAhwnG5ZuZTNEV/2mcWrU7JQ==} + /@aws-sdk/smithy-client/3.338.0: + resolution: {integrity: sha512-IpFLdLG8GwaiFdqVXf+WyU47Hfa2BMIupAU6iSkE2ZO0lBdg+efn/BBwis5WbBNTDCaaU0xH9y68SmnqqtD7pA==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/middleware-stack': 3.347.0 - '@aws-sdk/types': 3.347.0 + '@aws-sdk/middleware-stack': 3.338.0 + '@aws-sdk/types': 3.338.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/token-providers/3.354.0: - resolution: {integrity: sha512-KcijiySy0oIyafKQagcwgu0fo35mK+2K8pwxRU1WfXqe80Gn1qGceeWcG4iW+t/rUaxa/LVo857N0LcagxCrZA==} + /@aws-sdk/token-providers/3.338.0: + resolution: {integrity: sha512-wuiEGcWiMeq5N68M489i2iGYcCad9p1btNEOFgus+JO3DRSA6HZXizLI1wqfbUm5Ei8512AvUKB6N8PMzahQsg==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/client-sso-oidc': 3.354.0 - '@aws-sdk/property-provider': 3.353.0 - '@aws-sdk/shared-ini-file-loader': 3.354.0 - '@aws-sdk/types': 3.347.0 + '@aws-sdk/client-sso-oidc': 3.338.0 + '@aws-sdk/property-provider': 3.338.0 + '@aws-sdk/shared-ini-file-loader': 3.338.0 + '@aws-sdk/types': 3.338.0 tslib: 2.5.0 transitivePeerDependencies: - aws-crt dev: false optional: true - /@aws-sdk/types/3.347.0: - resolution: {integrity: sha512-GkCMy79mdjU9OTIe5KT58fI/6uqdf8UmMdWqVHmFJ+UpEzOci7L/uw4sOXWo7xpPzLs6cJ7s5ouGZW4GRPmHFA==} + /@aws-sdk/types/3.338.0: + resolution: {integrity: sha512-hrNK15o+EObLrl9oWOyxJN2dwjgbdBMGolLEVP/wR/+M9ojHgk/x1kMsCVcV82a8Vgdtqx1TyOC3UugUPT0+NA==} engines: {node: '>=14.0.0'} dependencies: tslib: 2.5.0 dev: false optional: true - /@aws-sdk/url-parser/3.347.0: - resolution: {integrity: sha512-lhrnVjxdV7hl+yCnJfDZOaVLSqKjxN20MIOiijRiqaWGLGEAiSqBreMhL89X1WKCifxAs4zZf9YB9SbdziRpAA==} + /@aws-sdk/url-parser/3.338.0: + resolution: {integrity: sha512-x8a5swfZ6iWJZEA8rm99OKQ1A6xhWPP1taQUzoPavGCzPAOqyc8cd0FcXYMxvtXb3FeBhGaI8tiGKvelJro0+A==} dependencies: - '@aws-sdk/querystring-parser': 3.347.0 - '@aws-sdk/types': 3.347.0 + '@aws-sdk/querystring-parser': 3.338.0 + '@aws-sdk/types': 3.338.0 tslib: 2.5.0 dev: false optional: true @@ -1613,35 +1730,35 @@ packages: dev: false optional: true - /@aws-sdk/util-defaults-mode-browser/3.353.0: - resolution: {integrity: sha512-ushvOQKJIH7S6E//xMDPyf2/Bbu0K2A0GJRB88qQV6VKRBo4PEbeHTb6BbzPhYVX0IbY3uR/X7+Xwk4FeEkMWg==} + /@aws-sdk/util-defaults-mode-browser/3.338.0: + resolution: {integrity: sha512-Zfr5c7JKMJTfb7z+hgd0ioU5iw+wId6Cppc5V1HpZuS2YY4Mn3aJIixzyzhIoCzbmk/yIkf96981epM9eo3/TA==} engines: {node: '>= 10.0.0'} dependencies: - '@aws-sdk/property-provider': 3.353.0 - '@aws-sdk/types': 3.347.0 + '@aws-sdk/property-provider': 3.338.0 + '@aws-sdk/types': 3.338.0 bowser: 2.11.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/util-defaults-mode-node/3.354.0: - resolution: {integrity: sha512-CaaRVBdOYX4wZadj+CDUxpO+4RjyYJcSv71A60jV6CZ/ya1+oYfmPbG5QZ4AlV6crdev2B+aUoR2LPIYqn/GnQ==} + /@aws-sdk/util-defaults-mode-node/3.338.0: + resolution: {integrity: sha512-DFM3BSpSetshZTgTjueCkAYZWS0tn5zl7SjkSpFhWQZ8Tt/Df3/DEjcPvxzmC/5vgYSUXNsqcI7lLAJk9aGZAA==} engines: {node: '>= 10.0.0'} dependencies: - '@aws-sdk/config-resolver': 3.354.0 - '@aws-sdk/credential-provider-imds': 3.354.0 - '@aws-sdk/node-config-provider': 3.354.0 - '@aws-sdk/property-provider': 3.353.0 - '@aws-sdk/types': 3.347.0 + '@aws-sdk/config-resolver': 3.338.0 + '@aws-sdk/credential-provider-imds': 3.338.0 + '@aws-sdk/node-config-provider': 3.338.0 + '@aws-sdk/property-provider': 3.338.0 + '@aws-sdk/types': 3.338.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/util-endpoints/3.352.0: - resolution: {integrity: sha512-PjWMPdoIUWfBPgAWLyOrWFbdSS/3DJtc0OmFb/JrE8C8rKFYl+VGW5f1p0cVdRWiDR0xCGr0s67p8itAakVqjw==} + /@aws-sdk/util-endpoints/3.338.0: + resolution: {integrity: sha512-0gBQcohbNcBsBR7oyaD0Dg2m6qOmfp0G1iN/NM23gwAr2H3ni8tUXfs1HsZzxikOwUr6dSLASokc30vQXBF44A==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.347.0 + '@aws-sdk/types': 3.338.0 tslib: 2.5.0 dev: false optional: true @@ -1662,19 +1779,19 @@ packages: dev: false optional: true - /@aws-sdk/util-middleware/3.347.0: - resolution: {integrity: sha512-8owqUA3ePufeYTUvlzdJ7Z0miLorTwx+rNol5lourGQZ9JXsVMo23+yGA7nOlFuXSGkoKpMOtn6S0BT2bcfeiw==} + /@aws-sdk/util-middleware/3.338.0: + resolution: {integrity: sha512-oQuAmhi16HWEqVa+Nq4VD4Ymet9vS+uiW92reaagQrW2QFjAgJW9A6pU0PcIHF9sWY1iDKeNdV5b9odQ45PDJA==} engines: {node: '>=14.0.0'} dependencies: tslib: 2.5.0 dev: false optional: true - /@aws-sdk/util-retry/3.347.0: - resolution: {integrity: sha512-NxnQA0/FHFxriQAeEgBonA43Q9/VPFQa8cfJDuT2A1YZruMasgjcltoZszi1dvoIRWSZsFTW42eY2gdOd0nffQ==} + /@aws-sdk/util-retry/3.338.0: + resolution: {integrity: sha512-diR6M3gJgSgBg/87L2e8iF8urG+LOW9ZGWxhntYpYX4uhiIjwNgUPUa993553C8GIOZDHez5X9ExU4asYGQ71Q==} engines: {node: '>= 14.0.0'} dependencies: - '@aws-sdk/service-error-classification': 3.347.0 + '@aws-sdk/service-error-classification': 3.338.0 tslib: 2.5.0 dev: false optional: true @@ -1687,17 +1804,17 @@ packages: dev: false optional: true - /@aws-sdk/util-user-agent-browser/3.347.0: - resolution: {integrity: sha512-ydxtsKVtQefgbk1Dku1q7pMkjDYThauG9/8mQkZUAVik55OUZw71Zzr3XO8J8RKvQG8lmhPXuAQ0FKAyycc0RA==} + /@aws-sdk/util-user-agent-browser/3.338.0: + resolution: {integrity: sha512-3e8D+SOtOQEtRtksOEF7EC26xPkuY6YK6biLgdtvR9JspK96rHk5eX1HEJeBJJqbxhyPaxpIw+OhWhnsrUS3hA==} dependencies: - '@aws-sdk/types': 3.347.0 + '@aws-sdk/types': 3.338.0 bowser: 2.11.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/util-user-agent-node/3.354.0: - resolution: {integrity: sha512-2xkblZS3PGxxh//0lgCwJw2gvh9ZBcI9H9xv05YP7hcwlz9BmkAlbei2i6Uew6agJMLO4unfgWoBTpzp3WLaKg==} + /@aws-sdk/util-user-agent-node/3.338.0: + resolution: {integrity: sha512-rc+bC5KM9h25urRc+MXuViJkJ+qYG2NlCRw6xm2lSIvHFJTUjH1ZMO3mqNDYkGnQRbj0mmrVe+N77TJZGf3Q2Q==} engines: {node: '>=14.0.0'} peerDependencies: aws-crt: '>=1.0.0' @@ -1705,8 +1822,8 @@ packages: aws-crt: optional: true dependencies: - '@aws-sdk/node-config-provider': 3.354.0 - '@aws-sdk/types': 3.347.0 + '@aws-sdk/node-config-provider': 3.338.0 + '@aws-sdk/types': 3.338.0 tslib: 2.5.0 dev: false optional: true @@ -1873,6 +1990,13 @@ packages: jsonwebtoken: 8.5.1 uuid: 8.3.2 + /@babel/code-frame/7.18.6: + resolution: {integrity: sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/highlight': 7.18.6 + dev: true + /@babel/code-frame/7.21.4: resolution: {integrity: sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==} engines: {node: '>=6.9.0'} @@ -1894,7 +2018,7 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.2.0 - '@babel/code-frame': 7.21.4 + '@babel/code-frame': 7.18.6 '@babel/generator': 7.19.6 '@babel/helper-compilation-targets': 7.19.3_@babel+core@7.19.6 '@babel/helper-module-transforms': 7.19.6 @@ -2401,6 +2525,11 @@ packages: regenerator-runtime: 0.13.11 dev: true + /@babel/standalone/7.21.8: + resolution: {integrity: sha512-Od6cBJ8dm9wjAt+3olvO7N3s+8UsCkX3hH41Ew3BlFJw1QQtbctplq3kuwzzfk+YcmXE95k8fJCzbnhf32+BxQ==} + engines: {node: '>=6.9.0'} + dev: true + /@babel/template/7.18.10: resolution: {integrity: sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==} engines: {node: '>=6.9.0'} @@ -2423,7 +2552,7 @@ packages: resolution: {integrity: sha512-6l5HrUCzFM04mfbG09AagtYyR2P0B71B1wN7PfSPiksDPz2k5H9CBC1tcZpz2M8OxbKTPccByoOJ22rUKbpmQQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.21.4 + '@babel/code-frame': 7.18.6 '@babel/generator': 7.19.6 '@babel/helper-environment-visitor': 7.18.9 '@babel/helper-function-name': 7.19.0 @@ -2501,6 +2630,27 @@ packages: '@jridgewell/trace-mapping': 0.3.9 dev: true + /@esbuild-kit/cjs-loader/2.4.2: + resolution: {integrity: sha512-BDXFbYOJzT/NBEtp71cvsrGPwGAMGRB/349rwKuoxNSiKjPraNNnlK6MIIabViCjqZugu6j+xeMDlEkWdHHJSg==} + dependencies: + '@esbuild-kit/core-utils': 3.1.0 + get-tsconfig: 4.5.0 + dev: true + + /@esbuild-kit/core-utils/3.1.0: + resolution: {integrity: sha512-Uuk8RpCg/7fdHSceR1M6XbSZFSuMrxcePFuGgyvsBn+u339dk5OeL4jv2EojwTN2st/unJGsVm4qHWjWNmJ/tw==} + dependencies: + esbuild: 0.17.19 + source-map-support: 0.5.21 + dev: true + + /@esbuild-kit/esm-loader/2.5.5: + resolution: {integrity: sha512-Qwfvj/qoPbClxCRNuac1Du01r9gvNOT+pMYtJDapfB1eoGN1YlJ1BixLyL9WVENRx5RXgNLdfYdx/CuswlGhMw==} + dependencies: + '@esbuild-kit/core-utils': 3.1.0 + get-tsconfig: 4.5.0 + dev: true + /@esbuild/android-arm/0.15.13: resolution: {integrity: sha512-RY2fVI8O0iFUNvZirXaQ1vMvK0xhCcl0gqRj74Z6yEiO1zAUa7hbsdwZM1kzqbxHK7LFyMizipfXT3JME+12Hw==} engines: {node: '>=12'} @@ -2510,8 +2660,8 @@ packages: dev: true optional: true - /@esbuild/android-arm/0.18.2: - resolution: {integrity: sha512-YAnQBHlY0IvYtvY0avnXjI8ywW23emEjk5XExqbFmypath+Snq9MgY1IS47rnqBKVSqnl0ElDt221ZgaeRrkXg==} + /@esbuild/android-arm/0.17.18: + resolution: {integrity: sha512-EmwL+vUBZJ7mhFCs5lA4ZimpUH3WMAoqvOIYhVQwdIgSpHC8ImHdsRyhHAVxpDYUSm0lWvd63z0XH1IlImS2Qw==} engines: {node: '>=12'} cpu: [arm] os: [android] @@ -2519,8 +2669,26 @@ packages: dev: true optional: true - /@esbuild/android-arm64/0.18.2: - resolution: {integrity: sha512-1Y2pb0hLdmji8I0zBwNsYSDN7zJSQqufgLOuOsrrod00WEAgKywQR5MB/E046Is/YTP4bgcPS4BioaSDBaLaTg==} + /@esbuild/android-arm/0.17.19: + resolution: {integrity: sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm64/0.17.18: + resolution: {integrity: sha512-/iq0aK0eeHgSC3z55ucMAHO05OIqmQehiGay8eP5l/5l+iEr4EIbh4/MI8xD9qRFjqzgkc0JkX0LculNC9mXBw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm64/0.17.19: + resolution: {integrity: sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -2528,8 +2696,8 @@ packages: dev: true optional: true - /@esbuild/android-x64/0.18.2: - resolution: {integrity: sha512-P047Mh3pj8uYVE3A/B3QDX6nG8dKbHLJ+48R6Y0CRXCJ5PkXJxdHOTaS8SYs6eSR3FFU6/YQ5TishQXVHX7F5A==} + /@esbuild/android-x64/0.17.18: + resolution: {integrity: sha512-x+0efYNBF3NPW2Xc5bFOSFW7tTXdAcpfEg2nXmxegm4mJuVeS+i109m/7HMiOQ6M12aVGGFlqJX3RhNdYM2lWg==} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -2537,8 +2705,26 @@ packages: dev: true optional: true - /@esbuild/darwin-arm64/0.18.2: - resolution: {integrity: sha512-a3Rkqd0tGVYMEKNy9SstWEdeBmM60l8FVD5o4rmwHr3xO1LbLqtCJSrWGbnf37hevo6m437mURVmpEHOmkXeTA==} + /@esbuild/android-x64/0.17.19: + resolution: {integrity: sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64/0.17.18: + resolution: {integrity: sha512-6tY+djEAdF48M1ONWnQb1C+6LiXrKjmqjzPNPWXhu/GzOHTHX2nh8Mo2ZAmBFg0kIodHhciEgUBtcYCAIjGbjQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64/0.17.19: + resolution: {integrity: sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -2546,8 +2732,17 @@ packages: dev: true optional: true - /@esbuild/darwin-x64/0.18.2: - resolution: {integrity: sha512-cvH58adz9L10JNsIcgtkWNS/1eutjRTi3rtWz1s3ZhR64BpdmkxJBAXE/UjqybyNAWLhaN8mPJdlYI2f+tQA7g==} + /@esbuild/darwin-x64/0.17.18: + resolution: {integrity: sha512-Qq84ykvLvya3dO49wVC9FFCNUfSrQJLbxhoQk/TE1r6MjHo3sFF2tlJCwMjhkBVq3/ahUisj7+EpRSz0/+8+9A==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64/0.17.19: + resolution: {integrity: sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -2555,8 +2750,8 @@ packages: dev: true optional: true - /@esbuild/freebsd-arm64/0.18.2: - resolution: {integrity: sha512-68rGMGUdgmq+c5IvseCMqY4yaa2CAY/DIILMBA6bEU1caISF7fXnV69B1uU4s3ERuVDcasVVwiAFyNxCtkS6Zg==} + /@esbuild/freebsd-arm64/0.17.18: + resolution: {integrity: sha512-fw/ZfxfAzuHfaQeMDhbzxp9mc+mHn1Y94VDHFHjGvt2Uxl10mT4CDavHm+/L9KG441t1QdABqkVYwakMUeyLRA==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -2564,8 +2759,17 @@ packages: dev: true optional: true - /@esbuild/freebsd-x64/0.18.2: - resolution: {integrity: sha512-ZSR9On/rXoYuAtrXo5hYKy7OuZwKZyFh2rr6L3TX4UeR1tWLf84aLyAFt7e0tlRbh4zNgqFx+ePWmsSHw7L9Bw==} + /@esbuild/freebsd-arm64/0.17.19: + resolution: {integrity: sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64/0.17.18: + resolution: {integrity: sha512-FQFbRtTaEi8ZBi/A6kxOC0V0E9B/97vPdYjY9NdawyLd4Qk5VD5g2pbWN2VR1c0xhzcJm74HWpObPszWC+qTew==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -2573,8 +2777,17 @@ packages: dev: true optional: true - /@esbuild/linux-arm/0.18.2: - resolution: {integrity: sha512-jAbA75qJ70T5AOdmw9X8675ppeRfj7j57sOypoZ4mQlfQ/LKF8eoeLzTYVo8+aqLKqeIIl0vQ4hKOB0FyG98Zg==} + /@esbuild/freebsd-x64/0.17.19: + resolution: {integrity: sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm/0.17.18: + resolution: {integrity: sha512-jW+UCM40LzHcouIaqv3e/oRs0JM76JfhHjCavPxMUti7VAPh8CaGSlS7cmyrdpzSk7A+8f0hiedHqr/LMnfijg==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -2582,8 +2795,26 @@ packages: dev: true optional: true - /@esbuild/linux-arm64/0.18.2: - resolution: {integrity: sha512-DFKavAzbu/n9HXWuetxmYN10XnfzW7FgOgpcrGD8eXaiu77KdgB+OVWA83x9FtDYtsoFpfdlDuVFAQFfrhu77A==} + /@esbuild/linux-arm/0.17.19: + resolution: {integrity: sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64/0.17.18: + resolution: {integrity: sha512-R7pZvQZFOY2sxUG8P6A21eq6q+eBv7JPQYIybHVf1XkQYC+lT7nDBdC7wWKTrbvMXKRaGudp/dzZCwL/863mZQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64/0.17.19: + resolution: {integrity: sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -2591,8 +2822,17 @@ packages: dev: true optional: true - /@esbuild/linux-ia32/0.18.2: - resolution: {integrity: sha512-VEaK3Z+vJyDwwPsP0sovaEw1foDzrMs7XQNYEIFkOwMjSe2BipKRKUUyrznil0p8qqsK7U8W+T7oNqZpgdnD2Q==} + /@esbuild/linux-ia32/0.17.18: + resolution: {integrity: sha512-ygIMc3I7wxgXIxk6j3V00VlABIjq260i967Cp9BNAk5pOOpIXmd1RFQJQX9Io7KRsthDrQYrtcx7QCof4o3ZoQ==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32/0.17.19: + resolution: {integrity: sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -2609,8 +2849,8 @@ packages: dev: true optional: true - /@esbuild/linux-loong64/0.18.2: - resolution: {integrity: sha512-Af1uZdB0oeJo4PW67l9aw94oakSamFxhC6ltC2eDkndozd9QygVNMTF7s7uxTLjo+BJqyVqG9wjmLCYF1o4NmA==} + /@esbuild/linux-loong64/0.17.18: + resolution: {integrity: sha512-bvPG+MyFs5ZlwYclCG1D744oHk1Pv7j8psF5TfYx7otCVmcJsEXgFEhQkbhNW8otDHL1a2KDINW20cfCgnzgMQ==} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -2618,8 +2858,17 @@ packages: dev: true optional: true - /@esbuild/linux-mips64el/0.18.2: - resolution: {integrity: sha512-WcTbt61+9dREuOFKXac4Qg+3OuRhLxPL9lmkI2P7fGuq/fWS2qq+AvGGVLMyk+OtXGDjyQolcEDeYlRoOmjRYQ==} + /@esbuild/linux-loong64/0.17.19: + resolution: {integrity: sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el/0.17.18: + resolution: {integrity: sha512-oVqckATOAGuiUOa6wr8TXaVPSa+6IwVJrGidmNZS1cZVx0HqkTMkqFGD2HIx9H1RvOwFeWYdaYbdY6B89KUMxA==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -2627,8 +2876,17 @@ packages: dev: true optional: true - /@esbuild/linux-ppc64/0.18.2: - resolution: {integrity: sha512-Ov+VHayvCPb52axma6+xm8QDawRjwHscPXedHg4U92DxlhKQ0H+6onRiC3J9kKI50p8pKKypprpCWrRrXjZN7Q==} + /@esbuild/linux-mips64el/0.17.19: + resolution: {integrity: sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64/0.17.18: + resolution: {integrity: sha512-3dLlQO+b/LnQNxgH4l9rqa2/IwRJVN9u/bK63FhOPB4xqiRqlQAU0qDU3JJuf0BmaH0yytTBdoSBHrb2jqc5qQ==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -2636,8 +2894,26 @@ packages: dev: true optional: true - /@esbuild/linux-riscv64/0.18.2: - resolution: {integrity: sha512-qW37zzKKN9C5l5LnVDriOK0eZRzQeixhtrfd5C78PAsTE15GeHU9G0oyT/u/IkNjEBjXWpTZOOHKNbjhrvuL9g==} + /@esbuild/linux-ppc64/0.17.19: + resolution: {integrity: sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64/0.17.18: + resolution: {integrity: sha512-/x7leOyDPjZV3TcsdfrSI107zItVnsX1q2nho7hbbQoKnmoeUWjs+08rKKt4AUXju7+3aRZSsKrJtaRmsdL1xA==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64/0.17.19: + resolution: {integrity: sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -2645,8 +2921,17 @@ packages: dev: true optional: true - /@esbuild/linux-s390x/0.18.2: - resolution: {integrity: sha512-izzEFMRO8LaQIlX22+fTgP5I7Os3T51mtAWsRNpZ5pMfQIa9PqtgFAoRcb10DV+/YkH/TMMxQIlevUvDS6E4vw==} + /@esbuild/linux-s390x/0.17.18: + resolution: {integrity: sha512-cX0I8Q9xQkL/6F5zWdYmVf5JSQt+ZfZD2bJudZrWD+4mnUvoZ3TDDXtDX2mUaq6upMFv9FlfIh4Gfun0tbGzuw==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x/0.17.19: + resolution: {integrity: sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -2654,8 +2939,17 @@ packages: dev: true optional: true - /@esbuild/linux-x64/0.18.2: - resolution: {integrity: sha512-y5yqQ1ww4FfI9bQ1ZP/0k1rcgA6Ql2/AgzvqpowN0Q5tXDZkCavPdJbFXKrqA43vd1UTXt+AutTHYJ7km6e2Eg==} + /@esbuild/linux-x64/0.17.18: + resolution: {integrity: sha512-66RmRsPlYy4jFl0vG80GcNRdirx4nVWAzJmXkevgphP1qf4dsLQCpSKGM3DUQCojwU1hnepI63gNZdrr02wHUA==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64/0.17.19: + resolution: {integrity: sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -2663,8 +2957,8 @@ packages: dev: true optional: true - /@esbuild/netbsd-x64/0.18.2: - resolution: {integrity: sha512-usNjpKFf83X4o60gdMD47NCblaSZ6DARf31/FyCzxOgnF80mJ+RhDs9RTqgyfH8KyduO5mjgInw9+ct286ayYA==} + /@esbuild/netbsd-x64/0.17.18: + resolution: {integrity: sha512-95IRY7mI2yrkLlTLb1gpDxdC5WLC5mZDi+kA9dmM5XAGxCME0F8i4bYH4jZreaJ6lIZ0B8hTrweqG1fUyW7jbg==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -2672,8 +2966,26 @@ packages: dev: true optional: true - /@esbuild/openbsd-x64/0.18.2: - resolution: {integrity: sha512-6urzy1+VwcPuhG+5jwHA8lD9E87E5+ey3qKw2EhRS+qUmMxLvfwP8szWC2JHVGZDPEDge6fgn0pBj+y9rxDLwQ==} + /@esbuild/netbsd-x64/0.17.19: + resolution: {integrity: sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64/0.17.18: + resolution: {integrity: sha512-WevVOgcng+8hSZ4Q3BKL3n1xTv5H6Nb53cBrtzzEjDbbnOmucEVcZeGCsCOi9bAOcDYEeBZbD2SJNBxlfP3qiA==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64/0.17.19: + resolution: {integrity: sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -2681,8 +2993,8 @@ packages: dev: true optional: true - /@esbuild/sunos-x64/0.18.2: - resolution: {integrity: sha512-SMZPTACsvpKYAIl9o8nhnmMn6/lp62iMeV/2EBMtj+sW6dXwW9b0cLjihkBv4PG1CCRlwWKPZo43imqZxC95ZA==} + /@esbuild/sunos-x64/0.17.18: + resolution: {integrity: sha512-Rzf4QfQagnwhQXVBS3BYUlxmEbcV7MY+BH5vfDZekU5eYpcffHSyjU8T0xucKVuOcdCsMo+Ur5wmgQJH2GfNrg==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -2690,8 +3002,26 @@ packages: dev: true optional: true - /@esbuild/win32-arm64/0.18.2: - resolution: {integrity: sha512-H2zzjPdzSDNwUnZdZf9/xfm0CYqHFXuenCMAx+tRzIRqWUT6MmZ9/q7722KnAZ6uPpq0RLs7EjCIIfmt6CaRGg==} + /@esbuild/sunos-x64/0.17.19: + resolution: {integrity: sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64/0.17.18: + resolution: {integrity: sha512-Kb3Ko/KKaWhjeAm2YoT/cNZaHaD1Yk/pa3FTsmqo9uFh1D1Rfco7BBLIPdDOozrObj2sahslFuAQGvWbgWldAg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64/0.17.19: + resolution: {integrity: sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -2699,8 +3029,8 @@ packages: dev: true optional: true - /@esbuild/win32-ia32/0.18.2: - resolution: {integrity: sha512-lfyjTN+FrKgvNvrH7nOLtaz58J/8coZOo4LQwgBMP4D7ZOurhvluXS3GjePLzq9GbWnJDZdKCKbMKhZPPcdJJA==} + /@esbuild/win32-ia32/0.17.18: + resolution: {integrity: sha512-0/xUMIdkVHwkvxfbd5+lfG7mHOf2FRrxNbPiKWg9C4fFrB8H0guClmaM3BFiRUYrznVoyxTIyC/Ou2B7QQSwmw==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -2708,8 +3038,26 @@ packages: dev: true optional: true - /@esbuild/win32-x64/0.18.2: - resolution: {integrity: sha512-Q4nIjqWXjxkELwd7kVepsJxbQ/6ERNsHpjz1j+IKjwSYw+g06U0RQOy5xh848AHvgr9itnGLa3cT2G5t0dBFsw==} + /@esbuild/win32-ia32/0.17.19: + resolution: {integrity: sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64/0.17.18: + resolution: {integrity: sha512-qU25Ma1I3NqTSHJUOKi9sAH1/Mzuvlke0ioMJRthLXKm7JiSKVwFghlGbDLOO2sARECGhja4xYfRAZNPAkooYg==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64/0.17.19: + resolution: {integrity: sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -2717,13 +3065,13 @@ packages: dev: true optional: true - /@eslint-community/eslint-utils/4.4.0_eslint@8.43.0: + /@eslint-community/eslint-utils/4.4.0_eslint@8.41.0: resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.43.0 + eslint: 8.41.0 eslint-visitor-keys: 3.4.1 dev: true @@ -2749,20 +3097,20 @@ packages: - supports-color dev: true - /@eslint/js/8.43.0: - resolution: {integrity: sha512-s2UHCoiXfxMvmfzqoN+vrQ84ahUSYde9qNO1MdxmoEhyHWsfmwOpFlwYV+ePJEVc7gFnATGUi376WowX1N7tFg==} + /@eslint/js/8.41.0: + resolution: {integrity: sha512-LxcyMGxwmTh2lY9FwHPGWOHmYFCZvbrFCBZL4FzSSsxsRPuhrYUg/49/0KDfW8tnIEaEHtfmn6+NPN+1DqaNmA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@faker-js/faker/8.0.2: - resolution: {integrity: sha512-Uo3pGspElQW91PCvKSIAXoEgAUlRnH29sX2/p89kg7sP1m2PzCufHINd0FhTXQf6DYGiUlVncdSPa2F9wxed2A==} + /@faker-js/faker/8.0.1: + resolution: {integrity: sha512-kbh5MenpTN9U0B4QcOI1NoTPlZHniSYQ3BHbhAnPjJGAmmFqxoxTE4sGdpy7ZOO9038DPGCuhXyMkjOr05uVwA==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0, npm: '>=6.14.13'} dev: true - /@fast-check/jest/1.7.0_@jest+globals@29.5.0: - resolution: {integrity: sha512-I2uDrfp+1J1bsIFr/wpnEfWw15s2lMOxc33v2jZ64bYZqeI/BOwl+1IFO1JXA9fQyYnAFie7v3xlMtCL4OLbGw==} + /@fast-check/jest/1.6.2_@jest+globals@29.5.0: + resolution: {integrity: sha512-NaIgmKsnVmlsmIAscJaxyo4ETgtrASGkiki6ZRNQGL3xXgTacZ2zZXViH8Ba/vKJcoZqu+e5+Lc4sUECTSFm4A==} peerDependencies: - '@fast-check/worker': ~0.0.7 + '@fast-check/worker': ~0.0.1 '@jest/expect': '>=28.0.0' '@jest/globals': '>=25.5.2' peerDependenciesMeta: @@ -2779,8 +3127,8 @@ packages: resolution: {integrity: sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==} dev: true - /@humanwhocodes/config-array/0.11.10: - resolution: {integrity: sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==} + /@humanwhocodes/config-array/0.11.8: + resolution: {integrity: sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==} engines: {node: '>=10.10.0'} dependencies: '@humanwhocodes/object-schema': 1.2.1 @@ -2836,7 +3184,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.5.0 - '@types/node': 18.16.18 + '@types/node': 18.16.14 chalk: 4.1.2 jest-message-util: 29.5.0 jest-util: 29.5.0 @@ -2857,14 +3205,14 @@ packages: '@jest/test-result': 29.5.0 '@jest/transform': 29.5.0 '@jest/types': 29.5.0 - '@types/node': 18.16.18 + '@types/node': 18.16.14 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.8.0 exit: 0.1.2 graceful-fs: 4.2.10 jest-changed-files: 29.5.0 - jest-config: 29.5.0_@types+node@18.16.18 + jest-config: 29.5.0_@types+node@18.16.14 jest-haste-map: 29.5.0 jest-message-util: 29.5.0 jest-regex-util: 29.4.3 @@ -2899,14 +3247,14 @@ packages: '@jest/test-result': 29.5.0 '@jest/transform': 29.5.0 '@jest/types': 29.5.0 - '@types/node': 18.16.18 + '@types/node': 18.16.14 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.8.0 exit: 0.1.2 graceful-fs: 4.2.10 jest-changed-files: 29.5.0 - jest-config: 29.5.0_5qsgjhhli643kzzyel6mobhisq + jest-config: 29.5.0_daglcptrsglylliibnnp676h3i jest-haste-map: 29.5.0 jest-message-util: 29.5.0 jest-regex-util: 29.4.3 @@ -2947,7 +3295,7 @@ packages: dependencies: '@jest/fake-timers': 29.5.0 '@jest/types': 29.5.0 - '@types/node': 18.16.18 + '@types/node': 18.16.14 jest-mock: 29.5.0 dev: true @@ -2974,7 +3322,7 @@ packages: dependencies: '@jest/types': 29.5.0 '@sinonjs/fake-timers': 10.0.2 - '@types/node': 18.16.18 + '@types/node': 18.16.14 jest-message-util: 29.5.0 jest-mock: 29.5.0 jest-util: 29.5.0 @@ -3007,7 +3355,7 @@ packages: '@jest/transform': 29.5.0 '@jest/types': 29.5.0 '@jridgewell/trace-mapping': 0.3.17 - '@types/node': 18.16.18 + '@types/node': 18.16.14 chalk: 4.1.2 collect-v8-coverage: 1.0.1 exit: 0.1.2 @@ -3094,7 +3442,7 @@ packages: dependencies: '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 18.16.18 + '@types/node': 18.16.14 '@types/yargs': 16.0.4 chalk: 4.1.2 dev: true @@ -3106,7 +3454,7 @@ packages: '@jest/schemas': 29.4.3 '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 18.16.18 + '@types/node': 18.16.14 '@types/yargs': 17.0.13 chalk: 4.1.2 dev: true @@ -3166,6 +3514,16 @@ packages: /@js-joda/core/5.4.2: resolution: {integrity: sha512-QIDIZ9a0NfDStgD47VaTgwiPjlw1p4QPLwjOB/9+/DqIztoQopPNNAd+HdtQMHgE+ibP3dJacd8/TVL/A1RaaA==} + /@jsdevtools/ez-spawn/3.0.4: + resolution: {integrity: sha512-f5DRIOZf7wxogefH03RjMPMdBF7ADTWUMoOs9kaJo06EfwF+aFhMZMDZxHg/Xe12hptN9xoZjGso2fdjapBRIA==} + engines: {node: '>=10'} + dependencies: + call-me-maybe: 1.0.2 + cross-spawn: 7.0.3 + string-argv: 0.3.1 + type-detect: 4.0.8 + dev: true + /@mapbox/node-pre-gyp/1.0.10: resolution: {integrity: sha512-4ySo4CjzStuprMwk35H5pPbkymjv1SF3jGLj6rAHp/xT/RF7TL7bd9CTm1xDY49K2qF7jmR/g7k+SkLETP6opA==} hasBin: true @@ -3173,7 +3531,7 @@ packages: detect-libc: 2.0.1 https-proxy-agent: 5.0.1 make-dir: 3.1.0 - node-fetch: 2.6.11_oawau75ow7jz373yzwkw5fs4ry + node-fetch: 2.6.11 nopt: 5.0.0 npmlog: 5.0.1 rimraf: 3.0.2 @@ -3184,26 +3542,26 @@ packages: - supports-color dev: true - /@microsoft/api-extractor-model/7.27.3_@types+node@18.16.16: - resolution: {integrity: sha512-fSFvw7otYHduOkyshjTbapKKgwF8bgquVHvgF8VgeKtMYvqXkoaj7W6VcM7PNY7E2bbblhUgC4XNdqZLD4SJGw==} + /@microsoft/api-extractor-model/7.27.0_@types+node@18.16.14: + resolution: {integrity: sha512-wHqIMiwSARmiuVLn/zmVpiRncq6hvBfC5GF+sjrN3w4FqVkqFYk7DetvfRNdy/3URdqqmYGrhJlcU9HpLnHOPg==} dependencies: '@microsoft/tsdoc': 0.14.2 '@microsoft/tsdoc-config': 0.16.2 - '@rushstack/node-core-library': 3.59.4_@types+node@18.16.16 + '@rushstack/node-core-library': 3.59.1_@types+node@18.16.14 transitivePeerDependencies: - '@types/node' dev: true - /@microsoft/api-extractor/7.36.0_@types+node@18.16.16: - resolution: {integrity: sha512-P+kYgJFDXIr+UNzhRMhlpM/dderi6ab4lxn35vdhfAIMPtGCSXIJxrrtpTOQmQW8CZtmoZX06LYoUsKCc1zjow==} + /@microsoft/api-extractor/7.35.0_@types+node@18.16.14: + resolution: {integrity: sha512-yBGfPJeEtzk8sg2hE2/vOPRvnJBvstbWNGeyGV1jIEUSgytzQ0QPgPEkOsP2n7nBfnyRXmZaBa2vJPGOzVWy+g==} hasBin: true dependencies: - '@microsoft/api-extractor-model': 7.27.3_@types+node@18.16.16 + '@microsoft/api-extractor-model': 7.27.0_@types+node@18.16.14 '@microsoft/tsdoc': 0.14.2 '@microsoft/tsdoc-config': 0.16.2 - '@rushstack/node-core-library': 3.59.4_@types+node@18.16.16 - '@rushstack/rig-package': 0.4.0 - '@rushstack/ts-command-line': 4.15.1 + '@rushstack/node-core-library': 3.59.1_@types+node@18.16.14 + '@rushstack/rig-package': 0.3.19 + '@rushstack/ts-command-line': 4.13.3 colors: 1.2.5 lodash: 4.17.21 resolve: 1.22.2 @@ -3541,7 +3899,7 @@ packages: '@octokit/request-error': 2.1.0 '@octokit/types': 6.41.0 is-plain-object: 5.0.0 - node-fetch: 2.6.11_oawau75ow7jz373yzwkw5fs4ry + node-fetch: 2.6.11 universal-user-agent: 6.0.0 transitivePeerDependencies: - encoding @@ -3631,8 +3989,16 @@ packages: dev: true optional: true - /@prisma/engines-version/4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309: - resolution: {integrity: sha512-5V+AOhWmEsf0pQ6n6hMe6Dr1EQ4LD9Hi9GtNaJ3jq4bX1spsQbXOz0dchjZvYyKHgOzb41kxk2951moenBTGKA==} + /@posva/prompts/2.4.4: + resolution: {integrity: sha512-8aPwklhbSV2VN/NQMBNFkuo8+hlJVdcFRXp4NCIfdcahh3qNEcaSoD8qXjru0OlN1sONJ7le7p6+YUbALaG6Mg==} + engines: {node: '>= 14'} + dependencies: + kleur: 4.1.5 + sisteransi: 1.0.5 + dev: true + + /@prisma/engines-version/4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944: + resolution: {integrity: sha512-sVOig4tjGxxlYaFcXgE71f/rtFhzyYrfyfNFUsxCIEJyVKU9rdOWIlIwQ2NQ7PntvGnn+x0XuFo4OC1jvPJKzg==} /@prisma/mini-proxy/0.7.0: resolution: {integrity: sha512-rax49DeUqAQJgzw2vMkT90zAKfhQq21RAjWYr3RyunkmQ78gKM29E+IpV6R0xs7zgjax283fp8I2oIl50jHn8Q==} @@ -3640,19 +4006,19 @@ packages: hasBin: true dev: true - /@prisma/prisma-fmt-wasm/4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309: - resolution: {integrity: sha512-TePgKwrR//d9IZi1He11pfWdwDob9+LoNcttf2qmEmtYzNXX0uqdYqaCSr2ANPZBNOyZw2mq/YmWLX5jrHuG8A==} + /@prisma/prisma-fmt-wasm/4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944: + resolution: {integrity: sha512-1vuW5Cp6DnZpSmmM3dRsJ7do3LncJVkBAV9wwqGSLANDUNWDPfJwC7enN/YY3rnwkEVXMxzkTEbtYGA55blDLw==} dev: false - /@prisma/studio-common/0.487.0: - resolution: {integrity: sha512-BCmiuDwFJe7kqZr0oG99Yr80iKTD7fIKdFUmFXoySg2TJ7qaTsp+TIxbghYFAmC0CQpuxgVQVYgsX8Xl/z2cCw==} + /@prisma/studio-common/0.484.0: + resolution: {integrity: sha512-pdSgZ6Qq64MQntMbWRH0kJo76YBCXkVB32zaVykomS6fAFD+dDlrpFAooNyKC5WS5XDOzraE7nBXdzVKxLhf3w==} engines: {node: '>= 12'} dependencies: buffer: 6.0.3 dev: true - /@prisma/studio-pcw/0.487.0_af2arurw4njyhq5wa6w6rrkc54: - resolution: {integrity: sha512-tIohMQEo2Ud5VfVsRLrb5xOyO4nvJ45USFXG54H4a8sei+Ur23Mkr/V63YY0FhzbQJyj+HIUcQivBxqkjBRSwQ==} + /@prisma/studio-pcw/0.484.0_af2arurw4njyhq5wa6w6rrkc54: + resolution: {integrity: sha512-Gnyhcaa0KoM8WcntSbzF/aS4cXAGSBnSizMNhNWituEUt50Q4tS7Oxm/YZyBRXPxXqxeTTgDfm3M8GITPzaCTQ==} engines: {node: '>= 12'} peerDependencies: '@prisma/client': '*' @@ -3666,17 +4032,17 @@ packages: - supports-color dev: true - /@prisma/studio-server/0.487.0_af2arurw4njyhq5wa6w6rrkc54: - resolution: {integrity: sha512-jpig93ZvRak7Br+JF6UoGGbtPV2x3taQE8zmmu9HP/e/0087GSysJZiv1xFZGMAas5A87clJIeA5slEbmK4Tzw==} + /@prisma/studio-server/0.484.0_af2arurw4njyhq5wa6w6rrkc54: + resolution: {integrity: sha512-WRI/XFXU5gElbqFFajzRfqgFivLL2T10j6YsSA4k/u3frgDwhXVhWibWxinRDn1N2rmTlN9DFQYZL0+8fryKLg==} engines: {node: '>= 12'} peerDependencies: '@prisma/internals': '*' dependencies: '@prisma/internals': link:packages/internals - '@prisma/studio': 0.487.0 - '@prisma/studio-common': 0.487.0 - '@prisma/studio-pcw': 0.487.0_af2arurw4njyhq5wa6w6rrkc54 - checkpoint-client: 1.1.24 + '@prisma/studio': 0.484.0 + '@prisma/studio-common': 0.484.0 + '@prisma/studio-pcw': 0.484.0_af2arurw4njyhq5wa6w6rrkc54 + checkpoint-client: 1.1.23 cors: 2.8.5 debug: 4.3.3 express: 4.17.2 @@ -3687,19 +4053,110 @@ packages: - supports-color dev: true - /@prisma/studio/0.487.0: - resolution: {integrity: sha512-ESkcAgT1UGlTnGlQlostXAoS2N3VmMKKhKWQYWs0WtfBPzkM2xf2aPX6Io8tpWC/Qx4VDPmltugwRhL6BKHL9w==} + /@prisma/studio/0.484.0: + resolution: {integrity: sha512-qxNh1oo67PygVWVvzDL0wIfEtMzZgMv3YuePcR9gT8xXcUV7p1fE+ZBfL2VTXIPtVf8/v3Pte7dAC0bAFx4EQA==} + dev: true + + /@rollup/plugin-alias/4.0.4_rollup@3.21.3: + resolution: {integrity: sha512-0CaAY238SMtYAWEXXptWSR8iz8NYZnH7zNBKuJ14xFJSGwLtPgjvXYsoApAHfzYXXH1ejxpVw7WlHss3zhh9SQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + rollup: 3.21.3 + slash: 4.0.0 + dev: true + + /@rollup/plugin-commonjs/24.1.0_rollup@3.21.3: + resolution: {integrity: sha512-eSL45hjhCWI0jCCXcNtLVqM5N1JlBGvlFfY0m6oOYnLCJ6N0qEXoZql4sY2MOUArzhH4SA/qBpTxvvZp2Sc+DQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.68.0||^3.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/pluginutils': 5.0.2_rollup@3.21.3 + commondir: 1.0.1 + estree-walker: 2.0.2 + glob: 8.1.0 + is-reference: 1.2.1 + magic-string: 0.27.0 + rollup: 3.21.3 + dev: true + + /@rollup/plugin-json/6.0.0_rollup@3.21.3: + resolution: {integrity: sha512-i/4C5Jrdr1XUarRhVu27EEwjt4GObltD7c+MkCIpO2QIbojw8MUs+CCTqOphQi3Qtg1FLmYt+l+6YeoIf51J7w==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/pluginutils': 5.0.2_rollup@3.21.3 + rollup: 3.21.3 dev: true - /@rushstack/node-core-library/3.59.4_@types+node@18.16.16: - resolution: {integrity: sha512-YAKJDC6Mz/KA1D7bvB88WaRX3knt/ZuLzkRu5G9QADGSjLtvTWzCNCytRF2PCSaaHOZaZsWul4F1KQdgFgUDqA==} + /@rollup/plugin-node-resolve/15.0.2_rollup@3.21.3: + resolution: {integrity: sha512-Y35fRGUjC3FaurG722uhUuG8YHOJRJQbI6/CkbRkdPotSpDj9NtIN85z1zrcyDcCQIW4qp5mgG72U+gJ0TAFEg==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.78.0||^3.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/pluginutils': 5.0.2_rollup@3.21.3 + '@types/resolve': 1.20.2 + deepmerge: 4.2.2 + is-builtin-module: 3.2.1 + is-module: 1.0.0 + resolve: 1.22.2 + rollup: 3.21.3 + dev: true + + /@rollup/plugin-replace/5.0.2_rollup@3.21.3: + resolution: {integrity: sha512-M9YXNekv/C/iHHK+cvORzfRYfPbq0RDD8r0G+bMiTXjNGKulPnCT9O3Ss46WfhI6ZOCgApOP7xAdmCQJ+U2LAA==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/pluginutils': 5.0.2_rollup@3.21.3 + magic-string: 0.27.0 + rollup: 3.21.3 + dev: true + + /@rollup/pluginutils/5.0.2_rollup@3.21.3: + resolution: {integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@types/estree': 1.0.0 + estree-walker: 2.0.2 + picomatch: 2.3.1 + rollup: 3.21.3 + dev: true + + /@rushstack/node-core-library/3.59.1_@types+node@18.16.14: + resolution: {integrity: sha512-iy/xaEhXGpX+DY1ZzAtNA+QPw+9+TJh773Im+JxG4R1fu00/vWq470UOEj6upxlUxmp0JxhnmNRxzfptHrn/Uw==} peerDependencies: '@types/node': '*' peerDependenciesMeta: '@types/node': optional: true dependencies: - '@types/node': 18.16.16 + '@types/node': 18.16.14 colors: 1.2.5 fs-extra: 7.0.1 import-lazy: 4.0.0 @@ -3709,15 +4166,15 @@ packages: z-schema: 5.0.5 dev: true - /@rushstack/rig-package/0.4.0: - resolution: {integrity: sha512-FnM1TQLJYwSiurP6aYSnansprK5l8WUK8VG38CmAaZs29ZeL1msjK0AP1VS4ejD33G0kE/2cpsPsS9jDenBMxw==} + /@rushstack/rig-package/0.3.19: + resolution: {integrity: sha512-2d0/Gn+qjOYneZbiHjn4SjyDwq9I0WagV37z0F1V71G+yONgH7wlt3K/UoNiDkhA8gTHYPRo2jz3CvttybwSag==} dependencies: resolve: 1.22.2 strip-json-comments: 3.1.1 dev: true - /@rushstack/ts-command-line/4.15.1: - resolution: {integrity: sha512-EL4jxZe5fhb1uVL/P/wQO+Z8Rc8FMiWJ1G7VgnPDvdIt5GVjRfK7vwzder1CZQiX3x0PY6uxENYLNGTFd1InRQ==} + /@rushstack/ts-command-line/4.13.3: + resolution: {integrity: sha512-6aQIv/o1EgsC/+SpgUyRmzg2QIAL6sudEzw3sWzJKwWuQTc5XRsyZpyldfE7WAmIqMXDao9QG35/NYORjHm5Zw==} dependencies: '@types/argparse': 1.0.38 argparse: 1.0.10 @@ -3785,47 +4242,47 @@ packages: engines: {node: '>= 12.13.0', npm: '>= 6.12.0'} dependencies: '@slack/types': 1.10.0 - '@types/node': 18.16.18 + '@types/node': 18.16.14 axios: 0.21.4 transitivePeerDependencies: - debug dev: true - /@smithy/protocol-http/1.1.0: - resolution: {integrity: sha512-H5y/kZOqfJSqRkwtcAoVbqONmhdXwSgYNJ1Glk5Ry8qlhVVy5qUzD9EklaCH8/XLnoCsLO/F/Giee8MIvaBRkg==} + /@smithy/protocol-http/1.0.1: + resolution: {integrity: sha512-9OrEn0WfOVtBNYJUjUAn9AOiJ4lzERCJJ/JeZs8E6yajTGxBaFRxUnNBHiNqoDJVg076hY36UmEnPx7xXrvUSg==} engines: {node: '>=14.0.0'} dependencies: - '@smithy/types': 1.1.0 + '@smithy/types': 1.0.0 tslib: 2.5.0 dev: false optional: true - /@smithy/types/1.1.0: - resolution: {integrity: sha512-KzmvisMmuwD2jZXuC9e65JrgsZM97y5NpDU7g347oB+Q+xQLU6hQZ5zFNNbEfwwOJHoOvEVTna+dk1h/lW7alw==} + /@smithy/types/1.0.0: + resolution: {integrity: sha512-kc1m5wPBHQCTixwuaOh9vnak/iJm21DrSf9UK6yDE5S3mQQ4u11pqAUiKWnlrZnYkeLfAI9UEHj9OaMT1v5Umg==} engines: {node: '>=14.0.0'} dependencies: tslib: 2.5.0 dev: false optional: true - /@swc-node/core/1.10.3_@swc+core@1.3.64: + /@swc-node/core/1.10.3_@swc+core@1.3.32: resolution: {integrity: sha512-8rpv1DXzsQjN/C8ZXuaTSmJ4M/lRr6geUlbOQ861DLC+sKWcEEvxRjK9cXQ28GserHuEcFDA3wlF9rD1YD0x+Q==} engines: {node: '>= 10'} peerDependencies: '@swc/core': '>= 1.3' dependencies: - '@swc/core': 1.3.64 + '@swc/core': 1.3.32 dev: true - /@swc-node/register/1.6.5_w2a3vrbasjgrtv5bvwiyhpfbku: + /@swc-node/register/1.6.5_ofrkegp7wplvaewrpezjkk4xzm: resolution: {integrity: sha512-yMxXlzthI0aMadYYKDhx7xvtjljB1qoD8Tv0djqSJ1ttTkoDxg6MhG5A5pIahiUT2neVrkWb9lCavoUwXAe/zQ==} peerDependencies: '@swc/core': '>= 1.3' typescript: '>= 4.3' dependencies: - '@swc-node/core': 1.10.3_@swc+core@1.3.64 + '@swc-node/core': 1.10.3_@swc+core@1.3.32 '@swc-node/sourcemap-support': 0.3.0 - '@swc/core': 1.3.64 + '@swc/core': 1.3.32 colorette: 2.0.19 debug: 4.3.4 pirates: 4.0.5 @@ -3869,8 +4326,8 @@ packages: dev: true optional: true - /@swc/core-darwin-arm64/1.3.63: - resolution: {integrity: sha512-lNR0BgG0/6dGpGP+AyFZoZ3YBhZN5GzvgAUzwy4skqn5sKZ7duQD02CNq1lIy7Im5BzgMUcJ+/Z7z/YUlqBK+Q==} + /@swc/core-darwin-arm64/1.3.32: + resolution: {integrity: sha512-o19bhlxuUgjUElm6i+QhXgZ0vD6BebiB/gQpK3en5aAwhOvinwr4sah3GqFXsQzz/prKVDuMkj9SW6F/Ug5hgg==} engines: {node: '>=10'} cpu: [arm64] os: [darwin] @@ -3878,8 +4335,8 @@ packages: dev: true optional: true - /@swc/core-darwin-arm64/1.3.64: - resolution: {integrity: sha512-gSPld6wxZBZoEvZXWmNfd+eJGlGvrEXmhMBCUwSccpuMa0KqK7F6AAZVu7kFkmlXPq2kS8owjk6/VXnVBmm5Vw==} + /@swc/core-darwin-arm64/1.3.59: + resolution: {integrity: sha512-AnqWFBgEKHP0jb4iZqx7eVQT9/rX45+DE4Ox7GpwCahUKxxrsDLyXzKhwLwQuAjUvtu5JcSB77szKpPGDM49fQ==} engines: {node: '>=10'} cpu: [arm64] os: [darwin] @@ -3896,8 +4353,8 @@ packages: dev: true optional: true - /@swc/core-darwin-x64/1.3.63: - resolution: {integrity: sha512-1lydnc+LgSD0gwD1axW3+Y1htKZZRn33aJF4ITd6hsA9Y2eIhdMVxgx6peXp8wWzoRBXy5GEMTnd7704oya4zw==} + /@swc/core-darwin-x64/1.3.32: + resolution: {integrity: sha512-hVEGd+v5Afh+YekGADOGKwhuS4/AXk91nLuk7pmhWkk8ceQ1cfmah90kXjIXUlCe2G172MLRfHNWlZxr29E/Og==} engines: {node: '>=10'} cpu: [x64] os: [darwin] @@ -3905,8 +4362,8 @@ packages: dev: true optional: true - /@swc/core-darwin-x64/1.3.64: - resolution: {integrity: sha512-SJd1pr+U2pz5ZVv5BL36CN879Pn1V0014uVNlB+6yNh3e8T0fjUbtRJcbFiBB+OeYuJ1UNUeslaRJtKJNtMH7A==} + /@swc/core-darwin-x64/1.3.59: + resolution: {integrity: sha512-iqDs+yii9mOsmpJez82SEi4d4prWDRlapHxKnDVJ0x1AqRo41vIq8t3fujrvCHYU5VQgOYGh4ooXQpaP2H3B2A==} engines: {node: '>=10'} cpu: [x64] os: [darwin] @@ -3932,8 +4389,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm-gnueabihf/1.3.63: - resolution: {integrity: sha512-cJT+XJ6f25QeAcz2ONy1i8WKP6olqOIbU5fHZKsoPqEZmLkK5NCTnmIolT0HZpH1SNkE/hHkPYGn620Domvn8g==} + /@swc/core-linux-arm-gnueabihf/1.3.32: + resolution: {integrity: sha512-5X01WqI9EbJ69oHAOGlI08YqvEIXMfT/mCJ1UWDQBb21xWRE2W1yFAAeuqOLtiagLrXjPv/UKQ0S2gyWQR5AXQ==} engines: {node: '>=10'} cpu: [arm] os: [linux] @@ -3941,8 +4398,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm-gnueabihf/1.3.64: - resolution: {integrity: sha512-XE60bZS+qO+d8IQYAayhn3TRqyzVmQeOsX2B1yUHuKZU3Zb/mt/cmD/HLzZZW7J3z19kYf2na7Hvmnt3amUGoA==} + /@swc/core-linux-arm-gnueabihf/1.3.59: + resolution: {integrity: sha512-PB0PP+SgkCSd/kYmltnPiGv42cOSaih1OjXCEjxvNwUFEmWqluW6uGdWaNiR1LoYMxhcHZTc336jL2+O3l6p0Q==} engines: {node: '>=10'} cpu: [arm] os: [linux] @@ -3959,8 +4416,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm64-gnu/1.3.63: - resolution: {integrity: sha512-xtuk0v/86i0UR6G+5X6l3bgP1I1iWlEI23ad44L0FNrZ8wLLEvVzYuVoI6U5fKbp91LAsVpdWyyvSAo1sT7BWQ==} + /@swc/core-linux-arm64-gnu/1.3.32: + resolution: {integrity: sha512-PTJ6oPiutkNBg+m22bUUPa4tNuMmsgpSnsnv2wnWVOgK0lhvQT6bAPTUXDq/8peVAgR/SlpP2Ht8TRRqYMRjRQ==} engines: {node: '>=10'} cpu: [arm64] os: [linux] @@ -3968,8 +4425,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm64-gnu/1.3.64: - resolution: {integrity: sha512-+jcUua4cYLRMqDicv+4AaTZUGgYWXkXVI9AzaAgfkMNLU2TMXwuYXopxk1giAMop88+ovzYIqrxErRdu70CgtQ==} + /@swc/core-linux-arm64-gnu/1.3.59: + resolution: {integrity: sha512-Ol/JPszWZ+OZ44FOdJe35TfJ1ckG4pYaisZJ4E7PzfwfVe2ygX85C5WWR4e5L0Y1zFvzpcI7gdyC2wzcXk4Cig==} engines: {node: '>=10'} cpu: [arm64] os: [linux] @@ -3986,8 +4443,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm64-musl/1.3.63: - resolution: {integrity: sha512-AIRqE/3659zt5hfZzj3i/xtJbJl1iz9FcYEGUsIqqrxouqZWNbFujQpIguX4qFI7uoM+m6p6pqLjMmArwErRxQ==} + /@swc/core-linux-arm64-musl/1.3.32: + resolution: {integrity: sha512-lG0VOuYNPWOCJ99Aza69cTljjeft/wuRQeYFF8d+1xCQS/OT7gnbgi7BOz39uSHIPTBqfzdIsuvzdKlp9QydrQ==} engines: {node: '>=10'} cpu: [arm64] os: [linux] @@ -3995,8 +4452,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm64-musl/1.3.64: - resolution: {integrity: sha512-50MI8NFYUKhLncqY2piM/XOnNqZT6zY2ZoNOFsy63/T2gAYy1ts4mF4YUEkg4XOA2zhue1JSLZBUrHQXbgMYUQ==} + /@swc/core-linux-arm64-musl/1.3.59: + resolution: {integrity: sha512-PtTTtGbj9GiY5gJdoSFL2A0vL6BRaS1haAhp6g3hZvLDkTTg+rJURmzwBMMjaQlnGC62x/lLf6MoszHG/05//Q==} engines: {node: '>=10'} cpu: [arm64] os: [linux] @@ -4013,8 +4470,8 @@ packages: dev: true optional: true - /@swc/core-linux-x64-gnu/1.3.63: - resolution: {integrity: sha512-EAB5gkgDvStJofvdQU40hqEqjtSvtPs3PR0WupZtbLKWWCTWg76uTXQZEKNYx9r60Pt7sx1BAa3XnqgXjmcjDg==} + /@swc/core-linux-x64-gnu/1.3.32: + resolution: {integrity: sha512-ecqtSWX4NBrs7Ji2VX3fDWeqUfrbLlYqBuufAziCM27xMxwlAVgmyGQk4FYgoQ3SAUAu3XFH87+3Q7uWm2X7xg==} engines: {node: '>=10'} cpu: [x64] os: [linux] @@ -4022,8 +4479,8 @@ packages: dev: true optional: true - /@swc/core-linux-x64-gnu/1.3.64: - resolution: {integrity: sha512-bT8seQ41Q4J2JDgn2JpFCGNehGAIilAkZ476gEaKKroEWepBhkD0K1MspSSVYSJhLSGbBVSaadUEiBPxWgu1Rw==} + /@swc/core-linux-x64-gnu/1.3.59: + resolution: {integrity: sha512-XBW9AGi0YsIN76IfesnDSBn/5sjR69J75KUNte8sH6seYlHJ0/kblqUMbUcfr0CiGoJadbzAZeKZZmfN7EsHpg==} engines: {node: '>=10'} cpu: [x64] os: [linux] @@ -4040,8 +4497,8 @@ packages: dev: true optional: true - /@swc/core-linux-x64-musl/1.3.63: - resolution: {integrity: sha512-8ScbtDPd8Hr1VkpzCseI5H770YgxxjTFsxinH9UtJWJBFIkdu2rEwjgz4t+lDjsc/R3JWaKt1q8Dkgzqmj+77g==} + /@swc/core-linux-x64-musl/1.3.32: + resolution: {integrity: sha512-rl3dMcUuENVkpk5NGW/LXovjK0+JFm4GWPjy4NM3Q5cPvhBpGwSeLZlR+zAw9K0fdGoIXiayRTTfENrQwwsH+g==} engines: {node: '>=10'} cpu: [x64] os: [linux] @@ -4049,8 +4506,8 @@ packages: dev: true optional: true - /@swc/core-linux-x64-musl/1.3.64: - resolution: {integrity: sha512-sJgh3TXCDOEq/Au4XLAgNqy4rVcLeywQBoftnV3rcvX1/u9OCSRzgKLgYc5d1pEN5AMJV1l4u26kbGlQuZ+yRw==} + /@swc/core-linux-x64-musl/1.3.59: + resolution: {integrity: sha512-Cy5E939SdWPQ34cg6UABNO0RyEe0FuWqzZ/GLKtK11Ir4fjttVlucZiY59uQNyUVUc8T2qE0VBFCyD/zYGuHtg==} engines: {node: '>=10'} cpu: [x64] os: [linux] @@ -4067,8 +4524,8 @@ packages: dev: true optional: true - /@swc/core-win32-arm64-msvc/1.3.63: - resolution: {integrity: sha512-+41tEugXJjpK04KIb2+Xlpb1NArhIne4u0NQo+cHb6ekJoqQmgIj3uNJhQ0v+0DDMjFqbA07l0KYNMgYLBls/A==} + /@swc/core-win32-arm64-msvc/1.3.32: + resolution: {integrity: sha512-VlybAZp8DcS66CH1LDnfp9zdwbPlnGXREtHDMHaBfK9+80AWVTg+zn0tCYz+HfcrRONqxbudwOUIPj+dwl/8jw==} engines: {node: '>=10'} cpu: [arm64] os: [win32] @@ -4076,8 +4533,8 @@ packages: dev: true optional: true - /@swc/core-win32-arm64-msvc/1.3.64: - resolution: {integrity: sha512-zWIy+mAWDjtJjl4e4mmhQL7g9KbkOwcWbeoIk4C6NT4VpjnjdX1pMml/Ez2sF5J5cGBwu7B1ePfTe/kAE6G36Q==} + /@swc/core-win32-arm64-msvc/1.3.59: + resolution: {integrity: sha512-z5ZJxizRvRoSAaevRIi3YjQh74OFWEIhonSDWNdqDL7RbjEivcatYcG7OikH6s+rtPhOcwNm3PbGV2Prcgh/gg==} engines: {node: '>=10'} cpu: [arm64] os: [win32] @@ -4094,8 +4551,8 @@ packages: dev: true optional: true - /@swc/core-win32-ia32-msvc/1.3.63: - resolution: {integrity: sha512-W6nPOD5k++rSmoAb0Jg0h7gyfjly8b5ld7cSnmrWKXfmjgxOqxcoqP2LlzNkamg320eqkGaD9n+UnPJDteLTBw==} + /@swc/core-win32-ia32-msvc/1.3.32: + resolution: {integrity: sha512-MEUMdpUFIQ+RD+K/iHhHKfu0TFNj9VXwIxT5hmPeqyboKo095CoFEFBJ0sHG04IGlnu8T9i+uE2Pi18qUEbFug==} engines: {node: '>=10'} cpu: [ia32] os: [win32] @@ -4103,8 +4560,8 @@ packages: dev: true optional: true - /@swc/core-win32-ia32-msvc/1.3.64: - resolution: {integrity: sha512-6HMiuUeSMpTUAimb1E+gUNjy8m211oAzw+wjU8oOdA6iihWaLBz4TOhU9IaKZPPjqEcYGwqaT3tj5b5+mxde6Q==} + /@swc/core-win32-ia32-msvc/1.3.59: + resolution: {integrity: sha512-vxpsn+hrKAhi5YusQfB/JXUJJVX40rIRE/L49ilBEqdbH8Khkoego6AD+2vWqTdJcUHo1WiAIAEZ0rTsjyorLQ==} engines: {node: '>=10'} cpu: [ia32] os: [win32] @@ -4121,8 +4578,8 @@ packages: dev: true optional: true - /@swc/core-win32-x64-msvc/1.3.63: - resolution: {integrity: sha512-MHNCF3GWtlKZL3vNhMiCrtM4gBHqAv0Iw38bLoJRagh1Q/UDNVjNzWhgngCno9NUQodMtCo6G7iTQilW7YaAQQ==} + /@swc/core-win32-x64-msvc/1.3.32: + resolution: {integrity: sha512-DPMoneNFQco7SqmVVOUv1Vn53YmoImEfrAPMY9KrqQzgfzqNTuL2JvfxUqfAxwQ6pEKYAdyKJvZ483rIhgG9XQ==} engines: {node: '>=10'} cpu: [x64] os: [win32] @@ -4130,8 +4587,8 @@ packages: dev: true optional: true - /@swc/core-win32-x64-msvc/1.3.64: - resolution: {integrity: sha512-c8Al0JJfmgnO9sg6w34PICibqI4p7iXywo+wOxjY88oFwMcfV5rGaif1Fe3RqxJP/1WtUV7lYuKKZrneMXtyLA==} + /@swc/core-win32-x64-msvc/1.3.59: + resolution: {integrity: sha512-Ris/cJbURylcLwqz4RZUUBCEGsuaIHOJsvf69W5pGKHKBryVoOTNhBKpo3Km2hoAi5qFQ/ou0trAT4hBsVPZvQ==} engines: {node: '>=10'} cpu: [x64] os: [win32] @@ -4159,30 +4616,25 @@ packages: '@swc/core-win32-x64-msvc': 1.2.204 dev: true - /@swc/core/1.3.63: - resolution: {integrity: sha512-mNRMr0xcqkvnC1a/H7rpMtbIjq7KKy4XaW/+zj3+w9cH5g72eMo3ADNHE03zHoqPn+Ov3szzFOMHT6rgJlRxow==} + /@swc/core/1.3.32: + resolution: {integrity: sha512-Yx/n1j+uUkcqlJAW8IRg8Qymgkdow6NHJZPFShiR0YiaYq2sXY+JHmvh16O6GkL91Y+gTlDUS7uVgDz50czJUQ==} engines: {node: '>=10'} requiresBuild: true - peerDependencies: - '@swc/helpers': ^0.5.0 - peerDependenciesMeta: - '@swc/helpers': - optional: true optionalDependencies: - '@swc/core-darwin-arm64': 1.3.63 - '@swc/core-darwin-x64': 1.3.63 - '@swc/core-linux-arm-gnueabihf': 1.3.63 - '@swc/core-linux-arm64-gnu': 1.3.63 - '@swc/core-linux-arm64-musl': 1.3.63 - '@swc/core-linux-x64-gnu': 1.3.63 - '@swc/core-linux-x64-musl': 1.3.63 - '@swc/core-win32-arm64-msvc': 1.3.63 - '@swc/core-win32-ia32-msvc': 1.3.63 - '@swc/core-win32-x64-msvc': 1.3.63 - dev: true - - /@swc/core/1.3.64: - resolution: {integrity: sha512-be1dk2pfjzBjFp/+p47/wvOAm7KpEtsi7hqI3ofox6pK3hBJChHgVTLVV9xqZm7CnYdyYYw3Z78hH6lrwutxXQ==} + '@swc/core-darwin-arm64': 1.3.32 + '@swc/core-darwin-x64': 1.3.32 + '@swc/core-linux-arm-gnueabihf': 1.3.32 + '@swc/core-linux-arm64-gnu': 1.3.32 + '@swc/core-linux-arm64-musl': 1.3.32 + '@swc/core-linux-x64-gnu': 1.3.32 + '@swc/core-linux-x64-musl': 1.3.32 + '@swc/core-win32-arm64-msvc': 1.3.32 + '@swc/core-win32-ia32-msvc': 1.3.32 + '@swc/core-win32-x64-msvc': 1.3.32 + dev: true + + /@swc/core/1.3.59: + resolution: {integrity: sha512-ZBw31zd2E5SXiodwGvjQdx5ZC90b2uyX/i2LeMMs8LKfXD86pfOfQac+JVrnyEKDhASXj9icgsF9NXBhaMr3Kw==} engines: {node: '>=10'} requiresBuild: true peerDependencies: @@ -4191,16 +4643,16 @@ packages: '@swc/helpers': optional: true optionalDependencies: - '@swc/core-darwin-arm64': 1.3.64 - '@swc/core-darwin-x64': 1.3.64 - '@swc/core-linux-arm-gnueabihf': 1.3.64 - '@swc/core-linux-arm64-gnu': 1.3.64 - '@swc/core-linux-arm64-musl': 1.3.64 - '@swc/core-linux-x64-gnu': 1.3.64 - '@swc/core-linux-x64-musl': 1.3.64 - '@swc/core-win32-arm64-msvc': 1.3.64 - '@swc/core-win32-ia32-msvc': 1.3.64 - '@swc/core-win32-x64-msvc': 1.3.64 + '@swc/core-darwin-arm64': 1.3.59 + '@swc/core-darwin-x64': 1.3.59 + '@swc/core-linux-arm-gnueabihf': 1.3.59 + '@swc/core-linux-arm64-gnu': 1.3.59 + '@swc/core-linux-arm64-musl': 1.3.59 + '@swc/core-linux-x64-gnu': 1.3.59 + '@swc/core-linux-x64-musl': 1.3.59 + '@swc/core-win32-arm64-msvc': 1.3.59 + '@swc/core-win32-ia32-msvc': 1.3.59 + '@swc/core-win32-x64-msvc': 1.3.59 dev: true /@swc/jest/0.2.26_@swc+core@1.2.204: @@ -4214,25 +4666,25 @@ packages: jsonc-parser: 3.2.0 dev: true - /@swc/jest/0.2.26_@swc+core@1.3.63: + /@swc/jest/0.2.26_@swc+core@1.3.32: resolution: {integrity: sha512-7lAi7q7ShTO3E5Gt1Xqf3pIhRbERxR1DUxvtVa9WKzIB+HGQ7wZP5sYx86zqnaEoKKGhmOoZ7gyW0IRu8Br5+A==} engines: {npm: '>= 7.0.0'} peerDependencies: '@swc/core': '*' dependencies: '@jest/create-cache-key-function': 27.5.1 - '@swc/core': 1.3.63 + '@swc/core': 1.3.32 jsonc-parser: 3.2.0 dev: true - /@swc/jest/0.2.26_@swc+core@1.3.64: + /@swc/jest/0.2.26_@swc+core@1.3.59: resolution: {integrity: sha512-7lAi7q7ShTO3E5Gt1Xqf3pIhRbERxR1DUxvtVa9WKzIB+HGQ7wZP5sYx86zqnaEoKKGhmOoZ7gyW0IRu8Br5+A==} engines: {npm: '>= 7.0.0'} peerDependencies: '@swc/core': '*' dependencies: '@jest/create-cache-key-function': 27.5.1 - '@swc/core': 1.3.64 + '@swc/core': 1.3.59 jsonc-parser: 3.2.0 dev: true @@ -4351,14 +4803,24 @@ packages: dependencies: '@types/http-cache-semantics': 4.0.1 '@types/keyv': 3.1.4 - '@types/node': 18.16.18 + '@types/node': 18.16.14 '@types/responselike': 1.0.0 dev: true + /@types/chai-subset/1.3.3: + resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==} + dependencies: + '@types/chai': 4.3.5 + dev: true + + /@types/chai/4.3.5: + resolution: {integrity: sha512-mEo1sAde+UCE6b2hxn332f1g1E8WfYRu6p5SvTKr2ZKC1f7gFJXk4h5PyGP9Dt6gCaG8y8XhwnXWC6Iy2cmBng==} + dev: true + /@types/cross-spawn/6.0.2: resolution: {integrity: sha512-KuwNhp3eza+Rhu8IFI5HUXRP0LIhqH5cAjubUvGXXthh4YYBuP2ntwEX+Cz8GJoZUHlKo247wPWOfA9LYEq4cw==} dependencies: - '@types/node': 18.16.16 + '@types/node': 18.16.14 dev: false /@types/debug/4.1.8: @@ -4377,7 +4839,7 @@ packages: /@types/es-aggregate-error/1.0.2: resolution: {integrity: sha512-erqUpFXksaeR2kejKnhnjZjbFxUpGZx4Z7ydNL9ie8tEhXPiZTsLeUDJ6aR1F8j5wWUAtOAQWUqkc7givBJbBA==} dependencies: - '@types/node': 18.16.18 + '@types/node': 18.16.14 /@types/eslint-scope/3.7.4: resolution: {integrity: sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==} @@ -4405,7 +4867,7 @@ packages: resolution: {integrity: sha512-MxObHvNl4A69ofaTRU8DFqvgzzv8s9yRtaPPm5gud9HDNvpB3GPQFvNuTWAI59B9huVGV5jXYJwbCsmBsOGYWA==} dependencies: '@types/jsonfile': 6.1.1 - '@types/node': 18.16.18 + '@types/node': 18.16.14 dev: true /@types/fs-extra/9.0.13: @@ -4421,32 +4883,36 @@ packages: resolution: {integrity: sha512-l6NQsDDyQUVeoTynNpC9uRvCUint/gSUXQA2euwmTuWGvPY5LSDUu6tkCtJB2SvGQlJQzLaKqcGZP4//7EDveA==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 18.16.18 + '@types/node': 18.16.14 dev: true /@types/glob/8.1.0: resolution: {integrity: sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 18.16.18 + '@types/node': 18.16.14 dev: true /@types/graceful-fs/4.1.5: resolution: {integrity: sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==} dependencies: - '@types/node': 18.16.18 + '@types/node': 18.16.14 dev: true /@types/graphviz/0.0.35: resolution: {integrity: sha512-AqGaB/5M0nMPOPVuOd3PQGS0glhJ4Fzg4CcZ4IZ1M0ezuz7OJEuz3D0xwr3qn8sdf3Xo7ZJl9qR1c5XkzrdY+w==} dependencies: - '@types/node': 18.16.18 + '@types/node': 18.16.14 dev: true /@types/http-cache-semantics/4.0.1: resolution: {integrity: sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==} dev: true + /@types/ini/1.3.31: + resolution: {integrity: sha512-8ecxxaG4AlVEM1k9+BsziMw8UsX0qy3jYI1ad/71RrDZ+rdL6aZB0wLfAuflQiDhkD5o4yJ0uPK3OSUic3fG0w==} + dev: true + /@types/inquirer/8.2.4: resolution: {integrity: sha512-Pxxx3i3AyK7vKAj3LRM/vF7ETcHKiLJ/u5CnNgbz/eYj/vB3xGAYtRxI5IKtq0hpe5iFHD22BKV3n6WHUu0k4Q==} dependencies: @@ -4469,11 +4935,11 @@ packages: '@types/istanbul-lib-report': 3.0.0 dev: true - /@types/jest/29.5.2: - resolution: {integrity: sha512-mSoZVJF5YzGVCk+FsDxzDuH7s+SCkzrgKZzf0Z0T2WudhBUPoF6ktoTPC4R0ZoCPCV5xUvuU6ias5NvxcBcMMg==} + /@types/jest/29.5.1: + resolution: {integrity: sha512-tEuVcHrpaixS36w7hpsfLBLpjtMRJUE09/MHXn923LOVojDwyC14cWcfc0rDs0VEfUyYmt/+iX1kxxp+gZMcaQ==} dependencies: - expect: 29.5.0 - pretty-format: 29.5.0 + expect: 29.4.3 + pretty-format: 29.4.3 dev: true /@types/js-levenshtein/1.1.1: @@ -4491,13 +4957,19 @@ packages: /@types/jsonfile/6.1.1: resolution: {integrity: sha512-GSgiRCVeapDN+3pqA35IkQwasaCh/0YFH5dEF6S88iDvEn901DjOeH3/QPY+XYP1DFzDZPvIvfeEgk+7br5png==} dependencies: - '@types/node': 18.16.18 + '@types/node': 18.16.14 dev: true /@types/keyv/3.1.4: resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} dependencies: - '@types/node': 18.16.18 + '@types/node': 18.16.14 + dev: true + + /@types/mdast/3.0.11: + resolution: {integrity: sha512-Y/uImid8aAwrEA24/1tcRZwpxX3pIFTSilcNDKSPn+Y2iDywSEachzRuvgAYYLR3wpGXAsMbv5lvKLDZLeYPAw==} + dependencies: + '@types/unist': 2.0.6 dev: true /@types/mem-fs-editor/7.0.2: @@ -4507,14 +4979,14 @@ packages: '@types/glob': 8.1.0 '@types/json-schema': 7.0.11 '@types/mem-fs': 1.1.2 - '@types/node': 18.16.18 + '@types/node': 18.16.14 '@types/vinyl': 2.0.6 dev: true /@types/mem-fs/1.1.2: resolution: {integrity: sha512-tt+4IoDO8/wmtaP2bHnB91c8AnzYtR9MK6NxfcZY9E3XgtmzOiFMeSXu3EZrBeevd0nJ87iGoUiFDGsb9QUvew==} dependencies: - '@types/node': 18.16.18 + '@types/node': 18.16.14 '@types/vinyl': 2.0.6 dev: true @@ -4536,7 +5008,7 @@ packages: /@types/mssql/8.1.2: resolution: {integrity: sha512-hoDM+mZUClfXu0J1pyVdbhv2Ve0dl0TdagAE3M5rd1slqoVEEHuNObPD+giwtJgyo99CcS58qbF9ektVKdxSfQ==} dependencies: - '@types/node': 18.16.16 + '@types/node': 18.16.14 '@types/tedious': 4.0.9 tarn: 3.0.2 dev: true @@ -4544,7 +5016,7 @@ packages: /@types/node-fetch/2.6.4: resolution: {integrity: sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg==} dependencies: - '@types/node': 18.16.16 + '@types/node': 18.16.14 form-data: 3.0.1 dev: true @@ -4563,19 +5035,16 @@ packages: resolution: {integrity: sha512-3JRwhbjI+cHLAkUorhf8RnqUbFXajvzX4q6fMn5JwkgtuwfYtRQYI3u4V92vI6NJuTsbBQWWh3RZjFsuevyMGQ==} dev: true - /@types/node/18.16.16: - resolution: {integrity: sha512-NpaM49IGQQAUlBhHMF82QH80J08os4ZmyF9MkpCzWAGuOHqE4gTEbhzd7L3l5LmWuZ6E0OiC1FweQ4tsiW35+g==} - - /@types/node/18.16.18: - resolution: {integrity: sha512-/aNaQZD0+iSBAGnvvN2Cx92HqE5sZCPZtx2TsK+4nvV23fFe09jVDvpArXr2j9DnYlzuU9WuoykDDc6wqvpNcw==} + /@types/node/18.16.14: + resolution: {integrity: sha512-+ImzUB3mw2c5ISJUq0punjDilUQ5GnUim0ZRvchHIWJmOC0G+p0kzhXBqj6cDjK0QdPFwzrHWgrJp3RPvCG5qg==} /@types/normalize-package-data/2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} - /@types/pg/8.10.2: - resolution: {integrity: sha512-MKFs9P6nJ+LAeHLU3V0cODEOgyThJ3OAnmOlsZsxux6sfQs3HRXR5bBn7xG5DjckEFhTAxsXi7k7cd0pCMxpJw==} + /@types/pg/8.10.1: + resolution: {integrity: sha512-AmEHA/XxMxemQom5iDwP62FYNkv+gDDnetRG7v2N2dPtju7UKI7FknUimcZo7SodKTHtckYPzaTqUEvUKbVJEA==} dependencies: - '@types/node': 18.16.16 + '@types/node': 18.16.14 pg-protocol: 1.6.0 pg-types: 4.0.1 dev: true @@ -4587,13 +5056,13 @@ packages: /@types/progress/2.0.5: resolution: {integrity: sha512-ZYYVc/kSMkhH9W/4dNK/sLNra3cnkfT2nJyOAIDY+C2u6w72wa0s1aXAezVtbTsnN8HID1uhXCrLwDE2ZXpplg==} dependencies: - '@types/node': 18.16.16 + '@types/node': 18.16.14 dev: true /@types/prompts/2.4.4: resolution: {integrity: sha512-p5N9uoTH76lLvSAaYSZtBCdEXzpOOufsRjnhjVSrZGXikVGHX9+cc9ERtHRV4hvBKHyZb1bg4K+56Bd2TqUn4A==} dependencies: - '@types/node': 18.16.16 + '@types/node': 18.16.14 kleur: 3.0.3 dev: true @@ -4604,7 +5073,7 @@ packages: /@types/redis/2.8.32: resolution: {integrity: sha512-7jkMKxcGq9p242exlbsVzuJb57KqHRhNl4dHoQu2Y5v9bCAbtIXXH0R3HleSQW4CTOqpHIYUW3t6tpUj4BVQ+w==} dependencies: - '@types/node': 18.16.18 + '@types/node': 18.16.14 dev: true /@types/resolve/1.20.2: @@ -4614,7 +5083,7 @@ packages: /@types/responselike/1.0.0: resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==} dependencies: - '@types/node': 18.16.18 + '@types/node': 18.16.14 dev: true /@types/retry/0.12.0: @@ -4634,7 +5103,7 @@ packages: /@types/sqlite3/3.1.8: resolution: {integrity: sha512-sQMt/qnyUWnqiTcJXm5ZfNPIBeJ/DVvJDwxw+0tAxPJvadzfiP1QhryO1JOR6t1yfb8NpzQb/Rud06mob5laIA==} dependencies: - '@types/node': 18.16.16 + '@types/node': 18.16.14 dev: true /@types/stack-utils/2.0.1: @@ -4644,7 +5113,7 @@ packages: /@types/tedious/4.0.9: resolution: {integrity: sha512-ipwFvfy9b2m0gjHsIX0D6NAAwGCKokzf5zJqUZHUGt+7uWVlBIy6n2eyMgiKQ8ChLFVxic/zwQUhjLYNzbHDRA==} dependencies: - '@types/node': 18.16.18 + '@types/node': 18.16.14 dev: true /@types/text-table/0.2.2: @@ -4654,14 +5123,18 @@ packages: /@types/through/0.0.30: resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} dependencies: - '@types/node': 18.16.18 + '@types/node': 18.16.14 + dev: true + + /@types/unist/2.0.6: + resolution: {integrity: sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==} dev: true /@types/vinyl/2.0.6: resolution: {integrity: sha512-ayJ0iOCDNHnKpKTgBG6Q6JOnHTj9zFta+3j2b8Ejza0e4cvRyMn0ZoLEmbPrTHe5YYRlDYPvPWVdV4cTaRyH7g==} dependencies: '@types/expect': 1.20.4 - '@types/node': 18.16.18 + '@types/node': 18.16.14 dev: true /@types/webidl-conversions/7.0.0: @@ -4671,7 +5144,7 @@ packages: /@types/whatwg-url/8.2.2: resolution: {integrity: sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==} dependencies: - '@types/node': 18.16.18 + '@types/node': 18.16.14 '@types/webidl-conversions': 7.0.0 dev: false @@ -4721,8 +5194,8 @@ packages: rxjs: 6.6.7 dev: true - /@typescript-eslint/eslint-plugin/5.59.11_jxhnufqfdxsaktvg4boo4kir6q: - resolution: {integrity: sha512-XxuOfTkCUiOSyBWIvHlUraLw/JT/6Io1365RO6ZuI88STKMavJZPNMU0lFcUTeQXEhHiv64CbxYxBNoDVSmghg==} + /@typescript-eslint/eslint-plugin/5.59.6_4qbuxpmdupj46lq2zjlghng6yy: + resolution: {integrity: sha512-sXtOgJNEuRU5RLwPUb1jxtToZbgvq3M6FPpY4QENxoOggK+UpTxUBpj6tD8+Qh2g46Pi9We87E+eHnUw8YcGsw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -4733,12 +5206,12 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.5.1 - '@typescript-eslint/parser': 5.59.11_2jcgcerbs6bi4debdtwega5q6u - '@typescript-eslint/scope-manager': 5.59.11 - '@typescript-eslint/type-utils': 5.59.11_2jcgcerbs6bi4debdtwega5q6u - '@typescript-eslint/utils': 5.59.11_2jcgcerbs6bi4debdtwega5q6u + '@typescript-eslint/parser': 5.59.6_5ujgynla27k2qkzlnkldjwsutm + '@typescript-eslint/scope-manager': 5.59.6 + '@typescript-eslint/type-utils': 5.59.6_5ujgynla27k2qkzlnkldjwsutm + '@typescript-eslint/utils': 5.59.6_5ujgynla27k2qkzlnkldjwsutm debug: 4.3.4 - eslint: 8.43.0 + eslint: 8.41.0 grapheme-splitter: 1.0.4 ignore: 5.2.4 natural-compare-lite: 1.4.0 @@ -4749,8 +5222,8 @@ packages: - supports-color dev: true - /@typescript-eslint/parser/5.59.11_2jcgcerbs6bi4debdtwega5q6u: - resolution: {integrity: sha512-s9ZF3M+Nym6CAZEkJJeO2TFHHDsKAM3ecNkLuH4i4s8/RCPnF5JRip2GyviYkeEAcwGMJxkqG9h2dAsnA1nZpA==} + /@typescript-eslint/parser/5.59.6_5ujgynla27k2qkzlnkldjwsutm: + resolution: {integrity: sha512-7pCa6al03Pv1yf/dUg/s1pXz/yGMUBAw5EeWqNTFiSueKvRNonze3hma3lhdsOrQcaOXhbk5gKu2Fludiho9VA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -4759,26 +5232,34 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.59.11 - '@typescript-eslint/types': 5.59.11 - '@typescript-eslint/typescript-estree': 5.59.11_typescript@4.9.5 + '@typescript-eslint/scope-manager': 5.59.6 + '@typescript-eslint/types': 5.59.6 + '@typescript-eslint/typescript-estree': 5.59.6_typescript@4.9.5 debug: 4.3.4 - eslint: 8.43.0 + eslint: 8.41.0 typescript: 4.9.5 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/scope-manager/5.59.11: - resolution: {integrity: sha512-dHFOsxoLFtrIcSj5h0QoBT/89hxQONwmn3FOQ0GOQcLOOXm+MIrS8zEAhs4tWl5MraxCY3ZJpaXQQdFMc2Tu+Q==} + /@typescript-eslint/scope-manager/5.50.0: + resolution: {integrity: sha512-rt03kaX+iZrhssaT974BCmoUikYtZI24Vp/kwTSy841XhiYShlqoshRFDvN1FKKvU2S3gK+kcBW1EA7kNUrogg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.50.0 + '@typescript-eslint/visitor-keys': 5.50.0 + dev: true + + /@typescript-eslint/scope-manager/5.59.6: + resolution: {integrity: sha512-gLbY3Le9Dxcb8KdpF0+SJr6EQ+hFGYFl6tVY8VxLPFDfUZC7BHFw+Vq7bM5lE9DwWPfx4vMWWTLGXgpc0mAYyQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.59.11 - '@typescript-eslint/visitor-keys': 5.59.11 + '@typescript-eslint/types': 5.59.6 + '@typescript-eslint/visitor-keys': 5.59.6 dev: true - /@typescript-eslint/type-utils/5.59.11_2jcgcerbs6bi4debdtwega5q6u: - resolution: {integrity: sha512-LZqVY8hMiVRF2a7/swmkStMYSoXMFlzL6sXV6U/2gL5cwnLWQgLEG8tjWPpaE4rMIdZ6VKWwcffPlo1jPfk43g==} + /@typescript-eslint/type-utils/5.59.6_5ujgynla27k2qkzlnkldjwsutm: + resolution: {integrity: sha512-A4tms2Mp5yNvLDlySF+kAThV9VTBPCvGf0Rp8nl/eoDX9Okun8byTKoj3fJ52IJitjWOk0fKPNQhXEB++eNozQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -4787,23 +5268,28 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.59.11_typescript@4.9.5 - '@typescript-eslint/utils': 5.59.11_2jcgcerbs6bi4debdtwega5q6u + '@typescript-eslint/typescript-estree': 5.59.6_typescript@4.9.5 + '@typescript-eslint/utils': 5.59.6_5ujgynla27k2qkzlnkldjwsutm debug: 4.3.4 - eslint: 8.43.0 + eslint: 8.41.0 tsutils: 3.21.0_typescript@4.9.5 typescript: 4.9.5 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/types/5.59.11: - resolution: {integrity: sha512-epoN6R6tkvBYSc+cllrz+c2sOFWkbisJZWkOE+y3xHtvYaOE6Wk6B8e114McRJwFRjGvYdJwLXQH5c9osME/AA==} + /@typescript-eslint/types/5.50.0: + resolution: {integrity: sha512-atruOuJpir4OtyNdKahiHZobPKFvZnBnfDiyEaBf6d9vy9visE7gDjlmhl+y29uxZ2ZDgvXijcungGFjGGex7w==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + + /@typescript-eslint/types/5.59.6: + resolution: {integrity: sha512-tH5lBXZI7T2MOUgOWFdVNUILsI02shyQvfzG9EJkoONWugCG77NDDa1EeDGw7oJ5IvsTAAGVV8I3Tk2PNu9QfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree/5.59.11_typescript@4.9.5: - resolution: {integrity: sha512-YupOpot5hJO0maupJXixi6l5ETdrITxeo5eBOeuV7RSKgYdU3G5cxO49/9WRnJq9EMrB7AuTSLH/bqOsXi7wPA==} + /@typescript-eslint/typescript-estree/5.50.0_typescript@4.9.5: + resolution: {integrity: sha512-Gq4zapso+OtIZlv8YNAStFtT6d05zyVCK7Fx3h5inlLBx2hWuc/0465C2mg/EQDDU2LKe52+/jN4f0g9bd+kow==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -4811,8 +5297,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.59.11 - '@typescript-eslint/visitor-keys': 5.59.11 + '@typescript-eslint/types': 5.50.0 + '@typescript-eslint/visitor-keys': 5.50.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -4823,19 +5309,60 @@ packages: - supports-color dev: true - /@typescript-eslint/utils/5.59.11_2jcgcerbs6bi4debdtwega5q6u: - resolution: {integrity: sha512-didu2rHSOMUdJThLk4aZ1Or8IcO3HzCw/ZvEjTTIfjIrcdd5cvSIwwDy2AOlE7htSNp7QIZ10fLMyRCveesMLg==} + /@typescript-eslint/typescript-estree/5.59.6_typescript@4.9.5: + resolution: {integrity: sha512-vW6JP3lMAs/Tq4KjdI/RiHaaJSO7IUsbkz17it/Rl9Q+WkQ77EOuOnlbaU8kKfVIOJxMhnRiBG+olE7f3M16DA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 5.59.6 + '@typescript-eslint/visitor-keys': 5.59.6 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.5.1 + tsutils: 3.21.0_typescript@4.9.5 + typescript: 4.9.5 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/utils/5.50.0_5ujgynla27k2qkzlnkldjwsutm: + resolution: {integrity: sha512-v/AnUFImmh8G4PH0NDkf6wA8hujNNcrwtecqW4vtQ1UOSNBaZl49zP1SHoZ/06e+UiwzHpgb5zP5+hwlYYWYAw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + '@types/json-schema': 7.0.11 + '@types/semver': 7.3.13 + '@typescript-eslint/scope-manager': 5.50.0 + '@typescript-eslint/types': 5.50.0 + '@typescript-eslint/typescript-estree': 5.50.0_typescript@4.9.5 + eslint: 8.41.0 + eslint-scope: 5.1.1 + eslint-utils: 3.0.0_eslint@8.41.0 + semver: 7.5.1 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@typescript-eslint/utils/5.59.6_5ujgynla27k2qkzlnkldjwsutm: + resolution: {integrity: sha512-vzaaD6EXbTS29cVH0JjXBdzMt6VBlv+hE31XktDRMX1j3462wZCJa7VzO2AxXEXcIl8GQqZPcOPuW/Z1tZVogg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0_eslint@8.43.0 + '@eslint-community/eslint-utils': 4.4.0_eslint@8.41.0 '@types/json-schema': 7.0.11 '@types/semver': 7.3.13 - '@typescript-eslint/scope-manager': 5.59.11 - '@typescript-eslint/types': 5.59.11 - '@typescript-eslint/typescript-estree': 5.59.11_typescript@4.9.5 - eslint: 8.43.0 + '@typescript-eslint/scope-manager': 5.59.6 + '@typescript-eslint/types': 5.59.6 + '@typescript-eslint/typescript-estree': 5.59.6_typescript@4.9.5 + eslint: 8.41.0 eslint-scope: 5.1.1 semver: 7.5.1 transitivePeerDependencies: @@ -4843,14 +5370,61 @@ packages: - typescript dev: true - /@typescript-eslint/visitor-keys/5.59.11: - resolution: {integrity: sha512-KGYniTGG3AMTuKF9QBD7EIrvufkB6O6uX3knP73xbKLMpH+QRPcgnCxjWXSHjMRuOxFLovljqQgQpR0c7GvjoA==} + /@typescript-eslint/visitor-keys/5.50.0: + resolution: {integrity: sha512-cdMeD9HGu6EXIeGOh2yVW6oGf9wq8asBgZx7nsR/D36gTfQ0odE5kcRYe5M81vjEFAcPeugXrHg78Imu55F6gg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.50.0 + eslint-visitor-keys: 3.4.1 + dev: true + + /@typescript-eslint/visitor-keys/5.59.6: + resolution: {integrity: sha512-zEfbFLzB9ETcEJ4HZEEsCR9HHeNku5/Qw1jSS5McYJv5BR+ftYXwFFAH5Al+xkGaZEqowMwl7uoJjQb1YSPF8Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.59.11 + '@typescript-eslint/types': 5.59.6 eslint-visitor-keys: 3.4.1 dev: true + /@vitest/expect/0.31.1: + resolution: {integrity: sha512-BV1LyNvhnX+eNYzJxlHIGPWZpwJFZaCcOIzp2CNG0P+bbetenTupk6EO0LANm4QFt0TTit+yqx7Rxd1qxi/SQA==} + dependencies: + '@vitest/spy': 0.31.1 + '@vitest/utils': 0.31.1 + chai: 4.3.7 + dev: true + + /@vitest/runner/0.31.1: + resolution: {integrity: sha512-imWuc82ngOtxdCUpXwtEzZIuc1KMr+VlQ3Ondph45VhWoQWit5yvG/fFcldbnCi8DUuFi+NmNx5ehMUw/cGLUw==} + dependencies: + '@vitest/utils': 0.31.1 + concordance: 5.0.4 + p-limit: 4.0.0 + pathe: 1.1.0 + dev: true + + /@vitest/snapshot/0.31.1: + resolution: {integrity: sha512-L3w5uU9bMe6asrNzJ8WZzN+jUTX4KSgCinEJPXyny0o90fG4FPQMV0OWsq7vrCWfQlAilMjDnOF9nP8lidsJ+g==} + dependencies: + magic-string: 0.30.0 + pathe: 1.1.0 + pretty-format: 27.5.1 + dev: true + + /@vitest/spy/0.31.1: + resolution: {integrity: sha512-1cTpt2m9mdo3hRLDyCG2hDQvRrePTDgEJBFQQNz1ydHHZy03EiA6EpFxY+7ODaY7vMRCie+WlFZBZ0/dQWyssQ==} + dependencies: + tinyspy: 2.1.0 + dev: true + + /@vitest/utils/0.31.1: + resolution: {integrity: sha512-yFyRD5ilwojsZfo3E0BnH72pSVSuLg2356cN1tCEe/0RtDzxTPYwOomIC+eQbot7m6DRy4tPZw+09mB7NkbMmA==} + dependencies: + concordance: 5.0.4 + loupe: 2.3.6 + pretty-format: 27.5.1 + dev: true + /@webassemblyjs/ast/1.11.6: resolution: {integrity: sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==} dependencies: @@ -5004,22 +5578,13 @@ packages: hasBin: true dev: true - /agent-base/6.0.2: - resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} - engines: {node: '>= 6.0.0'} - dependencies: - debug: 4.3.4 - transitivePeerDependencies: - - supports-color - - /agent-base/7.1.0: - resolution: {integrity: sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==} - engines: {node: '>= 14'} + /agent-base/6.0.2: + resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} + engines: {node: '>= 6.0.0'} dependencies: debug: 4.3.4 transitivePeerDependencies: - supports-color - dev: false /agentkeepalive/4.2.1: resolution: {integrity: sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==} @@ -5073,6 +5638,13 @@ packages: dependencies: type-fest: 0.21.3 + /ansi-escapes/5.0.0: + resolution: {integrity: sha512-5GFMVX8HqE/TB+FuBJGuO5XG0WrsA6ptUqoODaT/n9mmUaZFkqnBueB4leqGBCmrUHnCnC4PCZTCd0E7QQ83bA==} + engines: {node: '>=12'} + dependencies: + type-fest: 1.4.0 + dev: true + /ansi-regex/2.1.1: resolution: {integrity: sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==} engines: {node: '>=0.10.0'} @@ -5272,6 +5844,10 @@ packages: engines: {node: '>=0.8'} dev: true + /assertion-error/1.1.0: + resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} + dev: true + /astral-regex/2.0.0: resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} engines: {node: '>=8'} @@ -5461,6 +6037,10 @@ packages: inherits: 2.0.4 readable-stream: 3.6.0 + /blueimp-md5/2.19.0: + resolution: {integrity: sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==} + dev: true + /body-parser/1.19.1: resolution: {integrity: sha512-8ljfQi5eBk8EJfECMrgqNGWPEY5jWP+1IzkzkGdFFEwFQZZyaZ21UqdaHktgiMlH0xLHqIFtE/u2OYE5dOtViA==} engines: {node: '>= 0.8'} @@ -5479,6 +6059,10 @@ packages: - supports-color dev: true + /boolbase/1.0.0: + resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} + dev: true + /boolean/3.2.0: resolution: {integrity: sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==} dev: true @@ -5570,6 +6154,11 @@ packages: base64-js: 1.5.1 ieee754: 1.2.1 + /builtin-modules/3.3.0: + resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} + engines: {node: '>=6'} + dev: true + /builtins/1.0.3: resolution: {integrity: sha512-uYBjakWipfaO/bXI7E8rq6kpwHRZK5cNYrUv2OzZSI/FvmdMyXJ2tG9dKcjEC5YHmHpUAwsargWIZNWdxb/bnQ==} dev: true @@ -5580,6 +6169,21 @@ packages: semver: 7.5.1 dev: true + /bumpp/9.1.0: + resolution: {integrity: sha512-m3+YD8uoa0VttG+RV4oKr3lK60gkUn1yPDaBTFwT7xrdJUsy7Jm0VYgx457HI3VPAOX8szLmy1x2y1QcvB+M8Q==} + engines: {node: '>=10'} + hasBin: true + dependencies: + '@jsdevtools/ez-spawn': 3.0.4 + c12: 1.4.1 + cac: 6.7.14 + fast-glob: 3.2.12 + prompts: 2.4.2 + semver: 7.3.8 + transitivePeerDependencies: + - supports-color + dev: true + /busboy/1.6.0: resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} engines: {node: '>=10.16.0'} @@ -5592,6 +6196,29 @@ packages: engines: {node: '>= 0.8'} dev: true + /c12/1.4.1: + resolution: {integrity: sha512-0x7pWfLZpZsgtyotXtuepJc0rZYE0Aw8PwNAXs0jSG9zq6Sl5xmbWnFqfmRY01ieZLHNbvneSFm9/x88CvzAuw==} + dependencies: + chokidar: 3.5.3 + defu: 6.1.2 + dotenv: 16.0.3 + giget: 1.1.2 + jiti: 1.18.2 + mlly: 1.2.0 + ohash: 1.1.2 + pathe: 1.1.0 + perfect-debounce: 0.1.3 + pkg-types: 1.0.3 + rc9: 2.1.0 + transitivePeerDependencies: + - supports-color + dev: true + + /cac/6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + dev: true + /cacache/15.3.0: resolution: {integrity: sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==} engines: {node: '>= 10'} @@ -5711,6 +6338,10 @@ packages: function-bind: 1.1.1 get-intrinsic: 1.1.3 + /call-me-maybe/1.0.2: + resolution: {integrity: sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==} + dev: true + /callsites/3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} @@ -5758,6 +6389,19 @@ packages: engines: {node: '>=0.10.0'} dev: true + /chai/4.3.7: + resolution: {integrity: sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==} + engines: {node: '>=4'} + dependencies: + assertion-error: 1.1.0 + check-error: 1.0.2 + deep-eql: 4.1.3 + get-func-name: 2.0.0 + loupe: 2.3.6 + pathval: 1.1.1 + type-detect: 4.0.8 + dev: true + /chalk/1.1.3: resolution: {integrity: sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==} engines: {node: '>=0.10.0'} @@ -5794,20 +6438,36 @@ packages: engines: {node: '>=10'} dev: true + /character-entities-legacy/1.1.4: + resolution: {integrity: sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==} + dev: true + + /character-entities/1.2.4: + resolution: {integrity: sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==} + dev: true + + /character-reference-invalid/1.1.4: + resolution: {integrity: sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==} + dev: true + /chardet/0.7.0: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} dev: true - /checkpoint-client/1.1.24: - resolution: {integrity: sha512-nIOlLhDS7MKs4tUzS3LCm+sE1NgTCVnVrXlD0RRxaoEkkLu8LIWSUNiNWai6a+LK5unLzTyZeTCYX1Smqy0YoA==} + /check-error/1.0.2: + resolution: {integrity: sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==} + dev: true + + /checkpoint-client/1.1.23: + resolution: {integrity: sha512-NrGvMiH1fUcZwrYc0Z+YTn7q9ysV0kPgVyDKZ5jrfIerFJuSllvyGsY7bHeQSEiljaIaUP1Q/xutZ8q1s7PGzg==} dependencies: - ci-info: 3.8.0 + ci-info: 3.3.0 env-paths: 2.2.1 fast-write-atomic: 0.2.1 make-dir: 3.1.0 ms: 2.1.3 - node-fetch: 2.6.11_oawau75ow7jz373yzwkw5fs4ry - uuid: 9.0.0 + node-fetch: 2.6.7_3wcp6bao3dfksocwsfev5pt7km + uuid: 8.3.2 transitivePeerDependencies: - encoding @@ -5840,14 +6500,25 @@ packages: resolution: {integrity: sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==} dev: true + /ci-info/3.3.0: + resolution: {integrity: sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==} + /ci-info/3.8.0: resolution: {integrity: sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==} engines: {node: '>=8'} + dev: true /cjs-module-lexer/1.2.2: resolution: {integrity: sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==} dev: true + /clean-regexp/1.0.0: + resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} + engines: {node: '>=4'} + dependencies: + escape-string-regexp: 1.0.5 + dev: true + /clean-stack/2.2.0: resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} engines: {node: '>=6'} @@ -6074,6 +6745,20 @@ packages: typedarray: 0.0.6 dev: true + /concordance/5.0.4: + resolution: {integrity: sha512-OAcsnTEYu1ARJqWVGwf4zh4JDfHZEaSNlNccFmt8YjB2l/n19/PF2viLINHc57vO4FKIAFl2FWASIGZZWZ2Kxw==} + engines: {node: '>=10.18.0 <11 || >=12.14.0 <13 || >=14'} + dependencies: + date-time: 3.1.0 + esutils: 2.0.3 + fast-diff: 1.2.0 + js-string-escape: 1.0.1 + lodash: 4.17.21 + md5-hex: 3.0.1 + semver: 7.5.1 + well-known-symbols: 2.0.0 + dev: true + /config-chain/1.1.13: resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} dependencies: @@ -6093,6 +6778,10 @@ packages: xdg-basedir: 4.0.0 dev: true + /consola/2.15.3: + resolution: {integrity: sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==} + dev: true + /console-control-strings/1.1.0: resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} dev: true @@ -6194,6 +6883,12 @@ packages: resolution: {integrity: sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==} engines: {node: '>=8'} + /cssesc/3.0.0: + resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} + engines: {node: '>=4'} + hasBin: true + dev: true + /currently-unhandled/0.4.1: resolution: {integrity: sha512-/fITjgjGU50vjQ4FH6eUoYu+iUoUKIXws2hL15JJpIR+BbTxaXQsMuuyjtNh2WqsSBS5nsaZHFsFecyw5CCAng==} engines: {node: '>=0.10.0'} @@ -6211,6 +6906,13 @@ packages: engines: {node: '>= 12'} dev: true + /date-time/3.1.0: + resolution: {integrity: sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg==} + engines: {node: '>=6'} + dependencies: + time-zone: 1.0.0 + dev: true + /dateformat/4.6.3: resolution: {integrity: sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==} dev: true @@ -6311,6 +7013,13 @@ packages: resolution: {integrity: sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==} dev: true + /deep-eql/4.1.3: + resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} + engines: {node: '>=6'} + dependencies: + type-detect: 4.0.8 + dev: true + /deep-extend/0.6.0: resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} engines: {node: '>=4.0.0'} @@ -6355,6 +7064,10 @@ packages: has-property-descriptors: 1.0.0 object-keys: 1.1.1 + /defu/6.1.2: + resolution: {integrity: sha512-+uO4+qr7msjNNWKYPHqN/3+Dx3NFkmIzayk2L1MyZQlvgZb/J1A0fo410dpKrN2SnqFjt8n4JL8fDJE0wIgjFQ==} + dev: true + /del/6.1.1: resolution: {integrity: sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg==} engines: {node: '>=10'} @@ -6394,6 +7107,10 @@ packages: resolution: {integrity: sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==} dev: true + /destr/1.2.2: + resolution: {integrity: sha512-lrbCJwD9saUQrqUfXvl6qoM+QN3W7tLV5pAOs+OqOmopCCz/JkE05MHedJR1xfk4IAnZuJXPVuN5+7jNA2ZCiA==} + dev: true + /destroy/1.0.4: resolution: {integrity: sha512-3NdhDuEXnfun/z7x9GOElY49LoqVHoGScmOKwmxhsS8N5Y+Z8KyPPDnaSzqWgYt/ji4mqwfTS34Htrk0zPIXVg==} dev: true @@ -6454,6 +7171,33 @@ packages: esutils: 2.0.3 dev: true + /dom-serializer/2.0.0: + resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==} + dependencies: + domelementtype: 2.3.0 + domhandler: 5.0.3 + entities: 4.5.0 + dev: true + + /domelementtype/2.3.0: + resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} + dev: true + + /domhandler/5.0.3: + resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==} + engines: {node: '>= 4'} + dependencies: + domelementtype: 2.3.0 + dev: true + + /domutils/3.1.0: + resolution: {integrity: sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==} + dependencies: + dom-serializer: 2.0.0 + domelementtype: 2.3.0 + domhandler: 5.0.3 + dev: true + /dot-prop/5.3.0: resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==} engines: {node: '>=8'} @@ -6536,18 +7280,28 @@ packages: dependencies: once: 1.4.0 - /enhanced-resolve/5.15.0: - resolution: {integrity: sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==} + /enhanced-resolve/5.14.1: + resolution: {integrity: sha512-Vklwq2vDKtl0y/vtwjSesgJ5MYS7Etuk5txS8VdKL4AOS1aUlD96zqIfsOSLQsdv3xgMRbtkWM8eG9XDfKUPow==} engines: {node: '>=10.13.0'} dependencies: graceful-fs: 4.2.10 tapable: 2.2.1 dev: true + /entities/4.5.0: + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} + engines: {node: '>=0.12'} + dev: true + /env-paths/2.2.1: resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} engines: {node: '>=6'} + /env-paths/3.0.0: + resolution: {integrity: sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dev: true + /err-code/2.0.3: resolution: {integrity: sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==} dev: true @@ -6859,34 +7613,64 @@ packages: esbuild-windows-arm64: 0.15.13 dev: true - /esbuild/0.18.2: - resolution: {integrity: sha512-1P4sK9gXVcjvrrUjE94Hbo9goU+T6U1sdzLf+JJ+3uI6GEb4e4n3Wrqto9hZHUWabblpT2ifmC61LhZnLyTNFw==} + /esbuild/0.17.18: + resolution: {integrity: sha512-z1lix43jBs6UKjcZVKOw2xx69ffE2aG0PygLL5qJ9OS/gy0Ewd1gW/PUQIOIQGXBHWNywSc0floSKoMFF8aK2w==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - '@esbuild/android-arm': 0.18.2 - '@esbuild/android-arm64': 0.18.2 - '@esbuild/android-x64': 0.18.2 - '@esbuild/darwin-arm64': 0.18.2 - '@esbuild/darwin-x64': 0.18.2 - '@esbuild/freebsd-arm64': 0.18.2 - '@esbuild/freebsd-x64': 0.18.2 - '@esbuild/linux-arm': 0.18.2 - '@esbuild/linux-arm64': 0.18.2 - '@esbuild/linux-ia32': 0.18.2 - '@esbuild/linux-loong64': 0.18.2 - '@esbuild/linux-mips64el': 0.18.2 - '@esbuild/linux-ppc64': 0.18.2 - '@esbuild/linux-riscv64': 0.18.2 - '@esbuild/linux-s390x': 0.18.2 - '@esbuild/linux-x64': 0.18.2 - '@esbuild/netbsd-x64': 0.18.2 - '@esbuild/openbsd-x64': 0.18.2 - '@esbuild/sunos-x64': 0.18.2 - '@esbuild/win32-arm64': 0.18.2 - '@esbuild/win32-ia32': 0.18.2 - '@esbuild/win32-x64': 0.18.2 + '@esbuild/android-arm': 0.17.18 + '@esbuild/android-arm64': 0.17.18 + '@esbuild/android-x64': 0.17.18 + '@esbuild/darwin-arm64': 0.17.18 + '@esbuild/darwin-x64': 0.17.18 + '@esbuild/freebsd-arm64': 0.17.18 + '@esbuild/freebsd-x64': 0.17.18 + '@esbuild/linux-arm': 0.17.18 + '@esbuild/linux-arm64': 0.17.18 + '@esbuild/linux-ia32': 0.17.18 + '@esbuild/linux-loong64': 0.17.18 + '@esbuild/linux-mips64el': 0.17.18 + '@esbuild/linux-ppc64': 0.17.18 + '@esbuild/linux-riscv64': 0.17.18 + '@esbuild/linux-s390x': 0.17.18 + '@esbuild/linux-x64': 0.17.18 + '@esbuild/netbsd-x64': 0.17.18 + '@esbuild/openbsd-x64': 0.17.18 + '@esbuild/sunos-x64': 0.17.18 + '@esbuild/win32-arm64': 0.17.18 + '@esbuild/win32-ia32': 0.17.18 + '@esbuild/win32-x64': 0.17.18 + dev: true + + /esbuild/0.17.19: + resolution: {integrity: sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.17.19 + '@esbuild/android-arm64': 0.17.19 + '@esbuild/android-x64': 0.17.19 + '@esbuild/darwin-arm64': 0.17.19 + '@esbuild/darwin-x64': 0.17.19 + '@esbuild/freebsd-arm64': 0.17.19 + '@esbuild/freebsd-x64': 0.17.19 + '@esbuild/linux-arm': 0.17.19 + '@esbuild/linux-arm64': 0.17.19 + '@esbuild/linux-ia32': 0.17.19 + '@esbuild/linux-loong64': 0.17.19 + '@esbuild/linux-mips64el': 0.17.19 + '@esbuild/linux-ppc64': 0.17.19 + '@esbuild/linux-riscv64': 0.17.19 + '@esbuild/linux-s390x': 0.17.19 + '@esbuild/linux-x64': 0.17.19 + '@esbuild/netbsd-x64': 0.17.19 + '@esbuild/openbsd-x64': 0.17.19 + '@esbuild/sunos-x64': 0.17.19 + '@esbuild/win32-arm64': 0.17.19 + '@esbuild/win32-ia32': 0.17.19 + '@esbuild/win32-x64': 0.17.19 dev: true /escalade/3.1.1: @@ -6915,13 +7699,13 @@ packages: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} - /eslint-config-prettier/8.8.0_eslint@8.43.0: + /eslint-config-prettier/8.8.0_eslint@8.41.0: resolution: {integrity: sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.43.0 + eslint: 8.41.0 dev: true /eslint-formatter-pretty/4.1.0: @@ -6948,7 +7732,7 @@ packages: - supports-color dev: true - /eslint-module-utils/2.7.4_eqjsakfzselparsj7dsnshdtra: + /eslint-module-utils/2.7.4_zmawdbqmj2vgju5r7knbexwntq: resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} engines: {node: '>=4'} peerDependencies: @@ -6969,26 +7753,53 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.59.11_2jcgcerbs6bi4debdtwega5q6u + '@typescript-eslint/parser': 5.59.6_5ujgynla27k2qkzlnkldjwsutm debug: 3.2.7 - eslint: 8.43.0 + eslint: 8.41.0 eslint-import-resolver-node: 0.3.7 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-eslint-comments/3.2.0_eslint@8.43.0: + /eslint-plugin-antfu/0.39.1_5ujgynla27k2qkzlnkldjwsutm: + resolution: {integrity: sha512-Nc5AMuUWt35bgHTbU+5LGROqZos97anb7MVatWNcl56NA/bw5mfU0p/RI8xdsaWH8Kw7Tz+UQOfXVMMRXlhzsg==} + dependencies: + '@typescript-eslint/utils': 5.59.6_5ujgynla27k2qkzlnkldjwsutm + transitivePeerDependencies: + - eslint + - supports-color + - typescript + dev: true + + /eslint-plugin-es/4.1.0_eslint@8.41.0: + resolution: {integrity: sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==} + engines: {node: '>=8.10.0'} + peerDependencies: + eslint: '>=4.19.1' + dependencies: + eslint: 8.41.0 + eslint-utils: 2.1.0 + regexpp: 3.2.0 + dev: true + + /eslint-plugin-eslint-comments/3.2.0_eslint@8.41.0: resolution: {integrity: sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==} engines: {node: '>=6.5.0'} peerDependencies: eslint: '>=4.19.1' dependencies: escape-string-regexp: 1.0.5 - eslint: 8.43.0 + eslint: 8.41.0 ignore: 5.2.4 dev: true - /eslint-plugin-import/2.27.5_uxlzkvdl7bie3tsj7zcwvawrke: + /eslint-plugin-html/7.1.0: + resolution: {integrity: sha512-fNLRraV/e6j8e3XYOC9xgND4j+U7b1Rq+OygMlLcMg+wI/IpVbF+ubQa3R78EjKB9njT6TQOlcK5rFKBVVtdfg==} + dependencies: + htmlparser2: 8.0.2 + dev: true + + /eslint-plugin-import/2.27.5_4axmhv5rl7cvu7f33ludfwxkcu: resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==} engines: {node: '>=4'} peerDependencies: @@ -6998,15 +7809,15 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.59.11_2jcgcerbs6bi4debdtwega5q6u + '@typescript-eslint/parser': 5.59.6_5ujgynla27k2qkzlnkldjwsutm array-includes: 3.1.6 array.prototype.flat: 1.3.1 array.prototype.flatmap: 1.3.1 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.43.0 + eslint: 8.41.0 eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.7.4_eqjsakfzselparsj7dsnshdtra + eslint-module-utils: 2.7.4_zmawdbqmj2vgju5r7knbexwntq has: 1.0.3 is-core-module: 2.11.0 is-glob: 4.0.3 @@ -7021,8 +7832,8 @@ packages: - supports-color dev: true - /eslint-plugin-jest/27.2.2_6bt7zv2nmlck33askoehiu6z5u: - resolution: {integrity: sha512-euzbp06F934Z7UDl5ZUaRPLAc9MKjh0rMPERrHT7UhlCEwgb25kBj37TvMgWeHZVkR5I9CayswrpoaqZU1RImw==} + /eslint-plugin-jest/27.2.1_5ijt43grezcuiq4jmxee335ut4: + resolution: {integrity: sha512-l067Uxx7ZT8cO9NJuf+eJHvt6bqJyz2Z29wykyEdz/OtmcELQl2MQGQLX8J94O1cSJWAwUSEvCjwjA7KEK3Hmg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: '@typescript-eslint/eslint-plugin': ^5.0.0 @@ -7034,15 +7845,61 @@ packages: jest: optional: true dependencies: - '@typescript-eslint/eslint-plugin': 5.59.11_jxhnufqfdxsaktvg4boo4kir6q - '@typescript-eslint/utils': 5.59.11_2jcgcerbs6bi4debdtwega5q6u - eslint: 8.43.0 + '@typescript-eslint/eslint-plugin': 5.59.6_4qbuxpmdupj46lq2zjlghng6yy + '@typescript-eslint/utils': 5.50.0_5ujgynla27k2qkzlnkldjwsutm + eslint: 8.41.0 transitivePeerDependencies: - supports-color - typescript dev: true - /eslint-plugin-prettier/4.2.1_zh6vkmzat4wtnmvmftdassiwyu: + /eslint-plugin-jsonc/2.7.0_eslint@8.41.0: + resolution: {integrity: sha512-DZgC71h/hZ9t5k/OGAKOMdJCleg2neZLL7No+YYi2ZMroCN4X5huZdrLf1USbrc6UTHwYujd1EDwXHg1qJ6CYw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '>=6.0.0' + dependencies: + '@eslint-community/eslint-utils': 4.4.0_eslint@8.41.0 + eslint: 8.41.0 + jsonc-eslint-parser: 2.2.0 + natural-compare: 1.4.0 + dev: true + + /eslint-plugin-markdown/3.0.0_eslint@8.41.0: + resolution: {integrity: sha512-hRs5RUJGbeHDLfS7ELanT0e29Ocyssf/7kBM+p7KluY5AwngGkDf8Oyu4658/NZSGTTq05FZeWbkxXtbVyHPwg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + eslint: 8.41.0 + mdast-util-from-markdown: 0.8.5 + transitivePeerDependencies: + - supports-color + dev: true + + /eslint-plugin-n/15.7.0_eslint@8.41.0: + resolution: {integrity: sha512-jDex9s7D/Qial8AGVIHq4W7NswpUD5DPDL2RH8Lzd9EloWUuvUkHfv4FRLMipH5q2UtyurorBkPeNi1wVWNh3Q==} + engines: {node: '>=12.22.0'} + peerDependencies: + eslint: '>=7.0.0' + dependencies: + builtins: 5.0.1 + eslint: 8.41.0 + eslint-plugin-es: 4.1.0_eslint@8.41.0 + eslint-utils: 3.0.0_eslint@8.41.0 + ignore: 5.2.4 + is-core-module: 2.11.0 + minimatch: 3.1.2 + resolve: 1.22.2 + semver: 7.5.1 + dev: true + + /eslint-plugin-no-only-tests/3.1.0: + resolution: {integrity: sha512-Lf4YW/bL6Un1R6A76pRZyE1dl1vr31G/ev8UzIc/geCgFWyrKil8hVjYqWVKGB/UIGmb6Slzs9T0wNezdSVegw==} + engines: {node: '>=5.0.0'} + dev: true + + /eslint-plugin-prettier/4.2.1_5m322ea4tv353bxh5dkqp3d3i4: resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} engines: {node: '>=12.0.0'} peerDependencies: @@ -7053,18 +7910,105 @@ packages: eslint-config-prettier: optional: true dependencies: - eslint: 8.43.0 - eslint-config-prettier: 8.8.0_eslint@8.43.0 - prettier: 2.8.8 + eslint: 8.41.0 + eslint-config-prettier: 8.8.0_eslint@8.41.0 + prettier: 2.8.3 prettier-linter-helpers: 1.0.0 dev: true - /eslint-plugin-simple-import-sort/10.0.0_eslint@8.43.0: + /eslint-plugin-promise/6.1.1_eslint@8.41.0: + resolution: {integrity: sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + dependencies: + eslint: 8.41.0 + dev: true + + /eslint-plugin-simple-import-sort/10.0.0_eslint@8.41.0: resolution: {integrity: sha512-AeTvO9UCMSNzIHRkg8S6c3RPy5YEwKWSQPx3DYghLedo2ZQxowPFLGDN1AZ2evfg6r6mjBSZSLxLFsWSu3acsw==} peerDependencies: eslint: '>=5.0.0' dependencies: - eslint: 8.43.0 + eslint: 8.41.0 + dev: true + + /eslint-plugin-unicorn/46.0.0_eslint@8.41.0: + resolution: {integrity: sha512-j07WkC+PFZwk8J33LYp6JMoHa1lXc1u6R45pbSAipjpfpb7KIGr17VE2D685zCxR5VL4cjrl65kTJflziQWMDA==} + engines: {node: '>=14.18'} + peerDependencies: + eslint: '>=8.28.0' + dependencies: + '@babel/helper-validator-identifier': 7.19.1 + '@eslint-community/eslint-utils': 4.4.0_eslint@8.41.0 + ci-info: 3.8.0 + clean-regexp: 1.0.0 + eslint: 8.41.0 + esquery: 1.5.0 + indent-string: 4.0.0 + is-builtin-module: 3.2.1 + jsesc: 3.0.2 + lodash: 4.17.21 + pluralize: 8.0.0 + read-pkg-up: 7.0.1 + regexp-tree: 0.1.27 + regjsparser: 0.9.1 + safe-regex: 2.1.1 + semver: 7.5.1 + strip-indent: 3.0.0 + dev: true + + /eslint-plugin-unused-imports/2.0.0_qrapr3bedi2gglhy4lhyjlil4u: + resolution: {integrity: sha512-3APeS/tQlTrFa167ThtP0Zm0vctjr4M44HMpeg1P4bK6wItarumq0Ma82xorMKdFsWpphQBlRPzw/pxiVELX1A==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + '@typescript-eslint/eslint-plugin': ^5.0.0 + eslint: ^8.0.0 + peerDependenciesMeta: + '@typescript-eslint/eslint-plugin': + optional: true + dependencies: + '@typescript-eslint/eslint-plugin': 5.59.6_4qbuxpmdupj46lq2zjlghng6yy + eslint: 8.41.0 + eslint-rule-composer: 0.3.0 + dev: true + + /eslint-plugin-vue/9.11.0_eslint@8.41.0: + resolution: {integrity: sha512-bBCJAZnkBV7ATH4Z1E7CvN3nmtS4H7QUU3UBxPdo8WohRU+yHjnQRALpTbxMVcz0e4Mx3IyxIdP5HYODMxK9cQ==} + engines: {node: ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0_eslint@8.41.0 + eslint: 8.41.0 + natural-compare: 1.4.0 + nth-check: 2.1.1 + postcss-selector-parser: 6.0.12 + semver: 7.5.1 + vue-eslint-parser: 9.2.0_eslint@8.41.0 + xml-name-validator: 4.0.0 + transitivePeerDependencies: + - supports-color + dev: true + + /eslint-plugin-yml/1.5.0_eslint@8.41.0: + resolution: {integrity: sha512-iygN054g+ZrnYmtOXMnT+sx9iDNXt89/m0+506cQHeG0+5jJN8hY5iOPQLd3yfd50AfK/mSasajBWruf1SoHpQ==} + engines: {node: ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '>=6.0.0' + dependencies: + debug: 4.3.4 + eslint: 8.41.0 + lodash: 4.17.21 + natural-compare: 1.4.0 + yaml-eslint-parser: 1.2.0 + transitivePeerDependencies: + - supports-color + dev: true + + /eslint-rule-composer/0.3.0: + resolution: {integrity: sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==} + engines: {node: '>=4.0.0'} dev: true /eslint-rule-docs/1.1.235: @@ -7087,21 +8031,48 @@ packages: estraverse: 5.3.0 dev: true + /eslint-utils/2.1.0: + resolution: {integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==} + engines: {node: '>=6'} + dependencies: + eslint-visitor-keys: 1.3.0 + dev: true + + /eslint-utils/3.0.0_eslint@8.41.0: + resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} + engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} + peerDependencies: + eslint: '>=5' + dependencies: + eslint: 8.41.0 + eslint-visitor-keys: 2.1.0 + dev: true + + /eslint-visitor-keys/1.3.0: + resolution: {integrity: sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==} + engines: {node: '>=4'} + dev: true + + /eslint-visitor-keys/2.1.0: + resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==} + engines: {node: '>=10'} + dev: true + /eslint-visitor-keys/3.4.1: resolution: {integrity: sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint/8.43.0: - resolution: {integrity: sha512-aaCpf2JqqKesMFGgmRPessmVKjcGXqdlAYLLC3THM8t5nBRZRQ+st5WM/hoJXkdioEXLLbXgclUpM0TXo5HX5Q==} + /eslint/8.41.0: + resolution: {integrity: sha512-WQDQpzGBOP5IrXPo4Hc0814r4/v2rrIsB0rhT7jtunIalgg6gYXWhRMOejVO8yH21T/FGaxjmFjBMNqcIlmH1Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0_eslint@8.43.0 + '@eslint-community/eslint-utils': 4.4.0_eslint@8.41.0 '@eslint-community/regexpp': 4.5.1 '@eslint/eslintrc': 2.0.3 - '@eslint/js': 8.43.0 - '@humanwhocodes/config-array': 0.11.10 + '@eslint/js': 8.41.0 + '@humanwhocodes/config-array': 0.11.8 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 ajv: 6.12.6 @@ -7140,6 +8111,13 @@ packages: - supports-color dev: true + /esno/0.16.3: + resolution: {integrity: sha512-6slSBEV1lMKcX13DBifvnDFpNno5WXhw4j/ff7RI0y51BZiDqEe5dNhhjhIQ3iCOQuzsm2MbVzmwqbN78BBhPg==} + hasBin: true + dependencies: + tsx: 3.12.7 + dev: true + /espree/9.5.2: resolution: {integrity: sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -7179,6 +8157,10 @@ packages: engines: {node: '>=4.0'} dev: true + /estree-walker/2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + dev: true + /esutils/2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} @@ -7272,9 +8254,19 @@ packages: engines: {node: '>= 0.8.0'} dev: true - /expect-type/0.16.0: - resolution: {integrity: sha512-wCpFeVBiAPGiYkQZzaqvGuuBnNCHbtnowMOBpBGY8a27XbG8VAit3lklWph1r8VmgsH61mOZqI3NuGm8bZnUlw==} - engines: {node: '>=12.0.0'} + /expect-type/0.15.0: + resolution: {integrity: sha512-yWnriYB4e8G54M5/fAFj7rCIBiKs1HAACaY13kCz6Ku0dezjS9aMcfcdVK2X8Tv2tEV1BPz/wKfQ7WA4S/d8aA==} + dev: true + + /expect/29.4.3: + resolution: {integrity: sha512-uC05+Q7eXECFpgDrHdXA4k2rpMyStAYPItEDLyQDo5Ta7fVkJnNA/4zh/OIVkVVNZ1oOK1PipQoyNjuZ6sz6Dg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/expect-utils': 29.5.0 + jest-get-type: 29.4.3 + jest-matcher-utils: 29.5.0 + jest-message-util: 29.5.0 + jest-util: 29.5.0 dev: true /expect/29.5.0: @@ -7388,8 +8380,8 @@ packages: /fast-write-atomic/0.2.1: resolution: {integrity: sha512-WvJe06IfNYlr+6cO3uQkdKdy3Cb1LlCJSF8zRs2eT8yuhdbSlR9nIt+TgQ92RUxiRrQm+/S7RARnMfCs5iuAjw==} - /fast-xml-parser/4.2.4: - resolution: {integrity: sha512-fbfMDvgBNIdDJLdLOwacjFAPYt67tr31H9ZhWSm45CDAxvd0I6WTlSOUo7K2P/K5sA5JgMKG64PI3DMcaFdWpQ==} + /fast-xml-parser/4.1.2: + resolution: {integrity: sha512-CDYeykkle1LiA/uqQyNwYpFbyF6Axec6YapmpUP+/RHWIoR1zKjocdvNaTsxCxZzQ6v9MLXaSYm9Qq0thv0DHg==} hasBin: true dependencies: strnum: 1.0.5 @@ -7546,6 +8538,11 @@ packages: resolution: {integrity: sha512-ZfmD5MnU7GglUEhiky9C7yEPaNq1/wh36RDohe+Xr3nJVdccwHbdTkFIYvetcdsoAckUKT51fuf44g7Ni5Doyg==} dev: true + /flat/5.0.2: + resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} + hasBin: true + dev: true + /flatted/3.2.7: resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} dev: true @@ -7630,6 +8627,15 @@ packages: resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} dev: false + /fs-extra/11.1.0: + resolution: {integrity: sha512-0rcTq621PD5jM/e0a3EJoGC/1TC5ZBCERW82LQuwfGnCa1V8w7dpYH1yNu+SLb6E5dkeCBzKEyLGlFrnr+dUyw==} + engines: {node: '>=14.14'} + dependencies: + graceful-fs: 4.2.10 + jsonfile: 6.1.0 + universalify: 2.0.0 + dev: true + /fs-extra/11.1.1: resolution: {integrity: sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==} engines: {node: '>=14.14'} @@ -7666,8 +8672,8 @@ packages: minipass: 5.0.0 dev: true - /fs-monkey/1.0.4: - resolution: {integrity: sha512-INM/fWAxMICjttnD0DX1rBvinKskj5G1w+oy/pnm9u/tSlnBrzFonJMcalKJ30P8RRsPzKcCG7Q8l0jx5Fh9YQ==} + /fs-monkey/1.0.3: + resolution: {integrity: sha512-cybjIfiiE+pTWicSCLFHSrXZ6EilF30oh91FDP9S2B051prEa7QWfrVTQm10/dDpswBDXZugPa1Ogu8Yh+HV0Q==} dev: true /fs.realpath/1.0.0: @@ -7713,6 +8719,10 @@ packages: hasBin: true dev: true + /fzf/0.5.1: + resolution: {integrity: sha512-AJ9BBt/3K/IyCF+pQjdG194kVSS1hU/v/RnZgiCtYZzA0rj2OBVwwjBRUOclo9yJl2ovjtdw3C31/8/rnT0uug==} + dev: true + /gauge/1.2.7: resolution: {integrity: sha512-fVbU2wRE91yDvKUnrIaQlHKAWKY5e08PmztCrwuH5YVQ+Z/p3d0ny2T48o6uvAAXHIUnfaQdHkmxYbQft1eHVA==} dependencies: @@ -7762,6 +8772,10 @@ packages: engines: {node: 6.* || 8.* || >= 10.*} dev: true + /get-func-name/2.0.0: + resolution: {integrity: sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==} + dev: true + /get-intrinsic/1.1.3: resolution: {integrity: sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==} dependencies: @@ -7830,6 +8844,25 @@ packages: call-bind: 1.0.2 get-intrinsic: 1.2.0 + /get-tsconfig/4.5.0: + resolution: {integrity: sha512-MjhiaIWCJ1sAU4pIQ5i5OfOuHHxVo1oYeNsWTON7jxYkod8pHocXeh+SSbmu5OZZZK73B6cbJ2XADzXehLyovQ==} + dev: true + + /giget/1.1.2: + resolution: {integrity: sha512-HsLoS07HiQ5oqvObOI+Qb2tyZH4Gj5nYGfF9qQcZNrPw+uEFhdXtgJr01aO2pWadGHucajYDLxxbtQkm97ON2A==} + hasBin: true + dependencies: + colorette: 2.0.19 + defu: 6.1.2 + https-proxy-agent: 5.0.1 + mri: 1.2.0 + node-fetch-native: 1.1.0 + pathe: 1.1.0 + tar: 6.1.14 + transitivePeerDependencies: + - supports-color + dev: true + /github-username/6.0.0: resolution: {integrity: sha512-7TTrRjxblSI5l6adk9zd+cV5d6i1OrJSo3Vr9xdGqFLBQo0mz5P9eIfKCDJ7eekVGGFLbce0qbPSnktXV2BjDQ==} engines: {node: '>=10'} @@ -7888,6 +8921,16 @@ packages: minimatch: 5.1.6 once: 1.4.0 + /glob/9.3.5: + resolution: {integrity: sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + fs.realpath: 1.0.0 + minimatch: 8.0.4 + minipass: 4.2.8 + path-scurry: 1.7.0 + dev: true + /global-agent/2.2.0: resolution: {integrity: sha512-+20KpaW6DDLqhG7JDiJpD1JvNvb8ts+TNl7BPOYcURqCrXqnN1Vf+XVOrkKJAFPqfX+oEhsdzOj1hLWkBTdNJg==} engines: {node: '>=10.0'} @@ -7958,6 +9001,17 @@ packages: merge2: 1.4.1 slash: 3.0.0 + /globby/13.1.3: + resolution: {integrity: sha512-8krCNHXvlCgHDpegPzleMq07yMYTO2sXKASmZmquEYWEmCx6J5UTRbp5RwMJkTJGtcQ44YpiUYUiN0b9mzy8Bw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + dir-glob: 3.0.1 + fast-glob: 3.2.12 + ignore: 5.2.4 + merge2: 1.4.1 + slash: 4.0.0 + dev: true + /globby/13.1.4: resolution: {integrity: sha512-iui/IiiW+QrJ1X1hKH5qwlMQyv34wJAYwH1vrf8b9kBA4sNiif3gKsMHa+BrdnOpEudWjpotfa7LrTzB1ERS/g==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -8157,6 +9211,10 @@ packages: type-fest: 0.8.1 dev: false + /hookable/5.5.3: + resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==} + dev: true + /hosted-git-info/2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} @@ -8178,6 +9236,15 @@ packages: resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} dev: true + /htmlparser2/8.0.2: + resolution: {integrity: sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==} + dependencies: + domelementtype: 2.3.0 + domhandler: 5.0.3 + domutils: 3.1.0 + entities: 4.5.0 + dev: true + /http-cache-semantics/3.8.1: resolution: {integrity: sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==} dev: true @@ -8218,16 +9285,6 @@ packages: transitivePeerDependencies: - supports-color - /http-proxy-agent/7.0.0: - resolution: {integrity: sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==} - engines: {node: '>= 14'} - dependencies: - agent-base: 7.1.0 - debug: 4.3.4 - transitivePeerDependencies: - - supports-color - dev: false - /http2-wrapper/1.0.3: resolution: {integrity: sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==} engines: {node: '>=10.19.0'} @@ -8245,16 +9302,6 @@ packages: transitivePeerDependencies: - supports-color - /https-proxy-agent/7.0.0: - resolution: {integrity: sha512-0euwPCRyAPSgGdzD1IVN9nJYHtBhJwb6XPfbpQcYbPCwrBidX6GzxmchnaF4sfF/jPb74Ojx5g4yTg3sixlyPw==} - engines: {node: '>= 14'} - dependencies: - agent-base: 7.1.0 - debug: 4.3.4 - transitivePeerDependencies: - - supports-color - dev: false - /human-signals/2.1.0: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} @@ -8385,6 +9432,11 @@ packages: resolution: {integrity: sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==} engines: {node: '>=10'} + /ini/4.1.1: + resolution: {integrity: sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dev: true + /inquirer/1.2.3: resolution: {integrity: sha512-diSnpgfv/Ozq6QKuV2mUcwZ+D24b03J3W6EVxzvtkCWJTPrH2gKLsqgSW0vzRMZZFhFdhnvzka0RUJxIm7AOxQ==} dependencies: @@ -8459,6 +9511,17 @@ packages: engines: {node: '>=8'} dev: true + /is-alphabetical/1.0.4: + resolution: {integrity: sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==} + dev: true + + /is-alphanumerical/1.0.4: + resolution: {integrity: sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==} + dependencies: + is-alphabetical: 1.0.4 + is-decimal: 1.0.4 + dev: true + /is-arguments/1.1.1: resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} engines: {node: '>= 0.4'} @@ -8496,6 +9559,13 @@ packages: call-bind: 1.0.2 has-tostringtag: 1.0.0 + /is-builtin-module/3.2.1: + resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} + engines: {node: '>=6'} + dependencies: + builtin-modules: 3.3.0 + dev: true + /is-callable/1.2.7: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} @@ -8525,6 +9595,10 @@ packages: dependencies: has-tostringtag: 1.0.0 + /is-decimal/1.0.4: + resolution: {integrity: sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==} + dev: true + /is-docker/1.1.0: resolution: {integrity: sha512-ZEpopPu+bLIb/x3IF9wXxRdAW74e/ity1XGRxpznAaABKhc8mmtRamRB2l71CSs1YMS8FQxDK/vPK10XlhzG2A==} engines: {node: '>=0.10.0'} @@ -8578,6 +9652,10 @@ packages: dependencies: is-extglob: 2.1.1 + /is-hexadecimal/1.0.4: + resolution: {integrity: sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==} + dev: true + /is-installed-globally/0.4.0: resolution: {integrity: sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==} engines: {node: '>=10'} @@ -8594,6 +9672,10 @@ packages: resolution: {integrity: sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==} dev: true + /is-module/1.0.0: + resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} + dev: true + /is-negative-zero/2.0.2: resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} engines: {node: '>= 0.4'} @@ -8650,6 +9732,12 @@ packages: engines: {node: '>=0.10.0'} dev: true + /is-reference/1.2.1: + resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} + dependencies: + '@types/estree': 1.0.0 + dev: true + /is-regex/1.1.4: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} @@ -8863,7 +9951,7 @@ packages: '@jest/expect': 29.5.0 '@jest/test-result': 29.5.0 '@jest/types': 29.5.0 - '@types/node': 18.16.18 + '@types/node': 18.16.14 chalk: 4.1.2 co: 4.6.0 dedent: 0.7.0 @@ -8911,35 +9999,7 @@ packages: - ts-node dev: true - /jest-cli/29.5.0_@types+node@18.16.16: - resolution: {integrity: sha512-L1KcP1l4HtfwdxXNFCL5bmUbLQiKrakMUriBEcc1Vfz6gx31ORKdreuWvmQVBit+1ss9NNR3yxjwfwzZNdQXJw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - hasBin: true - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - dependencies: - '@jest/core': 29.5.0 - '@jest/test-result': 29.5.0 - '@jest/types': 29.5.0 - chalk: 4.1.2 - exit: 0.1.2 - graceful-fs: 4.2.10 - import-local: 3.1.0 - jest-config: 29.5.0_@types+node@18.16.16 - jest-util: 29.5.0 - jest-validate: 29.5.0 - prompts: 2.4.2 - yargs: 17.6.0 - transitivePeerDependencies: - - '@types/node' - - supports-color - - ts-node - dev: true - - /jest-cli/29.5.0_@types+node@18.16.18: + /jest-cli/29.5.0_@types+node@18.16.14: resolution: {integrity: sha512-L1KcP1l4HtfwdxXNFCL5bmUbLQiKrakMUriBEcc1Vfz6gx31ORKdreuWvmQVBit+1ss9NNR3yxjwfwzZNdQXJw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -8956,7 +10016,7 @@ packages: exit: 0.1.2 graceful-fs: 4.2.10 import-local: 3.1.0 - jest-config: 29.5.0_@types+node@18.16.18 + jest-config: 29.5.0_@types+node@18.16.14 jest-util: 29.5.0 jest-validate: 29.5.0 prompts: 2.4.2 @@ -8967,7 +10027,7 @@ packages: - ts-node dev: true - /jest-cli/29.5.0_u3tjahz4lx2ow4rgesw7wigoy4: + /jest-cli/29.5.0_daglcptrsglylliibnnp676h3i: resolution: {integrity: sha512-L1KcP1l4HtfwdxXNFCL5bmUbLQiKrakMUriBEcc1Vfz6gx31ORKdreuWvmQVBit+1ss9NNR3yxjwfwzZNdQXJw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -8984,7 +10044,7 @@ packages: exit: 0.1.2 graceful-fs: 4.2.10 import-local: 3.1.0 - jest-config: 29.5.0_u3tjahz4lx2ow4rgesw7wigoy4 + jest-config: 29.5.0_daglcptrsglylliibnnp676h3i jest-util: 29.5.0 jest-validate: 29.5.0 prompts: 2.4.2 @@ -9033,86 +10093,7 @@ packages: - supports-color dev: true - /jest-config/29.5.0_5qsgjhhli643kzzyel6mobhisq: - resolution: {integrity: sha512-kvDUKBnNJPNBmFFOhDbm59iu1Fii1Q6SxyhXfvylq3UTHbg6o7j/g8k2dZyXWLvfdKB1vAPxNZnMgtKJcmu3kA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - '@types/node': '*' - ts-node: '>=9.0.0' - peerDependenciesMeta: - '@types/node': - optional: true - ts-node: - optional: true - dependencies: - '@babel/core': 7.21.8 - '@jest/test-sequencer': 29.5.0 - '@jest/types': 29.5.0 - '@types/node': 18.16.18 - babel-jest: 29.5.0_@babel+core@7.21.8 - chalk: 4.1.2 - ci-info: 3.8.0 - deepmerge: 4.2.2 - glob: 7.2.3 - graceful-fs: 4.2.10 - jest-circus: 29.5.0 - jest-environment-node: 29.5.0 - jest-get-type: 29.4.3 - jest-regex-util: 29.4.3 - jest-resolve: 29.5.0 - jest-runner: 29.5.0 - jest-util: 29.5.0 - jest-validate: 29.5.0 - micromatch: 4.0.5 - parse-json: 5.2.0 - pretty-format: 29.5.0 - slash: 3.0.0 - strip-json-comments: 3.1.1 - ts-node: 10.9.1_5cbqh36kzuqel5avofcbl5rwvu - transitivePeerDependencies: - - supports-color - dev: true - - /jest-config/29.5.0_@types+node@18.16.16: - resolution: {integrity: sha512-kvDUKBnNJPNBmFFOhDbm59iu1Fii1Q6SxyhXfvylq3UTHbg6o7j/g8k2dZyXWLvfdKB1vAPxNZnMgtKJcmu3kA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - '@types/node': '*' - ts-node: '>=9.0.0' - peerDependenciesMeta: - '@types/node': - optional: true - ts-node: - optional: true - dependencies: - '@babel/core': 7.21.8 - '@jest/test-sequencer': 29.5.0 - '@jest/types': 29.5.0 - '@types/node': 18.16.16 - babel-jest: 29.5.0_@babel+core@7.21.8 - chalk: 4.1.2 - ci-info: 3.8.0 - deepmerge: 4.2.2 - glob: 7.2.3 - graceful-fs: 4.2.10 - jest-circus: 29.5.0 - jest-environment-node: 29.5.0 - jest-get-type: 29.4.3 - jest-regex-util: 29.4.3 - jest-resolve: 29.5.0 - jest-runner: 29.5.0 - jest-util: 29.5.0 - jest-validate: 29.5.0 - micromatch: 4.0.5 - parse-json: 5.2.0 - pretty-format: 29.5.0 - slash: 3.0.0 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - supports-color - dev: true - - /jest-config/29.5.0_@types+node@18.16.18: + /jest-config/29.5.0_@types+node@18.16.14: resolution: {integrity: sha512-kvDUKBnNJPNBmFFOhDbm59iu1Fii1Q6SxyhXfvylq3UTHbg6o7j/g8k2dZyXWLvfdKB1vAPxNZnMgtKJcmu3kA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: @@ -9127,7 +10108,7 @@ packages: '@babel/core': 7.21.8 '@jest/test-sequencer': 29.5.0 '@jest/types': 29.5.0 - '@types/node': 18.16.18 + '@types/node': 18.16.14 babel-jest: 29.5.0_@babel+core@7.21.8 chalk: 4.1.2 ci-info: 3.8.0 @@ -9151,7 +10132,7 @@ packages: - supports-color dev: true - /jest-config/29.5.0_u3tjahz4lx2ow4rgesw7wigoy4: + /jest-config/29.5.0_daglcptrsglylliibnnp676h3i: resolution: {integrity: sha512-kvDUKBnNJPNBmFFOhDbm59iu1Fii1Q6SxyhXfvylq3UTHbg6o7j/g8k2dZyXWLvfdKB1vAPxNZnMgtKJcmu3kA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: @@ -9166,7 +10147,7 @@ packages: '@babel/core': 7.21.8 '@jest/test-sequencer': 29.5.0 '@jest/types': 29.5.0 - '@types/node': 18.16.16 + '@types/node': 18.16.14 babel-jest: 29.5.0_@babel+core@7.21.8 chalk: 4.1.2 ci-info: 3.8.0 @@ -9186,7 +10167,7 @@ packages: pretty-format: 29.5.0 slash: 3.0.0 strip-json-comments: 3.1.1 - ts-node: 10.9.1_5cbqh36kzuqel5avofcbl5rwvu + ts-node: 10.9.1_gedhic2hxbm43qfqfkboxjwb3y transitivePeerDependencies: - supports-color dev: true @@ -9236,7 +10217,7 @@ packages: '@jest/environment': 29.5.0 '@jest/fake-timers': 29.5.0 '@jest/types': 29.5.0 - '@types/node': 18.16.18 + '@types/node': 18.16.14 jest-mock: 29.5.0 jest-util: 29.5.0 dev: true @@ -9252,7 +10233,7 @@ packages: dependencies: '@jest/types': 29.5.0 '@types/graceful-fs': 4.1.5 - '@types/node': 18.16.18 + '@types/node': 18.16.14 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.10 @@ -9297,7 +10278,7 @@ packages: resolution: {integrity: sha512-Kijeg9Dag6CKtIDA7O21zNTACqD5MD/8HfIV8pdD94vFyFuer52SigdC3IQMhab3vACxXMiFk+yMHNdbqtyTGA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/code-frame': 7.21.4 + '@babel/code-frame': 7.18.6 '@jest/types': 29.5.0 '@types/stack-utils': 2.0.1 chalk: 4.1.2 @@ -9313,7 +10294,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.5.0 - '@types/node': 18.16.18 + '@types/node': 18.16.14 jest-util: 29.5.0 dev: true @@ -9368,7 +10349,7 @@ packages: '@jest/test-result': 29.5.0 '@jest/transform': 29.5.0 '@jest/types': 29.5.0 - '@types/node': 18.16.18 + '@types/node': 18.16.14 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.10 @@ -9399,7 +10380,7 @@ packages: '@jest/test-result': 29.5.0 '@jest/transform': 29.5.0 '@jest/types': 29.5.0 - '@types/node': 18.16.18 + '@types/node': 18.16.14 chalk: 4.1.2 cjs-module-lexer: 1.2.2 collect-v8-coverage: 1.0.1 @@ -9459,7 +10440,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.5.0 - '@types/node': 18.16.18 + '@types/node': 18.16.14 chalk: 4.1.2 ci-info: 3.8.0 graceful-fs: 4.2.10 @@ -9484,7 +10465,7 @@ packages: dependencies: '@jest/test-result': 29.5.0 '@jest/types': 29.5.0 - '@types/node': 18.16.18 + '@types/node': 18.16.14 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -9496,7 +10477,7 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 18.16.18 + '@types/node': 18.16.14 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true @@ -9505,7 +10486,7 @@ packages: resolution: {integrity: sha512-NcrQnevGoSp4b5kg+akIpthoAFHxPBcb5P6mYPY0fUNT+sSvmtu6jlkEle3anczUKIKEbMxFimk9oTP/tpIPgA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@types/node': 18.16.18 + '@types/node': 18.16.14 jest-util: 29.5.0 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -9531,7 +10512,7 @@ packages: - ts-node dev: true - /jest/29.5.0_@types+node@18.16.16: + /jest/29.5.0_@types+node@18.16.14: resolution: {integrity: sha512-juMg3he2uru1QoXX078zTa7pO85QyB9xajZc6bU+d9yEGwrKX6+vGmJQ3UdVZsvTEUARIdObzH68QItim6OSSQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -9544,14 +10525,14 @@ packages: '@jest/core': 29.5.0 '@jest/types': 29.5.0 import-local: 3.1.0 - jest-cli: 29.5.0_@types+node@18.16.16 + jest-cli: 29.5.0_@types+node@18.16.14 transitivePeerDependencies: - '@types/node' - supports-color - ts-node dev: true - /jest/29.5.0_@types+node@18.16.18: + /jest/29.5.0_daglcptrsglylliibnnp676h3i: resolution: {integrity: sha512-juMg3he2uru1QoXX078zTa7pO85QyB9xajZc6bU+d9yEGwrKX6+vGmJQ3UdVZsvTEUARIdObzH68QItim6OSSQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -9561,34 +10542,19 @@ packages: node-notifier: optional: true dependencies: - '@jest/core': 29.5.0 + '@jest/core': 29.5.0_ts-node@10.9.1 '@jest/types': 29.5.0 import-local: 3.1.0 - jest-cli: 29.5.0_@types+node@18.16.18 + jest-cli: 29.5.0_daglcptrsglylliibnnp676h3i transitivePeerDependencies: - '@types/node' - supports-color - ts-node dev: true - /jest/29.5.0_u3tjahz4lx2ow4rgesw7wigoy4: - resolution: {integrity: sha512-juMg3he2uru1QoXX078zTa7pO85QyB9xajZc6bU+d9yEGwrKX6+vGmJQ3UdVZsvTEUARIdObzH68QItim6OSSQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + /jiti/1.18.2: + resolution: {integrity: sha512-QAdOptna2NYiSSpv0O/BwoHBSmz4YhpzJHyi+fnMRTXFjp7B8i/YG5Z8IfusxB1ufjcD2Sre1F3R+nX3fvy7gg==} hasBin: true - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - dependencies: - '@jest/core': 29.5.0_ts-node@10.9.1 - '@jest/types': 29.5.0 - import-local: 3.1.0 - jest-cli: 29.5.0_u3tjahz4lx2ow4rgesw7wigoy4 - transitivePeerDependencies: - - '@types/node' - - supports-color - - ts-node dev: true /jju/1.4.0: @@ -9603,6 +10569,11 @@ packages: /js-md4/0.3.2: resolution: {integrity: sha512-/GDnfQYsltsjRswQhN9fhv3EMw2sCpUdrdxyWDOUK7eyD++r3gRhzgiQgc/x4MAv2i1iuQ4lxO5mvqM3vj4bwA==} + /js-string-escape/1.0.1: + resolution: {integrity: sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==} + engines: {node: '>= 0.8'} + dev: true + /js-tokens/4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -9624,12 +10595,23 @@ packages: /jsbi/4.3.0: resolution: {integrity: sha512-SnZNcinB4RIcnEyZqFPdGPVgrg2AcnykiBy0sHVJQKHYeaLUvi3Exj+iaPpLnFVkDPZIV4U0yvgC9/R4uEAZ9g==} + /jsesc/0.5.0: + resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==} + hasBin: true + dev: true + /jsesc/2.5.2: resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} engines: {node: '>=4'} hasBin: true dev: true + /jsesc/3.0.2: + resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} + engines: {node: '>=6'} + hasBin: true + dev: true + /json-buffer/3.0.0: resolution: {integrity: sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ==} dev: true @@ -9679,6 +10661,16 @@ packages: hasBin: true dev: true + /jsonc-eslint-parser/2.2.0: + resolution: {integrity: sha512-x5QjzBOORd+T2EjErIxJnkOEbLVEdD1ILEeBbIJt8Eq/zUn7P7M8qdnWiNVBK5f8oxnJpc6SBHOeeIEl/swPjg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + acorn: 8.8.2 + eslint-visitor-keys: 3.4.1 + espree: 9.5.2 + semver: 7.5.1 + dev: true + /jsonc-parser/3.2.0: resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} dev: true @@ -9899,6 +10891,11 @@ packages: engines: {node: '>=6.11.5'} dev: true + /local-pkg/0.4.3: + resolution: {integrity: sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==} + engines: {node: '>=14'} + dev: true + /locate-path/2.0.0: resolution: {integrity: sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==} engines: {node: '>=4'} @@ -10044,6 +11041,12 @@ packages: signal-exit: 3.0.7 dev: true + /loupe/2.3.6: + resolution: {integrity: sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==} + dependencies: + get-func-name: 2.0.0 + dev: true + /lowercase-keys/1.0.0: resolution: {integrity: sha512-RPlX0+PHuvxVDZ7xX+EBVAp4RsVxP/TdDSN2mJYdiq1Lc4Hz7EUSjUI7RZrKKlmrIzVhf6Jo2stj7++gVarS0A==} engines: {node: '>=0.10.0'} @@ -10085,6 +11088,20 @@ packages: hasBin: true dev: true + /magic-string/0.27.0: + resolution: {integrity: sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/sourcemap-codec': 1.4.14 + dev: true + + /magic-string/0.30.0: + resolution: {integrity: sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/sourcemap-codec': 1.4.14 + dev: true + /make-dir/3.1.0: resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} engines: {node: '>=8'} @@ -10200,8 +11217,20 @@ packages: resolution: {integrity: sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g==} dev: true - /mariadb/3.2.0: - resolution: {integrity: sha512-IH2nidQat1IBMxP5gjuNxG6dADtz1PESEC6rKrcATen5v3ngFyZITjehyYiwNfz3zUNQupfYmVntz93M+Pz8pQ==} + /mariadb/3.0.2: + resolution: {integrity: sha512-dVjiQZ6RW0IXFnX+T/ZEmnqs724DgkQsXqfCyInXn0XxVfO2Px6KbS4M3Ny6UiBg0zJ93SHHvfVBgYO4ZnFvvw==} + engines: {node: '>= 12'} + dependencies: + '@types/geojson': 7946.0.10 + '@types/node': 17.0.45 + denque: 2.1.0 + iconv-lite: 0.6.3 + lru-cache: 7.14.0 + moment-timezone: 0.5.38 + dev: true + + /mariadb/3.1.1: + resolution: {integrity: sha512-Y5tu9pQr8uZs63FATr7ldODXn8N2aIFlAg/rp6kRTohgQiJfdl9DNGu9PXRTYdY4JgF5mT2ASD81Jdo5kfGYzg==} engines: {node: '>= 12'} dependencies: '@types/geojson': 7946.0.10 @@ -10209,6 +11238,7 @@ packages: denque: 2.1.0 iconv-lite: 0.6.3 lru-cache: 7.14.0 + dev: false /matcher/3.0.0: resolution: {integrity: sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==} @@ -10217,6 +11247,29 @@ packages: escape-string-regexp: 4.0.0 dev: true + /md5-hex/3.0.1: + resolution: {integrity: sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw==} + engines: {node: '>=8'} + dependencies: + blueimp-md5: 2.19.0 + dev: true + + /mdast-util-from-markdown/0.8.5: + resolution: {integrity: sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==} + dependencies: + '@types/mdast': 3.0.11 + mdast-util-to-string: 2.0.0 + micromark: 2.11.4 + parse-entities: 2.0.0 + unist-util-stringify-position: 2.0.3 + transitivePeerDependencies: + - supports-color + dev: true + + /mdast-util-to-string/2.0.0: + resolution: {integrity: sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==} + dev: true + /media-typer/0.3.0: resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} engines: {node: '>= 0.6'} @@ -10284,11 +11337,11 @@ packages: p-is-promise: 2.1.0 dev: true - /memfs/3.5.3: - resolution: {integrity: sha512-UERzLsxzllchadvbPs5aolHh65ISpKpM+ccLbOJ8/vvpBKmAWf+la7dXFy7Mr0ySHbdHrFv5kGFCUHHe6GFEmw==} + /memfs/3.5.1: + resolution: {integrity: sha512-UWbFJKvj5k+nETdteFndTpYxdeTMox/ULeqX5k/dpaQJCCFmj5EeKv3dBcyO2xmkRAx2vppRu5dVG7SOtsGOzA==} engines: {node: '>= 4.0.0'} dependencies: - fs-monkey: 1.0.4 + fs-monkey: 1.0.3 dev: true /memory-pager/1.5.0: @@ -10345,6 +11398,15 @@ packages: engines: {node: '>= 0.6'} dev: true + /micromark/2.11.4: + resolution: {integrity: sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==} + dependencies: + debug: 4.3.4 + parse-entities: 2.0.0 + transitivePeerDependencies: + - supports-color + dev: true + /micromatch/4.0.5: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} engines: {node: '>=8.6'} @@ -10414,6 +11476,13 @@ packages: dependencies: brace-expansion: 2.0.1 + /minimatch/8.0.4: + resolution: {integrity: sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + brace-expansion: 2.0.1 + dev: true + /minimatch/9.0.0: resolution: {integrity: sha512-0jJj8AvgKqWN05mrwuqi8QYKx1WmYSUoKSxu5Qhs9prezTz10sxAHGNZe9J9cqIJzta8DWsleh2KaVaLl6Ru2w==} engines: {node: '>=16 || 14 >=14.17'} @@ -10517,6 +11586,11 @@ packages: yallist: 4.0.0 dev: true + /minipass/4.2.8: + resolution: {integrity: sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==} + engines: {node: '>=8'} + dev: true + /minipass/5.0.0: resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==} engines: {node: '>=8'} @@ -10543,13 +11617,45 @@ packages: resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} hasBin: true dependencies: - minimist: 1.2.8 + minimist: 1.2.8 + dev: true + + /mkdirp/1.0.4: + resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} + engines: {node: '>=10'} + hasBin: true + dev: true + + /mkdist/1.2.0_typescript@5.0.4: + resolution: {integrity: sha512-UTqu/bXmIk/+VKNVgufAeMyjUcNy1dn9Bl7wL1zZlCKVrpDgj/VllmZBeh3ZCC/2HWqUrt6frNFTKt9TRZbNvQ==} + hasBin: true + peerDependencies: + sass: ^1.60.0 + typescript: '>=4.9.5' + peerDependenciesMeta: + sass: + optional: true + typescript: + optional: true + dependencies: + defu: 6.1.2 + esbuild: 0.17.19 + fs-extra: 11.1.1 + globby: 13.1.4 + jiti: 1.18.2 + mlly: 1.2.0 + mri: 1.2.0 + pathe: 1.1.0 + typescript: 5.0.4 dev: true - /mkdirp/1.0.4: - resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} - engines: {node: '>=10'} - hasBin: true + /mlly/1.2.0: + resolution: {integrity: sha512-+c7A3CV0KGdKcylsI6khWyts/CYrGTrRVo4R/I7u/cUsy0Conxa6LUhiEzVKIw14lc2L5aiO4+SeVe4TeGRKww==} + dependencies: + acorn: 8.8.2 + pathe: 1.1.0 + pkg-types: 1.0.3 + ufo: 1.1.1 dev: true /mock-stdin/1.0.0: @@ -10559,6 +11665,16 @@ packages: /module-details-from-path/1.0.3: resolution: {integrity: sha512-ySViT69/76t8VhE1xXHK6Ch4NcDd26gx0MzKXLO+F7NOtnqH68d9zF94nT8ZWSxXh8ELOERsnJO/sWt1xZYw5A==} + /moment-timezone/0.5.38: + resolution: {integrity: sha512-nMIrzGah4+oYZPflDvLZUgoVUO4fvAqHstvG3xAUnMolWncuAiLDWNnJZj6EwJGMGfb1ZcuTFE6GI3hNOVWI/Q==} + dependencies: + moment: 2.29.4 + dev: true + + /moment/2.29.4: + resolution: {integrity: sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==} + dev: true + /mongodb-connection-string-url/2.5.4: resolution: {integrity: sha512-SeAxuWs0ez3iI3vvmLk/j2y+zHwigTDKQhtdxTgt5ZCOQQS5+HW4g45/Xw5vzzbn7oQXCNQ24Z40AkJsizEy7w==} dependencies: @@ -10574,14 +11690,14 @@ packages: mongodb-connection-string-url: 2.5.4 socks: 2.7.1 optionalDependencies: - '@aws-sdk/credential-providers': 3.354.0 + '@aws-sdk/credential-providers': 3.338.0 saslprep: 1.0.3 transitivePeerDependencies: - aws-crt dev: false - /mongoose/6.11.2: - resolution: {integrity: sha512-BJHQerozE+qIVdH8Hn9niMVMUzRNcjmwU7hFEzER1+aYtGmVJgGsXBd9wJ9GnrHrbCsYmKlRy8aTuxEdlEtfow==} + /mongoose/6.11.1: + resolution: {integrity: sha512-AvQ8C5ZGF6GcsQhoRg/i7pbNZpb96qLGU5ICBllckp7qMOxcfUF1nA6JstZw841BqRcE6myZ/mx9CluEESaw5Q==} engines: {node: '>=12.0.0'} dependencies: bson: 4.7.2 @@ -10610,6 +11726,11 @@ packages: - supports-color dev: false + /mri/1.2.0: + resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} + engines: {node: '>=4'} + dev: true + /ms/2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} dev: true @@ -10653,6 +11774,12 @@ packages: resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==} dev: true + /nanoid/3.3.6: + resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: true + /native-duplexpair/1.0.0: resolution: {integrity: sha512-E7QQoM+3jvNtlmyfqRZ0/U75VFgCls+fSkbml2MpgWkWyz3ox8Y58gNhfuziuQYGNNQAbFZJQck55LHCnCK6CA==} @@ -10693,7 +11820,11 @@ packages: engines: {node: '>=10.5.0'} dev: true - /node-fetch/2.6.11_oawau75ow7jz373yzwkw5fs4ry: + /node-fetch-native/1.1.0: + resolution: {integrity: sha512-nl5goFCig93JZ9FIV8GHT9xpNqXbxQUzkOmKIMKmncsBH9jhg7qKex8hirpymkBFmNQ114chEEG5lS4wgK2I+Q==} + dev: true + + /node-fetch/2.6.11: resolution: {integrity: sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==} engines: {node: 4.x || >=6.0.0} peerDependencies: @@ -10703,6 +11834,17 @@ packages: optional: true dependencies: whatwg-url: 5.0.0 + + /node-fetch/2.6.7_3wcp6bao3dfksocwsfev5pt7km: + resolution: {integrity: sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + dependencies: + whatwg-url: 5.0.0 patched: true /node-fetch/3.3.1: @@ -11039,6 +12181,12 @@ packages: set-blocking: 2.0.0 dev: true + /nth-check/2.1.1: + resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} + dependencies: + boolbase: 1.0.0 + dev: true + /number-is-nan/1.0.1: resolution: {integrity: sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==} engines: {node: '>=0.10.0'} @@ -11078,6 +12226,10 @@ packages: resolution: {integrity: sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==} dev: true + /ohash/1.1.2: + resolution: {integrity: sha512-9CIOSq5945rI045GFtcO3uudyOkYVY1nyfFxVQp+9BRgslr8jPNiSSrsFGg/BNTUFOLqx0P5tng6G32brIPw0w==} + dev: true + /on-finished/2.3.0: resolution: {integrity: sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==} engines: {node: '>= 0.8'} @@ -11455,6 +12607,17 @@ packages: just-diff-apply: 5.4.1 dev: true + /parse-entities/2.0.0: + resolution: {integrity: sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==} + dependencies: + character-entities: 1.2.4 + character-entities-legacy: 1.1.4 + character-reference-invalid: 1.1.4 + is-alphanumerical: 1.0.4 + is-decimal: 1.0.4 + is-hexadecimal: 1.0.4 + dev: true + /parse-help/1.0.0: resolution: {integrity: sha512-dlOrbBba6Rrw/nrJ+V7/vkGZdiimWJQzMHZZrYsUq03JE8AV3fAv6kOYX7dP/w2h67lIdmRf8ES8mU44xAgE/Q==} engines: {node: '>=4'} @@ -11552,12 +12715,24 @@ packages: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} + /pathe/1.1.0: + resolution: {integrity: sha512-ODbEPR0KKHqECXW1GoxdDb+AZvULmXjVPy4rt+pGo2+TnjJTIPJQSVS6N63n8T2Ip+syHhbn52OewKicV0373w==} + dev: true + + /pathval/1.1.1: + resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} + dev: true + /pause-stream/0.0.11: resolution: {integrity: sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==} dependencies: through: 2.3.8 dev: true + /perfect-debounce/0.1.3: + resolution: {integrity: sha512-NOT9AcKiDGpnV/HBhI22Str++XWcErO/bALvHCuhv33owZW/CjH8KAFLZDCmu3727sihe0wTxpDhyGc6M8qacQ==} + dev: true + /pg-connection-string/2.5.0: resolution: {integrity: sha512-r5o/V/ORTA6TmUnyWZR9nCj1klXCO2CEKNRlVuJptZe85QuhFayC7WeMic7ndayT5IRIR0S0xFxFi2ousartlQ==} @@ -11705,6 +12880,14 @@ packages: dependencies: find-up: 4.1.0 + /pkg-types/1.0.3: + resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==} + dependencies: + jsonc-parser: 3.2.0 + mlly: 1.2.0 + pathe: 1.1.0 + dev: true + /pkg-up/3.1.0: resolution: {integrity: sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==} engines: {node: '>=8'} @@ -11727,6 +12910,23 @@ packages: engines: {node: '>=4'} dev: true + /postcss-selector-parser/6.0.12: + resolution: {integrity: sha512-NdxGCAZdRrwVI1sy59+Wzrh+pMMHxapGnpfenDVlMEXoOcvt4pGE0JLK9YY2F5dLxcFYA/YbVQKhcGU+FtSYQg==} + engines: {node: '>=4'} + dependencies: + cssesc: 3.0.0 + util-deprecate: 1.0.2 + dev: true + + /postcss/8.4.23: + resolution: {integrity: sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.6 + picocolors: 1.0.0 + source-map-js: 1.0.2 + dev: true + /postgres-array/2.0.0: resolution: {integrity: sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==} engines: {node: '>=4'} @@ -11803,8 +13003,8 @@ packages: fast-diff: 1.2.0 dev: true - /prettier/2.8.8: - resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} + /prettier/2.8.3: + resolution: {integrity: sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw==} engines: {node: '>=10.13.0'} hasBin: true dev: true @@ -11814,6 +13014,29 @@ packages: engines: {node: '>=6'} dev: true + /pretty-bytes/6.1.0: + resolution: {integrity: sha512-Rk753HI8f4uivXi4ZCIYdhmG1V+WKzvRMg/X+M42a6t7D07RcmopXJMDNk6N++7Bl75URRGsb40ruvg7Hcp2wQ==} + engines: {node: ^14.13.1 || >=16.0.0} + dev: true + + /pretty-format/27.5.1: + resolution: {integrity: sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + ansi-regex: 5.0.1 + ansi-styles: 5.2.0 + react-is: 17.0.2 + dev: true + + /pretty-format/29.4.3: + resolution: {integrity: sha512-cvpcHTc42lcsvOOAzd3XuNWTcvk1Jmnzqeu+WsOuiPmxUJTnkbAcFNsRKvEpBEUFVUgy/GTZLulZDcDEi+CIlA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/schemas': 29.4.3 + ansi-styles: 5.2.0 + react-is: 18.2.0 + dev: true + /pretty-format/29.5.0: resolution: {integrity: sha512-V2mGkI31qdttvTFX7Mt4efOqHXqJWMu4/r66Xh3Z3BwZaPfPJgp6/gbwoujRpPUtfEF6AUUWx3Jim3GCw5g/Qw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -11985,6 +13208,18 @@ packages: strip-json-comments: 2.0.1 dev: true + /rc9/2.1.0: + resolution: {integrity: sha512-ROO9bv8PPqngWKoiUZU3JDQ4sugpdRs9DfwHnzDSxK25XtQn6BEHL6EOd/OtKuDT2qodrtNR+0WkPT6l0jxH5Q==} + dependencies: + defu: 6.1.2 + destr: 1.2.2 + flat: 5.0.2 + dev: true + + /react-is/17.0.2: + resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==} + dev: true + /react-is/18.2.0: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} dev: true @@ -12161,6 +13396,11 @@ packages: resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==} dev: true + /regexp-tree/0.1.27: + resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==} + hasBin: true + dev: true + /regexp.prototype.flags/1.4.3: resolution: {integrity: sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==} engines: {node: '>= 0.4'} @@ -12169,6 +13409,11 @@ packages: define-properties: 1.1.4 functions-have-names: 1.2.3 + /regexpp/3.2.0: + resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==} + engines: {node: '>=8'} + dev: true + /registry-auth-token/3.4.0: resolution: {integrity: sha512-4LM6Fw8eBQdwMYcES4yTnn2TqIasbXuwDx3um+QRs7S55aMKCBKBxvPXl2RiUjHwuJLTyYfxSpmfSAjQpcuP+A==} dependencies: @@ -12197,6 +13442,13 @@ packages: rc: 1.2.8 dev: true + /regjsparser/0.9.1: + resolution: {integrity: sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==} + hasBin: true + dependencies: + jsesc: 0.5.0 + dev: true + /remove-trailing-separator/1.1.0: resolution: {integrity: sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==} dev: true @@ -12266,6 +13518,15 @@ packages: path-parse: 1.0.7 dev: true + /resolve/1.22.1: + resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==} + hasBin: true + dependencies: + is-core-module: 2.11.0 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + dev: true + /resolve/1.22.2: resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==} hasBin: true @@ -12323,6 +13584,14 @@ packages: dependencies: glob: 7.2.3 + /rimraf/4.4.1: + resolution: {integrity: sha512-Gk8NlF062+T9CqNGn6h4tls3k6T1+/nXdOcSZVikNVtlRdYpA7wRJJMoXmuvOnLW844rPjdQ7JgXCYM6PPC/og==} + engines: {node: '>=14'} + hasBin: true + dependencies: + glob: 9.3.5 + dev: true + /roarr/2.15.4: resolution: {integrity: sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==} engines: {node: '>=8.0'} @@ -12335,6 +13604,28 @@ packages: sprintf-js: 1.1.2 dev: true + /rollup-plugin-dts/5.3.0_enlefojnmpwsbnjrufommarvom: + resolution: {integrity: sha512-8FXp0ZkyZj1iU5klkIJYLjIq/YZSwBoERu33QBDxm/1yw5UU4txrEtcmMkrq+ZiKu3Q4qvPCNqc3ovX6rjqzbQ==} + engines: {node: '>=v14'} + peerDependencies: + rollup: ^3.0.0 + typescript: ^4.1 || ^5.0 + dependencies: + magic-string: 0.30.0 + rollup: 3.21.3 + typescript: 5.0.4 + optionalDependencies: + '@babel/code-frame': 7.21.4 + dev: true + + /rollup/3.21.3: + resolution: {integrity: sha512-VnPfEG51nIv2xPLnZaekkuN06q9ZbnyDcLkaBdJa/W7UddyhOfMP2yOPziYQfeY7k++fZM8FdQIummFN5y14kA==} + engines: {node: '>=14.18.0', npm: '>=8.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.2 + dev: true + /root-check/1.0.0: resolution: {integrity: sha512-lt1ts72QmU7jh1DlOJqFN/le/aiRGAbchSSMhNpLQubDWPEOe0YKCcrhprkgyMxxFAcrEhyfTTUfc+Dj/bo4JA==} engines: {node: '>=0.10.0'} @@ -12383,6 +13674,12 @@ packages: get-intrinsic: 1.2.0 is-regex: 1.1.4 + /safe-regex/2.1.1: + resolution: {integrity: sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==} + dependencies: + regexp-tree: 0.1.27 + dev: true + /safer-buffer/2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} @@ -12395,8 +13692,8 @@ packages: dev: false optional: true - /schema-utils/3.3.0: - resolution: {integrity: sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==} + /schema-utils/3.1.2: + resolution: {integrity: sha512-pvjEHOgWc9OWA/f/DE3ohBWTD6EleVLf7iFUkoSwAxttdBhB9QUebQgxER2kWueOvRJXPHNnyrvvh9eZINB8Eg==} engines: {node: '>= 10.13.0'} dependencies: '@types/json-schema': 7.0.11 @@ -12409,6 +13706,10 @@ packages: engines: {node: '>=8'} dev: true + /scule/1.0.0: + resolution: {integrity: sha512-4AsO/FrViE/iDNEPaAQlb77tf0csuq27EsVpy6ett584EcRTp6pTDLoGWVxCD77y5iU5FauOvhsI4o1APwPoSQ==} + dev: true + /semver-compare/1.0.0: resolution: {integrity: sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==} dev: true @@ -12555,6 +13856,10 @@ packages: resolution: {integrity: sha512-Wv6BjQ5zbhW7VFefWusVP33T/EM0vYikCaQ2qR8yULbsilAT8/wQaXvuQ3ptGLpoKx+lihJE3y2UTgKDyyNHZQ==} dev: false + /siginfo/2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + dev: true + /signal-exit/3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} @@ -12575,8 +13880,8 @@ packages: - supports-color dev: true - /simple-statistics/7.8.3: - resolution: {integrity: sha512-JFvMY00t6SBGtwMuJ+nqgsx9ylkMiJ5JlK9bkj8AdvniIe5615wWQYkKHXe84XtSuc40G/tlrPu0A5/NlJvv8A==} + /simple-statistics/7.8.2: + resolution: {integrity: sha512-evB7wiL4DSz6T9TdCTfRRqNcmnp0bllcUfZ4NBwtkdGMbXrYsZbrGxfunLPqdqCyT2Yz1NvLrKS7LVOoFBCxbA==} dev: true /sisteransi/1.0.5: @@ -12670,6 +13975,11 @@ packages: dot-prop: 5.3.0 dev: true + /source-map-js/1.0.2: + resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} + engines: {node: '>=0.10.0'} + dev: true + /source-map-support/0.5.13: resolution: {integrity: sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==} dependencies: @@ -12708,7 +14018,7 @@ packages: resolution: {integrity: sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==} dependencies: spdx-expression-parse: 3.0.1 - spdx-license-ids: 3.0.13 + spdx-license-ids: 3.0.12 /spdx-exceptions/2.3.0: resolution: {integrity: sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==} @@ -12717,10 +14027,10 @@ packages: resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} dependencies: spdx-exceptions: 2.3.0 - spdx-license-ids: 3.0.13 + spdx-license-ids: 3.0.12 - /spdx-license-ids/3.0.13: - resolution: {integrity: sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==} + /spdx-license-ids/3.0.12: + resolution: {integrity: sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==} /split/0.3.3: resolution: {integrity: sha512-wD2AeVmxXRBoX44wAycgjVpMhvbwdI2aZjCkvfNcH1YqHQvJVa1duWc73OyVGJUc05fhFaTZeQ/PYsrmyH0JVA==} @@ -12744,8 +14054,8 @@ packages: engines: {node: '>=14'} dev: true - /sqlite-async/1.2.0: - resolution: {integrity: sha512-gx9DUUA2UZzz/8Mh3qdA3RtTm8aJuF7dZgFdZ43WB29Iswdsp0KmPtem/2QDW8K4CrajR8yQ+gEniSFgolNscQ==} + /sqlite-async/1.1.3: + resolution: {integrity: sha512-C71fZoTO7u355bTONhq9ncj4Ged3pXM0Un7oCDnrsCu7BPzITrCqTANP99XD7b6uGz4fY+RdgSPF/zVS7Iy9Tg==} dependencies: sqlite3: 5.1.2 transitivePeerDependencies: @@ -12805,6 +14115,10 @@ packages: escape-string-regexp: 2.0.0 dev: true + /stackback/0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + dev: true + /stacktrace-parser/0.1.10: resolution: {integrity: sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg==} engines: {node: '>=6'} @@ -12822,6 +14136,10 @@ packages: engines: {node: '>= 0.6'} dev: true + /std-env/3.3.2: + resolution: {integrity: sha512-uUZI65yrV2Qva5gqE0+A7uVAvO40iPo6jGhs7s8keRfHCmtg+uB2X6EiLGCI9IgL1J17xGhvoOqSz79lzICPTA==} + dev: true + /stoppable/1.1.0: resolution: {integrity: sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==} engines: {node: '>=4', npm: '>=6'} @@ -13011,6 +14329,12 @@ packages: engines: {node: '>=8'} dev: true + /strip-literal/1.0.1: + resolution: {integrity: sha512-QZTsipNpa2Ppr6v1AmJHESqJ3Uz247MUS0OjrnnZjFAvEoWqxuyFuXn2xLgMtRnijJShAa1HL0gtJyUs7u7n3Q==} + dependencies: + acorn: 8.8.2 + dev: true + /strnum/1.0.5: resolution: {integrity: sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==} dev: false @@ -13183,7 +14507,15 @@ packages: supports-hyperlinks: 2.3.0 dev: false - /terser-webpack-plugin/5.3.8_webpack@5.87.0: + /terminal-link/3.0.0: + resolution: {integrity: sha512-flFL3m4wuixmf6IfhFJd1YPiLiMuxEc8uHRM1buzIeZPm22Au2pDqBJQgdo7n1WfPU1ONFGv7YDwpFBmHGF6lg==} + engines: {node: '>=12'} + dependencies: + ansi-escapes: 5.0.0 + supports-hyperlinks: 2.3.0 + dev: true + + /terser-webpack-plugin/5.3.8_webpack@5.84.0: resolution: {integrity: sha512-WiHL3ElchZMsK27P8uIUh4604IgJyAW47LVXGbEoB21DbQcZ+OuMpGjVYnEUaqcWM6dO8uS2qUbA7LSCWqvsbg==} engines: {node: '>= 10.13.0'} peerDependencies: @@ -13201,10 +14533,10 @@ packages: dependencies: '@jridgewell/trace-mapping': 0.3.17 jest-worker: 27.5.1 - schema-utils: 3.3.0 + schema-utils: 3.1.2 serialize-javascript: 6.0.1 terser: 5.17.4 - webpack: 5.87.0 + webpack: 5.84.0 dev: true /terser/5.17.4: @@ -13240,11 +14572,30 @@ packages: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} dev: true + /time-zone/1.0.0: + resolution: {integrity: sha512-TIsDdtKo6+XrPtiTm1ssmMngN1sAhyKnTO2kunQWqNPWIVvCm15Wmw4SWInwTVgJ5u/Tr04+8Ei9TNcw4x4ONA==} + engines: {node: '>=4'} + dev: true + /timed-out/4.0.1: resolution: {integrity: sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA==} engines: {node: '>=0.10.0'} dev: true + /tinybench/2.5.0: + resolution: {integrity: sha512-kRwSG8Zx4tjF9ZiyH4bhaebu+EDz1BOx9hOigYHlUW4xxI/wKIUQUqo018UlU4ar6ATPBsaMrdbKZ+tmPdohFA==} + dev: true + + /tinypool/0.5.0: + resolution: {integrity: sha512-paHQtnrlS1QZYKF/GnLoOM/DN9fqaGOFbCbxzAhwniySnzl9Ebk8w73/dd34DAhe/obUbPAOldTyYXQZxnPBPQ==} + engines: {node: '>=14.0.0'} + dev: true + + /tinyspy/2.1.0: + resolution: {integrity: sha512-7eORpyqImoOvkQJCSkL0d0mB4NHHIFAy4b1u8PHdDa7SjGS2njzl6/lyGoZLm+eyYEtlUmFGE0rFj66SWxZgQQ==} + engines: {node: '>=14.0.0'} + dev: true + /titleize/2.1.0: resolution: {integrity: sha512-m+apkYlfiQTKLW+sI4vqUkwMEzfgEUEYSqljx1voUE3Wz/z1ZsxyzSxvH2X8uKVrOp7QkByWt0rA6+gvhCKy6g==} engines: {node: '>=6'} @@ -13320,7 +14671,7 @@ packages: engines: {node: '>=8'} dev: true - /ts-node/10.9.1_5cbqh36kzuqel5avofcbl5rwvu: + /ts-node/10.9.1_dpfsgaqzs6ay6fyiel2y4blik4: resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -13335,12 +14686,12 @@ packages: optional: true dependencies: '@cspotcode/source-map-support': 0.8.1 - '@swc/core': 1.3.64 + '@swc/core': 1.2.204 '@tsconfig/node10': 1.0.9 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.3 - '@types/node': 18.16.16 + '@types/node': 18.16.14 acorn: 8.8.2 acorn-walk: 8.2.0 arg: 4.1.3 @@ -13352,7 +14703,7 @@ packages: yn: 3.1.1 dev: true - /ts-node/10.9.1_gbfmtwj2t57hq5iibp7xw5qwjq: + /ts-node/10.9.1_gedhic2hxbm43qfqfkboxjwb3y: resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -13367,11 +14718,12 @@ packages: optional: true dependencies: '@cspotcode/source-map-support': 0.8.1 + '@swc/core': 1.3.32 '@tsconfig/node10': 1.0.9 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.3 - '@types/node': 18.16.16 + '@types/node': 18.16.14 acorn: 8.8.2 acorn-walk: 8.2.0 arg: 4.1.3 @@ -13383,7 +14735,7 @@ packages: yn: 3.1.1 dev: true - /ts-node/10.9.1_l26xbtqzhteigi5cpzp2eyiyva: + /ts-node/10.9.1_ja6kqa52slkljcytwd5yeactma: resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -13398,12 +14750,11 @@ packages: optional: true dependencies: '@cspotcode/source-map-support': 0.8.1 - '@swc/core': 1.2.204 '@tsconfig/node10': 1.0.9 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.3 - '@types/node': 18.16.16 + '@types/node': 18.16.14 acorn: 8.8.2 acorn-walk: 8.2.0 arg: 4.1.3 @@ -13461,6 +14812,17 @@ packages: typescript: 4.9.5 dev: true + /tsx/3.12.7: + resolution: {integrity: sha512-C2Ip+jPmqKd1GWVQDvz/Eyc6QJbGfE7NrR3fx5BpEHMZsEHoIxHL1j+lKdGobr8ovEyqeNkPLSKp6SCSOt7gmw==} + hasBin: true + dependencies: + '@esbuild-kit/cjs-loader': 2.4.2 + '@esbuild-kit/core-utils': 3.1.0 + '@esbuild-kit/esm-loader': 2.5.5 + optionalDependencies: + fsevents: 2.3.2 + dev: true + /tty-browserify/0.0.1: resolution: {integrity: sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==} dev: true @@ -13545,6 +14907,11 @@ packages: resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} engines: {node: '>=8'} + /type-fest/1.4.0: + resolution: {integrity: sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==} + engines: {node: '>=10'} + dev: true + /type-is/1.6.18: resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} engines: {node: '>= 0.6'} @@ -13582,10 +14949,8 @@ packages: hasBin: true dev: true - /typescript/5.1.3: - resolution: {integrity: sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==} - engines: {node: '>=14.17'} - hasBin: true + /ufo/1.1.1: + resolution: {integrity: sha512-MvlCc4GHrmZdAllBc0iUDowff36Q9Ndw/UzqmEKyrfSzokTd9ZCy1i+IIk5hrYKkjoYVQyNbrw7/F8XJ2rEwTg==} dev: true /unbox-primitive/1.0.2: @@ -13596,8 +14961,42 @@ packages: has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 - /undici/5.22.1: - resolution: {integrity: sha512-Ji2IJhFXZY0x/0tVBXeQwgPlLWw13GVzpsWPQ3rV50IFMMof2I55PZZxtm4P6iNq+L5znYN9nSTAq0ZyE6lSJw==} + /unbuild/1.2.0: + resolution: {integrity: sha512-GcolNMBatav7FbRdLDR8BMbnYWMoKfxXdJIHibpBtx3GERN4GbbUD5h4RfGIFi+mjWPz4AphSz5gIg9FWNWw3Q==} + hasBin: true + dependencies: + '@rollup/plugin-alias': 4.0.4_rollup@3.21.3 + '@rollup/plugin-commonjs': 24.1.0_rollup@3.21.3 + '@rollup/plugin-json': 6.0.0_rollup@3.21.3 + '@rollup/plugin-node-resolve': 15.0.2_rollup@3.21.3 + '@rollup/plugin-replace': 5.0.2_rollup@3.21.3 + '@rollup/pluginutils': 5.0.2_rollup@3.21.3 + chalk: 5.2.0 + consola: 2.15.3 + defu: 6.1.2 + esbuild: 0.17.18 + globby: 13.1.3 + hookable: 5.5.3 + jiti: 1.18.2 + magic-string: 0.30.0 + mkdist: 1.2.0_typescript@5.0.4 + mlly: 1.2.0 + mri: 1.2.0 + pathe: 1.1.0 + pkg-types: 1.0.3 + pretty-bytes: 6.1.0 + rollup: 3.21.3 + rollup-plugin-dts: 5.3.0_enlefojnmpwsbnjrufommarvom + scule: 1.0.0 + typescript: 5.0.4 + untyped: 1.3.2 + transitivePeerDependencies: + - sass + - supports-color + dev: true + + /undici/5.22.0: + resolution: {integrity: sha512-fR9RXCc+6Dxav4P9VV/sp5w3eFiSdOjJYsbtWfd4s5L5C4ogyuVpdKIVHeW0vV1MloM65/f7W45nR9ZxwVdyiA==} engines: {node: '>=14.0'} dependencies: busboy: 1.6.0 @@ -13649,6 +15048,12 @@ packages: dependencies: crypto-random-string: 2.0.0 + /unist-util-stringify-position/2.0.3: + resolution: {integrity: sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==} + dependencies: + '@types/unist': 2.0.6 + dev: true + /universal-user-agent/6.0.0: resolution: {integrity: sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==} dev: true @@ -13672,6 +15077,21 @@ packages: engines: {node: '>=8'} dev: true + /untyped/1.3.2: + resolution: {integrity: sha512-z219Z65rOGD6jXIvIhpZFfwWdqQckB8sdZec2NO+TkcH1Bph7gL0hwLzRJs1KsOo4Jz4mF9guBXhsEnyEBGVfw==} + hasBin: true + dependencies: + '@babel/core': 7.21.8 + '@babel/standalone': 7.21.8 + '@babel/types': 7.21.5 + defu: 6.1.2 + jiti: 1.18.2 + mri: 1.2.0 + scule: 1.0.0 + transitivePeerDependencies: + - supports-color + dev: true + /unzip-response/2.0.1: resolution: {integrity: sha512-N0XH6lqDtFH84JxptQoZYmloF4nzrQqqrAymNj+/gW60AO2AZgOcf4O/nUXJcYfyQkqvMo9lSupBZmmgvuVXlw==} engines: {node: '>=4'} @@ -13768,10 +15188,6 @@ packages: resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} hasBin: true - /uuid/9.0.0: - resolution: {integrity: sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==} - hasBin: true - /v8-compile-cache-lib/3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} dev: true @@ -13846,6 +15262,143 @@ packages: replace-ext: 1.0.1 dev: true + /vite-node/0.31.1_@types+node@18.16.14: + resolution: {integrity: sha512-BajE/IsNQ6JyizPzu9zRgHrBwczkAs0erQf/JRpgTIESpKvNj9/Gd0vxX905klLkb0I0SJVCKbdrl5c6FnqYKA==} + engines: {node: '>=v14.18.0'} + hasBin: true + dependencies: + cac: 6.7.14 + debug: 4.3.4 + mlly: 1.2.0 + pathe: 1.1.0 + picocolors: 1.0.0 + vite: 4.3.4_@types+node@18.16.14 + transitivePeerDependencies: + - '@types/node' + - less + - sass + - stylus + - sugarss + - supports-color + - terser + dev: true + + /vite/4.3.4_@types+node@18.16.14: + resolution: {integrity: sha512-f90aqGBoxSFxWph2b39ae2uHAxm5jFBBdnfueNxZAT1FTpM13ccFQExCaKbR2xFW5atowjleRniQ7onjJ22QEg==} + engines: {node: ^14.18.0 || >=16.0.0} + hasBin: true + peerDependencies: + '@types/node': '>= 14' + less: '*' + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + '@types/node': 18.16.14 + esbuild: 0.17.19 + postcss: 8.4.23 + rollup: 3.21.3 + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /vitest/0.31.1: + resolution: {integrity: sha512-/dOoOgzoFk/5pTvg1E65WVaobknWREN15+HF+0ucudo3dDG/vCZoXTQrjIfEaWvQXmqScwkRodrTbM/ScMpRcQ==} + engines: {node: '>=v14.18.0'} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@vitest/browser': '*' + '@vitest/ui': '*' + happy-dom: '*' + jsdom: '*' + playwright: '*' + safaridriver: '*' + webdriverio: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + playwright: + optional: true + safaridriver: + optional: true + webdriverio: + optional: true + dependencies: + '@types/chai': 4.3.5 + '@types/chai-subset': 1.3.3 + '@types/node': 18.16.14 + '@vitest/expect': 0.31.1 + '@vitest/runner': 0.31.1 + '@vitest/snapshot': 0.31.1 + '@vitest/spy': 0.31.1 + '@vitest/utils': 0.31.1 + acorn: 8.8.2 + acorn-walk: 8.2.0 + cac: 6.7.14 + chai: 4.3.7 + concordance: 5.0.4 + debug: 4.3.4 + local-pkg: 0.4.3 + magic-string: 0.30.0 + pathe: 1.1.0 + picocolors: 1.0.0 + std-env: 3.3.2 + strip-literal: 1.0.1 + tinybench: 2.5.0 + tinypool: 0.5.0 + vite: 4.3.4_@types+node@18.16.14 + vite-node: 0.31.1_@types+node@18.16.14 + why-is-node-running: 2.2.2 + transitivePeerDependencies: + - less + - sass + - stylus + - sugarss + - supports-color + - terser + dev: true + + /vue-eslint-parser/9.2.0_eslint@8.41.0: + resolution: {integrity: sha512-aFXipsUbKU4TzgP9OU6cXIm2Nnp9ryKJc2mzY0s2xzwfjHg6WDT33LUAQRGR9K0NFncBgUEZ2njdrS3Lj/sOLw==} + engines: {node: ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '>=6.0.0' + dependencies: + debug: 4.3.4 + eslint: 8.41.0 + eslint-scope: 7.2.0 + eslint-visitor-keys: 3.4.1 + espree: 9.5.2 + esquery: 1.5.0 + lodash: 4.17.21 + semver: 7.5.1 + transitivePeerDependencies: + - supports-color + dev: true + /walk-up-path/1.0.0: resolution: {integrity: sha512-hwj/qMDUEjCU5h0xr90KGCf0tg0/LgJbmOWgrWKYlcJZM7XvquvUJZ0G/HMGr7F7OQMOUuPHWP9JpriinkAlkg==} dev: true @@ -13893,8 +15446,8 @@ packages: engines: {node: '>=10.13.0'} dev: true - /webpack/5.87.0: - resolution: {integrity: sha512-GOu1tNbQ7p1bDEoFRs2YPcfyGs8xq52yyPBZ3m2VGnXGtV9MxjrkABHm4V9Ia280OefsSLzvbVoXcfLxjKY/Iw==} + /webpack/5.84.0: + resolution: {integrity: sha512-XezNK3kwJq6IyeoZmZ1uEqQs+42nTqIi4jYM/YjLwaJedUC1N3bwnCC0+UcnHJPfqWX0kGrQnMIvZZyWYaIZrA==} engines: {node: '>=10.13.0'} hasBin: true peerDependencies: @@ -13912,7 +15465,7 @@ packages: acorn-import-assertions: 1.9.0_acorn@8.8.2 browserslist: 4.21.4 chrome-trace-event: 1.0.3 - enhanced-resolve: 5.15.0 + enhanced-resolve: 5.14.1 es-module-lexer: 1.2.1 eslint-scope: 5.1.1 events: 3.3.0 @@ -13922,9 +15475,9 @@ packages: loader-runner: 4.3.0 mime-types: 2.1.35 neo-async: 2.6.2 - schema-utils: 3.3.0 + schema-utils: 3.1.2 tapable: 2.2.1 - terser-webpack-plugin: 5.3.8_webpack@5.87.0 + terser-webpack-plugin: 5.3.8_webpack@5.84.0 watchpack: 2.4.0 webpack-sources: 3.2.3 transitivePeerDependencies: @@ -13938,6 +15491,11 @@ packages: hasBin: true dev: true + /well-known-symbols/2.0.0: + resolution: {integrity: sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q==} + engines: {node: '>=6'} + dev: true + /whatwg-url/11.0.0: resolution: {integrity: sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==} engines: {node: '>=12'} @@ -14002,6 +15560,15 @@ packages: isexe: 2.0.0 dev: true + /why-is-node-running/2.2.2: + resolution: {integrity: sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==} + engines: {node: '>=8'} + hasBin: true + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + dev: true + /wide-align/1.1.5: resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} dependencies: @@ -14079,6 +15646,11 @@ packages: engines: {node: '>=8'} dev: true + /xml-name-validator/4.0.0: + resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} + engines: {node: '>=12'} + dev: true + /xml/1.0.1: resolution: {integrity: sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw==} dev: true @@ -14103,6 +15675,15 @@ packages: /yallist/4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + /yaml-eslint-parser/1.2.0: + resolution: {integrity: sha512-OmuvQd5lyIJWfFALc39K5fGqp0aWNc+EtyhVgcQIPZaUKMnTb7An3RMp+QJizJ/x0F4kpgTNe6BL/ctdvoIwIg==} + engines: {node: ^14.17.0 || >=16.0.0} + dependencies: + eslint-visitor-keys: 3.4.1 + lodash: 4.17.21 + yaml: 2.2.2 + dev: true + /yaml/2.2.2: resolution: {integrity: sha512-CBKFWExMn46Foo4cldiChEzn7S7SRV+wqiluAb6xmueD/fGyRHIhX8m14vVGgeFWjN540nKCNVj6P21eQjgTuA==} engines: {node: '>= 14'} @@ -14346,7 +15927,7 @@ packages: dependencies: '@types/fs-extra': 11.0.1 '@types/minimist': 1.2.2 - '@types/node': 18.16.16 + '@types/node': 18.16.14 '@types/ps-tree': 1.1.2 '@types/which': 3.0.0 chalk: 5.2.0 diff --git a/scripts/ci/publish.ts b/scripts/ci/publish.ts index 295019ef91d0..9c0900d70689 100644 --- a/scripts/ci/publish.ts +++ b/scripts/ci/publish.ts @@ -810,12 +810,12 @@ async function testPackages(packages: Packages, publishOrder: string[][]): Promi if (process.env.BUILDKITE_PARALLEL_JOB === '0') { await run( path.dirname(pkg.path), - 'PRISMA_CLIENT_ENGINE_TYPE="library" PRISMA_CLI_QUERY_ENGINE_TYPE="library" pnpm run test --silent', + 'PRISMA_CLIENT_ENGINE_TYPE="library" PRISMA_CLI_QUERY_ENGINE_TYPE="library" pnpm run test', ) } else if (process.env.BUILDKITE_PARALLEL_JOB === '1') { await run( path.dirname(pkg.path), - 'PRISMA_CLIENT_ENGINE_TYPE="binary" PRISMA_CLI_QUERY_ENGINE_TYPE="binary" pnpm run test --silent', + 'PRISMA_CLIENT_ENGINE_TYPE="binary" PRISMA_CLI_QUERY_ENGINE_TYPE="binary" pnpm run test', ) } else { await run(path.dirname(pkg.path), 'pnpm run test') diff --git a/tsconfig.build.bundle.json b/tsconfig.build.bundle.json index 85dd42c8189c..e5950b38153e 100644 --- a/tsconfig.build.bundle.json +++ b/tsconfig.build.bundle.json @@ -3,6 +3,7 @@ "extends": "./tsconfig.build.regular.json", "compilerOptions": { "paths": { + "@prisma/ni": ["./packages/ni/src"], "@prisma/client": ["./packages/client/src"], "@prisma/client/runtime": ["./packages/client/runtime"], "@prisma/internals": ["./packages/internals/src"], From 7e24f1195ec4c198f77619af4b457fa8a6a8ad9f Mon Sep 17 00:00:00 2001 From: donutegg <123068288+donutegg@users.noreply.github.com> Date: Sat, 12 Aug 2023 19:44:35 +0100 Subject: [PATCH 2/2] Merge branch 'main' into renovate/env-paths-3.x --- .buildkite/publish/docker-compose.yml | 2 +- .buildkite/publish/publish.yml | 2 +- .buildkite/test/run.sh | 4 +- .github/renovate.json | 44 +- .github/workflows/test-template.yml | 41 +- README.md | 15 +- docker/README.md | 21 +- docker/docker-compose.arm64.yml | 11 - docker/docker-compose.yml | 6 +- .../plugins/fill-plugin/fillers/process.ts | 12 +- package.json | 22 +- packages/cli/README.md | 9 +- packages/cli/package.json | 12 +- packages/cli/src/Studio.ts | 17 +- packages/client/README.md | 2 +- packages/client/extension.d.ts | 1 + packages/client/extension.js | 3 + .../helpers/functional-test/run-tests.ts | 16 +- packages/client/package.json | 34 +- packages/client/scripts/default-index.d.ts | 53 +- packages/client/scripts/default-index.js | 10 + .../errors/client-version-error/test.ts | 2 +- .../integration/errors/multi-schema/test.ts | 4 +- .../integration/happy/distinct/test.ts | 18 +- .../__snapshots__/test.ts.snap | 5054 ++++++++++------- .../__snapshots__/test.ts.snap | 4616 +++++++++------ .../src/__tests__/types/distinct/test.ts | 8 + .../client/src/generation/TSClient/Args.ts | 21 +- .../client/src/generation/TSClient/Count.ts | 11 +- .../client/src/generation/TSClient/Input.ts | 9 +- .../client/src/generation/TSClient/Model.ts | 172 +- .../client/src/generation/TSClient/Output.ts | 60 +- .../client/src/generation/TSClient/Payload.ts | 117 - .../src/generation/TSClient/PrismaClient.ts | 247 +- .../src/generation/TSClient/SelectInclude.ts | 33 +- .../client/src/generation/TSClient/common.ts | 51 +- .../client/src/generation/TSClient/helpers.ts | 13 +- .../generation/TSClient/utils/ifExtensions.ts | 9 - .../src/generation/ts-builders/Export.ts | 11 + .../src/generation/ts-builders/NamedType.ts | 8 - .../src/generation/ts-builders/ObjectType.ts | 7 + .../generation/ts-builders/PrimitiveType.ts | 1 + .../src/generation/ts-builders/helpers.ts | 14 + .../src/generation/ts-builders/index.ts | 1 + packages/client/src/generation/utils.ts | 44 +- .../src/generation/utils/buildDirname.ts | 5 +- packages/client/src/runtime/DataLoader.ts | 4 + packages/client/src/runtime/RequestHandler.ts | 113 +- .../compositeProxy/createCompositeProxy.ts | 10 +- .../core/compositeProxy/removeProperties.ts | 2 +- .../core/engines/binary/BinaryEngine.ts | 2 +- .../core/engines/common/types/JsonProtocol.ts | 2 +- .../core/engines/library/LibraryEngine.ts | 2 +- .../core/errorRendering/applyUnionError.ts | 143 + .../applyValidationError.test.ts | 67 +- .../errorRendering/applyValidationError.ts | 70 +- .../errors/PrismaClientInitializationError.ts | 2 + .../errors/PrismaClientKnownRequestError.ts | 3 +- .../core/errors/PrismaClientRustPanicError.ts | 3 +- .../src/runtime/core/extensions/$extends.ts | 77 +- .../core/extensions/MergedExtensionsList.ts | 43 +- .../core/extensions/applyQueryExtensions.ts | 74 +- .../core/extensions/getExtensionContext.ts | 7 +- .../src/runtime/core/model/applyModel.ts | 3 +- .../model/applyModelsAndClientExtensions.ts | 2 +- .../protocol/json/JsonProtocolEncoder.test.ts | 94 + .../core/protocol/json/JsonProtocolEncoder.ts | 2 +- .../core/protocol/json/serialize.test.ts | 3 +- .../runtime/core/protocol/json/serialize.ts | 2 +- .../client/src/runtime/core/public/index.ts | 9 + .../src/runtime/core/public/validator.ts | 18 + .../runtime/core/raw-query/RawQueryArgs.ts | 2 +- .../core/raw-query/rawCommandArgsMapper.ts | 3 + .../core/raw-query/rawQueryArgsMapper.ts | 172 +- .../core/request/createPrismaPromise.ts | 85 +- .../src/runtime/core/types/Extensions.ts | 231 +- .../src/runtime/core/types/GetResult.ts | 119 +- .../client/src/runtime/core/types/Payload.ts | 3 + .../client/src/runtime/core/types/Public.ts | 2 +- .../client/src/runtime/core/types/Utils.ts | 98 +- .../client/src/runtime/core/types/index.ts | 7 +- .../client/src/runtime/getPrismaClient.ts | 159 +- packages/client/src/runtime/index-browser.ts | 4 + packages/client/src/runtime/index.ts | 12 +- .../client/src/runtime/itxClientDenyList.ts | 5 + packages/client/src/runtime/query.ts | 2 +- .../client/src/runtime/utils/deepCloneArgs.ts | 82 + .../runtime/utils/mssqlPreparedStatement.ts | 6 +- .../e2e/bundler-detection-error/tests/main.ts | 20 - .../tests/e2e/default-version/_steps.ts | 17 + .../tests/e2e/default-version/package.json | 13 + .../tests/e2e/default-version/pnpm-lock.yaml | 36 + .../tests/e2e/default-version/readme.md | 3 + .../tests/e2e/default-version/tests/main.ts | 6 + .../tests/e2e/default-version/tsconfig.json | 4 + .../readme.md | 2 +- packages/client/tests/e2e/example/_steps.ts | 2 +- .../client/tests/e2e/example/package.json | 1 + .../tests/e2e/example/prisma/schema.prisma | 1 - .../client/tests/e2e/example/tsconfig.json | 2 +- .../19866-ts-composite-declaration/_steps.ts | 19 + .../package.json | 2 +- .../pnpm-lock.yaml | 55 + .../prisma/schema.prisma | 35 + .../19866-ts-composite-declaration/readme.md | 3 + .../src/index.ts | 7 + .../tsconfig.json | 9 + .../issues/studio-1128-spawn-enoent/_steps.ts | 32 + .../studio-1128-spawn-enoent/package.json | 10 + .../prisma/schema.prisma | 13 + .../issues/studio-1128-spawn-enoent/readme.md | 3 + .../studio-1128-spawn-enoent}/tsconfig.json | 0 packages/client/tests/e2e/jest.config.js | 1 + .../tests/vercel-auto-generate.ts | 2 +- .../publish-extensions/_steps.ts | 7 +- .../tests/e2e/publish-extensions/package.json | 15 + .../e2e/publish-extensions/pnpm-lock.yaml | 386 ++ .../publish-extensions/prisma/schema.prisma | 0 .../publish-extensions/readme.md | 2 +- .../simple-ext/package.json | 6 +- .../simple-ext/pnpm-lock.yaml | 48 + .../simple-ext/src/index.ts | 2 +- .../simple-ext/tsconfig.json | 0 .../tests/main.ts} | 12 +- .../e2e/publish-extensions/tsconfig.json | 4 + .../functional/_utils/setupFilesAfterEnv.ts | 15 +- .../functional/_utils/setupTestSuiteEnv.ts | 2 +- .../functional/_utils/setupTestSuiteMatrix.ts | 14 + .../client/tests/functional/batching/tests.ts | 11 + .../tests/functional/blog-update/tests.ts | 8 +- .../composites/selection/_matrix.ts | 9 + .../composites/selection/prisma/_schema.ts | 36 + .../functional/composites/selection/tests.ts | 109 + .../functional/decimal/precision/tests.ts | 2 + .../functional/default-selection/_matrix.ts | 2 + .../default-selection/prisma/_schema.ts | 3 +- .../extensions/__snapshots__/itx.ts.snap | 121 + .../{enabled => }/__snapshots__/tx.ts.snap | 36 +- .../tests/functional/extensions/_matrix.ts | 24 + .../extensions/{enabled => }/client.ts | 102 +- .../functional/extensions/defineExtension.ts | 667 +++ .../functional/extensions/disabled/tests.ts | 16 - .../enabled/__snapshots__/itx.ts.snap | 121 - .../extensions/enabled/defineExtension.ts | 400 -- .../extensions/{enabled => }/extends.ts | 5 + .../extensions/{enabled => }/itx.ts | 131 +- .../extensions/{enabled => }/model.ts | 30 +- .../{enabled/query-accelerate.ts => pdp.ts} | 130 +- .../{enabled => }/prisma/_schema.ts | 2 +- .../extensions/{enabled => }/query.ts | 187 +- .../extensions/{enabled => }/result.ts | 33 +- .../functional/extensions/{enabled => }/tx.ts | 28 + .../filter-count-relations/prisma/_schema.ts | 1 - .../11740-transaction-stored-query/tests.ts | 4 +- .../tests.ts | 6 +- .../tests/functional/issues/15044/tests.ts | 4 +- .../tests/functional/issues/15176/tests.ts | 2 +- .../15644-middleware-arg-types/_matrix.ts | 3 + .../15644-middleware-arg-types/tests.ts | 60 +- .../17405-extensions-casing}/_matrix.ts | 0 .../17405-extensions-casing/prisma/_schema.ts | 20 + .../issues/17405-extensions-casing/tests.ts | 24 + .../17948-tx-client-extensions}/_matrix.ts | 0 .../prisma/_schema.ts | 21 + .../17948-tx-client-extensions/tests.ts | 38 + .../issues/18276-batch-order/_matrix.ts | 21 + .../18276-batch-order/prisma/_schema.ts | 20 + .../issues/18276-batch-order/tests.ts | 77 + .../18854-extensions-db-null/_matrix.ts | 15 + .../prisma/_schema.ts | 2 + .../issues/18854-extensions-db-null/tests.ts | 33 + .../client/tests/functional/logging/tests.ts | 6 +- .../functional/methods/create-many/tests.ts | 14 +- .../methods/upsert/native-atomic/tests.ts | 14 +- .../functional/methods/upsert/simple/tests.ts | 4 +- .../functional/middleware-raw-args/_matrix.ts | 21 + .../middleware-raw-args/prisma/_schema.ts | 20 + .../functional/middleware-raw-args/tests.ts | 66 + .../tests/functional/multi-schema/tests.ts | 4 +- .../order-by-null/prisma/_schema.ts | 1 - .../query-validation/prisma/_schema.ts | 21 +- .../functional/query-validation/tests.ts | 465 +- .../tests_m-to-n-MongoDB.ts | 2 +- .../tests.ts | 2 +- .../tests/functional/validator/_matrix.ts | 9 + .../functional/validator/prisma/_schema.ts | 19 + .../tests/functional/validator/tests.ts | 180 + .../client/tests/functional/views/tests.ts | 8 +- packages/debug/package.json | 4 +- packages/engines/README.md | 2 +- packages/engines/package.json | 8 +- packages/engines/src/index.ts | 2 + packages/fetch-engine/package.json | 12 +- .../src/__tests__/binaryTarget/.gitkeep | 0 .../src/__tests__/checksum/.gitkeep | 0 .../src/__tests__/download.test.ts | 1193 ++-- packages/fetch-engine/src/download.ts | 16 +- packages/fetch-engine/src/downloadZip.ts | 65 +- packages/fetch-engine/src/getProxyAgent.ts | 12 +- packages/generator-helper/package.json | 6 +- packages/get-platform/package.json | 6 +- .../src/__tests__/getPlatform.test.ts | 2 +- packages/get-platform/src/getPlatform.ts | 2 +- packages/get-platform/src/platforms.ts | 4 + packages/instrumentation/README.md | 2 +- packages/instrumentation/package.json | 6 +- packages/integration-tests/package.json | 12 +- .../integration/sqlite/__database.ts | 2 +- packages/internals/package.json | 10 +- .../__snapshots__/getDmmf.test.ts.snap | 460 +- .../auto-installation/getPackageCmd.ts | 2 +- .../auto-installation/runPackageCmd.ts | 2 +- .../check-dependencies/isYarnUsed.ts | 2 +- .../prisma-client-js/prismaClientResolver.ts | 6 +- packages/internals/src/index.ts | 2 +- packages/internals/src/utils/max.test.ts | 23 + packages/internals/src/utils/max.ts | 28 + packages/internals/src/utils/maxBy.test.ts | 10 - packages/internals/src/utils/maxBy.ts | 16 - packages/migrate/README.md | 2 + packages/migrate/package.json | 15 +- .../src/utils/getSchemaPathAndPrint.ts | 2 +- .../package.json | 2 +- packages/ni/.gitignore | 85 - packages/ni/LICENSE | 21 - packages/ni/README.md | 5 - packages/ni/helpers/build.ts | 10 - packages/ni/package.json | 53 - packages/ni/src/agents.ts | 102 - packages/ni/src/commands/index.ts | 1 - packages/ni/src/commands/na.ts | 4 - packages/ni/src/commands/nci.ts | 7 - packages/ni/src/commands/ni.ts | 4 - packages/ni/src/commands/nlx.ts | 4 - packages/ni/src/commands/nr.ts | 95 - packages/ni/src/commands/nu.ts | 4 - packages/ni/src/commands/nun.ts | 4 - packages/ni/src/config.ts | 57 - packages/ni/src/detect.ts | 75 - packages/ni/src/fs.ts | 24 - packages/ni/src/index.ts | 6 - packages/ni/src/parse.ts | 84 - packages/ni/src/runner.ts | 109 - packages/ni/src/storage.ts | 31 - packages/ni/src/utils.ts | 91 - packages/ni/tsconfig.build.json | 7 - packages/ni/tsconfig.json | 3 - packages/react-prisma/package.json | 10 +- ...ch@2.6.7.patch => node-fetch@2.6.11.patch} | 10 +- pnpm-lock.yaml | 3782 ++++-------- scripts/ci/publish.ts | 4 +- tsconfig.build.bundle.json | 1 - 252 files changed, 13360 insertions(+), 10124 deletions(-) delete mode 100644 docker/docker-compose.arm64.yml create mode 100644 packages/client/extension.d.ts create mode 100644 packages/client/extension.js delete mode 100644 packages/client/src/generation/TSClient/Payload.ts delete mode 100644 packages/client/src/generation/TSClient/utils/ifExtensions.ts create mode 100644 packages/client/src/generation/ts-builders/helpers.ts create mode 100644 packages/client/src/runtime/core/errorRendering/applyUnionError.ts create mode 100644 packages/client/src/runtime/core/protocol/json/JsonProtocolEncoder.test.ts create mode 100644 packages/client/src/runtime/core/public/index.ts create mode 100644 packages/client/src/runtime/core/public/validator.ts create mode 100644 packages/client/src/runtime/core/raw-query/rawCommandArgsMapper.ts create mode 100644 packages/client/src/runtime/itxClientDenyList.ts create mode 100644 packages/client/src/runtime/utils/deepCloneArgs.ts create mode 100644 packages/client/tests/e2e/default-version/_steps.ts create mode 100644 packages/client/tests/e2e/default-version/package.json create mode 100644 packages/client/tests/e2e/default-version/pnpm-lock.yaml create mode 100644 packages/client/tests/e2e/default-version/readme.md create mode 100644 packages/client/tests/e2e/default-version/tests/main.ts create mode 100644 packages/client/tests/e2e/default-version/tsconfig.json create mode 100644 packages/client/tests/e2e/issues/19866-ts-composite-declaration/_steps.ts rename packages/client/tests/e2e/{community/publish-extensions => issues/19866-ts-composite-declaration}/package.json (82%) create mode 100644 packages/client/tests/e2e/issues/19866-ts-composite-declaration/pnpm-lock.yaml create mode 100644 packages/client/tests/e2e/issues/19866-ts-composite-declaration/prisma/schema.prisma create mode 100644 packages/client/tests/e2e/issues/19866-ts-composite-declaration/readme.md create mode 100644 packages/client/tests/e2e/issues/19866-ts-composite-declaration/src/index.ts create mode 100644 packages/client/tests/e2e/issues/19866-ts-composite-declaration/tsconfig.json create mode 100644 packages/client/tests/e2e/issues/studio-1128-spawn-enoent/_steps.ts create mode 100644 packages/client/tests/e2e/issues/studio-1128-spawn-enoent/package.json create mode 100644 packages/client/tests/e2e/issues/studio-1128-spawn-enoent/prisma/schema.prisma create mode 100644 packages/client/tests/e2e/issues/studio-1128-spawn-enoent/readme.md rename packages/client/tests/e2e/{community/publish-extensions => issues/studio-1128-spawn-enoent}/tsconfig.json (100%) rename packages/client/tests/e2e/{community => }/publish-extensions/_steps.ts (75%) create mode 100644 packages/client/tests/e2e/publish-extensions/package.json create mode 100644 packages/client/tests/e2e/publish-extensions/pnpm-lock.yaml rename packages/client/tests/e2e/{community => }/publish-extensions/prisma/schema.prisma (100%) rename packages/client/tests/e2e/{community => }/publish-extensions/readme.md (68%) rename packages/client/tests/e2e/{community => }/publish-extensions/simple-ext/package.json (59%) create mode 100644 packages/client/tests/e2e/publish-extensions/simple-ext/pnpm-lock.yaml rename packages/client/tests/e2e/{community => }/publish-extensions/simple-ext/src/index.ts (80%) rename packages/client/tests/e2e/{community => }/publish-extensions/simple-ext/tsconfig.json (100%) rename packages/client/tests/e2e/{community/publish-extensions/src/index.ts => publish-extensions/tests/main.ts} (52%) create mode 100644 packages/client/tests/e2e/publish-extensions/tsconfig.json create mode 100644 packages/client/tests/functional/composites/selection/_matrix.ts create mode 100644 packages/client/tests/functional/composites/selection/prisma/_schema.ts create mode 100644 packages/client/tests/functional/composites/selection/tests.ts create mode 100644 packages/client/tests/functional/extensions/__snapshots__/itx.ts.snap rename packages/client/tests/functional/extensions/{enabled => }/__snapshots__/tx.ts.snap (52%) create mode 100644 packages/client/tests/functional/extensions/_matrix.ts rename packages/client/tests/functional/extensions/{enabled => }/client.ts (66%) create mode 100644 packages/client/tests/functional/extensions/defineExtension.ts delete mode 100644 packages/client/tests/functional/extensions/disabled/tests.ts delete mode 100644 packages/client/tests/functional/extensions/enabled/__snapshots__/itx.ts.snap delete mode 100644 packages/client/tests/functional/extensions/enabled/defineExtension.ts rename packages/client/tests/functional/extensions/{enabled => }/extends.ts (82%) rename packages/client/tests/functional/extensions/{enabled => }/itx.ts (57%) rename packages/client/tests/functional/extensions/{enabled => }/model.ts (96%) rename packages/client/tests/functional/extensions/{enabled/query-accelerate.ts => pdp.ts} (50%) rename packages/client/tests/functional/extensions/{enabled => }/prisma/_schema.ts (88%) rename packages/client/tests/functional/extensions/{enabled => }/query.ts (82%) rename packages/client/tests/functional/extensions/{enabled => }/result.ts (83%) rename packages/client/tests/functional/extensions/{enabled => }/tx.ts (83%) rename packages/client/tests/functional/{extensions/disabled => issues/17405-extensions-casing}/_matrix.ts (100%) create mode 100644 packages/client/tests/functional/issues/17405-extensions-casing/prisma/_schema.ts create mode 100644 packages/client/tests/functional/issues/17405-extensions-casing/tests.ts rename packages/client/tests/functional/{extensions/enabled => issues/17948-tx-client-extensions}/_matrix.ts (100%) create mode 100644 packages/client/tests/functional/issues/17948-tx-client-extensions/prisma/_schema.ts create mode 100644 packages/client/tests/functional/issues/17948-tx-client-extensions/tests.ts create mode 100644 packages/client/tests/functional/issues/18276-batch-order/_matrix.ts create mode 100644 packages/client/tests/functional/issues/18276-batch-order/prisma/_schema.ts create mode 100644 packages/client/tests/functional/issues/18276-batch-order/tests.ts create mode 100644 packages/client/tests/functional/issues/18854-extensions-db-null/_matrix.ts rename packages/client/tests/functional/{extensions/disabled => issues/18854-extensions-db-null}/prisma/_schema.ts (87%) create mode 100644 packages/client/tests/functional/issues/18854-extensions-db-null/tests.ts create mode 100644 packages/client/tests/functional/middleware-raw-args/_matrix.ts create mode 100644 packages/client/tests/functional/middleware-raw-args/prisma/_schema.ts create mode 100644 packages/client/tests/functional/middleware-raw-args/tests.ts create mode 100644 packages/client/tests/functional/validator/_matrix.ts create mode 100644 packages/client/tests/functional/validator/prisma/_schema.ts create mode 100644 packages/client/tests/functional/validator/tests.ts create mode 100644 packages/fetch-engine/src/__tests__/binaryTarget/.gitkeep create mode 100644 packages/fetch-engine/src/__tests__/checksum/.gitkeep create mode 100644 packages/internals/src/utils/max.test.ts create mode 100644 packages/internals/src/utils/max.ts delete mode 100644 packages/internals/src/utils/maxBy.test.ts delete mode 100644 packages/internals/src/utils/maxBy.ts delete mode 100644 packages/ni/.gitignore delete mode 100644 packages/ni/LICENSE delete mode 100644 packages/ni/README.md delete mode 100644 packages/ni/helpers/build.ts delete mode 100644 packages/ni/package.json delete mode 100644 packages/ni/src/agents.ts delete mode 100644 packages/ni/src/commands/index.ts delete mode 100644 packages/ni/src/commands/na.ts delete mode 100644 packages/ni/src/commands/nci.ts delete mode 100644 packages/ni/src/commands/ni.ts delete mode 100644 packages/ni/src/commands/nlx.ts delete mode 100644 packages/ni/src/commands/nr.ts delete mode 100644 packages/ni/src/commands/nu.ts delete mode 100644 packages/ni/src/commands/nun.ts delete mode 100644 packages/ni/src/config.ts delete mode 100644 packages/ni/src/detect.ts delete mode 100644 packages/ni/src/fs.ts delete mode 100644 packages/ni/src/index.ts delete mode 100644 packages/ni/src/parse.ts delete mode 100644 packages/ni/src/runner.ts delete mode 100644 packages/ni/src/storage.ts delete mode 100644 packages/ni/src/utils.ts delete mode 100644 packages/ni/tsconfig.build.json delete mode 100644 packages/ni/tsconfig.json rename patches/{node-fetch@2.6.7.patch => node-fetch@2.6.11.patch} (89%) diff --git a/.buildkite/publish/docker-compose.yml b/.buildkite/publish/docker-compose.yml index b8c0a645512e..e5d1b7f539b8 100644 --- a/.buildkite/publish/docker-compose.yml +++ b/.buildkite/publish/docker-compose.yml @@ -132,7 +132,7 @@ services: - '3307:3306' vitess-8: - image: vitess/vttestserver:mysql80@sha256:4b7776e90f6315b104e9f0d579ef3a27b269081ebcf4053d184f2e855c7a63ed + image: vitess/vttestserver:mysql80@sha256:d7486215316e352aecc6f34d4a3024017d79377e2a09545a7990b6aa4ea8d6a2 restart: unless-stopped ports: - 33807:33807 diff --git a/.buildkite/publish/publish.yml b/.buildkite/publish/publish.yml index 16cbba789bec..802650aa7c7d 100644 --- a/.buildkite/publish/publish.yml +++ b/.buildkite/publish/publish.yml @@ -2,7 +2,7 @@ steps: - label: ':llama: Publish' timeout_in_minutes: 45 plugins: - - docker-compose#v4.12.0: + - docker-compose#v4.13.0: config: .buildkite/publish/docker-compose.yml run: app - wait diff --git a/.buildkite/test/run.sh b/.buildkite/test/run.sh index 022f2a03957d..c588fa246e4f 100755 --- a/.buildkite/test/run.sh +++ b/.buildkite/test/run.sh @@ -48,10 +48,10 @@ pnpm run setup echo "~~~ @prisma/client test:functional" echo "Start testing..." -pnpm run --filter "@prisma/client" test:functional +pnpm run --filter "@prisma/client" test:functional --silent echo "~~~ Test all packages" -pnpm run test +pnpm run test echo "~~~ @prisma/client test:memory" # Client memory test suite Note: we run it last as DB is not isolated and will diff --git a/.github/renovate.json b/.github/renovate.json index 8b2b6e714d94..470ddc6b8c7a 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -39,6 +39,46 @@ "excludePackageNames": ["checkpoint-client"], "schedule": ["before 7am on Wednesday"] }, + { + "groupName": "ESM devDependencies & dependencies (patch & minor)", + "depTypeList": ["dependencies", "devDependencies"], + "updateTypes": ["patch", "minor"], + "matchPackageNames": [ + "get-port", + "is-obj", + "is-regexp", + "mongo", + "p-reduce", + "postgres", + "sort-keys", + "node.js", + "@sindresorhus/slugify", + "cli-truncate", + "escape-string-regexp", + "execa", + "find-up", + "get-stdin", + "globby", + "has-yarn", + "indent-string", + "log-update", + "new-github-issue-url", + "node-fetch", + "ora", + "p-map", + "p-retry", + "pkg-up", + "read-pkg-up", + "replace-string", + "string-width", + "strip-ansi", + "strip-indent", + "temp-write", + "tempy", + "terminal-link" + ], + "schedule": ["before 7am on Wednesday"] + }, { "groupName": "ESM devDependencies & dependencies (major)", "depTypeList": ["dependencies", "devDependencies"], @@ -110,8 +150,8 @@ "schedule": ["before 7am on Wednesday"] }, { - "groupName": "sqlite-async", - "packageNames": ["sqlite-async"], + "groupName": "npm-packlist", + "packageNames": ["npm-packlist"], "schedule": ["before 7am on Wednesday"] }, { diff --git a/.github/workflows/test-template.yml b/.github/workflows/test-template.yml index a50f4f6e1a4a..d3ab547d6ae7 100644 --- a/.github/workflows/test-template.yml +++ b/.github/workflows/test-template.yml @@ -35,7 +35,7 @@ on: required: false BUILDPULSE_SECRET_ACCESS_KEY: required: false - # Docker Hub credentials must be passed to avoid rate limiting + # Docker Hub credentials must be passed to avoid rate limiting when using Buildjet runners # But they are not required, so forks can run the workflow without defining them DOCKERHUB_USERNAME: required: false @@ -157,7 +157,8 @@ jobs: env: DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} - if: "${{ env.DOCKERHUB_USERNAME != '' && env.DOCKERHUB_TOKEN != '' }}" + # Login to Docker Hub is only needed for buildjet runners + if: "${{ startsWith(inputs.ubuntuRunner, 'buildjet') && env.DOCKERHUB_USERNAME != '' && env.DOCKERHUB_TOKEN != '' }}" with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} @@ -174,7 +175,7 @@ jobs: run: | echo "PRISMA_ENGINE_PROTOCOL=${{ matrix.engineProtocol }}" >> $GITHUB_ENV - - run: docker-compose -f docker/docker-compose.yml up --detach postgres postgres_isolated mysql mysql_isolated mssql mongo cockroachdb vitess-8 + - run: docker compose -f docker/docker-compose.yml up --detach postgres postgres_isolated mysql mysql_isolated mssql mongo cockroachdb vitess-8 - uses: pnpm/action-setup@v2.2.4 with: @@ -188,11 +189,11 @@ jobs: - run: bash .github/workflows/scripts/setup.sh # Run the functional test suite - - run: pnpm run test:functional --shard ${{ matrix.shard }} + - run: pnpm run test:functional --silent --shard ${{ matrix.shard }} if: ${{ contains(inputs.jobsToRun, '-all-') || contains(inputs.jobsToRun, '-client-') }} working-directory: packages/client # And run all the other tests (except the types tests) - - run: pnpm run test-notypes --shard ${{ matrix.shard }} + - run: pnpm run test-notypes --silent --shard ${{ matrix.shard }} if: ${{ contains(inputs.jobsToRun, '-all-') || contains(inputs.jobsToRun, '-client-') }} working-directory: packages/client @@ -251,7 +252,7 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - run: docker-compose -f docker/docker-compose.yml up --detach postgres mysql mssql mongo cockroachdb vitess-8 + - run: docker compose -f docker/docker-compose.yml up --detach postgres mysql mssql mongo cockroachdb vitess-8 - uses: pnpm/action-setup@v2.2.4 with: @@ -268,7 +269,7 @@ jobs: SKIP_GIT: true GITHUB_CONTEXT: ${{ toJson(github) }} - - run: pnpm run test:functional --data-proxy --shard ${{ matrix.shard }} + - run: pnpm run test:functional --silent --data-proxy --shard ${{ matrix.shard }} working-directory: packages/client env: CI: true @@ -285,7 +286,7 @@ jobs: JEST_JUNIT_UNIQUE_OUTPUT_NAME: true PRISMA_ENGINE_PROTOCOL: '${{ matrix.engineProtocol }}' - - run: pnpm run test:functional --data-proxy --edge-client --shard ${{ matrix.shard }} + - run: pnpm run test:functional --silent --data-proxy --edge-client --shard ${{ matrix.shard }} working-directory: packages/client env: CI: true @@ -354,7 +355,7 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - run: docker-compose -f docker/docker-compose.yml up --detach postgres # mysql mysql_isolated mssql mongo cockroachdb + - run: docker compose -f docker/docker-compose.yml up --detach postgres # mysql mysql_isolated mssql mongo cockroachdb - uses: pnpm/action-setup@v2.2.4 with: @@ -461,7 +462,7 @@ jobs: - uses: actions/checkout@v3 # Not currently needed, but we might need it in the future - - run: docker-compose -f docker/docker-compose.yml up --detach postgres mysql mssql mongo cockroachdb vitess-8 + - run: docker compose -f docker/docker-compose.yml up --detach postgres mysql mssql mongo cockroachdb vitess-8 - uses: pnpm/action-setup@v2.2.4 with: @@ -534,7 +535,7 @@ jobs: echo "RELATION_MODE=${{ matrix.relationMode }}" if [ ! -z "${{ matrix.relationMode }}" ]; then echo "RELATION_MODE=${{ matrix.relationMode }}" >> $GITHUB_ENV; fi - - run: docker-compose -f docker/docker-compose.yml up --detach postgres mysql mssql mongo cockroachdb vitess-8 + - run: docker compose -f docker/docker-compose.yml up --detach postgres mysql mssql mongo cockroachdb vitess-8 - uses: pnpm/action-setup@v2.2.4 with: @@ -553,21 +554,21 @@ jobs: # shouldn't take more than 15 minutes - name: 1 to 1 - run: pnpm run test:functional:code --relation-mode-tests-only relationMode-in-separate-gh-action/tests_1-to-1.ts + run: pnpm run test:functional:code --silent --relation-mode-tests-only relationMode-in-separate-gh-action/tests_1-to-1.ts working-directory: packages/client # shouldn't take more than 15 minutes - name: 1 to n - run: pnpm run test:functional:code --relation-mode-tests-only relationMode-in-separate-gh-action/tests_1-to-n.ts + run: pnpm run test:functional:code --silent --relation-mode-tests-only relationMode-in-separate-gh-action/tests_1-to-n.ts working-directory: packages/client # shouldn't take more than 15 minutes - name: m to n (SQL databases) - run: pnpm run test:functional:code --relation-mode-tests-only relationMode-in-separate-gh-action/tests_m-to-n.ts + run: pnpm run test:functional:code --silent --relation-mode-tests-only relationMode-in-separate-gh-action/tests_m-to-n.ts working-directory: packages/client - name: m to n (MongoDB) - run: pnpm run test:functional:code --relation-mode-tests-only relationMode-in-separate-gh-action/tests_m-to-n-MongoDB.ts + run: pnpm run test:functional:code --silent --relation-mode-tests-only relationMode-in-separate-gh-action/tests_m-to-n-MongoDB.ts working-directory: packages/client - name: Upload test results to BuildPulse for flaky test detection @@ -671,7 +672,7 @@ jobs: run: | echo "PRISMA_CLIENT_ENGINE_TYPE=${{ matrix.queryEngine }}" >> $GITHUB_ENV - - run: docker-compose -f docker/docker-compose.yml up --detach postgres mysql mariadb mssql + - run: docker compose -f docker/docker-compose.yml up --detach postgres mysql mariadb mssql - uses: pnpm/action-setup@v2.2.4 with: @@ -738,7 +739,7 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - run: docker-compose -f docker/docker-compose.yml up --detach postgres mysql mssql + - run: docker compose -f docker/docker-compose.yml up --detach postgres mysql mssql - name: Set CLI Engine Type run: | @@ -810,7 +811,7 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - run: docker-compose -f docker/docker-compose.yml up --detach postgres mysql mssql mongodb_migrate mongodb_migrate_seed cockroachdb + - run: docker compose -f docker/docker-compose.yml up --detach postgres mysql mssql mongodb_migrate mongodb_migrate_seed cockroachdb - name: Set CLI Engine Type run: | @@ -1105,7 +1106,7 @@ jobs: GITHUB_CONTEXT: ${{ toJson(github) }} - name: Test packages/client - run: pnpm run test:functional:code --shard ${{matrix.shard}} + run: pnpm run test:functional:code --silent --shard ${{matrix.shard}} working-directory: packages/client env: CI: true @@ -1216,7 +1217,7 @@ jobs: - name: Test packages/client (old suite) if: ${{ contains(inputs.jobsToRun, '-all-') || contains(inputs.jobsToRun, '-client-') }} - run: pnpm run test-notypes --testTimeout=40000 + run: pnpm run test-notypes --silent --testTimeout=40000 working-directory: packages/client env: CI: true diff --git a/README.md b/README.md index 28174ee0361a..d4d151f15aed 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ + Discord

Quickstart @@ -20,9 +21,9 @@   •   Slack   •   - Twitter + Discord   •   - Prisma 1 + Twitter

@@ -37,8 +38,6 @@ Prisma is a **next-generation ORM** that consists of these tools: Prisma Client can be used in _any_ Node.js or TypeScript backend application (including serverless applications and microservices). This can be a [REST API](https://www.prisma.io/docs/understand-prisma/prisma-in-your-stack/rest), a [GraphQL API](https://www.prisma.io/docs/understand-prisma/prisma-in-your-stack/graphql), a gRPC API, or anything else that needs a database. -> **Are you looking for Prisma 1? The Prisma 1 repository has been renamed to [`prisma/prisma1`](https://github.com/prisma/prisma1)**. - ## Getting started The fastest way to get started with Prisma is by following the [**Quickstart (5 min)**](https://www.prisma.io/docs/getting-started/quickstart-typescript). @@ -48,7 +47,7 @@ The Quickstart is based on a preconfigured SQLite database. You can also get sta - [Add Prisma to an existing project](https://www.prisma.io/docs/getting-started/setup-prisma/add-to-existing-project-typescript-postgres) - [Set up a new project with Prisma from scratch](https://www.prisma.io/docs/getting-started/setup-prisma/start-from-scratch-typescript-postgres) -## How does Prisma work +## How Prisma works This section provides a high-level overview of how Prisma works and its most important technical components. For a more thorough introduction, visit the [Prisma documentation](https://www.prisma.io/docs/). @@ -128,7 +127,7 @@ npm install @prisma/client Note that the installation of this package invokes the `prisma generate` command which reads your Prisma schema and _generates_ the Prisma Client code. The code will be located in `node_modules/.prisma/client`, which is exported by `node_modules/@prisma/client/index.d.ts`. -After you change your data model, you'll need to manually re-generate Prisma Client to ensure the code inside `node_modules/.prisma/client` get updated: +After you change your data model, you'll need to manually re-generate Prisma Client to ensure the code inside `node_modules/.prisma/client` gets updated: ``` npx prisma generate @@ -158,7 +157,7 @@ const { PrismaClient } = require('@prisma/client') const prisma = new PrismaClient() ``` -Now you can start sending queries via the generated Prisma Client API, here are few sample queries. Note that all Prisma Client queries return _plain old JavaScript objects_. +Now you can start sending queries via the generated Prisma Client API, here are a few sample queries. Note that all Prisma Client queries return _plain old JavaScript objects_. Learn more about the available operations in the [Prisma Client docs](https://www.prisma.io/docs/concepts/components/prisma-client) or watch this [demo video](https://www.youtube.com/watch?v=LggrE5kJ75I&list=PLn2e1F9Rfr6k9PnR_figWOcSHgc_erDr5&index=4) (2 min). @@ -220,7 +219,7 @@ Note that when using TypeScript, the result of this query will be _statically ty ## Community -Prisma has a large and supportive [community](https://www.prisma.io/community) of enthusiastic application developers. You can join us on [Slack](https://slack.prisma.io) and here on [GitHub](https://github.com/prisma/prisma/discussions). +Prisma has a large and supportive [community](https://www.prisma.io/community) of enthusiastic application developers. You can join us on [Slack](https://slack.prisma.io), [Discord](https://pris.ly/discord), and here on [GitHub](https://github.com/prisma/prisma/discussions). ## Security diff --git a/docker/README.md b/docker/README.md index 7a88018d9a6f..2d7ede6a8268 100644 --- a/docker/README.md +++ b/docker/README.md @@ -8,7 +8,7 @@ cd docker See [the Docker Compose configurations for our tests databases locally and also used by GitHub Actions in CI](./docker-compose.yml). -## Using docker-compose for databases +## Using `docker compose` for databases This is only intended to be run in a development environment where ports 3306 / default for MySQL - 5432 / default for PostgreSQL and 4306 custom port - MariaDB are free and not used. @@ -19,10 +19,9 @@ ports: - '3307:3306' # only change the first number ``` -## Apple M1 and other ARM64 CPUs +## Customizing images (optional) -Docker images for MySQL and Microsoft SQL Server only support x86_64 CPUs. -Copy or link `docker-compose.arm64.yml` to `docker-compose.override.yml` to use ARMv8-compatible drop-in replacements (MariaDB and Azure SQL Edge) instead. +Docker images can be overridden by creating a `docker-compose.override.yml`. > By default, Compose reads two files, a `docker-compose.yml` and an optional `docker-compose.override.yml` file. By convention, the `docker-compose.yml` contains your base configuration. The override file, as its name implies, can contain configuration overrides for existing services or entirely new services. > @@ -35,29 +34,29 @@ Copy or link `docker-compose.arm64.yml` to `docker-compose.override.yml` to use In detached/background mode using `-d` (recommended) ```sh -docker-compose up -d +docker compose up -d # Or start only one service -docker-compose up -d mysql +docker compose up -d mysql # To see logs -docker-compose logs -f mysql +docker compose logs -f mysql ``` In attached mode, the logs will be streamed in the terminal: ```sh -docker-compose up +docker compose up # Or start only one service -docker-compose up mysql +docker compose up mysql ``` ### Stop ```sh -docker-compose down +docker compose down ``` ### Delete all ```sh -docker-compose down -v --rmi all --remove-orphans +docker compose down -v --rmi all --remove-orphans ``` diff --git a/docker/docker-compose.arm64.yml b/docker/docker-compose.arm64.yml deleted file mode 100644 index 283ee3f8792b..000000000000 --- a/docker/docker-compose.arm64.yml +++ /dev/null @@ -1,11 +0,0 @@ -version: '3.7' - -services: - mssql: - image: mcr.microsoft.com/azure-sql-edge:latest - restart: unless-stopped - environment: - - ACCEPT_EULA=Y - - MSSQL_SA_PASSWORD=Pr1sm4_Pr1sm4 - ports: - - '1433:1433' diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 9fe8f3e459bd..d51d9fede389 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -1,4 +1,6 @@ -version: '3.7' +version: '3.8' + +name: prisma-prisma # For connection urls to the following instances, see # https://github.com/prisma/prisma/blob/main/TESTING.md#environment-variables @@ -33,7 +35,7 @@ services: # Planetscale # From https://github.com/prisma/prisma-engines/blob/976a00ae3c30ab9507fa742986c9c6f5327ba10f/docker-compose.yml vitess-8: - image: vitess/vttestserver:mysql80@sha256:4b7776e90f6315b104e9f0d579ef3a27b269081ebcf4053d184f2e855c7a63ed + image: vitess/vttestserver:mysql80@sha256:d7486215316e352aecc6f34d4a3024017d79377e2a09545a7990b6aa4ea8d6a2 restart: unless-stopped ports: - 33807:33807 diff --git a/helpers/compile/plugins/fill-plugin/fillers/process.ts b/helpers/compile/plugins/fill-plugin/fillers/process.ts index 9f010720a06d..d19274f1aba1 100644 --- a/helpers/compile/plugins/fill-plugin/fillers/process.ts +++ b/helpers/compile/plugins/fill-plugin/fillers/process.ts @@ -2,8 +2,6 @@ function noop(v: T) { return () => v as T } -const tickPromise = Promise.resolve() - function getProcess() { return process } @@ -94,13 +92,9 @@ export const process: NodeJS.Process = { rss: 0, }), nextTick: (fn: Function, ...args: unknown[]) => { - tickPromise - .then(() => fn(...args)) - .catch((e) => { - setTimeout(() => { - throw e - }, 0) - }) + setTimeout(() => { + fn(...args) + }, 0) }, off: noop(getProcess()), on: noop(getProcess()), diff --git a/package.json b/package.json index c62b55442732..0dfe91a74574 100644 --- a/package.json +++ b/package.json @@ -28,34 +28,34 @@ "prepare": "is-ci || husky install" }, "devDependencies": { - "@microsoft/api-extractor": "7.35.0", + "@microsoft/api-extractor": "7.36.0", "@sindresorhus/slugify": "1.1.2", "@slack/webhook": "6.1.0", "@types/benchmark": "2.1.2", "@types/fs-extra": "9.0.13", "@types/graphviz": "0.0.35", - "@types/node": "18.16.14", + "@types/node": "18.16.16", "@types/node-fetch": "2.6.4", "@types/redis": "2.8.32", "@types/resolve": "1.20.2", - "@typescript-eslint/eslint-plugin": "5.59.6", - "@typescript-eslint/parser": "5.59.6", + "@typescript-eslint/eslint-plugin": "5.59.11", + "@typescript-eslint/parser": "5.59.11", "arg": "5.0.2", "batching-toposort": "1.2.0", "buffer": "6.0.3", "chokidar": "3.5.3", "esbuild": "0.15.13", "esbuild-register": "3.3.3", - "eslint": "8.41.0", + "eslint": "8.43.0", "eslint-config-prettier": "8.8.0", "eslint-plugin-eslint-comments": "3.2.0", "eslint-plugin-import": "2.27.5", - "eslint-plugin-jest": "27.2.1", + "eslint-plugin-jest": "27.2.2", "eslint-plugin-prettier": "4.2.1", "eslint-plugin-simple-import-sort": "10.0.0", "eventemitter3": "5.0.1", "execa": "5.1.1", - "fs-extra": "11.1.0", + "fs-extra": "11.1.1", "globby": "11.1.0", "graphviz-mit": "0.0.9", "husky": "8.0.3", @@ -68,15 +68,15 @@ "p-reduce": "2.1.0", "p-retry": "4.6.2", "path-browserify": "1.0.1", - "prettier": "2.8.3", + "prettier": "2.8.8", "redis": "3.1.2", "redis-lock": "0.1.4", "regenerator-runtime": "0.13.11", - "resolve": "1.22.1", + "resolve": "1.22.2", "safe-buffer": "5.2.1", "semver": "7.5.1", "spdx-exceptions": "2.3.0", - "spdx-license-ids": "3.0.12", + "spdx-license-ids": "3.0.13", "staged-git-files": "1.3.0", "ts-node": "10.9.1", "ts-toolbelt": "9.6.0", @@ -92,7 +92,7 @@ } }, "patchedDependencies": { - "node-fetch@2.6.7": "patches/node-fetch@2.6.7.patch" + "node-fetch@2.6.11": "patches/node-fetch@2.6.11.patch" } }, "lint-staged": { diff --git a/packages/cli/README.md b/packages/cli/README.md index 993bbdfac507..1ba9f21b0b36 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -4,6 +4,7 @@ + Discord

Quickstart @@ -18,9 +19,9 @@   •   Slack   •   - Twitter + Discord   •   - Prisma 1 + Twitter

@@ -35,8 +36,6 @@ Prisma is a **next-generation ORM** that consists of these tools: Prisma Client can be used in _any_ Node.js or TypeScript backend application (including serverless applications and microservices). This can be a [REST API](https://www.prisma.io/docs/understand-prisma/prisma-in-your-stack/rest), a [GraphQL API](https://www.prisma.io/docs/understand-prisma/prisma-in-your-stack/graphql) a gRPC API, or anything else that needs a database. -> **Are you looking for Prisma 1? The Prisma 1 repository has been renamed to [`prisma/prisma1`](https://github.com/prisma/prisma1)**. - ## Getting started The fastest way to get started with Prisma is by following the [**Quickstart (5 min)**](https://www.prisma.io/docs/getting-started/quickstart-typescript). @@ -48,7 +47,7 @@ The Quickstart is based on a preconfigured SQLite database. You can also get sta ## Community -Prisma has a large and supportive [community](https://www.prisma.io/community) of enthusiastic application developers. You can join us on [Slack](https://slack.prisma.io) and here on [GitHub](https://github.com/prisma/prisma/discussions). +Prisma has a large and supportive [community](https://www.prisma.io/community) of enthusiastic application developers. You can join us on [Slack](https://slack.prisma.io), [Discord](https://pris.ly/discord), and here on [GitHub](https://github.com/prisma/prisma/discussions). ## Security diff --git a/packages/cli/package.json b/packages/cli/package.json index d99a7789e8f8..3dfdc1fc11db 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -67,22 +67,22 @@ "@prisma/get-platform": "workspace:*", "@prisma/internals": "workspace:*", "@prisma/migrate": "workspace:*", - "@prisma/studio": "0.484.0", - "@prisma/studio-server": "0.484.0", - "@swc/core": "1.3.32", + "@prisma/studio": "0.487.0", + "@prisma/studio-server": "0.487.0", + "@swc/core": "1.3.64", "@swc/jest": "0.2.26", "@types/debug": "4.1.8", "@types/fs-extra": "9.0.13", - "@types/jest": "29.5.1", + "@types/jest": "29.5.2", "@types/rimraf": "3.0.2", - "checkpoint-client": "1.1.23", + "checkpoint-client": "1.1.24", "debug": "4.3.4", "dotenv": "16.0.3", "esbuild": "0.15.13", "execa": "5.1.1", "fast-deep-equal": "3.1.3", "fast-glob": "3.2.12", - "fs-extra": "11.1.0", + "fs-extra": "11.1.1", "fs-jetpack": "5.1.0", "get-port": "5.1.1", "global-dirs": "3.0.1", diff --git a/packages/cli/src/Studio.ts b/packages/cli/src/Studio.ts index 9d2466220f77..657923725355 100644 --- a/packages/cli/src/Studio.ts +++ b/packages/cli/src/Studio.ts @@ -1,3 +1,4 @@ +import Debug from '@prisma/debug' import { enginesVersion } from '@prisma/engines' import { arg, checkUnsupportedDataProxy, Command, format, HelpError, isError, loadEnvFile } from '@prisma/internals' import { getSchemaPathAndPrint } from '@prisma/migrate' @@ -7,6 +8,8 @@ import { bold, dim, red } from 'kleur/colors' import open from 'open' import path from 'path' +const debug = Debug('prisma:studio') + const packageJson = require('../package.json') // eslint-disable-line @typescript-eslint/no-var-requires export class Studio implements Command { @@ -111,12 +114,24 @@ ${bold('Examples')} const serverUrl = `http://localhost:${port}` if (!browser || browser.toLowerCase() !== 'none') { try { - await open(serverUrl, { + const subprocess = await open(serverUrl, { app: browser, url: true, }) + + subprocess.on('spawn', () => { + // We match on this string in debug logs in tests + debug(`requested to open the url ${serverUrl}`) + }) + + subprocess.on('error', (e) => { + debug(e) + // We match on this string in debug logs in tests + debug(`failed to open the url ${serverUrl} in browser`) + }) } catch (e) { // Ignore any errors that occur when trying to open the browser, since they should not halt the process + debug(e) } } diff --git a/packages/client/README.md b/packages/client/README.md index 60942f8059cb..c6dd00bcb50f 100644 --- a/packages/client/README.md +++ b/packages/client/README.md @@ -1,4 +1,4 @@ -# Prisma Client · [![npm version](https://img.shields.io/npm/v/@prisma/client.svg?style=flat)](https://www.npmjs.com/package/@prisma/client) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/prisma/prisma/blob/main/CONTRIBUTING.md) [![GitHub license](https://img.shields.io/badge/license-Apache%202-blue)](https://github.com/prisma/prisma/blob/main/LICENSE) [![Slack](https://img.shields.io/badge/chat-on%20slack-blue.svg)](https://slack.prisma.io/) +# Prisma Client · [![npm version](https://img.shields.io/npm/v/@prisma/client.svg?style=flat)](https://www.npmjs.com/package/@prisma/client) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/prisma/prisma/blob/main/CONTRIBUTING.md) [![GitHub license](https://img.shields.io/badge/license-Apache%202-blue)](https://github.com/prisma/prisma/blob/main/LICENSE) [![Slack](https://img.shields.io/badge/chat-on%20slack-blue.svg)](https://slack.prisma.io/) [![Discord](https://img.shields.io/discord/937751382725886062?label=Discord)](https://pris.ly/discord) Prisma Client JS is an **auto-generated query builder** that enables **type-safe** database access and **reduces boilerplate**. You can use it as an alternative to traditional ORMs such as Sequelize, TypeORM or SQL query builders like knex.js. diff --git a/packages/client/extension.d.ts b/packages/client/extension.d.ts new file mode 100644 index 000000000000..28e396835378 --- /dev/null +++ b/packages/client/extension.d.ts @@ -0,0 +1 @@ +export * from './scripts/default-index' diff --git a/packages/client/extension.js b/packages/client/extension.js new file mode 100644 index 000000000000..610323bff009 --- /dev/null +++ b/packages/client/extension.js @@ -0,0 +1,3 @@ +module.exports = { + ...require('./scripts/default-index'), +} diff --git a/packages/client/helpers/functional-test/run-tests.ts b/packages/client/helpers/functional-test/run-tests.ts index a1fb888a7b18..81af98b5d6dc 100644 --- a/packages/client/helpers/functional-test/run-tests.ts +++ b/packages/client/helpers/functional-test/run-tests.ts @@ -18,6 +18,8 @@ const args = arg( '--no-types': Boolean, // Only typecheck, don't run the code tests '--types-only': Boolean, + // Generates all the clients to run the type tests + '--generate-only': Boolean, // Restrict the list of providers '--provider': [String], '-p': '--provider', @@ -47,13 +49,15 @@ const args = arg( '--changedFilesWithAncestor': Boolean, // Passes the same flag to Jest to shard tests between multiple machines '--shard': String, + // Passes the same flag to Jest to silence the output + '--silent': Boolean, }, true, true, ) async function main(): Promise { - let jestCli = new JestCli(['--silent', '--config', 'tests/functional/jest.config.js']) + let jestCli = new JestCli(['--config', 'tests/functional/jest.config.js']) let miniProxyProcess: ExecaChildProcess | undefined if (args['--provider']) { @@ -121,6 +125,9 @@ async function main(): Promise { if (args['--shard']) { jestArgs.push('--shard', args['--shard']) } + if (args['--silent']) { + jestArgs.push('--silent') + } const codeTestCli = jestCli.withArgs(jestArgs) try { @@ -130,7 +137,12 @@ async function main(): Promise { snapshotUpdate.withEnv({ UPDATE_SNAPSHOTS: 'external' }).run() } else { if (!args['--types-only']) { - codeTestCli.withArgs(['--']).withArgs(args['_']).run() + codeTestCli + .withArgs(['--', args['_']]) + .withEnv({ + TEST_GENERATE_ONLY: args['--generate-only'] ? 'true' : 'false', + }) + .run() } if (!args['--no-types']) { diff --git a/packages/client/package.json b/packages/client/package.json index 68977023ad3b..579ba7a5b59e 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -43,7 +43,7 @@ "test:memory": "node -r esbuild-register helpers/memory-tests.ts", "test:functional:code": "node -r esbuild-register helpers/functional-test/run-tests.ts --no-types", "test:functional:types": "node -r esbuild-register helpers/functional-test/run-tests.ts --types-only", - "test-notypes": "jest --silent --testPathIgnorePatterns src/__tests__/types/types.test.ts", + "test-notypes": "jest --testPathIgnorePatterns src/__tests__/types/types.test.ts", "generate": "node scripts/postinstall.js", "postinstall": "node scripts/postinstall.js", "prepublishOnly": "pnpm run build", @@ -59,12 +59,14 @@ "edge.d.ts", "index.js", "index.d.ts", - "index-browser.js" + "index-browser.js", + "extension.js", + "extension.d.ts" ], "devDependencies": { "@codspeed/benchmark.js-plugin": "1.1.0", - "@faker-js/faker": "8.0.1", - "@fast-check/jest": "1.6.2", + "@faker-js/faker": "8.0.2", + "@fast-check/jest": "1.7.0", "@jest/create-cache-key-function": "29.5.0", "@jest/globals": "29.5.0", "@jest/test-sequencer": "29.5.0", @@ -84,16 +86,16 @@ "@prisma/migrate": "workspace:*", "@prisma/mini-proxy": "0.7.0", "@swc-node/register": "1.6.5", - "@swc/core": "1.3.32", + "@swc/core": "1.3.64", "@swc/jest": "0.2.26", "@timsuchanek/copy": "1.4.5", "@types/debug": "4.1.8", "@types/fs-extra": "9.0.13", - "@types/jest": "29.5.1", + "@types/jest": "29.5.2", "@types/js-levenshtein": "1.1.1", "@types/mssql": "8.1.2", - "@types/node": "18.16.14", - "@types/pg": "8.10.1", + "@types/node": "18.16.16", + "@types/pg": "8.10.2", "@types/yeoman-generator": "5.2.11", "arg": "5.0.2", "benchmark": "2.1.4", @@ -102,9 +104,9 @@ "env-paths": "3.0.0", "esbuild": "0.15.13", "execa": "5.1.1", - "expect-type": "0.15.0", + "expect-type": "0.16.0", "flat-map-polyfill": "0.3.8", - "fs-extra": "11.1.0", + "fs-extra": "11.1.1", "get-own-enumerable-property-symbols": "3.0.2", "get-stream": "6.0.1", "globby": "11.1.0", @@ -119,8 +121,8 @@ "kleur": "4.1.5", "klona": "2.0.6", "lz-string": "1.5.0", - "mariadb": "3.0.2", - "memfs": "3.5.1", + "mariadb": "3.2.0", + "memfs": "3.5.3", "mssql": "9.1.1", "new-github-issue-url": "0.2.1", "node-fetch": "2.6.11", @@ -128,9 +130,9 @@ "pg": "8.9.0", "pkg-up": "3.1.0", "pluralize": "8.0.0", - "resolve": "1.22.1", + "resolve": "1.22.2", "rimraf": "3.0.2", - "simple-statistics": "7.8.2", + "simple-statistics": "7.8.3", "sort-keys": "4.2.0", "source-map-support": "0.5.21", "sql-template-tag": "5.0.3", @@ -141,7 +143,7 @@ "ts-pattern": "4.3.0", "tsd": "0.28.1", "typescript": "4.9.5", - "undici": "5.22.0", + "undici": "5.22.1", "yeoman-generator": "5.9.0", "yo": "4.3.1", "zx": "7.2.2" @@ -155,7 +157,7 @@ } }, "dependencies": { - "@prisma/engines-version": "4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944" + "@prisma/engines-version": "4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309" }, "sideEffects": false } diff --git a/packages/client/scripts/default-index.d.ts b/packages/client/scripts/default-index.d.ts index 051b7ae2585d..401067791826 100644 --- a/packages/client/scripts/default-index.d.ts +++ b/packages/client/scripts/default-index.d.ts @@ -1,3 +1,5 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ + import * as runtime from '@prisma/client/runtime' /** @@ -32,20 +34,33 @@ export declare const PrismaClient: any */ export declare type PrismaClient = any -export declare type PrismaClientExtends< +export declare class PrismaClientExtends< ExtArgs extends runtime.Types.Extensions.Args = runtime.Types.Extensions.DefaultArgs, -> = { +> { $extends: { extArgs: ExtArgs } & (< + Q extends runtime.Types.Extensions.UserArgs['query'] = {}, R extends runtime.Types.Extensions.UserArgs['result'] = {}, M extends runtime.Types.Extensions.UserArgs['model'] = {}, - Q extends runtime.Types.Extensions.UserArgs['query'] = {}, C extends runtime.Types.Extensions.UserArgs['client'] = {}, - Args extends runtime.Types.Extensions.Args = runtime.Types.Extensions.InternalArgs, + Args extends runtime.Types.Extensions.Args = runtime.Types.Extensions.InternalArgs, >( args: | ((client: PrismaClientExtends) => { $extends: { extArgs: Args } }) - | { name?: string; result?: R; model?: M; query?: Q; client?: C }, - ) => PrismaClientExtends) + | { name?: string } + | { result?: R & runtime.Types.Extensions.UserArgs['result'] } + | { model?: M & runtime.Types.Extensions.UserArgs['model'] } + | { query?: Q & runtime.Types.Extensions.UserArgs['query'] } + | { client?: C & runtime.Types.Extensions.UserArgs['client'] }, + ) => PrismaClientExtends & Args['client']) + + $transaction( + fn: (prisma: Omit) => Promise, + options?: { maxWait?: number; timeout?: number; isolationLevel?: string }, + ): Promise + $transaction

[]>( + arg: [...P], + options?: { isolationLevel?: string }, + ): Promise> } export declare const dmmf: any @@ -65,23 +80,31 @@ export namespace Prisma { export type TransactionClient = any export function defineExtension< + Q extends runtime.Types.Extensions.UserArgs['query'] = {}, R extends runtime.Types.Extensions.UserArgs['result'] = {}, M extends runtime.Types.Extensions.UserArgs['model'] = {}, - Q extends runtime.Types.Extensions.UserArgs['query'] = {}, C extends runtime.Types.Extensions.UserArgs['client'] = {}, - Args extends runtime.Types.Extensions.Args = runtime.Types.Extensions.InternalArgs, + Args extends runtime.Types.Extensions.Args = runtime.Types.Extensions.InternalArgs, >( args: | ((client: PrismaClientExtends) => { $extends: { extArgs: Args } }) - | { name?: string; result?: R; model?: M; query?: Q; client?: C }, + | { name?: string } + | { result?: R & runtime.Types.Extensions.UserArgs['result'] } + | { model?: M & runtime.Types.Extensions.UserArgs['model'] } + | { query?: Q & runtime.Types.Extensions.UserArgs['query'] } + | { client?: C & runtime.Types.Extensions.UserArgs['client'] }, ): (client: any) => PrismaClientExtends export type Extension = runtime.Types.Extensions.UserArgs - // eslint-disable-next-line @typescript-eslint/no-unused-vars export import getExtensionContext = runtime.Extensions.getExtensionContext - export type Args = runtime.Types.Public.Args & {} - export type Payload = runtime.Types.Public.Payload & {} - export type Result = runtime.Types.Public.Result & {} - export type Exact = runtime.Types.Public.Exact & {} - export type PrismaPromise = runtime.Types.Public.PrismaPromise & {} + export import Args = runtime.Types.Public.Args + export import Payload = runtime.Types.Public.Payload + export import Result = runtime.Types.Public.Result + export import Exact = runtime.Types.Public.Exact + export import PrismaPromise = runtime.Types.Public.PrismaPromise + + export const prismaVersion: { + client: string + engine: string + } } diff --git a/packages/client/scripts/default-index.js b/packages/client/scripts/default-index.js index c7144c094b16..6a3af0b7fad1 100644 --- a/packages/client/scripts/default-index.js +++ b/packages/client/scripts/default-index.js @@ -1,3 +1,5 @@ +const path = require('path') + class PrismaClient { constructor() { throw new Error( @@ -24,5 +26,13 @@ module.exports = { Prisma: { defineExtension, getExtensionContext, + get prismaVersion() { + const atPrismaClientDir = path.dirname(require.resolve('@prisma/client/package.json')) + const enginesVersionDir = require.resolve('@prisma/engines-version', { paths: [atPrismaClientDir] }) + const { version: client } = require('@prisma/client/package.json') + const { enginesVersion: engine } = require(enginesVersionDir) + + return { client, engine } + }, }, } diff --git a/packages/client/src/__tests__/integration/errors/client-version-error/test.ts b/packages/client/src/__tests__/integration/errors/client-version-error/test.ts index 9f8699b0b69a..260a4f56bd75 100644 --- a/packages/client/src/__tests__/integration/errors/client-version-error/test.ts +++ b/packages/client/src/__tests__/integration/errors/client-version-error/test.ts @@ -30,7 +30,7 @@ testIf(getQueryEngineProtocol() !== 'json')('client-version-error', async () => cursor?: UserWhereUniqueInput take?: Int skip?: Int - distinct?: List + distinct?: UserScalarFieldEnum | List } diff --git a/packages/client/src/__tests__/integration/errors/multi-schema/test.ts b/packages/client/src/__tests__/integration/errors/multi-schema/test.ts index 7ebc47957a0c..f0ced6054543 100644 --- a/packages/client/src/__tests__/integration/errors/multi-schema/test.ts +++ b/packages/client/src/__tests__/integration/errors/multi-schema/test.ts @@ -10,9 +10,9 @@ let prisma: PrismaClient const baseUri = process.env.TEST_POSTGRES_URI const email = faker.internet.email() -const title = faker.name.jobTitle() +const title = faker.person.jobTitle() const newEmail = faker.internet.email() -const newTitle = faker.name.jobTitle() +const newTitle = faker.person.jobTitle() describe('multischema', () => { beforeAll(async () => { diff --git a/packages/client/src/__tests__/integration/happy/distinct/test.ts b/packages/client/src/__tests__/integration/happy/distinct/test.ts index 272688578b1a..2ebe10244016 100644 --- a/packages/client/src/__tests__/integration/happy/distinct/test.ts +++ b/packages/client/src/__tests__/integration/happy/distinct/test.ts @@ -4,17 +4,25 @@ test('distinct', async () => { const PrismaClient = await getTestClient() const prisma = new PrismaClient() - let result = await prisma.user.findMany({ + const resultId = await prisma.user.findMany({ distinct: ['id'], // distinct on id has no effect, as it's distinct anyway }) + expect(resultId.length).toBe(10) - expect(result.length).toBe(10) - - result = await prisma.user.findMany({ + const resultName = await prisma.user.findMany({ distinct: ['name'], }) + expect(resultName.length).toBe(1) + + const resultIdShortcut = await prisma.user.findMany({ + distinct: 'id', // distinct on id has no effect, as it's distinct anyway + }) + expect(resultIdShortcut.length).toBe(10) - expect(result.length).toBe(1) + const resultNameShortcut = await prisma.user.findMany({ + distinct: 'name', + }) + expect(resultNameShortcut.length).toBe(1) await prisma.$disconnect() }) diff --git a/packages/client/src/__tests__/integration/happy/exhaustive-schema-mongo/__snapshots__/test.ts.snap b/packages/client/src/__tests__/integration/happy/exhaustive-schema-mongo/__snapshots__/test.ts.snap index f4a30ca2871c..558267a9b6ed 100644 --- a/packages/client/src/__tests__/integration/happy/exhaustive-schema-mongo/__snapshots__/test.ts.snap +++ b/packages/client/src/__tests__/integration/happy/exhaustive-schema-mongo/__snapshots__/test.ts.snap @@ -7,7 +7,8 @@ Object.defineProperty(exports, "__esModule", { value: true }); const { Decimal, objectEnumValues, - makeStrictEnum + makeStrictEnum, + Public, } = require('@prisma/client/runtime/index-browser') @@ -69,8 +70,19 @@ Prisma.raw = () => { throw new Error(\`raw is unable to be run in the browser. In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`, )} -Prisma.validator = () => (val) => val +Prisma.validator = Public.validator +/** +* Extensions +*/ +Prisma.getExtensionContext = () => { + throw new Error(\`Extensions.getExtensionContext is unable to be run in the browser. +In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`, +)} +Prisma.defineExtension = () => { + throw new Error(\`Extensions.defineExtension is unable to be run in the browser. +In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`, +)} /** * Shorthand utilities for JSON filtering @@ -89,46 +101,31 @@ Prisma.NullTypes = { * Enums */ -exports.Prisma.AScalarFieldEnum = { +exports.Prisma.PostScalarFieldEnum = { id: 'id', - email: 'email', - name: 'name', - int: 'int', - sInt: 'sInt', - bInt: 'bInt' + createdAt: 'createdAt', + title: 'title', + content: 'content', + published: 'published', + authorId: 'authorId' }; -exports.Prisma.BScalarFieldEnum = { +exports.Prisma.UserScalarFieldEnum = { id: 'id', + email: 'email', + int: 'int', + optionalInt: 'optionalInt', float: 'float', - dFloat: 'dFloat' -}; - -exports.Prisma.CScalarFieldEnum = { - id: 'id', - char: 'char', - vChar: 'vChar', - text: 'text', - bit: 'bit', - vBit: 'vBit', - uuid: 'uuid' -}; - -exports.Prisma.DScalarFieldEnum = { - id: 'id', - bool: 'bool', - byteA: 'byteA', - xml: 'xml', + optionalFloat: 'optionalFloat', + string: 'string', + optionalString: 'optionalString', json: 'json', - jsonb: 'jsonb', - list: 'list' -}; - -exports.Prisma.EScalarFieldEnum = { - id: 'id', - date: 'date', - time: 'time', - ts: 'ts' + optionalJson: 'optionalJson', + enum: 'enum', + optionalEnum: 'optionalEnum', + boolean: 'boolean', + optionalBoolean: 'optionalBoolean', + embedHolderId: 'embedHolderId' }; exports.Prisma.EmbedHolderScalarFieldEnum = { @@ -155,9 +152,9 @@ exports.Prisma.MScalarFieldEnum = { optionalBoolean: 'optionalBoolean' }; -exports.Prisma.ManyRequiredScalarFieldEnum = { +exports.Prisma.NScalarFieldEnum = { id: 'id', - oneOptionalId: 'oneOptionalId', + m_ids: 'm_ids', int: 'int', optionalInt: 'optionalInt', float: 'float', @@ -172,9 +169,8 @@ exports.Prisma.ManyRequiredScalarFieldEnum = { optionalBoolean: 'optionalBoolean' }; -exports.Prisma.NScalarFieldEnum = { +exports.Prisma.OneOptionalScalarFieldEnum = { id: 'id', - m_ids: 'm_ids', int: 'int', optionalInt: 'optionalInt', float: 'float', @@ -189,8 +185,9 @@ exports.Prisma.NScalarFieldEnum = { optionalBoolean: 'optionalBoolean' }; -exports.Prisma.OneOptionalScalarFieldEnum = { +exports.Prisma.ManyRequiredScalarFieldEnum = { id: 'id', + oneOptionalId: 'oneOptionalId', int: 'int', optionalInt: 'optionalInt', float: 'float', @@ -238,18 +235,46 @@ exports.Prisma.OptionalSide2ScalarFieldEnum = { optionalBoolean: 'optionalBoolean' }; -exports.Prisma.PostScalarFieldEnum = { +exports.Prisma.AScalarFieldEnum = { id: 'id', - createdAt: 'createdAt', - title: 'title', - content: 'content', - published: 'published', - authorId: 'authorId' + email: 'email', + name: 'name', + int: 'int', + sInt: 'sInt', + bInt: 'bInt' }; -exports.Prisma.QueryMode = { - default: 'default', - insensitive: 'insensitive' +exports.Prisma.BScalarFieldEnum = { + id: 'id', + float: 'float', + dFloat: 'dFloat' +}; + +exports.Prisma.CScalarFieldEnum = { + id: 'id', + char: 'char', + vChar: 'vChar', + text: 'text', + bit: 'bit', + vBit: 'vBit', + uuid: 'uuid' +}; + +exports.Prisma.DScalarFieldEnum = { + id: 'id', + bool: 'bool', + byteA: 'byteA', + xml: 'xml', + json: 'json', + jsonb: 'jsonb', + list: 'list' +}; + +exports.Prisma.EScalarFieldEnum = { + id: 'id', + date: 'date', + time: 'time', + ts: 'ts' }; exports.Prisma.SortOrder = { @@ -257,22 +282,9 @@ exports.Prisma.SortOrder = { desc: 'desc' }; -exports.Prisma.UserScalarFieldEnum = { - id: 'id', - email: 'email', - int: 'int', - optionalInt: 'optionalInt', - float: 'float', - optionalFloat: 'optionalFloat', - string: 'string', - optionalString: 'optionalString', - json: 'json', - optionalJson: 'optionalJson', - enum: 'enum', - optionalEnum: 'optionalEnum', - boolean: 'boolean', - optionalBoolean: 'optionalBoolean', - embedHolderId: 'embedHolderId' +exports.Prisma.QueryMode = { + default: 'default', + insensitive: 'insensitive' }; exports.ABeautifulEnum = { A: 'A', @@ -321,277 +333,378 @@ exports[`exhaustive-schema: generatedTypeScript 1`] = ` **/ import * as runtime from '@prisma/client/runtime/{RUNTIME_FILE}'; -type UnwrapPromise

= P extends Promise ? R : P -type UnwrapTuple = { - [K in keyof Tuple]: K extends \`\${number}\` ? Tuple[K] extends Prisma.PrismaPromise ? X : UnwrapPromise : UnwrapPromise -}; +import $Types = runtime.Types // general types +import $Public = runtime.Types.Public +import $Utils = runtime.Types.Utils +import $Extensions = runtime.Types.Extensions -export type PrismaPromise = runtime.Types.Public.PrismaPromise +export type PrismaPromise = $Public.PrismaPromise +export type EmbedPayload = { + objects: {} + scalars: { + text: string + boolean: boolean + scalarList: number[] + } + composites: { + embedEmbedList: EmbedEmbedPayload[] + requiredEmbedEmbed: EmbedEmbedPayload + optionalEmbedEmbed: EmbedEmbedPayload | null + } +} + /** * Model Embed * */ -export type Embed = { - text: string - boolean: boolean - embedEmbedList: EmbedEmbed[] - requiredEmbedEmbed: EmbedEmbed - optionalEmbedEmbed: EmbedEmbed | null - scalarList: number[] +export type Embed = runtime.Types.DefaultSelection +export type EmbedEmbedPayload = { + objects: {} + scalars: { + text: string + boolean: boolean + } + composites: {} } /** * Model EmbedEmbed * */ -export type EmbedEmbed = { - text: string - boolean: boolean +export type EmbedEmbed = runtime.Types.DefaultSelection +export type PostPayload = { + objects: { + author: UserPayload + } + scalars: $Extensions.GetResult<{ + id: string + createdAt: Date + title: string + content: string | null + published: boolean + authorId: string + }, ExtArgs["result"]["post"]> + composites: {} } /** * Model Post * */ -export type Post = { - id: string - createdAt: Date - title: string - content: string | null - published: boolean - authorId: string +export type Post = runtime.Types.DefaultSelection +export type UserPayload = { + objects: { + posts: PostPayload[] + embedHolder: EmbedHolderPayload + } + scalars: $Extensions.GetResult<{ + id: string + email: string + int: number + optionalInt: number | null + float: number + optionalFloat: number | null + string: string + optionalString: string | null + json: Prisma.JsonValue + optionalJson: Prisma.JsonValue | null + enum: ABeautifulEnum + optionalEnum: ABeautifulEnum | null + boolean: boolean + optionalBoolean: boolean | null + embedHolderId: string + }, ExtArgs["result"]["user"]> + composites: {} } /** * Model User * */ -export type User = { - id: string - email: string - int: number - optionalInt: number | null - float: number - optionalFloat: number | null - string: string - optionalString: string | null - json: Prisma.JsonValue - optionalJson: Prisma.JsonValue | null - enum: ABeautifulEnum - optionalEnum: ABeautifulEnum | null - boolean: boolean - optionalBoolean: boolean | null - embedHolderId: string +export type User = runtime.Types.DefaultSelection +export type EmbedHolderPayload = { + objects: { + User: UserPayload[] + } + scalars: $Extensions.GetResult<{ + id: string + time: Date + text: string + boolean: boolean + }, ExtArgs["result"]["embedHolder"]> + composites: { + embedList: EmbedPayload[] + requiredEmbed: EmbedPayload + optionalEmbed: EmbedPayload | null + } } /** * Model EmbedHolder * */ -export type EmbedHolder = { - id: string - time: Date - text: string - boolean: boolean - embedList: Embed[] - requiredEmbed: Embed - optionalEmbed: Embed | null +export type EmbedHolder = runtime.Types.DefaultSelection +export type MPayload = { + objects: { + n: NPayload[] + } + scalars: $Extensions.GetResult<{ + id: string + n_ids: string[] + int: number + optionalInt: number | null + float: number + optionalFloat: number | null + string: string + optionalString: string | null + json: Prisma.JsonValue + optionalJson: Prisma.JsonValue | null + enum: ABeautifulEnum + optionalEnum: ABeautifulEnum | null + boolean: boolean + optionalBoolean: boolean | null + }, ExtArgs["result"]["m"]> + composites: {} } /** * Model M * */ -export type M = { - id: string - n_ids: string[] - int: number - optionalInt: number | null - float: number - optionalFloat: number | null - string: string - optionalString: string | null - json: Prisma.JsonValue - optionalJson: Prisma.JsonValue | null - enum: ABeautifulEnum - optionalEnum: ABeautifulEnum | null - boolean: boolean - optionalBoolean: boolean | null +export type M = runtime.Types.DefaultSelection +export type NPayload = { + objects: { + m: MPayload[] + } + scalars: $Extensions.GetResult<{ + id: string + m_ids: string[] + int: number + optionalInt: number | null + float: number + optionalFloat: number | null + string: string + optionalString: string | null + json: Prisma.JsonValue + optionalJson: Prisma.JsonValue | null + enum: ABeautifulEnum + optionalEnum: ABeautifulEnum | null + boolean: boolean + optionalBoolean: boolean | null + }, ExtArgs["result"]["n"]> + composites: {} } /** * Model N * */ -export type N = { - id: string - m_ids: string[] - int: number - optionalInt: number | null - float: number - optionalFloat: number | null - string: string - optionalString: string | null - json: Prisma.JsonValue - optionalJson: Prisma.JsonValue | null - enum: ABeautifulEnum - optionalEnum: ABeautifulEnum | null - boolean: boolean - optionalBoolean: boolean | null +export type N = runtime.Types.DefaultSelection +export type OneOptionalPayload = { + objects: { + many: ManyRequiredPayload[] + } + scalars: $Extensions.GetResult<{ + id: string + int: number + optionalInt: number | null + float: number + optionalFloat: number | null + string: string + optionalString: string | null + json: Prisma.JsonValue + optionalJson: Prisma.JsonValue | null + enum: ABeautifulEnum + optionalEnum: ABeautifulEnum | null + boolean: boolean + optionalBoolean: boolean | null + }, ExtArgs["result"]["oneOptional"]> + composites: {} } /** * Model OneOptional * */ -export type OneOptional = { - id: string - int: number - optionalInt: number | null - float: number - optionalFloat: number | null - string: string - optionalString: string | null - json: Prisma.JsonValue - optionalJson: Prisma.JsonValue | null - enum: ABeautifulEnum - optionalEnum: ABeautifulEnum | null - boolean: boolean - optionalBoolean: boolean | null +export type OneOptional = runtime.Types.DefaultSelection +export type ManyRequiredPayload = { + objects: { + one: OneOptionalPayload | null + } + scalars: $Extensions.GetResult<{ + id: string + oneOptionalId: string | null + int: number + optionalInt: number | null + float: number + optionalFloat: number | null + string: string + optionalString: string | null + json: Prisma.JsonValue + optionalJson: Prisma.JsonValue | null + enum: ABeautifulEnum + optionalEnum: ABeautifulEnum | null + boolean: boolean + optionalBoolean: boolean | null + }, ExtArgs["result"]["manyRequired"]> + composites: {} } /** * Model ManyRequired * */ -export type ManyRequired = { - id: string - oneOptionalId: string | null - int: number - optionalInt: number | null - float: number - optionalFloat: number | null - string: string - optionalString: string | null - json: Prisma.JsonValue - optionalJson: Prisma.JsonValue | null - enum: ABeautifulEnum - optionalEnum: ABeautifulEnum | null - boolean: boolean - optionalBoolean: boolean | null +export type ManyRequired = runtime.Types.DefaultSelection +export type OptionalSide1Payload = { + objects: { + opti: OptionalSide2Payload | null + } + scalars: $Extensions.GetResult<{ + id: string + optionalSide2Id: string | null + int: number + optionalInt: number | null + float: number + optionalFloat: number | null + string: string + optionalString: string | null + json: Prisma.JsonValue + optionalJson: Prisma.JsonValue | null + enum: ABeautifulEnum + optionalEnum: ABeautifulEnum | null + boolean: boolean + optionalBoolean: boolean | null + }, ExtArgs["result"]["optionalSide1"]> + composites: {} } /** * Model OptionalSide1 * */ -export type OptionalSide1 = { - id: string - optionalSide2Id: string | null - int: number - optionalInt: number | null - float: number - optionalFloat: number | null - string: string - optionalString: string | null - json: Prisma.JsonValue - optionalJson: Prisma.JsonValue | null - enum: ABeautifulEnum - optionalEnum: ABeautifulEnum | null - boolean: boolean - optionalBoolean: boolean | null +export type OptionalSide1 = runtime.Types.DefaultSelection +export type OptionalSide2Payload = { + objects: { + opti: OptionalSide1Payload | null + } + scalars: $Extensions.GetResult<{ + id: string + int: number + optionalInt: number | null + float: number + optionalFloat: number | null + string: string + optionalString: string | null + json: Prisma.JsonValue + optionalJson: Prisma.JsonValue | null + enum: ABeautifulEnum + optionalEnum: ABeautifulEnum | null + boolean: boolean + optionalBoolean: boolean | null + }, ExtArgs["result"]["optionalSide2"]> + composites: {} } /** * Model OptionalSide2 * */ -export type OptionalSide2 = { - id: string - int: number - optionalInt: number | null - float: number - optionalFloat: number | null - string: string - optionalString: string | null - json: Prisma.JsonValue - optionalJson: Prisma.JsonValue | null - enum: ABeautifulEnum - optionalEnum: ABeautifulEnum | null - boolean: boolean - optionalBoolean: boolean | null +export type OptionalSide2 = runtime.Types.DefaultSelection +export type APayload = { + objects: {} + scalars: $Extensions.GetResult<{ + /** + * field comment 1 + */ + id: string + email: string + name: string | null + /** + * field comment 2 + */ + int: number + sInt: number + bInt: bigint + }, ExtArgs["result"]["a"]> + composites: {} } /** * Model A * model comment */ -export type A = { - /** - * field comment 1 - */ - id: string - email: string - name: string | null - /** - * field comment 2 - */ - int: number - sInt: number - bInt: bigint +export type A = runtime.Types.DefaultSelection +export type BPayload = { + objects: {} + scalars: $Extensions.GetResult<{ + id: string + float: number + dFloat: number + }, ExtArgs["result"]["b"]> + composites: {} } /** * Model B * */ -export type B = { - id: string - float: number - dFloat: number +export type B = runtime.Types.DefaultSelection +export type CPayload = { + objects: {} + scalars: $Extensions.GetResult<{ + id: string + char: string + vChar: string + text: string + bit: string + vBit: string + uuid: string + }, ExtArgs["result"]["c"]> + composites: {} } /** * Model C * */ -export type C = { - id: string - char: string - vChar: string - text: string - bit: string - vBit: string - uuid: string +export type C = runtime.Types.DefaultSelection +export type DPayload = { + objects: {} + scalars: $Extensions.GetResult<{ + id: string + bool: boolean + byteA: Buffer + xml: string + json: Prisma.JsonValue + jsonb: Prisma.JsonValue + list: number[] + }, ExtArgs["result"]["d"]> + composites: {} } /** * Model D * */ -export type D = { - id: string - bool: boolean - byteA: Buffer - xml: string - json: Prisma.JsonValue - jsonb: Prisma.JsonValue - list: number[] +export type D = runtime.Types.DefaultSelection +export type EPayload = { + objects: {} + scalars: $Extensions.GetResult<{ + id: string + date: Date + time: Date + ts: Date + }, ExtArgs["result"]["e"]> + composites: {} } /** * Model E * */ -export type E = { - id: string - date: Date - time: Date - ts: Date -} - +export type E = runtime.Types.DefaultSelection /** * Enums @@ -625,8 +738,11 @@ export class PrismaClient< U = 'log' extends keyof T ? T['log'] extends Array ? Prisma.GetEvents : never : never, GlobalReject extends Prisma.RejectOnNotFound | Prisma.RejectPerOperation | false | undefined = 'rejectOnNotFound' extends keyof T ? T['rejectOnNotFound'] - : false - > { + : false, + ExtArgs extends $Extensions.Args = $Extensions.DefaultArgs +> { + [K: symbol]: { types: Prisma.TypeMap['other'] } + /** * ## Prisma Client ʲˢ * @@ -657,6 +773,8 @@ export class PrismaClient< /** * Add a middleware + * @deprecated since 4.16.0. For new code, prefer client extensions instead. + * @see https://pris.ly/d/extensions */ $use(cb: Prisma.Middleware): void @@ -673,9 +791,9 @@ export class PrismaClient< * * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions). */ - $transaction

[]>(arg: [...P]): Promise> + $transaction

[]>(arg: [...P]): Promise> - $transaction(fn: (prisma: Omit) => Promise, options?: { maxWait?: number, timeout?: number }): Promise + $transaction(fn: (prisma: Omit) => Promise, options?: { maxWait?: number, timeout?: number }): Promise /** * Executes a raw MongoDB command and returns the result of it. @@ -692,6 +810,8 @@ export class PrismaClient< */ $runCommandRaw(command: Prisma.InputJsonObject): Prisma.PrismaPromise + $extends: $Extensions.ExtendsHook<'extends', Prisma.TypeMapCb, ExtArgs> + /** * \`prisma.post\`: Exposes CRUD operations for the **Post** model. * Example usage: @@ -700,7 +820,7 @@ export class PrismaClient< * const posts = await prisma.post.findMany() * \`\`\` */ - get post(): Prisma.PostDelegate; + get post(): Prisma.PostDelegate; /** * \`prisma.user\`: Exposes CRUD operations for the **User** model. @@ -710,7 +830,7 @@ export class PrismaClient< * const users = await prisma.user.findMany() * \`\`\` */ - get user(): Prisma.UserDelegate; + get user(): Prisma.UserDelegate; /** * \`prisma.embedHolder\`: Exposes CRUD operations for the **EmbedHolder** model. @@ -720,7 +840,7 @@ export class PrismaClient< * const embedHolders = await prisma.embedHolder.findMany() * \`\`\` */ - get embedHolder(): Prisma.EmbedHolderDelegate; + get embedHolder(): Prisma.EmbedHolderDelegate; /** * \`prisma.m\`: Exposes CRUD operations for the **M** model. @@ -730,7 +850,7 @@ export class PrismaClient< * const ms = await prisma.m.findMany() * \`\`\` */ - get m(): Prisma.MDelegate; + get m(): Prisma.MDelegate; /** * \`prisma.n\`: Exposes CRUD operations for the **N** model. @@ -740,7 +860,7 @@ export class PrismaClient< * const ns = await prisma.n.findMany() * \`\`\` */ - get n(): Prisma.NDelegate; + get n(): Prisma.NDelegate; /** * \`prisma.oneOptional\`: Exposes CRUD operations for the **OneOptional** model. @@ -750,7 +870,7 @@ export class PrismaClient< * const oneOptionals = await prisma.oneOptional.findMany() * \`\`\` */ - get oneOptional(): Prisma.OneOptionalDelegate; + get oneOptional(): Prisma.OneOptionalDelegate; /** * \`prisma.manyRequired\`: Exposes CRUD operations for the **ManyRequired** model. @@ -760,7 +880,7 @@ export class PrismaClient< * const manyRequireds = await prisma.manyRequired.findMany() * \`\`\` */ - get manyRequired(): Prisma.ManyRequiredDelegate; + get manyRequired(): Prisma.ManyRequiredDelegate; /** * \`prisma.optionalSide1\`: Exposes CRUD operations for the **OptionalSide1** model. @@ -770,7 +890,7 @@ export class PrismaClient< * const optionalSide1s = await prisma.optionalSide1.findMany() * \`\`\` */ - get optionalSide1(): Prisma.OptionalSide1Delegate; + get optionalSide1(): Prisma.OptionalSide1Delegate; /** * \`prisma.optionalSide2\`: Exposes CRUD operations for the **OptionalSide2** model. @@ -780,7 +900,7 @@ export class PrismaClient< * const optionalSide2s = await prisma.optionalSide2.findMany() * \`\`\` */ - get optionalSide2(): Prisma.OptionalSide2Delegate; + get optionalSide2(): Prisma.OptionalSide2Delegate; /** * \`prisma.a\`: Exposes CRUD operations for the **A** model. @@ -790,7 +910,7 @@ export class PrismaClient< * const as = await prisma.a.findMany() * \`\`\` */ - get a(): Prisma.ADelegate; + get a(): Prisma.ADelegate; /** * \`prisma.b\`: Exposes CRUD operations for the **B** model. @@ -800,7 +920,7 @@ export class PrismaClient< * const bs = await prisma.b.findMany() * \`\`\` */ - get b(): Prisma.BDelegate; + get b(): Prisma.BDelegate; /** * \`prisma.c\`: Exposes CRUD operations for the **C** model. @@ -810,7 +930,7 @@ export class PrismaClient< * const cs = await prisma.c.findMany() * \`\`\` */ - get c(): Prisma.CDelegate; + get c(): Prisma.CDelegate; /** * \`prisma.d\`: Exposes CRUD operations for the **D** model. @@ -820,7 +940,7 @@ export class PrismaClient< * const ds = await prisma.d.findMany() * \`\`\` */ - get d(): Prisma.DDelegate; + get d(): Prisma.DDelegate; /** * \`prisma.e\`: Exposes CRUD operations for the **E** model. @@ -830,13 +950,18 @@ export class PrismaClient< * const es = await prisma.e.findMany() * \`\`\` */ - get e(): Prisma.EDelegate; + get e(): Prisma.EDelegate; } export namespace Prisma { export import DMMF = runtime.DMMF - export type PrismaPromise = runtime.Types.Public.PrismaPromise + export type PrismaPromise = $Public.PrismaPromise + + /** + * Validator + */ + export import validator = runtime.Public.validator /** * Prisma Errors @@ -872,6 +997,15 @@ export namespace Prisma { export type MetricHistogram = runtime.MetricHistogram export type MetricHistogramBucket = runtime.MetricHistogramBucket + /** + * Extensions + */ + export type Extension = $Extensions.UserArgs + export import getExtensionContext = runtime.Extensions.getExtensionContext + export type Args = $Public.Args + export type Payload = $Public.Payload + export type Result = $Public.Result + export type Exact = $Public.Exact /** * Prisma Client JS version: local @@ -1243,7 +1377,7 @@ export namespace Prisma { export const type: unique symbol; - export function validator(): (select: runtime.Types.Utils.LegacyExact) => S; + /** * Used by group by @@ -1323,6 +1457,1246 @@ export namespace Prisma { db?: Datasource } + + interface TypeMapCb extends $Utils.Fn<{extArgs: $Extensions.Args}, $Utils.Record> { + returns: Prisma.TypeMap + } + + export type TypeMap = { + meta: { + modelProps: 'post' | 'user' | 'embedHolder' | 'm' | 'n' | 'oneOptional' | 'manyRequired' | 'optionalSide1' | 'optionalSide2' | 'a' | 'b' | 'c' | 'd' | 'e' + txIsolationLevel: never + }, + model: { + Post: { + findUnique: { + args: Prisma.PostFindUniqueArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + findUniqueOrThrow: { + args: Prisma.PostFindUniqueOrThrowArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + findFirst: { + args: Prisma.PostFindFirstArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + findFirstOrThrow: { + args: Prisma.PostFindFirstOrThrowArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + findMany: { + args: Prisma.PostFindManyArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + create: { + args: Prisma.PostCreateArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + createMany: { + args: Prisma.PostCreateManyArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + delete: { + args: Prisma.PostDeleteArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + update: { + args: Prisma.PostUpdateArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + deleteMany: { + args: Prisma.PostDeleteManyArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + updateMany: { + args: Prisma.PostUpdateManyArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + upsert: { + args: Prisma.PostUpsertArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + aggregate: { + args: Prisma.PostAggregateArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + groupBy: { + args: Prisma.PostGroupByArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + findRaw: { + args: Prisma.PostFindRawArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + aggregateRaw: { + args: Prisma.PostAggregateRawArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + count: { + args: Prisma.PostCountArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + } + User: { + findUnique: { + args: Prisma.UserFindUniqueArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + findUniqueOrThrow: { + args: Prisma.UserFindUniqueOrThrowArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + findFirst: { + args: Prisma.UserFindFirstArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + findFirstOrThrow: { + args: Prisma.UserFindFirstOrThrowArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + findMany: { + args: Prisma.UserFindManyArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + create: { + args: Prisma.UserCreateArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + createMany: { + args: Prisma.UserCreateManyArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + delete: { + args: Prisma.UserDeleteArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + update: { + args: Prisma.UserUpdateArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + deleteMany: { + args: Prisma.UserDeleteManyArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + updateMany: { + args: Prisma.UserUpdateManyArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + upsert: { + args: Prisma.UserUpsertArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + aggregate: { + args: Prisma.UserAggregateArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + groupBy: { + args: Prisma.UserGroupByArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + findRaw: { + args: Prisma.UserFindRawArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + aggregateRaw: { + args: Prisma.UserAggregateRawArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + count: { + args: Prisma.UserCountArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + } + EmbedHolder: { + findUnique: { + args: Prisma.EmbedHolderFindUniqueArgs, + result: $Utils.OptionalFlat + payload: EmbedHolderPayload + } + findUniqueOrThrow: { + args: Prisma.EmbedHolderFindUniqueOrThrowArgs, + result: $Utils.OptionalFlat + payload: EmbedHolderPayload + } + findFirst: { + args: Prisma.EmbedHolderFindFirstArgs, + result: $Utils.OptionalFlat + payload: EmbedHolderPayload + } + findFirstOrThrow: { + args: Prisma.EmbedHolderFindFirstOrThrowArgs, + result: $Utils.OptionalFlat + payload: EmbedHolderPayload + } + findMany: { + args: Prisma.EmbedHolderFindManyArgs, + result: $Utils.OptionalFlat + payload: EmbedHolderPayload + } + create: { + args: Prisma.EmbedHolderCreateArgs, + result: $Utils.OptionalFlat + payload: EmbedHolderPayload + } + createMany: { + args: Prisma.EmbedHolderCreateManyArgs, + result: $Utils.OptionalFlat + payload: EmbedHolderPayload + } + delete: { + args: Prisma.EmbedHolderDeleteArgs, + result: $Utils.OptionalFlat + payload: EmbedHolderPayload + } + update: { + args: Prisma.EmbedHolderUpdateArgs, + result: $Utils.OptionalFlat + payload: EmbedHolderPayload + } + deleteMany: { + args: Prisma.EmbedHolderDeleteManyArgs, + result: $Utils.OptionalFlat + payload: EmbedHolderPayload + } + updateMany: { + args: Prisma.EmbedHolderUpdateManyArgs, + result: $Utils.OptionalFlat + payload: EmbedHolderPayload + } + upsert: { + args: Prisma.EmbedHolderUpsertArgs, + result: $Utils.OptionalFlat + payload: EmbedHolderPayload + } + aggregate: { + args: Prisma.EmbedHolderAggregateArgs, + result: $Utils.OptionalFlat + payload: EmbedHolderPayload + } + groupBy: { + args: Prisma.EmbedHolderGroupByArgs, + result: $Utils.OptionalFlat + payload: EmbedHolderPayload + } + findRaw: { + args: Prisma.EmbedHolderFindRawArgs, + result: $Utils.OptionalFlat + payload: EmbedHolderPayload + } + aggregateRaw: { + args: Prisma.EmbedHolderAggregateRawArgs, + result: $Utils.OptionalFlat + payload: EmbedHolderPayload + } + count: { + args: Prisma.EmbedHolderCountArgs, + result: $Utils.OptionalFlat + payload: EmbedHolderPayload + } + } + M: { + findUnique: { + args: Prisma.MFindUniqueArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + findUniqueOrThrow: { + args: Prisma.MFindUniqueOrThrowArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + findFirst: { + args: Prisma.MFindFirstArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + findFirstOrThrow: { + args: Prisma.MFindFirstOrThrowArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + findMany: { + args: Prisma.MFindManyArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + create: { + args: Prisma.MCreateArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + createMany: { + args: Prisma.MCreateManyArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + delete: { + args: Prisma.MDeleteArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + update: { + args: Prisma.MUpdateArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + deleteMany: { + args: Prisma.MDeleteManyArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + updateMany: { + args: Prisma.MUpdateManyArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + upsert: { + args: Prisma.MUpsertArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + aggregate: { + args: Prisma.MAggregateArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + groupBy: { + args: Prisma.MGroupByArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + findRaw: { + args: Prisma.MFindRawArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + aggregateRaw: { + args: Prisma.MAggregateRawArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + count: { + args: Prisma.MCountArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + } + N: { + findUnique: { + args: Prisma.NFindUniqueArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + findUniqueOrThrow: { + args: Prisma.NFindUniqueOrThrowArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + findFirst: { + args: Prisma.NFindFirstArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + findFirstOrThrow: { + args: Prisma.NFindFirstOrThrowArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + findMany: { + args: Prisma.NFindManyArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + create: { + args: Prisma.NCreateArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + createMany: { + args: Prisma.NCreateManyArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + delete: { + args: Prisma.NDeleteArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + update: { + args: Prisma.NUpdateArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + deleteMany: { + args: Prisma.NDeleteManyArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + updateMany: { + args: Prisma.NUpdateManyArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + upsert: { + args: Prisma.NUpsertArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + aggregate: { + args: Prisma.NAggregateArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + groupBy: { + args: Prisma.NGroupByArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + findRaw: { + args: Prisma.NFindRawArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + aggregateRaw: { + args: Prisma.NAggregateRawArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + count: { + args: Prisma.NCountArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + } + OneOptional: { + findUnique: { + args: Prisma.OneOptionalFindUniqueArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + findUniqueOrThrow: { + args: Prisma.OneOptionalFindUniqueOrThrowArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + findFirst: { + args: Prisma.OneOptionalFindFirstArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + findFirstOrThrow: { + args: Prisma.OneOptionalFindFirstOrThrowArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + findMany: { + args: Prisma.OneOptionalFindManyArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + create: { + args: Prisma.OneOptionalCreateArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + createMany: { + args: Prisma.OneOptionalCreateManyArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + delete: { + args: Prisma.OneOptionalDeleteArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + update: { + args: Prisma.OneOptionalUpdateArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + deleteMany: { + args: Prisma.OneOptionalDeleteManyArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + updateMany: { + args: Prisma.OneOptionalUpdateManyArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + upsert: { + args: Prisma.OneOptionalUpsertArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + aggregate: { + args: Prisma.OneOptionalAggregateArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + groupBy: { + args: Prisma.OneOptionalGroupByArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + findRaw: { + args: Prisma.OneOptionalFindRawArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + aggregateRaw: { + args: Prisma.OneOptionalAggregateRawArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + count: { + args: Prisma.OneOptionalCountArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + } + ManyRequired: { + findUnique: { + args: Prisma.ManyRequiredFindUniqueArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + findUniqueOrThrow: { + args: Prisma.ManyRequiredFindUniqueOrThrowArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + findFirst: { + args: Prisma.ManyRequiredFindFirstArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + findFirstOrThrow: { + args: Prisma.ManyRequiredFindFirstOrThrowArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + findMany: { + args: Prisma.ManyRequiredFindManyArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + create: { + args: Prisma.ManyRequiredCreateArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + createMany: { + args: Prisma.ManyRequiredCreateManyArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + delete: { + args: Prisma.ManyRequiredDeleteArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + update: { + args: Prisma.ManyRequiredUpdateArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + deleteMany: { + args: Prisma.ManyRequiredDeleteManyArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + updateMany: { + args: Prisma.ManyRequiredUpdateManyArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + upsert: { + args: Prisma.ManyRequiredUpsertArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + aggregate: { + args: Prisma.ManyRequiredAggregateArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + groupBy: { + args: Prisma.ManyRequiredGroupByArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + findRaw: { + args: Prisma.ManyRequiredFindRawArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + aggregateRaw: { + args: Prisma.ManyRequiredAggregateRawArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + count: { + args: Prisma.ManyRequiredCountArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + } + OptionalSide1: { + findUnique: { + args: Prisma.OptionalSide1FindUniqueArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + findUniqueOrThrow: { + args: Prisma.OptionalSide1FindUniqueOrThrowArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + findFirst: { + args: Prisma.OptionalSide1FindFirstArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + findFirstOrThrow: { + args: Prisma.OptionalSide1FindFirstOrThrowArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + findMany: { + args: Prisma.OptionalSide1FindManyArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + create: { + args: Prisma.OptionalSide1CreateArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + createMany: { + args: Prisma.OptionalSide1CreateManyArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + delete: { + args: Prisma.OptionalSide1DeleteArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + update: { + args: Prisma.OptionalSide1UpdateArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + deleteMany: { + args: Prisma.OptionalSide1DeleteManyArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + updateMany: { + args: Prisma.OptionalSide1UpdateManyArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + upsert: { + args: Prisma.OptionalSide1UpsertArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + aggregate: { + args: Prisma.OptionalSide1AggregateArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + groupBy: { + args: Prisma.OptionalSide1GroupByArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + findRaw: { + args: Prisma.OptionalSide1FindRawArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + aggregateRaw: { + args: Prisma.OptionalSide1AggregateRawArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + count: { + args: Prisma.OptionalSide1CountArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + } + OptionalSide2: { + findUnique: { + args: Prisma.OptionalSide2FindUniqueArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + findUniqueOrThrow: { + args: Prisma.OptionalSide2FindUniqueOrThrowArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + findFirst: { + args: Prisma.OptionalSide2FindFirstArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + findFirstOrThrow: { + args: Prisma.OptionalSide2FindFirstOrThrowArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + findMany: { + args: Prisma.OptionalSide2FindManyArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + create: { + args: Prisma.OptionalSide2CreateArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + createMany: { + args: Prisma.OptionalSide2CreateManyArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + delete: { + args: Prisma.OptionalSide2DeleteArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + update: { + args: Prisma.OptionalSide2UpdateArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + deleteMany: { + args: Prisma.OptionalSide2DeleteManyArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + updateMany: { + args: Prisma.OptionalSide2UpdateManyArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + upsert: { + args: Prisma.OptionalSide2UpsertArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + aggregate: { + args: Prisma.OptionalSide2AggregateArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + groupBy: { + args: Prisma.OptionalSide2GroupByArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + findRaw: { + args: Prisma.OptionalSide2FindRawArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + aggregateRaw: { + args: Prisma.OptionalSide2AggregateRawArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + count: { + args: Prisma.OptionalSide2CountArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + } + A: { + findUnique: { + args: Prisma.AFindUniqueArgs, + result: $Utils.OptionalFlat + payload: APayload + } + findUniqueOrThrow: { + args: Prisma.AFindUniqueOrThrowArgs, + result: $Utils.OptionalFlat + payload: APayload + } + findFirst: { + args: Prisma.AFindFirstArgs, + result: $Utils.OptionalFlat + payload: APayload + } + findFirstOrThrow: { + args: Prisma.AFindFirstOrThrowArgs, + result: $Utils.OptionalFlat + payload: APayload + } + findMany: { + args: Prisma.AFindManyArgs, + result: $Utils.OptionalFlat + payload: APayload + } + create: { + args: Prisma.ACreateArgs, + result: $Utils.OptionalFlat + payload: APayload + } + createMany: { + args: Prisma.ACreateManyArgs, + result: $Utils.OptionalFlat + payload: APayload + } + delete: { + args: Prisma.ADeleteArgs, + result: $Utils.OptionalFlat + payload: APayload + } + update: { + args: Prisma.AUpdateArgs, + result: $Utils.OptionalFlat + payload: APayload + } + deleteMany: { + args: Prisma.ADeleteManyArgs, + result: $Utils.OptionalFlat + payload: APayload + } + updateMany: { + args: Prisma.AUpdateManyArgs, + result: $Utils.OptionalFlat + payload: APayload + } + upsert: { + args: Prisma.AUpsertArgs, + result: $Utils.OptionalFlat + payload: APayload + } + aggregate: { + args: Prisma.AAggregateArgs, + result: $Utils.OptionalFlat + payload: APayload + } + groupBy: { + args: Prisma.AGroupByArgs, + result: $Utils.OptionalFlat + payload: APayload + } + findRaw: { + args: Prisma.AFindRawArgs, + result: $Utils.OptionalFlat + payload: APayload + } + aggregateRaw: { + args: Prisma.AAggregateRawArgs, + result: $Utils.OptionalFlat + payload: APayload + } + count: { + args: Prisma.ACountArgs, + result: $Utils.OptionalFlat + payload: APayload + } + } + B: { + findUnique: { + args: Prisma.BFindUniqueArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + findUniqueOrThrow: { + args: Prisma.BFindUniqueOrThrowArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + findFirst: { + args: Prisma.BFindFirstArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + findFirstOrThrow: { + args: Prisma.BFindFirstOrThrowArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + findMany: { + args: Prisma.BFindManyArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + create: { + args: Prisma.BCreateArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + createMany: { + args: Prisma.BCreateManyArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + delete: { + args: Prisma.BDeleteArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + update: { + args: Prisma.BUpdateArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + deleteMany: { + args: Prisma.BDeleteManyArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + updateMany: { + args: Prisma.BUpdateManyArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + upsert: { + args: Prisma.BUpsertArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + aggregate: { + args: Prisma.BAggregateArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + groupBy: { + args: Prisma.BGroupByArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + findRaw: { + args: Prisma.BFindRawArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + aggregateRaw: { + args: Prisma.BAggregateRawArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + count: { + args: Prisma.BCountArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + } + C: { + findUnique: { + args: Prisma.CFindUniqueArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + findUniqueOrThrow: { + args: Prisma.CFindUniqueOrThrowArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + findFirst: { + args: Prisma.CFindFirstArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + findFirstOrThrow: { + args: Prisma.CFindFirstOrThrowArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + findMany: { + args: Prisma.CFindManyArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + create: { + args: Prisma.CCreateArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + createMany: { + args: Prisma.CCreateManyArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + delete: { + args: Prisma.CDeleteArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + update: { + args: Prisma.CUpdateArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + deleteMany: { + args: Prisma.CDeleteManyArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + updateMany: { + args: Prisma.CUpdateManyArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + upsert: { + args: Prisma.CUpsertArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + aggregate: { + args: Prisma.CAggregateArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + groupBy: { + args: Prisma.CGroupByArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + findRaw: { + args: Prisma.CFindRawArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + aggregateRaw: { + args: Prisma.CAggregateRawArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + count: { + args: Prisma.CCountArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + } + D: { + findUnique: { + args: Prisma.DFindUniqueArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + findUniqueOrThrow: { + args: Prisma.DFindUniqueOrThrowArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + findFirst: { + args: Prisma.DFindFirstArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + findFirstOrThrow: { + args: Prisma.DFindFirstOrThrowArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + findMany: { + args: Prisma.DFindManyArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + create: { + args: Prisma.DCreateArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + createMany: { + args: Prisma.DCreateManyArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + delete: { + args: Prisma.DDeleteArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + update: { + args: Prisma.DUpdateArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + deleteMany: { + args: Prisma.DDeleteManyArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + updateMany: { + args: Prisma.DUpdateManyArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + upsert: { + args: Prisma.DUpsertArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + aggregate: { + args: Prisma.DAggregateArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + groupBy: { + args: Prisma.DGroupByArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + findRaw: { + args: Prisma.DFindRawArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + aggregateRaw: { + args: Prisma.DAggregateRawArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + count: { + args: Prisma.DCountArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + } + E: { + findUnique: { + args: Prisma.EFindUniqueArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + findUniqueOrThrow: { + args: Prisma.EFindUniqueOrThrowArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + findFirst: { + args: Prisma.EFindFirstArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + findFirstOrThrow: { + args: Prisma.EFindFirstOrThrowArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + findMany: { + args: Prisma.EFindManyArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + create: { + args: Prisma.ECreateArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + createMany: { + args: Prisma.ECreateManyArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + delete: { + args: Prisma.EDeleteArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + update: { + args: Prisma.EUpdateArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + deleteMany: { + args: Prisma.EDeleteManyArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + updateMany: { + args: Prisma.EUpdateManyArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + upsert: { + args: Prisma.EUpsertArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + aggregate: { + args: Prisma.EAggregateArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + groupBy: { + args: Prisma.EGroupByArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + findRaw: { + args: Prisma.EFindRawArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + aggregateRaw: { + args: Prisma.EAggregateRawArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + count: { + args: Prisma.ECountArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + } + } + } & { + other: { + $runCommandRaw: { + args: Prisma.InputJsonObject, + result: Prisma.JsonObject + payload: any + } + } + } + export const defineExtension: $Extensions.ExtendsHook<'define', Prisma.TypeMapCb, $Extensions.DefaultArgs> export type DefaultPrismaClient = PrismaClient export type RejectOnNotFound = boolean | ((error: Error) => Error) export type RejectPerModel = { [P in ModelName]?: RejectOnNotFound } @@ -1463,7 +2837,7 @@ export namespace Prisma { /** * \`PrismaClient\` proxy available in interactive transactions. */ - export type TransactionClient = Omit + export type TransactionClient = Omit export type Datasource = { url?: string @@ -1483,36 +2857,28 @@ export namespace Prisma { posts: number } - export type UserCountOutputTypeSelect = { - posts?: boolean + export type UserCountOutputTypeSelect = { + posts?: boolean | UserCountOutputTypeCountPostsArgs } - export type UserCountOutputTypeGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? UserCountOutputType : - S extends undefined ? never : - S extends { include: any } & (UserCountOutputTypeArgs) - ? UserCountOutputType - : S extends { select: any } & (UserCountOutputTypeArgs) - ? { - [P in TruthyKeys]: - P extends keyof UserCountOutputType ? UserCountOutputType[P] : never - } - : UserCountOutputType - - - - // Custom InputTypes /** * UserCountOutputType without action */ - export type UserCountOutputTypeArgs = { + export type UserCountOutputTypeArgs = { /** * Select specific fields to fetch from the UserCountOutputType */ - select?: UserCountOutputTypeSelect | null + select?: UserCountOutputTypeSelect | null + } + + + /** + * UserCountOutputType without action + */ + export type UserCountOutputTypeCountPostsArgs = { + where?: PostWhereInput } @@ -1526,36 +2892,28 @@ export namespace Prisma { User: number } - export type EmbedHolderCountOutputTypeSelect = { - User?: boolean + export type EmbedHolderCountOutputTypeSelect = { + User?: boolean | EmbedHolderCountOutputTypeCountUserArgs } - export type EmbedHolderCountOutputTypeGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? EmbedHolderCountOutputType : - S extends undefined ? never : - S extends { include: any } & (EmbedHolderCountOutputTypeArgs) - ? EmbedHolderCountOutputType - : S extends { select: any } & (EmbedHolderCountOutputTypeArgs) - ? { - [P in TruthyKeys]: - P extends keyof EmbedHolderCountOutputType ? EmbedHolderCountOutputType[P] : never - } - : EmbedHolderCountOutputType - - - - // Custom InputTypes /** * EmbedHolderCountOutputType without action */ - export type EmbedHolderCountOutputTypeArgs = { + export type EmbedHolderCountOutputTypeArgs = { /** * Select specific fields to fetch from the EmbedHolderCountOutputType */ - select?: EmbedHolderCountOutputTypeSelect | null + select?: EmbedHolderCountOutputTypeSelect | null + } + + + /** + * EmbedHolderCountOutputType without action + */ + export type EmbedHolderCountOutputTypeCountUserArgs = { + where?: UserWhereInput } @@ -1569,36 +2927,28 @@ export namespace Prisma { n: number } - export type MCountOutputTypeSelect = { - n?: boolean + export type MCountOutputTypeSelect = { + n?: boolean | MCountOutputTypeCountNArgs } - export type MCountOutputTypeGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? MCountOutputType : - S extends undefined ? never : - S extends { include: any } & (MCountOutputTypeArgs) - ? MCountOutputType - : S extends { select: any } & (MCountOutputTypeArgs) - ? { - [P in TruthyKeys]: - P extends keyof MCountOutputType ? MCountOutputType[P] : never - } - : MCountOutputType - - - - // Custom InputTypes /** * MCountOutputType without action */ - export type MCountOutputTypeArgs = { + export type MCountOutputTypeArgs = { /** * Select specific fields to fetch from the MCountOutputType */ - select?: MCountOutputTypeSelect | null + select?: MCountOutputTypeSelect | null + } + + + /** + * MCountOutputType without action + */ + export type MCountOutputTypeCountNArgs = { + where?: NWhereInput } @@ -1612,36 +2962,28 @@ export namespace Prisma { m: number } - export type NCountOutputTypeSelect = { - m?: boolean + export type NCountOutputTypeSelect = { + m?: boolean | NCountOutputTypeCountMArgs } - export type NCountOutputTypeGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? NCountOutputType : - S extends undefined ? never : - S extends { include: any } & (NCountOutputTypeArgs) - ? NCountOutputType - : S extends { select: any } & (NCountOutputTypeArgs) - ? { - [P in TruthyKeys]: - P extends keyof NCountOutputType ? NCountOutputType[P] : never - } - : NCountOutputType - - - - // Custom InputTypes /** * NCountOutputType without action */ - export type NCountOutputTypeArgs = { + export type NCountOutputTypeArgs = { /** * Select specific fields to fetch from the NCountOutputType */ - select?: NCountOutputTypeSelect | null + select?: NCountOutputTypeSelect | null + } + + + /** + * NCountOutputType without action + */ + export type NCountOutputTypeCountMArgs = { + where?: MWhereInput } @@ -1655,36 +2997,28 @@ export namespace Prisma { many: number } - export type OneOptionalCountOutputTypeSelect = { - many?: boolean + export type OneOptionalCountOutputTypeSelect = { + many?: boolean | OneOptionalCountOutputTypeCountManyArgs } - export type OneOptionalCountOutputTypeGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? OneOptionalCountOutputType : - S extends undefined ? never : - S extends { include: any } & (OneOptionalCountOutputTypeArgs) - ? OneOptionalCountOutputType - : S extends { select: any } & (OneOptionalCountOutputTypeArgs) - ? { - [P in TruthyKeys]: - P extends keyof OneOptionalCountOutputType ? OneOptionalCountOutputType[P] : never - } - : OneOptionalCountOutputType - - - - // Custom InputTypes /** * OneOptionalCountOutputType without action */ - export type OneOptionalCountOutputTypeArgs = { + export type OneOptionalCountOutputTypeArgs = { /** * Select specific fields to fetch from the OneOptionalCountOutputType */ - select?: OneOptionalCountOutputTypeSelect | null + select?: OneOptionalCountOutputTypeSelect | null + } + + + /** + * OneOptionalCountOutputType without action + */ + export type OneOptionalCountOutputTypeCountManyArgs = { + where?: ManyRequiredWhereInput } @@ -1701,94 +3035,27 @@ export namespace Prisma { - export type EmbedSelect = { + export type EmbedSelect = $Extensions.GetSelect<{ text?: boolean boolean?: boolean - embedEmbedList?: boolean | EmbedEmbedArgs - requiredEmbedEmbed?: boolean | EmbedEmbedArgs - optionalEmbedEmbed?: boolean | EmbedEmbedArgs + embedEmbedList?: boolean | EmbedEmbedArgs + requiredEmbedEmbed?: boolean | EmbedEmbedArgs + optionalEmbedEmbed?: boolean | EmbedEmbedArgs scalarList?: boolean - } - - - export type EmbedInclude = {} - - export type EmbedGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? Embed : - S extends undefined ? never : - S extends { include: any } & (EmbedArgs) - ? Embed - : S extends { select: any } & (EmbedArgs) - ? { - [P in TruthyKeys]: - P extends 'embedEmbedList' ? Array < EmbedEmbedGetPayload> : - P extends 'requiredEmbedEmbed' ? EmbedEmbedGetPayload : - P extends 'optionalEmbedEmbed' ? EmbedEmbedGetPayload | null : P extends keyof Embed ? Embed[P] : never - } - : Embed - - - - export interface EmbedDelegate { - - - - - - + }, ExtArgs["result"]["embed"]> + export type EmbedSelectScalar = { + text?: boolean + boolean?: boolean + scalarList?: boolean } - /** - * The delegate class that acts as a "Promise-like" for Embed. - * Why is this prefixed with \`Prisma__\`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export class Prisma__EmbedClient implements Prisma.PrismaPromise { - private readonly _dmmf; - private readonly _queryType; - private readonly _rootField; - private readonly _clientMethod; - private readonly _args; - private readonly _dataPath; - private readonly _errorFormat; - private readonly _measurePerformance?; - private _isList; - private _callsite; - private _requestPromise?; - readonly [Symbol.toStringTag]: 'PrismaPromise'; - constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); + export type EmbedInclude = {} - embedEmbedList(args?: Subset): Prisma.PrismaPromise>| Null>; - requiredEmbedEmbed(args?: Subset): Prisma__EmbedEmbedClient | Null>; + type EmbedGetPayload = $Types.GetResult - optionalEmbedEmbed(args?: Subset): Prisma__EmbedEmbedClient | Null>; - private get _document(); - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): Promise; - } @@ -1797,15 +3064,15 @@ export namespace Prisma { /** * Embed without action */ - export type EmbedArgs = { + export type EmbedArgs = { /** * Select specific fields to fetch from the Embed */ - select?: EmbedSelect | null + select?: EmbedSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: EmbedInclude | null + include?: EmbedInclude | null } @@ -1818,81 +3085,20 @@ export namespace Prisma { - export type EmbedEmbedSelect = { + export type EmbedEmbedSelect = $Extensions.GetSelect<{ text?: boolean boolean?: boolean - } - - - export type EmbedEmbedGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? EmbedEmbed : - S extends undefined ? never : - S extends { include: any } & (EmbedEmbedArgs) - ? EmbedEmbed - : S extends { select: any } & (EmbedEmbedArgs) - ? { - [P in TruthyKeys]: - P extends keyof EmbedEmbed ? EmbedEmbed[P] : never - } - : EmbedEmbed - - - - export interface EmbedEmbedDelegate { - - - - - - + }, ExtArgs["result"]["embedEmbed"]> + export type EmbedEmbedSelectScalar = { + text?: boolean + boolean?: boolean } - /** - * The delegate class that acts as a "Promise-like" for EmbedEmbed. - * Why is this prefixed with \`Prisma__\`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export class Prisma__EmbedEmbedClient implements Prisma.PrismaPromise { - private readonly _dmmf; - private readonly _queryType; - private readonly _rootField; - private readonly _clientMethod; - private readonly _args; - private readonly _dataPath; - private readonly _errorFormat; - private readonly _measurePerformance?; - private _isList; - private _callsite; - private _requestPromise?; - readonly [Symbol.toStringTag]: 'PrismaPromise'; - constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); + + type EmbedEmbedGetPayload = $Types.GetResult - private get _document(); - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): Promise; - } @@ -1901,11 +3107,11 @@ export namespace Prisma { /** * EmbedEmbed without action */ - export type EmbedEmbedArgs = { + export type EmbedEmbedArgs = { /** * Select specific fields to fetch from the EmbedEmbed */ - select?: EmbedEmbedSelect | null + select?: EmbedEmbedSelect | null } @@ -1978,7 +3184,7 @@ export namespace Prisma { _all?: true } - export type PostAggregateArgs = { + export type PostAggregateArgs = { /** * Filter which Post to aggregate. */ @@ -2038,7 +3244,7 @@ export namespace Prisma { - export type PostGroupByArgs = { + export type PostGroupByArgs = { where?: PostWhereInput orderBy?: Enumerable by: PostScalarFieldEnum[] @@ -2077,45 +3283,39 @@ export namespace Prisma { > - export type PostSelect = { + export type PostSelect = $Extensions.GetSelect<{ id?: boolean createdAt?: boolean title?: boolean content?: boolean published?: boolean authorId?: boolean - author?: boolean | UserArgs - } + author?: boolean | UserArgs + }, ExtArgs["result"]["post"]> + export type PostSelectScalar = { + id?: boolean + createdAt?: boolean + title?: boolean + content?: boolean + published?: boolean + authorId?: boolean + } - export type PostInclude = { - author?: boolean | UserArgs + export type PostInclude = { + author?: boolean | UserArgs } - export type PostGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? Post : - S extends undefined ? never : - S extends { include: any } & (PostArgs | PostFindManyArgs) - ? Post & { - [P in TruthyKeys]: - P extends 'author' ? UserGetPayload : never - } - : S extends { select: any } & (PostArgs | PostFindManyArgs) - ? { - [P in TruthyKeys]: - P extends 'author' ? UserGetPayload : P extends keyof Post ? Post[P] : never - } - : Post + type PostGetPayload = $Types.GetResult - type PostCountArgs = + type PostCountArgs = Omit & { select?: PostCountAggregateInputType | true } - export interface PostDelegate { - + export interface PostDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Post'], meta: { name: 'Post' } } /** * Find zero or one Post that matches the filter. * @param {PostFindUniqueArgs} args - Arguments to find a Post @@ -2127,9 +3327,9 @@ export namespace Prisma { * } * }) **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__PostClient> : Prisma__PostClient | null, null> + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__PostClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__PostClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** * Find one Post that matches the filter or throw an error with \`error.code='P2025'\` @@ -2143,9 +3343,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__PostClient> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__PostClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** * Find the first Post that matches the filter. @@ -2160,9 +3360,9 @@ export namespace Prisma { * } * }) **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__PostClient> : Prisma__PostClient | null, null> + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__PostClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__PostClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> /** * Find the first Post that matches the filter or @@ -2178,9 +3378,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__PostClient> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__PostClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** * Find zero or more Posts that matches the filter. @@ -2198,9 +3398,9 @@ export namespace Prisma { * const postWithIdOnly = await prisma.post.findMany({ select: { id: true } }) * **/ - findMany( - args?: SelectSubset - ): Prisma.PrismaPromise>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** * Create a Post. @@ -2214,9 +3414,9 @@ export namespace Prisma { * }) * **/ - create( - args: SelectSubset - ): Prisma__PostClient> + create>( + args: SelectSubset> + ): Prisma__PostClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** * Create many Posts. @@ -2230,8 +3430,8 @@ export namespace Prisma { * }) * **/ - createMany( - args?: SelectSubset + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -2246,9 +3446,9 @@ export namespace Prisma { * }) * **/ - delete( - args: SelectSubset - ): Prisma__PostClient> + delete>( + args: SelectSubset> + ): Prisma__PostClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** * Update one Post. @@ -2265,9 +3465,9 @@ export namespace Prisma { * }) * **/ - update( - args: SelectSubset - ): Prisma__PostClient> + update>( + args: SelectSubset> + ): Prisma__PostClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** * Delete zero or more Posts. @@ -2281,8 +3481,8 @@ export namespace Prisma { * }) * **/ - deleteMany( - args?: SelectSubset + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -2302,8 +3502,8 @@ export namespace Prisma { * }) * **/ - updateMany( - args: SelectSubset + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** @@ -2323,9 +3523,9 @@ export namespace Prisma { * } * }) **/ - upsert( - args: SelectSubset - ): Prisma__PostClient> + upsert>( + args: SelectSubset> + ): Prisma__PostClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** * Find zero or more Posts that matches the filter. @@ -2370,7 +3570,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends _Record<'select', any> + T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -2488,7 +3688,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__PostClient implements Prisma.PrismaPromise { + export class Prisma__PostClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -2503,7 +3703,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - author(args?: Subset): Prisma__UserClient | Null>; + author = {}>(args?: Subset>): Prisma__UserClient<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; private get _document(); /** @@ -2535,15 +3735,15 @@ export namespace Prisma { /** * Post base type for findUnique actions */ - export type PostFindUniqueArgsBase = { + export type PostFindUniqueArgsBase = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * Filter, which Post to fetch. */ @@ -2553,7 +3753,7 @@ export namespace Prisma { /** * Post findUnique */ - export interface PostFindUniqueArgs extends PostFindUniqueArgsBase { + export interface PostFindUniqueArgs extends PostFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -2565,15 +3765,15 @@ export namespace Prisma { /** * Post findUniqueOrThrow */ - export type PostFindUniqueOrThrowArgs = { + export type PostFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * Filter, which Post to fetch. */ @@ -2584,15 +3784,15 @@ export namespace Prisma { /** * Post base type for findFirst actions */ - export type PostFindFirstArgsBase = { + export type PostFindFirstArgsBase = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * Filter, which Post to fetch. */ @@ -2632,7 +3832,7 @@ export namespace Prisma { /** * Post findFirst */ - export interface PostFindFirstArgs extends PostFindFirstArgsBase { + export interface PostFindFirstArgs extends PostFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -2644,15 +3844,15 @@ export namespace Prisma { /** * Post findFirstOrThrow */ - export type PostFindFirstOrThrowArgs = { + export type PostFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * Filter, which Post to fetch. */ @@ -2693,15 +3893,15 @@ export namespace Prisma { /** * Post findMany */ - export type PostFindManyArgs = { + export type PostFindManyArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * Filter, which Posts to fetch. */ @@ -2737,15 +3937,15 @@ export namespace Prisma { /** * Post create */ - export type PostCreateArgs = { + export type PostCreateArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * The data needed to create a Post. */ @@ -2756,7 +3956,7 @@ export namespace Prisma { /** * Post createMany */ - export type PostCreateManyArgs = { + export type PostCreateManyArgs = { /** * The data used to create many Posts. */ @@ -2767,15 +3967,15 @@ export namespace Prisma { /** * Post update */ - export type PostUpdateArgs = { + export type PostUpdateArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * The data needed to update a Post. */ @@ -2790,7 +3990,7 @@ export namespace Prisma { /** * Post updateMany */ - export type PostUpdateManyArgs = { + export type PostUpdateManyArgs = { /** * The data used to update Posts. */ @@ -2805,15 +4005,15 @@ export namespace Prisma { /** * Post upsert */ - export type PostUpsertArgs = { + export type PostUpsertArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * The filter to search for the Post to update in case it exists. */ @@ -2832,15 +4032,15 @@ export namespace Prisma { /** * Post delete */ - export type PostDeleteArgs = { + export type PostDeleteArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * Filter which Post to delete. */ @@ -2851,7 +4051,7 @@ export namespace Prisma { /** * Post deleteMany */ - export type PostDeleteManyArgs = { + export type PostDeleteManyArgs = { /** * Filter which Posts to delete */ @@ -2862,7 +4062,7 @@ export namespace Prisma { /** * Post findRaw */ - export type PostFindRawArgs = { + export type PostFindRawArgs = { /** * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. \${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}. */ @@ -2877,7 +4077,7 @@ export namespace Prisma { /** * Post aggregateRaw */ - export type PostAggregateRawArgs = { + export type PostAggregateRawArgs = { /** * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. \${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}. */ @@ -2892,15 +4092,15 @@ export namespace Prisma { /** * Post without action */ - export type PostArgs = { + export type PostArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null } @@ -3049,7 +4249,7 @@ export namespace Prisma { _all?: true } - export type UserAggregateArgs = { + export type UserAggregateArgs = { /** * Filter which User to aggregate. */ @@ -3121,7 +4321,7 @@ export namespace Prisma { - export type UserGroupByArgs = { + export type UserGroupByArgs = { where?: UserWhereInput orderBy?: Enumerable by: UserScalarFieldEnum[] @@ -3173,7 +4373,7 @@ export namespace Prisma { > - export type UserSelect = { + export type UserSelect = $Extensions.GetSelect<{ id?: boolean email?: boolean int?: boolean @@ -3189,46 +4389,45 @@ export namespace Prisma { boolean?: boolean optionalBoolean?: boolean embedHolderId?: boolean - posts?: boolean | User$postsArgs - embedHolder?: boolean | EmbedHolderArgs - _count?: boolean | UserCountOutputTypeArgs - } - - - export type UserInclude = { - posts?: boolean | User$postsArgs - embedHolder?: boolean | EmbedHolderArgs - _count?: boolean | UserCountOutputTypeArgs - } - - export type UserGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? User : - S extends undefined ? never : - S extends { include: any } & (UserArgs | UserFindManyArgs) - ? User & { - [P in TruthyKeys]: - P extends 'posts' ? Array < PostGetPayload> : - P extends 'embedHolder' ? EmbedHolderGetPayload : - P extends '_count' ? UserCountOutputTypeGetPayload : never - } - : S extends { select: any } & (UserArgs | UserFindManyArgs) - ? { - [P in TruthyKeys]: - P extends 'posts' ? Array < PostGetPayload> : - P extends 'embedHolder' ? EmbedHolderGetPayload : - P extends '_count' ? UserCountOutputTypeGetPayload : P extends keyof User ? User[P] : never - } - : User + posts?: boolean | User$postsArgs + embedHolder?: boolean | EmbedHolderArgs + _count?: boolean | UserCountOutputTypeArgs + }, ExtArgs["result"]["user"]> + + export type UserSelectScalar = { + id?: boolean + email?: boolean + int?: boolean + optionalInt?: boolean + float?: boolean + optionalFloat?: boolean + string?: boolean + optionalString?: boolean + json?: boolean + optionalJson?: boolean + enum?: boolean + optionalEnum?: boolean + boolean?: boolean + optionalBoolean?: boolean + embedHolderId?: boolean + } + + export type UserInclude = { + posts?: boolean | User$postsArgs + embedHolder?: boolean | EmbedHolderArgs + _count?: boolean | UserCountOutputTypeArgs + } - type UserCountArgs = + type UserGetPayload = $Types.GetResult + + type UserCountArgs = Omit & { select?: UserCountAggregateInputType | true } - export interface UserDelegate { - + export interface UserDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['User'], meta: { name: 'User' } } /** * Find zero or one User that matches the filter. * @param {UserFindUniqueArgs} args - Arguments to find a User @@ -3240,9 +4439,9 @@ export namespace Prisma { * } * }) **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__UserClient> : Prisma__UserClient | null, null> + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__UserClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__UserClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** * Find one User that matches the filter or throw an error with \`error.code='P2025'\` @@ -3256,9 +4455,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__UserClient> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__UserClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** * Find the first User that matches the filter. @@ -3273,9 +4472,9 @@ export namespace Prisma { * } * }) **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__UserClient> : Prisma__UserClient | null, null> + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__UserClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__UserClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> /** * Find the first User that matches the filter or @@ -3291,9 +4490,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__UserClient> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__UserClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** * Find zero or more Users that matches the filter. @@ -3311,9 +4510,9 @@ export namespace Prisma { * const userWithIdOnly = await prisma.user.findMany({ select: { id: true } }) * **/ - findMany( - args?: SelectSubset - ): Prisma.PrismaPromise>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** * Create a User. @@ -3327,9 +4526,9 @@ export namespace Prisma { * }) * **/ - create( - args: SelectSubset - ): Prisma__UserClient> + create>( + args: SelectSubset> + ): Prisma__UserClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** * Create many Users. @@ -3343,8 +4542,8 @@ export namespace Prisma { * }) * **/ - createMany( - args?: SelectSubset + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -3359,9 +4558,9 @@ export namespace Prisma { * }) * **/ - delete( - args: SelectSubset - ): Prisma__UserClient> + delete>( + args: SelectSubset> + ): Prisma__UserClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** * Update one User. @@ -3378,9 +4577,9 @@ export namespace Prisma { * }) * **/ - update( - args: SelectSubset - ): Prisma__UserClient> + update>( + args: SelectSubset> + ): Prisma__UserClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** * Delete zero or more Users. @@ -3394,8 +4593,8 @@ export namespace Prisma { * }) * **/ - deleteMany( - args?: SelectSubset + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -3415,8 +4614,8 @@ export namespace Prisma { * }) * **/ - updateMany( - args: SelectSubset + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** @@ -3436,9 +4635,9 @@ export namespace Prisma { * } * }) **/ - upsert( - args: SelectSubset - ): Prisma__UserClient> + upsert>( + args: SelectSubset> + ): Prisma__UserClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** * Find zero or more Users that matches the filter. @@ -3483,7 +4682,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends _Record<'select', any> + T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -3601,7 +4800,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__UserClient implements Prisma.PrismaPromise { + export class Prisma__UserClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -3616,9 +4815,9 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - posts(args?: Subset): Prisma.PrismaPromise>| Null>; + posts = {}>(args?: Subset>): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>| Null>; - embedHolder(args?: Subset): Prisma__EmbedHolderClient | Null>; + embedHolder = {}>(args?: Subset>): Prisma__EmbedHolderClient<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; private get _document(); /** @@ -3650,15 +4849,15 @@ export namespace Prisma { /** * User base type for findUnique actions */ - export type UserFindUniqueArgsBase = { + export type UserFindUniqueArgsBase = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * Filter, which User to fetch. */ @@ -3668,7 +4867,7 @@ export namespace Prisma { /** * User findUnique */ - export interface UserFindUniqueArgs extends UserFindUniqueArgsBase { + export interface UserFindUniqueArgs extends UserFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -3680,15 +4879,15 @@ export namespace Prisma { /** * User findUniqueOrThrow */ - export type UserFindUniqueOrThrowArgs = { + export type UserFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * Filter, which User to fetch. */ @@ -3699,15 +4898,15 @@ export namespace Prisma { /** * User base type for findFirst actions */ - export type UserFindFirstArgsBase = { + export type UserFindFirstArgsBase = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * Filter, which User to fetch. */ @@ -3747,7 +4946,7 @@ export namespace Prisma { /** * User findFirst */ - export interface UserFindFirstArgs extends UserFindFirstArgsBase { + export interface UserFindFirstArgs extends UserFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -3759,15 +4958,15 @@ export namespace Prisma { /** * User findFirstOrThrow */ - export type UserFindFirstOrThrowArgs = { + export type UserFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * Filter, which User to fetch. */ @@ -3808,15 +5007,15 @@ export namespace Prisma { /** * User findMany */ - export type UserFindManyArgs = { + export type UserFindManyArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * Filter, which Users to fetch. */ @@ -3852,15 +5051,15 @@ export namespace Prisma { /** * User create */ - export type UserCreateArgs = { + export type UserCreateArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * The data needed to create a User. */ @@ -3871,7 +5070,7 @@ export namespace Prisma { /** * User createMany */ - export type UserCreateManyArgs = { + export type UserCreateManyArgs = { /** * The data used to create many Users. */ @@ -3882,15 +5081,15 @@ export namespace Prisma { /** * User update */ - export type UserUpdateArgs = { + export type UserUpdateArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * The data needed to update a User. */ @@ -3905,7 +5104,7 @@ export namespace Prisma { /** * User updateMany */ - export type UserUpdateManyArgs = { + export type UserUpdateManyArgs = { /** * The data used to update Users. */ @@ -3920,15 +5119,15 @@ export namespace Prisma { /** * User upsert */ - export type UserUpsertArgs = { + export type UserUpsertArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * The filter to search for the User to update in case it exists. */ @@ -3947,15 +5146,15 @@ export namespace Prisma { /** * User delete */ - export type UserDeleteArgs = { + export type UserDeleteArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * Filter which User to delete. */ @@ -3966,7 +5165,7 @@ export namespace Prisma { /** * User deleteMany */ - export type UserDeleteManyArgs = { + export type UserDeleteManyArgs = { /** * Filter which Users to delete */ @@ -3977,7 +5176,7 @@ export namespace Prisma { /** * User findRaw */ - export type UserFindRawArgs = { + export type UserFindRawArgs = { /** * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. \${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}. */ @@ -3992,7 +5191,7 @@ export namespace Prisma { /** * User aggregateRaw */ - export type UserAggregateRawArgs = { + export type UserAggregateRawArgs = { /** * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. \${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}. */ @@ -4007,15 +5206,15 @@ export namespace Prisma { /** * User.posts */ - export type User$postsArgs = { + export type User$postsArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null where?: PostWhereInput orderBy?: Enumerable cursor?: PostWhereUniqueInput @@ -4028,15 +5227,15 @@ export namespace Prisma { /** * User without action */ - export type UserArgs = { + export type UserArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null } @@ -4097,7 +5296,7 @@ export namespace Prisma { _all?: true } - export type EmbedHolderAggregateArgs = { + export type EmbedHolderAggregateArgs = { /** * Filter which EmbedHolder to aggregate. */ @@ -4157,7 +5356,7 @@ export namespace Prisma { - export type EmbedHolderGroupByArgs = { + export type EmbedHolderGroupByArgs = { where?: EmbedHolderWhereInput orderBy?: Enumerable by: EmbedHolderScalarFieldEnum[] @@ -4194,53 +5393,40 @@ export namespace Prisma { > - export type EmbedHolderSelect = { + export type EmbedHolderSelect = $Extensions.GetSelect<{ id?: boolean time?: boolean text?: boolean boolean?: boolean - embedList?: boolean | EmbedArgs - requiredEmbed?: boolean | EmbedArgs - optionalEmbed?: boolean | EmbedArgs - User?: boolean | EmbedHolder$UserArgs - _count?: boolean | EmbedHolderCountOutputTypeArgs - } - - - export type EmbedHolderInclude = { - User?: boolean | EmbedHolder$UserArgs - _count?: boolean | EmbedHolderCountOutputTypeArgs - } - - export type EmbedHolderGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? EmbedHolder : - S extends undefined ? never : - S extends { include: any } & (EmbedHolderArgs | EmbedHolderFindManyArgs) - ? EmbedHolder & { - [P in TruthyKeys]: - P extends 'User' ? Array < UserGetPayload> : - P extends '_count' ? EmbedHolderCountOutputTypeGetPayload : never - } - : S extends { select: any } & (EmbedHolderArgs | EmbedHolderFindManyArgs) - ? { - [P in TruthyKeys]: - P extends 'embedList' ? Array < EmbedGetPayload> : - P extends 'requiredEmbed' ? EmbedGetPayload : - P extends 'optionalEmbed' ? EmbedGetPayload | null : - P extends 'User' ? Array < UserGetPayload> : - P extends '_count' ? EmbedHolderCountOutputTypeGetPayload : P extends keyof EmbedHolder ? EmbedHolder[P] : never - } - : EmbedHolder + embedList?: boolean | EmbedArgs + requiredEmbed?: boolean | EmbedArgs + optionalEmbed?: boolean | EmbedArgs + User?: boolean | EmbedHolder$UserArgs + _count?: boolean | EmbedHolderCountOutputTypeArgs + }, ExtArgs["result"]["embedHolder"]> + + export type EmbedHolderSelectScalar = { + id?: boolean + time?: boolean + text?: boolean + boolean?: boolean + } + + export type EmbedHolderInclude = { + User?: boolean | EmbedHolder$UserArgs + _count?: boolean | EmbedHolderCountOutputTypeArgs + } - type EmbedHolderCountArgs = + type EmbedHolderGetPayload = $Types.GetResult + + type EmbedHolderCountArgs = Omit & { select?: EmbedHolderCountAggregateInputType | true } - export interface EmbedHolderDelegate { - + export interface EmbedHolderDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['EmbedHolder'], meta: { name: 'EmbedHolder' } } /** * Find zero or one EmbedHolder that matches the filter. * @param {EmbedHolderFindUniqueArgs} args - Arguments to find a EmbedHolder @@ -4252,9 +5438,9 @@ export namespace Prisma { * } * }) **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__EmbedHolderClient> : Prisma__EmbedHolderClient | null, null> + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__EmbedHolderClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__EmbedHolderClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** * Find one EmbedHolder that matches the filter or throw an error with \`error.code='P2025'\` @@ -4268,9 +5454,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__EmbedHolderClient> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__EmbedHolderClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** * Find the first EmbedHolder that matches the filter. @@ -4285,9 +5471,9 @@ export namespace Prisma { * } * }) **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__EmbedHolderClient> : Prisma__EmbedHolderClient | null, null> + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__EmbedHolderClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__EmbedHolderClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> /** * Find the first EmbedHolder that matches the filter or @@ -4303,9 +5489,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__EmbedHolderClient> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__EmbedHolderClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** * Find zero or more EmbedHolders that matches the filter. @@ -4323,9 +5509,9 @@ export namespace Prisma { * const embedHolderWithIdOnly = await prisma.embedHolder.findMany({ select: { id: true } }) * **/ - findMany( - args?: SelectSubset - ): Prisma.PrismaPromise>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** * Create a EmbedHolder. @@ -4339,9 +5525,9 @@ export namespace Prisma { * }) * **/ - create( - args: SelectSubset - ): Prisma__EmbedHolderClient> + create>( + args: SelectSubset> + ): Prisma__EmbedHolderClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** * Create many EmbedHolders. @@ -4355,8 +5541,8 @@ export namespace Prisma { * }) * **/ - createMany( - args?: SelectSubset + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -4371,9 +5557,9 @@ export namespace Prisma { * }) * **/ - delete( - args: SelectSubset - ): Prisma__EmbedHolderClient> + delete>( + args: SelectSubset> + ): Prisma__EmbedHolderClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** * Update one EmbedHolder. @@ -4390,9 +5576,9 @@ export namespace Prisma { * }) * **/ - update( - args: SelectSubset - ): Prisma__EmbedHolderClient> + update>( + args: SelectSubset> + ): Prisma__EmbedHolderClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** * Delete zero or more EmbedHolders. @@ -4406,8 +5592,8 @@ export namespace Prisma { * }) * **/ - deleteMany( - args?: SelectSubset + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -4427,8 +5613,8 @@ export namespace Prisma { * }) * **/ - updateMany( - args: SelectSubset + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** @@ -4448,9 +5634,9 @@ export namespace Prisma { * } * }) **/ - upsert( - args: SelectSubset - ): Prisma__EmbedHolderClient> + upsert>( + args: SelectSubset> + ): Prisma__EmbedHolderClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** * Find zero or more EmbedHolders that matches the filter. @@ -4495,7 +5681,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends _Record<'select', any> + T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -4613,7 +5799,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__EmbedHolderClient implements Prisma.PrismaPromise { + export class Prisma__EmbedHolderClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -4628,13 +5814,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - embedList(args?: Subset): Prisma.PrismaPromise>| Null>; - - requiredEmbed(args?: Subset): Prisma__EmbedClient | Null>; - - optionalEmbed(args?: Subset): Prisma__EmbedClient | Null>; - - User(args?: Subset): Prisma.PrismaPromise>| Null>; + User = {}>(args?: Subset>): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>| Null>; private get _document(); /** @@ -4666,15 +5846,15 @@ export namespace Prisma { /** * EmbedHolder base type for findUnique actions */ - export type EmbedHolderFindUniqueArgsBase = { + export type EmbedHolderFindUniqueArgsBase = { /** * Select specific fields to fetch from the EmbedHolder */ - select?: EmbedHolderSelect | null + select?: EmbedHolderSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: EmbedHolderInclude | null + include?: EmbedHolderInclude | null /** * Filter, which EmbedHolder to fetch. */ @@ -4684,7 +5864,7 @@ export namespace Prisma { /** * EmbedHolder findUnique */ - export interface EmbedHolderFindUniqueArgs extends EmbedHolderFindUniqueArgsBase { + export interface EmbedHolderFindUniqueArgs extends EmbedHolderFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -4696,15 +5876,15 @@ export namespace Prisma { /** * EmbedHolder findUniqueOrThrow */ - export type EmbedHolderFindUniqueOrThrowArgs = { + export type EmbedHolderFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the EmbedHolder */ - select?: EmbedHolderSelect | null + select?: EmbedHolderSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: EmbedHolderInclude | null + include?: EmbedHolderInclude | null /** * Filter, which EmbedHolder to fetch. */ @@ -4715,15 +5895,15 @@ export namespace Prisma { /** * EmbedHolder base type for findFirst actions */ - export type EmbedHolderFindFirstArgsBase = { + export type EmbedHolderFindFirstArgsBase = { /** * Select specific fields to fetch from the EmbedHolder */ - select?: EmbedHolderSelect | null + select?: EmbedHolderSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: EmbedHolderInclude | null + include?: EmbedHolderInclude | null /** * Filter, which EmbedHolder to fetch. */ @@ -4763,7 +5943,7 @@ export namespace Prisma { /** * EmbedHolder findFirst */ - export interface EmbedHolderFindFirstArgs extends EmbedHolderFindFirstArgsBase { + export interface EmbedHolderFindFirstArgs extends EmbedHolderFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -4775,15 +5955,15 @@ export namespace Prisma { /** * EmbedHolder findFirstOrThrow */ - export type EmbedHolderFindFirstOrThrowArgs = { + export type EmbedHolderFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the EmbedHolder */ - select?: EmbedHolderSelect | null + select?: EmbedHolderSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: EmbedHolderInclude | null + include?: EmbedHolderInclude | null /** * Filter, which EmbedHolder to fetch. */ @@ -4824,15 +6004,15 @@ export namespace Prisma { /** * EmbedHolder findMany */ - export type EmbedHolderFindManyArgs = { + export type EmbedHolderFindManyArgs = { /** * Select specific fields to fetch from the EmbedHolder */ - select?: EmbedHolderSelect | null + select?: EmbedHolderSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: EmbedHolderInclude | null + include?: EmbedHolderInclude | null /** * Filter, which EmbedHolders to fetch. */ @@ -4868,15 +6048,15 @@ export namespace Prisma { /** * EmbedHolder create */ - export type EmbedHolderCreateArgs = { + export type EmbedHolderCreateArgs = { /** * Select specific fields to fetch from the EmbedHolder */ - select?: EmbedHolderSelect | null + select?: EmbedHolderSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: EmbedHolderInclude | null + include?: EmbedHolderInclude | null /** * The data needed to create a EmbedHolder. */ @@ -4887,7 +6067,7 @@ export namespace Prisma { /** * EmbedHolder createMany */ - export type EmbedHolderCreateManyArgs = { + export type EmbedHolderCreateManyArgs = { /** * The data used to create many EmbedHolders. */ @@ -4898,15 +6078,15 @@ export namespace Prisma { /** * EmbedHolder update */ - export type EmbedHolderUpdateArgs = { + export type EmbedHolderUpdateArgs = { /** * Select specific fields to fetch from the EmbedHolder */ - select?: EmbedHolderSelect | null + select?: EmbedHolderSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: EmbedHolderInclude | null + include?: EmbedHolderInclude | null /** * The data needed to update a EmbedHolder. */ @@ -4921,7 +6101,7 @@ export namespace Prisma { /** * EmbedHolder updateMany */ - export type EmbedHolderUpdateManyArgs = { + export type EmbedHolderUpdateManyArgs = { /** * The data used to update EmbedHolders. */ @@ -4936,15 +6116,15 @@ export namespace Prisma { /** * EmbedHolder upsert */ - export type EmbedHolderUpsertArgs = { + export type EmbedHolderUpsertArgs = { /** * Select specific fields to fetch from the EmbedHolder */ - select?: EmbedHolderSelect | null + select?: EmbedHolderSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: EmbedHolderInclude | null + include?: EmbedHolderInclude | null /** * The filter to search for the EmbedHolder to update in case it exists. */ @@ -4963,15 +6143,15 @@ export namespace Prisma { /** * EmbedHolder delete */ - export type EmbedHolderDeleteArgs = { + export type EmbedHolderDeleteArgs = { /** * Select specific fields to fetch from the EmbedHolder */ - select?: EmbedHolderSelect | null + select?: EmbedHolderSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: EmbedHolderInclude | null + include?: EmbedHolderInclude | null /** * Filter which EmbedHolder to delete. */ @@ -4982,7 +6162,7 @@ export namespace Prisma { /** * EmbedHolder deleteMany */ - export type EmbedHolderDeleteManyArgs = { + export type EmbedHolderDeleteManyArgs = { /** * Filter which EmbedHolders to delete */ @@ -4993,7 +6173,7 @@ export namespace Prisma { /** * EmbedHolder findRaw */ - export type EmbedHolderFindRawArgs = { + export type EmbedHolderFindRawArgs = { /** * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. \${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}. */ @@ -5008,7 +6188,7 @@ export namespace Prisma { /** * EmbedHolder aggregateRaw */ - export type EmbedHolderAggregateRawArgs = { + export type EmbedHolderAggregateRawArgs = { /** * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. \${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}. */ @@ -5023,15 +6203,15 @@ export namespace Prisma { /** * EmbedHolder.User */ - export type EmbedHolder$UserArgs = { + export type EmbedHolder$UserArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null where?: UserWhereInput orderBy?: Enumerable cursor?: UserWhereUniqueInput @@ -5044,15 +6224,15 @@ export namespace Prisma { /** * EmbedHolder without action */ - export type EmbedHolderArgs = { + export type EmbedHolderArgs = { /** * Select specific fields to fetch from the EmbedHolder */ - select?: EmbedHolderSelect | null + select?: EmbedHolderSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: EmbedHolderInclude | null + include?: EmbedHolderInclude | null } @@ -5191,7 +6371,7 @@ export namespace Prisma { _all?: true } - export type MAggregateArgs = { + export type MAggregateArgs = { /** * Filter which M to aggregate. */ @@ -5263,7 +6443,7 @@ export namespace Prisma { - export type MGroupByArgs = { + export type MGroupByArgs = { where?: MWhereInput orderBy?: Enumerable by: MScalarFieldEnum[] @@ -5314,7 +6494,7 @@ export namespace Prisma { > - export type MSelect = { + export type MSelect = $Extensions.GetSelect<{ id?: boolean n_ids?: boolean int?: boolean @@ -5329,42 +6509,42 @@ export namespace Prisma { optionalEnum?: boolean boolean?: boolean optionalBoolean?: boolean - n?: boolean | M$nArgs - _count?: boolean | MCountOutputTypeArgs - } + n?: boolean | M$nArgs + _count?: boolean | MCountOutputTypeArgs + }, ExtArgs["result"]["m"]> + export type MSelectScalar = { + id?: boolean + n_ids?: boolean + int?: boolean + optionalInt?: boolean + float?: boolean + optionalFloat?: boolean + string?: boolean + optionalString?: boolean + json?: boolean + optionalJson?: boolean + enum?: boolean + optionalEnum?: boolean + boolean?: boolean + optionalBoolean?: boolean + } - export type MInclude = { - n?: boolean | M$nArgs - _count?: boolean | MCountOutputTypeArgs + export type MInclude = { + n?: boolean | M$nArgs + _count?: boolean | MCountOutputTypeArgs } - export type MGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? M : - S extends undefined ? never : - S extends { include: any } & (MArgs | MFindManyArgs) - ? M & { - [P in TruthyKeys]: - P extends 'n' ? Array < NGetPayload> : - P extends '_count' ? MCountOutputTypeGetPayload : never - } - : S extends { select: any } & (MArgs | MFindManyArgs) - ? { - [P in TruthyKeys]: - P extends 'n' ? Array < NGetPayload> : - P extends '_count' ? MCountOutputTypeGetPayload : P extends keyof M ? M[P] : never - } - : M + type MGetPayload = $Types.GetResult - type MCountArgs = + type MCountArgs = Omit & { select?: MCountAggregateInputType | true } - export interface MDelegate { - + export interface MDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['M'], meta: { name: 'M' } } /** * Find zero or one M that matches the filter. * @param {MFindUniqueArgs} args - Arguments to find a M @@ -5376,9 +6556,9 @@ export namespace Prisma { * } * }) **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__MClient> : Prisma__MClient | null, null> + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__MClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__MClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** * Find one M that matches the filter or throw an error with \`error.code='P2025'\` @@ -5392,9 +6572,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__MClient> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__MClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** * Find the first M that matches the filter. @@ -5409,9 +6589,9 @@ export namespace Prisma { * } * }) **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__MClient> : Prisma__MClient | null, null> + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__MClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__MClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> /** * Find the first M that matches the filter or @@ -5427,9 +6607,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__MClient> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__MClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** * Find zero or more Ms that matches the filter. @@ -5447,9 +6627,9 @@ export namespace Prisma { * const mWithIdOnly = await prisma.m.findMany({ select: { id: true } }) * **/ - findMany( - args?: SelectSubset - ): Prisma.PrismaPromise>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** * Create a M. @@ -5463,9 +6643,9 @@ export namespace Prisma { * }) * **/ - create( - args: SelectSubset - ): Prisma__MClient> + create>( + args: SelectSubset> + ): Prisma__MClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** * Create many Ms. @@ -5479,8 +6659,8 @@ export namespace Prisma { * }) * **/ - createMany( - args?: SelectSubset + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -5495,9 +6675,9 @@ export namespace Prisma { * }) * **/ - delete( - args: SelectSubset - ): Prisma__MClient> + delete>( + args: SelectSubset> + ): Prisma__MClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** * Update one M. @@ -5514,9 +6694,9 @@ export namespace Prisma { * }) * **/ - update( - args: SelectSubset - ): Prisma__MClient> + update>( + args: SelectSubset> + ): Prisma__MClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** * Delete zero or more Ms. @@ -5530,8 +6710,8 @@ export namespace Prisma { * }) * **/ - deleteMany( - args?: SelectSubset + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -5551,8 +6731,8 @@ export namespace Prisma { * }) * **/ - updateMany( - args: SelectSubset + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** @@ -5572,9 +6752,9 @@ export namespace Prisma { * } * }) **/ - upsert( - args: SelectSubset - ): Prisma__MClient> + upsert>( + args: SelectSubset> + ): Prisma__MClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** * Find zero or more Ms that matches the filter. @@ -5619,7 +6799,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends _Record<'select', any> + T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -5737,7 +6917,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__MClient implements Prisma.PrismaPromise { + export class Prisma__MClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -5752,7 +6932,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - n(args?: Subset): Prisma.PrismaPromise>| Null>; + n = {}>(args?: Subset>): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>| Null>; private get _document(); /** @@ -5784,15 +6964,15 @@ export namespace Prisma { /** * M base type for findUnique actions */ - export type MFindUniqueArgsBase = { + export type MFindUniqueArgsBase = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * Filter, which M to fetch. */ @@ -5802,7 +6982,7 @@ export namespace Prisma { /** * M findUnique */ - export interface MFindUniqueArgs extends MFindUniqueArgsBase { + export interface MFindUniqueArgs extends MFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -5814,15 +6994,15 @@ export namespace Prisma { /** * M findUniqueOrThrow */ - export type MFindUniqueOrThrowArgs = { + export type MFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * Filter, which M to fetch. */ @@ -5833,15 +7013,15 @@ export namespace Prisma { /** * M base type for findFirst actions */ - export type MFindFirstArgsBase = { + export type MFindFirstArgsBase = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * Filter, which M to fetch. */ @@ -5881,7 +7061,7 @@ export namespace Prisma { /** * M findFirst */ - export interface MFindFirstArgs extends MFindFirstArgsBase { + export interface MFindFirstArgs extends MFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -5893,15 +7073,15 @@ export namespace Prisma { /** * M findFirstOrThrow */ - export type MFindFirstOrThrowArgs = { + export type MFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * Filter, which M to fetch. */ @@ -5942,15 +7122,15 @@ export namespace Prisma { /** * M findMany */ - export type MFindManyArgs = { + export type MFindManyArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * Filter, which MS to fetch. */ @@ -5986,15 +7166,15 @@ export namespace Prisma { /** * M create */ - export type MCreateArgs = { + export type MCreateArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * The data needed to create a M. */ @@ -6005,7 +7185,7 @@ export namespace Prisma { /** * M createMany */ - export type MCreateManyArgs = { + export type MCreateManyArgs = { /** * The data used to create many MS. */ @@ -6016,15 +7196,15 @@ export namespace Prisma { /** * M update */ - export type MUpdateArgs = { + export type MUpdateArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * The data needed to update a M. */ @@ -6039,7 +7219,7 @@ export namespace Prisma { /** * M updateMany */ - export type MUpdateManyArgs = { + export type MUpdateManyArgs = { /** * The data used to update MS. */ @@ -6054,15 +7234,15 @@ export namespace Prisma { /** * M upsert */ - export type MUpsertArgs = { + export type MUpsertArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * The filter to search for the M to update in case it exists. */ @@ -6081,15 +7261,15 @@ export namespace Prisma { /** * M delete */ - export type MDeleteArgs = { + export type MDeleteArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * Filter which M to delete. */ @@ -6100,7 +7280,7 @@ export namespace Prisma { /** * M deleteMany */ - export type MDeleteManyArgs = { + export type MDeleteManyArgs = { /** * Filter which MS to delete */ @@ -6111,7 +7291,7 @@ export namespace Prisma { /** * M findRaw */ - export type MFindRawArgs = { + export type MFindRawArgs = { /** * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. \${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}. */ @@ -6126,7 +7306,7 @@ export namespace Prisma { /** * M aggregateRaw */ - export type MAggregateRawArgs = { + export type MAggregateRawArgs = { /** * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. \${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}. */ @@ -6141,15 +7321,15 @@ export namespace Prisma { /** * M.n */ - export type M$nArgs = { + export type M$nArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null where?: NWhereInput orderBy?: Enumerable cursor?: NWhereUniqueInput @@ -6162,15 +7342,15 @@ export namespace Prisma { /** * M without action */ - export type MArgs = { + export type MArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null } @@ -6309,7 +7489,7 @@ export namespace Prisma { _all?: true } - export type NAggregateArgs = { + export type NAggregateArgs = { /** * Filter which N to aggregate. */ @@ -6381,7 +7561,7 @@ export namespace Prisma { - export type NGroupByArgs = { + export type NGroupByArgs = { where?: NWhereInput orderBy?: Enumerable by: NScalarFieldEnum[] @@ -6432,7 +7612,7 @@ export namespace Prisma { > - export type NSelect = { + export type NSelect = $Extensions.GetSelect<{ id?: boolean m_ids?: boolean int?: boolean @@ -6447,42 +7627,42 @@ export namespace Prisma { optionalEnum?: boolean boolean?: boolean optionalBoolean?: boolean - m?: boolean | N$mArgs - _count?: boolean | NCountOutputTypeArgs - } + m?: boolean | N$mArgs + _count?: boolean | NCountOutputTypeArgs + }, ExtArgs["result"]["n"]> + export type NSelectScalar = { + id?: boolean + m_ids?: boolean + int?: boolean + optionalInt?: boolean + float?: boolean + optionalFloat?: boolean + string?: boolean + optionalString?: boolean + json?: boolean + optionalJson?: boolean + enum?: boolean + optionalEnum?: boolean + boolean?: boolean + optionalBoolean?: boolean + } - export type NInclude = { - m?: boolean | N$mArgs - _count?: boolean | NCountOutputTypeArgs + export type NInclude = { + m?: boolean | N$mArgs + _count?: boolean | NCountOutputTypeArgs } - export type NGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? N : - S extends undefined ? never : - S extends { include: any } & (NArgs | NFindManyArgs) - ? N & { - [P in TruthyKeys]: - P extends 'm' ? Array < MGetPayload> : - P extends '_count' ? NCountOutputTypeGetPayload : never - } - : S extends { select: any } & (NArgs | NFindManyArgs) - ? { - [P in TruthyKeys]: - P extends 'm' ? Array < MGetPayload> : - P extends '_count' ? NCountOutputTypeGetPayload : P extends keyof N ? N[P] : never - } - : N + type NGetPayload = $Types.GetResult - type NCountArgs = + type NCountArgs = Omit & { select?: NCountAggregateInputType | true } - export interface NDelegate { - + export interface NDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['N'], meta: { name: 'N' } } /** * Find zero or one N that matches the filter. * @param {NFindUniqueArgs} args - Arguments to find a N @@ -6494,9 +7674,9 @@ export namespace Prisma { * } * }) **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__NClient> : Prisma__NClient | null, null> + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__NClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__NClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** * Find one N that matches the filter or throw an error with \`error.code='P2025'\` @@ -6510,9 +7690,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__NClient> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__NClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** * Find the first N that matches the filter. @@ -6527,9 +7707,9 @@ export namespace Prisma { * } * }) **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__NClient> : Prisma__NClient | null, null> + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__NClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__NClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> /** * Find the first N that matches the filter or @@ -6545,9 +7725,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__NClient> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__NClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** * Find zero or more Ns that matches the filter. @@ -6565,9 +7745,9 @@ export namespace Prisma { * const nWithIdOnly = await prisma.n.findMany({ select: { id: true } }) * **/ - findMany( - args?: SelectSubset - ): Prisma.PrismaPromise>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** * Create a N. @@ -6581,9 +7761,9 @@ export namespace Prisma { * }) * **/ - create( - args: SelectSubset - ): Prisma__NClient> + create>( + args: SelectSubset> + ): Prisma__NClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** * Create many Ns. @@ -6597,8 +7777,8 @@ export namespace Prisma { * }) * **/ - createMany( - args?: SelectSubset + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -6613,9 +7793,9 @@ export namespace Prisma { * }) * **/ - delete( - args: SelectSubset - ): Prisma__NClient> + delete>( + args: SelectSubset> + ): Prisma__NClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** * Update one N. @@ -6632,9 +7812,9 @@ export namespace Prisma { * }) * **/ - update( - args: SelectSubset - ): Prisma__NClient> + update>( + args: SelectSubset> + ): Prisma__NClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** * Delete zero or more Ns. @@ -6648,8 +7828,8 @@ export namespace Prisma { * }) * **/ - deleteMany( - args?: SelectSubset + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -6669,8 +7849,8 @@ export namespace Prisma { * }) * **/ - updateMany( - args: SelectSubset + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** @@ -6690,9 +7870,9 @@ export namespace Prisma { * } * }) **/ - upsert( - args: SelectSubset - ): Prisma__NClient> + upsert>( + args: SelectSubset> + ): Prisma__NClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** * Find zero or more Ns that matches the filter. @@ -6737,7 +7917,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends _Record<'select', any> + T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -6855,7 +8035,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__NClient implements Prisma.PrismaPromise { + export class Prisma__NClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -6870,7 +8050,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - m(args?: Subset): Prisma.PrismaPromise>| Null>; + m = {}>(args?: Subset>): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>| Null>; private get _document(); /** @@ -6902,15 +8082,15 @@ export namespace Prisma { /** * N base type for findUnique actions */ - export type NFindUniqueArgsBase = { + export type NFindUniqueArgsBase = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * Filter, which N to fetch. */ @@ -6920,7 +8100,7 @@ export namespace Prisma { /** * N findUnique */ - export interface NFindUniqueArgs extends NFindUniqueArgsBase { + export interface NFindUniqueArgs extends NFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -6932,15 +8112,15 @@ export namespace Prisma { /** * N findUniqueOrThrow */ - export type NFindUniqueOrThrowArgs = { + export type NFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * Filter, which N to fetch. */ @@ -6951,15 +8131,15 @@ export namespace Prisma { /** * N base type for findFirst actions */ - export type NFindFirstArgsBase = { + export type NFindFirstArgsBase = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * Filter, which N to fetch. */ @@ -6999,7 +8179,7 @@ export namespace Prisma { /** * N findFirst */ - export interface NFindFirstArgs extends NFindFirstArgsBase { + export interface NFindFirstArgs extends NFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -7011,15 +8191,15 @@ export namespace Prisma { /** * N findFirstOrThrow */ - export type NFindFirstOrThrowArgs = { + export type NFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * Filter, which N to fetch. */ @@ -7060,15 +8240,15 @@ export namespace Prisma { /** * N findMany */ - export type NFindManyArgs = { + export type NFindManyArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * Filter, which NS to fetch. */ @@ -7104,15 +8284,15 @@ export namespace Prisma { /** * N create */ - export type NCreateArgs = { + export type NCreateArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * The data needed to create a N. */ @@ -7123,7 +8303,7 @@ export namespace Prisma { /** * N createMany */ - export type NCreateManyArgs = { + export type NCreateManyArgs = { /** * The data used to create many NS. */ @@ -7134,15 +8314,15 @@ export namespace Prisma { /** * N update */ - export type NUpdateArgs = { + export type NUpdateArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * The data needed to update a N. */ @@ -7157,7 +8337,7 @@ export namespace Prisma { /** * N updateMany */ - export type NUpdateManyArgs = { + export type NUpdateManyArgs = { /** * The data used to update NS. */ @@ -7172,15 +8352,15 @@ export namespace Prisma { /** * N upsert */ - export type NUpsertArgs = { + export type NUpsertArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * The filter to search for the N to update in case it exists. */ @@ -7199,15 +8379,15 @@ export namespace Prisma { /** * N delete */ - export type NDeleteArgs = { + export type NDeleteArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * Filter which N to delete. */ @@ -7218,7 +8398,7 @@ export namespace Prisma { /** * N deleteMany */ - export type NDeleteManyArgs = { + export type NDeleteManyArgs = { /** * Filter which NS to delete */ @@ -7229,7 +8409,7 @@ export namespace Prisma { /** * N findRaw */ - export type NFindRawArgs = { + export type NFindRawArgs = { /** * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. \${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}. */ @@ -7244,7 +8424,7 @@ export namespace Prisma { /** * N aggregateRaw */ - export type NAggregateRawArgs = { + export type NAggregateRawArgs = { /** * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. \${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}. */ @@ -7259,15 +8439,15 @@ export namespace Prisma { /** * N.m */ - export type N$mArgs = { + export type N$mArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null where?: MWhereInput orderBy?: Enumerable cursor?: MWhereUniqueInput @@ -7280,15 +8460,15 @@ export namespace Prisma { /** * N without action */ - export type NArgs = { + export type NArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null } @@ -7425,7 +8605,7 @@ export namespace Prisma { _all?: true } - export type OneOptionalAggregateArgs = { + export type OneOptionalAggregateArgs = { /** * Filter which OneOptional to aggregate. */ @@ -7497,7 +8677,7 @@ export namespace Prisma { - export type OneOptionalGroupByArgs = { + export type OneOptionalGroupByArgs = { where?: OneOptionalWhereInput orderBy?: Enumerable by: OneOptionalScalarFieldEnum[] @@ -7547,7 +8727,7 @@ export namespace Prisma { > - export type OneOptionalSelect = { + export type OneOptionalSelect = $Extensions.GetSelect<{ id?: boolean int?: boolean optionalInt?: boolean @@ -7561,42 +8741,41 @@ export namespace Prisma { optionalEnum?: boolean boolean?: boolean optionalBoolean?: boolean - many?: boolean | OneOptional$manyArgs - _count?: boolean | OneOptionalCountOutputTypeArgs - } + many?: boolean | OneOptional$manyArgs + _count?: boolean | OneOptionalCountOutputTypeArgs + }, ExtArgs["result"]["oneOptional"]> + export type OneOptionalSelectScalar = { + id?: boolean + int?: boolean + optionalInt?: boolean + float?: boolean + optionalFloat?: boolean + string?: boolean + optionalString?: boolean + json?: boolean + optionalJson?: boolean + enum?: boolean + optionalEnum?: boolean + boolean?: boolean + optionalBoolean?: boolean + } - export type OneOptionalInclude = { - many?: boolean | OneOptional$manyArgs - _count?: boolean | OneOptionalCountOutputTypeArgs + export type OneOptionalInclude = { + many?: boolean | OneOptional$manyArgs + _count?: boolean | OneOptionalCountOutputTypeArgs } - export type OneOptionalGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? OneOptional : - S extends undefined ? never : - S extends { include: any } & (OneOptionalArgs | OneOptionalFindManyArgs) - ? OneOptional & { - [P in TruthyKeys]: - P extends 'many' ? Array < ManyRequiredGetPayload> : - P extends '_count' ? OneOptionalCountOutputTypeGetPayload : never - } - : S extends { select: any } & (OneOptionalArgs | OneOptionalFindManyArgs) - ? { - [P in TruthyKeys]: - P extends 'many' ? Array < ManyRequiredGetPayload> : - P extends '_count' ? OneOptionalCountOutputTypeGetPayload : P extends keyof OneOptional ? OneOptional[P] : never - } - : OneOptional + type OneOptionalGetPayload = $Types.GetResult - type OneOptionalCountArgs = + type OneOptionalCountArgs = Omit & { select?: OneOptionalCountAggregateInputType | true } - export interface OneOptionalDelegate { - + export interface OneOptionalDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['OneOptional'], meta: { name: 'OneOptional' } } /** * Find zero or one OneOptional that matches the filter. * @param {OneOptionalFindUniqueArgs} args - Arguments to find a OneOptional @@ -7608,9 +8787,9 @@ export namespace Prisma { * } * }) **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__OneOptionalClient> : Prisma__OneOptionalClient | null, null> + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__OneOptionalClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__OneOptionalClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** * Find one OneOptional that matches the filter or throw an error with \`error.code='P2025'\` @@ -7624,9 +8803,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__OneOptionalClient> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__OneOptionalClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** * Find the first OneOptional that matches the filter. @@ -7641,9 +8820,9 @@ export namespace Prisma { * } * }) **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__OneOptionalClient> : Prisma__OneOptionalClient | null, null> + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__OneOptionalClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__OneOptionalClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> /** * Find the first OneOptional that matches the filter or @@ -7659,9 +8838,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__OneOptionalClient> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__OneOptionalClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** * Find zero or more OneOptionals that matches the filter. @@ -7679,9 +8858,9 @@ export namespace Prisma { * const oneOptionalWithIdOnly = await prisma.oneOptional.findMany({ select: { id: true } }) * **/ - findMany( - args?: SelectSubset - ): Prisma.PrismaPromise>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** * Create a OneOptional. @@ -7695,9 +8874,9 @@ export namespace Prisma { * }) * **/ - create( - args: SelectSubset - ): Prisma__OneOptionalClient> + create>( + args: SelectSubset> + ): Prisma__OneOptionalClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** * Create many OneOptionals. @@ -7711,8 +8890,8 @@ export namespace Prisma { * }) * **/ - createMany( - args?: SelectSubset + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -7727,9 +8906,9 @@ export namespace Prisma { * }) * **/ - delete( - args: SelectSubset - ): Prisma__OneOptionalClient> + delete>( + args: SelectSubset> + ): Prisma__OneOptionalClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** * Update one OneOptional. @@ -7746,9 +8925,9 @@ export namespace Prisma { * }) * **/ - update( - args: SelectSubset - ): Prisma__OneOptionalClient> + update>( + args: SelectSubset> + ): Prisma__OneOptionalClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** * Delete zero or more OneOptionals. @@ -7762,8 +8941,8 @@ export namespace Prisma { * }) * **/ - deleteMany( - args?: SelectSubset + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -7783,8 +8962,8 @@ export namespace Prisma { * }) * **/ - updateMany( - args: SelectSubset + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** @@ -7804,9 +8983,9 @@ export namespace Prisma { * } * }) **/ - upsert( - args: SelectSubset - ): Prisma__OneOptionalClient> + upsert>( + args: SelectSubset> + ): Prisma__OneOptionalClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** * Find zero or more OneOptionals that matches the filter. @@ -7851,7 +9030,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends _Record<'select', any> + T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -7969,7 +9148,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__OneOptionalClient implements Prisma.PrismaPromise { + export class Prisma__OneOptionalClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -7984,7 +9163,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - many(args?: Subset): Prisma.PrismaPromise>| Null>; + many = {}>(args?: Subset>): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>| Null>; private get _document(); /** @@ -8016,15 +9195,15 @@ export namespace Prisma { /** * OneOptional base type for findUnique actions */ - export type OneOptionalFindUniqueArgsBase = { + export type OneOptionalFindUniqueArgsBase = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * Filter, which OneOptional to fetch. */ @@ -8034,7 +9213,7 @@ export namespace Prisma { /** * OneOptional findUnique */ - export interface OneOptionalFindUniqueArgs extends OneOptionalFindUniqueArgsBase { + export interface OneOptionalFindUniqueArgs extends OneOptionalFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -8046,15 +9225,15 @@ export namespace Prisma { /** * OneOptional findUniqueOrThrow */ - export type OneOptionalFindUniqueOrThrowArgs = { + export type OneOptionalFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * Filter, which OneOptional to fetch. */ @@ -8065,15 +9244,15 @@ export namespace Prisma { /** * OneOptional base type for findFirst actions */ - export type OneOptionalFindFirstArgsBase = { + export type OneOptionalFindFirstArgsBase = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * Filter, which OneOptional to fetch. */ @@ -8113,7 +9292,7 @@ export namespace Prisma { /** * OneOptional findFirst */ - export interface OneOptionalFindFirstArgs extends OneOptionalFindFirstArgsBase { + export interface OneOptionalFindFirstArgs extends OneOptionalFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -8125,15 +9304,15 @@ export namespace Prisma { /** * OneOptional findFirstOrThrow */ - export type OneOptionalFindFirstOrThrowArgs = { + export type OneOptionalFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * Filter, which OneOptional to fetch. */ @@ -8174,15 +9353,15 @@ export namespace Prisma { /** * OneOptional findMany */ - export type OneOptionalFindManyArgs = { + export type OneOptionalFindManyArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * Filter, which OneOptionals to fetch. */ @@ -8218,15 +9397,15 @@ export namespace Prisma { /** * OneOptional create */ - export type OneOptionalCreateArgs = { + export type OneOptionalCreateArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * The data needed to create a OneOptional. */ @@ -8237,7 +9416,7 @@ export namespace Prisma { /** * OneOptional createMany */ - export type OneOptionalCreateManyArgs = { + export type OneOptionalCreateManyArgs = { /** * The data used to create many OneOptionals. */ @@ -8248,15 +9427,15 @@ export namespace Prisma { /** * OneOptional update */ - export type OneOptionalUpdateArgs = { + export type OneOptionalUpdateArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * The data needed to update a OneOptional. */ @@ -8271,7 +9450,7 @@ export namespace Prisma { /** * OneOptional updateMany */ - export type OneOptionalUpdateManyArgs = { + export type OneOptionalUpdateManyArgs = { /** * The data used to update OneOptionals. */ @@ -8286,15 +9465,15 @@ export namespace Prisma { /** * OneOptional upsert */ - export type OneOptionalUpsertArgs = { + export type OneOptionalUpsertArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * The filter to search for the OneOptional to update in case it exists. */ @@ -8313,15 +9492,15 @@ export namespace Prisma { /** * OneOptional delete */ - export type OneOptionalDeleteArgs = { + export type OneOptionalDeleteArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * Filter which OneOptional to delete. */ @@ -8332,7 +9511,7 @@ export namespace Prisma { /** * OneOptional deleteMany */ - export type OneOptionalDeleteManyArgs = { + export type OneOptionalDeleteManyArgs = { /** * Filter which OneOptionals to delete */ @@ -8343,7 +9522,7 @@ export namespace Prisma { /** * OneOptional findRaw */ - export type OneOptionalFindRawArgs = { + export type OneOptionalFindRawArgs = { /** * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. \${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}. */ @@ -8358,7 +9537,7 @@ export namespace Prisma { /** * OneOptional aggregateRaw */ - export type OneOptionalAggregateRawArgs = { + export type OneOptionalAggregateRawArgs = { /** * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. \${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}. */ @@ -8373,15 +9552,15 @@ export namespace Prisma { /** * OneOptional.many */ - export type OneOptional$manyArgs = { + export type OneOptional$manyArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null where?: ManyRequiredWhereInput orderBy?: Enumerable cursor?: ManyRequiredWhereUniqueInput @@ -8394,15 +9573,15 @@ export namespace Prisma { /** * OneOptional without action */ - export type OneOptionalArgs = { + export type OneOptionalArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null } @@ -8545,7 +9724,7 @@ export namespace Prisma { _all?: true } - export type ManyRequiredAggregateArgs = { + export type ManyRequiredAggregateArgs = { /** * Filter which ManyRequired to aggregate. */ @@ -8617,7 +9796,7 @@ export namespace Prisma { - export type ManyRequiredGroupByArgs = { + export type ManyRequiredGroupByArgs = { where?: ManyRequiredWhereInput orderBy?: Enumerable by: ManyRequiredScalarFieldEnum[] @@ -8668,7 +9847,25 @@ export namespace Prisma { > - export type ManyRequiredSelect = { + export type ManyRequiredSelect = $Extensions.GetSelect<{ + id?: boolean + oneOptionalId?: boolean + int?: boolean + optionalInt?: boolean + float?: boolean + optionalFloat?: boolean + string?: boolean + optionalString?: boolean + json?: boolean + optionalJson?: boolean + enum?: boolean + optionalEnum?: boolean + boolean?: boolean + optionalBoolean?: boolean + one?: boolean | OneOptionalArgs + }, ExtArgs["result"]["manyRequired"]> + + export type ManyRequiredSelectScalar = { id?: boolean oneOptionalId?: boolean int?: boolean @@ -8683,38 +9880,22 @@ export namespace Prisma { optionalEnum?: boolean boolean?: boolean optionalBoolean?: boolean - one?: boolean | OneOptionalArgs } - - export type ManyRequiredInclude = { - one?: boolean | OneOptionalArgs + export type ManyRequiredInclude = { + one?: boolean | OneOptionalArgs } - export type ManyRequiredGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? ManyRequired : - S extends undefined ? never : - S extends { include: any } & (ManyRequiredArgs | ManyRequiredFindManyArgs) - ? ManyRequired & { - [P in TruthyKeys]: - P extends 'one' ? OneOptionalGetPayload | null : never - } - : S extends { select: any } & (ManyRequiredArgs | ManyRequiredFindManyArgs) - ? { - [P in TruthyKeys]: - P extends 'one' ? OneOptionalGetPayload | null : P extends keyof ManyRequired ? ManyRequired[P] : never - } - : ManyRequired + type ManyRequiredGetPayload = $Types.GetResult - type ManyRequiredCountArgs = + type ManyRequiredCountArgs = Omit & { select?: ManyRequiredCountAggregateInputType | true } - export interface ManyRequiredDelegate { - + export interface ManyRequiredDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['ManyRequired'], meta: { name: 'ManyRequired' } } /** * Find zero or one ManyRequired that matches the filter. * @param {ManyRequiredFindUniqueArgs} args - Arguments to find a ManyRequired @@ -8726,9 +9907,9 @@ export namespace Prisma { * } * }) **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__ManyRequiredClient> : Prisma__ManyRequiredClient | null, null> + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__ManyRequiredClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__ManyRequiredClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** * Find one ManyRequired that matches the filter or throw an error with \`error.code='P2025'\` @@ -8742,9 +9923,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__ManyRequiredClient> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__ManyRequiredClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** * Find the first ManyRequired that matches the filter. @@ -8759,9 +9940,9 @@ export namespace Prisma { * } * }) **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__ManyRequiredClient> : Prisma__ManyRequiredClient | null, null> + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__ManyRequiredClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__ManyRequiredClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> /** * Find the first ManyRequired that matches the filter or @@ -8777,9 +9958,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__ManyRequiredClient> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__ManyRequiredClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** * Find zero or more ManyRequireds that matches the filter. @@ -8797,9 +9978,9 @@ export namespace Prisma { * const manyRequiredWithIdOnly = await prisma.manyRequired.findMany({ select: { id: true } }) * **/ - findMany( - args?: SelectSubset - ): Prisma.PrismaPromise>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** * Create a ManyRequired. @@ -8813,9 +9994,9 @@ export namespace Prisma { * }) * **/ - create( - args: SelectSubset - ): Prisma__ManyRequiredClient> + create>( + args: SelectSubset> + ): Prisma__ManyRequiredClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** * Create many ManyRequireds. @@ -8829,8 +10010,8 @@ export namespace Prisma { * }) * **/ - createMany( - args?: SelectSubset + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -8845,9 +10026,9 @@ export namespace Prisma { * }) * **/ - delete( - args: SelectSubset - ): Prisma__ManyRequiredClient> + delete>( + args: SelectSubset> + ): Prisma__ManyRequiredClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** * Update one ManyRequired. @@ -8864,9 +10045,9 @@ export namespace Prisma { * }) * **/ - update( - args: SelectSubset - ): Prisma__ManyRequiredClient> + update>( + args: SelectSubset> + ): Prisma__ManyRequiredClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** * Delete zero or more ManyRequireds. @@ -8880,8 +10061,8 @@ export namespace Prisma { * }) * **/ - deleteMany( - args?: SelectSubset + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -8901,8 +10082,8 @@ export namespace Prisma { * }) * **/ - updateMany( - args: SelectSubset + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** @@ -8922,9 +10103,9 @@ export namespace Prisma { * } * }) **/ - upsert( - args: SelectSubset - ): Prisma__ManyRequiredClient> + upsert>( + args: SelectSubset> + ): Prisma__ManyRequiredClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** * Find zero or more ManyRequireds that matches the filter. @@ -8969,7 +10150,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends _Record<'select', any> + T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -9087,7 +10268,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__ManyRequiredClient implements Prisma.PrismaPromise { + export class Prisma__ManyRequiredClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -9102,7 +10283,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - one(args?: Subset): Prisma__OneOptionalClient | Null>; + one = {}>(args?: Subset>): Prisma__OneOptionalClient<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; private get _document(); /** @@ -9134,15 +10315,15 @@ export namespace Prisma { /** * ManyRequired base type for findUnique actions */ - export type ManyRequiredFindUniqueArgsBase = { + export type ManyRequiredFindUniqueArgsBase = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * Filter, which ManyRequired to fetch. */ @@ -9152,7 +10333,7 @@ export namespace Prisma { /** * ManyRequired findUnique */ - export interface ManyRequiredFindUniqueArgs extends ManyRequiredFindUniqueArgsBase { + export interface ManyRequiredFindUniqueArgs extends ManyRequiredFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -9164,15 +10345,15 @@ export namespace Prisma { /** * ManyRequired findUniqueOrThrow */ - export type ManyRequiredFindUniqueOrThrowArgs = { + export type ManyRequiredFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * Filter, which ManyRequired to fetch. */ @@ -9183,15 +10364,15 @@ export namespace Prisma { /** * ManyRequired base type for findFirst actions */ - export type ManyRequiredFindFirstArgsBase = { + export type ManyRequiredFindFirstArgsBase = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * Filter, which ManyRequired to fetch. */ @@ -9231,7 +10412,7 @@ export namespace Prisma { /** * ManyRequired findFirst */ - export interface ManyRequiredFindFirstArgs extends ManyRequiredFindFirstArgsBase { + export interface ManyRequiredFindFirstArgs extends ManyRequiredFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -9243,15 +10424,15 @@ export namespace Prisma { /** * ManyRequired findFirstOrThrow */ - export type ManyRequiredFindFirstOrThrowArgs = { + export type ManyRequiredFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * Filter, which ManyRequired to fetch. */ @@ -9292,15 +10473,15 @@ export namespace Prisma { /** * ManyRequired findMany */ - export type ManyRequiredFindManyArgs = { + export type ManyRequiredFindManyArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * Filter, which ManyRequireds to fetch. */ @@ -9336,15 +10517,15 @@ export namespace Prisma { /** * ManyRequired create */ - export type ManyRequiredCreateArgs = { + export type ManyRequiredCreateArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * The data needed to create a ManyRequired. */ @@ -9355,7 +10536,7 @@ export namespace Prisma { /** * ManyRequired createMany */ - export type ManyRequiredCreateManyArgs = { + export type ManyRequiredCreateManyArgs = { /** * The data used to create many ManyRequireds. */ @@ -9366,15 +10547,15 @@ export namespace Prisma { /** * ManyRequired update */ - export type ManyRequiredUpdateArgs = { + export type ManyRequiredUpdateArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * The data needed to update a ManyRequired. */ @@ -9389,7 +10570,7 @@ export namespace Prisma { /** * ManyRequired updateMany */ - export type ManyRequiredUpdateManyArgs = { + export type ManyRequiredUpdateManyArgs = { /** * The data used to update ManyRequireds. */ @@ -9404,15 +10585,15 @@ export namespace Prisma { /** * ManyRequired upsert */ - export type ManyRequiredUpsertArgs = { + export type ManyRequiredUpsertArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * The filter to search for the ManyRequired to update in case it exists. */ @@ -9431,15 +10612,15 @@ export namespace Prisma { /** * ManyRequired delete */ - export type ManyRequiredDeleteArgs = { + export type ManyRequiredDeleteArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * Filter which ManyRequired to delete. */ @@ -9450,7 +10631,7 @@ export namespace Prisma { /** * ManyRequired deleteMany */ - export type ManyRequiredDeleteManyArgs = { + export type ManyRequiredDeleteManyArgs = { /** * Filter which ManyRequireds to delete */ @@ -9461,7 +10642,7 @@ export namespace Prisma { /** * ManyRequired findRaw */ - export type ManyRequiredFindRawArgs = { + export type ManyRequiredFindRawArgs = { /** * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. \${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}. */ @@ -9476,7 +10657,7 @@ export namespace Prisma { /** * ManyRequired aggregateRaw */ - export type ManyRequiredAggregateRawArgs = { + export type ManyRequiredAggregateRawArgs = { /** * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. \${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}. */ @@ -9491,15 +10672,15 @@ export namespace Prisma { /** * ManyRequired without action */ - export type ManyRequiredArgs = { + export type ManyRequiredArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null } @@ -9642,7 +10823,7 @@ export namespace Prisma { _all?: true } - export type OptionalSide1AggregateArgs = { + export type OptionalSide1AggregateArgs = { /** * Filter which OptionalSide1 to aggregate. */ @@ -9714,7 +10895,7 @@ export namespace Prisma { - export type OptionalSide1GroupByArgs = { + export type OptionalSide1GroupByArgs = { where?: OptionalSide1WhereInput orderBy?: Enumerable by: OptionalSide1ScalarFieldEnum[] @@ -9765,7 +10946,7 @@ export namespace Prisma { > - export type OptionalSide1Select = { + export type OptionalSide1Select = $Extensions.GetSelect<{ id?: boolean optionalSide2Id?: boolean int?: boolean @@ -9780,38 +10961,40 @@ export namespace Prisma { optionalEnum?: boolean boolean?: boolean optionalBoolean?: boolean - opti?: boolean | OptionalSide2Args - } + opti?: boolean | OptionalSide2Args + }, ExtArgs["result"]["optionalSide1"]> + export type OptionalSide1SelectScalar = { + id?: boolean + optionalSide2Id?: boolean + int?: boolean + optionalInt?: boolean + float?: boolean + optionalFloat?: boolean + string?: boolean + optionalString?: boolean + json?: boolean + optionalJson?: boolean + enum?: boolean + optionalEnum?: boolean + boolean?: boolean + optionalBoolean?: boolean + } - export type OptionalSide1Include = { - opti?: boolean | OptionalSide2Args + export type OptionalSide1Include = { + opti?: boolean | OptionalSide2Args } - export type OptionalSide1GetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? OptionalSide1 : - S extends undefined ? never : - S extends { include: any } & (OptionalSide1Args | OptionalSide1FindManyArgs) - ? OptionalSide1 & { - [P in TruthyKeys]: - P extends 'opti' ? OptionalSide2GetPayload | null : never - } - : S extends { select: any } & (OptionalSide1Args | OptionalSide1FindManyArgs) - ? { - [P in TruthyKeys]: - P extends 'opti' ? OptionalSide2GetPayload | null : P extends keyof OptionalSide1 ? OptionalSide1[P] : never - } - : OptionalSide1 + type OptionalSide1GetPayload = $Types.GetResult - type OptionalSide1CountArgs = + type OptionalSide1CountArgs = Omit & { select?: OptionalSide1CountAggregateInputType | true } - export interface OptionalSide1Delegate { - + export interface OptionalSide1Delegate { + [K: symbol]: { types: Prisma.TypeMap['model']['OptionalSide1'], meta: { name: 'OptionalSide1' } } /** * Find zero or one OptionalSide1 that matches the filter. * @param {OptionalSide1FindUniqueArgs} args - Arguments to find a OptionalSide1 @@ -9823,9 +11006,9 @@ export namespace Prisma { * } * }) **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__OptionalSide1Client> : Prisma__OptionalSide1Client | null, null> + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__OptionalSide1Client<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__OptionalSide1Client<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** * Find one OptionalSide1 that matches the filter or throw an error with \`error.code='P2025'\` @@ -9839,9 +11022,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__OptionalSide1Client> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__OptionalSide1Client<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** * Find the first OptionalSide1 that matches the filter. @@ -9856,9 +11039,9 @@ export namespace Prisma { * } * }) **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__OptionalSide1Client> : Prisma__OptionalSide1Client | null, null> + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__OptionalSide1Client<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__OptionalSide1Client<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> /** * Find the first OptionalSide1 that matches the filter or @@ -9874,9 +11057,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__OptionalSide1Client> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__OptionalSide1Client<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** * Find zero or more OptionalSide1s that matches the filter. @@ -9894,9 +11077,9 @@ export namespace Prisma { * const optionalSide1WithIdOnly = await prisma.optionalSide1.findMany({ select: { id: true } }) * **/ - findMany( - args?: SelectSubset - ): Prisma.PrismaPromise>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** * Create a OptionalSide1. @@ -9910,9 +11093,9 @@ export namespace Prisma { * }) * **/ - create( - args: SelectSubset - ): Prisma__OptionalSide1Client> + create>( + args: SelectSubset> + ): Prisma__OptionalSide1Client<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** * Create many OptionalSide1s. @@ -9926,8 +11109,8 @@ export namespace Prisma { * }) * **/ - createMany( - args?: SelectSubset + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -9942,9 +11125,9 @@ export namespace Prisma { * }) * **/ - delete( - args: SelectSubset - ): Prisma__OptionalSide1Client> + delete>( + args: SelectSubset> + ): Prisma__OptionalSide1Client<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** * Update one OptionalSide1. @@ -9961,9 +11144,9 @@ export namespace Prisma { * }) * **/ - update( - args: SelectSubset - ): Prisma__OptionalSide1Client> + update>( + args: SelectSubset> + ): Prisma__OptionalSide1Client<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** * Delete zero or more OptionalSide1s. @@ -9977,8 +11160,8 @@ export namespace Prisma { * }) * **/ - deleteMany( - args?: SelectSubset + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -9998,8 +11181,8 @@ export namespace Prisma { * }) * **/ - updateMany( - args: SelectSubset + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** @@ -10019,9 +11202,9 @@ export namespace Prisma { * } * }) **/ - upsert( - args: SelectSubset - ): Prisma__OptionalSide1Client> + upsert>( + args: SelectSubset> + ): Prisma__OptionalSide1Client<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** * Find zero or more OptionalSide1s that matches the filter. @@ -10066,7 +11249,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends _Record<'select', any> + T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -10184,7 +11367,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__OptionalSide1Client implements Prisma.PrismaPromise { + export class Prisma__OptionalSide1Client implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -10199,7 +11382,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - opti(args?: Subset): Prisma__OptionalSide2Client | Null>; + opti = {}>(args?: Subset>): Prisma__OptionalSide2Client<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; private get _document(); /** @@ -10231,15 +11414,15 @@ export namespace Prisma { /** * OptionalSide1 base type for findUnique actions */ - export type OptionalSide1FindUniqueArgsBase = { + export type OptionalSide1FindUniqueArgsBase = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * Filter, which OptionalSide1 to fetch. */ @@ -10249,7 +11432,7 @@ export namespace Prisma { /** * OptionalSide1 findUnique */ - export interface OptionalSide1FindUniqueArgs extends OptionalSide1FindUniqueArgsBase { + export interface OptionalSide1FindUniqueArgs extends OptionalSide1FindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -10261,15 +11444,15 @@ export namespace Prisma { /** * OptionalSide1 findUniqueOrThrow */ - export type OptionalSide1FindUniqueOrThrowArgs = { + export type OptionalSide1FindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * Filter, which OptionalSide1 to fetch. */ @@ -10280,15 +11463,15 @@ export namespace Prisma { /** * OptionalSide1 base type for findFirst actions */ - export type OptionalSide1FindFirstArgsBase = { + export type OptionalSide1FindFirstArgsBase = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * Filter, which OptionalSide1 to fetch. */ @@ -10328,7 +11511,7 @@ export namespace Prisma { /** * OptionalSide1 findFirst */ - export interface OptionalSide1FindFirstArgs extends OptionalSide1FindFirstArgsBase { + export interface OptionalSide1FindFirstArgs extends OptionalSide1FindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -10340,15 +11523,15 @@ export namespace Prisma { /** * OptionalSide1 findFirstOrThrow */ - export type OptionalSide1FindFirstOrThrowArgs = { + export type OptionalSide1FindFirstOrThrowArgs = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * Filter, which OptionalSide1 to fetch. */ @@ -10389,15 +11572,15 @@ export namespace Prisma { /** * OptionalSide1 findMany */ - export type OptionalSide1FindManyArgs = { + export type OptionalSide1FindManyArgs = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * Filter, which OptionalSide1s to fetch. */ @@ -10433,15 +11616,15 @@ export namespace Prisma { /** * OptionalSide1 create */ - export type OptionalSide1CreateArgs = { + export type OptionalSide1CreateArgs = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * The data needed to create a OptionalSide1. */ @@ -10452,7 +11635,7 @@ export namespace Prisma { /** * OptionalSide1 createMany */ - export type OptionalSide1CreateManyArgs = { + export type OptionalSide1CreateManyArgs = { /** * The data used to create many OptionalSide1s. */ @@ -10463,15 +11646,15 @@ export namespace Prisma { /** * OptionalSide1 update */ - export type OptionalSide1UpdateArgs = { + export type OptionalSide1UpdateArgs = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * The data needed to update a OptionalSide1. */ @@ -10486,7 +11669,7 @@ export namespace Prisma { /** * OptionalSide1 updateMany */ - export type OptionalSide1UpdateManyArgs = { + export type OptionalSide1UpdateManyArgs = { /** * The data used to update OptionalSide1s. */ @@ -10501,15 +11684,15 @@ export namespace Prisma { /** * OptionalSide1 upsert */ - export type OptionalSide1UpsertArgs = { + export type OptionalSide1UpsertArgs = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * The filter to search for the OptionalSide1 to update in case it exists. */ @@ -10528,15 +11711,15 @@ export namespace Prisma { /** * OptionalSide1 delete */ - export type OptionalSide1DeleteArgs = { + export type OptionalSide1DeleteArgs = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * Filter which OptionalSide1 to delete. */ @@ -10547,7 +11730,7 @@ export namespace Prisma { /** * OptionalSide1 deleteMany */ - export type OptionalSide1DeleteManyArgs = { + export type OptionalSide1DeleteManyArgs = { /** * Filter which OptionalSide1s to delete */ @@ -10558,7 +11741,7 @@ export namespace Prisma { /** * OptionalSide1 findRaw */ - export type OptionalSide1FindRawArgs = { + export type OptionalSide1FindRawArgs = { /** * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. \${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}. */ @@ -10573,7 +11756,7 @@ export namespace Prisma { /** * OptionalSide1 aggregateRaw */ - export type OptionalSide1AggregateRawArgs = { + export type OptionalSide1AggregateRawArgs = { /** * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. \${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}. */ @@ -10588,15 +11771,15 @@ export namespace Prisma { /** * OptionalSide1 without action */ - export type OptionalSide1Args = { + export type OptionalSide1Args = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null } @@ -10733,7 +11916,7 @@ export namespace Prisma { _all?: true } - export type OptionalSide2AggregateArgs = { + export type OptionalSide2AggregateArgs = { /** * Filter which OptionalSide2 to aggregate. */ @@ -10805,7 +11988,7 @@ export namespace Prisma { - export type OptionalSide2GroupByArgs = { + export type OptionalSide2GroupByArgs = { where?: OptionalSide2WhereInput orderBy?: Enumerable by: OptionalSide2ScalarFieldEnum[] @@ -10855,7 +12038,7 @@ export namespace Prisma { > - export type OptionalSide2Select = { + export type OptionalSide2Select = $Extensions.GetSelect<{ id?: boolean int?: boolean optionalInt?: boolean @@ -10869,38 +12052,39 @@ export namespace Prisma { optionalEnum?: boolean boolean?: boolean optionalBoolean?: boolean - opti?: boolean | OptionalSide1Args - } + opti?: boolean | OptionalSide1Args + }, ExtArgs["result"]["optionalSide2"]> + export type OptionalSide2SelectScalar = { + id?: boolean + int?: boolean + optionalInt?: boolean + float?: boolean + optionalFloat?: boolean + string?: boolean + optionalString?: boolean + json?: boolean + optionalJson?: boolean + enum?: boolean + optionalEnum?: boolean + boolean?: boolean + optionalBoolean?: boolean + } - export type OptionalSide2Include = { - opti?: boolean | OptionalSide1Args + export type OptionalSide2Include = { + opti?: boolean | OptionalSide1Args } - export type OptionalSide2GetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? OptionalSide2 : - S extends undefined ? never : - S extends { include: any } & (OptionalSide2Args | OptionalSide2FindManyArgs) - ? OptionalSide2 & { - [P in TruthyKeys]: - P extends 'opti' ? OptionalSide1GetPayload | null : never - } - : S extends { select: any } & (OptionalSide2Args | OptionalSide2FindManyArgs) - ? { - [P in TruthyKeys]: - P extends 'opti' ? OptionalSide1GetPayload | null : P extends keyof OptionalSide2 ? OptionalSide2[P] : never - } - : OptionalSide2 + type OptionalSide2GetPayload = $Types.GetResult - type OptionalSide2CountArgs = + type OptionalSide2CountArgs = Omit & { select?: OptionalSide2CountAggregateInputType | true } - export interface OptionalSide2Delegate { - + export interface OptionalSide2Delegate { + [K: symbol]: { types: Prisma.TypeMap['model']['OptionalSide2'], meta: { name: 'OptionalSide2' } } /** * Find zero or one OptionalSide2 that matches the filter. * @param {OptionalSide2FindUniqueArgs} args - Arguments to find a OptionalSide2 @@ -10912,9 +12096,9 @@ export namespace Prisma { * } * }) **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__OptionalSide2Client> : Prisma__OptionalSide2Client | null, null> + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__OptionalSide2Client<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__OptionalSide2Client<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** * Find one OptionalSide2 that matches the filter or throw an error with \`error.code='P2025'\` @@ -10928,9 +12112,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__OptionalSide2Client> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__OptionalSide2Client<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** * Find the first OptionalSide2 that matches the filter. @@ -10945,9 +12129,9 @@ export namespace Prisma { * } * }) **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__OptionalSide2Client> : Prisma__OptionalSide2Client | null, null> + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__OptionalSide2Client<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__OptionalSide2Client<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> /** * Find the first OptionalSide2 that matches the filter or @@ -10963,9 +12147,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__OptionalSide2Client> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__OptionalSide2Client<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** * Find zero or more OptionalSide2s that matches the filter. @@ -10983,9 +12167,9 @@ export namespace Prisma { * const optionalSide2WithIdOnly = await prisma.optionalSide2.findMany({ select: { id: true } }) * **/ - findMany( - args?: SelectSubset - ): Prisma.PrismaPromise>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** * Create a OptionalSide2. @@ -10999,9 +12183,9 @@ export namespace Prisma { * }) * **/ - create( - args: SelectSubset - ): Prisma__OptionalSide2Client> + create>( + args: SelectSubset> + ): Prisma__OptionalSide2Client<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** * Create many OptionalSide2s. @@ -11015,8 +12199,8 @@ export namespace Prisma { * }) * **/ - createMany( - args?: SelectSubset + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -11031,9 +12215,9 @@ export namespace Prisma { * }) * **/ - delete( - args: SelectSubset - ): Prisma__OptionalSide2Client> + delete>( + args: SelectSubset> + ): Prisma__OptionalSide2Client<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** * Update one OptionalSide2. @@ -11050,9 +12234,9 @@ export namespace Prisma { * }) * **/ - update( - args: SelectSubset - ): Prisma__OptionalSide2Client> + update>( + args: SelectSubset> + ): Prisma__OptionalSide2Client<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** * Delete zero or more OptionalSide2s. @@ -11066,8 +12250,8 @@ export namespace Prisma { * }) * **/ - deleteMany( - args?: SelectSubset + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -11087,8 +12271,8 @@ export namespace Prisma { * }) * **/ - updateMany( - args: SelectSubset + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** @@ -11108,9 +12292,9 @@ export namespace Prisma { * } * }) **/ - upsert( - args: SelectSubset - ): Prisma__OptionalSide2Client> + upsert>( + args: SelectSubset> + ): Prisma__OptionalSide2Client<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** * Find zero or more OptionalSide2s that matches the filter. @@ -11155,7 +12339,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends _Record<'select', any> + T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -11273,7 +12457,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__OptionalSide2Client implements Prisma.PrismaPromise { + export class Prisma__OptionalSide2Client implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -11288,7 +12472,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - opti(args?: Subset): Prisma__OptionalSide1Client | Null>; + opti = {}>(args?: Subset>): Prisma__OptionalSide1Client<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; private get _document(); /** @@ -11320,15 +12504,15 @@ export namespace Prisma { /** * OptionalSide2 base type for findUnique actions */ - export type OptionalSide2FindUniqueArgsBase = { + export type OptionalSide2FindUniqueArgsBase = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * Filter, which OptionalSide2 to fetch. */ @@ -11338,7 +12522,7 @@ export namespace Prisma { /** * OptionalSide2 findUnique */ - export interface OptionalSide2FindUniqueArgs extends OptionalSide2FindUniqueArgsBase { + export interface OptionalSide2FindUniqueArgs extends OptionalSide2FindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -11350,15 +12534,15 @@ export namespace Prisma { /** * OptionalSide2 findUniqueOrThrow */ - export type OptionalSide2FindUniqueOrThrowArgs = { + export type OptionalSide2FindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * Filter, which OptionalSide2 to fetch. */ @@ -11369,15 +12553,15 @@ export namespace Prisma { /** * OptionalSide2 base type for findFirst actions */ - export type OptionalSide2FindFirstArgsBase = { + export type OptionalSide2FindFirstArgsBase = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * Filter, which OptionalSide2 to fetch. */ @@ -11417,7 +12601,7 @@ export namespace Prisma { /** * OptionalSide2 findFirst */ - export interface OptionalSide2FindFirstArgs extends OptionalSide2FindFirstArgsBase { + export interface OptionalSide2FindFirstArgs extends OptionalSide2FindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -11429,15 +12613,15 @@ export namespace Prisma { /** * OptionalSide2 findFirstOrThrow */ - export type OptionalSide2FindFirstOrThrowArgs = { + export type OptionalSide2FindFirstOrThrowArgs = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * Filter, which OptionalSide2 to fetch. */ @@ -11478,15 +12662,15 @@ export namespace Prisma { /** * OptionalSide2 findMany */ - export type OptionalSide2FindManyArgs = { + export type OptionalSide2FindManyArgs = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * Filter, which OptionalSide2s to fetch. */ @@ -11522,15 +12706,15 @@ export namespace Prisma { /** * OptionalSide2 create */ - export type OptionalSide2CreateArgs = { + export type OptionalSide2CreateArgs = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * The data needed to create a OptionalSide2. */ @@ -11541,7 +12725,7 @@ export namespace Prisma { /** * OptionalSide2 createMany */ - export type OptionalSide2CreateManyArgs = { + export type OptionalSide2CreateManyArgs = { /** * The data used to create many OptionalSide2s. */ @@ -11552,15 +12736,15 @@ export namespace Prisma { /** * OptionalSide2 update */ - export type OptionalSide2UpdateArgs = { + export type OptionalSide2UpdateArgs = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * The data needed to update a OptionalSide2. */ @@ -11575,7 +12759,7 @@ export namespace Prisma { /** * OptionalSide2 updateMany */ - export type OptionalSide2UpdateManyArgs = { + export type OptionalSide2UpdateManyArgs = { /** * The data used to update OptionalSide2s. */ @@ -11590,15 +12774,15 @@ export namespace Prisma { /** * OptionalSide2 upsert */ - export type OptionalSide2UpsertArgs = { + export type OptionalSide2UpsertArgs = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * The filter to search for the OptionalSide2 to update in case it exists. */ @@ -11617,15 +12801,15 @@ export namespace Prisma { /** * OptionalSide2 delete */ - export type OptionalSide2DeleteArgs = { + export type OptionalSide2DeleteArgs = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * Filter which OptionalSide2 to delete. */ @@ -11636,7 +12820,7 @@ export namespace Prisma { /** * OptionalSide2 deleteMany */ - export type OptionalSide2DeleteManyArgs = { + export type OptionalSide2DeleteManyArgs = { /** * Filter which OptionalSide2s to delete */ @@ -11647,7 +12831,7 @@ export namespace Prisma { /** * OptionalSide2 findRaw */ - export type OptionalSide2FindRawArgs = { + export type OptionalSide2FindRawArgs = { /** * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. \${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}. */ @@ -11662,7 +12846,7 @@ export namespace Prisma { /** * OptionalSide2 aggregateRaw */ - export type OptionalSide2AggregateRawArgs = { + export type OptionalSide2AggregateRawArgs = { /** * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. \${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}. */ @@ -11677,15 +12861,15 @@ export namespace Prisma { /** * OptionalSide2 without action */ - export type OptionalSide2Args = { + export type OptionalSide2Args = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null } @@ -11784,7 +12968,7 @@ export namespace Prisma { _all?: true } - export type AAggregateArgs = { + export type AAggregateArgs = { /** * Filter which A to aggregate. */ @@ -11856,7 +13040,7 @@ export namespace Prisma { - export type AGroupByArgs = { + export type AGroupByArgs = { where?: AWhereInput orderBy?: Enumerable by: AScalarFieldEnum[] @@ -11899,37 +13083,34 @@ export namespace Prisma { > - export type ASelect = { + export type ASelect = $Extensions.GetSelect<{ id?: boolean email?: boolean name?: boolean int?: boolean sInt?: boolean bInt?: boolean - } + }, ExtArgs["result"]["a"]> + export type ASelectScalar = { + id?: boolean + email?: boolean + name?: boolean + int?: boolean + sInt?: boolean + bInt?: boolean + } - export type AGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? A : - S extends undefined ? never : - S extends { include: any } & (AArgs | AFindManyArgs) - ? A - : S extends { select: any } & (AArgs | AFindManyArgs) - ? { - [P in TruthyKeys]: - P extends keyof A ? A[P] : never - } - : A + type AGetPayload = $Types.GetResult - type ACountArgs = + type ACountArgs = Omit & { select?: ACountAggregateInputType | true } - export interface ADelegate { - + export interface ADelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['A'], meta: { name: 'A' } } /** * Find zero or one A that matches the filter. * @param {AFindUniqueArgs} args - Arguments to find a A @@ -11941,9 +13122,9 @@ export namespace Prisma { * } * }) **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__AClient> : Prisma__AClient | null, null> + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__AClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__AClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** * Find one A that matches the filter or throw an error with \`error.code='P2025'\` @@ -11957,9 +13138,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__AClient> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__AClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** * Find the first A that matches the filter. @@ -11974,9 +13155,9 @@ export namespace Prisma { * } * }) **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__AClient> : Prisma__AClient | null, null> + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__AClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__AClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> /** * Find the first A that matches the filter or @@ -11992,9 +13173,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__AClient> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__AClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** * Find zero or more As that matches the filter. @@ -12012,9 +13193,9 @@ export namespace Prisma { * const aWithIdOnly = await prisma.a.findMany({ select: { id: true } }) * **/ - findMany( - args?: SelectSubset - ): Prisma.PrismaPromise>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** * Create a A. @@ -12028,9 +13209,9 @@ export namespace Prisma { * }) * **/ - create( - args: SelectSubset - ): Prisma__AClient> + create>( + args: SelectSubset> + ): Prisma__AClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** * Create many As. @@ -12044,8 +13225,8 @@ export namespace Prisma { * }) * **/ - createMany( - args?: SelectSubset + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -12060,9 +13241,9 @@ export namespace Prisma { * }) * **/ - delete( - args: SelectSubset - ): Prisma__AClient> + delete>( + args: SelectSubset> + ): Prisma__AClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** * Update one A. @@ -12079,9 +13260,9 @@ export namespace Prisma { * }) * **/ - update( - args: SelectSubset - ): Prisma__AClient> + update>( + args: SelectSubset> + ): Prisma__AClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** * Delete zero or more As. @@ -12095,8 +13276,8 @@ export namespace Prisma { * }) * **/ - deleteMany( - args?: SelectSubset + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -12116,8 +13297,8 @@ export namespace Prisma { * }) * **/ - updateMany( - args: SelectSubset + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** @@ -12137,9 +13318,9 @@ export namespace Prisma { * } * }) **/ - upsert( - args: SelectSubset - ): Prisma__AClient> + upsert>( + args: SelectSubset> + ): Prisma__AClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** * Find zero or more As that matches the filter. @@ -12184,7 +13365,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends _Record<'select', any> + T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -12302,7 +13483,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__AClient implements Prisma.PrismaPromise { + export class Prisma__AClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -12348,11 +13529,11 @@ export namespace Prisma { /** * A base type for findUnique actions */ - export type AFindUniqueArgsBase = { + export type AFindUniqueArgsBase = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * Filter, which A to fetch. */ @@ -12362,7 +13543,7 @@ export namespace Prisma { /** * A findUnique */ - export interface AFindUniqueArgs extends AFindUniqueArgsBase { + export interface AFindUniqueArgs extends AFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -12374,11 +13555,11 @@ export namespace Prisma { /** * A findUniqueOrThrow */ - export type AFindUniqueOrThrowArgs = { + export type AFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * Filter, which A to fetch. */ @@ -12389,11 +13570,11 @@ export namespace Prisma { /** * A base type for findFirst actions */ - export type AFindFirstArgsBase = { + export type AFindFirstArgsBase = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * Filter, which A to fetch. */ @@ -12433,7 +13614,7 @@ export namespace Prisma { /** * A findFirst */ - export interface AFindFirstArgs extends AFindFirstArgsBase { + export interface AFindFirstArgs extends AFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -12445,11 +13626,11 @@ export namespace Prisma { /** * A findFirstOrThrow */ - export type AFindFirstOrThrowArgs = { + export type AFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * Filter, which A to fetch. */ @@ -12490,11 +13671,11 @@ export namespace Prisma { /** * A findMany */ - export type AFindManyArgs = { + export type AFindManyArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * Filter, which AS to fetch. */ @@ -12530,11 +13711,11 @@ export namespace Prisma { /** * A create */ - export type ACreateArgs = { + export type ACreateArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * The data needed to create a A. */ @@ -12545,7 +13726,7 @@ export namespace Prisma { /** * A createMany */ - export type ACreateManyArgs = { + export type ACreateManyArgs = { /** * The data used to create many AS. */ @@ -12556,11 +13737,11 @@ export namespace Prisma { /** * A update */ - export type AUpdateArgs = { + export type AUpdateArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * The data needed to update a A. */ @@ -12575,7 +13756,7 @@ export namespace Prisma { /** * A updateMany */ - export type AUpdateManyArgs = { + export type AUpdateManyArgs = { /** * The data used to update AS. */ @@ -12590,11 +13771,11 @@ export namespace Prisma { /** * A upsert */ - export type AUpsertArgs = { + export type AUpsertArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * The filter to search for the A to update in case it exists. */ @@ -12613,11 +13794,11 @@ export namespace Prisma { /** * A delete */ - export type ADeleteArgs = { + export type ADeleteArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * Filter which A to delete. */ @@ -12628,7 +13809,7 @@ export namespace Prisma { /** * A deleteMany */ - export type ADeleteManyArgs = { + export type ADeleteManyArgs = { /** * Filter which AS to delete */ @@ -12639,7 +13820,7 @@ export namespace Prisma { /** * A findRaw */ - export type AFindRawArgs = { + export type AFindRawArgs = { /** * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. \${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}. */ @@ -12654,7 +13835,7 @@ export namespace Prisma { /** * A aggregateRaw */ - export type AAggregateRawArgs = { + export type AAggregateRawArgs = { /** * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. \${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}. */ @@ -12669,11 +13850,11 @@ export namespace Prisma { /** * A without action */ - export type AArgs = { + export type AArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null } @@ -12750,7 +13931,7 @@ export namespace Prisma { _all?: true } - export type BAggregateArgs = { + export type BAggregateArgs = { /** * Filter which B to aggregate. */ @@ -12822,7 +14003,7 @@ export namespace Prisma { - export type BGroupByArgs = { + export type BGroupByArgs = { where?: BWhereInput orderBy?: Enumerable by: BScalarFieldEnum[] @@ -12862,34 +14043,28 @@ export namespace Prisma { > - export type BSelect = { + export type BSelect = $Extensions.GetSelect<{ id?: boolean float?: boolean dFloat?: boolean - } + }, ExtArgs["result"]["b"]> + export type BSelectScalar = { + id?: boolean + float?: boolean + dFloat?: boolean + } - export type BGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? B : - S extends undefined ? never : - S extends { include: any } & (BArgs | BFindManyArgs) - ? B - : S extends { select: any } & (BArgs | BFindManyArgs) - ? { - [P in TruthyKeys]: - P extends keyof B ? B[P] : never - } - : B + type BGetPayload = $Types.GetResult - type BCountArgs = + type BCountArgs = Omit & { select?: BCountAggregateInputType | true } - export interface BDelegate { - + export interface BDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['B'], meta: { name: 'B' } } /** * Find zero or one B that matches the filter. * @param {BFindUniqueArgs} args - Arguments to find a B @@ -12901,9 +14076,9 @@ export namespace Prisma { * } * }) **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__BClient> : Prisma__BClient | null, null> + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__BClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__BClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** * Find one B that matches the filter or throw an error with \`error.code='P2025'\` @@ -12917,9 +14092,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__BClient> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__BClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** * Find the first B that matches the filter. @@ -12934,9 +14109,9 @@ export namespace Prisma { * } * }) **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__BClient> : Prisma__BClient | null, null> + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__BClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__BClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> /** * Find the first B that matches the filter or @@ -12952,9 +14127,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__BClient> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__BClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** * Find zero or more Bs that matches the filter. @@ -12972,9 +14147,9 @@ export namespace Prisma { * const bWithIdOnly = await prisma.b.findMany({ select: { id: true } }) * **/ - findMany( - args?: SelectSubset - ): Prisma.PrismaPromise>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** * Create a B. @@ -12988,9 +14163,9 @@ export namespace Prisma { * }) * **/ - create( - args: SelectSubset - ): Prisma__BClient> + create>( + args: SelectSubset> + ): Prisma__BClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** * Create many Bs. @@ -13004,8 +14179,8 @@ export namespace Prisma { * }) * **/ - createMany( - args?: SelectSubset + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -13020,9 +14195,9 @@ export namespace Prisma { * }) * **/ - delete( - args: SelectSubset - ): Prisma__BClient> + delete>( + args: SelectSubset> + ): Prisma__BClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** * Update one B. @@ -13039,9 +14214,9 @@ export namespace Prisma { * }) * **/ - update( - args: SelectSubset - ): Prisma__BClient> + update>( + args: SelectSubset> + ): Prisma__BClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** * Delete zero or more Bs. @@ -13055,8 +14230,8 @@ export namespace Prisma { * }) * **/ - deleteMany( - args?: SelectSubset + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -13076,8 +14251,8 @@ export namespace Prisma { * }) * **/ - updateMany( - args: SelectSubset + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** @@ -13097,9 +14272,9 @@ export namespace Prisma { * } * }) **/ - upsert( - args: SelectSubset - ): Prisma__BClient> + upsert>( + args: SelectSubset> + ): Prisma__BClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** * Find zero or more Bs that matches the filter. @@ -13144,7 +14319,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends _Record<'select', any> + T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -13262,7 +14437,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__BClient implements Prisma.PrismaPromise { + export class Prisma__BClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -13308,11 +14483,11 @@ export namespace Prisma { /** * B base type for findUnique actions */ - export type BFindUniqueArgsBase = { + export type BFindUniqueArgsBase = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * Filter, which B to fetch. */ @@ -13322,7 +14497,7 @@ export namespace Prisma { /** * B findUnique */ - export interface BFindUniqueArgs extends BFindUniqueArgsBase { + export interface BFindUniqueArgs extends BFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -13334,11 +14509,11 @@ export namespace Prisma { /** * B findUniqueOrThrow */ - export type BFindUniqueOrThrowArgs = { + export type BFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * Filter, which B to fetch. */ @@ -13349,11 +14524,11 @@ export namespace Prisma { /** * B base type for findFirst actions */ - export type BFindFirstArgsBase = { + export type BFindFirstArgsBase = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * Filter, which B to fetch. */ @@ -13393,7 +14568,7 @@ export namespace Prisma { /** * B findFirst */ - export interface BFindFirstArgs extends BFindFirstArgsBase { + export interface BFindFirstArgs extends BFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -13405,11 +14580,11 @@ export namespace Prisma { /** * B findFirstOrThrow */ - export type BFindFirstOrThrowArgs = { + export type BFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * Filter, which B to fetch. */ @@ -13450,11 +14625,11 @@ export namespace Prisma { /** * B findMany */ - export type BFindManyArgs = { + export type BFindManyArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * Filter, which BS to fetch. */ @@ -13490,11 +14665,11 @@ export namespace Prisma { /** * B create */ - export type BCreateArgs = { + export type BCreateArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * The data needed to create a B. */ @@ -13505,7 +14680,7 @@ export namespace Prisma { /** * B createMany */ - export type BCreateManyArgs = { + export type BCreateManyArgs = { /** * The data used to create many BS. */ @@ -13516,11 +14691,11 @@ export namespace Prisma { /** * B update */ - export type BUpdateArgs = { + export type BUpdateArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * The data needed to update a B. */ @@ -13535,7 +14710,7 @@ export namespace Prisma { /** * B updateMany */ - export type BUpdateManyArgs = { + export type BUpdateManyArgs = { /** * The data used to update BS. */ @@ -13550,11 +14725,11 @@ export namespace Prisma { /** * B upsert */ - export type BUpsertArgs = { + export type BUpsertArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * The filter to search for the B to update in case it exists. */ @@ -13573,11 +14748,11 @@ export namespace Prisma { /** * B delete */ - export type BDeleteArgs = { + export type BDeleteArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * Filter which B to delete. */ @@ -13588,7 +14763,7 @@ export namespace Prisma { /** * B deleteMany */ - export type BDeleteManyArgs = { + export type BDeleteManyArgs = { /** * Filter which BS to delete */ @@ -13599,7 +14774,7 @@ export namespace Prisma { /** * B findRaw */ - export type BFindRawArgs = { + export type BFindRawArgs = { /** * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. \${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}. */ @@ -13614,7 +14789,7 @@ export namespace Prisma { /** * B aggregateRaw */ - export type BAggregateRawArgs = { + export type BAggregateRawArgs = { /** * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. \${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}. */ @@ -13629,11 +14804,11 @@ export namespace Prisma { /** * B without action */ - export type BArgs = { + export type BArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null } @@ -13712,7 +14887,7 @@ export namespace Prisma { _all?: true } - export type CAggregateArgs = { + export type CAggregateArgs = { /** * Filter which C to aggregate. */ @@ -13772,7 +14947,7 @@ export namespace Prisma { - export type CGroupByArgs = { + export type CGroupByArgs = { where?: CWhereInput orderBy?: Enumerable by: CScalarFieldEnum[] @@ -13812,7 +14987,7 @@ export namespace Prisma { > - export type CSelect = { + export type CSelect = $Extensions.GetSelect<{ id?: boolean char?: boolean vChar?: boolean @@ -13820,30 +14995,28 @@ export namespace Prisma { bit?: boolean vBit?: boolean uuid?: boolean - } + }, ExtArgs["result"]["c"]> + export type CSelectScalar = { + id?: boolean + char?: boolean + vChar?: boolean + text?: boolean + bit?: boolean + vBit?: boolean + uuid?: boolean + } - export type CGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? C : - S extends undefined ? never : - S extends { include: any } & (CArgs | CFindManyArgs) - ? C - : S extends { select: any } & (CArgs | CFindManyArgs) - ? { - [P in TruthyKeys]: - P extends keyof C ? C[P] : never - } - : C + type CGetPayload = $Types.GetResult - type CCountArgs = + type CCountArgs = Omit & { select?: CCountAggregateInputType | true } - export interface CDelegate { - + export interface CDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['C'], meta: { name: 'C' } } /** * Find zero or one C that matches the filter. * @param {CFindUniqueArgs} args - Arguments to find a C @@ -13855,9 +15028,9 @@ export namespace Prisma { * } * }) **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__CClient> : Prisma__CClient | null, null> + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__CClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__CClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** * Find one C that matches the filter or throw an error with \`error.code='P2025'\` @@ -13871,9 +15044,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__CClient> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__CClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** * Find the first C that matches the filter. @@ -13888,9 +15061,9 @@ export namespace Prisma { * } * }) **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__CClient> : Prisma__CClient | null, null> + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__CClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__CClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> /** * Find the first C that matches the filter or @@ -13906,9 +15079,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__CClient> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__CClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** * Find zero or more Cs that matches the filter. @@ -13926,9 +15099,9 @@ export namespace Prisma { * const cWithIdOnly = await prisma.c.findMany({ select: { id: true } }) * **/ - findMany( - args?: SelectSubset - ): Prisma.PrismaPromise>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** * Create a C. @@ -13942,9 +15115,9 @@ export namespace Prisma { * }) * **/ - create( - args: SelectSubset - ): Prisma__CClient> + create>( + args: SelectSubset> + ): Prisma__CClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** * Create many Cs. @@ -13958,8 +15131,8 @@ export namespace Prisma { * }) * **/ - createMany( - args?: SelectSubset + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -13974,9 +15147,9 @@ export namespace Prisma { * }) * **/ - delete( - args: SelectSubset - ): Prisma__CClient> + delete>( + args: SelectSubset> + ): Prisma__CClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** * Update one C. @@ -13993,9 +15166,9 @@ export namespace Prisma { * }) * **/ - update( - args: SelectSubset - ): Prisma__CClient> + update>( + args: SelectSubset> + ): Prisma__CClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** * Delete zero or more Cs. @@ -14009,8 +15182,8 @@ export namespace Prisma { * }) * **/ - deleteMany( - args?: SelectSubset + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -14030,8 +15203,8 @@ export namespace Prisma { * }) * **/ - updateMany( - args: SelectSubset + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** @@ -14051,9 +15224,9 @@ export namespace Prisma { * } * }) **/ - upsert( - args: SelectSubset - ): Prisma__CClient> + upsert>( + args: SelectSubset> + ): Prisma__CClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** * Find zero or more Cs that matches the filter. @@ -14098,7 +15271,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends _Record<'select', any> + T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -14216,7 +15389,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__CClient implements Prisma.PrismaPromise { + export class Prisma__CClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -14262,11 +15435,11 @@ export namespace Prisma { /** * C base type for findUnique actions */ - export type CFindUniqueArgsBase = { + export type CFindUniqueArgsBase = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * Filter, which C to fetch. */ @@ -14276,7 +15449,7 @@ export namespace Prisma { /** * C findUnique */ - export interface CFindUniqueArgs extends CFindUniqueArgsBase { + export interface CFindUniqueArgs extends CFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -14288,11 +15461,11 @@ export namespace Prisma { /** * C findUniqueOrThrow */ - export type CFindUniqueOrThrowArgs = { + export type CFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * Filter, which C to fetch. */ @@ -14303,11 +15476,11 @@ export namespace Prisma { /** * C base type for findFirst actions */ - export type CFindFirstArgsBase = { + export type CFindFirstArgsBase = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * Filter, which C to fetch. */ @@ -14347,7 +15520,7 @@ export namespace Prisma { /** * C findFirst */ - export interface CFindFirstArgs extends CFindFirstArgsBase { + export interface CFindFirstArgs extends CFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -14359,11 +15532,11 @@ export namespace Prisma { /** * C findFirstOrThrow */ - export type CFindFirstOrThrowArgs = { + export type CFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * Filter, which C to fetch. */ @@ -14404,11 +15577,11 @@ export namespace Prisma { /** * C findMany */ - export type CFindManyArgs = { + export type CFindManyArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * Filter, which CS to fetch. */ @@ -14444,11 +15617,11 @@ export namespace Prisma { /** * C create */ - export type CCreateArgs = { + export type CCreateArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * The data needed to create a C. */ @@ -14459,7 +15632,7 @@ export namespace Prisma { /** * C createMany */ - export type CCreateManyArgs = { + export type CCreateManyArgs = { /** * The data used to create many CS. */ @@ -14470,11 +15643,11 @@ export namespace Prisma { /** * C update */ - export type CUpdateArgs = { + export type CUpdateArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * The data needed to update a C. */ @@ -14489,7 +15662,7 @@ export namespace Prisma { /** * C updateMany */ - export type CUpdateManyArgs = { + export type CUpdateManyArgs = { /** * The data used to update CS. */ @@ -14504,11 +15677,11 @@ export namespace Prisma { /** * C upsert */ - export type CUpsertArgs = { + export type CUpsertArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * The filter to search for the C to update in case it exists. */ @@ -14527,11 +15700,11 @@ export namespace Prisma { /** * C delete */ - export type CDeleteArgs = { + export type CDeleteArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * Filter which C to delete. */ @@ -14542,7 +15715,7 @@ export namespace Prisma { /** * C deleteMany */ - export type CDeleteManyArgs = { + export type CDeleteManyArgs = { /** * Filter which CS to delete */ @@ -14553,7 +15726,7 @@ export namespace Prisma { /** * C findRaw */ - export type CFindRawArgs = { + export type CFindRawArgs = { /** * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. \${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}. */ @@ -14568,7 +15741,7 @@ export namespace Prisma { /** * C aggregateRaw */ - export type CAggregateRawArgs = { + export type CAggregateRawArgs = { /** * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. \${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}. */ @@ -14583,11 +15756,11 @@ export namespace Prisma { /** * C without action */ - export type CArgs = { + export type CArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null } @@ -14672,7 +15845,7 @@ export namespace Prisma { _all?: true } - export type DAggregateArgs = { + export type DAggregateArgs = { /** * Filter which D to aggregate. */ @@ -14744,7 +15917,7 @@ export namespace Prisma { - export type DGroupByArgs = { + export type DGroupByArgs = { where?: DWhereInput orderBy?: Enumerable by: DScalarFieldEnum[] @@ -14788,7 +15961,7 @@ export namespace Prisma { > - export type DSelect = { + export type DSelect = $Extensions.GetSelect<{ id?: boolean bool?: boolean byteA?: boolean @@ -14796,30 +15969,28 @@ export namespace Prisma { json?: boolean jsonb?: boolean list?: boolean - } + }, ExtArgs["result"]["d"]> + export type DSelectScalar = { + id?: boolean + bool?: boolean + byteA?: boolean + xml?: boolean + json?: boolean + jsonb?: boolean + list?: boolean + } - export type DGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? D : - S extends undefined ? never : - S extends { include: any } & (DArgs | DFindManyArgs) - ? D - : S extends { select: any } & (DArgs | DFindManyArgs) - ? { - [P in TruthyKeys]: - P extends keyof D ? D[P] : never - } - : D + type DGetPayload = $Types.GetResult - type DCountArgs = + type DCountArgs = Omit & { select?: DCountAggregateInputType | true } - export interface DDelegate { - + export interface DDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['D'], meta: { name: 'D' } } /** * Find zero or one D that matches the filter. * @param {DFindUniqueArgs} args - Arguments to find a D @@ -14831,9 +16002,9 @@ export namespace Prisma { * } * }) **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__DClient> : Prisma__DClient | null, null> + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__DClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__DClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** * Find one D that matches the filter or throw an error with \`error.code='P2025'\` @@ -14847,9 +16018,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__DClient> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__DClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** * Find the first D that matches the filter. @@ -14864,9 +16035,9 @@ export namespace Prisma { * } * }) **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__DClient> : Prisma__DClient | null, null> + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__DClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__DClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> /** * Find the first D that matches the filter or @@ -14882,9 +16053,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__DClient> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__DClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** * Find zero or more Ds that matches the filter. @@ -14902,9 +16073,9 @@ export namespace Prisma { * const dWithIdOnly = await prisma.d.findMany({ select: { id: true } }) * **/ - findMany( - args?: SelectSubset - ): Prisma.PrismaPromise>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** * Create a D. @@ -14918,9 +16089,9 @@ export namespace Prisma { * }) * **/ - create( - args: SelectSubset - ): Prisma__DClient> + create>( + args: SelectSubset> + ): Prisma__DClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** * Create many Ds. @@ -14934,8 +16105,8 @@ export namespace Prisma { * }) * **/ - createMany( - args?: SelectSubset + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -14950,9 +16121,9 @@ export namespace Prisma { * }) * **/ - delete( - args: SelectSubset - ): Prisma__DClient> + delete>( + args: SelectSubset> + ): Prisma__DClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** * Update one D. @@ -14969,9 +16140,9 @@ export namespace Prisma { * }) * **/ - update( - args: SelectSubset - ): Prisma__DClient> + update>( + args: SelectSubset> + ): Prisma__DClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** * Delete zero or more Ds. @@ -14985,8 +16156,8 @@ export namespace Prisma { * }) * **/ - deleteMany( - args?: SelectSubset + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -15006,8 +16177,8 @@ export namespace Prisma { * }) * **/ - updateMany( - args: SelectSubset + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** @@ -15027,9 +16198,9 @@ export namespace Prisma { * } * }) **/ - upsert( - args: SelectSubset - ): Prisma__DClient> + upsert>( + args: SelectSubset> + ): Prisma__DClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** * Find zero or more Ds that matches the filter. @@ -15074,7 +16245,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends _Record<'select', any> + T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -15192,7 +16363,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__DClient implements Prisma.PrismaPromise { + export class Prisma__DClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -15238,11 +16409,11 @@ export namespace Prisma { /** * D base type for findUnique actions */ - export type DFindUniqueArgsBase = { + export type DFindUniqueArgsBase = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * Filter, which D to fetch. */ @@ -15252,7 +16423,7 @@ export namespace Prisma { /** * D findUnique */ - export interface DFindUniqueArgs extends DFindUniqueArgsBase { + export interface DFindUniqueArgs extends DFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -15264,11 +16435,11 @@ export namespace Prisma { /** * D findUniqueOrThrow */ - export type DFindUniqueOrThrowArgs = { + export type DFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * Filter, which D to fetch. */ @@ -15279,11 +16450,11 @@ export namespace Prisma { /** * D base type for findFirst actions */ - export type DFindFirstArgsBase = { + export type DFindFirstArgsBase = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * Filter, which D to fetch. */ @@ -15323,7 +16494,7 @@ export namespace Prisma { /** * D findFirst */ - export interface DFindFirstArgs extends DFindFirstArgsBase { + export interface DFindFirstArgs extends DFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -15335,11 +16506,11 @@ export namespace Prisma { /** * D findFirstOrThrow */ - export type DFindFirstOrThrowArgs = { + export type DFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * Filter, which D to fetch. */ @@ -15380,11 +16551,11 @@ export namespace Prisma { /** * D findMany */ - export type DFindManyArgs = { + export type DFindManyArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * Filter, which DS to fetch. */ @@ -15420,11 +16591,11 @@ export namespace Prisma { /** * D create */ - export type DCreateArgs = { + export type DCreateArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * The data needed to create a D. */ @@ -15435,7 +16606,7 @@ export namespace Prisma { /** * D createMany */ - export type DCreateManyArgs = { + export type DCreateManyArgs = { /** * The data used to create many DS. */ @@ -15446,11 +16617,11 @@ export namespace Prisma { /** * D update */ - export type DUpdateArgs = { + export type DUpdateArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * The data needed to update a D. */ @@ -15465,7 +16636,7 @@ export namespace Prisma { /** * D updateMany */ - export type DUpdateManyArgs = { + export type DUpdateManyArgs = { /** * The data used to update DS. */ @@ -15480,11 +16651,11 @@ export namespace Prisma { /** * D upsert */ - export type DUpsertArgs = { + export type DUpsertArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * The filter to search for the D to update in case it exists. */ @@ -15503,11 +16674,11 @@ export namespace Prisma { /** * D delete */ - export type DDeleteArgs = { + export type DDeleteArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * Filter which D to delete. */ @@ -15518,7 +16689,7 @@ export namespace Prisma { /** * D deleteMany */ - export type DDeleteManyArgs = { + export type DDeleteManyArgs = { /** * Filter which DS to delete */ @@ -15529,7 +16700,7 @@ export namespace Prisma { /** * D findRaw */ - export type DFindRawArgs = { + export type DFindRawArgs = { /** * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. \${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}. */ @@ -15544,7 +16715,7 @@ export namespace Prisma { /** * D aggregateRaw */ - export type DAggregateRawArgs = { + export type DAggregateRawArgs = { /** * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. \${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}. */ @@ -15559,11 +16730,11 @@ export namespace Prisma { /** * D without action */ - export type DArgs = { + export type DArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null } @@ -15624,7 +16795,7 @@ export namespace Prisma { _all?: true } - export type EAggregateArgs = { + export type EAggregateArgs = { /** * Filter which E to aggregate. */ @@ -15684,7 +16855,7 @@ export namespace Prisma { - export type EGroupByArgs = { + export type EGroupByArgs = { where?: EWhereInput orderBy?: Enumerable by: EScalarFieldEnum[] @@ -15721,35 +16892,30 @@ export namespace Prisma { > - export type ESelect = { + export type ESelect = $Extensions.GetSelect<{ id?: boolean date?: boolean time?: boolean ts?: boolean - } + }, ExtArgs["result"]["e"]> + export type ESelectScalar = { + id?: boolean + date?: boolean + time?: boolean + ts?: boolean + } - export type EGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? E : - S extends undefined ? never : - S extends { include: any } & (EArgs | EFindManyArgs) - ? E - : S extends { select: any } & (EArgs | EFindManyArgs) - ? { - [P in TruthyKeys]: - P extends keyof E ? E[P] : never - } - : E + type EGetPayload = $Types.GetResult - type ECountArgs = + type ECountArgs = Omit & { select?: ECountAggregateInputType | true } - export interface EDelegate { - + export interface EDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['E'], meta: { name: 'E' } } /** * Find zero or one E that matches the filter. * @param {EFindUniqueArgs} args - Arguments to find a E @@ -15761,9 +16927,9 @@ export namespace Prisma { * } * }) **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__EClient> : Prisma__EClient | null, null> + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__EClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__EClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** * Find one E that matches the filter or throw an error with \`error.code='P2025'\` @@ -15777,9 +16943,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__EClient> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__EClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** * Find the first E that matches the filter. @@ -15794,9 +16960,9 @@ export namespace Prisma { * } * }) **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__EClient> : Prisma__EClient | null, null> + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__EClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__EClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> /** * Find the first E that matches the filter or @@ -15812,9 +16978,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__EClient> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__EClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** * Find zero or more Es that matches the filter. @@ -15832,9 +16998,9 @@ export namespace Prisma { * const eWithIdOnly = await prisma.e.findMany({ select: { id: true } }) * **/ - findMany( - args?: SelectSubset - ): Prisma.PrismaPromise>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** * Create a E. @@ -15848,9 +17014,9 @@ export namespace Prisma { * }) * **/ - create( - args: SelectSubset - ): Prisma__EClient> + create>( + args: SelectSubset> + ): Prisma__EClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** * Create many Es. @@ -15864,8 +17030,8 @@ export namespace Prisma { * }) * **/ - createMany( - args?: SelectSubset + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -15880,9 +17046,9 @@ export namespace Prisma { * }) * **/ - delete( - args: SelectSubset - ): Prisma__EClient> + delete>( + args: SelectSubset> + ): Prisma__EClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** * Update one E. @@ -15899,9 +17065,9 @@ export namespace Prisma { * }) * **/ - update( - args: SelectSubset - ): Prisma__EClient> + update>( + args: SelectSubset> + ): Prisma__EClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** * Delete zero or more Es. @@ -15915,8 +17081,8 @@ export namespace Prisma { * }) * **/ - deleteMany( - args?: SelectSubset + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -15936,8 +17102,8 @@ export namespace Prisma { * }) * **/ - updateMany( - args: SelectSubset + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** @@ -15957,9 +17123,9 @@ export namespace Prisma { * } * }) **/ - upsert( - args: SelectSubset - ): Prisma__EClient> + upsert>( + args: SelectSubset> + ): Prisma__EClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** * Find zero or more Es that matches the filter. @@ -16004,7 +17170,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends _Record<'select', any> + T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -16122,7 +17288,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__EClient implements Prisma.PrismaPromise { + export class Prisma__EClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -16168,11 +17334,11 @@ export namespace Prisma { /** * E base type for findUnique actions */ - export type EFindUniqueArgsBase = { + export type EFindUniqueArgsBase = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * Filter, which E to fetch. */ @@ -16182,7 +17348,7 @@ export namespace Prisma { /** * E findUnique */ - export interface EFindUniqueArgs extends EFindUniqueArgsBase { + export interface EFindUniqueArgs extends EFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -16194,11 +17360,11 @@ export namespace Prisma { /** * E findUniqueOrThrow */ - export type EFindUniqueOrThrowArgs = { + export type EFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * Filter, which E to fetch. */ @@ -16209,11 +17375,11 @@ export namespace Prisma { /** * E base type for findFirst actions */ - export type EFindFirstArgsBase = { + export type EFindFirstArgsBase = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * Filter, which E to fetch. */ @@ -16253,7 +17419,7 @@ export namespace Prisma { /** * E findFirst */ - export interface EFindFirstArgs extends EFindFirstArgsBase { + export interface EFindFirstArgs extends EFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -16265,11 +17431,11 @@ export namespace Prisma { /** * E findFirstOrThrow */ - export type EFindFirstOrThrowArgs = { + export type EFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * Filter, which E to fetch. */ @@ -16310,11 +17476,11 @@ export namespace Prisma { /** * E findMany */ - export type EFindManyArgs = { + export type EFindManyArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * Filter, which ES to fetch. */ @@ -16350,11 +17516,11 @@ export namespace Prisma { /** * E create */ - export type ECreateArgs = { + export type ECreateArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * The data needed to create a E. */ @@ -16365,7 +17531,7 @@ export namespace Prisma { /** * E createMany */ - export type ECreateManyArgs = { + export type ECreateManyArgs = { /** * The data used to create many ES. */ @@ -16376,11 +17542,11 @@ export namespace Prisma { /** * E update */ - export type EUpdateArgs = { + export type EUpdateArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * The data needed to update a E. */ @@ -16395,7 +17561,7 @@ export namespace Prisma { /** * E updateMany */ - export type EUpdateManyArgs = { + export type EUpdateManyArgs = { /** * The data used to update ES. */ @@ -16410,11 +17576,11 @@ export namespace Prisma { /** * E upsert */ - export type EUpsertArgs = { + export type EUpsertArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * The filter to search for the E to update in case it exists. */ @@ -16433,11 +17599,11 @@ export namespace Prisma { /** * E delete */ - export type EDeleteArgs = { + export type EDeleteArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * Filter which E to delete. */ @@ -16448,7 +17614,7 @@ export namespace Prisma { /** * E deleteMany */ - export type EDeleteManyArgs = { + export type EDeleteManyArgs = { /** * Filter which ES to delete */ @@ -16459,7 +17625,7 @@ export namespace Prisma { /** * E findRaw */ - export type EFindRawArgs = { + export type EFindRawArgs = { /** * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. \${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}. */ @@ -16474,7 +17640,7 @@ export namespace Prisma { /** * E aggregateRaw */ - export type EAggregateRawArgs = { + export type EAggregateRawArgs = { /** * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. \${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}. */ @@ -16489,11 +17655,11 @@ export namespace Prisma { /** * E without action */ - export type EArgs = { + export type EArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null } @@ -16502,61 +17668,37 @@ export namespace Prisma { * Enums */ - export const AScalarFieldEnum: { + export const PostScalarFieldEnum: { id: 'id', - email: 'email', - name: 'name', - int: 'int', - sInt: 'sInt', - bInt: 'bInt' + createdAt: 'createdAt', + title: 'title', + content: 'content', + published: 'published', + authorId: 'authorId' }; - export type AScalarFieldEnum = (typeof AScalarFieldEnum)[keyof typeof AScalarFieldEnum] + export type PostScalarFieldEnum = (typeof PostScalarFieldEnum)[keyof typeof PostScalarFieldEnum] - export const BScalarFieldEnum: { + export const UserScalarFieldEnum: { id: 'id', + email: 'email', + int: 'int', + optionalInt: 'optionalInt', float: 'float', - dFloat: 'dFloat' - }; - - export type BScalarFieldEnum = (typeof BScalarFieldEnum)[keyof typeof BScalarFieldEnum] - - - export const CScalarFieldEnum: { - id: 'id', - char: 'char', - vChar: 'vChar', - text: 'text', - bit: 'bit', - vBit: 'vBit', - uuid: 'uuid' - }; - - export type CScalarFieldEnum = (typeof CScalarFieldEnum)[keyof typeof CScalarFieldEnum] - - - export const DScalarFieldEnum: { - id: 'id', - bool: 'bool', - byteA: 'byteA', - xml: 'xml', + optionalFloat: 'optionalFloat', + string: 'string', + optionalString: 'optionalString', json: 'json', - jsonb: 'jsonb', - list: 'list' - }; - - export type DScalarFieldEnum = (typeof DScalarFieldEnum)[keyof typeof DScalarFieldEnum] - - - export const EScalarFieldEnum: { - id: 'id', - date: 'date', - time: 'time', - ts: 'ts' + optionalJson: 'optionalJson', + enum: 'enum', + optionalEnum: 'optionalEnum', + boolean: 'boolean', + optionalBoolean: 'optionalBoolean', + embedHolderId: 'embedHolderId' }; - export type EScalarFieldEnum = (typeof EScalarFieldEnum)[keyof typeof EScalarFieldEnum] + export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum] export const EmbedHolderScalarFieldEnum: { @@ -16589,9 +17731,9 @@ export namespace Prisma { export type MScalarFieldEnum = (typeof MScalarFieldEnum)[keyof typeof MScalarFieldEnum] - export const ManyRequiredScalarFieldEnum: { + export const NScalarFieldEnum: { id: 'id', - oneOptionalId: 'oneOptionalId', + m_ids: 'm_ids', int: 'int', optionalInt: 'optionalInt', float: 'float', @@ -16606,12 +17748,11 @@ export namespace Prisma { optionalBoolean: 'optionalBoolean' }; - export type ManyRequiredScalarFieldEnum = (typeof ManyRequiredScalarFieldEnum)[keyof typeof ManyRequiredScalarFieldEnum] + export type NScalarFieldEnum = (typeof NScalarFieldEnum)[keyof typeof NScalarFieldEnum] - export const NScalarFieldEnum: { + export const OneOptionalScalarFieldEnum: { id: 'id', - m_ids: 'm_ids', int: 'int', optionalInt: 'optionalInt', float: 'float', @@ -16626,11 +17767,12 @@ export namespace Prisma { optionalBoolean: 'optionalBoolean' }; - export type NScalarFieldEnum = (typeof NScalarFieldEnum)[keyof typeof NScalarFieldEnum] + export type OneOptionalScalarFieldEnum = (typeof OneOptionalScalarFieldEnum)[keyof typeof OneOptionalScalarFieldEnum] - export const OneOptionalScalarFieldEnum: { + export const ManyRequiredScalarFieldEnum: { id: 'id', + oneOptionalId: 'oneOptionalId', int: 'int', optionalInt: 'optionalInt', float: 'float', @@ -16645,7 +17787,7 @@ export namespace Prisma { optionalBoolean: 'optionalBoolean' }; - export type OneOptionalScalarFieldEnum = (typeof OneOptionalScalarFieldEnum)[keyof typeof OneOptionalScalarFieldEnum] + export type ManyRequiredScalarFieldEnum = (typeof ManyRequiredScalarFieldEnum)[keyof typeof ManyRequiredScalarFieldEnum] export const OptionalSide1ScalarFieldEnum: { @@ -16687,24 +17829,61 @@ export namespace Prisma { export type OptionalSide2ScalarFieldEnum = (typeof OptionalSide2ScalarFieldEnum)[keyof typeof OptionalSide2ScalarFieldEnum] - export const PostScalarFieldEnum: { + export const AScalarFieldEnum: { id: 'id', - createdAt: 'createdAt', - title: 'title', - content: 'content', - published: 'published', - authorId: 'authorId' + email: 'email', + name: 'name', + int: 'int', + sInt: 'sInt', + bInt: 'bInt' }; - export type PostScalarFieldEnum = (typeof PostScalarFieldEnum)[keyof typeof PostScalarFieldEnum] + export type AScalarFieldEnum = (typeof AScalarFieldEnum)[keyof typeof AScalarFieldEnum] - export const QueryMode: { - default: 'default', - insensitive: 'insensitive' + export const BScalarFieldEnum: { + id: 'id', + float: 'float', + dFloat: 'dFloat' }; - export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] + export type BScalarFieldEnum = (typeof BScalarFieldEnum)[keyof typeof BScalarFieldEnum] + + + export const CScalarFieldEnum: { + id: 'id', + char: 'char', + vChar: 'vChar', + text: 'text', + bit: 'bit', + vBit: 'vBit', + uuid: 'uuid' + }; + + export type CScalarFieldEnum = (typeof CScalarFieldEnum)[keyof typeof CScalarFieldEnum] + + + export const DScalarFieldEnum: { + id: 'id', + bool: 'bool', + byteA: 'byteA', + xml: 'xml', + json: 'json', + jsonb: 'jsonb', + list: 'list' + }; + + export type DScalarFieldEnum = (typeof DScalarFieldEnum)[keyof typeof DScalarFieldEnum] + + + export const EScalarFieldEnum: { + id: 'id', + date: 'date', + time: 'time', + ts: 'ts' + }; + + export type EScalarFieldEnum = (typeof EScalarFieldEnum)[keyof typeof EScalarFieldEnum] export const SortOrder: { @@ -16715,25 +17894,12 @@ export namespace Prisma { export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] - export const UserScalarFieldEnum: { - id: 'id', - email: 'email', - int: 'int', - optionalInt: 'optionalInt', - float: 'float', - optionalFloat: 'optionalFloat', - string: 'string', - optionalString: 'optionalString', - json: 'json', - optionalJson: 'optionalJson', - enum: 'enum', - optionalEnum: 'optionalEnum', - boolean: 'boolean', - optionalBoolean: 'optionalBoolean', - embedHolderId: 'embedHolderId' + export const QueryMode: { + default: 'default', + insensitive: 'insensitive' }; - export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum] + export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] /** @@ -18935,8 +20101,8 @@ export namespace Prisma { } export type UserRelationFilter = { - is?: UserWhereInput - isNot?: UserWhereInput + is?: UserWhereInput | null + isNot?: UserWhereInput | null } export type PostCountOrderByAggregateInput = { @@ -19122,8 +20288,8 @@ export namespace Prisma { } export type EmbedHolderRelationFilter = { - is?: EmbedHolderWhereInput - isNot?: EmbedHolderWhereInput + is?: EmbedHolderWhereInput | null + isNot?: EmbedHolderWhereInput | null } export type PostOrderByRelationAggregateInput = { diff --git a/packages/client/src/__tests__/integration/happy/exhaustive-schema/__snapshots__/test.ts.snap b/packages/client/src/__tests__/integration/happy/exhaustive-schema/__snapshots__/test.ts.snap index 7df226adfdad..1092fbdc7c9e 100644 --- a/packages/client/src/__tests__/integration/happy/exhaustive-schema/__snapshots__/test.ts.snap +++ b/packages/client/src/__tests__/integration/happy/exhaustive-schema/__snapshots__/test.ts.snap @@ -7,7 +7,8 @@ Object.defineProperty(exports, "__esModule", { value: true }); const { Decimal, objectEnumValues, - makeStrictEnum + makeStrictEnum, + Public, } = require('@prisma/client/runtime/index-browser') @@ -69,8 +70,19 @@ Prisma.raw = () => { throw new Error(\`raw is unable to be run in the browser. In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`, )} -Prisma.validator = () => (val) => val +Prisma.validator = Public.validator +/** +* Extensions +*/ +Prisma.getExtensionContext = () => { + throw new Error(\`Extensions.getExtensionContext is unable to be run in the browser. +In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`, +)} +Prisma.defineExtension = () => { + throw new Error(\`Extensions.defineExtension is unable to be run in the browser. +In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`, +)} /** * Shorthand utilities for JSON filtering @@ -89,61 +101,37 @@ Prisma.NullTypes = { * Enums */ -exports.Prisma.AScalarFieldEnum = { - id: 'id', - email: 'email', - name: 'name', - int: 'int', - sInt: 'sInt', - bInt: 'bInt', - inc_int: 'inc_int', - inc_sInt: 'inc_sInt', - inc_bInt: 'inc_bInt' -}; - -exports.Prisma.BScalarFieldEnum = { - id: 'id', - float: 'float', - dFloat: 'dFloat', - decFloat: 'decFloat', - numFloat: 'numFloat' -}; +exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' +}); -exports.Prisma.CScalarFieldEnum = { +exports.Prisma.PostScalarFieldEnum = { id: 'id', - char: 'char', - vChar: 'vChar', - text: 'text', - bit: 'bit', - vBit: 'vBit', - uuid: 'uuid' + createdAt: 'createdAt', + title: 'title', + content: 'content', + published: 'published', + authorId: 'authorId' }; -exports.Prisma.DScalarFieldEnum = { +exports.Prisma.UserScalarFieldEnum = { id: 'id', - bool: 'bool', - byteA: 'byteA', - xml: 'xml', + email: 'email', + int: 'int', + optionalInt: 'optionalInt', + float: 'float', + optionalFloat: 'optionalFloat', + string: 'string', + optionalString: 'optionalString', json: 'json', - jsonb: 'jsonb', - list: 'list' -}; - -exports.Prisma.EScalarFieldEnum = { - id: 'id', - date: 'date', - time: 'time', - ts: 'ts' -}; - -exports.Prisma.JsonNullValueFilter = { - DbNull: Prisma.DbNull, - JsonNull: Prisma.JsonNull, - AnyNull: Prisma.AnyNull -}; - -exports.Prisma.JsonNullValueInput = { - JsonNull: Prisma.JsonNull + optionalJson: 'optionalJson', + enum: 'enum', + optionalEnum: 'optionalEnum', + boolean: 'boolean', + optionalBoolean: 'optionalBoolean' }; exports.Prisma.MScalarFieldEnum = { @@ -162,9 +150,8 @@ exports.Prisma.MScalarFieldEnum = { optionalBoolean: 'optionalBoolean' }; -exports.Prisma.ManyRequiredScalarFieldEnum = { +exports.Prisma.NScalarFieldEnum = { id: 'id', - oneOptionalId: 'oneOptionalId', int: 'int', optionalInt: 'optionalInt', float: 'float', @@ -179,7 +166,7 @@ exports.Prisma.ManyRequiredScalarFieldEnum = { optionalBoolean: 'optionalBoolean' }; -exports.Prisma.NScalarFieldEnum = { +exports.Prisma.OneOptionalScalarFieldEnum = { id: 'id', int: 'int', optionalInt: 'optionalInt', @@ -195,13 +182,9 @@ exports.Prisma.NScalarFieldEnum = { optionalBoolean: 'optionalBoolean' }; -exports.Prisma.NullableJsonNullValueInput = { - DbNull: Prisma.DbNull, - JsonNull: Prisma.JsonNull -}; - -exports.Prisma.OneOptionalScalarFieldEnum = { +exports.Prisma.ManyRequiredScalarFieldEnum = { id: 'id', + oneOptionalId: 'oneOptionalId', int: 'int', optionalInt: 'optionalInt', float: 'float', @@ -249,18 +232,51 @@ exports.Prisma.OptionalSide2ScalarFieldEnum = { optionalBoolean: 'optionalBoolean' }; -exports.Prisma.PostScalarFieldEnum = { +exports.Prisma.AScalarFieldEnum = { id: 'id', - createdAt: 'createdAt', - title: 'title', - content: 'content', - published: 'published', - authorId: 'authorId' + email: 'email', + name: 'name', + int: 'int', + sInt: 'sInt', + bInt: 'bInt', + inc_int: 'inc_int', + inc_sInt: 'inc_sInt', + inc_bInt: 'inc_bInt' }; -exports.Prisma.QueryMode = { - default: 'default', - insensitive: 'insensitive' +exports.Prisma.BScalarFieldEnum = { + id: 'id', + float: 'float', + dFloat: 'dFloat', + decFloat: 'decFloat', + numFloat: 'numFloat' +}; + +exports.Prisma.CScalarFieldEnum = { + id: 'id', + char: 'char', + vChar: 'vChar', + text: 'text', + bit: 'bit', + vBit: 'vBit', + uuid: 'uuid' +}; + +exports.Prisma.DScalarFieldEnum = { + id: 'id', + bool: 'bool', + byteA: 'byteA', + xml: 'xml', + json: 'json', + jsonb: 'jsonb', + list: 'list' +}; + +exports.Prisma.EScalarFieldEnum = { + id: 'id', + date: 'date', + time: 'time', + ts: 'ts' }; exports.Prisma.SortOrder = { @@ -268,28 +284,29 @@ exports.Prisma.SortOrder = { desc: 'desc' }; -exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ - ReadUncommitted: 'ReadUncommitted', - ReadCommitted: 'ReadCommitted', - RepeatableRead: 'RepeatableRead', - Serializable: 'Serializable' -}); +exports.Prisma.JsonNullValueInput = { + JsonNull: Prisma.JsonNull +}; -exports.Prisma.UserScalarFieldEnum = { - id: 'id', - email: 'email', - int: 'int', - optionalInt: 'optionalInt', - float: 'float', - optionalFloat: 'optionalFloat', - string: 'string', - optionalString: 'optionalString', - json: 'json', - optionalJson: 'optionalJson', - enum: 'enum', - optionalEnum: 'optionalEnum', - boolean: 'boolean', - optionalBoolean: 'optionalBoolean' +exports.Prisma.NullableJsonNullValueInput = { + DbNull: Prisma.DbNull, + JsonNull: Prisma.JsonNull +}; + +exports.Prisma.QueryMode = { + default: 'default', + insensitive: 'insensitive' +}; + +exports.Prisma.NullsOrder = { + first: 'first', + last: 'last' +}; + +exports.Prisma.JsonNullValueFilter = { + DbNull: Prisma.DbNull, + JsonNull: Prisma.JsonNull, + AnyNull: Prisma.AnyNull }; exports.ABeautifulEnum = { A: 'A', @@ -337,243 +354,324 @@ exports[`exhaustive-schema: generatedTypeScript 1`] = ` **/ import * as runtime from '@prisma/client/runtime/{RUNTIME_FILE}'; -type UnwrapPromise

= P extends Promise ? R : P -type UnwrapTuple = { - [K in keyof Tuple]: K extends \`\${number}\` ? Tuple[K] extends Prisma.PrismaPromise ? X : UnwrapPromise : UnwrapPromise -}; +import $Types = runtime.Types // general types +import $Public = runtime.Types.Public +import $Utils = runtime.Types.Utils +import $Extensions = runtime.Types.Extensions -export type PrismaPromise = runtime.Types.Public.PrismaPromise +export type PrismaPromise = $Public.PrismaPromise +export type PostPayload = { + objects: { + author: UserPayload + } + scalars: $Extensions.GetResult<{ + id: number + createdAt: Date + title: string + content: string | null + published: boolean + authorId: number + }, ExtArgs["result"]["post"]> + composites: {} +} + /** * Model Post * */ -export type Post = { - id: number - createdAt: Date - title: string - content: string | null - published: boolean - authorId: number +export type Post = runtime.Types.DefaultSelection +export type UserPayload = { + objects: { + posts: PostPayload[] + } + scalars: $Extensions.GetResult<{ + id: number + email: string + int: number + optionalInt: number | null + float: number + optionalFloat: number | null + string: string + optionalString: string | null + json: Prisma.JsonValue + optionalJson: Prisma.JsonValue | null + enum: ABeautifulEnum + optionalEnum: ABeautifulEnum | null + boolean: boolean + optionalBoolean: boolean | null + }, ExtArgs["result"]["user"]> + composites: {} } /** * Model User * */ -export type User = { - id: number - email: string - int: number - optionalInt: number | null - float: number - optionalFloat: number | null - string: string - optionalString: string | null - json: Prisma.JsonValue - optionalJson: Prisma.JsonValue | null - enum: ABeautifulEnum - optionalEnum: ABeautifulEnum | null - boolean: boolean - optionalBoolean: boolean | null +export type User = runtime.Types.DefaultSelection +export type MPayload = { + objects: { + n: NPayload[] + } + scalars: $Extensions.GetResult<{ + id: number + int: number + optionalInt: number | null + float: number + optionalFloat: number | null + string: string + optionalString: string | null + json: Prisma.JsonValue + optionalJson: Prisma.JsonValue | null + enum: ABeautifulEnum + optionalEnum: ABeautifulEnum | null + boolean: boolean + optionalBoolean: boolean | null + }, ExtArgs["result"]["m"]> + composites: {} } /** * Model M * */ -export type M = { - id: number - int: number - optionalInt: number | null - float: number - optionalFloat: number | null - string: string - optionalString: string | null - json: Prisma.JsonValue - optionalJson: Prisma.JsonValue | null - enum: ABeautifulEnum - optionalEnum: ABeautifulEnum | null - boolean: boolean - optionalBoolean: boolean | null +export type M = runtime.Types.DefaultSelection +export type NPayload = { + objects: { + m: MPayload[] + } + scalars: $Extensions.GetResult<{ + id: number + int: number + optionalInt: number | null + float: number + optionalFloat: number | null + string: string + optionalString: string | null + json: Prisma.JsonValue + optionalJson: Prisma.JsonValue | null + enum: ABeautifulEnum + optionalEnum: ABeautifulEnum | null + boolean: boolean + optionalBoolean: boolean | null + }, ExtArgs["result"]["n"]> + composites: {} } /** * Model N * */ -export type N = { - id: number - int: number - optionalInt: number | null - float: number - optionalFloat: number | null - string: string - optionalString: string | null - json: Prisma.JsonValue - optionalJson: Prisma.JsonValue | null - enum: ABeautifulEnum - optionalEnum: ABeautifulEnum | null - boolean: boolean - optionalBoolean: boolean | null +export type N = runtime.Types.DefaultSelection +export type OneOptionalPayload = { + objects: { + many: ManyRequiredPayload[] + } + scalars: $Extensions.GetResult<{ + id: number + int: number + optionalInt: number | null + float: number + optionalFloat: number | null + string: string + optionalString: string | null + json: Prisma.JsonValue + optionalJson: Prisma.JsonValue | null + enum: ABeautifulEnum + optionalEnum: ABeautifulEnum | null + boolean: boolean + optionalBoolean: boolean | null + }, ExtArgs["result"]["oneOptional"]> + composites: {} } /** * Model OneOptional * */ -export type OneOptional = { - id: number - int: number - optionalInt: number | null - float: number - optionalFloat: number | null - string: string - optionalString: string | null - json: Prisma.JsonValue - optionalJson: Prisma.JsonValue | null - enum: ABeautifulEnum - optionalEnum: ABeautifulEnum | null - boolean: boolean - optionalBoolean: boolean | null +export type OneOptional = runtime.Types.DefaultSelection +export type ManyRequiredPayload = { + objects: { + one: OneOptionalPayload | null + } + scalars: $Extensions.GetResult<{ + id: number + oneOptionalId: number | null + int: number + optionalInt: number | null + float: number + optionalFloat: number | null + string: string + optionalString: string | null + json: Prisma.JsonValue + optionalJson: Prisma.JsonValue | null + enum: ABeautifulEnum + optionalEnum: ABeautifulEnum | null + boolean: boolean + optionalBoolean: boolean | null + }, ExtArgs["result"]["manyRequired"]> + composites: {} } /** * Model ManyRequired * */ -export type ManyRequired = { - id: number - oneOptionalId: number | null - int: number - optionalInt: number | null - float: number - optionalFloat: number | null - string: string - optionalString: string | null - json: Prisma.JsonValue - optionalJson: Prisma.JsonValue | null - enum: ABeautifulEnum - optionalEnum: ABeautifulEnum | null - boolean: boolean - optionalBoolean: boolean | null +export type ManyRequired = runtime.Types.DefaultSelection +export type OptionalSide1Payload = { + objects: { + opti: OptionalSide2Payload | null + } + scalars: $Extensions.GetResult<{ + id: number + optionalSide2Id: number | null + int: number + optionalInt: number | null + float: number + optionalFloat: number | null + string: string + optionalString: string | null + json: Prisma.JsonValue + optionalJson: Prisma.JsonValue | null + enum: ABeautifulEnum + optionalEnum: ABeautifulEnum | null + boolean: boolean + optionalBoolean: boolean | null + }, ExtArgs["result"]["optionalSide1"]> + composites: {} } /** * Model OptionalSide1 * */ -export type OptionalSide1 = { - id: number - optionalSide2Id: number | null - int: number - optionalInt: number | null - float: number - optionalFloat: number | null - string: string - optionalString: string | null - json: Prisma.JsonValue - optionalJson: Prisma.JsonValue | null - enum: ABeautifulEnum - optionalEnum: ABeautifulEnum | null - boolean: boolean - optionalBoolean: boolean | null +export type OptionalSide1 = runtime.Types.DefaultSelection +export type OptionalSide2Payload = { + objects: { + opti: OptionalSide1Payload | null + } + scalars: $Extensions.GetResult<{ + id: number + int: number + optionalInt: number | null + float: number + optionalFloat: number | null + string: string + optionalString: string | null + json: Prisma.JsonValue + optionalJson: Prisma.JsonValue | null + enum: ABeautifulEnum + optionalEnum: ABeautifulEnum | null + boolean: boolean + optionalBoolean: boolean | null + }, ExtArgs["result"]["optionalSide2"]> + composites: {} } /** * Model OptionalSide2 * */ -export type OptionalSide2 = { - id: number - int: number - optionalInt: number | null - float: number - optionalFloat: number | null - string: string - optionalString: string | null - json: Prisma.JsonValue - optionalJson: Prisma.JsonValue | null - enum: ABeautifulEnum - optionalEnum: ABeautifulEnum | null - boolean: boolean - optionalBoolean: boolean | null +export type OptionalSide2 = runtime.Types.DefaultSelection +export type APayload = { + objects: {} + scalars: $Extensions.GetResult<{ + /** + * field comment 1 + */ + id: string + email: string + name: string | null + /** + * field comment 2 + */ + int: number + sInt: number + bInt: bigint + inc_int: number + inc_sInt: number + inc_bInt: bigint + }, ExtArgs["result"]["a"]> + composites: {} } /** * Model A * model comment */ -export type A = { - /** - * field comment 1 - */ - id: string - email: string - name: string | null - /** - * field comment 2 - */ - int: number - sInt: number - bInt: bigint - inc_int: number - inc_sInt: number - inc_bInt: bigint +export type A = runtime.Types.DefaultSelection +export type BPayload = { + objects: {} + scalars: $Extensions.GetResult<{ + id: string + float: number + dFloat: number + decFloat: Prisma.Decimal + numFloat: Prisma.Decimal + }, ExtArgs["result"]["b"]> + composites: {} } /** * Model B * */ -export type B = { - id: string - float: number - dFloat: number - decFloat: Prisma.Decimal - numFloat: Prisma.Decimal +export type B = runtime.Types.DefaultSelection +export type CPayload = { + objects: {} + scalars: $Extensions.GetResult<{ + id: string + char: string + vChar: string + text: string + bit: string + vBit: string + uuid: string + }, ExtArgs["result"]["c"]> + composites: {} } /** * Model C * */ -export type C = { - id: string - char: string - vChar: string - text: string - bit: string - vBit: string - uuid: string +export type C = runtime.Types.DefaultSelection +export type DPayload = { + objects: {} + scalars: $Extensions.GetResult<{ + id: string + bool: boolean + byteA: Buffer + xml: string + json: Prisma.JsonValue + jsonb: Prisma.JsonValue + list: number[] + }, ExtArgs["result"]["d"]> + composites: {} } /** * Model D * */ -export type D = { - id: string - bool: boolean - byteA: Buffer - xml: string - json: Prisma.JsonValue - jsonb: Prisma.JsonValue - list: number[] +export type D = runtime.Types.DefaultSelection +export type EPayload = { + objects: {} + scalars: $Extensions.GetResult<{ + id: string + date: Date + time: Date + ts: Date + }, ExtArgs["result"]["e"]> + composites: {} } /** * Model E * */ -export type E = { - id: string - date: Date - time: Date - ts: Date -} - +export type E = runtime.Types.DefaultSelection /** * Enums @@ -607,8 +705,11 @@ export class PrismaClient< U = 'log' extends keyof T ? T['log'] extends Array ? Prisma.GetEvents : never : never, GlobalReject extends Prisma.RejectOnNotFound | Prisma.RejectPerOperation | false | undefined = 'rejectOnNotFound' extends keyof T ? T['rejectOnNotFound'] - : false - > { + : false, + ExtArgs extends $Extensions.Args = $Extensions.DefaultArgs +> { + [K: symbol]: { types: Prisma.TypeMap['other'] } + /** * ## Prisma Client ʲˢ * @@ -639,6 +740,8 @@ export class PrismaClient< /** * Add a middleware + * @deprecated since 4.16.0. For new code, prefer client extensions instead. + * @see https://pris.ly/d/extensions */ $use(cb: Prisma.Middleware): void @@ -701,9 +804,12 @@ export class PrismaClient< * * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions). */ - $transaction

[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): Promise> + $transaction

[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): Promise> + + $transaction(fn: (prisma: Omit) => Promise, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): Promise - $transaction(fn: (prisma: Omit) => Promise, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): Promise + + $extends: $Extensions.ExtendsHook<'extends', Prisma.TypeMapCb, ExtArgs> /** * \`prisma.post\`: Exposes CRUD operations for the **Post** model. @@ -713,7 +819,7 @@ export class PrismaClient< * const posts = await prisma.post.findMany() * \`\`\` */ - get post(): Prisma.PostDelegate; + get post(): Prisma.PostDelegate; /** * \`prisma.user\`: Exposes CRUD operations for the **User** model. @@ -723,7 +829,7 @@ export class PrismaClient< * const users = await prisma.user.findMany() * \`\`\` */ - get user(): Prisma.UserDelegate; + get user(): Prisma.UserDelegate; /** * \`prisma.m\`: Exposes CRUD operations for the **M** model. @@ -733,7 +839,7 @@ export class PrismaClient< * const ms = await prisma.m.findMany() * \`\`\` */ - get m(): Prisma.MDelegate; + get m(): Prisma.MDelegate; /** * \`prisma.n\`: Exposes CRUD operations for the **N** model. @@ -743,7 +849,7 @@ export class PrismaClient< * const ns = await prisma.n.findMany() * \`\`\` */ - get n(): Prisma.NDelegate; + get n(): Prisma.NDelegate; /** * \`prisma.oneOptional\`: Exposes CRUD operations for the **OneOptional** model. @@ -753,7 +859,7 @@ export class PrismaClient< * const oneOptionals = await prisma.oneOptional.findMany() * \`\`\` */ - get oneOptional(): Prisma.OneOptionalDelegate; + get oneOptional(): Prisma.OneOptionalDelegate; /** * \`prisma.manyRequired\`: Exposes CRUD operations for the **ManyRequired** model. @@ -763,7 +869,7 @@ export class PrismaClient< * const manyRequireds = await prisma.manyRequired.findMany() * \`\`\` */ - get manyRequired(): Prisma.ManyRequiredDelegate; + get manyRequired(): Prisma.ManyRequiredDelegate; /** * \`prisma.optionalSide1\`: Exposes CRUD operations for the **OptionalSide1** model. @@ -773,7 +879,7 @@ export class PrismaClient< * const optionalSide1s = await prisma.optionalSide1.findMany() * \`\`\` */ - get optionalSide1(): Prisma.OptionalSide1Delegate; + get optionalSide1(): Prisma.OptionalSide1Delegate; /** * \`prisma.optionalSide2\`: Exposes CRUD operations for the **OptionalSide2** model. @@ -783,7 +889,7 @@ export class PrismaClient< * const optionalSide2s = await prisma.optionalSide2.findMany() * \`\`\` */ - get optionalSide2(): Prisma.OptionalSide2Delegate; + get optionalSide2(): Prisma.OptionalSide2Delegate; /** * \`prisma.a\`: Exposes CRUD operations for the **A** model. @@ -793,7 +899,7 @@ export class PrismaClient< * const as = await prisma.a.findMany() * \`\`\` */ - get a(): Prisma.ADelegate; + get a(): Prisma.ADelegate; /** * \`prisma.b\`: Exposes CRUD operations for the **B** model. @@ -803,7 +909,7 @@ export class PrismaClient< * const bs = await prisma.b.findMany() * \`\`\` */ - get b(): Prisma.BDelegate; + get b(): Prisma.BDelegate; /** * \`prisma.c\`: Exposes CRUD operations for the **C** model. @@ -813,7 +919,7 @@ export class PrismaClient< * const cs = await prisma.c.findMany() * \`\`\` */ - get c(): Prisma.CDelegate; + get c(): Prisma.CDelegate; /** * \`prisma.d\`: Exposes CRUD operations for the **D** model. @@ -823,7 +929,7 @@ export class PrismaClient< * const ds = await prisma.d.findMany() * \`\`\` */ - get d(): Prisma.DDelegate; + get d(): Prisma.DDelegate; /** * \`prisma.e\`: Exposes CRUD operations for the **E** model. @@ -833,13 +939,18 @@ export class PrismaClient< * const es = await prisma.e.findMany() * \`\`\` */ - get e(): Prisma.EDelegate; + get e(): Prisma.EDelegate; } export namespace Prisma { export import DMMF = runtime.DMMF - export type PrismaPromise = runtime.Types.Public.PrismaPromise + export type PrismaPromise = $Public.PrismaPromise + + /** + * Validator + */ + export import validator = runtime.Public.validator /** * Prisma Errors @@ -875,6 +986,15 @@ export namespace Prisma { export type MetricHistogram = runtime.MetricHistogram export type MetricHistogramBucket = runtime.MetricHistogramBucket + /** + * Extensions + */ + export type Extension = $Extensions.UserArgs + export import getExtensionContext = runtime.Extensions.getExtensionContext + export type Args = $Public.Args + export type Payload = $Public.Payload + export type Result = $Public.Result + export type Exact = $Public.Exact /** * Prisma Client JS version: local @@ -1246,7 +1366,7 @@ export namespace Prisma { export const type: unique symbol; - export function validator(): (select: runtime.Types.Utils.LegacyExact) => S; + /** * Used by group by @@ -1325,6 +1445,1044 @@ export namespace Prisma { db?: Datasource } + + interface TypeMapCb extends $Utils.Fn<{extArgs: $Extensions.Args}, $Utils.Record> { + returns: Prisma.TypeMap + } + + export type TypeMap = { + meta: { + modelProps: 'post' | 'user' | 'm' | 'n' | 'oneOptional' | 'manyRequired' | 'optionalSide1' | 'optionalSide2' | 'a' | 'b' | 'c' | 'd' | 'e' + txIsolationLevel: Prisma.TransactionIsolationLevel + }, + model: { + Post: { + findUnique: { + args: Prisma.PostFindUniqueArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + findUniqueOrThrow: { + args: Prisma.PostFindUniqueOrThrowArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + findFirst: { + args: Prisma.PostFindFirstArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + findFirstOrThrow: { + args: Prisma.PostFindFirstOrThrowArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + findMany: { + args: Prisma.PostFindManyArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + create: { + args: Prisma.PostCreateArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + createMany: { + args: Prisma.PostCreateManyArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + delete: { + args: Prisma.PostDeleteArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + update: { + args: Prisma.PostUpdateArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + deleteMany: { + args: Prisma.PostDeleteManyArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + updateMany: { + args: Prisma.PostUpdateManyArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + upsert: { + args: Prisma.PostUpsertArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + aggregate: { + args: Prisma.PostAggregateArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + groupBy: { + args: Prisma.PostGroupByArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + count: { + args: Prisma.PostCountArgs, + result: $Utils.OptionalFlat + payload: PostPayload + } + } + User: { + findUnique: { + args: Prisma.UserFindUniqueArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + findUniqueOrThrow: { + args: Prisma.UserFindUniqueOrThrowArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + findFirst: { + args: Prisma.UserFindFirstArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + findFirstOrThrow: { + args: Prisma.UserFindFirstOrThrowArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + findMany: { + args: Prisma.UserFindManyArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + create: { + args: Prisma.UserCreateArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + createMany: { + args: Prisma.UserCreateManyArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + delete: { + args: Prisma.UserDeleteArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + update: { + args: Prisma.UserUpdateArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + deleteMany: { + args: Prisma.UserDeleteManyArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + updateMany: { + args: Prisma.UserUpdateManyArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + upsert: { + args: Prisma.UserUpsertArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + aggregate: { + args: Prisma.UserAggregateArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + groupBy: { + args: Prisma.UserGroupByArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + count: { + args: Prisma.UserCountArgs, + result: $Utils.OptionalFlat + payload: UserPayload + } + } + M: { + findUnique: { + args: Prisma.MFindUniqueArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + findUniqueOrThrow: { + args: Prisma.MFindUniqueOrThrowArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + findFirst: { + args: Prisma.MFindFirstArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + findFirstOrThrow: { + args: Prisma.MFindFirstOrThrowArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + findMany: { + args: Prisma.MFindManyArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + create: { + args: Prisma.MCreateArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + createMany: { + args: Prisma.MCreateManyArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + delete: { + args: Prisma.MDeleteArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + update: { + args: Prisma.MUpdateArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + deleteMany: { + args: Prisma.MDeleteManyArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + updateMany: { + args: Prisma.MUpdateManyArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + upsert: { + args: Prisma.MUpsertArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + aggregate: { + args: Prisma.MAggregateArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + groupBy: { + args: Prisma.MGroupByArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + count: { + args: Prisma.MCountArgs, + result: $Utils.OptionalFlat + payload: MPayload + } + } + N: { + findUnique: { + args: Prisma.NFindUniqueArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + findUniqueOrThrow: { + args: Prisma.NFindUniqueOrThrowArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + findFirst: { + args: Prisma.NFindFirstArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + findFirstOrThrow: { + args: Prisma.NFindFirstOrThrowArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + findMany: { + args: Prisma.NFindManyArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + create: { + args: Prisma.NCreateArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + createMany: { + args: Prisma.NCreateManyArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + delete: { + args: Prisma.NDeleteArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + update: { + args: Prisma.NUpdateArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + deleteMany: { + args: Prisma.NDeleteManyArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + updateMany: { + args: Prisma.NUpdateManyArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + upsert: { + args: Prisma.NUpsertArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + aggregate: { + args: Prisma.NAggregateArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + groupBy: { + args: Prisma.NGroupByArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + count: { + args: Prisma.NCountArgs, + result: $Utils.OptionalFlat + payload: NPayload + } + } + OneOptional: { + findUnique: { + args: Prisma.OneOptionalFindUniqueArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + findUniqueOrThrow: { + args: Prisma.OneOptionalFindUniqueOrThrowArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + findFirst: { + args: Prisma.OneOptionalFindFirstArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + findFirstOrThrow: { + args: Prisma.OneOptionalFindFirstOrThrowArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + findMany: { + args: Prisma.OneOptionalFindManyArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + create: { + args: Prisma.OneOptionalCreateArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + createMany: { + args: Prisma.OneOptionalCreateManyArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + delete: { + args: Prisma.OneOptionalDeleteArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + update: { + args: Prisma.OneOptionalUpdateArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + deleteMany: { + args: Prisma.OneOptionalDeleteManyArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + updateMany: { + args: Prisma.OneOptionalUpdateManyArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + upsert: { + args: Prisma.OneOptionalUpsertArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + aggregate: { + args: Prisma.OneOptionalAggregateArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + groupBy: { + args: Prisma.OneOptionalGroupByArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + count: { + args: Prisma.OneOptionalCountArgs, + result: $Utils.OptionalFlat + payload: OneOptionalPayload + } + } + ManyRequired: { + findUnique: { + args: Prisma.ManyRequiredFindUniqueArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + findUniqueOrThrow: { + args: Prisma.ManyRequiredFindUniqueOrThrowArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + findFirst: { + args: Prisma.ManyRequiredFindFirstArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + findFirstOrThrow: { + args: Prisma.ManyRequiredFindFirstOrThrowArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + findMany: { + args: Prisma.ManyRequiredFindManyArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + create: { + args: Prisma.ManyRequiredCreateArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + createMany: { + args: Prisma.ManyRequiredCreateManyArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + delete: { + args: Prisma.ManyRequiredDeleteArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + update: { + args: Prisma.ManyRequiredUpdateArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + deleteMany: { + args: Prisma.ManyRequiredDeleteManyArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + updateMany: { + args: Prisma.ManyRequiredUpdateManyArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + upsert: { + args: Prisma.ManyRequiredUpsertArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + aggregate: { + args: Prisma.ManyRequiredAggregateArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + groupBy: { + args: Prisma.ManyRequiredGroupByArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + count: { + args: Prisma.ManyRequiredCountArgs, + result: $Utils.OptionalFlat + payload: ManyRequiredPayload + } + } + OptionalSide1: { + findUnique: { + args: Prisma.OptionalSide1FindUniqueArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + findUniqueOrThrow: { + args: Prisma.OptionalSide1FindUniqueOrThrowArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + findFirst: { + args: Prisma.OptionalSide1FindFirstArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + findFirstOrThrow: { + args: Prisma.OptionalSide1FindFirstOrThrowArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + findMany: { + args: Prisma.OptionalSide1FindManyArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + create: { + args: Prisma.OptionalSide1CreateArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + createMany: { + args: Prisma.OptionalSide1CreateManyArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + delete: { + args: Prisma.OptionalSide1DeleteArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + update: { + args: Prisma.OptionalSide1UpdateArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + deleteMany: { + args: Prisma.OptionalSide1DeleteManyArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + updateMany: { + args: Prisma.OptionalSide1UpdateManyArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + upsert: { + args: Prisma.OptionalSide1UpsertArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + aggregate: { + args: Prisma.OptionalSide1AggregateArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + groupBy: { + args: Prisma.OptionalSide1GroupByArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + count: { + args: Prisma.OptionalSide1CountArgs, + result: $Utils.OptionalFlat + payload: OptionalSide1Payload + } + } + OptionalSide2: { + findUnique: { + args: Prisma.OptionalSide2FindUniqueArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + findUniqueOrThrow: { + args: Prisma.OptionalSide2FindUniqueOrThrowArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + findFirst: { + args: Prisma.OptionalSide2FindFirstArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + findFirstOrThrow: { + args: Prisma.OptionalSide2FindFirstOrThrowArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + findMany: { + args: Prisma.OptionalSide2FindManyArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + create: { + args: Prisma.OptionalSide2CreateArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + createMany: { + args: Prisma.OptionalSide2CreateManyArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + delete: { + args: Prisma.OptionalSide2DeleteArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + update: { + args: Prisma.OptionalSide2UpdateArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + deleteMany: { + args: Prisma.OptionalSide2DeleteManyArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + updateMany: { + args: Prisma.OptionalSide2UpdateManyArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + upsert: { + args: Prisma.OptionalSide2UpsertArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + aggregate: { + args: Prisma.OptionalSide2AggregateArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + groupBy: { + args: Prisma.OptionalSide2GroupByArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + count: { + args: Prisma.OptionalSide2CountArgs, + result: $Utils.OptionalFlat + payload: OptionalSide2Payload + } + } + A: { + findUnique: { + args: Prisma.AFindUniqueArgs, + result: $Utils.OptionalFlat + payload: APayload + } + findUniqueOrThrow: { + args: Prisma.AFindUniqueOrThrowArgs, + result: $Utils.OptionalFlat + payload: APayload + } + findFirst: { + args: Prisma.AFindFirstArgs, + result: $Utils.OptionalFlat + payload: APayload + } + findFirstOrThrow: { + args: Prisma.AFindFirstOrThrowArgs, + result: $Utils.OptionalFlat + payload: APayload + } + findMany: { + args: Prisma.AFindManyArgs, + result: $Utils.OptionalFlat + payload: APayload + } + create: { + args: Prisma.ACreateArgs, + result: $Utils.OptionalFlat + payload: APayload + } + createMany: { + args: Prisma.ACreateManyArgs, + result: $Utils.OptionalFlat + payload: APayload + } + delete: { + args: Prisma.ADeleteArgs, + result: $Utils.OptionalFlat + payload: APayload + } + update: { + args: Prisma.AUpdateArgs, + result: $Utils.OptionalFlat + payload: APayload + } + deleteMany: { + args: Prisma.ADeleteManyArgs, + result: $Utils.OptionalFlat + payload: APayload + } + updateMany: { + args: Prisma.AUpdateManyArgs, + result: $Utils.OptionalFlat + payload: APayload + } + upsert: { + args: Prisma.AUpsertArgs, + result: $Utils.OptionalFlat + payload: APayload + } + aggregate: { + args: Prisma.AAggregateArgs, + result: $Utils.OptionalFlat + payload: APayload + } + groupBy: { + args: Prisma.AGroupByArgs, + result: $Utils.OptionalFlat + payload: APayload + } + count: { + args: Prisma.ACountArgs, + result: $Utils.OptionalFlat + payload: APayload + } + } + B: { + findUnique: { + args: Prisma.BFindUniqueArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + findUniqueOrThrow: { + args: Prisma.BFindUniqueOrThrowArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + findFirst: { + args: Prisma.BFindFirstArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + findFirstOrThrow: { + args: Prisma.BFindFirstOrThrowArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + findMany: { + args: Prisma.BFindManyArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + create: { + args: Prisma.BCreateArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + createMany: { + args: Prisma.BCreateManyArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + delete: { + args: Prisma.BDeleteArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + update: { + args: Prisma.BUpdateArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + deleteMany: { + args: Prisma.BDeleteManyArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + updateMany: { + args: Prisma.BUpdateManyArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + upsert: { + args: Prisma.BUpsertArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + aggregate: { + args: Prisma.BAggregateArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + groupBy: { + args: Prisma.BGroupByArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + count: { + args: Prisma.BCountArgs, + result: $Utils.OptionalFlat + payload: BPayload + } + } + C: { + findUnique: { + args: Prisma.CFindUniqueArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + findUniqueOrThrow: { + args: Prisma.CFindUniqueOrThrowArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + findFirst: { + args: Prisma.CFindFirstArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + findFirstOrThrow: { + args: Prisma.CFindFirstOrThrowArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + findMany: { + args: Prisma.CFindManyArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + create: { + args: Prisma.CCreateArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + createMany: { + args: Prisma.CCreateManyArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + delete: { + args: Prisma.CDeleteArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + update: { + args: Prisma.CUpdateArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + deleteMany: { + args: Prisma.CDeleteManyArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + updateMany: { + args: Prisma.CUpdateManyArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + upsert: { + args: Prisma.CUpsertArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + aggregate: { + args: Prisma.CAggregateArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + groupBy: { + args: Prisma.CGroupByArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + count: { + args: Prisma.CCountArgs, + result: $Utils.OptionalFlat + payload: CPayload + } + } + D: { + findUnique: { + args: Prisma.DFindUniqueArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + findUniqueOrThrow: { + args: Prisma.DFindUniqueOrThrowArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + findFirst: { + args: Prisma.DFindFirstArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + findFirstOrThrow: { + args: Prisma.DFindFirstOrThrowArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + findMany: { + args: Prisma.DFindManyArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + create: { + args: Prisma.DCreateArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + createMany: { + args: Prisma.DCreateManyArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + delete: { + args: Prisma.DDeleteArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + update: { + args: Prisma.DUpdateArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + deleteMany: { + args: Prisma.DDeleteManyArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + updateMany: { + args: Prisma.DUpdateManyArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + upsert: { + args: Prisma.DUpsertArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + aggregate: { + args: Prisma.DAggregateArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + groupBy: { + args: Prisma.DGroupByArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + count: { + args: Prisma.DCountArgs, + result: $Utils.OptionalFlat + payload: DPayload + } + } + E: { + findUnique: { + args: Prisma.EFindUniqueArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + findUniqueOrThrow: { + args: Prisma.EFindUniqueOrThrowArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + findFirst: { + args: Prisma.EFindFirstArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + findFirstOrThrow: { + args: Prisma.EFindFirstOrThrowArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + findMany: { + args: Prisma.EFindManyArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + create: { + args: Prisma.ECreateArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + createMany: { + args: Prisma.ECreateManyArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + delete: { + args: Prisma.EDeleteArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + update: { + args: Prisma.EUpdateArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + deleteMany: { + args: Prisma.EDeleteManyArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + updateMany: { + args: Prisma.EUpdateManyArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + upsert: { + args: Prisma.EUpsertArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + aggregate: { + args: Prisma.EAggregateArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + groupBy: { + args: Prisma.EGroupByArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + count: { + args: Prisma.ECountArgs, + result: $Utils.OptionalFlat + payload: EPayload + } + } + } + } & { + other: { + $executeRawUnsafe: { + args: [query: string, ...values: any[]], + result: any + payload: any + } + $executeRaw: { + args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]], + result: any + payload: any + } + $queryRawUnsafe: { + args: [query: string, ...values: any[]], + result: any + payload: any + } + $queryRaw: { + args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]], + result: any + payload: any + } + } + } + export const defineExtension: $Extensions.ExtendsHook<'define', Prisma.TypeMapCb, $Extensions.DefaultArgs> export type DefaultPrismaClient = PrismaClient export type RejectOnNotFound = boolean | ((error: Error) => Error) export type RejectPerModel = { [P in ModelName]?: RejectOnNotFound } @@ -1465,7 +2623,7 @@ export namespace Prisma { /** * \`PrismaClient\` proxy available in interactive transactions. */ - export type TransactionClient = Omit + export type TransactionClient = Omit export type Datasource = { url?: string @@ -1485,36 +2643,28 @@ export namespace Prisma { posts: number } - export type UserCountOutputTypeSelect = { - posts?: boolean + export type UserCountOutputTypeSelect = { + posts?: boolean | UserCountOutputTypeCountPostsArgs } - export type UserCountOutputTypeGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? UserCountOutputType : - S extends undefined ? never : - S extends { include: any } & (UserCountOutputTypeArgs) - ? UserCountOutputType - : S extends { select: any } & (UserCountOutputTypeArgs) - ? { - [P in TruthyKeys]: - P extends keyof UserCountOutputType ? UserCountOutputType[P] : never - } - : UserCountOutputType - - - - // Custom InputTypes /** * UserCountOutputType without action */ - export type UserCountOutputTypeArgs = { + export type UserCountOutputTypeArgs = { /** * Select specific fields to fetch from the UserCountOutputType */ - select?: UserCountOutputTypeSelect | null + select?: UserCountOutputTypeSelect | null + } + + + /** + * UserCountOutputType without action + */ + export type UserCountOutputTypeCountPostsArgs = { + where?: PostWhereInput } @@ -1528,36 +2678,28 @@ export namespace Prisma { n: number } - export type MCountOutputTypeSelect = { - n?: boolean + export type MCountOutputTypeSelect = { + n?: boolean | MCountOutputTypeCountNArgs } - export type MCountOutputTypeGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? MCountOutputType : - S extends undefined ? never : - S extends { include: any } & (MCountOutputTypeArgs) - ? MCountOutputType - : S extends { select: any } & (MCountOutputTypeArgs) - ? { - [P in TruthyKeys]: - P extends keyof MCountOutputType ? MCountOutputType[P] : never - } - : MCountOutputType - - - - // Custom InputTypes /** * MCountOutputType without action */ - export type MCountOutputTypeArgs = { + export type MCountOutputTypeArgs = { /** * Select specific fields to fetch from the MCountOutputType */ - select?: MCountOutputTypeSelect | null + select?: MCountOutputTypeSelect | null + } + + + /** + * MCountOutputType without action + */ + export type MCountOutputTypeCountNArgs = { + where?: NWhereInput } @@ -1571,36 +2713,28 @@ export namespace Prisma { m: number } - export type NCountOutputTypeSelect = { - m?: boolean + export type NCountOutputTypeSelect = { + m?: boolean | NCountOutputTypeCountMArgs } - export type NCountOutputTypeGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? NCountOutputType : - S extends undefined ? never : - S extends { include: any } & (NCountOutputTypeArgs) - ? NCountOutputType - : S extends { select: any } & (NCountOutputTypeArgs) - ? { - [P in TruthyKeys]: - P extends keyof NCountOutputType ? NCountOutputType[P] : never - } - : NCountOutputType - - - - // Custom InputTypes /** * NCountOutputType without action */ - export type NCountOutputTypeArgs = { + export type NCountOutputTypeArgs = { /** * Select specific fields to fetch from the NCountOutputType */ - select?: NCountOutputTypeSelect | null + select?: NCountOutputTypeSelect | null + } + + + /** + * NCountOutputType without action + */ + export type NCountOutputTypeCountMArgs = { + where?: MWhereInput } @@ -1614,36 +2748,28 @@ export namespace Prisma { many: number } - export type OneOptionalCountOutputTypeSelect = { - many?: boolean + export type OneOptionalCountOutputTypeSelect = { + many?: boolean | OneOptionalCountOutputTypeCountManyArgs } - export type OneOptionalCountOutputTypeGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? OneOptionalCountOutputType : - S extends undefined ? never : - S extends { include: any } & (OneOptionalCountOutputTypeArgs) - ? OneOptionalCountOutputType - : S extends { select: any } & (OneOptionalCountOutputTypeArgs) - ? { - [P in TruthyKeys]: - P extends keyof OneOptionalCountOutputType ? OneOptionalCountOutputType[P] : never - } - : OneOptionalCountOutputType - - - - // Custom InputTypes /** * OneOptionalCountOutputType without action */ - export type OneOptionalCountOutputTypeArgs = { + export type OneOptionalCountOutputTypeArgs = { /** * Select specific fields to fetch from the OneOptionalCountOutputType */ - select?: OneOptionalCountOutputTypeSelect | null + select?: OneOptionalCountOutputTypeSelect | null + } + + + /** + * OneOptionalCountOutputType without action + */ + export type OneOptionalCountOutputTypeCountManyArgs = { + where?: ManyRequiredWhereInput } @@ -1742,7 +2868,7 @@ export namespace Prisma { _all?: true } - export type PostAggregateArgs = { + export type PostAggregateArgs = { /** * Filter which Post to aggregate. */ @@ -1814,7 +2940,7 @@ export namespace Prisma { - export type PostGroupByArgs = { + export type PostGroupByArgs = { where?: PostWhereInput orderBy?: Enumerable by: PostScalarFieldEnum[] @@ -1857,45 +2983,39 @@ export namespace Prisma { > - export type PostSelect = { + export type PostSelect = $Extensions.GetSelect<{ id?: boolean createdAt?: boolean title?: boolean content?: boolean published?: boolean authorId?: boolean - author?: boolean | UserArgs - } + author?: boolean | UserArgs + }, ExtArgs["result"]["post"]> + export type PostSelectScalar = { + id?: boolean + createdAt?: boolean + title?: boolean + content?: boolean + published?: boolean + authorId?: boolean + } - export type PostInclude = { - author?: boolean | UserArgs + export type PostInclude = { + author?: boolean | UserArgs } - export type PostGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? Post : - S extends undefined ? never : - S extends { include: any } & (PostArgs | PostFindManyArgs) - ? Post & { - [P in TruthyKeys]: - P extends 'author' ? UserGetPayload : never - } - : S extends { select: any } & (PostArgs | PostFindManyArgs) - ? { - [P in TruthyKeys]: - P extends 'author' ? UserGetPayload : P extends keyof Post ? Post[P] : never - } - : Post + type PostGetPayload = $Types.GetResult - type PostCountArgs = + type PostCountArgs = Omit & { select?: PostCountAggregateInputType | true } - export interface PostDelegate { - + export interface PostDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Post'], meta: { name: 'Post' } } /** * Find zero or one Post that matches the filter. * @param {PostFindUniqueArgs} args - Arguments to find a Post @@ -1907,9 +3027,9 @@ export namespace Prisma { * } * }) **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__PostClient> : Prisma__PostClient | null, null> + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__PostClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__PostClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** * Find one Post that matches the filter or throw an error with \`error.code='P2025'\` @@ -1923,9 +3043,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__PostClient> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__PostClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** * Find the first Post that matches the filter. @@ -1940,9 +3060,9 @@ export namespace Prisma { * } * }) **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__PostClient> : Prisma__PostClient | null, null> + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__PostClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__PostClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> /** * Find the first Post that matches the filter or @@ -1958,9 +3078,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__PostClient> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__PostClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** * Find zero or more Posts that matches the filter. @@ -1978,9 +3098,9 @@ export namespace Prisma { * const postWithIdOnly = await prisma.post.findMany({ select: { id: true } }) * **/ - findMany( - args?: SelectSubset - ): Prisma.PrismaPromise>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** * Create a Post. @@ -1994,9 +3114,9 @@ export namespace Prisma { * }) * **/ - create( - args: SelectSubset - ): Prisma__PostClient> + create>( + args: SelectSubset> + ): Prisma__PostClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** * Create many Posts. @@ -2010,8 +3130,8 @@ export namespace Prisma { * }) * **/ - createMany( - args?: SelectSubset + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -2026,9 +3146,9 @@ export namespace Prisma { * }) * **/ - delete( - args: SelectSubset - ): Prisma__PostClient> + delete>( + args: SelectSubset> + ): Prisma__PostClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** * Update one Post. @@ -2045,9 +3165,9 @@ export namespace Prisma { * }) * **/ - update( - args: SelectSubset - ): Prisma__PostClient> + update>( + args: SelectSubset> + ): Prisma__PostClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** * Delete zero or more Posts. @@ -2061,8 +3181,8 @@ export namespace Prisma { * }) * **/ - deleteMany( - args?: SelectSubset + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -2082,8 +3202,8 @@ export namespace Prisma { * }) * **/ - updateMany( - args: SelectSubset + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** @@ -2103,9 +3223,9 @@ export namespace Prisma { * } * }) **/ - upsert( - args: SelectSubset - ): Prisma__PostClient> + upsert>( + args: SelectSubset> + ): Prisma__PostClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** * Count the number of Posts. @@ -2123,7 +3243,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends _Record<'select', any> + T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -2241,7 +3361,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__PostClient implements Prisma.PrismaPromise { + export class Prisma__PostClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -2256,7 +3376,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - author(args?: Subset): Prisma__UserClient | Null>; + author = {}>(args?: Subset>): Prisma__UserClient<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; private get _document(); /** @@ -2288,15 +3408,15 @@ export namespace Prisma { /** * Post base type for findUnique actions */ - export type PostFindUniqueArgsBase = { + export type PostFindUniqueArgsBase = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * Filter, which Post to fetch. */ @@ -2306,7 +3426,7 @@ export namespace Prisma { /** * Post findUnique */ - export interface PostFindUniqueArgs extends PostFindUniqueArgsBase { + export interface PostFindUniqueArgs extends PostFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -2318,15 +3438,15 @@ export namespace Prisma { /** * Post findUniqueOrThrow */ - export type PostFindUniqueOrThrowArgs = { + export type PostFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * Filter, which Post to fetch. */ @@ -2337,15 +3457,15 @@ export namespace Prisma { /** * Post base type for findFirst actions */ - export type PostFindFirstArgsBase = { + export type PostFindFirstArgsBase = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * Filter, which Post to fetch. */ @@ -2385,7 +3505,7 @@ export namespace Prisma { /** * Post findFirst */ - export interface PostFindFirstArgs extends PostFindFirstArgsBase { + export interface PostFindFirstArgs extends PostFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -2397,15 +3517,15 @@ export namespace Prisma { /** * Post findFirstOrThrow */ - export type PostFindFirstOrThrowArgs = { + export type PostFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * Filter, which Post to fetch. */ @@ -2446,15 +3566,15 @@ export namespace Prisma { /** * Post findMany */ - export type PostFindManyArgs = { + export type PostFindManyArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * Filter, which Posts to fetch. */ @@ -2490,15 +3610,15 @@ export namespace Prisma { /** * Post create */ - export type PostCreateArgs = { + export type PostCreateArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * The data needed to create a Post. */ @@ -2509,7 +3629,7 @@ export namespace Prisma { /** * Post createMany */ - export type PostCreateManyArgs = { + export type PostCreateManyArgs = { /** * The data used to create many Posts. */ @@ -2521,15 +3641,15 @@ export namespace Prisma { /** * Post update */ - export type PostUpdateArgs = { + export type PostUpdateArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * The data needed to update a Post. */ @@ -2544,7 +3664,7 @@ export namespace Prisma { /** * Post updateMany */ - export type PostUpdateManyArgs = { + export type PostUpdateManyArgs = { /** * The data used to update Posts. */ @@ -2559,15 +3679,15 @@ export namespace Prisma { /** * Post upsert */ - export type PostUpsertArgs = { + export type PostUpsertArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * The filter to search for the Post to update in case it exists. */ @@ -2586,15 +3706,15 @@ export namespace Prisma { /** * Post delete */ - export type PostDeleteArgs = { + export type PostDeleteArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null /** * Filter which Post to delete. */ @@ -2605,7 +3725,7 @@ export namespace Prisma { /** * Post deleteMany */ - export type PostDeleteManyArgs = { + export type PostDeleteManyArgs = { /** * Filter which Posts to delete */ @@ -2616,15 +3736,15 @@ export namespace Prisma { /** * Post without action */ - export type PostArgs = { + export type PostArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null } @@ -2771,7 +3891,7 @@ export namespace Prisma { _all?: true } - export type UserAggregateArgs = { + export type UserAggregateArgs = { /** * Filter which User to aggregate. */ @@ -2843,7 +3963,7 @@ export namespace Prisma { - export type UserGroupByArgs = { + export type UserGroupByArgs = { where?: UserWhereInput orderBy?: Enumerable by: UserScalarFieldEnum[] @@ -2894,7 +4014,7 @@ export namespace Prisma { > - export type UserSelect = { + export type UserSelect = $Extensions.GetSelect<{ id?: boolean email?: boolean int?: boolean @@ -2909,42 +4029,42 @@ export namespace Prisma { optionalEnum?: boolean boolean?: boolean optionalBoolean?: boolean - posts?: boolean | User$postsArgs - _count?: boolean | UserCountOutputTypeArgs - } + posts?: boolean | User$postsArgs + _count?: boolean | UserCountOutputTypeArgs + }, ExtArgs["result"]["user"]> + export type UserSelectScalar = { + id?: boolean + email?: boolean + int?: boolean + optionalInt?: boolean + float?: boolean + optionalFloat?: boolean + string?: boolean + optionalString?: boolean + json?: boolean + optionalJson?: boolean + enum?: boolean + optionalEnum?: boolean + boolean?: boolean + optionalBoolean?: boolean + } - export type UserInclude = { - posts?: boolean | User$postsArgs - _count?: boolean | UserCountOutputTypeArgs + export type UserInclude = { + posts?: boolean | User$postsArgs + _count?: boolean | UserCountOutputTypeArgs } - export type UserGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? User : - S extends undefined ? never : - S extends { include: any } & (UserArgs | UserFindManyArgs) - ? User & { - [P in TruthyKeys]: - P extends 'posts' ? Array < PostGetPayload> : - P extends '_count' ? UserCountOutputTypeGetPayload : never - } - : S extends { select: any } & (UserArgs | UserFindManyArgs) - ? { - [P in TruthyKeys]: - P extends 'posts' ? Array < PostGetPayload> : - P extends '_count' ? UserCountOutputTypeGetPayload : P extends keyof User ? User[P] : never - } - : User + type UserGetPayload = $Types.GetResult - type UserCountArgs = + type UserCountArgs = Omit & { select?: UserCountAggregateInputType | true } - export interface UserDelegate { - + export interface UserDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['User'], meta: { name: 'User' } } /** * Find zero or one User that matches the filter. * @param {UserFindUniqueArgs} args - Arguments to find a User @@ -2956,9 +4076,9 @@ export namespace Prisma { * } * }) **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__UserClient> : Prisma__UserClient | null, null> + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__UserClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__UserClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** * Find one User that matches the filter or throw an error with \`error.code='P2025'\` @@ -2972,9 +4092,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__UserClient> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__UserClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** * Find the first User that matches the filter. @@ -2989,9 +4109,9 @@ export namespace Prisma { * } * }) **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__UserClient> : Prisma__UserClient | null, null> + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__UserClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__UserClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> /** * Find the first User that matches the filter or @@ -3007,9 +4127,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__UserClient> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__UserClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** * Find zero or more Users that matches the filter. @@ -3027,9 +4147,9 @@ export namespace Prisma { * const userWithIdOnly = await prisma.user.findMany({ select: { id: true } }) * **/ - findMany( - args?: SelectSubset - ): Prisma.PrismaPromise>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** * Create a User. @@ -3043,9 +4163,9 @@ export namespace Prisma { * }) * **/ - create( - args: SelectSubset - ): Prisma__UserClient> + create>( + args: SelectSubset> + ): Prisma__UserClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** * Create many Users. @@ -3059,8 +4179,8 @@ export namespace Prisma { * }) * **/ - createMany( - args?: SelectSubset + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -3075,9 +4195,9 @@ export namespace Prisma { * }) * **/ - delete( - args: SelectSubset - ): Prisma__UserClient> + delete>( + args: SelectSubset> + ): Prisma__UserClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** * Update one User. @@ -3094,9 +4214,9 @@ export namespace Prisma { * }) * **/ - update( - args: SelectSubset - ): Prisma__UserClient> + update>( + args: SelectSubset> + ): Prisma__UserClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** * Delete zero or more Users. @@ -3110,8 +4230,8 @@ export namespace Prisma { * }) * **/ - deleteMany( - args?: SelectSubset + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -3131,8 +4251,8 @@ export namespace Prisma { * }) * **/ - updateMany( - args: SelectSubset + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** @@ -3152,9 +4272,9 @@ export namespace Prisma { * } * }) **/ - upsert( - args: SelectSubset - ): Prisma__UserClient> + upsert>( + args: SelectSubset> + ): Prisma__UserClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** * Count the number of Users. @@ -3172,7 +4292,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends _Record<'select', any> + T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -3290,7 +4410,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__UserClient implements Prisma.PrismaPromise { + export class Prisma__UserClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -3305,7 +4425,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - posts(args?: Subset): Prisma.PrismaPromise>| Null>; + posts = {}>(args?: Subset>): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>| Null>; private get _document(); /** @@ -3337,15 +4457,15 @@ export namespace Prisma { /** * User base type for findUnique actions */ - export type UserFindUniqueArgsBase = { + export type UserFindUniqueArgsBase = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * Filter, which User to fetch. */ @@ -3355,7 +4475,7 @@ export namespace Prisma { /** * User findUnique */ - export interface UserFindUniqueArgs extends UserFindUniqueArgsBase { + export interface UserFindUniqueArgs extends UserFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -3367,15 +4487,15 @@ export namespace Prisma { /** * User findUniqueOrThrow */ - export type UserFindUniqueOrThrowArgs = { + export type UserFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * Filter, which User to fetch. */ @@ -3386,15 +4506,15 @@ export namespace Prisma { /** * User base type for findFirst actions */ - export type UserFindFirstArgsBase = { + export type UserFindFirstArgsBase = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * Filter, which User to fetch. */ @@ -3434,7 +4554,7 @@ export namespace Prisma { /** * User findFirst */ - export interface UserFindFirstArgs extends UserFindFirstArgsBase { + export interface UserFindFirstArgs extends UserFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -3446,15 +4566,15 @@ export namespace Prisma { /** * User findFirstOrThrow */ - export type UserFindFirstOrThrowArgs = { + export type UserFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * Filter, which User to fetch. */ @@ -3495,15 +4615,15 @@ export namespace Prisma { /** * User findMany */ - export type UserFindManyArgs = { + export type UserFindManyArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * Filter, which Users to fetch. */ @@ -3539,15 +4659,15 @@ export namespace Prisma { /** * User create */ - export type UserCreateArgs = { + export type UserCreateArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * The data needed to create a User. */ @@ -3558,7 +4678,7 @@ export namespace Prisma { /** * User createMany */ - export type UserCreateManyArgs = { + export type UserCreateManyArgs = { /** * The data used to create many Users. */ @@ -3570,15 +4690,15 @@ export namespace Prisma { /** * User update */ - export type UserUpdateArgs = { + export type UserUpdateArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * The data needed to update a User. */ @@ -3593,7 +4713,7 @@ export namespace Prisma { /** * User updateMany */ - export type UserUpdateManyArgs = { + export type UserUpdateManyArgs = { /** * The data used to update Users. */ @@ -3608,15 +4728,15 @@ export namespace Prisma { /** * User upsert */ - export type UserUpsertArgs = { + export type UserUpsertArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * The filter to search for the User to update in case it exists. */ @@ -3635,15 +4755,15 @@ export namespace Prisma { /** * User delete */ - export type UserDeleteArgs = { + export type UserDeleteArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null /** * Filter which User to delete. */ @@ -3654,7 +4774,7 @@ export namespace Prisma { /** * User deleteMany */ - export type UserDeleteManyArgs = { + export type UserDeleteManyArgs = { /** * Filter which Users to delete */ @@ -3665,15 +4785,15 @@ export namespace Prisma { /** * User.posts */ - export type User$postsArgs = { + export type User$postsArgs = { /** * Select specific fields to fetch from the Post */ - select?: PostSelect | null + select?: PostSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: PostInclude | null + include?: PostInclude | null where?: PostWhereInput orderBy?: Enumerable cursor?: PostWhereUniqueInput @@ -3686,15 +4806,15 @@ export namespace Prisma { /** * User without action */ - export type UserArgs = { + export type UserArgs = { /** * Select specific fields to fetch from the User */ - select?: UserSelect | null + select?: UserSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: UserInclude | null + include?: UserInclude | null } @@ -3835,7 +4955,7 @@ export namespace Prisma { _all?: true } - export type MAggregateArgs = { + export type MAggregateArgs = { /** * Filter which M to aggregate. */ @@ -3907,7 +5027,7 @@ export namespace Prisma { - export type MGroupByArgs = { + export type MGroupByArgs = { where?: MWhereInput orderBy?: Enumerable by: MScalarFieldEnum[] @@ -3957,7 +5077,7 @@ export namespace Prisma { > - export type MSelect = { + export type MSelect = $Extensions.GetSelect<{ id?: boolean int?: boolean optionalInt?: boolean @@ -3971,42 +5091,41 @@ export namespace Prisma { optionalEnum?: boolean boolean?: boolean optionalBoolean?: boolean - n?: boolean | M$nArgs - _count?: boolean | MCountOutputTypeArgs - } + n?: boolean | M$nArgs + _count?: boolean | MCountOutputTypeArgs + }, ExtArgs["result"]["m"]> + export type MSelectScalar = { + id?: boolean + int?: boolean + optionalInt?: boolean + float?: boolean + optionalFloat?: boolean + string?: boolean + optionalString?: boolean + json?: boolean + optionalJson?: boolean + enum?: boolean + optionalEnum?: boolean + boolean?: boolean + optionalBoolean?: boolean + } - export type MInclude = { - n?: boolean | M$nArgs - _count?: boolean | MCountOutputTypeArgs + export type MInclude = { + n?: boolean | M$nArgs + _count?: boolean | MCountOutputTypeArgs } - export type MGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? M : - S extends undefined ? never : - S extends { include: any } & (MArgs | MFindManyArgs) - ? M & { - [P in TruthyKeys]: - P extends 'n' ? Array < NGetPayload> : - P extends '_count' ? MCountOutputTypeGetPayload : never - } - : S extends { select: any } & (MArgs | MFindManyArgs) - ? { - [P in TruthyKeys]: - P extends 'n' ? Array < NGetPayload> : - P extends '_count' ? MCountOutputTypeGetPayload : P extends keyof M ? M[P] : never - } - : M + type MGetPayload = $Types.GetResult - type MCountArgs = + type MCountArgs = Omit & { select?: MCountAggregateInputType | true } - export interface MDelegate { - + export interface MDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['M'], meta: { name: 'M' } } /** * Find zero or one M that matches the filter. * @param {MFindUniqueArgs} args - Arguments to find a M @@ -4018,9 +5137,9 @@ export namespace Prisma { * } * }) **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__MClient> : Prisma__MClient | null, null> + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__MClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__MClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** * Find one M that matches the filter or throw an error with \`error.code='P2025'\` @@ -4034,9 +5153,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__MClient> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__MClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** * Find the first M that matches the filter. @@ -4051,9 +5170,9 @@ export namespace Prisma { * } * }) **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__MClient> : Prisma__MClient | null, null> + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__MClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__MClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> /** * Find the first M that matches the filter or @@ -4069,9 +5188,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__MClient> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__MClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** * Find zero or more Ms that matches the filter. @@ -4089,9 +5208,9 @@ export namespace Prisma { * const mWithIdOnly = await prisma.m.findMany({ select: { id: true } }) * **/ - findMany( - args?: SelectSubset - ): Prisma.PrismaPromise>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** * Create a M. @@ -4105,9 +5224,9 @@ export namespace Prisma { * }) * **/ - create( - args: SelectSubset - ): Prisma__MClient> + create>( + args: SelectSubset> + ): Prisma__MClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** * Create many Ms. @@ -4121,8 +5240,8 @@ export namespace Prisma { * }) * **/ - createMany( - args?: SelectSubset + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -4137,9 +5256,9 @@ export namespace Prisma { * }) * **/ - delete( - args: SelectSubset - ): Prisma__MClient> + delete>( + args: SelectSubset> + ): Prisma__MClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** * Update one M. @@ -4156,9 +5275,9 @@ export namespace Prisma { * }) * **/ - update( - args: SelectSubset - ): Prisma__MClient> + update>( + args: SelectSubset> + ): Prisma__MClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** * Delete zero or more Ms. @@ -4172,8 +5291,8 @@ export namespace Prisma { * }) * **/ - deleteMany( - args?: SelectSubset + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -4193,8 +5312,8 @@ export namespace Prisma { * }) * **/ - updateMany( - args: SelectSubset + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** @@ -4214,9 +5333,9 @@ export namespace Prisma { * } * }) **/ - upsert( - args: SelectSubset - ): Prisma__MClient> + upsert>( + args: SelectSubset> + ): Prisma__MClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** * Count the number of Ms. @@ -4234,7 +5353,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends _Record<'select', any> + T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -4352,7 +5471,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__MClient implements Prisma.PrismaPromise { + export class Prisma__MClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -4367,7 +5486,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - n(args?: Subset): Prisma.PrismaPromise>| Null>; + n = {}>(args?: Subset>): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>| Null>; private get _document(); /** @@ -4399,15 +5518,15 @@ export namespace Prisma { /** * M base type for findUnique actions */ - export type MFindUniqueArgsBase = { + export type MFindUniqueArgsBase = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * Filter, which M to fetch. */ @@ -4417,7 +5536,7 @@ export namespace Prisma { /** * M findUnique */ - export interface MFindUniqueArgs extends MFindUniqueArgsBase { + export interface MFindUniqueArgs extends MFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -4429,15 +5548,15 @@ export namespace Prisma { /** * M findUniqueOrThrow */ - export type MFindUniqueOrThrowArgs = { + export type MFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * Filter, which M to fetch. */ @@ -4448,15 +5567,15 @@ export namespace Prisma { /** * M base type for findFirst actions */ - export type MFindFirstArgsBase = { + export type MFindFirstArgsBase = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * Filter, which M to fetch. */ @@ -4496,7 +5615,7 @@ export namespace Prisma { /** * M findFirst */ - export interface MFindFirstArgs extends MFindFirstArgsBase { + export interface MFindFirstArgs extends MFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -4508,15 +5627,15 @@ export namespace Prisma { /** * M findFirstOrThrow */ - export type MFindFirstOrThrowArgs = { + export type MFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * Filter, which M to fetch. */ @@ -4557,15 +5676,15 @@ export namespace Prisma { /** * M findMany */ - export type MFindManyArgs = { + export type MFindManyArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * Filter, which MS to fetch. */ @@ -4601,15 +5720,15 @@ export namespace Prisma { /** * M create */ - export type MCreateArgs = { + export type MCreateArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * The data needed to create a M. */ @@ -4620,7 +5739,7 @@ export namespace Prisma { /** * M createMany */ - export type MCreateManyArgs = { + export type MCreateManyArgs = { /** * The data used to create many MS. */ @@ -4632,15 +5751,15 @@ export namespace Prisma { /** * M update */ - export type MUpdateArgs = { + export type MUpdateArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * The data needed to update a M. */ @@ -4655,7 +5774,7 @@ export namespace Prisma { /** * M updateMany */ - export type MUpdateManyArgs = { + export type MUpdateManyArgs = { /** * The data used to update MS. */ @@ -4670,15 +5789,15 @@ export namespace Prisma { /** * M upsert */ - export type MUpsertArgs = { + export type MUpsertArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * The filter to search for the M to update in case it exists. */ @@ -4697,15 +5816,15 @@ export namespace Prisma { /** * M delete */ - export type MDeleteArgs = { + export type MDeleteArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null /** * Filter which M to delete. */ @@ -4716,7 +5835,7 @@ export namespace Prisma { /** * M deleteMany */ - export type MDeleteManyArgs = { + export type MDeleteManyArgs = { /** * Filter which MS to delete */ @@ -4727,15 +5846,15 @@ export namespace Prisma { /** * M.n */ - export type M$nArgs = { + export type M$nArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null where?: NWhereInput orderBy?: Enumerable cursor?: NWhereUniqueInput @@ -4748,15 +5867,15 @@ export namespace Prisma { /** * M without action */ - export type MArgs = { + export type MArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null } @@ -4897,7 +6016,7 @@ export namespace Prisma { _all?: true } - export type NAggregateArgs = { + export type NAggregateArgs = { /** * Filter which N to aggregate. */ @@ -4969,7 +6088,7 @@ export namespace Prisma { - export type NGroupByArgs = { + export type NGroupByArgs = { where?: NWhereInput orderBy?: Enumerable by: NScalarFieldEnum[] @@ -5019,7 +6138,7 @@ export namespace Prisma { > - export type NSelect = { + export type NSelect = $Extensions.GetSelect<{ id?: boolean int?: boolean optionalInt?: boolean @@ -5033,42 +6152,41 @@ export namespace Prisma { optionalEnum?: boolean boolean?: boolean optionalBoolean?: boolean - m?: boolean | N$mArgs - _count?: boolean | NCountOutputTypeArgs - } + m?: boolean | N$mArgs + _count?: boolean | NCountOutputTypeArgs + }, ExtArgs["result"]["n"]> + export type NSelectScalar = { + id?: boolean + int?: boolean + optionalInt?: boolean + float?: boolean + optionalFloat?: boolean + string?: boolean + optionalString?: boolean + json?: boolean + optionalJson?: boolean + enum?: boolean + optionalEnum?: boolean + boolean?: boolean + optionalBoolean?: boolean + } - export type NInclude = { - m?: boolean | N$mArgs - _count?: boolean | NCountOutputTypeArgs + export type NInclude = { + m?: boolean | N$mArgs + _count?: boolean | NCountOutputTypeArgs } - export type NGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? N : - S extends undefined ? never : - S extends { include: any } & (NArgs | NFindManyArgs) - ? N & { - [P in TruthyKeys]: - P extends 'm' ? Array < MGetPayload> : - P extends '_count' ? NCountOutputTypeGetPayload : never - } - : S extends { select: any } & (NArgs | NFindManyArgs) - ? { - [P in TruthyKeys]: - P extends 'm' ? Array < MGetPayload> : - P extends '_count' ? NCountOutputTypeGetPayload : P extends keyof N ? N[P] : never - } - : N + type NGetPayload = $Types.GetResult - type NCountArgs = + type NCountArgs = Omit & { select?: NCountAggregateInputType | true } - export interface NDelegate { - + export interface NDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['N'], meta: { name: 'N' } } /** * Find zero or one N that matches the filter. * @param {NFindUniqueArgs} args - Arguments to find a N @@ -5080,9 +6198,9 @@ export namespace Prisma { * } * }) **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__NClient> : Prisma__NClient | null, null> + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__NClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__NClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** * Find one N that matches the filter or throw an error with \`error.code='P2025'\` @@ -5096,9 +6214,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__NClient> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__NClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** * Find the first N that matches the filter. @@ -5113,9 +6231,9 @@ export namespace Prisma { * } * }) **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__NClient> : Prisma__NClient | null, null> + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__NClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__NClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> /** * Find the first N that matches the filter or @@ -5131,9 +6249,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__NClient> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__NClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** * Find zero or more Ns that matches the filter. @@ -5151,9 +6269,9 @@ export namespace Prisma { * const nWithIdOnly = await prisma.n.findMany({ select: { id: true } }) * **/ - findMany( - args?: SelectSubset - ): Prisma.PrismaPromise>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** * Create a N. @@ -5167,9 +6285,9 @@ export namespace Prisma { * }) * **/ - create( - args: SelectSubset - ): Prisma__NClient> + create>( + args: SelectSubset> + ): Prisma__NClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** * Create many Ns. @@ -5183,8 +6301,8 @@ export namespace Prisma { * }) * **/ - createMany( - args?: SelectSubset + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -5199,9 +6317,9 @@ export namespace Prisma { * }) * **/ - delete( - args: SelectSubset - ): Prisma__NClient> + delete>( + args: SelectSubset> + ): Prisma__NClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** * Update one N. @@ -5218,9 +6336,9 @@ export namespace Prisma { * }) * **/ - update( - args: SelectSubset - ): Prisma__NClient> + update>( + args: SelectSubset> + ): Prisma__NClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** * Delete zero or more Ns. @@ -5234,8 +6352,8 @@ export namespace Prisma { * }) * **/ - deleteMany( - args?: SelectSubset + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -5255,8 +6373,8 @@ export namespace Prisma { * }) * **/ - updateMany( - args: SelectSubset + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** @@ -5276,9 +6394,9 @@ export namespace Prisma { * } * }) **/ - upsert( - args: SelectSubset - ): Prisma__NClient> + upsert>( + args: SelectSubset> + ): Prisma__NClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** * Count the number of Ns. @@ -5296,7 +6414,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends _Record<'select', any> + T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -5414,7 +6532,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__NClient implements Prisma.PrismaPromise { + export class Prisma__NClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -5429,7 +6547,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - m(args?: Subset): Prisma.PrismaPromise>| Null>; + m = {}>(args?: Subset>): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>| Null>; private get _document(); /** @@ -5461,15 +6579,15 @@ export namespace Prisma { /** * N base type for findUnique actions */ - export type NFindUniqueArgsBase = { + export type NFindUniqueArgsBase = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * Filter, which N to fetch. */ @@ -5479,7 +6597,7 @@ export namespace Prisma { /** * N findUnique */ - export interface NFindUniqueArgs extends NFindUniqueArgsBase { + export interface NFindUniqueArgs extends NFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -5491,15 +6609,15 @@ export namespace Prisma { /** * N findUniqueOrThrow */ - export type NFindUniqueOrThrowArgs = { + export type NFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * Filter, which N to fetch. */ @@ -5510,15 +6628,15 @@ export namespace Prisma { /** * N base type for findFirst actions */ - export type NFindFirstArgsBase = { + export type NFindFirstArgsBase = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * Filter, which N to fetch. */ @@ -5558,7 +6676,7 @@ export namespace Prisma { /** * N findFirst */ - export interface NFindFirstArgs extends NFindFirstArgsBase { + export interface NFindFirstArgs extends NFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -5570,15 +6688,15 @@ export namespace Prisma { /** * N findFirstOrThrow */ - export type NFindFirstOrThrowArgs = { + export type NFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * Filter, which N to fetch. */ @@ -5619,15 +6737,15 @@ export namespace Prisma { /** * N findMany */ - export type NFindManyArgs = { + export type NFindManyArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * Filter, which NS to fetch. */ @@ -5663,15 +6781,15 @@ export namespace Prisma { /** * N create */ - export type NCreateArgs = { + export type NCreateArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * The data needed to create a N. */ @@ -5682,7 +6800,7 @@ export namespace Prisma { /** * N createMany */ - export type NCreateManyArgs = { + export type NCreateManyArgs = { /** * The data used to create many NS. */ @@ -5694,15 +6812,15 @@ export namespace Prisma { /** * N update */ - export type NUpdateArgs = { + export type NUpdateArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * The data needed to update a N. */ @@ -5717,7 +6835,7 @@ export namespace Prisma { /** * N updateMany */ - export type NUpdateManyArgs = { + export type NUpdateManyArgs = { /** * The data used to update NS. */ @@ -5732,15 +6850,15 @@ export namespace Prisma { /** * N upsert */ - export type NUpsertArgs = { + export type NUpsertArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * The filter to search for the N to update in case it exists. */ @@ -5759,15 +6877,15 @@ export namespace Prisma { /** * N delete */ - export type NDeleteArgs = { + export type NDeleteArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null /** * Filter which N to delete. */ @@ -5778,7 +6896,7 @@ export namespace Prisma { /** * N deleteMany */ - export type NDeleteManyArgs = { + export type NDeleteManyArgs = { /** * Filter which NS to delete */ @@ -5789,15 +6907,15 @@ export namespace Prisma { /** * N.m */ - export type N$mArgs = { + export type N$mArgs = { /** * Select specific fields to fetch from the M */ - select?: MSelect | null + select?: MSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: MInclude | null + include?: MInclude | null where?: MWhereInput orderBy?: Enumerable cursor?: MWhereUniqueInput @@ -5810,15 +6928,15 @@ export namespace Prisma { /** * N without action */ - export type NArgs = { + export type NArgs = { /** * Select specific fields to fetch from the N */ - select?: NSelect | null + select?: NSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: NInclude | null + include?: NInclude | null } @@ -5959,7 +7077,7 @@ export namespace Prisma { _all?: true } - export type OneOptionalAggregateArgs = { + export type OneOptionalAggregateArgs = { /** * Filter which OneOptional to aggregate. */ @@ -6031,7 +7149,7 @@ export namespace Prisma { - export type OneOptionalGroupByArgs = { + export type OneOptionalGroupByArgs = { where?: OneOptionalWhereInput orderBy?: Enumerable by: OneOptionalScalarFieldEnum[] @@ -6081,7 +7199,7 @@ export namespace Prisma { > - export type OneOptionalSelect = { + export type OneOptionalSelect = $Extensions.GetSelect<{ id?: boolean int?: boolean optionalInt?: boolean @@ -6095,42 +7213,41 @@ export namespace Prisma { optionalEnum?: boolean boolean?: boolean optionalBoolean?: boolean - many?: boolean | OneOptional$manyArgs - _count?: boolean | OneOptionalCountOutputTypeArgs - } + many?: boolean | OneOptional$manyArgs + _count?: boolean | OneOptionalCountOutputTypeArgs + }, ExtArgs["result"]["oneOptional"]> + export type OneOptionalSelectScalar = { + id?: boolean + int?: boolean + optionalInt?: boolean + float?: boolean + optionalFloat?: boolean + string?: boolean + optionalString?: boolean + json?: boolean + optionalJson?: boolean + enum?: boolean + optionalEnum?: boolean + boolean?: boolean + optionalBoolean?: boolean + } - export type OneOptionalInclude = { - many?: boolean | OneOptional$manyArgs - _count?: boolean | OneOptionalCountOutputTypeArgs + export type OneOptionalInclude = { + many?: boolean | OneOptional$manyArgs + _count?: boolean | OneOptionalCountOutputTypeArgs } - export type OneOptionalGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? OneOptional : - S extends undefined ? never : - S extends { include: any } & (OneOptionalArgs | OneOptionalFindManyArgs) - ? OneOptional & { - [P in TruthyKeys]: - P extends 'many' ? Array < ManyRequiredGetPayload> : - P extends '_count' ? OneOptionalCountOutputTypeGetPayload : never - } - : S extends { select: any } & (OneOptionalArgs | OneOptionalFindManyArgs) - ? { - [P in TruthyKeys]: - P extends 'many' ? Array < ManyRequiredGetPayload> : - P extends '_count' ? OneOptionalCountOutputTypeGetPayload : P extends keyof OneOptional ? OneOptional[P] : never - } - : OneOptional + type OneOptionalGetPayload = $Types.GetResult - type OneOptionalCountArgs = + type OneOptionalCountArgs = Omit & { select?: OneOptionalCountAggregateInputType | true } - export interface OneOptionalDelegate { - + export interface OneOptionalDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['OneOptional'], meta: { name: 'OneOptional' } } /** * Find zero or one OneOptional that matches the filter. * @param {OneOptionalFindUniqueArgs} args - Arguments to find a OneOptional @@ -6142,9 +7259,9 @@ export namespace Prisma { * } * }) **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__OneOptionalClient> : Prisma__OneOptionalClient | null, null> + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__OneOptionalClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__OneOptionalClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** * Find one OneOptional that matches the filter or throw an error with \`error.code='P2025'\` @@ -6158,9 +7275,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__OneOptionalClient> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__OneOptionalClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** * Find the first OneOptional that matches the filter. @@ -6175,9 +7292,9 @@ export namespace Prisma { * } * }) **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__OneOptionalClient> : Prisma__OneOptionalClient | null, null> + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__OneOptionalClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__OneOptionalClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> /** * Find the first OneOptional that matches the filter or @@ -6193,9 +7310,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__OneOptionalClient> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__OneOptionalClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** * Find zero or more OneOptionals that matches the filter. @@ -6213,9 +7330,9 @@ export namespace Prisma { * const oneOptionalWithIdOnly = await prisma.oneOptional.findMany({ select: { id: true } }) * **/ - findMany( - args?: SelectSubset - ): Prisma.PrismaPromise>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** * Create a OneOptional. @@ -6229,9 +7346,9 @@ export namespace Prisma { * }) * **/ - create( - args: SelectSubset - ): Prisma__OneOptionalClient> + create>( + args: SelectSubset> + ): Prisma__OneOptionalClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** * Create many OneOptionals. @@ -6245,8 +7362,8 @@ export namespace Prisma { * }) * **/ - createMany( - args?: SelectSubset + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -6261,9 +7378,9 @@ export namespace Prisma { * }) * **/ - delete( - args: SelectSubset - ): Prisma__OneOptionalClient> + delete>( + args: SelectSubset> + ): Prisma__OneOptionalClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** * Update one OneOptional. @@ -6280,9 +7397,9 @@ export namespace Prisma { * }) * **/ - update( - args: SelectSubset - ): Prisma__OneOptionalClient> + update>( + args: SelectSubset> + ): Prisma__OneOptionalClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** * Delete zero or more OneOptionals. @@ -6296,8 +7413,8 @@ export namespace Prisma { * }) * **/ - deleteMany( - args?: SelectSubset + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -6317,8 +7434,8 @@ export namespace Prisma { * }) * **/ - updateMany( - args: SelectSubset + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** @@ -6338,9 +7455,9 @@ export namespace Prisma { * } * }) **/ - upsert( - args: SelectSubset - ): Prisma__OneOptionalClient> + upsert>( + args: SelectSubset> + ): Prisma__OneOptionalClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** * Count the number of OneOptionals. @@ -6358,7 +7475,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends _Record<'select', any> + T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -6476,7 +7593,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__OneOptionalClient implements Prisma.PrismaPromise { + export class Prisma__OneOptionalClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -6491,7 +7608,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - many(args?: Subset): Prisma.PrismaPromise>| Null>; + many = {}>(args?: Subset>): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>| Null>; private get _document(); /** @@ -6523,15 +7640,15 @@ export namespace Prisma { /** * OneOptional base type for findUnique actions */ - export type OneOptionalFindUniqueArgsBase = { + export type OneOptionalFindUniqueArgsBase = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * Filter, which OneOptional to fetch. */ @@ -6541,7 +7658,7 @@ export namespace Prisma { /** * OneOptional findUnique */ - export interface OneOptionalFindUniqueArgs extends OneOptionalFindUniqueArgsBase { + export interface OneOptionalFindUniqueArgs extends OneOptionalFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -6553,15 +7670,15 @@ export namespace Prisma { /** * OneOptional findUniqueOrThrow */ - export type OneOptionalFindUniqueOrThrowArgs = { + export type OneOptionalFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * Filter, which OneOptional to fetch. */ @@ -6572,15 +7689,15 @@ export namespace Prisma { /** * OneOptional base type for findFirst actions */ - export type OneOptionalFindFirstArgsBase = { + export type OneOptionalFindFirstArgsBase = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * Filter, which OneOptional to fetch. */ @@ -6620,7 +7737,7 @@ export namespace Prisma { /** * OneOptional findFirst */ - export interface OneOptionalFindFirstArgs extends OneOptionalFindFirstArgsBase { + export interface OneOptionalFindFirstArgs extends OneOptionalFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -6632,15 +7749,15 @@ export namespace Prisma { /** * OneOptional findFirstOrThrow */ - export type OneOptionalFindFirstOrThrowArgs = { + export type OneOptionalFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * Filter, which OneOptional to fetch. */ @@ -6681,15 +7798,15 @@ export namespace Prisma { /** * OneOptional findMany */ - export type OneOptionalFindManyArgs = { + export type OneOptionalFindManyArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * Filter, which OneOptionals to fetch. */ @@ -6725,15 +7842,15 @@ export namespace Prisma { /** * OneOptional create */ - export type OneOptionalCreateArgs = { + export type OneOptionalCreateArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * The data needed to create a OneOptional. */ @@ -6744,7 +7861,7 @@ export namespace Prisma { /** * OneOptional createMany */ - export type OneOptionalCreateManyArgs = { + export type OneOptionalCreateManyArgs = { /** * The data used to create many OneOptionals. */ @@ -6756,15 +7873,15 @@ export namespace Prisma { /** * OneOptional update */ - export type OneOptionalUpdateArgs = { + export type OneOptionalUpdateArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * The data needed to update a OneOptional. */ @@ -6779,7 +7896,7 @@ export namespace Prisma { /** * OneOptional updateMany */ - export type OneOptionalUpdateManyArgs = { + export type OneOptionalUpdateManyArgs = { /** * The data used to update OneOptionals. */ @@ -6794,15 +7911,15 @@ export namespace Prisma { /** * OneOptional upsert */ - export type OneOptionalUpsertArgs = { + export type OneOptionalUpsertArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * The filter to search for the OneOptional to update in case it exists. */ @@ -6821,15 +7938,15 @@ export namespace Prisma { /** * OneOptional delete */ - export type OneOptionalDeleteArgs = { + export type OneOptionalDeleteArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null /** * Filter which OneOptional to delete. */ @@ -6840,7 +7957,7 @@ export namespace Prisma { /** * OneOptional deleteMany */ - export type OneOptionalDeleteManyArgs = { + export type OneOptionalDeleteManyArgs = { /** * Filter which OneOptionals to delete */ @@ -6851,15 +7968,15 @@ export namespace Prisma { /** * OneOptional.many */ - export type OneOptional$manyArgs = { + export type OneOptional$manyArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null where?: ManyRequiredWhereInput orderBy?: Enumerable cursor?: ManyRequiredWhereUniqueInput @@ -6872,15 +7989,15 @@ export namespace Prisma { /** * OneOptional without action */ - export type OneOptionalArgs = { + export type OneOptionalArgs = { /** * Select specific fields to fetch from the OneOptional */ - select?: OneOptionalSelect | null + select?: OneOptionalSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: OneOptionalInclude | null + include?: OneOptionalInclude | null } @@ -7031,7 +8148,7 @@ export namespace Prisma { _all?: true } - export type ManyRequiredAggregateArgs = { + export type ManyRequiredAggregateArgs = { /** * Filter which ManyRequired to aggregate. */ @@ -7103,7 +8220,7 @@ export namespace Prisma { - export type ManyRequiredGroupByArgs = { + export type ManyRequiredGroupByArgs = { where?: ManyRequiredWhereInput orderBy?: Enumerable by: ManyRequiredScalarFieldEnum[] @@ -7154,7 +8271,7 @@ export namespace Prisma { > - export type ManyRequiredSelect = { + export type ManyRequiredSelect = $Extensions.GetSelect<{ id?: boolean oneOptionalId?: boolean int?: boolean @@ -7169,38 +8286,40 @@ export namespace Prisma { optionalEnum?: boolean boolean?: boolean optionalBoolean?: boolean - one?: boolean | OneOptionalArgs - } + one?: boolean | OneOptionalArgs + }, ExtArgs["result"]["manyRequired"]> + export type ManyRequiredSelectScalar = { + id?: boolean + oneOptionalId?: boolean + int?: boolean + optionalInt?: boolean + float?: boolean + optionalFloat?: boolean + string?: boolean + optionalString?: boolean + json?: boolean + optionalJson?: boolean + enum?: boolean + optionalEnum?: boolean + boolean?: boolean + optionalBoolean?: boolean + } - export type ManyRequiredInclude = { - one?: boolean | OneOptionalArgs + export type ManyRequiredInclude = { + one?: boolean | OneOptionalArgs } - export type ManyRequiredGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? ManyRequired : - S extends undefined ? never : - S extends { include: any } & (ManyRequiredArgs | ManyRequiredFindManyArgs) - ? ManyRequired & { - [P in TruthyKeys]: - P extends 'one' ? OneOptionalGetPayload | null : never - } - : S extends { select: any } & (ManyRequiredArgs | ManyRequiredFindManyArgs) - ? { - [P in TruthyKeys]: - P extends 'one' ? OneOptionalGetPayload | null : P extends keyof ManyRequired ? ManyRequired[P] : never - } - : ManyRequired + type ManyRequiredGetPayload = $Types.GetResult - type ManyRequiredCountArgs = + type ManyRequiredCountArgs = Omit & { select?: ManyRequiredCountAggregateInputType | true } - export interface ManyRequiredDelegate { - + export interface ManyRequiredDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['ManyRequired'], meta: { name: 'ManyRequired' } } /** * Find zero or one ManyRequired that matches the filter. * @param {ManyRequiredFindUniqueArgs} args - Arguments to find a ManyRequired @@ -7212,9 +8331,9 @@ export namespace Prisma { * } * }) **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__ManyRequiredClient> : Prisma__ManyRequiredClient | null, null> + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__ManyRequiredClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__ManyRequiredClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** * Find one ManyRequired that matches the filter or throw an error with \`error.code='P2025'\` @@ -7228,9 +8347,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__ManyRequiredClient> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__ManyRequiredClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** * Find the first ManyRequired that matches the filter. @@ -7245,9 +8364,9 @@ export namespace Prisma { * } * }) **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__ManyRequiredClient> : Prisma__ManyRequiredClient | null, null> + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__ManyRequiredClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__ManyRequiredClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> /** * Find the first ManyRequired that matches the filter or @@ -7263,9 +8382,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__ManyRequiredClient> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__ManyRequiredClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** * Find zero or more ManyRequireds that matches the filter. @@ -7283,9 +8402,9 @@ export namespace Prisma { * const manyRequiredWithIdOnly = await prisma.manyRequired.findMany({ select: { id: true } }) * **/ - findMany( - args?: SelectSubset - ): Prisma.PrismaPromise>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** * Create a ManyRequired. @@ -7299,9 +8418,9 @@ export namespace Prisma { * }) * **/ - create( - args: SelectSubset - ): Prisma__ManyRequiredClient> + create>( + args: SelectSubset> + ): Prisma__ManyRequiredClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** * Create many ManyRequireds. @@ -7315,8 +8434,8 @@ export namespace Prisma { * }) * **/ - createMany( - args?: SelectSubset + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -7331,9 +8450,9 @@ export namespace Prisma { * }) * **/ - delete( - args: SelectSubset - ): Prisma__ManyRequiredClient> + delete>( + args: SelectSubset> + ): Prisma__ManyRequiredClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** * Update one ManyRequired. @@ -7350,9 +8469,9 @@ export namespace Prisma { * }) * **/ - update( - args: SelectSubset - ): Prisma__ManyRequiredClient> + update>( + args: SelectSubset> + ): Prisma__ManyRequiredClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** * Delete zero or more ManyRequireds. @@ -7366,8 +8485,8 @@ export namespace Prisma { * }) * **/ - deleteMany( - args?: SelectSubset + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -7387,8 +8506,8 @@ export namespace Prisma { * }) * **/ - updateMany( - args: SelectSubset + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** @@ -7408,9 +8527,9 @@ export namespace Prisma { * } * }) **/ - upsert( - args: SelectSubset - ): Prisma__ManyRequiredClient> + upsert>( + args: SelectSubset> + ): Prisma__ManyRequiredClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** * Count the number of ManyRequireds. @@ -7428,7 +8547,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends _Record<'select', any> + T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -7546,7 +8665,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__ManyRequiredClient implements Prisma.PrismaPromise { + export class Prisma__ManyRequiredClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -7561,7 +8680,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - one(args?: Subset): Prisma__OneOptionalClient | Null>; + one = {}>(args?: Subset>): Prisma__OneOptionalClient<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; private get _document(); /** @@ -7593,15 +8712,15 @@ export namespace Prisma { /** * ManyRequired base type for findUnique actions */ - export type ManyRequiredFindUniqueArgsBase = { + export type ManyRequiredFindUniqueArgsBase = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * Filter, which ManyRequired to fetch. */ @@ -7611,7 +8730,7 @@ export namespace Prisma { /** * ManyRequired findUnique */ - export interface ManyRequiredFindUniqueArgs extends ManyRequiredFindUniqueArgsBase { + export interface ManyRequiredFindUniqueArgs extends ManyRequiredFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -7623,15 +8742,15 @@ export namespace Prisma { /** * ManyRequired findUniqueOrThrow */ - export type ManyRequiredFindUniqueOrThrowArgs = { + export type ManyRequiredFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * Filter, which ManyRequired to fetch. */ @@ -7642,15 +8761,15 @@ export namespace Prisma { /** * ManyRequired base type for findFirst actions */ - export type ManyRequiredFindFirstArgsBase = { + export type ManyRequiredFindFirstArgsBase = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * Filter, which ManyRequired to fetch. */ @@ -7690,7 +8809,7 @@ export namespace Prisma { /** * ManyRequired findFirst */ - export interface ManyRequiredFindFirstArgs extends ManyRequiredFindFirstArgsBase { + export interface ManyRequiredFindFirstArgs extends ManyRequiredFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -7702,15 +8821,15 @@ export namespace Prisma { /** * ManyRequired findFirstOrThrow */ - export type ManyRequiredFindFirstOrThrowArgs = { + export type ManyRequiredFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * Filter, which ManyRequired to fetch. */ @@ -7751,15 +8870,15 @@ export namespace Prisma { /** * ManyRequired findMany */ - export type ManyRequiredFindManyArgs = { + export type ManyRequiredFindManyArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * Filter, which ManyRequireds to fetch. */ @@ -7795,15 +8914,15 @@ export namespace Prisma { /** * ManyRequired create */ - export type ManyRequiredCreateArgs = { + export type ManyRequiredCreateArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * The data needed to create a ManyRequired. */ @@ -7814,7 +8933,7 @@ export namespace Prisma { /** * ManyRequired createMany */ - export type ManyRequiredCreateManyArgs = { + export type ManyRequiredCreateManyArgs = { /** * The data used to create many ManyRequireds. */ @@ -7826,15 +8945,15 @@ export namespace Prisma { /** * ManyRequired update */ - export type ManyRequiredUpdateArgs = { + export type ManyRequiredUpdateArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * The data needed to update a ManyRequired. */ @@ -7849,7 +8968,7 @@ export namespace Prisma { /** * ManyRequired updateMany */ - export type ManyRequiredUpdateManyArgs = { + export type ManyRequiredUpdateManyArgs = { /** * The data used to update ManyRequireds. */ @@ -7864,15 +8983,15 @@ export namespace Prisma { /** * ManyRequired upsert */ - export type ManyRequiredUpsertArgs = { + export type ManyRequiredUpsertArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * The filter to search for the ManyRequired to update in case it exists. */ @@ -7891,15 +9010,15 @@ export namespace Prisma { /** * ManyRequired delete */ - export type ManyRequiredDeleteArgs = { + export type ManyRequiredDeleteArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null /** * Filter which ManyRequired to delete. */ @@ -7910,7 +9029,7 @@ export namespace Prisma { /** * ManyRequired deleteMany */ - export type ManyRequiredDeleteManyArgs = { + export type ManyRequiredDeleteManyArgs = { /** * Filter which ManyRequireds to delete */ @@ -7921,15 +9040,15 @@ export namespace Prisma { /** * ManyRequired without action */ - export type ManyRequiredArgs = { + export type ManyRequiredArgs = { /** * Select specific fields to fetch from the ManyRequired */ - select?: ManyRequiredSelect | null + select?: ManyRequiredSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ManyRequiredInclude | null + include?: ManyRequiredInclude | null } @@ -8080,7 +9199,7 @@ export namespace Prisma { _all?: true } - export type OptionalSide1AggregateArgs = { + export type OptionalSide1AggregateArgs = { /** * Filter which OptionalSide1 to aggregate. */ @@ -8152,7 +9271,7 @@ export namespace Prisma { - export type OptionalSide1GroupByArgs = { + export type OptionalSide1GroupByArgs = { where?: OptionalSide1WhereInput orderBy?: Enumerable by: OptionalSide1ScalarFieldEnum[] @@ -8203,7 +9322,7 @@ export namespace Prisma { > - export type OptionalSide1Select = { + export type OptionalSide1Select = $Extensions.GetSelect<{ id?: boolean optionalSide2Id?: boolean int?: boolean @@ -8218,38 +9337,40 @@ export namespace Prisma { optionalEnum?: boolean boolean?: boolean optionalBoolean?: boolean - opti?: boolean | OptionalSide2Args - } + opti?: boolean | OptionalSide2Args + }, ExtArgs["result"]["optionalSide1"]> + export type OptionalSide1SelectScalar = { + id?: boolean + optionalSide2Id?: boolean + int?: boolean + optionalInt?: boolean + float?: boolean + optionalFloat?: boolean + string?: boolean + optionalString?: boolean + json?: boolean + optionalJson?: boolean + enum?: boolean + optionalEnum?: boolean + boolean?: boolean + optionalBoolean?: boolean + } - export type OptionalSide1Include = { - opti?: boolean | OptionalSide2Args + export type OptionalSide1Include = { + opti?: boolean | OptionalSide2Args } - export type OptionalSide1GetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? OptionalSide1 : - S extends undefined ? never : - S extends { include: any } & (OptionalSide1Args | OptionalSide1FindManyArgs) - ? OptionalSide1 & { - [P in TruthyKeys]: - P extends 'opti' ? OptionalSide2GetPayload | null : never - } - : S extends { select: any } & (OptionalSide1Args | OptionalSide1FindManyArgs) - ? { - [P in TruthyKeys]: - P extends 'opti' ? OptionalSide2GetPayload | null : P extends keyof OptionalSide1 ? OptionalSide1[P] : never - } - : OptionalSide1 + type OptionalSide1GetPayload = $Types.GetResult - type OptionalSide1CountArgs = + type OptionalSide1CountArgs = Omit & { select?: OptionalSide1CountAggregateInputType | true } - export interface OptionalSide1Delegate { - + export interface OptionalSide1Delegate { + [K: symbol]: { types: Prisma.TypeMap['model']['OptionalSide1'], meta: { name: 'OptionalSide1' } } /** * Find zero or one OptionalSide1 that matches the filter. * @param {OptionalSide1FindUniqueArgs} args - Arguments to find a OptionalSide1 @@ -8261,9 +9382,9 @@ export namespace Prisma { * } * }) **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__OptionalSide1Client> : Prisma__OptionalSide1Client | null, null> + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__OptionalSide1Client<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__OptionalSide1Client<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** * Find one OptionalSide1 that matches the filter or throw an error with \`error.code='P2025'\` @@ -8277,9 +9398,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__OptionalSide1Client> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__OptionalSide1Client<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** * Find the first OptionalSide1 that matches the filter. @@ -8294,9 +9415,9 @@ export namespace Prisma { * } * }) **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__OptionalSide1Client> : Prisma__OptionalSide1Client | null, null> + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__OptionalSide1Client<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__OptionalSide1Client<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> /** * Find the first OptionalSide1 that matches the filter or @@ -8312,9 +9433,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__OptionalSide1Client> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__OptionalSide1Client<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** * Find zero or more OptionalSide1s that matches the filter. @@ -8332,9 +9453,9 @@ export namespace Prisma { * const optionalSide1WithIdOnly = await prisma.optionalSide1.findMany({ select: { id: true } }) * **/ - findMany( - args?: SelectSubset - ): Prisma.PrismaPromise>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** * Create a OptionalSide1. @@ -8348,9 +9469,9 @@ export namespace Prisma { * }) * **/ - create( - args: SelectSubset - ): Prisma__OptionalSide1Client> + create>( + args: SelectSubset> + ): Prisma__OptionalSide1Client<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** * Create many OptionalSide1s. @@ -8364,8 +9485,8 @@ export namespace Prisma { * }) * **/ - createMany( - args?: SelectSubset + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -8380,9 +9501,9 @@ export namespace Prisma { * }) * **/ - delete( - args: SelectSubset - ): Prisma__OptionalSide1Client> + delete>( + args: SelectSubset> + ): Prisma__OptionalSide1Client<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** * Update one OptionalSide1. @@ -8399,9 +9520,9 @@ export namespace Prisma { * }) * **/ - update( - args: SelectSubset - ): Prisma__OptionalSide1Client> + update>( + args: SelectSubset> + ): Prisma__OptionalSide1Client<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** * Delete zero or more OptionalSide1s. @@ -8415,8 +9536,8 @@ export namespace Prisma { * }) * **/ - deleteMany( - args?: SelectSubset + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -8436,8 +9557,8 @@ export namespace Prisma { * }) * **/ - updateMany( - args: SelectSubset + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** @@ -8457,9 +9578,9 @@ export namespace Prisma { * } * }) **/ - upsert( - args: SelectSubset - ): Prisma__OptionalSide1Client> + upsert>( + args: SelectSubset> + ): Prisma__OptionalSide1Client<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** * Count the number of OptionalSide1s. @@ -8477,7 +9598,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends _Record<'select', any> + T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -8595,7 +9716,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__OptionalSide1Client implements Prisma.PrismaPromise { + export class Prisma__OptionalSide1Client implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -8610,7 +9731,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - opti(args?: Subset): Prisma__OptionalSide2Client | Null>; + opti = {}>(args?: Subset>): Prisma__OptionalSide2Client<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; private get _document(); /** @@ -8642,15 +9763,15 @@ export namespace Prisma { /** * OptionalSide1 base type for findUnique actions */ - export type OptionalSide1FindUniqueArgsBase = { + export type OptionalSide1FindUniqueArgsBase = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * Filter, which OptionalSide1 to fetch. */ @@ -8660,7 +9781,7 @@ export namespace Prisma { /** * OptionalSide1 findUnique */ - export interface OptionalSide1FindUniqueArgs extends OptionalSide1FindUniqueArgsBase { + export interface OptionalSide1FindUniqueArgs extends OptionalSide1FindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -8672,15 +9793,15 @@ export namespace Prisma { /** * OptionalSide1 findUniqueOrThrow */ - export type OptionalSide1FindUniqueOrThrowArgs = { + export type OptionalSide1FindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * Filter, which OptionalSide1 to fetch. */ @@ -8691,15 +9812,15 @@ export namespace Prisma { /** * OptionalSide1 base type for findFirst actions */ - export type OptionalSide1FindFirstArgsBase = { + export type OptionalSide1FindFirstArgsBase = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * Filter, which OptionalSide1 to fetch. */ @@ -8739,7 +9860,7 @@ export namespace Prisma { /** * OptionalSide1 findFirst */ - export interface OptionalSide1FindFirstArgs extends OptionalSide1FindFirstArgsBase { + export interface OptionalSide1FindFirstArgs extends OptionalSide1FindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -8751,15 +9872,15 @@ export namespace Prisma { /** * OptionalSide1 findFirstOrThrow */ - export type OptionalSide1FindFirstOrThrowArgs = { + export type OptionalSide1FindFirstOrThrowArgs = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * Filter, which OptionalSide1 to fetch. */ @@ -8800,15 +9921,15 @@ export namespace Prisma { /** * OptionalSide1 findMany */ - export type OptionalSide1FindManyArgs = { + export type OptionalSide1FindManyArgs = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * Filter, which OptionalSide1s to fetch. */ @@ -8844,15 +9965,15 @@ export namespace Prisma { /** * OptionalSide1 create */ - export type OptionalSide1CreateArgs = { + export type OptionalSide1CreateArgs = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * The data needed to create a OptionalSide1. */ @@ -8863,7 +9984,7 @@ export namespace Prisma { /** * OptionalSide1 createMany */ - export type OptionalSide1CreateManyArgs = { + export type OptionalSide1CreateManyArgs = { /** * The data used to create many OptionalSide1s. */ @@ -8875,15 +9996,15 @@ export namespace Prisma { /** * OptionalSide1 update */ - export type OptionalSide1UpdateArgs = { + export type OptionalSide1UpdateArgs = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * The data needed to update a OptionalSide1. */ @@ -8898,7 +10019,7 @@ export namespace Prisma { /** * OptionalSide1 updateMany */ - export type OptionalSide1UpdateManyArgs = { + export type OptionalSide1UpdateManyArgs = { /** * The data used to update OptionalSide1s. */ @@ -8913,15 +10034,15 @@ export namespace Prisma { /** * OptionalSide1 upsert */ - export type OptionalSide1UpsertArgs = { + export type OptionalSide1UpsertArgs = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * The filter to search for the OptionalSide1 to update in case it exists. */ @@ -8940,15 +10061,15 @@ export namespace Prisma { /** * OptionalSide1 delete */ - export type OptionalSide1DeleteArgs = { + export type OptionalSide1DeleteArgs = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null /** * Filter which OptionalSide1 to delete. */ @@ -8959,7 +10080,7 @@ export namespace Prisma { /** * OptionalSide1 deleteMany */ - export type OptionalSide1DeleteManyArgs = { + export type OptionalSide1DeleteManyArgs = { /** * Filter which OptionalSide1s to delete */ @@ -8970,15 +10091,15 @@ export namespace Prisma { /** * OptionalSide1 without action */ - export type OptionalSide1Args = { + export type OptionalSide1Args = { /** * Select specific fields to fetch from the OptionalSide1 */ - select?: OptionalSide1Select | null + select?: OptionalSide1Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide1Include | null + include?: OptionalSide1Include | null } @@ -9119,7 +10240,7 @@ export namespace Prisma { _all?: true } - export type OptionalSide2AggregateArgs = { + export type OptionalSide2AggregateArgs = { /** * Filter which OptionalSide2 to aggregate. */ @@ -9191,7 +10312,7 @@ export namespace Prisma { - export type OptionalSide2GroupByArgs = { + export type OptionalSide2GroupByArgs = { where?: OptionalSide2WhereInput orderBy?: Enumerable by: OptionalSide2ScalarFieldEnum[] @@ -9241,7 +10362,7 @@ export namespace Prisma { > - export type OptionalSide2Select = { + export type OptionalSide2Select = $Extensions.GetSelect<{ id?: boolean int?: boolean optionalInt?: boolean @@ -9255,38 +10376,39 @@ export namespace Prisma { optionalEnum?: boolean boolean?: boolean optionalBoolean?: boolean - opti?: boolean | OptionalSide1Args - } + opti?: boolean | OptionalSide1Args + }, ExtArgs["result"]["optionalSide2"]> + export type OptionalSide2SelectScalar = { + id?: boolean + int?: boolean + optionalInt?: boolean + float?: boolean + optionalFloat?: boolean + string?: boolean + optionalString?: boolean + json?: boolean + optionalJson?: boolean + enum?: boolean + optionalEnum?: boolean + boolean?: boolean + optionalBoolean?: boolean + } - export type OptionalSide2Include = { - opti?: boolean | OptionalSide1Args + export type OptionalSide2Include = { + opti?: boolean | OptionalSide1Args } - export type OptionalSide2GetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? OptionalSide2 : - S extends undefined ? never : - S extends { include: any } & (OptionalSide2Args | OptionalSide2FindManyArgs) - ? OptionalSide2 & { - [P in TruthyKeys]: - P extends 'opti' ? OptionalSide1GetPayload | null : never - } - : S extends { select: any } & (OptionalSide2Args | OptionalSide2FindManyArgs) - ? { - [P in TruthyKeys]: - P extends 'opti' ? OptionalSide1GetPayload | null : P extends keyof OptionalSide2 ? OptionalSide2[P] : never - } - : OptionalSide2 + type OptionalSide2GetPayload = $Types.GetResult - type OptionalSide2CountArgs = + type OptionalSide2CountArgs = Omit & { select?: OptionalSide2CountAggregateInputType | true } - export interface OptionalSide2Delegate { - + export interface OptionalSide2Delegate { + [K: symbol]: { types: Prisma.TypeMap['model']['OptionalSide2'], meta: { name: 'OptionalSide2' } } /** * Find zero or one OptionalSide2 that matches the filter. * @param {OptionalSide2FindUniqueArgs} args - Arguments to find a OptionalSide2 @@ -9298,9 +10420,9 @@ export namespace Prisma { * } * }) **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__OptionalSide2Client> : Prisma__OptionalSide2Client | null, null> + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__OptionalSide2Client<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__OptionalSide2Client<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** * Find one OptionalSide2 that matches the filter or throw an error with \`error.code='P2025'\` @@ -9314,9 +10436,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__OptionalSide2Client> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__OptionalSide2Client<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** * Find the first OptionalSide2 that matches the filter. @@ -9331,9 +10453,9 @@ export namespace Prisma { * } * }) **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__OptionalSide2Client> : Prisma__OptionalSide2Client | null, null> + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__OptionalSide2Client<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__OptionalSide2Client<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> /** * Find the first OptionalSide2 that matches the filter or @@ -9349,9 +10471,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__OptionalSide2Client> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__OptionalSide2Client<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** * Find zero or more OptionalSide2s that matches the filter. @@ -9369,9 +10491,9 @@ export namespace Prisma { * const optionalSide2WithIdOnly = await prisma.optionalSide2.findMany({ select: { id: true } }) * **/ - findMany( - args?: SelectSubset - ): Prisma.PrismaPromise>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** * Create a OptionalSide2. @@ -9385,9 +10507,9 @@ export namespace Prisma { * }) * **/ - create( - args: SelectSubset - ): Prisma__OptionalSide2Client> + create>( + args: SelectSubset> + ): Prisma__OptionalSide2Client<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** * Create many OptionalSide2s. @@ -9401,8 +10523,8 @@ export namespace Prisma { * }) * **/ - createMany( - args?: SelectSubset + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -9417,9 +10539,9 @@ export namespace Prisma { * }) * **/ - delete( - args: SelectSubset - ): Prisma__OptionalSide2Client> + delete>( + args: SelectSubset> + ): Prisma__OptionalSide2Client<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** * Update one OptionalSide2. @@ -9436,9 +10558,9 @@ export namespace Prisma { * }) * **/ - update( - args: SelectSubset - ): Prisma__OptionalSide2Client> + update>( + args: SelectSubset> + ): Prisma__OptionalSide2Client<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** * Delete zero or more OptionalSide2s. @@ -9452,8 +10574,8 @@ export namespace Prisma { * }) * **/ - deleteMany( - args?: SelectSubset + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -9473,8 +10595,8 @@ export namespace Prisma { * }) * **/ - updateMany( - args: SelectSubset + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** @@ -9494,9 +10616,9 @@ export namespace Prisma { * } * }) **/ - upsert( - args: SelectSubset - ): Prisma__OptionalSide2Client> + upsert>( + args: SelectSubset> + ): Prisma__OptionalSide2Client<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** * Count the number of OptionalSide2s. @@ -9514,7 +10636,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends _Record<'select', any> + T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -9632,7 +10754,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__OptionalSide2Client implements Prisma.PrismaPromise { + export class Prisma__OptionalSide2Client implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -9647,7 +10769,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - opti(args?: Subset): Prisma__OptionalSide1Client | Null>; + opti = {}>(args?: Subset>): Prisma__OptionalSide1Client<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; private get _document(); /** @@ -9679,15 +10801,15 @@ export namespace Prisma { /** * OptionalSide2 base type for findUnique actions */ - export type OptionalSide2FindUniqueArgsBase = { + export type OptionalSide2FindUniqueArgsBase = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * Filter, which OptionalSide2 to fetch. */ @@ -9697,7 +10819,7 @@ export namespace Prisma { /** * OptionalSide2 findUnique */ - export interface OptionalSide2FindUniqueArgs extends OptionalSide2FindUniqueArgsBase { + export interface OptionalSide2FindUniqueArgs extends OptionalSide2FindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -9709,15 +10831,15 @@ export namespace Prisma { /** * OptionalSide2 findUniqueOrThrow */ - export type OptionalSide2FindUniqueOrThrowArgs = { + export type OptionalSide2FindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * Filter, which OptionalSide2 to fetch. */ @@ -9728,15 +10850,15 @@ export namespace Prisma { /** * OptionalSide2 base type for findFirst actions */ - export type OptionalSide2FindFirstArgsBase = { + export type OptionalSide2FindFirstArgsBase = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * Filter, which OptionalSide2 to fetch. */ @@ -9776,7 +10898,7 @@ export namespace Prisma { /** * OptionalSide2 findFirst */ - export interface OptionalSide2FindFirstArgs extends OptionalSide2FindFirstArgsBase { + export interface OptionalSide2FindFirstArgs extends OptionalSide2FindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -9788,15 +10910,15 @@ export namespace Prisma { /** * OptionalSide2 findFirstOrThrow */ - export type OptionalSide2FindFirstOrThrowArgs = { + export type OptionalSide2FindFirstOrThrowArgs = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * Filter, which OptionalSide2 to fetch. */ @@ -9837,15 +10959,15 @@ export namespace Prisma { /** * OptionalSide2 findMany */ - export type OptionalSide2FindManyArgs = { + export type OptionalSide2FindManyArgs = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * Filter, which OptionalSide2s to fetch. */ @@ -9881,15 +11003,15 @@ export namespace Prisma { /** * OptionalSide2 create */ - export type OptionalSide2CreateArgs = { + export type OptionalSide2CreateArgs = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * The data needed to create a OptionalSide2. */ @@ -9900,7 +11022,7 @@ export namespace Prisma { /** * OptionalSide2 createMany */ - export type OptionalSide2CreateManyArgs = { + export type OptionalSide2CreateManyArgs = { /** * The data used to create many OptionalSide2s. */ @@ -9912,15 +11034,15 @@ export namespace Prisma { /** * OptionalSide2 update */ - export type OptionalSide2UpdateArgs = { + export type OptionalSide2UpdateArgs = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * The data needed to update a OptionalSide2. */ @@ -9935,7 +11057,7 @@ export namespace Prisma { /** * OptionalSide2 updateMany */ - export type OptionalSide2UpdateManyArgs = { + export type OptionalSide2UpdateManyArgs = { /** * The data used to update OptionalSide2s. */ @@ -9950,15 +11072,15 @@ export namespace Prisma { /** * OptionalSide2 upsert */ - export type OptionalSide2UpsertArgs = { + export type OptionalSide2UpsertArgs = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * The filter to search for the OptionalSide2 to update in case it exists. */ @@ -9977,15 +11099,15 @@ export namespace Prisma { /** * OptionalSide2 delete */ - export type OptionalSide2DeleteArgs = { + export type OptionalSide2DeleteArgs = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null /** * Filter which OptionalSide2 to delete. */ @@ -9996,7 +11118,7 @@ export namespace Prisma { /** * OptionalSide2 deleteMany */ - export type OptionalSide2DeleteManyArgs = { + export type OptionalSide2DeleteManyArgs = { /** * Filter which OptionalSide2s to delete */ @@ -10007,15 +11129,15 @@ export namespace Prisma { /** * OptionalSide2 without action */ - export type OptionalSide2Args = { + export type OptionalSide2Args = { /** * Select specific fields to fetch from the OptionalSide2 */ - select?: OptionalSide2Select | null + select?: OptionalSide2Select | null /** * Choose, which related nodes to fetch as well. */ - include?: OptionalSide2Include | null + include?: OptionalSide2Include | null } @@ -10144,7 +11266,7 @@ export namespace Prisma { _all?: true } - export type AAggregateArgs = { + export type AAggregateArgs = { /** * Filter which A to aggregate. */ @@ -10216,7 +11338,7 @@ export namespace Prisma { - export type AGroupByArgs = { + export type AGroupByArgs = { where?: AWhereInput orderBy?: Enumerable by: AScalarFieldEnum[] @@ -10262,7 +11384,7 @@ export namespace Prisma { > - export type ASelect = { + export type ASelect = $Extensions.GetSelect<{ id?: boolean email?: boolean name?: boolean @@ -10272,30 +11394,30 @@ export namespace Prisma { inc_int?: boolean inc_sInt?: boolean inc_bInt?: boolean - } + }, ExtArgs["result"]["a"]> + export type ASelectScalar = { + id?: boolean + email?: boolean + name?: boolean + int?: boolean + sInt?: boolean + bInt?: boolean + inc_int?: boolean + inc_sInt?: boolean + inc_bInt?: boolean + } - export type AGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? A : - S extends undefined ? never : - S extends { include: any } & (AArgs | AFindManyArgs) - ? A - : S extends { select: any } & (AArgs | AFindManyArgs) - ? { - [P in TruthyKeys]: - P extends keyof A ? A[P] : never - } - : A + type AGetPayload = $Types.GetResult - type ACountArgs = + type ACountArgs = Omit & { select?: ACountAggregateInputType | true } - export interface ADelegate { - + export interface ADelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['A'], meta: { name: 'A' } } /** * Find zero or one A that matches the filter. * @param {AFindUniqueArgs} args - Arguments to find a A @@ -10307,9 +11429,9 @@ export namespace Prisma { * } * }) **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__AClient> : Prisma__AClient | null, null> + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__AClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__AClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** * Find one A that matches the filter or throw an error with \`error.code='P2025'\` @@ -10323,9 +11445,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__AClient> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__AClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** * Find the first A that matches the filter. @@ -10340,9 +11462,9 @@ export namespace Prisma { * } * }) **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__AClient> : Prisma__AClient | null, null> + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__AClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__AClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> /** * Find the first A that matches the filter or @@ -10358,9 +11480,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__AClient> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__AClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** * Find zero or more As that matches the filter. @@ -10378,9 +11500,9 @@ export namespace Prisma { * const aWithIdOnly = await prisma.a.findMany({ select: { id: true } }) * **/ - findMany( - args?: SelectSubset - ): Prisma.PrismaPromise>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** * Create a A. @@ -10394,9 +11516,9 @@ export namespace Prisma { * }) * **/ - create( - args: SelectSubset - ): Prisma__AClient> + create>( + args: SelectSubset> + ): Prisma__AClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** * Create many As. @@ -10410,8 +11532,8 @@ export namespace Prisma { * }) * **/ - createMany( - args?: SelectSubset + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -10426,9 +11548,9 @@ export namespace Prisma { * }) * **/ - delete( - args: SelectSubset - ): Prisma__AClient> + delete>( + args: SelectSubset> + ): Prisma__AClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** * Update one A. @@ -10445,9 +11567,9 @@ export namespace Prisma { * }) * **/ - update( - args: SelectSubset - ): Prisma__AClient> + update>( + args: SelectSubset> + ): Prisma__AClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** * Delete zero or more As. @@ -10461,8 +11583,8 @@ export namespace Prisma { * }) * **/ - deleteMany( - args?: SelectSubset + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -10482,8 +11604,8 @@ export namespace Prisma { * }) * **/ - updateMany( - args: SelectSubset + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** @@ -10503,9 +11625,9 @@ export namespace Prisma { * } * }) **/ - upsert( - args: SelectSubset - ): Prisma__AClient> + upsert>( + args: SelectSubset> + ): Prisma__AClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** * Count the number of As. @@ -10523,7 +11645,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends _Record<'select', any> + T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -10641,7 +11763,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__AClient implements Prisma.PrismaPromise { + export class Prisma__AClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -10687,11 +11809,11 @@ export namespace Prisma { /** * A base type for findUnique actions */ - export type AFindUniqueArgsBase = { + export type AFindUniqueArgsBase = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * Filter, which A to fetch. */ @@ -10701,7 +11823,7 @@ export namespace Prisma { /** * A findUnique */ - export interface AFindUniqueArgs extends AFindUniqueArgsBase { + export interface AFindUniqueArgs extends AFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -10713,11 +11835,11 @@ export namespace Prisma { /** * A findUniqueOrThrow */ - export type AFindUniqueOrThrowArgs = { + export type AFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * Filter, which A to fetch. */ @@ -10728,11 +11850,11 @@ export namespace Prisma { /** * A base type for findFirst actions */ - export type AFindFirstArgsBase = { + export type AFindFirstArgsBase = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * Filter, which A to fetch. */ @@ -10772,7 +11894,7 @@ export namespace Prisma { /** * A findFirst */ - export interface AFindFirstArgs extends AFindFirstArgsBase { + export interface AFindFirstArgs extends AFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -10784,11 +11906,11 @@ export namespace Prisma { /** * A findFirstOrThrow */ - export type AFindFirstOrThrowArgs = { + export type AFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * Filter, which A to fetch. */ @@ -10829,11 +11951,11 @@ export namespace Prisma { /** * A findMany */ - export type AFindManyArgs = { + export type AFindManyArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * Filter, which AS to fetch. */ @@ -10869,11 +11991,11 @@ export namespace Prisma { /** * A create */ - export type ACreateArgs = { + export type ACreateArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * The data needed to create a A. */ @@ -10884,7 +12006,7 @@ export namespace Prisma { /** * A createMany */ - export type ACreateManyArgs = { + export type ACreateManyArgs = { /** * The data used to create many AS. */ @@ -10896,11 +12018,11 @@ export namespace Prisma { /** * A update */ - export type AUpdateArgs = { + export type AUpdateArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * The data needed to update a A. */ @@ -10915,7 +12037,7 @@ export namespace Prisma { /** * A updateMany */ - export type AUpdateManyArgs = { + export type AUpdateManyArgs = { /** * The data used to update AS. */ @@ -10930,11 +12052,11 @@ export namespace Prisma { /** * A upsert */ - export type AUpsertArgs = { + export type AUpsertArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * The filter to search for the A to update in case it exists. */ @@ -10953,11 +12075,11 @@ export namespace Prisma { /** * A delete */ - export type ADeleteArgs = { + export type ADeleteArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null /** * Filter which A to delete. */ @@ -10968,7 +12090,7 @@ export namespace Prisma { /** * A deleteMany */ - export type ADeleteManyArgs = { + export type ADeleteManyArgs = { /** * Filter which AS to delete */ @@ -10979,11 +12101,11 @@ export namespace Prisma { /** * A without action */ - export type AArgs = { + export type AArgs = { /** * Select specific fields to fetch from the A */ - select?: ASelect | null + select?: ASelect | null } @@ -11080,7 +12202,7 @@ export namespace Prisma { _all?: true } - export type BAggregateArgs = { + export type BAggregateArgs = { /** * Filter which B to aggregate. */ @@ -11152,7 +12274,7 @@ export namespace Prisma { - export type BGroupByArgs = { + export type BGroupByArgs = { where?: BWhereInput orderBy?: Enumerable by: BScalarFieldEnum[] @@ -11194,36 +12316,32 @@ export namespace Prisma { > - export type BSelect = { + export type BSelect = $Extensions.GetSelect<{ id?: boolean float?: boolean dFloat?: boolean decFloat?: boolean numFloat?: boolean - } + }, ExtArgs["result"]["b"]> + export type BSelectScalar = { + id?: boolean + float?: boolean + dFloat?: boolean + decFloat?: boolean + numFloat?: boolean + } - export type BGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? B : - S extends undefined ? never : - S extends { include: any } & (BArgs | BFindManyArgs) - ? B - : S extends { select: any } & (BArgs | BFindManyArgs) - ? { - [P in TruthyKeys]: - P extends keyof B ? B[P] : never - } - : B + type BGetPayload = $Types.GetResult - type BCountArgs = + type BCountArgs = Omit & { select?: BCountAggregateInputType | true } - export interface BDelegate { - + export interface BDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['B'], meta: { name: 'B' } } /** * Find zero or one B that matches the filter. * @param {BFindUniqueArgs} args - Arguments to find a B @@ -11235,9 +12353,9 @@ export namespace Prisma { * } * }) **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__BClient> : Prisma__BClient | null, null> + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__BClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__BClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** * Find one B that matches the filter or throw an error with \`error.code='P2025'\` @@ -11251,9 +12369,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__BClient> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__BClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** * Find the first B that matches the filter. @@ -11268,9 +12386,9 @@ export namespace Prisma { * } * }) **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__BClient> : Prisma__BClient | null, null> + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__BClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__BClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> /** * Find the first B that matches the filter or @@ -11286,9 +12404,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__BClient> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__BClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** * Find zero or more Bs that matches the filter. @@ -11306,9 +12424,9 @@ export namespace Prisma { * const bWithIdOnly = await prisma.b.findMany({ select: { id: true } }) * **/ - findMany( - args?: SelectSubset - ): Prisma.PrismaPromise>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** * Create a B. @@ -11322,9 +12440,9 @@ export namespace Prisma { * }) * **/ - create( - args: SelectSubset - ): Prisma__BClient> + create>( + args: SelectSubset> + ): Prisma__BClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** * Create many Bs. @@ -11338,8 +12456,8 @@ export namespace Prisma { * }) * **/ - createMany( - args?: SelectSubset + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -11354,9 +12472,9 @@ export namespace Prisma { * }) * **/ - delete( - args: SelectSubset - ): Prisma__BClient> + delete>( + args: SelectSubset> + ): Prisma__BClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** * Update one B. @@ -11373,9 +12491,9 @@ export namespace Prisma { * }) * **/ - update( - args: SelectSubset - ): Prisma__BClient> + update>( + args: SelectSubset> + ): Prisma__BClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** * Delete zero or more Bs. @@ -11389,8 +12507,8 @@ export namespace Prisma { * }) * **/ - deleteMany( - args?: SelectSubset + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -11410,8 +12528,8 @@ export namespace Prisma { * }) * **/ - updateMany( - args: SelectSubset + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** @@ -11431,9 +12549,9 @@ export namespace Prisma { * } * }) **/ - upsert( - args: SelectSubset - ): Prisma__BClient> + upsert>( + args: SelectSubset> + ): Prisma__BClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** * Count the number of Bs. @@ -11451,7 +12569,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends _Record<'select', any> + T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -11569,7 +12687,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__BClient implements Prisma.PrismaPromise { + export class Prisma__BClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -11615,11 +12733,11 @@ export namespace Prisma { /** * B base type for findUnique actions */ - export type BFindUniqueArgsBase = { + export type BFindUniqueArgsBase = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * Filter, which B to fetch. */ @@ -11629,7 +12747,7 @@ export namespace Prisma { /** * B findUnique */ - export interface BFindUniqueArgs extends BFindUniqueArgsBase { + export interface BFindUniqueArgs extends BFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -11641,11 +12759,11 @@ export namespace Prisma { /** * B findUniqueOrThrow */ - export type BFindUniqueOrThrowArgs = { + export type BFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * Filter, which B to fetch. */ @@ -11656,11 +12774,11 @@ export namespace Prisma { /** * B base type for findFirst actions */ - export type BFindFirstArgsBase = { + export type BFindFirstArgsBase = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * Filter, which B to fetch. */ @@ -11700,7 +12818,7 @@ export namespace Prisma { /** * B findFirst */ - export interface BFindFirstArgs extends BFindFirstArgsBase { + export interface BFindFirstArgs extends BFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -11712,11 +12830,11 @@ export namespace Prisma { /** * B findFirstOrThrow */ - export type BFindFirstOrThrowArgs = { + export type BFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * Filter, which B to fetch. */ @@ -11757,11 +12875,11 @@ export namespace Prisma { /** * B findMany */ - export type BFindManyArgs = { + export type BFindManyArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * Filter, which BS to fetch. */ @@ -11797,11 +12915,11 @@ export namespace Prisma { /** * B create */ - export type BCreateArgs = { + export type BCreateArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * The data needed to create a B. */ @@ -11812,7 +12930,7 @@ export namespace Prisma { /** * B createMany */ - export type BCreateManyArgs = { + export type BCreateManyArgs = { /** * The data used to create many BS. */ @@ -11824,11 +12942,11 @@ export namespace Prisma { /** * B update */ - export type BUpdateArgs = { + export type BUpdateArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * The data needed to update a B. */ @@ -11843,7 +12961,7 @@ export namespace Prisma { /** * B updateMany */ - export type BUpdateManyArgs = { + export type BUpdateManyArgs = { /** * The data used to update BS. */ @@ -11858,11 +12976,11 @@ export namespace Prisma { /** * B upsert */ - export type BUpsertArgs = { + export type BUpsertArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * The filter to search for the B to update in case it exists. */ @@ -11881,11 +12999,11 @@ export namespace Prisma { /** * B delete */ - export type BDeleteArgs = { + export type BDeleteArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null /** * Filter which B to delete. */ @@ -11896,7 +13014,7 @@ export namespace Prisma { /** * B deleteMany */ - export type BDeleteManyArgs = { + export type BDeleteManyArgs = { /** * Filter which BS to delete */ @@ -11907,11 +13025,11 @@ export namespace Prisma { /** * B without action */ - export type BArgs = { + export type BArgs = { /** * Select specific fields to fetch from the B */ - select?: BSelect | null + select?: BSelect | null } @@ -11990,7 +13108,7 @@ export namespace Prisma { _all?: true } - export type CAggregateArgs = { + export type CAggregateArgs = { /** * Filter which C to aggregate. */ @@ -12050,7 +13168,7 @@ export namespace Prisma { - export type CGroupByArgs = { + export type CGroupByArgs = { where?: CWhereInput orderBy?: Enumerable by: CScalarFieldEnum[] @@ -12090,7 +13208,7 @@ export namespace Prisma { > - export type CSelect = { + export type CSelect = $Extensions.GetSelect<{ id?: boolean char?: boolean vChar?: boolean @@ -12098,30 +13216,28 @@ export namespace Prisma { bit?: boolean vBit?: boolean uuid?: boolean - } + }, ExtArgs["result"]["c"]> + export type CSelectScalar = { + id?: boolean + char?: boolean + vChar?: boolean + text?: boolean + bit?: boolean + vBit?: boolean + uuid?: boolean + } - export type CGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? C : - S extends undefined ? never : - S extends { include: any } & (CArgs | CFindManyArgs) - ? C - : S extends { select: any } & (CArgs | CFindManyArgs) - ? { - [P in TruthyKeys]: - P extends keyof C ? C[P] : never - } - : C + type CGetPayload = $Types.GetResult - type CCountArgs = + type CCountArgs = Omit & { select?: CCountAggregateInputType | true } - export interface CDelegate { - + export interface CDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['C'], meta: { name: 'C' } } /** * Find zero or one C that matches the filter. * @param {CFindUniqueArgs} args - Arguments to find a C @@ -12133,9 +13249,9 @@ export namespace Prisma { * } * }) **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__CClient> : Prisma__CClient | null, null> + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__CClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__CClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** * Find one C that matches the filter or throw an error with \`error.code='P2025'\` @@ -12149,9 +13265,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__CClient> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__CClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** * Find the first C that matches the filter. @@ -12166,9 +13282,9 @@ export namespace Prisma { * } * }) **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__CClient> : Prisma__CClient | null, null> + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__CClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__CClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> /** * Find the first C that matches the filter or @@ -12184,9 +13300,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__CClient> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__CClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** * Find zero or more Cs that matches the filter. @@ -12204,9 +13320,9 @@ export namespace Prisma { * const cWithIdOnly = await prisma.c.findMany({ select: { id: true } }) * **/ - findMany( - args?: SelectSubset - ): Prisma.PrismaPromise>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** * Create a C. @@ -12220,9 +13336,9 @@ export namespace Prisma { * }) * **/ - create( - args: SelectSubset - ): Prisma__CClient> + create>( + args: SelectSubset> + ): Prisma__CClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** * Create many Cs. @@ -12236,8 +13352,8 @@ export namespace Prisma { * }) * **/ - createMany( - args?: SelectSubset + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -12252,9 +13368,9 @@ export namespace Prisma { * }) * **/ - delete( - args: SelectSubset - ): Prisma__CClient> + delete>( + args: SelectSubset> + ): Prisma__CClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** * Update one C. @@ -12271,9 +13387,9 @@ export namespace Prisma { * }) * **/ - update( - args: SelectSubset - ): Prisma__CClient> + update>( + args: SelectSubset> + ): Prisma__CClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** * Delete zero or more Cs. @@ -12287,8 +13403,8 @@ export namespace Prisma { * }) * **/ - deleteMany( - args?: SelectSubset + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -12308,8 +13424,8 @@ export namespace Prisma { * }) * **/ - updateMany( - args: SelectSubset + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** @@ -12329,9 +13445,9 @@ export namespace Prisma { * } * }) **/ - upsert( - args: SelectSubset - ): Prisma__CClient> + upsert>( + args: SelectSubset> + ): Prisma__CClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** * Count the number of Cs. @@ -12349,7 +13465,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends _Record<'select', any> + T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -12467,7 +13583,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__CClient implements Prisma.PrismaPromise { + export class Prisma__CClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -12513,11 +13629,11 @@ export namespace Prisma { /** * C base type for findUnique actions */ - export type CFindUniqueArgsBase = { + export type CFindUniqueArgsBase = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * Filter, which C to fetch. */ @@ -12527,7 +13643,7 @@ export namespace Prisma { /** * C findUnique */ - export interface CFindUniqueArgs extends CFindUniqueArgsBase { + export interface CFindUniqueArgs extends CFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -12539,11 +13655,11 @@ export namespace Prisma { /** * C findUniqueOrThrow */ - export type CFindUniqueOrThrowArgs = { + export type CFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * Filter, which C to fetch. */ @@ -12554,11 +13670,11 @@ export namespace Prisma { /** * C base type for findFirst actions */ - export type CFindFirstArgsBase = { + export type CFindFirstArgsBase = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * Filter, which C to fetch. */ @@ -12598,7 +13714,7 @@ export namespace Prisma { /** * C findFirst */ - export interface CFindFirstArgs extends CFindFirstArgsBase { + export interface CFindFirstArgs extends CFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -12610,11 +13726,11 @@ export namespace Prisma { /** * C findFirstOrThrow */ - export type CFindFirstOrThrowArgs = { + export type CFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * Filter, which C to fetch. */ @@ -12655,11 +13771,11 @@ export namespace Prisma { /** * C findMany */ - export type CFindManyArgs = { + export type CFindManyArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * Filter, which CS to fetch. */ @@ -12695,11 +13811,11 @@ export namespace Prisma { /** * C create */ - export type CCreateArgs = { + export type CCreateArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * The data needed to create a C. */ @@ -12710,7 +13826,7 @@ export namespace Prisma { /** * C createMany */ - export type CCreateManyArgs = { + export type CCreateManyArgs = { /** * The data used to create many CS. */ @@ -12722,11 +13838,11 @@ export namespace Prisma { /** * C update */ - export type CUpdateArgs = { + export type CUpdateArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * The data needed to update a C. */ @@ -12741,7 +13857,7 @@ export namespace Prisma { /** * C updateMany */ - export type CUpdateManyArgs = { + export type CUpdateManyArgs = { /** * The data used to update CS. */ @@ -12756,11 +13872,11 @@ export namespace Prisma { /** * C upsert */ - export type CUpsertArgs = { + export type CUpsertArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * The filter to search for the C to update in case it exists. */ @@ -12779,11 +13895,11 @@ export namespace Prisma { /** * C delete */ - export type CDeleteArgs = { + export type CDeleteArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null /** * Filter which C to delete. */ @@ -12794,7 +13910,7 @@ export namespace Prisma { /** * C deleteMany */ - export type CDeleteManyArgs = { + export type CDeleteManyArgs = { /** * Filter which CS to delete */ @@ -12805,11 +13921,11 @@ export namespace Prisma { /** * C without action */ - export type CArgs = { + export type CArgs = { /** * Select specific fields to fetch from the C */ - select?: CSelect | null + select?: CSelect | null } @@ -12894,7 +14010,7 @@ export namespace Prisma { _all?: true } - export type DAggregateArgs = { + export type DAggregateArgs = { /** * Filter which D to aggregate. */ @@ -12966,7 +14082,7 @@ export namespace Prisma { - export type DGroupByArgs = { + export type DGroupByArgs = { where?: DWhereInput orderBy?: Enumerable by: DScalarFieldEnum[] @@ -13010,7 +14126,7 @@ export namespace Prisma { > - export type DSelect = { + export type DSelect = $Extensions.GetSelect<{ id?: boolean bool?: boolean byteA?: boolean @@ -13018,30 +14134,28 @@ export namespace Prisma { json?: boolean jsonb?: boolean list?: boolean - } + }, ExtArgs["result"]["d"]> + export type DSelectScalar = { + id?: boolean + bool?: boolean + byteA?: boolean + xml?: boolean + json?: boolean + jsonb?: boolean + list?: boolean + } - export type DGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? D : - S extends undefined ? never : - S extends { include: any } & (DArgs | DFindManyArgs) - ? D - : S extends { select: any } & (DArgs | DFindManyArgs) - ? { - [P in TruthyKeys]: - P extends keyof D ? D[P] : never - } - : D + type DGetPayload = $Types.GetResult - type DCountArgs = + type DCountArgs = Omit & { select?: DCountAggregateInputType | true } - export interface DDelegate { - + export interface DDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['D'], meta: { name: 'D' } } /** * Find zero or one D that matches the filter. * @param {DFindUniqueArgs} args - Arguments to find a D @@ -13053,9 +14167,9 @@ export namespace Prisma { * } * }) **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__DClient> : Prisma__DClient | null, null> + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__DClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__DClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** * Find one D that matches the filter or throw an error with \`error.code='P2025'\` @@ -13069,9 +14183,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__DClient> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__DClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** * Find the first D that matches the filter. @@ -13086,9 +14200,9 @@ export namespace Prisma { * } * }) **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__DClient> : Prisma__DClient | null, null> + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__DClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__DClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> /** * Find the first D that matches the filter or @@ -13104,9 +14218,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__DClient> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__DClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** * Find zero or more Ds that matches the filter. @@ -13124,9 +14238,9 @@ export namespace Prisma { * const dWithIdOnly = await prisma.d.findMany({ select: { id: true } }) * **/ - findMany( - args?: SelectSubset - ): Prisma.PrismaPromise>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** * Create a D. @@ -13140,9 +14254,9 @@ export namespace Prisma { * }) * **/ - create( - args: SelectSubset - ): Prisma__DClient> + create>( + args: SelectSubset> + ): Prisma__DClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** * Create many Ds. @@ -13156,8 +14270,8 @@ export namespace Prisma { * }) * **/ - createMany( - args?: SelectSubset + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -13172,9 +14286,9 @@ export namespace Prisma { * }) * **/ - delete( - args: SelectSubset - ): Prisma__DClient> + delete>( + args: SelectSubset> + ): Prisma__DClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** * Update one D. @@ -13191,9 +14305,9 @@ export namespace Prisma { * }) * **/ - update( - args: SelectSubset - ): Prisma__DClient> + update>( + args: SelectSubset> + ): Prisma__DClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** * Delete zero or more Ds. @@ -13207,8 +14321,8 @@ export namespace Prisma { * }) * **/ - deleteMany( - args?: SelectSubset + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -13228,8 +14342,8 @@ export namespace Prisma { * }) * **/ - updateMany( - args: SelectSubset + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** @@ -13249,9 +14363,9 @@ export namespace Prisma { * } * }) **/ - upsert( - args: SelectSubset - ): Prisma__DClient> + upsert>( + args: SelectSubset> + ): Prisma__DClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** * Count the number of Ds. @@ -13269,7 +14383,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends _Record<'select', any> + T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -13387,7 +14501,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__DClient implements Prisma.PrismaPromise { + export class Prisma__DClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -13433,11 +14547,11 @@ export namespace Prisma { /** * D base type for findUnique actions */ - export type DFindUniqueArgsBase = { + export type DFindUniqueArgsBase = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * Filter, which D to fetch. */ @@ -13447,7 +14561,7 @@ export namespace Prisma { /** * D findUnique */ - export interface DFindUniqueArgs extends DFindUniqueArgsBase { + export interface DFindUniqueArgs extends DFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -13459,11 +14573,11 @@ export namespace Prisma { /** * D findUniqueOrThrow */ - export type DFindUniqueOrThrowArgs = { + export type DFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * Filter, which D to fetch. */ @@ -13474,11 +14588,11 @@ export namespace Prisma { /** * D base type for findFirst actions */ - export type DFindFirstArgsBase = { + export type DFindFirstArgsBase = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * Filter, which D to fetch. */ @@ -13518,7 +14632,7 @@ export namespace Prisma { /** * D findFirst */ - export interface DFindFirstArgs extends DFindFirstArgsBase { + export interface DFindFirstArgs extends DFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -13530,11 +14644,11 @@ export namespace Prisma { /** * D findFirstOrThrow */ - export type DFindFirstOrThrowArgs = { + export type DFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * Filter, which D to fetch. */ @@ -13575,11 +14689,11 @@ export namespace Prisma { /** * D findMany */ - export type DFindManyArgs = { + export type DFindManyArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * Filter, which DS to fetch. */ @@ -13615,11 +14729,11 @@ export namespace Prisma { /** * D create */ - export type DCreateArgs = { + export type DCreateArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * The data needed to create a D. */ @@ -13630,7 +14744,7 @@ export namespace Prisma { /** * D createMany */ - export type DCreateManyArgs = { + export type DCreateManyArgs = { /** * The data used to create many DS. */ @@ -13642,11 +14756,11 @@ export namespace Prisma { /** * D update */ - export type DUpdateArgs = { + export type DUpdateArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * The data needed to update a D. */ @@ -13661,7 +14775,7 @@ export namespace Prisma { /** * D updateMany */ - export type DUpdateManyArgs = { + export type DUpdateManyArgs = { /** * The data used to update DS. */ @@ -13676,11 +14790,11 @@ export namespace Prisma { /** * D upsert */ - export type DUpsertArgs = { + export type DUpsertArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * The filter to search for the D to update in case it exists. */ @@ -13699,11 +14813,11 @@ export namespace Prisma { /** * D delete */ - export type DDeleteArgs = { + export type DDeleteArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null /** * Filter which D to delete. */ @@ -13714,7 +14828,7 @@ export namespace Prisma { /** * D deleteMany */ - export type DDeleteManyArgs = { + export type DDeleteManyArgs = { /** * Filter which DS to delete */ @@ -13725,11 +14839,11 @@ export namespace Prisma { /** * D without action */ - export type DArgs = { + export type DArgs = { /** * Select specific fields to fetch from the D */ - select?: DSelect | null + select?: DSelect | null } @@ -13790,7 +14904,7 @@ export namespace Prisma { _all?: true } - export type EAggregateArgs = { + export type EAggregateArgs = { /** * Filter which E to aggregate. */ @@ -13850,7 +14964,7 @@ export namespace Prisma { - export type EGroupByArgs = { + export type EGroupByArgs = { where?: EWhereInput orderBy?: Enumerable by: EScalarFieldEnum[] @@ -13887,35 +15001,30 @@ export namespace Prisma { > - export type ESelect = { + export type ESelect = $Extensions.GetSelect<{ id?: boolean date?: boolean time?: boolean ts?: boolean - } + }, ExtArgs["result"]["e"]> + export type ESelectScalar = { + id?: boolean + date?: boolean + time?: boolean + ts?: boolean + } - export type EGetPayload = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? E : - S extends undefined ? never : - S extends { include: any } & (EArgs | EFindManyArgs) - ? E - : S extends { select: any } & (EArgs | EFindManyArgs) - ? { - [P in TruthyKeys]: - P extends keyof E ? E[P] : never - } - : E + type EGetPayload = $Types.GetResult - type ECountArgs = + type ECountArgs = Omit & { select?: ECountAggregateInputType | true } - export interface EDelegate { - + export interface EDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['E'], meta: { name: 'E' } } /** * Find zero or one E that matches the filter. * @param {EFindUniqueArgs} args - Arguments to find a E @@ -13927,9 +15036,9 @@ export namespace Prisma { * } * }) **/ - findUnique( - args: SelectSubset - ): HasReject extends True ? Prisma__EClient> : Prisma__EClient | null, null> + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__EClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__EClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** * Find one E that matches the filter or throw an error with \`error.code='P2025'\` @@ -13943,9 +15052,9 @@ export namespace Prisma { * } * }) **/ - findUniqueOrThrow( - args?: SelectSubset - ): Prisma__EClient> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__EClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** * Find the first E that matches the filter. @@ -13960,9 +15069,9 @@ export namespace Prisma { * } * }) **/ - findFirst( - args?: SelectSubset - ): HasReject extends True ? Prisma__EClient> : Prisma__EClient | null, null> + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__EClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__EClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> /** * Find the first E that matches the filter or @@ -13978,9 +15087,9 @@ export namespace Prisma { * } * }) **/ - findFirstOrThrow( - args?: SelectSubset - ): Prisma__EClient> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__EClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** * Find zero or more Es that matches the filter. @@ -13998,9 +15107,9 @@ export namespace Prisma { * const eWithIdOnly = await prisma.e.findMany({ select: { id: true } }) * **/ - findMany( - args?: SelectSubset - ): Prisma.PrismaPromise>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** * Create a E. @@ -14014,9 +15123,9 @@ export namespace Prisma { * }) * **/ - create( - args: SelectSubset - ): Prisma__EClient> + create>( + args: SelectSubset> + ): Prisma__EClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** * Create many Es. @@ -14030,8 +15139,8 @@ export namespace Prisma { * }) * **/ - createMany( - args?: SelectSubset + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -14046,9 +15155,9 @@ export namespace Prisma { * }) * **/ - delete( - args: SelectSubset - ): Prisma__EClient> + delete>( + args: SelectSubset> + ): Prisma__EClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** * Update one E. @@ -14065,9 +15174,9 @@ export namespace Prisma { * }) * **/ - update( - args: SelectSubset - ): Prisma__EClient> + update>( + args: SelectSubset> + ): Prisma__EClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** * Delete zero or more Es. @@ -14081,8 +15190,8 @@ export namespace Prisma { * }) * **/ - deleteMany( - args?: SelectSubset + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** @@ -14102,8 +15211,8 @@ export namespace Prisma { * }) * **/ - updateMany( - args: SelectSubset + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** @@ -14123,9 +15232,9 @@ export namespace Prisma { * } * }) **/ - upsert( - args: SelectSubset - ): Prisma__EClient> + upsert>( + args: SelectSubset> + ): Prisma__EClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** * Count the number of Es. @@ -14143,7 +15252,7 @@ export namespace Prisma { count( args?: Subset, ): Prisma.PrismaPromise< - T extends _Record<'select', any> + T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -14261,7 +15370,7 @@ export namespace Prisma { * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__EClient implements Prisma.PrismaPromise { + export class Prisma__EClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -14307,11 +15416,11 @@ export namespace Prisma { /** * E base type for findUnique actions */ - export type EFindUniqueArgsBase = { + export type EFindUniqueArgsBase = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * Filter, which E to fetch. */ @@ -14321,7 +15430,7 @@ export namespace Prisma { /** * E findUnique */ - export interface EFindUniqueArgs extends EFindUniqueArgsBase { + export interface EFindUniqueArgs extends EFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findUniqueOrThrow\` method instead @@ -14333,11 +15442,11 @@ export namespace Prisma { /** * E findUniqueOrThrow */ - export type EFindUniqueOrThrowArgs = { + export type EFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * Filter, which E to fetch. */ @@ -14348,11 +15457,11 @@ export namespace Prisma { /** * E base type for findFirst actions */ - export type EFindFirstArgsBase = { + export type EFindFirstArgsBase = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * Filter, which E to fetch. */ @@ -14392,7 +15501,7 @@ export namespace Prisma { /** * E findFirst */ - export interface EFindFirstArgs extends EFindFirstArgsBase { + export interface EFindFirstArgs extends EFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`findFirstOrThrow\` method instead @@ -14404,11 +15513,11 @@ export namespace Prisma { /** * E findFirstOrThrow */ - export type EFindFirstOrThrowArgs = { + export type EFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * Filter, which E to fetch. */ @@ -14449,11 +15558,11 @@ export namespace Prisma { /** * E findMany */ - export type EFindManyArgs = { + export type EFindManyArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * Filter, which ES to fetch. */ @@ -14489,11 +15598,11 @@ export namespace Prisma { /** * E create */ - export type ECreateArgs = { + export type ECreateArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * The data needed to create a E. */ @@ -14504,7 +15613,7 @@ export namespace Prisma { /** * E createMany */ - export type ECreateManyArgs = { + export type ECreateManyArgs = { /** * The data used to create many ES. */ @@ -14516,11 +15625,11 @@ export namespace Prisma { /** * E update */ - export type EUpdateArgs = { + export type EUpdateArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * The data needed to update a E. */ @@ -14535,7 +15644,7 @@ export namespace Prisma { /** * E updateMany */ - export type EUpdateManyArgs = { + export type EUpdateManyArgs = { /** * The data used to update ES. */ @@ -14550,11 +15659,11 @@ export namespace Prisma { /** * E upsert */ - export type EUpsertArgs = { + export type EUpsertArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * The filter to search for the E to update in case it exists. */ @@ -14573,11 +15682,11 @@ export namespace Prisma { /** * E delete */ - export type EDeleteArgs = { + export type EDeleteArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null /** * Filter which E to delete. */ @@ -14588,7 +15697,7 @@ export namespace Prisma { /** * E deleteMany */ - export type EDeleteManyArgs = { + export type EDeleteManyArgs = { /** * Filter which ES to delete */ @@ -14599,11 +15708,11 @@ export namespace Prisma { /** * E without action */ - export type EArgs = { + export type EArgs = { /** * Select specific fields to fetch from the E */ - select?: ESelect | null + select?: ESelect | null } @@ -14612,86 +15721,31 @@ export namespace Prisma { * Enums */ - export const AScalarFieldEnum: { - id: 'id', - email: 'email', - name: 'name', - int: 'int', - sInt: 'sInt', - bInt: 'bInt', - inc_int: 'inc_int', - inc_sInt: 'inc_sInt', - inc_bInt: 'inc_bInt' - }; - - export type AScalarFieldEnum = (typeof AScalarFieldEnum)[keyof typeof AScalarFieldEnum] - - - export const BScalarFieldEnum: { - id: 'id', - float: 'float', - dFloat: 'dFloat', - decFloat: 'decFloat', - numFloat: 'numFloat' - }; - - export type BScalarFieldEnum = (typeof BScalarFieldEnum)[keyof typeof BScalarFieldEnum] - - - export const CScalarFieldEnum: { - id: 'id', - char: 'char', - vChar: 'vChar', - text: 'text', - bit: 'bit', - vBit: 'vBit', - uuid: 'uuid' - }; - - export type CScalarFieldEnum = (typeof CScalarFieldEnum)[keyof typeof CScalarFieldEnum] - - - export const DScalarFieldEnum: { - id: 'id', - bool: 'bool', - byteA: 'byteA', - xml: 'xml', - json: 'json', - jsonb: 'jsonb', - list: 'list' - }; - - export type DScalarFieldEnum = (typeof DScalarFieldEnum)[keyof typeof DScalarFieldEnum] - - - export const EScalarFieldEnum: { - id: 'id', - date: 'date', - time: 'time', - ts: 'ts' - }; - - export type EScalarFieldEnum = (typeof EScalarFieldEnum)[keyof typeof EScalarFieldEnum] - - - export const JsonNullValueFilter: { - DbNull: typeof DbNull, - JsonNull: typeof JsonNull, - AnyNull: typeof AnyNull + export const TransactionIsolationLevel: { + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' }; - export type JsonNullValueFilter = (typeof JsonNullValueFilter)[keyof typeof JsonNullValueFilter] + export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] - export const JsonNullValueInput: { - JsonNull: typeof JsonNull + export const PostScalarFieldEnum: { + id: 'id', + createdAt: 'createdAt', + title: 'title', + content: 'content', + published: 'published', + authorId: 'authorId' }; - export type JsonNullValueInput = (typeof JsonNullValueInput)[keyof typeof JsonNullValueInput] + export type PostScalarFieldEnum = (typeof PostScalarFieldEnum)[keyof typeof PostScalarFieldEnum] - export const MScalarFieldEnum: { + export const UserScalarFieldEnum: { id: 'id', + email: 'email', int: 'int', optionalInt: 'optionalInt', float: 'float', @@ -14706,12 +15760,11 @@ export namespace Prisma { optionalBoolean: 'optionalBoolean' }; - export type MScalarFieldEnum = (typeof MScalarFieldEnum)[keyof typeof MScalarFieldEnum] + export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum] - export const ManyRequiredScalarFieldEnum: { + export const MScalarFieldEnum: { id: 'id', - oneOptionalId: 'oneOptionalId', int: 'int', optionalInt: 'optionalInt', float: 'float', @@ -14726,7 +15779,7 @@ export namespace Prisma { optionalBoolean: 'optionalBoolean' }; - export type ManyRequiredScalarFieldEnum = (typeof ManyRequiredScalarFieldEnum)[keyof typeof ManyRequiredScalarFieldEnum] + export type MScalarFieldEnum = (typeof MScalarFieldEnum)[keyof typeof MScalarFieldEnum] export const NScalarFieldEnum: { @@ -14748,16 +15801,28 @@ export namespace Prisma { export type NScalarFieldEnum = (typeof NScalarFieldEnum)[keyof typeof NScalarFieldEnum] - export const NullableJsonNullValueInput: { - DbNull: typeof DbNull, - JsonNull: typeof JsonNull + export const OneOptionalScalarFieldEnum: { + id: 'id', + int: 'int', + optionalInt: 'optionalInt', + float: 'float', + optionalFloat: 'optionalFloat', + string: 'string', + optionalString: 'optionalString', + json: 'json', + optionalJson: 'optionalJson', + enum: 'enum', + optionalEnum: 'optionalEnum', + boolean: 'boolean', + optionalBoolean: 'optionalBoolean' }; - export type NullableJsonNullValueInput = (typeof NullableJsonNullValueInput)[keyof typeof NullableJsonNullValueInput] + export type OneOptionalScalarFieldEnum = (typeof OneOptionalScalarFieldEnum)[keyof typeof OneOptionalScalarFieldEnum] - export const OneOptionalScalarFieldEnum: { + export const ManyRequiredScalarFieldEnum: { id: 'id', + oneOptionalId: 'oneOptionalId', int: 'int', optionalInt: 'optionalInt', float: 'float', @@ -14772,7 +15837,7 @@ export namespace Prisma { optionalBoolean: 'optionalBoolean' }; - export type OneOptionalScalarFieldEnum = (typeof OneOptionalScalarFieldEnum)[keyof typeof OneOptionalScalarFieldEnum] + export type ManyRequiredScalarFieldEnum = (typeof ManyRequiredScalarFieldEnum)[keyof typeof ManyRequiredScalarFieldEnum] export const OptionalSide1ScalarFieldEnum: { @@ -14814,24 +15879,66 @@ export namespace Prisma { export type OptionalSide2ScalarFieldEnum = (typeof OptionalSide2ScalarFieldEnum)[keyof typeof OptionalSide2ScalarFieldEnum] - export const PostScalarFieldEnum: { + export const AScalarFieldEnum: { id: 'id', - createdAt: 'createdAt', - title: 'title', - content: 'content', - published: 'published', - authorId: 'authorId' + email: 'email', + name: 'name', + int: 'int', + sInt: 'sInt', + bInt: 'bInt', + inc_int: 'inc_int', + inc_sInt: 'inc_sInt', + inc_bInt: 'inc_bInt' }; - export type PostScalarFieldEnum = (typeof PostScalarFieldEnum)[keyof typeof PostScalarFieldEnum] + export type AScalarFieldEnum = (typeof AScalarFieldEnum)[keyof typeof AScalarFieldEnum] - export const QueryMode: { - default: 'default', - insensitive: 'insensitive' + export const BScalarFieldEnum: { + id: 'id', + float: 'float', + dFloat: 'dFloat', + decFloat: 'decFloat', + numFloat: 'numFloat' }; - export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] + export type BScalarFieldEnum = (typeof BScalarFieldEnum)[keyof typeof BScalarFieldEnum] + + + export const CScalarFieldEnum: { + id: 'id', + char: 'char', + vChar: 'vChar', + text: 'text', + bit: 'bit', + vBit: 'vBit', + uuid: 'uuid' + }; + + export type CScalarFieldEnum = (typeof CScalarFieldEnum)[keyof typeof CScalarFieldEnum] + + + export const DScalarFieldEnum: { + id: 'id', + bool: 'bool', + byteA: 'byteA', + xml: 'xml', + json: 'json', + jsonb: 'jsonb', + list: 'list' + }; + + export type DScalarFieldEnum = (typeof DScalarFieldEnum)[keyof typeof DScalarFieldEnum] + + + export const EScalarFieldEnum: { + id: 'id', + date: 'date', + time: 'time', + ts: 'ts' + }; + + export type EScalarFieldEnum = (typeof EScalarFieldEnum)[keyof typeof EScalarFieldEnum] export const SortOrder: { @@ -14842,34 +15949,44 @@ export namespace Prisma { export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] - export const TransactionIsolationLevel: { - ReadUncommitted: 'ReadUncommitted', - ReadCommitted: 'ReadCommitted', - RepeatableRead: 'RepeatableRead', - Serializable: 'Serializable' + export const JsonNullValueInput: { + JsonNull: typeof JsonNull }; - export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] + export type JsonNullValueInput = (typeof JsonNullValueInput)[keyof typeof JsonNullValueInput] - export const UserScalarFieldEnum: { - id: 'id', - email: 'email', - int: 'int', - optionalInt: 'optionalInt', - float: 'float', - optionalFloat: 'optionalFloat', - string: 'string', - optionalString: 'optionalString', - json: 'json', - optionalJson: 'optionalJson', - enum: 'enum', - optionalEnum: 'optionalEnum', - boolean: 'boolean', - optionalBoolean: 'optionalBoolean' + export const NullableJsonNullValueInput: { + DbNull: typeof DbNull, + JsonNull: typeof JsonNull }; - export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum] + export type NullableJsonNullValueInput = (typeof NullableJsonNullValueInput)[keyof typeof NullableJsonNullValueInput] + + + export const QueryMode: { + default: 'default', + insensitive: 'insensitive' + }; + + export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] + + + export const NullsOrder: { + first: 'first', + last: 'last' + }; + + export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] + + + export const JsonNullValueFilter: { + DbNull: typeof DbNull, + JsonNull: typeof JsonNull, + AnyNull: typeof AnyNull + }; + + export type JsonNullValueFilter = (typeof JsonNullValueFilter)[keyof typeof JsonNullValueFilter] /** @@ -14894,7 +16011,7 @@ export namespace Prisma { id?: SortOrder createdAt?: SortOrder title?: SortOrder - content?: SortOrder + content?: SortOrderInput | SortOrder published?: SortOrder authorId?: SortOrder author?: UserOrderByWithRelationInput @@ -14908,7 +16025,7 @@ export namespace Prisma { id?: SortOrder createdAt?: SortOrder title?: SortOrder - content?: SortOrder + content?: SortOrderInput | SortOrder published?: SortOrder authorId?: SortOrder _count?: PostCountOrderByAggregateInput @@ -14955,17 +16072,17 @@ export namespace Prisma { id?: SortOrder email?: SortOrder int?: SortOrder - optionalInt?: SortOrder + optionalInt?: SortOrderInput | SortOrder float?: SortOrder - optionalFloat?: SortOrder + optionalFloat?: SortOrderInput | SortOrder string?: SortOrder - optionalString?: SortOrder + optionalString?: SortOrderInput | SortOrder json?: SortOrder - optionalJson?: SortOrder + optionalJson?: SortOrderInput | SortOrder enum?: SortOrder - optionalEnum?: SortOrder + optionalEnum?: SortOrderInput | SortOrder boolean?: SortOrder - optionalBoolean?: SortOrder + optionalBoolean?: SortOrderInput | SortOrder posts?: PostOrderByRelationAggregateInput } @@ -14978,17 +16095,17 @@ export namespace Prisma { id?: SortOrder email?: SortOrder int?: SortOrder - optionalInt?: SortOrder + optionalInt?: SortOrderInput | SortOrder float?: SortOrder - optionalFloat?: SortOrder + optionalFloat?: SortOrderInput | SortOrder string?: SortOrder - optionalString?: SortOrder + optionalString?: SortOrderInput | SortOrder json?: SortOrder - optionalJson?: SortOrder + optionalJson?: SortOrderInput | SortOrder enum?: SortOrder - optionalEnum?: SortOrder + optionalEnum?: SortOrderInput | SortOrder boolean?: SortOrder - optionalBoolean?: SortOrder + optionalBoolean?: SortOrderInput | SortOrder _count?: UserCountOrderByAggregateInput _avg?: UserAvgOrderByAggregateInput _max?: UserMaxOrderByAggregateInput @@ -15039,17 +16156,17 @@ export namespace Prisma { export type MOrderByWithRelationInput = { id?: SortOrder int?: SortOrder - optionalInt?: SortOrder + optionalInt?: SortOrderInput | SortOrder float?: SortOrder - optionalFloat?: SortOrder + optionalFloat?: SortOrderInput | SortOrder string?: SortOrder - optionalString?: SortOrder + optionalString?: SortOrderInput | SortOrder json?: SortOrder - optionalJson?: SortOrder + optionalJson?: SortOrderInput | SortOrder enum?: SortOrder - optionalEnum?: SortOrder + optionalEnum?: SortOrderInput | SortOrder boolean?: SortOrder - optionalBoolean?: SortOrder + optionalBoolean?: SortOrderInput | SortOrder n?: NOrderByRelationAggregateInput } @@ -15060,17 +16177,17 @@ export namespace Prisma { export type MOrderByWithAggregationInput = { id?: SortOrder int?: SortOrder - optionalInt?: SortOrder + optionalInt?: SortOrderInput | SortOrder float?: SortOrder - optionalFloat?: SortOrder + optionalFloat?: SortOrderInput | SortOrder string?: SortOrder - optionalString?: SortOrder + optionalString?: SortOrderInput | SortOrder json?: SortOrder - optionalJson?: SortOrder + optionalJson?: SortOrderInput | SortOrder enum?: SortOrder - optionalEnum?: SortOrder + optionalEnum?: SortOrderInput | SortOrder boolean?: SortOrder - optionalBoolean?: SortOrder + optionalBoolean?: SortOrderInput | SortOrder _count?: MCountOrderByAggregateInput _avg?: MAvgOrderByAggregateInput _max?: MMaxOrderByAggregateInput @@ -15120,17 +16237,17 @@ export namespace Prisma { export type NOrderByWithRelationInput = { id?: SortOrder int?: SortOrder - optionalInt?: SortOrder + optionalInt?: SortOrderInput | SortOrder float?: SortOrder - optionalFloat?: SortOrder + optionalFloat?: SortOrderInput | SortOrder string?: SortOrder - optionalString?: SortOrder + optionalString?: SortOrderInput | SortOrder json?: SortOrder - optionalJson?: SortOrder + optionalJson?: SortOrderInput | SortOrder enum?: SortOrder - optionalEnum?: SortOrder + optionalEnum?: SortOrderInput | SortOrder boolean?: SortOrder - optionalBoolean?: SortOrder + optionalBoolean?: SortOrderInput | SortOrder m?: MOrderByRelationAggregateInput } @@ -15141,17 +16258,17 @@ export namespace Prisma { export type NOrderByWithAggregationInput = { id?: SortOrder int?: SortOrder - optionalInt?: SortOrder + optionalInt?: SortOrderInput | SortOrder float?: SortOrder - optionalFloat?: SortOrder + optionalFloat?: SortOrderInput | SortOrder string?: SortOrder - optionalString?: SortOrder + optionalString?: SortOrderInput | SortOrder json?: SortOrder - optionalJson?: SortOrder + optionalJson?: SortOrderInput | SortOrder enum?: SortOrder - optionalEnum?: SortOrder + optionalEnum?: SortOrderInput | SortOrder boolean?: SortOrder - optionalBoolean?: SortOrder + optionalBoolean?: SortOrderInput | SortOrder _count?: NCountOrderByAggregateInput _avg?: NAvgOrderByAggregateInput _max?: NMaxOrderByAggregateInput @@ -15201,17 +16318,17 @@ export namespace Prisma { export type OneOptionalOrderByWithRelationInput = { id?: SortOrder int?: SortOrder - optionalInt?: SortOrder + optionalInt?: SortOrderInput | SortOrder float?: SortOrder - optionalFloat?: SortOrder + optionalFloat?: SortOrderInput | SortOrder string?: SortOrder - optionalString?: SortOrder + optionalString?: SortOrderInput | SortOrder json?: SortOrder - optionalJson?: SortOrder + optionalJson?: SortOrderInput | SortOrder enum?: SortOrder - optionalEnum?: SortOrder + optionalEnum?: SortOrderInput | SortOrder boolean?: SortOrder - optionalBoolean?: SortOrder + optionalBoolean?: SortOrderInput | SortOrder many?: ManyRequiredOrderByRelationAggregateInput } @@ -15222,17 +16339,17 @@ export namespace Prisma { export type OneOptionalOrderByWithAggregationInput = { id?: SortOrder int?: SortOrder - optionalInt?: SortOrder + optionalInt?: SortOrderInput | SortOrder float?: SortOrder - optionalFloat?: SortOrder + optionalFloat?: SortOrderInput | SortOrder string?: SortOrder - optionalString?: SortOrder + optionalString?: SortOrderInput | SortOrder json?: SortOrder - optionalJson?: SortOrder + optionalJson?: SortOrderInput | SortOrder enum?: SortOrder - optionalEnum?: SortOrder + optionalEnum?: SortOrderInput | SortOrder boolean?: SortOrder - optionalBoolean?: SortOrder + optionalBoolean?: SortOrderInput | SortOrder _count?: OneOptionalCountOrderByAggregateInput _avg?: OneOptionalAvgOrderByAggregateInput _max?: OneOptionalMaxOrderByAggregateInput @@ -15282,19 +16399,19 @@ export namespace Prisma { export type ManyRequiredOrderByWithRelationInput = { id?: SortOrder - oneOptionalId?: SortOrder + oneOptionalId?: SortOrderInput | SortOrder int?: SortOrder - optionalInt?: SortOrder + optionalInt?: SortOrderInput | SortOrder float?: SortOrder - optionalFloat?: SortOrder + optionalFloat?: SortOrderInput | SortOrder string?: SortOrder - optionalString?: SortOrder + optionalString?: SortOrderInput | SortOrder json?: SortOrder - optionalJson?: SortOrder + optionalJson?: SortOrderInput | SortOrder enum?: SortOrder - optionalEnum?: SortOrder + optionalEnum?: SortOrderInput | SortOrder boolean?: SortOrder - optionalBoolean?: SortOrder + optionalBoolean?: SortOrderInput | SortOrder one?: OneOptionalOrderByWithRelationInput } @@ -15304,19 +16421,19 @@ export namespace Prisma { export type ManyRequiredOrderByWithAggregationInput = { id?: SortOrder - oneOptionalId?: SortOrder + oneOptionalId?: SortOrderInput | SortOrder int?: SortOrder - optionalInt?: SortOrder + optionalInt?: SortOrderInput | SortOrder float?: SortOrder - optionalFloat?: SortOrder + optionalFloat?: SortOrderInput | SortOrder string?: SortOrder - optionalString?: SortOrder + optionalString?: SortOrderInput | SortOrder json?: SortOrder - optionalJson?: SortOrder + optionalJson?: SortOrderInput | SortOrder enum?: SortOrder - optionalEnum?: SortOrder + optionalEnum?: SortOrderInput | SortOrder boolean?: SortOrder - optionalBoolean?: SortOrder + optionalBoolean?: SortOrderInput | SortOrder _count?: ManyRequiredCountOrderByAggregateInput _avg?: ManyRequiredAvgOrderByAggregateInput _max?: ManyRequiredMaxOrderByAggregateInput @@ -15367,19 +16484,19 @@ export namespace Prisma { export type OptionalSide1OrderByWithRelationInput = { id?: SortOrder - optionalSide2Id?: SortOrder + optionalSide2Id?: SortOrderInput | SortOrder int?: SortOrder - optionalInt?: SortOrder + optionalInt?: SortOrderInput | SortOrder float?: SortOrder - optionalFloat?: SortOrder + optionalFloat?: SortOrderInput | SortOrder string?: SortOrder - optionalString?: SortOrder + optionalString?: SortOrderInput | SortOrder json?: SortOrder - optionalJson?: SortOrder + optionalJson?: SortOrderInput | SortOrder enum?: SortOrder - optionalEnum?: SortOrder + optionalEnum?: SortOrderInput | SortOrder boolean?: SortOrder - optionalBoolean?: SortOrder + optionalBoolean?: SortOrderInput | SortOrder opti?: OptionalSide2OrderByWithRelationInput } @@ -15390,19 +16507,19 @@ export namespace Prisma { export type OptionalSide1OrderByWithAggregationInput = { id?: SortOrder - optionalSide2Id?: SortOrder + optionalSide2Id?: SortOrderInput | SortOrder int?: SortOrder - optionalInt?: SortOrder + optionalInt?: SortOrderInput | SortOrder float?: SortOrder - optionalFloat?: SortOrder + optionalFloat?: SortOrderInput | SortOrder string?: SortOrder - optionalString?: SortOrder + optionalString?: SortOrderInput | SortOrder json?: SortOrder - optionalJson?: SortOrder + optionalJson?: SortOrderInput | SortOrder enum?: SortOrder - optionalEnum?: SortOrder + optionalEnum?: SortOrderInput | SortOrder boolean?: SortOrder - optionalBoolean?: SortOrder + optionalBoolean?: SortOrderInput | SortOrder _count?: OptionalSide1CountOrderByAggregateInput _avg?: OptionalSide1AvgOrderByAggregateInput _max?: OptionalSide1MaxOrderByAggregateInput @@ -15453,17 +16570,17 @@ export namespace Prisma { export type OptionalSide2OrderByWithRelationInput = { id?: SortOrder int?: SortOrder - optionalInt?: SortOrder + optionalInt?: SortOrderInput | SortOrder float?: SortOrder - optionalFloat?: SortOrder + optionalFloat?: SortOrderInput | SortOrder string?: SortOrder - optionalString?: SortOrder + optionalString?: SortOrderInput | SortOrder json?: SortOrder - optionalJson?: SortOrder + optionalJson?: SortOrderInput | SortOrder enum?: SortOrder - optionalEnum?: SortOrder + optionalEnum?: SortOrderInput | SortOrder boolean?: SortOrder - optionalBoolean?: SortOrder + optionalBoolean?: SortOrderInput | SortOrder opti?: OptionalSide1OrderByWithRelationInput } @@ -15474,17 +16591,17 @@ export namespace Prisma { export type OptionalSide2OrderByWithAggregationInput = { id?: SortOrder int?: SortOrder - optionalInt?: SortOrder + optionalInt?: SortOrderInput | SortOrder float?: SortOrder - optionalFloat?: SortOrder + optionalFloat?: SortOrderInput | SortOrder string?: SortOrder - optionalString?: SortOrder + optionalString?: SortOrderInput | SortOrder json?: SortOrder - optionalJson?: SortOrder + optionalJson?: SortOrderInput | SortOrder enum?: SortOrder - optionalEnum?: SortOrder + optionalEnum?: SortOrderInput | SortOrder boolean?: SortOrder - optionalBoolean?: SortOrder + optionalBoolean?: SortOrderInput | SortOrder _count?: OptionalSide2CountOrderByAggregateInput _avg?: OptionalSide2AvgOrderByAggregateInput _max?: OptionalSide2MaxOrderByAggregateInput @@ -15529,7 +16646,7 @@ export namespace Prisma { export type AOrderByWithRelationInput = { id?: SortOrder email?: SortOrder - name?: SortOrder + name?: SortOrderInput | SortOrder int?: SortOrder sInt?: SortOrder bInt?: SortOrder @@ -15546,7 +16663,7 @@ export namespace Prisma { export type AOrderByWithAggregationInput = { id?: SortOrder email?: SortOrder - name?: SortOrder + name?: SortOrderInput | SortOrder int?: SortOrder sInt?: SortOrder bInt?: SortOrder @@ -17019,8 +18136,13 @@ export namespace Prisma { } export type UserRelationFilter = { - is?: UserWhereInput - isNot?: UserWhereInput + is?: UserWhereInput | null + isNot?: UserWhereInput | null + } + + export type SortOrderInput = { + sort: SortOrder + nulls?: NullsOrder } export type PostCountOrderByAggregateInput = { diff --git a/packages/client/src/__tests__/types/distinct/test.ts b/packages/client/src/__tests__/types/distinct/test.ts index 7e8c698199e2..bb0bca85bd54 100644 --- a/packages/client/src/__tests__/types/distinct/test.ts +++ b/packages/client/src/__tests__/types/distinct/test.ts @@ -13,6 +13,14 @@ async function main() { await prisma.user.findMany({ distinct: ['id', 'email', 'age', 'followerCount', 'name'], }) + + await prisma.user.findMany({ + distinct: 'id', + }) + + await prisma.user.findMany({ + distinct: 'email', + }) } main().catch((e) => { diff --git a/packages/client/src/generation/TSClient/Args.ts b/packages/client/src/generation/TSClient/Args.ts index e9b06f7c3710..160a484955ce 100644 --- a/packages/client/src/generation/TSClient/Args.ts +++ b/packages/client/src/generation/TSClient/Args.ts @@ -7,7 +7,6 @@ import { TAB_SIZE } from './constants' import type { Generatable } from './Generatable' import { getArgFieldJSDoc } from './helpers' import { InputField } from './Input' -import { ifExtensions } from './utils/ifExtensions' export class ArgsType implements Generatable { private generatedName: string | null = null @@ -92,10 +91,7 @@ export class ArgsType implements Generatable { /** * ${this.getGeneratedComment()} */ -export type ${generatedName}${ifExtensions( - '', - '', - )} = { +export type ${generatedName} = { ${indent(argsToGenerate.map((arg) => new InputField(arg, false, this.genericsInfo).toTS()).join('\n'), TAB_SIZE)} } ` @@ -118,20 +114,14 @@ ${indent(argsToGenerate.map((arg) => new InputField(arg, false, this.genericsInf /** * ${name} base type for ${action} actions */ -export type ${baseTypeName}${ifExtensions( - '', - '', - )} = { +export type ${baseTypeName} = { ${indent(argsToGenerate.map((arg) => new InputField(arg, false, this.genericsInfo).toTS()).join('\n'), TAB_SIZE)} } /** * ${this.getGeneratedComment()} */ -export interface ${modelArgName}${ifExtensions( - '', - '', - )} extends ${baseTypeName}${ifExtensions('', '')} { +export interface ${modelArgName} extends ${baseTypeName} { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use \`${replacement}\` method instead @@ -166,10 +156,7 @@ export class MinimalArgsType implements Generatable { /** * ${name} ${action ? action : 'without action'} */ -export type ${this.generatedTypeName}${ifExtensions( - '', - '', - )} = { +export type ${this.generatedTypeName} = { ${indent( args .map((arg) => { diff --git a/packages/client/src/generation/TSClient/Count.ts b/packages/client/src/generation/TSClient/Count.ts index 24bf95a1564b..05b98e55c6a9 100644 --- a/packages/client/src/generation/TSClient/Count.ts +++ b/packages/client/src/generation/TSClient/Count.ts @@ -10,8 +10,6 @@ import { TAB_SIZE } from './constants' import type { Generatable } from './Generatable' import { TS } from './Generatable' import { OutputType } from './Output' -import { PayloadType } from './Payload' -import { ifExtensions } from './utils/ifExtensions' export class Count implements Generatable { constructor( @@ -53,10 +51,7 @@ export class Count implements Generatable { ${outputType.toTS()} -export type ${getSelectName(name)}${ifExtensions( - '', - '', - )} = { +export type ${getSelectName(name)} = { ${indent( type.fields .map((field) => { @@ -79,10 +74,6 @@ ${indent( )} } -${ifExtensions('', new PayloadType(outputType, this.dmmf, false).toTS())} - - - // Custom InputTypes ${this.argsTypes.map((gen) => TS(gen)).join('\n')} ` diff --git a/packages/client/src/generation/TSClient/Input.ts b/packages/client/src/generation/TSClient/Input.ts index a6002491002d..8451c20c5666 100644 --- a/packages/client/src/generation/TSClient/Input.ts +++ b/packages/client/src/generation/TSClient/Input.ts @@ -7,7 +7,6 @@ import { GenericArgsInfo } from '../GenericsArgsInfo' import * as ts from '../ts-builders' import { TAB_SIZE } from './constants' import type { Generatable } from './Generatable' -import { ifExtensions } from './utils/ifExtensions' export class InputField implements Generatable { constructor( @@ -69,11 +68,9 @@ function buildSingleFieldType( type = namedInputType(t.type.name) } - ifExtensions(() => { - if (type.name.endsWith('Select') || type.name.endsWith('Include')) { - type.addGenericArgument(ts.namedType('ExtArgs')) - } - }, undefined) + if (type.name.endsWith('Select') || type.name.endsWith('Include')) { + type.addGenericArgument(ts.namedType('ExtArgs')) + } if (genericsInfo.needsGenericModelArg(t)) { if (source) { diff --git a/packages/client/src/generation/TSClient/Model.ts b/packages/client/src/generation/TSClient/Model.ts index f19d8d3d9298..bb1b7c584624 100644 --- a/packages/client/src/generation/TSClient/Model.ts +++ b/packages/client/src/generation/TSClient/Model.ts @@ -29,7 +29,6 @@ import { getSumAggregateName, Projection, } from '../utils' -import { buildComment } from '../utils/types/buildComment' import { InputField } from './../TSClient' import { ArgsType, MinimalArgsType } from './Args' import { TAB_SIZE } from './constants' @@ -38,12 +37,15 @@ import { TS } from './Generatable' import { getArgFieldJSDoc, getArgs, getGenericMethod, getMethodJSDoc, wrapComment } from './helpers' import { InputType } from './Input' import { ModelFieldRefs } from './ModelFieldRefs' -import { ModelOutputField, OutputType } from './Output' -import { PayloadType } from './Payload' +import { buildModelOutputProperty, OutputType } from './Output' import { SchemaOutputType } from './SchemaOutput' import { buildIncludeType, buildScalarSelectType, buildSelectType } from './SelectInclude' import { getModelActions } from './utils/getModelActions' -import { ifExtensions } from './utils/ifExtensions' + +const extArgsParam = ts + .genericParameter('ExtArgs') + .extends(ts.namedType('$Extensions.Args')) + .default(ts.namedType('$Extensions.DefaultArgs')) export class Model implements Generatable { protected outputType: OutputType @@ -119,10 +121,7 @@ export class Model implements Generatable { return ` -export type ${groupByArgsName}${ifExtensions( - '', - '', - )} = { +export type ${groupByArgsName} = { ${indent( groupByRootField.args .map((arg) => { @@ -238,10 +237,7 @@ ${ : '' } -export type ${aggregateArgsName}${ifExtensions( - '', - '', - )} = { +export type ${aggregateArgsName} = { ${indent( aggregateRootField.args .map((arg) => { @@ -276,60 +272,64 @@ export type ${getAggregateGetName(model.name)} { - return `export type ${ - model.name - }Payload = { -${indent( - `objects: { -${indent( - model.fields - .filter((f) => f.kind === 'object') - .map((field) => new ModelOutputField(this.dmmf, field, false).toTS()) - .join('\n'), - TAB_SIZE, -)} -}`, - TAB_SIZE, -)} -${indent( - `scalars: runtime.Types.Extensions.GetResult<{ -${indent( - model.fields - .filter((f) => f.kind === 'scalar' || f.kind === 'enum') - .map((field) => new ModelOutputField(this.dmmf, field, !this.dmmf.typeMap[field.type]).toTS()) - .join('\n'), - TAB_SIZE, -)} -}, ExtArgs['result']['${lowerCase(model.name)}']>`, - TAB_SIZE, -)} -} + const objects = ts.objectType() + const scalars = ts.objectType() + const composites = ts.objectType() -${buildComment(docs)}export type ${model.name} = ${model.name}Payload['scalars'] -` - }, - () => { - return `${buildComment(docs)}export type ${model.name} = { -${indent( - model.fields - .filter((f) => (f.kind !== 'object' && f.kind !== 'unsupported') || this.dmmf.typeMap[f.type]) - .map((field) => new ModelOutputField(this.dmmf, field, !this.dmmf.typeMap[field.type]).toTS()) - .join('\n'), - TAB_SIZE, -)} -} -` - }, + for (const field of model.fields) { + if (field.kind === 'object') { + if (this.dmmf.typeMap[field.type]) { + composites.add(buildModelOutputProperty(field, this.dmmf)) + } else { + objects.add(buildModelOutputProperty(field, this.dmmf)) + } + } else if (field.kind === 'enum' || field.kind === 'scalar') { + scalars.add(buildModelOutputProperty(field, this.dmmf, true)) + } + } + + const scalarsType = isComposite + ? scalars + : ts + .namedType('$Extensions.GetResult') + .addGenericArgument(scalars) + .addGenericArgument(ts.namedType('ExtArgs').subKey('result').subKey(lowerCase(model.name))) + + const payloadName = `${model.name}Payload` + const payloadTypeDeclaration = ts.typeDeclaration( + `${model.name}Payload`, + ts + .objectType() + .add(ts.property('objects', objects)) + .add(ts.property('scalars', scalarsType)) + .add(ts.property('composites', composites)), ) + + if (!isComposite) { + payloadTypeDeclaration.addGenericParameter(extArgsParam) + } + const payloadExport = ts.moduleExport(payloadTypeDeclaration) + + const modelTypeExport = ts + .moduleExport( + ts.typeDeclaration( + model.name, + ts.namedType(`runtime.Types.DefaultSelection`).addGenericArgument(ts.namedType(payloadName)), + ), + ) + .setDocComment(ts.docComment(docs)) + + return `${ts.stringify(payloadExport)}\n\n${ts.stringify(modelTypeExport)}` } public toTS(): string { const { model } = this + const isComposite = this.dmmf.typeMap[model.name] const hasRelationField = model.fields.some((f) => f.kind === 'object') const includeType = hasRelationField @@ -351,20 +351,16 @@ ${!this.dmmf.typeMap[model.name] ? this.getAggregationTypes() : ''} ${!this.dmmf.typeMap[model.name] ? this.getGroupByTypes() : ''} ${ts.stringify(buildSelectType({ modelName: this.model.name, fields: this.outputType.fields }))} -${ifExtensions(() => { - return ts.stringify(buildScalarSelectType({ modelName: this.model.name, fields: this.outputType.fields }), { - newLine: 'leading', - }) -}, '')} +${ts.stringify(buildScalarSelectType({ modelName: this.model.name, fields: this.outputType.fields }), { + newLine: 'leading', +})} ${includeType} -${ifExtensions( - `type ${model.name}GetPayload = runtime.Types.GetFindResult<${model.name}Payload, S>`, - new PayloadType(this.outputType, this.dmmf).toTS(), -)} -${new ModelDelegate(this.outputType, this.dmmf, this.generator).toTS()} +type ${model.name}GetPayload = $Types.GetResult<${ + model.name + }Payload, S> + +${isComposite ? '' : new ModelDelegate(this.outputType, this.dmmf, this.generator).toTS()} ${new ModelFieldRefs(this.generator, this.outputType).toTS()} @@ -416,27 +412,15 @@ export class ModelDelegate implements Generatable { return `\ ${ availableActions.includes(DMMF.ModelAction.aggregate) - ? `type ${countArgsName}${ifExtensions( - '', - '', - )} = + ? `type ${countArgsName} = Omit<${getModelArgName(name, DMMF.ModelAction.findMany)}, 'select' | 'include'> & { select?: ${getCountAggregateInputName(name)} | true } ` : '' } -export interface ${name}Delegate { -${ifExtensions( - `${indent( - `[K: symbol]: { types: Prisma.TypeMap['model']['${name}'], meta: { name: '${name}' } }`, - TAB_SIZE, - )}`, - '', -)} +export interface ${name}Delegate { +${indent(`[K: symbol]: { types: Prisma.TypeMap['model']['${name}'], meta: { name: '${name}' } }`, TAB_SIZE)} ${indent( nonAggregateActions .map( @@ -456,7 +440,7 @@ ${ count( args?: Subset, ): Prisma.PrismaPromise< - T extends _Record<'select', any> + T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType @@ -548,10 +532,7 @@ ${fieldsProxy} * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ -export class Prisma__${name}Client implements Prisma.PrismaPromise { +export class Prisma__${name}Client implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -567,14 +548,17 @@ export class Prisma__${name}Client f.outputType.location === 'outputObjectTypes' && f.name !== '_count') + .filter((f) => { + const fieldTypeName = (f.outputType.type as DMMF.OutputType).name + return f.outputType.location === 'outputObjectTypes' && !this.dmmf.typeMap[fieldTypeName] && f.name !== '_count' + }) .map((f) => { const fieldTypeName = (f.outputType.type as DMMF.OutputType).name return ` -${f.name} = {}', - '= {}', - )}>(args?: Subset', '')}>): ${getReturnType({ +${f.name} = {}>(args?: Subset>): ${getReturnType({ name: fieldTypeName, actionName: f.outputType.isList ? DMMF.ModelAction.findMany : DMMF.ModelAction.findUnique, hideCondition: false, diff --git a/packages/client/src/generation/TSClient/Output.ts b/packages/client/src/generation/TSClient/Output.ts index 74b9a6d0abf0..ac7ba784a97b 100644 --- a/packages/client/src/generation/TSClient/Output.ts +++ b/packages/client/src/generation/TSClient/Output.ts @@ -3,45 +3,41 @@ import indent from 'indent-string' import type { DMMFHelper } from '../../runtime/dmmf' import type { DMMF } from '../../runtime/dmmf-types' import { GraphQLScalarToJSTypeTable, isSchemaEnum, needsNamespace } from '../../runtime/utils/common' -import { buildComment } from '../utils/types/buildComment' +import * as ts from '../ts-builders' import { TAB_SIZE } from './constants' import type { Generatable } from './Generatable' import { wrapComment } from './helpers' -import { ifExtensions } from './utils/ifExtensions' -export class ModelOutputField implements Generatable { - constructor( - protected readonly dmmf: DMMFHelper, - protected readonly field: DMMF.Field, - protected readonly useNamespace = false, - ) {} - public toTS(): string { - const { field, useNamespace } = this - // ENUMTODO - let fieldType = GraphQLScalarToJSTypeTable[field.type] || field.type - if (Array.isArray(fieldType)) { - fieldType = fieldType[0] +export function buildModelOutputProperty(field: DMMF.Field, dmmf: DMMFHelper, useNamespace = false) { + let fieldTypeName = GraphQLScalarToJSTypeTable[field.type] || field.type + if (Array.isArray(fieldTypeName)) { + fieldTypeName = fieldTypeName[0] + } + if (useNamespace && needsNamespace(field.type, dmmf)) { + fieldTypeName = `Prisma.${fieldTypeName}` + } + let fieldType: ts.TypeBuilder + if (field.kind === 'object') { + const payloadType = ts.namedType(`${fieldTypeName}Payload`) + if (!dmmf.typeMap[field.type]) { + // not a composite + payloadType.addGenericArgument(ts.namedType('ExtArgs')) } - const arrayStr = field.isList ? `[]` : '' - const nullableStr = !field.isRequired && !field.isList ? ' | null' : '' - const namespaceStr = useNamespace && needsNamespace(field.type, this.dmmf) ? `Prisma.` : '' - - return ifExtensions( - () => { - if (field.kind === 'object') { - fieldType = `${fieldType}Payload` - return `${buildComment(field.documentation)}${ - field.name - }: ${namespaceStr}${fieldType}${arrayStr}${nullableStr}` - } + fieldType = payloadType + } else { + fieldType = ts.namedType(fieldTypeName) + } - return `${buildComment(field.documentation)}${field.name}: ${namespaceStr}${fieldType}${arrayStr}${nullableStr}` - }, - () => { - return `${buildComment(field.documentation)}${field.name}: ${namespaceStr}${fieldType}${arrayStr}${nullableStr}` - }, - ) + if (field.isList) { + fieldType = ts.array(fieldType) + } else if (!field.isRequired) { + fieldType = ts.unionType(fieldType).addVariant(ts.nullType) + } + const property = ts.property(field.name, fieldType) + if (field.documentation) { + property.setDocComment(ts.docComment(field.documentation)) } + return property } export class OutputField implements Generatable { diff --git a/packages/client/src/generation/TSClient/Payload.ts b/packages/client/src/generation/TSClient/Payload.ts deleted file mode 100644 index 38d3a6196f63..000000000000 --- a/packages/client/src/generation/TSClient/Payload.ts +++ /dev/null @@ -1,117 +0,0 @@ -import indent from 'indent-string' - -import { get } from '../../../../../helpers/blaze/get' -import { DMMFHelper } from '../../runtime/dmmf' -import { DMMF } from '../../runtime/dmmf-types' -import { lowerCase } from '../../runtime/utils/common' -import { getArgName, getModelArgName, getPayloadName, Projection } from '../utils' -import type { Generatable } from './Generatable' -import type { OutputType } from './Output' -import { ifExtensions } from './utils/ifExtensions' - -export class PayloadType implements Generatable { - constructor( - protected readonly type: OutputType, - protected readonly dmmf: DMMFHelper, - protected readonly findMany = true, - ) {} - - public toTS(): string { - const { type } = this - const { name } = type - - const argsName = getArgName(name) - - const include = this.renderRelations(Projection.include) - const select = this.renderRelations(Projection.select) - - const isModel = !this.dmmf.typeMap[name] - const findManyArg = - isModel && this.findMany ? ` | ${getModelArgName(name, DMMF.ModelAction.findMany)}${ifExtensions('', '')}` : '' - - return `\ -export type ${getPayloadName(name)}`, - '', - )}> = - S extends { select: any, include: any } ? 'Please either choose \`select\` or \`include\`' : - S extends true ? ${ifExtensions(`_${name}`, name)} : - S extends undefined ? never : - S extends { include: any } & (${argsName}${findManyArg}) - ? ${ifExtensions(`_${name}`, name)} ${include.length > 0 ? ifExtensions(`& ${include}`, ` & ${include}`) : ''} - : S extends { select: any } & (${argsName}${findManyArg}) - ? ${select} - : ${ifExtensions(`_${name}`, name)} -` - } - private renderRelations(projection: Projection): string { - const { type } = this - - const relationsProjectionChoice = { - // For select, a "relation"" can be a model or a composite - [Projection.select]: () => { - return type.fields.filter((f) => { - return f.outputType.location === 'outputObjectTypes' - }) - }, - - // But for include, a "relation" can only be a model - [Projection.include]: () => { - const nonCompositeRelations = type.fields.filter((f) => { - return ( - f.outputType.location === 'outputObjectTypes' && - typeof f.outputType.type === 'object' && - !this.dmmf.typeMap[f.outputType.type.name] - ) - }) - - return nonCompositeRelations - }, - } - - const relations = get(relationsProjectionChoice, projection)() - - if (projection === Projection.include && relations.length === 0) return '' - - const typeName = ifExtensions(`_${type.name}`, type.name) - - const selectPrefix = projection === Projection.select ? ` P extends keyof ${typeName} ? ${typeName}[P] :` : '' - - return `{ - [P in TruthyKeys]: -${indent( - relations - .map( - (f) => - `P extends '${f.name}' ? ${this.wrapType( - f, - `${getPayloadName((f.outputType.type as DMMF.OutputType).name)}`, - )} :`, - ) - .join('\n'), - 6, -)} ${selectPrefix} never -} ` - } - private wrapType(field: DMMF.SchemaField, str: string): string { - const { outputType } = field - if (!field.isNullable && !outputType.isList) { - return str - } - if (outputType.isList) { - return `Array < ${str}> ` - } - if (str === 'Null') { - return 'null' - } - if (field.isNullable) { - str += ' | null' - } - return str - } -} diff --git a/packages/client/src/generation/TSClient/PrismaClient.ts b/packages/client/src/generation/TSClient/PrismaClient.ts index 78656a30753d..a1c38e8002ca 100644 --- a/packages/client/src/generation/TSClient/PrismaClient.ts +++ b/packages/client/src/generation/TSClient/PrismaClient.ts @@ -12,65 +12,6 @@ import { TAB_SIZE } from './constants' import { Datasources } from './Datasources' import type { Generatable } from './Generatable' import { getModelActions } from './utils/getModelActions' -import { ifExtensions } from './utils/ifExtensions' - -function clientExtensionsResultDefinition(this: PrismaClientClass) { - const modelNames = Object.keys(this.dmmf.getModelMap()) - - const resultGenericParams = (modelName: string) => { - return `R_${modelName}_Needs extends Record>` - } - - const genericParams = [ - ...modelNames.flatMap(resultGenericParams), - `R extends runtime.Types.Extensions.UserArgs['result'] = {}`, - ].join(',\n ') - - const resultParam = (modelName: string) => { - return `${lowerCase(modelName)}?: { - [K in keyof R_${modelName}_Needs]: { - needs: R_${modelName}_Needs[K] - compute: (data: runtime.Types.GetResult<${modelName}Payload, { select: R_${modelName}_Needs[K] }, 'findUniqueOrThrow'>) => unknown - } - }` - } - - const params = `{ - $allModels?: Record unknown - }> - ${modelNames.map(resultParam).join('\n ')} - }` - - return { - genericParams, - params, - } -} - -function clientExtensionsModelDefinition(this: PrismaClientClass) { - const modelNames = Object.keys(this.dmmf.getModelMap()) - - const modelParam = (modelName: string) => { - return `${lowerCase( - modelName, - )}?: { [K: symbol]: { ctx: runtime.Types.Extensions.GetModel, ExtArgs['model']['${lowerCase( - modelName, - )}']> } }` - } - - const params = `{ - $allModels?: {} - ${modelNames.map(modelParam).join('\n ')} - }` - - return { - genericParams: `M extends runtime.Types.Extensions.UserArgs['model'] = {}`, - params, - } -} function clientTypeMapModelsDefinition(this: PrismaClientClass) { const modelNames = Object.keys(this.dmmf.getModelMap()) @@ -78,6 +19,11 @@ function clientTypeMapModelsDefinition(this: PrismaClientClass) { return `{ meta: { modelProps: ${modelNames.map((mn) => `'${lowerCase(mn)}'`).join(' | ')} + txIsolationLevel: ${ + this.dmmf.hasEnumInNamespace('TransactionIsolationLevel', 'prisma') + ? 'Prisma.TransactionIsolationLevel' + : 'never' + } }, model: {${modelNames.reduce((acc, modelName) => { const actions = getModelActions(this.dmmf, modelName) @@ -87,7 +33,7 @@ function clientTypeMapModelsDefinition(this: PrismaClientClass) { return `${acc} ${action}: { args: Prisma.${getModelArgName(modelName, action)}, - result: runtime.Types.Utils.OptionalFlat<${modelName}> + result: $Utils.OptionalFlat<${modelName}> payload: ${modelName}Payload }` }, '')} @@ -130,139 +76,24 @@ function clientTypeMapOthersDefinition(this: PrismaClientClass) { function clientTypeMapDefinition(this: PrismaClientClass) { const typeMap = `${clientTypeMapModelsDefinition.bind(this)()} & ${clientTypeMapOthersDefinition.bind(this)()}` - return `export type TypeMap = ${typeMap}` -} - -function clientExtensionsQueryDefinition(this: PrismaClientClass) { - const modelNames = Object.keys(this.dmmf.getModelMap()) - const prismaNamespaceDefinitions = clientTypeMapDefinition.bind(this)() - - const queryCbDefinitionModel = (modelName: string, operationName: string) => { - const queryArgs = `runtime.Types.Extensions.ReadonlySelector['model'][${modelName}][${operationName}]['args']>` - const queryResult = `Prisma.TypeMap['model'][${modelName}][${operationName}]['result']` - const inputQueryBase = `model: ${modelName}, operation: ${operationName}, args: ${queryArgs}` - const inputQueryCbBase = `query: (args: ${queryArgs}) => Prisma.PrismaPromise<${queryResult}>` - const inputQuery = `{ ${inputQueryBase}, ${inputQueryCbBase} }` - - return `(args: ${inputQuery}) => Promise<${queryResult}>` - } - - const queryCbDefinitionOther = (operationName: string) => { - const queryArgs = `Prisma.TypeMap['other'][${operationName}]['args']` - const queryResult = `Prisma.TypeMap['other'][${operationName}]['result']` - const inputQueryBase = `operation: ${operationName}, args: ${queryArgs}` - const inputQueryCbBase = `query: (args: ${queryArgs}) => Prisma.PrismaPromise<${queryResult}>` - const inputQuery = `{ ${inputQueryBase}, ${inputQueryCbBase} }` - - return `(args: ${inputQuery}) => Promise<${queryResult}>` - } - - const allOperationsParam = (modelNames: string[], indent: string) => { - const modelName = modelNames.map((mn) => `'${mn}'`).join(' | ') - - return `{ - ${indent}$allOperations?: ${queryCbDefinitionModel(modelName, `keyof Prisma.TypeMap['model'][${modelName}]`)} - ${indent}}` - } - - const modelParam = (propName: string, modelNames: string[]) => { - const key = modelNames.map((mn) => `'${mn}'`).join(' | ') - - return `${propName}?: { - [K in keyof Prisma.TypeMap['model'][${key}]]?: ${queryCbDefinitionModel(key, `K`)} - } & ${allOperationsParam(modelNames, ' ')}` - } - - const allModelsParam = `{ - ${modelParam('$allModels', modelNames)} - }` - - const concreteModelParams = `{${modelNames.reduce((acc, modelName) => { - return `${acc} - ${modelParam(lowerCase(modelName), [modelName])}` - }, '')} - }` - - const concreteOtherParams = `{ - [K in keyof Prisma.TypeMap['other']]?: ${queryCbDefinitionOther(`K`)} - }` - - return { - genericParams: `Q extends runtime.Types.Extensions.UserArgs['query'] = {}`, - params: `${allModelsParam} & ${concreteModelParams} & ${concreteOtherParams}`, - prismaNamespaceDefinitions, - } + return ` +interface TypeMapCb extends $Utils.Fn<{extArgs: $Extensions.Args}, $Utils.Record> { + returns: Prisma.TypeMap } -function clientExtensionsClientDefinition(this: PrismaClientClass) { - return { - genericParams: `C extends runtime.Types.Extensions.UserArgs['client'] = {}`, - params: `{ [K: symbol]: { ctx: runtime.Types.Extensions.GetClient, ExtArgs['client']> } }`, - } -} - -function clientExtensionsHookDefinition(this: PrismaClientClass, name: '$extends' | 'defineExtension') { - const result = clientExtensionsResultDefinition.call(this) - const model = clientExtensionsModelDefinition.call(this) - const client = clientExtensionsClientDefinition.call(this) - const query = clientExtensionsQueryDefinition.call(this) - const genericParams = [result.genericParams, model.genericParams, query.genericParams, client.genericParams] - const genericVars = genericParams.map((gp) => gp.replace(/ extends .*/g, ',')) - - return { - signature: `${name === 'defineExtension' ? name : `${name}: { extArgs: ExtArgs } & (`}< - ${genericParams.join(',\n ')}, - Args extends runtime.Types.Extensions.Args = runtime.Types.Extensions.InternalArgs, ${ - name === 'defineExtension' - ? ` - ExtArgs extends runtime.Types.Extensions.Args = runtime.Types.Extensions.DefaultArgs,` - : '' - } - >(extension: ((client: ${ - name === 'defineExtension' ? 'Prisma.DefaultPrismaClient' : 'this' - }) => { $extends: { extArgs: Args } }) | Prisma.ExtensionArgs< - ExtArgs, - ${genericVars.join('\n ').slice(0, -1)} - >) ${name === 'defineExtension' ? ':' : '=>'} ${ - name === 'defineExtension' - ? '(client: any) => PrismaClient' - : `runtime.Types.Extensions.GetClient & Args['result'] - model: ExtArgs['model'] & Record & Args['model'] - client: ExtArgs['client'] & Args['client'], - query: {} - }>, ExtArgs['client'] & Args['client']>` - }${name === 'defineExtension' ? '' : ')'};`, - prismaNamespaceDefinitions: `${query.prismaNamespaceDefinitions} -export type ExtensionArgs< - ExtArgs extends runtime.Types.Extensions.Args, - ${genericParams.join(',\n ')} -> = { - name?: string, - result?: R & ${result.params} - model?: M & ${model.params} - query?: ${query.params} - client?: C & ${client.params} -}`, - } +export type TypeMap = ${typeMap}` } function clientExtensionsDefinitions(this: PrismaClientClass) { - const define = clientExtensionsHookDefinition.bind(this)('defineExtension') - const extend = clientExtensionsHookDefinition.bind(this)('$extends') + const typeMap = clientTypeMapDefinition.call(this) + const define = ` export const defineExtension: $Extensions.ExtendsHook<'define', Prisma.TypeMapCb, $Extensions.DefaultArgs>` + const extend = ` $extends: $Extensions.ExtendsHook<'extends', Prisma.TypeMapCb, ExtArgs>` return { - prismaNamespaceDefinitions: ifExtensions( - ` -export function ${define.signature} -${extend.prismaNamespaceDefinitions}`, - '', - ), - prismaClientDefinitions: ifExtensions( - ` ${extend.signature} -`, - '', - ), + prismaNamespaceDefinitions: ` +${typeMap} +${define}`, + prismaClientDefinitions: `${extend}`, } } @@ -286,7 +117,7 @@ function batchingTransactionDefinition(this: PrismaClientClass) { ) .addGenericParameter(ts.genericParameter('P').extends(ts.array(ts.prismaPromise(ts.anyType)))) .addParameter(ts.parameter('arg', ts.arraySpread(ts.namedType('P')))) - .setReturnType(ts.promise(ts.namedType('UnwrapTuple').addGenericArgument(ts.namedType('P')))) + .setReturnType(ts.promise(ts.namedType('runtime.Types.Utils.UnwrapTuple').addGenericArgument(ts.namedType('P')))) if (this.dmmf.hasEnumInNamespace('TransactionIsolationLevel', 'prisma')) { const options = ts @@ -312,23 +143,11 @@ function interactiveTransactionDefinition(this: PrismaClientClass) { } const returnType = ts.promise(ts.namedType('R')) + const callbackType = ts .functionType() .addParameter( - ts.parameter( - 'prisma', - ts - .namedType('Omit') - .addGenericArgument(ts.namedType('this')) - .addGenericArgument( - ts - .unionType(ts.stringLiteral('$connect')) - .addVariant(ts.stringLiteral('$disconnect')) - .addVariant(ts.stringLiteral('$on')) - .addVariant(ts.stringLiteral('$transaction')) - .addVariant(ts.stringLiteral('$use')), - ), - ), + ts.parameter('prisma', ts.omit(ts.namedType('PrismaClient'), ts.namedType('runtime.ITXClientDenyList'))), ) .setReturnType(returnType) @@ -497,18 +316,11 @@ export class PrismaClient< U = 'log' extends keyof T ? T['log'] extends Array ? Prisma.GetEvents : never : never, GlobalReject extends Prisma.RejectOnNotFound | Prisma.RejectPerOperation | false | undefined = 'rejectOnNotFound' extends keyof T ? T['rejectOnNotFound'] - : false${ifExtensions( - `, - ExtArgs extends runtime.Types.Extensions.Args = runtime.Types.Extensions.DefaultArgs`, - '', - )} - > {${ifExtensions( - ` - + : false, + ExtArgs extends $Extensions.Args = $Extensions.DefaultArgs +> { [K: symbol]: { types: Prisma.TypeMap['other'] } -`, - '', - )} + ${indent(this.jsDoc, TAB_SIZE)} constructor(optionsArg ?: Prisma.Subset); @@ -526,6 +338,8 @@ export class PrismaClient< /** * Add a middleware + * @deprecated since 4.16.0. For new code, prefer client extensions instead. + * @see https://pris.ly/d/extensions */ $use(cb: Prisma.Middleware): void @@ -555,12 +369,7 @@ ${[ * const ${lowerCase(m.plural)} = await prisma.${methodName}.findMany() * \`\`\` */ -get ${methodName}(): ${ifExtensions( - `runtime.Types.Extensions.GetModel, ExtArgs['model']['${lowerCase(m.model)}']>`, - `Prisma.${m.model}Delegate`, - )};` +get ${methodName}(): Prisma.${m.model}Delegate;` }) .join('\n\n'), 2, @@ -710,7 +519,7 @@ export function getLogLevel(log: Array): LogLevel | un /** * \`PrismaClient\` proxy available in interactive transactions. */ -export type TransactionClient = Omit +export type TransactionClient = Omit ` } } diff --git a/packages/client/src/generation/TSClient/SelectInclude.ts b/packages/client/src/generation/TSClient/SelectInclude.ts index 9bb85e3726cf..d08cfb01fe79 100644 --- a/packages/client/src/generation/TSClient/SelectInclude.ts +++ b/packages/client/src/generation/TSClient/SelectInclude.ts @@ -4,7 +4,6 @@ import { DMMFHelper } from '../../runtime/dmmf' import { lowerCase } from '../../runtime/utils/common' import * as ts from '../ts-builders' import { getFieldArgName, getIncludeName, getSelectName } from '../utils' -import { ifExtensions } from './utils/ifExtensions' type BuildIncludeTypeParams = { modelName: string @@ -14,8 +13,8 @@ type BuildIncludeTypeParams = { const extArgsParameter = ts .genericParameter('ExtArgs') - .extends(ts.namedType('runtime.Types.Extensions.Args')) - .default(ts.namedType('runtime.Types.Extensions.DefaultArgs')) + .extends(ts.namedType('$Extensions.Args')) + .default(ts.namedType('$Extensions.DefaultArgs')) export function buildIncludeType({ modelName, dmmf, fields }: BuildIncludeTypeParams) { const type = buildSelectOrIncludeObject(modelName, getIncludeFields(fields, dmmf)) @@ -29,14 +28,11 @@ type BuildSelectTypeParams = { export function buildSelectType({ modelName, fields }: BuildSelectTypeParams) { const objectType = buildSelectOrIncludeObject(modelName, fields) - const selectType = ifExtensions( - () => - ts - .namedType('runtime.Types.Extensions.GetSelect') - .addGenericArgument(objectType) - .addGenericArgument(extArgsParameter.toArgument().subKey('result').subKey(lowerCase(modelName))), - () => objectType, - ) + const selectType = ts + .namedType('$Extensions.GetSelect') + .addGenericArgument(objectType) + .addGenericArgument(extArgsParameter.toArgument().subKey('result').subKey(lowerCase(modelName))) + return buildExport(getSelectName(modelName), selectType) } @@ -57,12 +53,8 @@ function buildSelectOrIncludeObject(modelName: string, fields: DMMF.SchemaField[ if (field.outputType.location === 'outputObjectTypes') { const subSelectType = ts.namedType(getFieldArgName(field, modelName)) - ifExtensions( - () => { - subSelectType.addGenericArgument(extArgsParameter.toArgument()) - }, - () => {}, - ) + subSelectType.addGenericArgument(extArgsParameter.toArgument()) + fieldType.addVariant(subSelectType) } objectType.add(ts.property(field.name, fieldType).optional()) @@ -72,12 +64,7 @@ function buildSelectOrIncludeObject(modelName: string, fields: DMMF.SchemaField[ function buildExport(typeName: string, type: ts.TypeBuilder) { const declaration = ts.typeDeclaration(typeName, type) - return ts.moduleExport( - ifExtensions( - () => declaration.addGenericParameter(extArgsParameter), - () => declaration, - ), - ) + return ts.moduleExport(declaration.addGenericParameter(extArgsParameter)) } function getIncludeFields(fields: DMMF.SchemaField[], dmmf: DMMFHelper) { diff --git a/packages/client/src/generation/TSClient/common.ts b/packages/client/src/generation/TSClient/common.ts index 7b26ed0cec80..b5e621bca038 100644 --- a/packages/client/src/generation/TSClient/common.ts +++ b/packages/client/src/generation/TSClient/common.ts @@ -2,7 +2,6 @@ import indent from 'indent-string' import { TAB_SIZE } from './constants' import type { TSClientOptions } from './TSClient' -import { ifExtensions } from './utils/ifExtensions' export const commonCodeJS = ({ runtimeDir, @@ -34,14 +33,16 @@ import { objectEnumValues, makeStrictEnum, Extensions, - defineDmmfProperty + defineDmmfProperty, + Public, } from '${runtimeDir}/edge-esm.js'` : browser ? ` const { Decimal, objectEnumValues, - makeStrictEnum + makeStrictEnum, + Public, } = require('${runtimeDir}/${runtimeName}') ` : ` @@ -65,6 +66,7 @@ const { Extensions, warnOnce, defineDmmfProperty, + Public, } = require('${runtimeDir}/${runtimeName}') ` } @@ -97,18 +99,14 @@ Prisma.sql = ${notSupportOnBrowser('sqltag', browser)} Prisma.empty = ${notSupportOnBrowser('empty', browser)} Prisma.join = ${notSupportOnBrowser('join', browser)} Prisma.raw = ${notSupportOnBrowser('raw', browser)} -Prisma.validator = () => (val) => val +Prisma.validator = Public.validator -${ifExtensions( - `/** +/** * Extensions */ Prisma.getExtensionContext = ${notSupportOnBrowser('Extensions.getExtensionContext', browser)} Prisma.defineExtension = ${notSupportOnBrowser('Extensions.defineExtension', browser)} -`, - '', -)} /** * Shorthand utilities for JSON filtering */ @@ -134,16 +132,21 @@ In case this error is unexpected for you, please report it in https://github.com export const commonCodeTS = ({ runtimeDir, runtimeName, clientVersion, engineVersion }: TSClientOptions) => ({ tsWithoutNamespace: () => `import * as runtime from '${runtimeDir}/${runtimeName}'; -type UnwrapPromise

= P extends Promise ? R : P -type UnwrapTuple = { - [K in keyof Tuple]: K extends \`\$\{number\}\` ? Tuple[K] extends Prisma.PrismaPromise ? X : UnwrapPromise : UnwrapPromise -}; +import $Types = runtime.Types // general types +import $Public = runtime.Types.Public +import $Utils = runtime.Types.Utils +import $Extensions = runtime.Types.Extensions -export type PrismaPromise = runtime.Types.Public.PrismaPromise +export type PrismaPromise = $Public.PrismaPromise `, ts: () => `export import DMMF = runtime.DMMF -export type PrismaPromise = runtime.Types.Public.PrismaPromise +export type PrismaPromise = $Public.PrismaPromise + +/** + * Validator + */ +export import validator = runtime.Public.validator /** * Prisma Errors @@ -179,20 +182,16 @@ export type Metric = runtime.Metric export type MetricHistogram = runtime.MetricHistogram export type MetricHistogramBucket = runtime.MetricHistogramBucket -${ifExtensions( - `/** +/** * Extensions */ -export type Extension = runtime.Types.Extensions.UserArgs +export type Extension = $Extensions.UserArgs export import getExtensionContext = runtime.Extensions.getExtensionContext -export type Args = runtime.Types.Public.Args -export type Payload = runtime.Types.Public.Payload -export type Result = runtime.Types.Public.Result -export type Exact = runtime.Types.Public.Exact +export type Args = $Public.Args +export type Payload = $Public.Payload +export type Result = $Public.Result +export type Exact = $Public.Exact -`, - '', -)} /** * Prisma Client JS version: ${clientVersion} * Query Engine version: ${engineVersion} @@ -533,7 +532,7 @@ type Cast = A extends B ? A : B; export const type: unique symbol; -export function validator(): (select: runtime.Types.Utils.LegacyExact) => S; + /** * Used by group by diff --git a/packages/client/src/generation/TSClient/helpers.ts b/packages/client/src/generation/TSClient/helpers.ts index 5a0b71459077..d8719afccde6 100644 --- a/packages/client/src/generation/TSClient/helpers.ts +++ b/packages/client/src/generation/TSClient/helpers.ts @@ -5,7 +5,6 @@ import { capitalize, lowerCase } from '../../runtime/utils/common' import { getAggregateArgsName, getModelArgName } from '../utils' import type { JSDocMethodBodyCtx } from './jsdoc' import { JSDocs } from './jsdoc' -import { ifExtensions } from './utils/ifExtensions' export function getMethodJSDocBody(action: DMMF.ModelAction, mapping: DMMF.ModelMapping, model: DMMF.Model): string { const ctx: JSDocMethodBodyCtx = { @@ -36,17 +35,17 @@ export function getGenericMethod(name: string, actionName: DMMF.ModelAction) { return '' } if (actionName === 'findFirst' || actionName === 'findUnique') { - return `', - '', - )}, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>` + return `, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>` } const modelArgName = getModelArgName(name, actionName) if (!modelArgName) { console.log({ name, actionName }) } - return `', '')}>` + return `>` } export function getArgs(modelName: string, actionName: DMMF.ModelAction) { if (actionName === 'count') { @@ -67,7 +66,7 @@ export function getArgs(modelName: string, actionName: DMMF.ModelAction) { actionName === DMMF.ModelAction.findFirstOrThrow ? '?' : '' - }: SelectSubset', '')}>` + }: SelectSubset>` } export function wrapComment(str: string): string { return `/**\n${str diff --git a/packages/client/src/generation/TSClient/utils/ifExtensions.ts b/packages/client/src/generation/TSClient/utils/ifExtensions.ts deleted file mode 100644 index ec2bc82b7379..000000000000 --- a/packages/client/src/generation/TSClient/utils/ifExtensions.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { TSClient } from '../TSClient' - -export function ifExtensions(_case: R | (() => R), _default: R | (() => R)): R { - if (TSClient.enabledPreviewFeatures.includes('clientExtensions')) { - return typeof _case === 'function' ? (_case as any)() : _case - } - - return typeof _default === 'function' ? (_default as any)() : _default -} diff --git a/packages/client/src/generation/ts-builders/Export.ts b/packages/client/src/generation/ts-builders/Export.ts index ef2794a6e046..8b1e6ecdc15b 100644 --- a/packages/client/src/generation/ts-builders/Export.ts +++ b/packages/client/src/generation/ts-builders/Export.ts @@ -1,10 +1,21 @@ import { AnyDeclarationBuilder } from './AnyDeclarationBuilder' import { BasicBuilder } from './BasicBuilder' +import { DocComment } from './DocComment' import { Writer } from './Writer' export class Export implements BasicBuilder { + private docComment?: DocComment constructor(private declaration: AnyDeclarationBuilder) {} + + setDocComment(docComment: DocComment): this { + this.docComment = docComment + return this + } + write(writer: Writer): void { + if (this.docComment) { + writer.write(this.docComment) + } writer.write('export ').write(this.declaration) } } diff --git a/packages/client/src/generation/ts-builders/NamedType.ts b/packages/client/src/generation/ts-builders/NamedType.ts index 208ddd971059..a4ceda180af6 100644 --- a/packages/client/src/generation/ts-builders/NamedType.ts +++ b/packages/client/src/generation/ts-builders/NamedType.ts @@ -24,11 +24,3 @@ export class NamedType extends TypeBuilder { export function namedType(name: string): NamedType { return new NamedType(name) } - -export function promise(resultType: TypeBuilder): NamedType { - return new NamedType('Promise').addGenericArgument(resultType) -} - -export function prismaPromise(resultType: TypeBuilder): NamedType { - return new NamedType('Prisma.PrismaPromise').addGenericArgument(resultType) -} diff --git a/packages/client/src/generation/ts-builders/ObjectType.ts b/packages/client/src/generation/ts-builders/ObjectType.ts index d3891f8460a9..158b9ee73768 100644 --- a/packages/client/src/generation/ts-builders/ObjectType.ts +++ b/packages/client/src/generation/ts-builders/ObjectType.ts @@ -16,6 +16,13 @@ export class ObjectType extends TypeBuilder { return this } + addMultiple(items: ObjectTypeItem[]): this { + for (const item of items) { + this.add(item) + } + return this + } + formatInline() { this.inline = true return this diff --git a/packages/client/src/generation/ts-builders/PrimitiveType.ts b/packages/client/src/generation/ts-builders/PrimitiveType.ts index b34cf712d2a2..e9839be37744 100644 --- a/packages/client/src/generation/ts-builders/PrimitiveType.ts +++ b/packages/client/src/generation/ts-builders/PrimitiveType.ts @@ -20,3 +20,4 @@ export const bigintType = new PrimitiveType('bigint') export const unknownType = new PrimitiveType('unknown') export const anyType = new PrimitiveType('any') export const voidType = new PrimitiveType('void') +export const thisType = new PrimitiveType('this') diff --git a/packages/client/src/generation/ts-builders/helpers.ts b/packages/client/src/generation/ts-builders/helpers.ts new file mode 100644 index 000000000000..8ee8da36bf65 --- /dev/null +++ b/packages/client/src/generation/ts-builders/helpers.ts @@ -0,0 +1,14 @@ +import { NamedType, namedType } from './NamedType' +import { TypeBuilder } from './TypeBuilder' + +export function omit(type: TypeBuilder, keyType: TypeBuilder): NamedType { + return namedType('Omit').addGenericArgument(type).addGenericArgument(keyType) +} + +export function promise(resultType: TypeBuilder): NamedType { + return new NamedType('Promise').addGenericArgument(resultType) +} + +export function prismaPromise(resultType: TypeBuilder): NamedType { + return new NamedType('Prisma.PrismaPromise').addGenericArgument(resultType) +} diff --git a/packages/client/src/generation/ts-builders/index.ts b/packages/client/src/generation/ts-builders/index.ts index dd77d6c28b98..61d5871826f5 100644 --- a/packages/client/src/generation/ts-builders/index.ts +++ b/packages/client/src/generation/ts-builders/index.ts @@ -5,6 +5,7 @@ export * from './DocComment' export * from './Export' export * from './FunctionType' export * from './GenericParameter' +export * from './helpers' export * from './Method' export * from './NamedType' export * from './ObjectType' diff --git a/packages/client/src/generation/utils.ts b/packages/client/src/generation/utils.ts index b29fedaa69ee..e1dacf87eb78 100644 --- a/packages/client/src/generation/utils.ts +++ b/packages/client/src/generation/utils.ts @@ -4,25 +4,12 @@ import path from 'path' import type { DMMFHelper } from '../runtime/dmmf' import { DMMF } from '../runtime/dmmf-types' -import { ifExtensions } from './TSClient/utils/ifExtensions' export enum Projection { select = 'select', include = 'include', } -export function getScalarsName(modelName: string): string { - return `${modelName}Scalars` -} - -export function getPayloadName(modelName: string): string { - return ifExtensions(`runtime.Types.GetResult`, `${modelName}GetPayload`) -} - -// export function getExtractName(modelName: string, projection: Projection) { -// return `Extract${modelName}${capitalize(projection)}` -// } - export function getSelectName(modelName: string): string { return `${modelName}Select` } @@ -140,7 +127,7 @@ export function getModelArgName(modelName: string, action?: DMMF.ModelAction): s case DMMF.ModelAction.deleteMany: return `${modelName}DeleteManyArgs` case DMMF.ModelAction.groupBy: - return `${modelName}GroupByArgs` + return getGroupByArgsName(modelName) case DMMF.ModelAction.aggregate: return getAggregateArgsName(modelName) case DMMF.ModelAction.count: @@ -257,42 +244,39 @@ export function getReturnType({ * Important: We handle findMany or isList special, as we don't want chaining from there */ if (isList || hideCondition) { - const listOpen = isList ? 'Array<' : '' - const listClose = isList ? '>' : '' const promiseOpen = renderPromise ? 'Prisma.PrismaPromise<' : '' const promiseClose = renderPromise ? '>' : '' - return `${promiseOpen}${ifExtensions('', listOpen)}${getPayloadName(name)}<${ifExtensions( - `${name}Payload, T, '${actionName}'`, - 'T', - )}>${ifExtensions('', listClose)}${isChaining ? '| Null' : ''}${promiseClose}` + return `${promiseOpen}$Types.GetResult<${name}Payload, T, '${actionName}', never>${ + isChaining ? '| Null' : '' + }${promiseClose}` } if (actionName === 'findFirstOrThrow' || actionName === 'findUniqueOrThrow') { return `Prisma__${name}Client<${getType( - getPayloadName(name) + `<${ifExtensions(`${name}Payload, T, '${actionName}'`, 'T')}>`, + `$Types.GetResult<${name}Payload, T, '${actionName}', never>`, isList, - )}${ifExtensions(', never, ExtArgs', '')}>` + )}, never, ExtArgs>` } if (actionName === 'findFirst' || actionName === 'findUnique') { if (isField) { return `Prisma__${name}Client<${getType( - getPayloadName(name) + `<${ifExtensions(`${name}Payload, T, '${actionName}'`, 'T')}>`, + `$Types.GetResult<${name}Payload, T, '${actionName}', never>`, isList, - )} | Null${ifExtensions(', never, ExtArgs', '')}>` + )} | Null, never, ExtArgs>` } return `HasReject extends True ? Prisma__${name}Client<${getType( - getPayloadName(name) + `<${ifExtensions(`${name}Payload, T, '${actionName}'`, 'T')}>`, + `$Types.GetResult<${name}Payload, T, '${actionName}', never>`, isList, - )}${ifExtensions(', never, ExtArgs', '')}> : Prisma__${name}Client<${getType( - getPayloadName(name) + `<${ifExtensions(`${name}Payload, T, '${actionName}'`, 'T')}>`, + )}, never, ExtArgs> : Prisma__${name}Client<${getType( + `$Types.GetResult<${name}Payload, T, '${actionName}', never>`, isList, - )} | null, null${ifExtensions(', ExtArgs', '')}>` + )} | null, null, ExtArgs>` } return `Prisma__${name}Client<${getType( - getPayloadName(name) + `<${ifExtensions(`${name}Payload, T, '${actionName}'`, 'T')}>`, + `$Types.GetResult<${name}Payload, T, '${actionName}', never>`, isList, - )}${ifExtensions(', never, ExtArgs', '')}>` + )}, never, ExtArgs>` } export function isQueryAction(action: DMMF.ModelAction, operation: 'query' | 'mutation'): boolean { diff --git a/packages/client/src/generation/utils/buildDirname.ts b/packages/client/src/generation/utils/buildDirname.ts index 611ca3521532..d805de3a35d6 100644 --- a/packages/client/src/generation/utils/buildDirname.ts +++ b/packages/client/src/generation/utils/buildDirname.ts @@ -34,10 +34,7 @@ const fs = require('fs') config.dirname = __dirname if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) { - warnOnce('bundled-warning-1', 'Your generated Prisma Client could not immediately find its \`schema.prisma\`, falling back to finding it via the current working directory.') - warnOnce('bundled-warning-2', 'We are interested in learning about your project setup. We\\'d appreciate if you could take the time to share some information with us.') - warnOnce('bundled-warning-3', 'Please help us by answering a few questions: https://pris.ly/bundler-investigation') -config.dirname = path.join(process.cwd(), ${JSON.stringify(pathToPosix(relativeOutdir))}) + config.dirname = path.join(process.cwd(), ${JSON.stringify(pathToPosix(relativeOutdir))}) config.isBundled = true }` } diff --git a/packages/client/src/runtime/DataLoader.ts b/packages/client/src/runtime/DataLoader.ts index 33b728ddf70c..57fe98638faa 100644 --- a/packages/client/src/runtime/DataLoader.ts +++ b/packages/client/src/runtime/DataLoader.ts @@ -8,6 +8,9 @@ export type DataLoaderOptions = { singleLoader: (request: T) => Promise batchLoader: (request: T[]) => Promise batchBy: (request: T) => string | undefined + // Specifies the order in which requests in a batch would + // be sorted. See Array.prototype.sort callback + batchOrder: (requestA: T, requestB: T) => number } export class DataLoader { @@ -65,6 +68,7 @@ export class DataLoader { batch[0].reject(e) }) } else { + batch.sort((a, b) => this.options.batchOrder(a.request, b.request)) this.options .batchLoader(batch.map((j) => j.request)) .then((results) => { diff --git a/packages/client/src/runtime/RequestHandler.ts b/packages/client/src/runtime/RequestHandler.ts index 5cb3bc5a6f37..e17231e8f1cb 100644 --- a/packages/client/src/runtime/RequestHandler.ts +++ b/packages/client/src/runtime/RequestHandler.ts @@ -16,15 +16,17 @@ import { PrismaClientRustPanicError, PrismaClientUnknownRequestError, } from '.' +import { QueryEngineResult } from './core/engines/common/types/QueryEngine' import { throwValidationException } from './core/errorRendering/throwValidationException' import { hasBatchIndex } from './core/errors/ErrorWithBatchIndex' +import { createApplyBatchExtensionsFunction } from './core/extensions/applyQueryExtensions' import { applyResultExtensions } from './core/extensions/applyResultExtensions' import { MergedExtensionsList } from './core/extensions/MergedExtensionsList' import { visitQueryResult } from './core/extensions/visitQueryResult' import { dmmfToJSModelName } from './core/model/utils/dmmfToJSModelName' import { ProtocolEncoder, ProtocolMessage } from './core/protocol/common' import { PrismaPromiseInteractiveTransaction, PrismaPromiseTransaction } from './core/request/PrismaPromise' -import { JsArgs } from './core/types/JsApi' +import { Action, JsArgs } from './core/types/JsApi' import { DataLoader } from './DataLoader' import type { Client, Unpacker } from './getPrismaClient' import { CallSite } from './utils/CallSite' @@ -35,6 +37,7 @@ const debug = Debug('prisma:client:request_handler') export type RequestParams = { modelName?: string + action: Action protocolMessage: ProtocolMessage protocolEncoder: ProtocolEncoder dataPath: string[] @@ -59,15 +62,6 @@ export type HandleErrorParams = { transaction?: PrismaPromiseTransaction } -export type Request = { - protocolMessage: ProtocolMessage - protocolEncoder: ProtocolEncoder - transaction?: PrismaPromiseTransaction - otelParentCtx?: Context - otelChildCtx?: Context - customDataProxyFetch?: (fetch: Fetch) => Fetch -} - type ApplyExtensionsParams = { result: object modelName: string @@ -77,14 +71,15 @@ type ApplyExtensionsParams = { export class RequestHandler { client: Client - dataloader: DataLoader + dataloader: DataLoader private logEmitter?: EventEmitter constructor(client: Client, logEmitter?: EventEmitter) { this.logEmitter = logEmitter this.client = client + this.dataloader = new DataLoader({ - batchLoader: (requests) => { + batchLoader: createApplyBatchExtensionsFunction(async ({ requests, customDataProxyFetch }) => { const { transaction, protocolEncoder, otelParentCtx } = requests[0] const queries = protocolEncoder.createBatch(requests.map((r) => r.protocolMessage)) const traceparent = this.client._tracingHelper.getTraceParent(otelParentCtx) @@ -94,24 +89,39 @@ export class RequestHandler { const containsWrite = requests.some((r) => r.protocolMessage.isWrite()) - return this.client._engine.requestBatch(queries, { + const results = await this.client._engine.requestBatch(queries, { traceparent, transaction: getTransactionOptions(transaction), containsWrite, - customDataProxyFetch: requests[0].customDataProxyFetch, + customDataProxyFetch, }) - }, - singleLoader: (request) => { + + return results.map((result, i) => { + if (result instanceof Error) { + return result + } + + try { + return this.mapQueryEngineResult(requests[i], result) + } catch (error) { + return error + } + }) + }), + + singleLoader: async (request) => { const interactiveTransaction = request.transaction?.kind === 'itx' ? getItxTransactionOptions(request.transaction) : undefined - return this.client._engine.request(request.protocolMessage.toEngineQuery(), { + const response = await this.client._engine.request(request.protocolMessage.toEngineQuery(), { traceparent: this.client._tracingHelper.getTraceParent(), interactiveTransaction, isWrite: request.protocolMessage.isWrite(), customDataProxyFetch: request.customDataProxyFetch, }) + return this.mapQueryEngineResult(request, response) }, + batchBy: (request) => { if (request.transaction?.id) { return `transaction-${request.transaction.id}` @@ -119,54 +129,47 @@ export class RequestHandler { return request.protocolMessage.getBatchId() }, + + batchOrder(requestA, requestB) { + if (requestA.transaction?.kind === 'batch' && requestB.transaction?.kind === 'batch') { + return requestA.transaction.index - requestB.transaction.index + } + return 0 + }, }) } - async request({ - protocolMessage, - protocolEncoder, - dataPath = [], - callsite, - modelName, - rejectOnNotFound, - clientMethod, - args, - transaction, - unpacker, - extensions, - otelParentCtx, - otelChildCtx, - customDataProxyFetch, - }: RequestParams) { + async request(params: RequestParams) { try { - const response = await this.dataloader.request({ - protocolMessage, - protocolEncoder, - transaction, - otelParentCtx, - otelChildCtx, - customDataProxyFetch, - }) - const data = response?.data - const elapsed = response?.elapsed - - /** - * Unpack - */ - let result = this.unpack(protocolMessage, data, dataPath, unpacker) - throwIfNotFound(result, clientMethod, modelName, rejectOnNotFound) - if (modelName) { - result = this.applyResultExtensions({ result, modelName, args, extensions }) - } - if (process.env.PRISMA_CLIENT_GET_TIME) { - return { data: result, elapsed } - } + const result = await this.dataloader.request(params) + throwIfNotFound(result, params.clientMethod, params.modelName, params.rejectOnNotFound) return result } catch (error) { + const { clientMethod, callsite, transaction, args } = params this.handleAndLogRequestError({ error, clientMethod, callsite, transaction, args }) } } + mapQueryEngineResult( + { protocolMessage, dataPath, unpacker, modelName, args, extensions }: RequestParams, + response: QueryEngineResult, + ) { + const data = response?.data + const elapsed = response?.elapsed + + /** + * Unpack + */ + let result = this.unpack(protocolMessage, data, dataPath, unpacker) + if (modelName) { + result = this.applyResultExtensions({ result, modelName, args, extensions }) + } + if (process.env.PRISMA_CLIENT_GET_TIME) { + return { data: result, elapsed } + } + return result + } + /** * Handles the error and logs it, logging the error is done synchronously waiting for the event * handlers to finish. diff --git a/packages/client/src/runtime/core/compositeProxy/createCompositeProxy.ts b/packages/client/src/runtime/core/compositeProxy/createCompositeProxy.ts index bb1cc88555f0..cbb47fdb0783 100644 --- a/packages/client/src/runtime/core/compositeProxy/createCompositeProxy.ts +++ b/packages/client/src/runtime/core/compositeProxy/createCompositeProxy.ts @@ -6,7 +6,7 @@ export interface CompositeProxyLayer /** * Returns a value for a property for a given key (one of the keys, returned @@ -90,6 +90,12 @@ export function createCompositeProxy(target: T, layers: Compos }, getOwnPropertyDescriptor(target, prop) { + const original = Reflect.getOwnPropertyDescriptor(target, prop) + if (original && !original.configurable) { + // non-configurable properties can not change descriptors + return original + } + const layer = keysToLayerMap.get(prop) if (layer) { if (layer.getPropertyDescriptor) { @@ -101,7 +107,7 @@ export function createCompositeProxy(target: T, layers: Compos return defaultPropertyDescriptor } - return Reflect.getOwnPropertyDescriptor(target, prop) + return original }, defineProperty(target, property, attributes) { diff --git a/packages/client/src/runtime/core/compositeProxy/removeProperties.ts b/packages/client/src/runtime/core/compositeProxy/removeProperties.ts index 2a847ce8f091..188841784f3b 100644 --- a/packages/client/src/runtime/core/compositeProxy/removeProperties.ts +++ b/packages/client/src/runtime/core/compositeProxy/removeProperties.ts @@ -1,6 +1,6 @@ import { CompositeProxyLayer } from './createCompositeProxy' -export function removeProperties(keys: (string | symbol)[]): CompositeProxyLayer { +export function removeProperties(keys: ReadonlyArray): CompositeProxyLayer { return { getKeys() { return keys diff --git a/packages/client/src/runtime/core/engines/binary/BinaryEngine.ts b/packages/client/src/runtime/core/engines/binary/BinaryEngine.ts index eeb5f22d139d..79d551e9bc98 100644 --- a/packages/client/src/runtime/core/engines/binary/BinaryEngine.ts +++ b/packages/client/src/runtime/core/engines/binary/BinaryEngine.ts @@ -209,7 +209,7 @@ You may have to run ${green('prisma generate')} for your changes to take effect. const runningEngines = engines.filter((e) => e.child) if (runningEngines.length === 10) { console.warn( - `${bold(yellow('warn(prisma-client)'))} There are already 10 instances of Prisma Client actively running.`, + `${bold(yellow('warn(prisma-client)'))} This is the 10th instance of Prisma Client being started. Make sure this is intentional.`, ) } } diff --git a/packages/client/src/runtime/core/engines/common/types/JsonProtocol.ts b/packages/client/src/runtime/core/engines/common/types/JsonProtocol.ts index bd491db289a3..e1ce243a1c00 100644 --- a/packages/client/src/runtime/core/engines/common/types/JsonProtocol.ts +++ b/packages/client/src/runtime/core/engines/common/types/JsonProtocol.ts @@ -57,7 +57,7 @@ export type DateTaggedValue = { $type: 'DateTime'; value: string } export type DecimalTaggedValue = { $type: 'Decimal'; value: string } export type BytesTaggedValue = { $type: 'Bytes'; value: string } export type BigIntTaggedValue = { $type: 'BigInt'; value: string } -export type FieldRefTaggedValue = { $type: 'FieldRef'; value: { _ref: string } } +export type FieldRefTaggedValue = { $type: 'FieldRef'; value: { _ref: string; _container: string } } export type EnumTaggedValue = { $type: 'Enum'; value: string } export type JsonTaggedValue = { $type: 'Json'; value: string } diff --git a/packages/client/src/runtime/core/engines/library/LibraryEngine.ts b/packages/client/src/runtime/core/engines/library/LibraryEngine.ts index dcf627207a43..eed61897a8ff 100644 --- a/packages/client/src/runtime/core/engines/library/LibraryEngine.ts +++ b/packages/client/src/runtime/core/engines/library/LibraryEngine.ts @@ -137,7 +137,7 @@ Please help us by answering a few questions: https://pris.ly/bundler-investigati private checkForTooManyEngines() { if (engineInstanceCount === 10) { - console.warn(`${yellow('warn(prisma-client)')} There are already 10 instances of Prisma Client actively running.`) + console.warn(`${yellow('warn(prisma-client)')} This is the 10th instance of Prisma Client being started. Make sure this is intentional.`) } } diff --git a/packages/client/src/runtime/core/errorRendering/applyUnionError.ts b/packages/client/src/runtime/core/errorRendering/applyUnionError.ts new file mode 100644 index 000000000000..2f254daee3c8 --- /dev/null +++ b/packages/client/src/runtime/core/errorRendering/applyUnionError.ts @@ -0,0 +1,143 @@ +import { maxWithComparator } from '@prisma/internals' + +import { EngineValidationError, InvalidArgumentTypeError, UnionError } from '../engines' +import { applyValidationError } from './applyValidationError' +import { ArgumentsRenderingTree } from './ArgumentsRenderingTree' + +type NonUnionError = Exclude + +/** + * When a particular field has multiple allowed types on the schema level + * and none of them match users input, engine returns special kind of error: UnionError. + * This error acts as a container for individual errors for each non-matching type. + * In that case, we need to make a guess which of the errors corresponds users intent the most. + * General algorithm of processing them is the following: + * - flatten all nested errors and get a single list of all possible errors + * - merge individual InvalidArgumentType errors at the same path + * - pick the best error based on combined argument and selection paths length and type of the error. + * + * For details of each step, see other comments in this file. + * @param error + * @param args + */ +export function applyUnionError(error: UnionError, args: ArgumentsRenderingTree) { + const allErrors = flattenUnionError(error) + const merged = mergeInvalidArgumentTypeErrors(allErrors) + const bestError = getBestScoringError(merged) + if (bestError) { + applyValidationError(bestError, args) + } else { + args.addErrorMessage(() => 'Unknown error') + } +} + +function flattenUnionError(error: UnionError): NonUnionError[] { + return error.errors.flatMap((error) => { + if (error.kind === 'Union') { + return flattenUnionError(error) + } + return [error] + }) +} + +/** + * Iterates over provided error list and merges all InvalidArgumentType + * with matching selectionPath and argumentPath into one. For example, + * if the list has an error, saying that `where.arg` does not match `Int` + * and another, saying that `where.arg` does not match IntFilter, resulting + * list will contain a single error for `where.arg` saying it does not + * match `Int | IntFilter` + * @param errorList + * @returns + */ +function mergeInvalidArgumentTypeErrors(errorList: NonUnionError[]) { + const invalidArgsError = new Map() + const result: NonUnionError[] = [] + + for (const error of errorList) { + if (error.kind !== 'InvalidArgumentType') { + result.push(error) + continue + } + + const key = `${error.selectionPath.join('.')}:${error.argumentPath.join('.')}` + const prevError = invalidArgsError.get(key) + if (!prevError) { + invalidArgsError.set(key, error) + } else { + invalidArgsError.set(key, { + ...error, + argument: { + ...error.argument, + typeNames: prevError.argument.typeNames.concat(error.argument.typeNames), + }, + }) + } + } + + result.push(...invalidArgsError.values()) + return result +} + +/** + * Function that attempts to pick the best error from the list + * by ranking them. In most cases, highest ranking error would be the one + * which has the longest combined "selectionPath" + "argumentPath". Justification + * for that is that type that made it deeper into validation tree before failing + * is probably closer to the one user actually wanted to do. + * + * However, if two errors are at the same depth level, we introduce additional ranking based + * on error type. See `getErrorTypeScore` function for details + * @param errors + * @returns + */ +function getBestScoringError(errors: NonUnionError[]) { + return maxWithComparator(errors, (errorA, errorB) => { + const aPathLength = getCombinedPathLength(errorA) + const bPathLength = getCombinedPathLength(errorB) + if (aPathLength !== bPathLength) { + return aPathLength - bPathLength + } + return getErrorTypeScore(errorA) - getErrorTypeScore(errorB) + }) +} + +function getCombinedPathLength(error: EngineValidationError) { + let score = 0 + if (Array.isArray(error['selectionPath'])) { + score += error['selectionPath'].length + } + + if (Array.isArray(error['argumentPath'])) { + score += error['argumentPath'].length + } + return score +} + +/** + * Function is invoked to determine most relevant error based on its type. + * Specific numbers returned from this function do not really matter, it's only + * important how they compare relatively to each other. + * + * Current logic is: + * - InvalidArgumentValue/ValueTooLarge is treated as the best possible error to display + * since when it is present we know that the field causing the error is defined on the schema + * and provided value has correct type, it's just that value violates some other constraint. + * - Next candidate is `InvalidArgumentType` error. We know the field user specified can exists in + * this spot, it's just that value provided has incorrect type. + * - All other engine-side errors follow. At that point it's difficult to say which of them is more relevant, + * so we treat them equally. We might adjust this logic in the future. + * @param error + * @returns + */ +function getErrorTypeScore(error: EngineValidationError): number { + switch (error.kind) { + case 'InvalidArgumentValue': + case 'ValueTooLarge': + return 20 + case 'InvalidArgumentType': + return 10 + default: + return 0 + } +} diff --git a/packages/client/src/runtime/core/errorRendering/applyValidationError.test.ts b/packages/client/src/runtime/core/errorRendering/applyValidationError.test.ts index 77e9b62ee3f1..5034dee791ed 100644 --- a/packages/client/src/runtime/core/errorRendering/applyValidationError.test.ts +++ b/packages/client/src/runtime/core/errorRendering/applyValidationError.test.ts @@ -2288,7 +2288,7 @@ describe('Union', () => { kind: 'InvalidArgumentType', selectionPath: [], argumentPath: ['where', 'email'], - argument: { name: 'gt', typeNames: ['String'] }, + argument: { name: 'email', typeNames: ['String'] }, inferredType: 'Int', }, @@ -2316,7 +2316,7 @@ describe('Union', () => { } } - Argument \`gt\`: Invalid value provided. Expected String or StringFilter, provided Int. + Argument \`email\`: Invalid value provided. Expected String or StringFilter, provided Int. ------------------------------------ @@ -2329,10 +2329,71 @@ describe('Union', () => { } } - Argument \`gt\`: Invalid value provided. Expected String or StringFilter, provided Int. + Argument \`email\`: Invalid value provided. Expected String or StringFilter, provided Int. `) }) + + test('same length path, different error types', () => { + expect( + renderError( + { + kind: 'Union', + errors: [ + { + kind: 'RequiredArgumentMissing', + selectionPath: [], + argumentPath: ['data', 'profile'], + inputTypes: [ + { + kind: 'object', + name: 'ProfileCreateInput', + fields: [{ name: 'create', typeNames: ['ProfileUniqueInput'], required: true }], + }, + ], + }, + + { + kind: 'InvalidArgumentType', + selectionPath: [], + argumentPath: ['data', 'email'], + argument: { name: 'email', typeNames: ['String'] }, + inferredType: 'Int', + }, + ], + }, + { + data: { email: 123 }, + }, + ), + ).toMatchInlineSnapshot(` + + Colorless: + + { + data: { + email: 123 + ~~~ + } + } + + Argument \`email\`: Invalid value provided. Expected String, provided Int. + + ------------------------------------ + + Colored: + + { + data: { + email: 123 + ~~~ + } + } + + Argument \`email\`: Invalid value provided. Expected String, provided Int. + + `) + }) }) describe('SomeFieldsMissing', () => { diff --git a/packages/client/src/runtime/core/errorRendering/applyValidationError.ts b/packages/client/src/runtime/core/errorRendering/applyValidationError.ts index 7f6f01aa1b66..f47bcc2640ce 100644 --- a/packages/client/src/runtime/core/errorRendering/applyValidationError.ts +++ b/packages/client/src/runtime/core/errorRendering/applyValidationError.ts @@ -1,4 +1,3 @@ -import { maxBy } from '@prisma/internals' import levenshtein from 'js-levenshtein' import { @@ -11,13 +10,13 @@ import { RequiredArgumentMissingError, SomeFieldsMissingError, TooManyFieldsGivenError, - UnionError, UnknownArgumentError, UnknownInputFieldError, UnknownSelectionFieldError, ValueTooLargeError, } from '../engines' import { IncludeAndSelectError, IncludeOnScalarError, ValidationError } from '../types/ValidationError' +import { applyUnionError } from './applyUnionError' import { ArgumentsRenderingTree } from './ArgumentsRenderingTree' import { Colors } from './base' import { ObjectField } from './ObjectField' @@ -429,73 +428,6 @@ function applyTooManyFieldsGivenError(error: TooManyFieldsGivenError, args: Argu }) } -function applyUnionError(error: UnionError, args: ArgumentsRenderingTree) { - const bestError = getBestUnionError(error) - if (bestError) { - applyValidationError(bestError, args) - } else { - args.addErrorMessage(() => 'Unknown error') - } -} - -function getBestUnionError(error: UnionError) { - return tryMergingUnionError(error) ?? getLongestPathError(error) -} - -function tryMergingUnionError({ errors }: UnionError): InvalidArgumentTypeError | undefined { - if (errors.length === 0 || errors[0].kind !== 'InvalidArgumentType') { - return undefined - } - const result = { ...errors[0], argument: { ...errors[0].argument } } - for (let i = 1; i < errors.length; i++) { - const nextError = errors[i] - if (nextError.kind !== 'InvalidArgumentType') { - return undefined - } - - if (!isSamePath(nextError.selectionPath, result.selectionPath)) { - return undefined - } - - if (!isSamePath(nextError.argumentPath, result.argumentPath)) { - return undefined - } - - result.argument.typeNames = result.argument.typeNames.concat(nextError.argument.typeNames) - } - - return result -} - -function isSamePath(pathA: string[], pathB: string[]): boolean { - if (pathA.length !== pathB.length) { - return false - } - for (let i = 0; i < pathA.length; i++) { - if (pathA[i] !== pathB[i]) { - return false - } - } - return true -} - -function getLongestPathError(error: UnionError) { - return maxBy(error.errors, (error) => { - if (error.kind === 'Union') { - error = getBestUnionError(error) ?? error - } - let score = 0 - if (Array.isArray(error['selectionPath'])) { - score += error['selectionPath'].length - } - - if (Array.isArray(error['argumentPath'])) { - score += error['argumentPath'].length - } - return score - }) -} - function addSelectionSuggestions(selection: ObjectValue, outputType: OutputTypeDescription) { for (const field of outputType.fields) { if (!selection.hasField(field.name)) { diff --git a/packages/client/src/runtime/core/errors/PrismaClientInitializationError.ts b/packages/client/src/runtime/core/errors/PrismaClientInitializationError.ts index db7d9182c34d..8ec3e999d9b9 100644 --- a/packages/client/src/runtime/core/errors/PrismaClientInitializationError.ts +++ b/packages/client/src/runtime/core/errors/PrismaClientInitializationError.ts @@ -7,6 +7,8 @@ export class PrismaClientInitializationError extends Error { constructor(message: string, clientVersion: string, errorCode?: string) { super(message) + this.name = "PrismaClientInitializationError" + this.clientVersion = clientVersion this.errorCode = errorCode Error.captureStackTrace(PrismaClientInitializationError) diff --git a/packages/client/src/runtime/core/errors/PrismaClientKnownRequestError.ts b/packages/client/src/runtime/core/errors/PrismaClientKnownRequestError.ts index c4e2fab8de13..c702df92c0b3 100644 --- a/packages/client/src/runtime/core/errors/PrismaClientKnownRequestError.ts +++ b/packages/client/src/runtime/core/errors/PrismaClientKnownRequestError.ts @@ -17,7 +17,8 @@ export class PrismaClientKnownRequestError extends Error implements ErrorWithBat constructor(message: string, { code, clientVersion, meta, batchRequestIdx }: KnownErrorParams) { super(message) - + this.name = "PrismaClientKnownRequestError" + this.code = code this.clientVersion = clientVersion this.meta = meta diff --git a/packages/client/src/runtime/core/errors/PrismaClientRustPanicError.ts b/packages/client/src/runtime/core/errors/PrismaClientRustPanicError.ts index 4e7f1e346a29..01978fd3ea55 100644 --- a/packages/client/src/runtime/core/errors/PrismaClientRustPanicError.ts +++ b/packages/client/src/runtime/core/errors/PrismaClientRustPanicError.ts @@ -5,7 +5,8 @@ export class PrismaClientRustPanicError extends Error { constructor(message: string, clientVersion: string) { super(message) - + this.name = "PrismaClientRustPanicError" + this.clientVersion = clientVersion } get [Symbol.toStringTag]() { diff --git a/packages/client/src/runtime/core/extensions/$extends.ts b/packages/client/src/runtime/core/extensions/$extends.ts index 961fc384edbd..1c0b909d7f45 100644 --- a/packages/client/src/runtime/core/extensions/$extends.ts +++ b/packages/client/src/runtime/core/extensions/$extends.ts @@ -1,12 +1,15 @@ import { Client } from '../../getPrismaClient' -import { PrismaClientValidationError } from '../../query' +import { RequestParams } from '../../RequestHandler' +import type { Fetch, IsolationLevel } from '../engines' import { applyModelsAndClientExtensions, - unapplyModelsAndClientExtensions, + unApplyModelsAndClientExtensions, } from '../model/applyModelsAndClientExtensions' -import { OptionalFlat } from '../types/Utils' +import { RawQueryArgs } from '../raw-query/RawQueryArgs' +import { JsArgs } from '../types/JsApi' +import { Optional } from '../types/Utils' -export type Args = OptionalFlat +export type Args = Optional export type RequiredArgs = NameArgs & ResultArgs & ModelArgs & ClientArgs & QueryOptions type NameArgs = { @@ -30,14 +33,14 @@ export type ResultFieldDefinition = { compute: ResultArgsFieldCompute } -type ModelArgs = { +export type ModelArgs = { model: { [ModelName in string]: ModelArg } } export type ModelArg = { - [MethodName in string]: Function + [MethodName in string]: unknown } type ClientArgs = { @@ -45,25 +48,65 @@ type ClientArgs = { } export type ClientArg = { - [MethodName in string]: Function + [MethodName in string]: unknown } type QueryOptionsCbArgs = { model?: string operation: string - args: object - query: (args: object) => Promise + args: JsArgs | RawQueryArgs + query: (args: JsArgs | RawQueryArgs) => Promise +} + +type ModelQueryOptionsCbArgs = { + model: string + operation: string + args: JsArgs + query: (args: JsArgs) => Promise +} + +type BatchQuery = { + model: string | undefined + operation: string + args: JsArgs | RawQueryArgs +} + +type BatchArgs = { + queries: BatchQuery[] + transaction?: { isolationLevel?: IsolationLevel } +} + +export type BatchInternalParams = { + requests: RequestParams[] + customDataProxyFetch?: CustomDataProxyFetch +} + +export type CustomDataProxyFetch = (fetch: Fetch) => Fetch + +type BatchQueryOptionsCbArgs = { + args: BatchArgs + // TODO: hide internalParams before making batch api public + query: (args: BatchArgs, __internalParams?: BatchInternalParams) => Promise + __internalParams: BatchInternalParams } export type QueryOptionsCb = (args: QueryOptionsCbArgs) => Promise +export type ModelQueryOptionsCb = (args: ModelQueryOptionsCbArgs) => Promise +export type BatchQueryOptionsCb = (args: BatchQueryOptionsCbArgs) => Promise type QueryOptions = { query: { [ModelName in string]: | { - [ModelAction in string]: QueryOptionsCb + [ModelAction in string]: ModelQueryOptionsCb } - | QueryOptionsCb // for "other" queries (eg. raw queries) + | QueryOptionsCb // for all queries (eg. raw queries) + } +} + +export type QueryOptionsPrivate = QueryOptions & { + query?: { + $__internalBatch?: BatchQueryOptionsCb } } @@ -72,24 +115,20 @@ type QueryOptions = { * @param this */ export function $extends(this: Client, extension: Args | ((client: Client) => Client)): Client { - if (!this._hasPreviewFlag('clientExtensions')) { - throw new PrismaClientValidationError( - 'Extensions are not yet generally available, please add `clientExtensions` to the `previewFeatures` field in the `generator` block in the `schema.prisma` file.', - ) - } - if (typeof extension === 'function') { return extension(this) } // re-apply models to the extend client: they always capture specific instance // of the client and without re-application they would not see new extensions - const oldClient = unapplyModelsAndClientExtensions(this) + const oldClient = unApplyModelsAndClientExtensions(this) const newClient = Object.create(oldClient, { _extensions: { value: this._extensions.append(extension), }, - }) + $use: { value: undefined }, + $on: { value: undefined }, + }) as Client return applyModelsAndClientExtensions(newClient) } diff --git a/packages/client/src/runtime/core/extensions/MergedExtensionsList.ts b/packages/client/src/runtime/core/extensions/MergedExtensionsList.ts index f6d23be1da13..8f965ba97cee 100644 --- a/packages/client/src/runtime/core/extensions/MergedExtensionsList.ts +++ b/packages/client/src/runtime/core/extensions/MergedExtensionsList.ts @@ -1,7 +1,7 @@ import { Cache } from '../../../generation/Cache' import { lazyProperty } from '../../../generation/lazyProperty' import { dmmfToJSModelName } from '../model/utils/dmmfToJSModelName' -import { Args, ClientArg, ModelArg, QueryOptionsCb } from './$extends' +import { Args, BatchQueryOptionsCb, ClientArg, ModelArg, QueryOptionsCb, QueryOptionsPrivate } from './$extends' import { ComputedFieldsMap, getComputedFields } from './resultUtils' class MergedExtensionsListNode { @@ -20,6 +20,15 @@ class MergedExtensionsListNode { } }) + private batchCallbacks = lazyProperty(() => { + const previous: BatchQueryOptionsCb[] = this.previous?.getAllBatchQueryCallbacks() ?? [] + const newCb = (this.extension as QueryOptionsPrivate).query?.$__internalBatch + if (!newCb) { + return previous + } + return previous.concat(newCb) + }) + constructor(public extension: Args, public previous?: MergedExtensionsListNode) {} getAllComputedFields(dmmfModelName: string): ComputedFieldsMap | undefined { @@ -47,13 +56,13 @@ class MergedExtensionsListNode { }) } - getAllQueryCallbacks(jsModelName: string, operation: string) { + getAllQueryCallbacks(jsModelName: string | '$none', operation: string) { return this.queryCallbacksCache.getOrCreate(`${jsModelName}:${operation}`, () => { const prevCbs = this.previous?.getAllQueryCallbacks(jsModelName, operation) ?? [] const newCbs: QueryOptionsCb[] = [] const query = this.extension.query - if (!query || !(query[jsModelName] || query.$allModels || query[operation])) { + if (!query || !(query[jsModelName] || query['$allModels'] || query[operation] || query['$allOperations'])) { return prevCbs } @@ -69,7 +78,8 @@ class MergedExtensionsListNode { } // when the extension isn't model-bound, apply it to all models - if (query['$allModels'] !== undefined) { + // '$none' is a special case for top-level operations without model + if (jsModelName !== '$none' && query['$allModels'] !== undefined) { if (query['$allModels'][operation] !== undefined) { newCbs.push(query['$allModels'][operation]) } @@ -85,17 +95,28 @@ class MergedExtensionsListNode { newCbs.push(query[operation] as QueryOptionsCb) } + // when the extension is not bound to a model & is any top-level operation + if (query['$allOperations'] !== undefined) { + newCbs.push(query['$allOperations'] as QueryOptionsCb) + } + return prevCbs.concat(newCbs) }) } + + getAllBatchQueryCallbacks() { + return this.batchCallbacks.get() + } } /** - * Class that holds the list of all extensions, applied to particular instance, as well - * as resolved versions of the components that need to apply on different levels. Main idea - * of this class: avoid re-resolving as much of the stuff as possible when new extensions are added while also - * delaying the resolve until the point it is actually needed. For example, computed fields of the model won't be resolved unless - * the model is actually queried. Neither adding extensions with `client` component only cause other components to + * Class that holds the list of all extensions, applied to particular instance, + * as well as resolved versions of the components that need to apply on + * different levels. Main idea of this class: avoid re-resolving as much of the + * stuff as possible when new extensions are added while also delaying the + * resolve until the point it is actually needed. For example, computed fields + * of the model won't be resolved unless the model is actually queried. Neither + * adding extensions with `client` component only cause other components to * recompute. */ export class MergedExtensionsList { @@ -132,4 +153,8 @@ export class MergedExtensionsList { getAllQueryCallbacks(jsModelName: string, operation: string) { return this.head?.getAllQueryCallbacks(jsModelName, operation) ?? [] } + + getAllBatchQueryCallbacks() { + return this.head?.getAllBatchQueryCallbacks() ?? [] + } } diff --git a/packages/client/src/runtime/core/extensions/applyQueryExtensions.ts b/packages/client/src/runtime/core/extensions/applyQueryExtensions.ts index aa6906ea4130..1903a552a82b 100644 --- a/packages/client/src/runtime/core/extensions/applyQueryExtensions.ts +++ b/packages/client/src/runtime/core/extensions/applyQueryExtensions.ts @@ -1,8 +1,7 @@ -import { klona } from 'klona' - import { Client, InternalRequestParams } from '../../getPrismaClient' -import { createPrismaPromise } from '../request/createPrismaPromise' -import { QueryOptionsCb } from './$extends' +import { RequestParams } from '../../RequestHandler' +import { deepCloneArgs } from '../../utils/deepCloneArgs' +import { BatchInternalParams, BatchQueryOptionsCb, CustomDataProxyFetch, QueryOptionsCb } from './$extends' function iterateAndCallQueryCallbacks( client: Client, @@ -10,13 +9,13 @@ function iterateAndCallQueryCallbacks( queryCbs: QueryOptionsCb[], i = 0, ) { - return createPrismaPromise((transaction) => { + return client._createPrismaPromise((transaction) => { // we need to keep track of the previous customDataProxyFetch - const prevCustomFetch = params.customDataProxyFetch ?? ((f) => f) + const prevCustomFetch = params.customDataProxyFetch // allow query extensions to re-wrap in transactions // this will automatically discard the prev batch tx - if (transaction !== undefined) { + if ('transaction' in params && transaction !== undefined) { if (params.transaction?.kind === 'batch') { void params.transaction.lock.then() // discard } @@ -32,14 +31,14 @@ function iterateAndCallQueryCallbacks( return queryCbs[i]({ model: params.model, operation: params.model ? params.action : params.clientMethod, - args: klona(params.args ?? {}), + args: deepCloneArgs(params.args ?? {}), // @ts-expect-error because not part of public API __internalParams: params, query: (args, __internalParams = params) => { // we need to keep track of the current customDataProxyFetch // this is to cascade customDataProxyFetch like a middleware - const currCustomFetch = __internalParams.customDataProxyFetch ?? ((f) => f) - __internalParams.customDataProxyFetch = (f) => prevCustomFetch(currCustomFetch(f)) + const currCustomFetch = __internalParams.customDataProxyFetch + __internalParams.customDataProxyFetch = composeCustomDataProxyFetch(prevCustomFetch, currCustomFetch) __internalParams.args = args return iterateAndCallQueryCallbacks(client, __internalParams, queryCbs, i + 1) @@ -58,7 +57,60 @@ export function applyQueryExtensions(client: Client, params: InternalRequestPara } // get the cached query cbs for a given model and action - const cbs = client._extensions.getAllQueryCallbacks(jsModelName ?? '*', operation) + const cbs = client._extensions.getAllQueryCallbacks(jsModelName ?? '$none', operation) return iterateAndCallQueryCallbacks(client, params, cbs) } + +type BatchExecuteCallback = (params: BatchInternalParams) => Promise + +export function createApplyBatchExtensionsFunction(executeBatch: BatchExecuteCallback) { + return (requests: RequestParams[]) => { + const params = { requests } + const callbacks = requests[0].extensions.getAllBatchQueryCallbacks() + if (!callbacks.length) { + return executeBatch(params) + } + + return iterateAndCallBatchCallbacks(params, callbacks, 0, executeBatch) + } +} + +export function iterateAndCallBatchCallbacks( + params: BatchInternalParams, + callbacks: BatchQueryOptionsCb[], + i: number, + executeBatch: BatchExecuteCallback, +) { + if (i === callbacks.length) { + return executeBatch(params) + } + + const prevFetch = params.customDataProxyFetch + const transaction = params.requests[0].transaction + return callbacks[i]({ + args: { + queries: params.requests.map((request) => ({ + model: request.modelName, + operation: request.action, + args: request.args, + })), + transaction: transaction + ? { + isolationLevel: transaction.kind === 'batch' ? transaction.isolationLevel : undefined, + } + : undefined, + }, + __internalParams: params, + query(_args, __internalParams = params) { + const nextFetch = __internalParams.customDataProxyFetch + __internalParams.customDataProxyFetch = composeCustomDataProxyFetch(prevFetch, nextFetch) + return iterateAndCallBatchCallbacks(__internalParams, callbacks, i + 1, executeBatch) + }, + }) +} + +const noopFetch: CustomDataProxyFetch = (f) => f +function composeCustomDataProxyFetch(prevFetch = noopFetch, nextFetch = noopFetch): CustomDataProxyFetch { + return (f) => prevFetch(nextFetch(f)) +} diff --git a/packages/client/src/runtime/core/extensions/getExtensionContext.ts b/packages/client/src/runtime/core/extensions/getExtensionContext.ts index 82bb0a9df1ca..6421d711e050 100644 --- a/packages/client/src/runtime/core/extensions/getExtensionContext.ts +++ b/packages/client/src/runtime/core/extensions/getExtensionContext.ts @@ -8,12 +8,9 @@ /* eslint-disable prettier/prettier */ export type Context = T extends { [K: symbol]: { ctx: infer C } } - ? C & { [K in Exclude & string]: T[K] } & ContextMeta - : T & ContextMeta + ? C & T & { name?: string } + : T & { name?: string } -type ContextMeta = { name: string } -/* eslint-enable prettier/prettier */ - export function getExtensionContext(that: T) { return that as any as Context } diff --git a/packages/client/src/runtime/core/model/applyModel.ts b/packages/client/src/runtime/core/model/applyModel.ts index fc6dfa6f14fc..7df54d9fba7a 100644 --- a/packages/client/src/runtime/core/model/applyModel.ts +++ b/packages/client/src/runtime/core/model/applyModel.ts @@ -10,7 +10,6 @@ import { CompositeProxyLayer, createCompositeProxy, } from '../compositeProxy' -import { createPrismaPromise } from '../request/createPrismaPromise' import type { PrismaPromise } from '../request/PrismaPromise' import type { UserArgs } from '../request/UserArgs' import { applyAggregates } from './applyAggregates' @@ -87,7 +86,7 @@ function modelActionsLayer(client: Client, dmmfModelName: string): CompositeProx const action = (paramOverrides: O.Optional) => (userArgs?: UserArgs) => { const callSite = getCallSite(client._errorFormat) // used for showing better errors - return createPrismaPromise((transaction) => { + return client._createPrismaPromise((transaction) => { const params: InternalRequestParams = { // data and its dataPath for nested results args: userArgs, diff --git a/packages/client/src/runtime/core/model/applyModelsAndClientExtensions.ts b/packages/client/src/runtime/core/model/applyModelsAndClientExtensions.ts index 578c5920bdac..60e8c7fda7cd 100644 --- a/packages/client/src/runtime/core/model/applyModelsAndClientExtensions.ts +++ b/packages/client/src/runtime/core/model/applyModelsAndClientExtensions.ts @@ -66,7 +66,7 @@ function modelsLayer(client: Client): CompositeProxyLayer { }) } -export function unapplyModelsAndClientExtensions(client: Client): Client { +export function unApplyModelsAndClientExtensions(client: Client): Client { if (client[rawClient]) { return client[rawClient] } diff --git a/packages/client/src/runtime/core/protocol/json/JsonProtocolEncoder.test.ts b/packages/client/src/runtime/core/protocol/json/JsonProtocolEncoder.test.ts new file mode 100644 index 000000000000..a3eec3624d4f --- /dev/null +++ b/packages/client/src/runtime/core/protocol/json/JsonProtocolEncoder.test.ts @@ -0,0 +1,94 @@ +import { field, model, runtimeDataModel } from '../../../../testUtils/dataModelBuilder' +import { MergedExtensionsList } from '../../extensions/MergedExtensionsList' +import { JsonProtocolMessage } from './JsonProtocolEncoder' +import { serializeJsonQuery, SerializeParams } from './serialize' + +const User = model('User', [ + field('scalar', 'name', 'String'), + field('scalar', 'nickname', 'String'), + field('object', 'posts', 'Post', { + isList: true, + relationName: 'UserToPost', + }), +]) + +const Post = model('Post', [ + field('scalar', 'title', 'String'), + field('scalar', 'userId', 'String'), + field('scalar', 'published', 'Boolean'), + field('object', 'user', 'User', { + relationName: 'PostToUser', + }), + field('object', 'attachments', 'Attachment', { + relationName: 'PostToAttachment', + isList: true, + }), +]) + +const Attachment = model('Attachment', [ + field('scalar', 'fileName', 'String'), + field('scalar', 'postId', 'String'), + field('object', 'post', 'Post', { + relationName: 'AttachmentToPost', + }), +]) + +const datamodel = runtimeDataModel({ models: [User, Post, Attachment] }) + +type SimplifiedParams = Omit & { + extensions?: MergedExtensionsList +} + +function createMessage(params: SimplifiedParams) { + return new JsonProtocolMessage( + serializeJsonQuery({ + ...params, + runtimeDataModel: datamodel, + extensions: params.extensions ?? MergedExtensionsList.empty(), + clientMethod: 'foo', + errorFormat: 'colorless', + }), + ) +} + +test('getBatchId for findMany', () => { + expect( + createMessage({ + modelName: 'User', + action: 'findMany', + args: { + where: { + id: '123', + }, + }, + }).getBatchId(), + ).toBeUndefined() +}) + +test('getBatchId for findUnique', () => { + expect( + createMessage({ + modelName: 'User', + action: 'findUnique', + args: { + where: { + id: '123', + }, + }, + }).getBatchId(), + ).toMatchInlineSnapshot(`User((where (id)))($composites $scalars)`) +}) + +test('getBatchId for findUniqueOrThrow', () => { + expect( + createMessage({ + modelName: 'User', + action: 'findUniqueOrThrow', + args: { + where: { + id: '123', + }, + }, + }).getBatchId(), + ).toMatchInlineSnapshot(`User((where (id)))($composites $scalars)`) +}) diff --git a/packages/client/src/runtime/core/protocol/json/JsonProtocolEncoder.ts b/packages/client/src/runtime/core/protocol/json/JsonProtocolEncoder.ts index 30e0ef0192a3..523c5f683f1e 100644 --- a/packages/client/src/runtime/core/protocol/json/JsonProtocolEncoder.ts +++ b/packages/client/src/runtime/core/protocol/json/JsonProtocolEncoder.ts @@ -52,7 +52,7 @@ export class JsonProtocolMessage implements ProtocolMessage { return isWrite[this.query.action] } getBatchId(): string | undefined { - if (this.query.action !== 'findUnique') { + if (this.query.action !== 'findUnique' && this.query.action !== 'findUniqueOrThrow') { return undefined } const parts: string[] = [] diff --git a/packages/client/src/runtime/core/protocol/json/serialize.test.ts b/packages/client/src/runtime/core/protocol/json/serialize.test.ts index 58df05d2b62b..d18b1474ea8f 100644 --- a/packages/client/src/runtime/core/protocol/json/serialize.test.ts +++ b/packages/client/src/runtime/core/protocol/json/serialize.test.ts @@ -492,7 +492,8 @@ test('args - FieldRef', () => { "name": { "$type": "FieldRef", "value": { - "_ref": "nickname" + "_ref": "nickname", + "_container": "User" } } } diff --git a/packages/client/src/runtime/core/protocol/json/serialize.ts b/packages/client/src/runtime/core/protocol/json/serialize.ts index e0eb08b52e0d..da8f5f1733ad 100644 --- a/packages/client/src/runtime/core/protocol/json/serialize.ts +++ b/packages/client/src/runtime/core/protocol/json/serialize.ts @@ -198,7 +198,7 @@ function serializeArgumentsValue( } if (isFieldRef(jsValue)) { - return { $type: 'FieldRef', value: { _ref: jsValue.name } } + return { $type: 'FieldRef', value: { _ref: jsValue.name, _container: jsValue.modelName } } } if (Array.isArray(jsValue)) { diff --git a/packages/client/src/runtime/core/public/index.ts b/packages/client/src/runtime/core/public/index.ts new file mode 100644 index 000000000000..c029456cbc2f --- /dev/null +++ b/packages/client/src/runtime/core/public/index.ts @@ -0,0 +1,9 @@ +import { validator } from './validator' + +/* + * /!\ These exports are exposed to the user. Proceed with caution. + * + * TODO: Move more hardcoded utils from generation into here + */ + +export { validator } diff --git a/packages/client/src/runtime/core/public/validator.ts b/packages/client/src/runtime/core/public/validator.ts new file mode 100644 index 000000000000..d393c23b985c --- /dev/null +++ b/packages/client/src/runtime/core/public/validator.ts @@ -0,0 +1,18 @@ +import { Args, Operation } from '../types/Public' +import { Exact } from '../types/Utils' + +export function validator(): (select: Exact) => S +export function validator, O extends keyof C[M] & Operation>( + client: C, + model: M, + operation: O, +): (select: Exact>) => S +export function validator< + C, + M extends Exclude, + O extends keyof C[M] & Operation, + P extends keyof Args, +>(client: C, model: M, operation: O, prop: P): (select: Exact[P]>) => S +export function validator(..._args: any[]) { + return (args: any) => args +} diff --git a/packages/client/src/runtime/core/raw-query/RawQueryArgs.ts b/packages/client/src/runtime/core/raw-query/RawQueryArgs.ts index e79b87625f4c..b9561a7104cc 100644 --- a/packages/client/src/runtime/core/raw-query/RawQueryArgs.ts +++ b/packages/client/src/runtime/core/raw-query/RawQueryArgs.ts @@ -1,3 +1,3 @@ import { RawValue, Sql } from 'sql-template-tag' -export type RawQueryArgs = [query: string | TemplateStringsArray | Sql, ...values: RawValue[]] +export type RawQueryArgs = Sql | [query: string, ...values: RawValue[]] diff --git a/packages/client/src/runtime/core/raw-query/rawCommandArgsMapper.ts b/packages/client/src/runtime/core/raw-query/rawCommandArgsMapper.ts new file mode 100644 index 000000000000..eee73a40ffa1 --- /dev/null +++ b/packages/client/src/runtime/core/raw-query/rawCommandArgsMapper.ts @@ -0,0 +1,3 @@ +export const rawCommandArgsMapper = (command: object) => ({ + command, +}) diff --git a/packages/client/src/runtime/core/raw-query/rawQueryArgsMapper.ts b/packages/client/src/runtime/core/raw-query/rawQueryArgsMapper.ts index 1c2d7bcc0980..065873a93b38 100644 --- a/packages/client/src/runtime/core/raw-query/rawQueryArgsMapper.ts +++ b/packages/client/src/runtime/core/raw-query/rawQueryArgsMapper.ts @@ -1,7 +1,7 @@ import Debug from '@prisma/debug' -import { RawValue, Sql } from 'sql-template-tag' +import { Sql } from 'sql-template-tag' -import { Client } from '../../getPrismaClient' +import { MiddlewareArgsMapper } from '../../getPrismaClient' import { mssqlPreparedStatement } from '../../utils/mssqlPreparedStatement' import { serializeRawParameters } from '../../utils/serializeRawParameters' import { RawQueryArgs } from './RawQueryArgs' @@ -11,14 +11,10 @@ const ALTER_RE = /^(\s*alter\s)/i const debug = Debug('prisma:client') // TODO also check/disallow for CREATE, DROP -function checkAlter( - query: string, - values: RawValue[], - invalidCall: - | 'prisma.$executeRaw``' - | 'prisma.$executeRawUnsafe(, [...values])' - | 'prisma.$executeRaw(sql``)', -) { +export function checkAlter(activeProvider: string, query: string, values: unknown[], invalidCall: string) { + if (activeProvider !== 'postgresql' && activeProvider !== 'cockroachdb') { + return + } if (values.length > 0 && ALTER_RE.exec(query)) { // See https://github.com/prisma/prisma-client-js/issues/940 for more info throw new Error(`Running ALTER using ${invalidCall} is not supported @@ -32,100 +28,86 @@ More Information: https://pris.ly/d/execute-raw } } -function isReadonlyArray(arg: any): arg is ReadonlyArray { - return Array.isArray(arg) -} +export const rawQueryArgsMapper = (activeProvider: string, clientMethod: string) => (args: RawQueryArgs) => { + // TODO Clean up types + let queryString = '' + let parameters: { values: string; __prismaRawParameters__: true } | undefined -export const rawQueryArgsMapper = - (client: Client, clientMethod: string) => - ([query, ...values]: RawQueryArgs) => { - // TODO Clean up types - let queryString = '' - let parameters: { values: string; __prismaRawParameters__: true } | undefined - if (typeof query === 'string') { - // If this was called as prisma.$executeRaw(, [...values]), assume it is a pre-prepared SQL statement, and forward it without any changes - queryString = query - parameters = { - values: serializeRawParameters(values || []), - __prismaRawParameters__: true, - } - if (clientMethod.includes('executeRaw')) { - checkAlter(queryString, values, 'prisma.$executeRawUnsafe(, [...values])') - } - } else if (isReadonlyArray(query)) { - // If this was called as prisma.$executeRaw``, try to generate a SQL prepared statement - switch (client._activeProvider) { - case 'sqlite': - case 'mysql': { - const queryInstance = new Sql(query, values) - - queryString = queryInstance.sql - parameters = { - values: serializeRawParameters(queryInstance.values), - __prismaRawParameters__: true, - } - break + if (Array.isArray(args)) { + // If this was called as prisma.$executeRaw(, [...values]), assume it is a pre-prepared SQL statement, and forward it without any changes + const [query, ...values] = args + queryString = query + parameters = { + values: serializeRawParameters(values || []), + __prismaRawParameters__: true, + } + } else { + // If this was called as prisma.$executeRaw`` try to generate a SQL prepared statement + switch (activeProvider) { + case 'sqlite': + case 'mysql': { + queryString = args.sql + parameters = { + values: serializeRawParameters(args.values), + __prismaRawParameters__: true, } + break + } - case 'cockroachdb': - case 'postgresql': { - const queryInstance = new Sql(query, values) - - queryString = queryInstance.text - if (clientMethod.includes('executeRaw')) { - checkAlter(queryString, queryInstance.values, 'prisma.$executeRaw``') - } + case 'cockroachdb': + case 'postgresql': { + queryString = args.text - parameters = { - values: serializeRawParameters(queryInstance.values), - __prismaRawParameters__: true, - } - break + parameters = { + values: serializeRawParameters(args.values), + __prismaRawParameters__: true, } + break + } - case 'sqlserver': { - queryString = mssqlPreparedStatement(query) - parameters = { - values: serializeRawParameters(values), - __prismaRawParameters__: true, - } - break - } - default: { - throw new Error(`The ${client._activeProvider} provider does not support ${clientMethod}`) + case 'sqlserver': { + queryString = mssqlPreparedStatement(args) + parameters = { + values: serializeRawParameters(args.values), + __prismaRawParameters__: true, } + break } - } else { - // If this was called as prisma.$executeRaw(sql``), use prepared statements from sql-template-tag - switch (client._activeProvider) { - case 'sqlite': - case 'mysql': - queryString = query.sql - break - case 'cockroachdb': - case 'postgresql': - queryString = query.text - if (clientMethod.includes('executeRaw')) { - checkAlter(queryString, query.values, 'prisma.$executeRaw(sql``)') - } - break - case 'sqlserver': - queryString = mssqlPreparedStatement(query.strings) - break - default: - throw new Error(`The ${client._activeProvider} provider does not support ${clientMethod}`) + default: { + throw new Error(`The ${activeProvider} provider does not support ${clientMethod}`) } - parameters = { - values: serializeRawParameters(query.values), - __prismaRawParameters__: true, - } - } - - if (parameters?.values) { - debug(`prisma.${clientMethod}(${queryString}, ${parameters.values})`) - } else { - debug(`prisma.${clientMethod}(${queryString})`) } + } - return { query: queryString, parameters } + if (parameters?.values) { + debug(`prisma.${clientMethod}(${queryString}, ${parameters.values})`) + } else { + debug(`prisma.${clientMethod}(${queryString})`) } + + return { query: queryString, parameters } +} + +type MiddlewareRawArgsTemplateString = [string[], ...unknown[]] +type MiddlewareRawArgsSql = [Sql] + +export const templateStringMiddlewareArgsMapper: MiddlewareArgsMapper = { + requestArgsToMiddlewareArgs(sql) { + return [sql.strings, ...sql.values] + }, + + middlewareArgsToRequestArgs(requestArgs) { + const [strings, ...values] = requestArgs + return new Sql(strings, values) + }, +} + +export const sqlMiddlewareArgsMapper: MiddlewareArgsMapper = { + requestArgsToMiddlewareArgs(sql) { + return [sql] + }, + + middlewareArgsToRequestArgs(requestArgs) { + return requestArgs[0] + }, +} diff --git a/packages/client/src/runtime/core/request/createPrismaPromise.ts b/packages/client/src/runtime/core/request/createPrismaPromise.ts index 6f72adc51b56..c482c538c518 100644 --- a/packages/client/src/runtime/core/request/createPrismaPromise.ts +++ b/packages/client/src/runtime/core/request/createPrismaPromise.ts @@ -1,5 +1,7 @@ import type { PrismaPromise, PrismaPromiseTransaction } from './PrismaPromise' +export type PrismaPromiseCallback = (transaction?: PrismaPromiseTransaction) => PrismaPromise + /** * Creates a [[PrismaPromise]]. It is Prisma's implementation of `Promise` which * is essentially a proxy for `Promise`. All the transaction-compatible client @@ -9,48 +11,55 @@ import type { PrismaPromise, PrismaPromiseTransaction } from './PrismaPromise' * @see [[PrismaPromise]] * @returns */ -export function createPrismaPromise( - callback: (transaction?: PrismaPromiseTransaction) => PrismaPromise, -): PrismaPromise { - let promise: PrismaPromise | undefined - const _callback = (transaction?: PrismaPromiseTransaction) => { - try { - // promises cannot be triggered twice after resolving - if (transaction === undefined || transaction?.kind === 'itx') { - return (promise ??= valueToPromise(callback(transaction))) - } +export type PrismaPromiseFactory = (callback: PrismaPromiseCallback) => PrismaPromise - // but for batch tx we can trigger them again & again - return valueToPromise(callback(transaction)) - } catch (error) { - // if the callback throws, then we reject the promise - // and that is because exceptions are not always async - return Promise.reject(error) as PrismaPromise - } - } +/** + * Creates a factory, that allows creating PrismaPromises, bound to a specific transactions + * @param transaction + * @returns + */ +export function createPrismaPromiseFactory(transaction?: PrismaPromiseTransaction): PrismaPromiseFactory { + return function createPrismaPromise(callback) { + let promise: PrismaPromise | undefined + const _callback = (callbackTransaction = transaction) => { + try { + // promises cannot be triggered twice after resolving + if (callbackTransaction === undefined || callbackTransaction?.kind === 'itx') { + return (promise ??= valueToPromise(callback(callbackTransaction))) + } - return { - then(onFulfilled, onRejected, transaction?) { - return _callback(transaction).then(onFulfilled, onRejected, transaction) - }, - catch(onRejected, transaction?) { - return _callback(transaction).catch(onRejected, transaction) - }, - finally(onFinally, transaction?) { - return _callback(transaction).finally(onFinally, transaction) - }, - - requestTransaction(batchTransaction) { - const promise = _callback(batchTransaction) - - if (promise.requestTransaction) { - // we want to have support for nested promises - return promise.requestTransaction(batchTransaction) + // but for batch tx we can trigger them again & again + return valueToPromise(callback(callbackTransaction)) + } catch (error) { + // if the callback throws, then we reject the promise + // and that is because exceptions are not always async + return Promise.reject(error) as PrismaPromise } + } + + return { + then(onFulfilled, onRejected) { + return _callback().then(onFulfilled, onRejected) + }, + catch(onRejected) { + return _callback().catch(onRejected) + }, + finally(onFinally) { + return _callback().finally(onFinally) + }, - return promise - }, - [Symbol.toStringTag]: 'PrismaPromise', + requestTransaction(batchTransaction) { + const promise = _callback(batchTransaction) + + if (promise.requestTransaction) { + // we want to have support for nested promises + return promise.requestTransaction(batchTransaction) + } + + return promise + }, + [Symbol.toStringTag]: 'PrismaPromise', + } } } diff --git a/packages/client/src/runtime/core/types/Extensions.ts b/packages/client/src/runtime/core/types/Extensions.ts index 8c4e1f8b11f0..403e91885288 100644 --- a/packages/client/src/runtime/core/types/Extensions.ts +++ b/packages/client/src/runtime/core/types/Extensions.ts @@ -1,17 +1,23 @@ +import { Sql } from 'sql-template-tag' + +import { ITXClientDenyList } from '../../itxClientDenyList' import { RequiredArgs as UserArgs } from '../extensions/$extends' -import { ReadonlyDeep } from './Utils' +import { GetFindResult, GetResult as GetOperationResult, Operation } from './GetResult' +import { Payload } from './Payload' +import { PrismaPromise } from './Public' +import { Call, ComputeDeep, Fn, Optional, Return, ToTuple, UnwrapTuple } from './Utils' /* eslint-disable prettier/prettier */ export type InternalArgs< - R extends UserArgs['result'] = UserArgs['result'], - M extends UserArgs['model'] = UserArgs['model'], - Q extends UserArgs['query'] = UserArgs['query'], - C extends UserArgs['client'] = UserArgs['client'], + Q = { [K in string]: { [K in string]: unknown } }, + R = { [K in string]: { [K in string]: unknown } }, + M = { [K in string]: { [K in string]: unknown } }, + C = { [K in string]: unknown }, > = { result: { [K in keyof R]: { [P in keyof R[K]]: () => R[K][P] } }, - model: { [K in keyof M]: { [P in keyof M[K]]: () => M[K][P] } }, query: { [K in keyof Q]: { [P in keyof Q[K]]: () => Q[K][P] } }, + model: { [K in keyof M]: { [P in keyof M[K]]: () => M[K][P] } }, client: { [K in keyof C]: () => C[K] }, } @@ -19,24 +25,211 @@ export type Args = InternalArgs export type DefaultArgs = InternalArgs<{}, {}, {}, {}> -export type GetResult, R extends Args['result'][string]> = - { [K in keyof R | keyof Base]: K extends keyof R ? ReturnType['compute']> : Base[K] } & unknown +export type GetResult, R extends Args['result'][string], KR extends keyof R = string extends keyof R ? never : keyof R> = + { [K in KR | keyof Base]: K extends KR ? R[K] extends (() => { compute: (...args: any) => infer C }) ? C : never : Base[K] } + +export type GetSelect, R extends Args['result'][string], KR extends keyof R = string extends keyof R ? never : keyof R> = + { [K in KR | keyof Base]?: K extends KR ? boolean : Base[K] } + +/** Query */ + +export type DynamicQueryExtensionArgs = { + [K in keyof Q_]: + K extends '$allOperations' + ? (args: { model?: string, operation: string, args: any, query: (args: any) => PrismaPromise }) => Promise + : K extends '$allModels' + ? { + [P in keyof Q_[K] | keyof TypeMap['model'][keyof TypeMap['model']] | '$allOperations']?: + P extends '$allOperations' + ? DynamicQueryExtensionCb + : P extends keyof TypeMap['model'][keyof TypeMap['model']] + ? DynamicQueryExtensionCb + : never + } + : K extends TypeMap['meta']['modelProps'] + ? { + [P in keyof Q_[K] | keyof TypeMap['model'][ModelKey] | '$allOperations']?: + P extends '$allOperations' + ? DynamicQueryExtensionCb, keyof TypeMap['model'][ModelKey]> + : P extends keyof TypeMap['model'][ModelKey] + ? DynamicQueryExtensionCb, P> + : never + } + : K extends keyof TypeMap['other'] + ? DynamicQueryExtensionCb<[TypeMap], 0 /* hack to maintain type arity */, 'other', K> + : never +} + +export type DynamicQueryExtensionCb = + >(args: A) => + Promise + +export type DynamicQueryExtensionCbArgs = + ( // we distribute over the union of models and operations to allow narrowing + _1 extends unknown ? _2 extends unknown ? { + args: DynamicQueryExtensionCbArgsArgs, + model: _0 extends 0 ? undefined : _1, + operation: _2, + } : never : never + ) & { // but we don't distribute for query so that the input types stay union + query: (args: DynamicQueryExtensionCbArgsArgs) => + PrismaPromise + } + +export type DynamicQueryExtensionCbArgsArgs = + _2 extends '$queryRaw' | '$executeRaw' + ? Sql // Override args type for raw queries + : TypeMap[_0][_1][_2]['args'] + +/** Result */ -export type GetSelect, R extends Args['result'][string]> = - { [K in keyof R | keyof Base]?: K extends keyof R ? boolean : Base[K] } +export type DynamicResultExtensionArgs = { + [K in keyof R_]: { + [P in keyof R_[K]]?: { + needs?: DynamicResultExtensionNeeds, R_[K][P]> + compute(data: DynamicResultExtensionData, R_[K][P]>): any + } + } +} + +export type DynamicResultExtensionNeeds = { + [K in keyof S]: K extends keyof TypeMap['model'][M]['findFirstOrThrow']['payload']['scalars'] ? S[K] : never +} & { + [N in keyof TypeMap['model'][M]['findFirstOrThrow']['payload']['scalars']]?: boolean +} + +export type DynamicResultExtensionData = + GetFindResult + +/** Model */ + +export type DynamicModelExtensionArgs> = { + [K in keyof M_]: + K extends '$allModels' + ? & { [P in keyof M_[K]]?: unknown } + & { [K: symbol]: {} } + : K extends TypeMap['meta']['modelProps'] + ? & { [P in keyof M_[K]]?: unknown } + & { [K: symbol]: { ctx: DynamicModelExtensionThis, ExtArgs> & { name: ModelKey } } } + : never +} + +export type DynamicModelExtensionThis> = { + [P in keyof ExtArgs['model'][Uncapitalize]]: + Return][P]> +} & { + [P in Exclude]>]: + {} extends TypeMap['model'][M][P]['args'] // will match fully optional args + ? (args?: A) => + PrismaPromise> + : (args: A) => + PrismaPromise> +} & { + [K: symbol]: { types: TypeMap['model'][M] } +} -export type GetModel, M extends Args['model'][string]> = - { [K in keyof M | keyof Base]: K extends keyof M ? ReturnType : Base[K] } +/** Client */ -export type GetClient, C extends Args['client']> = - Omit & { [K in keyof C]: ReturnType } +export type DynamicClientExtensionArgs> = { + [P in keyof C_]: unknown +} & { + [K: symbol]: { ctx: Optional, ITXClientDenyList> } +} -export type ReadonlySelector = T extends unknown ? { - readonly [K in keyof T as K extends 'include' | 'select' ? K : never]: ReadonlyDeep +export type DynamicClientExtensionThis> = { + [P in keyof ExtArgs['client']]: Return +} & { + [P in Exclude]: + DynamicModelExtensionThis, ExtArgs> +} & { + [P in Exclude]: + > + (...args: ToTuple) => PrismaPromise } & { - [K in keyof T as K extends 'include' | 'select' ? never : K]: T[K] -} : never + [P in Exclude]: + DynamicClientExtensionThisBuiltin[P] +} + +export type ClientBuiltInProp = '$connect' | '$disconnect' | '$transaction' | '$extends' +export type DynamicClientExtensionThisBuiltin> = { + $extends: ExtendsHook<'extends', TypeMapCb, ExtArgs> + $transaction

[]>(arg: [...P], options?: { isolationLevel?: TypeMap['meta']['txIsolationLevel'] }): Promise> + $transaction(fn: (client: Omit, ITXClientDenyList>) => Promise, options?: { maxWait?: number, timeout?: number, isolationLevel?: TypeMap['meta']['txIsolationLevel'] }): Promise + $disconnect(): Promise + $connect(): Promise +} + +/** $extends, defineExtension */ + +export interface ExtendsHook, TypeMap extends TypeMapDef = Call> { + extArgs: ExtArgs, + < + // X_ seeds the first fields for auto-completion and deals with dynamic inference + // X doesn't deal with dynamic inference but captures the final inferred input type + Q_ extends { [K in TypeMap['meta']['modelProps'] | '$allModels' | keyof TypeMap['other'] | '$allOperations']?: unknown }, + R_ extends { [K in TypeMap['meta']['modelProps'] | '$allModels']?: unknown }, R, + M_ extends { [K in TypeMap['meta']['modelProps'] | '$allModels']?: unknown }, M, + C_ extends { [K in string]?: unknown }, C, + Args extends InternalArgs = InternalArgs<{}, R, M, C>, + MergedArgs extends InternalArgs = MergeExtArgs + >(extension: + | ((client: DynamicClientExtensionThis) => { $extends: { extArgs: Args } }) + | { + name?: string + query?: DynamicQueryExtensionArgs + result?: DynamicResultExtensionArgs & R + model?: DynamicModelExtensionArgs & M + client?: DynamicClientExtensionArgs & C + } + ): { + 'extends': DynamicClientExtensionThis, TypeMapCb, MergedArgs> + 'define': (client: any) => { $extends: { extArgs: Args } } + }[Variant] +} + +export type MergeExtArgs, Args extends Record> = + ComputeDeep< + & ExtArgs + & Args + & AllModelsToStringIndex + & AllModelsToStringIndex + > + +export type AllModelsToStringIndex, K extends PropertyKey> = + Args extends { [P in K]: { $allModels: infer AllModels} } + ? { [P in K]: Record } + : {} + +/** Shared */ + +type TypeMapDef = Record /* DevTypeMapDef */ + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +type DevTypeMapDef = { + meta: { + modelProps: string + }, + model: { + [Model in PropertyKey]: { + [Operation in PropertyKey]: DevTypeMapFnDef + } + }, + other: { + [Operation in PropertyKey]: DevTypeMapFnDef + } +} + +type DevTypeMapFnDef = { + args: any + result: any + payload: Payload +} + +type TypeMapCbDef = Fn<{ extArgs: Args }, TypeMapDef> -/* eslint-enable prettier/prettier */ +type ModelKey = + M extends keyof TypeMap['model'] + ? M + : Capitalize export type { UserArgs } diff --git a/packages/client/src/runtime/core/types/GetResult.ts b/packages/client/src/runtime/core/types/GetResult.ts index c76475847783..10662d37919d 100644 --- a/packages/client/src/runtime/core/types/GetResult.ts +++ b/packages/client/src/runtime/core/types/GetResult.ts @@ -1,7 +1,9 @@ /* eslint-disable prettier/prettier */ -import { Payload } from "./Payload" +import { Payload } from './Payload' +import { JsonObject } from './Utils' +// prettier-ignore export type Operation = // finds | 'findFirst' @@ -23,73 +25,98 @@ export type Operation = | 'aggregate' | 'count' | 'groupBy' +// raw sql | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' -| '$runCommandRaw' // raw mongo -// | 'findRaw' -// | 'runCommandRaw' +| 'findRaw' +| 'aggregateRaw' +| '$runCommandRaw' type Count = { [K in keyof O]: Count } & {} -export type GetFindResult

= +// prettier-ignore +export type GetFindResult

= + {} extends A ? DefaultSelection

: A extends | { select: infer S } & Record | { include: infer S } & Record ? { [K in keyof S as S[K] extends false | undefined | null ? never : K]: - S[K] extends true - ? P extends { objects: { [k in K]: (infer O)[] } } - ? O extends Payload ? O['scalars'][] : never - : P extends { objects: { [k in K]: (infer O) | null } } - ? O extends Payload ? O['scalars'] | P['objects'][K] & null : never + S[K] extends object + ? P extends SelectablePayloadFields + ? O extends Payload ? GetFindResult[] : never + : P extends SelectablePayloadFields + ? O extends Payload ? GetFindResult | SelectField & null : never + : K extends '_count' + ? Count> + : never + : P extends SelectablePayloadFields + ? O extends Payload ? DefaultSelection[] : never + : P extends SelectablePayloadFields + ? O extends Payload ? DefaultSelection | SelectField & null : never : P extends { scalars: { [k in K]: infer O } } ? O : K extends '_count' ? Count : never - : P extends { objects: { [k in K]: (infer O)[] } } - ? O extends Payload ? GetFindResult[] : never - : P extends { objects: { [k in K]: (infer O) | null } } - ? O extends Payload ? GetFindResult | P['objects'][K] & null : never - : K extends '_count' - ? Count> - : never - }& (A extends { include: any } & Record ? P['scalars'] : unknown) - : P['scalars'] + } & (A extends { include: any } & Record ? DefaultSelection

: unknown) + : DefaultSelection

+ +type SelectablePayloadFields = + | { objects: { [k in K]: O } } + | { composites: { [k in K]: O } } + +// prettier-ignore +type SelectField

, K extends PropertyKey> = + P extends { objects: Record } + ? P['objects'][K] + : P extends { composites: Record } + ? P['composites'][K] + : never -type GetCountResult = - A extends { select: infer S } - ? S extends true - ? number - : Count - : number +// prettier-ignore +export type DefaultSelection

= P extends Payload + ? P['scalars'] & UnwrapPayload + : P -type Aggregate = '_count' | '_max' | '_min' | '_avg' | '_sum' -type GetAggregateResult = { +type UnwrapPayload

= { + [K in keyof P]: + P[K] extends Payload[] + ? UnwrapPayload + : P[K] extends Payload + ? P[K]['scalars'] & UnwrapPayload + : P[K] +} & unknown + +type GetCountResult = A extends { select: infer S } ? (S extends true ? number : Count) : number + +type Aggregate = '_count' | '_max' | '_min' | '_avg' | '_sum' + +// prettier-ignore +type GetAggregateResult

= { [K in keyof A as K extends Aggregate ? K : never]: K extends '_count' - ? A[K] extends true - ? number - : Count - : Count + ? A[K] extends true ? number : Count + : { [J in keyof A[K] & string]: P['scalars'][J] | null } } type GetBatchResult = { count: number } -type GetGroupByResult = - P extends Payload - ? A extends { by: string[] } - ? Array & { [K in A['by'][number]]: P['scalars'][K] }> - : never +// prettier-ignore +type GetGroupByResult

= + A extends { by: string[] } + ? Array & { [K in A['by'][number]]: P['scalars'][K] }> : never -export type GetResult

= { - findUnique: GetFindResult, +// TODO Null can be removed once rejectOnNotFound is removed +// prettier-ignore +export type GetResult

= { + findUnique: GetFindResult | Null, findUniqueOrThrow: GetFindResult, - findFirst: GetFindResult, + findFirst: GetFindResult | Null, findFirstOrThrow: GetFindResult, findMany: GetFindResult[], create: GetFindResult, @@ -99,12 +126,14 @@ export type GetResult

= { upsert: GetFindResult, delete: GetFindResult, deleteMany: GetBatchResult, - aggregate: GetAggregateResult, + aggregate: GetAggregateResult, count: GetCountResult, groupBy: GetGroupByResult, - $queryRaw: any, - $executeRaw: any, - $queryRawUnsafe: any, - $executeRawUnsafe: any, - $runCommandRaw: object, + $queryRaw: unknown, + $executeRaw: number, + $queryRawUnsafe: unknown, + $executeRawUnsafe: number, + $runCommandRaw: JsonObject, + findRaw: JsonObject, + aggregateRaw: JsonObject, }[O] diff --git a/packages/client/src/runtime/core/types/Payload.ts b/packages/client/src/runtime/core/types/Payload.ts index dd2e3d649f15..ae9a20fdfdc6 100644 --- a/packages/client/src/runtime/core/types/Payload.ts +++ b/packages/client/src/runtime/core/types/Payload.ts @@ -7,4 +7,7 @@ export type Payload = { // but if we do that TypeScript will attempt to compare types recursively [ObjectName in string]: unknown } + composites: { + [CompositeName in string]: unknown + } } diff --git a/packages/client/src/runtime/core/types/Public.ts b/packages/client/src/runtime/core/types/Public.ts index 95db7c44d809..11edda93c810 100644 --- a/packages/client/src/runtime/core/types/Public.ts +++ b/packages/client/src/runtime/core/types/Public.ts @@ -10,7 +10,7 @@ import { Exact } from './Utils' */ export type Args = - T extends { [K: symbol]: { types: { [K in F]: { args: any} } } } + T extends { [K: symbol]: { types: { [K in F]: { args: any } } } } ? T[symbol]['types'][F]['args'] : never diff --git a/packages/client/src/runtime/core/types/Utils.ts b/packages/client/src/runtime/core/types/Utils.ts index 0bcfd175205f..2d3133545960 100644 --- a/packages/client/src/runtime/core/types/Utils.ts +++ b/packages/client/src/runtime/core/types/Utils.ts @@ -1,4 +1,4 @@ -/* eslint-disable prettier/prettier */ +import { PrismaPromise } from '../request/PrismaPromise' export type EmptyToUnknown = T @@ -6,23 +6,6 @@ export type NeverToUnknown = [T] extends [never] ? unknown : T export type PatchFlat = O1 & Omit -export type PatchDeep = { - [K in keyof O]: - K extends keyof O1 - ? K extends keyof O2 - ? O1[K] extends object - ? O2[K] extends object - ? O1[K] extends Function - ? O1[K] - : O2[K] extends Function - ? O1[K] - : PatchDeep - : O1[K] - : O1[K] - : O1[K] - : O2[K & keyof O2] -} - export type Omit = { [P in keyof T as P extends K ? never : P]: T[P] } @@ -31,19 +14,9 @@ export type Pick = { [P in keyof T as P extends K ? P : never]: T[P] } -/** - * Patches 3 objects on top of each other with minimal looping. - * This is a more efficient way of doing `PatchFlat>` - */ -export type PatchFlat3 = A & { - [K in Exclude]: K extends keyof B ? B[K] : C[K & keyof C] -} +export type ComputeDeep = T extends Function ? T : { [K in keyof T]: ComputeDeep } & unknown -export type Compute = T extends Function - ? T - : { - [K in keyof T]: T[K] - } & unknown +export type Compute = T extends Function ? T : { [K in keyof T]: T[K] } & unknown export type OptionalFlat = { [K in keyof T]?: T[K] @@ -55,28 +28,71 @@ export type ReadonlyDeep = { type Narrowable = string | number | bigint | boolean | [] +// prettier-ignore export type Narrow = { [K in keyof A]: A[K] extends Function ? A[K] : Narrow } | (A extends Narrowable ? A : never) +// prettier-ignore export type Exact = (W extends A ? { [K in keyof W]: K extends keyof A ? Exact : never } : W) | (A extends Narrowable ? A : never) export type Cast = A extends W ? A : W -type LegacyNarrowable = string | number | boolean | bigint; +type LegacyNarrowable = string | number | boolean | bigint +// prettier-ignore export type LegacyExact = W extends unknown ? A extends LegacyNarrowable ? Cast : Cast< - {[K in keyof A]: K extends keyof W ? LegacyExact : never}, - {[K in keyof W]: K extends keyof A ? LegacyExact : W[K]}> + { [K in keyof A]: K extends keyof W ? LegacyExact : never }, + { [K in keyof W]: K extends keyof A ? LegacyExact : W[K] }> : never; -export type WrapPropsInFnDeep = { - [K in keyof T]: - T[K] extends Function - ? T[K] - : T[K] extends object - ? WrapPropsInFnDeep - : () => T[K] -} & {} +export type JsonObject = { [Key in string]?: JsonValue } +export interface JsonArray extends Array {} +export type JsonValue = string | number | boolean | JsonObject | JsonArray | null + +export type Record = { + [P in T]: U +} + +type UnwrapPromise

= P extends Promise ? R : P + +export type UnwrapTuple = { + [K in keyof Tuple]: K extends `${number}` + ? Tuple[K] extends PrismaPromise + ? X + : UnwrapPromise + : UnwrapPromise +} + +export type Path = P extends [infer K, ...infer R] + ? K extends keyof O + ? Path + : Default + : O + +export interface Fn { + params: Params + returns: Returns +} + +export type Call = (F & { params: P })['returns'] + +export type RequiredKeys = { + [K in keyof O]-?: {} extends Pick ? never : K +}[keyof O] + +export type OptionalKeys = { + [K in keyof O]-?: {} extends Pick ? K : never +}[keyof O] + +export type Optional = { + [P in K & keyof O]?: O[P] +} & { + [P in Exclude]: O[P] +} + +export type Return = T extends (...args: any[]) => infer R ? R : T + +export type ToTuple = T extends any[] ? T : [T] diff --git a/packages/client/src/runtime/core/types/index.ts b/packages/client/src/runtime/core/types/index.ts index f25c4ed6849c..44c737639e7e 100644 --- a/packages/client/src/runtime/core/types/index.ts +++ b/packages/client/src/runtime/core/types/index.ts @@ -1,12 +1,15 @@ import * as Extensions from './Extensions' -import { GetFindResult, GetResult } from './GetResult' +import { DefaultSelection, GetResult } from './GetResult' import { Payload } from './Payload' import * as Public from './Public' import * as Utils from './Utils' +/** Specific types */ export { Extensions } export { Utils } export { Public } + +/** General types */ export { type GetResult } -export { type GetFindResult } export { type Payload } +export { type DefaultSelection } diff --git a/packages/client/src/runtime/getPrismaClient.ts b/packages/client/src/runtime/getPrismaClient.ts index a34c77c6855d..4eed5d32f0de 100644 --- a/packages/client/src/runtime/getPrismaClient.ts +++ b/packages/client/src/runtime/getPrismaClient.ts @@ -23,6 +23,7 @@ import { RawValue, Sql } from 'sql-template-tag' import { getPrismaClientDMMF } from '../generation/getDMMF' import type { InlineDatasources } from '../generation/utils/buildInlineDatasources' import { PrismaClientValidationError } from '.' +import { addProperty, createCompositeProxy, removeProperties } from './core/compositeProxy' import { BatchTransactionOptions, BinaryEngine, @@ -40,14 +41,23 @@ import { applyQueryExtensions } from './core/extensions/applyQueryExtensions' import { MergedExtensionsList } from './core/extensions/MergedExtensionsList' import { checkPlatformCaching } from './core/init/checkPlatformCaching' import { MetricsClient } from './core/metrics/MetricsClient' -import { applyModelsAndClientExtensions } from './core/model/applyModelsAndClientExtensions' +import { + applyModelsAndClientExtensions, + unApplyModelsAndClientExtensions, +} from './core/model/applyModelsAndClientExtensions' import { dmmfToJSModelName } from './core/model/utils/dmmfToJSModelName' import { ProtocolEncoder } from './core/protocol/common' import { GraphQLProtocolEncoder } from './core/protocol/graphql' import { JsonProtocolEncoder } from './core/protocol/json' +import { rawCommandArgsMapper } from './core/raw-query/rawCommandArgsMapper' import { RawQueryArgs } from './core/raw-query/RawQueryArgs' -import { rawQueryArgsMapper } from './core/raw-query/rawQueryArgsMapper' -import { createPrismaPromise } from './core/request/createPrismaPromise' +import { + checkAlter, + rawQueryArgsMapper, + sqlMiddlewareArgsMapper, + templateStringMiddlewareArgsMapper, +} from './core/raw-query/rawQueryArgsMapper' +import { createPrismaPromiseFactory } from './core/request/createPrismaPromise' import { PrismaPromise, PrismaPromiseInteractiveTransaction, @@ -57,8 +67,10 @@ import { UserArgs } from './core/request/UserArgs' import { dmmfToRuntimeDataModel, RuntimeDataModel } from './core/runtimeDataModel' import { getTracingHelper } from './core/tracing/TracingHelper' import { getLockCountPromise } from './core/transaction/utils/createLockCountPromise' +import { JsInputValue } from './core/types/JsApi' import { DMMFHelper } from './dmmf' import { getLogLevel } from './getLogLevel' +import { itxClientDenyList } from './itxClientDenyList' import { mergeBy } from './mergeBy' import type { QueryMiddleware, QueryMiddlewareParams } from './MiddlewareHandler' import { MiddlewareHandler } from './MiddlewareHandler' @@ -166,10 +178,23 @@ export type InternalRequestParams = { otelParentCtx?: Context /** Used to "desugar" a user input into an "expanded" one */ argsMapper?: (args?: UserArgs) => UserArgs + + /** Used to convert args for middleware and back */ + middlewareArgsMapper?: MiddlewareArgsMapper /** Used for Accelerate client extension via Data Proxy */ customDataProxyFetch?: (fetch: Fetch) => Fetch } & Omit +export type MiddlewareArgsMapper = { + requestArgsToMiddlewareArgs(requestArgs: RequestArgs): MiddlewareArgs + middlewareArgsToRequestArgs(middlewareArgs: MiddlewareArgs): RequestArgs +} + +const noopMiddlewareArgsMapper: MiddlewareArgsMapper = { + requestArgsToMiddlewareArgs: (param) => param, + middlewareArgsToRequestArgs: (param) => param, +} + /* Types for Logging */ export type LogLevel = 'info' | 'query' | 'warn' | 'error' export type LogDefinition = { @@ -333,6 +358,7 @@ export function getPrismaClient(config: GetPrismaClientConfig) { _rejectOnNotFound?: InstanceRejectOnNotFound _dataProxy: boolean _extensions: MergedExtensionsList + _createPrismaPromise = createPrismaPromiseFactory() constructor(optionsArg?: PrismaClientOptions) { checkPlatformCaching(config) @@ -598,15 +624,17 @@ export function getPrismaClient(config: GetPrismaClientConfig) { transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, + middlewareArgsMapper?: MiddlewareArgsMapper, ): Promise { return this._request({ action: 'executeRaw', args, transaction, clientMethod, - argsMapper: rawQueryArgsMapper(this, clientMethod), + argsMapper: rawQueryArgsMapper(this._activeProvider, clientMethod), callsite: getCallSite(this._errorFormat), dataPath: [], + middlewareArgsMapper, }) } @@ -619,9 +647,16 @@ export function getPrismaClient(config: GetPrismaClientConfig) { * @returns */ $executeRaw(query: TemplateStringsArray | Sql, ...values: any[]) { - return createPrismaPromise((transaction) => { + return this._createPrismaPromise((transaction) => { if ((query as TemplateStringsArray).raw !== undefined || (query as Sql).sql !== undefined) { - return this.$executeRawInternal(transaction, '$executeRaw', [query, ...values]) + const [sql, argsMapper] = toSql(query, values) + checkAlter( + this._activeProvider, + sql.text, + sql.values, + Array.isArray(query) ? 'prisma.$executeRaw``' : 'prisma.$executeRaw(sql``)', + ) + return this.$executeRawInternal(transaction, '$executeRaw', sql, argsMapper) } throw new PrismaClientValidationError(`\`$executeRaw\` is a tag function, please use it like the following: @@ -643,7 +678,8 @@ Or read our docs at https://www.prisma.io/docs/concepts/components/prisma-client * @returns */ $executeRawUnsafe(query: string, ...values: RawValue[]) { - return createPrismaPromise((transaction) => { + return this._createPrismaPromise((transaction) => { + checkAlter(this._activeProvider, query, values, 'prisma.$executeRawUnsafe(, [...values])') return this.$executeRawInternal(transaction, '$executeRawUnsafe', [query, ...values]) }) } @@ -654,19 +690,20 @@ Or read our docs at https://www.prisma.io/docs/concepts/components/prisma-client * @param command * @returns */ - $runCommandRaw(command: object) { + $runCommandRaw(command: Record) { if (config.activeProvider !== 'mongodb') { throw new PrismaClientValidationError( `The ${config.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`, ) } - return createPrismaPromise((transaction) => { + return this._createPrismaPromise((transaction) => { return this._request({ - args: { command: command }, + args: command, clientMethod: '$runCommandRaw', dataPath: [], action: 'runCommandRaw', + argsMapper: rawCommandArgsMapper, callsite: getCallSite(this._errorFormat), transaction: transaction, }) @@ -680,15 +717,17 @@ Or read our docs at https://www.prisma.io/docs/concepts/components/prisma-client transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, + middlewareArgsMapper?: MiddlewareArgsMapper, ) { return this._request({ action: 'queryRaw', args, transaction, clientMethod, - argsMapper: rawQueryArgsMapper(this, clientMethod), + argsMapper: rawQueryArgsMapper(this._activeProvider, clientMethod), callsite: getCallSite(this._errorFormat), dataPath: [], + middlewareArgsMapper, }).then(deserializeRawResults) } @@ -701,9 +740,9 @@ Or read our docs at https://www.prisma.io/docs/concepts/components/prisma-client * @returns */ $queryRaw(query: TemplateStringsArray | Sql, ...values: any[]) { - return createPrismaPromise((transaction) => { + return this._createPrismaPromise((transaction) => { if ((query as TemplateStringsArray).raw !== undefined || (query as Sql).sql !== undefined) { - return this.$queryRawInternal(transaction, '$queryRaw', [query, ...values]) + return this.$queryRawInternal(transaction, '$queryRaw', ...toSql(query, values)) } throw new PrismaClientValidationError(`\`$queryRaw\` is a tag function, please use it like the following: @@ -725,7 +764,7 @@ Or read our docs at https://www.prisma.io/docs/concepts/components/prisma-client * @returns */ $queryRawUnsafe(query: string, ...values: RawValue[]) { - return createPrismaPromise((transaction) => { + return this._createPrismaPromise((transaction) => { return this.$queryRawInternal(transaction, '$queryRawUnsafe', [query, ...values]) }) } @@ -780,7 +819,8 @@ Or read our docs at https://www.prisma.io/docs/concepts/components/prisma-client try { // execute user logic with a proxied the client const transaction = { kind: 'itx', ...info } as const - result = await callback(transactionProxy(this, transaction)) + + result = await callback(this._createItxClient(transaction)) // it went well, then we commit the transaction await this._engine.transaction('commit', headers, info) @@ -794,6 +834,17 @@ Or read our docs at https://www.prisma.io/docs/concepts/components/prisma-client return result } + _createItxClient(transaction: PrismaPromiseInteractiveTransaction) { + const rawClient = unApplyModelsAndClientExtensions(this) + return applyModelsAndClientExtensions( + createCompositeProxy(rawClient, [ + addProperty('_createPrismaPromise', () => createPrismaPromiseFactory(transaction)), + addProperty(TX_ID, () => transaction.id), + removeProperties(itxClientDenyList), + ]), + ) + } + /** * Execute queries within a transaction * @param input a callback or a query list @@ -825,10 +876,11 @@ Or read our docs at https://www.prisma.io/docs/concepts/components/prisma-client _request(internalParams: InternalRequestParams): Promise { // this is the otel context that is active at the callsite internalParams.otelParentCtx = this._tracingHelper.getActiveContext() + const middlewareArgsMapper = internalParams.middlewareArgsMapper ?? noopMiddlewareArgsMapper // make sure that we don't leak extra properties to users const params: QueryMiddlewareParams = { - args: internalParams.args, + args: middlewareArgsMapper.requestArgsToMiddlewareArgs(internalParams.args), dataPath: internalParams.dataPath, runInTransaction: Boolean(internalParams.transaction), action: internalParams.action, @@ -870,17 +922,20 @@ Or read our docs at https://www.prisma.io/docs/concepts/components/prisma-client // no middleware? then we just proceed with request execution // before we send the execution request, we use the changed params - const { runInTransaction, ...changedRequestParams } = changedMiddlewareParams + const { runInTransaction, args, ...changedRequestParams } = changedMiddlewareParams const requestParams = { ...internalParams, ...changedRequestParams, } - // if middleware switched off `runInTransaction`, unset - // `transaction` property on request as well so it will be executed outside - // of transaction - if (!runInTransaction) { - requestParams.transaction = undefined + if (args) { + requestParams.args = middlewareArgsMapper.middlewareArgsToRequestArgs(args) + } + + // if middleware switched off `runInTransaction`, unset `transaction` + // property on request as well so it will be executed outside of the tx + if (internalParams.transaction !== undefined && runInTransaction === false) { + delete requestParams.transaction // client extensions check for this } return applyQueryExtensions(this, requestParams) // also executes the query @@ -943,7 +998,7 @@ Or read our docs at https://www.prisma.io/docs/concepts/components/prisma-client debug(`Prisma Client call:`) debug( `prisma.${clientMethod}(${printJsonWithErrors({ - ast: args, + ast: args as object, keyPaths: [], valuePaths: [], missingItems: [], @@ -962,6 +1017,7 @@ Or read our docs at https://www.prisma.io/docs/concepts/components/prisma-client protocolMessage: message, protocolEncoder, modelName: model, + action, clientMethod, dataPath, rejectOnNotFound, @@ -1031,51 +1087,6 @@ Or read our docs at https://www.prisma.io/docs/concepts/components/prisma-client return PrismaClient } -const forbidden: Array = ['$connect', '$disconnect', '$on', '$transaction', '$use', '$extends'] - -/** - * Proxy that takes over the client promises to pass `txId` - * @param thing to be proxied - * @param transaction to be passed down to {@link RequestHandler} - * @returns - */ -function transactionProxy(thing: T, transaction: PrismaPromiseInteractiveTransaction): T { - // we only wrap within a proxy if it's possible: if it's an object - if (typeof thing !== 'object') return thing - - return new Proxy(thing as any as object, { - get: (target, prop) => { - // we don't want to allow any calls to our `forbidden` methods - if (forbidden.includes(prop as string)) return undefined - - if (prop === TX_ID) return transaction?.id // secret accessor to the txId - - // we override and handle every function call within the proxy - if (typeof target[prop] === 'function') { - return (...args: unknown[]) => { - // we hijack promise calls to pass txId to prisma promises - if (prop === 'then') return target[prop](args[0], args[1], transaction) - if (prop === 'catch') return target[prop](args[0], transaction) - if (prop === 'finally') return target[prop](args[0], transaction) - - // if it's not the end promise, result is also tx-proxied - return transactionProxy(target[prop](...args), transaction) - } - } - - // if it's an object prop, then we keep on making it proxied - return transactionProxy(target[prop], transaction) - }, - - has(target, prop) { - if (forbidden.includes(prop)) { - return false - } - return Reflect.has(target, prop) - }, - }) as any as T -} - const rejectOnNotFoundReplacements = { findUnique: 'findUniqueOrThrow', findFirst: 'findFirstOrThrow', @@ -1099,3 +1110,15 @@ function warnAboutRejectOnNotFound( ) } } + +function toSql(query: TemplateStringsArray | Sql, values: unknown[]): [Sql, MiddlewareArgsMapper] { + if (isTemplateStringArray(query)) { + return [new Sql(query, values), templateStringMiddlewareArgsMapper] + } + + return [query, sqlMiddlewareArgsMapper] +} + +function isTemplateStringArray(value: unknown): value is TemplateStringsArray { + return Array.isArray(value) && Array.isArray(value['raw']) +} diff --git a/packages/client/src/runtime/index-browser.ts b/packages/client/src/runtime/index-browser.ts index e3c8bff2a65a..a706d532e4e7 100644 --- a/packages/client/src/runtime/index-browser.ts +++ b/packages/client/src/runtime/index-browser.ts @@ -1,3 +1,7 @@ +import * as Public from './core/public' + export { objectEnumValues } from './object-enums' export { makeStrictEnum } from './strictEnum' export { default as Decimal } from 'decimal.js' + +export { Public } diff --git a/packages/client/src/runtime/index.ts b/packages/client/src/runtime/index.ts index f9603b0686b0..e24b49d3e1f4 100644 --- a/packages/client/src/runtime/index.ts +++ b/packages/client/src/runtime/index.ts @@ -1,6 +1,8 @@ import * as Extensions from './core/extensions' +import * as Public from './core/public' import * as Types from './core/types' import { Payload } from './core/types' +import type { PrismaPromise } from './core/types/Public' export { PrismaClientInitializationError } from './core/errors/PrismaClientInitializationError' export { PrismaClientKnownRequestError } from './core/errors/PrismaClientKnownRequestError' @@ -33,11 +35,17 @@ export { empty, join, raw, Sql, default as sqltag } from 'sql-template-tag' export { Types } export { Extensions } +export { Public } export { warnOnce } from '@prisma/internals' /** - * Payload is already exported via Types but tsc will complain that it isn't reachable + * Payload, PrismaPromise and Extensions types are already exported via Types but tsc + * won't be able to trace them correctly back to runtime module and fail with either + * "... is using the type X but can not be named" or "The inferred type of this node exceeds the maximum length" error. * The issue lies with the type bundler which does not add exports for dependent types * TODO: Maybe simply exporting all types in runtime will do the trick */ -export { type Payload } +export { type Payload, type PrismaPromise } + +export * from './core/types/Extensions' +export type { ITXClientDenyList } from './itxClientDenyList' diff --git a/packages/client/src/runtime/itxClientDenyList.ts b/packages/client/src/runtime/itxClientDenyList.ts new file mode 100644 index 000000000000..a16c3b4b4e91 --- /dev/null +++ b/packages/client/src/runtime/itxClientDenyList.ts @@ -0,0 +1,5 @@ +const denylist = ['$connect', '$disconnect', '$on', '$transaction', '$use', '$extends'] as const + +export const itxClientDenyList = denylist as ReadonlyArray + +export type ITXClientDenyList = (typeof denylist)[number] diff --git a/packages/client/src/runtime/query.ts b/packages/client/src/runtime/query.ts index 67ac89075c91..2173e8850a4b 100644 --- a/packages/client/src/runtime/query.ts +++ b/packages/client/src/runtime/query.ts @@ -611,7 +611,7 @@ function stringify(value: any, inputType?: DMMF.SchemaArgInputType) { } if (value instanceof FieldRefImpl) { - return `{ _ref: ${JSON.stringify(value.name)}}` + return `{ _ref: ${JSON.stringify(value.name)}, _container: ${JSON.stringify(value.modelName)}}` } if (Object.prototype.toString.call(value) === '[object BigInt]') { diff --git a/packages/client/src/runtime/utils/deepCloneArgs.ts b/packages/client/src/runtime/utils/deepCloneArgs.ts new file mode 100644 index 000000000000..484c9f9c1fe2 --- /dev/null +++ b/packages/client/src/runtime/utils/deepCloneArgs.ts @@ -0,0 +1,82 @@ +import { assertNever } from '@prisma/internals' +import Decimal from 'decimal.js' +import { Sql } from 'sql-template-tag' + +import { isFieldRef } from '../core/model/FieldRef' +import { RawQueryArgs } from '../core/raw-query/RawQueryArgs' +import { JsArgs, JsInputValue } from '../core/types/JsApi' +import { ObjectEnumValue } from '../object-enums' +import { isDate } from './date' +import { isDecimalJsLike } from './decimalJsLike' + +export function deepCloneArgs(args: JsArgs | RawQueryArgs): JsArgs | RawQueryArgs { + if (args instanceof Sql) { + return cloneSql(args) + } + + if (Array.isArray(args)) { + const clone: RawQueryArgs = [args[0]] + + for (let i = 1; i < args.length; i++) { + clone[i] = deepCloneValue(args[i] as JsInputValue) + } + + return clone + } + const clone: JsArgs = {} + for (const k in args) { + clone[k] = deepCloneValue(args[k]) + } + return clone +} + +function cloneSql(rawParam: Sql): Sql { + return new Sql(rawParam.strings, rawParam.values) +} + +// based on https://github.com/lukeed/klona/blob/v2.0.6/src/index.js +function deepCloneValue(x: JsInputValue): JsInputValue { + if (typeof x !== 'object' || x == null || x instanceof ObjectEnumValue || isFieldRef(x)) { + return x + } + + if (isDecimalJsLike(x)) { + return new Decimal(x.toFixed()) + } + + if (isDate(x)) { + return new Date(+x) + } + + if (ArrayBuffer.isView(x)) { + return x.slice(0) + } + + if (Array.isArray(x)) { + let k = x.length + let copy + for (copy = Array(k); k--; ) { + copy[k] = deepCloneValue(x[k]) + } + return copy + } + + if (typeof x === 'object') { + const copy = {} + for (const k in x) { + if (k === '__proto__') { + Object.defineProperty(copy, k, { + value: deepCloneValue(x[k]), + configurable: true, + enumerable: true, + writable: true, + }) + } else { + copy[k] = deepCloneValue(x[k]) + } + } + return copy + } + + assertNever(x, 'Unknown value') +} diff --git a/packages/client/src/runtime/utils/mssqlPreparedStatement.ts b/packages/client/src/runtime/utils/mssqlPreparedStatement.ts index acded77fc553..a25c1dcfe3af 100644 --- a/packages/client/src/runtime/utils/mssqlPreparedStatement.ts +++ b/packages/client/src/runtime/utils/mssqlPreparedStatement.ts @@ -1,4 +1,6 @@ +import type { Sql } from 'sql-template-tag' + // Generate something like: SELECT * FROM User WHERE name = @P1 AND email = @P2 ... -export const mssqlPreparedStatement = (template: ReadonlyArray | TemplateStringsArray) => { - return template.reduce((acc, str, idx) => `${acc}@P${idx}${str}`) +export const mssqlPreparedStatement = (sql: Sql) => { + return sql.strings.reduce((acc, str, idx) => `${acc}@P${idx}${str}`) } diff --git a/packages/client/tests/e2e/bundler-detection-error/tests/main.ts b/packages/client/tests/e2e/bundler-detection-error/tests/main.ts index fab2da36e023..ec25fb743753 100644 --- a/packages/client/tests/e2e/bundler-detection-error/tests/main.ts +++ b/packages/client/tests/e2e/bundler-detection-error/tests/main.ts @@ -6,26 +6,6 @@ afterEach(() => { consoleMock.mockClear() }) -test('importing the the bundled prisma client produces warning messages', () => { - require('../dist/index.js') - - expect(consoleMock.mock.calls[0]).toMatchInlineSnapshot(` -[ - "prisma:warn Your generated Prisma Client could not immediately find its \`schema.prisma\`, falling back to finding it via the current working directory.", -] -`) - expect(consoleMock.mock.calls[1]).toMatchInlineSnapshot(` -[ - "prisma:warn We are interested in learning about your project setup. We'd appreciate if you could take the time to share some information with us.", -] -`) - expect(consoleMock.mock.calls[2]).toMatchInlineSnapshot(` -[ - "prisma:warn Please help us by answering a few questions: https://pris.ly/bundler-investigation", -] -`) -}) - test('bundled prisma client will re-use the schema.prisma via cwd', async () => { const { somePrismaCall } = require('../dist/index.js') diff --git a/packages/client/tests/e2e/default-version/_steps.ts b/packages/client/tests/e2e/default-version/_steps.ts new file mode 100644 index 000000000000..07e7d86ee27b --- /dev/null +++ b/packages/client/tests/e2e/default-version/_steps.ts @@ -0,0 +1,17 @@ +import { $ } from 'zx' + +import { executeSteps } from '../_utils/executeSteps' + +void executeSteps({ + setup: async () => { + await $`pnpm install` + }, + test: async () => { + await $`pnpm exec tsc --noEmit` + await $`pnpm exec jest` + }, + finish: async () => { + await $`echo "done"` + }, + // keep: true, // keep docker open to debug it +}) diff --git a/packages/client/tests/e2e/default-version/package.json b/packages/client/tests/e2e/default-version/package.json new file mode 100644 index 000000000000..4f239663bfe7 --- /dev/null +++ b/packages/client/tests/e2e/default-version/package.json @@ -0,0 +1,13 @@ +{ + "private": true, + "version": "0.0.0", + "main": "index.js", + "scripts": {}, + "dependencies": { + "@prisma/client": "../prisma-client-0.0.0.tgz" + }, + "devDependencies": { + "@types/jest": "29.5.1", + "@types/node": "16.18.11" + } +} diff --git a/packages/client/tests/e2e/default-version/pnpm-lock.yaml b/packages/client/tests/e2e/default-version/pnpm-lock.yaml new file mode 100644 index 000000000000..c4cb58461df5 --- /dev/null +++ b/packages/client/tests/e2e/default-version/pnpm-lock.yaml @@ -0,0 +1,36 @@ +lockfileVersion: '6.1' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +dependencies: + '@prisma/client': + specifier: ../prisma-client-0.0.0.tgz + version: file:../prisma-client-0.0.0.tgz + +devDependencies: + '@types/node': + specifier: 16.18.11 + version: 16.18.11 + +packages: + + /@types/node@16.18.11: + resolution: {integrity: sha512-3oJbGBUWuS6ahSnEq1eN2XrCyf4YsWI8OyCvo7c64zQJNplk3mO84t53o8lfTk+2ji59g5ycfc6qQ3fdHliHuA==} + dev: true + + file:../prisma-client-0.0.0.tgz: + resolution: {integrity: sha512-8p4k7ATSBVdUtgcw2mucWNOFe0xcDA2Btaui5h9nqAURo8OCH5Idfd+1KZzrL+Ip8jLqPHRzJjok3Juj6+dqgw==, tarball: file:../prisma-client-0.0.0.tgz} + name: '@prisma/client' + version: 0.0.0 + engines: {node: '>=14.17'} + requiresBuild: true + peerDependencies: + prisma: '*' + peerDependenciesMeta: + prisma: + optional: true + dev: false + bundledDependencies: + - '@prisma/engines-version' diff --git a/packages/client/tests/e2e/default-version/readme.md b/packages/client/tests/e2e/default-version/readme.md new file mode 100644 index 000000000000..5742a0fb3e2b --- /dev/null +++ b/packages/client/tests/e2e/default-version/readme.md @@ -0,0 +1,3 @@ +# Readme + +Tests that both the client version and the engine can be accessed via the default client. diff --git a/packages/client/tests/e2e/default-version/tests/main.ts b/packages/client/tests/e2e/default-version/tests/main.ts new file mode 100644 index 000000000000..370d72d82c21 --- /dev/null +++ b/packages/client/tests/e2e/default-version/tests/main.ts @@ -0,0 +1,6 @@ +import { Prisma } from '@prisma/client' + +test('example', () => { + expect(Prisma.prismaVersion.client).toMatch(/^\d+\.\d+\.\d+/) + expect(Prisma.prismaVersion.engine).toMatch(/^[a-f0-9]{40}/) +}) diff --git a/packages/client/tests/e2e/default-version/tsconfig.json b/packages/client/tests/e2e/default-version/tsconfig.json new file mode 100644 index 000000000000..1d0b21415338 --- /dev/null +++ b/packages/client/tests/e2e/default-version/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../tsconfig.base.json", + "exclude": ["_steps.ts"] +} diff --git a/packages/client/tests/e2e/engine-not-found-error/binary-targets-incorrectly-pinned/readme.md b/packages/client/tests/e2e/engine-not-found-error/binary-targets-incorrectly-pinned/readme.md index 4d50429af2fc..89ecc6404399 100644 --- a/packages/client/tests/e2e/engine-not-found-error/binary-targets-incorrectly-pinned/readme.md +++ b/packages/client/tests/e2e/engine-not-found-error/binary-targets-incorrectly-pinned/readme.md @@ -1,3 +1,3 @@ # Readme -Test that the engine not found error is thrown when the binary targets was pinned for different platforms. +Test that the engine not found error is thrown when the binary targets were pinned for different platforms. diff --git a/packages/client/tests/e2e/example/_steps.ts b/packages/client/tests/e2e/example/_steps.ts index 240fc3292b58..099f6779a8ce 100644 --- a/packages/client/tests/e2e/example/_steps.ts +++ b/packages/client/tests/e2e/example/_steps.ts @@ -11,8 +11,8 @@ void executeSteps({ test: async () => { await $`pnpm exec prisma -v` await $`ts-node src/index.ts` + await $`pnpm exec tsc --noEmit` await $`pnpm exec jest` - await $`pnpm exec tsc` }, finish: async () => { await $`echo "done"` diff --git a/packages/client/tests/e2e/example/package.json b/packages/client/tests/e2e/example/package.json index 8bb012302c89..a110288ceacb 100644 --- a/packages/client/tests/e2e/example/package.json +++ b/packages/client/tests/e2e/example/package.json @@ -7,6 +7,7 @@ "@prisma/client": "../prisma-client-0.0.0.tgz" }, "devDependencies": { + "@types/jest": "29.5.1", "@types/node": "16.18.11", "prisma": "../prisma-0.0.0.tgz" } diff --git a/packages/client/tests/e2e/example/prisma/schema.prisma b/packages/client/tests/e2e/example/prisma/schema.prisma index 0c148d5f3af8..33ab340c83c6 100644 --- a/packages/client/tests/e2e/example/prisma/schema.prisma +++ b/packages/client/tests/e2e/example/prisma/schema.prisma @@ -3,7 +3,6 @@ generator client { provider = "prisma-client-js" - previewFeatures = ["clientExtensions"] } datasource db { diff --git a/packages/client/tests/e2e/example/tsconfig.json b/packages/client/tests/e2e/example/tsconfig.json index 6249bed01061..1d0b21415338 100644 --- a/packages/client/tests/e2e/example/tsconfig.json +++ b/packages/client/tests/e2e/example/tsconfig.json @@ -1,4 +1,4 @@ { "extends": "../tsconfig.base.json", - "include": ["src/*"] + "exclude": ["_steps.ts"] } diff --git a/packages/client/tests/e2e/issues/19866-ts-composite-declaration/_steps.ts b/packages/client/tests/e2e/issues/19866-ts-composite-declaration/_steps.ts new file mode 100644 index 000000000000..86f879df0569 --- /dev/null +++ b/packages/client/tests/e2e/issues/19866-ts-composite-declaration/_steps.ts @@ -0,0 +1,19 @@ +import { $ } from 'zx' + +import { executeSteps } from '../../_utils/executeSteps' + +void executeSteps({ + setup: async () => { + await $`pnpm install` + await $`pnpm exec prisma generate` + }, + test: async () => { + await $`pnpm exec prisma -v` + await $`ts-node src/index.ts` + await $`pnpm exec tsc` + }, + finish: async () => { + await $`echo "done"` + }, + // keep: true, // keep docker open to debug it +}) diff --git a/packages/client/tests/e2e/community/publish-extensions/package.json b/packages/client/tests/e2e/issues/19866-ts-composite-declaration/package.json similarity index 82% rename from packages/client/tests/e2e/community/publish-extensions/package.json rename to packages/client/tests/e2e/issues/19866-ts-composite-declaration/package.json index 3ed5a46ffae4..259576408449 100644 --- a/packages/client/tests/e2e/community/publish-extensions/package.json +++ b/packages/client/tests/e2e/issues/19866-ts-composite-declaration/package.json @@ -5,7 +5,7 @@ "scripts": {}, "dependencies": { "@prisma/client": "../../prisma-client-0.0.0.tgz", - "simple-ext": "./simple-ext/simple-ext-0.0.0.tgz" + "typescript": "4.9.4" }, "devDependencies": { "@types/node": "16.18.11", diff --git a/packages/client/tests/e2e/issues/19866-ts-composite-declaration/pnpm-lock.yaml b/packages/client/tests/e2e/issues/19866-ts-composite-declaration/pnpm-lock.yaml new file mode 100644 index 000000000000..8a276acac9bf --- /dev/null +++ b/packages/client/tests/e2e/issues/19866-ts-composite-declaration/pnpm-lock.yaml @@ -0,0 +1,55 @@ +lockfileVersion: 5.4 + +specifiers: + '@prisma/client': ../../prisma-client-0.0.0.tgz + '@types/node': 16.18.11 + prisma: ../../prisma-0.0.0.tgz + typescript: 4.9.4 + +dependencies: + '@prisma/client': file:../../prisma-client-0.0.0.tgz_prisma@0.0.0 + typescript: 4.9.4 + +devDependencies: + '@types/node': 16.18.11 + prisma: file:../../prisma-0.0.0.tgz + +packages: + + /@types/node/16.18.11: + resolution: {integrity: sha512-3oJbGBUWuS6ahSnEq1eN2XrCyf4YsWI8OyCvo7c64zQJNplk3mO84t53o8lfTk+2ji59g5ycfc6qQ3fdHliHuA==} + dev: true + + /typescript/4.9.4: + resolution: {integrity: sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==} + engines: {node: '>=4.2.0'} + hasBin: true + dev: false + + file:../../prisma-0.0.0.tgz: + resolution: {integrity: sha512-IISCAXh4BBqpF6/t0OUziAEFMiMb8RmvjXtLbzXzrzfrZdV09wAuPMKzlvgzr0dChG7JJVbijI7pTSN+gN/H6w==, tarball: file:../../prisma-0.0.0.tgz} + name: prisma + version: 0.0.0 + engines: {node: '>=14.17'} + hasBin: true + requiresBuild: true + bundledDependencies: + - '@prisma/engines' + + file:../../prisma-client-0.0.0.tgz_prisma@0.0.0: + resolution: {integrity: sha512-i8Mlm386PYyJjVZvQVJdenMzpQQx3549iozmk1uTRx4z2tJq9NPUnA89TvOwrgYM6r0zhHTIIcnLfsywo5bNGA==, tarball: file:../../prisma-client-0.0.0.tgz} + id: file:../../prisma-client-0.0.0.tgz + name: '@prisma/client' + version: 0.0.0 + engines: {node: '>=14.17'} + requiresBuild: true + peerDependencies: + prisma: '*' + peerDependenciesMeta: + prisma: + optional: true + dependencies: + prisma: file:../../prisma-0.0.0.tgz + dev: false + bundledDependencies: + - '@prisma/engines-version' diff --git a/packages/client/tests/e2e/issues/19866-ts-composite-declaration/prisma/schema.prisma b/packages/client/tests/e2e/issues/19866-ts-composite-declaration/prisma/schema.prisma new file mode 100644 index 000000000000..33ab340c83c6 --- /dev/null +++ b/packages/client/tests/e2e/issues/19866-ts-composite-declaration/prisma/schema.prisma @@ -0,0 +1,35 @@ +// This is your Prisma schema file, +// learn more about it in the docs: https://pris.ly/d/prisma-schema + +generator client { + provider = "prisma-client-js" +} + +datasource db { + provider = "sqlite" + url = "file:./db" +} + +model User { + id Int @id @default(autoincrement()) + email String @unique + name String? + posts Post[] + profile Profile? +} + +model Post { + id Int @id @default(autoincrement()) + title String + content String? + published Boolean @default(false) + author User @relation(fields: [authorId], references: [id]) + authorId Int +} + +model Profile { + id Int @id @default(autoincrement()) + bio String? + user User @relation(fields: [userId], references: [id]) + userId Int @unique +} diff --git a/packages/client/tests/e2e/issues/19866-ts-composite-declaration/readme.md b/packages/client/tests/e2e/issues/19866-ts-composite-declaration/readme.md new file mode 100644 index 000000000000..06c09a215b79 --- /dev/null +++ b/packages/client/tests/e2e/issues/19866-ts-composite-declaration/readme.md @@ -0,0 +1,3 @@ +# 19866-ts-composite-declaration + +Regression test for . diff --git a/packages/client/tests/e2e/issues/19866-ts-composite-declaration/src/index.ts b/packages/client/tests/e2e/issues/19866-ts-composite-declaration/src/index.ts new file mode 100644 index 000000000000..e0a36ca402b9 --- /dev/null +++ b/packages/client/tests/e2e/issues/19866-ts-composite-declaration/src/index.ts @@ -0,0 +1,7 @@ +import { PrismaClient } from '@prisma/client' + +export function getDbClient() { + const client = new PrismaClient().$extends({}) + + return client +} diff --git a/packages/client/tests/e2e/issues/19866-ts-composite-declaration/tsconfig.json b/packages/client/tests/e2e/issues/19866-ts-composite-declaration/tsconfig.json new file mode 100644 index 000000000000..42a2d3b2f726 --- /dev/null +++ b/packages/client/tests/e2e/issues/19866-ts-composite-declaration/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true + }, + "exclude": ["_steps.ts"] +} diff --git a/packages/client/tests/e2e/issues/studio-1128-spawn-enoent/_steps.ts b/packages/client/tests/e2e/issues/studio-1128-spawn-enoent/_steps.ts new file mode 100644 index 000000000000..b3b1c570d1d2 --- /dev/null +++ b/packages/client/tests/e2e/issues/studio-1128-spawn-enoent/_steps.ts @@ -0,0 +1,32 @@ +import { $ } from 'zx' + +import { executeSteps } from '../../_utils/executeSteps' + +void executeSteps({ + setup: async () => { + await $`pnpm install` + await $`pnpm exec prisma db push --force-reset` + }, + + test: async () => { + process.env.DEBUG = 'prisma:studio' + const studio = $`pnpm exec prisma studio` + + for await (const output of studio.stderr) { + // Exit as soon as xdg-open subprocess in studio either spawns or reports failure to spawn + if ( + output.includes('requested to open the url http://localhost:5555') || + output.includes('failed to open the url http://localhost:5555 in browser') + ) { + await studio.nothrow().kill() + return + } + } + + await studio + }, + + finish: async () => { + await $`echo "done"` + }, +}) diff --git a/packages/client/tests/e2e/issues/studio-1128-spawn-enoent/package.json b/packages/client/tests/e2e/issues/studio-1128-spawn-enoent/package.json new file mode 100644 index 000000000000..3209fbc47d27 --- /dev/null +++ b/packages/client/tests/e2e/issues/studio-1128-spawn-enoent/package.json @@ -0,0 +1,10 @@ +{ + "private": true, + "version": "0.0.0", + "dependencies": { + "@prisma/client": "../../prisma-client-0.0.0.tgz" + }, + "devDependencies": { + "prisma": "../../prisma-0.0.0.tgz" + } +} diff --git a/packages/client/tests/e2e/issues/studio-1128-spawn-enoent/prisma/schema.prisma b/packages/client/tests/e2e/issues/studio-1128-spawn-enoent/prisma/schema.prisma new file mode 100644 index 000000000000..0c24afbac80f --- /dev/null +++ b/packages/client/tests/e2e/issues/studio-1128-spawn-enoent/prisma/schema.prisma @@ -0,0 +1,13 @@ +generator client { + provider = "prisma-client-js" +} + +datasource db { + provider = "sqlite" + url = "file:./dev.db" +} + +model ModelA { + id Int @id @default(autoincrement()) + name String +} diff --git a/packages/client/tests/e2e/issues/studio-1128-spawn-enoent/readme.md b/packages/client/tests/e2e/issues/studio-1128-spawn-enoent/readme.md new file mode 100644 index 000000000000..c1eb49527ff4 --- /dev/null +++ b/packages/client/tests/e2e/issues/studio-1128-spawn-enoent/readme.md @@ -0,0 +1,3 @@ +# studio-1128-spawn-enoent + +[Studio issue #1128](https://github.com/prisma/studio/issues/1128): `Error: spawn xdg-open ENOENT` when running `prisma studio`. diff --git a/packages/client/tests/e2e/community/publish-extensions/tsconfig.json b/packages/client/tests/e2e/issues/studio-1128-spawn-enoent/tsconfig.json similarity index 100% rename from packages/client/tests/e2e/community/publish-extensions/tsconfig.json rename to packages/client/tests/e2e/issues/studio-1128-spawn-enoent/tsconfig.json diff --git a/packages/client/tests/e2e/jest.config.js b/packages/client/tests/e2e/jest.config.js index 9e954104a54d..514e5f5eae5e 100644 --- a/packages/client/tests/e2e/jest.config.js +++ b/packages/client/tests/e2e/jest.config.js @@ -4,6 +4,7 @@ module.exports = () => { const configCommon = { rootDir: process.cwd(), testMatch: ['/tests/*.ts'], + testPathIgnorePatterns: ['.*\\.d\\.ts'], transformIgnorePatterns: [], testTimeout: 60_000, } diff --git a/packages/client/tests/e2e/platform-caching-error/tests/vercel-auto-generate.ts b/packages/client/tests/e2e/platform-caching-error/tests/vercel-auto-generate.ts index 94ff74382ba2..f57374c228b6 100644 --- a/packages/client/tests/e2e/platform-caching-error/tests/vercel-auto-generate.ts +++ b/packages/client/tests/e2e/platform-caching-error/tests/vercel-auto-generate.ts @@ -12,7 +12,7 @@ test('vercel env var + auto generate', () => { prisma.$connect() } catch (e) { expect(e).toMatchInlineSnapshot(` -[Error: Prisma has detected that this project was built on Vercel, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. +[PrismaClientInitializationError: Prisma has detected that this project was built on Vercel, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. Learn how: https://pris.ly/d/vercel-build] `) diff --git a/packages/client/tests/e2e/community/publish-extensions/_steps.ts b/packages/client/tests/e2e/publish-extensions/_steps.ts similarity index 75% rename from packages/client/tests/e2e/community/publish-extensions/_steps.ts rename to packages/client/tests/e2e/publish-extensions/_steps.ts index b8ea333ae8fd..277827ff5e4b 100644 --- a/packages/client/tests/e2e/community/publish-extensions/_steps.ts +++ b/packages/client/tests/e2e/publish-extensions/_steps.ts @@ -1,6 +1,6 @@ import { $, cd } from 'zx' -import { executeSteps } from '../../_utils/executeSteps' +import { executeSteps } from '../_utils/executeSteps' void executeSteps({ setup: async () => { @@ -16,9 +16,8 @@ void executeSteps({ await $`pnpm exec prisma generate` }, test: async () => { - await $`pnpm exec prisma -v` - await $`ts-node src/index.ts` - await $`pnpm exec tsc` + await $`pnpm exec tsc --noEmit` + await $`pnpm exec jest` }, finish: async () => { await $`echo "done"` diff --git a/packages/client/tests/e2e/publish-extensions/package.json b/packages/client/tests/e2e/publish-extensions/package.json new file mode 100644 index 000000000000..ff61e10276e4 --- /dev/null +++ b/packages/client/tests/e2e/publish-extensions/package.json @@ -0,0 +1,15 @@ +{ + "private": true, + "version": "0.0.0", + "main": "index.js", + "scripts": {}, + "dependencies": { + "@prisma/client": "../prisma-client-0.0.0.tgz", + "simple-ext": "./simple-ext/simple-ext-0.0.0.tgz" + }, + "devDependencies": { + "@types/jest": "29.5.1", + "@types/node": "16.18.11", + "prisma": "../prisma-0.0.0.tgz" + } +} diff --git a/packages/client/tests/e2e/publish-extensions/pnpm-lock.yaml b/packages/client/tests/e2e/publish-extensions/pnpm-lock.yaml new file mode 100644 index 000000000000..7b75a80e3cfa --- /dev/null +++ b/packages/client/tests/e2e/publish-extensions/pnpm-lock.yaml @@ -0,0 +1,386 @@ +lockfileVersion: 5.4 + +specifiers: + '@prisma/client': ../prisma-client-0.0.0.tgz + '@types/jest': 29.5.1 + '@types/node': 16.18.11 + prisma: ../prisma-0.0.0.tgz + simple-ext: ./simple-ext/simple-ext-0.0.0.tgz + +dependencies: + '@prisma/client': file:../prisma-client-0.0.0.tgz_prisma@0.0.0 + simple-ext: file:simple-ext/simple-ext-0.0.0.tgz_@prisma+client@0.0.0 + +devDependencies: + '@types/jest': 29.5.1 + '@types/node': 16.18.11 + prisma: file:../prisma-0.0.0.tgz + +packages: + + /@babel/code-frame/7.22.5: + resolution: {integrity: sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/highlight': 7.22.5 + dev: true + + /@babel/helper-validator-identifier/7.22.5: + resolution: {integrity: sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/highlight/7.22.5: + resolution: {integrity: sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-validator-identifier': 7.22.5 + chalk: 2.4.2 + js-tokens: 4.0.0 + dev: true + + /@jest/expect-utils/29.5.0: + resolution: {integrity: sha512-fmKzsidoXQT2KwnrwE0SQq3uj8Z763vzR8LnLBwC2qYWEFpjX8daRsk6rHUM1QvNlEW/UJXNXm59ztmJJWs2Mg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + jest-get-type: 29.4.3 + dev: true + + /@jest/schemas/29.4.3: + resolution: {integrity: sha512-VLYKXQmtmuEz6IxJsrZwzG9NvtkQsWNnWMsKxqWNu3+CnfzJQhp0WDDKWLVV9hLKr0l3SLLFRqcYHjhtyuDVxg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@sinclair/typebox': 0.25.24 + dev: true + + /@jest/types/29.5.0: + resolution: {integrity: sha512-qbu7kN6czmVRc3xWFQcAN03RAUamgppVUdXrvl1Wr3jlNF93o9mJbGcDWrwGB6ht44u7efB1qCFgVQmca24Uog==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/schemas': 29.4.3 + '@types/istanbul-lib-coverage': 2.0.4 + '@types/istanbul-reports': 3.0.1 + '@types/node': 16.18.11 + '@types/yargs': 17.0.24 + chalk: 4.1.2 + dev: true + + /@sinclair/typebox/0.25.24: + resolution: {integrity: sha512-XJfwUVUKDHF5ugKwIcxEgc9k8b7HbznCp6eUfWgu710hMPNIO4aw4/zB5RogDQz8nd6gyCDpU9O/m6qYEWY6yQ==} + dev: true + + /@types/istanbul-lib-coverage/2.0.4: + resolution: {integrity: sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==} + dev: true + + /@types/istanbul-lib-report/3.0.0: + resolution: {integrity: sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==} + dependencies: + '@types/istanbul-lib-coverage': 2.0.4 + dev: true + + /@types/istanbul-reports/3.0.1: + resolution: {integrity: sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==} + dependencies: + '@types/istanbul-lib-report': 3.0.0 + dev: true + + /@types/jest/29.5.1: + resolution: {integrity: sha512-tEuVcHrpaixS36w7hpsfLBLpjtMRJUE09/MHXn923LOVojDwyC14cWcfc0rDs0VEfUyYmt/+iX1kxxp+gZMcaQ==} + dependencies: + expect: 29.5.0 + pretty-format: 29.5.0 + dev: true + + /@types/node/16.18.11: + resolution: {integrity: sha512-3oJbGBUWuS6ahSnEq1eN2XrCyf4YsWI8OyCvo7c64zQJNplk3mO84t53o8lfTk+2ji59g5ycfc6qQ3fdHliHuA==} + dev: true + + /@types/stack-utils/2.0.1: + resolution: {integrity: sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==} + dev: true + + /@types/yargs-parser/21.0.0: + resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==} + dev: true + + /@types/yargs/17.0.24: + resolution: {integrity: sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw==} + dependencies: + '@types/yargs-parser': 21.0.0 + dev: true + + /ansi-styles/3.2.1: + resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} + engines: {node: '>=4'} + dependencies: + color-convert: 1.9.3 + dev: true + + /ansi-styles/4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + dependencies: + color-convert: 2.0.1 + dev: true + + /ansi-styles/5.2.0: + resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} + engines: {node: '>=10'} + dev: true + + /braces/3.0.2: + resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} + engines: {node: '>=8'} + dependencies: + fill-range: 7.0.1 + dev: true + + /chalk/2.4.2: + resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} + engines: {node: '>=4'} + dependencies: + ansi-styles: 3.2.1 + escape-string-regexp: 1.0.5 + supports-color: 5.5.0 + dev: true + + /chalk/4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + dev: true + + /ci-info/3.8.0: + resolution: {integrity: sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==} + engines: {node: '>=8'} + dev: true + + /color-convert/1.9.3: + resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + dependencies: + color-name: 1.1.3 + dev: true + + /color-convert/2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + dependencies: + color-name: 1.1.4 + dev: true + + /color-name/1.1.3: + resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + dev: true + + /color-name/1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + dev: true + + /diff-sequences/29.4.3: + resolution: {integrity: sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dev: true + + /escape-string-regexp/1.0.5: + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} + engines: {node: '>=0.8.0'} + dev: true + + /escape-string-regexp/2.0.0: + resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} + engines: {node: '>=8'} + dev: true + + /expect/29.5.0: + resolution: {integrity: sha512-yM7xqUrCO2JdpFo4XpM82t+PJBFybdqoQuJLDGeDX2ij8NZzqRHyu3Hp188/JX7SWqud+7t4MUdvcgGBICMHZg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/expect-utils': 29.5.0 + jest-get-type: 29.4.3 + jest-matcher-utils: 29.5.0 + jest-message-util: 29.5.0 + jest-util: 29.5.0 + dev: true + + /fill-range/7.0.1: + resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} + engines: {node: '>=8'} + dependencies: + to-regex-range: 5.0.1 + dev: true + + /graceful-fs/4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + dev: true + + /has-flag/3.0.0: + resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} + engines: {node: '>=4'} + dev: true + + /has-flag/4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + dev: true + + /is-number/7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + dev: true + + /jest-diff/29.5.0: + resolution: {integrity: sha512-LtxijLLZBduXnHSniy0WMdaHjmQnt3g5sa16W4p0HqukYTTsyTW3GD1q41TyGl5YFXj/5B2U6dlh5FM1LIMgxw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + chalk: 4.1.2 + diff-sequences: 29.4.3 + jest-get-type: 29.4.3 + pretty-format: 29.5.0 + dev: true + + /jest-get-type/29.4.3: + resolution: {integrity: sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dev: true + + /jest-matcher-utils/29.5.0: + resolution: {integrity: sha512-lecRtgm/rjIK0CQ7LPQwzCs2VwW6WAahA55YBuI+xqmhm7LAaxokSB8C97yJeYyT+HvQkH741StzpU41wohhWw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + chalk: 4.1.2 + jest-diff: 29.5.0 + jest-get-type: 29.4.3 + pretty-format: 29.5.0 + dev: true + + /jest-message-util/29.5.0: + resolution: {integrity: sha512-Kijeg9Dag6CKtIDA7O21zNTACqD5MD/8HfIV8pdD94vFyFuer52SigdC3IQMhab3vACxXMiFk+yMHNdbqtyTGA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@babel/code-frame': 7.22.5 + '@jest/types': 29.5.0 + '@types/stack-utils': 2.0.1 + chalk: 4.1.2 + graceful-fs: 4.2.11 + micromatch: 4.0.5 + pretty-format: 29.5.0 + slash: 3.0.0 + stack-utils: 2.0.6 + dev: true + + /jest-util/29.5.0: + resolution: {integrity: sha512-RYMgG/MTadOr5t8KdhejfvUU82MxsCu5MF6KuDUHl+NuwzUt+Sm6jJWxTJVrDR1j5M/gJVCPKQEpWXY+yIQ6lQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/types': 29.5.0 + '@types/node': 16.18.11 + chalk: 4.1.2 + ci-info: 3.8.0 + graceful-fs: 4.2.11 + picomatch: 2.3.1 + dev: true + + /js-tokens/4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + dev: true + + /micromatch/4.0.5: + resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} + engines: {node: '>=8.6'} + dependencies: + braces: 3.0.2 + picomatch: 2.3.1 + dev: true + + /picomatch/2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + dev: true + + /pretty-format/29.5.0: + resolution: {integrity: sha512-V2mGkI31qdttvTFX7Mt4efOqHXqJWMu4/r66Xh3Z3BwZaPfPJgp6/gbwoujRpPUtfEF6AUUWx3Jim3GCw5g/Qw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/schemas': 29.4.3 + ansi-styles: 5.2.0 + react-is: 18.2.0 + dev: true + + /react-is/18.2.0: + resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} + dev: true + + /slash/3.0.0: + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} + dev: true + + /stack-utils/2.0.6: + resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} + engines: {node: '>=10'} + dependencies: + escape-string-regexp: 2.0.0 + dev: true + + /supports-color/5.5.0: + resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} + engines: {node: '>=4'} + dependencies: + has-flag: 3.0.0 + dev: true + + /supports-color/7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + dependencies: + has-flag: 4.0.0 + dev: true + + /to-regex-range/5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + dependencies: + is-number: 7.0.0 + dev: true + + file:../prisma-0.0.0.tgz: + resolution: {integrity: sha512-rccAkx2WA0zv2oBeSomRmYdT5oGkE9rA2NvczAeFxUqfMENeP/ZFiHtccwaTcCcxSF+q8O+sX8Q9ksXCIcH5Vg==, tarball: file:../prisma-0.0.0.tgz} + name: prisma + version: 0.0.0 + engines: {node: '>=14.17'} + hasBin: true + requiresBuild: true + bundledDependencies: + - '@prisma/engines' + + file:../prisma-client-0.0.0.tgz_prisma@0.0.0: + resolution: {integrity: sha512-dEGflcYN9i1kSeDykFQL/hptz2yPkbE1gZ3RdB+zEs05ILRHiMQr6BMXQS6ZQxCF9cfrznEdic+wxtTDkqMF+w==, tarball: file:../prisma-client-0.0.0.tgz} + id: file:../prisma-client-0.0.0.tgz + name: '@prisma/client' + version: 0.0.0 + engines: {node: '>=14.17'} + requiresBuild: true + peerDependencies: + prisma: '*' + peerDependenciesMeta: + prisma: + optional: true + dependencies: + prisma: file:../prisma-0.0.0.tgz + dev: false + bundledDependencies: + - '@prisma/engines-version' + + file:simple-ext/simple-ext-0.0.0.tgz_@prisma+client@0.0.0: + resolution: {integrity: sha512-J4ecnPui8KwWoXEe5f7o0UTcuBtEbTWX24f7sO6U1ei1RMrKUFMSbixP0/KE9Jmbcu+C5pC74lxrxJ2VL7KUfw==, tarball: file:simple-ext/simple-ext-0.0.0.tgz} + id: file:simple-ext/simple-ext-0.0.0.tgz + name: simple-ext + version: 0.0.0 + peerDependencies: + '@prisma/client': ../../prisma-client-0.0.0.tgz + dependencies: + '@prisma/client': file:../prisma-client-0.0.0.tgz_prisma@0.0.0 + dev: false diff --git a/packages/client/tests/e2e/community/publish-extensions/prisma/schema.prisma b/packages/client/tests/e2e/publish-extensions/prisma/schema.prisma similarity index 100% rename from packages/client/tests/e2e/community/publish-extensions/prisma/schema.prisma rename to packages/client/tests/e2e/publish-extensions/prisma/schema.prisma diff --git a/packages/client/tests/e2e/community/publish-extensions/readme.md b/packages/client/tests/e2e/publish-extensions/readme.md similarity index 68% rename from packages/client/tests/e2e/community/publish-extensions/readme.md rename to packages/client/tests/e2e/publish-extensions/readme.md index 3dac54176a43..4aca85913b1d 100644 --- a/packages/client/tests/e2e/community/publish-extensions/readme.md +++ b/packages/client/tests/e2e/publish-extensions/readme.md @@ -2,4 +2,4 @@ Here we test that types still work even for published extensions. This test uses advanced type utilities since they are mostly needed for generic extensions. The -test isn't exhaustive because whe have functional tests covering all the cases. +test isn't exhaustive because we have functional tests covering all the cases. diff --git a/packages/client/tests/e2e/community/publish-extensions/simple-ext/package.json b/packages/client/tests/e2e/publish-extensions/simple-ext/package.json similarity index 59% rename from packages/client/tests/e2e/community/publish-extensions/simple-ext/package.json rename to packages/client/tests/e2e/publish-extensions/simple-ext/package.json index 9350ab2b5280..7064ce7c9177 100644 --- a/packages/client/tests/e2e/community/publish-extensions/simple-ext/package.json +++ b/packages/client/tests/e2e/publish-extensions/simple-ext/package.json @@ -7,11 +7,11 @@ "build": "tsc" }, "peerDependencies": { - "@prisma/client": "../../../prisma-client-0.0.0.tgz" + "@prisma/client": "../../prisma-client-0.0.0.tgz" }, "devDependencies": { - "@prisma/client": "../../../prisma-client-0.0.0.tgz", - "prisma": "../../../prisma-0.0.0.tgz", + "@prisma/client": "../../prisma-client-0.0.0.tgz", + "prisma": "../../prisma-0.0.0.tgz", "typescript": "4.9.4" } } diff --git a/packages/client/tests/e2e/publish-extensions/simple-ext/pnpm-lock.yaml b/packages/client/tests/e2e/publish-extensions/simple-ext/pnpm-lock.yaml new file mode 100644 index 000000000000..d59c528985d7 --- /dev/null +++ b/packages/client/tests/e2e/publish-extensions/simple-ext/pnpm-lock.yaml @@ -0,0 +1,48 @@ +lockfileVersion: 5.4 + +specifiers: + '@prisma/client': ../../prisma-client-0.0.0.tgz + prisma: ../../prisma-0.0.0.tgz + typescript: 4.9.4 + +devDependencies: + '@prisma/client': file:../../prisma-client-0.0.0.tgz_prisma@0.0.0 + prisma: file:../../prisma-0.0.0.tgz + typescript: 4.9.4 + +packages: + + /typescript/4.9.4: + resolution: {integrity: sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==} + engines: {node: '>=4.2.0'} + hasBin: true + dev: true + + file:../../prisma-0.0.0.tgz: + resolution: {integrity: sha512-rccAkx2WA0zv2oBeSomRmYdT5oGkE9rA2NvczAeFxUqfMENeP/ZFiHtccwaTcCcxSF+q8O+sX8Q9ksXCIcH5Vg==, tarball: file:../../prisma-0.0.0.tgz} + name: prisma + version: 0.0.0 + engines: {node: '>=14.17'} + hasBin: true + requiresBuild: true + dev: true + bundledDependencies: + - '@prisma/engines' + + file:../../prisma-client-0.0.0.tgz_prisma@0.0.0: + resolution: {integrity: sha512-dEGflcYN9i1kSeDykFQL/hptz2yPkbE1gZ3RdB+zEs05ILRHiMQr6BMXQS6ZQxCF9cfrznEdic+wxtTDkqMF+w==, tarball: file:../../prisma-client-0.0.0.tgz} + id: file:../../prisma-client-0.0.0.tgz + name: '@prisma/client' + version: 0.0.0 + engines: {node: '>=14.17'} + requiresBuild: true + peerDependencies: + prisma: '*' + peerDependenciesMeta: + prisma: + optional: true + dependencies: + prisma: file:../../prisma-0.0.0.tgz + dev: true + bundledDependencies: + - '@prisma/engines-version' diff --git a/packages/client/tests/e2e/community/publish-extensions/simple-ext/src/index.ts b/packages/client/tests/e2e/publish-extensions/simple-ext/src/index.ts similarity index 80% rename from packages/client/tests/e2e/community/publish-extensions/simple-ext/src/index.ts rename to packages/client/tests/e2e/publish-extensions/simple-ext/src/index.ts index 098e61a22de7..521b85be8611 100644 --- a/packages/client/tests/e2e/community/publish-extensions/simple-ext/src/index.ts +++ b/packages/client/tests/e2e/publish-extensions/simple-ext/src/index.ts @@ -1,4 +1,4 @@ -import { Prisma } from '@prisma/client/scripts/default-index' +import { Prisma } from '@prisma/client/extension' export const simpleExtension = Prisma.defineExtension({ model: { diff --git a/packages/client/tests/e2e/community/publish-extensions/simple-ext/tsconfig.json b/packages/client/tests/e2e/publish-extensions/simple-ext/tsconfig.json similarity index 100% rename from packages/client/tests/e2e/community/publish-extensions/simple-ext/tsconfig.json rename to packages/client/tests/e2e/publish-extensions/simple-ext/tsconfig.json diff --git a/packages/client/tests/e2e/community/publish-extensions/src/index.ts b/packages/client/tests/e2e/publish-extensions/tests/main.ts similarity index 52% rename from packages/client/tests/e2e/community/publish-extensions/src/index.ts rename to packages/client/tests/e2e/publish-extensions/tests/main.ts index 4efa34650b44..4776fcabc2c8 100644 --- a/packages/client/tests/e2e/community/publish-extensions/src/index.ts +++ b/packages/client/tests/e2e/publish-extensions/tests/main.ts @@ -1,7 +1,13 @@ import { PrismaClient } from '@prisma/client' +import { Prisma } from '@prisma/client/extension' import { simpleExtension } from 'simple-ext' -function main() { +test('prisma versions', () => { + expect(Prisma.prismaVersion.client).toMatch(/^\d+\.\d+\.\d+/) + expect(Prisma.prismaVersion.engine).toMatch(/^[a-f0-9]{40}/) +}) + +test('simple extension', () => { const prisma = new PrismaClient().$extends(simpleExtension) prisma.user.simpleCall({ @@ -11,6 +17,4 @@ function main() { nonExistentField: 2, }, }) -} - -void main() +}) diff --git a/packages/client/tests/e2e/publish-extensions/tsconfig.json b/packages/client/tests/e2e/publish-extensions/tsconfig.json new file mode 100644 index 000000000000..1d0b21415338 --- /dev/null +++ b/packages/client/tests/e2e/publish-extensions/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../tsconfig.base.json", + "exclude": ["_steps.ts"] +} diff --git a/packages/client/tests/functional/_utils/setupFilesAfterEnv.ts b/packages/client/tests/functional/_utils/setupFilesAfterEnv.ts index c4b69f1e6b46..3932149bc6c0 100644 --- a/packages/client/tests/functional/_utils/setupFilesAfterEnv.ts +++ b/packages/client/tests/functional/_utils/setupFilesAfterEnv.ts @@ -59,7 +59,20 @@ function testRepeat(n: number) { return getRepeatProxy(test) } -globalThis.testIf = (condition: boolean) => (condition ? test : test.skip) +// allows to .skip.skip.skip... a test +const skip = new Proxy(it.skip, { + get(target, prop) { + if (prop === 'skip') return it.skip + return target[prop] + }, +}) + +globalThis.beforeAll = process.env.TEST_GENERATE_ONLY === 'true' ? () => {} : beforeAll +globalThis.afterAll = process.env.TEST_GENERATE_ONLY === 'true' ? () => {} : afterAll +globalThis.beforeEach = process.env.TEST_GENERATE_ONLY === 'true' ? () => {} : beforeEach +globalThis.afterEach = process.env.TEST_GENERATE_ONLY === 'true' ? () => {} : afterEach +globalThis.test = process.env.TEST_GENERATE_ONLY === 'true' ? skip : test +globalThis.testIf = (condition: boolean) => (condition && process.env.TEST_GENERATE_ONLY !== 'true' ? test : skip) globalThis.describeIf = (condition: boolean) => (condition ? describe : describe.skip) globalThis.testRepeat = testRepeat diff --git a/packages/client/tests/functional/_utils/setupTestSuiteEnv.ts b/packages/client/tests/functional/_utils/setupTestSuiteEnv.ts index 4d255db3af45..02e2dd26b27e 100644 --- a/packages/client/tests/functional/_utils/setupTestSuiteEnv.ts +++ b/packages/client/tests/functional/_utils/setupTestSuiteEnv.ts @@ -208,7 +208,7 @@ export type DatasourceInfo = { export function setupTestSuiteDbURI(suiteConfig: Record, clientMeta: ClientMeta): DatasourceInfo { const provider = suiteConfig['provider'] as Providers const providerFlavor = suiteConfig['providerFlavor'] as ProviderFlavor | undefined - const dbId = `${faker.random.alphaNumeric(5)}-${process.pid}-${Date.now()}` + const dbId = `${faker.string.alphanumeric(5)}-${process.pid}-${Date.now()}` const { envVarName, newURI } = match(providerFlavor) .with(undefined, () => { diff --git a/packages/client/tests/functional/_utils/setupTestSuiteMatrix.ts b/packages/client/tests/functional/_utils/setupTestSuiteMatrix.ts index b0bc13dfe6bb..1917a1782fe6 100644 --- a/packages/client/tests/functional/_utils/setupTestSuiteMatrix.ts +++ b/packages/client/tests/functional/_utils/setupTestSuiteMatrix.ts @@ -1,3 +1,4 @@ +import { afterAll, beforeAll, test } from '@jest/globals' import fs from 'fs-extra' import path from 'path' @@ -59,6 +60,12 @@ function setupTestSuiteMatrix( const suiteConfigs = getTestSuiteConfigs(suiteMeta) const testPlan = getTestSuitePlan(suiteMeta, suiteConfigs, clientMeta, options) + if (originalEnv.TEST_GENERATE_ONLY === 'true') { + options = options ?? {} + options.skipDefaultClientInstance = true + options.skipDb = true + } + checkMissingProviders({ suiteConfigs, suiteMeta, @@ -150,6 +157,13 @@ function setupTestSuiteMatrix( return setupTestSuiteDatabase(suiteMeta, suiteConfig, [], options?.alterStatementCallback) } + if (originalEnv.TEST_GENERATE_ONLY === 'true') { + // because we have our own custom `test` global call defined that reacts + // to this env var already, we import the original jest `test` and call + // it because we need to run at least one test to generate the client + test('generate only', () => {}) + } + tests(suiteConfig.matrixOptions, { ...suiteMeta, generatedFolder }, clientMeta, setupDatabase) }) } diff --git a/packages/client/tests/functional/batching/tests.ts b/packages/client/tests/functional/batching/tests.ts index 67f5e571edd4..56690a852731 100644 --- a/packages/client/tests/functional/batching/tests.ts +++ b/packages/client/tests/functional/batching/tests.ts @@ -39,6 +39,17 @@ testMatrix.setupTestSuite( }) }) + test('batches findUniqueOrThrow', async () => { + await Promise.allSettled([ + prisma.user.findUniqueOrThrow({ where: { id: id1 } }), + prisma.user.findUniqueOrThrow({ where: { id: id2 } }), + ]) + + await waitFor(() => { + expect(queriesExecuted).toBe(1) + }) + }) + test('does not batch different models', async () => { await Promise.all([ prisma.user.findUnique({ where: { id: id1 } }), diff --git a/packages/client/tests/functional/blog-update/tests.ts b/packages/client/tests/functional/blog-update/tests.ts index a398a237b3b1..1625f3f47575 100644 --- a/packages/client/tests/functional/blog-update/tests.ts +++ b/packages/client/tests/functional/blog-update/tests.ts @@ -9,7 +9,7 @@ declare let prisma: PrismaClient testMatrix.setupTestSuite(() => { test('should create a user and update that field on that user', async () => { const email = faker.internet.email() - const name = faker.name.firstName() + const name = faker.person.firstName() const newEmail = faker.internet.email() await prisma.user.create({ @@ -42,7 +42,7 @@ testMatrix.setupTestSuite(() => { test('should create a user and post and connect them together', async () => { const email = faker.internet.email() - const name = faker.name.firstName() + const name = faker.person.firstName() const title = faker.lorem.slug() const published = true @@ -103,7 +103,7 @@ testMatrix.setupTestSuite(() => { test('should create a user and post and disconnect them', async () => { const email = faker.internet.email() - const name = faker.name.firstName() + const name = faker.person.firstName() const title = faker.lorem.slug() const published = true @@ -168,7 +168,7 @@ testMatrix.setupTestSuite(() => { test('should create a user with posts and a profile and update itself and nested connections setting fields to null', async () => { const someDate = new Date('2020-01-01T00:00:00.348Z') const email = faker.internet.email() - const name = faker.name.firstName() + const name = faker.person.firstName() const newEmail = faker.internet.email() const title = faker.lorem.slug() const content = faker.lorem.sentence() diff --git a/packages/client/tests/functional/composites/selection/_matrix.ts b/packages/client/tests/functional/composites/selection/_matrix.ts new file mode 100644 index 000000000000..6ce62561f786 --- /dev/null +++ b/packages/client/tests/functional/composites/selection/_matrix.ts @@ -0,0 +1,9 @@ +import { defineMatrix } from '../../_utils/defineMatrix' + +export default defineMatrix(() => [ + [ + { + provider: 'mongodb', + }, + ], +]) diff --git a/packages/client/tests/functional/composites/selection/prisma/_schema.ts b/packages/client/tests/functional/composites/selection/prisma/_schema.ts new file mode 100644 index 000000000000..39462cb3cea8 --- /dev/null +++ b/packages/client/tests/functional/composites/selection/prisma/_schema.ts @@ -0,0 +1,36 @@ +import { idForProvider } from '../../../_utils/idForProvider' +import testMatrix from '../_matrix' + +export default testMatrix.setupSchema(({ provider }) => { + return /* Prisma */ ` + generator client { + provider = "prisma-client-js" + } + + datasource db { + provider = "${provider}" + url = env("DATABASE_URI_${provider}") + } + + model User { + id ${idForProvider(provider)} + profile Profile + } + + type Profile { + name Name + alternateName Name? + url String + favoriteThings Thing[] + } + + type Name { + firstName String + lastName String + } + + type Thing { + name String + } + ` +}) diff --git a/packages/client/tests/functional/composites/selection/tests.ts b/packages/client/tests/functional/composites/selection/tests.ts new file mode 100644 index 000000000000..ac1d770dd52b --- /dev/null +++ b/packages/client/tests/functional/composites/selection/tests.ts @@ -0,0 +1,109 @@ +import { expectTypeOf } from 'expect-type' + +import testMatrix from './_matrix' +// @ts-ignore +import { PrismaClient, Profile, User } from './node_modules/@prisma/client' + +declare let prisma: PrismaClient + +testMatrix.setupTestSuite( + () => { + beforeAll(async () => { + await prisma.user.create({ + data: { + profile: { + name: { + firstName: 'Horsey', + lastName: 'McHorseFace', + }, + url: 'https://horsey.example.com', + favoriteThings: [{ name: 'Horsing around at the speed of sound' }], + }, + }, + }) + }) + + test('composites are selected by default', async () => { + const user = await prisma.user.findFirstOrThrow() + expect(user).toHaveProperty('profile') + expect(user.profile).toHaveProperty('url') + expect(user.profile).toHaveProperty('name') + expect(user.profile).toHaveProperty('favoriteThings') + + expectTypeOf(user).toHaveProperty('profile') + expectTypeOf(user.profile).toHaveProperty('url') + expectTypeOf(user.profile).toHaveProperty('name') + expectTypeOf(user.profile.name).not.toBeNullable() + expectTypeOf(user.profile).toHaveProperty('alternateName') + expectTypeOf(user.profile.alternateName).toBeNullable() + expectTypeOf(user.profile).toHaveProperty('favoriteThings') + expectTypeOf(user.profile.favoriteThings).toMatchTypeOf>() + }) + + test('composites can be selected explicitly', async () => { + const user = await prisma.user.findFirstOrThrow({ + select: { + profile: true, + }, + }) + expect(user).toHaveProperty('profile') + expect(user.profile).toHaveProperty('url') + expect(user.profile).toHaveProperty('name') + expect(user.profile).toHaveProperty('favoriteThings') + + expectTypeOf(user).toHaveProperty('profile') + expectTypeOf(user.profile).toHaveProperty('url') + expectTypeOf(user.profile).toHaveProperty('name') + expectTypeOf(user.profile.name).not.toBeNullable() + expectTypeOf(user.profile).toHaveProperty('alternateName') + expectTypeOf(user.profile.alternateName).toBeNullable() + expectTypeOf(user.profile).toHaveProperty('favoriteThings') + expectTypeOf(user.profile.favoriteThings).toMatchTypeOf>() + }) + + test('composites can be selected explicitly on multiple nesting levels', async () => { + const user = await prisma.user.findFirstOrThrow({ + select: { + profile: { + select: { + favoriteThings: true, + name: { + select: { + firstName: true, + }, + }, + }, + }, + }, + }) + expect(user).toHaveProperty('profile') + expect(user.profile).not.toHaveProperty('url') + expect(user.profile).toHaveProperty('name') + expect(user.profile.name).toHaveProperty('firstName') + expect(user.profile.name).not.toHaveProperty('lastName') + + expectTypeOf(user).toHaveProperty('profile') + expectTypeOf(user.profile).not.toHaveProperty('url') + expectTypeOf(user.profile).toHaveProperty('name') + expectTypeOf(user.profile.name).toHaveProperty('firstName') + expectTypeOf(user.profile.name).not.toHaveProperty('lastName') + + expectTypeOf(user.profile).toHaveProperty('favoriteThings') + expectTypeOf(user.profile.favoriteThings).toMatchTypeOf>() + }) + + test('composites are included on default types', () => { + expectTypeOf().toHaveProperty('profile') + expectTypeOf().toHaveProperty('name') + expectTypeOf().toHaveProperty('alternateName') + expectTypeOf().toHaveProperty('favoriteThings') + expectTypeOf().toMatchTypeOf>() + }) + }, + { + optOut: { + from: ['sqlite', 'postgresql', 'mysql', 'cockroachdb', 'sqlserver'], + reason: 'composites are mongo-only feature', + }, + }, +) diff --git a/packages/client/tests/functional/decimal/precision/tests.ts b/packages/client/tests/functional/decimal/precision/tests.ts index dacaf72203db..aa0ecb0af398 100644 --- a/packages/client/tests/functional/decimal/precision/tests.ts +++ b/packages/client/tests/functional/decimal/precision/tests.ts @@ -44,6 +44,8 @@ testMatrix.setupTestSuite( 'decimals should not lose precision when written to db', [decimalArbitrary(Number(precision), Number(scale))], async (decimalString) => { + if (process.env.TEST_GENERATE_ONLY === 'true') return + const result = await prisma.testModel.create({ data: { decimal: new Prisma.Decimal(decimalString), diff --git a/packages/client/tests/functional/default-selection/_matrix.ts b/packages/client/tests/functional/default-selection/_matrix.ts index 8f43b12d20b0..7f7c55e1b9aa 100644 --- a/packages/client/tests/functional/default-selection/_matrix.ts +++ b/packages/client/tests/functional/default-selection/_matrix.ts @@ -21,4 +21,6 @@ export default defineMatrix(() => [ provider: 'sqlserver', }, ], + + [{ previewFeatures: '' }, { previewFeatures: '"clientExtensions"' }], ]) diff --git a/packages/client/tests/functional/default-selection/prisma/_schema.ts b/packages/client/tests/functional/default-selection/prisma/_schema.ts index 99d2fba43446..1ac4dcd1f89b 100644 --- a/packages/client/tests/functional/default-selection/prisma/_schema.ts +++ b/packages/client/tests/functional/default-selection/prisma/_schema.ts @@ -1,7 +1,7 @@ import { foreignKeyForProvider, idForProvider } from '../../_utils/idForProvider' import testMatrix from '../_matrix' -export default testMatrix.setupSchema(({ provider }) => { +export default testMatrix.setupSchema(({ provider, previewFeatures }) => { const fields: string[] = [] const declarations: string[] = [] @@ -35,6 +35,7 @@ export default testMatrix.setupSchema(({ provider }) => { return /* Prisma */ ` generator client { provider = "prisma-client-js" + previewFeatures = [${previewFeatures}] } datasource db { diff --git a/packages/client/tests/functional/extensions/__snapshots__/itx.ts.snap b/packages/client/tests/functional/extensions/__snapshots__/itx.ts.snap new file mode 100644 index 000000000000..0afe377bb820 --- /dev/null +++ b/packages/client/tests/functional/extensions/__snapshots__/itx.ts.snap @@ -0,0 +1,121 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`extensions.itx (provider=cockroachdb) extended client in itx can rollback via custom call 1`] = ` + +Invalid \`prisma.user.create()\` invocation: + + +Unique constraint failed on the fields: (\`email\`) +`; + +exports[`extensions.itx (provider=cockroachdb) extended client in itx can rollback via normal call 1`] = ` + +Invalid \`tx.user.create()\` invocation in +/client/tests/functional/extensions/itx.ts:0:0 + + XX }, + XX }) + XX +→ XX await tx.user.create( +Unique constraint failed on the fields: (\`email\`) +`; + +exports[`extensions.itx (provider=mongodb) extended client in itx can rollback via custom call 1`] = ` + +Invalid \`prisma.user.create()\` invocation: + + +Unique constraint failed on the constraint: \`User_email_key\` +`; + +exports[`extensions.itx (provider=mongodb) extended client in itx can rollback via normal call 1`] = ` + +Invalid \`tx.user.create()\` invocation in +/client/tests/functional/extensions/itx.ts:0:0 + + XX }, + XX }) + XX +→ XX await tx.user.create( +Unique constraint failed on the constraint: \`User_email_key\` +`; + +exports[`extensions.itx (provider=mysql) extended client in itx can rollback via custom call 1`] = ` + +Invalid \`prisma.user.create()\` invocation: + + +Unique constraint failed on the constraint: \`User_email_key\` +`; + +exports[`extensions.itx (provider=mysql) extended client in itx can rollback via normal call 1`] = ` + +Invalid \`tx.user.create()\` invocation in +/client/tests/functional/extensions/itx.ts:0:0 + + XX }, + XX }) + XX +→ XX await tx.user.create( +Unique constraint failed on the constraint: \`User_email_key\` +`; + +exports[`extensions.itx (provider=postgresql) extended client in itx can rollback via custom call 1`] = ` + +Invalid \`prisma.user.create()\` invocation: + + +Unique constraint failed on the fields: (\`email\`) +`; + +exports[`extensions.itx (provider=postgresql) extended client in itx can rollback via normal call 1`] = ` + +Invalid \`tx.user.create()\` invocation in +/client/tests/functional/extensions/itx.ts:0:0 + + XX }, + XX }) + XX +→ XX await tx.user.create( +Unique constraint failed on the fields: (\`email\`) +`; + +exports[`extensions.itx (provider=sqlite) extended client in itx can rollback via custom call 1`] = ` + +Invalid \`prisma.user.create()\` invocation: + + +Unique constraint failed on the fields: (\`email\`) +`; + +exports[`extensions.itx (provider=sqlite) extended client in itx can rollback via normal call 1`] = ` + +Invalid \`tx.user.create()\` invocation in +/client/tests/functional/extensions/itx.ts:0:0 + + XX }, + XX }) + XX +→ XX await tx.user.create( +Unique constraint failed on the fields: (\`email\`) +`; + +exports[`extensions.itx (provider=sqlserver) extended client in itx can rollback via custom call 1`] = ` + +Invalid \`prisma.user.create()\` invocation: + + +Unique constraint failed on the constraint: \`dbo.User\` +`; + +exports[`extensions.itx (provider=sqlserver) extended client in itx can rollback via normal call 1`] = ` + +Invalid \`tx.user.create()\` invocation in +/client/tests/functional/extensions/itx.ts:0:0 + + XX }, + XX }) + XX +→ XX await tx.user.create( +Unique constraint failed on the constraint: \`dbo.User\` +`; diff --git a/packages/client/tests/functional/extensions/enabled/__snapshots__/tx.ts.snap b/packages/client/tests/functional/extensions/__snapshots__/tx.ts.snap similarity index 52% rename from packages/client/tests/functional/extensions/enabled/__snapshots__/tx.ts.snap rename to packages/client/tests/functional/extensions/__snapshots__/tx.ts.snap index bd9bed338fc6..0f749e9dbb0b 100644 --- a/packages/client/tests/functional/extensions/enabled/__snapshots__/tx.ts.snap +++ b/packages/client/tests/functional/extensions/__snapshots__/tx.ts.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`extensions.enabled.tx (provider=cockroachdb) extended client in tx can rollback via custom call 1`] = ` +exports[`extensions.tx (provider=cockroachdb) extended client in tx can rollback via custom call 1`] = ` Invalid \`prisma.user.create()\` invocation: @@ -8,10 +8,10 @@ Invalid \`prisma.user.create()\` invocation: Unique constraint failed on the fields: (\`email\`) `; -exports[`extensions.enabled.tx (provider=cockroachdb) extended client in tx can rollback via normal call 1`] = ` +exports[`extensions.tx (provider=cockroachdb) extended client in tx can rollback via normal call 1`] = ` Invalid \`xprisma.user.create()\` invocation in -/client/tests/functional/extensions/enabled/tx.ts:0:0 +/client/tests/functional/extensions/tx.ts:0:0 XX lastName: 'Smith', XX }, @@ -20,7 +20,7 @@ Invalid \`xprisma.user.create()\` invocation in Unique constraint failed on the fields: (\`email\`) `; -exports[`extensions.enabled.tx (provider=mongodb) extended client in tx can rollback via custom call 1`] = ` +exports[`extensions.tx (provider=mongodb) extended client in tx can rollback via custom call 1`] = ` Invalid \`prisma.user.create()\` invocation: @@ -28,10 +28,10 @@ Invalid \`prisma.user.create()\` invocation: Unique constraint failed on the constraint: \`User_email_key\` `; -exports[`extensions.enabled.tx (provider=mongodb) extended client in tx can rollback via normal call 1`] = ` +exports[`extensions.tx (provider=mongodb) extended client in tx can rollback via normal call 1`] = ` Invalid \`xprisma.user.create()\` invocation in -/client/tests/functional/extensions/enabled/tx.ts:0:0 +/client/tests/functional/extensions/tx.ts:0:0 XX lastName: 'Smith', XX }, @@ -40,7 +40,7 @@ Invalid \`xprisma.user.create()\` invocation in Unique constraint failed on the constraint: \`User_email_key\` `; -exports[`extensions.enabled.tx (provider=mysql) extended client in tx can rollback via custom call 1`] = ` +exports[`extensions.tx (provider=mysql) extended client in tx can rollback via custom call 1`] = ` Invalid \`prisma.user.create()\` invocation: @@ -48,10 +48,10 @@ Invalid \`prisma.user.create()\` invocation: Unique constraint failed on the constraint: \`User_email_key\` `; -exports[`extensions.enabled.tx (provider=mysql) extended client in tx can rollback via normal call 1`] = ` +exports[`extensions.tx (provider=mysql) extended client in tx can rollback via normal call 1`] = ` Invalid \`xprisma.user.create()\` invocation in -/client/tests/functional/extensions/enabled/tx.ts:0:0 +/client/tests/functional/extensions/tx.ts:0:0 XX lastName: 'Smith', XX }, @@ -60,7 +60,7 @@ Invalid \`xprisma.user.create()\` invocation in Unique constraint failed on the constraint: \`User_email_key\` `; -exports[`extensions.enabled.tx (provider=postgresql) extended client in tx can rollback via custom call 1`] = ` +exports[`extensions.tx (provider=postgresql) extended client in tx can rollback via custom call 1`] = ` Invalid \`prisma.user.create()\` invocation: @@ -68,10 +68,10 @@ Invalid \`prisma.user.create()\` invocation: Unique constraint failed on the fields: (\`email\`) `; -exports[`extensions.enabled.tx (provider=postgresql) extended client in tx can rollback via normal call 1`] = ` +exports[`extensions.tx (provider=postgresql) extended client in tx can rollback via normal call 1`] = ` Invalid \`xprisma.user.create()\` invocation in -/client/tests/functional/extensions/enabled/tx.ts:0:0 +/client/tests/functional/extensions/tx.ts:0:0 XX lastName: 'Smith', XX }, @@ -80,7 +80,7 @@ Invalid \`xprisma.user.create()\` invocation in Unique constraint failed on the fields: (\`email\`) `; -exports[`extensions.enabled.tx (provider=sqlite) extended client in tx can rollback via custom call 1`] = ` +exports[`extensions.tx (provider=sqlite) extended client in tx can rollback via custom call 1`] = ` Invalid \`prisma.user.create()\` invocation: @@ -88,10 +88,10 @@ Invalid \`prisma.user.create()\` invocation: Unique constraint failed on the fields: (\`email\`) `; -exports[`extensions.enabled.tx (provider=sqlite) extended client in tx can rollback via normal call 1`] = ` +exports[`extensions.tx (provider=sqlite) extended client in tx can rollback via normal call 1`] = ` Invalid \`xprisma.user.create()\` invocation in -/client/tests/functional/extensions/enabled/tx.ts:0:0 +/client/tests/functional/extensions/tx.ts:0:0 XX lastName: 'Smith', XX }, @@ -100,7 +100,7 @@ Invalid \`xprisma.user.create()\` invocation in Unique constraint failed on the fields: (\`email\`) `; -exports[`extensions.enabled.tx (provider=sqlserver) extended client in tx can rollback via custom call 1`] = ` +exports[`extensions.tx (provider=sqlserver) extended client in tx can rollback via custom call 1`] = ` Invalid \`prisma.user.create()\` invocation: @@ -108,10 +108,10 @@ Invalid \`prisma.user.create()\` invocation: Unique constraint failed on the constraint: \`dbo.User\` `; -exports[`extensions.enabled.tx (provider=sqlserver) extended client in tx can rollback via normal call 1`] = ` +exports[`extensions.tx (provider=sqlserver) extended client in tx can rollback via normal call 1`] = ` Invalid \`xprisma.user.create()\` invocation in -/client/tests/functional/extensions/enabled/tx.ts:0:0 +/client/tests/functional/extensions/tx.ts:0:0 XX lastName: 'Smith', XX }, diff --git a/packages/client/tests/functional/extensions/_matrix.ts b/packages/client/tests/functional/extensions/_matrix.ts new file mode 100644 index 000000000000..8f43b12d20b0 --- /dev/null +++ b/packages/client/tests/functional/extensions/_matrix.ts @@ -0,0 +1,24 @@ +import { defineMatrix } from '../_utils/defineMatrix' + +export default defineMatrix(() => [ + [ + { + provider: 'sqlite', + }, + { + provider: 'postgresql', + }, + { + provider: 'mysql', + }, + { + provider: 'mongodb', + }, + { + provider: 'cockroachdb', + }, + { + provider: 'sqlserver', + }, + ], +]) diff --git a/packages/client/tests/functional/extensions/enabled/client.ts b/packages/client/tests/functional/extensions/client.ts similarity index 66% rename from packages/client/tests/functional/extensions/enabled/client.ts rename to packages/client/tests/functional/extensions/client.ts index 0842ed48611b..741664c112c9 100644 --- a/packages/client/tests/functional/extensions/enabled/client.ts +++ b/packages/client/tests/functional/extensions/client.ts @@ -106,21 +106,45 @@ testMatrix.setupTestSuite(() => { expect(override).toHaveBeenCalled() }) - test('allows to override builtin methods', async () => { + test('allows to override builtin methods', () => { const transactionOverride = jest.fn() + const queryRawOverride = jest.fn() const xprisma = prisma.$extends({ - client: { $transaction: transactionOverride }, + client: { + $transaction() { + transactionOverride() + + return undefined + }, + $queryRaw() { + queryRawOverride() + + return undefined + }, + }, }) - await xprisma.$transaction() + const dataTransaction = xprisma.$transaction() + const dataQueryRaw = xprisma.$queryRaw() + + // @ts-expect-error + void xprisma.$transaction([]) + // @ts-expect-error + void xprisma.$queryRaw('') + + expect(dataTransaction).toBeUndefined() + expect(dataQueryRaw).toBeUndefined() + + expectTypeOf(dataTransaction).toEqualTypeOf() + expectTypeOf(dataQueryRaw).toEqualTypeOf() expect(transactionOverride).toHaveBeenCalled() + expect(queryRawOverride).toHaveBeenCalled() }) test('allows to call builtin methods from extensions', async () => { const xprisma = prisma.$extends({ client: { - // TODO: remove any once types are generated $myTransaction(this: any, ...args: any[]) { return this.$transaction(args) }, @@ -189,13 +213,16 @@ testMatrix.setupTestSuite(() => { expect(results).toEqual([]) }) - test('only accepts methods', () => { - prisma.$extends({ + test('accepts property definition', () => { + const xprisma = prisma.$extends({ client: { - // @ts-expect-error - badInput: 1, + property: 1, }, }) + + xprisma.property + expect(xprisma).toHaveProperty('property', 1) + expectTypeOf(xprisma).toHaveProperty('property').toEqualTypeOf() }) test('error in extension method', () => { @@ -248,7 +275,64 @@ testMatrix.setupTestSuite(() => { }, }) - // @ts-test-if: provider !== 'mongodb' xprisma.$executeRawCustom(Prisma.sql`SELECT * FROM User`, { extra: true }) }) + + test('raw queries can override their default output types', () => { + ;async () => { + const xprisma = prisma.$extends({}) + + const typeDataSql = await xprisma.$transaction([ + // @ts-test-if: provider !== 'mongodb' + xprisma.$executeRaw<1>(Prisma.sql`...`), + // @ts-test-if: provider !== 'mongodb' + xprisma.$executeRaw<2>`...`, + // @ts-test-if: provider !== 'mongodb' + xprisma.$executeRawUnsafe<3>('...'), + // @ts-test-if: provider !== 'mongodb' + xprisma.$queryRaw<4>(Prisma.sql`...`), + // @ts-test-if: provider !== 'mongodb' + xprisma.$queryRaw<5>`...`, + // @ts-test-if: provider !== 'mongodb' + xprisma.$queryRawUnsafe<6>('...'), + ]) + + // @ts-test-if: provider !== 'mongodb' + expectTypeOf(typeDataSql).toEqualTypeOf<[1, 2, 3, 4, 5, 6]>() + + const defaultDataSql = await xprisma.$transaction([ + // @ts-test-if: provider !== 'mongodb' + xprisma.$executeRaw(Prisma.sql`...`), + // @ts-test-if: provider !== 'mongodb' + xprisma.$executeRaw`...`, + // @ts-test-if: provider !== 'mongodb' + xprisma.$executeRawUnsafe('...'), + // @ts-test-if: provider !== 'mongodb' + xprisma.$queryRaw(Prisma.sql`...`), + // @ts-test-if: provider !== 'mongodb' + xprisma.$queryRaw`...`, + // @ts-test-if: provider !== 'mongodb' + xprisma.$queryRawUnsafe('...'), + ]) + + // @ts-test-if: provider !== 'mongodb' + expectTypeOf(defaultDataSql).toEqualTypeOf<[number, number, number, unknown, unknown, unknown]>() + + const typeDataMongo = await xprisma.$transaction([ + // @ts-test-if: provider === 'mongodb' + xprisma.$runCommandRaw<1>({ value: '...' }), + ]) + + // @ts-test-if: provider === 'mongodb' + expectTypeOf(typeDataMongo).toEqualTypeOf<[1]>() + + const defaultDataMongo = await xprisma.$transaction([ + // @ts-test-if: provider === 'mongodb' + xprisma.$runCommandRaw({ value: '...' }), + ]) + + // @ts-test-if: provider === 'mongodb' + expectTypeOf(defaultDataMongo).toEqualTypeOf<[PrismaNamespace.JsonObject]>() + } + }) }) diff --git a/packages/client/tests/functional/extensions/defineExtension.ts b/packages/client/tests/functional/extensions/defineExtension.ts new file mode 100644 index 000000000000..e53c0ee7e130 --- /dev/null +++ b/packages/client/tests/functional/extensions/defineExtension.ts @@ -0,0 +1,667 @@ +import { expectTypeOf } from 'expect-type' + +import { Prisma as PrismaDefault } from '../../../extension' +import testMatrix from './_matrix' +// @ts-ignore +import type { Prisma as PrismaNamespace, PrismaClient } from './node_modules/@prisma/client' + +declare let prisma: PrismaClient +declare let Prisma: typeof PrismaNamespace + +expectTypeOf>().toEqualTypeOf>() + +function clientExtensionCallback() { + return Prisma.defineExtension((client) => { + return client.$extends({ + client: { + $myMethod() {}, + }, + }) + }) +} + +function clientExtensionObject() { + return Prisma.defineExtension({ + client: { + $myMethod() {}, + }, + }) +} + +function modelExtensionCallback() { + return Prisma.defineExtension((client) => { + return client.$extends({ + model: { + user: { + myUserMethod() {}, + }, + }, + }) + }) +} + +function modelExtensionObject() { + return Prisma.defineExtension({ + model: { + user: { + myUserMethod() {}, + }, + }, + }) +} + +function resultExtensionCallback() { + return Prisma.defineExtension((client) => { + return client.$extends({ + result: { + user: { + computedField: { + needs: { id: true }, + compute: () => {}, + }, + }, + }, + }) + }) +} + +function resultExtensionObject() { + return Prisma.defineExtension({ + result: { + user: { + computedField: { + needs: { id: true }, + compute: () => {}, + }, + }, + }, + }) +} + +function clientExtensionCallbackViaDefault() { + return PrismaDefault.defineExtension((client) => { + return client.$extends({ + client: { + $myMethodViaDefault() {}, + }, + }) + }) +} + +function clientExtensionObjectViaDefault() { + return PrismaDefault.defineExtension({ + client: { + $myMethodViaDefault() {}, + }, + }) +} + +function modelExtensionCallbackViaDefault() { + return PrismaDefault.defineExtension((client) => { + return client.$extends({ + model: { + user: { + myUserMethodViaDefault() {}, + }, + }, + }) + }) +} + +function modelExtensionObjectViaDefault() { + return PrismaDefault.defineExtension({ + model: { + user: { + myUserMethodViaDefault() {}, + }, + }, + }) +} + +function modelGenericExtensionCallbackViaDefault() { + return PrismaDefault.defineExtension((client) => { + return client.$extends({ + model: { + $allModels: { + myGenericMethodViaDefault(this: T, _args: PrismaDefault.Exact>) { + // eslint-disable-next-line + const ctx = Prisma.getExtensionContext(this) // just for testing that it is exported + + return {} as { + // just for testing the types + args: A + payload: PrismaDefault.Payload + result: PrismaDefault.Result + } + }, + }, + }, + }) + }) +} + +function modelGenericExtensionObjectViaDefault() { + return PrismaDefault.defineExtension({ + model: { + $allModels: { + myGenericMethodViaDefault(this: T, _args: PrismaDefault.Exact>) { + // eslint-disable-next-line + const ctx = Prisma.getExtensionContext(this) // just for testing that it is exported + + return {} as { + // just for testing the types + args: A + payload: PrismaDefault.Payload + result: PrismaDefault.Result + } + }, + }, + }, + }) +} + +function clientGenericExtensionObjectViaDefault() { + return PrismaDefault.defineExtension({ + client: { + myGenericMethodViaDefault( + this: T, + ..._args: PrismaDefault.Exact]> + ) { + // eslint-disable-next-line + const ctx = Prisma.getExtensionContext(this) // just for testing that it is exported + + return {} as { + // just for testing the types + args: A + payload: PrismaDefault.Payload + result: PrismaDefault.Result + } + }, + }, + }) +} + +// this is just actually used for testing that the type work correctly +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function queryGenericExtensionObjectViaDefault() { + return PrismaDefault.defineExtension({ + query: { + // eslint-disable-next-line @typescript-eslint/require-await + async $queryRaw({ args, operation, query, model }) { + expectTypeOf(args).toMatchTypeOf() + expectTypeOf(args['select']).toMatchTypeOf() + expectTypeOf(operation).toEqualTypeOf() + expectTypeOf(query).toMatchTypeOf() + expectTypeOf(model).toEqualTypeOf() + }, + $allModels: { + // eslint-disable-next-line @typescript-eslint/require-await + async findFirst({ args, operation, query, model }) { + expectTypeOf(args).toMatchTypeOf() + expectTypeOf(operation).toEqualTypeOf() + expectTypeOf(query).toMatchTypeOf() + expectTypeOf(model).toEqualTypeOf() + }, + }, + }, + }) +} + +// this is just actually used for testing that the type work correctly +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function itxWithinGenericExtension() { + return PrismaDefault.defineExtension((client) => { + const xclient = client.$extends({ + client: { + helperMethod() {}, + }, + }) + + void xclient.$transaction((tx) => { + expectTypeOf(tx).toHaveProperty('helperMethod') + expectTypeOf(tx).not.toHaveProperty('$transaction') + expectTypeOf(tx).not.toHaveProperty('$extends') + return Promise.resolve() + }) + + return xclient + }) +} + +function resultExtensionCallbackViaDefault() { + return PrismaDefault.defineExtension((client) => { + return client.$extends({ + result: { + user: { + computedFieldViaDefault: { + needs: { id: true }, + compute: () => {}, + }, + }, + }, + }) + }) +} + +function resultExtensionObjectViaDefault() { + return PrismaDefault.defineExtension({ + result: { + user: { + computedFieldViaDefault: { + needs: { id: true }, + compute: () => {}, + }, + }, + }, + }) +} + +// extension that mirrors the types of all existing methods +function allResultsGenericExtensionObjectViaDefault() { + return PrismaDefault.defineExtension({ + client: { + _$executeRaw(this: T, _args: PrismaDefault.Exact>) { + return {} as PrismaDefault.Result + }, + _$executeRawUnsafe(this: T, _args: PrismaDefault.Exact>) { + return {} as PrismaDefault.Result + }, + _$queryRaw(this: T, _args: PrismaDefault.Exact>) { + return {} as PrismaDefault.Result + }, + _$queryRawUnsafe(this: T, _args: PrismaDefault.Exact>) { + return {} as PrismaDefault.Result + }, + _$runCommandRaw(this: T, _args: PrismaDefault.Exact>) { + return {} as PrismaDefault.Result + }, + }, + model: { + $allModels: { + _aggregate(this: T, _args: PrismaDefault.Exact>) { + return {} as PrismaDefault.Result + }, + _aggregateRaw(this: T, _args: PrismaDefault.Exact>) { + return {} as PrismaDefault.Result + }, + _count(this: T, _args: PrismaDefault.Exact>) { + return {} as PrismaDefault.Result + }, + _create(this: T, _args: PrismaDefault.Exact>) { + return {} as PrismaDefault.Result + }, + _createMany(this: T, _args: PrismaDefault.Exact>) { + return {} as PrismaDefault.Result + }, + _delete(this: T, _args: PrismaDefault.Exact>) { + return {} as PrismaDefault.Result + }, + _deleteMany(this: T, _args: PrismaDefault.Exact>) { + return {} as PrismaDefault.Result + }, + _findFirst(this: T, _args: PrismaDefault.Exact>) { + return {} as PrismaDefault.Result + }, + _findFirstOrThrow(this: T, _args: PrismaDefault.Exact>) { + return {} as PrismaDefault.Result + }, + _findMany(this: T, _args: PrismaDefault.Exact>) { + return {} as PrismaDefault.Result + }, + _findRaw(this: T, _args: PrismaDefault.Exact>) { + return {} as PrismaDefault.Result + }, + _findUnique(this: T, _args: PrismaDefault.Exact>) { + return {} as PrismaDefault.Result + }, + _findUniqueOrThrow(this: T, _args: PrismaDefault.Exact>) { + return {} as PrismaDefault.Result + }, + _groupBy(this: T, _args: PrismaDefault.Exact>) { + return {} as PrismaDefault.Result + }, + _update(this: T, _args: PrismaDefault.Exact>) { + return {} as PrismaDefault.Result + }, + _updateMany(this: T, _args: PrismaDefault.Exact>) { + return {} as PrismaDefault.Result + }, + _upsert(this: T, _args: PrismaDefault.Exact>) { + return {} as PrismaDefault.Result + }, + }, + }, + }) +} + +testMatrix.setupTestSuite(() => { + test('client - callback', () => { + const xprisma = prisma.$extends(clientExtensionCallback()) + const xprismaViaDefault = prisma.$extends(clientExtensionCallbackViaDefault()) + expectTypeOf(xprisma).toHaveProperty('$myMethod') + expectTypeOf(xprismaViaDefault).toHaveProperty('$myMethodViaDefault') + }) + + test('client - object', () => { + const xprisma = prisma.$extends(clientExtensionObject()) + const xprismaViaDefault = prisma.$extends(clientExtensionObjectViaDefault()) + expectTypeOf(xprisma).toHaveProperty('$myMethod') + expectTypeOf(xprismaViaDefault).toHaveProperty('$myMethodViaDefault') + }) + + test('model - callback', () => { + const xprisma = prisma.$extends(modelExtensionCallback()) + const xprismaViaDefault = prisma.$extends(modelExtensionCallbackViaDefault()) + expectTypeOf(xprisma.user).toHaveProperty('myUserMethod') + expectTypeOf(xprismaViaDefault.user).toHaveProperty('myUserMethodViaDefault') + }) + + test('model - object', () => { + const xprisma = prisma.$extends(modelExtensionObject()) + const xprismaViaDefault = prisma.$extends(modelExtensionObjectViaDefault()) + expectTypeOf(xprisma.user).toHaveProperty('myUserMethod') + expectTypeOf(xprismaViaDefault.user).toHaveProperty('myUserMethodViaDefault') + }) + + test('result - callback', async () => { + const xprisma = prisma.$extends(resultExtensionCallback()) + const xprismaViaDefault = prisma.$extends(resultExtensionCallbackViaDefault()) + const user = await xprisma.user.findFirst({}) + const userViaDefault = await xprismaViaDefault.user.findFirst({}) + expectTypeOf(user!).toHaveProperty('computedField') + expectTypeOf(userViaDefault!).toHaveProperty('computedFieldViaDefault') + }) + + test('result - object', async () => { + const xprisma = prisma.$extends(resultExtensionObject()) + const xprismaViaDefault = prisma.$extends(resultExtensionObjectViaDefault()) + const user = await xprisma.user.findFirst({}) + const userViaDefault = await xprismaViaDefault.user.findFirst({}) + expectTypeOf(user!).toHaveProperty('computedField') + expectTypeOf(userViaDefault!).toHaveProperty('computedFieldViaDefault') + }) + + test('chained', async () => { + const xprisma = prisma + .$extends(modelExtensionObject()) + .$extends(clientExtensionCallback()) + .$extends(resultExtensionCallback()) + .$extends(modelExtensionObjectViaDefault()) + .$extends(clientExtensionCallbackViaDefault()) + .$extends(resultExtensionCallbackViaDefault()) + + expectTypeOf(xprisma).toHaveProperty('$myMethod') + expectTypeOf(xprisma).toHaveProperty('$myMethodViaDefault') + expectTypeOf(xprisma.user).toHaveProperty('myUserMethod') + expectTypeOf(xprisma.user).toHaveProperty('myUserMethodViaDefault') + const user = await xprisma.user.findFirst({}) + expectTypeOf(user!).toHaveProperty('computedField') + expectTypeOf(user!).toHaveProperty('computedFieldViaDefault') + }) + + test('invalid', () => { + Prisma.defineExtension({ + // @ts-expect-error + notAComponent: {}, + }) + + Prisma.defineExtension({ + model: { + // @ts-expect-error + notAModel: { + myMethod() {}, + }, + }, + }) + + Prisma.defineExtension({ + result: { + // -@ts-expect-error TODO: this should be an error but somehow isn't showing up like eg. `model` + notAModel: { + field: { + needs: { id: true }, + compute: () => {}, + }, + }, + }, + }) + + Prisma.defineExtension({ + result: { + user: { + field: { + needs: { + // @ts-expect-error + notUserField: true, + }, + compute: () => {}, + }, + }, + }, + }) + + Prisma.defineExtension({ + result: { + user: { + field: { + needs: { + id: true, + }, + compute: (user) => { + // @ts-expect-error + return user.bad + }, + }, + }, + }, + }) + + Prisma.defineExtension({ + query: { + // @ts-expect-error + notAModel: { + findFirst() {}, + }, + }, + }) + + Prisma.defineExtension({ + query: { + user: { + // @ts-expect-error + notAnOperation() {}, + }, + }, + }) + }) + + // here we want to check that type utils also work via default + test('generic model - callback via default', () => { + const xprisma = prisma.$extends(modelGenericExtensionCallbackViaDefault()) + expectTypeOf(xprisma.user).toHaveProperty('myGenericMethodViaDefault') + + const data1 = xprisma.user.myGenericMethodViaDefault({ + select: { + email: true, + }, + }) + + const data2 = xprisma.user.myGenericMethodViaDefault({ + select: { + email: true as boolean, + }, + }) + + expectTypeOf<(typeof data1)['args']>().toEqualTypeOf<{ select: { email: true } }>() + expectTypeOf<(typeof data1)['payload']>().toMatchTypeOf() + expectTypeOf<(typeof data1)['payload']['scalars']>().toHaveProperty('email').toEqualTypeOf() + expectTypeOf<(typeof data1)['result'] & {}>().toHaveProperty('email').toEqualTypeOf() + + expectTypeOf<(typeof data2)['args']>().toEqualTypeOf<{ select: { email: boolean } }>() + expectTypeOf<(typeof data2)['payload']>().toMatchTypeOf() + expectTypeOf<(typeof data2)['payload']['scalars']>().toHaveProperty('email').toEqualTypeOf() + expectTypeOf<(typeof data2)['result'] & {}>().toHaveProperty('email').toEqualTypeOf() + }) + + // here we want to check that type utils also work via default + test('generic model - object via default', () => { + const xprisma = prisma.$extends(modelGenericExtensionObjectViaDefault()) + expectTypeOf(xprisma.user).toHaveProperty('myGenericMethodViaDefault') + + const data1 = xprisma.user.myGenericMethodViaDefault({ + select: { + email: true, + }, + }) + + const data2 = xprisma.user.myGenericMethodViaDefault({ + select: { + email: true as boolean, + }, + }) + + expectTypeOf<(typeof data1)['args']>().toEqualTypeOf<{ select: { email: true } }>() + expectTypeOf<(typeof data1)['payload']>().toMatchTypeOf() + expectTypeOf<(typeof data1)['payload']['scalars']>().toHaveProperty('email').toEqualTypeOf() + expectTypeOf<(typeof data1)['result'] & {}>().toHaveProperty('email').toEqualTypeOf() + + expectTypeOf<(typeof data2)['args']>().toEqualTypeOf<{ select: { email: boolean } }>() + expectTypeOf<(typeof data2)['payload']>().toMatchTypeOf() + expectTypeOf<(typeof data2)['payload']['scalars']>().toHaveProperty('email').toEqualTypeOf() + expectTypeOf<(typeof data2)['result'] & {}>().toHaveProperty('email').toEqualTypeOf() + }) + + // here we want to check that type utils also work via default + test('generic client - object via default', () => { + const xprisma = prisma.$extends(clientGenericExtensionObjectViaDefault()) + expectTypeOf(xprisma).toHaveProperty('myGenericMethodViaDefault') + + const data = xprisma.myGenericMethodViaDefault`SELECT * FROM User WHERE id = ${1}` + + expectTypeOf<(typeof data)['args']>().toEqualTypeOf<[TemplateStringsArray, number]>() + expectTypeOf<(typeof data)['payload']>().toEqualTypeOf() + expectTypeOf<(typeof data)['result']>().toEqualTypeOf() + }) + + // here we want to check that type utils are equivalent to real results + test('generic client - generic type utilities', () => { + ;async () => { + const xprisma = prisma.$extends(allResultsGenericExtensionObjectViaDefault()) + + const _aggregate = xprisma.user._aggregate({ _min: { id: true } }) + const aggregate = await xprisma.user.aggregate({ _min: { id: true } }) + expectTypeOf().toEqualTypeOf() + + const _count = xprisma.user._count({}) + const count = await xprisma.user.count({}) + expectTypeOf().toEqualTypeOf() + + const _create = xprisma.user._create({ data: { email: '', firstName: '', lastName: '' } }) + const create = await xprisma.user.create({ data: { email: '', firstName: '', lastName: '' } }) + expectTypeOf().toEqualTypeOf() + + // @ts-test-if: provider !== 'sqlite' + const _createMany = xprisma.user._createMany({ data: [{ email: '', firstName: '', lastName: '' }] }) + // @ts-test-if: provider !== 'sqlite' + const createMany = await xprisma.user.createMany({ data: [{ email: '', firstName: '', lastName: '' }] }) + // @ts-test-if: provider !== 'sqlite' + expectTypeOf().toEqualTypeOf() + + const _delete = xprisma.user._delete({ where: { id: '1' } }) + const deleted = await xprisma.user.delete({ where: { id: '1' } }) + expectTypeOf().toEqualTypeOf() + + const _deleteMany = xprisma.user._deleteMany({ where: { id: '1' } }) + const deleteMany = await xprisma.user.deleteMany({ where: { id: '1' } }) + expectTypeOf().toEqualTypeOf() + + const _findFirst = xprisma.user._findFirst({}) + const findFirst = await xprisma.user.findFirst({}) + expectTypeOf().toEqualTypeOf() + + const _findFirstOrThrow = xprisma.user._findFirstOrThrow({}) + const findFirstOrThrow = await xprisma.user.findFirstOrThrow({}) + expectTypeOf().toEqualTypeOf() + + const _findMany = xprisma.user._findMany({ include: { posts: true } }) + const findMany = await xprisma.user.findMany({ include: { posts: true } }) + expectTypeOf().toEqualTypeOf() + + const _findUnique = xprisma.user._findUnique({ where: { id: '1' } }) + const findUnique = await xprisma.user.findUnique({ where: { id: '1' } }) + expectTypeOf().toEqualTypeOf() + + const _findUniqueOrThrow = xprisma.user._findUniqueOrThrow({ where: { id: '1' } }) + const findUniqueOrThrow = await xprisma.user.findUniqueOrThrow({ where: { id: '1' } }) + expectTypeOf().toEqualTypeOf() + + const _groupBy = xprisma.user._groupBy({ by: ['id'] }) + const groupBy = await xprisma.user.groupBy({ by: ['id'] }) + expectTypeOf().toEqualTypeOf() + + const _update = xprisma.user._update({ where: { id: '1' }, data: { email: '' } }) + const update = await prisma.user.update({ where: { id: '1' }, data: { email: '' } }) + expectTypeOf().toEqualTypeOf() + + const _updateMany = xprisma.user._updateMany({ where: { id: '1' }, data: { email: '' } }) + const updateMany = await prisma.user.updateMany({ where: { id: '1' }, data: { email: '' } }) + expectTypeOf().toEqualTypeOf() + + const _upsert = xprisma.user._upsert({ + where: { id: '1' }, + create: { email: '', firstName: '', lastName: '' }, + update: { email: '' }, + }) + const upsert = await prisma.user.upsert({ + where: { id: '1' }, + create: { email: '', firstName: '', lastName: '' }, + update: { email: '' }, + }) + expectTypeOf().toEqualTypeOf() + + // @ts-test-if: provider === 'mongodb' + const _findRaw = xprisma.user._findRaw({}) + // @ts-test-if: provider === 'mongodb' + const findRaw = await prisma.user.findRaw({}) + // @ts-test-if: provider === 'mongodb' + expectTypeOf().toEqualTypeOf() + + // @ts-test-if: provider === 'mongodb' + const _aggregateRaw = xprisma.user._aggregateRaw({}) + // @ts-test-if: provider === 'mongodb' + const aggregateRaw = await prisma.user.aggregateRaw({}) + // @ts-test-if: provider === 'mongodb' + expectTypeOf().toEqualTypeOf() + + const _runCommandRaw = xprisma._$runCommandRaw({}) + // @ts-test-if: provider === 'mongodb' + const runCommandRaw = await prisma.$runCommandRaw({}) + // @ts-test-if: provider === 'mongodb' + expectTypeOf().toEqualTypeOf() + + const _executeRaw = xprisma._$executeRaw([]) + // @ts-test-if: provider !== 'mongodb' + const executeRaw = await prisma.$executeRaw([] as any as TemplateStringsArray) + // @ts-test-if: provider !== 'mongodb' + expectTypeOf().toEqualTypeOf() + + const _executeRawUnsafe = xprisma._$executeRawUnsafe('') + // @ts-test-if: provider !== 'mongodb' + const executeRawUnsafe = await prisma.$executeRawUnsafe('') + // @ts-test-if: provider !== 'mongodb' + expectTypeOf().toEqualTypeOf() + + const _queryRaw = xprisma._$queryRaw([]) + // @ts-test-if: provider !== 'mongodb' + const queryRaw = await prisma.$queryRaw([] as any as TemplateStringsArray) + // @ts-test-if: provider !== 'mongodb' + expectTypeOf().toEqualTypeOf() + + const _queryRawUnsafe = xprisma._$queryRawUnsafe('') + // @ts-test-if: provider !== 'mongodb' + const queryRawUnsafe = await prisma.$queryRawUnsafe('') + // @ts-test-if: provider !== 'mongodb' + expectTypeOf().toEqualTypeOf() + } + }) +}) diff --git a/packages/client/tests/functional/extensions/disabled/tests.ts b/packages/client/tests/functional/extensions/disabled/tests.ts deleted file mode 100644 index 6c41224e1027..000000000000 --- a/packages/client/tests/functional/extensions/disabled/tests.ts +++ /dev/null @@ -1,16 +0,0 @@ -import testMatrix from './_matrix' -// @ts-ignore -import type { PrismaClient } from './node_modules/@prisma/client' - -declare let prisma: PrismaClient - -testMatrix.setupTestSuite(() => { - test('attempt to use $extend causes compile and runtime error', () => { - expect(() => { - // @ts-expect-error - prisma.$extends({}) - }).toThrowErrorMatchingInlineSnapshot( - `Extensions are not yet generally available, please add \`clientExtensions\` to the \`previewFeatures\` field in the \`generator\` block in the \`schema.prisma\` file.`, - ) - }) -}) diff --git a/packages/client/tests/functional/extensions/enabled/__snapshots__/itx.ts.snap b/packages/client/tests/functional/extensions/enabled/__snapshots__/itx.ts.snap deleted file mode 100644 index 08f2a8320960..000000000000 --- a/packages/client/tests/functional/extensions/enabled/__snapshots__/itx.ts.snap +++ /dev/null @@ -1,121 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`extensions.enabled.itx (provider=cockroachdb) extended client in itx can rollback via custom call 1`] = ` - -Invalid \`prisma.user.create()\` invocation: - - -Unique constraint failed on the fields: (\`email\`) -`; - -exports[`extensions.enabled.itx (provider=cockroachdb) extended client in itx can rollback via normal call 1`] = ` - -Invalid \`tx.user.create()\` invocation in -/client/tests/functional/extensions/enabled/itx.ts:0:0 - - XX }, - XX }) - XX -→ XX await tx.user.create( -Unique constraint failed on the fields: (\`email\`) -`; - -exports[`extensions.enabled.itx (provider=mongodb) extended client in itx can rollback via custom call 1`] = ` - -Invalid \`prisma.user.create()\` invocation: - - -Unique constraint failed on the constraint: \`User_email_key\` -`; - -exports[`extensions.enabled.itx (provider=mongodb) extended client in itx can rollback via normal call 1`] = ` - -Invalid \`tx.user.create()\` invocation in -/client/tests/functional/extensions/enabled/itx.ts:0:0 - - XX }, - XX }) - XX -→ XX await tx.user.create( -Unique constraint failed on the constraint: \`User_email_key\` -`; - -exports[`extensions.enabled.itx (provider=mysql) extended client in itx can rollback via custom call 1`] = ` - -Invalid \`prisma.user.create()\` invocation: - - -Unique constraint failed on the constraint: \`User_email_key\` -`; - -exports[`extensions.enabled.itx (provider=mysql) extended client in itx can rollback via normal call 1`] = ` - -Invalid \`tx.user.create()\` invocation in -/client/tests/functional/extensions/enabled/itx.ts:0:0 - - XX }, - XX }) - XX -→ XX await tx.user.create( -Unique constraint failed on the constraint: \`User_email_key\` -`; - -exports[`extensions.enabled.itx (provider=postgresql) extended client in itx can rollback via custom call 1`] = ` - -Invalid \`prisma.user.create()\` invocation: - - -Unique constraint failed on the fields: (\`email\`) -`; - -exports[`extensions.enabled.itx (provider=postgresql) extended client in itx can rollback via normal call 1`] = ` - -Invalid \`tx.user.create()\` invocation in -/client/tests/functional/extensions/enabled/itx.ts:0:0 - - XX }, - XX }) - XX -→ XX await tx.user.create( -Unique constraint failed on the fields: (\`email\`) -`; - -exports[`extensions.enabled.itx (provider=sqlite) extended client in itx can rollback via custom call 1`] = ` - -Invalid \`prisma.user.create()\` invocation: - - -Unique constraint failed on the fields: (\`email\`) -`; - -exports[`extensions.enabled.itx (provider=sqlite) extended client in itx can rollback via normal call 1`] = ` - -Invalid \`tx.user.create()\` invocation in -/client/tests/functional/extensions/enabled/itx.ts:0:0 - - XX }, - XX }) - XX -→ XX await tx.user.create( -Unique constraint failed on the fields: (\`email\`) -`; - -exports[`extensions.enabled.itx (provider=sqlserver) extended client in itx can rollback via custom call 1`] = ` - -Invalid \`prisma.user.create()\` invocation: - - -Unique constraint failed on the constraint: \`dbo.User\` -`; - -exports[`extensions.enabled.itx (provider=sqlserver) extended client in itx can rollback via normal call 1`] = ` - -Invalid \`tx.user.create()\` invocation in -/client/tests/functional/extensions/enabled/itx.ts:0:0 - - XX }, - XX }) - XX -→ XX await tx.user.create( -Unique constraint failed on the constraint: \`dbo.User\` -`; diff --git a/packages/client/tests/functional/extensions/enabled/defineExtension.ts b/packages/client/tests/functional/extensions/enabled/defineExtension.ts deleted file mode 100644 index 73a2d6bcdef1..000000000000 --- a/packages/client/tests/functional/extensions/enabled/defineExtension.ts +++ /dev/null @@ -1,400 +0,0 @@ -import { expectTypeOf } from 'expect-type' - -import { Prisma as PrismaDefault } from '../../../../scripts/default-index' -import testMatrix from './_matrix' -// @ts-ignore -import type { Prisma as PrismaNamespace, PrismaClient } from './node_modules/@prisma/client' - -declare let prisma: PrismaClient -declare let Prisma: typeof PrismaNamespace - -expectTypeOf>().toEqualTypeOf>() - -function clientExtensionCallback() { - return Prisma.defineExtension((client) => { - return client.$extends({ - client: { - $myMethod() {}, - }, - }) - }) -} - -function clientExtensionObject() { - return Prisma.defineExtension({ - client: { - $myMethod() {}, - }, - }) -} - -function modelExtensionCallback() { - return Prisma.defineExtension((client) => { - return client.$extends({ - model: { - user: { - myUserMethod() {}, - }, - }, - }) - }) -} - -function modelExtensionObject() { - return Prisma.defineExtension({ - model: { - user: { - myUserMethod() {}, - }, - }, - }) -} - -function resultExtensionCallback() { - return Prisma.defineExtension((client) => { - return client.$extends({ - result: { - user: { - computedField: { - needs: { id: true }, - compute: () => {}, - }, - }, - }, - }) - }) -} - -function resultExtensionObject() { - return Prisma.defineExtension({ - result: { - user: { - computedField: { - needs: { id: true }, - compute: () => {}, - }, - }, - }, - }) -} - -function clientExtensionCallbackViaDefault() { - return PrismaDefault.defineExtension((client) => { - return client.$extends({ - client: { - $myMethodViaDefault() {}, - }, - }) - }) -} - -function clientExtensionObjectViaDefault() { - return PrismaDefault.defineExtension({ - client: { - $myMethodViaDefault() {}, - }, - }) -} - -function modelExtensionCallbackViaDefault() { - return PrismaDefault.defineExtension((client) => { - return client.$extends({ - model: { - user: { - myUserMethodViaDefault() {}, - }, - }, - }) - }) -} - -function modelExtensionObjectViaDefault() { - return PrismaDefault.defineExtension({ - model: { - user: { - myUserMethodViaDefault() {}, - }, - }, - }) -} - -function modelGenericExtensionCallbackViaDefault() { - return PrismaDefault.defineExtension((client) => { - return client.$extends({ - model: { - $allModels: { - myGenericMethodViaDefault(this: T, _args: PrismaDefault.Exact>) { - // eslint-disable-next-line - const ctx = Prisma.getExtensionContext(this) // just for testing that it is exported - - return {} as { - // just for testing the types - args: A - payload: PrismaDefault.Payload - result: PrismaDefault.Result - } - }, - }, - }, - }) - }) -} - -function modelGenericExtensionObjectViaDefault() { - return PrismaDefault.defineExtension({ - model: { - $allModels: { - myGenericMethodViaDefault(this: T, _args: PrismaDefault.Exact>) { - // eslint-disable-next-line - const ctx = Prisma.getExtensionContext(this) // just for testing that it is exported - - return {} as { - // just for testing the types - args: A - payload: PrismaDefault.Payload - result: PrismaDefault.Result - } - }, - }, - }, - }) -} - -function clientGenericExtensionObjectViaDefault() { - return PrismaDefault.defineExtension({ - client: { - myGenericMethodViaDefault( - this: T, - ..._args: PrismaDefault.Exact]> - ) { - // eslint-disable-next-line - const ctx = Prisma.getExtensionContext(this) // just for testing that it is exported - - return {} as { - // just for testing the types - args: A - payload: PrismaDefault.Payload - result: PrismaDefault.Result - } - }, - }, - }) -} - -function resultExtensionCallbackViaDefault() { - return PrismaDefault.defineExtension((client) => { - return client.$extends({ - result: { - user: { - computedFieldViaDefault: { - needs: { id: true }, - compute: () => {}, - }, - }, - }, - }) - }) -} - -function resultExtensionObjectViaDefault() { - return PrismaDefault.defineExtension({ - result: { - user: { - computedFieldViaDefault: { - needs: { id: true }, - compute: () => {}, - }, - }, - }, - }) -} - -testMatrix.setupTestSuite(() => { - test('client - callback', () => { - const xprisma = prisma.$extends(clientExtensionCallback()) - const xprismaViaDefault = prisma.$extends(clientExtensionCallbackViaDefault()) - expectTypeOf(xprisma).toHaveProperty('$myMethod') - expectTypeOf(xprismaViaDefault).toHaveProperty('$myMethodViaDefault') - }) - - test('client - object', () => { - const xprisma = prisma.$extends(clientExtensionObject()) - const xprismaViaDefault = prisma.$extends(clientExtensionObjectViaDefault()) - expectTypeOf(xprisma).toHaveProperty('$myMethod') - expectTypeOf(xprismaViaDefault).toHaveProperty('$myMethodViaDefault') - }) - - test('model - callback', () => { - const xprisma = prisma.$extends(modelExtensionCallback()) - const xprismaViaDefault = prisma.$extends(modelExtensionCallbackViaDefault()) - expectTypeOf(xprisma.user).toHaveProperty('myUserMethod') - expectTypeOf(xprismaViaDefault.user).toHaveProperty('myUserMethodViaDefault') - }) - - test('model - object', () => { - const xprisma = prisma.$extends(modelExtensionObject()) - const xprismaViaDefault = prisma.$extends(modelExtensionObjectViaDefault()) - expectTypeOf(xprisma.user).toHaveProperty('myUserMethod') - expectTypeOf(xprismaViaDefault.user).toHaveProperty('myUserMethodViaDefault') - }) - - test('result - callback', async () => { - const xprisma = prisma.$extends(resultExtensionCallback()) - const xprismaViaDefault = prisma.$extends(resultExtensionCallbackViaDefault()) - const user = await xprisma.user.findFirst({}) - const userViaDefault = await xprismaViaDefault.user.findFirst({}) - expectTypeOf(user!).toHaveProperty('computedField') - expectTypeOf(userViaDefault!).toHaveProperty('computedFieldViaDefault') - }) - - test('result - object', async () => { - const xprisma = prisma.$extends(resultExtensionObject()) - const xprismaViaDefault = prisma.$extends(resultExtensionObjectViaDefault()) - const user = await xprisma.user.findFirst({}) - const userViaDefault = await xprismaViaDefault.user.findFirst({}) - expectTypeOf(user!).toHaveProperty('computedField') - expectTypeOf(userViaDefault!).toHaveProperty('computedFieldViaDefault') - }) - - test('chained', async () => { - const xprisma = prisma - .$extends(modelExtensionObject()) - .$extends(clientExtensionCallback()) - .$extends(resultExtensionCallback()) - .$extends(modelExtensionObjectViaDefault()) - .$extends(clientExtensionCallbackViaDefault()) - .$extends(resultExtensionCallbackViaDefault()) - - expectTypeOf(xprisma).toHaveProperty('$myMethod') - expectTypeOf(xprisma).toHaveProperty('$myMethodViaDefault') - expectTypeOf(xprisma.user).toHaveProperty('myUserMethod') - expectTypeOf(xprisma.user).toHaveProperty('myUserMethodViaDefault') - const user = await xprisma.user.findFirst({}) - expectTypeOf(user!).toHaveProperty('computedField') - expectTypeOf(user!).toHaveProperty('computedFieldViaDefault') - }) - - test('invalid', () => { - Prisma.defineExtension({ - // @ts-expect-error - notAComponent: {}, - }) - - Prisma.defineExtension({ - model: { - // @ts-expect-error - notAModel: { - myMethod() {}, - }, - }, - }) - - Prisma.defineExtension({ - result: { - // -@ts-expect-error TODO: this should be an error but somehow isn't showing up like eg. `model` - notAModel: { - field: { - needs: { id: true }, - compute: () => {}, - }, - }, - }, - }) - - Prisma.defineExtension({ - result: { - user: { - field: { - needs: { - // @ts-expect-error - notUserField: true, - }, - compute: () => {}, - }, - }, - }, - }) - - Prisma.defineExtension({ - result: { - user: { - field: { - needs: { - id: true, - }, - compute: (user) => { - // @ts-expect-error - return user.bad - }, - }, - }, - }, - }) - - Prisma.defineExtension({ - query: { - // @ts-expect-error - notAModel: { - findFirst() {}, - }, - }, - }) - - Prisma.defineExtension({ - query: { - user: { - // @ts-expect-error - notAnOperation() {}, - }, - }, - }) - }) - - // here we want to check that type utils also work via default - test('generic model - callback via default', () => { - const xprisma = prisma.$extends(modelGenericExtensionCallbackViaDefault()) - expectTypeOf(xprisma.user).toHaveProperty('myGenericMethodViaDefault') - - const data = xprisma.user.myGenericMethodViaDefault({ - select: { - email: true, - }, - }) - - expectTypeOf<(typeof data)['args']>().toEqualTypeOf<{ select: { email: true } }>() - expectTypeOf<(typeof data)['payload']>().toMatchTypeOf() - expectTypeOf<(typeof data)['payload']['scalars']>().toHaveProperty('email').toEqualTypeOf() - expectTypeOf<(typeof data)['result']>().toHaveProperty('email').toEqualTypeOf() - }) - - // here we want to check that type utils also work via default - test('generic model - object via default', () => { - const xprisma = prisma.$extends(modelGenericExtensionObjectViaDefault()) - expectTypeOf(xprisma.user).toHaveProperty('myGenericMethodViaDefault') - - const data = xprisma.user.myGenericMethodViaDefault({ - select: { - email: true, - }, - }) - - expectTypeOf<(typeof data)['args']>().toEqualTypeOf<{ select: { email: true } }>() - expectTypeOf<(typeof data)['payload']>().toMatchTypeOf() - expectTypeOf<(typeof data)['payload']['scalars']>().toHaveProperty('email').toEqualTypeOf() - expectTypeOf<(typeof data)['result']>().toHaveProperty('email').toEqualTypeOf() - }) - - // here we want to check that type utils also work via default - test('generic client - object via default', () => { - const xprisma = prisma.$extends(clientGenericExtensionObjectViaDefault()) - expectTypeOf(xprisma).toHaveProperty('myGenericMethodViaDefault') - - const data = xprisma.myGenericMethodViaDefault`SELECT * FROM User WHERE id = ${1}` - - expectTypeOf<(typeof data)['args']>().toEqualTypeOf<[TemplateStringsArray, number]>() - // @ts-test-if: provider !== 'mongodb' - expectTypeOf<(typeof data)['payload']>().toEqualTypeOf() - // @ts-test-if: provider !== 'mongodb' - expectTypeOf<(typeof data)['result']>().toEqualTypeOf() - }) -}) diff --git a/packages/client/tests/functional/extensions/enabled/extends.ts b/packages/client/tests/functional/extensions/extends.ts similarity index 82% rename from packages/client/tests/functional/extensions/enabled/extends.ts rename to packages/client/tests/functional/extensions/extends.ts index b96b84cbd35b..512d0bc09d57 100644 --- a/packages/client/tests/functional/extensions/enabled/extends.ts +++ b/packages/client/tests/functional/extensions/extends.ts @@ -12,6 +12,11 @@ testMatrix.setupTestSuite(() => { expect(xprisma).not.toBe(prisma) expectTypeOf(xprisma).not.toHaveProperty('$use') + expectTypeOf(xprisma).not.toHaveProperty('$on') + + expect(xprisma['$use']).toBeUndefined() + expect(xprisma['$on']).toBeUndefined() + expect(await xprisma.user.findMany()).toEqual([]) }) diff --git a/packages/client/tests/functional/extensions/enabled/itx.ts b/packages/client/tests/functional/extensions/itx.ts similarity index 57% rename from packages/client/tests/functional/extensions/enabled/itx.ts rename to packages/client/tests/functional/extensions/itx.ts index c7e95c51030f..2283ea6b7178 100644 --- a/packages/client/tests/functional/extensions/enabled/itx.ts +++ b/packages/client/tests/functional/extensions/itx.ts @@ -3,13 +3,14 @@ import { expectTypeOf } from 'expect-type' import testMatrix from './_matrix' // @ts-ignore -import type { PrismaClient } from './node_modules/@prisma/client' +import type { Prisma as PrismaNamespace, PrismaClient } from './node_modules/@prisma/client' declare let prisma: PrismaClient +declare let Prisma: typeof PrismaNamespace const email = faker.internet.email() -testMatrix.setupTestSuite((_0, _1, clientMeta) => { +testMatrix.setupTestSuite(({ provider }, _, clientMeta) => { beforeEach(async () => { await prisma.post.deleteMany() await prisma.user.deleteMany() @@ -209,4 +210,130 @@ testMatrix.setupTestSuite((_0, _1, clientMeta) => { expect(users).toHaveLength(1) }) + + testIf(provider !== 'mongodb')('itx works with extended client + queryRawUnsafe', async () => { + const xprisma = prisma.$extends({}) + + await expect( + xprisma.$transaction((tx) => { + // @ts-test-if: provider !== 'mongodb' + return tx.$queryRawUnsafe('SELECT 1') + }), + ).resolves.not.toThrow() + }) + + test('middleware exclude from transaction also works with extended client', async () => { + const xprisma = prisma.$extends({}) + + prisma.$use((params, next) => { + return next({ ...params, runInTransaction: false }) + }) + + const usersBefore = await xprisma.user.findMany() + + await xprisma + .$transaction(async (prisma) => { + await prisma.user.create({ + data: { + email: 'jane@smith.com', + firstName: 'Jane', + lastName: 'Smith', + }, + }) + + await prisma.user.create({ + data: { + email: 'jane@smith.com', + firstName: 'Jane', + lastName: 'Smith', + }, + }) + }) + .catch(() => {}) + + const usersAfter = await xprisma.user.findMany() + + expect(usersAfter).toHaveLength(usersBefore.length + 1) + }) + + test('client component is available within itx callback', async () => { + const helper = jest.fn() + const xprisma = prisma.$extends({ + client: { + helper, + }, + }) + + await xprisma.$transaction((tx) => { + tx.helper() + return Promise.resolve() + }) + + expect(helper).toHaveBeenCalled() + }) + + test('methods from itx client denylist are optional within client extensions', async () => { + expect.assertions(12) + + const xprisma = prisma.$extends({ + client: { + testContextMethods(isTransaction: boolean) { + const ctx = Prisma.getExtensionContext(this) + + expectTypeOf(ctx.$connect).toEqualTypeOf() + expectTypeOf(ctx.$disconnect).toEqualTypeOf() + expectTypeOf(ctx.$transaction).toMatchTypeOf() + expectTypeOf(ctx.$extends).toEqualTypeOf() + expectTypeOf(ctx).not.toHaveProperty('$use') + expectTypeOf(ctx).not.toHaveProperty('$on') + + expect(ctx['$use']).toBeUndefined() + expect(ctx['$on']).toBeUndefined() + + if (isTransaction) { + expect(ctx.$connect).toBeUndefined() + expect(ctx.$disconnect).toBeUndefined() + expect(ctx.$transaction).toBeUndefined() + expect(ctx.$extends).toBeUndefined() + } else { + expect(ctx.$connect).toBeDefined() + expect(ctx.$disconnect).toBeDefined() + expect(ctx.$transaction).toBeDefined() + expect(ctx.$extends).toBeDefined() + } + }, + }, + model: { + user: { + helper() {}, + }, + }, + }) + + xprisma.testContextMethods(false) + + await xprisma.$transaction((tx) => { + tx.testContextMethods(true) + return Promise.resolve() + }) + }) + + test('isolation level is properly reflected in extended client', () => { + ;async () => { + const xprisma = prisma.$extends({}) + + // @ts-test-if: provider !== 'mongodb' + const data = await xprisma.$transaction( + () => { + return Promise.resolve(42) + }, + { + isolationLevel: 'Serializable', + }, + ) + + // @ts-test-if: provider !== 'mongodb' + expectTypeOf(data).toEqualTypeOf() + } + }) }) diff --git a/packages/client/tests/functional/extensions/enabled/model.ts b/packages/client/tests/functional/extensions/model.ts similarity index 96% rename from packages/client/tests/functional/extensions/enabled/model.ts rename to packages/client/tests/functional/extensions/model.ts index 09304a17c300..ed82a9b7aeee 100644 --- a/packages/client/tests/functional/extensions/enabled/model.ts +++ b/packages/client/tests/functional/extensions/model.ts @@ -1,8 +1,8 @@ import { getQueryEngineProtocol } from '@prisma/internals' import { expectTypeOf } from 'expect-type' -import { waitFor } from '../../_utils/tests/waitFor' -import { NewPrismaClient } from '../../_utils/types' +import { waitFor } from '../_utils/tests/waitFor' +import { NewPrismaClient } from '../_utils/types' import testMatrix from './_matrix' // @ts-ignore import type { Prisma as PrismaNamespace, PrismaClient } from './node_modules/@prisma/client' @@ -127,18 +127,26 @@ testMatrix.setupTestSuite( expect(firstMethod).not.toHaveBeenCalled() }) - test('allows to override built-in methods', async () => { + test('allows to override built-in methods', () => { const extMethod = jest.fn() const xprisma = prisma.$extends({ model: { user: { - findFirst: extMethod, + findFirst() { + extMethod() + + return undefined + }, }, }, }) - await xprisma.user.findFirst({}) + const findFirstData = xprisma.user.findFirst() + // @ts-expect-error + void xprisma.user.findFirst({}) + expect(findFirstData).toBeUndefined() + expectTypeOf(findFirstData).toEqualTypeOf() expect(extMethod).toHaveBeenCalled() }) @@ -255,8 +263,8 @@ testMatrix.setupTestSuite( test('only accepts methods', () => { prisma.$extends({ + // TODO -@-ts-expect-error model: { - // @ts-expect-error badInput: 1, }, }) @@ -482,7 +490,7 @@ testMatrix.setupTestSuite( this: T, args: PrismaNamespace.Exact>>, ): A { - return args as any as A + return args as any }, }, }, @@ -663,7 +671,7 @@ testMatrix.setupTestSuite( }) const ctx = xprisma.user.myCustomCallA() - expectTypeOf(ctx).toHaveProperty('name').toEqualTypeOf() + expectTypeOf(ctx).toHaveProperty('name').toEqualTypeOf<'User'>() expectTypeOf(ctx).toHaveProperty('myCustomCallB').toEqualTypeOf<() => void>() expectTypeOf(ctx).toHaveProperty('update').toMatchTypeOf() }) @@ -685,7 +693,7 @@ testMatrix.setupTestSuite( }) const ctx = xprisma.user.myCustomCallA() - expectTypeOf(ctx).toHaveProperty('name').toEqualTypeOf() + expectTypeOf(ctx).toHaveProperty('name').toEqualTypeOf() expectTypeOf(ctx).toHaveProperty('myCustomCallB').toEqualTypeOf<() => void>() expectTypeOf(ctx).not.toHaveProperty('update') }) @@ -707,7 +715,7 @@ testMatrix.setupTestSuite( }) const ctx = xprisma.user.myCustomCallA() - expectTypeOf(ctx).toHaveProperty('name').toEqualTypeOf() + expectTypeOf(ctx).toHaveProperty('name').toEqualTypeOf() expectTypeOf(ctx).toHaveProperty('myCustomCallB').toEqualTypeOf<() => void>() expectTypeOf(ctx).toHaveProperty('update').toMatchTypeOf() }) @@ -729,7 +737,7 @@ testMatrix.setupTestSuite( }) const ctx = xprisma.user.myCustomCallA() - expectTypeOf(ctx).toHaveProperty('name').toEqualTypeOf() + expectTypeOf(ctx).toHaveProperty('name').toEqualTypeOf() expectTypeOf(ctx).toHaveProperty('myCustomCallB').toEqualTypeOf<() => void>() expectTypeOf(ctx).toHaveProperty('update').toMatchTypeOf() }) diff --git a/packages/client/tests/functional/extensions/enabled/query-accelerate.ts b/packages/client/tests/functional/extensions/pdp.ts similarity index 50% rename from packages/client/tests/functional/extensions/enabled/query-accelerate.ts rename to packages/client/tests/functional/extensions/pdp.ts index 0992f1fc383c..ffff1086057a 100644 --- a/packages/client/tests/functional/extensions/enabled/query-accelerate.ts +++ b/packages/client/tests/functional/extensions/pdp.ts @@ -3,9 +3,10 @@ import https from 'https' import testMatrix from './_matrix' // @ts-ignore -import type { PrismaClient } from './node_modules/@prisma/client' +import type { Prisma as PrismaNamespace, PrismaClient } from './node_modules/@prisma/client' -declare const prisma: PrismaClient +declare let prisma: PrismaClient +declare let Prisma: typeof PrismaNamespace /** * Tests for underlying query component features used by Prisma Accelerate @@ -13,18 +14,29 @@ declare const prisma: PrismaClient testMatrix.setupTestSuite(() => { let mockedRequest: jest.SpyInstance const originalRequest = https.request - const randomId = randomBytes(12).toString('hex') + const randomId1 = randomBytes(12).toString('hex') + const randomId2 = randomBytes(12).toString('hex') beforeAll(async () => { // this also warms up the dataproxy (schema upload) await prisma.user.create({ data: { - id: randomId, + id: randomId1, email: 'john@doe.io', firstName: 'John', lastName: 'Doe', }, }) + + // this also warms up the dataproxy (schema upload) + await prisma.user.create({ + data: { + id: randomId2, + email: 'max@mustermann.io', + firstName: 'Max', + lastName: 'Mustermann', + }, + }) }) beforeEach(() => { @@ -35,6 +47,26 @@ testMatrix.setupTestSuite(() => { https.request = originalRequest }) + test('_runtimeDataModel is available on the client instance and provides model info', () => { + const extension = Prisma.defineExtension((client) => { + return prisma.$extends({ + model: { + $allModels: { + subscribe() { + expect(client).toHaveProperty('_runtimeDataModel') + expect((client as any)._runtimeDataModel).toHaveProperty('models') + expect((client as any)._runtimeDataModel.models).toHaveProperty('User') + expect((client as any)._runtimeDataModel.models.User).toHaveProperty('fields') + }, + }, + }, + }) + }) + + prisma.$extends(extension).user.subscribe() + expect.hasAssertions() + }) + testIf(process.env.TEST_DATA_PROXY !== undefined)('changing http headers via custom fetch', async () => { const xprisma = prisma.$extends({ query: { @@ -68,9 +100,9 @@ testMatrix.setupTestSuite(() => { }, }) - const data = await xprisma.user.findUnique({ where: { id: randomId } }) + const data = await xprisma.user.findUnique({ where: { id: randomId1 } }) - expect(data).toHaveProperty('id', randomId) + expect(data).toHaveProperty('id', randomId1) expect(mockedRequest.mock.calls[0][1].headers).toHaveProperty('x-custom-header', 'hello') }) @@ -140,9 +172,91 @@ testMatrix.setupTestSuite(() => { }, }) - const data = await xprisma.user.findUnique({ where: { id: randomId } }).catch() + const data = await xprisma.user.findUnique({ where: { id: randomId1 } }).catch() + + expect(data).toHaveProperty('id', randomId1) + }, + ) + + testIf(process.env.TEST_DATA_PROXY !== undefined)( + 'allows to override customDataProxyFetch for the whole batch', + async () => { + const xprisma = prisma.$extends({ + query: { + // @ts-expect-error + async $__internalBatch({ query, args, __internalParams }) { + let cacheInfo: null | string = null + __internalParams.customDataProxyFetch = (fetch) => (url, args) => { + cacheInfo = 'hit!' + return fetch(url, args) + } + + const result = await query(args, __internalParams) + for (const item of result) { + if (item) { + item.cacheInfo = cacheInfo + } + } + return result + }, + }, + }) + + const [user1, user2] = await Promise.all([ + xprisma.user.findUnique({ where: { id: randomId1 } }), + xprisma.user.findUnique({ where: { id: randomId2 } }), + ]) - expect(data).toHaveProperty('id', randomId) + expect(user1).toHaveProperty('cacheInfo', 'hit!') + expect(user2).toHaveProperty('cacheInfo', 'hit!') }, ) + + testIf(process.env.TEST_DATA_PROXY !== undefined)('customDataProxyFetch for batches stacks', async () => { + expect.assertions(2) + const xprisma = prisma + .$extends({ + query: { + // @ts-expect-error + $__internalBatch({ query, args, __internalParams }) { + __internalParams.customDataProxyFetch = (fetch) => (url, args) => { + return fetch(url, { ...args, order: [1] }) + } + + return query(args, __internalParams) + }, + }, + }) + .$extends({ + query: { + // @ts-expect-error + $__internalBatch({ query, args, __internalParams }) { + __internalParams.customDataProxyFetch = (fetch) => (url, args) => { + expect(args.order).toEqual([1]) + return fetch(url, { ...args, order: [...args.order, 2] }) + } + + return query(args, __internalParams) + }, + }, + }) + .$extends({ + query: { + // @ts-expect-error + $__internalBatch({ query, args, __internalParams }) { + __internalParams.customDataProxyFetch = (fetch) => (url, args) => { + expect(args.order).toEqual([1, 2]) + return fetch(url, args) + } + + return query(args, __internalParams) + }, + }, + }) + + await Promise.all([ + xprisma.user.findUnique({ where: { id: randomId1 } }), + xprisma.user.findUnique({ where: { id: randomId2 } }), + ]) + }) }) diff --git a/packages/client/tests/functional/extensions/enabled/prisma/_schema.ts b/packages/client/tests/functional/extensions/prisma/_schema.ts similarity index 88% rename from packages/client/tests/functional/extensions/enabled/prisma/_schema.ts rename to packages/client/tests/functional/extensions/prisma/_schema.ts index 57e3cbd5747a..a17484e2da20 100644 --- a/packages/client/tests/functional/extensions/enabled/prisma/_schema.ts +++ b/packages/client/tests/functional/extensions/prisma/_schema.ts @@ -1,4 +1,4 @@ -import { foreignKeyForProvider, idForProvider } from '../../../_utils/idForProvider' +import { foreignKeyForProvider, idForProvider } from '../../_utils/idForProvider' import testMatrix from '../_matrix' export default testMatrix.setupSchema(({ provider }) => { diff --git a/packages/client/tests/functional/extensions/enabled/query.ts b/packages/client/tests/functional/extensions/query.ts similarity index 82% rename from packages/client/tests/functional/extensions/enabled/query.ts rename to packages/client/tests/functional/extensions/query.ts index 5f25719f8705..af6819f53a4d 100644 --- a/packages/client/tests/functional/extensions/enabled/query.ts +++ b/packages/client/tests/functional/extensions/query.ts @@ -1,14 +1,16 @@ import { randomBytes } from 'crypto' import { expectTypeOf } from 'expect-type' -import { wait } from '../../_utils/tests/wait' -import { waitFor } from '../../_utils/tests/waitFor' -import { NewPrismaClient } from '../../_utils/types' +import { wait } from '../_utils/tests/wait' +import { waitFor } from '../_utils/tests/waitFor' +import { NewPrismaClient } from '../_utils/types' import testMatrix from './_matrix' // @ts-ignore import type { Prisma as PrismaNamespace, PrismaClient } from './node_modules/@prisma/client' let prisma: PrismaClient<{ log: [{ emit: 'event'; level: 'query' }] }> +declare let Prisma: typeof PrismaNamespace + declare const newPrismaClient: NewPrismaClient const randomId1 = randomBytes(12).toString('hex') @@ -44,6 +46,7 @@ testMatrix.setupTestSuite( const fnPost = jest.fn() const fnEmitter = jest.fn() + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument prisma.$on('query', fnEmitter) const xprisma = prisma.$extends({ @@ -51,12 +54,9 @@ testMatrix.setupTestSuite( user: { findFirst({ args, query, operation, model }) { if (args.select != undefined) { - // @ts-expect-error args.select.email = undefined } - // @ts-expect-error args.include = undefined - // @ts-expect-error args.select = undefined expectTypeOf(args).not.toBeAny expectTypeOf(query).toBeFunction() @@ -921,22 +921,26 @@ testMatrix.setupTestSuite( // @ts-test-if: provider !== 'mongodb' $queryRaw({ args, query, operation }) { expect(operation).toEqual('$queryRaw') + expect(args).toEqual(Prisma.sql`SELECT 2`) // @ts-test-if: provider !== 'mongodb' - expectTypeOf(args).toEqualTypeOf<[query: TemplateStringsArray | PrismaNamespace.Sql, ...values: any[]]>() + expectTypeOf(args).toEqualTypeOf() // @ts-test-if: provider !== 'mongodb' expectTypeOf(operation).toEqualTypeOf<'$queryRaw'>() fnUser(args) return query(args) }, + // @ts-test-if: provider !== 'mongodb' $executeRaw({ args, query, operation }) { expect(operation).toEqual('$executeRaw') + expect(args).toEqual(Prisma.sql`SELECT 1`) // @ts-test-if: provider !== 'mongodb' - expectTypeOf(args).toEqualTypeOf<[query: TemplateStringsArray | PrismaNamespace.Sql, ...values: any[]]>() + expectTypeOf(args).toEqualTypeOf() // @ts-test-if: provider !== 'mongodb' expectTypeOf(operation).toEqualTypeOf<'$executeRaw'>() fnUser(args) return query(args) }, + // @ts-test-if: provider !== 'mongodb' $queryRawUnsafe({ args, query, operation }) { expect(operation).toEqual('$queryRawUnsafe') // @ts-test-if: provider !== 'mongodb' @@ -946,6 +950,7 @@ testMatrix.setupTestSuite( fnUser(args) return query(args) }, + // @ts-test-if: provider !== 'mongodb' $executeRawUnsafe({ args, query, operation }) { expect(operation).toEqual('$executeRawUnsafe') // @ts-test-if: provider !== 'mongodb' @@ -979,17 +984,177 @@ testMatrix.setupTestSuite( await xprisma.$queryRawUnsafe(`SELECT 4`) await wait(() => expect(fnEmitter).toHaveBeenCalledTimes(4)) - expect(fnUser).toHaveBeenNthCalledWith(1, [[`SELECT 1`]]) - expect(fnUser).toHaveBeenNthCalledWith(2, [[`SELECT 2`]]) + expect(fnUser).toHaveBeenNthCalledWith(1, Prisma.sql`SELECT 1`) + expect(fnUser).toHaveBeenNthCalledWith(2, Prisma.sql`SELECT 2`) expect(fnUser).toHaveBeenNthCalledWith(3, [`SELECT 3`]) expect(fnUser).toHaveBeenNthCalledWith(4, [`SELECT 4`]) } else { // @ts-test-if: provider === 'mongodb' await xprisma.$runCommandRaw({ aggregate: 'User', pipeline: [], explain: false }) // await wait(() => expect(fnEmitter).toHaveBeenCalledTimes(1)) // not working - // expect(fnUser).toHaveBeenNthCalledWith(1, { aggregate: 'User', pipeline: [], explain: false }) // broken + expect(fnUser).toHaveBeenNthCalledWith(1, { aggregate: 'User', pipeline: [], explain: false }) } }) + + testIf(provider !== 'mongodb')('extending with $allModels.$allOperations and a top-level query', async () => { + const fnOperation = jest.fn() + const fnEmitter = jest.fn() + + prisma.$on('query', fnEmitter) + + const xprisma = prisma.$extends({ + query: { + // @ts-test-if: provider !== 'mongodb' + $queryRawUnsafe({ args, query, operation, model }: any) { + fnOperation({ args, operation, model }) + + return query(args) + }, + $allModels: { + $allOperations({ args, query, operation, model }) { + fnOperation({ args, operation, model }) + + return query(args) + }, + }, + }, + }) + + const rawQueryArgs = `SELECT 1` + const modelQueryArgs = { where: { id: randomId1 } } + + const cbArgsRaw = { args: [rawQueryArgs], operation: '$queryRawUnsafe', model: undefined } + const cbArgsUser = { args: modelQueryArgs, operation: 'findFirst', model: 'User' } + const cbArgsPost = { args: modelQueryArgs, operation: 'findFirst', model: 'Post' } + + // @ts-test-if: provider !== 'mongodb' + const dataRaw = await xprisma.$queryRawUnsafe(rawQueryArgs) + const dataUser = await xprisma.user.findFirst(modelQueryArgs) + const dataPost = await xprisma.post.findFirst(modelQueryArgs) + + expect(dataRaw).toBeTruthy() + expect(dataUser).toMatchInlineSnapshot(`null`) + expect(dataPost).toMatchInlineSnapshot(`null`) + expect(fnOperation).toHaveBeenCalledTimes(3) + expect(fnOperation).toHaveBeenNthCalledWith(1, cbArgsRaw) + expect(fnOperation).toHaveBeenNthCalledWith(2, cbArgsUser) + expect(fnOperation).toHaveBeenNthCalledWith(3, cbArgsPost) + await waitFor(() => expect(fnEmitter).toHaveBeenCalledTimes(3)) + }) + + test('extending with $allModels and another $allModels', async () => { + const fnModel = jest.fn() + const fnEmitter = jest.fn() + + prisma.$on('query', fnEmitter) + + const xprisma = prisma + .$extends({ + query: { + $allModels: { + findFirst({ args, query, model, operation }) { + fnModel({ args, operation, model }) + + return query(args) + }, + }, + }, + }) + .$extends({ + query: { + $allModels: { + findFirst({ args, query, operation, model }) { + fnModel({ args, operation, model }) + + return query(args) + }, + }, + }, + }) + + const args = { where: { id: randomId1 } } + const cbArgsUser = { args: args, operation: 'findFirst', model: 'User' } + + const dataUser = await xprisma.user.findFirst(args) + + expect(dataUser).toMatchInlineSnapshot(`null`) + expect(fnModel).toHaveBeenCalledTimes(2) + expect(fnModel).toHaveBeenNthCalledWith(1, cbArgsUser) + expect(fnModel).toHaveBeenNthCalledWith(2, cbArgsUser) + await waitFor(() => expect(fnEmitter).toHaveBeenCalledTimes(1)) + }) + + test('extending with top-level $allOperations', async () => { + const fnModel = jest.fn() + const fnEmitter = jest.fn() + + prisma.$on('query', fnEmitter) + + const xprisma = prisma.$extends({ + query: { + $allOperations({ args, query, operation, model }) { + fnModel({ args, operation, model }) + + return query(args) + }, + }, + }) + + const args = { where: { id: randomId1 } } + const cbArgsUser = { args: args, operation: 'findFirst', model: 'User' } + + const dataUser1 = await xprisma.user.findFirst(args) + + expect(dataUser1).toMatchInlineSnapshot(`null`) + expect(fnModel).toHaveBeenCalledTimes(1) + expect(fnModel).toHaveBeenNthCalledWith(1, cbArgsUser) + await waitFor(() => expect(fnEmitter).toHaveBeenCalledTimes(1)) + }) + + test('unions can be properly discriminated', () => { + prisma.$extends({ + query: { + $allModels: { + findFirst({ args, query, model }) { + ;() => { + if (model === 'User') { + args.select?.firstName + return query(args) + } + + if (model === 'Post') { + // @ts-expect-error + args.select?.firstName + return query(args) + } + + return undefined + } + + return query(args) + }, + $allOperations({ args, query, operation }) { + ;() => { + if (operation === 'findFirst') { + args.select?.id + return query(args) + } + + if (operation === 'groupBy') { + // @ts-expect-error + args.select?.id + return query(args) + } + + return undefined + } + + return query(args) + }, + }, + }, + }) + }) }, { skipDefaultClientInstance: true, diff --git a/packages/client/tests/functional/extensions/enabled/result.ts b/packages/client/tests/functional/extensions/result.ts similarity index 83% rename from packages/client/tests/functional/extensions/enabled/result.ts rename to packages/client/tests/functional/extensions/result.ts index 6bc769d03dd3..321bee6885e5 100644 --- a/packages/client/tests/functional/extensions/enabled/result.ts +++ b/packages/client/tests/functional/extensions/result.ts @@ -3,7 +3,7 @@ import { expectTypeOf } from 'expect-type' import testMatrix from './_matrix' // @ts-ignore -import type { PrismaClient } from './node_modules/@prisma/client' +import type { PrismaClient, User } from './node_modules/@prisma/client' declare let prisma: PrismaClient @@ -48,6 +48,7 @@ testMatrix.setupTestSuite(() => { const user = await xprisma.user.findFirst({}) expect(user?.fullName).toBe('John Smith') + expectTypeOf(user?.fullName).toEqualTypeOf() }) test('findFirst using $allModels', async () => { @@ -63,6 +64,7 @@ testMatrix.setupTestSuite(() => { const user = await xprisma.user.findFirst({}) expect(user?.computed).toBe(123) + expectTypeOf(user?.computed).toEqualTypeOf() }) test('findUnique', async () => { @@ -70,6 +72,7 @@ testMatrix.setupTestSuite(() => { const user = await xprisma.user.findUnique({ where: { email } }) expect(user?.fullName).toBe('John Smith') + expectTypeOf(user?.fullName).toEqualTypeOf() }) test('findMany', async () => { @@ -77,6 +80,7 @@ testMatrix.setupTestSuite(() => { const user = await xprisma.user.findMany({}) expect(user[0].fullName).toBe('John Smith') + expectTypeOf(user[0].fullName).toEqualTypeOf() }) test('create', async () => { @@ -90,6 +94,7 @@ testMatrix.setupTestSuite(() => { }, }) expect(user.fullName).toBe('Max Mustermann') + expectTypeOf(user.fullName).toEqualTypeOf() }) test('update', async () => { @@ -100,6 +105,7 @@ testMatrix.setupTestSuite(() => { }) expect(user.fullName).toBe('Jane Smith') + expectTypeOf(user.fullName).toEqualTypeOf() }) test('upsert - update', async () => { @@ -111,6 +117,7 @@ testMatrix.setupTestSuite(() => { }) expect(user.fullName).toBe('Jane Smith') + expectTypeOf(user.fullName).toEqualTypeOf() }) test('upsert - create', async () => { @@ -136,6 +143,9 @@ testMatrix.setupTestSuite(() => { expect(user?.fullName).toBe('John Smith') expect(user).not.toHaveProperty('firstName') expect(user).not.toHaveProperty('lastName') + expectTypeOf(user?.fullName).toEqualTypeOf() + expectTypeOf(user).not.toHaveProperty('firstName') + expectTypeOf(user).not.toHaveProperty('lastName') }) test('when using select and $allModels', async () => { @@ -157,6 +167,7 @@ testMatrix.setupTestSuite(() => { }, }) expect(user?.computed).toBe(123) + expectTypeOf(user?.computed).toEqualTypeOf() }) test('relationships: with include', async () => { @@ -164,6 +175,7 @@ testMatrix.setupTestSuite(() => { const post = await xprisma.post.findFirst({ include: { user: true } }) expect(post?.user.fullName).toBe('John Smith') + expectTypeOf(post?.user.fullName).toEqualTypeOf() }) test('relationships: with select', async () => { @@ -171,6 +183,7 @@ testMatrix.setupTestSuite(() => { const post = await xprisma.post.findFirst({ select: { user: true } }) expect(post?.user.fullName).toBe('John Smith') + expectTypeOf(post?.user.fullName).toEqualTypeOf() }) test('relationships: with deep select', async () => { @@ -178,6 +191,7 @@ testMatrix.setupTestSuite(() => { const post = await xprisma.post.findFirst({ select: { user: { select: { fullName: true } } } }) expect(post?.user.fullName).toBe('John Smith') + expectTypeOf(post?.user.fullName).toEqualTypeOf() }) test('relationships: mixed include and select', async () => { @@ -185,6 +199,7 @@ testMatrix.setupTestSuite(() => { const post = await xprisma.post.findFirst({ include: { user: { select: { fullName: true } } } }) expect(post?.user.fullName).toBe('John Smith') + expectTypeOf(post?.user.fullName).toEqualTypeOf() }) test('dependencies between computed fields', async () => { @@ -204,6 +219,7 @@ testMatrix.setupTestSuite(() => { const user = await xprisma.user.findFirst() expect(user?.loudName).toBe('JOHN SMITH') + expectTypeOf(user?.loudName).toEqualTypeOf() }) test('shadowing dependency', async () => { @@ -222,6 +238,7 @@ testMatrix.setupTestSuite(() => { const user = await xprisma.user.findFirst() expect(user?.firstName).toBe('JOHN') + expectTypeOf(user?.firstName).toEqualTypeOf() }) test('shadowing dependency multiple times', async () => { @@ -253,6 +270,7 @@ testMatrix.setupTestSuite(() => { const user = await xprisma.user.findFirst() expect(user?.firstName).toBe('JOHN!!!') + expectTypeOf(user?.firstName).toEqualTypeOf() }) test('empty extension does nothing', async () => { @@ -268,6 +286,7 @@ testMatrix.setupTestSuite(() => { const user = await xprisma.user.findFirst({}) expect(user?.fullName).toBe('John Smith') + expectTypeOf(user?.fullName).toEqualTypeOf() }) test('with null result', async () => { @@ -275,6 +294,7 @@ testMatrix.setupTestSuite(() => { const user = await xprisma.user.findUnique({ where: { email: 'nothere@example.com' } }) expect(user).toBeNull() + expectTypeOf(user).toBeNullable() }) test('error in computed field', async () => { @@ -294,6 +314,7 @@ testMatrix.setupTestSuite(() => { const user = await xprisma.user.findFirstOrThrow({}) expect(() => user.fullName).toThrowErrorMatchingInlineSnapshot(`oops!`) + expectTypeOf(() => user.fullName).toEqualTypeOf<() => never>() }) test('error in computed field with no name', async () => { @@ -312,6 +333,7 @@ testMatrix.setupTestSuite(() => { const user = await xprisma.user.findFirstOrThrow({}) expect(() => user.fullName).toThrowErrorMatchingInlineSnapshot(`oops!`) + expectTypeOf(() => user.fullName).toEqualTypeOf<() => never>() }) test('nested includes should include scalars and relations', async () => { @@ -349,4 +371,13 @@ testMatrix.setupTestSuite(() => { expectTypeOf(user.posts[0].user.posts[0].id).toEqualTypeOf() expectTypeOf(user.posts[0].user.posts[0]).not.toHaveProperty('user') }) + + test('when any type is passed as an input default selection type is returned', () => { + ;async () => { + const xprisma = prisma.$extends({}) + + const data = await xprisma.user.findFirstOrThrow({} as any) + expectTypeOf(data).toEqualTypeOf() + } + }) }) diff --git a/packages/client/tests/functional/extensions/enabled/tx.ts b/packages/client/tests/functional/extensions/tx.ts similarity index 83% rename from packages/client/tests/functional/extensions/enabled/tx.ts rename to packages/client/tests/functional/extensions/tx.ts index bb9d96e46f14..390fdcf073b1 100644 --- a/packages/client/tests/functional/extensions/enabled/tx.ts +++ b/packages/client/tests/functional/extensions/tx.ts @@ -1,4 +1,5 @@ import { faker } from '@faker-js/faker' +import { expectTypeOf } from 'expect-type' import testMatrix from './_matrix' // @ts-ignore @@ -180,4 +181,31 @@ testMatrix.setupTestSuite((_0, _1, clientMeta) => { expect(users).toHaveLength(1) }) + + test('isolation level is properly reflected in extended client', () => { + ;async () => { + const xprisma = prisma.$extends({}) + + // @ts-test-if: provider !== 'mongodb' + const data = await xprisma.$transaction([xprisma.user.findFirst({ select: { id: true } })], { + isolationLevel: 'Serializable', + }) + + expectTypeOf(data).toEqualTypeOf<[{ id: string } | null]>() + } + }) + + test('type inference allows for destructuring the array', () => { + ;async () => { + const xprisma = prisma.$extends({}) + + const [data, count] = await xprisma.$transaction([ + xprisma.user.findFirst({ select: { id: true } }), + xprisma.user.count(), + ]) + + expectTypeOf(data).toEqualTypeOf<{ id: string } | null>() + expectTypeOf(count).toEqualTypeOf() + } + }) }) diff --git a/packages/client/tests/functional/filter-count-relations/prisma/_schema.ts b/packages/client/tests/functional/filter-count-relations/prisma/_schema.ts index 59e6812b7a5a..57b24610f199 100644 --- a/packages/client/tests/functional/filter-count-relations/prisma/_schema.ts +++ b/packages/client/tests/functional/filter-count-relations/prisma/_schema.ts @@ -25,7 +25,6 @@ export default testMatrix.setupSchema(({ provider }) => { return /* Prisma */ ` generator client { provider = "prisma-client-js" - previewFeatures = ["filteredRelationCount"] } datasource db { diff --git a/packages/client/tests/functional/issues/11740-transaction-stored-query/tests.ts b/packages/client/tests/functional/issues/11740-transaction-stored-query/tests.ts index 7ffc1f236eea..4dfe997ff1bb 100644 --- a/packages/client/tests/functional/issues/11740-transaction-stored-query/tests.ts +++ b/packages/client/tests/functional/issues/11740-transaction-stored-query/tests.ts @@ -27,8 +27,8 @@ testMatrix.setupTestSuite( const query = prisma.resource.create({ data: { email: 'john@prisma.io' } }) const fn = async () => { - await (query as any).requestTransaction({ kind: 'batch' }) - await (query as any).requestTransaction({ kind: 'batch' }) + await (query as any).requestTransaction({ kind: 'batch', lock: Promise.resolve() }) + await (query as any).requestTransaction({ kind: 'batch', lock: Promise.resolve() }) } await expect(fn()).rejects.toMatchPrismaErrorSnapshot() diff --git a/packages/client/tests/functional/issues/12862-errors-are-obfuscated-by-interactive-transactions/tests.ts b/packages/client/tests/functional/issues/12862-errors-are-obfuscated-by-interactive-transactions/tests.ts index 4ef90c2d4737..3044af023d0d 100644 --- a/packages/client/tests/functional/issues/12862-errors-are-obfuscated-by-interactive-transactions/tests.ts +++ b/packages/client/tests/functional/issues/12862-errors-are-obfuscated-by-interactive-transactions/tests.ts @@ -13,7 +13,7 @@ testMatrix.setupTestSuite( const user = await prisma.user.create({ data: { email: faker.internet.email(), - name: faker.name.firstName(), + name: faker.person.firstName(), }, }) @@ -32,7 +32,7 @@ testMatrix.setupTestSuite( const user = await prisma.user.create({ data: { email: faker.internet.email(), - name: faker.name.firstName(), + name: faker.person.firstName(), }, }) @@ -55,7 +55,7 @@ testMatrix.setupTestSuite( const user = await client.user.create({ data: { email: faker.internet.email(), - name: faker.name.firstName(), + name: faker.person.firstName(), }, }) diff --git a/packages/client/tests/functional/issues/15044/tests.ts b/packages/client/tests/functional/issues/15044/tests.ts index 39d6dedb3e51..030bdd822fbf 100644 --- a/packages/client/tests/functional/issues/15044/tests.ts +++ b/packages/client/tests/functional/issues/15044/tests.ts @@ -9,8 +9,8 @@ declare let prisma: PrismaClient // https://github.com/prisma/prisma/issues/15044 testMatrix.setupTestSuite(() => { test('should not throw error when using connect inside transaction', async () => { - const userName = faker.name.firstName() - const walletName = faker.name.firstName() + const userName = faker.person.firstName() + const walletName = faker.person.firstName() const result = await prisma.$transaction(async (tx) => { const user = await tx.user.create({ diff --git a/packages/client/tests/functional/issues/15176/tests.ts b/packages/client/tests/functional/issues/15176/tests.ts index 0742def86148..673c8fb30813 100644 --- a/packages/client/tests/functional/issues/15176/tests.ts +++ b/packages/client/tests/functional/issues/15176/tests.ts @@ -11,7 +11,7 @@ testMatrix.setupTestSuite(({ provider }) => { const getTime = (dt: Date): number => dt.getTime() test('should update both updatedAt fields on a model', async () => { - const id = provider === 'mongodb' ? faker.database.mongodbObjectId() : faker.random.alpha(10) + const id = provider === 'mongodb' ? faker.database.mongodbObjectId() : faker.string.alpha(10) const created = await prisma.testModel.create({ data: { diff --git a/packages/client/tests/functional/issues/15644-middleware-arg-types/_matrix.ts b/packages/client/tests/functional/issues/15644-middleware-arg-types/_matrix.ts index 6a962230983f..762f277bd998 100644 --- a/packages/client/tests/functional/issues/15644-middleware-arg-types/_matrix.ts +++ b/packages/client/tests/functional/issues/15644-middleware-arg-types/_matrix.ts @@ -5,5 +5,8 @@ export default defineMatrix(() => [ { provider: 'sqlite', }, + { + provider: 'mongodb', + }, ], ]) diff --git a/packages/client/tests/functional/issues/15644-middleware-arg-types/tests.ts b/packages/client/tests/functional/issues/15644-middleware-arg-types/tests.ts index 422325d4a475..cd8aad2d6878 100644 --- a/packages/client/tests/functional/issues/15644-middleware-arg-types/tests.ts +++ b/packages/client/tests/functional/issues/15644-middleware-arg-types/tests.ts @@ -4,8 +4,10 @@ import type { PrismaClient } from './node_modules/@prisma/client' declare let prisma: PrismaClient +const id = '000000000000000000000000' + testMatrix.setupTestSuite( - () => { + ({ provider }) => { test('middleware with count', async () => { expect.assertions(1) prisma.$use((params, next) => { @@ -62,13 +64,13 @@ testMatrix.setupTestSuite( expect.assertions(1) prisma.$use((params, next) => { if (params.action === 'findUnique') { - expect(params.args).toStrictEqual({ where: { id: '0' } }) + expect(params.args).toStrictEqual({ where: { id } }) } return next(params) }) - await prisma.resource.findUnique({ where: { id: '0' } }) + await prisma.resource.findUnique({ where: { id } }) }) test('middleware with findFirstOrThrow', async () => { @@ -88,13 +90,13 @@ testMatrix.setupTestSuite( expect.assertions(1) prisma.$use((params, next) => { if (params.action === ('findUniqueOrThrow' as string)) { - expect(params.args).toStrictEqual({ where: { id: '0' } }) + expect(params.args).toStrictEqual({ where: { id } }) } return next(params) }) - await prisma.resource.findUniqueOrThrow({ where: { id: '0' } }).catch(() => {}) + await prisma.resource.findUniqueOrThrow({ where: { id } }).catch(() => {}) }) test('middleware with create', async () => { @@ -114,83 +116,105 @@ testMatrix.setupTestSuite( expect.assertions(1) prisma.$use((params, next) => { if (params.action === 'delete') { - expect(params.args).toStrictEqual({ where: { id: '0' } }) + expect(params.args).toStrictEqual({ where: { id } }) } return next(params) }) - await prisma.resource.delete({ where: { id: '0' } }).catch(() => {}) + await prisma.resource.delete({ where: { id } }).catch(() => {}) }) test('middleware with deleteMany', async () => { expect.assertions(1) prisma.$use((params, next) => { if (params.action === 'deleteMany') { - expect(params.args).toStrictEqual({ where: { id: '0' } }) + expect(params.args).toStrictEqual({ where: { id } }) } return next(params) }) - await prisma.resource.deleteMany({ where: { id: '0' } }) + await prisma.resource.deleteMany({ where: { id } }) }) test('middleware with findMany', async () => { expect.assertions(1) prisma.$use((params, next) => { if (params.action === 'findMany') { - expect(params.args).toStrictEqual({ where: { id: '0' } }) + expect(params.args).toStrictEqual({ where: { id } }) } return next(params) }) - await prisma.resource.findMany({ where: { id: '0' } }) + await prisma.resource.findMany({ where: { id } }) }) test('middleware with update', async () => { expect.assertions(1) prisma.$use((params, next) => { if (params.action === 'update') { - expect(params.args).toStrictEqual({ where: { id: '0' }, data: {} }) + expect(params.args).toStrictEqual({ where: { id }, data: {} }) } return next(params) }) - await prisma.resource.update({ where: { id: '0' }, data: {} }).catch(() => {}) + await prisma.resource.update({ where: { id }, data: {} }).catch(() => {}) }) test('middleware with updateMany', async () => { expect.assertions(1) prisma.$use((params, next) => { if (params.action === 'updateMany') { - expect(params.args).toStrictEqual({ where: { id: '0' }, data: {} }) + expect(params.args).toStrictEqual({ where: { id }, data: {} }) } return next(params) }) - await prisma.resource.updateMany({ where: { id: '0' }, data: {} }) + await prisma.resource.updateMany({ where: { id }, data: {} }) }) test('middleware with upsert', async () => { expect.assertions(1) prisma.$use((params, next) => { if (params.action === 'upsert') { - expect(params.args).toStrictEqual({ where: { id: '0' }, create: {}, update: {} }) + expect(params.args).toStrictEqual({ where: { id }, create: {}, update: {} }) } return next(params) }) - await prisma.resource.upsert({ where: { id: '0' }, create: {}, update: {} }) + await prisma.resource.upsert({ where: { id }, create: {}, update: {} }) + }) + + testIf(provider === 'mongodb')('middleware with runCommandRaw', async () => { + expect.assertions(1) + prisma.$use((params, next) => { + if (params.action === 'runCommandRaw') { + expect(params.args).toStrictEqual({ + aggregate: 'Resource', + pipeline: [{ $match: { id } }, { $project: { _id: true } }], + explain: false, + }) + } + + return next(params) + }) + + // @ts-test-if: provider === 'mongodb' + await prisma.$runCommandRaw({ + aggregate: 'Resource', + pipeline: [{ $match: { id } }, { $project: { _id: true } }], + explain: false, + }) }) }, { optOut: { - from: ['cockroachdb', 'mongodb', 'mysql', 'postgresql', 'sqlserver'], + from: ['cockroachdb', 'mysql', 'postgresql', 'sqlserver'], reason: 'Testing on a single provider is enough for testing this issue', }, }, diff --git a/packages/client/tests/functional/extensions/disabled/_matrix.ts b/packages/client/tests/functional/issues/17405-extensions-casing/_matrix.ts similarity index 100% rename from packages/client/tests/functional/extensions/disabled/_matrix.ts rename to packages/client/tests/functional/issues/17405-extensions-casing/_matrix.ts diff --git a/packages/client/tests/functional/issues/17405-extensions-casing/prisma/_schema.ts b/packages/client/tests/functional/issues/17405-extensions-casing/prisma/_schema.ts new file mode 100644 index 000000000000..392e8cf1d9a5 --- /dev/null +++ b/packages/client/tests/functional/issues/17405-extensions-casing/prisma/_schema.ts @@ -0,0 +1,20 @@ +import { idForProvider } from '../../../_utils/idForProvider' +import testMatrix from '../_matrix' + +export default testMatrix.setupSchema(({ provider }) => { + return /* Prisma */ ` + generator client { + provider = "prisma-client-js" + previewFeatures = ["clientExtensions"] + } + + datasource db { + provider = "${provider}" + url = env("DATABASE_URI_${provider}") + } + + model user { + id ${idForProvider(provider)} + } + ` +}) diff --git a/packages/client/tests/functional/issues/17405-extensions-casing/tests.ts b/packages/client/tests/functional/issues/17405-extensions-casing/tests.ts new file mode 100644 index 000000000000..22ceeeb0270f --- /dev/null +++ b/packages/client/tests/functional/issues/17405-extensions-casing/tests.ts @@ -0,0 +1,24 @@ +import { expectTypeOf } from 'expect-type' + +import testMatrix from './_matrix' +// @ts-ignore +import { Prisma as PrismaNamespace, PrismaClient } from './node_modules/@prisma/client' + +declare let prisma: PrismaClient + +testMatrix.setupTestSuite( + () => { + test('empty', () => { + expectTypeOf< + PrismaNamespace.TypeMap['model']['user']['groupBy']['args'] + >().toEqualTypeOf() + ;async () => { + await prisma.$extends({}).user.findFirst() + } + }) + }, + { + skipDb: true, + skipDefaultClientInstance: true, + }, +) diff --git a/packages/client/tests/functional/extensions/enabled/_matrix.ts b/packages/client/tests/functional/issues/17948-tx-client-extensions/_matrix.ts similarity index 100% rename from packages/client/tests/functional/extensions/enabled/_matrix.ts rename to packages/client/tests/functional/issues/17948-tx-client-extensions/_matrix.ts diff --git a/packages/client/tests/functional/issues/17948-tx-client-extensions/prisma/_schema.ts b/packages/client/tests/functional/issues/17948-tx-client-extensions/prisma/_schema.ts new file mode 100644 index 000000000000..c20f92b03d53 --- /dev/null +++ b/packages/client/tests/functional/issues/17948-tx-client-extensions/prisma/_schema.ts @@ -0,0 +1,21 @@ +import { idForProvider } from '../../../_utils/idForProvider' +import testMatrix from '../_matrix' + +export default testMatrix.setupSchema(({ provider }) => { + return /* Prisma */ ` + generator client { + provider = "prisma-client-js" + previewFeatures = ["clientExtensions"] + } + + datasource db { + provider = "${provider}" + url = env("DATABASE_URI_${provider}") + } + + model User { + id ${idForProvider(provider)} + email String @unique + } + ` +}) diff --git a/packages/client/tests/functional/issues/17948-tx-client-extensions/tests.ts b/packages/client/tests/functional/issues/17948-tx-client-extensions/tests.ts new file mode 100644 index 000000000000..62a677f00652 --- /dev/null +++ b/packages/client/tests/functional/issues/17948-tx-client-extensions/tests.ts @@ -0,0 +1,38 @@ +import { faker } from '@faker-js/faker' + +import testMatrix from './_matrix' +// @ts-ignore +import type { Prisma as PrismaNamespace, PrismaClient } from './node_modules/@prisma/client' + +declare let prisma: PrismaClient +declare let Prisma: typeof PrismaNamespace + +testMatrix.setupTestSuite(() => { + test('extension method is bound to transaction client within itx', async () => { + const email = faker.internet.email() + + const xprisma = prisma.$extends({ + model: { + user: { + async exists(email: string) { + const user = await Prisma.getExtensionContext(this).findFirst({ where: { email } }) + return user !== null + }, + }, + }, + client: { + foo() { + Prisma.getExtensionContext(this) + }, + }, + }) + + const existsWithinTransaction = await xprisma.$transaction(async (tx) => { + await tx.user.create({ data: { email } }) + const result = await tx.user.exists(email) + return result + }) + + expect(existsWithinTransaction).toBe(true) + }) +}) diff --git a/packages/client/tests/functional/issues/18276-batch-order/_matrix.ts b/packages/client/tests/functional/issues/18276-batch-order/_matrix.ts new file mode 100644 index 000000000000..4f1f172b93f6 --- /dev/null +++ b/packages/client/tests/functional/issues/18276-batch-order/_matrix.ts @@ -0,0 +1,21 @@ +import { defineMatrix } from '../../_utils/defineMatrix' + +export default defineMatrix(() => [ + [ + { + provider: 'sqlite', + }, + { + provider: 'postgresql', + }, + { + provider: 'mysql', + }, + { + provider: 'cockroachdb', + }, + { + provider: 'sqlserver', + }, + ], +]) diff --git a/packages/client/tests/functional/issues/18276-batch-order/prisma/_schema.ts b/packages/client/tests/functional/issues/18276-batch-order/prisma/_schema.ts new file mode 100644 index 000000000000..43984387c5cf --- /dev/null +++ b/packages/client/tests/functional/issues/18276-batch-order/prisma/_schema.ts @@ -0,0 +1,20 @@ +import { idForProvider } from '../../../_utils/idForProvider' +import testMatrix from '../_matrix' + +export default testMatrix.setupSchema(({ provider }) => { + return /* Prisma */ ` + generator client { + provider = "prisma-client-js" + previewFeatures = ["clientExtensions"] + } + + datasource db { + provider = "${provider}" + url = env("DATABASE_URI_${provider}") + } + + model Test { + id ${idForProvider(provider)} + } + ` +}) diff --git a/packages/client/tests/functional/issues/18276-batch-order/tests.ts b/packages/client/tests/functional/issues/18276-batch-order/tests.ts new file mode 100644 index 000000000000..3f23d7eef095 --- /dev/null +++ b/packages/client/tests/functional/issues/18276-batch-order/tests.ts @@ -0,0 +1,77 @@ +import { waitFor } from '../../_utils/tests/waitFor' +import { NewPrismaClient } from '../../_utils/types' +import testMatrix from './_matrix' +// @ts-ignore +import type { PrismaClient } from './node_modules/@prisma/client' + +declare const newPrismaClient: NewPrismaClient + +testMatrix.setupTestSuite( + () => { + test('executes batch queries in the right order when using extensions + middleware', async () => { + const prisma = newPrismaClient({ + log: [{ emit: 'event', level: 'query' }], + }) as PrismaClient<{ log: [{ level: 'query'; emit: 'event' }] }> + + const queries: string[] = [] + + prisma.$on('query', ({ query }) => queries.push(query)) + + prisma.$use(async (params, next) => { + await Promise.resolve() + return next(params) + }) + + const xprisma = prisma.$extends({ + query: { + async $queryRawUnsafe({ args, query }) { + const [, result] = await prisma.$transaction([ + prisma.$queryRawUnsafe('SELECT 1'), + query(args), + prisma.$queryRawUnsafe('SELECT 3'), + ]) + return result + }, + }, + }) + + await xprisma.$queryRawUnsafe('SELECT 2') + + await waitFor(() => + expect(queries).toEqual([expect.stringContaining('BEGIN'), 'SELECT 1', 'SELECT 2', 'SELECT 3', 'COMMIT']), + ) + }) + + test('executes batch in right order when using delayed middleware', async () => { + const prisma = newPrismaClient({ + log: [{ emit: 'event', level: 'query' }], + }) as PrismaClient<{ log: [{ level: 'query'; emit: 'event' }] }> + + const queries: string[] = [] + + prisma.$on('query', ({ query }) => queries.push(query)) + + prisma.$use(async (params, next) => { + await new Promise((r) => setTimeout(r, Math.random() * 1000)) + return next(params) + }) + + await prisma.$transaction([ + prisma.$queryRawUnsafe('SELECT 1'), + prisma.$queryRawUnsafe('SELECT 2'), + prisma.$queryRawUnsafe('SELECT 3'), + ]) + + await waitFor(() => + expect(queries).toEqual([expect.stringContaining('BEGIN'), 'SELECT 1', 'SELECT 2', 'SELECT 3', 'COMMIT']), + ) + }) + }, + { + skipDefaultClientInstance: true, + optOut: { + from: ['mongodb'], + reason: 'Test uses raw SQL queries', + }, + }, +) diff --git a/packages/client/tests/functional/issues/18854-extensions-db-null/_matrix.ts b/packages/client/tests/functional/issues/18854-extensions-db-null/_matrix.ts new file mode 100644 index 000000000000..38333790840a --- /dev/null +++ b/packages/client/tests/functional/issues/18854-extensions-db-null/_matrix.ts @@ -0,0 +1,15 @@ +import { defineMatrix } from '../../_utils/defineMatrix' + +export default defineMatrix(() => [ + [ + { + provider: 'postgresql', + }, + { + provider: 'mysql', + }, + { + provider: 'cockroachdb', + }, + ], +]) diff --git a/packages/client/tests/functional/extensions/disabled/prisma/_schema.ts b/packages/client/tests/functional/issues/18854-extensions-db-null/prisma/_schema.ts similarity index 87% rename from packages/client/tests/functional/extensions/disabled/prisma/_schema.ts rename to packages/client/tests/functional/issues/18854-extensions-db-null/prisma/_schema.ts index c4ce3ca814a9..752b28ff2250 100644 --- a/packages/client/tests/functional/extensions/disabled/prisma/_schema.ts +++ b/packages/client/tests/functional/issues/18854-extensions-db-null/prisma/_schema.ts @@ -5,6 +5,7 @@ export default testMatrix.setupSchema(({ provider }) => { return /* Prisma */ ` generator client { provider = "prisma-client-js" + previewFeatures = ["clientExtensions"] } datasource db { @@ -14,6 +15,7 @@ export default testMatrix.setupSchema(({ provider }) => { model User { id ${idForProvider(provider)} + json Json? } ` }) diff --git a/packages/client/tests/functional/issues/18854-extensions-db-null/tests.ts b/packages/client/tests/functional/issues/18854-extensions-db-null/tests.ts new file mode 100644 index 000000000000..398a65d19549 --- /dev/null +++ b/packages/client/tests/functional/issues/18854-extensions-db-null/tests.ts @@ -0,0 +1,33 @@ +import testMatrix from './_matrix' +// @ts-ignore +import type { Prisma as PrismaNamespace, PrismaClient } from './node_modules/@prisma/client' + +declare let prisma: PrismaClient +declare let Prisma: typeof PrismaNamespace + +testMatrix.setupTestSuite( + () => { + test('allows to use DbNull together with query extensions', async () => { + const xprisma = prisma.$extends({ + query: { + $allModels: { + $allOperations({ args, query }) { + return query(args) + }, + }, + }, + }) + + await expect(xprisma.user.create({ data: { json: Prisma.DbNull } })).resolves.not.toThrow() + }) + }, + { + optOut: { + from: ['sqlserver', 'sqlite', 'mongodb'], + reason: ` + sqlserver, sqlite - JSON column is not supported + mongodb - DbNull is not supported + `, + }, + }, +) diff --git a/packages/client/tests/functional/logging/tests.ts b/packages/client/tests/functional/logging/tests.ts index 8db46f50a9e8..dec33f5b69c3 100644 --- a/packages/client/tests/functional/logging/tests.ts +++ b/packages/client/tests/functional/logging/tests.ts @@ -73,7 +73,7 @@ testMatrix.setupTestSuite((suiteConfig) => { }) await client.$transaction(async (tx) => { - const id = suiteConfig.provider === 'mongodb' ? faker.database.mongodbObjectId() : faker.random.numeric() + const id = suiteConfig.provider === 'mongodb' ? faker.database.mongodbObjectId() : faker.string.numeric() await tx.user.create({ data: { @@ -136,7 +136,7 @@ testMatrix.setupTestSuite((suiteConfig) => { }) await client.$transaction(async (tx) => { - const id = suiteConfig.provider === 'mongodb' ? faker.database.mongodbObjectId() : faker.random.numeric() + const id = suiteConfig.provider === 'mongodb' ? faker.database.mongodbObjectId() : faker.string.numeric() await Promise.all([ tx.user.findMany({ @@ -197,7 +197,7 @@ testMatrix.setupTestSuite((suiteConfig) => { }) }) - const id = suiteConfig.provider === 'mongodb' ? faker.database.mongodbObjectId() : faker.random.numeric() + const id = suiteConfig.provider === 'mongodb' ? faker.database.mongodbObjectId() : faker.string.numeric() const q1 = client.user.findMany({ where: { diff --git a/packages/client/tests/functional/methods/create-many/tests.ts b/packages/client/tests/functional/methods/create-many/tests.ts index fa0814acf23c..2b18f6dbdca3 100644 --- a/packages/client/tests/functional/methods/create-many/tests.ts +++ b/packages/client/tests/functional/methods/create-many/tests.ts @@ -36,8 +36,8 @@ testMatrix.setupTestSuite( test('should create a single record with a single nested create', async () => { const email = faker.internet.email() - const name = faker.name.firstName() - const title = faker.name.firstName() + const name = faker.person.firstName() + const title = faker.person.firstName() const res = await prisma.user.create({ include: { @@ -64,11 +64,11 @@ testMatrix.setupTestSuite( test('should create a single record with many nested create', async () => { const email = faker.internet.email() - const name = faker.name.firstName() - const title1 = faker.name.firstName() - const title2 = faker.name.firstName() - const title3 = faker.name.firstName() - const title4 = faker.name.firstName() + const name = faker.person.firstName() + const title1 = faker.person.firstName() + const title2 = faker.person.firstName() + const title3 = faker.person.firstName() + const title4 = faker.person.firstName() const res = await prisma.user.create({ include: { diff --git a/packages/client/tests/functional/methods/upsert/native-atomic/tests.ts b/packages/client/tests/functional/methods/upsert/native-atomic/tests.ts index c7b9e2d800de..a1cec08546ee 100644 --- a/packages/client/tests/functional/methods/upsert/native-atomic/tests.ts +++ b/packages/client/tests/functional/methods/upsert/native-atomic/tests.ts @@ -65,9 +65,9 @@ testMatrix.setupTestSuite( }) test('should only use ON CONFLICT when update arguments do not have any nested queries', async () => { - const name = faker.name.firstName() - const title = faker.name.jobTitle() - const title2 = faker.name.jobTitle() + const name = faker.person.firstName() + const title = faker.person.jobTitle() + const title2 = faker.person.jobTitle() await client.user.create({ data: { @@ -188,7 +188,7 @@ testMatrix.setupTestSuite( }) test('should only use ON CONFLICT when there is only 1 unique field in the where clause', async () => { - const name = faker.name.firstName() + const name = faker.person.firstName() await expect(() => // This will fail @@ -227,7 +227,7 @@ testMatrix.setupTestSuite( }) test('should only use ON CONFLICT when the unique field defined in where clause has the same value as defined in the create arguments', async () => { - const name = faker.name.firstName() + const name = faker.person.firstName() const checker = new UpsertChecker(client) @@ -265,7 +265,7 @@ testMatrix.setupTestSuite( }) test('should perform an upsert using ON CONFLICT', async () => { - const name = faker.name.firstName() + const name = faker.person.firstName() const checker = new UpsertChecker(client) @@ -302,7 +302,7 @@ testMatrix.setupTestSuite( }) test('should perform an upsert using ON CONFLICT with id', async () => { - const name = faker.name.firstName() + const name = faker.person.firstName() const checker = new UpsertChecker(client) diff --git a/packages/client/tests/functional/methods/upsert/simple/tests.ts b/packages/client/tests/functional/methods/upsert/simple/tests.ts index b9e86fd052f9..d5cdd249e916 100644 --- a/packages/client/tests/functional/methods/upsert/simple/tests.ts +++ b/packages/client/tests/functional/methods/upsert/simple/tests.ts @@ -8,7 +8,7 @@ declare let prisma: PrismaClient testMatrix.setupTestSuite(() => { test('should create a record using upsert', async () => { - const name = faker.name.firstName() + const name = faker.person.firstName() await prisma.user.upsert({ where: { @@ -28,7 +28,7 @@ testMatrix.setupTestSuite(() => { }) test('should update a record using upsert', async () => { - const name = faker.name.firstName() + const name = faker.person.firstName() await prisma.user.create({ data: { diff --git a/packages/client/tests/functional/middleware-raw-args/_matrix.ts b/packages/client/tests/functional/middleware-raw-args/_matrix.ts new file mode 100644 index 000000000000..d48aae47e031 --- /dev/null +++ b/packages/client/tests/functional/middleware-raw-args/_matrix.ts @@ -0,0 +1,21 @@ +import { defineMatrix } from '../_utils/defineMatrix' + +export default defineMatrix(() => [ + [ + { + provider: 'sqlite', + }, + { + provider: 'postgresql', + }, + { + provider: 'mysql', + }, + { + provider: 'cockroachdb', + }, + { + provider: 'sqlserver', + }, + ], +]) diff --git a/packages/client/tests/functional/middleware-raw-args/prisma/_schema.ts b/packages/client/tests/functional/middleware-raw-args/prisma/_schema.ts new file mode 100644 index 000000000000..70bca5fadd4b --- /dev/null +++ b/packages/client/tests/functional/middleware-raw-args/prisma/_schema.ts @@ -0,0 +1,20 @@ +import { idForProvider } from '../../_utils/idForProvider' +import testMatrix from '../_matrix' + +export default testMatrix.setupSchema(({ provider }) => { + return /* Prisma */ ` + generator client { + provider = "prisma-client-js" + } + + datasource db { + provider = "${provider}" + url = env("DATABASE_URI_${provider}") + } + + model Entry { + id ${idForProvider(provider)} + name String + } + ` +}) diff --git a/packages/client/tests/functional/middleware-raw-args/tests.ts b/packages/client/tests/functional/middleware-raw-args/tests.ts new file mode 100644 index 000000000000..4fd169ab4740 --- /dev/null +++ b/packages/client/tests/functional/middleware-raw-args/tests.ts @@ -0,0 +1,66 @@ +import { NewPrismaClient } from '../_utils/types' +import testMatrix from './_matrix' +// @ts-ignore +import type { Prisma as PrismaNamespace, PrismaClient } from './node_modules/@prisma/client' + +declare let newPrismaClient: NewPrismaClient +declare let Prisma: typeof PrismaNamespace + +testMatrix.setupTestSuite( + ({ provider }) => { + test('$queryRaw with template string', async () => { + expect.assertions(1) + const prisma = newPrismaClient() + prisma.$use(({ args }, next) => { + expect(args).toEqual([['SELECT ', ''], 1]) + + return next(args) + }) + + await prisma.$queryRaw`SELECT ${1}` + }) + + test('$queryRaw with Prisma.sql instance', async () => { + expect.assertions(1) + const prisma = newPrismaClient() + prisma.$use(({ args }, next) => { + expect(args).toEqual([Prisma.sql`SELECT ${1}`]) + return next(args) + }) + + await prisma.$queryRaw(Prisma.sql`SELECT ${1}`) + }) + + // $executeRaw for sqlite is not allowed to return results + testIf(provider !== 'sqlite')('$executeRaw with template string', async () => { + expect.assertions(1) + const prisma = newPrismaClient() + prisma.$use(({ args }, next) => { + expect(args).toEqual([['SELECT ', ''], 1]) + return next(args) + }) + + await prisma.$executeRaw`SELECT ${1}` + }) + + // $executeRaw for sqlite is not allowed to return results + testIf(provider !== 'sqlite')('$executeRaw with Prisma.sql instance', async () => { + expect.assertions(1) + const prisma = newPrismaClient() + prisma.$use(({ args }, next) => { + expect(args).toEqual([Prisma.sql`SELECT ${1}`]) + return next(args) + }) + + await prisma.$executeRaw(Prisma.sql`SELECT ${1}`) + }) + }, + + { + optOut: { + from: ['mongodb'], + reason: `test for SQL databases only`, + }, + skipDefaultClientInstance: true, + }, +) diff --git a/packages/client/tests/functional/multi-schema/tests.ts b/packages/client/tests/functional/multi-schema/tests.ts index b9fcc8587194..65819d8c964a 100644 --- a/packages/client/tests/functional/multi-schema/tests.ts +++ b/packages/client/tests/functional/multi-schema/tests.ts @@ -9,10 +9,10 @@ declare let prisma: PrismaClient testMatrix.setupTestSuite( () => { const email = faker.internet.email() - const title = faker.name.jobTitle() + const title = faker.person.jobTitle() const newEmail = faker.internet.email() - const newTitle = faker.name.jobTitle() + const newTitle = faker.person.jobTitle() describe('multischema', () => { test('create', async () => { diff --git a/packages/client/tests/functional/order-by-null/prisma/_schema.ts b/packages/client/tests/functional/order-by-null/prisma/_schema.ts index 3a231e39d8f9..9605d5ae54e4 100644 --- a/packages/client/tests/functional/order-by-null/prisma/_schema.ts +++ b/packages/client/tests/functional/order-by-null/prisma/_schema.ts @@ -5,7 +5,6 @@ export default testMatrix.setupSchema(({ provider }) => { return /* Prisma */ ` generator client { provider = "prisma-client-js" - previewFeatures = ["orderByNulls"] } datasource db { diff --git a/packages/client/tests/functional/query-validation/prisma/_schema.ts b/packages/client/tests/functional/query-validation/prisma/_schema.ts index 81e9c1fb6879..5446f2662ca1 100644 --- a/packages/client/tests/functional/query-validation/prisma/_schema.ts +++ b/packages/client/tests/functional/query-validation/prisma/_schema.ts @@ -1,11 +1,12 @@ -import { idForProvider } from '../../_utils/idForProvider' +import { foreignKeyForProvider, idForProvider } from '../../_utils/idForProvider' import testMatrix from '../_matrix' export default testMatrix.setupSchema(({ provider, previewFeatures }) => { + const schemaFeatures = previewFeatures === '' ? '"fieldReference"' : `"fieldReference",${previewFeatures}` return /* Prisma */ ` generator client { provider = "prisma-client-js" - previewFeatures = [${previewFeatures}] + previewFeatures = [${schemaFeatures}] } datasource db { @@ -17,8 +18,20 @@ export default testMatrix.setupSchema(({ provider, previewFeatures }) => { id ${idForProvider(provider)} email String @unique name String - createdAt DateTime - published Boolean + createdAt DateTime @default(now()) + published Boolean @default(false) + organizationId ${foreignKeyForProvider(provider)} @unique + organization Organization @relation(fields: [organizationId], references: [id]) + } + + model Organization { + id ${idForProvider(provider)} + user User? + } + + model Pet { + id ${idForProvider(provider)} + name String } ` }) diff --git a/packages/client/tests/functional/query-validation/tests.ts b/packages/client/tests/functional/query-validation/tests.ts index 69952ae0dd2d..266479f8f6a9 100644 --- a/packages/client/tests/functional/query-validation/tests.ts +++ b/packages/client/tests/functional/query-validation/tests.ts @@ -10,9 +10,9 @@ testMatrix.setupTestSuite( ({ previewFeatures }) => { describeIf(getQueryEngineProtocol() === 'json')('json', () => { test('include and select are used at the same time', async () => { + // @ts-expect-error const result = prisma.user.findMany({ select: {}, - // @ts-expect-error include: {}, }) @@ -21,15 +21,15 @@ testMatrix.setupTestSuite( Invalid \`prisma.user.findMany()\` invocation in /client/tests/functional/query-validation/tests.ts:0:0 - XX ({ previewFeatures }) => { - XX describeIf(getQueryEngineProtocol() === 'json')('json', () => { - XX test('include and select are used at the same time', async () => { - → XX const result = prisma.user.findMany({ - select: {}, - ~~~~~~ - include: {} - ~~~~~~~ - }) + XX describeIf(getQueryEngineProtocol() === 'json')('json', () => { + XX test('include and select are used at the same time', async () => { + XX // @ts-expect-error + → XX const result = prisma.user.findMany({ + select: {}, + ~~~~~~ + include: {} + ~~~~~~~ + }) Please either use \`include\` or \`select\`, but not both at the same time. `) @@ -43,22 +43,23 @@ testMatrix.setupTestSuite( await expect(result).rejects.toMatchPrismaErrorInlineSnapshot(` - Invalid \`prisma.user.findMany()\` invocation in - /client/tests/functional/query-validation/tests.ts:0:0 - - XX }) - XX - XX test('include used on scalar field', async () => { - → XX const result = prisma.user.findMany({ - include: { - id: true - ~~ - } - }) - - Invalid scalar field \`id\` for include statement on model User. Available options are listed in green. - Note that include statements only accept relation fields. - `) + Invalid \`prisma.user.findMany()\` invocation in + /client/tests/functional/query-validation/tests.ts:0:0 + + XX }) + XX + XX test('include used on scalar field', async () => { + → XX const result = prisma.user.findMany({ + include: { + id: true, + ~~ + ? organization?: true + } + }) + + Invalid scalar field \`id\` for include statement on model User. Available options are listed in green. + Note that include statements only accept relation fields. + `) }) test('unknown selection field', async () => { @@ -71,26 +72,28 @@ testMatrix.setupTestSuite( await expect(result).rejects.toMatchPrismaErrorInlineSnapshot(` - Invalid \`prisma.user.findMany()\` invocation in - /client/tests/functional/query-validation/tests.ts:0:0 - - XX }) - XX - XX test('unknown selection field', async () => { - → XX const result = prisma.user.findMany({ - select: { - notThere: true, - ~~~~~~~~ - ? id?: true, - ? email?: true, - ? name?: true, - ? createdAt?: true, - ? published?: true - } - }) - - Unknown field \`notThere\` for select statement on model \`User\`. Available options are listed in green. - `) + Invalid \`prisma.user.findMany()\` invocation in + /client/tests/functional/query-validation/tests.ts:0:0 + + XX }) + XX + XX test('unknown selection field', async () => { + → XX const result = prisma.user.findMany({ + select: { + notThere: true, + ~~~~~~~~ + ? id?: true, + ? email?: true, + ? name?: true, + ? createdAt?: true, + ? published?: true, + ? organizationId?: true, + ? organization?: true + } + }) + + Unknown field \`notThere\` for select statement on model \`User\`. Available options are listed in green. + `) }) test('empty selection', async () => { @@ -103,18 +106,20 @@ testMatrix.setupTestSuite( Invalid \`prisma.user.findMany()\` invocation in /client/tests/functional/query-validation/tests.ts:0:0 - XX }) - XX - XX test('empty selection', async () => { + XX }) + XX + XX test('empty selection', async () => { → XX const result = prisma.user.findMany({ - select: { - ? id?: true, - ? email?: true, - ? name?: true, - ? createdAt?: true, - ? published?: true - } - }) + select: { + ? id?: true, + ? email?: true, + ? name?: true, + ? createdAt?: true, + ? published?: true, + ? organizationId?: true, + ? organization?: true + } + }) The \`select\` statement for type User must not be empty. Available options are listed in green. `) @@ -142,7 +147,7 @@ testMatrix.setupTestSuite( ? cursor?: UserWhereUniqueInput, ? take?: Int, ? skip?: Int, - ? distinct?: UserScalarFieldEnum[] + ? distinct?: UserScalarFieldEnum | UserScalarFieldEnum[] }) Unknown argument \`notAnArgument\`. Available options are listed in green. @@ -159,29 +164,31 @@ testMatrix.setupTestSuite( await expect(result).rejects.toMatchPrismaErrorInlineSnapshot(` - Invalid \`prisma.user.findMany()\` invocation in - /client/tests/functional/query-validation/tests.ts:0:0 + Invalid \`prisma.user.findMany()\` invocation in + /client/tests/functional/query-validation/tests.ts:0:0 - XX }) - XX - XX test('unknown object field', async () => { - → XX const result = prisma.user.findMany({ - where: { - notAValidField: 123, - ~~~~~~~~~~~~~~ - ? AND?: UserWhereInput | UserWhereInput[], - ? OR?: UserWhereInput[], - ? NOT?: UserWhereInput | UserWhereInput[], - ? id?: StringFilter | String, - ? email?: StringFilter | String, - ? name?: StringFilter | String, - ? createdAt?: DateTimeFilter | DateTime, - ? published?: BoolFilter | Boolean - } - }) + XX }) + XX + XX test('unknown object field', async () => { + → XX const result = prisma.user.findMany({ + where: { + notAValidField: 123, + ~~~~~~~~~~~~~~ + ? AND?: UserWhereInput | UserWhereInput[], + ? OR?: UserWhereInput[], + ? NOT?: UserWhereInput | UserWhereInput[], + ? id?: StringFilter | String, + ? email?: StringFilter | String, + ? name?: StringFilter | String, + ? createdAt?: DateTimeFilter | DateTime, + ? published?: BoolFilter | Boolean, + ? organizationId?: StringFilter | String, + ? organization?: OrganizationRelationFilter | OrganizationWhereInput + } + }) - Unknown argument \`notAValidField\`. Available options are listed in green. - `) + Unknown argument \`notAValidField\`. Available options are listed in green. + `) }) test('missing required argument: nested', async () => { @@ -190,20 +197,20 @@ testMatrix.setupTestSuite( await expect(result).rejects.toMatchPrismaErrorInlineSnapshot(` - Invalid \`prisma.user.create()\` invocation in - /client/tests/functional/query-validation/tests.ts:0:0 + Invalid \`prisma.user.create()\` invocation in + /client/tests/functional/query-validation/tests.ts:0:0 - XX - XX test('missing required argument: nested', async () => { - XX // @ts-expect-error - → XX const result = prisma.user.create({ - data: { - + email: String - } - }) + XX + XX test('missing required argument: nested', async () => { + XX // @ts-expect-error + → XX const result = prisma.user.create({ + data: { + + email: String + } + }) - Argument \`email\` is missing. - `) + Argument \`email\` is missing. + `) }) test('invalid argument type', async () => { @@ -216,21 +223,42 @@ testMatrix.setupTestSuite( await expect(result).rejects.toMatchPrismaErrorInlineSnapshot(` - Invalid \`prisma.user.findUnique()\` invocation in - /client/tests/functional/query-validation/tests.ts:0:0 + Invalid \`prisma.user.findUnique()\` invocation in + /client/tests/functional/query-validation/tests.ts:0:0 - XX }) - XX - XX test('invalid argument type', async () => { - → XX const result = prisma.user.findUnique({ - where: { - email: 123 - ~~~ - } - }) + XX }) + XX + XX test('invalid argument type', async () => { + → XX const result = prisma.user.findUnique({ + where: { + email: 123 + ~~~ + } + }) - Argument \`email\`: Invalid value provided. Expected String, provided Int. - `) + Argument \`email\`: Invalid value provided. Expected String, provided Int. + `) + }) + + test('invalid field ref', async () => { + const result = prisma.user.findFirst({ + where: { + // @ts-expect-error + name: { gt: prisma.pet.fields.name }, + }, + }) + + await expect(result).rejects.toMatchPrismaErrorInlineSnapshot(` + + Invalid \`prisma.user.findFirst()\` invocation in + /client/tests/functional/query-validation/tests.ts:0:0 + + XX }) + XX + XX test('invalid field ref', async () => { + → XX const result = prisma.user.findFirst( + Input error. Expected a referenced scalar field of model User, but found a field of model Pet. + `) }) test('union error', async () => { @@ -243,21 +271,21 @@ testMatrix.setupTestSuite( await expect(result).rejects.toMatchPrismaErrorInlineSnapshot(` - Invalid \`prisma.user.findMany()\` invocation in - /client/tests/functional/query-validation/tests.ts:0:0 + Invalid \`prisma.user.findMany()\` invocation in + /client/tests/functional/query-validation/tests.ts:0:0 - XX }) - XX - XX test('union error', async () => { - → XX const result = prisma.user.findMany({ - where: { - email: 123 - ~~~ - } - }) + XX }) + XX + XX test('union error', async () => { + → XX const result = prisma.user.findMany({ + where: { + email: 123 + ~~~ + } + }) - Argument \`email\`: Invalid value provided. Expected StringFilter or String, provided Int. - `) + Argument \`email\`: Invalid value provided. Expected StringFilter or String, provided Int. + `) }) test('union error: different paths', async () => { @@ -270,23 +298,55 @@ testMatrix.setupTestSuite( await expect(result).rejects.toMatchPrismaErrorInlineSnapshot(` - Invalid \`prisma.user.findMany()\` invocation in - /client/tests/functional/query-validation/tests.ts:0:0 + Invalid \`prisma.user.findMany()\` invocation in + /client/tests/functional/query-validation/tests.ts:0:0 + + XX }) + XX + XX test('union error: different paths', async () => { + → XX const result = prisma.user.findMany({ + where: { + email: { + gt: 123 + ~~~ + } + } + }) + + Argument \`gt\`: Invalid value provided. Expected String or StringFieldRefInput, provided Int. + `) + }) - XX }) - XX - XX test('union error: different paths', async () => { - → XX const result = prisma.user.findMany({ - where: { - email: { - gt: 123 - ~~~ - } - } - }) + // https://github.com/prisma/prisma/issues/19707 + test('union error: invalid argument type vs required argument missing', async () => { + const result = prisma.user.create({ + data: { + name: 'Horsey McHorseface', + // @ts-expect-error + email: 123, + organizationId: 'a123456789012456789', + }, + }) - Argument \`gt\`: Invalid value provided. Expected String, provided Int. - `) + await expect(result).rejects.toMatchPrismaErrorInlineSnapshot(` + + Invalid \`prisma.user.create()\` invocation in + /client/tests/functional/query-validation/tests.ts:0:0 + + XX + XX // https://github.com/prisma/prisma/issues/19707 + XX test('union error: invalid argument type vs required argument missing', async () => { + → XX const result = prisma.user.create({ + data: { + name: "Horsey McHorseface", + email: 123, + ~~~ + organizationId: "a123456789012456789" + } + }) + + Argument \`email\`: Invalid value provided. Expected String, provided Int. + `) }) test('invalid argument value', async () => { @@ -298,23 +358,23 @@ testMatrix.setupTestSuite( await expect(result).rejects.toMatchPrismaErrorInlineSnapshot(` - Invalid \`prisma.user.findMany()\` invocation in - /client/tests/functional/query-validation/tests.ts:0:0 - - XX }) - XX - XX test('invalid argument value', async () => { - → XX const result = prisma.user.findMany({ - where: { - createdAt: { - gt: "yesterday" - ~~~~~~~~~~~ - } - } - }) - - Invalid value for argument \`gt\`: input contains invalid characters. Expected ISO-8601 DateTime. - `) + Invalid \`prisma.user.findMany()\` invocation in + /client/tests/functional/query-validation/tests.ts:0:0 + + XX }) + XX + XX test('invalid argument value', async () => { + → XX const result = prisma.user.findMany({ + where: { + createdAt: { + gt: "yesterday" + ~~~~~~~~~~~ + } + } + }) + + Invalid value for argument \`gt\`: input contains invalid characters. Expected ISO-8601 DateTime. + `) }) testIf(previewFeatures === '')('missing required field', async () => { @@ -325,21 +385,22 @@ testMatrix.setupTestSuite( await expect(result).rejects.toMatchPrismaErrorInlineSnapshot(` - Invalid \`prisma.user.findUnique()\` invocation in - /client/tests/functional/query-validation/tests.ts:0:0 - - XX }) - XX - XX testIf(previewFeatures === '')('missing required field', async () => { - → XX const result = prisma.user.findUnique({ - where: { - ? id?: String, - ? email?: String - } - }) - - Argument \`where\` of type UserWhereUniqueInput needs at least one argument. Available options are listed in green. - `) + Invalid \`prisma.user.findUnique()\` invocation in + /client/tests/functional/query-validation/tests.ts:0:0 + + XX }) + XX + XX testIf(previewFeatures === '')('missing required field', async () => { + → XX const result = prisma.user.findUnique({ + where: { + ? id?: String, + ? email?: String, + ? organizationId?: String + } + }) + + Argument \`where\` of type UserWhereUniqueInput needs at least one argument. Available options are listed in green. + `) }) testIf(previewFeatures === '"extendedWhereUnique"')('missing one of the specific required fields', async () => { @@ -350,27 +411,29 @@ testMatrix.setupTestSuite( await expect(result).rejects.toMatchPrismaErrorInlineSnapshot(` - Invalid \`prisma.user.findUnique()\` invocation in - /client/tests/functional/query-validation/tests.ts:0:0 - - XX }) - XX - XX testIf(previewFeatures === '"extendedWhereUnique"')('missing one of the specific required fields', async () => { - → XX const result = prisma.user.findUnique({ - where: { - ? id?: String, - ? email?: String, - ? AND?: UserWhereInput | UserWhereInput[], - ? OR?: UserWhereInput[], - ? NOT?: UserWhereInput | UserWhereInput[], - ? name?: StringFilter | String, - ? createdAt?: DateTimeFilter | DateTime, - ? published?: BoolFilter | Boolean - } - }) - - Argument \`where\` of type UserWhereUniqueInput needs at least one of \`id\` or \`email\` arguments. Available options are listed in green. - `) + Invalid \`prisma.user.findUnique()\` invocation in + /client/tests/functional/query-validation/tests.ts:0:0 + + XX }) + XX + XX testIf(previewFeatures === '"extendedWhereUnique"')('missing one of the specific required fields', async () => { + → XX const result = prisma.user.findUnique({ + where: { + ? id?: String, + ? email?: String, + ? organizationId?: String, + ? AND?: UserWhereInput | UserWhereInput[], + ? OR?: UserWhereInput[], + ? NOT?: UserWhereInput | UserWhereInput[], + ? name?: StringFilter | String, + ? createdAt?: DateTimeFilter | DateTime, + ? published?: BoolFilter | Boolean, + ? organization?: OrganizationRelationFilter | OrganizationWhereInput + } + }) + + Argument \`where\` of type UserWhereUniqueInput needs at least one of \`id\`, \`email\` or \`organizationId\` arguments. Available options are listed in green. + `) }) testIf(previewFeatures === '')('too many fields', async () => { @@ -378,22 +441,22 @@ testMatrix.setupTestSuite( await expect(result).rejects.toMatchPrismaErrorInlineSnapshot(` - Invalid \`prisma.user.findUnique()\` invocation in - /client/tests/functional/query-validation/tests.ts:0:0 - - XX }) - XX - XX testIf(previewFeatures === '')('too many fields', async () => { - → XX const result = prisma.user.findUnique({ - where: { - id: "123", - email: "foo@bar.com" - } - ~~~~~~~~~~~~~~~~~~~~~~ - }) - - Argument \`where\` of type UserWhereUniqueInput needs exactly one argument, but you provided id and email. Please choose one. - `) + Invalid \`prisma.user.findUnique()\` invocation in + /client/tests/functional/query-validation/tests.ts:0:0 + + XX }) + XX + XX testIf(previewFeatures === '')('too many fields', async () => { + → XX const result = prisma.user.findUnique({ + where: { + id: "123", + email: "foo@bar.com" + } + ~~~~~~~~~~~~~~~~~~~~~~ + }) + + Argument \`where\` of type UserWhereUniqueInput needs exactly one argument, but you provided id and email. Please choose one. + `) }) }) }, diff --git a/packages/client/tests/functional/relationMode-m-n-mongodb-failing-with-at-map/tests_m-to-n-MongoDB.ts b/packages/client/tests/functional/relationMode-m-n-mongodb-failing-with-at-map/tests_m-to-n-MongoDB.ts index 4f777cde9128..bbc14e9d4bc6 100644 --- a/packages/client/tests/functional/relationMode-m-n-mongodb-failing-with-at-map/tests_m-to-n-MongoDB.ts +++ b/packages/client/tests/functional/relationMode-m-n-mongodb-failing-with-at-map/tests_m-to-n-MongoDB.ts @@ -11,7 +11,7 @@ declare let prisma: import('@prisma/client').PrismaClient const describeIf = (condition: boolean) => (condition ? describe : describe.skip) // m:n relation (MongoDB database) -async function createXPostsWith2CategoriesMongoDB({ count, postModel }) { +async function createXPostsWith2CategoriesMongoDB({ count, postModel }: { count: number; postModel: string }) { const prismaPromises: any = [] for (let i = 0; i < count; i++) { diff --git a/packages/client/tests/functional/too-many-instances-of-prisma-client/tests.ts b/packages/client/tests/functional/too-many-instances-of-prisma-client/tests.ts index 2951655070a2..1235feb6285b 100644 --- a/packages/client/tests/functional/too-many-instances-of-prisma-client/tests.ts +++ b/packages/client/tests/functional/too-many-instances-of-prisma-client/tests.ts @@ -32,7 +32,7 @@ testMatrix.setupTestSuite( await client.$connect() } - expect(warnings.join('')).toContain('There are already 10 instances of Prisma Client actively running') + expect(warnings.join('')).toContain('This is the 10th instance of Prisma Client being started. Make sure this is intentional.') }, TIMEOUT, ) diff --git a/packages/client/tests/functional/validator/_matrix.ts b/packages/client/tests/functional/validator/_matrix.ts new file mode 100644 index 000000000000..591c8ae01ec1 --- /dev/null +++ b/packages/client/tests/functional/validator/_matrix.ts @@ -0,0 +1,9 @@ +import { defineMatrix } from '../_utils/defineMatrix' + +export default defineMatrix(() => [ + [ + { + provider: 'postgresql', + }, + ], +]) diff --git a/packages/client/tests/functional/validator/prisma/_schema.ts b/packages/client/tests/functional/validator/prisma/_schema.ts new file mode 100644 index 000000000000..6b7bf6280bde --- /dev/null +++ b/packages/client/tests/functional/validator/prisma/_schema.ts @@ -0,0 +1,19 @@ +import { idForProvider } from '../../_utils/idForProvider' +import testMatrix from '../_matrix' + +export default testMatrix.setupSchema(({ provider }) => { + return /* Prisma */ ` + generator client { + provider = "prisma-client-js" + } + + datasource db { + provider = "${provider}" + url = env("DATABASE_URI_${provider}") + } + + model User { + id ${idForProvider(provider)} + } + ` +}) diff --git a/packages/client/tests/functional/validator/tests.ts b/packages/client/tests/functional/validator/tests.ts new file mode 100644 index 000000000000..1c437c3c582f --- /dev/null +++ b/packages/client/tests/functional/validator/tests.ts @@ -0,0 +1,180 @@ +import { expectTypeOf } from 'expect-type' + +import testMatrix from './_matrix' +// @ts-ignore +import type { Prisma as PrismaNamespace, PrismaClient } from './node_modules/@prisma/client' + +declare let prisma: PrismaClient +declare let Prisma: typeof PrismaNamespace + +testMatrix.setupTestSuite( + () => { + test('validation via non-extended client', () => { + const data1 = Prisma.validator()({ + id: true, + }) + expectTypeOf(data1).toMatchTypeOf<{ id: true }>() + expect(data1).toEqual({ id: true }) + + Prisma.validator()({ + // @ts-expect-error + wrong: {}, + }) + + const data2 = Prisma.validator( + prisma, + 'user', + 'findFirst', + )({ + select: { id: true }, + }) + expectTypeOf(data2).toEqualTypeOf<{ select: { id: true } }>() + expect(data2).toEqual({ select: { id: true } }) + + Prisma.validator( + prisma, + 'user', + 'findFirst', + )({ + // @ts-expect-error + select: { wrong: {} }, + }) + + const data3 = Prisma.validator( + prisma, + 'user', + 'create', + 'data', + )({ + id: '1', + }) + expectTypeOf(data3).toEqualTypeOf<{ id: '1' }>() + expect(data3).toEqual({ id: '1' }) + + Prisma.validator( + prisma, + 'user', + 'create', + 'data', + )({ + // @ts-expect-error + wrong: {}, + }) + + const data4 = Prisma.validator( + prisma, + 'user', + 'create', + 'select', + )({ + id: true, + }) + expectTypeOf(data4).toEqualTypeOf<{ id: true }>() + expect(data4).toEqual({ id: true }) + + Prisma.validator( + prisma, + 'user', + 'create', + 'select', + )({ + // @ts-expect-error + wrong: {}, + }) + }) + + test('validation via extended client', () => { + const xprisma = prisma.$extends({ + result: { + user: { + prop: { + compute() { + return 1 + }, + needs: { id: true }, + }, + }, + }, + }) + + const data1 = Prisma.validator()({ + id: true, + }) + expectTypeOf(data1).toMatchTypeOf<{ id: true }>() + expect(data1).toEqual({ id: true }) + + Prisma.validator()({ + // @ts-expect-error + wrong: {}, + }) + + const data2 = Prisma.validator( + xprisma, + 'user', + 'findFirst', + )({ + select: { prop: true }, + }) + expectTypeOf(data2).toEqualTypeOf<{ select: { prop: true } }>() + expect(data2).toEqual({ select: { prop: true } }) + + Prisma.validator( + xprisma, + 'user', + 'findFirst', + )({ + // @ts-expect-error + select: { wrong: {} }, + }) + + const data3 = Prisma.validator( + xprisma, + 'user', + 'create', + 'data', + )({ + id: '1', + }) + expectTypeOf(data3).toEqualTypeOf<{ id: '1' }>() + expect(data3).toEqual({ id: '1' }) + + Prisma.validator( + xprisma, + 'user', + 'create', + 'data', + )({ + // @ts-expect-error + wrong: {}, + }) + + const data4 = Prisma.validator( + xprisma, + 'user', + 'create', + 'select', + )({ + id: true, + prop: true, + }) + expectTypeOf(data4).toEqualTypeOf<{ id: true; prop: true }>() + expect(data4).toEqual({ id: true, prop: true }) + + Prisma.validator( + xprisma, + 'user', + 'create', + 'select', + )({ + // @ts-expect-error + wrong: {}, + }) + }) + }, + { + optOut: { + from: ['sqlite', 'mysql', 'mongodb', 'cockroachdb', 'sqlserver'], + reason: 'This is mostly a type-level test, but we want to assert that queries still work with the validator.', + }, + }, +) diff --git a/packages/client/tests/functional/views/tests.ts b/packages/client/tests/functional/views/tests.ts index 7a6975ca08be..e090f89d4ee7 100644 --- a/packages/client/tests/functional/views/tests.ts +++ b/packages/client/tests/functional/views/tests.ts @@ -9,14 +9,14 @@ declare let prisma: PrismaClient testMatrix.setupTestSuite( (suiteConfig) => { const fakeUser = { - id: suiteConfig.provider === 'mongodb' ? faker.database.mongodbObjectId() : faker.random.alphaNumeric(5), + id: suiteConfig.provider === 'mongodb' ? faker.database.mongodbObjectId() : faker.string.alphanumeric(5), email: faker.internet.email(), - name: faker.name.firstName(), + name: faker.person.firstName(), } const fakeProfile = { - id: suiteConfig.provider === 'mongodb' ? faker.database.mongodbObjectId() : faker.random.alphaNumeric(5), - bio: faker.name.jobTitle(), + id: suiteConfig.provider === 'mongodb' ? faker.database.mongodbObjectId() : faker.string.alphanumeric(5), + bio: faker.person.jobTitle(), } beforeAll(async () => { diff --git a/packages/debug/package.json b/packages/debug/package.json index 3b2681dd861e..59c3eaa4dd01 100644 --- a/packages/debug/package.json +++ b/packages/debug/package.json @@ -14,8 +14,8 @@ }, "bugs": "https://github.com/prisma/prisma/issues", "devDependencies": { - "@types/jest": "29.5.1", - "@types/node": "18.16.14", + "@types/jest": "29.5.2", + "@types/node": "18.16.16", "esbuild": "0.15.13", "jest": "29.5.0", "jest-junit": "16.0.0", diff --git a/packages/engines/README.md b/packages/engines/README.md index 4e2deaebb436..c0077a1ff8fb 100644 --- a/packages/engines/README.md +++ b/packages/engines/README.md @@ -5,7 +5,7 @@ Its release cycle does not follow SemVer, which means we might release breaking The postinstall hook of this package downloads all Prisma engines available for the current platform, namely the Query Engine and the Migration Engine from the Prisma CDN. -The engines version to be downloaded are directly determined by the version of its `@prisma/engines-version` dependency. +The engines version to be downloaded is directly determined by the version of its `@prisma/engines-version` dependency. You should probably not use this package directly, but instead use one of these: diff --git a/packages/engines/package.json b/packages/engines/package.json index 40946adfb62d..8da4fc4d17d5 100644 --- a/packages/engines/package.json +++ b/packages/engines/package.json @@ -8,13 +8,13 @@ "author": "Tim Suchanek ", "devDependencies": { "@prisma/debug": "workspace:*", - "@prisma/engines-version": "4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944", + "@prisma/engines-version": "4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309", "@prisma/fetch-engine": "workspace:*", "@prisma/get-platform": "workspace:*", - "@swc/core": "1.3.32", + "@swc/core": "1.3.64", "@swc/jest": "0.2.26", - "@types/jest": "29.5.1", - "@types/node": "18.16.14", + "@types/jest": "29.5.2", + "@types/node": "18.16.16", "execa": "5.1.1", "jest": "29.5.0", "typescript": "4.9.5" diff --git a/packages/engines/src/index.ts b/packages/engines/src/index.ts index dbf2bacda871..46e6942908b6 100644 --- a/packages/engines/src/index.ts +++ b/packages/engines/src/index.ts @@ -62,6 +62,8 @@ path.join(__dirname, '../query-engine-darwin-arm64') path.join(__dirname, '../query-engine-debian-openssl-1.0.x') path.join(__dirname, '../query-engine-debian-openssl-1.1.x') path.join(__dirname, '../query-engine-debian-openssl-3.0.x') +path.join(__dirname, '../query-engine-linux-static-x64') +path.join(__dirname, '../query-engine-linux-static-arm64') path.join(__dirname, '../query-engine-rhel-openssl-1.0.x') path.join(__dirname, '../query-engine-rhel-openssl-1.1.x') path.join(__dirname, '../query-engine-rhel-openssl-3.0.x') diff --git a/packages/fetch-engine/package.json b/packages/fetch-engine/package.json index 20fdfef8ec84..ec4309a595ae 100644 --- a/packages/fetch-engine/package.json +++ b/packages/fetch-engine/package.json @@ -15,11 +15,11 @@ "bugs": "https://github.com/prisma/prisma/issues", "enginesOverride": {}, "devDependencies": { - "@prisma/engines-version": "4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944", - "@swc/core": "1.3.32", + "@prisma/engines-version": "4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309", + "@swc/core": "1.3.64", "@swc/jest": "0.2.26", - "@types/jest": "29.5.1", - "@types/node": "18.16.14", + "@types/jest": "29.5.2", + "@types/node": "18.16.16", "@types/node-fetch": "2.6.4", "@types/progress": "2.0.5", "del": "6.1.1", @@ -34,8 +34,8 @@ "find-cache-dir": "3.3.2", "fs-extra": "11.1.1", "hasha": "5.2.2", - "http-proxy-agent": "5.0.0", - "https-proxy-agent": "5.0.1", + "http-proxy-agent": "7.0.0", + "https-proxy-agent": "7.0.0", "kleur": "4.1.5", "node-fetch": "2.6.11", "p-filter": "2.1.0", diff --git a/packages/fetch-engine/src/__tests__/binaryTarget/.gitkeep b/packages/fetch-engine/src/__tests__/binaryTarget/.gitkeep new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/packages/fetch-engine/src/__tests__/checksum/.gitkeep b/packages/fetch-engine/src/__tests__/checksum/.gitkeep new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/packages/fetch-engine/src/__tests__/download.test.ts b/packages/fetch-engine/src/__tests__/download.test.ts index 2d75ad61d751..699a0381b1b1 100644 --- a/packages/fetch-engine/src/__tests__/download.test.ts +++ b/packages/fetch-engine/src/__tests__/download.test.ts @@ -1,7 +1,9 @@ import { enginesVersion } from '@prisma/engines-version' -import { getPlatform } from '@prisma/get-platform' +import { getPlatform, Platform } from '@prisma/get-platform' import del from 'del' import fs from 'fs' +import type { Response } from 'node-fetch' +import _mockFetch from 'node-fetch' import path from 'path' import stripAnsi from 'strip-ansi' @@ -9,9 +11,15 @@ import { cleanupCache } from '../cleanupCache' import { BinaryType, download, getBinaryName, getVersion } from '../download' import { getFiles } from './__utils__/getFiles' +const testIf = (condition: boolean) => (condition ? test : test.skip) + +jest.mock('node-fetch', () => jest.fn()) +const actualFetch: typeof import('node-fetch').default = jest.requireActual('node-fetch') +const mockFetch = _mockFetch as any as jest.Mock, Parameters> + const CURRENT_ENGINES_HASH = enginesVersion console.debug({ CURRENT_ENGINES_HASH }) -const FIXED_ENGINES_HASH = 'eac182fd33c63959a61946df56831625a9a39627' +const FIXED_ENGINES_HASH = 'b20ead4d3ab9e78ac112966e242ded703f4a052c' const dirname = process.platform === 'win32' ? __dirname.split(path.sep).join('/') : __dirname // Network can be slow, especially for macOS in CI. @@ -19,542 +27,719 @@ jest.setTimeout(300_000) jest.retryTimes(3) describe('download', () => { + const baseDirAll = path.posix.join(dirname, 'all') + const baseDirCorruption = path.posix.join(dirname, 'corruption') + const baseDirChecksum = path.posix.join(dirname, 'checksum') + const baseDirBinaryTarget = path.posix.join(dirname, 'binaryTarget') + let platform: Platform + beforeEach(async () => { + mockFetch.mockReset().mockImplementation(actualFetch) // completely clean up the cache and keep nothing await cleanupCache(0) - // Make sure to not mix forward and backward slashes in the path - // or del glob pattern would not work on Windows - await del(path.posix.join(dirname, '/**/*engine*')) - }) - afterEach(() => { - delete process.env.PRISMA_QUERY_ENGINE_BINARY + platform = await getPlatform() }) - test('download all current engines', async () => { - const baseDir = path.posix.join(dirname, 'all') - - const platform = await getPlatform() - const queryEnginePath = path.join(baseDir, getBinaryName(BinaryType.QueryEngineBinary, platform)) - const migrationEnginePath = path.join(baseDir, getBinaryName(BinaryType.MigrationEngineBinary, platform)) - - await download({ - binaries: { - [BinaryType.QueryEngineLibrary]: baseDir, - [BinaryType.QueryEngineBinary]: baseDir, - [BinaryType.MigrationEngineBinary]: baseDir, - }, - binaryTargets: [ - 'darwin', - 'darwin-arm64', - 'debian-openssl-1.0.x', - 'debian-openssl-1.1.x', - 'debian-openssl-3.0.x', - 'linux-arm64-openssl-1.0.x', - 'linux-arm64-openssl-1.1.x', - 'linux-arm64-openssl-3.0.x', - 'rhel-openssl-1.0.x', - 'rhel-openssl-1.1.x', - 'rhel-openssl-3.0.x', - 'windows', - 'linux-musl', - 'linux-musl-openssl-3.0.x', - 'linux-musl-arm64-openssl-1.1.x', - 'linux-musl-arm64-openssl-3.0.x', - ], - version: CURRENT_ENGINES_HASH, + describe('all engines', () => { + beforeEach(async () => { + // Make sure to not mix forward and backward slashes in the path + // or del glob pattern would not work on Windows + await del(path.posix.join(baseDirAll, '*engine*')) + await del(path.posix.join(baseDirCorruption, '*engine*')) }) - const files = getFiles(baseDir).map((f) => f.name) - expect(files).toMatchInlineSnapshot(` - [ - ".gitkeep", - "libquery_engine-darwin-arm64.dylib.node", - "libquery_engine-darwin.dylib.node", - "libquery_engine-debian-openssl-1.0.x.so.node", - "libquery_engine-debian-openssl-1.1.x.so.node", - "libquery_engine-debian-openssl-3.0.x.so.node", - "libquery_engine-linux-arm64-openssl-1.0.x.so.node", - "libquery_engine-linux-arm64-openssl-1.1.x.so.node", - "libquery_engine-linux-arm64-openssl-3.0.x.so.node", - "libquery_engine-linux-musl-arm64-openssl-1.1.x.so.node", - "libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node", - "libquery_engine-linux-musl-openssl-3.0.x.so.node", - "libquery_engine-linux-musl.so.node", - "libquery_engine-rhel-openssl-1.0.x.so.node", - "libquery_engine-rhel-openssl-1.1.x.so.node", - "libquery_engine-rhel-openssl-3.0.x.so.node", - "migration-engine-darwin", - "migration-engine-darwin-arm64", - "migration-engine-debian-openssl-1.0.x", - "migration-engine-debian-openssl-1.1.x", - "migration-engine-debian-openssl-3.0.x", - "migration-engine-linux-arm64-openssl-1.0.x", - "migration-engine-linux-arm64-openssl-1.1.x", - "migration-engine-linux-arm64-openssl-3.0.x", - "migration-engine-linux-musl", - "migration-engine-linux-musl-arm64-openssl-1.1.x", - "migration-engine-linux-musl-arm64-openssl-3.0.x", - "migration-engine-linux-musl-openssl-3.0.x", - "migration-engine-rhel-openssl-1.0.x", - "migration-engine-rhel-openssl-1.1.x", - "migration-engine-rhel-openssl-3.0.x", - "migration-engine-windows.exe", - "query-engine-darwin", - "query-engine-darwin-arm64", - "query-engine-debian-openssl-1.0.x", - "query-engine-debian-openssl-1.1.x", - "query-engine-debian-openssl-3.0.x", - "query-engine-linux-arm64-openssl-1.0.x", - "query-engine-linux-arm64-openssl-1.1.x", - "query-engine-linux-arm64-openssl-3.0.x", - "query-engine-linux-musl", - "query-engine-linux-musl-arm64-openssl-1.1.x", - "query-engine-linux-musl-arm64-openssl-3.0.x", - "query-engine-linux-musl-openssl-3.0.x", - "query-engine-rhel-openssl-1.0.x", - "query-engine-rhel-openssl-1.1.x", - "query-engine-rhel-openssl-3.0.x", - "query-engine-windows.exe", - "query_engine-windows.dll.node", - ] - `) - - // Check that all engines hashes are the same - expect(await getVersion(queryEnginePath, BinaryType.QueryEngineBinary)).toContain(CURRENT_ENGINES_HASH) - expect(await getVersion(migrationEnginePath, BinaryType.MigrationEngineBinary)).toContain(CURRENT_ENGINES_HASH) - }) + test('download all current engines', async () => { + const platform = await getPlatform() + const queryEnginePath = path.join(baseDirAll, getBinaryName(BinaryType.QueryEngineBinary, platform)) + const migrationEnginePath = path.join(baseDirAll, getBinaryName(BinaryType.MigrationEngineBinary, platform)) - test('download all binaries & cache them', async () => { - const baseDir = path.posix.join(dirname, 'all') - - const platform = await getPlatform() - const queryEnginePath = path.join(baseDir, getBinaryName(BinaryType.QueryEngineBinary, platform)) - const migrationEnginePath = path.join(baseDir, getBinaryName(BinaryType.MigrationEngineBinary, platform)) - - const before0 = Date.now() - await download({ - binaries: { - [BinaryType.QueryEngineLibrary]: baseDir, - [BinaryType.QueryEngineBinary]: baseDir, - [BinaryType.MigrationEngineBinary]: baseDir, - }, - binaryTargets: [ - 'darwin', - 'darwin-arm64', - 'debian-openssl-1.0.x', - 'debian-openssl-1.1.x', - 'debian-openssl-3.0.x', - 'linux-arm64-openssl-1.0.x', - 'linux-arm64-openssl-1.1.x', - 'linux-arm64-openssl-3.0.x', - 'rhel-openssl-1.0.x', - 'rhel-openssl-1.1.x', - 'rhel-openssl-3.0.x', - 'windows', - 'linux-musl', - 'linux-musl-openssl-3.0.x', - 'linux-musl-arm64-openssl-1.1.x', - 'linux-musl-arm64-openssl-3.0.x', - ], - version: FIXED_ENGINES_HASH, - }) - const after0 = Date.now() - const timeInMsToDownloadAll = after0 - before0 - console.debug( - `1 - No Cache: first time, download everything. -It took ${timeInMsToDownloadAll}ms to execute download() for all binaryTargets.`, - ) - - const files = getFiles(baseDir) - expect(files).toMatchInlineSnapshot(` - [ - { - "name": ".gitkeep", - "size": 0, - }, - { - "name": "libquery_engine-darwin-arm64.dylib.node", - "size": 14628824, - }, - { - "name": "libquery_engine-darwin.dylib.node", - "size": 15859568, - }, - { - "name": "libquery_engine-debian-openssl-1.0.x.so.node", - "size": 17573416, - }, - { - "name": "libquery_engine-debian-openssl-1.1.x.so.node", - "size": 15085488, - }, - { - "name": "libquery_engine-debian-openssl-3.0.x.so.node", - "size": 15085488, - }, - { - "name": "libquery_engine-linux-arm64-openssl-1.0.x.so.node", - "size": 14626896, - }, - { - "name": "libquery_engine-linux-arm64-openssl-1.1.x.so.node", - "size": 15363048, - }, - { - "name": "libquery_engine-linux-arm64-openssl-3.0.x.so.node", - "size": 16701064, - }, - { - "name": "libquery_engine-linux-musl-arm64-openssl-1.1.x.so.node", - "size": 15637680, - }, - { - "name": "libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node", - "size": 17053440, - }, - { - "name": "libquery_engine-linux-musl-openssl-3.0.x.so.node", - "size": 14491240, - }, - { - "name": "libquery_engine-linux-musl.so.node", - "size": 14253768, - }, - { - "name": "libquery_engine-rhel-openssl-1.0.x.so.node", - "size": 16966120, - }, - { - "name": "libquery_engine-rhel-openssl-1.1.x.so.node", - "size": 14491176, - }, - { - "name": "libquery_engine-rhel-openssl-3.0.x.so.node", - "size": 14491176, - }, - { - "name": "migration-engine-darwin", - "size": 20612160, - }, - { - "name": "migration-engine-darwin-arm64", - "size": 19343790, - }, - { - "name": "migration-engine-debian-openssl-1.0.x", - "size": 23349992, - }, - { - "name": "migration-engine-debian-openssl-1.1.x", - "size": 20624928, - }, - { - "name": "migration-engine-debian-openssl-3.0.x", - "size": 20625584, - }, - { - "name": "migration-engine-linux-arm64-openssl-1.0.x", - "size": 20646448, - }, - { - "name": "migration-engine-linux-arm64-openssl-1.1.x", - "size": 21398992, - }, - { - "name": "migration-engine-linux-arm64-openssl-3.0.x", - "size": 23066416, - }, - { - "name": "migration-engine-linux-musl", - "size": 18296712, - }, - { - "name": "migration-engine-linux-musl-arm64-openssl-1.1.x", - "size": 21728944, - }, - { - "name": "migration-engine-linux-musl-arm64-openssl-3.0.x", - "size": 23458736, - }, - { - "name": "migration-engine-linux-musl-openssl-3.0.x", - "size": 18473608, - }, - { - "name": "migration-engine-rhel-openssl-1.0.x", - "size": 21289336, - }, - { - "name": "migration-engine-rhel-openssl-1.1.x", - "size": 18580240, - }, - { - "name": "migration-engine-rhel-openssl-3.0.x", - "size": 18589496, - }, - { - "name": "migration-engine-windows.exe", - "size": 14989312, - }, - { - "name": "query-engine-darwin", - "size": 17823816, - }, - { - "name": "query-engine-darwin-arm64", - "size": 16556192, - }, - { - "name": "query-engine-debian-openssl-1.0.x", - "size": 17525064, - }, - { - "name": "query-engine-debian-openssl-1.1.x", - "size": 17512712, - }, - { - "name": "query-engine-debian-openssl-3.0.x", - "size": 17512712, - }, - { - "name": "query-engine-linux-arm64-openssl-1.0.x", - "size": 16518944, - }, - { - "name": "query-engine-linux-arm64-openssl-1.1.x", - "size": 17360248, - }, - { - "name": "query-engine-linux-arm64-openssl-3.0.x", - "size": 18694176, - }, - { - "name": "query-engine-linux-musl", - "size": 16484312, - }, - { - "name": "query-engine-linux-musl-arm64-openssl-1.1.x", - "size": 17622504, - }, - { - "name": "query-engine-linux-musl-arm64-openssl-3.0.x", - "size": 19038264, - }, - { - "name": "query-engine-linux-musl-openssl-3.0.x", - "size": 16689072, - }, - { - "name": "query-engine-rhel-openssl-1.0.x", - "size": 16705464, - }, - { - "name": "query-engine-rhel-openssl-1.1.x", - "size": 16705464, - }, - { - "name": "query-engine-rhel-openssl-3.0.x", - "size": 16705464, + await download({ + binaries: { + [BinaryType.QueryEngineLibrary]: baseDirAll, + [BinaryType.QueryEngineBinary]: baseDirAll, + [BinaryType.MigrationEngineBinary]: baseDirAll, + }, + binaryTargets: [ + 'darwin', + 'darwin-arm64', + 'debian-openssl-1.0.x', + 'debian-openssl-1.1.x', + 'debian-openssl-3.0.x', + 'linux-arm64-openssl-1.0.x', + 'linux-arm64-openssl-1.1.x', + 'linux-arm64-openssl-3.0.x', + 'rhel-openssl-1.0.x', + 'rhel-openssl-1.1.x', + 'rhel-openssl-3.0.x', + 'windows', + 'linux-musl', + 'linux-musl-openssl-3.0.x', + 'linux-musl-arm64-openssl-1.1.x', + 'linux-musl-arm64-openssl-3.0.x', + ], + version: CURRENT_ENGINES_HASH, + }) + + await download({ + binaries: { + [BinaryType.QueryEngineBinary]: baseDirAll, + [BinaryType.MigrationEngineBinary]: baseDirAll, }, - { - "name": "query-engine-windows.exe", - "size": 19318272, + binaryTargets: ['linux-static-x64', 'linux-static-arm64'], + version: CURRENT_ENGINES_HASH, + }) + + const files = getFiles(baseDirAll).map((f) => f.name) + expect(files).toMatchInlineSnapshot(` + [ + ".gitkeep", + "libquery_engine-darwin-arm64.dylib.node", + "libquery_engine-darwin.dylib.node", + "libquery_engine-debian-openssl-1.0.x.so.node", + "libquery_engine-debian-openssl-1.1.x.so.node", + "libquery_engine-debian-openssl-3.0.x.so.node", + "libquery_engine-linux-arm64-openssl-1.0.x.so.node", + "libquery_engine-linux-arm64-openssl-1.1.x.so.node", + "libquery_engine-linux-arm64-openssl-3.0.x.so.node", + "libquery_engine-linux-musl-arm64-openssl-1.1.x.so.node", + "libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node", + "libquery_engine-linux-musl-openssl-3.0.x.so.node", + "libquery_engine-linux-musl.so.node", + "libquery_engine-rhel-openssl-1.0.x.so.node", + "libquery_engine-rhel-openssl-1.1.x.so.node", + "libquery_engine-rhel-openssl-3.0.x.so.node", + "migration-engine-darwin", + "migration-engine-darwin-arm64", + "migration-engine-debian-openssl-1.0.x", + "migration-engine-debian-openssl-1.1.x", + "migration-engine-debian-openssl-3.0.x", + "migration-engine-linux-arm64-openssl-1.0.x", + "migration-engine-linux-arm64-openssl-1.1.x", + "migration-engine-linux-arm64-openssl-3.0.x", + "migration-engine-linux-musl", + "migration-engine-linux-musl-arm64-openssl-1.1.x", + "migration-engine-linux-musl-arm64-openssl-3.0.x", + "migration-engine-linux-musl-openssl-3.0.x", + "migration-engine-linux-static-arm64", + "migration-engine-linux-static-x64", + "migration-engine-rhel-openssl-1.0.x", + "migration-engine-rhel-openssl-1.1.x", + "migration-engine-rhel-openssl-3.0.x", + "migration-engine-windows.exe", + "query-engine-darwin", + "query-engine-darwin-arm64", + "query-engine-debian-openssl-1.0.x", + "query-engine-debian-openssl-1.1.x", + "query-engine-debian-openssl-3.0.x", + "query-engine-linux-arm64-openssl-1.0.x", + "query-engine-linux-arm64-openssl-1.1.x", + "query-engine-linux-arm64-openssl-3.0.x", + "query-engine-linux-musl", + "query-engine-linux-musl-arm64-openssl-1.1.x", + "query-engine-linux-musl-arm64-openssl-3.0.x", + "query-engine-linux-musl-openssl-3.0.x", + "query-engine-linux-static-arm64", + "query-engine-linux-static-x64", + "query-engine-rhel-openssl-1.0.x", + "query-engine-rhel-openssl-1.1.x", + "query-engine-rhel-openssl-3.0.x", + "query-engine-windows.exe", + "query_engine-windows.dll.node", + ] + `) + + // Check that all engines hashes are the same + expect(await getVersion(queryEnginePath, BinaryType.QueryEngineBinary)).toContain(CURRENT_ENGINES_HASH) + expect(await getVersion(migrationEnginePath, BinaryType.MigrationEngineBinary)).toContain(CURRENT_ENGINES_HASH) + }) + + test('download all engines & cache them', async () => { + const queryEnginePath = path.join(baseDirAll, getBinaryName(BinaryType.QueryEngineBinary, platform)) + const migrationEnginePath = path.join(baseDirAll, getBinaryName(BinaryType.MigrationEngineBinary, platform)) + + const before0 = Date.now() + await download({ + binaries: { + [BinaryType.QueryEngineLibrary]: baseDirAll, + [BinaryType.QueryEngineBinary]: baseDirAll, + [BinaryType.MigrationEngineBinary]: baseDirAll, + }, + binaryTargets: [ + 'darwin', + 'darwin-arm64', + 'debian-openssl-1.0.x', + 'debian-openssl-1.1.x', + 'debian-openssl-3.0.x', + 'linux-arm64-openssl-1.0.x', + 'linux-arm64-openssl-1.1.x', + 'linux-arm64-openssl-3.0.x', + 'rhel-openssl-1.0.x', + 'rhel-openssl-1.1.x', + 'rhel-openssl-3.0.x', + 'windows', + 'linux-musl', + 'linux-musl-openssl-3.0.x', + 'linux-musl-arm64-openssl-1.1.x', + 'linux-musl-arm64-openssl-3.0.x', + ], + version: FIXED_ENGINES_HASH, + }) + + await download({ + binaries: { + [BinaryType.QueryEngineBinary]: baseDirAll, + [BinaryType.MigrationEngineBinary]: baseDirAll, }, - { - "name": "query_engine-windows.dll.node", - "size": 16984064, + binaryTargets: ['linux-static-x64', 'linux-static-arm64'], + version: FIXED_ENGINES_HASH, + }) + + const after0 = Date.now() + const timeInMsToDownloadAll = after0 - before0 + console.debug( + `1 - No Cache: first time, download everything. +It took ${timeInMsToDownloadAll}ms to execute download() for all binaryTargets.`, + ) + + const files = getFiles(baseDirAll) + expect(files).toMatchInlineSnapshot(` + [ + { + "name": ".gitkeep", + "size": 0, + }, + { + "name": "libquery_engine-darwin-arm64.dylib.node", + "size": 14779048, + }, + { + "name": "libquery_engine-darwin.dylib.node", + "size": 15943376, + }, + { + "name": "libquery_engine-debian-openssl-1.0.x.so.node", + "size": 17137832, + }, + { + "name": "libquery_engine-debian-openssl-1.1.x.so.node", + "size": 14662888, + }, + { + "name": "libquery_engine-debian-openssl-3.0.x.so.node", + "size": 14662888, + }, + { + "name": "libquery_engine-linux-arm64-openssl-1.0.x.so.node", + "size": 14798608, + }, + { + "name": "libquery_engine-linux-arm64-openssl-1.1.x.so.node", + "size": 15522472, + }, + { + "name": "libquery_engine-linux-arm64-openssl-3.0.x.so.node", + "size": 16860488, + }, + { + "name": "libquery_engine-linux-musl-arm64-openssl-1.1.x.so.node", + "size": 15809376, + }, + { + "name": "libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node", + "size": 17229232, + }, + { + "name": "libquery_engine-linux-musl-openssl-3.0.x.so.node", + "size": 14654760, + }, + { + "name": "libquery_engine-linux-musl.so.node", + "size": 14511464, + }, + { + "name": "libquery_engine-rhel-openssl-1.0.x.so.node", + "size": 17137832, + }, + { + "name": "libquery_engine-rhel-openssl-1.1.x.so.node", + "size": 14662888, + }, + { + "name": "libquery_engine-rhel-openssl-3.0.x.so.node", + "size": 14662888, + }, + { + "name": "migration-engine-darwin", + "size": 21373456, + }, + { + "name": "migration-engine-darwin-arm64", + "size": 20102638, + }, + { + "name": "migration-engine-debian-openssl-1.0.x", + "size": 22144168, + }, + { + "name": "migration-engine-debian-openssl-1.1.x", + "size": 19440080, + }, + { + "name": "migration-engine-debian-openssl-3.0.x", + "size": 19441160, + }, + { + "name": "migration-engine-linux-arm64-openssl-1.0.x", + "size": 21458768, + }, + { + "name": "migration-engine-linux-arm64-openssl-1.1.x", + "size": 22211472, + }, + { + "name": "migration-engine-linux-arm64-openssl-3.0.x", + "size": 23883344, + }, + { + "name": "migration-engine-linux-musl", + "size": 19058352, + }, + { + "name": "migration-engine-linux-musl-arm64-openssl-1.1.x", + "size": 22553584, + }, + { + "name": "migration-engine-linux-musl-arm64-openssl-3.0.x", + "size": 24279432, + }, + { + "name": "migration-engine-linux-musl-openssl-3.0.x", + "size": 19348096, + }, + { + "name": "migration-engine-linux-static-arm64", + "size": 21218896, + }, + { + "name": "migration-engine-linux-static-x64", + "size": 22324992, + }, + { + "name": "migration-engine-rhel-openssl-1.0.x", + "size": 22144168, + }, + { + "name": "migration-engine-rhel-openssl-1.1.x", + "size": 19440080, + }, + { + "name": "migration-engine-rhel-openssl-3.0.x", + "size": 19441160, + }, + { + "name": "migration-engine-windows.exe", + "size": 15780864, + }, + { + "name": "query-engine-darwin", + "size": 17840936, + }, + { + "name": "query-engine-darwin-arm64", + "size": 16655984, + }, + { + "name": "query-engine-debian-openssl-1.0.x", + "size": 19287104, + }, + { + "name": "query-engine-debian-openssl-1.1.x", + "size": 16808072, + }, + { + "name": "query-engine-debian-openssl-3.0.x", + "size": 16808072, + }, + { + "name": "query-engine-linux-arm64-openssl-1.0.x", + "size": 16722600, + }, + { + "name": "query-engine-linux-arm64-openssl-1.1.x", + "size": 17462856, + }, + { + "name": "query-engine-linux-arm64-openssl-3.0.x", + "size": 18788592, + }, + { + "name": "query-engine-linux-musl", + "size": 16664640, + }, + { + "name": "query-engine-linux-musl-arm64-openssl-1.1.x", + "size": 17708728, + }, + { + "name": "query-engine-linux-musl-arm64-openssl-3.0.x", + "size": 19120392, + }, + { + "name": "query-engine-linux-musl-openssl-3.0.x", + "size": 16775312, + }, + { + "name": "query-engine-linux-static-arm64", + "size": 15984368, + }, + { + "name": "query-engine-linux-static-x64", + "size": 19274912, + }, + { + "name": "query-engine-rhel-openssl-1.0.x", + "size": 19287104, + }, + { + "name": "query-engine-rhel-openssl-1.1.x", + "size": 16808072, + }, + { + "name": "query-engine-rhel-openssl-3.0.x", + "size": 16808072, + }, + { + "name": "query-engine-windows.exe", + "size": 19483648, + }, + { + "name": "query_engine-windows.dll.node", + "size": 17259520, + }, + ] + `) + + expect(await getVersion(queryEnginePath, BinaryType.QueryEngineBinary)).toMatchInlineSnapshot( + `"query-engine b20ead4d3ab9e78ac112966e242ded703f4a052c"`, + ) + expect(await getVersion(migrationEnginePath, BinaryType.MigrationEngineBinary)).toMatchInlineSnapshot( + `"schema-engine-cli b20ead4d3ab9e78ac112966e242ded703f4a052c"`, + ) + + // + // Cache test 1 + // 1- We delete the artifacts locally but not from the cache folder + // 2- We measure how much time it takes to call download + // + + // Delete all artifacts + const deletedEngines = await del(path.posix.join(baseDirAll, '/*engine*')) + expect(deletedEngines.length).toBeGreaterThan(0) + + const before = Date.now() + await download({ + binaries: { + 'libquery-engine': baseDirAll, + 'query-engine': baseDirAll, + 'migration-engine': baseDirAll, + }, + binaryTargets: [ + 'darwin', + 'darwin-arm64', + 'debian-openssl-1.0.x', + 'debian-openssl-1.1.x', + 'debian-openssl-3.0.x', + 'linux-arm64-openssl-1.0.x', + 'linux-arm64-openssl-1.1.x', + 'linux-arm64-openssl-3.0.x', + 'rhel-openssl-1.0.x', + 'rhel-openssl-1.1.x', + 'rhel-openssl-3.0.x', + 'windows', + 'linux-musl', + 'linux-musl-openssl-3.0.x', + 'linux-musl-arm64-openssl-1.1.x', + 'linux-musl-arm64-openssl-3.0.x', + ], + version: FIXED_ENGINES_HASH, + }) + + await download({ + binaries: { + [BinaryType.QueryEngineBinary]: baseDirAll, + [BinaryType.MigrationEngineBinary]: baseDirAll, }, - ] - `) - - expect(await getVersion(queryEnginePath, BinaryType.QueryEngineBinary)).toMatchInlineSnapshot( - `"query-engine eac182fd33c63959a61946df56831625a9a39627"`, - ) - expect(await getVersion(migrationEnginePath, BinaryType.MigrationEngineBinary)).toMatchInlineSnapshot( - `"migration-engine-cli eac182fd33c63959a61946df56831625a9a39627"`, - ) - - // - // Cache test 1 - // 1- We delete the artifacts locally but not from the cache folder - // 2- We measure how much time it takes to call download - // - - // Delete all artifacts - const deletedEngines = await del(path.posix.join(baseDir, '/*engine*')) - expect(deletedEngines.length).toBeGreaterThan(0) - - const before = Date.now() - await download({ - binaries: { - 'libquery-engine': baseDir, - 'query-engine': baseDir, - 'migration-engine': baseDir, - }, - binaryTargets: [ - 'darwin', - 'darwin-arm64', - 'debian-openssl-1.0.x', - 'debian-openssl-1.1.x', - 'debian-openssl-3.0.x', - 'linux-arm64-openssl-1.0.x', - 'linux-arm64-openssl-1.1.x', - 'linux-arm64-openssl-3.0.x', - 'rhel-openssl-1.0.x', - 'rhel-openssl-1.1.x', - 'rhel-openssl-3.0.x', - 'windows', - 'linux-musl', - 'linux-musl-openssl-3.0.x', - 'linux-musl-arm64-openssl-1.1.x', - 'linux-musl-arm64-openssl-3.0.x', - ], - version: FIXED_ENGINES_HASH, - }) - const after = Date.now() - const timeInMsToDownloadAllFromCache1 = after - before - console.debug( - `2 - With cache1: We deleted the engines locally but not from the cache folder. + binaryTargets: ['linux-static-x64', 'linux-static-arm64'], + version: FIXED_ENGINES_HASH, + }) + + const after = Date.now() + const timeInMsToDownloadAllFromCache1 = after - before + console.debug( + `2 - With cache1: We deleted the engines locally but not from the cache folder. It took ${timeInMsToDownloadAllFromCache1}ms to execute download() for all binaryTargets.`, - ) - - // - // Cache test 1 - // 1- We keep all artifacts from previous download - // 2- We measure how much time it takes to call download - // - const before2 = Date.now() - await download({ - binaries: { - 'libquery-engine': baseDir, - 'query-engine': baseDir, - 'migration-engine': baseDir, - }, - binaryTargets: [ - 'darwin', - 'darwin-arm64', - 'debian-openssl-1.0.x', - 'debian-openssl-1.1.x', - 'debian-openssl-3.0.x', - 'linux-arm64-openssl-1.0.x', - 'linux-arm64-openssl-1.1.x', - 'linux-arm64-openssl-3.0.x', - 'rhel-openssl-1.0.x', - 'rhel-openssl-1.1.x', - 'rhel-openssl-3.0.x', - 'windows', - 'linux-musl', - 'linux-musl-openssl-3.0.x', - 'linux-musl-arm64-openssl-1.1.x', - 'linux-musl-arm64-openssl-3.0.x', - ], - version: FIXED_ENGINES_HASH, - }) - const after2 = Date.now() - const timeInMsToDownloadAllFromCache2 = after2 - before2 - console.debug( - `3 - With cache2: Engines were already present + ) + + // + // Cache test 1 + // 1- We keep all artifacts from previous download + // 2- We measure how much time it takes to call download + // + const before2 = Date.now() + await download({ + binaries: { + 'libquery-engine': baseDirAll, + 'query-engine': baseDirAll, + 'migration-engine': baseDirAll, + }, + binaryTargets: [ + 'darwin', + 'darwin-arm64', + 'debian-openssl-1.0.x', + 'debian-openssl-1.1.x', + 'debian-openssl-3.0.x', + 'linux-arm64-openssl-1.0.x', + 'linux-arm64-openssl-1.1.x', + 'linux-arm64-openssl-3.0.x', + 'rhel-openssl-1.0.x', + 'rhel-openssl-1.1.x', + 'rhel-openssl-3.0.x', + 'windows', + 'linux-musl', + 'linux-musl-openssl-3.0.x', + 'linux-musl-arm64-openssl-1.1.x', + 'linux-musl-arm64-openssl-3.0.x', + ], + version: FIXED_ENGINES_HASH, + }) + + await download({ + binaries: { + [BinaryType.QueryEngineBinary]: baseDirAll, + [BinaryType.MigrationEngineBinary]: baseDirAll, + }, + binaryTargets: ['linux-static-x64', 'linux-static-arm64'], + version: FIXED_ENGINES_HASH, + }) + + const after2 = Date.now() + const timeInMsToDownloadAllFromCache2 = after2 - before2 + console.debug( + `3 - With cache2: Engines were already present It took ${timeInMsToDownloadAllFromCache2}ms to execute download() for all binaryTargets.`, - ) + ) - // This is a rather high number to avoid flakiness in CI - expect(timeInMsToDownloadAllFromCache1).toBeLessThan(100_000) - expect(timeInMsToDownloadAllFromCache2).toBeLessThan(100_000) + // This is a rather high number to avoid flakiness in CI + expect(timeInMsToDownloadAllFromCache1).toBeLessThan(100_000) + expect(timeInMsToDownloadAllFromCache2).toBeLessThan(100_000) - // Using cache should be faster - expect(timeInMsToDownloadAllFromCache1).toBeLessThan(timeInMsToDownloadAll) - expect(timeInMsToDownloadAllFromCache2).toBeLessThan(timeInMsToDownloadAll) - }) + // Using cache should be faster + expect(timeInMsToDownloadAllFromCache1).toBeLessThan(timeInMsToDownloadAll) + expect(timeInMsToDownloadAllFromCache2).toBeLessThan(timeInMsToDownloadAll) + }) - test('auto heal corrupt engine binary', async () => { - const platform = await getPlatform() - const baseDir = path.posix.join(dirname, 'corruption') - const targetPath = path.join(baseDir, getBinaryName('query-engine', platform)) - if (fs.existsSync(targetPath)) { - try { - fs.unlinkSync(targetPath) - } catch (e) { - console.error(e) + test('auto heal corrupt engine binary', async () => { + const targetPath = path.join(baseDirCorruption, getBinaryName('query-engine', platform)) + if (fs.existsSync(targetPath)) { + try { + fs.unlinkSync(targetPath) + } catch (e) { + console.error(e) + } } - } - await download({ - binaries: { - 'query-engine': baseDir, - }, - version: FIXED_ENGINES_HASH, + await download({ + binaries: { + 'query-engine': baseDirCorruption, + }, + version: CURRENT_ENGINES_HASH, + }) + + fs.writeFileSync(targetPath, 'incorrect-binary') + + // please heal it + await download({ + binaries: { + 'query-engine': baseDirCorruption, + }, + version: CURRENT_ENGINES_HASH, + }) + + expect(fs.existsSync(targetPath)).toBe(true) + + expect(await getVersion(targetPath, BinaryType.QueryEngineBinary)).not.toBe(undefined) }) + }) - fs.writeFileSync(targetPath, 'incorrect-binary') + describe('binaryTarget', () => { + beforeEach(async () => { + // Make sure to not mix forward and backward slashes in the path + // or del glob pattern would not work on Windows + await del(path.posix.join(baseDirBinaryTarget, '*engine*')) + }) - // please heal it - await download({ - binaries: { - 'query-engine': baseDir, - }, - version: FIXED_ENGINES_HASH, + afterEach(() => { + delete process.env.PRISMA_QUERY_ENGINE_BINARY }) - expect(fs.existsSync(targetPath)).toBe(true) + test('handle nonexistent "binaryTarget"', async () => { + await expect( + download({ + binaries: { + 'query-engine': baseDirBinaryTarget, + }, + version: CURRENT_ENGINES_HASH, + binaryTargets: ['darwin', 'marvin'] as any, // eslint-disable-line @typescript-eslint/no-explicit-any + }), + ).rejects.toThrowErrorMatchingInlineSnapshot( + `"Unknown binaryTarget marvin and no custom engine files were provided"`, + ) + }) - expect(await getVersion(targetPath, BinaryType.QueryEngineBinary)).not.toBe(undefined) - }) + test('handle nonexistent "binaryTarget" with missing custom engine binary', async () => { + expect.assertions(1) + process.env.PRISMA_QUERY_ENGINE_BINARY = '../query-engine' + try { + await download({ + binaries: { + 'query-engine': baseDirBinaryTarget, + }, + version: CURRENT_ENGINES_HASH, + binaryTargets: ['darwin', 'marvin'] as any, // eslint-disable-line @typescript-eslint/no-explicit-any + }) + } catch (err: any) { + expect(stripAnsi(err.message)).toMatchInlineSnapshot( + `"Env var PRISMA_QUERY_ENGINE_BINARY is provided but provided path ../query-engine can't be resolved."`, + ) + } + }) - test('handle nonexistent "binaryTarget"', async () => { - await expect( - download({ + test('handle nonexistent "binaryTarget" with custom engine binary', async () => { + const e = await download({ binaries: { - 'query-engine': __dirname, + 'query-engine': baseDirBinaryTarget, }, - version: FIXED_ENGINES_HASH, - binaryTargets: ['darwin', 'marvin'] as any, // eslint-disable-line @typescript-eslint/no-explicit-any - }), - ).rejects.toThrowErrorMatchingInlineSnapshot( - `"Unknown binaryTarget marvin and no custom engine files were provided"`, - ) - }) + version: CURRENT_ENGINES_HASH, + }) + const dummyPath = e['query-engine']![Object.keys(e['query-engine']!)[0]]! + const targetPath = path.join( + baseDirBinaryTarget, + // @ts-ignore + getBinaryName('query-engine', 'marvin'), + ) + fs.copyFileSync(dummyPath, targetPath) + process.env.PRISMA_QUERY_ENGINE_BINARY = targetPath - test('handle nonexistent "binaryTarget" with missing custom engine binary', async () => { - expect.assertions(1) - process.env.PRISMA_QUERY_ENGINE_BINARY = '../query-engine' - try { - await download({ + const testResult = await download({ binaries: { - 'query-engine': __dirname, + 'query-engine': baseDirBinaryTarget, }, - version: FIXED_ENGINES_HASH, - binaryTargets: ['darwin', 'marvin'] as any, // eslint-disable-line @typescript-eslint/no-explicit-any + version: CURRENT_ENGINES_HASH, + binaryTargets: ['marvin'] as any, // eslint-disable-line @typescript-eslint/no-explicit-any }) - } catch (err: any) { - expect(stripAnsi(err.message)).toMatchInlineSnapshot( - `"Env var PRISMA_QUERY_ENGINE_BINARY is provided but provided path ../query-engine can't be resolved."`, - ) - } + expect(testResult['query-engine']!['marvin']).toEqual(targetPath) + }) }) - test('handle nonexistent "binaryTarget" with custom engine binary', async () => { - const e = await download({ - binaries: { - 'query-engine': __dirname, - }, - version: FIXED_ENGINES_HASH, + describe('env.PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING=1', () => { + beforeAll(() => { + process.env.PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING = '1' + }) + + afterAll(() => { + delete process.env.PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING + }) + + beforeEach(async () => { + // Make sure to not mix forward and backward slashes in the path + // or del glob pattern would not work on Windows + await del(path.posix.join(baseDirChecksum, '*engine*')) + }) + + test('if checksum downloads and matches, does not throw', async () => { + const queryEnginePath = path.join(baseDirChecksum, getBinaryName(BinaryType.QueryEngineLibrary, platform)) + + await expect( + download({ + binaries: { + [BinaryType.QueryEngineLibrary]: baseDirChecksum, + }, + binaryTargets: [platform], + version: CURRENT_ENGINES_HASH, + }), + ).resolves.toStrictEqual({ + 'libquery-engine': { + [platform]: queryEnginePath, + }, + }) + + const files = getFiles(baseDirChecksum).map((f) => f.name) + expect(files.filter((name) => !name.startsWith('.'))).toEqual([path.basename(queryEnginePath)]) + expect(await getVersion(queryEnginePath, BinaryType.QueryEngineLibrary)).toContain(CURRENT_ENGINES_HASH) + }) + + // This tests is skipped on Windows because it errors out with + // EPERM: operation not permitted, unlink 'D:\a\prisma\prisma\packages\fetch-engine\src\__tests__\checksum\query_engine-windows.dll.node' + // TODO: Fix this test on Windows one day + testIf(process.platform !== 'win32')("if checksum downloads but doesn't match, throws", async () => { + mockFetch.mockImplementation((url, opts) => { + if (String(url).endsWith('.sha256')) { + return Promise.resolve({ + ok: true, + status: 200, + statusText: 'OK', + text: () => + Promise.resolve(`1deadbeef2deadbeef3deadbeef4deadbeef5deadbeef6deadbeef7deadbeef8 query-engine.gz\n`), + } as Response) + } + return actualFetch(url, opts) + }) + + await expect( + download({ + binaries: { + [BinaryType.QueryEngineLibrary]: baseDirChecksum, + }, + binaryTargets: [platform], + version: CURRENT_ENGINES_HASH, + }), + ).rejects.toThrow(/^sha256 checksum of .+ \(zipped\) should be .+ but is .+$/) }) - const dummyPath = e['query-engine']![Object.keys(e['query-engine']!)[0]]! - const targetPath = path.join( - __dirname, - // @ts-ignore - getBinaryName('query-engine', 'marvin'), - ) - fs.copyFileSync(dummyPath, targetPath) - process.env.PRISMA_QUERY_ENGINE_BINARY = targetPath - - const testResult = await download({ - binaries: { - 'query-engine': path.join(__dirname, 'all'), - }, - version: FIXED_ENGINES_HASH, - binaryTargets: ['marvin'] as any, // eslint-disable-line @typescript-eslint/no-explicit-any + + // This tests is skipped on Windows because it errors out with + // EPERM: operation not permitted, unlink 'D:\a\prisma\prisma\packages\fetch-engine\src\__tests__\checksum\query_engine-windows.dll.node' + // TODO: Fix this test on Windows one day + testIf(process.platform !== 'win32')('if checksum download fails, logs warning but does not throw', async () => { + mockFetch.mockImplementation((url, opts) => { + if (String(url).endsWith('.sha256')) { + return Promise.resolve({ + ok: false, + status: 404, + statusText: 'Not Found', + } as any as Response) + } + return actualFetch(url, opts) + }) + + const queryEnginePath = path.join(baseDirChecksum, getBinaryName(BinaryType.QueryEngineLibrary, platform)) + + await expect( + download({ + binaries: { + [BinaryType.QueryEngineLibrary]: baseDirChecksum, + }, + binaryTargets: [platform], + version: CURRENT_ENGINES_HASH, + }), + ).resolves.toStrictEqual({ + 'libquery-engine': { + [platform]: queryEnginePath, + }, + }) + + const files = getFiles(baseDirChecksum).map((f) => f.name) + expect(files.filter((name) => !name.startsWith('.'))).toEqual([path.basename(queryEnginePath)]) + expect(await getVersion(queryEnginePath, BinaryType.QueryEngineLibrary)).toContain(CURRENT_ENGINES_HASH) }) - expect(testResult['query-engine']!['marvin']).toEqual(targetPath) }) }) diff --git a/packages/fetch-engine/src/download.ts b/packages/fetch-engine/src/download.ts index 729c2033718a..4b4ee60adbd7 100644 --- a/packages/fetch-engine/src/download.ts +++ b/packages/fetch-engine/src/download.ts @@ -286,6 +286,10 @@ async function binaryNeedsToBeDownloaded( } else { return true } + } else if (process.env.PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING) { + // If the env var is truthy we do not error if the checksum file is missing + debug(`The checksum file: ${sha256FilePath} is missing but this was ignored as the PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING environment variable is truthy.`) + return false } else { return true } @@ -436,8 +440,8 @@ async function downloadBinary(options: DownloadBinaryOptions): Promise { async function saveFileToCache( job: BinaryDownloadJob, version: string, - sha256: string, - zippedSha256: string, + sha256: string | null, + zippedSha256: string | null, ): Promise { // always fail silent, as the cache is optional const cacheDir = await getCacheDir(channel, version, job.binaryTarget) @@ -451,8 +455,12 @@ async function saveFileToCache( try { await overwriteFile(job.targetFilePath, cachedTargetPath) - await fs.promises.writeFile(cachedSha256Path, sha256) - await fs.promises.writeFile(cachedSha256ZippedPath, zippedSha256) + if (sha256 != null) { + await fs.promises.writeFile(cachedSha256Path, sha256) + } + if (zippedSha256 != null) { + await fs.promises.writeFile(cachedSha256ZippedPath, zippedSha256) + } } catch (e) { debug(e) // let this fail silently - the CI system may have reached the file size limit diff --git a/packages/fetch-engine/src/downloadZip.ts b/packages/fetch-engine/src/downloadZip.ts index 75ff8f9574af..884bb6a0fbfe 100644 --- a/packages/fetch-engine/src/downloadZip.ts +++ b/packages/fetch-engine/src/downloadZip.ts @@ -17,28 +17,41 @@ const del = promisify(rimraf) export type DownloadResult = { lastModified: string - sha256: string - zippedSha256: string + sha256: string | null + zippedSha256: string | null } -async function fetchSha256(url: string): Promise<{ sha256: string; zippedSha256: string }> { - // We get a string like this: - // "3c82ee6cd9fedaec18a5e7cd3fc41f8c6b3dd32575dc13443d96aab4bd018411 query-engine.gz\n" - // So we split it by whitespace and just get the hash, as that's what we're interested in - const [zippedSha256, sha256] = [ - ( - await fetch(`${url}.sha256`, { - agent: getProxyAgent(url) as any, - }).then((res) => res.text()) - ).split(/\s+/)[0], - ( - await fetch(`${url.slice(0, url.length - 3)}.sha256`, { - agent: getProxyAgent(url.slice(0, url.length - 3)) as any, - }).then((res) => res.text()) - ).split(/\s+/)[0], - ] - - return { sha256, zippedSha256 } +async function fetchChecksum(url: string): Promise { + try { + const checksumUrl = `${url}.sha256` + const response = await fetch(checksumUrl, { + agent: getProxyAgent(url) as any, + }) + if (!response.ok) { + let errorMessage = `Failed to fetch sha256 checksum at ${checksumUrl}. ${response.status} ${response.statusText}` + if (!process.env.PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING) { + errorMessage += `\n\nIf you need to ignore this error (e.g. in an offline environment), set the PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING environment variable to a truthy value.\nExample: PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING=1` + } + throw new Error(errorMessage) + } + const body = await response.text() + // We get a string like this: + // "3c82ee6cd9fedaec18a5e7cd3fc41f8c6b3dd32575dc13443d96aab4bd018411 query-engine.gz\n" + // So we split it by whitespace and just get the hash, as that's what we're interested in + const [checksum] = body.split(/\s+/) + if (!/^[a-f0-9]{64}$/gi.test(checksum)) { + throw new Error(`Unable to parse checksum from ${checksumUrl} - response body: ${body}`) + } + return checksum + } catch (error) { + if (process.env.PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING) { + debug( + `fetchChecksum() failed and was ignored as the PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING environment variable is truthy.\nError: ${error}`, + ) + return null + } + throw error + } } export async function downloadZip( @@ -48,7 +61,7 @@ export async function downloadZip( ): Promise { const tmpDir = tempy.directory() const partial = path.join(tmpDir, 'partial') - const { sha256, zippedSha256 } = await fetchSha256(url) + const [zippedSha256, sha256] = await Promise.all([fetchChecksum(url), fetchChecksum(url.slice(0, url.length - 3))]) const result = await retry( async () => { try { @@ -97,12 +110,14 @@ export async function downloadZip( const hash = await hashPromise const zippedHash = await zippedHashPromise - if (zippedHash !== zippedSha256) { - throw new Error(`sha256 of ${url} (zipped) should be ${zippedSha256} but is ${zippedHash}`) + if (zippedSha256 !== null && zippedSha256 !== zippedHash) { + return reject( + new Error(`sha256 checksum of ${url} (zipped) should be ${zippedSha256} but is ${zippedHash}`), + ) } - if (hash !== sha256) { - throw new Error(`sha256 of ${url} (unzipped) should be ${sha256} but is ${hash}`) + if (sha256 !== null && sha256 !== hash) { + return reject(new Error(`sha256 checksum of ${url} (unzipped) should be ${sha256} but is ${hash}`)) } }) } finally { diff --git a/packages/fetch-engine/src/getProxyAgent.ts b/packages/fetch-engine/src/getProxyAgent.ts index 81fb76b446fc..b42e26e8ed63 100644 --- a/packages/fetch-engine/src/getProxyAgent.ts +++ b/packages/fetch-engine/src/getProxyAgent.ts @@ -1,7 +1,7 @@ 'use strict' -import HttpProxyAgent from 'http-proxy-agent' -import HttpsProxyAgent from 'https-proxy-agent' +import { HttpProxyAgent, HttpProxyAgentOptions } from 'http-proxy-agent' +import { HttpsProxyAgent, HttpsProxyAgentOptions } from 'https-proxy-agent' import Url from 'url' // code from https://raw.githubusercontent.com/request/request/5ba8eb44da7cd639ca21070ea9be20d611b85f66/lib/getProxyFromURI.js @@ -81,9 +81,7 @@ function getProxyFromURI(uri): string | null { return null } -export function getProxyAgent( - url: string, -): HttpProxyAgent.HttpProxyAgent | HttpsProxyAgent.HttpsProxyAgent | undefined { +export function getProxyAgent(url: string): HttpProxyAgentOptions | HttpsProxyAgentOptions | undefined { const uri = Url.parse(url) const proxy = getProxyFromURI(uri) if (!proxy) { @@ -91,11 +89,11 @@ export function getProxyAgent( } if (uri.protocol === 'http:') { - return HttpProxyAgent(proxy) + return new HttpProxyAgent(proxy) } if (uri.protocol === 'https:') { - return HttpsProxyAgent(proxy) + return new HttpsProxyAgent(proxy) } return undefined diff --git a/packages/generator-helper/package.json b/packages/generator-helper/package.json index 2a1b136912b9..8cdcac9ccb8f 100644 --- a/packages/generator-helper/package.json +++ b/packages/generator-helper/package.json @@ -28,10 +28,10 @@ }, "devDependencies": { "@swc-node/register": "1.6.5", - "@swc/core": "1.3.32", + "@swc/core": "1.3.64", "@swc/jest": "0.2.26", - "@types/jest": "29.5.1", - "@types/node": "18.16.14", + "@types/jest": "29.5.2", + "@types/node": "18.16.16", "esbuild": "0.15.13", "jest": "29.5.0", "jest-junit": "16.0.0", diff --git a/packages/get-platform/package.json b/packages/get-platform/package.json index fb247c4da05b..1eb51c215ee1 100644 --- a/packages/get-platform/package.json +++ b/packages/get-platform/package.json @@ -15,10 +15,10 @@ "bugs": "https://github.com/prisma/prisma/issues", "devDependencies": { "@codspeed/benchmark.js-plugin": "1.1.0", - "@swc/core": "1.3.32", + "@swc/core": "1.3.64", "@swc/jest": "0.2.26", - "@types/jest": "29.5.1", - "@types/node": "18.16.14", + "@types/jest": "29.5.2", + "@types/node": "18.16.16", "benchmark": "2.1.4", "jest": "29.5.0", "jest-junit": "16.0.0", diff --git a/packages/get-platform/src/__tests__/getPlatform.test.ts b/packages/get-platform/src/__tests__/getPlatform.test.ts index 9cec47f29317..4353c6d2618e 100644 --- a/packages/get-platform/src/__tests__/getPlatform.test.ts +++ b/packages/get-platform/src/__tests__/getPlatform.test.ts @@ -128,7 +128,7 @@ describe('getPlatformInternal', () => { expect(ctx.mocked['console.log'].mock.calls.join('\n')).toMatchInlineSnapshot(``) expect(ctx.mocked['console.warn'].mock.calls.join('\n')).toMatchInlineSnapshot(` prisma:warn Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-1.1.x". - Please manually install OpenSSL via \`apt-get update -y && apt-get install -y openssl\` and try installing Prisma again. If you're running Prisma on Docker, you may also try to replace your base image with \`node:lts-slim\`, which already ships with OpenSSL installed. + Please manually install OpenSSL via \`apt-get update -y && apt-get install -y openssl\` and try installing Prisma again. If you're running Prisma on Docker, add this command to your Dockerfile, or switch to an image that already has OpenSSL installed. `) expect(ctx.mocked['console.error'].mock.calls.join('\n')).toMatchInlineSnapshot(``) }) diff --git a/packages/get-platform/src/getPlatform.ts b/packages/get-platform/src/getPlatform.ts index 3e81d88e2aa3..1bc3d1e70261 100644 --- a/packages/get-platform/src/getPlatform.ts +++ b/packages/get-platform/src/getPlatform.ts @@ -481,7 +481,7 @@ export function getPlatformInternal(args: GetOSResult): Platform { */ const additionalMessage = match({ familyDistro }) .with({ familyDistro: 'debian' }, () => { - return "Please manually install OpenSSL via `apt-get update -y && apt-get install -y openssl` and try installing Prisma again. If you're running Prisma on Docker, you may also try to replace your base image with `node:lts-slim`, which already ships with OpenSSL installed." + return "Please manually install OpenSSL via `apt-get update -y && apt-get install -y openssl` and try installing Prisma again. If you're running Prisma on Docker, add this command to your Dockerfile, or switch to an image that already has OpenSSL installed." }) .otherwise(() => { return 'Please manually install OpenSSL and try installing Prisma again.' diff --git a/packages/get-platform/src/platforms.ts b/packages/get-platform/src/platforms.ts index 0d62f5c90ee9..518f8908eb50 100644 --- a/packages/get-platform/src/platforms.ts +++ b/packages/get-platform/src/platforms.ts @@ -19,6 +19,8 @@ export type Platform = | 'linux-musl-arm64-openssl-1.1.x' | 'linux-musl-arm64-openssl-3.0.x' | 'linux-nixos' + | 'linux-static-x64' + | 'linux-static-arm64' | 'windows' | 'freebsd11' | 'freebsd12' @@ -47,6 +49,8 @@ export const platforms: Array = [ 'linux-musl-arm64-openssl-1.1.x', 'linux-musl-arm64-openssl-3.0.x', 'linux-nixos', + 'linux-static-x64', + 'linux-static-arm64', 'windows', 'freebsd11', 'freebsd12', diff --git a/packages/instrumentation/README.md b/packages/instrumentation/README.md index 7fcd43fe86a1..84d35720e2f2 100644 --- a/packages/instrumentation/README.md +++ b/packages/instrumentation/README.md @@ -1,6 +1,6 @@ # @prisma/instrumentation -[![npm version](https://img.shields.io/npm/v/@prisma/instrumentation.svg?style=flat)](https://www.npmjs.com/package/@prisma/instrumentation) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/prisma/prisma/blob/main/CONTRIBUTING.md) [![GitHub license](https://img.shields.io/badge/license-Apache%202-blue)](https://github.com/prisma/prisma/blob/main/LICENSE) [![Slack](https://img.shields.io/badge/chat-on%20slack-blue.svg)](https://slack.prisma.io/) +[![npm version](https://img.shields.io/npm/v/@prisma/instrumentation.svg?style=flat)](https://www.npmjs.com/package/@prisma/instrumentation) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/prisma/prisma/blob/main/CONTRIBUTING.md) [![GitHub license](https://img.shields.io/badge/license-Apache%202-blue)](https://github.com/prisma/prisma/blob/main/LICENSE) [![Slack](https://img.shields.io/badge/chat-on%20slack-blue.svg)](https://slack.prisma.io/) [![Discord](https://img.shields.io/discord/937751382725886062?label=Discord)](https://pris.ly/discord) [OTEL - OpenTelemetry](https://opentelemetry.io/) compliant instrumentation for Prisma Client. diff --git a/packages/instrumentation/package.json b/packages/instrumentation/package.json index f89ac65b401d..38dcbf149127 100644 --- a/packages/instrumentation/package.json +++ b/packages/instrumentation/package.json @@ -14,9 +14,9 @@ "bugs": "https://github.com/prisma/prisma/issues", "devDependencies": { "@prisma/internals": "workspace:*", - "@swc/core": "1.3.32", - "@types/node": "18.16.14", - "@types/jest": "29.5.1", + "@swc/core": "1.3.64", + "@types/node": "18.16.16", + "@types/jest": "29.5.2", "jest": "29.5.0", "jest-junit": "16.0.0", "typescript": "4.9.5" diff --git a/packages/integration-tests/package.json b/packages/integration-tests/package.json index 8af06ce6088c..1a8cb939ed57 100644 --- a/packages/integration-tests/package.json +++ b/packages/integration-tests/package.json @@ -16,12 +16,12 @@ "@prisma/internals": "workspace:*", "@prisma/migrate": "workspace:*", "@sindresorhus/slugify": "1.1.2", - "@swc/core": "1.3.32", + "@swc/core": "1.3.64", "@swc/jest": "0.2.26", - "@types/jest": "29.5.1", + "@types/jest": "29.5.2", "@types/mssql": "8.1.2", - "@types/node": "18.16.14", - "@types/pg": "8.10.1", + "@types/node": "18.16.16", + "@types/pg": "8.10.2", "@types/sqlite3": "3.1.8", "decimal.js": "10.4.3", "esbuild": "0.15.13", @@ -29,10 +29,10 @@ "fs-jetpack": "5.1.0", "jest": "29.5.0", "jest-junit": "16.0.0", - "mariadb": "3.0.2", + "mariadb": "3.2.0", "mssql": "9.1.1", "pg": "8.9.0", - "sqlite-async": "1.1.3", + "sqlite-async": "1.2.0", "string-hash": "1.1.3", "strip-ansi": "6.0.1", "tempy": "1.0.1", diff --git a/packages/integration-tests/src/__tests__/integration/sqlite/__database.ts b/packages/integration-tests/src/__tests__/integration/sqlite/__database.ts index 9838d286a5e2..11c7f1b31e41 100644 --- a/packages/integration-tests/src/__tests__/integration/sqlite/__database.ts +++ b/packages/integration-tests/src/__tests__/integration/sqlite/__database.ts @@ -1,4 +1,4 @@ -import Database from 'sqlite-async' +import { Database } from 'sqlite-async' import type { Input } from '../../__helpers__/integrationTest' diff --git a/packages/internals/package.json b/packages/internals/package.json index 4654a48efa82..f3c7f59e5c40 100644 --- a/packages/internals/package.json +++ b/packages/internals/package.json @@ -29,8 +29,8 @@ "devDependencies": { "@swc/core": "1.2.204", "@swc/jest": "0.2.26", - "@types/jest": "29.5.1", - "@types/node": "18.16.14", + "@types/jest": "29.5.2", + "@types/node": "18.16.16", "@types/resolve": "1.20.2", "esbuild": "0.15.13", "jest": "29.5.0", @@ -41,17 +41,17 @@ "yarn": "1.22.19" }, "dependencies": { + "@antfu/ni": "0.21.4", "@opentelemetry/api": "1.4.1", "@prisma/debug": "workspace:*", "@prisma/engines": "workspace:*", "@prisma/fetch-engine": "workspace:*", "@prisma/generator-helper": "workspace:*", "@prisma/get-platform": "workspace:*", - "@prisma/ni": "workspace:*", - "@prisma/prisma-fmt-wasm": "4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944", + "@prisma/prisma-fmt-wasm": "4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309", "archiver": "5.3.1", "arg": "5.0.2", - "checkpoint-client": "1.1.23", + "checkpoint-client": "1.1.24", "cli-truncate": "2.1.0", "dotenv": "16.0.3", "escape-string-regexp": "4.0.0", diff --git a/packages/internals/src/__tests__/engine-commands/__snapshots__/getDmmf.test.ts.snap b/packages/internals/src/__tests__/engine-commands/__snapshots__/getDmmf.test.ts.snap index 5ab0391b3d4e..e9250187fc05 100644 --- a/packages/internals/src/__tests__/engine-commands/__snapshots__/getDmmf.test.ts.snap +++ b/packages/internals/src/__tests__/engine-commands/__snapshots__/getDmmf.test.ts.snap @@ -203,20 +203,6 @@ exports[`getDMMF success @@id model 1`] = ` "schema": { "enumTypes": { "prisma": [ - { - "name": "QueryMode", - "values": [ - "default", - "insensitive", - ], - }, - { - "name": "SortOrder", - "values": [ - "asc", - "desc", - ], - }, { "name": "TransactionIsolationLevel", "values": [ @@ -244,6 +230,20 @@ exports[`getDMMF success @@id model 1`] = ` "isAdmin", ], }, + { + "name": "SortOrder", + "values": [ + "asc", + "desc", + ], + }, + { + "name": "QueryMode", + "values": [ + "default", + "insensitive", + ], + }, ], }, "fieldRefTypes": {}, @@ -4718,6 +4718,12 @@ exports[`getDMMF success @@id model 1`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "User1ScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -4812,6 +4818,12 @@ exports[`getDMMF success @@id model 1`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "User1ScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -4906,6 +4918,12 @@ exports[`getDMMF success @@id model 1`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "User1ScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -5231,6 +5249,12 @@ exports[`getDMMF success @@id model 1`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "User2ScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -5325,6 +5349,12 @@ exports[`getDMMF success @@id model 1`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "User2ScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -5419,6 +5449,12 @@ exports[`getDMMF success @@id model 1`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "User2ScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -7118,20 +7154,6 @@ exports[`getDMMF success @@map model 2`] = ` "schema": { "enumTypes": { "prisma": [ - { - "name": "QueryMode", - "values": [ - "default", - "insensitive", - ], - }, - { - "name": "SortOrder", - "values": [ - "asc", - "desc", - ], - }, { "name": "TransactionIsolationLevel", "values": [ @@ -7148,6 +7170,20 @@ exports[`getDMMF success @@map model 2`] = ` "email", ], }, + { + "name": "SortOrder", + "values": [ + "asc", + "desc", + ], + }, + { + "name": "QueryMode", + "values": [ + "default", + "insensitive", + ], + }, ], }, "fieldRefTypes": {}, @@ -9601,6 +9637,12 @@ exports[`getDMMF success @@map model 2`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "UserScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -9695,6 +9737,12 @@ exports[`getDMMF success @@map model 2`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "UserScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -9789,6 +9837,12 @@ exports[`getDMMF success @@map model 2`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "UserScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -11078,6 +11132,15 @@ exports[`getDMMF success @@unique model 1`] = ` "schema": { "enumTypes": { "prisma": [ + { + "name": "TransactionIsolationLevel", + "values": [ + "ReadUncommitted", + "ReadCommitted", + "RepeatableRead", + "Serializable", + ], + }, { "name": "PostScalarFieldEnum", "values": [ @@ -11088,26 +11151,10 @@ exports[`getDMMF success @@unique model 1`] = ` ], }, { - "name": "QueryMode", - "values": [ - "default", - "insensitive", - ], - }, - { - "name": "SortOrder", - "values": [ - "asc", - "desc", - ], - }, - { - "name": "TransactionIsolationLevel", + "name": "UserScalarFieldEnum", "values": [ - "ReadUncommitted", - "ReadCommitted", - "RepeatableRead", - "Serializable", + "id", + "email", ], }, { @@ -11129,10 +11176,17 @@ exports[`getDMMF success @@unique model 1`] = ` ], }, { - "name": "UserScalarFieldEnum", + "name": "SortOrder", "values": [ - "id", - "email", + "asc", + "desc", + ], + }, + { + "name": "QueryMode", + "values": [ + "default", + "insensitive", ], }, ], @@ -15103,8 +15157,13 @@ exports[`getDMMF success @@unique model 1`] = ` "namespace": "prisma", "type": "UserWhereInput", }, + { + "isList": false, + "location": "scalar", + "type": "Null", + }, ], - "isNullable": false, + "isNullable": true, "isRequired": false, "name": "is", }, @@ -15116,8 +15175,13 @@ exports[`getDMMF success @@unique model 1`] = ` "namespace": "prisma", "type": "UserWhereInput", }, + { + "isList": false, + "location": "scalar", + "type": "Null", + }, ], - "isNullable": false, + "isNullable": true, "isRequired": false, "name": "isNot", }, @@ -19464,6 +19528,12 @@ exports[`getDMMF success @@unique model 1`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "PostScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -19666,6 +19736,12 @@ exports[`getDMMF success @@unique model 1`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "PostScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -19760,6 +19836,12 @@ exports[`getDMMF success @@unique model 1`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "PostScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -19854,6 +19936,12 @@ exports[`getDMMF success @@unique model 1`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "PostScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -20179,6 +20267,12 @@ exports[`getDMMF success @@unique model 1`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "UserScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -20273,6 +20367,12 @@ exports[`getDMMF success @@unique model 1`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "UserScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -20367,6 +20467,12 @@ exports[`getDMMF success @@unique model 1`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "UserScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -20692,6 +20798,12 @@ exports[`getDMMF success @@unique model 1`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "User1ScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -20786,6 +20898,12 @@ exports[`getDMMF success @@unique model 1`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "User1ScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -20880,6 +20998,12 @@ exports[`getDMMF success @@unique model 1`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "User1ScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -21205,6 +21329,12 @@ exports[`getDMMF success @@unique model 1`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "User2ScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -21299,6 +21429,12 @@ exports[`getDMMF success @@unique model 1`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "User2ScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -21393,6 +21529,12 @@ exports[`getDMMF success @@unique model 1`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "User2ScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -23656,7 +23798,21 @@ exports[`getDMMF success @@unique model 1`] = ` { "fields": [ { - "args": [], + "args": [ + { + "inputTypes": [ + { + "isList": false, + "location": "inputObjectTypes", + "namespace": "prisma", + "type": "PostWhereInput", + }, + ], + "isNullable": false, + "isRequired": false, + "name": "where", + }, + ], "isNullable": false, "name": "posts", "outputType": { @@ -24139,9 +24295,9 @@ exports[`getDMMF success @@unique model 1`] = ` } `; -exports[`getDMMF success big schema read via datamodel path 1`] = `141151322`; +exports[`getDMMF success big schema read via datamodel path 1`] = `142570400`; -exports[`getDMMF success chinook introspected schema 1`] = `909334`; +exports[`getDMMF success chinook introspected schema 1`] = `922647`; exports[`getDMMF success if a datamodel is provided, succeeds even when a non-existing datamodel path is given 2`] = ` { @@ -24260,7 +24416,7 @@ exports[`getDMMF success if a datamodel is provided, succeeds even when a non-ex } `; -exports[`getDMMF success odoo introspected schema 1`] = `134382395`; +exports[`getDMMF success odoo introspected schema 1`] = `134813289`; exports[`getDMMF success simple model, mongodb 1`] = ` { @@ -24393,17 +24549,17 @@ exports[`getDMMF success simple model, mongodb 2`] = ` ], }, { - "name": "QueryMode", + "name": "SortOrder", "values": [ - "default", - "insensitive", + "asc", + "desc", ], }, { - "name": "SortOrder", + "name": "QueryMode", "values": [ - "asc", - "desc", + "default", + "insensitive", ], }, ], @@ -26718,6 +26874,12 @@ exports[`getDMMF success simple model, mongodb 2`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "AScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -26812,6 +26974,12 @@ exports[`getDMMF success simple model, mongodb 2`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "AScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -26906,6 +27074,12 @@ exports[`getDMMF success simple model, mongodb 2`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "AScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -27918,6 +28092,15 @@ exports[`getDMMF success simple model, mysql 2`] = ` "schema": { "enumTypes": { "prisma": [ + { + "name": "TransactionIsolationLevel", + "values": [ + "ReadUncommitted", + "ReadCommitted", + "RepeatableRead", + "Serializable", + ], + }, { "name": "AScalarFieldEnum", "values": [ @@ -27932,15 +28115,6 @@ exports[`getDMMF success simple model, mysql 2`] = ` "desc", ], }, - { - "name": "TransactionIsolationLevel", - "values": [ - "ReadUncommitted", - "ReadCommitted", - "RepeatableRead", - "Serializable", - ], - }, ], }, "fieldRefTypes": {}, @@ -30368,6 +30542,12 @@ exports[`getDMMF success simple model, mysql 2`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "AScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -30462,6 +30642,12 @@ exports[`getDMMF success simple model, mysql 2`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "AScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -30556,6 +30742,12 @@ exports[`getDMMF success simple model, mysql 2`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "AScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -33820,6 +34012,12 @@ exports[`getDMMF success simple model, no datasource 2`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "AScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -33914,6 +34112,12 @@ exports[`getDMMF success simple model, no datasource 2`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "AScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -34008,6 +34212,12 @@ exports[`getDMMF success simple model, no datasource 2`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "AScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -34897,17 +35107,19 @@ exports[`getDMMF success simple model, postgresql 2`] = ` "enumTypes": { "prisma": [ { - "name": "AScalarFieldEnum", + "name": "TransactionIsolationLevel", "values": [ - "id", - "name", + "ReadUncommitted", + "ReadCommitted", + "RepeatableRead", + "Serializable", ], }, { - "name": "QueryMode", + "name": "AScalarFieldEnum", "values": [ - "default", - "insensitive", + "id", + "name", ], }, { @@ -34918,12 +35130,10 @@ exports[`getDMMF success simple model, postgresql 2`] = ` ], }, { - "name": "TransactionIsolationLevel", + "name": "QueryMode", "values": [ - "ReadUncommitted", - "ReadCommitted", - "RepeatableRead", - "Serializable", + "default", + "insensitive", ], }, ], @@ -37379,6 +37589,12 @@ exports[`getDMMF success simple model, postgresql 2`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "AScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -37473,6 +37689,12 @@ exports[`getDMMF success simple model, postgresql 2`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "AScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -37567,6 +37789,12 @@ exports[`getDMMF success simple model, postgresql 2`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "AScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -38568,6 +38796,16 @@ exports[`getDMMF success simple model, sql server 2`] = ` "schema": { "enumTypes": { "prisma": [ + { + "name": "TransactionIsolationLevel", + "values": [ + "ReadUncommitted", + "ReadCommitted", + "RepeatableRead", + "Serializable", + "Snapshot", + ], + }, { "name": "AScalarFieldEnum", "values": [ @@ -38582,16 +38820,6 @@ exports[`getDMMF success simple model, sql server 2`] = ` "desc", ], }, - { - "name": "TransactionIsolationLevel", - "values": [ - "ReadUncommitted", - "ReadCommitted", - "RepeatableRead", - "Serializable", - "Snapshot", - ], - }, ], }, "fieldRefTypes": {}, @@ -41019,6 +41247,12 @@ exports[`getDMMF success simple model, sql server 2`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "AScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -41113,6 +41347,12 @@ exports[`getDMMF success simple model, sql server 2`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "AScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -41207,6 +41447,12 @@ exports[`getDMMF success simple model, sql server 2`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "AScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -42195,6 +42441,12 @@ exports[`getDMMF success simple model, sqlite 2`] = ` "schema": { "enumTypes": { "prisma": [ + { + "name": "TransactionIsolationLevel", + "values": [ + "Serializable", + ], + }, { "name": "AScalarFieldEnum", "values": [ @@ -42209,12 +42461,6 @@ exports[`getDMMF success simple model, sqlite 2`] = ` "desc", ], }, - { - "name": "TransactionIsolationLevel", - "values": [ - "Serializable", - ], - }, ], }, "fieldRefTypes": {}, @@ -44609,6 +44855,12 @@ exports[`getDMMF success simple model, sqlite 2`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "AScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -44703,6 +44955,12 @@ exports[`getDMMF success simple model, sqlite 2`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "AScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", @@ -44797,6 +45055,12 @@ exports[`getDMMF success simple model, sqlite 2`] = ` }, { "inputTypes": [ + { + "isList": false, + "location": "enumTypes", + "namespace": "prisma", + "type": "AScalarFieldEnum", + }, { "isList": true, "location": "enumTypes", diff --git a/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.ts b/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.ts index f7a51405ecd1..4d69c3282d59 100644 --- a/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.ts +++ b/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.ts @@ -1,4 +1,4 @@ -import { Command, detect, getCommand } from '@prisma/ni' +import { Command, detect, getCommand } from '@antfu/ni' /** * Get the command to run for the given package manager in the given directory. diff --git a/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.ts b/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.ts index 2506c9b45ff0..5be88a905e67 100644 --- a/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.ts +++ b/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.ts @@ -1,4 +1,4 @@ -import { Command } from '@prisma/ni' +import { Command } from '@antfu/ni' import execa from 'execa' import { getPackageCmd } from './getPackageCmd' diff --git a/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.ts b/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.ts index d49aa2707529..84bab8925c9d 100644 --- a/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.ts +++ b/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.ts @@ -1,4 +1,4 @@ -import { detect } from '@prisma/ni' +import { detect } from '@antfu/ni' export async function isYarnUsed(baseDir: string): Promise { const packageManager = await detect({ cwd: baseDir, autoInstall: false }) diff --git a/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.ts b/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.ts index b6e43a4500da..a8f17b40009c 100644 --- a/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.ts +++ b/packages/internals/src/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.ts @@ -66,8 +66,8 @@ export async function prismaClientResolver(baseDir: string, version?: string) { `Could not resolve ${missingCli(`${bold('prisma')} and `)}${bold( '@prisma/client', )} in the current project. Please install ${hasCli('it')}${missingCli('them')} with ${missingCli( - `${bold(green(`${getPackageCmd(baseDir, 'add', 'prisma', '-D')}`))} and `, - )}${bold(green(`${getPackageCmd(baseDir, 'add', '@prisma/client')}`))}, and rerun ${bold( + `${bold(green(`${await getPackageCmd(baseDir, 'add', 'prisma', '-D')}`))} and `, + )}${bold(green(`${await getPackageCmd(baseDir, 'add', '@prisma/client')}`))}, and rerun ${bold( await getPackageCmd(baseDir, 'execute', 'prisma generate'), )} 🙏.`, ) @@ -86,7 +86,7 @@ export async function prismaClientResolver(baseDir: string, version?: string) { throw new Error( `Could not resolve @prisma/client despite the installation that we just tried. Please try to install it by hand with ${bold( - green(`${getPackageCmd(baseDir, 'add', '@prisma/client')}`), + green(`${await getPackageCmd(baseDir, 'add', '@prisma/client')}`), )} and rerun ${bold(await getPackageCmd(baseDir, 'execute', 'prisma generate'))} 🙏.`, ) } diff --git a/packages/internals/src/index.ts b/packages/internals/src/index.ts index a8e9c93272f4..980c939e86f6 100644 --- a/packages/internals/src/index.ts +++ b/packages/internals/src/index.ts @@ -74,7 +74,7 @@ export { loadEnvFile } from './utils/loadEnvFile' export { mapObjectValues } from './utils/mapObjectValues' export { mapPreviewFeatures } from './utils/mapPreviewFeatures' export { maskSchema } from './utils/maskSchema' -export { maxBy } from './utils/maxBy' +export { maxBy, maxWithComparator } from './utils/max' export { missingGeneratorMessage } from './utils/missingGeneratorMessage' export { parseBinaryTargetsEnvValue, parseEnvValue } from './utils/parseEnvValue' export { pathToPosix } from './utils/path' diff --git a/packages/internals/src/utils/max.test.ts b/packages/internals/src/utils/max.test.ts new file mode 100644 index 000000000000..877a42cd43e9 --- /dev/null +++ b/packages/internals/src/utils/max.test.ts @@ -0,0 +1,23 @@ +import { maxBy, maxWithComparator } from './max' + +describe('maxWithComparator', () => { + test('empty array', () => { + expect(maxWithComparator([], () => 0)).toBe(undefined) + }) + + test('with items', () => { + const items = [{ count: 1 }, { count: 10 }, { count: 5 }] + expect(maxWithComparator(items, (a, b) => a.count - b.count)).toBe(items[1]) + }) +}) + +describe('maxBy', () => { + test('empty array', () => { + expect(maxBy([], () => 1)).toBe(undefined) + }) + + test('with items', () => { + const items = [{ count: 1 }, { count: 10 }, { count: 5 }] + expect(maxBy(items, (item) => item.count)).toBe(items[1]) + }) +}) diff --git a/packages/internals/src/utils/max.ts b/packages/internals/src/utils/max.ts new file mode 100644 index 000000000000..e1372721784b --- /dev/null +++ b/packages/internals/src/utils/max.ts @@ -0,0 +1,28 @@ +/** + * Accepts an array and comparator function (similar to Array.prototype.sort) + * and returns max element of that array, ordered with that comparator. + * Functionally, equivalent of items.sort(comparator).at(-1), but performed non-destructively + * in O(n) + * @param items + * @param comparator callback specifying the relative order of two items. See `Array.prototype.sort` + * @returns + */ +export function maxWithComparator(items: T[], comparator: (a: T, b: T) => number): T | undefined { + if (items.length === 0) { + return undefined + } + let result = items[0] + + for (let i = 1; i < items.length; i++) { + const compareValue = comparator(result, items[i]) + // comparator returning negative number means that b>a + if (compareValue < 0) { + result = items[i] + } + } + return result +} + +export function maxBy(items: T[], callback: (item: T) => number): T | undefined { + return maxWithComparator(items, (a, b) => callback(a) - callback(b)) +} diff --git a/packages/internals/src/utils/maxBy.test.ts b/packages/internals/src/utils/maxBy.test.ts deleted file mode 100644 index 70af950c2424..000000000000 --- a/packages/internals/src/utils/maxBy.test.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { maxBy } from './maxBy' - -test('empty array', () => { - expect(maxBy([], () => 1)).toBe(undefined) -}) - -test('with items', () => { - const items = [{ count: 1 }, { count: 10 }, { count: 5 }] - expect(maxBy(items, (item) => item.count)).toBe(items[1]) -}) diff --git a/packages/internals/src/utils/maxBy.ts b/packages/internals/src/utils/maxBy.ts deleted file mode 100644 index 01c76bb72784..000000000000 --- a/packages/internals/src/utils/maxBy.ts +++ /dev/null @@ -1,16 +0,0 @@ -export function maxBy(items: T[], callback: (item: T) => number): T | undefined { - if (items.length === 0) { - return undefined - } - let result = items[0] - let max = callback(items[0]) - - for (let i = 1; i < items.length; i++) { - const value = callback(items[i]) - if (value > max) { - max = value - result = items[i] - } - } - return result -} diff --git a/packages/migrate/README.md b/packages/migrate/README.md index cd6b09ccf8e8..d73f6e2b9c0e 100644 --- a/packages/migrate/README.md +++ b/packages/migrate/README.md @@ -17,6 +17,8 @@   •   Slack   •   + Discord +   •   Twitter diff --git a/packages/migrate/package.json b/packages/migrate/package.json index ad836d1254f8..170d8e16179d 100644 --- a/packages/migrate/package.json +++ b/packages/migrate/package.json @@ -17,14 +17,14 @@ "version": "latest" }, "devDependencies": { - "@prisma/engines-version": "4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944", + "@prisma/engines-version": "4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309", "@prisma/generator-helper": "workspace:*", "@prisma/internals": "workspace:*", - "@swc/core": "1.3.32", + "@swc/core": "1.3.64", "@swc/jest": "0.2.26", - "@types/jest": "29.5.1", - "@types/node": "18.16.14", - "@types/pg": "8.10.1", + "@types/jest": "29.5.2", + "@types/node": "18.16.16", + "@types/pg": "8.10.2", "@types/prompts": "2.4.4", "@types/sqlite3": "3.1.8", "esbuild": "0.15.13", @@ -43,6 +43,7 @@ "@prisma/debug": "workspace:*", "@prisma/get-platform": "workspace:*", "@sindresorhus/slugify": "1.1.2", + "arg": "5.0.2", "execa": "5.1.1", "fp-ts": "2.16.0", "get-stdin": "8.0.0", @@ -50,8 +51,8 @@ "indent-string": "4.0.0", "kleur": "4.1.5", "log-update": "4.0.0", - "mariadb": "3.1.1", - "mongoose": "6.11.1", + "mariadb": "3.2.0", + "mongoose": "6.11.2", "mssql": "9.1.1", "ora": "5.4.1", "pg": "8.10.0", diff --git a/packages/migrate/src/utils/getSchemaPathAndPrint.ts b/packages/migrate/src/utils/getSchemaPathAndPrint.ts index dacddda3a147..649eb38fed5c 100644 --- a/packages/migrate/src/utils/getSchemaPathAndPrint.ts +++ b/packages/migrate/src/utils/getSchemaPathAndPrint.ts @@ -21,7 +21,7 @@ export async function getSchemaPathAndPrint(schemaPathProvided?: string, postins if (!schemaPath) { // Special case for Generate command if (postinstallCwd) { - logger.warn(`The postinstall script automatically ran \`prisma generate\` and did not find your \`prisma/schema.prisma\`. + logger.warn(`We could not find your Prisma schema at \`prisma/schema.prisma\`. If you have a Prisma schema file in a custom path, you will need to run \`prisma generate --schema=./path/to/your/schema.prisma\` to generate Prisma Client. If you do not have a Prisma schema file yet, you can ignore this message.`) diff --git a/packages/nextjs-monorepo-workaround-plugin/package.json b/packages/nextjs-monorepo-workaround-plugin/package.json index 6c762407c549..7dba220e7cf6 100644 --- a/packages/nextjs-monorepo-workaround-plugin/package.json +++ b/packages/nextjs-monorepo-workaround-plugin/package.json @@ -21,6 +21,6 @@ "author": "Pierre-Antoine Mills", "license": "Apache-2.0", "devDependencies": { - "webpack": "5.84.0" + "webpack": "5.87.0" } } diff --git a/packages/ni/.gitignore b/packages/ni/.gitignore deleted file mode 100644 index 6ce7699db887..000000000000 --- a/packages/ni/.gitignore +++ /dev/null @@ -1,85 +0,0 @@ -# Created by .ignore support plugin (hsz.mobi) -### Node template -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# TypeScript v1 declaration files -typings/ - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env - -# parcel-bundler cache (https://parceljs.org/) -.cache - -# next.js build output -.next - -# nuxt.js build output -.nuxt - -# Nuxt generate -dist - -# vuepress build output -.vuepress/dist - -# Serverless directories -.serverless - -# IDE -.idea -_storage.json - -# System files -.DS_Store diff --git a/packages/ni/LICENSE b/packages/ni/LICENSE deleted file mode 100644 index 8a0000bb9122..000000000000 --- a/packages/ni/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 Anthony Fu - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/packages/ni/README.md b/packages/ni/README.md deleted file mode 100644 index be6c78307544..000000000000 --- a/packages/ni/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# ni - -A port of `ni` while waiting for this PR to merge https://github.com/antfu/ni/pull/151 - -Warning: This is an internal package and will be deprecated once the PR is merged. diff --git a/packages/ni/helpers/build.ts b/packages/ni/helpers/build.ts deleted file mode 100644 index e375c8f69605..000000000000 --- a/packages/ni/helpers/build.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { BuildOptions, build } from '../../../helpers/compile/build' - -const defaultBuildConfig: BuildOptions = { - name: 'default', - bundle: true, - entryPoints: ['src/index.ts'], - outfile: 'dist/index', -} - -void build([defaultBuildConfig]) diff --git a/packages/ni/package.json b/packages/ni/package.json deleted file mode 100644 index d875cae5e729..000000000000 --- a/packages/ni/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "@prisma/ni", - "version": "0.0.0", - "description": "Use the right package manager", - "author": "Anthony Fu ", - "license": "MIT", - "homepage": "https://github.com/antfu/ni#readme", - "repository": { - "type": "git", - "url": "git+https://github.com/antfu/ni.git" - }, - "bugs": { - "url": "https://github.com/antfu/ni/issues" - }, - "main": "dist/index.js", - "types": "dist/index.d.ts", - "files": [ - "dist" - ], - "scripts": { - "dev": "DEV=true node -r esbuild-register helpers/build.ts", - "build": "node -r esbuild-register helpers/build.ts", - "prepublishOnly": "pnpm run build" - }, - "devDependencies": { - "@antfu/eslint-config": "0.39.1", - "@posva/prompts": "2.4.4", - "@types/fs-extra": "11.0.1", - "@types/ini": "1.3.31", - "@types/node": "18.16.14", - "@types/which": "3.0.0", - "bumpp": "9.1.0", - "eslint": "8.41.0", - "esno": "0.16.3", - "execa": "7.1.1", - "fast-glob": "3.2.12", - "find-up": "6.3.0", - "fs-extra": "11.1.1", - "fzf": "0.5.1", - "ini": "4.1.1", - "kleur": "4.1.5", - "rimraf": "4.4.1", - "terminal-link": "3.0.0", - "typescript": "4.9.5", - "unbuild": "1.2.0", - "vitest": "0.31.1", - "which": "3.0.0" - }, - "eslintConfig": { - "extends": "@antfu" - }, - "sideEffects": false -} diff --git a/packages/ni/src/agents.ts b/packages/ni/src/agents.ts deleted file mode 100644 index 852b012c54d3..000000000000 --- a/packages/ni/src/agents.ts +++ /dev/null @@ -1,102 +0,0 @@ -const npmRun = (agent: string) => (args: string[]) => { - if (args.length > 1) - return `${agent} run ${args[0]} -- ${args.slice(1).join(' ')}` - else return `${agent} run ${args[0]}` -} - -const yarn = { - 'agent': 'yarn {0}', - 'run': 'yarn run {0}', - 'install': 'yarn install {0}', - 'frozen': 'yarn install --frozen-lockfile', - 'global': 'yarn global add {0}', - 'add': 'yarn add {0}', - 'upgrade': 'yarn upgrade {0}', - 'upgrade-interactive': 'yarn upgrade-interactive {0}', - 'execute': 'npx {0}', - 'uninstall': 'yarn remove {0}', - 'global_uninstall': 'yarn global remove {0}', -} -const pnpm = { - 'agent': 'pnpm {0}', - 'run': 'pnpm run {0}', - 'install': 'pnpm i {0}', - 'frozen': 'pnpm i --frozen-lockfile', - 'global': 'pnpm add -g {0}', - 'add': 'pnpm add {0}', - 'upgrade': 'pnpm update {0}', - 'upgrade-interactive': 'pnpm update -i {0}', - 'execute': 'pnpm dlx {0}', - 'uninstall': 'pnpm remove {0}', - 'global_uninstall': 'pnpm remove --global {0}', -} -const bun = { - 'agent': 'bun {0}', - 'run': 'bun run {0}', - 'install': 'bun install {0}', - 'frozen': 'bun install --no-save', - 'global': 'bun add -g {0}', - 'add': 'bun add {0}', - 'upgrade': null, - 'upgrade-interactive': null, - 'execute': 'bunx {0}', - 'uninstall': 'bun remove {0}', - 'global_uninstall': 'bun remove -g {0}', -} - -export const AGENTS = { - 'npm': { - 'agent': 'npm {0}', - 'run': npmRun('npm'), - 'install': 'npm i {0}', - 'frozen': 'npm ci', - 'global': 'npm i -g {0}', - 'add': 'npm i {0}', - 'upgrade': 'npm update {0}', - 'upgrade-interactive': null, - 'execute': 'npx {0}', - 'uninstall': 'npm uninstall {0}', - 'global_uninstall': 'npm uninstall -g {0}', - }, - 'yarn': yarn, - 'yarn@berry': { - ...yarn, - 'frozen': 'yarn install --immutable', - 'upgrade': 'yarn up {0}', - 'upgrade-interactive': 'yarn up -i {0}', - 'execute': 'yarn dlx {0}', - // Yarn 2+ removed 'global', see https://github.com/yarnpkg/berry/issues/821 - 'global': 'npm i -g {0}', - 'global_uninstall': 'npm uninstall -g {0}', - }, - 'pnpm': pnpm, - // pnpm v6.x or below - 'pnpm@6': { - ...pnpm, - run: npmRun('pnpm'), - }, - 'bun': bun, -} - -export type Agent = keyof typeof AGENTS -export type Command = keyof typeof AGENTS.npm - -export const agents = Object.keys(AGENTS) as Agent[] - -// the order here matters, more specific one comes first -export const LOCKS: Record = { - 'bun.lockb': 'bun', - 'pnpm-lock.yaml': 'pnpm', - 'yarn.lock': 'yarn', - 'package-lock.json': 'npm', - 'npm-shrinkwrap.json': 'npm', -} - -export const INSTALL_PAGE: Record = { - 'bun': 'https://bun.sh', - 'pnpm': 'https://pnpm.io/installation', - 'pnpm@6': 'https://pnpm.io/6.x/installation', - 'yarn': 'https://classic.yarnpkg.com/en/docs/install', - 'yarn@berry': 'https://yarnpkg.com/getting-started/install', - 'npm': 'https://docs.npmjs.com/cli/v8/configuring-npm/install', -} diff --git a/packages/ni/src/commands/index.ts b/packages/ni/src/commands/index.ts deleted file mode 100644 index 7389c0d1a557..000000000000 --- a/packages/ni/src/commands/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '../index' diff --git a/packages/ni/src/commands/na.ts b/packages/ni/src/commands/na.ts deleted file mode 100644 index 60bb9547d934..000000000000 --- a/packages/ni/src/commands/na.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { parseNa } from '../parse' -import { runCli } from '../runner' - -runCli(parseNa) diff --git a/packages/ni/src/commands/nci.ts b/packages/ni/src/commands/nci.ts deleted file mode 100644 index 2a5eea80c9c8..000000000000 --- a/packages/ni/src/commands/nci.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { parseNi } from '../parse' -import { runCli } from '../runner' - -runCli( - (agent, _, hasLock) => parseNi(agent, ['--frozen-if-present'], hasLock), - { autoInstall: true }, -) diff --git a/packages/ni/src/commands/ni.ts b/packages/ni/src/commands/ni.ts deleted file mode 100644 index 2483fd4b6fed..000000000000 --- a/packages/ni/src/commands/ni.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { parseNi } from '../parse' -import { runCli } from '../runner' - -runCli(parseNi) diff --git a/packages/ni/src/commands/nlx.ts b/packages/ni/src/commands/nlx.ts deleted file mode 100644 index 4f0bdbf66205..000000000000 --- a/packages/ni/src/commands/nlx.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { parseNlx } from '../parse' -import { runCli } from '../runner' - -runCli(parseNlx) diff --git a/packages/ni/src/commands/nr.ts b/packages/ni/src/commands/nr.ts deleted file mode 100644 index 636fe19389bd..000000000000 --- a/packages/ni/src/commands/nr.ts +++ /dev/null @@ -1,95 +0,0 @@ -import type { Choice } from '@posva/prompts' -import prompts from '@posva/prompts' -import c from 'kleur' -import { Fzf } from 'fzf' -import { dump, load } from '../storage' -import { parseNr } from '../parse' -import { getPackageJSON } from '../fs' -import { runCli } from '../runner' - -runCli(async (agent, args, ctx) => { - const storage = await load() - - if (args[0] === '-') { - if (!storage.lastRunCommand) { - if (!ctx?.programmatic) { - console.error('No last command found') - process.exit(1) - } - - throw new Error('No last command found') - } - args[0] = storage.lastRunCommand - } - - if (args.length === 0 && !ctx?.programmatic) { - // support https://www.npmjs.com/package/npm-scripts-info conventions - const pkg = getPackageJSON(ctx) - const scripts = pkg.scripts || {} - const scriptsInfo = pkg['scripts-info'] || {} - - const names = Object.entries(scripts) as [string, string][] - - if (!names.length) - return - - const raw = names - .filter(i => !i[0].startsWith('?')) - .map(([key, cmd]) => ({ - key, - cmd, - description: scriptsInfo[key] || scripts[`?${key}`] || cmd, - })) - - const terminalColumns = process.stdout?.columns || 80 - - function limitText(text: string, maxWidth: number) { - if (text.length <= maxWidth) - return text - return `${text.slice(0, maxWidth)}${c.dim('…')}` - } - const choices: Choice[] = raw - .map(({ key, description }) => ({ - title: key, - value: key, - description: limitText(description, terminalColumns - 15), - })) - - const fzf = new Fzf(raw, { - selector: item => `${item.key} ${item.description}`, - casing: 'case-insensitive', - }) - - if (storage.lastRunCommand) { - const last = choices.find(i => i.value === storage.lastRunCommand) - if (last) - choices.unshift(last) - } - - try { - const { fn } = await prompts({ - name: 'fn', - message: 'script to run', - type: 'autocomplete', - choices, - async suggest(input: string, choices: Choice[]) { - const results = fzf.find(input) - return results.map(r => choices.find(c => c.value === r.item.key)) - }, - }) - if (!fn) - return - args.push(fn) - } - catch (e) { - process.exit(1) - } - } - - if (storage.lastRunCommand !== args[0]) { - storage.lastRunCommand = args[0] - dump() - } - - return parseNr(agent, args) -}) diff --git a/packages/ni/src/commands/nu.ts b/packages/ni/src/commands/nu.ts deleted file mode 100644 index 6d9f4e43f3f8..000000000000 --- a/packages/ni/src/commands/nu.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { parseNu } from '../parse' -import { runCli } from '../runner' - -runCli(parseNu) diff --git a/packages/ni/src/commands/nun.ts b/packages/ni/src/commands/nun.ts deleted file mode 100644 index 204b7cb409cc..000000000000 --- a/packages/ni/src/commands/nun.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { parseNun } from '../parse' -import { runCli } from '../runner' - -runCli(parseNun) diff --git a/packages/ni/src/config.ts b/packages/ni/src/config.ts deleted file mode 100644 index 7dbbcee66004..000000000000 --- a/packages/ni/src/config.ts +++ /dev/null @@ -1,57 +0,0 @@ -import fs from 'fs' -import path from 'path' -import ini from 'ini' -import { findUp } from 'find-up' -import type { Agent } from './agents' -import { LOCKS } from './agents' - -const customRcPath = process.env.NI_CONFIG_FILE - -const home = process.platform === 'win32' - ? process.env.USERPROFILE - : process.env.HOME - -const defaultRcPath = path.join(home || '~/', '.nirc') - -const rcPath = customRcPath || defaultRcPath - -interface Config { - defaultAgent: Agent | 'prompt' - globalAgent: Agent -} - -const defaultConfig: Config = { - defaultAgent: 'prompt', - globalAgent: 'npm', -} - -let config: Config | undefined - -export async function getConfig(): Promise { - if (!config) { - const result = await findUp('package.json') || '' - let packageManager = '' - if (result) - packageManager = JSON.parse(fs.readFileSync(result, 'utf8')).packageManager ?? '' - const [, agent, version] = packageManager.match(new RegExp(`^(${Object.values(LOCKS).join('|')})@(\d).*?$`)) || [] - if (agent) - config = Object.assign({}, defaultConfig, { defaultAgent: (agent === 'yarn' && parseInt(version) > 1) ? 'yarn@berry' : agent }) - else if (!fs.existsSync(rcPath)) - config = defaultConfig - else - config = Object.assign({}, defaultConfig, ini.parse(fs.readFileSync(rcPath, 'utf-8'))) - } - return config -} - -export async function getDefaultAgent(programmatic?: boolean) { - const { defaultAgent } = await getConfig() - if (defaultAgent === 'prompt' && (programmatic || process.env.CI)) - return 'npm' - return defaultAgent -} - -export async function getGlobalAgent() { - const { globalAgent } = await getConfig() - return globalAgent -} diff --git a/packages/ni/src/detect.ts b/packages/ni/src/detect.ts deleted file mode 100644 index 066749f3e2d2..000000000000 --- a/packages/ni/src/detect.ts +++ /dev/null @@ -1,75 +0,0 @@ -import fs from 'fs' -import path from 'path' -import { execaCommand } from 'execa' -import { findUp } from 'find-up' -import terminalLink from 'terminal-link' -import prompts from '@posva/prompts' -import type { Agent } from './agents' -import { AGENTS, INSTALL_PAGE, LOCKS } from './agents' -import { cmdExists } from './utils' - -export interface DetectOptions { - autoInstall?: boolean - programmatic?: boolean - cwd?: string -} - -export async function detect({ autoInstall, programmatic, cwd }: DetectOptions = {}) { - let agent: Agent | null = null - let version: string | null = null - - const lockPath = await findUp(Object.keys(LOCKS), { cwd }) - let packageJsonPath: string | undefined - - if (lockPath) - packageJsonPath = path.resolve(lockPath, '../package.json') - else - packageJsonPath = await findUp('package.json', { cwd }) - - // read `packageManager` field in package.json - if (packageJsonPath && fs.existsSync(packageJsonPath)) { - try { - const pkg = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')) - if (typeof pkg.packageManager === 'string') { - const [name, ver] = pkg.packageManager.split('@') - version = ver - if (name === 'yarn' && parseInt(ver) > 1) - agent = 'yarn@berry' - else if (name === 'pnpm' && parseInt(ver) < 7) - agent = 'pnpm@6' - else if (name in AGENTS) - agent = name - else if (!programmatic) - console.warn('[ni] Unknown packageManager:', pkg.packageManager) - } - } - catch {} - } - - // detect based on lock - if (!agent && lockPath) - agent = LOCKS[path.basename(lockPath)] - - // auto install - if (agent && !cmdExists(agent.split('@')[0]) && !programmatic) { - if (!autoInstall) { - console.warn(`[ni] Detected ${agent} but it doesn't seem to be installed.\n`) - - if (process.env.CI) - process.exit(1) - - const link = terminalLink(agent, INSTALL_PAGE[agent]) - const { tryInstall } = await prompts({ - name: 'tryInstall', - type: 'confirm', - message: `Would you like to globally install ${link}?`, - }) - if (!tryInstall) - process.exit(1) - } - - await execaCommand(`npm i -g ${agent}${version ? `@${version}` : ''}`, { stdio: 'inherit', cwd }) - } - - return agent -} diff --git a/packages/ni/src/fs.ts b/packages/ni/src/fs.ts deleted file mode 100644 index b53a2232f854..000000000000 --- a/packages/ni/src/fs.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { resolve } from 'path' -import fs from 'fs' -import type { RunnerContext } from './runner' - -export function getPackageJSON(ctx?: RunnerContext): any { - const cwd = ctx?.cwd ?? process.cwd() - const path = resolve(cwd, 'package.json') - - if (fs.existsSync(path)) { - try { - const raw = fs.readFileSync(path, 'utf-8') - const data = JSON.parse(raw) - return data - } - catch (e) { - if (!ctx?.programmatic) { - console.warn('Failed to parse package.json') - process.exit(1) - } - - throw e - } - } -} diff --git a/packages/ni/src/index.ts b/packages/ni/src/index.ts deleted file mode 100644 index 7bbc4b91fef2..000000000000 --- a/packages/ni/src/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from './agents' -export * from './config' -export * from './detect' -export * from './parse' -export * from './runner' -export * from './utils' diff --git a/packages/ni/src/parse.ts b/packages/ni/src/parse.ts deleted file mode 100644 index 3ed51ca0b377..000000000000 --- a/packages/ni/src/parse.ts +++ /dev/null @@ -1,84 +0,0 @@ -import type { Agent, Command } from './agents' -import { AGENTS } from './agents' -import { exclude } from './utils' -import type { Runner } from './runner' - -export class UnsupportedCommand extends Error { - constructor({ agent, command }: { agent: Agent; command: Command }) { - super(`Command "${command}" is not support by agent "${agent}"`) - } -} - -export function getCommand( - agent: Agent, - command: Command, - args: string[] = [], -) { - if (!(agent in AGENTS)) - throw new Error(`Unsupported agent "${agent}"`) - - const c = AGENTS[agent][command] - - if (typeof c === 'function') - return c(args) - - if (!c) - throw new UnsupportedCommand({ agent, command }) - - return c.replace('{0}', args.join(' ')).trim() -} - -export const parseNi = ((agent, args, ctx) => { - // bun use `-d` instead of `-D`, #90 - if (agent === 'bun') - args = args.map(i => i === '-D' ? '-d' : i) - - if (args.includes('-g')) - return getCommand(agent, 'global', exclude(args, '-g')) - - if (args.includes('--frozen-if-present')) { - args = exclude(args, '--frozen-if-present') - return getCommand(agent, ctx?.hasLock ? 'frozen' : 'install', args) - } - - if (args.includes('--frozen')) - return getCommand(agent, 'frozen', exclude(args, '--frozen')) - - if (args.length === 0 || args.every(i => i.startsWith('-'))) - return getCommand(agent, 'install', args) - - return getCommand(agent, 'add', args) -}) - -export const parseNr = ((agent, args) => { - if (args.length === 0) - args.push('start') - - if (args.includes('--if-present')) { - args = exclude(args, '--if-present') - args[0] = `--if-present ${args[0]}` - } - - return getCommand(agent, 'run', args) -}) - -export const parseNu = ((agent, args) => { - if (args.includes('-i')) - return getCommand(agent, 'upgrade-interactive', exclude(args, '-i')) - - return getCommand(agent, 'upgrade', args) -}) - -export const parseNun = ((agent, args) => { - if (args.includes('-g')) - return getCommand(agent, 'global_uninstall', exclude(args, '-g')) - return getCommand(agent, 'uninstall', args) -}) - -export const parseNlx = ((agent, args) => { - return getCommand(agent, 'execute', args) -}) - -export const parseNa = ((agent, args) => { - return getCommand(agent, 'agent', args) -}) diff --git a/packages/ni/src/runner.ts b/packages/ni/src/runner.ts deleted file mode 100644 index 027c59ba311d..000000000000 --- a/packages/ni/src/runner.ts +++ /dev/null @@ -1,109 +0,0 @@ -/* eslint-disable no-console */ -import { resolve } from 'path' -import prompts from '@posva/prompts' -import { execaCommand } from 'execa' -import c from 'kleur' -import { version } from '../package.json' -import type { Agent } from './agents' -import { agents } from './agents' -import { getDefaultAgent, getGlobalAgent } from './config' -import type { DetectOptions } from './detect' -import { detect } from './detect' -import { getVoltaPrefix, remove } from './utils' -import { UnsupportedCommand } from './parse' - -const DEBUG_SIGN = '?' - -export interface RunnerContext { - programmatic?: boolean - hasLock?: boolean - cwd?: string -} - -export type Runner = (agent: Agent, args: string[], ctx?: RunnerContext) => Promise | string | undefined - -export async function runCli(fn: Runner, options: DetectOptions = {}) { - const args = process.argv.slice(2).filter(Boolean) - try { - await run(fn, args, options) - } - catch (error) { - if (error instanceof UnsupportedCommand && !options.programmatic) - console.log(c.red(`\u2717 ${error.message}`)) - - if (!options.programmatic) - process.exit(1) - - throw error - } -} - -export async function run(fn: Runner, args: string[], options: DetectOptions = {}) { - const debug = args.includes(DEBUG_SIGN) - if (debug) - remove(args, DEBUG_SIGN) - - let cwd = options.cwd ?? process.cwd() - let command - - if (args.length === 1 && (args[0] === '--version' || args[0] === '-v')) { - console.log(`@antfu/ni v${version}`) - return - } - - if (args.length === 1 && ['-h', '--help'].includes(args[0])) { - const dash = c.dim('-') - console.log(c.green(c.bold('@antfu/ni')) + c.dim(` use the right package manager v${version}\n`)) - console.log(`ni ${dash} install`) - console.log(`nr ${dash} run`) - console.log(`nlx ${dash} execute`) - console.log(`nu ${dash} upgrade`) - console.log(`nun ${dash} uninstall`) - console.log(`nci ${dash} clean install`) - console.log(`na ${dash} agent alias`) - console.log(c.yellow('\ncheck https://github.com/antfu/ni for more documentation.')) - return - } - - if (args[0] === '-C') { - cwd = resolve(cwd, args[1]) - args.splice(0, 2) - } - - const isGlobal = args.includes('-g') - if (isGlobal) { - command = await fn(await getGlobalAgent(), args) - } - else { - let agent = await detect({ ...options, cwd }) || await getDefaultAgent(options.programmatic) - if (agent === 'prompt') { - agent = (await prompts({ - name: 'agent', - type: 'select', - message: 'Choose the agent', - choices: agents.filter(i => !i.includes('@')).map(value => ({ title: value, value })), - })).agent - if (!agent) - return - } - command = await fn(agent as Agent, args, { - programmatic: options.programmatic, - hasLock: Boolean(agent), - cwd, - }) - } - - if (!command) - return - - const voltaPrefix = getVoltaPrefix() - if (voltaPrefix) - command = voltaPrefix.concat(' ').concat(command) - - if (debug) { - console.log(command) - return - } - - await execaCommand(command, { stdio: 'inherit', encoding: 'utf-8', cwd }) -} diff --git a/packages/ni/src/storage.ts b/packages/ni/src/storage.ts deleted file mode 100644 index f1203a27a7e7..000000000000 --- a/packages/ni/src/storage.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { existsSync, promises as fs } from 'fs' -import { resolve } from 'path' -import { CLI_TEMP_DIR, writeFileSafe } from './utils' - -export interface Storage { - lastRunCommand?: string -} - -let storage: Storage | undefined - -const storagePath = resolve(CLI_TEMP_DIR, '_storage.json') - -export async function load(fn?: (storage: Storage) => Promise | boolean) { - if (!storage) { - storage = existsSync(storagePath) - ? (JSON.parse(await fs.readFile(storagePath, 'utf-8') || '{}') || {}) - : {} - } - - if (fn) { - if (await fn(storage!)) - await dump() - } - - return storage! -} - -export async function dump() { - if (storage) - await writeFileSafe(storagePath, JSON.stringify(storage)) -} diff --git a/packages/ni/src/utils.ts b/packages/ni/src/utils.ts deleted file mode 100644 index dfce247c0756..000000000000 --- a/packages/ni/src/utils.ts +++ /dev/null @@ -1,91 +0,0 @@ -import os from 'os' -import { dirname, join } from 'path' -import { existsSync, promises as fs } from 'fs' -import which from 'which' - -export const CLI_TEMP_DIR = join(os.tmpdir(), 'antfu-ni') - -export function remove(arr: T[], v: T) { - const index = arr.indexOf(v) - if (index >= 0) - arr.splice(index, 1) - - return arr -} - -export function exclude(arr: T[], v: T) { - return arr.slice().filter(item => item !== v) -} - -export function cmdExists(cmd: string) { - return which.sync(cmd, { nothrow: true }) !== null -} - -export function getVoltaPrefix(): string { - // https://blog.volta.sh/2020/11/25/command-spotlight-volta-run/ - const VOLTA_PREFIX = 'volta run' - const hasVoltaCommand = cmdExists('volta') - return hasVoltaCommand ? VOLTA_PREFIX : '' -} - -interface TempFile { - path: string - fd: fs.FileHandle - cleanup: () => void -} - -let counter = 0 - -async function openTemp(): Promise { - if (!existsSync(CLI_TEMP_DIR)) - await fs.mkdir(CLI_TEMP_DIR, { recursive: true }) - - const competitivePath = join(CLI_TEMP_DIR, `.${process.pid}.${counter}`) - counter++ - - return fs.open(competitivePath, 'wx') - .then(fd => ({ - fd, - path: competitivePath, - cleanup() { - fd.close().then(() => { - if (existsSync(competitivePath)) - fs.unlink(competitivePath) - }) - }, - })) - .catch((error: any) => { - if (error && error.code === 'EEXIST') - return openTemp() - - else - return undefined - }) -} - -/** - * Write file safely avoiding conflicts - */ -export async function writeFileSafe( - path: string, - data: string | Buffer = '', -): Promise { - const temp = await openTemp() - - if (temp) { - fs.writeFile(temp.path, data) - .then(() => { - const directory = dirname(path) - if (!existsSync(directory)) - fs.mkdir(directory, { recursive: true }) - - return fs.rename(temp.path, path) - .then(() => true) - .catch(() => false) - }) - .catch(() => false) - .finally(temp.cleanup) - } - - return false -} diff --git a/packages/ni/tsconfig.build.json b/packages/ni/tsconfig.build.json deleted file mode 100644 index 1eae4ca25256..000000000000 --- a/packages/ni/tsconfig.build.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../tsconfig.build.regular.json", - "compilerOptions": { - "outDir": "dist" - }, - "include": ["src"] -} diff --git a/packages/ni/tsconfig.json b/packages/ni/tsconfig.json deleted file mode 100644 index 4082f16a5d91..000000000000 --- a/packages/ni/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../tsconfig.json" -} diff --git a/packages/react-prisma/package.json b/packages/react-prisma/package.json index f1ccbffa9b69..44ae566d9088 100644 --- a/packages/react-prisma/package.json +++ b/packages/react-prisma/package.json @@ -14,14 +14,14 @@ "homepage": "https://www.prisma.io", "devDependencies": { "@prisma/client": "workspace:*", - "@types/jest": "29.5.1", - "@types/node": "18.16.14", - "esbuild": "0.17.19", + "@types/jest": "29.5.2", + "@types/node": "18.16.18", + "esbuild": "0.18.2", "jest": "29.5.0", "jest-junit": "16.0.0", "react": "18.2.0", - "typescript": "5.0.4", - "@swc/core": "1.3.59", + "typescript": "5.1.3", + "@swc/core": "1.3.63", "@swc/jest": "0.2.26" }, "scripts": { diff --git a/patches/node-fetch@2.6.7.patch b/patches/node-fetch@2.6.11.patch similarity index 89% rename from patches/node-fetch@2.6.7.patch rename to patches/node-fetch@2.6.11.patch index 8cc3202ab419..e1733bf96fbf 100644 --- a/patches/node-fetch@2.6.7.patch +++ b/patches/node-fetch@2.6.11.patch @@ -1,5 +1,5 @@ diff --git a/lib/index.es.js b/lib/index.es.js -index 4852f7cbac354d002a601212332187487deb3afa..b334d377a01bf38afcbb1d608a267cad1c58286e 100644 +index 79d717be9ae56d455f7f5c7890178bc4bb65da9c..2743edfd1347678bb4e27f986d4593466d9df68d 100644 --- a/lib/index.es.js +++ b/lib/index.es.js @@ -3,7 +3,6 @@ process.emitWarning("The .es.js file is deprecated. Use .mjs instead."); @@ -29,7 +29,7 @@ index 4852f7cbac354d002a601212332187487deb3afa..b334d377a01bf38afcbb1d608a267cad // fix an issue where "PassThrough", "resolve" aren't a named export for node <10 const PassThrough$1 = Stream.PassThrough; diff --git a/lib/index.js b/lib/index.js -index e5b04f107f765db04265c7635d3ca1d86b146fb8..c444206f23a5ed50a3301378eb01eba80938c187 100644 +index 337d6e52e5fc62c26f1f46ac115505fa8e327b5c..fb6b624fa38ee57bc50d4fc5891cb98ff3439174 100644 --- a/lib/index.js +++ b/lib/index.js @@ -7,7 +7,6 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau @@ -59,7 +59,7 @@ index e5b04f107f765db04265c7635d3ca1d86b146fb8..c444206f23a5ed50a3301378eb01eba8 // fix an issue where "PassThrough", "resolve" aren't a named export for node <10 const PassThrough$1 = Stream.PassThrough; diff --git a/lib/index.mjs b/lib/index.mjs -index 49ee05ecf06d31a5168795ced5d795c93a0226e3..b5131e05dd9ee23302d5a07cf9e2900a6e8770cc 100644 +index ace669fd0fee2f3a0e6ca0d34e46c60377da7c78..99c33037fff71127151906f87b004e379b4ffabf 100644 --- a/lib/index.mjs +++ b/lib/index.mjs @@ -1,7 +1,6 @@ @@ -89,7 +89,7 @@ index 49ee05ecf06d31a5168795ced5d795c93a0226e3..b5131e05dd9ee23302d5a07cf9e2900a // fix an issue where "PassThrough", "resolve" aren't a named export for node <10 const PassThrough$1 = Stream.PassThrough; diff --git a/package.json b/package.json -index 3c1bd8da725bc152ca655843769eaa1fb46369a3..71156daefc7d57130a27613aa584ec9b2610ea86 100644 +index fd4f67c33f867df64014fea96f9fa275cb793967..ec340331b92165b3901106c6181e8449d94c3f4d 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,6 @@ @@ -98,5 +98,5 @@ index 3c1bd8da725bc152ca655843769eaa1fb46369a3..71156daefc7d57130a27613aa584ec9b "dependencies": { - "whatwg-url": "^5.0.0" }, - "peerDependencies": { + "peerDependencies": { "encoding": "^0.1.0" \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1bbaba087363..4938ab4919e4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,42 +1,42 @@ lockfileVersion: 5.4 patchedDependencies: - node-fetch@2.6.7: - hash: 3wcp6bao3dfksocwsfev5pt7km - path: patches/node-fetch@2.6.7.patch + node-fetch@2.6.11: + hash: oawau75ow7jz373yzwkw5fs4ry + path: patches/node-fetch@2.6.11.patch importers: .: specifiers: - '@microsoft/api-extractor': 7.35.0 + '@microsoft/api-extractor': 7.36.0 '@sindresorhus/slugify': 1.1.2 '@slack/webhook': 6.1.0 '@types/benchmark': 2.1.2 '@types/fs-extra': 9.0.13 '@types/graphviz': 0.0.35 - '@types/node': 18.16.14 + '@types/node': 18.16.16 '@types/node-fetch': 2.6.4 '@types/redis': 2.8.32 '@types/resolve': 1.20.2 - '@typescript-eslint/eslint-plugin': 5.59.6 - '@typescript-eslint/parser': 5.59.6 + '@typescript-eslint/eslint-plugin': 5.59.11 + '@typescript-eslint/parser': 5.59.11 arg: 5.0.2 batching-toposort: 1.2.0 buffer: 6.0.3 chokidar: 3.5.3 esbuild: 0.15.13 esbuild-register: 3.3.3 - eslint: 8.41.0 + eslint: 8.43.0 eslint-config-prettier: 8.8.0 eslint-plugin-eslint-comments: 3.2.0 eslint-plugin-import: 2.27.5 - eslint-plugin-jest: 27.2.1 + eslint-plugin-jest: 27.2.2 eslint-plugin-prettier: 4.2.1 eslint-plugin-simple-import-sort: 10.0.0 eventemitter3: 5.0.1 execa: 5.1.1 - fs-extra: 11.1.0 + fs-extra: 11.1.1 globby: 11.1.0 graphviz-mit: 0.0.9 husky: 8.0.3 @@ -49,15 +49,15 @@ importers: p-reduce: 2.1.0 p-retry: 4.6.2 path-browserify: 1.0.1 - prettier: 2.8.3 + prettier: 2.8.8 redis: 3.1.2 redis-lock: 0.1.4 regenerator-runtime: 0.13.11 - resolve: 1.22.1 + resolve: 1.22.2 safe-buffer: 5.2.1 semver: 7.5.1 spdx-exceptions: 2.3.0 - spdx-license-ids: 3.0.12 + spdx-license-ids: 3.0.13 staged-git-files: 1.3.0 ts-node: 10.9.1 ts-toolbelt: 9.6.0 @@ -66,34 +66,34 @@ importers: util: 0.12.5 zx: 7.2.2 devDependencies: - '@microsoft/api-extractor': 7.35.0_@types+node@18.16.14 + '@microsoft/api-extractor': 7.36.0_@types+node@18.16.16 '@sindresorhus/slugify': 1.1.2 '@slack/webhook': 6.1.0 '@types/benchmark': 2.1.2 '@types/fs-extra': 9.0.13 '@types/graphviz': 0.0.35 - '@types/node': 18.16.14 + '@types/node': 18.16.16 '@types/node-fetch': 2.6.4 '@types/redis': 2.8.32 '@types/resolve': 1.20.2 - '@typescript-eslint/eslint-plugin': 5.59.6_4qbuxpmdupj46lq2zjlghng6yy - '@typescript-eslint/parser': 5.59.6_5ujgynla27k2qkzlnkldjwsutm + '@typescript-eslint/eslint-plugin': 5.59.11_jxhnufqfdxsaktvg4boo4kir6q + '@typescript-eslint/parser': 5.59.11_2jcgcerbs6bi4debdtwega5q6u arg: 5.0.2 batching-toposort: 1.2.0 buffer: 6.0.3 chokidar: 3.5.3 esbuild: 0.15.13 esbuild-register: 3.3.3_esbuild@0.15.13 - eslint: 8.41.0 - eslint-config-prettier: 8.8.0_eslint@8.41.0 - eslint-plugin-eslint-comments: 3.2.0_eslint@8.41.0 - eslint-plugin-import: 2.27.5_4axmhv5rl7cvu7f33ludfwxkcu - eslint-plugin-jest: 27.2.1_5ijt43grezcuiq4jmxee335ut4 - eslint-plugin-prettier: 4.2.1_5m322ea4tv353bxh5dkqp3d3i4 - eslint-plugin-simple-import-sort: 10.0.0_eslint@8.41.0 + eslint: 8.43.0 + eslint-config-prettier: 8.8.0_eslint@8.43.0 + eslint-plugin-eslint-comments: 3.2.0_eslint@8.43.0 + eslint-plugin-import: 2.27.5_uxlzkvdl7bie3tsj7zcwvawrke + eslint-plugin-jest: 27.2.2_6bt7zv2nmlck33askoehiu6z5u + eslint-plugin-prettier: 4.2.1_zh6vkmzat4wtnmvmftdassiwyu + eslint-plugin-simple-import-sort: 10.0.0_eslint@8.43.0 eventemitter3: 5.0.1 execa: 5.1.1 - fs-extra: 11.1.0 + fs-extra: 11.1.1 globby: 11.1.0 graphviz-mit: 0.0.9 husky: 8.0.3 @@ -101,22 +101,22 @@ importers: jest-junit: 16.0.0 kleur: 4.1.5 lint-staged: 13.2.2 - node-fetch: 2.6.11 + node-fetch: 2.6.11_oawau75ow7jz373yzwkw5fs4ry p-map: 4.0.0 p-reduce: 2.1.0 p-retry: 4.6.2 path-browserify: 1.0.1 - prettier: 2.8.3 + prettier: 2.8.8 redis: 3.1.2 redis-lock: 0.1.4 regenerator-runtime: 0.13.11 - resolve: 1.22.1 + resolve: 1.22.2 safe-buffer: 5.2.1 semver: 7.5.1 spdx-exceptions: 2.3.0 - spdx-license-ids: 3.0.12 + spdx-license-ids: 3.0.13 staged-git-files: 1.3.0 - ts-node: 10.9.1_ja6kqa52slkljcytwd5yeactma + ts-node: 10.9.1_gbfmtwj2t57hq5iibp7xw5qwjq ts-toolbelt: 9.6.0 tty-browserify: 0.0.1 typescript: 4.9.5 @@ -133,22 +133,22 @@ importers: '@prisma/get-platform': workspace:* '@prisma/internals': workspace:* '@prisma/migrate': workspace:* - '@prisma/studio': 0.484.0 - '@prisma/studio-server': 0.484.0 - '@swc/core': 1.3.32 + '@prisma/studio': 0.487.0 + '@prisma/studio-server': 0.487.0 + '@swc/core': 1.3.64 '@swc/jest': 0.2.26 '@types/debug': 4.1.8 '@types/fs-extra': 9.0.13 - '@types/jest': 29.5.1 + '@types/jest': 29.5.2 '@types/rimraf': 3.0.2 - checkpoint-client: 1.1.23 + checkpoint-client: 1.1.24 debug: 4.3.4 dotenv: 16.0.3 esbuild: 0.15.13 execa: 5.1.1 fast-deep-equal: 3.1.3 fast-glob: 3.2.12 - fs-extra: 11.1.0 + fs-extra: 11.1.1 fs-jetpack: 5.1.0 get-port: 5.1.1 global-dirs: 3.0.1 @@ -177,22 +177,22 @@ importers: '@prisma/get-platform': link:../get-platform '@prisma/internals': link:../internals '@prisma/migrate': link:../migrate - '@prisma/studio': 0.484.0 - '@prisma/studio-server': 0.484.0_af2arurw4njyhq5wa6w6rrkc54 - '@swc/core': 1.3.32 - '@swc/jest': 0.2.26_@swc+core@1.3.32 + '@prisma/studio': 0.487.0 + '@prisma/studio-server': 0.487.0_af2arurw4njyhq5wa6w6rrkc54 + '@swc/core': 1.3.64 + '@swc/jest': 0.2.26_@swc+core@1.3.64 '@types/debug': 4.1.8 '@types/fs-extra': 9.0.13 - '@types/jest': 29.5.1 + '@types/jest': 29.5.2 '@types/rimraf': 3.0.2 - checkpoint-client: 1.1.23 + checkpoint-client: 1.1.24 debug: 4.3.4 dotenv: 16.0.3 esbuild: 0.15.13 execa: 5.1.1 fast-deep-equal: 3.1.3 fast-glob: 3.2.12 - fs-extra: 11.1.0 + fs-extra: 11.1.1 fs-jetpack: 5.1.0 get-port: 5.1.1 global-dirs: 3.0.1 @@ -202,7 +202,7 @@ importers: kleur: 4.1.5 line-replace: 2.0.1 log-update: 4.0.0 - node-fetch: 2.6.11 + node-fetch: 2.6.11_oawau75ow7jz373yzwkw5fs4ry npm-packlist: 5.1.3 open: 7.4.2 pkg-up: 3.1.0 @@ -215,8 +215,8 @@ importers: packages/client: specifiers: '@codspeed/benchmark.js-plugin': 1.1.0 - '@faker-js/faker': 8.0.1 - '@fast-check/jest': 1.6.2 + '@faker-js/faker': 8.0.2 + '@fast-check/jest': 1.7.0 '@jest/create-cache-key-function': 29.5.0 '@jest/globals': 29.5.0 '@jest/test-sequencer': 29.5.0 @@ -228,7 +228,7 @@ importers: '@opentelemetry/semantic-conventions': 1.13.0 '@prisma/debug': workspace:* '@prisma/engines': workspace:* - '@prisma/engines-version': 4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944 + '@prisma/engines-version': 4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309 '@prisma/fetch-engine': workspace:* '@prisma/generator-helper': workspace:* '@prisma/get-platform': workspace:* @@ -237,16 +237,16 @@ importers: '@prisma/migrate': workspace:* '@prisma/mini-proxy': 0.7.0 '@swc-node/register': 1.6.5 - '@swc/core': 1.3.32 + '@swc/core': 1.3.64 '@swc/jest': 0.2.26 '@timsuchanek/copy': 1.4.5 '@types/debug': 4.1.8 '@types/fs-extra': 9.0.13 - '@types/jest': 29.5.1 + '@types/jest': 29.5.2 '@types/js-levenshtein': 1.1.1 '@types/mssql': 8.1.2 - '@types/node': 18.16.14 - '@types/pg': 8.10.1 + '@types/node': 18.16.16 + '@types/pg': 8.10.2 '@types/yeoman-generator': 5.2.11 arg: 5.0.2 benchmark: 2.1.4 @@ -255,9 +255,9 @@ importers: env-paths: 3.0.0 esbuild: 0.15.13 execa: 5.1.1 - expect-type: 0.15.0 + expect-type: 0.16.0 flat-map-polyfill: 0.3.8 - fs-extra: 11.1.0 + fs-extra: 11.1.1 get-own-enumerable-property-symbols: 3.0.2 get-stream: 6.0.1 globby: 11.1.0 @@ -272,8 +272,8 @@ importers: kleur: 4.1.5 klona: 2.0.6 lz-string: 1.5.0 - mariadb: 3.0.2 - memfs: 3.5.1 + mariadb: 3.2.0 + memfs: 3.5.3 mssql: 9.1.1 new-github-issue-url: 0.2.1 node-fetch: 2.6.11 @@ -281,9 +281,9 @@ importers: pg: 8.9.0 pkg-up: 3.1.0 pluralize: 8.0.0 - resolve: 1.22.1 + resolve: 1.22.2 rimraf: 3.0.2 - simple-statistics: 7.8.2 + simple-statistics: 7.8.3 sort-keys: 4.2.0 source-map-support: 0.5.21 sql-template-tag: 5.0.3 @@ -294,16 +294,16 @@ importers: ts-pattern: 4.3.0 tsd: 0.28.1 typescript: 4.9.5 - undici: 5.22.0 + undici: 5.22.1 yeoman-generator: 5.9.0 yo: 4.3.1 zx: 7.2.2 dependencies: - '@prisma/engines-version': 4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944 + '@prisma/engines-version': 4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309 devDependencies: '@codspeed/benchmark.js-plugin': 1.1.0_benchmark@2.1.4 - '@faker-js/faker': 8.0.1 - '@fast-check/jest': 1.6.2_@jest+globals@29.5.0 + '@faker-js/faker': 8.0.2 + '@fast-check/jest': 1.7.0_@jest+globals@29.5.0 '@jest/create-cache-key-function': 29.5.0 '@jest/globals': 29.5.0 '@jest/test-sequencer': 29.5.0 @@ -322,17 +322,17 @@ importers: '@prisma/internals': link:../internals '@prisma/migrate': link:../migrate '@prisma/mini-proxy': 0.7.0 - '@swc-node/register': 1.6.5_ofrkegp7wplvaewrpezjkk4xzm - '@swc/core': 1.3.32 - '@swc/jest': 0.2.26_@swc+core@1.3.32 + '@swc-node/register': 1.6.5_w2a3vrbasjgrtv5bvwiyhpfbku + '@swc/core': 1.3.64 + '@swc/jest': 0.2.26_@swc+core@1.3.64 '@timsuchanek/copy': 1.4.5 '@types/debug': 4.1.8 '@types/fs-extra': 9.0.13 - '@types/jest': 29.5.1 + '@types/jest': 29.5.2 '@types/js-levenshtein': 1.1.1 '@types/mssql': 8.1.2 - '@types/node': 18.16.14 - '@types/pg': 8.10.1 + '@types/node': 18.16.16 + '@types/pg': 8.10.2 '@types/yeoman-generator': 5.2.11 arg: 5.0.2 benchmark: 2.1.4 @@ -341,16 +341,16 @@ importers: env-paths: 3.0.0 esbuild: 0.15.13 execa: 5.1.1 - expect-type: 0.15.0 + expect-type: 0.16.0 flat-map-polyfill: 0.3.8 - fs-extra: 11.1.0 + fs-extra: 11.1.1 get-own-enumerable-property-symbols: 3.0.2 get-stream: 6.0.1 globby: 11.1.0 indent-string: 4.0.0 is-obj: 2.0.0 is-regexp: 2.1.0 - jest: 29.5.0_daglcptrsglylliibnnp676h3i + jest: 29.5.0_u3tjahz4lx2ow4rgesw7wigoy4 jest-junit: 16.0.0 jest-serializer-ansi-escapes: 2.0.1 jest-snapshot: 29.5.0 @@ -358,29 +358,29 @@ importers: kleur: 4.1.5 klona: 2.0.6 lz-string: 1.5.0 - mariadb: 3.0.2 - memfs: 3.5.1 + mariadb: 3.2.0 + memfs: 3.5.3 mssql: 9.1.1 new-github-issue-url: 0.2.1 - node-fetch: 2.6.11 + node-fetch: 2.6.11_oawau75ow7jz373yzwkw5fs4ry p-retry: 4.6.2 pg: 8.9.0 pkg-up: 3.1.0 pluralize: 8.0.0 - resolve: 1.22.1 + resolve: 1.22.2 rimraf: 3.0.2 - simple-statistics: 7.8.2 + simple-statistics: 7.8.3 sort-keys: 4.2.0 source-map-support: 0.5.21 sql-template-tag: 5.0.3 stacktrace-parser: 0.1.10 strip-ansi: 6.0.1 strip-indent: 3.0.0 - ts-node: 10.9.1_gedhic2hxbm43qfqfkboxjwb3y + ts-node: 10.9.1_5cbqh36kzuqel5avofcbl5rwvu ts-pattern: 4.3.0 tsd: 0.28.1 typescript: 4.9.5 - undici: 5.22.0 + undici: 5.22.1 yeoman-generator: 5.9.0 yo: 4.3.1 zx: 7.2.2 @@ -388,8 +388,8 @@ importers: packages/debug: specifiers: '@types/debug': 4.1.8 - '@types/jest': 29.5.1 - '@types/node': 18.16.14 + '@types/jest': 29.5.2 + '@types/node': 18.16.16 debug: 4.3.4 esbuild: 0.15.13 jest: 29.5.0 @@ -401,48 +401,48 @@ importers: debug: 4.3.4 strip-ansi: 6.0.1 devDependencies: - '@types/jest': 29.5.1 - '@types/node': 18.16.14 + '@types/jest': 29.5.2 + '@types/node': 18.16.16 esbuild: 0.15.13 - jest: 29.5.0_@types+node@18.16.14 + jest: 29.5.0_@types+node@18.16.16 jest-junit: 16.0.0 typescript: 4.9.5 packages/engines: specifiers: '@prisma/debug': workspace:* - '@prisma/engines-version': 4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944 + '@prisma/engines-version': 4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309 '@prisma/fetch-engine': workspace:* '@prisma/get-platform': workspace:* - '@swc/core': 1.3.32 + '@swc/core': 1.3.64 '@swc/jest': 0.2.26 - '@types/jest': 29.5.1 - '@types/node': 18.16.14 + '@types/jest': 29.5.2 + '@types/node': 18.16.16 execa: 5.1.1 jest: 29.5.0 typescript: 4.9.5 devDependencies: '@prisma/debug': link:../debug - '@prisma/engines-version': 4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944 + '@prisma/engines-version': 4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309 '@prisma/fetch-engine': link:../fetch-engine '@prisma/get-platform': link:../get-platform - '@swc/core': 1.3.32 - '@swc/jest': 0.2.26_@swc+core@1.3.32 - '@types/jest': 29.5.1 - '@types/node': 18.16.14 + '@swc/core': 1.3.64 + '@swc/jest': 0.2.26_@swc+core@1.3.64 + '@types/jest': 29.5.2 + '@types/node': 18.16.16 execa: 5.1.1 - jest: 29.5.0_@types+node@18.16.14 + jest: 29.5.0_@types+node@18.16.16 typescript: 4.9.5 packages/fetch-engine: specifiers: '@prisma/debug': workspace:* - '@prisma/engines-version': 4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944 + '@prisma/engines-version': 4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309 '@prisma/get-platform': workspace:* - '@swc/core': 1.3.32 + '@swc/core': 1.3.64 '@swc/jest': 0.2.26 - '@types/jest': 29.5.1 - '@types/node': 18.16.14 + '@types/jest': 29.5.2 + '@types/node': 18.16.16 '@types/node-fetch': 2.6.4 '@types/progress': 2.0.5 del: 6.1.1 @@ -450,8 +450,8 @@ importers: find-cache-dir: 3.3.2 fs-extra: 11.1.1 hasha: 5.2.2 - http-proxy-agent: 5.0.0 - https-proxy-agent: 5.0.1 + http-proxy-agent: 7.0.0 + https-proxy-agent: 7.0.0 jest: 29.5.0 kleur: 4.1.5 node-fetch: 2.6.11 @@ -471,10 +471,10 @@ importers: find-cache-dir: 3.3.2 fs-extra: 11.1.1 hasha: 5.2.2 - http-proxy-agent: 5.0.0 - https-proxy-agent: 5.0.1 + http-proxy-agent: 7.0.0 + https-proxy-agent: 7.0.0 kleur: 4.1.5 - node-fetch: 2.6.11 + node-fetch: 2.6.11_oawau75ow7jz373yzwkw5fs4ry p-filter: 2.1.0 p-map: 4.0.0 p-retry: 4.6.2 @@ -483,15 +483,15 @@ importers: temp-dir: 2.0.0 tempy: 1.0.1 devDependencies: - '@prisma/engines-version': 4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944 - '@swc/core': 1.3.32 - '@swc/jest': 0.2.26_@swc+core@1.3.32 - '@types/jest': 29.5.1 - '@types/node': 18.16.14 + '@prisma/engines-version': 4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309 + '@swc/core': 1.3.64 + '@swc/jest': 0.2.26_@swc+core@1.3.64 + '@types/jest': 29.5.2 + '@types/node': 18.16.16 '@types/node-fetch': 2.6.4 '@types/progress': 2.0.5 del: 6.1.1 - jest: 29.5.0_@types+node@18.16.14 + jest: 29.5.0_@types+node@18.16.16 strip-ansi: 6.0.1 typescript: 4.9.5 @@ -499,11 +499,11 @@ importers: specifiers: '@prisma/debug': workspace:* '@swc-node/register': 1.6.5 - '@swc/core': 1.3.32 + '@swc/core': 1.3.64 '@swc/jest': 0.2.26 '@types/cross-spawn': 6.0.2 - '@types/jest': 29.5.1 - '@types/node': 18.16.14 + '@types/jest': 29.5.2 + '@types/node': 18.16.16 cross-spawn: 7.0.3 esbuild: 0.15.13 jest: 29.5.0 @@ -517,25 +517,25 @@ importers: cross-spawn: 7.0.3 kleur: 4.1.5 devDependencies: - '@swc-node/register': 1.6.5_ofrkegp7wplvaewrpezjkk4xzm - '@swc/core': 1.3.32 - '@swc/jest': 0.2.26_@swc+core@1.3.32 - '@types/jest': 29.5.1 - '@types/node': 18.16.14 + '@swc-node/register': 1.6.5_w2a3vrbasjgrtv5bvwiyhpfbku + '@swc/core': 1.3.64 + '@swc/jest': 0.2.26_@swc+core@1.3.64 + '@types/jest': 29.5.2 + '@types/node': 18.16.16 esbuild: 0.15.13 - jest: 29.5.0_daglcptrsglylliibnnp676h3i + jest: 29.5.0_u3tjahz4lx2ow4rgesw7wigoy4 jest-junit: 16.0.0 - ts-node: 10.9.1_gedhic2hxbm43qfqfkboxjwb3y + ts-node: 10.9.1_5cbqh36kzuqel5avofcbl5rwvu typescript: 4.9.5 packages/get-platform: specifiers: '@codspeed/benchmark.js-plugin': 1.1.0 '@prisma/debug': workspace:* - '@swc/core': 1.3.32 + '@swc/core': 1.3.64 '@swc/jest': 0.2.26 - '@types/jest': 29.5.1 - '@types/node': 18.16.14 + '@types/jest': 29.5.2 + '@types/node': 18.16.16 benchmark: 2.1.4 escape-string-regexp: 4.0.0 execa: 5.1.1 @@ -562,12 +562,12 @@ importers: ts-pattern: 4.3.0 devDependencies: '@codspeed/benchmark.js-plugin': 1.1.0_benchmark@2.1.4 - '@swc/core': 1.3.32 - '@swc/jest': 0.2.26_@swc+core@1.3.32 - '@types/jest': 29.5.1 - '@types/node': 18.16.14 + '@swc/core': 1.3.64 + '@swc/jest': 0.2.26_@swc+core@1.3.64 + '@types/jest': 29.5.2 + '@types/node': 18.16.16 benchmark: 2.1.4 - jest: 29.5.0_@types+node@18.16.14 + jest: 29.5.0_@types+node@18.16.16 jest-junit: 16.0.0 typescript: 4.9.5 @@ -577,9 +577,9 @@ importers: '@opentelemetry/instrumentation': 0.39.1 '@opentelemetry/sdk-trace-base': 1.13.0 '@prisma/internals': workspace:* - '@swc/core': 1.3.32 - '@types/jest': 29.5.1 - '@types/node': 18.16.14 + '@swc/core': 1.3.64 + '@types/jest': 29.5.2 + '@types/node': 18.16.16 jest: 29.5.0 jest-junit: 16.0.0 typescript: 4.9.5 @@ -589,10 +589,10 @@ importers: '@opentelemetry/sdk-trace-base': 1.13.0_@opentelemetry+api@1.4.1 devDependencies: '@prisma/internals': link:../internals - '@swc/core': 1.3.32 - '@types/jest': 29.5.1 - '@types/node': 18.16.14 - jest: 29.5.0_@types+node@18.16.14 + '@swc/core': 1.3.64 + '@types/jest': 29.5.2 + '@types/node': 18.16.16 + jest: 29.5.0_@types+node@18.16.16 jest-junit: 16.0.0 typescript: 4.9.5 @@ -602,12 +602,12 @@ importers: '@prisma/internals': workspace:* '@prisma/migrate': workspace:* '@sindresorhus/slugify': 1.1.2 - '@swc/core': 1.3.32 + '@swc/core': 1.3.64 '@swc/jest': 0.2.26 - '@types/jest': 29.5.1 + '@types/jest': 29.5.2 '@types/mssql': 8.1.2 - '@types/node': 18.16.14 - '@types/pg': 8.10.1 + '@types/node': 18.16.16 + '@types/pg': 8.10.2 '@types/sqlite3': 3.1.8 decimal.js: 10.4.3 esbuild: 0.15.13 @@ -615,10 +615,10 @@ importers: fs-jetpack: 5.1.0 jest: 29.5.0 jest-junit: 16.0.0 - mariadb: 3.0.2 + mariadb: 3.2.0 mssql: 9.1.1 pg: 8.9.0 - sqlite-async: 1.1.3 + sqlite-async: 1.2.0 string-hash: 1.1.3 strip-ansi: 6.0.1 tempy: 1.0.1 @@ -630,48 +630,48 @@ importers: '@prisma/internals': link:../internals '@prisma/migrate': link:../migrate '@sindresorhus/slugify': 1.1.2 - '@swc/core': 1.3.32 - '@swc/jest': 0.2.26_@swc+core@1.3.32 - '@types/jest': 29.5.1 + '@swc/core': 1.3.64 + '@swc/jest': 0.2.26_@swc+core@1.3.64 + '@types/jest': 29.5.2 '@types/mssql': 8.1.2 - '@types/node': 18.16.14 - '@types/pg': 8.10.1 + '@types/node': 18.16.16 + '@types/pg': 8.10.2 '@types/sqlite3': 3.1.8 decimal.js: 10.4.3 esbuild: 0.15.13 execa: 5.1.1 fs-jetpack: 5.1.0 - jest: 29.5.0_daglcptrsglylliibnnp676h3i + jest: 29.5.0_u3tjahz4lx2ow4rgesw7wigoy4 jest-junit: 16.0.0 - mariadb: 3.0.2 + mariadb: 3.2.0 mssql: 9.1.1 pg: 8.9.0 - sqlite-async: 1.1.3 + sqlite-async: 1.2.0 string-hash: 1.1.3 strip-ansi: 6.0.1 tempy: 1.0.1 - ts-node: 10.9.1_gedhic2hxbm43qfqfkboxjwb3y + ts-node: 10.9.1_5cbqh36kzuqel5avofcbl5rwvu typescript: 4.9.5 verror: 1.10.1 packages/internals: specifiers: + '@antfu/ni': 0.21.4 '@opentelemetry/api': 1.4.1 '@prisma/debug': workspace:* '@prisma/engines': workspace:* '@prisma/fetch-engine': workspace:* '@prisma/generator-helper': workspace:* '@prisma/get-platform': workspace:* - '@prisma/ni': workspace:* - '@prisma/prisma-fmt-wasm': 4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944 + '@prisma/prisma-fmt-wasm': 4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309 '@swc/core': 1.2.204 '@swc/jest': 0.2.26 - '@types/jest': 29.5.1 - '@types/node': 18.16.14 + '@types/jest': 29.5.2 + '@types/node': 18.16.16 '@types/resolve': 1.20.2 archiver: 5.3.1 arg: 5.0.2 - checkpoint-client: 1.1.23 + checkpoint-client: 1.1.24 cli-truncate: 2.1.0 dotenv: 16.0.3 esbuild: 0.15.13 @@ -712,17 +712,17 @@ importers: typescript: 4.9.5 yarn: 1.22.19 dependencies: + '@antfu/ni': 0.21.4 '@opentelemetry/api': 1.4.1 '@prisma/debug': link:../debug '@prisma/engines': link:../engines '@prisma/fetch-engine': link:../fetch-engine '@prisma/generator-helper': link:../generator-helper '@prisma/get-platform': link:../get-platform - '@prisma/ni': link:../ni - '@prisma/prisma-fmt-wasm': 4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944 + '@prisma/prisma-fmt-wasm': 4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309 archiver: 5.3.1 arg: 5.0.2 - checkpoint-client: 1.1.23 + checkpoint-client: 1.1.24 cli-truncate: 2.1.0 dotenv: 16.0.3 escape-string-regexp: 4.0.0 @@ -738,7 +738,7 @@ importers: is-wsl: 2.2.0 kleur: 4.1.5 new-github-issue-url: 0.2.1 - node-fetch: 2.6.11 + node-fetch: 2.6.11_oawau75ow7jz373yzwkw5fs4ry npm-packlist: 5.1.3 open: 7.4.2 p-map: 4.0.0 @@ -758,32 +758,33 @@ importers: devDependencies: '@swc/core': 1.2.204 '@swc/jest': 0.2.26_@swc+core@1.2.204 - '@types/jest': 29.5.1 - '@types/node': 18.16.14 + '@types/jest': 29.5.2 + '@types/node': 18.16.16 '@types/resolve': 1.20.2 esbuild: 0.15.13 - jest: 29.5.0_daglcptrsglylliibnnp676h3i + jest: 29.5.0_u3tjahz4lx2ow4rgesw7wigoy4 jest-junit: 16.0.0 mock-stdin: 1.0.0 - ts-node: 10.9.1_dpfsgaqzs6ay6fyiel2y4blik4 + ts-node: 10.9.1_l26xbtqzhteigi5cpzp2eyiyva typescript: 4.9.5 yarn: 1.22.19 packages/migrate: specifiers: '@prisma/debug': workspace:* - '@prisma/engines-version': 4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944 + '@prisma/engines-version': 4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309 '@prisma/generator-helper': workspace:* '@prisma/get-platform': workspace:* '@prisma/internals': workspace:* '@sindresorhus/slugify': 1.1.2 - '@swc/core': 1.3.32 + '@swc/core': 1.3.64 '@swc/jest': 0.2.26 - '@types/jest': 29.5.1 - '@types/node': 18.16.14 - '@types/pg': 8.10.1 + '@types/jest': 29.5.2 + '@types/node': 18.16.16 + '@types/pg': 8.10.2 '@types/prompts': 2.4.4 '@types/sqlite3': 3.1.8 + arg: 5.0.2 esbuild: 0.15.13 execa: 5.1.1 fp-ts: 2.16.0 @@ -795,9 +796,9 @@ importers: jest-junit: 16.0.0 kleur: 4.1.5 log-update: 4.0.0 - mariadb: 3.1.1 + mariadb: 3.2.0 mock-stdin: 1.0.0 - mongoose: 6.11.1 + mongoose: 6.11.2 mssql: 9.1.1 ora: 5.4.1 pg: 8.10.0 @@ -812,6 +813,7 @@ importers: '@prisma/debug': link:../debug '@prisma/get-platform': link:../get-platform '@sindresorhus/slugify': 1.1.2 + arg: 5.0.2 execa: 5.1.1 fp-ts: 2.16.0 get-stdin: 8.0.0 @@ -819,8 +821,8 @@ importers: indent-string: 4.0.0 kleur: 4.1.5 log-update: 4.0.0 - mariadb: 3.1.1 - mongoose: 6.11.1 + mariadb: 3.2.0 + mongoose: 6.11.2 mssql: 9.1.1 ora: 5.4.1 pg: 8.10.0 @@ -830,19 +832,19 @@ importers: strip-indent: 3.0.0 ts-pattern: 4.3.0 devDependencies: - '@prisma/engines-version': 4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944 + '@prisma/engines-version': 4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309 '@prisma/generator-helper': link:../generator-helper '@prisma/internals': link:../internals - '@swc/core': 1.3.32 - '@swc/jest': 0.2.26_@swc+core@1.3.32 - '@types/jest': 29.5.1 - '@types/node': 18.16.14 - '@types/pg': 8.10.1 + '@swc/core': 1.3.64 + '@swc/jest': 0.2.26_@swc+core@1.3.64 + '@types/jest': 29.5.2 + '@types/node': 18.16.16 + '@types/pg': 8.10.2 '@types/prompts': 2.4.4 '@types/sqlite3': 3.1.8 esbuild: 0.15.13 fs-jetpack: 5.1.0 - jest: 29.5.0_@types+node@18.16.14 + jest: 29.5.0_@types+node@18.16.16 jest-junit: 16.0.0 mock-stdin: 1.0.0 tempy: 1.0.1 @@ -850,81 +852,33 @@ importers: packages/nextjs-monorepo-workaround-plugin: specifiers: - webpack: 5.84.0 - devDependencies: - webpack: 5.84.0 - - packages/ni: - specifiers: - '@antfu/eslint-config': 0.39.1 - '@posva/prompts': 2.4.4 - '@types/fs-extra': 11.0.1 - '@types/ini': 1.3.31 - '@types/node': 18.16.14 - '@types/which': 3.0.0 - bumpp: 9.1.0 - eslint: 8.41.0 - esno: 0.16.3 - execa: 7.1.1 - fast-glob: 3.2.12 - find-up: 6.3.0 - fs-extra: 11.1.1 - fzf: 0.5.1 - ini: 4.1.1 - kleur: 4.1.5 - rimraf: 4.4.1 - terminal-link: 3.0.0 - typescript: 4.9.5 - unbuild: 1.2.0 - vitest: 0.31.1 - which: 3.0.0 + webpack: 5.87.0 devDependencies: - '@antfu/eslint-config': 0.39.1_5ujgynla27k2qkzlnkldjwsutm - '@posva/prompts': 2.4.4 - '@types/fs-extra': 11.0.1 - '@types/ini': 1.3.31 - '@types/node': 18.16.14 - '@types/which': 3.0.0 - bumpp: 9.1.0 - eslint: 8.41.0 - esno: 0.16.3 - execa: 7.1.1 - fast-glob: 3.2.12 - find-up: 6.3.0 - fs-extra: 11.1.1 - fzf: 0.5.1 - ini: 4.1.1 - kleur: 4.1.5 - rimraf: 4.4.1 - terminal-link: 3.0.0 - typescript: 4.9.5 - unbuild: 1.2.0 - vitest: 0.31.1 - which: 3.0.0 + webpack: 5.87.0 packages/react-prisma: specifiers: '@prisma/client': workspace:* - '@swc/core': 1.3.59 + '@swc/core': 1.3.63 '@swc/jest': 0.2.26 - '@types/jest': 29.5.1 - '@types/node': 18.16.14 - esbuild: 0.17.19 + '@types/jest': 29.5.2 + '@types/node': 18.16.18 + esbuild: 0.18.2 jest: 29.5.0 jest-junit: 16.0.0 react: 18.2.0 - typescript: 5.0.4 + typescript: 5.1.3 devDependencies: '@prisma/client': link:../client - '@swc/core': 1.3.59 - '@swc/jest': 0.2.26_@swc+core@1.3.59 - '@types/jest': 29.5.1 - '@types/node': 18.16.14 - esbuild: 0.17.19 - jest: 29.5.0_@types+node@18.16.14 + '@swc/core': 1.3.63 + '@swc/jest': 0.2.26_@swc+core@1.3.63 + '@types/jest': 29.5.2 + '@types/node': 18.16.18 + esbuild: 0.18.2 + jest: 29.5.0_@types+node@18.16.18 jest-junit: 16.0.0 react: 18.2.0 - typescript: 5.0.4 + typescript: 5.1.3 packages: @@ -936,101 +890,19 @@ packages: '@jridgewell/trace-mapping': 0.3.17 dev: true - /@antfu/eslint-config-basic/0.39.1_lmx5wrdtyncoutojgob5c3howi: - resolution: {integrity: sha512-6t1nTj/nuXxVj43ZhxWMIhgqXYfI7mhiwTOsVXj7lhmy5YbnU2X6szBLP1tP33tY3VA9cMQysdzxlO/TvYMluA==} - peerDependencies: - eslint: '>=7.4.0' - dependencies: - eslint: 8.41.0 - eslint-plugin-antfu: 0.39.1_5ujgynla27k2qkzlnkldjwsutm - eslint-plugin-eslint-comments: 3.2.0_eslint@8.41.0 - eslint-plugin-html: 7.1.0 - eslint-plugin-import: 2.27.5_4axmhv5rl7cvu7f33ludfwxkcu - eslint-plugin-jsonc: 2.7.0_eslint@8.41.0 - eslint-plugin-markdown: 3.0.0_eslint@8.41.0 - eslint-plugin-n: 15.7.0_eslint@8.41.0 - eslint-plugin-no-only-tests: 3.1.0 - eslint-plugin-promise: 6.1.1_eslint@8.41.0 - eslint-plugin-unicorn: 46.0.0_eslint@8.41.0 - eslint-plugin-unused-imports: 2.0.0_qrapr3bedi2gglhy4lhyjlil4u - eslint-plugin-yml: 1.5.0_eslint@8.41.0 - jsonc-eslint-parser: 2.2.0 - yaml-eslint-parser: 1.2.0 - transitivePeerDependencies: - - '@typescript-eslint/eslint-plugin' - - '@typescript-eslint/parser' - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - supports-color - - typescript - dev: true - - /@antfu/eslint-config-ts/0.39.1_5ujgynla27k2qkzlnkldjwsutm: - resolution: {integrity: sha512-sNBJWLVG8OfNgdY+HxKTXYAO+L0BglVdVJHz1SNHViKfl0bK5M65jES4KaDQ/fS0rsMbfU2HW+HEUljYFMOYeA==} - peerDependencies: - eslint: '>=7.4.0' - typescript: '>=3.9' - dependencies: - '@antfu/eslint-config-basic': 0.39.1_lmx5wrdtyncoutojgob5c3howi - '@typescript-eslint/eslint-plugin': 5.59.6_4qbuxpmdupj46lq2zjlghng6yy - '@typescript-eslint/parser': 5.59.6_5ujgynla27k2qkzlnkldjwsutm - eslint: 8.41.0 - eslint-plugin-jest: 27.2.1_5ijt43grezcuiq4jmxee335ut4 - typescript: 4.9.5 - transitivePeerDependencies: - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - jest - - supports-color - dev: true + /@antfu/ni/0.21.4: + resolution: {integrity: sha512-O0Uv9LbLDSoEg26fnMDdDRiPwFJnQSoD4WnrflDwKCJm8Cx/0mV4cGxwBLXan5mGIrpK4Dd7vizf4rQm0QCEAA==} + hasBin: true + dev: false - /@antfu/eslint-config-vue/0.39.1_lmx5wrdtyncoutojgob5c3howi: - resolution: {integrity: sha512-gxMlDy5xpP08XYWNuvmXD2amU+uIsasmyy8JuPA5OQDisVnL1QTnHbVU4TjsJFZMf8TTvJM5unwk2EUcQZ5inQ==} - peerDependencies: - eslint: '>=7.4.0' + /@aws-crypto/crc32/3.0.0: + resolution: {integrity: sha512-IzSgsrxUcsrejQbPVilIKy16kAT52EwB6zSaI+M3xxIhKh5+aldEyvI+z6erM7TCLB2BJsFrtHjp6/4/sr+3dA==} dependencies: - '@antfu/eslint-config-basic': 0.39.1_lmx5wrdtyncoutojgob5c3howi - '@antfu/eslint-config-ts': 0.39.1_5ujgynla27k2qkzlnkldjwsutm - eslint: 8.41.0 - eslint-plugin-vue: 9.11.0_eslint@8.41.0 - local-pkg: 0.4.3 - transitivePeerDependencies: - - '@typescript-eslint/eslint-plugin' - - '@typescript-eslint/parser' - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - jest - - supports-color - - typescript - dev: true - - /@antfu/eslint-config/0.39.1_5ujgynla27k2qkzlnkldjwsutm: - resolution: {integrity: sha512-FbGyYIxOYP35yp2aqoWhNBUi6deOAu14YJG4yVZQ+ibboXYT3k+9qXmStj+0AOnzFJE1aUQMSE96zhv5aC/3bg==} - peerDependencies: - eslint: '>=7.4.0' - dependencies: - '@antfu/eslint-config-vue': 0.39.1_lmx5wrdtyncoutojgob5c3howi - '@typescript-eslint/eslint-plugin': 5.59.6_4qbuxpmdupj46lq2zjlghng6yy - '@typescript-eslint/parser': 5.59.6_5ujgynla27k2qkzlnkldjwsutm - eslint: 8.41.0 - eslint-plugin-eslint-comments: 3.2.0_eslint@8.41.0 - eslint-plugin-html: 7.1.0 - eslint-plugin-import: 2.27.5_4axmhv5rl7cvu7f33ludfwxkcu - eslint-plugin-jsonc: 2.7.0_eslint@8.41.0 - eslint-plugin-n: 15.7.0_eslint@8.41.0 - eslint-plugin-promise: 6.1.1_eslint@8.41.0 - eslint-plugin-unicorn: 46.0.0_eslint@8.41.0 - eslint-plugin-vue: 9.11.0_eslint@8.41.0 - eslint-plugin-yml: 1.5.0_eslint@8.41.0 - jsonc-eslint-parser: 2.2.0 - yaml-eslint-parser: 1.2.0 - transitivePeerDependencies: - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - jest - - supports-color - - typescript - dev: true + '@aws-crypto/util': 3.0.0 + '@aws-sdk/types': 3.347.0 + tslib: 1.14.1 + dev: false + optional: true /@aws-crypto/ie11-detection/3.0.0: resolution: {integrity: sha512-341lBBkiY1DfDNKai/wXM3aujNBkXR7tq1URPQDL9wi3AUbI80NR74uF1TXHMm7po1AcnFk8iu2S2IeU/+/A+Q==} @@ -1046,7 +918,7 @@ packages: '@aws-crypto/sha256-js': 3.0.0 '@aws-crypto/supports-web-crypto': 3.0.0 '@aws-crypto/util': 3.0.0 - '@aws-sdk/types': 3.338.0 + '@aws-sdk/types': 3.347.0 '@aws-sdk/util-locate-window': 3.310.0 '@aws-sdk/util-utf8-browser': 3.259.0 tslib: 1.14.1 @@ -1057,7 +929,7 @@ packages: resolution: {integrity: sha512-PnNN7os0+yd1XvXAy23CFOmTbMaDxgxXtTKHybrJ39Y8kGzBATgBFibWJKH6BhytLI/Zyszs87xCOBNyBig6vQ==} dependencies: '@aws-crypto/util': 3.0.0 - '@aws-sdk/types': 3.338.0 + '@aws-sdk/types': 3.347.0 tslib: 1.14.1 dev: false optional: true @@ -1072,365 +944,375 @@ packages: /@aws-crypto/util/3.0.0: resolution: {integrity: sha512-2OJlpeJpCR48CC8r+uKVChzs9Iungj9wkZrl8Z041DWEWvyIHILYKCPNzJghKsivj+S3mLo6BVc7mBNzdxA46w==} dependencies: - '@aws-sdk/types': 3.338.0 + '@aws-sdk/types': 3.347.0 '@aws-sdk/util-utf8-browser': 3.259.0 tslib: 1.14.1 dev: false optional: true - /@aws-sdk/abort-controller/3.338.0: - resolution: {integrity: sha512-/yLI32+HwFNBRJ39jMXw+/cn3AnlCuJpQd7Ax4887g32Dgte5eyrfY8sJUOL6902BUmAq4oSRI5QeBXNplO0Xw==} + /@aws-sdk/abort-controller/3.347.0: + resolution: {integrity: sha512-P/2qE6ntYEmYG4Ez535nJWZbXqgbkJx8CMz7ChEuEg3Gp3dvVYEKg+iEUEvlqQ2U5dWP5J3ehw5po9t86IsVPQ==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.338.0 + '@aws-sdk/types': 3.347.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/client-cognito-identity/3.338.0: - resolution: {integrity: sha512-1gu9gXJwrxGGGMlBzmM4d8mkNjD1M8tWo+vmT/Aq1EMBxGef3eN0k6SyeIruj2Jns3olC6pjTIU8zb3vVBkh5Q==} + /@aws-sdk/client-cognito-identity/3.354.0: + resolution: {integrity: sha512-VYoPiup85Zn1uiqn6X7Kl1/5AsihyW0jOPpO5Xv39shRKFTLYWIgPxjg7k+dNPVAX62XrWoWNkGR6sB/JN9Qdg==} engines: {node: '>=14.0.0'} dependencies: '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 - '@aws-sdk/client-sts': 3.338.0 - '@aws-sdk/config-resolver': 3.338.0 - '@aws-sdk/credential-provider-node': 3.338.0 - '@aws-sdk/fetch-http-handler': 3.338.0 - '@aws-sdk/hash-node': 3.338.0 - '@aws-sdk/invalid-dependency': 3.338.0 - '@aws-sdk/middleware-content-length': 3.338.0 - '@aws-sdk/middleware-endpoint': 3.338.0 - '@aws-sdk/middleware-host-header': 3.338.0 - '@aws-sdk/middleware-logger': 3.338.0 - '@aws-sdk/middleware-recursion-detection': 3.338.0 - '@aws-sdk/middleware-retry': 3.338.0 - '@aws-sdk/middleware-serde': 3.338.0 - '@aws-sdk/middleware-signing': 3.338.0 - '@aws-sdk/middleware-stack': 3.338.0 - '@aws-sdk/middleware-user-agent': 3.338.0 - '@aws-sdk/node-config-provider': 3.338.0 - '@aws-sdk/node-http-handler': 3.338.0 - '@aws-sdk/smithy-client': 3.338.0 - '@aws-sdk/types': 3.338.0 - '@aws-sdk/url-parser': 3.338.0 + '@aws-sdk/client-sts': 3.354.0 + '@aws-sdk/config-resolver': 3.354.0 + '@aws-sdk/credential-provider-node': 3.354.0 + '@aws-sdk/fetch-http-handler': 3.353.0 + '@aws-sdk/hash-node': 3.347.0 + '@aws-sdk/invalid-dependency': 3.347.0 + '@aws-sdk/middleware-content-length': 3.347.0 + '@aws-sdk/middleware-endpoint': 3.347.0 + '@aws-sdk/middleware-host-header': 3.347.0 + '@aws-sdk/middleware-logger': 3.347.0 + '@aws-sdk/middleware-recursion-detection': 3.347.0 + '@aws-sdk/middleware-retry': 3.354.0 + '@aws-sdk/middleware-serde': 3.347.0 + '@aws-sdk/middleware-signing': 3.354.0 + '@aws-sdk/middleware-stack': 3.347.0 + '@aws-sdk/middleware-user-agent': 3.352.0 + '@aws-sdk/node-config-provider': 3.354.0 + '@aws-sdk/node-http-handler': 3.350.0 + '@aws-sdk/smithy-client': 3.347.0 + '@aws-sdk/types': 3.347.0 + '@aws-sdk/url-parser': 3.347.0 '@aws-sdk/util-base64': 3.310.0 '@aws-sdk/util-body-length-browser': 3.310.0 '@aws-sdk/util-body-length-node': 3.310.0 - '@aws-sdk/util-defaults-mode-browser': 3.338.0 - '@aws-sdk/util-defaults-mode-node': 3.338.0 - '@aws-sdk/util-endpoints': 3.338.0 - '@aws-sdk/util-retry': 3.338.0 - '@aws-sdk/util-user-agent-browser': 3.338.0 - '@aws-sdk/util-user-agent-node': 3.338.0 + '@aws-sdk/util-defaults-mode-browser': 3.353.0 + '@aws-sdk/util-defaults-mode-node': 3.354.0 + '@aws-sdk/util-endpoints': 3.352.0 + '@aws-sdk/util-retry': 3.347.0 + '@aws-sdk/util-user-agent-browser': 3.347.0 + '@aws-sdk/util-user-agent-node': 3.354.0 '@aws-sdk/util-utf8': 3.310.0 - '@smithy/protocol-http': 1.0.1 - '@smithy/types': 1.0.0 + '@smithy/protocol-http': 1.1.0 + '@smithy/types': 1.1.0 tslib: 2.5.0 transitivePeerDependencies: - aws-crt dev: false optional: true - /@aws-sdk/client-sso-oidc/3.338.0: - resolution: {integrity: sha512-mny5Q3LWKTcMMFS8WxeOCTinl193z7vS3b+eQz09K4jb1Lq04Bpjw25cySgBnhMGZ7QHQiYBscNLyu/TfOKiHA==} + /@aws-sdk/client-sso-oidc/3.354.0: + resolution: {integrity: sha512-XZcg4s2zKb4S8ltluiw5yxpm974uZqzo2HTECt1lbzUJgVgLsMAh/nPJ1fLqg4jadT+rf8Lq2FEFqOM/vxWT8A==} engines: {node: '>=14.0.0'} dependencies: '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 - '@aws-sdk/config-resolver': 3.338.0 - '@aws-sdk/fetch-http-handler': 3.338.0 - '@aws-sdk/hash-node': 3.338.0 - '@aws-sdk/invalid-dependency': 3.338.0 - '@aws-sdk/middleware-content-length': 3.338.0 - '@aws-sdk/middleware-endpoint': 3.338.0 - '@aws-sdk/middleware-host-header': 3.338.0 - '@aws-sdk/middleware-logger': 3.338.0 - '@aws-sdk/middleware-recursion-detection': 3.338.0 - '@aws-sdk/middleware-retry': 3.338.0 - '@aws-sdk/middleware-serde': 3.338.0 - '@aws-sdk/middleware-stack': 3.338.0 - '@aws-sdk/middleware-user-agent': 3.338.0 - '@aws-sdk/node-config-provider': 3.338.0 - '@aws-sdk/node-http-handler': 3.338.0 - '@aws-sdk/smithy-client': 3.338.0 - '@aws-sdk/types': 3.338.0 - '@aws-sdk/url-parser': 3.338.0 + '@aws-sdk/config-resolver': 3.354.0 + '@aws-sdk/fetch-http-handler': 3.353.0 + '@aws-sdk/hash-node': 3.347.0 + '@aws-sdk/invalid-dependency': 3.347.0 + '@aws-sdk/middleware-content-length': 3.347.0 + '@aws-sdk/middleware-endpoint': 3.347.0 + '@aws-sdk/middleware-host-header': 3.347.0 + '@aws-sdk/middleware-logger': 3.347.0 + '@aws-sdk/middleware-recursion-detection': 3.347.0 + '@aws-sdk/middleware-retry': 3.354.0 + '@aws-sdk/middleware-serde': 3.347.0 + '@aws-sdk/middleware-stack': 3.347.0 + '@aws-sdk/middleware-user-agent': 3.352.0 + '@aws-sdk/node-config-provider': 3.354.0 + '@aws-sdk/node-http-handler': 3.350.0 + '@aws-sdk/smithy-client': 3.347.0 + '@aws-sdk/types': 3.347.0 + '@aws-sdk/url-parser': 3.347.0 '@aws-sdk/util-base64': 3.310.0 '@aws-sdk/util-body-length-browser': 3.310.0 '@aws-sdk/util-body-length-node': 3.310.0 - '@aws-sdk/util-defaults-mode-browser': 3.338.0 - '@aws-sdk/util-defaults-mode-node': 3.338.0 - '@aws-sdk/util-endpoints': 3.338.0 - '@aws-sdk/util-retry': 3.338.0 - '@aws-sdk/util-user-agent-browser': 3.338.0 - '@aws-sdk/util-user-agent-node': 3.338.0 + '@aws-sdk/util-defaults-mode-browser': 3.353.0 + '@aws-sdk/util-defaults-mode-node': 3.354.0 + '@aws-sdk/util-endpoints': 3.352.0 + '@aws-sdk/util-retry': 3.347.0 + '@aws-sdk/util-user-agent-browser': 3.347.0 + '@aws-sdk/util-user-agent-node': 3.354.0 '@aws-sdk/util-utf8': 3.310.0 - '@smithy/protocol-http': 1.0.1 - '@smithy/types': 1.0.0 + '@smithy/protocol-http': 1.1.0 + '@smithy/types': 1.1.0 tslib: 2.5.0 transitivePeerDependencies: - aws-crt dev: false optional: true - /@aws-sdk/client-sso/3.338.0: - resolution: {integrity: sha512-EglKsGlVph65PuFPKq1nGlxsY99XM2xHJaB1uX0bQEC94qrmS/M4a5kno5tiUnTWO1K+K4JBQiOxdGJs0GUS+w==} + /@aws-sdk/client-sso/3.354.0: + resolution: {integrity: sha512-4jmvjJYDaaPmm1n2TG4LYfTEnHLKcJmImgBqhgzhMgaypb4u/k1iw0INV2r/afYPL/FsrLFwc46RM3HYx3nc4A==} engines: {node: '>=14.0.0'} dependencies: '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 - '@aws-sdk/config-resolver': 3.338.0 - '@aws-sdk/fetch-http-handler': 3.338.0 - '@aws-sdk/hash-node': 3.338.0 - '@aws-sdk/invalid-dependency': 3.338.0 - '@aws-sdk/middleware-content-length': 3.338.0 - '@aws-sdk/middleware-endpoint': 3.338.0 - '@aws-sdk/middleware-host-header': 3.338.0 - '@aws-sdk/middleware-logger': 3.338.0 - '@aws-sdk/middleware-recursion-detection': 3.338.0 - '@aws-sdk/middleware-retry': 3.338.0 - '@aws-sdk/middleware-serde': 3.338.0 - '@aws-sdk/middleware-stack': 3.338.0 - '@aws-sdk/middleware-user-agent': 3.338.0 - '@aws-sdk/node-config-provider': 3.338.0 - '@aws-sdk/node-http-handler': 3.338.0 - '@aws-sdk/smithy-client': 3.338.0 - '@aws-sdk/types': 3.338.0 - '@aws-sdk/url-parser': 3.338.0 + '@aws-sdk/config-resolver': 3.354.0 + '@aws-sdk/fetch-http-handler': 3.353.0 + '@aws-sdk/hash-node': 3.347.0 + '@aws-sdk/invalid-dependency': 3.347.0 + '@aws-sdk/middleware-content-length': 3.347.0 + '@aws-sdk/middleware-endpoint': 3.347.0 + '@aws-sdk/middleware-host-header': 3.347.0 + '@aws-sdk/middleware-logger': 3.347.0 + '@aws-sdk/middleware-recursion-detection': 3.347.0 + '@aws-sdk/middleware-retry': 3.354.0 + '@aws-sdk/middleware-serde': 3.347.0 + '@aws-sdk/middleware-stack': 3.347.0 + '@aws-sdk/middleware-user-agent': 3.352.0 + '@aws-sdk/node-config-provider': 3.354.0 + '@aws-sdk/node-http-handler': 3.350.0 + '@aws-sdk/smithy-client': 3.347.0 + '@aws-sdk/types': 3.347.0 + '@aws-sdk/url-parser': 3.347.0 '@aws-sdk/util-base64': 3.310.0 '@aws-sdk/util-body-length-browser': 3.310.0 '@aws-sdk/util-body-length-node': 3.310.0 - '@aws-sdk/util-defaults-mode-browser': 3.338.0 - '@aws-sdk/util-defaults-mode-node': 3.338.0 - '@aws-sdk/util-endpoints': 3.338.0 - '@aws-sdk/util-retry': 3.338.0 - '@aws-sdk/util-user-agent-browser': 3.338.0 - '@aws-sdk/util-user-agent-node': 3.338.0 + '@aws-sdk/util-defaults-mode-browser': 3.353.0 + '@aws-sdk/util-defaults-mode-node': 3.354.0 + '@aws-sdk/util-endpoints': 3.352.0 + '@aws-sdk/util-retry': 3.347.0 + '@aws-sdk/util-user-agent-browser': 3.347.0 + '@aws-sdk/util-user-agent-node': 3.354.0 '@aws-sdk/util-utf8': 3.310.0 - '@smithy/protocol-http': 1.0.1 - '@smithy/types': 1.0.0 + '@smithy/protocol-http': 1.1.0 + '@smithy/types': 1.1.0 tslib: 2.5.0 transitivePeerDependencies: - aws-crt dev: false optional: true - /@aws-sdk/client-sts/3.338.0: - resolution: {integrity: sha512-FBHy/G7BAPX0CdEeeGYpoAnKXVCSIIkESLU2wF6x880z+U2IqiL48Fzoa5qoLaLPQaK/30P7ytznkqm4vd1OFw==} + /@aws-sdk/client-sts/3.354.0: + resolution: {integrity: sha512-l9Ar/C/3PNlToM1ukHVfBtp4plbRUxLMYY2DOTMI0nb3jzfcvETBcdEGCP51fX4uAfJ2vc4g5qBF/qXKX0LMWA==} engines: {node: '>=14.0.0'} dependencies: '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 - '@aws-sdk/config-resolver': 3.338.0 - '@aws-sdk/credential-provider-node': 3.338.0 - '@aws-sdk/fetch-http-handler': 3.338.0 - '@aws-sdk/hash-node': 3.338.0 - '@aws-sdk/invalid-dependency': 3.338.0 - '@aws-sdk/middleware-content-length': 3.338.0 - '@aws-sdk/middleware-endpoint': 3.338.0 - '@aws-sdk/middleware-host-header': 3.338.0 - '@aws-sdk/middleware-logger': 3.338.0 - '@aws-sdk/middleware-recursion-detection': 3.338.0 - '@aws-sdk/middleware-retry': 3.338.0 - '@aws-sdk/middleware-sdk-sts': 3.338.0 - '@aws-sdk/middleware-serde': 3.338.0 - '@aws-sdk/middleware-signing': 3.338.0 - '@aws-sdk/middleware-stack': 3.338.0 - '@aws-sdk/middleware-user-agent': 3.338.0 - '@aws-sdk/node-config-provider': 3.338.0 - '@aws-sdk/node-http-handler': 3.338.0 - '@aws-sdk/smithy-client': 3.338.0 - '@aws-sdk/types': 3.338.0 - '@aws-sdk/url-parser': 3.338.0 + '@aws-sdk/config-resolver': 3.354.0 + '@aws-sdk/credential-provider-node': 3.354.0 + '@aws-sdk/fetch-http-handler': 3.353.0 + '@aws-sdk/hash-node': 3.347.0 + '@aws-sdk/invalid-dependency': 3.347.0 + '@aws-sdk/middleware-content-length': 3.347.0 + '@aws-sdk/middleware-endpoint': 3.347.0 + '@aws-sdk/middleware-host-header': 3.347.0 + '@aws-sdk/middleware-logger': 3.347.0 + '@aws-sdk/middleware-recursion-detection': 3.347.0 + '@aws-sdk/middleware-retry': 3.354.0 + '@aws-sdk/middleware-sdk-sts': 3.354.0 + '@aws-sdk/middleware-serde': 3.347.0 + '@aws-sdk/middleware-signing': 3.354.0 + '@aws-sdk/middleware-stack': 3.347.0 + '@aws-sdk/middleware-user-agent': 3.352.0 + '@aws-sdk/node-config-provider': 3.354.0 + '@aws-sdk/node-http-handler': 3.350.0 + '@aws-sdk/smithy-client': 3.347.0 + '@aws-sdk/types': 3.347.0 + '@aws-sdk/url-parser': 3.347.0 '@aws-sdk/util-base64': 3.310.0 '@aws-sdk/util-body-length-browser': 3.310.0 '@aws-sdk/util-body-length-node': 3.310.0 - '@aws-sdk/util-defaults-mode-browser': 3.338.0 - '@aws-sdk/util-defaults-mode-node': 3.338.0 - '@aws-sdk/util-endpoints': 3.338.0 - '@aws-sdk/util-retry': 3.338.0 - '@aws-sdk/util-user-agent-browser': 3.338.0 - '@aws-sdk/util-user-agent-node': 3.338.0 + '@aws-sdk/util-defaults-mode-browser': 3.353.0 + '@aws-sdk/util-defaults-mode-node': 3.354.0 + '@aws-sdk/util-endpoints': 3.352.0 + '@aws-sdk/util-retry': 3.347.0 + '@aws-sdk/util-user-agent-browser': 3.347.0 + '@aws-sdk/util-user-agent-node': 3.354.0 '@aws-sdk/util-utf8': 3.310.0 - '@smithy/protocol-http': 1.0.1 - '@smithy/types': 1.0.0 - fast-xml-parser: 4.1.2 + '@smithy/protocol-http': 1.1.0 + '@smithy/types': 1.1.0 + fast-xml-parser: 4.2.4 tslib: 2.5.0 transitivePeerDependencies: - aws-crt dev: false optional: true - /@aws-sdk/config-resolver/3.338.0: - resolution: {integrity: sha512-rB9WUaMfTB74Hd2mOiyPFR7Q1viT+w6SaDSR9SA1P8EeIg5H13FNdIKb736Z8/6QJhDj7whdyk1CTGV+DmXOOg==} + /@aws-sdk/config-resolver/3.354.0: + resolution: {integrity: sha512-K4XWie8yJPT8bpYVX54VJMQhiJRTw8PrjEs9QrKqvwoCcZ3G4qEt40tIu33XksuokXxk8rrVH5d7odOPBsAtdg==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.338.0 + '@aws-sdk/types': 3.347.0 '@aws-sdk/util-config-provider': 3.310.0 - '@aws-sdk/util-middleware': 3.338.0 + '@aws-sdk/util-middleware': 3.347.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/credential-provider-cognito-identity/3.338.0: - resolution: {integrity: sha512-kKkBt1qCKx+HspbMq7kd5Yz3jWRW5N1Tegs4cGbTFJH9qMJTyQMoS9GNRcFfzgNEA9sfpHxeTnBbwBw6Ca4S9g==} + /@aws-sdk/credential-provider-cognito-identity/3.354.0: + resolution: {integrity: sha512-Q5UcqASJWqwD4AXpfv4Zpw5tUV/fzbhnEC9TzyB39zXcu4Qd0cQgVQOOq9FX1GbtLNOzkPnbvHsbv2PdEaNM4A==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/client-cognito-identity': 3.338.0 - '@aws-sdk/property-provider': 3.338.0 - '@aws-sdk/types': 3.338.0 + '@aws-sdk/client-cognito-identity': 3.354.0 + '@aws-sdk/property-provider': 3.353.0 + '@aws-sdk/types': 3.347.0 tslib: 2.5.0 transitivePeerDependencies: - aws-crt dev: false optional: true - /@aws-sdk/credential-provider-env/3.338.0: - resolution: {integrity: sha512-j14vApy80tpk87C3x3uBf1caQsuR8RdQ8iOW830H/AOhsa88XaZIB/NQSX7exaIKZa2RU0Vv2wIlGAA8ko7J6g==} + /@aws-sdk/credential-provider-env/3.353.0: + resolution: {integrity: sha512-Y4VsNS8O1FAD5J7S5itOhnOghQ5LIXlZ44t35nF8cbcF+JPvY3ToKzYpjYN1jM7DXKqU4shtqgYpzSqxlvEgKQ==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/property-provider': 3.338.0 - '@aws-sdk/types': 3.338.0 + '@aws-sdk/property-provider': 3.353.0 + '@aws-sdk/types': 3.347.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/credential-provider-imds/3.338.0: - resolution: {integrity: sha512-qsqeywYfJevg5pgUUUBmm7pK1bckVrl091PZB2IliFdQVnDvI5GFLf4B0oZqjaLAzPG1gVtxRvqIve+tnP/+xA==} + /@aws-sdk/credential-provider-imds/3.354.0: + resolution: {integrity: sha512-AB+PuDd1jX6qgz+JYvIyOn8Kz9/lQ60KuY1TFb7g3S8zURw+DSeMJNR1jzEsorWICTzhxXmyasHVMa4Eo4Uq+Q==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/node-config-provider': 3.338.0 - '@aws-sdk/property-provider': 3.338.0 - '@aws-sdk/types': 3.338.0 - '@aws-sdk/url-parser': 3.338.0 + '@aws-sdk/node-config-provider': 3.354.0 + '@aws-sdk/property-provider': 3.353.0 + '@aws-sdk/types': 3.347.0 + '@aws-sdk/url-parser': 3.347.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/credential-provider-ini/3.338.0: - resolution: {integrity: sha512-UhgYgymT9sJiRm0peqP5EvtR4dXiS2Q2AuFgDUjBvDz8JaZlqafsIS4cfyGwTHV/xY6cdiMu5rCTe8hTyXsukQ==} + /@aws-sdk/credential-provider-ini/3.354.0: + resolution: {integrity: sha512-bn2ifrRsxWpxzwXa25jRdUECQ1dC+NB3YlRYnGdIaIQLF559N2jnfCabYzqyfKI++WU7aQeMofPe2PxVGlbv9Q==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/credential-provider-env': 3.338.0 - '@aws-sdk/credential-provider-imds': 3.338.0 - '@aws-sdk/credential-provider-process': 3.338.0 - '@aws-sdk/credential-provider-sso': 3.338.0 - '@aws-sdk/credential-provider-web-identity': 3.338.0 - '@aws-sdk/property-provider': 3.338.0 - '@aws-sdk/shared-ini-file-loader': 3.338.0 - '@aws-sdk/types': 3.338.0 + '@aws-sdk/credential-provider-env': 3.353.0 + '@aws-sdk/credential-provider-imds': 3.354.0 + '@aws-sdk/credential-provider-process': 3.354.0 + '@aws-sdk/credential-provider-sso': 3.354.0 + '@aws-sdk/credential-provider-web-identity': 3.354.0 + '@aws-sdk/property-provider': 3.353.0 + '@aws-sdk/shared-ini-file-loader': 3.354.0 + '@aws-sdk/types': 3.347.0 tslib: 2.5.0 transitivePeerDependencies: - aws-crt dev: false optional: true - /@aws-sdk/credential-provider-node/3.338.0: - resolution: {integrity: sha512-nZjaMRxJqX0EXMV9LA5IbRQI1pDGGZiPYX2KDfZ1Y9Gc1Y/vIZhHKOHGb1uKMAonlR076CsXlev4/tjC8SGGuw==} + /@aws-sdk/credential-provider-node/3.354.0: + resolution: {integrity: sha512-ltKiRtHfqDaCcrb44DIoSHQ9MposFl/aDtNdu5OdQv/2Q1r7M/r2fQdq9DHOrxeQQjaUH4C6k6fGTsxALTHyNA==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/credential-provider-env': 3.338.0 - '@aws-sdk/credential-provider-imds': 3.338.0 - '@aws-sdk/credential-provider-ini': 3.338.0 - '@aws-sdk/credential-provider-process': 3.338.0 - '@aws-sdk/credential-provider-sso': 3.338.0 - '@aws-sdk/credential-provider-web-identity': 3.338.0 - '@aws-sdk/property-provider': 3.338.0 - '@aws-sdk/shared-ini-file-loader': 3.338.0 - '@aws-sdk/types': 3.338.0 + '@aws-sdk/credential-provider-env': 3.353.0 + '@aws-sdk/credential-provider-imds': 3.354.0 + '@aws-sdk/credential-provider-ini': 3.354.0 + '@aws-sdk/credential-provider-process': 3.354.0 + '@aws-sdk/credential-provider-sso': 3.354.0 + '@aws-sdk/credential-provider-web-identity': 3.354.0 + '@aws-sdk/property-provider': 3.353.0 + '@aws-sdk/shared-ini-file-loader': 3.354.0 + '@aws-sdk/types': 3.347.0 tslib: 2.5.0 transitivePeerDependencies: - aws-crt dev: false optional: true - /@aws-sdk/credential-provider-process/3.338.0: - resolution: {integrity: sha512-5I1EgJxFFEg8xel2kInMpkdBKajUut0hR2fBajqCmK7Pflu8s0I2NKDots9a3YJagNrFJq38+EzoDcUvRrd2dg==} + /@aws-sdk/credential-provider-process/3.354.0: + resolution: {integrity: sha512-AxpASm+tS8V1PY4PLfG9dtqa96lzBJ3niTQb+RAm4uYCddW7gxNDkGB+jSCzVdUPVa3xA2ITBS/ka3C5yM8YWg==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/property-provider': 3.338.0 - '@aws-sdk/shared-ini-file-loader': 3.338.0 - '@aws-sdk/types': 3.338.0 + '@aws-sdk/property-provider': 3.353.0 + '@aws-sdk/shared-ini-file-loader': 3.354.0 + '@aws-sdk/types': 3.347.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/credential-provider-sso/3.338.0: - resolution: {integrity: sha512-fpzYHK17iF/uFkrm4cLg/utDVKSBTWNjAiNlE3GF6CaixBCwc0QBLKHk2nG4d1ZZeMVCbIUMS7eoqfR0LYc/yw==} + /@aws-sdk/credential-provider-sso/3.354.0: + resolution: {integrity: sha512-ihiaUxh8V/nQgTOgQZxWQcbckXhM+J6Wdc4F0z9soi48iSOqzRpzPw5E14wSZScEZjNY/gKEDz8gCt8WkT/G0w==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/client-sso': 3.338.0 - '@aws-sdk/property-provider': 3.338.0 - '@aws-sdk/shared-ini-file-loader': 3.338.0 - '@aws-sdk/token-providers': 3.338.0 - '@aws-sdk/types': 3.338.0 + '@aws-sdk/client-sso': 3.354.0 + '@aws-sdk/property-provider': 3.353.0 + '@aws-sdk/shared-ini-file-loader': 3.354.0 + '@aws-sdk/token-providers': 3.354.0 + '@aws-sdk/types': 3.347.0 tslib: 2.5.0 transitivePeerDependencies: - aws-crt dev: false optional: true - /@aws-sdk/credential-provider-web-identity/3.338.0: - resolution: {integrity: sha512-kjT/P18jM1icwjYwr8wfY//T8lv2s81ms7OC7vgiSqckmQOxpVkdsep9d44ymSUXwopmotFP7M9gGnEHS6HwAA==} + /@aws-sdk/credential-provider-web-identity/3.354.0: + resolution: {integrity: sha512-scx9mAf4m3Hc3uMX2Vh8GciEcC/5GqeDI8qc0zBj+UF/5c/GtihZA4WoCV3Sg3jMPDUKY81DiFCtcKHhtUqKfg==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/property-provider': 3.338.0 - '@aws-sdk/types': 3.338.0 + '@aws-sdk/property-provider': 3.353.0 + '@aws-sdk/types': 3.347.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/credential-providers/3.338.0: - resolution: {integrity: sha512-QQkWsR3fyq3N5eTvyKLgk1IO45SEM5+zIDqGqchG74AAhAzTHpiVZ3AOBZckaIAXKyHU3Fgy3gt/u+fdXC4xyw==} + /@aws-sdk/credential-providers/3.354.0: + resolution: {integrity: sha512-GjkSKGWL+lbEVAYGRvE2kdKn8lnhLEBB98yKMz6k9VhqVBrMPZVGTFTlNNtPRZ7IfnnmgLnk6IHtue9xgaycfg==} engines: {node: '>=14.0.0'} requiresBuild: true dependencies: - '@aws-sdk/client-cognito-identity': 3.338.0 - '@aws-sdk/client-sso': 3.338.0 - '@aws-sdk/client-sts': 3.338.0 - '@aws-sdk/credential-provider-cognito-identity': 3.338.0 - '@aws-sdk/credential-provider-env': 3.338.0 - '@aws-sdk/credential-provider-imds': 3.338.0 - '@aws-sdk/credential-provider-ini': 3.338.0 - '@aws-sdk/credential-provider-node': 3.338.0 - '@aws-sdk/credential-provider-process': 3.338.0 - '@aws-sdk/credential-provider-sso': 3.338.0 - '@aws-sdk/credential-provider-web-identity': 3.338.0 - '@aws-sdk/property-provider': 3.338.0 - '@aws-sdk/types': 3.338.0 + '@aws-sdk/client-cognito-identity': 3.354.0 + '@aws-sdk/client-sso': 3.354.0 + '@aws-sdk/client-sts': 3.354.0 + '@aws-sdk/credential-provider-cognito-identity': 3.354.0 + '@aws-sdk/credential-provider-env': 3.353.0 + '@aws-sdk/credential-provider-imds': 3.354.0 + '@aws-sdk/credential-provider-ini': 3.354.0 + '@aws-sdk/credential-provider-node': 3.354.0 + '@aws-sdk/credential-provider-process': 3.354.0 + '@aws-sdk/credential-provider-sso': 3.354.0 + '@aws-sdk/credential-provider-web-identity': 3.354.0 + '@aws-sdk/property-provider': 3.353.0 + '@aws-sdk/types': 3.347.0 tslib: 2.5.0 transitivePeerDependencies: - aws-crt dev: false optional: true - /@aws-sdk/fetch-http-handler/3.338.0: - resolution: {integrity: sha512-NOIQmeSa51J2nFAzl99IjxwQkq27cdNJzF59jQWzpUCGbxXfMD4WWy2NHubabSFuJ4FJU2eyoQHUNUFc6/uxXA==} + /@aws-sdk/eventstream-codec/3.347.0: + resolution: {integrity: sha512-61q+SyspjsaQ4sdgjizMyRgVph2CiW4aAtfpoH69EJFJfTxTR/OqnZ9Jx/3YiYi0ksrvDenJddYodfWWJqD8/w==} dependencies: - '@aws-sdk/protocol-http': 3.338.0 - '@aws-sdk/querystring-builder': 3.338.0 - '@aws-sdk/types': 3.338.0 + '@aws-crypto/crc32': 3.0.0 + '@aws-sdk/types': 3.347.0 + '@aws-sdk/util-hex-encoding': 3.310.0 + tslib: 2.5.0 + dev: false + optional: true + + /@aws-sdk/fetch-http-handler/3.353.0: + resolution: {integrity: sha512-8ic2+4E6jzfDevd++QS1rOR05QFkAhEFbi5Ja3/Zzp7TkWIS8wv5wwMATjNkbbdsXYuB5Lhl/OsjfZmIv5aqRw==} + dependencies: + '@aws-sdk/protocol-http': 3.347.0 + '@aws-sdk/querystring-builder': 3.347.0 + '@aws-sdk/types': 3.347.0 '@aws-sdk/util-base64': 3.310.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/hash-node/3.338.0: - resolution: {integrity: sha512-udveX3ZRO1oUbyBTQH0LJ8Ika7uk0pHuXrqapdi66GGRJB50IhmOg372zUEwZjDB7DZYXfGTCuAj2OoEalgpBA==} + /@aws-sdk/hash-node/3.347.0: + resolution: {integrity: sha512-96+ml/4EaUaVpzBdOLGOxdoXOjkPgkoJp/0i1fxOJEvl8wdAQSwc3IugVK9wZkCxy2DlENtgOe6DfIOhfffm/g==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.338.0 + '@aws-sdk/types': 3.347.0 '@aws-sdk/util-buffer-from': 3.310.0 '@aws-sdk/util-utf8': 3.310.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/invalid-dependency/3.338.0: - resolution: {integrity: sha512-m6r1fTTGSl0V6l8Z+Ii4Ei8VFpDmu0AT6A59ZhJaMZgxf925ywuCPydyDW9ZqTLE0e7CgxhEHEsH1+HzpVuHTw==} + /@aws-sdk/invalid-dependency/3.347.0: + resolution: {integrity: sha512-8imQcwLwqZ/wTJXZqzXT9pGLIksTRckhGLZaXT60tiBOPKuerTsus2L59UstLs5LP8TKaVZKFFSsjRIn9dQdmQ==} dependencies: - '@aws-sdk/types': 3.338.0 + '@aws-sdk/types': 3.347.0 tslib: 2.5.0 dev: false optional: true @@ -1443,248 +1325,249 @@ packages: dev: false optional: true - /@aws-sdk/middleware-content-length/3.338.0: - resolution: {integrity: sha512-m2C+yJaNmbA3ocBp/7ImUUuimymV5JsFdV7yAibpbYMX22g3q83nieOF9x0I66J0+h+/bcriz/T1ZJAPANLz/g==} + /@aws-sdk/middleware-content-length/3.347.0: + resolution: {integrity: sha512-i4qtWTDImMaDUtwKQPbaZpXsReiwiBomM1cWymCU4bhz81HL01oIxOxOBuiM+3NlDoCSPr3KI6txZSz/8cqXCQ==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/protocol-http': 3.338.0 - '@aws-sdk/types': 3.338.0 + '@aws-sdk/protocol-http': 3.347.0 + '@aws-sdk/types': 3.347.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/middleware-endpoint/3.338.0: - resolution: {integrity: sha512-bzL9Q8lFidg2NTjGVGDKI6yPG/XiPS+VIAMHJeihQmcv1alIy+N3IL4bEN15Fg+cwaGm+P3BevcLIHmcCOVb4w==} + /@aws-sdk/middleware-endpoint/3.347.0: + resolution: {integrity: sha512-unF0c6dMaUL1ffU+37Ugty43DgMnzPWXr/Jup/8GbK5fzzWT5NQq6dj9KHPubMbWeEjQbmczvhv25JuJdK8gNQ==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/middleware-serde': 3.338.0 - '@aws-sdk/types': 3.338.0 - '@aws-sdk/url-parser': 3.338.0 - '@aws-sdk/util-middleware': 3.338.0 + '@aws-sdk/middleware-serde': 3.347.0 + '@aws-sdk/types': 3.347.0 + '@aws-sdk/url-parser': 3.347.0 + '@aws-sdk/util-middleware': 3.347.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/middleware-host-header/3.338.0: - resolution: {integrity: sha512-k3C7oppkrqeKrAJt9XIl45SdELtnph9BF0QypjyRfT5MNEDnMMsQkc6xy3ZMqG5dWQq6B2l8C+JL7pOvkSQP3w==} + /@aws-sdk/middleware-host-header/3.347.0: + resolution: {integrity: sha512-kpKmR9OvMlnReqp5sKcJkozbj1wmlblbVSbnQAIkzeQj2xD5dnVR3Nn2ogQKxSmU1Fv7dEroBtrruJ1o3fY38A==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/protocol-http': 3.338.0 - '@aws-sdk/types': 3.338.0 + '@aws-sdk/protocol-http': 3.347.0 + '@aws-sdk/types': 3.347.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/middleware-logger/3.338.0: - resolution: {integrity: sha512-btj9U0Xovq/UAu3Ur4lAfF7Q3DvvwJ/0UUWsI6GgSzzqSOFgKCz7hCP2GZIT8aXEA5hJOpBOEMkNMjWPNa91Hg==} + /@aws-sdk/middleware-logger/3.347.0: + resolution: {integrity: sha512-NYC+Id5UCkVn+3P1t/YtmHt75uED06vwaKyxDy0UmB2K66PZLVtwWbLpVWrhbroaw1bvUHYcRyQ9NIfnVcXQjA==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.338.0 + '@aws-sdk/types': 3.347.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/middleware-recursion-detection/3.338.0: - resolution: {integrity: sha512-fu5KwiHHSqC8KTQH6xdJ9+dua4gQcXSFLE5fVsergqd0uVdsmhiI+IDfW6QNwF/lmCqnoKDkpeasuB98eG2tow==} + /@aws-sdk/middleware-recursion-detection/3.347.0: + resolution: {integrity: sha512-qfnSvkFKCAMjMHR31NdsT0gv5Sq/ZHTUD4yQsSLpbVQ6iYAS834lrzXt41iyEHt57Y514uG7F/Xfvude3u4icQ==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/protocol-http': 3.338.0 - '@aws-sdk/types': 3.338.0 + '@aws-sdk/protocol-http': 3.347.0 + '@aws-sdk/types': 3.347.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/middleware-retry/3.338.0: - resolution: {integrity: sha512-nw1oPFkB7TdDG4Vlz2Td47ft/2Gmx1bA18QfE9K1mMWZ4nnoAL8xnHbowlTfHo62+BbFCAPu53PzDUCncBL0iw==} + /@aws-sdk/middleware-retry/3.354.0: + resolution: {integrity: sha512-dnG5Nd/mobbhcWCM71DQWI9+f6b6fDSzALXftFIP/8lsXKRcWDSQuYjrnVST2wZzk/QmdF8TnVD0C1xL14K6CQ==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/protocol-http': 3.338.0 - '@aws-sdk/service-error-classification': 3.338.0 - '@aws-sdk/types': 3.338.0 - '@aws-sdk/util-middleware': 3.338.0 - '@aws-sdk/util-retry': 3.338.0 + '@aws-sdk/protocol-http': 3.347.0 + '@aws-sdk/service-error-classification': 3.347.0 + '@aws-sdk/types': 3.347.0 + '@aws-sdk/util-middleware': 3.347.0 + '@aws-sdk/util-retry': 3.347.0 tslib: 2.5.0 uuid: 8.3.2 dev: false optional: true - /@aws-sdk/middleware-sdk-sts/3.338.0: - resolution: {integrity: sha512-aZ8eFVaot8oYQri1wOesrA3gLizeAHtlA/ELlqxoGDJtO011J4/hTHTn0iJGbktaCvc1L3TF6mgOsgXpudYqMg==} + /@aws-sdk/middleware-sdk-sts/3.354.0: + resolution: {integrity: sha512-L6vyAwYrdcOoB4YgCqNJNr+ZZtLHEF2Ym3CTfmFm2srXHqHuRB+mBu0NLV/grz77znIArK1H1ZL/ZaH2I5hclA==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/middleware-signing': 3.338.0 - '@aws-sdk/types': 3.338.0 + '@aws-sdk/middleware-signing': 3.354.0 + '@aws-sdk/types': 3.347.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/middleware-serde/3.338.0: - resolution: {integrity: sha512-AabRLrE6sk9tqQlQ7z3kn4gTHNN7Anjk/AM0ZEu96WcWjedcpgM1vVpKTBE7vjnxcTRNq0CEM3GLtQqaZ7/HjQ==} + /@aws-sdk/middleware-serde/3.347.0: + resolution: {integrity: sha512-x5Foi7jRbVJXDu9bHfyCbhYDH5pKK+31MmsSJ3k8rY8keXLBxm2XEEg/AIoV9/TUF9EeVvZ7F1/RmMpJnWQsEg==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.338.0 + '@aws-sdk/types': 3.347.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/middleware-signing/3.338.0: - resolution: {integrity: sha512-AprhhShMF75mOx80SABujLwrU/w2uHQIvWd6aF3BsE5JRI3uQZRqspfjFCaK52HNLQPj3sCQUw1GeiZJ8GyWCw==} + /@aws-sdk/middleware-signing/3.354.0: + resolution: {integrity: sha512-Dd+vIhJL0VqqKWqlTKlKC5jkCaEIk73ZEXNfv44XbsI25a0vXbatHp1M8jB/cgkJC/Mri1TX9dmckP/C0FDEwA==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/property-provider': 3.338.0 - '@aws-sdk/protocol-http': 3.338.0 - '@aws-sdk/signature-v4': 3.338.0 - '@aws-sdk/types': 3.338.0 - '@aws-sdk/util-middleware': 3.338.0 + '@aws-sdk/property-provider': 3.353.0 + '@aws-sdk/protocol-http': 3.347.0 + '@aws-sdk/signature-v4': 3.354.0 + '@aws-sdk/types': 3.347.0 + '@aws-sdk/util-middleware': 3.347.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/middleware-stack/3.338.0: - resolution: {integrity: sha512-9zXyiklX9AK9ZIXuIPzWzz2vevBEcnBs9UNIxiHl4NBZ8d8oyTvaES1PtFuwL6f7ANSZ9EGVQ2rdTTnMNxMI1A==} + /@aws-sdk/middleware-stack/3.347.0: + resolution: {integrity: sha512-Izidg4rqtYMcKuvn2UzgEpPLSmyd8ub9+LQ2oIzG3mpIzCBITq7wp40jN1iNkMg+X6KEnX9vdMJIYZsPYMCYuQ==} engines: {node: '>=14.0.0'} dependencies: tslib: 2.5.0 dev: false optional: true - /@aws-sdk/middleware-user-agent/3.338.0: - resolution: {integrity: sha512-DMqODOsDMFMPcDw2Ya6a0i34AhaBDRpp3vJ+FK3zPxUIsv6iHA+XqEcXLOxROLLoydoyxus7k2U+EWibLZrFbQ==} + /@aws-sdk/middleware-user-agent/3.352.0: + resolution: {integrity: sha512-QGqblMTsVDqeomy22KPm9LUW8PHZXBA2Hjk9Hcw8U1uFS8IKYJrewInG3ae2+9FAcTyug4LFWDf8CRr9YH2B3Q==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/protocol-http': 3.338.0 - '@aws-sdk/types': 3.338.0 - '@aws-sdk/util-endpoints': 3.338.0 + '@aws-sdk/protocol-http': 3.347.0 + '@aws-sdk/types': 3.347.0 + '@aws-sdk/util-endpoints': 3.352.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/node-config-provider/3.338.0: - resolution: {integrity: sha512-YO7yWg3ipnUI5u6D+Zn2NUpjj5krwc8zNWeY79ULVIp9g7faqGX3xMSjeRSrpZ83s5jg1dOm/+bB0gw7mCrRCw==} + /@aws-sdk/node-config-provider/3.354.0: + resolution: {integrity: sha512-pF1ZGWWvmwbrloNHYF3EDqCb9hq5wfZwDqAwAPhWkYnUYKkR7E7MZVuTwUDU48io8k6Z5pM52l/54w8e8aedTw==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/property-provider': 3.338.0 - '@aws-sdk/shared-ini-file-loader': 3.338.0 - '@aws-sdk/types': 3.338.0 + '@aws-sdk/property-provider': 3.353.0 + '@aws-sdk/shared-ini-file-loader': 3.354.0 + '@aws-sdk/types': 3.347.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/node-http-handler/3.338.0: - resolution: {integrity: sha512-V1BLzCruiv45tJ0vXjiamY8LncIsUFsXYJGDupomFYhWRN8L1MUB9f2vdKn5X3wXn/yKrluwTmNaryrIqd9akA==} + /@aws-sdk/node-http-handler/3.350.0: + resolution: {integrity: sha512-oD96GAlmpzYilCdC8wwyURM5lNfNHZCjm/kxBkQulHKa2kRbIrnD9GfDqdCkWA5cTpjh1NzGLT4D6e6UFDjt9w==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/abort-controller': 3.338.0 - '@aws-sdk/protocol-http': 3.338.0 - '@aws-sdk/querystring-builder': 3.338.0 - '@aws-sdk/types': 3.338.0 + '@aws-sdk/abort-controller': 3.347.0 + '@aws-sdk/protocol-http': 3.347.0 + '@aws-sdk/querystring-builder': 3.347.0 + '@aws-sdk/types': 3.347.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/property-provider/3.338.0: - resolution: {integrity: sha512-mC+ZJ738ipif6ZkH59gcipozYj1FOfpXr9pGVCA2hJGLDdaBwI2Jfpb2qCqbsTNtoCjBuIy+sQHGmUHyclgYHg==} + /@aws-sdk/property-provider/3.353.0: + resolution: {integrity: sha512-Iu6J59hncaew7eBKroTcLjZ8cgrom0IWyZZ09rsow3rZDHVtw7LQSrUyuqsSbKGY9eRtL7Wa6ZtYHnXFiAE2kg==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.338.0 + '@aws-sdk/types': 3.347.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/protocol-http/3.338.0: - resolution: {integrity: sha512-JX03Q2gshdzOWtA/07kdpk0hqeOrOfwuF8TB97g66VCcIopYQkCeNH1zzkWu+RsGxfSlzQ7up+ZM6sclYXyB1A==} + /@aws-sdk/protocol-http/3.347.0: + resolution: {integrity: sha512-2YdBhc02Wvy03YjhGwUxF0UQgrPWEy8Iq75pfS42N+/0B/+eWX1aQgfjFxIpLg7YSjT5eKtYOQGlYd4MFTgj9g==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.338.0 + '@aws-sdk/types': 3.347.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/querystring-builder/3.338.0: - resolution: {integrity: sha512-IB3YhO93Htwt2SxJx4VWsN57Rt1KEsvZ6PbneO4bcS96E04BlfBujYMZ+QxEM3EJxorhpkwbI2QnI12IjD8FhA==} + /@aws-sdk/querystring-builder/3.347.0: + resolution: {integrity: sha512-phtKTe6FXoV02MoPkIVV6owXI8Mwr5IBN3bPoxhcPvJG2AjEmnetSIrhb8kwc4oNhlwfZwH6Jo5ARW/VEWbZtg==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.338.0 + '@aws-sdk/types': 3.347.0 '@aws-sdk/util-uri-escape': 3.310.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/querystring-parser/3.338.0: - resolution: {integrity: sha512-vtI8Gqx4yj0BZlWonRMgLz68sHt5H48HN+ClnY+fDDB/8KLnCuwZ3TGKmYIbYbshL9wjJz0A9aLzuC6nPQ5JKw==} + /@aws-sdk/querystring-parser/3.347.0: + resolution: {integrity: sha512-5VXOhfZz78T2W7SuXf2avfjKglx1VZgZgp9Zfhrt/Rq+MTu2D+PZc5zmJHhYigD7x83jLSLogpuInQpFMA9LgA==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.338.0 + '@aws-sdk/types': 3.347.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/service-error-classification/3.338.0: - resolution: {integrity: sha512-BJFr2mx/N3NbycGTlMMGRBc0tGcHXHEbMPy1H2RbejzL23zh27MchaL1WAK9SvwVMKS29hSDbhkuVR2ABRjerA==} + /@aws-sdk/service-error-classification/3.347.0: + resolution: {integrity: sha512-xZ3MqSY81Oy2gh5g0fCtooAbahqh9VhsF8vcKjVX8+XPbGC8y+kej82+MsMg4gYL8gRFB9u4hgYbNgIS6JTAvg==} engines: {node: '>=14.0.0'} dev: false optional: true - /@aws-sdk/shared-ini-file-loader/3.338.0: - resolution: {integrity: sha512-MA1Sp97LFlOXcUaXgo47j86IsPRWYq1V/JqR+uu0zofZw4Xlt7Y6F+mmnDHvuuMy6R2ltzjXSwgrrW3k0bxFPA==} + /@aws-sdk/shared-ini-file-loader/3.354.0: + resolution: {integrity: sha512-UL9loGEsdzpHBu/PtlwUvkl/yRdmWXkySp22jUaeeRtBhiGAnyeYhxJLIt+u+UkX7Mwz+810SaZJqA9ptOXNAg==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.338.0 + '@aws-sdk/types': 3.347.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/signature-v4/3.338.0: - resolution: {integrity: sha512-EwKTe/8Iwab/v0eo27w7DRYlqp9wEZEhuRfOMwTikUVH6iuTnW6AXjcIUfcRYBRbx2zqnRSiMAZkjN6ZFYm0bQ==} + /@aws-sdk/signature-v4/3.354.0: + resolution: {integrity: sha512-bDp43P5NkwwznpZqmsr78DuyqNcjtS4mriuajb8XPhFNo8DrMXUrdrKJ+5aNABW7YG8uK8PSKBpq88ado692/w==} engines: {node: '>=14.0.0'} dependencies: + '@aws-sdk/eventstream-codec': 3.347.0 '@aws-sdk/is-array-buffer': 3.310.0 - '@aws-sdk/types': 3.338.0 + '@aws-sdk/types': 3.347.0 '@aws-sdk/util-hex-encoding': 3.310.0 - '@aws-sdk/util-middleware': 3.338.0 + '@aws-sdk/util-middleware': 3.347.0 '@aws-sdk/util-uri-escape': 3.310.0 '@aws-sdk/util-utf8': 3.310.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/smithy-client/3.338.0: - resolution: {integrity: sha512-IpFLdLG8GwaiFdqVXf+WyU47Hfa2BMIupAU6iSkE2ZO0lBdg+efn/BBwis5WbBNTDCaaU0xH9y68SmnqqtD7pA==} + /@aws-sdk/smithy-client/3.347.0: + resolution: {integrity: sha512-PaGTDsJLGK0sTjA6YdYQzILRlPRN3uVFyqeBUkfltXssvUzkm8z2t1lz2H4VyJLAhwnG5ZuZTNEV/2mcWrU7JQ==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/middleware-stack': 3.338.0 - '@aws-sdk/types': 3.338.0 + '@aws-sdk/middleware-stack': 3.347.0 + '@aws-sdk/types': 3.347.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/token-providers/3.338.0: - resolution: {integrity: sha512-wuiEGcWiMeq5N68M489i2iGYcCad9p1btNEOFgus+JO3DRSA6HZXizLI1wqfbUm5Ei8512AvUKB6N8PMzahQsg==} + /@aws-sdk/token-providers/3.354.0: + resolution: {integrity: sha512-KcijiySy0oIyafKQagcwgu0fo35mK+2K8pwxRU1WfXqe80Gn1qGceeWcG4iW+t/rUaxa/LVo857N0LcagxCrZA==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/client-sso-oidc': 3.338.0 - '@aws-sdk/property-provider': 3.338.0 - '@aws-sdk/shared-ini-file-loader': 3.338.0 - '@aws-sdk/types': 3.338.0 + '@aws-sdk/client-sso-oidc': 3.354.0 + '@aws-sdk/property-provider': 3.353.0 + '@aws-sdk/shared-ini-file-loader': 3.354.0 + '@aws-sdk/types': 3.347.0 tslib: 2.5.0 transitivePeerDependencies: - aws-crt dev: false optional: true - /@aws-sdk/types/3.338.0: - resolution: {integrity: sha512-hrNK15o+EObLrl9oWOyxJN2dwjgbdBMGolLEVP/wR/+M9ojHgk/x1kMsCVcV82a8Vgdtqx1TyOC3UugUPT0+NA==} + /@aws-sdk/types/3.347.0: + resolution: {integrity: sha512-GkCMy79mdjU9OTIe5KT58fI/6uqdf8UmMdWqVHmFJ+UpEzOci7L/uw4sOXWo7xpPzLs6cJ7s5ouGZW4GRPmHFA==} engines: {node: '>=14.0.0'} dependencies: tslib: 2.5.0 dev: false optional: true - /@aws-sdk/url-parser/3.338.0: - resolution: {integrity: sha512-x8a5swfZ6iWJZEA8rm99OKQ1A6xhWPP1taQUzoPavGCzPAOqyc8cd0FcXYMxvtXb3FeBhGaI8tiGKvelJro0+A==} + /@aws-sdk/url-parser/3.347.0: + resolution: {integrity: sha512-lhrnVjxdV7hl+yCnJfDZOaVLSqKjxN20MIOiijRiqaWGLGEAiSqBreMhL89X1WKCifxAs4zZf9YB9SbdziRpAA==} dependencies: - '@aws-sdk/querystring-parser': 3.338.0 - '@aws-sdk/types': 3.338.0 + '@aws-sdk/querystring-parser': 3.347.0 + '@aws-sdk/types': 3.347.0 tslib: 2.5.0 dev: false optional: true @@ -1730,35 +1613,35 @@ packages: dev: false optional: true - /@aws-sdk/util-defaults-mode-browser/3.338.0: - resolution: {integrity: sha512-Zfr5c7JKMJTfb7z+hgd0ioU5iw+wId6Cppc5V1HpZuS2YY4Mn3aJIixzyzhIoCzbmk/yIkf96981epM9eo3/TA==} + /@aws-sdk/util-defaults-mode-browser/3.353.0: + resolution: {integrity: sha512-ushvOQKJIH7S6E//xMDPyf2/Bbu0K2A0GJRB88qQV6VKRBo4PEbeHTb6BbzPhYVX0IbY3uR/X7+Xwk4FeEkMWg==} engines: {node: '>= 10.0.0'} dependencies: - '@aws-sdk/property-provider': 3.338.0 - '@aws-sdk/types': 3.338.0 + '@aws-sdk/property-provider': 3.353.0 + '@aws-sdk/types': 3.347.0 bowser: 2.11.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/util-defaults-mode-node/3.338.0: - resolution: {integrity: sha512-DFM3BSpSetshZTgTjueCkAYZWS0tn5zl7SjkSpFhWQZ8Tt/Df3/DEjcPvxzmC/5vgYSUXNsqcI7lLAJk9aGZAA==} + /@aws-sdk/util-defaults-mode-node/3.354.0: + resolution: {integrity: sha512-CaaRVBdOYX4wZadj+CDUxpO+4RjyYJcSv71A60jV6CZ/ya1+oYfmPbG5QZ4AlV6crdev2B+aUoR2LPIYqn/GnQ==} engines: {node: '>= 10.0.0'} dependencies: - '@aws-sdk/config-resolver': 3.338.0 - '@aws-sdk/credential-provider-imds': 3.338.0 - '@aws-sdk/node-config-provider': 3.338.0 - '@aws-sdk/property-provider': 3.338.0 - '@aws-sdk/types': 3.338.0 + '@aws-sdk/config-resolver': 3.354.0 + '@aws-sdk/credential-provider-imds': 3.354.0 + '@aws-sdk/node-config-provider': 3.354.0 + '@aws-sdk/property-provider': 3.353.0 + '@aws-sdk/types': 3.347.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/util-endpoints/3.338.0: - resolution: {integrity: sha512-0gBQcohbNcBsBR7oyaD0Dg2m6qOmfp0G1iN/NM23gwAr2H3ni8tUXfs1HsZzxikOwUr6dSLASokc30vQXBF44A==} + /@aws-sdk/util-endpoints/3.352.0: + resolution: {integrity: sha512-PjWMPdoIUWfBPgAWLyOrWFbdSS/3DJtc0OmFb/JrE8C8rKFYl+VGW5f1p0cVdRWiDR0xCGr0s67p8itAakVqjw==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.338.0 + '@aws-sdk/types': 3.347.0 tslib: 2.5.0 dev: false optional: true @@ -1779,19 +1662,19 @@ packages: dev: false optional: true - /@aws-sdk/util-middleware/3.338.0: - resolution: {integrity: sha512-oQuAmhi16HWEqVa+Nq4VD4Ymet9vS+uiW92reaagQrW2QFjAgJW9A6pU0PcIHF9sWY1iDKeNdV5b9odQ45PDJA==} + /@aws-sdk/util-middleware/3.347.0: + resolution: {integrity: sha512-8owqUA3ePufeYTUvlzdJ7Z0miLorTwx+rNol5lourGQZ9JXsVMo23+yGA7nOlFuXSGkoKpMOtn6S0BT2bcfeiw==} engines: {node: '>=14.0.0'} dependencies: tslib: 2.5.0 dev: false optional: true - /@aws-sdk/util-retry/3.338.0: - resolution: {integrity: sha512-diR6M3gJgSgBg/87L2e8iF8urG+LOW9ZGWxhntYpYX4uhiIjwNgUPUa993553C8GIOZDHez5X9ExU4asYGQ71Q==} + /@aws-sdk/util-retry/3.347.0: + resolution: {integrity: sha512-NxnQA0/FHFxriQAeEgBonA43Q9/VPFQa8cfJDuT2A1YZruMasgjcltoZszi1dvoIRWSZsFTW42eY2gdOd0nffQ==} engines: {node: '>= 14.0.0'} dependencies: - '@aws-sdk/service-error-classification': 3.338.0 + '@aws-sdk/service-error-classification': 3.347.0 tslib: 2.5.0 dev: false optional: true @@ -1804,17 +1687,17 @@ packages: dev: false optional: true - /@aws-sdk/util-user-agent-browser/3.338.0: - resolution: {integrity: sha512-3e8D+SOtOQEtRtksOEF7EC26xPkuY6YK6biLgdtvR9JspK96rHk5eX1HEJeBJJqbxhyPaxpIw+OhWhnsrUS3hA==} + /@aws-sdk/util-user-agent-browser/3.347.0: + resolution: {integrity: sha512-ydxtsKVtQefgbk1Dku1q7pMkjDYThauG9/8mQkZUAVik55OUZw71Zzr3XO8J8RKvQG8lmhPXuAQ0FKAyycc0RA==} dependencies: - '@aws-sdk/types': 3.338.0 + '@aws-sdk/types': 3.347.0 bowser: 2.11.0 tslib: 2.5.0 dev: false optional: true - /@aws-sdk/util-user-agent-node/3.338.0: - resolution: {integrity: sha512-rc+bC5KM9h25urRc+MXuViJkJ+qYG2NlCRw6xm2lSIvHFJTUjH1ZMO3mqNDYkGnQRbj0mmrVe+N77TJZGf3Q2Q==} + /@aws-sdk/util-user-agent-node/3.354.0: + resolution: {integrity: sha512-2xkblZS3PGxxh//0lgCwJw2gvh9ZBcI9H9xv05YP7hcwlz9BmkAlbei2i6Uew6agJMLO4unfgWoBTpzp3WLaKg==} engines: {node: '>=14.0.0'} peerDependencies: aws-crt: '>=1.0.0' @@ -1822,8 +1705,8 @@ packages: aws-crt: optional: true dependencies: - '@aws-sdk/node-config-provider': 3.338.0 - '@aws-sdk/types': 3.338.0 + '@aws-sdk/node-config-provider': 3.354.0 + '@aws-sdk/types': 3.347.0 tslib: 2.5.0 dev: false optional: true @@ -1990,13 +1873,6 @@ packages: jsonwebtoken: 8.5.1 uuid: 8.3.2 - /@babel/code-frame/7.18.6: - resolution: {integrity: sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/highlight': 7.18.6 - dev: true - /@babel/code-frame/7.21.4: resolution: {integrity: sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==} engines: {node: '>=6.9.0'} @@ -2018,7 +1894,7 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.2.0 - '@babel/code-frame': 7.18.6 + '@babel/code-frame': 7.21.4 '@babel/generator': 7.19.6 '@babel/helper-compilation-targets': 7.19.3_@babel+core@7.19.6 '@babel/helper-module-transforms': 7.19.6 @@ -2525,11 +2401,6 @@ packages: regenerator-runtime: 0.13.11 dev: true - /@babel/standalone/7.21.8: - resolution: {integrity: sha512-Od6cBJ8dm9wjAt+3olvO7N3s+8UsCkX3hH41Ew3BlFJw1QQtbctplq3kuwzzfk+YcmXE95k8fJCzbnhf32+BxQ==} - engines: {node: '>=6.9.0'} - dev: true - /@babel/template/7.18.10: resolution: {integrity: sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==} engines: {node: '>=6.9.0'} @@ -2552,7 +2423,7 @@ packages: resolution: {integrity: sha512-6l5HrUCzFM04mfbG09AagtYyR2P0B71B1wN7PfSPiksDPz2k5H9CBC1tcZpz2M8OxbKTPccByoOJ22rUKbpmQQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.18.6 + '@babel/code-frame': 7.21.4 '@babel/generator': 7.19.6 '@babel/helper-environment-visitor': 7.18.9 '@babel/helper-function-name': 7.19.0 @@ -2630,27 +2501,6 @@ packages: '@jridgewell/trace-mapping': 0.3.9 dev: true - /@esbuild-kit/cjs-loader/2.4.2: - resolution: {integrity: sha512-BDXFbYOJzT/NBEtp71cvsrGPwGAMGRB/349rwKuoxNSiKjPraNNnlK6MIIabViCjqZugu6j+xeMDlEkWdHHJSg==} - dependencies: - '@esbuild-kit/core-utils': 3.1.0 - get-tsconfig: 4.5.0 - dev: true - - /@esbuild-kit/core-utils/3.1.0: - resolution: {integrity: sha512-Uuk8RpCg/7fdHSceR1M6XbSZFSuMrxcePFuGgyvsBn+u339dk5OeL4jv2EojwTN2st/unJGsVm4qHWjWNmJ/tw==} - dependencies: - esbuild: 0.17.19 - source-map-support: 0.5.21 - dev: true - - /@esbuild-kit/esm-loader/2.5.5: - resolution: {integrity: sha512-Qwfvj/qoPbClxCRNuac1Du01r9gvNOT+pMYtJDapfB1eoGN1YlJ1BixLyL9WVENRx5RXgNLdfYdx/CuswlGhMw==} - dependencies: - '@esbuild-kit/core-utils': 3.1.0 - get-tsconfig: 4.5.0 - dev: true - /@esbuild/android-arm/0.15.13: resolution: {integrity: sha512-RY2fVI8O0iFUNvZirXaQ1vMvK0xhCcl0gqRj74Z6yEiO1zAUa7hbsdwZM1kzqbxHK7LFyMizipfXT3JME+12Hw==} engines: {node: '>=12'} @@ -2660,8 +2510,8 @@ packages: dev: true optional: true - /@esbuild/android-arm/0.17.18: - resolution: {integrity: sha512-EmwL+vUBZJ7mhFCs5lA4ZimpUH3WMAoqvOIYhVQwdIgSpHC8ImHdsRyhHAVxpDYUSm0lWvd63z0XH1IlImS2Qw==} + /@esbuild/android-arm/0.18.2: + resolution: {integrity: sha512-YAnQBHlY0IvYtvY0avnXjI8ywW23emEjk5XExqbFmypath+Snq9MgY1IS47rnqBKVSqnl0ElDt221ZgaeRrkXg==} engines: {node: '>=12'} cpu: [arm] os: [android] @@ -2669,26 +2519,8 @@ packages: dev: true optional: true - /@esbuild/android-arm/0.17.19: - resolution: {integrity: sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==} - engines: {node: '>=12'} - cpu: [arm] - os: [android] - requiresBuild: true - dev: true - optional: true - - /@esbuild/android-arm64/0.17.18: - resolution: {integrity: sha512-/iq0aK0eeHgSC3z55ucMAHO05OIqmQehiGay8eP5l/5l+iEr4EIbh4/MI8xD9qRFjqzgkc0JkX0LculNC9mXBw==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] - requiresBuild: true - dev: true - optional: true - - /@esbuild/android-arm64/0.17.19: - resolution: {integrity: sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==} + /@esbuild/android-arm64/0.18.2: + resolution: {integrity: sha512-1Y2pb0hLdmji8I0zBwNsYSDN7zJSQqufgLOuOsrrod00WEAgKywQR5MB/E046Is/YTP4bgcPS4BioaSDBaLaTg==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -2696,8 +2528,8 @@ packages: dev: true optional: true - /@esbuild/android-x64/0.17.18: - resolution: {integrity: sha512-x+0efYNBF3NPW2Xc5bFOSFW7tTXdAcpfEg2nXmxegm4mJuVeS+i109m/7HMiOQ6M12aVGGFlqJX3RhNdYM2lWg==} + /@esbuild/android-x64/0.18.2: + resolution: {integrity: sha512-P047Mh3pj8uYVE3A/B3QDX6nG8dKbHLJ+48R6Y0CRXCJ5PkXJxdHOTaS8SYs6eSR3FFU6/YQ5TishQXVHX7F5A==} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -2705,17 +2537,8 @@ packages: dev: true optional: true - /@esbuild/android-x64/0.17.19: - resolution: {integrity: sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==} - engines: {node: '>=12'} - cpu: [x64] - os: [android] - requiresBuild: true - dev: true - optional: true - - /@esbuild/darwin-arm64/0.17.18: - resolution: {integrity: sha512-6tY+djEAdF48M1ONWnQb1C+6LiXrKjmqjzPNPWXhu/GzOHTHX2nh8Mo2ZAmBFg0kIodHhciEgUBtcYCAIjGbjQ==} + /@esbuild/darwin-arm64/0.18.2: + resolution: {integrity: sha512-a3Rkqd0tGVYMEKNy9SstWEdeBmM60l8FVD5o4rmwHr3xO1LbLqtCJSrWGbnf37hevo6m437mURVmpEHOmkXeTA==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -2723,17 +2546,8 @@ packages: dev: true optional: true - /@esbuild/darwin-arm64/0.17.19: - resolution: {integrity: sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /@esbuild/darwin-x64/0.17.18: - resolution: {integrity: sha512-Qq84ykvLvya3dO49wVC9FFCNUfSrQJLbxhoQk/TE1r6MjHo3sFF2tlJCwMjhkBVq3/ahUisj7+EpRSz0/+8+9A==} + /@esbuild/darwin-x64/0.18.2: + resolution: {integrity: sha512-cvH58adz9L10JNsIcgtkWNS/1eutjRTi3rtWz1s3ZhR64BpdmkxJBAXE/UjqybyNAWLhaN8mPJdlYI2f+tQA7g==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -2741,17 +2555,8 @@ packages: dev: true optional: true - /@esbuild/darwin-x64/0.17.19: - resolution: {integrity: sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /@esbuild/freebsd-arm64/0.17.18: - resolution: {integrity: sha512-fw/ZfxfAzuHfaQeMDhbzxp9mc+mHn1Y94VDHFHjGvt2Uxl10mT4CDavHm+/L9KG441t1QdABqkVYwakMUeyLRA==} + /@esbuild/freebsd-arm64/0.18.2: + resolution: {integrity: sha512-68rGMGUdgmq+c5IvseCMqY4yaa2CAY/DIILMBA6bEU1caISF7fXnV69B1uU4s3ERuVDcasVVwiAFyNxCtkS6Zg==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -2759,26 +2564,8 @@ packages: dev: true optional: true - /@esbuild/freebsd-arm64/0.17.19: - resolution: {integrity: sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - - /@esbuild/freebsd-x64/0.17.18: - resolution: {integrity: sha512-FQFbRtTaEi8ZBi/A6kxOC0V0E9B/97vPdYjY9NdawyLd4Qk5VD5g2pbWN2VR1c0xhzcJm74HWpObPszWC+qTew==} - engines: {node: '>=12'} - cpu: [x64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - - /@esbuild/freebsd-x64/0.17.19: - resolution: {integrity: sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==} + /@esbuild/freebsd-x64/0.18.2: + resolution: {integrity: sha512-ZSR9On/rXoYuAtrXo5hYKy7OuZwKZyFh2rr6L3TX4UeR1tWLf84aLyAFt7e0tlRbh4zNgqFx+ePWmsSHw7L9Bw==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -2786,8 +2573,8 @@ packages: dev: true optional: true - /@esbuild/linux-arm/0.17.18: - resolution: {integrity: sha512-jW+UCM40LzHcouIaqv3e/oRs0JM76JfhHjCavPxMUti7VAPh8CaGSlS7cmyrdpzSk7A+8f0hiedHqr/LMnfijg==} + /@esbuild/linux-arm/0.18.2: + resolution: {integrity: sha512-jAbA75qJ70T5AOdmw9X8675ppeRfj7j57sOypoZ4mQlfQ/LKF8eoeLzTYVo8+aqLKqeIIl0vQ4hKOB0FyG98Zg==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -2795,26 +2582,8 @@ packages: dev: true optional: true - /@esbuild/linux-arm/0.17.19: - resolution: {integrity: sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==} - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-arm64/0.17.18: - resolution: {integrity: sha512-R7pZvQZFOY2sxUG8P6A21eq6q+eBv7JPQYIybHVf1XkQYC+lT7nDBdC7wWKTrbvMXKRaGudp/dzZCwL/863mZQ==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-arm64/0.17.19: - resolution: {integrity: sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==} + /@esbuild/linux-arm64/0.18.2: + resolution: {integrity: sha512-DFKavAzbu/n9HXWuetxmYN10XnfzW7FgOgpcrGD8eXaiu77KdgB+OVWA83x9FtDYtsoFpfdlDuVFAQFfrhu77A==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -2822,17 +2591,8 @@ packages: dev: true optional: true - /@esbuild/linux-ia32/0.17.18: - resolution: {integrity: sha512-ygIMc3I7wxgXIxk6j3V00VlABIjq260i967Cp9BNAk5pOOpIXmd1RFQJQX9Io7KRsthDrQYrtcx7QCof4o3ZoQ==} - engines: {node: '>=12'} - cpu: [ia32] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-ia32/0.17.19: - resolution: {integrity: sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==} + /@esbuild/linux-ia32/0.18.2: + resolution: {integrity: sha512-VEaK3Z+vJyDwwPsP0sovaEw1foDzrMs7XQNYEIFkOwMjSe2BipKRKUUyrznil0p8qqsK7U8W+T7oNqZpgdnD2Q==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -2849,8 +2609,8 @@ packages: dev: true optional: true - /@esbuild/linux-loong64/0.17.18: - resolution: {integrity: sha512-bvPG+MyFs5ZlwYclCG1D744oHk1Pv7j8psF5TfYx7otCVmcJsEXgFEhQkbhNW8otDHL1a2KDINW20cfCgnzgMQ==} + /@esbuild/linux-loong64/0.18.2: + resolution: {integrity: sha512-Af1uZdB0oeJo4PW67l9aw94oakSamFxhC6ltC2eDkndozd9QygVNMTF7s7uxTLjo+BJqyVqG9wjmLCYF1o4NmA==} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -2858,17 +2618,8 @@ packages: dev: true optional: true - /@esbuild/linux-loong64/0.17.19: - resolution: {integrity: sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==} - engines: {node: '>=12'} - cpu: [loong64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-mips64el/0.17.18: - resolution: {integrity: sha512-oVqckATOAGuiUOa6wr8TXaVPSa+6IwVJrGidmNZS1cZVx0HqkTMkqFGD2HIx9H1RvOwFeWYdaYbdY6B89KUMxA==} + /@esbuild/linux-mips64el/0.18.2: + resolution: {integrity: sha512-WcTbt61+9dREuOFKXac4Qg+3OuRhLxPL9lmkI2P7fGuq/fWS2qq+AvGGVLMyk+OtXGDjyQolcEDeYlRoOmjRYQ==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -2876,17 +2627,8 @@ packages: dev: true optional: true - /@esbuild/linux-mips64el/0.17.19: - resolution: {integrity: sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==} - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-ppc64/0.17.18: - resolution: {integrity: sha512-3dLlQO+b/LnQNxgH4l9rqa2/IwRJVN9u/bK63FhOPB4xqiRqlQAU0qDU3JJuf0BmaH0yytTBdoSBHrb2jqc5qQ==} + /@esbuild/linux-ppc64/0.18.2: + resolution: {integrity: sha512-Ov+VHayvCPb52axma6+xm8QDawRjwHscPXedHg4U92DxlhKQ0H+6onRiC3J9kKI50p8pKKypprpCWrRrXjZN7Q==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -2894,26 +2636,8 @@ packages: dev: true optional: true - /@esbuild/linux-ppc64/0.17.19: - resolution: {integrity: sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-riscv64/0.17.18: - resolution: {integrity: sha512-/x7leOyDPjZV3TcsdfrSI107zItVnsX1q2nho7hbbQoKnmoeUWjs+08rKKt4AUXju7+3aRZSsKrJtaRmsdL1xA==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-riscv64/0.17.19: - resolution: {integrity: sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==} + /@esbuild/linux-riscv64/0.18.2: + resolution: {integrity: sha512-qW37zzKKN9C5l5LnVDriOK0eZRzQeixhtrfd5C78PAsTE15GeHU9G0oyT/u/IkNjEBjXWpTZOOHKNbjhrvuL9g==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -2921,8 +2645,8 @@ packages: dev: true optional: true - /@esbuild/linux-s390x/0.17.18: - resolution: {integrity: sha512-cX0I8Q9xQkL/6F5zWdYmVf5JSQt+ZfZD2bJudZrWD+4mnUvoZ3TDDXtDX2mUaq6upMFv9FlfIh4Gfun0tbGzuw==} + /@esbuild/linux-s390x/0.18.2: + resolution: {integrity: sha512-izzEFMRO8LaQIlX22+fTgP5I7Os3T51mtAWsRNpZ5pMfQIa9PqtgFAoRcb10DV+/YkH/TMMxQIlevUvDS6E4vw==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -2930,26 +2654,8 @@ packages: dev: true optional: true - /@esbuild/linux-s390x/0.17.19: - resolution: {integrity: sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==} - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-x64/0.17.18: - resolution: {integrity: sha512-66RmRsPlYy4jFl0vG80GcNRdirx4nVWAzJmXkevgphP1qf4dsLQCpSKGM3DUQCojwU1hnepI63gNZdrr02wHUA==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-x64/0.17.19: - resolution: {integrity: sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==} + /@esbuild/linux-x64/0.18.2: + resolution: {integrity: sha512-y5yqQ1ww4FfI9bQ1ZP/0k1rcgA6Ql2/AgzvqpowN0Q5tXDZkCavPdJbFXKrqA43vd1UTXt+AutTHYJ7km6e2Eg==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -2957,8 +2663,8 @@ packages: dev: true optional: true - /@esbuild/netbsd-x64/0.17.18: - resolution: {integrity: sha512-95IRY7mI2yrkLlTLb1gpDxdC5WLC5mZDi+kA9dmM5XAGxCME0F8i4bYH4jZreaJ6lIZ0B8hTrweqG1fUyW7jbg==} + /@esbuild/netbsd-x64/0.18.2: + resolution: {integrity: sha512-usNjpKFf83X4o60gdMD47NCblaSZ6DARf31/FyCzxOgnF80mJ+RhDs9RTqgyfH8KyduO5mjgInw9+ct286ayYA==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -2966,17 +2672,8 @@ packages: dev: true optional: true - /@esbuild/netbsd-x64/0.17.19: - resolution: {integrity: sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==} - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - requiresBuild: true - dev: true - optional: true - - /@esbuild/openbsd-x64/0.17.18: - resolution: {integrity: sha512-WevVOgcng+8hSZ4Q3BKL3n1xTv5H6Nb53cBrtzzEjDbbnOmucEVcZeGCsCOi9bAOcDYEeBZbD2SJNBxlfP3qiA==} + /@esbuild/openbsd-x64/0.18.2: + resolution: {integrity: sha512-6urzy1+VwcPuhG+5jwHA8lD9E87E5+ey3qKw2EhRS+qUmMxLvfwP8szWC2JHVGZDPEDge6fgn0pBj+y9rxDLwQ==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -2984,17 +2681,8 @@ packages: dev: true optional: true - /@esbuild/openbsd-x64/0.17.19: - resolution: {integrity: sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==} - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - requiresBuild: true - dev: true - optional: true - - /@esbuild/sunos-x64/0.17.18: - resolution: {integrity: sha512-Rzf4QfQagnwhQXVBS3BYUlxmEbcV7MY+BH5vfDZekU5eYpcffHSyjU8T0xucKVuOcdCsMo+Ur5wmgQJH2GfNrg==} + /@esbuild/sunos-x64/0.18.2: + resolution: {integrity: sha512-SMZPTACsvpKYAIl9o8nhnmMn6/lp62iMeV/2EBMtj+sW6dXwW9b0cLjihkBv4PG1CCRlwWKPZo43imqZxC95ZA==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -3002,17 +2690,8 @@ packages: dev: true optional: true - /@esbuild/sunos-x64/0.17.19: - resolution: {integrity: sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - requiresBuild: true - dev: true - optional: true - - /@esbuild/win32-arm64/0.17.18: - resolution: {integrity: sha512-Kb3Ko/KKaWhjeAm2YoT/cNZaHaD1Yk/pa3FTsmqo9uFh1D1Rfco7BBLIPdDOozrObj2sahslFuAQGvWbgWldAg==} + /@esbuild/win32-arm64/0.18.2: + resolution: {integrity: sha512-H2zzjPdzSDNwUnZdZf9/xfm0CYqHFXuenCMAx+tRzIRqWUT6MmZ9/q7722KnAZ6uPpq0RLs7EjCIIfmt6CaRGg==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -3020,26 +2699,8 @@ packages: dev: true optional: true - /@esbuild/win32-arm64/0.17.19: - resolution: {integrity: sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@esbuild/win32-ia32/0.17.18: - resolution: {integrity: sha512-0/xUMIdkVHwkvxfbd5+lfG7mHOf2FRrxNbPiKWg9C4fFrB8H0guClmaM3BFiRUYrznVoyxTIyC/Ou2B7QQSwmw==} - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@esbuild/win32-ia32/0.17.19: - resolution: {integrity: sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==} + /@esbuild/win32-ia32/0.18.2: + resolution: {integrity: sha512-lfyjTN+FrKgvNvrH7nOLtaz58J/8coZOo4LQwgBMP4D7ZOurhvluXS3GjePLzq9GbWnJDZdKCKbMKhZPPcdJJA==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -3047,17 +2708,8 @@ packages: dev: true optional: true - /@esbuild/win32-x64/0.17.18: - resolution: {integrity: sha512-qU25Ma1I3NqTSHJUOKi9sAH1/Mzuvlke0ioMJRthLXKm7JiSKVwFghlGbDLOO2sARECGhja4xYfRAZNPAkooYg==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@esbuild/win32-x64/0.17.19: - resolution: {integrity: sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==} + /@esbuild/win32-x64/0.18.2: + resolution: {integrity: sha512-Q4nIjqWXjxkELwd7kVepsJxbQ/6ERNsHpjz1j+IKjwSYw+g06U0RQOy5xh848AHvgr9itnGLa3cT2G5t0dBFsw==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -3065,13 +2717,13 @@ packages: dev: true optional: true - /@eslint-community/eslint-utils/4.4.0_eslint@8.41.0: + /@eslint-community/eslint-utils/4.4.0_eslint@8.43.0: resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.41.0 + eslint: 8.43.0 eslint-visitor-keys: 3.4.1 dev: true @@ -3097,20 +2749,20 @@ packages: - supports-color dev: true - /@eslint/js/8.41.0: - resolution: {integrity: sha512-LxcyMGxwmTh2lY9FwHPGWOHmYFCZvbrFCBZL4FzSSsxsRPuhrYUg/49/0KDfW8tnIEaEHtfmn6+NPN+1DqaNmA==} + /@eslint/js/8.43.0: + resolution: {integrity: sha512-s2UHCoiXfxMvmfzqoN+vrQ84ahUSYde9qNO1MdxmoEhyHWsfmwOpFlwYV+ePJEVc7gFnATGUi376WowX1N7tFg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@faker-js/faker/8.0.1: - resolution: {integrity: sha512-kbh5MenpTN9U0B4QcOI1NoTPlZHniSYQ3BHbhAnPjJGAmmFqxoxTE4sGdpy7ZOO9038DPGCuhXyMkjOr05uVwA==} + /@faker-js/faker/8.0.2: + resolution: {integrity: sha512-Uo3pGspElQW91PCvKSIAXoEgAUlRnH29sX2/p89kg7sP1m2PzCufHINd0FhTXQf6DYGiUlVncdSPa2F9wxed2A==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0, npm: '>=6.14.13'} dev: true - /@fast-check/jest/1.6.2_@jest+globals@29.5.0: - resolution: {integrity: sha512-NaIgmKsnVmlsmIAscJaxyo4ETgtrASGkiki6ZRNQGL3xXgTacZ2zZXViH8Ba/vKJcoZqu+e5+Lc4sUECTSFm4A==} + /@fast-check/jest/1.7.0_@jest+globals@29.5.0: + resolution: {integrity: sha512-I2uDrfp+1J1bsIFr/wpnEfWw15s2lMOxc33v2jZ64bYZqeI/BOwl+1IFO1JXA9fQyYnAFie7v3xlMtCL4OLbGw==} peerDependencies: - '@fast-check/worker': ~0.0.1 + '@fast-check/worker': ~0.0.7 '@jest/expect': '>=28.0.0' '@jest/globals': '>=25.5.2' peerDependenciesMeta: @@ -3127,8 +2779,8 @@ packages: resolution: {integrity: sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==} dev: true - /@humanwhocodes/config-array/0.11.8: - resolution: {integrity: sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==} + /@humanwhocodes/config-array/0.11.10: + resolution: {integrity: sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==} engines: {node: '>=10.10.0'} dependencies: '@humanwhocodes/object-schema': 1.2.1 @@ -3184,7 +2836,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.5.0 - '@types/node': 18.16.14 + '@types/node': 18.16.18 chalk: 4.1.2 jest-message-util: 29.5.0 jest-util: 29.5.0 @@ -3205,14 +2857,14 @@ packages: '@jest/test-result': 29.5.0 '@jest/transform': 29.5.0 '@jest/types': 29.5.0 - '@types/node': 18.16.14 + '@types/node': 18.16.18 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.8.0 exit: 0.1.2 graceful-fs: 4.2.10 jest-changed-files: 29.5.0 - jest-config: 29.5.0_@types+node@18.16.14 + jest-config: 29.5.0_@types+node@18.16.18 jest-haste-map: 29.5.0 jest-message-util: 29.5.0 jest-regex-util: 29.4.3 @@ -3247,14 +2899,14 @@ packages: '@jest/test-result': 29.5.0 '@jest/transform': 29.5.0 '@jest/types': 29.5.0 - '@types/node': 18.16.14 + '@types/node': 18.16.18 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.8.0 exit: 0.1.2 graceful-fs: 4.2.10 jest-changed-files: 29.5.0 - jest-config: 29.5.0_daglcptrsglylliibnnp676h3i + jest-config: 29.5.0_5qsgjhhli643kzzyel6mobhisq jest-haste-map: 29.5.0 jest-message-util: 29.5.0 jest-regex-util: 29.4.3 @@ -3295,7 +2947,7 @@ packages: dependencies: '@jest/fake-timers': 29.5.0 '@jest/types': 29.5.0 - '@types/node': 18.16.14 + '@types/node': 18.16.18 jest-mock: 29.5.0 dev: true @@ -3322,7 +2974,7 @@ packages: dependencies: '@jest/types': 29.5.0 '@sinonjs/fake-timers': 10.0.2 - '@types/node': 18.16.14 + '@types/node': 18.16.18 jest-message-util: 29.5.0 jest-mock: 29.5.0 jest-util: 29.5.0 @@ -3355,7 +3007,7 @@ packages: '@jest/transform': 29.5.0 '@jest/types': 29.5.0 '@jridgewell/trace-mapping': 0.3.17 - '@types/node': 18.16.14 + '@types/node': 18.16.18 chalk: 4.1.2 collect-v8-coverage: 1.0.1 exit: 0.1.2 @@ -3442,7 +3094,7 @@ packages: dependencies: '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 18.16.14 + '@types/node': 18.16.18 '@types/yargs': 16.0.4 chalk: 4.1.2 dev: true @@ -3454,7 +3106,7 @@ packages: '@jest/schemas': 29.4.3 '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 18.16.14 + '@types/node': 18.16.18 '@types/yargs': 17.0.13 chalk: 4.1.2 dev: true @@ -3514,16 +3166,6 @@ packages: /@js-joda/core/5.4.2: resolution: {integrity: sha512-QIDIZ9a0NfDStgD47VaTgwiPjlw1p4QPLwjOB/9+/DqIztoQopPNNAd+HdtQMHgE+ibP3dJacd8/TVL/A1RaaA==} - /@jsdevtools/ez-spawn/3.0.4: - resolution: {integrity: sha512-f5DRIOZf7wxogefH03RjMPMdBF7ADTWUMoOs9kaJo06EfwF+aFhMZMDZxHg/Xe12hptN9xoZjGso2fdjapBRIA==} - engines: {node: '>=10'} - dependencies: - call-me-maybe: 1.0.2 - cross-spawn: 7.0.3 - string-argv: 0.3.1 - type-detect: 4.0.8 - dev: true - /@mapbox/node-pre-gyp/1.0.10: resolution: {integrity: sha512-4ySo4CjzStuprMwk35H5pPbkymjv1SF3jGLj6rAHp/xT/RF7TL7bd9CTm1xDY49K2qF7jmR/g7k+SkLETP6opA==} hasBin: true @@ -3531,7 +3173,7 @@ packages: detect-libc: 2.0.1 https-proxy-agent: 5.0.1 make-dir: 3.1.0 - node-fetch: 2.6.11 + node-fetch: 2.6.11_oawau75ow7jz373yzwkw5fs4ry nopt: 5.0.0 npmlog: 5.0.1 rimraf: 3.0.2 @@ -3542,26 +3184,26 @@ packages: - supports-color dev: true - /@microsoft/api-extractor-model/7.27.0_@types+node@18.16.14: - resolution: {integrity: sha512-wHqIMiwSARmiuVLn/zmVpiRncq6hvBfC5GF+sjrN3w4FqVkqFYk7DetvfRNdy/3URdqqmYGrhJlcU9HpLnHOPg==} + /@microsoft/api-extractor-model/7.27.3_@types+node@18.16.16: + resolution: {integrity: sha512-fSFvw7otYHduOkyshjTbapKKgwF8bgquVHvgF8VgeKtMYvqXkoaj7W6VcM7PNY7E2bbblhUgC4XNdqZLD4SJGw==} dependencies: '@microsoft/tsdoc': 0.14.2 '@microsoft/tsdoc-config': 0.16.2 - '@rushstack/node-core-library': 3.59.1_@types+node@18.16.14 + '@rushstack/node-core-library': 3.59.4_@types+node@18.16.16 transitivePeerDependencies: - '@types/node' dev: true - /@microsoft/api-extractor/7.35.0_@types+node@18.16.14: - resolution: {integrity: sha512-yBGfPJeEtzk8sg2hE2/vOPRvnJBvstbWNGeyGV1jIEUSgytzQ0QPgPEkOsP2n7nBfnyRXmZaBa2vJPGOzVWy+g==} + /@microsoft/api-extractor/7.36.0_@types+node@18.16.16: + resolution: {integrity: sha512-P+kYgJFDXIr+UNzhRMhlpM/dderi6ab4lxn35vdhfAIMPtGCSXIJxrrtpTOQmQW8CZtmoZX06LYoUsKCc1zjow==} hasBin: true dependencies: - '@microsoft/api-extractor-model': 7.27.0_@types+node@18.16.14 + '@microsoft/api-extractor-model': 7.27.3_@types+node@18.16.16 '@microsoft/tsdoc': 0.14.2 '@microsoft/tsdoc-config': 0.16.2 - '@rushstack/node-core-library': 3.59.1_@types+node@18.16.14 - '@rushstack/rig-package': 0.3.19 - '@rushstack/ts-command-line': 4.13.3 + '@rushstack/node-core-library': 3.59.4_@types+node@18.16.16 + '@rushstack/rig-package': 0.4.0 + '@rushstack/ts-command-line': 4.15.1 colors: 1.2.5 lodash: 4.17.21 resolve: 1.22.2 @@ -3899,7 +3541,7 @@ packages: '@octokit/request-error': 2.1.0 '@octokit/types': 6.41.0 is-plain-object: 5.0.0 - node-fetch: 2.6.11 + node-fetch: 2.6.11_oawau75ow7jz373yzwkw5fs4ry universal-user-agent: 6.0.0 transitivePeerDependencies: - encoding @@ -3989,16 +3631,8 @@ packages: dev: true optional: true - /@posva/prompts/2.4.4: - resolution: {integrity: sha512-8aPwklhbSV2VN/NQMBNFkuo8+hlJVdcFRXp4NCIfdcahh3qNEcaSoD8qXjru0OlN1sONJ7le7p6+YUbALaG6Mg==} - engines: {node: '>= 14'} - dependencies: - kleur: 4.1.5 - sisteransi: 1.0.5 - dev: true - - /@prisma/engines-version/4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944: - resolution: {integrity: sha512-sVOig4tjGxxlYaFcXgE71f/rtFhzyYrfyfNFUsxCIEJyVKU9rdOWIlIwQ2NQ7PntvGnn+x0XuFo4OC1jvPJKzg==} + /@prisma/engines-version/4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309: + resolution: {integrity: sha512-5V+AOhWmEsf0pQ6n6hMe6Dr1EQ4LD9Hi9GtNaJ3jq4bX1spsQbXOz0dchjZvYyKHgOzb41kxk2951moenBTGKA==} /@prisma/mini-proxy/0.7.0: resolution: {integrity: sha512-rax49DeUqAQJgzw2vMkT90zAKfhQq21RAjWYr3RyunkmQ78gKM29E+IpV6R0xs7zgjax283fp8I2oIl50jHn8Q==} @@ -4006,19 +3640,19 @@ packages: hasBin: true dev: true - /@prisma/prisma-fmt-wasm/4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944: - resolution: {integrity: sha512-1vuW5Cp6DnZpSmmM3dRsJ7do3LncJVkBAV9wwqGSLANDUNWDPfJwC7enN/YY3rnwkEVXMxzkTEbtYGA55blDLw==} + /@prisma/prisma-fmt-wasm/4.17.0-1.46285f314e200f5f1afc2baea86e3e40ff7fb309: + resolution: {integrity: sha512-TePgKwrR//d9IZi1He11pfWdwDob9+LoNcttf2qmEmtYzNXX0uqdYqaCSr2ANPZBNOyZw2mq/YmWLX5jrHuG8A==} dev: false - /@prisma/studio-common/0.484.0: - resolution: {integrity: sha512-pdSgZ6Qq64MQntMbWRH0kJo76YBCXkVB32zaVykomS6fAFD+dDlrpFAooNyKC5WS5XDOzraE7nBXdzVKxLhf3w==} + /@prisma/studio-common/0.487.0: + resolution: {integrity: sha512-BCmiuDwFJe7kqZr0oG99Yr80iKTD7fIKdFUmFXoySg2TJ7qaTsp+TIxbghYFAmC0CQpuxgVQVYgsX8Xl/z2cCw==} engines: {node: '>= 12'} dependencies: buffer: 6.0.3 dev: true - /@prisma/studio-pcw/0.484.0_af2arurw4njyhq5wa6w6rrkc54: - resolution: {integrity: sha512-Gnyhcaa0KoM8WcntSbzF/aS4cXAGSBnSizMNhNWituEUt50Q4tS7Oxm/YZyBRXPxXqxeTTgDfm3M8GITPzaCTQ==} + /@prisma/studio-pcw/0.487.0_af2arurw4njyhq5wa6w6rrkc54: + resolution: {integrity: sha512-tIohMQEo2Ud5VfVsRLrb5xOyO4nvJ45USFXG54H4a8sei+Ur23Mkr/V63YY0FhzbQJyj+HIUcQivBxqkjBRSwQ==} engines: {node: '>= 12'} peerDependencies: '@prisma/client': '*' @@ -4032,17 +3666,17 @@ packages: - supports-color dev: true - /@prisma/studio-server/0.484.0_af2arurw4njyhq5wa6w6rrkc54: - resolution: {integrity: sha512-WRI/XFXU5gElbqFFajzRfqgFivLL2T10j6YsSA4k/u3frgDwhXVhWibWxinRDn1N2rmTlN9DFQYZL0+8fryKLg==} + /@prisma/studio-server/0.487.0_af2arurw4njyhq5wa6w6rrkc54: + resolution: {integrity: sha512-jpig93ZvRak7Br+JF6UoGGbtPV2x3taQE8zmmu9HP/e/0087GSysJZiv1xFZGMAas5A87clJIeA5slEbmK4Tzw==} engines: {node: '>= 12'} peerDependencies: '@prisma/internals': '*' dependencies: '@prisma/internals': link:packages/internals - '@prisma/studio': 0.484.0 - '@prisma/studio-common': 0.484.0 - '@prisma/studio-pcw': 0.484.0_af2arurw4njyhq5wa6w6rrkc54 - checkpoint-client: 1.1.23 + '@prisma/studio': 0.487.0 + '@prisma/studio-common': 0.487.0 + '@prisma/studio-pcw': 0.487.0_af2arurw4njyhq5wa6w6rrkc54 + checkpoint-client: 1.1.24 cors: 2.8.5 debug: 4.3.3 express: 4.17.2 @@ -4053,110 +3687,19 @@ packages: - supports-color dev: true - /@prisma/studio/0.484.0: - resolution: {integrity: sha512-qxNh1oo67PygVWVvzDL0wIfEtMzZgMv3YuePcR9gT8xXcUV7p1fE+ZBfL2VTXIPtVf8/v3Pte7dAC0bAFx4EQA==} - dev: true - - /@rollup/plugin-alias/4.0.4_rollup@3.21.3: - resolution: {integrity: sha512-0CaAY238SMtYAWEXXptWSR8iz8NYZnH7zNBKuJ14xFJSGwLtPgjvXYsoApAHfzYXXH1ejxpVw7WlHss3zhh9SQ==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - rollup: 3.21.3 - slash: 4.0.0 - dev: true - - /@rollup/plugin-commonjs/24.1.0_rollup@3.21.3: - resolution: {integrity: sha512-eSL45hjhCWI0jCCXcNtLVqM5N1JlBGvlFfY0m6oOYnLCJ6N0qEXoZql4sY2MOUArzhH4SA/qBpTxvvZp2Sc+DQ==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^2.68.0||^3.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@rollup/pluginutils': 5.0.2_rollup@3.21.3 - commondir: 1.0.1 - estree-walker: 2.0.2 - glob: 8.1.0 - is-reference: 1.2.1 - magic-string: 0.27.0 - rollup: 3.21.3 - dev: true - - /@rollup/plugin-json/6.0.0_rollup@3.21.3: - resolution: {integrity: sha512-i/4C5Jrdr1XUarRhVu27EEwjt4GObltD7c+MkCIpO2QIbojw8MUs+CCTqOphQi3Qtg1FLmYt+l+6YeoIf51J7w==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@rollup/pluginutils': 5.0.2_rollup@3.21.3 - rollup: 3.21.3 - dev: true - - /@rollup/plugin-node-resolve/15.0.2_rollup@3.21.3: - resolution: {integrity: sha512-Y35fRGUjC3FaurG722uhUuG8YHOJRJQbI6/CkbRkdPotSpDj9NtIN85z1zrcyDcCQIW4qp5mgG72U+gJ0TAFEg==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^2.78.0||^3.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@rollup/pluginutils': 5.0.2_rollup@3.21.3 - '@types/resolve': 1.20.2 - deepmerge: 4.2.2 - is-builtin-module: 3.2.1 - is-module: 1.0.0 - resolve: 1.22.2 - rollup: 3.21.3 - dev: true - - /@rollup/plugin-replace/5.0.2_rollup@3.21.3: - resolution: {integrity: sha512-M9YXNekv/C/iHHK+cvORzfRYfPbq0RDD8r0G+bMiTXjNGKulPnCT9O3Ss46WfhI6ZOCgApOP7xAdmCQJ+U2LAA==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@rollup/pluginutils': 5.0.2_rollup@3.21.3 - magic-string: 0.27.0 - rollup: 3.21.3 - dev: true - - /@rollup/pluginutils/5.0.2_rollup@3.21.3: - resolution: {integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@types/estree': 1.0.0 - estree-walker: 2.0.2 - picomatch: 2.3.1 - rollup: 3.21.3 + /@prisma/studio/0.487.0: + resolution: {integrity: sha512-ESkcAgT1UGlTnGlQlostXAoS2N3VmMKKhKWQYWs0WtfBPzkM2xf2aPX6Io8tpWC/Qx4VDPmltugwRhL6BKHL9w==} dev: true - /@rushstack/node-core-library/3.59.1_@types+node@18.16.14: - resolution: {integrity: sha512-iy/xaEhXGpX+DY1ZzAtNA+QPw+9+TJh773Im+JxG4R1fu00/vWq470UOEj6upxlUxmp0JxhnmNRxzfptHrn/Uw==} + /@rushstack/node-core-library/3.59.4_@types+node@18.16.16: + resolution: {integrity: sha512-YAKJDC6Mz/KA1D7bvB88WaRX3knt/ZuLzkRu5G9QADGSjLtvTWzCNCytRF2PCSaaHOZaZsWul4F1KQdgFgUDqA==} peerDependencies: '@types/node': '*' peerDependenciesMeta: '@types/node': optional: true dependencies: - '@types/node': 18.16.14 + '@types/node': 18.16.16 colors: 1.2.5 fs-extra: 7.0.1 import-lazy: 4.0.0 @@ -4166,15 +3709,15 @@ packages: z-schema: 5.0.5 dev: true - /@rushstack/rig-package/0.3.19: - resolution: {integrity: sha512-2d0/Gn+qjOYneZbiHjn4SjyDwq9I0WagV37z0F1V71G+yONgH7wlt3K/UoNiDkhA8gTHYPRo2jz3CvttybwSag==} + /@rushstack/rig-package/0.4.0: + resolution: {integrity: sha512-FnM1TQLJYwSiurP6aYSnansprK5l8WUK8VG38CmAaZs29ZeL1msjK0AP1VS4ejD33G0kE/2cpsPsS9jDenBMxw==} dependencies: resolve: 1.22.2 strip-json-comments: 3.1.1 dev: true - /@rushstack/ts-command-line/4.13.3: - resolution: {integrity: sha512-6aQIv/o1EgsC/+SpgUyRmzg2QIAL6sudEzw3sWzJKwWuQTc5XRsyZpyldfE7WAmIqMXDao9QG35/NYORjHm5Zw==} + /@rushstack/ts-command-line/4.15.1: + resolution: {integrity: sha512-EL4jxZe5fhb1uVL/P/wQO+Z8Rc8FMiWJ1G7VgnPDvdIt5GVjRfK7vwzder1CZQiX3x0PY6uxENYLNGTFd1InRQ==} dependencies: '@types/argparse': 1.0.38 argparse: 1.0.10 @@ -4242,47 +3785,47 @@ packages: engines: {node: '>= 12.13.0', npm: '>= 6.12.0'} dependencies: '@slack/types': 1.10.0 - '@types/node': 18.16.14 + '@types/node': 18.16.18 axios: 0.21.4 transitivePeerDependencies: - debug dev: true - /@smithy/protocol-http/1.0.1: - resolution: {integrity: sha512-9OrEn0WfOVtBNYJUjUAn9AOiJ4lzERCJJ/JeZs8E6yajTGxBaFRxUnNBHiNqoDJVg076hY36UmEnPx7xXrvUSg==} + /@smithy/protocol-http/1.1.0: + resolution: {integrity: sha512-H5y/kZOqfJSqRkwtcAoVbqONmhdXwSgYNJ1Glk5Ry8qlhVVy5qUzD9EklaCH8/XLnoCsLO/F/Giee8MIvaBRkg==} engines: {node: '>=14.0.0'} dependencies: - '@smithy/types': 1.0.0 + '@smithy/types': 1.1.0 tslib: 2.5.0 dev: false optional: true - /@smithy/types/1.0.0: - resolution: {integrity: sha512-kc1m5wPBHQCTixwuaOh9vnak/iJm21DrSf9UK6yDE5S3mQQ4u11pqAUiKWnlrZnYkeLfAI9UEHj9OaMT1v5Umg==} + /@smithy/types/1.1.0: + resolution: {integrity: sha512-KzmvisMmuwD2jZXuC9e65JrgsZM97y5NpDU7g347oB+Q+xQLU6hQZ5zFNNbEfwwOJHoOvEVTna+dk1h/lW7alw==} engines: {node: '>=14.0.0'} dependencies: tslib: 2.5.0 dev: false optional: true - /@swc-node/core/1.10.3_@swc+core@1.3.32: + /@swc-node/core/1.10.3_@swc+core@1.3.64: resolution: {integrity: sha512-8rpv1DXzsQjN/C8ZXuaTSmJ4M/lRr6geUlbOQ861DLC+sKWcEEvxRjK9cXQ28GserHuEcFDA3wlF9rD1YD0x+Q==} engines: {node: '>= 10'} peerDependencies: '@swc/core': '>= 1.3' dependencies: - '@swc/core': 1.3.32 + '@swc/core': 1.3.64 dev: true - /@swc-node/register/1.6.5_ofrkegp7wplvaewrpezjkk4xzm: + /@swc-node/register/1.6.5_w2a3vrbasjgrtv5bvwiyhpfbku: resolution: {integrity: sha512-yMxXlzthI0aMadYYKDhx7xvtjljB1qoD8Tv0djqSJ1ttTkoDxg6MhG5A5pIahiUT2neVrkWb9lCavoUwXAe/zQ==} peerDependencies: '@swc/core': '>= 1.3' typescript: '>= 4.3' dependencies: - '@swc-node/core': 1.10.3_@swc+core@1.3.32 + '@swc-node/core': 1.10.3_@swc+core@1.3.64 '@swc-node/sourcemap-support': 0.3.0 - '@swc/core': 1.3.32 + '@swc/core': 1.3.64 colorette: 2.0.19 debug: 4.3.4 pirates: 4.0.5 @@ -4326,8 +3869,8 @@ packages: dev: true optional: true - /@swc/core-darwin-arm64/1.3.32: - resolution: {integrity: sha512-o19bhlxuUgjUElm6i+QhXgZ0vD6BebiB/gQpK3en5aAwhOvinwr4sah3GqFXsQzz/prKVDuMkj9SW6F/Ug5hgg==} + /@swc/core-darwin-arm64/1.3.63: + resolution: {integrity: sha512-lNR0BgG0/6dGpGP+AyFZoZ3YBhZN5GzvgAUzwy4skqn5sKZ7duQD02CNq1lIy7Im5BzgMUcJ+/Z7z/YUlqBK+Q==} engines: {node: '>=10'} cpu: [arm64] os: [darwin] @@ -4335,8 +3878,8 @@ packages: dev: true optional: true - /@swc/core-darwin-arm64/1.3.59: - resolution: {integrity: sha512-AnqWFBgEKHP0jb4iZqx7eVQT9/rX45+DE4Ox7GpwCahUKxxrsDLyXzKhwLwQuAjUvtu5JcSB77szKpPGDM49fQ==} + /@swc/core-darwin-arm64/1.3.64: + resolution: {integrity: sha512-gSPld6wxZBZoEvZXWmNfd+eJGlGvrEXmhMBCUwSccpuMa0KqK7F6AAZVu7kFkmlXPq2kS8owjk6/VXnVBmm5Vw==} engines: {node: '>=10'} cpu: [arm64] os: [darwin] @@ -4353,8 +3896,8 @@ packages: dev: true optional: true - /@swc/core-darwin-x64/1.3.32: - resolution: {integrity: sha512-hVEGd+v5Afh+YekGADOGKwhuS4/AXk91nLuk7pmhWkk8ceQ1cfmah90kXjIXUlCe2G172MLRfHNWlZxr29E/Og==} + /@swc/core-darwin-x64/1.3.63: + resolution: {integrity: sha512-1lydnc+LgSD0gwD1axW3+Y1htKZZRn33aJF4ITd6hsA9Y2eIhdMVxgx6peXp8wWzoRBXy5GEMTnd7704oya4zw==} engines: {node: '>=10'} cpu: [x64] os: [darwin] @@ -4362,8 +3905,8 @@ packages: dev: true optional: true - /@swc/core-darwin-x64/1.3.59: - resolution: {integrity: sha512-iqDs+yii9mOsmpJez82SEi4d4prWDRlapHxKnDVJ0x1AqRo41vIq8t3fujrvCHYU5VQgOYGh4ooXQpaP2H3B2A==} + /@swc/core-darwin-x64/1.3.64: + resolution: {integrity: sha512-SJd1pr+U2pz5ZVv5BL36CN879Pn1V0014uVNlB+6yNh3e8T0fjUbtRJcbFiBB+OeYuJ1UNUeslaRJtKJNtMH7A==} engines: {node: '>=10'} cpu: [x64] os: [darwin] @@ -4389,8 +3932,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm-gnueabihf/1.3.32: - resolution: {integrity: sha512-5X01WqI9EbJ69oHAOGlI08YqvEIXMfT/mCJ1UWDQBb21xWRE2W1yFAAeuqOLtiagLrXjPv/UKQ0S2gyWQR5AXQ==} + /@swc/core-linux-arm-gnueabihf/1.3.63: + resolution: {integrity: sha512-cJT+XJ6f25QeAcz2ONy1i8WKP6olqOIbU5fHZKsoPqEZmLkK5NCTnmIolT0HZpH1SNkE/hHkPYGn620Domvn8g==} engines: {node: '>=10'} cpu: [arm] os: [linux] @@ -4398,8 +3941,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm-gnueabihf/1.3.59: - resolution: {integrity: sha512-PB0PP+SgkCSd/kYmltnPiGv42cOSaih1OjXCEjxvNwUFEmWqluW6uGdWaNiR1LoYMxhcHZTc336jL2+O3l6p0Q==} + /@swc/core-linux-arm-gnueabihf/1.3.64: + resolution: {integrity: sha512-XE60bZS+qO+d8IQYAayhn3TRqyzVmQeOsX2B1yUHuKZU3Zb/mt/cmD/HLzZZW7J3z19kYf2na7Hvmnt3amUGoA==} engines: {node: '>=10'} cpu: [arm] os: [linux] @@ -4416,8 +3959,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm64-gnu/1.3.32: - resolution: {integrity: sha512-PTJ6oPiutkNBg+m22bUUPa4tNuMmsgpSnsnv2wnWVOgK0lhvQT6bAPTUXDq/8peVAgR/SlpP2Ht8TRRqYMRjRQ==} + /@swc/core-linux-arm64-gnu/1.3.63: + resolution: {integrity: sha512-xtuk0v/86i0UR6G+5X6l3bgP1I1iWlEI23ad44L0FNrZ8wLLEvVzYuVoI6U5fKbp91LAsVpdWyyvSAo1sT7BWQ==} engines: {node: '>=10'} cpu: [arm64] os: [linux] @@ -4425,8 +3968,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm64-gnu/1.3.59: - resolution: {integrity: sha512-Ol/JPszWZ+OZ44FOdJe35TfJ1ckG4pYaisZJ4E7PzfwfVe2ygX85C5WWR4e5L0Y1zFvzpcI7gdyC2wzcXk4Cig==} + /@swc/core-linux-arm64-gnu/1.3.64: + resolution: {integrity: sha512-+jcUua4cYLRMqDicv+4AaTZUGgYWXkXVI9AzaAgfkMNLU2TMXwuYXopxk1giAMop88+ovzYIqrxErRdu70CgtQ==} engines: {node: '>=10'} cpu: [arm64] os: [linux] @@ -4443,8 +3986,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm64-musl/1.3.32: - resolution: {integrity: sha512-lG0VOuYNPWOCJ99Aza69cTljjeft/wuRQeYFF8d+1xCQS/OT7gnbgi7BOz39uSHIPTBqfzdIsuvzdKlp9QydrQ==} + /@swc/core-linux-arm64-musl/1.3.63: + resolution: {integrity: sha512-AIRqE/3659zt5hfZzj3i/xtJbJl1iz9FcYEGUsIqqrxouqZWNbFujQpIguX4qFI7uoM+m6p6pqLjMmArwErRxQ==} engines: {node: '>=10'} cpu: [arm64] os: [linux] @@ -4452,8 +3995,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm64-musl/1.3.59: - resolution: {integrity: sha512-PtTTtGbj9GiY5gJdoSFL2A0vL6BRaS1haAhp6g3hZvLDkTTg+rJURmzwBMMjaQlnGC62x/lLf6MoszHG/05//Q==} + /@swc/core-linux-arm64-musl/1.3.64: + resolution: {integrity: sha512-50MI8NFYUKhLncqY2piM/XOnNqZT6zY2ZoNOFsy63/T2gAYy1ts4mF4YUEkg4XOA2zhue1JSLZBUrHQXbgMYUQ==} engines: {node: '>=10'} cpu: [arm64] os: [linux] @@ -4470,8 +4013,8 @@ packages: dev: true optional: true - /@swc/core-linux-x64-gnu/1.3.32: - resolution: {integrity: sha512-ecqtSWX4NBrs7Ji2VX3fDWeqUfrbLlYqBuufAziCM27xMxwlAVgmyGQk4FYgoQ3SAUAu3XFH87+3Q7uWm2X7xg==} + /@swc/core-linux-x64-gnu/1.3.63: + resolution: {integrity: sha512-EAB5gkgDvStJofvdQU40hqEqjtSvtPs3PR0WupZtbLKWWCTWg76uTXQZEKNYx9r60Pt7sx1BAa3XnqgXjmcjDg==} engines: {node: '>=10'} cpu: [x64] os: [linux] @@ -4479,8 +4022,8 @@ packages: dev: true optional: true - /@swc/core-linux-x64-gnu/1.3.59: - resolution: {integrity: sha512-XBW9AGi0YsIN76IfesnDSBn/5sjR69J75KUNte8sH6seYlHJ0/kblqUMbUcfr0CiGoJadbzAZeKZZmfN7EsHpg==} + /@swc/core-linux-x64-gnu/1.3.64: + resolution: {integrity: sha512-bT8seQ41Q4J2JDgn2JpFCGNehGAIilAkZ476gEaKKroEWepBhkD0K1MspSSVYSJhLSGbBVSaadUEiBPxWgu1Rw==} engines: {node: '>=10'} cpu: [x64] os: [linux] @@ -4497,8 +4040,8 @@ packages: dev: true optional: true - /@swc/core-linux-x64-musl/1.3.32: - resolution: {integrity: sha512-rl3dMcUuENVkpk5NGW/LXovjK0+JFm4GWPjy4NM3Q5cPvhBpGwSeLZlR+zAw9K0fdGoIXiayRTTfENrQwwsH+g==} + /@swc/core-linux-x64-musl/1.3.63: + resolution: {integrity: sha512-8ScbtDPd8Hr1VkpzCseI5H770YgxxjTFsxinH9UtJWJBFIkdu2rEwjgz4t+lDjsc/R3JWaKt1q8Dkgzqmj+77g==} engines: {node: '>=10'} cpu: [x64] os: [linux] @@ -4506,8 +4049,8 @@ packages: dev: true optional: true - /@swc/core-linux-x64-musl/1.3.59: - resolution: {integrity: sha512-Cy5E939SdWPQ34cg6UABNO0RyEe0FuWqzZ/GLKtK11Ir4fjttVlucZiY59uQNyUVUc8T2qE0VBFCyD/zYGuHtg==} + /@swc/core-linux-x64-musl/1.3.64: + resolution: {integrity: sha512-sJgh3TXCDOEq/Au4XLAgNqy4rVcLeywQBoftnV3rcvX1/u9OCSRzgKLgYc5d1pEN5AMJV1l4u26kbGlQuZ+yRw==} engines: {node: '>=10'} cpu: [x64] os: [linux] @@ -4524,8 +4067,8 @@ packages: dev: true optional: true - /@swc/core-win32-arm64-msvc/1.3.32: - resolution: {integrity: sha512-VlybAZp8DcS66CH1LDnfp9zdwbPlnGXREtHDMHaBfK9+80AWVTg+zn0tCYz+HfcrRONqxbudwOUIPj+dwl/8jw==} + /@swc/core-win32-arm64-msvc/1.3.63: + resolution: {integrity: sha512-+41tEugXJjpK04KIb2+Xlpb1NArhIne4u0NQo+cHb6ekJoqQmgIj3uNJhQ0v+0DDMjFqbA07l0KYNMgYLBls/A==} engines: {node: '>=10'} cpu: [arm64] os: [win32] @@ -4533,8 +4076,8 @@ packages: dev: true optional: true - /@swc/core-win32-arm64-msvc/1.3.59: - resolution: {integrity: sha512-z5ZJxizRvRoSAaevRIi3YjQh74OFWEIhonSDWNdqDL7RbjEivcatYcG7OikH6s+rtPhOcwNm3PbGV2Prcgh/gg==} + /@swc/core-win32-arm64-msvc/1.3.64: + resolution: {integrity: sha512-zWIy+mAWDjtJjl4e4mmhQL7g9KbkOwcWbeoIk4C6NT4VpjnjdX1pMml/Ez2sF5J5cGBwu7B1ePfTe/kAE6G36Q==} engines: {node: '>=10'} cpu: [arm64] os: [win32] @@ -4551,8 +4094,8 @@ packages: dev: true optional: true - /@swc/core-win32-ia32-msvc/1.3.32: - resolution: {integrity: sha512-MEUMdpUFIQ+RD+K/iHhHKfu0TFNj9VXwIxT5hmPeqyboKo095CoFEFBJ0sHG04IGlnu8T9i+uE2Pi18qUEbFug==} + /@swc/core-win32-ia32-msvc/1.3.63: + resolution: {integrity: sha512-W6nPOD5k++rSmoAb0Jg0h7gyfjly8b5ld7cSnmrWKXfmjgxOqxcoqP2LlzNkamg320eqkGaD9n+UnPJDteLTBw==} engines: {node: '>=10'} cpu: [ia32] os: [win32] @@ -4560,8 +4103,8 @@ packages: dev: true optional: true - /@swc/core-win32-ia32-msvc/1.3.59: - resolution: {integrity: sha512-vxpsn+hrKAhi5YusQfB/JXUJJVX40rIRE/L49ilBEqdbH8Khkoego6AD+2vWqTdJcUHo1WiAIAEZ0rTsjyorLQ==} + /@swc/core-win32-ia32-msvc/1.3.64: + resolution: {integrity: sha512-6HMiuUeSMpTUAimb1E+gUNjy8m211oAzw+wjU8oOdA6iihWaLBz4TOhU9IaKZPPjqEcYGwqaT3tj5b5+mxde6Q==} engines: {node: '>=10'} cpu: [ia32] os: [win32] @@ -4578,8 +4121,8 @@ packages: dev: true optional: true - /@swc/core-win32-x64-msvc/1.3.32: - resolution: {integrity: sha512-DPMoneNFQco7SqmVVOUv1Vn53YmoImEfrAPMY9KrqQzgfzqNTuL2JvfxUqfAxwQ6pEKYAdyKJvZ483rIhgG9XQ==} + /@swc/core-win32-x64-msvc/1.3.63: + resolution: {integrity: sha512-MHNCF3GWtlKZL3vNhMiCrtM4gBHqAv0Iw38bLoJRagh1Q/UDNVjNzWhgngCno9NUQodMtCo6G7iTQilW7YaAQQ==} engines: {node: '>=10'} cpu: [x64] os: [win32] @@ -4587,8 +4130,8 @@ packages: dev: true optional: true - /@swc/core-win32-x64-msvc/1.3.59: - resolution: {integrity: sha512-Ris/cJbURylcLwqz4RZUUBCEGsuaIHOJsvf69W5pGKHKBryVoOTNhBKpo3Km2hoAi5qFQ/ou0trAT4hBsVPZvQ==} + /@swc/core-win32-x64-msvc/1.3.64: + resolution: {integrity: sha512-c8Al0JJfmgnO9sg6w34PICibqI4p7iXywo+wOxjY88oFwMcfV5rGaif1Fe3RqxJP/1WtUV7lYuKKZrneMXtyLA==} engines: {node: '>=10'} cpu: [x64] os: [win32] @@ -4616,25 +4159,30 @@ packages: '@swc/core-win32-x64-msvc': 1.2.204 dev: true - /@swc/core/1.3.32: - resolution: {integrity: sha512-Yx/n1j+uUkcqlJAW8IRg8Qymgkdow6NHJZPFShiR0YiaYq2sXY+JHmvh16O6GkL91Y+gTlDUS7uVgDz50czJUQ==} + /@swc/core/1.3.63: + resolution: {integrity: sha512-mNRMr0xcqkvnC1a/H7rpMtbIjq7KKy4XaW/+zj3+w9cH5g72eMo3ADNHE03zHoqPn+Ov3szzFOMHT6rgJlRxow==} engines: {node: '>=10'} requiresBuild: true + peerDependencies: + '@swc/helpers': ^0.5.0 + peerDependenciesMeta: + '@swc/helpers': + optional: true optionalDependencies: - '@swc/core-darwin-arm64': 1.3.32 - '@swc/core-darwin-x64': 1.3.32 - '@swc/core-linux-arm-gnueabihf': 1.3.32 - '@swc/core-linux-arm64-gnu': 1.3.32 - '@swc/core-linux-arm64-musl': 1.3.32 - '@swc/core-linux-x64-gnu': 1.3.32 - '@swc/core-linux-x64-musl': 1.3.32 - '@swc/core-win32-arm64-msvc': 1.3.32 - '@swc/core-win32-ia32-msvc': 1.3.32 - '@swc/core-win32-x64-msvc': 1.3.32 - dev: true - - /@swc/core/1.3.59: - resolution: {integrity: sha512-ZBw31zd2E5SXiodwGvjQdx5ZC90b2uyX/i2LeMMs8LKfXD86pfOfQac+JVrnyEKDhASXj9icgsF9NXBhaMr3Kw==} + '@swc/core-darwin-arm64': 1.3.63 + '@swc/core-darwin-x64': 1.3.63 + '@swc/core-linux-arm-gnueabihf': 1.3.63 + '@swc/core-linux-arm64-gnu': 1.3.63 + '@swc/core-linux-arm64-musl': 1.3.63 + '@swc/core-linux-x64-gnu': 1.3.63 + '@swc/core-linux-x64-musl': 1.3.63 + '@swc/core-win32-arm64-msvc': 1.3.63 + '@swc/core-win32-ia32-msvc': 1.3.63 + '@swc/core-win32-x64-msvc': 1.3.63 + dev: true + + /@swc/core/1.3.64: + resolution: {integrity: sha512-be1dk2pfjzBjFp/+p47/wvOAm7KpEtsi7hqI3ofox6pK3hBJChHgVTLVV9xqZm7CnYdyYYw3Z78hH6lrwutxXQ==} engines: {node: '>=10'} requiresBuild: true peerDependencies: @@ -4643,16 +4191,16 @@ packages: '@swc/helpers': optional: true optionalDependencies: - '@swc/core-darwin-arm64': 1.3.59 - '@swc/core-darwin-x64': 1.3.59 - '@swc/core-linux-arm-gnueabihf': 1.3.59 - '@swc/core-linux-arm64-gnu': 1.3.59 - '@swc/core-linux-arm64-musl': 1.3.59 - '@swc/core-linux-x64-gnu': 1.3.59 - '@swc/core-linux-x64-musl': 1.3.59 - '@swc/core-win32-arm64-msvc': 1.3.59 - '@swc/core-win32-ia32-msvc': 1.3.59 - '@swc/core-win32-x64-msvc': 1.3.59 + '@swc/core-darwin-arm64': 1.3.64 + '@swc/core-darwin-x64': 1.3.64 + '@swc/core-linux-arm-gnueabihf': 1.3.64 + '@swc/core-linux-arm64-gnu': 1.3.64 + '@swc/core-linux-arm64-musl': 1.3.64 + '@swc/core-linux-x64-gnu': 1.3.64 + '@swc/core-linux-x64-musl': 1.3.64 + '@swc/core-win32-arm64-msvc': 1.3.64 + '@swc/core-win32-ia32-msvc': 1.3.64 + '@swc/core-win32-x64-msvc': 1.3.64 dev: true /@swc/jest/0.2.26_@swc+core@1.2.204: @@ -4666,25 +4214,25 @@ packages: jsonc-parser: 3.2.0 dev: true - /@swc/jest/0.2.26_@swc+core@1.3.32: + /@swc/jest/0.2.26_@swc+core@1.3.63: resolution: {integrity: sha512-7lAi7q7ShTO3E5Gt1Xqf3pIhRbERxR1DUxvtVa9WKzIB+HGQ7wZP5sYx86zqnaEoKKGhmOoZ7gyW0IRu8Br5+A==} engines: {npm: '>= 7.0.0'} peerDependencies: '@swc/core': '*' dependencies: '@jest/create-cache-key-function': 27.5.1 - '@swc/core': 1.3.32 + '@swc/core': 1.3.63 jsonc-parser: 3.2.0 dev: true - /@swc/jest/0.2.26_@swc+core@1.3.59: + /@swc/jest/0.2.26_@swc+core@1.3.64: resolution: {integrity: sha512-7lAi7q7ShTO3E5Gt1Xqf3pIhRbERxR1DUxvtVa9WKzIB+HGQ7wZP5sYx86zqnaEoKKGhmOoZ7gyW0IRu8Br5+A==} engines: {npm: '>= 7.0.0'} peerDependencies: '@swc/core': '*' dependencies: '@jest/create-cache-key-function': 27.5.1 - '@swc/core': 1.3.59 + '@swc/core': 1.3.64 jsonc-parser: 3.2.0 dev: true @@ -4803,24 +4351,14 @@ packages: dependencies: '@types/http-cache-semantics': 4.0.1 '@types/keyv': 3.1.4 - '@types/node': 18.16.14 + '@types/node': 18.16.18 '@types/responselike': 1.0.0 dev: true - /@types/chai-subset/1.3.3: - resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==} - dependencies: - '@types/chai': 4.3.5 - dev: true - - /@types/chai/4.3.5: - resolution: {integrity: sha512-mEo1sAde+UCE6b2hxn332f1g1E8WfYRu6p5SvTKr2ZKC1f7gFJXk4h5PyGP9Dt6gCaG8y8XhwnXWC6Iy2cmBng==} - dev: true - /@types/cross-spawn/6.0.2: resolution: {integrity: sha512-KuwNhp3eza+Rhu8IFI5HUXRP0LIhqH5cAjubUvGXXthh4YYBuP2ntwEX+Cz8GJoZUHlKo247wPWOfA9LYEq4cw==} dependencies: - '@types/node': 18.16.14 + '@types/node': 18.16.16 dev: false /@types/debug/4.1.8: @@ -4839,7 +4377,7 @@ packages: /@types/es-aggregate-error/1.0.2: resolution: {integrity: sha512-erqUpFXksaeR2kejKnhnjZjbFxUpGZx4Z7ydNL9ie8tEhXPiZTsLeUDJ6aR1F8j5wWUAtOAQWUqkc7givBJbBA==} dependencies: - '@types/node': 18.16.14 + '@types/node': 18.16.18 /@types/eslint-scope/3.7.4: resolution: {integrity: sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==} @@ -4867,7 +4405,7 @@ packages: resolution: {integrity: sha512-MxObHvNl4A69ofaTRU8DFqvgzzv8s9yRtaPPm5gud9HDNvpB3GPQFvNuTWAI59B9huVGV5jXYJwbCsmBsOGYWA==} dependencies: '@types/jsonfile': 6.1.1 - '@types/node': 18.16.14 + '@types/node': 18.16.18 dev: true /@types/fs-extra/9.0.13: @@ -4883,36 +4421,32 @@ packages: resolution: {integrity: sha512-l6NQsDDyQUVeoTynNpC9uRvCUint/gSUXQA2euwmTuWGvPY5LSDUu6tkCtJB2SvGQlJQzLaKqcGZP4//7EDveA==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 18.16.14 + '@types/node': 18.16.18 dev: true /@types/glob/8.1.0: resolution: {integrity: sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 18.16.14 + '@types/node': 18.16.18 dev: true /@types/graceful-fs/4.1.5: resolution: {integrity: sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==} dependencies: - '@types/node': 18.16.14 + '@types/node': 18.16.18 dev: true /@types/graphviz/0.0.35: resolution: {integrity: sha512-AqGaB/5M0nMPOPVuOd3PQGS0glhJ4Fzg4CcZ4IZ1M0ezuz7OJEuz3D0xwr3qn8sdf3Xo7ZJl9qR1c5XkzrdY+w==} dependencies: - '@types/node': 18.16.14 + '@types/node': 18.16.18 dev: true /@types/http-cache-semantics/4.0.1: resolution: {integrity: sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==} dev: true - /@types/ini/1.3.31: - resolution: {integrity: sha512-8ecxxaG4AlVEM1k9+BsziMw8UsX0qy3jYI1ad/71RrDZ+rdL6aZB0wLfAuflQiDhkD5o4yJ0uPK3OSUic3fG0w==} - dev: true - /@types/inquirer/8.2.4: resolution: {integrity: sha512-Pxxx3i3AyK7vKAj3LRM/vF7ETcHKiLJ/u5CnNgbz/eYj/vB3xGAYtRxI5IKtq0hpe5iFHD22BKV3n6WHUu0k4Q==} dependencies: @@ -4935,11 +4469,11 @@ packages: '@types/istanbul-lib-report': 3.0.0 dev: true - /@types/jest/29.5.1: - resolution: {integrity: sha512-tEuVcHrpaixS36w7hpsfLBLpjtMRJUE09/MHXn923LOVojDwyC14cWcfc0rDs0VEfUyYmt/+iX1kxxp+gZMcaQ==} + /@types/jest/29.5.2: + resolution: {integrity: sha512-mSoZVJF5YzGVCk+FsDxzDuH7s+SCkzrgKZzf0Z0T2WudhBUPoF6ktoTPC4R0ZoCPCV5xUvuU6ias5NvxcBcMMg==} dependencies: - expect: 29.4.3 - pretty-format: 29.4.3 + expect: 29.5.0 + pretty-format: 29.5.0 dev: true /@types/js-levenshtein/1.1.1: @@ -4957,19 +4491,13 @@ packages: /@types/jsonfile/6.1.1: resolution: {integrity: sha512-GSgiRCVeapDN+3pqA35IkQwasaCh/0YFH5dEF6S88iDvEn901DjOeH3/QPY+XYP1DFzDZPvIvfeEgk+7br5png==} dependencies: - '@types/node': 18.16.14 + '@types/node': 18.16.18 dev: true /@types/keyv/3.1.4: resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} dependencies: - '@types/node': 18.16.14 - dev: true - - /@types/mdast/3.0.11: - resolution: {integrity: sha512-Y/uImid8aAwrEA24/1tcRZwpxX3pIFTSilcNDKSPn+Y2iDywSEachzRuvgAYYLR3wpGXAsMbv5lvKLDZLeYPAw==} - dependencies: - '@types/unist': 2.0.6 + '@types/node': 18.16.18 dev: true /@types/mem-fs-editor/7.0.2: @@ -4979,14 +4507,14 @@ packages: '@types/glob': 8.1.0 '@types/json-schema': 7.0.11 '@types/mem-fs': 1.1.2 - '@types/node': 18.16.14 + '@types/node': 18.16.18 '@types/vinyl': 2.0.6 dev: true /@types/mem-fs/1.1.2: resolution: {integrity: sha512-tt+4IoDO8/wmtaP2bHnB91c8AnzYtR9MK6NxfcZY9E3XgtmzOiFMeSXu3EZrBeevd0nJ87iGoUiFDGsb9QUvew==} dependencies: - '@types/node': 18.16.14 + '@types/node': 18.16.18 '@types/vinyl': 2.0.6 dev: true @@ -5008,7 +4536,7 @@ packages: /@types/mssql/8.1.2: resolution: {integrity: sha512-hoDM+mZUClfXu0J1pyVdbhv2Ve0dl0TdagAE3M5rd1slqoVEEHuNObPD+giwtJgyo99CcS58qbF9ektVKdxSfQ==} dependencies: - '@types/node': 18.16.14 + '@types/node': 18.16.16 '@types/tedious': 4.0.9 tarn: 3.0.2 dev: true @@ -5016,7 +4544,7 @@ packages: /@types/node-fetch/2.6.4: resolution: {integrity: sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg==} dependencies: - '@types/node': 18.16.14 + '@types/node': 18.16.16 form-data: 3.0.1 dev: true @@ -5035,16 +4563,19 @@ packages: resolution: {integrity: sha512-3JRwhbjI+cHLAkUorhf8RnqUbFXajvzX4q6fMn5JwkgtuwfYtRQYI3u4V92vI6NJuTsbBQWWh3RZjFsuevyMGQ==} dev: true - /@types/node/18.16.14: - resolution: {integrity: sha512-+ImzUB3mw2c5ISJUq0punjDilUQ5GnUim0ZRvchHIWJmOC0G+p0kzhXBqj6cDjK0QdPFwzrHWgrJp3RPvCG5qg==} + /@types/node/18.16.16: + resolution: {integrity: sha512-NpaM49IGQQAUlBhHMF82QH80J08os4ZmyF9MkpCzWAGuOHqE4gTEbhzd7L3l5LmWuZ6E0OiC1FweQ4tsiW35+g==} + + /@types/node/18.16.18: + resolution: {integrity: sha512-/aNaQZD0+iSBAGnvvN2Cx92HqE5sZCPZtx2TsK+4nvV23fFe09jVDvpArXr2j9DnYlzuU9WuoykDDc6wqvpNcw==} /@types/normalize-package-data/2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} - /@types/pg/8.10.1: - resolution: {integrity: sha512-AmEHA/XxMxemQom5iDwP62FYNkv+gDDnetRG7v2N2dPtju7UKI7FknUimcZo7SodKTHtckYPzaTqUEvUKbVJEA==} + /@types/pg/8.10.2: + resolution: {integrity: sha512-MKFs9P6nJ+LAeHLU3V0cODEOgyThJ3OAnmOlsZsxux6sfQs3HRXR5bBn7xG5DjckEFhTAxsXi7k7cd0pCMxpJw==} dependencies: - '@types/node': 18.16.14 + '@types/node': 18.16.16 pg-protocol: 1.6.0 pg-types: 4.0.1 dev: true @@ -5056,13 +4587,13 @@ packages: /@types/progress/2.0.5: resolution: {integrity: sha512-ZYYVc/kSMkhH9W/4dNK/sLNra3cnkfT2nJyOAIDY+C2u6w72wa0s1aXAezVtbTsnN8HID1uhXCrLwDE2ZXpplg==} dependencies: - '@types/node': 18.16.14 + '@types/node': 18.16.16 dev: true /@types/prompts/2.4.4: resolution: {integrity: sha512-p5N9uoTH76lLvSAaYSZtBCdEXzpOOufsRjnhjVSrZGXikVGHX9+cc9ERtHRV4hvBKHyZb1bg4K+56Bd2TqUn4A==} dependencies: - '@types/node': 18.16.14 + '@types/node': 18.16.16 kleur: 3.0.3 dev: true @@ -5073,7 +4604,7 @@ packages: /@types/redis/2.8.32: resolution: {integrity: sha512-7jkMKxcGq9p242exlbsVzuJb57KqHRhNl4dHoQu2Y5v9bCAbtIXXH0R3HleSQW4CTOqpHIYUW3t6tpUj4BVQ+w==} dependencies: - '@types/node': 18.16.14 + '@types/node': 18.16.18 dev: true /@types/resolve/1.20.2: @@ -5083,7 +4614,7 @@ packages: /@types/responselike/1.0.0: resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==} dependencies: - '@types/node': 18.16.14 + '@types/node': 18.16.18 dev: true /@types/retry/0.12.0: @@ -5103,7 +4634,7 @@ packages: /@types/sqlite3/3.1.8: resolution: {integrity: sha512-sQMt/qnyUWnqiTcJXm5ZfNPIBeJ/DVvJDwxw+0tAxPJvadzfiP1QhryO1JOR6t1yfb8NpzQb/Rud06mob5laIA==} dependencies: - '@types/node': 18.16.14 + '@types/node': 18.16.16 dev: true /@types/stack-utils/2.0.1: @@ -5113,7 +4644,7 @@ packages: /@types/tedious/4.0.9: resolution: {integrity: sha512-ipwFvfy9b2m0gjHsIX0D6NAAwGCKokzf5zJqUZHUGt+7uWVlBIy6n2eyMgiKQ8ChLFVxic/zwQUhjLYNzbHDRA==} dependencies: - '@types/node': 18.16.14 + '@types/node': 18.16.18 dev: true /@types/text-table/0.2.2: @@ -5123,18 +4654,14 @@ packages: /@types/through/0.0.30: resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} dependencies: - '@types/node': 18.16.14 - dev: true - - /@types/unist/2.0.6: - resolution: {integrity: sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==} + '@types/node': 18.16.18 dev: true /@types/vinyl/2.0.6: resolution: {integrity: sha512-ayJ0iOCDNHnKpKTgBG6Q6JOnHTj9zFta+3j2b8Ejza0e4cvRyMn0ZoLEmbPrTHe5YYRlDYPvPWVdV4cTaRyH7g==} dependencies: '@types/expect': 1.20.4 - '@types/node': 18.16.14 + '@types/node': 18.16.18 dev: true /@types/webidl-conversions/7.0.0: @@ -5144,7 +4671,7 @@ packages: /@types/whatwg-url/8.2.2: resolution: {integrity: sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==} dependencies: - '@types/node': 18.16.14 + '@types/node': 18.16.18 '@types/webidl-conversions': 7.0.0 dev: false @@ -5194,8 +4721,8 @@ packages: rxjs: 6.6.7 dev: true - /@typescript-eslint/eslint-plugin/5.59.6_4qbuxpmdupj46lq2zjlghng6yy: - resolution: {integrity: sha512-sXtOgJNEuRU5RLwPUb1jxtToZbgvq3M6FPpY4QENxoOggK+UpTxUBpj6tD8+Qh2g46Pi9We87E+eHnUw8YcGsw==} + /@typescript-eslint/eslint-plugin/5.59.11_jxhnufqfdxsaktvg4boo4kir6q: + resolution: {integrity: sha512-XxuOfTkCUiOSyBWIvHlUraLw/JT/6Io1365RO6ZuI88STKMavJZPNMU0lFcUTeQXEhHiv64CbxYxBNoDVSmghg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -5206,12 +4733,12 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.5.1 - '@typescript-eslint/parser': 5.59.6_5ujgynla27k2qkzlnkldjwsutm - '@typescript-eslint/scope-manager': 5.59.6 - '@typescript-eslint/type-utils': 5.59.6_5ujgynla27k2qkzlnkldjwsutm - '@typescript-eslint/utils': 5.59.6_5ujgynla27k2qkzlnkldjwsutm + '@typescript-eslint/parser': 5.59.11_2jcgcerbs6bi4debdtwega5q6u + '@typescript-eslint/scope-manager': 5.59.11 + '@typescript-eslint/type-utils': 5.59.11_2jcgcerbs6bi4debdtwega5q6u + '@typescript-eslint/utils': 5.59.11_2jcgcerbs6bi4debdtwega5q6u debug: 4.3.4 - eslint: 8.41.0 + eslint: 8.43.0 grapheme-splitter: 1.0.4 ignore: 5.2.4 natural-compare-lite: 1.4.0 @@ -5222,8 +4749,8 @@ packages: - supports-color dev: true - /@typescript-eslint/parser/5.59.6_5ujgynla27k2qkzlnkldjwsutm: - resolution: {integrity: sha512-7pCa6al03Pv1yf/dUg/s1pXz/yGMUBAw5EeWqNTFiSueKvRNonze3hma3lhdsOrQcaOXhbk5gKu2Fludiho9VA==} + /@typescript-eslint/parser/5.59.11_2jcgcerbs6bi4debdtwega5q6u: + resolution: {integrity: sha512-s9ZF3M+Nym6CAZEkJJeO2TFHHDsKAM3ecNkLuH4i4s8/RCPnF5JRip2GyviYkeEAcwGMJxkqG9h2dAsnA1nZpA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -5232,34 +4759,26 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.59.6 - '@typescript-eslint/types': 5.59.6 - '@typescript-eslint/typescript-estree': 5.59.6_typescript@4.9.5 + '@typescript-eslint/scope-manager': 5.59.11 + '@typescript-eslint/types': 5.59.11 + '@typescript-eslint/typescript-estree': 5.59.11_typescript@4.9.5 debug: 4.3.4 - eslint: 8.41.0 + eslint: 8.43.0 typescript: 4.9.5 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/scope-manager/5.50.0: - resolution: {integrity: sha512-rt03kaX+iZrhssaT974BCmoUikYtZI24Vp/kwTSy841XhiYShlqoshRFDvN1FKKvU2S3gK+kcBW1EA7kNUrogg==} + /@typescript-eslint/scope-manager/5.59.11: + resolution: {integrity: sha512-dHFOsxoLFtrIcSj5h0QoBT/89hxQONwmn3FOQ0GOQcLOOXm+MIrS8zEAhs4tWl5MraxCY3ZJpaXQQdFMc2Tu+Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.50.0 - '@typescript-eslint/visitor-keys': 5.50.0 + '@typescript-eslint/types': 5.59.11 + '@typescript-eslint/visitor-keys': 5.59.11 dev: true - /@typescript-eslint/scope-manager/5.59.6: - resolution: {integrity: sha512-gLbY3Le9Dxcb8KdpF0+SJr6EQ+hFGYFl6tVY8VxLPFDfUZC7BHFw+Vq7bM5lE9DwWPfx4vMWWTLGXgpc0mAYyQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - '@typescript-eslint/types': 5.59.6 - '@typescript-eslint/visitor-keys': 5.59.6 - dev: true - - /@typescript-eslint/type-utils/5.59.6_5ujgynla27k2qkzlnkldjwsutm: - resolution: {integrity: sha512-A4tms2Mp5yNvLDlySF+kAThV9VTBPCvGf0Rp8nl/eoDX9Okun8byTKoj3fJ52IJitjWOk0fKPNQhXEB++eNozQ==} + /@typescript-eslint/type-utils/5.59.11_2jcgcerbs6bi4debdtwega5q6u: + resolution: {integrity: sha512-LZqVY8hMiVRF2a7/swmkStMYSoXMFlzL6sXV6U/2gL5cwnLWQgLEG8tjWPpaE4rMIdZ6VKWwcffPlo1jPfk43g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -5268,49 +4787,23 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.59.6_typescript@4.9.5 - '@typescript-eslint/utils': 5.59.6_5ujgynla27k2qkzlnkldjwsutm + '@typescript-eslint/typescript-estree': 5.59.11_typescript@4.9.5 + '@typescript-eslint/utils': 5.59.11_2jcgcerbs6bi4debdtwega5q6u debug: 4.3.4 - eslint: 8.41.0 + eslint: 8.43.0 tsutils: 3.21.0_typescript@4.9.5 typescript: 4.9.5 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/types/5.50.0: - resolution: {integrity: sha512-atruOuJpir4OtyNdKahiHZobPKFvZnBnfDiyEaBf6d9vy9visE7gDjlmhl+y29uxZ2ZDgvXijcungGFjGGex7w==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true - - /@typescript-eslint/types/5.59.6: - resolution: {integrity: sha512-tH5lBXZI7T2MOUgOWFdVNUILsI02shyQvfzG9EJkoONWugCG77NDDa1EeDGw7oJ5IvsTAAGVV8I3Tk2PNu9QfA==} + /@typescript-eslint/types/5.59.11: + resolution: {integrity: sha512-epoN6R6tkvBYSc+cllrz+c2sOFWkbisJZWkOE+y3xHtvYaOE6Wk6B8e114McRJwFRjGvYdJwLXQH5c9osME/AA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree/5.50.0_typescript@4.9.5: - resolution: {integrity: sha512-Gq4zapso+OtIZlv8YNAStFtT6d05zyVCK7Fx3h5inlLBx2hWuc/0465C2mg/EQDDU2LKe52+/jN4f0g9bd+kow==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/types': 5.50.0 - '@typescript-eslint/visitor-keys': 5.50.0 - debug: 4.3.4 - globby: 11.1.0 - is-glob: 4.0.3 - semver: 7.5.1 - tsutils: 3.21.0_typescript@4.9.5 - typescript: 4.9.5 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/typescript-estree/5.59.6_typescript@4.9.5: - resolution: {integrity: sha512-vW6JP3lMAs/Tq4KjdI/RiHaaJSO7IUsbkz17it/Rl9Q+WkQ77EOuOnlbaU8kKfVIOJxMhnRiBG+olE7f3M16DA==} + /@typescript-eslint/typescript-estree/5.59.11_typescript@4.9.5: + resolution: {integrity: sha512-YupOpot5hJO0maupJXixi6l5ETdrITxeo5eBOeuV7RSKgYdU3G5cxO49/9WRnJq9EMrB7AuTSLH/bqOsXi7wPA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -5318,8 +4811,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.59.6 - '@typescript-eslint/visitor-keys': 5.59.6 + '@typescript-eslint/types': 5.59.11 + '@typescript-eslint/visitor-keys': 5.59.11 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -5330,39 +4823,19 @@ packages: - supports-color dev: true - /@typescript-eslint/utils/5.50.0_5ujgynla27k2qkzlnkldjwsutm: - resolution: {integrity: sha512-v/AnUFImmh8G4PH0NDkf6wA8hujNNcrwtecqW4vtQ1UOSNBaZl49zP1SHoZ/06e+UiwzHpgb5zP5+hwlYYWYAw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - dependencies: - '@types/json-schema': 7.0.11 - '@types/semver': 7.3.13 - '@typescript-eslint/scope-manager': 5.50.0 - '@typescript-eslint/types': 5.50.0 - '@typescript-eslint/typescript-estree': 5.50.0_typescript@4.9.5 - eslint: 8.41.0 - eslint-scope: 5.1.1 - eslint-utils: 3.0.0_eslint@8.41.0 - semver: 7.5.1 - transitivePeerDependencies: - - supports-color - - typescript - dev: true - - /@typescript-eslint/utils/5.59.6_5ujgynla27k2qkzlnkldjwsutm: - resolution: {integrity: sha512-vzaaD6EXbTS29cVH0JjXBdzMt6VBlv+hE31XktDRMX1j3462wZCJa7VzO2AxXEXcIl8GQqZPcOPuW/Z1tZVogg==} + /@typescript-eslint/utils/5.59.11_2jcgcerbs6bi4debdtwega5q6u: + resolution: {integrity: sha512-didu2rHSOMUdJThLk4aZ1Or8IcO3HzCw/ZvEjTTIfjIrcdd5cvSIwwDy2AOlE7htSNp7QIZ10fLMyRCveesMLg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0_eslint@8.41.0 + '@eslint-community/eslint-utils': 4.4.0_eslint@8.43.0 '@types/json-schema': 7.0.11 '@types/semver': 7.3.13 - '@typescript-eslint/scope-manager': 5.59.6 - '@typescript-eslint/types': 5.59.6 - '@typescript-eslint/typescript-estree': 5.59.6_typescript@4.9.5 - eslint: 8.41.0 + '@typescript-eslint/scope-manager': 5.59.11 + '@typescript-eslint/types': 5.59.11 + '@typescript-eslint/typescript-estree': 5.59.11_typescript@4.9.5 + eslint: 8.43.0 eslint-scope: 5.1.1 semver: 7.5.1 transitivePeerDependencies: @@ -5370,61 +4843,14 @@ packages: - typescript dev: true - /@typescript-eslint/visitor-keys/5.50.0: - resolution: {integrity: sha512-cdMeD9HGu6EXIeGOh2yVW6oGf9wq8asBgZx7nsR/D36gTfQ0odE5kcRYe5M81vjEFAcPeugXrHg78Imu55F6gg==} + /@typescript-eslint/visitor-keys/5.59.11: + resolution: {integrity: sha512-KGYniTGG3AMTuKF9QBD7EIrvufkB6O6uX3knP73xbKLMpH+QRPcgnCxjWXSHjMRuOxFLovljqQgQpR0c7GvjoA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.50.0 + '@typescript-eslint/types': 5.59.11 eslint-visitor-keys: 3.4.1 dev: true - /@typescript-eslint/visitor-keys/5.59.6: - resolution: {integrity: sha512-zEfbFLzB9ETcEJ4HZEEsCR9HHeNku5/Qw1jSS5McYJv5BR+ftYXwFFAH5Al+xkGaZEqowMwl7uoJjQb1YSPF8Q==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - '@typescript-eslint/types': 5.59.6 - eslint-visitor-keys: 3.4.1 - dev: true - - /@vitest/expect/0.31.1: - resolution: {integrity: sha512-BV1LyNvhnX+eNYzJxlHIGPWZpwJFZaCcOIzp2CNG0P+bbetenTupk6EO0LANm4QFt0TTit+yqx7Rxd1qxi/SQA==} - dependencies: - '@vitest/spy': 0.31.1 - '@vitest/utils': 0.31.1 - chai: 4.3.7 - dev: true - - /@vitest/runner/0.31.1: - resolution: {integrity: sha512-imWuc82ngOtxdCUpXwtEzZIuc1KMr+VlQ3Ondph45VhWoQWit5yvG/fFcldbnCi8DUuFi+NmNx5ehMUw/cGLUw==} - dependencies: - '@vitest/utils': 0.31.1 - concordance: 5.0.4 - p-limit: 4.0.0 - pathe: 1.1.0 - dev: true - - /@vitest/snapshot/0.31.1: - resolution: {integrity: sha512-L3w5uU9bMe6asrNzJ8WZzN+jUTX4KSgCinEJPXyny0o90fG4FPQMV0OWsq7vrCWfQlAilMjDnOF9nP8lidsJ+g==} - dependencies: - magic-string: 0.30.0 - pathe: 1.1.0 - pretty-format: 27.5.1 - dev: true - - /@vitest/spy/0.31.1: - resolution: {integrity: sha512-1cTpt2m9mdo3hRLDyCG2hDQvRrePTDgEJBFQQNz1ydHHZy03EiA6EpFxY+7ODaY7vMRCie+WlFZBZ0/dQWyssQ==} - dependencies: - tinyspy: 2.1.0 - dev: true - - /@vitest/utils/0.31.1: - resolution: {integrity: sha512-yFyRD5ilwojsZfo3E0BnH72pSVSuLg2356cN1tCEe/0RtDzxTPYwOomIC+eQbot7m6DRy4tPZw+09mB7NkbMmA==} - dependencies: - concordance: 5.0.4 - loupe: 2.3.6 - pretty-format: 27.5.1 - dev: true - /@webassemblyjs/ast/1.11.6: resolution: {integrity: sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==} dependencies: @@ -5586,6 +5012,15 @@ packages: transitivePeerDependencies: - supports-color + /agent-base/7.1.0: + resolution: {integrity: sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==} + engines: {node: '>= 14'} + dependencies: + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: false + /agentkeepalive/4.2.1: resolution: {integrity: sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==} engines: {node: '>= 8.0.0'} @@ -5638,13 +5073,6 @@ packages: dependencies: type-fest: 0.21.3 - /ansi-escapes/5.0.0: - resolution: {integrity: sha512-5GFMVX8HqE/TB+FuBJGuO5XG0WrsA6ptUqoODaT/n9mmUaZFkqnBueB4leqGBCmrUHnCnC4PCZTCd0E7QQ83bA==} - engines: {node: '>=12'} - dependencies: - type-fest: 1.4.0 - dev: true - /ansi-regex/2.1.1: resolution: {integrity: sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==} engines: {node: '>=0.10.0'} @@ -5844,10 +5272,6 @@ packages: engines: {node: '>=0.8'} dev: true - /assertion-error/1.1.0: - resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} - dev: true - /astral-regex/2.0.0: resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} engines: {node: '>=8'} @@ -6037,10 +5461,6 @@ packages: inherits: 2.0.4 readable-stream: 3.6.0 - /blueimp-md5/2.19.0: - resolution: {integrity: sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==} - dev: true - /body-parser/1.19.1: resolution: {integrity: sha512-8ljfQi5eBk8EJfECMrgqNGWPEY5jWP+1IzkzkGdFFEwFQZZyaZ21UqdaHktgiMlH0xLHqIFtE/u2OYE5dOtViA==} engines: {node: '>= 0.8'} @@ -6059,10 +5479,6 @@ packages: - supports-color dev: true - /boolbase/1.0.0: - resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} - dev: true - /boolean/3.2.0: resolution: {integrity: sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==} dev: true @@ -6154,11 +5570,6 @@ packages: base64-js: 1.5.1 ieee754: 1.2.1 - /builtin-modules/3.3.0: - resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} - engines: {node: '>=6'} - dev: true - /builtins/1.0.3: resolution: {integrity: sha512-uYBjakWipfaO/bXI7E8rq6kpwHRZK5cNYrUv2OzZSI/FvmdMyXJ2tG9dKcjEC5YHmHpUAwsargWIZNWdxb/bnQ==} dev: true @@ -6169,21 +5580,6 @@ packages: semver: 7.5.1 dev: true - /bumpp/9.1.0: - resolution: {integrity: sha512-m3+YD8uoa0VttG+RV4oKr3lK60gkUn1yPDaBTFwT7xrdJUsy7Jm0VYgx457HI3VPAOX8szLmy1x2y1QcvB+M8Q==} - engines: {node: '>=10'} - hasBin: true - dependencies: - '@jsdevtools/ez-spawn': 3.0.4 - c12: 1.4.1 - cac: 6.7.14 - fast-glob: 3.2.12 - prompts: 2.4.2 - semver: 7.3.8 - transitivePeerDependencies: - - supports-color - dev: true - /busboy/1.6.0: resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} engines: {node: '>=10.16.0'} @@ -6196,29 +5592,6 @@ packages: engines: {node: '>= 0.8'} dev: true - /c12/1.4.1: - resolution: {integrity: sha512-0x7pWfLZpZsgtyotXtuepJc0rZYE0Aw8PwNAXs0jSG9zq6Sl5xmbWnFqfmRY01ieZLHNbvneSFm9/x88CvzAuw==} - dependencies: - chokidar: 3.5.3 - defu: 6.1.2 - dotenv: 16.0.3 - giget: 1.1.2 - jiti: 1.18.2 - mlly: 1.2.0 - ohash: 1.1.2 - pathe: 1.1.0 - perfect-debounce: 0.1.3 - pkg-types: 1.0.3 - rc9: 2.1.0 - transitivePeerDependencies: - - supports-color - dev: true - - /cac/6.7.14: - resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} - engines: {node: '>=8'} - dev: true - /cacache/15.3.0: resolution: {integrity: sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==} engines: {node: '>= 10'} @@ -6338,10 +5711,6 @@ packages: function-bind: 1.1.1 get-intrinsic: 1.1.3 - /call-me-maybe/1.0.2: - resolution: {integrity: sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==} - dev: true - /callsites/3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} @@ -6389,19 +5758,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /chai/4.3.7: - resolution: {integrity: sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==} - engines: {node: '>=4'} - dependencies: - assertion-error: 1.1.0 - check-error: 1.0.2 - deep-eql: 4.1.3 - get-func-name: 2.0.0 - loupe: 2.3.6 - pathval: 1.1.1 - type-detect: 4.0.8 - dev: true - /chalk/1.1.3: resolution: {integrity: sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==} engines: {node: '>=0.10.0'} @@ -6438,36 +5794,20 @@ packages: engines: {node: '>=10'} dev: true - /character-entities-legacy/1.1.4: - resolution: {integrity: sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==} - dev: true - - /character-entities/1.2.4: - resolution: {integrity: sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==} - dev: true - - /character-reference-invalid/1.1.4: - resolution: {integrity: sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==} - dev: true - /chardet/0.7.0: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} dev: true - /check-error/1.0.2: - resolution: {integrity: sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==} - dev: true - - /checkpoint-client/1.1.23: - resolution: {integrity: sha512-NrGvMiH1fUcZwrYc0Z+YTn7q9ysV0kPgVyDKZ5jrfIerFJuSllvyGsY7bHeQSEiljaIaUP1Q/xutZ8q1s7PGzg==} + /checkpoint-client/1.1.24: + resolution: {integrity: sha512-nIOlLhDS7MKs4tUzS3LCm+sE1NgTCVnVrXlD0RRxaoEkkLu8LIWSUNiNWai6a+LK5unLzTyZeTCYX1Smqy0YoA==} dependencies: - ci-info: 3.3.0 + ci-info: 3.8.0 env-paths: 2.2.1 fast-write-atomic: 0.2.1 make-dir: 3.1.0 ms: 2.1.3 - node-fetch: 2.6.7_3wcp6bao3dfksocwsfev5pt7km - uuid: 8.3.2 + node-fetch: 2.6.11_oawau75ow7jz373yzwkw5fs4ry + uuid: 9.0.0 transitivePeerDependencies: - encoding @@ -6500,25 +5840,14 @@ packages: resolution: {integrity: sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==} dev: true - /ci-info/3.3.0: - resolution: {integrity: sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==} - /ci-info/3.8.0: resolution: {integrity: sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==} engines: {node: '>=8'} - dev: true /cjs-module-lexer/1.2.2: resolution: {integrity: sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==} dev: true - /clean-regexp/1.0.0: - resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} - engines: {node: '>=4'} - dependencies: - escape-string-regexp: 1.0.5 - dev: true - /clean-stack/2.2.0: resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} engines: {node: '>=6'} @@ -6745,20 +6074,6 @@ packages: typedarray: 0.0.6 dev: true - /concordance/5.0.4: - resolution: {integrity: sha512-OAcsnTEYu1ARJqWVGwf4zh4JDfHZEaSNlNccFmt8YjB2l/n19/PF2viLINHc57vO4FKIAFl2FWASIGZZWZ2Kxw==} - engines: {node: '>=10.18.0 <11 || >=12.14.0 <13 || >=14'} - dependencies: - date-time: 3.1.0 - esutils: 2.0.3 - fast-diff: 1.2.0 - js-string-escape: 1.0.1 - lodash: 4.17.21 - md5-hex: 3.0.1 - semver: 7.5.1 - well-known-symbols: 2.0.0 - dev: true - /config-chain/1.1.13: resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} dependencies: @@ -6778,10 +6093,6 @@ packages: xdg-basedir: 4.0.0 dev: true - /consola/2.15.3: - resolution: {integrity: sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==} - dev: true - /console-control-strings/1.1.0: resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} dev: true @@ -6883,12 +6194,6 @@ packages: resolution: {integrity: sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==} engines: {node: '>=8'} - /cssesc/3.0.0: - resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} - engines: {node: '>=4'} - hasBin: true - dev: true - /currently-unhandled/0.4.1: resolution: {integrity: sha512-/fITjgjGU50vjQ4FH6eUoYu+iUoUKIXws2hL15JJpIR+BbTxaXQsMuuyjtNh2WqsSBS5nsaZHFsFecyw5CCAng==} engines: {node: '>=0.10.0'} @@ -6906,13 +6211,6 @@ packages: engines: {node: '>= 12'} dev: true - /date-time/3.1.0: - resolution: {integrity: sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg==} - engines: {node: '>=6'} - dependencies: - time-zone: 1.0.0 - dev: true - /dateformat/4.6.3: resolution: {integrity: sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==} dev: true @@ -7013,13 +6311,6 @@ packages: resolution: {integrity: sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==} dev: true - /deep-eql/4.1.3: - resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} - engines: {node: '>=6'} - dependencies: - type-detect: 4.0.8 - dev: true - /deep-extend/0.6.0: resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} engines: {node: '>=4.0.0'} @@ -7064,10 +6355,6 @@ packages: has-property-descriptors: 1.0.0 object-keys: 1.1.1 - /defu/6.1.2: - resolution: {integrity: sha512-+uO4+qr7msjNNWKYPHqN/3+Dx3NFkmIzayk2L1MyZQlvgZb/J1A0fo410dpKrN2SnqFjt8n4JL8fDJE0wIgjFQ==} - dev: true - /del/6.1.1: resolution: {integrity: sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg==} engines: {node: '>=10'} @@ -7107,10 +6394,6 @@ packages: resolution: {integrity: sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==} dev: true - /destr/1.2.2: - resolution: {integrity: sha512-lrbCJwD9saUQrqUfXvl6qoM+QN3W7tLV5pAOs+OqOmopCCz/JkE05MHedJR1xfk4IAnZuJXPVuN5+7jNA2ZCiA==} - dev: true - /destroy/1.0.4: resolution: {integrity: sha512-3NdhDuEXnfun/z7x9GOElY49LoqVHoGScmOKwmxhsS8N5Y+Z8KyPPDnaSzqWgYt/ji4mqwfTS34Htrk0zPIXVg==} dev: true @@ -7171,33 +6454,6 @@ packages: esutils: 2.0.3 dev: true - /dom-serializer/2.0.0: - resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==} - dependencies: - domelementtype: 2.3.0 - domhandler: 5.0.3 - entities: 4.5.0 - dev: true - - /domelementtype/2.3.0: - resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} - dev: true - - /domhandler/5.0.3: - resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==} - engines: {node: '>= 4'} - dependencies: - domelementtype: 2.3.0 - dev: true - - /domutils/3.1.0: - resolution: {integrity: sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==} - dependencies: - dom-serializer: 2.0.0 - domelementtype: 2.3.0 - domhandler: 5.0.3 - dev: true - /dot-prop/5.3.0: resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==} engines: {node: '>=8'} @@ -7280,19 +6536,14 @@ packages: dependencies: once: 1.4.0 - /enhanced-resolve/5.14.1: - resolution: {integrity: sha512-Vklwq2vDKtl0y/vtwjSesgJ5MYS7Etuk5txS8VdKL4AOS1aUlD96zqIfsOSLQsdv3xgMRbtkWM8eG9XDfKUPow==} + /enhanced-resolve/5.15.0: + resolution: {integrity: sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==} engines: {node: '>=10.13.0'} dependencies: graceful-fs: 4.2.10 tapable: 2.2.1 dev: true - /entities/4.5.0: - resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} - engines: {node: '>=0.12'} - dev: true - /env-paths/2.2.1: resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} engines: {node: '>=6'} @@ -7613,64 +6864,34 @@ packages: esbuild-windows-arm64: 0.15.13 dev: true - /esbuild/0.17.18: - resolution: {integrity: sha512-z1lix43jBs6UKjcZVKOw2xx69ffE2aG0PygLL5qJ9OS/gy0Ewd1gW/PUQIOIQGXBHWNywSc0floSKoMFF8aK2w==} - engines: {node: '>=12'} - hasBin: true - requiresBuild: true - optionalDependencies: - '@esbuild/android-arm': 0.17.18 - '@esbuild/android-arm64': 0.17.18 - '@esbuild/android-x64': 0.17.18 - '@esbuild/darwin-arm64': 0.17.18 - '@esbuild/darwin-x64': 0.17.18 - '@esbuild/freebsd-arm64': 0.17.18 - '@esbuild/freebsd-x64': 0.17.18 - '@esbuild/linux-arm': 0.17.18 - '@esbuild/linux-arm64': 0.17.18 - '@esbuild/linux-ia32': 0.17.18 - '@esbuild/linux-loong64': 0.17.18 - '@esbuild/linux-mips64el': 0.17.18 - '@esbuild/linux-ppc64': 0.17.18 - '@esbuild/linux-riscv64': 0.17.18 - '@esbuild/linux-s390x': 0.17.18 - '@esbuild/linux-x64': 0.17.18 - '@esbuild/netbsd-x64': 0.17.18 - '@esbuild/openbsd-x64': 0.17.18 - '@esbuild/sunos-x64': 0.17.18 - '@esbuild/win32-arm64': 0.17.18 - '@esbuild/win32-ia32': 0.17.18 - '@esbuild/win32-x64': 0.17.18 - dev: true - - /esbuild/0.17.19: - resolution: {integrity: sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==} + /esbuild/0.18.2: + resolution: {integrity: sha512-1P4sK9gXVcjvrrUjE94Hbo9goU+T6U1sdzLf+JJ+3uI6GEb4e4n3Wrqto9hZHUWabblpT2ifmC61LhZnLyTNFw==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - '@esbuild/android-arm': 0.17.19 - '@esbuild/android-arm64': 0.17.19 - '@esbuild/android-x64': 0.17.19 - '@esbuild/darwin-arm64': 0.17.19 - '@esbuild/darwin-x64': 0.17.19 - '@esbuild/freebsd-arm64': 0.17.19 - '@esbuild/freebsd-x64': 0.17.19 - '@esbuild/linux-arm': 0.17.19 - '@esbuild/linux-arm64': 0.17.19 - '@esbuild/linux-ia32': 0.17.19 - '@esbuild/linux-loong64': 0.17.19 - '@esbuild/linux-mips64el': 0.17.19 - '@esbuild/linux-ppc64': 0.17.19 - '@esbuild/linux-riscv64': 0.17.19 - '@esbuild/linux-s390x': 0.17.19 - '@esbuild/linux-x64': 0.17.19 - '@esbuild/netbsd-x64': 0.17.19 - '@esbuild/openbsd-x64': 0.17.19 - '@esbuild/sunos-x64': 0.17.19 - '@esbuild/win32-arm64': 0.17.19 - '@esbuild/win32-ia32': 0.17.19 - '@esbuild/win32-x64': 0.17.19 + '@esbuild/android-arm': 0.18.2 + '@esbuild/android-arm64': 0.18.2 + '@esbuild/android-x64': 0.18.2 + '@esbuild/darwin-arm64': 0.18.2 + '@esbuild/darwin-x64': 0.18.2 + '@esbuild/freebsd-arm64': 0.18.2 + '@esbuild/freebsd-x64': 0.18.2 + '@esbuild/linux-arm': 0.18.2 + '@esbuild/linux-arm64': 0.18.2 + '@esbuild/linux-ia32': 0.18.2 + '@esbuild/linux-loong64': 0.18.2 + '@esbuild/linux-mips64el': 0.18.2 + '@esbuild/linux-ppc64': 0.18.2 + '@esbuild/linux-riscv64': 0.18.2 + '@esbuild/linux-s390x': 0.18.2 + '@esbuild/linux-x64': 0.18.2 + '@esbuild/netbsd-x64': 0.18.2 + '@esbuild/openbsd-x64': 0.18.2 + '@esbuild/sunos-x64': 0.18.2 + '@esbuild/win32-arm64': 0.18.2 + '@esbuild/win32-ia32': 0.18.2 + '@esbuild/win32-x64': 0.18.2 dev: true /escalade/3.1.1: @@ -7699,13 +6920,13 @@ packages: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} - /eslint-config-prettier/8.8.0_eslint@8.41.0: + /eslint-config-prettier/8.8.0_eslint@8.43.0: resolution: {integrity: sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.41.0 + eslint: 8.43.0 dev: true /eslint-formatter-pretty/4.1.0: @@ -7732,7 +6953,7 @@ packages: - supports-color dev: true - /eslint-module-utils/2.7.4_zmawdbqmj2vgju5r7knbexwntq: + /eslint-module-utils/2.7.4_eqjsakfzselparsj7dsnshdtra: resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} engines: {node: '>=4'} peerDependencies: @@ -7753,53 +6974,26 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.59.6_5ujgynla27k2qkzlnkldjwsutm + '@typescript-eslint/parser': 5.59.11_2jcgcerbs6bi4debdtwega5q6u debug: 3.2.7 - eslint: 8.41.0 + eslint: 8.43.0 eslint-import-resolver-node: 0.3.7 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-antfu/0.39.1_5ujgynla27k2qkzlnkldjwsutm: - resolution: {integrity: sha512-Nc5AMuUWt35bgHTbU+5LGROqZos97anb7MVatWNcl56NA/bw5mfU0p/RI8xdsaWH8Kw7Tz+UQOfXVMMRXlhzsg==} - dependencies: - '@typescript-eslint/utils': 5.59.6_5ujgynla27k2qkzlnkldjwsutm - transitivePeerDependencies: - - eslint - - supports-color - - typescript - dev: true - - /eslint-plugin-es/4.1.0_eslint@8.41.0: - resolution: {integrity: sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==} - engines: {node: '>=8.10.0'} - peerDependencies: - eslint: '>=4.19.1' - dependencies: - eslint: 8.41.0 - eslint-utils: 2.1.0 - regexpp: 3.2.0 - dev: true - - /eslint-plugin-eslint-comments/3.2.0_eslint@8.41.0: + /eslint-plugin-eslint-comments/3.2.0_eslint@8.43.0: resolution: {integrity: sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==} engines: {node: '>=6.5.0'} peerDependencies: eslint: '>=4.19.1' dependencies: escape-string-regexp: 1.0.5 - eslint: 8.41.0 + eslint: 8.43.0 ignore: 5.2.4 dev: true - /eslint-plugin-html/7.1.0: - resolution: {integrity: sha512-fNLRraV/e6j8e3XYOC9xgND4j+U7b1Rq+OygMlLcMg+wI/IpVbF+ubQa3R78EjKB9njT6TQOlcK5rFKBVVtdfg==} - dependencies: - htmlparser2: 8.0.2 - dev: true - - /eslint-plugin-import/2.27.5_4axmhv5rl7cvu7f33ludfwxkcu: + /eslint-plugin-import/2.27.5_uxlzkvdl7bie3tsj7zcwvawrke: resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==} engines: {node: '>=4'} peerDependencies: @@ -7809,15 +7003,15 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.59.6_5ujgynla27k2qkzlnkldjwsutm + '@typescript-eslint/parser': 5.59.11_2jcgcerbs6bi4debdtwega5q6u array-includes: 3.1.6 array.prototype.flat: 1.3.1 array.prototype.flatmap: 1.3.1 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.41.0 + eslint: 8.43.0 eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.7.4_zmawdbqmj2vgju5r7knbexwntq + eslint-module-utils: 2.7.4_eqjsakfzselparsj7dsnshdtra has: 1.0.3 is-core-module: 2.11.0 is-glob: 4.0.3 @@ -7832,8 +7026,8 @@ packages: - supports-color dev: true - /eslint-plugin-jest/27.2.1_5ijt43grezcuiq4jmxee335ut4: - resolution: {integrity: sha512-l067Uxx7ZT8cO9NJuf+eJHvt6bqJyz2Z29wykyEdz/OtmcELQl2MQGQLX8J94O1cSJWAwUSEvCjwjA7KEK3Hmg==} + /eslint-plugin-jest/27.2.2_6bt7zv2nmlck33askoehiu6z5u: + resolution: {integrity: sha512-euzbp06F934Z7UDl5ZUaRPLAc9MKjh0rMPERrHT7UhlCEwgb25kBj37TvMgWeHZVkR5I9CayswrpoaqZU1RImw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: '@typescript-eslint/eslint-plugin': ^5.0.0 @@ -7845,61 +7039,15 @@ packages: jest: optional: true dependencies: - '@typescript-eslint/eslint-plugin': 5.59.6_4qbuxpmdupj46lq2zjlghng6yy - '@typescript-eslint/utils': 5.50.0_5ujgynla27k2qkzlnkldjwsutm - eslint: 8.41.0 + '@typescript-eslint/eslint-plugin': 5.59.11_jxhnufqfdxsaktvg4boo4kir6q + '@typescript-eslint/utils': 5.59.11_2jcgcerbs6bi4debdtwega5q6u + eslint: 8.43.0 transitivePeerDependencies: - supports-color - typescript dev: true - /eslint-plugin-jsonc/2.7.0_eslint@8.41.0: - resolution: {integrity: sha512-DZgC71h/hZ9t5k/OGAKOMdJCleg2neZLL7No+YYi2ZMroCN4X5huZdrLf1USbrc6UTHwYujd1EDwXHg1qJ6CYw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: '>=6.0.0' - dependencies: - '@eslint-community/eslint-utils': 4.4.0_eslint@8.41.0 - eslint: 8.41.0 - jsonc-eslint-parser: 2.2.0 - natural-compare: 1.4.0 - dev: true - - /eslint-plugin-markdown/3.0.0_eslint@8.41.0: - resolution: {integrity: sha512-hRs5RUJGbeHDLfS7ELanT0e29Ocyssf/7kBM+p7KluY5AwngGkDf8Oyu4658/NZSGTTq05FZeWbkxXtbVyHPwg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - dependencies: - eslint: 8.41.0 - mdast-util-from-markdown: 0.8.5 - transitivePeerDependencies: - - supports-color - dev: true - - /eslint-plugin-n/15.7.0_eslint@8.41.0: - resolution: {integrity: sha512-jDex9s7D/Qial8AGVIHq4W7NswpUD5DPDL2RH8Lzd9EloWUuvUkHfv4FRLMipH5q2UtyurorBkPeNi1wVWNh3Q==} - engines: {node: '>=12.22.0'} - peerDependencies: - eslint: '>=7.0.0' - dependencies: - builtins: 5.0.1 - eslint: 8.41.0 - eslint-plugin-es: 4.1.0_eslint@8.41.0 - eslint-utils: 3.0.0_eslint@8.41.0 - ignore: 5.2.4 - is-core-module: 2.11.0 - minimatch: 3.1.2 - resolve: 1.22.2 - semver: 7.5.1 - dev: true - - /eslint-plugin-no-only-tests/3.1.0: - resolution: {integrity: sha512-Lf4YW/bL6Un1R6A76pRZyE1dl1vr31G/ev8UzIc/geCgFWyrKil8hVjYqWVKGB/UIGmb6Slzs9T0wNezdSVegw==} - engines: {node: '>=5.0.0'} - dev: true - - /eslint-plugin-prettier/4.2.1_5m322ea4tv353bxh5dkqp3d3i4: + /eslint-plugin-prettier/4.2.1_zh6vkmzat4wtnmvmftdassiwyu: resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} engines: {node: '>=12.0.0'} peerDependencies: @@ -7910,105 +7058,18 @@ packages: eslint-config-prettier: optional: true dependencies: - eslint: 8.41.0 - eslint-config-prettier: 8.8.0_eslint@8.41.0 - prettier: 2.8.3 + eslint: 8.43.0 + eslint-config-prettier: 8.8.0_eslint@8.43.0 + prettier: 2.8.8 prettier-linter-helpers: 1.0.0 dev: true - /eslint-plugin-promise/6.1.1_eslint@8.41.0: - resolution: {integrity: sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^7.0.0 || ^8.0.0 - dependencies: - eslint: 8.41.0 - dev: true - - /eslint-plugin-simple-import-sort/10.0.0_eslint@8.41.0: + /eslint-plugin-simple-import-sort/10.0.0_eslint@8.43.0: resolution: {integrity: sha512-AeTvO9UCMSNzIHRkg8S6c3RPy5YEwKWSQPx3DYghLedo2ZQxowPFLGDN1AZ2evfg6r6mjBSZSLxLFsWSu3acsw==} peerDependencies: eslint: '>=5.0.0' dependencies: - eslint: 8.41.0 - dev: true - - /eslint-plugin-unicorn/46.0.0_eslint@8.41.0: - resolution: {integrity: sha512-j07WkC+PFZwk8J33LYp6JMoHa1lXc1u6R45pbSAipjpfpb7KIGr17VE2D685zCxR5VL4cjrl65kTJflziQWMDA==} - engines: {node: '>=14.18'} - peerDependencies: - eslint: '>=8.28.0' - dependencies: - '@babel/helper-validator-identifier': 7.19.1 - '@eslint-community/eslint-utils': 4.4.0_eslint@8.41.0 - ci-info: 3.8.0 - clean-regexp: 1.0.0 - eslint: 8.41.0 - esquery: 1.5.0 - indent-string: 4.0.0 - is-builtin-module: 3.2.1 - jsesc: 3.0.2 - lodash: 4.17.21 - pluralize: 8.0.0 - read-pkg-up: 7.0.1 - regexp-tree: 0.1.27 - regjsparser: 0.9.1 - safe-regex: 2.1.1 - semver: 7.5.1 - strip-indent: 3.0.0 - dev: true - - /eslint-plugin-unused-imports/2.0.0_qrapr3bedi2gglhy4lhyjlil4u: - resolution: {integrity: sha512-3APeS/tQlTrFa167ThtP0Zm0vctjr4M44HMpeg1P4bK6wItarumq0Ma82xorMKdFsWpphQBlRPzw/pxiVELX1A==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - '@typescript-eslint/eslint-plugin': ^5.0.0 - eslint: ^8.0.0 - peerDependenciesMeta: - '@typescript-eslint/eslint-plugin': - optional: true - dependencies: - '@typescript-eslint/eslint-plugin': 5.59.6_4qbuxpmdupj46lq2zjlghng6yy - eslint: 8.41.0 - eslint-rule-composer: 0.3.0 - dev: true - - /eslint-plugin-vue/9.11.0_eslint@8.41.0: - resolution: {integrity: sha512-bBCJAZnkBV7ATH4Z1E7CvN3nmtS4H7QUU3UBxPdo8WohRU+yHjnQRALpTbxMVcz0e4Mx3IyxIdP5HYODMxK9cQ==} - engines: {node: ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 - dependencies: - '@eslint-community/eslint-utils': 4.4.0_eslint@8.41.0 - eslint: 8.41.0 - natural-compare: 1.4.0 - nth-check: 2.1.1 - postcss-selector-parser: 6.0.12 - semver: 7.5.1 - vue-eslint-parser: 9.2.0_eslint@8.41.0 - xml-name-validator: 4.0.0 - transitivePeerDependencies: - - supports-color - dev: true - - /eslint-plugin-yml/1.5.0_eslint@8.41.0: - resolution: {integrity: sha512-iygN054g+ZrnYmtOXMnT+sx9iDNXt89/m0+506cQHeG0+5jJN8hY5iOPQLd3yfd50AfK/mSasajBWruf1SoHpQ==} - engines: {node: ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: '>=6.0.0' - dependencies: - debug: 4.3.4 - eslint: 8.41.0 - lodash: 4.17.21 - natural-compare: 1.4.0 - yaml-eslint-parser: 1.2.0 - transitivePeerDependencies: - - supports-color - dev: true - - /eslint-rule-composer/0.3.0: - resolution: {integrity: sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==} - engines: {node: '>=4.0.0'} + eslint: 8.43.0 dev: true /eslint-rule-docs/1.1.235: @@ -8031,48 +7092,21 @@ packages: estraverse: 5.3.0 dev: true - /eslint-utils/2.1.0: - resolution: {integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==} - engines: {node: '>=6'} - dependencies: - eslint-visitor-keys: 1.3.0 - dev: true - - /eslint-utils/3.0.0_eslint@8.41.0: - resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} - engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} - peerDependencies: - eslint: '>=5' - dependencies: - eslint: 8.41.0 - eslint-visitor-keys: 2.1.0 - dev: true - - /eslint-visitor-keys/1.3.0: - resolution: {integrity: sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==} - engines: {node: '>=4'} - dev: true - - /eslint-visitor-keys/2.1.0: - resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==} - engines: {node: '>=10'} - dev: true - /eslint-visitor-keys/3.4.1: resolution: {integrity: sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint/8.41.0: - resolution: {integrity: sha512-WQDQpzGBOP5IrXPo4Hc0814r4/v2rrIsB0rhT7jtunIalgg6gYXWhRMOejVO8yH21T/FGaxjmFjBMNqcIlmH1Q==} + /eslint/8.43.0: + resolution: {integrity: sha512-aaCpf2JqqKesMFGgmRPessmVKjcGXqdlAYLLC3THM8t5nBRZRQ+st5WM/hoJXkdioEXLLbXgclUpM0TXo5HX5Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0_eslint@8.41.0 + '@eslint-community/eslint-utils': 4.4.0_eslint@8.43.0 '@eslint-community/regexpp': 4.5.1 '@eslint/eslintrc': 2.0.3 - '@eslint/js': 8.41.0 - '@humanwhocodes/config-array': 0.11.8 + '@eslint/js': 8.43.0 + '@humanwhocodes/config-array': 0.11.10 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 ajv: 6.12.6 @@ -8111,13 +7145,6 @@ packages: - supports-color dev: true - /esno/0.16.3: - resolution: {integrity: sha512-6slSBEV1lMKcX13DBifvnDFpNno5WXhw4j/ff7RI0y51BZiDqEe5dNhhjhIQ3iCOQuzsm2MbVzmwqbN78BBhPg==} - hasBin: true - dependencies: - tsx: 3.12.7 - dev: true - /espree/9.5.2: resolution: {integrity: sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -8157,10 +7184,6 @@ packages: engines: {node: '>=4.0'} dev: true - /estree-walker/2.0.2: - resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} - dev: true - /esutils/2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} @@ -8254,19 +7277,9 @@ packages: engines: {node: '>= 0.8.0'} dev: true - /expect-type/0.15.0: - resolution: {integrity: sha512-yWnriYB4e8G54M5/fAFj7rCIBiKs1HAACaY13kCz6Ku0dezjS9aMcfcdVK2X8Tv2tEV1BPz/wKfQ7WA4S/d8aA==} - dev: true - - /expect/29.4.3: - resolution: {integrity: sha512-uC05+Q7eXECFpgDrHdXA4k2rpMyStAYPItEDLyQDo5Ta7fVkJnNA/4zh/OIVkVVNZ1oOK1PipQoyNjuZ6sz6Dg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/expect-utils': 29.5.0 - jest-get-type: 29.4.3 - jest-matcher-utils: 29.5.0 - jest-message-util: 29.5.0 - jest-util: 29.5.0 + /expect-type/0.16.0: + resolution: {integrity: sha512-wCpFeVBiAPGiYkQZzaqvGuuBnNCHbtnowMOBpBGY8a27XbG8VAit3lklWph1r8VmgsH61mOZqI3NuGm8bZnUlw==} + engines: {node: '>=12.0.0'} dev: true /expect/29.5.0: @@ -8380,8 +7393,8 @@ packages: /fast-write-atomic/0.2.1: resolution: {integrity: sha512-WvJe06IfNYlr+6cO3uQkdKdy3Cb1LlCJSF8zRs2eT8yuhdbSlR9nIt+TgQ92RUxiRrQm+/S7RARnMfCs5iuAjw==} - /fast-xml-parser/4.1.2: - resolution: {integrity: sha512-CDYeykkle1LiA/uqQyNwYpFbyF6Axec6YapmpUP+/RHWIoR1zKjocdvNaTsxCxZzQ6v9MLXaSYm9Qq0thv0DHg==} + /fast-xml-parser/4.2.4: + resolution: {integrity: sha512-fbfMDvgBNIdDJLdLOwacjFAPYt67tr31H9ZhWSm45CDAxvd0I6WTlSOUo7K2P/K5sA5JgMKG64PI3DMcaFdWpQ==} hasBin: true dependencies: strnum: 1.0.5 @@ -8538,11 +7551,6 @@ packages: resolution: {integrity: sha512-ZfmD5MnU7GglUEhiky9C7yEPaNq1/wh36RDohe+Xr3nJVdccwHbdTkFIYvetcdsoAckUKT51fuf44g7Ni5Doyg==} dev: true - /flat/5.0.2: - resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} - hasBin: true - dev: true - /flatted/3.2.7: resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} dev: true @@ -8627,15 +7635,6 @@ packages: resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} dev: false - /fs-extra/11.1.0: - resolution: {integrity: sha512-0rcTq621PD5jM/e0a3EJoGC/1TC5ZBCERW82LQuwfGnCa1V8w7dpYH1yNu+SLb6E5dkeCBzKEyLGlFrnr+dUyw==} - engines: {node: '>=14.14'} - dependencies: - graceful-fs: 4.2.10 - jsonfile: 6.1.0 - universalify: 2.0.0 - dev: true - /fs-extra/11.1.1: resolution: {integrity: sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==} engines: {node: '>=14.14'} @@ -8672,8 +7671,8 @@ packages: minipass: 5.0.0 dev: true - /fs-monkey/1.0.3: - resolution: {integrity: sha512-cybjIfiiE+pTWicSCLFHSrXZ6EilF30oh91FDP9S2B051prEa7QWfrVTQm10/dDpswBDXZugPa1Ogu8Yh+HV0Q==} + /fs-monkey/1.0.4: + resolution: {integrity: sha512-INM/fWAxMICjttnD0DX1rBvinKskj5G1w+oy/pnm9u/tSlnBrzFonJMcalKJ30P8RRsPzKcCG7Q8l0jx5Fh9YQ==} dev: true /fs.realpath/1.0.0: @@ -8719,10 +7718,6 @@ packages: hasBin: true dev: true - /fzf/0.5.1: - resolution: {integrity: sha512-AJ9BBt/3K/IyCF+pQjdG194kVSS1hU/v/RnZgiCtYZzA0rj2OBVwwjBRUOclo9yJl2ovjtdw3C31/8/rnT0uug==} - dev: true - /gauge/1.2.7: resolution: {integrity: sha512-fVbU2wRE91yDvKUnrIaQlHKAWKY5e08PmztCrwuH5YVQ+Z/p3d0ny2T48o6uvAAXHIUnfaQdHkmxYbQft1eHVA==} dependencies: @@ -8772,10 +7767,6 @@ packages: engines: {node: 6.* || 8.* || >= 10.*} dev: true - /get-func-name/2.0.0: - resolution: {integrity: sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==} - dev: true - /get-intrinsic/1.1.3: resolution: {integrity: sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==} dependencies: @@ -8844,25 +7835,6 @@ packages: call-bind: 1.0.2 get-intrinsic: 1.2.0 - /get-tsconfig/4.5.0: - resolution: {integrity: sha512-MjhiaIWCJ1sAU4pIQ5i5OfOuHHxVo1oYeNsWTON7jxYkod8pHocXeh+SSbmu5OZZZK73B6cbJ2XADzXehLyovQ==} - dev: true - - /giget/1.1.2: - resolution: {integrity: sha512-HsLoS07HiQ5oqvObOI+Qb2tyZH4Gj5nYGfF9qQcZNrPw+uEFhdXtgJr01aO2pWadGHucajYDLxxbtQkm97ON2A==} - hasBin: true - dependencies: - colorette: 2.0.19 - defu: 6.1.2 - https-proxy-agent: 5.0.1 - mri: 1.2.0 - node-fetch-native: 1.1.0 - pathe: 1.1.0 - tar: 6.1.14 - transitivePeerDependencies: - - supports-color - dev: true - /github-username/6.0.0: resolution: {integrity: sha512-7TTrRjxblSI5l6adk9zd+cV5d6i1OrJSo3Vr9xdGqFLBQo0mz5P9eIfKCDJ7eekVGGFLbce0qbPSnktXV2BjDQ==} engines: {node: '>=10'} @@ -8917,19 +7889,9 @@ packages: dependencies: fs.realpath: 1.0.0 inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 5.1.6 - once: 1.4.0 - - /glob/9.3.5: - resolution: {integrity: sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==} - engines: {node: '>=16 || 14 >=14.17'} - dependencies: - fs.realpath: 1.0.0 - minimatch: 8.0.4 - minipass: 4.2.8 - path-scurry: 1.7.0 - dev: true + inherits: 2.0.4 + minimatch: 5.1.6 + once: 1.4.0 /global-agent/2.2.0: resolution: {integrity: sha512-+20KpaW6DDLqhG7JDiJpD1JvNvb8ts+TNl7BPOYcURqCrXqnN1Vf+XVOrkKJAFPqfX+oEhsdzOj1hLWkBTdNJg==} @@ -9001,17 +7963,6 @@ packages: merge2: 1.4.1 slash: 3.0.0 - /globby/13.1.3: - resolution: {integrity: sha512-8krCNHXvlCgHDpegPzleMq07yMYTO2sXKASmZmquEYWEmCx6J5UTRbp5RwMJkTJGtcQ44YpiUYUiN0b9mzy8Bw==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - dir-glob: 3.0.1 - fast-glob: 3.2.12 - ignore: 5.2.4 - merge2: 1.4.1 - slash: 4.0.0 - dev: true - /globby/13.1.4: resolution: {integrity: sha512-iui/IiiW+QrJ1X1hKH5qwlMQyv34wJAYwH1vrf8b9kBA4sNiif3gKsMHa+BrdnOpEudWjpotfa7LrTzB1ERS/g==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -9211,10 +8162,6 @@ packages: type-fest: 0.8.1 dev: false - /hookable/5.5.3: - resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==} - dev: true - /hosted-git-info/2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} @@ -9236,15 +8183,6 @@ packages: resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} dev: true - /htmlparser2/8.0.2: - resolution: {integrity: sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==} - dependencies: - domelementtype: 2.3.0 - domhandler: 5.0.3 - domutils: 3.1.0 - entities: 4.5.0 - dev: true - /http-cache-semantics/3.8.1: resolution: {integrity: sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==} dev: true @@ -9285,6 +8223,16 @@ packages: transitivePeerDependencies: - supports-color + /http-proxy-agent/7.0.0: + resolution: {integrity: sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==} + engines: {node: '>= 14'} + dependencies: + agent-base: 7.1.0 + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: false + /http2-wrapper/1.0.3: resolution: {integrity: sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==} engines: {node: '>=10.19.0'} @@ -9302,6 +8250,16 @@ packages: transitivePeerDependencies: - supports-color + /https-proxy-agent/7.0.0: + resolution: {integrity: sha512-0euwPCRyAPSgGdzD1IVN9nJYHtBhJwb6XPfbpQcYbPCwrBidX6GzxmchnaF4sfF/jPb74Ojx5g4yTg3sixlyPw==} + engines: {node: '>= 14'} + dependencies: + agent-base: 7.1.0 + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: false + /human-signals/2.1.0: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} @@ -9432,11 +8390,6 @@ packages: resolution: {integrity: sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==} engines: {node: '>=10'} - /ini/4.1.1: - resolution: {integrity: sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - dev: true - /inquirer/1.2.3: resolution: {integrity: sha512-diSnpgfv/Ozq6QKuV2mUcwZ+D24b03J3W6EVxzvtkCWJTPrH2gKLsqgSW0vzRMZZFhFdhnvzka0RUJxIm7AOxQ==} dependencies: @@ -9511,17 +8464,6 @@ packages: engines: {node: '>=8'} dev: true - /is-alphabetical/1.0.4: - resolution: {integrity: sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==} - dev: true - - /is-alphanumerical/1.0.4: - resolution: {integrity: sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==} - dependencies: - is-alphabetical: 1.0.4 - is-decimal: 1.0.4 - dev: true - /is-arguments/1.1.1: resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} engines: {node: '>= 0.4'} @@ -9559,13 +8501,6 @@ packages: call-bind: 1.0.2 has-tostringtag: 1.0.0 - /is-builtin-module/3.2.1: - resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} - engines: {node: '>=6'} - dependencies: - builtin-modules: 3.3.0 - dev: true - /is-callable/1.2.7: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} @@ -9595,10 +8530,6 @@ packages: dependencies: has-tostringtag: 1.0.0 - /is-decimal/1.0.4: - resolution: {integrity: sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==} - dev: true - /is-docker/1.1.0: resolution: {integrity: sha512-ZEpopPu+bLIb/x3IF9wXxRdAW74e/ity1XGRxpznAaABKhc8mmtRamRB2l71CSs1YMS8FQxDK/vPK10XlhzG2A==} engines: {node: '>=0.10.0'} @@ -9652,10 +8583,6 @@ packages: dependencies: is-extglob: 2.1.1 - /is-hexadecimal/1.0.4: - resolution: {integrity: sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==} - dev: true - /is-installed-globally/0.4.0: resolution: {integrity: sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==} engines: {node: '>=10'} @@ -9672,10 +8599,6 @@ packages: resolution: {integrity: sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==} dev: true - /is-module/1.0.0: - resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} - dev: true - /is-negative-zero/2.0.2: resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} engines: {node: '>= 0.4'} @@ -9732,12 +8655,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /is-reference/1.2.1: - resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} - dependencies: - '@types/estree': 1.0.0 - dev: true - /is-regex/1.1.4: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} @@ -9951,7 +8868,7 @@ packages: '@jest/expect': 29.5.0 '@jest/test-result': 29.5.0 '@jest/types': 29.5.0 - '@types/node': 18.16.14 + '@types/node': 18.16.18 chalk: 4.1.2 co: 4.6.0 dedent: 0.7.0 @@ -9999,7 +8916,35 @@ packages: - ts-node dev: true - /jest-cli/29.5.0_@types+node@18.16.14: + /jest-cli/29.5.0_@types+node@18.16.16: + resolution: {integrity: sha512-L1KcP1l4HtfwdxXNFCL5bmUbLQiKrakMUriBEcc1Vfz6gx31ORKdreuWvmQVBit+1ss9NNR3yxjwfwzZNdQXJw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + hasBin: true + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + dependencies: + '@jest/core': 29.5.0 + '@jest/test-result': 29.5.0 + '@jest/types': 29.5.0 + chalk: 4.1.2 + exit: 0.1.2 + graceful-fs: 4.2.10 + import-local: 3.1.0 + jest-config: 29.5.0_@types+node@18.16.16 + jest-util: 29.5.0 + jest-validate: 29.5.0 + prompts: 2.4.2 + yargs: 17.6.0 + transitivePeerDependencies: + - '@types/node' + - supports-color + - ts-node + dev: true + + /jest-cli/29.5.0_@types+node@18.16.18: resolution: {integrity: sha512-L1KcP1l4HtfwdxXNFCL5bmUbLQiKrakMUriBEcc1Vfz6gx31ORKdreuWvmQVBit+1ss9NNR3yxjwfwzZNdQXJw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -10016,7 +8961,7 @@ packages: exit: 0.1.2 graceful-fs: 4.2.10 import-local: 3.1.0 - jest-config: 29.5.0_@types+node@18.16.14 + jest-config: 29.5.0_@types+node@18.16.18 jest-util: 29.5.0 jest-validate: 29.5.0 prompts: 2.4.2 @@ -10027,7 +8972,7 @@ packages: - ts-node dev: true - /jest-cli/29.5.0_daglcptrsglylliibnnp676h3i: + /jest-cli/29.5.0_u3tjahz4lx2ow4rgesw7wigoy4: resolution: {integrity: sha512-L1KcP1l4HtfwdxXNFCL5bmUbLQiKrakMUriBEcc1Vfz6gx31ORKdreuWvmQVBit+1ss9NNR3yxjwfwzZNdQXJw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -10044,7 +8989,7 @@ packages: exit: 0.1.2 graceful-fs: 4.2.10 import-local: 3.1.0 - jest-config: 29.5.0_daglcptrsglylliibnnp676h3i + jest-config: 29.5.0_u3tjahz4lx2ow4rgesw7wigoy4 jest-util: 29.5.0 jest-validate: 29.5.0 prompts: 2.4.2 @@ -10093,7 +9038,86 @@ packages: - supports-color dev: true - /jest-config/29.5.0_@types+node@18.16.14: + /jest-config/29.5.0_5qsgjhhli643kzzyel6mobhisq: + resolution: {integrity: sha512-kvDUKBnNJPNBmFFOhDbm59iu1Fii1Q6SxyhXfvylq3UTHbg6o7j/g8k2dZyXWLvfdKB1vAPxNZnMgtKJcmu3kA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + '@types/node': '*' + ts-node: '>=9.0.0' + peerDependenciesMeta: + '@types/node': + optional: true + ts-node: + optional: true + dependencies: + '@babel/core': 7.21.8 + '@jest/test-sequencer': 29.5.0 + '@jest/types': 29.5.0 + '@types/node': 18.16.18 + babel-jest: 29.5.0_@babel+core@7.21.8 + chalk: 4.1.2 + ci-info: 3.8.0 + deepmerge: 4.2.2 + glob: 7.2.3 + graceful-fs: 4.2.10 + jest-circus: 29.5.0 + jest-environment-node: 29.5.0 + jest-get-type: 29.4.3 + jest-regex-util: 29.4.3 + jest-resolve: 29.5.0 + jest-runner: 29.5.0 + jest-util: 29.5.0 + jest-validate: 29.5.0 + micromatch: 4.0.5 + parse-json: 5.2.0 + pretty-format: 29.5.0 + slash: 3.0.0 + strip-json-comments: 3.1.1 + ts-node: 10.9.1_5cbqh36kzuqel5avofcbl5rwvu + transitivePeerDependencies: + - supports-color + dev: true + + /jest-config/29.5.0_@types+node@18.16.16: + resolution: {integrity: sha512-kvDUKBnNJPNBmFFOhDbm59iu1Fii1Q6SxyhXfvylq3UTHbg6o7j/g8k2dZyXWLvfdKB1vAPxNZnMgtKJcmu3kA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + '@types/node': '*' + ts-node: '>=9.0.0' + peerDependenciesMeta: + '@types/node': + optional: true + ts-node: + optional: true + dependencies: + '@babel/core': 7.21.8 + '@jest/test-sequencer': 29.5.0 + '@jest/types': 29.5.0 + '@types/node': 18.16.16 + babel-jest: 29.5.0_@babel+core@7.21.8 + chalk: 4.1.2 + ci-info: 3.8.0 + deepmerge: 4.2.2 + glob: 7.2.3 + graceful-fs: 4.2.10 + jest-circus: 29.5.0 + jest-environment-node: 29.5.0 + jest-get-type: 29.4.3 + jest-regex-util: 29.4.3 + jest-resolve: 29.5.0 + jest-runner: 29.5.0 + jest-util: 29.5.0 + jest-validate: 29.5.0 + micromatch: 4.0.5 + parse-json: 5.2.0 + pretty-format: 29.5.0 + slash: 3.0.0 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + dev: true + + /jest-config/29.5.0_@types+node@18.16.18: resolution: {integrity: sha512-kvDUKBnNJPNBmFFOhDbm59iu1Fii1Q6SxyhXfvylq3UTHbg6o7j/g8k2dZyXWLvfdKB1vAPxNZnMgtKJcmu3kA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: @@ -10108,7 +9132,7 @@ packages: '@babel/core': 7.21.8 '@jest/test-sequencer': 29.5.0 '@jest/types': 29.5.0 - '@types/node': 18.16.14 + '@types/node': 18.16.18 babel-jest: 29.5.0_@babel+core@7.21.8 chalk: 4.1.2 ci-info: 3.8.0 @@ -10132,7 +9156,7 @@ packages: - supports-color dev: true - /jest-config/29.5.0_daglcptrsglylliibnnp676h3i: + /jest-config/29.5.0_u3tjahz4lx2ow4rgesw7wigoy4: resolution: {integrity: sha512-kvDUKBnNJPNBmFFOhDbm59iu1Fii1Q6SxyhXfvylq3UTHbg6o7j/g8k2dZyXWLvfdKB1vAPxNZnMgtKJcmu3kA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: @@ -10147,7 +9171,7 @@ packages: '@babel/core': 7.21.8 '@jest/test-sequencer': 29.5.0 '@jest/types': 29.5.0 - '@types/node': 18.16.14 + '@types/node': 18.16.16 babel-jest: 29.5.0_@babel+core@7.21.8 chalk: 4.1.2 ci-info: 3.8.0 @@ -10167,7 +9191,7 @@ packages: pretty-format: 29.5.0 slash: 3.0.0 strip-json-comments: 3.1.1 - ts-node: 10.9.1_gedhic2hxbm43qfqfkboxjwb3y + ts-node: 10.9.1_5cbqh36kzuqel5avofcbl5rwvu transitivePeerDependencies: - supports-color dev: true @@ -10217,7 +9241,7 @@ packages: '@jest/environment': 29.5.0 '@jest/fake-timers': 29.5.0 '@jest/types': 29.5.0 - '@types/node': 18.16.14 + '@types/node': 18.16.18 jest-mock: 29.5.0 jest-util: 29.5.0 dev: true @@ -10233,7 +9257,7 @@ packages: dependencies: '@jest/types': 29.5.0 '@types/graceful-fs': 4.1.5 - '@types/node': 18.16.14 + '@types/node': 18.16.18 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.10 @@ -10278,7 +9302,7 @@ packages: resolution: {integrity: sha512-Kijeg9Dag6CKtIDA7O21zNTACqD5MD/8HfIV8pdD94vFyFuer52SigdC3IQMhab3vACxXMiFk+yMHNdbqtyTGA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/code-frame': 7.18.6 + '@babel/code-frame': 7.21.4 '@jest/types': 29.5.0 '@types/stack-utils': 2.0.1 chalk: 4.1.2 @@ -10294,7 +9318,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.5.0 - '@types/node': 18.16.14 + '@types/node': 18.16.18 jest-util: 29.5.0 dev: true @@ -10349,7 +9373,7 @@ packages: '@jest/test-result': 29.5.0 '@jest/transform': 29.5.0 '@jest/types': 29.5.0 - '@types/node': 18.16.14 + '@types/node': 18.16.18 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.10 @@ -10380,7 +9404,7 @@ packages: '@jest/test-result': 29.5.0 '@jest/transform': 29.5.0 '@jest/types': 29.5.0 - '@types/node': 18.16.14 + '@types/node': 18.16.18 chalk: 4.1.2 cjs-module-lexer: 1.2.2 collect-v8-coverage: 1.0.1 @@ -10440,7 +9464,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.5.0 - '@types/node': 18.16.14 + '@types/node': 18.16.18 chalk: 4.1.2 ci-info: 3.8.0 graceful-fs: 4.2.10 @@ -10465,7 +9489,7 @@ packages: dependencies: '@jest/test-result': 29.5.0 '@jest/types': 29.5.0 - '@types/node': 18.16.14 + '@types/node': 18.16.18 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -10477,7 +9501,7 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 18.16.14 + '@types/node': 18.16.18 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true @@ -10486,7 +9510,7 @@ packages: resolution: {integrity: sha512-NcrQnevGoSp4b5kg+akIpthoAFHxPBcb5P6mYPY0fUNT+sSvmtu6jlkEle3anczUKIKEbMxFimk9oTP/tpIPgA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@types/node': 18.16.14 + '@types/node': 18.16.18 jest-util: 29.5.0 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -10512,7 +9536,7 @@ packages: - ts-node dev: true - /jest/29.5.0_@types+node@18.16.14: + /jest/29.5.0_@types+node@18.16.16: resolution: {integrity: sha512-juMg3he2uru1QoXX078zTa7pO85QyB9xajZc6bU+d9yEGwrKX6+vGmJQ3UdVZsvTEUARIdObzH68QItim6OSSQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -10525,14 +9549,14 @@ packages: '@jest/core': 29.5.0 '@jest/types': 29.5.0 import-local: 3.1.0 - jest-cli: 29.5.0_@types+node@18.16.14 + jest-cli: 29.5.0_@types+node@18.16.16 transitivePeerDependencies: - '@types/node' - supports-color - ts-node dev: true - /jest/29.5.0_daglcptrsglylliibnnp676h3i: + /jest/29.5.0_@types+node@18.16.18: resolution: {integrity: sha512-juMg3he2uru1QoXX078zTa7pO85QyB9xajZc6bU+d9yEGwrKX6+vGmJQ3UdVZsvTEUARIdObzH68QItim6OSSQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -10542,19 +9566,34 @@ packages: node-notifier: optional: true dependencies: - '@jest/core': 29.5.0_ts-node@10.9.1 + '@jest/core': 29.5.0 '@jest/types': 29.5.0 import-local: 3.1.0 - jest-cli: 29.5.0_daglcptrsglylliibnnp676h3i + jest-cli: 29.5.0_@types+node@18.16.18 transitivePeerDependencies: - '@types/node' - supports-color - ts-node dev: true - /jiti/1.18.2: - resolution: {integrity: sha512-QAdOptna2NYiSSpv0O/BwoHBSmz4YhpzJHyi+fnMRTXFjp7B8i/YG5Z8IfusxB1ufjcD2Sre1F3R+nX3fvy7gg==} + /jest/29.5.0_u3tjahz4lx2ow4rgesw7wigoy4: + resolution: {integrity: sha512-juMg3he2uru1QoXX078zTa7pO85QyB9xajZc6bU+d9yEGwrKX6+vGmJQ3UdVZsvTEUARIdObzH68QItim6OSSQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + dependencies: + '@jest/core': 29.5.0_ts-node@10.9.1 + '@jest/types': 29.5.0 + import-local: 3.1.0 + jest-cli: 29.5.0_u3tjahz4lx2ow4rgesw7wigoy4 + transitivePeerDependencies: + - '@types/node' + - supports-color + - ts-node dev: true /jju/1.4.0: @@ -10569,11 +9608,6 @@ packages: /js-md4/0.3.2: resolution: {integrity: sha512-/GDnfQYsltsjRswQhN9fhv3EMw2sCpUdrdxyWDOUK7eyD++r3gRhzgiQgc/x4MAv2i1iuQ4lxO5mvqM3vj4bwA==} - /js-string-escape/1.0.1: - resolution: {integrity: sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==} - engines: {node: '>= 0.8'} - dev: true - /js-tokens/4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -10595,23 +9629,12 @@ packages: /jsbi/4.3.0: resolution: {integrity: sha512-SnZNcinB4RIcnEyZqFPdGPVgrg2AcnykiBy0sHVJQKHYeaLUvi3Exj+iaPpLnFVkDPZIV4U0yvgC9/R4uEAZ9g==} - /jsesc/0.5.0: - resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==} - hasBin: true - dev: true - /jsesc/2.5.2: resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} engines: {node: '>=4'} hasBin: true dev: true - /jsesc/3.0.2: - resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} - engines: {node: '>=6'} - hasBin: true - dev: true - /json-buffer/3.0.0: resolution: {integrity: sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ==} dev: true @@ -10661,16 +9684,6 @@ packages: hasBin: true dev: true - /jsonc-eslint-parser/2.2.0: - resolution: {integrity: sha512-x5QjzBOORd+T2EjErIxJnkOEbLVEdD1ILEeBbIJt8Eq/zUn7P7M8qdnWiNVBK5f8oxnJpc6SBHOeeIEl/swPjg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - acorn: 8.8.2 - eslint-visitor-keys: 3.4.1 - espree: 9.5.2 - semver: 7.5.1 - dev: true - /jsonc-parser/3.2.0: resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} dev: true @@ -10891,11 +9904,6 @@ packages: engines: {node: '>=6.11.5'} dev: true - /local-pkg/0.4.3: - resolution: {integrity: sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==} - engines: {node: '>=14'} - dev: true - /locate-path/2.0.0: resolution: {integrity: sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==} engines: {node: '>=4'} @@ -11041,12 +10049,6 @@ packages: signal-exit: 3.0.7 dev: true - /loupe/2.3.6: - resolution: {integrity: sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==} - dependencies: - get-func-name: 2.0.0 - dev: true - /lowercase-keys/1.0.0: resolution: {integrity: sha512-RPlX0+PHuvxVDZ7xX+EBVAp4RsVxP/TdDSN2mJYdiq1Lc4Hz7EUSjUI7RZrKKlmrIzVhf6Jo2stj7++gVarS0A==} engines: {node: '>=0.10.0'} @@ -11088,20 +10090,6 @@ packages: hasBin: true dev: true - /magic-string/0.27.0: - resolution: {integrity: sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==} - engines: {node: '>=12'} - dependencies: - '@jridgewell/sourcemap-codec': 1.4.14 - dev: true - - /magic-string/0.30.0: - resolution: {integrity: sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==} - engines: {node: '>=12'} - dependencies: - '@jridgewell/sourcemap-codec': 1.4.14 - dev: true - /make-dir/3.1.0: resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} engines: {node: '>=8'} @@ -11217,20 +10205,8 @@ packages: resolution: {integrity: sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g==} dev: true - /mariadb/3.0.2: - resolution: {integrity: sha512-dVjiQZ6RW0IXFnX+T/ZEmnqs724DgkQsXqfCyInXn0XxVfO2Px6KbS4M3Ny6UiBg0zJ93SHHvfVBgYO4ZnFvvw==} - engines: {node: '>= 12'} - dependencies: - '@types/geojson': 7946.0.10 - '@types/node': 17.0.45 - denque: 2.1.0 - iconv-lite: 0.6.3 - lru-cache: 7.14.0 - moment-timezone: 0.5.38 - dev: true - - /mariadb/3.1.1: - resolution: {integrity: sha512-Y5tu9pQr8uZs63FATr7ldODXn8N2aIFlAg/rp6kRTohgQiJfdl9DNGu9PXRTYdY4JgF5mT2ASD81Jdo5kfGYzg==} + /mariadb/3.2.0: + resolution: {integrity: sha512-IH2nidQat1IBMxP5gjuNxG6dADtz1PESEC6rKrcATen5v3ngFyZITjehyYiwNfz3zUNQupfYmVntz93M+Pz8pQ==} engines: {node: '>= 12'} dependencies: '@types/geojson': 7946.0.10 @@ -11238,7 +10214,6 @@ packages: denque: 2.1.0 iconv-lite: 0.6.3 lru-cache: 7.14.0 - dev: false /matcher/3.0.0: resolution: {integrity: sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==} @@ -11247,29 +10222,6 @@ packages: escape-string-regexp: 4.0.0 dev: true - /md5-hex/3.0.1: - resolution: {integrity: sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw==} - engines: {node: '>=8'} - dependencies: - blueimp-md5: 2.19.0 - dev: true - - /mdast-util-from-markdown/0.8.5: - resolution: {integrity: sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==} - dependencies: - '@types/mdast': 3.0.11 - mdast-util-to-string: 2.0.0 - micromark: 2.11.4 - parse-entities: 2.0.0 - unist-util-stringify-position: 2.0.3 - transitivePeerDependencies: - - supports-color - dev: true - - /mdast-util-to-string/2.0.0: - resolution: {integrity: sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==} - dev: true - /media-typer/0.3.0: resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} engines: {node: '>= 0.6'} @@ -11337,11 +10289,11 @@ packages: p-is-promise: 2.1.0 dev: true - /memfs/3.5.1: - resolution: {integrity: sha512-UWbFJKvj5k+nETdteFndTpYxdeTMox/ULeqX5k/dpaQJCCFmj5EeKv3dBcyO2xmkRAx2vppRu5dVG7SOtsGOzA==} + /memfs/3.5.3: + resolution: {integrity: sha512-UERzLsxzllchadvbPs5aolHh65ISpKpM+ccLbOJ8/vvpBKmAWf+la7dXFy7Mr0ySHbdHrFv5kGFCUHHe6GFEmw==} engines: {node: '>= 4.0.0'} dependencies: - fs-monkey: 1.0.3 + fs-monkey: 1.0.4 dev: true /memory-pager/1.5.0: @@ -11398,15 +10350,6 @@ packages: engines: {node: '>= 0.6'} dev: true - /micromark/2.11.4: - resolution: {integrity: sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==} - dependencies: - debug: 4.3.4 - parse-entities: 2.0.0 - transitivePeerDependencies: - - supports-color - dev: true - /micromatch/4.0.5: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} engines: {node: '>=8.6'} @@ -11476,13 +10419,6 @@ packages: dependencies: brace-expansion: 2.0.1 - /minimatch/8.0.4: - resolution: {integrity: sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==} - engines: {node: '>=16 || 14 >=14.17'} - dependencies: - brace-expansion: 2.0.1 - dev: true - /minimatch/9.0.0: resolution: {integrity: sha512-0jJj8AvgKqWN05mrwuqi8QYKx1WmYSUoKSxu5Qhs9prezTz10sxAHGNZe9J9cqIJzta8DWsleh2KaVaLl6Ru2w==} engines: {node: '>=16 || 14 >=14.17'} @@ -11586,11 +10522,6 @@ packages: yallist: 4.0.0 dev: true - /minipass/4.2.8: - resolution: {integrity: sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==} - engines: {node: '>=8'} - dev: true - /minipass/5.0.0: resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==} engines: {node: '>=8'} @@ -11617,45 +10548,13 @@ packages: resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} hasBin: true dependencies: - minimist: 1.2.8 - dev: true - - /mkdirp/1.0.4: - resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} - engines: {node: '>=10'} - hasBin: true - dev: true - - /mkdist/1.2.0_typescript@5.0.4: - resolution: {integrity: sha512-UTqu/bXmIk/+VKNVgufAeMyjUcNy1dn9Bl7wL1zZlCKVrpDgj/VllmZBeh3ZCC/2HWqUrt6frNFTKt9TRZbNvQ==} - hasBin: true - peerDependencies: - sass: ^1.60.0 - typescript: '>=4.9.5' - peerDependenciesMeta: - sass: - optional: true - typescript: - optional: true - dependencies: - defu: 6.1.2 - esbuild: 0.17.19 - fs-extra: 11.1.1 - globby: 13.1.4 - jiti: 1.18.2 - mlly: 1.2.0 - mri: 1.2.0 - pathe: 1.1.0 - typescript: 5.0.4 + minimist: 1.2.8 dev: true - /mlly/1.2.0: - resolution: {integrity: sha512-+c7A3CV0KGdKcylsI6khWyts/CYrGTrRVo4R/I7u/cUsy0Conxa6LUhiEzVKIw14lc2L5aiO4+SeVe4TeGRKww==} - dependencies: - acorn: 8.8.2 - pathe: 1.1.0 - pkg-types: 1.0.3 - ufo: 1.1.1 + /mkdirp/1.0.4: + resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} + engines: {node: '>=10'} + hasBin: true dev: true /mock-stdin/1.0.0: @@ -11665,16 +10564,6 @@ packages: /module-details-from-path/1.0.3: resolution: {integrity: sha512-ySViT69/76t8VhE1xXHK6Ch4NcDd26gx0MzKXLO+F7NOtnqH68d9zF94nT8ZWSxXh8ELOERsnJO/sWt1xZYw5A==} - /moment-timezone/0.5.38: - resolution: {integrity: sha512-nMIrzGah4+oYZPflDvLZUgoVUO4fvAqHstvG3xAUnMolWncuAiLDWNnJZj6EwJGMGfb1ZcuTFE6GI3hNOVWI/Q==} - dependencies: - moment: 2.29.4 - dev: true - - /moment/2.29.4: - resolution: {integrity: sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==} - dev: true - /mongodb-connection-string-url/2.5.4: resolution: {integrity: sha512-SeAxuWs0ez3iI3vvmLk/j2y+zHwigTDKQhtdxTgt5ZCOQQS5+HW4g45/Xw5vzzbn7oQXCNQ24Z40AkJsizEy7w==} dependencies: @@ -11690,14 +10579,14 @@ packages: mongodb-connection-string-url: 2.5.4 socks: 2.7.1 optionalDependencies: - '@aws-sdk/credential-providers': 3.338.0 + '@aws-sdk/credential-providers': 3.354.0 saslprep: 1.0.3 transitivePeerDependencies: - aws-crt dev: false - /mongoose/6.11.1: - resolution: {integrity: sha512-AvQ8C5ZGF6GcsQhoRg/i7pbNZpb96qLGU5ICBllckp7qMOxcfUF1nA6JstZw841BqRcE6myZ/mx9CluEESaw5Q==} + /mongoose/6.11.2: + resolution: {integrity: sha512-BJHQerozE+qIVdH8Hn9niMVMUzRNcjmwU7hFEzER1+aYtGmVJgGsXBd9wJ9GnrHrbCsYmKlRy8aTuxEdlEtfow==} engines: {node: '>=12.0.0'} dependencies: bson: 4.7.2 @@ -11726,11 +10615,6 @@ packages: - supports-color dev: false - /mri/1.2.0: - resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} - engines: {node: '>=4'} - dev: true - /ms/2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} dev: true @@ -11774,12 +10658,6 @@ packages: resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==} dev: true - /nanoid/3.3.6: - resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true - dev: true - /native-duplexpair/1.0.0: resolution: {integrity: sha512-E7QQoM+3jvNtlmyfqRZ0/U75VFgCls+fSkbml2MpgWkWyz3ox8Y58gNhfuziuQYGNNQAbFZJQck55LHCnCK6CA==} @@ -11820,11 +10698,7 @@ packages: engines: {node: '>=10.5.0'} dev: true - /node-fetch-native/1.1.0: - resolution: {integrity: sha512-nl5goFCig93JZ9FIV8GHT9xpNqXbxQUzkOmKIMKmncsBH9jhg7qKex8hirpymkBFmNQ114chEEG5lS4wgK2I+Q==} - dev: true - - /node-fetch/2.6.11: + /node-fetch/2.6.11_oawau75ow7jz373yzwkw5fs4ry: resolution: {integrity: sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==} engines: {node: 4.x || >=6.0.0} peerDependencies: @@ -11834,17 +10708,6 @@ packages: optional: true dependencies: whatwg-url: 5.0.0 - - /node-fetch/2.6.7_3wcp6bao3dfksocwsfev5pt7km: - resolution: {integrity: sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==} - engines: {node: 4.x || >=6.0.0} - peerDependencies: - encoding: ^0.1.0 - peerDependenciesMeta: - encoding: - optional: true - dependencies: - whatwg-url: 5.0.0 patched: true /node-fetch/3.3.1: @@ -12181,12 +11044,6 @@ packages: set-blocking: 2.0.0 dev: true - /nth-check/2.1.1: - resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} - dependencies: - boolbase: 1.0.0 - dev: true - /number-is-nan/1.0.1: resolution: {integrity: sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==} engines: {node: '>=0.10.0'} @@ -12226,10 +11083,6 @@ packages: resolution: {integrity: sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==} dev: true - /ohash/1.1.2: - resolution: {integrity: sha512-9CIOSq5945rI045GFtcO3uudyOkYVY1nyfFxVQp+9BRgslr8jPNiSSrsFGg/BNTUFOLqx0P5tng6G32brIPw0w==} - dev: true - /on-finished/2.3.0: resolution: {integrity: sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==} engines: {node: '>= 0.8'} @@ -12607,17 +11460,6 @@ packages: just-diff-apply: 5.4.1 dev: true - /parse-entities/2.0.0: - resolution: {integrity: sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==} - dependencies: - character-entities: 1.2.4 - character-entities-legacy: 1.1.4 - character-reference-invalid: 1.1.4 - is-alphanumerical: 1.0.4 - is-decimal: 1.0.4 - is-hexadecimal: 1.0.4 - dev: true - /parse-help/1.0.0: resolution: {integrity: sha512-dlOrbBba6Rrw/nrJ+V7/vkGZdiimWJQzMHZZrYsUq03JE8AV3fAv6kOYX7dP/w2h67lIdmRf8ES8mU44xAgE/Q==} engines: {node: '>=4'} @@ -12715,24 +11557,12 @@ packages: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} - /pathe/1.1.0: - resolution: {integrity: sha512-ODbEPR0KKHqECXW1GoxdDb+AZvULmXjVPy4rt+pGo2+TnjJTIPJQSVS6N63n8T2Ip+syHhbn52OewKicV0373w==} - dev: true - - /pathval/1.1.1: - resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} - dev: true - /pause-stream/0.0.11: resolution: {integrity: sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==} dependencies: through: 2.3.8 dev: true - /perfect-debounce/0.1.3: - resolution: {integrity: sha512-NOT9AcKiDGpnV/HBhI22Str++XWcErO/bALvHCuhv33owZW/CjH8KAFLZDCmu3727sihe0wTxpDhyGc6M8qacQ==} - dev: true - /pg-connection-string/2.5.0: resolution: {integrity: sha512-r5o/V/ORTA6TmUnyWZR9nCj1klXCO2CEKNRlVuJptZe85QuhFayC7WeMic7ndayT5IRIR0S0xFxFi2ousartlQ==} @@ -12880,14 +11710,6 @@ packages: dependencies: find-up: 4.1.0 - /pkg-types/1.0.3: - resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==} - dependencies: - jsonc-parser: 3.2.0 - mlly: 1.2.0 - pathe: 1.1.0 - dev: true - /pkg-up/3.1.0: resolution: {integrity: sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==} engines: {node: '>=8'} @@ -12910,23 +11732,6 @@ packages: engines: {node: '>=4'} dev: true - /postcss-selector-parser/6.0.12: - resolution: {integrity: sha512-NdxGCAZdRrwVI1sy59+Wzrh+pMMHxapGnpfenDVlMEXoOcvt4pGE0JLK9YY2F5dLxcFYA/YbVQKhcGU+FtSYQg==} - engines: {node: '>=4'} - dependencies: - cssesc: 3.0.0 - util-deprecate: 1.0.2 - dev: true - - /postcss/8.4.23: - resolution: {integrity: sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==} - engines: {node: ^10 || ^12 || >=14} - dependencies: - nanoid: 3.3.6 - picocolors: 1.0.0 - source-map-js: 1.0.2 - dev: true - /postgres-array/2.0.0: resolution: {integrity: sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==} engines: {node: '>=4'} @@ -13003,8 +11808,8 @@ packages: fast-diff: 1.2.0 dev: true - /prettier/2.8.3: - resolution: {integrity: sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw==} + /prettier/2.8.8: + resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} engines: {node: '>=10.13.0'} hasBin: true dev: true @@ -13014,29 +11819,6 @@ packages: engines: {node: '>=6'} dev: true - /pretty-bytes/6.1.0: - resolution: {integrity: sha512-Rk753HI8f4uivXi4ZCIYdhmG1V+WKzvRMg/X+M42a6t7D07RcmopXJMDNk6N++7Bl75URRGsb40ruvg7Hcp2wQ==} - engines: {node: ^14.13.1 || >=16.0.0} - dev: true - - /pretty-format/27.5.1: - resolution: {integrity: sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==} - engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} - dependencies: - ansi-regex: 5.0.1 - ansi-styles: 5.2.0 - react-is: 17.0.2 - dev: true - - /pretty-format/29.4.3: - resolution: {integrity: sha512-cvpcHTc42lcsvOOAzd3XuNWTcvk1Jmnzqeu+WsOuiPmxUJTnkbAcFNsRKvEpBEUFVUgy/GTZLulZDcDEi+CIlA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/schemas': 29.4.3 - ansi-styles: 5.2.0 - react-is: 18.2.0 - dev: true - /pretty-format/29.5.0: resolution: {integrity: sha512-V2mGkI31qdttvTFX7Mt4efOqHXqJWMu4/r66Xh3Z3BwZaPfPJgp6/gbwoujRpPUtfEF6AUUWx3Jim3GCw5g/Qw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -13208,18 +11990,6 @@ packages: strip-json-comments: 2.0.1 dev: true - /rc9/2.1.0: - resolution: {integrity: sha512-ROO9bv8PPqngWKoiUZU3JDQ4sugpdRs9DfwHnzDSxK25XtQn6BEHL6EOd/OtKuDT2qodrtNR+0WkPT6l0jxH5Q==} - dependencies: - defu: 6.1.2 - destr: 1.2.2 - flat: 5.0.2 - dev: true - - /react-is/17.0.2: - resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==} - dev: true - /react-is/18.2.0: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} dev: true @@ -13396,11 +12166,6 @@ packages: resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==} dev: true - /regexp-tree/0.1.27: - resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==} - hasBin: true - dev: true - /regexp.prototype.flags/1.4.3: resolution: {integrity: sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==} engines: {node: '>= 0.4'} @@ -13409,11 +12174,6 @@ packages: define-properties: 1.1.4 functions-have-names: 1.2.3 - /regexpp/3.2.0: - resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==} - engines: {node: '>=8'} - dev: true - /registry-auth-token/3.4.0: resolution: {integrity: sha512-4LM6Fw8eBQdwMYcES4yTnn2TqIasbXuwDx3um+QRs7S55aMKCBKBxvPXl2RiUjHwuJLTyYfxSpmfSAjQpcuP+A==} dependencies: @@ -13442,13 +12202,6 @@ packages: rc: 1.2.8 dev: true - /regjsparser/0.9.1: - resolution: {integrity: sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==} - hasBin: true - dependencies: - jsesc: 0.5.0 - dev: true - /remove-trailing-separator/1.1.0: resolution: {integrity: sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==} dev: true @@ -13518,15 +12271,6 @@ packages: path-parse: 1.0.7 dev: true - /resolve/1.22.1: - resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==} - hasBin: true - dependencies: - is-core-module: 2.11.0 - path-parse: 1.0.7 - supports-preserve-symlinks-flag: 1.0.0 - dev: true - /resolve/1.22.2: resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==} hasBin: true @@ -13584,14 +12328,6 @@ packages: dependencies: glob: 7.2.3 - /rimraf/4.4.1: - resolution: {integrity: sha512-Gk8NlF062+T9CqNGn6h4tls3k6T1+/nXdOcSZVikNVtlRdYpA7wRJJMoXmuvOnLW844rPjdQ7JgXCYM6PPC/og==} - engines: {node: '>=14'} - hasBin: true - dependencies: - glob: 9.3.5 - dev: true - /roarr/2.15.4: resolution: {integrity: sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==} engines: {node: '>=8.0'} @@ -13604,28 +12340,6 @@ packages: sprintf-js: 1.1.2 dev: true - /rollup-plugin-dts/5.3.0_enlefojnmpwsbnjrufommarvom: - resolution: {integrity: sha512-8FXp0ZkyZj1iU5klkIJYLjIq/YZSwBoERu33QBDxm/1yw5UU4txrEtcmMkrq+ZiKu3Q4qvPCNqc3ovX6rjqzbQ==} - engines: {node: '>=v14'} - peerDependencies: - rollup: ^3.0.0 - typescript: ^4.1 || ^5.0 - dependencies: - magic-string: 0.30.0 - rollup: 3.21.3 - typescript: 5.0.4 - optionalDependencies: - '@babel/code-frame': 7.21.4 - dev: true - - /rollup/3.21.3: - resolution: {integrity: sha512-VnPfEG51nIv2xPLnZaekkuN06q9ZbnyDcLkaBdJa/W7UddyhOfMP2yOPziYQfeY7k++fZM8FdQIummFN5y14kA==} - engines: {node: '>=14.18.0', npm: '>=8.0.0'} - hasBin: true - optionalDependencies: - fsevents: 2.3.2 - dev: true - /root-check/1.0.0: resolution: {integrity: sha512-lt1ts72QmU7jh1DlOJqFN/le/aiRGAbchSSMhNpLQubDWPEOe0YKCcrhprkgyMxxFAcrEhyfTTUfc+Dj/bo4JA==} engines: {node: '>=0.10.0'} @@ -13674,12 +12388,6 @@ packages: get-intrinsic: 1.2.0 is-regex: 1.1.4 - /safe-regex/2.1.1: - resolution: {integrity: sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==} - dependencies: - regexp-tree: 0.1.27 - dev: true - /safer-buffer/2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} @@ -13692,8 +12400,8 @@ packages: dev: false optional: true - /schema-utils/3.1.2: - resolution: {integrity: sha512-pvjEHOgWc9OWA/f/DE3ohBWTD6EleVLf7iFUkoSwAxttdBhB9QUebQgxER2kWueOvRJXPHNnyrvvh9eZINB8Eg==} + /schema-utils/3.3.0: + resolution: {integrity: sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==} engines: {node: '>= 10.13.0'} dependencies: '@types/json-schema': 7.0.11 @@ -13706,10 +12414,6 @@ packages: engines: {node: '>=8'} dev: true - /scule/1.0.0: - resolution: {integrity: sha512-4AsO/FrViE/iDNEPaAQlb77tf0csuq27EsVpy6ett584EcRTp6pTDLoGWVxCD77y5iU5FauOvhsI4o1APwPoSQ==} - dev: true - /semver-compare/1.0.0: resolution: {integrity: sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==} dev: true @@ -13856,10 +12560,6 @@ packages: resolution: {integrity: sha512-Wv6BjQ5zbhW7VFefWusVP33T/EM0vYikCaQ2qR8yULbsilAT8/wQaXvuQ3ptGLpoKx+lihJE3y2UTgKDyyNHZQ==} dev: false - /siginfo/2.0.0: - resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} - dev: true - /signal-exit/3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} @@ -13880,8 +12580,8 @@ packages: - supports-color dev: true - /simple-statistics/7.8.2: - resolution: {integrity: sha512-evB7wiL4DSz6T9TdCTfRRqNcmnp0bllcUfZ4NBwtkdGMbXrYsZbrGxfunLPqdqCyT2Yz1NvLrKS7LVOoFBCxbA==} + /simple-statistics/7.8.3: + resolution: {integrity: sha512-JFvMY00t6SBGtwMuJ+nqgsx9ylkMiJ5JlK9bkj8AdvniIe5615wWQYkKHXe84XtSuc40G/tlrPu0A5/NlJvv8A==} dev: true /sisteransi/1.0.5: @@ -13975,11 +12675,6 @@ packages: dot-prop: 5.3.0 dev: true - /source-map-js/1.0.2: - resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} - engines: {node: '>=0.10.0'} - dev: true - /source-map-support/0.5.13: resolution: {integrity: sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==} dependencies: @@ -14018,7 +12713,7 @@ packages: resolution: {integrity: sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==} dependencies: spdx-expression-parse: 3.0.1 - spdx-license-ids: 3.0.12 + spdx-license-ids: 3.0.13 /spdx-exceptions/2.3.0: resolution: {integrity: sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==} @@ -14027,10 +12722,10 @@ packages: resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} dependencies: spdx-exceptions: 2.3.0 - spdx-license-ids: 3.0.12 + spdx-license-ids: 3.0.13 - /spdx-license-ids/3.0.12: - resolution: {integrity: sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==} + /spdx-license-ids/3.0.13: + resolution: {integrity: sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==} /split/0.3.3: resolution: {integrity: sha512-wD2AeVmxXRBoX44wAycgjVpMhvbwdI2aZjCkvfNcH1YqHQvJVa1duWc73OyVGJUc05fhFaTZeQ/PYsrmyH0JVA==} @@ -14054,8 +12749,8 @@ packages: engines: {node: '>=14'} dev: true - /sqlite-async/1.1.3: - resolution: {integrity: sha512-C71fZoTO7u355bTONhq9ncj4Ged3pXM0Un7oCDnrsCu7BPzITrCqTANP99XD7b6uGz4fY+RdgSPF/zVS7Iy9Tg==} + /sqlite-async/1.2.0: + resolution: {integrity: sha512-gx9DUUA2UZzz/8Mh3qdA3RtTm8aJuF7dZgFdZ43WB29Iswdsp0KmPtem/2QDW8K4CrajR8yQ+gEniSFgolNscQ==} dependencies: sqlite3: 5.1.2 transitivePeerDependencies: @@ -14115,10 +12810,6 @@ packages: escape-string-regexp: 2.0.0 dev: true - /stackback/0.0.2: - resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} - dev: true - /stacktrace-parser/0.1.10: resolution: {integrity: sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg==} engines: {node: '>=6'} @@ -14136,10 +12827,6 @@ packages: engines: {node: '>= 0.6'} dev: true - /std-env/3.3.2: - resolution: {integrity: sha512-uUZI65yrV2Qva5gqE0+A7uVAvO40iPo6jGhs7s8keRfHCmtg+uB2X6EiLGCI9IgL1J17xGhvoOqSz79lzICPTA==} - dev: true - /stoppable/1.1.0: resolution: {integrity: sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==} engines: {node: '>=4', npm: '>=6'} @@ -14329,12 +13016,6 @@ packages: engines: {node: '>=8'} dev: true - /strip-literal/1.0.1: - resolution: {integrity: sha512-QZTsipNpa2Ppr6v1AmJHESqJ3Uz247MUS0OjrnnZjFAvEoWqxuyFuXn2xLgMtRnijJShAa1HL0gtJyUs7u7n3Q==} - dependencies: - acorn: 8.8.2 - dev: true - /strnum/1.0.5: resolution: {integrity: sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==} dev: false @@ -14507,15 +13188,7 @@ packages: supports-hyperlinks: 2.3.0 dev: false - /terminal-link/3.0.0: - resolution: {integrity: sha512-flFL3m4wuixmf6IfhFJd1YPiLiMuxEc8uHRM1buzIeZPm22Au2pDqBJQgdo7n1WfPU1ONFGv7YDwpFBmHGF6lg==} - engines: {node: '>=12'} - dependencies: - ansi-escapes: 5.0.0 - supports-hyperlinks: 2.3.0 - dev: true - - /terser-webpack-plugin/5.3.8_webpack@5.84.0: + /terser-webpack-plugin/5.3.8_webpack@5.87.0: resolution: {integrity: sha512-WiHL3ElchZMsK27P8uIUh4604IgJyAW47LVXGbEoB21DbQcZ+OuMpGjVYnEUaqcWM6dO8uS2qUbA7LSCWqvsbg==} engines: {node: '>= 10.13.0'} peerDependencies: @@ -14533,10 +13206,10 @@ packages: dependencies: '@jridgewell/trace-mapping': 0.3.17 jest-worker: 27.5.1 - schema-utils: 3.1.2 + schema-utils: 3.3.0 serialize-javascript: 6.0.1 terser: 5.17.4 - webpack: 5.84.0 + webpack: 5.87.0 dev: true /terser/5.17.4: @@ -14572,30 +13245,11 @@ packages: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} dev: true - /time-zone/1.0.0: - resolution: {integrity: sha512-TIsDdtKo6+XrPtiTm1ssmMngN1sAhyKnTO2kunQWqNPWIVvCm15Wmw4SWInwTVgJ5u/Tr04+8Ei9TNcw4x4ONA==} - engines: {node: '>=4'} - dev: true - /timed-out/4.0.1: resolution: {integrity: sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA==} engines: {node: '>=0.10.0'} dev: true - /tinybench/2.5.0: - resolution: {integrity: sha512-kRwSG8Zx4tjF9ZiyH4bhaebu+EDz1BOx9hOigYHlUW4xxI/wKIUQUqo018UlU4ar6ATPBsaMrdbKZ+tmPdohFA==} - dev: true - - /tinypool/0.5.0: - resolution: {integrity: sha512-paHQtnrlS1QZYKF/GnLoOM/DN9fqaGOFbCbxzAhwniySnzl9Ebk8w73/dd34DAhe/obUbPAOldTyYXQZxnPBPQ==} - engines: {node: '>=14.0.0'} - dev: true - - /tinyspy/2.1.0: - resolution: {integrity: sha512-7eORpyqImoOvkQJCSkL0d0mB4NHHIFAy4b1u8PHdDa7SjGS2njzl6/lyGoZLm+eyYEtlUmFGE0rFj66SWxZgQQ==} - engines: {node: '>=14.0.0'} - dev: true - /titleize/2.1.0: resolution: {integrity: sha512-m+apkYlfiQTKLW+sI4vqUkwMEzfgEUEYSqljx1voUE3Wz/z1ZsxyzSxvH2X8uKVrOp7QkByWt0rA6+gvhCKy6g==} engines: {node: '>=6'} @@ -14671,7 +13325,7 @@ packages: engines: {node: '>=8'} dev: true - /ts-node/10.9.1_dpfsgaqzs6ay6fyiel2y4blik4: + /ts-node/10.9.1_5cbqh36kzuqel5avofcbl5rwvu: resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -14686,12 +13340,12 @@ packages: optional: true dependencies: '@cspotcode/source-map-support': 0.8.1 - '@swc/core': 1.2.204 + '@swc/core': 1.3.64 '@tsconfig/node10': 1.0.9 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.3 - '@types/node': 18.16.14 + '@types/node': 18.16.16 acorn: 8.8.2 acorn-walk: 8.2.0 arg: 4.1.3 @@ -14703,7 +13357,7 @@ packages: yn: 3.1.1 dev: true - /ts-node/10.9.1_gedhic2hxbm43qfqfkboxjwb3y: + /ts-node/10.9.1_gbfmtwj2t57hq5iibp7xw5qwjq: resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -14718,12 +13372,11 @@ packages: optional: true dependencies: '@cspotcode/source-map-support': 0.8.1 - '@swc/core': 1.3.32 '@tsconfig/node10': 1.0.9 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.3 - '@types/node': 18.16.14 + '@types/node': 18.16.16 acorn: 8.8.2 acorn-walk: 8.2.0 arg: 4.1.3 @@ -14735,7 +13388,7 @@ packages: yn: 3.1.1 dev: true - /ts-node/10.9.1_ja6kqa52slkljcytwd5yeactma: + /ts-node/10.9.1_l26xbtqzhteigi5cpzp2eyiyva: resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -14750,11 +13403,12 @@ packages: optional: true dependencies: '@cspotcode/source-map-support': 0.8.1 + '@swc/core': 1.2.204 '@tsconfig/node10': 1.0.9 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.3 - '@types/node': 18.16.14 + '@types/node': 18.16.16 acorn: 8.8.2 acorn-walk: 8.2.0 arg: 4.1.3 @@ -14812,17 +13466,6 @@ packages: typescript: 4.9.5 dev: true - /tsx/3.12.7: - resolution: {integrity: sha512-C2Ip+jPmqKd1GWVQDvz/Eyc6QJbGfE7NrR3fx5BpEHMZsEHoIxHL1j+lKdGobr8ovEyqeNkPLSKp6SCSOt7gmw==} - hasBin: true - dependencies: - '@esbuild-kit/cjs-loader': 2.4.2 - '@esbuild-kit/core-utils': 3.1.0 - '@esbuild-kit/esm-loader': 2.5.5 - optionalDependencies: - fsevents: 2.3.2 - dev: true - /tty-browserify/0.0.1: resolution: {integrity: sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==} dev: true @@ -14907,11 +13550,6 @@ packages: resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} engines: {node: '>=8'} - /type-fest/1.4.0: - resolution: {integrity: sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==} - engines: {node: '>=10'} - dev: true - /type-is/1.6.18: resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} engines: {node: '>= 0.6'} @@ -14949,8 +13587,10 @@ packages: hasBin: true dev: true - /ufo/1.1.1: - resolution: {integrity: sha512-MvlCc4GHrmZdAllBc0iUDowff36Q9Ndw/UzqmEKyrfSzokTd9ZCy1i+IIk5hrYKkjoYVQyNbrw7/F8XJ2rEwTg==} + /typescript/5.1.3: + resolution: {integrity: sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==} + engines: {node: '>=14.17'} + hasBin: true dev: true /unbox-primitive/1.0.2: @@ -14961,42 +13601,8 @@ packages: has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 - /unbuild/1.2.0: - resolution: {integrity: sha512-GcolNMBatav7FbRdLDR8BMbnYWMoKfxXdJIHibpBtx3GERN4GbbUD5h4RfGIFi+mjWPz4AphSz5gIg9FWNWw3Q==} - hasBin: true - dependencies: - '@rollup/plugin-alias': 4.0.4_rollup@3.21.3 - '@rollup/plugin-commonjs': 24.1.0_rollup@3.21.3 - '@rollup/plugin-json': 6.0.0_rollup@3.21.3 - '@rollup/plugin-node-resolve': 15.0.2_rollup@3.21.3 - '@rollup/plugin-replace': 5.0.2_rollup@3.21.3 - '@rollup/pluginutils': 5.0.2_rollup@3.21.3 - chalk: 5.2.0 - consola: 2.15.3 - defu: 6.1.2 - esbuild: 0.17.18 - globby: 13.1.3 - hookable: 5.5.3 - jiti: 1.18.2 - magic-string: 0.30.0 - mkdist: 1.2.0_typescript@5.0.4 - mlly: 1.2.0 - mri: 1.2.0 - pathe: 1.1.0 - pkg-types: 1.0.3 - pretty-bytes: 6.1.0 - rollup: 3.21.3 - rollup-plugin-dts: 5.3.0_enlefojnmpwsbnjrufommarvom - scule: 1.0.0 - typescript: 5.0.4 - untyped: 1.3.2 - transitivePeerDependencies: - - sass - - supports-color - dev: true - - /undici/5.22.0: - resolution: {integrity: sha512-fR9RXCc+6Dxav4P9VV/sp5w3eFiSdOjJYsbtWfd4s5L5C4ogyuVpdKIVHeW0vV1MloM65/f7W45nR9ZxwVdyiA==} + /undici/5.22.1: + resolution: {integrity: sha512-Ji2IJhFXZY0x/0tVBXeQwgPlLWw13GVzpsWPQ3rV50IFMMof2I55PZZxtm4P6iNq+L5znYN9nSTAq0ZyE6lSJw==} engines: {node: '>=14.0'} dependencies: busboy: 1.6.0 @@ -15048,12 +13654,6 @@ packages: dependencies: crypto-random-string: 2.0.0 - /unist-util-stringify-position/2.0.3: - resolution: {integrity: sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==} - dependencies: - '@types/unist': 2.0.6 - dev: true - /universal-user-agent/6.0.0: resolution: {integrity: sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==} dev: true @@ -15077,21 +13677,6 @@ packages: engines: {node: '>=8'} dev: true - /untyped/1.3.2: - resolution: {integrity: sha512-z219Z65rOGD6jXIvIhpZFfwWdqQckB8sdZec2NO+TkcH1Bph7gL0hwLzRJs1KsOo4Jz4mF9guBXhsEnyEBGVfw==} - hasBin: true - dependencies: - '@babel/core': 7.21.8 - '@babel/standalone': 7.21.8 - '@babel/types': 7.21.5 - defu: 6.1.2 - jiti: 1.18.2 - mri: 1.2.0 - scule: 1.0.0 - transitivePeerDependencies: - - supports-color - dev: true - /unzip-response/2.0.1: resolution: {integrity: sha512-N0XH6lqDtFH84JxptQoZYmloF4nzrQqqrAymNj+/gW60AO2AZgOcf4O/nUXJcYfyQkqvMo9lSupBZmmgvuVXlw==} engines: {node: '>=4'} @@ -15188,6 +13773,10 @@ packages: resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} hasBin: true + /uuid/9.0.0: + resolution: {integrity: sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==} + hasBin: true + /v8-compile-cache-lib/3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} dev: true @@ -15262,143 +13851,6 @@ packages: replace-ext: 1.0.1 dev: true - /vite-node/0.31.1_@types+node@18.16.14: - resolution: {integrity: sha512-BajE/IsNQ6JyizPzu9zRgHrBwczkAs0erQf/JRpgTIESpKvNj9/Gd0vxX905klLkb0I0SJVCKbdrl5c6FnqYKA==} - engines: {node: '>=v14.18.0'} - hasBin: true - dependencies: - cac: 6.7.14 - debug: 4.3.4 - mlly: 1.2.0 - pathe: 1.1.0 - picocolors: 1.0.0 - vite: 4.3.4_@types+node@18.16.14 - transitivePeerDependencies: - - '@types/node' - - less - - sass - - stylus - - sugarss - - supports-color - - terser - dev: true - - /vite/4.3.4_@types+node@18.16.14: - resolution: {integrity: sha512-f90aqGBoxSFxWph2b39ae2uHAxm5jFBBdnfueNxZAT1FTpM13ccFQExCaKbR2xFW5atowjleRniQ7onjJ22QEg==} - engines: {node: ^14.18.0 || >=16.0.0} - hasBin: true - peerDependencies: - '@types/node': '>= 14' - less: '*' - sass: '*' - stylus: '*' - sugarss: '*' - terser: ^5.4.0 - peerDependenciesMeta: - '@types/node': - optional: true - less: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - dependencies: - '@types/node': 18.16.14 - esbuild: 0.17.19 - postcss: 8.4.23 - rollup: 3.21.3 - optionalDependencies: - fsevents: 2.3.2 - dev: true - - /vitest/0.31.1: - resolution: {integrity: sha512-/dOoOgzoFk/5pTvg1E65WVaobknWREN15+HF+0ucudo3dDG/vCZoXTQrjIfEaWvQXmqScwkRodrTbM/ScMpRcQ==} - engines: {node: '>=v14.18.0'} - hasBin: true - peerDependencies: - '@edge-runtime/vm': '*' - '@vitest/browser': '*' - '@vitest/ui': '*' - happy-dom: '*' - jsdom: '*' - playwright: '*' - safaridriver: '*' - webdriverio: '*' - peerDependenciesMeta: - '@edge-runtime/vm': - optional: true - '@vitest/browser': - optional: true - '@vitest/ui': - optional: true - happy-dom: - optional: true - jsdom: - optional: true - playwright: - optional: true - safaridriver: - optional: true - webdriverio: - optional: true - dependencies: - '@types/chai': 4.3.5 - '@types/chai-subset': 1.3.3 - '@types/node': 18.16.14 - '@vitest/expect': 0.31.1 - '@vitest/runner': 0.31.1 - '@vitest/snapshot': 0.31.1 - '@vitest/spy': 0.31.1 - '@vitest/utils': 0.31.1 - acorn: 8.8.2 - acorn-walk: 8.2.0 - cac: 6.7.14 - chai: 4.3.7 - concordance: 5.0.4 - debug: 4.3.4 - local-pkg: 0.4.3 - magic-string: 0.30.0 - pathe: 1.1.0 - picocolors: 1.0.0 - std-env: 3.3.2 - strip-literal: 1.0.1 - tinybench: 2.5.0 - tinypool: 0.5.0 - vite: 4.3.4_@types+node@18.16.14 - vite-node: 0.31.1_@types+node@18.16.14 - why-is-node-running: 2.2.2 - transitivePeerDependencies: - - less - - sass - - stylus - - sugarss - - supports-color - - terser - dev: true - - /vue-eslint-parser/9.2.0_eslint@8.41.0: - resolution: {integrity: sha512-aFXipsUbKU4TzgP9OU6cXIm2Nnp9ryKJc2mzY0s2xzwfjHg6WDT33LUAQRGR9K0NFncBgUEZ2njdrS3Lj/sOLw==} - engines: {node: ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: '>=6.0.0' - dependencies: - debug: 4.3.4 - eslint: 8.41.0 - eslint-scope: 7.2.0 - eslint-visitor-keys: 3.4.1 - espree: 9.5.2 - esquery: 1.5.0 - lodash: 4.17.21 - semver: 7.5.1 - transitivePeerDependencies: - - supports-color - dev: true - /walk-up-path/1.0.0: resolution: {integrity: sha512-hwj/qMDUEjCU5h0xr90KGCf0tg0/LgJbmOWgrWKYlcJZM7XvquvUJZ0G/HMGr7F7OQMOUuPHWP9JpriinkAlkg==} dev: true @@ -15446,8 +13898,8 @@ packages: engines: {node: '>=10.13.0'} dev: true - /webpack/5.84.0: - resolution: {integrity: sha512-XezNK3kwJq6IyeoZmZ1uEqQs+42nTqIi4jYM/YjLwaJedUC1N3bwnCC0+UcnHJPfqWX0kGrQnMIvZZyWYaIZrA==} + /webpack/5.87.0: + resolution: {integrity: sha512-GOu1tNbQ7p1bDEoFRs2YPcfyGs8xq52yyPBZ3m2VGnXGtV9MxjrkABHm4V9Ia280OefsSLzvbVoXcfLxjKY/Iw==} engines: {node: '>=10.13.0'} hasBin: true peerDependencies: @@ -15465,7 +13917,7 @@ packages: acorn-import-assertions: 1.9.0_acorn@8.8.2 browserslist: 4.21.4 chrome-trace-event: 1.0.3 - enhanced-resolve: 5.14.1 + enhanced-resolve: 5.15.0 es-module-lexer: 1.2.1 eslint-scope: 5.1.1 events: 3.3.0 @@ -15475,9 +13927,9 @@ packages: loader-runner: 4.3.0 mime-types: 2.1.35 neo-async: 2.6.2 - schema-utils: 3.1.2 + schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.8_webpack@5.84.0 + terser-webpack-plugin: 5.3.8_webpack@5.87.0 watchpack: 2.4.0 webpack-sources: 3.2.3 transitivePeerDependencies: @@ -15491,11 +13943,6 @@ packages: hasBin: true dev: true - /well-known-symbols/2.0.0: - resolution: {integrity: sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q==} - engines: {node: '>=6'} - dev: true - /whatwg-url/11.0.0: resolution: {integrity: sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==} engines: {node: '>=12'} @@ -15560,15 +14007,6 @@ packages: isexe: 2.0.0 dev: true - /why-is-node-running/2.2.2: - resolution: {integrity: sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==} - engines: {node: '>=8'} - hasBin: true - dependencies: - siginfo: 2.0.0 - stackback: 0.0.2 - dev: true - /wide-align/1.1.5: resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} dependencies: @@ -15646,11 +14084,6 @@ packages: engines: {node: '>=8'} dev: true - /xml-name-validator/4.0.0: - resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} - engines: {node: '>=12'} - dev: true - /xml/1.0.1: resolution: {integrity: sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw==} dev: true @@ -15675,15 +14108,6 @@ packages: /yallist/4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - /yaml-eslint-parser/1.2.0: - resolution: {integrity: sha512-OmuvQd5lyIJWfFALc39K5fGqp0aWNc+EtyhVgcQIPZaUKMnTb7An3RMp+QJizJ/x0F4kpgTNe6BL/ctdvoIwIg==} - engines: {node: ^14.17.0 || >=16.0.0} - dependencies: - eslint-visitor-keys: 3.4.1 - lodash: 4.17.21 - yaml: 2.2.2 - dev: true - /yaml/2.2.2: resolution: {integrity: sha512-CBKFWExMn46Foo4cldiChEzn7S7SRV+wqiluAb6xmueD/fGyRHIhX8m14vVGgeFWjN540nKCNVj6P21eQjgTuA==} engines: {node: '>= 14'} @@ -15927,7 +14351,7 @@ packages: dependencies: '@types/fs-extra': 11.0.1 '@types/minimist': 1.2.2 - '@types/node': 18.16.14 + '@types/node': 18.16.16 '@types/ps-tree': 1.1.2 '@types/which': 3.0.0 chalk: 5.2.0 diff --git a/scripts/ci/publish.ts b/scripts/ci/publish.ts index 9c0900d70689..295019ef91d0 100644 --- a/scripts/ci/publish.ts +++ b/scripts/ci/publish.ts @@ -810,12 +810,12 @@ async function testPackages(packages: Packages, publishOrder: string[][]): Promi if (process.env.BUILDKITE_PARALLEL_JOB === '0') { await run( path.dirname(pkg.path), - 'PRISMA_CLIENT_ENGINE_TYPE="library" PRISMA_CLI_QUERY_ENGINE_TYPE="library" pnpm run test', + 'PRISMA_CLIENT_ENGINE_TYPE="library" PRISMA_CLI_QUERY_ENGINE_TYPE="library" pnpm run test --silent', ) } else if (process.env.BUILDKITE_PARALLEL_JOB === '1') { await run( path.dirname(pkg.path), - 'PRISMA_CLIENT_ENGINE_TYPE="binary" PRISMA_CLI_QUERY_ENGINE_TYPE="binary" pnpm run test', + 'PRISMA_CLIENT_ENGINE_TYPE="binary" PRISMA_CLI_QUERY_ENGINE_TYPE="binary" pnpm run test --silent', ) } else { await run(path.dirname(pkg.path), 'pnpm run test') diff --git a/tsconfig.build.bundle.json b/tsconfig.build.bundle.json index e5950b38153e..85dd42c8189c 100644 --- a/tsconfig.build.bundle.json +++ b/tsconfig.build.bundle.json @@ -3,7 +3,6 @@ "extends": "./tsconfig.build.regular.json", "compilerOptions": { "paths": { - "@prisma/ni": ["./packages/ni/src"], "@prisma/client": ["./packages/client/src"], "@prisma/client/runtime": ["./packages/client/runtime"], "@prisma/internals": ["./packages/internals/src"],