unplugin-https-reverse-proxy 4.1.0-beta.5 → 4.1.0-beta.6
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-A3KSOGWY.js → chunk-Y4TJZ6XZ.js} +6 -1
- package/dist/esbuild.cjs +6 -1
- package/dist/esbuild.js +1 -1
- package/dist/index.cjs +6 -1
- package/dist/index.js +1 -1
- package/dist/nuxt.cjs +6 -1
- package/dist/nuxt.js +1 -1
- package/dist/rollup.cjs +6 -1
- package/dist/rollup.js +1 -1
- package/dist/rspack.cjs +6 -1
- package/dist/rspack.js +1 -1
- package/dist/vite.cjs +6 -1
- package/dist/vite.js +1 -1
- package/dist/webpack.cjs +6 -1
- package/dist/webpack.js +1 -1
- package/package.json +1 -1
- package/src/caddy/index.ts +10 -1
- package/src/privileged/client.ts +2 -1
|
@@ -14230,11 +14230,16 @@ Run \`${caddyPath} trust\` manually if the browser warns about the certificate.`
|
|
|
14230
14230
|
try {
|
|
14231
14231
|
const child = new HelperCaddyProcess(session.client);
|
|
14232
14232
|
this._caddyChild = child;
|
|
14233
|
-
await session.client.call("caddy.start");
|
|
14233
|
+
const started = await session.client.call("caddy.start");
|
|
14234
14234
|
child.on("exit", (code) => {
|
|
14235
14235
|
if (code !== null && code !== 0)
|
|
14236
14236
|
reject2(new Error(`Caddy exited with code ${code}`));
|
|
14237
14237
|
});
|
|
14238
|
+
if ((started == null ? void 0 : started.started) === false) {
|
|
14239
|
+
consola.info("Caddy is already running; added this route to it.");
|
|
14240
|
+
void resolveWhenReady();
|
|
14241
|
+
return;
|
|
14242
|
+
}
|
|
14238
14243
|
child.stderr.on("data", async (data) => {
|
|
14239
14244
|
const lines = data.toString().split("\n").map((line) => line.trim());
|
|
14240
14245
|
for (const line of lines) {
|
package/dist/esbuild.cjs
CHANGED
|
@@ -14330,11 +14330,16 @@ Run \`${caddyPath} trust\` manually if the browser warns about the certificate.`
|
|
|
14330
14330
|
try {
|
|
14331
14331
|
const child = new HelperCaddyProcess(session.client);
|
|
14332
14332
|
this._caddyChild = child;
|
|
14333
|
-
await session.client.call("caddy.start");
|
|
14333
|
+
const started = await session.client.call("caddy.start");
|
|
14334
14334
|
child.on("exit", (code) => {
|
|
14335
14335
|
if (code !== null && code !== 0)
|
|
14336
14336
|
reject2(new Error(`Caddy exited with code ${code}`));
|
|
14337
14337
|
});
|
|
14338
|
+
if ((started == null ? void 0 : started.started) === false) {
|
|
14339
|
+
consola.info("Caddy is already running; added this route to it.");
|
|
14340
|
+
void resolveWhenReady();
|
|
14341
|
+
return;
|
|
14342
|
+
}
|
|
14338
14343
|
child.stderr.on("data", async (data) => {
|
|
14339
14344
|
const lines = data.toString().split("\n").map((line) => line.trim());
|
|
14340
14345
|
for (const line of lines) {
|
package/dist/esbuild.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -14330,11 +14330,16 @@ Run \`${caddyPath} trust\` manually if the browser warns about the certificate.`
|
|
|
14330
14330
|
try {
|
|
14331
14331
|
const child = new HelperCaddyProcess(session.client);
|
|
14332
14332
|
this._caddyChild = child;
|
|
14333
|
-
await session.client.call("caddy.start");
|
|
14333
|
+
const started = await session.client.call("caddy.start");
|
|
14334
14334
|
child.on("exit", (code) => {
|
|
14335
14335
|
if (code !== null && code !== 0)
|
|
14336
14336
|
reject2(new Error(`Caddy exited with code ${code}`));
|
|
14337
14337
|
});
|
|
14338
|
+
if ((started == null ? void 0 : started.started) === false) {
|
|
14339
|
+
consola.info("Caddy is already running; added this route to it.");
|
|
14340
|
+
void resolveWhenReady();
|
|
14341
|
+
return;
|
|
14342
|
+
}
|
|
14338
14343
|
child.stderr.on("data", async (data) => {
|
|
14339
14344
|
const lines = data.toString().split("\n").map((line) => line.trim());
|
|
14340
14345
|
for (const line of lines) {
|
package/dist/index.js
CHANGED
package/dist/nuxt.cjs
CHANGED
|
@@ -14331,11 +14331,16 @@ Run \`${caddyPath} trust\` manually if the browser warns about the certificate.`
|
|
|
14331
14331
|
try {
|
|
14332
14332
|
const child = new HelperCaddyProcess(session.client);
|
|
14333
14333
|
this._caddyChild = child;
|
|
14334
|
-
await session.client.call("caddy.start");
|
|
14334
|
+
const started = await session.client.call("caddy.start");
|
|
14335
14335
|
child.on("exit", (code) => {
|
|
14336
14336
|
if (code !== null && code !== 0)
|
|
14337
14337
|
reject2(new Error(`Caddy exited with code ${code}`));
|
|
14338
14338
|
});
|
|
14339
|
+
if ((started == null ? void 0 : started.started) === false) {
|
|
14340
|
+
consola.info("Caddy is already running; added this route to it.");
|
|
14341
|
+
void resolveWhenReady();
|
|
14342
|
+
return;
|
|
14343
|
+
}
|
|
14339
14344
|
child.stderr.on("data", async (data) => {
|
|
14340
14345
|
const lines = data.toString().split("\n").map((line) => line.trim());
|
|
14341
14346
|
for (const line of lines) {
|
package/dist/nuxt.js
CHANGED
package/dist/rollup.cjs
CHANGED
|
@@ -14330,11 +14330,16 @@ Run \`${caddyPath} trust\` manually if the browser warns about the certificate.`
|
|
|
14330
14330
|
try {
|
|
14331
14331
|
const child = new HelperCaddyProcess(session.client);
|
|
14332
14332
|
this._caddyChild = child;
|
|
14333
|
-
await session.client.call("caddy.start");
|
|
14333
|
+
const started = await session.client.call("caddy.start");
|
|
14334
14334
|
child.on("exit", (code) => {
|
|
14335
14335
|
if (code !== null && code !== 0)
|
|
14336
14336
|
reject2(new Error(`Caddy exited with code ${code}`));
|
|
14337
14337
|
});
|
|
14338
|
+
if ((started == null ? void 0 : started.started) === false) {
|
|
14339
|
+
consola.info("Caddy is already running; added this route to it.");
|
|
14340
|
+
void resolveWhenReady();
|
|
14341
|
+
return;
|
|
14342
|
+
}
|
|
14338
14343
|
child.stderr.on("data", async (data) => {
|
|
14339
14344
|
const lines = data.toString().split("\n").map((line) => line.trim());
|
|
14340
14345
|
for (const line of lines) {
|
package/dist/rollup.js
CHANGED
package/dist/rspack.cjs
CHANGED
|
@@ -14329,11 +14329,16 @@ Run \`${caddyPath} trust\` manually if the browser warns about the certificate.`
|
|
|
14329
14329
|
try {
|
|
14330
14330
|
const child = new HelperCaddyProcess(session.client);
|
|
14331
14331
|
this._caddyChild = child;
|
|
14332
|
-
await session.client.call("caddy.start");
|
|
14332
|
+
const started = await session.client.call("caddy.start");
|
|
14333
14333
|
child.on("exit", (code) => {
|
|
14334
14334
|
if (code !== null && code !== 0)
|
|
14335
14335
|
reject2(new Error(`Caddy exited with code ${code}`));
|
|
14336
14336
|
});
|
|
14337
|
+
if ((started == null ? void 0 : started.started) === false) {
|
|
14338
|
+
consola.info("Caddy is already running; added this route to it.");
|
|
14339
|
+
void resolveWhenReady();
|
|
14340
|
+
return;
|
|
14341
|
+
}
|
|
14337
14342
|
child.stderr.on("data", async (data) => {
|
|
14338
14343
|
const lines = data.toString().split("\n").map((line) => line.trim());
|
|
14339
14344
|
for (const line of lines) {
|
package/dist/rspack.js
CHANGED
package/dist/vite.cjs
CHANGED
|
@@ -14330,11 +14330,16 @@ Run \`${caddyPath} trust\` manually if the browser warns about the certificate.`
|
|
|
14330
14330
|
try {
|
|
14331
14331
|
const child = new HelperCaddyProcess(session.client);
|
|
14332
14332
|
this._caddyChild = child;
|
|
14333
|
-
await session.client.call("caddy.start");
|
|
14333
|
+
const started = await session.client.call("caddy.start");
|
|
14334
14334
|
child.on("exit", (code) => {
|
|
14335
14335
|
if (code !== null && code !== 0)
|
|
14336
14336
|
reject2(new Error(`Caddy exited with code ${code}`));
|
|
14337
14337
|
});
|
|
14338
|
+
if ((started == null ? void 0 : started.started) === false) {
|
|
14339
|
+
consola.info("Caddy is already running; added this route to it.");
|
|
14340
|
+
void resolveWhenReady();
|
|
14341
|
+
return;
|
|
14342
|
+
}
|
|
14338
14343
|
child.stderr.on("data", async (data) => {
|
|
14339
14344
|
const lines = data.toString().split("\n").map((line) => line.trim());
|
|
14340
14345
|
for (const line of lines) {
|
package/dist/vite.js
CHANGED
package/dist/webpack.cjs
CHANGED
|
@@ -14330,11 +14330,16 @@ Run \`${caddyPath} trust\` manually if the browser warns about the certificate.`
|
|
|
14330
14330
|
try {
|
|
14331
14331
|
const child = new HelperCaddyProcess(session.client);
|
|
14332
14332
|
this._caddyChild = child;
|
|
14333
|
-
await session.client.call("caddy.start");
|
|
14333
|
+
const started = await session.client.call("caddy.start");
|
|
14334
14334
|
child.on("exit", (code) => {
|
|
14335
14335
|
if (code !== null && code !== 0)
|
|
14336
14336
|
reject2(new Error(`Caddy exited with code ${code}`));
|
|
14337
14337
|
});
|
|
14338
|
+
if ((started == null ? void 0 : started.started) === false) {
|
|
14339
|
+
consola.info("Caddy is already running; added this route to it.");
|
|
14340
|
+
void resolveWhenReady();
|
|
14341
|
+
return;
|
|
14342
|
+
}
|
|
14338
14343
|
child.stderr.on("data", async (data) => {
|
|
14339
14344
|
const lines = data.toString().split("\n").map((line) => line.trim());
|
|
14340
14345
|
for (const line of lines) {
|
package/dist/webpack.js
CHANGED
package/package.json
CHANGED
package/src/caddy/index.ts
CHANGED
|
@@ -420,13 +420,22 @@ export class CaddyInstant {
|
|
|
420
420
|
const child = new HelperCaddyProcess(session.client)
|
|
421
421
|
this._caddyChild = child
|
|
422
422
|
|
|
423
|
-
await session.client.call('caddy.start')
|
|
423
|
+
const started = await session.client.call('caddy.start')
|
|
424
424
|
|
|
425
425
|
child.on('exit', (code: number | null) => {
|
|
426
426
|
if (code !== null && code !== 0)
|
|
427
427
|
reject(new Error(`Caddy exited with code ${code}`))
|
|
428
428
|
})
|
|
429
429
|
|
|
430
|
+
// Caddy was already serving: its "serving initial" line was emitted
|
|
431
|
+
// when the first project started it, so waiting for it again would
|
|
432
|
+
// hang this instance forever.
|
|
433
|
+
if (started?.started === false) {
|
|
434
|
+
consola.info('Caddy is already running; added this route to it.')
|
|
435
|
+
void resolveWhenReady()
|
|
436
|
+
return
|
|
437
|
+
}
|
|
438
|
+
|
|
430
439
|
child.stderr.on('data', async (data: Buffer) => {
|
|
431
440
|
const lines = data.toString().split('\n').map((line: string) => line.trim())
|
|
432
441
|
for (const line of lines) {
|
package/src/privileged/client.ts
CHANGED
|
@@ -44,7 +44,8 @@ export interface HelperResults {
|
|
|
44
44
|
'hosts.add': void
|
|
45
45
|
'hosts.remove': void
|
|
46
46
|
'port.free': { killed: number[] }
|
|
47
|
-
|
|
47
|
+
/** `started: false` means Caddy was already running and was reused. */
|
|
48
|
+
'caddy.start': { pid?: number, started?: boolean }
|
|
48
49
|
'caddy.stop': void
|
|
49
50
|
'ca.trust': { trusted: boolean, output: string }
|
|
50
51
|
}
|