@zenithbuild/cli 0.4.5 → 0.4.6
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/zen-build.js +325 -212
- package/dist/zen-dev.js +325 -212
- package/dist/zen-preview.js +325 -212
- package/dist/zenith.js +325 -212
- package/package.json +2 -2
- package/src/commands/dev.ts +7 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenithbuild/cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.6",
|
|
4
4
|
"description": "CLI for Zenith framework - dev server, build tools, and plugin management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -60,4 +60,4 @@
|
|
|
60
60
|
"@zenithbuild/router": "latest",
|
|
61
61
|
"picocolors": "^1.0.0"
|
|
62
62
|
}
|
|
63
|
-
}
|
|
63
|
+
}
|
package/src/commands/dev.ts
CHANGED
|
@@ -405,7 +405,7 @@ export async function dev(options: DevOptions = {}): Promise<void> {
|
|
|
405
405
|
const renderTime = Math.round(renderEnd - renderStart)
|
|
406
406
|
|
|
407
407
|
logger.route('GET', pathname, 200, totalTime, compileTime, renderTime)
|
|
408
|
-
return new Response(html, { headers: { 'Content-Type': 'text/html' } })
|
|
408
|
+
return new Response(html, { headers: { 'Content-Type': 'text/html; charset=utf-8' } })
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
411
|
|
|
@@ -450,13 +450,18 @@ function findPageForRoute(route: string, pagesDir: string): string | null {
|
|
|
450
450
|
const staticPart = segments.slice(0, i).join('/')
|
|
451
451
|
const baseDir = staticPart ? path.join(pagesDir, staticPart) : pagesDir
|
|
452
452
|
|
|
453
|
+
// console.log(`[ZenithDev] Checking level ${i}: baseDir=${baseDir}`)
|
|
454
|
+
|
|
453
455
|
// Check for [slug].zen (single segment catch)
|
|
454
456
|
const singleDynamicPath = path.join(baseDir, '[slug].zen')
|
|
455
457
|
if (fs.existsSync(singleDynamicPath)) return singleDynamicPath
|
|
456
458
|
|
|
457
459
|
// Check for [...slug].zen (catch-all)
|
|
458
460
|
const catchAllPath = path.join(baseDir, '[...slug].zen')
|
|
459
|
-
if (fs.existsSync(catchAllPath))
|
|
461
|
+
if (fs.existsSync(catchAllPath)) {
|
|
462
|
+
console.log(`[ZenithDev] MATCH! Found ${catchAllPath}`)
|
|
463
|
+
return catchAllPath
|
|
464
|
+
}
|
|
460
465
|
}
|
|
461
466
|
|
|
462
467
|
// 4. Check for catch-all at root
|