@tridha643/hestia 1.3.0 → 1.3.1

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.
@@ -4216,9 +4216,10 @@ function startProxyServer(store, proxyPort, tld, tlds, tlsOptions, lanIp, strict
4216
4216
  }
4217
4217
  if (externalRoutesPath) {
4218
4218
  try {
4219
- const externalBasename = path9.basename(externalRoutesPath);
4220
- externalWatcher = fs9.watch(path9.dirname(externalRoutesPath), (_event, filename) => {
4221
- if (filename && filename.toString() !== externalBasename) return;
4219
+ // Hestia atomically publishes aliases through a temporary file rename.
4220
+ // macOS may report only the temporary filename, so every event in this
4221
+ // dedicated directory must schedule a reload of the canonical file.
4222
+ externalWatcher = fs9.watch(path9.dirname(externalRoutesPath), () => {
4222
4223
  if (debounceTimer) clearTimeout(debounceTimer);
4223
4224
  debounceTimer = setTimeout(reloadRoutes, DEBOUNCE_MS);
4224
4225
  });
@@ -113,15 +113,16 @@ diff --git a/dist/cli.js b/dist/cli.js
113
113
  if (autoSyncHosts) {
114
114
  syncHostsFile(cachedRoutes.map((r) => r.hostname));
115
115
  }
116
- @@ -4131,12 +4214,24 @@
116
+ @@ -4131,12 +4214,25 @@
117
117
  console.warn(colors_default.yellow("fs.watch unavailable; falling back to polling for route changes"));
118
118
  pollingInterval = setInterval(reloadRoutes, POLL_INTERVAL_MS);
119
119
  }
120
120
  + if (externalRoutesPath) {
121
121
  + try {
122
- + const externalBasename = path9.basename(externalRoutesPath);
123
- + externalWatcher = fs9.watch(path9.dirname(externalRoutesPath), (_event, filename) => {
124
- + if (filename && filename.toString() !== externalBasename) return;
122
+ + // Hestia atomically publishes aliases through a temporary file rename.
123
+ + // macOS may report only the temporary filename, so every event in this
124
+ + // dedicated directory must schedule a reload of the canonical file.
125
+ + externalWatcher = fs9.watch(path9.dirname(externalRoutesPath), () => {
125
126
  + if (debounceTimer) clearTimeout(debounceTimer);
126
127
  + debounceTimer = setTimeout(reloadRoutes, DEBOUNCE_MS);
127
128
  + });
@@ -139,7 +140,7 @@ diff --git a/dist/cli.js b/dist/cli.js
139
140
  proxyPort,
140
141
  tld,
141
142
  tlds,
142
- @@ -4171,9 +4266,9 @@
143
+ @@ -4171,9 +4267,9 @@
143
144
  redirectServer.on("error", () => {
144
145
  redirectServer = null;
145
146
  });
@@ -151,7 +152,7 @@ diff --git a/dist/cli.js b/dist/cli.js
151
152
  fs9.writeFileSync(store.pidPath, process.pid.toString(), { mode: FILE_MODE });
152
153
  fs9.writeFileSync(store.portFilePath, proxyPort.toString(), { mode: FILE_MODE });
153
154
  writeTlsMarker(store.dir, isTls);
154
- @@ -4215,10 +4310,12 @@
155
+ @@ -4215,10 +4311,12 @@
155
156
  exiting = true;
156
157
  if (debounceTimer) clearTimeout(debounceTimer);
157
158
  if (pollingInterval) clearInterval(pollingInterval);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "package": "portless",
3
3
  "version": "0.15.1",
4
- "patchSha256": "9ca94ca771ce502769a2c7cbe3bb4fe8d54dc847ff9f7e3e2b34abf728618690"
4
+ "patchSha256": "7d969a7e8bc556d0e866accc836b06e237f567b68d3d7fb7eaed5b0378fbc2d6"
5
5
  }