roster-server 2.1.18 → 2.1.20

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.
Files changed (2) hide show
  1. package/index.js +13 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -775,6 +775,19 @@ class Roster {
775
775
  }
776
776
  }
777
777
 
778
+ const isBunRuntime = typeof Bun !== 'undefined' || process.release?.name === 'bun';
779
+ if (isBunRuntime && this.wildcardZones.size > 0) {
780
+ for (const zone of this.wildcardZones) {
781
+ const bootstrapHost = `bun-bootstrap.${zone}`;
782
+ try {
783
+ log.warn(`⚠️ Bun runtime detected: prewarming wildcard certificate via ${bootstrapHost}`);
784
+ await greenlockRuntime.get({ servername: bootstrapHost });
785
+ } catch (error) {
786
+ log.warn(`⚠️ Bun wildcard prewarm failed for ${zone}: ${error?.message || error}`);
787
+ }
788
+ }
789
+ }
790
+
778
791
  // Create dispatcher for each port
779
792
  const createDispatcher = (portData) => {
780
793
  return (req, res) => {
@@ -923,7 +936,6 @@ class Roster {
923
936
  if (portNum === this.defaultPort) {
924
937
  // Bun has known gaps around SNICallback compatibility.
925
938
  // Fallback to static cert loading for the primary domain on default HTTPS port.
926
- const isBunRuntime = typeof Bun !== 'undefined' || process.release?.name === 'bun';
927
939
  const tlsOpts = { minVersion: this.tlsMinVersion, maxVersion: this.tlsMaxVersion };
928
940
  let httpsServer;
929
941
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "roster-server",
3
- "version": "2.1.18",
3
+ "version": "2.1.20",
4
4
  "description": "👾 RosterServer - A domain host router to host multiple HTTPS.",
5
5
  "main": "index.js",
6
6
  "scripts": {