@zintrust/socket 0.4.59 → 0.4.61

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.
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@zintrust/socket",
3
- "version": "0.4.59",
4
- "buildDate": "2026-04-04T22:09:08.837Z",
3
+ "version": "0.4.61",
4
+ "buildDate": "2026-04-05T07:58:39.948Z",
5
5
  "buildEnvironment": {
6
6
  "node": "v22.22.1",
7
7
  "platform": "darwin",
8
8
  "arch": "arm64"
9
9
  },
10
10
  "git": {
11
- "commit": "99e4d331",
11
+ "commit": "b4dbe529",
12
12
  "branch": "release"
13
13
  },
14
14
  "package": {
@@ -22,16 +22,16 @@
22
22
  },
23
23
  "files": {
24
24
  "build-manifest.json": {
25
- "size": 947,
26
- "sha256": "2e619502513f9b465881fdb6cb9cda78bb082e6df9bc20d4f1d62a1f7173174b"
25
+ "size": 1086,
26
+ "sha256": "a55e096a80190637fe7d56c36e53865451f623c88ceb5ccb7b9124e4a14335bb"
27
27
  },
28
28
  "index.d.ts": {
29
29
  "size": 932,
30
30
  "sha256": "6432952783fd7eacfc46813fcbd6e96672ff94c73fb0bad8e2f20fc278c64377"
31
31
  },
32
32
  "index.js": {
33
- "size": 35358,
34
- "sha256": "6a43f6cdc1591b1dc7304e5ccd66be1e41aaa7419546eb0258a280b8ea9b8642"
33
+ "size": 35299,
34
+ "sha256": "112c1becf555e48ea7f0ca52b4e0588c764777cefc90c33dd8c8fe52715b54ce"
35
35
  },
36
36
  "register.d.ts": {
37
37
  "size": 16,
package/dist/index.js CHANGED
@@ -1,3 +1,14 @@
1
+ /**
2
+ * @zintrust/socket v0.4.60
3
+ *
4
+ * Unified socket runtime for ZinTrust.
5
+ *
6
+ * Build Information:
7
+ * Built: 2026-04-05T07:58:23.814Z
8
+ * Node: >=20.0.0
9
+ * License: MIT
10
+ *
11
+ */
1
12
  import { Cloudflare, broadcastConfig, ErrorFactory, isArray, isNonEmptyString, Logger, middlewareConfig, Router, SocketFeature, } from '@zintrust/core';
2
13
  const encoder = new TextEncoder();
3
14
  const websocketGuid = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11';
@@ -491,7 +502,7 @@ const shouldUseCloudflareHub = (settings) => {
491
502
  };
492
503
  const parseJsonResponse = async (response) => {
493
504
  try {
494
- return (await response.clone().json());
505
+ return await response.clone().json();
495
506
  }
496
507
  catch {
497
508
  try {
@@ -839,15 +850,13 @@ const publishEvent = async (req, res) => {
839
850
  const registerSocketRoutes = (router) => {
840
851
  const settings = getSocketRuntimeSettings();
841
852
  const allowAuthRouteOverride = isSocketAuthRouteOverrideEnabled();
853
+ const hasExistingAuthRoute = routeExists(router, 'POST', '/broadcasting/auth');
842
854
  assertReservedSocketRouteAvailable(router, 'GET', `${settings.path}/:appKey`);
843
- assertReservedSocketRouteAvailable(router, 'POST', '/broadcasting/auth', {
844
- allowOverride: true,
845
- });
846
855
  assertReservedSocketRouteAvailable(router, 'POST', '/apps/:appId/events');
847
856
  Router.get(router, `${settings.path}/:appKey`, respondUpgradeRequired);
848
- if (allowAuthRouteOverride) {
849
- if (!routeExists(router, 'POST', '/broadcasting/auth')) {
850
- Logger.warn('SOCKET_ALLOW_AUTH_ROUTE_OVERRIDE=true but POST /broadcasting/auth is not registered by the application.');
857
+ if (hasExistingAuthRoute) {
858
+ if (!allowAuthRouteOverride) {
859
+ Logger.info('Detected existing application-owned POST /broadcasting/auth route; preserving it while sockets are enabled.');
851
860
  }
852
861
  }
853
862
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zintrust/socket",
3
- "version": "0.4.59",
3
+ "version": "0.4.61",
4
4
  "description": "Unified socket runtime for ZinTrust.",
5
5
  "private": false,
6
6
  "type": "module",
@@ -23,7 +23,7 @@
23
23
  "node": ">=20.0.0"
24
24
  },
25
25
  "peerDependencies": {
26
- "@zintrust/core": "^0.4.59"
26
+ "@zintrust/core": "^0.4.61"
27
27
  },
28
28
  "publishConfig": {
29
29
  "access": "public"
@@ -34,8 +34,5 @@
34
34
  "websocket",
35
35
  "broadcast"
36
36
  ],
37
- "scripts": {
38
- "build": "tsc -p tsconfig.json",
39
- "prepublishOnly": "npm run build"
40
- }
41
- }
37
+ "scripts": {}
38
+ }