Skip to content

Commit

Permalink
fix(util-user-agent-node): appId config file name correction (#6729)
Browse files Browse the repository at this point in the history
* chore(util-user-agent-node): appId config file name correction

* chore(util-user-agent-node): add deprecated name

* chore(util-user-agent-node): deprecated annotation

* chore(util-user-agent-node): remove export
  • Loading branch information
siddsriv authored Dec 13, 2024
1 parent a3a39be commit 718151a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/util-user-agent-node/src/nodeAppIdConfigOptions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { LoadedConfigSelectors } from "@smithy/node-config-provider";
import { DEFAULT_UA_APP_ID } from "@aws-sdk/middleware-user-agent";

import { LoadedConfigSelectors } from "@smithy/node-config-provider";

/**
* @internal
Expand All @@ -10,13 +9,18 @@ export const UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID";
/**
* @internal
*/
export const UA_APP_ID_INI_NAME = "sdk-ua-app-id";
export const UA_APP_ID_INI_NAME = "sdk_ua_app_id";

/**
* @deprecated
*/
const UA_APP_ID_INI_NAME_DEPRECATED = "sdk-ua-app-id";

/**
* @internal
*/
export const NODE_APP_ID_CONFIG_OPTIONS: LoadedConfigSelectors<string | undefined> = {
environmentVariableSelector: (env) => env[UA_APP_ID_ENV_NAME],
configFileSelector: (profile) => profile[UA_APP_ID_INI_NAME],
configFileSelector: (profile) => profile[UA_APP_ID_INI_NAME] ?? profile[UA_APP_ID_INI_NAME_DEPRECATED],
default: DEFAULT_UA_APP_ID,
};

0 comments on commit 718151a

Please sign in to comment.