From 06037f8665c941f8bdea4f998ed2e9a75eee9b07 Mon Sep 17 00:00:00 2001 From: Anton Krug Date: Tue, 3 Jan 2017 21:45:09 +0000 Subject: [PATCH 1/3] renaming package --- README.md | 4 ++-- bin/{wscat => wscatverbose} | 0 package.json | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) rename bin/{wscat => wscatverbose} (100%) diff --git a/README.md b/README.md index 5b87ead..d97ef7e 100644 --- a/README.md +++ b/README.md @@ -7,13 +7,13 @@ WebSocket cat. This module needs to be installed globally so use the `-g` flag when installing: ``` -npm install -g wscat +npm install -g wscatverbose ``` ## Usage ``` -$ wscat -c ws://echo.websocket.org +$ wscatverbose -c ws://echo.websocket.org connected (press CTRL+C to quit) > hi there < hi there diff --git a/bin/wscat b/bin/wscatverbose similarity index 100% rename from bin/wscat rename to bin/wscatverbose diff --git a/package.json b/package.json index 635b99a..0218a97 100644 --- a/package.json +++ b/package.json @@ -1,21 +1,21 @@ { - "name": "wscat", + "name": "wscatverbose", "version": "1.1.1", - "description": "WebSocket cat", + "description": "WebSocket cat verbose version", "main": "index.js", "scripts": { "test": "echo \"No test specified\"" }, "repository": { "type": "git", - "url": "https://github.com/websockets/wscat" + "url": "https://github.com/truhlikfredy/wscat" }, "keywords": [ - "wscat", + "wscatverbose", "websocket", "cat" ], - "author": "Arnout Kazemier, Einar Otto Stangvik", + "author": "Arnout Kazemier, Einar Otto Stangvik, verbose by Anton Krug", "license": "MIT", "dependencies": { "commander": "~2.9.0", @@ -24,6 +24,6 @@ "ws": "~1.1.1" }, "bin": { - "wscat": "./bin/wscat" + "wscatverbose": "./bin/wscatverbose" } } From c627efa76bdab47fd8fe663dd1eecbb41bcfe4a9 Mon Sep 17 00:00:00 2001 From: Anton Krug Date: Tue, 3 Jan 2017 21:48:19 +0000 Subject: [PATCH 2/3] Verbosity added --- README.md | 5 +++-- bin/wscatverbose | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d97ef7e..8148697 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ -# wscat +# wscatverbose + +WebSocket cat. This is the same as https://github.com/websockets/wscat but this version displays flags of the messages which contain the buffer as well, sometimes handy for debugging -WebSocket cat. ## Installation diff --git a/bin/wscatverbose b/bin/wscatverbose index 093ac56..e83149e 100755 --- a/bin/wscatverbose +++ b/bin/wscatverbose @@ -164,6 +164,7 @@ if (program.listen && program.connect) { wsConsole.print('error: ' + code + (description ? ' ' + description : ''), Console.Colors.Yellow); }).on('message', function message(data, flags) { wsConsole.print('< ' + data, Console.Colors.Blue); + console.log(util.inspect(flags, false, null)); }); }).on('error', function servererrror(error) { wsConsole.print('error: ' + error.toString(), Console.Colors.Yellow); @@ -214,6 +215,7 @@ if (program.listen && program.connect) { process.exit(-1); }).on('message', function message(data, flags) { wsConsole.print('< ' + data, Console.Colors.Blue); + console.log(util.inspect(flags, false, null)); }); wsConsole.on('close', function close() { From dbafb4b4d4eeded513a0231f5a9b94b3f28550c0 Mon Sep 17 00:00:00 2001 From: Anton Krug Date: Tue, 3 Jan 2017 22:06:09 +0000 Subject: [PATCH 3/3] npm ignore --- .npmignore | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .npmignore diff --git a/.npmignore b/.npmignore deleted file mode 100644 index 8d98f9d..0000000 --- a/.npmignore +++ /dev/null @@ -1 +0,0 @@ -.*