šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
DemoInstallSign in
Socket

@socketsecurity/sdk

Package Overview
Dependencies
Maintainers
2
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@socketsecurity/sdk - npm Package Compare versions

Comparing version

to
1.4.32

29

dist/index.js

@@ -81,3 +81,4 @@ import events from 'node:events';

];
const req = getHttpModule(baseUrl).request(`${baseUrl}${urlPath}`, {
const url = new URL(urlPath, baseUrl);
const req = getHttpModule(baseUrl).request(url, {
method: 'POST',

@@ -90,5 +91,15 @@ ...options,

});
let aborted = false;
req.on('error', _err => {
aborted = true;
});
req.on('close', () => {
aborted = true;
});
try {
// Send the request body (headers + files).
for (const part of requestBody) {
if (aborted) {
break;
}
if (typeof part === 'string') {

@@ -102,4 +113,6 @@ req.write(part);

await events.once(part, 'end');
// Ensure a new line after file content.
req.write('\r\n');
if (!aborted) {
// Ensure a new line after file content.
req.write('\r\n');
}
}

@@ -111,5 +124,11 @@ else {

}
catch (e) {
req.destroy(e);
throw e;
}
finally {
// Close request after writing all data.
req.end();
if (!aborted) {
// Close request after writing all data.
req.end();
}
}

@@ -116,0 +135,0 @@ return await getResponse(req);

8

package.json
{
"name": "@socketsecurity/sdk",
"version": "1.4.31",
"version": "1.4.32",
"license": "MIT",

@@ -92,3 +92,3 @@ "description": "SDK for the Socket API client",

"@eslint/js": "9.26.0",
"@types/node": "22.15.3",
"@types/node": "22.15.14",
"@typescript-eslint/parser": "8.32.0",

@@ -107,4 +107,4 @@ "@vitest/coverage-v8": "3.1.3",

"husky": "9.1.7",
"knip": "5.53.0",
"lint-staged": "15.5.1",
"knip": "5.54.1",
"lint-staged": "15.5.2",
"nock": "14.0.4",

@@ -111,0 +111,0 @@ "npm-run-all2": "8.0.1",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display