Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sharktail

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sharktail - npm Package Compare versions

Comparing version 1.0.11 to 1.0.13

12

index.js

@@ -7,3 +7,4 @@ #!/usr/bin/env node

host: argv.host,
port: argv.port
port: argv.port,
delay: argv.delay || null
}

@@ -21,2 +22,9 @@ const mySocket = new WebSocket(`ws://${opts.host}:${opts.port}`);

// duplex.pipe(process.stdout);
process.stdin.pipe(duplex);
if (opts.delay) {
setTimeout(function () {
process.stdin.pipe(duplex);
}, opts.delay * 1000)
} else {
process.stdin.pipe(duplex);
}

2

package.json
{
"name": "sharktail",
"version": "1.0.11",
"version": "1.0.13",
"description": "Official Sharktail CLI written in Node.js",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -14,2 +14,4 @@ # sharktail

Client is available as an npm package.
$ npm install -g sharktail

@@ -19,7 +21,38 @@

Show output on both stdout and Sharktail:
Show output on both stdout and sharktail:
$ echo "hello" | sharktail
Dummy loop in ```batch``` and pipe to stdout and sharktail client
```sh
for /L %n in (1,1,10) do (sleep 1 & echo %n) | sharktail
```
Dummy loop in ```bash``` and pipe to stdout and sharktail client
```sh
for i in {1..10}; do echo $i && sleep 1; done | sharktail
```
Dummy loop in ```python``` and pipe to stdout and sharktail client.
- Please note the usage of `-u`. Without it, all output will be displayed when the program execution is over instead of real-time. Flushing the stdout after every print statement is required to fix this, but it can be burdensome so using `-u` is more convenient.
```sh
python -u dummy_out.py | sharktail --delay 5
```
where dummy_out.py is
```python
import time
import sys
for i in range(10):
print("hello {}".format(i))
time.sleep(1)
```
-Have time to see URL before full-screen command:
$ echo "hello" | sharktail --delay 5
## Author

@@ -31,2 +64,2 @@

Inspired by [seashells.io](seashells.io) and its node js client [https://github.com/roccomuso/seashells](https://github.com/roccomuso/seashells)
Inspired by [seashells.io](seashells.io). This client command is modified heavily from [https://github.com/roccomuso/seashells](https://github.com/roccomuso/seashells). Credits go to them.

@@ -18,5 +18,12 @@ var argv = require('yargs')

})
.option('delay', {
alias: 'd',
demand: false,
describe: 'seconds of delay before having the stdout shown',
type: 'number'
})
.example('echo "hello" | sharktail')
.example('echo "hello" | sharktail --host myHost.io --port 1337')
.example('echo "hello" | sharktail --host 127.0.0.1 --port 2390')
.example('echo "hello" | sharktail --host 127.0.0.1 --port 2390 --delay 5')
.epilogue('@Author: Yigit Alparslan - github.com/ya332/sharktail - @Copyright 2021')

@@ -23,0 +30,0 @@ .argv

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc