mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-18 22:35:51 +00:00
28 lines
809 B
TypeScript
28 lines
809 B
TypeScript
import { isInBundledMode } from 'src/utils/bundledMode.js'
|
|
import { getCurrentInstallationType } from 'src/utils/doctorDiagnostic.js'
|
|
import { isEnvTruthy } from 'src/utils/envUtils.js'
|
|
import { useStartupNotification } from './useStartupNotification.js'
|
|
|
|
const NPM_DEPRECATION_MESSAGE =
|
|
''
|
|
|
|
export function useNpmDeprecationNotification(): void {
|
|
useStartupNotification(async () => {
|
|
if (
|
|
isInBundledMode() ||
|
|
isEnvTruthy(process.env.DISABLE_INSTALLATION_CHECKS)
|
|
) {
|
|
return null
|
|
}
|
|
const installationType = await getCurrentInstallationType()
|
|
if (installationType === 'development') return null
|
|
return {
|
|
timeoutMs: 15000,
|
|
key: 'npm-deprecation-warning',
|
|
text: NPM_DEPRECATION_MESSAGE,
|
|
color: 'warning',
|
|
priority: 'high',
|
|
}
|
|
})
|
|
}
|