@scalemule/nextjs 0.0.14 → 0.0.15

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.
@@ -1810,10 +1810,12 @@ var _shutdownRegistered = false;
1810
1810
  function ensureShutdownHook() {
1811
1811
  if (_shutdownRegistered) return;
1812
1812
  _shutdownRegistered = true;
1813
- process.once("SIGTERM", async () => {
1814
- const shutdowns = Array.from(_clients.values()).map((c) => c.shutdown());
1815
- await Promise.allSettled(shutdowns);
1816
- });
1813
+ if (typeof process !== "undefined" && typeof process.once === "function") {
1814
+ process.once("SIGTERM", async () => {
1815
+ const shutdowns = Array.from(_clients.values()).map((c) => c.shutdown());
1816
+ await Promise.allSettled(shutdowns);
1817
+ });
1818
+ }
1817
1819
  }
1818
1820
  function extractClientIp(hdrs) {
1819
1821
  const realIp = hdrs.get("x-real-ip") || hdrs.get("x-real-client-ip");
@@ -1808,10 +1808,12 @@ var _shutdownRegistered = false;
1808
1808
  function ensureShutdownHook() {
1809
1809
  if (_shutdownRegistered) return;
1810
1810
  _shutdownRegistered = true;
1811
- process.once("SIGTERM", async () => {
1812
- const shutdowns = Array.from(_clients.values()).map((c) => c.shutdown());
1813
- await Promise.allSettled(shutdowns);
1814
- });
1811
+ if (typeof process !== "undefined" && typeof process.once === "function") {
1812
+ process.once("SIGTERM", async () => {
1813
+ const shutdowns = Array.from(_clients.values()).map((c) => c.shutdown());
1814
+ await Promise.allSettled(shutdowns);
1815
+ });
1816
+ }
1815
1817
  }
1816
1818
  function extractClientIp(hdrs) {
1817
1819
  const realIp = hdrs.get("x-real-ip") || hdrs.get("x-real-client-ip");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scalemule/nextjs",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "description": "ScaleMule SDK for Next.js applications - authentication, storage, and user management",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",