@mintlify/prebuild 1.0.333 → 1.0.335

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.
@@ -1,4 +1,3 @@
1
- export declare const generateFavicons: (mintConfig: {
2
- favicon: string | null;
3
- name: string;
4
- }, contentDirectoryPath: string) => Promise<import("favicons").FaviconResponse | undefined>;
1
+ import type { MintConfig } from '@mintlify/models';
2
+ import { DocsConfig } from '@mintlify/validation';
3
+ export declare const generateFavicons: (config: MintConfig | DocsConfig, contentDirectoryPath: string) => Promise<import("favicons").FaviconResponse[] | undefined>;
@@ -2,17 +2,41 @@ import favicons from 'favicons';
2
2
  import { promises as _promises } from 'fs';
3
3
  import { join } from 'path';
4
4
  const { readFile } = _promises;
5
- export const generateFavicons = async (mintConfig, contentDirectoryPath) => {
6
- if (mintConfig.favicon == null)
5
+ export const generateFavicons = async (config, contentDirectoryPath) => {
6
+ if (config.favicon == null)
7
7
  return;
8
- const desiredPath = join(contentDirectoryPath, mintConfig.favicon);
9
- const favicon = await readFile(desiredPath);
10
- try {
11
- return favicons(favicon, faviconConfig(mintConfig.name));
8
+ if (typeof config.favicon === 'string') {
9
+ const desiredPath = join(contentDirectoryPath, config.favicon);
10
+ const favicon = await readFile(desiredPath);
11
+ try {
12
+ const icons = await favicons(favicon, faviconConfig(config.name));
13
+ return [icons];
14
+ }
15
+ catch (err) {
16
+ if (typeof err === 'object' && err != null && 'message' in err)
17
+ console.log(err.message); // Error description e.g. "An unknown error has occurred"
18
+ }
12
19
  }
13
- catch (err) {
14
- if (typeof err === 'object' && err != null && 'message' in err)
15
- console.log(err.message); // Error description e.g. "An unknown error has occurred"
20
+ else {
21
+ // Light and dark favicons case
22
+ try {
23
+ const lightPath = join(contentDirectoryPath, config.favicon.light);
24
+ const darkPath = join(contentDirectoryPath, config.favicon.dark);
25
+ const lightFavicon = await readFile(lightPath);
26
+ const darkFavicon = await readFile(darkPath);
27
+ const [lightIcons, darkIcons] = await Promise.all([
28
+ favicons(lightFavicon, faviconConfig(config.name)),
29
+ favicons(darkFavicon, {
30
+ ...faviconConfig(config.name),
31
+ path: '/favicons-dark',
32
+ }),
33
+ ]);
34
+ return [lightIcons, darkIcons];
35
+ }
36
+ catch (err) {
37
+ if (typeof err === 'object' && err != null && 'message' in err)
38
+ console.log(err.message);
39
+ }
16
40
  }
17
41
  };
18
42
  const faviconConfig = (name) => ({
@@ -39,14 +39,6 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
39
39
  anchors: import("@mintlify/validation/dist/mint-config/schemas/v2/properties/navigation/divisionNav.js").AnchorNavigation<"default">[];
40
40
  } | {
41
41
  groups: ({
42
- group: string;
43
- icon?: string | {
44
- name: string;
45
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
46
- } | undefined;
47
- hidden?: boolean | undefined;
48
- root?: string | undefined;
49
- } & ({
50
42
  openapi: (string | string[] | {
51
43
  source: string;
52
44
  directory?: string | undefined;
@@ -54,9 +46,23 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
54
46
  source: string;
55
47
  directory?: string | undefined;
56
48
  } | undefined);
49
+ group: string;
50
+ icon?: string | {
51
+ name: string;
52
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
53
+ } | undefined;
54
+ hidden?: boolean | undefined;
55
+ root?: string | undefined;
57
56
  } | {
57
+ group: string;
58
58
  pages: any[];
59
- }))[];
59
+ icon?: string | {
60
+ name: string;
61
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
62
+ } | undefined;
63
+ hidden?: boolean | undefined;
64
+ root?: string | undefined;
65
+ })[];
60
66
  } | {
61
67
  pages: any[];
62
68
  }) & {
@@ -120,14 +126,6 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
120
126
  anchors: import("@mintlify/validation/dist/mint-config/schemas/v2/properties/navigation/divisionNav.js").AnchorNavigation<"default">[];
121
127
  } | {
122
128
  groups: ({
123
- group: string;
124
- icon?: string | {
125
- name: string;
126
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
127
- } | undefined;
128
- hidden?: boolean | undefined;
129
- root?: string | undefined;
130
- } & ({
131
129
  openapi: (string | string[] | {
132
130
  source: string;
133
131
  directory?: string | undefined;
@@ -135,9 +133,23 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
135
133
  source: string;
136
134
  directory?: string | undefined;
137
135
  } | undefined);
136
+ group: string;
137
+ icon?: string | {
138
+ name: string;
139
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
140
+ } | undefined;
141
+ hidden?: boolean | undefined;
142
+ root?: string | undefined;
138
143
  } | {
144
+ group: string;
139
145
  pages: any[];
140
- }))[];
146
+ icon?: string | {
147
+ name: string;
148
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
149
+ } | undefined;
150
+ hidden?: boolean | undefined;
151
+ root?: string | undefined;
152
+ })[];
141
153
  } | {
142
154
  pages: any[];
143
155
  }) & {
@@ -372,14 +384,6 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
372
384
  anchors: import("@mintlify/validation/dist/mint-config/schemas/v2/properties/navigation/divisionNav.js").AnchorNavigation<"default">[];
373
385
  } | {
374
386
  groups: ({
375
- group: string;
376
- icon?: string | {
377
- name: string;
378
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
379
- } | undefined;
380
- hidden?: boolean | undefined;
381
- root?: string | undefined;
382
- } & ({
383
387
  openapi: (string | string[] | {
384
388
  source: string;
385
389
  directory?: string | undefined;
@@ -387,9 +391,23 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
387
391
  source: string;
388
392
  directory?: string | undefined;
389
393
  } | undefined);
394
+ group: string;
395
+ icon?: string | {
396
+ name: string;
397
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
398
+ } | undefined;
399
+ hidden?: boolean | undefined;
400
+ root?: string | undefined;
390
401
  } | {
402
+ group: string;
391
403
  pages: any[];
392
- }))[];
404
+ icon?: string | {
405
+ name: string;
406
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
407
+ } | undefined;
408
+ hidden?: boolean | undefined;
409
+ root?: string | undefined;
410
+ })[];
393
411
  } | {
394
412
  pages: any[];
395
413
  }) & {
@@ -453,14 +471,6 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
453
471
  anchors: import("@mintlify/validation/dist/mint-config/schemas/v2/properties/navigation/divisionNav.js").AnchorNavigation<"default">[];
454
472
  } | {
455
473
  groups: ({
456
- group: string;
457
- icon?: string | {
458
- name: string;
459
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
460
- } | undefined;
461
- hidden?: boolean | undefined;
462
- root?: string | undefined;
463
- } & ({
464
474
  openapi: (string | string[] | {
465
475
  source: string;
466
476
  directory?: string | undefined;
@@ -468,9 +478,23 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
468
478
  source: string;
469
479
  directory?: string | undefined;
470
480
  } | undefined);
481
+ group: string;
482
+ icon?: string | {
483
+ name: string;
484
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
485
+ } | undefined;
486
+ hidden?: boolean | undefined;
487
+ root?: string | undefined;
471
488
  } | {
489
+ group: string;
472
490
  pages: any[];
473
- }))[];
491
+ icon?: string | {
492
+ name: string;
493
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
494
+ } | undefined;
495
+ hidden?: boolean | undefined;
496
+ root?: string | undefined;
497
+ })[];
474
498
  } | {
475
499
  pages: any[];
476
500
  }) & {
@@ -705,14 +729,6 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
705
729
  anchors: import("@mintlify/validation/dist/mint-config/schemas/v2/properties/navigation/divisionNav.js").AnchorNavigation<"default">[];
706
730
  } | {
707
731
  groups: ({
708
- group: string;
709
- icon?: string | {
710
- name: string;
711
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
712
- } | undefined;
713
- hidden?: boolean | undefined;
714
- root?: string | undefined;
715
- } & ({
716
732
  openapi: (string | string[] | {
717
733
  source: string;
718
734
  directory?: string | undefined;
@@ -720,9 +736,23 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
720
736
  source: string;
721
737
  directory?: string | undefined;
722
738
  } | undefined);
739
+ group: string;
740
+ icon?: string | {
741
+ name: string;
742
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
743
+ } | undefined;
744
+ hidden?: boolean | undefined;
745
+ root?: string | undefined;
723
746
  } | {
747
+ group: string;
724
748
  pages: any[];
725
- }))[];
749
+ icon?: string | {
750
+ name: string;
751
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
752
+ } | undefined;
753
+ hidden?: boolean | undefined;
754
+ root?: string | undefined;
755
+ })[];
726
756
  } | {
727
757
  pages: any[];
728
758
  }) & {
@@ -786,14 +816,6 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
786
816
  anchors: import("@mintlify/validation/dist/mint-config/schemas/v2/properties/navigation/divisionNav.js").AnchorNavigation<"default">[];
787
817
  } | {
788
818
  groups: ({
789
- group: string;
790
- icon?: string | {
791
- name: string;
792
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
793
- } | undefined;
794
- hidden?: boolean | undefined;
795
- root?: string | undefined;
796
- } & ({
797
819
  openapi: (string | string[] | {
798
820
  source: string;
799
821
  directory?: string | undefined;
@@ -801,9 +823,23 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
801
823
  source: string;
802
824
  directory?: string | undefined;
803
825
  } | undefined);
826
+ group: string;
827
+ icon?: string | {
828
+ name: string;
829
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
830
+ } | undefined;
831
+ hidden?: boolean | undefined;
832
+ root?: string | undefined;
804
833
  } | {
834
+ group: string;
805
835
  pages: any[];
806
- }))[];
836
+ icon?: string | {
837
+ name: string;
838
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
839
+ } | undefined;
840
+ hidden?: boolean | undefined;
841
+ root?: string | undefined;
842
+ })[];
807
843
  } | {
808
844
  pages: any[];
809
845
  }) & {
@@ -1038,14 +1074,6 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
1038
1074
  anchors: import("@mintlify/validation/dist/mint-config/schemas/v2/properties/navigation/divisionNav.js").AnchorNavigation<"default">[];
1039
1075
  } | {
1040
1076
  groups: ({
1041
- group: string;
1042
- icon?: string | {
1043
- name: string;
1044
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
1045
- } | undefined;
1046
- hidden?: boolean | undefined;
1047
- root?: string | undefined;
1048
- } & ({
1049
1077
  openapi: (string | string[] | {
1050
1078
  source: string;
1051
1079
  directory?: string | undefined;
@@ -1053,9 +1081,23 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
1053
1081
  source: string;
1054
1082
  directory?: string | undefined;
1055
1083
  } | undefined);
1084
+ group: string;
1085
+ icon?: string | {
1086
+ name: string;
1087
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
1088
+ } | undefined;
1089
+ hidden?: boolean | undefined;
1090
+ root?: string | undefined;
1056
1091
  } | {
1092
+ group: string;
1057
1093
  pages: any[];
1058
- }))[];
1094
+ icon?: string | {
1095
+ name: string;
1096
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
1097
+ } | undefined;
1098
+ hidden?: boolean | undefined;
1099
+ root?: string | undefined;
1100
+ })[];
1059
1101
  } | {
1060
1102
  pages: any[];
1061
1103
  }) & {
@@ -1119,14 +1161,6 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
1119
1161
  anchors: import("@mintlify/validation/dist/mint-config/schemas/v2/properties/navigation/divisionNav.js").AnchorNavigation<"default">[];
1120
1162
  } | {
1121
1163
  groups: ({
1122
- group: string;
1123
- icon?: string | {
1124
- name: string;
1125
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
1126
- } | undefined;
1127
- hidden?: boolean | undefined;
1128
- root?: string | undefined;
1129
- } & ({
1130
1164
  openapi: (string | string[] | {
1131
1165
  source: string;
1132
1166
  directory?: string | undefined;
@@ -1134,9 +1168,23 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
1134
1168
  source: string;
1135
1169
  directory?: string | undefined;
1136
1170
  } | undefined);
1171
+ group: string;
1172
+ icon?: string | {
1173
+ name: string;
1174
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
1175
+ } | undefined;
1176
+ hidden?: boolean | undefined;
1177
+ root?: string | undefined;
1137
1178
  } | {
1179
+ group: string;
1138
1180
  pages: any[];
1139
- }))[];
1181
+ icon?: string | {
1182
+ name: string;
1183
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
1184
+ } | undefined;
1185
+ hidden?: boolean | undefined;
1186
+ root?: string | undefined;
1187
+ })[];
1140
1188
  } | {
1141
1189
  pages: any[];
1142
1190
  }) & {
@@ -1371,14 +1419,6 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
1371
1419
  anchors: import("@mintlify/validation/dist/mint-config/schemas/v2/properties/navigation/divisionNav.js").AnchorNavigation<"default">[];
1372
1420
  } | {
1373
1421
  groups: ({
1374
- group: string;
1375
- icon?: string | {
1376
- name: string;
1377
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
1378
- } | undefined;
1379
- hidden?: boolean | undefined;
1380
- root?: string | undefined;
1381
- } & ({
1382
1422
  openapi: (string | string[] | {
1383
1423
  source: string;
1384
1424
  directory?: string | undefined;
@@ -1386,9 +1426,23 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
1386
1426
  source: string;
1387
1427
  directory?: string | undefined;
1388
1428
  } | undefined);
1429
+ group: string;
1430
+ icon?: string | {
1431
+ name: string;
1432
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
1433
+ } | undefined;
1434
+ hidden?: boolean | undefined;
1435
+ root?: string | undefined;
1389
1436
  } | {
1437
+ group: string;
1390
1438
  pages: any[];
1391
- }))[];
1439
+ icon?: string | {
1440
+ name: string;
1441
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
1442
+ } | undefined;
1443
+ hidden?: boolean | undefined;
1444
+ root?: string | undefined;
1445
+ })[];
1392
1446
  } | {
1393
1447
  pages: any[];
1394
1448
  }) & {
@@ -1452,14 +1506,6 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
1452
1506
  anchors: import("@mintlify/validation/dist/mint-config/schemas/v2/properties/navigation/divisionNav.js").AnchorNavigation<"default">[];
1453
1507
  } | {
1454
1508
  groups: ({
1455
- group: string;
1456
- icon?: string | {
1457
- name: string;
1458
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
1459
- } | undefined;
1460
- hidden?: boolean | undefined;
1461
- root?: string | undefined;
1462
- } & ({
1463
1509
  openapi: (string | string[] | {
1464
1510
  source: string;
1465
1511
  directory?: string | undefined;
@@ -1467,9 +1513,23 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
1467
1513
  source: string;
1468
1514
  directory?: string | undefined;
1469
1515
  } | undefined);
1516
+ group: string;
1517
+ icon?: string | {
1518
+ name: string;
1519
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
1520
+ } | undefined;
1521
+ hidden?: boolean | undefined;
1522
+ root?: string | undefined;
1470
1523
  } | {
1524
+ group: string;
1471
1525
  pages: any[];
1472
- }))[];
1526
+ icon?: string | {
1527
+ name: string;
1528
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
1529
+ } | undefined;
1530
+ hidden?: boolean | undefined;
1531
+ root?: string | undefined;
1532
+ })[];
1473
1533
  } | {
1474
1534
  pages: any[];
1475
1535
  }) & {