@socketsecurity/sdk 3.0.31 → 3.1.1
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 +14 -0
- package/dist/{index.mjs → index.js} +428 -390
- package/dist/{testing.mjs → testing.js} +39 -3
- package/package.json +5 -6
|
@@ -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.
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "SDK for the Socket API client",
|
|
6
6
|
"author": {
|
|
@@ -13,18 +13,17 @@
|
|
|
13
13
|
"type": "git",
|
|
14
14
|
"url": "git://github.com/SocketDev/socket-sdk-js.git"
|
|
15
15
|
},
|
|
16
|
-
"
|
|
17
|
-
"main": "./dist/index.mjs",
|
|
16
|
+
"main": "./dist/index.js",
|
|
18
17
|
"types": "./dist/index.d.ts",
|
|
19
18
|
"exports": {
|
|
20
19
|
".": {
|
|
21
20
|
"types": "./dist/index.d.ts",
|
|
22
|
-
"default": "./dist/index.
|
|
21
|
+
"default": "./dist/index.js"
|
|
23
22
|
},
|
|
24
23
|
"./package.json": "./package.json",
|
|
25
24
|
"./testing": {
|
|
26
25
|
"types": "./dist/testing.d.ts",
|
|
27
|
-
"default": "./dist/testing.
|
|
26
|
+
"default": "./dist/testing.js"
|
|
28
27
|
},
|
|
29
28
|
"./types/api": {
|
|
30
29
|
"types": "./types/api.d.ts",
|
|
@@ -54,6 +53,7 @@
|
|
|
54
53
|
"update": "node scripts/update.mjs"
|
|
55
54
|
},
|
|
56
55
|
"devDependencies": {
|
|
56
|
+
"@babel/generator": "7.28.5",
|
|
57
57
|
"@babel/parser": "7.26.3",
|
|
58
58
|
"@babel/traverse": "7.26.4",
|
|
59
59
|
"@babel/types": "7.26.3",
|
|
@@ -110,7 +110,6 @@
|
|
|
110
110
|
"data/*.json",
|
|
111
111
|
"dist/*.d.ts",
|
|
112
112
|
"dist/*.js",
|
|
113
|
-
"dist/*.mjs",
|
|
114
113
|
"types/*.d.ts"
|
|
115
114
|
],
|
|
116
115
|
"typeCoverage": {
|