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.
- package/dist/{chunk-DKHKFLLC.js → chunk-E6C23MZG.js} +11 -8
- package/dist/esbuild.cjs +11 -8
- package/dist/esbuild.js +1 -1
- package/dist/index.cjs +11 -8
- package/dist/index.js +1 -1
- package/dist/nuxt.cjs +11 -8
- package/dist/nuxt.js +1 -1
- package/dist/rollup.cjs +11 -8
- package/dist/rollup.js +1 -1
- package/dist/rspack.cjs +11 -8
- package/dist/rspack.js +1 -1
- package/dist/vite.cjs +11 -8
- package/dist/vite.js +1 -1
- package/dist/webpack.cjs +11 -8
- package/dist/webpack.js +1 -1
- package/package.json +1 -1
- package/src/caddy/index.ts +14 -10
|
@@ -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
|
-
|
|
509
|
-
if (line.includes("
|
|
510
|
-
|
|
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
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
515
|
+
await this.baseCleanup();
|
|
516
|
+
process3.exit();
|
|
517
|
+
} else {
|
|
518
|
+
consola.error(`${line}
|
|
518
519
|
`);
|
|
519
|
-
|
|
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
|
-
|
|
594
|
-
if (line.includes("
|
|
595
|
-
|
|
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
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
600
|
+
await this.baseCleanup();
|
|
601
|
+
import_node_process4.default.exit();
|
|
602
|
+
} else {
|
|
603
|
+
consola.error(`${line}
|
|
603
604
|
`);
|
|
604
|
-
|
|
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
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
|
-
|
|
594
|
-
if (line.includes("
|
|
595
|
-
|
|
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
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
600
|
+
await this.baseCleanup();
|
|
601
|
+
import_node_process4.default.exit();
|
|
602
|
+
} else {
|
|
603
|
+
consola.error(`${line}
|
|
603
604
|
`);
|
|
604
|
-
|
|
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
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
|
-
|
|
595
|
-
if (line.includes("
|
|
596
|
-
|
|
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
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
601
|
+
await this.baseCleanup();
|
|
602
|
+
import_node_process4.default.exit();
|
|
603
|
+
} else {
|
|
604
|
+
consola.error(`${line}
|
|
604
605
|
`);
|
|
605
|
-
|
|
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
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
|
-
|
|
594
|
-
if (line.includes("
|
|
595
|
-
|
|
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
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
600
|
+
await this.baseCleanup();
|
|
601
|
+
import_node_process4.default.exit();
|
|
602
|
+
} else {
|
|
603
|
+
consola.error(`${line}
|
|
603
604
|
`);
|
|
604
|
-
|
|
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
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
|
-
|
|
593
|
-
if (line.includes("
|
|
594
|
-
|
|
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
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
599
|
+
await this.baseCleanup();
|
|
600
|
+
import_node_process4.default.exit();
|
|
601
|
+
} else {
|
|
602
|
+
consola.error(`${line}
|
|
602
603
|
`);
|
|
603
|
-
|
|
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
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
|
-
|
|
594
|
-
if (line.includes("
|
|
595
|
-
|
|
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
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
600
|
+
await this.baseCleanup();
|
|
601
|
+
import_node_process4.default.exit();
|
|
602
|
+
} else {
|
|
603
|
+
consola.error(`${line}
|
|
603
604
|
`);
|
|
604
|
-
|
|
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
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
|
-
|
|
594
|
-
if (line.includes("
|
|
595
|
-
|
|
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
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
600
|
+
await this.baseCleanup();
|
|
601
|
+
import_node_process4.default.exit();
|
|
602
|
+
} else {
|
|
603
|
+
consola.error(`${line}
|
|
603
604
|
`);
|
|
604
|
-
|
|
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
package/package.json
CHANGED
package/src/caddy/index.ts
CHANGED
|
@@ -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
|
-
|
|
328
|
-
if (line.includes('
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
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
|
|