1 | Usage: wait-on {OPTIONS} resource [...resource]
|
2 |
|
3 | Description:
|
4 |
|
5 | wait-on is a command line utility which will wait for files, ports,
|
6 | sockets, and http(s) resources to become available (or not available
|
7 | using reverse flag). Exits with success code (0) when all resources
|
8 | are ready. Non-zero exit code if interrupted or timed out.
|
9 |
|
10 | Options may also be specified in a config file (js or json). For
|
11 | example --config configFile.js would result in configFile.js being
|
12 | required and the resulting object will be merged with any
|
13 | command line options before wait-on is called. See exampleConfig.js
|
14 |
|
15 | In shell combine with && to conditionally run another command
|
16 | once resources are available. ex: wait-on f1 && NEXT_CMD
|
17 |
|
18 | resources types are defined by their prefix, if no prefix is
|
19 | present, the resource is assumed to be of type 'file'
|
20 |
|
21 | resource prefixes are:
|
22 |
|
23 | file: - regular file (also default type). ex: file:/path/to/file
|
24 | http: - HTTP HEAD returns 2XX response. ex: http://m.com:90/foo
|
25 | https: - HTTPS HEAD returns 2XX response. ex: https://my/bar
|
26 | http-get: - HTTP GET returns 2XX response. ex: http://m.com:90/foo
|
27 | https-get: - HTTPS GET returns 2XX response. ex: https://my/bar
|
28 | tcp: - TCP port is listening. ex: 1.2.3.4:9000 or foo.com:700
|
29 | socket: - Domain Socket is listening. ex: socket:/path/to/sock
|
30 | For http over socket, use http://unix:SOCK_PATH:URL_PATH
|
31 | like http://unix:/path/to/sock:/foo/bar or
|
32 | http-get://unix:/path/to/sock:/foo/bar
|
33 |
|
34 | Standard Options:
|
35 |
|
36 | -c, --config
|
37 |
|
38 | js or json config file, useful for http(s) options
|
39 |
|
40 | -d, --delay
|
41 |
|
42 | Initial delay before checking for resources in ms, default 0
|
43 |
|
44 | -i, --interval
|
45 |
|
46 | Interval to poll resources in ms, default 250ms
|
47 |
|
48 | -l, --log
|
49 |
|
50 | Log resources begin waited on and when complete or errored
|
51 |
|
52 | -r, --reverse
|
53 |
|
54 | Reverse operation, wait for resources to NOT be available
|
55 |
|
56 | -t, --timeout
|
57 |
|
58 | Maximum time in ms to wait before exiting with failure (1) code,
|
59 | default Infinity
|
60 |
|
61 | -v, --verbose
|
62 |
|
63 | Enable debug output to stdout
|
64 |
|
65 | -w, --window
|
66 |
|
67 | Stability window, the time in ms defining the window of time that
|
68 | resource needs to have not changed (file size or availability) before
|
69 | signalling success, default 750ms. If less than interval, it will be
|
70 | reset to the value of interval.
|
71 |
|
72 | -h, --help
|
73 |
|
74 | Show this message
|