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

@asyncapi/parser

Package Overview
Dependencies
Maintainers
3
Versions
170
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@asyncapi/parser - npm Package Compare versions

Comparing version 1.15.0-2022-04-release.2 to 1.15.0-2022-04-release.3

26

lib/models/components.js

@@ -13,2 +13,3 @@ const { createMapOfType, getMapValueOfType, mix } = require('./utils');

const MessageTrait = require('./message-trait');
const ServerVariable = require('./server-variable');

@@ -223,4 +224,29 @@ const MixinSpecificationExtensions = require('../mixins/specification-extensions');

}
/**
*
* @returns {Object<string, ServerVariable>}
*/
serverVariables() {
return createMapOfType(this._json.serverVariables, ServerVariable);
}
/**
*
* @returns {boolean}
*/
hasServerVariables() {
return !!this._json.serverVariables;
}
/**
*
* @param {string} name - Name of the server variable.
* @returns {ServerVariable}
*/
serverVariable(name) {
return getMapValueOfType(this._json.serverVariables, name, ServerVariable);
}
}
module.exports = mix(Components, MixinSpecificationExtensions);

8

package.json
{
"name": "@asyncapi/parser",
"version": "1.15.0-2022-04-release.2",
"version": "1.15.0-2022-04-release.3",
"description": "JavaScript AsyncAPI parser.",

@@ -70,3 +70,3 @@ "main": "lib/index.js",

"@apidevtools/json-schema-ref-parser": "^9.0.6",
"@asyncapi/specs": "v2.14.0-2022-04-release.1",
"@asyncapi/specs": "^v2.14.0-2022-04-release.2",
"@fmvilas/pseudo-yaml-ast": "^0.3.1",

@@ -98,2 +98,6 @@ "ajv": "^6.10.1",

"prerelease": true
},
{
"name": "next-major-spec",
"prerelease": true
}

@@ -100,0 +104,0 @@ ],

@@ -467,2 +467,10 @@ /**

messageTrait(name: string): MessageTrait;
serverVariables(): {
[key: string]: ServerVariable;
};
hasServerVariables(): boolean;
/**
* @param name - Name of the server variable.
*/
serverVariable(name: string): ServerVariable;
hasExtensions(): boolean;

@@ -469,0 +477,0 @@ extensions(): {

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