@juit/pgproxy-client
Advanced tools
Comparing version 1.0.21 to 1.0.22
@@ -1,2 +0,1 @@ | ||
/// <reference types="node" /> | ||
import { Registry } from '@juit/pgproxy-types'; | ||
@@ -3,0 +2,0 @@ import { PGResult } from './result'; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="node" /> | ||
/** Describes the result of a query from a {@link PGProvider} */ | ||
@@ -3,0 +2,0 @@ export interface PGConnectionResult { |
{ | ||
"name": "@juit/pgproxy-client", | ||
"version": "1.0.21", | ||
"version": "1.0.22", | ||
"main": "./dist/index.cjs", | ||
@@ -38,3 +38,3 @@ "module": "./dist/index.mjs", | ||
"dependencies": { | ||
"@juit/pgproxy-types": "1.0.21" | ||
"@juit/pgproxy-types": "1.0.22" | ||
}, | ||
@@ -41,0 +41,0 @@ "directories": { |
@@ -113,3 +113,3 @@ import { Registry, serialize } from '@juit/pgproxy-types' | ||
constructor(urlOrProvider?: string | URL | PGProvider<PGConnection>) { | ||
urlOrProvider = urlOrProvider || globalThis?.process?.env?.PGURL | ||
urlOrProvider = urlOrProvider || ((globalThis as any)?.process?.env?.PGURL as string | undefined) | ||
assert(urlOrProvider, 'No URL to connect to (PGURL environment variable missing?)') | ||
@@ -121,4 +121,4 @@ if (typeof urlOrProvider === 'string') urlOrProvider = new URL(urlOrProvider, 'psql:///') | ||
if (!(urlOrProvider.username || urlOrProvider.password)) { | ||
const username = globalThis?.process?.env?.PGUSER || '' | ||
const password = globalThis?.process?.env?.PGPASSWORD || '' | ||
const username = ((globalThis as any)?.process?.env?.PGUSER as string | undefined) || '' | ||
const password = ((globalThis as any)?.process?.env?.PGPASSWORD as string | undefined) || '' | ||
urlOrProvider.username = encodeURIComponent(username) | ||
@@ -125,0 +125,0 @@ urlOrProvider.password = encodeURIComponent(password) |
@@ -117,3 +117,3 @@ import { assert } from './assert' | ||
payload = JSON.parse(data) | ||
} catch (error) { | ||
} catch { | ||
throw new Error('Unable to parse JSON payload') | ||
@@ -120,0 +120,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
79634
1481
+ Added@juit/pgproxy-types@1.0.22(transitive)
- Removed@juit/pgproxy-types@1.0.21(transitive)
Updated@juit/pgproxy-types@1.0.22