@socketsecurity/cli 2.0.6 → 2.0.8

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,20 @@ 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
+ ## [2.0.8](https://github.com/SocketDev/socket-cli/releases/tag/v2.0.8) - 2025-10-31
8
+
9
+ ### Fixed
10
+ - Binary name resolution for external tools (@coana-tech/cli, @cyclonedx/cdxgen, synp) in dlx execution
11
+ - Preflight downloads now correctly specify binary names for background package caching
12
+
13
+ ## [2.0.7](https://github.com/SocketDev/socket-cli/releases/tag/v2.0.7) - 2025-10-31
14
+
15
+ ### Added
16
+ - Shimmer effect to bootstrap spinner for enhanced visual feedback during CLI download
17
+
18
+ ### Changed
19
+ - Consolidated SOCKET_CLI_ISSUES_URL constant to socket constants module for better organization
20
+
7
21
  ## [2.0.6](https://github.com/SocketDev/socket-cli/releases/tag/v2.0.6) - 2025-10-31
8
22
 
9
23
  ### Fixed
package/dist/cli.js.bz CHANGED
Binary file
@@ -1 +1 @@
1
- 898c710a8d8b1efeee928e94387d701e896759067702e65b72924ee05a971331 cli.js.bz
1
+ 7384fb5b7e4e7a7113ae3ecdc5f18fa234bfb0ffebacc90822725e9e3cfb703d cli.js.bz
@@ -3503,7 +3503,7 @@ var require_agents = __commonJS({
3503
3503
  });
3504
3504
 
3505
3505
  // src/constants/socket.mts
3506
- var SOCKET_WEBSITE_URL2, SOCKET_YAML, SOCKET_YML, TOKEN_PREFIX, TOKEN_PREFIX_LENGTH;
3506
+ var SOCKET_WEBSITE_URL2, SOCKET_YAML, SOCKET_YML, TOKEN_PREFIX, TOKEN_PREFIX_LENGTH, SOCKET_CLI_ISSUES_URL;
3507
3507
  var init_socket = __esm({
3508
3508
  "src/constants/socket.mts"() {
3509
3509
  "use strict";
@@ -3513,6 +3513,7 @@ var init_socket = __esm({
3513
3513
  SOCKET_YML = "socket.yml";
3514
3514
  TOKEN_PREFIX = "sktsec_";
3515
3515
  TOKEN_PREFIX_LENGTH = TOKEN_PREFIX.length;
3516
+ SOCKET_CLI_ISSUES_URL = "https://github.com/SocketDev/socket-cli/issues";
3516
3517
  }
3517
3518
  });
3518
3519
 
@@ -213770,11 +213771,11 @@ async function v(o2, t, e, s) {
213770
213771
  }
213771
213772
  });
213772
213773
  }
213773
- var import_socket6, import_node_path7, import_memoization, import_path2, import_node_events, import_node_fs5, import_node_path8, import_path3, import_node_http, import_node_https, import_debug4, import_json, import_performance, import_node_fs6, import_node_path9, import_memoization2, import_node_fs7, import_node_readline, import_cache_with_ttl, import_core3, import_process2, import_socket7, import_debug5, import_fs3, import_json2, import_objects7, import_promises, import_suppress_warnings, import_url2, X, q, Z, ee, te, B, N, j, $, se, G, Q, R, b, $e, Ue, Fe, de, ve, xe, D, Y;
213774
+ var import_socket7, import_node_path7, import_memoization, import_path2, import_node_events, import_node_fs5, import_node_path8, import_path3, import_node_http, import_node_https, import_debug4, import_json, import_performance, import_node_fs6, import_node_path9, import_memoization2, import_node_fs7, import_node_readline, import_cache_with_ttl, import_core3, import_process2, import_socket8, import_debug5, import_fs3, import_json2, import_objects7, import_promises, import_suppress_warnings, import_url2, X, q, Z, ee, te, B, N, j, $, se, G, Q, R, b, $e, Ue, Fe, de, ve, xe, D, Y;
213774
213775
  var init_dist = __esm({
213775
213776
  "../../node_modules/.pnpm/@socketsecurity+sdk@3.0.24_typescript@5.9.3/node_modules/@socketsecurity/sdk/dist/index.mjs"() {
213776
213777
  init_esbuild_inject_import_meta();
213777
- import_socket6 = __toESM(require_socket(), 1);
213778
+ import_socket7 = __toESM(require_socket(), 1);
213778
213779
  import_node_path7 = __toESM(require("node:path"), 1);
213779
213780
  import_memoization = __toESM(require_memoization3(), 1);
213780
213781
  import_path2 = __toESM(require_path3(), 1);
@@ -213795,7 +213796,7 @@ var init_dist = __esm({
213795
213796
  import_cache_with_ttl = __toESM(require_cache_with_ttl(), 1);
213796
213797
  import_core3 = __toESM(require_core(), 1);
213797
213798
  import_process2 = __toESM(require_process(), 1);
213798
- import_socket7 = __toESM(require_socket(), 1);
213799
+ import_socket8 = __toESM(require_socket(), 1);
213799
213800
  import_debug5 = __toESM(require_debug5(), 1);
213800
213801
  import_fs3 = __toESM(require_fs(), 1);
213801
213802
  import_json2 = __toESM(require_json2(), 1);
@@ -213942,7 +213943,7 @@ var init_dist = __esm({
213942
213943
  return;
213943
213944
  }
213944
213945
  if (!s) throw new Error("Failed to get response from batch PURL request");
213945
- let r = import_node_readline.default.createInterface({ input: s, crlfDelay: Number.POSITIVE_INFINITY, signal: D }), n = this.#a === import_socket7.SOCKET_PUBLIC_API_TOKEN;
213946
+ let r = import_node_readline.default.createInterface({ input: s, crlfDelay: Number.POSITIVE_INFINITY, signal: D }), n = this.#a === import_socket8.SOCKET_PUBLIC_API_TOKEN;
213946
213947
  for await (let a of r) {
213947
213948
  let c = a.trim() ? (0, import_json2.jsonParse)(a, { throws: false }) : null;
213948
213949
  (0, import_objects7.isObjectObject)(c) && (yield this.#n(n ? M(c, false, e?.actions) : c));
@@ -213988,15 +213989,15 @@ var init_dist = __esm({
213988
213989
  u && n.includes(u) ? n = n.replace(u, a) : n = `${n}: ${a}`;
213989
213990
  }
213990
213991
  let i;
213991
- if (e === 401) i = ["\u2192 Authentication failed. API token is invalid or expired.", "\u2192 Check: Your API token is correct and active.", `\u2192 Generate a new token at: ${import_socket6.SOCKET_API_TOKENS_URL}`].join(`
213992
+ if (e === 401) i = ["\u2192 Authentication failed. API token is invalid or expired.", "\u2192 Check: Your API token is correct and active.", `\u2192 Generate a new token at: ${import_socket7.SOCKET_API_TOKENS_URL}`].join(`
213992
213993
  `);
213993
- else if (e === 403) i = ["\u2192 Authorization failed. Insufficient permissions.", "\u2192 Check: Your API token has required permissions for this operation.", "\u2192 Check: You have access to the specified organization/repository.", `\u2192 Verify: Organization settings at ${import_socket6.SOCKET_DASHBOARD_URL}`].join(`
213994
+ else if (e === 403) i = ["\u2192 Authorization failed. Insufficient permissions.", "\u2192 Check: Your API token has required permissions for this operation.", "\u2192 Check: You have access to the specified organization/repository.", `\u2192 Verify: Organization settings at ${import_socket7.SOCKET_DASHBOARD_URL}`].join(`
213994
213995
  `);
213995
213996
  else if (e === 404) i = ["\u2192 Resource not found.", "\u2192 Verify: Package name, version, or resource ID is correct.", "\u2192 Check: Organization or repository exists and is accessible."].join(`
213996
213997
  `);
213997
213998
  else if (e === 429) {
213998
213999
  let u = t.response.headers["retry-after"];
213999
- i = ["\u2192 Rate limit exceeded. Too many requests.", `\u2192 ${u ? `Retry after ${u} seconds.` : "Wait before retrying."}`, "\u2192 Try: Implement exponential backoff or enable SDK retry option.", `\u2192 Contact support to increase rate limits: ${import_socket6.SOCKET_CONTACT_URL}`].join(`
214000
+ i = ["\u2192 Rate limit exceeded. Too many requests.", `\u2192 ${u ? `Retry after ${u} seconds.` : "Wait before retrying."}`, "\u2192 Try: Implement exponential backoff or enable SDK retry option.", `\u2192 Contact support to increase rate limits: ${import_socket7.SOCKET_CONTACT_URL}`].join(`
214000
214001
  `);
214001
214002
  } else e === 400 ? i = ["\u2192 Bad request. Invalid parameters or request body.", "\u2192 Check: All required parameters are provided and correctly formatted.", "\u2192 Verify: Package URLs (PURLs) follow correct format."].join(`
214002
214003
  `) : e === 413 && (i = ["\u2192 Payload too large. Request exceeds size limits.", "\u2192 Try: Reduce the number of files or packages in a single request.", "\u2192 Try: Use batch operations with smaller chunks."].join(`
@@ -214018,7 +214019,7 @@ var init_dist = __esm({
214018
214019
  return await this.#s(c);
214019
214020
  }
214020
214021
  if (!s) throw new Error("Failed to get response from batch PURL request");
214021
- let r = import_node_readline.default.createInterface({ input: s, crlfDelay: Number.POSITIVE_INFINITY, signal: D }), n = this.#a === import_socket7.SOCKET_PUBLIC_API_TOKEN, a = [];
214022
+ let r = import_node_readline.default.createInterface({ input: s, crlfDelay: Number.POSITIVE_INFINITY, signal: D }), n = this.#a === import_socket8.SOCKET_PUBLIC_API_TOKEN, a = [];
214022
214023
  for await (let c of r) {
214023
214024
  let l = c.trim() ? (0, import_json2.jsonParse)(c, { throws: false }) : null;
214024
214025
  (0, import_objects7.isObjectObject)(l) && a.push(n ? M(l, false, e?.actions) : l);
@@ -214607,7 +214608,7 @@ function getDefaultApiToken() {
214607
214608
  return _defaultToken;
214608
214609
  }
214609
214610
  function getPublicApiToken() {
214610
- return getDefaultApiToken() || env_default.SOCKET_CLI_API_TOKEN || import_socket8.SOCKET_PUBLIC_API_TOKEN;
214611
+ return getDefaultApiToken() || env_default.SOCKET_CLI_API_TOKEN || import_socket9.SOCKET_PUBLIC_API_TOKEN;
214611
214612
  }
214612
214613
  async function setupSdk(options) {
214613
214614
  const opts = { __proto__: null, ...options };
@@ -214657,14 +214658,14 @@ async function setupSdk(options) {
214657
214658
  })
214658
214659
  };
214659
214660
  }
214660
- var import_is_interactive, import_socket8, import_logger4, import_prompts, import_strings, import_url3, import_words, _defaultToken;
214661
+ var import_is_interactive, import_socket9, import_logger4, import_prompts, import_strings, import_url3, import_words, _defaultToken;
214661
214662
  var init_sdk = __esm({
214662
214663
  "src/utils/socket/sdk.mts"() {
214663
214664
  "use strict";
214664
214665
  init_esbuild_inject_import_meta();
214665
214666
  init_hpagent();
214666
214667
  import_is_interactive = __toESM(require_is_interactive(), 1);
214667
- import_socket8 = __toESM(require_socket(), 1);
214668
+ import_socket9 = __toESM(require_socket(), 1);
214668
214669
  import_logger4 = __toESM(require_logger(), 1);
214669
214670
  import_prompts = __toESM(require_prompts(), 1);
214670
214671
  import_strings = __toESM(require_strings(), 1);
@@ -214787,16 +214788,15 @@ var import_agents4 = __toESM(require_agents(), 1);
214787
214788
  var import_logger2 = __toESM(require_logger(), 1);
214788
214789
  init_env();
214789
214790
 
214790
- // src/constants/github.mts
214791
- init_esbuild_inject_import_meta();
214792
- var SOCKET_CLI_ISSUES_URL = "https://github.com/SocketDev/socket-cli/issues";
214793
-
214794
214791
  // src/constants/packages.mts
214795
214792
  init_esbuild_inject_import_meta();
214796
214793
  var NODE_MODULES2 = "node_modules";
214797
214794
  var SOCKET_DESCRIPTION = "CLI for Socket.dev";
214798
214795
  var SOCKET_DESCRIPTION_WITH_SENTRY = `${SOCKET_DESCRIPTION}, includes Sentry error handling`;
214799
214796
 
214797
+ // src/utils/npm/paths.mts
214798
+ init_socket();
214799
+
214800
214800
  // src/utils/fs/path-resolve.mts
214801
214801
  init_esbuild_inject_import_meta();
214802
214802
  var import_node_fs = require("node:fs");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@socketsecurity/cli",
3
- "version": "2.0.6",
3
+ "version": "2.0.8",
4
4
  "description": "CLI for Socket.dev",
5
5
  "homepage": "https://github.com/SocketDev/socket-cli",
6
6
  "license": "MIT",