@mintlify/prebuild 1.0.317 → 1.0.319

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@mintlify/prebuild",
3
3
  "type": "module",
4
- "version": "1.0.317",
4
+ "version": "1.0.319",
5
5
  "description": "Helpful functions for Mintlify's prebuild step",
6
6
  "author": "Mintlify, Inc.",
7
7
  "repository": {
@@ -41,10 +41,10 @@
41
41
  "format:check": "prettier . --check"
42
42
  },
43
43
  "dependencies": {
44
- "@mintlify/common": "1.0.225",
44
+ "@mintlify/common": "1.0.226",
45
45
  "@mintlify/openapi-parser": "^0.0.7",
46
- "@mintlify/scraping": "4.0.70",
47
- "@mintlify/validation": "0.1.251",
46
+ "@mintlify/scraping": "4.0.71",
47
+ "@mintlify/validation": "0.1.252",
48
48
  "axios": "^1.6.2",
49
49
  "chalk": "^5.3.0",
50
50
  "favicons": "^7.0.2",
@@ -70,5 +70,5 @@
70
70
  "typescript": "^5.5.3",
71
71
  "vitest": "^2.0.4"
72
72
  },
73
- "gitHead": "c7f9ee676d859e5b3077b78d25f23303064ccf42"
73
+ "gitHead": "e90c74dcab6d586dd7ab06861c02ffa48a6c5562"
74
74
  }
@@ -1,241 +0,0 @@
1
- export declare const validateMintJson: (mintConfigContents: string) => Promise<{
2
- warnings: import("zod").ZodIssue[];
3
- success: true;
4
- data: {
5
- name: string;
6
- $schema: string;
7
- favicon: string;
8
- colors: {
9
- primary: string;
10
- light?: string | undefined;
11
- dark?: string | undefined;
12
- background?: {
13
- light?: string | undefined;
14
- dark?: string | undefined;
15
- } | undefined;
16
- anchors?: string | {
17
- from: string;
18
- to: string;
19
- via?: string | undefined;
20
- } | undefined;
21
- ultraLight?: any;
22
- ultraDark?: any;
23
- };
24
- navigation: import("@mintlify/models").NavigationGroup[];
25
- mintlify?: string | undefined;
26
- logo?: string | {
27
- light: string;
28
- dark: string;
29
- href?: string | undefined;
30
- } | undefined;
31
- theme?: "venus" | "quill" | "prism" | undefined;
32
- layout?: "topnav" | "sidenav" | "solidSidenav" | undefined;
33
- openapi?: string | string[] | undefined;
34
- topbar?: {
35
- style?: "gradient" | "default" | undefined;
36
- } | undefined;
37
- sidebar?: {
38
- items?: "container" | "card" | "border" | "undecorated" | undefined;
39
- } | undefined;
40
- rounded?: "default" | "sharp" | undefined;
41
- api?: {
42
- baseUrl?: string | string[] | undefined;
43
- auth?: {
44
- method?: "key" | "bearer" | "basic" | "cobo" | undefined;
45
- name?: string | undefined;
46
- inputPrefix?: string | undefined;
47
- } | undefined;
48
- playground?: {
49
- mode: "show" | "simple" | "hide";
50
- disableProxy?: boolean | undefined;
51
- } | undefined;
52
- request?: {
53
- example?: {
54
- showOptionalParams?: boolean | undefined;
55
- languages?: string[] | undefined;
56
- } | undefined;
57
- } | undefined;
58
- maintainOrder?: boolean | undefined;
59
- paramFields?: {
60
- expanded?: "all" | "topLevel" | "topLevelOneOfs" | "none" | undefined;
61
- } | undefined;
62
- } | undefined;
63
- modeToggle?: {
64
- default?: "light" | "dark" | undefined;
65
- isHidden?: boolean | undefined;
66
- } | undefined;
67
- versions?: (string | {
68
- name: string;
69
- url?: string | undefined;
70
- default?: true | undefined;
71
- locale?: "en" | "cn" | "es" | "fr" | "jp" | "pt" | "pt-BR" | "de" | undefined;
72
- })[] | undefined;
73
- metadata?: Record<string, string> | undefined;
74
- codeBlock?: {
75
- mode?: "dark" | "auto" | undefined;
76
- } | undefined;
77
- eyebrow?: {
78
- display?: "section" | "breadcrumbs" | undefined;
79
- } | undefined;
80
- topbarCtaButton?: {
81
- name: string;
82
- url: string;
83
- type?: "link" | undefined;
84
- style?: "pill" | "roundedRectangle" | undefined;
85
- arrow?: boolean | undefined;
86
- } | {
87
- type: "github";
88
- url: string;
89
- } | undefined;
90
- topbarLinks?: ({
91
- name: string;
92
- url: string;
93
- type?: "link" | undefined;
94
- style?: "pill" | "roundedRectangle" | undefined;
95
- arrow?: boolean | undefined;
96
- } | {
97
- type: "github";
98
- url: string;
99
- })[] | undefined;
100
- primaryTab?: {
101
- name: string;
102
- isDefaultHidden?: boolean | undefined;
103
- } | undefined;
104
- topAnchor?: {
105
- name: string;
106
- icon?: string | undefined;
107
- iconType?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
108
- } | undefined;
109
- anchors?: {
110
- name: string;
111
- url: string;
112
- icon?: string | undefined;
113
- iconType?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
114
- color?: string | {
115
- from: string;
116
- to: string;
117
- via?: string | undefined;
118
- } | undefined;
119
- isDefaultHidden?: boolean | undefined;
120
- version?: string | undefined;
121
- openapi?: string | undefined;
122
- }[] | undefined;
123
- tabs?: {
124
- name: string;
125
- url: string;
126
- version?: string | undefined;
127
- isDefaultHidden?: boolean | undefined;
128
- openapi?: string | undefined;
129
- }[] | undefined;
130
- footer?: {
131
- socials?: Partial<Record<"github" | "x" | "website" | "facebook" | "youtube" | "discord" | "slack" | "linkedin" | "instagram" | "hacker-news" | "medium" | "telegram" | "twitter", string>> | {
132
- type: "github" | "x" | "website" | "facebook" | "youtube" | "discord" | "slack" | "linkedin" | "instagram" | "hacker-news" | "medium" | "telegram" | "twitter";
133
- url: string;
134
- }[] | undefined;
135
- links?: {
136
- links: {
137
- url: string;
138
- label: string;
139
- }[];
140
- title?: string | undefined;
141
- }[] | undefined;
142
- } | undefined;
143
- background?: {
144
- style?: "gradient" | "grid" | "windows" | undefined;
145
- } | undefined;
146
- backgroundImage?: string | undefined;
147
- font?: {
148
- family: string;
149
- weight?: number | undefined;
150
- url?: string | undefined;
151
- format?: "woff" | "woff2" | undefined;
152
- } | {
153
- headings?: {
154
- family: string;
155
- weight?: number | undefined;
156
- url?: string | undefined;
157
- format?: "woff" | "woff2" | undefined;
158
- } | undefined;
159
- body?: {
160
- family: string;
161
- weight?: number | undefined;
162
- url?: string | undefined;
163
- format?: "woff" | "woff2" | undefined;
164
- } | undefined;
165
- } | undefined;
166
- feedback?: {
167
- thumbsRating?: boolean | undefined;
168
- suggestEdit?: boolean | undefined;
169
- raiseIssue?: boolean | undefined;
170
- } | undefined;
171
- analytics?: {
172
- amplitude?: {
173
- apiKey: string;
174
- } | undefined;
175
- clearbit?: {
176
- publicApiKey: string;
177
- } | undefined;
178
- fathom?: {
179
- siteId: string;
180
- } | undefined;
181
- ga4?: {
182
- measurementId: string;
183
- } | undefined;
184
- gtm?: {
185
- tagId: string;
186
- } | undefined;
187
- heap?: {
188
- appId: string;
189
- } | undefined;
190
- hotjar?: {
191
- hjid: string;
192
- hjsv: string;
193
- } | undefined;
194
- koala?: {
195
- publicApiKey: string;
196
- } | undefined;
197
- logrocket?: {
198
- appId: string;
199
- } | undefined;
200
- mixpanel?: {
201
- projectToken: string;
202
- } | undefined;
203
- pirsch?: {
204
- id: string;
205
- } | undefined;
206
- posthog?: {
207
- apiKey: string;
208
- apiHost?: string | undefined;
209
- } | undefined;
210
- plausible?: {
211
- domain: string;
212
- server?: string | undefined;
213
- } | undefined;
214
- segment?: {
215
- key: string;
216
- } | undefined;
217
- } | undefined;
218
- integrations?: {
219
- intercom?: string | undefined;
220
- frontchat?: string | undefined;
221
- osano?: string | undefined;
222
- } | undefined;
223
- isWhiteLabeled?: boolean | undefined;
224
- search?: {
225
- prompt?: string | undefined;
226
- location?: "side" | "top" | undefined;
227
- } | undefined;
228
- redirects?: {
229
- source: string;
230
- destination: string;
231
- permanent?: boolean | undefined;
232
- }[] | undefined;
233
- seo?: {
234
- indexHiddenPages?: boolean | undefined;
235
- } | undefined;
236
- footerSocials?: Partial<Record<"github" | "x" | "website" | "facebook" | "youtube" | "discord" | "slack" | "linkedin" | "instagram" | "hacker-news" | "medium" | "telegram" | "twitter", string>> | {
237
- type: "github" | "x" | "website" | "facebook" | "youtube" | "discord" | "slack" | "linkedin" | "instagram" | "hacker-news" | "medium" | "telegram" | "twitter";
238
- url: string;
239
- }[] | undefined;
240
- };
241
- }>;
@@ -1,32 +0,0 @@
1
- import { formatIssue, validateMintConfig } from '@mintlify/validation';
2
- import Chalk from 'chalk';
3
- export const validateMintJson = async (mintConfigContents) => {
4
- let configObj;
5
- try {
6
- configObj = JSON.parse(mintConfigContents);
7
- }
8
- catch (e) {
9
- if (typeof e === 'object' && e != null) {
10
- if ('name' in e && e.name === 'SyntaxError') {
11
- console.error(`🚨 ${Chalk.red('mint.json has invalid JSON. You are likely missing a comma or a bracket. You can paste your mint.json file into https://jsonlint.com/ to get a more specific error message.')}`);
12
- }
13
- else if ('message' in e) {
14
- console.error(`🚨 ${Chalk.red(e.message)}`);
15
- }
16
- }
17
- throw Error();
18
- }
19
- const validationResults = validateMintConfig(configObj);
20
- if (!validationResults.success) {
21
- console.error(Chalk.red('🚨 Invalid mint.json:'));
22
- validationResults.error.issues.forEach((issue) => console.error(Chalk.red(formatIssue(issue))));
23
- throw Error();
24
- }
25
- if (validationResults.warnings.length > 0) {
26
- if (validationResults.warnings.length > 0) {
27
- console.warn(Chalk.yellow('⚠️ Warnings found in mint.json:'));
28
- validationResults.warnings.forEach((issue) => console.warn(Chalk.yellow(formatIssue(issue))));
29
- }
30
- }
31
- return validationResults;
32
- };
@@ -1,2 +0,0 @@
1
- import type { MintConfig, OpenApiFile } from '@mintlify/models';
2
- export declare const getOpenApiFilesFromMintConfig: (mintConfig: MintConfig) => Promise<OpenApiFile[]>;
@@ -1,15 +0,0 @@
1
- import { getOpenApiDocumentFromUrl } from '@mintlify/common';
2
- export const getOpenApiFilesFromMintConfig = async (mintConfig) => {
3
- const openApiFiles = [];
4
- // Download OpenApi file if url is provided
5
- if (mintConfig.openapi &&
6
- typeof mintConfig.openapi === 'string' &&
7
- mintConfig.openapi.startsWith('https')) {
8
- const specFromUrl = await getOpenApiDocumentFromUrl(mintConfig.openapi);
9
- openApiFiles.push({
10
- filename: 'openapi-from-url',
11
- spec: specFromUrl,
12
- });
13
- }
14
- return openApiFiles;
15
- };