Comparing version 1.4.0 to 1.4.1
{ | ||
"name": "classenv", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "Describe your environment variables contract with TypeScript class decorator", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -26,3 +26,2 @@ # TypeScript environment variable decorator | ||
class ServerSettings { | ||
// Field name will be auto-converted to POSTGRES_URL for checking the process.env | ||
@Env('PORT') | ||
@@ -47,3 +46,3 @@ portNumber!: number; // 3000 | ||
@Env() | ||
postgresUrl!: string; // postgres://127.0.0.1:5432 | ||
postgresUrl!: string; // "postgres://127.0.0.1:5432" | ||
} | ||
@@ -57,3 +56,3 @@ ``` | ||
@Env() | ||
port: number = 3000; | ||
port: number = 3000; // 3000 | ||
} | ||
@@ -86,3 +85,3 @@ ``` | ||
### 🔘 Pick one of the name from array | ||
### 🔘 Pick one of the names from array | ||
@@ -94,3 +93,3 @@ ```ts | ||
@Env(['POSTGRESQL_URI', 'PG_URL', 'POSTGRES_URL']) | ||
url!: string; // postgres://127.0.0.1:5432 | ||
url!: string; // "postgres://127.0.0.1:5432" | ||
} | ||
@@ -106,3 +105,3 @@ ``` | ||
@Env() | ||
static port: number = 3000; | ||
static port: number; // "3000" | ||
} | ||
@@ -109,0 +108,0 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10344
170