@socketsecurity/cli-with-sentry 1.1.63 → 1.1.65
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 +10 -0
- package/dist/constants.js +4 -4
- package/dist/constants.js.map +1 -1
- package/dist/tsconfig.dts.tsbuildinfo +1 -1
- package/dist/types/utils/api.d.mts.map +1 -1
- package/dist/utils.js +15 -15
- package/dist/utils.js.map +1 -1
- package/dist/vendor.js +23 -15
- package/package.json +4 -4
package/dist/vendor.js
CHANGED
|
@@ -27714,7 +27714,7 @@ var isInteractiveExports = /*@__PURE__*/ requireIsInteractive();
|
|
|
27714
27714
|
var dist$e = {};
|
|
27715
27715
|
|
|
27716
27716
|
var name$4 = "@socketsecurity/sdk";
|
|
27717
|
-
var version$7 = "1.4.
|
|
27717
|
+
var version$7 = "1.4.96";
|
|
27718
27718
|
var packageManager = "pnpm@10.24.0";
|
|
27719
27719
|
var license = "MIT";
|
|
27720
27720
|
var description = "SDK for the Socket API client";
|
|
@@ -28057,12 +28057,14 @@ function requireDist$e () {
|
|
|
28057
28057
|
}
|
|
28058
28058
|
class ResponseError extends Error {
|
|
28059
28059
|
response;
|
|
28060
|
-
|
|
28060
|
+
url;
|
|
28061
|
+
constructor(response, message = '', url) {
|
|
28061
28062
|
const statusCode = response.statusCode ?? 'unknown';
|
|
28062
28063
|
const statusMessage = response.statusMessage ?? 'No status message';
|
|
28063
28064
|
super(`Socket API ${message || 'Request failed'} (${statusCode}): ${statusMessage}`);
|
|
28064
28065
|
this.name = 'ResponseError';
|
|
28065
28066
|
this.response = response;
|
|
28067
|
+
this.url = url;
|
|
28066
28068
|
Error.captureStackTrace(this, ResponseError);
|
|
28067
28069
|
}
|
|
28068
28070
|
}
|
|
@@ -28077,7 +28079,7 @@ function requireDist$e () {
|
|
|
28077
28079
|
...options
|
|
28078
28080
|
})
|
|
28079
28081
|
.end();
|
|
28080
|
-
const response = await getResponse(req);
|
|
28082
|
+
const response = await getResponse(req, url);
|
|
28081
28083
|
hooks?.onResponse?.({
|
|
28082
28084
|
method,
|
|
28083
28085
|
url,
|
|
@@ -28109,7 +28111,7 @@ function requireDist$e () {
|
|
|
28109
28111
|
...options
|
|
28110
28112
|
})
|
|
28111
28113
|
.end();
|
|
28112
|
-
const response = await getResponse(req);
|
|
28114
|
+
const response = await getResponse(req, url);
|
|
28113
28115
|
hooks?.onResponse?.({
|
|
28114
28116
|
method,
|
|
28115
28117
|
url,
|
|
@@ -28154,7 +28156,7 @@ function requireDist$e () {
|
|
|
28154
28156
|
});
|
|
28155
28157
|
req.write(body);
|
|
28156
28158
|
req.end();
|
|
28157
|
-
const response = await getResponse(req);
|
|
28159
|
+
const response = await getResponse(req, url);
|
|
28158
28160
|
hooks?.onResponse?.({
|
|
28159
28161
|
method,
|
|
28160
28162
|
url,
|
|
@@ -28199,7 +28201,7 @@ function requireDist$e () {
|
|
|
28199
28201
|
});
|
|
28200
28202
|
req.write(body);
|
|
28201
28203
|
req.end();
|
|
28202
|
-
const response = await getResponse(req);
|
|
28204
|
+
const response = await getResponse(req, url);
|
|
28203
28205
|
hooks?.onResponse?.({
|
|
28204
28206
|
method,
|
|
28205
28207
|
url,
|
|
@@ -28290,7 +28292,7 @@ function requireDist$e () {
|
|
|
28290
28292
|
// Send headers early to prompt server validation (auth, URL, quota, etc.).
|
|
28291
28293
|
req.flushHeaders();
|
|
28292
28294
|
// Concurrently wait for response while we stream body.
|
|
28293
|
-
getResponse(req).then(response => {
|
|
28295
|
+
getResponse(req, url.toString()).then(response => {
|
|
28294
28296
|
hooks?.onResponse?.({
|
|
28295
28297
|
method,
|
|
28296
28298
|
url: url.toString(),
|
|
@@ -28408,7 +28410,7 @@ function requireDist$e () {
|
|
|
28408
28410
|
const urlObj = (0, url_1.parseUrl)(url);
|
|
28409
28411
|
return urlObj?.protocol === 'http:' ? node_http_1.default : node_https_1.default;
|
|
28410
28412
|
}
|
|
28411
|
-
async function getResponse(req) {
|
|
28413
|
+
async function getResponse(req, url) {
|
|
28412
28414
|
const res = await new Promise((resolve, reject) => {
|
|
28413
28415
|
const cleanup = () => {
|
|
28414
28416
|
req.off('response', onResponse);
|
|
@@ -28440,7 +28442,7 @@ function requireDist$e () {
|
|
|
28440
28442
|
abort_signal_1.default?.addEventListener('abort', onAbort);
|
|
28441
28443
|
});
|
|
28442
28444
|
if (!isResponseOk(res)) {
|
|
28443
|
-
throw new ResponseError(res, `${req.method} request failed
|
|
28445
|
+
throw new ResponseError(res, `${req.method} request failed`, url);
|
|
28444
28446
|
}
|
|
28445
28447
|
return res;
|
|
28446
28448
|
}
|
|
@@ -28575,13 +28577,14 @@ function requireDist$e () {
|
|
|
28575
28577
|
}
|
|
28576
28578
|
async #createBatchPurlRequest(componentsObj, queryParams) {
|
|
28577
28579
|
// Adds the first 'abort' listener to abortSignal.
|
|
28580
|
+
const url = `${this.#baseUrl}purl?${queryToSearchParams(queryParams)}`;
|
|
28578
28581
|
const req = getHttpModule(this.#baseUrl)
|
|
28579
|
-
.request(
|
|
28582
|
+
.request(url, {
|
|
28580
28583
|
method: 'POST',
|
|
28581
28584
|
...this.#reqOptions
|
|
28582
28585
|
})
|
|
28583
28586
|
.end(JSON.stringify(componentsObj));
|
|
28584
|
-
return await getResponse(req);
|
|
28587
|
+
return await getResponse(req, url);
|
|
28585
28588
|
}
|
|
28586
28589
|
async *#createBatchPurlGenerator(componentsObj, queryParams) {
|
|
28587
28590
|
let res;
|
|
@@ -28653,7 +28656,8 @@ function requireDist$e () {
|
|
|
28653
28656
|
success: false,
|
|
28654
28657
|
status: statusCode ?? 0,
|
|
28655
28658
|
error: error.message ?? 'Unknown error',
|
|
28656
|
-
cause: body
|
|
28659
|
+
cause: body,
|
|
28660
|
+
url: error.url
|
|
28657
28661
|
};
|
|
28658
28662
|
}
|
|
28659
28663
|
#handleApiSuccess(data) {
|
|
@@ -28902,13 +28906,14 @@ function requireDist$e () {
|
|
|
28902
28906
|
}
|
|
28903
28907
|
async getOrgFullScan(orgSlug, fullScanId, file) {
|
|
28904
28908
|
try {
|
|
28909
|
+
const url = `${this.#baseUrl}orgs/${encodeURIComponent(orgSlug)}/full-scans/${encodeURIComponent(fullScanId)}`;
|
|
28905
28910
|
const req = getHttpModule(this.#baseUrl)
|
|
28906
|
-
.request(
|
|
28911
|
+
.request(url, {
|
|
28907
28912
|
method: 'GET',
|
|
28908
28913
|
...this.#reqOptions
|
|
28909
28914
|
})
|
|
28910
28915
|
.end();
|
|
28911
|
-
const res = await getResponse(req);
|
|
28916
|
+
const res = await getResponse(req, url);
|
|
28912
28917
|
if (file) {
|
|
28913
28918
|
res.pipe((0, node_fs_1.createWriteStream)(file));
|
|
28914
28919
|
}
|
|
@@ -29123,6 +29128,9 @@ function requireDist$e () {
|
|
|
29123
29128
|
if (body) {
|
|
29124
29129
|
result.cause = body;
|
|
29125
29130
|
}
|
|
29131
|
+
if (e.url) {
|
|
29132
|
+
result.url = e.url;
|
|
29133
|
+
}
|
|
29126
29134
|
return result;
|
|
29127
29135
|
}
|
|
29128
29136
|
}
|
|
@@ -173114,5 +173122,5 @@ exports.terminalLinkExports = terminalLinkExports;
|
|
|
173114
173122
|
exports.updater = updater$1;
|
|
173115
173123
|
exports.yargsParser = yargsParser;
|
|
173116
173124
|
exports.yoctocolorsCjsExports = yoctocolorsCjsExports;
|
|
173117
|
-
//# debugId=
|
|
173125
|
+
//# debugId=a276c379-48fe-4ef0-a095-dcc5a3a7fb0b
|
|
173118
173126
|
//# sourceMappingURL=vendor.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@socketsecurity/cli-with-sentry",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.65",
|
|
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 AND OFL-1.1",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"@babel/preset-typescript": "7.27.1",
|
|
96
96
|
"@babel/runtime": "7.28.4",
|
|
97
97
|
"@biomejs/biome": "2.2.4",
|
|
98
|
-
"@coana-tech/cli": "14.12.
|
|
98
|
+
"@coana-tech/cli": "14.12.183",
|
|
99
99
|
"@cyclonedx/cdxgen": "11.11.0",
|
|
100
100
|
"@dotenvx/dotenvx": "1.49.0",
|
|
101
101
|
"@eslint/compat": "1.3.2",
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"@socketregistry/packageurl-js": "1.0.9",
|
|
124
124
|
"@socketsecurity/config": "3.0.1",
|
|
125
125
|
"@socketsecurity/registry": "1.1.17",
|
|
126
|
-
"@socketsecurity/sdk": "1.4.
|
|
126
|
+
"@socketsecurity/sdk": "1.4.96",
|
|
127
127
|
"@socketsecurity/socket-patch": "1.2.0",
|
|
128
128
|
"@types/blessed": "0.1.25",
|
|
129
129
|
"@types/cmd-shim": "5.0.2",
|
|
@@ -292,6 +292,6 @@
|
|
|
292
292
|
"strict": true
|
|
293
293
|
},
|
|
294
294
|
"dependencies": {
|
|
295
|
-
"@sentry/node": "10.
|
|
295
|
+
"@sentry/node": "10.40.0"
|
|
296
296
|
}
|
|
297
297
|
}
|