Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "hollaback", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Resolves a Promise when host(s)/port(s) are ready", | ||
@@ -11,6 +11,12 @@ "keywords": [ | ||
"promise", | ||
"docker", | ||
"docker compose", | ||
"host", | ||
"hosts", | ||
"port", | ||
"ports" | ||
"ports", | ||
"stack", | ||
"orchestration", | ||
"services", | ||
"microservices" | ||
], | ||
@@ -17,0 +23,0 @@ "main": "dist/index.js", |
@@ -23,3 +23,3 @@ # Hollaback | ||
I wanted a simple wait to await a promise before moving on. | ||
I wanted a simple way to await a promise before moving on. | ||
@@ -64,3 +64,3 @@ Hollaback is it. | ||
By default, retries occur every *500ms* until the port is available, and times out after *30 seconds*. | ||
By default, retries occur every *500ms* until the port is available, and hollaback rejects after *30 seconds*. | ||
@@ -81,2 +81,4 @@ You can override the defaults by passing an options object as the last param: | ||
It won't work in a browser. | ||
## Testing | ||
@@ -86,4 +88,16 @@ | ||
## Fair warning | ||
Checking that a host/port accepts a connection isn't fool-proof. | ||
Maybe the port accepts connections, but hasn't finished instantiating. Connections != ready to rock. | ||
This does nothing more than attempt the initial connection. It doesn't 'speak' any underlying protocol other than raw TCP/IP, so it won't be able to tell, say, whether you're able to invoke SQL against a database. | ||
With that said, it should be good enough for 95% of scenarios where you just want to test if there's something listening on the other end. | ||
It's especially useful for stack orchestration using tools like Docker Compose, where services need to start in order and usually report (prematurely) that they're ready for linked services to spawn. | ||
## License | ||
[MIT](https://github.com/leebenson/hollaback/blob/master/LICENSE) |
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
12724
10
99
3