axios+telemetry cleanup
This commit is contained in:
@@ -8,13 +8,13 @@
|
||||
* Cache location: ~/.claude/plugins/install-counts-cache.json
|
||||
*/
|
||||
|
||||
import axios from 'axios'
|
||||
import { randomBytes } from 'crypto'
|
||||
import { readFile, rename, unlink, writeFile } from 'fs/promises'
|
||||
import { join } from 'path'
|
||||
import { logForDebugging } from '../debug.js'
|
||||
import { errorMessage, getErrnoCode } from '../errors.js'
|
||||
import { getFsImplementation } from '../fsOperations.js'
|
||||
import { nativeRequest } from '../http.js'
|
||||
import { logError } from '../log.js'
|
||||
import { jsonParse, jsonStringify } from '../slowOperations.js'
|
||||
import { classifyFetchError, logPluginFetch } from './fetchTelemetry.js'
|
||||
@@ -188,7 +188,8 @@ async function fetchInstallCountsFromGitHub(): Promise<
|
||||
|
||||
const started = performance.now()
|
||||
try {
|
||||
const response = await axios.get<GitHubStatsResponse>(INSTALL_COUNTS_URL, {
|
||||
const response = await nativeRequest<GitHubStatsResponse>(INSTALL_COUNTS_URL, {
|
||||
method: 'GET',
|
||||
timeout: 10000,
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user