pinggy 0.3.10 → 0.4.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/dist/index.cjs CHANGED
@@ -3107,7 +3107,7 @@ function parseExtendedOptions(options, config, localServerTls) {
3107
3107
  case "r":
3108
3108
  if (value) {
3109
3109
  if (!config.headerModification) config.headerModification = [];
3110
- config.headerModification.push({ type: "remove", key: value });
3110
+ config.headerModification.push({ type: "remove", key: value, value: [] });
3111
3111
  } else {
3112
3112
  printer_default.warn(`Extended option "${opt}" for 'r' requires a key`);
3113
3113
  }
@@ -3413,16 +3413,19 @@ function parseLocalTunnelAddr(finalConfig, values) {
3413
3413
  if (!Array.isArray(values.L) || values.L.length === 0) return null;
3414
3414
  const firstL = values.L[0];
3415
3415
  const parts = firstL.split(":");
3416
+ let lp;
3416
3417
  if (parts.length === 3) {
3417
- const lp = parseInt(parts[0], 10);
3418
- if (!Number.isNaN(lp) && isValidPort(lp)) {
3419
- finalConfig.webDebugger = `localhost:${lp}`;
3420
- } else {
3421
- return new Error(`Invalid debugger port ${lp}`);
3422
- }
3418
+ lp = parseInt(parts[0], 10);
3419
+ } else if (parts.length === 4) {
3420
+ lp = parseInt(parts[1], 10);
3423
3421
  } else {
3424
3422
  return new Error("Incorrect command line arguments: web debugger address incorrect. Please use '-h' option for help.");
3425
3423
  }
3424
+ if (!Number.isNaN(lp) && isValidPort(lp)) {
3425
+ finalConfig.webDebugger = `localhost:${lp}`;
3426
+ } else {
3427
+ return new Error(`Invalid debugger port ${lp}`);
3428
+ }
3426
3429
  }
3427
3430
  function parseDebugger(finalConfig, values) {
3428
3431
  let dbg = values.debugger;
package/dist/index.js CHANGED
@@ -104,7 +104,7 @@ async function verifyAndLoad() {
104
104
  process.exit(1);
105
105
  }
106
106
  }
107
- await import("./main-VCUAV22W.js");
107
+ await import("./main-X7XBLBTU.js");
108
108
  }
109
109
  verifyAndLoad().catch((err) => {
110
110
  printer_default.error(`Failed to start CLI:, ${err}`);
@@ -214,7 +214,7 @@ function parseExtendedOptions(options, config, localServerTls) {
214
214
  case "r":
215
215
  if (value) {
216
216
  if (!config.headerModification) config.headerModification = [];
217
- config.headerModification.push({ type: "remove", key: value });
217
+ config.headerModification.push({ type: "remove", key: value, value: [] });
218
218
  } else {
219
219
  printer_default.warn(`Extended option "${opt}" for 'r' requires a key`);
220
220
  }
@@ -524,16 +524,19 @@ function parseLocalTunnelAddr(finalConfig, values) {
524
524
  if (!Array.isArray(values.L) || values.L.length === 0) return null;
525
525
  const firstL = values.L[0];
526
526
  const parts = firstL.split(":");
527
+ let lp;
527
528
  if (parts.length === 3) {
528
- const lp = parseInt(parts[0], 10);
529
- if (!Number.isNaN(lp) && isValidPort(lp)) {
530
- finalConfig.webDebugger = `localhost:${lp}`;
531
- } else {
532
- return new Error(`Invalid debugger port ${lp}`);
533
- }
529
+ lp = parseInt(parts[0], 10);
530
+ } else if (parts.length === 4) {
531
+ lp = parseInt(parts[1], 10);
534
532
  } else {
535
533
  return new Error("Incorrect command line arguments: web debugger address incorrect. Please use '-h' option for help.");
536
534
  }
535
+ if (!Number.isNaN(lp) && isValidPort(lp)) {
536
+ finalConfig.webDebugger = `localhost:${lp}`;
537
+ } else {
538
+ return new Error(`Invalid debugger port ${lp}`);
539
+ }
537
540
  }
538
541
  function parseDebugger(finalConfig, values) {
539
542
  let dbg = values.debugger;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinggy",
3
- "version": "0.3.10",
3
+ "version": "0.4.2",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "description": "Create secure, shareable tunnels to your localhost and manage them from the command line. ",
@@ -51,7 +51,7 @@
51
51
  ]
52
52
  },
53
53
  "dependencies": {
54
- "@pinggy/pinggy": "^0.3.8",
54
+ "@pinggy/pinggy": "^0.4.1",
55
55
  "blessed": "^0.1.81",
56
56
  "clipboardy": "^5.0.0",
57
57
  "mime": "^4.1.0",