unplugin-https-reverse-proxy 0.0.16 → 0.0.17

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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unpluginFactory
3
- } from "./chunk-G5VIL2MO.js";
3
+ } from "./chunk-X56GIMIN.js";
4
4
 
5
5
  // src/webpack.ts
6
6
  import { createWebpackPlugin } from "unplugin";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unpluginFactory
3
- } from "./chunk-G5VIL2MO.js";
3
+ } from "./chunk-X56GIMIN.js";
4
4
 
5
5
  // src/vite.ts
6
6
  import { createVitePlugin } from "unplugin";
@@ -320,9 +320,9 @@ var CaddyInstant = class {
320
320
  } = options || {};
321
321
  if (!this.inited)
322
322
  await this.init();
323
- if (await tryPort(443))
323
+ if (https && await tryPort(443))
324
324
  await kill(443, "tcp");
325
- if (process2.platform === "win32" && await tryPort(80))
325
+ if ((process2.platform === "win32" || !https) && await tryPort(80))
326
326
  await kill(80, "tcp");
327
327
  if (!await this.updateHost(source.split(":")[0], target.split(":")[0]))
328
328
  throw new Error("update host failed");
package/dist/esbuild.cjs CHANGED
@@ -380,9 +380,9 @@ var CaddyInstant = class {
380
380
  } = options || {};
381
381
  if (!this.inited)
382
382
  await this.init();
383
- if (await tryPort(443))
383
+ if (https && await tryPort(443))
384
384
  await (0, import_kill_port.default)(443, "tcp");
385
- if (import_node_process2.default.platform === "win32" && await tryPort(80))
385
+ if ((import_node_process2.default.platform === "win32" || !https) && await tryPort(80))
386
386
  await (0, import_kill_port.default)(80, "tcp");
387
387
  if (!await this.updateHost(source.split(":")[0], target.split(":")[0]))
388
388
  throw new Error("update host failed");
package/dist/esbuild.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unpluginFactory
3
- } from "./chunk-G5VIL2MO.js";
3
+ } from "./chunk-X56GIMIN.js";
4
4
  import "./chunk-CQC5SSJR.js";
5
5
 
6
6
  // src/esbuild.ts
package/dist/index.cjs CHANGED
@@ -379,9 +379,9 @@ var CaddyInstant = class {
379
379
  } = options || {};
380
380
  if (!this.inited)
381
381
  await this.init();
382
- if (await tryPort(443))
382
+ if (https && await tryPort(443))
383
383
  await (0, import_kill_port.default)(443, "tcp");
384
- if (import_node_process2.default.platform === "win32" && await tryPort(80))
384
+ if ((import_node_process2.default.platform === "win32" || !https) && await tryPort(80))
385
385
  await (0, import_kill_port.default)(80, "tcp");
386
386
  if (!await this.updateHost(source.split(":")[0], target.split(":")[0]))
387
387
  throw new Error("update host failed");
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  src_default,
3
3
  unplugin,
4
4
  unpluginFactory
5
- } from "./chunk-G5VIL2MO.js";
5
+ } from "./chunk-X56GIMIN.js";
6
6
  import "./chunk-CQC5SSJR.js";
7
7
  export {
8
8
  src_default as default,
package/dist/nuxt.cjs CHANGED
@@ -383,9 +383,9 @@ var CaddyInstant = class {
383
383
  } = options || {};
384
384
  if (!this.inited)
385
385
  await this.init();
386
- if (await tryPort(443))
386
+ if (https && await tryPort(443))
387
387
  await (0, import_kill_port.default)(443, "tcp");
388
- if (import_node_process2.default.platform === "win32" && await tryPort(80))
388
+ if ((import_node_process2.default.platform === "win32" || !https) && await tryPort(80))
389
389
  await (0, import_kill_port.default)(80, "tcp");
390
390
  if (!await this.updateHost(source.split(":")[0], target.split(":")[0]))
391
391
  throw new Error("update host failed");
package/dist/nuxt.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  vite_default
3
- } from "./chunk-HWUN3C5Q.js";
3
+ } from "./chunk-QRPGIR3T.js";
4
4
  import {
5
5
  webpack_default
6
- } from "./chunk-MPY62XIL.js";
7
- import "./chunk-G5VIL2MO.js";
6
+ } from "./chunk-7YCZMCZN.js";
7
+ import "./chunk-X56GIMIN.js";
8
8
  import "./chunk-CQC5SSJR.js";
9
9
 
10
10
  // src/nuxt.ts
package/dist/rollup.cjs CHANGED
@@ -380,9 +380,9 @@ var CaddyInstant = class {
380
380
  } = options || {};
381
381
  if (!this.inited)
382
382
  await this.init();
383
- if (await tryPort(443))
383
+ if (https && await tryPort(443))
384
384
  await (0, import_kill_port.default)(443, "tcp");
385
- if (import_node_process2.default.platform === "win32" && await tryPort(80))
385
+ if ((import_node_process2.default.platform === "win32" || !https) && await tryPort(80))
386
386
  await (0, import_kill_port.default)(80, "tcp");
387
387
  if (!await this.updateHost(source.split(":")[0], target.split(":")[0]))
388
388
  throw new Error("update host failed");
package/dist/rollup.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unpluginFactory
3
- } from "./chunk-G5VIL2MO.js";
3
+ } from "./chunk-X56GIMIN.js";
4
4
  import "./chunk-CQC5SSJR.js";
5
5
 
6
6
  // src/rollup.ts
package/dist/vite.cjs CHANGED
@@ -380,9 +380,9 @@ var CaddyInstant = class {
380
380
  } = options || {};
381
381
  if (!this.inited)
382
382
  await this.init();
383
- if (await tryPort(443))
383
+ if (https && await tryPort(443))
384
384
  await (0, import_kill_port.default)(443, "tcp");
385
- if (import_node_process2.default.platform === "win32" && await tryPort(80))
385
+ if ((import_node_process2.default.platform === "win32" || !https) && await tryPort(80))
386
386
  await (0, import_kill_port.default)(80, "tcp");
387
387
  if (!await this.updateHost(source.split(":")[0], target.split(":")[0]))
388
388
  throw new Error("update host failed");
package/dist/vite.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  vite_default
3
- } from "./chunk-HWUN3C5Q.js";
4
- import "./chunk-G5VIL2MO.js";
3
+ } from "./chunk-QRPGIR3T.js";
4
+ import "./chunk-X56GIMIN.js";
5
5
  import "./chunk-CQC5SSJR.js";
6
6
  export {
7
7
  vite_default as default
package/dist/webpack.cjs CHANGED
@@ -380,9 +380,9 @@ var CaddyInstant = class {
380
380
  } = options || {};
381
381
  if (!this.inited)
382
382
  await this.init();
383
- if (await tryPort(443))
383
+ if (https && await tryPort(443))
384
384
  await (0, import_kill_port.default)(443, "tcp");
385
- if (import_node_process2.default.platform === "win32" && await tryPort(80))
385
+ if ((import_node_process2.default.platform === "win32" || !https) && await tryPort(80))
386
386
  await (0, import_kill_port.default)(80, "tcp");
387
387
  if (!await this.updateHost(source.split(":")[0], target.split(":")[0]))
388
388
  throw new Error("update host failed");
package/dist/webpack.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  webpack_default
3
- } from "./chunk-MPY62XIL.js";
4
- import "./chunk-G5VIL2MO.js";
3
+ } from "./chunk-7YCZMCZN.js";
4
+ import "./chunk-X56GIMIN.js";
5
5
  import "./chunk-CQC5SSJR.js";
6
6
  export {
7
7
  webpack_default as default
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "unplugin-https-reverse-proxy",
3
3
  "type": "module",
4
- "version": "0.0.16",
4
+ "version": "0.0.17",
5
5
  "packageManager": "pnpm@8.6.12",
6
6
  "description": "",
7
7
  "license": "MIT",
@@ -175,9 +175,9 @@ export class CaddyInstant {
175
175
  if (!this.inited)
176
176
  await this.init()
177
177
 
178
- if (await tryPort(443))
178
+ if (https && await tryPort(443))
179
179
  await kill(443, 'tcp')
180
- if (process.platform === 'win32' && await tryPort(80))
180
+ if ((process.platform === 'win32' || !https) && await tryPort(80))
181
181
  await kill(80, 'tcp')
182
182
 
183
183
  if (!await this.updateHost(source.split(':')[0], target.split(':')[0]))