@prisma/client 7.4.0-integration-parameterization.9 → 7.4.0-integration-parameterization.11

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.
@@ -4573,7 +4573,7 @@ var import_path4 = __toESM(require("path"));
4573
4573
  // package.json
4574
4574
  var package_default = {
4575
4575
  name: "@prisma/client",
4576
- version: "7.4.0-integration-parameterization.9",
4576
+ version: "7.4.0-integration-parameterization.11",
4577
4577
  description: "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.",
4578
4578
  keywords: [
4579
4579
  "ORM",
@@ -7873,6 +7873,9 @@ function fluentWrapperName(modelName) {
7873
7873
  }
7874
7874
 
7875
7875
  // ../param-graph/src/serialization.ts
7876
+ function serializeParamGraph(data) {
7877
+ return new Serializer(data).serialize();
7878
+ }
7876
7879
  var FORMAT_COMPACT = 0;
7877
7880
  var FORMAT_WIDE = 1;
7878
7881
  var NONE_16 = 65535;
@@ -7881,133 +7884,130 @@ var MAX_COMPACT_INDEX = 65534;
7881
7884
  function encodeBase64url(bytes) {
7882
7885
  return Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength).toString("base64url");
7883
7886
  }
7884
- function serializeParamGraph(data) {
7885
- const rootKeys = Object.keys(data.roots);
7886
- const maxIndex = Math.max(data.strings.length, data.inputNodes.length, data.outputNodes.length, rootKeys.length);
7887
- const useWide = maxIndex > MAX_COMPACT_INDEX;
7888
- let size = 1;
7889
- size += useWide ? 12 : 6;
7890
- for (const node of data.inputNodes) {
7891
- size += useWide ? 4 : 2;
7892
- const edgeCount = Object.keys(node.edges).length;
7893
- size += edgeCount * (useWide ? 20 : 10);
7894
- }
7895
- for (const node of data.outputNodes) {
7896
- size += useWide ? 4 : 2;
7897
- const edgeCount = Object.keys(node.edges).length;
7898
- size += edgeCount * (useWide ? 12 : 6);
7899
- }
7900
- size += rootKeys.length * (useWide ? 12 : 6);
7901
- const buffer = new ArrayBuffer(size);
7902
- const view = new DataView(buffer);
7903
- let offset = 0;
7904
- view.setUint8(offset++, useWide ? FORMAT_WIDE : FORMAT_COMPACT);
7905
- if (useWide) {
7906
- view.setUint32(offset, data.inputNodes.length, true);
7907
- offset += 4;
7908
- view.setUint32(offset, data.outputNodes.length, true);
7909
- offset += 4;
7910
- view.setUint32(offset, rootKeys.length, true);
7911
- offset += 4;
7912
- } else {
7913
- view.setUint16(offset, data.inputNodes.length, true);
7914
- offset += 2;
7915
- view.setUint16(offset, data.outputNodes.length, true);
7916
- offset += 2;
7917
- view.setUint16(offset, rootKeys.length, true);
7918
- offset += 2;
7919
- }
7920
- for (const node of data.inputNodes) {
7921
- const fieldIndices = Object.keys(node.edges).map(Number);
7922
- if (useWide) {
7923
- view.setUint32(offset, fieldIndices.length, true);
7924
- offset += 4;
7925
- } else {
7926
- view.setUint16(offset, fieldIndices.length, true);
7927
- offset += 2;
7928
- }
7929
- for (const fieldIndex of fieldIndices) {
7930
- const edge = node.edges[fieldIndex];
7931
- if (useWide) {
7932
- view.setUint32(offset, fieldIndex, true);
7933
- offset += 4;
7934
- view.setUint16(offset, edge.scalarMask ?? 0, true);
7935
- offset += 2;
7936
- offset += 2;
7937
- view.setUint32(offset, edge.childNodeId ?? NONE_32, true);
7938
- offset += 4;
7939
- view.setUint32(offset, edge.enumNameIndex ?? NONE_32, true);
7940
- offset += 4;
7941
- view.setUint8(offset, edge.flags);
7942
- offset += 1;
7943
- offset += 3;
7944
- } else {
7945
- view.setUint16(offset, fieldIndex, true);
7946
- offset += 2;
7947
- view.setUint16(offset, edge.scalarMask ?? 0, true);
7948
- offset += 2;
7949
- view.setUint16(offset, edge.childNodeId ?? NONE_16, true);
7950
- offset += 2;
7951
- view.setUint16(offset, edge.enumNameIndex ?? NONE_16, true);
7952
- offset += 2;
7953
- view.setUint8(offset, edge.flags);
7954
- offset += 1;
7955
- offset += 1;
7956
- }
7957
- }
7958
- }
7959
- for (const node of data.outputNodes) {
7960
- const fieldIndices = Object.keys(node.edges).map(Number);
7961
- if (useWide) {
7962
- view.setUint32(offset, fieldIndices.length, true);
7963
- offset += 4;
7964
- } else {
7965
- view.setUint16(offset, fieldIndices.length, true);
7966
- offset += 2;
7967
- }
7968
- for (const fieldIndex of fieldIndices) {
7969
- const edge = node.edges[fieldIndex];
7970
- if (useWide) {
7971
- view.setUint32(offset, fieldIndex, true);
7972
- offset += 4;
7973
- view.setUint32(offset, edge.argsNodeId ?? NONE_32, true);
7974
- offset += 4;
7975
- view.setUint32(offset, edge.outputNodeId ?? NONE_32, true);
7976
- offset += 4;
7977
- } else {
7978
- view.setUint16(offset, fieldIndex, true);
7979
- offset += 2;
7980
- view.setUint16(offset, edge.argsNodeId ?? NONE_16, true);
7981
- offset += 2;
7982
- view.setUint16(offset, edge.outputNodeId ?? NONE_16, true);
7983
- offset += 2;
7984
- }
7985
- }
7986
- }
7987
- for (const key of rootKeys) {
7988
- const root = data.roots[key];
7989
- const keyIndex = data.strings.indexOf(key);
7990
- if (useWide) {
7991
- view.setUint32(offset, keyIndex, true);
7992
- offset += 4;
7993
- view.setUint32(offset, root.argsNodeId ?? NONE_32, true);
7994
- offset += 4;
7995
- view.setUint32(offset, root.outputNodeId ?? NONE_32, true);
7996
- offset += 4;
7887
+ var Serializer = class {
7888
+ #data;
7889
+ #useWide;
7890
+ #buffer;
7891
+ #view;
7892
+ #offset = 0;
7893
+ #rootKeys;
7894
+ constructor(data) {
7895
+ this.#data = data;
7896
+ this.#rootKeys = Object.keys(data.roots);
7897
+ const maxIndex = Math.max(
7898
+ data.strings.length,
7899
+ data.inputNodes.length,
7900
+ data.outputNodes.length,
7901
+ this.#rootKeys.length
7902
+ );
7903
+ this.#useWide = maxIndex > MAX_COMPACT_INDEX;
7904
+ const size = this.#calculateBufferSize();
7905
+ this.#buffer = new ArrayBuffer(size);
7906
+ this.#view = new DataView(this.#buffer);
7907
+ }
7908
+ serialize() {
7909
+ this.#writeHeader();
7910
+ this.#writeInputNodes();
7911
+ this.#writeOutputNodes();
7912
+ this.#writeRoots();
7913
+ return {
7914
+ strings: this.#data.strings,
7915
+ graph: encodeBase64url(new Uint8Array(this.#buffer))
7916
+ };
7917
+ }
7918
+ get #wordSize() {
7919
+ return this.#useWide ? 4 : 2;
7920
+ }
7921
+ get #noneValue() {
7922
+ return this.#useWide ? NONE_32 : NONE_16;
7923
+ }
7924
+ #writeWord(value) {
7925
+ if (this.#useWide) {
7926
+ this.#view.setUint32(this.#offset, value, true);
7997
7927
  } else {
7998
- view.setUint16(offset, keyIndex, true);
7999
- offset += 2;
8000
- view.setUint16(offset, root.argsNodeId ?? NONE_16, true);
8001
- offset += 2;
8002
- view.setUint16(offset, root.outputNodeId ?? NONE_16, true);
8003
- offset += 2;
7928
+ this.#view.setUint16(this.#offset, value, true);
7929
+ }
7930
+ this.#offset += this.#wordSize;
7931
+ }
7932
+ #writeOptionalWord(value) {
7933
+ this.#writeWord(value ?? this.#noneValue);
7934
+ }
7935
+ #writeByte(value) {
7936
+ this.#view.setUint8(this.#offset, value);
7937
+ this.#offset += 1;
7938
+ }
7939
+ #writeU16(value) {
7940
+ this.#view.setUint16(this.#offset, value, true);
7941
+ this.#offset += 2;
7942
+ }
7943
+ #skip(bytes) {
7944
+ this.#offset += bytes;
7945
+ }
7946
+ #calculateBufferSize() {
7947
+ let size = this.#useWide ? 16 : 8;
7948
+ for (const node of this.#data.inputNodes) {
7949
+ size += this.#wordSize;
7950
+ const edgeCount = Object.keys(node.edges).length;
7951
+ size += edgeCount * (this.#useWide ? 20 : 10);
7952
+ }
7953
+ for (const node of this.#data.outputNodes) {
7954
+ size += this.#wordSize;
7955
+ const edgeCount = Object.keys(node.edges).length;
7956
+ size += edgeCount * (this.#useWide ? 12 : 6);
7957
+ }
7958
+ size += this.#rootKeys.length * (this.#useWide ? 12 : 6);
7959
+ return size;
7960
+ }
7961
+ #writeHeader() {
7962
+ this.#writeByte(this.#useWide ? FORMAT_WIDE : FORMAT_COMPACT);
7963
+ this.#skip(this.#useWide ? 3 : 1);
7964
+ this.#writeWord(this.#data.inputNodes.length);
7965
+ this.#writeWord(this.#data.outputNodes.length);
7966
+ this.#writeWord(this.#rootKeys.length);
7967
+ }
7968
+ #writeInputNodes() {
7969
+ for (const node of this.#data.inputNodes) {
7970
+ const fieldIndices = Object.keys(node.edges).map(Number);
7971
+ this.#writeWord(fieldIndices.length);
7972
+ for (const fieldIndex of fieldIndices) {
7973
+ const edge = node.edges[fieldIndex];
7974
+ this.#writeWord(fieldIndex);
7975
+ this.#writeU16(edge.scalarMask ?? 0);
7976
+ if (this.#useWide) {
7977
+ this.#skip(2);
7978
+ }
7979
+ this.#writeOptionalWord(edge.childNodeId);
7980
+ this.#writeOptionalWord(edge.enumNameIndex);
7981
+ this.#writeByte(edge.flags);
7982
+ this.#skip(this.#useWide ? 3 : 1);
7983
+ }
8004
7984
  }
8005
7985
  }
8006
- return {
8007
- strings: data.strings,
8008
- graph: encodeBase64url(new Uint8Array(buffer))
8009
- };
8010
- }
7986
+ #writeOutputNodes() {
7987
+ for (const node of this.#data.outputNodes) {
7988
+ const fieldIndices = Object.keys(node.edges).map(Number);
7989
+ this.#writeWord(fieldIndices.length);
7990
+ for (const fieldIndex of fieldIndices) {
7991
+ const edge = node.edges[fieldIndex];
7992
+ this.#writeWord(fieldIndex);
7993
+ this.#writeOptionalWord(edge.argsNodeId);
7994
+ this.#writeOptionalWord(edge.outputNodeId);
7995
+ }
7996
+ }
7997
+ }
7998
+ #writeRoots() {
7999
+ for (const key of this.#rootKeys) {
8000
+ const root = this.#data.roots[key];
8001
+ const keyIndex = this.#data.strings.indexOf(key);
8002
+ if (keyIndex === -1) {
8003
+ throw new Error(`Root key "${key}" not found in strings table`);
8004
+ }
8005
+ this.#writeWord(keyIndex);
8006
+ this.#writeOptionalWord(root.argsNodeId);
8007
+ this.#writeOptionalWord(root.outputNodeId);
8008
+ }
8009
+ }
8010
+ };
8011
8011
 
8012
8012
  // ../param-graph/src/param-graph.ts
8013
8013
  var EdgeFlag = {
@@ -10976,7 +10976,7 @@ var import_node_path4 = __toESM(require("node:path"));
10976
10976
  var import_engines_version = __toESM(require_engines_version());
10977
10977
 
10978
10978
  // ../client-generator-js/package.json
10979
- var version = "7.4.0-integration-parameterization.9";
10979
+ var version = "7.4.0-integration-parameterization.11";
10980
10980
 
10981
10981
  // ../client-generator-js/src/resolvePrismaClient.ts
10982
10982
  var import_promises5 = __toESM(require("node:fs/promises"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/client",
3
- "version": "7.4.0-integration-parameterization.9",
3
+ "version": "7.4.0-integration-parameterization.11",
4
4
  "description": "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.",
5
5
  "keywords": [
6
6
  "ORM",
@@ -218,41 +218,41 @@
218
218
  "typescript": "5.4.5",
219
219
  "undici": "7.4.0",
220
220
  "zx": "8.4.1",
221
- "@prisma/adapter-better-sqlite3": "7.4.0-integration-parameterization.9",
222
- "@prisma/adapter-d1": "7.4.0-integration-parameterization.9",
223
- "@prisma/adapter-libsql": "7.4.0-integration-parameterization.9",
224
- "@prisma/adapter-mssql": "7.4.0-integration-parameterization.9",
225
- "@prisma/adapter-mariadb": "7.4.0-integration-parameterization.9",
226
- "@prisma/adapter-neon": "7.4.0-integration-parameterization.9",
227
- "@prisma/adapter-pg": "7.4.0-integration-parameterization.9",
228
- "@prisma/adapter-planetscale": "7.4.0-integration-parameterization.9",
229
- "@prisma/client-engine-runtime": "7.4.0-integration-parameterization.9",
230
- "@prisma/client-common": "7.4.0-integration-parameterization.9",
231
- "@prisma/client-generator-js": "7.4.0-integration-parameterization.9",
232
- "@prisma/client-generator-ts": "7.4.0-integration-parameterization.9",
233
- "@prisma/config": "7.4.0-integration-parameterization.9",
234
- "@prisma/debug": "7.4.0-integration-parameterization.9",
235
- "@prisma/driver-adapter-utils": "7.4.0-integration-parameterization.9",
236
- "@prisma/dmmf": "7.4.0-integration-parameterization.9",
237
- "@prisma/engines": "7.4.0-integration-parameterization.9",
238
- "@prisma/fetch-engine": "7.4.0-integration-parameterization.9",
239
- "@prisma/generator": "7.4.0-integration-parameterization.9",
240
- "@prisma/get-platform": "7.4.0-integration-parameterization.9",
241
- "@prisma/generator-helper": "7.4.0-integration-parameterization.9",
242
- "@prisma/instrumentation": "7.4.0-integration-parameterization.9",
243
- "@prisma/instrumentation-contract": "7.4.0-integration-parameterization.9",
244
- "@prisma/internals": "7.4.0-integration-parameterization.9",
245
- "@prisma/json-protocol": "7.4.0-integration-parameterization.9",
246
- "@prisma/migrate": "7.4.0-integration-parameterization.9",
247
- "@prisma/param-graph": "7.4.0-integration-parameterization.9",
248
- "@prisma/param-graph-builder": "7.4.0-integration-parameterization.9",
249
- "@prisma/sqlcommenter": "7.4.0-integration-parameterization.9",
250
- "@prisma/query-plan-executor": "7.4.0-integration-parameterization.9",
251
- "@prisma/sqlcommenter-trace-context": "7.4.0-integration-parameterization.9",
252
- "@prisma/ts-builders": "7.4.0-integration-parameterization.9"
221
+ "@prisma/adapter-d1": "7.4.0-integration-parameterization.11",
222
+ "@prisma/adapter-libsql": "7.4.0-integration-parameterization.11",
223
+ "@prisma/adapter-better-sqlite3": "7.4.0-integration-parameterization.11",
224
+ "@prisma/adapter-mariadb": "7.4.0-integration-parameterization.11",
225
+ "@prisma/adapter-mssql": "7.4.0-integration-parameterization.11",
226
+ "@prisma/adapter-neon": "7.4.0-integration-parameterization.11",
227
+ "@prisma/adapter-pg": "7.4.0-integration-parameterization.11",
228
+ "@prisma/client-common": "7.4.0-integration-parameterization.11",
229
+ "@prisma/client-engine-runtime": "7.4.0-integration-parameterization.11",
230
+ "@prisma/client-generator-ts": "7.4.0-integration-parameterization.11",
231
+ "@prisma/client-generator-js": "7.4.0-integration-parameterization.11",
232
+ "@prisma/adapter-planetscale": "7.4.0-integration-parameterization.11",
233
+ "@prisma/config": "7.4.0-integration-parameterization.11",
234
+ "@prisma/debug": "7.4.0-integration-parameterization.11",
235
+ "@prisma/dmmf": "7.4.0-integration-parameterization.11",
236
+ "@prisma/engines": "7.4.0-integration-parameterization.11",
237
+ "@prisma/driver-adapter-utils": "7.4.0-integration-parameterization.11",
238
+ "@prisma/generator": "7.4.0-integration-parameterization.11",
239
+ "@prisma/fetch-engine": "7.4.0-integration-parameterization.11",
240
+ "@prisma/generator-helper": "7.4.0-integration-parameterization.11",
241
+ "@prisma/get-platform": "7.4.0-integration-parameterization.11",
242
+ "@prisma/instrumentation": "7.4.0-integration-parameterization.11",
243
+ "@prisma/instrumentation-contract": "7.4.0-integration-parameterization.11",
244
+ "@prisma/migrate": "7.4.0-integration-parameterization.11",
245
+ "@prisma/json-protocol": "7.4.0-integration-parameterization.11",
246
+ "@prisma/param-graph": "7.4.0-integration-parameterization.11",
247
+ "@prisma/param-graph-builder": "7.4.0-integration-parameterization.11",
248
+ "@prisma/internals": "7.4.0-integration-parameterization.11",
249
+ "@prisma/query-plan-executor": "7.4.0-integration-parameterization.11",
250
+ "@prisma/sqlcommenter": "7.4.0-integration-parameterization.11",
251
+ "@prisma/ts-builders": "7.4.0-integration-parameterization.11",
252
+ "@prisma/sqlcommenter-trace-context": "7.4.0-integration-parameterization.11"
253
253
  },
254
254
  "dependencies": {
255
- "@prisma/client-runtime-utils": "7.4.0-integration-parameterization.9"
255
+ "@prisma/client-runtime-utils": "7.4.0-integration-parameterization.11"
256
256
  },
257
257
  "peerDependencies": {
258
258
  "prisma": "*",