@prisma-next/driver-postgres 0.3.0-pr.75.8 → 0.3.0-pr.76.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.
@@ -113,4 +113,4 @@ export {
113
113
  isAlreadyConnectedError,
114
114
  normalizePgError
115
115
  };
116
- //# sourceMappingURL=chunk-GGJ2L556.js.map
116
+ //# sourceMappingURL=chunk-M4WUUVS5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/descriptor-meta.ts","../src/normalize-error.ts"],"sourcesContent":["export const postgresDriverDescriptorMeta = {\n kind: 'driver',\n familyId: 'sql',\n targetId: 'postgres',\n id: 'postgres',\n version: '0.0.1',\n capabilities: {},\n} as const;\n","import { SqlConnectionError, SqlQueryError } from '@prisma-next/sql-errors';\n\n/**\n * Postgres error shape from the pg library.\n *\n * Note: The pg library doesn't export a DatabaseError type or interface, but errors\n * thrown by pg.query() and pg.Client have this shape at runtime. We define this\n * interface to match the actual runtime structure documented in the pg library\n * (https://github.com/brianc/node-postgres/blob/master/packages/pg/lib/errors.js).\n *\n * The @types/pg package also doesn't provide comprehensive error type definitions,\n * so we define our own interface based on the runtime error properties.\n */\ninterface PostgresError extends Error {\n readonly code?: string;\n readonly constraint?: string;\n readonly table?: string;\n readonly column?: string;\n readonly detail?: string;\n readonly hint?: string;\n readonly position?: string;\n readonly internalPosition?: string;\n readonly internalQuery?: string;\n readonly where?: string;\n readonly schema?: string;\n readonly file?: string;\n readonly line?: string;\n readonly routine?: string;\n}\n\n/**\n * Checks if an error is a connection-related error.\n */\nfunction isConnectionError(error: Error): boolean {\n const code = (error as { code?: string }).code;\n if (code) {\n // Node.js error codes for connection issues\n if (\n code === 'ECONNRESET' ||\n code === 'ETIMEDOUT' ||\n code === 'ECONNREFUSED' ||\n code === 'ENOTFOUND' ||\n code === 'EHOSTUNREACH'\n ) {\n return true;\n }\n }\n\n // Check error message for connection-related strings\n const message = error.message.toLowerCase();\n if (\n message.includes('connection terminated') ||\n message.includes('connection closed') ||\n message.includes('connection refused') ||\n message.includes('connection timeout') ||\n message.includes('connection reset')\n ) {\n return true;\n }\n\n return false;\n}\n\n/**\n * Checks if a connection error is transient (might succeed on retry).\n */\nfunction isTransientConnectionError(error: Error): boolean {\n const code = (error as { code?: string }).code;\n if (code) {\n // Timeouts and connection resets are often transient\n if (code === 'ETIMEDOUT' || code === 'ECONNRESET') {\n return true;\n }\n // Connection refused is usually not transient (server is down)\n if (code === 'ECONNREFUSED') {\n return false;\n }\n }\n\n const message = error.message.toLowerCase();\n if (message.includes('timeout') || message.includes('connection reset')) {\n return true;\n }\n\n return false;\n}\n\n/**\n * PostgreSQL-specific error properties that indicate an error originated from pg library.\n * These properties are not present on Node.js system errors.\n * Excludes generic properties like 'detail', 'file', 'line', and 'position' that could appear on any error.\n */\nconst PG_ERROR_PROPERTIES = [\n 'constraint',\n 'table',\n 'column',\n 'hint',\n 'internalPosition',\n 'internalQuery',\n 'where',\n 'schema',\n 'routine',\n] as const;\n\n/**\n * Type predicate to check if an error is a Postgres error from the pg library.\n *\n * Distinguishes pg library errors from Node.js system errors by checking for:\n * - SQLSTATE codes (5-character alphanumeric codes like '23505', '42601')\n * - pg-specific properties (constraint, table, column, hint, etc.) that Node.js errors don't have\n *\n * Node.js system errors (ECONNREFUSED, ETIMEDOUT, etc.) are excluded to prevent false positives.\n */\nexport function isPostgresError(error: unknown): error is PostgresError {\n if (!(error instanceof Error)) {\n return false;\n }\n\n const pgError = error as PostgresError;\n\n // Check for SQLSTATE code (5-character alphanumeric) - primary indicator of pg errors\n if (pgError.code && isPostgresSqlState(pgError.code)) {\n return true;\n }\n\n // Check for pg-specific properties that Node.js system errors don't have\n // These properties indicate the error originated from pg library query execution\n return PG_ERROR_PROPERTIES.some((prop) => pgError[prop] !== undefined);\n}\n\n/**\n * Checks if an error is an \"already connected\" error from pg.Client.connect().\n * When calling connect() on an already-connected client, pg throws an error that can be safely ignored.\n */\nexport function isAlreadyConnectedError(error: unknown): error is Error {\n if (!(error instanceof Error)) {\n return false;\n }\n const message = error.message.toLowerCase();\n return message.includes('already') && message.includes('connected');\n}\n\n/**\n * Checks if an error code is a Postgres SQLSTATE (5-character alphanumeric code).\n * SQLSTATE codes are standardized SQL error codes (e.g., '23505' for unique violation).\n */\nfunction isPostgresSqlState(code: string | undefined): boolean {\n if (!code) {\n return false;\n }\n // Postgres SQLSTATE codes are 5-character alphanumeric strings\n // Examples: '23505' (unique violation), '42501' (insufficient privilege), '42601' (syntax error)\n return /^[A-Z0-9]{5}$/.test(code);\n}\n\n/**\n * Normalizes a Postgres error into a SQL-shared error type.\n *\n * - Postgres SQLSTATE errors (5-char codes like '23505') → SqlQueryError\n * - Connection errors (ECONNRESET, ETIMEDOUT, etc.) → SqlConnectionError\n * - Unknown errors → returns the original error as-is\n *\n * The original error is preserved via Error.cause to maintain stack traces.\n *\n * @param error - The error to normalize (typically from pg library)\n * @returns SqlQueryError for query-related failures\n * @returns SqlConnectionError for connection-related failures\n * @returns The original error if it cannot be normalized\n */\nexport function normalizePgError(error: unknown): SqlQueryError | SqlConnectionError | Error {\n if (!(error instanceof Error)) {\n // Wrap non-Error values in an Error object\n return new Error(String(error));\n }\n\n const pgError = error as PostgresError;\n\n // Check for Postgres SQLSTATE (query errors)\n if (isPostgresSqlState(pgError.code)) {\n // isPostgresSqlState ensures code is defined and is a valid SQLSTATE\n // biome-ignore lint/style/noNonNullAssertion: isPostgresSqlState guarantees code is defined\n const sqlState = pgError.code!;\n const options: {\n cause: Error;\n sqlState: string;\n constraint?: string;\n table?: string;\n column?: string;\n detail?: string;\n } = {\n cause: error,\n sqlState,\n };\n if (pgError.constraint !== undefined) {\n options.constraint = pgError.constraint;\n }\n if (pgError.table !== undefined) {\n options.table = pgError.table;\n }\n if (pgError.column !== undefined) {\n options.column = pgError.column;\n }\n if (pgError.detail !== undefined) {\n options.detail = pgError.detail;\n }\n return new SqlQueryError(error.message, options);\n }\n\n // Check for connection errors\n if (isConnectionError(error)) {\n return new SqlConnectionError(error.message, {\n cause: error,\n transient: isTransientConnectionError(error),\n });\n }\n\n // Unknown error - return as-is to preserve original error and stack trace\n return error;\n}\n"],"mappings":";AAAO,IAAM,+BAA+B;AAAA,EAC1C,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AAAA,EACV,IAAI;AAAA,EACJ,SAAS;AAAA,EACT,cAAc,CAAC;AACjB;;;ACPA,SAAS,oBAAoB,qBAAqB;AAiClD,SAAS,kBAAkB,OAAuB;AAChD,QAAM,OAAQ,MAA4B;AAC1C,MAAI,MAAM;AAER,QACE,SAAS,gBACT,SAAS,eACT,SAAS,kBACT,SAAS,eACT,SAAS,gBACT;AACA,aAAO;AAAA,IACT;AAAA,EACF;AAGA,QAAM,UAAU,MAAM,QAAQ,YAAY;AAC1C,MACE,QAAQ,SAAS,uBAAuB,KACxC,QAAQ,SAAS,mBAAmB,KACpC,QAAQ,SAAS,oBAAoB,KACrC,QAAQ,SAAS,oBAAoB,KACrC,QAAQ,SAAS,kBAAkB,GACnC;AACA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;AAKA,SAAS,2BAA2B,OAAuB;AACzD,QAAM,OAAQ,MAA4B;AAC1C,MAAI,MAAM;AAER,QAAI,SAAS,eAAe,SAAS,cAAc;AACjD,aAAO;AAAA,IACT;AAEA,QAAI,SAAS,gBAAgB;AAC3B,aAAO;AAAA,IACT;AAAA,EACF;AAEA,QAAM,UAAU,MAAM,QAAQ,YAAY;AAC1C,MAAI,QAAQ,SAAS,SAAS,KAAK,QAAQ,SAAS,kBAAkB,GAAG;AACvE,WAAO;AAAA,EACT;AAEA,SAAO;AACT;AAOA,IAAM,sBAAsB;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAWO,SAAS,gBAAgB,OAAwC;AACtE,MAAI,EAAE,iBAAiB,QAAQ;AAC7B,WAAO;AAAA,EACT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names":[]}
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  normalizePgError,
3
3
  postgresDriverDescriptorMeta
4
- } from "./chunk-GGJ2L556.js";
4
+ } from "../chunk-M4WUUVS5.js";
5
5
 
6
6
  // src/exports/control.ts
7
7
  import { errorRuntime } from "@prisma-next/core-control-plane/errors";
@@ -3,7 +3,7 @@ import {
3
3
  isPostgresError,
4
4
  normalizePgError,
5
5
  postgresDriverDescriptorMeta
6
- } from "./chunk-GGJ2L556.js";
6
+ } from "../chunk-M4WUUVS5.js";
7
7
 
8
8
  // src/postgres-driver.ts
9
9
  import { Pool } from "pg";
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@prisma-next/driver-postgres",
3
- "version": "0.3.0-pr.75.8",
3
+ "version": "0.3.0-pr.76.1",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "dependencies": {
7
7
  "arktype": "^2.0.0",
8
8
  "pg": "8.16.3",
9
9
  "pg-cursor": "^2.10.5",
10
- "@prisma-next/contract": "0.3.0-pr.75.8",
11
- "@prisma-next/core-control-plane": "0.3.0-pr.75.8",
12
- "@prisma-next/core-execution-plane": "0.3.0-pr.75.8",
13
- "@prisma-next/utils": "0.3.0-pr.75.8",
14
- "@prisma-next/sql-contract": "0.3.0-pr.75.8",
15
- "@prisma-next/sql-errors": "0.3.0-pr.75.8",
16
- "@prisma-next/sql-operations": "0.3.0-pr.75.8",
17
- "@prisma-next/sql-relational-core": "0.3.0-pr.75.8"
10
+ "@prisma-next/contract": "0.3.0-pr.76.1",
11
+ "@prisma-next/core-control-plane": "0.3.0-pr.76.1",
12
+ "@prisma-next/core-execution-plane": "0.3.0-pr.76.1",
13
+ "@prisma-next/utils": "0.3.0-pr.76.1",
14
+ "@prisma-next/sql-contract": "0.3.0-pr.76.1",
15
+ "@prisma-next/sql-errors": "0.3.0-pr.76.1",
16
+ "@prisma-next/sql-operations": "0.3.0-pr.76.1",
17
+ "@prisma-next/sql-relational-core": "0.3.0-pr.76.1"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@vitest/coverage-v8": "4.0.16",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/core/descriptor-meta.ts","../../src/normalize-error.ts"],"sourcesContent":["export const postgresDriverDescriptorMeta = {\n kind: 'driver',\n familyId: 'sql',\n targetId: 'postgres',\n id: 'postgres',\n version: '0.0.1',\n capabilities: {},\n} as const;\n","import { SqlConnectionError, SqlQueryError } from '@prisma-next/sql-errors';\n\n/**\n * Postgres error shape from the pg library.\n *\n * Note: The pg library doesn't export a DatabaseError type or interface, but errors\n * thrown by pg.query() and pg.Client have this shape at runtime. We define this\n * interface to match the actual runtime structure documented in the pg library\n * (https://github.com/brianc/node-postgres/blob/master/packages/pg/lib/errors.js).\n *\n * The @types/pg package also doesn't provide comprehensive error type definitions,\n * so we define our own interface based on the runtime error properties.\n */\ninterface PostgresError extends Error {\n readonly code?: string;\n readonly constraint?: string;\n readonly table?: string;\n readonly column?: string;\n readonly detail?: string;\n readonly hint?: string;\n readonly position?: string;\n readonly internalPosition?: string;\n readonly internalQuery?: string;\n readonly where?: string;\n readonly schema?: string;\n readonly file?: string;\n readonly line?: string;\n readonly routine?: string;\n}\n\n/**\n * Checks if an error is a connection-related error.\n */\nfunction isConnectionError(error: Error): boolean {\n const code = (error as { code?: string }).code;\n if (code) {\n // Node.js error codes for connection issues\n if (\n code === 'ECONNRESET' ||\n code === 'ETIMEDOUT' ||\n code === 'ECONNREFUSED' ||\n code === 'ENOTFOUND' ||\n code === 'EHOSTUNREACH'\n ) {\n return true;\n }\n }\n\n // Check error message for connection-related strings\n const message = error.message.toLowerCase();\n if (\n message.includes('connection terminated') ||\n message.includes('connection closed') ||\n message.includes('connection refused') ||\n message.includes('connection timeout') ||\n message.includes('connection reset')\n ) {\n return true;\n }\n\n return false;\n}\n\n/**\n * Checks if a connection error is transient (might succeed on retry).\n */\nfunction isTransientConnectionError(error: Error): boolean {\n const code = (error as { code?: string }).code;\n if (code) {\n // Timeouts and connection resets are often transient\n if (code === 'ETIMEDOUT' || code === 'ECONNRESET') {\n return true;\n }\n // Connection refused is usually not transient (server is down)\n if (code === 'ECONNREFUSED') {\n return false;\n }\n }\n\n const message = error.message.toLowerCase();\n if (message.includes('timeout') || message.includes('connection reset')) {\n return true;\n }\n\n return false;\n}\n\n/**\n * PostgreSQL-specific error properties that indicate an error originated from pg library.\n * These properties are not present on Node.js system errors.\n * Excludes generic properties like 'detail', 'file', 'line', and 'position' that could appear on any error.\n */\nconst PG_ERROR_PROPERTIES = [\n 'constraint',\n 'table',\n 'column',\n 'hint',\n 'internalPosition',\n 'internalQuery',\n 'where',\n 'schema',\n 'routine',\n] as const;\n\n/**\n * Type predicate to check if an error is a Postgres error from the pg library.\n *\n * Distinguishes pg library errors from Node.js system errors by checking for:\n * - SQLSTATE codes (5-character alphanumeric codes like '23505', '42601')\n * - pg-specific properties (constraint, table, column, hint, etc.) that Node.js errors don't have\n *\n * Node.js system errors (ECONNREFUSED, ETIMEDOUT, etc.) are excluded to prevent false positives.\n */\nexport function isPostgresError(error: unknown): error is PostgresError {\n if (!(error instanceof Error)) {\n return false;\n }\n\n const pgError = error as PostgresError;\n\n // Check for SQLSTATE code (5-character alphanumeric) - primary indicator of pg errors\n if (pgError.code && isPostgresSqlState(pgError.code)) {\n return true;\n }\n\n // Check for pg-specific properties that Node.js system errors don't have\n // These properties indicate the error originated from pg library query execution\n return PG_ERROR_PROPERTIES.some((prop) => pgError[prop] !== undefined);\n}\n\n/**\n * Checks if an error is an \"already connected\" error from pg.Client.connect().\n * When calling connect() on an already-connected client, pg throws an error that can be safely ignored.\n */\nexport function isAlreadyConnectedError(error: unknown): error is Error {\n if (!(error instanceof Error)) {\n return false;\n }\n const message = error.message.toLowerCase();\n return message.includes('already') && message.includes('connected');\n}\n\n/**\n * Checks if an error code is a Postgres SQLSTATE (5-character alphanumeric code).\n * SQLSTATE codes are standardized SQL error codes (e.g., '23505' for unique violation).\n */\nfunction isPostgresSqlState(code: string | undefined): boolean {\n if (!code) {\n return false;\n }\n // Postgres SQLSTATE codes are 5-character alphanumeric strings\n // Examples: '23505' (unique violation), '42501' (insufficient privilege), '42601' (syntax error)\n return /^[A-Z0-9]{5}$/.test(code);\n}\n\n/**\n * Normalizes a Postgres error into a SQL-shared error type.\n *\n * - Postgres SQLSTATE errors (5-char codes like '23505') → SqlQueryError\n * - Connection errors (ECONNRESET, ETIMEDOUT, etc.) → SqlConnectionError\n * - Unknown errors → returns the original error as-is\n *\n * The original error is preserved via Error.cause to maintain stack traces.\n *\n * @param error - The error to normalize (typically from pg library)\n * @returns SqlQueryError for query-related failures\n * @returns SqlConnectionError for connection-related failures\n * @returns The original error if it cannot be normalized\n */\nexport function normalizePgError(error: unknown): SqlQueryError | SqlConnectionError | Error {\n if (!(error instanceof Error)) {\n // Wrap non-Error values in an Error object\n return new Error(String(error));\n }\n\n const pgError = error as PostgresError;\n\n // Check for Postgres SQLSTATE (query errors)\n if (isPostgresSqlState(pgError.code)) {\n // isPostgresSqlState ensures code is defined and is a valid SQLSTATE\n // biome-ignore lint/style/noNonNullAssertion: isPostgresSqlState guarantees code is defined\n const sqlState = pgError.code!;\n const options: {\n cause: Error;\n sqlState: string;\n constraint?: string;\n table?: string;\n column?: string;\n detail?: string;\n } = {\n cause: error,\n sqlState,\n };\n if (pgError.constraint !== undefined) {\n options.constraint = pgError.constraint;\n }\n if (pgError.table !== undefined) {\n options.table = pgError.table;\n }\n if (pgError.column !== undefined) {\n options.column = pgError.column;\n }\n if (pgError.detail !== undefined) {\n options.detail = pgError.detail;\n }\n return new SqlQueryError(error.message, options);\n }\n\n // Check for connection errors\n if (isConnectionError(error)) {\n return new SqlConnectionError(error.message, {\n cause: error,\n transient: isTransientConnectionError(error),\n });\n }\n\n // Unknown error - return as-is to preserve original error and stack trace\n return error;\n}\n"],"mappings":";AAAO,IAAM,+BAA+B;AAAA,EAC1C,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AAAA,EACV,IAA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