@socketsecurity/sdk 1.8.3 → 1.8.4

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/CHANGELOG.md CHANGED
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
+ ## [1.8.4](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.8.4) - 2025-10-01
8
+
9
+ ### Fixed
10
+ - Fixed registry constant import paths to use correct casing (SOCKET_PUBLIC_API_TOKEN, UNKNOWN_ERROR)
11
+
7
12
  ## [1.8.3](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.8.3) - 2025-09-30
8
13
 
9
14
  ### Changed
@@ -12,8 +12,8 @@ const node_events_1 = __importDefault(require("node:events"));
12
12
  const node_fs_1 = require("node:fs");
13
13
  const node_readline_1 = __importDefault(require("node:readline"));
14
14
  const abort_signal_1 = __importDefault(require("@socketsecurity/registry/lib/constants/abort-signal"));
15
- const socket_public_api_token_1 = __importDefault(require("@socketsecurity/registry/lib/constants/socket-public-api-token"));
16
- const unknown_error_1 = __importDefault(require("@socketsecurity/registry/lib/constants/unknown-error"));
15
+ const SOCKET_PUBLIC_API_TOKEN_1 = __importDefault(require("@socketsecurity/registry/lib/constants/SOCKET_PUBLIC_API_TOKEN"));
16
+ const UNKNOWN_ERROR_1 = __importDefault(require("@socketsecurity/registry/lib/constants/UNKNOWN_ERROR"));
17
17
  const debug_1 = require("@socketsecurity/registry/lib/debug");
18
18
  const json_1 = require("@socketsecurity/registry/lib/json");
19
19
  const objects_1 = require("@socketsecurity/registry/lib/objects");
@@ -109,7 +109,7 @@ class SocketSdk {
109
109
  crlfDelay: Infinity,
110
110
  signal: abort_signal_1.default,
111
111
  });
112
- const isPublicToken = this.#apiToken === socket_public_api_token_1.default;
112
+ const isPublicToken = this.#apiToken === SOCKET_PUBLIC_API_TOKEN_1.default;
113
113
  for await (const line of rli) {
114
114
  const trimmed = line.trim();
115
115
  const artifact = trimmed
@@ -163,7 +163,7 @@ class SocketSdk {
163
163
  body = bodyStr;
164
164
  }
165
165
  // Build error message that includes the body content if available.
166
- let errorMessage = error.message ?? unknown_error_1.default;
166
+ let errorMessage = error.message ?? UNKNOWN_ERROR_1.default;
167
167
  const trimmedBody = body?.trim();
168
168
  if (trimmedBody && !errorMessage.includes(trimmedBody)) {
169
169
  // Replace generic status message with actual error body if present,
@@ -217,7 +217,7 @@ class SocketSdk {
217
217
  crlfDelay: Infinity,
218
218
  signal: abort_signal_1.default,
219
219
  });
220
- const isPublicToken = this.#apiToken === socket_public_api_token_1.default;
220
+ const isPublicToken = this.#apiToken === SOCKET_PUBLIC_API_TOKEN_1.default;
221
221
  const results = [];
222
222
  for await (const line of rli) {
223
223
  const trimmed = line.trim();
@@ -1226,7 +1226,7 @@ class SocketSdk {
1226
1226
  return {
1227
1227
  ok: false,
1228
1228
  message: 'API request failed',
1229
- cause: errStr || unknown_error_1.default,
1229
+ cause: errStr || UNKNOWN_ERROR_1.default,
1230
1230
  };
1231
1231
  /* c8 ignore stop */
1232
1232
  }
@@ -1319,7 +1319,7 @@ class SocketSdk {
1319
1319
  return {
1320
1320
  ok: false,
1321
1321
  message: 'API request failed',
1322
- cause: errStr || unknown_error_1.default,
1322
+ cause: errStr || UNKNOWN_ERROR_1.default,
1323
1323
  };
1324
1324
  /* c8 ignore stop */
1325
1325
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@socketsecurity/sdk",
3
- "version": "1.8.3",
3
+ "version": "1.8.4",
4
4
  "license": "MIT",
5
5
  "description": "SDK for the Socket API client",
6
6
  "author": {