Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@planetscale/edge
Advanced tools
A JavaScript client for communicating with PlanetScale Edge API.
A JavaScript client for the PlanetScale Edge API.
$ npm install @planetscale/edge
import { connect } from '@planetscale/edge'
const config = {
host: 'aws.connect.psdb.cloud',
username: '<user>',
password: '<password>'
}
const conn = await connect(config)
const results = await conn.execute('select 1 from dual')
console.log(results)
Use the Client
connection factory class to create fresh connections for each transaction or web request handler.
import { Client } from '@planetscale/edge'
const client = new Client({
host: 'aws.connect.psdb.cloud',
username: '<user>',
password: '<password>'
})
const conn = await client.connection()
const results = await conn.execute('select 1 from dual')
console.log(results)
Node.js version 18 includes a built-in global fetch
function. When using an older version of Node.js, you can provide a custom fetch function implementation. We recommend the undici
package on which Node's built-in fetch is based.
import { connect } from '@planetscale/edge'
import { fetch } from 'undici'
const config = {
fetch,
host: 'aws.connect.psdb.cloud',
username: '<user>',
password: '<password>'
}
const conn = await connect(config)
const results = await conn.execute('select 1 from dual')
console.log(results)
npm install
npm test
Distributed under the Apache 2.0 license. See LICENSE for details.
FAQs
A JavaScript client for communicating with PlanetScale Edge API.
We found that @planetscale/edge demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.