@vyckr/tachyon 1.3.3 → 1.3.4
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/package.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { existsSync } from 'fs'
|
|
1
2
|
import Router from "./route-handler.js"
|
|
2
3
|
|
|
3
4
|
/** A Bun subprocess with all three stdio channels opened as pipes. */
|
|
@@ -43,7 +44,8 @@ export default class Pool {
|
|
|
43
44
|
for (const [route, methods] of Router.allRoutes) {
|
|
44
45
|
for (const method of methods) {
|
|
45
46
|
if (method === 'HTML' || method === 'OPTIONS') continue
|
|
46
|
-
|
|
47
|
+
const handler = `${Router.routesPath}${route === '/' ? '' : route}/${method}`
|
|
48
|
+
if (existsSync(handler)) Pool.prewarmHandler(handler)
|
|
47
49
|
}
|
|
48
50
|
}
|
|
49
51
|
}
|