UNPKG

@prisma/client

Version:

Prisma Client is an auto-generated, type-safe and modern JavaScript/TypeScript ORM for Node.js that's tailored to your data. Supports PostgreSQL, CockroachDB, MySQL, MariaDB, SQL Server, SQLite & MongoDB databases.

4 lines • 1.01 MB
{ "version": 3, "sources": ["../../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js", "../../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js", "../../../node_modules/.pnpm/supports-hyperlinks@3.2.0/node_modules/supports-hyperlinks/index.js", "../../internals/package.json", "../../../node_modules/.pnpm/@prisma+engines-version@6.18.0-8.34b5a692b7bd79939a9a2c3ef97d816e749cda2f/node_modules/@prisma/engines-version/package.json", "../../../node_modules/.pnpm/@prisma+engines-version@6.18.0-8.34b5a692b7bd79939a9a2c3ef97d816e749cda2f/node_modules/@prisma/engines-version/index.js", "../../../node_modules/.pnpm/min-indent@1.0.1/node_modules/min-indent/index.js", "../../../node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/index.js", "../../../node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/package.json", "../../../node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/lib/main.js", "../../../node_modules/.pnpm/new-github-issue-url@0.2.1/node_modules/new-github-issue-url/index.js", "../../../node_modules/.pnpm/js-levenshtein@1.1.6/node_modules/js-levenshtein/index.js", "../../ts-builders/src/TypeBuilder.ts", "../../ts-builders/src/KeyType.ts", "../src/runtime/core/extensions/index.ts", "../src/runtime/core/extensions/defineExtension.ts", "../src/runtime/core/extensions/getExtensionContext.ts", "../src/runtime/core/public/index.ts", "../src/runtime/core/public/validator.ts", "../../../node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.mjs", "../../debug/src/index.ts", "../../get-platform/src/assertNodeAPISupported.ts", "../../get-platform/src/binaryTargets.ts", "../../get-platform/src/getNodeAPIName.ts", "../../get-platform/src/getPlatform.ts", "../../../node_modules/.pnpm/ts-pattern@5.6.2/node_modules/ts-pattern/src/internals/symbols.ts", "../../../node_modules/.pnpm/ts-pattern@5.6.2/node_modules/ts-pattern/src/internals/helpers.ts", "../../../node_modules/.pnpm/ts-pattern@5.6.2/node_modules/ts-pattern/src/is-matching.ts", "../../../node_modules/.pnpm/ts-pattern@5.6.2/node_modules/ts-pattern/src/patterns.ts", "../../../node_modules/.pnpm/ts-pattern@5.6.2/node_modules/ts-pattern/src/errors.ts", "../../../node_modules/.pnpm/ts-pattern@5.6.2/node_modules/ts-pattern/src/match.ts", "../../get-platform/src/logger.ts", "../../../node_modules/.pnpm/ansi-escapes@7.0.0/node_modules/ansi-escapes/base.js", "../../../node_modules/.pnpm/environment@1.1.0/node_modules/environment/index.js", "../../../node_modules/.pnpm/terminal-link@4.0.0/node_modules/terminal-link/index.js", "../../get-platform/src/link.ts", "../../internals/src/utils/getVersionFromPackageJson.ts", "../../internals/src/client/getClientEngineType.ts", "../../driver-adapter-utils/src/error.ts", "../../driver-adapter-utils/src/result.ts", "../../driver-adapter-utils/src/binder.ts", "../../engines/src/index.ts", "../../internals/src/utils/chmodPlusX.ts", "../../internals/src/utils/handleEngineLoadingErrors.ts", "../../../node_modules/.pnpm/strip-indent@4.0.0/node_modules/strip-indent/index.js", "../../internals/src/utils/prismaPostgres.ts", "../../internals/src/get-generators/utils/printGeneratorConfig.ts", "../../internals/src/logger.ts", "../../internals/src/utils/assertAlways.ts", "../../internals/src/utils/assertNever.ts", "../../../node_modules/.pnpm/ansi-regex@6.1.0/node_modules/ansi-regex/index.js", "../../../node_modules/.pnpm/strip-ansi@7.1.0/node_modules/strip-ansi/index.js", "../../internals/src/utils/path.ts", "../../internals/src/utils/tryLoadEnvs.ts", "../../internals/src/dotenvExpand.ts", "../../internals/src/utils/hasOwnProperty.ts", "../../internals/src/utils/mapObjectValues.ts", "../../internals/src/utils/max.ts", "../../internals/src/utils/setClassName.ts", "../../internals/src/warnOnce.ts", "../src/runtime/core/errors/PrismaClientInitializationError.ts", "../src/runtime/core/errors/PrismaClientKnownRequestError.ts", "../src/runtime/core/errors/PrismaClientRustPanicError.ts", "../src/runtime/core/errors/PrismaClientUnknownRequestError.ts", "../src/runtime/core/errors/PrismaClientValidationError.ts", "../../client-common/src/Cache.ts", "../../client-common/src/casing.ts", "../../client-common/src/Dictionary.ts", "../../client-common/src/lazyProperty.ts", "../../client-common/src/runtimeDataModel.ts", "../src/runtime/utils/date.ts", "../../../node_modules/.pnpm/decimal.js@10.5.0/node_modules/decimal.js/decimal.mjs", "../src/runtime/utils/decimalJsLike.ts", "../../dmmf/src/index.ts", "../../dmmf/src/convert.ts", "../../dmmf/src/dmmf.ts", "../src/runtime/utils/createErrorMessageWithContext.ts", "../src/runtime/utils/SourceFileSlice.ts", "../src/runtime/highlight/theme.ts", "../src/runtime/highlight/prism.ts", "../src/runtime/highlight/highlight.ts", "../src/runtime/utils/dedent.ts", "../src/runtime/core/errorRendering/applyValidationError.ts", "../src/runtime/core/errorRendering/applyUnionError.ts", "../src/runtime/core/errorRendering/ObjectFieldSuggestion.ts", "../../ts-builders/src/index.ts", "../../ts-builders/src/Writer.ts", "../src/runtime/core/errorRendering/ArrayField.ts", "../src/runtime/core/errorRendering/base.ts", "../src/runtime/core/errorRendering/FormattedString.ts", "../src/runtime/core/errorRendering/Value.ts", "../src/runtime/core/errorRendering/ArrayValue.ts", "../src/runtime/core/errorRendering/ObjectValue.ts", "../src/runtime/core/errorRendering/ScalarValue.ts", "../src/runtime/core/errorRendering/SuggestionObjectValue.ts", "../src/runtime/core/model/FieldRef.ts", "../src/runtime/core/types/exported/ObjectEnums.ts", "../src/runtime/core/errorRendering/ObjectField.ts", "../src/runtime/core/errorRendering/ArgumentsRenderingTree.ts", "../src/runtime/core/errorRendering/throwValidationException.ts", "../src/runtime/core/model/utils/dmmfToJSModelName.ts", "../src/runtime/core/extensions/resultUtils.ts", "../src/runtime/core/extensions/MergedExtensionsList.ts", "../src/runtime/core/model/Param.ts", "../src/runtime/core/types/exported/Skip.ts", "../src/runtime/core/jsonProtocol/serializeJsonQuery.ts", "../src/runtime/core/metrics/MetricsClient.ts", "../src/runtime/core/runtimeDataModel.ts", "../src/runtime/core/types/exported/TypedSql.ts", "../src/runtime/getPrismaClient.ts", "../../../node_modules/.pnpm/sql-template-tag@5.2.1/node_modules/sql-template-tag/src/index.ts", "../src/runtime/core/compositeProxy/addObjectProperties.ts", "../src/runtime/core/compositeProxy/addProperty.ts", "../src/runtime/core/compositeProxy/cacheProperties.ts", "../src/runtime/core/model/utils/defaultProxyHandlers.ts", "../src/runtime/core/compositeProxy/createCompositeProxy.ts", "../src/runtime/core/compositeProxy/removeProperties.ts", "../src/runtime/core/engines/common/utils/getBatchRequestPayload.ts", "../src/runtime/core/errorRendering/prettyPrintArguments.ts", "../src/runtime/core/errors/utils/prismaGraphQLToJSError.ts", "../../../node_modules/.pnpm/stacktrace-parser@0.1.11/node_modules/stacktrace-parser/dist/stack-trace-parser.esm.js", "../src/runtime/utils/CallSite.ts", "../src/runtime/core/model/aggregates/utils/aggregateMap.ts", "../src/runtime/core/model/aggregates/aggregate.ts", "../src/runtime/core/model/aggregates/count.ts", "../src/runtime/core/model/aggregates/groupBy.ts", "../src/runtime/core/model/applyAggregates.ts", "../src/runtime/core/model/applyFieldsProxy.ts", "../src/runtime/utils/deep-set.ts", "../src/runtime/core/model/applyFluent.ts", "../src/runtime/core/model/applyModel.ts", "../src/runtime/core/model/utils/jsToDMMFModelName.ts", "../src/runtime/core/model/applyModelsAndClientExtensions.ts", "../src/runtime/core/extensions/$extends.ts", "../src/runtime/core/extensions/applyResultExtensions.ts", "../src/runtime/core/extensions/visitQueryResult.ts", "../src/runtime/core/extensions/applyAllResultExtensions.ts", "../src/runtime/core/types/exported/itxClientDenyList.ts", "../src/runtime/utils/deepCloneArgs.ts", "../src/runtime/core/extensions/applyQueryExtensions.ts", "../src/runtime/core/init/checkPlatformCaching.ts", "../src/runtime/core/init/getDatasourceOverrides.ts", "../src/runtime/core/engines/common/resolveEnginePath.ts", "../src/runtime/core/engines/common/errors/engine-not-found/addRuntimeToYourBinaryTargets.ts", "../src/runtime/core/engines/common/errors/engine-not-found/queryEngineCannotBeFound.ts", "../src/runtime/core/engines/common/errors/engine-not-found/theseLocationsHaveBeenSearched.ts", "../src/runtime/core/engines/common/errors/engine-not-found/binaryTargetsWasIncorrectlyPinned.ts", "../src/runtime/core/engines/common/errors/weWouldAppreciateIfYouCouldShareInfo.ts", "../src/runtime/core/engines/common/errors/engine-not-found/howToFixEngineNotFoundNextjs.ts", "../src/runtime/core/engines/common/errors/engine-not-found/bundlerHasTamperedWithEngineCopy.ts", "../src/runtime/core/engines/common/errors/engine-not-found/nativeGeneratedOnDifferentPlatform.ts", "../src/runtime/core/engines/common/errors/engine-not-found/toolingHasTamperedWithEngineCopy.ts", "../src/runtime/core/engines/common/utils/maskQuery.ts", "../src/runtime/core/engines/common/utils/normalizeLogs.ts", "../src/runtime/core/engines/common/utils/util.ts", "../src/runtime/core/engines/common/utils/getErrorMessageWithLink.ts", "../../client-engine-runtime/src/utils.ts", "../../client-engine-runtime/src/json-protocol.ts", "../package.json", "../src/runtime/utils/getRuntime.ts", "../src/runtime/core/init/resolveDatasourceUrl.ts", "../src/runtime/core/errors/PrismaClientError.ts", "../src/runtime/core/engines/data-proxy/errors/DataProxyError.ts", "../src/runtime/core/engines/data-proxy/errors/utils/setRetryable.ts", "../src/runtime/core/engines/data-proxy/errors/InvalidDatasourceError.ts", "../src/runtime/core/engines/common/accelerate/getUrlAndApiKey.ts", "../src/runtime/core/engines/common/accelerate/HeaderBuilder.ts", "../src/runtime/core/engines/data-proxy/utils/EngineTimestamp.ts", "../src/runtime/core/engines/data-proxy/errors/ForcedRetryError.ts", "../src/runtime/core/engines/data-proxy/errors/NotImplementedYetError.ts", "../src/runtime/core/engines/data-proxy/errors/DataProxyAPIError.ts", "../src/runtime/core/engines/data-proxy/errors/SchemaMissingError.ts", "../src/runtime/core/engines/data-proxy/errors/BadRequestError.ts", "../src/runtime/core/engines/data-proxy/errors/EngineHealthcheckTimeoutError.ts", "../src/runtime/core/engines/data-proxy/errors/EngineStartupError.ts", "../src/runtime/core/engines/data-proxy/errors/EngineVersionNotSupportedError.ts", "../src/runtime/core/engines/data-proxy/errors/GatewayTimeoutError.ts", "../src/runtime/core/engines/data-proxy/errors/InteractiveTransactionError.ts", "../src/runtime/core/engines/data-proxy/errors/InvalidRequestError.ts", "../src/runtime/core/engines/data-proxy/errors/NotFoundError.ts", "../src/runtime/core/engines/data-proxy/errors/ServerError.ts", "../src/runtime/core/engines/data-proxy/errors/UnauthorizedError.ts", "../src/runtime/core/engines/data-proxy/errors/UsageExceededError.ts", "../src/runtime/core/engines/data-proxy/errors/utils/responseToError.ts", "../src/runtime/core/engines/data-proxy/utils/backOff.ts", "../src/runtime/core/engines/data-proxy/utils/base64.ts", "../src/runtime/core/engines/data-proxy/utils/checkForbiddenMetrics.ts", "../../engines/package.json", "../src/runtime/core/engines/data-proxy/errors/NetworkError.ts", "../src/runtime/core/engines/data-proxy/utils/request.ts", "../src/runtime/core/engines/data-proxy/utils/getClientVersion.ts", "../src/runtime/core/engines/data-proxy/DataProxyEngine.ts", "../src/runtime/core/engines/common/utils/getInteractiveTransactionId.ts", "../src/runtime/core/engines/library/DefaultLibraryLoader.ts", "../src/runtime/core/engines/library/WasmLibraryLoader.ts", "../src/runtime/core/engines/library/LibraryEngine.ts", "../src/runtime/core/init/validateEngineInstanceConfig.ts", "../src/runtime/core/init/getEngineInstance.ts", "../src/runtime/core/init/getPreviewFeatures.ts", "../src/runtime/core/raw-query/rawCommandArgsMapper.ts", "../src/runtime/utils/mssqlPreparedStatement.ts", "../src/runtime/utils/serializeRawParameters.ts", "../src/runtime/core/raw-query/rawQueryArgsMapper.ts", "../src/runtime/core/request/createPrismaPromise.ts", "../src/runtime/core/tracing/TracingHelper.ts", "../src/runtime/core/transaction/utils/createLockCountPromise.ts", "../src/runtime/getLogLevel.ts", "../src/runtime/core/errors/ErrorWithBatchIndex.ts", "../src/runtime/core/jsonProtocol/getBatchId.ts", "../src/runtime/core/jsonProtocol/isWrite.ts", "../src/runtime/DataLoader.ts", "../src/runtime/utils/deserializeRawResults.ts", "../src/runtime/RequestHandler.ts", "../src/runtime/utils/clientVersion.ts", "../src/runtime/utils/validatePrismaClientOptions.ts", "../src/runtime/core/errors/PrismaClientConstructorValidationError.ts", "../src/runtime/utils/waitForBatch.ts", "../src/runtime/strictEnum.ts", "../src/runtime/warnEnvConflicts.ts"], "sourcesContent": ["'use strict';\n\nmodule.exports = (flag, argv = process.argv) => {\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst position = argv.indexOf(prefix + flag);\n\tconst terminatorPosition = argv.indexOf('--');\n\treturn position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);\n};\n", "'use strict';\nconst os = require('os');\nconst tty = require('tty');\nconst hasFlag = require('has-flag');\n\nconst {env} = process;\n\nlet forceColor;\nif (hasFlag('no-color') ||\n\thasFlag('no-colors') ||\n\thasFlag('color=false') ||\n\thasFlag('color=never')) {\n\tforceColor = 0;\n} else if (hasFlag('color') ||\n\thasFlag('colors') ||\n\thasFlag('color=true') ||\n\thasFlag('color=always')) {\n\tforceColor = 1;\n}\n\nif ('FORCE_COLOR' in env) {\n\tif (env.FORCE_COLOR === 'true') {\n\t\tforceColor = 1;\n\t} else if (env.FORCE_COLOR === 'false') {\n\t\tforceColor = 0;\n\t} else {\n\t\tforceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);\n\t}\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3\n\t};\n}\n\nfunction supportsColor(haveStream, streamIsTTY) {\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (hasFlag('color=16m') ||\n\t\thasFlag('color=full') ||\n\t\thasFlag('color=truecolor')) {\n\t\treturn 3;\n\t}\n\n\tif (hasFlag('color=256')) {\n\t\treturn 2;\n\t}\n\n\tif (haveStream && !streamIsTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\t// Windows 10 build 10586 is the first Windows release that supports 256 colors.\n\t\t// Windows 10 build 14931 is the first release that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(osRelease[0]) >= 10 &&\n\t\t\tNumber(osRelease[2]) >= 10586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app':\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\tcase 'Apple_Terminal':\n\t\t\t\treturn 2;\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nfunction getSupportLevel(stream) {\n\tconst level = supportsColor(stream, stream && stream.isTTY);\n\treturn translateLevel(level);\n}\n\nmodule.exports = {\n\tsupportsColor: getSupportLevel,\n\tstdout: translateLevel(supportsColor(true, tty.isatty(1))),\n\tstderr: translateLevel(supportsColor(true, tty.isatty(2)))\n};\n", "'use strict';\nconst supportsColor = require('supports-color');\nconst hasFlag = require('has-flag');\n\n/**\n@param {string} versionString\n@returns {{ major: number, minor: number, patch: number }}\n*/\nfunction parseVersion(versionString) {\n\tif (/^\\d{3,4}$/.test(versionString)) {\n\t\t// Env var doesn't always use dots. example: 4601 => 46.1.0\n\t\tconst m = /(\\d{1,2})(\\d{2})/.exec(versionString) || [];\n\t\treturn {\n\t\t\tmajor: 0,\n\t\t\tminor: parseInt(m[1], 10),\n\t\t\tpatch: parseInt(m[2], 10)\n\t\t};\n\t}\n\n\tconst versions = (versionString || '').split('.').map(n => parseInt(n, 10));\n\treturn {\n\t\tmajor: versions[0],\n\t\tminor: versions[1],\n\t\tpatch: versions[2]\n\t};\n}\n\n/**\n@param {{ isTTY?: boolean | undefined }} stream\n@returns {boolean}\n*/\n// eslint-disable-next-line complexity\nfunction supportsHyperlink(stream) {\n\tconst {\n\t\tCI,\n\t\tFORCE_HYPERLINK,\n\t\tNETLIFY,\n\t\tTEAMCITY_VERSION,\n\t\tTERM_PROGRAM,\n\t\tTERM_PROGRAM_VERSION,\n\t\tVTE_VERSION,\n\t\tTERM,\n\t} = process.env;\n\n\tif (FORCE_HYPERLINK) {\n\t\treturn !(FORCE_HYPERLINK.length > 0 && parseInt(FORCE_HYPERLINK, 10) === 0);\n\t}\n\n\tif (hasFlag('no-hyperlink') || hasFlag('no-hyperlinks') || hasFlag('hyperlink=false') || hasFlag('hyperlink=never')) {\n\t\treturn false;\n\t}\n\n\tif (hasFlag('hyperlink=true') || hasFlag('hyperlink=always')) {\n\t\treturn true;\n\t}\n\n\t// Netlify does not run a TTY, it does not need `supportsColor` check\n\tif (NETLIFY) {\n\t\treturn true;\n\t}\n\n\t// If they specify no colors, they probably don't want hyperlinks.\n\tif (!supportsColor.supportsColor(stream)) {\n\t\treturn false;\n\t}\n\n\tif (stream && !stream.isTTY) {\n\t\treturn false;\n\t}\n\n\t// Windows Terminal\n\tif ('WT_SESSION' in process.env) {\n\t\treturn true;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\treturn false;\n\t}\n\n\tif (CI) {\n\t\treturn false;\n\t}\n\n\tif (TEAMCITY_VERSION) {\n\t\treturn false;\n\t}\n\n\tif (TERM_PROGRAM) {\n\t\tconst version = parseVersion(TERM_PROGRAM_VERSION || '');\n\n\t\tswitch (TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app':\n\t\t\t\tif (version.major === 3) {\n\t\t\t\t\treturn version.minor >= 1;\n\t\t\t\t}\n\n\t\t\t\treturn version.major > 3;\n\t\t\tcase 'WezTerm':\n\t\t\t\treturn version.major >= 20200620;\n\t\t\tcase 'vscode':\n\t\t\t\t// eslint-disable-next-line no-mixed-operators\n\t\t\t\treturn version.major > 1 || version.major === 1 && version.minor >= 72;\n\t\t\tcase 'ghostty':\n\t\t\t\treturn true;\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (VTE_VERSION) {\n\t\t// 0.50.0 was supposed to support hyperlinks, but throws a segfault\n\t\tif (VTE_VERSION === '0.50.0') {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst version = parseVersion(VTE_VERSION);\n\t\treturn version.major > 0 || version.minor >= 50;\n\t}\n\n\tswitch (TERM) {\n\t\tcase 'alacritty':\n\t\t\t// Support added in v0.11 (2022-10-13)\n\t\t\treturn true;\n\t\t// No default\n\t}\n\n\treturn false;\n}\n\nmodule.exports = {\n\tsupportsHyperlink,\n\tstdout: supportsHyperlink(process.stdout),\n\tstderr: supportsHyperlink(process.stderr)\n};\n", "{\n \"name\": \"@prisma/internals\",\n \"version\": \"6.18.0\",\n \"description\": \"This package is intended for Prisma's internal use\",\n \"main\": \"dist/index.js\",\n \"types\": \"dist/index.d.ts\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/prisma/prisma.git\",\n \"directory\": \"packages/internals\"\n },\n \"homepage\": \"https://www.prisma.io\",\n \"author\": \"Tim Suchanek <suchanek@prisma.io>\",\n \"bugs\": \"https://github.com/prisma/prisma/issues\",\n \"license\": \"Apache-2.0\",\n \"scripts\": {\n \"dev\": \"DEV=true tsx helpers/build.ts\",\n \"build\": \"tsx helpers/build.ts\",\n \"test\": \"dotenv -e ../../.db.env -- jest --silent\",\n \"prepublishOnly\": \"pnpm run build\"\n },\n \"files\": [\n \"README.md\",\n \"dist\",\n \"!**/libquery_engine*\",\n \"!dist/get-generators/engines/*\",\n \"scripts\"\n ],\n \"devDependencies\": {\n \"@babel/helper-validator-identifier\": \"7.25.9\",\n \"@opentelemetry/api\": \"1.9.0\",\n \"@swc/core\": \"1.11.5\",\n \"@swc/jest\": \"0.2.37\",\n \"@types/babel__helper-validator-identifier\": \"7.15.2\",\n \"@types/jest\": \"29.5.14\",\n \"@types/node\": \"18.19.76\",\n \"@types/resolve\": \"1.20.6\",\n \"archiver\": \"6.0.2\",\n \"checkpoint-client\": \"1.1.33\",\n \"cli-truncate\": \"4.0.0\",\n \"dotenv\": \"16.5.0\",\n \"empathic\": \"2.0.0\",\n \"escape-string-regexp\": \"5.0.0\",\n \"execa\": \"8.0.1\",\n \"fast-glob\": \"3.3.3\",\n \"find-up\": \"7.0.0\",\n \"fp-ts\": \"2.16.9\",\n \"fs-extra\": \"11.3.0\",\n \"global-directory\": \"4.0.0\",\n \"globby\": \"11.1.0\",\n \"identifier-regex\": \"1.0.0\",\n \"indent-string\": \"4.0.0\",\n \"is-windows\": \"1.0.2\",\n \"is-wsl\": \"3.1.0\",\n \"jest\": \"29.7.0\",\n \"jest-junit\": \"16.0.0\",\n \"kleur\": \"4.1.5\",\n \"mock-stdin\": \"1.0.0\",\n \"new-github-issue-url\": \"0.2.1\",\n \"node-fetch\": \"3.3.2\",\n \"npm-packlist\": \"5.1.3\",\n \"open\": \"7.4.2\",\n \"p-map\": \"4.0.0\",\n \"resolve\": \"1.22.10\",\n \"string-width\": \"7.2.0\",\n \"strip-indent\": \"4.0.0\",\n \"temp-dir\": \"2.0.0\",\n \"tempy\": \"1.0.1\",\n \"terminal-link\": \"4.0.0\",\n \"tmp\": \"0.2.3\",\n \"ts-pattern\": \"5.6.2\",\n \"ts-toolbelt\": \"9.6.0\",\n \"typescript\": \"5.4.5\",\n \"yarn\": \"1.22.22\"\n },\n \"dependencies\": {\n \"@prisma/config\": \"workspace:*\",\n \"@prisma/debug\": \"workspace:*\",\n \"@prisma/dmmf\": \"workspace:*\",\n \"@prisma/driver-adapter-utils\": \"workspace:*\",\n \"@prisma/engines\": \"workspace:*\",\n \"@prisma/fetch-engine\": \"workspace:*\",\n \"@prisma/generator\": \"workspace:*\",\n \"@prisma/generator-helper\": \"workspace:*\",\n \"@prisma/get-platform\": \"workspace:*\",\n \"@prisma/prisma-schema-wasm\": \"6.18.0-8.34b5a692b7bd79939a9a2c3ef97d816e749cda2f\",\n \"@prisma/schema-engine-wasm\": \"6.18.0-8.34b5a692b7bd79939a9a2c3ef97d816e749cda2f\",\n \"@prisma/schema-files-loader\": \"workspace:*\",\n \"arg\": \"5.0.2\",\n \"prompts\": \"2.4.2\"\n },\n \"peerDependencies\": {\n \"typescript\": \">=5.1.0\"\n },\n \"peerDependenciesMeta\": {\n \"typescript\": {\n \"optional\": true\n }\n },\n \"sideEffects\": false\n}", "{\n \"name\": \"@prisma/engines-version\",\n \"version\": \"6.18.0-8.34b5a692b7bd79939a9a2c3ef97d816e749cda2f\",\n \"main\": \"index.js\",\n \"types\": \"index.d.ts\",\n \"license\": \"Apache-2.0\",\n \"author\": \"Tim Suchanek <suchanek@prisma.io>\",\n \"prisma\": {\n \"enginesVersion\": \"34b5a692b7bd79939a9a2c3ef97d816e749cda2f\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/prisma/engines-wrapper.git\",\n \"directory\": \"packages/engines-version\"\n },\n \"devDependencies\": {\n \"@types/node\": \"18.19.76\",\n \"typescript\": \"4.9.5\"\n },\n \"files\": [\n \"index.js\",\n \"index.d.ts\"\n ],\n \"scripts\": {\n \"build\": \"tsc -d\"\n }\n}", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.enginesVersion = void 0;\nexports.enginesVersion = require('./package.json').prisma.enginesVersion;\n//# sourceMappingURL=index.js.map", "'use strict';\nmodule.exports = string => {\n\tconst match = string.match(/^[ \\t]*(?=\\S)/gm);\n\n\tif (!match) {\n\t\treturn 0;\n\t}\n\n\treturn match.reduce((r, a) => Math.min(r, a.length), Infinity);\n};\n", "'use strict';\n\nmodule.exports = (string, count = 1, options) => {\n\toptions = {\n\t\tindent: ' ',\n\t\tincludeEmptyLines: false,\n\t\t...options\n\t};\n\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError(\n\t\t\t`Expected \\`input\\` to be a \\`string\\`, got \\`${typeof string}\\``\n\t\t);\n\t}\n\n\tif (typeof count !== 'number') {\n\t\tthrow new TypeError(\n\t\t\t`Expected \\`count\\` to be a \\`number\\`, got \\`${typeof count}\\``\n\t\t);\n\t}\n\n\tif (typeof options.indent !== 'string') {\n\t\tthrow new TypeError(\n\t\t\t`Expected \\`options.indent\\` to be a \\`string\\`, got \\`${typeof options.indent}\\``\n\t\t);\n\t}\n\n\tif (count === 0) {\n\t\treturn string;\n\t}\n\n\tconst regex = options.includeEmptyLines ? /^/gm : /^(?!\\s*$)/gm;\n\n\treturn string.replace(regex, options.indent.repeat(count));\n};\n", "{\n \"name\": \"dotenv\",\n \"version\": \"16.5.0\",\n \"description\": \"Loads environment variables from .env file\",\n \"main\": \"lib/main.js\",\n \"types\": \"lib/main.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./lib/main.d.ts\",\n \"require\": \"./lib/main.js\",\n \"default\": \"./lib/main.js\"\n },\n \"./config\": \"./config.js\",\n \"./config.js\": \"./config.js\",\n \"./lib/env-options\": \"./lib/env-options.js\",\n \"./lib/env-options.js\": \"./lib/env-options.js\",\n \"./lib/cli-options\": \"./lib/cli-options.js\",\n \"./lib/cli-options.js\": \"./lib/cli-options.js\",\n \"./package.json\": \"./package.json\"\n },\n \"scripts\": {\n \"dts-check\": \"tsc --project tests/types/tsconfig.json\",\n \"lint\": \"standard\",\n \"pretest\": \"npm run lint && npm run dts-check\",\n \"test\": \"tap run --allow-empty-coverage --disable-coverage --timeout=60000\",\n \"test:coverage\": \"tap run --show-full-coverage --timeout=60000 --coverage-report=lcov\",\n \"prerelease\": \"npm test\",\n \"release\": \"standard-version\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git://github.com/motdotla/dotenv.git\"\n },\n \"homepage\": \"https://github.com/motdotla/dotenv#readme\",\n \"funding\": \"https://dotenvx.com\",\n \"keywords\": [\n \"dotenv\",\n \"env\",\n \".env\",\n \"environment\",\n \"variables\",\n \"config\",\n \"settings\"\n ],\n \"readmeFilename\": \"README.md\",\n \"license\": \"BSD-2-Clause\",\n \"devDependencies\": {\n \"@types/node\": \"^18.11.3\",\n \"decache\": \"^4.6.2\",\n \"sinon\": \"^14.0.1\",\n \"standard\": \"^17.0.0\",\n \"standard-version\": \"^9.5.0\",\n \"tap\": \"^19.2.0\",\n \"typescript\": \"^4.8.4\"\n },\n \"engines\": {\n \"node\": \">=12\"\n },\n \"browser\": {\n \"fs\": false\n }\n}\n", "const fs = require('fs')\nconst path = require('path')\nconst os = require('os')\nconst crypto = require('crypto')\nconst packageJson = require('../package.json')\n\nconst version = packageJson.version\n\nconst LINE = /(?:^|^)\\s*(?:export\\s+)?([\\w.-]+)(?:\\s*=\\s*?|:\\s+?)(\\s*'(?:\\\\'|[^'])*'|\\s*\"(?:\\\\\"|[^\"])*\"|\\s*`(?:\\\\`|[^`])*`|[^#\\r\\n]+)?\\s*(?:#.*)?(?:$|$)/mg\n\n// Parse src into an Object\nfunction parse (src) {\n const obj = {}\n\n // Convert buffer to string\n let lines = src.toString()\n\n // Convert line breaks to same format\n lines = lines.replace(/\\r\\n?/mg, '\\n')\n\n let match\n while ((match = LINE.exec(lines)) != null) {\n const key = match[1]\n\n // Default undefined or null to empty string\n let value = (match[2] || '')\n\n // Remove whitespace\n value = value.trim()\n\n // Check if double quoted\n const maybeQuote = value[0]\n\n // Remove surrounding quotes\n value = value.replace(/^(['\"`])([\\s\\S]*)\\1$/mg, '$2')\n\n // Expand newlines if double quoted\n if (maybeQuote === '\"') {\n value = value.replace(/\\\\n/g, '\\n')\n value = value.replace(/\\\\r/g, '\\r')\n }\n\n // Add to object\n obj[key] = value\n }\n\n return obj\n}\n\nfunction _parseVault (options) {\n const vaultPath = _vaultPath(options)\n\n // Parse .env.vault\n const result = DotenvModule.configDotenv({ path: vaultPath })\n if (!result.parsed) {\n const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`)\n err.code = 'MISSING_DATA'\n throw err\n }\n\n // handle scenario for comma separated keys - for use with key rotation\n // example: DOTENV_KEY=\"dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=prod,dotenv://:key_7890@dotenvx.com/vault/.env.vault?environment=prod\"\n const keys = _dotenvKey(options).split(',')\n const length = keys.length\n\n let decrypted\n for (let i = 0; i < length; i++) {\n try {\n // Get full key\n const key = keys[i].trim()\n\n // Get instructions for decrypt\n const attrs = _instructions(result, key)\n\n // Decrypt\n decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key)\n\n break\n } catch (error) {\n // last key\n if (i + 1 >= length) {\n throw error\n }\n // try next key\n }\n }\n\n // Parse decrypted .env string\n return DotenvModule.parse(decrypted)\n}\n\nfunction _warn (message) {\n console.log(`[dotenv@${version}][WARN] ${message}`)\n}\n\nfunction _debug (message) {\n console.log(`[dotenv@${version}][DEBUG] ${message}`)\n}\n\nfunction _dotenvKey (options) {\n // prioritize developer directly setting options.DOTENV_KEY\n if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) {\n return options.DOTENV_KEY\n }\n\n // secondary infra already contains a DOTENV_KEY environment variable\n if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) {\n return process.env.DOTENV_KEY\n }\n\n // fallback to empty string\n return ''\n}\n\nfunction _instructions (result, dotenvKey) {\n // Parse DOTENV_KEY. Format is a URI\n let uri\n try {\n uri = new URL(dotenvKey)\n } catch (error) {\n if (error.code === 'ERR_INVALID_URL') {\n const err = new Error('INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n throw error\n }\n\n // Get decrypt key\n const key = uri.password\n if (!key) {\n const err = new Error('INVALID_DOTENV_KEY: Missing key part')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n // Get environment\n const environment = uri.searchParams.get('environment')\n if (!environment) {\n const err = new Error('INVALID_DOTENV_KEY: Missing environment part')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n // Get ciphertext payload\n const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`\n const ciphertext = result.parsed[environmentKey] // DOTENV_VAULT_PRODUCTION\n if (!ciphertext) {\n const err = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`)\n err.code = 'NOT_FOUND_DOTENV_ENVIRONMENT'\n throw err\n }\n\n return { ciphertext, key }\n}\n\nfunction _vaultPath (options) {\n let possibleVaultPath = null\n\n if (options && options.path && options.path.length > 0) {\n if (Array.isArray(options.path)) {\n for (const filepath of options.path) {\n if (fs.existsSync(filepath)) {\n possibleVaultPath = filepath.endsWith('.vault') ? filepath : `${filepath}.vault`\n }\n }\n } else {\n possibleVaultPath = options.path.endsWith('.vault') ? options.path : `${options.path}.vault`\n }\n } else {\n possibleVaultPath = path.resolve(process.cwd(), '.env.vault')\n }\n\n if (fs.existsSync(possibleVaultPath)) {\n return possibleVaultPath\n }\n\n return null\n}\n\nfunction _resolveHome (envPath) {\n return envPath[0] === '~' ? path.join(os.homedir(), envPath.slice(1)) : envPath\n}\n\nfunction _configVault (options) {\n const debug = Boolean(options && options.debug)\n if (debug) {\n _debug('Loading env from encrypted .env.vault')\n }\n\n const parsed = DotenvModule._parseVault(options)\n\n let processEnv = process.env\n if (options && options.processEnv != null) {\n processEnv = options.processEnv\n }\n\n DotenvModule.populate(processEnv, parsed, options)\n\n return { parsed }\n}\n\nfunction configDotenv (options) {\n const dotenvPath = path.resolve(process.cwd(), '.env')\n let encoding = 'utf8'\n const debug = Boolean(options && options.debug)\n\n if (options && options.encoding) {\n encoding = options.encoding\n } else {\n if (debug) {\n _debug('No encoding is specified. UTF-8 is used by default')\n }\n }\n\n let optionPaths = [dotenvPath] // default, look for .env\n if (options && options.path) {\n if (!Array.isArray(options.path)) {\n optionPaths = [_resolveHome(options.path)]\n } else {\n optionPaths = [] // reset default\n for (const filepath of options.path) {\n optionPaths.push(_resolveHome(filepath))\n }\n }\n }\n\n // Build the parsed data in a temporary object (because we need to return it). Once we have the final\n // parsed data, we will combine it with process.env (or options.processEnv if provided).\n let lastError\n const parsedAll = {}\n for (const path of optionPaths) {\n try {\n // Specifying an encoding returns a string instead of a buffer\n const parsed = DotenvModule.parse(fs.readFileSync(path, { encoding }))\n\n DotenvModule.populate(parsedAll, parsed, options)\n } catch (e) {\n if (debug) {\n _debug(`Failed to load ${path} ${e.message}`)\n }\n lastError = e\n }\n }\n\n let processEnv = process.env\n if (options && options.processEnv != null) {\n processEnv = options.processEnv\n }\n\n DotenvModule.populate(processEnv, parsedAll, options)\n\n if (lastError) {\n return { parsed: parsedAll, error: lastError }\n } else {\n return { parsed: parsedAll }\n }\n}\n\n// Populates process.env from .env file\nfunction config (options) {\n // fallback to original dotenv if DOTENV_KEY is not set\n if (_dotenvKey(options).length === 0) {\n return DotenvModule.configDotenv(options)\n }\n\n const vaultPath = _vaultPath(options)\n\n // dotenvKey exists but .env.vault file does not exist\n if (!vaultPath) {\n _warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`)\n\n return DotenvModule.configDotenv(options)\n }\n\n return DotenvModule._configVault(options)\n}\n\nfunction decrypt (encrypted, keyStr) {\n const key = Buffer.from(keyStr.slice(-64), 'hex')\n let ciphertext = Buffer.from(encrypted, 'base64')\n\n const nonce = ciphertext.subarray(0, 12)\n const authTag = ciphertext.subarray(-16)\n ciphertext = ciphertext.subarray(12, -16)\n\n try {\n const aesgcm = crypto.createDecipheriv('aes-256-gcm', key, nonce)\n aesgcm.setAuthTag(authTag)\n return `${aesgcm.update(ciphertext)}${aesgcm.final()}`\n } catch (error) {\n const isRange = error instanceof RangeError\n const invalidKeyLength = error.message === 'Invalid key length'\n const decryptionFailed = error.message === 'Unsupported state or unable to authenticate data'\n\n if (isRange || invalidKeyLength) {\n const err = new Error('INVALID_DOTENV_KEY: It must be 64 characters long (or more)')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n } else if (decryptionFailed) {\n const err = new Error('DECRYPTION_FAILED: Please check your DOTENV_KEY')\n err.code = 'DECRYPTION_FAILED'\n throw err\n } else {\n throw error\n }\n }\n}\n\n// Populate process.env with parsed values\nfunction populate (processEnv, parsed, options = {}) {\n const debug = Boolean(options && options.debug)\n const override = Boolean(options && options.override)\n\n if (typeof parsed !== 'object') {\n const err = new Error('OBJECT_REQUIRED: Please check the processEnv argument being passed to populate')\n err.code = 'OBJECT_REQUIRED'\n throw err\n }\n\n // Set process.env\n for (const key of Object.keys(parsed)) {\n if (Object.prototype.hasOwnProperty.call(processEnv, key)) {\n if (override === true) {\n processEnv[key] = parsed[key]\n }\n\n if (debug) {\n if (override === true) {\n _debug(`\"${key}\" is already defined and WAS overwritten`)\n } else {\n _debug(`\"${key}\" is already defined and was NOT overwritten`)\n }\n }\n } else {\n processEnv[key] = parsed[key]\n }\n }\n}\n\nconst DotenvModule = {\n configDotenv,\n _configVault,\n _parseVault,\n config,\n decrypt,\n parse,\n populate\n}\n\nmodule.exports.configDotenv = DotenvModule.configDotenv\nmodule.exports._configVault = DotenvModule._configVault\nmodule.exports._parseVault = DotenvModule._parseVault\nmodule.exports.config = DotenvModule.config\nmodule.exports.decrypt = DotenvModule.decrypt\nmodule.exports.parse = DotenvModule.parse\nmodule.exports.populate = DotenvModule.populate\n\nmodule.exports = DotenvModule\n", "'use strict';\n\nmodule.exports = (options = {}) => {\n\tlet repoUrl;\n\tif (options.repoUrl) {\n\t\trepoUrl = options.repoUrl;\n\t} else if (options.user && options.repo) {\n\t\trepoUrl = `https://github.com/${options.user}/${options.repo}`;\n\t} else {\n\t\tthrow new Error('You need to specify either the `repoUrl` option or both the `user` and `repo` options');\n\t}\n\n\tconst url = new URL(`${repoUrl}/issues/new`);\n\n\tconst types = [\n\t\t'body',\n\t\t'title',\n\t\t'labels',\n\t\t'template',\n\t\t'milestone',\n\t\t'assignee',\n\t\t'projects'\n\t];\n\n\tfor (const type of types) {\n\t\tlet value = options[type];\n\t\tif (value === undefined) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (type === 'labels' || type === 'projects') {\n\t\t\tif (!Array.isArray(value)) {\n\t\t\t\tthrow new TypeError(`The \\`${type}\\` option should be an array`);\n\t\t\t}\n\n\t\t\tvalue = value.join(',');\n\t\t}\n\n\t\turl.searchParams.set(type, value);\n\t}\n\n\treturn url.toString();\n};\n\n// TODO: Remove this for the next major release\nmodule.exports.default = module.exports;\n", "'use strict';\nmodule.exports = (function()\n{\n function _min(d0, d1, d2, bx, ay)\n {\n return d0 < d1 || d2 < d1\n ? d0 > d2\n ? d2 + 1\n : d0 + 1\n : bx === ay\n ? d1\n : d1 + 1;\n }\n\n return function(a, b)\n {\n if (a === b) {\n return 0;\n }\n\n if (a.length > b.length) {\n var tmp = a;\n a = b;\n b = tmp;\n }\n\n var la = a.length;\n var lb = b.length;\n\n while (la > 0 && (a.charCodeAt(la - 1) === b.charCodeAt(lb - 1))) {\n la--;\n lb--;\n }\n\n var offset = 0;\n\n while (offset < la && (a.charCodeAt(offset) === b.charCodeAt(offset))) {\n offset++;\n }\n\n la -= offset;\n lb -= offset;\n\n if (la === 0 || lb < 3) {\n return lb;\n }\n\n var x = 0;\n var y;\n var d0;\n var d1;\n var d2;\n var d3;\n var dd;\n var dy;\n var ay;\n var bx0;\n var bx1;\n var bx2;\n var bx3;\n\n var vector = [];\n\n for (y = 0; y < la; y++) {\n vector.push(y + 1);\n vector.push(a.charCodeAt(offset + y));\n }\n\n var len = vector.length - 1;\n\n for (; x < lb - 3;) {\n bx0 = b.charCodeAt(offset + (d0 = x));\n bx1 = b.charCodeAt(offset + (d1 = x + 1));\n bx2 = b.charCodeAt(offset + (d2 = x + 2));\n bx3 = b.charCodeAt(offset + (d3 = x + 3));\n dd = (x += 4);\n for (y = 0; y < len; y += 2) {\n dy = vector[y];\n ay = vector[y + 1];\n d0 = _min(dy, d0, d1, bx0, ay);\n d1 = _min(d0, d1, d2, bx1, ay);\n d2 = _min(d1, d2, d3, bx2, ay);\n dd = _min(d2, d3, dd, bx3, ay);\n vector[y] = dd;\n d3 = d2;\n d2 = d1;\n d1 = d0;\n d0 = dy;\n }\n }\n\n for (; x < lb;) {\n bx0 = b.charCodeAt(offset + (d0 = x));\n dd = ++x;\n for (y = 0; y < len; y += 2) {\n dy = vector[y];\n vector[y] = dd = _min(dy, d0, dd, bx0, vector[y + 1]);\n d0 = dy;\n }\n }\n\n return dd;\n };\n})();\n\n", "import { BasicBuilder } from './BasicBuilder'\nimport type { KeyType } from './KeyType'\nimport { Writer } from './Writer'\n\nexport abstract class TypeBuilder implements BasicBuilder {\n // TODO(@SevInf): this should be replaced with precedence system that would\n // automatically add parenthesis where they are needed\n needsParenthesisWhenIndexed = false\n needsParenthesisInKeyof = false\n needsParenthesisInUnion = false\n needsParenthesisInIntersection = false\n\n abstract write(writer: Writer): void\n\n subKey(key: string): KeyType {\n // TODO: since we translating ESM to CommonJS during bundling, we\n // can't handle circular dependencies the same way ESM does. We have to delay KeyType import\n // to resolve it. Once we stop doing this, we can move this import to top of the file.\n const { KeyType } = require('./KeyType')\n return new KeyType(this, key)\n }\n\n writeIndexed(writer: Writer) {\n if (this.needsParenthesisWhenIndexed) {\n writer.write('(')\n }\n\n writer.write(this)\n\n if (this.needsParenthesisWhenIndexed) {\n writer.write(')')\n }\n }\n}\n", "import { TypeBuilder } from './TypeBuilder'\nimport { Writer } from './Writer'\n\nexport class KeyType extends TypeBuilder {\n constructor(\n public baseType: TypeBuilder,\n public key: string,\n ) {\n super()\n }\n write(writer: Writer): void {\n this.baseType.writeIndexed(writer)\n\n writer.write('[').write(`\"${this.key}\"`).write(']')\n }\n}\n\nexport function keyType(baseType: TypeBuilder, key: string) {\n return new KeyType(baseType, key)\n}\n", "import { defineExtension } from './defineExtension'\nimport { getExtensionContext } from './getExtensionContext'\n\nexport { defineExtension }\nexport { getExtensionContext }\n", "import { Client } from '../../getPrismaClient'\nimport { ExtensionArgs } from '../types/exported/ExtensionArgs'\n\nexport function defineExtension(ext: ExtensionArgs | ((client: Client) => Client)) {\n if (typeof ext === 'function') {\n return ext\n }\n\n return (client: Client) => client.$extends(ext)\n}\n", "/*\n * Because we use a symbol to store the context, we need to merge the context\n * with the original this type. We manage the context via `getExtensionContext`\n * to circumvent the limitations of `this` inference in TS, while also providing\n * a unified API for context management in generic and non-generic extensions.\n */\n\n/* eslint-disable prettier/prettier */\nexport type Context<T> = T extends { [K: symbol]: { ctx: infer C } }\n ? C &\n T & {\n /**\n * @deprecated Use `$name` instead.\n */\n name?: string\n $name?: string\n $parent?: unknown\n }\n : T & {\n /**\n * @deprecated Use `$name` instead.\n */\n name?: string\n $name?: string\n $parent?: unknown\n }\n\nexport function getExtensionContext<T>(that: T) {\n return that as any as Context<T>\n}\n", "import { validator } from './validator'\n\n/*\n * /!\\ These exports are exposed to the user. Proceed with caution.\n *\n * TODO: Move more hardcoded utils from generation into here\n */\n\nexport { validator }\n", "import { Args, Operation } from '../types/exported/Public'\nimport { Exact } from '../types/exported/Utils'\n\nexport function validator<V>(): <S>(select: Exact<S, V>) => S\nexport function validator<C, M extends Exclude<keyof C, `$${string}`>, O extends keyof C[M] & Operation>(\n client: C,\n model: M,\n operation: O,\n): <S>(select: Exact<S, Args<C[M], O>>) => S\nexport function validator<\n C,\n M extends Exclude<keyof C, `$${string}`>,\n O extends keyof C[M] & Operation,\n P extends keyof Args<C[M], O>,\n>(client: C, model: M, operation: O, prop: P): <S>(select: Exact<S, Args<C[M], O>[P]>) => S\nexport function validator(..._args: any[]) {\n return (args: any) => args\n}\n", "let FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM, isTTY=true;\nif (typeof process !== 'undefined') {\n\t({ FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM } = process.env || {});\n\tisTTY = process.stdout && process.stdout.isTTY;\n}\n\nexport const $ = {\n\tenabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== 'dumb' && (\n\t\tFORCE_COLOR != null && FORCE_COLOR !== '0' || isTTY\n\t)\n}\n\nfunction init(x, y) {\n\tlet rgx = new RegExp(`\\\\x1b\\\\[${y}m`, 'g');\n\tlet open = `\\x1b[${x}m`, close = `\\x1b[${y}m`;\n\n\treturn function (txt) {\n\t\tif (!$.enabled || txt == null) return txt;\n\t\treturn open + (!!~(''+txt).indexOf(close) ? txt.replace(rgx, close + open) : txt) + close;\n\t};\n}\n\n// modifiers\nexport const reset = init(0, 0);\nexport const bold = init(1, 22);\nexport const dim = init(2, 22);\nexport const italic = init(3, 23);\nexport const underline = init(4, 24);\nexport const inverse = init(7, 27);\nexport const hidden = init(8, 28);\nexport const strikethrough = init(9, 29);\n\n// colors\nexport const black = init(30, 39);\nexport const red = init(31, 39);\nexport const green = init(32, 39);\nexport const yellow = init(33, 39);\nexport const blue = init(34, 39);\nexport const magenta = init(35, 39);\nexport const cyan = init(36, 39);\nexport const white = init(37, 39);\nexport const gray = init(90, 39);\nexport const grey = init(90, 39);\n\n// background colors\nexport const bgBlack = init(40, 49);\nexport const bgRed = init(41, 49);\nexport const bgGreen = init(42, 49);\nexport const bgYellow = init(43, 49);\nexport const bgBlue = init(44, 49);\nexport const bgMagenta = init(45, 49);\nexport const bgCyan = init(46, 49);\nexport const bgWhite = init(47, 49);\n", "import * as kleur from 'kleur/colors'\nimport { bold } from 'kleur/colors'\n\nconst MAX_ARGS_HISTORY = 100\nconst COLORS = ['green', 'yellow', 'blue', 'magenta', 'cyan', 'red']\n\nconst argsHistory: [namespace: string, ...unknown[]][] = []\nlet lastTimestamp = Date.now()\nlet lastColor = 0\n\nconst processEnv = typeof process !== 'undefined' ? process.env : {}\n\nglobalThis.DEBUG ??= processEnv.DEBUG ?? ''\nglobalThis.DEBUG_COLORS ??= processEnv.DEBUG_COLORS ? processEnv.DEBUG_COLORS === 'true' : true\n\n/**\n * Top-level utilities to configure the debug module.\n *\n * @example\n * ```ts\n * import Debug from '@prisma/debug'\n * Debug.enable('prisma:client')\n * const debug = Debug('prisma:client')\n * debug('Hello World')\n * ```\n */\nconst topProps = {\n enable(namespace: any) {\n if (typeof namespace === 'string') {\n globalThis.DEBUG = namespace\n }\n },\n disable() {\n const prev = globalThis.DEBUG\n globalThis.DEBUG = ''\n return prev\n },\n // this is the core logic to check if logging should happen or not\n enabled(namespace: string) {\n // these are the namespaces that we are listening to in DEBUG=...\n const listenedNamespaces: string[] = globalThis.DEBUG.split(',').map((s: string) => {\n return s.replace(/[.+?^${}()|[\\]\\\\]/g, '\\\\$&') // escape regex except \"*\"\n })\n\n // we take incoming namespaces and check then against listened\n const isListened = listenedNamespaces.some((listenedNamespace) => {\n if (listenedNamespace === '' || listenedNamespace[0] === '-') return false\n\n return namespace.match(RegExp(listenedNamespace.split('*').join('.*') + '$'))\n })\n\n // we take incoming namespaces and check then against excluded\n const isExcluded = listenedNamespaces.some((listenedNamespace) => {\n if (listenedNamespace === '' || listenedNamespace[0] !== '-') return false\n\n return namespace.match(RegExp(listenedNamespace.slice(1).split('*').join('.*') + '$'))\n })\n\n return isListened && !isExcluded\n },\n log: (...args: string[]) => {\n const [namespace, format, ...rest] = args\n // Note: `console.warn` / `console.log` use `util.format` internally, so they can handle\n // `printf`-style string interpolation.\n const logWithFormatting = console.warn ?? console.log\n\n // console only formats first arg, concat ns+format\n logWithFormatting(`${namespace} ${format}`, ...rest)\n },\n formatters: {}, // not implemented\n}\n\n/**\n * Create a new debug instance with the given namespace.\n *\n * @example\n * ```ts\n * import Debug from '@prisma/debug'\n * const debug = Debug('prisma:client')\n * debug('Hello World')\n * ```\n */\nfunction debugCreate(namespace: string) {\n const instanceProps = {\n color: COLORS[lastColor++ % COLORS.length],\n enabled: topProps.enabled(namespace),\n namespace: namespace,\n log: topProps.log,\n extend: () => {}, // not implemented\n }\n\n const debugCall = (...args: any[]) => {\n const { enabled, namespace, color, log } = instanceProps\n\n // we push the args to our history of args\n if (args.length !== 0) {\n argsHistory.push([namespace, ...args])\n }\n\n // if it is too big, then we remove some\n if (argsHistory.length > MAX_ARGS_HISTORY) {\n argsHistory.shift()\n }\n\n if (topProps.enabled(namespace) || enabled) {\n const stringArgs = args.map((arg) => {\n if (typeof arg === 'string') {\n return arg\n }\n\n return safeStringify(arg)\n })\n\n const ms = `+${Date.now() - lastTimestamp}ms`\n lastTimestamp = Date.now()\n\n if (globalThis.DEBUG_COLORS) {\n log(kleur[color](bold(namespace)), ...stringArgs, kleur[color](ms))\n } else {\n log(namespace, ...stringArgs, ms)\n }\n }\n }\n\n return new Proxy(debugCall, {\n get: (_, prop) => instanceProps[prop],\n set: (_, prop, value) => (instanceProps[prop] = value),\n }) as typeof debugCall & typeof instanceProps\n}\n\nconst Debug = new Proxy(debugCreate, {\n get: (_, prop) => topProps[prop],\n set: (_, prop, value) => (topProps[prop] = value),\n}) as typeof debugCreate & typeof topProps\n\n