File tree Expand file tree Collapse file tree 3 files changed +0
-261
lines changed
Expand file tree Collapse file tree 3 files changed +0
-261
lines changed Original file line number Diff line number Diff line change @@ -10,12 +10,6 @@ This package contains code shared between the `web` (Next.js frontend/backend) a
1010- ** Constants (` src/constants ` )** : Shared constant values
1111- ** API Keys (` src/api-keys ` )** : Encryption/decryption utilities for sensitive data
1212
13- ## API Key Encryption (` src/api-keys/crypto.ts ` )
14-
15- - Provides functions for encrypting/decrypting API keys (` encryptAndStoreApiKey ` , ` retrieveAndDecryptApiKey ` , ` clearApiKey ` )
16- - ** Security** : Functions require the 32-byte ` API_KEY_ENCRYPTION_SECRET ` from environment variables
17- - The secret must ** never** be stored in the ` common ` package - calling environments retrieve it from their respective ` env ` files
18-
1913## Database Migrations
2014
2115- Schema defined in ` common/src/db/schema.ts `
Original file line number Diff line number Diff line change 11import { env } from '@codebuff/internal'
22import { PostHog } from 'posthog-node'
33
4- import { logger } from './util/logger'
5-
64import type { AnalyticsEvent } from './constants/analytics-events'
75import type { Logger } from '@codebuff/types/logger'
86
@@ -70,23 +68,3 @@ export function trackEvent({
7068 logger . error ( { error } , 'Failed to track event' )
7169 }
7270}
73-
74- export function logError (
75- error : Error ,
76- userId ?: string ,
77- properties ?: Record < string , any > ,
78- ) {
79- if ( ! client ) {
80- logger . warn (
81- { error : error . message , userId } ,
82- 'Analytics client not initialized, skipping error logging' ,
83- )
84- return
85- }
86-
87- try {
88- client . captureException ( error , userId ?? 'unknown' , properties )
89- } catch ( error ) {
90- logger . error ( { error } , 'Failed to log error' )
91- }
92- }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments