New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@stoplight/spectral

Package Overview
Dependencies
Maintainers
27
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stoplight/spectral - npm Package Compare versions

Comparing version 5.5.0-beta5 to 5.5.0-beta6

2

dist/consts.d.ts
export declare const NPM_PKG_ROOT = "https://unpkg.com/";
export declare const SPECTRAL_PKG_NAME = "@stoplight/spectral";
export declare const SPECTRAL_PKG_VERSION = "5.5.0-beta5";
export declare const SPECTRAL_PKG_VERSION = "5.5.0-beta6";

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

exports.SPECTRAL_PKG_NAME = '@stoplight/spectral';
exports.SPECTRAL_PKG_VERSION = '5.5.0-beta5';
exports.SPECTRAL_PKG_VERSION = '5.5.0-beta6';
//# sourceMappingURL=consts.js.map

@@ -1,1 +0,1 @@

"use strict";function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var n,t,a=e((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.oasOpParams=void 0,n.oasOpParams=(e,n,t,a)=>{const o=[],{original:r}=a;if(!r.paths)return[];for(const e in r.paths)if(r.paths[e])for(const n in r.paths[e]){if(!r.paths[e][n]||"parameters"===n)continue;const t=r.paths[e][n].parameters||[],a={},s={},i={};if(t.length>1){for(const e of t.keys())if(t[e]&&!t[e].$ref)for(const n of t.keys())e<=n||t[n].$ref||(t[e].in===t[n].in&&t[e].name===t[n].name&&(a[`${t[e].in}-${t[e].name}`]||(a[`${t[e].in}-${t[e].name}`]={}),a[`${t[e].in}-${t[e].name}`][e]=t[e],a[`${t[e].in}-${t[e].name}`][n]=t[n]),!s[e]&&("body"===t[e].in&&"formData"===t[n].in||"formData"===t[e].in&&"body"===t[n].in)&&(s[e]=t[e],s[n]=t[n]),i[e]||"body"!==t[e].in||"body"!==t[n].in||(i[e]=t[e],i[n]=t[n]));if(Object.keys(a).length>0)for(const t in a){if(!a[t])continue;const r=Object.keys(a[t])[0];let s=`Operations must have unique \`name\` + \`in\` parameters.\nRepeats of \`in:${a[t][r].in}\` + \`name:${a[t][r].name}\`\n\nParameters found at:\n`;for(const o in a[t])i[o]||(s+=`[ \`paths\`, \`${e}\`, \`${n}\`, \`${o}\` ]\n`);o.push({message:s,path:["paths",e,n]})}if(Object.keys(s).length>1){let t="Operation cannot have both `in:body` and `in:formData` parameters.\n\nParameters found at:\n";for(const a in s)i[a]||(t+=`[ \`paths\`, \`${e}\`, \`${n}\`, \`${a}\` ]\n`);o.push({message:t,path:["paths",e,n]})}if(Object.keys(i).length>1){let t="Operation has multiple instances of the `in:body` parameter.\n\nParameters found at:\n";for(const a in i)i[a]||(t+=`[ \`paths\`, \`${e}\`, \`${n}\`, \`${a}\` ]\n`);o.push({message:t,path:["paths",e,n]})}}}return o},n.default=n.oasOpParams}(t={path:n,exports:{},require:function(e,n){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==n&&t.path)}},t.exports),t.exports));exports.default=a;
"use strict";function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t,n,o=e((function(e,t){function n(e){return`${e.in}-${e.name}`}Object.defineProperty(t,"__esModule",{value:!0}),t.oasOpParams=void 0,t.oasOpParams=(e,t,{given:o})=>{if(!Array.isArray(e))return;if(e.length<2)return;const r=[],a={body:[],formData:[]},s=[],i=[];let u=-1;for(const t of e){if(u++,null===t||"object"!=typeof t)continue;if("$ref"in t)continue;const e=n(t);s.includes(e)?i.push(u):s.push(e),t.in in a&&a[t.in].push(u)}if(i.length>0)for(const e of i)r.push({message:"A parameter in this operation already exposes the same combination of `name` and `in` values.",path:[...o,e]});if(a.body.length>0&&a.formData.length>0&&r.push({message:"Operation cannot have both `in:body` and `in:formData` parameters."}),a.body.length>1)for(let e=1;e<a.body.length;e++)r.push({message:"Operation has already at least one instance of the `in:body` parameter.",path:[...o,a.body[e]]});return r},t.default=t.oasOpParams}(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports));exports.default=o;

@@ -48,5 +48,6 @@ {

"description": "Operation parameters are unique and non-repeating.",
"message": "{{error}}",
"recommended": true,
"type": "validation",
"given": "$",
"given": "$.paths.*[?( @property === 'get' || @property === 'put' || @property === 'post' || @property === 'delete' || @property === 'options' || @property === 'head' || @property === 'patch' || @property === 'trace' )].parameters",
"then": {

@@ -53,0 +54,0 @@ "function": "oasOpParams"

{
"name": "@stoplight/spectral",
"version": "5.5.0-beta5",
"version": "5.5.0-beta6",
"description": "A flexible object linter with out of the box support for OpenAPI v2 and v3.",

@@ -64,3 +64,3 @@ "keywords": [

"@stoplight/better-ajv-errors": "0.0.0",
"@stoplight/json": "3.6.0",
"@stoplight/json": "3.7.4",
"@stoplight/json-ref-readers": "1.1.1",

@@ -71,3 +71,3 @@ "@stoplight/json-ref-resolver": "3.0.9",

"@stoplight/types": "^11.6.0",
"@stoplight/yaml": "3.7.0",
"@stoplight/yaml": "4.1.0",
"abort-controller": "3.0.0",

@@ -93,11 +93,11 @@ "ajv": "6.12.2",

"@apidevtools/json-schema-ref-parser": "^9.0.1",
"@commitlint/config-conventional": "^8.3.4",
"@commitlint/config-conventional": "^9.0.1",
"@rollup/plugin-commonjs": "^13.0.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^8.0.1",
"@rollup/plugin-node-resolve": "^8.1.0",
"@types/chalk": "^2.2.0",
"@types/fetch-mock": "^7.3.1",
"@types/jest": "^25.2.3",
"@types/jest": "^26.0.0",
"@types/jest-when": "^2.7.1",
"@types/lodash": "^4.14.155",
"@types/lodash": "^4.14.156",
"@types/nanoid": "^2.1.0",

@@ -116,3 +116,3 @@ "@types/nock": "^11.1.0",

"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-prettier": "^3.1.4",
"fetch-mock": "^7.7.3",

@@ -129,3 +129,3 @@ "glob-fs": "^0.1.7",

"karma-typescript": "^5.0.3",
"lint-staged": "^10.2.9",
"lint-staged": "^10.2.11",
"nock": "~12.0.2",

@@ -132,0 +132,0 @@ "node-html-parser": "^1.2.7",

@@ -1,1 +0,1 @@

"use strict";function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var n,t,a=e((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.oasOpParams=void 0,n.oasOpParams=(e,n,t,a)=>{const o=[],{original:r}=a;if(!r.paths)return[];for(const e in r.paths)if(r.paths[e])for(const n in r.paths[e]){if(!r.paths[e][n]||"parameters"===n)continue;const t=r.paths[e][n].parameters||[],a={},s={},i={};if(t.length>1){for(const e of t.keys())if(t[e]&&!t[e].$ref)for(const n of t.keys())e<=n||t[n].$ref||(t[e].in===t[n].in&&t[e].name===t[n].name&&(a[`${t[e].in}-${t[e].name}`]||(a[`${t[e].in}-${t[e].name}`]={}),a[`${t[e].in}-${t[e].name}`][e]=t[e],a[`${t[e].in}-${t[e].name}`][n]=t[n]),!s[e]&&("body"===t[e].in&&"formData"===t[n].in||"formData"===t[e].in&&"body"===t[n].in)&&(s[e]=t[e],s[n]=t[n]),i[e]||"body"!==t[e].in||"body"!==t[n].in||(i[e]=t[e],i[n]=t[n]));if(Object.keys(a).length>0)for(const t in a){if(!a[t])continue;const r=Object.keys(a[t])[0];let s=`Operations must have unique \`name\` + \`in\` parameters.\nRepeats of \`in:${a[t][r].in}\` + \`name:${a[t][r].name}\`\n\nParameters found at:\n`;for(const o in a[t])i[o]||(s+=`[ \`paths\`, \`${e}\`, \`${n}\`, \`${o}\` ]\n`);o.push({message:s,path:["paths",e,n]})}if(Object.keys(s).length>1){let t="Operation cannot have both `in:body` and `in:formData` parameters.\n\nParameters found at:\n";for(const a in s)i[a]||(t+=`[ \`paths\`, \`${e}\`, \`${n}\`, \`${a}\` ]\n`);o.push({message:t,path:["paths",e,n]})}if(Object.keys(i).length>1){let t="Operation has multiple instances of the `in:body` parameter.\n\nParameters found at:\n";for(const a in i)i[a]||(t+=`[ \`paths\`, \`${e}\`, \`${n}\`, \`${a}\` ]\n`);o.push({message:t,path:["paths",e,n]})}}}return o},n.default=n.oasOpParams}(t={path:n,exports:{},require:function(e,n){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==n&&t.path)}},t.exports),t.exports));exports.default=a;
"use strict";function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t,n,o=e((function(e,t){function n(e){return`${e.in}-${e.name}`}Object.defineProperty(t,"__esModule",{value:!0}),t.oasOpParams=void 0,t.oasOpParams=(e,t,{given:o})=>{if(!Array.isArray(e))return;if(e.length<2)return;const r=[],a={body:[],formData:[]},s=[],i=[];let u=-1;for(const t of e){if(u++,null===t||"object"!=typeof t)continue;if("$ref"in t)continue;const e=n(t);s.includes(e)?i.push(u):s.push(e),t.in in a&&a[t.in].push(u)}if(i.length>0)for(const e of i)r.push({message:"A parameter in this operation already exposes the same combination of `name` and `in` values.",path:[...o,e]});if(a.body.length>0&&a.formData.length>0&&r.push({message:"Operation cannot have both `in:body` and `in:formData` parameters."}),a.body.length>1)for(let e=1;e<a.body.length;e++)r.push({message:"Operation has already at least one instance of the `in:body` parameter.",path:[...o,a.body[e]]});return r},t.default=t.oasOpParams}(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports));exports.default=o;

@@ -48,5 +48,6 @@ {

"description": "Operation parameters are unique and non-repeating.",
"message": "{{error}}",
"recommended": true,
"type": "validation",
"given": "$",
"given": "$.paths.*[?( @property === 'get' || @property === 'put' || @property === 'post' || @property === 'delete' || @property === 'options' || @property === 'head' || @property === 'patch' || @property === 'trace' )].parameters",
"then": {

@@ -53,0 +54,0 @@ "function": "oasOpParams"

Sorry, the diff of this file is not supported yet

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

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

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