chore: generate
This commit is contained in:
parent
4597c687fa
commit
be8fee5c2b
1 changed files with 10 additions and 8 deletions
|
|
@ -225,15 +225,17 @@ export const fffLayer = Layer.effect(
|
||||||
score: found.value.scores[index]?.total ?? 0,
|
score: found.value.scores[index]?.total ?? 0,
|
||||||
}))
|
}))
|
||||||
})()
|
})()
|
||||||
return items.sort((a, b) => b.score - a.score || a.path.length - b.path.length).map((item) => {
|
return items
|
||||||
const relative = item.path.replaceAll("\\", "/").replace(/\/$/, "")
|
.sort((a, b) => b.score - a.score || a.path.length - b.path.length)
|
||||||
const absolute = path.resolve(location.directory, relative)
|
.map((item) => {
|
||||||
return new FileSystem.Entry({
|
const relative = item.path.replaceAll("\\", "/").replace(/\/$/, "")
|
||||||
path: RelativePath.make(relative + (item.type === "directory" ? path.sep : "")),
|
const absolute = path.resolve(location.directory, relative)
|
||||||
type: item.type,
|
return new FileSystem.Entry({
|
||||||
mime: item.type === "directory" ? "application/x-directory" : FSUtil.mimeType(absolute),
|
path: RelativePath.make(relative + (item.type === "directory" ? path.sep : "")),
|
||||||
|
type: item.type,
|
||||||
|
mime: item.type === "directory" ? "application/x-directory" : FSUtil.mimeType(absolute),
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue