@socketsecurity/sdk 3.0.31 → 3.1.0
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 +7 -0
- package/dist/index.mjs +406 -366
- package/dist/testing.mjs +39 -3
- package/package.json +2 -1
package/dist/testing.mjs
CHANGED
|
@@ -1,6 +1,41 @@
|
|
|
1
|
-
/* Socket SDK
|
|
1
|
+
/* Socket SDK CJS - Built with esbuild */
|
|
2
|
+
"use strict";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
2
20
|
|
|
3
21
|
// src/testing.ts
|
|
22
|
+
var testing_exports = {};
|
|
23
|
+
__export(testing_exports, {
|
|
24
|
+
fixtures: () => fixtures,
|
|
25
|
+
isErrorResult: () => isErrorResult,
|
|
26
|
+
isSuccessResult: () => isSuccessResult,
|
|
27
|
+
issueFixtures: () => issueFixtures,
|
|
28
|
+
mockApiErrorBody: () => mockApiErrorBody,
|
|
29
|
+
mockErrorResponse: () => mockErrorResponse,
|
|
30
|
+
mockSdkError: () => mockSdkError,
|
|
31
|
+
mockSdkResult: () => mockSdkResult,
|
|
32
|
+
mockSuccessResponse: () => mockSuccessResponse,
|
|
33
|
+
organizationFixtures: () => organizationFixtures,
|
|
34
|
+
packageFixtures: () => packageFixtures,
|
|
35
|
+
repositoryFixtures: () => repositoryFixtures,
|
|
36
|
+
scanFixtures: () => scanFixtures
|
|
37
|
+
});
|
|
38
|
+
module.exports = __toCommonJS(testing_exports);
|
|
4
39
|
function mockSuccessResponse(data, status = 200) {
|
|
5
40
|
return {
|
|
6
41
|
cause: void 0,
|
|
@@ -234,7 +269,8 @@ function isSuccessResult(result) {
|
|
|
234
269
|
function isErrorResult(result) {
|
|
235
270
|
return result.success === false;
|
|
236
271
|
}
|
|
237
|
-
export
|
|
272
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
273
|
+
0 && (module.exports = {
|
|
238
274
|
fixtures,
|
|
239
275
|
isErrorResult,
|
|
240
276
|
isSuccessResult,
|
|
@@ -248,4 +284,4 @@ export {
|
|
|
248
284
|
packageFixtures,
|
|
249
285
|
repositoryFixtures,
|
|
250
286
|
scanFixtures
|
|
251
|
-
};
|
|
287
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@socketsecurity/sdk",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "SDK for the Socket API client",
|
|
6
6
|
"author": {
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"update": "node scripts/update.mjs"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
+
"@babel/generator": "7.28.5",
|
|
57
58
|
"@babel/parser": "7.26.3",
|
|
58
59
|
"@babel/traverse": "7.26.4",
|
|
59
60
|
"@babel/types": "7.26.3",
|