@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.js
CHANGED
|
@@ -3711,7 +3711,6 @@ function requestLoggerMiddleware(options = {}) {
|
|
|
3711
3711
|
const startTime = Date.now();
|
|
3712
3712
|
res.on("finish", () => {
|
|
3713
3713
|
const duration = Date.now() - startTime;
|
|
3714
|
-
const shouldLogSuccess = logRequests === true;
|
|
3715
3714
|
if (res.statusCode >= 500) {
|
|
3716
3715
|
reqLogger.error(`${req.method} ${req.path} ${res.statusCode}`, {
|
|
3717
3716
|
statusCode: res.statusCode,
|
|
@@ -3722,11 +3721,6 @@ function requestLoggerMiddleware(options = {}) {
|
|
|
3722
3721
|
statusCode: res.statusCode,
|
|
3723
3722
|
duration: `${duration}ms`
|
|
3724
3723
|
});
|
|
3725
|
-
} else if (shouldLogSuccess) {
|
|
3726
|
-
reqLogger.debug(`${req.method} ${req.path} ${res.statusCode}`, {
|
|
3727
|
-
statusCode: res.statusCode,
|
|
3728
|
-
duration: `${duration}ms`
|
|
3729
|
-
});
|
|
3730
3724
|
}
|
|
3731
3725
|
});
|
|
3732
3726
|
}
|
|
@@ -4824,26 +4818,22 @@ async function startServer(options = {}) {
|
|
|
4824
4818
|
});
|
|
4825
4819
|
httpServer.listen(port, host, () => {
|
|
4826
4820
|
if (isDev) {
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4821
|
+
const reset = "\x1B[0m";
|
|
4822
|
+
const cyan = "\x1B[36m";
|
|
4823
|
+
const green = "\x1B[32m";
|
|
4824
|
+
const dim = "\x1B[2m";
|
|
4825
|
+
const bold = "\x1B[1m";
|
|
4826
|
+
const url = `http://${host === "0.0.0.0" ? "localhost" : host}:${port}`;
|
|
4827
|
+
console.log();
|
|
4828
|
+
console.log(`${bold}${green}\u2713${reset} ${bold}Dev server ready${reset}`);
|
|
4829
|
+
console.log(`${dim} Local:${reset} ${cyan}${url}${reset}`);
|
|
4830
|
+
if (routes.length > 0 || apiRoutes.length > 0 || wssRoutes.length > 0) {
|
|
4831
|
+
console.log(`${dim} Routes:${reset} ${routes.length} pages, ${apiRoutes.length} API, ${wssRoutes.length} WSS`);
|
|
4832
|
+
}
|
|
4833
|
+
console.log();
|
|
4833
4834
|
} else {
|
|
4834
|
-
const
|
|
4835
|
-
|
|
4836
|
-
url: `http://${host}:${port}`,
|
|
4837
|
-
appDir,
|
|
4838
|
-
buildDir
|
|
4839
|
-
});
|
|
4840
|
-
logger3.info("\u{1F9ED} Reading compiled routes from", { appDir });
|
|
4841
|
-
logger3.info("\u{1F4E6} Client served from", {
|
|
4842
|
-
path: `/static (${buildDir}/client)`
|
|
4843
|
-
});
|
|
4844
|
-
logger3.info("\u{1F4C4} SSG served from", {
|
|
4845
|
-
path: `${buildDir}/ssg (if exists)`
|
|
4846
|
-
});
|
|
4835
|
+
const url = `http://${host}:${port}`;
|
|
4836
|
+
console.log(`\u{1F680} Server running on ${url}`);
|
|
4847
4837
|
}
|
|
4848
4838
|
});
|
|
4849
4839
|
}
|