unplugin-https-reverse-proxy 2.0.1 → 2.0.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.
@@ -505,19 +505,22 @@ ${target.split(":")[0]}${https ? "" : ":80"} {
505
505
  const lines = data.toString().split("\n").map((line) => line.trim());
506
506
  for (const line of lines) {
507
507
  showCaddyLog && line && console.info(line);
508
- if (line.includes("Error:") || line && JSON.parse(line).level === "error") {
509
- if (line.includes("parsing caddyfile tokens")) {
510
- consola.error("Caddyfile syntax error, please contact the author:\n", `${this.caddyfile}
508
+ try {
509
+ if (line.includes("Error:") || line && JSON.parse(line).level === "error") {
510
+ if (line.includes("parsing caddyfile tokens")) {
511
+ consola.error("Caddyfile syntax error, please contact the author:\n", `${this.caddyfile}
511
512
 
512
513
  ${line}
513
514
  `);
514
- await this.baseCleanup();
515
- process3.exit();
516
- } else {
517
- consola.error(`${line}
515
+ await this.baseCleanup();
516
+ process3.exit();
517
+ } else {
518
+ consola.error(`${line}
518
519
  `);
519
- return reject(line);
520
+ return reject(line);
521
+ }
520
522
  }
523
+ } catch {
521
524
  }
522
525
  if (line.includes("config file changed"))
523
526
  consola.success("Detect added a new reverse proxy config, restarted.\n");
package/dist/esbuild.cjs CHANGED
@@ -590,19 +590,22 @@ ${target.split(":")[0]}${https ? "" : ":80"} {
590
590
  const lines = data.toString().split("\n").map((line) => line.trim());
591
591
  for (const line of lines) {
592
592
  showCaddyLog && line && console.info(line);
593
- if (line.includes("Error:") || line && JSON.parse(line).level === "error") {
594
- if (line.includes("parsing caddyfile tokens")) {
595
- consola.error("Caddyfile syntax error, please contact the author:\n", `${this.caddyfile}
593
+ try {
594
+ if (line.includes("Error:") || line && JSON.parse(line).level === "error") {
595
+ if (line.includes("parsing caddyfile tokens")) {
596
+ consola.error("Caddyfile syntax error, please contact the author:\n", `${this.caddyfile}
596
597
 
597
598
  ${line}
598
599
  `);
599
- await this.baseCleanup();
600
- import_node_process4.default.exit();
601
- } else {
602
- consola.error(`${line}
600
+ await this.baseCleanup();
601
+ import_node_process4.default.exit();
602
+ } else {
603
+ consola.error(`${line}
603
604
  `);
604
- return reject(line);
605
+ return reject(line);
606
+ }
605
607
  }
608
+ } catch {
606
609
  }
607
610
  if (line.includes("config file changed"))
608
611
  consola.success("Detect added a new reverse proxy config, restarted.\n");
package/dist/esbuild.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unpluginFactory
3
- } from "./chunk-DKHKFLLC.js";
3
+ } from "./chunk-E6C23MZG.js";
4
4
  import "./chunk-2P7SUCQ3.js";
5
5
 
6
6
  // src/esbuild.ts
package/dist/index.cjs CHANGED
@@ -590,19 +590,22 @@ ${target.split(":")[0]}${https ? "" : ":80"} {
590
590
  const lines = data.toString().split("\n").map((line) => line.trim());
591
591
  for (const line of lines) {
592
592
  showCaddyLog && line && console.info(line);
593
- if (line.includes("Error:") || line && JSON.parse(line).level === "error") {
594
- if (line.includes("parsing caddyfile tokens")) {
595
- consola.error("Caddyfile syntax error, please contact the author:\n", `${this.caddyfile}
593
+ try {
594
+ if (line.includes("Error:") || line && JSON.parse(line).level === "error") {
595
+ if (line.includes("parsing caddyfile tokens")) {
596
+ consola.error("Caddyfile syntax error, please contact the author:\n", `${this.caddyfile}
596
597
 
597
598
  ${line}
598
599
  `);
599
- await this.baseCleanup();
600
- import_node_process4.default.exit();
601
- } else {
602
- consola.error(`${line}
600
+ await this.baseCleanup();
601
+ import_node_process4.default.exit();
602
+ } else {
603
+ consola.error(`${line}
603
604
  `);
604
- return reject(line);
605
+ return reject(line);
606
+ }
605
607
  }
608
+ } catch {
606
609
  }
607
610
  if (line.includes("config file changed"))
608
611
  consola.success("Detect added a new reverse proxy config, restarted.\n");
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  unplugin,
4
4
  unpluginFactory,
5
5
  vitePrintUrls
6
- } from "./chunk-DKHKFLLC.js";
6
+ } from "./chunk-E6C23MZG.js";
7
7
  import "./chunk-2P7SUCQ3.js";
8
8
  export {
9
9
  src_default as default,
package/dist/nuxt.cjs CHANGED
@@ -591,19 +591,22 @@ ${target.split(":")[0]}${https ? "" : ":80"} {
591
591
  const lines = data.toString().split("\n").map((line) => line.trim());
592
592
  for (const line of lines) {
593
593
  showCaddyLog && line && console.info(line);
594
- if (line.includes("Error:") || line && JSON.parse(line).level === "error") {
595
- if (line.includes("parsing caddyfile tokens")) {
596
- consola.error("Caddyfile syntax error, please contact the author:\n", `${this.caddyfile}
594
+ try {
595
+ if (line.includes("Error:") || line && JSON.parse(line).level === "error") {
596
+ if (line.includes("parsing caddyfile tokens")) {
597
+ consola.error("Caddyfile syntax error, please contact the author:\n", `${this.caddyfile}
597
598
 
598
599
  ${line}
599
600
  `);
600
- await this.baseCleanup();
601
- import_node_process4.default.exit();
602
- } else {
603
- consola.error(`${line}
601
+ await this.baseCleanup();
602
+ import_node_process4.default.exit();
603
+ } else {
604
+ consola.error(`${line}
604
605
  `);
605
- return reject(line);
606
+ return reject(line);
607
+ }
606
608
  }
609
+ } catch {
607
610
  }
608
611
  if (line.includes("config file changed"))
609
612
  consola.success("Detect added a new reverse proxy config, restarted.\n");
package/dist/nuxt.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  vitePrintUrls
3
- } from "./chunk-DKHKFLLC.js";
3
+ } from "./chunk-E6C23MZG.js";
4
4
  import {
5
5
  consola,
6
6
  isAdmin
package/dist/rollup.cjs CHANGED
@@ -590,19 +590,22 @@ ${target.split(":")[0]}${https ? "" : ":80"} {
590
590
  const lines = data.toString().split("\n").map((line) => line.trim());
591
591
  for (const line of lines) {
592
592
  showCaddyLog && line && console.info(line);
593
- if (line.includes("Error:") || line && JSON.parse(line).level === "error") {
594
- if (line.includes("parsing caddyfile tokens")) {
595
- consola.error("Caddyfile syntax error, please contact the author:\n", `${this.caddyfile}
593
+ try {
594
+ if (line.includes("Error:") || line && JSON.parse(line).level === "error") {
595
+ if (line.includes("parsing caddyfile tokens")) {
596
+ consola.error("Caddyfile syntax error, please contact the author:\n", `${this.caddyfile}
596
597
 
597
598
  ${line}
598
599
  `);
599
- await this.baseCleanup();
600
- import_node_process4.default.exit();
601
- } else {
602
- consola.error(`${line}
600
+ await this.baseCleanup();
601
+ import_node_process4.default.exit();
602
+ } else {
603
+ consola.error(`${line}
603
604
  `);
604
- return reject(line);
605
+ return reject(line);
606
+ }
605
607
  }
608
+ } catch {
606
609
  }
607
610
  if (line.includes("config file changed"))
608
611
  consola.success("Detect added a new reverse proxy config, restarted.\n");
package/dist/rollup.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unpluginFactory
3
- } from "./chunk-DKHKFLLC.js";
3
+ } from "./chunk-E6C23MZG.js";
4
4
  import "./chunk-2P7SUCQ3.js";
5
5
 
6
6
  // src/rollup.ts
package/dist/rspack.cjs CHANGED
@@ -589,19 +589,22 @@ ${target.split(":")[0]}${https ? "" : ":80"} {
589
589
  const lines = data.toString().split("\n").map((line) => line.trim());
590
590
  for (const line of lines) {
591
591
  showCaddyLog && line && console.info(line);
592
- if (line.includes("Error:") || line && JSON.parse(line).level === "error") {
593
- if (line.includes("parsing caddyfile tokens")) {
594
- consola.error("Caddyfile syntax error, please contact the author:\n", `${this.caddyfile}
592
+ try {
593
+ if (line.includes("Error:") || line && JSON.parse(line).level === "error") {
594
+ if (line.includes("parsing caddyfile tokens")) {
595
+ consola.error("Caddyfile syntax error, please contact the author:\n", `${this.caddyfile}
595
596
 
596
597
  ${line}
597
598
  `);
598
- await this.baseCleanup();
599
- import_node_process4.default.exit();
600
- } else {
601
- consola.error(`${line}
599
+ await this.baseCleanup();
600
+ import_node_process4.default.exit();
601
+ } else {
602
+ consola.error(`${line}
602
603
  `);
603
- return reject(line);
604
+ return reject(line);
605
+ }
604
606
  }
607
+ } catch {
605
608
  }
606
609
  if (line.includes("config file changed"))
607
610
  consola.success("Detect added a new reverse proxy config, restarted.\n");
package/dist/rspack.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  src_default
3
- } from "./chunk-DKHKFLLC.js";
3
+ } from "./chunk-E6C23MZG.js";
4
4
  import "./chunk-2P7SUCQ3.js";
5
5
 
6
6
  // src/rspack.ts
package/dist/vite.cjs CHANGED
@@ -590,19 +590,22 @@ ${target.split(":")[0]}${https ? "" : ":80"} {
590
590
  const lines = data.toString().split("\n").map((line) => line.trim());
591
591
  for (const line of lines) {
592
592
  showCaddyLog && line && console.info(line);
593
- if (line.includes("Error:") || line && JSON.parse(line).level === "error") {
594
- if (line.includes("parsing caddyfile tokens")) {
595
- consola.error("Caddyfile syntax error, please contact the author:\n", `${this.caddyfile}
593
+ try {
594
+ if (line.includes("Error:") || line && JSON.parse(line).level === "error") {
595
+ if (line.includes("parsing caddyfile tokens")) {
596
+ consola.error("Caddyfile syntax error, please contact the author:\n", `${this.caddyfile}
596
597
 
597
598
  ${line}
598
599
  `);
599
- await this.baseCleanup();
600
- import_node_process4.default.exit();
601
- } else {
602
- consola.error(`${line}
600
+ await this.baseCleanup();
601
+ import_node_process4.default.exit();
602
+ } else {
603
+ consola.error(`${line}
603
604
  `);
604
- return reject(line);
605
+ return reject(line);
606
+ }
605
607
  }
608
+ } catch {
606
609
  }
607
610
  if (line.includes("config file changed"))
608
611
  consola.success("Detect added a new reverse proxy config, restarted.\n");
package/dist/vite.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unpluginFactory
3
- } from "./chunk-DKHKFLLC.js";
3
+ } from "./chunk-E6C23MZG.js";
4
4
  import "./chunk-2P7SUCQ3.js";
5
5
 
6
6
  // src/vite.ts
package/dist/webpack.cjs CHANGED
@@ -590,19 +590,22 @@ ${target.split(":")[0]}${https ? "" : ":80"} {
590
590
  const lines = data.toString().split("\n").map((line) => line.trim());
591
591
  for (const line of lines) {
592
592
  showCaddyLog && line && console.info(line);
593
- if (line.includes("Error:") || line && JSON.parse(line).level === "error") {
594
- if (line.includes("parsing caddyfile tokens")) {
595
- consola.error("Caddyfile syntax error, please contact the author:\n", `${this.caddyfile}
593
+ try {
594
+ if (line.includes("Error:") || line && JSON.parse(line).level === "error") {
595
+ if (line.includes("parsing caddyfile tokens")) {
596
+ consola.error("Caddyfile syntax error, please contact the author:\n", `${this.caddyfile}
596
597
 
597
598
  ${line}
598
599
  `);
599
- await this.baseCleanup();
600
- import_node_process4.default.exit();
601
- } else {
602
- consola.error(`${line}
600
+ await this.baseCleanup();
601
+ import_node_process4.default.exit();
602
+ } else {
603
+ consola.error(`${line}
603
604
  `);
604
- return reject(line);
605
+ return reject(line);
606
+ }
605
607
  }
608
+ } catch {
606
609
  }
607
610
  if (line.includes("config file changed"))
608
611
  consola.success("Detect added a new reverse proxy config, restarted.\n");
package/dist/webpack.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unpluginFactory
3
- } from "./chunk-DKHKFLLC.js";
3
+ } from "./chunk-E6C23MZG.js";
4
4
  import "./chunk-2P7SUCQ3.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": "2.0.1",
4
+ "version": "2.0.2",
5
5
  "description": "",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/zcf0508/unplugin-https-reverse-proxy#readme",
@@ -324,18 +324,22 @@ ${target.split(':')[0]}${https ? '' : ':80'} {
324
324
  // caddy log
325
325
  // eslint-disable-next-line no-console
326
326
  showCaddyLog && line && console.info(line)
327
- if (line.includes('Error:') || (line && JSON.parse(line).level === 'error')) {
328
- if (line.includes('parsing caddyfile tokens')) {
329
- consola.error('Caddyfile syntax error, please contact the author:\n', `${this.caddyfile}\n\n${line}\n`)
330
- await this.baseCleanup()
331
- process.exit()
332
- }
333
- else {
334
- consola.error(`${line}\n`)
335
- // child.kill()
336
- return reject(line)
327
+ try {
328
+ if (line.includes('Error:') || (line && JSON.parse(line).level === 'error')) {
329
+ if (line.includes('parsing caddyfile tokens')) {
330
+ consola.error('Caddyfile syntax error, please contact the author:\n', `${this.caddyfile}\n\n${line}\n`)
331
+ await this.baseCleanup()
332
+ process.exit()
333
+ }
334
+ else {
335
+ consola.error(`${line}\n`)
336
+ // child.kill()
337
+ return reject(line)
338
+ }
337
339
  }
338
340
  }
341
+ catch {}
342
+
339
343
  if (line.includes('config file changed'))
340
344
  consola.success('Detect added a new reverse proxy config, restarted.\n')
341
345