unplugin-https-reverse-proxy 1.0.0-beta.3 → 1.0.0-beta.4

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.
@@ -354,6 +354,9 @@ var CaddyInstant = class {
354
354
  });
355
355
  const originalExit = process3.exit.bind(process3);
356
356
  process3.exit = async (code) => {
357
+ const port = Number(source.split(":")[1]);
358
+ if (!Number.isNaN(port) && await tryPort(port))
359
+ await kill(port, "tcp");
357
360
  if (!restore || this.stoped)
358
361
  return originalExit(code);
359
362
  try {
package/dist/esbuild.cjs CHANGED
@@ -436,6 +436,9 @@ var CaddyInstant = class {
436
436
  });
437
437
  const originalExit = import_node_process4.default.exit.bind(import_node_process4.default);
438
438
  import_node_process4.default.exit = async (code) => {
439
+ const port = Number(source.split(":")[1]);
440
+ if (!Number.isNaN(port) && await tryPort(port))
441
+ await (0, import_kill_port.default)(port, "tcp");
439
442
  if (!restore || this.stoped)
440
443
  return originalExit(code);
441
444
  try {
package/dist/esbuild.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unpluginFactory
3
- } from "./chunk-ZAZWZOPZ.js";
3
+ } from "./chunk-GAKOA5LE.js";
4
4
  import "./chunk-RUJE3YFB.js";
5
5
 
6
6
  // src/esbuild.ts
package/dist/index.cjs CHANGED
@@ -436,6 +436,9 @@ var CaddyInstant = class {
436
436
  });
437
437
  const originalExit = import_node_process4.default.exit.bind(import_node_process4.default);
438
438
  import_node_process4.default.exit = async (code) => {
439
+ const port = Number(source.split(":")[1]);
440
+ if (!Number.isNaN(port) && await tryPort(port))
441
+ await (0, import_kill_port.default)(port, "tcp");
439
442
  if (!restore || this.stoped)
440
443
  return originalExit(code);
441
444
  try {
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  unplugin,
4
4
  unpluginFactory,
5
5
  vitePrintUrls
6
- } from "./chunk-ZAZWZOPZ.js";
6
+ } from "./chunk-GAKOA5LE.js";
7
7
  import "./chunk-RUJE3YFB.js";
8
8
  export {
9
9
  src_default as default,
package/dist/nuxt.cjs CHANGED
@@ -438,6 +438,9 @@ var CaddyInstant = class {
438
438
  });
439
439
  const originalExit = import_node_process4.default.exit.bind(import_node_process4.default);
440
440
  import_node_process4.default.exit = async (code) => {
441
+ const port = Number(source.split(":")[1]);
442
+ if (!Number.isNaN(port) && await tryPort(port))
443
+ await (0, import_kill_port.default)(port, "tcp");
441
444
  if (!restore || this.stoped)
442
445
  return originalExit(code);
443
446
  try {
package/dist/nuxt.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  vitePrintUrls
3
- } from "./chunk-ZAZWZOPZ.js";
3
+ } from "./chunk-GAKOA5LE.js";
4
4
  import {
5
5
  consola,
6
6
  isAdmin
package/dist/rollup.cjs CHANGED
@@ -436,6 +436,9 @@ var CaddyInstant = class {
436
436
  });
437
437
  const originalExit = import_node_process4.default.exit.bind(import_node_process4.default);
438
438
  import_node_process4.default.exit = async (code) => {
439
+ const port = Number(source.split(":")[1]);
440
+ if (!Number.isNaN(port) && await tryPort(port))
441
+ await (0, import_kill_port.default)(port, "tcp");
439
442
  if (!restore || this.stoped)
440
443
  return originalExit(code);
441
444
  try {
package/dist/rollup.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unpluginFactory
3
- } from "./chunk-ZAZWZOPZ.js";
3
+ } from "./chunk-GAKOA5LE.js";
4
4
  import "./chunk-RUJE3YFB.js";
5
5
 
6
6
  // src/rollup.ts
package/dist/vite.cjs CHANGED
@@ -436,6 +436,9 @@ var CaddyInstant = class {
436
436
  });
437
437
  const originalExit = import_node_process4.default.exit.bind(import_node_process4.default);
438
438
  import_node_process4.default.exit = async (code) => {
439
+ const port = Number(source.split(":")[1]);
440
+ if (!Number.isNaN(port) && await tryPort(port))
441
+ await (0, import_kill_port.default)(port, "tcp");
439
442
  if (!restore || this.stoped)
440
443
  return originalExit(code);
441
444
  try {
package/dist/vite.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unpluginFactory
3
- } from "./chunk-ZAZWZOPZ.js";
3
+ } from "./chunk-GAKOA5LE.js";
4
4
  import "./chunk-RUJE3YFB.js";
5
5
 
6
6
  // src/vite.ts
package/dist/webpack.cjs CHANGED
@@ -436,6 +436,9 @@ var CaddyInstant = class {
436
436
  });
437
437
  const originalExit = import_node_process4.default.exit.bind(import_node_process4.default);
438
438
  import_node_process4.default.exit = async (code) => {
439
+ const port = Number(source.split(":")[1]);
440
+ if (!Number.isNaN(port) && await tryPort(port))
441
+ await (0, import_kill_port.default)(port, "tcp");
439
442
  if (!restore || this.stoped)
440
443
  return originalExit(code);
441
444
  try {
package/dist/webpack.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unpluginFactory
3
- } from "./chunk-ZAZWZOPZ.js";
3
+ } from "./chunk-GAKOA5LE.js";
4
4
  import "./chunk-RUJE3YFB.js";
5
5
 
6
6
  // src/webpack.ts
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "unplugin-https-reverse-proxy",
3
3
  "type": "module",
4
- "version": "1.0.0-beta.3",
4
+ "version": "1.0.0-beta.4",
5
5
  "packageManager": "pnpm@8.6.12",
6
6
  "description": "",
7
7
  "license": "MIT",
@@ -166,6 +166,10 @@ export class CaddyInstant {
166
166
 
167
167
  // @ts-expect-error override
168
168
  process.exit = async (code?: number) => {
169
+ const port = Number(source.split(':')[1])
170
+ if (!Number.isNaN(port) && await tryPort(port))
171
+ await kill(port, 'tcp')
172
+
169
173
  if (!restore || this.stoped)
170
174
  return originalExit(code)
171
175