@lolyjs/core 0.2.0-alpha.13 → 0.2.0-alpha.14
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/cli.cjs +15 -25
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +15 -25
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +15 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +15 -25
- package/dist/index.js.map +1 -1
- package/dist/react/hooks.cjs +16 -6
- package/dist/react/hooks.cjs.map +1 -1
- package/dist/react/hooks.js +23 -13
- package/dist/react/hooks.js.map +1 -1
- package/dist/react/themes.cjs +61 -18
- package/dist/react/themes.cjs.map +1 -1
- package/dist/react/themes.js +63 -20
- package/dist/react/themes.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3753,7 +3753,6 @@ function requestLoggerMiddleware(options = {}) {
|
|
|
3753
3753
|
const startTime = Date.now();
|
|
3754
3754
|
res.on("finish", () => {
|
|
3755
3755
|
const duration = Date.now() - startTime;
|
|
3756
|
-
const shouldLogSuccess = logRequests === true;
|
|
3757
3756
|
if (res.statusCode >= 500) {
|
|
3758
3757
|
reqLogger.error(`${req.method} ${req.path} ${res.statusCode}`, {
|
|
3759
3758
|
statusCode: res.statusCode,
|
|
@@ -3764,11 +3763,6 @@ function requestLoggerMiddleware(options = {}) {
|
|
|
3764
3763
|
statusCode: res.statusCode,
|
|
3765
3764
|
duration: `${duration}ms`
|
|
3766
3765
|
});
|
|
3767
|
-
} else if (shouldLogSuccess) {
|
|
3768
|
-
reqLogger.debug(`${req.method} ${req.path} ${res.statusCode}`, {
|
|
3769
|
-
statusCode: res.statusCode,
|
|
3770
|
-
duration: `${duration}ms`
|
|
3771
|
-
});
|
|
3772
3766
|
}
|
|
3773
3767
|
});
|
|
3774
3768
|
}
|
|
@@ -4866,26 +4860,22 @@ async function startServer(options = {}) {
|
|
|
4866
4860
|
});
|
|
4867
4861
|
httpServer.listen(port, host, () => {
|
|
4868
4862
|
if (isDev) {
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4863
|
+
const reset = "\x1B[0m";
|
|
4864
|
+
const cyan = "\x1B[36m";
|
|
4865
|
+
const green = "\x1B[32m";
|
|
4866
|
+
const dim = "\x1B[2m";
|
|
4867
|
+
const bold = "\x1B[1m";
|
|
4868
|
+
const url = `http://${host === "0.0.0.0" ? "localhost" : host}:${port}`;
|
|
4869
|
+
console.log();
|
|
4870
|
+
console.log(`${bold}${green}\u2713${reset} ${bold}Dev server ready${reset}`);
|
|
4871
|
+
console.log(`${dim} Local:${reset} ${cyan}${url}${reset}`);
|
|
4872
|
+
if (routes.length > 0 || apiRoutes.length > 0 || wssRoutes.length > 0) {
|
|
4873
|
+
console.log(`${dim} Routes:${reset} ${routes.length} pages, ${apiRoutes.length} API, ${wssRoutes.length} WSS`);
|
|
4874
|
+
}
|
|
4875
|
+
console.log();
|
|
4875
4876
|
} else {
|
|
4876
|
-
const
|
|
4877
|
-
|
|
4878
|
-
url: `http://${host}:${port}`,
|
|
4879
|
-
appDir,
|
|
4880
|
-
buildDir
|
|
4881
|
-
});
|
|
4882
|
-
logger3.info("\u{1F9ED} Reading compiled routes from", { appDir });
|
|
4883
|
-
logger3.info("\u{1F4E6} Client served from", {
|
|
4884
|
-
path: `/static (${buildDir}/client)`
|
|
4885
|
-
});
|
|
4886
|
-
logger3.info("\u{1F4C4} SSG served from", {
|
|
4887
|
-
path: `${buildDir}/ssg (if exists)`
|
|
4888
|
-
});
|
|
4877
|
+
const url = `http://${host}:${port}`;
|
|
4878
|
+
console.log(`\u{1F680} Server running on ${url}`);
|
|
4889
4879
|
}
|
|
4890
4880
|
});
|
|
4891
4881
|
}
|