summary refs log tree commit diff
path: root/scripts/util
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-02-25 08:08:39 +0100
committerRory& <root@rory.gay>2026-02-25 08:08:39 +0100
commit7b04349878abfa2d12825012acb30e8d53badb4d (patch)
tree0c6ddeff7ee2dc8ccb5e069dff0b0627023e39b4 /scripts/util
parentMerge remote-tracking branch 'mathium05/memberEditScrewUp' (diff)
downloadserver-ts-7b04349878abfa2d12825012acb30e8d53badb4d.tar.xz
Lower missing route to WARN, add empty route middlewares
Diffstat (limited to 'scripts/util')
-rw-r--r--scripts/util/getRouteDescriptions.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/util/getRouteDescriptions.js b/scripts/util/getRouteDescriptions.js

index 5896f049..5c4c0aff 100644 --- a/scripts/util/getRouteDescriptions.js +++ b/scripts/util/getRouteDescriptions.js
@@ -2,7 +2,7 @@ const express = require("express"); const path = require("path"); const { traverseDirectory } = require("lambert-server"); const RouteUtility = require("../../dist/api/util/handlers/route.js"); -const { bgRedBright, greenBright, yellowBright, blueBright, redBright, underline, bold } = require("picocolors"); +const { bgRedBright, greenBright, yellowBright, blueBright, redBright, underline, bold, bgYellow, black } = require("picocolors"); const methods = ["get", "post", "put", "delete", "patch"]; const routes = new Map(); @@ -46,7 +46,7 @@ function proxy(file, apiMethod, apiPathPrefix, apiPath, ...args) { const opts = args.find((x) => x?.prototype?.OPTS_MARKER == true); if (!opts) return console.error( - ` \x1b[5m${bgRedBright("ERROR")}\x1b[25m ${file.replace(path.resolve(__dirname, "..", "..", "dist"), "/src/")} has route without route() description middleware: ${colorizeMethod(apiMethod)} ${formatPath(apiPath)}`, + ` \x1b[5m${bgYellow(black("WARN"))}\x1b[25m ${file.replace(path.resolve(__dirname, "..", "..", "dist"), "/src")} has route without route() description middleware: ${colorizeMethod(apiMethod)} ${formatPath(apiPath)}`, ); console.log(`${colorizeMethod(apiMethod).padStart("DELETE".length + 10)} ${formatPath(apiPathPrefix + apiPath)}`);