@node-cli/static-server 2.1.1 → 3.0.1

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/logs.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import type { FastifyPluginAsync } from "fastify";
2
- declare const _default: FastifyPluginAsync<Record<never, never>, import("fastify").RawServerDefault, import("fastify").FastifyTypeProviderDefault>;
2
+ declare const _default: FastifyPluginAsync;
3
3
  export default _default;
@@ -19,7 +19,7 @@ export const renderNotFound = (listDirectories)=>{
19
19
  margin: 0;
20
20
  padding: 20px;
21
21
  }
22
- main {
22
+ header, main {
23
23
  max-width: 900px;
24
24
  }
25
25
  h1 {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/templates/not-found.ts"],"sourcesContent":["export const renderNotFound = (listDirectories: boolean) => {\n\tconst messageHeading = listDirectories\n\t\t? \"Static Server Directory Listing\"\n\t\t: \"Static Server\";\n\tconst messageNotFound = listDirectories\n\t\t? '<div class=\"not-found center\">&nbsp;Page Not Found&nbsp;</div>'\n\t\t: '<div class=\"not-found center\">&nbsp;No \"index\" file found and directory listing is disabled...&nbsp;</div>';\n\n\tconst messageHint = listDirectories\n\t\t? \"\"\n\t\t: '<p class=\"center\">Hint: use the option <code>--dirs</code> to enable directory listing.</p>';\n\treturn `\n<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta content=\"text/html;charset=utf-8\" http-equiv=\"Content-Type\"/>\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\">\n\n <title>Static Server Directory Listing</title>\n\n <style>\n body {\n -webkit-font-smoothing: antialiased;\n font-family: -apple-system, Calibri, \"Helvetica Neue\", sans-serif;\n margin: 0;\n padding: 20px;\n }\n main {\n max-width: 900px;\n }\n h1 {\n color: #000;\n font-size: 18px;\n font-weight: bold;\n margin-top: 0;\n display: flex;\n justify-content: center;\n }\n code {\n font-family: \"SFMono-Regular\", Consolas, \"Liberation Mono\", Menlo, Courier, monospace;\n font-size: 13px;\n background-color: #f7f7f7;\n padding: 2px 4px;\n border-radius: 3px;\n }\n .center {\n display: flex;\n justify-content: center;\n }\n .not-found::before,\n .not-found::after {\n content: url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-emoji-dizzy' viewBox='0 0 16 16'> <path d='M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z'/> <path d='M9.146 5.146a.5.5 0 0 1 .708 0l.646.647.646-.647a.5.5 0 0 1 .708.708l-.647.646.647.646a.5.5 0 0 1-.708.708l-.646-.647-.646.647a.5.5 0 1 1-.708-.708l.647-.646-.647-.646a.5.5 0 0 1 0-.708zm-5 0a.5.5 0 0 1 .708 0l.646.647.646-.647a.5.5 0 1 1 .708.708l-.647.646.647.646a.5.5 0 1 1-.708.708L5.5 7.207l-.646.647a.5.5 0 1 1-.708-.708l.647-.646-.647-.646a.5.5 0 0 1 0-.708zM10 11a2 2 0 1 1-4 0 2 2 0 0 1 4 0z'/> </svg>\");\n }\n </style>\n </head>\n\n <body>\n <header>\n <h1>\n ${messageHeading}\n </h1>\n </header>\n <main>\n ${messageNotFound}\n ${messageHint}\n\t </main>\n </body>\n</html>\n`;\n};\n"],"names":["renderNotFound","listDirectories","messageHeading","messageNotFound","messageHint"],"mappings":"AAAA,OAAO,MAAMA,iBAAiB,CAACC;IAC9B,MAAMC,iBAAiBD,kBACpB,oCACA;IACH,MAAME,kBAAkBF,kBACrB,mEACA;IAEH,MAAMG,cAAcH,kBACjB,KACA;IACH,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAiDD,EAAEC,eAAe;;;;MAInB,EAAEC,gBAAgB;MAClB,EAAEC,YAAY;;;;AAIpB,CAAC;AACD,EAAE"}
1
+ {"version":3,"sources":["../../src/templates/not-found.ts"],"sourcesContent":["export const renderNotFound = (listDirectories: boolean) => {\n\tconst messageHeading = listDirectories\n\t\t? \"Static Server Directory Listing\"\n\t\t: \"Static Server\";\n\tconst messageNotFound = listDirectories\n\t\t? '<div class=\"not-found center\">&nbsp;Page Not Found&nbsp;</div>'\n\t\t: '<div class=\"not-found center\">&nbsp;No \"index\" file found and directory listing is disabled...&nbsp;</div>';\n\n\tconst messageHint = listDirectories\n\t\t? \"\"\n\t\t: '<p class=\"center\">Hint: use the option <code>--dirs</code> to enable directory listing.</p>';\n\treturn `\n<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta content=\"text/html;charset=utf-8\" http-equiv=\"Content-Type\"/>\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\">\n\n <title>Static Server Directory Listing</title>\n\n <style>\n body {\n -webkit-font-smoothing: antialiased;\n font-family: -apple-system, Calibri, \"Helvetica Neue\", sans-serif;\n margin: 0;\n padding: 20px;\n }\n header, main {\n max-width: 900px;\n }\n h1 {\n color: #000;\n font-size: 18px;\n font-weight: bold;\n margin-top: 0;\n display: flex;\n justify-content: center;\n }\n code {\n font-family: \"SFMono-Regular\", Consolas, \"Liberation Mono\", Menlo, Courier, monospace;\n font-size: 13px;\n background-color: #f7f7f7;\n padding: 2px 4px;\n border-radius: 3px;\n }\n .center {\n display: flex;\n justify-content: center;\n }\n .not-found::before,\n .not-found::after {\n content: url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-emoji-dizzy' viewBox='0 0 16 16'> <path d='M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z'/> <path d='M9.146 5.146a.5.5 0 0 1 .708 0l.646.647.646-.647a.5.5 0 0 1 .708.708l-.647.646.647.646a.5.5 0 0 1-.708.708l-.646-.647-.646.647a.5.5 0 1 1-.708-.708l.647-.646-.647-.646a.5.5 0 0 1 0-.708zm-5 0a.5.5 0 0 1 .708 0l.646.647.646-.647a.5.5 0 1 1 .708.708l-.647.646.647.646a.5.5 0 1 1-.708.708L5.5 7.207l-.646.647a.5.5 0 1 1-.708-.708l.647-.646-.647-.646a.5.5 0 0 1 0-.708zM10 11a2 2 0 1 1-4 0 2 2 0 0 1 4 0z'/> </svg>\");\n }\n </style>\n </head>\n\n <body>\n <header>\n <h1>\n ${messageHeading}\n </h1>\n </header>\n <main>\n ${messageNotFound}\n ${messageHint}\n\t </main>\n </body>\n</html>\n`;\n};\n"],"names":["renderNotFound","listDirectories","messageHeading","messageNotFound","messageHint"],"mappings":"AAAA,OAAO,MAAMA,iBAAiB,CAACC;IAC9B,MAAMC,iBAAiBD,kBACpB,oCACA;IACH,MAAME,kBAAkBF,kBACrB,mEACA;IAEH,MAAMG,cAAcH,kBACjB,KACA;IACH,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAiDD,EAAEC,eAAe;;;;MAInB,EAAEC,gBAAgB;MAClB,EAAEC,YAAY;;;;AAIpB,CAAC;AACD,EAAE"}
package/package.json CHANGED
@@ -1,19 +1,17 @@
1
1
  {
2
2
  "name": "@node-cli/static-server",
3
- "version": "2.1.1",
3
+ "version": "3.0.1",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "description": "A simple, zero-configuration, command line HTTP server to serve static files locally",
7
7
  "type": "module",
8
8
  "types": "./dist/index.d.ts",
9
9
  "exports": "./dist/server.js",
10
- "bin": {
11
- "static-server": "dist/server.js"
12
- },
10
+ "bin": "dist/server.js",
13
11
  "files": [
14
12
  "dist"
15
13
  ],
16
- "node": ">=16",
14
+ "node": ">=18",
17
15
  "scripts": {
18
16
  "build": "yarn run clean && yarn run build:types && yarn run build:js&& yarn run build:barrel",
19
17
  "build:barrel": "barrelsby --delete --directory dist --pattern \"**/*.d.ts\" --name \"index.d\"",
@@ -25,21 +23,21 @@
25
23
  },
26
24
  "dependencies": {
27
25
  "@fastify/caching": "8.3.0",
28
- "@fastify/compress": "6.4.0",
29
- "@fastify/cors": "8.3.0",
30
- "@fastify/static": "6.10.2",
31
- "@node-cli/logger": ">=1.2.0",
32
- "@node-cli/parser": ">=2.2.1",
33
- "fastify": "4.20.0",
34
- "fastify-plugin": "4.5.0",
35
- "fs-extra": "11.1.1",
26
+ "@fastify/compress": "6.5.0",
27
+ "@fastify/cors": "8.5.0",
28
+ "@fastify/static": "6.12.0",
29
+ "@node-cli/logger": "1.2.1",
30
+ "@node-cli/parser": "2.2.2",
31
+ "fastify": "4.25.2",
32
+ "fastify-plugin": "4.5.1",
33
+ "fs-extra": "11.2.0",
36
34
  "kleur": "4.1.5",
37
- "open": "9.1.0",
38
- "pino-pretty": "10.0.1",
35
+ "open": "10.0.3",
36
+ "pino-pretty": "10.3.1",
39
37
  "portfinder": "1.0.32"
40
38
  },
41
39
  "publishConfig": {
42
40
  "access": "public"
43
41
  },
44
- "gitHead": "b50d3ef336c6ba247ea5eea568ec5cf6b7da9fd3"
42
+ "gitHead": "14e79a79e03610f47ab1269076315f183d8a3a0e"
45
43
  }