@vercel/postgres
Advanced tools
Comparing version 0.1.0-canary.8 to 0.1.0-canary.9
@@ -1,8 +0,6 @@ | ||
import { ClientConfig, PoolConfig, Client, Pool } from '@neondatabase/serverless'; | ||
import { Client, Pool } from '@neondatabase/serverless'; | ||
export { Client, FieldDef, Pool, Query, QueryArrayConfig, QueryArrayResult, QueryConfig, QueryParse, QueryResult, QueryResultBase, QueryResultRow } from '@neondatabase/serverless'; | ||
import { V as VercelPostgresClientConfig, a as VercelPostgresPoolConfig } from './types-2da2e693.js'; | ||
export { V as VercelPostgresClientConfig, a as VercelPostgresPoolConfig } from './types-2da2e693.js'; | ||
declare type ConfigItemsToOmit = 'user' | 'database' | 'password' | 'host' | 'port'; | ||
declare type VercelPostgresClientConfig = Omit<ClientConfig, ConfigItemsToOmit>; | ||
declare type VercelPostgresPoolConfig = Omit<PoolConfig, ConfigItemsToOmit>; | ||
declare function createClient(config?: VercelPostgresClientConfig): Client; | ||
@@ -15,2 +13,2 @@ | ||
export { VercelPostgresClientConfig, VercelPostgresPoolConfig, createClient, createPool, postgresConnectionString }; | ||
export { createClient, createPool, postgresConnectionString }; |
@@ -1,1 +0,1 @@ | ||
import{Client as l}from"@neondatabase/serverless";var p={pool:"POSTGRES_URL",direct:"POSTGRES_URL_NON_POOLING"};function e(n="pool"){let o=process.env[p[n]];return o==="undefined"&&(o=void 0),o}function r(n){return n.includes("-pooler.")}function i(n){return!r(n)}var t=class extends Error{constructor(s,c){super(`VercelPostgresError - '${s}': ${c}`);this.code=s;this.name="VercelPostgresError"}};function _(n){let o=(n==null?void 0:n.connectionString)??e("direct");if(!o)throw new t("missing_connection_string","You did not supply a 'connectionString' and no 'POSTGRES_URL_NON_POOLING' env var was found.");if(!i(o))throw new t("invalid_connection_string","This connection string is meant to be used with a pooled connection. Try `createPool()` instead.");return new l({...n,connectionString:o})}import{Pool as g}from"@neondatabase/serverless";function w(n){let o=(n==null?void 0:n.connectionString)??e("pool");if(!o)throw new t("missing_connection_string","You did not supply a 'connectionString' and no 'POSTGRES_URL' env var was found.");if(!r(o))throw new t("invalid_connection_string","This connection string is meant to be used with a direct connection. Make sure to use a pooled connection string or try `createClient()` instead.");return new g({...n,connectionString:o})}export{_ as createClient,w as createPool,e as postgresConnectionString}; | ||
import{a as o,c as r,d as t}from"./chunk-RRELKLLB.js";export{r as createClient,t as createPool,o as postgresConnectionString}; |
{ | ||
"name": "@vercel/postgres", | ||
"version": "0.1.0-canary.8", | ||
"version": "0.1.0-canary.9", | ||
"description": "Connect to Vercel Postgres databases on the Edge", | ||
@@ -5,0 +5,0 @@ "homepage": "https://vercel.com", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
17485
13
49
2