@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/cli.cjs
CHANGED
|
@@ -4213,7 +4213,6 @@ function requestLoggerMiddleware(options = {}) {
|
|
|
4213
4213
|
const startTime = Date.now();
|
|
4214
4214
|
res.on("finish", () => {
|
|
4215
4215
|
const duration = Date.now() - startTime;
|
|
4216
|
-
const shouldLogSuccess = logRequests === true;
|
|
4217
4216
|
if (res.statusCode >= 500) {
|
|
4218
4217
|
reqLogger.error(`${req.method} ${req.path} ${res.statusCode}`, {
|
|
4219
4218
|
statusCode: res.statusCode,
|
|
@@ -4224,11 +4223,6 @@ function requestLoggerMiddleware(options = {}) {
|
|
|
4224
4223
|
statusCode: res.statusCode,
|
|
4225
4224
|
duration: `${duration}ms`
|
|
4226
4225
|
});
|
|
4227
|
-
} else if (shouldLogSuccess) {
|
|
4228
|
-
reqLogger.debug(`${req.method} ${req.path} ${res.statusCode}`, {
|
|
4229
|
-
statusCode: res.statusCode,
|
|
4230
|
-
duration: `${duration}ms`
|
|
4231
|
-
});
|
|
4232
4226
|
}
|
|
4233
4227
|
});
|
|
4234
4228
|
}
|
|
@@ -5109,26 +5103,22 @@ async function startServer(options = {}) {
|
|
|
5109
5103
|
});
|
|
5110
5104
|
httpServer.listen(port, host, () => {
|
|
5111
5105
|
if (isDev) {
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5106
|
+
const reset = "\x1B[0m";
|
|
5107
|
+
const cyan = "\x1B[36m";
|
|
5108
|
+
const green = "\x1B[32m";
|
|
5109
|
+
const dim = "\x1B[2m";
|
|
5110
|
+
const bold = "\x1B[1m";
|
|
5111
|
+
const url = `http://${host === "0.0.0.0" ? "localhost" : host}:${port}`;
|
|
5112
|
+
console.log();
|
|
5113
|
+
console.log(`${bold}${green}\u2713${reset} ${bold}Dev server ready${reset}`);
|
|
5114
|
+
console.log(`${dim} Local:${reset} ${cyan}${url}${reset}`);
|
|
5115
|
+
if (routes.length > 0 || apiRoutes.length > 0 || wssRoutes.length > 0) {
|
|
5116
|
+
console.log(`${dim} Routes:${reset} ${routes.length} pages, ${apiRoutes.length} API, ${wssRoutes.length} WSS`);
|
|
5117
|
+
}
|
|
5118
|
+
console.log();
|
|
5118
5119
|
} else {
|
|
5119
|
-
const
|
|
5120
|
-
|
|
5121
|
-
url: `http://${host}:${port}`,
|
|
5122
|
-
appDir,
|
|
5123
|
-
buildDir
|
|
5124
|
-
});
|
|
5125
|
-
logger3.info("\u{1F9ED} Reading compiled routes from", { appDir });
|
|
5126
|
-
logger3.info("\u{1F4E6} Client served from", {
|
|
5127
|
-
path: `/static (${buildDir}/client)`
|
|
5128
|
-
});
|
|
5129
|
-
logger3.info("\u{1F4C4} SSG served from", {
|
|
5130
|
-
path: `${buildDir}/ssg (if exists)`
|
|
5131
|
-
});
|
|
5120
|
+
const url = `http://${host}:${port}`;
|
|
5121
|
+
console.log(`\u{1F680} Server running on ${url}`);
|
|
5132
5122
|
}
|
|
5133
5123
|
});
|
|
5134
5124
|
}
|