@prisma/client-common 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.
@@ -1,4 +1,21 @@
1
1
  import { ErrorCapturingSqlDriverAdapter } from '@prisma/driver-adapter-utils';
2
+ export type EngineWasmLoadingConfig = {
3
+ /**
4
+ * WASM-bindgen runtime for corresponding module
5
+ */
6
+ getRuntime: () => Promise<{
7
+ __wbg_set_wasm(exports: unknown): void;
8
+ QueryEngine: QueryEngineConstructor;
9
+ }>;
10
+ /**
11
+ * Loads the raw wasm module for the wasm query engine. This configuration is
12
+ * generated specifically for each type of client, eg. Node.js client and Edge
13
+ * clients will have different implementations.
14
+ * @remarks this is a callback on purpose, we only load the wasm if needed.
15
+ * @remarks only used by LibraryEngine
16
+ */
17
+ getQueryEngineWasmModule: () => Promise<unknown>;
18
+ };
2
19
  export type QueryEngineInstance = {
3
20
  connect(headers: string, requestId: string): Promise<void>;
4
21
  disconnect(headers: string, requestId: string): Promise<void>;
@@ -16,6 +33,8 @@ export type QueryEngineInstance = {
16
33
  startTransaction(options: string, traceHeaders: string, requestId: string): Promise<string>;
17
34
  commitTransaction(id: string, traceHeaders: string, requestId: string): Promise<string>;
18
35
  rollbackTransaction(id: string, traceHeaders: string, requestId: string): Promise<string>;
36
+ metrics?(options: string): Promise<string>;
37
+ applyPendingMigrations?(): Promise<void>;
19
38
  trace(requestId: string): Promise<string | null>;
20
39
  };
21
40
  export interface QueryEngineConstructor {
@@ -1,5 +1,7 @@
1
- import { ActiveConnectorType } from '@prisma/generator';
1
+ import { ActiveConnectorType, EnvValue, GeneratorConfig } from '@prisma/generator';
2
+ import { LoadedEnv } from '@prisma/internals';
2
3
  import { CompilerWasmLoadingConfig } from './QueryCompiler';
4
+ import { EngineWasmLoadingConfig } from './QueryEngine';
3
5
  import { RuntimeDataModel } from './runtimeDataModel';
4
6
  /**
5
7
  * Config that is stored into the generated client. When the generated client is
@@ -8,16 +10,73 @@ import { RuntimeDataModel } from './runtimeDataModel';
8
10
  */
9
11
  export type GetPrismaClientConfig = {
10
12
  runtimeDataModel: RuntimeDataModel;
11
- previewFeatures: string[];
13
+ generator?: GeneratorConfig;
14
+ relativeEnvPaths?: {
15
+ rootEnvPath?: string | null;
16
+ schemaEnvPath?: string | null;
17
+ };
18
+ relativePath: string;
19
+ dirname: string;
12
20
  clientVersion: string;
13
21
  engineVersion: string;
22
+ datasourceNames: string[];
14
23
  activeProvider: ActiveConnectorType;
15
24
  /**
16
25
  * The contents of the schema encoded into a string
26
+ * @remarks only used for the purpose of data proxy
17
27
  */
18
28
  inlineSchema: string;
29
+ /**
30
+ * A special env object just for the data proxy edge runtime.
31
+ * Allows bundlers to inject their own env variables (Vercel).
32
+ * Allows platforms to declare global variables as env (Workers).
33
+ * @remarks only used for the purpose of data proxy
34
+ */
35
+ injectableEdgeEnv?: () => LoadedEnv;
36
+ /**
37
+ * The contents of the datasource url saved in a string.
38
+ * This can either be an env var name or connection string.
39
+ * It is needed by the client to connect to the Data Proxy.
40
+ * @remarks only used for the purpose of data proxy
41
+ */
42
+ inlineDatasources: {
43
+ [name in string]: {
44
+ url: EnvValue;
45
+ };
46
+ };
47
+ /**
48
+ * The string hash that was produced for a given schema
49
+ * @remarks only used for the purpose of data proxy
50
+ */
51
+ inlineSchemaHash: string;
52
+ /**
53
+ * A marker to indicate that the client was not generated via `prisma
54
+ * generate` but was generated via `generate --postinstall` script instead.
55
+ * @remarks used to error for Vercel/Netlify for schema caching issues
56
+ */
57
+ postinstall?: boolean;
58
+ /**
59
+ * Information about the CI where the Prisma Client has been generated. The
60
+ * name of the CI environment is stored at generation time because CI
61
+ * information is not always available at runtime. Moreover, the edge client
62
+ * has no notion of environment variables, so this works around that.
63
+ * @remarks used to error for Vercel/Netlify for schema caching issues
64
+ */
65
+ ciName?: string;
66
+ /**
67
+ * Information about whether we have not found a schema.prisma file in the
68
+ * default location, and that we fell back to finding the schema.prisma file
69
+ * in the current working directory. This usually means it has been bundled.
70
+ */
71
+ isBundled?: boolean;
72
+ /**
73
+ * A boolean that is `false` when the client was generated with --no-engine. At
74
+ * runtime, this means the client will be bound to be using the Data Proxy.
75
+ */
76
+ copyEngine?: boolean;
19
77
  /**
20
78
  * Optional wasm loading configuration
21
79
  */
80
+ engineWasm?: EngineWasmLoadingConfig;
22
81
  compilerWasm?: CompilerWasmLoadingConfig;
23
82
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/client-common",
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",
@@ -24,11 +24,11 @@
24
24
  },
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
- "@prisma/client-engine-runtime": "7.2.0",
28
- "@prisma/dmmf": "7.2.0",
29
- "@prisma/generator": "7.2.0",
30
- "@prisma/internals": "7.2.0",
31
- "@prisma/driver-adapter-utils": "7.2.0"
27
+ "@prisma/client-engine-runtime": "7.3.0-integration-fix-6-19-0-cloudflare-accelerate-engine.1",
28
+ "@prisma/dmmf": "7.3.0-integration-fix-6-19-0-cloudflare-accelerate-engine.1",
29
+ "@prisma/driver-adapter-utils": "7.3.0-integration-fix-6-19-0-cloudflare-accelerate-engine.1",
30
+ "@prisma/generator": "7.3.0-integration-fix-6-19-0-cloudflare-accelerate-engine.1",
31
+ "@prisma/internals": "7.3.0-integration-fix-6-19-0-cloudflare-accelerate-engine.1"
32
32
  },
33
33
  "files": [
34
34
  "dist"