@ayankhandelwal07/local-loop 1.1.9 → 1.2.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/dist/index.js +9 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -8,10 +8,10 @@ const commander_1 = require("commander");
8
8
  const socket_io_client_1 = require("socket.io-client");
9
9
  const axios_1 = __importDefault(require("axios"));
10
10
  const chalk_1 = __importDefault(require("chalk"));
11
- const PRODUCTION_SERVER = 'https://localloop-server.onrender.com';
12
- const PRODUCTION_DASHBOARD_URL = 'https://local-loop-gamma.vercel.app';
13
- // const PRODUCTION_SERVER = 'http://localhost:3000';
14
- // const PRODUCTION_DASHBOARD_URL = 'http://localhost:5173'
11
+ // const PRODUCTION_SERVER = 'https://localloop-server.onrender.com';
12
+ // const PRODUCTION_DASHBOARD_URL = 'https://local-loop-gamma.vercel.app'
13
+ const PRODUCTION_SERVER = 'http://localhost:3000';
14
+ const PRODUCTION_DASHBOARD_URL = 'http://localhost:5173';
15
15
  let heartbeatInterval;
16
16
  const program = new commander_1.Command();
17
17
  program
@@ -20,6 +20,7 @@ program
20
20
  .option('-s, --subdomain <string>', 'Desired subdomain', 'random-dev')
21
21
  .option('-h, --host <string>', 'Proxy Server URL', process.env.PROXY_HOST || PRODUCTION_SERVER)
22
22
  .option('-k, --key <string>', 'Your Api Key')
23
+ .option('-a, --auth <string>', 'Basic Auth (user:password)')
23
24
  .parse(process.argv);
24
25
  const options = program.opts();
25
26
  const LOCAL_TARGET = `http://localhost:${options.port}`;
@@ -35,7 +36,10 @@ const socket = (0, socket_io_client_1.io)(PROXY_URL, {
35
36
  socket.on('connect', () => {
36
37
  console.log(chalk_1.default.green(`\nāœ… Connected to Proxy!`));
37
38
  console.log(`Registering subdomain: ${chalk_1.default.bold(options.subdomain)}...`);
38
- socket.emit('register', options.subdomain);
39
+ socket.emit('register', {
40
+ subdomain: options.subdomain,
41
+ auth: options.auth
42
+ });
39
43
  });
40
44
  socket.on('registered', (data) => {
41
45
  console.log(chalk_1.default.green(`\nšŸŽ‰ Tunnel Live at: ${chalk_1.default.bold(data.url)}`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ayankhandelwal07/local-loop",
3
- "version": "1.1.9",
3
+ "version": "1.2.0",
4
4
  "bin": {
5
5
  "super-loop": "dist/index.js"
6
6
  },