Comparing version 7.3.0 to 8.0.0
@@ -33,3 +33,2 @@ { | ||
"eslint-config-canonical": "^41.0.4", | ||
"gitdown": "^3.1.5", | ||
"husky": "^5.0.0", | ||
@@ -58,3 +57,3 @@ "nyc": "^15.1.0", | ||
"hooks": { | ||
"pre-commit": "npm run lint && npm run typecheck && npm run test && npm run build" | ||
"pre-commit": "npm run lint && npm run test && npm run build" | ||
} | ||
@@ -73,9 +72,7 @@ }, | ||
"build": "rm -fr ./dist && tsc --project ./tsconfig.build.json", | ||
"generate-readme": "gitdown ./.README/README.md --output-file ./README.md", | ||
"lint": "eslint ./src ./test", | ||
"test": "NODE_OPTIONS='--loader=tsx --no-warnings' ava --verbose --serial", | ||
"typecheck": "tsc --noEmit" | ||
"lint": "eslint . && tsc", | ||
"test": "NODE_OPTIONS='--loader=tsx --no-warnings' ava --verbose --serial" | ||
}, | ||
"type": "module", | ||
"version": "7.3.0" | ||
"version": "8.0.0" | ||
} |
@@ -1,2 +0,1 @@ | ||
<a name="lightship"></a> | ||
# Lightship 🚢 | ||
@@ -13,27 +12,4 @@ | ||
* [Lightship 🚢](#lightship) | ||
* [Behaviour](#lightship-behaviour) | ||
* [Local-mode](#lightship-behaviour-local-mode) | ||
* [`/health`](#lightship-behaviour-health) | ||
* [`/live`](#lightship-behaviour-live) | ||
* [`/ready`](#lightship-behaviour-ready) | ||
* [Timeouts](#lightship-behaviour-timeouts) | ||
* [Usage](#lightship-usage) | ||
* [Kubernetes container probe configuration](#lightship-usage-kubernetes-container-probe-configuration) | ||
* [Logging](#lightship-usage-logging) | ||
* [Queueing service blocking tasks](#lightship-usage-queueing-service-blocking-tasks) | ||
* [Waiting for the server to become ready](#lightship-usage-waiting-for-the-server-to-become-ready) | ||
* [Usage examples](#lightship-usage-examples) | ||
* [Using with Express.js](#lightship-usage-examples-using-with-express-js) | ||
* [Beacons](#lightship-usage-examples-beacons) | ||
* [Best practices](#lightship-best-practices) | ||
* [Add a delay before stop handling incoming requests](#lightship-best-practices-add-a-delay-before-stop-handling-incoming-requests) | ||
* [FAQ](#lightship-faq) | ||
* [What is the reason that my liveness/ readiness endpoints are intermittently failing?](#lightship-faq-what-is-the-reason-that-my-liveness-readiness-endpoints-are-intermittently-failing) | ||
* [What is the reason for having separate `/live` and `/ready` endpoints?](#lightship-faq-what-is-the-reason-for-having-separate-live-and-ready-endpoints) | ||
* [How to detect what is holding the Node.js process alive?](#lightship-faq-how-to-detect-what-is-holding-the-node-js-process-alive) | ||
* [Related projects](#lightship-related-projects) | ||
{"gitdown": "contents"} | ||
<a name="lightship-behaviour"></a> | ||
## Behaviour | ||
@@ -48,10 +24,13 @@ | ||
<a name="lightship-behaviour-local-mode"></a> | ||
### Local-mode | ||
If Lightship detects that it is running in a non-Kubernetes environment (e.g. your local machine) then it starts the HTTP service on any available HTTP port. This is done to avoid port collision when multiple services using Lightship are being developed on the same machine. This behaviour can be changed using `detectKubernetes` and `port` configuration. | ||
If Lightship detects that it is running in a non-Kubernetes environment (e.g. your local machine) then... | ||
<a name="lightship-behaviour-health"></a> | ||
### <code>/health</code> | ||
* It starts the HTTP service on any available HTTP port. This is done to avoid port collision when multiple services using Lightship are being developed on the same machine. | ||
* `shutdownDelay` defaults to `0`, i.e. immediately proceed to execute the shutdown routine. | ||
Detection of the local-mode can be overridden by setting `{detectKubernetes: false}`. | ||
### `/health` | ||
`/health` endpoint describes the current state of a Node.js service. | ||
@@ -67,4 +46,3 @@ | ||
<a name="lightship-behaviour-live"></a> | ||
### <code>/live</code> | ||
### `/live` | ||
@@ -78,4 +56,3 @@ The endpoint responds: | ||
<a name="lightship-behaviour-ready"></a> | ||
### <code>/ready</code> | ||
### `/ready` | ||
@@ -89,3 +66,2 @@ The endpoint responds: | ||
<a name="lightship-behaviour-timeouts"></a> | ||
### Timeouts | ||
@@ -101,3 +77,2 @@ | ||
<a name="lightship-usage"></a> | ||
## Usage | ||
@@ -168,3 +143,2 @@ | ||
<a name="lightship-usage-kubernetes-container-probe-configuration"></a> | ||
### Kubernetes container probe configuration | ||
@@ -215,3 +189,2 @@ | ||
<a name="lightship-usage-logging"></a> | ||
### Logging | ||
@@ -223,3 +196,2 @@ | ||
<a name="lightship-usage-queueing-service-blocking-tasks"></a> | ||
### Queueing service blocking tasks | ||
@@ -258,3 +230,2 @@ | ||
<a name="lightship-usage-waiting-for-the-server-to-become-ready"></a> | ||
### Waiting for the server to become ready | ||
@@ -294,6 +265,4 @@ | ||
<a name="lightship-usage-examples"></a> | ||
## Usage examples | ||
<a name="lightship-usage-examples-using-with-express-js"></a> | ||
### Using with Express.js | ||
@@ -458,3 +427,2 @@ | ||
<a name="lightship-usage-examples-beacons"></a> | ||
### Beacons | ||
@@ -532,6 +500,4 @@ | ||
<a name="lightship-best-practices"></a> | ||
## Best practices | ||
<a name="lightship-best-practices-add-a-delay-before-stop-handling-incoming-requests"></a> | ||
### Add a delay before stop handling incoming requests | ||
@@ -550,6 +516,4 @@ | ||
<a name="lightship-faq"></a> | ||
## FAQ | ||
<a name="lightship-faq-what-is-the-reason-that-my-liveness-readiness-endpoints-are-intermittently-failing"></a> | ||
### What is the reason that my liveness/ readiness endpoints are intermittently failing? | ||
@@ -591,8 +555,6 @@ | ||
<a name="lightship-faq-what-is-the-reason-for-having-separate-live-and-ready-endpoints"></a> | ||
### What is the reason for having separate <code>/live</code> and <code>/ready</code> endpoints? | ||
### What is the reason for having separate `/live` and `/ready` endpoints? | ||
Distinct endpoints are needed if you want your Container to be able to take itself down for maintenance (as done in the [Using with Express.js](#lightship-usage-examples-using-with-express-js) usage example). Otherwise, you can use `/health`. | ||
<a name="lightship-faq-how-to-detect-what-is-holding-the-node-js-process-alive"></a> | ||
### How to detect what is holding the Node.js process alive? | ||
@@ -641,3 +603,2 @@ | ||
<a name="lightship-related-projects"></a> | ||
## Related projects | ||
@@ -644,0 +605,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
20
0
37422
592