Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@xliic/cicd-core-node

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xliic/cicd-core-node - npm Package Compare versions

Comparing version 2.6.1 to 2.6.2

11

lib/api.js

@@ -25,6 +25,6 @@ "use strict";

function handleHttpError(err, options) {
var _a, _b, _c, _d, _e, _f;
var _a, _b, _c, _d, _e, _f, _g, _h;
if (err instanceof got_1.HTTPError &&
((_a = err === null || err === void 0 ? void 0 : err.response) === null || _a === void 0 ? void 0 : _a.statusCode) === 409 &&
((_c = (_b = err === null || err === void 0 ? void 0 : err.response) === null || _b === void 0 ? void 0 : _b.body) === null || _c === void 0 ? void 0 : _c.error) === "limit reached") {
((_c = (_b = err === null || err === void 0 ? void 0 : err.response) === null || _b === void 0 ? void 0 : _b.body) === null || _c === void 0 ? void 0 : _c.message) === "limit reached") {
return {

@@ -37,8 +37,9 @@ statusCode: err.response.statusCode,

else if (err instanceof got_1.HTTPError &&
((_d = err === null || err === void 0 ? void 0 : err.response) === null || _d === void 0 ? void 0 : _d.statusCode) === 403 &&
((_f = (_e = err === null || err === void 0 ? void 0 : err.response) === null || _e === void 0 ? void 0 : _e.body) === null || _f === void 0 ? void 0 : _f.error) === "invalid authorization") {
((_d = err === null || err === void 0 ? void 0 : err.response) === null || _d === void 0 ? void 0 : _d.statusCode) === 404 &&
((_f = (_e = err === null || err === void 0 ? void 0 : err.response) === null || _e === void 0 ? void 0 : _e.body) === null || _f === void 0 ? void 0 : _f.message) === "no result" &&
((_h = (_g = err === null || err === void 0 ? void 0 : err.response) === null || _g === void 0 ? void 0 : _g.body) === null || _h === void 0 ? void 0 : _h.code) === 5) {
return {
statusCode: err.response.statusCode,
error: err.response.body,
description: `Forbidden to access, check that ID of your mapped API is correct.`,
description: `API does not exist, check that ID of your mapped API is correct.`,
};

@@ -45,0 +46,0 @@ }

@@ -30,3 +30,2 @@ "use strict";

failureConditions: readFailureConditions(minScore, undefined),
extensions: readExtensions(undefined),
};

@@ -39,3 +38,2 @@ }

failureConditions: readFailureConditions(minScore, audit.fail_on),
extensions: readExtensions(audit.extensions),
};

@@ -80,7 +78,2 @@ }

}
function readExtensions(extensions) {
return {
skipIssues: (extensions === null || extensions === void 0 ? void 0 : extensions.skip_issues) ? extensions.skip_issues : [],
};
}
function readBranchConfig(branchName, config, configFilePath, logger) {

@@ -87,0 +80,0 @@ var _a;

@@ -16,3 +16,2 @@ "use strict";

const audit_1 = require("./audit");
const extensions_1 = require("./extensions");
const parse_1 = require("./parse");

@@ -143,3 +142,2 @@ const util_1 = require("./util");

}
extensions_1.injectExtensions(parsed, options.config);
const apiData = Buffer.from(JSON.stringify(parsed), "utf8");

@@ -156,3 +154,2 @@ return util_1.withMapping(yield api_1.updateApi(apiId, apiData, options), mapping);

}
extensions_1.injectExtensions(parsed, options.config);
const name = util_1.makeName(((_a = parsed === null || parsed === void 0 ? void 0 : parsed.info) === null || _a === void 0 ? void 0 : _a.title) || "No title");

@@ -159,0 +156,0 @@ const apiData = Buffer.from(JSON.stringify(parsed), "utf8");

@@ -15,3 +15,2 @@ "use strict";

const audit_1 = require("./audit");
const extensions_1 = require("./extensions");
const parse_1 = require("./parse");

@@ -35,3 +34,2 @@ const util_1 = require("./util");

}
extensions_1.injectExtensions(parsed, options.config);
const apiData = Buffer.from(JSON.stringify(parsed), "utf8");

@@ -38,0 +36,0 @@ result[filename] = util_1.withMapping(yield api_1.updateApi(apiId, apiData, options), mapping);

@@ -26,3 +26,2 @@ {

"fail_on": { "$ref": "#/definitions/failureConditions" },
"extensions": { "$ref": "#/definitions/extensions" },
"mapping": { "$ref": "#/definitions/mapping" },

@@ -128,17 +127,4 @@ "discovery": {

"additionalProperties": false
},
"extensions": {
"type": "object",
"properties": {
"skip_issues": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
}
}

@@ -68,12 +68,5 @@ export interface ApiStatus {

failureConditions: FailureConditions;
extensions: {
skipIssues: string[];
};
}
export interface YamlExtensions {
skip_issues?: string[];
}
export interface YamlBranchConfig {
fail_on?: YamlFailureConditions;
extensions?: YamlExtensions;
mapping?: Mapping;

@@ -86,5 +79,2 @@ discovery?: YamlDiscovery | boolean;

}
export interface YamlExtensions {
skip_issues?: string[];
}
export interface YamlFailureConditions {

@@ -91,0 +81,0 @@ invalid_contract?: boolean;

{
"name": "@xliic/cicd-core-node",
"version": "2.6.1",
"version": "2.6.2",
"description": "Performs API contract security audit to get a detailed analysis of the possible vulnerabilities and other issues in the API contract.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc