From 718151ab64c7c40740231463339bc8b09419b625 Mon Sep 17 00:00:00 2001 From: sid <48153483+siddsriv@users.noreply.github.com> Date: Fri, 13 Dec 2024 12:09:08 -0500 Subject: [PATCH] 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 --- .../src/nodeAppIdConfigOptions.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/util-user-agent-node/src/nodeAppIdConfigOptions.ts b/packages/util-user-agent-node/src/nodeAppIdConfigOptions.ts index 95255eafffbaa..bf570d2151a58 100644 --- a/packages/util-user-agent-node/src/nodeAppIdConfigOptions.ts +++ b/packages/util-user-agent-node/src/nodeAppIdConfigOptions.ts @@ -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 @@ -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 = { 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, };