poke 0.0.0 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +16 -14
- package/src/cli.js +21 -0
- package/README.md +0 -38
- package/poke.js +0 -25
package/package.json
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
{
|
|
2
|
-
"author": "Cam Pedersen <diffference@gmail.com> (http://campedersen.com/)",
|
|
3
2
|
"name": "poke",
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "Poke CLI - Coming Soon",
|
|
5
|
+
"bin": {
|
|
6
|
+
"poke": "./src/cli.js"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"src"
|
|
10
|
+
],
|
|
11
|
+
"keywords": [
|
|
12
|
+
"poke",
|
|
13
|
+
"cli"
|
|
14
|
+
],
|
|
15
|
+
"license": "MIT",
|
|
6
16
|
"repository": {
|
|
7
17
|
"type": "git",
|
|
8
|
-
"url": "
|
|
18
|
+
"url": "https://github.com/anthropics/interaction"
|
|
9
19
|
},
|
|
10
20
|
"engines": {
|
|
11
|
-
"node": "
|
|
12
|
-
}
|
|
13
|
-
"bin": {
|
|
14
|
-
"poke": "poke.js"
|
|
15
|
-
},
|
|
16
|
-
"dependencies": {
|
|
17
|
-
"mdns": "*",
|
|
18
|
-
"colors": "*"
|
|
19
|
-
},
|
|
20
|
-
"devDependencies": {}
|
|
21
|
+
"node": ">=16"
|
|
22
|
+
}
|
|
21
23
|
}
|
package/src/cli.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const palmTree = `
|
|
4
|
+
__ _.--..--._ _
|
|
5
|
+
.-' _/ _/\\_ \\_'-.
|
|
6
|
+
|__ / _/\\__/\\_ \\___|
|
|
7
|
+
|___/\\__\\__/ \\___|
|
|
8
|
+
\\__/
|
|
9
|
+
\\__/
|
|
10
|
+
\\__/
|
|
11
|
+
\\__/
|
|
12
|
+
____\\__/___
|
|
13
|
+
. - ' ' -.
|
|
14
|
+
/ \\
|
|
15
|
+
~~~~~~~ ~~~~~ ~~~~~ ~~~ ~~~ ~~~~~
|
|
16
|
+
~~~ ~~~~~ ~~~~ ~~ ~ ~ ~ ~~~
|
|
17
|
+
|
|
18
|
+
coming soon
|
|
19
|
+
`;
|
|
20
|
+
|
|
21
|
+
console.log(palmTree);
|
package/README.md
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
#poke
|
|
2
|
-
|
|
3
|
-
find all local network services being broadcast over mDNS
|
|
4
|
-
|
|
5
|
-

|
|
6
|
-
|
|
7
|
-
##install
|
|
8
|
-
|
|
9
|
-
npm install -g poke
|
|
10
|
-
|
|
11
|
-
##usage
|
|
12
|
-
|
|
13
|
-
poke
|
|
14
|
-
|
|
15
|
-
##result
|
|
16
|
-
|
|
17
|
-
a list similar to this:
|
|
18
|
-
|
|
19
|
-
````
|
|
20
|
-
60C547073F8C@jasonlbaptiste’s MacBook Air
|
|
21
|
-
tcp raop
|
|
22
|
-
10.0.0.185:5000
|
|
23
|
-
jasonlbaptistes-MacBook-Air.local.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
Apple TV (2)
|
|
27
|
-
tcp airplay
|
|
28
|
-
10.0.0.41:7000
|
|
29
|
-
Apple-TV-2.local.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
40-27-84-85 TRON’s Mac Pro
|
|
33
|
-
udp sleep-proxy
|
|
34
|
-
10.0.0.8:52395
|
|
35
|
-
TRONs-Mac-Pro.local.
|
|
36
|
-
|
|
37
|
-
...
|
|
38
|
-
````
|
package/poke.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
var mdns = require('mdns');
|
|
3
|
-
var colors = require('colors');
|
|
4
|
-
var sbrowser = mdns.browseThemAll();
|
|
5
|
-
|
|
6
|
-
sbrowser.on('serviceUp', function(s) {
|
|
7
|
-
var b = mdns.createBrowser(mdns[s.type.protocol](s.type.name))
|
|
8
|
-
b.on('serviceUp', logPoint);
|
|
9
|
-
b.start();
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
sbrowser.start();
|
|
13
|
-
|
|
14
|
-
var logPoint = function (p) {
|
|
15
|
-
console.log('\n\n' + p.name.blue);
|
|
16
|
-
console.log(' ' + p.type.protocol.grey + ' ' + p.type.name);
|
|
17
|
-
console.log(' ' + p.addresses[0] + ':' + p.port);
|
|
18
|
-
console.log(' ' + p.host.grey);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// hack for mdns library
|
|
22
|
-
// it correctly doesn't allow service types with
|
|
23
|
-
// names longer than 14 characters, but it's not
|
|
24
|
-
// worth crashing the process for
|
|
25
|
-
process.on('uncaughtException', console.log);
|