@socketsecurity/cli-with-sentry 1.0.10 → 1.0.11

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/dist/vendor.js CHANGED
@@ -35572,7 +35572,7 @@ var isInteractiveExports = /*@__PURE__*/ requireIsInteractive();
35572
35572
  var dist$e = {};
35573
35573
 
35574
35574
  var name$2 = "@socketsecurity/sdk";
35575
- var version$5 = "1.4.50";
35575
+ var version$5 = "1.4.51";
35576
35576
  var license = "MIT";
35577
35577
  var description = "SDK for the Socket API client";
35578
35578
  var author = {
@@ -35655,27 +35655,27 @@ var scripts = {
35655
35655
  "update:deps": "npx --yes npm-check-updates"
35656
35656
  };
35657
35657
  var dependencies = {
35658
- "@socketsecurity/registry": "1.0.215"
35658
+ "@socketsecurity/registry": "1.0.217"
35659
35659
  };
35660
35660
  var devDependencies = {
35661
- "@biomejs/biome": "2.0.5",
35661
+ "@biomejs/biome": "2.0.6",
35662
35662
  "@dotenvx/dotenvx": "1.45.1",
35663
35663
  "@eslint/compat": "1.3.1",
35664
- "@eslint/js": "9.29.0",
35665
- "@types/node": "24.0.4",
35664
+ "@eslint/js": "9.30.0",
35665
+ "@types/node": "24.0.7",
35666
35666
  "@typescript-eslint/parser": "8.35.0",
35667
35667
  "@vitest/coverage-v8": "3.2.4",
35668
35668
  "del-cli": "6.0.0",
35669
- eslint: "9.29.0",
35669
+ eslint: "9.30.0",
35670
35670
  "eslint-import-resolver-typescript": "4.4.4",
35671
- "eslint-plugin-import-x": "4.16.0",
35671
+ "eslint-plugin-import-x": "4.16.1",
35672
35672
  "eslint-plugin-jsdoc": "51.2.3",
35673
35673
  "eslint-plugin-n": "17.20.0",
35674
35674
  "eslint-plugin-sort-destructure-keys": "2.0.0",
35675
35675
  "eslint-plugin-unicorn": "56.0.1",
35676
35676
  globals: "16.2.0",
35677
35677
  husky: "9.1.7",
35678
- knip: "5.61.2",
35678
+ knip: "5.61.3",
35679
35679
  "lint-staged": "16.1.2",
35680
35680
  nock: "14.0.5",
35681
35681
  "npm-run-all2": "8.0.4",
@@ -172598,5 +172598,5 @@ exports.terminalLinkExports = terminalLinkExports;
172598
172598
  exports.updater = updater$1;
172599
172599
  exports.yargsParser = yargsParser;
172600
172600
  exports.yoctocolorsCjsExports = yoctocolorsCjsExports;
172601
- //# debugId=220c27c7-9cd6-40e7-ad6e-7b25f79cf1c0
172601
+ //# debugId=d7210c67-fab3-4cc3-8e6c-db0dd8a99646
172602
172602
  //# sourceMappingURL=vendor.js.map
@@ -1,5 +1,9 @@
1
1
  'use strict'
2
2
 
3
+ const { stripAnsi } = /*@__PURE__*/ require('./strings')
4
+
5
+ const { keys: ObjectKeys } = Object
6
+
3
7
  let _child_process
4
8
  /*@__NO_SIDE_EFFECTS__*/
5
9
  function getChildProcess() {
@@ -20,35 +24,46 @@ function getSpawn() {
20
24
  return _spawn
21
25
  }
22
26
 
27
+ /*@__NO_SIDE_EFFECTS__*/
28
+ function isStdioType(stdio, type) {
29
+ return (
30
+ stdio === type ||
31
+ (Array.isArray(stdio) &&
32
+ stdio.length > 2 &&
33
+ stdio[0] === type &&
34
+ stdio[1] === type &&
35
+ stdio[2] === type)
36
+ )
37
+ }
38
+
39
+ /*@__NO_SIDE_EFFECTS__*/
40
+ function stripAnsiFromSpawnResult(result) {
41
+ const { stderr, stdout } = result
42
+ if (typeof stdout === 'string') {
43
+ result.stdout = stripAnsi(stdout)
44
+ }
45
+ if (typeof stderr === 'string') {
46
+ result.stderr = stripAnsi(stderr)
47
+ }
48
+ return result
49
+ }
50
+
23
51
  /*@__NO_SIDE_EFFECTS__*/
24
52
  function spawn(cmd, args, options, extra) {
25
53
  const {
26
54
  spinner = /*@__PURE__*/ require('./constants/spinner'),
55
+ stripAnsi: shouldStripAnsi = true,
27
56
  ...spawnOptions
28
57
  } = { __proto__: null, ...options }
29
58
  const spawn = getSpawn()
30
59
  const isSpinning = !!spinner?.isSpinning
31
- const { env, stdio } = spawnOptions
60
+ const { env, stdio, stdioString = true } = spawnOptions
32
61
  // The stdio option can be a string or an array.
33
62
  // https://nodejs.org/api/child_process.html#optionsstdio
34
- const isStdioIgnored =
35
- stdio === 'ignore' ||
36
- (Array.isArray(stdio) &&
37
- stdio.length > 2 &&
38
- stdio[0] === 'ignore' &&
39
- stdio[1] === 'ignore' &&
40
- stdio[2] === 'ignore')
41
- const isStdioPiped =
42
- stdio === undefined ||
43
- stdio === 'pipe' ||
44
- (Array.isArray(stdio) &&
45
- stdio.length > 2 &&
46
- stdio[0] === 'pipe' &&
47
- stdio[1] === 'pipe' &&
48
- stdio[2] === 'pipe')
49
- const shouldPauseSpinner = !isStdioIgnored && !isStdioPiped
63
+ const shouldPauseSpinner =
64
+ isSpinning && !isStdioType(stdio, 'ignore') && !isStdioType(stdio, 'pipe')
50
65
  if (shouldPauseSpinner) {
51
- spinner?.stop()
66
+ spinner.stop()
52
67
  }
53
68
  let spawnPromise = spawn(
54
69
  cmd,
@@ -69,13 +84,19 @@ function spawn(cmd, args, options, extra) {
69
84
  },
70
85
  extra
71
86
  )
72
- if (shouldPauseSpinner && isSpinning) {
73
- const oldSpawnPromise = spawnPromise
87
+ const oldSpawnPromise = spawnPromise
88
+ if (shouldStripAnsi && stdioString) {
89
+ spawnPromise = spawnPromise.then(stripAnsiFromSpawnResult).catch(error => {
90
+ throw stripAnsiFromSpawnResult(error)
91
+ })
92
+ }
93
+ if (shouldPauseSpinner) {
74
94
  spawnPromise = spawnPromise.finally(() => {
75
- spinner?.start()
95
+ spinner.start()
76
96
  })
77
- spawnPromise.process = oldSpawnPromise.process
78
- spawnPromise.stdin = oldSpawnPromise.stdin
97
+ }
98
+ for (const key of ObjectKeys(oldSpawnPromise)) {
99
+ spawnPromise[key] = oldSpawnPromise[key]
79
100
  }
80
101
  return spawnPromise
81
102
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@socketsecurity/cli-with-sentry",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "CLI for Socket.dev, includes Sentry error handling, otherwise identical to the regular `socket` package",
5
5
  "homepage": "https://github.com/SocketDev/socket-cli",
6
6
  "license": "MIT",
@@ -112,8 +112,8 @@
112
112
  "@socketregistry/is-interactive": "1.0.6",
113
113
  "@socketregistry/packageurl-js": "1.0.8",
114
114
  "@socketsecurity/config": "3.0.1",
115
- "@socketsecurity/registry": "1.0.217",
116
- "@socketsecurity/sdk": "1.4.50",
115
+ "@socketsecurity/registry": "1.0.219",
116
+ "@socketsecurity/sdk": "1.4.51",
117
117
  "@types/blessed": "0.1.25",
118
118
  "@types/cmd-shim": "5.0.2",
119
119
  "@types/js-yaml": "4.0.9",
@@ -127,7 +127,7 @@
127
127
  "@types/which": "3.0.4",
128
128
  "@types/yargs-parser": "21.0.3",
129
129
  "@typescript-eslint/parser": "8.35.0",
130
- "@typescript/native-preview": "7.0.0-dev.20250628.1",
130
+ "@typescript/native-preview": "7.0.0-dev.20250629.1",
131
131
  "@vitest/coverage-v8": "3.2.4",
132
132
  "blessed": "0.1.81",
133
133
  "blessed-contrib": "4.11.0",