1
0
forked from baron/baron-sso

ci: add code check badges and coverage reports

This commit is contained in:
2026-05-29 12:05:43 +09:00
parent c489c7c38f
commit a830242947
164 changed files with 9059 additions and 2012 deletions

View File

@@ -1,5 +1,5 @@
import { createServer } from "node:http";
import { readFile, stat } from "node:fs/promises";
import { createServer } from "node:http";
import { extname, join, normalize, resolve } from "node:path";
import { fileURLToPath } from "node:url";
@@ -24,7 +24,9 @@ const contentTypes = {
};
function getContentType(filePath) {
return contentTypes[extname(filePath).toLowerCase()] ?? "application/octet-stream";
return (
contentTypes[extname(filePath).toLowerCase()] ?? "application/octet-stream"
);
}
function sendJson(res, statusCode, body) {
@@ -132,7 +134,10 @@ async function serveStatic(req, res, pathname) {
createServer(async (req, res) => {
try {
const url = new URL(req.url ?? "/", `http://${req.headers.host ?? "localhost"}`);
const url = new URL(
req.url ?? "/",
`http://${req.headers.host ?? "localhost"}`,
);
const { pathname, search } = url;
if (pathname === "/api" || pathname.startsWith("/api/")) {
@@ -149,5 +154,7 @@ createServer(async (req, res) => {
});
}
}).listen(port, host, () => {
console.log(`Adminfront production server listening on http://${host}:${port}`);
console.log(
`Adminfront production server listening on http://${host}:${port}`,
);
});