@small-tech/https 3.0.3 → 4.0.0

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/LICENSE CHANGED
@@ -1,5 +1,5 @@
1
1
  @small-tech/https
2
- Copyright ⓒ 2019-2021 Aral Balkan, Small Technology Foundation
2
+ Copyright ⓒ 2019-present Aral Balkan, Small Technology Foundation
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify
5
5
  it under the terms of the GNU Affero General Public License as published
package/README.md CHANGED
@@ -4,9 +4,9 @@ A drop-in standard Node.js HTTPS module replacement with both automatic developm
4
4
 
5
5
  Simply replace Node’s `https` module with `@small-tech/https` and get:
6
6
 
7
- - Automatically-provisioned TLS certificates at localhost with no browser warnings via [mkcert](https://github.com/FiloSottile/mkcert).
8
- - Automatically-provisioned TLS certificates at hostname via [Let’s Encrypt](https://letsencrypt.org/).
9
- - Automatic HTTP to HTTPS forwarding at hostname.
7
+ - Automatically-provisioned TLS certificates at localhost with no browser warnings via [mkcert](https://github.com/FiloSottile/mkcert).
8
+ - Automatically-provisioned TLS certificates at hostname via [Let’s Encrypt](https://letsencrypt.org/).
9
+ - Automatic HTTP to HTTPS forwarding at hostname.
10
10
 
11
11
  That’s it.
12
12
 
@@ -14,6 +14,14 @@ This is basically a batteries-included version of the standard Node.js `https` m
14
14
 
15
15
  ___Note:__ This is a standard ECMAScript Modules (ESM; es6 modules) project. If you need to use legacy CommonJS, [please see the 2.x branch](https://github.com/small-tech/https/tree/2.x) which is currently still being maintained._
16
16
 
17
+ ## Compatibility
18
+
19
+ - Version 4.x: Node 18.2 LTS+
20
+
21
+ - Version 3.x: Node 16 LTS
22
+
23
+ - Version 2.x: CJS, Node 16 LTS
24
+
17
25
  ## Like this? Fund us!
18
26
 
19
27
  [Small Technology Foundation](https://small-tech.org) is a tiny, independent not-for-profit.
@@ -30,9 +38,9 @@ If you’re evaluating this for a “startup” or an enterprise, let us save yo
30
38
 
31
39
  Tested and supported on:
32
40
 
33
- - Linux (tested with elementary OS 5.x/Hera)
34
- - macOS (tested on Big Sur)
35
- - Windows 10 (tested in Windows Terminal with PowerShell)
41
+ - Linux (tested with elementary OS 5.x/Hera)
42
+ - macOS (tested on Big Sur)
43
+ - Windows 10 (tested in Windows Terminal with PowerShell)
36
44
 
37
45
  (WSL is not supported for certificates at localhost unless you’re running your browser under WSL also).
38
46
 
@@ -126,15 +134,15 @@ Lower-level:
126
134
 
127
135
  ### Auto Encrypt
128
136
 
129
- - Source: https://source.small-tech.org/site.js/lib/auto-encrypt
130
- - Package: [@small-tech/auto-encrypt](https://www.npmjs.com/package/@small-tech/auto-encrypt)
137
+ - Source: https://source.small-tech.org/site.js/lib/auto-encrypt
138
+ - Package: [@small-tech/auto-encrypt](https://www.npmjs.com/package/@small-tech/auto-encrypt)
131
139
 
132
140
  Adds automatic provisioning and renewal of [Let’s Encrypt](https://letsencrypt.org) TLS certificates with [OCSP Stapling](https://letsencrypt.org/docs/integration-guide/#implement-ocsp-stapling) to [Node.js](https://nodejs.org) [https](https://nodejs.org/dist/latest-v12.x/docs/api/https.html) servers (including [Express.js](https://expressjs.com/), etc.)
133
141
 
134
142
  ### Auto Encrypt Localhost
135
143
 
136
- - Source: https://source.small-tech.org/site.js/lib/auto-encrypt-localhost
137
- - Package: [@small-tech/auto-encrypt-localhost](https://www.npmjs.com/package/@small-tech/auto-encrypt-localhost)
144
+ - Source: https://source.small-tech.org/site.js/lib/auto-encrypt-localhost
145
+ - Package: [@small-tech/auto-encrypt-localhost](https://www.npmjs.com/package/@small-tech/auto-encrypt-localhost)
138
146
 
139
147
  Automatically provisions and installs locally-trusted TLS certificates for Node.js https servers (including Express.js, etc.) using [mkcert](https://github.com/FiloSottile/mkcert/).
140
148
 
@@ -142,14 +150,14 @@ Higher level:
142
150
 
143
151
  ### Site.js
144
152
 
145
- - Web site: https://sitejs.org
146
- - Source: https://source.small-tech.org/site.js/app
153
+ - Web site: https://sitejs.org
154
+ - Source: https://source.small-tech.org/site.js/app
147
155
 
148
156
  A complete [small technology](https://small-tech.org/about/#small-technology) tool for developing, testing, and deploying a secure static or dynamic personal web site or app with zero configuration.
149
157
 
150
158
  ## Copyright
151
159
 
152
- © 2020-2021 [Aral Balkan](https://ar.al), [Small Technology Foundation](https://small-tech.org).
160
+ © 2019-present [Aral Balkan](https://ar.al), [Small Technology Foundation](https://small-tech.org).
153
161
 
154
162
  Let’s Encrypt is a trademark of the Internet Security Research Group (ISRG). All rights reserved. Node.js is a trademark of Joyent, Inc. and is used with its permission. We are not endorsed by or affiliated with Joyent or ISRG.
155
163
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@small-tech/https",
3
- "version": "3.0.3",
3
+ "version": "4.0.0",
4
4
  "description": "A drop-in standard Node.js HTTPS module replacement with both automatic development-time (localhost) certificates via Auto Encrypt Localhost and automatic production certificates via Auto Encrypt.",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -46,8 +46,8 @@
46
46
  },
47
47
  "license": "AGPL-3.0-or-later",
48
48
  "dependencies": {
49
- "@small-tech/auto-encrypt": "^3.0.1",
50
- "@small-tech/auto-encrypt-localhost": "^7.0.7",
49
+ "@small-tech/auto-encrypt": "^4.0.0",
50
+ "@small-tech/auto-encrypt-localhost": "^7.2.0",
51
51
  "fs-extra": "^9.0.1"
52
52
  },
53
53
  "devDependencies": {
package/CHANGELOG.md DELETED
@@ -1,224 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
-
7
- ## [3.0.3] - 2021-03-24
8
-
9
- A hybrid approach to local certificates.
10
-
11
- ### Changed
12
-
13
- Upgrade Auto Encrypt Localhost to version 7.0.7.
14
-
15
- This vresion implements a hybrid approach to mkcert installation and certificate authority and certificate creation that combines the best parts of the methods used in 6.x and 7.x.
16
-
17
- Specifically:
18
-
19
- - __mkcert is now installed at post-install__ (which removes the requirement for the graphical sudo prompt, which was using pkexec, which behaves differently to sudo and was creating the certificate material files with the wrong permissions on Linux).
20
-
21
- - __root certificate authority and TLS certificates are created as necessary at runtime__ (while this requires the person to enter their sudo password, the prompt is shown in the command-line as expected unlike [the npm bug that was causing the prompt to be hidden when run in a lifecycle script](https://github.com/npm/cli/issues/2887)).
22
-
23
-
24
- ## [3.0.2] - 2021-03-23
25
-
26
- Cross platform once again.
27
-
28
- ### Changed
29
-
30
- - Upgrade Auto Encrypt Localhost to version 7.0.5.
31
-
32
- This fixes installation on macOS (which was failing because of differences in how the graphical sudo prompt affects file permissions between Linux and macOS) and re-implements Windows support (tested/supported only on Windows 10, under Windows Terminal, with PowerShell).
33
-
34
- - Upgrade Auto Encrypt to version 3.0.1.
35
-
36
- This fixes a regression introduced on Windows in the 3.x branch due to the way in which `__dirname` was being defined.
37
-
38
- - Reduce package size (unpacked) from 51.2KB to 18.3KB by linking to AGPL license body instead of including the entire text of it.
39
-
40
- ## [3.0.1] - 2021-03-17
41
-
42
- ### Fixed
43
-
44
- - Hang during npm install due to npm bug in Auto Encrypt Localhost (AEL). Upgraded AEL to version 7.0.4 which includes a graphical sudo prompt workaround.
45
-
46
- ## [3.0.0] - 2021-03-09
47
-
48
- __Breaking change:__ ESM version. Includes Auto Encrypt 3.0.0 and Auto Encrypt Localhost 7.0.2.
49
-
50
- ### Changed
51
-
52
- - Uses ECMAScript Modules (ESM; es6 modules).
53
- - Upgraded Auto Encrypt to version 3.0.0 (ESM + includes the latest Let’s Encrypt staging certificate authority root certificate for testing).
54
- - Upgraded Auto Encrypt Localhost to version 7.0.2 (the mkcert binaries are no longer bundled).
55
- - Testing and coverage: migrate from using nyc, tap-spec, and tap-nyc to c8 and tap-monkey.
56
- - Reduce npm package size by specifying files whitelist.
57
-
58
- ## [2.1.1] - 2021-02-16
59
-
60
- ### Changed
61
-
62
- - Upgrade Auto Encrypt to version 2.0.6. Fixes assignment to constant that would result in a crash when a Retry-After header was received from Let’s Encrypt.
63
-
64
- ## [2.1.0] - 2020-11-04
65
-
66
- ### Changed
67
-
68
- - Upgrade Auto Encrypt Localhost to version 6.1.0. (This upgrades mkcert to 1.4.2 and includes the new separate mkcert arm64 binary.)
69
-
70
- ## [2.0.0] - 2020-11-03
71
-
72
- ### Changed
73
-
74
- - __Breaking change:__ Update to Auto Encrypt Localhost version 6.0.0.
75
-
76
- Running multiple local servers at different HTTPS ports no longer results in an error due to port 80 being unavailable for the HTTP Server. However, know that only the first server will get the HTTP Server at port 80 that redirects HTTP calls to HTTPS and also serves your local root certificate authority public key.
77
-
78
- ## [1.6.1] - 2020-10-29
79
-
80
- ### Improved
81
-
82
- - Update dependencies to remove npm vulnerability warnings.
83
-
84
- ## [1.6.0] - 2020-07-11
85
-
86
- ### Added
87
-
88
- - Update Auto Encrypt Localhost to 5.4.0 to add arm64 support on Linux.
89
-
90
- ## [1.5.1] - 2020-07-10
91
-
92
- ### Fixed
93
-
94
- - Update Auto Encrypt to 2.0.4 to fix HTTP → HTTPS redirects on global servers. They now work (the HTTP server was not being started previously due to a typo in the monkey-patched method name).
95
-
96
- ## [1.5.0] - 2020-07-07
97
-
98
- ### Changed
99
-
100
- - Update Auto Encrypt Localhost to version 5.3.0 (now serves the local root certificate authority’s public key at route /.ca).
101
-
102
- ## [1.4.0] - 2020-07-06
103
-
104
- ### Changed
105
-
106
- - Update Auto Encrypt Localhost to version 5.2.2 (you can now access local servers from any device on your local network via its IPv4 address).
107
-
108
- ## [1.3.1] - 2020-07-03
109
-
110
- ### Changed
111
-
112
- - Update to Auto Encrypt version 2.0.1 (HTTP to HTTPS forwarding is now logged).
113
-
114
- ## [1.3.0] - 2020-07-03
115
-
116
- ### Changed
117
-
118
- - Update to Auto Encrypt version 2.0.0 with automatic HTTP to HTTPS forwarding for servers at hostname.
119
-
120
- ## [1.2.5] - 2020-06-20
121
-
122
- ### Changed
123
-
124
- - Update to Auto Encrypt version 1.0.3 with fix for carriage returns in CSRs causing some certificate provisioning attempts to fail.
125
-
126
- ## [1.2.4] - 2020-06-16
127
-
128
- ### Changed
129
-
130
- - Updated Auto Encrypt to version 1.0.2 and Auto Encrypt localhost to version 5.1.2 (fixes and cosmetic improvements).
131
-
132
- ## [1.2.3] - 2020-06-16
133
-
134
- ### Changed
135
-
136
- - Updated Auto Encrypt to version 1.0.1 and Auto Encrypt localhost to version 5.1.1.
137
- - Log output now conforms to format used by Site.js.
138
-
139
- ## [1.2.2] - 2020-04-16
140
-
141
- ### Added
142
-
143
- - Minor: clean up old (pre-version-1.2.0) certificate folders at startup.
144
-
145
- ## [1.2.1] - 2020-04-15
146
-
147
- ### Added
148
-
149
- - Minor: add repository link to package file.
150
-
151
- ## [1.2.0] - 2020-04-15
152
-
153
- ### Changed
154
-
155
- - Let’s Encrypt certificates are now managed by [Auto Encrypt](https://source.ind.ie/site.js/lib/Auto Encrypt).
156
- - Entire library is now licensed under AGPL version 3.0 or later.
157
-
158
- ## [1.1.0] - 2020-02-15
159
-
160
- ### Added
161
-
162
- - Support for QUIET=true environment variable for what was previously console.log() output.
163
-
164
- ## [1.0.9] - 2020-02-09
165
-
166
- ### Changed
167
-
168
- - Upgrade to version 3.1.7 of Nodecert (with fix to output formatting updates).
169
-
170
- ## [1.0.8] - 2020-02-09
171
-
172
- ### Changed
173
-
174
- - Upgrade to version 3.1.5 of Nodecert (with output formatting updates).
175
-
176
- ## [1.0.7] - 2020-02-09
177
-
178
- ### Changed
179
-
180
- - Update console output format to match the one used in Site.js (cosmetic).
181
-
182
- ## [1.0.6] - 2019-11-26
183
-
184
- ### Fixed
185
-
186
- - Update to latest Nodecert (version 3.1.4) which fixes regression so Node.js once again recognises local certificates as valid.
187
-
188
- ## [1.0.5] - 2019-11-26
189
-
190
- ### Fixed
191
-
192
- - Update to latest Nodecert (version 3.1.3) which fixes crash when multiple directories are missing in the requested Nodecert configuration directory.
193
-
194
- ## [1.0.4] - 2019-11-26
195
-
196
- ### Fixed
197
-
198
- - Setting a custom certificate directory no longer causes a crash.
199
-
200
- ## [1.0.3] - 2019-11-26
201
-
202
- ### Fixed
203
-
204
- - Found and removed two other functions where Greenlock was phoning home. Seriously, what’s wrong with you, AJ? FFS!
205
-
206
- ### Added
207
-
208
- - Now emits `server.SMALL_TECH_ORG_ERROR_HTTP_SERVER` event on HTTP (HTTP-01 and redirection) server error.
209
-
210
- ## [1.0.2] - 2019-11-25
211
-
212
- - `certificateDirectory` option for overriding the default certificate directory. Local certificates will be created in a `local` subdirectory of this directory and global certificates will be created in a `global` subdirectory of this directory.
213
-
214
- ## [1.0.1] - 2019-11-09
215
-
216
- ### Fixed
217
-
218
- - Missing files in `lib/` folder due to existence of second `package.json` file.
219
-
220
- ## [1.0.0] - 2019-11-08
221
-
222
- ### Added
223
-
224
- - Initial release.