@@ -5,17 +5,17 @@ import {
5
5
isSdkClient ,
6
6
isString ,
7
7
} from '@aws-lambda-powertools/commons' ;
8
- import { GetOptions } from './GetOptions.js' ;
9
- import { GetMultipleOptions } from './GetMultipleOptions.js' ;
10
- import { ExpirableValue } from './ExpirableValue.js' ;
11
- import { GetParameterError , TransformParameterError } from '../errors.js' ;
12
8
import { EnvironmentVariablesService } from '../config/EnvironmentVariablesService.js' ;
13
- import { transformValue } from './transformValue .js' ;
9
+ import { GetParameterError , TransformParameterError } from '../errors .js' ;
14
10
import type {
15
11
BaseProviderInterface ,
16
12
GetMultipleOptionsInterface ,
17
13
GetOptionsInterface ,
18
14
} from '../types/BaseProvider.js' ;
15
+ import { ExpirableValue } from './ExpirableValue.js' ;
16
+ import { GetMultipleOptions } from './GetMultipleOptions.js' ;
17
+ import { GetOptions } from './GetOptions.js' ;
18
+ import { transformValue } from './transformValue.js' ;
19
19
20
20
/**
21
21
* Base class for all providers.
@@ -97,7 +97,7 @@ abstract class BaseProvider implements BaseProviderInterface {
97
97
name : string ,
98
98
options ?: GetOptionsInterface
99
99
) : Promise < unknown | undefined > {
100
- const configs = new GetOptions ( options , this . envVarsService ) ;
100
+ const configs = new GetOptions ( this . envVarsService , options ) ;
101
101
const key = [ name , configs . transform ] . toString ( ) ;
102
102
103
103
if ( ! configs . forceFetch && ! this . hasKeyExpiredInCache ( key ) ) {
@@ -136,16 +136,15 @@ abstract class BaseProvider implements BaseProviderInterface {
136
136
path : string ,
137
137
options ?: GetMultipleOptionsInterface
138
138
) : Promise < unknown > {
139
- const configs = new GetMultipleOptions ( options , this . envVarsService ) ;
139
+ const configs = new GetMultipleOptions ( this . envVarsService , options ) ;
140
140
const key = [ path , configs . transform ] . toString ( ) ;
141
141
142
142
if ( ! configs . forceFetch && ! this . hasKeyExpiredInCache ( key ) ) {
143
- // If the code enters in this block, then the key must exist & not have been expired
144
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
143
+ // biome-ignore lint/style/noNonNullAssertion: If the code enters in this block, then the key must exist & not have been expired
145
144
return this . store . get ( key ) ! . value as Record < string , unknown > ;
146
145
}
147
146
148
- let values ;
147
+ let values : Record < string , unknown > | undefined ;
149
148
try {
150
149
values = await this . _getMultiple ( path , options ) ;
151
150
if ( ! isRecord ( values ) ) {
@@ -216,7 +215,7 @@ abstract class BaseProvider implements BaseProviderInterface {
216
215
protected abstract _getMultiple (
217
216
path : string ,
218
217
options ?: unknown
219
- ) : Promise < Record < string , unknown > | void > ;
218
+ ) : Promise < Record < string , unknown > | undefined > ;
220
219
}
221
220
222
221
export { BaseProvider } ;
0 commit comments