@socketsecurity/cli-with-sentry 0.15.32 → 0.15.34
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/cli.js +297 -141
- package/dist/cli.js.map +1 -1
- package/dist/constants.js +3 -3
- package/dist/constants.js.map +1 -1
- package/dist/shadow-inject.js.map +1 -1
- package/dist/utils.js +128 -95
- package/dist/utils.js.map +1 -1
- package/external/@socketsecurity/registry/external/@inquirer/confirm.js +0 -1
- package/external/@socketsecurity/registry/external/@inquirer/input.js +0 -1
- package/external/@socketsecurity/registry/external/@inquirer/password.js +0 -1
- package/external/@socketsecurity/registry/external/@inquirer/search.js +0 -1
- package/external/@socketsecurity/registry/external/@inquirer/select.js +0 -1
- package/external/@socketsecurity/registry/external/@npmcli/package-json/index.js +0 -1
- package/external/@socketsecurity/registry/external/@npmcli/package-json/lib/read-package.js +0 -1
- package/external/@socketsecurity/registry/external/@npmcli/package-json/lib/sort.js +0 -1
- package/external/@socketsecurity/registry/external/@npmcli/promise-spawn.js +0 -1
- package/external/@socketsecurity/registry/external/@socketregistry/is-unicode-supported.js +0 -1
- package/external/@socketsecurity/registry/external/@socketregistry/packageurl-js.js +0 -1
- package/external/@socketsecurity/registry/external/@socketregistry/yocto-spinner.js +0 -1
- package/external/@socketsecurity/registry/external/@yarnpkg/extensions.js +0 -1
- package/external/@socketsecurity/registry/external/browserslist.js +0 -1
- package/external/@socketsecurity/registry/external/cacache.js +0 -1
- package/external/@socketsecurity/registry/external/fast-sort.js +0 -1
- package/external/@socketsecurity/registry/external/libnpmpack.js +0 -1
- package/external/@socketsecurity/registry/external/make-fetch-happen.js +0 -1
- package/external/@socketsecurity/registry/external/normalize-package-data.js +0 -1
- package/external/@socketsecurity/registry/external/npm-package-arg.js +0 -1
- package/external/@socketsecurity/registry/external/pacote.js +0 -1
- package/external/@socketsecurity/registry/external/picomatch.js +0 -1
- package/external/@socketsecurity/registry/external/semver.js +0 -1
- package/external/@socketsecurity/registry/external/signal-exit.js +0 -1
- package/external/@socketsecurity/registry/external/spdx-correct.js +0 -1
- package/external/@socketsecurity/registry/external/spdx-expression-parse.js +0 -1
- package/external/@socketsecurity/registry/external/tinyglobby.js +0 -1
- package/external/@socketsecurity/registry/external/validate-npm-package-name.js +0 -1
- package/external/@socketsecurity/registry/external/which.js +0 -1
- package/external/@socketsecurity/registry/external/yoctocolors-cjs.js +0 -1
- package/external/@socketsecurity/registry/lib/debug.js +37 -9
- package/package.json +5 -5
|
@@ -19174,4 +19174,3 @@ function requireLib() {
|
|
|
19174
19174
|
const libExports = requireLib()
|
|
19175
19175
|
|
|
19176
19176
|
module.exports = libExports
|
|
19177
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -16862,4 +16862,3 @@ const index = /*#__PURE__*/ Object.freeze({
|
|
|
16862
16862
|
})
|
|
16863
16863
|
|
|
16864
16864
|
module.exports = libExports
|
|
16865
|
-
//# sourceMappingURL=cacache.js.map
|
|
@@ -128708,4 +128708,3 @@ var index = /*#__PURE__*/ Object.freeze({
|
|
|
128708
128708
|
})
|
|
128709
128709
|
|
|
128710
128710
|
module.exports = libExports
|
|
128711
|
-
//# sourceMappingURL=libnpmpack.js.map
|
|
@@ -42383,4 +42383,3 @@ const index = /*#__PURE__*/ Object.freeze({
|
|
|
42383
42383
|
})
|
|
42384
42384
|
|
|
42385
42385
|
module.exports = libExports
|
|
42386
|
-
//# sourceMappingURL=make-fetch-happen.js.map
|
|
@@ -75850,4 +75850,3 @@ var index = /*#__PURE__*/ Object.freeze({
|
|
|
75850
75850
|
})
|
|
75851
75851
|
|
|
75852
75852
|
module.exports = libExports
|
|
75853
|
-
//# sourceMappingURL=pacote.js.map
|
|
@@ -1,30 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
3
|
const { apply: ReflectApply } = Reflect
|
|
4
4
|
|
|
5
5
|
/*@__NO_SIDE_EFFECTS__*/
|
|
6
6
|
function debugDir() {
|
|
7
|
-
'use strict'
|
|
8
7
|
if (isDebug()) {
|
|
9
8
|
const { logger } = /*@__PURE__*/ require('./logger')
|
|
10
9
|
ReflectApply(logger.dir, logger, arguments)
|
|
11
10
|
}
|
|
12
11
|
}
|
|
13
12
|
|
|
13
|
+
let pointingTriangle
|
|
14
14
|
/*@__NO_SIDE_EFFECTS__*/
|
|
15
15
|
function debugFn() {
|
|
16
|
-
// Purposefully in sloppy mode to aid with debuggability.
|
|
17
|
-
// 'use strict'
|
|
18
16
|
if (isDebug()) {
|
|
19
17
|
const { logger } = /*@__PURE__*/ require('./logger')
|
|
20
|
-
const
|
|
21
|
-
|
|
18
|
+
const { stack } = new Error()
|
|
19
|
+
let lineCount = 0
|
|
20
|
+
let lineStart = 0
|
|
21
|
+
let name = 'anonymous'
|
|
22
|
+
// Scan the stack trace character-by-character to find the 4th line
|
|
23
|
+
// (index 3), which is typically the caller of debugFn.
|
|
24
|
+
for (let i = 0, { length } = stack; i < length; i += 1) {
|
|
25
|
+
if (stack.charCodeAt(i) === 10 /*'\n'*/) {
|
|
26
|
+
lineCount += 1
|
|
27
|
+
if (lineCount < 4) {
|
|
28
|
+
// Store the start index of the next line.
|
|
29
|
+
lineStart = i + 1
|
|
30
|
+
} else {
|
|
31
|
+
// Extract the full line and trim it.
|
|
32
|
+
const line = stack.slice(lineStart, i).trimStart()
|
|
33
|
+
// Match the function name portion (e.g., "async runFix").
|
|
34
|
+
const match = /(?<=^at\s+).*?(?=\s+\(|$)/.exec(line)?.[0]
|
|
35
|
+
if (match) {
|
|
36
|
+
// Strip known V8 invocation prefixes to get the clean name.
|
|
37
|
+
name = match.replace(/^(?:async|bound|get|new|set)\s+/, '')
|
|
38
|
+
}
|
|
39
|
+
break
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
if (pointingTriangle === undefined) {
|
|
44
|
+
const supported =
|
|
45
|
+
/*@__PURE__*/ require('../external/@socketregistry/is-unicode-supported')()
|
|
46
|
+
pointingTriangle = supported ? '▸' : '>'
|
|
47
|
+
}
|
|
48
|
+
logger.info(
|
|
49
|
+
`[DEBUG]${name ? ` ${name} ${pointingTriangle}` : ''}`,
|
|
50
|
+
...arguments
|
|
51
|
+
)
|
|
22
52
|
}
|
|
23
53
|
}
|
|
24
54
|
|
|
25
55
|
/*@__NO_SIDE_EFFECTS__*/
|
|
26
56
|
function debugLog() {
|
|
27
|
-
'use strict'
|
|
28
57
|
if (isDebug()) {
|
|
29
58
|
const { logger } = /*@__PURE__*/ require('./logger')
|
|
30
59
|
ReflectApply(logger.info, logger, arguments)
|
|
@@ -33,7 +62,6 @@ function debugLog() {
|
|
|
33
62
|
|
|
34
63
|
/*@__NO_SIDE_EFFECTS__*/
|
|
35
64
|
function isDebug() {
|
|
36
|
-
'use strict'
|
|
37
65
|
const ENV = /*@__PURE__*/ require('./constants/env')
|
|
38
66
|
// eslint-disable-next-line no-warning-comments
|
|
39
67
|
// TODO: Make the environment variable name configurable.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@socketsecurity/cli-with-sentry",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.34",
|
|
4
4
|
"description": "CLI tool 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",
|
|
@@ -111,14 +111,14 @@
|
|
|
111
111
|
"@socketregistry/is-interactive": "1.0.5",
|
|
112
112
|
"@socketregistry/packageurl-js": "1.0.6",
|
|
113
113
|
"@socketsecurity/config": "3.0.1",
|
|
114
|
-
"@socketsecurity/registry": "1.0.
|
|
114
|
+
"@socketsecurity/registry": "1.0.201",
|
|
115
115
|
"@socketsecurity/sdk": "1.4.40",
|
|
116
116
|
"@types/blessed": "0.1.25",
|
|
117
117
|
"@types/cmd-shim": "5.0.2",
|
|
118
118
|
"@types/js-yaml": "4.0.9",
|
|
119
119
|
"@types/micromatch": "4.0.9",
|
|
120
120
|
"@types/mock-fs": "4.13.4",
|
|
121
|
-
"@types/node": "22.15.
|
|
121
|
+
"@types/node": "22.15.24",
|
|
122
122
|
"@types/npmcli__arborist": "6.3.0",
|
|
123
123
|
"@types/proc-log": "3.0.4",
|
|
124
124
|
"@types/semver": "7.7.0",
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
"husky": "9.1.7",
|
|
147
147
|
"ignore": "7.0.4",
|
|
148
148
|
"js-yaml": "npm:@zkochan/js-yaml@0.0.7",
|
|
149
|
-
"knip": "5.
|
|
149
|
+
"knip": "5.59.0",
|
|
150
150
|
"lint-staged": "16.1.0",
|
|
151
151
|
"magic-string": "0.30.17",
|
|
152
152
|
"meow": "13.2.0",
|
|
@@ -233,6 +233,6 @@
|
|
|
233
233
|
"strict": true
|
|
234
234
|
},
|
|
235
235
|
"dependencies": {
|
|
236
|
-
"@sentry/node": "9.
|
|
236
|
+
"@sentry/node": "9.23.0"
|
|
237
237
|
}
|
|
238
238
|
}
|