@mintlify/cli 4.0.1115 → 4.0.1116

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.1115",
3
+ "version": "4.0.1116",
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": "5e7dbfd0cff6ee1310d336c34b31cb27114f92a0"
96
+ "gitHead": "4ccbd9cbbd9f35ddec7397b51d78d8c630bf3613"
97
97
  }
@@ -68,7 +68,7 @@ function output(format: OutputFormat, text: string) {
68
68
  }
69
69
 
70
70
  export const analyticsBuilder = (yargs: Argv) =>
71
- withAll(yargs)
71
+ yargs
72
72
  .middleware(subdomainMiddleware)
73
73
  .command(
74
74
  'stats',
@@ -312,7 +312,7 @@ export const analyticsBuilder = (yargs: Argv) =>
312
312
  output(format, lines.join('\n'));
313
313
  }
314
314
  } else {
315
- const source = argv.type === 'code' ? 'code' : undefined;
315
+ const source = argv.type === 'code' ? 'code_snippet' : undefined;
316
316
  const data = await getFeedback(
317
317
  { dateFrom: argv.from, dateTo: argv.to, source },
318
318
  argv.subdomain
@@ -1,9 +1,13 @@
1
+ import type { ArgumentsCamelCase } from 'yargs';
2
+
1
3
  import { getConfigValue } from '../config.js';
2
4
  import { getAccessToken } from '../keyring.js';
3
5
  import { getCliSubdomains } from '../status.js';
4
6
 
5
- export async function subdomainMiddleware(argv: { subdomain?: string }): Promise<void> {
6
- if (argv.subdomain) return;
7
+ type MiddlewareArgs = ArgumentsCamelCase<Record<string, unknown>>;
8
+
9
+ export async function subdomainMiddleware(argv: MiddlewareArgs): Promise<void> {
10
+ if (typeof argv.subdomain === 'string' && argv.subdomain.length > 0) return;
7
11
  const fromConfig = getConfigValue('subdomain');
8
12
  if (fromConfig) {
9
13
  argv.subdomain = fromConfig;