Skip to content

Commit 32bd7e8

Browse files
authored
fix(parameters): types in BaseProvider + added getMultiple alias to SecretsProvider (#1214)
1 parent a3daba9 commit 32bd7e8

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

Diff for: packages/parameters/src/BaseProvider.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { ExpirableValue } from './ExpirableValue';
55
import { TRANSFORM_METHOD_BINARY, TRANSFORM_METHOD_JSON } from './constants';
66
import { GetParameterError, TransformParameterError } from './Exceptions';
77
import type { BaseProviderInterface, GetMultipleOptionsInterface, GetOptionsInterface, TransformOptions } from './types';
8-
import type { SecretsGetOptionsInterface } from './types/SecretsProvider';
98

109
// These providers are dinamycally intialized on first use of the helper functions
1110
const DEFAULT_PROVIDERS: Record<string, BaseProvider> = {};
@@ -39,9 +38,8 @@ abstract class BaseProvider implements BaseProviderInterface {
3938
* this should be an acceptable tradeoff.
4039
*
4140
* @param {string} name - Parameter name
42-
* @param {GetOptionsInterface|SecretsGetOptionsInterface} options - Options to configure maximum age, trasformation, AWS SDK options, or force fetch
41+
* @param {GetOptionsInterface} options - Options to configure maximum age, trasformation, AWS SDK options, or force fetch
4342
*/
44-
public async get(name: string, options?: SecretsGetOptionsInterface): Promise<undefined | string | Uint8Array | Record<string, unknown>>;
4543
public async get(name: string, options?: GetOptionsInterface): Promise<undefined | string | Uint8Array | Record<string, unknown>> {
4644
const configs = new GetOptions(options);
4745
const key = [ name, configs.transform ].toString();

Diff for: packages/parameters/src/secrets/SecretsProvider.ts

+10
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ class SecretsProvider extends BaseProvider {
2626
return super.get(name, options);
2727
}
2828

29+
/**
30+
* Retrieving multiple parameter values is not supported with AWS Secrets Manager.
31+
*/
32+
public async getMultiple(
33+
path: string,
34+
_options?: unknown
35+
): Promise<undefined | Record<string, unknown>> {
36+
return super.getMultiple(path);
37+
}
38+
2939
protected async _get(
3040
name: string,
3141
options?: SecretsGetOptionsInterface

0 commit comments

Comments
 (0)