
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@alterior/express
Advanced tools
Access Express state within an Alterior app.
@alterior/web-server
provides WebEvent.request
which exposes the HTTP request object of the underlying web server framework being used. Alterior supports more than one framework, including express
and fastify
. Technically the minimum shape of WebEvent.request
is that of the request
object defined by the Node.js http
module. As an app developer which uses Express as the server framework in my Alterior app, I want to access WebEvent.request
with a Typescript type that exposes all that Express provides, not just as a generic Node.js http
request object. I don't want to manually cast this object whenever I use it.
Since WebEvent.request
is static (using the HTTP request's Zone to determine the appropriate value), we can create new ways to access this value which are appropriately typed.
Splitting this functionality into a specific package lets us remove unused code when not using Express.
import { ExpressContext } from '@alterior/express';
// ...
@WebService()
export class MyService {
@Get()
info() {
console.log(`user agent is: ${ExpressContext.request.header('User-Agent')}`);
}
}
FAQs
Access Express state within an Alterior app
We found that @alterior/express demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.