Skip to content

Commit 718151a

Browse files
authoredDec 13, 2024··
fix(util-user-agent-node): appId config file name correction (#6729)
* 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
1 parent a3a39be commit 718151a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { LoadedConfigSelectors } from "@smithy/node-config-provider";
21
import { DEFAULT_UA_APP_ID } from "@aws-sdk/middleware-user-agent";
3-
2+
import { LoadedConfigSelectors } from "@smithy/node-config-provider";
43

54
/**
65
* @internal
@@ -10,13 +9,18 @@ export const UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID";
109
/**
1110
* @internal
1211
*/
13-
export const UA_APP_ID_INI_NAME = "sdk-ua-app-id";
12+
export const UA_APP_ID_INI_NAME = "sdk_ua_app_id";
13+
14+
/**
15+
* @deprecated
16+
*/
17+
const UA_APP_ID_INI_NAME_DEPRECATED = "sdk-ua-app-id";
1418

1519
/**
1620
* @internal
1721
*/
1822
export const NODE_APP_ID_CONFIG_OPTIONS: LoadedConfigSelectors<string | undefined> = {
1923
environmentVariableSelector: (env) => env[UA_APP_ID_ENV_NAME],
20-
configFileSelector: (profile) => profile[UA_APP_ID_INI_NAME],
24+
configFileSelector: (profile) => profile[UA_APP_ID_INI_NAME] ?? profile[UA_APP_ID_INI_NAME_DEPRECATED],
2125
default: DEFAULT_UA_APP_ID,
2226
};

0 commit comments

Comments
 (0)
Please sign in to comment.