@aws-lambda-powertools/commons
Advanced tools
Comparing version 1.14.2 to 1.15.0
@@ -36,2 +36,8 @@ /** | ||
/** | ||
* It returns true if the `POWERTOOLS_DEV` environment variable is set to truthy value. | ||
* | ||
* @returns {boolean} | ||
*/ | ||
abstract isDevMode(): boolean; | ||
/** | ||
* It returns true if the string value represents a boolean true value. | ||
@@ -38,0 +44,0 @@ * |
@@ -15,3 +15,3 @@ import { ConfigService } from './ConfigService'; | ||
*/ | ||
declare class EnvironmentVariablesService extends ConfigService { | ||
declare class EnvironmentVariablesService implements ConfigService { | ||
/** | ||
@@ -21,2 +21,3 @@ * @see https://docs.powertools.aws.dev/lambda/typescript/latest/#environment-variables | ||
*/ | ||
protected devModeVariable: string; | ||
protected serviceNameVariable: string; | ||
@@ -58,2 +59,8 @@ private xRayTraceIdVariable; | ||
/** | ||
* It returns true if the `POWERTOOLS_DEV` environment variable is set to truthy value. | ||
* | ||
* @returns {boolean} | ||
*/ | ||
isDevMode(): boolean; | ||
/** | ||
* It returns true if the string value represents a boolean true value. | ||
@@ -60,0 +67,0 @@ * |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EnvironmentVariablesService = void 0; | ||
const ConfigService_1 = require("./ConfigService"); | ||
/** | ||
@@ -18,5 +17,4 @@ * Class EnvironmentVariablesService | ||
*/ | ||
class EnvironmentVariablesService extends ConfigService_1.ConfigService { | ||
class EnvironmentVariablesService { | ||
constructor() { | ||
super(...arguments); | ||
/** | ||
@@ -26,2 +24,3 @@ * @see https://docs.powertools.aws.dev/lambda/typescript/latest/#environment-variables | ||
*/ | ||
this.devModeVariable = 'POWERTOOLS_DEV'; | ||
this.serviceNameVariable = 'POWERTOOLS_SERVICE_NAME'; | ||
@@ -75,2 +74,10 @@ // Reserved environment variables | ||
/** | ||
* It returns true if the `POWERTOOLS_DEV` environment variable is set to truthy value. | ||
* | ||
* @returns {boolean} | ||
*/ | ||
isDevMode() { | ||
return this.isValueTrue(this.get(this.devModeVariable)); | ||
} | ||
/** | ||
* It returns true if the string value represents a boolean true value. | ||
@@ -77,0 +84,0 @@ * |
@@ -1,2 +0,2 @@ | ||
export declare const PT_VERSION = "1.13.1"; | ||
export declare const PT_VERSION = "1.15.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -5,2 +5,2 @@ "use strict"; | ||
// this file is auto generated, do not modify | ||
exports.PT_VERSION = '1.13.1'; | ||
exports.PT_VERSION = '1.15.0'; |
{ | ||
"name": "@aws-lambda-powertools/commons", | ||
"version": "1.14.2", | ||
"version": "1.15.0", | ||
"description": "A shared utility package for Powertools for AWS Lambda (TypeScript) libraries", | ||
@@ -5,0 +5,0 @@ "author": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
58660
1057
1