Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(parameters): AppConfigProvider #1200

Merged
Prev Previous commit
Next Next commit
feat: save the latest retrived configuration
shdq committed Dec 23, 2022
commit 58cecefca5f485dfa6edc15c212e01b86514712f
7 changes: 6 additions & 1 deletion packages/parameters/src/AppConfigProvider.ts
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@ class AppConfigProvider extends BaseProvider {
private application?: string;
private environment?: string;
private token: string | undefined;
private latestConfiguration: string | undefined;

/**
* It initializes the AppConfigProvider class with an optional set of options like region: 'us-west-1'.
@@ -77,7 +78,11 @@ class AppConfigProvider extends BaseProvider {
const utf8decoder = new TextDecoder();
const value = configuration ? utf8decoder.decode(configuration) : undefined;

return value;
if (value) {
this.latestConfiguration = value;
}

return this.latestConfiguration;
}

/**