@mintlify/prebuild 1.0.741 → 1.0.743

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/dist/utils.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  import { ConfigType } from '@mintlify/models';
2
2
  export declare const getFileExtension: (filename: string) => string;
3
3
  export declare const getConfigPath: (contentDirectoryPath: string, type: ConfigType) => Promise<string | null>;
4
+ export declare const getMintIgnorePath: (contentDirectoryPath: string) => Promise<string | null>;
5
+ export declare const getMintIgnore: (contentDirectoryPath: string) => Promise<string[]>;
4
6
  export declare const getConfigObj: (contentDirectoryPath: string, type: ConfigType) => Promise<any>;
package/dist/utils.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { processMintIgnoreString } from '@mintlify/common';
1
2
  import fse from 'fs-extra';
2
3
  import pathUtil from 'path';
3
4
  export const getFileExtension = (filename) => {
@@ -10,6 +11,19 @@ export const getConfigPath = async (contentDirectoryPath, type) => {
10
11
  return null;
11
12
  return path;
12
13
  };
14
+ export const getMintIgnorePath = async (contentDirectoryPath) => {
15
+ const path = pathUtil.join(contentDirectoryPath, '.mintignore');
16
+ if (!(await fse.pathExists(path)))
17
+ return null;
18
+ return path;
19
+ };
20
+ export const getMintIgnore = async (contentDirectoryPath) => {
21
+ const path = await getMintIgnorePath(contentDirectoryPath);
22
+ if (!path)
23
+ return [];
24
+ const content = await fse.readFile(path, 'utf-8');
25
+ return processMintIgnoreString(content);
26
+ };
13
27
  export const getConfigObj = async (contentDirectoryPath, type) => {
14
28
  const configPath = await getConfigPath(contentDirectoryPath, type);
15
29
  if (!configPath)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mintlify/prebuild",
3
3
  "type": "module",
4
- "version": "1.0.741",
4
+ "version": "1.0.743",
5
5
  "description": "Helpful functions for Mintlify's prebuild step",
6
6
  "author": "Mintlify, Inc.",
7
7
  "repository": {
@@ -41,9 +41,9 @@
41
41
  "format:check": "prettier . --check"
42
42
  },
43
43
  "dependencies": {
44
- "@mintlify/common": "1.0.612",
44
+ "@mintlify/common": "1.0.614",
45
45
  "@mintlify/openapi-parser": "^0.0.8",
46
- "@mintlify/scraping": "4.0.472",
46
+ "@mintlify/scraping": "4.0.474",
47
47
  "@mintlify/validation": "0.1.524",
48
48
  "chalk": "^5.3.0",
49
49
  "favicons": "^7.2.0",
@@ -72,5 +72,5 @@
72
72
  "typescript": "^5.5.3",
73
73
  "vitest": "^2.0.4"
74
74
  },
75
- "gitHead": "481b56f6e663d3e2cece18c2004701d3a0e305e4"
75
+ "gitHead": "8a06a15ab3b1133c997be91598866c58cfa1e48c"
76
76
  }