@mintlify/common 1.0.640 → 1.0.642
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/getFileCategory.d.ts +1 -1
- package/dist/getFileCategory.js +5 -6
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/mdx/snippets/resolveAllImports.d.ts +0 -1
- package/dist/mdx/snippets/resolveAllImports.js +3 -3
- package/dist/mdx/snippets/resolveSnippetImportPath.d.ts +2 -3
- package/dist/mdx/snippets/resolveSnippetImportPath.js +6 -5
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -5
- package/dist/snippetPatterns.d.ts +0 -13
- package/dist/snippetPatterns.js +0 -18
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintlify/common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.642",
|
|
4
4
|
"description": "Commonly shared code within Mintlify",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@asyncapi/parser": "3.4.0",
|
|
50
50
|
"@mintlify/mdx": "^3.0.4",
|
|
51
|
-
"@mintlify/models": "0.0.
|
|
51
|
+
"@mintlify/models": "0.0.249",
|
|
52
52
|
"@mintlify/openapi-parser": "^0.0.8",
|
|
53
|
-
"@mintlify/validation": "0.1.
|
|
53
|
+
"@mintlify/validation": "0.1.544",
|
|
54
54
|
"@sindresorhus/slugify": "2.2.0",
|
|
55
55
|
"acorn": "8.11.2",
|
|
56
56
|
"acorn-jsx": "5.3.2",
|
|
@@ -72,7 +72,6 @@
|
|
|
72
72
|
"micromark-extension-gfm": "3.0.0",
|
|
73
73
|
"micromark-extension-mdx-jsx": "3.0.1",
|
|
74
74
|
"micromark-extension-mdxjs": "3.0.0",
|
|
75
|
-
"minimatch": "10.1.1",
|
|
76
75
|
"openapi-types": "12.1.3",
|
|
77
76
|
"postcss": "8.5.6",
|
|
78
77
|
"remark": "15.0.1",
|
|
@@ -109,5 +108,5 @@
|
|
|
109
108
|
"typescript": "5.5.3",
|
|
110
109
|
"vitest": "2.0.4"
|
|
111
110
|
},
|
|
112
|
-
"gitHead": "
|
|
111
|
+
"gitHead": "c1c02d0b5a26aca170443dc173d217484f5e651e"
|
|
113
112
|
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Default snippet patterns that are always included. Always includes the /snippets/ pattern.
|
|
3
|
-
*/
|
|
4
|
-
export declare const DEFAULT_SNIPPET_PATTERNS: string[];
|
|
5
|
-
/**
|
|
6
|
-
* Checks if a file path matches the snippet patterns.
|
|
7
|
-
* Always includes the default /snippets/ pattern in addition to any custom patterns.
|
|
8
|
-
*
|
|
9
|
-
* @param filePath The path of the file to check (with or without leading slash)
|
|
10
|
-
* @param customPatterns Optional array of custom glob patterns from docs.json
|
|
11
|
-
* @returns True if the file matches any of the snippet patterns
|
|
12
|
-
*/
|
|
13
|
-
export declare function isSnippetPath(filePath: string, customPatterns?: string[]): boolean;
|
package/dist/snippetPatterns.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { minimatch } from 'minimatch';
|
|
2
|
-
/**
|
|
3
|
-
* Default snippet patterns that are always included. Always includes the /snippets/ pattern.
|
|
4
|
-
*/
|
|
5
|
-
export const DEFAULT_SNIPPET_PATTERNS = ['snippets/**'];
|
|
6
|
-
/**
|
|
7
|
-
* Checks if a file path matches the snippet patterns.
|
|
8
|
-
* Always includes the default /snippets/ pattern in addition to any custom patterns.
|
|
9
|
-
*
|
|
10
|
-
* @param filePath The path of the file to check (with or without leading slash)
|
|
11
|
-
* @param customPatterns Optional array of custom glob patterns from docs.json
|
|
12
|
-
* @returns True if the file matches any of the snippet patterns
|
|
13
|
-
*/
|
|
14
|
-
export function isSnippetPath(filePath, customPatterns) {
|
|
15
|
-
const normalizedPath = filePath.startsWith('/') ? filePath.slice(1) : filePath;
|
|
16
|
-
const allPatterns = [...DEFAULT_SNIPPET_PATTERNS, ...(customPatterns !== null && customPatterns !== void 0 ? customPatterns : [])];
|
|
17
|
-
return allPatterns.some((pattern) => minimatch(normalizedPath, pattern, { nocase: true }));
|
|
18
|
-
}
|