traforo 0.2.4 → 0.2.5

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.
@@ -201,6 +201,7 @@ export async function runTunnel(options) {
201
201
  if (lock && !isLockfileStale(lock)) {
202
202
  const currentCwd = process.cwd();
203
203
  const currentCmd = options.command;
204
+ const restartCommand = `${CLI_NAME} -p ${port} -t ${lock.tunnelId} --kill -- ${shellQuote(currentCmd)}`;
204
205
  const sameCwd = lock.cwd === currentCwd;
205
206
  const sameCmd = lock.command &&
206
207
  lock.command.length === currentCmd.length &&
@@ -216,6 +217,8 @@ export async function runTunnel(options) {
216
217
  console.error(` Started: ${lock.startedAt}\n`);
217
218
  console.error(`The same command in the same directory is already tunneled.`);
218
219
  console.error(`Reuse the tunnel URL above instead of creating a new one.`);
220
+ console.error(`If you want to restart it without changing the tunnel URL for existing consumers, run:`);
221
+ console.error(` ${restartCommand}`);
219
222
  process.exit(1);
220
223
  }
221
224
  else {
@@ -227,9 +230,9 @@ export async function runTunnel(options) {
227
230
  console.error(` Dir: ${lock.cwd}`);
228
231
  console.error(` PID: ${lock.tunnelPid}`);
229
232
  console.error(` Started: ${lock.startedAt}\n`);
230
- console.error(`Use --kill to terminate the existing process and start fresh,`);
233
+ console.error(`Use --kill to terminate the existing process and start fresh while keeping the same tunnel URL,`);
231
234
  console.error(`or just reuse the tunnel URL above instead:\n`);
232
- console.error(` traforo -p ${port} --kill -- ${shellQuote(options.command)}`);
235
+ console.error(` ${restartCommand}`);
233
236
  process.exit(1);
234
237
  }
235
238
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "traforo",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "HTTP tunnel via Cloudflare Durable Objects and WebSockets. Edge caching and password protection.",
5
5
  "type": "module",
6
6
  "license": "MIT",