Update dev debug logs

This commit is contained in:
Benjamin Toby 2026-04-05 06:34:28 +01:00
parent 333c84281d
commit 8d5b2a5c07
3 changed files with 12 additions and 3 deletions

View File

@ -10,6 +10,8 @@ export default async function watcherEsbuildCTX() {
recursive: true, recursive: true,
persistent: true, persistent: true,
}, async (event, filename) => { }, async (event, filename) => {
// log.info(`event: ${event}`);
// log.info(`filename: ${filename}`);
if (!filename) if (!filename)
return; return;
if (filename.match(/^\.\w+/)) { if (filename.match(/^\.\w+/)) {
@ -71,6 +73,8 @@ export default async function watcherEsbuildCTX() {
? "Sylesheet" ? "Sylesheet"
: file_stat?.isDirectory() : file_stat?.isDirectory()
? "Directory" ? "Directory"
: filename.match(/\/pages\/api\//)
? "API Route"
: "Page"; : "Page";
await fullRebuild({ await fullRebuild({
msg: `${type} ${action}: ${filename}. Rebuilding ...`, msg: `${type} ${action}: ${filename}. Rebuilding ...`,

View File

@ -2,7 +2,7 @@
"name": "@moduletrace/bunext", "name": "@moduletrace/bunext",
"module": "index.ts", "module": "index.ts",
"type": "module", "type": "module",
"version": "1.0.49", "version": "1.0.50",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
"exports": { "exports": {

View File

@ -15,6 +15,9 @@ export default async function watcherEsbuildCTX() {
persistent: true, persistent: true,
}, },
async (event, filename) => { async (event, filename) => {
// log.info(`event: ${event}`);
// log.info(`filename: ${filename}`);
if (!filename) return; if (!filename) return;
if (filename.match(/^\.\w+/)) { if (filename.match(/^\.\w+/)) {
@ -92,6 +95,8 @@ export default async function watcherEsbuildCTX() {
? "Sylesheet" ? "Sylesheet"
: file_stat?.isDirectory() : file_stat?.isDirectory()
? "Directory" ? "Directory"
: filename.match(/\/pages\/api\//)
? "API Route"
: "Page"; : "Page";
await fullRebuild({ await fullRebuild({