
Security News
pnpm 10.16 Adds New Setting for Delayed Dependency Updates
pnpm's new minimumReleaseAge setting delays package updates to prevent supply chain attacks, with other tools like Taze and NCU following suit.
@arcjet/env
Advanced tools
@arcjet/env
Arcjet environment detection.
Currently operates on an environment object with the type:
type Env = {
FLY_APP_NAME?: string;
NODE_ENV?: string;
ARCJET_KEY?: string;
ARCJET_ENV?: string;
ARCJET_LOG_LEVEL?: string;
ARCJET_BASE_URL?: string;
};
npm install -S @arcjet/env
import * as env from "@arcjet/env";
env.platform({ FLY_APP_NAME: "foobar" }) === "fly-io";
env.platform({}) === undefined;
env.isDevelopment({ NODE_ENV: "production" }) === false;
env.isDevelopment({ NODE_ENV: "development" }) === true;
env.isDevelopment({ ARCJET_ENV: "production" }) === false;
env.isDevelopment({ ARCJET_ENV: "development" }) === true;
env.logLevel({ ARCJET_LOG_LEVEL: "debug" }) === "debug";
env.logLevel({ ARCJET_LOG_LEVEL: "info" }) === "info";
env.logLevel({ ARCJET_LOG_LEVEL: "warn" }) === "warn";
env.logLevel({ ARCJET_LOG_LEVEL: "error" }) === "error";
env.logLevel({ ARCJET_LOG_LEVEL: "" }) === "warn"; // default
// Will use various environment variables to detect the proper base URL
env.baseUrl(process.env);
env.apiKey({ ARCJET_KEY: "ajkey_abc123" }) === "ajkey_abc123";
env.apiKey({ ARCJET_KEY: "invalid" }) === undefined;
Licensed under the Apache License, Version 2.0.
FAQs
Arcjet environment detection
The npm package @arcjet/env receives a total of 13,148 weekly downloads. As such, @arcjet/env popularity was classified as popular.
We found that @arcjet/env demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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
pnpm's new minimumReleaseAge setting delays package updates to prevent supply chain attacks, with other tools like Taze and NCU following suit.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.