@mintlify/prebuild 1.0.764 → 1.0.765
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/fs/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isMintIgnored } from '@mintlify/common';
|
|
1
|
+
import { isMintIgnored, toPosixPath } from '@mintlify/common';
|
|
2
2
|
import { readdirSync } from 'fs';
|
|
3
3
|
import { readdir } from 'fs/promises';
|
|
4
4
|
import path from 'path';
|
|
@@ -11,7 +11,7 @@ export const getFileListSync = (dirName, og = dirName) => {
|
|
|
11
11
|
files.push(...getFileListSync(fullPath, og));
|
|
12
12
|
}
|
|
13
13
|
else {
|
|
14
|
-
files.push(path.relative(og, fullPath));
|
|
14
|
+
files.push(toPosixPath(path.relative(og, fullPath)));
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
return files;
|
|
@@ -23,14 +23,14 @@ export const getFileListWithDirectories = (dirName, og = dirName) => {
|
|
|
23
23
|
for (const item of items) {
|
|
24
24
|
const fullPath = path.join(dirName, item.name);
|
|
25
25
|
if (item.isDirectory()) {
|
|
26
|
-
const relativeDir = path.relative(og, fullPath);
|
|
26
|
+
const relativeDir = toPosixPath(path.relative(og, fullPath));
|
|
27
27
|
if (relativeDir !== '.git') {
|
|
28
28
|
files.push(relativeDir);
|
|
29
29
|
files.push(...getFileListWithDirectories(fullPath, og));
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
else {
|
|
33
|
-
files.push(path.relative(og, fullPath));
|
|
33
|
+
files.push(toPosixPath(path.relative(og, fullPath)));
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
return files;
|
|
@@ -38,8 +38,8 @@ export const getFileListWithDirectories = (dirName, og = dirName) => {
|
|
|
38
38
|
export async function* getFileList(dirName, og = dirName, mintIgnore = []) {
|
|
39
39
|
const items = await readdir(dirName, { withFileTypes: true });
|
|
40
40
|
for (const item of items) {
|
|
41
|
-
const fullPath =
|
|
42
|
-
const relativePath = path.relative(og, fullPath);
|
|
41
|
+
const fullPath = path.join(dirName, item.name);
|
|
42
|
+
const relativePath = toPosixPath(path.relative(og, fullPath));
|
|
43
43
|
if (isMintIgnored(relativePath, mintIgnore)) {
|
|
44
44
|
continue;
|
|
45
45
|
}
|