UNPKG

2.67 kBPlain TextView Raw
1Usage: wait-on {OPTIONS} resource [...resource]
2
3Description:
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-get://m.com:90/foo
27 https-get: - HTTPS GET returns 2XX response. ex: https-get://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
34Standard 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 --httpTimeout
45
46 Maximum time in ms to wait for an HTTP HEAD/GET request, default 0
47 which results in using the OS default
48
49 -i, --interval
50
51 Interval to poll resources in ms, default 250ms
52
53 -l, --log
54
55 Log resources begin waited on and when complete or errored
56
57 -r, --reverse
58
59 Reverse operation, wait for resources to NOT be available
60
61 -t, --timeout
62
63 Maximum time in ms to wait before exiting with failure (1) code,
64 default Infinity
65
66 --tcpTimeout
67
68 Maximum time in ms for tcp connect, default 300ms
69
70 -v, --verbose
71
72 Enable debug output to stdout
73
74 -w, --window
75
76 Stability window, the time in ms defining the window of time that
77 resource needs to have not changed (file size or availability) before
78 signalling success, default 750ms. If less than interval, it will be
79 reset to the value of interval.
80
81 -h, --help
82
83 Show this message