
Product
Introducing Pull Request Stories to Help Security Teams Track Supply Chain Risks
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
@gander-social-atproto/xrpc-server
Advanced tools
TypeScript library for implementing atproto HTTP API services, with Lexicon schema validation.
import { LexiconDoc } from '@gander-social-atproto/lexicon'
import * as xrpc from '@gander-social-atproto/xrpc-server'
import express from 'express'
const lexicons: LexiconDoc[] = [
{
lexicon: 1,
id: 'io.example.ping',
defs: {
main: {
type: 'query',
parameters: {
type: 'params',
properties: { message: { type: 'string' } },
},
output: {
encoding: 'application/json',
},
},
},
},
]
// create xrpc server
const server = xrpc.createServer(lexicons)
function ping(ctx: {
auth: xrpc.HandlerAuth | undefined
params: xrpc.Params
input: xrpc.HandlerInput | undefined
req: express.Request
res: express.Response
}) {
return { encoding: 'application/json', body: { message: ctx.params.message } }
}
server.method('io.example.ping', ping)
// mount in express
const app = express()
app.use(server.router)
app.listen(8080)
This project is dual-licensed under MIT and Apache 2.0 terms:
Downstream projects and end users may chose either license individually, or both together, at their discretion. The motivation for this dual-licensing is the additional software patent assurance provided by Apache 2.0.
FAQs
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.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.