Skip to content
This repository was archived by the owner on May 13, 2025. It is now read-only.

Commit b9e2702

Browse files
Jeppe Stærkjeppestaerk
authored andcommitted
Bump dependencies
1 parent c21ad79 commit b9e2702

6 files changed

Lines changed: 4198 additions & 734 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
language: node_js
22
node_js:
3-
- '8'
3+
- '14'
-125 KB
Binary file not shown.

index.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
'use strict';
2-
const publicIp = require('public-ip');
3-
const internalIp = require('internal-ip');
4-
const defaultGateway = require('default-gateway');
5-
const localDevices = require('local-devices');
6-
const alfy = require('alfy');
2+
import publicIp from "public-ip";
3+
import alfy from 'alfy';
4+
import findLocalDevices from "local-devices";
5+
import defaultGateway from "default-gateway";
6+
import {internalIpV4, internalIpV6} from "internal-ip";
77

88
const promises = [];
99
const output = [];
@@ -59,14 +59,14 @@ function addIPOutput(type, ip, name, mac) {
5959
if (alfy.input.split(" ")[0].toLowerCase() === 'ssh') {
6060
addOutput(`Type ssh username for ${alfy.input.split(" ")[1]}`, `ssh ${alfy.input.split(" ")[2] || 'root'}@${alfy.input.split(" ")[1]}`, `ssh ${alfy.input.split(" ")[2] || 'root'}@${alfy.input.split(" ")[1]}`, 'Public', 'ssh')
6161
} else if (alfy.input.toLowerCase() === 'scan') {
62-
promises.push(localDevices().then(devices => devices.forEach(device => addIPOutput('Device', device.ip, device.name, device.mac))).catch(() => addIPOutput('No local devices found', 'Local')));
62+
promises.push(findLocalDevices().then(devices => devices.forEach(device => addIPOutput('Device', device.ip, device.name, device.mac))).catch(() => addIPOutput('No local devices found', 'Local')));
6363
} else if (alfy.input.toLowerCase() === 'ipv6') {
6464
if (process.env['show_public'] === 'true') promises.push(publicIp.v6().then(ip => addIPOutput('Public', ip, '', '')).catch(() => addIPOutput('Public', 'IPv6 not found', '', '')));
65-
if (process.env['show_local'] === 'true') promises.push(internalIp.v6().then(ip => addIPOutput('Internal', ip, '', '')).catch(() => addIPOutput('Internal', 'IPv6 not found', '', '')));
65+
if (process.env['show_local'] === 'true') promises.push(internalIpV6().then(ip => addIPOutput('Internal', ip, '', '')).catch(() => addIPOutput('Internal', 'IPv6 not found', '', '')));
6666
if (process.env['show_gateway'] === 'true') promises.push(defaultGateway.v6().then(ip => addIPOutput('Gateway', ip.gateway, '', '')).catch(() => addIPOutput('Gateway', 'IPv6 not found', '', '')));
6767
} else {
6868
if (process.env['show_public'] === 'true') promises.push(publicIp.v4().then(ip => addIPOutput('Public', ip, '', '')).catch(() => addIPOutput('Public', 'IPv4 not found', '', '')));
69-
if (process.env['show_local'] === 'true') promises.push(internalIp.v4().then(ip => addIPOutput('Internal', ip, '', '')).catch(() => addIPOutput('Internal', 'IPv4 not found', '', '')));
69+
if (process.env['show_local'] === 'true') promises.push(internalIpV4().then(ip => addIPOutput('Internal', ip, '', '')).catch(() => addIPOutput('Internal', 'IPv4 not found', '', '')));
7070
if (process.env['show_gateway'] === 'true') promises.push(defaultGateway.v4().then(ip => addIPOutput('Gateway', ip.gateway, '', '')).catch(() => addIPOutput('Gateway', 'IPv4 not found', '', '')));
7171
}
7272

info.plist

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,8 @@
159159
<false/>
160160
<key>clipboardtext</key>
161161
<string>{query}</string>
162+
<key>ignoredynamicplaceholders</key>
163+
<false/>
162164
<key>transient</key>
163165
<false/>
164166
</dict>
@@ -374,29 +376,7 @@
374376
</dict>
375377
</array>
376378
<key>readme</key>
377-
<string># alfred-show-network-info
378-
&gt; Alfred 3 workflow to see network info and discover local devices
379-
380-
## Usage:
381-
In Alfred, type `ip4`, ⏎
382-
- press ⏎ to copy a ip address.
383-
- press ⌘ + ⏎ to open ip address in browser.
384-
- press ⌥ + ⏎ to connect to ip address via ssh.
385-
386-
## Highlights:
387-
- See local-, public-, and gateway ip address.
388-
- Scan and list all devices on local network.
389-
- Copy ip to clipboard.
390-
- Open ip in browser.
391-
- Connect to ip via ssh.
392-
- Toggle functions via Workflow Variables.
393-
394-
## Contributions:
395-
Please feel free to create a PR and/or make a code review!
396-
[GitHub Repository](https://github.com/jeppestaerk/alfred-show-network-info)
397-
398-
## License
399-
MIT © [Jeppe Stærk](https://staerk.io)</string>
379+
<string># alfred-show-network-info &gt; Alfred 4 workflow to see network info and discover local devices ## Usage: In Alfred, type `ip4`, ⏎ - press ⏎ to copy a ip address. - press ⌘ + ⏎ to open ip address in browser. - press ⌥ + ⏎ to connect to ip address via ssh. ## Highlights: - See local-, public-, and gateway ip address. - Scan and list all devices on local network. - Copy ip to clipboard. - Open ip in browser. - Connect to ip via ssh. - Toggle functions via Workflow Variables. ## Contributions: Please feel free to create a PR and/or make a code review! [GitHub Repository](https://github.com/jeppestaerk/alfred-show-network-info) ## License MIT © [Jeppe Stærk](https://staerk.io)</string>
400380
<key>uidata</key>
401381
<dict>
402382
<key>5571A359-C2D3-4C6A-9ED7-DA4600F570F4</key>
@@ -499,7 +479,7 @@ MIT © [Jeppe Stærk](https://staerk.io)</string>
499479
<key>variablesdontexport</key>
500480
<array/>
501481
<key>version</key>
502-
<string>0.2.0</string>
482+
<string>0.3.1</string>
503483
<key>webaddress</key>
504484
<string>https://github.com/jeppestaerk/alfred-show-network-info#readme</string>
505485
</dict>

0 commit comments

Comments
 (0)