@aws-lambda-powertools/parameters
Advanced tools
Comparing version 2.0.0-alpha.1 to 2.0.0-alpha.2
@@ -6,3 +6,13 @@ import { ConfigServiceInterface } from '../types/ConfigServiceInterface.js'; | ||
private ssmDecryptVariable; | ||
/** | ||
* It returns the value of the POWERTOOLS_PARAMETERS_MAX_AGE environment variable. | ||
* | ||
* @returns {number|undefined} | ||
*/ | ||
getParametersMaxAge(): number | undefined; | ||
/** | ||
* It returns the value of the POWERTOOLS_PARAMETERS_SSM_DECRYPT environment variable. | ||
* | ||
* @returns {string} | ||
*/ | ||
getSSMDecrypt(): string; | ||
@@ -9,0 +19,0 @@ } |
@@ -10,2 +10,7 @@ "use strict"; | ||
ssmDecryptVariable = 'POWERTOOLS_PARAMETERS_SSM_DECRYPT'; | ||
/** | ||
* It returns the value of the POWERTOOLS_PARAMETERS_MAX_AGE environment variable. | ||
* | ||
* @returns {number|undefined} | ||
*/ | ||
getParametersMaxAge() { | ||
@@ -23,2 +28,7 @@ const maxAge = this.get(this.parametersMaxAgeVariable); | ||
} | ||
/** | ||
* It returns the value of the POWERTOOLS_PARAMETERS_SSM_DECRYPT environment variable. | ||
* | ||
* @returns {string} | ||
*/ | ||
getSSMDecrypt() { | ||
@@ -25,0 +35,0 @@ return this.get(this.ssmDecryptVariable); |
@@ -1,5 +0,21 @@ | ||
interface ConfigServiceInterface { | ||
get?(name: string): string; | ||
getServiceName(): string; | ||
import type { ConfigServiceInterface as ConfigServiceBaseInterface } from '@aws-lambda-powertools/commons/types'; | ||
/** | ||
* Interface ConfigServiceInterface | ||
* | ||
* @interface | ||
* @see https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-runtime | ||
* @see https://docs.powertools.aws.dev/lambda-typescript/latest/#environment-variables | ||
*/ | ||
interface ConfigServiceInterface extends ConfigServiceBaseInterface { | ||
/** | ||
* It returns the value of the POWERTOOLS_PARAMETERS_MAX_AGE environment variable. | ||
* | ||
* @returns {number|undefined} | ||
*/ | ||
getParametersMaxAge(): number | undefined; | ||
/** | ||
* It returns the value of the POWERTOOLS_PARAMETERS_SSM_DECRYPT environment variable. | ||
* | ||
* @returns {string} | ||
*/ | ||
getSSMDecrypt(): string; | ||
@@ -6,0 +22,0 @@ } |
@@ -6,3 +6,13 @@ import { ConfigServiceInterface } from '../types/ConfigServiceInterface.js'; | ||
private ssmDecryptVariable; | ||
/** | ||
* It returns the value of the POWERTOOLS_PARAMETERS_MAX_AGE environment variable. | ||
* | ||
* @returns {number|undefined} | ||
*/ | ||
getParametersMaxAge(): number | undefined; | ||
/** | ||
* It returns the value of the POWERTOOLS_PARAMETERS_SSM_DECRYPT environment variable. | ||
* | ||
* @returns {string} | ||
*/ | ||
getSSMDecrypt(): string; | ||
@@ -9,0 +19,0 @@ } |
@@ -7,2 +7,7 @@ import { DEFAULT_MAX_AGE_SECS } from '../constants.js'; | ||
ssmDecryptVariable = 'POWERTOOLS_PARAMETERS_SSM_DECRYPT'; | ||
/** | ||
* It returns the value of the POWERTOOLS_PARAMETERS_MAX_AGE environment variable. | ||
* | ||
* @returns {number|undefined} | ||
*/ | ||
getParametersMaxAge() { | ||
@@ -20,2 +25,7 @@ const maxAge = this.get(this.parametersMaxAgeVariable); | ||
} | ||
/** | ||
* It returns the value of the POWERTOOLS_PARAMETERS_SSM_DECRYPT environment variable. | ||
* | ||
* @returns {string} | ||
*/ | ||
getSSMDecrypt() { | ||
@@ -22,0 +32,0 @@ return this.get(this.ssmDecryptVariable); |
@@ -1,5 +0,21 @@ | ||
interface ConfigServiceInterface { | ||
get?(name: string): string; | ||
getServiceName(): string; | ||
import type { ConfigServiceInterface as ConfigServiceBaseInterface } from '@aws-lambda-powertools/commons/types'; | ||
/** | ||
* Interface ConfigServiceInterface | ||
* | ||
* @interface | ||
* @see https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-runtime | ||
* @see https://docs.powertools.aws.dev/lambda-typescript/latest/#environment-variables | ||
*/ | ||
interface ConfigServiceInterface extends ConfigServiceBaseInterface { | ||
/** | ||
* It returns the value of the POWERTOOLS_PARAMETERS_MAX_AGE environment variable. | ||
* | ||
* @returns {number|undefined} | ||
*/ | ||
getParametersMaxAge(): number | undefined; | ||
/** | ||
* It returns the value of the POWERTOOLS_PARAMETERS_SSM_DECRYPT environment variable. | ||
* | ||
* @returns {string} | ||
*/ | ||
getSSMDecrypt(): string; | ||
@@ -6,0 +22,0 @@ } |
{ | ||
"name": "@aws-lambda-powertools/parameters", | ||
"version": "2.0.0-alpha.1", | ||
"version": "2.0.0-alpha.2", | ||
"description": "The parameters package for the Powertools for AWS Lambda (TypeScript) library", | ||
@@ -28,3 +28,3 @@ "author": { | ||
"dependencies": { | ||
"@aws-lambda-powertools/commons": "^2.0.0-alpha.1", | ||
"@aws-lambda-powertools/commons": "^2.0.0-alpha.2", | ||
"@aws-sdk/util-base64-node": "^3.209.0" | ||
@@ -31,0 +31,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
541941
10751