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.4.1 to 1.4.2

24

lib/iterators.js
/**
* @readonly
* @enum {SchemaIteratorCallbackType}
*/
/**
* The different kind of stages when crawling a schema.

@@ -8,7 +13,2 @@ *

*/
/**
* @readonly
* @enum {SchemaIteratorCallbackType}
*/
const SchemaIteratorCallbackType = Object.freeze({

@@ -20,2 +20,8 @@ NEW_SCHEMA: 'NEW_SCHEMA',

/**
*
* @readonly
* @enum {SchemaTypesToIterate}
*/
/**
* The different types of schemas you can iterate

@@ -34,8 +40,2 @@ *

*/
/**
*
* @readonly
* @enum {SchemaTypesToIterate}
*/
const SchemaTypesToIterate = Object.freeze({

@@ -237,2 +237,2 @@ parameters: 'parameters',

recursiveSchemaArray
};
};

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

const Components = require('./components');
const MixinExternalDocs = require('../mixins/external-docs');

@@ -211,8 +210,7 @@ const MixinTags = require('../mixins/tags');

* Callback used when crawling a schema.
* @callback TraverseSchemas
* @param {Schema} schema which is being crawled
* @callback module:@asyncapi/parser.TraverseSchemas
* @param {Schema} schema which is being crawled
* @param {String} propName if the schema is from a property get the name of such
* @param {SchemaIteratorCallbackType} callbackType is the schema a new one or is the crawler finishing one.
* @returns {boolean} should the crawler continue crawling the schema?
*
*/

@@ -223,4 +221,3 @@

* By default all schemas are iterated
*
* @param {TraverseSchemas} callback
* @param {TraverseSchemas} callback
* @param {SchemaTypesToIterate[]} schemaTypesToIterate

@@ -227,0 +224,0 @@ */

{
"name": "@asyncapi/parser",
"version": "1.4.1",
"version": "1.4.2",
"description": "JavaScript AsyncAPI parser.",

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

@@ -12,12 +12,2 @@ /**

/**
* The different kind of stages when crawling a schema.
* @property NEW_SCHEMA - The crawler just started crawling a schema.
* @property END_SCHEMA - The crawler just finished crawling a schema.
*/
declare type SchemaIteratorCallbackType = {
NEW_SCHEMA: string;
END_SCHEMA: string;
};
/**
* The different types of schemas you can iterate

@@ -46,28 +36,4 @@ * @property parameters - Crawl all schemas in parameters

/**
* The different types of schemas you can iterate
* @property parameters - Crawl all schemas in parameters
* @property payloads - Crawl all schemas in payloads
* @property headers - Crawl all schemas in headers
* @property components - Crawl all schemas in components
* @property objects - Crawl all schemas of type object
* @property arrays - Crawl all schemas of type array
* @property oneOfs - Crawl all schemas in oneOf's
* @property allOfs - Crawl all schemas in allOf's
* @property anyOfs - Crawl all schemas in anyOf's
*/
declare type SchemaTypesToIterate = {
parameters: string;
payloads: string;
headers: string;
components: string;
objects: string;
arrays: string;
oneOfs: string;
allOfs: string;
anyOfs: string;
};
/**

@@ -111,10 +77,2 @@ * Implements functions to deal with the common Bindings object.

/**
* Callback used when crawling a schema.
* @param schema - which is being crawled
* @param propName - if the schema is from a property get the name of such
* @param callbackType - is the schema a new one or is the crawler finishing one.
*/
declare type TraverseSchemas = (schema: Schema, propName: string, callbackType: SchemaIteratorCallbackType) => boolean;
declare module "@asyncapi/parser" {

@@ -295,2 +253,9 @@ /**

}
/**
* Callback used when crawling a schema.
* @param schema - which is being crawled
* @param propName - if the schema is from a property get the name of such
* @param callbackType - is the schema a new one or is the crawler finishing one.
*/
type TraverseSchemas = (schema: Schema, propName: string, callbackType: SchemaIteratorCallbackType) => boolean;
class Base {

@@ -297,0 +262,0 @@ json(): any;

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