@node-cli/static-server 3.0.7 → 3.1.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/README.md +12 -1
- package/dist/certs.js +53 -43
- package/dist/certs.js.map +1 -1
- package/dist/defaults.d.ts +1 -0
- package/dist/defaults.js +2 -1
- package/dist/defaults.js.map +1 -1
- package/dist/logs.js.map +1 -1
- package/dist/parse.js +1 -0
- package/dist/parse.js.map +1 -1
- package/dist/server.js.map +1 -1
- package/dist/templates/directories.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ At that point, you should be able to visit `http://localhost:8080` and see the f
|
|
|
30
30
|
| `-C` or `--cors` | false | Set CORS headers to \* to allow requests from any origin |
|
|
31
31
|
| `-d` or `--dirs` | true | List the directory's contents |
|
|
32
32
|
| `-h` or `--help` | | Display help instructions |
|
|
33
|
-
| `--host` |
|
|
33
|
+
| `--host` | localhost | Change the default host address to bind to |
|
|
34
34
|
| `-H` or `--http2` | false | Enable HTTP/2 and SSL (https) |
|
|
35
35
|
| `-l` or `--logs` | false | Log HTTP requests at the prompt |
|
|
36
36
|
| `-o` or `--open` | false | Open in your default browser |
|
|
@@ -38,6 +38,17 @@ At that point, you should be able to visit `http://localhost:8080` and see the f
|
|
|
38
38
|
| `-g` or `--gzip` | true | Enable GZIP compression |
|
|
39
39
|
| `-v` or `--version` | | Output the current version |
|
|
40
40
|
|
|
41
|
+
### SSL support
|
|
42
|
+
|
|
43
|
+
SSL support is available by using the `--http2` option. This will enable HTTP/2 and SSL (https). The server will use a self-signed certificate to serve the files. You will be prompted to accept the certificate when you visit the server in your browser.
|
|
44
|
+
|
|
45
|
+
If you have your own local certificates, for example by using [mkcert](https://github.com/FiloSottile/mkcert), simply set the `STATIC_SERVER_CERT` and `STATIC_SERVER_KEY` environment variables to the path of your certificate and key files. In this case, you won't be prompted to accept the certificate.
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
41
51
|
## License
|
|
42
52
|
|
|
43
53
|
MIT © Arno Versini
|
|
54
|
+
```
|
package/dist/certs.js
CHANGED
|
@@ -1,46 +1,56 @@
|
|
|
1
|
-
export const cert = `-----BEGIN CERTIFICATE-----
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
export const cert = process.env.STATIC_SERVER_CERT || `-----BEGIN CERTIFICATE-----
|
|
2
|
+
MIIEYTCCAsmgAwIBAgIQbcPmOds4qUM8hYsd/dfHkTANBgkqhkiG9w0BAQsFADCB
|
|
3
|
+
hzEeMBwGA1UEChMVbWtjZXJ0IGRldmVsb3BtZW50IENBMS4wLAYDVQQLDCVhdmVy
|
|
4
|
+
c2luQEFybm9zTWluaU0yUHJvIChBcm5vIFZlcnNpbmkpMTUwMwYDVQQDDCxta2Nl
|
|
5
|
+
cnQgYXZlcnNpbkBBcm5vc01pbmlNMlBybyAoQXJubyBWZXJzaW5pKTAeFw0yNDA3
|
|
6
|
+
MzExOTIwNThaFw0yNjEwMzExOTIwNThaMFkxJzAlBgNVBAoTHm1rY2VydCBkZXZl
|
|
7
|
+
bG9wbWVudCBjZXJ0aWZpY2F0ZTEuMCwGA1UECwwlYXZlcnNpbkBBcm5vc01pbmlN
|
|
8
|
+
MlBybyAoQXJubyBWZXJzaW5pKTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
|
|
9
|
+
ggEBAKYy6jHWDVs8REwKRskE/c8EBB7pGJDDUYJpeti2oDCiuf3EYV6eqQ9inT4E
|
|
10
|
+
nM9Y7AoMSdLloCPJryyeGy04yWOYmrzIgzW4I5LkT9d0ZmvHAvCvf1IQstFha1W/
|
|
11
|
+
eg6iita6Zqk8u3k1a2r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
17
26
|
-----END CERTIFICATE-----`;
|
|
18
|
-
export const key = `-----BEGIN
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
/
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
27
|
+
export const key = process.env.STATIC_SERVER_KEY || `-----BEGIN PRIVATE KEY-----
|
|
28
|
+
MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCmMuox1g1bPERM
|
|
29
|
+
CkbJBP3PBAQe6RiQw1GCaXrYtqAworn9xGFenqkPYp0+BJzPWOwKDEnS5aAjya8s
|
|
30
|
+
nhstOMljmJq8yIM1uCOS5E/XdGZrxwLwr39SELLRYWtVv3oOoorWumapPLt5NWtq
|
|
31
|
+
wy190pjhyL1flLjc2wqXRz04NB9l8jKzgyQjtkGRbz+z4mDW8bpXGq0Sw3XXX93s
|
|
32
|
+
7qM92IuwZ8nYnuzxG1n+MvQPlHEw8v6IKajahy39DO3pwJX/OZxcPg5A/YHbX39e
|
|
33
|
+
rkh56xCQ0web/vspBDOhPUecjYlqT9jYrTa1I87ZnGa7KXorm468tFNgDHMFsZuh
|
|
34
|
+
zg+8Aq3bAgMBAAECggEAdK6MQ17PU711CZmxZpHtizh7mCP4TjICeLeLOrjEsECe
|
|
35
|
+
qa4E2kQz1wxZ7t+YI+5/EPLdpYX3Lwj6xi1eURpsMVNDV8TCcaWMvCU0dMRQ39wB
|
|
36
|
+
kW70yW3VzTBDBhl/HOU66lRFnQ15ZTh+6J6MwqhnEyU25vLn8o6J2fl23o2heZU2
|
|
37
|
+
EPIe8J1RGqv6LFGKie1J6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GCDeolXHBlGfZIwD8TmwZchvQ38Ws4D
|
|
52
|
+
JSoELXIEchzgTO89uFqqlicwujR/e6iIePWxOqDwCud6GTPBcgDDg6VD6Jb0focU
|
|
53
|
+
dPRjMfFro+OcUKCVONUd1w==
|
|
54
|
+
-----END PRIVATE KEY-----`;
|
|
45
55
|
|
|
46
56
|
//# sourceMappingURL=certs.js.map
|
package/dist/certs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/certs.ts"],"sourcesContent":["export const cert: string
|
|
1
|
+
{"version":3,"sources":["../src/certs.ts"],"sourcesContent":["export const cert: string =\n\tprocess.env.STATIC_SERVER_CERT ||\n\t`-----BEGIN CERTIFICATE-----\nMIIEYTCCAsmgAwIBAgIQbcPmOds4qUM8hYsd/dfHkTANBgkqhkiG9w0BAQsFADCB\nhzEeMBwGA1UEChMVbWtjZXJ0IGRldmVsb3BtZW50IENBMS4wLAYDVQQLDCVhdmVy\nc2luQEFybm9zTWluaU0yUHJvIChBcm5vIFZlcnNpbmkpMTUwMwYDVQQDDCxta2Nl\ncnQgYXZlcnNpbkBBcm5vc01pbmlNMlBybyAoQXJubyBWZXJzaW5pKTAeFw0yNDA3\nMzExOTIwNThaFw0yNjEwMzExOTIwNThaMFkxJzAlBgNVBAoTHm1rY2VydCBkZXZl\nbG9wbWVudCBjZXJ0aWZpY2F0ZTEuMCwGA1UECwwlYXZlcnNpbkBBcm5vc01pbmlN\nMlBybyAoQXJubyBWZXJzaW5pKTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC\nggEBAKYy6jHWDVs8REwKRskE/c8EBB7pGJDDUYJpeti2oDCiuf3EYV6eqQ9inT4E\nnM9Y7AoMSdLloCPJryyeGy04yWOYmrzIgzW4I5LkT9d0ZmvHAvCvf1IQstFha1W/\neg6iita6Zqk8u3k1a2rDLX3SmOHIvV+UuNzbCpdHPTg0H2XyMrODJCO2QZFvP7Pi\nYNbxulcarRLDdddf3ezuoz3Yi7Bnydie7PEbWf4y9A+UcTDy/ogpqNqHLf0M7enA\nlf85nFw+DkD9gdtff16uSHnrEJDTB5v++ykEM6E9R5yNiWpP2NitNrUjztmcZrsp\neiubjry0U2AMcwWxm6HOD7wCrdsCAwEAAaN2MHQwDgYDVR0PAQH/BAQDAgWgMBMG\nA1UdJQQMMAoGCCsGAQUFBwMBMB8GA1UdIwQYMBaAFNGZOHUGXP/O2LP4APhNjJHm\ngGRcMCwGA1UdEQQlMCOCCWxvY2FsaG9zdIcEfwAAAYcQAAAAAAAAAAAAAAAAAAAA\nATANBgkqhkiG9w0BAQsFAAOCAYEAkCSqwwW/DuW4vatW9AdSSjLS2ZSgH/E2/ucc\n+OCrikJ6fBCiIWuBK0x+7ohn+9ycUBATQKpBb7gXJch73bbg/1d34I5V830IpJSa\nqph/tzIL6OC3B5idhlzFOm8a16Ws19//B7fbyiZIC2ZkTTnrGsrxqel3f2pZ/kDA\nKqs63mcf8nDyXC7vNJ7VgaJddjbXXW5NjzCfSANSIJCWGhlHnNbrccB3PcBcDF3d\nrQg/Uyn1UJXdJYosy9prLF0JGsbfsHyLovWtNkLBalwQ1vqwdbhCxLX3rwHptPeL\nmNnOe3OkB0rwjOMtvzPhcsfJkdYGqnOkoGoczwoWm3e7aCxxppHrK99xPVv6QCKU\ny67Sj58USr4li0c+B12kd0aDnqv5Cd0T2Iw4mZpn9pAlL1OZEWi7HGDxX774AoBi\noSEc04UQD5kHXCQGYxj3IeoxZPbN5N8Si+tERU9hZSVJDjlnVfKC/OLav5BBhwW/\nSHypD9QyZXPX9dAIWZXp8KJnHGc5\n-----END CERTIFICATE-----`;\n\nexport const key: string =\n\tprocess.env.STATIC_SERVER_KEY ||\n\t`-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCmMuox1g1bPERM\nCkbJBP3PBAQe6RiQw1GCaXrYtqAworn9xGFenqkPYp0+BJzPWOwKDEnS5aAjya8s\nnhstOM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LCX8s1lTvX1eL0YnMx9KF4UZJCiV\nzFiyTg66CqgDZIjgeMMF5uiFpcfR7/gFpRiWA1b4Zksp2yoqhmWkcPlXAoGAcRHn\nfTxwUCgldTRCbV7wIOSwXi+IemG01/rAW8wZm4x9Y/4tHIzAZlT5Wm9dLeo03vdr\nOL4B8AfS4Oynoa9pri3llRu1ZwJ31ZG84E8AkZKBVlMZo8MS/jSNQhOFDuDexIup\nb5NzyyChhYJe8EO21NF6lGKm4FXDuz0ga0XUHqkCgYA1HJQaFG1aeQgD7qBcg8Kc\nqn+uYbaK5Ksji60eZWXnLGZmw2prAN1O4GCDeolXHBlGfZIwD8TmwZchvQ38Ws4D\nJSoELXIEchzgTO89uFqqlicwujR/e6iIePWxOqDwCud6GTPBcgDDg6VD6Jb0focU\ndPRjMfFro+OcUKCVONUd1w==\n-----END PRIVATE KEY-----`;\n"],"names":["cert","process","env","STATIC_SERVER_CERT","key","STATIC_SERVER_KEY"],"mappings":"AAAA,OAAO,MAAMA,OACZC,QAAQC,GAAG,CAACC,kBAAkB,IAC9B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;yBAyBuB,CAAC,CAAC;AAE3B,OAAO,MAAMC,MACZH,QAAQC,GAAG,CAACG,iBAAiB,IAC7B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;yBA2BuB,CAAC,CAAC"}
|
package/dist/defaults.d.ts
CHANGED
package/dist/defaults.js
CHANGED
package/dist/defaults.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/defaults.ts"],"sourcesContent":["export const defaultFlags = {\n\tcache: 0,\n\tcors: false,\n\tdirs: true,\n\tgzip: true,\n\thttp2: false,\n\tlogs: false,\n\topen: false,\n\tport: 8080,\n};\n\nexport const defaultParameters = {\n\t\"0\": `${process.cwd()}/`,\n};\n"],"names":["defaultFlags","cache","cors","dirs","gzip","http2","logs","open","port","defaultParameters","process","cwd"],"mappings":"AAAA,OAAO,MAAMA,eAAe;IAC3BC,OAAO;IACPC,MAAM;IACNC,MAAM;IACNC,MAAM;IACNC,OAAO;IACPC,MAAM;IACNC,MAAM;IACNC,MAAM;AACP,EAAE;AAEF,OAAO,MAAMC,oBAAoB;IAChC,KAAK,
|
|
1
|
+
{"version":3,"sources":["../src/defaults.ts"],"sourcesContent":["export const defaultFlags = {\n\tcache: 0,\n\tcors: false,\n\tdirs: true,\n\tgzip: true,\n\thttp2: false,\n\tlogs: false,\n\topen: false,\n\tport: 8080,\n\thost: \"localhost\",\n};\n\nexport const defaultParameters = {\n\t\"0\": `${process.cwd()}/`,\n};\n"],"names":["defaultFlags","cache","cors","dirs","gzip","http2","logs","open","port","host","defaultParameters","process","cwd"],"mappings":"AAAA,OAAO,MAAMA,eAAe;IAC3BC,OAAO;IACPC,MAAM;IACNC,MAAM;IACNC,MAAM;IACNC,OAAO;IACPC,MAAM;IACNC,MAAM;IACNC,MAAM;IACNC,MAAM;AACP,EAAE;AAEF,OAAO,MAAMC,oBAAoB;IAChC,KAAK,GAAGC,QAAQC,GAAG,GAAG,CAAC,CAAC;AACzB,EAAE"}
|
package/dist/logs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/logs.ts"],"sourcesContent":["import type { FastifyPluginAsync } from \"fastify\";\nimport fastifyPlugin from \"fastify-plugin\";\nimport kleur from \"kleur\";\n\nconst plugin: FastifyPluginAsync = async (fastify): Promise<void> => {\n\tfastify.addHook(\"onResponse\", async (request, reply) => {\n\t\trequest.log.info(\n\t\t\tkleur.cyan(`${request.method} ${request.url} ${reply.statusCode}`),\n\t\t);\n\t});\n};\n\nexport default fastifyPlugin(plugin, {\n\tfastify: \"4.x\",\n\tname: \"fastify-simple-logger\",\n});\n"],"names":["fastifyPlugin","kleur","plugin","fastify","addHook","request","reply","log","info","cyan","method","url","statusCode","name"],"mappings":"AACA,OAAOA,mBAAmB,iBAAiB;AAC3C,OAAOC,WAAW,QAAQ;AAE1B,MAAMC,SAA6B,OAAOC;IACzCA,QAAQC,OAAO,CAAC,cAAc,OAAOC,SAASC;QAC7CD,QAAQE,GAAG,CAACC,IAAI,CACfP,MAAMQ,IAAI,CAAC,
|
|
1
|
+
{"version":3,"sources":["../src/logs.ts"],"sourcesContent":["import type { FastifyPluginAsync } from \"fastify\";\nimport fastifyPlugin from \"fastify-plugin\";\nimport kleur from \"kleur\";\n\nconst plugin: FastifyPluginAsync = async (fastify): Promise<void> => {\n\tfastify.addHook(\"onResponse\", async (request, reply) => {\n\t\trequest.log.info(\n\t\t\tkleur.cyan(`${request.method} ${request.url} ${reply.statusCode}`),\n\t\t);\n\t});\n};\n\nexport default fastifyPlugin(plugin, {\n\tfastify: \"4.x\",\n\tname: \"fastify-simple-logger\",\n});\n"],"names":["fastifyPlugin","kleur","plugin","fastify","addHook","request","reply","log","info","cyan","method","url","statusCode","name"],"mappings":"AACA,OAAOA,mBAAmB,iBAAiB;AAC3C,OAAOC,WAAW,QAAQ;AAE1B,MAAMC,SAA6B,OAAOC;IACzCA,QAAQC,OAAO,CAAC,cAAc,OAAOC,SAASC;QAC7CD,QAAQE,GAAG,CAACC,IAAI,CACfP,MAAMQ,IAAI,CAAC,GAAGJ,QAAQK,MAAM,CAAC,CAAC,EAAEL,QAAQM,GAAG,CAAC,CAAC,EAAEL,MAAMM,UAAU,EAAE;IAEnE;AACD;AAEA,eAAeZ,cAAcE,QAAQ;IACpCC,SAAS;IACTU,MAAM;AACP,GAAG"}
|
package/dist/parse.js
CHANGED
package/dist/parse.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/parse.ts"],"sourcesContent":["import { defaultFlags, defaultParameters } from \"./defaults.js\";\n\nimport { parser } from \"@node-cli/parser\";\n\nexport type Flags = {\n\tcache?: number;\n\tcors?: boolean;\n\tdirs?: boolean;\n\tgzip?: boolean;\n\thttp2?: boolean;\n\tlogs?: boolean;\n\topen?: boolean;\n\tport?: number;\n\thost?: string;\n};\n\nexport type Parameters = {\n\tpath?: string;\n};\n\nexport type Configuration = {\n\tflags?: Flags;\n\tparameters?: Parameters;\n\tusage?: boolean;\n\texamples?: string;\n};\n\nexport const config: Configuration = parser({\n\tmeta: import.meta,\n\tflags: {\n\t\thost: {\n\t\t\tdescription: \"Host to listen on\",\n\t\t\ttype: \"string\",\n\t\t},\n\t\tcache: {\n\t\t\tshortFlag: \"c\",\n\t\t\tdefault: defaultFlags.cache,\n\t\t\tdescription: \"Time in seconds for caching files\",\n\t\t\ttype: \"number\",\n\t\t},\n\t\tcors: {\n\t\t\tshortFlag: \"C\",\n\t\t\tdefault: defaultFlags.cors,\n\t\t\tdescription: \"Set CORS headers to * to allow requests from any origin\",\n\t\t\ttype: \"boolean\",\n\t\t},\n\t\tdirs: {\n\t\t\tshortFlag: \"d\",\n\t\t\tdefault: defaultFlags.dirs,\n\t\t\tdescription: \"List the directory's contents\",\n\t\t\ttype: \"boolean\",\n\t\t},\n\t\tgzip: {\n\t\t\tshortFlag: \"g\",\n\t\t\tdefault: defaultFlags.gzip,\n\t\t\tdescription: \"Enable GZIP compression\",\n\t\t\ttype: \"boolean\",\n\t\t},\n\t\thelp: {\n\t\t\tshortFlag: \"h\",\n\t\t\tdescription: \"Display help instructions\",\n\t\t\ttype: \"boolean\",\n\t\t},\n\t\thttp2: {\n\t\t\tshortFlag: \"H\",\n\t\t\tdefault: defaultFlags.http2,\n\t\t\tdescription: \"Use HTTP/2 and SSL (local certificate provided)\",\n\t\t\ttype: \"boolean\",\n\t\t},\n\t\tlogs: {\n\t\t\tshortFlag: \"l\",\n\t\t\tdefault: defaultFlags.logs,\n\t\t\tdescription: \"Log HTTP requests at the prompt\",\n\t\t\ttype: \"boolean\",\n\t\t},\n\t\topen: {\n\t\t\tshortFlag: \"o\",\n\t\t\tdefault: defaultFlags.open,\n\t\t\tdescription: \"Open in your default browser\",\n\t\t\ttype: \"boolean\",\n\t\t},\n\t\tport: {\n\t\t\tshortFlag: \"p\",\n\t\t\tdefault: defaultFlags.port,\n\t\t\tdescription: \"Port to listen on\",\n\t\t\ttype: \"number\",\n\t\t},\n\t\tversion: {\n\t\t\tshortFlag: \"v\",\n\t\t\tdescription: \"Output the current version\",\n\t\t\ttype: \"boolean\",\n\t\t},\n\t},\n\tparameters: {\n\t\tpath: {\n\t\t\tdefault: \"current folder\",\n\t\t\tdescription: \"the path to serve files from\",\n\t\t},\n\t},\n\tusage: true,\n\tdefaultFlags,\n\tdefaultParameters,\n});\n"],"names":["defaultFlags","defaultParameters","parser","config","meta","flags","host","description","type","cache","shortFlag","
|
|
1
|
+
{"version":3,"sources":["../src/parse.ts"],"sourcesContent":["import { defaultFlags, defaultParameters } from \"./defaults.js\";\n\nimport { parser } from \"@node-cli/parser\";\n\nexport type Flags = {\n\tcache?: number;\n\tcors?: boolean;\n\tdirs?: boolean;\n\tgzip?: boolean;\n\thttp2?: boolean;\n\tlogs?: boolean;\n\topen?: boolean;\n\tport?: number;\n\thost?: string;\n};\n\nexport type Parameters = {\n\tpath?: string;\n};\n\nexport type Configuration = {\n\tflags?: Flags;\n\tparameters?: Parameters;\n\tusage?: boolean;\n\texamples?: string;\n};\n\nexport const config: Configuration = parser({\n\tmeta: import.meta,\n\tflags: {\n\t\thost: {\n\t\t\tdefault: defaultFlags.host,\n\t\t\tdescription: \"Host to listen on\",\n\t\t\ttype: \"string\",\n\t\t},\n\t\tcache: {\n\t\t\tshortFlag: \"c\",\n\t\t\tdefault: defaultFlags.cache,\n\t\t\tdescription: \"Time in seconds for caching files\",\n\t\t\ttype: \"number\",\n\t\t},\n\t\tcors: {\n\t\t\tshortFlag: \"C\",\n\t\t\tdefault: defaultFlags.cors,\n\t\t\tdescription: \"Set CORS headers to * to allow requests from any origin\",\n\t\t\ttype: \"boolean\",\n\t\t},\n\t\tdirs: {\n\t\t\tshortFlag: \"d\",\n\t\t\tdefault: defaultFlags.dirs,\n\t\t\tdescription: \"List the directory's contents\",\n\t\t\ttype: \"boolean\",\n\t\t},\n\t\tgzip: {\n\t\t\tshortFlag: \"g\",\n\t\t\tdefault: defaultFlags.gzip,\n\t\t\tdescription: \"Enable GZIP compression\",\n\t\t\ttype: \"boolean\",\n\t\t},\n\t\thelp: {\n\t\t\tshortFlag: \"h\",\n\t\t\tdescription: \"Display help instructions\",\n\t\t\ttype: \"boolean\",\n\t\t},\n\t\thttp2: {\n\t\t\tshortFlag: \"H\",\n\t\t\tdefault: defaultFlags.http2,\n\t\t\tdescription: \"Use HTTP/2 and SSL (local certificate provided)\",\n\t\t\ttype: \"boolean\",\n\t\t},\n\t\tlogs: {\n\t\t\tshortFlag: \"l\",\n\t\t\tdefault: defaultFlags.logs,\n\t\t\tdescription: \"Log HTTP requests at the prompt\",\n\t\t\ttype: \"boolean\",\n\t\t},\n\t\topen: {\n\t\t\tshortFlag: \"o\",\n\t\t\tdefault: defaultFlags.open,\n\t\t\tdescription: \"Open in your default browser\",\n\t\t\ttype: \"boolean\",\n\t\t},\n\t\tport: {\n\t\t\tshortFlag: \"p\",\n\t\t\tdefault: defaultFlags.port,\n\t\t\tdescription: \"Port to listen on\",\n\t\t\ttype: \"number\",\n\t\t},\n\t\tversion: {\n\t\t\tshortFlag: \"v\",\n\t\t\tdescription: \"Output the current version\",\n\t\t\ttype: \"boolean\",\n\t\t},\n\t},\n\tparameters: {\n\t\tpath: {\n\t\t\tdefault: \"current folder\",\n\t\t\tdescription: \"the path to serve files from\",\n\t\t},\n\t},\n\tusage: true,\n\tdefaultFlags,\n\tdefaultParameters,\n});\n"],"names":["defaultFlags","defaultParameters","parser","config","meta","flags","host","default","description","type","cache","shortFlag","cors","dirs","gzip","help","http2","logs","open","port","version","parameters","path","usage"],"mappings":"AAAA,SAASA,YAAY,EAAEC,iBAAiB,QAAQ,gBAAgB;AAEhE,SAASC,MAAM,QAAQ,mBAAmB;AAyB1C,OAAO,MAAMC,SAAwBD,OAAO;IAC3CE,MAAM;IACNC,OAAO;QACNC,MAAM;YACLC,SAASP,aAAaM,IAAI;YAC1BE,aAAa;YACbC,MAAM;QACP;QACAC,OAAO;YACNC,WAAW;YACXJ,SAASP,aAAaU,KAAK;YAC3BF,aAAa;YACbC,MAAM;QACP;QACAG,MAAM;YACLD,WAAW;YACXJ,SAASP,aAAaY,IAAI;YAC1BJ,aAAa;YACbC,MAAM;QACP;QACAI,MAAM;YACLF,WAAW;YACXJ,SAASP,aAAaa,IAAI;YAC1BL,aAAa;YACbC,MAAM;QACP;QACAK,MAAM;YACLH,WAAW;YACXJ,SAASP,aAAac,IAAI;YAC1BN,aAAa;YACbC,MAAM;QACP;QACAM,MAAM;YACLJ,WAAW;YACXH,aAAa;YACbC,MAAM;QACP;QACAO,OAAO;YACNL,WAAW;YACXJ,SAASP,aAAagB,KAAK;YAC3BR,aAAa;YACbC,MAAM;QACP;QACAQ,MAAM;YACLN,WAAW;YACXJ,SAASP,aAAaiB,IAAI;YAC1BT,aAAa;YACbC,MAAM;QACP;QACAS,MAAM;YACLP,WAAW;YACXJ,SAASP,aAAakB,IAAI;YAC1BV,aAAa;YACbC,MAAM;QACP;QACAU,MAAM;YACLR,WAAW;YACXJ,SAASP,aAAamB,IAAI;YAC1BX,aAAa;YACbC,MAAM;QACP;QACAW,SAAS;YACRT,WAAW;YACXH,aAAa;YACbC,MAAM;QACP;IACD;IACAY,YAAY;QACXC,MAAM;YACLf,SAAS;YACTC,aAAa;QACd;IACD;IACAe,OAAO;IACPvB;IACAC;AACD,GAAG"}
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/server.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport fastifyStatic, { FastifyStaticOptions } from \"@fastify/static\";\nimport { cert, key } from \"./certs.js\";\n\nimport path from \"node:path\";\nimport fastifyCache from \"@fastify/caching\";\nimport fastifyCompress from \"@fastify/compress\";\nimport fastifyCors from \"@fastify/cors\";\nimport { Logger } from \"@node-cli/logger\";\nimport Fastify from \"fastify\";\nimport fs from \"fs-extra\";\nimport kleur from \"kleur\";\nimport open from \"open\";\nimport portfinder from \"portfinder\";\nimport fastifyLogs from \"./logs.js\";\nimport { config } from \"./parse.js\";\nimport { renderDirectories } from \"./templates/directories.js\";\nimport { renderNotFound } from \"./templates/not-found.js\";\n\nexport const logger = new Logger({\n\tboring: process.env.NODE_ENV === \"test\",\n});\n\nlet customPath = config.parameters[0];\nif (fs.pathExistsSync(customPath)) {\n\tcustomPath = path.resolve(customPath);\n} else {\n\tlogger.printErrorsAndExit([`Folder ${customPath} does not exist!`], 0);\n}\n\nconst fastifyOptions: {\n\tdisableRequestLogging?: boolean;\n\thttp2?: boolean;\n\thttps?: any;\n\tlogger?: any;\n} = {\n\tdisableRequestLogging: true,\n};\n\nif (config.flags.logs) {\n\tfastifyOptions.logger = {\n\t\tlevel: \"info\",\n\t\ttransport: {\n\t\t\ttarget: \"pino-pretty\",\n\t\t\toptions: {\n\t\t\t\thideObject: true,\n\t\t\t\ttranslateTime: \"SYS:standard\",\n\t\t\t\tignore: \"pid,hostname,reqId,resTime,resTimeMs,level\",\n\t\t\t},\n\t\t},\n\t};\n}\n\nif (config.flags.http2) {\n\tfastifyOptions.http2 = true;\n\tfastifyOptions.https = { key, cert };\n}\n\nconst fastify = Fastify(fastifyOptions);\n\nif (config.flags.logs) {\n\tfastify.register(fastifyLogs);\n}\n\nif (config.flags.gzip) {\n\tfastify.register(fastifyCompress, {\n\t\tglobal: true,\n\t\tencodings: [\"gzip\", \"deflate\", \"br\", \"identity\"],\n\t});\n}\n\nif (config.flags.cors) {\n\tfastify.register(fastifyCors);\n}\n\nconst fastifyCacheOptions: {\n\texpiresIn?: number;\n\tserverExpiresIn?: number;\n\tprivacy?: any;\n} = {};\n\nif (config.flags.cache > 0) {\n\tfastifyCacheOptions.expiresIn = config.flags.cache;\n\tfastifyCacheOptions.serverExpiresIn = config.flags.cache;\n\tfastifyCacheOptions.privacy = \"public\";\n} else {\n\tfastifyCacheOptions.privacy = \"no-cache\";\n}\n\nfastify.register(fastifyCache, fastifyCacheOptions);\n\nconst staticOptions: FastifyStaticOptions = {\n\troot: customPath,\n};\nif (config.flags.dirs) {\n\tstaticOptions.list = {\n\t\tformat: \"html\",\n\t\trender: renderDirectories,\n\t};\n}\nfastify.register(fastifyStatic, staticOptions);\n\nfastify.setNotFoundHandler((_request, reply) => {\n\treply.code(404).type(\"text/html\").send(renderNotFound(config.flags.dirs));\n});\n\n/**\n * Run the server!\n */\nlet port: number,\n\taddress: string,\n\tportMessage = \"\";\nconst start = async () => {\n\ttry {\n\t\tport = await portfinder.getPortPromise({ port: Number(config.flags.port) });\n\t\tif (port !== config.flags.port) {\n\t\t\tportMessage = `\\n\\n${kleur.yellow(\n\t\t\t\t`Warning: port ${config.flags.port} was not available!`,\n\t\t\t)}`;\n\t\t\tconfig.flags.port = port;\n\t\t}\n\t\tconst listenOptions: { port?: number; host?: string } = {\n\t\t\tport: config.flags.port,\n\t\t};\n\t\tif (config.flags.host) {\n\t\t\tlistenOptions.host = config.flags.host;\n\t\t\taddress = config.flags.host;\n\t\t} else {\n\t\t\taddress = \"localhost\";\n\t\t}\n\t\tawait fastify.listen(listenOptions);\n\n\t\tconst url = `${config.flags.http2 ? \"https\" : \"http\"}://${address}:${\n\t\t\tconfig.flags.port\n\t\t}`;\n\t\tconst messages = [\n\t\t\t`${kleur.cyan(\"Static Server\")} is up and running!`,\n\t\t\t\"\",\n\t\t\t`${kleur.cyan(url)}`,\n\t\t\t\"\",\n\t\t\t`Hit CTRL+C to shut it down.${portMessage}`,\n\t\t];\n\n\t\tlogger.printBox(messages, { newLineAfter: false });\n\n\t\tif (config.flags.open) {\n\t\t\tawait open(url, {\n\t\t\t\twait: false,\n\t\t\t});\n\t\t}\n\t} catch (error) {\n\t\tfastify.log.error(error);\n\t\t// eslint-disable-next-line unicorn/no-process-exit\n\t\tprocess.exit(1);\n\t}\n};\nstart();\n"],"names":["fastifyStatic","cert","key","path","fastifyCache","fastifyCompress","fastifyCors","Logger","Fastify","fs","kleur","open","portfinder","fastifyLogs","config","renderDirectories","renderNotFound","logger","boring","process","env","NODE_ENV","customPath","parameters","pathExistsSync","resolve","printErrorsAndExit","fastifyOptions","disableRequestLogging","flags","logs","level","transport","target","options","hideObject","translateTime","ignore","http2","https","fastify","register","gzip","global","encodings","cors","fastifyCacheOptions","cache","expiresIn","serverExpiresIn","privacy","staticOptions","root","dirs","list","format","render","setNotFoundHandler","_request","reply","code","type","send","port","address","portMessage","start","getPortPromise","Number","yellow","listenOptions","host","listen","url","messages","cyan","printBox","newLineAfter","wait","error","log","exit"],"mappings":";AAEA,OAAOA,mBAA6C,kBAAkB;AACtE,SAASC,IAAI,EAAEC,GAAG,QAAQ,aAAa;AAEvC,OAAOC,UAAU,YAAY;AAC7B,OAAOC,kBAAkB,mBAAmB;AAC5C,OAAOC,qBAAqB,oBAAoB;AAChD,OAAOC,iBAAiB,gBAAgB;AACxC,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,aAAa,UAAU;AAC9B,OAAOC,QAAQ,WAAW;AAC1B,OAAOC,WAAW,QAAQ;AAC1B,OAAOC,UAAU,OAAO;AACxB,OAAOC,gBAAgB,aAAa;AACpC,OAAOC,iBAAiB,YAAY;AACpC,SAASC,MAAM,QAAQ,aAAa;AACpC,SAASC,iBAAiB,QAAQ,6BAA6B;AAC/D,SAASC,cAAc,QAAQ,2BAA2B;AAE1D,OAAO,MAAMC,SAAS,IAAIV,OAAO;IAChCW,QAAQC,QAAQC,GAAG,CAACC,QAAQ,KAAK;AAClC,GAAG;AAEH,IAAIC,aAAaR,OAAOS,UAAU,CAAC,EAAE;AACrC,IAAId,GAAGe,cAAc,CAACF,aAAa;IAClCA,aAAanB,KAAKsB,OAAO,CAACH;AAC3B,OAAO;IACNL,OAAOS,kBAAkB,CAAC;QAAC,CAAC,OAAO,EAAEJ,WAAW,gBAAgB,CAAC;KAAC,EAAE;AACrE;AAEA,MAAMK,iBAKF;IACHC,uBAAuB;AACxB;AAEA,IAAId,OAAOe,KAAK,CAACC,IAAI,EAAE;IACt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,KAAK,CAACwB,IAAI;AACxE;AAEA;;CAEC,GACD,IAAIU,MACHC,SACAC,cAAc;AACf,MAAMC,QAAQ;IACb,IAAI;QACHH,OAAO,MAAMnD,WAAWuD,cAAc,CAAC;YAAEJ,MAAMK,OAAOtD,OAAOe,KAAK,CAACkC,IAAI;QAAE;QACzE,IAAIA,SAASjD,OAAOe,KAAK,CAACkC,IAAI,EAAE;YAC/BE,cAAc,CAAC,IAAI,EAAEvD,MAAM2D,MAAM,CAChC,CAAC,cAAc,EAAEvD,OAAOe,KAAK,CAACkC,IAAI,CAAC,mBAAmB,CAAC,
|
|
1
|
+
{"version":3,"sources":["../src/server.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport fastifyStatic, { FastifyStaticOptions } from \"@fastify/static\";\nimport { cert, key } from \"./certs.js\";\n\nimport path from \"node:path\";\nimport fastifyCache from \"@fastify/caching\";\nimport fastifyCompress from \"@fastify/compress\";\nimport fastifyCors from \"@fastify/cors\";\nimport { Logger } from \"@node-cli/logger\";\nimport Fastify from \"fastify\";\nimport fs from \"fs-extra\";\nimport kleur from \"kleur\";\nimport open from \"open\";\nimport portfinder from \"portfinder\";\nimport fastifyLogs from \"./logs.js\";\nimport { config } from \"./parse.js\";\nimport { renderDirectories } from \"./templates/directories.js\";\nimport { renderNotFound } from \"./templates/not-found.js\";\n\nexport const logger = new Logger({\n\tboring: process.env.NODE_ENV === \"test\",\n});\n\nlet customPath = config.parameters[0];\nif (fs.pathExistsSync(customPath)) {\n\tcustomPath = path.resolve(customPath);\n} else {\n\tlogger.printErrorsAndExit([`Folder ${customPath} does not exist!`], 0);\n}\n\nconst fastifyOptions: {\n\tdisableRequestLogging?: boolean;\n\thttp2?: boolean;\n\thttps?: any;\n\tlogger?: any;\n} = {\n\tdisableRequestLogging: true,\n};\n\nif (config.flags.logs) {\n\tfastifyOptions.logger = {\n\t\tlevel: \"info\",\n\t\ttransport: {\n\t\t\ttarget: \"pino-pretty\",\n\t\t\toptions: {\n\t\t\t\thideObject: true,\n\t\t\t\ttranslateTime: \"SYS:standard\",\n\t\t\t\tignore: \"pid,hostname,reqId,resTime,resTimeMs,level\",\n\t\t\t},\n\t\t},\n\t};\n}\n\nif (config.flags.http2) {\n\tfastifyOptions.http2 = true;\n\tfastifyOptions.https = { key, cert };\n}\n\nconst fastify = Fastify(fastifyOptions);\n\nif (config.flags.logs) {\n\tfastify.register(fastifyLogs);\n}\n\nif (config.flags.gzip) {\n\tfastify.register(fastifyCompress, {\n\t\tglobal: true,\n\t\tencodings: [\"gzip\", \"deflate\", \"br\", \"identity\"],\n\t});\n}\n\nif (config.flags.cors) {\n\tfastify.register(fastifyCors);\n}\n\nconst fastifyCacheOptions: {\n\texpiresIn?: number;\n\tserverExpiresIn?: number;\n\tprivacy?: any;\n} = {};\n\nif (config.flags.cache > 0) {\n\tfastifyCacheOptions.expiresIn = config.flags.cache;\n\tfastifyCacheOptions.serverExpiresIn = config.flags.cache;\n\tfastifyCacheOptions.privacy = \"public\";\n} else {\n\tfastifyCacheOptions.privacy = \"no-cache\";\n}\n\nfastify.register(fastifyCache, fastifyCacheOptions);\n\nconst staticOptions: FastifyStaticOptions = {\n\troot: customPath,\n};\nif (config.flags.dirs) {\n\tstaticOptions.list = {\n\t\tformat: \"html\",\n\t\trender: renderDirectories,\n\t};\n}\nfastify.register(fastifyStatic, staticOptions);\n\nfastify.setNotFoundHandler((_request, reply) => {\n\treply.code(404).type(\"text/html\").send(renderNotFound(config.flags.dirs));\n});\n\n/**\n * Run the server!\n */\nlet port: number,\n\taddress: string,\n\tportMessage = \"\";\nconst start = async () => {\n\ttry {\n\t\tport = await portfinder.getPortPromise({ port: Number(config.flags.port) });\n\t\tif (port !== config.flags.port) {\n\t\t\tportMessage = `\\n\\n${kleur.yellow(\n\t\t\t\t`Warning: port ${config.flags.port} was not available!`,\n\t\t\t)}`;\n\t\t\tconfig.flags.port = port;\n\t\t}\n\t\tconst listenOptions: { port?: number; host?: string } = {\n\t\t\tport: config.flags.port,\n\t\t};\n\t\tif (config.flags.host) {\n\t\t\tlistenOptions.host = config.flags.host;\n\t\t\taddress = config.flags.host;\n\t\t} else {\n\t\t\taddress = \"localhost\";\n\t\t}\n\t\tawait fastify.listen(listenOptions);\n\n\t\tconst url = `${config.flags.http2 ? \"https\" : \"http\"}://${address}:${\n\t\t\tconfig.flags.port\n\t\t}`;\n\t\tconst messages = [\n\t\t\t`${kleur.cyan(\"Static Server\")} is up and running!`,\n\t\t\t\"\",\n\t\t\t`${kleur.cyan(url)}`,\n\t\t\t\"\",\n\t\t\t`Hit CTRL+C to shut it down.${portMessage}`,\n\t\t];\n\n\t\tlogger.printBox(messages, { newLineAfter: false });\n\n\t\tif (config.flags.open) {\n\t\t\tawait open(url, {\n\t\t\t\twait: false,\n\t\t\t});\n\t\t}\n\t} catch (error) {\n\t\tfastify.log.error(error);\n\t\t// eslint-disable-next-line unicorn/no-process-exit\n\t\tprocess.exit(1);\n\t}\n};\nstart();\n"],"names":["fastifyStatic","cert","key","path","fastifyCache","fastifyCompress","fastifyCors","Logger","Fastify","fs","kleur","open","portfinder","fastifyLogs","config","renderDirectories","renderNotFound","logger","boring","process","env","NODE_ENV","customPath","parameters","pathExistsSync","resolve","printErrorsAndExit","fastifyOptions","disableRequestLogging","flags","logs","level","transport","target","options","hideObject","translateTime","ignore","http2","https","fastify","register","gzip","global","encodings","cors","fastifyCacheOptions","cache","expiresIn","serverExpiresIn","privacy","staticOptions","root","dirs","list","format","render","setNotFoundHandler","_request","reply","code","type","send","port","address","portMessage","start","getPortPromise","Number","yellow","listenOptions","host","listen","url","messages","cyan","printBox","newLineAfter","wait","error","log","exit"],"mappings":";AAEA,OAAOA,mBAA6C,kBAAkB;AACtE,SAASC,IAAI,EAAEC,GAAG,QAAQ,aAAa;AAEvC,OAAOC,UAAU,YAAY;AAC7B,OAAOC,kBAAkB,mBAAmB;AAC5C,OAAOC,qBAAqB,oBAAoB;AAChD,OAAOC,iBAAiB,gBAAgB;AACxC,SAASC,MAAM,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;YACtBD,cAAcC,IAAI,GAAGzD,OAAOe,KAAK,CAAC0C,IAAI;YACtCP,UAAUlD,OAAOe,KAAK,CAAC0C,IAAI;QAC5B,OAAO;YACNP,UAAU;QACX;QACA,MAAMxB,QAAQgC,MAAM,CAACF;QAErB,MAAMG,MAAM,GAAG3D,OAAOe,KAAK,CAACS,KAAK,GAAG,UAAU,OAAO,GAAG,EAAE0B,QAAQ,CAAC,EAClElD,OAAOe,KAAK,CAACkC,IAAI,EAChB;QACF,MAAMW,WAAW;YAChB,GAAGhE,MAAMiE,IAAI,CAAC,iBAAiB,mBAAmB,CAAC;YACnD;YACA,GAAGjE,MAAMiE,IAAI,CAACF,MAAM;YACpB;YACA,CAAC,2BAA2B,EAAER,aAAa;SAC3C;QAEDhD,OAAO2D,QAAQ,CAACF,UAAU;YAAEG,cAAc;QAAM;QAEhD,IAAI/D,OAAOe,KAAK,CAAClB,IAAI,EAAE;YACtB,MAAMA,KAAK8D,KAAK;gBACfK,MAAM;YACP;QACD;IACD,EAAE,OAAOC,OAAO;QACfvC,QAAQwC,GAAG,CAACD,KAAK,CAACA;QAClB,mDAAmD;QACnD5D,QAAQ8D,IAAI,CAAC;IACd;AACD;AACAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/templates/directories.ts"],"sourcesContent":["type DirectoriesAndFiles = { href: string; name: string }[];\n\nexport const renderDirectories = (\n\tdirectories: DirectoriesAndFiles,\n\tfiles: DirectoriesAndFiles,\n) => {\n\tconst directoriesList = `${directories\n\t\t.map(\n\t\t\t(directory) =>\n\t\t\t\t`<li><a class=\"folder\" href=\"${directory.href}\">${directory.name}/</a></li>`,\n\t\t)\n\t\t.join(\"\\n \")}`;\n\n\tconst filesList = `${files\n\t\t.map(\n\t\t\t(file) => `<li><a class=\"file\" href=\"${file.href}\">${file.name}</a></li>`,\n\t\t)\n\t\t.join(\"\\n \")}`;\n\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\t\tbody {\n\t\t -webkit-font-smoothing: antialiased;\n\t\t font-family: -apple-system, Calibri, \"Helvetica Neue\", sans-serif;\n\t\t margin: 0;\n\t\t padding: 20px;\n\t\t}\n\t\tmain {\n\t\t max-width: 900px;\n\t\t}\n\t\theader {\n\t\t display: flex;\n\t\t flex-wrap: wrap;\n\t\t justify-content: space-between;\n\t\t}\n\t\th1 {\n\t\t color: #000;\n\t\t font-size: 18px;\n\t\t font-weight: bold;\n\t\t margin-top: 0;\n\t\t}\n\t\tul {\n\t\t margin: 0 0 0 -2px;\n\t\t padding: 20px 0 0 0;\n\t\t}\n\t\tul li {\n\t\t display: flex;\n\t\t font-size: 14px;\n\t\t justify-content: space-between;\n\t\t list-style: none;\n\t\t}\n\t\ta {\n\t\t text-decoration: none;\n\t\t}\n\t\tul a {\n\t\t color: #000;\n\t\t display: block;\n\t\t margin: 0 -5px;\n\t\t overflow: hidden;\n\t\t padding: 10px 5px;\n\t\t text-overflow: ellipsis;\n\t\t white-space: nowrap;\n\t\t width: 100%;\n\t\t}\n\t\tsvg {\n\t\t height: 13px;\n\t\t vertical-align: text-bottom;\n\t\t}\n\t\tul a::before {\n\t\t display: inline-block;\n\t\t vertical-align: middle;\n\t\t margin-right: 10px;\n\t\t width: 24px;\n\t\t text-align: center;\n\t\t line-height: 12px;\n\t\t}\n\t\tul a.file::before {\n\t\t content: url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='currentColor' viewBox='0 0 16 16'> <path d='M14 4.5V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h5.5L14 4.5zm-3 0A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4.5h-2z'/> </svg>\");\n\t\t}\n\t\tul a:hover {\n\t\t text-decoration: underline;\n\t\t}\n\t\t/* folder-icon */\n\t\tul a.folder::before {\n\t\t content: url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='currentColor' viewBox='0 0 16 16'> <path d='M9.828 3h3.982a2 2 0 0 1 1.992 2.181l-.637 7A2 2 0 0 1 13.174 14H2.825a2 2 0 0 1-1.991-1.819l-.637-7a1.99 1.99 0 0 1 .342-1.31L.5 3a2 2 0 0 1 2-2h3.672a2 2 0 0 1 1.414.586l.828.828A2 2 0 0 0 9.828 3zm-8.322.12C1.72 3.042 1.95 3 2.19 3h5.396l-.707-.707A1 1 0 0 0 6.172 2H2.5a1 1 0 0 0-1 .981l.006.139z'/> </svg>\");\n\t\t}\n\t\t::selection {\n\t\t background-color: #fff;\n\t\t color: #000;\n\t\t}\n\t\t@media (min-width: 768px) {\n\t\t ul {\n\t\t\t display: flex;\n\t\t\t flex-wrap: wrap;\n\t\t }\n\t\t ul li {\n\t\t\t width: 230px;\n\t\t\t padding-right: 20px;\n\t\t }\n\t\t}\n\t</style>\n </head>\n\n <body>\n <main>\n <header>\n <h1>\n Static Server Directory Listing\n </h1>\n </header>\n\n\n <ul id=\"files\">\n ${directoriesList}\n ${filesList}\n </ul>\n\n\t</main>\n </body>\n</html>\n`;\n};\n"],"names":["renderDirectories","directories","files","directoriesList","map","directory","href","name","join","filesList","file"],"mappings":"AAEA,OAAO,MAAMA,oBAAoB,CAChCC,aACAC;IAEA,MAAMC,kBAAkB,
|
|
1
|
+
{"version":3,"sources":["../../src/templates/directories.ts"],"sourcesContent":["type DirectoriesAndFiles = { href: string; name: string }[];\n\nexport const renderDirectories = (\n\tdirectories: DirectoriesAndFiles,\n\tfiles: DirectoriesAndFiles,\n) => {\n\tconst directoriesList = `${directories\n\t\t.map(\n\t\t\t(directory) =>\n\t\t\t\t`<li><a class=\"folder\" href=\"${directory.href}\">${directory.name}/</a></li>`,\n\t\t)\n\t\t.join(\"\\n \")}`;\n\n\tconst filesList = `${files\n\t\t.map(\n\t\t\t(file) => `<li><a class=\"file\" href=\"${file.href}\">${file.name}</a></li>`,\n\t\t)\n\t\t.join(\"\\n \")}`;\n\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\t\tbody {\n\t\t -webkit-font-smoothing: antialiased;\n\t\t font-family: -apple-system, Calibri, \"Helvetica Neue\", sans-serif;\n\t\t margin: 0;\n\t\t padding: 20px;\n\t\t}\n\t\tmain {\n\t\t max-width: 900px;\n\t\t}\n\t\theader {\n\t\t display: flex;\n\t\t flex-wrap: wrap;\n\t\t justify-content: space-between;\n\t\t}\n\t\th1 {\n\t\t color: #000;\n\t\t font-size: 18px;\n\t\t font-weight: bold;\n\t\t margin-top: 0;\n\t\t}\n\t\tul {\n\t\t margin: 0 0 0 -2px;\n\t\t padding: 20px 0 0 0;\n\t\t}\n\t\tul li {\n\t\t display: flex;\n\t\t font-size: 14px;\n\t\t justify-content: space-between;\n\t\t list-style: none;\n\t\t}\n\t\ta {\n\t\t text-decoration: none;\n\t\t}\n\t\tul a {\n\t\t color: #000;\n\t\t display: block;\n\t\t margin: 0 -5px;\n\t\t overflow: hidden;\n\t\t padding: 10px 5px;\n\t\t text-overflow: ellipsis;\n\t\t white-space: nowrap;\n\t\t width: 100%;\n\t\t}\n\t\tsvg {\n\t\t height: 13px;\n\t\t vertical-align: text-bottom;\n\t\t}\n\t\tul a::before {\n\t\t display: inline-block;\n\t\t vertical-align: middle;\n\t\t margin-right: 10px;\n\t\t width: 24px;\n\t\t text-align: center;\n\t\t line-height: 12px;\n\t\t}\n\t\tul a.file::before {\n\t\t content: url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='currentColor' viewBox='0 0 16 16'> <path d='M14 4.5V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h5.5L14 4.5zm-3 0A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4.5h-2z'/> </svg>\");\n\t\t}\n\t\tul a:hover {\n\t\t text-decoration: underline;\n\t\t}\n\t\t/* folder-icon */\n\t\tul a.folder::before {\n\t\t content: url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='currentColor' viewBox='0 0 16 16'> <path d='M9.828 3h3.982a2 2 0 0 1 1.992 2.181l-.637 7A2 2 0 0 1 13.174 14H2.825a2 2 0 0 1-1.991-1.819l-.637-7a1.99 1.99 0 0 1 .342-1.31L.5 3a2 2 0 0 1 2-2h3.672a2 2 0 0 1 1.414.586l.828.828A2 2 0 0 0 9.828 3zm-8.322.12C1.72 3.042 1.95 3 2.19 3h5.396l-.707-.707A1 1 0 0 0 6.172 2H2.5a1 1 0 0 0-1 .981l.006.139z'/> </svg>\");\n\t\t}\n\t\t::selection {\n\t\t background-color: #fff;\n\t\t color: #000;\n\t\t}\n\t\t@media (min-width: 768px) {\n\t\t ul {\n\t\t\t display: flex;\n\t\t\t flex-wrap: wrap;\n\t\t }\n\t\t ul li {\n\t\t\t width: 230px;\n\t\t\t padding-right: 20px;\n\t\t }\n\t\t}\n\t</style>\n </head>\n\n <body>\n <main>\n <header>\n <h1>\n Static Server Directory Listing\n </h1>\n </header>\n\n\n <ul id=\"files\">\n ${directoriesList}\n ${filesList}\n </ul>\n\n\t</main>\n </body>\n</html>\n`;\n};\n"],"names":["renderDirectories","directories","files","directoriesList","map","directory","href","name","join","filesList","file"],"mappings":"AAEA,OAAO,MAAMA,oBAAoB,CAChCC,aACAC;IAEA,MAAMC,kBAAkB,GAAGF,YACzBG,GAAG,CACH,CAACC,YACA,CAAC,4BAA4B,EAAEA,UAAUC,IAAI,CAAC,EAAE,EAAED,UAAUE,IAAI,CAAC,UAAU,CAAC,EAE7EC,IAAI,CAAC,SAAS;IAEhB,MAAMC,YAAY,GAAGP,MACnBE,GAAG,CACH,CAACM,OAAS,CAAC,0BAA0B,EAAEA,KAAKJ,IAAI,CAAC,EAAE,EAAEI,KAAKH,IAAI,CAAC,SAAS,CAAC,EAEzEC,IAAI,CAAC,SAAS;IAEhB,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAuGD,EAAEL,gBAAgB;QAClB,EAAEM,UAAU;;;;;;AAMpB,CAAC;AACD,EAAE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@node-cli/static-server",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.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",
|
|
@@ -26,18 +26,18 @@
|
|
|
26
26
|
"@fastify/compress": "7.0.3",
|
|
27
27
|
"@fastify/cors": "9.0.1",
|
|
28
28
|
"@fastify/static": "7.0.4",
|
|
29
|
-
"@node-cli/logger": "1.2.
|
|
29
|
+
"@node-cli/logger": "1.2.6",
|
|
30
30
|
"@node-cli/parser": "2.3.4",
|
|
31
31
|
"fastify": "4.28.1",
|
|
32
32
|
"fastify-plugin": "4.5.1",
|
|
33
33
|
"fs-extra": "11.2.0",
|
|
34
34
|
"kleur": "4.1.5",
|
|
35
35
|
"open": "10.1.0",
|
|
36
|
-
"pino-pretty": "11.
|
|
36
|
+
"pino-pretty": "11.3.0",
|
|
37
37
|
"portfinder": "1.0.32"
|
|
38
38
|
},
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "40e92aa4e7b59c7cda398529ef00cd0fab944644"
|
|
43
43
|
}
|