unplugin-https-reverse-proxy 0.0.14 → 0.0.15

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-IOQLAF3J.js";
3
+ } from "./chunk-EI2YSLDH.js";
4
4
 
5
5
  // src/vite.ts
6
6
  import { createVitePlugin } from "unplugin";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unpluginFactory
3
- } from "./chunk-IOQLAF3J.js";
3
+ } from "./chunk-EI2YSLDH.js";
4
4
 
5
5
  // src/webpack.ts
6
6
  import { createWebpackPlugin } from "unplugin";
@@ -402,10 +402,12 @@ var unpluginFactory = (options) => ({
402
402
  registerExit(async () => {
403
403
  var _a;
404
404
  try {
405
- _servce && _servce.close();
406
- (_a = _servce.httpServer) == null ? void 0 : _a.close(async () => {
407
- _stop && await _stop();
408
- });
405
+ if (_servce) {
406
+ (_a = _servce.httpServer) == null ? void 0 : _a.close(async () => {
407
+ _stop && await _stop();
408
+ });
409
+ _servce.close();
410
+ }
409
411
  _stop && await _stop();
410
412
  } catch (e) {
411
413
  consola.error(e);
@@ -413,6 +415,8 @@ var unpluginFactory = (options) => ({
413
415
  });
414
416
  },
415
417
  configureServer(server) {
418
+ if (config.command === "build")
419
+ return;
416
420
  const {
417
421
  enable = true,
418
422
  target = ""
package/dist/esbuild.cjs CHANGED
@@ -462,10 +462,12 @@ var unpluginFactory = (options) => ({
462
462
  registerExit(async () => {
463
463
  var _a;
464
464
  try {
465
- _servce && _servce.close();
466
- (_a = _servce.httpServer) == null ? void 0 : _a.close(async () => {
467
- _stop && await _stop();
468
- });
465
+ if (_servce) {
466
+ (_a = _servce.httpServer) == null ? void 0 : _a.close(async () => {
467
+ _stop && await _stop();
468
+ });
469
+ _servce.close();
470
+ }
469
471
  _stop && await _stop();
470
472
  } catch (e) {
471
473
  consola.error(e);
@@ -473,6 +475,8 @@ var unpluginFactory = (options) => ({
473
475
  });
474
476
  },
475
477
  configureServer(server) {
478
+ if (config.command === "build")
479
+ return;
476
480
  const {
477
481
  enable = true,
478
482
  target = ""
package/dist/esbuild.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unpluginFactory
3
- } from "./chunk-IOQLAF3J.js";
3
+ } from "./chunk-EI2YSLDH.js";
4
4
  import "./chunk-CQC5SSJR.js";
5
5
 
6
6
  // src/esbuild.ts
package/dist/index.cjs CHANGED
@@ -461,10 +461,12 @@ var unpluginFactory = (options) => ({
461
461
  registerExit(async () => {
462
462
  var _a;
463
463
  try {
464
- _servce && _servce.close();
465
- (_a = _servce.httpServer) == null ? void 0 : _a.close(async () => {
466
- _stop && await _stop();
467
- });
464
+ if (_servce) {
465
+ (_a = _servce.httpServer) == null ? void 0 : _a.close(async () => {
466
+ _stop && await _stop();
467
+ });
468
+ _servce.close();
469
+ }
468
470
  _stop && await _stop();
469
471
  } catch (e) {
470
472
  consola.error(e);
@@ -472,6 +474,8 @@ var unpluginFactory = (options) => ({
472
474
  });
473
475
  },
474
476
  configureServer(server) {
477
+ if (config.command === "build")
478
+ return;
475
479
  const {
476
480
  enable = true,
477
481
  target = ""
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  src_default,
3
3
  unplugin,
4
4
  unpluginFactory
5
- } from "./chunk-IOQLAF3J.js";
5
+ } from "./chunk-EI2YSLDH.js";
6
6
  import "./chunk-CQC5SSJR.js";
7
7
  export {
8
8
  src_default as default,
package/dist/nuxt.cjs CHANGED
@@ -465,10 +465,12 @@ var unpluginFactory = (options) => ({
465
465
  registerExit(async () => {
466
466
  var _a;
467
467
  try {
468
- _servce && _servce.close();
469
- (_a = _servce.httpServer) == null ? void 0 : _a.close(async () => {
470
- _stop && await _stop();
471
- });
468
+ if (_servce) {
469
+ (_a = _servce.httpServer) == null ? void 0 : _a.close(async () => {
470
+ _stop && await _stop();
471
+ });
472
+ _servce.close();
473
+ }
472
474
  _stop && await _stop();
473
475
  } catch (e) {
474
476
  consola.error(e);
@@ -476,6 +478,8 @@ var unpluginFactory = (options) => ({
476
478
  });
477
479
  },
478
480
  configureServer(server) {
481
+ if (config.command === "build")
482
+ return;
479
483
  const {
480
484
  enable = true,
481
485
  target = ""
package/dist/nuxt.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  vite_default
3
- } from "./chunk-YJCVUFTG.js";
3
+ } from "./chunk-6MTK7ADW.js";
4
4
  import {
5
5
  webpack_default
6
- } from "./chunk-5OTBSQ6U.js";
7
- import "./chunk-IOQLAF3J.js";
6
+ } from "./chunk-EDUM4QD7.js";
7
+ import "./chunk-EI2YSLDH.js";
8
8
  import "./chunk-CQC5SSJR.js";
9
9
 
10
10
  // src/nuxt.ts
package/dist/rollup.cjs CHANGED
@@ -462,10 +462,12 @@ var unpluginFactory = (options) => ({
462
462
  registerExit(async () => {
463
463
  var _a;
464
464
  try {
465
- _servce && _servce.close();
466
- (_a = _servce.httpServer) == null ? void 0 : _a.close(async () => {
467
- _stop && await _stop();
468
- });
465
+ if (_servce) {
466
+ (_a = _servce.httpServer) == null ? void 0 : _a.close(async () => {
467
+ _stop && await _stop();
468
+ });
469
+ _servce.close();
470
+ }
469
471
  _stop && await _stop();
470
472
  } catch (e) {
471
473
  consola.error(e);
@@ -473,6 +475,8 @@ var unpluginFactory = (options) => ({
473
475
  });
474
476
  },
475
477
  configureServer(server) {
478
+ if (config.command === "build")
479
+ return;
476
480
  const {
477
481
  enable = true,
478
482
  target = ""
package/dist/rollup.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unpluginFactory
3
- } from "./chunk-IOQLAF3J.js";
3
+ } from "./chunk-EI2YSLDH.js";
4
4
  import "./chunk-CQC5SSJR.js";
5
5
 
6
6
  // src/rollup.ts
package/dist/vite.cjs CHANGED
@@ -462,10 +462,12 @@ var unpluginFactory = (options) => ({
462
462
  registerExit(async () => {
463
463
  var _a;
464
464
  try {
465
- _servce && _servce.close();
466
- (_a = _servce.httpServer) == null ? void 0 : _a.close(async () => {
467
- _stop && await _stop();
468
- });
465
+ if (_servce) {
466
+ (_a = _servce.httpServer) == null ? void 0 : _a.close(async () => {
467
+ _stop && await _stop();
468
+ });
469
+ _servce.close();
470
+ }
469
471
  _stop && await _stop();
470
472
  } catch (e) {
471
473
  consola.error(e);
@@ -473,6 +475,8 @@ var unpluginFactory = (options) => ({
473
475
  });
474
476
  },
475
477
  configureServer(server) {
478
+ if (config.command === "build")
479
+ return;
476
480
  const {
477
481
  enable = true,
478
482
  target = ""
package/dist/vite.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  vite_default
3
- } from "./chunk-YJCVUFTG.js";
4
- import "./chunk-IOQLAF3J.js";
3
+ } from "./chunk-6MTK7ADW.js";
4
+ import "./chunk-EI2YSLDH.js";
5
5
  import "./chunk-CQC5SSJR.js";
6
6
  export {
7
7
  vite_default as default
package/dist/webpack.cjs CHANGED
@@ -462,10 +462,12 @@ var unpluginFactory = (options) => ({
462
462
  registerExit(async () => {
463
463
  var _a;
464
464
  try {
465
- _servce && _servce.close();
466
- (_a = _servce.httpServer) == null ? void 0 : _a.close(async () => {
467
- _stop && await _stop();
468
- });
465
+ if (_servce) {
466
+ (_a = _servce.httpServer) == null ? void 0 : _a.close(async () => {
467
+ _stop && await _stop();
468
+ });
469
+ _servce.close();
470
+ }
469
471
  _stop && await _stop();
470
472
  } catch (e) {
471
473
  consola.error(e);
@@ -473,6 +475,8 @@ var unpluginFactory = (options) => ({
473
475
  });
474
476
  },
475
477
  configureServer(server) {
478
+ if (config.command === "build")
479
+ return;
476
480
  const {
477
481
  enable = true,
478
482
  target = ""
package/dist/webpack.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  webpack_default
3
- } from "./chunk-5OTBSQ6U.js";
4
- import "./chunk-IOQLAF3J.js";
3
+ } from "./chunk-EDUM4QD7.js";
4
+ import "./chunk-EI2YSLDH.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.14",
4
+ "version": "0.0.15",
5
5
  "packageManager": "pnpm@8.6.12",
6
6
  "description": "",
7
7
  "license": "MIT",
package/src/index.ts CHANGED
@@ -54,10 +54,12 @@ export const unpluginFactory: UnpluginFactory<Options> = options => ({
54
54
  config = _config
55
55
  registerExit(async () => {
56
56
  try {
57
- _servce && _servce.close()
58
- _servce.httpServer?.close(async () => {
59
- _stop && await _stop()
60
- })
57
+ if (_servce) {
58
+ _servce.httpServer?.close(async () => {
59
+ _stop && await _stop()
60
+ })
61
+ _servce.close()
62
+ }
61
63
  _stop && await _stop()
62
64
  }
63
65
  catch (e) {
@@ -66,6 +68,9 @@ export const unpluginFactory: UnpluginFactory<Options> = options => ({
66
68
  })
67
69
  },
68
70
  configureServer(server) {
71
+ if (config.command === 'build')
72
+ return
73
+
69
74
  const {
70
75
  enable = true,
71
76
  target = '',