@starbemtech/star-node-stack-helper
Version:
A helper library for Node.js applications that provides utilities for AWS Secrets Manager integration and Elasticsearch/OpenSearch logging with enterprise-grade features.
88 lines (77 loc) • 1.68 kB
text/typescript
// Functions
export {
loadSecrets,
testSavedSecrets,
isRunningOnAWS,
getAWSRegion,
} from './secrets'
export { ElasticLogger } from './logger'
// Middlewares
export {
transactionLoggerMiddleware,
addTransactionId,
} from './middlewares/transaction-logger'
export { performanceLoggerMiddleware } from './middlewares/performance-logger'
// Logger Pino
export {
createPinoLogger,
createHttpLogger,
logContext as pinoLogContext,
} from './logger-pino'
// Slack Notifications
export {
sendSlackMessage,
sendSlackWebhook,
createSectionBlock,
createDividerBlock,
createButtonElement,
createActionBlock,
createSlackAttachment,
SlackNotifier,
} from './slack'
// NestJS Integration
export {
Log,
LogPerformance,
LogError,
LogCritical,
LogInterceptor,
LogGuard,
LogExceptionFilter,
TransactionLog,
TransactionLogInterceptor,
AutoTransactionLogInterceptor,
} from './nestjs'
// Types
export type {
SecretConfig,
RetryConfig,
LoadSecretsOptions,
} from './secrets/types'
export type { LoggerConfig, LogLevel, LogTransaction } from './logger/types'
export type { PinoLoggerConfig } from './logger-pino/types'
export type {
SlackConfig,
SlackMessage,
SlackResponse,
SlackNotificationOptions,
SlackWebhookConfig,
SlackWebhookMessage,
SlackBlock,
SlackText,
SlackField,
SlackElement,
SlackOption,
SlackAttachment,
SlackAttachmentField,
} from './slack/types'
export type {
NestJSLogContext,
PinoLogger,
LogInterceptorOptions,
LogGuardOptions,
LogExceptionFilterOptions,
TransactionLogMetadata,
TransactionLogInterceptorOptions,
AutoTransactionLogInterceptorOptions,
} from './nestjs'