From b8677230a3443dce3267d3368e36745f008410d7 Mon Sep 17 00:00:00 2001 From: melikhov Date: Thu, 10 Oct 2024 15:22:30 +0300 Subject: [PATCH 1/2] feat: add re-export public consts --- src/index.ts | 2 +- src/lib/consts.ts | 7 ++----- src/lib/public-consts.ts | 4 ++++ 3 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 src/lib/public-consts.ts diff --git a/src/index.ts b/src/index.ts index db913be..cbd7742 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,4 +2,4 @@ export {NodeKit} from './nodekit'; export {AppContext} from './lib/context'; export {AppConfig, AppContextParams, AppDynamicConfig} from './types'; export {AppError} from './lib/app-error'; -export {REQUEST_ID_HEADER, REQUEST_ID_PARAM_NAME} from './lib/consts'; +export * from './lib/public-consts'; diff --git a/src/lib/consts.ts b/src/lib/consts.ts index eb0919c..afa7092 100644 --- a/src/lib/consts.ts +++ b/src/lib/consts.ts @@ -1,6 +1,3 @@ -export const REQUEST_ID_HEADER = 'x-request-id'; -export const REQUEST_ID_PARAM_NAME = 'requestId'; -export const USER_ID_PARAM_NAME = 'userId'; -export const USER_LANGUAGE_PARAM_NAME = 'userLang'; +export * from './public-consts'; export const TRACE_KEY = 'uber-trace-id'; -export const REDACTED_STRING = '[REDACTED]'; +export const REDACTED_STRING = '[REDACTED]'; \ No newline at end of file diff --git a/src/lib/public-consts.ts b/src/lib/public-consts.ts new file mode 100644 index 0000000..8fb3498 --- /dev/null +++ b/src/lib/public-consts.ts @@ -0,0 +1,4 @@ +export const REQUEST_ID_HEADER = 'x-request-id'; +export const REQUEST_ID_PARAM_NAME = 'requestId'; +export const USER_ID_PARAM_NAME = 'userId'; +export const USER_LANGUAGE_PARAM_NAME = 'userLang'; From 47cd77e5f7fc593290b71d13cad71f9025daf710 Mon Sep 17 00:00:00 2001 From: melikhov Date: Thu, 10 Oct 2024 15:25:01 +0300 Subject: [PATCH 2/2] fix: typo --- src/lib/consts.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/consts.ts b/src/lib/consts.ts index afa7092..8168bd1 100644 --- a/src/lib/consts.ts +++ b/src/lib/consts.ts @@ -1,3 +1,3 @@ export * from './public-consts'; export const TRACE_KEY = 'uber-trace-id'; -export const REDACTED_STRING = '[REDACTED]'; \ No newline at end of file +export const REDACTED_STRING = '[REDACTED]';