@mintlify/scraping 4.0.113 → 4.0.115

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/scraping",
3
- "version": "4.0.113",
3
+ "version": "4.0.115",
4
4
  "description": "Scrape documentation frameworks to Mintlify docs",
5
5
  "engines": {
6
6
  "node": ">=18.0.0"
@@ -38,7 +38,7 @@
38
38
  "format:check": "prettier . --check"
39
39
  },
40
40
  "dependencies": {
41
- "@mintlify/common": "1.0.268",
41
+ "@mintlify/common": "1.0.269",
42
42
  "@mintlify/openapi-parser": "^0.0.7",
43
43
  "fs-extra": "^11.1.1",
44
44
  "hast-util-to-mdast": "^10.1.0",
@@ -61,7 +61,7 @@
61
61
  "@mintlify/models": "0.0.169",
62
62
  "@mintlify/prettier-config": "1.0.4",
63
63
  "@mintlify/ts-config": "2.0.2",
64
- "@mintlify/validation": "0.1.291",
64
+ "@mintlify/validation": "0.1.292",
65
65
  "@trivago/prettier-plugin-sort-imports": "^4.2.1",
66
66
  "@tsconfig/recommended": "1.x",
67
67
  "@types/hast": "^3.0.4",
@@ -78,5 +78,5 @@
78
78
  "typescript": "^5.5.3",
79
79
  "vitest": "^2.0.4"
80
80
  },
81
- "gitHead": "4af85d6c64a1477bc5dd29ba604771b64d4c0f5d"
81
+ "gitHead": "e1b8033198735204d29862b5feb1ee17486f8fea"
82
82
  }
package/src/cli.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  #!/usr/bin/env node
2
+ import { MintConfigType } from '@mintlify/models';
3
+ import { upgradeToDocsConfig } from '@mintlify/validation';
2
4
  import yargs from 'yargs';
3
5
  import { hideBin } from 'yargs/helpers';
4
6
 
@@ -123,7 +125,11 @@ async function site(url: string) {
123
125
 
124
126
  const result = await scrapeAllSiteTabs(html, urlObj);
125
127
  if (result.success) {
126
- write('mint.json', JSON.stringify(result.data, undefined, 2));
128
+ const mintConfig = result.data as MintConfigType;
129
+ const docsConfig = upgradeToDocsConfig(mintConfig, {
130
+ shouldUpgradeTheme: true,
131
+ });
132
+ write('docs.json', JSON.stringify(docsConfig, undefined, 2));
127
133
  log(FINAL_SUCCESS_MESSAGE);
128
134
  } else {
129
135
  log(result.message);
package/src/constants.ts CHANGED
@@ -51,4 +51,4 @@ export const MDAST_FAILURE_MSG = 'failed to convert MDAST to Markdown string';
51
51
 
52
52
  export const FINAL_SUCCESS_MESSAGE = `We've successfully scraped your docs site.
53
53
  ${SPACES}We've downloaded the ${activeColors.cyan}\`navigation\`${activeColors.default} array (and if necessary, the ${activeColors.cyan}\`tabs\`${activeColors.default} array)
54
- ${SPACES}into ${activeColors.blue}\`mint.json\`${activeColors.default}.`;
54
+ ${SPACES}into ${activeColors.blue}\`docs.json\`${activeColors.default}.`;