@mintlify/cli 4.0.649 → 4.0.651

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.649",
3
+ "version": "4.0.651",
4
4
  "description": "The Mintlify CLI",
5
5
  "engines": {
6
6
  "node": ">=18.0.0"
@@ -39,12 +39,12 @@
39
39
  "format:check": "prettier . --check"
40
40
  },
41
41
  "dependencies": {
42
- "@mintlify/common": "1.0.469",
43
- "@mintlify/link-rot": "3.0.597",
44
- "@mintlify/models": "0.0.214",
45
- "@mintlify/prebuild": "1.0.587",
46
- "@mintlify/previewing": "4.0.633",
47
- "@mintlify/validation": "0.1.429",
42
+ "@mintlify/common": "1.0.470",
43
+ "@mintlify/link-rot": "3.0.599",
44
+ "@mintlify/models": "0.0.215",
45
+ "@mintlify/prebuild": "1.0.588",
46
+ "@mintlify/previewing": "4.0.635",
47
+ "@mintlify/validation": "0.1.430",
48
48
  "chalk": "^5.2.0",
49
49
  "detect-port": "^1.5.1",
50
50
  "fs-extra": "^11.2.0",
@@ -73,5 +73,5 @@
73
73
  "vitest": "^2.0.4",
74
74
  "vitest-mock-process": "^1.0.4"
75
75
  },
76
- "gitHead": "727b7f1eed7cd6195c77b72626e3f0a92d251f3c"
76
+ "gitHead": "d98bb2a20b371435b211a567d6fe7127d1c56eb6"
77
77
  }
package/src/helpers.tsx CHANGED
@@ -110,6 +110,9 @@ export const getCliVersion = (): string | undefined => {
110
110
  version = s;
111
111
  return false;
112
112
  });
113
+ if (process.env.CLI_TEST_MODE === 'true') {
114
+ return 'test-cli';
115
+ }
113
116
  // when running `npm link` the version is 'unknown'
114
117
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
115
118
  if (version === 'unknown') {
package/src/index.ts CHANGED
@@ -7,9 +7,9 @@ const __filename = fileURLToPath(import.meta.url);
7
7
  const __dirname = path.dirname(__filename);
8
8
 
9
9
  const packageName =
10
- process.argv[1]?.split('/').pop() === 'index.js'
10
+ path.basename(process.argv[1] ?? '') === 'index.js'
11
11
  ? 'mint'
12
- : process.argv[1]?.split('/').pop() ?? 'mint';
12
+ : path.basename(process.argv[1] ?? '') || 'mint';
13
13
 
14
14
  let cli: ChildProcess | null = null;
15
15
  let isShuttingDown = false;
@@ -75,6 +75,7 @@ try {
75
75
  env: {
76
76
  ...process.env,
77
77
  MINTLIFY_PACKAGE_NAME: packageName,
78
+ CLI_TEST_MODE: process.env.CLI_TEST_MODE ?? 'false',
78
79
  },
79
80
  shell: process.platform === 'win32',
80
81
  windowsHide: process.platform === 'win32',