Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@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.
1.0.0-alpha.29 (2024-11-19)
node:process
(#2156) (346a350), closes #2154getTimeLabel
function (#2140) (73d94d5)FAQs
Arcjet environment detection
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 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.