@arcjet/env
Advanced tools
+50
-50
| //#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 }; |
+4
-4
| { | ||
| "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": { |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
21761
0.25%1
Infinity%