@mintlify/cli 4.0.1086 → 4.0.1087

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mintlify/cli",
3
- "version": "4.0.1086",
3
+ "version": "4.0.1087",
4
4
  "description": "The Mintlify CLI",
5
5
  "engines": {
6
6
  "node": ">=18.0.0"
@@ -93,5 +93,5 @@
93
93
  "vitest": "2.1.9",
94
94
  "vitest-mock-process": "1.0.4"
95
95
  },
96
- "gitHead": "cda0cfd7e97b5961ec6dd405b5f8dc6d9be2faef"
96
+ "gitHead": "2098cd9c9868b0e8e7118290c5c768ecf90d54ff"
97
97
  }
@@ -1,3 +1,4 @@
1
+ import { API_URL } from '../constants.js';
1
2
  import type {
2
3
  BucketThreadsResponse,
3
4
  BucketsResponse,
@@ -10,8 +11,6 @@ import type {
10
11
  VisitorsResponse,
11
12
  } from './types.js';
12
13
 
13
- const API_BASE = process.env.MINTLIFY_API_URL ?? 'http://localhost:5000';
14
-
15
14
  type Params = Record<string, string | number | undefined>;
16
15
 
17
16
  async function getAuthHeaders(): Promise<Record<string, string>> {
@@ -32,7 +31,7 @@ async function getAuthHeaders(): Promise<Record<string, string>> {
32
31
  }
33
32
 
34
33
  async function request<T>(path: string, params: Params = {}): Promise<T> {
35
- const url = new URL(`${API_BASE}/api/cli/analytics${path}`);
34
+ const url = new URL(`${API_URL}/api/cli/analytics${path}`);
36
35
  for (const [key, value] of Object.entries(params)) {
37
36
  if (value !== undefined) url.searchParams.set(key, String(value));
38
37
  }