windscout 0.3.0 → 0.3.1

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/README.md CHANGED
@@ -74,6 +74,7 @@ windscout -t 40 -a # longer connect timeout, also list
74
74
  | `-t, --timeout` | seconds to wait for each connection | 20 |
75
75
  | `-a, --all` | include failed attempts in the final table | off |
76
76
  | `-n, --no-speed` | connect-only mode: skip the download test, rank by latency | saved, or off |
77
+ | `-v, --version` | print the installed version, and the update command if a newer one is on npm | |
77
78
 
78
79
  ## Connect-only mode
79
80
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "windscout",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Find which Windscribe locations and protocols work from your network, ranked by speed (unofficial)",
5
5
  "type": "module",
6
6
  "bin": {
package/windscout.js CHANGED
@@ -754,6 +754,7 @@ Options:
754
754
  -t, --timeout SEC seconds to wait for each connection (default: 20)
755
755
  -a, --all also show failed attempts in the final table
756
756
  -n, --no-speed connect-only: skip the download test, rank by latency (faster scan)
757
+ -v, --version show the installed version (and whether a newer one is out)
757
758
  -h, --help show this help
758
759
 
759
760
  Selection is stored in ${CONFIG}
@@ -767,11 +768,17 @@ async function main() {
767
768
  timeout: { type: "string", short: "t", default: "20" },
768
769
  all: { type: "boolean", short: "a", default: false },
769
770
  help: { type: "boolean", short: "h", default: false },
771
+ version: { type: "boolean", short: "v", default: false },
770
772
  "no-speed": { type: "boolean", short: "n", default: false },
771
773
  },
772
774
  });
773
775
  if (a.help) return console.log(HELP);
774
776
  updateCheck = checkUpdate(); // runs while the app starts and the user picks, before the VPN starts switching
777
+ if (a.version) {
778
+ console.log(`windscout ${VERSION}`);
779
+ await updateCheck;
780
+ return update && console.error(yellow(updateNotice()));
781
+ }
775
782
  const timeout = Number(a.timeout);
776
783
  if (!(timeout > 0)) throw new Error("--timeout must be a positive number");
777
784