@socketsecurity/sdk
Advanced tools
+1
-1
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"oFAUa,OAAO,qBAAqB,EAAE,YAAY,CAAC,OAAO,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;mFAK/E,OAAO,qBAAqB,EAAE,WAAW,CAAC,OAAO,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;oFAK9E,oBAAoB,CAAC,CAAC,GAAG,mBAAmB,CAAC,CAAC;;;;;;AA4O3D,oDAHW;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAClD,MAAM,CAIlB;AApOD;IAeE,oBAJW,MAAM,YACN,gBAAgB,EAmB1B;IAyBA,qCALU,MAAM,EAAE,oBACR,MAAM;;oBAEJ,QAAQ,oBAAoB,cAAc,CAAC,CAAC,CAwCxD;IAOD,8BAJW,MAAM,WACN,MAAM,GACJ,QAAQ,oBAAoB,sBAAsB,CAAC,CAAC,CAahE;IAOD,+BAJW,MAAM,WACN,MAAM,GACJ,QAAQ,oBAAoB,uBAAuB,CAAC,CAAC,CAajE;IAGD,iBADc,QAAQ,oBAAoB,eAAe,CAAC,CAAC,CAS1D;IAMD,cAHW,MAAM,GACJ,QAAQ,oBAAoB,WAAW,CAAC,CAAC,CAYrD;IAGD,YADc,QAAQ,oBAAoB,UAAU,CAAC,CAAC,CASrD;;CA4CF"} | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"oFAUa,OAAO,qBAAqB,EAAE,YAAY,CAAC,OAAO,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;mFAK/E,OAAO,qBAAqB,EAAE,WAAW,CAAC,OAAO,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;oFAK9E,oBAAoB,CAAC,CAAC,GAAG,mBAAmB,CAAC,CAAC;;;;;;AA6O3D,oDAHW;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAClD,MAAM,CAIlB;AArOD;IAeE,oBAJW,MAAM,YACN,gBAAgB,EAoB1B;IAyBA,qCALU,MAAM,EAAE,oBACR,MAAM;;oBAEJ,QAAQ,oBAAoB,cAAc,CAAC,CAAC,CAwCxD;IAOD,8BAJW,MAAM,WACN,MAAM,GACJ,QAAQ,oBAAoB,sBAAsB,CAAC,CAAC,CAahE;IAOD,+BAJW,MAAM,WACN,MAAM,GACJ,QAAQ,oBAAoB,uBAAuB,CAAC,CAAC,CAajE;IAGD,iBADc,QAAQ,oBAAoB,eAAe,CAAC,CAAC,CAS1D;IAMD,cAHW,MAAM,GACJ,QAAQ,oBAAoB,WAAW,CAAC,CAAC,CAYrD;IAGD,YADc,QAAQ,oBAAoB,UAAU,CAAC,CAAC,CASrD;;CA4CF"} |
+1
-0
@@ -57,2 +57,3 @@ 'use strict' | ||
| username: apiKey, | ||
| enableUnixSockets: false, // See https://github.com/sindresorhus/got/blob/main/documentation/2-options.md#enableunixsockets | ||
| headers: { | ||
@@ -59,0 +60,0 @@ 'user-agent': (userAgent ? userAgent + ' ' : '') + createUserAgentFromPkgJson(pkg), |
+13
-11
| { | ||
| "name": "@socketsecurity/sdk", | ||
| "version": "0.5.2", | ||
| "version": "0.5.3", | ||
| "license": "MIT", | ||
@@ -33,3 +33,3 @@ "description": "SDK for the Socket API client", | ||
| "devDependencies": { | ||
| "@socketsecurity/eslint-config": "^1.0.0", | ||
| "@socketsecurity/eslint-config": "^2.0.0", | ||
| "@tsconfig/node14": "^1.0.3", | ||
@@ -41,16 +41,18 @@ "@types/chai": "^4.3.4", | ||
| "@types/tap": "^15.0.7", | ||
| "@typescript-eslint/eslint-plugin": "^5.48.1", | ||
| "@typescript-eslint/parser": "^5.48.1", | ||
| "@typescript-eslint/eslint-plugin": "^5.51.0", | ||
| "@typescript-eslint/parser": "^5.51.0", | ||
| "c8": "^7.12.0", | ||
| "chai": "^4.3.7", | ||
| "chai-as-promised": "^7.1.1", | ||
| "eslint": "^8.29.0", | ||
| "eslint": "^8.34.0", | ||
| "eslint-config-standard": "^17.0.0", | ||
| "eslint-config-standard-jsx": "^11.0.0", | ||
| "eslint-import-resolver-typescript": "^3.5.1", | ||
| "eslint-plugin-import": "^2.26.0", | ||
| "eslint-plugin-n": "^15.6.0", | ||
| "eslint-plugin-promise": "^6.0.1", | ||
| "eslint-plugin-react": "^7.31.11", | ||
| "eslint-import-resolver-typescript": "^3.5.3", | ||
| "eslint-plugin-import": "^2.27.5", | ||
| "eslint-plugin-jsdoc": "^40.0.0", | ||
| "eslint-plugin-n": "^15.6.1", | ||
| "eslint-plugin-promise": "^6.1.1", | ||
| "eslint-plugin-react": "^7.32.2", | ||
| "eslint-plugin-react-hooks": "^4.6.0", | ||
| "eslint-plugin-unicorn": "^45.0.2", | ||
| "husky": "^8.0.3", | ||
@@ -63,3 +65,3 @@ "installed-check": "^6.0.5", | ||
| "type-coverage": "^2.24.1", | ||
| "typescript": "~4.9.3" | ||
| "typescript": "~4.9.5" | ||
| }, | ||
@@ -66,0 +68,0 @@ "scripts": { |
+1
-1
| # @socketsecurity/sdk | ||
| [](https://socket.dev/npm/package/@socketsecurity/sdk) | ||
| [](https://socket.dev/npm/package/@socketsecurity/sdk) | ||
| [](https://www.npmjs.com/package/@socketsecurity/sdk) | ||
@@ -5,0 +5,0 @@ [](https://www.npmjs.com/package/@socketsecurity/sdk) |
+115
-69
@@ -13,2 +13,4 @@ /** | ||
| * You can [see here](https://socket.dev/npm/issue) the full list of issues. | ||
| * | ||
| * This endpoint consumes 1 unit of your quota. | ||
| */ | ||
@@ -18,11 +20,23 @@ get: operations["getIssuesByNPMPackage"]; | ||
| "/npm/{package}/{version}/score": { | ||
| /** Get all the scores and metrics by category that are used to evaluate the package version. */ | ||
| /** | ||
| * Get all the scores and metrics by category that are used to evaluate the package version. | ||
| * | ||
| * This endpoint consumes 1 unit of your quota. | ||
| */ | ||
| get: operations["getScoreByNPMPackage"]; | ||
| }; | ||
| "/report/delete/{id}": { | ||
| /** Delete a specific project report. */ | ||
| /** | ||
| * Delete a specific project report. | ||
| * | ||
| * This endpoint consumes 10 units of your quota. | ||
| */ | ||
| delete: operations["deleteReport"]; | ||
| }; | ||
| "/report/list": { | ||
| /** Get all your project reports. */ | ||
| /** | ||
| * Get all your project reports. | ||
| * | ||
| * This endpoint consumes 10 units of your quota. | ||
| */ | ||
| get: operations["getReportList"]; | ||
@@ -40,2 +54,4 @@ }; | ||
| * For example, these are valid filenames: `package.json`, `folder/package.json` and `deep/nested/folder/package.json`. | ||
| * | ||
| * This endpoint consumes 100 units of your quota. | ||
| */ | ||
@@ -45,11 +61,23 @@ put: operations["createReport"]; | ||
| "/report/view/{id}": { | ||
| /** Get all the issues, packages, and scores related to an specific project report. */ | ||
| /** | ||
| * Get all the issues, packages, and scores related to an specific project report. | ||
| * | ||
| * This endpoint consumes 10 units of your quota. | ||
| */ | ||
| get: operations["getReport"]; | ||
| }; | ||
| "/openapi": { | ||
| /** Retrieve the API specification in an Openapi JSON format. */ | ||
| /** | ||
| * Retrieve the API specification in an Openapi JSON format. | ||
| * | ||
| * This endpoint consumes 0 units of your quota. | ||
| */ | ||
| get: operations["getOpenAPI"]; | ||
| }; | ||
| "/quota": { | ||
| /** Get your current API quota. You can use this endpoint to prevent doing requests that might spend all your quota. */ | ||
| /** | ||
| * Get your current API quota. You can use this endpoint to prevent doing requests that might spend all your quota. | ||
| * | ||
| * This endpoint consumes 0 units of your quota. | ||
| */ | ||
| get: operations["getQuota"]; | ||
@@ -832,2 +860,12 @@ }; | ||
| /** @enum {string} */ | ||
| type?: "missingTarball"; | ||
| value?: components["schemas"]["SocketIssueBasics"] & { | ||
| /** @default */ | ||
| description: string; | ||
| props: { [key: string]: unknown }; | ||
| usage?: components["schemas"]["SocketUsageRef"]; | ||
| }; | ||
| }> & | ||
| Partial<{ | ||
| /** @enum {string} */ | ||
| type?: "unsafeCopyright"; | ||
@@ -1081,3 +1119,3 @@ value?: components["schemas"]["SocketIssueBasics"] & { | ||
| components: { | ||
| supplyChainRiskIssueLow: { | ||
| dependencyCount: { | ||
| /** @default 0 */ | ||
@@ -1092,3 +1130,3 @@ score: number; | ||
| }; | ||
| supplyChainRiskIssueMid: { | ||
| devDependencyCount: { | ||
| /** @default 0 */ | ||
@@ -1103,3 +1141,3 @@ score: number; | ||
| }; | ||
| supplyChainRiskIssueHigh: { | ||
| downloadCount: { | ||
| /** @default 0 */ | ||
@@ -1124,3 +1162,3 @@ score: number; | ||
| }; | ||
| dependencyCount: { | ||
| supplyChainRiskIssueHigh: { | ||
| /** @default 0 */ | ||
@@ -1135,3 +1173,3 @@ score: number; | ||
| }; | ||
| devDependencyCount: { | ||
| supplyChainRiskIssueLow: { | ||
| /** @default 0 */ | ||
@@ -1146,3 +1184,3 @@ score: number; | ||
| }; | ||
| unusedDependencyCount: { | ||
| supplyChainRiskIssueMid: { | ||
| /** @default 0 */ | ||
@@ -1157,12 +1195,2 @@ score: number; | ||
| }; | ||
| transitiveDependencyCount: { | ||
| /** @default 0 */ | ||
| score: number; | ||
| /** @default 0 */ | ||
| maxScore: number; | ||
| /** @default 0 */ | ||
| limit: number; | ||
| /** @default 0 */ | ||
| value: number; | ||
| }; | ||
| totalDependencyCount: { | ||
@@ -1178,3 +1206,3 @@ /** @default 0 */ | ||
| }; | ||
| downloadCount: { | ||
| transitiveDependencyCount: { | ||
| /** @default 0 */ | ||
@@ -1196,13 +1224,3 @@ score: number; | ||
| */ | ||
| limitingMetric?: | ||
| | "0" | ||
| | "1" | ||
| | "2" | ||
| | "3" | ||
| | "4" | ||
| | "5" | ||
| | "6" | ||
| | "7" | ||
| | "8" | ||
| | "9"; | ||
| limitingMetric?: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8"; | ||
| }; | ||
@@ -1213,3 +1231,3 @@ SocketQualityScore: { | ||
| components: { | ||
| qualityIssueLow: { | ||
| linesOfCode: { | ||
| /** @default 0 */ | ||
@@ -1224,3 +1242,3 @@ score: number; | ||
| }; | ||
| qualityIssueMid: { | ||
| qualityIssueCritical: { | ||
| /** @default 0 */ | ||
@@ -1245,3 +1263,3 @@ score: number; | ||
| }; | ||
| qualityIssueCritical: { | ||
| qualityIssueLow: { | ||
| /** @default 0 */ | ||
@@ -1256,3 +1274,3 @@ score: number; | ||
| }; | ||
| linesOfCode: { | ||
| qualityIssueMid: { | ||
| /** @default 0 */ | ||
@@ -1287,3 +1305,3 @@ score: number; | ||
| }; | ||
| stargazers?: { | ||
| forks?: { | ||
| /** @default 0 */ | ||
@@ -1298,3 +1316,3 @@ score: number; | ||
| }; | ||
| forks?: { | ||
| stargazers?: { | ||
| /** @default 0 */ | ||
@@ -1342,3 +1360,3 @@ score: number; | ||
| components: { | ||
| maintenanceIssueLow: { | ||
| maintainerCount: { | ||
| /** @default 0 */ | ||
@@ -1353,3 +1371,3 @@ score: number; | ||
| }; | ||
| maintenanceIssueMid: { | ||
| maintenanceIssueCritical: { | ||
| /** @default 0 */ | ||
@@ -1374,3 +1392,3 @@ score: number; | ||
| }; | ||
| maintenanceIssueCritical: { | ||
| maintenanceIssueLow: { | ||
| /** @default 0 */ | ||
@@ -1385,3 +1403,3 @@ score: number; | ||
| }; | ||
| maintainerCount: { | ||
| maintenanceIssueMid: { | ||
| /** @default 0 */ | ||
@@ -1396,3 +1414,3 @@ score: number; | ||
| }; | ||
| versionsLastWeek: { | ||
| versionCount: { | ||
| /** @default 0 */ | ||
@@ -1427,3 +1445,3 @@ score: number; | ||
| }; | ||
| versionsLastYear: { | ||
| versionsLastWeek: { | ||
| /** @default 0 */ | ||
@@ -1438,3 +1456,3 @@ score: number; | ||
| }; | ||
| versionCount: { | ||
| versionsLastYear: { | ||
| /** @default 0 */ | ||
@@ -1449,3 +1467,3 @@ score: number; | ||
| }; | ||
| openIssues?: { | ||
| closedIssues?: { | ||
| /** @default 0 */ | ||
@@ -1460,3 +1478,3 @@ score: number; | ||
| }; | ||
| closedIssues?: { | ||
| commits?: { | ||
| /** @default 0 */ | ||
@@ -1471,3 +1489,3 @@ score: number; | ||
| }; | ||
| commitsLastWeek?: { | ||
| commitsLastMonth?: { | ||
| /** @default 0 */ | ||
@@ -1482,3 +1500,3 @@ score: number; | ||
| }; | ||
| commitsLastMonth?: { | ||
| commitsLastTwoMonths?: { | ||
| /** @default 0 */ | ||
@@ -1493,3 +1511,3 @@ score: number; | ||
| }; | ||
| commitsLastTwoMonths?: { | ||
| commitsLastWeek?: { | ||
| /** @default 0 */ | ||
@@ -1514,3 +1532,3 @@ score: number; | ||
| }; | ||
| commits?: { | ||
| openIssues?: { | ||
| /** @default 0 */ | ||
@@ -1555,3 +1573,3 @@ score: number; | ||
| components: { | ||
| vulnerabilityIssueLow: { | ||
| dependencyVulnerabilityCount: { | ||
| /** @default 0 */ | ||
@@ -1566,3 +1584,3 @@ score: number; | ||
| }; | ||
| vulnerabilityIssueMid: { | ||
| vulnerabilityCount: { | ||
| /** @default 0 */ | ||
@@ -1577,3 +1595,3 @@ score: number; | ||
| }; | ||
| vulnerabilityIssueHigh: { | ||
| vulnerabilityIssueCritical: { | ||
| /** @default 0 */ | ||
@@ -1588,3 +1606,3 @@ score: number; | ||
| }; | ||
| vulnerabilityIssueCritical: { | ||
| vulnerabilityIssueHigh: { | ||
| /** @default 0 */ | ||
@@ -1599,3 +1617,3 @@ score: number; | ||
| }; | ||
| dependencyVulnerabilityCount: { | ||
| vulnerabilityIssueLow: { | ||
| /** @default 0 */ | ||
@@ -1610,3 +1628,3 @@ score: number; | ||
| }; | ||
| vulnerabilityCount: { | ||
| vulnerabilityIssueMid: { | ||
| /** @default 0 */ | ||
@@ -1634,3 +1652,3 @@ score: number; | ||
| components: { | ||
| licenseIssueLow: { | ||
| licenseIssueCritical: { | ||
| /** @default 0 */ | ||
@@ -1645,3 +1663,3 @@ score: number; | ||
| }; | ||
| licenseIssueMid: { | ||
| licenseIssueHigh: { | ||
| /** @default 0 */ | ||
@@ -1656,3 +1674,3 @@ score: number; | ||
| }; | ||
| licenseIssueHigh: { | ||
| licenseIssueLow: { | ||
| /** @default 0 */ | ||
@@ -1667,3 +1685,3 @@ score: number; | ||
| }; | ||
| licenseIssueCritical: { | ||
| licenseIssueMid: { | ||
| /** @default 0 */ | ||
@@ -1915,2 +1933,4 @@ score: number; | ||
| * You can [see here](https://socket.dev/npm/issue) the full list of issues. | ||
| * | ||
| * This endpoint consumes 1 unit of your quota. | ||
| */ | ||
@@ -1938,3 +1958,7 @@ getIssuesByNPMPackage: { | ||
| }; | ||
| /** Get all the scores and metrics by category that are used to evaluate the package version. */ | ||
| /** | ||
| * Get all the scores and metrics by category that are used to evaluate the package version. | ||
| * | ||
| * This endpoint consumes 1 unit of your quota. | ||
| */ | ||
| getScoreByNPMPackage: { | ||
@@ -1961,3 +1985,7 @@ parameters: { | ||
| }; | ||
| /** Delete a specific project report. */ | ||
| /** | ||
| * Delete a specific project report. | ||
| * | ||
| * This endpoint consumes 10 units of your quota. | ||
| */ | ||
| deleteReport: { | ||
@@ -1986,3 +2014,7 @@ parameters: { | ||
| }; | ||
| /** Get all your project reports. */ | ||
| /** | ||
| * Get all your project reports. | ||
| * | ||
| * This endpoint consumes 10 units of your quota. | ||
| */ | ||
| getReportList: { | ||
@@ -2017,2 +2049,4 @@ responses: { | ||
| * For example, these are valid filenames: `package.json`, `folder/package.json` and `deep/nested/folder/package.json`. | ||
| * | ||
| * This endpoint consumes 100 units of your quota. | ||
| */ | ||
@@ -2045,3 +2079,7 @@ createReport: { | ||
| }; | ||
| /** Get all the issues, packages, and scores related to an specific project report. */ | ||
| /** | ||
| * Get all the issues, packages, and scores related to an specific project report. | ||
| * | ||
| * This endpoint consumes 10 units of your quota. | ||
| */ | ||
| getReport: { | ||
@@ -2067,3 +2105,7 @@ parameters: { | ||
| }; | ||
| /** Retrieve the API specification in an Openapi JSON format. */ | ||
| /** | ||
| * Retrieve the API specification in an Openapi JSON format. | ||
| * | ||
| * This endpoint consumes 0 units of your quota. | ||
| */ | ||
| getOpenAPI: { | ||
@@ -2080,3 +2122,7 @@ responses: { | ||
| }; | ||
| /** Get your current API quota. You can use this endpoint to prevent doing requests that might spend all your quota. */ | ||
| /** | ||
| * Get your current API quota. You can use this endpoint to prevent doing requests that might spend all your quota. | ||
| * | ||
| * This endpoint consumes 0 units of your quota. | ||
| */ | ||
| getQuota: { | ||
@@ -2083,0 +2129,0 @@ responses: { |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
76727
1.65%2361
2.03%31
6.9%