vite-plugin-rpx 0.11.35 → 0.11.36
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/index.js +12 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -24181,6 +24181,12 @@ var init_sni = __esm(() => {
|
|
|
24181
24181
|
// ../rpx/src/on-demand.ts
|
|
24182
24182
|
import * as fsp2 from "node:fs/promises";
|
|
24183
24183
|
import * as path5 from "node:path";
|
|
24184
|
+
function resolveCertificateReloadStrategy(env = process.env) {
|
|
24185
|
+
const explicit = env.RPX_TLS_RELOAD_STRATEGY?.trim().toLowerCase();
|
|
24186
|
+
if (explicit === "restart" || explicit === "rebind")
|
|
24187
|
+
return explicit;
|
|
24188
|
+
return env.INVOCATION_ID ? "restart" : "rebind";
|
|
24189
|
+
}
|
|
24184
24190
|
function matchesAllowedSuffix(host, suffixes) {
|
|
24185
24191
|
if (!suffixes || suffixes.length === 0)
|
|
24186
24192
|
return false;
|
|
@@ -26845,7 +26851,12 @@ async function startProxies(options) {
|
|
|
26845
26851
|
initial: productionTlsConfig,
|
|
26846
26852
|
verbose,
|
|
26847
26853
|
onCertAdded: (entries) => {
|
|
26848
|
-
|
|
26854
|
+
if (resolveCertificateReloadStrategy() === "restart") {
|
|
26855
|
+
debugLog("on-demand", "certificate installed; restarting supervised gateway to reload TLS", verbose);
|
|
26856
|
+
setTimeout(() => process31.kill(process31.pid, "SIGTERM"), 10).unref();
|
|
26857
|
+
} else {
|
|
26858
|
+
rebuildSharedTls(entries);
|
|
26859
|
+
}
|
|
26849
26860
|
}
|
|
26850
26861
|
}) : null;
|
|
26851
26862
|
let rebuildLatest = null;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-rpx",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.11.
|
|
4
|
+
"version": "0.11.36",
|
|
5
5
|
"description": "A modern and smart reverse proxy. Vite plugin.",
|
|
6
6
|
"author": "Chris Breuer <chris@stacksjs.org>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"typecheck": "bunx tsc --noEmit"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@stacksjs/rpx": "0.11.
|
|
50
|
+
"@stacksjs/rpx": "0.11.36",
|
|
51
51
|
"@stacksjs/tlsx": "^0.13.13"
|
|
52
52
|
},
|
|
53
53
|
"simple-git-hooks": {
|