Skip to content

Commit 2dbe376

Browse files
committed
refactor(constants): use Socket URL constants from @socketsecurity/lib
Consolidate Socket.dev URL constants by re-exporting them from @socketsecurity/lib instead of duplicating them locally. This leverages the standardized constants now available in v2.9.0.
1 parent f6a4a7e commit 2dbe376

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/constants.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ import { createUserAgentFromPkgJson } from './user-agent'
88

99
import type { ALERT_ACTION, ALERT_TYPE } from './types'
1010

11+
// Re-export Socket.dev URL constants from @socketsecurity/lib
12+
export {
13+
SOCKET_API_TOKENS_URL,
14+
SOCKET_CONTACT_URL,
15+
SOCKET_DASHBOARD_URL,
16+
} from '@socketsecurity/lib/constants/socket'
17+
1118
export const DEFAULT_USER_AGENT = createUserAgentFromPkgJson(rootPkgJson)
1219

1320
// Default timeout for HTTP requests (30 seconds)
@@ -34,12 +41,6 @@ export const MAX_STREAM_SIZE = 100 * 1024 * 1024
3441
// Public blob store URL for patch downloads
3542
export const SOCKET_PUBLIC_BLOB_STORE_URL = 'https://socketusercontent.com'
3643

37-
// Socket.dev site URLs for user guidance
38-
export const SOCKET_CONTACT_URL = 'https://socket.dev/contact'
39-
export const SOCKET_DASHBOARD_URL = 'https://socket.dev/dashboard'
40-
export const SOCKET_API_TOKENS_URL =
41-
'https://socket.dev/dashboard/settings/api-tokens'
42-
4344
// https://github.com/sindresorhus/got/blob/v14.4.6/documentation/2-options.md#agent
4445
// Valid HTTP agent names for Got-style agent configuration compatibility.
4546
export const httpAgentNames = new Set(['http', 'https', 'http2'])

0 commit comments

Comments
 (0)