Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 0 additions & 110 deletions packages/commons/src/config/EnvironmentVariablesService.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/commons/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ if (!process.env.AWS_SDK_UA_APP_ID) {
}

export { addUserAgentMiddleware, isSdkClient } from './awsSdkUtils.js';
export { EnvironmentVariablesService } from './config/EnvironmentVariablesService.js';
export { cleanupMiddlewares } from './middleware/cleanupMiddlewares.js';
export {
IDEMPOTENCY_KEY,
Expand Down
193 changes: 0 additions & 193 deletions packages/commons/tests/unit/EnvironmentVariablesService.test.ts

This file was deleted.

10 changes: 6 additions & 4 deletions packages/idempotency/src/IdempotencyConfig.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getBooleanFromEnv } from '@aws-lambda-powertools/commons/utils/env';
import { PowertoolsFunctions } from '@aws-lambda-powertools/jmespath/functions';
import type { JMESPathParsingOptions } from '@aws-lambda-powertools/jmespath/types';
import type { Context } from 'aws-lambda';
import { EnvironmentVariablesService } from './config/EnvironmentVariablesService.js';
import type {
IdempotencyConfigOptions,
ResponseHook,
Expand Down Expand Up @@ -64,7 +64,6 @@ class IdempotencyConfig {
* Use the local cache to store idempotency keys.
*/
public useLocalCache: boolean;
readonly #envVarsService: EnvironmentVariablesService;
readonly #enabled: boolean = true;

public constructor(config: IdempotencyConfigOptions) {
Expand All @@ -80,8 +79,11 @@ class IdempotencyConfig {
this.hashFunction = config.hashFunction ?? 'md5';
this.lambdaContext = config.lambdaContext;
this.responseHook = config.responseHook;
this.#envVarsService = new EnvironmentVariablesService();
this.#enabled = this.#envVarsService.getIdempotencyEnabled();
this.#enabled = !getBooleanFromEnv({
key: 'POWERTOOLS_IDEMPOTENCY_DISABLED',
defaultValue: false,
extendedParsing: true,
});
}

/**
Expand Down
47 changes: 0 additions & 47 deletions packages/idempotency/src/config/EnvironmentVariablesService.ts

This file was deleted.

Loading
Loading