@prisma/client-generator-js 7.2.0 → 7.3.0-integration-fix-6-19-0-cloudflare-accelerate-engine.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/TSClient/Args.d.ts +5 -5
  2. package/dist/TSClient/Datasources.d.ts +7 -0
  3. package/dist/TSClient/GenerateContext.d.ts +2 -5
  4. package/dist/TSClient/PrismaClient.d.ts +2 -2
  5. package/dist/TSClient/TSClient.d.ts +7 -2
  6. package/dist/TSClient/common.d.ts +2 -2
  7. package/dist/extractSqliteSources.d.ts +6 -0
  8. package/dist/extractSqliteSources.test.d.ts +1 -0
  9. package/dist/generateClient.d.ts +7 -1
  10. package/dist/generator.d.ts +1 -1
  11. package/dist/index.d.mts +7 -1
  12. package/dist/index.d.ts +7 -1
  13. package/dist/index.js +2973 -351
  14. package/dist/index.mjs +2962 -334
  15. package/dist/resolveDatasources.d.ts +1 -0
  16. package/dist/resolveDatasources.test.d.ts +1 -0
  17. package/dist/resolvePrismaClient.d.ts +5 -0
  18. package/dist/serializeDatasources.d.ts +4 -0
  19. package/dist/serializeDatasources.test.d.ts +1 -0
  20. package/dist/typedSql/buildIndex.d.ts +2 -2
  21. package/dist/typedSql/typedSql.d.ts +1 -1
  22. package/dist/utils/buildDMMF.d.ts +1 -1
  23. package/dist/utils/buildDebugInitialization.d.ts +1 -1
  24. package/dist/utils/buildDirname.d.ts +7 -0
  25. package/dist/utils/buildGetQueryCompilerWasmModule.d.ts +1 -1
  26. package/dist/utils/buildGetQueryEngineWasmModule.d.ts +6 -0
  27. package/dist/utils/buildInjectableEdgeEnv.d.ts +20 -0
  28. package/dist/utils/buildInlineDatasources.d.ts +3 -0
  29. package/dist/utils/buildNFTAnnotations.d.ts +11 -0
  30. package/dist/utils/buildNFTAnnotations.test.d.ts +1 -0
  31. package/dist/utils/buildWarnEnvConflicts.d.ts +10 -0
  32. package/dist/utils/runtimeImport.d.ts +8 -1
  33. package/package.json +11 -10
@@ -0,0 +1 @@
1
+ export declare function absolutizeRelativePath(url: string, cwd: string, outputDir: string, absolutePaths?: boolean): string;
@@ -0,0 +1 @@
1
+ export {};
@@ -9,3 +9,8 @@ export declare const debug: ((...args: any[]) => void) & {
9
9
  * Resolves the path to the Prisma Client to determine the default output directory.
10
10
  */
11
11
  export declare function resolvePrismaClient(baseDir: string): Promise<string>;
12
+ /**
13
+ * Resolves the path to the Prisma Client to determine the default output directory.
14
+ * Installs the Prisma Client if it is not found.
15
+ */
16
+ export declare function resolveOrInstallPrismaClient(baseDir: string, version: string): Promise<string>;
@@ -0,0 +1,4 @@
1
+ import type { DataSource } from '@prisma/generator';
2
+ import type { DatasourceOverwrite } from './extractSqliteSources';
3
+ export declare function serializeDatasources(datasources: DatasourceOverwrite[]): string;
4
+ export declare function datasourceToDatasourceOverwrite(datasource: DataSource): DatasourceOverwrite;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { SqlQueryOutput } from '@prisma/generator';
2
2
  import { DbEnumsList } from './buildDbEnums';
3
3
  export declare function buildIndexTs(queries: SqlQueryOutput[], enums: DbEnumsList): string;
4
- export declare function buildIndexCjs(queries: SqlQueryOutput[], edgeRuntimeSuffix?: 'wasm-compiler-edge' | undefined): string;
5
- export declare function buildIndexEsm(queries: SqlQueryOutput[], edgeRuntimeSuffix?: 'wasm-compiler-edge' | undefined): string;
4
+ export declare function buildIndexCjs(queries: SqlQueryOutput[], edgeRuntimeSuffix?: 'wasm-engine-edge' | 'wasm-compiler-edge' | 'edge' | undefined): string;
5
+ export declare function buildIndexEsm(queries: SqlQueryOutput[], edgeRuntimeSuffix?: 'wasm-engine-edge' | 'wasm-compiler-edge' | 'edge' | undefined): string;
@@ -4,7 +4,7 @@ import { FileMap } from '../generateClient';
4
4
  type TypeSqlBuildOptions = {
5
5
  runtimeBase: string;
6
6
  mainRuntimeName: string;
7
- edgeRuntimeName: 'wasm-compiler-edge';
7
+ edgeRuntimeName: 'wasm-engine-edge' | 'wasm-compiler-edge' | 'edge';
8
8
  dmmf: DMMF.Document;
9
9
  queries: SqlQueryOutput[];
10
10
  };
@@ -13,4 +13,4 @@ import { TSClientOptions } from '../TSClient/TSClient';
13
13
  * @param datamodel
14
14
  * @returns
15
15
  */
16
- export declare function buildRuntimeDataModel(datamodel: DMMF.Datamodel, runtimeName: TSClientOptions['runtimeName']): string;
16
+ export declare function buildRuntimeDataModel(datamodel: DMMF.Datamodel, runtimeNameJs: TSClientOptions['runtimeNameJs']): string;
@@ -9,4 +9,4 @@
9
9
  *
10
10
  * @param edge Whether the edge runtime is used
11
11
  */
12
- export declare function buildDebugInitialization(edge: boolean): "" | "if (typeof globalThis !== 'undefined' && globalThis['DEBUG'] || (typeof process !== 'undefined' && process.env && process.env.DEBUG) || undefined) {\n Debug.enable(typeof globalThis !== 'undefined' && globalThis['DEBUG'] || (typeof process !== 'undefined' && process.env && process.env.DEBUG) || undefined)\n}\n";
12
+ export declare function buildDebugInitialization(edge: boolean): string;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Builds a `dirname` variable that holds the location of the generated client.
3
+ * @param edge
4
+ * @param relativeOutdir
5
+ * @returns
6
+ */
7
+ export declare function buildDirname(edge: boolean, relativeOutdir: string): string;
@@ -3,4 +3,4 @@ import { TSClientOptions } from '../TSClient/TSClient';
3
3
  * Builds the necessary glue code to load the query compiler wasm module.
4
4
  * @returns
5
5
  */
6
- export declare function buildQueryCompilerWasmModule(forceEdgeWasmLoader: boolean, runtimeName: TSClientOptions['runtimeName']): "config.compilerWasm = {\n getRuntime: async () => require('./query_compiler_bg.js'),\n getQueryCompilerWasmModule: async () => {\n const { Buffer } = require('node:buffer')\n const { wasm } = require('./query_compiler_bg.wasm-base64.js')\n const queryCompilerWasmFileBytes = Buffer.from(wasm, 'base64')\n\n return new WebAssembly.Module(queryCompilerWasmFileBytes)\n }\n }" | "config.compilerWasm = {\n getRuntime: async () => require('./query_compiler_bg.js'),\n getQueryCompilerWasmModule: async () => {\n const loader = (await import('#wasm-compiler-loader')).default\n const compiler = (await loader).default\n return compiler\n }\n}" | "config.compilerWasm = undefined";
6
+ export declare function buildQueryCompilerWasmModule(forceEdgeWasmLoader: boolean, runtimeNameJs: TSClientOptions['runtimeNameJs']): "config.compilerWasm = {\n getRuntime: async () => require('./query_compiler_bg.js'),\n getQueryCompilerWasmModule: async () => {\n const queryCompilerWasmFilePath = require('path').join(config.dirname, 'query_compiler_bg.wasm')\n const queryCompilerWasmFileBytes = require('fs').readFileSync(queryCompilerWasmFilePath)\n\n return new WebAssembly.Module(queryCompilerWasmFileBytes)\n }\n }" | "config.compilerWasm = {\n getRuntime: async () => require('./query_compiler_bg.js'),\n getQueryCompilerWasmModule: async () => {\n const loader = (await import('#wasm-compiler-loader')).default\n const compiler = (await loader).default\n return compiler\n }\n}" | "config.compilerWasm = undefined";
@@ -0,0 +1,6 @@
1
+ import { TSClientOptions } from '../TSClient/TSClient';
2
+ /**
3
+ * Builds the necessary glue code to load the query engine wasm module.
4
+ * @returns
5
+ */
6
+ export declare function buildQueryEngineWasmModule(wasm: boolean, copyEngine: boolean, runtimeNameJs: TSClientOptions['runtimeNameJs']): "config.engineWasm = {\n getRuntime: async () => require('./query_engine_bg.js'),\n getQueryEngineWasmModule: async () => {\n const queryEngineWasmFilePath = require('path').join(config.dirname, 'query_engine_bg.wasm')\n const queryEngineWasmFileBytes = require('fs').readFileSync(queryEngineWasmFilePath)\n\n return new WebAssembly.Module(queryEngineWasmFileBytes)\n }\n }" | "config.engineWasm = {\n getRuntime: async () => require('./query_engine_bg.js'),\n getQueryEngineWasmModule: async () => {\n const loader = (await import('#wasm-engine-loader')).default\n const engine = (await loader).default\n return engine\n }\n}" | "config.engineWasm = undefined";
@@ -0,0 +1,20 @@
1
+ import { DataSource } from '@prisma/generator';
2
+ /**
3
+ * Builds an injectable environment for the data proxy edge client. It's useful
4
+ * because it is designed to run in browser-like environments where things like
5
+ * `fs`, `process.env`, and .env file loading are not available. That means env
6
+ * vars are represented as a global variable or injected at build time. This is
7
+ * the glue code to make this work with our existing env var loading logic. It
8
+ * is the place where we make collect the env vars for the edge client. To
9
+ * understand this better, take a look at the generated code in the edge client.
10
+ * @see {@link declareInjectableEdgeEnv}
11
+ * @param edge
12
+ * @param datasources
13
+ * @returns
14
+ */
15
+ export declare function buildInjectableEdgeEnv(edge: boolean, datasources: DataSource[]): string;
16
+ /**
17
+ * Builds the expression to get the value of an environment variable at run time.
18
+ * @param envVarName Name of the environment variable
19
+ */
20
+ export declare function getRuntimeEdgeEnvVar(envVarName: string): string;
@@ -0,0 +1,3 @@
1
+ import type { GetPrismaClientConfig } from '@prisma/client-common';
2
+ import { DataSource } from '@prisma/generator';
3
+ export declare function buildInlineDatasources(datasources: DataSource[]): GetPrismaClientConfig['inlineDatasources'];
@@ -0,0 +1,11 @@
1
+ import type { BinaryTarget } from '@prisma/get-platform';
2
+ import { ClientEngineType } from '@prisma/internals';
3
+ /**
4
+ * Build bundler-like annotations so that Vercel automatically uploads the
5
+ * prisma schema as well as the query engine binaries to the deployments.
6
+ * @param engineType the client engine in use
7
+ * @param binaryTargets the targeted binaryTargets
8
+ * @param relativeOutdir outdir relative to root
9
+ * @returns
10
+ */
11
+ export declare function buildNFTAnnotations(noEngine: boolean, engineType: ClientEngineType, binaryTargets: BinaryTarget[] | undefined, relativeOutdir: string): string;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ import { TSClientOptions } from '../TSClient/TSClient';
2
+ /**
3
+ * Builds the necessary bits so that our users can get a helpful warning during
4
+ * "generate" in case of conflicts between their environment & their env files.
5
+ * @param edge
6
+ * @param runtimeBase
7
+ * @param runtimeNameJs
8
+ * @returns
9
+ */
10
+ export declare function buildWarnEnvConflicts(edge: boolean, runtimeBase: string, runtimeNameJs: TSClientOptions['runtimeNameJs']): string;
@@ -1,4 +1,11 @@
1
1
  import * as ts from '@prisma/ts-builders';
2
- type RuntimeExport = keyof typeof import('@prisma/client/runtime/client') & string;
2
+ type RuntimeExport = keyof typeof import('@prisma/client/runtime/library') & string;
3
+ /**
4
+ * Helps to ensure that when we want to refer to a type or value, imported from runtime Module
5
+ * we are referring to the name, that is actually exported
6
+ *
7
+ * @param name imported name
8
+ */
9
+ export declare function runtimeImport(name: RuntimeExport): string;
3
10
  export declare function runtimeImportedType(name: RuntimeExport): ts.NamedType;
4
11
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/client-generator-js",
3
- "version": "7.2.0",
3
+ "version": "7.3.0-integration-fix-6-19-0-cloudflare-accelerate-engine.1",
4
4
  "description": "This package is intended for Prisma's internal use",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -25,21 +25,22 @@
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
27
  "@antfu/ni": "0.21.12",
28
- "@prisma/engines-version": "7.2.0-4.0c8ef2ce45c83248ab3df073180d5eda9e8be7a3",
28
+ "@prisma/engines-version": "7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7",
29
+ "ci-info": "4.2.0",
29
30
  "env-paths": "2.2.1",
30
31
  "indent-string": "4.0.0",
31
32
  "klona": "2.0.6",
32
33
  "package-up": "5.0.0",
33
34
  "pluralize": "8.0.0",
34
35
  "ts-pattern": "5.6.2",
35
- "@prisma/client-common": "7.2.0",
36
- "@prisma/debug": "7.2.0",
37
- "@prisma/fetch-engine": "7.2.0",
38
- "@prisma/get-platform": "7.2.0",
39
- "@prisma/generator": "7.2.0",
40
- "@prisma/internals": "7.2.0",
41
- "@prisma/ts-builders": "7.2.0",
42
- "@prisma/dmmf": "7.2.0"
36
+ "@prisma/debug": "7.3.0-integration-fix-6-19-0-cloudflare-accelerate-engine.1",
37
+ "@prisma/dmmf": "7.3.0-integration-fix-6-19-0-cloudflare-accelerate-engine.1",
38
+ "@prisma/generator": "7.3.0-integration-fix-6-19-0-cloudflare-accelerate-engine.1",
39
+ "@prisma/get-platform": "7.3.0-integration-fix-6-19-0-cloudflare-accelerate-engine.1",
40
+ "@prisma/client-common": "7.3.0-integration-fix-6-19-0-cloudflare-accelerate-engine.1",
41
+ "@prisma/internals": "7.3.0-integration-fix-6-19-0-cloudflare-accelerate-engine.1",
42
+ "@prisma/ts-builders": "7.3.0-integration-fix-6-19-0-cloudflare-accelerate-engine.1",
43
+ "@prisma/fetch-engine": "7.3.0-integration-fix-6-19-0-cloudflare-accelerate-engine.1"
43
44
  },
44
45
  "devDependencies": {
45
46
  "@types/pluralize": "0.0.33",