@neondatabase/serverless
Advanced tools
Comparing version 0.10.0 to 0.10.1
@@ -0,1 +1,5 @@ | ||
## 0.10.1 (2024-10-07) | ||
Fix `CONFIG.MD` documentation. | ||
## 0.10.0 (2024-10-07) | ||
@@ -2,0 +6,0 @@ |
@@ -111,2 +111,18 @@ # Options and configuration | ||
### `authToken: string | (() => Promise<string> | string)` | ||
The `authToken` option can be passed to `neon(...)` to set the `Authorization` header for the `fetch` request. This allows you to authenticate database requests against third-party authentication providers. So, this mechanism can be used to ensure that access control and authorization are managed effectively across different systems. | ||
Example of usage: | ||
```typescript | ||
import { neon } from '@neondatabase/serverless'; | ||
// Retrieve the JWT token (implementation depends on your auth system) | ||
const authToken = getAuthToken(); | ||
// Initialize the Neon client with a connection string and auth token | ||
const sql = neon(process.env.DATABASE_URL, { authToken }); | ||
// Run a query | ||
const posts = await sql('SELECT * FROM posts'); | ||
``` | ||
## `transaction(...)` function | ||
@@ -113,0 +129,0 @@ |
{ | ||
"name": "@neondatabase/serverless", | ||
"version": "0.10.0", | ||
"version": "0.10.1", | ||
"author": "Neon", | ||
@@ -5,0 +5,0 @@ "description": "node-postgres for serverless environments from neon.tech", |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
347761
4