@socketsecurity/cli-with-sentry 0.15.9 → 0.15.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/.config/tsconfig.dts.tsbuildinfo +1 -1
- package/dist/cli.js +81 -34
- package/dist/cli.js.map +1 -1
- package/dist/constants.js +5 -3
- package/dist/constants.js.map +1 -1
- package/dist/shadow-inject.js +7 -3
- package/dist/shadow-inject.js.map +1 -1
- package/dist/types/commands/fix/npm-fix.d.mts.map +1 -1
- package/dist/types/commands/fix/pnpm-fix.d.mts.map +1 -1
- package/dist/types/shadow/npm/arborist-helpers.d.mts.map +1 -1
- package/external/@socketsecurity/registry/lib/logger.d.ts +3 -1
- package/external/@socketsecurity/registry/lib/logger.js +16 -0
- package/external/@socketsecurity/registry/lib/spinner.js +5 -1
- package/external/@socketsecurity/registry/package.json +2 -2
- package/package.json +5 -5
|
@@ -66,6 +66,8 @@ const consoleSymbols = Object.getOwnPropertySymbols(console).filter(
|
|
|
66
66
|
s => s !== Symbol.toStringTag
|
|
67
67
|
)
|
|
68
68
|
|
|
69
|
+
const incLogCallCountSymbol = Symbol.for('logger.logCallCount++')
|
|
70
|
+
|
|
69
71
|
const privateConsole = new WeakMap()
|
|
70
72
|
|
|
71
73
|
const symbolTypeToMethodName = {
|
|
@@ -80,6 +82,7 @@ class Logger {
|
|
|
80
82
|
static LOG_SYMBOLS = LOG_SYMBOLS
|
|
81
83
|
|
|
82
84
|
#indention = ''
|
|
85
|
+
#logCallCount = 0
|
|
83
86
|
|
|
84
87
|
constructor(...args) {
|
|
85
88
|
if (args.length) {
|
|
@@ -119,11 +122,13 @@ class Logger {
|
|
|
119
122
|
if (typeof text === 'string') {
|
|
120
123
|
extras = args.slice(1)
|
|
121
124
|
console[methodName](`${this.#indention}${text}`)
|
|
125
|
+
this[incLogCallCountSymbol]()
|
|
122
126
|
} else {
|
|
123
127
|
extras = args
|
|
124
128
|
}
|
|
125
129
|
if (extras.length) {
|
|
126
130
|
console[methodName](...extras)
|
|
131
|
+
this[incLogCallCountSymbol]()
|
|
127
132
|
}
|
|
128
133
|
return this
|
|
129
134
|
}
|
|
@@ -140,12 +145,22 @@ class Logger {
|
|
|
140
145
|
const methodName = symbolTypeToMethodName[symbolType]
|
|
141
146
|
const console = privateConsole.get(this)
|
|
142
147
|
console[methodName](`${this.#indention}${LOG_SYMBOLS[symbolType]} ${text}`)
|
|
148
|
+
this[incLogCallCountSymbol]()
|
|
143
149
|
if (extras.length) {
|
|
144
150
|
console[methodName](...extras)
|
|
151
|
+
this[incLogCallCountSymbol]()
|
|
145
152
|
}
|
|
146
153
|
return this
|
|
147
154
|
}
|
|
148
155
|
|
|
156
|
+
get logCallCount() {
|
|
157
|
+
return this.#logCallCount
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
[incLogCallCountSymbol]() {
|
|
161
|
+
this.#logCallCount += 1
|
|
162
|
+
}
|
|
163
|
+
|
|
149
164
|
dedent(spaces = 2) {
|
|
150
165
|
this.#indention = this.#indention.slice(0, -spaces)
|
|
151
166
|
return this
|
|
@@ -223,6 +238,7 @@ Object.defineProperties(
|
|
|
223
238
|
const logger = new Logger()
|
|
224
239
|
|
|
225
240
|
module.exports = {
|
|
241
|
+
incLogCallCountSymbol,
|
|
226
242
|
LOG_SYMBOLS,
|
|
227
243
|
Logger,
|
|
228
244
|
logger
|
|
@@ -38,8 +38,12 @@ function Spinner(options) {
|
|
|
38
38
|
text = ''
|
|
39
39
|
}
|
|
40
40
|
super[methodName](text)
|
|
41
|
+
const {
|
|
42
|
+
incLogCallCountSymbol,
|
|
43
|
+
logger
|
|
44
|
+
} = /*@__PURE__*/ require('./logger')
|
|
45
|
+
logger[incLogCallCountSymbol]()
|
|
41
46
|
if (extras.length) {
|
|
42
|
-
const { logger } = /*@__PURE__*/ require('./logger')
|
|
43
47
|
logger.log(...extras)
|
|
44
48
|
}
|
|
45
49
|
return this
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@socketsecurity/registry",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.185",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Socket.dev registry helpers methods and metadata",
|
|
6
6
|
"keywords": [
|
|
@@ -645,7 +645,7 @@
|
|
|
645
645
|
"oxlint": "0.16.11",
|
|
646
646
|
"pacote": "21.0.0",
|
|
647
647
|
"picomatch": "4.0.2",
|
|
648
|
-
"rollup": "4.
|
|
648
|
+
"rollup": "4.41.0",
|
|
649
649
|
"semver": "7.7.2",
|
|
650
650
|
"signal-exit": "4.1.0",
|
|
651
651
|
"spdx-correct": "3.2.0",
|
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.11",
|
|
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",
|
|
@@ -108,14 +108,14 @@
|
|
|
108
108
|
"@socketregistry/is-interactive": "1.0.5",
|
|
109
109
|
"@socketregistry/packageurl-js": "1.0.6",
|
|
110
110
|
"@socketsecurity/config": "2.1.3",
|
|
111
|
-
"@socketsecurity/registry": "1.0.
|
|
111
|
+
"@socketsecurity/registry": "1.0.185",
|
|
112
112
|
"@socketsecurity/sdk": "1.4.36",
|
|
113
113
|
"@types/blessed": "0.1.25",
|
|
114
114
|
"@types/cmd-shim": "5.0.2",
|
|
115
115
|
"@types/js-yaml": "4.0.9",
|
|
116
116
|
"@types/micromatch": "4.0.9",
|
|
117
117
|
"@types/mock-fs": "4.13.4",
|
|
118
|
-
"@types/node": "22.15.
|
|
118
|
+
"@types/node": "22.15.19",
|
|
119
119
|
"@types/npmcli__arborist": "6.3.0",
|
|
120
120
|
"@types/proc-log": "3.0.4",
|
|
121
121
|
"@types/semver": "7.7.0",
|
|
@@ -132,8 +132,8 @@
|
|
|
132
132
|
"del-cli": "6.0.0",
|
|
133
133
|
"dev-null-cli": "2.0.0",
|
|
134
134
|
"eslint": "9.27.0",
|
|
135
|
-
"eslint-import-resolver-typescript": "4.3.
|
|
136
|
-
"eslint-plugin-import-x": "4.12.
|
|
135
|
+
"eslint-import-resolver-typescript": "4.3.5",
|
|
136
|
+
"eslint-plugin-import-x": "4.12.2",
|
|
137
137
|
"eslint-plugin-n": "17.18.0",
|
|
138
138
|
"eslint-plugin-sort-destructure-keys": "2.0.0",
|
|
139
139
|
"eslint-plugin-unicorn": "56.0.1",
|