Skip to content

Commit c14d2d8

Browse files
committed
Added wscat tool to work with websockets
1 parent 06cb912 commit c14d2d8

19 files changed

+209
-0
lines changed

.ansible/group_vars/all/work.yml

+13
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ tools_enabled:
4444
- webpack-cli
4545
- wkhtmltopdf
4646
- wp-cli
47+
- wscat
4748
- yamllint
4849
- yq
4950
- zsh
@@ -691,6 +692,18 @@ tools_available:
691692
5.3:
692693
type: custom
693694
pre: WPCLI_URL="https://github.com/wp-cli/wp-cli/releases/download/v1.5.1/wp-cli-1.5.1.phar"
695+
wscat:
696+
disabled: []
697+
check: wscat --version | grep -E '[0-9][.0-9]+' || (wscat --version; false)
698+
all:
699+
type: npm
700+
package: wscat
701+
binary: wscat
702+
version:
703+
build_dep: []
704+
run_dep: []
705+
pre:
706+
post:
694707
yamllint:
695708
disabled: []
696709
check: yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' || (yamllint --version; false)

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
## Unreleased
55

66

7+
## Release 0.148
8+
9+
### Added
10+
- Added `wscat` to work with websockets
11+
12+
713
## Release 0.147
814

915
### Fixed

Dockerfiles/work/Dockerfile-5.2

+12
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,13 @@ RUN set -eux \
461461
&& webpack-cli --version | grep -E '[0-9][.0-9]+' || (webpack-cli --version; false) \
462462
&& true
463463
464+
# -------------------- (npm) wscat --------------------
465+
RUN set -eux \
466+
&& su -c '. /opt/nvm/nvm.sh; npm install --location=global wscat' devilbox \
467+
&& ln -s /opt/nvm/versions/node/$(su -c '. /opt/nvm/nvm.sh; node --version' devilbox)/bin/wscat /usr/local/bin/ \
468+
&& wscat --version | grep -E '[0-9][.0-9]+' || (wscat --version; false) \
469+
&& true
470+
464471
# -------------------- (pip) yamllint --------------------
465472
RUN set -eux \
466473
&& pip install --no-cache-dir --no-compile --force-reinstall yamllint \
@@ -724,6 +731,11 @@ RUN set -eux \
724731
&& webpack-cli --version | grep -E '[0-9][.0-9]+' || (webpack-cli --version; false) \
725732
&& true
726733
734+
# -------------------- (npm) wscat --------------------
735+
RUN set -eux \
736+
&& wscat --version | grep -E '[0-9][.0-9]+' || (wscat --version; false) \
737+
&& true
738+
727739
# -------------------- (pip) yamllint --------------------
728740
RUN set -eux \
729741
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' || (yamllint --version; false) \

Dockerfiles/work/Dockerfile-5.3

+12
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,13 @@ RUN set -eux \
533533
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' || (wp --allow-root --version; false) \
534534
&& true
535535
536+
# -------------------- (npm) wscat --------------------
537+
RUN set -eux \
538+
&& su -c '. /opt/nvm/nvm.sh; npm install --location=global wscat' devilbox \
539+
&& ln -s /opt/nvm/versions/node/$(su -c '. /opt/nvm/nvm.sh; node --version' devilbox)/bin/wscat /usr/local/bin/ \
540+
&& wscat --version | grep -E '[0-9][.0-9]+' || (wscat --version; false) \
541+
&& true
542+
536543
# -------------------- (pip) yamllint --------------------
537544
RUN set -eux \
538545
&& pip install --no-cache-dir --no-compile --force-reinstall yamllint \
@@ -817,6 +824,11 @@ RUN set -eux \
817824
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' || (wp --allow-root --version; false) \
818825
&& true
819826
827+
# -------------------- (npm) wscat --------------------
828+
RUN set -eux \
829+
&& wscat --version | grep -E '[0-9][.0-9]+' || (wscat --version; false) \
830+
&& true
831+
820832
# -------------------- (pip) yamllint --------------------
821833
RUN set -eux \
822834
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' || (yamllint --version; false) \

Dockerfiles/work/Dockerfile-5.4

+12
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,13 @@ RUN set -eux \
556556
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' || (wp --allow-root --version; false) \
557557
&& true
558558
559+
# -------------------- (npm) wscat --------------------
560+
RUN set -eux \
561+
&& su -c '. /opt/nvm/nvm.sh; npm install --location=global wscat' devilbox \
562+
&& ln -s /opt/nvm/versions/node/$(su -c '. /opt/nvm/nvm.sh; node --version' devilbox)/bin/wscat /usr/local/bin/ \
563+
&& wscat --version | grep -E '[0-9][.0-9]+' || (wscat --version; false) \
564+
&& true
565+
559566
# -------------------- (pip) yamllint --------------------
560567
RUN set -eux \
561568
&& pip install --no-cache-dir --no-compile --force-reinstall yamllint \
@@ -855,6 +862,11 @@ RUN set -eux \
855862
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' || (wp --allow-root --version; false) \
856863
&& true
857864
865+
# -------------------- (npm) wscat --------------------
866+
RUN set -eux \
867+
&& wscat --version | grep -E '[0-9][.0-9]+' || (wscat --version; false) \
868+
&& true
869+
858870
# -------------------- (pip) yamllint --------------------
859871
RUN set -eux \
860872
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' || (yamllint --version; false) \

Dockerfiles/work/Dockerfile-5.5

+12
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,13 @@ RUN set -eux \
611611
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' || (wp --allow-root --version; false) \
612612
&& true
613613
614+
# -------------------- (npm) wscat --------------------
615+
RUN set -eux \
616+
&& su -c '. /opt/nvm/nvm.sh; npm install --location=global wscat' devilbox \
617+
&& ln -s /opt/nvm/versions/node/$(su -c '. /opt/nvm/nvm.sh; node --version' devilbox)/bin/wscat /usr/local/bin/ \
618+
&& wscat --version | grep -E '[0-9][.0-9]+' || (wscat --version; false) \
619+
&& true
620+
614621
# -------------------- (pip) yamllint --------------------
615622
RUN set -eux \
616623
&& pip install --no-cache-dir --no-compile --force-reinstall yamllint \
@@ -942,6 +949,11 @@ RUN set -eux \
942949
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' || (wp --allow-root --version; false) \
943950
&& true
944951
952+
# -------------------- (npm) wscat --------------------
953+
RUN set -eux \
954+
&& wscat --version | grep -E '[0-9][.0-9]+' || (wscat --version; false) \
955+
&& true
956+
945957
# -------------------- (pip) yamllint --------------------
946958
RUN set -eux \
947959
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' || (yamllint --version; false) \

Dockerfiles/work/Dockerfile-5.6

+12
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,13 @@ RUN set -eux \
636636
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' || (wp --allow-root --version; false) \
637637
&& true
638638

639+
# -------------------- (npm) wscat --------------------
640+
RUN set -eux \
641+
&& su -c '. /opt/nvm/nvm.sh; npm install --location=global wscat' devilbox \
642+
&& ln -s /opt/nvm/versions/node/$(su -c '. /opt/nvm/nvm.sh; node --version' devilbox)/bin/wscat /usr/local/bin/ \
643+
&& wscat --version | grep -E '[0-9][.0-9]+' || (wscat --version; false) \
644+
&& true
645+
639646
# -------------------- (pip) yamllint --------------------
640647
RUN set -eux \
641648
&& pip install --no-cache-dir --no-compile --force-reinstall yamllint \
@@ -980,6 +987,11 @@ RUN set -eux \
980987
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' || (wp --allow-root --version; false) \
981988
&& true
982989

990+
# -------------------- (npm) wscat --------------------
991+
RUN set -eux \
992+
&& wscat --version | grep -E '[0-9][.0-9]+' || (wscat --version; false) \
993+
&& true
994+
983995
# -------------------- (pip) yamllint --------------------
984996
RUN set -eux \
985997
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' || (yamllint --version; false) \

Dockerfiles/work/Dockerfile-7.0

+12
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,13 @@ RUN set -eux \
636636
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' || (wp --allow-root --version; false) \
637637
&& true
638638

639+
# -------------------- (npm) wscat --------------------
640+
RUN set -eux \
641+
&& su -c '. /opt/nvm/nvm.sh; npm install --location=global wscat' devilbox \
642+
&& ln -s /opt/nvm/versions/node/$(su -c '. /opt/nvm/nvm.sh; node --version' devilbox)/bin/wscat /usr/local/bin/ \
643+
&& wscat --version | grep -E '[0-9][.0-9]+' || (wscat --version; false) \
644+
&& true
645+
639646
# -------------------- (pip) yamllint --------------------
640647
RUN set -eux \
641648
&& pip install --no-cache-dir --no-compile --force-reinstall yamllint \
@@ -980,6 +987,11 @@ RUN set -eux \
980987
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' || (wp --allow-root --version; false) \
981988
&& true
982989

990+
# -------------------- (npm) wscat --------------------
991+
RUN set -eux \
992+
&& wscat --version | grep -E '[0-9][.0-9]+' || (wscat --version; false) \
993+
&& true
994+
983995
# -------------------- (pip) yamllint --------------------
984996
RUN set -eux \
985997
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' || (yamllint --version; false) \

Dockerfiles/work/Dockerfile-7.1

+12
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,13 @@ RUN set -eux \
636636
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' || (wp --allow-root --version; false) \
637637
&& true
638638

639+
# -------------------- (npm) wscat --------------------
640+
RUN set -eux \
641+
&& su -c '. /opt/nvm/nvm.sh; npm install --location=global wscat' devilbox \
642+
&& ln -s /opt/nvm/versions/node/$(su -c '. /opt/nvm/nvm.sh; node --version' devilbox)/bin/wscat /usr/local/bin/ \
643+
&& wscat --version | grep -E '[0-9][.0-9]+' || (wscat --version; false) \
644+
&& true
645+
639646
# -------------------- (pip) yamllint --------------------
640647
RUN set -eux \
641648
&& pip install --no-cache-dir --no-compile --force-reinstall yamllint \
@@ -980,6 +987,11 @@ RUN set -eux \
980987
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' || (wp --allow-root --version; false) \
981988
&& true
982989

990+
# -------------------- (npm) wscat --------------------
991+
RUN set -eux \
992+
&& wscat --version | grep -E '[0-9][.0-9]+' || (wscat --version; false) \
993+
&& true
994+
983995
# -------------------- (pip) yamllint --------------------
984996
RUN set -eux \
985997
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' || (yamllint --version; false) \

Dockerfiles/work/Dockerfile-7.2

+12
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,13 @@ RUN set -eux \
636636
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' || (wp --allow-root --version; false) \
637637
&& true
638638

639+
# -------------------- (npm) wscat --------------------
640+
RUN set -eux \
641+
&& su -c '. /opt/nvm/nvm.sh; npm install --location=global wscat' devilbox \
642+
&& ln -s /opt/nvm/versions/node/$(su -c '. /opt/nvm/nvm.sh; node --version' devilbox)/bin/wscat /usr/local/bin/ \
643+
&& wscat --version | grep -E '[0-9][.0-9]+' || (wscat --version; false) \
644+
&& true
645+
639646
# -------------------- (pip) yamllint --------------------
640647
RUN set -eux \
641648
&& pip install --no-cache-dir --no-compile --force-reinstall yamllint \
@@ -980,6 +987,11 @@ RUN set -eux \
980987
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' || (wp --allow-root --version; false) \
981988
&& true
982989

990+
# -------------------- (npm) wscat --------------------
991+
RUN set -eux \
992+
&& wscat --version | grep -E '[0-9][.0-9]+' || (wscat --version; false) \
993+
&& true
994+
983995
# -------------------- (pip) yamllint --------------------
984996
RUN set -eux \
985997
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' || (yamllint --version; false) \

Dockerfiles/work/Dockerfile-7.3

+12
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,13 @@ RUN set -eux \
636636
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' || (wp --allow-root --version; false) \
637637
&& true
638638

639+
# -------------------- (npm) wscat --------------------
640+
RUN set -eux \
641+
&& su -c '. /opt/nvm/nvm.sh; npm install --location=global wscat' devilbox \
642+
&& ln -s /opt/nvm/versions/node/$(su -c '. /opt/nvm/nvm.sh; node --version' devilbox)/bin/wscat /usr/local/bin/ \
643+
&& wscat --version | grep -E '[0-9][.0-9]+' || (wscat --version; false) \
644+
&& true
645+
639646
# -------------------- (pip) yamllint --------------------
640647
RUN set -eux \
641648
&& pip install --no-cache-dir --no-compile --force-reinstall yamllint \
@@ -980,6 +987,11 @@ RUN set -eux \
980987
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' || (wp --allow-root --version; false) \
981988
&& true
982989

990+
# -------------------- (npm) wscat --------------------
991+
RUN set -eux \
992+
&& wscat --version | grep -E '[0-9][.0-9]+' || (wscat --version; false) \
993+
&& true
994+
983995
# -------------------- (pip) yamllint --------------------
984996
RUN set -eux \
985997
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' || (yamllint --version; false) \

Dockerfiles/work/Dockerfile-7.4

+12
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,13 @@ RUN set -eux \
636636
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' || (wp --allow-root --version; false) \
637637
&& true
638638

639+
# -------------------- (npm) wscat --------------------
640+
RUN set -eux \
641+
&& su -c '. /opt/nvm/nvm.sh; npm install --location=global wscat' devilbox \
642+
&& ln -s /opt/nvm/versions/node/$(su -c '. /opt/nvm/nvm.sh; node --version' devilbox)/bin/wscat /usr/local/bin/ \
643+
&& wscat --version | grep -E '[0-9][.0-9]+' || (wscat --version; false) \
644+
&& true
645+
639646
# -------------------- (pip) yamllint --------------------
640647
RUN set -eux \
641648
&& pip install --no-cache-dir --no-compile --force-reinstall yamllint \
@@ -980,6 +987,11 @@ RUN set -eux \
980987
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' || (wp --allow-root --version; false) \
981988
&& true
982989

990+
# -------------------- (npm) wscat --------------------
991+
RUN set -eux \
992+
&& wscat --version | grep -E '[0-9][.0-9]+' || (wscat --version; false) \
993+
&& true
994+
983995
# -------------------- (pip) yamllint --------------------
984996
RUN set -eux \
985997
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' || (yamllint --version; false) \

Dockerfiles/work/Dockerfile-8.0

+12
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,13 @@ RUN set -eux \
636636
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' || (wp --allow-root --version; false) \
637637
&& true
638638

639+
# -------------------- (npm) wscat --------------------
640+
RUN set -eux \
641+
&& su -c '. /opt/nvm/nvm.sh; npm install --location=global wscat' devilbox \
642+
&& ln -s /opt/nvm/versions/node/$(su -c '. /opt/nvm/nvm.sh; node --version' devilbox)/bin/wscat /usr/local/bin/ \
643+
&& wscat --version | grep -E '[0-9][.0-9]+' || (wscat --version; false) \
644+
&& true
645+
639646
# -------------------- (pip) yamllint --------------------
640647
RUN set -eux \
641648
&& pip install --no-cache-dir --no-compile --force-reinstall yamllint \
@@ -980,6 +987,11 @@ RUN set -eux \
980987
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' || (wp --allow-root --version; false) \
981988
&& true
982989

990+
# -------------------- (npm) wscat --------------------
991+
RUN set -eux \
992+
&& wscat --version | grep -E '[0-9][.0-9]+' || (wscat --version; false) \
993+
&& true
994+
983995
# -------------------- (pip) yamllint --------------------
984996
RUN set -eux \
985997
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' || (yamllint --version; false) \

Dockerfiles/work/Dockerfile-8.1

+12
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,13 @@ RUN set -eux \
636636
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' || (wp --allow-root --version; false) \
637637
&& true
638638

639+
# -------------------- (npm) wscat --------------------
640+
RUN set -eux \
641+
&& su -c '. /opt/nvm/nvm.sh; npm install --location=global wscat' devilbox \
642+
&& ln -s /opt/nvm/versions/node/$(su -c '. /opt/nvm/nvm.sh; node --version' devilbox)/bin/wscat /usr/local/bin/ \
643+
&& wscat --version | grep -E '[0-9][.0-9]+' || (wscat --version; false) \
644+
&& true
645+
639646
# -------------------- (pip) yamllint --------------------
640647
RUN set -eux \
641648
&& pip install --no-cache-dir --no-compile --force-reinstall yamllint \
@@ -980,6 +987,11 @@ RUN set -eux \
980987
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' || (wp --allow-root --version; false) \
981988
&& true
982989

990+
# -------------------- (npm) wscat --------------------
991+
RUN set -eux \
992+
&& wscat --version | grep -E '[0-9][.0-9]+' || (wscat --version; false) \
993+
&& true
994+
983995
# -------------------- (pip) yamllint --------------------
984996
RUN set -eux \
985997
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' || (yamllint --version; false) \

Dockerfiles/work/Dockerfile-8.2

+12
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,13 @@ RUN set -eux \
589589
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' || (wp --allow-root --version; false) \
590590
&& true
591591

592+
# -------------------- (npm) wscat --------------------
593+
RUN set -eux \
594+
&& su -c '. /opt/nvm/nvm.sh; npm install --location=global wscat' devilbox \
595+
&& ln -s /opt/nvm/versions/node/$(su -c '. /opt/nvm/nvm.sh; node --version' devilbox)/bin/wscat /usr/local/bin/ \
596+
&& wscat --version | grep -E '[0-9][.0-9]+' || (wscat --version; false) \
597+
&& true
598+
592599
# -------------------- (pip) yamllint --------------------
593600
RUN set -eux \
594601
&& pip install --no-cache-dir --no-compile --force-reinstall yamllint \
@@ -906,6 +913,11 @@ RUN set -eux \
906913
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' || (wp --allow-root --version; false) \
907914
&& true
908915

916+
# -------------------- (npm) wscat --------------------
917+
RUN set -eux \
918+
&& wscat --version | grep -E '[0-9][.0-9]+' || (wscat --version; false) \
919+
&& true
920+
909921
# -------------------- (pip) yamllint --------------------
910922
RUN set -eux \
911923
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' || (yamllint --version; false) \

doc/available-tools.md

+2
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,7 @@ Additionally to all of the `slim` tools shown above, the following PHP cli tools
416416
| [webpack-cli][lnk_webpack-cli] ||||||||||||||
417417
| [wkhtmltopdf][lnk_wkhtmltopdf] | | | | ||||||||||
418418
| [wp-cli][lnk_wp-cli] | |||||||||||||
419+
| [wscat][lnk_wscat] ||||||||||||||
419420
| [yamllint][lnk_yamllint] ||||||||||||||
420421
| [**yarn**][lnk_**yarn**] ||||||||||||||
421422
| [yq][lnk_yq] ||||||||||||||
@@ -467,6 +468,7 @@ Additionally to all of the `slim` tools shown above, the following PHP cli tools
467468
[lnk_webpack-cli]: ../php_tools/webpack-cli
468469
[lnk_wkhtmltopdf]: ../php_tools/wkhtmltopdf
469470
[lnk_wp-cli]: ../php_tools/wp-cli
471+
[lnk_wscat]: ../php_tools/wscat
470472
[lnk_yamllint]: ../php_tools/yamllint
471473
[lnk_**yarn**]: https://yarnpkg.com/cli/install
472474
[lnk_yq]: ../php_tools/yq

0 commit comments

Comments
 (0)