@jsenv/server 14.1.6 → 14.1.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/server",
3
- "version": "14.1.6",
3
+ "version": "14.1.8",
4
4
  "description": "Write your Node.js server using pure functions",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -38,7 +38,7 @@
38
38
  "@jsenv/log": "3.3.1",
39
39
  "@jsenv/url-meta": "7.0.0",
40
40
  "@jsenv/utils": "2.0.1",
41
- "ws": "8.8.1"
41
+ "ws": "8.9.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@jsenv/fetch": "../fetch/",
@@ -64,7 +64,7 @@ export const fetchFileSystem = async (
64
64
  }
65
65
 
66
66
  // here you might be tempted to add || cacheControl === 'no-cache'
67
- // but no-cache means resource can be cache but must be revalidated (yeah naming is strange)
67
+ // but no-cache means resource can be cached but must be revalidated (yeah naming is strange)
68
68
  // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#Cacheability
69
69
  if (cacheControl === "no-store") {
70
70
  if (etagEnabled) {
@@ -871,13 +871,16 @@ export const startServer = async ({
871
871
  onHeadersSent: ({ status, statusText }) => {
872
872
  const statusType = statusToType(status)
873
873
  addRequestLog(requestNode, {
874
- type: {
875
- information: "info",
876
- success: "info",
877
- redirection: "info",
878
- client_error: "warn",
879
- server_error: "error",
880
- }[statusType],
874
+ type:
875
+ status === 404 && request.pathname === "/favicon.ico"
876
+ ? "debug"
877
+ : {
878
+ information: "info",
879
+ success: "info",
880
+ redirection: "info",
881
+ client_error: "warn",
882
+ server_error: "error",
883
+ }[statusType],
881
884
  value: `${colorizeResponseStatus(status)} ${
882
885
  responseProperties.statusMessage || statusText
883
886
  }`,