fix
This commit is contained in:
parent
5b284ec76e
commit
0ce1d627d9
|
|
@ -55,6 +55,16 @@ export const initTypings = async (
|
||||||
code.internal.typings[id_site].watch.on("change", (e, path) => {
|
code.internal.typings[id_site].watch.on("change", (e, path) => {
|
||||||
clearTimeout(timeout);
|
clearTimeout(timeout);
|
||||||
timeout = setTimeout(async () => {
|
timeout = setTimeout(async () => {
|
||||||
|
try {
|
||||||
|
const logs = (await typings_log.text()).split("\n");
|
||||||
|
const idx = logs.findLastIndex((e) =>
|
||||||
|
e.includes("Watching for file changes.")
|
||||||
|
);
|
||||||
|
if (idx > 0) {
|
||||||
|
Bun.write(typings_log, logs.slice(idx - 1).join("\n"));
|
||||||
|
}
|
||||||
|
} catch (e) {}
|
||||||
|
|
||||||
clearTimeout(timeout);
|
clearTimeout(timeout);
|
||||||
const glob = new Glob("type_def*");
|
const glob = new Glob("type_def*");
|
||||||
const path = dir.data(`/code/${id_site}/site/typings.d.ts`);
|
const path = dir.data(`/code/${id_site}/site/typings.d.ts`);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue