Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vercel/postgres

Package Overview
Dependencies
Maintainers
8
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vercel/postgres - npm Package Compare versions

Comparing version 0.1.0-canary.8 to 0.1.0-canary.9

dist/chunk-R3FXRHPC.cjs

10

dist/index.d.ts

@@ -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 };

2

dist/index.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc