![Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility](https://cdn.sanity.io/images/cgdhsj6q/production/97774ea8c88cc8f4bed2766c31994ebc38116948-1664x1366.png?w=400&fit=max&auto=format)
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
arcjet
Arcjet helps developers protect their apps. Installed as an SDK, it provides a set of core primitives such as rate limiting and bot protection. These can be used independently or combined to create a set of layered defenses, such as signup form protection.
This is the Arcjet TypeScript and JavaScript SDK core.
Visit docs.arcjet.com to get started.
Generally, you'll want to use the Arcjet SDK for your specific framework, such
as @arcjet/next
for Next.js. However, this package
can be used to interact with Arcjet if your framework does not have an
integration.
npm install -S arcjet
import http from "http";
import arcjet, { createRemoteClient, defaultBaseUrl } from "arcjet";
import { createConnectTransport } from "@connectrpc/connect-node";
const aj = arcjet({
key: "ajkey_mykey",
rules: [],
client: createRemoteClient({
transport: createConnectTransport({
baseUrl: defaultBaseUrl(),
httpVersion: "1.1",
}),
}),
});
const server = http.createServer(async function (
req: http.IncomingMessage,
res: http.ServerResponse,
) {
// Construct an object with Arcjet request details
const details = {
ip: req.socket.remoteAddress,
};
const decision = await aj.protect(details);
if (decision.isDenied()) {
res.writeHead(403, { "Content-Type": "application/json" });
res.end(JSON.stringify({ error: "Forbidden" }));
} else {
res.writeHead(200, { "Content-Type": "application/json" });
res.end(JSON.stringify({ data: "Hello World!" }));
}
});
server.listen(8000);
Reference documentation is available at docs.arcjet.com.
Licensed under the Apache License, Version 2.0.
FAQs
Arcjet TypeScript and JavaScript SDK core
The npm package arcjet receives a total of 9,377 weekly downloads. As such, arcjet popularity was classified as popular.
We found that arcjet demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.