runlocal 0.6.0 → 0.7.0

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.
Files changed (2) hide show
  1. package/lib.js +12 -11
  2. package/package.json +2 -2
package/lib.js CHANGED
@@ -31,7 +31,7 @@ function parseArgs(argv) {
31
31
  let apiKey = process.env.RUNLATER_API_KEY || readApiKeyFile();
32
32
  let subdomain = null;
33
33
  for (let i = 0; i < argv.length; i++) {
34
- if (argv[i] === "--host" && argv[i + 1]) {
34
+ if ((argv[i] === "--server" || argv[i] === "--host") && argv[i + 1]) {
35
35
  host = argv[++i];
36
36
  } else if (argv[i] === "--api-key" && argv[i + 1]) {
37
37
  apiKey = argv[++i];
@@ -40,26 +40,27 @@ function parseArgs(argv) {
40
40
  } else if (argv[i] === "--help" || argv[i] === "-h") {
41
41
  console.log("Usage: runlocal <port> [options]");
42
42
  console.log("");
43
- console.log(" Expose localhost to the internet via runlocal.eu");
43
+ console.log(" Expose localhost to the internet. Works with runlocal.eu");
44
+ console.log(" or any self-hosted runlocal server.");
44
45
  console.log("");
45
46
  console.log("Options:");
46
- console.log(" --host <url> Server URL (default: wss://runlocal.eu)");
47
+ console.log(" --server <url> Server URL (default: wss://runlocal.eu)");
47
48
  console.log(" --api-key <key> Runlater API key for stable subdomain");
48
- console.log(" --subdomain <name> Custom subdomain (Pro plan only)");
49
+ console.log(" --subdomain <name> Request a specific subdomain");
49
50
  console.log(" --help, -h Show this help");
50
51
  console.log("");
51
- console.log("API key (checked in order):");
52
- console.log(" 1. --api-key flag");
53
- console.log(" 2. RUNLATER_API_KEY environment variable");
54
- console.log(" 3. ~/.runlater/api-key file");
52
+ console.log("Environment variables:");
53
+ console.log(" RUNLOCAL_HOST Server URL (same as --server)");
54
+ console.log(" RUNLATER_API_KEY API key (same as --api-key)");
55
55
  console.log("");
56
56
  console.log("Examples:");
57
57
  console.log(" npx runlocal 3000 Random subdomain");
58
58
  console.log(" npx runlocal 3000 --api-key pk_xxx Stable subdomain");
59
- console.log(" npx runlocal 3000 --subdomain my-api Custom subdomain (Pro)");
59
+ console.log(" npx runlocal 3000 --subdomain my-api Custom subdomain");
60
+ console.log(" npx runlocal 3000 --server wss://tunnel.example.com Self-hosted");
60
61
  console.log("");
61
- console.log("A free runlater.eu account gives you a stable subdomain.");
62
- console.log("Pro users can choose any available subdomain with --subdomain.");
62
+ console.log("Self-hosting: https://github.com/runlater-eu/runlocal");
63
+ console.log("Hosted version: https://runlocal.eu");
63
64
  process.exit(0);
64
65
  } else if (!argv[i].startsWith("-")) {
65
66
  port = parseInt(argv[i], 10);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "runlocal",
3
- "version": "0.6.0",
4
- "description": "Expose localhost to the internet via runlocal.eu",
3
+ "version": "0.7.0",
4
+ "description": "Expose localhost to the internet open source tunnel server",
5
5
  "bin": {
6
6
  "runlocal": "./index.js"
7
7
  },