New:Socket for Asana Is Now Available.Learn more
Get Started

@arcjet/env

Package Overview
Dependencies
Maintainers
2
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arcjet/env - npm Package Compare versions

Comparing version
1.9.1
to
1.10.0-rc.0
+50
-50
dist/index.d.ts
//#region src/index.d.ts
/**
* Environment.
*/
* Environment.
*/
type Env = {
[key: string]: unknown;
/**
* Base URL of Arcjet API.
*/
* Base URL of Arcjet API.
*/
ARCJET_BASE_URL?: string | undefined;
/**
* Environment of Arcjet SDK.
*/
* Environment of Arcjet SDK.
*/
ARCJET_ENV?: string | undefined;
/**
* Log level of Arcjet SDK.
*/
* Log level of Arcjet SDK.
*/
ARCJET_LOG_LEVEL?: string | undefined;
/**
* Firebase configuration variable.
*/
* Firebase configuration variable.
*/
FIREBASE_CONFIG?: string | undefined;
/**
* Name of Fly.io app.
*/
* Name of Fly.io app.
*/
FLY_APP_NAME?: string | undefined;
/**
* Vite mode.
*/
* Vite mode.
*/
MODE?: string | undefined;
/**
* Environment of Node.js.
*/
* Environment of Node.js.
*/
NODE_ENV?: string | undefined;
/**
* Render environment variable.
*/
* Render environment variable.
*/
RENDER?: string | undefined;
/**
* Vercel environment variable.
*/
* Vercel environment variable.
*/
VERCEL?: string | undefined;
};
/**
* Platform name.
*/
* Platform name.
*/
type Platform = "firebase" | "fly-io" | "render" | "vercel";
/**
* Detect the platform.
*
* @param environment
* Environment.
* @returns
* Name of platform if found.
*/
* Detect the platform.
*
* @param environment
* Environment.
* @returns
* Name of platform if found.
*/
declare function platform(environment: Env): Platform | undefined;
/**
* Check if the environment is development.
*
* @param environment
* Environment.
* @returns
* Whether the environment is development.
*/
* Check if the environment is development.
*
* @param environment
* Environment.
* @returns
* Whether the environment is development.
*/
declare function isDevelopment(environment: Env): boolean;
/**
* Get the log level.
*
* @param environment
* Environment.
* @returns
* Log level.
*/
* Get the log level.
*
* @param environment
* Environment.
* @returns
* Log level.
*/
declare function logLevel(environment: Env): "debug" | "info" | "warn" | "error";
/**
* Get the base URL of an Arcjet API.
*
* @param environment
* Environment.
* @returns
* Base URL of Arcjet API.
*/
* Get the base URL of an Arcjet API.
*
* @param environment
* Environment.
* @returns
* Base URL of Arcjet API.
*/
declare function baseUrl(environment: Env): string;
//#endregion
export { Env, Platform, baseUrl, isDevelopment, logLevel, platform };
{
"name": "@arcjet/env",
"version": "1.9.1",
"version": "1.10.0-rc.0",
"description": "Arcjet environment detection",

@@ -45,3 +45,3 @@ "keywords": [

"build": "tsdown",
"typecheck": "tsgo --noEmit",
"typecheck": "tsc --noEmit",
"test-api": "node --test -- test/*.test.ts",

@@ -53,4 +53,4 @@ "test-coverage": "node --experimental-test-coverage --test -- test/*.test.ts",

"devDependencies": {
"tsdown": "0.22.3",
"typescript": "6.0.3"
"tsdown": "0.22.7",
"typescript": "7.0.2"
},

@@ -57,0 +57,0 @@ "engines": {